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

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

Issue 697363002: Remove DOMImplementation. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "core/css/MediaQueryMatcher.h" 46 #include "core/css/MediaQueryMatcher.h"
47 #include "core/css/StylePropertySet.h" 47 #include "core/css/StylePropertySet.h"
48 #include "core/css/StyleSheetContents.h" 48 #include "core/css/StyleSheetContents.h"
49 #include "core/css/StyleSheetList.h" 49 #include "core/css/StyleSheetList.h"
50 #include "core/css/invalidation/StyleInvalidator.h" 50 #include "core/css/invalidation/StyleInvalidator.h"
51 #include "core/css/parser/BisonCSSParser.h" 51 #include "core/css/parser/BisonCSSParser.h"
52 #include "core/css/resolver/FontBuilder.h" 52 #include "core/css/resolver/FontBuilder.h"
53 #include "core/css/resolver/StyleResolver.h" 53 #include "core/css/resolver/StyleResolver.h"
54 #include "core/css/resolver/StyleResolverStats.h" 54 #include "core/css/resolver/StyleResolverStats.h"
55 #include "core/dom/Attr.h" 55 #include "core/dom/Attr.h"
56 #include "core/dom/DOMImplementation.h"
57 #include "core/dom/DocumentFragment.h" 56 #include "core/dom/DocumentFragment.h"
58 #include "core/dom/DocumentLifecycleNotifier.h" 57 #include "core/dom/DocumentLifecycleNotifier.h"
59 #include "core/dom/DocumentLifecycleObserver.h" 58 #include "core/dom/DocumentLifecycleObserver.h"
60 #include "core/dom/DocumentMarkerController.h" 59 #include "core/dom/DocumentMarkerController.h"
61 #include "core/dom/Element.h" 60 #include "core/dom/Element.h"
62 #include "core/dom/ElementDataCache.h" 61 #include "core/dom/ElementDataCache.h"
63 #include "core/dom/ElementTraversal.h" 62 #include "core/dom/ElementTraversal.h"
64 #include "core/dom/ExceptionCode.h" 63 #include "core/dom/ExceptionCode.h"
65 #include "core/dom/MutationObserver.h" 64 #include "core/dom/MutationObserver.h"
66 #include "core/dom/NodeRareData.h" 65 #include "core/dom/NodeRareData.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 #ifndef NDEBUG 406 #ifndef NDEBUG
408 liveDocumentSet().remove(this); 407 liveDocumentSet().remove(this);
409 #endif 408 #endif
410 #endif 409 #endif
411 410
412 setClient(0); 411 setClient(0);
413 412
414 InspectorCounters::decrementCounter(InspectorCounters::DocumentCounter); 413 InspectorCounters::decrementCounter(InspectorCounters::DocumentCounter);
415 } 414 }
416 415
416 PassRefPtr<Document> Document::create(Document& document)
417 {
418 DocumentInit init = DocumentInit::fromContext(document.contextDocument())
419 .withRegistrationContext(document.registrationContext());
420 return HTMLDocument::create(init);
421 }
422
417 #if !ENABLE(OILPAN) 423 #if !ENABLE(OILPAN)
418 void Document::dispose() 424 void Document::dispose()
419 { 425 {
420 ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun); 426 ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun);
421 427
422 // We must make sure not to be retaining any of our children through 428 // We must make sure not to be retaining any of our children through
423 // these extra pointers or we will create a reference cycle. 429 // these extra pointers or we will create a reference cycle.
424 m_focusedElement = nullptr; 430 m_focusedElement = nullptr;
425 m_hoverNode = nullptr; 431 m_hoverNode = nullptr;
426 m_activeHoverElement = nullptr; 432 m_activeHoverElement = nullptr;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 m_mediaQueryMatcher = MediaQueryMatcher::create(*this); 474 m_mediaQueryMatcher = MediaQueryMatcher::create(*this);
469 return *m_mediaQueryMatcher; 475 return *m_mediaQueryMatcher;
470 } 476 }
471 477
472 void Document::mediaQueryAffectingValueChanged() 478 void Document::mediaQueryAffectingValueChanged()
473 { 479 {
474 m_evaluateMediaQueriesOnStyleRecalc = true; 480 m_evaluateMediaQueriesOnStyleRecalc = true;
475 styleEngine()->clearMediaQueryRuleSetStyleSheets(); 481 styleEngine()->clearMediaQueryRuleSetStyleSheets();
476 } 482 }
477 483
478 DOMImplementation& Document::implementation()
479 {
480 if (!m_implementation)
481 m_implementation = DOMImplementation::create(*this);
482 return *m_implementation;
483 }
484
485 Location* Document::location() const 484 Location* Document::location() const
486 { 485 {
487 if (!frame()) 486 if (!frame())
488 return 0; 487 return 0;
489 488
490 return &domWindow()->location(); 489 return &domWindow()->location();
491 } 490 }
492 491
493 void Document::childrenChanged(const ChildrenChange& change) 492 void Document::childrenChanged(const ChildrenChange& change)
494 { 493 {
(...skipping 2630 matching lines...) Expand 10 before | Expand all | Expand 10 after
3125 using namespace blink; 3124 using namespace blink;
3126 void showLiveDocumentInstances() 3125 void showLiveDocumentInstances()
3127 { 3126 {
3128 WeakDocumentSet& set = liveDocumentSet(); 3127 WeakDocumentSet& set = liveDocumentSet();
3129 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 3128 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
3130 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 3129 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
3131 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 3130 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
3132 } 3131 }
3133 } 3132 }
3134 #endif 3133 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698