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

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

Issue 296743003: Removed RecalcStyleTime. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/html/HTMLStyleElement.cpp » ('j') | 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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 m_pendingSheetType = None; 569 m_pendingSheetType = None;
570 570
571 if (type == None) 571 if (type == None)
572 return; 572 return;
573 if (type == NonBlocking) { 573 if (type == NonBlocking) {
574 // Tell StyleEngine to re-compute styleSheets of this m_owner's treescop e. 574 // Tell StyleEngine to re-compute styleSheets of this m_owner's treescop e.
575 m_owner->document().styleEngine()->modifiedStyleSheetCandidateNode(m_own er); 575 m_owner->document().styleEngine()->modifiedStyleSheetCandidateNode(m_own er);
576 // Document::removePendingSheet() triggers the style selector recalc for blocking sheets. 576 // Document::removePendingSheet() triggers the style selector recalc for blocking sheets.
577 // FIXME: We don't have enough knowledge at this point to know if we're adding or removing a sheet 577 // FIXME: We don't have enough knowledge at this point to know if we're adding or removing a sheet
578 // so we can't call addedStyleSheet() or removedStyleSheet(). 578 // so we can't call addedStyleSheet() or removedStyleSheet().
579 m_owner->document().styleResolverChanged(RecalcStyleDeferred); 579 m_owner->document().styleResolverChanged();
580 return; 580 return;
581 } 581 }
582 582
583 m_owner->document().styleEngine()->removePendingSheet(m_owner); 583 m_owner->document().styleEngine()->removePendingSheet(m_owner);
584 } 584 }
585 585
586 void LinkStyle::setDisabledState(bool disabled) 586 void LinkStyle::setDisabledState(bool disabled)
587 { 587 {
588 LinkStyle::DisabledState oldDisabledState = m_disabledState; 588 LinkStyle::DisabledState oldDisabledState = m_disabledState;
589 m_disabledState = disabled ? Disabled : EnabledViaScript; 589 m_disabledState = disabled ? Disabled : EnabledViaScript;
(...skipping 23 matching lines...) Expand all
613 613
614 if (m_sheet) 614 if (m_sheet)
615 m_sheet->setDisabled(disabled); 615 m_sheet->setDisabled(disabled);
616 616
617 // Load the sheet, since it's never been loaded before. 617 // Load the sheet, since it's never been loaded before.
618 if (!m_sheet && m_disabledState == EnabledViaScript) { 618 if (!m_sheet && m_disabledState == EnabledViaScript) {
619 if (m_owner->shouldProcessStyle()) 619 if (m_owner->shouldProcessStyle())
620 process(); 620 process();
621 } else { 621 } else {
622 // FIXME: We don't have enough knowledge here to know if we should c all addedStyleSheet() or removedStyleSheet(). 622 // FIXME: We don't have enough knowledge here to know if we should c all addedStyleSheet() or removedStyleSheet().
623 m_owner->document().styleResolverChanged(RecalcStyleDeferred); 623 m_owner->document().styleResolverChanged();
624 } 624 }
625 } 625 }
626 } 626 }
627 627
628 void LinkStyle::process() 628 void LinkStyle::process()
629 { 629 {
630 ASSERT(m_owner->shouldProcessStyle()); 630 ASSERT(m_owner->shouldProcessStyle());
631 String type = m_owner->typeValue().lower(); 631 String type = m_owner->typeValue().lower();
632 LinkRequestBuilder builder(m_owner); 632 LinkRequestBuilder builder(m_owner);
633 633
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 removePendingSheet(); 709 removePendingSheet();
710 } 710 }
711 711
712 void LinkStyle::trace(Visitor* visitor) 712 void LinkStyle::trace(Visitor* visitor)
713 { 713 {
714 visitor->trace(m_sheet); 714 visitor->trace(m_sheet);
715 LinkResource::trace(visitor); 715 LinkResource::trace(visitor);
716 } 716 }
717 717
718 } // namespace WebCore 718 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698