| 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 541 |
| 542 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This | 542 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This |
| 543 // code needs to be refactored (http://crbug.com/629721). | 543 // code needs to be refactored (http://crbug.com/629721). |
| 544 bool WebFrameWidgetImpl::selectionBounds(WebRect& anchor, | 544 bool WebFrameWidgetImpl::selectionBounds(WebRect& anchor, |
| 545 WebRect& focus) const { | 545 WebRect& focus) const { |
| 546 const LocalFrame* localFrame = focusedLocalFrameInWidget(); | 546 const LocalFrame* localFrame = focusedLocalFrameInWidget(); |
| 547 if (!localFrame) | 547 if (!localFrame) |
| 548 return false; | 548 return false; |
| 549 | 549 |
| 550 FrameSelection& selection = localFrame->selection(); | 550 FrameSelection& selection = localFrame->selection(); |
| 551 if (selection.isNone()) | 551 if (selection.computeVisibleSelectionInDOMTreeDeprecated().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.computeVisibleSelectionInDOMTreeDeprecated().isCaret()) { | 561 if (selection.computeVisibleSelectionInDOMTreeDeprecated().isCaret()) { |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 return nullptr; | 1142 return nullptr; |
| 1143 } | 1143 } |
| 1144 | 1144 |
| 1145 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1145 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
| 1146 if (!m_imeAcceptEvents) | 1146 if (!m_imeAcceptEvents) |
| 1147 return nullptr; | 1147 return nullptr; |
| 1148 return focusedLocalFrameInWidget(); | 1148 return focusedLocalFrameInWidget(); |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 } // namespace blink | 1151 } // namespace blink |
| OLD | NEW |