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

Side by Side Diff: Source/core/rendering/RenderButton.cpp

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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) 2005 Apple Computer, Inc. 2 * Copyright (C) 2005 Apple Computer, Inc.
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // when the content overflows, treat it the same as align-items: flex-start. 105 // when the content overflows, treat it the same as align-items: flex-start.
106 innerStyle->setMarginTop(Length()); 106 innerStyle->setMarginTop(Length());
107 innerStyle->setMarginBottom(Length()); 107 innerStyle->setMarginBottom(Length());
108 innerStyle->setFlexDirection(style()->flexDirection()); 108 innerStyle->setFlexDirection(style()->flexDirection());
109 } 109 }
110 110
111 void RenderButton::updateFromElement() 111 void RenderButton::updateFromElement()
112 { 112 {
113 // If we're an input element, we may need to change our button text. 113 // If we're an input element, we may need to change our button text.
114 if (node()->hasTagName(inputTag)) { 114 if (node()->hasTagName(inputTag)) {
115 HTMLInputElement* input = static_cast<HTMLInputElement*>(node()); 115 Handle<HTMLInputElement> input(static_cast<HTMLInputElement*>(node()));
116 String value = input->valueWithDefault(); 116 String value = input->valueWithDefault();
117 setText(value); 117 setText(value);
118 } 118 }
119 } 119 }
120 120
121 void RenderButton::setText(const String& str) 121 void RenderButton::setText(const String& str)
122 { 122 {
123 if (str.isEmpty()) { 123 if (str.isEmpty()) {
124 if (m_buttonText) { 124 if (m_buttonText) {
125 m_buttonText->destroy(); 125 m_buttonText->destroy();
(...skipping 23 matching lines...) Expand all
149 return !node()->hasTagName(inputTag); 149 return !node()->hasTagName(inputTag);
150 } 150 }
151 151
152 LayoutRect RenderButton::controlClipRect(const LayoutPoint& additionalOffset) co nst 152 LayoutRect RenderButton::controlClipRect(const LayoutPoint& additionalOffset) co nst
153 { 153 {
154 // Clip to the padding box to at least give content the extra padding space. 154 // Clip to the padding box to at least give content the extra padding space.
155 return LayoutRect(additionalOffset.x() + borderLeft(), additionalOffset.y() + borderTop(), width() - borderLeft() - borderRight(), height() - borderTop() - borderBottom()); 155 return LayoutRect(additionalOffset.x() + borderLeft(), additionalOffset.y() + borderTop(), width() - borderLeft() - borderRight(), height() - borderTop() - borderBottom());
156 } 156 }
157 157
158 } // namespace WebCore 158 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/HitTestResult.cpp ('k') | Source/core/rendering/RenderFileUploadControl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698