Chromium Code Reviews| Index: chrome/browser/resources/settings/settings_page/main_page_behavior.js |
| diff --git a/chrome/browser/resources/settings/settings_page/main_page_behavior.js b/chrome/browser/resources/settings/settings_page/main_page_behavior.js |
| index 1f8b2a87a9b6fd50fed541bd6d92b97cd4968f56..f0081d9ab69f1a478dff3be8632f11d0b9c586de 100644 |
| --- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js |
| +++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js |
| @@ -264,7 +264,6 @@ var MainPageBehaviorImpl = { |
| */ |
| playCollapseSection_: function(section) { |
| var card = section.$.card; |
| - var cardStyle = getComputedStyle(card); |
| this.style.margin = ''; |
| section.$.header.hidden = false; |
| @@ -293,6 +292,11 @@ var MainPageBehaviorImpl = { |
| // but account for scroll. |
| var targetTop = card.getBoundingClientRect().top - this.scroller.scrollTop; |
| + // Account for the section header. |
| + targetTop += section.$.header.offsetHeight + |
| + parseInt(getComputedStyle(section.$.header).marginBottom) + |
|
dpapad
2016/05/09 23:35:53
Let's pass 10 as the 2nd parameter of parseInt(),
michaelpg
2016/05/10 00:36:18
Done.
|
| + parseInt(getComputedStyle(section.$.header).marginTop); |
|
dpapad
2016/05/09 23:35:53
Guessing that getComputedStyles() calls are simply
michaelpg
2016/05/10 00:36:18
Done (i thought so but i can't verify it)
|
| + |
| var keyframes = [{ |
| top: startingTop + 'px', |
| minHeight: cardHeightStart + 'px', |