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

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

Issue 19654003: Use explicit HTMLFrameElementBase cast (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index ef53aa0376276bcf0120b7459470c4d8a6048673..797c9f4b81ec5d54c85c5ef01f5c3b02e11cd62c 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -2180,10 +2180,10 @@ void RenderLayer::setScrollOffset(const IntPoint& newScrollOffset)
InspectorInstrumentation::didScrollLayer(frame);
}
-static inline bool frameElementAndViewPermitScroll(HTMLFrameElement* frameElement, FrameView* frameView)
+static inline bool frameElementAndViewPermitScroll(HTMLFrameElementBase* frameElementBase, FrameView* frameView)
{
// If scrollbars aren't explicitly forbidden, permit scrolling.
- if (frameElement && frameElement->scrollingMode() != ScrollbarAlwaysOff)
+ if (frameElementBase && frameElementBase->scrollingMode() != ScrollbarAlwaysOff)
return true;
// If scrollbars are forbidden, user initiated scrolls should obviously be ignored.
@@ -2239,12 +2239,12 @@ void RenderLayer::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignm
ownerElement = renderer()->document()->ownerElement();
if (ownerElement && ownerElement->renderer()) {
- HTMLFrameElement* frameElement = 0;
+ HTMLFrameElementBase* frameElementBase = 0;
if (ownerElement->hasTagName(frameTag) || ownerElement->hasTagName(iframeTag))
- frameElement = static_cast<HTMLFrameElement*>(ownerElement);
+ frameElementBase = static_cast<HTMLFrameElementBase*>(ownerElement);
- if (frameElementAndViewPermitScroll(frameElement, frameView)) {
+ if (frameElementAndViewPermitScroll(frameElementBase, frameView)) {
LayoutRect viewRect = frameView->visibleContentRect();
LayoutRect exposeRect = getRectToExpose(viewRect, rect, alignX, alignY);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698