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

Side by Side Diff: Source/WebCore/rendering/RenderRegion.cpp

Issue 13679002: Add StyleChangeState to get rid of a bunch of static state in the render tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 } 243 }
244 244
245 bool RenderRegion::shouldHaveAutoLogicalHeight() const 245 bool RenderRegion::shouldHaveAutoLogicalHeight() const
246 { 246 {
247 bool hasSpecifiedEndpointsForHeight = style()->logicalTop().isSpecified() && style()->logicalBottom().isSpecified(); 247 bool hasSpecifiedEndpointsForHeight = style()->logicalTop().isSpecified() && style()->logicalBottom().isSpecified();
248 bool hasAnchoredEndpointsForHeight = isOutOfFlowPositioned() && hasSpecified EndpointsForHeight; 248 bool hasAnchoredEndpointsForHeight = isOutOfFlowPositioned() && hasSpecified EndpointsForHeight;
249 return style()->logicalHeight().isAuto() && !hasAnchoredEndpointsForHeight; 249 return style()->logicalHeight().isAuto() && !hasAnchoredEndpointsForHeight;
250 } 250 }
251 251
252 void RenderRegion::styleDidChange(StyleDifference diff, const RenderStyle* oldSt yle) 252 void RenderRegion::styleDidChange(StyleDifference diff, const RenderStyle* oldSt yle, const StyleChangeState& state)
253 { 253 {
254 RenderBlock::styleDidChange(diff, oldStyle); 254 RenderBlock::styleDidChange(diff, oldStyle, state);
255 255
256 // If the region is not attached to any thread, there is no need to check 256 // If the region is not attached to any thread, there is no need to check
257 // whether the region has region styling since no content will be displayed 257 // whether the region has region styling since no content will be displayed
258 // into the region. 258 // into the region.
259 if (!m_flowThread) { 259 if (!m_flowThread) {
260 setHasCustomRegionStyle(false); 260 setHasCustomRegionStyle(false);
261 return; 261 return;
262 } 262 }
263 263
264 checkRegionStyle(); 264 checkRegionStyle();
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 if (!hasOverrideHeight()) 648 if (!hasOverrideHeight())
649 return; 649 return;
650 650
651 LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPadd ingLogicalHeight(); 651 LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPadd ingLogicalHeight();
652 ASSERT(newLogicalHeight < LayoutUnit::max() / 2); 652 ASSERT(newLogicalHeight < LayoutUnit::max() / 2);
653 if (newLogicalHeight > logicalHeight()) 653 if (newLogicalHeight > logicalHeight())
654 setLogicalHeight(newLogicalHeight); 654 setLogicalHeight(newLogicalHeight);
655 } 655 }
656 656
657 } // namespace WebCore 657 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698