Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Issue 2895933004: Pass the correct BorderWidth value when creating BorderValues (Closed)

Created:
3 years, 7 months ago by nainar
Modified:
3 years, 7 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Pass the correct BorderWidth value when creating BorderValues This patch fixes two bugs introduced by me when splitting up border-*-{width,style} out of BorderValue. 1. When creating a BorderValue to pass to layout code in ComputedStyle via Border{Left,Right,Bottom,Top,Start,End}() we should be creating these using Border*WidthInternal getters and not the public Border*Width getters as that is what the code did before and the public getters return a 0 width in case the Border*Style is none or hidden. This issue wasn't discovered due to the fact that there were no unit/layout tests. This patch adds these tests. Future work will be to wrap all the float <-> unsigned conversions in a class of its own. https: //codereview.chromium.org/2890733002. I mistakenly swapped a Review-Url: https://codereview.chromium.org/2895933004 Cr-Commit-Position: refs/heads/master@{#473836} Committed: https://chromium.googlesource.com/chromium/src/+/3363d5074a1b4579a8ccc9ddd1e52f99489719fe

Patch Set 1 #

Patch Set 2 : add computedstyle unit tes #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -9 lines) Patch
M third_party/WebKit/Source/core/layout/CollapsedBorderValue.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/CollapsedBorderValueTest.cpp View 4 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 chunk +14 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyleTest.cpp View 1 3 chunks +12 lines, -2 lines 2 comments Download

Dependent Patchsets:

Messages

Total messages: 17 (11 generated)
nainar
https://codereview.chromium.org/2895933004/diff/20001/third_party/WebKit/Source/core/style/ComputedStyleTest.cpp File third_party/WebKit/Source/core/style/ComputedStyleTest.cpp (right): https://codereview.chromium.org/2895933004/diff/20001/third_party/WebKit/Source/core/style/ComputedStyleTest.cpp#newcode105 third_party/WebKit/Source/core/style/ComputedStyleTest.cpp:105: TEST(ComputedStyleTest, HasOutlineWithCurrentColor) { These were spelt incorrectly and never ...
3 years, 7 months ago (2017-05-23 05:06:50 UTC) #6
shend
On 2017/05/23 at 05:06:50, nainar wrote: > https://codereview.chromium.org/2895933004/diff/20001/third_party/WebKit/Source/core/style/ComputedStyleTest.cpp > File third_party/WebKit/Source/core/style/ComputedStyleTest.cpp (right): > > https://codereview.chromium.org/2895933004/diff/20001/third_party/WebKit/Source/core/style/ComputedStyleTest.cpp#newcode105 ...
3 years, 7 months ago (2017-05-23 06:12:06 UTC) #7
nainar
alancutter@, PTAL? Thanks! Also let me know if the unit test isnt exahuastive enough
3 years, 7 months ago (2017-05-23 06:14:04 UTC) #9
alancutter (OOO until 2018)
lgtm
3 years, 7 months ago (2017-05-23 08:12:23 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2895933004/20001
3 years, 7 months ago (2017-05-23 08:13:37 UTC) #14
commit-bot: I haz the power
3 years, 7 months ago (2017-05-23 08:19:49 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/3363d5074a1b4579a8ccc9ddd1e5...

Powered by Google App Engine
This is Rietveld 408576698