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/WebCore/rendering/RenderRubyBase.cpp

Issue 10261009: Merge 113581 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 7 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/WebCore/rendering/RenderObject.cpp ('k') | Source/WebCore/rendering/RenderTable.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return child->isInline(); 53 return child->isInline();
54 } 54 }
55 55
56 void RenderRubyBase::moveChildren(RenderRubyBase* toBase, RenderObject* beforeCh ild) 56 void RenderRubyBase::moveChildren(RenderRubyBase* toBase, RenderObject* beforeCh ild)
57 { 57 {
58 // This function removes all children that are before (!) beforeChild 58 // This function removes all children that are before (!) beforeChild
59 // and appends them to toBase. 59 // and appends them to toBase.
60 ASSERT_ARG(toBase, toBase); 60 ASSERT_ARG(toBase, toBase);
61 61
62 if (beforeChild && beforeChild->parent() != this) 62 if (beforeChild && beforeChild->parent() != this)
63 beforeChild = splitAnonymousBlocksAroundChild(beforeChild); 63 beforeChild = splitAnonymousBoxesAroundChild(beforeChild);
64 64
65 if (childrenInline()) 65 if (childrenInline())
66 moveInlineChildren(toBase, beforeChild); 66 moveInlineChildren(toBase, beforeChild);
67 else 67 else
68 moveBlockChildren(toBase, beforeChild); 68 moveBlockChildren(toBase, beforeChild);
69 69
70 setNeedsLayoutAndPrefWidthsRecalc(); 70 setNeedsLayoutAndPrefWidthsRecalc();
71 toBase->setNeedsLayoutAndPrefWidthsRecalc(); 71 toBase->setNeedsLayoutAndPrefWidthsRecalc();
72 } 72 }
73 73
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return; 144 return;
145 145
146 // Inset the ruby base by half the inter-ideograph expansion amount. 146 // Inset the ruby base by half the inter-ideograph expansion amount.
147 float inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpportun ityCount + 1); 147 float inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpportun ityCount + 1);
148 148
149 logicalLeft += inset / 2; 149 logicalLeft += inset / 2;
150 logicalWidth -= inset; 150 logicalWidth -= inset;
151 } 151 }
152 152
153 } // namespace WebCore 153 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderObject.cpp ('k') | Source/WebCore/rendering/RenderTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698