[webkit-changes] [WebKit/WebKit] c3c287: [css-view-transitions] https://simple-set-demos.gl...

mattwoodrow noreply at github.com
Mon Oct 28 20:05:54 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c3c287eed0e50afb009294c6fa02389e36858489
      https://github.com/WebKit/WebKit/commit/c3c287eed0e50afb009294c6fa02389e36858489
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2024-10-28 (Mon, 28 Oct 2024)

  Changed paths:
    A LayoutTests/fast/css/view-transitions-hide-under-page-background-color-expected.html
    A LayoutTests/fast/css/view-transitions-hide-under-page-background-color.html
    M Source/WebCore/css/color/CSSUnresolvedColorResolutionState.h
    M Source/WebCore/css/parser/CSSParserFastPaths.h
    M Source/WebCore/css/parser/CSSPropertyParserConsumer+Color.h
    M Source/WebCore/dom/Document.h
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.h
    M Source/WebCore/rendering/RenderObject.cpp
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl

  Log Message:
  -----------
  [css-view-transitions] https://simple-set-demos.glitch.me/5-heading-text/ glitches
https://bugs.webkit.org/show_bug.cgi?id=279962
<rdar://136324427>

Reviewed by Wenson Hsieh and Tim Nguyen.

When a view transition captures the root element, we reparent the RenderView's
layer into the new snapshot, which takes the view's background color with it.

Normally this color is also present on the overhang areas layer, but in some
cases it can be overwritten by the 'under page background color override'. That
color should only be visible for overscrolling, and with view transitions it can
be visible across the whole page if the snapshots aren't visible for any reason.

Add the view's background color to the 'contents root' layer too, so that it
always obscures the under page background color (in the page area). This should
be fine to do unconditionally, but I've made it only happen during a view
transition (with the root element captured) to reduce any risk from this change.

There are still some corner cases where which colors should be in the
view-transition snapshots and which shouldn't is underdefined, for which I've
filed https://github.com/w3c/csswg-drafts/issues/11083

* LayoutTests/fast/css/view-transitions-hide-under-page-background-color-expected.html: Added.
* LayoutTests/fast/css/view-transitions-hide-under-page-background-color.html: Added.
* Source/WebCore/css/color/CSSUnresolvedColorResolutionState.h:
(WebCore::CSSUnresolvedColorResolutionDelegate::currentColor const): Deleted.
(WebCore::CSSUnresolvedColorResolutionDelegate::internalDocumentTextColor const): Deleted.
(WebCore::CSSUnresolvedColorResolutionDelegate::webkitLink const): Deleted.
(WebCore::CSSUnresolvedColorResolutionDelegate::webkitLinkVisited const): Deleted.
(WebCore::CSSUnresolvedColorResolutionDelegate::webkitActiveLink const): Deleted.
(WebCore::CSSUnresolvedColorResolutionDelegate::webkitFocusRingColor const): Deleted.
* Source/WebCore/css/parser/CSSParserFastPaths.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Color.h:
* Source/WebCore/dom/Document.h:
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::setRootElementCapturedInViewTransition):
(WebCore::RenderLayerCompositor::updateRootContentsLayerBackgroundColor):
(WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
(WebCore::RenderLayerCompositor::ensureRootLayer):
* Source/WebCore/rendering/RenderLayerCompositor.h:
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::setCapturedInViewTransition):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::setUnderPageBackgroundColorOverride):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:

Canonical link: https://commits.webkit.org/285812@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list