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

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

Issue 30383002: Merge 159961 "Defer the real work in updateCompositingLayers unt..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1675/
Patch Set: 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
« no previous file with comments | « Source/core/rendering/CompositedLayerMapping.cpp ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderGeometryMap.cpp
===================================================================
--- Source/core/rendering/RenderGeometryMap.cpp (revision 159992)
+++ Source/core/rendering/RenderGeometryMap.cpp (working copy)
@@ -118,10 +118,10 @@
}
#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));
+ }
#endif
return result;
@@ -155,20 +155,20 @@
}
#if !ASSERT_DISABLED
- const RenderObject* lastRenderer = m_mapping.last().m_renderer;
- const RenderLayer* layer = lastRenderer->enclosingLayer();
+ if (m_mapping.size() > 0) {
+ const RenderObject* lastRenderer = m_mapping.last().m_renderer;
+ const RenderLayer* layer = lastRenderer->enclosingLayer();
- // Bounds for invisible layers are intentionally not calculated, and are
- // therefore not necessarily expected to be correct here. This is ok,
- // because they will be recomputed if the layer becomes visible.
- if (!layer || !layer->subtreeIsInvisible()) {
- FloatRect rendererMappedResult = lastRenderer->localToContainerQuad(rect, container, m_mapCoordinatesFlags).boundingBox();
+ // Bounds for invisible layers are intentionally not calculated, and are
+ // therefore not necessarily expected to be correct here. This is ok,
+ // because they will be recomputed if the layer becomes visible.
+ if (!layer || !layer->subtreeIsInvisible()) {
+ FloatRect rendererMappedResult = lastRenderer->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");
+ // 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()));
+ }
}
#endif
« no previous file with comments | « Source/core/rendering/CompositedLayerMapping.cpp ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698