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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Issue 2220873002: Add a fast-path for independent inherited properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added 2 more tests Created 4 years, 4 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) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 if (root && root->isV1() && root == insertionPoint->treeScope().rootNode()) { 270 if (root && root->isV1() && root == insertionPoint->treeScope().rootNode()) {
271 // This slot was in a shadow tree and got disconnected from the shadow r oot. 271 // This slot was in a shadow tree and got disconnected from the shadow r oot.
272 root->ensureSlotAssignment().slotRemoved(*this); 272 root->ensureSlotAssignment().slotRemoved(*this);
273 } 273 }
274 274
275 HTMLElement::removedFrom(insertionPoint); 275 HTMLElement::removedFrom(insertionPoint);
276 } 276 }
277 277
278 void HTMLSlotElement::willRecalcStyle(StyleRecalcChange change) 278 void HTMLSlotElement::willRecalcStyle(StyleRecalcChange change)
279 { 279 {
280 if (change < Inherit && getStyleChangeType() < SubtreeStyleChange) 280 if (change < IndependentInherit && getStyleChangeType() < SubtreeStyleChange )
281 return; 281 return;
282 282
283 for (auto& node : m_distributedNodes) 283 for (auto& node : m_distributedNodes)
284 node->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing: :create(StyleChangeReason::PropagateInheritChangeToDistributedNodes)); 284 node->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing: :create(StyleChangeReason::PropagateInheritChangeToDistributedNodes));
285 } 285 }
286 286
287 void HTMLSlotElement::updateDistributedNodesWithFallback() 287 void HTMLSlotElement::updateDistributedNodesWithFallback()
288 { 288 {
289 if (!m_distributedNodes.isEmpty()) 289 if (!m_distributedNodes.isEmpty())
290 return; 290 return;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 DEFINE_TRACE(HTMLSlotElement) 356 DEFINE_TRACE(HTMLSlotElement)
357 { 357 {
358 visitor->trace(m_assignedNodes); 358 visitor->trace(m_assignedNodes);
359 visitor->trace(m_distributedNodes); 359 visitor->trace(m_distributedNodes);
360 visitor->trace(m_oldDistributedNodes); 360 visitor->trace(m_oldDistributedNodes);
361 visitor->trace(m_distributedIndices); 361 visitor->trace(m_distributedIndices);
362 HTMLElement::trace(visitor); 362 HTMLElement::trace(visitor);
363 } 363 }
364 364
365 } // namespace blink 365 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698