| Index: third_party/WebKit/Source/core/page/FocusController.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
|
| index 28c3f60b7b60a788e561beef5e06b2847dbe57d0..7a0fce9ff107e4e4ce0a2ed63db7a63ed9d2f7af 100644
|
| --- a/third_party/WebKit/Source/core/page/FocusController.cpp
|
| +++ b/third_party/WebKit/Source/core/page/FocusController.cpp
|
| @@ -82,7 +82,7 @@ public:
|
|
|
| private:
|
| explicit FocusNavigationScope(TreeScope*);
|
| - RawPtrWillBeMember<TreeScope> m_rootTreeScope;
|
| + Member<TreeScope> m_rootTreeScope;
|
| };
|
|
|
| FocusNavigationScope::FocusNavigationScope(TreeScope* treeScope)
|
| @@ -183,7 +183,7 @@ inline void dispatchEventsOnWindowAndFocusedElement(Document* document, bool foc
|
| }
|
|
|
| if (!focused && document->focusedElement()) {
|
| - RefPtrWillBeRawPtr<Element> focusedElement(document->focusedElement());
|
| + RawPtr<Element> focusedElement(document->focusedElement());
|
| focusedElement->setFocus(false);
|
| dispatchBlurEvent(*document, *focusedElement);
|
| }
|
| @@ -191,7 +191,7 @@ inline void dispatchEventsOnWindowAndFocusedElement(Document* document, bool foc
|
| if (LocalDOMWindow* window = document->domWindow())
|
| window->dispatchEvent(Event::create(focused ? EventTypeNames::focus : EventTypeNames::blur));
|
| if (focused && document->focusedElement()) {
|
| - RefPtrWillBeRawPtr<Element> focusedElement(document->focusedElement());
|
| + RawPtr<Element> focusedElement(document->focusedElement());
|
| focusedElement->setFocus(true);
|
| dispatchFocusEvent(*document, *focusedElement);
|
| }
|
| @@ -544,12 +544,12 @@ FocusController::FocusController(Page* page)
|
| {
|
| }
|
|
|
| -PassOwnPtrWillBeRawPtr<FocusController> FocusController::create(Page* page)
|
| +RawPtr<FocusController> FocusController::create(Page* page)
|
| {
|
| - return adoptPtrWillBeNoop(new FocusController(page));
|
| + return (new FocusController(page));
|
| }
|
|
|
| -void FocusController::setFocusedFrame(PassRefPtrWillBeRawPtr<Frame> frame, bool notifyEmbedder)
|
| +void FocusController::setFocusedFrame(RawPtr<Frame> frame, bool notifyEmbedder)
|
| {
|
| ASSERT(!frame || frame->page() == m_page);
|
| if (m_focusedFrame == frame || (m_isChangingFocusedFrame && frame))
|
| @@ -557,9 +557,9 @@ void FocusController::setFocusedFrame(PassRefPtrWillBeRawPtr<Frame> frame, bool
|
|
|
| m_isChangingFocusedFrame = true;
|
|
|
| - RefPtrWillBeRawPtr<LocalFrame> oldFrame = (m_focusedFrame && m_focusedFrame->isLocalFrame()) ? toLocalFrame(m_focusedFrame.get()) : nullptr;
|
| + RawPtr<LocalFrame> oldFrame = (m_focusedFrame && m_focusedFrame->isLocalFrame()) ? toLocalFrame(m_focusedFrame.get()) : nullptr;
|
|
|
| - RefPtrWillBeRawPtr<LocalFrame> newFrame = (frame && frame->isLocalFrame()) ? toLocalFrame(frame.get()) : nullptr;
|
| + RawPtr<LocalFrame> newFrame = (frame && frame->isLocalFrame()) ? toLocalFrame(frame.get()) : nullptr;
|
|
|
| m_focusedFrame = frame.get();
|
|
|
| @@ -582,23 +582,23 @@ void FocusController::setFocusedFrame(PassRefPtrWillBeRawPtr<Frame> frame, bool
|
| m_focusedFrame->client()->frameFocused();
|
| }
|
|
|
| -void FocusController::focusDocumentView(PassRefPtrWillBeRawPtr<Frame> frame, bool notifyEmbedder)
|
| +void FocusController::focusDocumentView(RawPtr<Frame> frame, bool notifyEmbedder)
|
| {
|
| ASSERT(!frame || frame->page() == m_page);
|
| if (m_focusedFrame == frame)
|
| return;
|
|
|
| - RefPtrWillBeRawPtr<LocalFrame> focusedFrame = (m_focusedFrame && m_focusedFrame->isLocalFrame()) ? toLocalFrame(m_focusedFrame.get()) : nullptr;
|
| + RawPtr<LocalFrame> focusedFrame = (m_focusedFrame && m_focusedFrame->isLocalFrame()) ? toLocalFrame(m_focusedFrame.get()) : nullptr;
|
| if (focusedFrame && focusedFrame->view()) {
|
| - RefPtrWillBeRawPtr<Document> document = focusedFrame->document();
|
| + RawPtr<Document> document = focusedFrame->document();
|
| Element* focusedElement = document ? document->focusedElement() : nullptr;
|
| if (focusedElement)
|
| dispatchBlurEvent(*document, *focusedElement);
|
| }
|
|
|
| - RefPtrWillBeRawPtr<LocalFrame> newFocusedFrame = (frame && frame->isLocalFrame()) ? toLocalFrame(frame.get()) : nullptr;
|
| + RawPtr<LocalFrame> newFocusedFrame = (frame && frame->isLocalFrame()) ? toLocalFrame(frame.get()) : nullptr;
|
| if (newFocusedFrame && newFocusedFrame->view()) {
|
| - RefPtrWillBeRawPtr<Document> document = newFocusedFrame->document();
|
| + RawPtr<Document> document = newFocusedFrame->document();
|
| Element* focusedElement = document ? document->focusedElement() : nullptr;
|
| if (focusedElement)
|
| dispatchFocusEvent(*document, *focusedElement);
|
| @@ -745,7 +745,7 @@ bool FocusController::advanceFocusInDocumentOrder(LocalFrame* frame, Node* start
|
|
|
| document->updateLayoutIgnorePendingStylesheets();
|
|
|
| - RefPtrWillBeRawPtr<Element> element = findFocusableElementAcrossFocusScopes(type, FocusNavigationScope::focusNavigationScopeOf(currentNode ? *currentNode : *document), currentNode);
|
| + RawPtr<Element> element = findFocusableElementAcrossFocusScopes(type, FocusNavigationScope::focusNavigationScopeOf(currentNode ? *currentNode : *document), currentNode);
|
|
|
| if (!element) {
|
| // If there's a RemoteFrame on the ancestor chain, we need to continue
|
| @@ -864,15 +864,15 @@ static void clearSelectionIfNeeded(LocalFrame* oldFocusedFrame, LocalFrame* newF
|
| selection.clear();
|
| }
|
|
|
| -bool FocusController::setFocusedElement(Element* element, PassRefPtrWillBeRawPtr<Frame> newFocusedFrame)
|
| +bool FocusController::setFocusedElement(Element* element, RawPtr<Frame> newFocusedFrame)
|
| {
|
| return setFocusedElement(element, newFocusedFrame, FocusParams(SelectionBehaviorOnFocus::None, WebFocusTypeNone, nullptr));
|
| }
|
|
|
| -bool FocusController::setFocusedElement(Element* element, PassRefPtrWillBeRawPtr<Frame> newFocusedFrame, const FocusParams& params)
|
| +bool FocusController::setFocusedElement(Element* element, RawPtr<Frame> newFocusedFrame, const FocusParams& params)
|
| {
|
| - RefPtrWillBeRawPtr<LocalFrame> oldFocusedFrame = focusedFrame();
|
| - RefPtrWillBeRawPtr<Document> oldDocument = oldFocusedFrame ? oldFocusedFrame->document() : nullptr;
|
| + RawPtr<LocalFrame> oldFocusedFrame = focusedFrame();
|
| + RawPtr<Document> oldDocument = oldFocusedFrame ? oldFocusedFrame->document() : nullptr;
|
|
|
| Element* oldFocusedElement = oldDocument ? oldDocument->focusedElement() : nullptr;
|
| if (element && oldFocusedElement == element)
|
| @@ -884,7 +884,7 @@ bool FocusController::setFocusedElement(Element* element, PassRefPtrWillBeRawPtr
|
|
|
| m_page->chromeClient().willSetInputMethodState();
|
|
|
| - RefPtrWillBeRawPtr<Document> newDocument = nullptr;
|
| + RawPtr<Document> newDocument = nullptr;
|
| if (element)
|
| newDocument = &element->document();
|
| else if (newFocusedFrame && newFocusedFrame->isLocalFrame())
|
| @@ -906,7 +906,7 @@ bool FocusController::setFocusedElement(Element* element, PassRefPtrWillBeRawPtr
|
| setFocusedFrame(newFocusedFrame);
|
|
|
| // Setting the focused node can result in losing our last reft to node when JS event handlers fire.
|
| - RefPtrWillBeRawPtr<Element> protect = element;
|
| + RawPtr<Element> protect = element;
|
| ALLOW_UNUSED_LOCAL(protect);
|
| if (newDocument) {
|
| bool successfullyFocused = newDocument->setFocusedElement(element, params);
|
|
|