Changeset 249517 in webkit
- Timestamp:
- Sep 4, 2019 7:52:40 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r249511 r249517 1 2019-09-04 Timothy Hatcher <timothy@apple.com> 2 3 Mail appears to be double inverting code copied from Notes, Xcode, or Terminal. 4 https://bugs.webkit.org/show_bug.cgi?id=201368 5 rdar://problem/40529867 6 7 Reviewed by Ryosuke Niwa. 8 9 * TestExpectations: 10 * editing/pasteboard/paste-dark-mode-color-filtered-expected.txt: Added. 11 * editing/pasteboard/paste-dark-mode-color-filtered.html: Added. 12 * platform/ios-12/TestExpectations: 13 * platform/ios/TestExpectations: 14 * platform/mac/TestExpectations: 15 1 16 2019-09-04 Yusuke Suzuki <ysuzuki@apple.com> 2 17 -
trunk/LayoutTests/TestExpectations
r249360 r249517 88 88 fast/images/eps-as-image.html [ Skip ] 89 89 90 # Only applicable on macOS90 # Only applicable on platforms with dark mode support 91 91 css-dark-mode [ Skip ] 92 92 fast/css/apple-system-control-colors.html [ Skip ] 93 93 inspector/css/force-page-appearance.html [ Skip ] 94 editing/pasteboard/paste-dark-mode-color-filtered.html [ Skip ] 94 95 95 96 # Only Mac supports force tests. -
trunk/LayoutTests/platform/ios-12/TestExpectations
r249157 r249517 1 1 css-dark-mode [ Skip ] 2 2 css-dark-mode/older-systems [ Pass ] 3 editing/pasteboard/paste-dark-mode-color-filtered.html [ Skip ] 3 4 4 5 # <rdar://problem/48781098> HEIF and HEICS images are supported only on iOS 13 -
trunk/LayoutTests/platform/ios/TestExpectations
r249176 r249517 3243 3243 css-dark-mode [ Pass ] 3244 3244 css-dark-mode/older-systems [ Skip ] 3245 editing/pasteboard/paste-dark-mode-color-filtered.html [ Pass ] 3245 3246 3246 3247 fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button.html [ Pass ] -
trunk/LayoutTests/platform/mac/TestExpectations
r249205 r249517 1750 1750 [ Mojave+ ] css-dark-mode/older-systems [ Skip ] 1751 1751 [ Mojave+ ] inspector/css/force-page-appearance.html [ Pass ] 1752 [ Mojave+ ] editing/pasteboard/paste-dark-mode-color-filtered.html [ Pass ] 1752 1753 1753 1754 # Test Dark Mode CSS support for light mode on older systems. -
trunk/Source/WebCore/ChangeLog
r249516 r249517 1 2019-09-04 Timothy Hatcher <timothy@apple.com> 2 3 Mail appears to be double inverting code copied from Notes, Xcode, or Terminal. 4 https://bugs.webkit.org/show_bug.cgi?id=201368 5 rdar://problem/40529867 6 7 Reviewed by Ryosuke Niwa. 8 9 Dark mode content that is pasted should have the inline styles inverse color 10 transformed by the color filter to match the color filtered document contents. 11 12 Layout Test: editing/pasteboard/paste-dark-mode-color-filtered.html 13 API Tests: PasteHTML.TransformColorsOfDarkContent, PasteHTML.DoesNotTransformColorsOfLightContent, 14 PasteRTFD.TransformColorsOfDarkContent, PasteRTFD.DoesNotTransformColorsOfLightContent 15 16 * editing/EditingStyle.cpp: 17 (WebCore::EditingStyle::inverseTransformColorIfNeeded): Added caret-color to the transformed properties. 18 * editing/ReplaceSelectionCommand.cpp: 19 (WebCore::fragmentNeedsColorTransformed): Added. 20 (WebCore::ReplaceSelectionCommand::inverseTransformColor): Added. 21 (WebCore::ReplaceSelectionCommand::doApply): Call fragmentNeedsColorTransformed() and inverseTransformColor(). 22 * editing/ReplaceSelectionCommand.h: 23 1 24 2019-09-04 Chris Dumez <cdumez@apple.com> 2 25 -
trunk/Source/WebCore/editing/EditingStyle.cpp
r247720 r249517 1581 1581 1582 1582 bool hasColor = m_mutableStyle->getPropertyCSSValue(CSSPropertyColor); 1583 bool hasCaretColor = m_mutableStyle->getPropertyCSSValue(CSSPropertyCaretColor); 1583 1584 bool hasBackgroundColor = m_mutableStyle->getPropertyCSSValue(CSSPropertyBackgroundColor); 1584 if (!hasColor && !has BackgroundColor)1585 if (!hasColor && !hasCaretColor && !hasBackgroundColor) 1585 1586 return *this; 1586 1587 … … 1597 1598 if (hasColor) 1598 1599 invertedColor(CSSPropertyColor); 1600 1601 if (hasCaretColor) 1602 invertedColor(CSSPropertyCaretColor); 1599 1603 1600 1604 if (hasBackgroundColor) -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r249307 r249517 56 56 #include "NodeList.h" 57 57 #include "NodeRenderStyle.h" 58 #include "Position.h" 58 59 #include "RenderInline.h" 59 60 #include "RenderText.h" … … 519 520 // be a no-op and cause infinite recursion. 520 521 && !isBlock(sourceNode) && !isBlock(destinationNode); 522 } 523 524 static bool fragmentNeedsColorTransformed(ReplacementFragment& fragment, const Position& insertionPos) 525 { 526 // Dark mode content that is inserted should have the inline styles inverse color 527 // transformed by the color filter to match the color filtered document contents. 528 // This applies to Mail and Notes when pasting from Xcode. <rdar://problem/40529867> 529 530 RefPtr<Element> editableRoot = insertionPos.rootEditableElement(); 531 ASSERT(editableRoot); 532 if (!editableRoot) 533 return false; 534 535 auto* editableRootRenderer = editableRoot->renderer(); 536 if (!editableRootRenderer || !editableRootRenderer->style().hasAppleColorFilter()) 537 return false; 538 539 const auto& colorFilter = editableRootRenderer->style().appleColorFilter(); 540 for (const auto& colorFilterOperation : colorFilter.operations()) { 541 if (colorFilterOperation->type() != FilterOperation::APPLE_INVERT_LIGHTNESS) 542 return false; 543 } 544 545 auto propertyLightness = [&](const StyleProperties& inlineStyle, CSSPropertyID propertyID) -> Optional<double> { 546 auto color = inlineStyle.propertyAsColor(propertyID); 547 if (!color || !color.value().isVisible() || color.value().isSemantic()) 548 return { }; 549 550 double hue, saturation, lightness; 551 color.value().getHSL(hue, saturation, lightness); 552 return lightness; 553 }; 554 555 const double lightnessDarkEnoughForText = 0.4; 556 const double lightnessLightEnoughForBackground = 0.6; 557 558 for (RefPtr<Node> node = fragment.firstChild(); node; node = NodeTraversal::next(*node)) { 559 if (!is<StyledElement>(*node)) 560 continue; 561 562 auto& element = downcast<StyledElement>(*node); 563 auto* inlineStyle = element.inlineStyle(); 564 if (!inlineStyle) 565 continue; 566 567 auto textLightness = propertyLightness(*inlineStyle, CSSPropertyColor); 568 if (textLightness && *textLightness < lightnessDarkEnoughForText) 569 return false; 570 571 auto backgroundLightness = propertyLightness(*inlineStyle, CSSPropertyBackgroundColor); 572 if (backgroundLightness && *backgroundLightness > lightnessLightEnoughForBackground) 573 return false; 574 } 575 576 return true; 577 } 578 579 void ReplaceSelectionCommand::inverseTransformColor(InsertedNodes& insertedNodes) 580 { 581 RefPtr<Node> pastEndNode = insertedNodes.pastLastLeaf(); 582 for (RefPtr<Node> node = insertedNodes.firstNodeInserted(); node && node != pastEndNode; node = NodeTraversal::next(*node)) { 583 if (!is<StyledElement>(*node)) 584 continue; 585 586 auto& element = downcast<StyledElement>(*node); 587 auto* inlineStyle = element.inlineStyle(); 588 if (!inlineStyle) 589 continue; 590 591 auto editingStyle = EditingStyle::create(inlineStyle); 592 auto transformedStyle = editingStyle->inverseTransformColorIfNeeded(element); 593 if (editingStyle.ptr() == transformedStyle.ptr()) 594 continue; 595 596 setNodeAttribute(element, styleAttr, transformedStyle->style()->asText()); 597 } 521 598 } 522 599 … … 1116 1193 1117 1194 bool hasBlankLinesBetweenParagraphs = hasBlankLineBetweenParagraphs(insertionPos); 1118 1119 1195 bool handledStyleSpans = handleStyleSpansBeforeInsertion(fragment, insertionPos); 1196 bool needsColorTransformed = fragmentNeedsColorTransformed(fragment, insertionPos); 1120 1197 1121 1198 // We're finished if there is nothing to add. … … 1228 1305 } 1229 1306 } 1230 1307 1231 1308 makeInsertedContentRoundTrippableWithHTMLTreeBuilder(insertedNodes); 1232 1309 if (insertedNodes.isEmpty()) 1233 1310 return; 1311 1312 if (needsColorTransformed) 1313 inverseTransformColor(insertedNodes); 1234 1314 1235 1315 removeRedundantStylesAndKeepStyleSpanInline(insertedNodes); -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.h
r243124 r249517 100 100 101 101 void removeRedundantStylesAndKeepStyleSpanInline(InsertedNodes&); 102 void inverseTransformColor(InsertedNodes&); 102 103 void makeInsertedContentRoundTrippableWithHTMLTreeBuilder(InsertedNodes&); 103 104 void moveNodeOutOfAncestor(Node&, Node& ancestor, InsertedNodes&); -
trunk/Tools/ChangeLog
r249514 r249517 1 2019-09-04 Timothy Hatcher <timothy@apple.com> 2 3 Mail appears to be double inverting code copied from Notes, Xcode, or Terminal. 4 https://bugs.webkit.org/show_bug.cgi?id=201368 5 rdar://problem/40529867 6 7 Reviewed by Ryosuke Niwa. 8 9 Added Tests: PasteHTML.TransformColorsOfDarkContent, PasteHTML.DoesNotTransformColorsOfLightContent, 10 PasteRTFD.TransformColorsOfDarkContent, PasteRTFD.DoesNotTransformColorsOfLightContent 11 12 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 13 * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm: 14 (createWebViewWithCustomPasteboardDataSetting): Added argument to enable color filter. 15 * TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm: 16 (createWebViewWithCustomPasteboardDataEnabled): Added argument to enable color filter. 17 * TestWebKitAPI/Tests/WebKitCocoa/rich-color-filtered.html: Added. 18 * TestWebKitAPI/cocoa/TestWKWebView.h: 19 * TestWebKitAPI/cocoa/TestWKWebView.mm: 20 (-[TestWKWebView forceDarkMode]): 21 1 22 2019-09-04 Wenson Hsieh <wenson_hsieh@apple.com> 2 23 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r249311 r249517 107 107 1C9EB8411E380DA1005C6442 /* ComplexTextController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C9EB8401E380DA1005C6442 /* ComplexTextController.cpp */; }; 108 108 1CACADA1230620AE0007D54C /* WKWebViewOpaque.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CACADA0230620AD0007D54C /* WKWebViewOpaque.mm */; }; 109 1CE6FAC32320267C00E48F6E /* rich-color-filtered.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1CE6FAC12320264F00E48F6E /* rich-color-filtered.html */; }; 109 110 1CF59AE221E68925006E37EC /* ForceLightAppearanceInBundle_Bundle.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CF59AE021E68925006E37EC /* ForceLightAppearanceInBundle_Bundle.mm */; }; 110 111 1CF59AE321E68932006E37EC /* ForceLightAppearanceInBundle.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CF59ADF21E68925006E37EC /* ForceLightAppearanceInBundle.mm */; }; … … 1373 1374 A12DDC001E8373E700CF6CAE /* rendered-image-excluding-overflow.html in Copy Resources */, 1374 1375 F46849C01EEF5EF300B937FE /* rich-and-plain-text.html in Copy Resources */, 1376 1CE6FAC32320267C00E48F6E /* rich-color-filtered.html in Copy Resources */, 1375 1377 2E92B8F7216490D4005B64F0 /* rich-text-attributes.html in Copy Resources */, 1376 1378 0F5651F91FCE513500310FBC /* scroll-to-anchor.html in Copy Resources */, … … 1525 1527 1CACADA0230620AD0007D54C /* WKWebViewOpaque.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewOpaque.mm; sourceTree = "<group>"; }; 1526 1528 1CB9BC371A67482300FE5678 /* WeakPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakPtr.cpp; sourceTree = "<group>"; }; 1529 1CE6FAC12320264F00E48F6E /* rich-color-filtered.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "rich-color-filtered.html"; sourceTree = "<group>"; }; 1527 1530 1CF0D3781BBF2F3D00B4EF54 /* WKRetainPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKRetainPtr.cpp; sourceTree = "<group>"; }; 1528 1531 1CF59ADF21E68925006E37EC /* ForceLightAppearanceInBundle.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ForceLightAppearanceInBundle.mm; sourceTree = "<group>"; }; … … 3304 3307 A12DDBFF1E8373C100CF6CAE /* rendered-image-excluding-overflow.html */, 3305 3308 F46849BF1EEF5EDC00B937FE /* rich-and-plain-text.html */, 3309 1CE6FAC12320264F00E48F6E /* rich-color-filtered.html */, 3306 3310 2E92B8F6216490C3005B64F0 /* rich-text-attributes.html */, 3307 3311 F4E0A295211FC5A300AF7C7F /* selected-text-and-textarea.html */, -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm
r247720 r249517 58 58 #endif 59 59 60 static RetainPtr<TestWKWebView> createWebViewWithCustomPasteboardDataSetting(bool enabled) 61 { 62 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 400, 400)]); 60 static RetainPtr<TestWKWebView> createWebViewWithCustomPasteboardDataSetting(bool enabled, bool colorFilterEnabled = false) 61 { 62 auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); 63 [webViewConfiguration _setColorFilterEnabled:colorFilterEnabled]; 64 65 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 400, 400) configuration:webViewConfiguration.get()]); 63 66 auto preferences = (__bridge WKPreferencesRef)[[webView configuration] preferences]; 64 67 WKPreferencesSetDataTransferItemsEnabled(preferences, true); … … 358 361 } 359 362 363 #if ENABLE(DARK_MODE_CSS) && HAVE(OS_DARK_MODE_SUPPORT) 364 365 TEST(PasteHTML, TransformColorsOfDarkContent) 366 { 367 auto webView = createWebViewWithCustomPasteboardDataSetting(true, true); 368 [webView forceDarkMode]; 369 370 [webView synchronouslyLoadTestPageNamed:@"rich-color-filtered"]; 371 372 writeHTMLToPasteboard(@"<span style=\"color: rgb(238, 238, 238); background-color: rgb(51, 51, 51)\">Hello</span>"); 373 374 [webView stringByEvaluatingJavaScript:@"selectRichText()"]; 375 [webView paste:nil]; 376 377 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('span').style.color"], @"rgb(21, 21, 21)"); 378 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('span').style.backgroundColor"], @"rgb(255, 255, 255)"); 379 } 380 381 TEST(PasteHTML, DoesNotTransformColorsOfLightContent) 382 { 383 auto webView = createWebViewWithCustomPasteboardDataSetting(true, true); 384 [webView forceDarkMode]; 385 386 [webView synchronouslyLoadTestPageNamed:@"rich-color-filtered"]; 387 388 writeHTMLToPasteboard(@"<span style=\"color: rgb(101, 101, 101)\">Hello</span>"); 389 390 [webView stringByEvaluatingJavaScript:@"selectRichText()"]; 391 [webView paste:nil]; 392 393 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('span').style.color"], @"rgb(101, 101, 101)"); 394 } 395 396 #endif // ENABLE(DARK_MODE_CSS) && HAVE(OS_DARK_MODE_SUPPORT) 397 360 398 #endif // PLATFORM(COCOA) -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm
r242339 r249517 40 40 #endif 41 41 42 #if USE(APPKIT) 43 using PlatformColor = NSColor; 44 #else 45 using PlatformColor = UIColor; 46 #endif 47 42 48 @interface WKWebView () 43 49 - (void)paste:(id)sender; … … 77 83 #endif 78 84 79 static RetainPtr<TestWKWebView> createWebViewWithCustomPasteboardDataEnabled() 80 { 81 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 400, 400)]); 85 static RetainPtr<TestWKWebView> createWebViewWithCustomPasteboardDataEnabled(bool colorFilterEnabled = false) 86 { 87 auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); 88 [webViewConfiguration _setColorFilterEnabled:colorFilterEnabled]; 89 90 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 400, 400) configuration:webViewConfiguration.get()]); 82 91 auto preferences = (__bridge WKPreferencesRef)[[webView configuration] preferences]; 83 92 WKPreferencesSetDataTransferItemsEnabled(preferences, true); … … 177 186 } 178 187 179 #endif // PLATFORM(MAC) 180 181 182 188 #if ENABLE(DARK_MODE_CSS) && HAVE(OS_DARK_MODE_SUPPORT) 189 190 TEST(PasteRTFD, TransformColorsOfDarkContent) 191 { 192 auto webView = createWebViewWithCustomPasteboardDataEnabled(true); 193 [webView forceDarkMode]; 194 195 [webView synchronouslyLoadTestPageNamed:@"rich-color-filtered"]; 196 197 PlatformColor *textColor = [PlatformColor lightGrayColor]; 198 PlatformColor *backgroundColor = [PlatformColor darkGrayColor]; 199 200 auto hello = adoptNS([[NSAttributedString alloc] initWithString:@"Hello" attributes:@{ NSBackgroundColorAttributeName : backgroundColor, NSForegroundColorAttributeName : textColor }]); 201 auto world = adoptNS([[NSAttributedString alloc] initWithString:@" World" attributes:@{ NSForegroundColorAttributeName : textColor }]); 202 auto string = adoptNS([[NSMutableAttributedString alloc] init]); 203 [string appendAttributedString:hello.get()]; 204 [string appendAttributedString:world.get()]; 205 206 writeRTFToPasteboard([string RTFFromRange:NSMakeRange(0, [string length]) documentAttributes:@{ }]); 207 208 [webView stringByEvaluatingJavaScript:@"selectRichText()"]; 209 [webView paste:nil]; 210 211 #if USE(APPKIT) 212 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('p').style.color"], @"rgb(126, 126, 126)"); 213 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('p > span').style.backgroundColor"], @"rgb(235, 235, 235)"); 214 #else 215 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('p').style.color"], @"rgb(106, 106, 106)"); 216 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('p > span').style.backgroundColor"], @"rgb(213, 213, 213)"); 217 #endif 218 } 219 220 TEST(PasteRTFD, DoesNotTransformColorsOfLightContent) 221 { 222 auto webView = createWebViewWithCustomPasteboardDataEnabled(true); 223 [webView forceDarkMode]; 224 225 [webView synchronouslyLoadTestPageNamed:@"rich-color-filtered"]; 226 227 PlatformColor *textColor = [PlatformColor darkGrayColor]; 228 PlatformColor *backgroundColor = [PlatformColor lightGrayColor]; 229 230 auto hello = adoptNS([[NSAttributedString alloc] initWithString:@"Hello" attributes:@{ NSBackgroundColorAttributeName : backgroundColor, NSForegroundColorAttributeName : textColor }]); 231 auto world = adoptNS([[NSAttributedString alloc] initWithString:@" World" attributes:@{ NSForegroundColorAttributeName : textColor }]); 232 auto string = adoptNS([[NSMutableAttributedString alloc] init]); 233 [string appendAttributedString:hello.get()]; 234 [string appendAttributedString:world.get()]; 235 236 writeRTFToPasteboard([string RTFFromRange:NSMakeRange(0, [string length]) documentAttributes:@{ }]); 237 238 [webView stringByEvaluatingJavaScript:@"selectRichText()"]; 239 [webView paste:nil]; 240 241 #if USE(APPKIT) 242 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('p').style.color"], @"rgb(67, 67, 67)"); 243 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('p > span').style.backgroundColor"], @"rgb(154, 154, 154)"); 244 #else 245 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('p').style.color"], @"rgb(85, 85, 85)"); 246 EXPECT_WK_STREQ([webView stringByEvaluatingJavaScript:@"rich.querySelector('p > span').style.backgroundColor"], @"rgb(170, 170, 170)"); 247 #endif 248 } 249 250 #endif // ENABLE(DARK_MODE_CSS) && HAVE(OS_DARK_MODE_SUPPORT) 251 252 #endif // PLATFORM(COCOA) -
trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h
r248820 r249517 76 76 - (void)performAfterLoading:(dispatch_block_t)actions; 77 77 - (void)waitForNextPresentationUpdate; 78 - (void)forceDarkMode; 78 79 - (NSString *)stylePropertyAtSelectionStart:(NSString *)propertyName; 79 80 - (NSString *)stylePropertyAtSelectionEnd:(NSString *)propertyName; -
trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm
r249327 r249517 435 435 } 436 436 437 - (void)forceDarkMode 438 { 439 #if HAVE(OS_DARK_MODE_SUPPORT) 440 #if USE(APPKIT) 441 [self setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]]; 442 #else 443 [self setOverrideUserInterfaceStyle:UIUserInterfaceStyleDark]; 444 #endif 445 #endif 446 } 447 437 448 - (NSString *)stylePropertyAtSelectionStart:(NSString *)propertyName 438 449 {
Note: See TracChangeset
for help on using the changeset viewer.