Title: [128702] trunk
- Revision
- 128702
- Author
- [email protected]
- Date
- 2012-09-15 22:03:43 -0700 (Sat, 15 Sep 2012)
Log Message
<use> not working when the SVG doc is embedded as <object> data
https://bugs.webkit.org/show_bug.cgi?id=96816
Reviewed by Dirk Schulze.
Source/WebCore:
Updated SVGURIReference::isExternalURIReference() to correctly classify fragment-only URIs.
Also, since the fragment-only test is cheap, it should be the first thing to try.
Test: svg/custom/object-data-href.html
* svg/SVGURIReference.h:
(WebCore::SVGURIReference::isExternalURIReference):
LayoutTests:
* svg/custom/object-data-href-expected.html: Added.
* svg/custom/object-data-href.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (128701 => 128702)
--- trunk/LayoutTests/ChangeLog 2012-09-16 04:34:58 UTC (rev 128701)
+++ trunk/LayoutTests/ChangeLog 2012-09-16 05:03:43 UTC (rev 128702)
@@ -1,3 +1,13 @@
+2012-09-15 Florin Malita <[email protected]>
+
+ <use> not working when the SVG doc is embedded as <object> data
+ https://bugs.webkit.org/show_bug.cgi?id=96816
+
+ Reviewed by Dirk Schulze.
+
+ * svg/custom/object-data-href-expected.html: Added.
+ * svg/custom/object-data-href.html: Added.
+
2012-09-15 Andreas Kling <[email protected]>
REGRESSION(r127438): Google Docs to renders text too small.
Added: trunk/LayoutTests/svg/custom/object-data-href-expected.html (0 => 128702)
--- trunk/LayoutTests/svg/custom/object-data-href-expected.html (rev 0)
+++ trunk/LayoutTests/svg/custom/object-data-href-expected.html 2012-09-16 05:03:43 UTC (rev 128702)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body style="margin: 0px; padding: 0px;">
+ <object data=""
+ <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
+ <rect id='rect' width='100' height='100' fill='green'/>
+ </svg>
+ "></object>
+</body>
+</html>
Added: trunk/LayoutTests/svg/custom/object-data-href.html (0 => 128702)
--- trunk/LayoutTests/svg/custom/object-data-href.html (rev 0)
+++ trunk/LayoutTests/svg/custom/object-data-href.html 2012-09-16 05:03:43 UTC (rev 128702)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body style="margin: 0px; padding: 0px;">
+ <!-- Test for https://bugs.webkit.org/show_bug.cgi?id=96816 -->
+ <object data=""
+ <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
+ <defs>
+ <rect id='rect' width='100' height='100' fill='green'/>
+ </defs>
+ <use xlink:href=''/>
+ </svg>
+ "></object>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (128701 => 128702)
--- trunk/Source/WebCore/ChangeLog 2012-09-16 04:34:58 UTC (rev 128701)
+++ trunk/Source/WebCore/ChangeLog 2012-09-16 05:03:43 UTC (rev 128702)
@@ -1,3 +1,18 @@
+2012-09-15 Florin Malita <[email protected]>
+
+ <use> not working when the SVG doc is embedded as <object> data
+ https://bugs.webkit.org/show_bug.cgi?id=96816
+
+ Reviewed by Dirk Schulze.
+
+ Updated SVGURIReference::isExternalURIReference() to correctly classify fragment-only URIs.
+ Also, since the fragment-only test is cheap, it should be the first thing to try.
+
+ Test: svg/custom/object-data-href.html
+
+ * svg/SVGURIReference.h:
+ (WebCore::SVGURIReference::isExternalURIReference):
+
2012-09-15 Benjamin Poulain <[email protected]>
Fix the build with WTF URL
Modified: trunk/Source/WebCore/svg/SVGURIReference.h (128701 => 128702)
--- trunk/Source/WebCore/svg/SVGURIReference.h 2012-09-16 04:34:58 UTC (rev 128701)
+++ trunk/Source/WebCore/svg/SVGURIReference.h 2012-09-16 05:03:43 UTC (rev 128702)
@@ -43,14 +43,14 @@
static inline bool isExternalURIReference(const String& uri, Document* document)
{
- // If the URI matches our documents URL, early exit, we're dealing with a local reference.
+ // Fragment-only URIs are always internal
+ if (uri.startsWith('#'))
+ return false;
+
+ // If the URI matches our documents URL, we're dealing with a local reference.
ASSERT(document);
KURL url = ""
- if (equalIgnoringFragmentIdentifier(url, document->url()))
- return false;
-
- // If the URI doesn't contain a base string, just see if it starts with a fragment-identifier.
- return uri.find('#') != notFound;
+ return !equalIgnoringFragmentIdentifier(url, document->url());
}
protected:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes