[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
ojan at chromium.org
ojan at chromium.org
Fri Jan 21 14:55:27 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 21be69d4c37897977197b3e1563d621e67e798b3
Author: ojan at chromium.org <ojan at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 4 21:52:49 2011 +0000
2010-12-15 Ojan Vafai <ojan at chromium.org>
Reviewed by Adam Barth.
anchor the toolbar to the bottom of the diff if the diff doesn't take a full screen of height
https://bugs.webkit.org/show_bug.cgi?id=51162
* PrettyPatch/PrettyPatch.rb:
* code-review.js:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Websites/bugs.webkit.org/ChangeLog b/Websites/bugs.webkit.org/ChangeLog
index 630a46e..2fe3d51 100644
--- a/Websites/bugs.webkit.org/ChangeLog
+++ b/Websites/bugs.webkit.org/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-15 Ojan Vafai <ojan at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ anchor the toolbar to the bottom of the diff if the diff doesn't take a full screen of height
+ https://bugs.webkit.org/show_bug.cgi?id=51162
+
+ * PrettyPatch/PrettyPatch.rb:
+ * code-review.js:
+
2011-01-01 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
diff --git a/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb b/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb
index d0ee144..ea55f0b 100644
--- a/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb
+++ b/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb
@@ -114,7 +114,7 @@ private
background-color: #f8f8f8;
border: 1px solid #ddd;
font-family: monospace;
- margin: 2em 0px;
+ margin: 1em 0;
}
h1 {
@@ -230,16 +230,19 @@ body {
#toolbar {
display: -webkit-box;
display: -moz-box;
- position: fixed;
padding: 3px;
bottom: 0;
left: 0;
right: 0;
- border-top: 1px solid #ddd;
+ border: 1px solid #ddd;
background-color: #eee;
font-family: sans-serif;
}
+#toolbar.anchored {
+ position: fixed;
+}
+
#toolbar .actions {
float: right;
}
@@ -350,6 +353,13 @@ body {
border: none;
vertical-align: middle;
}
+
+.pseudo_resize_event_iframe {
+ height: 10%;
+ width: 10%;
+ position: absolute;
+ top: -11%;
+}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="code-review.js?version=17"></script>
diff --git a/Websites/bugs.webkit.org/code-review.js b/Websites/bugs.webkit.org/code-review.js
index 2a3b2c9..daa99e7 100644
--- a/Websites/bugs.webkit.org/code-review.js
+++ b/Websites/bugs.webkit.org/code-review.js
@@ -602,11 +602,20 @@
$('#statusBubbleContainer').addClass('wrap');
}
+ function onBodyResize() {
+ updateToolbarAnchorState();
+ }
+
+ function updateToolbarAnchorState() {
+ var has_scrollbar = window.innerWidth > document.documentElement.offsetWidth;
+ $('#toolbar').toggleClass('anchored', has_scrollbar);
+ }
+
$(document).ready(function() {
crawlDiff();
fetchHistory();
$(document.body).prepend('<div id="message"><div class="help">Select line numbers to add a comment.</div><div class="commentStatus"></div></div>');
- $(document.body).prepend('<div id="toolbar">' +
+ $(document.body).append('<div id="toolbar">' +
'<div class="overallComments">' +
'<textarea placeholder="Overall comments"></textarea>' +
'</div>' +
@@ -624,6 +633,14 @@
$('.overallComments textarea').bind('click', openOverallComments);
$(document.body).prepend('<div id="comment_form" class="inactive"><div class="winter"></div><div class="lightbox"><iframe id="reviewform" src="attachment.cgi?id=' + attachment_id + '&action=reviewform"></iframe></div></div>');
+
+ // Create a dummy iframe and monitor resizes in it's contentWindow to detect when the top document's body changes size.
+ // FIXME: Should we setTimeout throttle these?
+ var resize_iframe = $('<iframe class="pseudo_resize_event_iframe"></iframe>');
+ $(document.body).append(resize_iframe);
+ $(resize_iframe[0].contentWindow).bind('resize', onBodyResize);
+
+ updateToolbarAnchorState();
});
function discardComment() {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list