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

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

Issue 2362463004: Missing sibling invalidation across removed element. (Closed)
Patch Set: Rebased Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-mutation-min-direct.html ('k') | 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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 void StyleEngine::scheduleInvalidationsForRemovedSibling(Element* beforeElement, Element& removedElement, Element& afterElement) 732 void StyleEngine::scheduleInvalidationsForRemovedSibling(Element* beforeElement, Element& removedElement, Element& afterElement)
733 { 733 {
734 unsigned affectedSiblings = afterElement.parentNode()->childrenAffectedByInd irectAdjacentRules() ? UINT_MAX : m_maxDirectAdjacentSelectors; 734 unsigned affectedSiblings = afterElement.parentNode()->childrenAffectedByInd irectAdjacentRules() ? UINT_MAX : m_maxDirectAdjacentSelectors;
735 735
736 ContainerNode* schedulingParent = afterElement.parentElementOrShadowRoot(); 736 ContainerNode* schedulingParent = afterElement.parentElementOrShadowRoot();
737 if (!schedulingParent) 737 if (!schedulingParent)
738 return; 738 return;
739 739
740 scheduleSiblingInvalidationsForElement(removedElement, *schedulingParent, 1) ; 740 scheduleSiblingInvalidationsForElement(removedElement, *schedulingParent, 1) ;
741 741
742 for (unsigned i = 2; beforeElement && i <= affectedSiblings; i++, beforeElem ent = ElementTraversal::previousSibling(*beforeElement)) 742 for (unsigned i = 1; beforeElement && i <= affectedSiblings; i++, beforeElem ent = ElementTraversal::previousSibling(*beforeElement))
743 scheduleSiblingInvalidationsForElement(*beforeElement, *schedulingParent , i); 743 scheduleSiblingInvalidationsForElement(*beforeElement, *schedulingParent , i);
744 } 744 }
745 745
746 void StyleEngine::scheduleNthPseudoInvalidations(ContainerNode& nthParent) 746 void StyleEngine::scheduleNthPseudoInvalidations(ContainerNode& nthParent)
747 { 747 {
748 InvalidationLists invalidationLists; 748 InvalidationLists invalidationLists;
749 ensureResolver().ensureUpdatedRuleFeatureSet().collectNthInvalidationSet(inv alidationLists); 749 ensureResolver().ensureUpdatedRuleFeatureSet().collectNthInvalidationSet(inv alidationLists);
750 m_styleInvalidator.scheduleInvalidationSetsForNode(invalidationLists, nthPar ent); 750 m_styleInvalidator.scheduleInvalidationSetsForNode(invalidationLists, nthPar ent);
751 } 751 }
752 752
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 909
910 DEFINE_TRACE_WRAPPERS(StyleEngine) 910 DEFINE_TRACE_WRAPPERS(StyleEngine)
911 { 911 {
912 for (auto sheet : m_injectedAuthorStyleSheets) { 912 for (auto sheet : m_injectedAuthorStyleSheets) {
913 visitor->traceWrappers(sheet); 913 visitor->traceWrappers(sheet);
914 } 914 }
915 visitor->traceWrappers(m_documentStyleSheetCollection); 915 visitor->traceWrappers(m_documentStyleSheetCollection);
916 } 916 }
917 917
918 } // namespace blink 918 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-mutation-min-direct.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698