| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 } | 615 } |
| 616 | 616 |
| 617 void LinkStyle::addPendingSheet(PendingSheetType type) | 617 void LinkStyle::addPendingSheet(PendingSheetType type) |
| 618 { | 618 { |
| 619 if (type <= m_pendingSheetType) | 619 if (type <= m_pendingSheetType) |
| 620 return; | 620 return; |
| 621 m_pendingSheetType = type; | 621 m_pendingSheetType = type; |
| 622 | 622 |
| 623 if (m_pendingSheetType == NonBlocking) | 623 if (m_pendingSheetType == NonBlocking) |
| 624 return; | 624 return; |
| 625 m_owner->document().styleEngine().addPendingSheet(); | 625 m_owner->document().styleEngine().addPendingSheet(m_styleEngineContext); |
| 626 } | 626 } |
| 627 | 627 |
| 628 void LinkStyle::removePendingSheet() | 628 void LinkStyle::removePendingSheet() |
| 629 { | 629 { |
| 630 PendingSheetType type = m_pendingSheetType; | 630 PendingSheetType type = m_pendingSheetType; |
| 631 m_pendingSheetType = None; | 631 m_pendingSheetType = None; |
| 632 | 632 |
| 633 if (type == None) | 633 if (type == None) |
| 634 return; | 634 return; |
| 635 if (type == NonBlocking) { | 635 if (type == NonBlocking) { |
| 636 // Tell StyleEngine to re-compute styleSheets of this m_owner's treescop
e. | 636 // Tell StyleEngine to re-compute styleSheets of this m_owner's treescop
e. |
| 637 m_owner->document().styleEngine().modifiedStyleSheetCandidateNode(m_owne
r); | 637 m_owner->document().styleEngine().modifiedStyleSheetCandidateNode(m_owne
r); |
| 638 return; | 638 return; |
| 639 } | 639 } |
| 640 | 640 |
| 641 m_owner->document().styleEngine().removePendingSheet(m_owner); | 641 m_owner->document().styleEngine().removePendingSheet(m_owner, m_styleEngineC
ontext); |
| 642 } | 642 } |
| 643 | 643 |
| 644 void LinkStyle::setDisabledState(bool disabled) | 644 void LinkStyle::setDisabledState(bool disabled) |
| 645 { | 645 { |
| 646 LinkStyle::DisabledState oldDisabledState = m_disabledState; | 646 LinkStyle::DisabledState oldDisabledState = m_disabledState; |
| 647 m_disabledState = disabled ? Disabled : EnabledViaScript; | 647 m_disabledState = disabled ? Disabled : EnabledViaScript; |
| 648 if (oldDisabledState != m_disabledState) { | 648 if (oldDisabledState != m_disabledState) { |
| 649 // If we change the disabled state while the sheet is still loading, the
n we have to | 649 // If we change the disabled state while the sheet is still loading, the
n we have to |
| 650 // perform three checks: | 650 // perform three checks: |
| 651 if (styleSheetIsLoading()) { | 651 if (styleSheetIsLoading()) { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 } | 779 } |
| 780 | 780 |
| 781 DEFINE_TRACE(LinkStyle) | 781 DEFINE_TRACE(LinkStyle) |
| 782 { | 782 { |
| 783 visitor->trace(m_sheet); | 783 visitor->trace(m_sheet); |
| 784 LinkResource::trace(visitor); | 784 LinkResource::trace(visitor); |
| 785 ResourceOwner<StyleSheetResource>::trace(visitor); | 785 ResourceOwner<StyleSheetResource>::trace(visitor); |
| 786 } | 786 } |
| 787 | 787 |
| 788 } // namespace blink | 788 } // namespace blink |
| OLD | NEW |