ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 1 | /* |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 2 | * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 | * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 | * (C) 2000 Simon Hausmann <hausmann@kde.org> |
darin@apple.com | 08bbae8 | 2009-08-17 07:35:02 +0000 | [diff] [blame] | 5 | * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 6 | * |
| 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Library General Public |
| 9 | * License as published by the Free Software Foundation; either |
| 10 | * version 2 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This library is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * Library General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Library General Public License |
| 18 | * along with this library; see the file COPYING.LIB. If not, write to |
ddkilzer | c8eccec | 2007-09-26 02:29:57 +0000 | [diff] [blame] | 19 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 | * Boston, MA 02110-1301, USA. |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 21 | * |
| 22 | */ |
| 23 | |
| 24 | #ifndef HTMLFrameElementBase_h |
| 25 | #define HTMLFrameElementBase_h |
| 26 | |
mrowe@apple.com | bf5eaa6 | 2014-04-03 00:51:04 +0000 | [diff] [blame] | 27 | #include "FrameLoaderTypes.h" |
darin | cb3524a | 2006-12-11 23:40:47 +0000 | [diff] [blame] | 28 | #include "HTMLFrameOwnerElement.h" |
darin | 60e537f5 | 2006-11-15 01:29:46 +0000 | [diff] [blame] | 29 | #include "ScrollTypes.h" |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 30 | |
| 31 | namespace WebCore { |
| 32 | |
darin | cb3524a | 2006-12-11 23:40:47 +0000 | [diff] [blame] | 33 | class HTMLFrameElementBase : public HTMLFrameOwnerElement { |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 34 | public: |
darin@apple.com | 5ffbb5c | 2013-09-27 16:39:41 +0000 | [diff] [blame] | 35 | URL location() const; |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 36 | void setLocation(const String&); |
| 37 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame^] | 38 | ScrollbarMode scrollingMode() const override final { return m_scrolling; } |
hyatt | 8f83b0e | 2007-03-19 04:50:45 +0000 | [diff] [blame] | 39 | |
dbates@webkit.org | 77185ce | 2010-12-28 00:21:23 +0000 | [diff] [blame] | 40 | int marginWidth() const { return m_marginWidth; } |
| 41 | int marginHeight() const { return m_marginHeight; } |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 42 | |
commit-queue@webkit.org | 7e978e1 | 2011-07-20 21:12:30 +0000 | [diff] [blame] | 43 | int width(); |
| 44 | int height(); |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 45 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame^] | 46 | bool canContainRangeEndPoint() const override final { return false; } |
rniwa@webkit.org | 2a3b3f7 | 2011-05-14 18:10:14 +0000 | [diff] [blame] | 47 | |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 48 | protected: |
weinig@apple.com | dedf67e | 2013-09-15 05:23:01 +0000 | [diff] [blame] | 49 | HTMLFrameElementBase(const QualifiedName&, Document&); |
darin | cb3524a | 2006-12-11 23:40:47 +0000 | [diff] [blame] | 50 | |
darin@apple.com | 08bbae8 | 2009-08-17 07:35:02 +0000 | [diff] [blame] | 51 | bool isURLAllowed() const; |
darin@apple.com | cf9dd0f | 2009-08-23 06:55:57 +0000 | [diff] [blame] | 52 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame^] | 53 | void parseAttribute(const QualifiedName&, const AtomicString&) override; |
| 54 | InsertionNotificationRequest insertedInto(ContainerNode&) override final; |
| 55 | void finishedInsertingSubtree() override final; |
| 56 | void didAttachRenderers() override; |
darin@apple.com | cf9dd0f | 2009-08-23 06:55:57 +0000 | [diff] [blame] | 57 | |
| 58 | private: |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame^] | 59 | bool supportsFocus() const override final; |
| 60 | void setFocus(bool) override final; |
darin@apple.com | cf9dd0f | 2009-08-23 06:55:57 +0000 | [diff] [blame] | 61 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame^] | 62 | bool isURLAttribute(const Attribute&) const override final; |
| 63 | bool isHTMLContentAttribute(const Attribute&) const override final; |
tsepez@chromium.org | 336485f | 2013-03-30 18:31:52 +0000 | [diff] [blame] | 64 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame^] | 65 | bool isFrameElementBase() const override final { return true; } |
darin@apple.com | cf9dd0f | 2009-08-23 06:55:57 +0000 | [diff] [blame] | 66 | |
andersca | 2d8ce33 | 2007-07-18 03:46:10 +0000 | [diff] [blame] | 67 | void setNameAndOpenURL(); |
mrowe@apple.com | bf5eaa6 | 2014-04-03 00:51:04 +0000 | [diff] [blame] | 68 | void openURL(LockHistory = LockHistory::Yes, LockBackForwardList = LockBackForwardList::Yes); |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 69 | |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 70 | AtomicString m_URL; |
dbates@webkit.org | 949216b | 2010-10-30 06:13:22 +0000 | [diff] [blame] | 71 | AtomicString m_frameName; |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 72 | |
| 73 | ScrollbarMode m_scrolling; |
| 74 | |
| 75 | int m_marginWidth; |
| 76 | int m_marginHeight; |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 77 | }; |
| 78 | |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 79 | } // namespace WebCore |
| 80 | |
cdumez@apple.com | 3e58f0f | 2014-09-30 21:32:55 +0000 | [diff] [blame] | 81 | SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::HTMLFrameElementBase) |
| 82 | static bool isType(const WebCore::HTMLElement& element) { return is<WebCore::HTMLFrameElement>(element) || is<WebCore::HTMLIFrameElement>(element); } |
| 83 | static bool isType(const WebCore::Node& node) { return is<WebCore::HTMLElement>(node) && isType(downcast<WebCore::HTMLElement>(node)); } |
| 84 | SPECIALIZE_TYPE_TRAITS_END() |
| 85 | |
ggaren | 2e40fc1 | 2006-10-17 21:17:28 +0000 | [diff] [blame] | 86 | #endif // HTMLFrameElementBase_h |