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

Side by Side Diff: Source/core/dom/Position.cpp

Issue 205033007: Revert of Oilpan: Move CSSStyleDeclaration and subclasses to the heap using transistion types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/Position.h ('k') | Source/core/editing/ApplyStyleCommand.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) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 // FIXME: This method is confusing (does it return anchorNode() or containerNode ()?) and should be renamed or removed 279 // FIXME: This method is confusing (does it return anchorNode() or containerNode ()?) and should be renamed or removed
280 Element* Position::element() const 280 Element* Position::element() const
281 { 281 {
282 Node* n = anchorNode(); 282 Node* n = anchorNode();
283 while (n && !n->isElementNode()) 283 while (n && !n->isElementNode())
284 n = n->parentNode(); 284 n = n->parentNode();
285 return toElement(n); 285 return toElement(n);
286 } 286 }
287 287
288 PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> Position::computedStyle() co nst 288 PassRefPtr<CSSComputedStyleDeclaration> Position::computedStyle() const
289 { 289 {
290 Element* elem = element(); 290 Element* elem = element();
291 if (!elem) 291 if (!elem)
292 return nullptr; 292 return nullptr;
293 return CSSComputedStyleDeclaration::create(elem); 293 return CSSComputedStyleDeclaration::create(elem);
294 } 294 }
295 295
296 Position Position::previous(PositionMoveType moveType) const 296 Position Position::previous(PositionMoveType moveType) const
297 { 297 {
298 Node* node = deprecatedNode(); 298 Node* node = deprecatedNode();
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 pos.showTreeForThis(); 1388 pos.showTreeForThis();
1389 } 1389 }
1390 1390
1391 void showTree(const WebCore::Position* pos) 1391 void showTree(const WebCore::Position* pos)
1392 { 1392 {
1393 if (pos) 1393 if (pos)
1394 pos->showTreeForThis(); 1394 pos->showTreeForThis();
1395 } 1395 }
1396 1396
1397 #endif 1397 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Position.h ('k') | Source/core/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698