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

Issue 1159773005: Handle border-image with fill and zero-width borders (Closed)

Created:
5 years, 7 months ago by davve
Modified:
5 years, 6 months ago
Reviewers:
pdr.
CC:
blink-reviews, blink-reviews-style_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Handle border-image with fill and zero-width borders Before this patch we require at least one border dimension (top, left, bottom, right) to be non-zero to trigger the border painting. This misses the case when we have a zero width border all around but a border image and border-image-slice: <numbers> fill. The center part of the border-image should be painted, regardless of the border-widths. See https://bugs.webkit.org/show_bug.cgi?id=142650 and related commit. It's not an exact port but this patch is heavily inspired by ​sabouhallawa's fix. BUG=493088 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196489

Patch Set 1 #

Patch Set 2 : Clean up test #

Patch Set 3 : Leave hasBorder() alone and patch relevant cases instead #

Patch Set 4 : Rebase #

Patch Set 5 : Remove newly added but flaky test #

Total comments: 6

Patch Set 6 : Replace test with tests from WebKit patch #

Patch Set 7 : Clean up tests and adapt them to Blink by avoiding scaling #

Patch Set 8 : Address review comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -13 lines) Patch
A LayoutTests/fast/borders/border-image-fill-inline-no-border.html View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A LayoutTests/fast/borders/border-image-fill-inline-no-border-expected.html View 1 2 3 4 5 6 1 chunk +47 lines, -0 lines 0 comments Download
A LayoutTests/fast/borders/border-image-fill-no-border.html View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A LayoutTests/fast/borders/border-image-fill-no-border-expected.html View 1 2 3 4 5 6 1 chunk +48 lines, -0 lines 0 comments Download
A LayoutTests/fast/borders/resources/button-border.svg View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/fast/borders/resources/button-border-cropped.svg View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/fast/borders/resources/svg-100x100-intrinsic.svg View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutObject.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/BoxDecorationData.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/BoxDecorationData.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/paint/BoxPainter.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/FieldsetPainter.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/InlineFlowBoxPainter.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/TableCellPainter.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/style/BorderData.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/style/ComputedStyle.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 12 (4 generated)
davve
This is a prerequisite for the tests in https://code.google.com/p/chromium/issues/detail?id=492485. PTAL when you have a moment.
5 years, 6 months ago (2015-05-28 12:27:35 UTC) #2
pdr.
LGTM https://codereview.chromium.org/1159773005/diff/80001/LayoutTests/fast/borders/border-image-fill-no-border-width-expected.html File LayoutTests/fast/borders/border-image-fill-no-border-width-expected.html (right): https://codereview.chromium.org/1159773005/diff/80001/LayoutTests/fast/borders/border-image-fill-no-border-width-expected.html#newcode14 LayoutTests/fast/borders/border-image-fill-no-border-width-expected.html:14: <div class="border-image-100-intrinsic"></div> Nit: unneeded class. https://codereview.chromium.org/1159773005/diff/80001/LayoutTests/fast/borders/border-image-fill-no-border-width.html File LayoutTests/fast/borders/border-image-fill-no-border-width.html ...
5 years, 6 months ago (2015-06-02 03:07:57 UTC) #3
davve
https://codereview.chromium.org/1159773005/diff/80001/Source/core/layout/LayoutObject.cpp File Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/1159773005/diff/80001/Source/core/layout/LayoutObject.cpp#newcode1671 Source/core/layout/LayoutObject.cpp:1671: if (style()->hasBorderDecoration() || style()->hasOutline() On 2015/06/02 03:07:56, pdr wrote: ...
5 years, 6 months ago (2015-06-03 06:56:01 UTC) #4
pdr.
LGTM
5 years, 6 months ago (2015-06-04 03:50:31 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1159773005/140001
5 years, 6 months ago (2015-06-04 07:24:28 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/65245)
5 years, 6 months ago (2015-06-04 09:47:20 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1159773005/140001
5 years, 6 months ago (2015-06-04 09:48:42 UTC) #11
commit-bot: I haz the power
5 years, 6 months ago (2015-06-04 10:47:09 UTC) #12
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=196489

Powered by Google App Engine
This is Rietveld 408576698