Changeset 115164 in webkit
- Timestamp:
- Apr 24, 2012 8:25:14 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r115160 r115164 1 2012-04-24 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> 2 3 getMatchedCSSRules() should return null when the second argument is an unrecognized pseudo-element name 4 https://bugs.webkit.org/show_bug.cgi?id=83298 5 6 Reviewed by Ojan Vafai. 7 8 * fast/dom/Window/getMatchedCSSRules-with-invalid-pseudo-elements-expected.txt: Added. 9 * fast/dom/Window/getMatchedCSSRules-with-invalid-pseudo-elements.html: Added. 10 1 11 2012-04-24 Alexis Menard <alexis.menard@openbossa.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r115163 r115164 1 2012-04-24 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> 2 3 getMatchedCSSRules() should return null when the second argument is an unrecognized pseudo-element name 4 https://bugs.webkit.org/show_bug.cgi?id=83298 5 6 Reviewed by Ojan Vafai. 7 8 I couldn't find any specification or any meaningful discussion on this API, but I 9 assume that it shouldn't be any different from window.getComputedStyle() 10 as far as the parameters are concerned. 11 12 Test: fast/dom/Window/getMatchedCSSRules-with-invalid-pseudo-elements.html 13 14 * page/DOMWindow.cpp: 15 (WebCore::DOMWindow::getMatchedCSSRules): 16 * page/DOMWindow.idl: 17 1 18 2012-04-24 Anders Carlsson <andersca@apple.com> 2 19 -
trunk/Source/WebCore/page/DOMWindow.cpp
r115136 r115164 1288 1288 return 0; 1289 1289 1290 unsigned colonStart = pseudoElement[0] == ':' ? (pseudoElement[1] == ':' ? 2 : 1) : 0; 1291 CSSSelector::PseudoType pseudoType = CSSSelector::parsePseudoType(AtomicString(pseudoElement.substring(colonStart))); 1292 if (pseudoType == CSSSelector::PseudoUnknown && !pseudoElement.isEmpty()) 1293 return 0; 1294 1290 1295 unsigned rulesToInclude = StyleResolver::AuthorCSSRules; 1291 1296 if (!authorOnly) … … 1295 1300 rulesToInclude |= StyleResolver::CrossOriginCSSRules; 1296 1301 } 1297 1298 PseudoId pseudoId = CSSSelector::pseudoId( CSSSelector::parsePseudoType(pseudoElement));1299 1302 1303 PseudoId pseudoId = CSSSelector::pseudoId(pseudoType); 1304 1300 1305 return m_frame->document()->styleResolver()->pseudoStyleRulesForElement(element, pseudoId, rulesToInclude); 1301 1306 } -
trunk/Source/WebCore/page/DOMWindow.idl
r114067 r115164 154 154 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 155 155 CSSRuleList getMatchedCSSRules(in [Optional=DefaultIsUndefined] Element element, 156 in [ Optional=DefaultIsUndefined] DOMString pseudoElement);156 in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=DefaultIsUndefined] DOMString pseudoElement); 157 157 #endif 158 158
Note: See TracChangeset
for help on using the changeset viewer.