Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 661ea5b177a90a25581faa820e9ff262de4e6494
      
https://github.com/WebKit/WebKit/commit/661ea5b177a90a25581faa820e9ff262de4e6494
  Author: Simon Fraser <[email protected]>
  Date:   2026-06-27 (Sat, 27 Jun 2026)

  Changed paths:
    M Source/WebCore/page/ElementTargetingController.cpp
    M Source/WebCore/page/FrameSnapshotting.cpp
    M Source/WebCore/page/FrameSnapshotting.h
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/page/LocalFrameView.h
    M Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp

  Log Message:
  -----------
  Remove LocalFrameView::m_nodeToDraw
https://bugs.webkit.org/show_bug.cgi?id=317954
rdar://180751980

Reviewed by Alan Baradlay.

When snapshotting a Node, code called `frameView->setNodeToDraw(node)` and 
`frameView->setNodeToDraw(null)`,
making LocalFrameView store some temporary state that is better implemented by 
passing the Node as
a function argument.

So pass a `Node*` down through to `LocaLFrameView::paintContents()`. 
`ScopedFramePaintingState` no longer
needs to store the node.

No behavior change.

* Source/WebCore/page/ElementTargetingController.cpp:
(WebCore::ElementTargetingController::snapshotIgnoringVisibilityAdjustment):
* Source/WebCore/page/FrameSnapshotting.cpp:
(WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
(WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
(WebCore::snapshotFrameRect):
(WebCore::snapshotFrameRectWithClip):
(WebCore::snapshotNode):
* Source/WebCore/page/FrameSnapshotting.h:
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::paintContents):
(WebCore::LocalFrameView::paintContentsForSnapshot):
(WebCore::LocalFrameView::setNodeToDraw): Deleted.
* Source/WebCore/page/LocalFrameView.h:
* Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::imageForRect):
(WebKit::InjectedBundleNodeHandle::renderedImage):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::paintSnapshotAtSize):
(WebKit::WebPage::snapshotNode):
(WebKit::WebPage::drawFrameToSnapshot):

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



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

Reply via email to