| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 { | 764 { |
| 765 DCHECK(focused()); | 765 DCHECK(focused()); |
| 766 return true; | 766 return true; |
| 767 } | 767 } |
| 768 | 768 |
| 769 bool Node::isInert() const | 769 bool Node::isInert() const |
| 770 { | 770 { |
| 771 const HTMLDialogElement* dialog = document().activeModalDialog(); | 771 const HTMLDialogElement* dialog = document().activeModalDialog(); |
| 772 if (dialog && this != document() && (!canParticipateInFlatTree() || !FlatTre
eTraversal::containsIncludingPseudoElement(*dialog, *this))) | 772 if (dialog && this != document() && (!canParticipateInFlatTree() || !FlatTre
eTraversal::containsIncludingPseudoElement(*dialog, *this))) |
| 773 return true; | 773 return true; |
| 774 |
| 775 if (RuntimeEnabledFeatures::inertAttributeEnabled()) { |
| 776 const Node* node = this; |
| 777 do { |
| 778 if (node->isElementNode() && toElement(node)->hasAttribute(HTMLNames
::inertAttr)) |
| 779 return true; |
| 780 node = node->parentOrShadowHostElement(); |
| 781 } while (node); |
| 782 } |
| 783 |
| 774 return document().localOwner() && document().localOwner()->isInert(); | 784 return document().localOwner() && document().localOwner()->isInert(); |
| 775 } | 785 } |
| 776 | 786 |
| 777 unsigned Node::nodeIndex() const | 787 unsigned Node::nodeIndex() const |
| 778 { | 788 { |
| 779 const Node* tempNode = previousSibling(); | 789 const Node* tempNode = previousSibling(); |
| 780 unsigned count = 0; | 790 unsigned count = 0; |
| 781 for (count = 0; tempNode; count++) | 791 for (count = 0; tempNode; count++) |
| 782 tempNode = tempNode->previousSibling(); | 792 tempNode = tempNode->previousSibling(); |
| 783 return count; | 793 return count; |
| (...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2482 | 2492 |
| 2483 void showNodePath(const blink::Node* node) | 2493 void showNodePath(const blink::Node* node) |
| 2484 { | 2494 { |
| 2485 if (node) | 2495 if (node) |
| 2486 node->showNodePathForThis(); | 2496 node->showNodePathForThis(); |
| 2487 else | 2497 else |
| 2488 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2498 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2489 } | 2499 } |
| 2490 | 2500 |
| 2491 #endif | 2501 #endif |
| OLD | NEW |