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

Side by Side Diff: Source/core/layout/LayoutBlock.cpp

Issue 1294233004: Subtree caching implementation in blink-core (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: s/setSelfNeedsRepaint/setNeedsRepaint/ Created 5 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 | Annotate | Revision Log
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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 startOfContinuations = inlineElementContinuation->node()->layoutObject() ; 361 startOfContinuations = inlineElementContinuation->node()->layoutObject() ;
362 } else if (LayoutObject* firstChild = block.firstChild()) { 362 } else if (LayoutObject* firstChild = block.firstChild()) {
363 // This block is the anonymous containing block of an inline element con tinuation. 363 // This block is the anonymous containing block of an inline element con tinuation.
364 if (firstChild->isElementContinuation()) 364 if (firstChild->isElementContinuation())
365 startOfContinuations = firstChild->node()->layoutObject(); 365 startOfContinuations = firstChild->node()->layoutObject();
366 } 366 }
367 if (startOfContinuations && startOfContinuations->styleRef().outlineStyleIsA uto()) 367 if (startOfContinuations && startOfContinuations->styleRef().outlineStyleIsA uto())
368 startOfContinuations->invalidateDisplayItemClient(*startOfContinuations) ; 368 startOfContinuations->invalidateDisplayItemClient(*startOfContinuations) ;
369 } 369 }
370 370
371 void LayoutBlock::invalidateDisplayItemClients(const LayoutBoxModelObject& paint InvalidationContainer) const 371 void LayoutBlock::invalidateDisplayItemClients(const LayoutBoxModelObject& paint InvalidationContainer)
372 { 372 {
373 LayoutBox::invalidateDisplayItemClients(paintInvalidationContainer); 373 LayoutBox::invalidateDisplayItemClients(paintInvalidationContainer);
374 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); 374 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
375 invalidateDisplayItemClientForStartOfContinuationsIfNeeded(*this); 375 invalidateDisplayItemClientForStartOfContinuationsIfNeeded(*this);
376 } 376 }
377 377
378 bool LayoutBlock::clearRepaintFlagsOfSubtrees()
379 {
380 bool result = LayoutBox::clearRepaintFlagsOfSubtrees();
381 if (TrackedLayoutBoxListHashSet* positionedObjects = this->positionedObjects ()) {
382 for (auto o : *positionedObjects)
383 result &= o->clearRepaintFlagsRecursively();
384 }
385 return result;
386 }
387
378 void LayoutBlock::addChildIgnoringContinuation(LayoutObject* newChild, LayoutObj ect* beforeChild) 388 void LayoutBlock::addChildIgnoringContinuation(LayoutObject* newChild, LayoutObj ect* beforeChild)
379 { 389 {
380 if (beforeChild && beforeChild->parent() != this) { 390 if (beforeChild && beforeChild->parent() != this) {
381 LayoutObject* beforeChildContainer = beforeChild->parent(); 391 LayoutObject* beforeChildContainer = beforeChild->parent();
382 while (beforeChildContainer->parent() != this) 392 while (beforeChildContainer->parent() != this)
383 beforeChildContainer = beforeChildContainer->parent(); 393 beforeChildContainer = beforeChildContainer->parent();
384 ASSERT(beforeChildContainer); 394 ASSERT(beforeChildContainer);
385 395
386 if (beforeChildContainer->isAnonymous()) { 396 if (beforeChildContainer->isAnonymous()) {
387 // If the requested beforeChild is not one of our children, then thi s is because 397 // If the requested beforeChild is not one of our children, then thi s is because
(...skipping 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after
2918 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 2928 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
2919 { 2929 {
2920 showLayoutObject(); 2930 showLayoutObject();
2921 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 2931 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
2922 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 2932 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
2923 } 2933 }
2924 2934
2925 #endif 2935 #endif
2926 2936
2927 } // namespace blink 2937 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698