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

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

Issue 1319863006: (blink) Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update. Created 5 years, 3 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 unified diff | Download patch | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 #include "public/web/WebFrame.h" 6 #include "public/web/WebFrame.h"
7 7
8 #include "bindings/core/v8/WindowProxyManager.h" 8 #include "bindings/core/v8/WindowProxyManager.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 void WebFrame::setFrameOwnerSandboxFlags(WebSandboxFlags flags) 130 void WebFrame::setFrameOwnerSandboxFlags(WebSandboxFlags flags)
131 { 131 {
132 // At the moment, this is only used to replicate sandbox flags 132 // At the moment, this is only used to replicate sandbox flags
133 // for frames with a remote owner. 133 // for frames with a remote owner.
134 FrameOwner* owner = toCoreFrame(this)->owner(); 134 FrameOwner* owner = toCoreFrame(this)->owner();
135 ASSERT(owner); 135 ASSERT(owner);
136 toRemoteBridgeFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(f lags)); 136 toRemoteBridgeFrameOwner(owner)->setSandboxFlags(static_cast<SandboxFlags>(f lags));
137 } 137 }
138 138
139 void WebFrame::setFrameOwnerProperties(const WebFrameOwnerProperties& frameOwner Properties)
140 {
141 FrameOwner* owner = toCoreFrame(this)->owner();
142 if (!owner)
143 return;
144
145 ScrollbarMode scrollbarMode = ScrollbarAuto;
146 switch (frameOwnerProperties.scrollingMode) {
147 case WebFrameOwnerProperties::ScrollingModeAuto:
148 scrollbarMode = ScrollbarAuto;
149 break;
150 case WebFrameOwnerProperties::ScrollingModeAlwaysOff:
151 scrollbarMode = ScrollbarAlwaysOff;
152 break;
153 case WebFrameOwnerProperties::ScrollingModeAlwaysOn:
154 scrollbarMode = ScrollbarAlwaysOn;
155 break;
156 }
157 toRemoteBridgeFrameOwner(owner)->setScrollingMode(scrollbarMode);
158
159 toRemoteBridgeFrameOwner(owner)->setMarginWidth(frameOwnerProperties.marginW idth);
160 toRemoteBridgeFrameOwner(owner)->setMarginHeight(frameOwnerProperties.margin Height);
161 }
162
139 WebFrame* WebFrame::opener() const 163 WebFrame* WebFrame::opener() const
140 { 164 {
141 return m_opener; 165 return m_opener;
142 } 166 }
143 167
144 void WebFrame::setOpener(WebFrame* opener) 168 void WebFrame::setOpener(WebFrame* opener)
145 { 169 {
146 if (m_opener) 170 if (m_opener)
147 m_opener->m_openedFrameTracker->remove(this); 171 m_opener->m_openedFrameTracker->remove(this);
148 if (opener) 172 if (opener)
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \ 373 void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { tra ceFramesImpl(visitor, frame); } \
350 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); } 374 void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesI mpl(visitor); }
351 375
352 DEFINE_VISITOR_METHOD(Visitor*) 376 DEFINE_VISITOR_METHOD(Visitor*)
353 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor) 377 DEFINE_VISITOR_METHOD(InlinedGlobalMarkingVisitor)
354 378
355 #undef DEFINE_VISITOR_METHOD 379 #undef DEFINE_VISITOR_METHOD
356 #endif 380 #endif
357 381
358 } // namespace blink 382 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698