|
|
DescriptionPrune layout update calls from Editor::*appliedEditing
Editor used to update layout after applying commands for setting
frame selection. Now that setting frame selection no longer requires
clean layout, this patch removes these layout update calls.
BUG=590369
TEST=n/a; no behavior change
Review-Url: https://codereview.chromium.org/2729313002
Cr-Commit-Position: refs/heads/master@{#467890}
Committed: https://chromium.googlesource.com/chromium/src/+/63b1a036006ef1feadebfdcfd67159972deabdfa
Patch Set 1 #Patch Set 2 : Fri Mar 3 18:25:59 PST 2017 #Patch Set 3 : Prune layout update after applying commands #
Total comments: 4
Patch Set 4 : Rebase #Messages
Total messages: 53 (36 generated)
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
Description was changed from ========== Prune layout update from Editor::*appliedEditing BUG=590369 ========== to ========== WIP Prune layout update from Editor::*appliedEditing BUG=590369 ==========
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== WIP Prune layout update from Editor::*appliedEditing BUG=590369 ========== to ========== Prune layout update calls from Editor::*appliedEditing Editor used to update layout after applying commands for setting frame selection. Now that setting frame selection no longer requires clean layout, this patch removes these layout update calls. BUG=590369 TEST=n/a; no behavior change ==========
xiaochengh@chromium.org changed reviewers: + dmazzoni@chromium.org, yosin@chromium.org
xiaochengh@chromium.org changed required reviewers: + dmazzoni@chromium.org, yosin@chromium.org
PTAL. dmazzoni@: This patch passes a difference Position to Editor::respondToChangedContent(), which is then passed to AX. Could you help me check if such change is fine? Thanks!
xiaochengh@chromium.org changed reviewers: + tkent@chromium.org, yoichio@chromium.org
xiaochengh@chromium.org changed required reviewers: - yosin@chromium.org
+tkent, yoichio
https://codereview.chromium.org/2729313002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/2729313002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/Editor.cpp:887: const VisibleSelection& passedSelection, Could you use SelectionINDOMTree& passedSelection instead of VS?
On 2017/03/20 22:22:33, Xiaocheng wrote: > PTAL. > > dmazzoni@: This patch passes a difference Position to > Editor::respondToChangedContent(), which is then passed to AX. Could you help me > check if such change is fine? Thanks! lgtm Thanks for checking. Calling it on the selection base() instead of start() is fine, the AX code will still work.
Thanks for the reviews! https://codereview.chromium.org/2729313002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/2729313002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/Editor.cpp:887: const VisibleSelection& passedSelection, On 2017/03/21 at 06:41:57, yoichio wrote: > Could you use SelectionINDOMTree& passedSelection instead of VS? It doesn't seem to introduce any benefit, since EditCommand::endingSelection() is a VS. Anyway it's not important. I can change if you insist.
https://codereview.chromium.org/2729313002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/2729313002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/Editor.cpp:887: const VisibleSelection& passedSelection, Yes, no benefit from a view of semantics. However, we're going to reduce VS usage in code. Eventually EditCommand::endingSelection() will turn Selection.
https://codereview.chromium.org/2729313002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/2729313002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/Editor.cpp:887: const VisibleSelection& passedSelection, On 2017/03/22 at 01:48:57, yoichio wrote: > Yes, no benefit from a view of semantics. > However, we're going to reduce VS usage in code. > Eventually EditCommand::endingSelection() will turn Selection. Sorry, I just realized that we can't change it in this patch. VisibleSelection::asSelection() will hit DCHECK if the VS is ill-formed, which means we need to check validity of the VS before calling VS::asSelection(). This function does exactly the job.
Description was changed from ========== Prune layout update calls from Editor::*appliedEditing Editor used to update layout after applying commands for setting frame selection. Now that setting frame selection no longer requires clean layout, this patch removes these layout update calls. BUG=590369 TEST=n/a; no behavior change ========== to ========== BLOCKED Prune layout update calls from Editor::*appliedEditing Editor used to update layout after applying commands for setting frame selection. Now that setting frame selection no longer requires clean layout, this patch removes these layout update calls. BUG=590369 TEST=n/a; no behavior change ==========
Blocked by crbug.com/702756, which I don't have a good idea to fix right now...
On 2017/03/22 at 22:36:40, xiaochengh wrote: > Blocked by crbug.com/702756, which I don't have a good idea to fix right now... I think this patch isn't blocked by crbug.com/702756, which attempts to fix false assumption == call canonicalizaedPositionOf() with immediate child of shadow host. I propose to change shouldTraverseChild<EditingStrategy> == DOM version, to check shadow host, e.g. template <> bool shouldTraverseChildren<EditingStarteg>() { if (node is shadow host) return false; ... } As of intention of this function, inferred from its name, it is sane to checking shadow host. (and display:none). Since this patch is important, I would like to proceed.
On 2017/03/23 at 06:00:50, yosin wrote: > On 2017/03/22 at 22:36:40, xiaochengh wrote: > > Blocked by crbug.com/702756, which I don't have a good idea to fix right now... > > I think this patch isn't blocked by crbug.com/702756, which attempts to fix > false assumption == call canonicalizaedPositionOf() with immediate child of shadow host. > > I propose to change shouldTraverseChild<EditingStrategy> == DOM version, to check shadow host, e.g. > > template <> > bool shouldTraverseChildren<EditingStarteg>() { > if (node is shadow host) > return false; > ... > } > > As of intention of this function, inferred from its name, it is sane to checking shadow host. > (and display:none). > > Since this patch is important, I would like to proceed. The change to shouldTraverseChildren is reasonable, but it doesn't seem to fix the issue. The crash site is in mostBackwardCaretPosition, before using any PositionIterator.
On 2017/03/23 at 19:37:27, xiaochengh wrote: > On 2017/03/23 at 06:00:50, yosin wrote: > > On 2017/03/22 at 22:36:40, xiaochengh wrote: > > > Blocked by crbug.com/702756, which I don't have a good idea to fix right now... > > > > I think this patch isn't blocked by crbug.com/702756, which attempts to fix > > false assumption == call canonicalizaedPositionOf() with immediate child of shadow host. > > > > I propose to change shouldTraverseChild<EditingStrategy> == DOM version, to check shadow host, e.g. > > > > template <> > > bool shouldTraverseChildren<EditingStarteg>() { > > if (node is shadow host) > > return false; > > ... > > } > > > > As of intention of this function, inferred from its name, it is sane to checking shadow host. > > (and display:none). > > > > Since this patch is important, I would like to proceed. > > The change to shouldTraverseChildren is reasonable, but it doesn't seem to fix the issue. > > The crash site is in mostBackwardCaretPosition, before using any PositionIterator. Do you think once bug[1] is fixed, can we proceed this patch? It makes adjustPositionForBackwardIteration() to return nullptr for PositionInFlatTree::afterNode(node) where node is not in flat tree. [1] http://crbug.com/703052 PositonInFlatTree::toIffsetInAnchor() should handle the case computeContainerNode() == nullptr
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PS#3 failed with editing/undo/redo_correct_selection.html with crash in PositionInFlatTree::ctor(null, 1) PositionInFlatTree::afterAnchor(SELECT).toOffsetInAnchor() ... SelectionEditor::updateCachedVisibleSelectionIfNeeded() with following DOM Tree: BODY DIV (editable) (focused) B (editable) #text "012" OPTION #shadow-root * SELECT * #shadow-root * CONTENT afterAnchor The test move SELECT from DIV to OPTION, this makes SELECT element no longer participate in flat tree. So, we should change toPositionInFlatTree() to handle this case.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
On 2017/03/27 at 07:43:36, yosin_UTC9 wrote: > PS#3 failed with editing/undo/redo_correct_selection.html with crash in > PositionInFlatTree::ctor(null, 1) > PositionInFlatTree::afterAnchor(SELECT).toOffsetInAnchor() > ... > SelectionEditor::updateCachedVisibleSelectionIfNeeded() > > with following DOM Tree: > BODY > DIV (editable) (focused) > B (editable) > #text "012" > OPTION > #shadow-root > * SELECT > * #shadow-root > * CONTENT > afterAnchor > > The test move SELECT from DIV to OPTION, this makes SELECT element no longer > participate in flat tree. > > So, we should change toPositionInFlatTree() to handle this case. Please see patch[1], which makes we don't have PositionInFlatTree not in flat tree. [1] http://crrev.com/2772233002: Make toPositionInFlatTree() to return null for DOM position not in flat tree
Description was changed from ========== BLOCKED Prune layout update calls from Editor::*appliedEditing Editor used to update layout after applying commands for setting frame selection. Now that setting frame selection no longer requires clean layout, this patch removes these layout update calls. BUG=590369 TEST=n/a; no behavior change ========== to ========== Prune layout update calls from Editor::*appliedEditing Editor used to update layout after applying commands for setting frame selection. Now that setting frame selection no longer requires clean layout, this patch removes these layout update calls. BUG=590369 TEST=n/a; no behavior change ==========
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Now that the blocking issue is gone, PTAL.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by yosin@chromium.org
lgtm
The patchset sent to the CQ was uploaded after l-g-t-m from dmazzoni@chromium.org Link to the patchset: https://codereview.chromium.org/2729313002/#ps60001 (title: "Rebase")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1493352862662330, "parent_rev": "ea02813b6067f1ff6b52cb59f03abeed96676214", "commit_rev": "63b1a036006ef1feadebfdcfd67159972deabdfa"}
Message was sent while issue was closed.
Description was changed from ========== Prune layout update calls from Editor::*appliedEditing Editor used to update layout after applying commands for setting frame selection. Now that setting frame selection no longer requires clean layout, this patch removes these layout update calls. BUG=590369 TEST=n/a; no behavior change ========== to ========== Prune layout update calls from Editor::*appliedEditing Editor used to update layout after applying commands for setting frame selection. Now that setting frame selection no longer requires clean layout, this patch removes these layout update calls. BUG=590369 TEST=n/a; no behavior change Review-Url: https://codereview.chromium.org/2729313002 Cr-Commit-Position: refs/heads/master@{#467890} Committed: https://chromium.googlesource.com/chromium/src/+/63b1a036006ef1feadebfdcfd671... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/63b1a036006ef1feadebfdcfd671... |