getComputedStyle for border is not implemented.
Created attachment 120689 [details] Patch
Comment on attachment 120689 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120689&action=review > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2146 > + list->append(getPropertyCSSValue(CSSPropertyBorderTop, DoNotUpdateLayout)); > + list->append(getPropertyCSSValue(CSSPropertyBorderRight, DoNotUpdateLayout)); > + list->append(getPropertyCSSValue(CSSPropertyBorderBottom, DoNotUpdateLayout)); > + list->append(getPropertyCSSValue(CSSPropertyBorderLeft, DoNotUpdateLayout)); Can you use getCSSPropertyValuesForShorthandProperties here?
Comment on attachment 120689 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120689&action=review >> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2146 >> + list->append(getPropertyCSSValue(CSSPropertyBorderLeft, DoNotUpdateLayout)); > > Can you use getCSSPropertyValuesForShorthandProperties here? Oh, is it because this is comma separated? Can we add a param to getCSSPropertyValuesForShorthandProperties for this?
Created attachment 120729 [details] Patch
Comment on attachment 120729 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120729&action=review > LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-shorthand-expected.txt:116 > +PASS computedStyle.getPropertyCSSValue('border').cssText is '320px solid rgb(255, 0, 0), 320px solid rgb(255, 0, 0), 320px solid rgb(255, 0, 0), 320px solid rgb(255, 0, 0)' This doesn't parse when assigned to border. I think it's important that the value returned by getComputedStyle is a valid CSS value. There are some values where border can't represent the border state (when they are different for each side). I think we have 2 options: 1) Never return a value for border (what we do now). 2) Check to see if the four borders are the same and return the computed style if they are all the same. Otherwise return nothing.
(In reply to comment #5) > (From update of attachment 120729 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=120729&action=review > > > LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-shorthand-expected.txt:116 > > +PASS computedStyle.getPropertyCSSValue('border').cssText is '320px solid rgb(255, 0, 0), 320px solid rgb(255, 0, 0), 320px solid rgb(255, 0, 0), 320px solid rgb(255, 0, 0)' > > This doesn't parse when assigned to border. I think it's important that the value returned by getComputedStyle is a valid CSS value. This is a good point. > > There are some values where border can't represent the border state (when they are different for each side). I think we have 2 options: > 1) Never return a value for border (what we do now). > 2) Check to see if the four borders are the same and return the computed style if they are all the same. Otherwise return nothing. The second option is what Opera is doing.
Created attachment 120870 [details] Patch
(In reply to comment #7) > Created an attachment (id=120870) [details] > Patch Implemented as discussed in http://lists.w3.org/Archives/Public/www-style/2011Dec/0551.html It's the option 2 that Tony proposed.
Comment on attachment 120870 [details] Patch Clearing flags on attachment: 120870 Committed r103948: <http://trac.webkit.org/changeset/103948>
All reviewed patches have been landed. Closing bug.