| 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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 dirtyForLayoutFromPercentageHeightDescendants(layoutScope); | 1161 dirtyForLayoutFromPercentageHeightDescendants(layoutScope); |
| 1162 | 1162 |
| 1163 BlockChildrenLayoutInfo layoutInfo(this, beforeEdge, afterEdge); | 1163 BlockChildrenLayoutInfo layoutInfo(this, beforeEdge, afterEdge); |
| 1164 MarginInfo& marginInfo = layoutInfo.marginInfo(); | 1164 MarginInfo& marginInfo = layoutInfo.marginInfo(); |
| 1165 | 1165 |
| 1166 // Fieldsets need to find their legend and position it inside the border of
the object. | 1166 // Fieldsets need to find their legend and position it inside the border of
the object. |
| 1167 // The legend then gets skipped during normal layout. The same is true for r
uby text. | 1167 // The legend then gets skipped during normal layout. The same is true for r
uby text. |
| 1168 // It doesn't get included in the normal layout process but is instead skipp
ed. | 1168 // It doesn't get included in the normal layout process but is instead skipp
ed. |
| 1169 LayoutObject* childToExclude = layoutSpecialExcludedChild(relayoutChildren,
layoutScope); | 1169 LayoutObject* childToExclude = layoutSpecialExcludedChild(relayoutChildren,
layoutScope); |
| 1170 | 1170 |
| 1171 LayoutBox* next = firstChildBox(); | 1171 // TODO(foolip): Speculative CHECKs to crash if any non-LayoutBox |
| 1172 // children ever appear, the childrenInline() check at the call site |
| 1173 // should make this impossible. crbug.com/632848 |
| 1174 LayoutObject* firstChild = this->firstChild(); |
| 1175 CHECK(!firstChild || firstChild->isBox()); |
| 1176 LayoutBox* next = toLayoutBox(firstChild); |
| 1172 LayoutBox* lastNormalFlowChild = nullptr; | 1177 LayoutBox* lastNormalFlowChild = nullptr; |
| 1173 | 1178 |
| 1174 while (next) { | 1179 while (next) { |
| 1175 LayoutBox* child = next; | 1180 LayoutBox* child = next; |
| 1176 next = child->nextSiblingBox(); | 1181 LayoutObject* nextSibling = child->nextSibling(); |
| 1182 CHECK(!nextSibling || nextSibling->isBox()); |
| 1183 next = toLayoutBox(nextSibling); |
| 1177 | 1184 |
| 1178 child->setMayNeedPaintInvalidation(); | 1185 child->setMayNeedPaintInvalidation(); |
| 1179 | 1186 |
| 1180 if (childToExclude == child) | 1187 if (childToExclude == child) |
| 1181 continue; // Skip this child, since it will be positioned by the spe
cialized subclass (fieldsets and ruby runs). | 1188 continue; // Skip this child, since it will be positioned by the spe
cialized subclass (fieldsets and ruby runs). |
| 1182 | 1189 |
| 1183 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *child); | 1190 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *child); |
| 1184 | 1191 |
| 1185 if (child->isOutOfFlowPositioned()) { | 1192 if (child->isOutOfFlowPositioned()) { |
| 1186 child->containingBlock()->insertPositionedObject(child); | 1193 child->containingBlock()->insertPositionedObject(child); |
| (...skipping 2566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3753 | 3760 |
| 3754 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); | 3761 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
| 3755 } | 3762 } |
| 3756 | 3763 |
| 3757 void LayoutBlockFlow::invalidateDisplayItemClients(PaintInvalidationReason inval
idationReason) const | 3764 void LayoutBlockFlow::invalidateDisplayItemClients(PaintInvalidationReason inval
idationReason) const |
| 3758 { | 3765 { |
| 3759 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(invalidationRe
ason); | 3766 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(invalidationRe
ason); |
| 3760 } | 3767 } |
| 3761 | 3768 |
| 3762 } // namespace blink | 3769 } // namespace blink |
| OLD | NEW |