REGRESSION(r145788): mouse drag on canvas shouldn't start selection
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jun 2013 03:52:46 +0000 (03:52 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jun 2013 03:52:46 +0000 (03:52 +0000)
commit346f5cea38dd4e64ce25ab5fd17318afb7407ba7
treea97dd08c35dbe47d49ec07ed2c55211afc8c55b7
parentc2df9d55f5b2281a5ffcfb84c88a631512be6f1d
REGRESSION(r145788): mouse drag on canvas shouldn't start selection
https://bugs.webkit.org/show_bug.cgi?id=117860

Reviewed by Benjamin Poulain.

Source/WebCore:

Like HTMLImageElement, HTMLCanvasElement shouldn't start selection.

Also uninline some virtual function overrides.

Test: fast/events/mosuedrag-on-canvas-should-not-start-selection.html

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::areAuthorShadowsAllowed):
(WebCore::HTMLCanvasElement::canContainRangeEndPoint):
(WebCore::HTMLCanvasElement::canStartSelection):
* html/HTMLCanvasElement.h:

LayoutTests:

Add a regression test for dragging mouse inside a canvas.
The canvas should not be selected and mouseup event should fire.

* fast/events/mosuedrag-on-canvas-should-not-start-selection-expected.txt: Added.
* fast/events/mosuedrag-on-canvas-should-not-start-selection.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/mosuedrag-on-canvas-should-not-start-selection-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/mosuedrag-on-canvas-should-not-start-selection.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/HTMLCanvasElement.h