Diff
Modified: trunk/Source/WebCore/ChangeLog (181504 => 181505)
--- trunk/Source/WebCore/ChangeLog 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/ChangeLog 2015-03-15 05:32:06 UTC (rev 181505)
@@ -1,3 +1,75 @@
+2015-03-14 Simon Fraser <[email protected]>
+
+ Clean up use of flags in localToContainer-type functions
+ https://bugs.webkit.org/show_bug.cgi?id=142704
+
+ Reviewed by Alexey Proskuryakov.
+
+ RenderObject::localToContainerQuad() had the questionable behavior of always
+ enforcing UseTransforms in the flags. However, a future patch will need to call
+ localToContainerQuad() without this flag.
+
+ Fix by requiring callers of localToAbsoluteQuad(), localToContainerQuad(), localToContainerPoint(),
+ and absoluteToLocalQuad() to pass the UseTransforms flag in, providing it as a default argument.
+
+ The default value of the MapCoordinatesFlags parameter to mapLocalToContainer(),
+ a lower-level function, is removed.
+
+ Sprinkle a few more nullptrs around.
+
+ No behavior change.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::selectionGapRectsForRepaint): call the higher-level localToContainerPoint()
+ instead of mapLocalToContainer().
+ (WebCore::RenderBlock::absoluteQuads): Pass UseTransforms.
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::absoluteQuads): Ditto.
+ * rendering/RenderBox.h:
+ * rendering/RenderFlowThread.h:
+ * rendering/RenderGeometryMap.h:
+ (WebCore::RenderGeometryMap::absolutePoint):
+ (WebCore::RenderGeometryMap::absoluteRect):
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::collectSelectionRects): This function was erroneously passing
+ 'false' as flags. Pass UseTransforms instead (but no behavior change since
+ UseTransforms was forced on lower down).
+ * rendering/RenderInline.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::scrollRectToVisible): UseTransforms is the parameter default, remove it.
+ * rendering/RenderLineBreak.cpp:
+ (WebCore::RenderLineBreak::absoluteQuads):
+ (WebCore::RenderLineBreak::collectSelectionRects): Another erroneous 'false'.
+ * rendering/RenderNamedFlowFragment.cpp:
+ (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::localToContainerQuad): Here's where we no longer force
+ the UseTransforms bit.
+ (WebCore::RenderObject::localToContainerPoint): Also here.
+ * rendering/RenderObject.h: I prefer bit flags lined up. Makes it easier to spot errors.
+ (WebCore::RenderObject::localToAbsoluteQuad):
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::collectSelectionRects): Another bad 'false'.
+ * rendering/RenderTextLineBoxes.cpp:
+ (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
+ (WebCore::RenderTextLineBoxes::absoluteQuads):
+ (WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
+ * rendering/RenderView.h:
+ * rendering/SimpleLineLayoutFunctions.cpp:
+ (WebCore::SimpleLineLayout::collectAbsoluteQuads):
+ * rendering/svg/RenderSVGForeignObject.h:
+ * rendering/svg/RenderSVGInline.cpp:
+ (WebCore::RenderSVGInline::absoluteQuads): Another bad 'false'.
+ * rendering/svg/RenderSVGInline.h:
+ * rendering/svg/RenderSVGModelObject.cpp:
+ (WebCore::RenderSVGModelObject::absoluteQuads):
+ * rendering/svg/RenderSVGModelObject.h:
+ * rendering/svg/RenderSVGRoot.h:
+ * rendering/svg/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::absoluteQuads):
+ * rendering/svg/RenderSVGText.h:
+ * rendering/svg/SVGRenderSupport.h:
+
2015-03-14 Brent Fulgham <[email protected]>
[iOS] scroll snap points are animating to the wrong positions...
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -1738,9 +1738,8 @@
if (!shouldPaintSelectionGaps())
return GapRects();
- TransformState transformState(TransformState::ApplyTransformDirection, FloatPoint());
- mapLocalToContainer(repaintContainer, transformState, ApplyContainerFlip | UseTransforms);
- LayoutPoint offsetFromRepaintContainer(transformState.mappedPoint() - scrolledContentOffset());
+ FloatPoint containerPoint = localToContainerPoint(FloatPoint(), repaintContainer, UseTransforms);
+ LayoutPoint offsetFromRepaintContainer(containerPoint - scrolledContentOffset());
LogicalSelectionOffsetCaches cache(*this);
LayoutUnit lastTop = 0;
@@ -3330,7 +3329,7 @@
// https://bugs.webkit.org/show_bug.cgi?id=46781
RenderFlowThread* flowThread = flowThreadContainingBlock();
if (!flowThread || !flowThread->absoluteQuadsForBox(quads, wasFixed, this, localRect.y(), localRect.maxY()))
- quads.append(localToAbsoluteQuad(localRect, 0 /* mode */, wasFixed));
+ quads.append(localToAbsoluteQuad(localRect, UseTransforms, wasFixed));
if (isAnonymousBlockContinuation())
continuation()->absoluteQuads(quads, wasFixed);
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -618,7 +618,7 @@
if (flowThread && flowThread->absoluteQuadsForBox(quads, wasFixed, this, localRect.y(), localRect.maxY()))
return;
- quads.append(localToAbsoluteQuad(localRect, 0 /* mode */, wasFixed));
+ quads.append(localToAbsoluteQuad(localRect, UseTransforms, wasFixed));
}
void RenderBox::updateLayerTransform()
Modified: trunk/Source/WebCore/rendering/RenderBox.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderBox.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderBox.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -646,7 +646,7 @@
virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !isInlineBlockOrInlineTable(); }
- virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const override;
+ virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject*, RenderGeometryMap&) const override;
virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const override;
Modified: trunk/Source/WebCore/rendering/RenderFlowThread.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderFlowThread.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -255,9 +255,9 @@
void clearLinesToRegionMap();
virtual void willBeDestroyed() override;
- virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const override;
+ virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
- void updateRegionsFlowThreadPortionRect(const RenderRegion* = 0);
+ void updateRegionsFlowThreadPortionRect(const RenderRegion* = nullptr);
bool shouldRepaint(const LayoutRect&) const;
bool updateAllLayerToRegionMappings();
@@ -266,7 +266,7 @@
void updateLayerToRegionMappings(RenderLayer&, LayerToRegionMap&, RegionToLayerListMap&, bool& needsLayerUpdate);
void updateRegionForRenderLayer(RenderLayer*, LayerToRegionMap&, RegionToLayerListMap&, bool& needsLayerUpdate);
- void initializeRegionsComputedAutoHeight(RenderRegion* = 0);
+ void initializeRegionsComputedAutoHeight(RenderRegion* = nullptr);
inline bool hasCachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*) const;
inline LayoutUnit cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*) const;
@@ -287,7 +287,7 @@
public:
RenderRegionRange()
{
- setRange(0, 0);
+ setRange(nullptr, nullptr);
}
RenderRegionRange(RenderRegion* start, RenderRegion* end)
@@ -320,7 +320,7 @@
public:
RegionSearchAdapter(LayoutUnit offset)
: m_offset(offset)
- , m_result(0)
+ , m_result(nullptr)
{
}
Modified: trunk/Source/WebCore/rendering/RenderGeometryMap.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderGeometryMap.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderGeometryMap.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -82,12 +82,12 @@
FloatPoint absolutePoint(const FloatPoint& p) const
{
- return mapToContainer(p, 0);
+ return mapToContainer(p, nullptr);
}
FloatRect absoluteRect(const FloatRect& rect) const
{
- return mapToContainer(rect, 0).boundingBox();
+ return mapToContainer(rect, nullptr).boundingBox();
}
// Map to a container. Will assert that the container has been pushed onto this map.
@@ -110,11 +110,11 @@
void push(const RenderObject*, const TransformationMatrix&, bool accumulatingTransform = false, bool isNonUniform = false, bool isFixedPosition = false, bool hasTransform = false);
// RenderView gets special treatment, because it applies the scroll offset only for elements inside in fixed position.
- void pushView(const RenderView*, const LayoutSize& scrollOffset, const TransformationMatrix* = 0);
+ void pushView(const RenderView*, const LayoutSize& scrollOffset, const TransformationMatrix* = nullptr);
void pushRenderFlowThread(const RenderFlowThread*);
private:
- void mapToContainer(TransformState&, const RenderLayerModelObject* container = 0) const;
+ void mapToContainer(TransformState&, const RenderLayerModelObject* container = nullptr) const;
void stepInserted(const RenderGeometryMapStep&);
void stepRemoved(const RenderGeometryMapStep&);
Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderImage.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -105,7 +105,7 @@
}
bool isFixed = false;
- IntRect absoluteBounds = localToAbsoluteQuad(FloatRect(imageRect), false, &isFixed).enclosingBoundingBox();
+ IntRect absoluteBounds = localToAbsoluteQuad(FloatRect(imageRect), UseTransforms, &isFixed).enclosingBoundingBox();
IntRect lineExtentBounds = localToAbsoluteQuad(FloatRect(lineExtentRect)).enclosingBoundingBox();
if (!containingBlock->isHorizontalWritingMode())
lineExtentBounds = lineExtentBounds.transposedRect();
Modified: trunk/Source/WebCore/rendering/RenderInline.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderInline.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderInline.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -147,7 +147,7 @@
virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const override final;
virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed) const override final;
- virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const override;
+ virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override;
virtual VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override final;
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -2460,7 +2460,7 @@
// This will prevent us from revealing text hidden by the slider in Safari RSS.
RenderBox* box = renderBox();
ASSERT(box);
- LayoutRect localExposeRect(box->absoluteToLocalQuad(FloatQuad(FloatRect(rect)), UseTransforms).boundingBox());
+ LayoutRect localExposeRect(box->absoluteToLocalQuad(FloatQuad(FloatRect(rect))).boundingBox());
LayoutRect layerBounds(0, 0, box->clientWidth(), box->clientHeight());
LayoutRect r = getRectToExpose(layerBounds, layerBounds, localExposeRect, alignX, alignY);
Modified: trunk/Source/WebCore/rendering/RenderLineBreak.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderLineBreak.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderLineBreak.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -181,7 +181,7 @@
{
if (!m_inlineBoxWrapper)
return;
- quads.append(localToAbsoluteQuad(FloatRect(m_inlineBoxWrapper->topLeft(), m_inlineBoxWrapper->size()), 0 /* mode */, wasFixed));
+ quads.append(localToAbsoluteQuad(FloatRect(m_inlineBoxWrapper->topLeft(), m_inlineBoxWrapper->size()), UseTransforms, wasFixed));
}
void RenderLineBreak::updateFromStyle()
@@ -231,7 +231,7 @@
isLastOnLine = !containingBlock->containingBlock()->inlineBoxWrapper()->nextOnLineExists();
bool isFixed = false;
- IntRect absRect = localToAbsoluteQuad(FloatRect(rect), false, &isFixed).enclosingBoundingBox();
+ IntRect absRect = localToAbsoluteQuad(FloatRect(rect), UseTransforms, &isFixed).enclosingBoundingBox();
bool boxIsHorizontal = !box->isSVGInlineTextBox() ? box->isHorizontal() : !style().svgStyle().isVerticalWritingMode();
// If the containing block is an inline element, we want to check the inlineBoxWrapper orientation
// to determine the orientation of the block. In this case we also use the inlineBoxWrapper to
Modified: trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -536,7 +536,7 @@
return;
CurrentRenderRegionMaintainer regionMaintainer(*this);
- quads.append(renderer->localToAbsoluteQuad(FloatRect(fragmentRect), 0 /* mode */, wasFixed));
+ quads.append(renderer->localToAbsoluteQuad(FloatRect(fragmentRect), UseTransforms, wasFixed));
}
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -1696,7 +1696,7 @@
// Track the point at the center of the quad's bounding box. As mapLocalToContainer() calls offsetFromContainer(),
// it will use that point as the reference point to decide which column's transform to apply in multiple-column blocks.
TransformState transformState(TransformState::ApplyTransformDirection, localQuad.boundingBox().center(), localQuad);
- mapLocalToContainer(repaintContainer, transformState, mode | ApplyContainerFlip | UseTransforms, wasFixed);
+ mapLocalToContainer(repaintContainer, transformState, mode | ApplyContainerFlip, wasFixed);
transformState.flatten();
return transformState.lastPlanarQuad();
@@ -1705,7 +1705,7 @@
FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, const RenderLayerModelObject* repaintContainer, MapCoordinatesFlags mode, bool* wasFixed) const
{
TransformState transformState(TransformState::ApplyTransformDirection, localPoint);
- mapLocalToContainer(repaintContainer, transformState, mode | ApplyContainerFlip | UseTransforms, wasFixed);
+ mapLocalToContainer(repaintContainer, transformState, mode | ApplyContainerFlip, wasFixed);
transformState.flatten();
return transformState.lastPlanarPoint();
Modified: trunk/Source/WebCore/rendering/RenderObject.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderObject.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -106,9 +106,9 @@
};
enum MapCoordinatesMode {
- IsFixed = 1 << 0,
- UseTransforms = 1 << 1,
- ApplyContainerFlip = 1 << 2
+ IsFixed = 1 << 0,
+ UseTransforms = 1 << 1,
+ ApplyContainerFlip = 1 << 2
};
typedef unsigned MapCoordinatesFlags;
@@ -646,22 +646,21 @@
// returns the containing block level element for this element.
RenderBlock* containingBlock() const;
- // Convert the given local point to absolute coordinates
- // FIXME: Temporary. If UseTransforms is true, take transforms into account. Eventually localToAbsolute() will always be transform-aware.
+ // Convert the given local point to absolute coordinates. If MapCoordinatesFlags includes UseTransforms, take transforms into account.
WEBCORE_EXPORT FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapCoordinatesFlags = 0) const;
FloatPoint absoluteToLocal(const FloatPoint&, MapCoordinatesFlags = 0) const;
// Convert a local quad to absolute coordinates, taking transforms into account.
- FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mode = 0, bool* wasFixed = nullptr) const
+ FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mode = UseTransforms, bool* wasFixed = nullptr) const
{
return localToContainerQuad(quad, nullptr, mode, wasFixed);
}
// Convert an absolute quad to local coordinates.
- FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0) const;
+ FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = UseTransforms) const;
// Convert a local quad into the coordinate system of container, taking transforms into account.
- WEBCORE_EXPORT FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObject* repaintContainer, MapCoordinatesFlags = 0, bool* wasFixed = nullptr) const;
- WEBCORE_EXPORT FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelObject* repaintContainer, MapCoordinatesFlags = 0, bool* wasFixed = nullptr) const;
+ WEBCORE_EXPORT FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObject* repaintContainer, MapCoordinatesFlags = UseTransforms, bool* wasFixed = nullptr) const;
+ WEBCORE_EXPORT FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelObject* repaintContainer, MapCoordinatesFlags = UseTransforms, bool* wasFixed = nullptr) const;
// Return the offset from the container() renderer (excluding transforms). In multi-column layout,
// different offsets apply at different points, so return the offset that applies to the given point.
@@ -829,7 +828,7 @@
// Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use
// localToAbsolute/absoluteToLocal methods instead.
- virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr) const;
+ virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed = nullptr) const;
virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const;
// Pushes state onto RenderGeometryMap about how to map coordinates from this renderer to its container, or ancestorToStopAt (whichever is encountered first).
Modified: trunk/Source/WebCore/rendering/RenderText.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderText.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderText.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -383,7 +383,7 @@
bool containsEnd = box->start() <= end && box->end() + 1 >= end;
bool isFixed = false;
- IntRect absRect = localToAbsoluteQuad(FloatRect(rect), false, &isFixed).enclosingBoundingBox();
+ IntRect absRect = localToAbsoluteQuad(FloatRect(rect), UseTransforms, &isFixed).enclosingBoundingBox();
bool boxIsHorizontal = !box->isSVGInlineTextBox() ? box->isHorizontal() : !style().svgStyle().isVerticalWritingMode();
// If the containing block is an inline element, we want to check the inlineBoxWrapper orientation
// to determine the orientation of the block. In this case we also use the inlineBoxWrapper to
Modified: trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderTextLineBoxes.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -550,13 +550,13 @@
boundaries.setX(selectionRect.x());
}
}
- rects.append(renderer.localToAbsoluteQuad(boundaries, 0, wasFixed).enclosingBoundingBox());
+ rects.append(renderer.localToAbsoluteQuad(boundaries, UseTransforms, wasFixed).enclosingBoundingBox());
continue;
}
// FIXME: This code is wrong. It's converting local to absolute twice. http://webkit.org/b/65722
FloatRect rect = localQuadForTextBox(*box, start, end, useSelectionHeight);
if (!rect.isZero())
- rects.append(renderer.localToAbsoluteQuad(rect, 0, wasFixed).enclosingBoundingBox());
+ rects.append(renderer.localToAbsoluteQuad(rect, UseTransforms, wasFixed).enclosingBoundingBox());
}
return rects;
}
@@ -576,7 +576,7 @@
else
boundaries.setHeight(ellipsisRect.maxY() - boundaries.y());
}
- quads.append(renderer.localToAbsoluteQuad(boundaries, 0, wasFixed));
+ quads.append(renderer.localToAbsoluteQuad(boundaries, UseTransforms, wasFixed));
}
return quads;
}
@@ -598,12 +598,12 @@
boundaries.setX(selectionRect.x());
}
}
- quads.append(renderer.localToAbsoluteQuad(boundaries, 0, wasFixed));
+ quads.append(renderer.localToAbsoluteQuad(boundaries, UseTransforms, wasFixed));
continue;
}
FloatRect rect = localQuadForTextBox(*box, start, end, useSelectionHeight);
if (!rect.isZero())
- quads.append(renderer.localToAbsoluteQuad(rect, 0, wasFixed));
+ quads.append(renderer.localToAbsoluteQuad(rect, UseTransforms, wasFixed));
}
return quads;
}
Modified: trunk/Source/WebCore/rendering/RenderView.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/RenderView.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/RenderView.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -243,7 +243,7 @@
void unscheduleLazyRepaint(RenderBox&);
protected:
- virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr) const override;
+ virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override;
virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const override;
virtual bool requiresColumns(int desiredColumnCount) const override;
Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -175,7 +175,7 @@
Vector<FloatQuad> quads;
auto resolver = runResolver(downcast<RenderBlockFlow>(*renderer.parent()), layout);
for (const auto& run : resolver.rangeForRenderer(renderer))
- quads.append(renderer.localToAbsoluteQuad(FloatQuad(run.rect()), 0, wasFixed));
+ quads.append(renderer.localToAbsoluteQuad(FloatQuad(run.rect()), UseTransforms, wasFixed));
return quads;
}
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -53,7 +53,7 @@
virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction) override;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
- virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const override;
+ virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override;
virtual void setNeedsTransformUpdate() override { m_needsTransformUpdate = true; }
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInline.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/svg/RenderSVGInline.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInline.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -95,7 +95,7 @@
FloatRect textBoundingBox = textAncestor->strokeBoundingBox();
for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
- quads.append(localToAbsoluteQuad(FloatRect(textBoundingBox.x() + box->x(), textBoundingBox.y() + box->y(), box->logicalWidth(), box->logicalHeight()), false, wasFixed));
+ quads.append(localToAbsoluteQuad(FloatRect(textBoundingBox.x() + box->x(), textBoundingBox.y() + box->y(), box->logicalWidth(), box->logicalHeight()), UseTransforms, wasFixed));
}
void RenderSVGInline::willBeDestroyed()
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInline.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/svg/RenderSVGInline.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInline.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -52,7 +52,7 @@
virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override final;
virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const override final;
- virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const override final;
+ virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override final;
virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override final;
virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override final;
@@ -61,7 +61,7 @@
virtual void willBeDestroyed() override final;
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override final;
- virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) override final;
+ virtual void addChild(RenderObject* child, RenderObject* beforeChild = nullptr) override final;
virtual void removeChild(RenderObject&) override final;
};
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -86,7 +86,7 @@
void RenderSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
- quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 /* mode */, wasFixed));
+ quads.append(localToAbsoluteQuad(strokeBoundingBox(), UseTransforms, wasFixed));
}
void RenderSVGModelObject::willBeDestroyed()
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -53,7 +53,7 @@
virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override final;
virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;
- virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const override final;
+ virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override final;
virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override final;
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -97,7 +97,7 @@
virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override;
virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed) const override;
- virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const override;
+ virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override;
virtual bool canBeSelectionLeaf() const override { return false; }
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp (181504 => 181505)
--- trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp 2015-03-15 05:32:06 UTC (rev 181505)
@@ -475,7 +475,7 @@
void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
- quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 /* mode */, wasFixed));
+ quads.append(localToAbsoluteQuad(strokeBoundingBox(), UseTransforms, wasFixed));
}
void RenderSVGText::paint(PaintInfo& paintInfo, const LayoutPoint&)
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGText.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/svg/RenderSVGText.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGText.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -81,7 +81,7 @@
virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const override;
virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const override;
- virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const override;
+ virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override;
virtual void addChild(RenderObject* child, RenderObject* beforeChild = nullptr) override;
virtual void removeChild(RenderObject&) override;
Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.h (181504 => 181505)
--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.h 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.h 2015-03-15 05:32:06 UTC (rev 181505)
@@ -69,7 +69,7 @@
static LayoutRect clippedOverflowRectForRepaint(const RenderElement&, const RenderLayerModelObject* repaintContainer);
static void computeFloatRectForRepaint(const RenderElement&, const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed);
static const RenderElement& localToParentTransform(const RenderElement&, AffineTransform &);
- static void mapLocalToContainer(const RenderElement&, const RenderLayerModelObject* repaintContainer, TransformState&, bool* wasFixed = 0);
+ static void mapLocalToContainer(const RenderElement&, const RenderLayerModelObject* repaintContainer, TransformState&, bool* wasFixed);
static const RenderElement* pushMappingToContainer(const RenderElement&, const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&);
static bool checkForSVGRepaintDuringLayout(const RenderElement&);
Modified: trunk/Source/WebKit2/ChangeLog (181504 => 181505)
--- trunk/Source/WebKit2/ChangeLog 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebKit2/ChangeLog 2015-03-15 05:32:06 UTC (rev 181505)
@@ -1,3 +1,15 @@
+2015-03-14 Simon Fraser <[email protected]>
+
+ Clean up use of flags in localToContainer-type functions
+ https://bugs.webkit.org/show_bug.cgi?id=142704
+
+ Reviewed by Alexey Proskuryakov.
+
+ Pass UseTransforms explicitly to localToContainerPoint()
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::getAssistedNodeInformation):
+
2015-03-14 Brent Fulgham <[email protected]>
[iOS] scroll snap points are animating to the wrong positions.
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (181504 => 181505)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-03-15 05:11:19 UTC (rev 181504)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-03-15 05:32:06 UTC (rev 181505)
@@ -2228,7 +2228,7 @@
information.nodeFontSize = renderer->style().fontDescription().computedSize();
bool inFixed = false;
- renderer->localToContainerPoint(FloatPoint(), nullptr, 0, &inFixed);
+ renderer->localToContainerPoint(FloatPoint(), nullptr, UseTransforms, &inFixed);
information.insideFixedPosition = inFixed;
if (inFixed && elementFrame.isMainFrame()) {