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

Side by Side Diff: Source/core/html/HTMLFrameSetElement.cpp

Issue 327633004: Apply DEFINE/DECLARE_NODE_FACTORY(T) macro to element factories with single Document& argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/HTMLFrameSetElement.h ('k') | Source/core/html/HTMLHRElement.h » ('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) 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 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 22 matching lines...) Expand all
33 #include "core/frame/LocalFrame.h" 33 #include "core/frame/LocalFrame.h"
34 #include "core/html/HTMLCollection.h" 34 #include "core/html/HTMLCollection.h"
35 #include "core/html/HTMLFrameElement.h" 35 #include "core/html/HTMLFrameElement.h"
36 #include "core/loader/FrameLoaderClient.h" 36 #include "core/loader/FrameLoaderClient.h"
37 #include "core/rendering/RenderFrameSet.h" 37 #include "core/rendering/RenderFrameSet.h"
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 using namespace HTMLNames; 41 using namespace HTMLNames;
42 42
43 HTMLFrameSetElement::HTMLFrameSetElement(Document& document) 43 inline HTMLFrameSetElement::HTMLFrameSetElement(Document& document)
44 : HTMLElement(framesetTag, document) 44 : HTMLElement(framesetTag, document)
45 , m_border(6) 45 , m_border(6)
46 , m_borderSet(false) 46 , m_borderSet(false)
47 , m_borderColorSet(false) 47 , m_borderColorSet(false)
48 , m_frameborder(true) 48 , m_frameborder(true)
49 , m_frameborderSet(false) 49 , m_frameborderSet(false)
50 , m_noresize(false) 50 , m_noresize(false)
51 { 51 {
52 ScriptWrappable::init(this); 52 ScriptWrappable::init(this);
53 setHasCustomStyleCallbacks(); 53 setHasCustomStyleCallbacks();
54 } 54 }
55 55
56 PassRefPtrWillBeRawPtr<HTMLFrameSetElement> HTMLFrameSetElement::create(Document & document) 56 DEFINE_NODE_FACTORY(HTMLFrameSetElement)
57 {
58 return adoptRefWillBeRefCountedGarbageCollected(new HTMLFrameSetElement(docu ment));
59 }
60 57
61 bool HTMLFrameSetElement::isPresentationAttribute(const QualifiedName& name) con st 58 bool HTMLFrameSetElement::isPresentationAttribute(const QualifiedName& name) con st
62 { 59 {
63 if (name == bordercolorAttr) 60 if (name == bordercolorAttr)
64 return true; 61 return true;
65 return HTMLElement::isPresentationAttribute(name); 62 return HTMLElement::isPresentationAttribute(name);
66 } 63 }
67 64
68 void HTMLFrameSetElement::collectStyleForPresentationAttribute(const QualifiedNa me& name, const AtomicString& value, MutableStylePropertySet* style) 65 void HTMLFrameSetElement::collectStyleForPresentationAttribute(const QualifiedNa me& name, const AtomicString& value, MutableStylePropertySet* style)
69 { 66 {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 Element* frameElement = children()->namedItem(name); 216 Element* frameElement = children()->namedItem(name);
220 if (!isHTMLFrameElement(frameElement)) 217 if (!isHTMLFrameElement(frameElement))
221 return 0; 218 return 0;
222 Document* document = toHTMLFrameElement(frameElement)->contentDocument(); 219 Document* document = toHTMLFrameElement(frameElement)->contentDocument();
223 if (!document || !document->frame()) 220 if (!document || !document->frame())
224 return 0; 221 return 0;
225 return document->domWindow(); 222 return document->domWindow();
226 } 223 }
227 224
228 } // namespace WebCore 225 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFrameSetElement.h ('k') | Source/core/html/HTMLHRElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698