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

Side by Side Diff: Source/core/html/BaseButtonInputType.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/dom/Text.cpp ('k') | Source/core/html/FileInputType.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 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 using namespace HTMLNames; 44 using namespace HTMLNames;
45 45
46 class NonSelectableText : public Text { 46 class NonSelectableText : public Text {
47 inline NonSelectableText(Document* document, const String& data) 47 inline NonSelectableText(Document* document, const String& data)
48 : Text(document, data, CreateText) 48 : Text(document, data, CreateText)
49 { 49 {
50 } 50 }
51 51
52 virtual RenderText* createTextRenderer(RenderStyle*) OVERRIDE 52 virtual RenderText* createTextRenderer(RenderStyle*) OVERRIDE
53 { 53 {
54 return new (document()->renderArena()) RenderTextFragment(this, dataImpl ()); 54 return new RenderTextFragment(this, dataImpl());
55 } 55 }
56 56
57 public: 57 public:
58 static inline PassRefPtr<NonSelectableText> create(Document* document, const String& data) 58 static inline PassRefPtr<NonSelectableText> create(Document* document, const String& data)
59 { 59 {
60 return adoptRef(new NonSelectableText(document, data)); 60 return adoptRef(new NonSelectableText(document, data));
61 } 61 }
62 }; 62 };
63 63
64 // ---------------------------- 64 // ----------------------------
(...skipping 16 matching lines...) Expand all
81 } 81 }
82 82
83 bool BaseButtonInputType::appendFormData(FormDataList&, bool) const 83 bool BaseButtonInputType::appendFormData(FormDataList&, bool) const
84 { 84 {
85 // Buttons except overridden types are never successful. 85 // Buttons except overridden types are never successful.
86 return false; 86 return false;
87 } 87 }
88 88
89 RenderObject* BaseButtonInputType::createRenderer(RenderStyle*) const 89 RenderObject* BaseButtonInputType::createRenderer(RenderStyle*) const
90 { 90 {
91 return new (element()->document()->renderArena()) RenderButton(element()); 91 return new RenderButton(element());
92 } 92 }
93 93
94 bool BaseButtonInputType::storesValueSeparateFromAttribute() 94 bool BaseButtonInputType::storesValueSeparateFromAttribute()
95 { 95 {
96 return false; 96 return false;
97 } 97 }
98 98
99 void BaseButtonInputType::setValue(const String& sanitizedValue, bool, TextField EventBehavior) 99 void BaseButtonInputType::setValue(const String& sanitizedValue, bool, TextField EventBehavior)
100 { 100 {
101 element()->setAttribute(valueAttr, sanitizedValue); 101 element()->setAttribute(valueAttr, sanitizedValue);
102 } 102 }
103 103
104 } // namespace WebCore 104 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Text.cpp ('k') | Source/core/html/FileInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698