offsetTop/offsetLeft return the wrong values for horizontal-bt/vertical-rl writing modes
https://bugs.webkit.org/show_bug.cgi?id=68304
Reviewed by David Hyatt.
Source/WebCore:
When grabbing the x/y values of the RenderBox, we need to take writing mode
flipping into account.
Test: fast/dom/offset-position-writing-modes.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::locationIncludingFlipping):
* rendering/RenderBox.h:
(WebCore::RenderBox::yFlippedForWritingMode):
(WebCore::RenderBox::xFlippedForWritingMode):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::offsetLeft):
(WebCore::RenderBoxModelObject::offsetTop):
LayoutTests:
* css3/flexbox/writing-modes-expected.txt:
* css3/flexbox/writing-modes.html:
* fast/dom/offset-position-writing-modes-expected.txt: Added.
* fast/dom/offset-position-writing-modes.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/dom/offset-position-writing-modes-expected.txt b/LayoutTests/fast/dom/offset-position-writing-modes-expected.txt
new file mode 100644
index 0000000..d3ce4ac
--- /dev/null
+++ b/LayoutTests/fast/dom/offset-position-writing-modes-expected.txt
@@ -0,0 +1,6 @@
+PASS document.getElementById("vertical").offsetLeft is 65
+PASS document.getElementById("horizontal").offsetTop is 65
+PASS successfullyParsed is true
+
+TEST COMPLETE
+