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

Unified Diff: ios/chrome/browser/ui/ui_util.mm

Issue 2645653003: Expose thumbnails of pages to iOS share extensions. (Closed)
Patch Set: Addressed comments. Created 3 years, 10 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 | « ios/chrome/browser/ui/ui_util.h ('k') | ios/chrome/browser/ui/ui_util_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/ui_util.mm
diff --git a/ios/chrome/browser/ui/ui_util.mm b/ios/chrome/browser/ui/ui_util.mm
index 5f9ef95d816edbfcc50e71235881eb279c079af8..527abe026097bb479d8ebcc5e91c381cf116eb8a 100644
--- a/ios/chrome/browser/ui/ui_util.mm
+++ b/ios/chrome/browser/ui/ui_util.mm
@@ -110,6 +110,7 @@ void CalculateProjection(CGSize originalSize,
break;
case ProjectionMode::kAspectFill:
+ case ProjectionMode::kAspectFillAlignTop:
if (targetAspectRatio < aspectRatio) {
// Clip the x-axis.
projectTo.size.width = targetSize.height * aspectRatio;
@@ -123,6 +124,9 @@ void CalculateProjection(CGSize originalSize,
projectTo.origin.x = 0;
projectTo.origin.y = (targetSize.height - projectTo.size.height) / 2;
}
+ if (projectionMode == ProjectionMode::kAspectFillAlignTop) {
+ projectTo.origin.y = 0;
+ }
break;
case ProjectionMode::kAspectFit:
« no previous file with comments | « ios/chrome/browser/ui/ui_util.h ('k') | ios/chrome/browser/ui/ui_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698