New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 779927 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocked on:
issue 779928

Blocking:
issue 775331



Sign in to add a comment

Add subclasses CSSLonghandAPI and CSSShorthandAPI to CSSPropertyAPI

Project Member Reported by rjwright@chromium.org, Oct 31 2017

Issue description

The 530+ classes that derive from CSSPropertyAPI fall neatly into two groups: longhands and shorthands. Those two groups share little functionality, but there is no class structure to separate them.

We should restructure the inheritance tree rooted at CSSPropertyAPI so that it is more descriptive & navigable, and doesn’t share functionality between subclasses unnecessarily.

New structure will be

CSSPropertyAPI
    CSSLonghandAPI
    CSSShorthandAPI

NB: There is also a plan to rename CSSPropertyAPI to CSSProperty. Its subclasses will then be called CSSLonghand & CSSShorthand.
 
Status: Assigned (was: Available)
Blockedon: 779928
Labels: Update-Monthly
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6

commit 6db6ef42d3d8763c246f6893e86fc1d8ee4685f6
Author: Renee Wright <rjwright@chromium.org>
Date: Fri Nov 10 07:27:35 2017

Add Longhand and Shorthand subclass to CSSProperty

Here is the diff of the generated files
https://gist.github.com/rjwright/61829820d0cbb6d304eebc345a29ab76/revisions

Bug:  779927 
Change-Id: Ia13f9a0c6f788fc7b7030f1248a8ecd44ec6ba7b
Reviewed-on: https://chromium-review.googlesource.com/760018
Commit-Queue: Renée Wright <rjwright@chromium.org>
Reviewed-by: Bugs Nash <bugsnash@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515497}
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/build/scripts/core/css/properties/make_css_property_base.py
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/build/scripts/core/css/properties/make_css_property_headers.py
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/build/scripts/core/css/properties/templates/CSSProperty.cpp.tmpl
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/build/scripts/core/css/properties/templates/CSSProperty.h.tmpl
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/build/scripts/core/css/properties/templates/CSSPropertySubclass.h.tmpl
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/build/scripts/templates/StyleBuilder.cpp.tmpl
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/core/css/BUILD.gn
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
[add] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/core/css/properties/Longhand.h
[add] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/core/css/properties/Shorthand.h
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/core/css/properties/longhands/ApplyAtRule.h
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/core/css/properties/longhands/Variable.h
[modify] https://crrev.com/6db6ef42d3d8763c246f6893e86fc1d8ee4685f6/third_party/WebKit/Source/core/css/properties/shorthands/Offset.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment