| 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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 | 595 |
| 596 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 596 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 597 // needs to be audited. See http://crbug.com/590369 for more details. | 597 // needs to be audited. See http://crbug.com/590369 for more details. |
| 598 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 598 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 599 | 599 |
| 600 FrameSelection& selection = frame->selection(); | 600 FrameSelection& selection = frame->selection(); |
| 601 if (selection.computeVisibleSelectionInDOMTree() | 601 if (selection.computeVisibleSelectionInDOMTree() |
| 602 .toNormalizedEphemeralRange() | 602 .toNormalizedEphemeralRange() |
| 603 .isNull()) | 603 .isNull()) |
| 604 return false; | 604 return false; |
| 605 start = | 605 start = toWebTextDirection( |
| 606 toWebTextDirection(primaryDirectionOf(*selection.start().anchorNode())); | 606 primaryDirectionOf(*selection.computeVisibleSelectionInDOMTreeDeprecated() |
| 607 .start() |
| 608 .anchorNode())); |
| 607 end = toWebTextDirection( | 609 end = toWebTextDirection( |
| 608 primaryDirectionOf(*selection.computeVisibleSelectionInDOMTreeDeprecated() | 610 primaryDirectionOf(*selection.computeVisibleSelectionInDOMTreeDeprecated() |
| 609 .end() | 611 .end() |
| 610 .anchorNode())); | 612 .anchorNode())); |
| 611 return true; | 613 return true; |
| 612 } | 614 } |
| 613 | 615 |
| 614 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This | 616 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This |
| 615 // code needs to be refactored (http://crbug.com/629721). | 617 // code needs to be refactored (http://crbug.com/629721). |
| 616 bool WebFrameWidgetImpl::isSelectionAnchorFirst() const { | 618 bool WebFrameWidgetImpl::isSelectionAnchorFirst() const { |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 return nullptr; | 1142 return nullptr; |
| 1141 } | 1143 } |
| 1142 | 1144 |
| 1143 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1145 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
| 1144 if (!m_imeAcceptEvents) | 1146 if (!m_imeAcceptEvents) |
| 1145 return nullptr; | 1147 return nullptr; |
| 1146 return focusedLocalFrameInWidget(); | 1148 return focusedLocalFrameInWidget(); |
| 1147 } | 1149 } |
| 1148 | 1150 |
| 1149 } // namespace blink | 1151 } // namespace blink |
| OLD | NEW |