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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutFullScreen.h

Issue 2168373002: Revert of Reland "Implement FullScreen using top layer." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve WebFrameTest.cpp conflict and appease presubmit Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutFullScreen.h
diff --git a/third_party/WebKit/Source/core/page/PointerLockController.h b/third_party/WebKit/Source/core/layout/LayoutFullScreen.h
similarity index 52%
copy from third_party/WebKit/Source/core/page/PointerLockController.h
copy to third_party/WebKit/Source/core/layout/LayoutFullScreen.h
index 306a434817b66a765755703a5e84c9dd00055ca8..3ba2a1dd8265f8b2c324649bd829f29c9d880318 100644
--- a/third_party/WebKit/Source/core/page/PointerLockController.h
+++ b/third_party/WebKit/Source/core/layout/LayoutFullScreen.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,52 +22,48 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef PointerLockController_h
-#define PointerLockController_h
+#ifndef LayoutFullScreen_h
+#define LayoutFullScreen_h
#include "core/CoreExport.h"
-#include "platform/heap/Handle.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/AtomicString.h"
+#include "core/layout/LayoutFlexibleBox.h"
+#include "core/style/StyleInheritedData.h"
namespace blink {
-class Element;
-class Document;
-class Page;
-class PlatformMouseEvent;
+class LayoutBlockFlow;
-class CORE_EXPORT PointerLockController final : public GarbageCollected<PointerLockController> {
- WTF_MAKE_NONCOPYABLE(PointerLockController);
+class CORE_EXPORT LayoutFullScreen final : public LayoutFlexibleBox {
public:
- static PointerLockController* create(Page*);
+ static LayoutFullScreen* createAnonymous(Document*);
- void requestPointerLock(Element* target);
- void requestPointerUnlock();
- void elementRemoved(Element*);
- void documentDetached(Document*);
- bool lockPending() const;
- Element* element() const;
+ bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectLayoutFullScreen || LayoutFlexibleBox::isOfType(type); }
+ const char* name() const override { return "LayoutFullScreen"; }
- void didAcquirePointerLock();
- void didNotAcquirePointerLock();
- void didLosePointerLock();
- void dispatchLockedMouseEvent(const PlatformMouseEvent&, const AtomicString& eventType);
+ void resetPlaceholder() { m_placeholder = nullptr; }
+ LayoutBlockFlow* placeholder() { return m_placeholder; }
+ void createPlaceholder(PassRefPtr<ComputedStyle>, const LayoutRect& frameRect);
- DECLARE_TRACE();
+
+ static LayoutObject* wrapLayoutObject(LayoutObject*, LayoutObject*, Document*);
+ void unwrapLayoutObject();
+
+ void updateStyle();
+ bool anonymousHasStylePropagationOverride() override { return true; }
+
+ // Must call setStyleWithWritingModeOfParent() instead.
+ void setStyle(PassRefPtr<ComputedStyle>) = delete;
private:
- explicit PointerLockController(Page*);
- void clearElement();
- void enqueueEvent(const AtomicString& type, Element*);
- void enqueueEvent(const AtomicString& type, Document*);
-
- Member<Page> m_page;
- bool m_lockPending;
- Member<Element> m_element;
- Member<Document> m_documentOfRemovedElementWhileWaitingForUnlock;
+ LayoutFullScreen();
+ void willBeDestroyed() override;
+
+protected:
+ LayoutBlockFlow* m_placeholder;
};
+DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFullScreen, isLayoutFullScreen());
+
} // namespace blink
-#endif // PointerLockController_h
+#endif
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/layout/LayoutFullScreen.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698