[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
mitz at apple.com
mitz at apple.com
Tue Jan 5 23:59:27 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 6a06c7153d184fc838be7063a37f35506f7ae70d
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 23 19:49:25 2009 +0000
<rdar://problem/7487164> First line of text cannot be selected
https://bugs.webkit.org/show_bug.cgi?id=32749
Reviewed by Darin Adler.
WebCore:
Test: fast/text/remove-zero-length-run.html
* rendering/RenderText.cpp:
(WebCore::RenderText::positionLineBox): Changed code that assumed that if a box was being
removed, it was the only box in the RenderText. Instead, correctly preserve the list of
text boxes.
(WebCore::RenderText::checkConsistency): Updated for earlier rename.
LayoutTests:
* fast/text/remove-zero-length-run-expected.txt: Added.
* fast/text/remove-zero-length-run.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 553c495..838e3ac 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2009-12-23 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7487164> First line of text cannot be selected
+ https://bugs.webkit.org/show_bug.cgi?id=32749
+
+ * fast/text/remove-zero-length-run-expected.txt: Added.
+ * fast/text/remove-zero-length-run.html: Added.
+
2009-12-18 Tor Arne Vestbø <tor.arne.vestbo at nokia.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/text/remove-zero-length-run-expected.txt b/LayoutTests/fast/text/remove-zero-length-run-expected.txt
new file mode 100644
index 0000000..52c4212
--- /dev/null
+++ b/LayoutTests/fast/text/remove-zero-length-run-expected.txt
@@ -0,0 +1,2 @@
+12345 abcde
+PASS
diff --git a/LayoutTests/fast/text/remove-zero-length-run.html b/LayoutTests/fast/text/remove-zero-length-run.html
new file mode 100644
index 0000000..5f06f45
--- /dev/null
+++ b/LayoutTests/fast/text/remove-zero-length-run.html
@@ -0,0 +1,9 @@
+<div style="position: absolute; top: 40px; left: 40px; width: 140px; font-family: ahem; font-size: 20px; direction: rtl;">12345 abcde</div>
+<div id="result">FAIL: Test did not run</div>
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var offset = document.caretRangeFromPoint(125, 50).startOffset;
+ document.getElementById("result").innerText = offset === 2 ? "PASS" : "FAIL: Hit offset " + offset;
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 63cffb6..6fc8ffc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-23 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7487164> First line of text cannot be selected
+ https://bugs.webkit.org/show_bug.cgi?id=32749
+
+ Test: fast/text/remove-zero-length-run.html
+
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::positionLineBox): Changed code that assumed that if a box was being
+ removed, it was the only box in the RenderText. Instead, correctly preserve the list of
+ text boxes.
+ (WebCore::RenderText::checkConsistency): Updated for earlier rename.
+
2009-12-18 Tor Arne Vestbø <tor.arne.vestbo at nokia.com>
Reviewed by Darin Adler.
diff --git a/WebCore/rendering/RenderText.cpp b/WebCore/rendering/RenderText.cpp
index 5fe4d64..3e48a70 100644
--- a/WebCore/rendering/RenderText.cpp
+++ b/WebCore/rendering/RenderText.cpp
@@ -1060,8 +1060,15 @@ void RenderText::positionLineBox(InlineBox* box)
if (!s->len()) {
// We want the box to be destroyed.
s->remove();
+ if (m_firstTextBox == s)
+ m_firstTextBox = s->nextTextBox();
+ else
+ s->prevTextBox()->setNextLineBox(s->nextTextBox());
+ if (m_lastTextBox == s)
+ m_lastTextBox = s->prevTextBox();
+ else
+ s->nextTextBox()->setPreviousLineBox(s->prevTextBox());
s->destroy(renderArena());
- m_firstTextBox = m_lastTextBox = 0;
return;
}
@@ -1362,7 +1369,7 @@ void RenderText::checkConsistency() const
#ifdef CHECK_CONSISTENCY
const InlineTextBox* prev = 0;
for (const InlineTextBox* child = m_firstTextBox; child != 0; child = child->nextTextBox()) {
- ASSERT(child->object() == this);
+ ASSERT(child->renderer() == this);
ASSERT(child->prevTextBox() == prev);
prev = child;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list