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

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

Issue 217563003: Turn styleWillChange |newStyle| into a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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) 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 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 ASSERT_NOT_REACHED(); 1812 ASSERT_NOT_REACHED();
1813 } 1813 }
1814 return result; 1814 return result;
1815 } 1815 }
1816 1816
1817 void RenderBlockFlow::createFloatingObjects() 1817 void RenderBlockFlow::createFloatingObjects()
1818 { 1818 {
1819 m_floatingObjects = adoptPtr(new FloatingObjects(this, isHorizontalWritingMo de())); 1819 m_floatingObjects = adoptPtr(new FloatingObjects(this, isHorizontalWritingMo de()));
1820 } 1820 }
1821 1821
1822 void RenderBlockFlow::styleWillChange(StyleDifference diff, const RenderStyle* n ewStyle) 1822 void RenderBlockFlow::styleWillChange(StyleDifference diff, const RenderStyle& n ewStyle)
1823 { 1823 {
1824 RenderStyle* oldStyle = style(); 1824 RenderStyle* oldStyle = style();
1825 s_canPropagateFloatIntoSibling = oldStyle ? !isFloatingOrOutOfFlowPositioned () && !avoidsFloats() : false; 1825 s_canPropagateFloatIntoSibling = oldStyle ? !isFloatingOrOutOfFlowPositioned () && !avoidsFloats() : false;
1826 if (oldStyle && parent() && diff == StyleDifferenceLayout && oldStyle->posit ion() != newStyle->position() 1826 if (oldStyle && parent() && diff == StyleDifferenceLayout && oldStyle->posit ion() != newStyle.position()
1827 && containsFloats() && !isFloating() && !isOutOfFlowPositioned() && newS tyle->hasOutOfFlowPosition()) 1827 && containsFloats() && !isFloating() && !isOutOfFlowPositioned() && newS tyle.hasOutOfFlowPosition())
1828 markAllDescendantsWithFloatsForLayout(); 1828 markAllDescendantsWithFloatsForLayout();
1829 1829
1830 RenderBlock::styleWillChange(diff, newStyle); 1830 RenderBlock::styleWillChange(diff, newStyle);
1831 } 1831 }
1832 1832
1833 void RenderBlockFlow::styleDidChange(StyleDifference diff, const RenderStyle* ol dStyle) 1833 void RenderBlockFlow::styleDidChange(StyleDifference diff, const RenderStyle* ol dStyle)
1834 { 1834 {
1835 RenderBlock::styleDidChange(diff, oldStyle); 1835 RenderBlock::styleDidChange(diff, oldStyle);
1836 1836
1837 // After our style changed, if we lose our ability to propagate floats into next sibling 1837 // After our style changed, if we lose our ability to propagate floats into next sibling
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
2797 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() 2797 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData()
2798 { 2798 {
2799 if (m_rareData) 2799 if (m_rareData)
2800 return *m_rareData; 2800 return *m_rareData;
2801 2801
2802 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); 2802 m_rareData = adoptPtr(new RenderBlockFlowRareData(this));
2803 return *m_rareData; 2803 return *m_rareData;
2804 } 2804 }
2805 2805
2806 } // namespace WebCore 2806 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698