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

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

Issue 1916283003: [K6] Replace bind() + GCed pointers with retainedRef() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_5c
Patch Set: Rebase Created 4 years, 7 months 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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 node->setChildNeedsStyleInvalidation(); 606 node->setChildNeedsStyleInvalidation();
607 document().scheduleLayoutTreeUpdateIfNeeded(); 607 document().scheduleLayoutTreeUpdateIfNeeded();
608 } 608 }
609 609
610 void Node::markAncestorsWithChildNeedsDistributionRecalc() 610 void Node::markAncestorsWithChildNeedsDistributionRecalc()
611 { 611 {
612 ScriptForbiddenScope forbidScriptDuringRawIteration; 612 ScriptForbiddenScope forbidScriptDuringRawIteration;
613 if (RuntimeEnabledFeatures::shadowDOMV1Enabled() && inShadowIncludingDocumen t() && !document().childNeedsDistributionRecalc()) { 613 if (RuntimeEnabledFeatures::shadowDOMV1Enabled() && inShadowIncludingDocumen t() && !document().childNeedsDistributionRecalc()) {
614 // TODO(hayato): Support a non-document composed tree. 614 // TODO(hayato): Support a non-document composed tree.
615 // TODO(hayato): Enqueue a task only if a 'slotchange' event listner is registered in the document composed tree. 615 // TODO(hayato): Enqueue a task only if a 'slotchange' event listner is registered in the document composed tree.
616 Microtask::enqueueMicrotask(WTF::bind(&Document::updateDistribution, &do cument())); 616 Microtask::enqueueMicrotask(WTF::bind(&Document::updateDistribution, ret ainedRef(&document())));
617 } 617 }
618 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode()) 618 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode())
619 node->setChildNeedsDistributionRecalc(); 619 node->setChildNeedsDistributionRecalc();
620 document().scheduleLayoutTreeUpdateIfNeeded(); 620 document().scheduleLayoutTreeUpdateIfNeeded();
621 } 621 }
622 622
623 inline void Node::setStyleChange(StyleChangeType changeType) 623 inline void Node::setStyleChange(StyleChangeType changeType)
624 { 624 {
625 m_nodeFlags = (m_nodeFlags & ~StyleChangeMask) | changeType; 625 m_nodeFlags = (m_nodeFlags & ~StyleChangeMask) | changeType;
626 } 626 }
(...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 2332
2333 void showNodePath(const blink::Node* node) 2333 void showNodePath(const blink::Node* node)
2334 { 2334 {
2335 if (node) 2335 if (node)
2336 node->showNodePathForThis(); 2336 node->showNodePathForThis();
2337 else 2337 else
2338 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2338 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2339 } 2339 }
2340 2340
2341 #endif 2341 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ExecutionContext.cpp ('k') | third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698