You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pm...@apache.org on 2012/02/15 18:42:37 UTC
[37/51] [partial] Apache-ization, port to node.js
http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/front-end/networkPanel.css
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/front-end/networkPanel.css b/weinre.build/vendor/webkit/WebCore/inspector/front-end/networkPanel.css
new file mode 100644
index 0000000..c750323
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/front-end/networkPanel.css
@@ -0,0 +1,821 @@
+.network-larger-resources-status-bar-item .glyph {
+ -webkit-mask-image: url(Images/largerResourcesButtonGlyph.png);
+}
+
+.network-sidebar .data-grid {
+ border: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ font-size: 11px;
+}
+
+.network-sidebar .data-grid table.data {
+ -webkit-background-size: 1px 82px;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), color-stop(0.5, rgba(0, 0, 0, 0)), color-stop(0.5, rgba(0, 0, 0, 0.05)), to(rgba(0, 0, 0, 0.05)));
+ font-size: 11px;
+}
+
+.network-sidebar .data-grid.small table.data {
+ -webkit-background-size: 1px 42px;
+}
+
+.network-sidebar .data-grid td:not(.network-summary) {
+ line-height: 17px;
+ height: 37px;
+ border-right: 1px solid rgb(210, 210, 210);
+ vertical-align: middle;
+}
+
+.network-sidebar .data-grid.small td {
+ height: 17px;
+}
+
+.network-sidebar .data-grid th {
+ border-bottom: 1px solid rgb(64%, 64%, 64%);
+ height: 30px;
+ font-size: 11px;
+ font-weight: bold;
+}
+
+.network-sidebar .data-grid.small th {
+ height: 22px;
+}
+
+.network-sidebar .data-grid th, .network.panel .data-grid th.sort-descending, .network.panel .data-grid th.sort-ascending {
+ background: -webkit-gradient(linear, left top, left bottom, from(rgb(236, 236, 236)), to(rgb(217, 217, 217)));
+}
+
+.network-sidebar .data-grid .data-container {
+ top: 31px;
+}
+
+.network-sidebar .data-grid.small .data-container {
+ top: 23px;
+}
+
+.network-sidebar .data-grid select {
+ -webkit-appearance: none;
+ background-color: transparent;
+ border: none;
+ width: 100%;
+ font-size: 11px;
+ font-weight: bold;
+}
+
+.network-sidebar .data-grid.small tr.offscreen {
+ height: 21px;
+}
+
+.network-sidebar .data-grid tr.offscreen {
+ height: 41px;
+}
+
+.network-sidebar .data-grid tr.offscreen td {
+ display: none;
+}
+
+.network-sidebar .data-grid tr.filler {
+ background-color: white;
+}
+
+.network-sidebar .data-grid td.name-column {
+ font-weight: bold;
+ cursor: pointer;
+}
+
+.network.panel:not(.viewing-resource) .network-sidebar td.name-column:hover {
+ text-decoration: underline;
+}
+
+.network-sidebar .data-grid td.method-column,
+.network-sidebar .data-grid td.status-column,
+.network-sidebar .data-grid td.type-column,
+.network-sidebar .data-grid td.size-column,
+.network-sidebar .data-grid td.time-column {
+ background-color: rgba(0, 0, 0, 0.07);
+}
+
+.network-sidebar .data-grid td.size-column,
+.network-sidebar .data-grid td.time-column {
+ text-align: right;
+}
+
+.network-sidebar .small .network-graph-side {
+ height: 14px;
+}
+
+.network-sidebar .data-grid th.sortable:active {
+ background-image: none;
+}
+
+.network-cell-subtitle {
+ font-weight: normal;
+ color: gray;
+}
+
+.network-sidebar tr.selected .network-cell-subtitle {
+ color: white;
+}
+
+.network-header-subtitle {
+ color: gray;
+}
+
+.network-sidebar .data-grid.small .network-cell-subtitle,
+.network-sidebar .data-grid.small .network-header-subtitle
+{
+ display: none;
+}
+
+/* Resource preview icons */
+
+.network-sidebar .data-grid .icon {
+ content: url(Images/resourcePlainIcon.png);
+}
+
+.network-sidebar .data-grid.small .icon {
+ content: url(Images/resourcePlainIconSmall.png);
+}
+
+.network-sidebar .network-category-scripts .icon {
+ content: url(Images/resourceJSIcon.png);
+}
+
+.network-sidebar .data-grid.small .network-category-scripts .icon {
+ content: url(Images/resourceDocumentIconSmall.png);
+}
+
+.network-sidebar .network-category-documents .icon {
+ content: url(Images/resourceDocumentIcon.png);
+}
+
+.network-sidebar .data-grid.small .network-category-documents .icon {
+ content: url(Images/resourceDocumentIconSmall.png);
+}
+
+.network-sidebar .network-category-stylesheets .icon {
+ content: url(Images/resourceCSSIcon.png);
+}
+
+.network-sidebar .data-grid.small .network-category-stylesheets .icon {
+ content: url(Images/resourceDocumentIconSmall.png);
+}
+
+.network-sidebar .network-category-images .icon {
+ position: relative;
+ background-image: url(Images/resourcePlainIcon.png);
+ background-repeat: no-repeat;
+ content: "";
+}
+
+.network-sidebar .data-grid.small .network-category-images .icon {
+ background-image: url(Images/resourcePlainIconSmall.png);
+ content: "";
+}
+
+.network-sidebar .data-grid .icon {
+ float: left;
+ width: 32px;
+ height: 32px;
+ margin-top: 1px;
+ margin-right: 3px;
+}
+
+.network-sidebar .data-grid.small .icon {
+ width: 16px;
+ height: 16px;
+}
+
+.network-sidebar .image-network-icon-preview {
+ position: absolute;
+ margin: auto;
+ top: 3px;
+ bottom: 4px;
+ left: 5px;
+ right: 5px;
+ max-width: 18px;
+ max-height: 21px;
+ min-width: 1px;
+ min-height: 1px;
+}
+
+.network-sidebar .data-grid.small .image-network-icon-preview {
+ top: 2px;
+ bottom: 1px;
+ left: 3px;
+ right: 3px;
+ max-width: 8px;
+ max-height: 11px;
+}
+
+/* Graph styles */
+
+.network-graph-side {
+ position: relative;
+ height: 36px;
+ padding: 0 5px;
+ white-space: nowrap;
+ margin-top: 1px;
+ border-top: 1px solid transparent;
+ overflow: hidden;
+}
+
+.network-graph-bar-area {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ right: 8px;
+ left: 9px;
+}
+
+.network-graph-label {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ margin: auto -7px;
+ height: 13px;
+ line-height: 13px;
+ font-size: 9px;
+ color: rgba(0, 0, 0, 0.75);
+ text-shadow: rgba(255, 255, 255, 0.25) 1px 0 0, rgba(255, 255, 255, 0.25) -1px 0 0, rgba(255, 255, 255, 0.333) 0 1px 0, rgba(255, 255, 255, 0.25) 0 -1px 0;
+ z-index: 150;
+ overflow: hidden;
+ text-align: center;
+ font-weight: bold;
+ opacity: 0;
+ -webkit-transition: opacity 250ms ease-in-out;
+}
+
+.network-graph-side:hover .network-graph-label {
+ opacity: 1;
+}
+
+.network-graph-label:empty {
+ display: none;
+}
+
+.network-graph-label.waiting {
+ margin-right: 5px;
+}
+
+.network-graph-label.waiting-right {
+ margin-left: 5px;
+}
+
+.network-graph-label.before {
+ color: rgba(0, 0, 0, 0.7);
+ text-shadow: none;
+ text-align: right;
+ margin-right: 2px;
+}
+
+.network-graph-label.before::after {
+ padding-left: 2px;
+ height: 6px;
+ content: url(Images/graphLabelCalloutLeft.png);
+}
+
+.network-graph-label.after {
+ color: rgba(0, 0, 0, 0.7);
+ text-shadow: none;
+ text-align: left;
+ margin-left: 2px;
+}
+
+.network-graph-label.after::before {
+ padding-right: 2px;
+ height: 6px;
+ content: url(Images/graphLabelCalloutRight.png);
+}
+
+.network-graph-bar {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ margin: auto -7px;
+ border-width: 6px 7px;
+ height: 13px;
+ min-width: 14px;
+ opacity: 0.65;
+ -webkit-border-image: url(Images/timelinePillGray.png) 6 7 6 7;
+}
+
+.network-graph-bar.waiting, .network-graph-bar.waiting-right {
+ opacity: 0.35;
+}
+
+/* Resource categories */
+
+
+.resource-cached .network-graph-bar {
+ -webkit-border-image: url(Images/timelineHollowPillGray.png) 6 7 6 7;
+}
+
+.network-category-documents .network-graph-bar {
+ -webkit-border-image: url(Images/timelinePillBlue.png) 6 7 6 7;
+}
+
+.network-category-documents.resource-cached .network-graph-bar {
+ -webkit-border-image: url(Images/timelineHollowPillBlue.png) 6 7 6 7;
+}
+
+.network-category-stylesheets .network-graph-bar {
+ -webkit-border-image: url(Images/timelinePillGreen.png) 6 7 6 7;
+}
+
+.network-category-stylesheets.resource-cached .network-graph-bar {
+ -webkit-border-image: url(Images/timelineHollowPillGreen.png) 6 7 6 7;
+}
+
+.network-category-images .network-graph-bar {
+ -webkit-border-image: url(Images/timelinePillPurple.png) 6 7 6 7;
+}
+
+.network-category-images.resource-cached .network-graph-bar {
+ -webkit-border-image: url(Images/timelineHollowPillPurple.png) 6 7 6 7;
+}
+
+.network-category-fonts .network-graph-bar {
+ -webkit-border-image: url(Images/timelinePillRed.png) 6 7 6 7;
+}
+
+.network-category-fonts.resource-cached .network-graph-bar {
+ -webkit-border-image: url(Images/timelineHollowPillRed.png) 6 7 6 7;
+}
+
+.network-category-scripts .network-graph-bar {
+ -webkit-border-image: url(Images/timelinePillOrange.png) 6 7 6 7;
+}
+
+.network-category-scripts.resource-cached .network-graph-bar {
+ -webkit-border-image: url(Images/timelineHollowPillOrange.png) 6 7 6 7;
+}
+
+.network-category-xhr .network-graph-bar {
+ -webkit-border-image: url(Images/timelinePillYellow.png) 6 7 6 7;
+}
+
+.network-category-xhr.resource-cached .network-graph-bar {
+ -webkit-border-image: url(Images/timelineHollowPillYellow.png) 6 7 6 7;
+}
+
+.network-category-websockets .network-graph-bar {
+ -webkit-border-image: url(Images/timelinePillGray.png) 6 7 6 7;
+}
+
+.network-category-websockets.resource-cached .network-graph-bar {
+ -webkit-border-image: url(Images/timelineHollowPillGray.png) 6 7 6 7;
+}
+
+
+/* Popover */
+
+.network-timing-row {
+ position: relative;
+ height: 16px;
+}
+
+.network-timing-bar {
+ position: absolute;
+ background-color: red;
+ border-left: 1px solid red;
+ opacity: 0.4;
+ top: 0;
+ bottom: 0;
+}
+
+.network-timing-bar-title {
+ position: absolute;
+ color: black;
+ top: 1px;
+}
+
+.network-dim-cell {
+ color: grey;
+}
+
+/* Dividers */
+
+.network-timeline-grid {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ pointer-events: none;
+}
+
+.network-event-divider-padding {
+ position: absolute;
+ width: 8px;
+ top: 0;
+ bottom: 0;
+ pointer-events: auto;
+}
+
+.network-event-divider {
+ position: absolute;
+ width: 2px;
+ top: 31px;
+ bottom: 0;
+ z-index: 300;
+}
+
+.network-sidebar .network-timeline-grid.small .network-event-divider {
+ top: 23px;
+}
+
+.network-red-divider {
+ background-color: rgba(255, 0, 0, 0.5);
+}
+
+.network-blue-divider {
+ background-color: rgba(0, 0, 255, 0.5);
+}
+
+.network-sidebar .resources-dividers {
+ z-index: 0;
+}
+
+.network-sidebar .resources-dividers-label-bar {
+ background-color: transparent;
+ border: none;
+ height: 30px;
+ pointer-events: none;
+}
+
+.network-sidebar .network-timeline-grid.small .resources-dividers-label-bar {
+ height: 23px;
+}
+
+.network-sidebar .resources-divider-label {
+ top: 0px;
+ margin-top: -4px;
+ color: black;
+}
+
+.network-sidebar .resources-dividers-label-bar .resources-divider {
+ top: 23px;
+}
+
+.network-sidebar .network-timeline-grid.small .resources-dividers-label-bar .resources-divider {
+ top: 15px;
+}
+
+.network-sidebar .resources-divider.first .resources-divider-label {
+ display: none;
+}
+
+.network-sidebar .resources-dividers-label-bar .resources-divider.first {
+ background-color: transparent;
+}
+
+/* Filters */
+#network-filter {
+ margin-top: 1px;
+}
+
+.data-grid table.data tr.revealed.network-item {
+ display: none;
+}
+
+.data-grid.filter-all table.data tr.revealed.network-item,
+.data-grid.filter-documents table.data tr.revealed.network-category-documents,
+.data-grid.filter-stylesheets table.data tr.revealed.network-category-stylesheets,
+.data-grid.filter-images table.data tr.revealed.network-category-images,
+.data-grid.filter-scripts table.data tr.revealed.network-category-scripts,
+.data-grid.filter-xhr table.data tr.revealed.network-category-xhr,
+.data-grid.filter-fonts table.data tr.revealed.network-category-fonts,
+.data-grid.filter-websockets table.data tr.revealed.network-category-websockets,
+.data-grid.filter-other table.data tr.revealed.network-category-other {
+ display: table-row;
+}
+
+/* Summary */
+
+.network-summary-bar {
+ background-color: rgb(101, 111, 130);
+ color: white;
+ height: 20px;
+ font-size: 11px;
+ font-weight: bold;
+ padding-top: 3px;
+ padding-left: 10px;
+ z-index: 2000;
+ white-space: pre;
+ overflow : hidden;
+ text-overflow : ellipsis;
+}
+
+.network-summary-bar-bottom {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ padding-top: 3px;
+}
+
+.data-grid td .network-summary-bar {
+ white-space: pre;
+}
+
+.network-sidebar .data-grid td.network-summary {
+ padding: 0;
+}
+
+/* Viewer */
+
+.network.panel.viewing-resource .network-sidebar .data-grid td,
+.network.panel.viewing-resource .network-sidebar .data-grid th {
+ border-right: none;
+}
+
+.network.panel.viewing-resource .data-grid th.corner {
+ display: none;
+}
+
+#network-container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ border-right: 0 none transparent;
+ overflow-y: auto;
+ overflow-x: hidden;
+}
+
+.network.panel.viewing-resource #network-container {
+ border-right: 1px solid rgb(163, 163, 163);
+}
+
+#network-views {
+ position: absolute;
+ background: rgb(203, 203, 203);
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+}
+
+#network-close-button {
+ position: absolute;
+ width: 14px;
+ height: 14px;
+ background-image: url(Images/closeButtons.png);
+ background-position: 0 0;
+ background-color: transparent;
+ border: 0 none transparent;
+ top: 8px;
+ left: 5px;
+ z-index: 10;
+ display: none;
+}
+
+#network-views.small #network-close-button {
+ top: 4px;
+}
+
+#network-close-button:hover {
+ background-position: 14px 0;
+}
+
+#network-close-button:active {
+ background-position: 28px 0;
+}
+
+.network.panel.viewing-resource #network-close-button {
+ display: block;
+}
+
+
+.network-sidebar .data-grid.full-grid-mode .viewer-column {
+ display: none;
+}
+
+.network-sidebar .data-grid.brief-grid-mode .viewer-column,
+.network-sidebar .data-grid.brief-grid-mode .method-column,
+.network-sidebar .data-grid.brief-grid-mode .status-column,
+.network-sidebar .data-grid.brief-grid-mode .type-column,
+.network-sidebar .data-grid.brief-grid-mode .size-column,
+.network-sidebar .data-grid.brief-grid-mode .time-column {
+ display: none;
+}
+
+.network.panel.viewing-resource .network-timeline-grid {
+ display: none;
+}
+
+.network-sidebar .data-grid.viewing-resource-mode .method-column,
+.network-sidebar .data-grid.viewing-resource-mode .status-column,
+.network-sidebar .data-grid.viewing-resource-mode .type-column,
+.network-sidebar .data-grid.viewing-resource-mode .size-column,
+.network-sidebar .data-grid.viewing-resource-mode .time-column,
+.network-sidebar .data-grid.viewing-resource-mode .timeline-column {
+ display: none;
+}
+
+.network.panel .network-sidebar {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+}
+
+.network.panel:not(.viewing-resource) .sidebar-resizer-vertical {
+ display: none;
+}
+
+.network.panel.viewing-resource .network-sidebar .data-grid-resizer {
+ display: none;
+}
+
+.network.panel .scope-bar {
+ height: 23px;
+ padding-top: 5px;
+}
+
+.network.panel:not(.viewing-resource) .data-grid tr.selected {
+ background-color: transparent;
+ color: black;
+}
+
+#network-views .network-item-view .tabbed-pane-header {
+ height: 31px;
+ padding-top: 8px;
+ padding-left: 25px;
+ white-space: nowrap;
+}
+
+#network-views.small .network-item-view .tabbed-pane-header {
+ height: 23px;
+ padding-top: 0;
+}
+
+.network.panel.viewing-resource .data-grid .data-container {
+ padding-right: 0;
+}
+
+.network-item-view {
+ display: none;
+ position: absolute;
+ background: white;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
+
+.network-item-view.visible {
+ display: -webkit-box;
+}
+
+.network-item-view .tabbed-pane-header {
+ height: 20px;
+ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(236, 236, 236)), to(rgb(217, 217, 217)));
+ border-bottom: 1px solid rgb(163, 163, 163);
+}
+
+.network-item-view .scope-bar li {
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.resource-headers-view {
+ display: none;
+ padding: 6px;
+ -webkit-user-select: text;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ overflow: auto;
+}
+
+.resource-headers-view.visible {
+ display: block;
+}
+
+.resource-headers-view .outline-disclosure .parent {
+ -webkit-user-select: none;
+ font-weight: bold;
+}
+
+.resource-headers-view .outline-disclosure .children li {
+ white-space: nowrap;
+}
+
+.resource-headers-view .outline-disclosure li.expanded .header-count {
+ display: none;
+}
+
+.resource-headers-view .outline-disclosure .header-name {
+ color: rgb(33%, 33%, 33%);
+ display: inline-block;
+ margin-right: 0.5em;
+ font-weight: bold;
+ vertical-align: top;
+ white-space: pre-wrap;
+}
+
+.resource-headers-view .outline-disclosure .header-value {
+ display: inline;
+ margin-right: 100px;
+ white-space: pre-wrap;
+ word-break: break-all;
+ margin-top: 1px;
+}
+
+.resource-headers-view .outline-disclosure .raw-form-data {
+ white-space: pre-wrap;
+}
+
+.resource-cookies-view {
+ display: none;
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ overflow: auto;
+ padding: 12px;
+ height: 100%;
+}
+
+.resource-cookies-view.visible {
+ display: block;
+}
+
+.resource-cookies-view .data-grid {
+ height: 100%;
+}
+
+.resource-cookies-view .data-grid .row-group {
+ font-weight: bold;
+ font-size: 11px;
+}
+
+.resource-timing-view {
+ display: none;
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ padding: 6px;
+ font-weight: bold;
+ font-size: 11px;
+ color: rgb(30%, 30%, 30%);
+}
+
+.resource-timing-view table {
+ border-spacing: 21px 0;
+}
+
+.resource-timing-view .network-timing-bar {
+ opacity: 1;
+}
+
+.resource-timing-view .network-timing-bar.proxy {
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(239, 228, 176)), to(rgb(139, 128, 76)));
+ border-left: 1px solid rgb(139, 128, 76);
+}
+
+.resource-timing-view .network-timing-bar.dns {
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(153, 208, 216)), to(rgb(81, 174, 189)));
+ border-left: 1px solid rgb(81, 174, 189);
+}
+
+.resource-timing-view .network-timing-bar.connecting {
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(203, 232, 145)), to(rgb(160, 214, 56)));
+ border-left: 1px solid rgb(160, 214, 56);
+}
+
+.resource-timing-view .network-timing-bar.ssl {
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(21, 232, 145)), to(rgb(216, 149, 132)));
+ border-left: 1px solid rgb(216, 149, 132);
+}
+
+.resource-timing-view .network-timing-bar.sending {
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(232, 192, 182)), to(rgb(216, 147, 130)));
+ border-left: 1px solid rgb(216, 147, 130);
+}
+
+.resource-timing-view .network-timing-bar.waiting {
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(188, 179, 208)), to(rgb(141, 125, 175)));
+ border-left: 1px solid rgb(141, 125, 175);
+}
+
+.resource-timing-view .network-timing-bar.receiving {
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(214, 214, 214)), to(rgb(182, 182, 182)));
+ border-left: 1px solid rgb(182, 182, 182);
+}
+
+.resource-timing-view.visible {
+ display: block;
+}
http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/front-end/popover.css
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/front-end/popover.css b/weinre.build/vendor/webkit/WebCore/inspector/front-end/popover.css
new file mode 100644
index 0000000..ae6f610
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/front-end/popover.css
@@ -0,0 +1,200 @@
+.popover {
+ position: absolute;
+ -webkit-border-image: url(Images/popoverBackground.png) 25 25 25 25;
+ border-width: 25px;
+ z-index: 100;
+ pointer-events: none;
+}
+
+.popover .content {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ pointer-events: auto;
+ overflow: auto;
+}
+
+.popover .arrow {
+ position: absolute;
+ background-image: url(Images/popoverArrows.png);
+ width: 19px;
+ height: 19px;
+ margin-left: 15px;
+ margin-top: -25px;
+ top: 0;
+ left: 0;
+}
+
+.popover.top-left-arrow .arrow {
+ /* The default is top-left, no styles needed. */
+}
+
+.popover.top-right-arrow .arrow {
+ right: 25px;
+ left: auto;
+}
+
+.popover.bottom-left-arrow .arrow {
+ top: auto;
+ bottom: 0;
+ margin-top: 0;
+ margin-bottom: -25px;
+ background-position: 0 -19px;
+}
+
+.popover.bottom-right-arrow .arrow {
+ right: 15px;
+ left: auto;
+ top: auto;
+ bottom: 0;
+ margin-top: 0;
+ margin-bottom: -25px;
+ background-position: 0 -19px;
+}
+
+.popover.left-top-arrow .arrow {
+ top: 0;
+ margin-top: 15px;
+ margin-left: -25px;
+ background-position: 0 -38px;
+}
+
+.popover.left-bottom-arrow .arrow {
+ top: auto;
+ bottom: 0;
+ margin-bottom: 15px;
+ margin-left: -25px;
+ background-position: 0 -38px;
+}
+
+.popover.right-top-arrow .arrow {
+ right: 0;
+ left: auto;
+ top: 0;
+ margin-top: 15px;
+ margin-right: -25px;
+ background-position: 0 -57px;
+}
+
+.popover.right-bottom-arrow .arrow {
+ right: 0;
+ left: auto;
+ top: auto;
+ bottom: 0;
+ margin-bottom: 15px;
+ margin-right: -25px;
+ background-position: 0 -57px;
+}
+
+.popover ::-webkit-scrollbar {
+ width: 11px;
+ height: 11px;
+}
+
+.popover ::-webkit-scrollbar-corner {
+ display: none;
+}
+
+.popover ::-webkit-resizer {
+ display: none;
+}
+
+/* Horizontal Scrollbar Styles */
+
+.popover ::-webkit-scrollbar:horizontal:corner-present {
+ border-right-width: 0;
+}
+
+.popover ::-webkit-scrollbar-thumb:horizontal {
+ -webkit-border-image: url(Images/thumbHoriz.png) 0 11 0 11;
+ border-color: transparent;
+ border-width: 0 11px;
+ min-width: 20px;
+}
+
+.popover ::-webkit-scrollbar-thumb:horizontal:hover {
+ -webkit-border-image: url(Images/thumbHoverHoriz.png) 0 11 0 11;
+}
+
+.popover ::-webkit-scrollbar-thumb:horizontal:active {
+ -webkit-border-image: url(Images/thumbActiveHoriz.png) 0 11 0 11;
+}
+
+.popover ::-webkit-scrollbar-track-piece:horizontal:start {
+ margin-left: 5px;
+}
+
+.popover ::-webkit-scrollbar-track-piece:horizontal:end {
+ margin-right: 5px;
+}
+
+.popover ::-webkit-scrollbar-track-piece:horizontal:end:corner-present {
+ margin-right: 4px;
+}
+
+.popover ::-webkit-scrollbar-track-piece:horizontal:decrement {
+ -webkit-border-image: url(Images/trackHoriz.png) 0 11 0 11;
+ border-color: transparent;
+ border-width: 0 0 0 11px;
+}
+
+.popover ::-webkit-scrollbar-track-piece:horizontal:increment {
+ -webkit-border-image: url(Images/trackHoriz.png) 0 11 0 11;
+ border-color: transparent;
+ border-width: 0 11px 0 0;
+}
+
+/* Vertical Scrollbar Styles */
+
+
+.popover ::-webkit-scrollbar:vertical:corner-present {
+ border-bottom-width: 0;
+}
+
+.popover ::-webkit-scrollbar-thumb:vertical {
+ -webkit-border-image: url(Images/thumbVert.png) 11 0 11 0;
+ border-color: transparent;
+ border-width: 11px 0;
+ min-height: 20px;
+}
+
+.popover ::-webkit-scrollbar-thumb:vertical:hover {
+ -webkit-border-image: url(Images/thumbHoverVert.png) 11 0 11 0;
+}
+
+.popover ::-webkit-scrollbar-thumb:vertical:active {
+ -webkit-border-image: url(Images/thumbActiveVert.png) 11 0 11 0;
+}
+
+
+.popover ::-webkit-scrollbar-track-piece:vertical:start {
+ margin-top: 5px;
+}
+
+.popover ::-webkit-scrollbar-track-piece:vertical:end {
+ margin-bottom: 5px;
+}
+
+.popover ::-webkit-scrollbar-track-piece:vertical:end:corner-present {
+ margin-bottom: 4px;
+}
+
+.popover ::-webkit-scrollbar-track-piece:vertical:decrement {
+ -webkit-border-image: url(Images/trackVert.png) 11 0 11 0;
+ border-color: transparent;
+ border-width: 11px 0 0 0;
+}
+
+.popover ::-webkit-scrollbar-track-piece:vertical:increment {
+ -webkit-border-image: url(Images/trackVert.png) 11 0 11 0;
+ border-color: transparent;
+ border-width: 0 0 11px 0;
+}
+
+/* Forced Scrollbar Mode Styles */
+
+.popover ::-webkit-scrollbar-button {
+ display: none;
+}
http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/front-end/textViewer.css
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/front-end/textViewer.css b/weinre.build/vendor/webkit/WebCore/inspector/front-end/textViewer.css
new file mode 100644
index 0000000..f6aa65e
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/front-end/textViewer.css
@@ -0,0 +1,193 @@
+.text-editor {
+ position: absolute;
+ top:0;
+ left:0;
+ right:0;
+ bottom:0;
+ white-space: pre;
+ overflow: auto;
+}
+
+.text-editor-lines {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ overflow: hidden;
+ -webkit-user-select: none;
+}
+
+.text-editor-contents {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ overflow: auto;
+ -webkit-user-select: text;
+}
+
+.text-editor-editable {
+ -webkit-user-modify: read-write-plaintext-only;
+}
+
+.webkit-line-decorations {
+ pointer-events: none;
+ -webkit-user-select: none;
+ -webkit-user-modify: read-only;
+}
+
+.webkit-html-message-bubble {
+ -webkit-box-shadow: black 0px 2px 5px;
+ -webkit-border-radius: 9px;
+ -webkit-border-fit: lines;
+ font-size: 10px;
+ font-family: Lucida Grande, sans-serif;
+ font-weight: bold;
+ margin: 6px 25px;
+ padding: 0 7px 1px;
+ z-index:20;
+}
+
+.webkit-html-warning-message {
+ background-color: rgb(100%, 62%, 42%);
+ border: 2px solid rgb(100%, 52%, 21%);
+}
+
+.webkit-html-error-message {
+ background-color: rgb(100%, 42%, 42%);
+ border: 2px solid rgb(100%, 31%, 31%);
+}
+
+.webkit-html-message-line {
+ padding-left: 23px;
+ text-indent: -20px;
+}
+
+.webkit-html-message-line-hover {
+ padding-left: 23px;
+ text-indent: -20px;
+ white-space: auto;
+ text-overflow: auto;
+ overflow: auto;
+}
+
+.webkit-html-message-icon {
+ position: relative;
+ top: 2px;
+ margin: 0 4px;
+}
+
+.webkit-line-number {
+ color: rgb(128, 128, 128);
+ background-color: rgb(240, 240, 240);
+ border-right: 1px solid rgb(187, 187, 187);
+ text-align: right;
+ vertical-align: top;
+ word-break: normal;
+ padding-right: 4px;
+ padding-left: 6px;
+}
+
+.webkit-line-number-outer {
+ margin-right: -4px;
+ margin-left: -4px;
+ border-color: transparent;
+ border-style: solid;
+ border-width: 0 0 0px 2px;
+ vertical-align: top;
+}
+
+.webkit-line-number-inner {
+ margin-right: 4px;
+}
+
+.webkit-breakpoint .webkit-line-number-inner, .webkit-breakpoint-conditional .webkit-line-number-inner, .webkit-execution-line .webkit-line-number-inner {
+ margin-right: -10px;
+}
+
+.webkit-line-content {
+ padding-left: 2px;
+}
+
+.webkit-breakpoint .webkit-line-number-outer {
+ color: white;
+ border-width: 0 14px 0px 2px;
+ -webkit-border-image: url(Images/breakpointBorder.png) 0 14 0 2;
+}
+
+.webkit-breakpoint-conditional .webkit-line-number-outer {
+ color: white;
+ border-width: 0 14px 0px 2px;
+ -webkit-border-image: url(Images/breakpointConditionalBorder.png) 0 14 0 2;
+}
+
+.webkit-execution-line .webkit-line-number-outer {
+ color: transparent;
+ border-width: 0 14px 0px 2px;
+ -webkit-border-image: url(Images/programCounterBorder.png) 0 14 0 2;
+}
+
+.webkit-breakpoint.webkit-execution-line .webkit-line-number-outer {
+ color: white;
+ -webkit-border-image: url(Images/breakpointCounterBorder.png) 0 14 0 2;
+}
+
+.webkit-breakpoint.webkit-execution-line .webkit-line-number-outer {
+ color: transparent;
+ -webkit-border-image: url(Images/breakpointCounterBorder.png) 0 14 0 2;
+}
+
+.webkit-breakpoint-conditional.webkit-execution-line .webkit-line-number-outer {
+ color: transparent;
+ -webkit-border-image: url(Images/breakpointConditionalCounterBorder.png) 0 14 0 2;
+}
+
+.webkit-breakpoint-disabled .webkit-line-number-outer {
+ opacity: 0.5;
+}
+
+.breakpoints-deactivated .webkit-breakpoint .webkit-line-number-outer {
+ opacity: 0.5;
+}
+
+.breakpoints-deactivated .webkit-breakpoint-disabled .webkit-line-number-outer {
+ opacity: 0.3;
+}
+
+.webkit-execution-line.webkit-line-content {
+ background-color: rgb(171, 191, 254);
+ outline: 1px solid rgb(64, 115, 244);
+}
+
+.diff-container .webkit-added-line.webkit-line-content {
+ background-color: rgb(220, 255, 220);
+}
+
+.diff-container .webkit-removed-line.webkit-line-content {
+ background-color: rgb(255, 220, 220);
+ text-decoration: line-through;
+}
+
+.diff-container .webkit-changed-line.webkit-line-content {
+ background-color: rgb(220, 220, 255);
+}
+
+.webkit-search-result {
+ -webkit-border-radius: 4px;
+ padding: 2px 2px 2px 3px;
+ margin: -2px -2px -2px -3px;
+ opacity: 0.8;
+ -webkit-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px;
+ background-color: rgb(241, 234, 0);
+ color: black;
+}
+
+.webkit-highlighted-line.webkit-line-content {
+ -webkit-animation: "fadeout" 2s 0s;
+}
+
+@-webkit-keyframes fadeout {
+ from {background-color: rgb(255, 255, 120); }
+ to { background-color: white; }
+}
http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c4fbd3d0/weinre.build/vendor/webkit/WebCore/inspector/front-end/treeoutline.js
----------------------------------------------------------------------
diff --git a/weinre.build/vendor/webkit/WebCore/inspector/front-end/treeoutline.js b/weinre.build/vendor/webkit/WebCore/inspector/front-end/treeoutline.js
new file mode 100644
index 0000000..27bc839
--- /dev/null
+++ b/weinre.build/vendor/webkit/WebCore/inspector/front-end/treeoutline.js
@@ -0,0 +1,911 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+function TreeOutline(listNode)
+{
+ this.children = [];
+ this.selectedTreeElement = null;
+ this._childrenListNode = listNode;
+ this._childrenListNode.removeChildren();
+ this._knownTreeElements = [];
+ this._treeElementsExpandedState = [];
+ this.expandTreeElementsWhenArrowing = false;
+ this.root = true;
+ this.hasChildren = false;
+ this.expanded = true;
+ this.selected = false;
+ this.treeOutline = this;
+
+ this._childrenListNode.tabIndex = 0;
+ this._childrenListNode.addEventListener("keydown", this._treeKeyDown.bind(this), true);
+}
+
+TreeOutline._knownTreeElementNextIdentifier = 1;
+
+TreeOutline._appendChild = function(child)
+{
+ if (!child)
+ throw("child can't be undefined or null");
+
+ var lastChild = this.children[this.children.length - 1];
+ if (lastChild) {
+ lastChild.nextSibling = child;
+ child.previousSibling = lastChild;
+ } else {
+ child.previousSibling = null;
+ child.nextSibling = null;
+ }
+
+ this.children.push(child);
+ this.hasChildren = true;
+ child.parent = this;
+ child.treeOutline = this.treeOutline;
+ child.treeOutline._rememberTreeElement(child);
+
+ var current = child.children[0];
+ while (current) {
+ current.treeOutline = this.treeOutline;
+ current.treeOutline._rememberTreeElement(current);
+ current = current.traverseNextTreeElement(false, child, true);
+ }
+
+ if (child.hasChildren && child.treeOutline._treeElementsExpandedState[child.identifier] !== undefined)
+ child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier];
+
+ if (!this._childrenListNode) {
+ this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
+ this._childrenListNode.parentTreeElement = this;
+ this._childrenListNode.addStyleClass("children");
+ if (this.hidden)
+ this._childrenListNode.addStyleClass("hidden");
+ }
+
+ child._attach();
+}
+
+TreeOutline._insertChild = function(child, index)
+{
+ if (!child)
+ throw("child can't be undefined or null");
+
+ var previousChild = (index > 0 ? this.children[index - 1] : null);
+ if (previousChild) {
+ previousChild.nextSibling = child;
+ child.previousSibling = previousChild;
+ } else {
+ child.previousSibling = null;
+ }
+
+ var nextChild = this.children[index];
+ if (nextChild) {
+ nextChild.previousSibling = child;
+ child.nextSibling = nextChild;
+ } else {
+ child.nextSibling = null;
+ }
+
+ this.children.splice(index, 0, child);
+ this.hasChildren = true;
+ child.parent = this;
+ child.treeOutline = this.treeOutline;
+ child.treeOutline._rememberTreeElement(child);
+
+ var current = child.children[0];
+ while (current) {
+ current.treeOutline = this.treeOutline;
+ current.treeOutline._rememberTreeElement(current);
+ current = current.traverseNextTreeElement(false, child, true);
+ }
+
+ if (child.hasChildren && child.treeOutline._treeElementsExpandedState[child.identifier] !== undefined)
+ child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier];
+
+ if (!this._childrenListNode) {
+ this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
+ this._childrenListNode.parentTreeElement = this;
+ this._childrenListNode.addStyleClass("children");
+ if (this.hidden)
+ this._childrenListNode.addStyleClass("hidden");
+ }
+
+ child._attach();
+}
+
+TreeOutline._removeChildAtIndex = function(childIndex)
+{
+ if (childIndex < 0 || childIndex >= this.children.length)
+ throw("childIndex out of range");
+
+ var child = this.children[childIndex];
+ this.children.splice(childIndex, 1);
+
+ var parent = child.parent;
+ if (child.deselect()) {
+ if (child.previousSibling)
+ child.previousSibling.select();
+ else if (child.nextSibling)
+ child.nextSibling.select();
+ else
+ parent.select();
+ }
+
+ if (child.previousSibling)
+ child.previousSibling.nextSibling = child.nextSibling;
+ if (child.nextSibling)
+ child.nextSibling.previousSibling = child.previousSibling;
+
+ if (child.treeOutline) {
+ child.treeOutline._forgetTreeElement(child);
+ child.treeOutline._forgetChildrenRecursive(child);
+ }
+
+ child._detach();
+ child.treeOutline = null;
+ child.parent = null;
+ child.nextSibling = null;
+ child.previousSibling = null;
+}
+
+TreeOutline._removeChild = function(child)
+{
+ if (!child)
+ throw("child can't be undefined or null");
+
+ var childIndex = this.children.indexOf(child);
+ if (childIndex === -1)
+ throw("child not found in this node's children");
+
+ TreeOutline._removeChildAtIndex.call(this, childIndex);
+}
+
+TreeOutline._removeChildren = function()
+{
+ for (var i = 0; i < this.children.length; ++i) {
+ var child = this.children[i];
+ child.deselect();
+
+ if (child.treeOutline) {
+ child.treeOutline._forgetTreeElement(child);
+ child.treeOutline._forgetChildrenRecursive(child);
+ }
+
+ child._detach();
+ child.treeOutline = null;
+ child.parent = null;
+ child.nextSibling = null;
+ child.previousSibling = null;
+ }
+
+ this.children = [];
+}
+
+TreeOutline._removeChildrenRecursive = function()
+{
+ var childrenToRemove = this.children;
+
+ var child = this.children[0];
+ while (child) {
+ if (child.children.length)
+ childrenToRemove = childrenToRemove.concat(child.children);
+ child = child.traverseNextTreeElement(false, this, true);
+ }
+
+ for (var i = 0; i < childrenToRemove.length; ++i) {
+ var child = childrenToRemove[i];
+ child.deselect();
+ if (child.treeOutline)
+ child.treeOutline._forgetTreeElement(child);
+ child._detach();
+ child.children = [];
+ child.treeOutline = null;
+ child.parent = null;
+ child.nextSibling = null;
+ child.previousSibling = null;
+ }
+
+ this.children = [];
+}
+
+TreeOutline.prototype._rememberTreeElement = function(element)
+{
+ if (!this._knownTreeElements[element.identifier])
+ this._knownTreeElements[element.identifier] = [];
+
+ // check if the element is already known
+ var elements = this._knownTreeElements[element.identifier];
+ if (elements.indexOf(element) !== -1)
+ return;
+
+ // add the element
+ elements.push(element);
+}
+
+TreeOutline.prototype._forgetTreeElement = function(element)
+{
+ if (this._knownTreeElements[element.identifier])
+ this._knownTreeElements[element.identifier].remove(element, true);
+}
+
+TreeOutline.prototype._forgetChildrenRecursive = function(parentElement)
+{
+ var child = parentElement.children[0];
+ while (child) {
+ this._forgetTreeElement(child);
+ child = child.traverseNextTreeElement(false, this, true);
+ }
+}
+
+TreeOutline.prototype.getCachedTreeElement = function(representedObject)
+{
+ if (!representedObject)
+ return null;
+
+ if ("__treeElementIdentifier" in representedObject) {
+ // If this representedObject has a tree element identifier, and it is a known TreeElement
+ // in our tree we can just return that tree element.
+ var elements = this._knownTreeElements[representedObject.__treeElementIdentifier];
+ if (elements) {
+ for (var i = 0; i < elements.length; ++i)
+ if (elements[i].representedObject === representedObject)
+ return elements[i];
+ }
+ }
+ return null;
+}
+
+TreeOutline.prototype.findTreeElement = function(representedObject, isAncestor, getParent)
+{
+ if (!representedObject)
+ return null;
+
+ var cachedElement = this.getCachedTreeElement(representedObject);
+ if (cachedElement)
+ return cachedElement;
+
+ // The representedObject isn't known, so we start at the top of the tree and work down to find the first
+ // tree element that represents representedObject or one of its ancestors.
+ var item;
+ var found = false;
+ for (var i = 0; i < this.children.length; ++i) {
+ item = this.children[i];
+ if (item.representedObject === representedObject || isAncestor(item.representedObject, representedObject)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ return null;
+
+ // Make sure the item that we found is connected to the root of the tree.
+ // Build up a list of representedObject's ancestors that aren't already in our tree.
+ var ancestors = [];
+ var currentObject = representedObject;
+ while (currentObject) {
+ ancestors.unshift(currentObject);
+ if (currentObject === item.representedObject)
+ break;
+ currentObject = getParent(currentObject);
+ }
+
+ // For each of those ancestors we populate them to fill in the tree.
+ for (var i = 0; i < ancestors.length; ++i) {
+ // Make sure we don't call findTreeElement with the same representedObject
+ // again, to prevent infinite recursion.
+ if (ancestors[i] === representedObject)
+ continue;
+ // FIXME: we could do something faster than findTreeElement since we will know the next
+ // ancestor exists in the tree.
+ item = this.findTreeElement(ancestors[i], isAncestor, getParent);
+ if (item && item.onpopulate)
+ item.onpopulate(item);
+ }
+
+ return this.getCachedTreeElement(representedObject);
+}
+
+TreeOutline.prototype.treeElementFromPoint = function(x, y)
+{
+ var node = this._childrenListNode.ownerDocument.elementFromPoint(x, y);
+ var listNode = node.enclosingNodeOrSelfWithNodeNameInArray(["ol", "li"]);
+ if (listNode)
+ return listNode.parentTreeElement || listNode.treeElement;
+ return null;
+}
+
+TreeOutline.prototype._treeKeyDown = function(event)
+{
+ if (event.target !== this._childrenListNode)
+ return;
+
+ if (!this.selectedTreeElement || event.shiftKey || event.metaKey || event.ctrlKey)
+ return;
+
+ var handled = false;
+ var nextSelectedElement;
+ if (event.keyIdentifier === "Up" && !event.altKey) {
+ nextSelectedElement = this.selectedTreeElement.traversePreviousTreeElement(true);
+ while (nextSelectedElement && !nextSelectedElement.selectable)
+ nextSelectedElement = nextSelectedElement.traversePreviousTreeElement(!this.expandTreeElementsWhenArrowing);
+ handled = nextSelectedElement ? true : false;
+ } else if (event.keyIdentifier === "Down" && !event.altKey) {
+ nextSelectedElement = this.selectedTreeElement.traverseNextTreeElement(true);
+ while (nextSelectedElement && !nextSelectedElement.selectable)
+ nextSelectedElement = nextSelectedElement.traverseNextTreeElement(!this.expandTreeElementsWhenArrowing);
+ handled = nextSelectedElement ? true : false;
+ } else if (event.keyIdentifier === "Left") {
+ if (this.selectedTreeElement.expanded) {
+ if (event.altKey)
+ this.selectedTreeElement.collapseRecursively();
+ else
+ this.selectedTreeElement.collapse();
+ handled = true;
+ } else if (this.selectedTreeElement.parent && !this.selectedTreeElement.parent.root) {
+ handled = true;
+ if (this.selectedTreeElement.parent.selectable) {
+ nextSelectedElement = this.selectedTreeElement.parent;
+ handled = nextSelectedElement ? true : false;
+ } else if (this.selectedTreeElement.parent)
+ this.selectedTreeElement.parent.collapse();
+ }
+ } else if (event.keyIdentifier === "Right") {
+ if (!this.selectedTreeElement.revealed()) {
+ this.selectedTreeElement.reveal();
+ handled = true;
+ } else if (this.selectedTreeElement.hasChildren) {
+ handled = true;
+ if (this.selectedTreeElement.expanded) {
+ nextSelectedElement = this.selectedTreeElement.children[0];
+ handled = nextSelectedElement ? true : false;
+ } else {
+ if (event.altKey)
+ this.selectedTreeElement.expandRecursively();
+ else
+ this.selectedTreeElement.expand();
+ }
+ }
+ } else if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Backspace.code || event.keyCode === WebInspector.KeyboardShortcut.Keys.Delete.code) {
+ if (this.selectedTreeElement.ondelete)
+ handled = this.selectedTreeElement.ondelete();
+ } else if (isEnterKey(event)) {
+ if (this.selectedTreeElement.onenter)
+ handled = this.selectedTreeElement.onenter();
+ }
+
+ if (nextSelectedElement) {
+ nextSelectedElement.reveal();
+ nextSelectedElement.select(false, true);
+ }
+
+ if (handled) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+}
+
+TreeOutline.prototype.expand = function()
+{
+ // this is the root, do nothing
+}
+
+TreeOutline.prototype.collapse = function()
+{
+ // this is the root, do nothing
+}
+
+TreeOutline.prototype.revealed = function()
+{
+ return true;
+}
+
+TreeOutline.prototype.reveal = function()
+{
+ // this is the root, do nothing
+}
+
+TreeOutline.prototype.select = function()
+{
+ // this is the root, do nothing
+}
+
+TreeOutline.prototype.appendChild = TreeOutline._appendChild;
+TreeOutline.prototype.insertChild = TreeOutline._insertChild;
+TreeOutline.prototype.removeChild = TreeOutline._removeChild;
+TreeOutline.prototype.removeChildAtIndex = TreeOutline._removeChildAtIndex;
+TreeOutline.prototype.removeChildren = TreeOutline._removeChildren;
+TreeOutline.prototype.removeChildrenRecursive = TreeOutline._removeChildrenRecursive;
+
+function TreeElement(title, representedObject, hasChildren)
+{
+ this._title = title;
+ this.representedObject = (representedObject || {});
+
+ if (this.representedObject.__treeElementIdentifier)
+ this.identifier = this.representedObject.__treeElementIdentifier;
+ else {
+ this.identifier = TreeOutline._knownTreeElementNextIdentifier++;
+ this.representedObject.__treeElementIdentifier = this.identifier;
+ }
+
+ this._hidden = false;
+ this.expanded = false;
+ this.selected = false;
+ this.hasChildren = hasChildren;
+ this.children = [];
+ this.treeOutline = null;
+ this.parent = null;
+ this.previousSibling = null;
+ this.nextSibling = null;
+ this._listItemNode = null;
+}
+
+TreeElement.prototype = {
+ selectable: true,
+ arrowToggleWidth: 10,
+
+ get listItemElement() {
+ return this._listItemNode;
+ },
+
+ get childrenListElement() {
+ return this._childrenListNode;
+ },
+
+ get title() {
+ return this._title;
+ },
+
+ set title(x) {
+ this._title = x;
+ this._setListItemNodeContent();
+ },
+
+ get titleHTML() {
+ return this._titleHTML;
+ },
+
+ set titleHTML(x) {
+ this._titleHTML = x;
+ this._setListItemNodeContent();
+ },
+
+ get tooltip() {
+ return this._tooltip;
+ },
+
+ set tooltip(x) {
+ this._tooltip = x;
+ if (this._listItemNode)
+ this._listItemNode.title = x ? x : "";
+ },
+
+ get hasChildren() {
+ return this._hasChildren;
+ },
+
+ set hasChildren(x) {
+ if (this._hasChildren === x)
+ return;
+
+ this._hasChildren = x;
+
+ if (!this._listItemNode)
+ return;
+
+ if (x)
+ this._listItemNode.addStyleClass("parent");
+ else {
+ this._listItemNode.removeStyleClass("parent");
+ this.collapse();
+ }
+ },
+
+ get hidden() {
+ return this._hidden;
+ },
+
+ set hidden(x) {
+ if (this._hidden === x)
+ return;
+
+ this._hidden = x;
+
+ if (x) {
+ if (this._listItemNode)
+ this._listItemNode.addStyleClass("hidden");
+ if (this._childrenListNode)
+ this._childrenListNode.addStyleClass("hidden");
+ } else {
+ if (this._listItemNode)
+ this._listItemNode.removeStyleClass("hidden");
+ if (this._childrenListNode)
+ this._childrenListNode.removeStyleClass("hidden");
+ }
+ },
+
+ get shouldRefreshChildren() {
+ return this._shouldRefreshChildren;
+ },
+
+ set shouldRefreshChildren(x) {
+ this._shouldRefreshChildren = x;
+ if (x && this.expanded)
+ this.expand();
+ },
+
+ _setListItemNodeContent: function()
+ {
+ if (!this._listItemNode)
+ return;
+
+ if (!this._titleHTML && !this._title)
+ this._listItemNode.removeChildren();
+ else if (typeof this._titleHTML === "string")
+ this._listItemNode.innerHTML = this._titleHTML;
+ else if (typeof this._title === "string")
+ this._listItemNode.textContent = this._title;
+ else {
+ this._listItemNode.removeChildren();
+ if (this._title.parentNode)
+ this._title.parentNode.removeChild(this._title);
+ this._listItemNode.appendChild(this._title);
+ }
+ }
+}
+
+TreeElement.prototype.appendChild = TreeOutline._appendChild;
+TreeElement.prototype.insertChild = TreeOutline._insertChild;
+TreeElement.prototype.removeChild = TreeOutline._removeChild;
+TreeElement.prototype.removeChildAtIndex = TreeOutline._removeChildAtIndex;
+TreeElement.prototype.removeChildren = TreeOutline._removeChildren;
+TreeElement.prototype.removeChildrenRecursive = TreeOutline._removeChildrenRecursive;
+
+TreeElement.prototype._attach = function()
+{
+ if (!this._listItemNode || this.parent._shouldRefreshChildren) {
+ if (this._listItemNode && this._listItemNode.parentNode)
+ this._listItemNode.parentNode.removeChild(this._listItemNode);
+
+ this._listItemNode = this.treeOutline._childrenListNode.ownerDocument.createElement("li");
+ this._listItemNode.treeElement = this;
+ this._setListItemNodeContent();
+ this._listItemNode.title = this._tooltip ? this._tooltip : "";
+
+ if (this.hidden)
+ this._listItemNode.addStyleClass("hidden");
+ if (this.hasChildren)
+ this._listItemNode.addStyleClass("parent");
+ if (this.expanded)
+ this._listItemNode.addStyleClass("expanded");
+ if (this.selected)
+ this._listItemNode.addStyleClass("selected");
+
+ this._listItemNode.addEventListener("mousedown", TreeElement.treeElementMouseDown, false);
+ this._listItemNode.addEventListener("click", TreeElement.treeElementToggled, false);
+ this._listItemNode.addEventListener("dblclick", TreeElement.treeElementDoubleClicked, false);
+
+ if (this.onattach)
+ this.onattach(this);
+ }
+
+ var nextSibling = null;
+ if (this.nextSibling && this.nextSibling._listItemNode && this.nextSibling._listItemNode.parentNode === this.parent._childrenListNode)
+ nextSibling = this.nextSibling._listItemNode;
+ this.parent._childrenListNode.insertBefore(this._listItemNode, nextSibling);
+ if (this._childrenListNode)
+ this.parent._childrenListNode.insertBefore(this._childrenListNode, this._listItemNode.nextSibling);
+ if (this.selected)
+ this.select();
+ if (this.expanded)
+ this.expand();
+}
+
+TreeElement.prototype._detach = function()
+{
+ if (this._listItemNode && this._listItemNode.parentNode)
+ this._listItemNode.parentNode.removeChild(this._listItemNode);
+ if (this._childrenListNode && this._childrenListNode.parentNode)
+ this._childrenListNode.parentNode.removeChild(this._childrenListNode);
+}
+
+TreeElement.treeElementMouseDown = function(event)
+{
+ var element = event.currentTarget;
+ if (!element || !element.treeElement || !element.treeElement.selectable)
+ return;
+
+ if (element.treeElement.isEventWithinDisclosureTriangle(event))
+ return;
+
+ element.treeElement.selectOnMouseDown(event);
+}
+
+TreeElement.treeElementToggled = function(event)
+{
+ var element = event.currentTarget;
+ if (!element || !element.treeElement)
+ return;
+
+ if (!element.treeElement.isEventWithinDisclosureTriangle(event))
+ return;
+
+ if (element.treeElement.expanded) {
+ if (event.altKey)
+ element.treeElement.collapseRecursively();
+ else
+ element.treeElement.collapse();
+ } else {
+ if (event.altKey)
+ element.treeElement.expandRecursively();
+ else
+ element.treeElement.expand();
+ }
+ event.stopPropagation();
+}
+
+TreeElement.treeElementDoubleClicked = function(event)
+{
+ var element = event.currentTarget;
+ if (!element || !element.treeElement)
+ return;
+
+ if (element.treeElement.ondblclick)
+ element.treeElement.ondblclick.call(element.treeElement, event);
+ else if (element.treeElement.hasChildren && !element.treeElement.expanded)
+ element.treeElement.expand();
+}
+
+TreeElement.prototype.collapse = function()
+{
+ if (this._listItemNode)
+ this._listItemNode.removeStyleClass("expanded");
+ if (this._childrenListNode)
+ this._childrenListNode.removeStyleClass("expanded");
+
+ this.expanded = false;
+ if (this.treeOutline)
+ this.treeOutline._treeElementsExpandedState[this.identifier] = true;
+
+ if (this.oncollapse)
+ this.oncollapse(this);
+}
+
+TreeElement.prototype.collapseRecursively = function()
+{
+ var item = this;
+ while (item) {
+ if (item.expanded)
+ item.collapse();
+ item = item.traverseNextTreeElement(false, this, true);
+ }
+}
+
+TreeElement.prototype.expand = function()
+{
+ if (!this.hasChildren || (this.expanded && !this._shouldRefreshChildren && this._childrenListNode))
+ return;
+
+ if (this.treeOutline && (!this._childrenListNode || this._shouldRefreshChildren)) {
+ if (this._childrenListNode && this._childrenListNode.parentNode)
+ this._childrenListNode.parentNode.removeChild(this._childrenListNode);
+
+ this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
+ this._childrenListNode.parentTreeElement = this;
+ this._childrenListNode.addStyleClass("children");
+
+ if (this.hidden)
+ this._childrenListNode.addStyleClass("hidden");
+
+ if (this.onpopulate)
+ this.onpopulate(this);
+
+ for (var i = 0; i < this.children.length; ++i)
+ this.children[i]._attach();
+
+ delete this._shouldRefreshChildren;
+ }
+
+ if (this._listItemNode) {
+ this._listItemNode.addStyleClass("expanded");
+ if (this._childrenListNode && this._childrenListNode.parentNode != this._listItemNode.parentNode)
+ this.parent._childrenListNode.insertBefore(this._childrenListNode, this._listItemNode.nextSibling);
+ }
+
+ if (this._childrenListNode)
+ this._childrenListNode.addStyleClass("expanded");
+
+ this.expanded = true;
+ if (this.treeOutline)
+ this.treeOutline._treeElementsExpandedState[this.identifier] = true;
+
+ if (this.onexpand)
+ this.onexpand(this);
+}
+
+TreeElement.prototype.expandRecursively = function(maxDepth)
+{
+ var item = this;
+ var info = {};
+ var depth = 0;
+
+ // The Inspector uses TreeOutlines to represents object properties, so recursive expansion
+ // in some case can be infinite, since JavaScript objects can hold circular references.
+ // So default to a recursion cap of 3 levels, since that gives fairly good results.
+ if (typeof maxDepth === "undefined" || typeof maxDepth === "null")
+ maxDepth = 3;
+
+ while (item) {
+ if (depth < maxDepth)
+ item.expand();
+ item = item.traverseNextTreeElement(false, this, (depth >= maxDepth), info);
+ depth += info.depthChange;
+ }
+}
+
+TreeElement.prototype.hasAncestor = function(ancestor) {
+ if (!ancestor)
+ return false;
+
+ var currentNode = this.parent;
+ while (currentNode) {
+ if (ancestor === currentNode)
+ return true;
+ currentNode = currentNode.parent;
+ }
+
+ return false;
+}
+
+TreeElement.prototype.reveal = function()
+{
+ var currentAncestor = this.parent;
+ while (currentAncestor && !currentAncestor.root) {
+ if (!currentAncestor.expanded)
+ currentAncestor.expand();
+ currentAncestor = currentAncestor.parent;
+ }
+
+ if (this.onreveal)
+ this.onreveal(this);
+}
+
+TreeElement.prototype.revealed = function()
+{
+ var currentAncestor = this.parent;
+ while (currentAncestor && !currentAncestor.root) {
+ if (!currentAncestor.expanded)
+ return false;
+ currentAncestor = currentAncestor.parent;
+ }
+
+ return true;
+}
+
+TreeElement.prototype.selectOnMouseDown = function(event)
+{
+ this.select(false, true);
+}
+
+TreeElement.prototype.select = function(supressOnSelect, selectedByUser)
+{
+ if (!this.treeOutline || !this.selectable || this.selected)
+ return;
+
+ if (this.treeOutline.selectedTreeElement)
+ this.treeOutline.selectedTreeElement.deselect();
+
+ this.selected = true;
+ this.treeOutline._childrenListNode.focus();
+
+ // Focusing on another node may detach "this" from tree.
+ if (!this.treeOutline)
+ return;
+ this.treeOutline.selectedTreeElement = this;
+ if (this._listItemNode)
+ this._listItemNode.addStyleClass("selected");
+
+ if (this.onselect && !supressOnSelect)
+ this.onselect(this, selectedByUser);
+}
+
+TreeElement.prototype.deselect = function(supressOnDeselect)
+{
+ if (!this.treeOutline || this.treeOutline.selectedTreeElement !== this || !this.selected)
+ return false;
+
+ this.selected = false;
+ this.treeOutline.selectedTreeElement = null;
+ if (this._listItemNode)
+ this._listItemNode.removeStyleClass("selected");
+
+ if (this.ondeselect && !supressOnDeselect)
+ this.ondeselect(this);
+ return true;
+}
+
+TreeElement.prototype.traverseNextTreeElement = function(skipHidden, stayWithin, dontPopulate, info)
+{
+ if (!dontPopulate && this.hasChildren && this.onpopulate)
+ this.onpopulate(this);
+
+ if (info)
+ info.depthChange = 0;
+
+ var element = skipHidden ? (this.revealed() ? this.children[0] : null) : this.children[0];
+ if (element && (!skipHidden || (skipHidden && this.expanded))) {
+ if (info)
+ info.depthChange = 1;
+ return element;
+ }
+
+ if (this === stayWithin)
+ return null;
+
+ element = skipHidden ? (this.revealed() ? this.nextSibling : null) : this.nextSibling;
+ if (element)
+ return element;
+
+ element = this;
+ while (element && !element.root && !(skipHidden ? (element.revealed() ? element.nextSibling : null) : element.nextSibling) && element.parent !== stayWithin) {
+ if (info)
+ info.depthChange -= 1;
+ element = element.parent;
+ }
+
+ if (!element)
+ return null;
+
+ return (skipHidden ? (element.revealed() ? element.nextSibling : null) : element.nextSibling);
+}
+
+TreeElement.prototype.traversePreviousTreeElement = function(skipHidden, dontPopulate)
+{
+ var element = skipHidden ? (this.revealed() ? this.previousSibling : null) : this.previousSibling;
+ if (!dontPopulate && element && element.hasChildren && element.onpopulate)
+ element.onpopulate(element);
+
+ while (element && (skipHidden ? (element.revealed() && element.expanded ? element.children[element.children.length - 1] : null) : element.children[element.children.length - 1])) {
+ if (!dontPopulate && element.hasChildren && element.onpopulate)
+ element.onpopulate(element);
+ element = (skipHidden ? (element.revealed() && element.expanded ? element.children[element.children.length - 1] : null) : element.children[element.children.length - 1]);
+ }
+
+ if (element)
+ return element;
+
+ if (!this.parent || this.parent.root)
+ return null;
+
+ return this.parent;
+}
+
+TreeElement.prototype.isEventWithinDisclosureTriangle = function(event)
+{
+ var left = this._listItemNode.totalOffsetLeft;
+ return event.pageX >= left && event.pageX <= left + this.arrowToggleWidth && this.hasChildren;
+}