summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering')
-rw-r--r--WebCore/rendering/RenderBlock.cpp16
-rw-r--r--WebCore/rendering/RenderBlock.h4
-rw-r--r--WebCore/rendering/RenderBlockLineLayout.cpp16
-rw-r--r--WebCore/rendering/RenderBox.cpp40
-rw-r--r--WebCore/rendering/RenderFrame.cpp50
-rw-r--r--WebCore/rendering/RenderIFrame.cpp129
-rw-r--r--WebCore/rendering/RenderLayer.cpp15
-rw-r--r--WebCore/rendering/RenderLayerBacking.cpp12
-rw-r--r--WebCore/rendering/RenderLayerCompositor.cpp23
-rw-r--r--WebCore/rendering/RenderTable.cpp4
-rw-r--r--WebCore/rendering/RenderTextControlMultiLine.cpp2
-rw-r--r--WebCore/rendering/RenderTheme.cpp2
-rw-r--r--WebCore/rendering/RenderTheme.h2
-rw-r--r--WebCore/rendering/RenderView.h3
-rw-r--r--WebCore/rendering/RenderWidget.cpp2
15 files changed, 73 insertions, 247 deletions
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 4609f1b..22e8afb 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -117,6 +117,7 @@ RenderBlock::RenderBlock(Node* node)
, m_continuation(0)
, m_rareData(0)
, m_lineHeight(-1)
+ , m_beingDestroyed(false)
{
setChildrenInline(true);
}
@@ -151,6 +152,9 @@ RenderBlock::~RenderBlock()
void RenderBlock::destroy()
{
+ // Mark as being destroyed to avoid trouble with merges in removeChild().
+ m_beingDestroyed = true;
+
// Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will
// properly dirty line boxes that they are removed from. Effects that do :before/:after only on hover could crash otherwise.
children()->destroyLeftoverChildren();
@@ -930,8 +934,8 @@ static bool canMergeContiguousAnonymousBlocks(RenderObject* oldChild, RenderObje
if (oldChild->documentBeingDestroyed() || oldChild->isInline() || oldChild->virtualContinuation())
return false;
- if ((prev && (!prev->isAnonymousBlock() || toRenderBlock(prev)->continuation()))
- || (next && (!next->isAnonymousBlock() || toRenderBlock(next)->continuation())))
+ if ((prev && (!prev->isAnonymousBlock() || toRenderBlock(prev)->continuation() || toRenderBlock(prev)->beingDestroyed()))
+ || (next && (!next->isAnonymousBlock() || toRenderBlock(next)->continuation() || toRenderBlock(next)->beingDestroyed())))
return false;
// FIXME: This check isn't required when inline run-ins can't be split into continuations.
@@ -1007,10 +1011,6 @@ void RenderBlock::removeChild(RenderObject* oldChild)
nextBlock->deleteLineBoxTree();
nextBlock->destroy();
next = 0;
-
- // FIXME: Revert the continuation change done above.
- if (oldChildBlock)
- oldChildBlock->setContinuation(0);
}
}
@@ -3033,7 +3033,7 @@ void RenderBlock::removeFloatingObject(RenderBox* o)
// Special-case zero- and less-than-zero-height floats: those don't touch
// the line that they're on, but it still needs to be dirtied. This is
// accomplished by pretending they have a height of 1.
- logicalBottom = max(logicalBottom, logicalTop + 1);
+ logicalBottom = max(logicalBottom, logicalTop == numeric_limits<int>::max() ? logicalTop : logicalTop + 1);
markLinesDirtyInBlockRange(0, logicalBottom);
}
m_floatingObjects->removeRef(it.current());
@@ -3807,7 +3807,7 @@ void RenderBlock::markLinesDirtyInBlockRange(int logicalTop, int logicalBottom,
RootInlineBox* lowestDirtyLine = lastRootBox();
RootInlineBox* afterLowest = lowestDirtyLine;
- while (lowestDirtyLine && lowestDirtyLine->blockLogicalHeight() >= logicalBottom) {
+ while (lowestDirtyLine && lowestDirtyLine->blockLogicalHeight() >= logicalBottom && logicalBottom < numeric_limits<int>::max()) {
afterLowest = lowestDirtyLine;
lowestDirtyLine = lowestDirtyLine->prevRootBox();
}
diff --git a/WebCore/rendering/RenderBlock.h b/WebCore/rendering/RenderBlock.h
index 5153218..cc06954 100644
--- a/WebCore/rendering/RenderBlock.h
+++ b/WebCore/rendering/RenderBlock.h
@@ -55,6 +55,7 @@ public:
RenderObjectChildList* children() { return &m_children; }
virtual void destroy();
+ bool beingDestroyed() const { return m_beingDestroyed; }
// These two functions are overridden for inline-block.
virtual int lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
@@ -717,7 +718,8 @@ private:
RenderObjectChildList m_children;
RenderLineBoxList m_lineBoxes; // All of the root line boxes created for this block flow. For example, <div>Hello<br>world.</div> will have two total lines for the <div>.
- mutable int m_lineHeight;
+ mutable int m_lineHeight : 31;
+ bool m_beingDestroyed : 1;
// RenderRubyBase objects need to be able to split and merge, moving their children around
// (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline).
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index 6b9fc68..c722136 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -609,23 +609,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintLogica
else if (fullLayout || o->needsLayout()) {
// Replaced elements
toRenderBox(o)->dirtyLineBoxes(fullLayout);
-#if defined(ANDROID_FLATTEN_IFRAME) || defined(ANDROID_FLATTEN_FRAMESET)
- // Android frame flattening during layout() may cause the
- // renderer to be destroyed, if for example a frames onresize handler
- // deletes the frame - see http://trac.webkit.org/changeset/61070 for example.
- // We may be able to remove this protector when we switch to the upstream
- // frame flattening code. In the case of an anonymous render object like RenderListMarker
- // the document is the DOM node associated with this RenderObject.
- RefPtr<Node> protector(o->isAnonymous() ? o->document() : o->node());
-#endif
o->layoutIfNeeded();
-#if defined(ANDROID_FLATTEN_IFRAME) || defined(ANDROID_FLATTEN_FRAMESET)
- // Ensure that the renderer still exists. If it's gone away we will crash pretty
- // fast by continuing to use the now invalid o pointer. If the renderer has gone,
- // then there's no point in continuing to try to layout it's children so we break.
- if (!protector->renderer())
- break;
-#endif
}
}
#else
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index fe78fd5..0944c37 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"
@@ -225,26 +227,28 @@ void RenderBox::removeFloatingOrPositionedChildFromBlockLists()
return;
if (isFloating()) {
- RenderBlock* outermostBlock = containingBlock();
- for (RenderBlock* p = outermostBlock; p && !p->isRenderView(); p = p->containingBlock()) {
- if (p->containsFloat(this))
- outermostBlock = p;
+ RenderBlock* parentBlock = 0;
+ for (RenderObject* curr = parent(); curr && !curr->isRenderView(); curr = curr->parent()) {
+ if (curr->isRenderBlock()) {
+ RenderBlock* currBlock = toRenderBlock(curr);
+ if (currBlock->containsFloat(this))
+ parentBlock = currBlock;
+ }
}
- if (outermostBlock) {
- RenderObject* parent = outermostBlock->parent();
+ if (parentBlock) {
+ RenderObject* parent = parentBlock->parent();
if (parent && parent->isFlexibleBox())
- outermostBlock = toRenderBlock(parent);
+ parentBlock = toRenderBlock(parent);
- outermostBlock->markAllDescendantsWithFloatsForLayout(this, false);
+ parentBlock->markAllDescendantsWithFloatsForLayout(this, false);
}
}
if (isPositioned()) {
- RenderObject* p;
- for (p = parent(); p; p = p->parent()) {
- if (p->isRenderBlock())
- toRenderBlock(p)->removePositionedObject(this);
+ for (RenderObject* curr = parent(); curr; curr = curr->parent()) {
+ if (curr->isRenderBlock())
+ toRenderBlock(curr)->removePositionedObject(this);
}
}
}
@@ -2078,13 +2082,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 +2119,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/RenderFrame.cpp b/WebCore/rendering/RenderFrame.cpp
index c3283f8..bc40976 100644
--- a/WebCore/rendering/RenderFrame.cpp
+++ b/WebCore/rendering/RenderFrame.cpp
@@ -28,12 +28,6 @@
#include "HTMLFrameElement.h"
#include "RenderView.h"
-#ifdef ANDROID_FLATTEN_FRAMESET
-#include "Frame.h"
-#include "Document.h"
-#include "RenderView.h"
-#endif
-
namespace WebCore {
RenderFrame::RenderFrame(HTMLFrameElement* frame)
@@ -68,29 +62,29 @@ void RenderFrame::viewCleared()
#ifdef ANDROID_FLATTEN_FRAMESET
void RenderFrame::layout()
{
- if (widget() && widget()->isFrameView()) {
- FrameView* view = static_cast<FrameView*>(widget());
- RenderView* root = NULL;
- if (view->frame() && view->frame()->document() &&
- view->frame()->document()->renderer() &&
- view->frame()->document()->renderer()->isRenderView())
- root = static_cast<RenderView*>(view->frame()->document()->renderer());
- if (root) {
- // Resize the widget so that the RenderView will layout according to those dimensions.
- view->resize(width(), height());
- view->layout();
- // We can only grow in width and height because if positionFrames gives us a width and we become smaller,
- // then the fixup process of forcing the frame to fill extra space will fail.
- const int docLeft = root->docLeft();
- if (width() > root->docWidth(docLeft)) {
- view->resize(root->docWidth(docLeft), 0);
- view->layout();
- }
- // Honor the height set by RenderFrameSet::positionFrames unless our document height is larger.
- setHeight(max(root->docHeight(), height()));
- setWidth(max(root->docWidth(docLeft), width()));
- }
+ FrameView* view = static_cast<FrameView*>(widget());
+ RenderView* root = view ? view->frame()->contentRenderer() : 0;
+ if (!width() || !height() || !root) {
+ setNeedsLayout(false);
+ return;
}
+
+ HTMLFrameElementBase* element = static_cast<HTMLFrameElementBase*>(node());
+ if (element->scrollingMode() == ScrollbarAlwaysOff && !root->isFrameSet()) {
+ setNeedsLayout(false);
+ return;
+ }
+
+ int layoutWidth = width();
+
+ setWidth(max(view->contentsWidth() + borderAndPaddingWidth(), width()));
+ setHeight(max(view->contentsHeight() + borderAndPaddingHeight(), height()));
+
+ // This should trigger a layout of the FrameView which will schedule a
+ // relayout of this RenderFrame.
+ if (layoutWidth < width())
+ setHeight(0);
+
setNeedsLayout(false);
}
#endif
diff --git a/WebCore/rendering/RenderIFrame.cpp b/WebCore/rendering/RenderIFrame.cpp
index 36d2449..19bca49 100644
--- a/WebCore/rendering/RenderIFrame.cpp
+++ b/WebCore/rendering/RenderIFrame.cpp
@@ -44,30 +44,6 @@ RenderIFrame::RenderIFrame(Element* element)
void RenderIFrame::computeLogicalHeight()
{
RenderPart::computeLogicalHeight();
-#ifdef ANDROID_FLATTEN_IFRAME
- if (!node()->hasTagName(iframeTag) || !widget() || !widget()->isFrameView())
- return;
- FrameView* view = static_cast<FrameView*>(widget());
- RenderView* root = static_cast<RenderView*>(view->frame()->contentRenderer());
- if (!root)
- return;
- // Do not expand if the scrollbars are suppressed and the height is fixed.
- bool scrolling = static_cast<HTMLIFrameElement*>(node())->scrollingMode() != ScrollbarAlwaysOff;
- if (!scrolling && style()->height().isFixed())
- return;
- // Update the widget
- updateWidgetPosition();
-
- // Layout to get the content height
- view->layout();
-
- int extraHeight = paddingTop() + paddingBottom() + borderTop() + borderBottom();
- setHeight(max(width(), view->contentsHeight() + extraHeight));
-
- // Update one last time to ensure the dimensions.
- updateWidgetPosition();
- return;
-#endif
if (!flattenFrame())
return;
@@ -86,38 +62,6 @@ void RenderIFrame::computeLogicalHeight()
void RenderIFrame::computeLogicalWidth()
{
RenderPart::computeLogicalWidth();
-#ifdef ANDROID_FLATTEN_IFRAME
- if (!node()->hasTagName(iframeTag) || !widget() || !widget()->isFrameView())
- return;
- FrameView* view = static_cast<FrameView*>(widget());
- RenderView* root = static_cast<RenderView*>(view->frame()->contentRenderer());
- if (!root)
- return;
- // Do not expand if the scrollbars are suppressed and the width is fixed.
- bool scrolling = static_cast<HTMLIFrameElement*>(node())->scrollingMode() != ScrollbarAlwaysOff;
- if (!scrolling && style()->width().isFixed())
- return;
- // Update the dimensions to get the correct minimum preferred
- // width
- updateWidgetPosition();
-
- int extraWidth = paddingLeft() + paddingRight() + borderLeft() + borderRight();
- // Set the width
- setWidth(max(width(), root->minPreferredLogicalWidth()) + extraWidth);
-
- // Update based on the new width
- updateWidgetPosition();
-
- // Layout to get the content width
- view->layout();
-
- setWidth(max(width(), view->contentsWidth() + extraWidth));
-
- // Update one last time to ensure the dimensions.
- updateWidgetPosition();
- return;
-#endif
-
if (!flattenFrame())
return;
@@ -166,79 +110,6 @@ void RenderIFrame::layout()
RenderPart::computeLogicalWidth();
RenderPart::computeLogicalHeight();
-#ifdef ANDROID_FLATTEN_IFRAME
- // Calculate the styled dimensions by subtracting the border and padding.
- int extraWidth = paddingLeft() + paddingRight() + borderLeft() + borderRight();
- int extraHeight = paddingTop() + paddingBottom() + borderTop() + borderBottom();
- int styleWidth = width() - extraWidth;
- int styleHeight = height() - extraHeight;
- // Some IFrames have a width and/or height of 1 when they are meant to be
- // hidden. If that is the case, do not try to expand.
- if (node()->hasTagName(iframeTag) && widget() && widget()->isFrameView() &&
- styleWidth > 1 && styleHeight > 1) {
- HTMLIFrameElement* element = static_cast<HTMLIFrameElement*>(node());
- bool scrolling = element->scrollingMode() != ScrollbarAlwaysOff;
- bool widthIsFixed = style()->width().isFixed();
- bool heightIsFixed = style()->height().isFixed();
- // If an iframe has a fixed dimension and suppresses scrollbars, it
- // will disrupt layout if we force it to expand. Plus on a desktop,
- // the extra content is not accessible.
- if (scrolling || !widthIsFixed || !heightIsFixed) {
- FrameView* view = static_cast<FrameView*>(widget());
- RenderView* root = view ? view->frame()->contentRenderer() : NULL;
- if (root && style()->visibility() != HIDDEN) {
- // Update the dimensions to get the correct minimum preferred
- // width
- updateWidgetPosition();
-
- // Use the preferred width if it is larger and only if
- // scrollbars are visible or the width style is not fixed.
- if (scrolling || !widthIsFixed)
- setWidth(max(width(), root->minPreferredLogicalWidth()) + extraWidth);
-
- // Resize the view to recalc the height.
- int h = height() - extraHeight;
- int w = width() - extraWidth;
- if (w > view->width())
- h = 0;
- if (w != view->width() || h != view->height()) {
- view->resize(w, h);
- }
-
- // Layout the view.
- view->layout();
-
- int contentHeight = view->contentsHeight();
- int contentWidth = view->contentsWidth();
- // Only change the width or height if scrollbars are visible or
- // if the style is not a fixed value. Use the maximum value so
- // that iframes never shrink.
- if (scrolling || !heightIsFixed)
- setHeight(max(height(), contentHeight + extraHeight));
- if (scrolling || !widthIsFixed)
- setWidth(max(width(), contentWidth + extraWidth));
-
- // Update one last time
- updateWidgetPosition();
-
- // Layout one more time to ensure all objects have the correct
- // height.
- view->layout();
-
-#if !ASSERT_DISABLED
- ASSERT(!view->layoutPending());
- ASSERT(!root->needsLayout());
- // Sanity check when assertions are enabled.
- RenderObject* c = root->nextInPreOrder();
- while (c) {
- ASSERT(!c->needsLayout());
- c = c->nextInPreOrder();
- }
-#endif
- }
- }
- }
-#endif
if (flattenFrame()) {
layoutWithFlattening(style()->width().isFixed(), style()->height().isFixed());
return;
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index b850ba3..f055e34 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -62,6 +62,9 @@
#include "GraphicsContext.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLNames.h"
+#if ENABLE(ANDROID_OVERFLOW_SCROLL)
+#include "HTMLTextAreaElement.h"
+#endif
#include "HitTestRequest.h"
#include "HitTestResult.h"
#include "OverflowEvent.h"
@@ -1159,14 +1162,6 @@ RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, int& xPos, i
return;
EPosition position = renderer()->style()->position();
-#if PLATFORM(ANDROID)
- if (position == FixedPosition) {
- if (renderer() && renderer()->isBox()) {
- (toRenderBox(renderer()))->computeLogicalWidth();
- (toRenderBox(renderer()))->computeLogicalHeight();
- }
- }
-#endif
if (position == FixedPosition && (!ancestorLayer || ancestorLayer == renderer()->view()->layer())) {
// If the fixed layer's container is the root, just add in the offset of the view. We can obtain this by calling
// localToAbsolute() on the RenderView.
@@ -2183,7 +2178,9 @@ RenderLayer::updateScrollInfoAfterLayout()
#if ENABLE(ANDROID_OVERFLOW_SCROLL)
bool hasOverflowScroll = ((horizontalOverflow && m_hBar) || (verticalOverflow && m_vBar))
- && !renderer()->isTextArea();
+ // Disable UI side scrolling for textareas, unless they are readonly.
+ && (!renderer()->isTextArea() || (renderer()->node()
+ && static_cast<HTMLTextAreaElement*>(renderer()->node())->readOnly()));
if (hasOverflowScroll != m_hasOverflowScroll) {
m_hasOverflowScroll = hasOverflowScroll;
dirtyZOrderLists();
diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp
index 48aa3ec..0d39f7a 100644
--- a/WebCore/rendering/RenderLayerBacking.cpp
+++ b/WebCore/rendering/RenderLayerBacking.cpp
@@ -1021,14 +1021,6 @@ void RenderLayerBacking::paintIntoLayer(RenderLayer* rootLayer, GraphicsContext*
bool selectionOnly = paintBehavior & PaintBehaviorSelectionOnly;
if (shouldPaint && (paintingPhase & GraphicsLayerPaintForeground)) {
-#if ENABLE(ANDROID_OVERFLOW_SCROLL)
- // Scroll to 0,0 and paint the entire contents, then scroll back the
- // the original offset.
- int x = m_owningLayer->scrollXOffset();
- int y = m_owningLayer->scrollYOffset();
- if (m_owningLayer->hasOverflowScroll())
- m_owningLayer->scrollToOffset(0, 0, false, false);
-#endif
// Set up the clip used when painting our children.
setClip(context, paintDirtyRect, clipRectToApply);
PaintInfo paintInfo(context, clipRectToApply,
@@ -1067,10 +1059,6 @@ void RenderLayerBacking::paintIntoLayer(RenderLayer* rootLayer, GraphicsContext*
// Now walk the sorted list of children with positive z-indices.
m_owningLayer->paintList(m_owningLayer->posZOrderList(), rootLayer, context, paintDirtyRect, paintBehavior, paintingRoot, 0, 0);
-#if ENABLE(ANDROID_OVERFLOW_SCROLL)
- if (m_owningLayer->hasOverflowScroll())
- m_owningLayer->scrollToOffset(x, y, false, false);
-#endif
}
if (shouldPaint && (paintingPhase & GraphicsLayerPaintMask)) {
diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp
index f31ab9d..6578d1d 100644
--- a/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/WebCore/rendering/RenderLayerCompositor.cpp
@@ -1193,27 +1193,10 @@ bool RenderLayerCompositor::requiresCompositingForAndroidLayers(const RenderLaye
return true;
#endif
#if ENABLE(COMPOSITED_FIXED_ELEMENTS)
- // First, check if we are in an iframe, and if so bail out
- if (m_renderView->document()->frame()->tree()->parent())
- return false;
- // For the moment, we want to only enable fixed composited layers on mobile websites.
// Enable composited layers (for fixed elements)
- // We can consider a website as being a 'mobile' site if all the
- // following checks are true:
- // 1) - the viewport width is either undefined (-1) or equal to device-width (0), and
- // 2) - no scaling is allowed
- if (!layer->isFixed())
- return false;
-
- Settings* settings = m_renderView->document()->settings();
- if (!settings)
- return false;
-
- if ((settings->viewportWidth() == -1 || settings->viewportWidth() == 0) &&
- !settings->viewportUserScalable())
+ if (layer->isFixed())
return true;
-
#endif
return false;
}
@@ -1288,6 +1271,10 @@ bool RenderLayerCompositor::clippedByAncestor(RenderLayer* layer) const
// into the hierarchy between this layer and its children in the z-order hierarchy.
bool RenderLayerCompositor::clipsCompositingDescendants(const RenderLayer* layer) const
{
+#if ENABLE(ANDROID_OVERFLOW_SCROLL)
+ if (layer->hasOverflowScroll())
+ return false;
+#endif
return layer->hasCompositingDescendant() &&
(layer->renderer()->hasOverflowClip() || layer->renderer()->hasClip());
}
diff --git a/WebCore/rendering/RenderTable.cpp b/WebCore/rendering/RenderTable.cpp
index 43b6b03..521dea1 100644
--- a/WebCore/rendering/RenderTable.cpp
+++ b/WebCore/rendering/RenderTable.cpp
@@ -167,7 +167,7 @@ void RenderTable::addChild(RenderObject* child, RenderObject* beforeChild)
if (!wrapInAnonymousSection) {
// If the next renderer is actually wrapped in an anonymous table section, we need to go up and find that.
- while (beforeChild && !beforeChild->isTableSection() && !beforeChild->isTableCol() && beforeChild->style()->display() != TABLE_CAPTION)
+ while (beforeChild && beforeChild->parent() != this)
beforeChild = beforeChild->parent();
RenderBox::addChild(child, beforeChild);
@@ -1172,6 +1172,8 @@ int RenderTable::firstLineBoxBaseline() const
if (isWritingModeRoot())
return -1;
+ recalcSectionsIfNeeded();
+
RenderTableSection* firstNonEmptySection = m_head ? m_head : (m_firstBody ? m_firstBody : m_foot);
if (firstNonEmptySection && !firstNonEmptySection->numRows())
firstNonEmptySection = sectionBelow(firstNonEmptySection, true);
diff --git a/WebCore/rendering/RenderTextControlMultiLine.cpp b/WebCore/rendering/RenderTextControlMultiLine.cpp
index eaa7eca..1a7ba36 100644
--- a/WebCore/rendering/RenderTextControlMultiLine.cpp
+++ b/WebCore/rendering/RenderTextControlMultiLine.cpp
@@ -41,7 +41,7 @@ RenderTextControlMultiLine::RenderTextControlMultiLine(Node* node, bool placehol
RenderTextControlMultiLine::~RenderTextControlMultiLine()
{
- if (node())
+ if (node() && node()->inDocument())
static_cast<HTMLTextAreaElement*>(node())->rendererWillBeDestroyed();
}
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;
diff --git a/WebCore/rendering/RenderView.h b/WebCore/rendering/RenderView.h
index 66b1d74..8436762 100644
--- a/WebCore/rendering/RenderView.h
+++ b/WebCore/rendering/RenderView.h
@@ -176,9 +176,6 @@ protected:
private:
bool shouldRepaint(const IntRect& r) const;
-#ifdef ANDROID_FLATTEN_FRAMESET
-public: // used by layout function
-#endif
int docHeight() const;
int docLeft() const;
int docWidth(int leftOverflow) const;
diff --git a/WebCore/rendering/RenderWidget.cpp b/WebCore/rendering/RenderWidget.cpp
index e5ccd05..6ea620f 100644
--- a/WebCore/rendering/RenderWidget.cpp
+++ b/WebCore/rendering/RenderWidget.cpp
@@ -345,7 +345,6 @@ void RenderWidget::updateWidgetPosition()
bool boundsChanged = setWidgetGeometry(IntRect(absPos.x(), absPos.y(), w, h));
-#ifndef ANDROID_FLATTEN_IFRAME
// if the frame bounds got changed, or if view needs layout (possibly indicating
// content size is wrong) we have to do a layout to set the right widget size
if (m_widget && m_widget->isFrameView()) {
@@ -354,7 +353,6 @@ void RenderWidget::updateWidgetPosition()
if ((boundsChanged || frameView->needsLayout()) && frameView->frame()->page())
frameView->layout();
}
-#endif
}
void RenderWidget::widgetPositionsUpdated()