From 6f352bd28d0ecaf8935772f66cb2aa2fd922d538 Mon Sep 17 00:00:00 2001 From: "mstensho@opera.com" Date: Tue, 22 Sep 2015 10:37:56 +0000 Subject: [PATCH] Remove unused variable movedSectionLogicalTop from table layout code. R=jchaffraix@chromium.org Review URL: https://codereview.chromium.org/1351383006 git-svn-id: svn://svn.chromium.org/blink/trunk@202628 bbb929c8-8fbe-4397-9dbb-9b2b20218538 --- third_party/WebKit/Source/core/layout/LayoutTable.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp index 1e52da8b5f24..7c2d93c430b1 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp @@ -437,7 +437,6 @@ void LayoutTable::layout() // section down (it is quite unlikely that any of the following sections // did not shift). bool sectionMoved = false; - LayoutUnit movedSectionLogicalTop = 0; { LayoutState state(*this, locationOffset()); LayoutUnit oldLogicalWidth = logicalWidth(); @@ -494,10 +493,7 @@ void LayoutTable::layout() continue; layoutCaption(*m_captions[i]); } - if (logicalHeight() != oldTableLogicalTop) { - sectionMoved = true; - movedSectionLogicalTop = std::min(logicalHeight(), oldTableLogicalTop); - } + sectionMoved = logicalHeight() != oldTableLogicalTop; } LayoutUnit borderAndPaddingBefore = borderBefore() + (collapsing ? LayoutUnit() : paddingBefore()); @@ -541,10 +537,8 @@ void LayoutTable::layout() // position the table sections LayoutTableSection* section = topSection(); while (section) { - if (!sectionMoved && section->logicalTop() != logicalHeight()) { + if (!sectionMoved && section->logicalTop() != logicalHeight()) sectionMoved = true; - movedSectionLogicalTop = std::min(logicalHeight(), section->logicalTop()) + (style()->isHorizontalWritingMode() ? section->visualOverflowRect().y() : section->visualOverflowRect().x()); - } section->setLogicalLocation(LayoutPoint(sectionLogicalLeft, logicalHeight())); // As we may skip invalidation on the table, we need to ensure that sections are invalidated when they moved. -- 2.11.4.GIT