Add an appearance keyword for wireless playback / airplay icon
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jun 2015 20:50:34 +0000 (20:50 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jun 2015 20:50:34 +0000 (20:50 +0000)
commit919cc5f5879a4d1925557f4024f1c37524ec830d
treecec220bea50dae6cf2fdfe29ddd80b42a29bdb24
parentd5cff1eea6a3b1ea13903d807352d630ca06f57e
Add an appearance keyword for wireless playback / airplay icon
https://bugs.webkit.org/show_bug.cgi?id=145892
<rdar://problem/21344872>

Reviewed by Simon Fraser.

Source/WebCore:

Add a new "-webkit-appearance" value named "-apple-airplay"
which will be used to render an icon. This change simply
adds support for the value, and puts in hooks for drawing.

At the moment this is only going to be used by Airplay, so
the public-facing name is "-apple-airplay". However, the
implementation in Theme has a more generic name, in case
we hook it up for other ports later.

Test: fast/css/appearance-airplay.html

* css/CSSParser.cpp:
(WebCore::cssValueKeywordID): This new keyword should not get
translated into having a -webkit prefix.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): New mapping from
the Theme to the CSS value.
* css/CSSValueKeywords.in: Add "-apple-airplay".
* platform/ThemeTypes.h: New ControlPart.
* rendering/RenderTheme.cpp: Stub implementation of the rendering and
style update for the new appearance.
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::adjustWirelessPlaybackIconStyle):
(WebCore::RenderTheme::paintWirelessPlaybackIcon):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustWirelessPlaybackIconStyle):
(WebCore::RenderThemeMac::paintWirelessPlaybackIcon):

LayoutTests:

Simple test that makes sure we parse and evaluate
the new appearance value.

* fast/css/appearance-airplay-expected.txt: Added.
* fast/css/appearance-airplay.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/appearance-airplay-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/appearance-airplay.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/platform/ThemeTypes.h
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderTheme.h
Source/WebCore/rendering/RenderThemeMac.h
Source/WebCore/rendering/RenderThemeMac.mm