Commit aa2a71be authored by aliceli1's avatar aliceli1

Reviewed by Hyatt.

        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6999
          "Dynamically added link-tag disables the use of change styles 
           dynamically"

        * khtml/html/html_headimpl.cpp:
        (WebCore::HTMLLinkElementImpl::process):
        - dynamically added link-tags for stylesheets were messing up the
          counting of pending stylesheets.  If a head link element 
          specifies a new stylesheet but the previously specified 
          stylesheet is still loading, tell the document that stylesheets 
          are loaded so that there are no remaining requests for it to be 
          loaded.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4e4e81aa
2006-03-17 Alice Liu <alice.liu@apple.com>
Reviewed by Hyatt.
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6999
"Dynamically added link-tag disables the use of change styles
dynamically"
* khtml/html/html_headimpl.cpp:
(WebCore::HTMLLinkElementImpl::process):
- dynamically added link-tags for stylesheets were messing up the
counting of pending stylesheets. If a head link element
specifies a new stylesheet but the previously specified
stylesheet is still loading, tell the document that stylesheets
are loaded so that there are no remaining requests for it to be
loaded.
2006-03-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin.
......@@ -231,7 +231,6 @@ void HTMLLinkElementImpl::process()
// ### there may be in some situations e.g. for an editor or script to manipulate
// also, don't load style sheets for standalone documents
if (m_media.isNull() || m_media.contains("screen") || m_media.contains("all") || m_media.contains("print")) {
m_loading = true;
// Add ourselves as a pending sheet, but only if we aren't an alternate
// stylesheet. Alternate stylesheets don't hold up render tree construction.
......@@ -239,8 +238,13 @@ void HTMLLinkElementImpl::process()
getDocument()->addPendingSheet();
QString chset = getAttribute(charsetAttr).qstring();
if (m_cachedSheet)
if (m_cachedSheet) {
if (m_loading) {
getDocument()->stylesheetLoaded();
}
m_cachedSheet->deref(this);
}
m_loading = true;
m_cachedSheet = getDocument()->docLoader()->requestStyleSheet(m_url, chset);
if (m_cachedSheet)
m_cachedSheet->ref(this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment