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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 | « Source/core/dom/Element.cpp ('k') | Source/core/dom/EventDispatcher.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) 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 { 265 {
266 if (!element) 266 if (!element)
267 return; 267 return;
268 268
269 if (element->attached()) 269 if (element->attached())
270 element->detach(); 270 element->detach();
271 271
272 ASSERT(!element->nextSibling()); 272 ASSERT(!element->nextSibling());
273 ASSERT(!element->previousSibling()); 273 ASSERT(!element->previousSibling());
274 274
275 element->document()->removeFromTopLayer(element); 275 element->document().removeFromTopLayer(element);
276 element->setParentOrShadowHostNode(0); 276 element->setParentOrShadowHostNode(0);
277 } 277 }
278 278
279 inline void ElementRareData::resetStyleState() 279 inline void ElementRareData::resetStyleState()
280 { 280 {
281 setComputedStyle(0); 281 setComputedStyle(0);
282 setStyleAffectedByEmpty(false); 282 setStyleAffectedByEmpty(false);
283 setChildIndex(0); 283 setChildIndex(0);
284 } 284 }
285 285
286 inline void ElementRareData::resetDynamicRestyleObservations() 286 inline void ElementRareData::resetDynamicRestyleObservations()
287 { 287 {
288 setChildrenAffectedByHover(false); 288 setChildrenAffectedByHover(false);
289 setChildrenAffectedByActive(false); 289 setChildrenAffectedByActive(false);
290 setChildrenAffectedByDrag(false); 290 setChildrenAffectedByDrag(false);
291 setChildrenAffectedByFirstChildRules(false); 291 setChildrenAffectedByFirstChildRules(false);
292 setChildrenAffectedByLastChildRules(false); 292 setChildrenAffectedByLastChildRules(false);
293 setChildrenAffectedByDirectAdjacentRules(false); 293 setChildrenAffectedByDirectAdjacentRules(false);
294 setChildrenAffectedByForwardPositionalRules(false); 294 setChildrenAffectedByForwardPositionalRules(false);
295 setChildrenAffectedByBackwardPositionalRules(false); 295 setChildrenAffectedByBackwardPositionalRules(false);
296 } 296 }
297 297
298 } // namespace 298 } // namespace
299 299
300 #endif // ElementRareData_h 300 #endif // ElementRareData_h
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/EventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698