| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |