summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering')
-rw-r--r--WebCore/rendering/RenderBox.cpp14
-rw-r--r--WebCore/rendering/RenderLayer.cpp3
-rw-r--r--WebCore/rendering/RenderTheme.cpp2
-rw-r--r--WebCore/rendering/RenderTheme.h2
4 files changed, 13 insertions, 8 deletions
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index fe78fd5..ebd7d54 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -39,7 +39,9 @@
#include "FloatQuad.h"
#include "Frame.h"
#include "Page.h"
+#if PLATFORM(ANDROID)
#include "PlatformBridge.h"
+#endif
#include "RenderArena.h"
#include "RenderFlexibleBox.h"
#include "RenderInline.h"
@@ -2078,13 +2080,14 @@ void RenderBox::computeBlockDirectionMargins(RenderBlock* containingBlock)
int RenderBox::containingBlockWidthForPositioned(const RenderBoxModelObject* containingBlock) const
{
+#if PLATFORM(ANDROID)
// Fixed element's position should be decided by the visible screen size.
// That is in the doc coordindate.
if (style()->position() == FixedPosition && containingBlock->isRenderView()) {
const RenderView* view = toRenderView(containingBlock);
- return PlatformBridge::visibleScreenWidth(view->frameView());
+ return PlatformBridge::screenWidthInDocCoord(view->frameView());
}
-
+#endif
if (containingBlock->isBox()) {
const RenderBox* containingBlockBox = toRenderBox(containingBlock);
return containingBlockBox->width() - containingBlockBox->borderLeft() - containingBlockBox->borderRight() - containingBlockBox->verticalScrollbarWidth();
@@ -2114,14 +2117,15 @@ int RenderBox::containingBlockWidthForPositioned(const RenderBoxModelObject* con
}
int RenderBox::containingBlockHeightForPositioned(const RenderBoxModelObject* containingBlock) const
-{
+{
+#if PLATFORM(ANDROID)
// Fixed element's position should be decided by the visible screen size.
// That is in the doc coordindate.
if (style()->position() == FixedPosition && containingBlock->isRenderView()) {
const RenderView* view = toRenderView(containingBlock);
- return PlatformBridge::visibleScreenHeight(view->frameView());
+ return PlatformBridge::screenHeightInDocCoord(view->frameView());
}
-
+#endif
int heightResult = 0;
if (containingBlock->isBox())
heightResult = toRenderBox(containingBlock)->height();
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 1b1273e..559f25c 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -2180,7 +2180,8 @@ RenderLayer::updateScrollInfoAfterLayout()
m_hasOverflowScroll = hasOverflowScroll;
dirtyZOrderLists();
dirtyStackingContextZOrderLists();
- renderer()->node()->setNeedsStyleRecalc(SyntheticStyleChange);
+ if (renderer()->node())
+ renderer()->node()->setNeedsStyleRecalc(SyntheticStyleChange);
}
#endif
}
diff --git a/WebCore/rendering/RenderTheme.cpp b/WebCore/rendering/RenderTheme.cpp
index 522bd4d..538b6c6 100644
--- a/WebCore/rendering/RenderTheme.cpp
+++ b/WebCore/rendering/RenderTheme.cpp
@@ -198,7 +198,7 @@ void RenderTheme::adjustStyle(CSSStyleSelector* selector, RenderStyle* style, El
return adjustTextFieldStyle(selector, style, e);
case TextAreaPart:
return adjustTextAreaStyle(selector, style, e);
-#ifdef ANDROID_LISTBOX_USES_MENU_LIST
+#if ENABLE(NO_LISTBOX_RENDERING)
case ListboxPart:
return adjustListboxStyle(selector, style, e);
#endif
diff --git a/WebCore/rendering/RenderTheme.h b/WebCore/rendering/RenderTheme.h
index aedb8eb..13c69e6 100644
--- a/WebCore/rendering/RenderTheme.h
+++ b/WebCore/rendering/RenderTheme.h
@@ -236,7 +236,7 @@ protected:
virtual void adjustTextAreaStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
-#ifdef ANDROID_LISTBOX_USES_MENU_LIST
+#if ENABLE(NO_LISTBOX_RENDERING)
virtual void adjustListboxStyle(CSSStyleSelector*, RenderStyle*, Element*) const {}
#endif
virtual void adjustMenuListStyle(CSSStyleSelector*, RenderStyle*, Element*) const;