Changeset 235262 in webkit
- Timestamp:
- Aug 23, 2018 4:57:56 PM (6 years ago)
- Location:
- trunk/Websites/bugs.webkit.org
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Websites/bugs.webkit.org/ChangeLog
r233109 r235262 1 2018-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 1 17 2018-06-22 Daniel Bates <dabates@apple.com> 2 18 -
trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb
r232068 r235262 350 350 } 351 351 352 #statusBubbleContainer.wrap {352 .statusBubble.wrap { 353 353 display: block; 354 354 } … … 489 489 } 490 490 491 .statusBubble {491 .statusBubble > iframe { 492 492 /* The width/height get set to the bubble contents via postMessage on browsers that support it. */ 493 493 width: 460px; … … 525 525 </style> 526 526 <script src="https://webkit.org/ajax/libs/jquery/jquery-1.4.2.min.js"></script> 527 <script src="js/status-bubble.js"></script> 527 528 <script src="code-review.js?version=48"></script> 528 529 </head> -
trunk/Websites/bugs.webkit.org/code-review.js
r187605 r235262 536 536 } 537 537 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); 551 539 552 540 function fetchHistory() { … … 579 567 addFlagsForAttachment(details); 580 568 581 statusBubble = document.createElement('iframe'); 582 statusBubble.className = 'statusBubble'; 569 var statusBubble = document.createElement('iframe'); 583 570 statusBubble.src = 'https://webkit-queues.webkit.org/status-bubble/' + attachment_id; 584 571 statusBubble.scrolling = 'no'; 585 572 // 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); 588 575 589 576 $('#toolbar .bugLink').html('<a href="/show_bug.cgi?id=' + bug_id + '" target="_blank">Bug ' + bug_id + '</a>'); … … 1057 1044 function openOverallComments(e) { 1058 1045 $('.overallComments textarea').addClass('open'); 1059 $(' #statusBubbleContainer').addClass('wrap');1046 $('.statusBubble').addClass('wrap'); 1060 1047 } 1061 1048 … … 1081 1068 '</div>' + 1082 1069 '<div>' + 1083 '<span id="statusBubbleContainer"></span>' +1070 '<span class="statusBubble"></span>' + 1084 1071 '<span class="actions">' + 1085 1072 '<span class="links"><span class="bugLink"></span></span>' + -
trunk/Websites/bugs.webkit.org/template/en/default/attachment/edit.html.tmpl
r214224 r235262 34 34 [% can_edit = attachment.validate_can_edit %] 35 35 [% 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> 36 41 37 42 <form method="post" action="attachment.cgi" onsubmit="normalizeComments();"> … … 261 266 <div class="statusBubble"> 262 267 <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)"> 264 269 </iframe> 265 270 </div> -
trunk/Websites/bugs.webkit.org/template/en/default/attachment/list.html.tmpl
r214224 r235262 9 9 [% RETURN UNLESS attachments.size || Param("maxattachmentsize") || Param("maxlocalattachment") %] 10 10 11 <script src="[% 'js/status-bubble.js' FILTER mtime %]"></script> 11 12 <script type="text/javascript"> 12 13 <!-- 14 window.addEventListener('message', handleStatusBubbleMessage, false); 15 13 16 function toggle_display(link) { 14 17 var table = document.getElementById("attachment_table"); … … 154 157 <div class="statusBubble"> 155 158 <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)"> 157 160 </iframe> 158 161 </div>
Note: See TracChangeset
for help on using the changeset viewer.