Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Qt] Custom tap-highlight-color renders fully opaque
https://bugs.webkit.org/show_bug.cgi?id=94468

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Adjust the default tap-highlight-color to figure in that is will be
drawn semi-transparent.

* rendering/RenderTheme.h:
(RenderTheme):

Source/WebKit2:

Draw tap-highlight-color at 50% transparency, to better match how
existing WebKit browsers act on custom tap-highlight colors.

* WebProcess/WebPage/TapHighlightController.cpp:
(WebKit::TapHighlightController::drawRect):


Canonical link: https://commits.webkit.org/112279@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Allan Sandfeld Jensen committed Aug 20, 2012
1 parent 2637ec3 commit f88e930
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
13 changes: 13 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
2012-08-20 Allan Sandfeld Jensen <allan.jensen@nokia.com>

[Qt] Custom tap-highlight-color renders fully opaque
https://bugs.webkit.org/show_bug.cgi?id=94468

Reviewed by Kenneth Rohde Christiansen.

Adjust the default tap-highlight-color to figure in that is will be
drawn semi-transparent.

* rendering/RenderTheme.h:
(RenderTheme):

2012-08-20 Andrey Adaikin <aandrey@chromium.org>

Web Inspector: [WebGL] Add minimum transport protocol from backend to frontend
Expand Down
4 changes: 3 additions & 1 deletion Source/WebCore/rendering/RenderTheme.h
Expand Up @@ -365,7 +365,9 @@ class RenderTheme : public RefCounted<RenderTheme> {
mutable Color m_inactiveListBoxSelectionForegroundColor;

#if ENABLE(TOUCH_EVENTS)
static const RGBA32 defaultTapHighlightColor = 0x33000000;
// 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;
#endif

#if USE(NEW_THEME)
Expand Down
13 changes: 13 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,16 @@
2012-08-20 Allan Sandfeld Jensen <allan.jensen@nokia.com>

[Qt] Custom tap-highlight-color renders fully opaque
https://bugs.webkit.org/show_bug.cgi?id=94468

Reviewed by Kenneth Rohde Christiansen.

Draw tap-highlight-color at 50% transparency, to better match how
existing WebKit browsers act on custom tap-highlight colors.

* WebProcess/WebPage/TapHighlightController.cpp:
(WebKit::TapHighlightController::drawRect):

2012-08-20 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK] Replace webkit_web_view_replace_content with webkit_web_view_load_alternate_html
Expand Down
4 changes: 2 additions & 2 deletions Source/WebKit2/WebProcess/WebPage/TapHighlightController.cpp
Expand Up @@ -105,9 +105,9 @@ void TapHighlightController::drawRect(PageOverlay* pageOverlay, GraphicsContext&
{
GraphicsContextStateSaver stateSaver(context);
if (m_webPage->drawingArea()->pageOverlayShouldApplyFadeWhenPainting())
context.setFillColor(highlightColor(m_color, pageOverlay->fractionFadedIn()), ColorSpaceSRGB);
context.setFillColor(highlightColor(m_color, pageOverlay->fractionFadedIn() * 0.5f), ColorSpaceSRGB);
else
context.setFillColor(m_color, ColorSpaceSRGB);
context.setFillColor(highlightColor(m_color, 0.5f), ColorSpaceSRGB);
context.fillPath(m_path);
}
}
Expand Down

0 comments on commit f88e930

Please sign in to comment.