Changeset 148251 in webkit


Ignore:
Timestamp:
Apr 11, 2013 5:08:55 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Unable to paste twice in input field when specific CSS present
https://bugs.webkit.org/show_bug.cgi?id=108675

Patch by Sukolsak Sakshuwong <Sukolsak Sakshuwong> on 2013-04-11
Reviewed by Ryosuke Niwa.

Source/WebCore:

When we are pre-rendering text in ReplaceSelectionCommand, we shouldn't care
whether the content is clipped by its ancestors or not. This bug was caused
by the fact the plainText() method returned an empty string because the text
was fully clipped by its ancestors. Make plainText ignore style visibility.

Test: editing/inserting/insert-text-into-text-field.html

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::ReplacementFragment):

LayoutTests:

  • editing/inserting/insert-text-into-text-field-expected.txt: Added.
  • editing/inserting/insert-text-into-text-field.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r148244 r148251  
     12013-04-11  Sukolsak Sakshuwong  <sukolsak@gmail.com>
     2
     3        Unable to paste twice in input field when specific CSS present
     4        https://bugs.webkit.org/show_bug.cgi?id=108675
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * editing/inserting/insert-text-into-text-field-expected.txt: Added.
     9        * editing/inserting/insert-text-into-text-field.html: Added.
     10
    1112013-04-11  Brendan Long  <b.long@cablelabs.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r148247 r148251  
     12013-04-11  Sukolsak Sakshuwong  <sukolsak@gmail.com>
     2
     3        Unable to paste twice in input field when specific CSS present
     4        https://bugs.webkit.org/show_bug.cgi?id=108675
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        When we are pre-rendering text in ReplaceSelectionCommand, we shouldn't care
     9        whether the content is clipped by its ancestors or not. This bug was caused
     10        by the fact the plainText() method returned an empty string because the text
     11        was fully clipped by its ancestors. Make plainText ignore style visibility.
     12
     13        Test: editing/inserting/insert-text-into-text-field.html
     14
     15        * editing/ReplaceSelectionCommand.cpp:
     16        (WebCore::ReplacementFragment::ReplacementFragment):
     17
    1182013-04-11  Martin Robinson  <mrobinson@igalia.com>
    219
  • trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp

    r147388 r148251  
    175175   
    176176    RefPtr<Range> range = VisibleSelection::selectionFromContentsOfNode(holder.get()).toNormalizedRange();
    177     String text = plainText(range.get(), TextIteratorEmitsOriginalText);
     177    String text = plainText(range.get(), static_cast<TextIteratorBehavior>(TextIteratorEmitsOriginalText | TextIteratorIgnoresStyleVisibility));
    178178
    179179    removeInterchangeNodes(holder.get());
Note: See TracChangeset for help on using the changeset viewer.