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

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

Created:
3 years, 10 months ago by tyoshino (SeeGerritForStatus)
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: See https://codereview.chromium.org/2680943004/#msg70 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-Original-Commit-Position: refs/heads/master@{#449928} > Committed: https://chromium.googlesource.com/chromium/src/+/157413286770a7ac5a24c446a30c08f749738276 > Review-Url: https://codereview.chromium.org/2680943004 > Cr-Commit-Position: refs/heads/master@{#450280} > Committed: https://chromium.googlesource.com/chromium/src/+/17c84b2b6519c821dc319e79f2a7a4508508e20f TBR=changwan@chromium.org,tkent@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/2691243002 Cr-Commit-Position: refs/heads/master@{#450291} Committed: https://chromium.googlesource.com/chromium/src/+/8f2a1baf12aa71d59d72e24583983b8a6b78340a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+519 lines, -531 lines) Patch
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 3 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 chunk +0 lines, -2 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 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 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/document-mutation.html View 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 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/select_all/select_all_iframe_crash.html View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/selection/selection_remove_children.html View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/style/justify-left-crash.html View 1 chunk +3 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/editing/undo/redo-selection-modify-crash.html View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/delete-contents.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/shadow/selection-in-nested-shadow.html View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dynamic/move-node-with-selection.html View 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 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/images/element-gcd-while-generating-alt-content-expected.txt View 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 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameCaret.cpp View 4 chunks +16 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.h View 10 chunks +31 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.cpp View 19 chunks +308 lines, -266 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp View 1 chunk +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionEditor.h View 5 chunks +23 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionEditor.cpp View 6 chunks +72 lines, -137 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleSelection.cpp View 2 chunks +1 line, -5 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/page/FocusController.cpp View 1 chunk +4 lines, -5 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
tyoshino (SeeGerritForStatus)
Created Revert of Make FrameSelection to hold non-canonicalized positions
3 years, 10 months ago (2017-02-14 08:16:15 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/2691243002/1
3 years, 10 months ago (2017-02-14 08:16:39 UTC) #3
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/8f2a1baf12aa71d59d72e24583983b8a6b78340a
3 years, 10 months ago (2017-02-14 08:19:26 UTC) #6
tkent
lgtm
3 years, 10 months ago (2017-02-14 23:07:47 UTC) #7
Dirk Pranke
3 years, 10 months ago (2017-02-14 23:46:06 UTC) #8
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in
https://codereview.chromium.org/2693983005/ by dpranke@chromium.org.

The reason for reverting is: testing the UI , ignore ....

Powered by Google App Engine
This is Rietveld 408576698