Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f3cac57896a33a50aae815d1c1947c6a45c9d3db
      
https://github.com/WebKit/WebKit/commit/f3cac57896a33a50aae815d1c1947c6a45c9d3db
  Author: Simon Fraser <simon.fra...@apple.com>
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
    M Source/WebCore/rendering/RenderBlock.cpp
    M Source/WebCore/rendering/RenderBlock.h
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/RenderBox.h
    M Source/WebCore/rendering/RenderBoxModelObject.h
    M Source/WebCore/rendering/RenderBoxModelObjectInlines.h
    M Source/WebCore/rendering/RenderTable.h
    M Source/WebCore/rendering/RenderTableCell.cpp
    M Source/WebCore/rendering/RenderTableCell.h
    M Source/WebCore/rendering/RenderTableInlines.h

  Log Message:
  -----------
  Optimize the computation of layout overflow
https://bugs.webkit.org/show_bug.cgi?id=272859
<rdar://problem/126651525>

Reviewed by Alan Baradlay.

Computing layout overflow would call the 4 virtual border width functions
many times, so add a single virtual border widths getter to reduce that 
overhead.

Also `flippedClientBoxRect()` has non-trivial cost and would be computed each 
time
for the container, so compute that once and pass it into 
`addOverflowFromChild()`.

Finally check the `hasNonVisibleOverflow()` bit in a couple of places before
doing tests for various kinds of overflow.

* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addOverflowFromPositionedObjects):
(WebCore::RenderBlock::borderWidths const):
* Source/WebCore/rendering/RenderBlock.h:
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::addOverflowFromChild):
(WebCore::RenderBox::addLayoutOverflow):
(WebCore::RenderBox::layoutOverflowRectForPropagation const):
(WebCore::RenderBox::flippedClientBoxRect const):
* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/rendering/RenderBoxModelObject.h:
* Source/WebCore/rendering/RenderBoxModelObjectInlines.h:
(WebCore::RenderBoxModelObject::borderWidths const):
* Source/WebCore/rendering/RenderTable.h:
* Source/WebCore/rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::borderWidths const):
* Source/WebCore/rendering/RenderTableCell.h:
* Source/WebCore/rendering/RenderTableInlines.h:
(WebCore::RenderTable::borderWidths const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to