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

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2105273004: GeometryMapper: Support computing visual rects in spaces that are not direct ancestors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 6 months 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
Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
index 2823cc71fc0a171897078a01fb939785dc88bc5e..4f6df8dd6bd5026f80d688a498fdfd81b5793594 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -162,17 +162,10 @@ void PaintPropertyTreeBuilder::updateCssClip(const LayoutObject& object, PaintPr
void PaintPropertyTreeBuilder::updateLocalBorderBoxContext(const LayoutObject& object, const PaintPropertyTreeBuilderContext& context)
{
- // Note: Currently only layer painter makes use of the pre-computed context.
- // This condition may be loosened with no adverse effects beside memory use.
- if (!object.hasLayer())
- return;
-
std::unique_ptr<ObjectPaintProperties::LocalBorderBoxProperties> borderBoxContext =
wrapUnique(new ObjectPaintProperties::LocalBorderBoxProperties);
borderBoxContext->paintOffset = context.paintOffset;
- borderBoxContext->transform = context.currentTransform;
- borderBoxContext->clip = context.currentClip;
- borderBoxContext->effect = context.currentEffect;
+ borderBoxContext->propertyTreeState = PropertyTreeState(context.currentTransform, context.currentClip, context.currentEffect);
object.getMutableForPainting().ensureObjectPaintProperties().setLocalBorderBoxProperties(std::move(borderBoxContext));
}
@@ -384,11 +377,11 @@ static void deriveBorderBoxFromContainerContext(const LayoutObject& object, Pain
void PaintPropertyTreeBuilder::buildTreeNodes(const LayoutObject& object, PaintPropertyTreeBuilderContext& context)
{
+ object.getMutableForPainting().clearObjectPaintProperties();
chrishtr 2016/06/30 16:49:55 Now allocating an ObjectPaintProperties object for
pdr. 2016/06/30 21:21:50 To enforce this and ensure we don't create too man
chrishtr 2016/07/01 17:52:24 Done (in updateLocalBorderBoxContext)
+
if (!object.isBoxModelObject() && !object.isSVG())
return;
- object.getMutableForPainting().clearObjectPaintProperties();
-
deriveBorderBoxFromContainerContext(object, context);
updatePaintOffsetTranslation(object, context);

Powered by Google App Engine
This is Rietveld 408576698