Title: [190834] trunk/Source/WebCore
Revision
190834
Author
simon.fra...@apple.com
Date
2015-10-09 19:20:52 -0700 (Fri, 09 Oct 2015)

Log Message

Rename RenderObject::isRoot() to isDocumentElementRenderer()
https://bugs.webkit.org/show_bug.cgi?id=149976

Reviewed by Zalan Bujtas.

RenderObject::isRoot() was confusingly named, because it returns true for
the document element's renderer, not for the actual root (the RenderView).
In this way it mismatched RenderLayer::isRootLayer(), which returned true
for the RenderView's layer.

Rename it to the more accurate isDocumentElementRenderer().

* dom/Node.cpp:
(WebCore::Node::renderRect):
* page/ios/FrameIOS.mm:
(WebCore::Frame::renderRectForPoint):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::isSelectionRoot):
(WebCore::RenderBlock::selectionGaps):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::requiresColumns):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleWillChange):
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::updateFromStyle):
(WebCore::RenderBox::paintBackground):
(WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
(WebCore::RenderBox::repaintLayerRectsForImage):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::createsNewFormattingContext):
(WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
* rendering/RenderBox.h:
(WebCore::RenderBox::stretchesToViewport):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderBoxModelObject.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::rendererForRootBackground):
(WebCore::shouldRepaintForImageAnimation):
* rendering/RenderElement.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
* rendering/RenderLayer.cpp:
(WebCore::shouldSuppressPaintingLayer):
(WebCore::paintForFixedRootBackground):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::rendererBackgroundColor):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::styleDidChange):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintSlowRepaintObject):
(WebCore::RenderObject::offsetParent):
* rendering/RenderObject.h:
(WebCore::RenderObject::isDocumentElementRenderer):
(WebCore::RenderObject::isRoot): Deleted.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paint):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
(WebCore::RenderSVGRoot::shouldApplyViewportClip):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::isOverflowHidden):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (190833 => 190834)


--- trunk/Source/WebCore/ChangeLog	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/ChangeLog	2015-10-10 02:20:52 UTC (rev 190834)
@@ -1,3 +1,83 @@
+2015-10-09  Simon Fraser  <simon.fra...@apple.com>
+
+        Rename RenderObject::isRoot() to isDocumentElementRenderer()
+        https://bugs.webkit.org/show_bug.cgi?id=149976
+
+        Reviewed by Zalan Bujtas.
+
+        RenderObject::isRoot() was confusingly named, because it returns true for
+        the document element's renderer, not for the actual root (the RenderView).
+        In this way it mismatched RenderLayer::isRootLayer(), which returned true
+        for the RenderView's layer.
+        
+        Rename it to the more accurate isDocumentElementRenderer().
+
+        * dom/Node.cpp:
+        (WebCore::Node::renderRect):
+        * page/ios/FrameIOS.mm:
+        (WebCore::Frame::renderRectForPoint):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paint):
+        (WebCore::RenderBlock::isSelectionRoot):
+        (WebCore::RenderBlock::selectionGaps):
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
+        (WebCore::RenderBlockFlow::layoutBlock):
+        (WebCore::RenderBlockFlow::requiresColumns):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::styleWillChange):
+        (WebCore::RenderBox::styleDidChange):
+        (WebCore::RenderBox::updateFromStyle):
+        (WebCore::RenderBox::paintBackground):
+        (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
+        (WebCore::RenderBox::repaintLayerRectsForImage):
+        (WebCore::RenderBox::computeLogicalHeight):
+        (WebCore::RenderBox::computePercentageLogicalHeight):
+        (WebCore::RenderBox::createsNewFormattingContext):
+        (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::stretchesToViewport):
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+        (WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates):
+        (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
+        * rendering/RenderBoxModelObject.h:
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::styleWillChange):
+        (WebCore::RenderElement::rendererForRootBackground):
+        (WebCore::shouldRepaintForImageAnimation):
+        * rendering/RenderElement.h:
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::layoutBlock):
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::layoutBlock):
+        * rendering/RenderLayer.cpp:
+        (WebCore::shouldSuppressPaintingLayer):
+        (WebCore::paintForFixedRootBackground):
+        (WebCore::RenderLayer::paintLayerContents):
+        (WebCore::RenderLayer::calculateClipRects):
+        * rendering/RenderLayer.h:
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::rendererBackgroundColor):
+        (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
+        * rendering/RenderLayerModelObject.cpp:
+        (WebCore::RenderLayerModelObject::styleDidChange):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::repaintSlowRepaintObject):
+        (WebCore::RenderObject::offsetParent):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isDocumentElementRenderer):
+        (WebCore::RenderObject::isRoot): Deleted.
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::paint):
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::layout):
+        (WebCore::RenderSVGRoot::shouldApplyViewportClip):
+        * rendering/svg/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderSupport::isOverflowHidden):
+
 2015-10-09  Nan Wang  <n_w...@apple.com>
 
         AX: ARIA 1.1 implement aria-colcount, aria-colindex, aria-colspan, aria-rowcount, aria-rowindex and aria-rowspan

Modified: trunk/Source/WebCore/dom/Node.cpp (190833 => 190834)


--- trunk/Source/WebCore/dom/Node.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/dom/Node.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -721,7 +721,7 @@
     RenderObject* hitRenderer = this->renderer();
     ASSERT(hitRenderer);
     RenderObject* renderer = hitRenderer;
-    while (renderer && !renderer->isBody() && !renderer->isRoot()) {
+    while (renderer && !renderer->isBody() && !renderer->isDocumentElementRenderer()) {
         if (renderer->isRenderBlock() || renderer->isInlineBlockOrInlineTable() || renderer->isReplaced()) {
             *isReplaced = renderer->isReplaced();
             return renderer->absoluteBoundingBoxRect();

Modified: trunk/Source/WebCore/page/ios/FrameIOS.mm (190833 => 190834)


--- trunk/Source/WebCore/page/ios/FrameIOS.mm	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/page/ios/FrameIOS.mm	2015-10-10 02:20:52 UTC (rev 190834)
@@ -241,7 +241,7 @@
 #if RECT_LOGGING
     printf("\n%f %f\n", point.x, point.y);
 #endif
-    while (renderer && !renderer->isBody() && !renderer->isRoot()) {
+    while (renderer && !renderer->isBody() && !renderer->isDocumentElementRenderer()) {
 #if RECT_LOGGING
         CGRect rect = renderer->absoluteBoundingBoxRect(true);
         if (renderer->node()) {

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -1395,9 +1395,9 @@
     PaintPhase phase = paintInfo.phase;
 
     // Check if we need to do anything at all.
-    // FIXME: Could eliminate the isRoot() check if we fix background painting so that the RenderView
+    // FIXME: Could eliminate the isDocumentElementRenderer() check if we fix background painting so that the RenderView
     // paints the root's background.
-    if (!isRoot()) {
+    if (!isDocumentElementRenderer()) {
         LayoutRect overflowBox = overflowRectForPaintRejection(namedFlowFragment);
         flipForWritingMode(overflowBox);
         adjustRectWithMaximumOutline(phase, overflowBox);
@@ -1723,7 +1723,7 @@
     if (isTable())
         return false;
         
-    if (isBody() || isRoot() || hasOverflowClip()
+    if (isBody() || isDocumentElementRenderer() || hasOverflowClip()
         || isPositioned() || isFloating()
         || isTableCell() || isInlineBlockOrInlineTable()
         || hasTransform() || hasReflection() || hasMask() || isWritingModeRoot()
@@ -1833,9 +1833,10 @@
         rootBlock.flipForWritingMode(flippedBlockRect);
         flippedBlockRect.moveBy(rootBlockPhysicalPosition);
         clipOutPositionedObjects(paintInfo, flippedBlockRect.location(), positionedObjects());
-        if (isBody() || isRoot()) // The <body> must make sure to examine its containingBlock's positioned objects.
+        if (isBody() || isDocumentElementRenderer()) { // The <body> must make sure to examine its containingBlock's positioned objects.
             for (RenderBlock* cb = containingBlock(); cb && !cb->isRenderView(); cb = cb->containingBlock())
                 clipOutPositionedObjects(paintInfo, LayoutPoint(cb->x(), cb->y()), cb->positionedObjects()); // FIXME: Not right for flipped writing modes.
+        }
         clipOutFloatingObjects(rootBlock, paintInfo, rootBlockPhysicalPosition, offsetFromRootBlock);
     }
 

Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -213,7 +213,7 @@
     }
 
     // Inline blocks are covered by the isReplaced() check in the avoidFloats method.
-    if (avoidsFloats() || isRoot() || isRenderView() || isFloatingOrOutOfFlowPositioned() || isTableCell()) {
+    if (avoidsFloats() || isDocumentElementRenderer() || isRenderView() || isFloatingOrOutOfFlowPositioned() || isTableCell()) {
         if (m_floatingObjects)
             m_floatingObjects->clear();
         if (!oldIntrudingFloatSet.isEmpty())
@@ -521,7 +521,7 @@
     if (heightChanged)
         relayoutChildren = true;
 
-    layoutPositionedObjects(relayoutChildren || isRoot());
+    layoutPositionedObjects(relayoutChildren || isDocumentElementRenderer());
 
     // Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway).
     computeOverflow(oldClientAfterEdge);
@@ -3838,7 +3838,7 @@
 {
     // If overflow-y is set to paged-x or paged-y on the body or html element, we'll handle the paginating
     // in the RenderView instead.
-    bool isPaginated = (style().overflowY() == OPAGEDX || style().overflowY() == OPAGEDY) && !(isRoot() || isBody());
+    bool isPaginated = (style().overflowY() == OPAGEDX || style().overflowY() == OPAGEDY) && !(isDocumentElementRenderer() || isBody());
 
     return firstChild() && (desiredColumnCount != 1 || !style().hasAutoColumnWidth() || !style().hasInlineColumnAxis() || isPaginated);
 }

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -293,7 +293,7 @@
     if (oldStyle) {
         // The background of the root element or the body element could propagate up to
         // the canvas. Issue full repaint, when our style changes substantially.
-        if (diff >= StyleDifferenceRepaint && (isRoot() || isBody())) {
+        if (diff >= StyleDifferenceRepaint && (isDocumentElementRenderer() || isBody())) {
             view().repaintRootContents();
             if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFixedBackground())
                 view().compositor().rootFixedBackgroundsChanged();
@@ -373,20 +373,20 @@
     }
 
     bool isBodyRenderer = isBody();
-    bool isRootRenderer = isRoot();
+    bool isDocElementRenderer = isDocumentElementRenderer();
 
     // Set the text color if we're the body.
     if (isBodyRenderer)
         document().setTextColor(newStyle.visitedDependentColor(CSSPropertyColor));
 
-    if (isRootRenderer || isBodyRenderer) {
+    if (isDocElementRenderer || isBodyRenderer) {
         // Propagate the new writing mode and direction up to the RenderView.
         RenderStyle& viewStyle = view().style();
         bool viewChangedWritingMode = false;
         bool rootStyleChanged = false;
         bool viewStyleChanged = false;
         RenderObject* rootRenderer = isBodyRenderer ? document().documentElement()->renderer() : nullptr;
-        if (viewStyle.direction() != newStyle.direction() && (isRootRenderer || !document().directionSetOnDocumentElement())) {
+        if (viewStyle.direction() != newStyle.direction() && (isDocElementRenderer || !document().directionSetOnDocumentElement())) {
             viewStyle.setDirection(newStyle.direction());
             viewStyleChanged = true;
             if (isBodyRenderer) {
@@ -396,7 +396,7 @@
             setNeedsLayoutAndPrefWidthsRecalc();
         }
 
-        if (viewStyle.writingMode() != newStyle.writingMode() && (isRootRenderer || !document().writingModeSetOnDocumentElement())) {
+        if (viewStyle.writingMode() != newStyle.writingMode() && (isDocElementRenderer || !document().writingModeSetOnDocumentElement())) {
             viewStyle.setWritingMode(newStyle.writingMode());
             viewChangedWritingMode = true;
             viewStyleChanged = true;
@@ -477,17 +477,17 @@
     RenderBoxModelObject::updateFromStyle();
 
     const RenderStyle& styleToUse = style();
-    bool isRootObject = isRoot();
+    bool isDocElementRenderer = isDocumentElementRenderer();
     bool isViewObject = isRenderView();
 
     // The root and the RenderView always paint their backgrounds/borders.
-    if (isRootObject || isViewObject)
+    if (isDocElementRenderer || isViewObject)
         setHasBoxDecorations(true);
 
     setFloating(!isOutOfFlowPositioned() && styleToUse.isFloating());
 
     // We also handle <body> and <html>, whose overflow applies to the viewport.
-    if (styleToUse.overflowX() != OVISIBLE && !isRootObject && isRenderBlock()) {
+    if (styleToUse.overflowX() != OVISIBLE && !isDocElementRenderer && isRenderBlock()) {
         bool boxHasOverflowClip = true;
         if (isBody()) {
             // Overflow on the body can propagate to the viewport under the following conditions.
@@ -1325,7 +1325,7 @@
 
 void RenderBox::paintBackground(const PaintInfo& paintInfo, const LayoutRect& paintRect, BackgroundBleedAvoidance bleedAvoidance)
 {
-    if (isRoot()) {
+    if (isDocumentElementRenderer()) {
         paintRootBoxFillLayers(paintInfo);
         return;
     }
@@ -1463,7 +1463,7 @@
     if (!hasBackground())
         return false;
     // Table and root background painting is special.
-    if (isTable() || isRoot())
+    if (isTable() || isDocumentElementRenderer())
         return false;
 
     LayoutRect backgroundRect;
@@ -1670,7 +1670,7 @@
     for (const FillLayer* curLayer = layers; curLayer; curLayer = curLayer->next()) {
         if (curLayer->image() && image == curLayer->image()->data() && curLayer->image()->canRender(this, style().effectiveZoom())) {
             // Now that we know this image is being used, compute the renderer and the rect if we haven't already.
-            bool drawingRootBackground = drawingBackground && (isRoot() || (isBody() && !document().documentElement()->renderer()->hasBackground()));
+            bool drawingRootBackground = drawingBackground && (isDocumentElementRenderer() || (isBody() && !document().documentElement()->renderer()->hasBackground()));
             if (!layerRenderer) {
                 if (drawingRootBackground) {
                     layerRenderer = &view();
@@ -2801,11 +2801,11 @@
     // height since we don't set a height in RenderView when we're printing. So without this quirk, the 
     // height has nothing to be a percentage of, and it ends up being 0. That is bad.
     bool paginatedContentNeedsBaseHeight = document().printing() && h.isPercentOrCalculated()
-        && (isRoot() || (isBody() && document().documentElement()->renderer()->style().logicalHeight().isPercentOrCalculated())) && !isInline();
+        && (isDocumentElementRenderer() || (isBody() && document().documentElement()->renderer()->style().logicalHeight().isPercentOrCalculated())) && !isInline();
     if (stretchesToViewport() || paginatedContentNeedsBaseHeight) {
         LayoutUnit margins = collapsedMarginBefore() + collapsedMarginAfter();
         LayoutUnit visibleHeight = view().pageOrViewLogicalHeight();
-        if (isRoot())
+        if (isDocumentElementRenderer())
             computedValues.m_extent = std::max(computedValues.m_extent, visibleHeight - margins);
         else {
             LayoutUnit marginsBordersPadding = margins + parentBox()->marginBefore() + parentBox()->marginAfter() + parentBox()->borderAndPaddingLogicalHeight();
@@ -2879,7 +2879,7 @@
     LayoutUnit rootMarginBorderPaddingHeight = 0;
     bool isHorizontal = isHorizontalWritingMode();
     while (!cb->isRenderView() && skipContainingBlockForPercentHeightCalculation(cb, isHorizontal != cb->isHorizontalWritingMode())) {
-        if (cb->isBody() || cb->isRoot())
+        if (cb->isBody() || cb->isDocumentElementRenderer())
             rootMarginBorderPaddingHeight += cb->marginBefore() + cb->marginAfter() + cb->borderAndPaddingLogicalHeight();
         skippedAutoHeightContainingBlock = true;
         containingBlockChild = cb;
@@ -4381,7 +4381,7 @@
 bool RenderBox::createsNewFormattingContext() const
 {
     return (isInlineBlockOrInlineTable() && !isAnonymousInlineBlock()) || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
-        || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isRoot() || isRenderFlowThread() || isRenderRegion()
+        || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElementRenderer() || isRenderFlowThread() || isRenderRegion()
 #if ENABLE(CSS_GRID_LAYOUT)
         || isGridItem()
 #endif
@@ -4608,7 +4608,7 @@
         return percentageLogicalHeightIsResolvableFromBlock(cb->containingBlock(), cb->isOutOfFlowPositioned());
     if (cb->isRenderView() || inQuirksMode || isOutOfFlowPositionedWithSpecifiedHeight)
         return true;
-    if (cb->isRoot() && isOutOfFlowPositioned) {
+    if (cb->isDocumentElementRenderer() && isOutOfFlowPositioned) {
         // Match the positioned objects behavior, which is that positioned objects will fill their viewport
         // always.  Note we could only hit this case by recurring into computePercentageLogicalHeight on a positioned containing block.
         return true;

Modified: trunk/Source/WebCore/rendering/RenderBox.h (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderBox.h	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2015-10-10 02:20:52 UTC (rev 190834)
@@ -53,7 +53,7 @@
     // position:static elements that are not flex-items get their z-index coerced to auto.
     virtual bool requiresLayer() const override
     {
-        return isRoot() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip()
+        return isDocumentElementRenderer() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip()
             || hasTransformRelatedProperty() || hasHiddenBackface() || hasReflection() || style().specifiesColumns()
             || !style().hasAutoZIndex();
     }
@@ -407,7 +407,7 @@
 
     bool stretchesToViewport() const
     {
-        return document().inQuirksMode() && style().logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (isRoot() || isBody()) && !isInline();
+        return document().inQuirksMode() && style().logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (isDocumentElementRenderer() || isBody()) && !isInline();
     }
 
     virtual LayoutSize intrinsicSize() const { return LayoutSize(); }

Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -628,7 +628,7 @@
     bool hasRoundedBorder = style().hasBorderRadius() && (includeLeftEdge || includeRightEdge);
     bool clippedWithLocalScrolling = hasOverflowClip() && bgLayer->attachment() == LocalBackgroundAttachment;
     bool isBorderFill = bgLayer->clip() == BorderFillBox;
-    bool isRoot = this->isRoot();
+    bool isRoot = this->isDocumentElementRenderer();
 
     Color bgColor = color;
     StyleImage* bgImage = bgLayer->image();
@@ -1028,7 +1028,7 @@
 
 bool RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates() const
 {
-    if (!isRoot())
+    if (!isDocumentElementRenderer())
         return false;
 
     if (view().frameView().paintBehavior() & PaintBehaviorFlattenCompositingLayers)
@@ -1084,7 +1084,7 @@
         // The background of the box generated by the root element covers the entire canvas including
         // its margins. Since those were added in already, we have to factor them out when computing
         // the background positioning area.
-        if (isRoot()) {
+        if (isDocumentElementRenderer()) {
             positioningAreaSize = downcast<RenderBox>(*this).size() - LayoutSize(left + right, top + bottom);
             positioningAreaSize = LayoutSize(snapSizeToDevicePixel(positioningAreaSize, LayoutPoint(), deviceScaleFactor));
             if (view().frameView().hasExtendedBackgroundRectForPainting()) {

Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h	2015-10-10 02:20:52 UTC (rev 190834)
@@ -127,7 +127,7 @@
 
     virtual void updateFromStyle() override;
 
-    virtual bool requiresLayer() const override { return isRoot() || isPositioned() || createsGroup() || hasClipPath() || hasTransformRelatedProperty() || hasHiddenBackface() || hasReflection(); }
+    virtual bool requiresLayer() const override { return isDocumentElementRenderer() || isPositioned() || createsGroup() || hasClipPath() || hasTransformRelatedProperty() || hasHiddenBackface() || hasReflection(); }
 
     // This will work on inlines to return the bounding box of all of the lines' border boxes.
     virtual IntRect borderBoundingBox() const = 0;

Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -321,7 +321,7 @@
     if (previousSize.height() != height())
         relayoutChildren = true;
 
-    layoutPositionedObjects(relayoutChildren || isRoot());
+    layoutPositionedObjects(relayoutChildren || isDocumentElementRenderer());
 
     computeOverflow(oldClientAfterEdge);
 

Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderElement.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -895,7 +895,7 @@
 
         bool newStyleSlowScroll = repaintFixedBackgroundsOnScroll && newStyleUsesFixedBackgrounds;
         bool oldStyleSlowScroll = oldStyle && repaintFixedBackgroundsOnScroll && oldStyleUsesFixedBackgrounds;
-        bool drawsRootBackground = isRoot() || (isBody() && !rendererHasBackground(document().documentElement()->renderer()));
+        bool drawsRootBackground = isDocumentElementRenderer() || (isBody() && !rendererHasBackground(document().documentElement()->renderer()));
         if (drawsRootBackground && repaintFixedBackgroundsOnScroll) {
             if (view().compositor().supportsFixedRootBackgroundCompositing()) {
                 if (newStyleSlowScroll && newStyle.hasEntirelyFixedBackground())
@@ -915,7 +915,7 @@
         }
     }
 
-    if (isRoot() || isBody())
+    if (isDocumentElementRenderer() || isBody())
         view().frameView().updateExtendBackgroundIfNecessary();
 
     if (!oldStyle || (oldStyle->outlineSize() != newStyle.outlineSize()
@@ -1155,7 +1155,7 @@
 
 RenderElement& RenderElement::rendererForRootBackground()
 {
-    ASSERT(isRoot());
+    ASSERT(isDocumentElementRenderer());
     if (!hasBackground() && is<HTMLHtmlElement>(element())) {
         // Locate the <body> element using the DOM. This is easier than trying
         // to crawl around a render tree with potential :before/:after content and
@@ -1441,10 +1441,10 @@
     // FIXME: This is overly conservative as the image may not be a background-image, in which case it will not
     // be propagated to the root. At this point, we unfortunately don't have access to the image anymore so we
     // can no longer check if it is a background image.
-    bool backgroundIsPaintedByRoot = renderer.isRoot();
+    bool backgroundIsPaintedByRoot = renderer.isDocumentElementRenderer();
     if (renderer.isBody()) {
         auto& rootRenderer = *renderer.parent(); // If <body> has a renderer then <html> does too.
-        ASSERT(rootRenderer.isRoot());
+        ASSERT(rootRenderer.isDocumentElementRenderer());
         ASSERT(is<HTMLHtmlElement>(rootRenderer.element()));
         // FIXME: Should share body background propagation code.
         backgroundIsPaintedByRoot = !rootRenderer.hasBackground();

Modified: trunk/Source/WebCore/rendering/RenderElement.h (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderElement.h	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderElement.h	2015-10-10 02:20:52 UTC (rev 190834)
@@ -134,7 +134,7 @@
     /* This function performs a layout only if one is needed. */
     void layoutIfNeeded() { if (needsLayout()) layout(); }
 
-    // Return the renderer whose background style is used to paint the root background. Should only be called on the renderer for which isRoot() is true.
+    // Return the renderer whose background style is used to paint the root background. Should only be called on the renderer for which isDocumentElementRenderer() is true.
     RenderElement& rendererForRootBackground();
 
     // Used only by Element::pseudoStyleCacheIsInvalid to get a first line style based off of a

Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -279,7 +279,7 @@
     if (logicalHeight() != previousHeight)
         relayoutChildren = true;
 
-    layoutPositionedObjects(relayoutChildren || isRoot());
+    layoutPositionedObjects(relayoutChildren || isDocumentElementRenderer());
 
     repaintChildrenDuringLayoutIfMoved(oldChildRects);
     // FIXME: css3/flexbox/repaint-rtl-column.html seems to repaint more overflow than it needs to.

Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderGrid.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -320,7 +320,7 @@
     if (size() != previousSize)
         relayoutChildren = true;
 
-    layoutPositionedObjects(relayoutChildren || isRoot());
+    layoutPositionedObjects(relayoutChildren || isDocumentElementRenderer());
 
     computeOverflow(oldClientAfterEdge);
     statePusher.pop();

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -3864,7 +3864,7 @@
     // Avoid painting descendants of the root layer when stylesheets haven't loaded. This eliminates FOUC.
     // It's ok not to draw, because later on, when all the stylesheets do load, updateStyleSelector on the Document
     // will do a full repaint().
-    if (layer->renderer().document().didLayoutWithPendingStylesheets() && !layer->isRootLayer() && !layer->renderer().isRoot())
+    if (layer->renderer().document().didLayoutWithPendingStylesheets() && !layer->isRootLayer() && !layer->renderer().isDocumentElementRenderer())
         return true;
 
     // Avoid painting all layers if the document is in a state where visual updates aren't allowed.
@@ -3877,7 +3877,7 @@
 
 static inline bool paintForFixedRootBackground(const RenderLayer* layer, RenderLayer::PaintLayerFlags paintFlags)
 {
-    return layer->renderer().isRoot() && (paintFlags & RenderLayer::PaintLayerPaintingRootBackgroundOnly);
+    return layer->renderer().isDocumentElementRenderer() && (paintFlags & RenderLayer::PaintLayerPaintingRootBackgroundOnly);
 }
 
 void RenderLayer::paintLayer(GraphicsContext& context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
@@ -4234,7 +4234,7 @@
         || (!isPaintingScrollingContent && isPaintingCompositedForeground));
     bool shouldPaintContent = m_hasVisibleContent && isSelfPaintingLayer && !isPaintingOverlayScrollbars;
 
-    if (localPaintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer().isRenderView() && !renderer().isRoot())
+    if (localPaintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer().isRenderView() && !renderer().isDocumentElementRenderer())
         return;
 
     // Ensure our lists are up-to-date.
@@ -5759,9 +5759,9 @@
 bool RenderLayer::intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& damageRect, const RenderLayer* rootLayer, const LayoutSize& offsetFromRoot, const LayoutRect* cachedBoundingBox) const
 {
     // Always examine the canvas and the root.
-    // FIXME: Could eliminate the isRoot() check if we fix background painting so that the RenderView
+    // FIXME: Could eliminate the isDocumentElementRenderer() check if we fix background painting so that the RenderView
     // paints the root's background.
-    if (isRootLayer() || renderer().isRoot())
+    if (isRootLayer() || renderer().isDocumentElementRenderer())
         return true;
 
     if (damageRect.isEmpty())
@@ -5932,7 +5932,7 @@
             renderer().containingBlock()->flipForWritingMode(boundingBoxRect);
     }
 
-    if (renderer().isRoot()) {
+    if (renderer().isDocumentElementRenderer()) {
         // If the root layer becomes composited (e.g. because some descendant with negative z-index is composited),
         // then it has to be big enough to cover the viewport in order to display the background. This is akin
         // to the code in RenderBox::paintRootBoxFillLayers().
@@ -6127,7 +6127,7 @@
     if (paintsWithTransparency(PaintBehaviorNormal))
         return false;
 
-    if (renderer().isRoot()) {
+    if (renderer().isDocumentElementRenderer()) {
         // Normally the document element doens't have a layer.  If it does have a layer, its background propagates to the RenderView
         // so this layer doesn't draw it.
         return false;

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2015-10-10 02:20:52 UTC (rev 190834)
@@ -616,7 +616,7 @@
 
     bool paintsWithTransparency(PaintBehavior paintBehavior) const
     {
-        return (isTransparent() || hasBlendMode() || (isolatesBlending() && !renderer().isRoot())) && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || !isComposited());
+        return (isTransparent() || hasBlendMode() || (isolatesBlending() && !renderer().isDocumentElementRenderer())) && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || !isComposited());
     }
 
     bool paintsWithTransform(PaintBehavior) const;

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -1703,7 +1703,7 @@
 
 Color RenderLayerBacking::rendererBackgroundColor() const
 {
-    const auto& backgroundRenderer = renderer().isRoot() ? renderer().rendererForRootBackground() : renderer();
+    const auto& backgroundRenderer = renderer().isDocumentElementRenderer() ? renderer().rendererForRootBackground() : renderer();
     return backgroundRenderer.style().visitedDependentColor(CSSPropertyBackgroundColor);
 }
 
@@ -1860,7 +1860,7 @@
     if (renderer().isRenderNamedFlowFragmentContainer())
         return false;
 
-    if (renderer().isRoot() && m_owningLayer.isolatesCompositedBlending())
+    if (renderer().isDocumentElementRenderer() && m_owningLayer.isolatesCompositedBlending())
         return false;
 
     if (renderer().isRenderView()) {

Modified: trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -190,7 +190,7 @@
         if (RenderLayer* renderLayer = layer()) {
             renderLayer->updateSnapOffsets();
             renderLayer->updateScrollSnapState();
-        } else if (isBody() || isRoot()) {
+        } else if (isBody() || isDocumentElementRenderer()) {
             FrameView& frameView = view().frameView();
             frameView.updateSnapOffsets();
             frameView.updateScrollSnapState();
@@ -204,7 +204,7 @@
             if (style.scrollSnapType() != ScrollSnapType::None) {
                 scrollSnapBox->layer()->updateSnapOffsets();
                 scrollSnapBox->layer()->updateScrollSnapState();
-                if (scrollSnapBox->isBody() || scrollSnapBox->isRoot())
+                if (scrollSnapBox->isBody() || scrollSnapBox->isDocumentElementRenderer())
                     scrollSnapBox->view().frameView().updateScrollingCoordinatorScrollSnapProperties();
             }
         }

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -966,7 +966,7 @@
     IntRect repaintRect;
     // If this is the root background, we need to check if there is an extended background rect. If
     // there is, then we should not allow painting to clip to the layer size.
-    if (isRoot() || isBody()) {
+    if (isDocumentElementRenderer() || isBody()) {
         shouldClipToLayer = !view.frameView().hasExtendedBackgroundRectForPainting();
         repaintRect = snappedIntRect(view.backgroundRect());
     } else
@@ -1915,7 +1915,7 @@
     // A is the root element.
     // A is the HTML body element.
     // The computed value of the position property for element A is fixed.
-    if (isRoot() || isBody() || (isOutOfFlowPositioned() && style().position() == FixedPosition))
+    if (isDocumentElementRenderer() || isBody() || (isOutOfFlowPositioned() && style().position() == FixedPosition))
         return nullptr;
 
     // If A is an area HTML element which has a map HTML element somewhere in the ancestor

Modified: trunk/Source/WebCore/rendering/RenderObject.h (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderObject.h	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderObject.h	2015-10-10 02:20:52 UTC (rev 190834)
@@ -345,7 +345,7 @@
 
     virtual bool isRenderScrollbarPart() const { return false; }
 
-    bool isRoot() const { return document().documentElement() == &m_node; }
+    bool isDocumentElementRenderer() const { return document().documentElement() == &m_node; }
     bool isBody() const { return node() && node()->hasTagName(HTMLNames::bodyTag); }
     bool isHR() const { return node() && node()->hasTagName(HTMLNames::hrTag); }
     bool isLegend() const;

Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/RenderTable.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -658,7 +658,7 @@
 
     PaintPhase paintPhase = paintInfo.phase;
 
-    if (!isRoot()) {
+    if (!isDocumentElementRenderer()) {
         LayoutRect overflowBox = visualOverflowRect();
         adjustRectWithMaximumOutline(paintInfo.phase, overflowBox);
         flipForWritingMode(overflowBox);

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -202,7 +202,7 @@
     }
 
     updateLayerTransform();
-    m_hasBoxDecorations = isRoot() ? hasBoxDecorationStyle() : hasBoxDecorations();
+    m_hasBoxDecorations = isDocumentElementRenderer() ? hasBoxDecorationStyle() : hasBoxDecorations();
     invalidateBackgroundObscurationStatus();
 
     repainter.repaintAfterLayout();
@@ -218,7 +218,7 @@
     return style().overflowX() == OHIDDEN
         || style().overflowX() == OAUTO
         || style().overflowX() == OSCROLL
-        || this->isRoot();
+        || this->isDocumentElementRenderer();
 }
 
 void RenderSVGRoot::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOffset)

Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp (190833 => 190834)


--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp	2015-10-10 01:08:32 UTC (rev 190833)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp	2015-10-10 02:20:52 UTC (rev 190834)
@@ -299,7 +299,7 @@
 bool SVGRenderSupport::isOverflowHidden(const RenderElement& renderer)
 {
     // RenderSVGRoot should never query for overflow state - it should always clip itself to the initial viewport size.
-    ASSERT(!renderer.isRoot());
+    ASSERT(!renderer.isDocumentElementRenderer());
 
     return renderer.style().overflowX() == OHIDDEN || renderer.style().overflowX() == OSCROLL;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to