Changeset 74135 in webkit


Ignore:
Timestamp:
Dec 15, 2010 12:26:22 PM (13 years ago)
Author:
ojan@chromium.org
Message:

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:
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r74128 r74135  
     12010-12-15  Ojan Vafai  <ojan@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        have the statusbubble postMessage it's metrics so that embedders can properly size the iframe
     6        https://bugs.webkit.org/show_bug.cgi?id=51125
     7
     8        * QueueStatusServer/templates/statusbubble.html:
     9
    1102010-12-15  Darin Adler  <darin@apple.com>
    211
  • trunk/WebKitTools/QueueStatusServer/templates/statusbubble.html

    r70079 r74135  
    77    margin: 0px;
    88    padding: 0px;
     9}
     10#bubbleContainer {
     11    display:inline-block;
    912}
    1013.status {
     
    4851  top.location = "/patch/" + patch_id
    4952}
     53window.addEventListener("message", function(e) {
     54  if (e.data == 'containerMetrics') {
     55    e.source.postMessage({'width': bubbleContainer.offsetWidth, 'height': bubbleContainer.offsetHeight},
     56        e.origin);
     57  } else
     58    console.log("Unknown postMessage: " + e.data);
     59}, false);
    5060</script>
    5161</head>
    5262<body>
    53 {% for bubble in bubbles %}
    54 <div class="status {{ bubble.state }}"{% if bubble.status %}
    55     onclick="statusDetail({{ bubble.attachment_id }})"
    56     title="{{ bubble.status.date|timesince }} ago"{% endif %}>
    57   {{ bubble.name }}
    58   {% if bubble.queue_position %}
    59   <span class="queue_position">#{{ bubble.queue_position }}</span>
    60   {% endif %}
     63<div id="bubbleContainer">
     64  {% for bubble in bubbles %}
     65  <div class="status {{ bubble.state }}"{% if bubble.status %}
     66      onclick="statusDetail({{ bubble.attachment_id }})"
     67      title="{{ bubble.status.date|timesince }} ago"{% endif %}>
     68    {{ bubble.name }}
     69    {% if bubble.queue_position %}
     70    <span class="queue_position">#{{ bubble.queue_position }}</span>
     71    {% endif %}
     72  </div>
     73  {% endfor %}
    6174</div>
    62 {% endfor %}
    6375</body>
    6476</html>
Note: See TracChangeset for help on using the changeset viewer.