diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/html/LinkResource.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/html/LinkResource.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/chromium/third_party/WebKit/Source/core/html/LinkResource.cpp b/chromium/third_party/WebKit/Source/core/html/LinkResource.cpp index 5e74a89c656..ef239527a14 100644 --- a/chromium/third_party/WebKit/Source/core/html/LinkResource.cpp +++ b/chromium/third_party/WebKit/Source/core/html/LinkResource.cpp @@ -32,6 +32,7 @@ #include "core/html/LinkResource.h" #include "HTMLNames.h" +#include "core/html/HTMLImport.h" #include "core/html/HTMLLinkElement.h" namespace WebCore { @@ -47,9 +48,22 @@ LinkResource::~LinkResource() { } +bool LinkResource::shouldLoadResource() const +{ + return m_owner->document().frame() || m_owner->document().import(); +} + +Frame* LinkResource::loadingFrame() const +{ + HTMLImport* import = m_owner->document().import(); + if (!import) + return m_owner->document().frame(); + return import->master()->document().frame(); +} + LinkRequestBuilder::LinkRequestBuilder(HTMLLinkElement* owner) : m_owner(owner) - , m_url(m_owner->getNonEmptyURLAttribute(hrefAttr)) + , m_url(owner->getNonEmptyURLAttribute(hrefAttr)) { m_charset = m_owner->getAttribute(charsetAttr); if (m_charset.isEmpty() && m_owner->document().frame()) |