mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This caused us to lose our gn check certification. :( Turns out gn check was just ignoring all the header paths it didn't understand and so gn check passing for sky wasn't meaning much. I tried to straighten out some of the mess in this CL, but its going to take several more rounds of massaging before gn check passes again. On the bright side (almost) all of our headers are absolute now. Turns out my script (attached to the bug) didn't notice ../ includes but I'll fix that in the next patch. R=abarth@chromium.org BUG=435361 Review URL: https://codereview.chromium.org/746023002
83 lines
3.0 KiB
C++
83 lines
3.0 KiB
C++
/*
|
|
* This file is part of the theme implementation for form controls in WebCore.
|
|
*
|
|
* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc.
|
|
*
|
|
* 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.
|
|
*
|
|
*/
|
|
|
|
#ifndef RenderTheme_h
|
|
#define RenderTheme_h
|
|
|
|
#include "sky/engine/core/rendering/RenderObject.h"
|
|
#include "sky/engine/platform/scroll/ScrollTypes.h"
|
|
#include "sky/engine/wtf/PassRefPtr.h"
|
|
#include "sky/engine/wtf/RefCounted.h"
|
|
#include "sky/engine/wtf/text/WTFString.h"
|
|
|
|
namespace blink {
|
|
|
|
class Element;
|
|
|
|
class RenderTheme : public RefCounted<RenderTheme> {
|
|
protected:
|
|
RenderTheme();
|
|
|
|
public:
|
|
// This function is to be implemented in your platform-specific theme implementation to hand back the
|
|
// appropriate platform theme.
|
|
static RenderTheme& theme();
|
|
|
|
virtual void systemFont(CSSValueID, FontDescription&) const;
|
|
virtual Color systemColor(CSSValueID) const;
|
|
Color focusRingColor() const;
|
|
virtual double caretBlinkInterval() const { return 0.5; }
|
|
|
|
// Text selection colors.
|
|
Color activeSelectionBackgroundColor() const;
|
|
Color inactiveSelectionBackgroundColor() const;
|
|
Color activeSelectionForegroundColor() const;
|
|
Color inactiveSelectionForegroundColor() const;
|
|
|
|
virtual bool supportsSelectionForegroundColors() const { return true; }
|
|
virtual Color platformDefaultCompositionBackgroundColor() const { return defaultCompositionBackgroundColor; }
|
|
void setCustomFocusRingColor(const Color&);
|
|
|
|
static Color tapHighlightColor();
|
|
virtual Color platformTapHighlightColor() const { return RenderTheme::defaultTapHighlightColor; }
|
|
|
|
protected:
|
|
virtual Color platformActiveSelectionBackgroundColor() const;
|
|
virtual Color platformInactiveSelectionBackgroundColor() const;
|
|
virtual Color platformActiveSelectionForegroundColor() const;
|
|
virtual Color platformInactiveSelectionForegroundColor() const;
|
|
virtual Color platformFocusRingColor() const { return Color(0, 0, 0); }
|
|
|
|
private:
|
|
Color m_customFocusRingColor;
|
|
bool m_hasCustomFocusRingColor;
|
|
|
|
// This color is expected to be drawn on a semi-transparent overlay,
|
|
// making it more transparent than its alpha value indicates.
|
|
static const RGBA32 defaultTapHighlightColor = 0x66000000;
|
|
static const RGBA32 defaultCompositionBackgroundColor = 0xFFFFDD55;
|
|
};
|
|
|
|
} // namespace blink
|
|
|
|
#endif // RenderTheme_h
|