Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: ui/views/controls/webview/webview.cc

Issue 1543173002: Switch to standard integer types in ui/views/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/webview/webview.cc
diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc
index d39852b5bfc7409116283671d8afee5823709769..9a129c04611899777e6d12329c68d3639b1ce2ad 100644
--- a/ui/views/controls/webview/webview.cc
+++ b/ui/views/controls/webview/webview.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "build/build_config.h"
#include "content/public/browser/browser_accessibility_state.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_controller.h"
@@ -153,10 +154,10 @@ void WebView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
// TODO(miu): This is basically media::ComputeLetterboxRegion(), and it
// looks like others have written this code elsewhere. Let's considate
// into a shared function ui/gfx/geometry or around there.
- const int64 x = static_cast<int64>(capture_size.width()) *
- holder_bounds.height();
- const int64 y = static_cast<int64>(capture_size.height()) *
- holder_bounds.width();
+ const int64_t x =
+ static_cast<int64_t>(capture_size.width()) * holder_bounds.height();
+ const int64_t y =
+ static_cast<int64_t>(capture_size.height()) * holder_bounds.width();
if (y < x) {
holder_bounds.ClampToCenteredSize(gfx::Size(
holder_bounds.width(), static_cast<int>(y / capture_size.width())));

Powered by Google App Engine
This is Rietveld 408576698