|
|
DescriptionMoved nonproperties 'affectedBy*' to be generated in ComputedStyleBase.
Move the nonproperty fields:
- affectedByFocus
- affectedByHover
- affectedByActive
- affectedByDrag
to be generated in ComputedStyleBase. Also moved getter / setter
methods to be generated in ComputedStyleBase.
BUG=628043
Review-Url: https://codereview.chromium.org/2669453002
Cr-Commit-Position: refs/heads/master@{#453935}
Committed: https://chromium.googlesource.com/chromium/src/+/2f8222f7704a78f4a3ada84c1fdd915b6da2b219
Patch Set 1 #Patch Set 2 : Rebase #
Total comments: 1
Patch Set 3 : Rebase #
Total comments: 2
Patch Set 4 : Address comments #Patch Set 5 : What is grammar #
Messages
Total messages: 23 (12 generated)
Description was changed from ========== Moved nonproperty 'affectedBy*' to be generated in ComputedStyleBase. Move the nonproperty fields: - affectedByFocus - affectedByHover - affectedByActive - affectedByDrag to be generated in ComputedStyleBase. Also moved getter / setter methods to be generated in ComputedStyleBase. BUG=628043 ========== to ========== Moved nonproperties 'affectedBy*' to be generated in ComputedStyleBase. Move the nonproperty fields: - affectedByFocus - affectedByHover - affectedByActive - affectedByDrag to be generated in ComputedStyleBase. Also moved getter / setter methods to be generated in ComputedStyleBase. BUG=628043 ==========
shend@chromium.org changed reviewers: + nainar@chromium.org
Hi Naina, PTAL :)
lgtm
shend@chromium.org changed reviewers: + sashab@chromium.org
Hi Sasha, PTAL
https://codereview.chromium.org/2669453002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/style/ComputedStyle.h (left): https://codereview.chromium.org/2669453002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/style/ComputedStyle.h:2539: void setAffectedByHover() { m_nonInheritedData.m_affectedByHover = true; } Can we have a separate discussion about whether we want these to always be different, or whether we want to rewrite these as a first step so that they match the property setters Sorry you've written so many patches already, but I think it would be better to do it this way, rather than generate it and then not be able to change it easily
shend@chromium.org changed reviewers: + meade@chromium.org
Hi Eddy PTAL :)
lgtm Speaking of the code generation discussions we've been having, how about attaching a diff to these CLs? :)
nit but lgtm! Cool cool And yeah +1 to put the diff in a comment or something, or make a gist.github.com and link it in the CL description (yay syntax highlighting) https://codereview.chromium.org/2669453002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_computed_style_base.py (right): https://codereview.chromium.org/2669453002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_computed_style_base.py:21: # Whether this affected by these pseudo-classes Whether this style is affected by these pseudo-classes
Diff for ComputedStyleBase.h: @@ -56,7 +56,11 @@ m_emptyCellsIsInherited(static_cast<unsigned>(true)), m_emptyCells(static_cast<unsigned>(EEmptyCells::kShow)), m_visibilityIsInherited(static_cast<unsigned>(true)), - m_unique(static_cast<unsigned>(false)) + m_affectedByActive(static_cast<unsigned>(false)), + m_affectedByFocus(static_cast<unsigned>(false)), + m_unique(static_cast<unsigned>(false)), + m_affectedByHover(static_cast<unsigned>(false)), + m_affectedByDrag(static_cast<unsigned>(false)) {} ~ComputedStyleBase() {} @@ -98,7 +102,11 @@ m_emptyCellsIsInherited(o.m_emptyCellsIsInherited), m_emptyCells(o.m_emptyCells), m_visibilityIsInherited(o.m_visibilityIsInherited), - m_unique(o.m_unique) + m_affectedByActive(o.m_affectedByActive), + m_affectedByFocus(o.m_affectedByFocus), + m_unique(o.m_unique), + m_affectedByHover(o.m_affectedByHover), + m_affectedByDrag(o.m_affectedByDrag) {} bool operator==(const ComputedStyleBase& o) const { @@ -140,7 +148,11 @@ m_emptyCellsIsInherited == o.m_emptyCellsIsInherited && m_emptyCells == o.m_emptyCells && m_visibilityIsInherited == o.m_visibilityIsInherited && - m_unique == o.m_unique + m_affectedByActive == o.m_affectedByActive && + m_affectedByFocus == o.m_affectedByFocus && + m_unique == o.m_unique && + m_affectedByHover == o.m_affectedByHover && + m_affectedByDrag == o.m_affectedByDrag ; } @@ -245,7 +257,11 @@ resetEmptyCellsIsInherited(); resetEmptyCells(); resetVisibilityIsInherited(); + resetAffectedByActive(); + resetAffectedByFocus(); resetUnique(); + resetAffectedByHover(); + resetAffectedByDrag(); } enum IsAtShadowBoundary { @@ -487,12 +503,36 @@ void setVisibilityIsInherited(bool v) { m_visibilityIsInherited = static_cast<unsigned>(v); } inline void resetVisibilityIsInherited() { m_visibilityIsInherited = static_cast<unsigned>(true); } + // affectedByActive + inline static bool initialAffectedByActive() { return false; } + bool affectedByActive() const { return static_cast<bool>(m_affectedByActive); } + void setAffectedByActive() { m_affectedByActive = static_cast<unsigned>(true); } + inline void resetAffectedByActive() { m_affectedByActive = static_cast<unsigned>(false); } + + // affectedByFocus + inline static bool initialAffectedByFocus() { return false; } + bool affectedByFocus() const { return static_cast<bool>(m_affectedByFocus); } + void setAffectedByFocus() { m_affectedByFocus = static_cast<unsigned>(true); } + inline void resetAffectedByFocus() { m_affectedByFocus = static_cast<unsigned>(false); } + // unique inline static bool initialUnique() { return false; } bool unique() const { return static_cast<bool>(m_unique); } void setUnique() { m_unique = static_cast<unsigned>(true); } inline void resetUnique() { m_unique = static_cast<unsigned>(false); } + // affectedByHover + inline static bool initialAffectedByHover() { return false; } + bool affectedByHover() const { return static_cast<bool>(m_affectedByHover); } + void setAffectedByHover() { m_affectedByHover = static_cast<unsigned>(true); } + inline void resetAffectedByHover() { m_affectedByHover = static_cast<unsigned>(false); } + + // affectedByDrag + inline static bool initialAffectedByDrag() { return false; } + bool affectedByDrag() const { return static_cast<bool>(m_affectedByDrag); } + void setAffectedByDrag() { m_affectedByDrag = static_cast<unsigned>(true); } + inline void resetAffectedByDrag() { m_affectedByDrag = static_cast<unsigned>(false); } + protected: // Storage. unsigned m_listStyleType : 6; // EListStyleType @@ -532,7 +572,11 @@ unsigned m_emptyCellsIsInherited : 1; // bool unsigned m_emptyCells : 1; // EEmptyCells unsigned m_visibilityIsInherited : 1; // bool + unsigned m_affectedByActive : 1; // bool + unsigned m_affectedByFocus : 1; // bool unsigned m_unique : 1; // bool + unsigned m_affectedByHover : 1; // bool + unsigned m_affectedByDrag : 1; // bool }; } // namespace blink
https://codereview.chromium.org/2669453002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_computed_style_base.py (right): https://codereview.chromium.org/2669453002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_computed_style_base.py:21: # Whether this affected by these pseudo-classes On 2017/02/19 at 23:03:14, sashab wrote: > Whether this style is affected by these pseudo-classes Done.
The CQ bit was checked by shend@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by shend@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from nainar@chromium.org, meade@chromium.org, sashab@chromium.org Link to the patchset: https://codereview.chromium.org/2669453002/#ps80001 (title: "What is grammar")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 80001, "attempt_start_ts": 1488380871853240, "parent_rev": "25eac092d62daca30149285866c0b70dfad089b4", "commit_rev": "2f8222f7704a78f4a3ada84c1fdd915b6da2b219"}
Message was sent while issue was closed.
Description was changed from ========== Moved nonproperties 'affectedBy*' to be generated in ComputedStyleBase. Move the nonproperty fields: - affectedByFocus - affectedByHover - affectedByActive - affectedByDrag to be generated in ComputedStyleBase. Also moved getter / setter methods to be generated in ComputedStyleBase. BUG=628043 ========== to ========== Moved nonproperties 'affectedBy*' to be generated in ComputedStyleBase. Move the nonproperty fields: - affectedByFocus - affectedByHover - affectedByActive - affectedByDrag to be generated in ComputedStyleBase. Also moved getter / setter methods to be generated in ComputedStyleBase. BUG=628043 Review-Url: https://codereview.chromium.org/2669453002 Cr-Commit-Position: refs/heads/master@{#453935} Committed: https://chromium.googlesource.com/chromium/src/+/2f8222f7704a78f4a3ada84c1fdd... ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/2f8222f7704a78f4a3ada84c1fdd... |