OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 4 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
5 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 21 matching lines...) Loading... | |
32 | 32 |
33 class CORE_EXPORT HTMLFrameElementBase : public HTMLFrameOwnerElement { | 33 class CORE_EXPORT HTMLFrameElementBase : public HTMLFrameOwnerElement { |
34 public: | 34 public: |
35 bool CanContainRangeEndPoint() const final { return false; } | 35 bool CanContainRangeEndPoint() const final { return false; } |
36 | 36 |
37 // FrameOwner overrides: | 37 // FrameOwner overrides: |
38 ScrollbarMode ScrollingMode() const final { return scrolling_mode_; } | 38 ScrollbarMode ScrollingMode() const final { return scrolling_mode_; } |
39 int MarginWidth() const final { return margin_width_; } | 39 int MarginWidth() const final { return margin_width_; } |
40 int MarginHeight() const final { return margin_height_; } | 40 int MarginHeight() const final { return margin_height_; } |
41 | 41 |
42 // Return the origin which is to be used for feature policy container | |
43 // policies, when a specific origin is needed. This supports the "allow" | |
44 // attribute, which uses the "src" attribute to determine the origin when the | |
45 // frame is constructed. It also takes into account the frame's sandbox | |
46 // status, and whether the frame should inherit its parent's origin. | |
47 const RefPtr<SecurityOrigin> GetOriginForFeaturePolicy() const override; | |
dcheng
2017/04/18 16:26:37
Nit: const RefPtr<> doesn't do much here other tha
iclelland
2017/04/18 19:19:44
Done, thanks.
| |
48 | |
42 protected: | 49 protected: |
43 HTMLFrameElementBase(const QualifiedName&, Document&); | 50 HTMLFrameElementBase(const QualifiedName&, Document&); |
44 | 51 |
45 void ParseAttribute(const AttributeModificationParams&) override; | 52 void ParseAttribute(const AttributeModificationParams&) override; |
53 | |
46 InsertionNotificationRequest InsertedInto(ContainerNode*) override; | 54 InsertionNotificationRequest InsertedInto(ContainerNode*) override; |
47 void DidNotifySubtreeInsertionsToDocument() final; | 55 void DidNotifySubtreeInsertionsToDocument() final; |
48 void AttachLayoutTree(const AttachContext& = AttachContext()) override; | 56 void AttachLayoutTree(const AttachContext& = AttachContext()) override; |
49 | 57 |
50 void SetScrollingMode(ScrollbarMode); | 58 void SetScrollingMode(ScrollbarMode); |
51 void SetMarginWidth(int); | 59 void SetMarginWidth(int); |
52 void SetMarginHeight(int); | 60 void SetMarginHeight(int); |
53 | 61 |
54 private: | 62 private: |
55 bool SupportsFocus() const final; | 63 bool SupportsFocus() const final; |
(...skipping 20 matching lines...) Loading... | |
76 | 84 |
77 inline bool IsHTMLFrameElementBase(const HTMLElement& element) { | 85 inline bool IsHTMLFrameElementBase(const HTMLElement& element) { |
78 return isHTMLFrameElement(element) || isHTMLIFrameElement(element); | 86 return isHTMLFrameElement(element) || isHTMLIFrameElement(element); |
79 } | 87 } |
80 | 88 |
81 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFrameElementBase); | 89 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFrameElementBase); |
82 | 90 |
83 } // namespace blink | 91 } // namespace blink |
84 | 92 |
85 #endif // HTMLFrameElementBase_h | 93 #endif // HTMLFrameElementBase_h |
OLD | NEW |