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

Side by Side Diff: Source/core/dom/Range.h

Issue 541633004: Avoid temporary range allocation in FrameSelection::respondToNodeModification. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments. Created 6 years, 3 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 | « no previous file | Source/core/dom/Range.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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no)
4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
5 * (C) 2001 Peter Kelly (pmk@post.com) 5 * (C) 2001 Peter Kelly (pmk@post.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool isPointInRange(Node* refNode, int offset, ExceptionState&); 71 bool isPointInRange(Node* refNode, int offset, ExceptionState&);
72 short comparePoint(Node* refNode, int offset, ExceptionState&) const; 72 short comparePoint(Node* refNode, int offset, ExceptionState&) const;
73 enum CompareResults { NODE_BEFORE, NODE_AFTER, NODE_BEFORE_AND_AFTER, NODE_I NSIDE }; 73 enum CompareResults { NODE_BEFORE, NODE_AFTER, NODE_BEFORE_AND_AFTER, NODE_I NSIDE };
74 CompareResults compareNode(Node* refNode, ExceptionState&) const; 74 CompareResults compareNode(Node* refNode, ExceptionState&) const;
75 enum CompareHow { START_TO_START, START_TO_END, END_TO_END, END_TO_START }; 75 enum CompareHow { START_TO_START, START_TO_END, END_TO_END, END_TO_START };
76 short compareBoundaryPoints(CompareHow, const Range* sourceRange, ExceptionS tate&) const; 76 short compareBoundaryPoints(CompareHow, const Range* sourceRange, ExceptionS tate&) const;
77 static short compareBoundaryPoints(Node* containerA, int offsetA, Node* cont ainerB, int offsetB, ExceptionState&); 77 static short compareBoundaryPoints(Node* containerA, int offsetA, Node* cont ainerB, int offsetB, ExceptionState&);
78 static short compareBoundaryPoints(const RangeBoundaryPoint& boundaryA, cons t RangeBoundaryPoint& boundaryB, ExceptionState&); 78 static short compareBoundaryPoints(const RangeBoundaryPoint& boundaryA, cons t RangeBoundaryPoint& boundaryB, ExceptionState&);
79 bool boundaryPointsValid() const; 79 bool boundaryPointsValid() const;
80 bool intersectsNode(Node* refNode, ExceptionState&); 80 bool intersectsNode(Node* refNode, ExceptionState&);
81 static bool intersectsNode(Node* refNode, const Position& start, const Posit ion& end, ExceptionState&);
81 void deleteContents(ExceptionState&); 82 void deleteContents(ExceptionState&);
82 PassRefPtrWillBeRawPtr<DocumentFragment> extractContents(ExceptionState&); 83 PassRefPtrWillBeRawPtr<DocumentFragment> extractContents(ExceptionState&);
83 PassRefPtrWillBeRawPtr<DocumentFragment> cloneContents(ExceptionState&); 84 PassRefPtrWillBeRawPtr<DocumentFragment> cloneContents(ExceptionState&);
84 void insertNode(PassRefPtrWillBeRawPtr<Node>, ExceptionState&); 85 void insertNode(PassRefPtrWillBeRawPtr<Node>, ExceptionState&);
85 String toString() const; 86 String toString() const;
86 87
87 String toHTML() const; 88 String toHTML() const;
88 String text() const; 89 String text() const;
89 90
90 PassRefPtrWillBeRawPtr<DocumentFragment> createContextualFragment(const Stri ng& html, ExceptionState&); 91 PassRefPtrWillBeRawPtr<DocumentFragment> createContextualFragment(const Stri ng& html, ExceptionState&);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 bool areRangesEqual(const Range*, const Range*); 177 bool areRangesEqual(const Range*, const Range*);
177 178
178 } // namespace blink 179 } // namespace blink
179 180
180 #ifndef NDEBUG 181 #ifndef NDEBUG
181 // Outside the WebCore namespace for ease of invocation from gdb. 182 // Outside the WebCore namespace for ease of invocation from gdb.
182 void showTree(const blink::Range*); 183 void showTree(const blink::Range*);
183 #endif 184 #endif
184 185
185 #endif // Range_h 186 #endif // Range_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Range.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698