|
|
Chromium Code Reviews|
Created:
4 years, 1 month ago by Xiaocheng Modified:
4 years, 1 month ago Reviewers:
aelias_OOO_until_Jul13 CC:
blink-reviews, chromium-reviews, kinuko+watch Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUpdate layout in WebInputMethodController::finishComposingText
InputMethodController::finishComposingText requires clean layout, but
it may be called with dirty layout from
WebInputMethodController::finishComposingText. This patch fixes the issue
by adding a layout update call there.
BUG=663645
TEST=webkit_unit_tests --gtest_filter=All/WebViewTest.FinishComposingTextDoesNotCrash/*
Committed: https://crrev.com/c95cb437f7b36d47f6014f2e9e4358227a62cd24
Cr-Commit-Position: refs/heads/master@{#431837}
Patch Set 1 #Patch Set 2 : Add unit test #
Total comments: 1
Patch Set 3 : Change test name #
Messages
Total messages: 29 (19 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...
Description was changed from ========== Update layout in WebViewImpl::finishComposingText BUG= ========== to ========== Update layout in WebViewImpl::finishComposingText InputMethodController::finishComposingText requires clean layout, but it may be called with dirty layout from WebViewImpl::finishComposingText. This patch fixes the issue by adding a layout update call there. BUG=663645 ==========
xiaochengh@chromium.org changed reviewers: + aelias@chromium.org
PTAL.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Can you write a unit test for this? I'd suggest doing it as a C++ unit test (not layout test) since this might be timing dependent. Probably in InputMethodControllerTest (although WebFrameTest/WebViewTest is OK if that doesn't fit there) . You could load up some representative HTML and just perform the call sequence; you don't necessarily need any EXPECT statements since you just want to verify that no assertion is fired.
On 2016/11/10 at 19:31:48, aelias wrote: > Can you write a unit test for this? I'd suggest doing it as a C++ unit test (not layout test) since this might be timing dependent. Probably in InputMethodControllerTest (although WebFrameTest/WebViewTest is OK if that doesn't fit there) . You could load up some representative HTML and just perform the call sequence; you don't necessarily need any EXPECT statements since you just want to verify that no assertion is fired. Could you add DCHECK(!document.needsLayoutTreeUpdate()) at entry of InputMethodController::finishComposingText()? I think a test should be in WebFrameTest or WebViewTest since this is WebViewImpl.cpp issue rather than IMC; though DCHECK() is missing...
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...
Description was changed from ========== Update layout in WebViewImpl::finishComposingText InputMethodController::finishComposingText requires clean layout, but it may be called with dirty layout from WebViewImpl::finishComposingText. This patch fixes the issue by adding a layout update call there. BUG=663645 ========== to ========== Update layout in WebViewImpl::finishComposingText InputMethodController::finishComposingText requires clean layout, but it may be called with dirty layout from WebViewImpl::finishComposingText. This patch fixes the issue by adding a layout update call there. BUG=663645 TEST=webkit_unit_tests --gtest_filter=All/WebViewTest.FinishComposingTextDoesNotCrash/* ==========
Description was changed from ========== Update layout in WebViewImpl::finishComposingText InputMethodController::finishComposingText requires clean layout, but it may be called with dirty layout from WebViewImpl::finishComposingText. This patch fixes the issue by adding a layout update call there. BUG=663645 TEST=webkit_unit_tests --gtest_filter=All/WebViewTest.FinishComposingTextDoesNotCrash/* ========== to ========== Update layout in WebInputMethodController::finishComposingText InputMethodController::finishComposingText requires clean layout, but it may be called with dirty layout from WebInputMethodController::finishComposingText. This patch fixes the issue by adding a layout update call there. BUG=663645 TEST=webkit_unit_tests --gtest_filter=All/WebViewTest.FinishComposingTextDoesNotCrash/* ==========
Updated with a WebViewTest. PTAL. Note that the relevant web/ level functions were recently moved to WebInputMethodController by https://codereview.chromium.org/2333813002. We should add DCHECK(!frame()->document()->needsLayoutTreeUpdate()) to functions of InputMethodController in a separate patch.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Source/web lgtm
https://codereview.chromium.org/2491643004/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/web/tests/WebViewTest.cpp (right): https://codereview.chromium.org/2491643004/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/web/tests/WebViewTest.cpp:901: TEST_P(WebViewTest, FinishComposingTextDoesNotCrash) { There's never been a crash here, please rename the test to FinishComposingTextDoesNotAssert
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.
The CQ bit was checked by xiaochengh@chromium.org
Thanks for the review. Committing with the test name changed.
The patchset sent to the CQ was uploaded after l-g-t-m from aelias@chromium.org Link to the patchset: https://codereview.chromium.org/2491643004/#ps40001 (title: "Change test name")
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 #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Update layout in WebInputMethodController::finishComposingText InputMethodController::finishComposingText requires clean layout, but it may be called with dirty layout from WebInputMethodController::finishComposingText. This patch fixes the issue by adding a layout update call there. BUG=663645 TEST=webkit_unit_tests --gtest_filter=All/WebViewTest.FinishComposingTextDoesNotCrash/* ========== to ========== Update layout in WebInputMethodController::finishComposingText InputMethodController::finishComposingText requires clean layout, but it may be called with dirty layout from WebInputMethodController::finishComposingText. This patch fixes the issue by adding a layout update call there. BUG=663645 TEST=webkit_unit_tests --gtest_filter=All/WebViewTest.FinishComposingTextDoesNotCrash/* Committed: https://crrev.com/c95cb437f7b36d47f6014f2e9e4358227a62cd24 Cr-Commit-Position: refs/heads/master@{#431837} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/c95cb437f7b36d47f6014f2e9e4358227a62cd24 Cr-Commit-Position: refs/heads/master@{#431837} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
