⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 185398 in webkit


Ignore:
Timestamp:
Jun 9, 2015, 5:57:30 PM (11 years ago)
Author:
rniwa@webkit.org
Message:

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.
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r185395 r185398  
     12015-06-09  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight for text
     4        https://bugs.webkit.org/show_bug.cgi?id=145830
     5
     6        Reviewed by Darin Adler.
     7
     8        Added a regression test.
     9
     10        * editing/selection/update-selection-by-style-change-expected.html: Added.
     11        * editing/selection/update-selection-by-style-change.html: Added.
     12
    1132015-06-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r185397 r185398  
     12015-06-09  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight for text
     4        https://bugs.webkit.org/show_bug.cgi?id=145830
     5
     6        Reviewed by Darin Adler.
     7
     8        The bug was caused by setSelection not updating RenderView when there is a style recalc scheduled
     9        that doesn't trigger a layout. Fixed the bug by explicitly updating the selection in
     10        Document::recalcStyle in that case.
     11
     12        Test: editing/selection/update-selection-by-style-change.html
     13
     14        * dom/Document.cpp:
     15        (WebCore::Document::recalcStyle):
     16        * editing/FrameSelection.cpp:
     17        (WebCore::FrameSelection::updateAppearanceAfterLayout): Renamed from didLayout.
     18        * editing/FrameSelection.h:
     19        * page/FrameView.cpp:
     20        (WebCore::FrameView::performPostLayoutTasks):
     21
    1222015-06-09  Dean Jackson  <dino@apple.com>
    223
  • trunk/Source/WebCore/dom/Document.cpp

    r185118 r185398  
    18121812        frameView.viewportContentsChanged();
    18131813
     1814    if (!frameView.needsLayout())
     1815        frameView.frame().selection().updateAppearanceAfterLayout();
     1816
    18141817    // As a result of the style recalculation, the currently hovered element might have been
    18151818    // detached (for example, by setting display:none in the :hover style), schedule another mouseMove event
  • trunk/Source/WebCore/editing/FrameSelection.cpp

    r185020 r185398  
    22232223}
    22242224
    2225 void FrameSelection::didLayout()
     2225void FrameSelection::updateAppearanceAfterLayout()
    22262226{
    22272227    setCaretRectNeedsUpdate();
  • trunk/Source/WebCore/editing/FrameSelection.h

    r185020 r185398  
    152152    void prepareForDestruction();
    153153
    154     void didLayout();
     154    void updateAppearanceAfterLayout();
    155155    void setNeedsSelectionUpdate();
    156156
  • trunk/Source/WebCore/page/FrameView.cpp

    r185269 r185398  
    29842984    m_postLayoutTasksTimer.stop();
    29852985
    2986     frame().selection().didLayout();
     2986    frame().selection().updateAppearanceAfterLayout();
    29872987
    29882988    if (m_nestedLayoutCount <= 1 && frame().document()->documentElement())
Note: See TracChangeset for help on using the changeset viewer.