Changeset 102199 in webkit
- Timestamp:
- Dec 6, 2011, 5:29:05 PM (15 years ago)
- Location:
- branches/safari-534.53-branch/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/mac/GraphicsContextMac.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-534.53-branch/Source/WebCore/ChangeLog
r102195 r102199 1 2011-12-06 Lucas Forschler <lforschler@apple.com> 2 3 Merge 97517 4 5 2011-10-14 Beth Dakin <bdakin@apple.com> 6 7 https://bugs.webkit.org/show_bug.cgi?id=70148 8 Should switch to CoreUI version of CorrectionDot, GrammarDot, and SpellingDot 9 -and corresponding- 10 <rdar://problem/10208281> 11 12 Reviewed by Anders Carlsson. 13 14 Use NS*Dot whenever it's available, and fallback to *Dot only when it is not. 15 * platform/graphics/mac/GraphicsContextMac.mm: 16 (WebCore::createPatternColor): 17 (WebCore::GraphicsContext::drawLineForTextChecking): 18 1 19 2011-12-06 Lucas Forschler <lforschler@apple.com> 2 20 -
branches/safari-534.53-branch/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm
r85036 r102199 83 83 84 84 85 static NSColor* createPatternColor(NSString* name, NSColor* defaultColor, bool& usingDot)85 static NSColor* createPatternColor(NSString* firstChoiceName, NSString* secondChoiceName, NSColor* defaultColor, bool& usingDot) 86 86 { 87 NSImage *image = [NSImage imageNamed:name]; 87 // Eventually we should be able to get rid of the secondChoiceName. For the time being we need both to keep 88 // this working on all platforms. 89 NSImage *image = [NSImage imageNamed:firstChoiceName]; 90 if (!image) 91 image = [NSImage imageNamed:secondChoiceName]; 88 92 ASSERT(image); // if image is not available, we want to know 89 93 NSColor *color = (image ? [NSColor colorWithPatternImage:image] : nil); … … 112 116 // Constants for spelling pattern color. 113 117 static bool usingDotForSpelling = false; 114 DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, spellingPatternColor, (createPatternColor(@" SpellingDot", [NSColor redColor], usingDotForSpelling)));118 DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, spellingPatternColor, (createPatternColor(@"NSSpellingDot", @"SpellingDot", [NSColor redColor], usingDotForSpelling))); 115 119 usingDot = usingDotForSpelling; 116 120 patternColor = spellingPatternColor.get(); … … 121 125 // Constants for grammar pattern color. 122 126 static bool usingDotForGrammar = false; 123 DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, grammarPatternColor, (createPatternColor(@" GrammarDot", [NSColor greenColor], usingDotForGrammar)));127 DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, grammarPatternColor, (createPatternColor(@"NSGrammarDot", @"GrammarDot", [NSColor greenColor], usingDotForGrammar))); 124 128 usingDot = usingDotForGrammar; 125 129 patternColor = grammarPatternColor.get(); … … 132 136 // Constants for spelling pattern color. 133 137 static bool usingDotForSpelling = false; 134 DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, spellingPatternColor, (createPatternColor(@" CorrectionDot", [NSColor blueColor], usingDotForSpelling)));138 DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, spellingPatternColor, (createPatternColor(@"NSCorrectionDot", @"CorrectionDot", [NSColor blueColor], usingDotForSpelling))); 135 139 usingDot = usingDotForSpelling; 136 140 patternColor = spellingPatternColor.get();
Note:
See TracChangeset
for help on using the changeset viewer.