summaryrefslogtreecommitdiff
path: root/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp
index 3782283385d..9737da43de8 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp
@@ -28,14 +28,15 @@
#include "HTMLNames.h"
#include "core/css/StylePropertySet.h"
#include "core/html/HTMLTableCellElement.h"
-#include "core/platform/graphics/FloatQuad.h"
-#include "core/platform/graphics/GraphicsContextStateSaver.h"
-#include "core/platform/graphics/transforms/TransformState.h"
+#include "core/rendering/LayoutRectRecorder.h"
#include "core/rendering/PaintInfo.h"
#include "core/rendering/RenderTableCol.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/SubtreeLayoutScope.h"
#include "core/rendering/style/CollapsedBorderValue.h"
+#include "platform/geometry/FloatQuad.h"
+#include "platform/geometry/TransformState.h"
+#include "platform/graphics/GraphicsContextStateSaver.h"
using namespace std;
@@ -152,7 +153,7 @@ void RenderTableCell::computePreferredLogicalWidths()
if (node() && style()->autoWrap()) {
// See if nowrap was set.
Length w = styleOrColLogicalWidth();
- String nowrap = toElement(node())->getAttribute(nowrapAttr);
+ const AtomicString& nowrap = toElement(node())->getAttribute(nowrapAttr);
if (!nowrap.isNull() && w.isFixed())
// Nowrap is set, but we didn't actually use it because of the
// fixed width set on the cell. Even so, it is a WinIE/Moz trait
@@ -163,6 +164,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();
@@ -226,6 +237,8 @@ void RenderTableCell::layout()
{
ASSERT(needsLayout());
+ LayoutRectRecorder recorder(*this);
+
updateFirstLetter();
int oldCellBaseline = cellBaselinePosition();