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

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

Issue 13851023: Remove ChromeClient cruft (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 7 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/platform/ScrollView.cpp ('k') | Source/modules/webdatabase/DatabaseContext.h » ('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 * This file is part of the select element renderer in WebCore. 2 * This file is part of the select element renderer in WebCore.
3 * 3 *
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 innerStyle->setMarginTop(Length()); 109 innerStyle->setMarginTop(Length());
110 innerStyle->setMarginBottom(Length()); 110 innerStyle->setMarginBottom(Length());
111 innerStyle->setAlignSelf(AlignFlexStart); 111 innerStyle->setAlignSelf(AlignFlexStart);
112 } 112 }
113 113
114 innerStyle->setPaddingLeft(Length(theme()->popupInternalPaddingLeft(style()) , Fixed)); 114 innerStyle->setPaddingLeft(Length(theme()->popupInternalPaddingLeft(style()) , Fixed));
115 innerStyle->setPaddingRight(Length(theme()->popupInternalPaddingRight(style( )), Fixed)); 115 innerStyle->setPaddingRight(Length(theme()->popupInternalPaddingRight(style( )), Fixed));
116 innerStyle->setPaddingTop(Length(theme()->popupInternalPaddingTop(style()), Fixed)); 116 innerStyle->setPaddingTop(Length(theme()->popupInternalPaddingTop(style()), Fixed));
117 innerStyle->setPaddingBottom(Length(theme()->popupInternalPaddingBottom(styl e()), Fixed)); 117 innerStyle->setPaddingBottom(Length(theme()->popupInternalPaddingBottom(styl e()), Fixed));
118 118
119 if (document()->page()->chrome()->selectItemWritingDirectionIsNatural()) { 119 if (m_optionStyle) {
120 // Items in the popup will not respect the CSS text-align and direction properties,
121 // so we must adjust our own style to match.
122 innerStyle->setTextAlign(LEFT);
123 TextDirection direction = (m_buttonText && m_buttonText->text()->default WritingDirection() == WTF::Unicode::RightToLeft) ? RTL : LTR;
124 innerStyle->setDirection(direction);
125 } else if (m_optionStyle && document()->page()->chrome()->selectItemAlignmen tFollowsMenuWritingDirection()) {
126 if ((m_optionStyle->direction() != innerStyle->direction() || m_optionSt yle->unicodeBidi() != innerStyle->unicodeBidi())) 120 if ((m_optionStyle->direction() != innerStyle->direction() || m_optionSt yle->unicodeBidi() != innerStyle->unicodeBidi()))
127 m_innerBlock->setNeedsLayoutAndPrefWidthsRecalc(); 121 m_innerBlock->setNeedsLayoutAndPrefWidthsRecalc();
128 innerStyle->setTextAlign(style()->isLeftToRightDirection() ? LEFT : RIGH T); 122 innerStyle->setTextAlign(style()->isLeftToRightDirection() ? LEFT : RIGH T);
129 innerStyle->setDirection(m_optionStyle->direction()); 123 innerStyle->setDirection(m_optionStyle->direction());
130 innerStyle->setUnicodeBidi(m_optionStyle->unicodeBidi()); 124 innerStyle->setUnicodeBidi(m_optionStyle->unicodeBidi());
131 } 125 }
132 } 126 }
133 127
134 inline HTMLSelectElement* RenderMenuList::selectElement() const 128 inline HTMLSelectElement* RenderMenuList::selectElement() const
135 { 129 {
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 { 606 {
613 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); 607 setTextFromOption(selectElement()->listToOptionIndex(listIndex));
614 } 608 }
615 609
616 FontSelector* RenderMenuList::fontSelector() const 610 FontSelector* RenderMenuList::fontSelector() const
617 { 611 {
618 return document()->styleResolver()->fontSelector(); 612 return document()->styleResolver()->fontSelector();
619 } 613 }
620 614
621 } 615 }
OLDNEW
« no previous file with comments | « Source/core/platform/ScrollView.cpp ('k') | Source/modules/webdatabase/DatabaseContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698