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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 179293007: Remove deprecated focusedNode APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebDocument.h » ('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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2444 matching lines...) Expand 10 before | Expand all | Expand 10 after
2455 void WebViewImpl::setInitialFocus(bool reverse) 2455 void WebViewImpl::setInitialFocus(bool reverse)
2456 { 2456 {
2457 if (!m_page) 2457 if (!m_page)
2458 return; 2458 return;
2459 LocalFrame* frame = page()->focusController().focusedOrMainFrame(); 2459 LocalFrame* frame = page()->focusController().focusedOrMainFrame();
2460 if (Document* document = frame->document()) 2460 if (Document* document = frame->document())
2461 document->setFocusedElement(nullptr); 2461 document->setFocusedElement(nullptr);
2462 page()->focusController().setInitialFocus(reverse ? FocusTypeBackward : Focu sTypeForward); 2462 page()->focusController().setInitialFocus(reverse ? FocusTypeBackward : Focu sTypeForward);
2463 } 2463 }
2464 2464
2465 void WebViewImpl::clearFocusedNode()
2466 {
2467 // Deprecated API. Use clearFocusedElement instead.
2468 clearFocusedElement();
2469 }
2470
2471 void WebViewImpl::clearFocusedElement() 2465 void WebViewImpl::clearFocusedElement()
2472 { 2466 {
2473 RefPtr<LocalFrame> frame = focusedWebCoreFrame(); 2467 RefPtr<LocalFrame> frame = focusedWebCoreFrame();
2474 if (!frame) 2468 if (!frame)
2475 return; 2469 return;
2476 2470
2477 RefPtr<Document> document = frame->document(); 2471 RefPtr<Document> document = frame->document();
2478 if (!document) 2472 if (!document)
2479 return; 2473 return;
2480 2474
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
3981 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 3975 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
3982 3976
3983 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 3977 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
3984 return false; 3978 return false;
3985 3979
3986 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 3980 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
3987 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 3981 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
3988 } 3982 }
3989 3983
3990 } // namespace blink 3984 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698