New issue
Advanced search Search tips

Issue 842937 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 836897



Sign in to add a comment

[BlinkGenPropertyTrees SPv2] Composited animations should not be called when in printing mode

Project Member Reported by pdr@chromium.org, May 14 2018

Issue description

Many PrintContextTest tests fail with BlinkGeneratedPropertyTrees force-enabled:
    PrintContextTest.EmptyLinkedTarget (../../third_party/blink/renderer/core/page/print_context_test.cc:280)
    PrintContextTest.LinkTarget (../../third_party/blink/renderer/core/page/print_context_test.cc:151)
    PrintContextTest.LinkTargetBoundingBox (../../third_party/blink/renderer/core/page/print_context_test.cc:296)
    PrintContextTest.LinkTargetContainingABlock (../../third_party/blink/renderer/core/page/print_context_test.cc:188)
    PrintContextTest.LinkTargetSvg (../../third_party/blink/renderer/core/page/print_context_test.cc:233)
    PrintContextTest.LinkTargetUnderAnonymousBlockBeforeBlock (../../third_party/blink/renderer/core/page/print_context_test.cc:168)
    PrintContextTest.LinkTargetUnderInInlines (../../third_party/blink/renderer/core/page/print_context_test.cc:204)
    PrintContextTest.LinkTargetUnderRelativelyPositionedInline (../../third_party/blink/renderer/core/page/print_context_test.cc:219)
    PrintContextTest.LinkedTarget (../../third_party/blink/renderer/core/page/print_context_test.cc:255)

[154878:154878:0514/163120.854774:6671934651592:FATAL:document_animations.cc(74)] Check failed: document.Lifecycle().GetState() >= required_lifecycle_state. 
#0 0x7f93a225a99d base::debug::StackTrace::StackTrace()
#1 0x7f93a1f844bc base::debug::StackTrace::StackTrace()
#2 0x7f93a1ff5faa logging::LogMessage::~LogMessage()
#3 0x7f9392ab3ec6 blink::DocumentAnimations::UpdateAnimations()
#4 0x7f939334fbef blink::LocalFrameView::UpdateLifecyclePhasesInternal()
#5 0x7f939334eee2 blink::LocalFrameView::UpdateAllLifecyclePhases()
#6 0x00000288823f blink::PrintContextTest::PrintSinglePage()

 

Comment 1 by bokan@chromium.org, May 17 2018

Cc: bokan@chromium.org
pdr@, any reason this is under Blink>Scroll? Did you mean to set Blink>Animation (Since it's from UpdateAnimations())?

Comment 2 by pdr@chromium.org, May 17 2018

Components: -Blink>Scroll Blink>Animation
No reason, animation sounds good to me.

Comment 3 by flackr@chromium.org, May 18 2018

Labels: -Pri-3 Pri-2
Owner: smcgruer@chromium.org
Status: Assigned (was: Untriaged)

Comment 4 by flackr@chromium.org, May 18 2018

Labels: Hotlist-Experimental
Cc: flackr@chromium.org smcgruer@chromium.org
Components: Blink>Paint
Owner: pdr@chromium.org
\i. DocumentAnimations::UpdateAnimations has a DCHECK at the start that the current lifecycle state is at least the one passed in by the caller.
ii. LocalFrameView::UpdateLifecyclePhasesInternal for BlinkGenPropertyTrees calls the update here: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/frame/local_frame_view.cc?type=cs&sq=package:chromium&g=0&l=3308 with kPaintClean as the required state.

iii. However for this test, the current lifecycle is actually kPrePaintClean before the call:

[249813:249813:0518/133313.023891:2175096848784:INFO:local_frame_view.cc(3315)] Before DocumentAnimations::UpdateAnimations call, state is 15

pdr@ - what is the expected lifecycle at that point in UpdateLifecyclePhasesInternal for BlinkGenPropertyTrees? If kPrePaintClean is a valid state, we need to determine if that's ok for animations (what might be missing, etc), and perhaps move the UpdateAnimations call to when things are definitely safe.
This is because printing skips paint at this line:

https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/frame/local_frame_view.cc?type=cs&sq=package:chromium&g=0&l=3298

The same conditional should be added to the animations code below.
Cc: pdr@chromium.org
Owner: smcgruer@chromium.org
Status: smcg (was: Assigned)
Ack, I can fix that.
Status: Started (was: smcg)
Summary: [BlinkGenPropertyTrees SPv2] Composited animations should not be called when in printing mode (was: Check failed: document.Lifecycle().GetState() >= required_lifecycle_state)
Project Member

Comment 10 by bugdroid1@chromium.org, May 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c56f92254ed07045e6a0175bde6efe9dfe8635a6

commit c56f92254ed07045e6a0175bde6efe9dfe8635a6
Author: Stephen McGruer <smcgruer@chromium.org>
Date: Tue May 22 22:27:45 2018

Don't call DocumentAnimations::UpdateAnimations when in print mode

When in print mode, we don't do 'normal' visual output; painting is done
explicitly to a special output canvas. As such, there is little point in
doing composited animation updates, as we will not be showing the result.

This also fixes a DCHECK in BlinkGenPropertyTrees/SPv2 mode, where paint
was skipped but DocumentAnimations::UpdateAnimations wasn't - this caused
UpdateAnimations to fail its DCHECK for the expected lifecycle state.

Bug:  842937 
Cq-Include-Trybots: luci.chromium.try:linux-blink-gen-property-trees;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If8a0e11bd25e931dd02434e18ec90a02c4e8f9e1
Reviewed-on: https://chromium-review.googlesource.com/1066405
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560815}
[modify] https://crrev.com/c56f92254ed07045e6a0175bde6efe9dfe8635a6/third_party/blink/renderer/core/frame/local_frame_view.cc
[modify] https://crrev.com/c56f92254ed07045e6a0175bde6efe9dfe8635a6/third_party/blink/renderer/core/page/print_context_test.cc
[modify] https://crrev.com/c56f92254ed07045e6a0175bde6efe9dfe8635a6/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.cc

Status: Fixed (was: Started)

Sign in to add a comment