Bug 70326 - XSLStyleSheet only needs to manage XSLImportRule children.
Summary: XSLStyleSheet only needs to manage XSLImportRule children.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-18 06:43 PDT by Andreas Kling
Modified: 2011-10-18 07:34 PDT (History)
0 users

See Also:


Attachments
Proposed patch (9.25 KB, patch)
2011-10-18 07:02 PDT, Andreas Kling
koivisto: review+
koivisto: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2011-10-18 06:43:29 PDT
The only StyleBase subclass that ever goes into XSLStyleSheet::m_children is XSLImportRule, so let's be specific about that.
Comment 1 Andreas Kling 2011-10-18 07:02:34 PDT
Created attachment 111438 [details]
Proposed patch
Comment 2 Antti Koivisto 2011-10-18 07:13:49 PDT
Comment on attachment 111438 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=111438&action=review

glorious, r=me

> Source/WebCore/xml/XSLStyleSheetLibxslt.cpp:297
> +                return child->document();
>              }
> +        } else {
> +            xmlDocPtr result = import->styleSheet()->locateStylesheetSubResource(parentDoc, uri);
> +            if (result)
> +                return result;
>          }

I would use continue at the end of if() and remove the else.
Comment 3 Early Warning System Bot 2011-10-18 07:23:52 PDT
Comment on attachment 111438 [details]
Proposed patch

Attachment 111438 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/10120264
Comment 4 Andreas Kling 2011-10-18 07:34:13 PDT
Committed r97751: <http://trac.webkit.org/changeset/97751>