As pointed out by darin@ in https://bugs.webkit.org/show_bug.cgi?id=87627#c12, we should avoid repeating the following code in CSSGrammar.y: > if (p->m_styleSheet) > $$->setTag(QualifiedName(namespacePrefix, $2, p->m_styleSheet->determineNamespace(namespacePrefix))); > else > $$->setTag(QualifiedName(namespacePrefix, $2, p->m_defaultNamespace)); We can implement CSSParser::determineNameInNamespace() as a helper function and replace the above code.
Created attachment 144663 [details] Patch
Comment on attachment 144663 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=144663&action=review > Source/WebCore/css/CSSGrammar.y:960 > + $$->setTag(p->determineNameInNamespace(namespacePrefix, $2)); We should get rid of the namespacePrefix local variable and just use $1 here. > Source/WebCore/css/CSSGrammar.y:1089 > + $$->setAttribute(p->determineNameInNamespace(namespacePrefix, $4)); Same with $3 here. > Source/WebCore/css/CSSGrammar.y:1096 > + $$->setAttribute(p->determineNameInNamespace(namespacePrefix, $4)); Same with $3 here.
Created attachment 144951 [details] patch for landing
Comment on attachment 144951 [details] patch for landing Clearing flags on attachment: 144951 Committed r119060: <http://trac.webkit.org/changeset/119060>