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

Side by Side Diff: third_party/WebKit/Source/web/WebFrame.cpp

Issue 2507023002: Support script modify iframe scrolling, marginWidth and marginHeight attr (Closed)
Patch Set: remove using namespace Created 4 years 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "public/web/WebFrame.h" 5 #include "public/web/WebFrame.h"
6 6
7 #include "bindings/core/v8/WindowProxyManager.h" 7 #include "bindings/core/v8/WindowProxyManager.h"
8 #include "core/HTMLNames.h"
8 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
9 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 11 #include "core/frame/LocalFrame.h"
11 #include "core/frame/RemoteFrame.h" 12 #include "core/frame/RemoteFrame.h"
12 #include "core/html/HTMLFrameElementBase.h" 13 #include "core/html/HTMLFrameElementBase.h"
13 #include "core/html/HTMLFrameOwnerElement.h" 14 #include "core/html/HTMLFrameOwnerElement.h"
14 #include "core/page/Page.h" 15 #include "core/page/Page.h"
15 #include "platform/UserGestureIndicator.h" 16 #include "platform/UserGestureIndicator.h"
16 #include "platform/heap/Handle.h" 17 #include "platform/heap/Handle.h"
17 #include "public/web/WebElement.h" 18 #include "public/web/WebElement.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 WebInsecureRequestPolicy WebFrame::getInsecureRequestPolicy() const { 132 WebInsecureRequestPolicy WebFrame::getInsecureRequestPolicy() const {
132 return toImplBase()->frame()->securityContext()->getInsecureRequestPolicy(); 133 return toImplBase()->frame()->securityContext()->getInsecureRequestPolicy();
133 } 134 }
134 135
135 void WebFrame::setFrameOwnerProperties( 136 void WebFrame::setFrameOwnerProperties(
136 const WebFrameOwnerProperties& properties) { 137 const WebFrameOwnerProperties& properties) {
137 // At the moment, this is only used to replicate frame owner properties 138 // At the moment, this is only used to replicate frame owner properties
138 // for frames with a remote owner. 139 // for frames with a remote owner.
139 RemoteFrameOwner* owner = toRemoteFrameOwner(toImplBase()->frame()->owner()); 140 RemoteFrameOwner* owner = toRemoteFrameOwner(toImplBase()->frame()->owner());
140 DCHECK(owner); 141 DCHECK(owner);
142
143 Frame* frame = toImplBase()->frame();
144 DCHECK(frame);
145
146 if (frame->isLocalFrame()) {
147 toLocalFrame(frame)->document()->willChangeFrameOwnerProperties(
148 properties.marginWidth, properties.marginHeight,
149 static_cast<ScrollbarMode>(properties.scrollingMode));
150 }
151
141 owner->setScrollingMode(properties.scrollingMode); 152 owner->setScrollingMode(properties.scrollingMode);
142 owner->setMarginWidth(properties.marginWidth); 153 owner->setMarginWidth(properties.marginWidth);
143 owner->setMarginHeight(properties.marginHeight); 154 owner->setMarginHeight(properties.marginHeight);
144 owner->setAllowFullscreen(properties.allowFullscreen); 155 owner->setAllowFullscreen(properties.allowFullscreen);
145 owner->setCsp(properties.requiredCsp); 156 owner->setCsp(properties.requiredCsp);
146 owner->setDelegatedpermissions(properties.delegatedPermissions); 157 owner->setDelegatedpermissions(properties.delegatedPermissions);
147 } 158 }
148 159
149 WebFrame* WebFrame::opener() const { 160 WebFrame* WebFrame::opener() const {
150 return m_opener; 161 return m_opener;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { \ 336 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { \
326 clearWeakFramesImpl(visitor); \ 337 clearWeakFramesImpl(visitor); \
327 } 338 }
328 339
329 DEFINE_VISITOR_METHOD(Visitor*) 340 DEFINE_VISITOR_METHOD(Visitor*)
330 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) 341 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor)
331 342
332 #undef DEFINE_VISITOR_METHOD 343 #undef DEFINE_VISITOR_METHOD
333 344
334 } // namespace blink 345 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698