Changeset 168598 in webkit
- Timestamp:
- May 11, 2014 2:42:47 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r168587 r168598 1 2014-05-11 Antti Koivisto <antti@apple.com> 2 3 Text with simple line layout not getting pushed below float when there is not enough space for it 4 https://bugs.webkit.org/show_bug.cgi?id=126991 5 6 Reviewed by Andreas Kling. 7 8 * fast/text/simple-lines-intruding-wide-float-dynamic-expected.html: Added. 9 * fast/text/simple-lines-intruding-wide-float-dynamic.html: Added. 10 * fast/text/simple-lines-intruding-wide-float-expected.html: Added. 11 * fast/text/simple-lines-intruding-wide-float.html: Added. 12 1 13 2014-05-10 Alexey Proskuryakov <ap@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r168596 r168598 1 2014-05-11 Antti Koivisto <antti@apple.com> 2 3 Text with simple line layout not getting pushed below float when there is not enough space for it 4 https://bugs.webkit.org/show_bug.cgi?id=126991 5 6 Reviewed by Andreas Kling. 7 8 Tests: fast/text/simple-lines-intruding-wide-float-dynamic.html 9 fast/text/simple-lines-intruding-wide-float.html 10 11 * rendering/RenderBlockFlow.cpp: 12 (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange): 13 14 Invalidate the line layout path when floats change. We need to check SimpleLineLayout::canUseFor again as 15 intruding floats may make this flow ineligible to use the path. 16 17 * rendering/RenderBlockFlow.h: 18 (WebCore::RenderBlockFlow::floatingObjectSet): 19 * rendering/SimpleLineLayout.cpp: 20 (WebCore::SimpleLineLayout::canUseFor): 21 22 Test the top positions of all floats for case that would push text below the float instead of just testing 23 the first line. We may have floats in the middle of the paragraph too. 24 1 25 2014-05-11 peavo@outlook.com <peavo@outlook.com> 2 26 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r168380 r168598 2873 2873 return; 2874 2874 2875 // Floats currently affect the choice whether to use simple line layout path. 2876 if (m_simpleLineLayout) { 2877 invalidateLineLayoutPath(); 2878 return; 2879 } 2880 2875 2881 RootInlineBox* lowestDirtyLine = lastRootBox(); 2876 2882 RootInlineBox* afterLowest = lowestDirtyLine; -
trunk/Source/WebCore/rendering/RenderBlockFlow.h
r168380 r168598 291 291 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = nullptr, bool inLayout = true); 292 292 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = nullptr); 293 294 const FloatingObjectSet* floatingObjectSet() const { return m_floatingObjects ? &m_floatingObjects->set() : nullptr; } 293 295 294 296 LayoutUnit logicalTopForFloat(const FloatingObject* floatingObject) const { return isHorizontalWritingMode() ? floatingObject->y() : floatingObject->x(); } -
trunk/Source/WebCore/rendering/SimpleLineLayout.cpp
r168380 r168598 163 163 if (flow.containsFloats()) { 164 164 // We can't use the code path if any lines would need to be shifted below floats. This is because we don't keep per-line y coordinates. 165 // It is enough to test the first line width only as currently all floats must be overhanging. 166 if (textRenderer.minLogicalWidth() > LineWidth(const_cast<RenderBlockFlow&>(flow), false, DoNotIndentText).availableWidth()) 167 return false; 165 float minimumWidthNeeded = textRenderer.minLogicalWidth(); 166 for (auto& floatRenderer : *flow.floatingObjectSet()) { 167 ASSERT(floatRenderer); 168 float availableWidth = flow.availableLogicalWidthForLine(floatRenderer->y(), false); 169 if (availableWidth < minimumWidthNeeded) 170 return false; 171 } 168 172 } 169 173 if (textRenderer.isCombineText() || textRenderer.isCounter() || textRenderer.isQuote() || textRenderer.isTextFragment()
Note: See TracChangeset
for help on using the changeset viewer.