TextIterator emits LF for a br element inside an empty input element
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Mar 2013 22:22:23 +0000 (22:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Mar 2013 22:22:23 +0000 (22:22 +0000)
commit90d3267275feb455b51c78eea208c0f7855c5434
treefb1e655365b02c00fd858fbd041d6723c8c8b029
parent6c4a2bde84041e9a5f6c5785260a38f4b0abd363
TextIterator emits LF for a br element inside an empty input element
https://bugs.webkit.org/show_bug.cgi?id=112275

Patch by Aurimas Liutikas <aurimas@chromium.org> on 2013-03-15
Reviewed by Ryosuke Niwa.

Source/WebCore:

Adding a check to avoid emiting LF for br elements inside a shadow tree
of an input element.

Test: editing/text-iterator/basic-iteration.html
      editing/text-iterator/basic-iteration-shadowdom.html

* editing/TextIterator.cpp:
(WebCore::shouldEmitNewlineForNode):
(WebCore::TextIterator::handleNonTextNode):
(WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
(WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
(WebCore::SimplifiedBackwardsTextIterator::exitNode):
* editing/TextIterator.h:
(SimplifiedBackwardsTextIterator):

LayoutTests:

* editing/text-iterator/basic-iteration-expected.txt: Extended to add two more cases.
* editing/text-iterator/basic-iteration-shadowdom-expected.txt: Added.
* editing/text-iterator/basic-iteration-shadowdom.html: Added.
* editing/text-iterator/script-tests/basic-iteration.js: Extended to add two mroe cases.
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/text-iterator/basic-iteration-expected.txt
LayoutTests/editing/text-iterator/basic-iteration-shadowdom-expected.txt [new file with mode: 0644]
LayoutTests/editing/text-iterator/basic-iteration-shadowdom.html [new file with mode: 0644]
LayoutTests/editing/text-iterator/script-tests/basic-iteration.js
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/editing/TextIterator.h