Title: [268797] trunk/Source/WebCore
- Revision
- 268797
- Author
- commit-qu...@webkit.org
- Date
- 2020-10-21 09:15:56 -0700 (Wed, 21 Oct 2020)
Log Message
Un-needed casts in Screen::{width,height}()
https://bugs.webkit.org/show_bug.cgi?id=218013
Patch by Philippe Normand <pnorm...@igalia.com> on 2020-10-21
Reviewed by Darin Adler.
* page/Screen.cpp:
(WebCore::Screen::height const): There is no need to convert from float to long and then
unsigned.
(WebCore::Screen::width const): Ditto.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (268796 => 268797)
--- trunk/Source/WebCore/ChangeLog 2020-10-21 16:01:31 UTC (rev 268796)
+++ trunk/Source/WebCore/ChangeLog 2020-10-21 16:15:56 UTC (rev 268797)
@@ -1,3 +1,15 @@
+2020-10-21 Philippe Normand <pnorm...@igalia.com>
+
+ Un-needed casts in Screen::{width,height}()
+ https://bugs.webkit.org/show_bug.cgi?id=218013
+
+ Reviewed by Darin Adler.
+
+ * page/Screen.cpp:
+ (WebCore::Screen::height const): There is no need to convert from float to long and then
+ unsigned.
+ (WebCore::Screen::width const): Ditto.
+
2020-10-20 Sergio Villar Senin <svil...@igalia.com>
[css-flexbox] flex-basis not animatable
Modified: trunk/Source/WebCore/page/Screen.cpp (268796 => 268797)
--- trunk/Source/WebCore/page/Screen.cpp 2020-10-21 16:01:31 UTC (rev 268796)
+++ trunk/Source/WebCore/page/Screen.cpp 2020-10-21 16:15:56 UTC (rev 268797)
@@ -57,8 +57,7 @@
return 0;
if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::Height);
- long height = static_cast<long>(frame->screenSize().height());
- return static_cast<unsigned>(height);
+ return static_cast<unsigned>(frame->screenSize().height());
}
unsigned Screen::width() const
@@ -68,8 +67,7 @@
return 0;
if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::Width);
- long width = static_cast<long>(frame->screenSize().width());
- return static_cast<unsigned>(width);
+ return static_cast<unsigned>(frame->screenSize().width());
}
unsigned Screen::colorDepth() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes