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

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

Issue 23668002: Avoid leaking ThreadingPrimitives.h from StackStats.h when collection is off. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
« no previous file with comments | « Source/core/rendering/RenderReplica.cpp ('k') | Source/core/rendering/RenderScrollbarPart.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 ASSERT(parentRuby && parentRuby->isRuby()); 209 ASSERT(parentRuby && parentRuby->isRuby());
210 RenderRubyRun* rr = new RenderRubyRun(); 210 RenderRubyRun* rr = new RenderRubyRun();
211 rr->setDocumentForAnonymous(parentRuby->document()); 211 rr->setDocumentForAnonymous(parentRuby->document());
212 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parentRuby->style(), INLINE_BLOCK); 212 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parentRuby->style(), INLINE_BLOCK);
213 rr->setStyle(newStyle.release()); 213 rr->setStyle(newStyle.release());
214 return rr; 214 return rr;
215 } 215 }
216 216
217 RenderObject* RenderRubyRun::layoutSpecialExcludedChild(bool relayoutChildren, S ubtreeLayoutScope& layoutScope) 217 RenderObject* RenderRubyRun::layoutSpecialExcludedChild(bool relayoutChildren, S ubtreeLayoutScope& layoutScope)
218 { 218 {
219 StackStats::LayoutCheckPoint layoutCheckPoint;
220 // Don't bother positioning the RenderRubyRun yet. 219 // Don't bother positioning the RenderRubyRun yet.
221 RenderRubyText* rt = rubyText(); 220 RenderRubyText* rt = rubyText();
222 if (!rt) 221 if (!rt)
223 return 0; 222 return 0;
224 if (relayoutChildren) 223 if (relayoutChildren)
225 layoutScope.setChildNeedsLayout(rt); 224 layoutScope.setChildNeedsLayout(rt);
226 rt->layoutIfNeeded(); 225 rt->layoutIfNeeded();
227 return rt; 226 return rt;
228 } 227 }
229 228
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // We can overhang the ruby by no more than half the width of the neighborin g text 309 // We can overhang the ruby by no more than half the width of the neighborin g text
311 // and no more than half the font size. 310 // and no more than half the font size.
312 int halfWidthOfFontSize = rubyText->style(firstLine)->fontSize() / 2; 311 int halfWidthOfFontSize = rubyText->style(firstLine)->fontSize() / 2;
313 if (startOverhang) 312 if (startOverhang)
314 startOverhang = min<int>(startOverhang, min<int>(toRenderText(startRende rer)->minLogicalWidth(), halfWidthOfFontSize)); 313 startOverhang = min<int>(startOverhang, min<int>(toRenderText(startRende rer)->minLogicalWidth(), halfWidthOfFontSize));
315 if (endOverhang) 314 if (endOverhang)
316 endOverhang = min<int>(endOverhang, min<int>(toRenderText(endRenderer)-> minLogicalWidth(), halfWidthOfFontSize)); 315 endOverhang = min<int>(endOverhang, min<int>(toRenderText(endRenderer)-> minLogicalWidth(), halfWidthOfFontSize));
317 } 316 }
318 317
319 } // namespace WebCore 318 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderReplica.cpp ('k') | Source/core/rendering/RenderScrollbarPart.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698