/* * This file is part of the select element layoutObject in WebCore. * * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. * All rights reserved. * (C) 2009 Torch Mobile Inc. All rights reserved. * (http://www.torchmobile.com/) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #include "third_party/blink/renderer/core/layout/layout_menu_list.h" #include #include "third_party/blink/renderer/core/accessibility/ax_object_cache.h" #include "third_party/blink/renderer/core/dom/node_computed_style.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/html/forms/html_option_element.h" #include "third_party/blink/renderer/core/html/forms/html_select_element.h" #include "third_party/blink/renderer/core/layout/layout_block_flow.h" #include "third_party/blink/renderer/core/layout/layout_text.h" #include "third_party/blink/renderer/core/layout/layout_theme.h" #include "third_party/blink/renderer/core/paint/paint_layer.h" #include "third_party/blink/renderer/platform/text/platform_locale.h" namespace blink { LayoutMenuList::LayoutMenuList(Element* element) : LayoutFlexibleBox(element), button_text_(nullptr), inner_block_(nullptr), is_empty_(false), has_updated_active_option_(false), inner_block_height_(LayoutUnit()), options_width_(0), last_active_index_(-1) { DCHECK(IsHTMLSelectElement(element)); } LayoutMenuList::~LayoutMenuList() = default; // FIXME: Instead of this hack we should add a ShadowRoot to