Changeset 109134 in webkit
- Timestamp:
- Feb 28, 2012 11:55:39 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109132 r109134 1 2012-02-28 Alexis Menard <alexis.menard@openbossa.org> 2 3 getComputedStyle fails for 'first-line' pseudo-element 4 https://bugs.webkit.org/show_bug.cgi?id=57505 5 6 Reviewed by Tony Chang. 7 8 Update expected results to the new behavior. Also added some extra checks on 9 other pseudo-elements. 10 11 * fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt: 12 * fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html: 13 1 14 2012-02-28 Alexey Proskuryakov <ap@apple.com> 2 15 -
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element-expected.txt
r65062 r109134 18 18 PASS Expected 'rgb(0, 0, 255)' for color in the computed style for element with id testBeforeAfter and pseudo-element :after and got 'rgb(0, 0, 255)' 19 19 PASS Expected 'rgb(165, 42, 42)' for color in the computed style for element with id testNoPseudoElement and pseudo-element null and got 'rgb(165, 42, 42)' 20 PASS Expected '' for color in the computed style for element with id testNoPseudoElement and pseudo-element :first-line and got '' 20 PASS Expected 'rgb(165, 42, 42)' for color in the computed style for element with id testNoPseudoElement and pseudo-element :first-line and got 'rgb(165, 42, 42)' 21 PASS Expected 'rgb(165, 42, 42)' for color in the computed style for element with id testNoPseudoElement and pseudo-element :first-letter and got 'rgb(165, 42, 42)' 22 PASS Expected 'rgb(165, 42, 42)' for color in the computed style for element with id testNoPseudoElement and pseudo-element :before and got 'rgb(165, 42, 42)' 23 PASS Expected 'rgb(165, 42, 42)' for color in the computed style for element with id testNoPseudoElement and pseudo-element :after and got 'rgb(165, 42, 42)' 21 24 PASS Expected 'rgb(165, 42, 42)' for color in the computed style for element with id testNoPseudoElement and pseudo-element :garbage and got 'rgb(165, 42, 42)' 22 25 PASS Expected '0.5' for opacity in the computed style for element with id testHardwareAcceleratedCompositing and pseudo-element :before and got '0.5' -
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-pseudo-element.html
r57861 r109134 68 68 { 'elementId' : 'testBeforeAfter', 'pseudoElement' : ':after', 'property' : 'color', 'expectedValue' : 'rgb(0, 0, 255)' }, 69 69 { 'elementId' : 'testNoPseudoElement', 'pseudoElement' : null, 'property' : 'color', 'expectedValue' : 'rgb(165, 42, 42)' }, 70 { 'elementId' : 'testNoPseudoElement', 'pseudoElement' : ':first-line', 'property' : 'color', 'expectedValue' : '' }, 70 { 'elementId' : 'testNoPseudoElement', 'pseudoElement' : ':first-line', 'property' : 'color', 'expectedValue' : 'rgb(165, 42, 42)' }, 71 { 'elementId' : 'testNoPseudoElement', 'pseudoElement' : ':first-letter', 'property' : 'color', 'expectedValue' : 'rgb(165, 42, 42)' }, 72 { 'elementId' : 'testNoPseudoElement', 'pseudoElement' : ':before', 'property' : 'color', 'expectedValue' : 'rgb(165, 42, 42)' }, 73 { 'elementId' : 'testNoPseudoElement', 'pseudoElement' : ':after', 'property' : 'color', 'expectedValue' : 'rgb(165, 42, 42)' }, 71 74 { 'elementId' : 'testNoPseudoElement', 'pseudoElement' : ':garbage', 'property' : 'color', 'expectedValue' : 'rgb(165, 42, 42)' }, 72 75 { 'elementId' : 'testHardwareAcceleratedCompositing', 'pseudoElement' : ':before', 'property' : 'opacity', 'expectedValue' : '0.5' } -
trunk/Source/WebCore/ChangeLog
r109133 r109134 1 2012-02-28 Alexis Menard <alexis.menard@openbossa.org> 2 3 getComputedStyle fails for 'first-line' pseudo-element 4 https://bugs.webkit.org/show_bug.cgi?id=57505 5 6 Reviewed by Tony Chang. 7 8 Querying the selector with a pseudo-element using getComputedStyle should work 9 even if the selector was not declared in the stylesheet. When not declared, we need 10 to use the RenderStyle created to do the rendering as there is no pseudo-style. 11 This match the behavior of Firefox. 12 13 No new tests : Updated expectation and extended getComputedStyle-with-pseudo-element.html. 14 15 * dom/Element.cpp: 16 (WebCore::Element::computedStyle): 17 1 18 2012-02-28 Ashod Nakashian <ashodnakashian@yahoo.com> 2 19 -
trunk/Source/WebCore/dom/Element.cpp
r109096 r109134 1608 1608 // properties, which are only known by the renderer because it did the layout, will be correct and so that the 1609 1609 // values returned for the ":selection" pseudo-element will be correct. 1610 if (RenderStyle* usedStyle = renderStyle()) 1611 return pseudoElementSpecifier ? usedStyle->getCachedPseudoStyle(pseudoElementSpecifier) : usedStyle; 1610 if (RenderStyle* usedStyle = renderStyle()) { 1611 if (pseudoElementSpecifier) { 1612 RenderStyle* cachedPseudoStyle = usedStyle->getCachedPseudoStyle(pseudoElementSpecifier); 1613 return cachedPseudoStyle ? cachedPseudoStyle : usedStyle; 1614 } else 1615 return usedStyle; 1616 } 1612 1617 1613 1618 if (!attached())
Note: See TracChangeset
for help on using the changeset viewer.