Bug 187425

Summary: Semantic colors don't update when accessibility Increase Contrast mode is enabled
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: WebCore Misc.Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, koivisto, megan_gardner, realdawei, ryanhaddad, thorton, tsavell
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 187475    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from webkit-cq-02 for mac-sierra
none
Patch
none
Patch none

Description Timothy Hatcher 2018-07-06 17:04:25 PDT
<rdar://problem/39948240>
Comment 1 Timothy Hatcher 2018-07-06 17:38:06 PDT Comment hidden (obsolete)
Comment 2 Tim Horton 2018-07-06 18:01:20 PDT Comment hidden (obsolete)
Comment 3 Timothy Hatcher 2018-07-06 18:07:24 PDT Comment hidden (obsolete)
Comment 4 WebKit Commit Bot 2018-07-06 19:19:07 PDT Comment hidden (obsolete)
Comment 5 WebKit Commit Bot 2018-07-06 19:19:09 PDT Comment hidden (obsolete)
Comment 6 WebKit Commit Bot 2018-07-06 20:42:22 PDT Comment hidden (obsolete)
Comment 7 WebKit Commit Bot 2018-07-06 20:43:10 PDT Comment hidden (obsolete)
Comment 8 WebKit Commit Bot 2018-07-06 20:43:12 PDT Comment hidden (obsolete)
Comment 9 Antti Koivisto 2018-07-07 06:23:00 PDT
Comment on attachment 344495 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=344495&action=review

> Source/WebCore/page/Page.cpp:536
> +        if (StyleResolver* styleResolver = document->styleScope().resolverIfExists())
> +            styleResolver->invalidateMatchedPropertiesCache();
> +        document->scheduleForcedStyleRecalc();
> +        document->styleScope().didChangeStyleSheetEnvironment();

Only the last one of these should really be needed (the rest are harmless though).
Comment 10 Timothy Hatcher 2018-07-07 12:02:33 PDT
(In reply to Antti Koivisto from comment #9)
> Comment on attachment 344495 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=344495&action=review
> 
> > Source/WebCore/page/Page.cpp:536
> > +        if (StyleResolver* styleResolver = document->styleScope().resolverIfExists())
> > +            styleResolver->invalidateMatchedPropertiesCache();
> > +        document->scheduleForcedStyleRecalc();
> > +        document->styleScope().didChangeStyleSheetEnvironment();
> 
> Only the last one of these should really be needed (the rest are harmless
> though).

They all seemed to be needed in my testing.
Comment 11 Truitt Savell 2018-07-09 08:34:28 PDT Comment hidden (obsolete)
Comment 12 WebKit Commit Bot 2018-07-09 09:25:56 PDT Comment hidden (obsolete)
Comment 13 Timothy Hatcher 2018-07-09 15:18:55 PDT Comment hidden (obsolete)
Comment 14 Timothy Hatcher 2018-07-09 15:22:09 PDT
Created attachment 344626 [details]
Patch
Comment 15 WebKit Commit Bot 2018-07-09 16:14:48 PDT Comment hidden (obsolete)
Comment 16 WebKit Commit Bot 2018-07-09 16:15:00 PDT Comment hidden (obsolete)
Comment 17 WebKit Commit Bot 2018-07-09 17:22:10 PDT
Comment on attachment 344626 [details]
Patch

Clearing flags on attachment: 344626

Committed r233670: <https://trac.webkit.org/changeset/233670>
Comment 18 WebKit Commit Bot 2018-07-09 17:22:12 PDT
All reviewed patches have been landed.  Closing bug.
Comment 19 Truitt Savell 2018-07-10 08:39:31 PDT
After r233670 we are having the same api test failure on all platforms. 

Link to output of test failure: 
https://build.webkit.org/builders/Apple%20High%20Sierra%20Release%20WK2%20%28Tests%29/builds/5539/steps/run-api-tests/logs/stdio

excerpt: 
Test suite failed

Failed

    TestWebKitAPI.WebKit.LinkColorWithSystemAppearance
        
        /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:56
        Value of: linkColor
          Actual: "rgb(0, 105, 217)"
        Expected: "rgb(0, 104, 218)"

It is good to note though that the actual and expected color is only off by one point this time.
Comment 20 Timothy Hatcher 2018-07-10 09:54:03 PDT
(In reply to Truitt Savell from comment #19)
> After r233670 we are having the same api test failure on all platforms. 
> 
> Link to output of test failure: 
> https://build.webkit.org/builders/
> Apple%20High%20Sierra%20Release%20WK2%20%28Tests%29/builds/5539/steps/run-
> api-tests/logs/stdio
> 
> excerpt: 
> Test suite failed
> 
> Failed
> 
>     TestWebKitAPI.WebKit.LinkColorWithSystemAppearance
>         
>        
> /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/
> WebKitCocoa/SystemColors.mm:56
>         Value of: linkColor
>           Actual: "rgb(0, 105, 217)"
>         Expected: "rgb(0, 104, 218)"
> 
> It is good to note though that the actual and expected color is only off by
> one point this time.

It seems this differs from macOS 10.14 and previous systems.
Comment 21 Ryan Haddad 2018-07-10 17:24:34 PDT
(In reply to Timothy Hatcher from comment #20)
> (In reply to Truitt Savell from comment #19)
> > After r233670 we are having the same api test failure on all platforms. 
> > 
> > Link to output of test failure: 
> > https://build.webkit.org/builders/
> > Apple%20High%20Sierra%20Release%20WK2%20%28Tests%29/builds/5539/steps/run-
> > api-tests/logs/stdio
> > 
> > excerpt: 
> > Test suite failed
> > 
> > Failed
> > 
> >     TestWebKitAPI.WebKit.LinkColorWithSystemAppearance
> >         
> >        
> > /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/
> > WebKitCocoa/SystemColors.mm:56
> >         Value of: linkColor
> >           Actual: "rgb(0, 105, 217)"
> >         Expected: "rgb(0, 104, 218)"
> > 
> > It is good to note though that the actual and expected color is only off by
> > one point this time.
> 
> It seems this differs from macOS 10.14 and previous systems.
Are we tracking a fix for this somewhere?