OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) | 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) |
7 * Copyright (C) 2011 Google Inc. All rights reserved. | 7 * Copyright (C) 2011 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 if (m_isInShadowTree) { | 271 if (m_isInShadowTree) { |
272 ASSERT(!m_sheet); | 272 ASSERT(!m_sheet); |
273 return; | 273 return; |
274 } | 274 } |
275 document()->removeStyleSheetCandidateNode(this); | 275 document()->removeStyleSheetCandidateNode(this); |
276 | 276 |
277 if (m_sheet) | 277 if (m_sheet) |
278 clearSheet(); | 278 clearSheet(); |
279 | 279 |
280 if (styleSheetIsLoading()) | 280 if (styleSheetIsLoading()) |
281 removePendingSheet(); | 281 removePendingSheet(RemovePendingSheetNotifyLater); |
282 | 282 |
283 if (document()->renderer()) | 283 if (document()->renderer()) |
284 document()->styleResolverChanged(DeferRecalcStyle); | 284 document()->styleResolverChanged(DeferRecalcStyle); |
285 } | 285 } |
286 | 286 |
287 void HTMLLinkElement::finishParsingChildren() | 287 void HTMLLinkElement::finishParsingChildren() |
288 { | 288 { |
289 m_createdByParser = false; | 289 m_createdByParser = false; |
290 HTMLElement::finishParsingChildren(); | 290 HTMLElement::finishParsingChildren(); |
291 } | 291 } |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 { | 451 { |
452 if (type <= m_pendingSheetType) | 452 if (type <= m_pendingSheetType) |
453 return; | 453 return; |
454 m_pendingSheetType = type; | 454 m_pendingSheetType = type; |
455 | 455 |
456 if (m_pendingSheetType == NonBlocking) | 456 if (m_pendingSheetType == NonBlocking) |
457 return; | 457 return; |
458 document()->addPendingSheet(); | 458 document()->addPendingSheet(); |
459 } | 459 } |
460 | 460 |
461 void HTMLLinkElement::removePendingSheet() | 461 void HTMLLinkElement::removePendingSheet(RemovePendingSheetNotificationType noti
fication) |
462 { | 462 { |
463 PendingSheetType type = m_pendingSheetType; | 463 PendingSheetType type = m_pendingSheetType; |
464 m_pendingSheetType = None; | 464 m_pendingSheetType = None; |
465 | 465 |
466 if (type == None) | 466 if (type == None) |
467 return; | 467 return; |
468 if (type == NonBlocking) { | 468 if (type == NonBlocking) { |
469 // Document::removePendingSheet() triggers the style selector recalc for
blocking sheets. | 469 // Document::removePendingSheet() triggers the style selector recalc for
blocking sheets. |
470 document()->styleResolverChanged(RecalcStyleImmediately); | 470 document()->styleResolverChanged(RecalcStyleImmediately); |
471 return; | 471 return; |
472 } | 472 } |
473 document()->removePendingSheet(); | 473 |
| 474 document()->removePendingSheet( |
| 475 notification == RemovePendingSheetNotifyImmediately |
| 476 ? Document::RemovePendingSheetNotifyImmediately |
| 477 : Document::RemovePendingSheetNotifyLater); |
474 } | 478 } |
475 | 479 |
476 DOMSettableTokenList* HTMLLinkElement::sizes() const | 480 DOMSettableTokenList* HTMLLinkElement::sizes() const |
477 { | 481 { |
478 return m_sizes.get(); | 482 return m_sizes.get(); |
479 } | 483 } |
480 | 484 |
481 void HTMLLinkElement::setSizes(const String& value) | 485 void HTMLLinkElement::setSizes(const String& value) |
482 { | 486 { |
483 m_sizes->setValue(value); | 487 m_sizes->setValue(value); |
484 } | 488 } |
485 | 489 |
486 #if ENABLE(MICRODATA) | 490 #if ENABLE(MICRODATA) |
487 String HTMLLinkElement::itemValueText() const | 491 String HTMLLinkElement::itemValueText() const |
488 { | 492 { |
489 return getURLAttribute(hrefAttr); | 493 return getURLAttribute(hrefAttr); |
490 } | 494 } |
491 | 495 |
492 void HTMLLinkElement::setItemValueText(const String& value, ExceptionCode&) | 496 void HTMLLinkElement::setItemValueText(const String& value, ExceptionCode&) |
493 { | 497 { |
494 setAttribute(hrefAttr, value); | 498 setAttribute(hrefAttr, value); |
495 } | 499 } |
496 #endif | 500 #endif |
497 | 501 |
498 } // namespace WebCore | 502 } // namespace WebCore |
OLD | NEW |