Bug 75347 - getComputedStyle for border-image is not implemented.
Summary: getComputedStyle for border-image is not implemented.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexis Menard (darktears)
URL:
Keywords:
Depends on:
Blocks: 13658
  Show dependency treegraph
 
Reported: 2011-12-29 05:39 PST by Alexis Menard (darktears)
Modified: 2012-01-05 04:56 PST (History)
6 users (show)

See Also:


Attachments
Patch (12.22 KB, patch)
2011-12-29 05:43 PST, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (11.92 KB, patch)
2012-01-04 04:31 PST, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (11.80 KB, patch)
2012-01-04 04:41 PST, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch for landing (13.53 KB, patch)
2012-01-04 11:26 PST, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Menard (darktears) 2011-12-29 05:39:33 PST
getComputedStyle for border-image is not implemented.
Comment 1 Alexis Menard (darktears) 2011-12-29 05:43:32 PST
Created attachment 120736 [details]
Patch
Comment 2 Tony Chang 2012-01-03 11:47:25 PST
Comment on attachment 120736 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        Implement getComputedStyle for border-color.

Nit: border-image

> LayoutTests/fast/css/getComputedStyle/computed-style-border-image.html:23
> +shouldBe("computedBorderImageStyle('12 11 12 11', 'border-image')", "'none 12 11 1 0px stretch'");

It doesn't look like this is something that WebKit can parse properly.  I think you need a '/' between border-image-slice, border-image-width and border-image-outset.
Comment 3 Alexis Menard (darktears) 2012-01-04 04:31:28 PST
Created attachment 121098 [details]
Patch
Comment 4 Alexis Menard (darktears) 2012-01-04 04:41:35 PST
Created attachment 121099 [details]
Patch
Comment 5 Tony Chang 2012-01-04 10:11:42 PST
Comment on attachment 121099 [details]
Patch

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

> LayoutTests/fast/css/getComputedStyle/computed-style-border-image.html:56
> +shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 / 13px / 11px', 'border-image')", "'url(dummy://test.png) 10 / 13px / 11px stretch'");

Can you add some tests that setting border-image to the value returned by getComputedStyle doesn't change the value.  That is, for each of the different values:
var before = window.getComputedStyle(testDiv).getPropertyValue('border-image');
testDiv.style.borderImage = 'none';
testDiv.style.borderImage = before;
assert(window.getComputedStyle(testDiv).getPropertyValue('border-image') == before);

It would be nice to have this kind of check for all future getComputedStyle changes.
Comment 6 Alexis Menard (darktears) 2012-01-04 11:26:21 PST
Created attachment 121129 [details]
Patch for landing
Comment 7 WebKit Review Bot 2012-01-05 04:56:06 PST
Comment on attachment 121129 [details]
Patch for landing

Clearing flags on attachment: 121129

Committed r104144: <http://trac.webkit.org/changeset/104144>
Comment 8 WebKit Review Bot 2012-01-05 04:56:11 PST
All reviewed patches have been landed.  Closing bug.