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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 476223003: Use tighter typing for Document::ownerElement() return value (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index b2ab526971b02dcdd63479a75c8a8a7452e24ec5..6fb1f286133c111aef393c33506ea4cba78673d6 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -468,14 +468,10 @@ void RenderBox::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignmen
newRect = layer()->scrollableArea()->exposeRect(rect, alignX, alignY);
} else if (!parentBox && canBeProgramaticallyScrolled()) {
if (FrameView* frameView = this->frameView()) {
- Element* ownerElement = document().ownerElement();
+ HTMLFrameOwnerElement* ownerElement = document().ownerElement();
if (ownerElement && ownerElement->renderer()) {
- HTMLFrameElementBase* frameElementBase = 0;
-
- if (isHTMLFrameElement(*ownerElement) || isHTMLIFrameElement(*ownerElement))
- frameElementBase = toHTMLFrameElementBase(ownerElement);
-
+ HTMLFrameElementBase* frameElementBase = isHTMLFrameElementBase(*ownerElement) ? toHTMLFrameElementBase(ownerElement) : 0;
if (frameElementAndViewPermitScroll(frameElementBase, frameView)) {
LayoutRect viewRect = frameView->visibleContentRect();
LayoutRect exposeRect = ScrollAlignment::getRectToExpose(viewRect, rect, alignX, alignY);
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698