[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/khtml/xml
From: Dirk Mueller <mueller () kde ! org>
Date: 2004-02-12 18:03:09
Message-ID: 20040212180309.913BB9922 () office ! kde ! org
[Download RAW message or body]
CVS commit by mueller:
merge updateLayout(). useful in some cases with FOUC
M +19 -0 dom_docimpl.cpp 1.272
M +3 -1 dom_docimpl.h 1.125
--- kdelibs/khtml/xml/dom_docimpl.h #1.124:1.125
@@ -180,5 +180,5 @@ public:
* any @imports that they may be loading).
*/
- bool haveStylesheetsLoaded() { return m_pendingStylesheets <= 0; }
+ bool haveStylesheetsLoaded() { return m_pendingStylesheets <= 0 || m_ignorePendingStylesheets; }
/**
@@ -227,4 +227,5 @@ public:
static QPtrList<DocumentImpl> * changedDocuments;
virtual void updateRendering();
+ void updateLayout();
static void updateDocumentsRendering();
khtml::DocLoader *docLoader() { return m_docLoader; }
@@ -447,4 +448,5 @@ protected:
// elements.
int m_pendingStylesheets;
+ bool m_ignorePendingStylesheets;
CSSStyleSheetImpl *m_elemSheet;
--- kdelibs/khtml/xml/dom_docimpl.cpp #1.271:1.272
@@ -279,4 +279,5 @@ DocumentImpl::DocumentImpl(DOMImplementa
m_inStyleRecalc = false;
m_pendingStylesheets = 0;
+ m_ignorePendingStylesheets = false;
m_usesDescendantRules = false;
m_async = true;
@@ -1027,4 +1028,22 @@ void DocumentImpl::updateDocumentsRender
}
+void DocumentImpl::updateLayout()
+{
+ bool oldIgnore = m_ignorePendingStylesheets;
+
+ if (!haveStylesheetsLoaded()) {
+ m_ignorePendingStylesheets = true;
+ updateStyleSelector();
+ }
+
+ updateRendering();
+
+ // Only do a layout if changes have occurred that make it necessary.
+ if (m_view && renderer() && !renderer()->layouted())
+ m_view->layout();
+
+ m_ignorePendingStylesheets = oldIgnore;
+}
+
void DocumentImpl::attach()
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic