Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Unified Diff: Source/WebCore/html/HTMLLinkElement.cpp

Issue 10265007: Merge 113887 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/html/HTMLLinkElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLLinkElement.cpp
===================================================================
--- Source/WebCore/html/HTMLLinkElement.cpp (revision 115610)
+++ Source/WebCore/html/HTMLLinkElement.cpp (working copy)
@@ -230,11 +230,19 @@
}
} else if (m_sheet) {
// we no longer contain a stylesheet, e.g. perhaps rel or type was changed
- m_sheet = 0;
+ clearSheet();
document()->styleSelectorChanged(DeferRecalcStyle);
}
}
+void HTMLLinkElement::clearSheet()
+{
+ ASSERT(m_sheet);
+ ASSERT(m_sheet->ownerNode() == this);
+ m_sheet->clearOwnerNode();
+ m_sheet = 0;
+}
+
void HTMLLinkElement::insertedIntoDocument()
{
HTMLElement::insertedIntoDocument();
@@ -258,11 +266,8 @@
}
document()->removeStyleSheetCandidateNode(this);
- if (m_sheet) {
- ASSERT(m_sheet->ownerNode() == this);
- m_sheet->clearOwnerNode();
- m_sheet = 0;
- }
+ if (m_sheet)
+ clearSheet();
if (styleSheetIsLoading())
removePendingSheet();
« no previous file with comments | « Source/WebCore/html/HTMLLinkElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698