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

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

Issue 26964002: Fix touch hit rect position for table cells (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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/RenderTableCell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTableCell.cpp
diff --git a/Source/core/rendering/RenderTableCell.cpp b/Source/core/rendering/RenderTableCell.cpp
index 8c536306b35748ac871cbe583a3f4945e5f3f51d..36f67428a397bf6384af130f7f7eff42be74b65b 100644
--- a/Source/core/rendering/RenderTableCell.cpp
+++ b/Source/core/rendering/RenderTableCell.cpp
@@ -163,6 +163,16 @@ void RenderTableCell::computePreferredLogicalWidths()
}
}
+void RenderTableCell::addLayerHitTestRects(LayerHitTestRects& layerRects, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
+{
+ LayoutPoint adjustedLayerOffset = layerOffset;
+ // RenderTableCell's location includes the offset of it's containing RenderTableRow, so
+ // we need to subtract that again here (as for RenderTableCell::offsetFromContainer.
+ if (parent())
+ adjustedLayerOffset -= parentBox()->locationOffset();
+ RenderBox::addLayerHitTestRects(layerRects, currentLayer, adjustedLayerOffset, containerRect);
+}
+
void RenderTableCell::computeIntrinsicPadding(int rowHeight, SubtreeLayoutScope& layouter)
{
int oldIntrinsicPaddingBefore = intrinsicPaddingBefore();
« no previous file with comments | « Source/core/rendering/RenderTableCell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698