[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
mitz at apple.com
mitz at apple.com
Fri Feb 26 22:23:08 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 8f6a90e5f92bb2dfcf6644930cc415ae2148c549
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 17 19:02:39 2010 +0000
<rdar://problem/7645569> REGRESSION (r51324): Incorrect marker rects for blocks that span multiple columns
Reviewed by Darin Adler.
* manual-tests/match-marker-rects.html: Added.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintTextMatchMarker): Use the text renderer rather
than its ancestor block for the local-to-absolute transformation.
(WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c5d1ad6..0272801 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-17 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7645569> REGRESSION (r51324): Incorrect marker rects for blocks that span multiple columns
+
+ * manual-tests/match-marker-rects.html: Added.
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paintTextMatchMarker): Use the text renderer rather
+ than its ancestor block for the local-to-absolute transformation.
+ (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
+
2010-02-17 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Xan Lopez.
diff --git a/WebCore/manual-tests/match-marker-rects.html b/WebCore/manual-tests/match-marker-rects.html
new file mode 100644
index 0000000..d650965
--- /dev/null
+++ b/WebCore/manual-tests/match-marker-rects.html
@@ -0,0 +1,33 @@
+<style>
+ div {
+ height: 50px;
+ width: 110px;
+ margin: 10px 0;
+ padding: 10px;
+ border: solid black;
+ font-size: 25px;
+ }
+
+ div.columns {
+ -webkit-columns: 2;
+ -webkit-column-gap: 10px;
+ }
+
+ div.scroll {
+ overflow-y: scroll;
+ }
+</style>
+<p>
+ In Safari, choose Edit > Find > Find, and type the strings “xyz”
+ and “123”. The white “holes” in the Find overlay
+ should line up with the matching text below.
+</p>
+<div class="columns">
+ <br>xyz
+</div>
+<div class="scroll" id="scroll">
+ <br><br>123<br><br>
+</div>
+<script>
+ document.getElementById("scroll").scrollTop = 100;
+</script>
diff --git a/WebCore/rendering/InlineTextBox.cpp b/WebCore/rendering/InlineTextBox.cpp
index b7e6de2..9f17b0c 100644
--- a/WebCore/rendering/InlineTextBox.cpp
+++ b/WebCore/rendering/InlineTextBox.cpp
@@ -808,7 +808,7 @@ void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, int tx, int ty, co
// Always compute and store the rect associated with this marker. The computed rect is in absolute coordinates.
IntRect markerRect = enclosingIntRect(font.selectionRectForText(run, IntPoint(m_x, y), h, sPos, ePos));
- markerRect = root()->block()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox();
+ markerRect = renderer()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox();
renderer()->document()->setRenderedRectForMarker(renderer()->node(), marker, markerRect);
// Optionally highlight the text
@@ -837,7 +837,7 @@ void InlineTextBox::computeRectForReplacementMarker(int /*tx*/, int /*ty*/, cons
// Compute and store the rect associated with this marker.
IntRect markerRect = enclosingIntRect(font.selectionRectForText(run, startPoint, h, sPos, ePos));
- markerRect = root()->block()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox();
+ markerRect = renderer()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox();
renderer()->document()->setRenderedRectForMarker(renderer()->node(), marker, markerRect);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list