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

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

Issue 405083003: Range.compareBoundaryPoints should throw a NotSupportedError when how has not expected value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take review comment into consideration Created 6 years, 5 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
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 Node* commonAncestorContainer() const; 65 Node* commonAncestorContainer() const;
66 static Node* commonAncestorContainer(Node* containerA, Node* containerB); 66 static Node* commonAncestorContainer(Node* containerA, Node* containerB);
67 void setStart(PassRefPtrWillBeRawPtr<Node> container, int offset, ExceptionS tate& = ASSERT_NO_EXCEPTION); 67 void setStart(PassRefPtrWillBeRawPtr<Node> container, int offset, ExceptionS tate& = ASSERT_NO_EXCEPTION);
68 void setEnd(PassRefPtrWillBeRawPtr<Node> container, int offset, ExceptionSta te& = ASSERT_NO_EXCEPTION); 68 void setEnd(PassRefPtrWillBeRawPtr<Node> container, int offset, ExceptionSta te& = ASSERT_NO_EXCEPTION);
69 void collapse(bool toStart); 69 void collapse(bool toStart);
70 bool isPointInRange(Node* refNode, int offset, ExceptionState&); 70 bool isPointInRange(Node* refNode, int offset, ExceptionState&);
71 short comparePoint(Node* refNode, int offset, ExceptionState&) const; 71 short comparePoint(Node* refNode, int offset, ExceptionState&) const;
72 enum CompareResults { NODE_BEFORE, NODE_AFTER, NODE_BEFORE_AND_AFTER, NODE_I NSIDE }; 72 enum CompareResults { NODE_BEFORE, NODE_AFTER, NODE_BEFORE_AND_AFTER, NODE_I NSIDE };
73 CompareResults compareNode(Node* refNode, ExceptionState&) const; 73 CompareResults compareNode(Node* refNode, ExceptionState&) const;
74 enum CompareHow { START_TO_START, START_TO_END, END_TO_END, END_TO_START }; 74 enum CompareHow { START_TO_START, START_TO_END, END_TO_END, END_TO_START };
75 short compareBoundaryPoints(CompareHow, const Range* sourceRange, ExceptionS tate&) const; 75 short compareBoundaryPoints(CompareHow, const PassRefPtrWillBeRawPtr<Range> sourceRange, ExceptionState&) const;
76 static short compareBoundaryPoints(Node* containerA, int offsetA, Node* cont ainerB, int offsetB, ExceptionState&); 76 static short compareBoundaryPoints(Node* containerA, int offsetA, Node* cont ainerB, int offsetB, ExceptionState&);
77 static short compareBoundaryPoints(const RangeBoundaryPoint& boundaryA, cons t RangeBoundaryPoint& boundaryB, ExceptionState&); 77 static short compareBoundaryPoints(const RangeBoundaryPoint& boundaryA, cons t RangeBoundaryPoint& boundaryB, ExceptionState&);
78 bool boundaryPointsValid() const; 78 bool boundaryPointsValid() const;
79 bool intersectsNode(Node* refNode, ExceptionState&); 79 bool intersectsNode(Node* refNode, ExceptionState&);
80 void deleteContents(ExceptionState&); 80 void deleteContents(ExceptionState&);
81 PassRefPtrWillBeRawPtr<DocumentFragment> extractContents(ExceptionState&); 81 PassRefPtrWillBeRawPtr<DocumentFragment> extractContents(ExceptionState&);
82 PassRefPtrWillBeRawPtr<DocumentFragment> cloneContents(ExceptionState&); 82 PassRefPtrWillBeRawPtr<DocumentFragment> cloneContents(ExceptionState&);
83 void insertNode(PassRefPtrWillBeRawPtr<Node>, ExceptionState&); 83 void insertNode(PassRefPtrWillBeRawPtr<Node>, ExceptionState&);
84 String toString() const; 84 String toString() const;
85 85
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 bool areRangesEqual(const Range*, const Range*); 175 bool areRangesEqual(const Range*, const Range*);
176 176
177 } // namespace 177 } // namespace
178 178
179 #ifndef NDEBUG 179 #ifndef NDEBUG
180 // Outside the WebCore namespace for ease of invocation from gdb. 180 // Outside the WebCore namespace for ease of invocation from gdb.
181 void showTree(const WebCore::Range*); 181 void showTree(const WebCore::Range*);
182 #endif 182 #endif
183 183
184 #endif 184 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698