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

Side by Side Diff: Source/core/editing/htmlediting.h

Issue 182383012: Have positionInParentBeforeNode() / positionInParentAfterNode() take a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/VisibleUnits.cpp ('k') | Source/core/editing/htmlediting.cpp » ('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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 bool isTabSpanTextNode(const Node*); 102 bool isTabSpanTextNode(const Node*);
103 bool isMailBlockquote(const Node*); 103 bool isMailBlockquote(const Node*);
104 bool isRenderedTable(const Node*); 104 bool isRenderedTable(const Node*);
105 bool isRenderedTableElement(const Node*); 105 bool isRenderedTableElement(const Node*);
106 bool isTableCell(const Node*); 106 bool isTableCell(const Node*);
107 bool isEmptyTableCell(const Node*); 107 bool isEmptyTableCell(const Node*);
108 bool isTableStructureNode(const Node*); 108 bool isTableStructureNode(const Node*);
109 bool isListElement(Node*); 109 bool isListElement(Node*);
110 bool isListItem(const Node*); 110 bool isListItem(const Node*);
111 bool isNodeRendered(const Node*); 111 bool isNodeRendered(const Node*);
112 bool isNodeVisiblyContainedWithin(Node*, const Range*); 112 bool isNodeVisiblyContainedWithin(Node&, const Range&);
113 bool isRenderedAsNonInlineTableImageOrHR(const Node*); 113 bool isRenderedAsNonInlineTableImageOrHR(const Node*);
114 bool areIdenticalElements(const Node*, const Node*); 114 bool areIdenticalElements(const Node*, const Node*);
115 bool isNonTableCellHTMLBlockElement(const Node*); 115 bool isNonTableCellHTMLBlockElement(const Node*);
116 TextDirection directionOfEnclosingBlock(const Position&); 116 TextDirection directionOfEnclosingBlock(const Position&);
117 117
118 // ------------------------------------------------------------------------- 118 // -------------------------------------------------------------------------
119 // Position 119 // Position
120 // ------------------------------------------------------------------------- 120 // -------------------------------------------------------------------------
121 121
122 // Functions returning Position 122 // Functions returning Position
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // FIXME: isRichlyEditablePosition should also take EUpdateStyle. 158 // FIXME: isRichlyEditablePosition should also take EUpdateStyle.
159 bool isEditablePosition(const Position&, EditableType = ContentIsEditable, EUpda teStyle = UpdateStyle); 159 bool isEditablePosition(const Position&, EditableType = ContentIsEditable, EUpda teStyle = UpdateStyle);
160 bool isRichlyEditablePosition(const Position&, EditableType = ContentIsEditable) ; 160 bool isRichlyEditablePosition(const Position&, EditableType = ContentIsEditable) ;
161 bool lineBreakExistsAtPosition(const Position&); 161 bool lineBreakExistsAtPosition(const Position&);
162 bool isVisiblyAdjacent(const Position& first, const Position& second); 162 bool isVisiblyAdjacent(const Position& first, const Position& second);
163 bool isAtUnsplittableElement(const Position&); 163 bool isAtUnsplittableElement(const Position&);
164 164
165 // miscellaneous functions on Position 165 // miscellaneous functions on Position
166 166
167 unsigned numEnclosingMailBlockquotes(const Position&); 167 unsigned numEnclosingMailBlockquotes(const Position&);
168 void updatePositionForNodeRemoval(Position&, Node*); 168 void updatePositionForNodeRemoval(Position&, Node&);
169 169
170 // ------------------------------------------------------------------------- 170 // -------------------------------------------------------------------------
171 // VisiblePosition 171 // VisiblePosition
172 // ------------------------------------------------------------------------- 172 // -------------------------------------------------------------------------
173 173
174 // Functions returning VisiblePosition 174 // Functions returning VisiblePosition
175 175
176 VisiblePosition firstEditablePositionAfterPositionInRoot(const Position&, Node*) ; 176 VisiblePosition firstEditablePositionAfterPositionInRoot(const Position&, Node*) ;
177 VisiblePosition lastEditablePositionBeforePositionInRoot(const Position&, Node*) ; 177 VisiblePosition lastEditablePositionBeforePositionInRoot(const Position&, Node*) ;
178 VisiblePosition visiblePositionBeforeNode(Node*); 178 VisiblePosition visiblePositionBeforeNode(Node&);
179 VisiblePosition visiblePositionAfterNode(Node*); 179 VisiblePosition visiblePositionAfterNode(Node&);
180 180
181 bool lineBreakExistsAtVisiblePosition(const VisiblePosition&); 181 bool lineBreakExistsAtVisiblePosition(const VisiblePosition&);
182 182
183 int comparePositions(const VisiblePosition&, const VisiblePosition&); 183 int comparePositions(const VisiblePosition&, const VisiblePosition&);
184 184
185 int indexForVisiblePosition(const VisiblePosition&, RefPtr<ContainerNode>& scope ); 185 int indexForVisiblePosition(const VisiblePosition&, RefPtr<ContainerNode>& scope );
186 VisiblePosition visiblePositionForIndex(int index, ContainerNode* scope); 186 VisiblePosition visiblePositionForIndex(int index, ContainerNode* scope);
187 187
188 // ------------------------------------------------------------------------- 188 // -------------------------------------------------------------------------
189 // Range 189 // Range
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // FIXME: this is required until 6853027 is fixed and text checking can do t his for us. 252 // FIXME: this is required until 6853027 is fixed and text checking can do t his for us.
253 return character == '\'' || character == rightSingleQuotationMark || charact er == hebrewPunctuationGershayim; 253 return character == '\'' || character == rightSingleQuotationMark || charact er == hebrewPunctuationGershayim;
254 } 254 }
255 255
256 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap h, bool endIsEndOfParagraph); 256 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap h, bool endIsEndOfParagraph);
257 const String& nonBreakingSpaceString(); 257 const String& nonBreakingSpaceString();
258 258
259 } 259 }
260 260
261 #endif 261 #endif
OLDNEW
« no previous file with comments | « Source/core/editing/VisibleUnits.cpp ('k') | Source/core/editing/htmlediting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698