| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
| 3 * Copyright (C) 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 } | 434 } |
| 435 #endif | 435 #endif |
| 436 | 436 |
| 437 int TreeScope::refCount() const | 437 int TreeScope::refCount() const |
| 438 { | 438 { |
| 439 if (Node* root = rootNode()) | 439 if (Node* root = rootNode()) |
| 440 return root->refCount(); | 440 return root->refCount(); |
| 441 return 0; | 441 return 0; |
| 442 } | 442 } |
| 443 | 443 |
| 444 bool TreeScope::isInclusiveAncestorOf(const TreeScope* scope) const |
| 445 { |
| 446 ASSERT(scope); |
| 447 for (; scope; scope = scope->parentTreeScope()) { |
| 448 if (scope == this) |
| 449 return true; |
| 450 } |
| 451 return false; |
| 452 } |
| 453 |
| 444 } // namespace WebCore | 454 } // namespace WebCore |
| OLD | NEW |