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

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

Issue 2715913002: Introduce rootEditableElementOrTreeScopeRootNodeOf() as replacement of FrameSelection member (Closed)
Patch Set: 2017-02-24T16:18:33 Created 3 years, 10 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 | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | 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, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // Node 74 // Node
75 // ------------------------------------------------------------------------- 75 // -------------------------------------------------------------------------
76 76
77 CORE_EXPORT bool hasEditableStyle(const Node&); 77 CORE_EXPORT bool hasEditableStyle(const Node&);
78 CORE_EXPORT bool hasRichlyEditableStyle(const Node&); 78 CORE_EXPORT bool hasRichlyEditableStyle(const Node&);
79 CORE_EXPORT bool isRootEditableElement(const Node&); 79 CORE_EXPORT bool isRootEditableElement(const Node&);
80 CORE_EXPORT Element* rootEditableElement(const Node&); 80 CORE_EXPORT Element* rootEditableElement(const Node&);
81 Element* rootEditableElementOf(const Position&); 81 Element* rootEditableElementOf(const Position&);
82 Element* rootEditableElementOf(const PositionInFlatTree&); 82 Element* rootEditableElementOf(const PositionInFlatTree&);
83 Element* rootEditableElementOf(const VisiblePosition&); 83 Element* rootEditableElementOf(const VisiblePosition&);
84 ContainerNode* rootEditableElementOrTreeScopeRootNodeOf(
85 const VisibleSelection&);
84 // highestEditableRoot returns the highest editable node. If the 86 // highestEditableRoot returns the highest editable node. If the
85 // rootEditableElement of the speicified Position is <body>, this returns the 87 // rootEditableElement of the speicified Position is <body>, this returns the
86 // <body>. Otherwise, this searches ancestors for the highest editable node in 88 // <body>. Otherwise, this searches ancestors for the highest editable node in
87 // defiance of editing boundaries. This returns a Document if designMode="on" 89 // defiance of editing boundaries. This returns a Document if designMode="on"
88 // and the specified Position is not in the <body>. 90 // and the specified Position is not in the <body>.
89 CORE_EXPORT ContainerNode* highestEditableRoot( 91 CORE_EXPORT ContainerNode* highestEditableRoot(
90 const Position&, 92 const Position&,
91 Element* (*)(const Position&) = rootEditableElementOf, 93 Element* (*)(const Position&) = rootEditableElementOf,
92 bool (*)(const Node&) = hasEditableStyle); 94 bool (*)(const Node&) = hasEditableStyle);
93 ContainerNode* highestEditableRoot(const PositionInFlatTree&); 95 ContainerNode* highestEditableRoot(const PositionInFlatTree&);
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 DispatchEventResult dispatchBeforeInputDataTransfer(Node*, 423 DispatchEventResult dispatchBeforeInputDataTransfer(Node*,
422 InputEvent::InputType, 424 InputEvent::InputType,
423 DataTransfer*); 425 DataTransfer*);
424 426
425 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection, 427 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection,
426 TextGranularity); 428 TextGranularity);
427 429
428 } // namespace blink 430 } // namespace blink
429 431
430 #endif 432 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698