Commit 933765c0 authored by Daniel Hosseinian's avatar Daniel Hosseinian Committed by Commit Bot

Resize PDF Viewer content when annotation mode is enabled

Because the <viewer-pdf-toolbar-new> element has a hardcoded height
equal to its #toolbar child element, the PDF content does not get
resized around the extended toolbar that contains the
<viewer-annotations-bar> when annotation mode is toggled on.

Remove that height, and let the size of <viewer-pdf-toolbar-new> be
determined by its child elements.

Bug: 1152605
Change-Id: I4f58640bc1a3f8eb210785217f80ac9b71848247
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2559553
Commit-Queue: dpapad <dpapad@chromium.org>
Reviewed-by: default avatardpapad <dpapad@chromium.org>
Auto-Submit: Daniel Hosseinian <dhoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830940}
parent f2cddad0
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
0 4px 8px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.06),
0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.3),
0 2px 6px rgba(0, 0, 0, 0.15); 0 2px 6px rgba(0, 0, 0, 0.15);
height: var(--viewer-pdf-toolbar-height);
position: relative; position: relative;
} }
......
...@@ -67,9 +67,12 @@ chrome.test.runTests([ ...@@ -67,9 +67,12 @@ chrome.test.runTests([
const expectationTop = updateEnabled ? const expectationTop = updateEnabled ?
Math.min(2.25, expectation.top - 21) : Math.min(2.25, expectation.top - 21) :
expectation.top; expectation.top;
const expectationBottom = updateEnabled ?
Math.max(-412.5, expectation.bottom + 18) :
expectation.bottom;
chrome.test.assertEq(expectationTop, actual.top); chrome.test.assertEq(expectationTop, actual.top);
chrome.test.assertEq(expectation.left, actual.left); chrome.test.assertEq(expectation.left, actual.left);
chrome.test.assertEq(expectation.bottom, actual.bottom); chrome.test.assertEq(expectationBottom, actual.bottom);
chrome.test.assertEq(expectation.right, actual.right); chrome.test.assertEq(expectation.right, actual.right);
} }
chrome.test.succeed(); chrome.test.succeed();
......
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