New issue
Advanced search Search tips

Issue 836140 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 836126



Sign in to add a comment

Transitions don't work on pseudo elements whose ancestor changes display type

Project Member Reported by futhark@chromium.org, Apr 24 2018

Issue description

This is because we drop previous computed style for pseudo styles for reattachment and calculate the new on during layout tree building. See attached demo.

 
pseudotrans.html
352 bytes View Download
Summary: Transitions don't work on pseudo elements whose ancestor changes display type (was: Transition don't work on pseudo elements whose ancestor changes display type)
Labels: -Pri-3 Pri-2
Status: Started (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 29 2018

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

commit 90351b8f23ad3c9195d54e741747a85d95755987
Author: Rune Lillesveen <futhark@chromium.org>
Date: Fri Jun 29 22:08:22 2018

[Squad] Generate ::before/::after/::backdrop in style recalc.

We used to create these pseudo elements and their computed styles in
Element::AttachLayoutTree when building the layout tree. Now we create
or dispose these elements from style recalc, that is,
UpdatePseudoElement. To make pseudo elements live through a style recalc
with a layout tree re-attach we no longer clear the pseudo elements
during DetachLayoutTree for performing_reattach=true. We do however need
to clear the pseudo elements which do not get a layout object for the
re-attach. That is done in AttachLayoutTree for the originating element
when the originating element does not generate a layout box.

We stop using the pseudo style cache on ComputedStyle for PseudoElements
and instead return the ComputedStyle when creating the pseudo element
and store it as non-attached style which can later be retrieved when
attaching the layout object.

An effect of this change is that we can detect transitions on pseudo
elements when ancestors display types changes and causes re-attachment.
That is  issue 836140 .

::first-letter may still be generated during layout tree building, and
the ::first-letter layout structure may still be updated during style
recalc.

Bug:  836126 ,  836140 
Change-Id: Iafad705b7a7b988d4c1598e8a126ce0d79c5873d
Reviewed-on: https://chromium-review.googlesource.com/1112244
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571665}
[add] https://crrev.com/90351b8f23ad3c9195d54e741747a85d95755987/third_party/WebKit/LayoutTests/external/wpt/css/css-transitions/pseudo-elements-002.html
[modify] https://crrev.com/90351b8f23ad3c9195d54e741747a85d95755987/third_party/blink/renderer/core/css/resolver/style_resolver.cc
[modify] https://crrev.com/90351b8f23ad3c9195d54e741747a85d95755987/third_party/blink/renderer/core/css/resolver/style_resolver.h
[modify] https://crrev.com/90351b8f23ad3c9195d54e741747a85d95755987/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/90351b8f23ad3c9195d54e741747a85d95755987/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/90351b8f23ad3c9195d54e741747a85d95755987/third_party/blink/renderer/core/dom/layout_tree_builder.cc
[modify] https://crrev.com/90351b8f23ad3c9195d54e741747a85d95755987/third_party/blink/renderer/core/dom/pseudo_element.cc
[modify] https://crrev.com/90351b8f23ad3c9195d54e741747a85d95755987/third_party/blink/renderer/core/style/computed_style.cc

Owner: futhark@chromium.org
Status: Fixed (was: Started)

Sign in to add a comment