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

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

Issue 20231002: Replace RenderArena with PartitionAlloc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 7 years, 4 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/HTMLCanvasElement.cpp ('k') | Source/core/html/HTMLElement.cpp » ('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, 2011 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2010, 2011 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 HTMLDetailsElement::HTMLDetailsElement(const QualifiedName& tagName, Document* d ocument) 50 HTMLDetailsElement::HTMLDetailsElement(const QualifiedName& tagName, Document* d ocument)
51 : HTMLElement(tagName, document) 51 : HTMLElement(tagName, document)
52 , m_isOpen(false) 52 , m_isOpen(false)
53 { 53 {
54 ASSERT(hasTagName(detailsTag)); 54 ASSERT(hasTagName(detailsTag));
55 ScriptWrappable::init(this); 55 ScriptWrappable::init(this);
56 } 56 }
57 57
58 RenderObject* HTMLDetailsElement::createRenderer(RenderStyle*) 58 RenderObject* HTMLDetailsElement::createRenderer(RenderStyle*)
59 { 59 {
60 return new (document()->renderArena()) RenderBlock(this); 60 return new RenderBlock(this);
61 } 61 }
62 62
63 void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot* root) 63 void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot* root)
64 { 64 {
65 RefPtr<HTMLSummaryElement> defaultSummary = HTMLSummaryElement::create(summa ryTag, document()); 65 RefPtr<HTMLSummaryElement> defaultSummary = HTMLSummaryElement::create(summa ryTag, document());
66 defaultSummary->appendChild(Text::create(document(), defaultDetailsSummaryTe xt()), ASSERT_NO_EXCEPTION); 66 defaultSummary->appendChild(Text::create(document(), defaultDetailsSummaryTe xt()), ASSERT_NO_EXCEPTION);
67 67
68 RefPtr<HTMLContentElement> content = HTMLContentElement::create(document()); 68 RefPtr<HTMLContentElement> content = HTMLContentElement::create(document());
69 content->setSelect(summaryQuerySelector()); 69 content->setSelect(summaryQuerySelector());
70 content->appendChild(defaultSummary); 70 content->appendChild(defaultSummary);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 return false; 104 return false;
105 return childContext.node() == findMainSummary() && HTMLElement::childShouldC reateRenderer(childContext); 105 return childContext.node() == findMainSummary() && HTMLElement::childShouldC reateRenderer(childContext);
106 } 106 }
107 107
108 void HTMLDetailsElement::toggleOpen() 108 void HTMLDetailsElement::toggleOpen()
109 { 109 {
110 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom); 110 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom);
111 } 111 }
112 112
113 } 113 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698