| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |