Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2bf6d1859ff5e571b0ed3386f6af8934b206e63d
      
https://github.com/WebKit/WebKit/commit/2bf6d1859ff5e571b0ed3386f6af8934b206e63d
  Author: Youenn Fablet <[email protected]>
  Date:   2023-03-20 (Mon, 20 Mar 2023)

  Changed paths:
    M Source/WebCore/html/canvas/CanvasRenderingContext.cpp
    M Source/WebCore/html/canvas/CanvasRenderingContext.h

  Log Message:
  -----------
  CanvasRenderingContext::taintsOrigin is not easy to read
https://bugs.webkit.org/show_bug.cgi?id=254019
rdar://problem/106803255

Reviewed by Eric Carlson.

This is a refactoring to make code easier to read.
Instead of taintsOrigin returning false if canvas is already tainted, we are 
now checking whether canvas is already tainted in checkOrigin before calling 
taintsOrigin.
Other callers of taintsOrigin like 
WebGLRenderingContextBase::validateXXXElement are closer to spec with this 
change.

* Source/WebCore/html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::taintsOrigin):
(WebCore::CanvasRenderingContext::checkOrigin):
* Source/WebCore/html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::checkOrigin):

Canonical link: https://commits.webkit.org/261863@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to