| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 return; | 112 return; |
| 113 | 113 |
| 114 if (toBase->childrenInline()) | 114 if (toBase->childrenInline()) |
| 115 toBase->makeChildrenNonInline(); | 115 toBase->makeChildrenNonInline(); |
| 116 | 116 |
| 117 // If an anonymous block would be put next to another such block, then merge
those. | 117 // If an anonymous block would be put next to another such block, then merge
those. |
| 118 LayoutObject* firstChildHere = firstChild(); | 118 LayoutObject* firstChildHere = firstChild(); |
| 119 LayoutObject* lastChildThere = toBase->lastChild(); | 119 LayoutObject* lastChildThere = toBase->lastChild(); |
| 120 if (firstChildHere->isAnonymousBlock() && firstChildHere->childrenInline() | 120 if (firstChildHere->isAnonymousBlock() && firstChildHere->childrenInline() |
| 121 && lastChildThere && lastChildThere->isAnonymousBlock() && lastChildTher
e->childrenInline()) { | 121 && lastChildThere && lastChildThere->isAnonymousBlock() && lastChildTher
e->childrenInline()) { |
| 122 LayoutBlock* anonBlockHere = toLayoutBlock(firstChildHere); | 122 LayoutBlockFlow* anonBlockHere = toLayoutBlockFlow(firstChildHere); |
| 123 LayoutBlock* anonBlockThere = toLayoutBlock(lastChildThere); | 123 LayoutBlockFlow* anonBlockThere = toLayoutBlockFlow(lastChildThere); |
| 124 anonBlockHere->moveAllChildrenTo(anonBlockThere, anonBlockThere->childre
n()); | 124 anonBlockHere->moveAllChildrenTo(anonBlockThere, anonBlockThere->childre
n()); |
| 125 anonBlockHere->deleteLineBoxTree(); | 125 anonBlockHere->deleteLineBoxTree(); |
| 126 anonBlockHere->destroy(); | 126 anonBlockHere->destroy(); |
| 127 } | 127 } |
| 128 // Move all remaining children normally. | 128 // Move all remaining children normally. |
| 129 moveChildrenTo(toBase, firstChild(), beforeChild); | 129 moveChildrenTo(toBase, firstChild(), beforeChild); |
| 130 } | 130 } |
| 131 | 131 |
| 132 ETextAlign LayoutRubyBase::textAlignmentForLine(bool /* endsWithSoftBreak */) co
nst | 132 ETextAlign LayoutRubyBase::textAlignmentForLine(bool /* endsWithSoftBreak */) co
nst |
| 133 { | 133 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 145 expansionOpportunityCount = maxCount; | 145 expansionOpportunityCount = maxCount; |
| 146 | 146 |
| 147 // Inset the ruby base by half the inter-ideograph expansion amount. | 147 // Inset the ruby base by half the inter-ideograph expansion amount. |
| 148 LayoutUnit inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpp
ortunityCount + 1); | 148 LayoutUnit inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpp
ortunityCount + 1); |
| 149 | 149 |
| 150 logicalLeft += inset / 2; | 150 logicalLeft += inset / 2; |
| 151 logicalWidth -= inset; | 151 logicalWidth -= inset; |
| 152 } | 152 } |
| 153 | 153 |
| 154 } // namespace blink | 154 } // namespace blink |
| OLD | NEW |