Changeset 151822 in webkit


Ignore:
Timestamp:
Jun 20, 2013 8:52:46 PM (11 years ago)
Author:
rniwa@webkit.org
Message:

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.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r151821 r151822  
     12013-06-20  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION(r145788): mouse drag on canvas shouldn't start selection
     4        https://bugs.webkit.org/show_bug.cgi?id=117860
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Add a regression test for dragging mouse inside a canvas.
     9        The canvas should not be selected and mouseup event should fire.
     10
     11        * fast/events/mosuedrag-on-canvas-should-not-start-selection-expected.txt: Added.
     12        * fast/events/mosuedrag-on-canvas-should-not-start-selection.html: Added.
     13
    1142013-06-20  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r151821 r151822  
     12013-06-20  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION(r145788): mouse drag on canvas shouldn't start selection
     4        https://bugs.webkit.org/show_bug.cgi?id=117860
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Like HTMLImageElement, HTMLCanvasElement shouldn't start selection.
     9
     10        Also uninline some virtual function overrides.
     11
     12        Test: fast/events/mosuedrag-on-canvas-should-not-start-selection.html
     13
     14        * html/HTMLCanvasElement.cpp:
     15        (WebCore::HTMLCanvasElement::areAuthorShadowsAllowed):
     16        (WebCore::HTMLCanvasElement::canContainRangeEndPoint):
     17        (WebCore::HTMLCanvasElement::canStartSelection):
     18        * html/HTMLCanvasElement.h:
     19
    1202013-06-20  Ryosuke Niwa  <rniwa@webkit.org>
    221
  • trunk/Source/WebCore/html/HTMLCanvasElement.cpp

    r151298 r151822  
    128128}
    129129
     130bool HTMLCanvasElement::areAuthorShadowsAllowed() const
     131{
     132    return false;
     133}
     134
     135bool HTMLCanvasElement::canContainRangeEndPoint() const
     136{
     137    return false;
     138}
     139
     140bool HTMLCanvasElement::canStartSelection() const
     141{
     142    return false;
     143}
     144
    130145void HTMLCanvasElement::addObserver(CanvasObserver* observer)
    131146{
  • trunk/Source/WebCore/html/HTMLCanvasElement.h

    r151298 r151822  
    143143    float deviceScaleFactor() const { return m_deviceScaleFactor; }
    144144
    145     virtual bool canContainRangeEndPoint() const { return false; }
    146 
    147145private:
    148146    HTMLCanvasElement(const QualifiedName&, Document*);
     
    151149    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    152150    virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
    153     virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
     151    virtual bool areAuthorShadowsAllowed() const OVERRIDE;
     152
     153    virtual bool canContainRangeEndPoint() const OVERRIDE;
     154    virtual bool canStartSelection() const OVERRIDE;
    154155
    155156    void reset();
Note: See TracChangeset for help on using the changeset viewer.