Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLContentElement.cpp

Issue 1616423003: Fix selector namespace prefix resolution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review issues Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 DEFINE_TRACE(HTMLContentElement) 58 DEFINE_TRACE(HTMLContentElement)
59 { 59 {
60 visitor->trace(m_filter); 60 visitor->trace(m_filter);
61 InsertionPoint::trace(visitor); 61 InsertionPoint::trace(visitor);
62 } 62 }
63 63
64 void HTMLContentElement::parseSelect() 64 void HTMLContentElement::parseSelect()
65 { 65 {
66 ASSERT(m_shouldParseSelect); 66 ASSERT(m_shouldParseSelect);
67 67
68 m_selectorList = CSSParser::parseSelector(CSSParserContext(document(), 0), m _select); 68 m_selectorList = CSSParser::parseSelector(CSSParserContext(document(), 0), n ullptr, m_select);
69 m_shouldParseSelect = false; 69 m_shouldParseSelect = false;
70 m_isValidSelector = validateSelect(); 70 m_isValidSelector = validateSelect();
71 if (!m_isValidSelector) 71 if (!m_isValidSelector)
72 m_selectorList = CSSSelectorList(); 72 m_selectorList = CSSSelectorList();
73 } 73 }
74 74
75 void HTMLContentElement::parseAttribute(const QualifiedName& name, const AtomicS tring& oldValue, const AtomicString& value) 75 void HTMLContentElement::parseAttribute(const QualifiedName& name, const AtomicS tring& oldValue, const AtomicString& value)
76 { 76 {
77 if (name == selectAttr) { 77 if (name == selectAttr) {
78 if (ShadowRoot* root = containingShadowRoot()) { 78 if (ShadowRoot* root = containingShadowRoot()) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 SelectorChecker::SelectorCheckingContext context(&element, SelectorChecker:: VisitedMatchDisabled); 125 SelectorChecker::SelectorCheckingContext context(&element, SelectorChecker:: VisitedMatchDisabled);
126 for (const CSSSelector* selector = selectorList().first(); selector; selecto r = CSSSelectorList::next(*selector)) { 126 for (const CSSSelector* selector = selectorList().first(); selector; selecto r = CSSSelectorList::next(*selector)) {
127 context.selector = selector; 127 context.selector = selector;
128 if (selectorChecker.match(context)) 128 if (selectorChecker.match(context))
129 return true; 129 return true;
130 } 130 }
131 return false; 131 return false;
132 } 132 }
133 133
134 } 134 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/SelectorQuery.cpp ('k') | third_party/WebKit/Source/web/WebSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698