OLD | NEW |
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. 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 |
11 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
12 * | 12 * |
13 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16 * Library General Public License for more details. | 16 * Library General Public License for more details. |
17 * | 17 * |
18 * You should have received a copy of the GNU Library General Public License | 18 * You should have received a copy of the GNU Library General Public License |
19 * along with this library; see the file COPYING.LIB. If not, write to | 19 * along with this library; see the file COPYING.LIB. If not, write to |
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "core/layout/LayoutMenuList.h" | 25 #include "core/layout/LayoutMenuList.h" |
26 | 26 |
27 #include "core/HTMLNames.h" | |
28 #include "core/css/CSSFontSelector.h" | |
29 #include "core/css/resolver/StyleResolver.h" | |
30 #include "core/dom/AXObjectCache.h" | 27 #include "core/dom/AXObjectCache.h" |
31 #include "core/dom/NodeComputedStyle.h" | 28 #include "core/dom/NodeComputedStyle.h" |
32 #include "core/html/HTMLOptGroupElement.h" | |
33 #include "core/html/HTMLOptionElement.h" | 29 #include "core/html/HTMLOptionElement.h" |
34 #include "core/html/HTMLSelectElement.h" | 30 #include "core/html/HTMLSelectElement.h" |
35 #include "core/layout/LayoutBR.h" | 31 #include "core/layout/LayoutText.h" |
36 #include "core/layout/LayoutScrollbar.h" | |
37 #include "core/layout/LayoutTheme.h" | 32 #include "core/layout/LayoutTheme.h" |
38 #include "platform/fonts/FontCache.h" | |
39 #include "platform/geometry/IntSize.h" | |
40 #include "platform/text/BidiTextRun.h" | |
41 #include "platform/text/PlatformLocale.h" | 33 #include "platform/text/PlatformLocale.h" |
42 #include <math.h> | 34 #include <math.h> |
43 | 35 |
44 namespace blink { | 36 namespace blink { |
45 | 37 |
46 using namespace HTMLNames; | |
47 | |
48 LayoutMenuList::LayoutMenuList(Element* element) | 38 LayoutMenuList::LayoutMenuList(Element* element) |
49 : LayoutFlexibleBox(element) | 39 : LayoutFlexibleBox(element) |
50 , m_buttonText(nullptr) | 40 , m_buttonText(nullptr) |
51 , m_innerBlock(nullptr) | 41 , m_innerBlock(nullptr) |
52 , m_optionsChanged(true) | 42 , m_optionsChanged(true) |
53 , m_isEmpty(false) | 43 , m_isEmpty(false) |
54 , m_hasUpdatedActiveOption(false) | 44 , m_hasUpdatedActiveOption(false) |
55 , m_optionsWidth(0) | 45 , m_optionsWidth(0) |
56 , m_lastActiveIndex(-1) | 46 , m_lastActiveIndex(-1) |
57 { | 47 { |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 { | 335 { |
346 return paddingLeft() + m_innerBlock->paddingLeft(); | 336 return paddingLeft() + m_innerBlock->paddingLeft(); |
347 } | 337 } |
348 | 338 |
349 LayoutUnit LayoutMenuList::clientPaddingRight() const | 339 LayoutUnit LayoutMenuList::clientPaddingRight() const |
350 { | 340 { |
351 return paddingRight() + m_innerBlock->paddingRight(); | 341 return paddingRight() + m_innerBlock->paddingRight(); |
352 } | 342 } |
353 | 343 |
354 } // namespace blink | 344 } // namespace blink |
OLD | NEW |