[webkit-changes] [WebKit/WebKit] 6b79ff: [site-isolation] Cross origin <iframe>s should not...

mattwoodrow noreply at github.com
Mon Sep 23 19:36:29 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6b79ff056204ba9eb5d90e85fdeb7117015f39a6
      https://github.com/WebKit/WebKit/commit/6b79ff056204ba9eb5d90e85fdeb7117015f39a6
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2024-09-23 (Mon, 23 Sep 2024)

  Changed paths:
    A LayoutTests/http/tests/site-isolation/basic-transparent-iframe-expected.html
    A LayoutTests/http/tests/site-isolation/basic-transparent-iframe.html
    M LayoutTests/http/tests/site-isolation/draw-with-size-after-same-origin-navigation.html
    M LayoutTests/http/tests/site-isolation/page-zoom.html
    A LayoutTests/http/tests/site-isolation/resources/no-background.html
    M LayoutTests/http/tests/site-isolation/selection-focus.html
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.h
    M Source/WebCore/rendering/RenderView.cpp

  Log Message:
  -----------
  [site-isolation] Cross origin <iframe>s should not (usually) draw a background color.
https://bugs.webkit.org/show_bug.cgi?id=279954
<rdar://136270045>

Reviewed by Simon Fraser.

Adds 'isMainFrameCompositor' to RenderLayerCompositor to distinguish between
actual main-frame compositors, vs process root ones.

Use this to avoid setting a lot of extra layers that should only been needed on
the actual main frame (like the overhang areas layer for overscroll).

Also fixes RenderView::shouldPaintBaseBackground() to detect being a main-frame
using the Frame hierarchy instead of checking for an owner element. This is
still somewhat wrong, since it wants the owner element to check for a 'frame'
tag, which can't be done cross-process.

* LayoutTests/http/tests/site-isolation/basic-transparent-iframe-expected.html: Added.
* LayoutTests/http/tests/site-isolation/basic-transparent-iframe.html: Added.
* LayoutTests/http/tests/site-isolation/resources/no-background.html: Added.
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
(WebCore::RenderLayerCompositor::requiresScrollLayer const):
(WebCore::RenderLayerCompositor::isMainFrameCompositor const):
(WebCore::RenderLayerCompositor::shouldCompositeOverflowControls const):
(WebCore::RenderLayerCompositor::requiresOverhangAreasLayer const):
(WebCore::RenderLayerCompositor::requiresContentShadowLayer const):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
* Source/WebCore/rendering/RenderLayerCompositor.h:
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::shouldPaintBaseBackground const):

Canonical link: https://commits.webkit.org/284131@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