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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
524 // happen (a double toggle for no reason essentially). This happens on | 524 // happen (a double toggle for no reason essentially). This happens on |
525 // virtualplastic.net, which manages to do about 12 enable/disables on only 3 | 525 // virtualplastic.net, which manages to do about 12 enable/disables on only 3 |
526 // sheets. :) | 526 // sheets. :) |
527 if (!m_owner->relAttribute().isAlternate() && m_disabledState == Ena bledViaScript && oldDisabledState == Disabled) | 527 if (!m_owner->relAttribute().isAlternate() && m_disabledState == Ena bledViaScript && oldDisabledState == Disabled) |
528 addPendingSheet(Blocking); | 528 addPendingSheet(Blocking); |
529 | 529 |
530 // If the sheet is already loading just bail. | 530 // If the sheet is already loading just bail. |
531 return; | 531 return; |
532 } | 532 } |
533 | 533 |
534 if (m_sheet) | |
535 m_sheet->setDisabled(disabled); | |
dglazkov
2013/06/26 15:56:27
Jesus.
| |
536 | |
534 // Load the sheet, since it's never been loaded before. | 537 // Load the sheet, since it's never been loaded before. |
535 if (!m_sheet && m_disabledState == EnabledViaScript) { | 538 if (!m_sheet && m_disabledState == EnabledViaScript) { |
536 if (m_owner->shouldProcessStyle()) | 539 if (m_owner->shouldProcessStyle()) |
537 process(); | 540 process(); |
538 } else | 541 } else |
539 m_owner->document()->styleResolverChanged(DeferRecalcStyle); // Upda te the style selector. | 542 m_owner->document()->styleResolverChanged(DeferRecalcStyle); // Upda te the style selector. |
540 } | 543 } |
541 } | 544 } |
542 | 545 |
543 void LinkStyle::process() | 546 void LinkStyle::process() |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
610 void LinkStyle::ownerRemoved() | 613 void LinkStyle::ownerRemoved() |
611 { | 614 { |
612 if (m_sheet) | 615 if (m_sheet) |
613 clearSheet(); | 616 clearSheet(); |
614 | 617 |
615 if (styleSheetIsLoading()) | 618 if (styleSheetIsLoading()) |
616 removePendingSheet(RemovePendingSheetNotifyLater); | 619 removePendingSheet(RemovePendingSheetNotifyLater); |
617 } | 620 } |
618 | 621 |
619 } // namespace WebCore | 622 } // namespace WebCore |
OLD | NEW |