Changeset 167283 in webkit


Ignore:
Timestamp:
Apr 14, 2014 5:27:13 PM (10 years ago)
Author:
Bem Jones-Bey
Message:

[CSS Shapes] Remove some leftover shape-inside code
https://bugs.webkit.org/show_bug.cgi?id=131641

Reviewed by Dean Jackson.

I discovered that some code had been leftover from the shape-inside
removal. This removes that leftover code.

No new tests, no behavior change.

  • platform/text/BidiResolver.h:
  • rendering/BidiRun.cpp:

(WebCore::BidiRun::BidiRun):

  • rendering/RenderBlockFlow.h:
  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::createLineBoxes):
(WebCore::RenderBlockFlow::constructLine):
(WebCore::computeExpansionForJustifiedText):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r167282 r167283  
     12014-04-14  Bem Jones-Bey  <bjonesbe@adobe.com>
     2
     3        [CSS Shapes] Remove some leftover shape-inside code
     4        https://bugs.webkit.org/show_bug.cgi?id=131641
     5
     6        Reviewed by Dean Jackson.
     7
     8        I discovered that some code had been leftover from the shape-inside
     9        removal. This removes that leftover code.
     10
     11        No new tests, no behavior change.
     12
     13        * platform/text/BidiResolver.h:
     14        * rendering/BidiRun.cpp:
     15        (WebCore::BidiRun::BidiRun):
     16        * rendering/RenderBlockFlow.h:
     17        * rendering/RenderBlockLineLayout.cpp:
     18        (WebCore::RenderBlockFlow::createLineBoxes):
     19        (WebCore::RenderBlockFlow::constructLine):
     20        (WebCore::computeExpansionForJustifiedText):
     21        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
     22
    1232014-04-14  Jer Noble  <jer.noble@apple.com>
    224
  • trunk/Source/WebCore/platform/text/BidiResolver.h

    r164391 r167283  
    191191    bool m_override : 1;
    192192    bool m_hasHyphen : 1; // Used by BidiRun subclass which is a layering violation but enables us to save 8 bytes per object on 64-bit.
    193 #if ENABLE(CSS_SHAPES)
    194     bool m_startsSegment : 1; // Same comment as m_hasHyphen.
    195 #endif
    196193    unsigned char m_level;
    197194    BidiCharacterRun* m_next;
  • trunk/Source/WebCore/rendering/BidiRun.cpp

    r158834 r167283  
    4545    // Stored in base class to save space.
    4646    m_hasHyphen = false;
    47 #if ENABLE(CSS_SHAPES)
    48     m_startsSegment = false;
    49 #endif
    5047}
    5148
  • trunk/Source/WebCore/rendering/RenderBlockFlow.h

    r167018 r167283  
    528528
    529529    virtual std::unique_ptr<RootInlineBox> createRootInlineBox(); // Subclassed by RenderSVGText.
    530     InlineFlowBox* createLineBoxes(RenderObject*, const LineInfo&, InlineBox* childBox, bool startsNewSegment);
     530    InlineFlowBox* createLineBoxes(RenderObject*, const LineInfo&, InlineBox* childBox);
    531531    RootInlineBox* constructLine(BidiRunList<BidiRun>&, const LineInfo&);
    532532    void setMarginsForRubyRun(BidiRun*, RenderRubyRun&, RenderObject*, const LineInfo&);
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r166650 r167283  
    183183}
    184184
    185 InlineFlowBox* RenderBlockFlow::createLineBoxes(RenderObject* obj, const LineInfo& lineInfo, InlineBox* childBox, bool startNewSegment)
     185InlineFlowBox* RenderBlockFlow::createLineBoxes(RenderObject* obj, const LineInfo& lineInfo, InlineBox* childBox)
    186186{
    187187    // See if we have an unconstructed line box for this object that is also
     
    206206        bool constructedNewBox = false;
    207207        bool allowedToConstructNewBox = !hasDefaultLineBoxContain || !inlineFlow || inlineFlow->alwaysCreateLineBoxes();
    208         bool mustCreateBoxesToRoot = startNewSegment && !(parentBox && parentBox->isRootInlineBox());
    209         bool canUseExistingParentBox = parentBox && !parentIsConstructedOrHaveNext(parentBox) && !mustCreateBoxesToRoot;
     208        bool canUseExistingParentBox = parentBox && !parentIsConstructedOrHaveNext(parentBox);
    210209        if (allowedToConstructNewBox && !canUseExistingParentBox) {
    211210            // We need to make a new box for this render object.  Once
     
    302301        // run's inline box. Segments can only be siblings at the root level, as
    303302        // they are positioned separately.
    304 #if ENABLE(CSS_SHAPES)
    305         bool runStartsSegment = r->m_startsSegment;
    306 #else
    307         bool runStartsSegment = false;
    308 #endif
    309         if (!parentBox || &parentBox->renderer() != r->renderer().parent() || runStartsSegment)
     303        if (!parentBox || &parentBox->renderer() != r->renderer().parent()) {
    310304            // Create new inline boxes all the way back to the appropriate insertion point.
    311             parentBox = createLineBoxes(r->renderer().parent(), lineInfo, box, runStartsSegment);
    312         else {
     305            parentBox = createLineBoxes(r->renderer().parent(), lineInfo, box);
     306        } else {
    313307            // Append the inline box to this line.
    314308            parentBox->addToLine(box);
     
    546540    size_t i = 0;
    547541    for (BidiRun* r = firstRun; r; r = r->next()) {
    548 #if ENABLE(CSS_SHAPES)
    549         // This method is called once per segment, do not move past the current segment.
    550         if (r->m_startsSegment)
    551             break;
    552 #endif
    553542        if (!r->box() || r == trailingSpaceRun)
    554543            continue;
     
    673662    BidiRun* r = firstRun;
    674663    for (; r; r = r->next()) {
    675 #if ENABLE(CSS_SHAPES)
    676         // Once we have reached the start of the next segment, we have finished
    677         // computing the positions for this segment's contents.
    678         if (r->m_startsSegment)
    679             break;
    680 #endif
    681664        if (!r->box() || r->renderer().isOutOfFlowPositioned() || r->box()->isLineBreak())
    682665            continue; // Positioned objects are only participating to figure out their
Note: See TracChangeset for help on using the changeset viewer.