Title: [116672] trunk/Source/WebCore
- Revision
- 116672
- Author
- [email protected]
- Date
- 2012-05-10 11:47:04 -0700 (Thu, 10 May 2012)
Log Message
Web Inspector: search title is shown beside the search field (not under) in the vertical mode.
https://bugs.webkit.org/show_bug.cgi?id=86120
Reviewed by Yury Semikhatsky.
This change makes search title render as placeholder at all times.
It also adjusts the size of the search field when navigation arrows appear.
* inspector/front-end/SearchController.js:
(WebInspector.SearchController):
(WebInspector.SearchController.prototype.updateSearchLabel):
(WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
(WebInspector.SearchController.prototype._createSearchNavigationButton):
* inspector/front-end/inspector.css:
(#toolbar-search-item):
(.with-navigation-buttons #search):
(.toolbar-search-navigation-label):
(.with-navigation-buttons .toolbar-search-navigation-label):
* inspector/front-end/inspector.html:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (116671 => 116672)
--- trunk/Source/WebCore/ChangeLog 2012-05-10 18:42:54 UTC (rev 116671)
+++ trunk/Source/WebCore/ChangeLog 2012-05-10 18:47:04 UTC (rev 116672)
@@ -1,3 +1,25 @@
+2012-05-10 Pavel Feldman <[email protected]>
+
+ Web Inspector: search title is shown beside the search field (not under) in the vertical mode.
+ https://bugs.webkit.org/show_bug.cgi?id=86120
+
+ Reviewed by Yury Semikhatsky.
+
+ This change makes search title render as placeholder at all times.
+ It also adjusts the size of the search field when navigation arrows appear.
+
+ * inspector/front-end/SearchController.js:
+ (WebInspector.SearchController):
+ (WebInspector.SearchController.prototype.updateSearchLabel):
+ (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
+ (WebInspector.SearchController.prototype._createSearchNavigationButton):
+ * inspector/front-end/inspector.css:
+ (#toolbar-search-item):
+ (.with-navigation-buttons #search):
+ (.toolbar-search-navigation-label):
+ (.with-navigation-buttons .toolbar-search-navigation-label):
+ * inspector/front-end/inspector.html:
+
2012-05-10 Varun Jain <[email protected]>
[chromium] Trigger context menu for long press gesture
Modified: trunk/Source/WebCore/inspector/front-end/SearchController.js (116671 => 116672)
--- trunk/Source/WebCore/inspector/front-end/SearchController.js 2012-05-10 18:42:54 UTC (rev 116671)
+++ trunk/Source/WebCore/inspector/front-end/SearchController.js 2012-05-10 18:47:04 UTC (rev 116672)
@@ -36,7 +36,7 @@
{
this.element = document.getElementById("search");
this._matchesElement = document.getElementById("search-results-matches");
- this._toolbarLabelElement = document.getElementById("search-toolbar-label");
+ this._searchItemElement = document.getElementById("toolbar-search-item");
this._searchControlBoxElement = document.getElementById("toolbar-search-navigation-control");
this.element.addEventListener("search", this._onSearch.bind(this), false); // when the search is emptied
@@ -70,12 +70,7 @@
if (!panelName)
return;
var newLabel = WebInspector.UIString("Search %s", panelName);
- if (WebInspector.isCompactMode())
- this.element.setAttribute("placeholder", newLabel);
- else {
- this.element.removeAttribute("placeholder");
- this._toolbarLabelElement.textContent = newLabel;
- }
+ this.element.setAttribute("placeholder", newLabel);
},
cancelSearch: function()
@@ -156,13 +151,10 @@
_updateSearchNavigationButtonState: function(visible)
{
- if (visible) {
- this._searchNavigationNext.removeStyleClass("hidden");
- this._searchNavigationPrev.removeStyleClass("hidden");
- } else {
- this._searchNavigationNext.addStyleClass("hidden");
- this._searchNavigationPrev.addStyleClass("hidden");
- }
+ if (visible)
+ this._searchItemElement.addStyleClass("with-navigation-buttons");
+ else
+ this._searchItemElement.removeStyleClass("with-navigation-buttons");
},
/**
@@ -338,7 +330,7 @@
var searchNavigationControlElement = document.createElement("div");
var searchNavigationIconElement = document.createElement("div");
- searchNavigationControlElement.className = "toolbar-search-navigation-label hidden";
+ searchNavigationControlElement.className = "toolbar-search-navigation-label";
switch (direction) {
case "prev":
Modified: trunk/Source/WebCore/inspector/front-end/inspector.css (116671 => 116672)
--- trunk/Source/WebCore/inspector/front-end/inspector.css 2012-05-10 18:42:54 UTC (rev 116671)
+++ trunk/Source/WebCore/inspector/front-end/inspector.css 2012-05-10 18:47:04 UTC (rev 116672)
@@ -259,7 +259,7 @@
border-radius: 5px;
}
-.toolbar-search-item {
+#toolbar-search-item {
display: -webkit-box;
-webkit-box-orient: horizontal;
-webkit-box-align: center;
@@ -271,11 +271,12 @@
font-size: 16px;
}
-#toolbar-search-navigation-control {
- width: 40px;
+.with-navigation-buttons #search {
+ width: 165px;
}
.toolbar-search-navigation-label {
+ display: none;
border: 1px solid transparent;
border-radius: 2px;
padding: 3px;
@@ -285,6 +286,10 @@
float: right;
}
+.with-navigation-buttons .toolbar-search-navigation-label {
+ display: block;
+}
+
.toolbar-search-navigation-label:hover {
border: 1px solid rgba(120, 120, 120, 0.6);
}
Modified: trunk/Source/WebCore/inspector/front-end/inspector.html (116671 => 116672)
--- trunk/Source/WebCore/inspector/front-end/inspector.html 2012-05-10 18:42:54 UTC (rev 116671)
+++ trunk/Source/WebCore/inspector/front-end/inspector.html 2012-05-10 18:47:04 UTC (rev 116672)
@@ -219,9 +219,9 @@
<div id="toolbar-controls">
<div class="toolbar-item"><button id="toolbar-dropdown-arrow" class="toolbar-label">»</button></div>
<div class="toolbar-item hidden" id="search-results-matches"></div>
- <div class="toolbar-item toolbar-search-item" >
+ <div class="toolbar-item" id="toolbar-search-item">
<input id="search" type="search" incremental results="0">
- <div id="search-toolbar-label" class="toolbar-label"></div><div id="toolbar-search-navigation-control"></div>
+ <div id="toolbar-search-navigation-control"></div>
</div>
<div class="toolbar-item close-right"><button id="close-button-right"></button></div>
</div>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes