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

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

Issue 2559373003: Do not call updateDistribution() in Node::assingedSlotForBinding() (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 2282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 for (const auto& insertionPoint : insertionPoints) { 2293 for (const auto& insertionPoint : insertionPoints) {
2294 DCHECK(insertionPoint->containingShadowRoot()); 2294 DCHECK(insertionPoint->containingShadowRoot());
2295 if (!insertionPoint->containingShadowRoot()->isOpenOrV0()) 2295 if (!insertionPoint->containingShadowRoot()->isOpenOrV0())
2296 break; 2296 break;
2297 filteredInsertionPoints.append(insertionPoint); 2297 filteredInsertionPoints.append(insertionPoint);
2298 } 2298 }
2299 return StaticNodeList::adopt(filteredInsertionPoints); 2299 return StaticNodeList::adopt(filteredInsertionPoints);
2300 } 2300 }
2301 2301
2302 HTMLSlotElement* Node::assignedSlot() const { 2302 HTMLSlotElement* Node::assignedSlot() const {
2303 // assignedSlot doesn't needs to call updateDistribution().
kochi 2016/12/09 08:29:04 s/needs/need/
2303 DCHECK(!isPseudoElement()); 2304 DCHECK(!isPseudoElement());
2304 if (ShadowRoot* root = v1ShadowRootOfParent()) 2305 if (ShadowRoot* root = v1ShadowRootOfParent())
2305 return root->ensureSlotAssignment().findSlot(*this); 2306 return root->ensureSlotAssignment().findSlot(*this);
2306 return nullptr; 2307 return nullptr;
2307 } 2308 }
2308 2309
2309 HTMLSlotElement* Node::assignedSlotForBinding() { 2310 HTMLSlotElement* Node::assignedSlotForBinding() {
2310 updateDistribution(); 2311 // assignedSlot doesn't needs to call updateDistribution().
kochi 2016/12/09 08:29:04 Ditto.
2311 if (ShadowRoot* root = v1ShadowRootOfParent()) { 2312 if (ShadowRoot* root = v1ShadowRootOfParent()) {
2312 if (root->type() == ShadowRootType::Open) 2313 if (root->type() == ShadowRootType::Open)
2313 return root->ensureSlotAssignment().findSlot(*this); 2314 return root->ensureSlotAssignment().findSlot(*this);
2314 } 2315 }
2315 return nullptr; 2316 return nullptr;
2316 } 2317 }
2317 2318
2318 void Node::setFocused(bool flag) { 2319 void Node::setFocused(bool flag) {
2319 document().userActionElements().setFocused(this, flag); 2320 document().userActionElements().setFocused(this, flag);
2320 } 2321 }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2541 if (node) { 2542 if (node) {
2542 std::stringstream stream; 2543 std::stringstream stream;
2543 node->printNodePathTo(stream); 2544 node->printNodePathTo(stream);
2544 LOG(INFO) << stream.str(); 2545 LOG(INFO) << stream.str();
2545 } else { 2546 } else {
2546 LOG(INFO) << "Cannot showNodePath for <null>"; 2547 LOG(INFO) << "Cannot showNodePath for <null>";
2547 } 2548 }
2548 } 2549 }
2549 2550
2550 #endif 2551 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698