Changeset 245922 in webkit
- Timestamp:
- May 30, 2019, 5:30:04 PM (7 years ago)
- Location:
- branches/safari-607-branch
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/block/float/float-with-shape-outside-crash-expected.txt (added)
-
LayoutTests/fast/block/float/float-with-shape-outside-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/FloatingObjects.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/LayoutTests/ChangeLog
r245921 r245922 1 2019-05-30 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r245361. rdar://problem/51264842 4 5 Do not create a shape object outside of the layout context 6 https://bugs.webkit.org/show_bug.cgi?id=197926 7 <rdar://problem/50627858> 8 9 Reviewed by Simon Fraser. 10 11 Source/WebCore: 12 13 ShapeOutside objects are used to compute line constrains during layout (in a strict sense, they are part of the layout context and should only be mutated during layout). 14 If we don't create one during layout, we probably don't need to know its geometry during paint (or any other non-layout activity) either. 15 16 Test: fast/block/float/float-with-shape-outside-crash.html 17 18 * rendering/FloatingObjects.cpp: 19 (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded): 20 (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded): 21 * rendering/shapes/ShapeOutsideInfo.cpp: 22 (WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine): 23 24 LayoutTests: 25 26 * fast/block/float/float-with-shape-outside-crash-expected.txt: Added. 27 * fast/block/float/float-with-shape-outside-crash.html: Added. 28 29 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245361 268f45cc-cd09-0410-ab3c-d52691b4dbfc 30 31 2019-05-15 Zalan Bujtas <zalan@apple.com> 32 33 Do not create a shape object outside of the layout context 34 https://bugs.webkit.org/show_bug.cgi?id=197926 35 <rdar://problem/50627858> 36 37 Reviewed by Simon Fraser. 38 39 * fast/block/float/float-with-shape-outside-crash-expected.txt: Added. 40 * fast/block/float/float-with-shape-outside-crash.html: Added. 41 1 42 2019-05-30 Kocsen Chung <kocsen_chung@apple.com> 2 43 -
branches/safari-607-branch/Source/WebCore/ChangeLog
r245921 r245922 1 2019-05-30 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r245361. rdar://problem/51264842 4 5 Do not create a shape object outside of the layout context 6 https://bugs.webkit.org/show_bug.cgi?id=197926 7 <rdar://problem/50627858> 8 9 Reviewed by Simon Fraser. 10 11 Source/WebCore: 12 13 ShapeOutside objects are used to compute line constrains during layout (in a strict sense, they are part of the layout context and should only be mutated during layout). 14 If we don't create one during layout, we probably don't need to know its geometry during paint (or any other non-layout activity) either. 15 16 Test: fast/block/float/float-with-shape-outside-crash.html 17 18 * rendering/FloatingObjects.cpp: 19 (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded): 20 (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded): 21 * rendering/shapes/ShapeOutsideInfo.cpp: 22 (WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine): 23 24 LayoutTests: 25 26 * fast/block/float/float-with-shape-outside-crash-expected.txt: Added. 27 * fast/block/float/float-with-shape-outside-crash.html: Added. 28 29 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245361 268f45cc-cd09-0410-ab3c-d52691b4dbfc 30 31 2019-05-15 Zalan Bujtas <zalan@apple.com> 32 33 Do not create a shape object outside of the layout context 34 https://bugs.webkit.org/show_bug.cgi?id=197926 35 <rdar://problem/50627858> 36 37 Reviewed by Simon Fraser. 38 39 ShapeOutside objects are used to compute line constrains during layout (in a strict sense, they are part of the layout context and should only be mutated during layout). 40 If we don't create one during layout, we probably don't need to know its geometry during paint (or any other non-layout activity) either. 41 42 Test: fast/block/float/float-with-shape-outside-crash.html 43 44 * rendering/FloatingObjects.cpp: 45 (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded): 46 (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded): 47 * rendering/shapes/ShapeOutsideInfo.cpp: 48 (WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine): 49 1 50 2019-05-30 Kocsen Chung <kocsen_chung@apple.com> 2 51 -
branches/safari-607-branch/Source/WebCore/rendering/FloatingObjects.cpp
r239461 r245922 471 471 if (ShapeOutsideInfo* shapeOutside = floatingObject.renderer().shapeOutsideInfo()) { 472 472 ShapeOutsideDeltas shapeDeltas = shapeOutside->computeDeltasForContainingBlockLine(*m_renderer, floatingObject, m_lineTop, m_lineBottom - m_lineTop); 473 if (!shapeDeltas. lineOverlapsShape())473 if (!shapeDeltas.isValid() || !shapeDeltas.lineOverlapsShape()) 474 474 return false; 475 475 … … 490 490 if (ShapeOutsideInfo* shapeOutside = floatingObject.renderer().shapeOutsideInfo()) { 491 491 ShapeOutsideDeltas shapeDeltas = shapeOutside->computeDeltasForContainingBlockLine(*m_renderer, floatingObject, m_lineTop, m_lineBottom - m_lineTop); 492 if (!shapeDeltas. lineOverlapsShape())492 if (!shapeDeltas.isValid() || !shapeDeltas.lineOverlapsShape()) 493 493 return false; 494 494 -
branches/safari-607-branch/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
r238463 r245922 39 39 #include "RenderFragmentContainer.h" 40 40 #include "RenderImage.h" 41 #include "RenderView.h" 41 42 42 43 namespace WebCore { … … 321 322 ShapeOutsideDeltas ShapeOutsideInfo::computeDeltasForContainingBlockLine(const RenderBlockFlow& containingBlock, const FloatingObject& floatingObject, LayoutUnit lineTop, LayoutUnit lineHeight) 322 323 { 324 // If we never constructed this shape during layout, we propably don't need to know about it outside of layout in the context of "containing block line". 325 if (!m_shape && !containingBlock.view().frameView().layoutContext().isInLayout()) 326 return { }; 327 323 328 ASSERT(lineHeight >= 0); 324 329 LayoutUnit borderBoxTop = containingBlock.logicalTopForFloat(floatingObject) + containingBlock.marginBeforeForChild(m_renderer);
Note:
See TracChangeset
for help on using the changeset viewer.