WebKit Bugzilla
Attachment 347964 Details for
Bug 188607
: EWS bubbles are being hidden due to lack of space.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188607-20180823155617.patch (text/plain), 8.20 KB, created by
Ross Kirsling
on 2018-08-23 15:56:18 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ross Kirsling
Created:
2018-08-23 15:56:18 PDT
Size:
8.20 KB
patch
obsolete
>Subversion Revision: 235203 >diff --git a/Websites/bugs.webkit.org/ChangeLog b/Websites/bugs.webkit.org/ChangeLog >index 5aa77bc05c85121b9c5331147b9726edd5eb9dfb..c4b40882d1598f432b3003b910afd390c884d33c 100644 >--- a/Websites/bugs.webkit.org/ChangeLog >+++ b/Websites/bugs.webkit.org/ChangeLog >@@ -1,3 +1,19 @@ >+2018-08-23 Ross Kirsling <ross.kirsling@sony.com> >+ >+ 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. >+ > 2018-06-22 Daniel Bates <dabates@apple.com> > > EWS for security bugs >diff --git a/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb b/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb >index 382b4969d836cdea025e5909682af81e1ce05dfe..f503d11d6d2f982ab7dfd7efae0eb9fd0b244500 100644 >--- a/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb >+++ b/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb >@@ -349,7 +349,7 @@ pre, .text { > height: 4em; > } > >-#statusBubbleContainer.wrap { >+.statusBubble.wrap { > display: block; > } > >@@ -488,7 +488,7 @@ div:focus { > outline-offset: -1px; > } > >-.statusBubble { >+.statusBubble > iframe { > /* The width/height get set to the bubble contents via postMessage on browsers that support it. */ > width: 460px; > height: 20px; >@@ -524,6 +524,7 @@ div:focus { > } > </style> > <script src="https://webkit.org/ajax/libs/jquery/jquery-1.4.2.min.js"></script> >+<script src="js/status-bubble.js"></script> > <script src="code-review.js?version=48"></script> > </head> > EOF >diff --git a/Websites/bugs.webkit.org/code-review.js b/Websites/bugs.webkit.org/code-review.js >index 877b3b399cf14a838bd0861a53fb505d4ea332bb..51897f660e29cfc1b3ed8cda5b7f3edfb4427fe5 100644 >--- a/Websites/bugs.webkit.org/code-review.js >+++ b/Websites/bugs.webkit.org/code-review.js >@@ -535,19 +535,7 @@ var CODE_REVIEW_UNITTEST; > }); > } > >- window.addEventListener('message', function(e) { >- if (e.origin != 'https://webkit-queues.webkit.org') >- return; >- >- if (e.data.height) { >- $('.statusBubble')[0].style.height = e.data.height; >- $('.statusBubble')[0].style.width = e.data.width; >- } >- }, false); >- >- function handleStatusBubbleLoad(e) { >- e.target.contentWindow.postMessage('containerMetrics', 'https://webkit-queues.webkit.org'); >- } >+ window.addEventListener('message', handleStatusBubbleMessage, false); > > function fetchHistory() { > $.get('attachment.cgi?id=' + attachment_id + '&action=edit', function(data) { >@@ -578,13 +566,12 @@ var CODE_REVIEW_UNITTEST; > var details = $(data); > addFlagsForAttachment(details); > >- statusBubble = document.createElement('iframe'); >- statusBubble.className = 'statusBubble'; >+ var statusBubble = document.createElement('iframe'); > statusBubble.src = 'https://webkit-queues.webkit.org/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); >+ statusBubble.onload = function () { handleStatusBubbleLoad(this); }; >+ $('.statusBubble').append(statusBubble); > > $('#toolbar .bugLink').html('<a href="/show_bug.cgi?id=' + bug_id + '" target="_blank">Bug ' + bug_id + '</a>'); > }); >@@ -1056,7 +1043,7 @@ var CODE_REVIEW_UNITTEST; > > function openOverallComments(e) { > $('.overallComments textarea').addClass('open'); >- $('#statusBubbleContainer').addClass('wrap'); >+ $('.statusBubble').addClass('wrap'); > } > > var g_overallCommentsInputTimer; >@@ -1080,7 +1067,7 @@ var CODE_REVIEW_UNITTEST; > '<textarea placeholder="Overall comments"></textarea>' + > '</div>' + > '<div>' + >- '<span id="statusBubbleContainer"></span>' + >+ '<span class="statusBubble"></span>' + > '<span class="actions">' + > '<span class="links"><span class="bugLink"></span></span>' + > '<span id="flagContainer"></span>' + >diff --git a/Websites/bugs.webkit.org/js/status-bubble.js b/Websites/bugs.webkit.org/js/status-bubble.js >new file mode 100644 >index 0000000000000000000000000000000000000000..6bf383d3df7a097ed72f3316d7f466b973a9660d >--- /dev/null >+++ b/Websites/bugs.webkit.org/js/status-bubble.js >@@ -0,0 +1,24 @@ >+/* This Source Code Form is subject to the terms of the Mozilla Public >+ * License, v. 2.0. If a copy of the MPL was not distributed with this >+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. >+ * >+ * This Source Code Form is "Incompatible With Secondary Licenses", as >+ * defined by the Mozilla Public License, v. 2.0. >+ */ >+ >+function handleStatusBubbleMessage(event) { >+ if (event.origin !== 'https://webkit-queues.webkit.org' || !event.data.height) >+ return; >+ >+ for (const iframe of document.querySelectorAll('.statusBubble > iframe')) { >+ if (iframe.contentWindow !== event.source) >+ continue; >+ >+ iframe.style.height = event.data.height + 'px'; >+ iframe.style.width = event.data.width + 'px'; >+ } >+} >+ >+function handleStatusBubbleLoad(iframe) { >+ iframe.contentWindow.postMessage('containerMetrics', 'https://webkit-queues.webkit.org'); >+} >diff --git a/Websites/bugs.webkit.org/template/en/default/attachment/edit.html.tmpl b/Websites/bugs.webkit.org/template/en/default/attachment/edit.html.tmpl >index 51533acfbf20ff2e6085918e5c88f65cd2f72fe8..eca018abde3a324cd3a72165d6a19c29cf139c16 100644 >--- a/Websites/bugs.webkit.org/template/en/default/attachment/edit.html.tmpl >+++ b/Websites/bugs.webkit.org/template/en/default/attachment/edit.html.tmpl >@@ -34,6 +34,11 @@ > [% can_edit = attachment.validate_can_edit %] > [% editable_or_hide = can_edit ? "" : " bz_hidden_option" %] > >+<script src="[% 'js/status-bubble.js' FILTER mtime %]"></script> >+<script> >+ window.addEventListener('message', handleStatusBubbleMessage, false); >+</script> >+ > <form method="post" action="attachment.cgi" onsubmit="normalizeComments();"> > <input type="hidden" name="id" value="[% attachment.id %]"> > <input type="hidden" name="action" value="update"> >@@ -260,7 +265,7 @@ > > <div class="statusBubble"> > <iframe src="https://webkit-queues.webkit.org/status-bubble/[% attachment.id %]" >- style="width: 600px; height: 20px; border: none;" scrolling="no"> >+ style="width: 600px; height: 20px; border: none;" scrolling="no" onload="handleStatusBubbleLoad(this)"> > </iframe> > </div> > <br> >diff --git a/Websites/bugs.webkit.org/template/en/default/attachment/list.html.tmpl b/Websites/bugs.webkit.org/template/en/default/attachment/list.html.tmpl >index eadbd201e8d7570696fdc5646a0e64ea46b5061d..dc6c5d7667a1b44349bc85a24a969e638e0aa31d 100644 >--- a/Websites/bugs.webkit.org/template/en/default/attachment/list.html.tmpl >+++ b/Websites/bugs.webkit.org/template/en/default/attachment/list.html.tmpl >@@ -8,8 +8,11 @@ > > [% RETURN UNLESS attachments.size || Param("maxattachmentsize") || Param("maxlocalattachment") %] > >+<script src="[% 'js/status-bubble.js' FILTER mtime %]"></script> > <script type="text/javascript"> > <!-- >+window.addEventListener('message', handleStatusBubbleMessage, false); >+ > function toggle_display(link) { > var table = document.getElementById("attachment_table"); > var view_all = document.getElementById("view_all"); >@@ -153,7 +156,7 @@ function toggle_display(link) { > [% IF attachment.ispatch %] > <div class="statusBubble"> > <iframe src="https://webkit-queues.webkit.org/status-bubble/[% attachment.id %]" >- style="width: 600px; height: 20px; border: none;" scrolling="no"> >+ style="width: 600px; height: 20px; border: none;" scrolling="no" onload="handleStatusBubbleLoad(this)"> > </iframe> > </div> > [% END %]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188607
:
347175
|
347177
|
347195
|
347216
|
347325
|
347557
|
347559
|
347623
|
347964
|
347967
|
347969