OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 3081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3092 // when switching between multicol and paged, since that affects the
column set | 3092 // when switching between multicol and paged, since that affects the
column set |
3093 // structure (multicol containers may have spanners, paged container
s may not). | 3093 // structure (multicol containers may have spanners, paged container
s may not). |
3094 multiColumnFlowThread()->evacuateAndDestroy(); | 3094 multiColumnFlowThread()->evacuateAndDestroy(); |
3095 ASSERT(!multiColumnFlowThread()); | 3095 ASSERT(!multiColumnFlowThread()); |
3096 } | 3096 } |
3097 } | 3097 } |
3098 | 3098 |
3099 if (type == NoFlowThread || multiColumnFlowThread()) | 3099 if (type == NoFlowThread || multiColumnFlowThread()) |
3100 return; | 3100 return; |
3101 | 3101 |
| 3102 // Ruby elements manage child insertion in a special way, and would mess up
insertion of the |
| 3103 // flow thread. The flow thread needs to be a direct child of the multicol b
lock (|this|). |
| 3104 if (isRuby()) |
| 3105 return; |
| 3106 |
3102 LayoutMultiColumnFlowThread* flowThread = createMultiColumnFlowThread(type); | 3107 LayoutMultiColumnFlowThread* flowThread = createMultiColumnFlowThread(type); |
3103 addChild(flowThread); | 3108 addChild(flowThread); |
| 3109 |
| 3110 // Check that addChild() put the flow thread as a direct child, and didn't d
o fancy things. |
| 3111 ASSERT(flowThread->parent() == this); |
| 3112 |
3104 flowThread->populate(); | 3113 flowThread->populate(); |
3105 LayoutBlockFlowRareData& rareData = ensureRareData(); | 3114 LayoutBlockFlowRareData& rareData = ensureRareData(); |
3106 ASSERT(!rareData.m_multiColumnFlowThread); | 3115 ASSERT(!rareData.m_multiColumnFlowThread); |
3107 rareData.m_multiColumnFlowThread = flowThread; | 3116 rareData.m_multiColumnFlowThread = flowThread; |
3108 } | 3117 } |
3109 | 3118 |
3110 LayoutBlockFlow::LayoutBlockFlowRareData& LayoutBlockFlow::ensureRareData() | 3119 LayoutBlockFlow::LayoutBlockFlowRareData& LayoutBlockFlow::ensureRareData() |
3111 { | 3120 { |
3112 if (m_rareData) | 3121 if (m_rareData) |
3113 return *m_rareData; | 3122 return *m_rareData; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3161 } | 3170 } |
3162 if (isAnonymous()) | 3171 if (isAnonymous()) |
3163 return "LayoutBlockFlow (anonymous)"; | 3172 return "LayoutBlockFlow (anonymous)"; |
3164 if (isRelPositioned()) | 3173 if (isRelPositioned()) |
3165 return "LayoutBlockFlow (relative positioned)"; | 3174 return "LayoutBlockFlow (relative positioned)"; |
3166 return "LayoutBlockFlow"; | 3175 return "LayoutBlockFlow"; |
3167 } | 3176 } |
3168 | 3177 |
3169 | 3178 |
3170 } // namespace blink | 3179 } // namespace blink |
OLD | NEW |