Title: [207537] trunk/Source/WebCore
- Revision
- 207537
- Author
- commit-qu...@webkit.org
- Date
- 2016-10-19 08:10:07 -0700 (Wed, 19 Oct 2016)
Log Message
Remove SecurityOrigin::taintsCanvas
https://bugs.webkit.org/show_bug.cgi?id=163594
Patch by Youenn Fablet <you...@apple.com> on 2016-10-19
Reviewed by Darin Adler.
No change of behavior.
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::wouldTaintOrigin):
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canReceiveDragData):
(WebCore::SecurityOrigin::taintsCanvas): Deleted.
* page/SecurityOrigin.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (207536 => 207537)
--- trunk/Source/WebCore/ChangeLog 2016-10-19 15:07:19 UTC (rev 207536)
+++ trunk/Source/WebCore/ChangeLog 2016-10-19 15:10:07 UTC (rev 207537)
@@ -1,3 +1,19 @@
+2016-10-19 Youenn Fablet <you...@apple.com>
+
+ Remove SecurityOrigin::taintsCanvas
+ https://bugs.webkit.org/show_bug.cgi?id=163594
+
+ Reviewed by Darin Adler.
+
+ No change of behavior.
+
+ * html/canvas/CanvasRenderingContext.cpp:
+ (WebCore::CanvasRenderingContext::wouldTaintOrigin):
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::canReceiveDragData):
+ (WebCore::SecurityOrigin::taintsCanvas): Deleted.
+ * page/SecurityOrigin.h:
+
2016-10-18 Dave Hyatt <hy...@apple.com>
[CSS Parser] Fix compound selector parsing.
Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp (207536 => 207537)
--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp 2016-10-19 15:07:19 UTC (rev 207536)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp 2016-10-19 15:10:07 UTC (rev 207537)
@@ -101,13 +101,10 @@
if (!canvas()->originClean())
return false;
- if (canvas()->securityOrigin()->taintsCanvas(url))
- return true;
-
if (url.protocolIsData())
return false;
- return false;
+ return !canvas()->securityOrigin()->canRequest(url);
}
void CanvasRenderingContext::checkOrigin(const URL& url)
Modified: trunk/Source/WebCore/page/SecurityOrigin.cpp (207536 => 207537)
--- trunk/Source/WebCore/page/SecurityOrigin.cpp 2016-10-19 15:07:19 UTC (rev 207536)
+++ trunk/Source/WebCore/page/SecurityOrigin.cpp 2016-10-19 15:10:07 UTC (rev 207537)
@@ -298,29 +298,12 @@
return false;
}
-bool SecurityOrigin::taintsCanvas(const URL& url) const
-{
- if (canRequest(url))
- return false;
-
- // This function exists because we treat data URLs as having a unique origin,
- // contrary to the current (9/19/2009) draft of the HTML5 specification.
- // We still want to let folks paint data URLs onto untainted canvases, so
- // we special case data URLs below. If we change to match HTML5 w.r.t.
- // data URL security, then we can remove this function in favor of
- // !canRequest.
- if (url.protocolIsData())
- return false;
-
- return true;
-}
-
bool SecurityOrigin::canReceiveDragData(const SecurityOrigin* dragInitiator) const
{
if (this == dragInitiator)
return true;
- return canAccess(dragInitiator);
+ return canAccess(dragInitiator);
}
// This is a hack to allow keep navigation to http/https feeds working. To remove this
Modified: trunk/Source/WebCore/page/SecurityOrigin.h (207536 => 207537)
--- trunk/Source/WebCore/page/SecurityOrigin.h 2016-10-19 15:07:19 UTC (rev 207536)
+++ trunk/Source/WebCore/page/SecurityOrigin.h 2016-10-19 15:10:07 UTC (rev 207537)
@@ -106,11 +106,6 @@
// XMLHttpRequests.
bool canRequest(const URL&) const;
- // Returns true if drawing an image from this URL taints a canvas from
- // this security origin. For example, call this function before
- // drawing an image onto an HTML canvas element with the drawImage API.
- bool taintsCanvas(const URL&) const;
-
// Returns true if this SecurityOrigin can receive drag content from the
// initiator. For example, call this function before allowing content to be
// dropped onto a target.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes