contenteditable justify commands applied to next paragraph as well
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Oct 2013 05:11:44 +0000 (05:11 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Oct 2013 05:11:44 +0000 (05:11 +0000)
commit476d779930c1b601d4c62ba42c119ab4a0e5416c
treee30c9df35cd7ec31d41563390a21b3c0bfde6678
parentfc42bc197e3a1a47c2991935cbfdf8e50628015d
contenteditable justify commands applied to next paragraph as well
https://bugs.webkit.org/show_bug.cgi?id=90611

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-01
Reviewed by Ryosuke Niwa.

Source/WebCore:

When the selection extends from first paragraph to start of next
paragraph then Justify command is applied to both the paragraph,
Instead it should be applied only to first paragraph.

Co-author: Sudarshan C P <sudarshan.cp@samsung.com>

Test: editing/execCommand/contenteditable-justify-next-paragraph.html

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle):
Adjusted visibleEnd to previous position.

LayoutTests:

Added a test for selecting one paragraph and the beginning of another
paragraph to ensure that only the first fully-selected paragraph should
be justified when justifying the selection.

* editing/execCommand/align-in-span-expected.txt: Updated.
* editing/execCommand/contenteditable-justify-next-paragraph-expected.txt: Added.
* editing/execCommand/contenteditable-justify-next-paragraph.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/align-in-span-expected.txt
LayoutTests/editing/execCommand/contenteditable-justify-next-paragraph-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/contenteditable-justify-next-paragraph.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/ApplyStyleCommand.cpp