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

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 836893003: Replace sheet change methods with styleResolverChanged. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 5 years, 11 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 | « sky/engine/core/dom/Document.h ('k') | sky/engine/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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 2602 matching lines...) Expand 10 before | Expand all | Expand 10 after
2613 PassOwnPtr<LifecycleNotifier<Document> > Document::createLifecycleNotifier() 2613 PassOwnPtr<LifecycleNotifier<Document> > Document::createLifecycleNotifier()
2614 { 2614 {
2615 return DocumentLifecycleNotifier::create(this); 2615 return DocumentLifecycleNotifier::create(this);
2616 } 2616 }
2617 2617
2618 DocumentLifecycleNotifier& Document::lifecycleNotifier() 2618 DocumentLifecycleNotifier& Document::lifecycleNotifier()
2619 { 2619 {
2620 return static_cast<DocumentLifecycleNotifier&>(LifecycleContext<Document>::l ifecycleNotifier()); 2620 return static_cast<DocumentLifecycleNotifier&>(LifecycleContext<Document>::l ifecycleNotifier());
2621 } 2621 }
2622 2622
2623 void Document::removedStyleSheet(CSSStyleSheet* sheet)
2624 {
2625 // If we're in document teardown, then we don't need this notification of ou r sheet's removal.
2626 // styleResolverChanged() is needed even when the document is inactive so th at
2627 // imported docuements (which is inactive) notifies the change to the master document.
2628 styleResolverChanged();
2629 }
2630
2631 void Document::modifiedStyleSheet(CSSStyleSheet* sheet)
2632 {
2633 // If we're in document teardown, then we don't need this notification of ou r sheet's removal.
2634 // styleResolverChanged() is needed even when the document is inactive so th at
2635 // imported docuements (which is inactive) notifies the change to the master document.
2636 styleResolverChanged();
2637 }
2638
2639 Element* Document::activeElement() const 2623 Element* Document::activeElement() const
2640 { 2624 {
2641 if (Element* element = treeScope().adjustedFocusedElement()) 2625 if (Element* element = treeScope().adjustedFocusedElement())
2642 return element; 2626 return element;
2643 return documentElement(); 2627 return documentElement();
2644 } 2628 }
2645 2629
2646 void Document::getTransitionElementData(Vector<TransitionElementData>& elementDa ta) 2630 void Document::getTransitionElementData(Vector<TransitionElementData>& elementDa ta)
2647 { 2631 {
2648 } 2632 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2691 using namespace blink; 2675 using namespace blink;
2692 void showLiveDocumentInstances() 2676 void showLiveDocumentInstances()
2693 { 2677 {
2694 WeakDocumentSet& set = liveDocumentSet(); 2678 WeakDocumentSet& set = liveDocumentSet();
2695 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 2679 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
2696 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 2680 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
2697 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 2681 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
2698 } 2682 }
2699 } 2683 }
2700 #endif 2684 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698