|
|
DescriptionUse LayoutUnit for all border-*-width logic
This patch uses LayoutUnit for the logic of converting back and
forth between the stored int and the returned float value
instead of having this logic in main ComputedStyle.
Diff: https://gist.github.com/nainar/5d4e8db04884cb0dccb4874a0b23ef0d/revisions
BUG=628043
Review-Url: https://codereview.chromium.org/2904453002
Cr-Commit-Position: refs/heads/master@{#474181}
Committed: https://chromium.googlesource.com/chromium/src/+/03e6bc737f164bf673e4676f1e673eb669525288
Patch Set 1 #
Total comments: 6
Patch Set 2 : shend@ suggestions #
Total comments: 3
Patch Set 3 : Change to using LayoutUnit #
Messages
Total messages: 30 (20 generated)
The CQ bit was checked by nainar@chromium.org to run a CQ dry run
nainar@chromium.org changed reviewers: + shend@chromium.org
shend@, PTAL? Thanks!
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm after comments. https://codereview.chromium.org/2904453002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/style/BorderWidth.h (right): https://codereview.chromium.org/2904453002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/style/BorderWidth.h:14: friend class ComputedStyle; does this need to be a friend? https://codereview.chromium.org/2904453002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/style/BorderWidth.h:36: protected: I would just do private. https://codereview.chromium.org/2904453002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/style/BorderWidth.h:43: unsigned width_ : 26; // Fixed point width there's probably no need to bit pack this anymore, since BorderWidth is not bit packed in ComputedStyle.
The CQ bit was checked by nainar@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...
nainar@chromium.org changed reviewers: + alancutter@chromium.org
alancutter@, PTAL? Thanks! https://codereview.chromium.org/2904453002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/style/BorderWidth.h (right): https://codereview.chromium.org/2904453002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/style/BorderWidth.h:14: friend class ComputedStyle; On 2017/05/23 at 08:05:32, shend wrote: > does this need to be a friend? nope artifact of BorderValue which I blatantly copied. https://codereview.chromium.org/2904453002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/style/BorderWidth.h:36: protected: On 2017/05/23 at 08:05:32, shend wrote: > I would just do private. Done. https://codereview.chromium.org/2904453002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/style/BorderWidth.h:43: unsigned width_ : 26; // Fixed point width On 2017/05/23 at 08:05:32, shend wrote: > there's probably no need to bit pack this anymore, since BorderWidth is not bit packed in ComputedStyle. Yup. Done
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2904453002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/style/BorderWidth.h (right): https://codereview.chromium.org/2904453002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/style/BorderWidth.h:25: return static_cast<float>(width_) / kBorderWidthDenominator; I wonder why we don't use LayoutUnit for this. It has the same fixed point denominator.
nainar@google.com changed reviewers: + nainar@google.com
https://codereview.chromium.org/2904453002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/style/BorderWidth.h (right): https://codereview.chromium.org/2904453002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/style/BorderWidth.h:25: return static_cast<float>(width_) / kBorderWidthDenominator; On 2017/05/24 at 01:50:06, alancutter wrote: > I wonder why we don't use LayoutUnit for this. It has the same fixed point denominator. Could use LayoutUnit - didn't know it was a thing. shend@, WDYT?
https://codereview.chromium.org/2904453002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/style/BorderWidth.h (right): https://codereview.chromium.org/2904453002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/style/BorderWidth.h:25: return static_cast<float>(width_) / kBorderWidthDenominator; On 2017/05/24 at 01:53:21, nainar1 wrote: > On 2017/05/24 at 01:50:06, alancutter wrote: > > I wonder why we don't use LayoutUnit for this. It has the same fixed point denominator. > > Could use LayoutUnit - didn't know it was a thing. shend@, WDYT? If it does the same thing and you could get it to work, then sure!
nainar@google.com changed reviewers: - nainar@google.com
Description was changed from ========== Move all BorderWidth logic to separate class This patch moves all BorderWidth logic of converting back and forth between the stored unsigned and the returned float value into it's own class for Code Health purposes. BUG=628043 ========== to ========== Use LayoutUnit for all border-*-width logic This patch uses LayoutUnit for the logic of converting back and forth between the stored int and the returned float value instead of having this logic in main ComputedStyle. Diff: BUG=628043 ==========
Description was changed from ========== Use LayoutUnit for all border-*-width logic This patch uses LayoutUnit for the logic of converting back and forth between the stored int and the returned float value instead of having this logic in main ComputedStyle. Diff: BUG=628043 ========== to ========== Use LayoutUnit for all border-*-width logic This patch uses LayoutUnit for the logic of converting back and forth between the stored int and the returned float value instead of having this logic in main ComputedStyle. Diff: https://gist.github.com/nainar/5d4e8db04884cb0dccb4874a0b23ef0d/revisions BUG=628043 ==========
The CQ bit was checked by nainar@chromium.org to run a CQ dry run
shend@/alancutter@ Changed the logic to use LayoutUnit. PTAL? Thanks!
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
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 nainar@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from shend@chromium.org Link to the patchset: https://codereview.chromium.org/2904453002/#ps40001 (title: "Change to using LayoutUnit")
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": 40001, "attempt_start_ts": 1495605758495700, "parent_rev": "f0e5531d557726181f7004a6ad5fd4e7502787a9", "commit_rev": "03e6bc737f164bf673e4676f1e673eb669525288"}
Message was sent while issue was closed.
Description was changed from ========== Use LayoutUnit for all border-*-width logic This patch uses LayoutUnit for the logic of converting back and forth between the stored int and the returned float value instead of having this logic in main ComputedStyle. Diff: https://gist.github.com/nainar/5d4e8db04884cb0dccb4874a0b23ef0d/revisions BUG=628043 ========== to ========== Use LayoutUnit for all border-*-width logic This patch uses LayoutUnit for the logic of converting back and forth between the stored int and the returned float value instead of having this logic in main ComputedStyle. Diff: https://gist.github.com/nainar/5d4e8db04884cb0dccb4874a0b23ef0d/revisions BUG=628043 Review-Url: https://codereview.chromium.org/2904453002 Cr-Commit-Position: refs/heads/master@{#474181} Committed: https://chromium.googlesource.com/chromium/src/+/03e6bc737f164bf673e4676f1e67... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/03e6bc737f164bf673e4676f1e67... |