Index: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp |
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp |
index b4797ba5d2765b6d63aa8673f81aa273a2180e8b..decc9ec044aa44846002364f93fdf501588327d0 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp |
@@ -33,15 +33,19 @@ |
#include "core/dom/ContainerNode.h" |
#include "core/dom/Document.h" |
#include "core/dom/Element.h" |
+#include "core/dom/Fullscreen.h" |
+#include "core/frame/FrameHost.h" |
#include "core/frame/FrameView.h" |
#include "core/frame/Settings.h" |
#include "core/frame/UseCounter.h" |
+#include "core/frame/VisualViewport.h" |
#include "core/html/HTMLIFrameElement.h" |
#include "core/html/HTMLInputElement.h" |
#include "core/html/HTMLPlugInElement.h" |
#include "core/html/HTMLTableCellElement.h" |
#include "core/html/HTMLTextAreaElement.h" |
#include "core/layout/LayoutTheme.h" |
+#include "core/page/Page.h" |
#include "core/style/ComputedStyle.h" |
#include "core/style/ComputedStyleConstants.h" |
#include "core/svg/SVGSVGElement.h" |
@@ -173,6 +177,17 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl |
// https://drafts.csswg.org/css-containment/#containment-paint |
if (style.containsPaint() && style.display() == INLINE) |
style.setDisplay(BLOCK); |
+ |
+ if (element && Fullscreen::isActiveFullScreenElement(*element)) { |
+ // We need to size the fullscreen element to the inner viewport and not to the |
+ // outer viewport (what percentage would do). Unfortunately CSS can't handle |
+ // that as we don't expose the inner viewport information. |
+ // |
+ // TODO(dsinclair): We should find a way to get this standardized. crbug.com/534924 |
foolip
2016/06/29 20:11:00
dsinclair@, can you fill me in about the purpose o
dsinclair
2016/06/29 20:14:47
I'm not sure if this is what causes the scrollbar
foolip
2016/06/30 14:33:24
I tried reverting this and running test to underst
dsinclair
2016/07/06 13:32:31
I was never really clear on viewport. There is an
foolip
2016/07/06 14:14:51
Thanks, I'll do that if I can't figure this out.
|
+ IntSize viewportSize = element->document().page()->frameHost().visualViewport().size(); |
+ style.setWidth(Length(viewportSize.width(), Fixed)); |
+ style.setHeight(Length(viewportSize.height(), Fixed)); |
+ } |
} else { |
adjustStyleForFirstLetter(style); |
} |