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

Side by Side Diff: third_party/WebKit/Source/core/editing/VisiblePosition.cpp

Issue 2672413003: Out-of-line trace() methods of editing template types. (Closed)
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. 4 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 : m_positionWithAffinity(positionWithAffinity) 59 : m_positionWithAffinity(positionWithAffinity)
60 #if DCHECK_IS_ON() 60 #if DCHECK_IS_ON()
61 , 61 ,
62 m_domTreeVersion(positionWithAffinity.document()->domTreeVersion()), 62 m_domTreeVersion(positionWithAffinity.document()->domTreeVersion()),
63 m_styleVersion(positionWithAffinity.document()->styleVersion()) 63 m_styleVersion(positionWithAffinity.document()->styleVersion())
64 #endif 64 #endif
65 { 65 {
66 } 66 }
67 67
68 template <typename Strategy> 68 template <typename Strategy>
69 DEFINE_TRACE(VisiblePositionTemplate<Strategy>) {
70 visitor->trace(m_positionWithAffinity);
71 }
72
73 template <typename Strategy>
69 VisiblePositionTemplate<Strategy> VisiblePositionTemplate<Strategy>::create( 74 VisiblePositionTemplate<Strategy> VisiblePositionTemplate<Strategy>::create(
70 const PositionWithAffinityTemplate<Strategy>& positionWithAffinity) { 75 const PositionWithAffinityTemplate<Strategy>& positionWithAffinity) {
71 if (positionWithAffinity.isNull()) 76 if (positionWithAffinity.isNull())
72 return VisiblePositionTemplate<Strategy>(); 77 return VisiblePositionTemplate<Strategy>();
73 DCHECK(positionWithAffinity.isConnected()) << positionWithAffinity; 78 DCHECK(positionWithAffinity.isConnected()) << positionWithAffinity;
74 79
75 Document& document = *positionWithAffinity.document(); 80 Document& document = *positionWithAffinity.document();
76 DCHECK(!document.needsLayoutTreeUpdate()); 81 DCHECK(!document.needsLayoutTreeUpdate());
77 DocumentLifecycle::DisallowTransitionScope disallowTransition( 82 DocumentLifecycle::DisallowTransitionScope disallowTransition(
78 document.lifecycle()); 83 document.lifecycle());
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 return; 210 return;
206 } 211 }
207 DVLOG(0) << "Cannot showTree for (nil) VisiblePosition."; 212 DVLOG(0) << "Cannot showTree for (nil) VisiblePosition.";
208 } 213 }
209 214
210 void showTree(const blink::VisiblePosition& vpos) { 215 void showTree(const blink::VisiblePosition& vpos) {
211 vpos.showTreeForThis(); 216 vpos.showTreeForThis();
212 } 217 }
213 218
214 #endif 219 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698