/src/mozilla-central/dom/html/HTMLFrameElement.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #include "mozilla/dom/HTMLFrameElement.h" |
8 | | #include "mozilla/dom/HTMLFrameElementBinding.h" |
9 | | |
10 | | NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Frame) |
11 | | |
12 | | namespace mozilla { |
13 | | namespace dom { |
14 | | |
15 | | HTMLFrameElement::HTMLFrameElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo, |
16 | | FromParser aFromParser) |
17 | | : nsGenericHTMLFrameElement(std::move(aNodeInfo), aFromParser) |
18 | 0 | { |
19 | 0 | } |
20 | | |
21 | | HTMLFrameElement::~HTMLFrameElement() |
22 | 0 | { |
23 | 0 | } |
24 | | |
25 | | |
26 | | NS_IMPL_ELEMENT_CLONE(HTMLFrameElement) |
27 | | |
28 | | bool |
29 | | HTMLFrameElement::ParseAttribute(int32_t aNamespaceID, |
30 | | nsAtom* aAttribute, |
31 | | const nsAString& aValue, |
32 | | nsIPrincipal* aMaybeScriptedPrincipal, |
33 | | nsAttrValue& aResult) |
34 | 0 | { |
35 | 0 | if (aNamespaceID == kNameSpaceID_None) { |
36 | 0 | if (aAttribute == nsGkAtoms::bordercolor) { |
37 | 0 | return aResult.ParseColor(aValue); |
38 | 0 | } |
39 | 0 | if (aAttribute == nsGkAtoms::frameborder) { |
40 | 0 | return ParseFrameborderValue(aValue, aResult); |
41 | 0 | } |
42 | 0 | if (aAttribute == nsGkAtoms::marginwidth) { |
43 | 0 | return aResult.ParseSpecialIntValue(aValue); |
44 | 0 | } |
45 | 0 | if (aAttribute == nsGkAtoms::marginheight) { |
46 | 0 | return aResult.ParseSpecialIntValue(aValue); |
47 | 0 | } |
48 | 0 | if (aAttribute == nsGkAtoms::scrolling) { |
49 | 0 | return ParseScrollingValue(aValue, aResult); |
50 | 0 | } |
51 | 0 | } |
52 | 0 | |
53 | 0 | return nsGenericHTMLFrameElement::ParseAttribute(aNamespaceID, aAttribute, |
54 | 0 | aValue, aMaybeScriptedPrincipal, aResult); |
55 | 0 | } |
56 | | |
57 | | JSObject* |
58 | | HTMLFrameElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) |
59 | 0 | { |
60 | 0 | return HTMLFrameElement_Binding::Wrap(aCx, this, aGivenProto); |
61 | 0 | } |
62 | | |
63 | | } // namespace dom |
64 | | } // namespace mozilla |