Commit 17b0d8a2 authored by eric@webkit.org's avatar eric@webkit.org

2010-02-02 Bryan Yeung <bryeung@bryeung-chrome.(none)>

        Reviewed by Darin Adler.

        Avoid using an invalidated KURL object in baseURI.

        https://bugs.webkit.org/show_bug.cgi?id=34492

        This change fixes baseURI for Chromium (where the KURL implementation
        does not allow invalid KURLs to carry relative paths).  This is
        regression tested by
        LayoutTests/svg/W3C-SVG-1.1/struct-image-07-t.svg

        * dom/Element.cpp:
        (WebCore::Element::baseURI):

git-svn-id: svn://svn.chromium.org/blink/trunk@54245 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 4dfed863
2010-02-02 Bryan Yeung <bryeung@bryeung-chrome.(none)>
Reviewed by Darin Adler.
Avoid using an invalidated KURL object in baseURI.
https://bugs.webkit.org/show_bug.cgi?id=34492
This change fixes baseURI for Chromium (where the KURL implementation
does not allow invalid KURLs to carry relative paths). This is
regression tested by
LayoutTests/svg/W3C-SVG-1.1/struct-image-07-t.svg
* dom/Element.cpp:
(WebCore::Element::baseURI):
2010-02-02 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
......
......@@ -702,7 +702,8 @@ void Element::setPrefix(const AtomicString& prefix, ExceptionCode& ec)
KURL Element::baseURI() const
{
KURL base(KURL(), getAttribute(baseAttr));
const AtomicString& baseAttribute = getAttribute(baseAttr);
KURL base(KURL(), baseAttribute);
if (!base.protocol().isEmpty())
return base;
......@@ -714,7 +715,7 @@ KURL Element::baseURI() const
if (parentBase.isNull())
return base;
return KURL(parentBase, base.string());
return KURL(parentBase, baseAttribute);
}
void Element::createAttributeMap() const
......
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