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 2823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2834 if (!frame->firstRectForCharacterRange(offset + i, 1, webrect)) { | 2834 if (!frame->firstRectForCharacterRange(offset + i, 1, webrect)) { |
2835 DLOG(ERROR) << "Could not retrieve character rectangle at " << i; | 2835 DLOG(ERROR) << "Could not retrieve character rectangle at " << i; |
2836 return false; | 2836 return false; |
2837 } | 2837 } |
2838 result[i] = webrect; | 2838 result[i] = webrect; |
2839 } | 2839 } |
2840 bounds.swap(result); | 2840 bounds.swap(result); |
2841 return true; | 2841 return true; |
2842 } | 2842 } |
2843 | 2843 |
2844 void WebViewImpl::applyReplacementRange(int start, int length) | 2844 void WebViewImpl::applyReplacementRange(const WebRange& range) |
2845 { | 2845 { |
2846 if (WebLocalFrame* frame = focusedFrame()) | 2846 if (WebLocalFrame* frame = focusedFrame()) |
2847 frame->selectRange(WebRange(start, length)); | 2847 frame->selectRange(range); |
2848 } | 2848 } |
2849 | 2849 |
2850 // WebView -------------------------------------------------------------------- | 2850 // WebView -------------------------------------------------------------------- |
2851 | 2851 |
2852 WebSettingsImpl* WebViewImpl::settingsImpl() | 2852 WebSettingsImpl* WebViewImpl::settingsImpl() |
2853 { | 2853 { |
2854 if (!m_webSettings) | 2854 if (!m_webSettings) |
2855 m_webSettings = wrapUnique(new WebSettingsImpl(&m_page->settings(), m_de
vToolsEmulator.get())); | 2855 m_webSettings = wrapUnique(new WebSettingsImpl(&m_page->settings(), m_de
vToolsEmulator.get())); |
2856 DCHECK(m_webSettings); | 2856 DCHECK(m_webSettings); |
2857 return m_webSettings.get(); | 2857 return m_webSettings.get(); |
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4598 return nullptr; | 4598 return nullptr; |
4599 return focusedFrame; | 4599 return focusedFrame; |
4600 } | 4600 } |
4601 | 4601 |
4602 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const | 4602 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const |
4603 { | 4603 { |
4604 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4604 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
4605 } | 4605 } |
4606 | 4606 |
4607 } // namespace blink | 4607 } // namespace blink |
OLD | NEW |