Changeset 207910 in webkit


Ignore:
Timestamp:
Oct 26, 2016 1:39:04 PM (8 years ago)
Author:
mitz@apple.com
Message:

When pasting web archive, width specifiers in srcset attribute change into density specifiers
https://bugs.webkit.org/show_bug.cgi?id=164027
<rdar://problem/28964948>

Reviewed by Tim Horton.

Source/WebCore:

Updated editing/pasteboard/img-srcset-copy-paste-canonicalization.html.

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::completeURLsInAttributeValue): Use 'w' when writing out a width

specifier.

LayoutTests:

  • editing/pasteboard/img-srcset-copy-paste-canonicalization-expected.txt: Updated.
  • editing/pasteboard/img-srcset-copy-paste-canonicalization.html: Changed to expect a 200w specifier to round-trip.
  • editing/pasteboard/resources/img-srcset-copy-paste-canonicalization-iframe.html: Changed a 1x specifier to 200w.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r207909 r207910  
     12016-10-26  Dan Bernstein  <mitz@apple.com>
     2
     3        When pasting web archive, width specifiers in srcset attribute change into density specifiers
     4        https://bugs.webkit.org/show_bug.cgi?id=164027
     5        <rdar://problem/28964948>
     6
     7        Reviewed by Tim Horton.
     8
     9        * editing/pasteboard/img-srcset-copy-paste-canonicalization-expected.txt: Updated.
     10        * editing/pasteboard/img-srcset-copy-paste-canonicalization.html: Changed to expect a 200w
     11          specifier to round-trip.
     12        * editing/pasteboard/resources/img-srcset-copy-paste-canonicalization-iframe.html: Changed
     13          a 1x specifier to 200w.
     14
    1152016-10-26  Antoine Quint  <graouts@apple.com>
    216
  • trunk/LayoutTests/editing/pasteboard/img-srcset-copy-paste-canonicalization-expected.txt

    r171941 r207910  
    1010PASS sourceImageSegments[1] is "2x,"
    1111PASS destinationImageSegments[1] is "2x,"
    12 PASS sourceImageSegments[3] is "1x"
    13 PASS destinationImageSegments[3] is "1x"
     12PASS sourceImageSegments[3] is "200w"
     13PASS destinationImageSegments[3] is "200w"
    1414PASS successfullyParsed is true
    1515
  • trunk/LayoutTests/editing/pasteboard/img-srcset-copy-paste-canonicalization.html

    r171958 r207910  
    7575        shouldBe("sourceImageSegments[1]", "\"2x,\"");
    7676        shouldBe("destinationImageSegments[1]", "\"2x,\"");
    77         shouldBe("sourceImageSegments[3]", "\"1x\"");
    78         shouldBe("destinationImageSegments[3]", "\"1x\"");
     77        shouldBe("sourceImageSegments[3]", "\"200w\"");
     78        shouldBe("destinationImageSegments[3]", "\"200w\"");
    7979        maybeFinishTest();
    8080    }
  • trunk/LayoutTests/editing/pasteboard/resources/img-srcset-copy-paste-canonicalization-iframe.html

    r171941 r207910  
    55<body onload="window.parent.runTests(window.location.href);">
    66<div id="source" contenteditable="true">
    7     <img id="image" src="../../../fast/hidpi/resources/srcset.png" srcset="../../../fast/hidpi/resources/green-400-px-square.png 2x, ../../../fast/hidpi/resources/green-200-px-square.png 1x">
     7    <img id="image" src="../../../fast/hidpi/resources/srcset.png" srcset="../../../fast/hidpi/resources/green-400-px-square.png 2x, ../../../fast/hidpi/resources/green-200-px-square.png 200w">
    88</div>
    99</body>
  • trunk/Source/WebCore/ChangeLog

    r207909 r207910  
     12016-10-26  Dan Bernstein  <mitz@apple.com>
     2
     3        When pasting web archive, width specifiers in srcset attribute change into density specifiers
     4        https://bugs.webkit.org/show_bug.cgi?id=164027
     5        <rdar://problem/28964948>
     6
     7        Reviewed by Tim Horton.
     8
     9        Updated editing/pasteboard/img-srcset-copy-paste-canonicalization.html.
     10
     11        * html/HTMLImageElement.cpp:
     12        (WebCore::HTMLImageElement::completeURLsInAttributeValue): Use 'w' when writing out a width
     13          specifier.
     14
    1152016-10-26  Antoine Quint  <graouts@apple.com>
    216
  • trunk/Source/WebCore/html/HTMLImageElement.cpp

    r205905 r207910  
    476476                result.append(' ');
    477477                result.appendNumber(candidate.resourceWidth);
    478                 result.append('x');
     478                result.append('w');
    479479            }
    480480        }
Note: See TracChangeset for help on using the changeset viewer.