Changeset 207537 in webkit


Ignore:
Timestamp:
Oct 19, 2016 8:10:07 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Remove SecurityOrigin::taintsCanvas
https://bugs.webkit.org/show_bug.cgi?id=163594

Patch by Youenn Fablet <youenn@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:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207536 r207537  
     12016-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
    1172016-10-18  Dave Hyatt  <hyatt@apple.com>
    218
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp

    r206995 r207537  
    102102        return false;
    103103
    104     if (canvas()->securityOrigin()->taintsCanvas(url))
    105         return true;
    106 
    107104    if (url.protocolIsData())
    108105        return false;
    109106
    110     return false;
     107    return !canvas()->securityOrigin()->canRequest(url);
    111108}
    112109
  • trunk/Source/WebCore/page/SecurityOrigin.cpp

    r207033 r207537  
    299299}
    300300
    301 bool SecurityOrigin::taintsCanvas(const URL& url) const
    302 {
    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, so
    309     // 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 of
    311     // !canRequest.
    312     if (url.protocolIsData())
    313         return false;
    314 
    315     return true;
    316 }
    317 
    318301bool SecurityOrigin::canReceiveDragData(const SecurityOrigin* dragInitiator) const
    319302{
     
    321304        return true;
    322305
    323     return canAccess(dragInitiator); 
     306    return canAccess(dragInitiator);
    324307}
    325308
  • trunk/Source/WebCore/page/SecurityOrigin.h

    r200521 r207537  
    107107    bool canRequest(const URL&) const;
    108108
    109     // Returns true if drawing an image from this URL taints a canvas from
    110     // this security origin. For example, call this function before
    111     // drawing an image onto an HTML canvas element with the drawImage API.
    112     bool taintsCanvas(const URL&) const;
    113 
    114109    // Returns true if this SecurityOrigin can receive drag content from the
    115110    // initiator. For example, call this function before allowing content to be
Note: See TracChangeset for help on using the changeset viewer.