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

Side by Side Diff: Source/core/rendering/RenderBlockFlow.cpp

Issue 264963004: Mark when we may have been invalidated to early out on repaintTreeAfterLayout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 next = child->nextSiblingBox(); 899 next = child->nextSiblingBox();
900 900
901 // FIXME: this should only be set from clearNeedsLayout crbug.com/361250 901 // FIXME: this should only be set from clearNeedsLayout crbug.com/361250
902 child->setLayoutDidGetCalled(true); 902 child->setLayoutDidGetCalled(true);
903 903
904 if (childToExclude == child) 904 if (childToExclude == child)
905 continue; // Skip this child, since it will be positioned by the spe cialized subclass (fieldsets and ruby runs). 905 continue; // Skip this child, since it will be positioned by the spe cialized subclass (fieldsets and ruby runs).
906 906
907 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, child); 907 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, child);
908 908
909 child->setMayNeedInvalidation(true);
910
909 if (child->isOutOfFlowPositioned()) { 911 if (child->isOutOfFlowPositioned()) {
910 child->containingBlock()->insertPositionedObject(child); 912 child->containingBlock()->insertPositionedObject(child);
911 adjustPositionedBlock(child, marginInfo); 913 adjustPositionedBlock(child, marginInfo);
912 continue; 914 continue;
913 } 915 }
914 if (child->isFloating()) { 916 if (child->isFloating()) {
915 insertFloatingObject(child); 917 insertFloatingObject(child);
916 adjustFloatingBlock(marginInfo); 918 adjustFloatingBlock(marginInfo);
917 continue; 919 continue;
918 } 920 }
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 FloatingObjectSetIterator end = floatingObjectSet.end(); 2310 FloatingObjectSetIterator end = floatingObjectSet.end();
2309 // Now walk through the set of unpositioned floats and place them. 2311 // Now walk through the set of unpositioned floats and place them.
2310 for (; it != end; ++it) { 2312 for (; it != end; ++it) {
2311 FloatingObject* floatingObject = *it; 2313 FloatingObject* floatingObject = *it;
2312 // The containing block is responsible for positioning floats, so if we have floats in our 2314 // The containing block is responsible for positioning floats, so if we have floats in our
2313 // list that come from somewhere else, do not attempt to position them. 2315 // list that come from somewhere else, do not attempt to position them.
2314 if (floatingObject->renderer()->containingBlock() != this) 2316 if (floatingObject->renderer()->containingBlock() != this)
2315 continue; 2317 continue;
2316 2318
2317 RenderBox* childBox = floatingObject->renderer(); 2319 RenderBox* childBox = floatingObject->renderer();
2320 childBox->setMayNeedInvalidation(true);
2318 2321
2319 LayoutUnit childLogicalLeftMargin = style()->isLeftToRightDirection() ? marginStartForChild(childBox) : marginEndForChild(childBox); 2322 LayoutUnit childLogicalLeftMargin = style()->isLeftToRightDirection() ? marginStartForChild(childBox) : marginEndForChild(childBox);
2320 LayoutRect oldRect = childBox->frameRect(); 2323 LayoutRect oldRect = childBox->frameRect();
2321 2324
2322 if (childBox->style()->clear() & CLEFT) 2325 if (childBox->style()->clear() & CLEFT)
2323 logicalTop = max(lowestFloatLogicalBottom(FloatingObject::FloatLeft) , logicalTop); 2326 logicalTop = max(lowestFloatLogicalBottom(FloatingObject::FloatLeft) , logicalTop);
2324 if (childBox->style()->clear() & CRIGHT) 2327 if (childBox->style()->clear() & CRIGHT)
2325 logicalTop = max(lowestFloatLogicalBottom(FloatingObject::FloatRight ), logicalTop); 2328 logicalTop = max(lowestFloatLogicalBottom(FloatingObject::FloatRight ), logicalTop);
2326 2329
2327 LayoutPoint floatLogicalLocation = computeLogicalLocationForFloat(floati ngObject, logicalTop); 2330 LayoutPoint floatLogicalLocation = computeLogicalLocationForFloat(floati ngObject, logicalTop);
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2793 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() 2796 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData()
2794 { 2797 {
2795 if (m_rareData) 2798 if (m_rareData)
2796 return *m_rareData; 2799 return *m_rareData;
2797 2800
2798 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); 2801 m_rareData = adoptPtr(new RenderBlockFlowRareData(this));
2799 return *m_rareData; 2802 return *m_rareData;
2800 } 2803 }
2801 2804
2802 } // namespace WebCore 2805 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698