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

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

Issue 1670203002: Block HTML Imports from loading when inserted via innerHTML. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: third_party/WebKit/Source/core/html/HTMLLinkElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.h b/third_party/WebKit/Source/core/html/HTMLLinkElement.h
index 735e8f7f22cf59907bcd05239d7e33a36217ea00..c0b0a7b72b8495fee841904c60d2a97d3c1a2484 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.h
@@ -133,7 +133,7 @@ class CORE_EXPORT HTMLLinkElement final : public HTMLElement, public LinkLoaderC
DEFINE_WRAPPERTYPEINFO();
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLLinkElement);
public:
- static PassRefPtrWillBeRawPtr<HTMLLinkElement> create(Document&, bool createdByParser);
+ static PassRefPtrWillBeRawPtr<HTMLLinkElement> create(Document&, bool createdByParser, bool alreadyStarted = false);
dglazkov 2016/02/05 18:25:53 Can we use an enum bere? https://www.chromium.org
kouhei (in TOK) 2016/02/08 01:30:24 +1 I prefer extending "bool createdByParser" to en
~HTMLLinkElement() override;
KURL href() const;
@@ -177,6 +177,7 @@ public:
bool isAlternate() const { return linkStyle()->isUnset() && m_relAttribute.isAlternate(); }
bool shouldProcessStyle() { return linkResourceToProcess() && linkStyle(); }
bool isCreatedByParser() const { return m_createdByParser; }
+ bool isAlreadyStarted() const { return m_alreadyStarted; }
// Parse the icon size attribute into |iconSizes|, make this method public
// visible for testing purpose.
@@ -185,7 +186,7 @@ public:
DECLARE_VIRTUAL_TRACE();
private:
- HTMLLinkElement(Document&, bool createdByParser);
+ HTMLLinkElement(Document&, bool createdByParser, bool alreadyStarted);
dglazkov 2016/02/05 18:25:53 alreadyStarted is not clear in this context. What
LinkStyle* linkStyle() const;
LinkImport* linkImport() const;
@@ -229,6 +230,7 @@ private:
LinkRelAttribute m_relAttribute;
bool m_createdByParser;
+ bool m_alreadyStarted;
bool m_isInShadowTree;
};

Powered by Google App Engine
This is Rietveld 408576698