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

Side by Side Diff: Source/core/css/SelectorFilter.cpp

Issue 1099963003: Support type selector for camel-cased SVG elements in HTML. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix performance regression. tagMatches() became too big to be inlined on Linux. Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/css/parser/CSSParserValues.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 switch (selector.match()) { 113 switch (selector.match()) {
114 case CSSSelector::Id: 114 case CSSSelector::Id:
115 if (!selector.value().isEmpty()) 115 if (!selector.value().isEmpty())
116 (*hash++) = selector.value().impl()->existingHash() * IdAttributeSal t; 116 (*hash++) = selector.value().impl()->existingHash() * IdAttributeSal t;
117 break; 117 break;
118 case CSSSelector::Class: 118 case CSSSelector::Class:
119 if (!selector.value().isEmpty()) 119 if (!selector.value().isEmpty())
120 (*hash++) = selector.value().impl()->existingHash() * ClassAttribute Salt; 120 (*hash++) = selector.value().impl()->existingHash() * ClassAttribute Salt;
121 break; 121 break;
122 case CSSSelector::Tag: 122 case CSSSelector::Tag:
123 if (selector.tagQName().localName() != starAtom) 123 if (!selector.tagIsCamelCase() && selector.tagQName().localName() != sta rAtom)
esprehn 2015/04/22 15:57:57 This doesn't make sense. How does being camel case
rune 2015/04/22 21:48:24 starAtom is not added to the bloom filter for any
124 (*hash++) = selector.tagQName().localName().impl()->existingHash() * TagNameSalt; 124 (*hash++) = selector.tagQName().localName().impl()->existingHash() * TagNameSalt;
125 break; 125 break;
126 default: 126 default:
127 break; 127 break;
128 } 128 }
129 } 129 }
130 130
131 void SelectorFilter::collectIdentifierHashes(const CSSSelector& selector, unsign ed* identifierHashes, unsigned maximumIdentifierCount) 131 void SelectorFilter::collectIdentifierHashes(const CSSSelector& selector, unsign ed* identifierHashes, unsigned maximumIdentifierCount)
132 { 132 {
133 unsigned* hash = identifierHashes; 133 unsigned* hash = identifierHashes;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 { 174 {
175 visitor->trace(element); 175 visitor->trace(element);
176 } 176 }
177 177
178 DEFINE_TRACE(SelectorFilter) 178 DEFINE_TRACE(SelectorFilter)
179 { 179 {
180 visitor->trace(m_parentStack); 180 visitor->trace(m_parentStack);
181 } 181 }
182 182
183 } 183 }
OLDNEW
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/css/parser/CSSParserValues.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698