[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 07:08:57 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 1e2f5634f895358247ac0cd732118c28de40674b
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 26 19:13:25 2002 +0000
Fix render object removal to remerge adjacent anonymous inline boxes
when an intervening block box gets removed.
* khtml/rendering/render_flow.cpp:
(RenderFlow::removeChild):
* khtml/rendering/render_flow.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 0a420f8..9933885 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-11-26 David Hyatt <hyatt at apple.com>
+
+ Fix render object removal to remerge adjacent anonymous inline boxes
+ when an intervening block box gets removed.
+
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::removeChild):
+ * khtml/rendering/render_flow.h:
+
2002-11-25 Richard Williamson <rjw at apple.com>
Cleanup up leaking objects in page cache.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 0a420f8..9933885 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,12 @@
+2002-11-26 David Hyatt <hyatt at apple.com>
+
+ Fix render object removal to remerge adjacent anonymous inline boxes
+ when an intervening block box gets removed.
+
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::removeChild):
+ * khtml/rendering/render_flow.h:
+
2002-11-25 Richard Williamson <rjw at apple.com>
Cleanup up leaking objects in page cache.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 0a420f8..9933885 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,12 @@
+2002-11-26 David Hyatt <hyatt at apple.com>
+
+ Fix render object removal to remerge adjacent anonymous inline boxes
+ when an intervening block box gets removed.
+
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::removeChild):
+ * khtml/rendering/render_flow.h:
+
2002-11-25 Richard Williamson <rjw at apple.com>
Cleanup up leaking objects in page cache.
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index f23227c..2bb1dc4 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -2187,6 +2187,57 @@ void RenderFlow::makeChildrenNonInline(RenderObject *box2Start)
setLayouted(false);
}
+void RenderFlow::removeChild(RenderObject *oldChild)
+{
+ // If this child is a block, and if our previous and next siblings are
+ // both anonymous blocks with inline content, then we can go ahead and
+ // fold the inline content back together.
+ RenderObject* prev = oldChild->previousSibling();
+ RenderObject* next = oldChild->nextSibling();
+ bool mergedBlocks = false;
+ if (!isInline() && !oldChild->isInline() && !oldChild->continuation() &&
+ prev && prev->isAnonymousBox() && prev->childrenInline() &&
+ next && next->isAnonymousBox() && next->childrenInline()) {
+ // Take all the children out of the |next| block and put them in
+ // the |prev| block.
+ RenderObject* o = next->firstChild();
+ while (o) {
+ RenderObject* no = o;
+ o = no->nextSibling();
+ prev->appendChildNode(next->removeChildNode(no));
+ no->setLayouted(false);
+ no->setMinMaxKnown(false);
+ }
+ prev->setLayouted(false);
+ prev->setMinMaxKnown(false);
+
+ // Nuke the now-empty block.
+ removeChild(next);
+
+ mergedBlocks = true;
+ }
+
+ RenderBox::removeChild(oldChild);
+
+ if (mergedBlocks && prev && !prev->previousSibling() && !prev->nextSibling()) {
+ // The remerge has knocked us down to containing only a single anonymous
+ // box. We can go ahead and pull the content right back up into our
+ // box.
+ RenderObject* anonBlock = removeChildNode(prev);
+ m_childrenInline = true;
+ RenderObject* o = anonBlock->firstChild();
+ while (o) {
+ RenderObject* no = o;
+ o = no->nextSibling();
+ appendChildNode(anonBlock->removeChildNode(no));
+ no->setLayouted(false);
+ no->setMinMaxKnown(false);
+ }
+ setLayouted(false);
+ setMinMaxKnown(false);
+ }
+}
+
bool RenderFlow::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty)
{
bool inBox = false;
diff --git a/WebCore/khtml/rendering/render_flow.h b/WebCore/khtml/rendering/render_flow.h
index 8b0b648..fd82e1d 100644
--- a/WebCore/khtml/rendering/render_flow.h
+++ b/WebCore/khtml/rendering/render_flow.h
@@ -74,6 +74,7 @@ public:
void splitFlow(RenderObject* beforeChild, RenderFlow* newBlockBox, RenderFlow* oldCont);
void addChildWithContinuation(RenderObject* newChild, RenderObject* beforeChild);
void addChildToFlow(RenderObject* newChild, RenderObject* beforeChild);
+ void removeChild(RenderObject *oldChild);
void makeChildrenNonInline(RenderObject *box2Start = 0);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list