[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:29:42 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c24a12488927b2b573f8d073855b0a5c26d21dfc
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 12 21:21:04 2004 +0000
Fix for problem when undoing the deletion of a word in edit mode.
Reviewed by kocienda
* khtml/rendering/render_text.cpp:
(RenderText::setTextWithOffset):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index aa5a39a..f223d5f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,12 @@
+2004-03-12 David Hyatt <hyatt at apple.com>
+
+ Fix for problem when undoing the deletion of a word in edit mode.
+
+ Reviewed by kocienda
+
+ * khtml/rendering/render_text.cpp:
+ (RenderText::setTextWithOffset):
+
2004-03-12 Ken Kocienda <kocienda at apple.com>
Reviewed by Chris
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 9f89a54..f5d7651 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -1191,6 +1191,8 @@ void RenderText::setTextWithOffset(DOMStringImpl *text, uint offset, uint len, b
RootInlineBox* firstRootBox = 0;
RootInlineBox* lastRootBox = 0;
+ bool dirtiedLines = false;
+
// Dirty all text boxes that include characters in between offset and offset+len.
for (InlineTextBox* curr = firstTextBox(); curr; curr = curr->nextTextBox()) {
// Text run is entirely before the affected range.
@@ -1201,16 +1203,27 @@ void RenderText::setTextWithOffset(DOMStringImpl *text, uint offset, uint len, b
if (curr->start() > end) {
curr->offsetRun(delta);
RootInlineBox* root = curr->root();
- if (!firstRootBox)
+ if (!firstRootBox) {
firstRootBox = root;
+ if (!dirtiedLines) { // The affected area was in between two runs. Go ahead and mark the root box of the run after the affected area as dirty.
+ firstRootBox->markDirty();
+ dirtiedLines = true;
+ }
+ }
lastRootBox = root;
}
- else if (curr->end() >= offset && curr->end() <= end)
+ else if (curr->end() >= offset && curr->end() <= end) {
curr->dirtyLineBoxes(); // Text run overlaps with the left end of the affected range.
- else if (curr->start() <= offset && curr->end() >= end)
+ dirtiedLines = true;
+ }
+ else if (curr->start() <= offset && curr->end() >= end) {
curr->dirtyLineBoxes(); // Text run subsumes the affected range.
- else if (curr->start() <= end && curr->end() >= end)
+ dirtiedLines = true;
+ }
+ else if (curr->start() <= end && curr->end() >= end) {
curr->dirtyLineBoxes(); // Text run overlaps with right end of the affected range.
+ dirtiedLines = true;
+ }
}
// Now we have to walk all of the clean lines and adjust their cached line break information
@@ -1227,7 +1240,7 @@ void RenderText::setTextWithOffset(DOMStringImpl *text, uint offset, uint len, b
curr->setLineBreakPos(curr->lineBreakPos()+delta);
}
- m_linesDirty = true;
+ m_linesDirty = dirtiedLines;
setText(text, force);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list