[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 17:53:17 PDT 2010


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





--- Comment #49 from Darin Adler <darin at apple.com>  2010-06-21 17:53:16 PST ---
(In reply to comment #48)
> (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?

Yes, I think so.

> > > +    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?

You should assert something that you know is true. “I can’t think of a case” is similar, but not quite the same thing. An assertion is OK, but you are leaving me a little bit worried here!

-- 
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