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

Unified Diff: Source/core/rendering/RenderGeometryMap.cpp

Issue 26110004: Defer the real work in updateCompositingLayers until it's really needed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 2 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: Source/core/rendering/RenderGeometryMap.cpp
diff --git a/Source/core/rendering/RenderGeometryMap.cpp b/Source/core/rendering/RenderGeometryMap.cpp
index 6f65d55b3fefe42a1f254f1e391d3f30fdc96f64..e62068c1a45d4c913a2dba65ac982b7c61cc0d19 100644
--- a/Source/core/rendering/RenderGeometryMap.cpp
+++ b/Source/core/rendering/RenderGeometryMap.cpp
@@ -118,10 +118,12 @@ FloatPoint RenderGeometryMap::mapToContainer(const FloatPoint& p, const RenderLa
}
#if !ASSERT_DISABLED
- FloatPoint rendererMappedResult = m_mapping.last().m_renderer->localToAbsolute(p, m_mapCoordinatesFlags);
- ASSERT(roundedIntPoint(rendererMappedResult) == roundedIntPoint(result));
-// if (roundedIntPoint(rendererMappedResult) != roundedIntPoint(result))
-// fprintf(stderr, "Mismatched point\n");
+ if (m_mapping.size() > 0) {
+ FloatPoint rendererMappedResult = m_mapping.last().m_renderer->localToAbsolute(p, m_mapCoordinatesFlags);
+ ASSERT(roundedIntPoint(rendererMappedResult) == roundedIntPoint(result));
+ // if (roundedIntPoint(rendererMappedResult) != roundedIntPoint(result))
+ // fprintf(stderr, "Mismatched point\n");
+ }
#endif
return result;
@@ -155,12 +157,14 @@ FloatQuad RenderGeometryMap::mapToContainer(const FloatRect& rect, const RenderL
}
#if !ASSERT_DISABLED
- FloatRect rendererMappedResult = m_mapping.last().m_renderer->localToContainerQuad(rect, container, m_mapCoordinatesFlags).boundingBox();
- // Inspector creates renderers with negative width <https://bugs.webkit.org/show_bug.cgi?id=87194>.
- // Taking FloatQuad bounds avoids spurious assertions because of that.
- ASSERT(enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()));
-// if (enclosingIntRect(rendererMappedResult) != enclosingIntRect(FloatQuad(result).boundingBox()))
-// fprintf(stderr, "Mismatched rects\n");
+ if (m_mapping.size() > 0) {
+ FloatRect rendererMappedResult = m_mapping.last().m_renderer->localToContainerQuad(rect, container, m_mapCoordinatesFlags).boundingBox();
+ // Inspector creates renderers with negative width <https://bugs.webkit.org/show_bug.cgi?id=87194>.
+ // Taking FloatQuad bounds avoids spurious assertions because of that.
+ ASSERT(enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()));
+ // if (enclosingIntRect(rendererMappedResult) != enclosingIntRect(FloatQuad(result).boundingBox()))
+ // fprintf(stderr, "Mismatched rects\n");
+ }
#endif
return result;

Powered by Google App Engine
This is Rietveld 408576698