Title: [153026] branches/safari-537-branch

Diff

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (153025 => 153026)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-07-23 02:03:27 UTC (rev 153025)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-07-23 02:04:34 UTC (rev 153026)
@@ -1,5 +1,27 @@
 2013-07-22  Lucas Forschler  <[email protected]>
 
+        Merge r152951
+
+    2013-07-21  Andreas Kling  <[email protected]>
+
+            KURL creates duplicate strings when completing data: URIs.
+            <http://webkit.org/b/118952>
+            <rdar://problem/14504480>
+
+            Reviewed by Anders Carlsson.
+
+            When checking if the original URL input string can be reused, compare against the part
+            of the parsing buffer that we would actually return, not the entire buffer.
+
+            632 kB progression on <http://www.nytimes.com/>
+
+            Test: KURLTest.KURLDataURIStringSharing
+
+            * platform/KURL.cpp:
+            (WebCore::KURL::parse):
+
+2013-07-22  Lucas Forschler  <[email protected]>
+
         Merge r152941
 
     2013-07-19  Brady Eidson  <[email protected]>

Modified: branches/safari-537-branch/Source/WebCore/platform/KURL.cpp (153025 => 153026)


--- branches/safari-537-branch/Source/WebCore/platform/KURL.cpp	2013-07-23 02:03:27 UTC (rev 153025)
+++ branches/safari-537-branch/Source/WebCore/platform/KURL.cpp	2013-07-23 02:04:34 UTC (rev 153026)
@@ -1407,7 +1407,7 @@
 
     // If we didn't end up actually changing the original string and
     // it was already in a String, reuse it to avoid extra allocation.
-    if (originalString && *originalString == buffer)
+    if (originalString && equal(originalString->impl(), buffer.data(), m_fragmentEnd))
         m_string = *originalString;
     else
         m_string = String(buffer.data(), m_fragmentEnd);

Modified: branches/safari-537-branch/Tools/ChangeLog (153025 => 153026)


--- branches/safari-537-branch/Tools/ChangeLog	2013-07-23 02:03:27 UTC (rev 153025)
+++ branches/safari-537-branch/Tools/ChangeLog	2013-07-23 02:04:34 UTC (rev 153026)
@@ -1,5 +1,20 @@
 2013-07-22  Lucas Forschler  <[email protected]>
 
+        Merge r152951
+
+    2013-07-21  Andreas Kling  <[email protected]>
+
+            KURL creates duplicate strings when completing data: URIs.
+            <http://webkit.org/b/118952>
+            <rdar://problem/14504480>
+
+            Reviewed by Anders Carlsson.
+
+            * TestWebKitAPI/Tests/WebCore/KURL.cpp:
+            (TestWebKitAPI::TEST_F):
+
+2013-07-22  Lucas Forschler  <[email protected]>
+
         Merge r152484
 
     2013-07-08  Zan Dobersek  <[email protected]>

Modified: branches/safari-537-branch/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp (153025 => 153026)


--- branches/safari-537-branch/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp	2013-07-23 02:03:27 UTC (rev 153025)
+++ branches/safari-537-branch/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp	2013-07-23 02:04:34 UTC (rev 153026)
@@ -72,4 +72,13 @@
     EXPECT_EQ(String("fragment"), kurl.fragmentIdentifier());
 }
 
+TEST_F(KURLTest, KURLDataURIStringSharing)
+{
+    KURL baseURL(ParsedURLString, "http://www.webkit.org/");
+    String threeApples = "data:text/plain;charset=utf-8;base64,76O/76O/76O/";
+
+    KURL url(baseURL, threeApples);
+    EXPECT_EQ(threeApples.impl(), url.string().impl());
+}
+
 } // namespace TestWebKitAPI
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to