|
Lines 193-198
void HTMLLinkElement::tokenizeRelAttribute(const AtomicString& rel, RelAttribute
a/Source/WebCore/html/HTMLLinkElement.cpp_sec1
|
| 193 |
} |
193 |
} |
| 194 |
} |
194 |
} |
| 195 |
|
195 |
|
|
|
196 |
bool HTMLLinkElement::checkBeforeLoadEvent() |
| 197 |
{ |
| 198 |
RefPtr<Document> originalDocument = document(); |
| 199 |
if (!dispatchBeforeLoadEvent(m_url)) |
| 200 |
return false; |
| 201 |
// A beforeload handler might have removed us from the document or changed the document. |
| 202 |
if (!inDocument() || document() != originalDocument) |
| 203 |
return false; |
| 204 |
return true; |
| 205 |
} |
| 206 |
|
| 196 |
void HTMLLinkElement::process() |
207 |
void HTMLLinkElement::process() |
| 197 |
{ |
208 |
{ |
| 198 |
if (!inDocument() || m_isInShadowTree) { |
209 |
if (!inDocument() || m_isInShadowTree) { |
|
Lines 204-211
void HTMLLinkElement::process()
a/Source/WebCore/html/HTMLLinkElement.cpp_sec2
|
| 204 |
|
215 |
|
| 205 |
// IE extension: location of small icon for locationbar / bookmarks |
216 |
// IE extension: location of small icon for locationbar / bookmarks |
| 206 |
// We'll record this URL per document, even if we later only use it in top level frames |
217 |
// We'll record this URL per document, even if we later only use it in top level frames |
| 207 |
if (m_relAttribute.m_isIcon && m_url.isValid() && !m_url.isEmpty()) |
218 |
if (m_relAttribute.m_isIcon && m_url.isValid() && !m_url.isEmpty()) { |
|
|
219 |
if (!checkBeforeLoadEvent()) |
| 220 |
return; |
| 208 |
document()->setIconURL(m_url.string(), type); |
221 |
document()->setIconURL(m_url.string(), type); |
|
|
222 |
} |
| 209 |
|
223 |
|
| 210 |
if (m_relAttribute.m_isDNSPrefetch) { |
224 |
if (m_relAttribute.m_isDNSPrefetch) { |
| 211 |
Settings* settings = document()->settings(); |
225 |
Settings* settings = document()->settings(); |
|
Lines 217-222
void HTMLLinkElement::process()
a/Source/WebCore/html/HTMLLinkElement.cpp_sec3
|
| 217 |
|
231 |
|
| 218 |
#if ENABLE(LINK_PREFETCH) |
232 |
#if ENABLE(LINK_PREFETCH) |
| 219 |
if (m_relAttribute.m_isLinkPrefetch && m_url.isValid() && document()->frame()) { |
233 |
if (m_relAttribute.m_isLinkPrefetch && m_url.isValid() && document()->frame()) { |
|
|
234 |
if (!checkBeforeLoadEvent()) |
| 235 |
return; |
| 220 |
m_cachedLinkPrefetch = document()->cachedResourceLoader()->requestLinkPrefetch(m_url); |
236 |
m_cachedLinkPrefetch = document()->cachedResourceLoader()->requestLinkPrefetch(m_url); |
| 221 |
if (m_cachedLinkPrefetch) |
237 |
if (m_cachedLinkPrefetch) |
| 222 |
m_cachedLinkPrefetch->addClient(this); |
238 |
m_cachedLinkPrefetch->addClient(this); |
|
Lines 238-248
void HTMLLinkElement::process()
a/Source/WebCore/html/HTMLLinkElement.cpp_sec4
|
| 238 |
m_cachedSheet = 0; |
254 |
m_cachedSheet = 0; |
| 239 |
} |
255 |
} |
| 240 |
|
256 |
|
| 241 |
RefPtr<Document> originalDocument = document(); |
257 |
if (!checkBeforeLoadEvent()) |
| 242 |
if (!dispatchBeforeLoadEvent(m_url)) |
|
|
| 243 |
return; |
| 244 |
// A beforeload handler might have removed us from the document or changed the document. |
| 245 |
if (!inDocument() || document() != originalDocument) |
| 246 |
return; |
258 |
return; |
| 247 |
|
259 |
|
| 248 |
m_loading = true; |
260 |
m_loading = true; |