browser(webkit): fix time formatting and mac compilation (#6875)
This commit is contained in:
parent
064150f8dd
commit
d7c202ca3c
|
|
@ -1,2 +1,2 @@
|
||||||
1491
|
1492
|
||||||
Changed: yurys@chromium.org Wed 02 Jun 2021 03:34:29 PM PDT
|
Changed: yurys@chromium.org Thu 03 Jun 2021 11:45:44 AM PDT
|
||||||
|
|
|
||||||
|
|
@ -1654,40 +1654,23 @@ index 638612413466efc87b737e8a81042ed07ca12703..6f9e518ff0bfa2a6228675d25b6b785f
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
diff --git a/Source/JavaScriptCore/runtime/DateConversion.cpp b/Source/JavaScriptCore/runtime/DateConversion.cpp
|
diff --git a/Source/JavaScriptCore/runtime/DateConversion.cpp b/Source/JavaScriptCore/runtime/DateConversion.cpp
|
||||||
index 2decf8a83c80e80ca8677f4c787bf79c6c2995fa..ff28030fe3227af688d9cc0e405d12a4a387e107 100644
|
index 2decf8a83c80e80ca8677f4c787bf79c6c2995fa..9010384a32f7c2ab69a8fb20eb19cd566fd9f434 100644
|
||||||
--- a/Source/JavaScriptCore/runtime/DateConversion.cpp
|
--- a/Source/JavaScriptCore/runtime/DateConversion.cpp
|
||||||
+++ b/Source/JavaScriptCore/runtime/DateConversion.cpp
|
+++ b/Source/JavaScriptCore/runtime/DateConversion.cpp
|
||||||
@@ -97,18 +97,24 @@ String formatDateTime(const GregorianDateTime& t, DateTimeFormat format, bool as
|
@@ -97,6 +97,9 @@ String formatDateTime(const GregorianDateTime& t, DateTimeFormat format, bool as
|
||||||
appendNumber<2>(builder, offset / 60);
|
appendNumber<2>(builder, offset / 60);
|
||||||
appendNumber<2>(builder, offset % 60);
|
appendNumber<2>(builder, offset % 60);
|
||||||
|
|
||||||
-#if OS(WINDOWS)
|
|
||||||
- TIME_ZONE_INFORMATION timeZoneInformation;
|
|
||||||
- GetTimeZoneInformation(&timeZoneInformation);
|
|
||||||
- const WCHAR* winTimeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
|
|
||||||
- String timeZoneName(winTimeZoneName);
|
|
||||||
+ String timeZoneName;
|
|
||||||
+ if (!WTF::timeZoneDisplayNameForAutomation().isEmpty()) {
|
+ if (!WTF::timeZoneDisplayNameForAutomation().isEmpty()) {
|
||||||
+ timeZoneName = WTF::timeZoneDisplayNameForAutomation();
|
+ builder.append(" (", WTF::timeZoneDisplayNameForAutomation(), ')');
|
||||||
+ } else {
|
+ } else {
|
||||||
+ #if OS(WINDOWS)
|
#if OS(WINDOWS)
|
||||||
+ TIME_ZONE_INFORMATION timeZoneInformation;
|
TIME_ZONE_INFORMATION timeZoneInformation;
|
||||||
+ GetTimeZoneInformation(&timeZoneInformation);
|
GetTimeZoneInformation(&timeZoneInformation);
|
||||||
+ const WCHAR* winTimeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
|
@@ -109,6 +112,7 @@ String formatDateTime(const GregorianDateTime& t, DateTimeFormat format, bool as
|
||||||
+ timeZoneName = String(winTimeZoneName);
|
|
||||||
#else
|
|
||||||
- struct tm gtm = t;
|
|
||||||
- char timeZoneName[70];
|
|
||||||
- strftime(timeZoneName, sizeof(timeZoneName), "%Z", >m);
|
|
||||||
+ struct tm gtm = t;
|
|
||||||
+ char tzName[70];
|
|
||||||
+ strftime(tzName, sizeof(tzName), "%Z", >m);
|
|
||||||
+ timeZoneName = String(tzName);
|
|
||||||
#endif
|
#endif
|
||||||
- if (timeZoneName[0])
|
if (timeZoneName[0])
|
||||||
- builder.append(" (", timeZoneName, ')');
|
builder.append(" (", timeZoneName, ')');
|
||||||
+ if (!timeZoneName.isEmpty())
|
|
||||||
+ builder.append(" (", timeZoneName, ')');
|
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -14160,7 +14143,7 @@ index 0000000000000000000000000000000000000000..d0e11ed81a6257c011df23d5870da740
|
||||||
+} // namespace WebKit
|
+} // namespace WebKit
|
||||||
diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
|
diff --git a/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..6e510ec9b7625a3298e71ad24a33ad018cc55eb0
|
index 0000000000000000000000000000000000000000..a99ca36604fadf1514e7c5211251e57e525a2eee
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
|
+++ b/Source/WebKit/UIProcess/InspectorPlaywrightAgent.cpp
|
||||||
@@ -0,0 +1,921 @@
|
@@ -0,0 +1,921 @@
|
||||||
|
|
@ -14740,14 +14723,14 @@ index 0000000000000000000000000000000000000000..6e510ec9b7625a3298e71ad24a33ad01
|
||||||
+ return;
|
+ return;
|
||||||
+ auto origins = JSON::ArrayOf<Inspector::Protocol::Playwright::OriginStorage>::create();
|
+ auto origins = JSON::ArrayOf<Inspector::Protocol::Playwright::OriginStorage>::create();
|
||||||
+ for (const auto& originData : data) {
|
+ for (const auto& originData : data) {
|
||||||
+ auto items = JSON::ArrayOf<Protocol::Playwright::NameValue>::create();
|
+ auto items = JSON::ArrayOf<Inspector::Protocol::Playwright::NameValue>::create();
|
||||||
+ for (const auto& entry : originData.second) {
|
+ for (const auto& entry : originData.second) {
|
||||||
+ items->addItem(Protocol::Playwright::NameValue::create()
|
+ items->addItem(Inspector::Protocol::Playwright::NameValue::create()
|
||||||
+ .setName(entry.key)
|
+ .setName(entry.key)
|
||||||
+ .setValue(entry.value)
|
+ .setValue(entry.value)
|
||||||
+ .release());
|
+ .release());
|
||||||
+ }
|
+ }
|
||||||
+ origins->addItem(Protocol::Playwright::OriginStorage::create()
|
+ origins->addItem(Inspector::Protocol::Playwright::OriginStorage::create()
|
||||||
+ .setOrigin(originData.first.toString())
|
+ .setOrigin(originData.first.toString())
|
||||||
+ .setItems(WTFMove(items))
|
+ .setItems(WTFMove(items))
|
||||||
+ .release());
|
+ .release());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue