Title: [253252] trunk/Source/WebCore
- Revision
- 253252
- Author
- [email protected]
- Date
- 2019-12-07 06:02:04 -0800 (Sat, 07 Dec 2019)
Log Message
[LFC][IFC] Fix css1/formatting_model/floating_elements.html
https://bugs.webkit.org/show_bug.cgi?id=204983
<rdar://problem/57727197>
Reviewed by Antti Koivisto.
Adjacent non-whitespace inline items are guaranteed to be on commit boundary when they both belong
to the same layout box (<div>text-content</div> [text-][content] vs <div>textcontent</div> [textcontent]).
* layout/inlineformatting/InlineLineBreaker.cpp:
(WebCore::Layout::LineBreaker::Content::isAtContentBoundary):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (253251 => 253252)
--- trunk/Source/WebCore/ChangeLog 2019-12-07 13:56:51 UTC (rev 253251)
+++ trunk/Source/WebCore/ChangeLog 2019-12-07 14:02:04 UTC (rev 253252)
@@ -1,3 +1,17 @@
+2019-12-07 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] Fix css1/formatting_model/floating_elements.html
+ https://bugs.webkit.org/show_bug.cgi?id=204983
+ <rdar://problem/57727197>
+
+ Reviewed by Antti Koivisto.
+
+ Adjacent non-whitespace inline items are guaranteed to be on commit boundary when they both belong
+ to the same layout box (<div>text-content</div> [text-][content] vs <div>textcontent</div> [textcontent]).
+
+ * layout/inlineformatting/InlineLineBreaker.cpp:
+ (WebCore::Layout::LineBreaker::Content::isAtContentBoundary):
+
2019-12-07 Antti Koivisto <[email protected]>
[LFC][Integration] Layout test assert and crash fixes
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp (253251 => 253252)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp 2019-12-07 13:56:51 UTC (rev 253251)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp 2019-12-07 14:02:04 UTC (rev 253252)
@@ -216,9 +216,19 @@
return false;
}
// texttext -> continuous content.
+ // text-text -> commit boundary.
// ' 'text -> commit boundary.
- if (lastUncomittedContent->isText())
- return downcast<InlineTextItem>(*lastUncomittedContent).isWhitespace();
+ if (lastUncomittedContent->isText()) {
+ auto& previousInlineTextItem = downcast<InlineTextItem>(*lastUncomittedContent);
+ if (previousInlineTextItem.isWhitespace())
+ return true;
+ // When both these non-whitespace runs belong to the same layout box, it's guaranteed that
+ // they are split at a soft breaking opportunity. See InlineTextItem::moveToNextBreakablePosition.
+ if (&inlineItem.layoutBox() == &lastUncomittedContent->layoutBox())
+ return true;
+ // FIXME: check if <span>text-</span><span>text</span> should be handled here as well.
+ return false;
+ }
// <img>text -> the inline box is on a commit boundary.
if (lastUncomittedContent->isBox())
return true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes