Commit 2552b63b authored by levin@chromium.org's avatar levin@chromium.org

WebCore: [Chromium] Make setCaretBlinkInterval static.

https://bugs.webkit.org/show_bug.cgi?id=31704

Patch by Joel Stanley <joel@jms.id.au> on 2010-02-02
Reviewed by David Levin.

This is so it can be called from the newly exposed Chromium API setter
method.

* rendering/RenderThemeChromiumLinux.cpp:
* rendering/RenderThemeChromiumLinux.h:

WebKit/chromium: [Chromium] Add API method for setting caret blink frequency.
https://bugs.webkit.org/show_bug.cgi?id=31704

Patch by Joel Stanley <joel@jms.id.au> on 2010-02-02
Reviewed by David Levin.

This enables the RenderThemeChromiumLinux::setCaretBlinkInterval method
to be called Chromium's API.  The API is linux-only as it is currently
the only port to implement RenderTheme::setCaretBlinkInterval.

* WebKit.gyp:  Add WebRenderTheme.{h,cpp}
* public/linux/WebRenderTheme.h: Added.
* src/linux/WebRenderTheme.cpp: Added.
(WebKit::setCaretBlinkInterval): Exposed API

git-svn-id: svn://svn.chromium.org/blink/trunk@54280 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f038b753
2010-02-02 Joel Stanley <joel@jms.id.au>
Reviewed by David Levin.
[Chromium] Make setCaretBlinkInterval static.
https://bugs.webkit.org/show_bug.cgi?id=31704
This is so it can be called from the newly exposed Chromium API setter
method.
* rendering/RenderThemeChromiumLinux.cpp:
* rendering/RenderThemeChromiumLinux.h:
2010-02-02 Yael Aharon <yael.aharon@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
......
......@@ -25,8 +25,8 @@
#include "config.h"
#include "RenderThemeChromiumLinux.h"
#include "Color.h"
#include "CSSValueKeywords.h"
#include "Color.h"
#include "RenderObject.h"
#include "UserAgentStyleSheets.h"
......@@ -44,6 +44,8 @@ unsigned RenderThemeChromiumLinux::m_inactiveSelectionBackgroundColor =
unsigned RenderThemeChromiumLinux::m_inactiveSelectionForegroundColor =
0xff323232;
double RenderThemeChromiumLinux::m_caretBlinkInterval;
PassRefPtr<RenderTheme> RenderThemeChromiumLinux::create()
{
return adoptRef(new RenderThemeChromiumLinux());
......
......@@ -56,7 +56,7 @@ namespace WebCore {
virtual void adjustSliderThumbSize(RenderObject*) const;
void setCaretBlinkInterval(double interval);
static void setCaretBlinkInterval(double interval);
virtual double caretBlinkIntervalInternal() const;
static void setSelectionColors(unsigned activeBackgroundColor,
......@@ -78,7 +78,7 @@ namespace WebCore {
// A general method asking if any control tinting is supported at all.
virtual bool supportsControlTints() const;
double m_caretBlinkInterval;
static double m_caretBlinkInterval;
static unsigned m_activeSelectionBackgroundColor;
static unsigned m_activeSelectionForegroundColor;
......
2010-02-02 Joel Stanley <joel@jms.id.au>
Reviewed by David Levin.
[Chromium] Add API method for setting caret blink frequency.
https://bugs.webkit.org/show_bug.cgi?id=31704
This enables the RenderThemeChromiumLinux::setCaretBlinkInterval method
to be called Chromium's API. The API is linux-only as it is currently
the only port to implement RenderTheme::setCaretBlinkInterval.
* WebKit.gyp: Add WebRenderTheme.{h,cpp}
* public/linux/WebRenderTheme.h: Added.
* src/linux/WebRenderTheme.cpp: Added.
(WebKit::setCaretBlinkInterval): Exposed API
2010-02-02 Shinichiro Hamaji <hamaji@chromium.org>
Reviewed by Dimitri Glazkov.
......
......@@ -70,6 +70,7 @@
'sources': [
'public/gtk/WebInputEventFactory.h',
'public/linux/WebFontRendering.h',
'public/linux/WebRenderTheme.h',
'public/x11/WebScreenInfoFactory.h',
'public/mac/WebInputEventFactory.h',
'public/mac/WebScreenInfoFactory.h',
......@@ -233,6 +234,7 @@
'src/InspectorClientImpl.cpp',
'src/InspectorClientImpl.h',
'src/linux/WebFontRendering.cpp',
'src/linux/WebRenderTheme.cpp',
'src/x11/WebScreenInfoFactory.cpp',
'src/mac/WebInputEventFactory.mm',
'src/mac/WebScreenInfoFactory.mm',
......
/*
* Copyright (C) 2009 Joel Stanley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef WebRenderTheme_h
#define WebRenderTheme_h
#include "../WebCommon.h"
namespace WebKit {
// Set caret blink interval for text input areas.
WEBKIT_API void setCaretBlinkInterval(double);
} // namespace WebKit
#endif
/*
* Copyright (C) 2010 Joel Stanley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "WebRenderTheme.h"
#include "RenderThemeChromiumLinux.h"
#include "WebView.h"
using WebCore::RenderTheme;
using WebCore::RenderThemeChromiumLinux;
namespace WebKit {
void setCaretBlinkInterval(double interval)
{
RenderThemeChromiumLinux::setCaretBlinkInterval(interval);
}
} // namespace WebKit
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment