Changeset 280973 in webkit
- Timestamp:
- Aug 12, 2021, 11:58:47 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/editing/cocoa/HTMLConverter.mm (modified) (2 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.mm (modified) (2 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (modified) (4 diffs)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/NSAttributedStringWebKitAdditions.mm (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r280972 r280973 1 2021-08-12 Devin Rousso <drousso@apple.com> 2 3 Fix some `NSAttributedString` inconsistencies between WK1 and WK2 4 https://bugs.webkit.org/show_bug.cgi?id=229013 5 <rdar://problem/81215696> 6 7 Reviewed by Timothy Hatcher. 8 9 `NSAttributedString` now uses WK2, which has caused us to discover some inconsistencies (and bugs). 10 11 Tests: NSAttributedStringWebKitAdditions.DefaultFontSize 12 NSAttributedStringWebKitAdditions.MultipleParagraphs 13 14 * editing/cocoa/HTMLConverter.mm: 15 (HTMLConverter::_blockLevelElementForNode): 16 Check the given node before looking at the parent as it could already be a block. This 17 allows for sequental `<p>` to each have their own positioning instead of only the first one. 18 (HTMLConverter::computedAttributesForElement): 19 Fix typo that used `margin-right` instead of `margin-bottom` when setting `paragraphSpacing`. 20 1 21 2021-08-12 Youenn Fablet <youenn@apple.com> 2 22 -
trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm
r279320 r280973 837 837 Element* HTMLConverter::_blockLevelElementForNode(Node* node) 838 838 { 839 Element* element = node->parentElement();839 Element* element = is<Element>(node) ? downcast<Element>(node) : node->parentElement(); 840 840 if (element && !_caches->isBlockElement(*element)) 841 841 element = _blockLevelElementForNode(element->parentInComposedTree()); … … 1129 1129 [paragraphStyle setTailIndent:-marginRight]; 1130 1130 float marginBottom = 0.0; 1131 if (_caches->floatPropertyValueForNode(coreBlockElement, CSSPropertyMargin Right, marginBottom) && marginBottom > 0.0)1131 if (_caches->floatPropertyValueForNode(coreBlockElement, CSSPropertyMarginBottom, marginBottom) && marginBottom > 0.0) 1132 1132 [paragraphStyle setParagraphSpacing:marginBottom]; 1133 1133 } -
trunk/Source/WebKit/ChangeLog
r280964 r280973 1 2021-08-12 Devin Rousso <drousso@apple.com> 2 3 Fix some `NSAttributedString` inconsistencies between WK1 and WK2 4 https://bugs.webkit.org/show_bug.cgi?id=229013 5 <rdar://problem/81215696> 6 7 Reviewed by Timothy Hatcher. 8 9 `NSAttributedString` now uses WK2, which has caused us to discover some inconsistencies (and bugs). 10 11 * UIProcess/API/Cocoa/NSAttributedString.mm: 12 (+[_WKAttributedStringWebViewCache configuration]): 13 Change the default font size to 12 to match WK1. 14 1 15 2021-08-12 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.mm
r276621 r280973 31 31 #import <WebKit/WKNavigationActionPrivate.h> 32 32 #import <WebKit/WKNavigationDelegate.h> 33 #import <WebKit/WKPreferences .h>33 #import <WebKit/WKPreferencesPrivate.h> 34 34 #import <WebKit/WKProcessPoolPrivate.h> 35 35 #import <WebKit/WKWebViewConfigurationPrivate.h> … … 152 152 [configuration _setClientNavigationsRunAtForegroundPriority:YES]; 153 153 #endif 154 155 [configuration preferences]._defaultFontSize = 12; 154 156 } 155 157 -
trunk/Tools/ChangeLog
r280972 r280973 1 2021-08-12 Devin Rousso <drousso@apple.com> 2 3 Fix some `NSAttributedString` inconsistencies between WK1 and WK2 4 https://bugs.webkit.org/show_bug.cgi?id=229013 5 <rdar://problem/81215696> 6 7 Reviewed by Timothy Hatcher. 8 9 * TestWebKitAPI/Tests/WebKitCocoa/NSAttributedStringWebKitAdditions.mm: Added. 10 (TEST.NSAttributedStringWebKitAdditions.DefaultFontSize): 11 (TEST.NSAttributedStringWebKitAdditions.MultipleParagraphs): 12 13 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 14 1 15 2021-08-12 Youenn Fablet <youenn@apple.com> 2 16 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r280651 r280973 889 889 950E4CC1252E75240071659F /* iOSStylusSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = 950E4CC0252E75230071659F /* iOSStylusSupport.mm */; }; 890 890 953ABB3525C0D682004C8B73 /* WKWebViewUnderPageBackgroundColor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 953ABB3425C0D681004C8B73 /* WKWebViewUnderPageBackgroundColor.mm */; }; 891 958B70E126C46EDC00B2022B /* NSAttributedStringWebKitAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 958B70E026C46EDC00B2022B /* NSAttributedStringWebKitAdditions.mm */; }; 891 892 95A524952581A10D00461FE9 /* WKWebViewThemeColor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95A524942581A10D00461FE9 /* WKWebViewThemeColor.mm */; }; 892 893 95B6B3B7251EBF2F00FC4382 /* MediaDocument.mm in Sources */ = {isa = PBXBuildFile; fileRef = 95B6B3B6251EBF2F00FC4382 /* MediaDocument.mm */; }; … … 2617 2618 950E4CC0252E75230071659F /* iOSStylusSupport.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = iOSStylusSupport.mm; sourceTree = "<group>"; }; 2618 2619 953ABB3425C0D681004C8B73 /* WKWebViewUnderPageBackgroundColor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewUnderPageBackgroundColor.mm; sourceTree = "<group>"; }; 2620 958B70E026C46EDC00B2022B /* NSAttributedStringWebKitAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NSAttributedStringWebKitAdditions.mm; sourceTree = "<group>"; }; 2619 2621 95A524942581A10D00461FE9 /* WKWebViewThemeColor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewThemeColor.mm; sourceTree = "<group>"; }; 2620 2622 95B6B3B6251EBF2F00FC4382 /* MediaDocument.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaDocument.mm; sourceTree = "<group>"; }; … … 3543 3545 CD2D0D19213465560018C784 /* NowPlaying.mm */, 3544 3546 2ECFF5541D9B12F800B55394 /* NowPlayingControlsTests.mm */, 3547 958B70E026C46EDC00B2022B /* NSAttributedStringWebKitAdditions.mm */, 3545 3548 A10F047C1E3AD29C00C95E19 /* NSFileManagerExtras.mm */, 3546 3549 F4EB4E8F2328AC3000574DAB /* NSItemProviderAdditions.h */, … … 5680 5683 2ECFF5551D9B12F800B55394 /* NowPlayingControlsTests.mm in Sources */, 5681 5684 5159F267260D43E300B2DA3C /* NowPlayingInfoTests.cpp in Sources */, 5685 958B70E126C46EDC00B2022B /* NSAttributedStringWebKitAdditions.mm in Sources */, 5682 5686 A10F047E1E3AD29C00C95E19 /* NSFileManagerExtras.mm in Sources */, 5683 5687 F442851D2140DF2900CCDA22 /* NSFontPanelTesting.mm in Sources */,
Note:
See TracChangeset
for help on using the changeset viewer.