Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c36b5e9890fea75c57b7d533a4b05d8bb5a791f9
      
https://github.com/WebKit/WebKit/commit/c36b5e9890fea75c57b7d533a4b05d8bb5a791f9
  Author: Alex Christensen <achristen...@apple.com>
  Date:   2023-05-05 (Fri, 05 May 2023)

  Changed paths:
    M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
    M 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
    M 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h
    M Source/WebKit/WebProcess/WebPage/DrawingArea.h
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm
    M 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h
    M 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
    M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.h
    M Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm
    M Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
    M Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

  Log Message:
  -----------
  Prepare RemoteLayerTreeDrawingArea to draw with multiple root frames
https://bugs.webkit.org/show_bug.cgi?id=256396
rdar://108965687

Reviewed by Simon Fraser.

In order to support drawing a page with site isolation enabled and two iframes
that have loaded the same domain, RemoteLayerTreeDrawingArea needs to not have
any special behavior for its first root layer.  In order to do this, I need to
not add the first root layer in the RemoteLayerTreeDrawingArea constructor, but
rather add each root layer with a call to addRootLayer.  I did add a few places
where we iterate a Vector checking each member, which isn't ideal, but in the
default non-site-isolated configuration that vector will always contain 1 
element,
so it's still O(1).  As we progress with the site isolation project, we may want
to switch to a HashMap, but having a WebFrame* as a key is a little strange.
In the meantime, this is just a step in the right direction.

* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged const):
(WebKit::WebChromeClient::attachViewOverlayGraphicsLayer):
* Source/WebKit/WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::mainFrameContentSizeChanged):
(WebKit::DrawingArea::addRootFrame):
(WebKit::DrawingArea::attachViewOverlayGraphicsLayer):
(WebKit::DrawingArea::attachToInitialRootFrame): Deleted.
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
* 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::attachViewOverlayGraphicsLayer):
(WebKit::RemoteLayerTreeDrawingArea::addRootFrame):
(WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
(WebKit::initialRootFrame): Deleted.
(WebKit::m_updateRenderingTimer): Deleted.
(WebKit::RemoteLayerTreeDrawingArea::attachToInitialRootFrame): Deleted.
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::transitionToLocal):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_appHighlightsVisible):
(WebKit::WebPage::reinitializeWebPage):
* Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.h:
* Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm:
(WebKit::RemoteLayerTreeDrawingAreaMac::mainFrameContentSizeChanged):
* Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer):
(WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to