haikuwebkit/Source/WebCore/editing/cocoa
Devin Rousso dad2a5dec4 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:


Canonical link: https://commits.webkit.org/240477@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 18:58:47 +00:00
..
AlternativeTextContextController.h
AlternativeTextContextController.mm
AlternativeTextUIController.h
AlternativeTextUIController.mm
AttributedString.h Fix a build after r277493 2021-05-14 21:26:59 +00:00
AutofillElements.cpp Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
AutofillElements.h Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
DataDetection.h [Live Text] Text selection inside image elements should not be cleared upon resize 2021-06-11 19:55:13 +00:00
DataDetection.mm [Live Text] Text selection inside image elements should not be cleared upon resize 2021-06-11 19:55:13 +00:00
DataDetectorType.h
DictionaryLookup.mm Remove WTF::Optional synonym for std::optional, using that class template directly instead 2021-05-30 16:11:40 +00:00
EditorCocoa.mm Plumb an Optional<PageIdentifier> through WebPasteboardProxy 2021-02-19 00:01:40 +00:00
FontAttributeChangesCocoa.mm Next step toward using std::optional directly instead of through WTF::Optional typedef 2021-05-28 01:26:23 +00:00
FontAttributesCocoa.mm
FontShadowCocoa.mm
HTMLConverter.h
HTMLConverter.mm Fix some `NSAttributedString` inconsistencies between WK1 and WK2 2021-08-12 18:58:47 +00:00
WebArchiveResourceFromNSAttributedString.h
WebArchiveResourceFromNSAttributedString.mm
WebArchiveResourceWebResourceHandler.h
WebArchiveResourceWebResourceHandler.mm Reduce explicit usage of [objC autorelease] in WebKit 2021-02-17 00:00:02 +00:00
WebContentReaderCocoa.mm SharedBuffer::takeData() is a bit dangerous 2021-07-23 22:05:03 +00:00