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

Side by Side 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, 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 2154
2155 if (ancestor == this) 2155 if (ancestor == this)
2156 return true; 2156 return true;
2157 2157
2158 bool ancestorSkipped; 2158 bool ancestorSkipped;
2159 bool filterOrReflectionSkipped; 2159 bool filterOrReflectionSkipped;
2160 LayoutObject* container = this->container(ancestor, &ancestorSkipped, &filte rOrReflectionSkipped); 2160 LayoutObject* container = this->container(ancestor, &ancestorSkipped, &filte rOrReflectionSkipped);
2161 LayoutBox* tableRowContainer = nullptr; 2161 LayoutBox* tableRowContainer = nullptr;
2162 // Skip table row because cells and rows are in the same coordinate space 2162 // Skip table row because cells and rows are in the same coordinate space
2163 // (see below, however for more comments about when |ancestor| is the table row). 2163 // (see below, however for more comments about when |ancestor| is the table row).
2164 if (container->isTableRow()) { 2164 // The second and third conditionals below are to skip cases where content h as display: table-row or display: table-cell but is not
2165 DCHECK(isTableCell() && parentBox() == container); 2165 // parented like a cell/row combo.
2166 if (container->isTableRow() && isTableCell() && parentBox() == container) {
2166 if (container != ancestor) 2167 if (container != ancestor)
2167 container = container->parent(); 2168 container = container->parent();
2168 else 2169 else
2169 tableRowContainer = toLayoutBox(container); 2170 tableRowContainer = toLayoutBox(container);
2170 } 2171 }
2171 if (!container) 2172 if (!container)
2172 return true; 2173 return true;
2173 2174
2174 if (filterOrReflectionSkipped) 2175 if (filterOrReflectionSkipped)
2175 inflateVisualRectForReflectionAndFilterUnderContainer(rect, *container, ancestor); 2176 inflateVisualRectForReflectionAndFilterUnderContainer(rect, *container, ancestor);
(...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after
4874 LayoutRect rect = frameRect(); 4875 LayoutRect rect = frameRect();
4875 4876
4876 LayoutBlock* block = containingBlock(); 4877 LayoutBlock* block = containingBlock();
4877 if (block) 4878 if (block)
4878 block->adjustChildDebugRect(rect); 4879 block->adjustChildDebugRect(rect);
4879 4880
4880 return rect; 4881 return rect;
4881 } 4882 }
4882 4883
4883 } // namespace blink 4884 } // namespace blink
OLDNEW
« 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