Changeset 182127 in webkit


Ignore:
Timestamp:
Mar 29, 2015 7:00:20 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

nullptr cleanup in RenderFooBox classes
https://bugs.webkit.org/show_bug.cgi?id=143182

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-03-29
Reviewed by Ryosuke Niwa.

No new tests, no behavior changes

Replace 0 with nullptr in RenderFooBox classes.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::RenderBox):
(WebCore::RenderBox::paintFillLayer):
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
(WebCore::RenderBox::renderBoxRegionInfo):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::positionForPoint):
(WebCore::RenderBox::layoutOverflowRectForPropagation):

  • rendering/RenderBox.h:

(WebCore::RenderBox::setMarginBefore):
(WebCore::RenderBox::setMarginAfter):
(WebCore::RenderBox::setMarginStart):
(WebCore::RenderBox::setMarginEnd):
(WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
(WebCore::RenderBox::setInlineBoxWrapper):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::willBeDestroyed):
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintBorderSides):
(WebCore::RenderBoxModelObject::firstLetterRemainingText):

  • rendering/RenderBoxModelObject.h:

(WebCore::RenderBoxModelObject::moveChildTo):
(WebCore::RenderBoxModelObject::moveAllChildrenTo):
(WebCore::RenderBoxModelObject::moveChildrenTo):

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::FlexBoxIterator::reset):
(WebCore::FlexBoxIterator::next):

  • rendering/RenderDeprecatedFlexibleBox.h:
  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::firstLineBaseline):
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::deleteLineBoxTree):
(WebCore::RenderLineBoxList::extractLineBox):
(WebCore::RenderLineBoxList::deleteLineBoxes):
(WebCore::RenderLineBoxList::checkConsistency):

  • rendering/RenderLineBoxList.h:

(WebCore::RenderLineBoxList::RenderLineBoxList):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::enclosingScrollableArea):
(WebCore::RenderListBox::setHasVerticalScrollbar):

  • rendering/RenderListBox.h:
Location:
trunk/Source/WebCore
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r182125 r182127  
     12015-03-29  Joonghun Park  <jh718.park@samsung.com>
     2
     3        nullptr cleanup in RenderFooBox classes
     4        https://bugs.webkit.org/show_bug.cgi?id=143182
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        No new tests, no behavior changes
     9
     10        Replace 0 with nullptr in RenderFooBox classes.
     11
     12        * rendering/RenderBox.cpp:
     13        (WebCore::RenderBox::RenderBox):
     14        (WebCore::RenderBox::paintFillLayer):
     15        (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
     16        (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
     17        (WebCore::RenderBox::renderBoxRegionInfo):
     18        (WebCore::RenderBox::computePositionedLogicalWidthUsing):
     19        (WebCore::RenderBox::computePositionedLogicalHeightUsing):
     20        (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
     21        (WebCore::RenderBox::positionForPoint):
     22        (WebCore::RenderBox::layoutOverflowRectForPropagation):
     23        * rendering/RenderBox.h:
     24        (WebCore::RenderBox::setMarginBefore):
     25        (WebCore::RenderBox::setMarginAfter):
     26        (WebCore::RenderBox::setMarginStart):
     27        (WebCore::RenderBox::setMarginEnd):
     28        (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
     29        (WebCore::RenderBox::setInlineBoxWrapper):
     30        * rendering/RenderBoxModelObject.cpp:
     31        (WebCore::RenderBoxModelObject::willBeDestroyed):
     32        (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
     33        (WebCore::RenderBoxModelObject::paintBorderSides):
     34        (WebCore::RenderBoxModelObject::firstLetterRemainingText):
     35        * rendering/RenderBoxModelObject.h:
     36        (WebCore::RenderBoxModelObject::moveChildTo):
     37        (WebCore::RenderBoxModelObject::moveAllChildrenTo):
     38        (WebCore::RenderBoxModelObject::moveChildrenTo):
     39        * rendering/RenderDeprecatedFlexibleBox.cpp:
     40        (WebCore::FlexBoxIterator::reset):
     41        (WebCore::FlexBoxIterator::next):
     42        * rendering/RenderDeprecatedFlexibleBox.h:
     43        * rendering/RenderFlexibleBox.cpp:
     44        (WebCore::RenderFlexibleBox::firstLineBaseline):
     45        (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
     46        * rendering/RenderLineBoxList.cpp:
     47        (WebCore::RenderLineBoxList::deleteLineBoxTree):
     48        (WebCore::RenderLineBoxList::extractLineBox):
     49        (WebCore::RenderLineBoxList::deleteLineBoxes):
     50        (WebCore::RenderLineBoxList::checkConsistency):
     51        * rendering/RenderLineBoxList.h:
     52        (WebCore::RenderLineBoxList::RenderLineBoxList):
     53        * rendering/RenderListBox.cpp:
     54        (WebCore::RenderListBox::enclosingScrollableArea):
     55        (WebCore::RenderListBox::setHasVerticalScrollbar):
     56        * rendering/RenderListBox.h:
     57
    1582015-03-29  Darin Adler  <darin@apple.com>
    259
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r181515 r182127  
    8787// Used by flexible boxes when flexing this element and by table cells.
    8888typedef WTF::HashMap<const RenderBox*, LayoutUnit> OverrideSizeMap;
    89 static OverrideSizeMap* gOverrideHeightMap = 0;
    90 static OverrideSizeMap* gOverrideWidthMap = 0;
     89static OverrideSizeMap* gOverrideHeightMap = nullptr;
     90static OverrideSizeMap* gOverrideWidthMap = nullptr;
    9191
    9292#if ENABLE(CSS_GRID_LAYOUT)
     
    129129    , m_minPreferredLogicalWidth(-1)
    130130    , m_maxPreferredLogicalWidth(-1)
    131     , m_inlineBoxWrapper(0)
     131    , m_inlineBoxWrapper(nullptr)
    132132{
    133133    setIsBox();
     
    138138    , m_minPreferredLogicalWidth(-1)
    139139    , m_maxPreferredLogicalWidth(-1)
    140     , m_inlineBoxWrapper(0)
     140    , m_inlineBoxWrapper(nullptr)
    141141{
    142142    setIsBox();
     
    16111611    BackgroundBleedAvoidance bleedAvoidance, CompositeOperator op, RenderElement* backgroundObject, BaseBackgroundColorUsage baseBgColorUsage)
    16121612{
    1613     paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, 0, LayoutSize(), op, backgroundObject, baseBgColorUsage);
     1613    paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, nullptr, LayoutSize(), op, backgroundObject, baseBgColorUsage);
    16141614}
    16151615
     
    18061806LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock* cb, RenderRegion* region) const
    18071807{   
    1808     RenderRegion* containingBlockRegion = 0;
     1808    RenderRegion* containingBlockRegion = nullptr;
    18091809    LayoutUnit logicalTopPosition = logicalTop();
    18101810    if (region) {
     
    18901890{
    18911891    RenderBlock* cb = containingBlock();
    1892     RenderRegion* containingBlockRegion = 0;
     1892    RenderRegion* containingBlockRegion = nullptr;
    18931893    LayoutUnit logicalTopPosition = logicalTop();
    18941894    if (region) {
     
    25662566    // Make sure nobody is trying to call this with a null region.
    25672567    if (!region)
    2568         return 0;
     2568        return nullptr;
    25692569
    25702570    // If we have computed our width in this region already, it will be cached, and we can
     
    25792579    RenderFlowThread* flowThread = flowThreadContainingBlock();
    25802580    if (isRenderFlowThread() || !flowThread || !canHaveBoxInfoInRegion() || flowThread->style().writingMode() != style().writingMode())
    2581         return 0;
     2581        return nullptr;
    25822582
    25832583    LogicalExtentComputedValues computedValues;
     
    34073407    LayoutUnit logicalLeftValue = 0;
    34083408
    3409     const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, 0, false);
     3409    const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, nullptr, false);
    34103410
    34113411    bool logicalWidthIsAuto = logicalWidth.isIntrinsicOrAuto();
     
    37333733    LayoutUnit contentLogicalHeight = logicalHeight - bordersPlusPadding;
    37343734
    3735     const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, 0, false);
     3735    const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, nullptr, false);
    37363736
    37373737    LayoutUnit logicalTopValue = 0;
     
    38923892    \*-----------------------------------------------------------------------*/
    38933893    // see FIXME 1
    3894     computeInlineStaticDistance(logicalLeft, logicalRight, this, containerBlock, containerLogicalWidth, 0); // FIXME: Pass the region.
     3894    computeInlineStaticDistance(logicalLeft, logicalRight, this, containerBlock, containerLogicalWidth, nullptr); // FIXME: Pass the region.
    38953895
    38963896    /*-----------------------------------------------------------------------*\
     
    42164216    // Pass off to the closest child.
    42174217    LayoutUnit minDist = LayoutUnit::max();
    4218     RenderBox* closestRenderer = 0;
     4218    RenderBox* closestRenderer = nullptr;
    42194219    LayoutPoint adjustedPoint = point;
    42204220    if (isTableRow())
     
    48114811            markBoxForRelayoutAfterSplit(*parentBox);
    48124812            parentBox->insertChildInternal(postBox, boxToSplit.nextSibling(), NotifyChildren);
    4813             boxToSplit.moveChildrenTo(postBox, beforeChild, 0, true);
     4813            boxToSplit.moveChildrenTo(postBox, beforeChild, nullptr, true);
    48144814
    48154815            markBoxForRelayoutAfterSplit(boxToSplit);
  • trunk/Source/WebCore/rendering/RenderBox.h

    r181505 r182127  
    8686    LayoutUnit logicalHeight() const { return style().isHorizontalWritingMode() ? height() : width(); }
    8787
    88     LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, RenderBlock*, RenderRegion* = 0) const;
     88    LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, RenderBlock*, RenderRegion* = nullptr) const;
    8989    LayoutUnit constrainLogicalHeightByMinMax(LayoutUnit) const;
    9090    LayoutUnit constrainContentBoxLogicalHeightByMinMax(LayoutUnit) const;
     
    175175    // Bounds of the outline box in absolute coords. Respects transforms
    176176    virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* /*repaintContainer*/, const RenderGeometryMap*) const override final;
    177     virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override;
     177    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = nullptr) override;
    178178   
    179179    virtual FloatRect repaintRectInLocalCoordinates() const override { return borderBoxRect(); }
     
    265265    LayoutUnit marginLogicalRight() const { return m_marginBox.logicalRight(style().writingMode()); }
    266266   
    267     virtual LayoutUnit marginBefore(const RenderStyle* overrideStyle = 0) const override final { return m_marginBox.before((overrideStyle ? overrideStyle : &style())->writingMode()); }
    268     virtual LayoutUnit marginAfter(const RenderStyle* overrideStyle = 0) const override final { return m_marginBox.after((overrideStyle ? overrideStyle : &style())->writingMode()); }
    269     virtual LayoutUnit marginStart(const RenderStyle* overrideStyle = 0) const override final
     267    virtual LayoutUnit marginBefore(const RenderStyle* overrideStyle = nullptr) const override final { return m_marginBox.before((overrideStyle ? overrideStyle : &style())->writingMode()); }
     268    virtual LayoutUnit marginAfter(const RenderStyle* overrideStyle = nullptr) const override final { return m_marginBox.after((overrideStyle ? overrideStyle : &style())->writingMode()); }
     269    virtual LayoutUnit marginStart(const RenderStyle* overrideStyle = nullptr) const override final
    270270    {
    271271        const RenderStyle* styleToUse = overrideStyle ? overrideStyle : &style();
    272272        return m_marginBox.start(styleToUse->writingMode(), styleToUse->direction());
    273273    }
    274     virtual LayoutUnit marginEnd(const RenderStyle* overrideStyle = 0) const override final
     274    virtual LayoutUnit marginEnd(const RenderStyle* overrideStyle = nullptr) const override final
    275275    {
    276276        const RenderStyle* styleToUse = overrideStyle ? overrideStyle : &style();
    277277        return m_marginBox.end(styleToUse->writingMode(), styleToUse->direction());
    278278    }
    279     void setMarginBefore(LayoutUnit value, const RenderStyle* overrideStyle = 0) { m_marginBox.setBefore((overrideStyle ? overrideStyle : &style())->writingMode(), value); }
    280     void setMarginAfter(LayoutUnit value, const RenderStyle* overrideStyle = 0) { m_marginBox.setAfter((overrideStyle ? overrideStyle : &style())->writingMode(), value); }
    281     void setMarginStart(LayoutUnit value, const RenderStyle* overrideStyle = 0)
     279    void setMarginBefore(LayoutUnit value, const RenderStyle* overrideStyle = nullptr) { m_marginBox.setBefore((overrideStyle ? overrideStyle : &style())->writingMode(), value); }
     280    void setMarginAfter(LayoutUnit value, const RenderStyle* overrideStyle = nullptr) { m_marginBox.setAfter((overrideStyle ? overrideStyle : &style())->writingMode(), value); }
     281    void setMarginStart(LayoutUnit value, const RenderStyle* overrideStyle = nullptr)
    282282    {
    283283        const RenderStyle* styleToUse = overrideStyle ? overrideStyle : &style();
    284284        m_marginBox.setStart(styleToUse->writingMode(), styleToUse->direction(), value);
    285285    }
    286     void setMarginEnd(LayoutUnit value, const RenderStyle* overrideStyle = 0)
     286    void setMarginEnd(LayoutUnit value, const RenderStyle* overrideStyle = nullptr)
    287287    {
    288288        const RenderStyle* styleToUse = overrideStyle ? overrideStyle : &style();
     
    339339#endif
    340340
    341     virtual LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = 0) const override;
     341    virtual LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = nullptr) const override;
    342342   
    343343    LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
     
    414414
    415415    RenderBoxRegionInfo* renderBoxRegionInfo(RenderRegion*, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const;
    416     void computeLogicalWidthInRegion(LogicalExtentComputedValues&, RenderRegion* = 0) const;
     416    void computeLogicalWidthInRegion(LogicalExtentComputedValues&, RenderRegion* = nullptr) const;
    417417
    418418    bool stretchesToViewport() const
     
    460460    int scrollbarLogicalHeight() const { return style().isHorizontalWritingMode() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); }
    461461    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint());
    462     virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0);
     462    virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr);
    463463    bool canBeScrolledAndHasScrollableArea() const;
    464464    virtual bool canBeProgramaticallyScrolled() const;
     
    483483    bool isUnsplittableForPagination() const;
    484484
    485     virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = 0) override;
     485    virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = nullptr) override;
    486486
    487487    virtual LayoutRect overflowClipRect(const LayoutPoint& location, RenderRegion*, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize, PaintPhase = PaintPhaseBlockBackground);
     
    497497    virtual void paintMask(PaintInfo&, const LayoutPoint&);
    498498    virtual void paintClippingMask(PaintInfo&, const LayoutPoint&);
    499     virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override;
     499    virtual void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override;
    500500
    501501    // Called when a positioned object moves but doesn't necessarily change size.  A simplified layout is attempted
     
    594594    {
    595595        ASSERT_NOT_REACHED();
    596         return 0;
     596        return nullptr;
    597597    }
    598598
     
    641641    bool backgroundHasOpaqueTopLayer() const;
    642642
    643     void computePositionedLogicalWidth(LogicalExtentComputedValues&, RenderRegion* = 0) const;
     643    void computePositionedLogicalWidth(LogicalExtentComputedValues&, RenderRegion* = nullptr) const;
    644644
    645645    LayoutUnit computeIntrinsicLogicalWidthUsing(Length logicalWidthLength, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const;
     
    678678    bool skipContainingBlockForPercentHeightCalculation(const RenderBox* containingBlock, bool isPerpendicularWritingMode) const;
    679679   
    680     LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* = 0, bool checkForPerpendicularWritingMode = true) const;
     680    LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* = nullptr, bool checkForPerpendicularWritingMode = true) const;
    681681    LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode = true) const;
    682682
     
    765765        // only one will be notified when the renderer is getting destroyed. The second line box wrapper
    766766        // will keep a stale reference.
    767         if (UNLIKELY(m_inlineBoxWrapper != 0))
     767        if (UNLIKELY(m_inlineBoxWrapper != nullptr))
    768768            deleteLineBoxWrapper();
    769769    }
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r180661 r182127  
    8484// renderers to their remaining text fragments.
    8585typedef HashMap<const RenderBoxModelObject*, RenderTextFragment*> FirstLetterRemainingTextMap;
    86 static FirstLetterRemainingTextMap* firstLetterRemainingTextMap = 0;
     86static FirstLetterRemainingTextMap* firstLetterRemainingTextMap = nullptr;
    8787
    8888void RenderBoxModelObject::setSelectionState(SelectionState state)
     
    196196    // entry needs to be cleared from the map.
    197197    if (firstLetterRemainingText())
    198         setFirstLetterRemainingText(0);
     198        setFirstLetterRemainingText(nullptr);
    199199
    200200    if (!documentBeingDestroyed())
     
    616616    // Now add the text to the clip. We do this by painting using a special paint phase that signals to
    617617    // InlineTextBoxes that they should just add their contents to the clip.
    618     PaintInfo info(maskImageContext, maskRect, PaintPhaseTextClip, PaintBehaviorForceBlackText, 0);
     618    PaintInfo info(maskImageContext, maskRect, PaintPhaseTextClip, PaintBehaviorForceBlackText);
    619619    if (box) {
    620620        const RootInlineBox& rootBox = box->root();
     
    16371637
    16381638        bool usePath = renderRadii && (borderStyleHasInnerDetail(edges[BSTop].style()) || borderWillArcInnerEdge(innerBorder.radii().topLeft(), innerBorder.radii().topRight()));
    1639         paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSTop, BSLeft, BSRight, edges, usePath ? &roundedPath : 0, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
     1639        paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSTop, BSLeft, BSRight, edges, usePath ? &roundedPath : nullptr, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
    16401640    }
    16411641
     
    16451645
    16461646        bool usePath = renderRadii && (borderStyleHasInnerDetail(edges[BSBottom].style()) || borderWillArcInnerEdge(innerBorder.radii().bottomLeft(), innerBorder.radii().bottomRight()));
    1647         paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSBottom, BSLeft, BSRight, edges, usePath ? &roundedPath : 0, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
     1647        paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSBottom, BSLeft, BSRight, edges, usePath ? &roundedPath : nullptr, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
    16481648    }
    16491649
     
    16531653
    16541654        bool usePath = renderRadii && (borderStyleHasInnerDetail(edges[BSLeft].style()) || borderWillArcInnerEdge(innerBorder.radii().bottomLeft(), innerBorder.radii().topLeft()));
    1655         paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSLeft, BSTop, BSBottom, edges, usePath ? &roundedPath : 0, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
     1655        paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSLeft, BSTop, BSBottom, edges, usePath ? &roundedPath : nullptr, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
    16561656    }
    16571657
     
    16611661
    16621662        bool usePath = renderRadii && (borderStyleHasInnerDetail(edges[BSRight].style()) || borderWillArcInnerEdge(innerBorder.radii().bottomRight(), innerBorder.radii().topRight()));
    1663         paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSRight, BSTop, BSBottom, edges, usePath ? &roundedPath : 0, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
     1663        paintOneBorderSide(graphicsContext, style, outerBorder, innerBorder, sideRect, BSRight, BSTop, BSBottom, edges, usePath ? &roundedPath : nullptr, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, overrideColor);
    16641664    }
    16651665}
     
    25322532{
    25332533    if (!firstLetterRemainingTextMap)
    2534         return 0;
     2534        return nullptr;
    25352535    return firstLetterRemainingTextMap->get(this);
    25362536}
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.h

    r180644 r182127  
    185185    virtual LayoutUnit marginLeft() const = 0;
    186186    virtual LayoutUnit marginRight() const = 0;
    187     virtual LayoutUnit marginBefore(const RenderStyle* otherStyle = 0) const = 0;
    188     virtual LayoutUnit marginAfter(const RenderStyle* otherStyle = 0) const = 0;
    189     virtual LayoutUnit marginStart(const RenderStyle* otherStyle = 0) const = 0;
    190     virtual LayoutUnit marginEnd(const RenderStyle* otherStyle = 0) const = 0;
     187    virtual LayoutUnit marginBefore(const RenderStyle* otherStyle = nullptr) const = 0;
     188    virtual LayoutUnit marginAfter(const RenderStyle* otherStyle = nullptr) const = 0;
     189    virtual LayoutUnit marginStart(const RenderStyle* otherStyle = nullptr) const = 0;
     190    virtual LayoutUnit marginEnd(const RenderStyle* otherStyle = nullptr) const = 0;
    191191    LayoutUnit verticalMarginExtent() const { return marginTop() + marginBottom(); }
    192192    LayoutUnit horizontalMarginExtent() const { return marginLeft() + marginRight(); }
     
    204204    bool paintNinePieceImage(GraphicsContext*, const LayoutRect&, const RenderStyle&, const NinePieceImage&, CompositeOperator = CompositeSourceOver);
    205205    void paintBoxShadow(const PaintInfo&, const LayoutRect&, const RenderStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
    206     void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer*, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox* = 0, const LayoutSize& = LayoutSize(), CompositeOperator = CompositeSourceOver, RenderElement* backgroundObject = 0, BaseBackgroundColorUsage = BaseBackgroundColorUse);
    207 
    208     virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox* = 0) const;
     206    void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer*, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox* = nullptr, const LayoutSize& = LayoutSize(), CompositeOperator = CompositeSourceOver, RenderElement* backgroundObject = nullptr, BaseBackgroundColorUsage = BaseBackgroundColorUse);
     207
     208    virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox* = nullptr) const;
    209209
    210210    // Overridden by subclasses to determine line height and baseline position.
     
    241241
    242242    bool hasBoxDecorationStyle() const;
    243     BackgroundImageGeometry calculateBackgroundImageGeometry(const RenderLayerModelObject* paintContainer, const FillLayer&, const LayoutRect& paintRect, RenderElement* = 0) const;
     243    BackgroundImageGeometry calculateBackgroundImageGeometry(const RenderLayerModelObject* paintContainer, const FillLayer&, const LayoutRect& paintRect, RenderElement* = nullptr) const;
    244244    bool borderObscuresBackgroundEdge(const FloatSize& contextScale) const;
    245245    bool borderObscuresBackground() const;
     
    270270    void moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, bool fullRemoveInsert = false)
    271271    {
    272         moveChildTo(toBoxModelObject, child, 0, fullRemoveInsert);
     272        moveChildTo(toBoxModelObject, child, nullptr, fullRemoveInsert);
    273273    }
    274274    void moveAllChildrenTo(RenderBoxModelObject* toBoxModelObject, bool fullRemoveInsert = false)
    275275    {
    276         moveAllChildrenTo(toBoxModelObject, 0, fullRemoveInsert);
     276        moveAllChildrenTo(toBoxModelObject, nullptr, fullRemoveInsert);
    277277    }
    278278    void moveAllChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* beforeChild, bool fullRemoveInsert = false)
    279279    {
    280         moveChildrenTo(toBoxModelObject, firstChild(), 0, beforeChild, fullRemoveInsert);
     280        moveChildrenTo(toBoxModelObject, firstChild(), nullptr, beforeChild, fullRemoveInsert);
    281281    }
    282282    // Move all of the kids from |startChild| up to but excluding |endChild|. 0 can be passed as the |endChild| to denote
     
    284284    void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, bool fullRemoveInsert = false)
    285285    {
    286         moveChildrenTo(toBoxModelObject, startChild, endChild, 0, fullRemoveInsert);
     286        moveChildrenTo(toBoxModelObject, startChild, endChild, nullptr, fullRemoveInsert);
    287287    }
    288288    void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, bool fullRemoveInsert = false);
     
    308308    void paintOneBorderSide(GraphicsContext*, const RenderStyle&, const RoundedRect& outerBorder, const RoundedRect& innerBorder,
    309309        const LayoutRect& sideRect, BoxSide, BoxSide adjacentSide1, BoxSide adjacentSide2, const BorderEdge[],
    310         const Path*, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias, const Color* overrideColor = 0);
     310        const Path*, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias, const Color* overrideColor = nullptr);
    311311    void paintTranslucentBorderSides(GraphicsContext*, const RenderStyle&, const RoundedRect& outerBorder, const RoundedRect& innerBorder, const IntPoint& innerBorderAdjustment,
    312312        const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false);
    313313    void paintBorderSides(GraphicsContext*, const RenderStyle&, const RoundedRect& outerBorder, const RoundedRect& innerBorder,
    314314        const IntPoint& innerBorderAdjustment, const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance,
    315         bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false, const Color* overrideColor = 0);
     315        bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false, const Color* overrideColor = nullptr);
    316316    void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const Path&, const BorderEdge[],
    317317        float thickness, float drawThickness, BoxSide, const RenderStyle&,
  • trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

    r181398 r182127  
    6060    void reset()
    6161    {
    62         m_currentChild = 0;
     62        m_currentChild = nullptr;
    6363        m_ordinalIteration = -1;
    6464    }
     
    8080                else {
    8181                    if (m_ordinalIteration > m_ordinalValues.size())
    82                         return 0;
     82                        return nullptr;
    8383
    8484                    // Only copy+sort the values once per layout even if the iterator is reset.
  • trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h

    r177259 r182127  
    5050    virtual bool canCollapseAnonymousBlockChild() const override { return false; }
    5151
    52     void placeChild(RenderBox* child, const LayoutPoint& location, LayoutSize* childLayoutDelta = 0);
     52    void placeChild(RenderBox* child, const LayoutPoint& location, LayoutSize* childLayoutDelta = nullptr);
    5353
    5454private:
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r181691 r182127  
    180180    if (isWritingModeRoot() || m_numberOfInFlowChildrenOnFirstLine <= 0)
    181181        return Optional<int>();
    182     RenderBox* baselineChild = 0;
     182    RenderBox* baselineChild = nullptr;
    183183    int childNumber = 0;
    184184    for (RenderBox* child = m_orderIterator.first(); child; child = m_orderIterator.next()) {
     
    466466        return child.computeContentLogicalHeight(size);
    467467    // FIXME: Figure out how this should work for regions and pass in the appropriate values.
    468     RenderRegion* region = 0;
     468    RenderRegion* region = nullptr;
    469469    return child.computeLogicalWidthInRegionUsing(sizeType, size, contentLogicalWidth(), this, region) - child.borderAndPaddingLogicalWidth();
    470470}
  • trunk/Source/WebCore/rendering/RenderLineBoxList.cpp

    r179750 r182127  
    7777        line = nextLine;
    7878    }
    79     m_firstLineBox = m_lastLineBox = 0;
     79    m_firstLineBox = m_lastLineBox = nullptr;
    8080}
    8181
     
    8888        m_firstLineBox = 0;
    8989    if (box->prevLineBox())
    90         box->prevLineBox()->setNextLineBox(0);
    91     box->setPreviousLineBox(0);
     90        box->prevLineBox()->setNextLineBox(nullptr);
     91    box->setPreviousLineBox(nullptr);
    9292    for (InlineFlowBox* curr = box; curr; curr = curr->nextLineBox())
    9393        curr->setExtracted();
     
    139139            delete curr;
    140140        }
    141         m_firstLineBox = 0;
    142         m_lastLineBox = 0;
     141        m_firstLineBox = nullptr;
     142        m_lastLineBox = nullptr;
    143143    }
    144144}
     
    403403{
    404404#ifdef CHECK_CONSISTENCY
    405     const InlineFlowBox* prev = 0;
    406     for (const InlineFlowBox* child = m_firstLineBox; child != 0; child = child->nextLineBox()) {
     405    const InlineFlowBox* prev = nullptr;
     406    for (const InlineFlowBox* child = m_firstLineBox; child != nullptr; child = child->nextLineBox()) {
    407407        ASSERT(child->prevLineBox() == prev);
    408408        prev = child;
  • trunk/Source/WebCore/rendering/RenderLineBoxList.h

    r174714 r182127  
    4141public:
    4242    RenderLineBoxList()
    43         : m_firstLineBox(0)
    44         , m_lastLineBox(0)
     43        : m_firstLineBox(nullptr)
     44        , m_lastLineBox(nullptr)
    4545    {
    4646    }
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r180474 r182127  
    780780{
    781781    // FIXME: Return a RenderLayer that's scrollable.
    782     return 0;
     782    return nullptr;
    783783}
    784784
     
    825825void RenderListBox::setHasVerticalScrollbar(bool hasScrollbar)
    826826{
    827     if (hasScrollbar == (m_vBar != 0))
     827    if (hasScrollbar == (m_vBar != nullptr))
    828828        return;
    829829
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r177259 r182127  
    8181    virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& locationInContainer, const LayoutPoint& accumulatedOffset) override;
    8282
    83     virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) override;
     83    virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr) override;
    8484
    8585    virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const override;
     
    9090    virtual void layout() override;
    9191
    92     virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override;
     92    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = nullptr) override;
    9393
    9494    virtual bool canBeProgramaticallyScrolled() const override { return true; }
Note: See TracChangeset for help on using the changeset viewer.