<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[185731] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/185731">185731</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2015-06-18 18:13:37 -0700 (Thu, 18 Jun 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Provide a way for web developers to draw a Theme-specific Wireless Playback icon
https://bugs.webkit.org/show_bug.cgi?id=146123
<rdar://problem/21119287>
Reviewed by Simon Fraser.
Source/WebCore:
Implement a -webkit-named-image() CSS <image> generator that allows a site to
request artwork by name and get the platform variant. At the moment
we only support "wireless-playback" which returns a generic image everywhere
but Cocoa platforms, where we render the AirPlay icon.
In order to do this I added a ThemeCocoa to share any Theme code between
Mac and iOS.
Test: fast/css/named-icons.html
* WebCore.xcodeproj/project.pbxproj: Add new files CSSNamedImageValue, NamedImageGeneratedImage and ThemeCocoa.
* css/CSSImageGeneratorValue.cpp: Handle the new NamedImageClass in the switch statements for downcasting.
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::isFixedSize):
(WebCore::CSSImageGeneratorValue::isPending):
(WebCore::CSSImageGeneratorValue::knownToBeOpaque):
* css/CSSNamedImageValue.cpp: New class. Just holds a name String.
(WebCore::CSSNamedImageValue::customCSSText):
(WebCore::CSSNamedImageValue::image):
(WebCore::CSSNamedImageValue::equals):
* css/CSSNamedImageValue.h:
(WebCore::CSSNamedImageValue::create):
(WebCore::CSSNamedImageValue::isFixedSize):
(WebCore::CSSNamedImageValue::isPending):
(WebCore::CSSNamedImageValue::CSSNamedImageValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::isGeneratedImageValue): Allow "-webkit-named-image(".
(WebCore::CSSParser::parseGeneratedImage): Call parseNamedImage if we hit named-icon.
(WebCore::CSSParser::parseNamedImage): Parse the function looking for a CSS ident.
* css/CSSParser.h:
* css/CSSValue.cpp: Handle NamedImageClass in the various switch statements.
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isNamedImageValue): Helper to detect the correct CSSValue subclass.
* platform/Theme.cpp:
(WebCore::Theme::drawNamedImage): Draw a generic wireless playback icon.
* platform/Theme.h: Add drawNamedImage.
* platform/cocoa/ThemeCocoa.cpp: New shared base class for ThemeMac and ThemeIOS.
(WebCore::fitContextToBox):
(WebCore::ThemeCocoa::drawNamedImage): Draw an AirPlay icon for wireless playback.
* platform/cocoa/ThemeCocoa.h:
* platform/graphics/CrossfadeGeneratedImage.h: Drive-by removal of unnecessary forward class definition.
* platform/graphics/ImageBuffer.h: Add NamedImageGeneratedImage as a friend class.
* platform/graphics/NamedImageGeneratedImage.cpp: New class. Calls into the Theme to render the artwork.
(WebCore::NamedImageGeneratedImage::NamedImageGeneratedImage):
(WebCore::NamedImageGeneratedImage::draw):
(WebCore::NamedImageGeneratedImage::drawPattern):
* platform/graphics/NamedImageGeneratedImage.h:
* platform/ios/ThemeIOS.h: Inherit from ThemeCocoa.
* platform/mac/ThemeMac.h: Ditto.
LayoutTests:
Test the new -webkit-named-image CSS generator. Only "wireless-playback"
is supported for now, and has platform-specific results for Cocoa.
* fast/css/named-images-expected.png: Added.
* fast/css/named-images.html: Added.
* platform/mac/fast/css/named-images-expected.png: Added.
* platform/mac/fast/css/named-images-expected.txt: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSAllInOnecpp">trunk/Source/WebCore/css/CSSAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageGeneratorValuecpp">trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValuecpp">trunk/Source/WebCore/css/CSSValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueh">trunk/Source/WebCore/css/CSSValue.h</a></li>
<li><a href="#trunkSourceWebCoreplatformThemecpp">trunk/Source/WebCore/platform/Theme.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformThemeh">trunk/Source/WebCore/platform/Theme.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsCrossfadeGeneratedImageh">trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageBufferh">trunk/Source/WebCore/platform/graphics/ImageBuffer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformiosThemeIOSh">trunk/Source/WebCore/platform/ios/ThemeIOS.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacThemeMach">trunk/Source/WebCore/platform/mac/ThemeMac.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssnamedimagesexpectedpng">trunk/LayoutTests/fast/css/named-images-expected.png</a></li>
<li><a href="#trunkLayoutTestsfastcssnamedimageshtml">trunk/LayoutTests/fast/css/named-images.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastcssnamedimagesexpectedpng">trunk/LayoutTests/platform/mac/fast/css/named-images-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastcssnamedimagesexpectedtxt">trunk/LayoutTests/platform/mac/fast/css/named-images-expected.txt</a></li>
<li><a href="#trunkSourceWebCorecssCSSNamedImageValuecpp">trunk/Source/WebCore/css/CSSNamedImageValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSNamedImageValueh">trunk/Source/WebCore/css/CSSNamedImageValue.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaThemeCocoacpp">trunk/Source/WebCore/platform/cocoa/ThemeCocoa.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaThemeCocoah">trunk/Source/WebCore/platform/cocoa/ThemeCocoa.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsNamedImageGeneratedImagecpp">trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsNamedImageGeneratedImageh">trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/LayoutTests/ChangeLog        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-06-18 Dean Jackson <dino@apple.com>
+
+ Provide a way for web developers to draw a Theme-specific Wireless Playback icon
+ https://bugs.webkit.org/show_bug.cgi?id=146123
+ <rdar://problem/21119287>
+
+ Reviewed by Simon Fraser.
+
+ Test the new -webkit-named-image CSS generator. Only "wireless-playback"
+ is supported for now, and has platform-specific results for Cocoa.
+
+ * fast/css/named-images-expected.png: Added.
+ * fast/css/named-images.html: Added.
+ * platform/mac/fast/css/named-images-expected.png: Added.
+ * platform/mac/fast/css/named-images-expected.txt: Added.
+
</ins><span class="cx"> 2015-06-18 KyungTae Kim <ktf.kim@samsung.com> and Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> [CSS3] Add support for the word-break:keep-all CSS property
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssnamedimagesexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/fast/css/named-images-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/fast/css/named-images-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsfastcssnamedimageshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/named-images.html (0 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/named-images.html         (rev 0)
+++ trunk/LayoutTests/fast/css/named-images.html        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<style>
+div {
+ width: 100px;
+ height: 100px;
+ margin: 5px;
+ display: inline-block;
+ border: 1px solid black;
+ box-sizing: border-box;
+}
+.normal {
+ background-image: -webkit-named-image(wireless-playback);
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+}
+.mask {
+ -webkit-mask-image: -webkit-named-image(wireless-playback);
+ -webkit-mask-size: 100% 100%;
+ background-color: blue;
+}
+</style>
+<div class="normal" ></div>
+<div class="normal" style="background-size: 50px 50px"></div>
+<div class="normal" style="background-size: 50px 50px; background-position: 50% 50%"></div>
+<div class="normal" style="width: 150px"></div>
+<div class="normal" style="height: 150px"></div>
+<div class="normal" style="width: 200px; height: 200px; background-repeat: repeat; background-size: 50px 50px"></div>
+<div class="mask"></div>
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css/named-images.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsplatformmacfastcssnamedimagesexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac/fast/css/named-images-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac/fast/css/named-images-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacfastcssnamedimagesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/css/named-images-expected.txt (0 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/css/named-images-expected.txt         (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/css/named-images-expected.txt        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (5,55) size 100x100 [border: (1px solid #000000)]
+ RenderText {#text} at (110,146) size 4x18
+ text run at (110,146) width 4: " "
+ RenderBlock {DIV} at (119,55) size 100x100 [border: (1px solid #000000)]
+ RenderText {#text} at (224,146) size 4x18
+ text run at (224,146) width 4: " "
+ RenderBlock {DIV} at (233,55) size 100x100 [border: (1px solid #000000)]
+ RenderText {#text} at (338,146) size 4x18
+ text run at (338,146) width 4: " "
+ RenderBlock {DIV} at (347,55) size 150x100 [border: (1px solid #000000)]
+ RenderText {#text} at (502,146) size 4x18
+ text run at (502,146) width 4: " "
+ RenderBlock {DIV} at (511,5) size 100x150 [border: (1px solid #000000)]
+ RenderText {#text} at (616,146) size 4x18
+ text run at (616,146) width 4: " "
+ RenderBlock {DIV} at (5,169) size 200x200 [border: (1px solid #000000)]
+ RenderText {#text} at (210,360) size 4x18
+ text run at (210,360) width 4: " "
+ RenderText {#text} at (0,0) size 0x0
+layer at (227,277) size 100x100
+ RenderBlock {DIV} at (219,269) size 100x100 [bgcolor=#0000FF] [border: (1px solid #000000)]
</ins><span class="cx">Property changes on: trunk/LayoutTests/platform/mac/fast/css/named-images-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -1289,6 +1289,7 @@
</span><span class="cx"> css/CSSKeyframesRule.cpp
</span><span class="cx"> css/CSSLineBoxContainValue.cpp
</span><span class="cx"> css/CSSMediaRule.cpp
</span><ins>+ css/CSSNamedImageValue.cpp
</ins><span class="cx"> css/CSSOMUtils.cpp
</span><span class="cx"> css/CSSPageRule.cpp
</span><span class="cx"> css/CSSParser.cpp
</span><span class="lines">@@ -2163,6 +2164,7 @@
</span><span class="cx"> platform/graphics/LayoutRect.cpp
</span><span class="cx"> platform/graphics/MaskImageOperation.cpp
</span><span class="cx"> platform/graphics/MediaPlayer.cpp
</span><ins>+ platform/graphics/NamedImageGeneratedImage.cpp
</ins><span class="cx"> platform/graphics/Path.cpp
</span><span class="cx"> platform/graphics/PathTraversalState.cpp
</span><span class="cx"> platform/graphics/Pattern.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/ChangeLog        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -1,3 +1,74 @@
</span><ins>+2015-06-18 Dean Jackson <dino@apple.com>
+
+ Provide a way for web developers to draw a Theme-specific Wireless Playback icon
+ https://bugs.webkit.org/show_bug.cgi?id=146123
+ <rdar://problem/21119287>
+
+ Reviewed by Simon Fraser.
+
+ Implement a -webkit-named-image() CSS <image> generator that allows a site to
+ request artwork by name and get the platform variant. At the moment
+ we only support "wireless-playback" which returns a generic image everywhere
+ but Cocoa platforms, where we render the AirPlay icon.
+
+ In order to do this I added a ThemeCocoa to share any Theme code between
+ Mac and iOS.
+
+ Test: fast/css/named-icons.html
+
+ * WebCore.xcodeproj/project.pbxproj: Add new files CSSNamedImageValue, NamedImageGeneratedImage and ThemeCocoa.
+
+ * css/CSSImageGeneratorValue.cpp: Handle the new NamedImageClass in the switch statements for downcasting.
+ (WebCore::CSSImageGeneratorValue::image):
+ (WebCore::CSSImageGeneratorValue::isFixedSize):
+ (WebCore::CSSImageGeneratorValue::isPending):
+ (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
+
+ * css/CSSNamedImageValue.cpp: New class. Just holds a name String.
+ (WebCore::CSSNamedImageValue::customCSSText):
+ (WebCore::CSSNamedImageValue::image):
+ (WebCore::CSSNamedImageValue::equals):
+ * css/CSSNamedImageValue.h:
+ (WebCore::CSSNamedImageValue::create):
+ (WebCore::CSSNamedImageValue::isFixedSize):
+ (WebCore::CSSNamedImageValue::isPending):
+ (WebCore::CSSNamedImageValue::CSSNamedImageValue):
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::isGeneratedImageValue): Allow "-webkit-named-image(".
+ (WebCore::CSSParser::parseGeneratedImage): Call parseNamedImage if we hit named-icon.
+ (WebCore::CSSParser::parseNamedImage): Parse the function looking for a CSS ident.
+ * css/CSSParser.h:
+
+ * css/CSSValue.cpp: Handle NamedImageClass in the various switch statements.
+ (WebCore::CSSValue::equals):
+ (WebCore::CSSValue::cssText):
+ (WebCore::CSSValue::destroy):
+ * css/CSSValue.h:
+ (WebCore::CSSValue::isNamedImageValue): Helper to detect the correct CSSValue subclass.
+
+ * platform/Theme.cpp:
+ (WebCore::Theme::drawNamedImage): Draw a generic wireless playback icon.
+ * platform/Theme.h: Add drawNamedImage.
+
+ * platform/cocoa/ThemeCocoa.cpp: New shared base class for ThemeMac and ThemeIOS.
+ (WebCore::fitContextToBox):
+ (WebCore::ThemeCocoa::drawNamedImage): Draw an AirPlay icon for wireless playback.
+ * platform/cocoa/ThemeCocoa.h:
+
+ * platform/graphics/CrossfadeGeneratedImage.h: Drive-by removal of unnecessary forward class definition.
+
+ * platform/graphics/ImageBuffer.h: Add NamedImageGeneratedImage as a friend class.
+
+ * platform/graphics/NamedImageGeneratedImage.cpp: New class. Calls into the Theme to render the artwork.
+ (WebCore::NamedImageGeneratedImage::NamedImageGeneratedImage):
+ (WebCore::NamedImageGeneratedImage::draw):
+ (WebCore::NamedImageGeneratedImage::drawPattern):
+ * platform/graphics/NamedImageGeneratedImage.h:
+
+ * platform/ios/ThemeIOS.h: Inherit from ThemeCocoa.
+ * platform/mac/ThemeMac.h: Ditto.
+
</ins><span class="cx"> 2015-06-18 KyungTae Kim <ktf.kim@samsung.com> and Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> [CSS3] Add support for the word-break:keep-all CSS property
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -8203,6 +8203,7 @@
</span><span class="cx"> <ClCompile Include="..\platform\graphics\IntSize.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\graphics\LayoutRect.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\graphics\MediaPlayer.cpp" />
</span><ins>+ <ClCompile Include="..\platform\graphics\NamedImageGeneratedImage.cpp" />
</ins><span class="cx"> <ClCompile Include="..\platform\graphics\Path.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\graphics\PathTraversalState.cpp" />
</span><span class="cx"> <ClCompile Include="..\platform\graphics\Pattern.cpp" />
</span><span class="lines">@@ -9634,6 +9635,20 @@
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\css\CSSNamedImageValue.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\css\CSSOMUtils.cpp">
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</span><span class="cx"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</span><span class="lines">@@ -19999,6 +20014,7 @@
</span><span class="cx"> <ClInclude Include="..\platform\graphics\LayoutRect.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\LayoutSize.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\MediaPlayer.h" />
</span><ins>+ <ClInclude Include="..\platform\graphics\NamedImageGeneratedImage.h" />
</ins><span class="cx"> <ClInclude Include="..\platform\graphics\NativeImagePtr.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\Path.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\PathTraversalState.h" />
</span><span class="lines">@@ -20504,6 +20520,7 @@
</span><span class="cx"> <ClInclude Include="..\css\CSSInitialValue.h" />
</span><span class="cx"> <ClInclude Include="..\css\CSSLineBoxContainValue.h" />
</span><span class="cx"> <ClInclude Include="..\css\CSSMediaRule.h" />
</span><ins>+ <ClInclude Include="..\css\CSSNamedImageValue.h" />
</ins><span class="cx"> <ClInclude Include="..\css\CSSOMUtils.h" />
</span><span class="cx"> <ClInclude Include="..\css\CSSPageRule.h" />
</span><span class="cx"> <ClInclude Include="..\css\CSSParser.h" />
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -1377,6 +1377,9 @@
</span><span class="cx"> <ClCompile Include="..\platform\graphics\MediaPlayer.cpp">
</span><span class="cx"> <Filter>platform\graphics</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\platform\graphics\NamedImageGeneratedImage.cpp">
+ <Filter>platform\graphics</Filter>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\platform\graphics\Path.cpp">
</span><span class="cx"> <Filter>platform\graphics</Filter>
</span><span class="cx"> </ClCompile>
</span><span class="lines">@@ -2148,6 +2151,9 @@
</span><span class="cx"> <ClCompile Include="..\css\CSSMediaRule.cpp">
</span><span class="cx"> <Filter>css</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\css\CSSNamedImageValue.cpp">
+ <Filter>css</Filter>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\css\CSSOMUtils.cpp">
</span><span class="cx"> <Filter>css</Filter>
</span><span class="cx"> </ClCompile>
</span><span class="lines">@@ -8502,6 +8508,9 @@
</span><span class="cx"> <ClInclude Include="..\platform\graphics\MediaPlayer.h">
</span><span class="cx"> <Filter>platform\graphics</Filter>
</span><span class="cx"> </ClInclude>
</span><ins>+ <ClInclude Include="..\platform\graphics\NamedImageGeneratedImage.h">
+ <Filter>platform\graphics</Filter>
+ </ClInclude>
</ins><span class="cx"> <ClInclude Include="..\platform\graphics\NativeImagePtr.h">
</span><span class="cx"> <Filter>platform\graphics</Filter>
</span><span class="cx"> </ClInclude>
</span><span class="lines">@@ -9126,6 +9135,9 @@
</span><span class="cx"> <ClInclude Include="..\css\CSSMediaRule.h">
</span><span class="cx"> <Filter>css</Filter>
</span><span class="cx"> </ClInclude>
</span><ins>+ <ClInclude Include="..\css\CSSNamedImageValue.h">
+ <Filter>css</Filter>
+ </ClInclude>
</ins><span class="cx"> <ClInclude Include="..\css\CSSOMUtils.h">
</span><span class="cx"> <Filter>css</Filter>
</span><span class="cx"> </ClInclude>
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -1224,6 +1224,8 @@
</span><span class="cx">                 31078CC81880AABB008099DC /* OESTextureHalfFloatLinear.h in Headers */ = {isa = PBXBuildFile; fileRef = 31078CC31880A6A6008099DC /* OESTextureHalfFloatLinear.h */; };
</span><span class="cx">                 31078CC91880AAC9008099DC /* JSOESTextureHalfFloatLinear.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31078CC51880AAAA008099DC /* JSOESTextureHalfFloatLinear.cpp */; };
</span><span class="cx">                 31078CCA1880AACE008099DC /* JSOESTextureHalfFloatLinear.h in Headers */ = {isa = PBXBuildFile; fileRef = 31078CC61880AAAA008099DC /* JSOESTextureHalfFloatLinear.h */; };
</span><ins>+                310D71951B335C9D009C7B73 /* ThemeCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 310D71931B335C9D009C7B73 /* ThemeCocoa.cpp */; };
+                310D71961B335C9E009C7B73 /* ThemeCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 310D71941B335C9D009C7B73 /* ThemeCocoa.h */; };
</ins><span class="cx">                 311C08BD18EB7CAF00B65615 /* mediaControlsApple.css in Resources */ = {isa = PBXBuildFile; fileRef = CDC1DD4117CC2C48008CB55D /* mediaControlsApple.css */; };
</span><span class="cx">                 311C08BE18EB7CAF00B65615 /* mediaControlsApple.js in Resources */ = {isa = PBXBuildFile; fileRef = CDE6560E17CA6E7600526BA7 /* mediaControlsApple.js */; };
</span><span class="cx">                 311C08BF18EB7CAF00B65615 /* mediaControlsiOS.css in Resources */ = {isa = PBXBuildFile; fileRef = CDAAF45D1869094E003C1717 /* mediaControlsiOS.css */; };
</span><span class="lines">@@ -1246,6 +1248,10 @@
</span><span class="cx">                 3146FE6F184420AA001A937C /* OESTextureFloatLinear.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3146FE6518442087001A937C /* OESTextureFloatLinear.cpp */; };
</span><span class="cx">                 3146FE7418442370001A937C /* JSOESTextureFloatLinear.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3146FE7018442367001A937C /* JSOESTextureFloatLinear.cpp */; };
</span><span class="cx">                 3146FE7518442370001A937C /* JSOESTextureFloatLinear.h in Headers */ = {isa = PBXBuildFile; fileRef = 3146FE7118442367001A937C /* JSOESTextureFloatLinear.h */; };
</span><ins>+                314BE3A11B30F6B700141982 /* CSSNamedImageValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 314BE3A01B30F6B700141982 /* CSSNamedImageValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                314BE3A31B30F6D100141982 /* CSSNamedImageValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 314BE3A21B30F6D100141982 /* CSSNamedImageValue.cpp */; };
+                314BE3A61B3103FB00141982 /* NamedImageGeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 314BE3A41B3103FB00141982 /* NamedImageGeneratedImage.cpp */; };
+                314BE3A71B3103FB00141982 /* NamedImageGeneratedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 314BE3A51B3103FB00141982 /* NamedImageGeneratedImage.h */; };
</ins><span class="cx">                 316023F01532C40C00D50FF4 /* Dictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 316023EF1532C40C00D50FF4 /* Dictionary.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 31611E5A0E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31611E580E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp */; };
</span><span class="cx">                 31611E5B0E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 31611E590E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h */; };
</span><span class="lines">@@ -8383,6 +8389,8 @@
</span><span class="cx">                 31078CC41880A6A6008099DC /* OESTextureHalfFloatLinear.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OESTextureHalfFloatLinear.idl; sourceTree = "<group>"; };
</span><span class="cx">                 31078CC51880AAAA008099DC /* JSOESTextureHalfFloatLinear.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESTextureHalfFloatLinear.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 31078CC61880AAAA008099DC /* JSOESTextureHalfFloatLinear.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESTextureHalfFloatLinear.h; sourceTree = "<group>"; };
</span><ins>+                310D71931B335C9D009C7B73 /* ThemeCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThemeCocoa.cpp; sourceTree = "<group>"; };
+                310D71941B335C9D009C7B73 /* ThemeCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThemeCocoa.h; sourceTree = "<group>"; };
</ins><span class="cx">                 311C08BC18E35D6800B65615 /* ControlStates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ControlStates.h; sourceTree = "<group>"; };
</span><span class="cx">                 31288E6E0E3005D6003619AE /* CSSKeyframeRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSKeyframeRule.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 31288E6F0E3005D6003619AE /* CSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSKeyframeRule.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -8402,6 +8410,10 @@
</span><span class="cx">                 3146FE6718442087001A937C /* OESTextureFloatLinear.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OESTextureFloatLinear.idl; sourceTree = "<group>"; };
</span><span class="cx">                 3146FE7018442367001A937C /* JSOESTextureFloatLinear.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESTextureFloatLinear.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 3146FE7118442367001A937C /* JSOESTextureFloatLinear.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESTextureFloatLinear.h; sourceTree = "<group>"; };
</span><ins>+                314BE3A01B30F6B700141982 /* CSSNamedImageValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CSSNamedImageValue.h; sourceTree = "<group>"; };
+                314BE3A21B30F6D100141982 /* CSSNamedImageValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CSSNamedImageValue.cpp; sourceTree = "<group>"; };
+                314BE3A41B3103FB00141982 /* NamedImageGeneratedImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NamedImageGeneratedImage.cpp; sourceTree = "<group>"; };
+                314BE3A51B3103FB00141982 /* NamedImageGeneratedImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedImageGeneratedImage.h; sourceTree = "<group>"; };
</ins><span class="cx">                 316023EF1532C40C00D50FF4 /* Dictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dictionary.h; sourceTree = "<group>"; };
</span><span class="cx">                 31611E540E1C4D4A00F6A579 /* WebKitCSSTransformValue.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitCSSTransformValue.idl; sourceTree = "<group>"; };
</span><span class="cx">                 31611E580E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitCSSTransformValue.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -18994,6 +19006,8 @@
</span><span class="cx">                                 5D5975B119635F1100D00878 /* SystemVersion.h */,
</span><span class="cx">                                 5D5975B219635F1100D00878 /* SystemVersion.mm */,
</span><span class="cx">                                 7CC564B918BAC720001B9652 /* TelephoneNumberDetectorCocoa.cpp */,
</span><ins>+                                310D71931B335C9D009C7B73 /* ThemeCocoa.cpp */,
+                                310D71941B335C9D009C7B73 /* ThemeCocoa.h */,
</ins><span class="cx">                                 46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */,
</span><span class="cx">                         );
</span><span class="cx">                         path = cocoa;
</span><span class="lines">@@ -20956,6 +20970,8 @@
</span><span class="cx">                                 079F5E4B0F3BEBEA005E0782 /* MediaPlayerPrivate.h */,
</span><span class="cx">                                 CD641EB11818F5ED00EE4C41 /* MediaSourcePrivate.h */,
</span><span class="cx">                                 CDDC1E7918A952F30027A9D4 /* MediaSourcePrivateClient.h */,
</span><ins>+                                314BE3A41B3103FB00141982 /* NamedImageGeneratedImage.cpp */,
+                                314BE3A51B3103FB00141982 /* NamedImageGeneratedImage.h */,
</ins><span class="cx">                                 6B3480920EEF50D400AC1B41 /* NativeImagePtr.h */,
</span><span class="cx">                                 B27535520B053814002CE64F /* Path.cpp */,
</span><span class="cx">                                 B27535530B053814002CE64F /* Path.h */,
</span><span class="lines">@@ -22496,6 +22512,8 @@
</span><span class="cx">                                 A80E6CD20A1989CA007FB8C5 /* CSSMediaRule.cpp */,
</span><span class="cx">                                 A80E6CD90A1989CA007FB8C5 /* CSSMediaRule.h */,
</span><span class="cx">                                 85C56CA20AA89C1000D95755 /* CSSMediaRule.idl */,
</span><ins>+                                314BE3A01B30F6B700141982 /* CSSNamedImageValue.h */,
+                                314BE3A21B30F6D100141982 /* CSSNamedImageValue.cpp */,
</ins><span class="cx">                                 F98FFF4211A2676200F548E8 /* CSSOMUtils.cpp */,
</span><span class="cx">                                 F98FFF4311A2676200F548E8 /* CSSOMUtils.h */,
</span><span class="cx">                                 A80E6CCB0A1989CA007FB8C5 /* CSSPageRule.cpp */,
</span><span class="lines">@@ -24123,6 +24141,7 @@
</span><span class="cx">                                 E1BD331C182D8EE900C05D9F /* CryptoAlgorithmRsaSsaParams.h in Headers */,
</span><span class="cx">                                 E125F82C1822CFEC00D84CD9 /* CryptoAlgorithmSHA1.h in Headers */,
</span><span class="cx">                                 E19AC3EF1824DC7900349426 /* CryptoAlgorithmSHA224.h in Headers */,
</span><ins>+                                314BE3A11B30F6B700141982 /* CSSNamedImageValue.h in Headers */,
</ins><span class="cx">                                 E19AC3F11824DC7900349426 /* CryptoAlgorithmSHA256.h in Headers */,
</span><span class="cx">                                 E19AC3F31824DC7900349426 /* CryptoAlgorithmSHA384.h in Headers */,
</span><span class="cx">                                 E19AC3F51824DC7900349426 /* CryptoAlgorithmSHA512.h in Headers */,
</span><span class="lines">@@ -25360,6 +25379,7 @@
</span><span class="cx">                                 E446143A0CD689C800FADA75 /* JSHTMLMediaElement.h in Headers */,
</span><span class="cx">                                 1AE2AE5C0A1D26F200B42B25 /* JSHTMLMenuElement.h in Headers */,
</span><span class="cx">                                 A80E7A180A19C3D6007FB8C5 /* JSHTMLMetaElement.h in Headers */,
</span><ins>+                                314BE3A71B3103FB00141982 /* NamedImageGeneratedImage.h in Headers */,
</ins><span class="cx">                                 A7BBE26711AFB3F20005EA03 /* JSHTMLMeterElement.h in Headers */,
</span><span class="cx">                                 1AE2AB2A0A1CE63B00B42B25 /* JSHTMLModElement.h in Headers */,
</span><span class="cx">                                 BC305C7A0C076BB300CD20F0 /* JSHTMLObjectElement.h in Headers */,
</span><span class="lines">@@ -26774,6 +26794,7 @@
</span><span class="cx">                                 B25599A40D00D8BA00BB825C /* SVGImage.h in Headers */,
</span><span class="cx">                                 08F859D51463F9CD0067D933 /* SVGImageCache.h in Headers */,
</span><span class="cx">                                 B2227A2D0D00BF220071B782 /* SVGImageElement.h in Headers */,
</span><ins>+                                310D71961B335C9E009C7B73 /* ThemeCocoa.h in Headers */,
</ins><span class="cx">                                 08F859D51463F9CD0067D934 /* SVGImageForContainer.h in Headers */,
</span><span class="cx">                                 B28C6A2A0D00C44800334AA4 /* SVGImageLoader.h in Headers */,
</span><span class="cx">                                 0854B01F1255E4E600B9CDD0 /* SVGInlineFlowBox.h in Headers */,
</span><span class="lines">@@ -28475,6 +28496,7 @@
</span><span class="cx">                                 A81369CD097374F600D74463 /* HTMLInputElement.cpp in Sources */,
</span><span class="cx">                                 93309DE5099E64920056E581 /* HTMLInterchange.cpp in Sources */,
</span><span class="cx">                                 A81369E5097374F600D74463 /* HTMLKeygenElement.cpp in Sources */,
</span><ins>+                                314BE3A61B3103FB00141982 /* NamedImageGeneratedImage.cpp in Sources */,
</ins><span class="cx">                                 A81369E3097374F600D74463 /* HTMLLabelElement.cpp in Sources */,
</span><span class="cx">                                 A81369E1097374F600D74463 /* HTMLLegendElement.cpp in Sources */,
</span><span class="cx">                                 A8EA79FC0A1916DF00A8EF5F /* HTMLLIElement.cpp in Sources */,
</span><span class="lines">@@ -28517,6 +28539,7 @@
</span><span class="cx">                                 978AD67414130A8D00C7CAE3 /* HTMLSpanElement.cpp in Sources */,
</span><span class="cx">                                 536D5A21193E18EE00CE4CAB /* HTMLSrcsetParser.cpp in Sources */,
</span><span class="cx">                                 A871DC260A15205700B12A68 /* HTMLStyleElement.cpp in Sources */,
</span><ins>+                                310D71951B335C9D009C7B73 /* ThemeCocoa.cpp in Sources */,
</ins><span class="cx">                                 D3D4E972130C7CFE007BA540 /* HTMLSummaryElement.cpp in Sources */,
</span><span class="cx">                                 A871DB320A150BD600B12A68 /* HTMLTableCaptionElement.cpp in Sources */,
</span><span class="cx">                                 A871DB2E0A150BD600B12A68 /* HTMLTableCellElement.cpp in Sources */,
</span><span class="lines">@@ -29897,6 +29920,7 @@
</span><span class="cx">                                 BCEC01BD0C274DAC009F4EC9 /* Screen.cpp in Sources */,
</span><span class="cx">                                 A84D82C211D3474800972990 /* ScriptableDocumentParser.cpp in Sources */,
</span><span class="cx">                                 41F1D2200EF35C2A00DA8753 /* ScriptCachedFrameData.cpp in Sources */,
</span><ins>+                                314BE3A31B30F6D100141982 /* CSSNamedImageValue.cpp in Sources */,
</ins><span class="cx">                                 93B70D6F09EB0C7C009D8468 /* ScriptController.cpp in Sources */,
</span><span class="cx">                                 A83E1C740E49042C00140B9C /* ScriptControllerMac.mm in Sources */,
</span><span class="cx">                                 4998AED113FB224D0090B1AA /* ScriptedAnimationController.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSAllInOne.cpp (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSAllInOne.cpp        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/css/CSSAllInOne.cpp        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> #include "CSSInitialValue.cpp"
</span><span class="cx"> #include "CSSLineBoxContainValue.cpp"
</span><span class="cx"> #include "CSSMediaRule.cpp"
</span><ins>+#include "CSSNamedImageValue.cpp"
</ins><span class="cx"> #include "CSSOMUtils.cpp"
</span><span class="cx"> #include "CSSPageRule.cpp"
</span><span class="cx"> #include "CSSParser.cpp"
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageGeneratorValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "CSSFilterImageValue.h"
</span><span class="cx"> #include "CSSGradientValue.h"
</span><span class="cx"> #include "CSSImageValue.h"
</span><ins>+#include "CSSNamedImageValue.h"
</ins><span class="cx"> #include "GeneratedImage.h"
</span><span class="cx"> #include "RenderElement.h"
</span><span class="cx"> #include "StyleCachedImage.h"
</span><span class="lines">@@ -110,6 +111,8 @@
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case CanvasClass:
</span><span class="cx"> return downcast<CSSCanvasValue>(*this).image(renderer, size);
</span><ins>+ case NamedImageClass:
+ return downcast<CSSNamedImageValue>(*this).image(renderer, size);
</ins><span class="cx"> case CrossfadeClass:
</span><span class="cx"> return downcast<CSSCrossfadeValue>(*this).image(renderer, size);
</span><span class="cx"> case FilterImageClass:
</span><span class="lines">@@ -129,6 +132,8 @@
</span><span class="cx"> switch (classType()) {
</span><span class="cx"> case CanvasClass:
</span><span class="cx"> return downcast<CSSCanvasValue>(*this).isFixedSize();
</span><ins>+ case NamedImageClass:
+ return downcast<CSSNamedImageValue>(*this).isFixedSize();
</ins><span class="cx"> case CrossfadeClass:
</span><span class="cx"> return downcast<CSSCrossfadeValue>(*this).isFixedSize();
</span><span class="cx"> case FilterImageClass:
</span><span class="lines">@@ -169,6 +174,8 @@
</span><span class="cx"> return downcast<CSSCrossfadeValue>(*this).isPending();
</span><span class="cx"> case CanvasClass:
</span><span class="cx"> return downcast<CSSCanvasValue>(*this).isPending();
</span><ins>+ case NamedImageClass:
+ return downcast<CSSNamedImageValue>(*this).isPending();
</ins><span class="cx"> case FilterImageClass:
</span><span class="cx"> return downcast<CSSFilterImageValue>(*this).isPending();
</span><span class="cx"> case LinearGradientClass:
</span><span class="lines">@@ -188,6 +195,8 @@
</span><span class="cx"> return downcast<CSSCrossfadeValue>(*this).knownToBeOpaque(renderer);
</span><span class="cx"> case CanvasClass:
</span><span class="cx"> return false;
</span><ins>+ case NamedImageClass:
+ return false;
</ins><span class="cx"> case FilterImageClass:
</span><span class="cx"> return downcast<CSSFilterImageValue>(*this).knownToBeOpaque(renderer);
</span><span class="cx"> case LinearGradientClass:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSNamedImageValuecppfromrev185729trunkSourceWebCoreplatformiosThemeIOSh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/css/CSSNamedImageValue.cpp (from rev 185729, trunk/Source/WebCore/platform/ios/ThemeIOS.h) (0 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSNamedImageValue.cpp         (rev 0)
+++ trunk/Source/WebCore/css/CSSNamedImageValue.cpp        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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 "CSSNamedImageValue.h"
+
+#include "ImageBuffer.h"
+#include "NamedImageGeneratedImage.h"
+
+namespace WebCore {
+
+String CSSNamedImageValue::customCSSText() const
+{
+ return makeString("-webkit-named-image(", m_name, ')');
+}
+
+PassRefPtr<Image> CSSNamedImageValue::image(RenderElement*, const FloatSize& size)
+{
+ if (size.isEmpty())
+ return nullptr;
+
+ m_generatedImage = NamedImageGeneratedImage::create(m_name, size);
+
+ return m_generatedImage.release();
+}
+
+bool CSSNamedImageValue::equals(const CSSNamedImageValue& other) const
+{
+ return m_name == other.m_name;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSNamedImageValuehfromrev185729trunkSourceWebCoreplatformiosThemeIOSh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/css/CSSNamedImageValue.h (from rev 185729, trunk/Source/WebCore/platform/ios/ThemeIOS.h) (0 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSNamedImageValue.h         (rev 0)
+++ trunk/Source/WebCore/css/CSSNamedImageValue.h        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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 CSSNamedImageValue_h
+#define CSSNamedImageValue_h
+
+#include "CSSImageGeneratorValue.h"
+
+#include "Image.h"
+
+namespace WebCore {
+
+class Document;
+
+class CSSNamedImageValue : public CSSImageGeneratorValue {
+public:
+ static Ref<CSSNamedImageValue> create(const String& name)
+ {
+ return adoptRef(*new CSSNamedImageValue(name));
+ }
+
+ String customCSSText() const;
+
+ bool isFixedSize() const { return false; }
+ bool isPending() const { return false; }
+
+ PassRefPtr<Image> image(RenderElement*, const FloatSize&);
+
+ bool equals(const CSSNamedImageValue&) const;
+
+private:
+ explicit CSSNamedImageValue(const String& name)
+ : CSSImageGeneratorValue(NamedImageClass)
+ , m_name(name)
+ {
+ }
+
+ String m_name;
+ RefPtr<Image> m_generatedImage;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSNamedImageValue, isNamedImageValue())
+
+#endif // CSSNamedImageValue_h
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> #include "CSSKeyframesRule.h"
</span><span class="cx"> #include "CSSLineBoxContainValue.h"
</span><span class="cx"> #include "CSSMediaRule.h"
</span><ins>+#include "CSSNamedImageValue.h"
</ins><span class="cx"> #include "CSSPageRule.h"
</span><span class="cx"> #include "CSSPrimitiveValue.h"
</span><span class="cx"> #include "CSSPrimitiveValueMappings.h"
</span><span class="lines">@@ -9152,7 +9153,8 @@
</span><span class="cx"> || equalIgnoringCase(value.function->name, "repeating-radial-gradient(")
</span><span class="cx"> || equalIgnoringCase(value.function->name, "-webkit-canvas(")
</span><span class="cx"> || equalIgnoringCase(value.function->name, "-webkit-cross-fade(")
</span><del>- || equalIgnoringCase(value.function->name, "-webkit-filter(");
</del><ins>+ || equalIgnoringCase(value.function->name, "-webkit-filter(")
+ || equalIgnoringCase(value.function->name, "-webkit-named-image(");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSParser::parseGeneratedImage(CSSParserValueList& valueList, RefPtr<CSSValue>& value)
</span><span class="lines">@@ -9198,6 +9200,9 @@
</span><span class="cx"> if (equalIgnoringCase(parserValue.function->name, "-webkit-filter("))
</span><span class="cx"> return parseFilterImage(valueList, value);
</span><span class="cx">
</span><ins>+ if (equalIgnoringCase(parserValue.function->name, "-webkit-named-image("))
+ return parseNamedImage(valueList, value);
+
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -9310,6 +9315,21 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool CSSParser::parseNamedImage(CSSParserValueList& valueList, RefPtr<CSSValue>& namedImage)
+{
+ CSSParserValueList* args = valueList.current()->function->args.get();
+ if (!args || args->size() != 1)
+ return false;
+
+ // The only argument is the image name.
+ CSSParserValue* value = args->current();
+ if (!value || value->unit != CSSPrimitiveValue::CSS_IDENT)
+ return false;
+
+ namedImage = CSSNamedImageValue::create(value->string);
+ return true;
+}
+
</ins><span class="cx"> #if ENABLE(CSS_IMAGE_RESOLUTION)
</span><span class="cx"> PassRefPtr<CSSValue> CSSParser::parseImageResolution()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/css/CSSParser.h        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -290,6 +290,7 @@
</span><span class="cx">
</span><span class="cx"> // Image generators
</span><span class="cx"> bool parseCanvas(CSSParserValueList&, RefPtr<CSSValue>&);
</span><ins>+ bool parseNamedImage(CSSParserValueList&, RefPtr<CSSValue>&);
</ins><span class="cx">
</span><span class="cx"> bool parseDeprecatedGradient(CSSParserValueList&, RefPtr<CSSValue>&);
</span><span class="cx"> bool parseDeprecatedLinearGradient(CSSParserValueList&, RefPtr<CSSValue>&, CSSGradientRepeat repeating);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.cpp (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.cpp        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/css/CSSValue.cpp        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include "CSSInheritedValue.h"
</span><span class="cx"> #include "CSSInitialValue.h"
</span><span class="cx"> #include "CSSLineBoxContainValue.h"
</span><ins>+#include "CSSNamedImageValue.h"
</ins><span class="cx"> #include "CSSPrimitiveValue.h"
</span><span class="cx"> #include "CSSReflectValue.h"
</span><span class="cx"> #include "CSSShadowValue.h"
</span><span class="lines">@@ -168,6 +169,8 @@
</span><span class="cx"> return compareCSSValues<CSSBorderImageSliceValue>(*this, other);
</span><span class="cx"> case CanvasClass:
</span><span class="cx"> return compareCSSValues<CSSCanvasValue>(*this, other);
</span><ins>+ case NamedImageClass:
+ return compareCSSValues<CSSNamedImageValue>(*this, other);
</ins><span class="cx"> case CursorImageClass:
</span><span class="cx"> return compareCSSValues<CSSCursorImageValue>(*this, other);
</span><span class="cx"> case FilterImageClass:
</span><span class="lines">@@ -260,6 +263,8 @@
</span><span class="cx"> return downcast<CSSBorderImageSliceValue>(*this).customCSSText();
</span><span class="cx"> case CanvasClass:
</span><span class="cx"> return downcast<CSSCanvasValue>(*this).customCSSText();
</span><ins>+ case NamedImageClass:
+ return downcast<CSSNamedImageValue>(*this).customCSSText();
</ins><span class="cx"> case CursorImageClass:
</span><span class="cx"> return downcast<CSSCursorImageValue>(*this).customCSSText();
</span><span class="cx"> case FilterImageClass:
</span><span class="lines">@@ -352,6 +357,9 @@
</span><span class="cx"> case CanvasClass:
</span><span class="cx"> delete downcast<CSSCanvasValue>(this);
</span><span class="cx"> return;
</span><ins>+ case NamedImageClass:
+ delete downcast<CSSNamedImageValue>(this);
+ return;
</ins><span class="cx"> case CursorImageClass:
</span><span class="cx"> delete downcast<CSSCursorImageValue>(this);
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.h (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.h        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/css/CSSValue.h        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx"> bool isFontValue() const { return m_classType == FontClass; }
</span><span class="cx"> bool isImageGeneratorValue() const { return m_classType >= CanvasClass && m_classType <= RadialGradientClass; }
</span><span class="cx"> bool isGradientValue() const { return m_classType >= LinearGradientClass && m_classType <= RadialGradientClass; }
</span><ins>+ bool isNamedImageValue() const { return m_classType == NamedImageClass; }
</ins><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span><span class="cx"> bool isImageSetValue() const { return m_classType == ImageSetClass; }
</span><span class="cx"> #endif
</span><span class="lines">@@ -139,6 +140,7 @@
</span><span class="cx">
</span><span class="cx"> // Image generator classes.
</span><span class="cx"> CanvasClass,
</span><ins>+ NamedImageClass,
</ins><span class="cx"> CrossfadeClass,
</span><span class="cx"> FilterImageClass,
</span><span class="cx"> LinearGradientClass,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Theme.cpp (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Theme.cpp        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/platform/Theme.cpp        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "Theme.h"
</span><span class="cx">
</span><ins>+#include "GraphicsContext.h"
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> LengthBox Theme::controlBorder(ControlPart part, const FontCascade&, const LengthBox& zoomedBox, float) const
</span><span class="lines">@@ -55,4 +57,60 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void Theme::drawNamedImage(const String& name, GraphicsContext* context, const FloatRect& rect) const
+{
+ // We only handle one icon at the moment.
+ if (name != "wireless-playback")
+ return;
+
+ GraphicsContextStateSaver stateSaver(*context);
+ context->setFillColor(Color::black, ColorSpaceDeviceRGB);
+
+ // Draw a generic Wireless Playback icon.
+
+ context->scale(FloatSize(rect.size().width() / 100, rect.size().height() / 100));
+ context->translate(8, 1);
+
+ Path outline;
+ outline.moveTo(FloatPoint(59, 58.7));
+ outline.addBezierCurveTo(FloatPoint(58.1, 58.7), FloatPoint(57.2, 58.4), FloatPoint(56.4, 57.7));
+ outline.addLineTo(FloatPoint(42, 45.5));
+ outline.addLineTo(FloatPoint(27.6, 57.8));
+ outline.addBezierCurveTo(FloatPoint(25.9, 59.2), FloatPoint(23.4, 59), FloatPoint(22, 57.3));
+ outline.addBezierCurveTo(FloatPoint(20.6, 55.6), FloatPoint(20.8, 53.1), FloatPoint(22.5, 51.7));
+ outline.addLineTo(FloatPoint(39.5, 37.3));
+ outline.addBezierCurveTo(FloatPoint(41, 36), FloatPoint(43.2, 36), FloatPoint(44.7, 37.3));
+ outline.addLineTo(FloatPoint(61.7, 51.7));
+ outline.addBezierCurveTo(FloatPoint(63.4, 53.1), FloatPoint(63.6, 55.7), FloatPoint(62.2, 57.3));
+ outline.addBezierCurveTo(FloatPoint(61.3, 58.2), FloatPoint(60.1, 58.7), FloatPoint(59, 58.7));
+ outline.addLineTo(FloatPoint(59, 58.7));
+ outline.closeSubpath();
+
+ outline.moveTo(FloatPoint(42, 98));
+ outline.addBezierCurveTo(FloatPoint(39.8, 98), FloatPoint(38, 96.3), FloatPoint(38, 94.2));
+ outline.addLineTo(FloatPoint(38, 43.6));
+ outline.addBezierCurveTo(FloatPoint(38, 41.5), FloatPoint(39.8, 39.8), FloatPoint(42, 39.8));
+ outline.addBezierCurveTo(FloatPoint(44.2, 39.8), FloatPoint(46, 41.5), FloatPoint(46, 43.6));
+ outline.addLineTo(FloatPoint(46, 94.2));
+ outline.addBezierCurveTo(FloatPoint(46, 96.3), FloatPoint(44.2, 98), FloatPoint(42, 98));
+ outline.addLineTo(FloatPoint(42, 98));
+ outline.closeSubpath();
+
+ outline.moveTo(FloatPoint(83.6, 41.6));
+ outline.addBezierCurveTo(FloatPoint(83.6, 18.6), FloatPoint(65, 0), FloatPoint(42, 0));
+ outline.addBezierCurveTo(FloatPoint(19, 0), FloatPoint(0.4, 18.6), FloatPoint(0.4, 41.6));
+ outline.addBezierCurveTo(FloatPoint(0.4, 62.2), FloatPoint(15, 79.2), FloatPoint(35, 82.6));
+ outline.addLineTo(FloatPoint(35, 74.5));
+ outline.addBezierCurveTo(FloatPoint(20, 71.2), FloatPoint(8.4, 57.7), FloatPoint(8.4, 41.6));
+ outline.addBezierCurveTo(FloatPoint(8.4, 23.1), FloatPoint(23.5, 8), FloatPoint(42, 8));
+ outline.addBezierCurveTo(FloatPoint(60.5, 8), FloatPoint(75.5, 23.1), FloatPoint(75.5, 41.6));
+ outline.addBezierCurveTo(FloatPoint(75.6, 57.7), FloatPoint(64, 71.2), FloatPoint(49, 74.5));
+ outline.addLineTo(FloatPoint(49, 82.6));
+ outline.addBezierCurveTo(FloatPoint(69, 79.3), FloatPoint(83.6, 62.2), FloatPoint(83.6, 41.6));
+ outline.addLineTo(FloatPoint(83.6, 41.6));
+ outline.closeSubpath();
+
+ context->fillPath(outline);
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformThemeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Theme.h (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Theme.h        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/platform/Theme.h        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "Color.h"
</span><span class="cx"> #include "ControlStates.h"
</span><span class="cx"> #include "FontCascade.h"
</span><ins>+#include "GraphicsTypes.h"
</ins><span class="cx"> #include "IntRect.h"
</span><span class="cx"> #include "LengthBox.h"
</span><span class="cx"> #include "LengthSize.h"
</span><span class="lines">@@ -106,7 +107,9 @@
</span><span class="cx"> // The rect passed in is in zoomed coordinates, so the inflation should take that into account and make sure the inflation
</span><span class="cx"> // amount is also scaled by the zoomFactor.
</span><span class="cx"> virtual void inflateControlPaintRect(ControlPart, const ControlStates*, FloatRect& /*zoomedRect*/, float /*zoomFactor*/) const { }
</span><del>-
</del><ins>+
+ virtual void drawNamedImage(const String&, GraphicsContext*, const FloatRect&) const;
+
</ins><span class="cx"> // This method is called once, from RenderTheme::adjustDefaultStyleSheet(), to let each platform adjust
</span><span class="cx"> // the default CSS rules in html.css.
</span><span class="cx"> static String defaultStyleSheet();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaThemeCocoacpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/cocoa/ThemeCocoa.cpp (0 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/ThemeCocoa.cpp         (rev 0)
+++ trunk/Source/WebCore/platform/cocoa/ThemeCocoa.cpp        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -0,0 +1,90 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
+ */
+
+#import "config.h"
+#import "ThemeCocoa.h"
+
+#import "GraphicsContext.h"
+
+namespace WebCore {
+
+static void fitContextToBox(GraphicsContext* context, const FloatSize& srcImageSize, const FloatSize& dstSize)
+{
+ float srcRatio = srcImageSize.aspectRatio();
+ float dstRatio = dstSize.aspectRatio();
+
+ float scale;
+ float translationX = 0;
+ float translationY = 0;
+ if (srcRatio > dstRatio) {
+ scale = dstSize.width() / srcImageSize.width();
+ translationY = (dstSize.height() - scale * srcImageSize.height()) / 2;
+ } else {
+ scale = dstSize.height() / srcImageSize.height();
+ translationX = (dstSize.width() - scale * srcImageSize.width()) / 2;
+ }
+ context->translate(translationX, translationY);
+ context->scale(FloatSize(scale, scale));
+}
+
+void ThemeCocoa::drawNamedImage(const String& name, GraphicsContext* context, const FloatRect& rect) const
+{
+ // We only handle one icon at the moment.
+ if (name != "wireless-playback") {
+ Theme::drawNamedImage(name, context, rect);
+ return;
+ }
+
+ GraphicsContextStateSaver stateSaver(*context);
+ context->setFillColor(Color::black, ColorSpaceDeviceRGB);
+
+ FloatSize wirelessPlaybackSrcSize(32, 24.016);
+ fitContextToBox(context, wirelessPlaybackSrcSize, rect.size());
+
+ Path outline;
+ outline.moveTo(FloatPoint(24.066, 18));
+ outline.addLineTo(FloatPoint(22.111, 16));
+ outline.addLineTo(FloatPoint(30, 16));
+ outline.addLineTo(FloatPoint(30, 2));
+ outline.addLineTo(FloatPoint(2, 2));
+ outline.addLineTo(FloatPoint(2, 16));
+ outline.addLineTo(FloatPoint(9.908, 16));
+ outline.addLineTo(FloatPoint(7.953, 18));
+ outline.addLineTo(FloatPoint(0, 18));
+ outline.addLineTo(FloatPoint(0, 0));
+ outline.addLineTo(FloatPoint(32, 0));
+ outline.addLineTo(FloatPoint(32, 18));
+ outline.addLineTo(FloatPoint(24.066, 18));
+ outline.closeSubpath();
+ outline.moveTo(FloatPoint(26.917, 24.016));
+ outline.addLineTo(FloatPoint(5.040, 24.016));
+ outline.addLineTo(FloatPoint(15.978, 12.828));
+ outline.addLineTo(FloatPoint(26.917, 24.016));
+ outline.closeSubpath();
+
+ context->fillPath(outline);
+}
+
+}
</ins><span class="cx">Property changes on: trunk/Source/WebCore/platform/cocoa/ThemeCocoa.cpp
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebCoreplatformcocoaThemeCocoahfromrev185729trunkSourceWebCoreplatformiosThemeIOSh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/cocoa/ThemeCocoa.h (from rev 185729, trunk/Source/WebCore/platform/ios/ThemeIOS.h) (0 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/ThemeCocoa.h         (rev 0)
+++ trunk/Source/WebCore/platform/cocoa/ThemeCocoa.h        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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 ThemeCocoa_h
+#define ThemeCocoa_h
+
+#include "Theme.h"
+
+namespace WebCore {
+
+class ThemeCocoa : public Theme {
+public:
+ ThemeCocoa() { }
+ virtual ~ThemeCocoa() { }
+
+ virtual void drawNamedImage(const String&, GraphicsContext*, const FloatRect&) const override;
+};
+
+} // namespace WebCore
+
+#endif // ThemeCocoa_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsCrossfadeGeneratedImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -34,8 +34,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class CSSCrossfadeValue;
-
</del><span class="cx"> class CrossfadeGeneratedImage final : public GeneratedImage {
</span><span class="cx"> public:
</span><span class="cx"> static Ref<CrossfadeGeneratedImage> create(Image* fromImage, Image* toImage, float percentage, const FloatSize& crossfadeSize, const FloatSize& size)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.h (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ImageBuffer.h        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.h        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -149,6 +149,7 @@
</span><span class="cx"> friend class GraphicsContext;
</span><span class="cx"> friend class GeneratedImage;
</span><span class="cx"> friend class CrossfadeGeneratedImage;
</span><ins>+ friend class NamedImageGeneratedImage;
</ins><span class="cx"> friend class GradientImage;
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsNamedImageGeneratedImagecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp (0 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -0,0 +1,88 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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 "NamedImageGeneratedImage.h"
+
+#include "FloatRect.h"
+#include "GraphicsContext.h"
+#include "ImageBuffer.h"
+#include "Theme.h"
+
+namespace WebCore {
+
+NamedImageGeneratedImage::NamedImageGeneratedImage(String name, const FloatSize& size)
+ : m_name(name)
+{
+ setContainerSize(size);
+}
+
+void NamedImageGeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription)
+{
+#if USE(NEW_THEME)
+ GraphicsContextStateSaver stateSaver(*context);
+ context->setCompositeOperation(compositeOp, blendMode);
+ context->clip(dstRect);
+ context->translate(dstRect.x(), dstRect.y());
+ if (dstRect.size() != srcRect.size())
+ context->scale(FloatSize(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height()));
+ context->translate(-srcRect.x(), -srcRect.y());
+
+ platformTheme()->drawNamedImage(m_name, context, dstRect);
+#else
+ UNUSED_PARAM(context);
+ UNUSED_PARAM(dstRect);
+ UNUSED_PARAM(srcRect);
+ UNUSED_PARAM(compositeOp);
+ UNUSED_PARAM(blendMode);
+#endif
+}
+
+void NamedImageGeneratedImage::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode blendMode)
+{
+#if USE(NEW_THEME)
+// std::unique_ptr<ImageBuffer> imageBuffer = ImageBuffer::create(size(), 1, ColorSpaceDeviceRGB, context->isAcceleratedContext() ? Accelerated : Unaccelerated);
+ std::unique_ptr<ImageBuffer> imageBuffer = context->createCompatibleBuffer(size(), true);
+ if (!imageBuffer)
+ return;
+
+ GraphicsContext* graphicsContext = imageBuffer->context();
+ platformTheme()->drawNamedImage(m_name, graphicsContext, FloatRect(0, 0, size().width(), size().height()));
+
+ // Tile the image buffer into the context.
+ imageBuffer->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, compositeOp, dstRect, blendMode);
+#else
+ UNUSED_PARAM(context);
+ UNUSED_PARAM(srcRect);
+ UNUSED_PARAM(patternTransform);
+ UNUSED_PARAM(phase);
+ UNUSED_PARAM(styleColorSpace);
+ UNUSED_PARAM(dstRect);
+ UNUSED_PARAM(compositeOp);
+ UNUSED_PARAM(blendMode);
+#endif
+}
+
+}
</ins><span class="cx">Property changes on: trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebCoreplatformgraphicsNamedImageGeneratedImagehfromrev185729trunkSourceWebCoreplatformgraphicsCrossfadeGeneratedImageh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.h (from rev 185729, trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h) (0 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.h         (rev 0)
+++ trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.h        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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 NamedImageGeneratedImage_h
+#define NamedImageGeneratedImage_h
+
+#include "FloatSize.h"
+#include "GeneratedImage.h"
+#include "Image.h"
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class NamedImageGeneratedImage final : public GeneratedImage {
+public:
+ static Ref<NamedImageGeneratedImage> create(String name, const FloatSize& size)
+ {
+ return adoptRef(*new NamedImageGeneratedImage(name, size));
+ }
+
+protected:
+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, ImageOrientationDescription) override;
+ virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& dstRect, BlendMode) override;
+
+ NamedImageGeneratedImage(String name, const FloatSize&);
+
+private:
+ String m_name;
+};
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformiosThemeIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/ThemeIOS.h (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/ThemeIOS.h        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/platform/ios/ThemeIOS.h        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -26,11 +26,11 @@
</span><span class="cx"> #ifndef ThemeIOS_h
</span><span class="cx"> #define ThemeIOS_h
</span><span class="cx">
</span><del>-#include "Theme.h"
</del><ins>+#include "ThemeCocoa.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class ThemeIOS : public Theme {
</del><ins>+class ThemeIOS : public ThemeCocoa {
</ins><span class="cx"> public:
</span><span class="cx"> ThemeIOS() { }
</span><span class="cx"> virtual ~ThemeIOS() { }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacThemeMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ThemeMac.h (185730 => 185731)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ThemeMac.h        2015-06-19 00:05:02 UTC (rev 185730)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.h        2015-06-19 01:13:37 UTC (rev 185731)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #ifndef ThemeMac_h
</span><span class="cx"> #define ThemeMac_h
</span><span class="cx">
</span><del>-#include "Theme.h"
</del><ins>+#include "ThemeCocoa.h"
</ins><span class="cx">
</span><span class="cx"> @interface NSFont(WebCoreTheme)
</span><span class="cx"> - (NSString*)webCoreFamilyName;
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class ThemeMac : public Theme {
</del><ins>+class ThemeMac : public ThemeCocoa {
</ins><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="cx"> ThemeMac() { }
</span></span></pre>
</div>
</div>
</body>
</html>