| 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 3008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3019 // Our location is irrelevant if we're unsplittable or no pagination is in e
ffect. | 3019 // Our location is irrelevant if we're unsplittable or no pagination is in e
ffect. |
| 3020 // Just go ahead and lay out the float. | 3020 // Just go ahead and lay out the float. |
| 3021 bool isChildLayoutBlock = floatBox.isLayoutBlock(); | 3021 bool isChildLayoutBlock = floatBox.isLayoutBlock(); |
| 3022 if (isChildLayoutBlock && !floatBox.needsLayout() && view()->layoutState()->
pageLogicalHeightChanged()) | 3022 if (isChildLayoutBlock && !floatBox.needsLayout() && view()->layoutState()->
pageLogicalHeightChanged()) |
| 3023 floatBox.setChildNeedsLayout(MarkOnlyThis); | 3023 floatBox.setChildNeedsLayout(MarkOnlyThis); |
| 3024 | 3024 |
| 3025 floatBox.layoutIfNeeded(); | 3025 floatBox.layoutIfNeeded(); |
| 3026 | 3026 |
| 3027 setLogicalWidthForFloat(*newObj, logicalWidthForChild(floatBox) + marginStar
tForChild(floatBox) + marginEndForChild(floatBox)); | 3027 setLogicalWidthForFloat(*newObj, logicalWidthForChild(floatBox) + marginStar
tForChild(floatBox) + marginEndForChild(floatBox)); |
| 3028 | 3028 |
| 3029 return m_floatingObjects->add(newObj.release()); | 3029 return m_floatingObjects->add(std::move(newObj)); |
| 3030 } | 3030 } |
| 3031 | 3031 |
| 3032 void LayoutBlockFlow::removeFloatingObject(LayoutBox* floatBox) | 3032 void LayoutBlockFlow::removeFloatingObject(LayoutBox* floatBox) |
| 3033 { | 3033 { |
| 3034 if (m_floatingObjects) { | 3034 if (m_floatingObjects) { |
| 3035 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); | 3035 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| 3036 FloatingObjectSetIterator it = floatingObjectSet.find<FloatingObjectHash
Translator>(floatBox); | 3036 FloatingObjectSetIterator it = floatingObjectSet.find<FloatingObjectHash
Translator>(floatBox); |
| 3037 if (it != floatingObjectSet.end()) { | 3037 if (it != floatingObjectSet.end()) { |
| 3038 FloatingObject& floatingObject = *it->get(); | 3038 FloatingObject& floatingObject = *it->get(); |
| 3039 if (childrenInline()) { | 3039 if (childrenInline()) { |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3827 if (!rect.isEmpty()) | 3827 if (!rect.isEmpty()) |
| 3828 rects.append(rect); | 3828 rects.append(rect); |
| 3829 } | 3829 } |
| 3830 } | 3830 } |
| 3831 | 3831 |
| 3832 if (inlineElementContinuation) | 3832 if (inlineElementContinuation) |
| 3833 inlineElementContinuation->addOutlineRects(rects, additionalOffset + (in
lineElementContinuation->containingBlock()->location() - location()), includeBlo
ckOverflows); | 3833 inlineElementContinuation->addOutlineRects(rects, additionalOffset + (in
lineElementContinuation->containingBlock()->location() - location()), includeBlo
ckOverflows); |
| 3834 } | 3834 } |
| 3835 | 3835 |
| 3836 } // namespace blink | 3836 } // namespace blink |
| OLD | NEW |