| 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 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2332 focused->selection().rootEditableElementOrDocumentElement(); | 2332 focused->selection().rootEditableElementOrDocumentElement(); |
| 2333 DCHECK(editable); | 2333 DCHECK(editable); |
| 2334 | 2334 |
| 2335 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 2335 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 2336 // needs to be audited. See http://crbug.com/590369 for more details. | 2336 // needs to be audited. See http://crbug.com/590369 for more details. |
| 2337 editable->document().updateStyleAndLayoutIgnorePendingStylesheets(); | 2337 editable->document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 2338 | 2338 |
| 2339 return PlainTextRange::create(*editable, range); | 2339 return PlainTextRange::create(*editable, range); |
| 2340 } | 2340 } |
| 2341 | 2341 |
| 2342 WebTextInputInfo WebViewImpl::textInputInfo() { | |
| 2343 LocalFrame* focused = focusedLocalFrameInWidget(); | |
| 2344 if (!focused) | |
| 2345 return WebTextInputInfo(); | |
| 2346 return focused->inputMethodController().textInputInfo(); | |
| 2347 } | |
| 2348 | |
| 2349 WebTextInputType WebViewImpl::textInputType() { | |
| 2350 LocalFrame* focused = focusedLocalFrameInWidget(); | |
| 2351 if (!focused) | |
| 2352 return WebTextInputTypeNone; | |
| 2353 return focused->inputMethodController().textInputType(); | |
| 2354 } | |
| 2355 | |
| 2356 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as | 2342 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as |
| 2357 // well. This code needs to be refactored (http://crbug.com/629721). | 2343 // well. This code needs to be refactored (http://crbug.com/629721). |
| 2358 bool WebViewImpl::selectionBounds(WebRect& anchor, WebRect& focus) const { | 2344 bool WebViewImpl::selectionBounds(WebRect& anchor, WebRect& focus) const { |
| 2359 const Frame* frame = focusedCoreFrame(); | 2345 const Frame* frame = focusedCoreFrame(); |
| 2360 if (!frame || !frame->isLocalFrame()) | 2346 if (!frame || !frame->isLocalFrame()) |
| 2361 return false; | 2347 return false; |
| 2362 | 2348 |
| 2363 const LocalFrame* localFrame = toLocalFrame(frame); | 2349 const LocalFrame* localFrame = toLocalFrame(frame); |
| 2364 if (!localFrame) | 2350 if (!localFrame) |
| 2365 return false; | 2351 return false; |
| (...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4202 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4188 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4203 return nullptr; | 4189 return nullptr; |
| 4204 return focusedFrame; | 4190 return focusedFrame; |
| 4205 } | 4191 } |
| 4206 | 4192 |
| 4207 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4193 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4208 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4194 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4209 } | 4195 } |
| 4210 | 4196 |
| 4211 } // namespace blink | 4197 } // namespace blink |
| OLD | NEW |