- Revision
- 232277
- Author
- pvol...@apple.com
- Date
- 2018-05-29 16:28:41 -0700 (Tue, 29 May 2018)
Log Message
Create typedef for HashMap<PlatformDisplayID, ScreenProperties>
https://bugs.webkit.org/show_bug.cgi?id=186056
Reviewed by Brent Fulgham.
Source/WebCore:
No new tests, no change in behavior.
* platform/PlatformScreen.h:
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenProperties):
(WebCore::getScreenProperties):
(WebCore::setScreenProperties):
Source/WebKit:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (232276 => 232277)
--- trunk/Source/WebCore/ChangeLog 2018-05-29 22:59:08 UTC (rev 232276)
+++ trunk/Source/WebCore/ChangeLog 2018-05-29 23:28:41 UTC (rev 232277)
@@ -1,3 +1,18 @@
+2018-05-29 Per Arne Vollan <pvol...@apple.com>
+
+ Create typedef for HashMap<PlatformDisplayID, ScreenProperties>
+ https://bugs.webkit.org/show_bug.cgi?id=186056
+
+ Reviewed by Brent Fulgham.
+
+ No new tests, no change in behavior.
+
+ * platform/PlatformScreen.h:
+ * platform/mac/PlatformScreenMac.mm:
+ (WebCore::screenProperties):
+ (WebCore::getScreenProperties):
+ (WebCore::setScreenProperties):
+
2018-05-29 Ryosuke Niwa <rn...@webkit.org>
iOS WK1: Occasional crash in sanitizedMarkupForFragmentInDocument
Modified: trunk/Source/WebCore/platform/PlatformScreen.h (232276 => 232277)
--- trunk/Source/WebCore/platform/PlatformScreen.h 2018-05-29 22:59:08 UTC (rev 232276)
+++ trunk/Source/WebCore/platform/PlatformScreen.h 2018-05-29 23:28:41 UTC (rev 232277)
@@ -93,8 +93,10 @@
NSPoint flipScreenPoint(const NSPoint&, NSScreen *);
-WEBCORE_EXPORT std::pair<PlatformDisplayID, HashMap<PlatformDisplayID, ScreenProperties>> getScreenProperties();
-WEBCORE_EXPORT void setScreenProperties(PlatformDisplayID primaryScreenID, const HashMap<PlatformDisplayID, ScreenProperties>&);
+typedef HashMap<PlatformDisplayID, ScreenProperties> ScreenPropertiesMap;
+
+WEBCORE_EXPORT std::pair<PlatformDisplayID, ScreenPropertiesMap> getScreenProperties();
+WEBCORE_EXPORT void setScreenProperties(PlatformDisplayID primaryScreenID, const ScreenPropertiesMap&);
ScreenProperties screenProperties(PlatformDisplayID);
#endif
Modified: trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm (232276 => 232277)
--- trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm 2018-05-29 22:59:08 UTC (rev 232276)
+++ trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm 2018-05-29 23:28:41 UTC (rev 232277)
@@ -96,9 +96,9 @@
return screen(displayID(widget));
}
-static HashMap<PlatformDisplayID, ScreenProperties>& screenProperties()
+static ScreenPropertiesMap& screenProperties()
{
- static NeverDestroyed<HashMap<PlatformDisplayID, ScreenProperties>> screenProperties;
+ static NeverDestroyed<ScreenPropertiesMap> screenProperties;
return screenProperties;
}
@@ -108,11 +108,11 @@
return primaryScreenDisplayID;
}
-std::pair<PlatformDisplayID, HashMap<PlatformDisplayID, ScreenProperties>> getScreenProperties()
+std::pair<PlatformDisplayID, ScreenPropertiesMap> getScreenProperties()
{
ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer));
- HashMap<PlatformDisplayID, ScreenProperties> screenProperties;
+ ScreenPropertiesMap screenProperties;
std::optional<PlatformDisplayID> firstScreen;
for (NSScreen *screen in [NSScreen screens]) {
@@ -138,7 +138,7 @@
return { WTFMove(*firstScreen), WTFMove(screenProperties) };
}
-void setScreenProperties(PlatformDisplayID primaryScreenID, const HashMap<PlatformDisplayID, ScreenProperties>& properties)
+void setScreenProperties(PlatformDisplayID primaryScreenID, const ScreenPropertiesMap& properties)
{
primaryScreenDisplayID() = primaryScreenID;
screenProperties() = properties;
Modified: trunk/Source/WebKit/ChangeLog (232276 => 232277)
--- trunk/Source/WebKit/ChangeLog 2018-05-29 22:59:08 UTC (rev 232276)
+++ trunk/Source/WebKit/ChangeLog 2018-05-29 23:28:41 UTC (rev 232277)
@@ -1,3 +1,14 @@
+2018-05-29 Per Arne Vollan <pvol...@apple.com>
+
+ Create typedef for HashMap<PlatformDisplayID, ScreenProperties>
+ https://bugs.webkit.org/show_bug.cgi?id=186056
+
+ Reviewed by Brent Fulgham.
+
+ * Shared/WebProcessCreationParameters.cpp:
+ (WebKit::WebProcessCreationParameters::decode):
+ * Shared/WebProcessCreationParameters.h:
+
2018-05-25 Jiewen Tan <jiewen_...@apple.com>
Tighten sandbox profiles for Networking Processes to restrict accesses to macOS/iOS Keychains
Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp (232276 => 232277)
--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp 2018-05-29 22:59:08 UTC (rev 232276)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp 2018-05-29 23:28:41 UTC (rev 232277)
@@ -410,7 +410,7 @@
if (!decoder.decode(parameters.primaryDisplayID))
return false;
- std::optional<HashMap<WebCore::PlatformDisplayID, WebCore::ScreenProperties>> screenPropertiesMap;
+ std::optional<WebCore::ScreenPropertiesMap> screenPropertiesMap;
decoder >> screenPropertiesMap;
if (!screenPropertiesMap)
return false;
Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.h (232276 => 232277)
--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.h 2018-05-29 22:59:08 UTC (rev 232276)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.h 2018-05-29 23:28:41 UTC (rev 232277)
@@ -196,7 +196,7 @@
#if PLATFORM(MAC)
WebCore::PlatformDisplayID primaryDisplayID { 0 };
- HashMap<WebCore::PlatformDisplayID, WebCore::ScreenProperties> screenPropertiesMap;
+ WebCore::ScreenPropertiesMap screenPropertiesMap;
#endif
};