| 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 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2555 if (!frame->firstRectForCharacterRange(offset + i, 1, webrect)) { | 2555 if (!frame->firstRectForCharacterRange(offset + i, 1, webrect)) { |
| 2556 DLOG(ERROR) << "Could not retrieve character rectangle at " << i; | 2556 DLOG(ERROR) << "Could not retrieve character rectangle at " << i; |
| 2557 return false; | 2557 return false; |
| 2558 } | 2558 } |
| 2559 result[i] = webrect; | 2559 result[i] = webrect; |
| 2560 } | 2560 } |
| 2561 bounds.swap(result); | 2561 bounds.swap(result); |
| 2562 return true; | 2562 return true; |
| 2563 } | 2563 } |
| 2564 | 2564 |
| 2565 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as | |
| 2566 // well. This code needs to be refactored (http://crbug.com/629721). | |
| 2567 void WebViewImpl::applyReplacementRange(const WebRange& range) { | |
| 2568 if (WebLocalFrame* frame = focusedFrame()) | |
| 2569 frame->selectRange(range); | |
| 2570 } | |
| 2571 | |
| 2572 // WebView -------------------------------------------------------------------- | 2565 // WebView -------------------------------------------------------------------- |
| 2573 | 2566 |
| 2574 WebSettingsImpl* WebViewImpl::settingsImpl() { | 2567 WebSettingsImpl* WebViewImpl::settingsImpl() { |
| 2575 if (!m_webSettings) | 2568 if (!m_webSettings) |
| 2576 m_webSettings = WTF::wrapUnique( | 2569 m_webSettings = WTF::wrapUnique( |
| 2577 new WebSettingsImpl(&m_page->settings(), m_devToolsEmulator.get())); | 2570 new WebSettingsImpl(&m_page->settings(), m_devToolsEmulator.get())); |
| 2578 DCHECK(m_webSettings); | 2571 DCHECK(m_webSettings); |
| 2579 return m_webSettings.get(); | 2572 return m_webSettings.get(); |
| 2580 } | 2573 } |
| 2581 | 2574 |
| (...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4168 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4161 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4169 return nullptr; | 4162 return nullptr; |
| 4170 return focusedFrame; | 4163 return focusedFrame; |
| 4171 } | 4164 } |
| 4172 | 4165 |
| 4173 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4166 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4174 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4167 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4175 } | 4168 } |
| 4176 | 4169 |
| 4177 } // namespace blink | 4170 } // namespace blink |
| OLD | NEW |