Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(807)

Unified Diff: sky/engine/core/rendering/RenderObject.cpp

Issue 878303002: Remove more scrolling code from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderTheme.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderObject.cpp
diff --git a/sky/engine/core/rendering/RenderObject.cpp b/sky/engine/core/rendering/RenderObject.cpp
index deb3d761cb7caa36caf7c1cc2bf560a74fcefca7..9f87c478b911a3edf47d5baf643822e3765c5043 100644
--- a/sky/engine/core/rendering/RenderObject.cpp
+++ b/sky/engine/core/rendering/RenderObject.cpp
@@ -42,7 +42,6 @@
#include "sky/engine/core/frame/Settings.h"
#include "sky/engine/core/html/HTMLAnchorElement.h"
#include "sky/engine/core/html/HTMLElement.h"
-#include "sky/engine/core/page/AutoscrollController.h"
#include "sky/engine/core/page/EventHandler.h"
#include "sky/engine/core/page/Page.h"
#include "sky/engine/core/rendering/HitTestResult.h"
@@ -412,16 +411,6 @@ RenderLayer* RenderObject::enclosingLayer() const
return 0;
}
-bool RenderObject::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignment& alignX, const ScrollAlignment& alignY)
-{
- RenderBox* enclosingBox = this->enclosingBox();
- if (!enclosingBox)
- return false;
-
- enclosingBox->scrollRectToVisible(rect, alignX, alignY);
- return true;
-}
-
RenderBox* RenderObject::enclosingBox() const
{
RenderObject* curr = const_cast<RenderObject*>(this);
@@ -448,12 +437,6 @@ RenderBoxModelObject* RenderObject::enclosingBoxModelObject() const
return 0;
}
-RenderBox* RenderObject::enclosingScrollableBox() const
-{
- // FIXME(sky): Remove.
- return 0;
-}
-
bool RenderObject::skipInvalidationWhenLaidOutChildren() const
{
if (!neededLayoutBecauseOfChildren())
@@ -1419,12 +1402,8 @@ void RenderObject::mapLocalToContainer(const RenderLayerModelObject* paintInvali
return;
// FIXME: this should call offsetFromContainer to share code, but I'm not sure it's ever called.
- if (mode & ApplyContainerFlip && o->isBox()) {
+ if (mode & ApplyContainerFlip && o->isBox())
mode &= ~ApplyContainerFlip;
- }
-
- if (o->hasOverflowClip())
- transformState.move(-toRenderBox(o)->scrolledContentOffset());
o->mapLocalToContainer(paintInvalidationContainer, transformState, mode);
}
@@ -1436,25 +1415,16 @@ const RenderObject* RenderObject::pushMappingToContainer(const RenderLayerModelO
RenderObject* container = parent();
if (!container)
return 0;
-
- // FIXME: this should call offsetFromContainer to share code, but I'm not sure it's ever called.
- LayoutSize offset;
- if (container->hasOverflowClip())
- offset = -toRenderBox(container)->scrolledContentOffset();
-
- geometryMap.push(this, offset, false);
-
+ // FIXME(sky): Do we need to make this call?
+ geometryMap.push(this, LayoutSize(), false);
return container;
}
void RenderObject::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const
{
RenderObject* o = parent();
- if (o) {
+ if (o)
o->mapAbsoluteToLocalPoint(mode, transformState);
- if (o->hasOverflowClip())
- transformState.move(toRenderBox(o)->scrolledContentOffset());
- }
}
bool RenderObject::shouldUseTransformFromContainer(const RenderObject* containerObject) const
@@ -1509,15 +1479,9 @@ FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, con
LayoutSize RenderObject::offsetFromContainer(const RenderObject* o, const LayoutPoint& point, bool* offsetDependsOnPoint) const
{
ASSERT(o == container());
-
LayoutSize offset;
-
- if (o->hasOverflowClip())
- offset -= toRenderBox(o)->scrolledContentOffset();
-
if (offsetDependsOnPoint)
*offsetDependsOnPoint = false;
-
return offset;
}
@@ -1641,16 +1605,8 @@ void RenderObject::willBeDestroyed()
if (children)
children->destroyLeftoverChildren();
- // If this renderer is being autoscrolled, stop the autoscrolling.
- if (LocalFrame* frame = this->frame()) {
- if (frame->page())
- frame->page()->autoscrollController().stopAutoscrollIfNeeded(this);
- }
-
remove();
-
setAncestorLineBoxDirty(false);
-
clearLayoutRootIfNeeded();
}
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698