RESOLVED FIXED 87799
Implement CSSParser::determineNameInNamespace() as a helper function for CSSGrammar.y
https://bugs.webkit.org/show_bug.cgi?id=87799
Summary Implement CSSParser::determineNameInNamespace() as a helper function for CSSG...
Kentaro Hara
Reported 2012-05-29 17:49:10 PDT
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.
Attachments
Patch (5.13 KB, patch)
2012-05-29 17:53 PDT, Kentaro Hara
no flags
patch for landing (5.33 KB, patch)
2012-05-30 17:03 PDT, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2012-05-29 17:53:52 PDT
Darin Adler
Comment 2 2012-05-30 09:39:50 PDT
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.
Kentaro Hara
Comment 3 2012-05-30 17:03:15 PDT
Created attachment 144951 [details] patch for landing
WebKit Review Bot
Comment 4 2012-05-30 23:24:10 PDT
Comment on attachment 144951 [details] patch for landing Clearing flags on attachment: 144951 Committed r119060: <http://trac.webkit.org/changeset/119060>
Note You need to log in before you can comment on or make changes to this bug.