[webkit-changes] [WebKit/WebKit] 42faac: [LFC] Move isLeftFloatingPositioned from Box to Fl...

alan noreply at github.com
Sun Sep 18 08:06:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 42faac84e35047ff36d6fccf1066c8c1e3d9eb61
      https://github.com/WebKit/WebKit/commit/42faac84e35047ff36d6fccf1066c8c1e3d9eb61
  Author: Alan Bujtas <zalan at apple.com>
  Date:   2022-09-18 (Sun, 18 Sep 2022)

  Changed paths:
    M Source/WebCore/layout/floats/FloatingContext.cpp
    M Source/WebCore/layout/floats/FloatingContext.h
    M Source/WebCore/layout/floats/FloatingState.cpp
    M Source/WebCore/layout/floats/FloatingState.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/layouttree/LayoutBox.cpp
    M Source/WebCore/layout/layouttree/LayoutBox.h

  Log Message:
  -----------
  [LFC] Move isLeftFloatingPositioned from Box to FloatingContext
https://bugs.webkit.org/show_bug.cgi?id=245330

Reviewed by Antti Koivisto.

Let's not clutter Layout::Box with formatting context specific functions.
Move this function to FloatingContext also ensures that we always pick the relevant ancestor block box (FloatContext's root) when looking for inline direction.

* Source/WebCore/layout/floats/FloatingContext.cpp:
(WebCore::Layout::FloatingContext::positionForFloat const):
(WebCore::Layout::FloatingContext::positionForNonFloatingFloatAvoider const):
(WebCore::Layout::FloatingContext::toFloatItem const):
* Source/WebCore/layout/floats/FloatingContext.h:
(WebCore::Layout::FloatingContext::isLeftFloatingPositioned const):
* Source/WebCore/layout/floats/FloatingState.cpp:
(WebCore::Layout::FloatingState::FloatItem::FloatItem):
* Source/WebCore/layout/floats/FloatingState.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::tryPlacingFloatBox):
* Source/WebCore/layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isLeftFloatingPositioned const): Deleted.
(WebCore::Layout::Box::isRightFloatingPositioned const): Deleted.
* Source/WebCore/layout/layouttree/LayoutBox.h:

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




More information about the webkit-changes mailing list