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

Unified Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 2261663002: Disallow cast/implicit conversion from LayoutUnit to int/unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 months 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
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEventConversion.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
index e855f2c8724c611ef4026427d6412f6b088f868d..64ddc7b780437536504c9b2cd1fba75227a036eb 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -171,8 +171,8 @@ void WebPluginContainerImpl::invalidateRect(const IntRect& rect)
IntRect dirtyRect = rect;
dirtyRect.move(
- layoutObject->borderLeft() + layoutObject->paddingLeft(),
- layoutObject->borderTop() + layoutObject->paddingTop());
+ (layoutObject->borderLeft() + layoutObject->paddingLeft()).toInt(),
+ (layoutObject->borderTop() + layoutObject->paddingTop()).toInt());
m_pendingInvalidationRect.unite(dirtyRect);
@@ -751,7 +751,7 @@ void WebPluginContainerImpl::handleDragEvent(MouseEvent* event)
WebDragData dragData = dataTransfer->dataObject()->toWebDragData();
WebDragOperationsMask dragOperationMask = static_cast<WebDragOperationsMask>(dataTransfer->sourceOperation());
WebPoint dragScreenLocation(event->screenX(), event->screenY());
- WebPoint dragLocation(event->absoluteLocation().x() - location().x(), event->absoluteLocation().y() - location().y());
+ WebPoint dragLocation((event->absoluteLocation().x() - location().x()).toInt(), (event->absoluteLocation().y() - location().y()).toInt());
m_webPlugin->handleDragStatusUpdate(dragStatus, dragData, dragOperationMask, dragLocation, dragScreenLocation);
}
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEventConversion.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698