Commit f749ab15 authored by fmalita@chromium.org's avatar fmalita@chromium.org

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a82746fd
2012-09-15 Florin Malita <fmalita@chromium.org>
<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 <kling@webkit.org>
REGRESSION(r127438): Google Docs to renders text too small.
<!DOCTYPE html>
<html>
<body style="margin: 0px; padding: 0px;">
<object data="data:image/svg+xml,
<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>
<!DOCTYPE html>
<html>
<body style="margin: 0px; padding: 0px;">
<!-- Test for https://bugs.webkit.org/show_bug.cgi?id=96816 -->
<object data="data:image/svg+xml,
<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='#rect'/>
</svg>
"></object>
</body>
</html>
2012-09-15 Florin Malita <fmalita@chromium.org>
<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 <benjamin@webkit.org>
Fix the build with WTF URL
......@@ -43,14 +43,14 @@ public:
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.
ASSERT(document);
KURL url = document->completeURL(uri);
if (equalIgnoringFragmentIdentifier(url, document->url()))
// Fragment-only URIs are always internal
if (uri.startsWith('#'))
return false;
// If the URI doesn't contain a base string, just see if it starts with a fragment-identifier.
return uri.find('#') != notFound;
// If the URI matches our documents URL, we're dealing with a local reference.
ASSERT(document);
KURL url = document->completeURL(uri);
return !equalIgnoringFragmentIdentifier(url, document->url());
}
protected:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment