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

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

Issue 184023003: Make InlineBox::renderer() and related subclass methods return reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No reference reassignment. Created 6 years, 9 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 | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | 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) 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 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 TextRun RenderBlockFlow::constructTextRun(RenderObject* context, const Font& fon t, const String& string, RenderStyle* style, TextRun::ExpansionBehavior expansio n, TextRunFlags flags) 2803 TextRun RenderBlockFlow::constructTextRun(RenderObject* context, const Font& fon t, const String& string, RenderStyle* style, TextRun::ExpansionBehavior expansio n, TextRunFlags flags)
2804 { 2804 {
2805 bool hasStrongDirectionality; 2805 bool hasStrongDirectionality;
2806 return constructTextRun(context, font, string, style, 2806 return constructTextRun(context, font, string, style,
2807 determineDirectionality(string, hasStrongDirectionality), 2807 determineDirectionality(string, hasStrongDirectionality),
2808 expansion, flags); 2808 expansion, flags);
2809 } 2809 }
2810 2810
2811 RootInlineBox* RenderBlockFlow::createRootInlineBox() 2811 RootInlineBox* RenderBlockFlow::createRootInlineBox()
2812 { 2812 {
2813 return new RootInlineBox(this); 2813 return new RootInlineBox(*this);
2814 } 2814 }
2815 2815
2816 void RenderBlockFlow::createMultiColumnFlowThreadIfNeeded() 2816 void RenderBlockFlow::createMultiColumnFlowThreadIfNeeded()
2817 { 2817 {
2818 if ((style()->hasAutoColumnCount() && style()->hasAutoColumnWidth()) || !doc ument().regionBasedColumnsEnabled()) 2818 if ((style()->hasAutoColumnCount() && style()->hasAutoColumnWidth()) || !doc ument().regionBasedColumnsEnabled())
2819 return; 2819 return;
2820 2820
2821 if (multiColumnFlowThread()) 2821 if (multiColumnFlowThread())
2822 return; 2822 return;
2823 2823
2824 setChildrenInline(false); 2824 setChildrenInline(false);
2825 RenderMultiColumnFlowThread* flowThread = RenderMultiColumnFlowThread::creat eAnonymous(document(), style()); 2825 RenderMultiColumnFlowThread* flowThread = RenderMultiColumnFlowThread::creat eAnonymous(document(), style());
2826 RenderBlock::addChild(flowThread); 2826 RenderBlock::addChild(flowThread);
2827 RenderBlockFlowRareData& rareData = ensureRareData(); 2827 RenderBlockFlowRareData& rareData = ensureRareData();
2828 ASSERT(!rareData.m_multiColumnFlowThread); 2828 ASSERT(!rareData.m_multiColumnFlowThread);
2829 rareData.m_multiColumnFlowThread = flowThread; 2829 rareData.m_multiColumnFlowThread = flowThread;
2830 } 2830 }
2831 2831
2832 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() 2832 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData()
2833 { 2833 {
2834 if (m_rareData) 2834 if (m_rareData)
2835 return *m_rareData; 2835 return *m_rareData;
2836 2836
2837 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); 2837 m_rareData = adoptPtr(new RenderBlockFlowRareData(this));
2838 return *m_rareData; 2838 return *m_rareData;
2839 } 2839 }
2840 2840
2841 } // namespace WebCore 2841 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698