|
|
DescriptionUse getters for StyleSurroundData members in ComputedStyle.cpp
In ComputedStyle, we directly access StyleSurroundData members via the
m_surround pointer (e.g. m_surround->m_border), but this assumes that
these members will always be stored in StyleSurroundData. As part of
clockwork, we may change where these members are stored, so this patch
uses getter methods instead, which are independent of where these
members are stored.
Places not affected by this patch:
- Getters/setters, since these will be eventually generated.
- When the surround pointer is used directly (e.g. for fast
comparisons), since these are unavoidable.
- Modifying variables via m_surround.access(), since they're
setters not getters. Setters will be refactored in a separate
patch.
BUG=628043
Review-Url: https://codereview.chromium.org/2785343002
Cr-Commit-Position: refs/heads/master@{#465119}
Committed: https://chromium.googlesource.com/chromium/src/+/20be06ee11375df67a4bcdb0e9716fbb343f2e48
Patch Set 1 #
Total comments: 2
Patch Set 2 : Rebase #Patch Set 3 : Fix typo #Patch Set 4 : Rebase #
Dependent Patchsets: Messages
Total messages: 41 (30 generated)
shend@chromium.org changed reviewers: + bugsnash@chromium.org
Hi Bugs, PTAL :)
Good stuff, this is better code anyways There are more instances of m_surround members being accessed in ComputedStyle.h and .cpp files than you've converted in this patch, is there a reason why not all of them have been done? https://codereview.chromium.org/2785343002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/style/ComputedStyle.cpp (right): https://codereview.chromium.org/2785343002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/style/ComputedStyle.cpp:590: if (margin() != other.margin() || !offsetEqual(other) || what methods are these margin() and padding() calling to? They don't seem to exist in ComputedStyle
Description was changed from ========== Use getters for StyleSurroundData members inside ComputedStyle. In ComputedStyle, we directly access StyleSurroundData members via the m_surround pointer (e.g. m_surround->m_border), but this assumes that these members will always be stored in StyleSurroundData. As part of clockwork, we may change where these members are stored, so this patch uses getter methods instead, which are independent of where these members are stored. BUG=628043 ========== to ========== Use getters for StyleSurroundData members inside ComputedStyle. In ComputedStyle, we directly access StyleSurroundData members via the m_surround pointer (e.g. m_surround->m_border), but this assumes that these members will always be stored in StyleSurroundData. As part of clockwork, we may change where these members are stored, so this patch uses getter methods instead, which are independent of where these members are stored. Places not affected by this patch: - ComputedStyle.h, since this code will be eventually generated. - When the surround pointer is used directly (e.g. for fast comparisons), since these are unavoidable. - Modifying variables via m_surround.access(), since they're setters not getters. Setters will be refactored in a separate patch. BUG=628043 ==========
Description was changed from ========== Use getters for StyleSurroundData members inside ComputedStyle. In ComputedStyle, we directly access StyleSurroundData members via the m_surround pointer (e.g. m_surround->m_border), but this assumes that these members will always be stored in StyleSurroundData. As part of clockwork, we may change where these members are stored, so this patch uses getter methods instead, which are independent of where these members are stored. Places not affected by this patch: - ComputedStyle.h, since this code will be eventually generated. - When the surround pointer is used directly (e.g. for fast comparisons), since these are unavoidable. - Modifying variables via m_surround.access(), since they're setters not getters. Setters will be refactored in a separate patch. BUG=628043 ========== to ========== Use getters for StyleSurroundData members in ComputedStyle.cpp In ComputedStyle, we directly access StyleSurroundData members via the m_surround pointer (e.g. m_surround->m_border), but this assumes that these members will always be stored in StyleSurroundData. As part of clockwork, we may change where these members are stored, so this patch uses getter methods instead, which are independent of where these members are stored. Places not affected by this patch: - ComputedStyle.h, since this code will be eventually generated. - When the surround pointer is used directly (e.g. for fast comparisons), since these are unavoidable. - Modifying variables via m_surround.access(), since they're setters not getters. Setters will be refactored in a separate patch. BUG=628043 ==========
> There are more instances of m_surround members being accessed in ComputedStyle.h and .cpp files than you've converted in this patch, is there a reason why not all of them have been done? Sorry for the confusion, I've updated the CL description with a list of things not affected by this patch and reasons. Other than those, let me know if I missed any members :) https://codereview.chromium.org/2785343002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/style/ComputedStyle.cpp (right): https://codereview.chromium.org/2785343002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/style/ComputedStyle.cpp:590: if (margin() != other.margin() || !offsetEqual(other) || On 2017/04/03 at 00:12:48, Bugs Nash wrote: > what methods are these margin() and padding() calling to? They don't seem to exist in ComputedStyle It's being added in a parent patch (https://codereview.chromium.org/2787183002). They just return m_surround->m_margin and m_surround->m_padding.
On 2017/04/03 at 00:58:48, shend wrote: > > There are more instances of m_surround members being accessed in ComputedStyle.h and .cpp files than you've converted in this patch, is there a reason why not all of them have been done? > > Sorry for the confusion, I've updated the CL description with a list of things not affected by this patch and reasons. Other than those, let me know if I missed any members :) > > https://codereview.chromium.org/2785343002/diff/1/third_party/WebKit/Source/c... > File third_party/WebKit/Source/core/style/ComputedStyle.cpp (right): > > https://codereview.chromium.org/2785343002/diff/1/third_party/WebKit/Source/c... > third_party/WebKit/Source/core/style/ComputedStyle.cpp:590: if (margin() != other.margin() || !offsetEqual(other) || > On 2017/04/03 at 00:12:48, Bugs Nash wrote: > > what methods are these margin() and padding() calling to? They don't seem to exist in ComputedStyle > > It's being added in a parent patch (https://codereview.chromium.org/2787183002). They just return m_surround->m_margin and m_surround->m_padding. oohh sorry I missed the depends on patch there. That still doesn't seem to have a margin() method though?
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...
On 2017/04/03 at 03:54:37, Bugs Nash wrote: > On 2017/04/03 at 00:58:48, shend wrote: > > > There are more instances of m_surround members being accessed in ComputedStyle.h and .cpp files than you've converted in this patch, is there a reason why not all of them have been done? > > > > Sorry for the confusion, I've updated the CL description with a list of things not affected by this patch and reasons. Other than those, let me know if I missed any members :) > > > > https://codereview.chromium.org/2785343002/diff/1/third_party/WebKit/Source/c... > > File third_party/WebKit/Source/core/style/ComputedStyle.cpp (right): > > > > https://codereview.chromium.org/2785343002/diff/1/third_party/WebKit/Source/c... > > third_party/WebKit/Source/core/style/ComputedStyle.cpp:590: if (margin() != other.margin() || !offsetEqual(other) || > > On 2017/04/03 at 00:12:48, Bugs Nash wrote: > > > what methods are these margin() and padding() calling to? They don't seem to exist in ComputedStyle > > > > It's being added in a parent patch (https://codereview.chromium.org/2787183002). They just return m_surround->m_margin and m_surround->m_padding. > > oohh sorry I missed the depends on patch there. That still doesn't seem to have a margin() method though? wait, the depends on patch does add the margin() method, it just didn't say so in the description. lgtm!
On 2017/04/03 at 03:54:37, bugsnash wrote: > On 2017/04/03 at 00:58:48, shend wrote: > > > There are more instances of m_surround members being accessed in ComputedStyle.h and .cpp files than you've converted in this patch, is there a reason why not all of them have been done? > > > > Sorry for the confusion, I've updated the CL description with a list of things not affected by this patch and reasons. Other than those, let me know if I missed any members :) > > > > https://codereview.chromium.org/2785343002/diff/1/third_party/WebKit/Source/c... > > File third_party/WebKit/Source/core/style/ComputedStyle.cpp (right): > > > > https://codereview.chromium.org/2785343002/diff/1/third_party/WebKit/Source/c... > > third_party/WebKit/Source/core/style/ComputedStyle.cpp:590: if (margin() != other.margin() || !offsetEqual(other) || > > On 2017/04/03 at 00:12:48, Bugs Nash wrote: > > > what methods are these margin() and padding() calling to? They don't seem to exist in ComputedStyle > > > > It's being added in a parent patch (https://codereview.chromium.org/2787183002). They just return m_surround->m_margin and m_surround->m_padding. > > oohh sorry I missed the depends on patch there. That still doesn't seem to have a margin() method though? It's hidden away in a bunch of other margin methods :P The parent patch has landed, so you can see the method here: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/style/Com...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by shend@chromium.org to run a CQ dry run
shend@chromium.org changed reviewers: + meade@chromium.org
shend@chromium.org changed reviewers: + meade@chromium.org
Hi Eddy, PTAL
Hi Eddy, PTAL
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: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
lgtm
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 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: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clan...) android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...) android_cronet on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_cron...) android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...) cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...) linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...) cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) 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
Description was changed from ========== Use getters for StyleSurroundData members in ComputedStyle.cpp In ComputedStyle, we directly access StyleSurroundData members via the m_surround pointer (e.g. m_surround->m_border), but this assumes that these members will always be stored in StyleSurroundData. As part of clockwork, we may change where these members are stored, so this patch uses getter methods instead, which are independent of where these members are stored. Places not affected by this patch: - ComputedStyle.h, since this code will be eventually generated. - When the surround pointer is used directly (e.g. for fast comparisons), since these are unavoidable. - Modifying variables via m_surround.access(), since they're setters not getters. Setters will be refactored in a separate patch. BUG=628043 ========== to ========== Use getters for StyleSurroundData members in ComputedStyle.cpp In ComputedStyle, we directly access StyleSurroundData members via the m_surround pointer (e.g. m_surround->m_border), but this assumes that these members will always be stored in StyleSurroundData. As part of clockwork, we may change where these members are stored, so this patch uses getter methods instead, which are independent of where these members are stored. Places not affected by this patch: - Getters/setters, since these will be eventually generated. - When the surround pointer is used directly (e.g. for fast comparisons), since these are unavoidable. - Modifying variables via m_surround.access(), since they're setters not getters. Setters will be refactored in a separate patch. BUG=628043 ==========
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 bugsnash@chromium.org, meade@chromium.org Link to the patchset: https://codereview.chromium.org/2785343002/#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": 1492483805547110, "parent_rev": "a6c1b9d6d636b72d9b88cb2ab5723be4770d006f", "commit_rev": "20be06ee11375df67a4bcdb0e9716fbb343f2e48"}
Message was sent while issue was closed.
Description was changed from ========== Use getters for StyleSurroundData members in ComputedStyle.cpp In ComputedStyle, we directly access StyleSurroundData members via the m_surround pointer (e.g. m_surround->m_border), but this assumes that these members will always be stored in StyleSurroundData. As part of clockwork, we may change where these members are stored, so this patch uses getter methods instead, which are independent of where these members are stored. Places not affected by this patch: - Getters/setters, since these will be eventually generated. - When the surround pointer is used directly (e.g. for fast comparisons), since these are unavoidable. - Modifying variables via m_surround.access(), since they're setters not getters. Setters will be refactored in a separate patch. BUG=628043 ========== to ========== Use getters for StyleSurroundData members in ComputedStyle.cpp In ComputedStyle, we directly access StyleSurroundData members via the m_surround pointer (e.g. m_surround->m_border), but this assumes that these members will always be stored in StyleSurroundData. As part of clockwork, we may change where these members are stored, so this patch uses getter methods instead, which are independent of where these members are stored. Places not affected by this patch: - Getters/setters, since these will be eventually generated. - When the surround pointer is used directly (e.g. for fast comparisons), since these are unavoidable. - Modifying variables via m_surround.access(), since they're setters not getters. Setters will be refactored in a separate patch. BUG=628043 Review-Url: https://codereview.chromium.org/2785343002 Cr-Commit-Position: refs/heads/master@{#465119} Committed: https://chromium.googlesource.com/chromium/src/+/20be06ee11375df67a4bcdb0e971... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/20be06ee11375df67a4bcdb0e971... |