so they do not need to do a layout in order to yield correct values from JS. Removing this stops an
early layout and paint before the apple.com images are typically loaded.
This is an improvement of the fix for wired.com's FOUC. For that bug I eliminated the need to ignore pending
stylesheets, but now I'm going further and just eliminating the layout all together. This means that the old
updateLayout function can be reverted to how it was before the wired.com fix.
Reviewed by john
* khtml/ecma/kjs_window.cpp:
(Window::get):
(Window::updateLayout):
* khtml/ecma/kjs_window.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9164
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-05-11 David Hyatt <hyatt@apple.com>
+
+ Improve the display of apple.com. innerWidth and innerHeight refer to the size of the visible view and
+ so they do not need to do a layout in order to yield correct values from JS. Removing this stops an
+ early layout and paint before the apple.com images are typically loaded.
+
+ This is an improvement of the fix for wired.com's FOUC. For that bug I eliminated the need to ignore pending
+ stylesheets, but now I'm going further and just eliminating the layout all together. This means that the old
+ updateLayout function can be reverted to how it was before the wired.com fix.
+
+ Reviewed by john
+
+ * khtml/ecma/kjs_window.cpp:
+ (Window::get):
+ (Window::updateLayout):
+ * khtml/ecma/kjs_window.h:
+
2005-05-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by Kevin.
case InnerHeight:
if (!m_part->view())
return Undefined();
- updateLayout(false);
return Number(m_part->view()->visibleHeight());
case InnerWidth:
if (!m_part->view())
return Undefined();
- updateLayout(false);
return Number(m_part->view()->visibleWidth());
case Length:
return Number(m_part->frames().count());
return Undefined();
}
-void Window::updateLayout(bool ignoreStylesheets) const
+void Window::updateLayout() const
{
DOM::DocumentImpl* docimpl = static_cast<DOM::DocumentImpl *>(m_part->document().handle());
- if (docimpl) {
- if (ignoreStylesheets)
- docimpl->updateLayoutIgnorePendingStylesheets();
- else
- docimpl->updateLayout();
- }
+ if (docimpl)
+ docimpl->updateLayoutIgnorePendingStylesheets();
}
Value getListener(ExecState *exec, int eventId) const;
void setListener(ExecState *exec, int eventId, Value func);
private:
- void updateLayout(bool ignoreStylesheets = true) const;
+ void updateLayout() const;
QGuardedPtr<KHTMLPart> m_part;
Screen *screen;