Changeset 64489 in webkit


Ignore:
Timestamp:
Aug 2, 2010 1:50:36 PM (14 years ago)
Author:
ojan@chromium.org
Message:

2010-07-20 Ojan Vafai <ojan@chromium.org>

Reviewed by Eric Seidel.

focusing the body of a contentEditable iframe resets the selection
https://bugs.webkit.org/show_bug.cgi?id=42645

  • editing/selection/focus-contenteditable-iframe-expected.txt: Added.
  • editing/selection/focus-contenteditable-iframe.html: Added.

2010-07-20 Ojan Vafai <ojan@chromium.org>

Reviewed by Eric Seidel.

focusing the body of a contentEditable iframe resets the selection
https://bugs.webkit.org/show_bug.cgi?id=42645

The selection shouldn't be reset to the beginning of the rootEditableElement
if it is already inside the rootEditableElement.

Test: editing/selection/focus-contenteditable-iframe.html

  • dom/Element.cpp: (WebCore::Element::updateFocusAppearance):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r64488 r64489  
     12010-07-20  Ojan Vafai  <ojan@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        focusing the body of a contentEditable iframe resets the selection
     6        https://bugs.webkit.org/show_bug.cgi?id=42645
     7
     8        * editing/selection/focus-contenteditable-iframe-expected.txt: Added.
     9        * editing/selection/focus-contenteditable-iframe.html: Added.
     10
    1112010-07-20  Ojan Vafai  <ojan@chromium.org>
    212
  • trunk/WebCore/ChangeLog

    r64488 r64489  
     12010-07-20  Ojan Vafai  <ojan@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        focusing the body of a contentEditable iframe resets the selection
     6        https://bugs.webkit.org/show_bug.cgi?id=42645
     7       
     8        The selection shouldn't be reset to the beginning of the rootEditableElement
     9        if it is already inside the rootEditableElement.
     10
     11        Test: editing/selection/focus-contenteditable-iframe.html
     12
     13        * dom/Element.cpp:
     14        (WebCore::Element::updateFocusAppearance):
     15
    1162010-07-20  Ojan Vafai  <ojan@chromium.org>
    217
  • trunk/WebCore/dom/Element.cpp

    r64488 r64489  
    13311331        if (!frame)
    13321332            return;
     1333       
     1334        // When focusing an editable element in an iframe, don't reset the selection if it already contains a selection.
     1335        if (this == frame->selection()->rootEditableElement())
     1336            return;
    13331337
    13341338        // FIXME: We should restore the previous selection if there is one.
Note: See TracChangeset for help on using the changeset viewer.