[webkit-changes] [WebKit/WebKit] 448568: Avoid calling FrameSelection::updateAppearanceAfte...
Ryosuke Niwa
noreply at github.com
Thu Apr 6 17:31:56 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 44856812df2915e4c0236ed677fdeb485b50bf5b
https://github.com/WebKit/WebKit/commit/44856812df2915e4c0236ed677fdeb485b50bf5b
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2023-04-06 (Thu, 06 Apr 2023)
Changed paths:
M LayoutTests/accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt
M LayoutTests/accessibility/mac/selection-boundary-userinfo.html
M LayoutTests/accessibility/mac/selection-change-userinfo.html
M LayoutTests/accessibility/mac/selection-element-tabbing-to-link.html
M LayoutTests/accessibility/mac/selection-value-changes-for-aria-textbox-expected.txt
M LayoutTests/editing/input/caret-at-the-edge-of-input.html
M LayoutTests/fast/forms/autofocus-opera-003.html
M LayoutTests/fast/forms/input-text-scroll-left-on-blur.html
M LayoutTests/fast/forms/password-scrolled-after-caps-lock-toggled.html
M LayoutTests/fast/forms/scroll-into-view-and-show-validation-message.html
M LayoutTests/fast/repaint/4776765.html
M LayoutTests/fast/repaint/selection-gap-absolute-child.html
M LayoutTests/fast/repaint/selection-gap-flipped-absolute-child.html
M LayoutTests/fast/repaint/selection-gap-transformed-absolute-child.html
M LayoutTests/fast/repaint/selection-gap-transformed-fixed-child.html
M LayoutTests/fast/repaint/selection-ruby-rl.html
M LayoutTests/fast/repaint/text-selection-overflow-hidden.html
M LayoutTests/fast/text/incorrect-deselection-across-multiple-elements.html
M LayoutTests/platform/mac-wk1/fast/repaint/4776765-expected.txt
M Source/WebCore/dom/Document.cpp
M Source/WebCore/editing/Editor.cpp
M Source/WebCore/editing/FrameSelection.cpp
M Source/WebCore/editing/FrameSelection.h
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebCore/page/Page.cpp
Log Message:
-----------
Avoid calling FrameSelection::updateAppearanceAfterLayout() when performing post-layout tasks
https://bugs.webkit.org/show_bug.cgi?id=247041
Reviewed by Wenson Hsieh.
Removed the calls to scheduleAppearanceUpdateAfterStyleChange in Document::resolveStyle
and updateAppearanceAfterLayout in LocalFrameView::performPostLayoutTasks.
Now every appearance update happens with the rendering update in Page::doAfterUpdateRendering.
Fixed & rebaselined the various tests to account for this delayed update of selection & focus.
* LayoutTests/accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt:
* LayoutTests/accessibility/mac/selection-boundary-userinfo.html:
* LayoutTests/accessibility/mac/selection-change-userinfo.html:
* LayoutTests/accessibility/mac/selection-element-tabbing-to-link.html:
* LayoutTests/accessibility/mac/selection-value-changes-for-aria-textbox-expected.txt:
* LayoutTests/editing/input/caret-at-the-edge-of-input.html:
* LayoutTests/fast/forms/autofocus-opera-003.html:
* LayoutTests/fast/forms/input-text-scroll-left-on-blur.html:
* LayoutTests/fast/forms/password-scrolled-after-caps-lock-toggled.html:
* LayoutTests/fast/forms/scroll-into-view-and-show-validation-message.html:
* LayoutTests/fast/repaint/4776765.html:
* LayoutTests/fast/repaint/selection-gap-absolute-child.html:
* LayoutTests/fast/repaint/selection-gap-flipped-absolute-child.html:
* LayoutTests/fast/repaint/selection-gap-transformed-absolute-child.html:
* LayoutTests/fast/repaint/selection-gap-transformed-fixed-child.html:
* LayoutTests/fast/repaint/selection-ruby-rl.html:
* LayoutTests/fast/repaint/text-selection-overflow-hidden.html:
* LayoutTests/fast/text/incorrect-deselection-across-multiple-elements.html:
* LayoutTests/platform/mac-wk1/fast/repaint/4776765-expected.txt:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::resolveStyle):
* Source/WebCore/editing/Editor.cpp:
(WebCore::Editor::revealSelectionIfNeededAfterLoadingImageForElement): Invalidate the caret rect
since the act of loading an image may have shifted the caret. Without this change,
TestWebKitAPI.PasteImage.RevealSelectionAfterPastingImage will fail.
* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::willBeRemovedFromFrame):
(WebCore::FrameSelection::updateAppearanceAfterUpdatingRendering): Renamed from
updateAppearanceAfterLayoutOrStyleChange.
(WebCore::FrameSelection::updateAppearanceAfterLayout): Deleted.
(WebCore::FrameSelection::scheduleAppearanceUpdateAfterStyleChange): Deleted.
(WebCore::FrameSelection::appearanceUpdateTimerFired): Deleted.
* Source/WebCore/editing/FrameSelection.h:
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::performPostLayoutTasks):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::doAfterUpdateRendering):
Canonical link: https://commits.webkit.org/262691@main
More information about the webkit-changes
mailing list