diff options
Diffstat (limited to 'WebCore/rendering/RenderBox.cpp')
-rw-r--r-- | WebCore/rendering/RenderBox.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp index 92c3d99..722b772 100644 --- a/WebCore/rendering/RenderBox.cpp +++ b/WebCore/rendering/RenderBox.cpp @@ -56,6 +56,10 @@ #include "WMLNames.h" #endif +#ifdef ANDROID_FIXED_ELEMENTS +#include "PlatformBridge.h" +#endif + using namespace std; namespace WebCore { @@ -1786,6 +1790,12 @@ void RenderBox::calcVerticalMargins() int RenderBox::containingBlockWidthForPositioned(const RenderBoxModelObject* containingBlock) const { +#ifdef ANDROID_FIXED_ELEMENTS + if (containingBlock->isRenderView()) { + const RenderView* view = toRenderView(containingBlock); + return PlatformBridge::screenWidth(view->frameView()); + } +#endif if (containingBlock->isBox()) { const RenderBox* containingBlockBox = toRenderBox(containingBlock); return containingBlockBox->width() - containingBlockBox->borderLeft() - containingBlockBox->borderRight() - containingBlockBox->verticalScrollbarWidth(); @@ -1816,6 +1826,12 @@ int RenderBox::containingBlockWidthForPositioned(const RenderBoxModelObject* con int RenderBox::containingBlockHeightForPositioned(const RenderBoxModelObject* containingBlock) const { +#ifdef ANDROID_FIXED_ELEMENTS + if (containingBlock->isRenderView()) { + const RenderView* view = toRenderView(containingBlock); + return PlatformBridge::screenHeight(view->frameView()); + } +#endif int heightResult = 0; if (containingBlock->isBox()) heightResult = toRenderBox(containingBlock)->height(); |