Bug 87799

Summary: Implement CSSParser::determineNameInNamespace() as a helper function for CSSGrammar.y
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: CSSAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, darin, koivisto, macpherson, menard, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 87625    
Attachments:
Description Flags
Patch
none
patch for landing none

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.