Title: [99543] trunk/Source/WebCore
- Revision
- 99543
- Author
- zimmerm...@webkit.org
- Date
- 2011-11-08 03:46:40 -0800 (Tue, 08 Nov 2011)
Log Message
2011-11-08 Nikolas Zimmermann <nzimmerm...@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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (99542 => 99543)
--- trunk/Source/WebCore/ChangeLog 2011-11-08 11:30:47 UTC (rev 99542)
+++ trunk/Source/WebCore/ChangeLog 2011-11-08 11:46:40 UTC (rev 99543)
@@ -1,3 +1,20 @@
+2011-11-08 Nikolas Zimmermann <nzimmerm...@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.
+
2011-11-08 Vsevolod Vlasov <vse...@chromium.org>
Web Inspector: Console should be scrolled to bottom when shown for the first time.
Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp (99542 => 99543)
--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp 2011-11-08 11:30:47 UTC (rev 99542)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp 2011-11-08 11:46:40 UTC (rev 99543)
@@ -61,7 +61,7 @@
return false;
CachedImage* cachedImage = image->cachedImage();
- if (!cachedImage->imageForRenderer(image->renderer())->hasSingleSecurityOrigin())
+ if (!cachedImage->image()->hasSingleSecurityOrigin())
return true;
return wouldTaintOrigin(cachedImage->response().url()) && !cachedImage->passesAccessControlCheck(canvas()->securityOrigin());
Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (99542 => 99543)
--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp 2011-11-08 11:30:47 UTC (rev 99542)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp 2011-11-08 11:46:40 UTC (rev 99543)
@@ -87,7 +87,7 @@
static bool isOriginClean(CachedImage* cachedImage, HTMLImageElement* image, SecurityOrigin* securityOrigin)
{
- if (!cachedImage->imageForRenderer(image->renderer())->hasSingleSecurityOrigin())
+ if (!cachedImage->image()->hasSingleSecurityOrigin())
return false;
if (cachedImage->passesAccessControlCheck(securityOrigin))
return true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes