Chromium Code Reviews| Index: Source/core/layout/LayoutBlockFlow.cpp |
| diff --git a/Source/core/layout/LayoutBlockFlow.cpp b/Source/core/layout/LayoutBlockFlow.cpp |
| index 68e73c032349a84b91bead0710179c84cd684fa5..f28f5a299cebf143fab81b5666ce6b36fdb72d98 100644 |
| --- a/Source/core/layout/LayoutBlockFlow.cpp |
| +++ b/Source/core/layout/LayoutBlockFlow.cpp |
| @@ -891,9 +891,9 @@ void LayoutBlockFlow::rebuildFloatsFromIntruding() |
| const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| FloatingObjectSetIterator end = floatingObjectSet.end(); |
| for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) { |
| - FloatingObject* floatingObject = it->get(); |
| - if (!floatingObject->isDescendant()) |
| - oldIntrudingFloatSet.add(floatingObject->layoutObject()); |
| + FloatingObject& floatingObject = *it->get(); |
|
Julien - ping for review
2015/03/18 01:36:08
const FloatingObject here too.
Sunil Ratnu
2015/06/04 08:40:46
Done.
|
| + if (!floatingObject.isDescendant()) |
| + oldIntrudingFloatSet.add(floatingObject.layoutObject()); |
| } |
| } |
| @@ -956,12 +956,12 @@ void LayoutBlockFlow::rebuildFloatsFromIntruding() |
| const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| FloatingObjectSetIterator end = floatingObjectSet.end(); |
| for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) { |
| - FloatingObject* floatingObject = it->get(); |
| - FloatingObject* oldFloatingObject = floatMap.get(floatingObject->layoutObject()); |
| + FloatingObject& floatingObject = *it->get(); |
|
Julien - ping for review
2015/03/18 01:36:08
Can this one be const FloatingObject&?
Sunil Ratnu
2015/06/04 08:40:46
Yes, it can be. Made it a const.
|
| + FloatingObject* oldFloatingObject = floatMap.get(floatingObject.layoutObject()); |
| LayoutUnit logicalBottom = logicalBottomForFloat(floatingObject); |
| if (oldFloatingObject) { |
| - LayoutUnit oldLogicalBottom = logicalBottomForFloat(oldFloatingObject); |
| - if (logicalWidthForFloat(floatingObject) != logicalWidthForFloat(oldFloatingObject) || logicalLeftForFloat(floatingObject) != logicalLeftForFloat(oldFloatingObject)) { |
| + LayoutUnit oldLogicalBottom = logicalBottomForFloat(*oldFloatingObject); |
| + if (logicalWidthForFloat(floatingObject) != logicalWidthForFloat(*oldFloatingObject) || logicalLeftForFloat(floatingObject) != logicalLeftForFloat(*oldFloatingObject)) { |
| changeLogicalTop = 0; |
| changeLogicalBottom = std::max(changeLogicalBottom, std::max(logicalBottom, oldLogicalBottom)); |
| } else { |
| @@ -970,7 +970,7 @@ void LayoutBlockFlow::rebuildFloatsFromIntruding() |
| changeLogicalBottom = std::max(changeLogicalBottom, std::max(logicalBottom, oldLogicalBottom)); |
| } |
| LayoutUnit logicalTop = logicalTopForFloat(floatingObject); |
| - LayoutUnit oldLogicalTop = logicalTopForFloat(oldFloatingObject); |
| + LayoutUnit oldLogicalTop = logicalTopForFloat(*oldFloatingObject); |
| if (logicalTop != oldLogicalTop) { |
| changeLogicalTop = std::min(changeLogicalTop, std::min(logicalTop, oldLogicalTop)); |
| changeLogicalBottom = std::max(changeLogicalBottom, std::max(logicalTop, oldLogicalTop)); |
| @@ -982,7 +982,7 @@ void LayoutBlockFlow::rebuildFloatsFromIntruding() |
| oldFloatingObject->originatingLine()->markDirty(); |
| } |
| - floatMap.remove(floatingObject->layoutObject()); |
| + floatMap.remove(floatingObject.layoutObject()); |
| } else { |
| changeLogicalTop = 0; |
| changeLogicalBottom = std::max(changeLogicalBottom, logicalBottom); |
| @@ -995,7 +995,7 @@ void LayoutBlockFlow::rebuildFloatsFromIntruding() |
| OwnPtr<FloatingObject>& floatingObject = it->value; |
| if (!floatingObject->isDescendant()) { |
| changeLogicalTop = 0; |
| - changeLogicalBottom = std::max(changeLogicalBottom, logicalBottomForFloat(floatingObject.get())); |
| + changeLogicalBottom = std::max(changeLogicalBottom, logicalBottomForFloat(*floatingObject)); |
| } |
| } |
| @@ -1782,9 +1782,9 @@ void LayoutBlockFlow::addOverflowFromFloats() |
| const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| FloatingObjectSetIterator end = floatingObjectSet.end(); |
| for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) { |
| - FloatingObject* floatingObject = it->get(); |
| - if (floatingObject->isDescendant()) |
| - addOverflowFromChild(floatingObject->layoutObject(), LayoutSize(xPositionForFloatIncludingMargin(floatingObject), yPositionForFloatIncludingMargin(floatingObject))); |
| + const FloatingObject& floatingObject = *it->get(); |
| + if (floatingObject.isDescendant()) |
| + addOverflowFromChild(floatingObject.layoutObject(), LayoutSize(xPositionForFloatIncludingMargin(floatingObject), yPositionForFloatIncludingMargin(floatingObject))); |
| } |
| } |
| @@ -2053,13 +2053,13 @@ void LayoutBlockFlow::moveAllChildrenIncludingFloatsTo(LayoutBlock* toBlock, boo |
| FloatingObjectSetIterator end = fromFloatingObjectSet.end(); |
| for (FloatingObjectSetIterator it = fromFloatingObjectSet.begin(); it != end; ++it) { |
| - FloatingObject* floatingObject = it->get(); |
| + FloatingObject& floatingObject = *it->get(); |
| // Don't insert the object again if it's already in the list |
| - if (toBlockFlow->containsFloat(floatingObject->layoutObject())) |
| + if (toBlockFlow->containsFloat(floatingObject.layoutObject())) |
| continue; |
| - toBlockFlow->m_floatingObjects->add(floatingObject->unsafeClone()); |
| + toBlockFlow->m_floatingObjects->add(floatingObject.unsafeClone()); |
| } |
| } |
| @@ -2075,15 +2075,15 @@ void LayoutBlockFlow::invalidatePaintForOverhangingFloats(bool paintAllDescendan |
| const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| FloatingObjectSetIterator end = floatingObjectSet.end(); |
| for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) { |
| - FloatingObject* floatingObject = it->get(); |
| + FloatingObject& floatingObject = *it->get(); |
| // Only issue paint invaldiations for the object if it is overhanging, is not in its own layer, and |
| // is our responsibility to paint (m_shouldPaint is set). When paintAllDescendants is true, the latter |
| // condition is replaced with being a descendant of us. |
| if (logicalBottomForFloat(floatingObject) > logicalHeight() |
| - && !floatingObject->layoutObject()->hasSelfPaintingLayer() |
| - && (floatingObject->shouldPaint() || (paintAllDescendants && floatingObject->layoutObject()->isDescendantOf(this)))) { |
| + && !floatingObject.layoutObject()->hasSelfPaintingLayer() |
| + && (floatingObject.shouldPaint() || (paintAllDescendants && floatingObject.layoutObject()->isDescendantOf(this)))) { |
| - LayoutBox* floatingRenderer = floatingObject->layoutObject(); |
| + LayoutBox* floatingRenderer = floatingObject.layoutObject(); |
| floatingRenderer->setShouldDoFullPaintInvalidation(); |
| floatingRenderer->invalidatePaintForOverhangingFloats(false); |
| } |
| @@ -2153,8 +2153,8 @@ void LayoutBlockFlow::clipOutFloatingObjects(const LayoutBlock* rootBlock, const |
| const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| FloatingObjectSetIterator end = floatingObjectSet.end(); |
| for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) { |
| - FloatingObject* floatingObject = it->get(); |
| - LayoutRect floatBox(LayoutPoint(offsetFromRootBlock), floatingObject->layoutObject()->size()); |
| + FloatingObject& floatingObject = *it->get(); |
| + LayoutRect floatBox(LayoutPoint(offsetFromRootBlock), floatingObject.layoutObject()->size()); |
| floatBox.move(positionForFloatIncludingMargin(floatingObject)); |
| rootBlock->flipForWritingMode(floatBox); |
| floatBox.move(rootBlockPhysicalPosition.x(), rootBlockPhysicalPosition.y()); |
| @@ -2201,7 +2201,7 @@ void LayoutBlockFlow::removeFloatingObjects() |
| m_floatingObjects->clear(); |
| } |
| -LayoutPoint LayoutBlockFlow::flipFloatForWritingModeForChild(const FloatingObject* child, const LayoutPoint& point) const |
| +LayoutPoint LayoutBlockFlow::flipFloatForWritingModeForChild(const FloatingObject& child, const LayoutPoint& point) const |
| { |
| if (!style()->isFlippedBlocksWritingMode()) |
| return point; |
| @@ -2210,8 +2210,8 @@ LayoutPoint LayoutBlockFlow::flipFloatForWritingModeForChild(const FloatingObjec |
| // it's going to get added back in. We hide this complication here so that the calling code looks normal for the unflipped |
| // case. |
| if (isHorizontalWritingMode()) |
| - return LayoutPoint(point.x(), point.y() + size().height() - child->layoutObject()->size().height() - 2 * yPositionForFloatIncludingMargin(child)); |
| - return LayoutPoint(point.x() + size().width() - child->layoutObject()->size().width() - 2 * xPositionForFloatIncludingMargin(child), point.y()); |
| + return LayoutPoint(point.x(), point.y() + size().height() - child.layoutObject()->size().height() - 2 * yPositionForFloatIncludingMargin(child)); |
| + return LayoutPoint(point.x() + size().width() - child.layoutObject()->size().width() - 2 * xPositionForFloatIncludingMargin(child), point.y()); |
| } |
| LayoutUnit LayoutBlockFlow::logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const |
| @@ -2250,9 +2250,9 @@ LayoutUnit LayoutBlockFlow::adjustLogicalRightOffsetForLine(LayoutUnit offsetFro |
| return right; |
| } |
| -LayoutPoint LayoutBlockFlow::computeLogicalLocationForFloat(const FloatingObject* floatingObject, LayoutUnit logicalTopOffset) const |
| +LayoutPoint LayoutBlockFlow::computeLogicalLocationForFloat(const FloatingObject& floatingObject, LayoutUnit logicalTopOffset) const |
| { |
| - LayoutBox* childBox = floatingObject->layoutObject(); |
| + LayoutBox* childBox = floatingObject.layoutObject(); |
| LayoutUnit logicalLeftOffset = logicalLeftOffsetForContent(); // Constant part of left offset. |
| LayoutUnit logicalRightOffset; // Constant part of right offset. |
| logicalRightOffset = logicalRightOffsetForContent(); |
| @@ -2334,7 +2334,7 @@ FloatingObject* LayoutBlockFlow::insertFloatingObject(LayoutBox& floatBox) |
| floatBox.computeAndSetBlockDirectionMargins(this); |
| } |
| - setLogicalWidthForFloat(newObj.get(), logicalWidthForChild(floatBox) + marginStartForChild(floatBox) + marginEndForChild(floatBox)); |
| + setLogicalWidthForFloat(*newObj, logicalWidthForChild(floatBox) + marginStartForChild(floatBox) + marginEndForChild(floatBox)); |
| return m_floatingObjects->add(newObj.release()); |
| } |
| @@ -2345,7 +2345,7 @@ void LayoutBlockFlow::removeFloatingObject(LayoutBox* floatBox) |
| const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| FloatingObjectSetIterator it = floatingObjectSet.find<FloatingObjectHashTranslator>(floatBox); |
| if (it != floatingObjectSet.end()) { |
| - FloatingObject* floatingObject = it->get(); |
| + FloatingObject& floatingObject = *it->get(); |
|
Julien - ping for review
2015/03/18 01:36:07
const FloatingObject&? (I will not repeat this com
Sunil Ratnu
2015/06/04 08:40:46
We cant have const here because of the remove() me
|
| if (childrenInline()) { |
| LayoutUnit logicalTop = logicalTopForFloat(floatingObject); |
| LayoutUnit logicalBottom = logicalBottomForFloat(floatingObject); |
| @@ -2359,18 +2359,18 @@ void LayoutBlockFlow::removeFloatingObject(LayoutBox* floatBox) |
| // accomplished by pretending they have a height of 1. |
| logicalBottom = std::max(logicalBottom, logicalTop + 1); |
| } |
| - if (floatingObject->originatingLine()) { |
| + if (floatingObject.originatingLine()) { |
| if (!selfNeedsLayout()) { |
| - ASSERT(floatingObject->originatingLine()->layoutObject() == this); |
| - floatingObject->originatingLine()->markDirty(); |
| + ASSERT(floatingObject.originatingLine()->layoutObject() == this); |
| + floatingObject.originatingLine()->markDirty(); |
| } |
| #if ENABLE(ASSERT) |
| - floatingObject->setOriginatingLine(0); |
| + floatingObject.setOriginatingLine(0); |
| #endif |
| } |
| markLinesDirtyInBlockRange(0, logicalBottom); |
| } |
| - m_floatingObjects->remove(floatingObject); |
| + m_floatingObjects->remove(&floatingObject); |
| } |
| } |
| } |
| @@ -2382,7 +2382,7 @@ void LayoutBlockFlow::removeFloatingObjectsBelow(FloatingObject* lastFloat, int |
| const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| FloatingObject* curr = floatingObjectSet.last().get(); |
| - while (curr != lastFloat && (!curr->isPlaced() || logicalTopForFloat(curr) >= logicalOffset)) { |
| + while (curr != lastFloat && (!curr->isPlaced() || logicalTopForFloat(*curr) >= logicalOffset)) { |
| m_floatingObjects->remove(curr); |
| if (floatingObjectSet.isEmpty()) |
| break; |
| @@ -2423,18 +2423,18 @@ bool LayoutBlockFlow::positionNewFloats(LineWidth* width) |
| // The float cannot start above the top position of the last positioned float. |
| if (lastPlacedFloatingObject) |
| - logicalTop = std::max(logicalTopForFloat(lastPlacedFloatingObject), logicalTop); |
| + logicalTop = std::max(logicalTopForFloat(*lastPlacedFloatingObject), logicalTop); |
| FloatingObjectSetIterator end = floatingObjectSet.end(); |
| // Now walk through the set of unpositioned floats and place them. |
| for (; it != end; ++it) { |
| - FloatingObject* floatingObject = it->get(); |
| + FloatingObject& floatingObject = *it->get(); |
| // The containing block is responsible for positioning floats, so if we have floats in our |
| // list that come from somewhere else, do not attempt to position them. |
| - if (floatingObject->layoutObject()->containingBlock() != this) |
| + if (floatingObject.layoutObject()->containingBlock() != this) |
| continue; |
| - LayoutBox* childBox = floatingObject->layoutObject(); |
| + LayoutBox* childBox = floatingObject.layoutObject(); |
| // FIXME Investigate if this can be removed. crbug.com/370006 |
| childBox->setMayNeedPaintInvalidation(); |
| @@ -2475,7 +2475,7 @@ bool LayoutBlockFlow::positionNewFloats(LineWidth* width) |
| } |
| if (newLogicalTop != floatLogicalLocation.y()) { |
| - floatingObject->setPaginationStrut(newLogicalTop - floatLogicalLocation.y()); |
| + floatingObject.setPaginationStrut(newLogicalTop - floatLogicalLocation.y()); |
| floatLogicalLocation = computeLogicalLocationForFloat(floatingObject, newLogicalTop); |
| setLogicalLeftForFloat(floatingObject, floatLogicalLocation.x()); |
| @@ -2493,7 +2493,7 @@ bool LayoutBlockFlow::positionNewFloats(LineWidth* width) |
| setLogicalHeightForFloat(floatingObject, logicalHeightForChild(*childBox) + marginBeforeForChild(*childBox) + marginAfterForChild(*childBox)); |
| - m_floatingObjects->addPlacedObject(floatingObject); |
| + m_floatingObjects->addPlacedObject(&floatingObject); |
| if (ShapeOutsideInfo* shapeOutside = childBox->shapeOutsideInfo()) |
| shapeOutside->setReferenceBoxLogicalSize(logicalSizeForChild(*childBox)); |
| @@ -2514,7 +2514,7 @@ bool LayoutBlockFlow::hasOverhangingFloat(LayoutBox* renderer) |
| if (it == floatingObjectSet.end()) |
| return false; |
| - return logicalBottomForFloat(it->get()) > logicalHeight(); |
| + return logicalBottomForFloat(*it->get()) > logicalHeight(); |
| } |
| void LayoutBlockFlow::addIntrudingFloats(LayoutBlockFlow* prev, LayoutUnit logicalLeftOffset, LayoutUnit logicalTopOffset) |
| @@ -2534,9 +2534,9 @@ void LayoutBlockFlow::addIntrudingFloats(LayoutBlockFlow* prev, LayoutUnit logic |
| const FloatingObjectSet& prevSet = prev->m_floatingObjects->set(); |
| FloatingObjectSetIterator prevEnd = prevSet.end(); |
| for (FloatingObjectSetIterator prevIt = prevSet.begin(); prevIt != prevEnd; ++prevIt) { |
| - FloatingObject* floatingObject = prevIt->get(); |
| + FloatingObject& floatingObject = *prevIt->get(); |
| if (logicalBottomForFloat(floatingObject) > logicalTopOffset) { |
| - if (!m_floatingObjects || !m_floatingObjects->set().contains(floatingObject)) { |
| + if (!m_floatingObjects || !m_floatingObjects->set().contains(&floatingObject)) { |
| // We create the floating object list lazily. |
| if (!m_floatingObjects) |
| createFloatingObjects(); |
| @@ -2550,7 +2550,7 @@ void LayoutBlockFlow::addIntrudingFloats(LayoutBlockFlow* prev, LayoutUnit logic |
| ? LayoutSize(logicalLeftOffset - (prev != parent() ? prev->marginLeft() : LayoutUnit()), logicalTopOffset) |
| : LayoutSize(logicalTopOffset, logicalLeftOffset - (prev != parent() ? prev->marginTop() : LayoutUnit())); |
| - m_floatingObjects->add(floatingObject->copyToNewContainer(offset)); |
| + m_floatingObjects->add(floatingObject.copyToNewContainer(offset)); |
| } |
| } |
| } |
| @@ -2569,13 +2569,13 @@ void LayoutBlockFlow::addOverhangingFloats(LayoutBlockFlow* child, bool makeChil |
| // overflow. |
| FloatingObjectSetIterator childEnd = child->m_floatingObjects->set().end(); |
| for (FloatingObjectSetIterator childIt = child->m_floatingObjects->set().begin(); childIt != childEnd; ++childIt) { |
| - FloatingObject* floatingObject = childIt->get(); |
| + FloatingObject& floatingObject = *childIt->get(); |
| LayoutUnit logicalBottomForFloat = std::min(this->logicalBottomForFloat(floatingObject), LayoutUnit::max() - childLogicalTop); |
| LayoutUnit logicalBottom = childLogicalTop + logicalBottomForFloat; |
| if (logicalBottom > logicalHeight()) { |
| // If the object is not in the list, we add it now. |
| - if (!containsFloat(floatingObject->layoutObject())) { |
| + if (!containsFloat(floatingObject.layoutObject())) { |
| LayoutSize offset = isHorizontalWritingMode() ? LayoutSize(-childLogicalLeft, -childLogicalTop) : LayoutSize(-childLogicalTop, -childLogicalLeft); |
| bool shouldPaint = false; |
| @@ -2583,31 +2583,31 @@ void LayoutBlockFlow::addOverhangingFloats(LayoutBlockFlow* child, bool makeChil |
| // behaves properly). We always want to propagate the desire to paint the float as |
| // far out as we can, to the outermost block that overlaps the float, stopping only |
| // if we hit a self-painting layer boundary. |
| - if (floatingObject->layoutObject()->enclosingFloatPaintingLayer() == enclosingFloatPaintingLayer()) { |
| - floatingObject->setShouldPaint(false); |
| + if (floatingObject.layoutObject()->enclosingFloatPaintingLayer() == enclosingFloatPaintingLayer()) { |
| + floatingObject.setShouldPaint(false); |
| shouldPaint = true; |
| } |
| // We create the floating object list lazily. |
| if (!m_floatingObjects) |
| createFloatingObjects(); |
| - m_floatingObjects->add(floatingObject->copyToNewContainer(offset, shouldPaint, true)); |
| + m_floatingObjects->add(floatingObject.copyToNewContainer(offset, shouldPaint, true)); |
| } |
| } else { |
| - if (makeChildPaintOtherFloats && !floatingObject->shouldPaint() && !floatingObject->layoutObject()->hasSelfPaintingLayer() |
| - && floatingObject->layoutObject()->isDescendantOf(child) && floatingObject->layoutObject()->enclosingFloatPaintingLayer() == child->enclosingFloatPaintingLayer()) { |
| + if (makeChildPaintOtherFloats && !floatingObject.shouldPaint() && !floatingObject.layoutObject()->hasSelfPaintingLayer() |
| + && floatingObject.layoutObject()->isDescendantOf(child) && floatingObject.layoutObject()->enclosingFloatPaintingLayer() == child->enclosingFloatPaintingLayer()) { |
| // The float is not overhanging from this block, so if it is a descendant of the child, the child should |
| // paint it (the other case is that it is intruding into the child), unless it has its own layer or enclosing |
| // layer. |
| // If makeChildPaintOtherFloats is false, it means that the child must already know about all the floats |
| // it should paint. |
| - floatingObject->setShouldPaint(true); |
| + floatingObject.setShouldPaint(true); |
| } |
| // Since the float doesn't overhang, it didn't get put into our list. We need to go ahead and add its overflow in to the |
| // child now. |
| - if (floatingObject->isDescendant()) |
| - child->addOverflowFromChild(floatingObject->layoutObject(), LayoutSize(xPositionForFloatIncludingMargin(floatingObject), yPositionForFloatIncludingMargin(floatingObject))); |
| + if (floatingObject.isDescendant()) |
| + child->addOverflowFromChild(floatingObject.layoutObject(), LayoutSize(xPositionForFloatIncludingMargin(floatingObject), yPositionForFloatIncludingMargin(floatingObject))); |
| } |
| } |
| } |
| @@ -2629,11 +2629,11 @@ LayoutUnit LayoutBlockFlow::nextFloatLogicalBottomBelow(LayoutUnit logicalHeight |
| const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| FloatingObjectSetIterator end = floatingObjectSet.end(); |
| for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) { |
| - FloatingObject* floatingObject = it->get(); |
| + FloatingObject& floatingObject = *it->get(); |
| LayoutUnit floatLogicalBottom = logicalBottomForFloat(floatingObject); |
| - ShapeOutsideInfo* shapeOutside = floatingObject->layoutObject()->shapeOutsideInfo(); |
| + ShapeOutsideInfo* shapeOutside = floatingObject.layoutObject()->shapeOutsideInfo(); |
| if (shapeOutside && (offsetMode == ShapeOutsideFloatShapeOffset)) { |
| - LayoutUnit shapeLogicalBottom = logicalTopForFloat(floatingObject) + marginBeforeForChild(*(floatingObject->layoutObject())) + shapeOutside->shapeLogicalBottom(); |
| + LayoutUnit shapeLogicalBottom = logicalTopForFloat(floatingObject) + marginBeforeForChild(*(floatingObject.layoutObject())) + shapeOutside->shapeLogicalBottom(); |
| // Use the shapeLogicalBottom unless it extends outside of the margin box, in which case it is clipped. |
| if (shapeLogicalBottom < floatLogicalBottom) |
| floatLogicalBottom = shapeLogicalBottom; |
| @@ -2660,12 +2660,12 @@ bool LayoutBlockFlow::hitTestFloats(const HitTestRequest& request, HitTestResult |
| FloatingObjectSetIterator begin = floatingObjectSet.begin(); |
| for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) { |
| --it; |
| - FloatingObject* floatingObject = it->get(); |
| - if (floatingObject->shouldPaint() && !floatingObject->layoutObject()->hasSelfPaintingLayer()) { |
| - LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject) - floatingObject->layoutObject()->location().x(); |
| - LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject) - floatingObject->layoutObject()->location().y(); |
| + FloatingObject& floatingObject = *it->get(); |
| + if (floatingObject.shouldPaint() && !floatingObject.layoutObject()->hasSelfPaintingLayer()) { |
| + LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject) - floatingObject.layoutObject()->location().x(); |
| + LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject) - floatingObject.layoutObject()->location().y(); |
| LayoutPoint childPoint = flipFloatForWritingModeForChild(floatingObject, adjustedLocation + LayoutSize(xOffset, yOffset)); |
| - if (floatingObject->layoutObject()->hitTest(request, result, locationInContainer, childPoint)) { |
| + if (floatingObject.layoutObject()->hitTest(request, result, locationInContainer, childPoint)) { |
| updateHitTestResult(result, locationInContainer.point() - toLayoutSize(childPoint)); |
| return true; |
| } |