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/platform/DragImage.cpp

Issue 1636873005: blink: Fix naming and const-ness of constants and non-constants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants: indents Created 4 years, 11 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
Index: third_party/WebKit/Source/platform/DragImage.cpp
diff --git a/third_party/WebKit/Source/platform/DragImage.cpp b/third_party/WebKit/Source/platform/DragImage.cpp
index bb2049ed8fb49676a7ca6e682c9adc9ed6f9b621..567dccffb1413957b3768b0c12d7e573b46c8026 100644
--- a/third_party/WebKit/Source/platform/DragImage.cpp
+++ b/third_party/WebKit/Source/platform/DragImage.cpp
@@ -176,7 +176,7 @@ PassOwnPtr<DragImage> DragImage::create(const KURL& url, const String& inLabel,
bool drawURLString = true;
bool clipURLString = false;
bool clipLabelString = false;
- float kMaxDragLabelStringWidthDIP = kMaxDragLabelStringWidth / deviceScaleFactor;
+ float maxDragLabelStringWidthDIP = kMaxDragLabelStringWidth / deviceScaleFactor;
String urlString = url.string();
String label = inLabel.stripWhiteSpace();
@@ -190,8 +190,8 @@ PassOwnPtr<DragImage> DragImage::create(const KURL& url, const String& inLabel,
TextRun urlRun(urlString.impl());
IntSize labelSize(labelFont.width(labelRun), labelFont.fontMetrics().ascent() + labelFont.fontMetrics().descent());
- if (labelSize.width() > kMaxDragLabelStringWidthDIP) {
- labelSize.setWidth(kMaxDragLabelStringWidthDIP);
+ if (labelSize.width() > maxDragLabelStringWidthDIP) {
+ labelSize.setWidth(maxDragLabelStringWidthDIP);
clipLabelString = true;
}
@@ -202,8 +202,8 @@ PassOwnPtr<DragImage> DragImage::create(const KURL& url, const String& inLabel,
urlStringSize.setWidth(urlFont.width(urlRun));
urlStringSize.setHeight(urlFont.fontMetrics().ascent() + urlFont.fontMetrics().descent());
imageSize.setHeight(imageSize.height() + urlStringSize.height());
- if (urlStringSize.width() > kMaxDragLabelStringWidthDIP) {
- imageSize.setWidth(kMaxDragLabelStringWidthDIP);
+ if (urlStringSize.width() > maxDragLabelStringWidthDIP) {
+ imageSize.setWidth(maxDragLabelStringWidthDIP);
clipURLString = true;
} else
imageSize.setWidth(std::max(labelSize.width(), urlStringSize.width()) + kDragLabelBorderX * 2);

Powered by Google App Engine
This is Rietveld 408576698