| 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 2332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2343 focused->selection().rootEditableElementOrDocumentElement(); | 2343 focused->selection().rootEditableElementOrDocumentElement(); |
| 2344 DCHECK(editable); | 2344 DCHECK(editable); |
| 2345 | 2345 |
| 2346 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 2346 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 2347 // needs to be audited. See http://crbug.com/590369 for more details. | 2347 // needs to be audited. See http://crbug.com/590369 for more details. |
| 2348 editable->document().updateStyleAndLayoutIgnorePendingStylesheets(); | 2348 editable->document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 2349 | 2349 |
| 2350 return PlainTextRange::create(*editable, range); | 2350 return PlainTextRange::create(*editable, range); |
| 2351 } | 2351 } |
| 2352 | 2352 |
| 2353 WebTextInputInfo WebViewImpl::textInputInfo() { | |
| 2354 LocalFrame* focused = focusedLocalFrameInWidget(); | |
| 2355 if (!focused) | |
| 2356 return WebTextInputInfo(); | |
| 2357 return focused->inputMethodController().textInputInfo(); | |
| 2358 } | |
| 2359 | |
| 2360 WebTextInputType WebViewImpl::textInputType() { | |
| 2361 LocalFrame* focused = focusedLocalFrameInWidget(); | |
| 2362 if (!focused) | |
| 2363 return WebTextInputTypeNone; | |
| 2364 return focused->inputMethodController().textInputType(); | |
| 2365 } | |
| 2366 | |
| 2367 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as | 2353 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as |
| 2368 // well. This code needs to be refactored (http://crbug.com/629721). | 2354 // well. This code needs to be refactored (http://crbug.com/629721). |
| 2369 bool WebViewImpl::selectionBounds(WebRect& anchor, WebRect& focus) const { | 2355 bool WebViewImpl::selectionBounds(WebRect& anchor, WebRect& focus) const { |
| 2370 const Frame* frame = focusedCoreFrame(); | 2356 const Frame* frame = focusedCoreFrame(); |
| 2371 if (!frame || !frame->isLocalFrame()) | 2357 if (!frame || !frame->isLocalFrame()) |
| 2372 return false; | 2358 return false; |
| 2373 | 2359 |
| 2374 const LocalFrame* localFrame = toLocalFrame(frame); | 2360 const LocalFrame* localFrame = toLocalFrame(frame); |
| 2375 if (!localFrame) | 2361 if (!localFrame) |
| 2376 return false; | 2362 return false; |
| (...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4217 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4203 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4218 return nullptr; | 4204 return nullptr; |
| 4219 return focusedFrame; | 4205 return focusedFrame; |
| 4220 } | 4206 } |
| 4221 | 4207 |
| 4222 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4208 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4223 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4209 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4224 } | 4210 } |
| 4225 | 4211 |
| 4226 } // namespace blink | 4212 } // namespace blink |
| OLD | NEW |