RESOLVED FIXED 110853
Reading border radius from style property returns in wrong order.
https://bugs.webkit.org/show_bug.cgi?id=110853
Summary Reading border radius from style property returns in wrong order.
Jared Wyles
Reported 2013-02-26 00:19:22 PST
Reading border radius from style property returns in wrong order.
Attachments
Patch (6.02 KB, patch)
2013-02-26 00:23 PST, Jared Wyles
no flags
Patch (6.07 KB, patch)
2013-02-26 11:27 PST, Jared Wyles
no flags
Patch (6.88 KB, patch)
2013-02-26 14:42 PST, Jared Wyles
no flags
Patch (6.91 KB, patch)
2013-02-26 19:52 PST, Jared Wyles
no flags
Patch (7.13 KB, patch)
2013-03-07 16:55 PST, Jared Wyles
no flags
Patch (7.15 KB, patch)
2013-03-07 17:03 PST, Jared Wyles
no flags
Jared Wyles
Comment 1 2013-02-26 00:23:49 PST
Jared Wyles
Comment 2 2013-02-26 00:34:48 PST
Reproduction steps are: var myDiv = document.createElement("div"); myDiv.style.borderRadius = "1px 2px 3px 4px"; document.write(myDiv.style.borderRadius);
WebKit Review Bot
Comment 3 2013-02-26 02:06:25 PST
Attachment 190220 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/borders/border-radius-parsing-expected.txt', u'LayoutTests/fast/borders/border-radius-parsing.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/css/StylePropertyShorthand.cpp']" exit_code: 1 LayoutTests/ChangeLog:7: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:8: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:9: Line contains tab character. [whitespace/tab] [5] Source/WebCore/ChangeLog:9: Line contains tab character. [whitespace/tab] [5] Source/WebCore/ChangeLog:10: Line contains tab character. [whitespace/tab] [5] Total errors found: 5 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 4 2013-02-26 04:59:29 PST
Comment on attachment 190220 [details] Patch Attachment 190220 [details] did not pass mac-ews (mac): Output: http://webkit-commit-queue.appspot.com/results/16757978 New failing tests: inspector/elements/elements-panel-styles.html
WebKit Review Bot
Comment 5 2013-02-26 07:11:58 PST
Comment on attachment 190220 [details] Patch Attachment 190220 [details] did not pass chromium-ews (chromium-xvfb): Output: http://webkit-commit-queue.appspot.com/results/16779058 New failing tests: inspector/elements/elements-panel-styles.html
WebKit Review Bot
Comment 6 2013-02-26 08:16:24 PST
Comment on attachment 190220 [details] Patch Attachment 190220 [details] did not pass chromium-ews (chromium-xvfb): Output: http://webkit-commit-queue.appspot.com/results/16776190 New failing tests: inspector/elements/elements-panel-styles.html
Jared Wyles
Comment 7 2013-02-26 11:27:19 PST
Build Bot
Comment 8 2013-02-26 13:47:08 PST
Comment on attachment 190332 [details] Patch Attachment 190332 [details] did not pass mac-ews (mac): Output: http://webkit-commit-queue.appspot.com/results/16782227 New failing tests: inspector/elements/elements-panel-styles.html
Jared Wyles
Comment 9 2013-02-26 14:42:03 PST
Ryosuke Niwa
Comment 10 2013-02-26 19:14:38 PST
Comment on attachment 190364 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=190364&action=review > Source/WebCore/ChangeLog:8 > + No new tests (OOPS!). Please mention that you've updated an existing test and its name. > Source/WebCore/ChangeLog:11 > + Updating the order of border-radius to return in the order specified > + in http://www.w3.org/TR/css3-background/#the-border-radius This should appear before the explanation about the tests. > Source/WebCore/css/StylePropertyShorthand.cpp:131 > - CSSPropertyBorderTopRightRadius, > CSSPropertyBorderTopLeftRadius, > - CSSPropertyBorderBottomLeftRadius, > - CSSPropertyBorderBottomRightRadius > + CSSPropertyBorderTopRightRadius, > + CSSPropertyBorderBottomRightRadius, > + CSSPropertyBorderBottomLeftRadius Are there any compat. concerns? Specifically, is it likely that there are Web contents out there that depend on our current behavior? It doesn't seem far fetched to think there are some mobile content that specifically target WebKit that depends on this behavior.
Jared Wyles
Comment 11 2013-02-26 19:52:29 PST
Jared Wyles
Comment 12 2013-02-26 19:56:59 PST
Updated the patch to address your comments. I am not too sure about compatibility concerns. Anyone attempting to read a cssstylerule should hopefully be using getComputedStyles which behaves as expected. It would have been pretty obvious to anyone relying on this behaviour early on that it was returning out of order (i hope). I am a new to this process, should i just browser things like like jquery mobile, kendo-ui and other such mobile frameworks to see if i can find any evidence of it being used and relied on?
Ryosuke Niwa
Comment 13 2013-02-28 15:46:29 PST
(In reply to comment #12) > > I am a new to this process, should i just browser things like like jquery mobile, kendo-ui and other such mobile frameworks to see if i can find any evidence of it being used and relied on? That would be helpful.
Jared Wyles
Comment 14 2013-02-28 19:07:12 PST
(In reply to comment #13) > (In reply to comment #12) > > > > I am a new to this process, should i just browser things like like jquery mobile, kendo-ui and other such mobile frameworks to see if i can find any evidence of it being used and relied on? > > That would be helpful. Had a look through jquery-mobile it depends on jquery for all its css. Uses the .css function, which under calls to a function like.. getStyles = function( elem ) { return window.getComputedStyle( elem, null ); }; So good there, i had a quick look at kendo-ui, it also has a hard dependency on jquery so they are using the same approach. There may be a small problem with anyone using zepto as it seems to favour using .style over getComputedStyle. css: function(property, value){ if (value === undefined && typeof property == 'string') return ( this.length == 0 ? undefined : this[0].style[camelize(property)] || getComputedStyle(this[0], '').getPropertyValue(property))
Jared Wyles
Comment 15 2013-03-07 16:44:12 PST
As mentioned in irc. While this is possible to break something. This is also inconsistent for people using getComputedStyle in webkit browsers.
Ryosuke Niwa
Comment 16 2013-03-07 16:44:20 PST
Comment on attachment 190425 [details] Patch Per IRC discussion, we're even inconsistent with getComputedStyle so fixing this ordering seems like the right thing to do. Please put relevant compatibility information in the change log.
Jared Wyles
Comment 17 2013-03-07 16:55:45 PST
Jared Wyles
Comment 18 2013-03-07 17:03:05 PST
WebKit Review Bot
Comment 19 2013-03-07 19:54:16 PST
Comment on attachment 192113 [details] Patch Clearing flags on attachment: 192113 Committed r145172: <http://trac.webkit.org/changeset/145172>
WebKit Review Bot
Comment 20 2013-03-07 19:54:20 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.