| 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 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2360 return false; | 2360 return false; |
| 2361 } | 2361 } |
| 2362 | 2362 |
| 2363 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 2363 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 2364 // needs to be audited. See http://crbug.com/590369 for more details. | 2364 // needs to be audited. See http://crbug.com/590369 for more details. |
| 2365 localFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 2365 localFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 2366 | 2366 |
| 2367 DocumentLifecycle::DisallowTransitionScope disallowTransition( | 2367 DocumentLifecycle::DisallowTransitionScope disallowTransition( |
| 2368 localFrame->document()->lifecycle()); | 2368 localFrame->document()->lifecycle()); |
| 2369 | 2369 |
| 2370 if (selection.isCaret()) { | 2370 if (selection.computeVisibleSelectionInDOMTreeDeprecated().isCaret()) { |
| 2371 anchor = focus = selection.absoluteCaretBounds(); | 2371 anchor = focus = selection.absoluteCaretBounds(); |
| 2372 } else { | 2372 } else { |
| 2373 const EphemeralRange selectedRange = | 2373 const EphemeralRange selectedRange = |
| 2374 selection.computeVisibleSelectionInDOMTreeDeprecated() | 2374 selection.computeVisibleSelectionInDOMTreeDeprecated() |
| 2375 .toNormalizedEphemeralRange(); | 2375 .toNormalizedEphemeralRange(); |
| 2376 if (selectedRange.isNull()) | 2376 if (selectedRange.isNull()) |
| 2377 return false; | 2377 return false; |
| 2378 anchor = localFrame->editor().firstRectForRange( | 2378 anchor = localFrame->editor().firstRectForRange( |
| 2379 EphemeralRange(selectedRange.startPosition())); | 2379 EphemeralRange(selectedRange.startPosition())); |
| 2380 focus = localFrame->editor().firstRectForRange( | 2380 focus = localFrame->editor().firstRectForRange( |
| (...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4142 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) | 4142 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) |
| 4143 return nullptr; | 4143 return nullptr; |
| 4144 return focusedFrame; | 4144 return focusedFrame; |
| 4145 } | 4145 } |
| 4146 | 4146 |
| 4147 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { | 4147 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { |
| 4148 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4148 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4149 } | 4149 } |
| 4150 | 4150 |
| 4151 } // namespace blink | 4151 } // namespace blink |
| OLD | NEW |