REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Jun 2015 00:57:30 +0000 (00:57 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Jun 2015 00:57:30 +0000 (00:57 +0000)
commit14de5195cf6971796c06e16dd330474bd4fd0af6
tree5d7383707a5724d8565f50e93c49f3d15787838f
parente7e16d51fe9e682b913e1e53c88263e6e98b235c
REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight for text
https://bugs.webkit.org/show_bug.cgi?id=145830

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by setSelection not updating RenderView when there is a style recalc scheduled
that doesn't trigger a layout. Fixed the bug by explicitly updating the selection in
Document::recalcStyle in that case.

Test: editing/selection/update-selection-by-style-change.html

* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::updateAppearanceAfterLayout): Renamed from didLayout.
* editing/FrameSelection.h:
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):

LayoutTests:

Added a regression test.

* editing/selection/update-selection-by-style-change-expected.html: Added.
* editing/selection/update-selection-by-style-change.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/selection/update-selection-by-style-change-expected.html [new file with mode: 0644]
LayoutTests/editing/selection/update-selection-by-style-change.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/FrameSelection.h
Source/WebCore/page/FrameView.cpp