|
|
Created:
5 years, 9 months ago by qiankun Modified:
5 years, 8 months ago CC:
blink-reviews, blink-reviews-rendering, Dominik Röttsches, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, zoltan1 Base URL:
https://chromium.googlesource.com/chromium/blink.git@master Target Ref:
refs/heads/master Project:
blink Visibility:
Public. |
DescriptionAdvance document lifecycle to CompositingClean prior to hit testing
This CL is motivated by https://codereview.chromium.org/976543002.
In that CL, we need to query CompositingState in collectFragments()
which is also called when doing hit testing.
BUG=None
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=193585
Patch Set 1 #Patch Set 2 : add assert and allow CompositingClean change to InPreLayout #
Total comments: 5
Patch Set 3 : move assert deeper #Patch Set 4 : rebase to ToT #Patch Set 5 : fix webkit_unit_tests #
Total comments: 1
Patch Set 6 : rebase #
Total comments: 2
Patch Set 7 : remove state change from CompositingClean to InPreLayout #Patch Set 8 : move compositor()->updateIfNeededRecursive down to layer->hitTest() #Messages
Total messages: 43 (14 generated)
qiankun.miao@intel.com changed reviewers: + chrishtr@chromium.org, leviw@chromium.org
I worked out an initial version for advancing document lifecycle to CompositingClean prior to hit testing. I am not sure about it. Could you give some advice?
On 2015/03/11 at 15:10:14, qiankun.miao wrote: > I worked out an initial version for advancing document lifecycle to CompositingClean prior to hit testing. I am not sure about it. Could you give some advice? You're on the right track! I'd add also like to see an assert that we don't enter hit testing code when the DocumentLifecycle isn't at least CompositingClean.
Updated the patch. PTAL.
https://codereview.chromium.org/999033002/diff/20001/Source/core/dom/Document... File Source/core/dom/DocumentLifecycle.cpp (right): https://codereview.chromium.org/999033002/diff/20001/Source/core/dom/Document... Source/core/dom/DocumentLifecycle.cpp:133: if (state == InPreLayout) Why this change? https://codereview.chromium.org/999033002/diff/20001/Source/core/layout/Layou... File Source/core/layout/LayoutView.cpp (right): https://codereview.chromium.org/999033002/diff/20001/Source/core/layout/Layou... Source/core/layout/LayoutView.cpp:102: ASSERT(document().lifecycle().state() >= DocumentLifecycle::CompositingClean); This assert should go somewhere deeper in Blink, like Layer::hitTestLayer
https://codereview.chromium.org/999033002/diff/20001/Source/core/dom/Document... File Source/core/dom/DocumentLifecycle.cpp (right): https://codereview.chromium.org/999033002/diff/20001/Source/core/dom/Document... Source/core/dom/DocumentLifecycle.cpp:133: if (state == InPreLayout) On 2015/03/12 20:09:32, leviw wrote: > Why this change? When running layout test, LayoutTreeAsText::writeLayers() will call layout() again after hit testing. If we don't allow changing state from CompositingClean to InPreLayout, layout test will crash. Attached crash stack for running fast/css/resize-corner-tracking.html: #0 0x0000008bd59e base::debug::StackTrace::StackTrace() #1 0x0000008bd0d3 base::debug::(anonymous namespace)::StackDumpSignalHandler() #2 0x7ffbe87e4210 <unknown> #3 0x00000283e7d4 blink::DocumentLifecycle::advanceTo() #4 0x000002ee3b4f blink::FrameView::performPreLayoutTasks() #5 0x000002ee4b39 blink::FrameView::layout() #6 0x0000033d9b89 blink::write() #7 0x0000033daf31 blink::write() #8 0x0000033da3f0 blink::LayoutTreeAsText::writeLayers() #9 0x0000033da52d blink::LayoutTreeAsText::writeLayers() #10 0x0000033da685 blink::LayoutTreeAsText::writeLayers() #11 0x0000033db300 blink::externalRepresentation() #12 0x0000033db220 blink::externalRepresentation() #13 0x000002212cff blink::WebLocalFrameImpl::layoutTreeAsText() #14 0x000000527d7c content::WebTestProxyBase::CaptureTree() #15 0x00000051be34 content::WebKitTestRunner::CaptureDump() #16 0x00000051bb1c content::WebKitTestRunner::TestFinished() #17 0x00000051c0ac content::WebKitTestRunner::TestFinished() #18 0x00000058fab4 content::TestRunner::WorkQueue::ProcessWorkSoon() #19 0x000000590e65 content::TestRunner::LocationChangeDone() #20 0x000000590dbe content::TestRunner::setTopLoadingFrame() https://codereview.chromium.org/999033002/diff/20001/Source/core/layout/Layou... File Source/core/layout/LayoutView.cpp (right): https://codereview.chromium.org/999033002/diff/20001/Source/core/layout/Layou... Source/core/layout/LayoutView.cpp:102: ASSERT(document().lifecycle().state() >= DocumentLifecycle::CompositingClean); On 2015/03/12 20:09:32, leviw wrote: > This assert should go somewhere deeper in Blink, like Layer::hitTestLayer Done.
Hi Levi, please take a look at it when you free. Thanks.
Can you link this to the other codereview in the description for context? LGTM.
On 2015/03/19 15:42:21, leviw wrote: > Can you link this to the other codereview in the description for context? > > LGTM. Done.
The CQ bit was checked by qiankun.miao@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/999033002/40001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/48314)
The CQ bit was checked by qiankun.miao@intel.com
The patchset sent to the CQ was uploaded after l-g-t-m from leviw@chromium.org Link to the patchset: https://codereview.chromium.org/999033002/#ps60001 (title: "rebase to ToT")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/999033002/60001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/48322)
https://codereview.chromium.org/999033002/diff/80001/Source/web/WebLocalFrame... File Source/web/WebLocalFrameImpl.cpp (right): https://codereview.chromium.org/999033002/diff/80001/Source/web/WebLocalFrame... Source/web/WebLocalFrameImpl.cpp:1305: frame()->document()->layoutView()->hitTest(request, result); Also advance to CompositingClean state here.
On 2015/03/20 07:50:22, qiankun wrote: > https://codereview.chromium.org/999033002/diff/80001/Source/web/WebLocalFrame... > File Source/web/WebLocalFrameImpl.cpp (right): > > https://codereview.chromium.org/999033002/diff/80001/Source/web/WebLocalFrame... > Source/web/WebLocalFrameImpl.cpp:1305: > frame()->document()->layoutView()->hitTest(request, result); > Also advance to CompositingClean state here. levi@, please help to review this change.
You'll need a stamp from Chris for Source/web (I don't own that subdir)
esprehn@chromium.org changed reviewers: + esprehn@chromium.org
Is there a bug for this? What about hit testing needs compositing state? The change description could have a lot more detail. :) https://codereview.chromium.org/999033002/diff/100001/Source/core/dom/Documen... File Source/core/dom/DocumentLifecycle.cpp (right): https://codereview.chromium.org/999033002/diff/100001/Source/core/dom/Documen... Source/core/dom/DocumentLifecycle.cpp:133: if (state == InPreLayout) If we're in pre layout tasks why would we advance directly to CompositingClean? This patch doesn't seem to explain the reason for this.
https://codereview.chromium.org/999033002/diff/20001/Source/core/dom/Document... File Source/core/dom/DocumentLifecycle.cpp (right): https://codereview.chromium.org/999033002/diff/20001/Source/core/dom/Document... Source/core/dom/DocumentLifecycle.cpp:133: if (state == InPreLayout) On 2015/03/13 at 03:23:10, qiankun wrote: > On 2015/03/12 20:09:32, leviw wrote: > > Why this change? > > When running layout test, LayoutTreeAsText::writeLayers() will call layout() again after hit testing. If we don't allow changing state from CompositingClean to InPreLayout, layout test will crash. Attached crash stack for running fast/css/resize-corner-tracking.html: > #0 0x0000008bd59e base::debug::StackTrace::StackTrace() > #1 0x0000008bd0d3 base::debug::(anonymous namespace)::StackDumpSignalHandler() > #2 0x7ffbe87e4210 <unknown> > #3 0x00000283e7d4 blink::DocumentLifecycle::advanceTo() > #4 0x000002ee3b4f blink::FrameView::performPreLayoutTasks() > #5 0x000002ee4b39 blink::FrameView::layout() > #6 0x0000033d9b89 blink::write() > #7 0x0000033daf31 blink::write() > #8 0x0000033da3f0 blink::LayoutTreeAsText::writeLayers() I think this is a bug in LayoutTreeAsText::writeLayers, it wants to do view->document()->updateLayout() instead.
On 2015/03/24 23:06:05, esprehn wrote: > https://codereview.chromium.org/999033002/diff/20001/Source/core/dom/Document... > File Source/core/dom/DocumentLifecycle.cpp (right): > > https://codereview.chromium.org/999033002/diff/20001/Source/core/dom/Document... > Source/core/dom/DocumentLifecycle.cpp:133: if (state == InPreLayout) > On 2015/03/13 at 03:23:10, qiankun wrote: > > On 2015/03/12 20:09:32, leviw wrote: > > > Why this change? > > > > When running layout test, LayoutTreeAsText::writeLayers() will call layout() > again after hit testing. If we don't allow changing state from CompositingClean > to InPreLayout, layout test will crash. Attached crash stack for running > fast/css/resize-corner-tracking.html: > > #0 0x0000008bd59e base::debug::StackTrace::StackTrace() > > #1 0x0000008bd0d3 base::debug::(anonymous namespace)::StackDumpSignalHandler() > > #2 0x7ffbe87e4210 <unknown> > > #3 0x00000283e7d4 blink::DocumentLifecycle::advanceTo() > > #4 0x000002ee3b4f blink::FrameView::performPreLayoutTasks() > > #5 0x000002ee4b39 blink::FrameView::layout() > > #6 0x0000033d9b89 blink::write() > > #7 0x0000033daf31 blink::write() > > #8 0x0000033da3f0 blink::LayoutTreeAsText::writeLayers() > > I think this is a bug in LayoutTreeAsText::writeLayers, it wants to do > view->document()->updateLayout() instead. I will take a look the code in LayoutTreeAsText::writeLayers.
I will add context for this CL in description. https://codereview.chromium.org/999033002/diff/100001/Source/core/dom/Documen... File Source/core/dom/DocumentLifecycle.cpp (right): https://codereview.chromium.org/999033002/diff/100001/Source/core/dom/Documen... Source/core/dom/DocumentLifecycle.cpp:133: if (state == InPreLayout) On 2015/03/24 23:01:03, esprehn wrote: > If we're in pre layout tasks why would we advance directly to CompositingClean? > This patch doesn't seem to explain the reason for this. It allows advancing document life cycle from CompositingClean to preLayout. I fixed the case calls layout() after hit testing. There is no bug for hit testing. This change is motivated by https://codereview.chromium.org/976543002. In order to query compositingState in collectFragments(), levi@ and chrishtr@ suggested that we should ensure that the document lifecycle is advanced to CompositingClean prior to hit testing.
Hi esprehn, I updated the patch which removes state change from CompositingClean to InPreLayout after https://codereview.chromium.org/1054423002/ landed. Could you take a look at the new CL. Thanks!
On 2015/04/07 10:02:26, qiankun wrote: > Hi esprehn, I updated the patch which removes state change from CompositingClean > to InPreLayout after https://codereview.chromium.org/1054423002/ landed. Could > you take a look at the new CL. Thanks! Ping esprehn@
lgtm
The CQ bit was checked by qiankun.miao@intel.com
The patchset sent to the CQ was uploaded after l-g-t-m from leviw@chromium.org Link to the patchset: https://codereview.chromium.org/999033002/#ps120001 (title: "remove state change from CompositingClean to InPreLayout")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/999033002/120001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/58642)
qiankun.miao@intel.com changed reviewers: + yunchao.he@intel.com
Move compositor()->updateIfNeededRecursive down to layer->hitTest() from LayoutView::hitTest(). With the change, all direct DeprecatedPaintLayer::hitTest() call can advance document lifecycle to CompositingClean prior to hit testing. leviw@, please review it again. Thanks.
qiankun.miao@intel.com changed reviewers: - yunchao.he@intel.com
On 2015/04/10 at 07:19:28, qiankun.miao wrote: > Move compositor()->updateIfNeededRecursive down to layer->hitTest() from LayoutView::hitTest(). With the change, all direct DeprecatedPaintLayer::hitTest() call can advance document lifecycle to CompositingClean prior to hit testing. > > leviw@, please review it again. Thanks. Looks like we were failing when called from Accessibility code before, is that right? LGTM.
On 2015/04/10 19:27:09, leviw wrote: > On 2015/04/10 at 07:19:28, qiankun.miao wrote: > > Move compositor()->updateIfNeededRecursive down to layer->hitTest() from > LayoutView::hitTest(). With the change, all direct > DeprecatedPaintLayer::hitTest() call can advance document lifecycle to > CompositingClean prior to hit testing. > > > > leviw@, please review it again. Thanks. > > Looks like we were failing when called from Accessibility code before, is that > right? > > LGTM. Yes. Layout tests failed on some Accessibility code.
The CQ bit was checked by qiankun.miao@intel.com
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/999033002/#ps140001 (title: "move compositor()->updateIfNeededRecursive down to layer->hitTest()")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/999033002/140001
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as https://src.chromium.org/viewvc/blink?view=rev&revision=193585 |