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

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

Issue 16896019: Replace RenderArena with PartitionAlloc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 { 48 {
49 } 49 }
50 50
51 PassRefPtr<HTMLMeterElement> HTMLMeterElement::create(const QualifiedName& tagNa me, Document* document) 51 PassRefPtr<HTMLMeterElement> HTMLMeterElement::create(const QualifiedName& tagNa me, Document* document)
52 { 52 {
53 RefPtr<HTMLMeterElement> meter = adoptRef(new HTMLMeterElement(tagName, docu ment)); 53 RefPtr<HTMLMeterElement> meter = adoptRef(new HTMLMeterElement(tagName, docu ment));
54 meter->ensureUserAgentShadowRoot(); 54 meter->ensureUserAgentShadowRoot();
55 return meter; 55 return meter;
56 } 56 }
57 57
58 RenderObject* HTMLMeterElement::createRenderer(RenderArena* arena, RenderStyle* style) 58 RenderObject* HTMLMeterElement::createRenderer(RenderStyle* style)
59 { 59 {
60 if (hasAuthorShadowRoot() || !document()->page()->theme()->supportsMeter(sty le->appearance())) 60 if (hasAuthorShadowRoot() || !document()->page()->theme()->supportsMeter(sty le->appearance()))
61 return RenderObject::createObject(this, style); 61 return RenderObject::createObject(this, style);
62 62
63 return new (arena) RenderMeter(this); 63 return new RenderMeter(this);
64 } 64 }
65 65
66 bool HTMLMeterElement::childShouldCreateRenderer(const NodeRenderingContext& chi ldContext) const 66 bool HTMLMeterElement::childShouldCreateRenderer(const NodeRenderingContext& chi ldContext) const
67 { 67 {
68 return childContext.isOnUpperEncapsulationBoundary() && HTMLElement::childSh ouldCreateRenderer(childContext); 68 return childContext.isOnUpperEncapsulationBoundary() && HTMLElement::childSh ouldCreateRenderer(childContext);
69 } 69 }
70 70
71 void HTMLMeterElement::parseAttribute(const QualifiedName& name, const AtomicStr ing& value) 71 void HTMLMeterElement::parseAttribute(const QualifiedName& name, const AtomicStr ing& value)
72 { 72 {
73 if (name == valueAttr || name == minAttr || name == maxAttr || name == lowAt tr || name == highAttr || name == optimumAttr) 73 if (name == valueAttr || name == minAttr || name == maxAttr || name == lowAt tr || name == highAttr || name == optimumAttr)
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 RefPtr<MeterBarElement> bar = MeterBarElement::create(document()); 236 RefPtr<MeterBarElement> bar = MeterBarElement::create(document());
237 m_value = MeterValueElement::create(document()); 237 m_value = MeterValueElement::create(document());
238 m_value->setWidthPercentage(0); 238 m_value->setWidthPercentage(0);
239 m_value->updatePseudo(); 239 m_value->updatePseudo();
240 bar->appendChild(m_value, ASSERT_NO_EXCEPTION); 240 bar->appendChild(m_value, ASSERT_NO_EXCEPTION);
241 241
242 inner->appendChild(bar, ASSERT_NO_EXCEPTION); 242 inner->appendChild(bar, ASSERT_NO_EXCEPTION);
243 } 243 }
244 244
245 } // namespace 245 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698