Title: [267842] trunk/Source/WebCore
- Revision
- 267842
- Author
- simon.fra...@apple.com
- Date
- 2020-10-01 10:42:34 -0700 (Thu, 01 Oct 2020)
Log Message
REGRESSION(r267781): ASSERTION FAILED: Optional.h(525) : T *WTF::Optional<WebCore::Layout::LineRun::Text>::operator->() on 16 fast/layoutformattingcontext/* tests
https://bugs.webkit.org/show_bug.cgi?id=217143
Reviewed by Zalan Bujtas.
Need to test the Optional<> text() in dumping code.
* display/css/DisplayTextBox.cpp:
(WebCore::Display::TextBox::debugDescription const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (267841 => 267842)
--- trunk/Source/WebCore/ChangeLog 2020-10-01 17:28:47 UTC (rev 267841)
+++ trunk/Source/WebCore/ChangeLog 2020-10-01 17:42:34 UTC (rev 267842)
@@ -1,3 +1,15 @@
+2020-10-01 Simon Fraser <simon.fra...@apple.com>
+
+ REGRESSION(r267781): ASSERTION FAILED: Optional.h(525) : T *WTF::Optional<WebCore::Layout::LineRun::Text>::operator->() on 16 fast/layoutformattingcontext/* tests
+ https://bugs.webkit.org/show_bug.cgi?id=217143
+
+ Reviewed by Zalan Bujtas.
+
+ Need to test the Optional<> text() in dumping code.
+
+ * display/css/DisplayTextBox.cpp:
+ (WebCore::Display::TextBox::debugDescription const):
+
2020-10-01 Youenn Fablet <you...@apple.com>
Add AVAssetWriter SPI header
Modified: trunk/Source/WebCore/display/css/DisplayTextBox.cpp (267841 => 267842)
--- trunk/Source/WebCore/display/css/DisplayTextBox.cpp 2020-10-01 17:28:47 UTC (rev 267841)
+++ trunk/Source/WebCore/display/css/DisplayTextBox.cpp 2020-10-01 17:42:34 UTC (rev 267842)
@@ -46,16 +46,18 @@
TextStream stream;
stream << "text box " << borderBoxFrame() << " (" << this << ")";
- auto textContent = text()->content().substring(text()->start(), text()->length());
- textContent.replaceWithLiteral('\\', "\\\\");
- textContent.replaceWithLiteral('\n', "\\n");
- const size_t maxPrintedLength = 80;
- if (textContent.length() > maxPrintedLength) {
- auto substring = textContent.substring(0, maxPrintedLength);
- stream << " \"" << substring << "\"…";
- } else
- stream << " \"" << textContent << "\"";
-
+ if (text()) {
+ auto textContent = text()->content().substring(text()->start(), text()->length());
+ textContent.replaceWithLiteral('\\', "\\\\");
+ textContent.replaceWithLiteral('\n', "\\n");
+ const size_t maxPrintedLength = 80;
+ if (textContent.length() > maxPrintedLength) {
+ auto substring = textContent.substring(0, maxPrintedLength);
+ stream << " \"" << substring << "\"…";
+ } else
+ stream << " \"" << textContent << "\"";
+ }
+
return stream.release();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes