OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2105 const StaticRangeVector* TargetRangesForInputEvent(const Node& node) { | 2105 const StaticRangeVector* TargetRangesForInputEvent(const Node& node) { |
2106 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets | 2106 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets |
2107 // needs to be audited. see http://crbug.com/590369 for more details. | 2107 // needs to be audited. see http://crbug.com/590369 for more details. |
2108 node.GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); | 2108 node.GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); |
2109 if (!HasRichlyEditableStyle(node)) | 2109 if (!HasRichlyEditableStyle(node)) |
2110 return nullptr; | 2110 return nullptr; |
2111 const EphemeralRange& range = | 2111 const EphemeralRange& range = |
2112 FirstEphemeralRangeOf(node.GetDocument() | 2112 FirstEphemeralRangeOf(node.GetDocument() |
2113 .GetFrame() | 2113 .GetFrame() |
2114 ->Selection() | 2114 ->Selection() |
2115 .ComputeVisibleSelectionInDOMTreeDeprecated()); | 2115 .ComputeVisibleSelectionInDOMTree()); |
2116 if (range.IsNull()) | 2116 if (range.IsNull()) |
2117 return nullptr; | 2117 return nullptr; |
2118 return new StaticRangeVector(1, StaticRange::Create(range)); | 2118 return new StaticRangeVector(1, StaticRange::Create(range)); |
2119 } | 2119 } |
2120 | 2120 |
2121 DispatchEventResult DispatchBeforeInputInsertText( | 2121 DispatchEventResult DispatchBeforeInputInsertText( |
2122 Node* target, | 2122 Node* target, |
2123 const String& data, | 2123 const String& data, |
2124 InputEvent::InputType input_type, | 2124 InputEvent::InputType input_type, |
2125 const StaticRangeVector* ranges) { | 2125 const StaticRangeVector* ranges) { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2204 return InputType::kDeleteSoftLineBackward; | 2204 return InputType::kDeleteSoftLineBackward; |
2205 if (granularity == kParagraphBoundary) | 2205 if (granularity == kParagraphBoundary) |
2206 return InputType::kDeleteHardLineBackward; | 2206 return InputType::kDeleteHardLineBackward; |
2207 return InputType::kDeleteContentBackward; | 2207 return InputType::kDeleteContentBackward; |
2208 default: | 2208 default: |
2209 return InputType::kNone; | 2209 return InputType::kNone; |
2210 } | 2210 } |
2211 } | 2211 } |
2212 | 2212 |
2213 } // namespace blink | 2213 } // namespace blink |
OLD | NEW |