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

Unified Diff: third_party/WebKit/Source/core/html/LinkStyle.h

Issue 2553803003: Refactor HTMLLinkElement
Patch Set: a Created 4 years 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
Index: third_party/WebKit/Source/core/html/LinkStyle.h
diff --git a/third_party/WebKit/Source/core/html/LinkStyle.h b/third_party/WebKit/Source/core/html/LinkStyle.h
index 0f221f7048a4dc30a633cebef07fccf83bf7d3bb..292ceb31a0015fbf35322b758bf7cc0c2b8788e5 100644
--- a/third_party/WebKit/Source/core/html/LinkStyle.h
+++ b/third_party/WebKit/Source/core/html/LinkStyle.h
@@ -15,6 +15,8 @@
namespace blink {
class HTMLLinkElement;
+class KURL;
+
//
// LinkStyle handles dynamically change-able link resources, which is
// typically @rel="stylesheet".
@@ -66,9 +68,10 @@ class LinkStyle final : public LinkResource, ResourceOwner<StyleSheetResource> {
const String& charset,
const CSSStyleSheetResource*) override;
String debugName() const override { return "LinkStyle"; }
- enum LoadReturnValue { Loaded, NotNeeded, Bail };
- LoadReturnValue loadStylesheetIfNeeded(const LinkRequestBuilder&,
- const String& type);
+ bool shouldLoadResource() const;
+ void loadStylesheetIfNeeded(const String& type);
+ LocalFrame* loadingFrame() const;
+ void loadStylesheet();
enum DisabledState { Unset, EnabledViaScript, Disabled };
@@ -78,13 +81,9 @@ class LinkStyle final : public LinkResource, ResourceOwner<StyleSheetResource> {
void addPendingSheet(PendingSheetType);
void removePendingSheet();
Document& document();
+ const Document& document() const;
- void setCrossOriginStylesheetStatus(CSSStyleSheet*);
- void setFetchFollowingCORS() {
- DCHECK(!m_fetchFollowingCORS);
- m_fetchFollowingCORS = true;
- }
- void clearFetchFollowingCORS() { m_fetchFollowingCORS = false; }
+ void setCrossOriginStylesheetStatus();
Member<CSSStyleSheet> m_sheet;
DisabledState m_disabledState;
« no previous file with comments | « third_party/WebKit/Source/core/html/LinkResource.cpp ('k') | third_party/WebKit/Source/core/html/LinkStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698