+2010-12-15 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ have the statusbubble postMessage it's metrics so that embedders can properly size the iframe
+ https://bugs.webkit.org/show_bug.cgi?id=51125
+
+ * QueueStatusServer/templates/statusbubble.html:
+
2010-12-15 Darin Adler <darin@apple.com>
* Scripts/webkitpy/common/net/buildbot: Added property svn:ignore.
margin: 0px;
padding: 0px;
}
+#bubbleContainer {
+ display:inline-block;
+}
.status {
display: block;
float: left;
function statusDetail(patch_id) {
top.location = "/patch/" + patch_id
}
+window.addEventListener("message", function(e) {
+ if (e.data == 'containerMetrics') {
+ e.source.postMessage({'width': bubbleContainer.offsetWidth, 'height': bubbleContainer.offsetHeight},
+ e.origin);
+ } else
+ console.log("Unknown postMessage: " + e.data);
+}, false);
</script>
</head>
<body>
-{% for bubble in bubbles %}
-<div class="status {{ bubble.state }}"{% if bubble.status %}
- onclick="statusDetail({{ bubble.attachment_id }})"
- title="{{ bubble.status.date|timesince }} ago"{% endif %}>
- {{ bubble.name }}
- {% if bubble.queue_position %}
- <span class="queue_position">#{{ bubble.queue_position }}</span>
- {% endif %}
+<div id="bubbleContainer">
+ {% for bubble in bubbles %}
+ <div class="status {{ bubble.state }}"{% if bubble.status %}
+ onclick="statusDetail({{ bubble.attachment_id }})"
+ title="{{ bubble.status.date|timesince }} ago"{% endif %}>
+ {{ bubble.name }}
+ {% if bubble.queue_position %}
+ <span class="queue_position">#{{ bubble.queue_position }}</span>
+ {% endif %}
+ </div>
+ {% endfor %}
</div>
-{% endfor %}
</body>
</html>