| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 2631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2642 if (!frame()) | 2642 if (!frame()) |
| 2643 return 0; | 2643 return 0; |
| 2644 Position position = | 2644 Position position = |
| 2645 frame()->selection().computeVisibleSelectionInDOMTreeDeprecated().base(); | 2645 frame()->selection().computeVisibleSelectionInDOMTreeDeprecated().base(); |
| 2646 return position.isNull() ? 0 : position.computeOffsetInContainerNode(); | 2646 return position.isNull() ? 0 : position.computeOffsetInContainerNode(); |
| 2647 } | 2647 } |
| 2648 | 2648 |
| 2649 Node* Internals::visibleSelectionFocusNode() { | 2649 Node* Internals::visibleSelectionFocusNode() { |
| 2650 if (!frame()) | 2650 if (!frame()) |
| 2651 return nullptr; | 2651 return nullptr; |
| 2652 Position position = frame()->selection().extent(); | 2652 Position position = frame() |
| 2653 ->selection() |
| 2654 .computeVisibleSelectionInDOMTreeDeprecated() |
| 2655 .extent(); |
| 2653 return position.isNull() ? nullptr : position.computeContainerNode(); | 2656 return position.isNull() ? nullptr : position.computeContainerNode(); |
| 2654 } | 2657 } |
| 2655 | 2658 |
| 2656 unsigned Internals::visibleSelectionFocusOffset() { | 2659 unsigned Internals::visibleSelectionFocusOffset() { |
| 2657 if (!frame()) | 2660 if (!frame()) |
| 2658 return 0; | 2661 return 0; |
| 2659 Position position = frame()->selection().extent(); | 2662 Position position = frame() |
| 2663 ->selection() |
| 2664 .computeVisibleSelectionInDOMTreeDeprecated() |
| 2665 .extent(); |
| 2660 return position.isNull() ? 0 : position.computeOffsetInContainerNode(); | 2666 return position.isNull() ? 0 : position.computeOffsetInContainerNode(); |
| 2661 } | 2667 } |
| 2662 | 2668 |
| 2663 ClientRect* Internals::selectionBounds(ExceptionState& exceptionState) { | 2669 ClientRect* Internals::selectionBounds(ExceptionState& exceptionState) { |
| 2664 if (!frame()) { | 2670 if (!frame()) { |
| 2665 exceptionState.throwDOMException( | 2671 exceptionState.throwDOMException( |
| 2666 InvalidAccessError, "The document's frame cannot be retrieved."); | 2672 InvalidAccessError, "The document's frame cannot be retrieved."); |
| 2667 return nullptr; | 2673 return nullptr; |
| 2668 } | 2674 } |
| 2669 | 2675 |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3172 | 3178 |
| 3173 void Internals::crash() { | 3179 void Internals::crash() { |
| 3174 CHECK(false) << "Intentional crash"; | 3180 CHECK(false) << "Intentional crash"; |
| 3175 } | 3181 } |
| 3176 | 3182 |
| 3177 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3183 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
| 3178 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3184 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
| 3179 } | 3185 } |
| 3180 | 3186 |
| 3181 } // namespace blink | 3187 } // namespace blink |
| OLD | NEW |