From: hyatt Date: Thu, 5 May 2005 20:24:45 +0000 (+0000) Subject: Eliminate the FOUCS on wired.com. innerWidth and innerHeight on window should not... X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=eaeeafabfe99434bc64e3c6f8bf7bc12e2c7b526 Eliminate the FOUCS on wired.com. innerWidth and innerHeight on window should not do a layout that ignores pending stylesheets, since even if stylesheets are loading the correct window dimensions can be determined with a normal layout. The radar # is 4109888. Reviewed by rjw * khtml/ecma/kjs_window.cpp: (Window::get): (Window::updateLayout): * khtml/ecma/kjs_window.h: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9127 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23 index 139d2fa04ea6..faddb64c19ec 100644 --- a/WebCore/ChangeLog-2005-08-23 +++ b/WebCore/ChangeLog-2005-08-23 @@ -1,3 +1,18 @@ +2005-05-05 David Hyatt + + Eliminate the FOUCS on wired.com. innerWidth and innerHeight on window should not do a layout that ignores + pending stylesheets, since even if stylesheets are loading the correct window dimensions can be determined with + a normal layout. + + The radar # is 4109888. + + Reviewed by rjw + + * khtml/ecma/kjs_window.cpp: + (Window::get): + (Window::updateLayout): + * khtml/ecma/kjs_window.h: + 2005-05-05 David Hyatt Fix for 4109667, sIFR flash replacement technique often malfunctions. This bug occurs when the plugin diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp index d96b54cada6b..9a181d0e062f 100644 --- a/WebCore/khtml/ecma/kjs_window.cpp +++ b/WebCore/khtml/ecma/kjs_window.cpp @@ -572,12 +572,12 @@ Value Window::get(ExecState *exec, const Identifier &p) const case InnerHeight: if (!m_part->view()) return Undefined(); - updateLayout(); + updateLayout(false); return Number(m_part->view()->visibleHeight()); case InnerWidth: if (!m_part->view()) return Undefined(); - updateLayout(); + updateLayout(false); return Number(m_part->view()->visibleWidth()); case Length: return Number(m_part->frames().count()); @@ -1876,11 +1876,14 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args) return Undefined(); } -void Window::updateLayout() const +void Window::updateLayout(bool ignoreStylesheets) const { DOM::DocumentImpl* docimpl = static_cast(m_part->document().handle()); if (docimpl) { - docimpl->updateLayoutIgnorePendingStylesheets(); + if (ignoreStylesheets) + docimpl->updateLayoutIgnorePendingStylesheets(); + else + docimpl->updateLayout(); } } diff --git a/WebCore/khtml/ecma/kjs_window.h b/WebCore/khtml/ecma/kjs_window.h index 14a147e37ee0..5d499a5ddc8c 100644 --- a/WebCore/khtml/ecma/kjs_window.h +++ b/WebCore/khtml/ecma/kjs_window.h @@ -147,7 +147,7 @@ namespace KJS { Value getListener(ExecState *exec, int eventId) const; void setListener(ExecState *exec, int eventId, Value func); private: - void updateLayout() const; + void updateLayout(bool ignoreStylesheets = true) const; QGuardedPtr m_part; Screen *screen;