RenderBR should not be RenderText
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Sep 2013 17:40:45 +0000 (17:40 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Sep 2013 17:40:45 +0000 (17:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121221

Rubber-stamped by Andreas Kling.

Fix assertion in these tests:

fast/repaint/selection-rl.html
fast/writing-mode/horizontal-bt-replaced-selection.html
fast/writing-mode/vertical-rl-replaced-selection.html

* rendering/InlineBox.cpp:
(WebCore::InlineBox::nodeAtPoint):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/InlineBox.cpp

index 32c2a20..d63d6dc 100644 (file)
@@ -1,3 +1,19 @@
+2013-09-17  Antti Koivisto  <antti@apple.com>
+
+        RenderBR should not be RenderText
+        https://bugs.webkit.org/show_bug.cgi?id=121221
+
+        Rubber-stamped by Andreas Kling.
+        
+        Fix assertion in these tests:
+
+        fast/repaint/selection-rl.html
+        fast/writing-mode/horizontal-bt-replaced-selection.html
+        fast/writing-mode/vertical-rl-replaced-selection.html
+
+        * rendering/InlineBox.cpp:
+        (WebCore::InlineBox::nodeAtPoint):
+
 2013-09-16  Enrica Casucci  <enrica@apple.com>
 
         Remove unused function didSetSelectionTypesForPasteboard from EditorClient.
index a624d27..188bb46 100644 (file)
@@ -257,7 +257,7 @@ bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result
     // own stacking context.  (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
     // specification.)
     LayoutPoint childPoint = accumulatedOffset;
-    if (parent()->renderer().style()->isFlippedBlocksWritingMode()) // Faster than calling containingBlock().
+    if (parent()->renderer().style()->isFlippedBlocksWritingMode() && !renderer().isBR()) // Faster than calling containingBlock().
         childPoint = m_renderer.containingBlock()->flipForWritingModeForChild(&toRenderBox(renderer()), childPoint);
     
     return m_renderer.hitTest(request, result, locationInContainer, childPoint);