| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 Node* n = anchorNode(); | 281 Node* n = anchorNode(); |
| 282 while (n && !n->isElementNode()) | 282 while (n && !n->isElementNode()) |
| 283 n = n->parentNode(); | 283 n = n->parentNode(); |
| 284 return toElement(n); | 284 return toElement(n); |
| 285 } | 285 } |
| 286 | 286 |
| 287 PassRefPtr<CSSComputedStyleDeclaration> Position::computedStyle() const | 287 PassRefPtr<CSSComputedStyleDeclaration> Position::computedStyle() const |
| 288 { | 288 { |
| 289 Element* elem = element(); | 289 Element* elem = element(); |
| 290 if (!elem) | 290 if (!elem) |
| 291 return 0; | 291 return nullptr; |
| 292 return CSSComputedStyleDeclaration::create(elem); | 292 return CSSComputedStyleDeclaration::create(elem); |
| 293 } | 293 } |
| 294 | 294 |
| 295 Position Position::previous(PositionMoveType moveType) const | 295 Position Position::previous(PositionMoveType moveType) const |
| 296 { | 296 { |
| 297 Node* node = deprecatedNode(); | 297 Node* node = deprecatedNode(); |
| 298 if (!node) | 298 if (!node) |
| 299 return *this; | 299 return *this; |
| 300 | 300 |
| 301 int offset = deprecatedEditingOffset(); | 301 int offset = deprecatedEditingOffset(); |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 pos.showTreeForThis(); | 1382 pos.showTreeForThis(); |
| 1383 } | 1383 } |
| 1384 | 1384 |
| 1385 void showTree(const WebCore::Position* pos) | 1385 void showTree(const WebCore::Position* pos) |
| 1386 { | 1386 { |
| 1387 if (pos) | 1387 if (pos) |
| 1388 pos->showTreeForThis(); | 1388 pos->showTreeForThis(); |
| 1389 } | 1389 } |
| 1390 | 1390 |
| 1391 #endif | 1391 #endif |
| OLD | NEW |