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, 2012 Apple Inc.
All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights 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 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
10 * | 10 * |
(...skipping 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1927 QualifiedName tag(namespacePrefix, elementName, determinedNamespace); | 1927 QualifiedName tag(namespacePrefix, elementName, determinedNamespace); |
1928 | 1928 |
1929 if (CSSParserSelector* distributedPseudoElementSelector = specifiers->findDi
stributedPseudoElementSelector()) { | 1929 if (CSSParserSelector* distributedPseudoElementSelector = specifiers->findDi
stributedPseudoElementSelector()) { |
1930 specifiers->prependTagSelector(tag, tagIsForNamespaceRule); | 1930 specifiers->prependTagSelector(tag, tagIsForNamespaceRule); |
1931 return rewriteSpecifiersForShadowDistributed(specifiers, distributedPseu
doElementSelector); | 1931 return rewriteSpecifiersForShadowDistributed(specifiers, distributedPseu
doElementSelector); |
1932 } | 1932 } |
1933 | 1933 |
1934 if (specifiers->needsCrossingTreeScopeBoundary()) | 1934 if (specifiers->needsCrossingTreeScopeBoundary()) |
1935 return rewriteSpecifiersWithElementNameForCustomPseudoElement(tag, eleme
ntName, specifiers, tagIsForNamespaceRule); | 1935 return rewriteSpecifiersWithElementNameForCustomPseudoElement(tag, eleme
ntName, specifiers, tagIsForNamespaceRule); |
1936 | 1936 |
1937 if (tag == anyQName()) | 1937 // *:host never matches, so we can't discard the * otherwise we can't tell t
he |
| 1938 // difference between *:host and just :host. |
| 1939 if (tag == anyQName() && !specifiers->hasHostPseudoSelector()) |
1938 return specifiers; | 1940 return specifiers; |
1939 if (!(specifiers->pseudoType() == CSSSelector::PseudoCue)) | 1941 if (specifiers->pseudoType() != CSSSelector::PseudoCue) |
1940 specifiers->prependTagSelector(tag, tagIsForNamespaceRule); | 1942 specifiers->prependTagSelector(tag, tagIsForNamespaceRule); |
1941 return specifiers; | 1943 return specifiers; |
1942 } | 1944 } |
1943 | 1945 |
1944 CSSParserSelector* BisonCSSParser::rewriteSpecifiersWithElementNameForCustomPseu
doElement(const QualifiedName& tag, const AtomicString& elementName, CSSParserSe
lector* specifiers, bool tagIsForNamespaceRule) | 1946 CSSParserSelector* BisonCSSParser::rewriteSpecifiersWithElementNameForCustomPseu
doElement(const QualifiedName& tag, const AtomicString& elementName, CSSParserSe
lector* specifiers, bool tagIsForNamespaceRule) |
1945 { | 1947 { |
1946 if (m_context.useCounter() && specifiers->pseudoType() == CSSSelector::Pseud
oUserAgentCustomElement) | 1948 if (m_context.useCounter() && specifiers->pseudoType() == CSSSelector::Pseud
oUserAgentCustomElement) |
1947 m_context.useCounter()->count(UseCounter::CSSPseudoElementUserAgentCusto
mPseudo); | 1949 m_context.useCounter()->count(UseCounter::CSSPseudoElementUserAgentCusto
mPseudo); |
1948 | 1950 |
1949 CSSParserSelector* lastShadowPseudo = specifiers; | 1951 CSSParserSelector* lastShadowPseudo = specifiers; |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2205 rule->setProperties(createStylePropertySet()); | 2207 rule->setProperties(createStylePropertySet()); |
2206 clearProperties(); | 2208 clearProperties(); |
2207 | 2209 |
2208 StyleRuleViewport* result = rule.get(); | 2210 StyleRuleViewport* result = rule.get(); |
2209 m_parsedRules.append(rule.release()); | 2211 m_parsedRules.append(rule.release()); |
2210 | 2212 |
2211 return result; | 2213 return result; |
2212 } | 2214 } |
2213 | 2215 |
2214 } | 2216 } |
OLD | NEW |