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

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

Issue 351213007: Ensure that the controls attribute is correctly reflected in JS. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: REbase Created 6 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 unified diff | Download patch
« no previous file with comments | « Source/web/ContextMenuClientImpl.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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 else 3127 else
3128 mediaElement->pause(); 3128 mediaElement->pause();
3129 break; 3129 break;
3130 case WebMediaPlayerAction::Mute: 3130 case WebMediaPlayerAction::Mute:
3131 mediaElement->setMuted(action.enable); 3131 mediaElement->setMuted(action.enable);
3132 break; 3132 break;
3133 case WebMediaPlayerAction::Loop: 3133 case WebMediaPlayerAction::Loop:
3134 mediaElement->setLoop(action.enable); 3134 mediaElement->setLoop(action.enable);
3135 break; 3135 break;
3136 case WebMediaPlayerAction::Controls: 3136 case WebMediaPlayerAction::Controls:
3137 mediaElement->setControls(action.enable); 3137 mediaElement->setBooleanAttribute(HTMLNames::controlsAttr, action.enable );
3138 break; 3138 break;
3139 default: 3139 default:
3140 ASSERT_NOT_REACHED(); 3140 ASSERT_NOT_REACHED();
3141 } 3141 }
3142 } 3142 }
3143 3143
3144 void WebViewImpl::performPluginAction(const WebPluginAction& action, 3144 void WebViewImpl::performPluginAction(const WebPluginAction& action,
3145 const WebPoint& location) 3145 const WebPoint& location)
3146 { 3146 {
3147 HitTestResult result = hitTestResultForWindowPos(location); 3147 HitTestResult result = hitTestResultForWindowPos(location);
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
4159 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4159 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4160 4160
4161 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4161 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4162 return false; 4162 return false;
4163 4163
4164 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4164 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4165 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4165 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4166 } 4166 }
4167 4167
4168 } // namespace blink 4168 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ContextMenuClientImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698