|
|
DescriptionAudit the use of updateStyleAndLayoutIgnorePendingStylesheets in InputMethodController::setSelectionOffsets
BUG=590369
Committed: https://crrev.com/a6979e66d796e1dbee9b907dea5ef3b8e4b144c4
Cr-Commit-Position: refs/heads/master@{#417250}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Unfold and remove SelectionOffsetsScope #
Messages
Total messages: 27 (13 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: This issue passed the CQ dry run.
xiaochengh@chromium.org changed reviewers: + tkent@chromium.org, yosin@chromium.org
PTAL.
https://codereview.chromium.org/2316053002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2316053002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/editing/InputMethodController.cpp:262: frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); This is the first pattern which updates layout after calling mutator. Could you explain why do we do this? I think we should avoid this pattern. Caller of |confirmCompositionOrInsertText()| should update layout.
https://codereview.chromium.org/2316053002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): https://codereview.chromium.org/2316053002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/editing/InputMethodController.cpp:262: frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); On 2016/09/08 at 04:04:41, Yosi_UTC9 wrote: > This is the first pattern which updates layout after calling mutator. > Could you explain why do we do this? > I think we should avoid this pattern. > Caller of |confirmCompositionOrInsertText()| should update layout. It is in fact the dtor of the SelectionOffsetsScope that requires clean layout. Is there anything we can do in this case?
On 2016/09/08 at 06:39:10, xiaochengh wrote: > https://codereview.chromium.org/2316053002/diff/1/third_party/WebKit/Source/c... > File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): > > https://codereview.chromium.org/2316053002/diff/1/third_party/WebKit/Source/c... > third_party/WebKit/Source/core/editing/InputMethodController.cpp:262: frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); > On 2016/09/08 at 04:04:41, Yosi_UTC9 wrote: > > This is the first pattern which updates layout after calling mutator. > > Could you explain why do we do this? > > I think we should avoid this pattern. > > Caller of |confirmCompositionOrInsertText()| should update layout. > > It is in fact the dtor of the SelectionOffsetsScope that requires clean layout. Is there anything we can do in this case? Why not calling in dtor of SelectionOffsetsScope, just before calling :setSelectionOffsets()?
On 2016/09/08 at 06:49:39, yosin wrote: > On 2016/09/08 at 06:39:10, xiaochengh wrote: > > https://codereview.chromium.org/2316053002/diff/1/third_party/WebKit/Source/c... > > File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): > > > > https://codereview.chromium.org/2316053002/diff/1/third_party/WebKit/Source/c... > > third_party/WebKit/Source/core/editing/InputMethodController.cpp:262: frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); > > On 2016/09/08 at 04:04:41, Yosi_UTC9 wrote: > > > This is the first pattern which updates layout after calling mutator. > > > Could you explain why do we do this? > > > I think we should avoid this pattern. > > > Caller of |confirmCompositionOrInsertText()| should update layout. > > > > It is in fact the dtor of the SelectionOffsetsScope that requires clean layout. Is there anything we can do in this case? > > Why not calling in dtor of SelectionOffsetsScope, just before calling :setSelectionOffsets()? Do you mean we just leave it in the dtor and do not try to further hoist it for now due to the bad pattern?
On 2016/09/08 at 06:58:19, xiaochengh wrote: > On 2016/09/08 at 06:49:39, yosin wrote: > > On 2016/09/08 at 06:39:10, xiaochengh wrote: > > > https://codereview.chromium.org/2316053002/diff/1/third_party/WebKit/Source/c... > > > File third_party/WebKit/Source/core/editing/InputMethodController.cpp (right): > > > > > > https://codereview.chromium.org/2316053002/diff/1/third_party/WebKit/Source/c... > > > third_party/WebKit/Source/core/editing/InputMethodController.cpp:262: frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); > > > On 2016/09/08 at 04:04:41, Yosi_UTC9 wrote: > > > > This is the first pattern which updates layout after calling mutator. > > > > Could you explain why do we do this? > > > > I think we should avoid this pattern. > > > > Caller of |confirmCompositionOrInsertText()| should update layout. > > > > > > It is in fact the dtor of the SelectionOffsetsScope that requires clean layout. Is there anything we can do in this case? > > > > Why not calling in dtor of SelectionOffsetsScope, just before calling :setSelectionOffsets()? > > Do you mean we just leave it in the dtor and do not try to further hoist it for now due to the bad pattern? How about get rid of SelectionOffsetsScope? It seems it is used only one place now. We don't need to have it anymore. (^_^)
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...
Updated with the scope unfolded and removed. PTAL.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm Excellent! (^_^)b
The CQ bit was checked by xiaochengh@chromium.org
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
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
lgtm
The CQ bit was checked by xiaochengh@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in InputMethodController::setSelectionOffsets BUG=590369 ========== to ========== Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in InputMethodController::setSelectionOffsets BUG=590369 Committed: https://crrev.com/a6979e66d796e1dbee9b907dea5ef3b8e4b144c4 Cr-Commit-Position: refs/heads/master@{#417250} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/a6979e66d796e1dbee9b907dea5ef3b8e4b144c4 Cr-Commit-Position: refs/heads/master@{#417250} |