Changeset 190834 in webkit
- Timestamp:
- Oct 9, 2015 7:20:52 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r190833 r190834 1 2015-10-09 Simon Fraser <simon.fraser@apple.com> 2 3 Rename RenderObject::isRoot() to isDocumentElementRenderer() 4 https://bugs.webkit.org/show_bug.cgi?id=149976 5 6 Reviewed by Zalan Bujtas. 7 8 RenderObject::isRoot() was confusingly named, because it returns true for 9 the document element's renderer, not for the actual root (the RenderView). 10 In this way it mismatched RenderLayer::isRootLayer(), which returned true 11 for the RenderView's layer. 12 13 Rename it to the more accurate isDocumentElementRenderer(). 14 15 * dom/Node.cpp: 16 (WebCore::Node::renderRect): 17 * page/ios/FrameIOS.mm: 18 (WebCore::Frame::renderRectForPoint): 19 * rendering/RenderBlock.cpp: 20 (WebCore::RenderBlock::paint): 21 (WebCore::RenderBlock::isSelectionRoot): 22 (WebCore::RenderBlock::selectionGaps): 23 * rendering/RenderBlockFlow.cpp: 24 (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats): 25 (WebCore::RenderBlockFlow::layoutBlock): 26 (WebCore::RenderBlockFlow::requiresColumns): 27 * rendering/RenderBox.cpp: 28 (WebCore::RenderBox::styleWillChange): 29 (WebCore::RenderBox::styleDidChange): 30 (WebCore::RenderBox::updateFromStyle): 31 (WebCore::RenderBox::paintBackground): 32 (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured): 33 (WebCore::RenderBox::repaintLayerRectsForImage): 34 (WebCore::RenderBox::computeLogicalHeight): 35 (WebCore::RenderBox::computePercentageLogicalHeight): 36 (WebCore::RenderBox::createsNewFormattingContext): 37 (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock): 38 * rendering/RenderBox.h: 39 (WebCore::RenderBox::stretchesToViewport): 40 * rendering/RenderBoxModelObject.cpp: 41 (WebCore::RenderBoxModelObject::paintFillLayerExtended): 42 (WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates): 43 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): 44 * rendering/RenderBoxModelObject.h: 45 * rendering/RenderDeprecatedFlexibleBox.cpp: 46 (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): 47 * rendering/RenderElement.cpp: 48 (WebCore::RenderElement::styleWillChange): 49 (WebCore::RenderElement::rendererForRootBackground): 50 (WebCore::shouldRepaintForImageAnimation): 51 * rendering/RenderElement.h: 52 * rendering/RenderFlexibleBox.cpp: 53 (WebCore::RenderFlexibleBox::layoutBlock): 54 * rendering/RenderGrid.cpp: 55 (WebCore::RenderGrid::layoutBlock): 56 * rendering/RenderLayer.cpp: 57 (WebCore::shouldSuppressPaintingLayer): 58 (WebCore::paintForFixedRootBackground): 59 (WebCore::RenderLayer::paintLayerContents): 60 (WebCore::RenderLayer::calculateClipRects): 61 * rendering/RenderLayer.h: 62 * rendering/RenderLayerBacking.cpp: 63 (WebCore::RenderLayerBacking::rendererBackgroundColor): 64 (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): 65 * rendering/RenderLayerModelObject.cpp: 66 (WebCore::RenderLayerModelObject::styleDidChange): 67 * rendering/RenderObject.cpp: 68 (WebCore::RenderObject::repaintSlowRepaintObject): 69 (WebCore::RenderObject::offsetParent): 70 * rendering/RenderObject.h: 71 (WebCore::RenderObject::isDocumentElementRenderer): 72 (WebCore::RenderObject::isRoot): Deleted. 73 * rendering/RenderTable.cpp: 74 (WebCore::RenderTable::paint): 75 * rendering/svg/RenderSVGRoot.cpp: 76 (WebCore::RenderSVGRoot::layout): 77 (WebCore::RenderSVGRoot::shouldApplyViewportClip): 78 * rendering/svg/SVGRenderSupport.cpp: 79 (WebCore::SVGRenderSupport::isOverflowHidden): 80 1 81 2015-10-09 Nan Wang <n_wang@apple.com> 2 82 -
trunk/Source/WebCore/dom/Node.cpp
r190530 r190834 722 722 ASSERT(hitRenderer); 723 723 RenderObject* renderer = hitRenderer; 724 while (renderer && !renderer->isBody() && !renderer->is Root()) {724 while (renderer && !renderer->isBody() && !renderer->isDocumentElementRenderer()) { 725 725 if (renderer->isRenderBlock() || renderer->isInlineBlockOrInlineTable() || renderer->isReplaced()) { 726 726 *isReplaced = renderer->isReplaced(); -
trunk/Source/WebCore/page/ios/FrameIOS.mm
r189576 r190834 242 242 printf("\n%f %f\n", point.x, point.y); 243 243 #endif 244 while (renderer && !renderer->isBody() && !renderer->is Root()) {244 while (renderer && !renderer->isBody() && !renderer->isDocumentElementRenderer()) { 245 245 #if RECT_LOGGING 246 246 CGRect rect = renderer->absoluteBoundingBoxRect(true); -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r190169 r190834 1396 1396 1397 1397 // Check if we need to do anything at all. 1398 // FIXME: Could eliminate the is Root() check if we fix background painting so that the RenderView1398 // FIXME: Could eliminate the isDocumentElementRenderer() check if we fix background painting so that the RenderView 1399 1399 // paints the root's background. 1400 if (!is Root()) {1400 if (!isDocumentElementRenderer()) { 1401 1401 LayoutRect overflowBox = overflowRectForPaintRejection(namedFlowFragment); 1402 1402 flipForWritingMode(overflowBox); … … 1724 1724 return false; 1725 1725 1726 if (isBody() || is Root() || hasOverflowClip()1726 if (isBody() || isDocumentElementRenderer() || hasOverflowClip() 1727 1727 || isPositioned() || isFloating() 1728 1728 || isTableCell() || isInlineBlockOrInlineTable() … … 1834 1834 flippedBlockRect.moveBy(rootBlockPhysicalPosition); 1835 1835 clipOutPositionedObjects(paintInfo, flippedBlockRect.location(), positionedObjects()); 1836 if (isBody() || is Root())// The <body> must make sure to examine its containingBlock's positioned objects.1836 if (isBody() || isDocumentElementRenderer()) { // The <body> must make sure to examine its containingBlock's positioned objects. 1837 1837 for (RenderBlock* cb = containingBlock(); cb && !cb->isRenderView(); cb = cb->containingBlock()) 1838 1838 clipOutPositionedObjects(paintInfo, LayoutPoint(cb->x(), cb->y()), cb->positionedObjects()); // FIXME: Not right for flipped writing modes. 1839 } 1839 1840 clipOutFloatingObjects(rootBlock, paintInfo, rootBlockPhysicalPosition, offsetFromRootBlock); 1840 1841 } -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r189830 r190834 214 214 215 215 // Inline blocks are covered by the isReplaced() check in the avoidFloats method. 216 if (avoidsFloats() || is Root() || isRenderView() || isFloatingOrOutOfFlowPositioned() || isTableCell()) {216 if (avoidsFloats() || isDocumentElementRenderer() || isRenderView() || isFloatingOrOutOfFlowPositioned() || isTableCell()) { 217 217 if (m_floatingObjects) 218 218 m_floatingObjects->clear(); … … 522 522 relayoutChildren = true; 523 523 524 layoutPositionedObjects(relayoutChildren || is Root());524 layoutPositionedObjects(relayoutChildren || isDocumentElementRenderer()); 525 525 526 526 // Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway). … … 3839 3839 // If overflow-y is set to paged-x or paged-y on the body or html element, we'll handle the paginating 3840 3840 // in the RenderView instead. 3841 bool isPaginated = (style().overflowY() == OPAGEDX || style().overflowY() == OPAGEDY) && !(is Root() || isBody());3841 bool isPaginated = (style().overflowY() == OPAGEDX || style().overflowY() == OPAGEDY) && !(isDocumentElementRenderer() || isBody()); 3842 3842 3843 3843 return firstChild() && (desiredColumnCount != 1 || !style().hasAutoColumnWidth() || !style().hasInlineColumnAxis() || isPaginated); -
trunk/Source/WebCore/rendering/RenderBox.cpp
r190732 r190834 294 294 // The background of the root element or the body element could propagate up to 295 295 // the canvas. Issue full repaint, when our style changes substantially. 296 if (diff >= StyleDifferenceRepaint && (is Root() || isBody())) {296 if (diff >= StyleDifferenceRepaint && (isDocumentElementRenderer() || isBody())) { 297 297 view().repaintRootContents(); 298 298 if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFixedBackground()) … … 374 374 375 375 bool isBodyRenderer = isBody(); 376 bool is RootRenderer = isRoot();376 bool isDocElementRenderer = isDocumentElementRenderer(); 377 377 378 378 // Set the text color if we're the body. … … 380 380 document().setTextColor(newStyle.visitedDependentColor(CSSPropertyColor)); 381 381 382 if (is RootRenderer || isBodyRenderer) {382 if (isDocElementRenderer || isBodyRenderer) { 383 383 // Propagate the new writing mode and direction up to the RenderView. 384 384 RenderStyle& viewStyle = view().style(); … … 387 387 bool viewStyleChanged = false; 388 388 RenderObject* rootRenderer = isBodyRenderer ? document().documentElement()->renderer() : nullptr; 389 if (viewStyle.direction() != newStyle.direction() && (is RootRenderer || !document().directionSetOnDocumentElement())) {389 if (viewStyle.direction() != newStyle.direction() && (isDocElementRenderer || !document().directionSetOnDocumentElement())) { 390 390 viewStyle.setDirection(newStyle.direction()); 391 391 viewStyleChanged = true; … … 397 397 } 398 398 399 if (viewStyle.writingMode() != newStyle.writingMode() && (is RootRenderer || !document().writingModeSetOnDocumentElement())) {399 if (viewStyle.writingMode() != newStyle.writingMode() && (isDocElementRenderer || !document().writingModeSetOnDocumentElement())) { 400 400 viewStyle.setWritingMode(newStyle.writingMode()); 401 401 viewChangedWritingMode = true; … … 478 478 479 479 const RenderStyle& styleToUse = style(); 480 bool is RootObject = isRoot();480 bool isDocElementRenderer = isDocumentElementRenderer(); 481 481 bool isViewObject = isRenderView(); 482 482 483 483 // The root and the RenderView always paint their backgrounds/borders. 484 if (is RootObject|| isViewObject)484 if (isDocElementRenderer || isViewObject) 485 485 setHasBoxDecorations(true); 486 486 … … 488 488 489 489 // We also handle <body> and <html>, whose overflow applies to the viewport. 490 if (styleToUse.overflowX() != OVISIBLE && !is RootObject&& isRenderBlock()) {490 if (styleToUse.overflowX() != OVISIBLE && !isDocElementRenderer && isRenderBlock()) { 491 491 bool boxHasOverflowClip = true; 492 492 if (isBody()) { … … 1326 1326 void RenderBox::paintBackground(const PaintInfo& paintInfo, const LayoutRect& paintRect, BackgroundBleedAvoidance bleedAvoidance) 1327 1327 { 1328 if (is Root()) {1328 if (isDocumentElementRenderer()) { 1329 1329 paintRootBoxFillLayers(paintInfo); 1330 1330 return; … … 1464 1464 return false; 1465 1465 // Table and root background painting is special. 1466 if (isTable() || is Root())1466 if (isTable() || isDocumentElementRenderer()) 1467 1467 return false; 1468 1468 … … 1671 1671 if (curLayer->image() && image == curLayer->image()->data() && curLayer->image()->canRender(this, style().effectiveZoom())) { 1672 1672 // Now that we know this image is being used, compute the renderer and the rect if we haven't already. 1673 bool drawingRootBackground = drawingBackground && (is Root() || (isBody() && !document().documentElement()->renderer()->hasBackground()));1673 bool drawingRootBackground = drawingBackground && (isDocumentElementRenderer() || (isBody() && !document().documentElement()->renderer()->hasBackground())); 1674 1674 if (!layerRenderer) { 1675 1675 if (drawingRootBackground) { … … 2802 2802 // height has nothing to be a percentage of, and it ends up being 0. That is bad. 2803 2803 bool paginatedContentNeedsBaseHeight = document().printing() && h.isPercentOrCalculated() 2804 && (is Root() || (isBody() && document().documentElement()->renderer()->style().logicalHeight().isPercentOrCalculated())) && !isInline();2804 && (isDocumentElementRenderer() || (isBody() && document().documentElement()->renderer()->style().logicalHeight().isPercentOrCalculated())) && !isInline(); 2805 2805 if (stretchesToViewport() || paginatedContentNeedsBaseHeight) { 2806 2806 LayoutUnit margins = collapsedMarginBefore() + collapsedMarginAfter(); 2807 2807 LayoutUnit visibleHeight = view().pageOrViewLogicalHeight(); 2808 if (is Root())2808 if (isDocumentElementRenderer()) 2809 2809 computedValues.m_extent = std::max(computedValues.m_extent, visibleHeight - margins); 2810 2810 else { … … 2880 2880 bool isHorizontal = isHorizontalWritingMode(); 2881 2881 while (!cb->isRenderView() && skipContainingBlockForPercentHeightCalculation(cb, isHorizontal != cb->isHorizontalWritingMode())) { 2882 if (cb->isBody() || cb->is Root())2882 if (cb->isBody() || cb->isDocumentElementRenderer()) 2883 2883 rootMarginBorderPaddingHeight += cb->marginBefore() + cb->marginAfter() + cb->borderAndPaddingLogicalHeight(); 2884 2884 skippedAutoHeightContainingBlock = true; … … 4382 4382 { 4383 4383 return (isInlineBlockOrInlineTable() && !isAnonymousInlineBlock()) || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated() 4384 || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || is Root() || isRenderFlowThread() || isRenderRegion()4384 || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElementRenderer() || isRenderFlowThread() || isRenderRegion() 4385 4385 #if ENABLE(CSS_GRID_LAYOUT) 4386 4386 || isGridItem() … … 4609 4609 if (cb->isRenderView() || inQuirksMode || isOutOfFlowPositionedWithSpecifiedHeight) 4610 4610 return true; 4611 if (cb->is Root() && isOutOfFlowPositioned) {4611 if (cb->isDocumentElementRenderer() && isOutOfFlowPositioned) { 4612 4612 // Match the positioned objects behavior, which is that positioned objects will fill their viewport 4613 4613 // always. Note we could only hit this case by recurring into computePercentageLogicalHeight on a positioned containing block. -
trunk/Source/WebCore/rendering/RenderBox.h
r190685 r190834 54 54 virtual bool requiresLayer() const override 55 55 { 56 return is Root() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip()56 return isDocumentElementRenderer() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip() 57 57 || hasTransformRelatedProperty() || hasHiddenBackface() || hasReflection() || style().specifiesColumns() 58 58 || !style().hasAutoZIndex(); … … 408 408 bool stretchesToViewport() const 409 409 { 410 return document().inQuirksMode() && style().logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (is Root() || isBody()) && !isInline();410 return document().inQuirksMode() && style().logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (isDocumentElementRenderer() || isBody()) && !isInline(); 411 411 } 412 412 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r189144 r190834 629 629 bool clippedWithLocalScrolling = hasOverflowClip() && bgLayer->attachment() == LocalBackgroundAttachment; 630 630 bool isBorderFill = bgLayer->clip() == BorderFillBox; 631 bool isRoot = this->is Root();631 bool isRoot = this->isDocumentElementRenderer(); 632 632 633 633 Color bgColor = color; … … 1029 1029 bool RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates() const 1030 1030 { 1031 if (!is Root())1031 if (!isDocumentElementRenderer()) 1032 1032 return false; 1033 1033 … … 1085 1085 // its margins. Since those were added in already, we have to factor them out when computing 1086 1086 // the background positioning area. 1087 if (is Root()) {1087 if (isDocumentElementRenderer()) { 1088 1088 positioningAreaSize = downcast<RenderBox>(*this).size() - LayoutSize(left + right, top + bottom); 1089 1089 positioningAreaSize = LayoutSize(snapSizeToDevicePixel(positioningAreaSize, LayoutPoint(), deviceScaleFactor)); -
trunk/Source/WebCore/rendering/RenderBoxModelObject.h
r189144 r190834 128 128 virtual void updateFromStyle() override; 129 129 130 virtual bool requiresLayer() const override { return is Root() || isPositioned() || createsGroup() || hasClipPath() || hasTransformRelatedProperty() || hasHiddenBackface() || hasReflection(); }130 virtual bool requiresLayer() const override { return isDocumentElementRenderer() || isPositioned() || createsGroup() || hasClipPath() || hasTransformRelatedProperty() || hasHiddenBackface() || hasReflection(); } 131 131 132 132 // This will work on inlines to return the bounding box of all of the lines' border boxes. -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
r184339 r190834 322 322 relayoutChildren = true; 323 323 324 layoutPositionedObjects(relayoutChildren || is Root());324 layoutPositionedObjects(relayoutChildren || isDocumentElementRenderer()); 325 325 326 326 computeOverflow(oldClientAfterEdge); -
trunk/Source/WebCore/rendering/RenderElement.cpp
r190169 r190834 896 896 bool newStyleSlowScroll = repaintFixedBackgroundsOnScroll && newStyleUsesFixedBackgrounds; 897 897 bool oldStyleSlowScroll = oldStyle && repaintFixedBackgroundsOnScroll && oldStyleUsesFixedBackgrounds; 898 bool drawsRootBackground = is Root() || (isBody() && !rendererHasBackground(document().documentElement()->renderer()));898 bool drawsRootBackground = isDocumentElementRenderer() || (isBody() && !rendererHasBackground(document().documentElement()->renderer())); 899 899 if (drawsRootBackground && repaintFixedBackgroundsOnScroll) { 900 900 if (view().compositor().supportsFixedRootBackgroundCompositing()) { … … 916 916 } 917 917 918 if (is Root() || isBody())918 if (isDocumentElementRenderer() || isBody()) 919 919 view().frameView().updateExtendBackgroundIfNecessary(); 920 920 … … 1156 1156 RenderElement& RenderElement::rendererForRootBackground() 1157 1157 { 1158 ASSERT(is Root());1158 ASSERT(isDocumentElementRenderer()); 1159 1159 if (!hasBackground() && is<HTMLHtmlElement>(element())) { 1160 1160 // Locate the <body> element using the DOM. This is easier than trying … … 1442 1442 // be propagated to the root. At this point, we unfortunately don't have access to the image anymore so we 1443 1443 // can no longer check if it is a background image. 1444 bool backgroundIsPaintedByRoot = renderer.is Root();1444 bool backgroundIsPaintedByRoot = renderer.isDocumentElementRenderer(); 1445 1445 if (renderer.isBody()) { 1446 1446 auto& rootRenderer = *renderer.parent(); // If <body> has a renderer then <html> does too. 1447 ASSERT(rootRenderer.is Root());1447 ASSERT(rootRenderer.isDocumentElementRenderer()); 1448 1448 ASSERT(is<HTMLHtmlElement>(rootRenderer.element())); 1449 1449 // FIXME: Should share body background propagation code. -
trunk/Source/WebCore/rendering/RenderElement.h
r190169 r190834 135 135 void layoutIfNeeded() { if (needsLayout()) layout(); } 136 136 137 // Return the renderer whose background style is used to paint the root background. Should only be called on the renderer for which is Root() is true.137 // 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. 138 138 RenderElement& rendererForRootBackground(); 139 139 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r190484 r190834 280 280 relayoutChildren = true; 281 281 282 layoutPositionedObjects(relayoutChildren || is Root());282 layoutPositionedObjects(relayoutChildren || isDocumentElementRenderer()); 283 283 284 284 repaintChildrenDuringLayoutIfMoved(oldChildRects); -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r190784 r190834 321 321 relayoutChildren = true; 322 322 323 layoutPositionedObjects(relayoutChildren || is Root());323 layoutPositionedObjects(relayoutChildren || isDocumentElementRenderer()); 324 324 325 325 computeOverflow(oldClientAfterEdge); -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r190820 r190834 3865 3865 // It's ok not to draw, because later on, when all the stylesheets do load, updateStyleSelector on the Document 3866 3866 // will do a full repaint(). 3867 if (layer->renderer().document().didLayoutWithPendingStylesheets() && !layer->isRootLayer() && !layer->renderer().is Root())3867 if (layer->renderer().document().didLayoutWithPendingStylesheets() && !layer->isRootLayer() && !layer->renderer().isDocumentElementRenderer()) 3868 3868 return true; 3869 3869 … … 3878 3878 static inline bool paintForFixedRootBackground(const RenderLayer* layer, RenderLayer::PaintLayerFlags paintFlags) 3879 3879 { 3880 return layer->renderer().is Root() && (paintFlags & RenderLayer::PaintLayerPaintingRootBackgroundOnly);3880 return layer->renderer().isDocumentElementRenderer() && (paintFlags & RenderLayer::PaintLayerPaintingRootBackgroundOnly); 3881 3881 } 3882 3882 … … 4235 4235 bool shouldPaintContent = m_hasVisibleContent && isSelfPaintingLayer && !isPaintingOverlayScrollbars; 4236 4236 4237 if (localPaintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer().isRenderView() && !renderer().is Root())4237 if (localPaintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer().isRenderView() && !renderer().isDocumentElementRenderer()) 4238 4238 return; 4239 4239 … … 5760 5760 { 5761 5761 // Always examine the canvas and the root. 5762 // FIXME: Could eliminate the is Root() check if we fix background painting so that the RenderView5762 // FIXME: Could eliminate the isDocumentElementRenderer() check if we fix background painting so that the RenderView 5763 5763 // paints the root's background. 5764 if (isRootLayer() || renderer().is Root())5764 if (isRootLayer() || renderer().isDocumentElementRenderer()) 5765 5765 return true; 5766 5766 … … 5933 5933 } 5934 5934 5935 if (renderer().is Root()) {5935 if (renderer().isDocumentElementRenderer()) { 5936 5936 // If the root layer becomes composited (e.g. because some descendant with negative z-index is composited), 5937 5937 // then it has to be big enough to cover the viewport in order to display the background. This is akin … … 6128 6128 return false; 6129 6129 6130 if (renderer().is Root()) {6130 if (renderer().isDocumentElementRenderer()) { 6131 6131 // Normally the document element doens't have a layer. If it does have a layer, its background propagates to the RenderView 6132 6132 // so this layer doesn't draw it. -
trunk/Source/WebCore/rendering/RenderLayer.h
r190658 r190834 617 617 bool paintsWithTransparency(PaintBehavior paintBehavior) const 618 618 { 619 return (isTransparent() || hasBlendMode() || (isolatesBlending() && !renderer().is Root())) && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || !isComposited());619 return (isTransparent() || hasBlendMode() || (isolatesBlending() && !renderer().isDocumentElementRenderer())) && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || !isComposited()); 620 620 } 621 621 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r189144 r190834 1704 1704 Color RenderLayerBacking::rendererBackgroundColor() const 1705 1705 { 1706 const auto& backgroundRenderer = renderer().is Root() ? renderer().rendererForRootBackground() : renderer();1706 const auto& backgroundRenderer = renderer().isDocumentElementRenderer() ? renderer().rendererForRootBackground() : renderer(); 1707 1707 return backgroundRenderer.style().visitedDependentColor(CSSPropertyBackgroundColor); 1708 1708 } … … 1861 1861 return false; 1862 1862 1863 if (renderer().is Root() && m_owningLayer.isolatesCompositedBlending())1863 if (renderer().isDocumentElementRenderer() && m_owningLayer.isolatesCompositedBlending()) 1864 1864 return false; 1865 1865 -
trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp
r190658 r190834 191 191 renderLayer->updateSnapOffsets(); 192 192 renderLayer->updateScrollSnapState(); 193 } else if (isBody() || is Root()) {193 } else if (isBody() || isDocumentElementRenderer()) { 194 194 FrameView& frameView = view().frameView(); 195 195 frameView.updateSnapOffsets(); … … 205 205 scrollSnapBox->layer()->updateSnapOffsets(); 206 206 scrollSnapBox->layer()->updateScrollSnapState(); 207 if (scrollSnapBox->isBody() || scrollSnapBox->is Root())207 if (scrollSnapBox->isBody() || scrollSnapBox->isDocumentElementRenderer()) 208 208 scrollSnapBox->view().frameView().updateScrollingCoordinatorScrollSnapProperties(); 209 209 } -
trunk/Source/WebCore/rendering/RenderObject.cpp
r190734 r190834 967 967 // If this is the root background, we need to check if there is an extended background rect. If 968 968 // there is, then we should not allow painting to clip to the layer size. 969 if (is Root() || isBody()) {969 if (isDocumentElementRenderer() || isBody()) { 970 970 shouldClipToLayer = !view.frameView().hasExtendedBackgroundRectForPainting(); 971 971 repaintRect = snappedIntRect(view.backgroundRect()); … … 1916 1916 // A is the HTML body element. 1917 1917 // The computed value of the position property for element A is fixed. 1918 if (is Root() || isBody() || (isOutOfFlowPositioned() && style().position() == FixedPosition))1918 if (isDocumentElementRenderer() || isBody() || (isOutOfFlowPositioned() && style().position() == FixedPosition)) 1919 1919 return nullptr; 1920 1920 -
trunk/Source/WebCore/rendering/RenderObject.h
r190685 r190834 346 346 virtual bool isRenderScrollbarPart() const { return false; } 347 347 348 bool is Root() const { return document().documentElement() == &m_node; }348 bool isDocumentElementRenderer() const { return document().documentElement() == &m_node; } 349 349 bool isBody() const { return node() && node()->hasTagName(HTMLNames::bodyTag); } 350 350 bool isHR() const { return node() && node()->hasTagName(HTMLNames::hrTag); } -
trunk/Source/WebCore/rendering/RenderTable.cpp
r189144 r190834 659 659 PaintPhase paintPhase = paintInfo.phase; 660 660 661 if (!is Root()) {661 if (!isDocumentElementRenderer()) { 662 662 LayoutRect overflowBox = visualOverflowRect(); 663 663 adjustRectWithMaximumOutline(paintInfo.phase, overflowBox); -
trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
r190816 r190834 203 203 204 204 updateLayerTransform(); 205 m_hasBoxDecorations = is Root() ? hasBoxDecorationStyle() : hasBoxDecorations();205 m_hasBoxDecorations = isDocumentElementRenderer() ? hasBoxDecorationStyle() : hasBoxDecorations(); 206 206 invalidateBackgroundObscurationStatus(); 207 207 … … 219 219 || style().overflowX() == OAUTO 220 220 || style().overflowX() == OSCROLL 221 || this->is Root();221 || this->isDocumentElementRenderer(); 222 222 } 223 223 -
trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp
r190685 r190834 300 300 { 301 301 // RenderSVGRoot should never query for overflow state - it should always clip itself to the initial viewport size. 302 ASSERT(!renderer.is Root());302 ASSERT(!renderer.isDocumentElementRenderer()); 303 303 304 304 return renderer.style().overflowX() == OHIDDEN || renderer.style().overflowX() == OSCROLL;
Note: See TracChangeset
for help on using the changeset viewer.