| Index: sky/engine/core/rendering/InlineFlowBox.cpp
|
| diff --git a/sky/engine/core/rendering/InlineFlowBox.cpp b/sky/engine/core/rendering/InlineFlowBox.cpp
|
| index d3bf1dbbafd8c239b7131884f9091df1b6885c0e..070db7ad1ba9db88b1899b2b9f07bfece2d04886 100644
|
| --- a/sky/engine/core/rendering/InlineFlowBox.cpp
|
| +++ b/sky/engine/core/rendering/InlineFlowBox.cpp
|
| @@ -1026,11 +1026,11 @@ void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
|
| }
|
| }
|
|
|
| -void InlineFlowBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect, CompositeOperator op)
|
| +void InlineFlowBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect)
|
| {
|
| if (fillLayer.next())
|
| - paintFillLayers(paintInfo, c, *fillLayer.next(), rect, op);
|
| - paintFillLayer(paintInfo, c, fillLayer, rect, op);
|
| + paintFillLayers(paintInfo, c, *fillLayer.next(), rect);
|
| + paintFillLayer(paintInfo, c, fillLayer, rect);
|
| }
|
|
|
| bool InlineFlowBox::boxShadowCanBeAppliedToBackground(const FillLayer& lastBackgroundLayer) const
|
| @@ -1042,16 +1042,16 @@ bool InlineFlowBox::boxShadowCanBeAppliedToBackground(const FillLayer& lastBackg
|
| return (!hasFillImage && !renderer().style()->hasBorderRadius()) || (!prevLineBox() && !nextLineBox()) || !parent();
|
| }
|
|
|
| -void InlineFlowBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect, CompositeOperator op)
|
| +void InlineFlowBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect)
|
| {
|
| StyleImage* img = fillLayer.image();
|
| bool hasFillImage = img && img->canRender(renderer());
|
| if ((!hasFillImage && !renderer().style()->hasBorderRadius()) || (!prevLineBox() && !nextLineBox()) || !parent()) {
|
| - boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op);
|
| + boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size());
|
| } else if (renderer().style()->boxDecorationBreak() == DCLONE) {
|
| GraphicsContextStateSaver stateSaver(*paintInfo.context);
|
| paintInfo.context->clip(LayoutRect(rect.x(), rect.y(), width(), height()));
|
| - boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op);
|
| + boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, rect, BackgroundBleedNone, this, rect.size());
|
| } else {
|
| // We have a fill image that spans multiple lines.
|
| // We need to adjust tx and ty by the width of all previous lines.
|
| @@ -1081,7 +1081,7 @@ void InlineFlowBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, c
|
|
|
| GraphicsContextStateSaver stateSaver(*paintInfo.context);
|
| paintInfo.context->clip(LayoutRect(rect.x(), rect.y(), width(), height()));
|
| - boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, LayoutRect(stripX, stripY, stripWidth, stripHeight), BackgroundBleedNone, this, rect.size(), op);
|
| + boxModelObject()->paintFillLayerExtended(paintInfo, c, fillLayer, LayoutRect(stripX, stripY, stripWidth, stripHeight), BackgroundBleedNone, this, rect.size());
|
| }
|
| }
|
|
|
| @@ -1203,36 +1203,18 @@ void InlineFlowBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffs
|
| const NinePieceImage& maskNinePieceImage = renderer().style()->maskBoxImage();
|
| StyleImage* maskBoxImage = renderer().style()->maskBoxImage().image();
|
|
|
| - // Figure out if we need to push a transparency layer to render our mask.
|
| - bool pushTransparencyLayer = false;
|
| - bool flattenCompositingLayers = renderer().view()->frameView() && renderer().view()->frameView()->paintBehavior() & PaintBehaviorFlattenCompositingLayers;
|
| - CompositeOperator compositeOp = CompositeSourceOver;
|
| - if (flattenCompositingLayers) {
|
| - if ((maskBoxImage && renderer().style()->maskLayers().hasImage()) || renderer().style()->maskLayers().next())
|
| - pushTransparencyLayer = true;
|
| -
|
| - compositeOp = CompositeDestinationIn;
|
| - if (pushTransparencyLayer) {
|
| - paintInfo.context->setCompositeOperation(CompositeDestinationIn);
|
| - paintInfo.context->beginTransparencyLayer(1.0f);
|
| - compositeOp = CompositeSourceOver;
|
| - }
|
| - }
|
| -
|
| LayoutRect paintRect = LayoutRect(adjustedPaintOffset, frameRect.size());
|
| - paintFillLayers(paintInfo, Color::transparent, renderer().style()->maskLayers(), paintRect, compositeOp);
|
| + paintFillLayers(paintInfo, Color::transparent, renderer().style()->maskLayers(), paintRect);
|
|
|
| bool hasBoxImage = maskBoxImage && maskBoxImage->canRender(renderer());
|
| if (!hasBoxImage || !maskBoxImage->isLoaded()) {
|
| - if (pushTransparencyLayer)
|
| - paintInfo.context->endLayer();
|
| return; // Don't paint anything while we wait for the image to load.
|
| }
|
|
|
| // The simple case is where we are the only box for this object. In those
|
| // cases only a single call to draw is required.
|
| if (!prevLineBox() && !nextLineBox()) {
|
| - boxModelObject()->paintNinePieceImage(paintInfo.context, LayoutRect(adjustedPaintOffset, frameRect.size()), renderer().style(), maskNinePieceImage, compositeOp);
|
| + boxModelObject()->paintNinePieceImage(paintInfo.context, LayoutRect(adjustedPaintOffset, frameRect.size()), renderer().style(), maskNinePieceImage);
|
| } else {
|
| // We have a mask image that spans multiple lines.
|
| // We need to adjust _tx and _ty by the width of all previous lines.
|
| @@ -1250,11 +1232,8 @@ void InlineFlowBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffs
|
| LayoutRect clipRect = clipRectForNinePieceImageStrip(this, maskNinePieceImage, paintRect);
|
| GraphicsContextStateSaver stateSaver(*paintInfo.context);
|
| paintInfo.context->clip(clipRect);
|
| - boxModelObject()->paintNinePieceImage(paintInfo.context, LayoutRect(stripX, stripY, stripWidth, stripHeight), renderer().style(), maskNinePieceImage, compositeOp);
|
| + boxModelObject()->paintNinePieceImage(paintInfo.context, LayoutRect(stripX, stripY, stripWidth, stripHeight), renderer().style(), maskNinePieceImage);
|
| }
|
| -
|
| - if (pushTransparencyLayer)
|
| - paintInfo.context->endLayer();
|
| }
|
|
|
| InlineBox* InlineFlowBox::firstLeafChild() const
|
|
|