Changeset 145788 in webkit


Ignore:
Timestamp:
Mar 13, 2013 11:52:33 PM (11 years ago)
Author:
rniwa@webkit.org
Message:

Cannot select a canvas element at the beginning or the end of a document
https://bugs.webkit.org/show_bug.cgi?id=112319

Reviewed by Eric Seidel.

Source/WebCore:

The bug was caused by the editing code treating canvas element as if an empty inline element.
Treat it as an "atomic" element for the purpose of determining whether selection can have
an end point in it or not.

Test: editing/pasteboard/copy-paste-content-starting-and-ending-canvas.html

  • html/HTMLCanvasElement.h:

(WebCore::HTMLCanvasElement::canContainRangeEndPoint): Added.

LayoutTests:

Add a regression test to copy and paste a content with canvas elements.

  • editing/pasteboard/copy-paste-content-starting-and-ending-canvas-expected.txt: Added.
  • editing/pasteboard/copy-paste-content-starting-and-ending-canvas.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r145787 r145788  
     12013-03-13  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Cannot select a canvas element at the beginning or the end of a document
     4        https://bugs.webkit.org/show_bug.cgi?id=112319
     5
     6        Reviewed by Eric Seidel.
     7
     8        Add a regression test to copy and paste a content with canvas elements.
     9
     10        * editing/pasteboard/copy-paste-content-starting-and-ending-canvas-expected.txt: Added.
     11        * editing/pasteboard/copy-paste-content-starting-and-ending-canvas.html: Added.
     12
    1132013-03-13  Kunihiko Sakamoto  <ksakamoto@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r145787 r145788  
     12013-03-13  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Cannot select a canvas element at the beginning or the end of a document
     4        https://bugs.webkit.org/show_bug.cgi?id=112319
     5
     6        Reviewed by Eric Seidel.
     7
     8        The bug was caused by the editing code treating canvas element as if an empty inline element.
     9        Treat it as an "atomic" element for the purpose of determining whether selection can have
     10        an end point in it or not.
     11
     12        Test: editing/pasteboard/copy-paste-content-starting-and-ending-canvas.html
     13
     14        * html/HTMLCanvasElement.h:
     15        (WebCore::HTMLCanvasElement::canContainRangeEndPoint): Added.
     16
    1172013-03-13  Kunihiko Sakamoto  <ksakamoto@chromium.org>
    218
  • trunk/Source/WebCore/html/HTMLCanvasElement.h

    r136262 r145788  
    140140    float deviceScaleFactor() const { return m_deviceScaleFactor; }
    141141
     142    virtual bool canContainRangeEndPoint() const { return false; }
     143
    142144    virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE;
    143145
Note: See TracChangeset for help on using the changeset viewer.