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

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

Issue 16896019: Replace RenderArena with PartitionAlloc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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) 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 RenderRubyBase* renderer = RenderRubyBase::createAnonymous(document()); 200 RenderRubyBase* renderer = RenderRubyBase::createAnonymous(document());
201 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( style(), BLOCK); 201 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( style(), BLOCK);
202 newStyle->setTextAlign(CENTER); // FIXME: use WEBKIT_CENTER? 202 newStyle->setTextAlign(CENTER); // FIXME: use WEBKIT_CENTER?
203 renderer->setStyle(newStyle.release()); 203 renderer->setStyle(newStyle.release());
204 return renderer; 204 return renderer;
205 } 205 }
206 206
207 RenderRubyRun* RenderRubyRun::staticCreateRubyRun(const RenderObject* parentRuby ) 207 RenderRubyRun* RenderRubyRun::staticCreateRubyRun(const RenderObject* parentRuby )
208 { 208 {
209 ASSERT(parentRuby && parentRuby->isRuby()); 209 ASSERT(parentRuby && parentRuby->isRuby());
210 RenderRubyRun* rr = new (parentRuby->renderArena()) 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) 217 RenderObject* RenderRubyRun::layoutSpecialExcludedChild(bool relayoutChildren)
218 { 218 {
219 StackStats::LayoutCheckPoint layoutCheckPoint; 219 StackStats::LayoutCheckPoint layoutCheckPoint;
220 // Don't bother positioning the RenderRubyRun yet. 220 // Don't bother positioning the RenderRubyRun yet.
(...skipping 89 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 310 // 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. 311 // and no more than half the font size.
312 int halfWidthOfFontSize = rubyText->style(firstLine)->fontSize() / 2; 312 int halfWidthOfFontSize = rubyText->style(firstLine)->fontSize() / 2;
313 if (startOverhang) 313 if (startOverhang)
314 startOverhang = min<int>(startOverhang, min<int>(toRenderText(startRende rer)->minLogicalWidth(), halfWidthOfFontSize)); 314 startOverhang = min<int>(startOverhang, min<int>(toRenderText(startRende rer)->minLogicalWidth(), halfWidthOfFontSize));
315 if (endOverhang) 315 if (endOverhang)
316 endOverhang = min<int>(endOverhang, min<int>(toRenderText(endRenderer)-> minLogicalWidth(), halfWidthOfFontSize)); 316 endOverhang = min<int>(endOverhang, min<int>(toRenderText(endRenderer)-> minLogicalWidth(), halfWidthOfFontSize));
317 } 317 }
318 318
319 } // namespace WebCore 319 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698