chromium/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/html/forms/internal_popup_menu.h"

#include "base/containers/span.h"
#include "build/build_config.h"
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/core/accessibility/ax_object_cache.h"
#include "third_party/blink/renderer/core/css/css_font_selector.h"
#include "third_party/blink/renderer/core/css/css_value_id_mappings.h"
#include "third_party/blink/renderer/core/css/properties/computed_style_utils.h"
#include "third_party/blink/renderer/core/css/properties/longhands.h"
#include "third_party/blink/renderer/core/css/style_engine.h"
#include "third_party/blink/renderer/core/css/style_request.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/element_traversal.h"
#include "third_party/blink/renderer/core/dom/events/scoped_event_queue.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/exported/web_view_impl.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/web_frame_widget_impl.h"
#include "third_party/blink/renderer/core/geometry/dom_rect.h"
#include "third_party/blink/renderer/core/html/forms/chooser_resource_loader.h"
#include "third_party/blink/renderer/core/html/forms/html_opt_group_element.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/html/html_frame_owner_element.h"
#include "third_party/blink/renderer/core/html/html_hr_element.h"
#include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/input/event_handler.h"
#include "third_party/blink/renderer/core/layout/custom_scrollbar.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/layout/layout_theme.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page_popup.h"
#include "third_party/blink/renderer/core/scroll/scrollable_area.h"
#include "third_party/blink/renderer/platform/fonts/font_selector.h"
#include "third_party/blink/renderer/platform/fonts/font_selector_client.h"
#include "third_party/blink/renderer/platform/text/platform_locale.h"
#include "third_party/blink/renderer/platform/wtf/shared_buffer.h"
#include "ui/base/ui_base_features.h"
#include "ui/gfx/geometry/rect.h"

namespace blink {

namespace {

// TODO crbug.com/516675 Add stretch to serialization

const char* FontStyleToString(FontSelectionValue slope) {}

const char* TextTransformToString(ETextTransform transform) {}

const char* TextAlignToString(ETextAlign align) {}

const String SerializeComputedStyleForProperty(const ComputedStyle& style,
                                               CSSPropertyID id) {}

const String SerializeColorScheme(const ComputedStyle& style) {}

ScrollbarPart ScrollbarPartFromPseudoId(PseudoId id) {}

const ComputedStyle* StyleForHoveredScrollbarPart(HTMLSelectElement& element,
                                                  const ComputedStyle* style,
                                                  Scrollbar* scrollbar,
                                                  PseudoId target_id) {}

}  // anonymous namespace

class PopupMenuCSSFontSelector : public CSSFontSelector,
                                 private FontSelectorClient {};

PopupMenuCSSFontSelector::PopupMenuCSSFontSelector(
    Document& document,
    CSSFontSelector* owner_font_selector)
    :{}

PopupMenuCSSFontSelector::~PopupMenuCSSFontSelector() = default;

const FontData* PopupMenuCSSFontSelector::GetFontData(
    const FontDescription& description,
    const FontFamily& font_family) {}

void PopupMenuCSSFontSelector::FontsNeedUpdate(FontSelector* font_selector,
                                               FontInvalidationReason reason) {}

void PopupMenuCSSFontSelector::Trace(Visitor* visitor) const {}

// ----------------------------------------------------------------

class InternalPopupMenu::ItemIterationContext {};

// ----------------------------------------------------------------

InternalPopupMenu::InternalPopupMenu(ChromeClient* chrome_client,
                                     HTMLSelectElement& owner_element)
    :{}

InternalPopupMenu::~InternalPopupMenu() {}

void InternalPopupMenu::Trace(Visitor* visitor) const {}

void InternalPopupMenu::WriteDocument(SegmentedBuffer& data) {}

void InternalPopupMenu::AddElementStyle(ItemIterationContext& context,
                                        HTMLElement& element) {}

void InternalPopupMenu::AddOption(ItemIterationContext& context,
                                  HTMLOptionElement& element) {}

void InternalPopupMenu::AddOptGroup(ItemIterationContext& context,
                                    HTMLOptGroupElement& element) {}

void InternalPopupMenu::AddSeparator(ItemIterationContext& context,
                                     HTMLHRElement& element) {}

void InternalPopupMenu::AppendOwnerElementPseudoStyles(
    const String& target,
    SegmentedBuffer& data,
    const ComputedStyle& style) {}

CSSFontSelector* InternalPopupMenu::CreateCSSFontSelector(
    Document& popup_document) {}

void InternalPopupMenu::SetValueAndClosePopup(int num_value,
                                              const String& string_value) {}

void InternalPopupMenu::SetValue(const String& value) {}

void InternalPopupMenu::DidClosePopup() {}

Element& InternalPopupMenu::OwnerElement() {}

ChromeClient& InternalPopupMenu::GetChromeClient() {}

Locale& InternalPopupMenu::GetLocale() {}

void InternalPopupMenu::CancelPopup() {}

void InternalPopupMenu::Dispose() {}

void InternalPopupMenu::Show(PopupMenu::ShowEventType type) {}

void InternalPopupMenu::Hide() {}

void InternalPopupMenu::UpdateFromElement(UpdateReason) {}

AXObject* InternalPopupMenu::PopupRootAXObject() const {}

void InternalPopupMenu::Update(bool force_update) {}

void InternalPopupMenu::DisconnectClient() {}

void InternalPopupMenu::SetMenuListOptionsBoundsInAXTree(
    WTF::Vector<gfx::Rect>& options_bounds,
    gfx::Point popup_origin) {}

}  // namespace blink