Changeset 99543 in webkit


Ignore:
Timestamp:
Nov 8, 2011 3:46:40 AM (12 years ago)
Author:
Nikolas Zimmermann
Message:

2011-11-08 Nikolas Zimmermann <nzimmermann@rim.com>

Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
https://bugs.webkit.org/show_bug.cgi?id=71368

Reviewed by Zoltan Herczeg.

When determining whether the canvas would be tainted, we need access to the SVGImage, not its cached BitmapImage.
Otherwhise wrong assumptions are mode, leading to regressions.

Fixes http/tests/security/canvas-remote-read-svg-image.html and related tests on the bots.

  • html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::wouldTaintOrigin): Forgot to switch them back to use cachedImage->image().
  • html/canvas/CanvasRenderingContext2D.cpp: (WebCore::isOriginClean): Ditto.
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r99541 r99543  
     12011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
     4        https://bugs.webkit.org/show_bug.cgi?id=71368
     5
     6        Reviewed by Zoltan Herczeg.
     7
     8        When determining whether the canvas would be tainted, we need access to the SVGImage, not its cached BitmapImage.
     9        Otherwhise wrong assumptions are mode, leading to regressions.
     10
     11        Fixes http/tests/security/canvas-remote-read-svg-image.html and related tests on the bots.
     12
     13        * html/canvas/CanvasRenderingContext.cpp:
     14        (WebCore::CanvasRenderingContext::wouldTaintOrigin): Forgot to switch them back to use cachedImage->image().
     15        * html/canvas/CanvasRenderingContext2D.cpp:
     16        (WebCore::isOriginClean): Ditto.
     17
    1182011-11-08  Vsevolod Vlasov  <vsevik@chromium.org>
    219
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp

    r97448 r99543  
    6262
    6363    CachedImage* cachedImage = image->cachedImage();
    64     if (!cachedImage->imageForRenderer(image->renderer())->hasSingleSecurityOrigin())
     64    if (!cachedImage->image()->hasSingleSecurityOrigin())
    6565        return true;
    6666
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r99506 r99543  
    8888static bool isOriginClean(CachedImage* cachedImage, HTMLImageElement* image, SecurityOrigin* securityOrigin)
    8989{
    90     if (!cachedImage->imageForRenderer(image->renderer())->hasSingleSecurityOrigin())
     90    if (!cachedImage->image()->hasSingleSecurityOrigin())
    9191        return false;
    9292    if (cachedImage->passesAccessControlCheck(securityOrigin))
Note: See TracChangeset for help on using the changeset viewer.