| 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 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2349 // well. This code needs to be refactored (http://crbug.com/629721). | 2349 // well. This code needs to be refactored (http://crbug.com/629721). |
| 2350 bool WebViewImpl::selectionBounds(WebRect& anchor, WebRect& focus) const { | 2350 bool WebViewImpl::selectionBounds(WebRect& anchor, WebRect& focus) const { |
| 2351 const Frame* frame = focusedCoreFrame(); | 2351 const Frame* frame = focusedCoreFrame(); |
| 2352 if (!frame || !frame->isLocalFrame()) | 2352 if (!frame || !frame->isLocalFrame()) |
| 2353 return false; | 2353 return false; |
| 2354 | 2354 |
| 2355 const LocalFrame* localFrame = toLocalFrame(frame); | 2355 const LocalFrame* localFrame = toLocalFrame(frame); |
| 2356 if (!localFrame) | 2356 if (!localFrame) |
| 2357 return false; | 2357 return false; |
| 2358 FrameSelection& selection = localFrame->selection(); | 2358 FrameSelection& selection = localFrame->selection(); |
| 2359 if (!selection.isAvailable() || selection.isNone()) { | 2359 if (!selection.isAvailable() || |
| 2360 selection.computeVisibleSelectionInDOMTreeDeprecated().isNone()) { |
| 2360 // plugins/mouse-capture-inside-shadow.html reaches here. | 2361 // plugins/mouse-capture-inside-shadow.html reaches here. |
| 2361 return false; | 2362 return false; |
| 2362 } | 2363 } |
| 2363 | 2364 |
| 2364 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 2365 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 2365 // needs to be audited. See http://crbug.com/590369 for more details. | 2366 // needs to be audited. See http://crbug.com/590369 for more details. |
| 2366 localFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 2367 localFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 2367 | 2368 |
| 2368 DocumentLifecycle::DisallowTransitionScope disallowTransition( | 2369 DocumentLifecycle::DisallowTransitionScope disallowTransition( |
| 2369 localFrame->document()->lifecycle()); | 2370 localFrame->document()->lifecycle()); |
| (...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4161 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4162 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4162 return nullptr; | 4163 return nullptr; |
| 4163 return focusedFrame; | 4164 return focusedFrame; |
| 4164 } | 4165 } |
| 4165 | 4166 |
| 4166 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4167 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4167 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4168 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4168 } | 4169 } |
| 4169 | 4170 |
| 4170 } // namespace blink | 4171 } // namespace blink |
| OLD | NEW |