WebKit Bugzilla
Attachment 345856 Details for
Bug 188067
: Use the Page's appearance when converting pasteboard attributed strings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188067-20180726114852.patch (text/plain), 4.11 KB, created by
Timothy Hatcher
on 2018-07-26 11:48:53 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2018-07-26 11:48:53 PDT
Size:
4.11 KB
patch
obsolete
>Subversion Revision: 234104 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 354dd08736da723c9ece39b7a1339c40743392d2..90e3dc3531b3e87b2f19be3a766bbfa6ceab0476 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,14 @@ >+2018-07-26 Timothy Hatcher <timothy@apple.com> >+ >+ Use the Page's appearance when converting pasteboard attributed strings. >+ https://bugs.webkit.org/show_bug.cgi?id=188067 >+ rdar://problem/42632246 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * editing/cocoa/WebContentReaderCocoa.mm: >+ (WebCore::createFragment): Create a LocalDefaultSystemAppearance based on the Page. >+ > 2018-07-22 Dean Jackson <dino@apple.com> > > fullscreen env() variables should have initial values >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index f0f482efbdba26a8276ba5e22bc5bd5ad88814ba..2ccbb07175175b43e22660d140dec3dee916d2b8 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,14 @@ >+2018-07-26 Timothy Hatcher <timothy@apple.com> >+ >+ Use the Page's appearance when converting pasteboard attributed strings. >+ https://bugs.webkit.org/show_bug.cgi?id=188067 >+ rdar://problem/42632246 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebCoreSupport/WebEditorClient.mm: >+ (_WebCreateFragment): Create a LocalDefaultSystemAppearance based on the Page. >+ > 2018-07-20 Ryosuke Niwa <rniwa@apple.com> > > Picking a color from the color panel for typing attributes needs to inverse transform through color-filter >diff --git a/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm b/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm >index b3bcff631e48942df751b280824ae545c460e39b..6f4b3fbc5dbbdd53edd7a9c8cf7ea332cd4e5a78 100644 >--- a/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm >+++ b/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm >@@ -61,6 +61,10 @@ > #import <pal/spi/cocoa/NSAttributedStringSPI.h> > #import <wtf/SoftLinking.h> > >+#if PLATFORM(MAC) >+#include "LocalDefaultSystemAppearance.h" >+#endif >+ > #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) > @interface NSAttributedString () > - (NSString *)_htmlDocumentFragmentString:(NSRange)range documentAttributes:(NSDictionary *)dict subresources:(NSArray **)subresources; >@@ -120,6 +124,11 @@ static FragmentAndResources createFragment(Frame& frame, NSAttributedString *str > FragmentAndResources result; > Document& document = *frame.document(); > >+#if PLATFORM(MAC) >+ auto* page = frame.page(); >+ LocalDefaultSystemAppearance localAppearance(page->useSystemAppearance(), page->useDarkAppearance()); >+#endif >+ > NSArray *subresources = nil; > NSString *fragmentString = [string _htmlDocumentFragmentString:NSMakeRange(0, [string length]) documentAttributes:attributesForAttributedStringConversion() subresources:&subresources]; > auto fragment = DocumentFragment::create(document); >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm >index 610f8e083d1e0703f79a915e6d8e2a82d5bbca8c..2eff76112ea9f895854835618fec7c872dbebf36 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm >@@ -92,6 +92,10 @@ > #import "WebUIKitDelegate.h" > #endif > >+#if PLATFORM(MAC) >+#import <WebCore/LocalDefaultSystemAppearance.h> >+#endif >+ > using namespace WebCore; > > using namespace HTMLNames; >@@ -473,6 +477,11 @@ static NSDictionary *attributesForAttributedStringConversion() > > void _WebCreateFragment(Document& document, NSAttributedString *string, FragmentAndResources& result) > { >+#if PLATFORM(MAC) >+ auto* page = document.page(); >+ LocalDefaultSystemAppearance localAppearance(page->useSystemAppearance(), page->useDarkAppearance()); >+#endif >+ > static NSDictionary *documentAttributes = [attributesForAttributedStringConversion() retain]; > NSArray *subresources; > DOMDocumentFragment* fragment = [string _documentFromRange:NSMakeRange(0, [string length])
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188067
: 345856