Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: Source/core/html/HTMLLinkElement.cpp

Issue 17827004: Include disabled stylesheets in document.styleSheets. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed expected result for mac Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/DocumentStyleSheetCollection.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentStyleSheetCollection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698