<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[280973] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/280973">280973</a></dd>
<dt>Author</dt> <dd>drousso@apple.com</dd>
<dt>Date</dt> <dd>2021-08-12 11:58:47 -0700 (Thu, 12 Aug 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix some `NSAttributedString` inconsistencies between WK1 and WK2
https://bugs.webkit.org/show_bug.cgi?id=229013
<rdar://problem/81215696>

Reviewed by Timothy Hatcher.

Source/WebCore:

`NSAttributedString` now uses WK2, which has caused us to discover some inconsistencies (and bugs).

Tests: NSAttributedStringWebKitAdditions.DefaultFontSize
       NSAttributedStringWebKitAdditions.MultipleParagraphs

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_blockLevelElementForNode):
Check the given node before looking at the parent as it could already be a block. This
allows for sequental `<p>` to each have their own positioning instead of only the first one.
(HTMLConverter::computedAttributesForElement):
Fix typo that used `margin-right` instead of `margin-bottom` when setting `paragraphSpacing`.

Source/WebKit:

`NSAttributedString` now uses WK2, which has caused us to discover some inconsistencies (and bugs).

* UIProcess/API/Cocoa/NSAttributedString.mm:
(+[_WKAttributedStringWebViewCache configuration]):
Change the default font size to 12 to match WK1.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/NSAttributedStringWebKitAdditions.mm: Added.
(TEST.NSAttributedStringWebKitAdditions.DefaultFontSize):
(TEST.NSAttributedStringWebKitAdditions.MultipleParagraphs):

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaHTMLConvertermm">trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaNSAttributedStringmm">trunk/Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaNSAttributedStringWebKitAdditionsmm">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NSAttributedStringWebKitAdditions.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (280972 => 280973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-08-12 17:13:11 UTC (rev 280972)
+++ trunk/Source/WebCore/ChangeLog      2021-08-12 18:58:47 UTC (rev 280973)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2021-08-12  Devin Rousso  <drousso@apple.com>
+
+        Fix some `NSAttributedString` inconsistencies between WK1 and WK2
+        https://bugs.webkit.org/show_bug.cgi?id=229013
+        <rdar://problem/81215696>
+
+        Reviewed by Timothy Hatcher.
+
+        `NSAttributedString` now uses WK2, which has caused us to discover some inconsistencies (and bugs).
+
+        Tests: NSAttributedStringWebKitAdditions.DefaultFontSize
+               NSAttributedStringWebKitAdditions.MultipleParagraphs
+
+        * editing/cocoa/HTMLConverter.mm:
+        (HTMLConverter::_blockLevelElementForNode):
+        Check the given node before looking at the parent as it could already be a block. This
+        allows for sequental `<p>` to each have their own positioning instead of only the first one.
+        (HTMLConverter::computedAttributesForElement):
+        Fix typo that used `margin-right` instead of `margin-bottom` when setting `paragraphSpacing`.
+
</ins><span class="cx"> 2021-08-12  Youenn Fablet  <youenn@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Adopt span in RTCRtpSFrameTransform
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (280972 => 280973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm      2021-08-12 17:13:11 UTC (rev 280972)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm 2021-08-12 18:58:47 UTC (rev 280973)
</span><span class="lines">@@ -836,7 +836,7 @@
</span><span class="cx"> 
</span><span class="cx"> Element* HTMLConverter::_blockLevelElementForNode(Node* node)
</span><span class="cx"> {
</span><del>-    Element* element = node->parentElement();
</del><ins>+    Element* element = is<Element>(node) ? downcast<Element>(node) : node->parentElement();
</ins><span class="cx">     if (element && !_caches->isBlockElement(*element))
</span><span class="cx">         element = _blockLevelElementForNode(element->parentInComposedTree());
</span><span class="cx">     return element;
</span><span class="lines">@@ -1128,7 +1128,7 @@
</span><span class="cx">             if (_caches->floatPropertyValueForNode(coreBlockElement, CSSPropertyMarginRight, marginRight) && marginRight > 0.0)
</span><span class="cx">                 [paragraphStyle setTailIndent:-marginRight];
</span><span class="cx">             float marginBottom = 0.0;
</span><del>-            if (_caches->floatPropertyValueForNode(coreBlockElement, CSSPropertyMarginRight, marginBottom) && marginBottom > 0.0)
</del><ins>+            if (_caches->floatPropertyValueForNode(coreBlockElement, CSSPropertyMarginBottom, marginBottom) && marginBottom > 0.0)
</ins><span class="cx">                 [paragraphStyle setParagraphSpacing:marginBottom];
</span><span class="cx">         }
</span><span class="cx">         if ([_textLists count] > 0)
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (280972 => 280973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-08-12 17:13:11 UTC (rev 280972)
+++ trunk/Source/WebKit/ChangeLog       2021-08-12 18:58:47 UTC (rev 280973)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2021-08-12  Devin Rousso  <drousso@apple.com>
+
+        Fix some `NSAttributedString` inconsistencies between WK1 and WK2
+        https://bugs.webkit.org/show_bug.cgi?id=229013
+        <rdar://problem/81215696>
+
+        Reviewed by Timothy Hatcher.
+
+        `NSAttributedString` now uses WK2, which has caused us to discover some inconsistencies (and bugs).
+
+        * UIProcess/API/Cocoa/NSAttributedString.mm:
+        (+[_WKAttributedStringWebViewCache configuration]):
+        Change the default font size to 12 to match WK1.
+
</ins><span class="cx"> 2021-08-12  Carlos Garcia Campos  <cgarcia@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [ATK] Critical warnings on children-changed::add signal emission
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaNSAttributedStringmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.mm (280972 => 280973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.mm    2021-08-12 17:13:11 UTC (rev 280972)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.mm       2021-08-12 18:58:47 UTC (rev 280973)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> #import "WKErrorInternal.h"
</span><span class="cx"> #import <WebKit/WKNavigationActionPrivate.h>
</span><span class="cx"> #import <WebKit/WKNavigationDelegate.h>
</span><del>-#import <WebKit/WKPreferences.h>
</del><ins>+#import <WebKit/WKPreferencesPrivate.h>
</ins><span class="cx"> #import <WebKit/WKProcessPoolPrivate.h>
</span><span class="cx"> #import <WebKit/WKWebViewConfigurationPrivate.h>
</span><span class="cx"> #import <WebKit/WKWebViewPrivate.h>
</span><span class="lines">@@ -151,6 +151,8 @@
</span><span class="cx">         [configuration setAllowsInlineMediaPlayback:NO];
</span><span class="cx">         [configuration _setClientNavigationsRunAtForegroundPriority:YES];
</span><span class="cx"> #endif
</span><ins>+
+        [configuration preferences]._defaultFontSize = 12;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return configuration.get();
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (280972 => 280973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2021-08-12 17:13:11 UTC (rev 280972)
+++ trunk/Tools/ChangeLog       2021-08-12 18:58:47 UTC (rev 280973)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2021-08-12  Devin Rousso  <drousso@apple.com>
+
+        Fix some `NSAttributedString` inconsistencies between WK1 and WK2
+        https://bugs.webkit.org/show_bug.cgi?id=229013
+        <rdar://problem/81215696>
+
+        Reviewed by Timothy Hatcher.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/NSAttributedStringWebKitAdditions.mm: Added.
+        (TEST.NSAttributedStringWebKitAdditions.DefaultFontSize):
+        (TEST.NSAttributedStringWebKitAdditions.MultipleParagraphs):
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2021-08-12  Youenn Fablet  <youenn@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Adopt span in RTCRtpSFrameTransform
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (280972 => 280973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2021-08-12 17:13:11 UTC (rev 280972)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj   2021-08-12 18:58:47 UTC (rev 280973)
</span><span class="lines">@@ -888,6 +888,7 @@
</span><span class="cx">          95095F20262FFFA50000D920 /* SampledPageTopColor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95095F1F262FFFA50000D920 /* SampledPageTopColor.mm */; };
</span><span class="cx">          950E4CC1252E75240071659F /* iOSStylusSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = 950E4CC0252E75230071659F /* iOSStylusSupport.mm */; };
</span><span class="cx">          953ABB3525C0D682004C8B73 /* WKWebViewUnderPageBackgroundColor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 953ABB3425C0D681004C8B73 /* WKWebViewUnderPageBackgroundColor.mm */; };
</span><ins>+               958B70E126C46EDC00B2022B /* NSAttributedStringWebKitAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 958B70E026C46EDC00B2022B /* NSAttributedStringWebKitAdditions.mm */; };
</ins><span class="cx">           95A524952581A10D00461FE9 /* WKWebViewThemeColor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95A524942581A10D00461FE9 /* WKWebViewThemeColor.mm */; };
</span><span class="cx">          95B6B3B7251EBF2F00FC4382 /* MediaDocument.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95B6B3B6251EBF2F00FC4382 /* MediaDocument.mm */; };
</span><span class="cx">          9984FACC1CFFAF60008D198C /* WKWebViewTextInput.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9984FACA1CFFAEEE008D198C /* WKWebViewTextInput.mm */; };
</span><span class="lines">@@ -2616,6 +2617,7 @@
</span><span class="cx">          95095F1F262FFFA50000D920 /* SampledPageTopColor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SampledPageTopColor.mm; sourceTree = "<group>"; };
</span><span class="cx">          950E4CC0252E75230071659F /* iOSStylusSupport.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = iOSStylusSupport.mm; sourceTree = "<group>"; };
</span><span class="cx">          953ABB3425C0D681004C8B73 /* WKWebViewUnderPageBackgroundColor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewUnderPageBackgroundColor.mm; sourceTree = "<group>"; };
</span><ins>+               958B70E026C46EDC00B2022B /* NSAttributedStringWebKitAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NSAttributedStringWebKitAdditions.mm; sourceTree = "<group>"; };
</ins><span class="cx">           95A524942581A10D00461FE9 /* WKWebViewThemeColor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewThemeColor.mm; sourceTree = "<group>"; };
</span><span class="cx">          95B6B3B6251EBF2F00FC4382 /* MediaDocument.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaDocument.mm; sourceTree = "<group>"; };
</span><span class="cx">          9984FACA1CFFAEEE008D198C /* WKWebViewTextInput.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewTextInput.mm; sourceTree = "<group>"; };
</span><span class="lines">@@ -3542,6 +3544,7 @@
</span><span class="cx">                          46A80F25264C29D400EEF20D /* NotificationAPI.mm */,
</span><span class="cx">                          CD2D0D19213465560018C784 /* NowPlaying.mm */,
</span><span class="cx">                          2ECFF5541D9B12F800B55394 /* NowPlayingControlsTests.mm */,
</span><ins>+                               958B70E026C46EDC00B2022B /* NSAttributedStringWebKitAdditions.mm */,
</ins><span class="cx">                           A10F047C1E3AD29C00C95E19 /* NSFileManagerExtras.mm */,
</span><span class="cx">                          F4EB4E8F2328AC3000574DAB /* NSItemProviderAdditions.h */,
</span><span class="cx">                          F4EB4E902328AC3000574DAB /* NSItemProviderAdditions.mm */,
</span><span class="lines">@@ -5679,6 +5682,7 @@
</span><span class="cx">                          CD2D0D1A213465560018C784 /* NowPlaying.mm in Sources */,
</span><span class="cx">                          2ECFF5551D9B12F800B55394 /* NowPlayingControlsTests.mm in Sources */,
</span><span class="cx">                          5159F267260D43E300B2DA3C /* NowPlayingInfoTests.cpp in Sources */,
</span><ins>+                               958B70E126C46EDC00B2022B /* NSAttributedStringWebKitAdditions.mm in Sources */,
</ins><span class="cx">                           A10F047E1E3AD29C00C95E19 /* NSFileManagerExtras.mm in Sources */,
</span><span class="cx">                          F442851D2140DF2900CCDA22 /* NSFontPanelTesting.mm in Sources */,
</span><span class="cx">                          F4EB4E912328AC3000574DAB /* NSItemProviderAdditions.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaNSAttributedStringWebKitAdditionsmm"></a>
<div class="addfile"><h4>Added: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NSAttributedStringWebKitAdditions.mm (0 => 280973)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NSAttributedStringWebKitAdditions.mm                         (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NSAttributedStringWebKitAdditions.mm    2021-08-12 18:58:47 UTC (rev 280973)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+
+#import "TestCocoa.h"
+#import <WebKit/NSAttributedString.h>
+#import <wtf/RetainPtr.h>
+
+TEST(NSAttributedStringWebKitAdditions, DefaultFontSize)
+{
+    __block bool done = false;
+    [NSAttributedString loadFromHTMLWithString:@"Hello World" options:@{ } completionHandler:^(NSAttributedString *attributedString, NSDictionary<NSAttributedStringDocumentAttributeKey, id> *attributes, NSError *error) {
+        EXPECT_EQ([[attributedString attribute:NSFontAttributeName atIndex:0 effectiveRange:nil] pointSize], 12.0);
+
+        done = true;
+    }];
+    TestWebKitAPI::Util::run(&done);
+}
+
+TEST(NSAttributedStringWebKitAdditions, MultipleParagraphs)
+{
+    __block bool done = false;
+    [NSAttributedString loadFromHTMLWithString:@"<p style='margin-bottom:1px'>Hello</p><p style='margin-bottom:2px'>World</p>" options:@{ } completionHandler:^(NSAttributedString *attributedString, NSDictionary<NSAttributedStringDocumentAttributeKey, id> *attributes, NSError *error) {
+        EXPECT_EQ([[attributedString attribute:NSParagraphStyleAttributeName atIndex:0 effectiveRange:nil] paragraphSpacing], 1.0);
+        EXPECT_EQ([[attributedString attribute:NSParagraphStyleAttributeName atIndex:6 effectiveRange:nil] paragraphSpacing], 2.0);
+
+        done = true;
+    }];
+    TestWebKitAPI::Util::run(&done);
+}
</ins></span></pre>
</div>
</div>

</body>
</html>