Diff
Modified: trunk/Source/WebCore/ChangeLog (101508 => 101509)
--- trunk/Source/WebCore/ChangeLog 2011-11-30 14:55:50 UTC (rev 101508)
+++ trunk/Source/WebCore/ChangeLog 2011-11-30 15:00:58 UTC (rev 101509)
@@ -1,3 +1,28 @@
+2011-11-28 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: TreeOutline elements should be formatted using margin-left instead of text-indent.
+ https://bugs.webkit.org/show_bug.cgi?id=73234
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/ResourceHeadersView.js:
+ (WebInspector.ResourceHeadersView.prototype._refreshHeadersText):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.BaseStorageTreeElement.prototype.get searchMatchesCount):
+ * inspector/front-end/auditsPanel.css:
+ (.audit-result-tree li):
+ (.audit-result-tree li.parent):
+ (.audit-result img):
+ * inspector/front-end/inspector.css:
+ (.outline-disclosure li):
+ (.outline-disclosure li.parent):
+ * inspector/front-end/networkPanel.css:
+ * inspector/front-end/resourcesPanel.css:
+ (.resources.panel .sidebar-resizer-vertical):
+ (.resources.panel .sidebar li):
+ * inspector/front-end/treeoutline.js:
+ (TreeElement.prototype.isEventWithinDisclosureTriangle):
+
2011-11-30 Kentaro Hara <[email protected]>
Implement the [NamedConstructor] IDL in CodeGeneratorJS.pm
Modified: trunk/Source/WebCore/inspector/front-end/DataGrid.js (101508 => 101509)
--- trunk/Source/WebCore/inspector/front-end/DataGrid.js 2011-11-30 14:55:50 UTC (rev 101508)
+++ trunk/Source/WebCore/inspector/front-end/DataGrid.js 2011-11-30 15:00:58 UTC (rev 101509)
@@ -1259,6 +1259,15 @@
return this._depth;
},
+ get leftPadding()
+ {
+ if (typeof(this._leftPadding) === "number")
+ return this._leftPadding;
+
+ this._leftPadding = this.depth * this.dataGrid.indentWidth;
+ return this._leftPadding;
+ },
+
get shouldRefreshChildren()
{
return this._shouldRefreshChildren;
@@ -1321,8 +1330,8 @@
if (columnIdentifier === this.dataGrid.disclosureColumnIdentifier) {
cell.addStyleClass("disclosure");
- if (this.depth)
- cell.style.setProperty("padding-left", (this.depth * this.dataGrid.indentWidth) + "px");
+ if (this.leftPadding)
+ cell.style.setProperty("padding-left", this.leftPadding + "px");
}
return cell;
@@ -1546,8 +1555,8 @@
var cell = event.target.enclosingNodeOrSelfWithNodeName("td");
if (!cell.hasStyleClass("disclosure"))
return false;
- var computedLeftPadding = window.getComputedStyle(cell).getPropertyCSSValue("padding-left").getFloatValue(CSSPrimitiveValue.CSS_PX);
- var left = cell.totalOffsetLeft() + computedLeftPadding;
+
+ var left = cell.totalOffsetLeft() + this.leftPadding;
return event.pageX >= left && event.pageX <= left + this.disclosureToggleWidth;
},
Modified: trunk/Source/WebCore/inspector/front-end/ResourceHeadersView.js (101508 => 101509)
--- trunk/Source/WebCore/inspector/front-end/ResourceHeadersView.js 2011-11-30 14:55:50 UTC (rev 101508)
+++ trunk/Source/WebCore/inspector/front-end/ResourceHeadersView.js 2011-11-30 15:00:58 UTC (rev 101509)
@@ -373,7 +373,6 @@
var headerTreeElement = new TreeElement(null, null, false);
headerTreeElement.selectable = false;
headersTreeElement.appendChild(headerTreeElement);
- headerTreeElement.listItemElement.addStyleClass("headers-text");
var headersTextElement = document.createElement("span");
headersTextElement.addStyleClass("header-value");
Modified: trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js (101508 => 101509)
--- trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js 2011-11-30 14:55:50 UTC (rev 101508)
+++ trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js 2011-11-30 15:00:58 UTC (rev 101509)
@@ -1000,16 +1000,6 @@
get searchMatchesCount()
{
return 0;
- },
-
- isEventWithinDisclosureTriangle: function(event)
- {
- // Override it since we use margin-left in place of treeoutline's text-indent.
- // Hence we need to take padding into consideration. This all is needed for leading
- // icons in the tree.
- const paddingLeft = 14;
- var left = this.listItemElement.totalOffsetLeft() + paddingLeft;
- return event.pageX >= left && event.pageX <= left + this.arrowToggleWidth && this.hasChildren;
}
}
Modified: trunk/Source/WebCore/inspector/front-end/TextPrompt.js (101508 => 101509)
--- trunk/Source/WebCore/inspector/front-end/TextPrompt.js 2011-11-30 14:55:50 UTC (rev 101508)
+++ trunk/Source/WebCore/inspector/front-end/TextPrompt.js 2011-11-30 15:00:58 UTC (rev 101509)
@@ -916,7 +916,7 @@
var aboveHeight = anchorBox.y;
var underHeight = document.body.offsetHeight - anchorBox.y - anchorBox.height;
var maxHeight = Math.max(underHeight, aboveHeight) - spacer;
- height = Math.min(contentHeight, maxHeight - suggestBoxPaddingY) + suggestBoxPaddingY;
+ var height = Math.min(contentHeight, maxHeight - suggestBoxPaddingY) + suggestBoxPaddingY;
if (underHeight >= aboveHeight) {
// Locate the suggest box under the anchorBox.
boxY = anchorBox.y + anchorBox.height;
Modified: trunk/Source/WebCore/inspector/front-end/auditsPanel.css (101508 => 101509)
--- trunk/Source/WebCore/inspector/front-end/auditsPanel.css 2011-11-30 14:55:50 UTC (rev 101508)
+++ trunk/Source/WebCore/inspector/front-end/auditsPanel.css 2011-11-30 15:00:58 UTC (rev 101509)
@@ -232,11 +232,11 @@
margin-top: 1px;
margin-bottom: 1px;
word-wrap: break-word;
- text-indent: -2px;
+ margin-left: -2px;
}
.audit-result-tree li.parent {
- text-indent: -12px
+ margin-left: -12px
}
.audit-result-tree li.parent::before {
@@ -267,6 +267,6 @@
.audit-result img {
float: left;
- margin-left: -40px;
+ margin-left: -28px;
margin-top: -1px;
}
Modified: trunk/Source/WebCore/inspector/front-end/inspector.css (101508 => 101509)
--- trunk/Source/WebCore/inspector/front-end/inspector.css 2011-11-30 14:55:50 UTC (rev 101508)
+++ trunk/Source/WebCore/inspector/front-end/inspector.css 2011-11-30 15:00:58 UTC (rev 101509)
@@ -1042,8 +1042,8 @@
padding: 0 0 0 14px;
margin-top: 1px;
margin-bottom: 1px;
+ margin-left: -2px;
word-wrap: break-word;
- text-indent: -2px;
}
.outline-disclosure ol:focus li.selected {
@@ -1055,7 +1055,7 @@
}
.outline-disclosure li.parent {
- text-indent: -12px
+ margin-left: -12px
}
.outline-disclosure li .webkit-html-tag.close {
Modified: trunk/Source/WebCore/inspector/front-end/networkPanel.css (101508 => 101509)
--- trunk/Source/WebCore/inspector/front-end/networkPanel.css 2011-11-30 14:55:50 UTC (rev 101508)
+++ trunk/Source/WebCore/inspector/front-end/networkPanel.css 2011-11-30 15:00:58 UTC (rev 101509)
@@ -192,11 +192,6 @@
margin-top: 1px;
}
-.resource-headers-view .outline-disclosure li.headers-text {
- text-indent: 0;
- margin-left: -2px;
-}
-
.resource-headers-view .outline-disclosure .raw-form-data {
white-space: pre-wrap;
}
Modified: trunk/Source/WebCore/inspector/front-end/resourcesPanel.css (101508 => 101509)
--- trunk/Source/WebCore/inspector/front-end/resourcesPanel.css 2011-11-30 14:55:50 UTC (rev 101508)
+++ trunk/Source/WebCore/inspector/front-end/resourcesPanel.css 2011-11-30 15:00:58 UTC (rev 101509)
@@ -27,11 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-.resources .outline-disclosure li {
- text-indent: -1px;
-}
-
-.resources .sidebar-resizer-vertical {
+.resources.panel .sidebar-resizer-vertical {
top: 23px;
}
@@ -43,15 +39,8 @@
.resources.panel .sidebar li {
height: 17px;
white-space: nowrap;
- text-indent: 0;
- margin-left: -2px;
}
-.resources.panel .sidebar li.parent {
- text-indent: 0;
- margin-left: -12px;
-}
-
.resources.panel .sidebar li.selected {
color: white;
text-shadow: rgba(0, 0, 0, 0.33) 0 1px 0;
Modified: trunk/Source/WebCore/inspector/front-end/treeoutline.js (101508 => 101509)
--- trunk/Source/WebCore/inspector/front-end/treeoutline.js 2011-11-30 14:55:50 UTC (rev 101508)
+++ trunk/Source/WebCore/inspector/front-end/treeoutline.js 2011-11-30 15:00:58 UTC (rev 101509)
@@ -998,6 +998,7 @@
TreeElement.prototype.isEventWithinDisclosureTriangle = function(event)
{
- var left = this._listItemNode.totalOffsetLeft();
+ const leftPadding = 14;
+ var left = this._listItemNode.totalOffsetLeft() + leftPadding;
return event.pageX >= left && event.pageX <= left + this.arrowToggleWidth && this.hasChildren;
}