~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/html/HTMLIFrameElement.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *           (C) 1999 Antti Koivisto (koivisto@kde.org)
4
4
 *           (C) 2000 Simon Hausmann (hausmann@kde.org)
5
5
 *           (C) 2001 Dirk Mueller (mueller@kde.org)
6
 
 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
 
6
 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved.
7
7
 *
8
8
 * This library is free software; you can redistribute it and/or
9
9
 * modify it under the terms of the GNU Library General Public
28
28
#include "Frame.h"
29
29
#include "HTMLDocument.h"
30
30
#include "HTMLNames.h"
 
31
#include "MappedAttribute.h"
31
32
#include "RenderPartObject.h"
32
33
 
33
34
namespace WebCore {
34
35
 
35
36
using namespace HTMLNames;
36
37
 
37
 
HTMLIFrameElement::HTMLIFrameElement(const QualifiedName& tagName, Document* doc, bool createdByParser)
38
 
    : HTMLFrameElementBase(tagName, doc, createdByParser)
 
38
inline HTMLIFrameElement::HTMLIFrameElement(const QualifiedName& tagName, Document* document)
 
39
    : HTMLFrameElementBase(tagName, document)
39
40
{
40
41
    ASSERT(hasTagName(iframeTag));
41
42
}
42
43
 
 
44
PassRefPtr<HTMLIFrameElement> HTMLIFrameElement::create(const QualifiedName& tagName, Document* document)
 
45
{
 
46
    return adoptRef(new HTMLIFrameElement(tagName, document));
 
47
}
 
48
 
43
49
bool HTMLIFrameElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
44
50
{
45
51
    if (attrName == widthAttr || attrName == heightAttr) {
88
94
 
89
95
bool HTMLIFrameElement::rendererIsNeeded(RenderStyle* style)
90
96
{
91
 
    return isURLAllowed(m_URL) && style->display() != NONE;
 
97
    return isURLAllowed() && style->display() != NONE;
92
98
}
93
99
 
94
100
RenderObject* HTMLIFrameElement::createRenderer(RenderArena* arena, RenderStyle*)
116
122
{
117
123
    HTMLFrameElementBase::attach();
118
124
 
119
 
    if (RenderPartObject* renderPartObject = static_cast<RenderPartObject*>(renderer()))
 
125
    if (RenderPartObject* renderPartObject = toRenderPartObject(renderer()))
120
126
        renderPartObject->updateWidget(false);
121
127
}
122
128
 
125
131
    return attr->name() == srcAttr;
126
132
}
127
133
 
128
 
String HTMLIFrameElement::align() const
129
 
{
130
 
    return getAttribute(alignAttr);
131
 
}
132
 
 
133
 
void HTMLIFrameElement::setAlign(const String &value)
134
 
{
135
 
    setAttribute(alignAttr, value);
136
 
}
137
 
 
138
 
String HTMLIFrameElement::height() const
139
 
{
140
 
    return getAttribute(heightAttr);
141
 
}
142
 
 
143
 
void HTMLIFrameElement::setHeight(const String &value)
144
 
{
145
 
    setAttribute(heightAttr, value);
146
 
}
147
 
 
148
 
String HTMLIFrameElement::width() const
149
 
{
150
 
    return getAttribute(widthAttr);
151
 
}
152
 
 
153
 
void HTMLIFrameElement::setWidth(const String &value)
154
 
{
155
 
    setAttribute(widthAttr, value);
156
 
}
157
 
 
158
134
}