| 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 2801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2812 WebTextDirection& end) const { | 2812 WebTextDirection& end) const { |
| 2813 const LocalFrame* frame = focusedLocalFrameInWidget(); | 2813 const LocalFrame* frame = focusedLocalFrameInWidget(); |
| 2814 if (!frame) | 2814 if (!frame) |
| 2815 return false; | 2815 return false; |
| 2816 | 2816 |
| 2817 const FrameSelection& selection = frame->selection(); | 2817 const FrameSelection& selection = frame->selection(); |
| 2818 if (!selection.isAvailable()) { | 2818 if (!selection.isAvailable()) { |
| 2819 // plugins/mouse-capture-inside-shadow.html reaches here. | 2819 // plugins/mouse-capture-inside-shadow.html reaches here. |
| 2820 return false; | 2820 return false; |
| 2821 } | 2821 } |
| 2822 |
| 2823 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 2824 // needs to be audited. See http://crbug.com/590369 for more details. |
| 2825 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 2826 |
| 2822 if (selection.selection().toNormalizedEphemeralRange().isNull()) | 2827 if (selection.selection().toNormalizedEphemeralRange().isNull()) |
| 2823 return false; | 2828 return false; |
| 2824 start = | 2829 start = |
| 2825 toWebTextDirection(primaryDirectionOf(*selection.start().anchorNode())); | 2830 toWebTextDirection(primaryDirectionOf(*selection.start().anchorNode())); |
| 2826 end = toWebTextDirection(primaryDirectionOf(*selection.end().anchorNode())); | 2831 end = toWebTextDirection(primaryDirectionOf(*selection.end().anchorNode())); |
| 2827 return true; | 2832 return true; |
| 2828 } | 2833 } |
| 2829 | 2834 |
| 2830 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as | 2835 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as |
| 2831 // well. This code needs to be refactored (http://crbug.com/629721). | 2836 // well. This code needs to be refactored (http://crbug.com/629721). |
| (...skipping 1910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4742 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4747 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4743 return nullptr; | 4748 return nullptr; |
| 4744 return focusedFrame; | 4749 return focusedFrame; |
| 4745 } | 4750 } |
| 4746 | 4751 |
| 4747 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4752 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4748 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4753 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4749 } | 4754 } |
| 4750 | 4755 |
| 4751 } // namespace blink | 4756 } // namespace blink |
| OLD | NEW |