highlight for Ruby text is mispositioned in the Web Inspector
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 May 2012 16:32:33 +0000 (16:32 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 May 2012 16:32:33 +0000 (16:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82684

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html
       fast/writing-mode/flipped-blocks-inline-map-local-to-container.html

In flipped blocks writing modes, flipping was being applied twice to box descendants of
inline children of the flipped block, once during RenderBox::mapLocalToContainer, and then
again by RenderInline::mapLocalToContainer. The fix is to make the latter only apply the
flip to local coordinates originating in the inline or a descendant inline. This is done
by adding a parameter of type ApplyContainerFlipOrNot, which defaults to ApplyContainerFlip
but is reset to DoNotApplyContainerFlip in recursive calls into mapLocalToContainer().

* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter, passing
DoNotApplyContainerFlip when recursing into the container.
* rendering/RenderBox.h:

* rendering/RenderInline.cpp:
(WebCore::RenderInline::mapLocalToContainer): Added ApplyContainerFlipOrNot paramerer, and
made the flipping conditional on its value.

* rendering/RenderInline.h:

* rendering/RenderObject.cpp:
(WebCore::RenderObject::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter,
passing DoNotApplyContainerFlip when recursing into the container.
(WebCore::RenderObject::localToContainerQuad): Pass ApplyContainerFlip.
(WebCore::RenderObject::localToContainerPoint): Ditto.
* rendering/RenderObject.h:

* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter.
* rendering/RenderView.h:

* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::mapLocalToContainer): Ditto.
* rendering/svg/RenderSVGForeignObject.h:

* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::mapLocalToContainer): Ditto.
* rendering/svg/RenderSVGInline.h:

* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::mapLocalToContainer): Ditto.
* rendering/svg/RenderSVGModelObject.h:

* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::mapLocalToContainer): Ditto.
* rendering/svg/RenderSVGRoot.h:

* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::mapLocalToContainer): Ditto.
* rendering/svg/RenderSVGText.h:

* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer): Pass DoNotApplyContainerFlip when
recursing into the parent.

LayoutTests:

* fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html: Added.
* fast/writing-mode/flipped-blocks-inline-map-local-to-container.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115981 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html [new file with mode: 0644]
LayoutTests/fast/writing-mode/flipped-blocks-inline-map-local-to-container.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderInline.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h
Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
Source/WebCore/rendering/svg/RenderSVGForeignObject.h
Source/WebCore/rendering/svg/RenderSVGInline.cpp
Source/WebCore/rendering/svg/RenderSVGInline.h
Source/WebCore/rendering/svg/RenderSVGModelObject.cpp
Source/WebCore/rendering/svg/RenderSVGModelObject.h
Source/WebCore/rendering/svg/RenderSVGRoot.cpp
Source/WebCore/rendering/svg/RenderSVGRoot.h
Source/WebCore/rendering/svg/RenderSVGText.cpp
Source/WebCore/rendering/svg/RenderSVGText.h
Source/WebCore/rendering/svg/SVGRenderSupport.cpp

index c735fe5..c4fb307 100644 (file)
@@ -1,3 +1,13 @@
+2012-05-03  Dan Bernstein  <mitz@apple.com>
+
+        highlight for Ruby text is mispositioned in the Web Inspector
+        https://bugs.webkit.org/show_bug.cgi?id=82684
+
+        Reviewed by Simon Fraser.
+
+        * fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html: Added.
+        * fast/writing-mode/flipped-blocks-inline-map-local-to-container.html: Added.
+
 2012-05-03  Andrey Kosyakov  <caseq@chromium.org>
 
         Unreviewed, adjusted platform specifiers for fast/js/dfg-double-vote-fuzz.html
diff --git a/LayoutTests/fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html b/LayoutTests/fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html
new file mode 100644 (file)
index 0000000..d099b54
--- /dev/null
@@ -0,0 +1,38 @@
+<style>
+    img { width: 30px; height: 30px; background-color: red; }
+    .cover { position: absolute; background-color: green; opacity: 0.7; }
+</style>
+<div style="height: 240px;
+    padding-top: 260px;
+    background-color: lightyellow;
+    font: 40px ahem;
+    color: red;
+    -webkit-font-smoothing: none;
+">
+    <br>
+    <br>
+    <img id="t-0">
+    <ruby id="t-1">1<span id="t-2">2</span><rt id="t-3">3</rt></ruby>
+    <span>
+        <div id="t-4" style="display: inline-block"><div id="t-5">5</div>4</div>
+    </span>
+    <span id="t-5">
+        <img id="t-6">
+    </span>
+    <span id="t-7">
+        7 <span id="t-8">8</span>
+    </span>
+</div>
+<script>
+    for (var i = 0; i < 9; ++i) {
+        var element = document.getElementById("t-" + i);
+        var clientRect = element.getClientRects()[0];
+        var cover = document.createElement("div");
+        cover.className = "cover";
+        cover.style.width = clientRect.width + "px";
+        cover.style.height = clientRect.height + "px";
+        cover.style.top = clientRect.top + "px";
+        cover.style.left = clientRect.left + "px";
+        document.body.appendChild(cover);
+    }
+</script>
diff --git a/LayoutTests/fast/writing-mode/flipped-blocks-inline-map-local-to-container.html b/LayoutTests/fast/writing-mode/flipped-blocks-inline-map-local-to-container.html
new file mode 100644 (file)
index 0000000..886601d
--- /dev/null
@@ -0,0 +1,41 @@
+<style>
+    img { width: 30px; height: 30px; background-color: red; }
+    .cover { position: absolute; background-color: green; opacity: 0.7; }
+</style>
+<div style="height: 500px;
+    background-color: lightyellow;
+    -webkit-writing-mode: horizontal-bt;
+    font: 40px ahem;
+    color: red;
+    -webkit-font-smoothing: none;
+">
+    <br>
+    <br>
+    <img id="t-0">
+    <ruby id="t-1">1<span id="t-2">2</span><rt id="t-3">3</rt></ruby>
+    <span>
+        <div id="t-4" style="display: inline-block">4<div id="t-5">5</div></div>
+    </span>
+    <span id="t-5">
+        <img id="t-6">
+    </span>
+    <span id="t-7">
+        7 <span id="t-8">8</span>
+    </span>
+</div>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    for (var i = 0; i < 9; ++i) {
+        var element = document.getElementById("t-" + i);
+        var clientRect = element.getClientRects()[0];
+        var cover = document.createElement("div");
+        cover.className = "cover";
+        cover.style.width = clientRect.width + "px";
+        cover.style.height = clientRect.height + "px";
+        cover.style.top = clientRect.top + "px";
+        cover.style.left = clientRect.left + "px";
+        document.body.appendChild(cover);
+    }
+</script>
index 8388a11..e1ca7e8 100644 (file)
@@ -1,3 +1,66 @@
+2012-05-03  Dan Bernstein  <mitz@apple.com>
+
+        highlight for Ruby text is mispositioned in the Web Inspector
+        https://bugs.webkit.org/show_bug.cgi?id=82684
+
+        Reviewed by Simon Fraser.
+
+        Tests: fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html
+               fast/writing-mode/flipped-blocks-inline-map-local-to-container.html
+
+        In flipped blocks writing modes, flipping was being applied twice to box descendants of
+        inline children of the flipped block, once during RenderBox::mapLocalToContainer, and then
+        again by RenderInline::mapLocalToContainer. The fix is to make the latter only apply the
+        flip to local coordinates originating in the inline or a descendant inline. This is done
+        by adding a parameter of type ApplyContainerFlipOrNot, which defaults to ApplyContainerFlip
+        but is reset to DoNotApplyContainerFlip in recursive calls into mapLocalToContainer().
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter, passing
+        DoNotApplyContainerFlip when recursing into the container.
+        * rendering/RenderBox.h:
+
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::mapLocalToContainer): Added ApplyContainerFlipOrNot paramerer, and
+        made the flipping conditional on its value.
+
+        * rendering/RenderInline.h:
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter,
+        passing DoNotApplyContainerFlip when recursing into the container.
+        (WebCore::RenderObject::localToContainerQuad): Pass ApplyContainerFlip.
+        (WebCore::RenderObject::localToContainerPoint): Ditto.
+        * rendering/RenderObject.h:
+
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter.
+        * rendering/RenderView.h:
+
+        * rendering/svg/RenderSVGForeignObject.cpp:
+        (WebCore::RenderSVGForeignObject::mapLocalToContainer): Ditto.
+        * rendering/svg/RenderSVGForeignObject.h:
+
+        * rendering/svg/RenderSVGInline.cpp:
+        (WebCore::RenderSVGInline::mapLocalToContainer): Ditto.
+        * rendering/svg/RenderSVGInline.h:
+
+        * rendering/svg/RenderSVGModelObject.cpp:
+        (WebCore::RenderSVGModelObject::mapLocalToContainer): Ditto.
+        * rendering/svg/RenderSVGModelObject.h:
+
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::mapLocalToContainer): Ditto.
+        * rendering/svg/RenderSVGRoot.h:
+
+        * rendering/svg/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::mapLocalToContainer): Ditto.
+        * rendering/svg/RenderSVGText.h:
+
+        * rendering/svg/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderSupport::mapLocalToContainer): Pass DoNotApplyContainerFlip when
+        recursing into the parent.
+
 2012-05-03  Pavel Feldman  <pfeldman@chromium.org>
 
         Web Inspector: make Script a ContentProvider.
index e009b6a..b906ec9 100644 (file)
@@ -1375,7 +1375,7 @@ LayoutUnit RenderBox::perpendicularContainingBlockLogicalHeight() const
     return cb->computeContentBoxLogicalHeight(logicalHeightLength.value());
 }
 
-void RenderBox::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, bool* wasFixed) const
+void RenderBox::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, ApplyContainerFlipOrNot, bool* wasFixed) const
 {
     if (repaintContainer == this)
         return;
@@ -1429,11 +1429,11 @@ void RenderBox::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool
         // Transform from render flow coordinates into region coordinates.
         RenderRegion* region = toRenderFlowThread(o)->mapFromFlowToRegion(transformState);
         if (region)
-            region->mapLocalToContainer(region->containerForRepaint(), fixed, useTransforms, transformState, wasFixed);
+            region->mapLocalToContainer(region->containerForRepaint(), fixed, useTransforms, transformState, DoNotApplyContainerFlip, wasFixed);
         return;
     }
 
-    o->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState, wasFixed);
+    o->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState, DoNotApplyContainerFlip, wasFixed);
 }
 
 void RenderBox::mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, TransformState& transformState) const
index f151b34..794ed39 100644 (file)
@@ -516,7 +516,7 @@ protected:
     
     virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !isInlineBlockOrInlineTable(); }
 
-    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState&, bool* wasFixed = 0) const;
+    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState&, ApplyContainerFlipOrNot = ApplyContainerFlip, bool* wasFixed = 0) const;
     virtual void mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, TransformState&) const;
 
     void paintRootBoxFillLayers(const PaintInfo&);
index 5e8565c..d04c4ee 100644 (file)
@@ -1164,7 +1164,7 @@ LayoutSize RenderInline::offsetFromContainer(RenderObject* container, const Layo
     return offset;
 }
 
-void RenderInline::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, bool* wasFixed) const
+void RenderInline::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, ApplyContainerFlipOrNot applyContainerFlip, bool* wasFixed) const
 {
     if (repaintContainer == this)
         return;
@@ -1185,9 +1185,11 @@ void RenderInline::mapLocalToContainer(RenderBoxModelObject* repaintContainer, b
     if (!o)
         return;
 
-    IntPoint centerPoint = roundedIntPoint(transformState.mappedPoint());
-    if (o->isBox() && o->style()->isFlippedBlocksWritingMode())
-        transformState.move(toRenderBox(o)->flipForWritingModeIncludingColumns(roundedIntPoint(transformState.mappedPoint())) - centerPoint);
+    if (applyContainerFlip && o->isBox() && o->style()->isFlippedBlocksWritingMode()) {
+        IntPoint centerPoint = roundedIntPoint(transformState.mappedPoint());
+        transformState.move(toRenderBox(o)->flipForWritingModeIncludingColumns(centerPoint) - centerPoint);
+        applyContainerFlip = DoNotApplyContainerFlip;
+    }
 
     LayoutSize containerOffset = offsetFromContainer(o, roundedLayoutPoint(transformState.mappedPoint()));
 
@@ -1207,7 +1209,7 @@ void RenderInline::mapLocalToContainer(RenderBoxModelObject* repaintContainer, b
         return;
     }
 
-    o->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState, wasFixed);
+    o->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState, applyContainerFlip, wasFixed);
 }
 
 void RenderInline::updateDragState(bool dragOn)
index baa8c6b..190cbec 100644 (file)
@@ -130,7 +130,7 @@ private:
     virtual LayoutRect rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, LayoutUnit outlineWidth) const;
     virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed) const;
 
-    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState&, bool* wasFixed = 0) const;
+    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState&, ApplyContainerFlipOrNot = ApplyContainerFlip, bool* wasFixed = 0) const;
 
     virtual VisiblePosition positionForPoint(const LayoutPoint&);
 
index 37b1a4e..c492a0c 100755 (executable)
@@ -2024,7 +2024,7 @@ FloatPoint RenderObject::absoluteToLocal(const FloatPoint& containerPoint, bool
     return transformState.lastPlanarPoint();
 }
 
-void RenderObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, bool* wasFixed) const
+void RenderObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, ApplyContainerFlipOrNot, bool* wasFixed) const
 {
     if (repaintContainer == this)
         return;
@@ -2045,7 +2045,7 @@ void RenderObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, b
     if (o->hasOverflowClip())
         transformState.move(-toRenderBox(o)->scrolledContentOffset());
 
-    o->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState, wasFixed);
+    o->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState, DoNotApplyContainerFlip, wasFixed);
 }
 
 void RenderObject::mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, TransformState& transformState) const
@@ -2101,7 +2101,7 @@ FloatQuad RenderObject::localToContainerQuad(const FloatQuad& localQuad, RenderB
     // 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, fixed, true, transformState, wasFixed);
+    mapLocalToContainer(repaintContainer, fixed, true, transformState, ApplyContainerFlip, wasFixed);
     transformState.flatten();
     
     return transformState.lastPlanarQuad();
@@ -2110,7 +2110,7 @@ FloatQuad RenderObject::localToContainerQuad(const FloatQuad& localQuad, RenderB
 FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, RenderBoxModelObject* repaintContainer, bool fixed, bool* wasFixed) const
 {
     TransformState transformState(TransformState::ApplyTransformDirection, localPoint);
-    mapLocalToContainer(repaintContainer, fixed, true, transformState, wasFixed);
+    mapLocalToContainer(repaintContainer, fixed, true, transformState, ApplyContainerFlip, wasFixed);
     transformState.flatten();
 
     return transformState.lastPlanarPoint();
index c27865b..f881e3e 100644 (file)
@@ -865,7 +865,8 @@ public:
 
     // 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(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
+    enum ApplyContainerFlipOrNot { DoNotApplyContainerFlip, ApplyContainerFlip };
+    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, ApplyContainerFlipOrNot = ApplyContainerFlip, bool* wasFixed = 0) const;
     virtual void mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, TransformState&) const;
 
     bool shouldUseTransformFromContainer(const RenderObject* container) const;
index ac56bf1..4a3a2bc 100644 (file)
@@ -150,7 +150,7 @@ void RenderView::layout()
     setNeedsLayout(false);
 }
 
-void RenderView::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, bool* wasFixed) const
+void RenderView::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, ApplyContainerFlipOrNot, bool* wasFixed) const
 {
     // If a container was specified, and was not 0 or the RenderView,
     // then we should have found it by now.
index b6ffa47..1371e13 100644 (file)
@@ -187,7 +187,7 @@ public:
     void removeFixedPositionedObject(RenderBox*);
 
 protected:
-    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
+    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, ApplyContainerFlipOrNot = ApplyContainerFlip, bool* wasFixed = 0) const;
     virtual void mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, TransformState&) const;
     virtual bool requiresColumns(int desiredColumnCount) const OVERRIDE;
 
index 8693b13..2918fe3 100644 (file)
@@ -188,7 +188,7 @@ bool RenderSVGForeignObject::nodeAtPoint(const HitTestRequest&, HitTestResult&,
     return false;
 }
 
-void RenderSVGForeignObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* fixed */, bool /* useTransforms */, TransformState& transformState, bool* wasFixed) const
+void RenderSVGForeignObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* fixed */, bool /* useTransforms */, TransformState& transformState, ApplyContainerFlipOrNot, bool* wasFixed) const
 {
     SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed);
 }
index 905b488..4a1a8ac 100644 (file)
@@ -54,7 +54,7 @@ public:
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
     virtual bool isSVGForeignObject() const { return true; }
 
-    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState&, bool* wasFixed = 0) const;
+    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState&, ApplyContainerFlipOrNot = ApplyContainerFlip, bool* wasFixed = 0) const;
     virtual void setNeedsTransformUpdate() { m_needsTransformUpdate = true; }
 
 private:
index ea2746e..ab8cc1a 100644 (file)
@@ -79,7 +79,7 @@ void RenderSVGInline::computeFloatRectForRepaint(RenderBoxModelObject* repaintCo
     SVGRenderSupport::computeFloatRectForRepaint(this, repaintContainer, repaintRect, fixed);
 }
 
-void RenderSVGInline::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* useTransforms */, bool /* fixed */, TransformState& transformState, bool* wasFixed) const
+void RenderSVGInline::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* useTransforms */, bool /* fixed */, TransformState& transformState, ApplyContainerFlipOrNot, bool* wasFixed) const
 {
     SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed);
 }
index 4344fb5..8aa4ab8 100644 (file)
@@ -47,7 +47,7 @@ public:
 
     virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
     virtual void computeFloatRectForRepaint(RenderBoxModelObject* repaintContainer, FloatRect&, bool fixed = false) const;
-    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
+    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, ApplyContainerFlipOrNot = ApplyContainerFlip, bool* wasFixed = 0) const;
     virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
 
 private:
index 3841336..48fd7d8 100644 (file)
@@ -55,7 +55,7 @@ void RenderSVGModelObject::computeFloatRectForRepaint(RenderBoxModelObject* repa
     SVGRenderSupport::computeFloatRectForRepaint(this, repaintContainer, repaintRect, fixed);
 }
 
-void RenderSVGModelObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* fixed */, bool /* useTransforms */, TransformState& transformState, bool* wasFixed) const
+void RenderSVGModelObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* fixed */, bool /* useTransforms */, TransformState& transformState, ApplyContainerFlipOrNot, bool* wasFixed) const
 {
     SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed);
 }
index 1582ff5..b9692fe 100644 (file)
@@ -58,7 +58,7 @@ public:
     virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const;
     virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
 
-    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
+    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, ApplyContainerFlipOrNot = ApplyContainerFlip, bool* wasFixed = 0) const;
     virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
     virtual void updateFromElement();
index 2c15d9b..0ff1d83 100644 (file)
@@ -382,12 +382,12 @@ void RenderSVGRoot::computeFloatRectForRepaint(RenderBoxModelObject* repaintCont
 // This method expects local CSS box coordinates.
 // Callers with local SVG viewport coordinates should first apply the localToBorderBoxTransform
 // to convert from SVG viewport coordinates to local CSS box coordinates.
-void RenderSVGRoot::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, bool* wasFixed) const
+void RenderSVGRoot::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState& transformState, ApplyContainerFlipOrNot, bool* wasFixed) const
 {
     ASSERT(!fixed); // We should have no fixed content in the SVG rendering tree.
     ASSERT(useTransforms); // mapping a point through SVG w/o respecting trasnforms is useless.
 
-    RenderReplaced::mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState, wasFixed);
+    RenderReplaced::mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState, ApplyContainerFlip, wasFixed);
 }
 
 void RenderSVGRoot::updateCachedBoundaries()
index fc66af3..c334afb 100644 (file)
@@ -94,7 +94,7 @@ private:
     virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
     virtual void computeFloatRectForRepaint(RenderBoxModelObject* repaintContainer, FloatRect& repaintRect, bool fixed) const;
 
-    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
+    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, ApplyContainerFlipOrNot = ApplyContainerFlip, bool* wasFixed = 0) const;
     virtual bool canBeSelectionLeaf() const { return false; }
     virtual bool canHaveChildren() const { return true; }
 
index 2e4a6af..f512ab8 100644 (file)
@@ -105,7 +105,7 @@ void RenderSVGText::computeFloatRectForRepaint(RenderBoxModelObject* repaintCont
     SVGRenderSupport::computeFloatRectForRepaint(this, repaintContainer, repaintRect, fixed);
 }
 
-void RenderSVGText::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* fixed */, bool /* useTransforms */, TransformState& transformState, bool* wasFixed) const
+void RenderSVGText::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool /* fixed */, bool /* useTransforms */, TransformState& transformState, ApplyContainerFlipOrNot, bool* wasFixed) const
 {
     SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed);
 }
index bcf5880..5665b44 100644 (file)
@@ -78,7 +78,7 @@ private:
     virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed = false) const;
     virtual void computeFloatRectForRepaint(RenderBoxModelObject* repaintContainer, FloatRect&, bool fixed = false) const;
 
-    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
+    virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, ApplyContainerFlipOrNot = ApplyContainerFlip, bool* wasFixed = 0) const;
     virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0);
 
     virtual FloatRect objectBoundingBox() const { return frameRect(); }
index f94ee84..b206cb6 100644 (file)
@@ -82,7 +82,7 @@ void SVGRenderSupport::mapLocalToContainer(const RenderObject* object, RenderBox
     if (parent->isSVGRoot())
         transformState.applyTransform(toRenderSVGRoot(parent)->localToBorderBoxTransform());
     
-    parent->mapLocalToContainer(repaintContainer, false, true, transformState, wasFixed);
+    parent->mapLocalToContainer(repaintContainer, false, true, transformState, RenderObject::DoNotApplyContainerFlip, wasFixed);
 }
 
 // Update a bounding box taking into account the validity of the other bounding box.