[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:44:28 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 38455e9ac9e43d298ef29ad2b6207e3a08903679
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jun 9 15:42:53 2003 +0000
Reviewed by Dave.
- fixed 3280538 -- JavaScript infinite loop loading frame b/c scrollHeight is always zero (easons.ie)
* khtml/xml/dom_docimpl.h: Added updateLayout method.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateLayout): Added. Code moved here
from KJS::Window::updateLayout so it can be shared. Named this updateLayout() to match
the name from KJS::Window.
* khtml/ecma/kjs_window.cpp: (Window::updateLayout): Call updateLayout()
instead of updateRendering(); the extra logic here was moved into updateLayout().
* khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): Ditto.
* khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::getValueProperty): Call updateLayout()
on the document before computing the BodyScrollHeight or BodyScrollWidth, much as
we already do in kjs_dom.cpp for ScrollHeight and ScrollWidth and other properties.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 1d05c53..d6bf667 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,22 @@
+2003-06-07 Darin Adler <darin at apple.com>
+
+ Reviewed by Dave.
+
+ - fixed 3280538 -- JavaScript infinite loop loading frame b/c scrollHeight is always zero (easons.ie)
+
+ * khtml/xml/dom_docimpl.h: Added updateLayout method.
+ * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateLayout): Added. Code moved here
+ from KJS::Window::updateLayout so it can be shared. Named this updateLayout() to match
+ the name from KJS::Window.
+
+ * khtml/ecma/kjs_window.cpp: (Window::updateLayout): Call updateLayout()
+ instead of updateRendering(); the extra logic here was moved into updateLayout().
+ * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): Ditto.
+
+ * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::getValueProperty): Call updateLayout()
+ on the document before computing the BodyScrollHeight or BodyScrollWidth, much as
+ we already do in kjs_dom.cpp for ScrollHeight and ScrollWidth and other properties.
+
2003-06-05 David Hyatt <hyatt at apple.com>
Fix for crash on an XHTML frameset page. It was assuming
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1d05c53..d6bf667 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2003-06-07 Darin Adler <darin at apple.com>
+
+ Reviewed by Dave.
+
+ - fixed 3280538 -- JavaScript infinite loop loading frame b/c scrollHeight is always zero (easons.ie)
+
+ * khtml/xml/dom_docimpl.h: Added updateLayout method.
+ * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateLayout): Added. Code moved here
+ from KJS::Window::updateLayout so it can be shared. Named this updateLayout() to match
+ the name from KJS::Window.
+
+ * khtml/ecma/kjs_window.cpp: (Window::updateLayout): Call updateLayout()
+ instead of updateRendering(); the extra logic here was moved into updateLayout().
+ * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): Ditto.
+
+ * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::getValueProperty): Call updateLayout()
+ on the document before computing the BodyScrollHeight or BodyScrollWidth, much as
+ we already do in kjs_dom.cpp for ScrollHeight and ScrollWidth and other properties.
+
2003-06-05 David Hyatt <hyatt at apple.com>
Fix for crash on an XHTML frameset page. It was assuming
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index 75113fd..f1e2c39 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -228,19 +228,13 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const
default:
// no DOM standard, found in IE only
- // make sure our rendering is up to date before
- // we allow a query on these attributes.
+ // Make sure our layout is up to date before we allow a query on these attributes.
DOM::DocumentImpl* docimpl = node.handle()->getDocument();
- KHTMLView* v = 0;
- if ( docimpl ) {
- v = docimpl->view();
- docimpl->updateRendering();
- // Only do a layout if changes have occurred that make it necessary.
- if ( v && docimpl->renderer() && docimpl->renderer()->needsLayout() )
- docimpl->view()->layout();
+ if (docimpl) {
+ docimpl->updateLayout();
}
- khtml::RenderObject *rend = node.handle() ? node.handle()->renderer() : 0L;
+ khtml::RenderObject *rend = node.handle()->renderer();
switch (token) {
case OffsetLeft:
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index c99595e..5c719b1 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -45,6 +45,8 @@
#include "misc/htmltags.h"
+#include "rendering/render_object.h"
+
#include <kdebug.h>
using namespace KJS;
@@ -1192,8 +1194,16 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
case BodyLink: return String(body.link());
case BodyText: return String(body.text());
case BodyVLink: return String(body.vLink());
- case BodyScrollHeight: return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsHeight() : 0);
- case BodyScrollWidth: return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsWidth() : 0);
+ default:
+ // Update the document's layout before we compute these attributes.
+ DOM::DocumentImpl* docimpl = node.handle()->getDocument();
+ if (docimpl) {
+ docimpl->updateLayout();
+ }
+ switch (token) {
+ case BodyScrollHeight: return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsHeight() : 0);
+ case BodyScrollWidth: return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsWidth() : 0);
+ }
}
}
break;
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index bcb6547..be13912 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1504,15 +1504,9 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
void Window::updateLayout() const
{
DOM::DocumentImpl* docimpl = static_cast<DOM::DocumentImpl *>(m_part->document().handle());
- KHTMLView* v = m_part->view();
-
- if ( docimpl ) {
- docimpl->updateRendering();
- // Only do a layout if changes have occurred that make it necessary.
- if ( v && docimpl->renderer() && docimpl->renderer()->needsLayout() )
- docimpl->view()->layout();
+ if (docimpl) {
+ docimpl->updateLayout();
}
-
}
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index 5c83c4d..3b621aa 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -1010,6 +1010,15 @@ void DocumentImpl::updateDocumentsRendering()
}
}
+void DocumentImpl::updateLayout()
+{
+ updateRendering();
+
+ // Only do a layout if changes have occurred that make it necessary.
+ if (m_view && renderer() && renderer()->needsLayout())
+ m_view->layout();
+}
+
void DocumentImpl::attach()
{
assert(!attached());
diff --git a/WebCore/khtml/xml/dom_docimpl.h b/WebCore/khtml/xml/dom_docimpl.h
index 68ac7df..aa65710 100644
--- a/WebCore/khtml/xml/dom_docimpl.h
+++ b/WebCore/khtml/xml/dom_docimpl.h
@@ -229,6 +229,7 @@ public:
virtual void recalcStyle( StyleChange = NoChange );
static QPtrList<DocumentImpl> * changedDocuments;
virtual void updateRendering();
+ void updateLayout();
static void updateDocumentsRendering();
khtml::DocLoader *docLoader() { return m_docLoader; }
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list