OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/css/parser/CSSSelectorParser.h" | 5 #include "core/css/parser/CSSSelectorParser.h" |
6 | 6 |
7 #include "core/css/CSSSelectorList.h" | 7 #include "core/css/CSSSelectorList.h" |
8 #include "core/css/StyleSheetContents.h" | 8 #include "core/css/StyleSheetContents.h" |
9 #include "core/css/parser/CSSParserContext.h" | 9 #include "core/css/parser/CSSParserContext.h" |
10 #include "core/frame/Deprecation.h" | 10 #include "core/frame/Deprecation.h" |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 std::unique_ptr<CSSParserSelector> CSSSelectorParser::consumeAttribute( | 368 std::unique_ptr<CSSParserSelector> CSSSelectorParser::consumeAttribute( |
369 CSSParserTokenRange& range) { | 369 CSSParserTokenRange& range) { |
370 ASSERT(range.peek().type() == LeftBracketToken); | 370 ASSERT(range.peek().type() == LeftBracketToken); |
371 CSSParserTokenRange block = range.consumeBlock(); | 371 CSSParserTokenRange block = range.consumeBlock(); |
372 block.consumeWhitespace(); | 372 block.consumeWhitespace(); |
373 | 373 |
374 AtomicString namespacePrefix; | 374 AtomicString namespacePrefix; |
375 AtomicString attributeName; | 375 AtomicString attributeName; |
376 if (!consumeName(block, attributeName, namespacePrefix)) | 376 if (!consumeName(block, attributeName, namespacePrefix)) |
377 return nullptr; | 377 return nullptr; |
| 378 if (attributeName == starAtom) |
| 379 return nullptr; |
378 block.consumeWhitespace(); | 380 block.consumeWhitespace(); |
379 | 381 |
380 if (m_context->isHTMLDocument()) | 382 if (m_context->isHTMLDocument()) |
381 attributeName = attributeName.lower(); | 383 attributeName = attributeName.lower(); |
382 | 384 |
383 AtomicString namespaceURI = determineNamespace(namespacePrefix); | 385 AtomicString namespaceURI = determineNamespace(namespacePrefix); |
384 if (namespaceURI.isNull()) | 386 if (namespaceURI.isNull()) |
385 return nullptr; | 387 return nullptr; |
386 | 388 |
387 QualifiedName qualifiedName = | 389 QualifiedName qualifiedName = |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 } | 909 } |
908 if (current->relation() == CSSSelector::IndirectAdjacent) | 910 if (current->relation() == CSSSelector::IndirectAdjacent) |
909 m_context->useCounter()->count(UseCounter::CSSSelectorIndirectAdjacent); | 911 m_context->useCounter()->count(UseCounter::CSSSelectorIndirectAdjacent); |
910 if (current->selectorList()) | 912 if (current->selectorList()) |
911 recordUsageAndDeprecations(*current->selectorList()); | 913 recordUsageAndDeprecations(*current->selectorList()); |
912 } | 914 } |
913 } | 915 } |
914 } | 916 } |
915 | 917 |
916 } // namespace blink | 918 } // namespace blink |
OLD | NEW |