Changeset 207537 in webkit
- Timestamp:
- Oct 19, 2016 8:10:07 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r207536 r207537 1 2016-10-19 Youenn Fablet <youenn@apple.com> 2 3 Remove SecurityOrigin::taintsCanvas 4 https://bugs.webkit.org/show_bug.cgi?id=163594 5 6 Reviewed by Darin Adler. 7 8 No change of behavior. 9 10 * html/canvas/CanvasRenderingContext.cpp: 11 (WebCore::CanvasRenderingContext::wouldTaintOrigin): 12 * page/SecurityOrigin.cpp: 13 (WebCore::SecurityOrigin::canReceiveDragData): 14 (WebCore::SecurityOrigin::taintsCanvas): Deleted. 15 * page/SecurityOrigin.h: 16 1 17 2016-10-18 Dave Hyatt <hyatt@apple.com> 2 18 -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp
r206995 r207537 102 102 return false; 103 103 104 if (canvas()->securityOrigin()->taintsCanvas(url))105 return true;106 107 104 if (url.protocolIsData()) 108 105 return false; 109 106 110 return false;107 return !canvas()->securityOrigin()->canRequest(url); 111 108 } 112 109 -
trunk/Source/WebCore/page/SecurityOrigin.cpp
r207033 r207537 299 299 } 300 300 301 bool SecurityOrigin::taintsCanvas(const URL& url) const302 {303 if (canRequest(url))304 return false;305 306 // This function exists because we treat data URLs as having a unique origin,307 // contrary to the current (9/19/2009) draft of the HTML5 specification.308 // We still want to let folks paint data URLs onto untainted canvases, so309 // we special case data URLs below. If we change to match HTML5 w.r.t.310 // data URL security, then we can remove this function in favor of311 // !canRequest.312 if (url.protocolIsData())313 return false;314 315 return true;316 }317 318 301 bool SecurityOrigin::canReceiveDragData(const SecurityOrigin* dragInitiator) const 319 302 { … … 321 304 return true; 322 305 323 return canAccess(dragInitiator); 306 return canAccess(dragInitiator); 324 307 } 325 308 -
trunk/Source/WebCore/page/SecurityOrigin.h
r200521 r207537 107 107 bool canRequest(const URL&) const; 108 108 109 // Returns true if drawing an image from this URL taints a canvas from110 // this security origin. For example, call this function before111 // drawing an image onto an HTML canvas element with the drawImage API.112 bool taintsCanvas(const URL&) const;113 114 109 // Returns true if this SecurityOrigin can receive drag content from the 115 110 // initiator. For example, call this function before allowing content to be
Note: See TracChangeset
for help on using the changeset viewer.