Changeset 208102 in webkit


Ignore:
Timestamp:
Oct 29, 2016 6:46:52 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION (r207754): LayoutTest http/tests/security/svg-image-with-css-cross-domain.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=163922

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-29
Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/security/cached-svg-image-with-css-cross-domain.html

Raw data was not copied in cloned CachedCSSStyleSheet while it is used by some of its clients.
Updated CachedCSSStyleSheet and CachedImage cloning to copy its raw data.

  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::setBodyDataFrom):

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::setBodyDataFrom):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::mayTryReplaceEncodedData):

LayoutTests:

  • http/tests/security/cached-svg-image-with-css-cross-domain-expected.html: Added.
  • http/tests/security/cached-svg-image-with-css-cross-domain.html: Added.
  • platform/mac/TestExpectations:
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r208101 r208102  
     12016-10-29  Youenn Fablet  <youenn@apple.com>
     2
     3        REGRESSION (r207754): LayoutTest http/tests/security/svg-image-with-css-cross-domain.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=163922
     5
     6        Reviewed by Alex Christensen.
     7
     8        * http/tests/security/cached-svg-image-with-css-cross-domain-expected.html: Added.
     9        * http/tests/security/cached-svg-image-with-css-cross-domain.html: Added.
     10        * platform/mac/TestExpectations:
     11
    1122016-10-29  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/LayoutTests/platform/mac/TestExpectations

    r208042 r208102  
    14571457webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size.html [ Skip ]
    14581458
    1459 webkit.org/b/163922 http/tests/security/svg-image-with-css-cross-domain.html [ Pass ImageOnlyFailure ]
    1460 
    14611459webkit.org/b/164088 [ Yosemite ] media/modern-media-controls/scrubber-support/scrubber-support-click.html [ Skip ]
    14621460webkit.org/b/164088 [ Yosemite ] media/modern-media-controls/scrubber-support/scrubber-support-drag.html [ Skip ]
  • trunk/Source/WebCore/ChangeLog

    r208101 r208102  
     12016-10-29  Youenn Fablet  <youenn@apple.com>
     2
     3        REGRESSION (r207754): LayoutTest http/tests/security/svg-image-with-css-cross-domain.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=163922
     5
     6        Reviewed by Alex Christensen.
     7
     8        Test: http/tests/security/cached-svg-image-with-css-cross-domain.html
     9
     10        Raw data was not copied in cloned CachedCSSStyleSheet while it is used by some of its clients.
     11        Updated CachedCSSStyleSheet and CachedImage cloning to copy its raw data.
     12
     13        * loader/cache/CachedCSSStyleSheet.cpp:
     14        (WebCore::CachedCSSStyleSheet::setBodyDataFrom):
     15        * loader/cache/CachedImage.cpp:
     16        (WebCore::CachedImage::setBodyDataFrom):
     17        * loader/cache/CachedResource.h:
     18        (WebCore::CachedResource::mayTryReplaceEncodedData):
     19
    1202016-10-29  Youenn Fablet  <youenn@apple.com>
    221
  • trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp

    r207967 r208102  
    9292    ASSERT(resource.type() == type());
    9393    const CachedCSSStyleSheet& sheet = static_cast<const CachedCSSStyleSheet&>(resource);
     94
     95    CachedResource::setBodyDataFrom(resource);
    9496
    9597    m_decoder = sheet.m_decoder;
  • trunk/Source/WebCore/loader/cache/CachedImage.cpp

    r206995 r208102  
    9797    const CachedImage& image = static_cast<const CachedImage&>(resource);
    9898
     99    CachedResource::setBodyDataFrom(resource);
     100
    99101    m_image = image.m_image;
    100102
  • trunk/Source/WebCore/loader/cache/CachedResource.h

    r207817 r208102  
    283283    virtual void didReplaceSharedBufferContents() { }
    284284
     285    virtual void setBodyDataFrom(const CachedResource&);
     286
    285287    // FIXME: Make the rest of these data members private and use functions in derived classes instead.
    286288    HashCountedSet<CachedResourceClient*> m_clients;
     
    302304    virtual void checkNotify();
    303305    virtual bool mayTryReplaceEncodedData() const { return false; }
    304     virtual void setBodyDataFrom(const CachedResource&);
    305306
    306307    std::chrono::microseconds freshnessLifetime(const ResourceResponse&) const;
Note: See TracChangeset for help on using the changeset viewer.