Bug 49701

Summary: external script runs more than once in a XML document when the script element is cloned
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, andersca, ap, darin, eric, sam, tonyg, zimmermann
Priority: P2 Keywords: EasyFix
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 49703    
Attachments:
Description Flags
Patch abarth: review+

Ryosuke Niwa
Reported 2010-11-17 17:24:43 PST
XMLDocumentParser::notifyFinished calls ScriptController::executeScript directly and fails to set isEvaluated flag to true. We should call ScriptElement's executeScript instead.
Attachments
Patch (3.86 KB, patch)
2010-11-17 17:47 PST, Ryosuke Niwa
abarth: review+
Ryosuke Niwa
Comment 1 2010-11-17 17:47:39 PST
Alexey Proskuryakov
Comment 2 2010-11-17 18:37:25 PST
I'm wondering what should happen to scripts inside SVG <use>.
Ryosuke Niwa
Comment 3 2010-11-17 18:39:32 PST
From the bug 49647: (In reply to comment #2) > > WebCore/dom/ScriptElement.h:90 ... > > + bool m_isEvaluated; // HTML5: "already started" ... > > Better names for these data members, that would obviate the need for those HTML5 comments: > ... > m_wasAlreadyStarted ... This really annoyed me when I first looked at this code. I'm glad I can finally correct this.
Ryosuke Niwa
Comment 4 2010-11-17 18:41:08 PST
oops wrong bug, please ignore my comment #3.
Ryosuke Niwa
Comment 5 2010-11-23 15:41:32 PST
Thanks for the review, Adam. Will land.
Ryosuke Niwa
Comment 6 2010-11-23 16:00:03 PST
Note You need to log in before you can comment on or make changes to this bug.