Changeset 268797 in webkit
- Timestamp:
- Oct 21, 2020, 9:15:56 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
page/Screen.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r268792 r268797 1 2020-10-21 Philippe Normand <pnormand@igalia.com> 2 3 Un-needed casts in Screen::{width,height}() 4 https://bugs.webkit.org/show_bug.cgi?id=218013 5 6 Reviewed by Darin Adler. 7 8 * page/Screen.cpp: 9 (WebCore::Screen::height const): There is no need to convert from float to long and then 10 unsigned. 11 (WebCore::Screen::width const): Ditto. 12 1 13 2020-10-20 Sergio Villar Senin <svillar@igalia.com> 2 14 -
trunk/Source/WebCore/page/Screen.cpp
r268716 r268797 58 58 if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled()) 59 59 ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::Height); 60 long height = static_cast<long>(frame->screenSize().height()); 61 return static_cast<unsigned>(height); 60 return static_cast<unsigned>(frame->screenSize().height()); 62 61 } 63 62 … … 69 68 if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled()) 70 69 ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::Width); 71 long width = static_cast<long>(frame->screenSize().width()); 72 return static_cast<unsigned>(width); 70 return static_cast<unsigned>(frame->screenSize().width()); 73 71 } 74 72
Note:
See TracChangeset
for help on using the changeset viewer.