| 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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 | 1156 |
| 1157 void LayoutBlockFlow::layoutBlockChildren(bool relayoutChildren, SubtreeLayoutSc
ope& layoutScope, LayoutUnit beforeEdge, LayoutUnit afterEdge) | 1157 void LayoutBlockFlow::layoutBlockChildren(bool relayoutChildren, SubtreeLayoutSc
ope& layoutScope, LayoutUnit beforeEdge, LayoutUnit afterEdge) |
| 1158 { | 1158 { |
| 1159 dirtyForLayoutFromPercentageHeightDescendants(layoutScope); | 1159 dirtyForLayoutFromPercentageHeightDescendants(layoutScope); |
| 1160 | 1160 |
| 1161 BlockChildrenLayoutInfo layoutInfo(this, beforeEdge, afterEdge); | 1161 BlockChildrenLayoutInfo layoutInfo(this, beforeEdge, afterEdge); |
| 1162 MarginInfo& marginInfo = layoutInfo.marginInfo(); | 1162 MarginInfo& marginInfo = layoutInfo.marginInfo(); |
| 1163 | 1163 |
| 1164 LayoutObject* childToExclude = layoutSpecialExcludedChild(relayoutChildren,
layoutScope); | 1164 LayoutObject* childToExclude = layoutSpecialExcludedChild(relayoutChildren,
layoutScope); |
| 1165 | 1165 |
| 1166 LayoutBox* next = firstChildBox(); | 1166 // TODO(foolip): Speculative CHECKs to crash if any non-LayoutBox |
| 1167 // children ever appear, the childrenInline() check at the call site |
| 1168 // should make this impossible. crbug.com/632848 |
| 1169 LayoutObject* firstChild = this->firstChild(); |
| 1170 CHECK(!firstChild || firstChild->isBox()); |
| 1171 LayoutBox* next = toLayoutBox(firstChild); |
| 1167 LayoutBox* lastNormalFlowChild = nullptr; | 1172 LayoutBox* lastNormalFlowChild = nullptr; |
| 1168 | 1173 |
| 1169 while (next) { | 1174 while (next) { |
| 1170 LayoutBox* child = next; | 1175 LayoutBox* child = next; |
| 1171 next = child->nextSiblingBox(); | 1176 LayoutObject* nextSibling = child->nextSibling(); |
| 1177 CHECK(!nextSibling || nextSibling->isBox()); |
| 1178 next = toLayoutBox(nextSibling); |
| 1172 | 1179 |
| 1173 child->setMayNeedPaintInvalidation(); | 1180 child->setMayNeedPaintInvalidation(); |
| 1174 | 1181 |
| 1175 if (childToExclude == child) | 1182 if (childToExclude == child) |
| 1176 continue; // Skip this child, since it will be positioned by the spe
cialized subclass (ruby runs). | 1183 continue; // Skip this child, since it will be positioned by the spe
cialized subclass (ruby runs). |
| 1177 | 1184 |
| 1178 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *child); | 1185 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *child); |
| 1179 | 1186 |
| 1180 if (child->isOutOfFlowPositioned()) { | 1187 if (child->isOutOfFlowPositioned()) { |
| 1181 child->containingBlock()->insertPositionedObject(child); | 1188 child->containingBlock()->insertPositionedObject(child); |
| (...skipping 2561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3743 | 3750 |
| 3744 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); | 3751 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
| 3745 } | 3752 } |
| 3746 | 3753 |
| 3747 void LayoutBlockFlow::invalidateDisplayItemClients(PaintInvalidationReason inval
idationReason) const | 3754 void LayoutBlockFlow::invalidateDisplayItemClients(PaintInvalidationReason inval
idationReason) const |
| 3748 { | 3755 { |
| 3749 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(invalidationRe
ason); | 3756 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(invalidationRe
ason); |
| 3750 } | 3757 } |
| 3751 | 3758 |
| 3752 } // namespace blink | 3759 } // namespace blink |
| OLD | NEW |