Chromium Code Reviews| Index: Source/core/css/resolver/StyleAdjuster.cpp |
| diff --git a/Source/core/css/resolver/StyleAdjuster.cpp b/Source/core/css/resolver/StyleAdjuster.cpp |
| index b89efa29db5f8431d53608348e330ccbc5e27b04..7f87ebfde9041a61b192ecf377bf605221f18811 100644 |
| --- a/Source/core/css/resolver/StyleAdjuster.cpp |
| +++ b/Source/core/css/resolver/StyleAdjuster.cpp |
| @@ -34,13 +34,16 @@ |
| #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/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/frame/FrameView.h" |
| -#include "core/frame/Settings.h" |
| +#include "core/page/Page.h" |
| #include "core/rendering/RenderReplaced.h" |
| #include "core/rendering/RenderTheme.h" |
| #include "core/rendering/style/GridPosition.h" |
| @@ -172,6 +175,18 @@ void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty |
| adjustStyleForFirstLetter(style); |
| adjustStyleForDisplay(style, parentStyle); |
| + |
| + if (e && e->document().page()->settings().pinchVirtualViewportEnabled()) { |
| + if (Fullscreen::isActiveFullScreenElement(*e)) { |
| + // 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 this information. FIXME: We should find a way to |
| + // get this standardized. |
| + IntSize viewportSize = e->document().page()->frameHost().pinchViewport().size(); |
| + style->setWidth(Length(viewportSize.width(), Fixed)); |
| + style->setHeight(Length(viewportSize.height(), Fixed)); |
|
rune
2014/12/16 19:10:24
This looks very weird to me. If I understand corre
aelias_OOO_until_Jul13
2014/12/16 19:34:33
We don't support pinch zoom in fullscreen; page sc
|
| + } |
| + } |
| } else { |
| adjustStyleForFirstLetter(style); |
| } |