OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 7655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7666 history = history->tagHistory(); | 7666 history = history->tagHistory(); |
7667 if (history->hasShadowDescendant()) | 7667 if (history->hasShadowDescendant()) |
7668 lastShadowDescendant = history; | 7668 lastShadowDescendant = history; |
7669 } | 7669 } |
7670 | 7670 |
7671 if (lastShadowDescendant->tagHistory()) { | 7671 if (lastShadowDescendant->tagHistory()) { |
7672 lastShadowDescendant->tagHistory()->setTag(tag); | 7672 lastShadowDescendant->tagHistory()->setTag(tag); |
7673 return; | 7673 return; |
7674 } | 7674 } |
7675 | 7675 |
7676 // No need to create an extra element name selector if we are matching any e
lement | 7676 // For shadow-ID pseudo-elements to be correctly matched, the ShadowDescenda
nt combinator has to be used. |
7677 // in any namespace. | 7677 // We therefore create a new Selector with that combinator here in any case,
even if matching any (host) element in any namespace (i.e. '*'). |
7678 if (elementName == starAtom && m_defaultNamespace == starAtom) | |
7679 return; | |
7680 | |
7681 OwnPtr<CSSParserSelector> elementNameSelector = adoptPtr(new CSSParserSelect
or); | 7678 OwnPtr<CSSParserSelector> elementNameSelector = adoptPtr(new CSSParserSelect
or); |
7682 elementNameSelector->setTag(tag); | 7679 elementNameSelector->setTag(tag); |
7683 lastShadowDescendant->setTagHistory(elementNameSelector.release()); | 7680 lastShadowDescendant->setTagHistory(elementNameSelector.release()); |
7684 lastShadowDescendant->setRelation(CSSSelector::ShadowDescendant); | 7681 lastShadowDescendant->setRelation(CSSSelector::ShadowDescendant); |
7685 } | 7682 } |
7686 | 7683 |
7687 CSSParserSelector* CSSParser::updateSpecifiers(CSSParserSelector* specifiers, CS
SParserSelector* newSpecifier) | 7684 CSSParserSelector* CSSParser::updateSpecifiers(CSSParserSelector* specifiers, CS
SParserSelector* newSpecifier) |
7688 { | 7685 { |
7689 if (newSpecifier->isUnknownPseudoElement()) { | 7686 if (newSpecifier->isUnknownPseudoElement()) { |
7690 // Unknown pseudo element always goes at the top of selector chain. | 7687 // Unknown pseudo element always goes at the top of selector chain. |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8115 // The macro is used in the tokenizer grammar with lines containing | 8112 // The macro is used in the tokenizer grammar with lines containing |
8116 // BEGIN(mediaqueries) and BEGIN(initial). yy_start acts as index to | 8113 // BEGIN(mediaqueries) and BEGIN(initial). yy_start acts as index to |
8117 // tokenizer transition table, and 'mediaqueries' and 'initial' are | 8114 // tokenizer transition table, and 'mediaqueries' and 'initial' are |
8118 // offset multipliers that specify which transitions are active | 8115 // offset multipliers that specify which transitions are active |
8119 // in the tokenizer during in each condition (tokenizer state). | 8116 // in the tokenizer during in each condition (tokenizer state). |
8120 #define BEGIN yy_start = 1 + 2 * | 8117 #define BEGIN yy_start = 1 + 2 * |
8121 | 8118 |
8122 #include "tokenizer.cpp" | 8119 #include "tokenizer.cpp" |
8123 | 8120 |
8124 } | 8121 } |
OLD | NEW |