Commit a40eb069 authored by hyatt's avatar hyatt
Browse files

Fix for 3086321, stylesheets not loading if titles are

	specified.  Note that 4 of the pages on the PLT were
	affected by this, so I fully expect a slight performance
	degradation (the boost from the regression was artificial).

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::recalcStyleSelector):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8518f7bc
2002-11-12 David Hyatt <hyatt@apple.com>
Fix for 3086321, stylesheets not loading if titles are
specified. Note that 4 of the pages on the PLT were
affected by this, so I fully expect a slight performance
degradation (the boost from the regression was artificial).
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyleSelector):
2002-11-12 Richard Williamson <rjw@apple.com>
 
Oops, removed debugging.
......
2002-11-12 David Hyatt <hyatt@apple.com>
Fix for 3086321, stylesheets not loading if titles are
specified. Note that 4 of the pages on the PLT were
affected by this, so I fully expect a slight performance
degradation (the boost from the regression was artificial).
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyleSelector):
2002-11-12 Richard Williamson <rjw@apple.com>
 
Oops, removed debugging.
......
2002-11-12 David Hyatt <hyatt@apple.com>
Fix for 3086321, stylesheets not loading if titles are
specified. Note that 4 of the pages on the PLT were
affected by this, so I fully expect a slight performance
degradation (the boost from the regression was artificial).
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyleSelector):
2002-11-12 Richard Williamson <rjw@apple.com>
 
Oops, removed debugging.
......
......@@ -1882,7 +1882,6 @@ void DocumentImpl::recalcStyleSelector()
// Get the current preferred styleset. This is the
// set of sheets that will be enabled.
QString sheetUsed = view()->part()->d->m_sheetUsed;
if ( n->id() == ID_LINK )
sheet = static_cast<HTMLLinkElementImpl*>(n)->sheet();
else
......@@ -1894,22 +1893,20 @@ void DocumentImpl::recalcStyleSelector()
// PERSISTENT).
if (!enabledViaScript && !title.isEmpty()) {
// Yes, we have a title.
if (sheetUsed.isEmpty()) {
if (m_preferredStylesheetSet.isEmpty()) {
// No preferred set has been established. If
// we are NOT an alternate sheet, then establish
// us as the preferred set. Otherwise, just ignore
// this sheet.
QString rel = e->getAttribute( ATTR_REL ).string();
if (n->id() == ID_STYLE || !rel.contains("alternate")) {
sheetUsed = view()->part()->d->m_sheetUsed = title;
m_preferredStylesheetSet = sheetUsed;
}
if (n->id() == ID_STYLE || !rel.contains("alternate"))
m_preferredStylesheetSet = view()->part()->d->m_sheetUsed = title;
}
if (!m_availableSheets.contains( title ) )
m_availableSheets.append( title );
if (title != sheetUsed)
if (title != m_preferredStylesheetSet)
sheet = 0;
}
}
......
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