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
+2005-05-05 David Hyatt <hyatt@apple.com>
+
+ 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 <hyatt@apple.com>
Fix for 4109667, sIFR flash replacement technique often malfunctions. This bug occurs when the plugin
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());
return Undefined();
}
-void Window::updateLayout() const
+void Window::updateLayout(bool ignoreStylesheets) const
{
DOM::DocumentImpl* docimpl = static_cast<DOM::DocumentImpl *>(m_part->document().handle());
if (docimpl) {
- docimpl->updateLayoutIgnorePendingStylesheets();
+ if (ignoreStylesheets)
+ docimpl->updateLayoutIgnorePendingStylesheets();
+ else
+ docimpl->updateLayout();
}
}
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<KHTMLPart> m_part;
Screen *screen;