Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(718)

Unified Diff: sky/engine/core/rendering/RenderBoxModelObject.cpp

Issue 756183004: Get rid of background-clip:text and PaintBehaviorForceBlackText. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove forceBlackText Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/rendering/PaintPhase.h ('k') | sky/engine/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBoxModelObject.cpp
diff --git a/sky/engine/core/rendering/RenderBoxModelObject.cpp b/sky/engine/core/rendering/RenderBoxModelObject.cpp
index 3ae885bc78985a6d4760ca81107c215b3893116a..44d7c21eada0b7f02b1c95d788d09c96e9afea79 100644
--- a/sky/engine/core/rendering/RenderBoxModelObject.cpp
+++ b/sky/engine/core/rendering/RenderBoxModelObject.cpp
@@ -480,20 +480,6 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
break;
}
- case TextFillBox: {
- // First figure out how big the mask has to be. It should be no bigger than what we need
- // to actually render, so we should intersect the dirty rect with the border box of the background.
- maskRect = pixelSnappedIntRect(rect);
- maskRect.intersect(paintInfo.rect);
-
- // We draw the background into a separate layer, to be later masked with yet another layer
- // holding the text content.
- backgroundClipStateSaver.save();
- context->clip(maskRect);
- context->beginTransparencyLayer(1);
-
- break;
- }
case BorderFillBox:
break;
default:
@@ -544,30 +530,6 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
context->setImageInterpolationQuality(previousInterpolationQuality);
}
}
-
- if (bgLayer.clip() == TextFillBox) {
- // Create the text mask layer.
- context->setCompositeOperation(CompositeDestinationIn);
- context->beginTransparencyLayer(1);
-
- // FIXME: Workaround for https://code.google.com/p/skia/issues/detail?id=1291.
- context->clearRect(maskRect);
-
- // Now draw the text into the mask. We do this by painting using a special paint phase that signals to
- // InlineTextBoxes that they should just add their contents to the clip.
- PaintInfo info(context, maskRect, PaintPhaseTextClip, PaintBehaviorForceBlackText, 0);
- context->setCompositeOperation(CompositeSourceOver);
- if (box) {
- RootInlineBox& root = box->root();
- box->paint(info, LayoutPoint(scrolledPaintRect.x() - box->x(), scrolledPaintRect.y() - box->y()), root.lineTop(), root.lineBottom());
- } else {
- LayoutSize localOffset = isBox() ? toRenderBox(this)->locationOffset() : LayoutSize();
- paint(info, scrolledPaintRect.location() - localOffset);
- }
-
- context->endLayer();
- context->endLayer();
- }
}
static inline int resolveWidthForRatio(int height, const FloatSize& intrinsicRatio)
« no previous file with comments | « sky/engine/core/rendering/PaintPhase.h ('k') | sky/engine/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698