Element parameter to CanvasRenderingContext2D.drawFocusIfNeeded() should not be nullable
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Oct 2016 20:08:51 +0000 (20:08 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Oct 2016 20:08:51 +0000 (20:08 +0000)
commite5bbef8ac1bfdc7efda486e61e690a9c3539f4a7
tree2855f68d8356ecf7261e021d511338c1c67eefb4
parenta53808722605f471a6b23cad52af376f937aab98
Element parameter to CanvasRenderingContext2D.drawFocusIfNeeded() should not be nullable
https://bugs.webkit.org/show_bug.cgi?id=164062

Reviewed by Darin Adler.

Source/WebCore:

Element parameter to CanvasRenderingContext2D.drawFocusIfNeeded() should not be nullable:
- https://html.spec.whatwg.org/#canvasuserinterface

Firefox and Chrome agree with the specification.

Test: fast/canvas/draw-focus-if-needed-null-element.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawFocusIfNeeded):
(WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2D.idl:

LayoutTests:

Add layout test coverage.

* fast/canvas/draw-focus-if-needed-null-element-expected.txt: Added.
* fast/canvas/draw-focus-if-needed-null-element.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/draw-focus-if-needed-null-element-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/draw-focus-if-needed-null-element.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.h
Source/WebCore/html/canvas/CanvasRenderingContext2D.idl