Diff
Modified: trunk/Source/WebCore/ChangeLog (173022 => 173023)
--- trunk/Source/WebCore/ChangeLog 2014-08-27 22:18:37 UTC (rev 173022)
+++ trunk/Source/WebCore/ChangeLog 2014-08-27 22:20:49 UTC (rev 173023)
@@ -1,3 +1,29 @@
+2014-08-27 Beth Dakin <[email protected]>
+
+ Make isScrollableOrRubberbandable() a virtual function on RenderLayerModelObject
+ https://bugs.webkit.org/show_bug.cgi?id=136307
+
+ Reviewed by Simon Fraser.
+
+ Remove extra parentheses.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::isScrollable):
+
+ Mark isScrollableOrRubberbandable() as override now that the root implementation
+ is moving to RenderLayerModelObject. It can also be private now.
+ * rendering/RenderBox.h:
+
+ isBox() check and cast are no longer necessary.
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
+
+ Base implementation should return false.
+ * rendering/RenderLayerModelObject.h:
+ (WebCore::RenderLayerModelObject::isScrollableOrRubberbandable):
+
+ Mark as override.
+ * rendering/RenderView.h:
+
2014-08-27 Antti Koivisto <[email protected]>
REGRESSION(r172946): Plugin tests asserting on Yosemite debug bot
Modified: trunk/Source/WebCore/page/FrameView.cpp (173022 => 173023)
--- trunk/Source/WebCore/page/FrameView.cpp 2014-08-27 22:18:37 UTC (rev 173022)
+++ trunk/Source/WebCore/page/FrameView.cpp 2014-08-27 22:20:49 UTC (rev 173023)
@@ -3282,7 +3282,7 @@
if (requiresActualOverflowToBeConsideredScrollable) {
IntSize totalContentsSize = this->totalContentsSize();
IntSize visibleContentSize = visibleContentRect(LegacyIOSDocumentVisibleRect).size();
- if ((totalContentsSize.height() <= visibleContentSize.height() && totalContentsSize.width() <= visibleContentSize.width()))
+ if (totalContentsSize.height() <= visibleContentSize.height() && totalContentsSize.width() <= visibleContentSize.width())
return false;
}
Modified: trunk/Source/WebCore/rendering/RenderBox.h (173022 => 173023)
--- trunk/Source/WebCore/rendering/RenderBox.h 2014-08-27 22:18:37 UTC (rev 173022)
+++ trunk/Source/WebCore/rendering/RenderBox.h 2014-08-27 22:20:49 UTC (rev 173023)
@@ -462,7 +462,6 @@
virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint());
virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0);
bool canBeScrolledAndHasScrollableArea() const;
- virtual bool isScrollableOrRubberbandable() const;
virtual bool canBeProgramaticallyScrolled() const;
virtual void autoscroll(const IntPoint&);
bool canAutoscroll() const;
@@ -667,6 +666,8 @@
bool includeVerticalScrollbarSize() const;
bool includeHorizontalScrollbarSize() const;
+ virtual bool isScrollableOrRubberbandable() const override;
+
// Returns true if we did a full repaint
bool repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer* layers, bool drawingBackground);
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (173022 => 173023)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-08-27 22:18:37 UTC (rev 173022)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-08-27 22:20:49 UTC (rev 173023)
@@ -3068,7 +3068,7 @@
bool RenderLayer::hasScrollableOrRubberbandableAncestor()
{
for (RenderLayer* nextLayer = parentLayerCrossFrame(this); nextLayer; nextLayer = parentLayerCrossFrame(nextLayer)) {
- if (nextLayer->renderer().isBox() && toRenderBox(nextLayer->renderer()).isScrollableOrRubberbandable())
+ if (nextLayer->renderer().isScrollableOrRubberbandable())
return true;
}
Modified: trunk/Source/WebCore/rendering/RenderLayerModelObject.h (173022 => 173023)
--- trunk/Source/WebCore/rendering/RenderLayerModelObject.h 2014-08-27 22:18:37 UTC (rev 173022)
+++ trunk/Source/WebCore/rendering/RenderLayerModelObject.h 2014-08-27 22:20:49 UTC (rev 173023)
@@ -49,6 +49,8 @@
// The query rect is given in local coordinate system.
virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const { return false; }
+ virtual bool isScrollableOrRubberbandable() const { return false; }
+
protected:
RenderLayerModelObject(Element&, PassRef<RenderStyle>, unsigned baseTypeFlags);
RenderLayerModelObject(Document&, PassRef<RenderStyle>, unsigned baseTypeFlags);
Modified: trunk/Source/WebCore/rendering/RenderView.h (173022 => 173023)
--- trunk/Source/WebCore/rendering/RenderView.h 2014-08-27 22:18:37 UTC (rev 173022)
+++ trunk/Source/WebCore/rendering/RenderView.h 2014-08-27 22:20:49 UTC (rev 173023)
@@ -303,7 +303,7 @@
friend class LayoutStateMaintainer;
friend class LayoutStateDisabler;
- virtual bool isScrollableOrRubberbandable() const;
+ virtual bool isScrollableOrRubberbandable() const override;
void splitSelectionBetweenSubtrees(RenderObject* start, int startPos, RenderObject* end, int endPos, SelectionRepaintMode blockRepaintMode);
void clearSubtreeSelection(const SelectionSubtreeRoot&, SelectionRepaintMode, OldSelectionData&);