[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/khtml
From: Peter Kelly <pmk () post ! com>
Date: 2003-08-14 12:43:36
[Download RAW message or body]
CVS commit by pmk:
Fixed a problem where the page would not be displayed if a stylesheet
referenced via @import could not be loaded.
M +14 -0 css/css_ruleimpl.cpp 1.43
M +2 -1 css/css_ruleimpl.h 1.24
M +4 -0 html/html_headimpl.cpp 1.102
--- kdelibs/khtml/css/css_ruleimpl.cpp #1.42:1.43
@@ -147,4 +147,17 @@ void CSSImportRuleImpl::setStyleSheet(co
}
+void CSSImportRuleImpl::error(int /*err*/, const QString &/*text*/)
+{
+ if ( m_styleSheet ) {
+ m_styleSheet->setParent(0);
+ m_styleSheet->deref();
+ }
+ m_styleSheet = 0;
+
+ m_loading = false;
+
+ checkLoaded();
+}
+
bool CSSImportRuleImpl::isLoading()
{
@@ -154,4 +167,5 @@ bool CSSImportRuleImpl::isLoading()
void CSSImportRuleImpl::init()
{
+ m_loading = 0;
khtml::DocLoader *docLoader = 0;
StyleBaseImpl *root = this;
--- kdelibs/khtml/css/css_ruleimpl.h #1.23:1.24
@@ -115,4 +115,5 @@ public:
// from CachedObjectClient
virtual void setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet);
+ virtual void error(int err, const QString &text);
bool isLoading();
--- kdelibs/khtml/html/html_headimpl.cpp #1.101:1.102
@@ -199,4 +199,8 @@ void HTMLLinkElementImpl::process()
m_cachedSheet->ref(this);
}
+ else {
+ // Error requesting sheet; decrement pending sheet count
+ getDocument()->styleSheetLoaded();
+ }
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic