[Webkit-unassigned] [Bug 10313] xsl:import and document() don't work in stylesheets loaded via XMLHttpRequest

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 21 08:32:44 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=10313





--- Comment #48 from Andreas Wictor <andreas.wictor at xcerion.com>  2010-06-21 08:32:43 PST ---
(In reply to comment #47) 
> > -        m_implementation = DOMImplementation::create();
> > +        m_implementation = DOMImplementation::create(scriptExecutionContext());
> 
> I think you can just pass "this" here. There's no need to explicitly call the scriptExecutionContext() function; a Document is a script execution context.

If you use "this" here you must either const_cast it since Document::implementation is a const function or remove the const declaration from the function. You did not like const on the findFrame function, so i suppose it is preferable to remove the const declaration from the function?

> > +    Node* ownerNode = rootXSL->ownerNode();
> 
> This dereferences rootXSL without checking if it's non-zero, so will dereference the null pointer in that case. We need a test case covering that code path and the code needs to handle it correctly.

I can't think of a case where the root->isXSLStyleSheet() test will fail and leave the pointer at 0, parents to a XSLImportsRule is always a XSLStyleSheet. Is it not better to just ASSERT(root->isXSLStyleSheet()) instead?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list