Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d5c5146455d1db1c98ab29d2c92de7c9fa1600cc
https://github.com/WebKit/WebKit/commit/d5c5146455d1db1c98ab29d2c92de7c9fa1600cc
Author: Ryosuke Niwa <[email protected]>
Date: 2022-12-09 (Fri, 09 Dec 2022)
Changed paths:
A
LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-deleteData-expected.txt
A LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-deleteData.html
A
LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-insertData-expected.txt
A LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-insertData.html
A
LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-replaceData-expected.txt
A
LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-replaceData.html
A LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations.js
A LayoutTests/http/wpt/dom-ranges-live-range/common.js
M Source/WebCore/editing/FrameSelection.cpp
M Source/WebCore/editing/VisibleSelection.cpp
Log Message:
-----------
[Live Range Selection] Range-mutations-deleteData.html,
Range-mutations-insertData.html,
and Range-mutations-replaceData.html fail
https://bugs.webkit.org/show_bug.cgi?id=249012
Reviewed by Darin Adler and Wenson Hsieh.
The bug was caused by FrameSelection::textWasReplaced updating the associated
range using
base & extent instead of focus & anchor. Fixed the bug by using focus & anchor
in these cases.
Also fixed a bug in VisibleSelection::range() that it always uses the parent
anchored equivalent
even when the selection ends are set by author scripts. Fixed it by using
m_focus & m_anchor
directly when the live range selection is enabled.
*
LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-deleteData-expected.txt:
Added.
* LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-deleteData.html:
Added.
*
LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-insertData-expected.txt:
Added.
* LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-insertData.html:
Added.
*
LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-replaceData-expected.txt:
Added.
* LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations-replaceData.html:
Added.
* LayoutTests/http/wpt/dom-ranges-live-range/Range-mutations.js: Added.
* LayoutTests/http/wpt/dom-ranges-live-range/common.js: Added.
* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::FrameSelection::textWasReplaced):
* Source/WebCore/editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::range const):
Canonical link: https://commits.webkit.org/257670@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes