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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutMenuList.cpp

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * This file is part of the select element layoutObject in WebCore. 2 * This file is part of the select element layoutObject 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. 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * (C) 2009 Torch Mobile Inc. All rights reserved. 7 * (C) 2009 Torch Mobile Inc. All rights reserved.
8 * (http://www.torchmobile.com/) 8 * (http://www.torchmobile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 innerStyle.setMarginTop(Length()); 95 innerStyle.setMarginTop(Length());
96 innerStyle.setMarginBottom(Length()); 96 innerStyle.setMarginBottom(Length());
97 innerStyle.setAlignSelfPosition(ItemPositionFlexStart); 97 innerStyle.setAlignSelfPosition(ItemPositionFlexStart);
98 } 98 }
99 99
100 Length paddingStart = 100 Length paddingStart =
101 Length(LayoutTheme::theme().popupInternalPaddingStart(styleRef()), Fixed); 101 Length(LayoutTheme::theme().popupInternalPaddingStart(styleRef()), Fixed);
102 Length paddingEnd = Length(LayoutTheme::theme().popupInternalPaddingEnd( 102 Length paddingEnd = Length(LayoutTheme::theme().popupInternalPaddingEnd(
103 frameView()->getHostWindow(), styleRef()), 103 frameView()->getHostWindow(), styleRef()),
104 Fixed); 104 Fixed);
105 innerStyle.setPaddingLeft( 105 innerStyle.setPaddingLeft(styleRef().direction() == TextDirection::kLtr
106 styleRef().direction() == TextDirection::Ltr ? paddingStart : paddingEnd); 106 ? paddingStart
107 innerStyle.setPaddingRight( 107 : paddingEnd);
108 styleRef().direction() == TextDirection::Ltr ? paddingEnd : paddingStart); 108 innerStyle.setPaddingRight(styleRef().direction() == TextDirection::kLtr
109 ? paddingEnd
110 : paddingStart);
109 innerStyle.setPaddingTop( 111 innerStyle.setPaddingTop(
110 Length(LayoutTheme::theme().popupInternalPaddingTop(styleRef()), Fixed)); 112 Length(LayoutTheme::theme().popupInternalPaddingTop(styleRef()), Fixed));
111 innerStyle.setPaddingBottom(Length( 113 innerStyle.setPaddingBottom(Length(
112 LayoutTheme::theme().popupInternalPaddingBottom(styleRef()), Fixed)); 114 LayoutTheme::theme().popupInternalPaddingBottom(styleRef()), Fixed));
113 115
114 if (m_optionStyle) { 116 if (m_optionStyle) {
115 if ((m_optionStyle->direction() != innerStyle.direction() || 117 if ((m_optionStyle->direction() != innerStyle.direction() ||
116 m_optionStyle->unicodeBidi() != innerStyle.unicodeBidi())) 118 m_optionStyle->unicodeBidi() != innerStyle.unicodeBidi()))
117 m_innerBlock->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( 119 m_innerBlock->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
118 LayoutInvalidationReason::StyleChange); 120 LayoutInvalidationReason::StyleChange);
119 innerStyle.setTextAlign(style()->isLeftToRightDirection() 121 innerStyle.setTextAlign(style()->isLeftToRightDirection()
120 ? ETextAlign::Left 122 ? ETextAlign::kLeft
121 : ETextAlign::Right); 123 : ETextAlign::kRight);
122 innerStyle.setDirection(m_optionStyle->direction()); 124 innerStyle.setDirection(m_optionStyle->direction());
123 innerStyle.setUnicodeBidi(m_optionStyle->unicodeBidi()); 125 innerStyle.setUnicodeBidi(m_optionStyle->unicodeBidi());
124 } 126 }
125 } 127 }
126 128
127 HTMLSelectElement* LayoutMenuList::selectElement() const { 129 HTMLSelectElement* LayoutMenuList::selectElement() const {
128 return toHTMLSelectElement(node()); 130 return toHTMLSelectElement(node());
129 } 131 }
130 132
131 void LayoutMenuList::addChild(LayoutObject* newChild, 133 void LayoutMenuList::addChild(LayoutObject* newChild,
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 314
313 LayoutUnit LayoutMenuList::clientPaddingLeft() const { 315 LayoutUnit LayoutMenuList::clientPaddingLeft() const {
314 return paddingLeft() + m_innerBlock->paddingLeft(); 316 return paddingLeft() + m_innerBlock->paddingLeft();
315 } 317 }
316 318
317 LayoutUnit LayoutMenuList::clientPaddingRight() const { 319 LayoutUnit LayoutMenuList::clientPaddingRight() const {
318 return paddingRight() + m_innerBlock->paddingRight(); 320 return paddingRight() + m_innerBlock->paddingRight();
319 } 321 }
320 322
321 } // namespace blink 323 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutListMarker.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698