Commit f93d5878 authored by huangs's avatar huangs Committed by Commit bot

[Local NTP] Fixing thumbnail aspect ratio, and store taller thumbnails.

Previously the local NTP thumbnails were stretched. We now make preserve
ratio preserved by setting height to "auto", but keep min-height to 100%
so if thumbnail is too short we won't see blank space.
To accommotate Material Design thumbnails, we make stored thumbnails
taller. In the thumbnail <iframe>, the extra height is hidden from view.

BUG=414878

Review URL: https://codereview.chromium.org/564973003

Cr-Commit-Position: refs/heads/master@{#295155}
parent 0f4852ae
...@@ -36,6 +36,7 @@ span.blocker { ...@@ -36,6 +36,7 @@ span.blocker {
} }
img { img {
height: 100%; height: auto;
min-height: 100%;
width: 100%; width: 100%;
} }
...@@ -21,7 +21,7 @@ namespace { ...@@ -21,7 +21,7 @@ namespace {
// The thumbnail size in DIP. // The thumbnail size in DIP.
const int kThumbnailWidth = 212; const int kThumbnailWidth = 212;
const int kThumbnailHeight = 132; const int kThumbnailHeight = 142;
// True if thumbnail retargeting feature is enabled (Finch/flags). // True if thumbnail retargeting feature is enabled (Finch/flags).
bool IsThumbnailRetargetingEnabled() { bool IsThumbnailRetargetingEnabled() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment