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

Side by Side Diff: Source/core/editing/VisibleSelection.cpp

Issue 421293004: Move Node::enclosingBlockFlowElement() to htmlediting.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits Created 6 years, 4 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/VisiblePosition.cpp ('k') | Source/core/editing/htmlediting.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, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 266
267 static PassRefPtrWillBeRawPtr<Range> makeSearchRange(const Position& pos) 267 static PassRefPtrWillBeRawPtr<Range> makeSearchRange(const Position& pos)
268 { 268 {
269 Node* n = pos.deprecatedNode(); 269 Node* n = pos.deprecatedNode();
270 if (!n) 270 if (!n)
271 return nullptr; 271 return nullptr;
272 Document& d = n->document(); 272 Document& d = n->document();
273 Node* de = d.documentElement(); 273 Node* de = d.documentElement();
274 if (!de) 274 if (!de)
275 return nullptr; 275 return nullptr;
276 Node* boundary = n->enclosingBlockFlowElement(); 276 Node* boundary = enclosingBlockFlowElement(*n);
277 if (!boundary) 277 if (!boundary)
278 return nullptr; 278 return nullptr;
279 279
280 RefPtrWillBeRawPtr<Range> searchRange(Range::create(d)); 280 RefPtrWillBeRawPtr<Range> searchRange(Range::create(d));
281 TrackExceptionState exceptionState; 281 TrackExceptionState exceptionState;
282 282
283 Position start(pos.parentAnchoredEquivalent()); 283 Position start(pos.parentAnchoredEquivalent());
284 searchRange->selectNodeContents(boundary, exceptionState); 284 searchRange->selectNodeContents(boundary, exceptionState);
285 searchRange->setStart(start.containerNode(), start.offsetInContainerNode(), exceptionState); 285 searchRange->setStart(start.containerNode(), start.offsetInContainerNode(), exceptionState);
286 286
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 sel.showTreeForThis(); 857 sel.showTreeForThis();
858 } 858 }
859 859
860 void showTree(const blink::VisibleSelection* sel) 860 void showTree(const blink::VisibleSelection* sel)
861 { 861 {
862 if (sel) 862 if (sel)
863 sel->showTreeForThis(); 863 sel->showTreeForThis();
864 } 864 }
865 865
866 #endif 866 #endif
OLDNEW
« no previous file with comments | « Source/core/editing/VisiblePosition.cpp ('k') | Source/core/editing/htmlediting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698