| 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 2636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2647 anchor = localFrame->view()->contentsToViewport(anchor); | 2647 anchor = localFrame->view()->contentsToViewport(anchor); |
| 2648 focus = localFrame->view()->contentsToViewport(focus); | 2648 focus = localFrame->view()->contentsToViewport(focus); |
| 2649 | 2649 |
| 2650 if (!selection.selection().isBaseFirst()) | 2650 if (!selection.selection().isBaseFirst()) |
| 2651 std::swap(anchor, focus); | 2651 std::swap(anchor, focus); |
| 2652 return true; | 2652 return true; |
| 2653 } | 2653 } |
| 2654 | 2654 |
| 2655 WebPlugin* WebViewImpl::focusedPluginIfInputMethodSupported(LocalFrame* frame) | 2655 WebPlugin* WebViewImpl::focusedPluginIfInputMethodSupported(LocalFrame* frame) |
| 2656 { | 2656 { |
| 2657 WebPluginContainerImpl* container = WebLocalFrameImpl::pluginContainerFromNo
de(frame, WebNode(focusedElement())); | 2657 WebPluginContainerImpl* container = WebLocalFrameImpl::currentPluginContaine
r(frame); |
| 2658 if (container && container->supportsInputMethod()) | 2658 if (container && container->supportsInputMethod()) |
| 2659 return container->plugin(); | 2659 return container->plugin(); |
| 2660 return nullptr; | 2660 return nullptr; |
| 2661 } | 2661 } |
| 2662 | 2662 |
| 2663 bool WebViewImpl::selectionTextDirection(WebTextDirection& start, WebTextDirecti
on& end) const | 2663 bool WebViewImpl::selectionTextDirection(WebTextDirection& start, WebTextDirecti
on& end) const |
| 2664 { | 2664 { |
| 2665 const Frame* frame = focusedCoreFrame(); | 2665 const Frame* frame = focusedCoreFrame(); |
| 2666 if (!frame || frame->isRemoteFrame()) | 2666 if (!frame || frame->isRemoteFrame()) |
| 2667 return false; | 2667 return false; |
| (...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4524 { | 4524 { |
| 4525 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4525 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4526 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4526 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4527 if (!page()) | 4527 if (!page()) |
| 4528 return 1; | 4528 return 1; |
| 4529 | 4529 |
| 4530 return page()->deviceScaleFactor(); | 4530 return page()->deviceScaleFactor(); |
| 4531 } | 4531 } |
| 4532 | 4532 |
| 4533 } // namespace blink | 4533 } // namespace blink |
| OLD | NEW |