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

Changeset 263293 in webkit


Ignore:
Timestamp:
Jun 19, 2020, 3:50:20 PM (6 years ago)
Author:
Chris Dumez
Message:

Avoid initializing RenderTheme singleton unnecessarily in the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=213406

Reviewed by Per Arne Vollan.

Avoid initializing RenderTheme singleton unnecessarily in the UIProcess. Instead, introduce
a static function to get the focus ring color on iOS.

Source/WebCore:

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::systemFocusRingColor):
(WebCore::RenderThemeIOS::platformFocusRingColor const):

Source/WebKit:

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r263285 r263293  
     12020-06-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Avoid initializing RenderTheme singleton unnecessarily in the UIProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=213406
     5
     6        Reviewed by Per Arne Vollan.
     7
     8        Avoid initializing RenderTheme singleton unnecessarily in the UIProcess. Instead, introduce
     9        a static function to get the focus ring color on iOS.
     10
     11        * rendering/RenderThemeIOS.h:
     12        * rendering/RenderThemeIOS.mm:
     13        (WebCore::RenderThemeIOS::systemFocusRingColor):
     14        (WebCore::RenderThemeIOS::platformFocusRingColor const):
     15
    1162020-06-19  Andres Gonzalez  <andresg_22@apple.com>
    217
  • trunk/Source/WebCore/rendering/RenderThemeIOS.h

    r263255 r263293  
    6565
    6666    WEBCORE_EXPORT static void setFocusRingColor(const Color&);
     67
     68#if ENABLE(FULL_KEYBOARD_ACCESS)
     69    WEBCORE_EXPORT static Color systemFocusRingColor();
     70#endif
    6771
    6872private:
  • trunk/Source/WebCore/rendering/RenderThemeIOS.mm

    r263282 r263293  
    11461146
    11471147#if ENABLE(FULL_KEYBOARD_ACCESS)
     1148Color RenderThemeIOS::systemFocusRingColor()
     1149{
     1150    if (!cachedFocusRingColor().hasValue()) {
     1151        // FIXME: Should be using -keyboardFocusIndicatorColor. For now, work around <rdar://problem/50838886>.
     1152        cachedFocusRingColor() = colorFromUIColor([PAL::getUIColorClass() systemBlueColor]);
     1153    }
     1154    return *cachedFocusRingColor();
     1155}
     1156
    11481157Color RenderThemeIOS::platformFocusRingColor(OptionSet<StyleColor::Options>) const
    11491158{
    1150     if (cachedFocusRingColor().hasValue())
    1151         return *cachedFocusRingColor();
    1152 
    1153     // FIXME: Should be using -keyboardFocusIndicatorColor. For now, work around <rdar://problem/50838886>.
    1154     return colorFromUIColor([PAL::getUIColorClass() systemBlueColor]);
     1159    return systemFocusRingColor();
    11551160}
    11561161#endif
  • trunk/Source/WebKit/ChangeLog

    r263289 r263293  
     12020-06-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Avoid initializing RenderTheme singleton unnecessarily in the UIProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=213406
     5
     6        Reviewed by Per Arne Vollan.
     7
     8        Avoid initializing RenderTheme singleton unnecessarily in the UIProcess. Instead, introduce
     9        a static function to get the focus ring color on iOS.
     10
     11        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
     12        (WebKit::WebProcessPool::platformInitializeWebProcess):
     13
    1142020-06-19  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm

    r263289 r263293  
    462462    parameters.supportsPictureInPicture = supportsPictureInPicture();
    463463    parameters.cssValueToSystemColorMap = RenderThemeIOS::cssValueToSystemColorMap();
    464     parameters.focusRingColor = RenderTheme::singleton().focusRingColor(OptionSet<StyleColor::Options>());
     464#if ENABLE(FULL_KEYBOARD_ACCESS)
     465    parameters.focusRingColor = RenderThemeIOS::systemFocusRingColor();
     466#endif
    465467    parameters.localizedDeviceModel = localizedDeviceModel();
    466468#endif
Note: See TracChangeset for help on using the changeset viewer.