| Index: sky/engine/core/rendering/RenderObject.cpp
|
| diff --git a/sky/engine/core/rendering/RenderObject.cpp b/sky/engine/core/rendering/RenderObject.cpp
|
| index 427068f3de1850b1a4b6b02ddae3ff7a83456e9c..8398e227594cd3847a8deb784f066307419fc6cc 100644
|
| --- a/sky/engine/core/rendering/RenderObject.cpp
|
| +++ b/sky/engine/core/rendering/RenderObject.cpp
|
| @@ -648,118 +648,6 @@ bool RenderObject::canRenderBorderImage() const
|
| return borderImage && borderImage->canRender(*this) && borderImage->isLoaded();
|
| }
|
|
|
| -bool RenderObject::mustInvalidateFillLayersPaintOnWidthChange(const FillLayer& layer) const
|
| -{
|
| - // Nobody will use multiple layers without wanting fancy positioning.
|
| - if (layer.next())
|
| - return true;
|
| -
|
| - // Make sure we have a valid image.
|
| - StyleImage* img = layer.image();
|
| - if (!img || !img->canRender(*this))
|
| - return false;
|
| -
|
| - if (layer.repeatX() != RepeatFill && layer.repeatX() != NoRepeatFill)
|
| - return true;
|
| -
|
| - if (layer.xPosition().isPercent() && !layer.xPosition().isZero())
|
| - return true;
|
| -
|
| - if (layer.backgroundXOrigin() != LeftEdge)
|
| - return true;
|
| -
|
| - EFillSizeType sizeType = layer.sizeType();
|
| -
|
| - if (sizeType == Contain || sizeType == Cover)
|
| - return true;
|
| -
|
| - if (sizeType == SizeLength) {
|
| - if (layer.sizeLength().width().isPercent() && !layer.sizeLength().width().isZero())
|
| - return true;
|
| - if (img->isGeneratedImage() && layer.sizeLength().width().isAuto())
|
| - return true;
|
| - } else if (img->usesImageContainerSize()) {
|
| - return true;
|
| - }
|
| -
|
| - return false;
|
| -}
|
| -
|
| -bool RenderObject::mustInvalidateFillLayersPaintOnHeightChange(const FillLayer& layer) const
|
| -{
|
| - // Nobody will use multiple layers without wanting fancy positioning.
|
| - if (layer.next())
|
| - return true;
|
| -
|
| - // Make sure we have a valid image.
|
| - StyleImage* img = layer.image();
|
| - if (!img || !img->canRender(*this))
|
| - return false;
|
| -
|
| - if (layer.repeatY() != RepeatFill && layer.repeatY() != NoRepeatFill)
|
| - return true;
|
| -
|
| - if (layer.yPosition().isPercent() && !layer.yPosition().isZero())
|
| - return true;
|
| -
|
| - if (layer.backgroundYOrigin() != TopEdge)
|
| - return true;
|
| -
|
| - EFillSizeType sizeType = layer.sizeType();
|
| -
|
| - if (sizeType == Contain || sizeType == Cover)
|
| - return true;
|
| -
|
| - if (sizeType == SizeLength) {
|
| - if (layer.sizeLength().height().isPercent() && !layer.sizeLength().height().isZero())
|
| - return true;
|
| - if (img->isGeneratedImage() && layer.sizeLength().height().isAuto())
|
| - return true;
|
| - } else if (img->usesImageContainerSize()) {
|
| - return true;
|
| - }
|
| -
|
| - return false;
|
| -}
|
| -
|
| -bool RenderObject::mustInvalidateBackgroundOrBorderPaintOnWidthChange() const
|
| -{
|
| - if (hasMask() && mustInvalidateFillLayersPaintOnWidthChange(style()->maskLayers()))
|
| - return true;
|
| -
|
| - // If we don't have a background/border/mask, then nothing to do.
|
| - if (!hasBoxDecorationBackground())
|
| - return false;
|
| -
|
| - if (mustInvalidateFillLayersPaintOnWidthChange(style()->backgroundLayers()))
|
| - return true;
|
| -
|
| - // Our fill layers are ok. Let's check border.
|
| - if (style()->hasBorder() && canRenderBorderImage())
|
| - return true;
|
| -
|
| - return false;
|
| -}
|
| -
|
| -bool RenderObject::mustInvalidateBackgroundOrBorderPaintOnHeightChange() const
|
| -{
|
| - if (hasMask() && mustInvalidateFillLayersPaintOnHeightChange(style()->maskLayers()))
|
| - return true;
|
| -
|
| - // If we don't have a background/border/mask, then nothing to do.
|
| - if (!hasBoxDecorationBackground())
|
| - return false;
|
| -
|
| - if (mustInvalidateFillLayersPaintOnHeightChange(style()->backgroundLayers()))
|
| - return true;
|
| -
|
| - // Our fill layers are ok. Let's check border.
|
| - if (style()->hasBorder() && canRenderBorderImage())
|
| - return true;
|
| -
|
| - return false;
|
| -}
|
| -
|
| void RenderObject::drawLineForBoxSide(GraphicsContext* graphicsContext, int x1, int y1, int x2, int y2,
|
| BoxSide side, Color color, EBorderStyle style,
|
| int adjacentWidth1, int adjacentWidth2, bool antialias)
|
|
|