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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/HTMLProgressElement.h ('k') | Source/core/html/HTMLRTElement.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) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 { 51 {
52 } 52 }
53 53
54 PassRefPtrWillBeRawPtr<HTMLProgressElement> HTMLProgressElement::create(Document & document) 54 PassRefPtrWillBeRawPtr<HTMLProgressElement> HTMLProgressElement::create(Document & document)
55 { 55 {
56 RefPtrWillBeRawPtr<HTMLProgressElement> progress = adoptRefWillBeNoop(new HT MLProgressElement(document)); 56 RefPtrWillBeRawPtr<HTMLProgressElement> progress = adoptRefWillBeNoop(new HT MLProgressElement(document));
57 progress->ensureUserAgentShadowRoot(); 57 progress->ensureUserAgentShadowRoot();
58 return progress.release(); 58 return progress.release();
59 } 59 }
60 60
61 RenderObject* HTMLProgressElement::createRenderer(const RenderStyle& style) 61 LayoutObject* HTMLProgressElement::createRenderer(const RenderStyle& style)
62 { 62 {
63 if (!style.hasAppearance() || hasAuthorShadowRoot()) 63 if (!style.hasAppearance() || hasAuthorShadowRoot())
64 return RenderObject::createObject(this, style); 64 return LayoutObject::createObject(this, style);
65
66 return new RenderProgress(this); 65 return new RenderProgress(this);
67 } 66 }
68 67
69 RenderProgress* HTMLProgressElement::renderProgress() const 68 RenderProgress* HTMLProgressElement::renderProgress() const
70 { 69 {
71 if (renderer() && renderer()->isProgress()) 70 if (renderer() && renderer()->isProgress())
72 return toRenderProgress(renderer()); 71 return toRenderProgress(renderer());
73 72
74 RenderObject* renderObject = userAgentShadowRoot()->firstChild()->renderer() ; 73 LayoutObject* layoutObject = userAgentShadowRoot()->firstChild()->renderer() ;
75 ASSERT_WITH_SECURITY_IMPLICATION(!renderObject || renderObject->isProgress() ); 74 ASSERT_WITH_SECURITY_IMPLICATION(!layoutObject || layoutObject->isProgress() );
76 return toRenderProgress(renderObject); 75 return toRenderProgress(layoutObject);
77 } 76 }
78 77
79 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const Atomic String& value) 78 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const Atomic String& value)
80 { 79 {
81 if (name == valueAttr) 80 if (name == valueAttr)
82 didElementStateChange(); 81 didElementStateChange();
83 else if (name == maxAttr) 82 else if (name == maxAttr)
84 didElementStateChange(); 83 didElementStateChange();
85 else 84 else
86 LabelableElement::parseAttribute(name, value); 85 LabelableElement::parseAttribute(name, value);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return !isDeterminate(); 170 return !isDeterminate();
172 } 171 }
173 172
174 void HTMLProgressElement::trace(Visitor* visitor) 173 void HTMLProgressElement::trace(Visitor* visitor)
175 { 174 {
176 visitor->trace(m_value); 175 visitor->trace(m_value);
177 LabelableElement::trace(visitor); 176 LabelableElement::trace(visitor);
178 } 177 }
179 178
180 } // namespace 179 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLProgressElement.h ('k') | Source/core/html/HTMLRTElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698