Title: [153727] branches/safari-537-branch
- Revision
- 153727
- Author
- lforsch...@apple.com
- Date
- 2013-08-05 15:11:04 -0700 (Mon, 05 Aug 2013)
Log Message
Merged r153725. <rdar://problem/14637103>
Modified Paths
Added Paths
Diff
Modified: branches/safari-537-branch/LayoutTests/ChangeLog (153726 => 153727)
--- branches/safari-537-branch/LayoutTests/ChangeLog 2013-08-05 22:05:26 UTC (rev 153726)
+++ branches/safari-537-branch/LayoutTests/ChangeLog 2013-08-05 22:11:04 UTC (rev 153727)
@@ -1,3 +1,21 @@
+2013-08-05 Lucas Forschler <lforsch...@apple.com>
+
+ Merge r153725
+
+ 2013-08-05 Alexey Proskuryakov <a...@apple.com>
+
+ <rdar://problem/14637103> REGRESSION (r153060?): Microphone appears in the way
+ of text when dictating an e-mail
+ https://bugs.webkit.org/show_bug.cgi?id=119496
+
+ Reviewed by Ryosuke Niwa.
+
+ * platform/mac/editing/input/firstrectforcharacterrange-caret-in-br-expected.txt: Added.
+ * platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html: Added.
+
+ * platform/wk2/TestExpectations: textInputController.firstRectForCharacterRange is
+ not available in WTR.
+
2013-08-05 Filip Pizlo <fpi...@apple.com>
DFG optimizations don't handle neutered arrays properly
Copied: branches/safari-537-branch/LayoutTests/platform/mac/editing/input/firstrectforcharacterrange-caret-in-br-expected.txt (from rev 153725, trunk/LayoutTests/platform/mac/editing/input/firstrectforcharacterrange-caret-in-br-expected.txt) (0 => 153727)
--- branches/safari-537-branch/LayoutTests/platform/mac/editing/input/firstrectforcharacterrange-caret-in-br-expected.txt (rev 0)
+++ branches/safari-537-branch/LayoutTests/platform/mac/editing/input/firstrectforcharacterrange-caret-in-br-expected.txt 2013-08-05 22:11:04 UTC (rev 153727)
@@ -0,0 +1,9 @@
+PASS xLocation > 0 is true
+PASS width is 0
+PASS height > 10 is true
+PASS height < 30 is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
Copied: branches/safari-537-branch/LayoutTests/platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html (from rev 153725, trunk/LayoutTests/platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html) (0 => 153727)
--- branches/safari-537-branch/LayoutTests/platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html (rev 0)
+++ branches/safari-537-branch/LayoutTests/platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html 2013-08-05 22:11:04 UTC (rev 153727)
@@ -0,0 +1,32 @@
+<head>
+<script src=""
+</head>
+<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">a
+<div><br></div>
+<script>
+document.designMode='on';
+window.getSelection().setPosition(document.body, 2);
+
+if (window.textInputController) {
+ var firstRect = textInputController.firstRectForCharacterRange(2, 1);
+
+ // This should be a reasonable rect for a caret.
+ var xLocation = firstRect[0];
+ var width = firstRect[2];
+ var height = firstRect[3];
+ shouldBeTrue("xLocation > 0");
+ shouldBe("width", "0");
+ shouldBeTrue("height > 10");
+ shouldBeTrue("height < 30");
+
+ // Delete test data for nicer output.
+ document.execCommand("Delete");
+ document.execCommand("Delete");
+} else {
+ debug("To test manually, invoke Dictation. Its popover should be positioned reasonably.");
+}
+</script>
+<div id=result></div>
+</body>
+<script src=""
+</html>
Modified: branches/safari-537-branch/LayoutTests/platform/wk2/TestExpectations (153726 => 153727)
--- branches/safari-537-branch/LayoutTests/platform/wk2/TestExpectations 2013-08-05 22:05:26 UTC (rev 153726)
+++ branches/safari-537-branch/LayoutTests/platform/wk2/TestExpectations 2013-08-05 22:11:04 UTC (rev 153727)
@@ -125,6 +125,7 @@
platform/mac/editing/input/5576619.html
platform/mac/editing/input/bold-node.html
platform/mac/editing/input/caret-primary-bidi.html
+platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html
platform/mac/editing/input/firstrectforcharacterrange-plain.html
platform/mac/editing/input/firstrectforcharacterrange-styled.html
platform/mac/editing/input/firstrectforcharacterrange-vertical.html
Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (153726 => 153727)
--- branches/safari-537-branch/Source/WebCore/ChangeLog 2013-08-05 22:05:26 UTC (rev 153726)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog 2013-08-05 22:11:04 UTC (rev 153727)
@@ -1,5 +1,24 @@
2013-08-05 Lucas Forschler <lforsch...@apple.com>
+ Merge r153725
+
+ 2013-08-05 Alexey Proskuryakov <a...@apple.com>
+
+ <rdar://problem/14637103> REGRESSION (r153060?): Microphone appears in the way
+ of text when dictating an e-mail
+ https://bugs.webkit.org/show_bug.cgi?id=119496
+
+ Reviewed by Ryosuke Niwa.
+
+ Test: platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html
+
+ * rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
+ FloatRect::unite() doesn't preserve empty rects, which we need here.
+ We alrady handle the case of collapsed range in Editor::firstRectForRange(), and
+ this is similar, but we can't currently cover both with one simple fix.
+
+2013-08-05 Lucas Forschler <lforsch...@apple.com>
+
Merge r152884
2013-07-18 Ryosuke Niwa <rn...@webkit.org>
Modified: branches/safari-537-branch/Source/WebCore/rendering/RenderObject.cpp (153726 => 153727)
--- branches/safari-537-branch/Source/WebCore/rendering/RenderObject.cpp 2013-08-05 22:05:26 UTC (rev 153726)
+++ branches/safari-537-branch/Source/WebCore/rendering/RenderObject.cpp 2013-08-05 22:11:04 UTC (rev 153727)
@@ -1239,10 +1239,13 @@
Vector<FloatQuad> quads;
range->textQuads(quads);
- FloatRect result;
- for (size_t i = 0; i < quads.size(); ++i)
- result.unite(quads[i].boundingBox());
+ if (quads.isEmpty())
+ return FloatRect();
+ FloatRect result = quads[0].boundingBox();
+ for (size_t i = 1; i < quads.size(); ++i)
+ result.uniteEvenIfEmpty(quads[i].boundingBox());
+
return result;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes