|
|
DescriptionMake WebViewImpl::textInputInfo update layout before working on ranges.
EphemeralRange is supposed to operate on the same version of the tree
it was created. Unfortunately, the updateStyleAndLayout call in
plainText was causing a DOM mutation in some cases, thus
invalidating the range. Let's not do that.
BUG=639728
R=esprehn
Committed: https://crrev.com/f202a1b8dc8660efa8b173efcaab00675b922daa
Cr-Commit-Position: refs/heads/master@{#414826}
Patch Set 1 #Patch Set 2 : First stab at the unit test. #Patch Set 3 : Actually working test added. #
Total comments: 3
Patch Set 4 : Comments addressed. #
Total comments: 1
Messages
Total messages: 33 (20 generated)
The CQ bit was checked by dglazkov@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...
PTAL.
Can haz test?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/08/23 at 20:47:28, esprehn wrote: > Can haz test? Let me think about that.
First stab at the unit test.
The CQ bit was checked by dglazkov@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_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
On 2016/08/24 at 05:02:23, dglazkov wrote: > First stab at the unit test. lgtm to me, but everything is red.
Actually working test added.
The CQ bit was checked by dglazkov@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...
https://codereview.chromium.org/2272793002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/web/tests/WebViewTest.cpp (right): https://codereview.chromium.org/2272793002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/web/tests/WebViewTest.cpp:738: WebViewImpl* webViewImpl = m_webViewHelper.initialize(true, 0, &client); I suspect this would be a pretty simple SimTest without all of this setup https://codereview.chromium.org/2272793002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/web/tests/WebViewTest.cpp:748: "<svg height=\"100%\" version=\"1.1\" viewBox=\"0 0 14 14\" width=\"100%\">" if you use single quotes you can avoid the escapes all over https://codereview.chromium.org/2272793002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/web/tests/WebViewTest.cpp:757: mainFrameLocal->document()->body()->querySelector("path", IGNORE_EXCEPTION)->setIdAttribute("foo"); don't ignore the exception, ASSERT_NO_EXCEPTION, which is the default, is what you want. Also: webViewImpl->mainFrameImpl()->frame()->document() does what you want here, no need to touch page()
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Comments addressed.
The CQ bit was checked by dglazkov@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 dglazkov@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from esprehn@chromium.org Link to the patchset: https://codereview.chromium.org/2272793002/#ps60001 (title: "Comments addressed.")
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 #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Make WebViewImpl::textInputInfo update layout before working on ranges. EphemeralRange is supposed to operate on the same version of the tree it was created. Unfortunately, the updateStyleAndLayout call in plainText was causing a DOM mutation in some cases, thus invalidating the range. Let's not do that. BUG=639728 R=esprehn ========== to ========== Make WebViewImpl::textInputInfo update layout before working on ranges. EphemeralRange is supposed to operate on the same version of the tree it was created. Unfortunately, the updateStyleAndLayout call in plainText was causing a DOM mutation in some cases, thus invalidating the range. Let's not do that. BUG=639728 R=esprehn Committed: https://crrev.com/f202a1b8dc8660efa8b173efcaab00675b922daa Cr-Commit-Position: refs/heads/master@{#414826} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/f202a1b8dc8660efa8b173efcaab00675b922daa Cr-Commit-Position: refs/heads/master@{#414826}
Message was sent while issue was closed.
xiaochengh@chromium.org changed reviewers: + xiaochengh@chromium.org
Message was sent while issue was closed.
https://codereview.chromium.org/2272793002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/2272793002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/web/WebViewImpl.cpp:2445: DocumentLifecycle::DisallowTransitionScope(focused->document()->lifecycle()); Pass-by: I think we need to have a named scope here, like what crrev.com/2297503002 does. Otherwise the scope just gets destructed immediately.
Message was sent while issue was closed.
On 2016/08/30 at 15:18:24, xiaochengh wrote: > https://codereview.chromium.org/2272793002/diff/60001/third_party/WebKit/Sour... > File third_party/WebKit/Source/web/WebViewImpl.cpp (right): > > https://codereview.chromium.org/2272793002/diff/60001/third_party/WebKit/Sour... > third_party/WebKit/Source/web/WebViewImpl.cpp:2445: DocumentLifecycle::DisallowTransitionScope(focused->document()->lifecycle()); > Pass-by: I think we need to have a named scope here, like what crrev.com/2297503002 does. Otherwise the scope just gets destructed immediately. Makes sense! Sorry about that. Will add. |