Title: [152674] branches/safari-537-branch
- Revision
- 152674
- Author
- lforsch...@apple.com
- Date
- 2013-07-15 16:44:30 -0700 (Mon, 15 Jul 2013)
Log Message
Merged r152554. <rdar://problem/14305675>
Modified Paths
Added Paths
Diff
Modified: branches/safari-537-branch/LayoutTests/ChangeLog (152673 => 152674)
--- branches/safari-537-branch/LayoutTests/ChangeLog 2013-07-15 23:42:36 UTC (rev 152673)
+++ branches/safari-537-branch/LayoutTests/ChangeLog 2013-07-15 23:44:30 UTC (rev 152674)
@@ -1,5 +1,20 @@
2013-07-15 Lucas Forschler <lforsch...@apple.com>
+ Merge r152554
+
+ 2013-07-10 Sam Weinig <s...@webkit.org>
+
+ Range.getClientRects() not working correctly for partially contained vertically styled text nodes
+ <rdar://problem/14305675>
+ https://bugs.webkit.org/show_bug.cgi?id=118447
+
+ Reviewed by David Hyatt.
+
+ * fast/dom/Range/getClientRects-vertical-expected.txt: Added.
+ * fast/dom/Range/getClientRects-vertical.html: Added.
+
+2013-07-15 Lucas Forschler <lforsch...@apple.com>
+
Merge r152547
2013-07-10 Eric Carlson <eric.carl...@apple.com>
Copied: branches/safari-537-branch/LayoutTests/fast/dom/Range/getClientRects-vertical-expected.txt (from rev 152554, trunk/LayoutTests/fast/dom/Range/getClientRects-vertical-expected.txt) (0 => 152674)
--- branches/safari-537-branch/LayoutTests/fast/dom/Range/getClientRects-vertical-expected.txt (rev 0)
+++ branches/safari-537-branch/LayoutTests/fast/dom/Range/getClientRects-vertical-expected.txt 2013-07-15 23:44:30 UTC (rev 152674)
@@ -0,0 +1,10 @@
+This tests that Range.getClientRects() work correctly for partially selected vertical text.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS range1.getClientRects()[0].width is range2.getClientRects()[0].width
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Copied: branches/safari-537-branch/LayoutTests/fast/dom/Range/getClientRects-vertical.html (from rev 152554, trunk/LayoutTests/fast/dom/Range/getClientRects-vertical.html) (0 => 152674)
--- branches/safari-537-branch/LayoutTests/fast/dom/Range/getClientRects-vertical.html (rev 0)
+++ branches/safari-537-branch/LayoutTests/fast/dom/Range/getClientRects-vertical.html 2013-07-15 23:44:30 UTC (rev 152674)
@@ -0,0 +1,41 @@
+<html>
+ <head>
+ <script src=""
+ <style>
+ .test { -webkit-writing-mode: vertical-lr; }
+ </style>
+ </script>
+ </head>
+ <body>
+ <div id="testarea">
+ <p>
+ <div class="test" id="test1">Hello</div>
+ </p>
+ <p>
+ <div class="test" id="test2">Hello</div>
+ </p>
+ </div>
+ <script>
+ description("This tests that Range.getClientRects() work correctly for partially selected vertical text.")
+
+ // Select a whole element's worth of text.
+ var range1 = document.createRange();
+ range1.selectNodeContents(document.getElementById("test1").firstChild);
+
+
+ // Select slightly less than a whole elements worth of text.
+ var range2 = document.createRange();
+ range2.selectNodeContents(document.getElementById("test2").firstChild);
+ range2.setEnd(range2.endContainer, range2.endOffset - 1);
+
+ // They should have the same width.
+ shouldBe("range1.getClientRects()[0].width", "range2.getClientRects()[0].width");
+
+
+ // Cleanup
+ var testarea = document.getElementById("testarea");
+ testarea.parentNode.removeChild(testarea);
+ </script>
+ <script src=""
+ </body>
+</html>
Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (152673 => 152674)
--- branches/safari-537-branch/Source/WebCore/ChangeLog 2013-07-15 23:42:36 UTC (rev 152673)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog 2013-07-15 23:44:30 UTC (rev 152674)
@@ -1,5 +1,25 @@
2013-07-15 Lucas Forschler <lforsch...@apple.com>
+ Merge r152554
+
+ 2013-07-10 Sam Weinig <s...@webkit.org>
+
+ Range.getClientRects() not working correctly for partially contained vertically styled text nodes
+ <rdar://problem/14305675>
+ https://bugs.webkit.org/show_bug.cgi?id=118447
+
+ Reviewed by David Hyatt.
+
+ Original patch by Mac Murrett, tweaked by me.
+
+ Test: fast/dom/Range/getClientRects-vertical.html
+
+ * rendering/RenderText.cpp:
+ (WebCore::localQuadForTextBox):
+ Use the physical accessors rather than the logical ones to get the correct metrics.
+
+2013-07-15 Lucas Forschler <lforsch...@apple.com>
+
Merge r152547
2013-07-10 Eric Carlson <eric.carl...@apple.com>
Modified: branches/safari-537-branch/Source/WebCore/rendering/RenderText.cpp (152673 => 152674)
--- branches/safari-537-branch/Source/WebCore/rendering/RenderText.cpp 2013-07-15 23:42:36 UTC (rev 152673)
+++ branches/safari-537-branch/Source/WebCore/rendering/RenderText.cpp 2013-07-15 23:44:30 UTC (rev 152674)
@@ -331,10 +331,10 @@
// Change the height and y position (or width and x for vertical text)
// because selectionRect uses selection-specific values.
if (box->isHorizontal()) {
- r.setHeight(box->logicalHeight());
+ r.setHeight(box->height());
r.setY(box->y());
} else {
- r.setWidth(box->logicalWidth());
+ r.setWidth(box->width());
r.setX(box->x());
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes