Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Issue 2694823002: Revert of Make FrameSelection to hold non-canonicalized positions (Closed)

Created:
3 years, 10 months ago by Garrett Casto
Modified:
3 years, 10 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, darin-cc_chromium.org, dcheng, dglazkov+blink, eae+blinkwatch, jam, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, sof, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Make FrameSelection to hold non-canonicalized positions (patchset #9 id:180001 of https://codereview.chromium.org/2680943004/ ) Reason for revert: This patch looks like it is causing failures in editing/execCommand/move-up-down-should-skip-hidden-elements.html on Windows 7 (https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Win7%20%28dbg%29). Original issue's description: > Make FrameSelection to hold non-canonicalized DOM positions > > This patch makes |FrameSelection| to hold non-canonicalized DOM positions in > |SelectionEditor| to align Selection API specification[1] for improving > interoperatbility[2]. > > Before this patch we holds selection as |VisibleSelection| as canonicalized > DOM positions. This behavior is not align with Selection API specification[1] > then the most complained issue of Blink from editing-tf@w3c. > > The heart of this patch is holding selection as |SelectionInDOMTree| and > compute |VisibleSelection| on-demand with cache of computed |VisibleSelection|. > > |VisibleSelection| cache is invalidate each DOM tree change and style change > since canonicalization referes CSS style properties, e.g display, visibility, > -webkit-user-modify, etc, and layout dimension. > > |SelectionEditor| utilizes |SynchronousMutationObserver| to relocate > |m_selectionInDOMTree| instead of |FrameSelection|. Before this patch > |FrameSelection| relocates |VisibleSelection| with dirty layout tree then > sets |FrameSelection::setSelection()|. To void cyclic reference between > |FrameSelection| and |SelectionEditor|, we could not move relocation part to > |SelectionEditor|. > > This patch also updates > |FrameSelection::updatePostionAfterAdoptingTextNodesMerged()| to handle > |PositonAnchorType|. > > # Highlight of changes > ## FrameCaret > - Compute caret position after "layout clean" rather than each selection change > to align rendering pipeline. > > ## CharacterData > Changes timing of notifying character data update for ease of relocation of > positions. > > ## FrameSelection > - Move |m_isHandleVisible| to |SelectionInDOMTree| as follow-up of [5]. > - Move selection relocation to |SelectionEditor|; following patch will move > implementations to "SelectionEditor.cpp" > > ## SelecitonEdtior > - Make it to hold |SelectionInDOMTree| with relocation at DOM mutation. > - Caching |VisibleSelection| > > # Brief description of test expectation changes: > ## ImeTest.java: > This patch gets rid of redundant selection change event from > - |testImePaste|, > - |testContentEditableEvents_DeleteSurroundingText| > - |testInputTextEvents_DeleteSurroundingText| > > ## LayoutTests > Before this patch, Blink uses |VisibleSelection| when it sets even if style and > layout changed. This is wrong and unexpected behavior since positions in > |VisibleSelection| can no longer be canonicalized positions. This patch changes > this behavior to return "sane" canonicalized positions with clean style and > layout tree. > > This patch is the result of many attempts. Previous changes can be found in > [3][4]. > > [1] https://www.w3.org/TR/selection-api/ W3C Selection API > [2] https://goo.gl/9v1zOK Improving Interoperatbility of Selection > [3] http://crrev.com/1958093002 > [4] http://crrev.com/2637013002 > [5] http://crrev.com/2651803007 Added isHandleVisible to |SelectionTemplate| > > BUG=139552, 603684, 605499, 606499, 625533, 644648, 679991 > TEST=See changes in this patch > CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 > > Review-Url: https://codereview.chromium.org/2680943004 > Cr-Commit-Position: refs/heads/master@{#449928} > Committed: https://chromium.googlesource.com/chromium/src/+/157413286770a7ac5a24c446a30c08f749738276 TBR=tkent@chromium.org,changwan@chromium.org,xiaochengh@chromium.org,yoichio@chromium.org,yosin@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=139552, 603684, 605499, 606499, 625533, 644648, 679991 Review-Url: https://codereview.chromium.org/2694823002 Cr-Commit-Position: refs/heads/master@{#450018} Committed: https://chromium.googlesource.com/chromium/src/+/47591962f15392d4af5eb1f69f3b79a8e2990947

Patch Set 1 #

Patch Set 2 : Merge branch 'master' of https://chromium.googlesource.com/chromium/src into patch_revert #

Unified diffs Side-by-side diffs Delta from patch set Stats (+481 lines, -491 lines) Patch
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 1 3 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/crash-indenting-list-item.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-list.html View 1 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/format-block-multiple-paragraphs-in-pre.html View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/execCommand/remove_format_and_extract_contents.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/character-data-mutation.html View 1 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/document-mutation.html View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/select_all/select_all_details_crash.html View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/select_all/select_all_iframe_crash.html View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/selection_remove_children.html View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html View 1 1 chunk +3 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/undo/redo-selection-modify-crash.html View 1 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/delete-contents.html View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/shadow/selection-in-nested-shadow.html View 1 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dynamic/move-node-with-selection.html View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/drag_and_drop_into_removed_on_focus.html View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/images/element-gcd-while-generating-alt-content-expected.txt View 1 1 chunk +9 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/css/first-letter-rtc-crash-expected.txt View 1 chunk +2 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/css/first-letter-rtc-crash-expected.txt View 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/svg/foreignObject/viewport-foreignobject-crash-expected.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/FrameCaret.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameCaret.cpp View 1 4 chunks +16 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.h View 1 10 chunks +31 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.cpp View 1 19 chunks +279 lines, -237 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp View 1 1 chunk +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionEditor.h View 1 5 chunks +23 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionEditor.cpp View 1 6 chunks +65 lines, -130 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleSelection.cpp View 1 2 chunks +1 line, -5 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/page/FocusController.cpp View 1 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
Garrett Casto
Created Revert of Make FrameSelection to hold non-canonicalized positions
3 years, 10 months ago (2017-02-13 17:32:37 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2694823002/1
3 years, 10 months ago (2017-02-13 17:33:01 UTC) #3
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/LayoutTests/TestExpectations: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-13 17:38:51 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2694823002/290001
3 years, 10 months ago (2017-02-13 18:23:31 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:290001) as https://chromium.googlesource.com/chromium/src/+/47591962f15392d4af5eb1f69f3b79a8e2990947
3 years, 10 months ago (2017-02-13 18:26:45 UTC) #10
tkent
3 years, 10 months ago (2017-02-13 22:56:25 UTC) #11
Message was sent while issue was closed.
On 2017/02/13 at 18:26:45, commit-bot wrote:
> Committed patchset #2 (id:290001) as
https://chromium.googlesource.com/chromium/src/+/47591962f15392d4af5eb1f69f3b...

lgtm

Probably,
[ Debug ] editing/execCommand/move-up-down-should-skip-hidden-elements.html [
Slow ]

was enough. On Mac, the test took 4-5 sec before the culprit CL, and it took
12-17 sec after the CL.
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=...

Powered by Google App Engine
This is Rietveld 408576698