Bug 142650 - border-image with 'fill' keyword does not fill the middle area unless the border width is greater than zero
Summary: border-image with 'fill' keyword does not fill the middle area unless the bor...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-03-12 21:38 PDT by Said Abou-Hallawa
Modified: 2015-03-31 12:33 PDT (History)
6 users (show)

See Also:


Attachments
Test case (2.16 KB, text/html)
2015-03-12 21:38 PDT, Said Abou-Hallawa
no flags Details
Patch (11.39 KB, patch)
2015-03-12 21:44 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (11.19 KB, patch)
2015-03-13 09:51 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (17.39 KB, patch)
2015-03-24 12:23 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2015-03-12 21:38:16 PDT
Created attachment 248566 [details]
Test case

Setting the border width should have an affect on drawing the middle area. The middle area should be drawn regardless border width is greater than zero or not. The border width and style should only affect the border around the middle area.
Comment 1 Said Abou-Hallawa 2015-03-12 21:44:24 PDT
Created attachment 248567 [details]
Patch
Comment 2 Said Abou-Hallawa 2015-03-13 09:51:42 PDT
Created attachment 248587 [details]
Patch
Comment 3 Said Abou-Hallawa 2015-03-24 12:23:48 PDT
Created attachment 249338 [details]
Patch
Comment 4 Said Abou-Hallawa 2015-03-24 12:28:33 PDT
I found out the InlineFlowBox does not draw the middle area unless the border width is greater than zero. I added a new function in RenderStyle and I called it hasBorderDecoration(). It will return true if the border width is greater than zero or the border-image has the keyword 'fill'. This function is going to be used to control whether we need to draw the border decoration for RenderBox, RenderTable and InlineFlowBox or not. I also added a new test specific to InlineFlowBox.
Comment 5 Radar WebKit Bug Importer 2015-03-24 12:37:57 PDT
<rdar://problem/20279686>
Comment 6 Simon Fraser (smfr) 2015-03-30 12:01:39 PDT
Comment on attachment 249338 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=249338&action=review

> Source/WebCore/ChangeLog:10
> +        border-image with 'fill' keyword does not fill the middle area unless the border width is greater than zero.
> +        https://bugs.webkit.org/show_bug.cgi?id=142650.
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        The decoration of a RenderBox, a RenderTable or an InlineFlowBox should be
> +        drawn if its RenderStyle has a non-zero width border or the border-image
> +        has the keyword fill.

The test cases all use SVG images, but there's no mention of SVG in the changelog here. Can you clarify?
Comment 7 Said Abou-Hallawa 2015-03-31 11:59:47 PDT
(In reply to comment #6)
> Comment on attachment 249338 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=249338&action=review
> 
> > Source/WebCore/ChangeLog:10
> > +        border-image with 'fill' keyword does not fill the middle area unless the border width is greater than zero.
> > +        https://bugs.webkit.org/show_bug.cgi?id=142650.
> > +
> > +        Reviewed by NOBODY (OOPS!).
> > +
> > +        The decoration of a RenderBox, a RenderTable or an InlineFlowBox should be
> > +        drawn if its RenderStyle has a non-zero width border or the border-image
> > +        has the keyword fill.
> 
> The test cases all use SVG images, but there's no mention of SVG in the
> changelog here. Can you clarify?

The bug is not specific to SVG. It is reproducible for any kind of images. An SVG image with intrinsic size is almost the same as a bitmap image. Because the SVG size is smaller than the size of the bitmap image and because its drawing can be easily deduced from the markup, I'd rather include an SVG in my tests if possible and if the bug is not specific to bitmap images.
Comment 8 WebKit Commit Bot 2015-03-31 12:33:01 PDT
Comment on attachment 249338 [details]
Patch

Clearing flags on attachment: 249338

Committed r182197: <http://trac.webkit.org/changeset/182197>
Comment 9 WebKit Commit Bot 2015-03-31 12:33:05 PDT
All reviewed patches have been landed.  Closing bug.