⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278407 in webkit


Ignore:
Timestamp:
Jun 3, 2021, 8:23:25 AM (5 years ago)
Author:
Antti Koivisto
Message:

Remove TrailingFloatsRootInlineBox
​https://bugs.webkit.org/show_bug.cgi?id=226579

Reviewed by Sam Weinig.

Replace it with a bit in LegacyRootInlineBox.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/VisibleUnits.cpp:

(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

  • rendering/LegacyInlineBox.cpp:

(WebCore::LegacyInlineBox::logicalHeight const):

  • rendering/LegacyInlineFlowBox.h:

(WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox):

  • rendering/LegacyLineLayout.cpp:

(WebCore::LegacyLineLayout::linkToEndLineIfNeeded):

  • rendering/LegacyRootInlineBox.h:

(WebCore::LegacyRootInlineBox::isForTrailingFloats const):
(WebCore::LegacyRootInlineBox::setIsForTrailingFloats):
(WebCore::LegacyRootInlineBox::isTrailingFloatsRootInlineBox const): Deleted.

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):

  • rendering/TrailingFloatsRootInlineBox.cpp: Removed.
  • rendering/TrailingFloatsRootInlineBox.h: Removed.
Location:
trunk/Source/WebCore
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r278406 r278407  
     12021-06-03  Antti Koivisto  <antti@apple.com>
     2
     3        Remove TrailingFloatsRootInlineBox
     4        https://bugs.webkit.org/show_bug.cgi?id=226579
     5
     6        Reviewed by Sam Weinig.
     7
     8        Replace it with a bit in LegacyRootInlineBox.
     9
     10        * Sources.txt:
     11        * WebCore.xcodeproj/project.pbxproj:
     12        * editing/VisibleUnits.cpp:
     13        (WebCore::previousLinePosition):
     14        (WebCore::nextLinePosition):
     15        * rendering/LegacyInlineBox.cpp:
     16        (WebCore::LegacyInlineBox::logicalHeight const):
     17        * rendering/LegacyInlineFlowBox.h:
     18        (WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox):
     19        * rendering/LegacyLineLayout.cpp:
     20        (WebCore::LegacyLineLayout::linkToEndLineIfNeeded):
     21        * rendering/LegacyRootInlineBox.h:
     22        (WebCore::LegacyRootInlineBox::isForTrailingFloats const):
     23        (WebCore::LegacyRootInlineBox::setIsForTrailingFloats):
     24        (WebCore::LegacyRootInlineBox::isTrailingFloatsRootInlineBox const): Deleted.
     25        * rendering/RenderLineBoxList.cpp:
     26        (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
     27        * rendering/TrailingFloatsRootInlineBox.cpp: Removed.
     28        * rendering/TrailingFloatsRootInlineBox.h: Removed.
     29
    1302021-06-03  Miguel Gomez  <magomez@igalia.com>
    231
  • trunk/Source/WebCore/Sources.txt

    r278405 r278407  
    23592359rendering/TextPaintStyle.cpp
    23602360rendering/TextPainter.cpp
    2361 rendering/TrailingFloatsRootInlineBox.cpp
    23622361rendering/line/LineBreaker.cpp
    23632362rendering/line/LineInfo.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r278405 r278407  
    63956395                0FFF1B82251BC6630098795A /* DisplayTree.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayTree.cpp; sourceTree = "<group>"; };
    63966396                10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PublicURLManager.h; sourceTree = "<group>"; };
    6397                 1100FC6E1FDB3C4D00DD961B /* TrailingFloatsRootInlineBox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TrailingFloatsRootInlineBox.cpp; sourceTree = "<group>"; };
    63986397                11100FC72092764C0081AA6C /* LayoutIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutIterator.h; sourceTree = "<group>"; };
    63996398                11100FC920927CBC0081AA6C /* LayoutChildIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayoutChildIterator.h; sourceTree = "<group>"; };
    … …  
    77147713                37F818FB0D657606005E1F05 /* WebCoreURLResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreURLResponse.h; sourceTree = "<group>"; };
    77157714                37F818FC0D657606005E1F05 /* WebCoreURLResponse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreURLResponse.mm; sourceTree = "<group>"; };
    7716                 37FC96DA1104ED71003E1FAD /* TrailingFloatsRootInlineBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrailingFloatsRootInlineBox.h; sourceTree = "<group>"; };
    77177715                37FD4297118368460093C029 /* TreeDepthLimit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TreeDepthLimit.h; sourceTree = "<group>"; };
    77187716                387AE9581E8E92EF0000DE96 /* JSWebGPUSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUSize.cpp; sourceTree = "<group>"; };
    … …  
    3042230420                                E4C91A0F1802343900A17F6D /* TextPaintStyle.cpp */,
    3042330421                                E4C91A0D1802343100A17F6D /* TextPaintStyle.h */,
    30424                                 1100FC6E1FDB3C4D00DD961B /* TrailingFloatsRootInlineBox.cpp */,
    30425                                 37FC96DA1104ED71003E1FAD /* TrailingFloatsRootInlineBox.h */,
    3042630422                                BCA257141293C010007A263D /* VerticalPositionCache.h */,
    3042730423                        );
  • trunk/Source/WebCore/editing/VisibleUnits.cpp

    r278253 r278407  
    964964        line = run.line().previous();
    965965        // We want to skip zero height boxes.
    966         // This could happen in case it is a TrailingFloatsRootInlineBox.
     966        // This could happen in case it is a LegacyRootInlineBox with trailing floats.
    967967        if (!line || !line->logicalHeight() || !line.firstRun())
    968968            line = { };
    … …  
    10141014        line = run.line().next();
    10151015        // We want to skip zero height boxes.
    1016         // This could happen in case it is a TrailingFloatsRootInlineBox.
     1016        // This could happen in case it is a LegacyRootInlineBox with trailing floats.
    10171017        if (!line || !line->logicalHeight() || !line.firstRun())
    10181018            line = { };
  • trunk/Source/WebCore/rendering/LegacyInlineBox.cpp

    r278405 r278407  
    132132        return virtualLogicalHeight();
    133133
     134    if (is<LegacyRootInlineBox>(*this) && downcast<LegacyRootInlineBox>(*this).isForTrailingFloats())
     135        return 0;
     136
    134137    const RenderStyle& lineStyle = this->lineStyle();
    135138    if (renderer().isTextOrLineBreak())
  • trunk/Source/WebCore/rendering/LegacyInlineFlowBox.h

    r278405 r278407  
    5151        , m_hasAnnotationsAfter(false)
    5252        , m_isFirstAfterPageBreak(false)
     53        , m_isForTrailingFloats(false)
    5354#if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
    5455        , m_hasBadChildList(false)
    … …  
    333334
    334335    unsigned m_isFirstAfterPageBreak : 1;
     336    unsigned m_isForTrailingFloats : 1;
    335337
    336338    // End of RootInlineBox-specific members.
  • trunk/Source/WebCore/rendering/LegacyLineLayout.cpp

    r278405 r278407  
    4848#include "SVGRootInlineBox.h"
    4949#include "Settings.h"
    50 #include "TrailingFloatsRootInlineBox.h"
    5150#include "VerticalPositionCache.h"
    5251#include <wtf/StdLibExtras.h>
    … …  
    16611660            LayoutUnit bottomVisualOverflow = lastRootBox()->logicalBottomVisualOverflow();
    16621661            LayoutUnit bottomLayoutOverflow = lastRootBox()->logicalBottomLayoutOverflow();
    1663             auto newLineBox = makeUnique<TrailingFloatsRootInlineBox>(m_flow);
     1662            auto newLineBox = makeUnique<LegacyRootInlineBox>(m_flow);
     1663            newLineBox->setIsForTrailingFloats();
    16641664            auto trailingFloatsLineBox = newLineBox.get();
    16651665            m_lineBoxes.appendLineBox(WTFMove(newLineBox));
  • trunk/Source/WebCore/rendering/LegacyRootInlineBox.h

    r278405 r278407  
    9898    void setLineBreakPos(unsigned p) { m_lineBreakPos = p; }
    9999
     100    bool isForTrailingFloats() const { return m_isForTrailingFloats; }
     101    void setIsForTrailingFloats() { m_isForTrailingFloats = true; }
     102
    100103    using LegacyInlineBox::endsWithBreak;
    101104    using LegacyInlineBox::setEndsWithBreak;
    … …  
    183186    }
    184187
    185     virtual bool isTrailingFloatsRootInlineBox() const { return false; }
    186 
    187188#if ENABLE(TREE_DEBUGGING)
    188189    void outputLineBox(WTF::TextStream&, bool mark, int depth) const final;
  • trunk/Source/WebCore/rendering/RenderLineBoxList.cpp

    r278405 r278407  
    390390            if (is<RenderInline>(child) && !downcast<RenderInline>(child).firstLineBoxIncludingCulling()) {
    391391                auto* lastRootBox = nextBox->blockFlow().lastRootBox();
    392                 if (lastRootBox->isTrailingFloatsRootInlineBox() && !lastRootBox->isDirty())
     392                if (lastRootBox->isForTrailingFloats() && !lastRootBox->isDirty())
    393393                    lastRootBox->markDirty();
    394394            }
Note: See TracChangeset for help on using the changeset viewer.