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

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

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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/dom/PseudoElement.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, 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 // FIXME: This method is confusing (does it return anchorNode() or containerNode ()?) and should be renamed or removed 321 // FIXME: This method is confusing (does it return anchorNode() or containerNode ()?) and should be renamed or removed
322 Element* Position::element() const 322 Element* Position::element() const
323 { 323 {
324 Node* node = anchorNode(); 324 Node* node = anchorNode();
325 if (!node || node->isElementNode()) 325 if (!node || node->isElementNode())
326 return toElement(node); 326 return toElement(node);
327 return node->parentElement(); 327 return node->parentElement();
328 } 328 }
329 329
330 PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> Position::computedStyle() co nst 330 PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> Position::ensureComputedStyl e() const
331 { 331 {
332 Element* elem = element(); 332 Element* elem = element();
333 if (!elem) 333 if (!elem)
334 return nullptr; 334 return nullptr;
335 return CSSComputedStyleDeclaration::create(elem); 335 return CSSComputedStyleDeclaration::create(elem);
336 } 336 }
337 337
338 Position Position::previous(PositionMoveType moveType) const 338 Position Position::previous(PositionMoveType moveType) const
339 { 339 {
340 Node* node = deprecatedNode(); 340 Node* node = deprecatedNode();
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 pos.showTreeForThis(); 1366 pos.showTreeForThis();
1367 } 1367 }
1368 1368
1369 void showTree(const blink::Position* pos) 1369 void showTree(const blink::Position* pos)
1370 { 1370 {
1371 if (pos) 1371 if (pos)
1372 pos->showTreeForThis(); 1372 pos->showTreeForThis();
1373 } 1373 }
1374 1374
1375 #endif 1375 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Position.h ('k') | Source/core/dom/PseudoElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698