| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 ASSERT_ARG(toBase, toBase); | 65 ASSERT_ARG(toBase, toBase); |
| 66 | 66 |
| 67 if (beforeChild && beforeChild->parent() != this) | 67 if (beforeChild && beforeChild->parent() != this) |
| 68 beforeChild = splitAnonymousBoxesAroundChild(beforeChild); | 68 beforeChild = splitAnonymousBoxesAroundChild(beforeChild); |
| 69 | 69 |
| 70 if (childrenInline()) | 70 if (childrenInline()) |
| 71 moveInlineChildren(toBase, beforeChild); | 71 moveInlineChildren(toBase, beforeChild); |
| 72 else | 72 else |
| 73 moveBlockChildren(toBase, beforeChild); | 73 moveBlockChildren(toBase, beforeChild); |
| 74 | 74 |
| 75 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); | 75 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidation
Reason::Unknown); |
| 76 toBase->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); | 76 toBase->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInva
lidationReason::Unknown); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void LayoutRubyBase::moveInlineChildren(LayoutRubyBase* toBase, LayoutObject* be
foreChild) | 79 void LayoutRubyBase::moveInlineChildren(LayoutRubyBase* toBase, LayoutObject* be
foreChild) |
| 80 { | 80 { |
| 81 ASSERT(childrenInline()); | 81 ASSERT(childrenInline()); |
| 82 ASSERT_ARG(toBase, toBase); | 82 ASSERT_ARG(toBase, toBase); |
| 83 | 83 |
| 84 if (!firstChild()) | 84 if (!firstChild()) |
| 85 return; | 85 return; |
| 86 | 86 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 return; | 141 return; |
| 142 | 142 |
| 143 // Inset the ruby base by half the inter-ideograph expansion amount. | 143 // Inset the ruby base by half the inter-ideograph expansion amount. |
| 144 float inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpportun
ityCount + 1); | 144 float inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpportun
ityCount + 1); |
| 145 | 145 |
| 146 logicalLeft += inset / 2; | 146 logicalLeft += inset / 2; |
| 147 logicalWidth -= inset; | 147 logicalWidth -= inset; |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace blink | 150 } // namespace blink |
| OLD | NEW |