Changeset 255457 in webkit
- Timestamp:
- Jan 30, 2020 2:13:23 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r255452 r255457 1 2020-01-30 Per Arne Vollan <pvollan@apple.com> 2 3 [iOS] Issue mach sandbox extension to the frontboard and icon service when the attachment element is enabled 4 https://bugs.webkit.org/show_bug.cgi?id=205443 5 6 Reviewed by Brent Fulgham. 7 8 * fast/sandbox/ios/focus-ring-color-expected.txt: Added. 9 * fast/sandbox/ios/focus-ring-color.html: Added. 10 * fast/sandbox/ios/sandbox-mach-lookup-attachment-element-expected.txt: Added. 11 * fast/sandbox/ios/sandbox-mach-lookup-attachment-element.html: Added. 12 1 13 2020-01-30 Alexey Shvayka <shvaikalesh@gmail.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r255455 r255457 1 2020-01-30 Per Arne Vollan <pvollan@apple.com> 2 3 [iOS] Issue mach sandbox extension to the frontboard and icon service when the attachment element is enabled 4 https://bugs.webkit.org/show_bug.cgi?id=205443 5 6 Reviewed by Brent Fulgham. 7 8 Get focus ring color in the UI process since getting this color will communicate with the frontboard daemon. 9 10 Test: fast/sandbox/ios/focus-ring-color.html 11 12 * rendering/RenderTheme.h: 13 * rendering/RenderThemeIOS.h: 14 * rendering/RenderThemeIOS.mm: 15 (WebCore::cachedFocusRingColor): 16 (WebCore::RenderThemeIOS::platformFocusRingColor const): 17 (WebCore::RenderThemeIOS::setFocusRingColor): 18 * testing/Internals.cpp: 19 (WebCore::Internals::focusRingColor): 20 * testing/Internals.h: 21 * testing/Internals.idl: 22 1 23 2020-01-30 Jonathan Bedard <jbedard@apple.com> 2 24 -
trunk/Source/WebCore/rendering/RenderTheme.h
r252546 r255457 161 161 virtual Color disabledTextColor(const Color& textColor, const Color& backgroundColor) const; 162 162 163 Color focusRingColor(OptionSet<StyleColor::Options>) const;163 WTF_EXPORT Color focusRingColor(OptionSet<StyleColor::Options>) const; 164 164 virtual Color platformFocusRingColor(OptionSet<StyleColor::Options>) const { return Color(0, 0, 0); } 165 165 static void setCustomFocusRingColor(const Color&); -
trunk/Source/WebCore/rendering/RenderThemeIOS.h
r254373 r255457 65 65 WEBCORE_EXPORT static const CSSValueToSystemColorMap& cssValueToSystemColorMap(); 66 66 WEBCORE_EXPORT static void setCSSValueToSystemColorMap(CSSValueToSystemColorMap&&); 67 67 68 WEBCORE_EXPORT static void setFocusRingColor(const Color&); 69 68 70 protected: 69 71 LengthBox popupInternalPaddingBox(const RenderStyle&) const override; -
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
r255219 r255457 1131 1131 } 1132 1132 1133 static Optional<Color>& cachedFocusRingColor() 1134 { 1135 static NeverDestroyed<Optional<Color>> color; 1136 return color; 1137 } 1138 1133 1139 #if ENABLE(FULL_KEYBOARD_ACCESS) 1134 1140 Color RenderThemeIOS::platformFocusRingColor(OptionSet<StyleColor::Options>) const 1135 1141 { 1142 if (cachedFocusRingColor().hasValue()) 1143 return *cachedFocusRingColor(); 1144 1136 1145 // FIXME: Should be using -keyboardFocusIndicatorColor. For now, work around <rdar://problem/50838886>. 1137 1146 return colorFromUIColor([PAL::getUIColorClass() systemBlueColor]); … … 1539 1548 } 1540 1549 1550 void RenderThemeIOS::setFocusRingColor(const Color& color) 1551 { 1552 cachedFocusRingColor() = color; 1553 } 1554 1541 1555 Color RenderThemeIOS::systemColor(CSSValueID cssValueID, OptionSet<StyleColor::Options> options) const 1542 1556 { -
trunk/Source/WebCore/testing/Internals.cpp
r255221 r255457 5456 5456 } 5457 5457 5458 String Internals::focusRingColor() 5459 { 5460 OptionSet<StyleColor::Options> options; 5461 return RenderTheme::singleton().focusRingColor(options).cssText(); 5462 } 5463 5458 5464 } // namespace WebCore -
trunk/Source/WebCore/testing/Internals.h
r255191 r255457 934 934 String mediaMIMETypeForExtension(const String& extension); 935 935 936 String focusRingColor(); 937 936 938 private: 937 939 explicit Internals(Document&); -
trunk/Source/WebCore/testing/Internals.idl
r255191 r255457 837 837 838 838 DOMString systemColorForCSSValue(DOMString cssValue, boolean useDarkModeAppearance, boolean useElevatedUserInterfaceLevel); 839 DOMString focusRingColor(); 839 840 840 841 boolean systemHasBattery(); -
trunk/Source/WebKit/ChangeLog
r255456 r255457 1 2020-01-30 Per Arne Vollan <pvollan@apple.com> 2 3 [iOS] Issue mach sandbox extension to the frontboard and icon service when the attachment element is enabled 4 https://bugs.webkit.org/show_bug.cgi?id=205443 5 <rdar://problem/58074291> 6 7 Reviewed by Brent Fulgham. 8 9 When support for the html attachment element is enabled, issue a mach lookup extension to the frontboard and icon service 10 for the WebContent process, since these daemons are being contacted when icons for attachments are being queried. Also, 11 retrieve the focus ring color in the UI process, since getting this color requires access to the frontboard daemon. 12 13 Test: fast/sandbox/ios/sandbox-mach-lookup-attachment-element.html 14 15 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: 16 * Shared/WebProcessCreationParameters.cpp: 17 (WebKit::WebProcessCreationParameters::encode const): 18 (WebKit::WebProcessCreationParameters::decode): 19 * Shared/WebProcessCreationParameters.h: 20 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 21 (WebKit::WebProcessPool::platformInitializeWebProcess): 22 * WebProcess/cocoa/WebProcessCocoa.mm: 23 (WebKit::WebProcess::platformInitializeWebProcess): 24 1 25 2020-01-30 Tim Horton <timothy_horton@apple.com> 2 26 -
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
r255387 r255457 920 920 (require-all 921 921 (extension "com.apple.webkit.extension.mach") 922 (global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI" "com.apple.diagnosticd" "com.apple.lsd.open" "com.apple.mobileassetd" "com.apple.mobileassetd.v2" )))922 (global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI" "com.apple.diagnosticd" "com.apple.lsd.open" "com.apple.mobileassetd" "com.apple.mobileassetd.v2" "com.apple.frontboard.systemappservices" "com.apple.iconservices"))) 923 923 924 924 (allow mach-lookup -
trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp
r255342 r255457 93 93 encoder << viewportConfigurationViewSize; 94 94 encoder << overrideViewportArguments; 95 encoder << frontboardExtensionHandle; 96 encoder << iconServicesExtensionHandle; 95 97 #endif 96 98 … … 300 302 return WTF::nullopt; 301 303 parameters.overrideViewportArguments = WTFMove(*overrideViewportArguments); 304 305 Optional<Optional<SandboxExtension::Handle>> frontboardExtensionHandle; 306 decoder >> frontboardExtensionHandle; 307 if (!frontboardExtensionHandle) 308 return WTF::nullopt; 309 parameters.frontboardExtensionHandle = WTFMove(*frontboardExtensionHandle); 310 311 Optional<Optional<SandboxExtension::Handle>> iconServicesExtensionHandle; 312 decoder >> iconServicesExtensionHandle; 313 if (!iconServicesExtensionHandle) 314 return WTF::nullopt; 315 parameters.iconServicesExtensionHandle = WTFMove(*iconServicesExtensionHandle); 302 316 #endif 303 317 -
trunk/Source/WebKit/Shared/WebPageCreationParameters.h
r255342 r255457 153 153 WebCore::FloatSize viewportConfigurationViewSize; 154 154 Optional<WebCore::ViewportArguments> overrideViewportArguments; 155 Optional<SandboxExtension::Handle> frontboardExtensionHandle; 156 Optional<SandboxExtension::Handle> iconServicesExtensionHandle; 155 157 #endif 156 158 #if PLATFORM(IOS_FAMILY) -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
r255119 r255457 174 174 encoder << currentUserInterfaceIdiomIsPad; 175 175 encoder << cssValueToSystemColorMap; 176 encoder << focusRingColor; 176 177 #endif 177 178 } … … 459 460 return false; 460 461 parameters.cssValueToSystemColorMap = WTFMove(*cssValueToSystemColorMap); 462 463 Optional<WebCore::Color> focusRingColor; 464 decoder >> focusRingColor; 465 if (!focusRingColor) 466 return false; 467 parameters.focusRingColor = WTFMove(*focusRingColor); 461 468 #endif 462 469 -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
r255119 r255457 216 216 bool currentUserInterfaceIdiomIsPad { false }; 217 217 WebCore::RenderThemeIOS::CSSValueToSystemColorMap cssValueToSystemColorMap; 218 WebCore::Color focusRingColor; 218 219 #endif 219 220 }; -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r255119 r255457 361 361 parameters.currentUserInterfaceIdiomIsPad = currentUserInterfaceIdiomIsPad(); 362 362 parameters.cssValueToSystemColorMap = RenderThemeIOS::cssValueToSystemColorMap(); 363 parameters.focusRingColor = RenderTheme::singleton().focusRingColor(OptionSet<StyleColor::Options>()); 363 364 #endif 364 365 } -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r255385 r255457 7652 7652 #endif 7653 7653 7654 #if ENABLE(ATTACHMENT_ELEMENT) && PLATFORM(IOS_FAMILY) 7655 if (m_preferences->attachmentElementEnabled() && !m_process->hasIssuedAttachmentElementRelatedSandboxExtensions()) { 7656 SandboxExtension::Handle handle; 7657 SandboxExtension::createHandleForMachLookup("com.apple.frontboard.systemappservices", WTF::nullopt, handle); 7658 parameters.frontboardExtensionHandle = WTFMove(handle); 7659 SandboxExtension::createHandleForMachLookup("com.apple.iconservices", WTF::nullopt, handle); 7660 parameters.iconServicesExtensionHandle = WTFMove(handle); 7661 m_process->setHasIssuedAttachmentElementRelatedSandboxExtensions(); 7662 } 7663 #endif 7664 7654 7665 return parameters; 7655 7666 } -
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
r255189 r255457 355 355 #endif 356 356 357 #if ENABLE(ATTACHMENT_ELEMENT) && PLATFORM(IOS_FAMILY) 358 bool hasIssuedAttachmentElementRelatedSandboxExtensions() const { return m_hasIssuedAttachmentElementRelatedSandboxExtensions; } 359 void setHasIssuedAttachmentElementRelatedSandboxExtensions() { m_hasIssuedAttachmentElementRelatedSandboxExtensions = true; } 360 #endif 361 357 362 protected: 358 363 WebProcessProxy(WebProcessPool&, WebsiteDataStore*, IsPrewarmed); … … 533 538 bool m_isPrewarmed; 534 539 bool m_hasAudibleWebPage { false }; 540 #if ENABLE(ATTACHMENT_ELEMENT) && PLATFORM(IOS_FAMILY) 541 bool m_hasIssuedAttachmentElementRelatedSandboxExtensions { false }; 542 #endif 535 543 536 544 #if PLATFORM(WATCHOS) -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r255342 r255457 527 527 pageConfiguration.corsDisablingPatterns = WTFMove(parameters.corsDisablingPatterns); 528 528 529 #if ENABLE(ATTACHMENT_ELEMENT) && PLATFORM(IOS_FAMILY) 530 if (parameters.frontboardExtensionHandle) 531 SandboxExtension::consumePermanently(*parameters.frontboardExtensionHandle); 532 if (parameters.iconServicesExtensionHandle) 533 SandboxExtension::consumePermanently(*parameters.iconServicesExtensionHandle); 534 #endif 535 529 536 m_page = makeUnique<Page>(WTFMove(pageConfiguration)); 530 537 -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r255189 r255457 268 268 #if PLATFORM(IOS_FAMILY) 269 269 RenderThemeIOS::setCSSValueToSystemColorMap(WTFMove(parameters.cssValueToSystemColorMap)); 270 RenderThemeIOS::setFocusRingColor(parameters.focusRingColor); 270 271 #endif 271 272 }
Note: See TracChangeset
for help on using the changeset viewer.