<!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>[172323] tags/Safari-600.1.4.8/Source/WebCore</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/172323">172323</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2014-08-07 18:37:50 -0700 (Thu, 07 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Revert the rollout of <a href="http://trac.webkit.org/projects/webkit/changeset/172244">r172244</a>. &lt;rdar://problem/17939895&gt;</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#tagsSafari600148SourceWebCoreChangeLog">tags/Safari-600.1.4.8/Source/WebCore/ChangeLog</a></li>
<li><a href="#tagsSafari600148SourceWebCoreWebCorexcodeprojprojectpbxproj">tags/Safari-600.1.4.8/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#tagsSafari600148SourceWebCoreplatformioswakWKGraphicsmm">tags/Safari-600.1.4.8/Source/WebCore/platform/ios/wak/WKGraphics.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#tagsSafari600148SourceWebCoreResourcesSpellingDot3xpng">tags/Safari-600.1.4.8/Source/WebCore/Resources/SpellingDot@3x.png</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="tagsSafari600148SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-600.1.4.8/Source/WebCore/ChangeLog (172322 => 172323)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-600.1.4.8/Source/WebCore/ChangeLog        2014-08-08 01:17:52 UTC (rev 172322)
+++ tags/Safari-600.1.4.8/Source/WebCore/ChangeLog        2014-08-08 01:37:50 UTC (rev 172323)
</span><span class="lines">@@ -1,5 +1,9 @@
</span><span class="cx"> 2014-08-07  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Revert the rollout of r172244. &lt;rdar://problem/17939895&gt;
+
+2014-08-07  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Revert the rollout of r172197. &lt;rdar://problem/17855327&gt;
</span><span class="cx"> 
</span><span class="cx"> 2014-08-07  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span></span></pre></div>
<a id="tagsSafari600148SourceWebCoreResourcesSpellingDot3xpngfromrev172318tagsSafari600148SourceWebCoreResourcesSpellingDot3xpng"></a>
<div class="copfile"><h4>Copied: tags/Safari-600.1.4.8/Source/WebCore/Resources/SpellingDot@3x.png (from rev 172318, tags/Safari-600.1.4.8/Source/WebCore/Resources/SpellingDot@3x.png) (0 => 172323)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-600.1.4.8/Source/WebCore/Resources/SpellingDot@3x.png                                (rev 0)
+++ tags/Safari-600.1.4.8/Source/WebCore/Resources/SpellingDot@3x.png        2014-08-08 01:37:50 UTC (rev 172323)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+\x89PNG
+
+ +IHDR         \xB8\xCDTtEXtSoftwareAdobe ImageReadyq\xC9e&lt;\xB0IDATx\xDAt\x91\xB1 +\x830E\xEF\xA4 \x92:\xA5;f\xF0a\x8AԑX6\xF0.\xA9\xD9\x92\xDB\xCB\xCFq\x8E\xED&quot;_\xFE\x96u\xFEe\xBA\xC3=\xECaG8\xC0\xBC\xD28R\xD6\xCD\xC2o\xF8IE\x9D\xF9\xBF\xFA)\xF5Č\xB0\xE8&quot;b\xB2\xC3\xF7\x88:/\xD6Ѐ\xF3\xF0W\xC8$3_\x8C\x96ŷ\xC0\xB6;\xBB\xC0\xE2\xC2*\xA0\x9B\xAB^\xC0\xBEE\v\xA5\xC4W0?A8\xB6\xC0q\xFD\xC0ұt%B \xA44\xD94\xEA)e\xCD6\xDAf\xAC\xAB\x8Dn\xF9\xFB*}\x9C\xAC:\xF2\xED%IEND\xAEB`\x82
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="tagsSafari600148SourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: tags/Safari-600.1.4.8/Source/WebCore/WebCore.xcodeproj/project.pbxproj (172322 => 172323)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-600.1.4.8/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-08-08 01:17:52 UTC (rev 172322)
+++ tags/Safari-600.1.4.8/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-08-08 01:37:50 UTC (rev 172323)
</span><span class="lines">@@ -933,6 +933,7 @@
</span><span class="cx">                 1C18DA59181AF6A500C4EF22 /* TextPainter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C18DA57181AF6A500C4EF22 /* TextPainter.h */; };
</span><span class="cx">                 1C21E57C183ED1FF001C289D /* IOSurfacePool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C21E57A183ED1FF001C289D /* IOSurfacePool.cpp */; };
</span><span class="cx">                 1C21E57D183ED1FF001C289D /* IOSurfacePool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C21E57B183ED1FF001C289D /* IOSurfacePool.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                1C2417BA1992C04100EF9938 /* SpellingDot@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C2417B91992C04100EF9938 /* SpellingDot@3x.png */; };
</ins><span class="cx">                 1C26497A0D7E248A00BD10F2 /* DocumentLoaderMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C2649790D7E248A00BD10F2 /* DocumentLoaderMac.cpp */; };
</span><span class="cx">                 1C26497C0D7E24EC00BD10F2 /* PageMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C26497B0D7E24EC00BD10F2 /* PageMac.cpp */; };
</span><span class="cx">                 1C4C8F020AD85D87009475CE /* DeleteButtonController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C4C8F000AD85D87009475CE /* DeleteButtonController.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -7904,6 +7905,7 @@
</span><span class="cx">                 1C18DA57181AF6A500C4EF22 /* TextPainter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextPainter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C21E57A183ED1FF001C289D /* IOSurfacePool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IOSurfacePool.cpp; path = ../cg/IOSurfacePool.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C21E57B183ED1FF001C289D /* IOSurfacePool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IOSurfacePool.h; path = ../cg/IOSurfacePool.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1C2417B91992C04100EF9938 /* SpellingDot@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = &quot;SpellingDot@3x.png&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1C2649790D7E248A00BD10F2 /* DocumentLoaderMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoaderMac.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C26497B0D7E24EC00BD10F2 /* PageMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageMac.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1C4C8EFF0AD85D87009475CE /* DeleteButtonController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeleteButtonController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="lines">@@ -16508,6 +16510,7 @@
</span><span class="cx">                 65998A650E5F5FD3004E097A /* images */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                1C2417B91992C04100EF9938 /* SpellingDot@3x.png */,
</ins><span class="cx">                                 D02B64B014089E56006EFA21 /* DictationPhraseWithAlternativesDot.png */,
</span><span class="cx">                                 D02B64B114089E56006EFA21 /* DictationPhraseWithAlternativesDot@2x.png */,
</span><span class="cx">                                 BE8C753010681324001E93F5 /* SpellingDot.png */,
</span><span class="lines">@@ -26862,6 +26865,7 @@
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="cx">                         files = (
</span><span class="cx">                                 46F9D5DD0B0D60170028EE36 /* aliasCursor.png in Resources */,
</span><ins>+                                1C2417BA1992C04100EF9938 /* SpellingDot@3x.png in Resources */,
</ins><span class="cx">                                 46D4F2490AF97E810035385A /* cellCursor.png in Resources */,
</span><span class="cx">                                 93153BDE141959F400FCF5BE /* deleteButton.png in Resources */,
</span><span class="cx">                                 93153BCD1417FBBF00FCF5BE /* deleteButton@2x.png in Resources */,
</span></span></pre></div>
<a id="tagsSafari600148SourceWebCoreplatformioswakWKGraphicsmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-600.1.4.8/Source/WebCore/platform/ios/wak/WKGraphics.mm (172322 => 172323)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-600.1.4.8/Source/WebCore/platform/ios/wak/WKGraphics.mm        2014-08-08 01:17:52 UTC (rev 172322)
+++ tags/Safari-600.1.4.8/Source/WebCore/platform/ios/wak/WKGraphics.mm        2014-08-08 01:37:50 UTC (rev 172323)
</span><span class="lines">@@ -91,9 +91,9 @@
</span><span class="cx">     return threadContext-&gt;currentCGContext;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static NSString *imageResourcePath(const char* imageFile, bool is2x)
</del><ins>+static NSString *imageResourcePath(const char* imageFile, unsigned scaleFactor)
</ins><span class="cx"> {
</span><del>-    NSString *fileName = is2x ? [NSString stringWithFormat:@&quot;%s@2x&quot;, imageFile] : [NSString stringWithUTF8String:imageFile];
</del><ins>+    NSString *fileName = scaleFactor == 1 ? [NSString stringWithUTF8String:imageFile] : [NSString stringWithFormat:@&quot;%s@%dx&quot;, imageFile, scaleFactor];
</ins><span class="cx"> #if PLATFORM(IOS_SIMULATOR)
</span><span class="cx">     NSBundle *bundle = [NSBundle bundleWithIdentifier:@&quot;com.apple.WebCore&quot;];
</span><span class="cx">     return [bundle pathForResource:fileName ofType:@&quot;png&quot;];
</span><span class="lines">@@ -104,23 +104,19 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CGImageRef WKGraphicsCreateImageFromBundleWithName (const char *image_file)
</del><ins>+CGImageRef WKGraphicsCreateImageFromBundleWithName(const char *image_file)
</ins><span class="cx"> {
</span><span class="cx">     if (!image_file)
</span><span class="cx">         return NULL;
</span><span class="cx"> 
</span><span class="cx">     CGImageRef image = nullptr;
</span><del>-    NSData *imageData = nil;
-
-    if (wkGetScreenScaleFactor() == 2) {
-        NSString* full2xPath = imageResourcePath(image_file, true);
-        imageData = [NSData dataWithContentsOfFile:full2xPath];
</del><ins>+    NSData *imageData = nullptr;
+    for (unsigned scaleFactor = wkGetScreenScaleFactor(); scaleFactor &gt; 0; --scaleFactor) {
+        imageData = [NSData dataWithContentsOfFile:imageResourcePath(image_file, scaleFactor)];
+        ASSERT(scaleFactor != wkGetScreenScaleFactor() || imageData);
+        if (imageData)
+            break;
</ins><span class="cx">     }
</span><del>-    if (!imageData) {
-        // We got here either because we didn't request hi-dpi or the @2x file doesn't exist.
-        NSString* full1xPath = imageResourcePath(image_file, false);
-        imageData = [NSData dataWithContentsOfFile:full1xPath];
-    }
</del><span class="cx">     
</span><span class="cx">     if (imageData) {
</span><span class="cx">         RetainPtr&lt;CGDataProviderRef&gt; dataProvider = adoptCF(CGDataProviderCreateWithCFData(reinterpret_cast&lt;CFDataRef&gt;(imageData)));
</span></span></pre>
</div>
</div>

</body>
</html>