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

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

Issue 2615613006: Reference table via the cell for collapsed border display item client (Closed)
Patch Set: Created 3 years, 11 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/Source/core/layout/LayoutTableCell.h ('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/LayoutTableCell.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
index 2e0de9cfe015891fe5f2841c93c3f1e04faa8674..72036419a5eb2fb574e9febee1f54dddd61750f4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
@@ -68,12 +68,12 @@ LayoutTableCell::LayoutTableCell(Element* element)
}
LayoutTableCell::CollapsedBorderValues::CollapsedBorderValues(
- const LayoutTable& layoutTable,
+ const LayoutTableCell& layoutTableCell,
const CollapsedBorderValue& startBorder,
const CollapsedBorderValue& endBorder,
const CollapsedBorderValue& beforeBorder,
const CollapsedBorderValue& afterBorder)
- : m_layoutTable(layoutTable),
+ : m_layoutTableCell(layoutTableCell),
m_startBorder(startBorder),
m_endBorder(endBorder),
m_beforeBorder(beforeBorder),
@@ -92,7 +92,7 @@ String LayoutTableCell::CollapsedBorderValues::debugName() const {
}
LayoutRect LayoutTableCell::CollapsedBorderValues::visualRect() const {
- return m_layoutTable.visualRect();
+ return m_layoutTableCell.table()->visualRect();
}
void LayoutTableCell::willBeRemovedFromTree() {
@@ -1318,7 +1318,7 @@ static void addBorderStyle(LayoutTable::CollapsedBorderValues& borderValues,
void LayoutTableCell::collectBorderValues(
LayoutTable::CollapsedBorderValues& borderValues) {
CollapsedBorderValues newValues(
- *table(), computeCollapsedStartBorder(), computeCollapsedEndBorder(),
+ *this, computeCollapsedStartBorder(), computeCollapsedEndBorder(),
computeCollapsedBeforeBorder(), computeCollapsedAfterBorder());
bool changed = false;
@@ -1331,7 +1331,7 @@ void LayoutTableCell::collectBorderValues(
} else if (!m_collapsedBorderValues) {
changed = true;
m_collapsedBorderValues = wrapUnique(new CollapsedBorderValues(
- *table(), newValues.startBorder(), newValues.endBorder(),
+ *this, newValues.startBorder(), newValues.endBorder(),
newValues.beforeBorder(), newValues.afterBorder()));
} else {
// We check visuallyEquals so that the table cell is invalidated only if a
@@ -1352,10 +1352,11 @@ void LayoutTableCell::collectBorderValues(
// the table's backing.
// TODO(crbug.com/451090#c5): Need a way to invalidate/repaint the borders
// only.
- if (changed)
+ if (changed) {
ObjectPaintInvalidator(*table())
.slowSetPaintingLayerNeedsRepaintAndInvalidateDisplayItemClient(
*this, PaintInvalidationStyleChange);
+ }
addBorderStyle(borderValues, newValues.startBorder());
addBorderStyle(borderValues, newValues.endBorder());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698