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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 PassRefPtr<CSSComputedStyleDeclaration> Position::computedStyle() const | 288 PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> Position::computedStyle() co
nst |
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 Loading... |
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 |
OLD | NEW |