Title: [263293] trunk/Source
- Revision
- 263293
- Author
- cdu...@apple.com
- Date
- 2020-06-19 15:50:20 -0700 (Fri, 19 Jun 2020)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (263292 => 263293)
--- trunk/Source/WebCore/ChangeLog 2020-06-19 22:40:26 UTC (rev 263292)
+++ trunk/Source/WebCore/ChangeLog 2020-06-19 22:50:20 UTC (rev 263293)
@@ -1,3 +1,18 @@
+2020-06-19 Chris Dumez <cdu...@apple.com>
+
+ 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.
+
+ * rendering/RenderThemeIOS.h:
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::RenderThemeIOS::systemFocusRingColor):
+ (WebCore::RenderThemeIOS::platformFocusRingColor const):
+
2020-06-19 Andres Gonzalez <andresg...@apple.com>
AX: web process crash in AXObjectCache::postNotification.
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.h (263292 => 263293)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.h 2020-06-19 22:40:26 UTC (rev 263292)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.h 2020-06-19 22:50:20 UTC (rev 263293)
@@ -65,6 +65,10 @@
WEBCORE_EXPORT static void setFocusRingColor(const Color&);
+#if ENABLE(FULL_KEYBOARD_ACCESS)
+ WEBCORE_EXPORT static Color systemFocusRingColor();
+#endif
+
private:
LengthBox popupInternalPaddingBox(const RenderStyle&) const override;
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (263292 => 263293)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2020-06-19 22:40:26 UTC (rev 263292)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2020-06-19 22:50:20 UTC (rev 263293)
@@ -1145,13 +1145,18 @@
}
#if ENABLE(FULL_KEYBOARD_ACCESS)
+Color RenderThemeIOS::systemFocusRingColor()
+{
+ if (!cachedFocusRingColor().hasValue()) {
+ // FIXME: Should be using -keyboardFocusIndicatorColor. For now, work around <rdar://problem/50838886>.
+ cachedFocusRingColor() = colorFromUIColor([PAL::getUIColorClass() systemBlueColor]);
+ }
+ return *cachedFocusRingColor();
+}
+
Color RenderThemeIOS::platformFocusRingColor(OptionSet<StyleColor::Options>) const
{
- if (cachedFocusRingColor().hasValue())
- return *cachedFocusRingColor();
-
- // FIXME: Should be using -keyboardFocusIndicatorColor. For now, work around <rdar://problem/50838886>.
- return colorFromUIColor([PAL::getUIColorClass() systemBlueColor]);
+ return systemFocusRingColor();
}
#endif
Modified: trunk/Source/WebKit/ChangeLog (263292 => 263293)
--- trunk/Source/WebKit/ChangeLog 2020-06-19 22:40:26 UTC (rev 263292)
+++ trunk/Source/WebKit/ChangeLog 2020-06-19 22:50:20 UTC (rev 263293)
@@ -1,5 +1,18 @@
2020-06-19 Chris Dumez <cdu...@apple.com>
+ 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.
+
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::WebProcessPool::platformInitializeWebProcess):
+
+2020-06-19 Chris Dumez <cdu...@apple.com>
+
Unreviewed build fix after r263288.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (263292 => 263293)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2020-06-19 22:40:26 UTC (rev 263292)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2020-06-19 22:50:20 UTC (rev 263293)
@@ -461,7 +461,9 @@
parameters.currentUserInterfaceIdiomIsPad = currentUserInterfaceIdiomIsPad();
parameters.supportsPictureInPicture = supportsPictureInPicture();
parameters.cssValueToSystemColorMap = RenderThemeIOS::cssValueToSystemColorMap();
- parameters.focusRingColor = RenderTheme::singleton().focusRingColor(OptionSet<StyleColor::Options>());
+#if ENABLE(FULL_KEYBOARD_ACCESS)
+ parameters.focusRingColor = RenderThemeIOS::systemFocusRingColor();
+#endif
parameters.localizedDeviceModel = localizedDeviceModel();
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes