Chromium Code Reviews| 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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * | 10 * |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 772 DCHECK(isFocused()); | 772 DCHECK(isFocused()); |
| 773 return true; | 773 return true; |
| 774 } | 774 } |
| 775 | 775 |
| 776 bool Node::isInert() const { | 776 bool Node::isInert() const { |
| 777 const HTMLDialogElement* dialog = document().activeModalDialog(); | 777 const HTMLDialogElement* dialog = document().activeModalDialog(); |
| 778 if (dialog && this != document() && | 778 if (dialog && this != document() && |
| 779 (!canParticipateInFlatTree() || | 779 (!canParticipateInFlatTree() || |
| 780 !FlatTreeTraversal::containsIncludingPseudoElement(*dialog, *this))) | 780 !FlatTreeTraversal::containsIncludingPseudoElement(*dialog, *this))) |
| 781 return true; | 781 return true; |
| 782 | |
| 783 if (RuntimeEnabledFeatures::inertAttributeEnabled()) { | |
| 784 const Node* node = this; | |
| 785 do { | |
| 786 if (node->isElementNode() && | |
|
esprehn
2017/02/07 23:50:59
I think this probably wants to walk the composed t
aboxhall
2017/02/08 05:26:01
Done.
| |
| 787 toElement(node)->hasAttribute(HTMLNames::inertAttr)) | |
| 788 return true; | |
| 789 node = node->parentOrShadowHostElement(); | |
| 790 } while (node); | |
| 791 } | |
| 792 | |
| 782 return document().localOwner() && document().localOwner()->isInert(); | 793 return document().localOwner() && document().localOwner()->isInert(); |
| 783 } | 794 } |
| 784 | 795 |
| 785 unsigned Node::nodeIndex() const { | 796 unsigned Node::nodeIndex() const { |
| 786 const Node* tempNode = previousSibling(); | 797 const Node* tempNode = previousSibling(); |
| 787 unsigned count = 0; | 798 unsigned count = 0; |
| 788 for (count = 0; tempNode; count++) | 799 for (count = 0; tempNode; count++) |
| 789 tempNode = tempNode->previousSibling(); | 800 tempNode = tempNode->previousSibling(); |
| 790 return count; | 801 return count; |
| 791 } | 802 } |
| (...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2564 if (node) { | 2575 if (node) { |
| 2565 std::stringstream stream; | 2576 std::stringstream stream; |
| 2566 node->printNodePathTo(stream); | 2577 node->printNodePathTo(stream); |
| 2567 LOG(INFO) << stream.str(); | 2578 LOG(INFO) << stream.str(); |
| 2568 } else { | 2579 } else { |
| 2569 LOG(INFO) << "Cannot showNodePath for <null>"; | 2580 LOG(INFO) << "Cannot showNodePath for <null>"; |
| 2570 } | 2581 } |
| 2571 } | 2582 } |
| 2572 | 2583 |
| 2573 #endif | 2584 #endif |
| OLD | NEW |