Commit e79e9456 authored by beidson's avatar beidson

LayoutTests:

        Reviewed and landed by Brady

        Testcase for:
        http://bugs.webkit.org/show_bug.cgi?id=11590
        Bug 11590: REGRESSION (r17726-r17742): Wikipedia page intermittently loads but doesn't render

        * fast/css/import-rule-regression-11590-expected.txt: Added.
        * fast/css/import-rule-regression-11590.html: Added.
        * fast/css/resources/imports.css: Added.
        * fast/css/resources/style.css: Added.

WebCore:

        Reviewed and landed by Brady

        Fixes http://bugs.webkit.org/show_bug.cgi?id=11590 -
        REGRESSION (r17726-r17742): Wikipedia page intermittently loads but doesn't render
        Fix the regression by setting m_loadCompleted correctly.

        * css/CSSStyleSheet.cpp:
        (WebCore::CSSStyleSheet::checkLoaded):
        * dom/Node.h:
        (WebCore::Node::sheetLoaded):
        * dom/ProcessingInstruction.cpp:
        (WebCore::ProcessingInstruction::sheetLoaded):
        * dom/ProcessingInstruction.h:
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::sheetLoaded):
        * html/HTMLLinkElement.h:
        * html/HTMLStyleElement.cpp:
        (WebCore::HTMLStyleElement::sheetLoaded):
        * html/HTMLStyleElement.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b100b8e7
2006-11-16 Rob Buis <buis@kde.org>
Reviewed and landed by Brady
Testcase for:
http://bugs.webkit.org/show_bug.cgi?id=11590
Bug 11590: REGRESSION (r17726-r17742): Wikipedia page intermittently loads but doesn't render
* fast/css/import-rule-regression-11590-expected.txt: Added.
* fast/css/import-rule-regression-11590.html: Added.
* fast/css/resources/imports.css: Added.
* fast/css/resources/style.css: Added.
2006-11-15 Adele Peterson <adele@apple.com>
Reviewed by Adam.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x18
RenderText {#text} at (0,0) size 53x18
text run at (0,0) width 53: "Test for "
RenderInline {A} at (0,0) size 68x18 [color=#0000EE]
RenderText {#text} at (53,0) size 68x18
text run at (53,0) width 68: "bug 11590"
RenderText {#text} at (121,0) size 569x18
text run at (121,0) width 569: ": REGRESSION (r17726-r17742): Wikipedia page intermittently loads but doesn't render."
RenderBlock {P} at (0,34) size 784x36
RenderText {#text} at (0,0) size 750x36
text run at (0,0) width 750: "All four sides of the square below should be present for this test to really pass, and WebKit shouldn't crash for it to pass"
text run at (0,18) width 55: "partially."
RenderBlock {DIV} at (0,86) size 106x106 [border: (3px solid #000000)]
<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=11590">bug 11590</a>:
REGRESSION (r17726-r17742): Wikipedia page intermittently loads but doesn't render.</p>
<p>All four sides of the square below should be present for this test to really pass,
and WebKit shouldn't crash for it to pass partially.</p>
<link rel="stylesheet" type="text/css" href="resources/style.css">
<link rel="stylesheet" type="text/css" href="resources/imports.css">
<div style="border-top: solid; width: 100px; height: 100px;"></div>
@import "style.css";
@import "data:text/css,div { border-right: solid; }";
div { border-bottom: solid; }
2006-11-16 Rob Buis <buis@kde.org>
Reviewed and landed by Brady
Fixes http://bugs.webkit.org/show_bug.cgi?id=11590 -
REGRESSION (r17726-r17742): Wikipedia page intermittently loads but doesn't render
Fix the regression by setting m_loadCompleted correctly.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::checkLoaded):
* dom/Node.h:
(WebCore::Node::sheetLoaded):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::sheetLoaded):
* dom/ProcessingInstruction.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::sheetLoaded):
* html/HTMLLinkElement.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::sheetLoaded):
* html/HTMLStyleElement.h:
2006-11-16 David Harrison <harrison@apple.com>
Reviewed by Beth.
......@@ -170,9 +170,7 @@ void CSSStyleSheet::checkLoaded()
return;
if (parent())
parent()->checkLoaded();
if (m_parentNode)
m_parentNode->sheetLoaded();
m_loadCompleted = true;
m_loadCompleted = m_parentNode ? m_parentNode->sheetLoaded() : true;
}
DocLoader *CSSStyleSheet::docLoader()
......
......@@ -202,7 +202,7 @@ public:
virtual void aboutToUnload() { }
// For <link> and <style> elements.
virtual void sheetLoaded() { }
virtual bool sheetLoaded() { return true; }
bool hasID() const { return m_hasId; }
bool hasClass() const { return m_hasClass; }
......
......@@ -189,10 +189,13 @@ bool ProcessingInstruction::isLoading() const
return m_sheet->isLoading();
}
void ProcessingInstruction::sheetLoaded()
bool ProcessingInstruction::sheetLoaded()
{
if (!isLoading())
if (!isLoading()) {
document()->stylesheetLoaded();
return true;
}
return false;
}
void ProcessingInstruction::setCSSStyleSheet(const String &url, const String& charset, const String &sheet)
......
......@@ -62,7 +62,7 @@ public:
#endif
void setCSSStyleSheet(CSSStyleSheet*);
bool isLoading() const;
void sheetLoaded();
virtual bool sheetLoaded();
virtual String toString() const;
#ifdef XSLT_SUPPORT
......
......@@ -235,10 +235,13 @@ bool HTMLLinkElement::isLoading() const
return static_cast<CSSStyleSheet *>(m_sheet.get())->isLoading();
}
void HTMLLinkElement::sheetLoaded()
bool HTMLLinkElement::sheetLoaded()
{
if (!isLoading() && !isDisabled() && !isAlternate())
if (!isLoading() && !isDisabled() && !isAlternate()) {
document()->stylesheetLoaded();
return true;
}
return false;
}
bool HTMLLinkElement::isURLAttribute(Attribute *attr) const
......
......@@ -81,7 +81,7 @@ public:
// from CachedResourceClient
virtual void setCSSStyleSheet(const String &url, const String& charset, const String &sheet);
bool isLoading() const;
void sheetLoaded();
virtual bool sheetLoaded();
bool isAlternate() const { return m_disabledState == 0 && m_alternate; }
bool isDisabled() const { return m_disabledState == 2; }
......
......@@ -111,10 +111,13 @@ bool HTMLStyleElement::isLoading() const
return static_cast<CSSStyleSheet *>(m_sheet.get())->isLoading();
}
void HTMLStyleElement::sheetLoaded()
bool HTMLStyleElement::sheetLoaded()
{
if (!isLoading())
if (!isLoading()) {
document()->stylesheetLoaded();
return true;
}
return false;
}
bool HTMLStyleElement::disabled() const
......
......@@ -47,7 +47,7 @@ public:
virtual void childrenChanged();
bool isLoading() const;
void sheetLoaded();
virtual bool sheetLoaded();
bool disabled() const;
void setDisabled(bool);
......
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