|
|
DescriptionGenerate ComputedStyle::hasViewportUnits and hasRemUnits.
This patch moves hasViewportUnits and hasRemUnits to be generated in
ComputedStyleBase. Both are noninherited nonproperties.
hasRemUnits is generated as a monotonic_flag field, but
hasViewportUnits needs to be a boolean flag field because there are
places where it gets set to false.
Since these are the two remaining noninherited fields stored directly
in ComputedStyle, this patch also removes the NonInheritedData struct
from ComputedStyle.
Diff of generated files:
https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions
BUG=628043
Review-Url: https://codereview.chromium.org/2797963002
Cr-Commit-Position: refs/heads/master@{#462377}
Committed: https://chromium.googlesource.com/chromium/src/+/25809e1270b9eb4103f1efcc089c781df8465e39
Patch Set 1 #Patch Set 2 : Not inherited! #
Total comments: 6
Patch Set 3 : Use primitive #Patch Set 4 : Rebase #
Messages
Total messages: 34 (25 generated)
Description was changed from ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. BUG=628043 ========== to ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 ==========
The CQ bit was checked by shend@chromium.org
The CQ bit was unchecked by shend@chromium.org
shend@chromium.org changed reviewers: + nainar@chromium.org
Hi Naina, PTAL :)
lgtm with two small questions. https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_computed_style_base.py (right): https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_computed_style_base.py:55: {'name': 'HasViewportUnits', 'field_template': 'flag', 'default_value': 'false', why isnt it a monotonic flag for my own understanding? https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/style/ComputedStyle.cpp (right): https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/style/ComputedStyle.cpp:348: m_hasRemUnits = other.hasRemUnits(); why can't we use setHasRemUnits() here instead? https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/style/ComputedStyle.cpp:348: m_hasRemUnits = other.hasRemUnits(); why can't we use setHasRemUnits() here instead?
Description was changed from ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 ========== to ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. hasViewportUnits is generated as a monotonic_flag field, but hasRemUnits needs to be a flag field because of a hack in the code discussed in https://codereview.chromium.org/2767853002. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 ==========
https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_computed_style_base.py (right): https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_computed_style_base.py:55: {'name': 'HasViewportUnits', 'field_template': 'flag', 'default_value': 'false', On 2017/04/05 at 16:41:49, nainar wrote: > why isnt it a monotonic flag for my own understanding? Good question. setHasViewportUnits currently takes a boolean argument because of a hack discussed in https://codereview.chromium.org/2767853002. I'll update the CL description. https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/style/ComputedStyle.cpp (right): https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/style/ComputedStyle.cpp:348: m_hasRemUnits = other.hasRemUnits(); On 2017/04/05 at 16:41:49, nainar wrote: > why can't we use setHasRemUnits() here instead? Since it is a monotonic flag, the setter doesn't take an argument and only sets hasRemUnits to true. This affects your work because this will break if hasRemUnits changes groups. I have an idea about generating private accessors for all members which we can discuss offline. That should just allow you to do setHasRemUnits(other.HasRemUnits()).
shend@chromium.org changed reviewers: + alancutter@chromium.org
Hi Alan, PTAL
lgtm https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_computed_style_base.py (right): https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_computed_style_base.py:55: {'name': 'HasViewportUnits', 'field_template': 'flag', 'default_value': 'false', On 2017/04/05 at 22:32:36, shend wrote: > On 2017/04/05 at 16:41:49, nainar wrote: > > why isnt it a monotonic flag for my own understanding? > > Good question. setHasViewportUnits currently takes a boolean argument because of a hack discussed in https://codereview.chromium.org/2767853002. I'll update the CL description. I don't think this "hack" is the reason it's not a monotonic_flag. The reason is because some places sets it false. Also your updated description has the two fields backwards in this regard.
Description was changed from ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. hasViewportUnits is generated as a monotonic_flag field, but hasRemUnits needs to be a flag field because of a hack in the code discussed in https://codereview.chromium.org/2767853002. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 ========== to ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. hasViewportUnits is generated as a monotonic_flag field, but hasRemUnits needs to be a flag field because there are places where it gets set to false. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 ==========
Description was changed from ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. hasViewportUnits is generated as a monotonic_flag field, but hasRemUnits needs to be a flag field because there are places where it gets set to false. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 ========== to ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. hasRemUnits is generated as a monotonic_flag field, but hasViewportUnits needs to be a flag field because there are places where it gets set to false. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 ==========
On 2017/04/06 at 04:18:49, alancutter wrote: > lgtm > > https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... > File third_party/WebKit/Source/build/scripts/make_computed_style_base.py (right): > > https://codereview.chromium.org/2797963002/diff/20001/third_party/WebKit/Sour... > third_party/WebKit/Source/build/scripts/make_computed_style_base.py:55: {'name': 'HasViewportUnits', 'field_template': 'flag', 'default_value': 'false', > On 2017/04/05 at 22:32:36, shend wrote: > > On 2017/04/05 at 16:41:49, nainar wrote: > > > why isnt it a monotonic flag for my own understanding? > > > > Good question. setHasViewportUnits currently takes a boolean argument because of a hack discussed in https://codereview.chromium.org/2767853002. I'll update the CL description. > > I don't think this "hack" is the reason it's not a monotonic_flag. The reason is because some places sets it false. Also your updated description has the two fields backwards in this regard. Thanks for spotting those :)
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: Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...)
Description was changed from ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. hasRemUnits is generated as a monotonic_flag field, but hasViewportUnits needs to be a flag field because there are places where it gets set to false. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 ========== to ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. hasRemUnits is generated as a monotonic_flag field, but hasViewportUnits needs to be a boolean flag field because there are places where it gets set to false. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 ==========
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: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
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, alancutter@chromium.org Link to the patchset: https://codereview.chromium.org/2797963002/#ps60001 (title: "Rebase")
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": 60001, "attempt_start_ts": 1491460974937870, "parent_rev": "b0a7f41f21e310fb708a01ea0cdf81816d4df386", "commit_rev": "25809e1270b9eb4103f1efcc089c781df8465e39"}
Message was sent while issue was closed.
Description was changed from ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. hasRemUnits is generated as a monotonic_flag field, but hasViewportUnits needs to be a boolean flag field because there are places where it gets set to false. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 ========== to ========== Generate ComputedStyle::hasViewportUnits and hasRemUnits. This patch moves hasViewportUnits and hasRemUnits to be generated in ComputedStyleBase. Both are noninherited nonproperties. hasRemUnits is generated as a monotonic_flag field, but hasViewportUnits needs to be a boolean flag field because there are places where it gets set to false. Since these are the two remaining noninherited fields stored directly in ComputedStyle, this patch also removes the NonInheritedData struct from ComputedStyle. Diff of generated files: https://gist.github.com/47fd74b4a54917d0413367227dcb962a/revisions BUG=628043 Review-Url: https://codereview.chromium.org/2797963002 Cr-Commit-Position: refs/heads/master@{#462377} Committed: https://chromium.googlesource.com/chromium/src/+/25809e1270b9eb4103f1efcc089c... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/25809e1270b9eb4103f1efcc089c...
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/2828193002/ by shend@chromium.org. The reason for reverting is: testing https://bugs.chromium.org/p/chromium/issues/detail?id=713128. |