| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 if (selection.isNone()) | 551 if (selection.isNone()) |
| 552 return false; | 552 return false; |
| 553 | 553 |
| 554 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 554 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 555 // needs to be audited. See http://crbug.com/590369 for more details. | 555 // needs to be audited. See http://crbug.com/590369 for more details. |
| 556 localFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 556 localFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 557 | 557 |
| 558 DocumentLifecycle::DisallowTransitionScope disallowTransition( | 558 DocumentLifecycle::DisallowTransitionScope disallowTransition( |
| 559 localFrame->document()->lifecycle()); | 559 localFrame->document()->lifecycle()); |
| 560 | 560 |
| 561 if (selection.isCaret()) { | 561 if (selection.computeVisibleSelectionInDOMTreeDeprecated().isCaret()) { |
| 562 anchor = focus = selection.absoluteCaretBounds(); | 562 anchor = focus = selection.absoluteCaretBounds(); |
| 563 } else { | 563 } else { |
| 564 const EphemeralRange selectedRange = | 564 const EphemeralRange selectedRange = |
| 565 selection.computeVisibleSelectionInDOMTree() | 565 selection.computeVisibleSelectionInDOMTree() |
| 566 .toNormalizedEphemeralRange(); | 566 .toNormalizedEphemeralRange(); |
| 567 if (selectedRange.isNull()) | 567 if (selectedRange.isNull()) |
| 568 return false; | 568 return false; |
| 569 anchor = localFrame->editor().firstRectForRange( | 569 anchor = localFrame->editor().firstRectForRange( |
| 570 EphemeralRange(selectedRange.startPosition())); | 570 EphemeralRange(selectedRange.startPosition())); |
| 571 focus = localFrame->editor().firstRectForRange( | 571 focus = localFrame->editor().firstRectForRange( |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 return nullptr; | 1137 return nullptr; |
| 1138 } | 1138 } |
| 1139 | 1139 |
| 1140 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1140 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
| 1141 if (!m_imeAcceptEvents) | 1141 if (!m_imeAcceptEvents) |
| 1142 return nullptr; | 1142 return nullptr; |
| 1143 return focusedLocalFrameInWidget(); | 1143 return focusedLocalFrameInWidget(); |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 } // namespace blink | 1146 } // namespace blink |
| OLD | NEW |