Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 2849573002: Prune ComputeVisibleSelectionInDOMTreeDeprecated from TargetRangesForInputEvent (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698