Commit d9199870 authored by mathp@chromium.org's avatar mathp@chromium.org

Set position: absolute on NTP thumbnails

This fixes a bug where, when using two thumbnails in the same iframe, they would be reordered if their visibility changed. This would only happen on the second and further NTPs, perhaps on relayout by Chrome.

This changes it so that they are superposed, which is how it should have been all along. Putting position: absolute will make both anchor on body.

BUG=None

Review URL: https://chromiumcodereview.appspot.com/23619019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221789 0039d316-1c4b-4281-b951-d872f2087c98
parent 6b151126
...@@ -30,6 +30,9 @@ window.addEventListener('DOMContentLoaded', function() { ...@@ -30,6 +30,9 @@ window.addEventListener('DOMContentLoaded', function() {
var link = createMostVisitedLink(params, data.url, data.title); var link = createMostVisitedLink(params, data.url, data.title);
link.appendChild(shadow); link.appendChild(shadow);
link.appendChild(image); link.appendChild(image);
// We add 'position: absolute' in anticipation that there could be more
// than one thumbnail. This will superpose the elements.
link.style.position = 'absolute';
document.body.appendChild(link); document.body.appendChild(link);
}; };
if (!isVisible) { if (!isVisible) {
......
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