| Index: sky/engine/core/rendering/RenderBox.cpp
|
| diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp
|
| index 168455a60fa4ef9779ba10cb4b3c4d38b34863b1..1851da41bbb630924d03ad2ab593392d9baf6562 100644
|
| --- a/sky/engine/core/rendering/RenderBox.cpp
|
| +++ b/sky/engine/core/rendering/RenderBox.cpp
|
| @@ -147,13 +147,6 @@ void RenderBox::updateFromStyle()
|
| boxHasOverflowClip = true;
|
| }
|
|
|
| - if (boxHasOverflowClip != hasOverflowClip()) {
|
| - // FIXME: This shouldn't be required if we tracked the visual overflow
|
| - // generated by positioned children or self painting layers. crbug.com/345403
|
| - for (RenderObject* child = slowFirstChild(); child; child = child->nextSibling())
|
| - child->setShouldDoFullPaintInvalidationIfSelfPaintingLayer(true);
|
| - }
|
| -
|
| setHasOverflowClip(boxHasOverflowClip);
|
| setHasTransform(styleToUse->hasTransformRelatedProperty());
|
| }
|
| @@ -995,44 +988,6 @@ bool RenderBox::paintInvalidationLayerRectsForImage(WrappedImagePtr image, const
|
| return false;
|
| }
|
|
|
| -InvalidationReason RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationContainer)
|
| -{
|
| - const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect();
|
| - const LayoutPoint oldPositionFromPaintInvalidationContainer = previousPositionFromPaintInvalidationContainer();
|
| - setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&newPaintInvalidationContainer, &paintInvalidationState));
|
| - setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromPaintInvalidationContainer(this, &newPaintInvalidationContainer, &paintInvalidationState));
|
| -
|
| - InvalidationReason reason = InvalidationNone;
|
| -
|
| - // If we are set to do a full paint invalidation that means the RenderView will be
|
| - // issue paint invalidations. We can then skip issuing of paint invalidations for the child
|
| - // renderers as they'll be covered by the RenderView.
|
| - if (!view()->doingFullPaintInvalidation()) {
|
| - if (onlyNeededPositionedMovementLayout()
|
| - || (shouldDoFullPaintInvalidationIfSelfPaintingLayer()
|
| - && hasLayer()
|
| - && layer()->isSelfPaintingLayer())) {
|
| - setShouldDoFullPaintInvalidation(true, MarkOnlyThis);
|
| - }
|
| -
|
| - reason = RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState);
|
| - if (reason == InvalidationNone || reason == InvalidationIncremental)
|
| - invalidatePaintForOverflowIfNeeded();
|
| -
|
| - // Issue paint invalidations for any scrollbars if there is a scrollable area for this renderer.
|
| - if (ScrollableArea* area = scrollableArea()) {
|
| - if (area->hasVerticalBarDamage())
|
| - invalidatePaintRectangle(area->verticalBarDamage());
|
| - if (area->hasHorizontalBarDamage())
|
| - invalidatePaintRectangle(area->horizontalBarDamage());
|
| - }
|
| - }
|
| -
|
| - // This is for the next invalidatePaintIfNeeded so must be at the end.
|
| - savePreviousBorderBoxSizeIfNeeded();
|
| - return reason;
|
| -}
|
| -
|
| void RenderBox::clearPaintInvalidationState(const PaintInvalidationState& paintInvalidationState)
|
| {
|
| RenderBoxModelObject::clearPaintInvalidationState(paintInvalidationState);
|
| @@ -3078,59 +3033,6 @@ InvalidationReason RenderBox::getPaintInvalidationReason(const RenderLayerModelO
|
| return InvalidationIncremental;
|
| }
|
|
|
| -void RenderBox::incrementallyInvalidatePaint(const RenderLayerModelObject& paintInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const LayoutPoint& positionFromPaintInvalidationContainer)
|
| -{
|
| - RenderObject::incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newBounds, positionFromPaintInvalidationContainer);
|
| -
|
| - bool hasBoxDecorations = style()->hasBoxDecorations();
|
| - if (!style()->hasBackground() && !hasBoxDecorations)
|
| - return;
|
| -
|
| - LayoutSize oldBorderBoxSize = computePreviousBorderBoxSize(oldBounds.size());
|
| - LayoutSize newBorderBoxSize = size();
|
| -
|
| - // If border box size didn't change, RenderBox's incrementallyInvalidatePaint() is good.
|
| - if (oldBorderBoxSize == newBorderBoxSize)
|
| - return;
|
| -
|
| - // If size of the paint invalidation rect equals to size of border box, RenderObject::incrementallyInvalidatePaint()
|
| - // is good for boxes having background without box decorations.
|
| - ASSERT(oldBounds.location() == newBounds.location()); // Otherwise we won't do incremental invalidation.
|
| - if (!hasBoxDecorations
|
| - && positionFromPaintInvalidationContainer == newBounds.location()
|
| - && oldBorderBoxSize == oldBounds.size()
|
| - && newBorderBoxSize == newBounds.size())
|
| - return;
|
| -
|
| - // Invalidate the right delta part and the right border of the old or new box which has smaller width.
|
| - LayoutUnit deltaWidth = absoluteValue(oldBorderBoxSize.width() - newBorderBoxSize.width());
|
| - if (deltaWidth) {
|
| - LayoutUnit smallerWidth = std::min(oldBorderBoxSize.width(), newBorderBoxSize.width());
|
| - LayoutUnit borderTopRightRadiusWidth = valueForLength(style()->borderTopRightRadius().width(), smallerWidth);
|
| - LayoutUnit borderBottomRightRadiusWidth = valueForLength(style()->borderBottomRightRadius().width(), smallerWidth);
|
| - LayoutUnit borderWidth = std::max<LayoutUnit>(borderRight(), std::max(borderTopRightRadiusWidth, borderBottomRightRadiusWidth));
|
| - LayoutRect rightDeltaRect(positionFromPaintInvalidationContainer.x() + smallerWidth - borderWidth,
|
| - positionFromPaintInvalidationContainer.y(),
|
| - deltaWidth + borderWidth,
|
| - std::max(oldBorderBoxSize.height(), newBorderBoxSize.height()));
|
| - invalidatePaintUsingContainer(&paintInvalidationContainer, rightDeltaRect, InvalidationIncremental);
|
| - }
|
| -
|
| - // Invalidate the bottom delta part and the bottom border of the old or new box which has smaller height.
|
| - LayoutUnit deltaHeight = absoluteValue(oldBorderBoxSize.height() - newBorderBoxSize.height());
|
| - if (deltaHeight) {
|
| - LayoutUnit smallerHeight = std::min(oldBorderBoxSize.height(), newBorderBoxSize.height());
|
| - LayoutUnit borderBottomLeftRadiusHeight = valueForLength(style()->borderBottomLeftRadius().height(), smallerHeight);
|
| - LayoutUnit borderBottomRightRadiusHeight = valueForLength(style()->borderBottomRightRadius().height(), smallerHeight);
|
| - LayoutUnit borderHeight = std::max<LayoutUnit>(borderBottom(), std::max(borderBottomLeftRadiusHeight, borderBottomRightRadiusHeight));
|
| - LayoutRect bottomDeltaRect(positionFromPaintInvalidationContainer.x(),
|
| - positionFromPaintInvalidationContainer.y() + smallerHeight - borderHeight,
|
| - std::max(oldBorderBoxSize.width(), newBorderBoxSize.width()),
|
| - deltaHeight + borderHeight);
|
| - invalidatePaintUsingContainer(&paintInvalidationContainer, bottomDeltaRect, InvalidationIncremental);
|
| - }
|
| -}
|
| -
|
| void RenderBox::addVisualEffectOverflow()
|
| {
|
| if (!style()->hasVisualOverflowingEffect())
|
|
|