| Index: Source/core/html/LinkResource.cpp
|
| diff --git a/Source/core/css/CSSFontFaceLoadEvent.cpp b/Source/core/html/LinkResource.cpp
|
| similarity index 66%
|
| copy from Source/core/css/CSSFontFaceLoadEvent.cpp
|
| copy to Source/core/html/LinkResource.cpp
|
| index 80ca0c9b0a27dd55d75448736ed30f092f0f5385..c81063f490a622baed10585b764a25ec4aefa616 100644
|
| --- a/Source/core/css/CSSFontFaceLoadEvent.cpp
|
| +++ b/Source/core/html/LinkResource.cpp
|
| @@ -29,38 +29,37 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "core/css/CSSFontFaceLoadEvent.h"
|
| +#include "core/html/LinkResource.h"
|
| +
|
| +#include "HTMLNames.h"
|
| +#include "core/html/HTMLLinkElement.h"
|
|
|
| namespace WebCore {
|
|
|
| -CSSFontFaceLoadEvent::CSSFontFaceLoadEvent()
|
| -{
|
| - ScriptWrappable::init(this);
|
| -}
|
| +using namespace HTMLNames;
|
|
|
| -CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString& type, PassRefPtr<CSSFontFaceRule> fontface, PassRefPtr<DOMError> error)
|
| - : Event(type, false, false)
|
| - , m_fontface(fontface)
|
| - , m_error(error)
|
| +LinkResource::LinkResource(HTMLLinkElement* owner)
|
| + : m_owner(owner)
|
| {
|
| - ScriptWrappable::init(this);
|
| }
|
|
|
| -CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString& type, const CSSFontFaceLoadEventInit& initializer)
|
| - : Event(type, initializer)
|
| - , m_fontface(initializer.fontface)
|
| - , m_error(initializer.error)
|
| +LinkResource::~LinkResource()
|
| {
|
| - ScriptWrappable::init(this);
|
| }
|
|
|
| -CSSFontFaceLoadEvent::~CSSFontFaceLoadEvent()
|
| +LinkRequestBuilder::LinkRequestBuilder(HTMLLinkElement* owner)
|
| + : m_owner(owner)
|
| + , m_url(m_owner->getNonEmptyURLAttribute(hrefAttr))
|
| {
|
| + m_charset = m_owner->getAttribute(charsetAttr);
|
| + if (m_charset.isEmpty() && m_owner->document()->frame())
|
| + m_charset = m_owner->document()->charset();
|
| }
|
|
|
| -const AtomicString& CSSFontFaceLoadEvent::interfaceName() const
|
| +CachedResourceRequest LinkRequestBuilder::build(bool blocking) const
|
| {
|
| - return eventNames().interfaceForCSSFontFaceLoadEvent;
|
| + ResourceLoadPriority priority = blocking ? ResourceLoadPriorityUnresolved : ResourceLoadPriorityVeryLow;
|
| + return CachedResourceRequest(ResourceRequest(m_owner->document()->completeURL(m_url)), m_owner->localName(), m_charset, priority);
|
| }
|
|
|
| } // namespace WebCore
|
|
|