[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:59:33 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit d6e4426f9c29a3acf057a4344c3dcfcdc4fad044
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 3 18:40:21 2003 +0000
Removing redundant layouts and adding a few !needsLayout and !normalChildNeedsLayout
checks to prevent extra layouts.
Also, fixing the recalcStyle changed() bottleneck to go through view's layout and to
not do a full repaint. The layout method will then do the right thing (full repaint
without INCREMENTAL_REPAINTING turned on, the precise repainting needed otherwise).
Reviewed by darin
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::parseAttribute):
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_container.cpp:
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyle):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 46ae7f0..33ebab0 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,23 @@
+2003-10-03 David Hyatt <hyatt at apple.com>
+
+ Removing redundant layouts and adding a few !needsLayout and !normalChildNeedsLayout
+ checks to prevent extra layouts.
+
+ Also, fixing the recalcStyle changed() bottleneck to go through view's layout and to
+ not do a full repaint. The layout method will then do the right thing (full repaint
+ without INCREMENTAL_REPAINTING turned on, the precise repainting needed otherwise).
+
+ Reviewed by darin
+
+ * khtml/html/html_tableimpl.cpp:
+ (HTMLTableElementImpl::parseAttribute):
+ * khtml/rendering/render_block.cpp:
+ * khtml/rendering/render_container.cpp:
+ (RenderContainer::appendChildNode):
+ (RenderContainer::insertChildNode):
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::recalcStyle):
+
2003-10-02 David Hyatt <hyatt at apple.com>
Remove the speed hit from using the UC break locators by not using them when
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 46ae7f0..33ebab0 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,23 @@
+2003-10-03 David Hyatt <hyatt at apple.com>
+
+ Removing redundant layouts and adding a few !needsLayout and !normalChildNeedsLayout
+ checks to prevent extra layouts.
+
+ Also, fixing the recalcStyle changed() bottleneck to go through view's layout and to
+ not do a full repaint. The layout method will then do the right thing (full repaint
+ without INCREMENTAL_REPAINTING turned on, the precise repainting needed otherwise).
+
+ Reviewed by darin
+
+ * khtml/html/html_tableimpl.cpp:
+ (HTMLTableElementImpl::parseAttribute):
+ * khtml/rendering/render_block.cpp:
+ * khtml/rendering/render_container.cpp:
+ (RenderContainer::appendChildNode):
+ (RenderContainer::insertChildNode):
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::recalcStyle):
+
2003-10-02 David Hyatt <hyatt at apple.com>
Remove the speed hit from using the UC break locators by not using them when
diff --git a/WebCore/khtml/html/html_tableimpl.cpp b/WebCore/khtml/html/html_tableimpl.cpp
index 6740c25..fbfcba3 100644
--- a/WebCore/khtml/html/html_tableimpl.cpp
+++ b/WebCore/khtml/html/html_tableimpl.cpp
@@ -495,7 +495,8 @@ void HTMLTableElementImpl::parseAttribute(AttributeImpl *attr)
padding = 1;
if (m_render && m_render->isTable()) {
static_cast<RenderTable *>(m_render)->setCellPadding(padding);
- m_render->setNeedsLayout(true);
+ if (!m_render->needsLayout())
+ m_render->setNeedsLayout(true);
}
break;
case ATTR_COLS:
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index 132b651..d63d016 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -157,7 +157,6 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi
if (newChild->isInline()) {
beforeChild->parent()->addChild(newChild,beforeChild);
- newChild->setNeedsLayoutAndMinMaxRecalc();
return;
}
else if (beforeChild->parent()->firstChild() != beforeChild)
@@ -198,14 +197,12 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi
if (beforeChild) {
if (beforeChild->previousSibling() && beforeChild->previousSibling()->isAnonymous()) {
beforeChild->previousSibling()->addChild(newChild);
- newChild->setNeedsLayoutAndMinMaxRecalc();
return;
}
}
else {
if (m_last && m_last->isAnonymous()) {
m_last->addChild(newChild);
- newChild->setNeedsLayoutAndMinMaxRecalc();
return;
}
}
@@ -215,24 +212,13 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi
RenderBox::addChild(newBox,beforeChild);
newBox->addChild(newChild);
newBox->setPos(newBox->xPos(), -500000);
- newChild->setNeedsLayoutAndMinMaxRecalc();
return;
}
- else {
- // We are adding another block child... if the current last child is an anonymous box
- // then it needs to be closed.
- // ### get rid of the closing thing altogether this will only work during initial parsing
- if (lastChild() && lastChild()->isAnonymous()) {
- lastChild()->close();
- }
- }
}
RenderBox::addChild(newChild,beforeChild);
// ### care about aligned stuff
- newChild->setNeedsLayoutAndMinMaxRecalc();
-
if ( madeBoxesNonInline )
removeLeftoverAnonymousBoxes();
}
diff --git a/WebCore/khtml/rendering/render_container.cpp b/WebCore/khtml/rendering/render_container.cpp
index 9ad9ea4..9470936 100644
--- a/WebCore/khtml/rendering/render_container.cpp
+++ b/WebCore/khtml/rendering/render_container.cpp
@@ -351,12 +351,16 @@ void RenderContainer::appendChildNode(RenderObject* newChild)
setLastChild(newChild);
- // Keep our layer hierarchy updated.
- RenderLayer* layer = enclosingLayer();
- newChild->addLayers(layer, newChild);
-
+ // Keep our layer hierarchy updated. Optimize for the common case where we don't have any children
+ // and don't have a layer attached to ourselves.
+ if (newChild->firstChild() || newChild->layer()) {
+ RenderLayer* layer = enclosingLayer();
+ newChild->addLayers(layer, newChild);
+ }
+
newChild->setNeedsLayoutAndMinMaxRecalc(); // Goes up the containing block hierarchy.
- setChildNeedsLayout(true); // We may supply the static position for an absolute positioned child.
+ if (!normalChildNeedsLayout())
+ setChildNeedsLayout(true); // We may supply the static position for an absolute positioned child.
}
void RenderContainer::insertChildNode(RenderObject* child, RenderObject* beforeChild)
@@ -387,7 +391,8 @@ void RenderContainer::insertChildNode(RenderObject* child, RenderObject* beforeC
child->addLayers(layer, child);
child->setNeedsLayoutAndMinMaxRecalc();
- setChildNeedsLayout(true); // We may supply the static position for an absolute positioned child.
+ if (!normalChildNeedsLayout())
+ setChildNeedsLayout(true); // We may supply the static position for an absolute positioned child.
}
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index 8c828ec..f617064 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -988,13 +988,8 @@ void DocumentImpl::recalcStyle( StyleChange change )
n->recalcStyle( change );
//kdDebug( 6020 ) << "TIME: recalcStyle() dt=" << qt.elapsed() << endl;
- // ### should be done by the rendering tree itself,
- // this way is rather crude and CPU intensive
- if ( changed() ) {
- renderer()->setNeedsLayoutAndMinMaxRecalc();
- renderer()->layout();
- renderer()->repaint();
- }
+ if (changed() && m_view)
+ m_view->layout();
bail_out:
setChanged( false );
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list