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

Side by Side Diff: Source/web/FrameLoaderClientImpl.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 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 180 }
181 181
182 void FrameLoaderClientImpl::didChangeScrollOffset() 182 void FrameLoaderClientImpl::didChangeScrollOffset()
183 { 183 {
184 if (m_webFrame->client()) 184 if (m_webFrame->client())
185 m_webFrame->client()->didChangeScrollOffset(m_webFrame); 185 m_webFrame->client()->didChangeScrollOffset(m_webFrame);
186 if (WebViewImpl* webview = m_webFrame->viewImpl()) 186 if (WebViewImpl* webview = m_webFrame->viewImpl())
187 webview->devToolsEmulator()->viewportChanged(); 187 webview->devToolsEmulator()->viewportChanged();
188 } 188 }
189 189
190 void FrameLoaderClientImpl::didChangeScrollingMode(Frame* childFrame, ScrollbarM ode scrollingMode)
191 {
192 if (!m_webFrame->client())
193 return;
194
195 WebFrameOwnerProperties::ScrollingMode webScrollingMode = WebFrameOwnerPrope rties::ScrollingModeAuto;
196 switch (scrollingMode) {
197 case ScrollbarAuto:
198 webScrollingMode = WebFrameOwnerProperties::ScrollingModeAuto;
199 break;
200 case ScrollbarAlwaysOn:
201 webScrollingMode = WebFrameOwnerProperties::ScrollingModeAlwaysOn;
202 break;
203 case ScrollbarAlwaysOff:
204 webScrollingMode = WebFrameOwnerProperties::ScrollingModeAlwaysOff;
205 break;
206 }
207 m_webFrame->client()->didChangeScrollingMode(WebFrame::fromFrame(childFrame) , webScrollingMode);
208 }
209
210 void FrameLoaderClientImpl::didChangeMarginWidth(Frame* childFrame, int newMargi nWidth)
211 {
212 if (m_webFrame->client())
213 m_webFrame->client()->didChangeMarginWidth(WebFrame::fromFrame(childFram e), newMarginWidth);
214 }
215
216 void FrameLoaderClientImpl::didChangeMarginHeight(Frame* childFrame, int newMarg inHeight)
217 {
218 if (m_webFrame->client())
219 m_webFrame->client()->didChangeMarginHeight(WebFrame::fromFrame(childFra me), newMarginHeight);
220 }
221
190 void FrameLoaderClientImpl::didUpdateCurrentHistoryItem() 222 void FrameLoaderClientImpl::didUpdateCurrentHistoryItem()
191 { 223 {
192 if (m_webFrame->client()) 224 if (m_webFrame->client())
193 m_webFrame->client()->didUpdateCurrentHistoryItem(m_webFrame); 225 m_webFrame->client()->didUpdateCurrentHistoryItem(m_webFrame);
194 } 226 }
195 227
196 void FrameLoaderClientImpl::didRemoveAllPendingStylesheet() 228 void FrameLoaderClientImpl::didRemoveAllPendingStylesheet()
197 { 229 {
198 WebViewImpl* webview = m_webFrame->viewImpl(); 230 WebViewImpl* webview = m_webFrame->viewImpl();
199 if (webview) 231 if (webview)
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 988
957 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 989 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
958 { 990 {
959 if (m_webFrame->client()) { 991 if (m_webFrame->client()) {
960 m_webFrame->client()->suddenTerminationDisablerChanged( 992 m_webFrame->client()->suddenTerminationDisablerChanged(
961 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 993 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
962 } 994 }
963 } 995 }
964 996
965 } // namespace blink 997 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698