blob: e6cb4e9c25f87588e0805fd7e2a128ea861a1715 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "core/fullscreen/ElementFullscreen.h"
#include "core/frame/UseCounter.h"
#include "core/fullscreen/Fullscreen.h"
namespace blink {
void ElementFullscreen::requestFullscreen(Element& element) {
Fullscreen::RequestFullscreen(element, Fullscreen::RequestType::kUnprefixed);
}
void ElementFullscreen::webkitRequestFullscreen(Element& element) {
if (element.IsInShadowTree()) {
UseCounter::Count(element.GetDocument(),
WebFeature::kPrefixedElementRequestFullscreenInShadow);
}
Fullscreen::RequestFullscreen(element, Fullscreen::RequestType::kPrefixed);
}
} // namespace blink