Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 1514233003: Make assignedSlot return null for a slot in a closed shadow tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v1-slots
Patch Set: rebased Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 return StaticNodeList::adopt(filteredInsertionPoints); 2209 return StaticNodeList::adopt(filteredInsertionPoints);
2210 } 2210 }
2211 2211
2212 HTMLSlotElement* Node::assignedSlot() const 2212 HTMLSlotElement* Node::assignedSlot() const
2213 { 2213 {
2214 ASSERT(!needsDistributionRecalc()); 2214 ASSERT(!needsDistributionRecalc());
2215 Element* parent = parentElement(); 2215 Element* parent = parentElement();
2216 if (!parent) 2216 if (!parent)
2217 return nullptr; 2217 return nullptr;
2218 if (ElementShadow* shadow = parent->shadow()) { 2218 if (ElementShadow* shadow = parent->shadow()) {
2219 if (shadow->isV1()) 2219 if (shadow->isV1() && shadow->isOpen())
2220 return shadow->assignedSlotFor(*this); 2220 return shadow->assignedSlotFor(*this);
2221 } 2221 }
2222 return nullptr; 2222 return nullptr;
2223 } 2223 }
2224 2224
2225 void Node::setFocus(bool flag) 2225 void Node::setFocus(bool flag)
2226 { 2226 {
2227 document().userActionElements().setFocused(this, flag); 2227 document().userActionElements().setFocused(this, flag);
2228 } 2228 }
2229 2229
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
2370 2370
2371 void showNodePath(const blink::Node* node) 2371 void showNodePath(const blink::Node* node)
2372 { 2372 {
2373 if (node) 2373 if (node)
2374 node->showNodePathForThis(); 2374 node->showNodePathForThis();
2375 else 2375 else
2376 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2376 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2377 } 2377 }
2378 2378
2379 #endif 2379 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698