[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

ojan at chromium.org ojan at chromium.org
Wed Dec 22 18:42:07 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 7cafde28c9a0342bce0b1714798151bee163ac2c
Author: ojan at chromium.org <ojan at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 16 00:02:50 2010 +0000

    2010-12-15  Ojan Vafai  <ojan at chromium.org>
    
            Reviewed by Adam Barth.
    
            size status bubble to it's contents on the code review page
            https://bugs.webkit.org/show_bug.cgi?id=51142
    
            * PrettyPatch/PrettyPatch.rb:
            * code-review.js:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74160 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/BugsSite/ChangeLog b/BugsSite/ChangeLog
index 778692b..75e4d49 100644
--- a/BugsSite/ChangeLog
+++ b/BugsSite/ChangeLog
@@ -2,6 +2,16 @@
 
         Reviewed by Adam Barth.
 
+        size status bubble to it's contents on the code review page
+        https://bugs.webkit.org/show_bug.cgi?id=51142
+
+        * PrettyPatch/PrettyPatch.rb:
+        * code-review.js:
+
+2010-12-15  Ojan Vafai  <ojan at chromium.org>
+
+        Reviewed by Adam Barth.
+
         fix goofups from r74142 and r74130
         https://bugs.webkit.org/show_bug.cgi?id=51146
 
diff --git a/BugsSite/PrettyPatch/PrettyPatch.rb b/BugsSite/PrettyPatch/PrettyPatch.rb
index fbd4a6c..1dd1681 100644
--- a/BugsSite/PrettyPatch/PrettyPatch.rb
+++ b/BugsSite/PrettyPatch/PrettyPatch.rb
@@ -349,16 +349,13 @@ body {
 }
 
 .statusBubble {
-  margin-top: 2px;
-  /* FIXME: Size the statusBubble via postMessage so it sizes to it's content. */
-  width: 300px;
-  height: 20px;
+  margin: 2px 2px 0 0;
   border: none;
   vertical-align: middle;
 }
 </style>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
-<script src="code-review.js?version=15"></script> 
+<script src="code-review.js?version=16"></script>
 EOF
 
     def self.revisionOrDescription(string)
diff --git a/BugsSite/code-review.js b/BugsSite/code-review.js
index 3d345bd..c887220 100644
--- a/BugsSite/code-review.js
+++ b/BugsSite/code-review.js
@@ -251,6 +251,18 @@
     });
   }
 
+  window.addEventListener('message', function(e) {
+    if (e.origin != 'https://webkit-commit-queue.appspot.com')
+      return;
+
+    $('.statusBubble')[0].style.height = e.data.height;
+    $('.statusBubble')[0].style.width = e.data.width;
+  });
+
+  function handleStatusBubbleLoad(e) {
+    e.target.contentWindow.postMessage('containerMetrics', 'https://webkit-commit-queue.appspot.com');
+  }
+
   function fetchHistory() {
     $.get('attachment.cgi?id=' + attachment_id + '&action=edit', function(data) {
       var bug_id = /Attachment \d+ Details for Bug (\d+)/.exec(data)[1];
@@ -268,7 +280,15 @@
 
       var details = $(data);
       addFlagsForAttachment(details);
-      $('#statusBubbleContainer').append($('<iframe style="margin-top:2px;" class="statusBubble" src="https://webkit-commit-queue.appspot.com/status-bubble/' + attachment_id + '" scrolling="no"></iframe>'));
+
+      var statusBubble = document.createElement('iframe');
+      statusBubble.className = 'statusBubble';
+      statusBubble.src  = 'https://webkit-commit-queue.appspot.com/status-bubble/' + attachment_id;
+      statusBubble.scrolling = 'no';
+      // Can't append the HTML because we need to set the onload handler before appending the iframe to the DOM.
+      statusBubble.onload = handleStatusBubbleLoad;
+      $('#statusBubbleContainer').append(statusBubble);
+
       $('#toolbar .bugLink').html('<a href="/show_bug.cgi?id=' + bug_id + '" target="_blank">Bug ' + bug_id + '</a>');
     });
   }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list