⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 102199 in webkit


Ignore:
Timestamp:
Dec 6, 2011, 5:29:05 PM (15 years ago)
Author:
Lucas Forschler
Message:

Merged r97517.

Location:
branches/safari-534.53-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-534.53-branch/Source/WebCore/ChangeLog

    r102195 r102199  
     12011-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
    1192011-12-06  Lucas Forschler  <lforschler@apple.com>
    220
  • branches/safari-534.53-branch/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm

    r85036 r102199  
    8383
    8484
    85 static NSColor* createPatternColor(NSString* name, NSColor* defaultColor, bool& usingDot)
     85static NSColor* createPatternColor(NSString* firstChoiceName, NSString* secondChoiceName, NSColor* defaultColor, bool& usingDot)
    8686{
    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];
    8892    ASSERT(image); // if image is not available, we want to know
    8993    NSColor *color = (image ? [NSColor colorWithPatternImage:image] : nil);
     
    112116            // Constants for spelling pattern color.
    113117            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)));
    115119            usingDot = usingDotForSpelling;
    116120            patternColor = spellingPatternColor.get();
     
    121125            // Constants for grammar pattern color.
    122126            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)));
    124128            usingDot = usingDotForGrammar;
    125129            patternColor = grammarPatternColor.get();
     
    132136            // Constants for spelling pattern color.
    133137            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)));
    135139            usingDot = usingDotForSpelling;
    136140            patternColor = spellingPatternColor.get();
Note: See TracChangeset for help on using the changeset viewer.