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

Side by Side Diff: Source/core/html/HTMLFrameOwnerElement.h

Issue 1319863006: (blink) Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address nits Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLFrameElementBase.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | 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) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 virtual void disconnectContentFrame(); 53 virtual void disconnectContentFrame();
54 54
55 // Most subclasses use LayoutPart (either LayoutEmbeddedObject or LayoutIFra me) 55 // Most subclasses use LayoutPart (either LayoutEmbeddedObject or LayoutIFra me)
56 // except for HTMLObjectElement and HTMLEmbedElement which may return any 56 // except for HTMLObjectElement and HTMLEmbedElement which may return any
57 // LayoutObject when using fallback content. 57 // LayoutObject when using fallback content.
58 LayoutPart* layoutPart() const; 58 LayoutPart* layoutPart() const;
59 59
60 Document* getSVGDocument(ExceptionState&) const; 60 Document* getSVGDocument(ExceptionState&) const;
61 61
62 virtual ScrollbarMode scrollingMode() const { return ScrollbarAuto; }
63
64 virtual bool loadedNonEmptyDocument() const { return false; } 62 virtual bool loadedNonEmptyDocument() const { return false; }
65 virtual void didLoadNonEmptyDocument() { } 63 virtual void didLoadNonEmptyDocument() { }
66 64
67 void setWidget(PassRefPtrWillBeRawPtr<Widget>); 65 void setWidget(PassRefPtrWillBeRawPtr<Widget>);
68 Widget* ownedWidget() const; 66 Widget* ownedWidget() const;
69 67
70 class UpdateSuspendScope { 68 class UpdateSuspendScope {
71 STACK_ALLOCATED(); 69 STACK_ALLOCATED();
72 public: 70 public:
73 UpdateSuspendScope(); 71 UpdateSuspendScope();
74 ~UpdateSuspendScope(); 72 ~UpdateSuspendScope();
75 73
76 private: 74 private:
77 void performDeferredWidgetTreeOperations(); 75 void performDeferredWidgetTreeOperations();
78 }; 76 };
79 77
80 // FrameOwner overrides: 78 // FrameOwner overrides:
81 bool isLocal() const override { return true; } 79 bool isLocal() const override { return true; }
82 void dispatchLoad() override; 80 void dispatchLoad() override;
83 SandboxFlags sandboxFlags() const override { return m_sandboxFlags; } 81 SandboxFlags sandboxFlags() const override { return m_sandboxFlags; }
84 void renderFallbackContent() override { } 82 void renderFallbackContent() override { }
83 ScrollbarMode scrollingMode() const override { return m_scrollingMode; }
84 int marginWidth() const override { return m_marginWidth; }
85 int marginHeight() const override { return m_marginHeight; }
85 86
86 DECLARE_VIRTUAL_TRACE(); 87 DECLARE_VIRTUAL_TRACE();
87 88
88 protected: 89 protected:
89 HTMLFrameOwnerElement(const QualifiedName& tagName, Document&); 90 HTMLFrameOwnerElement(const QualifiedName& tagName, Document&);
90 void setSandboxFlags(SandboxFlags); 91 void setSandboxFlags(SandboxFlags);
92 void setScrollingMode(ScrollbarMode);
93 void setMarginWidth(int);
94 void setMarginHeight(int);
91 95
92 bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool replaceCurrentItem); 96 bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool replaceCurrentItem);
93 97
94 private: 98 private:
95 bool isKeyboardFocusable() const override; 99 bool isKeyboardFocusable() const override;
96 bool isFrameOwnerElement() const final { return true; } 100 bool isFrameOwnerElement() const final { return true; }
97 101
98 virtual ReferrerPolicy referrerPolicyAttribute() { return ReferrerPolicyDefa ult; } 102 virtual ReferrerPolicy referrerPolicyAttribute() { return ReferrerPolicyDefa ult; }
99 103
104 void frameOwnerPropertiesChanged();
105
100 RawPtrWillBeMember<Frame> m_contentFrame; 106 RawPtrWillBeMember<Frame> m_contentFrame;
101 RefPtrWillBeMember<Widget> m_widget; 107 RefPtrWillBeMember<Widget> m_widget;
102 SandboxFlags m_sandboxFlags; 108 SandboxFlags m_sandboxFlags;
109 ScrollbarMode m_scrollingMode;
110 int m_marginWidth;
111 int m_marginHeight;
103 }; 112 };
104 113
105 DEFINE_ELEMENT_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement()); 114 DEFINE_ELEMENT_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement());
106 115
107 class SubframeLoadingDisabler { 116 class SubframeLoadingDisabler {
108 STACK_ALLOCATED(); 117 STACK_ALLOCATED();
109 public: 118 public:
110 explicit SubframeLoadingDisabler(Node& root) 119 explicit SubframeLoadingDisabler(Node& root)
111 : m_root(root) 120 : m_root(root)
112 { 121 {
(...skipping 20 matching lines...) Expand all
133 static WillBeHeapHashCountedSet<RawPtrWillBeMember<Node>>& disabledSubtreeRo ots(); 142 static WillBeHeapHashCountedSet<RawPtrWillBeMember<Node>>& disabledSubtreeRo ots();
134 143
135 RawPtrWillBeMember<Node> m_root; 144 RawPtrWillBeMember<Node> m_root;
136 }; 145 };
137 146
138 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, FrameOwner, owner, owner->isLocal(), ow ner.isLocal()); 147 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, FrameOwner, owner, owner->isLocal(), ow ner.isLocal());
139 148
140 } // namespace blink 149 } // namespace blink
141 150
142 #endif // HTMLFrameOwnerElement_h 151 #endif // HTMLFrameOwnerElement_h
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFrameElementBase.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698