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

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

Issue 2199783002: Clarify fullscreenElement vs. currentFullScreenElement distinction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 m_element->setNeedsCompositingUpdate(); 314 m_element->setNeedsCompositingUpdate();
315 } 315 }
316 316
317 void WebPluginContainerImpl::requestFullscreen() 317 void WebPluginContainerImpl::requestFullscreen()
318 { 318 {
319 Fullscreen::from(m_element->document()).requestFullscreen(*m_element, Fullsc reen::PrefixedRequest); 319 Fullscreen::from(m_element->document()).requestFullscreen(*m_element, Fullsc reen::PrefixedRequest);
320 } 320 }
321 321
322 bool WebPluginContainerImpl::isFullscreenElement() const 322 bool WebPluginContainerImpl::isFullscreenElement() const
323 { 323 {
324 if (Fullscreen* fullscreen = Fullscreen::fromIfExists(m_element->document()) ) 324 return Fullscreen::isCurrentFullScreenElement(*m_element);
325 return m_element == fullscreen->webkitCurrentFullScreenElement();
326 return false;
327 } 325 }
328 326
329 void WebPluginContainerImpl::cancelFullscreen() 327 void WebPluginContainerImpl::cancelFullscreen()
330 { 328 {
331 Fullscreen::fullyExitFullscreen(m_element->document()); 329 Fullscreen::fullyExitFullscreen(m_element->document());
332 } 330 }
333 331
334 bool WebPluginContainerImpl::supportsPaginatedPrint() const 332 bool WebPluginContainerImpl::supportsPaginatedPrint() const
335 { 333 {
336 return m_webPlugin->supportsPaginatedPrint(); 334 return m_webPlugin->supportsPaginatedPrint();
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 // frame view. 937 // frame view.
940 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t); 938 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t);
941 } 939 }
942 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 940 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
943 // Convert to the plugin position. 941 // Convert to the plugin position.
944 for (size_t i = 0; i < cutOutRects.size(); i++) 942 for (size_t i = 0; i < cutOutRects.size(); i++)
945 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 943 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
946 } 944 }
947 945
948 } // namespace blink 946 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FullscreenController.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698