[webkit-changes] [WebKit/WebKit] c5f81d: [Cleanup] De-virtualize RenderBlock::establishesIn...

Alan Baradlay noreply at github.com
Mon Jan 20 16:17:28 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c5f81debe54f0face27da4630133b07c46f81f38
      https://github.com/WebKit/WebKit/commit/c5f81debe54f0face27da4630133b07c46f81f38
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2025-01-20 (Mon, 20 Jan 2025)

  Changed paths:
    M Source/WebCore/rendering/RenderBlock.cpp
    M Source/WebCore/rendering/RenderBlock.h
    M Source/WebCore/rendering/RenderGrid.cpp
    M Source/WebCore/rendering/RenderGrid.h

  Log Message:
  -----------
  [Cleanup] De-virtualize RenderBlock::establishesIndependentFormattingContext
https://bugs.webkit.org/show_bug.cgi?id=286226

Reviewed by Antti Koivisto.

1. Add a (protected) helper function called establishesIndependentFormattingContextIgnoringDisplayType that subclasses (e.g. RenderGrid) can use without involving display type specific logic.
2. Move RenderGrid logic to RenderBlock which allows us to de-virtualize establishesIndependentFormattingContext.

* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::establishesIndependentFormattingContextIgnoringDisplayType const):
(WebCore::RenderBlock::establishesIndependentFormattingContext const):
* Source/WebCore/rendering/RenderBlock.h:
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::styleDidChange):
(WebCore::RenderGrid::isSubgrid const):
(WebCore::RenderGrid::establishesIndependentFormattingContext const): Deleted.
* Source/WebCore/rendering/RenderGrid.h:

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