[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:19:34 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit bcb09ec8cd67cbef2d80efccedc3dcadfc2f79b5
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 15 00:56:15 2003 +0000

    	Make FOUC work with XML.
    
            Reviewed by darin.
    
            * khtml/html/html_baseimpl.cpp:
            (HTMLBodyElementImpl::attach):
            * khtml/xml/dom_xmlimpl.cpp:
            (ProcessingInstructionImpl::ProcessingInstructionImpl):
            (ProcessingInstructionImpl::checkStyleSheet):
            (ProcessingInstructionImpl::isLoading):
            (ProcessingInstructionImpl::sheetLoaded):
            (ProcessingInstructionImpl::setStyleSheet):
            * khtml/xml/dom_xmlimpl.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3322 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index aa06f0c..c850aef 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,19 @@
+2003-01-14  David Hyatt  <hyatt at apple.com>
+
+	Make FOUC work with XML.
+	
+        Reviewed by darin.
+
+        * khtml/html/html_baseimpl.cpp:
+        (HTMLBodyElementImpl::attach):
+        * khtml/xml/dom_xmlimpl.cpp:
+        (ProcessingInstructionImpl::ProcessingInstructionImpl):
+        (ProcessingInstructionImpl::checkStyleSheet):
+        (ProcessingInstructionImpl::isLoading):
+        (ProcessingInstructionImpl::sheetLoaded):
+        (ProcessingInstructionImpl::setStyleSheet):
+        * khtml/xml/dom_xmlimpl.h:
+
 2003-01-14  Darin Adler  <darin at apple.com>
 
         Reviewed by Maciej.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index aa06f0c..c850aef 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2003-01-14  David Hyatt  <hyatt at apple.com>
+
+	Make FOUC work with XML.
+	
+        Reviewed by darin.
+
+        * khtml/html/html_baseimpl.cpp:
+        (HTMLBodyElementImpl::attach):
+        * khtml/xml/dom_xmlimpl.cpp:
+        (ProcessingInstructionImpl::ProcessingInstructionImpl):
+        (ProcessingInstructionImpl::checkStyleSheet):
+        (ProcessingInstructionImpl::isLoading):
+        (ProcessingInstructionImpl::sheetLoaded):
+        (ProcessingInstructionImpl::setStyleSheet):
+        * khtml/xml/dom_xmlimpl.h:
+
 2003-01-14  Darin Adler  <darin at apple.com>
 
         Reviewed by Maciej.
diff --git a/WebCore/khtml/html/html_baseimpl.cpp b/WebCore/khtml/html/html_baseimpl.cpp
index 694ddc8..1a8788b 100644
--- a/WebCore/khtml/html/html_baseimpl.cpp
+++ b/WebCore/khtml/html/html_baseimpl.cpp
@@ -185,17 +185,18 @@ void HTMLBodyElementImpl::attach()
 {
     assert(!m_render);
     assert(parentNode());
-    assert(parentNode()->renderer());
-
-    RenderStyle* style = getDocument()->styleSelector()->styleForElement(this);
-    style->ref();
-    if (style->display() != NONE) {
-        m_render = new (getDocument()->renderArena()) RenderBody(this);
-        m_render->setStyle(style);
-        parentNode()->renderer()->addChild(m_render, nextRenderer());
+    
+    if (parentNode()->renderer()) {
+        RenderStyle* style = getDocument()->styleSelector()->styleForElement(this);
+        style->ref();
+        if (style->display() != NONE) {
+            m_render = new (getDocument()->renderArena()) RenderBody(this);
+            m_render->setStyle(style);
+            parentNode()->renderer()->addChild(m_render, nextRenderer());
+        }
+        style->deref();
     }
-    style->deref();
-
+    
     NodeBaseImpl::attach();
 }
 
diff --git a/WebCore/khtml/xml/dom_xmlimpl.cpp b/WebCore/khtml/xml/dom_xmlimpl.cpp
index 2f24e8f..10c30f0 100644
--- a/WebCore/khtml/xml/dom_xmlimpl.cpp
+++ b/WebCore/khtml/xml/dom_xmlimpl.cpp
@@ -257,6 +257,7 @@ ProcessingInstructionImpl::ProcessingInstructionImpl(DocumentPtr *doc) : NodeBas
     m_localHref = 0;
     m_sheet = 0;
     m_cachedSheet = 0;
+    m_loading = false;
 }
 
 ProcessingInstructionImpl::ProcessingInstructionImpl(DocumentPtr *doc, DOMString _target, DOMString _data) : NodeBaseImpl(doc)
@@ -378,6 +379,8 @@ void ProcessingInstructionImpl::checkStyleSheet()
             {
                 // ### some validation on the URL?
                 // ### FIXME charset
+                m_loading = true;
+                getDocument()->addPendingSheet();
                 if (m_cachedSheet) m_cachedSheet->deref(this);
                 m_cachedSheet = getDocument()->docLoader()->requestStyleSheet(getDocument()->completeURL(href.string()), QString::null);
                 if (m_cachedSheet)
@@ -393,6 +396,19 @@ StyleSheetImpl *ProcessingInstructionImpl::sheet() const
     return m_sheet;
 }
 
+bool ProcessingInstructionImpl::isLoading() const
+{
+    if(m_loading) return true;
+    if(!m_sheet) return false;
+    return static_cast<CSSStyleSheetImpl *>(m_sheet)->isLoading();
+}
+
+void ProcessingInstructionImpl::sheetLoaded()
+{
+    if (!isLoading())
+        getDocument()->stylesheetLoaded();
+}
+
 void ProcessingInstructionImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet)
 {
     if (m_sheet)
@@ -404,7 +420,11 @@ void ProcessingInstructionImpl::setStyleSheet(const DOM::DOMString &url, const D
 	m_cachedSheet->deref(this);
     m_cachedSheet = 0;
 
-    getDocument()->updateStyleSelector();
+    m_loading = false;
+
+    // Tell the doc about the sheet.
+    if (!isLoading() && m_sheet)
+        getDocument()->stylesheetLoaded();
 }
 
 void ProcessingInstructionImpl::setStyleSheet(CSSStyleSheetImpl* sheet)
diff --git a/WebCore/khtml/xml/dom_xmlimpl.h b/WebCore/khtml/xml/dom_xmlimpl.h
index 37f56cc..31501d0 100644
--- a/WebCore/khtml/xml/dom_xmlimpl.h
+++ b/WebCore/khtml/xml/dom_xmlimpl.h
@@ -152,7 +152,9 @@ public:
     void checkStyleSheet();
     virtual void setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet);
     virtual void setStyleSheet(CSSStyleSheetImpl* sheet);
-
+    bool isLoading() const;
+    void sheetLoaded();
+    
 #if APPLE_CHANGES
     static ProcessingInstruction createInstance(ProcessingInstructionImpl *impl);
 #endif
@@ -163,6 +165,7 @@ protected:
     DOMStringImpl *m_localHref;
     khtml::CachedCSSStyleSheet *m_cachedSheet;
     CSSStyleSheetImpl *m_sheet;
+    bool m_loading;
 };
 
 class XMLAttributeReader : public QXmlDefaultHandler

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list