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

Issue 81123002: Factor out common BorderImageLength code in CSSToStyleMap (Closed)

Created:
7 years, 1 month ago by davve
Modified:
7 years ago
CC:
blink-reviews, zoltan1, bemjb+rendering_chromium.org, eae+blinkwatch, leviw+renderwatch, dglazkov+blink, apavlov+blink_chromium.org, jchaffraix+rendering, darktears
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Factor out common BorderImageLength code in CSSToStyleMap CSSToStyleMap::mapNinePieceImageQuad had a lot of repetitive code for BorderImageLength. Factor it out to a static function. Afterwards, the default constructor for BorderImageLengthBox gets used less so make the code more explicit by removing the default constructor entirely. Instead add a constructor that initializes the members to a specific value. Since this revealed one error in a code comment (the initial value for -webkit-mask-box-image-width is 'auto' not zero) fix that as well. BUG=322014 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162646

Patch Set 1 #

Patch Set 2 : Add test for -webkit-mask-box-image-width #

Patch Set 3 : Add expected file too #

Total comments: 8

Patch Set 4 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -68 lines) Patch
A LayoutTests/fast/backgrounds/mask-box-image-width.html View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download
A LayoutTests/fast/backgrounds/mask-box-image-width-expected.txt View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/css/CSSToStyleMap.cpp View 1 2 3 1 chunk +20 lines, -38 lines 0 comments Download
M Source/core/rendering/style/BorderImageLength.h View 1 chunk +0 lines, -7 lines 0 comments Download
M Source/core/rendering/style/BorderImageLengthBox.h View 2 chunks +10 lines, -19 lines 0 comments Download
M Source/core/rendering/style/NinePieceImage.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
davve
Here comes a clean-up patch after my battle with Length::Relative. Julien, feel free to suggest ...
7 years, 1 month ago (2013-11-21 15:48:37 UTC) #1
Julien - ping for review
The code change is great, just a comment below. > Julien, feel free to suggest ...
7 years, 1 month ago (2013-11-21 21:24:02 UTC) #2
davve
On 2013/11/21 21:24:02, Julien Chaffraix - AEDT wrote: > From the description: > > the ...
7 years, 1 month ago (2013-11-22 09:13:32 UTC) #3
Julien - ping for review
lgtm with comments. https://codereview.chromium.org/81123002/diff/80001/LayoutTests/fast/backgrounds/mask-box-image-width.html File LayoutTests/fast/backgrounds/mask-box-image-width.html (right): https://codereview.chromium.org/81123002/diff/80001/LayoutTests/fast/backgrounds/mask-box-image-width.html#newcode15 LayoutTests/fast/backgrounds/mask-box-image-width.html:15: .test *:nth-child(2) { Let's avoid nth-child ...
7 years ago (2013-11-24 22:53:01 UTC) #4
davve
https://codereview.chromium.org/81123002/diff/80001/LayoutTests/fast/backgrounds/mask-box-image-width.html File LayoutTests/fast/backgrounds/mask-box-image-width.html (right): https://codereview.chromium.org/81123002/diff/80001/LayoutTests/fast/backgrounds/mask-box-image-width.html#newcode15 LayoutTests/fast/backgrounds/mask-box-image-width.html:15: .test *:nth-child(2) { On 2013/11/24 22:53:01, Julien Chaffraix - ...
7 years ago (2013-11-25 22:15:16 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davve@opera.com/81123002/170001
7 years ago (2013-11-25 22:16:14 UTC) #6
commit-bot: I haz the power
7 years ago (2013-11-26 00:36:43 UTC) #7
Message was sent while issue was closed.
Change committed as 162646

Powered by Google App Engine
This is Rietveld 408576698