Reviewed by Anders.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2007 08:22:43 +0000 (08:22 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2007 08:22:43 +0000 (08:22 +0000)
        http://bugs.webkit.org/show_bug.cgi?id=15762
        XSLStylesheet loads subresources from a wrong URL

        Covered by corrected existing tests.

        * xml/XSLStyleSheet.cpp:
        (WebCore::XSLStyleSheet::parseString): Pass stylesheet URL, not
        the document one.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27302 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/parser/resources/external-entities.xsl
LayoutTests/fast/xsl/resources/xslt-second-level-import.xsl
WebCore/ChangeLog
WebCore/xml/XSLStyleSheet.cpp

index e2307986b2cff1b09fc07195b1f9c5cd61d87fd5..e0b8aec28fddcf6d16574425f83cd3e0d89a802b 100644 (file)
@@ -1,3 +1,14 @@
+2007-10-31  Alexey Proskuryakov  <ap@webkit.org>
+
+        Reviewed by Anders.
+
+        http://bugs.webkit.org/show_bug.cgi?id=15762
+        XSLStylesheet loads subresources from a wrong URL
+
+        * fast/xsl/resources/xslt-second-level-import.xsl:
+        * fast/parser/resources/external-entities.xsl.xsl:
+        These tests depended on old buggy behavior.
+
 2007-10-29  Antti Koivisto  <antti@apple.com>
 
         Reviewed by Maciej.
index 0b408e4446d96e52a2e3c7878bb36c3f4a7a6985..000ff9ba4384d9f0c4d6eb0f22e2aa85a1d41604 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>\r
-<!DOCTYPE xsl:stylesheet SYSTEM "resources/external-entities.dtd">\r
+<!DOCTYPE xsl:stylesheet SYSTEM "external-entities.dtd">\r
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\r
     <xsl:template match="/">\r
         <HTML>\r
index 96b498082de64ab1525232f37cb5e50e2acdf94d..be8651e7d504425ae7a96ff7ea4667c1752018b8 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE xsl:stylesheet SYSTEM "resources/xslt-second-level-import.xsl.dtd">
+<!DOCTYPE xsl:stylesheet SYSTEM "xslt-second-level-import.xsl.dtd">
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:include href="xslt-second-level-import2.xsl" />
   <xsl:template match="/">
index 619b9b01f2ade126181bc586cfed3d693d34bb8a..2baeb2e2be3c457cbe3ae9cb80e3d8c9d971e9f3 100644 (file)
@@ -1,3 +1,16 @@
+2007-10-31  Alexey Proskuryakov  <ap@webkit.org>
+
+        Reviewed by Anders.
+
+        http://bugs.webkit.org/show_bug.cgi?id=15762
+        XSLStylesheet loads subresources from a wrong URL
+
+        Covered by corrected existing tests.
+
+        * xml/XSLStyleSheet.cpp:
+        (WebCore::XSLStyleSheet::parseString): Pass stylesheet URL, not
+        the document one.
+
 2007-10-31  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.
index 7abae7e16aa10293b28a215b0534d72988a77563..22a0464014a03a68d3f1ef04ef4073bb4a014d71 100644 (file)
@@ -145,7 +145,7 @@ bool XSLStyleSheet::parseString(const String& string, bool strict)
     xmlSetStructuredErrorFunc(chrome, XSLTProcessor::parseErrorFunc);
 
     m_stylesheetDoc = xmlReadMemory(reinterpret_cast<const char*>(string.characters()), string.length() * sizeof(UChar),
-        m_ownerDocument->URL().ascii(),
+        href().utf8().data(),
         BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE", 
         XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA);
     loadChildSheets();