WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
49694
Add some comments about XSLStyleSheet owner node
https://bugs.webkit.org/show_bug.cgi?id=49694
Summary
Add some comments about XSLStyleSheet owner node
Alexey Proskuryakov
Reported
2010-11-17 15:45:25 PST
XSLStyleSheets come in two varieties - one is created by <?xml-stylesheet?> processing instruction, and another by XSLTProcessor. These are extremely different in how they handle stylesheet and owner node lifetime. - ProcessingInstruction ones are exposed to JavaScript, so stylesheet lifetime is unpredictable. - ProcessingInstruction clears out backpointer in its destructor. - XSLTProcessor exposes nothing to JavaScript, and carefully manages lifetime issues without a need for arbitrary nodes' destructors to clear out references to those nodes. This is difficult to figure out by looking at existing code.
Attachments
proposed patch
(6.09 KB, patch)
2010-11-17 15:49 PST
,
Alexey Proskuryakov
no flags
Details
Formatted Diff
Diff
updated patch
(5.58 KB, patch)
2010-11-17 23:11 PST
,
Alexey Proskuryakov
andersca
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2010-11-17 15:49:25 PST
Created
attachment 74169
[details]
proposed patch Also, renamed a function that creates embedded stylesheets from createInline() to createEmbedded(). An example of such stylesheet is <?xml-stylesheet type="text/xml" href="#style1"?> <!DOCTYPE doc SYSTEM "doc.dtd"> <doc> <head> <xsl:stylesheet id="style1" version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform
" xmlns:fo="
http://www.w3.org/1999/XSL/Format
"> <...>
Darin Adler
Comment 2
2010-11-17 22:28:38 PST
Comment on
attachment 74169
[details]
proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=74169&action=review
> WebCore/xml/XSLStyleSheet.h:54 > + static PassRefPtr<XSLStyleSheet> createEmbedded(Node* parentNode, const KURL& finalURL)
The only call site for this function renamed in this patch is passing a ProcessingInstruction*; that must be the only one or those others would need to use the new name. Given that, I don’t understand why this function takes a Node* and its only the other create function that takes a ProcessingInstruction*.
> WebCore/xml/XSLStyleSheetLibxslt.cpp:79 > + // It can also be some otehr node,
Typo: "otehr".
Alexey Proskuryakov
Comment 3
2010-11-17 23:11:46 PST
Created
attachment 74206
[details]
updated patch
Alexey Proskuryakov
Comment 4
2010-11-18 11:13:25 PST
Committed <
http://trac.webkit.org/changeset/72315
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug