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

Side by Side Diff: third_party/WebKit/WebCore/rendering/RenderFileUploadControl.cpp

Issue 21165: Revert the merge. Mac build is mysteriously broken. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // Determine where the filename should be placed 191 // Determine where the filename should be placed
192 int contentLeft = tx + borderLeft() + paddingLeft(); 192 int contentLeft = tx + borderLeft() + paddingLeft();
193 int buttonAndIconWidth = m_button->renderBox()->width() + afterButtonSpa cing 193 int buttonAndIconWidth = m_button->renderBox()->width() + afterButtonSpa cing
194 + (m_fileChooser->icon() ? iconWidth + iconFilenameSpacing : 0); 194 + (m_fileChooser->icon() ? iconWidth + iconFilenameSpacing : 0);
195 int textX; 195 int textX;
196 if (style()->direction() == LTR) 196 if (style()->direction() == LTR)
197 textX = contentLeft + buttonAndIconWidth; 197 textX = contentLeft + buttonAndIconWidth;
198 else 198 else
199 textX = contentLeft + contentWidth() - buttonAndIconWidth - style()- >font().width(textRun); 199 textX = contentLeft + contentWidth() - buttonAndIconWidth - style()- >font().width(textRun);
200 // We want to match the button's baseline 200 // We want to match the button's baseline
201 RenderButton* buttonRenderer = toRenderButton(m_button->renderer()); 201 RenderButton* buttonRenderer = static_cast<RenderButton*>(m_button->rend erer());
202 int textY = buttonRenderer->absoluteBoundingBoxRect().y() 202 int textY = buttonRenderer->absoluteBoundingBoxRect().y()
203 + buttonRenderer->marginTop() + buttonRenderer->borderTop() + button Renderer->paddingTop() 203 + buttonRenderer->marginTop() + buttonRenderer->borderTop() + button Renderer->paddingTop()
204 + buttonRenderer->baselinePosition(true, false); 204 + buttonRenderer->baselinePosition(true, false);
205 205
206 paintInfo.context->setFillColor(style()->color()); 206 paintInfo.context->setFillColor(style()->color());
207 207
208 // Draw the filename 208 // Draw the filename
209 paintInfo.context->drawBidiText(style()->font(), textRun, IntPoint(textX , textY)); 209 paintInfo.context->drawBidiText(style()->font(), textRun, IntPoint(textX , textY));
210 210
211 if (m_fileChooser->icon()) { 211 if (m_fileChooser->icon()) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 return m_fileChooser->basenameForWidth(style()->font(), maxFilenameWidth()); 288 return m_fileChooser->basenameForWidth(style()->font(), maxFilenameWidth());
289 } 289 }
290 290
291 HTMLFileUploadInnerButtonElement::HTMLFileUploadInnerButtonElement(Document* doc , Node* shadowParent) 291 HTMLFileUploadInnerButtonElement::HTMLFileUploadInnerButtonElement(Document* doc , Node* shadowParent)
292 : HTMLInputElement(inputTag, doc) 292 : HTMLInputElement(inputTag, doc)
293 , m_shadowParent(shadowParent) 293 , m_shadowParent(shadowParent)
294 { 294 {
295 } 295 }
296 296
297 } // namespace WebCore 297 } // namespace WebCore
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderButton.h ('k') | third_party/WebKit/WebCore/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698