Changeset 249416 in webkit


Ignore:
Timestamp:
Sep 2, 2019 6:55:27 PM (5 years ago)
Author:
Fujii Hironori
Message:

[SVG] fragment-only url 'url(#fragment)' should be resolved against the current document with regardless to HTML <base> element
https://bugs.webkit.org/show_bug.cgi?id=189499
<rdar://problem/44466206>

Reviewed by Said Abou-Hallawa.

Source/WebCore:

Fragment-only URL 'url(#fragment)' should be resolved against the
current document even if HTML <base> element is specified.
Spec: <https://drafts.csswg.org/css-values/#local-urls>

Tests: css3/filters/effect-reference-local-url-with-base.html

css3/masking/clip-path-reference-local-url-with-base.html
http/tests/svg/local-url-with-valid-base-and-resource.html
svg/animations/local-url-target-reference.html
svg/custom/local-url-reference-clip-path.html
svg/custom/local-url-reference-fill.html
svg/custom/local-url-reference-filter.html
svg/custom/local-url-reference-marker.html
svg/custom/local-url-reference-mask.html
svg/custom/local-url-reference-pattern.html
svg/custom/local-url-reference-radial-gradient.html
svg/custom/local-url-reference-srcdoc.html
svg/custom/local-url-reference-stroke.html
svg/custom/local-url-reference-use.html
svg/text/textpath-local-url-reference.html

  • svg/SVGURIReference.cpp:

(WebCore::SVGURIReference::fragmentIdentifierFromIRIString): Return the fragment if the URL starts with '#'.

LayoutTests:

These test cases are imported from Blink's commit, and modified for WebKit.
<https://chromium.googlesource.com/chromium/src/+/e7d7225c33aa7fc42ee390125b01df9167fad106%5E%21/>

  • TestExpectations:
  • css3/filters/effect-reference-local-url-with-base-expected.html: Added.
  • css3/filters/effect-reference-local-url-with-base.html: Added.
  • css3/filters/effect-reference.html:
  • css3/masking/clip-path-reference-local-url-with-base-expected.html: Added.
  • css3/masking/clip-path-reference-local-url-with-base.html: Added.
  • http/tests/svg/local-url-with-valid-base-and-resource-expected.html: Added.
  • http/tests/svg/local-url-with-valid-base-and-resource.html: Added.
  • http/tests/svg/resources/red100x100.svg: Added.
  • platform/gtk/TestExpectations: Marked svg/custom/local-url-reference-marker.html as ImageOnlyFailure for Bug 113849.
  • platform/wpe/TestExpectations: Ditto.
  • svg/animations/local-url-target-reference-expected.html: Added.
  • svg/animations/local-url-target-reference.html: Added.
  • svg/custom/linking-base-external-reference-expected.txt: Removed. This was a test for old spec.
  • svg/custom/linking-base-external-reference.xhtml: Ditto.
  • svg/custom/local-url-reference-clip-path-expected.html: Added.
  • svg/custom/local-url-reference-clip-path.html: Added.
  • svg/custom/local-url-reference-fill-expected.html: Added.
  • svg/custom/local-url-reference-fill.html: Added.
  • svg/custom/local-url-reference-filter-expected.html: Added.
  • svg/custom/local-url-reference-filter.html: Added.
  • svg/custom/local-url-reference-marker-expected.html: Added.
  • svg/custom/local-url-reference-marker.html: Added.
  • svg/custom/local-url-reference-mask-expected.html: Added.
  • svg/custom/local-url-reference-mask.html: Added.
  • svg/custom/local-url-reference-pattern-expected.html: Added.
  • svg/custom/local-url-reference-pattern.html: Added.
  • svg/custom/local-url-reference-radial-gradient-expected.html: Added.
  • svg/custom/local-url-reference-radial-gradient.html: Added.
  • svg/custom/local-url-reference-srcdoc-expected.html: Added.
  • svg/custom/local-url-reference-srcdoc.html: Added.
  • svg/custom/local-url-reference-stroke-expected.html: Added.
  • svg/custom/local-url-reference-stroke.html: Added.
  • svg/custom/local-url-reference-use-expected.html: Added.
  • svg/custom/local-url-reference-use.html: Added.
  • svg/text/textpath-local-url-reference-expected.html: Added.
  • svg/text/textpath-local-url-reference.html: Added.
Location:
trunk
Files:
31 added
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r249374 r249416  
     12019-09-02  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [SVG] fragment-only url 'url(#fragment)' should be resolved against the current document with regardless to HTML <base> element
     4        https://bugs.webkit.org/show_bug.cgi?id=189499
     5        <rdar://problem/44466206>
     6
     7        Reviewed by Said Abou-Hallawa.
     8
     9        These test cases are imported from Blink's commit, and modified for WebKit.
     10        <https://chromium.googlesource.com/chromium/src/+/e7d7225c33aa7fc42ee390125b01df9167fad106%5E%21/>
     11
     12        * TestExpectations:
     13        * css3/filters/effect-reference-local-url-with-base-expected.html: Added.
     14        * css3/filters/effect-reference-local-url-with-base.html: Added.
     15        * css3/filters/effect-reference.html:
     16        * css3/masking/clip-path-reference-local-url-with-base-expected.html: Added.
     17        * css3/masking/clip-path-reference-local-url-with-base.html: Added.
     18        * http/tests/svg/local-url-with-valid-base-and-resource-expected.html: Added.
     19        * http/tests/svg/local-url-with-valid-base-and-resource.html: Added.
     20        * http/tests/svg/resources/red100x100.svg: Added.
     21        * platform/gtk/TestExpectations: Marked svg/custom/local-url-reference-marker.html as ImageOnlyFailure for Bug 113849.
     22        * platform/wpe/TestExpectations: Ditto.
     23        * svg/animations/local-url-target-reference-expected.html: Added.
     24        * svg/animations/local-url-target-reference.html: Added.
     25        * svg/custom/linking-base-external-reference-expected.txt: Removed. This was a test for old spec.
     26        * svg/custom/linking-base-external-reference.xhtml: Ditto.
     27        * svg/custom/local-url-reference-clip-path-expected.html: Added.
     28        * svg/custom/local-url-reference-clip-path.html: Added.
     29        * svg/custom/local-url-reference-fill-expected.html: Added.
     30        * svg/custom/local-url-reference-fill.html: Added.
     31        * svg/custom/local-url-reference-filter-expected.html: Added.
     32        * svg/custom/local-url-reference-filter.html: Added.
     33        * svg/custom/local-url-reference-marker-expected.html: Added.
     34        * svg/custom/local-url-reference-marker.html: Added.
     35        * svg/custom/local-url-reference-mask-expected.html: Added.
     36        * svg/custom/local-url-reference-mask.html: Added.
     37        * svg/custom/local-url-reference-pattern-expected.html: Added.
     38        * svg/custom/local-url-reference-pattern.html: Added.
     39        * svg/custom/local-url-reference-radial-gradient-expected.html: Added.
     40        * svg/custom/local-url-reference-radial-gradient.html: Added.
     41        * svg/custom/local-url-reference-srcdoc-expected.html: Added.
     42        * svg/custom/local-url-reference-srcdoc.html: Added.
     43        * svg/custom/local-url-reference-stroke-expected.html: Added.
     44        * svg/custom/local-url-reference-stroke.html: Added.
     45        * svg/custom/local-url-reference-use-expected.html: Added.
     46        * svg/custom/local-url-reference-use.html: Added.
     47        * svg/text/textpath-local-url-reference-expected.html: Added.
     48        * svg/text/textpath-local-url-reference.html: Added.
     49
    1502019-09-01  Myles C. Maxfield  <mmaxfield@apple.com>
    251
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r249364 r249416  
    30213021webkit.org/b/107825 media/video-controls-fullscreen-volume.html [ Failure ]
    30223022
     3023webkit.org/b/113849 svg/custom/local-url-reference-marker.html [ ImageOnlyFailure ]
     3024
    30233025# Test marked in TestExpectations as failing on non-retina displays, passing on GTK port
    30243026webkit.org/b/129113 fast/multicol/newmulticol/clipping.html [ Pass ]
  • trunk/LayoutTests/platform/wpe/TestExpectations

    r249325 r249416  
    13771377webkit.org/b/134758 svg/custom/composited-svg-with-opacity.html [ ImageOnlyFailure Pass ]
    13781378webkit.org/b/131347 svg/custom/hidpi-masking-clipping.svg [ Failure ImageOnlyFailure Timeout ]
     1379webkit.org/b/113849 svg/custom/local-url-reference-marker.html [ ImageOnlyFailure ]
    13791380webkit.org/b/160137 svg/custom/non-scaling-stroke.svg [ Failure Pass ]
    13801381webkit.org/b/160137 svg/custom/non-scaling-stroke-update.svg [ ImageOnlyFailure Pass ]
  • trunk/Source/WebCore/ChangeLog

    r249415 r249416  
     12019-09-02  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [SVG] fragment-only url 'url(#fragment)' should be resolved against the current document with regardless to HTML <base> element
     4        https://bugs.webkit.org/show_bug.cgi?id=189499
     5        <rdar://problem/44466206>
     6
     7        Reviewed by Said Abou-Hallawa.
     8
     9        Fragment-only URL 'url(#fragment)' should be resolved against the
     10        current document even if HTML <base> element is specified.
     11        Spec: <https://drafts.csswg.org/css-values/#local-urls>
     12
     13        Tests: css3/filters/effect-reference-local-url-with-base.html
     14               css3/masking/clip-path-reference-local-url-with-base.html
     15               http/tests/svg/local-url-with-valid-base-and-resource.html
     16               svg/animations/local-url-target-reference.html
     17               svg/custom/local-url-reference-clip-path.html
     18               svg/custom/local-url-reference-fill.html
     19               svg/custom/local-url-reference-filter.html
     20               svg/custom/local-url-reference-marker.html
     21               svg/custom/local-url-reference-mask.html
     22               svg/custom/local-url-reference-pattern.html
     23               svg/custom/local-url-reference-radial-gradient.html
     24               svg/custom/local-url-reference-srcdoc.html
     25               svg/custom/local-url-reference-stroke.html
     26               svg/custom/local-url-reference-use.html
     27               svg/text/textpath-local-url-reference.html
     28
     29        * svg/SVGURIReference.cpp:
     30        (WebCore::SVGURIReference::fragmentIdentifierFromIRIString): Return the fragment if the URL starts with '#'.
     31
    1322019-09-02  Fujii Hironori  <Hironori.Fujii@sony.com>
    233
  • trunk/Source/WebCore/svg/SVGURIReference.cpp

    r246490 r249416  
    5858        return emptyString();
    5959
    60     URL base = start ? URL(document.baseURL(), url.substring(0, start)) : document.baseURL();
     60    if (!start)
     61        return url.substring(1);
     62
     63    URL base = URL(document.baseURL(), url.substring(0, start));
    6164    String fragmentIdentifier = url.substring(start);
    6265    URL kurl(base, fragmentIdentifier);
Note: See TracChangeset for help on using the changeset viewer.