Changeset 235262 in webkit


Ignore:
Timestamp:
Aug 23, 2018 4:57:56 PM (6 years ago)
Author:
Ross Kirsling
Message:

EWS bubbles are being hidden due to lack of space.
https://bugs.webkit.org/show_bug.cgi?id=188607

Reviewed by Daniel Bates.

  • PrettyPatch/PrettyPatch.rb:
  • code-review.js:
  • js/status-bubble.js: Added.

Refactor Review Patch page so that the postMessage to resize EWS iframes may be used on other pages too.

  • template/en/default/attachment/edit.html.tmpl:
  • template/en/default/attachment/list.html.tmpl:

Resize EWS iframes via postMessage on bug page and attachment details page.

Location:
trunk/Websites/bugs.webkit.org
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Websites/bugs.webkit.org/ChangeLog

    r233109 r235262  
     12018-08-23  Ross Kirsling  <ross.kirsling@sony.com>
     2
     3        EWS bubbles are being hidden due to lack of space.
     4        https://bugs.webkit.org/show_bug.cgi?id=188607
     5
     6        Reviewed by Daniel Bates.
     7
     8        * PrettyPatch/PrettyPatch.rb:
     9        * code-review.js:
     10        * js/status-bubble.js: Added.
     11        Refactor Review Patch page so that the postMessage to resize EWS iframes may be used on other pages too.
     12       
     13        * template/en/default/attachment/edit.html.tmpl:
     14        * template/en/default/attachment/list.html.tmpl:
     15        Resize EWS iframes via postMessage on bug page and attachment details page.
     16
    1172018-06-22  Daniel Bates  <dabates@apple.com>
    218
  • trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb

    r232068 r235262  
    350350}
    351351
    352 #statusBubbleContainer.wrap {
     352.statusBubble.wrap {
    353353  display: block;
    354354}
     
    489489}
    490490
    491 .statusBubble {
     491.statusBubble > iframe {
    492492  /* The width/height get set to the bubble contents via postMessage on browsers that support it. */
    493493  width: 460px;
     
    525525</style>
    526526<script src="https://webkit.org/ajax/libs/jquery/jquery-1.4.2.min.js"></script>
     527<script src="js/status-bubble.js"></script>
    527528<script src="code-review.js?version=48"></script>
    528529</head>
  • trunk/Websites/bugs.webkit.org/code-review.js

    r187605 r235262  
    536536  }
    537537
    538   window.addEventListener('message', function(e) {
    539     if (e.origin != 'https://webkit-queues.webkit.org')
    540       return;
    541 
    542     if (e.data.height) {
    543       $('.statusBubble')[0].style.height = e.data.height;
    544       $('.statusBubble')[0].style.width = e.data.width;
    545     }
    546   }, false);
    547 
    548   function handleStatusBubbleLoad(e) {
    549     e.target.contentWindow.postMessage('containerMetrics', 'https://webkit-queues.webkit.org');
    550   }
     538  window.addEventListener('message', handleStatusBubbleMessage, false);
    551539
    552540  function fetchHistory() {
     
    579567      addFlagsForAttachment(details);
    580568
    581       statusBubble = document.createElement('iframe');
    582       statusBubble.className = 'statusBubble';
     569      var statusBubble = document.createElement('iframe');
    583570      statusBubble.src  = 'https://webkit-queues.webkit.org/status-bubble/' + attachment_id;
    584571      statusBubble.scrolling = 'no';
    585572      // Can't append the HTML because we need to set the onload handler before appending the iframe to the DOM.
    586       statusBubble.onload = handleStatusBubbleLoad;
    587       $('#statusBubbleContainer').append(statusBubble);
     573      statusBubble.onload = function () { handleStatusBubbleLoad(this); };
     574      $('.statusBubble').append(statusBubble);
    588575
    589576      $('#toolbar .bugLink').html('<a href="/show_bug.cgi?id=' + bug_id + '" target="_blank">Bug ' + bug_id + '</a>');
     
    10571044  function openOverallComments(e) {
    10581045    $('.overallComments textarea').addClass('open');
    1059     $('#statusBubbleContainer').addClass('wrap');
     1046    $('.statusBubble').addClass('wrap');
    10601047  }
    10611048
     
    10811068        '</div>' +
    10821069        '<div>' +
    1083           '<span id="statusBubbleContainer"></span>' +
     1070          '<span class="statusBubble"></span>' +
    10841071          '<span class="actions">' +
    10851072            '<span class="links"><span class="bugLink"></span></span>' +
  • trunk/Websites/bugs.webkit.org/template/en/default/attachment/edit.html.tmpl

    r214224 r235262  
    3434[% can_edit = attachment.validate_can_edit %]
    3535[% editable_or_hide = can_edit ? "" : " bz_hidden_option" %]
     36
     37<script src="[% 'js/status-bubble.js' FILTER mtime %]"></script>
     38<script>
     39  window.addEventListener('message', handleStatusBubbleMessage, false);
     40</script>
    3641
    3742<form method="post" action="attachment.cgi" onsubmit="normalizeComments();">
     
    261266        <div class="statusBubble">
    262267          <iframe src="https://webkit-queues.webkit.org/status-bubble/[% attachment.id %]"
    263                   style="width: 600px; height: 20px; border: none;" scrolling="no">
     268                  style="width: 600px; height: 20px; border: none;" scrolling="no" onload="handleStatusBubbleLoad(this)">
    264269          </iframe>
    265270        </div>
  • trunk/Websites/bugs.webkit.org/template/en/default/attachment/list.html.tmpl

    r214224 r235262  
    99[% RETURN UNLESS attachments.size || Param("maxattachmentsize") || Param("maxlocalattachment") %]
    1010
     11<script src="[% 'js/status-bubble.js' FILTER mtime %]"></script>
    1112<script type="text/javascript">
    1213<!--
     14window.addEventListener('message', handleStatusBubbleMessage, false);
     15
    1316function toggle_display(link) {
    1417    var table = document.getElementById("attachment_table");
     
    154157          <div class="statusBubble">
    155158            <iframe src="https://webkit-queues.webkit.org/status-bubble/[% attachment.id %]"
    156                     style="width: 600px; height: 20px; border: none;" scrolling="no">
     159                    style="width: 600px; height: 20px; border: none;" scrolling="no" onload="handleStatusBubbleLoad(this)">
    157160            </iframe>
    158161          </div>
Note: See TracChangeset for help on using the changeset viewer.