⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249040 in webkit


Ignore:
Timestamp:
Aug 22, 2019, 7:06:42 PM (7 years ago)
Author:
Fujii Hironori
Message:

[SVG] -webkit-clip-path treats url(abc#xyz) as url(#xyz) because it checks only URL fragment part
https://bugs.webkit.org/show_bug.cgi?id=201030

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: svg/clip-path/clip-path-invalid-reference-001-expected.svg

svg/clip-path/clip-path-invalid-reference-001.svg
svg/clip-path/clip-path-invalid-reference-002-expected.svg
svg/clip-path/clip-path-invalid-reference-002.svg

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertClipPath): Use
SVGURIReference::fragmentIdentifierFromIRIString to get fragment
identifier from -webkit-clip-path.

LayoutTests:

  • svg/clip-path/clip-path-invalid-reference-001-expected.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-001.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-002-expected.svg: Added.
  • svg/clip-path/clip-path-invalid-reference-002.svg: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r249031 r249040  
     12019-08-22  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [SVG] -webkit-clip-path treats url(abc#xyz) as url(#xyz) because it checks only URL fragment part
     4        https://bugs.webkit.org/show_bug.cgi?id=201030
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * svg/clip-path/clip-path-invalid-reference-001-expected.svg: Added.
     9        * svg/clip-path/clip-path-invalid-reference-001.svg: Added.
     10        * svg/clip-path/clip-path-invalid-reference-002-expected.svg: Added.
     11        * svg/clip-path/clip-path-invalid-reference-002.svg: Added.
     12
    1132019-08-22  Daniel Bates  <dabates@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r249036 r249040  
     12019-08-22  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [SVG] -webkit-clip-path treats url(abc#xyz) as url(#xyz) because it checks only URL fragment part
     4        https://bugs.webkit.org/show_bug.cgi?id=201030
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Tests: svg/clip-path/clip-path-invalid-reference-001-expected.svg
     9               svg/clip-path/clip-path-invalid-reference-001.svg
     10               svg/clip-path/clip-path-invalid-reference-002-expected.svg
     11               svg/clip-path/clip-path-invalid-reference-002.svg
     12
     13        * css/StyleBuilderConverter.h:
     14        (WebCore::StyleBuilderConverter::convertClipPath): Use
     15        SVGURIReference::fragmentIdentifierFromIRIString to get fragment
     16        identifier from -webkit-clip-path.
     17
    1182019-08-22  Andy Estes  <aestes@apple.com>
    219
  • trunk/Source/WebCore/css/StyleBuilderConverter.h

    r248846 r249040  
    591591        if (primitiveValue.primitiveType() == CSSPrimitiveValue::CSS_URI) {
    592592            String cssURLValue = primitiveValue.stringValue();
    593             URL url = styleResolver.document().completeURL(cssURLValue);
     593            String fragment = SVGURIReference::fragmentIdentifierFromIRIString(cssURLValue, styleResolver.document());
    594594            // FIXME: It doesn't work with external SVG references (see https://bugs.webkit.org/show_bug.cgi?id=126133)
    595             return ReferenceClipPathOperation::create(cssURLValue, url.fragmentIdentifier());
     595            return ReferenceClipPathOperation::create(cssURLValue, fragment);
    596596        }
    597597        ASSERT(primitiveValue.valueID() == CSSValueNone);
Note: See TracChangeset for help on using the changeset viewer.