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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2716153003: Removed FrameHost::chromeClient() (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 2508 matching lines...) Expand 10 before | Expand all | Expand 10 after
2519 2519
2520 MutationObserver::cleanSlotChangeList(*this); 2520 MutationObserver::cleanSlotChangeList(*this);
2521 2521
2522 m_hoverNode = nullptr; 2522 m_hoverNode = nullptr;
2523 m_activeHoverElement = nullptr; 2523 m_activeHoverElement = nullptr;
2524 m_autofocusElement = nullptr; 2524 m_autofocusElement = nullptr;
2525 2525
2526 if (m_focusedElement.get()) { 2526 if (m_focusedElement.get()) {
2527 Element* oldFocusedElement = m_focusedElement; 2527 Element* oldFocusedElement = m_focusedElement;
2528 m_focusedElement = nullptr; 2528 m_focusedElement = nullptr;
2529 if (frameHost()) 2529 if (page())
2530 frameHost()->chromeClient().focusedNodeChanged(oldFocusedElement, 2530 page()->chromeClient().focusedNodeChanged(oldFocusedElement, nullptr);
2531 nullptr);
2532 } 2531 }
2533 m_sequentialFocusNavigationStartingPoint = nullptr; 2532 m_sequentialFocusNavigationStartingPoint = nullptr;
2534 2533
2535 if (this == &axObjectCacheOwner()) 2534 if (this == &axObjectCacheOwner())
2536 clearAXObjectCache(); 2535 clearAXObjectCache();
2537 2536
2538 m_layoutView = nullptr; 2537 m_layoutView = nullptr;
2539 ContainerNode::detachLayoutTree(); 2538 ContainerNode::detachLayoutTree();
2540 2539
2541 if (this != &axObjectCacheOwner()) { 2540 if (this != &axObjectCacheOwner()) {
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
3568 viewportMetaEnabled) 3567 viewportMetaEnabled)
3569 appliedViewportDescription = m_legacyViewportDescription; 3568 appliedViewportDescription = m_legacyViewportDescription;
3570 if (shouldOverrideLegacyDescription(m_viewportDescription.type)) 3569 if (shouldOverrideLegacyDescription(m_viewportDescription.type))
3571 appliedViewportDescription = m_viewportDescription; 3570 appliedViewportDescription = m_viewportDescription;
3572 3571
3573 return appliedViewportDescription; 3572 return appliedViewportDescription;
3574 } 3573 }
3575 3574
3576 void Document::updateViewportDescription() { 3575 void Document::updateViewportDescription() {
3577 if (frame() && frame()->isMainFrame()) { 3576 if (frame() && frame()->isMainFrame()) {
3578 frameHost()->chromeClient().dispatchViewportPropertiesDidChange( 3577 page()->chromeClient().dispatchViewportPropertiesDidChange(
3579 viewportDescription()); 3578 viewportDescription());
3580 } 3579 }
3581 } 3580 }
3582 3581
3583 String Document::outgoingReferrer() const { 3582 String Document::outgoingReferrer() const {
3584 if (getSecurityOrigin()->isUnique()) { 3583 if (getSecurityOrigin()->isUnique()) {
3585 // Return |no-referrer|. 3584 // Return |no-referrer|.
3586 return String(); 3585 return String();
3587 } 3586 }
3588 3587
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
4133 } 4132 }
4134 4133
4135 if (!focusChangeBlocked && m_focusedElement) { 4134 if (!focusChangeBlocked && m_focusedElement) {
4136 // Create the AXObject cache in a focus change because Chromium relies on 4135 // Create the AXObject cache in a focus change because Chromium relies on
4137 // it. 4136 // it.
4138 if (AXObjectCache* cache = axObjectCache()) 4137 if (AXObjectCache* cache = axObjectCache())
4139 cache->handleFocusedUIElementChanged(oldFocusedElement, 4138 cache->handleFocusedUIElementChanged(oldFocusedElement,
4140 newFocusedElement); 4139 newFocusedElement);
4141 } 4140 }
4142 4141
4143 if (!focusChangeBlocked && frameHost()) 4142 if (!focusChangeBlocked && page()) {
4144 frameHost()->chromeClient().focusedNodeChanged(oldFocusedElement, 4143 page()->chromeClient().focusedNodeChanged(oldFocusedElement,
4145 m_focusedElement.get()); 4144 m_focusedElement.get());
4145 }
4146 4146
4147 SetFocusedElementDone: 4147 SetFocusedElementDone:
4148 updateStyleAndLayoutTree(); 4148 updateStyleAndLayoutTree();
4149 if (LocalFrame* frame = this->frame()) 4149 if (LocalFrame* frame = this->frame())
4150 frame->selection().didChangeFocus(); 4150 frame->selection().didChangeFocus();
4151 return !focusChangeBlocked; 4151 return !focusChangeBlocked;
4152 } 4152 }
4153 4153
4154 void Document::clearFocusedElement() { 4154 void Document::clearFocusedElement() {
4155 setFocusedElement(nullptr, FocusParams(SelectionBehaviorOnFocus::None, 4155 setFocusedElement(nullptr, FocusParams(SelectionBehaviorOnFocus::None,
(...skipping 2506 matching lines...) Expand 10 before | Expand all | Expand 10 after
6662 } 6662 }
6663 6663
6664 void showLiveDocumentInstances() { 6664 void showLiveDocumentInstances() {
6665 WeakDocumentSet& set = liveDocumentSet(); 6665 WeakDocumentSet& set = liveDocumentSet();
6666 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6666 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6667 for (blink::Document* document : set) 6667 for (blink::Document* document : set)
6668 fprintf(stderr, "- Document %p URL: %s\n", document, 6668 fprintf(stderr, "- Document %p URL: %s\n", document,
6669 document->url().getString().utf8().data()); 6669 document->url().getString().utf8().data());
6670 } 6670 }
6671 #endif 6671 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698