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

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

Issue 2374923002: Avoid crashing for cases when cell/row parenting is not like a real table. (Closed)
Patch Set: none Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/paint/invalidation/display-table-row-crash-expected.txt ('k') | 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 2f0c98f78df8b94055def04cbc67dc3db7bdd15f..1fd6813ae086dda8cb1009d2f7b2a6735f7d732c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -2161,8 +2161,9 @@ bool LayoutBox::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* ances
LayoutBox* tableRowContainer = nullptr;
// Skip table row because cells and rows are in the same coordinate space
// (see below, however for more comments about when |ancestor| is the table row).
- if (container->isTableRow()) {
- DCHECK(isTableCell() && parentBox() == container);
+ // The second and third conditionals below are to skip cases where content has display: table-row or display: table-cell but is not
+ // parented like a cell/row combo.
+ if (container->isTableRow() && isTableCell() && parentBox() == container) {
if (container != ancestor)
container = container->parent();
else
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/display-table-row-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698