| 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 } | 787 } |
| 788 | 788 |
| 789 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This | 789 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This |
| 790 // code needs to be refactored (http://crbug.com/629721). | 790 // code needs to be refactored (http://crbug.com/629721). |
| 791 bool WebFrameWidgetImpl::selectionTextDirection(WebTextDirection& start, | 791 bool WebFrameWidgetImpl::selectionTextDirection(WebTextDirection& start, |
| 792 WebTextDirection& end) const { | 792 WebTextDirection& end) const { |
| 793 const LocalFrame* frame = focusedLocalFrameInWidget(); | 793 const LocalFrame* frame = focusedLocalFrameInWidget(); |
| 794 if (!frame) | 794 if (!frame) |
| 795 return false; | 795 return false; |
| 796 | 796 |
| 797 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 798 // needs to be audited. See http://crbug.com/590369 for more details. |
| 799 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 800 |
| 797 FrameSelection& selection = frame->selection(); | 801 FrameSelection& selection = frame->selection(); |
| 798 if (selection.selection().toNormalizedEphemeralRange().isNull()) | 802 if (selection.selection().toNormalizedEphemeralRange().isNull()) |
| 799 return false; | 803 return false; |
| 800 start = | 804 start = |
| 801 toWebTextDirection(primaryDirectionOf(*selection.start().anchorNode())); | 805 toWebTextDirection(primaryDirectionOf(*selection.start().anchorNode())); |
| 802 end = toWebTextDirection(primaryDirectionOf(*selection.end().anchorNode())); | 806 end = toWebTextDirection(primaryDirectionOf(*selection.end().anchorNode())); |
| 803 return true; | 807 return true; |
| 804 } | 808 } |
| 805 | 809 |
| 806 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This | 810 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1518 return flags; | 1522 return flags; |
| 1519 } | 1523 } |
| 1520 | 1524 |
| 1521 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1525 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
| 1522 if (!m_imeAcceptEvents) | 1526 if (!m_imeAcceptEvents) |
| 1523 return nullptr; | 1527 return nullptr; |
| 1524 return focusedLocalFrameInWidget(); | 1528 return focusedLocalFrameInWidget(); |
| 1525 } | 1529 } |
| 1526 | 1530 |
| 1527 } // namespace blink | 1531 } // namespace blink |
| OLD | NEW |