From 03fa2fb9c337a68ce426bdbcd44d40e82438bf81 Mon Sep 17 00:00:00 2001 From: "eae@chromium.org" Date: Tue, 21 Feb 2012 19:33:02 +0000 Subject: [PATCH] Remove obsolete float comparison FIXMEs https://bugs.webkit.org/show_bug.cgi?id=79127 Reviewed by Eric Seidel. Remove obsolete FIXME comments added back when we were planning to use floating point units for layout. No new tests, no code changes. * page/FrameView.cpp: (WebCore::FrameView::init): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): (WebCore::RenderBlock::getClearDelta): * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computeLogicalHeightUsing): (WebCore::RenderBox::computePercentageLogicalHeight): * rendering/RenderBoxModelObject.cpp: (WebCore::ImageQualityController::shouldPaintAtLowQuality): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108377 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 25 +++++++++++++++++++++++ Source/WebCore/page/FrameView.cpp | 2 -- Source/WebCore/rendering/RenderBlock.cpp | 6 ------ Source/WebCore/rendering/RenderBox.cpp | 4 ---- Source/WebCore/rendering/RenderBoxModelObject.cpp | 4 ---- 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 4724c87..8a61ab1 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,28 @@ +2012-02-21 Emil A Eklund + + Remove obsolete float comparison FIXMEs + https://bugs.webkit.org/show_bug.cgi?id=79127 + + Reviewed by Eric Seidel. + + Remove obsolete FIXME comments added back when we were planning to use + floating point units for layout. + + No new tests, no code changes. + + * page/FrameView.cpp: + (WebCore::FrameView::init): + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::layoutBlock): + (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): + (WebCore::RenderBlock::getClearDelta): + * rendering/RenderBox.cpp: + (WebCore::RenderBox::computeLogicalHeight): + (WebCore::RenderBox::computeLogicalHeightUsing): + (WebCore::RenderBox::computePercentageLogicalHeight): + * rendering/RenderBoxModelObject.cpp: + (WebCore::ImageQualityController::shouldPaintAtLowQuality): + 2012-02-21 Alexander Pavlov Web Inspector: it is nearly impossible to select and copy text on the Elements panel. diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp index 73410cc..8ff0828 100644 --- a/Source/WebCore/page/FrameView.cpp +++ b/Source/WebCore/page/FrameView.cpp @@ -290,8 +290,6 @@ void FrameView::init() setCanHaveScrollbars(false); LayoutUnit marginWidth = frameElt->marginWidth(); LayoutUnit marginHeight = frameElt->marginHeight(); - // FIXME: Change to roughlyEquals or >= 0 when we move to floats. - // See https://bugs.webkit.org/show_bug.cgi?id=66148 if (marginWidth != -1) setMarginWidth(marginWidth); if (marginHeight != -1) diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp index ffab67c..0af7e3a 100755 --- a/Source/WebCore/rendering/RenderBlock.cpp +++ b/Source/WebCore/rendering/RenderBlock.cpp @@ -1517,7 +1517,6 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh // Make sure the rect is still non-empty after intersecting for overflow above if (!repaintRect.isEmpty()) { - // FIXME: Might need rounding once we switch to float, see https://bugs.webkit.org/show_bug.cgi?id=64021 repaintRectangle(repaintRect); // We need to do a partial repaint of our content. if (hasReflection()) repaintRectangle(reflectedRect(repaintRect)); @@ -1986,7 +1985,6 @@ LayoutUnit RenderBlock::computeStartPositionDeltaForChildAvoidingFloats(const Re if (childMarginStart < 0) startOff += childMarginStart; newPosition = max(newPosition, startOff); // Let the float sit in the child's margin if it can fit. - // FIXME: Needs to use epsilon once we switch to float, see https://bugs.webkit.org/show_bug.cgi?id=64021 } else if (startOff != startPosition) { // The object is shifting to the "end" side of the block. The object might be centered, so we need to // recalculate our inline direction margins. Note that the containing block content @@ -4264,8 +4262,6 @@ LayoutUnit RenderBlock::getClearDelta(RenderBox* child, LayoutUnit logicalTop) LayoutUnit newLogicalTop = logicalTop; while (true) { LayoutUnit availableLogicalWidthAtNewLogicalTopOffset = availableLogicalWidthForLine(newLogicalTop, false); - // FIXME: Change to use roughlyEquals when we move to float. - // See https://bugs.webkit.org/show_bug.cgi?id=66148 if (availableLogicalWidthAtNewLogicalTopOffset == availableLogicalWidthForContent(newLogicalTop)) return newLogicalTop - logicalTop; @@ -4286,8 +4282,6 @@ LayoutUnit RenderBlock::getClearDelta(RenderBox* child, LayoutUnit logicalTop) child->setMarginLeft(childOldMarginLeft); child->setMarginRight(childOldMarginRight); - // FIXME: Change to use roughlyEquals when we move to float. - // See https://bugs.webkit.org/show_bug.cgi?id=66148 if (childLogicalWidthAtNewLogicalTopOffset <= availableLogicalWidthAtNewLogicalTopOffset) return newLogicalTop - logicalTop; diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp index 3bbeb64..24ace51 100644 --- a/Source/WebCore/rendering/RenderBox.cpp +++ b/Source/WebCore/rendering/RenderBox.cpp @@ -2037,7 +2037,6 @@ void RenderBox::computeLogicalHeight() LayoutUnit heightResult; if (checkMinMaxHeight) { heightResult = computeLogicalHeightUsing(styleToUse->logicalHeight()); - // FIXME: Use < 0 or roughlyEquals when we move to float, see https://bugs.webkit.org/show_bug.cgi?id=66148 if (heightResult == -1) heightResult = logicalHeight(); LayoutUnit minH = computeLogicalHeightUsing(styleToUse->logicalMinHeight()); // Leave as -1 if unset. @@ -2096,7 +2095,6 @@ LayoutUnit RenderBox::computeLogicalHeightUsing(const Length& h) logicalHeight = h.value(); else if (h.isPercent()) logicalHeight = computePercentageLogicalHeight(h); - // FIXME: Use < 0 or roughlyEquals when we move to float, see https://bugs.webkit.org/show_bug.cgi?id=66148 if (logicalHeight != -1) { logicalHeight = computeBorderBoxLogicalHeight(logicalHeight); return logicalHeight; @@ -2163,7 +2161,6 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) else if (cbstyle->logicalHeight().isPercent() && !isPositionedWithSpecifiedHeight) { // We need to recur and compute the percentage height for our containing block. result = cb->computePercentageLogicalHeight(cbstyle->logicalHeight()); - // FIXME: Use < 0 or roughlyEquals when we move to float, see https://bugs.webkit.org/show_bug.cgi?id=66148 if (result != -1) result = cb->computeContentBoxLogicalHeight(result); } else if (cb->isRenderView() || (cb->isBody() && document()->inQuirksMode()) || isPositionedWithSpecifiedHeight) { @@ -2178,7 +2175,6 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) // always. Note we could only hit this case by recurring into computePercentageLogicalHeight on a positioned containing block. result = cb->computeContentBoxLogicalHeight(cb->availableLogicalHeight()); - // FIXME: Use < 0 or roughlyEquals when we move to float, see https://bugs.webkit.org/show_bug.cgi?id=66148 if (result != -1) { result = height.calcValue(result); if (includeBorderPadding) { diff --git a/Source/WebCore/rendering/RenderBoxModelObject.cpp b/Source/WebCore/rendering/RenderBoxModelObject.cpp index 8f753cd..f73387e 100644 --- a/Source/WebCore/rendering/RenderBoxModelObject.cpp +++ b/Source/WebCore/rendering/RenderBoxModelObject.cpp @@ -168,8 +168,6 @@ bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, R const AffineTransform& currentTransform = context->getCTM(); bool contextIsScaled = !currentTransform.isIdentityOrTranslationOrFlipped(); - // FIXME: Change to use roughlyEquals when we move to float. - // See https://bugs.webkit.org/show_bug.cgi?id=66148 if (!contextIsScaled && size == imageSize) { // There is no scale in effect. If we had a scale in effect before, we can just remove this object from the list. removeLayer(object, innerMap, layer); @@ -192,8 +190,6 @@ bool ImageQualityController::shouldPaintAtLowQuality(GraphicsContext* context, R // If this is the first time resizing this image, or its size is the // same as the last resize, draw at high res, but record the paint // size and set the timer. - // FIXME: Change to use roughlyEquals when we move to float. - // See https://bugs.webkit.org/show_bug.cgi?id=66148 if (isFirstResize || oldSize == size) { restartTimer(); set(object, innerMap, layer, size); -- 2.7.4