<!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>[198816] trunk/Websites/webkit.org</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/198816">198816</a></dd>
<dt>Author</dt> <dd>jond@apple.com</dd>
<dt>Date</dt> <dd>2016-03-29 17:40:28 -0700 (Tue, 29 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add WebKit Nightly Archives, WebKit Nightly Start, and Downloads pages
https://bugs.webkit.org/show_bug.cgi?id=155989

Reviewed by Timothy Hatcher.

* wp-content/plugins/sync-nightly-builds.php: Added.
* wp-content/themes/webkit/downloads.php: Added.
* wp-content/themes/webkit/functions.php:
* wp-content/themes/webkit/images/download.svg:
* wp-content/themes/webkit/images/spinner.svg: Added.
* wp-content/themes/webkit/nightly-archives.php: Added.
* wp-content/themes/webkit/nightly-start.php: Added.
* wp-content/themes/webkit/nightly.php:
* wp-content/themes/webkit/scripts/searchbuilds.js: Added.
(initsearch.xhrPromise.):
(initsearch):
(initsearch.displayResults.addEntry):
(initsearch.displayResults):
(initsearch.displayError):
(initsearch.clearErrors):
* wp-content/themes/webkit/style.css:
(input[type=text]):
(input[type=submit]):
(article .byline):
(article .abovetitle):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebsiteswebkitorgChangeLog">trunk/Websites/webkit.org/ChangeLog</a></li>
<li><a href="#trunkWebsiteswebkitorgwpcontentthemeswebkitfunctionsphp">trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php</a></li>
<li><a href="#trunkWebsiteswebkitorgwpcontentthemeswebkitimagesdownloadsvg">trunk/Websites/webkit.org/wp-content/themes/webkit/images/download.svg</a></li>
<li><a href="#trunkWebsiteswebkitorgwpcontentthemeswebkitnightlyphp">trunk/Websites/webkit.org/wp-content/themes/webkit/nightly.php</a></li>
<li><a href="#trunkWebsiteswebkitorgwpcontentthemeswebkitstylecss">trunk/Websites/webkit.org/wp-content/themes/webkit/style.css</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkWebsiteswebkitorgwpcontentpluginssyncnightlybuildsphp">trunk/Websites/webkit.org/wp-content/plugins/sync-nightly-builds.php</a></li>
<li><a href="#trunkWebsiteswebkitorgwpcontentthemeswebkitdownloadsphp">trunk/Websites/webkit.org/wp-content/themes/webkit/downloads.php</a></li>
<li><a href="#trunkWebsiteswebkitorgwpcontentthemeswebkitimagesspinnersvg">trunk/Websites/webkit.org/wp-content/themes/webkit/images/spinner.svg</a></li>
<li><a href="#trunkWebsiteswebkitorgwpcontentthemeswebkitnightlyarchivesphp">trunk/Websites/webkit.org/wp-content/themes/webkit/nightly-archives.php</a></li>
<li><a href="#trunkWebsiteswebkitorgwpcontentthemeswebkitnightlystartphp">trunk/Websites/webkit.org/wp-content/themes/webkit/nightly-start.php</a></li>
<li><a href="#trunkWebsiteswebkitorgwpcontentthemeswebkitscriptssearchbuildsjs">trunk/Websites/webkit.org/wp-content/themes/webkit/scripts/searchbuilds.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebsiteswebkitorgChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Websites/webkit.org/ChangeLog (198815 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/ChangeLog        2016-03-30 00:31:01 UTC (rev 198815)
+++ trunk/Websites/webkit.org/ChangeLog        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -1,5 +1,33 @@
</span><span class="cx"> 2016-03-29  Jon Davis  &lt;jond@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Add WebKit Nightly Archives, WebKit Nightly Start, and Downloads pages
+        https://bugs.webkit.org/show_bug.cgi?id=155989
+
+        Reviewed by Timothy Hatcher.
+
+        * wp-content/plugins/sync-nightly-builds.php: Added.
+        * wp-content/themes/webkit/downloads.php: Added.
+        * wp-content/themes/webkit/functions.php:
+        * wp-content/themes/webkit/images/download.svg:
+        * wp-content/themes/webkit/images/spinner.svg: Added.
+        * wp-content/themes/webkit/nightly-archives.php: Added.
+        * wp-content/themes/webkit/nightly-start.php: Added.
+        * wp-content/themes/webkit/nightly.php:
+        * wp-content/themes/webkit/scripts/searchbuilds.js: Added.
+        (initsearch.xhrPromise.):
+        (initsearch):
+        (initsearch.displayResults.addEntry):
+        (initsearch.displayResults):
+        (initsearch.displayError):
+        (initsearch.clearErrors):
+        * wp-content/themes/webkit/style.css:
+        (input[type=text]):
+        (input[type=submit]):
+        (article .byline):
+        (article .abovetitle):
+
+2016-03-29  Jon Davis  &lt;jond@apple.com&gt;
+
</ins><span class="cx">         Support images above the title on webkit.org posts
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=155979
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgwpcontentpluginssyncnightlybuildsphp"></a>
<div class="addfile"><h4>Added: trunk/Websites/webkit.org/wp-content/plugins/sync-nightly-builds.php (0 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/wp-content/plugins/sync-nightly-builds.php                                (rev 0)
+++ trunk/Websites/webkit.org/wp-content/plugins/sync-nightly-builds.php        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -0,0 +1,172 @@
</span><ins>+&lt;?php
+/*
+Plugin Name: Sync Nightly Builds
+Description: Updates WebKit nightly build information
+Version:     1.0
+Author:      Jonathan Davis
+Author URI:  http://webkit.org
+*/
+
+SyncWebKitNightlyBuilds::object();
+
+class SyncWebKitNightlyBuilds {
+
+    private static $object = null;
+
+    const MAX_SEARCH_RESULTS = 50;
+    const WEBKIT_NIGHTLY_ARCHIVE_URL = 'https://nightly.webkit.org/builds/trunk/%s/all';
+
+    private $archives = array(
+        'mac' =&gt; 'builds.csv',
+        'src' =&gt; 'source.csv'
+    );
+
+    private $uploads_dir = '';
+
+    public static function object() {
+        if (self::$object === null)
+            self::$object = new self();
+        return self::$object;
+    }
+
+    private function __construct() {
+        $upload_dir_info = wp_upload_dir();
+        $this-&gt;uploads_dir = trailingslashit($upload_dir_info['basedir']);
+
+        add_action('update_webkit_nightly_builds', function () {
+            foreach ($this-&gt;archives as $endpoint =&gt; $filename) {
+                // Download a copy of the archives
+                $url = sprintf(self::WEBKIT_NIGHTLY_ARCHIVE_URL, $endpoint);
+
+                if (!copy($url, $this-&gt;uploads_dir. $filename))  {
+                    error_log(&quot;Couldn't download the $filename archive index. ({$errors['type']}) {$errors['message']}&quot;);
+                }
+            }
+        });
+
+        register_activation_hook(__FILE__, function () {
+            if (!wp_next_scheduled('update_webkit_nightly_builds'))
+                wp_schedule_event(current_time('timestamp'), 'hourly', 'update_webkit_nightly_builds');
+
+            do_action('update_webkit_nightly_builds');
+        });
+
+
+        add_action('wp_ajax_search_nightly_builds', array($this, 'search'));
+
+    }
+
+    public function latest($archive = 'builds') {
+        $records = $this-&gt;records($archive);
+        return (array)$records[0];
+    }
+
+    public function records($archive, $entries = 25) {
+        if (!in_array(&quot;$archive.csv&quot;, $this-&gt;archives)) return array();
+
+        $filename = &quot;$archive.csv&quot;;
+        if (!file_exists($this-&gt;uploads_dir . '/' . $filename)) {
+            do_action('update_webkit_nightly_builds');
+            if (!file_exists($this-&gt;uploads_dir . '/' . $filename))
+                return array();
+        }
+
+        $records = array();
+        $resource = fopen($this-&gt;uploads_dir . '/' . $filename, 'r');
+
+        for ($i = 0; $i &lt; $entries; $i++) {
+            $line = fgets($resource, 128);
+            $line = trim($line);
+            if ( empty($line) ) break;
+            list($build, $timestamp, $download) = explode(',', $line);
+            $records[$i] = array($build, date(&quot;F j, Y g:i A&quot;, $timestamp) . &quot; GMT&quot;, $download);
+        }
+        fclose($resource);
+        return (array)$records;
+    }
+
+    public function search() {
+        // http://webkit.dev/wp/wp-admin/admin-ajax.php?action=search_nightly_builds&amp;search=194142
+        // http://webkit.dev/wp/wp-admin/admin-ajax.php?action=search_nightly_builds&amp;search=1941
+        // http://webkit.dev/wp/wp-admin/admin-ajax.php?action=search_nightly_builds&amp;search=193760-194142
+        // http://webkit.dev/wp/wp-admin/admin-ajax.php?action=search_nightly_builds&amp;search=193760
+
+        $maxresults = self::MAX_SEARCH_RESULTS;
+
+        // Clean up search query
+        $search = trim($_GET['query']);
+        $search = trim($search, '-');
+        $search = str_replace('r', '', $search);
+
+        if (empty($search)) {
+            echo json_encode('');
+            wp_die();
+        }
+
+        $records = $this-&gt;records('builds', 100000);
+
+        $results = array();
+        $matches = array();
+        $builds = array();
+        foreach ($records as $record)
+            $builds[] = $record[0];
+
+
+        $methods = array('prefixmatch', 'rangematch', 'nearmatch');
+
+        $matched = 0;
+        // Manual exact match for performance
+        $exactmatch = array_search($search, $builds);
+        if ($exactmatch !== false) {
+            $matches['exactmatch'][&quot;r&quot; . $records[$exactmatch][0]] = $records[$exactmatch];
+            $matched = 1;
+        } else {
+            foreach ($builds as $index =&gt; $build) {
+                foreach ($methods as $method) {
+                    if ($matched &gt;= $maxresults) break;
+                    if ($this-&gt;$method($search, $builds, $build, $index)) {
+                        $matches[$method][&quot;r$build&quot;] = $records[$index];
+                        $matched++;
+                    }
+                }
+            }
+        }
+
+        // Compile results
+        foreach ($matches as $group)
+            $results = array_merge($results, $group);
+
+        echo json_encode(array_values($results));
+
+        wp_die();
+    }
+
+    public function prefixmatch($search, &amp;$builds, $build) {
+        return substr($build, 0, strlen($search)) == $search;
+    }
+
+    public function rangematch($search, &amp;$builds, $build) {
+        if ( strpos($search, '-') === false ) return false;
+
+        $ranges = explode('-', $search);
+        $ranges = array_map('intval', $ranges);
+        sort($ranges);
+        list($start, $end) = $ranges;
+        $build = intval($build);
+
+        if ( $end &lt; 1 ) $end = PHP_INT_MAX;
+
+        return $build &gt;= $start &amp;&amp; $build &lt;= $end;
+    }
+
+    public function nearmatch($search, &amp;$builds, $build, $index) {
+        $target = intval($search);
+        if ($target &lt; 1) return false;
+
+        $newer = isset($builds[ $index - 1 ]) ? $builds[ $index - 1 ] : PHP_INT_MAX;
+        $older = isset($builds[ $index + 1 ]) ? $builds[ $index + 1 ] : 0;
+
+        return $target &gt; $older &amp;&amp; $target &lt; $newer;
+    }
+
+} // end class SyncWebKitNightlyBuilds
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgwpcontentthemeswebkitdownloadsphp"></a>
<div class="addfile"><h4>Added: trunk/Websites/webkit.org/wp-content/themes/webkit/downloads.php (0 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/wp-content/themes/webkit/downloads.php                                (rev 0)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/downloads.php        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -0,0 +1,104 @@
</span><ins>+&lt;?php
+/**
+ * Template Name: Downloads
+ **/
+
+add_filter('the_content', function ($content) {
+        
+    $build = get_nightly_build();
+    $source = get_nightly_source();
+    
+    if ( empty($build) || empty($source) )
+        return $content;
+    
+    $content = sprintf($content, $build[2], $source[2]);
+    
+    return $content;
+});
+
+add_filter('wp_head', function() { ?&gt;
+
+&lt;style&gt;
+.page.downloads h1 {
+    text-align: center;
+    margin-bottom: 0;
+}
+
+.page.downloads blockquote:first-child {
+    color: #8E8E93;
+    text-align: center;
+    font-size: 4rem;
+    line-height: 6rem;
+    font-weight: 200;
+}
+
+.bodycopy &gt; div {
+    box-sizing: border-box;
+    padding: 0 1.5rem 3rem;
+    width: 50%;
+    text-align: center;
+    float: left;
+}
+
+#preview {
+    float: none;
+    width: 100%;
+}
+
+#nightly {
+    float: none;
+    position: relative;
+    width: 100vw;
+    left: 50%;
+    transform: translate(-50%);
+    background: #333333;
+    padding-top: 3rem;
+    color: #ffffff;
+}
+
+.page.downloads h2 {
+    font-size: 3.2rem;
+}
+
+.downloads .download {
+    font-size: 3rem;
+}
+
+@media only screen and (max-width: 920px) {
+    .bodycopy &gt; div {
+        float: none;
+        width: 100%;
+    }
+}
+
+@media only screen and (min-device-width: 768px) and (max-device-width: 1366px) {
+    .bodycopy div p:nth-child(3) {
+        display: none;
+    }
+}
+
+@media only screen and (max-device-width: 736px) {
+    .bodycopy div p:nth-child(3) {
+        display: none;
+    }
+}
+&lt;/style&gt;
+&lt;?php
+});
+
+get_header();
+
+        if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
+
+        &lt;article class=&quot;page downloads&quot;&gt;
+            &lt;h1&gt;&lt;a href=&quot;&lt;?php echo get_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link: &lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;
+            
+            &lt;div class=&quot;bodycopy&quot;&gt;
+                &lt;?php the_content(''); ?&gt;
+            &lt;/div&gt;
+            
+        &lt;/article&gt;
+
+    &lt;?php endwhile; endif; ?&gt;
+
+&lt;?php get_footer(); ?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgwpcontentthemeswebkitfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php (198815 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php        2016-03-30 00:31:01 UTC (rev 198815)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -3,8 +3,6 @@
</span><span class="cx"> // Declare theme features
</span><span class="cx"> add_theme_support( 'post-thumbnails' );
</span><span class="cx"> 
</span><del>-function register_menus() {
-}
</del><span class="cx"> add_action( 'init', function () {
</span><span class="cx">     register_nav_menu('site-nav', __( 'Site Navigation' ));
</span><span class="cx">     register_nav_menu('footer-nav', __( 'Footer Navigation' ));
</span><span class="lines">@@ -22,6 +20,42 @@
</span><span class="cx">     return $profile_fields;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function get_nightly_build ($type = 'builds') {
+    if (!class_exists('SyncWebKitNightlyBuilds'))
+        return false;
+    
+    $WebKitBuilds = SyncWebKitNightlyBuilds::object();
+    $build = $WebKitBuilds-&gt;latest($type);
+    return $build;
+}
+
+function get_nightly_source () {
+    return get_nightly_build('source');
+}
+
+function get_nightly_archives ($limit) {
+    if (!class_exists('SyncWebKitNightlyBuilds'))
+        return array();
+    
+    $WebKitBuilds = SyncWebKitNightlyBuilds::object();
+    $builds = $WebKitBuilds-&gt;records('builds', $limit);
+    return (array)$builds;
+}
+
+function get_nightly_builds_json () {
+    if (!class_exists('SyncWebKitNightlyBuilds'))
+        return '';
+
+    $WebKitBuilds = SyncWebKitNightlyBuilds::object();
+    $records = $WebKitBuilds-&gt;records('builds', 100000);
+    $builds = array();
+    foreach ( $records as $build ) {
+        $builds[] = $build[0];
+    }
+    $json = json_encode($builds);
+    return empty($json) ? &quot;''&quot; : $json;
+}
+
</ins><span class="cx"> add_filter('user_contactmethods', function ($fields) {
</span><span class="cx">     // Add Twitter field to user profiles
</span><span class="cx">     $fields['twitter'] = 'Twitter Handle';
</span><span class="lines">@@ -45,6 +79,21 @@
</span><span class="cx">     ));
</span><span class="cx"> } );
</span><span class="cx"> 
</span><ins>+// Start Page internal rewrite handling
+add_action('after_setup_theme', function () {
+    add_rewrite_rule(
+        'nightly/start/([^/]+)/([0-9]+)/?$',
+        'index.php?pagename=nightly/start&amp;nightly_branch=$matches[1]&amp;nightly_build=$matches[2]',
+        'top'
+    );
+});
+
+add_filter('query_vars', function( $query_vars ) {
+    $query_vars[] = 'nightly_build';
+    $query_vars[] = 'nightly_branch';
+    return $query_vars;
+});
+
</ins><span class="cx"> add_filter('the_title', function( $title ) {
</span><span class="cx">     if ( is_admin() ) return $title;
</span><span class="cx">     $title = str_replace(&quot;: &quot;, &quot;:&lt;br&gt;&quot;, $title);
</span><span class="lines">@@ -74,8 +123,9 @@
</span><span class="cx"> 
</span><span class="cx"> add_action('the_post', function($post) {
</span><span class="cx">     global $pages;
</span><del>-    if (!is_single()) return;
</del><span class="cx"> 
</span><ins>+    if (!(is_single() || is_page())) return;
+
</ins><span class="cx">     $content = $post-&gt;post_content;
</span><span class="cx">     if (strpos($content, 'abovetitle') === false) return;
</span><span class="cx">     if (strpos($content, '&lt;img') !== 0) return;
</span><span class="lines">@@ -99,11 +149,6 @@
</span><span class="cx">     return $query;
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-include('widgets/post.php');
-include('widgets/icon.php');
-include('widgets/twitter.php');
-include('widgets/page.php');
-
</del><span class="cx"> add_filter( 'get_the_excerpt', function( $excerpt ) {
</span><span class="cx">     $sentences = preg_split( '/(\.|!|\?)\s/', $excerpt, 2, PREG_SPLIT_DELIM_CAPTURE );
</span><span class="cx"> 
</span><span class="lines">@@ -114,6 +159,11 @@
</span><span class="cx"> 
</span><span class="cx"> });
</span><span class="cx"> 
</span><ins>+include('widgets/post.php');
+include('widgets/icon.php');
+include('widgets/twitter.php');
+include('widgets/page.php');
+
</ins><span class="cx"> function table_of_contents() {
</span><span class="cx">     if ( class_exists('WebKitTableOfContents') )
</span><span class="cx">         WebKitTableOfContents::markup();
</span><span class="lines">@@ -164,6 +214,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function calculate_image_luminance($image_url) {
</span><ins>+    if (!function_exists('ImageCreateFromString'))
+        return 1;
+
</ins><span class="cx">     // Get original image dimensions
</span><span class="cx">     $size = getimagesize($image_url);
</span><span class="cx"> 
</span><span class="lines">@@ -228,8 +281,6 @@
</span><span class="cx">     return str_replace('href=', 'class=&quot;page-numbers prev-post&quot; href=', $format);
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-
-
</del><span class="cx"> // Queue global scripts
</span><span class="cx"> add_action( 'wp_enqueue_scripts', function () {
</span><span class="cx">     wp_register_script(
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgwpcontentthemeswebkitimagesdownloadsvg"></a>
<div class="modfile"><h4>Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/images/download.svg (198815 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/wp-content/themes/webkit/images/download.svg        2016-03-30 00:31:01 UTC (rev 198815)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/images/download.svg        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -1,8 +1,8 @@
</span><span class="cx"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
</span><span class="cx"> &lt;!-- Copyright © 2015 Apple Inc. All rights reserved. --&gt;
</span><span class="cx"> &lt;svg viewBox=&quot;0 0 47 47&quot; version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
</span><del>-    &lt;g id=&quot;Page-1&quot; stroke=&quot;none&quot; stroke-width=&quot;1&quot; fill=&quot;none&quot; fill-rule=&quot;evenodd&quot; &gt;
-        &lt;circle id=&quot;Oval-1&quot; stroke=&quot;white&quot; stroke-width=&quot;3&quot; cx=&quot;23.5&quot; cy=&quot;23.5&quot; r=&quot;21.5&quot;/&gt;
-        &lt;path d=&quot;M 21.9000244 31.9295486 L 11.9704758 22 L 10 23.9687873 L 23.3982222 37.368698 L 36.7930675 23.9687873 L 34.8225917 22 L 24.9000244 31.9255003 L 24.9000244 11.5 L 24.9000244 10 L 21.9000244 10 L 21.9000244 11.5 L 21.9000244 31.9295486 L 21.9000244 31.9295486 Z&quot; fill=&quot;white&quot;/&gt;
</del><ins>+    &lt;g stroke=&quot;none&quot; stroke-width=&quot;1&quot; fill=&quot;none&quot; fill-rule=&quot;evenodd&quot; &gt;
+        &lt;circle stroke=&quot;#0088cc&quot; stroke-width=&quot;3&quot; cx=&quot;23.5&quot; cy=&quot;23.5&quot; r=&quot;21.5&quot;/&gt;
+        &lt;path d=&quot;M 21.9000244 31.9295486 L 11.9704758 22 L 10 23.9687873 L 23.3982222 37.368698 L 36.7930675 23.9687873 L 34.8225917 22 L 24.9000244 31.9255003 L 24.9000244 11.5 L 24.9000244 10 L 21.9000244 10 L 21.9000244 11.5 L 21.9000244 31.9295486 L 21.9000244 31.9295486 Z&quot; fill=&quot;#0088cc&quot;/&gt;
</ins><span class="cx">     &lt;/g&gt;
</span><span class="cx"> &lt;/svg&gt;
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgwpcontentthemeswebkitimagesspinnersvg"></a>
<div class="addfile"><h4>Added: trunk/Websites/webkit.org/wp-content/themes/webkit/images/spinner.svg (0 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/wp-content/themes/webkit/images/spinner.svg                                (rev 0)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/images/spinner.svg        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 100 100&quot; id=&quot;search-spinner&quot;&gt;
+    &lt;!-- Copyright © 2015 Apple Inc. All rights reserved. --&gt;
+    &lt;rect x=&quot;0&quot; y=&quot;0&quot; width=&quot;100&quot; height=&quot;100&quot; fill=&quot;none&quot;&gt;&lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(0 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(30 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.08333333333333333s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(60 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.16666666666666666s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(90 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.25s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(120 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.3333333333333333s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(150 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.4166666666666667s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(180 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.5s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(210 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.5833333333333334s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(240 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.6666666666666666s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(270 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.75s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(300 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.8333333333333334s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+    &lt;rect x=&quot;46.5&quot; y=&quot;40&quot; width=&quot;7&quot; height=&quot;20&quot; rx=&quot;3.5&quot; ry=&quot;3.5&quot; fill=&quot;black&quot; transform=&quot;rotate(330 50 50) translate(0 -30)&quot;&gt;  
+        &lt;animate attributeName=&quot;opacity&quot; from=&quot;1&quot; to=&quot;0&quot; dur=&quot;1s&quot; begin=&quot;0.9166666666666666s&quot; repeatCount=&quot;indefinite&quot;/&gt;
+    &lt;/rect&gt;
+&lt;/svg&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgwpcontentthemeswebkitnightlyarchivesphp"></a>
<div class="addfile"><h4>Added: trunk/Websites/webkit.org/wp-content/themes/webkit/nightly-archives.php (0 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/wp-content/themes/webkit/nightly-archives.php                                (rev 0)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/nightly-archives.php        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -0,0 +1,159 @@
</span><ins>+&lt;?php
+/**
+ * Template Name: Nightly Archives
+ **/
+
+$first_build = 11994;
+$nightly_build = get_nightly_build();
+$latest_build = $nightly_build[0];
+
+add_action('wp_head', function() { ?&gt;
+    &lt;script type=&quot;text/javascript&quot;&gt;
+    var ajaxurl = '&lt;?php echo admin_url('admin-ajax.php'); ?&gt;';
+    &lt;/script&gt;
+&lt;?php
+});
+
+add_filter('the_content', function ($content) {
+
+    $archives = get_nightly_archives(60);
+
+    ob_start();
+    foreach ($archives as $record): ?&gt;
+&lt;li&gt;
+    &lt;a href=&quot;&lt;?php echo esc_url($record[2]); ?&gt;&quot;&gt;&lt;?php echo &quot;r&quot; . $record[0]; ?&gt;&lt;/a&gt; &lt;span class=&quot;date&quot;&gt;&lt;?php echo $record[1]; ?&gt;&lt;/span&gt;
+&lt;/li&gt;
+&lt;?php endforeach;
+    $list = ob_get_clean();
+
+    $content = &quot;&lt;div id=\&quot;search-errors\&quot;&gt;&lt;/div&gt;&lt;div id=\&quot;search-results\&quot; class=\&quot;multi-column\&quot;&gt;&lt;ul&gt;$list&lt;/ul&gt;&lt;/div&gt;&quot;;
+
+    return $content;
+});
+
+add_action( 'wp_enqueue_scripts', function() {
+    wp_enqueue_script( 'searchbuilds', get_template_directory_uri() . '/scripts/searchbuilds.js', array(), '1.0.0', true );
+});
+
+get_header();
+?&gt;
+&lt;style&gt;
+#archives h1 {
+    text-align: center;
+    margin-top: 3rem;
+}
+
+#archives h1 img {
+    margin-bottom: 1rem;
+}
+
+#downloads blockquote:first-child {
+    color: #8E8E93;
+    text-align: center;
+    font-size: 4rem;
+    line-height: 6rem;
+    font-weight: 200;
+}
+
+#downloads .bodycopy &gt; div {
+    box-sizing: border-box;
+    padding: 0 1.5rem 3rem;
+    width: 50%;
+    text-align: center;
+    float: left;
+}
+
+#downloads h2 {
+    font-size: 3.2rem;
+}
+
+li a {
+    display: block;
+    line-height: 2rem;
+}
+
+li span {
+    font-size: 1.6rem;
+    color: #8E8E93;
+}
+
+.multi-column {
+    -webkit-column-count:3;
+    -moz-column-count:3;
+    column-count:3;
+    -webkit-column-gap:3rem;
+    -moz-column-gap:3rem;
+    column-gap:3rem;
+    columns:3;
+}
+
+.bodycopy ul {
+    list-style: none;
+    margin: 0;
+    padding: 0;
+}
+
+.bodycopy ul &gt; li {
+    display: inline-block;
+    width: 100%;
+    margin-bottom: 3rem;
+}
+
+.bodycopy .search {
+    position: relative;
+    text-align: center;
+}
+
+.search {
+    position: relative;
+}
+
+.search input {
+    width: 60%;
+    position: relative;
+    left: 2.25rem;
+    padding-right: 4rem;
+}
+
+#search-spinner {
+    left: -2.25rem;
+    position: relative;
+    width: 3rem;
+    height: 3rem;
+    padding: 0.5rem;
+    visibility: hidden;
+}
+
+#search-spinner.searching {
+    visibility: visible;
+}
+
+&lt;/style&gt;
+
+    &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
+
+        &lt;article class=&quot;page&quot; id=&quot;archives&quot;&gt;
+
+            &lt;h1&gt;&lt;?php before_the_title(); ?&gt;&lt;a href=&quot;&lt;?php echo get_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link: &lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;
+
+            &lt;div class=&quot;bodycopy&quot;&gt;
+                &lt;?php if ($nightly_build &gt; 0): ?&gt;
+                &lt;div class=&quot;search&quot;&gt;
+                    &lt;input type=&quot;text&quot; placeholder=&quot;Search builds: &lt;?php echo esc_attr($first_build); ?&gt;-&lt;?php echo esc_attr($latest_build); ?&gt;&quot; class=&quot;buildsearch&quot;&gt;
+                    &lt;?php include('images/spinner.svg'); ?&gt;
+                &lt;/div&gt;
+                &lt;?php else: ?&gt;
+                &lt;div class=&quot;note&quot;&gt;&lt;h2&gt;Error&lt;/h2&gt; &lt;p&gt;There was an problem loading the build archive data.&lt;/p&gt;&lt;/div&gt;
+                &lt;?php endif; ?&gt;
+                &lt;?php the_content(); ?&gt;
+            &lt;/div&gt;
+
+        &lt;/article&gt;
+
+    &lt;?php endwhile; endif; ?&gt;
+
+&lt;script type=&quot;text/javascript&quot;&gt;
+    var builds = &lt;?php echo get_nightly_builds_json(); ?&gt;;
+&lt;/script&gt;
+
+&lt;?php get_footer(); ?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgwpcontentthemeswebkitnightlystartphp"></a>
<div class="addfile"><h4>Added: trunk/Websites/webkit.org/wp-content/themes/webkit/nightly-start.php (0 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/wp-content/themes/webkit/nightly-start.php                                (rev 0)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/nightly-start.php        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -0,0 +1,132 @@
</span><ins>+&lt;?php
+/**
+ * Template Name: Nightly Start Page
+ **/
+
+$latest_nightly_build = get_nightly_build();
+$latest = intval($latest_nightly_build[0]);
+
+$branch = get_query_var('nightly_branch');
+$build = intval(get_query_var('nightly_build'));
+
+if ($build &lt; 11976 || empty($branch))
+    header('Location: /not-found');
+
+get_header();
+
+
+add_filter('the_content', function ($content) {
+    $branch = get_query_var('nightly_branch');
+    $build = intval(get_query_var('nightly_build'));
+
+    $content = sprintf($content, &quot;r$build&quot;, $branch);
+    
+    if (empty($build))
+        $content = str_replace('Running build r0', '', $content);
+    
+    return $content;
+
+});
+?&gt;
+&lt;style&gt;
+body {
+    background: #333333;
+}
+
+#nightly {
+    margin: 6rem auto;
+    color: #ffffff;
+}
+
+#nightly h1 {
+    text-align: center;
+    margin-bottom: 0;
+    color: #ffffff;
+    font-weight: 100;
+    font-size: 9rem;
+    line-height: 9rem;
+    margin-top: 0;
+}
+
+#nightly h1 + blockquote {
+    color: #FEC84C;
+    text-align: center;
+    font-size: 3rem;
+    line-height: 4.2rem;
+    font-weight: 200;
+}
+
+#nightly img {
+    width: 33%;
+}
+
+#nightly .bodycopy &gt; p:nth-child(3) {
+    text-align: right;
+}
+
+#nightly blockquote:first-child p {
+    color: #FFD15E;
+}
+
+#nightly a {
+    color: #edd291;
+}
+
+#nightly a:hover {
+    color: #ffffff;
+}
+
+#nightly a.download {
+    color: #ffffff;
+    font-size: 3rem;
+}
+
+hr {
+    border-color: #777777;
+}
+
+#footer-nav a {
+    color: #999999;
+}
+
+.update-nag {
+    background-color: #FF9D00;
+    color: #000000;
+    width: 100vw;
+    left: 50%;
+    position: absolute;
+    transform: translate(-50vw);
+    padding: 1.5rem;
+    padding-top: 14.5rem;
+    top: 0;
+}
+
+.update-nag p {
+    text-align: center;
+    font-size: 2rem;
+}
+
+.update-nag + #nightly {
+    margin-top: 9rem;
+}
+
+&lt;/style&gt;
+&lt;?php if ( (int)$build &lt; (int)$latest ): ?&gt;
+&lt;div class=&quot;update-nag&quot;&gt;
+    &lt;p&gt;&lt;?php $prompt_meta = get_post_meta(get_the_ID(), 'prompt'); echo esc_html($prompt_meta[0]); ?&gt;&lt;/p&gt;
+&lt;/div&gt;
+&lt;?php endif; ?&gt;
+
+    &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
+
+        &lt;article class=&quot;page&quot; id=&quot;nightly&quot;&gt;
+            
+            &lt;div class=&quot;bodycopy&quot;&gt;
+                &lt;?php the_content(''); ?&gt;
+            &lt;/div&gt;
+            
+        &lt;/article&gt;
+
+    &lt;?php endwhile; endif; ?&gt;
+
+&lt;?php get_footer(); ?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgwpcontentthemeswebkitnightlyphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/nightly.php (198815 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/wp-content/themes/webkit/nightly.php        2016-03-30 00:31:01 UTC (rev 198815)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/nightly.php        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -3,41 +3,6 @@
</span><span class="cx">  * Template Name: Nightly Downloads
</span><span class="cx">  **/
</span><span class="cx"> 
</span><del>-define('WEBKIT_NIGHTLY_ARCHIVE_URL', &quot;http://nightly.webkit.org/builds/trunk/%s/all&quot;);
-
-function get_nightly_build() {
-    return get_nightly_download_details('mac');
-}
-
-function get_nightly_source() {
-    return get_nightly_download_details('src');
-}
-
-function get_nightly_download_details( $type = 'mac' ) {
-    $types = array('mac', 'src');
-    if ( ! in_array($type, $types) ) 
-        $type = $types[0];
-    
-    $cachekey = 'nightly_download_' . $type;
-    if ( false !== ( $cached = get_transient($cachekey) ) )
-        return json_decode($cached);
-        
-    $url = sprintf(WEBKIT_NIGHTLY_ARCHIVE_URL, $type);
-    $resource = fopen($url, 'r');
-    $rawdata = fread($resource, 128);
-    list($data,) = explode(&quot;\n&quot;, $rawdata);
-    fclose($resource);
-    
-    if ( ! empty($data) ) {
-        $record = explode(',', $data);
-        set_transient($cachekey, json_encode($record), HOUR_IN_SECONDS * 6); // Expire every 6 hours
-        return $record;
-        }
-    
-    return false;
-    
-}
-
</del><span class="cx"> add_filter('the_content', function ($content) {
</span><span class="cx">         
</span><span class="cx">     $build = get_nightly_build();
</span><span class="lines">@@ -100,10 +65,6 @@
</span><span class="cx">     font-weight: 200;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#nightly img {
-    width: 33%;
-}
-
</del><span class="cx"> #nightly blockquote:first-child p {
</span><span class="cx">     color: #FFD15E;
</span><span class="cx"> }
</span><span class="lines">@@ -124,6 +85,7 @@
</span><span class="cx"> .page-template-nightly hr {
</span><span class="cx">     border-color: #999;
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> .page-template-nightly #footer-nav a {
</span><span class="cx">     color: #999;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgwpcontentthemeswebkitscriptssearchbuildsjs"></a>
<div class="addfile"><h4>Added: trunk/Websites/webkit.org/wp-content/themes/webkit/scripts/searchbuilds.js (0 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/wp-content/themes/webkit/scripts/searchbuilds.js                                (rev 0)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/scripts/searchbuilds.js        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -0,0 +1,106 @@
</span><ins>+(function(document) {
+
+    var inputList = document.querySelectorAll('input.buildsearch'),
+        ui = document.getElementById('search-results'),
+        spinner = document.getElementById('search-spinner'),
+        errors = document.getElementById('search-errors'),
+        loaded = ui.lastChild.cloneNode(true),
+        inputs = [].slice.call(inputList);
+        
+    for (var i in inputs) {
+        var input = inputs[i];
+        initsearch(input);
+    }
+    
+    function initsearch(input) {
+        
+        var delayTimer = null;
+        
+        // input.addEventListener('focus', sendSearch);
+        input.addEventListener('keyup', function () {
+            if ( delayTimer != null )
+                clearTimeout(delayTimer);
+            delayTimer = setTimeout(sendSearch, 500);
+        });
+        
+        function xhrPromise(url) {
+            return new Promise(function(resolve, reject) {
+                var XHR = new XMLHttpRequest();
+                XHR.open('GET', url, true);
+                XHR.responseType = &quot;json&quot;;
+
+                XHR.onload = function() {
+                    if (XHR.status == 200 &amp;&amp; XHR.response) {
+                        resolve(XHR.response);
+                    } else reject({request: XHR, url:url});
+                };
+                XHR.onerror = function() {
+                    reject({request: XHR, url:url});
+                };
+                XHR.send();
+            });
+        }
+        
+        // Send the search query
+        function sendSearch (e) {
+            delayTimer = null;
+            clearErrors();
+            var query = input.value.toLowerCase();
+            if (query == '' || query.length &lt; 3)
+                return ui.replaceChild(loaded, ui.lastChild);
+
+            var endpoint = new URL(ajaxurl + &quot;?action=search_nightly_builds&amp;query=&quot; + query);
+            var searchResults = xhrPromise(endpoint);
+            spinner.classList.add('searching');
+            searchResults.then(displayResults).catch(displayError);            
+        }
+
+        function displayResults(results) {
+            var list = document.createElement('ul');
+            if ( results.length == 0 )
+                return displayError('There are no builds matching your search. Search by revision number, or a range of revision numbers: ######-######');
+            
+            for (var entry of results)
+                addEntry(entry[0], entry[1], entry[2]);
+            ui.replaceChild(list, ui.lastChild);
+            spinner.classList.remove('searching');
+            
+            function addEntry (build, datetime, download) {
+                var li = document.createElement('li'),
+                    link = document.createElement('a'),
+                date = document.createElement('span');
+
+                link.href = download;
+                link.innerText = &quot;r&quot; + build;
+
+                date.classList.add('date');
+                date.innerText = datetime;
+
+                li.appendChild(link);
+                li.appendChild(date);
+                list.appendChild(li);
+            }
+        }
+        
+        function displayError(message) {
+            var note = document.createElement('div');
+
+            if ( message === undefined ) 
+                message = 'A communication error occured preventing any results from being returned by the server.';
+
+            note.classList.add('note');
+            note.innerHTML = message;
+
+            errors.appendChild(note);
+
+            spinner.classList.remove('searching');
+        }
+        
+        function clearErrors() {
+            while (errors.firstChild)
+                errors.removeChild(errors.firstChild);
+        }
+        
+     }
+
+}(document));
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkWebsiteswebkitorgwpcontentthemeswebkitstylecss"></a>
<div class="modfile"><h4>Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/style.css (198815 => 198816)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/webkit.org/wp-content/themes/webkit/style.css        2016-03-30 00:31:01 UTC (rev 198815)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/style.css        2016-03-30 00:40:28 UTC (rev 198816)
</span><span class="lines">@@ -136,6 +136,42 @@
</span><span class="cx">     visibility: hidden;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+input[type=text] {
+    display: inline-block;
+    box-sizing: border-box;
+    vertical-align: top;
+    height: 4.2rem;
+    padding-top: 3px;
+    margin-bottom: 3rem;
+    padding-left: 1.5rem;
+    padding-right: 1.5rem;
+    color: #333333;
+    text-align: left;
+    border: 1px solid #d6d6d6;
+    border-radius: 4px;
+    background: white;
+    background-clip: padding-box;
+    font-family: &quot;Myriad Set Pro&quot;, &quot;Helvetica Neue&quot;, &quot;Helvetica&quot;, &quot;Arial&quot;, sans-serif;
+    line-height: 1.33333;
+    font-weight: 400;
+    letter-spacing: normal;
+    font-size: 2rem;
+}
+
+input[type=submit] {
+    background-color: #1d9bd9;
+    background: -webkit-linear-gradient(#3baee7, #0088cc);
+    background: linear-gradient(#3baee7, #0088cc);
+    border-radius: 4px;
+    color: white;
+    cursor: pointer;
+    font-size: 1.5rem;
+    font-weight: 500;
+    text-align: center;
+    border: 0;
+}
+
+
</ins><span class="cx"> .admin-bar a[name] {
</span><span class="cx">     top: calc(-32px - 3rem);
</span><span class="cx"> }
</span><span class="lines">@@ -1040,6 +1076,10 @@
</span><span class="cx">     transform: translate(-50vw, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+article .abovetitle {
+    margin-bottom: 0.8em;
+}
+
</ins><span class="cx"> article .pull-left {
</span><span class="cx">     float: left;
</span><span class="cx">     margin: 1.5rem 1.5rem 1.5rem -25%;
</span><span class="lines">@@ -1388,17 +1428,6 @@
</span><span class="cx">     padding-bottom: 3rem;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* Improves mouse accessibility of menus */
-/*header .menu &gt; .menu-item-has-children:hover &gt; a::before {
-    position: absolute;
-    content: '';
-    width: 100%;
-    height: 100%;
-    padding: 0rem 10rem 1rem 0;
-    top: 2rem;
-    right: -3rem;
-}
-*/
</del><span class="cx"> .sub-menu-layer {
</span><span class="cx">     text-align: center;
</span><span class="cx">     padding: 3rem;
</span><span class="lines">@@ -1704,7 +1733,6 @@
</span><span class="cx">         float: none;
</span><span class="cx">         text-align: center;
</span><span class="cx">         margin-bottom: 3rem;
</span><del>-        padding-right: 0;
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     article .byline p {
</span><span class="lines">@@ -1726,7 +1754,6 @@
</span><span class="cx">         float: none;
</span><span class="cx">         text-align: center;
</span><span class="cx">         margin-bottom: 3rem;
</span><del>-        padding-right: 0;
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     article .byline p {
</span></span></pre>
</div>
</div>

</body>
</html>