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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameOwner.h

Issue 2564633002: Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: Rebaseline. Created 3 years, 10 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef FrameOwner_h 5 #ifndef FrameOwner_h
6 #define FrameOwner_h 6 #define FrameOwner_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/dom/SandboxFlags.h" 9 #include "core/dom/SandboxFlags.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 30 matching lines...) Expand all
41 41
42 // Returns the 'name' content attribute value of the browsing context 42 // Returns the 'name' content attribute value of the browsing context
43 // container. 43 // container.
44 // https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-conta iner 44 // https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-conta iner
45 virtual AtomicString browsingContextContainerName() const = 0; 45 virtual AtomicString browsingContextContainerName() const = 0;
46 virtual ScrollbarMode scrollingMode() const = 0; 46 virtual ScrollbarMode scrollingMode() const = 0;
47 virtual int marginWidth() const = 0; 47 virtual int marginWidth() const = 0;
48 virtual int marginHeight() const = 0; 48 virtual int marginHeight() const = 0;
49 virtual bool allowFullscreen() const = 0; 49 virtual bool allowFullscreen() const = 0;
50 virtual bool allowPaymentRequest() const = 0; 50 virtual bool allowPaymentRequest() const = 0;
51 virtual bool isDisplayNone() const = 0;
51 virtual AtomicString csp() const = 0; 52 virtual AtomicString csp() const = 0;
52 virtual const WebVector<mojom::blink::PermissionName>& delegatedPermissions() 53 virtual const WebVector<mojom::blink::PermissionName>& delegatedPermissions()
53 const = 0; 54 const = 0;
54 }; 55 };
55 56
56 // TODO(dcheng): This class is an internal implementation detail of provisional 57 // TODO(dcheng): This class is an internal implementation detail of provisional
57 // frames. Move this into WebLocalFrameImpl.cpp and remove existing dependencies 58 // frames. Move this into WebLocalFrameImpl.cpp and remove existing dependencies
58 // on it. 59 // on it.
59 class CORE_EXPORT DummyFrameOwner 60 class CORE_EXPORT DummyFrameOwner
60 : public GarbageCollectedFinalized<DummyFrameOwner>, 61 : public GarbageCollectedFinalized<DummyFrameOwner>,
(...skipping 14 matching lines...) Expand all
75 bool canRenderFallbackContent() const override { return false; } 76 bool canRenderFallbackContent() const override { return false; }
76 void renderFallbackContent() override {} 77 void renderFallbackContent() override {}
77 AtomicString browsingContextContainerName() const override { 78 AtomicString browsingContextContainerName() const override {
78 return AtomicString(); 79 return AtomicString();
79 } 80 }
80 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; } 81 ScrollbarMode scrollingMode() const override { return ScrollbarAuto; }
81 int marginWidth() const override { return -1; } 82 int marginWidth() const override { return -1; }
82 int marginHeight() const override { return -1; } 83 int marginHeight() const override { return -1; }
83 bool allowFullscreen() const override { return false; } 84 bool allowFullscreen() const override { return false; }
84 bool allowPaymentRequest() const override { return false; } 85 bool allowPaymentRequest() const override { return false; }
86 bool isDisplayNone() const override { return false; }
85 AtomicString csp() const override { return nullAtom; } 87 AtomicString csp() const override { return nullAtom; }
86 const WebVector<mojom::blink::PermissionName>& delegatedPermissions() 88 const WebVector<mojom::blink::PermissionName>& delegatedPermissions()
87 const override { 89 const override {
88 DEFINE_STATIC_LOCAL(WebVector<mojom::blink::PermissionName>, permissions, 90 DEFINE_STATIC_LOCAL(WebVector<mojom::blink::PermissionName>, permissions,
89 ()); 91 ());
90 return permissions; 92 return permissions;
91 } 93 }
92 94
93 private: 95 private:
94 // Intentionally private to prevent redundant checks when the type is 96 // Intentionally private to prevent redundant checks when the type is
95 // already DummyFrameOwner. 97 // already DummyFrameOwner.
96 bool isLocal() const override { return false; } 98 bool isLocal() const override { return false; }
97 bool isRemote() const override { return false; } 99 bool isRemote() const override { return false; }
98 }; 100 };
99 101
100 } // namespace blink 102 } // namespace blink
101 103
102 #endif // FrameOwner_h 104 #endif // FrameOwner_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/html/HTMLFrameElementBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698