| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |