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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp

Issue 1514243004: Remove check for invisible subtrees in LayoutGeometryMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp b/third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp
index ca3bd92df2e3316f1b930dad517d4e557e0961c8..85fa5310ad553fe699ea7ab88acc3bceb45d4795 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp
@@ -137,20 +137,14 @@ FloatQuad LayoutGeometryMap::mapToContainer(const FloatRect& rect, const LayoutB
#if ENABLE(ASSERT)
if (m_mapping.size() > 0) {
const LayoutObject* lastLayoutObject = m_mapping.last().m_layoutObject;
- const PaintLayer* layer = lastLayoutObject->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->subtreeIsInvisible() && lastLayoutObject->style()->visibility() == VISIBLE) {
- FloatRect layoutObjectMappedResult = lastLayoutObject->localToContainerQuad(rect, container, m_mapCoordinatesFlags).boundingBox();
-
- // Inspector creates layoutObjects with negative width <https://bugs.webkit.org/show_bug.cgi?id=87194>.
- // Taking FloatQuad bounds avoids spurious assertions because of that.
- ASSERT(enclosingIntRect(layoutObjectMappedResult) == enclosingIntRect(result.boundingBox())
- || layoutObjectMappedResult.mayNotHaveExactIntRectRepresentation()
- || result.boundingBox().mayNotHaveExactIntRectRepresentation());
- }
+
+ FloatRect layoutObjectMappedResult = lastLayoutObject->localToContainerQuad(rect, container, m_mapCoordinatesFlags).boundingBox();
+
+ // Inspector creates layoutObjects with negative width <https://bugs.webkit.org/show_bug.cgi?id=87194>.
+ // Taking FloatQuad bounds avoids spurious assertions because of that.
+ ASSERT(enclosingIntRect(layoutObjectMappedResult) == enclosingIntRect(result.boundingBox())
+ || layoutObjectMappedResult.mayNotHaveExactIntRectRepresentation()
+ || result.boundingBox().mayNotHaveExactIntRectRepresentation());
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698