12013-06-10  Timothy Hatcher  <timothy@apple.com>
2
3        Remove Xcode 4 skin and only have the Xcode 5 look.
4
5        Reviewed by Joseph Pecoraro.
6
7        * UserInterface/ButtonNavigationItem.css:
8        (.navigation-bar .item.button.suppress-emboss.disabled > .glyph):
9        * UserInterface/CodeMirrorOverrides.css:
10        * UserInterface/DashboardView.css:
11        (.toolbar .dashboard):
12        (body.window-inactive .toolbar .dashboard):
13        (.toolbar.collapsed .dashboard):
14        (.toolbar.collapsed .dashboard > .logs):
15        * UserInterface/DashboardView.js:
16        (WebInspector.DashboardView):
17        (WebInspector.DashboardView.prototype._setItemEnabled):
18        * UserInterface/DetailsSection.css:
19        * UserInterface/DividerNavigationItem.css:
20        (.navigation-bar .item.divider):
21        * UserInterface/FilterBar.css:
22        (.filter-bar > input[type="search"]):
23        (.filter-bar > input[type="search"]::-webkit-input-placeholder):
24        (.filter-bar > input[type="search"]:valid):
25        * UserInterface/FindBanner.css:
26        (.find-banner > input[type="search"]):
27        (.find-banner > button):
28        * UserInterface/HierarchicalPathComponent.css:
29        * UserInterface/InstrumentSidebarPanel.css:
30        * UserInterface/LayerTreeSidebarPanel.css:
31        * UserInterface/Main.css:
32        (#split-content-browser > .navigation-bar):
33        * UserInterface/NavigationBar.css:
34        * UserInterface/NavigationSidebarPanel.css:
35        * UserInterface/RadioButtonNavigationItem.css:
36        (.navigation-bar .item.radio.button.text-only.selected):
37        * UserInterface/ResourceSidebarPanel.css:
38        * UserInterface/ResourceSidebarPanel.js:
39        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
40        * UserInterface/ScopeBar.css:
41        (.scope-bar > li):
42        (.scope-bar > li:active):
43        (.scope-bar > li:hover):
44        (.scope-bar > li.selected):
45        * UserInterface/SearchBar.css:
46        (.search-bar > input[type="search"]):
47        (.search-bar > input[type="search"]::-webkit-input-placeholder):
48        (.search-bar > input[type="search"]:valid):
49        * UserInterface/TimelinesContentView.css:
50        (.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
51
522013-06-08  Timothy Hatcher  <timothy@apple.com>
53
54        Improve switching from the full view console to the Resource sidebar, so the previous resource is shown in the content browser again.
55
56        Also cleans up my earlier changes and removes an assert that can fire often now.
57
58        <rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
59
60        Reviewed by Antoine Quint.
61
62        * UserInterface/Main.js:
63        (WebInspector.showFullHeightConsole):
64        (WebInspector._sidebarCollapsedStateDidChange): Call _updateNavigationSidebarForCurrentContentView for the navigation sidebar.
65        (WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Only do this work if the sidebar is not collapsed. We don't
66        want to deselect items if the sidebar is collapsed, preserving the selection is important when showing the sidebar later.
67        (WebInspector._updateNavigationSidebarForCurrentContentView): Added. Split off from _navigationSidebarPanelSelected. Only do this work
68        if the sidebar is not collapsed.
69        (WebInspector._navigationSidebarPanelSelected): Call _updateNavigationSidebarForCurrentContentView.
70        (WebInspector._contentBrowserCurrentContentViewDidChange): Clean up by returning early if there is no current content view.
71        * UserInterface/ResourceSidebarPanel.js:
72        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Remove an assert that can happen a lot now.
73
742013-06-07  Antoine Quint  <graouts@apple.com>
75
76        <rdar://problem/14094308> Styles should come before Layers details sidebar
77
78        Switch Layers and Styles.
79
80        Reviewed by Timothy Hatcher.
81
82        * UserInterface/CSSStyleDetailsSidebarPanel.js:
83        (WebInspector.CSSStyleDetailsSidebarPanel):
84        * UserInterface/LayerTreeSidebarPanel.js:
85        (WebInspector.LayerTreeSidebarPanel):
86        * UserInterface/Main.js:
87        (WebInspector.contentLoaded):
88
892013-06-07  Timothy Hatcher  <timothy@apple.com>
90
91        Keep the selected tree element in sync with the current content view.
92
93        <rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
94
95        Reviewed by Antoine Quint.
96
97        * UserInterface/Main.js:
98        (WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Added.
99        (WebInspector._navigationSidebarPanelSelected): Call _revealAndSelectRepresentedObjectInNavigationSidebar.
100        (WebInspector._contentBrowserCurrentContentViewDidChange): Ditto.
101
1022013-06-07  Timothy Hatcher  <timothy@apple.com>
103
104        Keep the navigation sidebar and the current content view in sync with a set of allowed sidebars per content view.
105
106        <rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
107
108        Reviewed by Antoine Quint.
109
110        * UserInterface/ContentView.js:
111        (WebInspector.ContentView.prototype.get allowedNavigationSidebarPanels): Added.
112        * UserInterface/FrameContentView.js:
113        (WebInspector.FrameContentView.prototype.get allowedNavigationSidebarPanels): Added.
114        * UserInterface/Main.js:
115        (WebInspector.showSplitConsole): Show the navigation sidebar if it was showing.
116        (WebInspector.showFullHeightConsole): Hide the navigation sidebar and remember if it was showing.
117        (WebInspector.toggleConsoleView): Show the sidebar if it was showing.
118        (WebInspector._navigationSidebarPanelSelected): Ensure the navigation sidebar panel is allowed by the current content view.
119        (WebInspector._contentBrowserCurrentContentViewDidChange): Ditto.
120        * UserInterface/NavigationSidebarPanel.js:
121        (WebInspector.NavigationSidebarPanel.prototype.showContentViewForCurrentSelection):
122        (WebInspector.NavigationSidebarPanel.prototype.shown):
123        * UserInterface/ProfileView.js:
124        (WebInspector.ProfileView.prototype.get allowedNavigationSidebarPanels): Added.
125        * UserInterface/ResourceClusterContentView.js:
126        (WebInspector.ResourceClusterContentView.prototype.get allowedNavigationSidebarPanels): Added.
127        * UserInterface/TimelinesContentView.js:
128        (WebInspector.TimelinesContentView.prototype.get allowedNavigationSidebarPanels): Added.
129
1302013-06-06  Timothy Hatcher  <timothy@apple.com>
131
132        Properly filter into resources with a source map if they haven't been expanded yet.
133
134        <rdar://problem/14072548> Resources filter shows "No Filter Results" after reload with SourceMaps
135
136        Reviewed by Joseph Pecoraro.
137
138        * UserInterface/NavigationSidebarPanel.js:
139        (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Pass false to
140        traverseNextTreeElement to cause the tree elements to be populated. This matches the interactive
141        case when typing into the filter bar, which already worked with source maps.
142
1432013-06-05  Antoine Quint  <graouts@apple.com>
144
145        <rdar://problem/14077407> Jumping to an error in a JS file form the console highlights to white first before going back to red
146
147        Remove the explicit �to� color in the CSS animation we use to highlight a link
148        in the text editor as it is revealed, which means the �to� color will be the
149        underlying color set on the element. This will animate to red for errors,
150        yellow for warnings, and transparent for regular lines.
151
152        Reviewed by Timothy Hatcher.
153
154        * UserInterface/TextEditor.css:
155        (@-webkit-keyframes text-editor-highlight-fadeout):
156
1572013-06-05  Antoine Quint  <graouts@apple.com>
158
159        <rdar://problem/14077152> Activity viewer does not update error count for grouped errors when inspector is closed.
160
161        Take into account the repeat count of an error when incrementing
162        the message count.
163
164        Reviewed by Timothy Hatcher.
165
166        * UserInterface/DashboardManager.js:
167        (WebInspector.DashboardManager.prototype._consoleMessageAdded):
168        (WebInspector.DashboardManager.prototype._consoleMessageWasRepeated):
169        (WebInspector.DashboardManager.prototype._incrementConsoleMessageType):
170
1712013-06-05  Joseph Pecoraro  <pecoraro@apple.com>
172
173        <rdar://problem/14072409> Pressing Enter/Esc when editing a breakpoint (conditional breakpoint) should dismiss popover
174
175        Handle Esc and Enter on the <input> to dismiss the popover.
176        This behaves like Xcode's breakpoint condition popover.
177
178        Reviewed by Timothy Hatcher.
179
180        * UserInterface/Breakpoint.js:
181        (WebInspector.Breakpoint.prototype._popoverConditionInputKeyDown):
182        (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
183        (WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
184
1852013-06-05  Joseph Pecoraro  <pecoraro@apple.com>
186
187        <rdar://problem/14054886> Pressing Enter in a blank console should do nothing, not insert a newline
188
189        Reviewed by Antoine Quint.
190
191        * UserInterface/ConsolePrompt.js:
192
1932013-06-05  Timothy Hatcher  <timothy@apple.com>
194
195        Add/update copyright and license to all the user interface files in
196        preparation for open sourcing to WebKit.
197
198        Rubber-stamped by Antoine Quint.
199
200        * UserInterface/ActivateButtonNavigationItem.js:
201        * UserInterface/ActivateButtonToolbarItem.js:
202        * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
203        * UserInterface/ApplicationCacheFrame.js:
204        * UserInterface/ApplicationCacheFrameContentView.css:
205        * UserInterface/ApplicationCacheFrameContentView.js:
206        * UserInterface/ApplicationCacheFrameTreeElement.js:
207        * UserInterface/ApplicationCacheIcons.css:
208        * UserInterface/ApplicationCacheManager.js:
209        * UserInterface/ApplicationCacheManifest.js:
210        * UserInterface/ApplicationCacheManifestTreeElement.js:
211        * UserInterface/ApplicationCacheObserver.js:
212        * UserInterface/BinarySearch.js:
213        * UserInterface/BlankStylePropertiesSection.js:
214        * UserInterface/BottomUpProfileDataGridTree.js:
215        * UserInterface/BoxModelDetailsSectionRow.css:
216        * UserInterface/BoxModelDetailsSectionRow.js:
217        * UserInterface/Branch.js:
218        * UserInterface/BranchManager.js:
219        * UserInterface/Breakpoint.css:
220        * UserInterface/Breakpoint.js:
221        * UserInterface/BreakpointIcons.css:
222        * UserInterface/BreakpointTreeElement.css:
223        * UserInterface/BreakpointTreeElement.js:
224        * UserInterface/ButtonNavigationItem.css:
225        * UserInterface/ButtonNavigationItem.js:
226        * UserInterface/ButtonToolbarItem.css:
227        * UserInterface/ButtonToolbarItem.js:
228        * UserInterface/CSSCompletions.js:
229        * UserInterface/CSSKeywordCompletions.js:
230        * UserInterface/CSSMedia.js:
231        * UserInterface/CSSObserver.js:
232        * UserInterface/CSSProperty.js:
233        * UserInterface/CSSRule.js:
234        * UserInterface/CSSSelectorProfileObject.js:
235        * UserInterface/CSSSelectorProfileType.js:
236        * UserInterface/CSSSelectorProfileView.js:
237        * UserInterface/CSSStyleDeclaration.js:
238        * UserInterface/CSSStyleDeclarationSection.css:
239        * UserInterface/CSSStyleDeclarationSection.js:
240        * UserInterface/CSSStyleDeclarationTextEditor.css:
241        * UserInterface/CSSStyleDeclarationTextEditor.js:
242        * UserInterface/CSSStyleDetailsSidebarPanel.css:
243        * UserInterface/CSSStyleDetailsSidebarPanel.js:
244        * UserInterface/CSSStyleManager.js:
245        * UserInterface/CSSStyleSheet.js:
246        * UserInterface/CallFrame.js:
247        * UserInterface/CallFrameIcons.css:
248        * UserInterface/CallFrameTreeElement.js:
249        * UserInterface/ClusterContentView.css:
250        * UserInterface/ClusterContentView.js:
251        * UserInterface/CodeMirrorAdditions.js:
252        * UserInterface/CodeMirrorCompletionController.css:
253        * UserInterface/CodeMirrorCompletionController.js:
254        * UserInterface/CodeMirrorFormatters.js:
255        * UserInterface/CodeMirrorOverrides.css:
256        * UserInterface/CodeMirrorTokenTrackingController.css:
257        * UserInterface/CodeMirrorTokenTrackingController.js:
258        * UserInterface/Color.js:
259        * UserInterface/CompletionSuggestionsView.css:
260        * UserInterface/CompletionSuggestionsView.js:
261        * UserInterface/ComputedStyleDetailsPanel.js:
262        * UserInterface/ConsoleCommand.js:
263        * UserInterface/ConsoleCommandResult.js:
264        * UserInterface/ConsoleGroup.js:
265        * UserInterface/ConsoleMessage.js:
266        * UserInterface/ConsoleMessageImpl.js:
267        * UserInterface/ConsoleObserver.js:
268        * UserInterface/ConsolePrompt.css:
269        * UserInterface/ConsolePrompt.js:
270        * UserInterface/ContentBrowser.css:
271        * UserInterface/ContentBrowser.js:
272        * UserInterface/ContentView.css:
273        * UserInterface/ContentView.js:
274        * UserInterface/ContentViewContainer.css:
275        * UserInterface/ContentViewContainer.js:
276        * UserInterface/ContextMenu.js:
277        * UserInterface/ControlToolbarItem.css:
278        * UserInterface/ControlToolbarItem.js:
279        * UserInterface/CookieIcon.css:
280        * UserInterface/CookieStorageContentView.css:
281        * UserInterface/CookieStorageContentView.js:
282        * UserInterface/CookieStorageObject.js:
283        * UserInterface/CookieStorageTreeElement.js:
284        * UserInterface/DOMDetailsSidebarPanel.js:
285        * UserInterface/DOMNode.js:
286        * UserInterface/DOMNodeDetailsSidebarPanel.js:
287        * UserInterface/DOMNodeStyles.js:
288        * UserInterface/DOMObserver.js:
289        * UserInterface/DOMSearchMatchObject.js:
290        * UserInterface/DOMStorageContentView.css:
291        * UserInterface/DOMStorageContentView.js:
292        * UserInterface/DOMStorageIcons.css:
293        * UserInterface/DOMStorageObject.js:
294        * UserInterface/DOMStorageObserver.js:
295        * UserInterface/DOMStorageTreeElement.js:
296        * UserInterface/DOMTree.js:
297        * UserInterface/DOMTreeContentView.css:
298        * UserInterface/DOMTreeContentView.js:
299        * UserInterface/DOMTreeElement.js:
300        * UserInterface/DOMTreeElementPathComponent.js:
301        * UserInterface/DOMTreeManager.js:
302        * UserInterface/DOMTreeOutline.css:
303        * UserInterface/DOMTreeOutline.js:
304        * UserInterface/DOMTreeUpdater.js:
305        * UserInterface/DOMUtilities.js:
306        * UserInterface/DashboardManager.js:
307        * UserInterface/DashboardView.css:
308        * UserInterface/DashboardView.js:
309        * UserInterface/DataGrid.css:
310        * UserInterface/DataGrid.js:
311        * UserInterface/DatabaseContentView.css:
312        * UserInterface/DatabaseContentView.js:
313        * UserInterface/DatabaseHostTreeElement.js:
314        * UserInterface/DatabaseIcon.css:
315        * UserInterface/DatabaseObject.js:
316        * UserInterface/DatabaseObserver.js:
317        * UserInterface/DatabaseTableContentView.css:
318        * UserInterface/DatabaseTableContentView.js:
319        * UserInterface/DatabaseTableIcon.css:
320        * UserInterface/DatabaseTableObject.js:
321        * UserInterface/DatabaseTableTreeElement.js:
322        * UserInterface/DatabaseTreeElement.js:
323        * UserInterface/DebuggerManager.js:
324        * UserInterface/DebuggerObserver.js:
325        * UserInterface/DebuggerSidebarPanel.css:
326        * UserInterface/DebuggerSidebarPanel.js:
327        * UserInterface/DetailsSection.css:
328        * UserInterface/DetailsSection.js:
329        * UserInterface/DetailsSectionDataGridRow.js:
330        * UserInterface/DetailsSectionGroup.js:
331        * UserInterface/DetailsSectionPropertiesRow.js:
332        * UserInterface/DetailsSectionRow.js:
333        * UserInterface/DetailsSectionSimpleRow.js:
334        * UserInterface/DetailsSidebarPanel.css:
335        * UserInterface/DetailsSidebarPanel.js:
336        * UserInterface/DividerNavigationItem.css:
337        * UserInterface/DividerNavigationItem.js:
338        * UserInterface/Editing.css:
339        * UserInterface/EditingSupport.js:
340        * UserInterface/EventHandler.js:
341        * UserInterface/EventListenerSection.js:
342        * UserInterface/EventListenerSectionGroup.css:
343        * UserInterface/EventListenerSectionGroup.js:
344        * UserInterface/ExecutionContext.js:
345        * UserInterface/ExecutionContextList.js:
346        * UserInterface/FilterBar.css:
347        * UserInterface/FilterBar.js:
348        * UserInterface/FindBanner.css:
349        * UserInterface/FindBanner.js:
350        * UserInterface/FlexibleSpaceNavigationItem.css:
351        * UserInterface/FlexibleSpaceNavigationItem.js:
352        * UserInterface/FolderIcon.css:
353        * UserInterface/FolderTreeElement.js:
354        * UserInterface/FontResourceContentView.css:
355        * UserInterface/FontResourceContentView.js:
356        * UserInterface/Formatter.js:
357        * UserInterface/FormatterContentBuilder.js:
358        * UserInterface/FormatterSourceMap.js:
359        * UserInterface/Frame.js:
360        * UserInterface/FrameContentView.js:
361        * UserInterface/FrameResourceManager.js:
362        * UserInterface/FrameTreeElement.js:
363        * UserInterface/GeneralTreeElement.js:
364        * UserInterface/GeneralTreeElementPathComponent.js:
365        * UserInterface/GenericResourceContentView.js:
366        * UserInterface/Geometry.js:
367        * UserInterface/HierarchicalPathComponent.css:
368        * UserInterface/HierarchicalPathComponent.js:
369        * UserInterface/HierarchicalPathNavigationItem.js:
370        * UserInterface/ImageResourceContentView.css:
371        * UserInterface/ImageResourceContentView.js:
372        * UserInterface/ImageUtilities.js:
373        * UserInterface/IndeterminateProgressSpinner.css:
374        * UserInterface/IndeterminateProgressSpinner.js:
375        * UserInterface/InspectorBackend.js:
376        * UserInterface/InspectorFrontendAPI.js:
377        * UserInterface/InspectorObserver.js:
378        * UserInterface/InstrumentIcons.css:
379        * UserInterface/InstrumentSidebarPanel.css:
380        * UserInterface/InstrumentSidebarPanel.js:
381        * UserInterface/IssueManager.js:
382        * UserInterface/IssueMessage.js:
383        * UserInterface/JavaScriptLogViewController.js:
384        * UserInterface/JavaScriptProfileObject.js:
385        * UserInterface/JavaScriptProfileType.js:
386        * UserInterface/JavaScriptProfileView.css:
387        * UserInterface/JavaScriptProfileView.js:
388        * UserInterface/KeyboardShortcut.js:
389        * UserInterface/LayerTreeDataGrid.js:
390        * UserInterface/LayerTreeDataGridNode.js:
391        * UserInterface/LayerTreeManager.js:
392        * UserInterface/LayerTreeObserver.js:
393        * UserInterface/LayerTreeSidebarPanel.css:
394        * UserInterface/LayerTreeSidebarPanel.js:
395        * UserInterface/LayoutTimelineDataGrid.js:
396        * UserInterface/LayoutTimelineDataGridNode.js:
397        * UserInterface/LayoutTimelineRecord.js:
398        * UserInterface/LoadInspectorBackendCommands.js:
399        * UserInterface/LoadLocalizedStrings.js:
400        * UserInterface/LogContentView.css:
401        * UserInterface/LogContentView.js:
402        * UserInterface/LogIcon.css:
403        * UserInterface/LogManager.js:
404        * UserInterface/LogObject.js:
405        * UserInterface/LogTreeElement.js:
406        * UserInterface/MIMETypeUtilities.js:
407        * UserInterface/Main.css:
408        * UserInterface/Main.html:
409        * UserInterface/Main.js:
410        * UserInterface/MetricsStyleDetailsPanel.js:
411        * UserInterface/NavigationBar.css:
412        * UserInterface/NavigationBar.js:
413        * UserInterface/NavigationItem.js:
414        * UserInterface/NavigationSidebarPanel.css:
415        * UserInterface/NavigationSidebarPanel.js:
416        * UserInterface/NetworkDataGrid.css:
417        * UserInterface/NetworkDataGrid.js:
418        * UserInterface/NetworkGraphCalculator.js:
419        * UserInterface/NetworkObserver.js:
420        * UserInterface/NetworkTimeline.css:
421        * UserInterface/Object.js:
422        * UserInterface/ObjectPropertiesSection.js:
423        * UserInterface/PageObserver.js:
424        * UserInterface/PathComponentIcons.css:
425        * UserInterface/Popover.css:
426        * UserInterface/Popover.js:
427        * UserInterface/ProfileManager.js:
428        * UserInterface/ProfileObject.js:
429        * UserInterface/ProfileType.js:
430        * UserInterface/ProfileView.css:
431        * UserInterface/ProfileView.js:
432        * UserInterface/ProfilerObserver.js:
433        * UserInterface/PropertiesSection.js:
434        * UserInterface/QuickConsole.css:
435        * UserInterface/QuickConsole.js:
436        * UserInterface/QuickConsoleNavigationBar.js:
437        * UserInterface/RadioButtonNavigationItem.css:
438        * UserInterface/RadioButtonNavigationItem.js:
439        * UserInterface/Resource.js:
440        * UserInterface/ResourceClusterContentView.js:
441        * UserInterface/ResourceCollection.js:
442        * UserInterface/ResourceContentView.js:
443        * UserInterface/ResourceDetailsSidebarPanel.js:
444        * UserInterface/ResourceIcons.css:
445        * UserInterface/ResourceSearchMatchObject.js:
446        * UserInterface/ResourceSidebarPanel.css:
447        * UserInterface/ResourceSidebarPanel.js:
448        * UserInterface/ResourceTimelineDataGridNode.js:
449        * UserInterface/ResourceTimelineDataGridNodePathComponent.js:
450        * UserInterface/ResourceTimelineRecord.js:
451        * UserInterface/ResourceTreeElement.css:
452        * UserInterface/ResourceTreeElement.js:
453        * UserInterface/Revision.js:
454        * UserInterface/RulesStyleDetailsPanel.css:
455        * UserInterface/RulesStyleDetailsPanel.js:
456        * UserInterface/RuntimeObserver.js:
457        * UserInterface/ScopeBar.css:
458        * UserInterface/ScopeBar.js:
459        * UserInterface/ScopeBarItem.js:
460        * UserInterface/ScopeChainDetailsSidebarPanel.js:
461        * UserInterface/ScopeChainNode.js:
462        * UserInterface/ScopeVariableTreeElement.js:
463        * UserInterface/Script.js:
464        * UserInterface/ScriptContentView.css:
465        * UserInterface/ScriptContentView.js:
466        * UserInterface/ScriptTimelineDataGrid.js:
467        * UserInterface/ScriptTimelineDataGridNode.js:
468        * UserInterface/ScriptTimelineRecord.js:
469        * UserInterface/ScriptTreeElement.js:
470        * UserInterface/SearchBar.css:
471        * UserInterface/SearchBar.js:
472        * UserInterface/SearchIcons.css:
473        * UserInterface/SearchResultTreeElement.js:
474        * UserInterface/Section.css:
475        * UserInterface/Section.js:
476        * UserInterface/Setting.js:
477        * UserInterface/Sidebar.css:
478        * UserInterface/Sidebar.js:
479        * UserInterface/SidebarPanel.js:
480        * UserInterface/SourceCode.js:
481        * UserInterface/SourceCodeLocation.js:
482        * UserInterface/SourceCodePosition.js:
483        * UserInterface/SourceCodeRevision.js:
484        * UserInterface/SourceCodeTextEditor.css:
485        * UserInterface/SourceCodeTextEditor.js:
486        * UserInterface/SourceCodeTextRange.js:
487        * UserInterface/SourceCodeTreeElement.js:
488        * UserInterface/SourceMap.js:
489        * UserInterface/SourceMapManager.js:
490        * UserInterface/SourceMapResource.js:
491        * UserInterface/SourceMapResourceTreeElement.js:
492        * UserInterface/StorageManager.js:
493        * UserInterface/StorageTreeElement.js:
494        * UserInterface/StyleDetailsPanel.js:
495        * UserInterface/StyleRuleIcons.css:
496        * UserInterface/SyntaxHighlightingDefaultTheme.css:
497        * UserInterface/SyntaxHighlightingSupport.js:
498        * UserInterface/TextContentView.css:
499        * UserInterface/TextContentView.js:
500        * UserInterface/TextEditor.css:
501        * UserInterface/TextEditor.js:
502        * UserInterface/TextRange.js:
503        * UserInterface/TextResourceContentView.css:
504        * UserInterface/TextResourceContentView.js:
505        * UserInterface/TimelineDataGrid.css:
506        * UserInterface/TimelineDataGrid.js:
507        * UserInterface/TimelineDecorations.css:
508        * UserInterface/TimelineDecorations.js:
509        * UserInterface/TimelineEventMarker.js:
510        * UserInterface/TimelineManager.js:
511        * UserInterface/TimelineObserver.js:
512        * UserInterface/TimelineOverview.css:
513        * UserInterface/TimelineOverview.js:
514        * UserInterface/TimelineRecord.js:
515        * UserInterface/TimelinesContentView.css:
516        * UserInterface/TimelinesContentView.js:
517        * UserInterface/TimelinesObject.js:
518        * UserInterface/ToggleButtonNavigationItem.js:
519        * UserInterface/ToggleControlToolbarItem.js:
520        * UserInterface/Toolbar.css:
521        * UserInterface/Toolbar.js:
522        * UserInterface/TreeOutline.js:
523        * UserInterface/Utilities.js:
524        * UserInterface/WebInspector.js:
525
5262013-06-05  Timothy Hatcher  <timothy@apple.com>
527
528        Properly update the boundaries for the NetworkTransferTimeCalculator.
529
530        It is expected that _lowerBound and _upperBound return NaN instead of 0.
531
532        <rdar://problem/14040314> Web Inspector says it takes ~15,000 days to load developer library
533
534        Reviewed by Joseph Pecoraro.
535
536        * UserInterface/NetworkDataGrid.js:
537        (WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
538        * UserInterface/NetworkGraphCalculator.js:
539        (WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
540        (WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
541        * UserInterface/TimelineDecorations.js:
542        (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
543
5442013-06-05  Timothy Hatcher  <timothy@apple.com>
545
546        Unlocalize the box model labels.
547
548        <rdar://problem/14057745> [WebBrowser]: Euro: 13A476r: Box model should not be localized
549
550        Reviewed by Ada Chan.
551
552        * UserInterface/BoxModelDetailsSectionRow.js:
553        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
554
5552013-06-05  Timothy Hatcher  <timothy@apple.com>
556
557        Syntax highlight inherit, initial and function names in CSS as keywords.
558
559        Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
560
561        Reviewed by Joseph Pecoraro.
562
563        * UserInterface/CSSCompletions.js:
564        (WebInspector.CSSCompletions.requestCSSNameCompletions.propertyNamesCallback):
565        Strip function parenthesis from names. Process the color list to strip function parenthesis from rgb(), etc.
566
5672013-06-05  Timothy Hatcher  <timothy@apple.com>
568
569        Improve the implicit suffix handling when editing in the middle of a CSS value.
570
571        Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
572
573        Reviewed by Joseph Pecoraro.
574
575        * UserInterface/CodeMirrorCompletionController.js:
576        (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
577
5782013-06-05  Timothy Hatcher  <timothy@apple.com>
579
580        Autocomplete property names for transition and transition-property.
581
582        Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
583
584        Reviewed by Joseph Pecoraro.
585
586        * UserInterface/CSSCompletions.js:
587        (WebInspector.CSSCompletions.prototype.get values):
588        * UserInterface/CSSKeywordCompletions.js:
589        (WebInspector.CSSKeywordCompletions.forProperty):
590
5912013-06-04  Timothy Hatcher  <timothy@apple.com>
592
593        Properly autocomplete CSS values if the property name is on a previous line.
594
595        Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
596
597        Reviewed by Joseph Pecoraro.
598
599        * UserInterface/CodeMirrorCompletionController.js:
600        (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
601
6022013-06-03  Timothy Hatcher  <timothy@apple.com>
603
604        Add property names to the value keywords list so they are highlighted for -webkit-transition.
605
606        <rdar://problem/14052662> "-webkit-transform" is not correctly highlighted when editing CSS resource
607
608        Reviewed by Joseph Pecoraro.
609
610        * UserInterface/CSSCompletions.js:
611        (WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
612
6132013-06-03  Joseph Pecoraro  <pecoraro@apple.com>
614
615        <rdar://problem/14047312> Add New Rules sometimes doesn't do anything
616
617        Better handle generating selectors for nodes with spaces in class or id attributes.
618
619        Tests: (Cases that were failing before)
620
621          <div class=" x "> => Before: (..x.)  After: (.x)
622          <div id=" x ">    => Before: (# x )  After: (div[id=" x "])
623          <div id='"x"'>    => Before: (#"x")  After: (div[id="\"x\""])
624
625        Reviewed by Timothy Hatcher.
626
627        * UserInterface/DOMNode.js:
628        (WebInspector.DOMNode.prototype.appropriateSelectorFor):
629        * UserInterface/DOMUtilities.js:
630        (WebInspector.displayNameForNode):
631
6322013-06-03  Antoine Quint  <graouts@apple.com>
633
634        <rdar://problem/13932229> Update CSSKeywordCompletions.js for iOS properties
635
636        Add support for the new �-apple�-prefixed values for the �font� property.
637
638        Reviewed by Timothy Hatcher.
639
640        * UserInterface/CSSKeywordCompletions.js:
641
6422013-06-03  Joseph Pecoraro  <pecoraro@apple.com>
643
644        <rdar://problem/14047029> Exception CallFrameTreeElement.js:19: TypeError: 'null' is not an object (evaluating 'callFrame.sourceCodeLocation.displaySourceCode')
645
646        Only include a subtitle for call frame tree elements if there is a
647        source code location, because that is used to determine the subtitle.
648
649        Reviewed by Timothy Hatcher.
650
651        * UserInterface/CallFrameTreeElement.js:
652        (WebInspector.CallFrameTreeElement):
653
6542013-06-03  Timothy Hatcher  <timothy@apple.com>
655
656        Hide the caret in read-only style declarations.
657
658        <rdar://problem/14047344> Locked rules (UA stylesheets) in Styles sidebar shouldn't display a caret
659
660        Reviewed by Joseph Pecoraro.
661
662        * UserInterface/CSSStyleDeclarationTextEditor.css:
663        (.css-style-text-editor.read-only > .CodeMirror .CodeMirror-cursor): Added.
664
6652013-06-03  Timothy Hatcher  <timothy@apple.com>
666
667        Correctly stop auto recording the Timeline after the load event or a maximum duration (which ever comes first).
668
669        The original fix for <rdar://problem/13180009> was incorrect and caused <rdar://problem/13919974>
670        and also caused infinite auto recording on pages with indefinite timers that rapidly adds records.
671
672        <rdar://problem/14043180> REGRESSION (6.0.5-Curie): Safari Web Content: 100% CPU when using Inspector
673
674        Reviewed by Joseph Pecoraro.
675
676        * UserInterface/TimelineManager.js:
677        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
678        Don't call _stopAutoRecordingSoon for the DOMContent event.
679
680        (WebInspector.TimelineManager.prototype._addRecord):
681        Don't call _stopAutoRecordingSoon. Add the call to _resetAutoRecordingDeadTimeTimeout back.
682
683        (WebInspector.TimelineManager.prototype._startAutoRecording):
684        Use MaximumAutoRecordDuration instead of MaximumAutoRecordDurationAfterLastRecord for the timeout.
685
686        (WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
687        Remove the dead time timeout now that it is back in _addRecord.
688
6892013-06-02  Joseph Pecoraro  <pecoraro@apple.com>
690
691        <rdar://problem/14040519> BoxModelDetailsSectionRow.js:120: ERROR: TypeError: 'null' is not an object (evaluating 'style.propertyForName(width).value')
692
693        Make the sidebar resilient against the possibility of an empty computed
694        style object. The ultimate issue is that the DOM Tree does not have a
695        selected node, but this could should be resilient anyways.
696
697        Reviewed by Timothy Hatcher.
698
699        * UserInterface/BoxModelDetailsSectionRow.js:
700        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
701
7022013-06-02  Joseph Pecoraro  <pecoraro@apple.com>
703
704        Reveal line sometimes doesn't work with content right at the edge of the screen.
705
706        Reviewed by Timothy Hatcher.
707
708        * UserInterface/TextEditor.js:
709        (WebInspector.TextEditor.prototype._isPositionVisible):
710
7112013-05-31  Joseph Pecoraro  <pecoraro@apple.com>
712
713        <rdar://problem/14039888> Should not have spellchecking during most HTML editing
714
715        Allow EditingConfig to specify whether or not spellchecking should be enabled.
716        Spellcheck is off by default, because most of the time it is code, and it is
717        only enabled when editing a TextNode in the DOM Tree.
718
719        Reviewed by Timothy Hatcher.
720
721        * UserInterface/DOMTreeElement.js:
722        (WebInspector.DOMTreeElement.prototype._startEditingTextNode):
723        * UserInterface/EditingSupport.js:
724        (WebInspector.EditingConfig):
725        (.cleanUpAfterEditing):
726
7272013-05-30  Joseph Pecoraro  <pecoraro@apple.com>
728
729        <rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
730
731        Previously the SourceCodeTextEditor was automatically formatting the
732        content after the content was set on the TextEditor and some initial
733        processing; such as revealing a pending position. This change lets
734        the SourceCodeTextEditor signal to the TextEditor that it should
735        automatically format the incoming string before the extra processing
736        takes place. Now the pending position is updated in _prettyPrint,
737        and revealed appropriately.
738
739        Reviewed by Antoine Quint.
740
741        * UserInterface/SourceCodeTextEditor.js:
742        (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
743        (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
744        (WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
745        Move the auto formatting decision from didPopulate to willPopulate.
746        If autoformatting is needed, we signal the TextEditor before setting
747        the string.
748
749        * UserInterface/TextEditor.js:
750        (WebInspector.TextEditor.prototype.set string.update):
751        (WebInspector.TextEditor.prototype.set string):
752        (WebInspector.TextEditor.prototype.set autoFormat):
753        Keep a boolean for whether or not we should auto format when setting
754        the string. When setting the string, format if needed, after clearing
755        the history and before any pending position reveals.
756
7572013-05-30  Joseph Pecoraro  <pecoraro@apple.com>
758
759        <rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
760
761        Rename "revealLine" to "revealPosition". Now, if the first reveal is
762        for a position in pretty printed code, it can be remapped to an
763        appropriate (line, column), instead of whatever (line, 0) mapped to.
764
765        There is one bug fix here, the _prettyPrint in TextEditor was
766        incorrectly doing this._lineNumberToReveal.lineNumber, which should
767        have just been this._lineNumberToReveal. However, this code was not
768        getting reached in its current form. That will be addressed in the
769        next part.
770
771        Reviewed by Antoine Quint.
772
773        * UserInterface/FrameContentView.js:
774        (WebInspector.FrameContentView.prototype.showSourceCode):
775        * UserInterface/ResourceClusterContentView.js:
776        (WebInspector.ResourceClusterContentView.prototype.showResponse):
777        (WebInspector.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
778        * UserInterface/ResourceSidebarPanel.js:
779        (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
780        (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeLocation):
781        (WebInspector.ResourceSidebarPanel.prototype.showOriginalUnformattedSourceCodeLocation):
782        (WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeLocation):
783        (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
784        (WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeTextRange):
785        * UserInterface/ScriptContentView.js:
786        (WebInspector.ScriptContentView.prototype.revealPosition):
787        * UserInterface/TextContentView.js:
788        (WebInspector.TextContentView.prototype.revealPosition):
789        * UserInterface/TextEditor.js:
790        (WebInspector.TextEditor.prototype.set string.update):
791        (WebInspector.TextEditor.prototype.set string):
792        (WebInspector.TextEditor.prototype.revealNextSearchResult):
793        (WebInspector.TextEditor.prototype.line):
794        (WebInspector.TextEditor.prototype.updateLayout):
795        (WebInspector.TextEditor.prototype._textRangeFromCodeMirrorPosition):
796        (WebInspector.TextEditor.prototype._codeMirrorPositionFromTextRange):
797        * UserInterface/TextResourceContentView.js:
798        (WebInspector.TextResourceContentView.prototype.revealPosition):
799
8002013-05-30  Joseph Pecoraro  <pecoraro@apple.com>
801
802        <rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
803
804        Add WebInspector.SourceCodePosition. Rather than passing lineNumber
805        and columnNumber as separate parameters all over the place, we can
806        pass a position object. Create positions as appropriate from other
807        classes like SourceCodeLocation and TextRange.
808
809        Reviewed by Antoine Quint.
810
811        * UserInterface/Main.html:
812        * UserInterface/SourceCodeLocation.js:
813        (WebInspector.SourceCodeLocation.prototype.position):
814        (WebInspector.SourceCodeLocation.prototype.formattedPosition):
815        (WebInspector.SourceCodeLocation.prototype.displayPosition):
816        * UserInterface/SourceCodePosition.js: Added.
817        (WebInspector.SourceCodePosition):
818        (WebInspector.SourceCodePosition.prototype.get lineNumber):
819        (WebInspector.SourceCodePosition.prototype.get columnNumber):
820        * UserInterface/TextRange.js:
821        (WebInspector.TextRange.prototype.startPosition):
822        (WebInspector.TextRange.prototype.endPosition):
823
8242013-05-30  Joseph Pecoraro  <pecoraro@apple.com>
825
826        <rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
827
828        Remove a reveal that always happens with line number 0.
829
830        Reviewed by Antoine Quint.
831
832        * UserInterface/Main.js:
833        (WebInspector.toggleConsoleView):
834        * UserInterface/ResourceSidebarPanel.js:
835        (WebInspector.ResourceSidebarPanel.prototype.showMainFrameSourceCode):
836
8372013-05-30  Joseph Pecoraro  <pecoraro@apple.com>
838
839        Unprefix uses of "-webkit-calc".
840
841        Reviewed by Timothy Hatcher.
842
843        * UserInterface/CSSStyleDeclarationTextEditor.css:
844        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch):
845
8462013-05-30  Joseph Pecoraro  <pecoraro@apple.com>
847
848        <rdar://problem/14028576> Inspector finds CSS color names in other strings
849
850        Be a little more picky with our CSS regex, and include some post-processing
851        to act as a negative lookbehind, which is not supported in JavaScript regexes.
852        Do not allow color names that are prefixed or post-fixed with '-' or '.'.
853
854        Tests cases that previously would have produced swatches:
855
856          url(gold.png);
857          url("fools-gold.png");
858          url(fools.gold.png);
859
860        Using a regex is of course an imperfect solution, but it covers the majority
861        of cases and works well. It also allows us to detect colors in comments and
862        provide color swatches for those. This allows us to filter out some more
863        inappropriate cases.
864
865        Reviewed by Timothy Hatcher.
866
867        * UserInterface/CSSStyleDeclarationTextEditor.js:
868        (WebInspector.CSSStyleDeclarationTextEditor.prototype.):
869        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
870
8712013-05-30  Joseph Pecoraro  <pecoraro@apple.com>
872
873        <rdar://problem/14023649> No -webkit-filter autocompletion
874
875        Add functions to CSS completion suggestions. When the completion
876        suggestion is showing it has both parens, when committed, the cursor is
877        placed inside the two parens so users can keep typing.
878
879        This adds a bunch of common function completions.
880
881        Reviewed by Timothy Hatcher.
882
883        * UserInterface/CSSKeywordCompletions.js:
884        * UserInterface/CodeMirrorCompletionController.js:
885        (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
886
8872013-05-30  Joseph Pecoraro  <pecoraro@apple.com>
888
889        <rdar://problem/13994485> Hovering element breadcrumbs should highlight element on page
890
891        When hovering DOMTreeElementPathComponents highlight the associated
892        node on the page, like when you hover the DOMTreeElement.
893
894        Reviewed by Dean Jackson.
895
896        * UserInterface/HierarchicalPathComponent.js:
897        (WebInspector.HierarchicalPathComponent):
898        (WebInspector.HierarchicalPathComponent.prototype._selectElementMouseOver):
899        (WebInspector.HierarchicalPathComponent.prototype._selectElementMouseOut):
900        Provide hooks for subclass mouseOver and mouseOut functions.
901
902        * UserInterface/DOMTreeElementPathComponent.js:
903        (WebInspector.DOMTreeElementPathComponent.prototype.get nextSibling):
904        (WebInspector.DOMTreeElementPathComponent.prototype.mouseOver):
905        (WebInspector.DOMTreeElementPathComponent.prototype.mouseOut):
906        Implement the mouseOver and mouseOut to show / hide the DOM highlight.
907
9082013-05-30  Joseph Pecoraro  <pecoraro@apple.com>
909
910        <rdar://problem/14020206> Debugger popover not showing for "this"
911
912        Allow popover for the keyword "this".
913
914        Reviewed by Antoine Quint.
915
916        * UserInterface/CodeMirrorTokenTrackingController.js:
917        (WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
918
9192013-05-28  Joseph Pecoraro  <pecoraro@apple.com>
920
921        <rdar://problem/14007495> Web Inspector has "Instruments," but this is already a feature in Xcode
922
923        Rename the "Instruments" Navigation Sidebar to "Timelines". Marketing
924        had concerns about using the same name in multiple places.
925
926        Rubber-stamped by Timothy Hatcher.
927
928        * Localizations/en.lproj/localizedStrings.js:
929        * UserInterface/InstrumentSidebarPanel.js:
930        (WebInspector.InstrumentSidebarPanel):
931
9322013-05-28  Joseph Pecoraro  <pecoraro@apple.com>
933
934        <rdar://problem/14006550> Console errors persist when you navigate to other pages
935
936        The console can clear in two ways, handle both events.
937
938        Reviewed by Timothy Hatcher.
939
940        * UserInterface/DashboardManager.js:
941        (WebInspector.DashboardManager):
942
9432013-05-27  Timothy Hatcher  <timothy@apple.com>
944
945        Fix copy handeling for DataGrid.
946
947        When text selection was disabled in r48866, that broke the copy event
948        handlers for DataGrid. That change prevents focus from making a caret
949        selection inside the DataGrid (it goes outside to the nearest selectable
950        text). This broke bubbling of the copy event to the right elements.
951
952        Reviewed by Antoine Quint.
953
954        * UserInterface/DataGrid.js:
955        (WebInspector.DataGrid):
956        (WebInspector.DataGrid.prototype.handleBeforeCopyEvent):
957        (WebInspector.DataGrid.prototype.handleCopyEvent):
958        * UserInterface/Main.js:
959        (WebInspector._beforecopy):
960        (WebInspector._copy):
961
9622013-05-27  Timothy Hatcher  <timothy@apple.com>
963
964        Allow data grid value column's in details sections wrap to multiple lines.
965
966        <rdar://problem/12329905> Can't easily view long header values
967
968        Reviewed by Antoine Quint.
969
970        * UserInterface/DataGrid.css:
971        (.data-grid tr.selected):
972        (.data-grid:focus tr.selected):
973        * UserInterface/DetailsSection.css:
974        (.details-section > .content .data-grid table.data):
975        (.details-section > .content .data-grid tr:nth-child(even)):
976        (.details-section > .content .data-grid tr:nth-child(odd)):
977        (.details-section > .content .data-grid td.value-column):
978        (.details-section > .content .data-grid td.value-column > div):
979
9802013-05-27  Timothy Hatcher  <timothy@apple.com>
981
982        Only add event markers for the main frame.
983
984        The event markers for frame heavy pages are too noisy and not very
985        useful. We also didn't distinguish frames in the marker tooltips.
986
987        Reviewed by Antoine Quint.
988
989        * UserInterface/TimelineManager.js:
990        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
991        (WebInspector.TimelineManager.prototype.eventRecorded):
992
9932013-05-26  Timothy Hatcher  <timothy@apple.com>
994
995        Stop using a CSS drop-shadow filter for the Web Inspector popover.
996
997        Use the existing background canvas to draw the drop shadow instead.
998
999        <rdar://problem/13991902> Stop using CSS filters for Popover
1000
1001        This also fixes:
1002        <rdar://problem/13977466> Popover arrow is not perfectly centered with content
1003
1004        Reviewed by Joseph Pecoraro.
1005
1006        * UserInterface/Popover.css:
1007        (.popover):
1008        (.popover > .container):
1009        * UserInterface/Popover.js:
1010        (WebInspector.Popover.prototype._update):
1011        (WebInspector.Popover.prototype._drawBackground):
1012        (WebInspector.Popover.prototype._bestMetricsForEdge):
1013
10142013-05-25  Timothy Hatcher  <timothy@apple.com>
1015
1016        Show the popover after a delay so quickly arrowing down the grid does not flash the popover.
1017
1018        Also prevent showing the popover if the element is hidden, which was happening sometimes for
1019        rows at the bottom which were marked as offscreen still. Put MIN_Y before MAX_X so the popover
1020        is more predictably positioned, and this matches NSPopover. Plus always clear the popover
1021        TreeOutline after giving the popover time to animate out when hiding.
1022
1023        Reviewed by Joseph Pecoraro.
1024
1025        * UserInterface/TimelineDataGrid.js:
1026        (WebInspector.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):
1027        (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon.delayedWork):
1028        (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
1029        (WebInspector.TimelineDataGrid.prototype._hidePopover):
1030        (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
1031
10322013-05-24  Joseph Pecoraro  <pecoraro@apple.com>
1033
1034        Show a highlight quad on the screen when selecting a Layout/Paint record.
1035
1036        If we know the Quad / Rect of a Paint / Layout we can highlight that
1037        portion on the inspected page. Unfortunately this information is not
1038        very useful after the page scrolls, but it can be useful.
1039
1040        Reviewed by Timothy Hatcher.
1041
1042        * UserInterface/Geometry.js:
1043        (WebInspector.Quad.prototype.toProtocol):
1044        * UserInterface/LayoutTimelineDataGrid.js:
1045        (WebInspector.LayoutTimelineDataGrid):
1046        (WebInspector.LayoutTimelineDataGrid.prototype.reset):
1047        (WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
1048        (WebInspector.LayoutTimelineDataGrid.prototype.hidden):
1049        (WebInspector.LayoutTimelineDataGrid.prototype._layoutDataGridSelectedNodeChanged):
1050        (WebInspector.LayoutTimelineDataGrid.prototype._hideHighlightIfNeeded):
1051        * UserInterface/TimelineDataGrid.js:
1052        (WebInspector.TimelineDataGrid.prototype.shown):
1053        (WebInspector.TimelineDataGrid.prototype.hidden):
1054        * UserInterface/TimelinesContentView.js:
1055        (WebInspector.TimelinesContentView.prototype.showTimelineForRecordType):
1056        (WebInspector.TimelinesContentView.prototype.shown):
1057        (WebInspector.TimelinesContentView.prototype.hidden):
1058
10592013-05-24  Joseph Pecoraro  <pecoraro@apple.com>
1060
1061        <rdar://problem/12656683> Show whole JS stack for layout & rendering triggers
1062
1063        Clear the popover's contents when the content view is reset so
1064        we don't leak anything held by the CallFrameTreeElements.
1065
1066        Reviewed by Timothy Hatcher.
1067
1068        * UserInterface/NetworkDataGrid.js:
1069        (WebInspector.NetworkDataGrid.prototype.reset):
1070        * UserInterface/TimelineDataGrid.js:
1071        (WebInspector.TimelineDataGrid.prototype.reset):
1072
10732013-05-24  Joseph Pecoraro  <pecoraro@apple.com>
1074
1075        <rdar://problem/12656683> Show whole JS stack for layout & rendering triggers
1076
1077        Stack trace information is already available from the backend. Display
1078        it in a popover when the corresponding row in the data grid is selected.
1079        Users can then click a call frame to jump to that source code location.
1080
1081        Because both Layout and Script timelines include call traces, this is
1082        made generic an put in TimelineDataGrid. Subclasses tell the superclass
1083        which element to anchor the popover next to, but the superclass handles
1084        showing the popover.
1085
1086        Reviewed by Timothy Hatcher.
1087
1088        * UserInterface/CallFrameTreeElement.js:
1089        (WebInspector.CallFrameTreeElement):
1090        Allow a CallFrameTreeElement for native code call frames. Such call
1091        frames don't have a source code location, so they have no subtitle.
1092
1093        * UserInterface/Images/Native.pdf: Added.
1094        * UserInterface/CallFrameIcons.css:
1095        (.native-icon .icon):
1096        This is a duplicate of the DOMNode.pdf gray [N] icon.
1097
1098        * UserInterface/Main.html:
1099        Include new files.
1100
1101        * UserInterface/NetworkDataGrid.js:
1102        (WebInspector.NetworkDataGrid):
1103        * UserInterface/ScriptTimelineDataGrid.js: Added.
1104        (WebInspector.ScriptTimelineDataGrid):
1105        (WebInspector.ScriptTimelineDataGrid.prototype.callFramePopoverAnchorElement):
1106        * UserInterface/LayoutTimelineDataGrid.js: Added.
1107        (WebInspector.LayoutTimelineDataGrid):
1108        (WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
1109        Give each TimelineDataGrid subclass its own class. Implement only
1110        what is needed. The new subclasses provide the element for the
1111        superclass to anchor the call frame popover.
1112
1113        * UserInterface/TimelinesContentView.js:
1114        (WebInspector.TimelinesContentView):
1115        Instantiate the specific DataGrid types.
1116
1117        * UserInterface/TimelineDataGrid.css: Added.
1118        * UserInterface/TimelineDataGrid.js:
1119        (WebInspector.TimelineDataGrid):
1120        (WebInspector.TimelineDataGrid.prototype.callFramePopoverAnchorElement):
1121        (WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
1122        (WebInspector.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):
1123        (WebInspector.TimelineDataGrid.prototype._windowResized):
1124        (WebInspector.TimelineDataGrid.prototype._hidePopover):
1125        (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
1126        Show and manager the popover.
1127
1128        (WebInspector.TimelineDataGrid.prototype._createPopoverContent):
1129        (WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeElementSelected):
1130        Popover content is a TreeOutline containing CallFrameTreeElements.
1131        When a call frame is selected, reveal the source code location.
1132
1133        * UserInterface/DataGrid.js:
1134        (WebInspector.DataGridNode.prototype.elementWithColumnIdentifier):
1135        Helper for accessing a specific <td> inside a <tr> by column name.
1136
11372013-05-24  Joseph Pecoraro  <pecoraro@apple.com>
1138
1139        Switch from "X" and "Y" to "Area" in the Layout Timeline
1140
1141        For transformed paint rects an X, Y, Width and Height, didn't make
1142        sense, so the backend switched to quads. Instead of showing approximate
1143        values, like the bounding box, lets just remove unknowns and switch
1144        to showing the Area instead.
1145
1146        Reviewed by Timothy Hatcher.
1147
1148        * UserInterface/LayoutTimelineDataGridNode.js:
1149        (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
1150        * UserInterface/TimelinesContentView.js:
1151        (WebInspector.TimelinesContentView):
1152
11532013-05-24  Joseph Pecoraro  <pecoraro@apple.com>
1154
1155        Restore Width and Height values for Layouts and Paints in Timeline
1156
1157        The backend changed a while back from including rect values, to quad
1158        values. We should move away from X and Y and instead show Area.
1159
1160        Reviewed by Timothy Hatcher.
1161
1162        * UserInterface/Geometry.js:
1163        (WebInspector.Quad):
1164        Provide a wrapper object for the protocol Quad representation.
1165
1166        * UserInterface/TimelineManager.js:
1167        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
1168        (WebInspector.TimelineManager.prototype.eventRecorded):
1169        Ingest new and old Layout and Paint timeline record.
1170
1171        * UserInterface/LayoutTimelineRecord.js:
1172        (WebInspector.LayoutTimelineRecord):
1173        (WebInspector.LayoutTimelineRecord.prototype.get area):
1174        (WebInspector.LayoutTimelineRecord.prototype.get rect):
1175        (WebInspector.LayoutTimelineRecord.prototype.get quad):
1176        A record may be wrapping a quad.
1177
11782013-05-24  Joseph Pecoraro  <pecoraro@apple.com>
1179
1180        Use SourceCodeLocations when displaying Script locations.
1181
1182        Using SourceCodeLocations allows the locations to show formatted
1183        and display locations and is therefore more accurate. It also shows
1184        the tooltip and display strings consistent with the rest of the UI.
1185
1186        Reviewed by Timothy Hatcher.
1187
1188        * UserInterface/ScriptTimelineDataGridNode.js:
1189        (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
1190        * UserInterface/ScriptTimelineRecord.js:
1191        (WebInspector.ScriptTimelineRecord):
1192        (WebInspector.ScriptTimelineRecord.prototype.get lineNumber):
1193        (WebInspector.ScriptTimelineRecord.prototype.get callFrames):
1194        (WebInspector.ScriptTimelineRecord.prototype.get sourceCodeLocation):
1195        * UserInterface/TimelineManager.js:
1196        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
1197        (WebInspector.TimelineManager.prototype.eventRecorded):
1198
11992013-05-24  Joseph Pecoraro  <pecoraro@apple.com>
1200
1201        Add Script Timeline records for Installing / Removing Timelines
1202
1203        We had records for TimerFired but not install / remove. It is sometimes
1204        useful to see the stack traces where timers are added and removed.
1205
1206        Reviewed by Timothy Hatcher.
1207
1208        * Localizations/en.lproj/localizedStrings.js:
1209        * UserInterface/ScriptTimelineRecord.js:
1210        (WebInspector.ScriptTimelineRecord.EventType.displayName):
1211        * UserInterface/TimelineManager.js:
1212        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
1213        (WebInspector.TimelineManager.prototype.eventRecorded):
1214
12152013-05-24  Joseph Pecoraro  <pecoraro@apple.com>
1216
1217        Remove some unused old style DataGrid events.
1218
1219        These events are not used anywhere, and we have a new style event.
1220
1221        Reviewed by Timothy Hatcher.
1222
1223        * UserInterface/DataGrid.js:
1224        (WebInspector.DataGridNode.prototype.select):
1225        (WebInspector.DataGridNode.prototype.deselect):
1226
12272013-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1228
1229        Turn off spellchecking on some text inputs.
1230
1231        Reviewed by David Kilzer.
1232
1233        * UserInterface/Breakpoint.js:
1234        (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
1235        * UserInterface/FindBanner.js:
1236        (WebInspector.FindBanner):
1237
12382013-05-24  Timothy Hatcher  <timothy@apple.com>
1239
1240        Tag all Web Inspector images with copyright info.
1241
1242        Added to all images: Copyright � 2013 Apple Inc. All rights reserved.
1243
1244        Requested by Joyce Chow.
1245
1246        * UserInterface/Images/ApplicationCache.png:
1247        * UserInterface/Images/ApplicationCache@2x.png:
1248        * UserInterface/Images/ApplicationCacheManifest.png:
1249        * UserInterface/Images/ApplicationCacheManifest@2x.png:
1250        * UserInterface/Images/BackArrow.pdf:
1251        * UserInterface/Images/BottomUpTree.pdf:
1252        * UserInterface/Images/Breakpoint.png:
1253        * UserInterface/Images/Breakpoint@2x.png:
1254        * UserInterface/Images/BreakpointButton.pdf:
1255        * UserInterface/Images/BreakpointInactive.png:
1256        * UserInterface/Images/BreakpointInactive@2x.png:
1257        * UserInterface/Images/BreakpointInactiveButton.pdf:
1258        * UserInterface/Images/ClippingCSS.png:
1259        * UserInterface/Images/ClippingCSS@2x.png:
1260        * UserInterface/Images/ClippingGeneric.png:
1261        * UserInterface/Images/ClippingGeneric@2x.png:
1262        * UserInterface/Images/ClippingJS.png:
1263        * UserInterface/Images/ClippingJS@2x.png:
1264        * UserInterface/Images/Close.pdf:
1265        * UserInterface/Images/Colors.png:
1266        * UserInterface/Images/Colors@2x.png:
1267        * UserInterface/Images/Cookie.png:
1268        * UserInterface/Images/Cookie@2x.png:
1269        * UserInterface/Images/Crosshair.pdf:
1270        * UserInterface/Images/DOMCharacterData.pdf:
1271        * UserInterface/Images/DOMComment.pdf:
1272        * UserInterface/Images/DOMDocument.pdf:
1273        * UserInterface/Images/DOMDocumentType.pdf:
1274        * UserInterface/Images/DOMElement.pdf:
1275        * UserInterface/Images/DOMNode.pdf:
1276        * UserInterface/Images/DOMTextNode.pdf:
1277        * UserInterface/Images/DOMTree.pdf:
1278        * UserInterface/Images/Database.png:
1279        * UserInterface/Images/Database@2x.png:
1280        * UserInterface/Images/DatabaseTable.png:
1281        * UserInterface/Images/DatabaseTable@2x.png:
1282        * UserInterface/Images/DisclosureTriangleSmallClosed.pdf:
1283        * UserInterface/Images/DisclosureTriangleSmallOpen.pdf:
1284        * UserInterface/Images/DisclosureTriangleTinyClosed.pdf:
1285        * UserInterface/Images/DisclosureTriangleTinyOpen.pdf:
1286        * UserInterface/Images/DockBottom.pdf:
1287        * UserInterface/Images/DockRight.pdf:
1288        * UserInterface/Images/DocumentCSS.png:
1289        * UserInterface/Images/DocumentCSS@2x.png:
1290        * UserInterface/Images/DocumentFont.png:
1291        * UserInterface/Images/DocumentFont@2x.png:
1292        * UserInterface/Images/DocumentGeneric.png:
1293        * UserInterface/Images/DocumentGeneric@2x.png:
1294        * UserInterface/Images/DocumentImage.png:
1295        * UserInterface/Images/DocumentImage@2x.png:
1296        * UserInterface/Images/DocumentJS.png:
1297        * UserInterface/Images/DocumentJS@2x.png:
1298        * UserInterface/Images/DocumentMarkup.png:
1299        * UserInterface/Images/DocumentMarkup@2x.png:
1300        * UserInterface/Images/Error.pdf:
1301        * UserInterface/Images/ErrorSmall.pdf:
1302        * UserInterface/Images/Errors.svg:
1303        * UserInterface/Images/ErrorsEnabled.svg:
1304        * UserInterface/Images/EventListener.pdf:
1305        * UserInterface/Images/Exception.pdf:
1306        * UserInterface/Images/FilterFieldGlyph.pdf:
1307        * UserInterface/Images/FolderGeneric.png:
1308        * UserInterface/Images/FolderGeneric@2x.png:
1309        * UserInterface/Images/ForwardArrow.pdf:
1310        * UserInterface/Images/Function.pdf:
1311        * UserInterface/Images/GoToArrow.pdf:
1312        * UserInterface/Images/HierarchicalNavigationItemChevron.pdf:
1313        * UserInterface/Images/IndeterminateProgressSpinner1.pdf:
1314        * UserInterface/Images/IndeterminateProgressSpinner10.pdf:
1315        * UserInterface/Images/IndeterminateProgressSpinner11.pdf:
1316        * UserInterface/Images/IndeterminateProgressSpinner12.pdf:
1317        * UserInterface/Images/IndeterminateProgressSpinner2.pdf:
1318        * UserInterface/Images/IndeterminateProgressSpinner3.pdf:
1319        * UserInterface/Images/IndeterminateProgressSpinner4.pdf:
1320        * UserInterface/Images/IndeterminateProgressSpinner5.pdf:
1321        * UserInterface/Images/IndeterminateProgressSpinner6.pdf:
1322        * UserInterface/Images/IndeterminateProgressSpinner7.pdf:
1323        * UserInterface/Images/IndeterminateProgressSpinner8.pdf:
1324        * UserInterface/Images/IndeterminateProgressSpinner9.pdf:
1325        * UserInterface/Images/InstructionPointer.png:
1326        * UserInterface/Images/InstructionPointer@2x.png:
1327        * UserInterface/Images/Issues.svg:
1328        * UserInterface/Images/IssuesEnabled.svg:
1329        * UserInterface/Images/LayerBorders.pdf:
1330        * UserInterface/Images/LessColumns.pdf:
1331        * UserInterface/Images/LocalStorage.png:
1332        * UserInterface/Images/LocalStorage@2x.png:
1333        * UserInterface/Images/Locked.pdf:
1334        * UserInterface/Images/Log.png:
1335        * UserInterface/Images/Log@2x.png:
1336        * UserInterface/Images/Logs.svg:
1337        * UserInterface/Images/Memory.svg:
1338        * UserInterface/Images/MoreColumns.pdf:
1339        * UserInterface/Images/NavigationItemAngleBrackets.pdf:
1340        * UserInterface/Images/NavigationItemBrushAndRuler.pdf:
1341        * UserInterface/Images/NavigationItemBug.pdf:
1342        * UserInterface/Images/NavigationItemCurleyBraces.pdf:
1343        * UserInterface/Images/NavigationItemFile.pdf:
1344        * UserInterface/Images/NavigationItemLayers.pdf:
1345        * UserInterface/Images/NavigationItemLog.pdf:
1346        * UserInterface/Images/NavigationItemMagnifyingGlass.pdf:
1347        * UserInterface/Images/NavigationItemStopwatch.pdf:
1348        * UserInterface/Images/NavigationItemStorage.pdf:
1349        * UserInterface/Images/NavigationItemTrash.pdf:
1350        * UserInterface/Images/NavigationItemVariable.pdf:
1351        * UserInterface/Images/Network.png:
1352        * UserInterface/Images/Network@2x.png:
1353        * UserInterface/Images/NetworkBarBlue.png:
1354        * UserInterface/Images/NetworkBarBlue@2x.png:
1355        * UserInterface/Images/NetworkBarGray.png:
1356        * UserInterface/Images/NetworkBarGray@2x.png:
1357        * UserInterface/Images/NetworkBarGreen.png:
1358        * UserInterface/Images/NetworkBarGreen@2x.png:
1359        * UserInterface/Images/NetworkBarLabelCalloutLeft.pdf:
1360        * UserInterface/Images/NetworkBarLabelCalloutRight.pdf:
1361        * UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.pdf:
1362        * UserInterface/Images/NetworkBarLabelCalloutWhiteRight.pdf:
1363        * UserInterface/Images/NetworkBarOrange.png:
1364        * UserInterface/Images/NetworkBarOrange@2x.png:
1365        * UserInterface/Images/NetworkBarPurple.png:
1366        * UserInterface/Images/NetworkBarPurple@2x.png:
1367        * UserInterface/Images/NetworkBarRed.png:
1368        * UserInterface/Images/NetworkBarRed@2x.png:
1369        * UserInterface/Images/NetworkBarWhiteFlat.png:
1370        * UserInterface/Images/NetworkBarWhiteFlat@2x.png:
1371        * UserInterface/Images/NetworkBarYellow.png:
1372        * UserInterface/Images/NetworkBarYellow@2x.png:
1373        * UserInterface/Images/NetworkHollowBarBlue.png:
1374        * UserInterface/Images/NetworkHollowBarBlue@2x.png:
1375        * UserInterface/Images/NetworkHollowBarGray.png:
1376        * UserInterface/Images/NetworkHollowBarGray@2x.png:
1377        * UserInterface/Images/NetworkHollowBarGreen.png:
1378        * UserInterface/Images/NetworkHollowBarGreen@2x.png:
1379        * UserInterface/Images/NetworkHollowBarOrange.png:
1380        * UserInterface/Images/NetworkHollowBarOrange@2x.png:
1381        * UserInterface/Images/NetworkHollowBarPurple.png:
1382        * UserInterface/Images/NetworkHollowBarPurple@2x.png:
1383        * UserInterface/Images/NetworkHollowBarRed.png:
1384        * UserInterface/Images/NetworkHollowBarRed@2x.png:
1385        * UserInterface/Images/NetworkHollowBarYellow.png:
1386        * UserInterface/Images/NetworkHollowBarYellow@2x.png:
1387        * UserInterface/Images/Pause.pdf:
1388        * UserInterface/Images/Percent.pdf:
1389        * UserInterface/Images/Plus.pdf:
1390        * UserInterface/Images/Profile.png:
1391        * UserInterface/Images/Profile@2x.png:
1392        * UserInterface/Images/PseudoElement.pdf:
1393        * UserInterface/Images/Recording.png:
1394        * UserInterface/Images/Recording@2x.png:
1395        * UserInterface/Images/RecordingHovered.png:
1396        * UserInterface/Images/RecordingHovered@2x.png:
1397        * UserInterface/Images/RecordingStopped.png:
1398        * UserInterface/Images/RecordingStopped@2x.png:
1399        * UserInterface/Images/Reflection.pdf:
1400        * UserInterface/Images/Reload.svg:
1401        * UserInterface/Images/ReloadSelected.svg:
1402        * UserInterface/Images/Request.pdf:
1403        * UserInterface/Images/Resources.svg:
1404        * UserInterface/Images/Response.pdf:
1405        * UserInterface/Images/ResultLine.pdf:
1406        * UserInterface/Images/Resume.pdf:
1407        * UserInterface/Images/Script.png:
1408        * UserInterface/Images/Script@2x.png:
1409        * UserInterface/Images/SessionStorage.png:
1410        * UserInterface/Images/SessionStorage@2x.png:
1411        * UserInterface/Images/ShadowDOM.pdf:
1412        * UserInterface/Images/SortIndicatorDownArrow.pdf:
1413        * UserInterface/Images/SortIndicatorUpArrow.pdf:
1414        * UserInterface/Images/SourceCode.pdf:
1415        * UserInterface/Images/SplitToggleDown.pdf:
1416        * UserInterface/Images/SplitToggleUp.pdf:
1417        * UserInterface/Images/StepInto.pdf:
1418        * UserInterface/Images/StepOut.pdf:
1419        * UserInterface/Images/StepOver.pdf:
1420        * UserInterface/Images/Stopwatch.png:
1421        * UserInterface/Images/Stopwatch@2x.png:
1422        * UserInterface/Images/StyleRuleAuthor.pdf:
1423        * UserInterface/Images/StyleRuleInherited.pdf:
1424        * UserInterface/Images/StyleRuleInheritedElement.pdf:
1425        * UserInterface/Images/StyleRuleInspector.pdf:
1426        * UserInterface/Images/StyleRuleUser.pdf:
1427        * UserInterface/Images/StyleRuleUserAgent.pdf:
1428        * UserInterface/Images/Time.svg:
1429        * UserInterface/Images/TimelineBarBlue.png:
1430        * UserInterface/Images/TimelineBarBlue@2x.png:
1431        * UserInterface/Images/TimelineBarOrange.png:
1432        * UserInterface/Images/TimelineBarOrange@2x.png:
1433        * UserInterface/Images/TimelineBarPurple.png:
1434        * UserInterface/Images/TimelineBarPurple@2x.png:
1435        * UserInterface/Images/Undock.pdf:
1436        * UserInterface/Images/UpDownArrows.svg:
1437        * UserInterface/Images/UserInputPrompt.pdf:
1438        * UserInterface/Images/UserInputPromptPrevious.pdf:
1439        * UserInterface/Images/UserInputPromptPreviousSelected.pdf:
1440        * UserInterface/Images/UserInputResult.pdf:
1441        * UserInterface/Images/UserInputResultSelected.pdf:
1442        * UserInterface/Images/Warning.pdf:
1443        * UserInterface/Images/WarningSmall.pdf:
1444        * UserInterface/Images/Weight.svg:
1445
14462013-05-24  Timothy Hatcher  <timothy@apple.com>
1447
1448        Workaround an error with minifying the Web Inspector.
1449
1450        jsmin.py does not like: return //.test();
1451
1452        <rdar://problem/13983475> REGRESSION(r51583): Cannot show web inspector in recent spades
1453
1454        * UserInterface/External/CodeMirror/codemirror.js:
1455        (window.CodeMirror):
1456
14572013-05-23  Timothy Hatcher  <timothy@apple.com>
1458
1459        Update CodeMirror from 3.12 to 3.13.
1460
1461        Include the new comment.js addon and hook it up to Command-/.
1462
1463        Reviewed by Joseph Pecoraro.
1464
1465        * Scripts/update-codemirror-resources.rb: Added comment.js.
1466        * UserInterface/CodeMirrorAdditions.js:
1467        * UserInterface/External/CodeMirror/clojure.js:
1468        * UserInterface/External/CodeMirror/codemirror.css:
1469        * UserInterface/External/CodeMirror/codemirror.js:
1470        * UserInterface/External/CodeMirror/coffeescript.js:
1471        * UserInterface/External/CodeMirror/comment.js: Added.
1472        * UserInterface/External/CodeMirror/css.js:
1473        * UserInterface/External/CodeMirror/javascript.js:
1474        * UserInterface/External/CodeMirror/less.js:
1475        * UserInterface/External/CodeMirror/placeholder.js:
1476        * UserInterface/External/CodeMirror/runmode.js:
1477        * UserInterface/External/CodeMirror/sass.js:
1478        * UserInterface/External/CodeMirror/searchcursor.js:
1479        * UserInterface/External/CodeMirror/sql.js:
1480        * UserInterface/External/CodeMirror/xml.js:
1481        * UserInterface/Main.html: Include comment.js.
1482
14832013-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1484
1485        <rdar://problem/13972577> ER: when deleting break points on a file, don't move up if you can't delete
1486
1487        Reviewed by Timothy Hatcher.
1488
1489        * UserInterface/DebuggerSidebarPanel.js:
1490        (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
1491
14922013-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1493
1494        <rdar://problem/7545262> Command-E should put selected text in the search box
1495
1496        Don't implicitly preventDefault with the keyboard shortcut. This allows the
1497        default behavior of populating the system find pasteboard.
1498
1499        Reviewed by Timothy Hatcher.
1500
1501        * UserInterface/FindBanner.js:
1502        (WebInspector.FindBanner):
1503
15042013-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1505
1506        <rdar://problem/7545262> Command-E should put selected text in the search box
1507
1508        Pass the "changeFocus" parameter through the internal cursor relative reveal functions.
1509
1510        Reviewed by Timothy Hatcher.
1511
1512        * UserInterface/TextEditor.js:
1513        (WebInspector.TextEditor.prototype.revealPreviousSearchResult):
1514        (WebInspector.TextEditor.prototype.revealNextSearchResult):
1515        (WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
1516        (WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
1517
15182013-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1519
1520        <rdar://problem/7545262> Command-E should put selected text in the search box
1521
1522        Instead of continuing the binary search when we encounter an invalid entry,
1523        just break out immediately. This way we can revalidate all of the search results
1524        and accurately search forward or back.
1525
1526        Reviewed by Timothy Hatcher.
1527
1528        * UserInterface/CodeMirrorAdditions.js:
1529        * UserInterface/TextEditor.js:
1530        (WebInspector.TextEditor.prototype._binarySearchInsertionIndexInSearchResults):
1531        (WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
1532        (WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
1533        (WebInspector.TextEditor.prototype._cursorDoesNotMatchLastRevealedSearchResult):
1534        (WebInspector.TextEditor.prototype._revalidateSearchResults):
1535
15362013-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1537
1538        <rdar://problem/7545262> Command-E should put selected text in the search box
1539
1540        Clear the automaticallyRevealFirstSearchResult state after revealing a search term.
1541
1542        Reviewed by Timothy Hatcher.
1543
1544        * UserInterface/TextEditor.js:
1545
15462013-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1547
1548        <rdar://problem/7545262> Command-E should put selected text in the search box
1549
1550        When searching forwards and backwards search relative to the current cursor position.
1551        If we were already on a particular result we can keep the old path and just move
1552        forward / back in the result list. Otherwise we binary search the closest position
1553        to the cursor. Because results can be removed in the search path we have a
1554        bit of added complexity.
1555
1556        Reviewed by Timothy Hatcher.
1557
1558        * UserInterface/TextEditor.js:
1559        (WebInspector.TextEditor.prototype.set automaticallyRevealFirstSearchResult):
1560        (WebInspector.TextEditor.prototype.addSearchResults.markRanges):
1561        When automatically revealing, do so relative to the cursor.
1562
1563        (WebInspector.TextEditor.prototype.revealPreviousSearchResult):
1564        (WebInspector.TextEditor.prototype.revealNextSearchResult):
1565        (WebInspector.TextEditor.prototype._cursorDoesNotMatchLastRevealedSearchResult):
1566        If we don't have a search result index, or if the cursor moved off
1567        of the last search result index, search relative to the cursor.
1568
1569        (WebInspector.TextEditor.prototype._comparePositions):
1570        (WebInspector.TextEditor.prototype._binarySearchInsertionIndexInSearchResults):
1571        (WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
1572        (WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
1573        Binary search search results handling the possibility that a search result
1574        could be null. I'm not sure if this works perfectly in such cases, but
1575        it worked fine in practice.
1576        
1577        (WebInspector.TextEditor.prototype._revalidateSearchResults):
1578        When we try to traverse to a search result and it was deleted, revalidate
1579        all the search results. This can happen if in a CSS file and the user
1580        deleted some instances of a search result.
1581
15822013-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1583
1584        <rdar://problem/7545262> Command-E should put selected text in the search box
1585
1586        Step 1, make Command+E populate the FindBanner's search query, and silently
1587        perform the search so that Command+G and Shift+Command+G work. Expose a
1588        new ContentView method "searchQueryWithSelection" to get a search query
1589        from the selection in that ContentView. This currently only works with
1590        TextEditor ContentViews.
1591
1592        Reviewed by Timothy Hatcher.
1593
1594        * UserInterface/FindBanner.js:
1595        (WebInspector.FindBanner): Add the keyboard shortcut.
1596        (WebInspector.FindBanner.prototype._populateSearchQueryFromSelection):
1597        Ask the delegate (ContentBrowser) for a search query from selection.
1598        If we get one, silently perform a search.
1599
1600        * UserInterface/TextEditor.js:
1601        (WebInspector.TextEditor.prototype.searchQueryWithSelection):
1602        Get the selection from CodeMirror and return that.
1603
1604        * UserInterface/ContentView.js:
1605        (WebInspector.ContentView.prototype.searchQueryWithSelection):
1606        Default implementation returns null, meaning no change.
1607
1608        * UserInterface/ClusterContentView.js:
1609        (WebInspector.ClusterContentView.prototype.searchQueryWithSelection):
1610        * UserInterface/ContentBrowser.js:
1611        (WebInspector.ContentBrowser.prototype.findBannerSearchQueryForSelection):
1612        * UserInterface/ScriptContentView.js:
1613        (WebInspector.ScriptContentView.prototype.searchQueryWithSelection):
1614        * UserInterface/TextContentView.js:
1615        (WebInspector.TextContentView.prototype.searchQueryWithSelection):
1616        * UserInterface/TextResourceContentView.js:
1617        (WebInspector.TextResourceContentView.prototype.searchQueryWithSelection):
1618        Plumbing the message down the content views heirarchy.
1619
16202013-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1621
1622        Remove unnecessary return for setter.
1623
1624        This was just a copy / paste error from when it was originally written.
1625
1626        Reviewed by Timothy Hatcher.
1627
1628        * UserInterface/ClusterContentView.js:
1629        (WebInspector.ClusterContentView.prototype.set automaticallyRevealFirstSearchResult):
1630
16312013-05-23  Joseph Pecoraro  <pecoraro@apple.com>
1632
1633        Remove unused instance variable TextEditor._pendingSearchResultLineNumbers
1634
1635        Reviewed by Timothy Hatcher.
1636
1637        * UserInterface/TextEditor.js:
1638        (WebInspector.TextEditor):
1639
16402013-05-22  Joseph Pecoraro  <pecoraro@apple.com>
1641
1642        <rdar://problem/13961791> Stopping recording clears the timeline
1643
1644        It actually seems like a non-main frame resource change causes the
1645        timeline to clear. Only clear on main frame main resource changes.
1646
1647        Reviewed by Timothy Hatcher.
1648
1649        * UserInterface/TimelineManager.js:
1650        (WebInspector.TimelineManager.prototype._mainResourceDidChange):
1651
16522013-05-22  Joseph Pecoraro  <pecoraro@apple.com>
1653
1654        <rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
1655
1656        When a BreakpointTreeElement is selected and the page is reloaded the
1657        breakpoint tree elements are removed. When removing the tree element
1658        the parent, ResourceTreeElement, was selected and the tree outline
1659        created a content view to show for that resource. This content view
1660        was being orphaned and replaced when new resources were loaded.
1661
1662        We never want to create a content view for a Script/ResourceTreeElement
1663        in the DebuggerSidebarPanel when it has no children. That is a sign
1664        that the tree element is about to be deleted.
1665
1666        Reviewed by Timothy Hatcher.
1667
1668        * UserInterface/DebuggerSidebarPanel.js:
1669        (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
1670
16712013-05-22  Joseph Pecoraro  <pecoraro@apple.com>
1672
1673        <rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
1674
1675        Prevent the populate with script content path from requesting content
1676        multiple times. This is just an optimization to prevent duplicated work.
1677        This can happen the first time the debugger is paused, by setting the
1678        active call frame, opening the resource, and then triggering the active
1679        call frame did change notification.
1680
1681        Reviewed by Timothy Hatcher.
1682
1683        * UserInterface/SourceCodeTextEditor.js:
1684        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
1685        (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
1686        (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent):
1687        (WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent):
1688
16892013-05-22  Joseph Pecoraro  <pecoraro@apple.com>
1690
1691        <rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
1692
1693        On iOS 6, when associating a Script with a Resource also update the type
1694        to be Script, that way the resource will get a TextResourceContentView
1695        instead of a GeneralResourceContentView and fall into the existing path
1696        that will fetch Script Source for an editor when it is on a breakpoint
1697        and cannot load the resource content.
1698
1699        Also, replace instances of "scriptsForResource" with the new scripts
1700        accessor on WebInspector.Resource.
1701
1702        Reviewed by Timothy Hatcher.
1703
1704        * UserInterface/DebuggerManager.js:
1705        (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
1706        * UserInterface/Resource.js:
1707        (WebInspector.Resource.prototype.associateWithScript):
1708        * UserInterface/SourceCodeTextEditor.js:
1709        (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
1710
17112013-05-22  Joseph Pecoraro  <pecoraro@apple.com>
1712
1713        <rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
1714
1715        Never loading content while on a breakpoint is possible in scripts if
1716        the backend is paused executing the script before it has sent the
1717        frontend information that the resource has finished loading. In these
1718        cases, it is still possible for the frontend to get the "script source"
1719        instead of the "resource content". These patches do that.
1720
1721        Start by creating an association between WebInspector.Resource and
1722        WebInspector.Script. The order of events is always such that the Resource
1723        is created first:
1724
1725          - Network.requestWillBeSent => create WebInspector.Resource
1726          - Debugger.scriptParsed => create WebInspector.Script
1727
1728        So associate a Script with a Resource, if there is one, when the Script
1729        is created. Currently we can only create the association with URLs,
1730        which is not perfect if resources have the same URL but different
1731        contents. That has never worked perfectly.
1732
1733        Reviewed by Timothy Hatcher.
1734
1735        * UserInterface/Script.js:
1736        (WebInspector.Script):
1737        (WebInspector.Script.prototype.get resource):
1738        (WebInspector.Script.prototype.requestContentFromBackend):
1739        (WebInspector.Script.prototype._resolveResource):
1740        On creation associate with a Resource via URL.
1741
1742        * UserInterface/Resource.js:
1743        (WebInspector.Resource.prototype.get scripts):
1744        (WebInspector.Resource.prototype.associateWithScript):
1745        Allow a Script to associate with this resource.
1746
1747        * UserInterface/FrameResourceManager.js:
1748        Remove "resourceForScript". Script's now have a resource property.
1749
1750        * UserInterface/DebuggerSidebarPanel.js:
1751        (WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
1752        * UserInterface/Main.js:
1753        (WebInspector.linkifyLocation):
1754        * UserInterface/ResourceSidebarPanel.js:
1755        (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
1756        (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
1757        * UserInterface/ScriptContentView.js:
1758        (WebInspector.ScriptContentView):
1759        * UserInterface/SourceCodeTextEditor.js:
1760        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled):
1761        * UserInterface/SourceMapManager.js:
1762        (WebInspector.SourceMapManager.prototype._loadAndParseSucceeded):
1763        Refactor to the simpler script.resource.
1764
17652013-05-21  Joseph Pecoraro  <pecoraro@apple.com>
1766
1767        Remove generic event listeners when ClusterContentViews are closed.
1768
1769        Some event listeners were removed, but not all. This would have
1770        caused the cluster content views to be leaked.
1771
1772        Reviewed by Timothy Hatcher.
1773
1774        * UserInterface/ClusterContentView.js:
1775        (WebInspector.ClusterContentView.prototype.closed):
1776
17772013-05-21  Joseph Pecoraro  <pecoraro@apple.com>
1778
1779        Remove the concept of left and right navigation items.
1780
1781        They are unused. So just remove them.
1782
1783        Reviewed by Timothy Hatcher.
1784
1785        * UserInterface/ContentBrowser.js:
1786        (WebInspector.ContentBrowser):
1787        (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
1788        * UserInterface/Sidebar.js:
1789        (WebInspector.Sidebar):
1790
17912013-05-22  Timothy Hatcher  <timothy@apple.com>
1792
1793        Fix auto complete property caching.
1794
1795        <rdar://problem/13961832> Autocomplete of function return value causes side-effects multiple times
1796
1797        Reviewed by Joseph Pecoraro.
1798
1799        * UserInterface/JavaScriptLogViewController.js:
1800
18012013-05-21  Antoine Quint  <graouts@apple.com>
1802
1803        <rdar://problem/13948862> REGRESSION (r150395): Sticky headers are mis-positioned
1804
1805        Reviewed by Joseph Pecoraro.
1806
1807        * UserInterface/DetailsSection.css:
1808        (.details-section > .header):
1809        (.details-section .details-section > .header):
1810        Position and layer the headers correctly such that they snap to
1811        the right position when scrolling.
1812
1813        * UserInterface/Main.js:
1814        (WebInspector.updateDockedState):
1815        (WebInspector._toolbarDisplayModeDidChange):
1816        (WebInspector._toolbarSizeModeDidChange):
1817        Remove unnecessary code now that sticky-positioned elements behave
1818        as expected in �overflow: scroll� elements.
1819
18202013-05-21  Antoine Quint  <graouts@apple.com>
1821
1822        <rdar://problem/13941438> Debugger popovers should prefer placement to the bottom/right over left to not cover expression
1823
1824        Reviewed by Timothy Hatcher.
1825
1826        Let Popover.present() be provided with a list of preferred edges in order
1827        of preference and let the source code popovers prefer layout above, below and on
1828        the right, in this order.
1829
1830        * UserInterface/Breakpoint.js:
1831        (WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
1832        * UserInterface/LayerTreeSidebarPanel.js:
1833        (WebInspector.LayerTreeSidebarPanel.prototype._updatePopoverForSelectedNode):
1834        Adopt new Popover.present() parameter type.
1835
1836        * UserInterface/Popover.js:
1837        (WebInspector.Popover):
1838        (WebInspector.Popover.prototype.present):
1839        Rename �preferredEdge� to �preferredEdges� (plural).
1840
1841        (WebInspector.Popover.prototype._update):
1842        Instead of gathering metrics sorted by keys, gather them sorted in the
1843        order of preference provided by the �preferredEdges� argument.
1844
1845        * UserInterface/SourceCodeTextEditor.js:
1846        (WebInspector.SourceCodeTextEditor.prototype._showPopover):
1847        Adopt new Popover.present() parameter type and provide the desired list
1848        of preferred edges in order.
1849
18502013-05-20  Joseph Pecoraro  <pecoraro@apple.com>
1851
1852        <rdar://problem/13945892> Console messages not working with iOS 6
1853
1854        Reviewed by Timothy Hatcher.
1855
1856        Don't use the enums right now. They were not generated for the iOS 6
1857        InspectorBackend commands file. In the future we should generate it
1858        for Legacy systems as well as trunk, and use constants instead of
1859        magic values in code.
1860
1861        * UserInterface/ConsoleObserver.js:
1862        (WebInspector.ConsoleObserver.prototype.messageAdded):
1863
18642013-05-19  Timothy Hatcher  <timothy@apple.com>
1865
1866        Prevent selection and deselect all messages when clicking disclosure triangles in the console.
1867
1868        This mostly worked before, but if a selection did happen it wouldn't go away by itself. Now
1869        it will go away if a disclosure triangle is clicked. Also the initial focus mouse down always
1870        selected the row, now it does not.
1871
1872        <rdar://problem/13839762> REGRESSION: When inspecting an object in the console, the entire object becomes highlighted
1873
1874        Reviewed by Joseph Pecoraro.
1875
1876        * UserInterface/ConsoleGroup.js:
1877        (WebInspector.ConsoleGroup.prototype.addMessage):
1878        (WebInspector.ConsoleGroup.prototype._titleMouseDown): Added.
1879        (WebInspector.ConsoleGroup.prototype._titleClicked):
1880        Don't select a group row when the title is clicked.
1881
1882        * UserInterface/DOMTreeOutline.js:
1883        (WebInspector.DOMTreeOutline.prototype._onmousedown):
1884        Prevent default instead of stopping propagation.
1885
1886        * UserInterface/LogContentView.css:
1887        (.outline-disclosure li.parent::before):
1888        Drive by disclosure triangle position tweak.
1889
1890        * UserInterface/LogContentView.js:
1891        (WebInspector.LogContentView.prototype._mousedown):
1892        Check for defaultPrevented and deselect all messages.
1893
1894        * UserInterface/TreeOutline.js:
1895        (TreeElement.treeElementMouseDown):
1896        Prevent default instead of stopping propagation.
1897
18982013-05-19  Timothy Hatcher  <timothy@apple.com>
1899
1900        Fix the issue where console logs would overlap on reload.
1901
1902        Rejigger the console elements so the flex element can grow to fit and the parent does the scrolling.
1903
1904        <rdar://problem/13932826> REGRESSION (r147261): Reloading page causes overlapping console logs (116404)
1905
1906        Reviewed by Antoine Quint.
1907
1908        * UserInterface/JavaScriptLogViewController.js:
1909        (WebInspector.JavaScriptLogViewController):
1910        (WebInspector.JavaScriptLogViewController.prototype.isScrolledToBottom):
1911        (WebInspector.JavaScriptLogViewController.prototype.scrollToBottom.delayedWork):
1912        (WebInspector.JavaScriptLogViewController.prototype.scrollToBottom):
1913        * UserInterface/LogContentView.css:
1914        (.content-view.log):
1915        (.console-messages):
1916        * UserInterface/LogContentView.js:
1917        (WebInspector.LogContentView):
1918        (WebInspector.LogContentView.prototype.updateLayout):
1919        (WebInspector.LogContentView.prototype.get scrollableElements):
1920        (WebInspector.LogContentView.prototype._ensureMessageIsVisible):
1921        (WebInspector.LogContentView.prototype._positionForMessage):
1922
19232013-05-18  Timothy Hatcher  <timothy@apple.com>
1924
1925        Make prefixed keywords syntax highlight correctly.
1926
1927        CodeMirror parses the vendor prefix separate from the property or keyword name,
1928        so we need to strip vendor prefixes from our all our names, not just properties.
1929
1930        Reviewed by Joseph Pecoraro.
1931
1932        * UserInterface/CSSCompletions.js:
1933        (WebInspector.CSSCompletions.requestCSSNameCompletions.nameForCodeMirror):
1934        (WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
1935
19362013-05-18  Joseph Pecoraro  <pecoraro@apple.com>
1937
1938        <rdar://problem/13774412> Update CSSKeywordCompletions.js for Curie + iOS
1939
1940        This is a pretty mechanical update to CSS autocompletion suggestions.
1941        Also fix suggestions not working for "-webkit-" properties.
1942
1943        Most of this list was manually generated by looking at specifications
1944        and walking CSSParser::parseValue, isValidKeywordPropertyAndValue,
1945        CSSProperty::isInheritedProperty, the related .in files, and a bit
1946        of sleuthing. It is not meant to be perfect, webkit differs from
1947        specs slightly and doesn't implement all properties, but it does
1948        a better job than before.
1949
1950        Rubber-stamped by Timothy Hatcher.
1951
1952        * UserInterface/CSSKeywordCompletions.js:
1953        (WebInspector.CSSKeywordCompletions.forProperty):
1954
19552013-05-17  Timothy Hatcher  <timothy@apple.com>
1956
1957        Drop -webkit- prefixes from CSS properties that no longer require them.
1958
1959        Reviewed by Joseph Pecoraro.
1960
1961        * UserInterface/CSSStyleDeclarationSection.css:
1962        * UserInterface/CodeMirrorOverrides.css:
1963        * UserInterface/DOMTreeOutline.css:
1964        * UserInterface/Editing.css:
1965        * UserInterface/LogContentView.css:
1966        * UserInterface/Main.css:
1967        * UserInterface/NavigationSidebarPanel.css:
1968        * UserInterface/Section.css:
1969        * UserInterface/TimelinesContentView.css:
1970
19712013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
1972
1973        <rdar://problem/13919974> 11A368: Instruments tab of RWI is almost empty when loading apple.com on device
1974
1975        Fix a typo in the constant name. It was using a non-existent constant
1976        which resulted in a 0ms timeout instead of the intended 15s.
1977
1978        Reviewed by Timothy Hatcher.
1979
1980        * UserInterface/TimelineManager.js:
1981        (WebInspector.TimelineManager.prototype._startAutoRecording):
1982
19832013-05-16  Joseph Pecoraro  <pecoraro@apple.com>
1984
1985        <rdar://problem/13917982> Inconsistency between right-clicking and control-clicking in Debugger gutter
1986
1987        Ignore "Ctrl + Left Click" in more places:
1988
1989          * in drag / resize scenarios
1990          * text editor gutter on a breakpoint
1991
1992        Reviewed by Timothy Hatcher.
1993
1994        * UserInterface/DataGrid.js:
1995        (WebInspector.DataGrid.prototype._startResizerDragging):
1996        (WebInspector.DataGrid.prototype._resizerDragging):
1997        (WebInspector.DataGrid.prototype._endResizerDragging):
1998        * UserInterface/Main.js:
1999        (WebInspector._dockedResizerMouseDown.dockedResizerDrag):
2000        (WebInspector._dockedResizerMouseDown.dockedResizerDragEnd):
2001        (WebInspector._dockedResizerMouseDown):
2002        (WebInspector._moveWindowMouseDown.toolbarDrag):
2003        (WebInspector._moveWindowMouseDown.toolbarDragEnd):
2004        (WebInspector._moveWindowMouseDown):
2005        * UserInterface/Sidebar.js:
2006        (WebInspector.Sidebar.prototype._resizerMouseDown):
2007        (WebInspector.Sidebar.prototype._resizerMouseUp):
2008        * UserInterface/TextEditor.js:
2009        (WebInspector.TextEditor.prototype._gutterMouseDown):
2010
20112013-05-17  Timothy Hatcher  <timothy@apple.com>
2012
2013        Make clicking completions work again in the Style details sidebar.
2014
2015        <rdar://problem/13919341> REGRESSION: Mouse clicking a CSS autocompletion suggestion no longer works
2016
2017        Reviewed by Antoine Quint.
2018
2019        * UserInterface/CSSStyleDeclarationTextEditor.js:
2020        (WebInspector.CSSStyleDeclarationTextEditor.prototype._editorBlured):
2021        Clicking a suggestion causes the editor to blur. We don't want to reset content in this case.
2022
2023        * UserInterface/CodeMirrorCompletionController.js:
2024        (WebInspector.CodeMirrorCompletionController.prototype.isHandlingClickEvent): Added.
2025        (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions): Use this.isHandlingClickEvent().
2026
20272013-05-16  Timothy Hatcher  <timothy@apple.com>
2028
2029        Reset the branches when the main frame navigates.
2030
2031        This makes sure the SourceCodeRevisions don't stick around between page loads and take up memory.
2032
2033        Reviewed by Joseph Pecoraro.
2034
2035        * UserInterface/BranchManager.js:
2036        (WebInspector.BranchManager):
2037        (WebInspector.BranchManager.prototype.initialize):
2038        (WebInspector.BranchManager.prototype.deleteBranch):
2039        (WebInspector.BranchManager.prototype._mainResourceDidChange):
2040
20412013-05-16  Timothy Hatcher  <timothy@apple.com>
2042
2043        Some random style tweaks.
2044
2045        Reviewed by Joseph Pecoraro.
2046
2047        * UserInterface/CSSStyleDeclarationSection.css:
2048        (.style-declaration-section > .header): Smaller top margin to align with the icon better.
2049        * UserInterface/CodeMirrorOverrides.css:
2050        (.CodeMirror .CodeMirror-gutters): Lighter border color to match Xcode 5.
2051
20522013-05-16  Timothy Hatcher  <timothy@apple.com>
2053
2054        Fix a case where we would enter an infinite loop, consuming memory and hang.
2055
2056        <rdar://problem/13911608> REGRESSION (r50998): Massive memory growth and hanging (115811)
2057
2058        Reviewed by Joseph Pecoraro.
2059
2060        * UserInterface/Resource.js:
2061        (WebInspector.Resource.prototype.updateForRedirectResponse):
2062        (WebInspector.Resource.prototype.updateForResponse):
2063        (WebInspector.Resource.prototype.increaseSize):
2064        (WebInspector.Resource.prototype.markAsFinished):
2065        (WebInspector.Resource.prototype.markAsFailed):
2066        Timestamps are expected to be NaN instead of null. This wasn't an issue before because
2067        the timeline code didn't use these timestamps. Now Resource.firstTimestamp uses them,
2068        which is used by ResourceTimelineRecord.startTime.
2069
20702013-05-15  Timothy Hatcher  <timothy@apple.com>
2071
2072        Allow Command-K to clear the console anywhere in the Inspector.
2073
2074        <rdar://problem/13888241> Command-K doesn't clear the Console unless it has focus
2075
2076        Reviewed by Antoine Quint.
2077
2078        * UserInterface/JavaScriptLogViewController.js:
2079        (WebInspector.JavaScriptLogViewController):
2080
20812013-05-15  Timothy Hatcher  <timothy@apple.com>
2082
2083        Fix the Save As... keyboard shortcut.
2084
2085        Reviewed by Antoine Quint.
2086
2087        * UserInterface/ContentBrowser.js:
2088        (WebInspector.ContentBrowser):
2089        Don't require the Option key. It is Command-Shift-S.
2090
20912013-05-15  Timothy Hatcher  <timothy@apple.com>
2092
2093        Make clicking the console icons in the dashboard toggle the scope.
2094
2095        <rdar://problem/13884713> Improve console filtering via the dashboard buttons
2096
2097        Reviewed by Antoine Quint.
2098
2099        * UserInterface/Main.js:
2100        (WebInspector.showFullHeightConsole):
2101        If the requested scope is already selected and the console is showing, then switch back to All.
2102
21032013-05-15  Timothy Hatcher  <timothy@apple.com>
2104
2105        Make the tab key commit the completion of there is only one suggestion.
2106
2107        <rdar://problem/13897001> REGRESSION (Safari 6): Tab to accept autocomplete with 1 result
2108        should dismiss completion suggestions popover
2109
2110        Reviewed by Antoine Quint.
2111
2112        * UserInterface/CodeMirrorCompletionController.js:
2113        (WebInspector.CodeMirrorCompletionController.prototype._handleTabKey):
2114        Commit the current completion if there is only one suggestion.
2115
21162013-05-14  Timothy Hatcher  <timothy@apple.com>
2117
2118        Always evaluate the console prompt if the cursor is not at the last position.
2119
2120        <rdar://problem/13854691> New Return key behavior in Web Inspector breaks my typical usage
2121
2122        Reviewed by Joseph Pecoraro.
2123
2124        * UserInterface/ConsolePrompt.js:
2125        (WebInspector.ConsolePrompt.prototype._handleEnterKey):
2126        * UserInterface/JavaScriptLogViewController.js:
2127
21282013-05-14  Timothy Hatcher  <timothy@apple.com>
2129
2130        Update Frame.securityOrigin when committing the provisional load.
2131
2132        Reviewed by Joseph Pecoraro.
2133
2134        * UserInterface/Frame.js:
2135        (WebInspector.Frame.prototype.commitProvisionalLoad):
2136        * UserInterface/FrameResourceManager.js:
2137        (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
2138
21392013-05-14  Timothy Hatcher  <timothy@apple.com>
2140
2141        Add DOMStorage when the main resource changes.
2142
2143        <rdar://problem/13844066> REGRESSION: If the Web Inspector is displayed when you refresh the page, local and session storage is not visible
2144
2145        Reviewed by Joseph Pecoraro.
2146
2147        * UserInterface/StorageManager.js:
2148        (WebInspector.StorageManager.prototype._mainResourceDidChange):
2149        (WebInspector.StorageManager.prototype._addDOMStorageIfNeeded):
2150        (WebInspector.StorageManager.prototype._securityOriginDidChange):
2151
21522013-05-13  Joseph Pecoraro  <pecoraro@apple.com>
2153
2154        <rdar://problem/13876379> Pretty printing while paused in the debugger loses the execution line
2155
2156        When pretty printing we replace the entire contents of the editor. If
2157        the display location didn't change at all, then when we re-set the
2158        execution line number, we wouldn't update the style on the line.
2159
2160        This change makes updating the execution line more of the TextEditor's
2161        responsibility on a pretty print. Previously it was working in most cases
2162        but now it should always work as long as the TextEditor has been given
2163        an accurate execution line and column number. In pretty print we delete
2164        the execution line handle so we are guaranteed to recreate it.
2165
2166        Just in case, also update SourceCodeLocation to listen to any location
2167        changes, not just display location changes.
2168
2169        Reviewed by Timothy Hatcher.
2170
2171        * UserInterface/SourceCodeTextEditor.js:
2172        (WebInspector.SourceCodeTextEditor.prototype.close):
2173        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
2174        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameSourceCodeLocationChanged):
2175        * UserInterface/TextEditor.js:
2176        (WebInspector.TextEditor):
2177        (WebInspector.TextEditor.prototype.get executionColumnNumber):
2178        (WebInspector.TextEditor.prototype.set executionColumnNumber):
2179
21802013-05-13  Timothy Hatcher  <timothy@apple.com>
2181
2182        Fix the shortcut for the Layer details sidebar panel.
2183
2184        Also fix the naming of the toolbar buttons for the Style details sidebar and
2185        Layer details sidebar so they are plural while the name in the tooltip is still singular.
2186
2187        <rdar://problem/13871872> Layers details sidebar shortcut should be control-shift-4, not control-shift-5
2188
2189        Reviewed by Joseph Pecoraro.
2190
2191        * Localizations/en.lproj/localizedStrings.js:
2192        * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
2193        (WebInspector.ApplicationCacheDetailsSidebarPanel):
2194        * UserInterface/CSSStyleDetailsSidebarPanel.js:
2195        (WebInspector.CSSStyleDetailsSidebarPanel):
2196        * UserInterface/DOMDetailsSidebarPanel.js:
2197        (WebInspector.DOMDetailsSidebarPanel):
2198        * UserInterface/DOMNodeDetailsSidebarPanel.js:
2199        (WebInspector.DOMNodeDetailsSidebarPanel):
2200        * UserInterface/DetailsSidebarPanel.js:
2201        (WebInspector.DetailsSidebarPanel):
2202        * UserInterface/LayerTreeSidebarPanel.js:
2203        (WebInspector.LayerTreeSidebarPanel):
2204        * UserInterface/ResourceDetailsSidebarPanel.js:
2205        (WebInspector.ResourceDetailsSidebarPanel):
2206        * UserInterface/ScopeChainDetailsSidebarPanel.js:
2207        (WebInspector.ScopeChainDetailsSidebarPanel):
2208
22092013-05-13  Timothy Hatcher  <timothy@apple.com>
2210
2211        Tweak the console completions to work as expected in more cases.
2212
2213        Also prevent empty prefix completions unless it is the start of property access.
2214        This was a regression from the fix for <rdar://problem/13860627>.
2215
2216        <rdar://problem/13871885> Command-line API functions don't autocomplete when passed as parameter
2217
2218        Reviewed by Joseph Pecoraro.
2219
2220        * UserInterface/CodeMirrorCompletionController.js:
2221        (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
2222        * UserInterface/ConsolePrompt.js:
2223        (WebInspector.ConsolePrompt.prototype.completionControllerCompletionsNeeded):
2224        * UserInterface/JavaScriptLogViewController.js:
2225
22262013-05-12  Timothy Hatcher  <timothy@apple.com>
2227
2228        Update the toolbar height so the save sheet is positioned correctly and window gradient is accurate.
2229
2230        <rdar://problem/13871067> Save sheet on the Web Inspector does not come out from under the toolbar
2231
2232        Reviewed by Antoine Quint.
2233
2234        * UserInterface/Main.js:
2235        (WebInspector.contentLoaded):
2236        (WebInspector.updateDockedState):
2237        (WebInspector._updateToolbarHeight):
2238        (WebInspector._toolbarDisplayModeDidChange):
2239        (WebInspector._toolbarSizeModeDidChange):
2240
22412013-05-13  Joseph Pecoraro  <pecoraro@apple.com>
2242
2243        Improve String.prototype.startsWith to not search the entire string.
2244
2245        Using the optional second parameter of lastIndexOf we can only search
2246        for a substring from index 0, and not check the rest of the string.
2247
2248        I also went through and replaced all uses of str.indexOf(...) === 0 with
2249        str.startsWith(...), or if a single character str.charAt(0) === "?".
2250
2251        Reviewed by Timothy Hatcher.
2252
2253        * UserInterface/CSSCompletions.js:
2254        (WebInspector.CSSCompletions.prototype.startsWith):
2255        (WebInspector.CSSCompletions.prototype._firstIndexOfPrefix):
2256        * UserInterface/CallFrameTreeElement.js:
2257        (WebInspector.CallFrameTreeElement):
2258        * UserInterface/CookieStorageContentView.js:
2259        (WebInspector.cookieMatchesResourceURL):
2260        * UserInterface/DOMTreeElement.js:
2261        (WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
2262        * UserInterface/EditingSupport.js:
2263        * UserInterface/InstrumentSidebarPanel.js:
2264        (WebInspector.InstrumentSidebarPanel.prototype._titleForProfile):
2265        * UserInterface/JavaScriptProfileView.js:
2266        * UserInterface/Main.js:
2267        (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
2268        * UserInterface/Resource.js:
2269        (WebInspector.Resource.Type.fromMIMEType):
2270        * UserInterface/Utilities.js:
2271
22722013-05-13  Joseph Pecoraro  <pecoraro@apple.com>
2273
2274        Make mailto: href links behave correctly.
2275
2276        Test: data:text/html,<a href="mailto:pecoraro@apple.com?subject=email">Email Joe</a>
2277
2278        Reviewed by Timothy Hatcher.
2279
2280        * UserInterface/Utilities.js:
2281
22822013-05-13  Joseph Pecoraro  <pecoraro@apple.com>
2283
2284        <rdar://problem/13572739> REGRESSION: Styles sidebar url(...) should have a way to jump to the resource
2285
2286        TextEditor / SourceCodeTextEditor (most resources) already had behavior where
2287        clicking a "link" would attempt to open it in the Inspector, and fallback to
2288        opening a new browser tab for the URL. This hardens that behavior in the
2289        "jump to symbol" case, and makes it work in the CSS Sidebar with Command+Click.
2290
2291        To encourage editing in the style sidebar, style url(...)s as strings,
2292        which is how they displayed before these patches.
2293
2294        Reviewed by Timothy Hatcher.
2295
2296        * UserInterface/TextEditor.js:
2297        (WebInspector.TextEditor.prototype._openClickedLinks):
2298        Cleanup the code a bit.
2299
2300        * UserInterface/SourceCodeTextEditor.js:
2301        (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
2302        Don't jump to symbol when clicking a link. Fallback to TextEditor's link opening behavior.
2303
2304        * UserInterface/CSSStyleDeclarationTextEditor.js:
2305        (WebInspector.CSSStyleDeclarationTextEditor.prototype):
2306        Handle jump to symbol when clicking a link to behave link TextEditor's link opening behavior.
2307
2308        * UserInterface/CSSStyleDeclarationTextEditor.css:
2309        (.css-style-text-editor > .CodeMirror .cm-link):
2310        In the Style sidebar editors display links as strings by default.
2311
23122013-05-13  Joseph Pecoraro  <pecoraro@apple.com>
2313
2314        <rdar://problem/13572739> REGRESSION: Styles sidebar url(...) should have a way to jump to the resource
2315
2316        Add extendedCSSToken, modeled after extendedXMLToken to parse url(...)
2317        links and give them a "link" style class.
2318
2319        Normally CodeMirror parses "url", "(", <optionally quoted string>, ")".
2320        We hook into this case and manually parse the optionally quoted string
2321        ourselves so that we can handle quotes and whitespace exactly how we
2322        want to.
2323
2324        Reviewed by Timothy Hatcher.
2325
2326        * UserInterface/CodeMirrorAdditions.js:
2327
23282013-05-15  Joseph Pecoraro  <pecoraro@apple.com>
2329
2330        <rdar://problem/13865123> REGRESSION: Incorrect link tokenization of unquoted src/href links - <img src=...>
2331
2332        Handle unquoted attributes when we take over tokenization of link attribute values.
2333
2334        Reviewed by Timothy Hatcher.
2335
2336        * UserInterface/CodeMirrorAdditions.js:
2337
23382013-05-11  Timothy Hatcher  <timothy@apple.com>
2339
2340        Make the tab behavior consistent among all CodeMirror editors.
2341
2342        Making this a setting is tracked by <rdar://problem/10593948>.
2343
2344        Reviewed by Darin Adler.
2345
2346        * UserInterface/CSSStyleDeclarationTextEditor.js:
2347        (WebInspector.CSSStyleDeclarationTextEditor):
2348        * UserInterface/TextEditor.js:
2349        (WebInspector.TextEditor):
2350
23512013-05-11  Timothy Hatcher  <timothy@apple.com>
2352
2353        Allow editing any local file since edits can be saved and reloaded right from the Inspector.
2354
2355        Reviewed by Dean Jackson.
2356
2357        * UserInterface/ScriptContentView.js:
2358        (WebInspector.ScriptContentView.prototype._contentWillPopulate):
2359        * UserInterface/TextResourceContentView.js:
2360        (WebInspector.TextResourceContentView.prototype._contentWillPopulate):
2361
23622013-05-11  Timothy Hatcher  <timothy@apple.com>
2363
2364        Support saving text resources and the console log to a local file.
2365
2366        <rdar://problem/5827275> PARITY (Chrome Developer Tools): Add an option to save a resource locally
2367
2368        Reviewed by Dean Jackson.
2369
2370        * Localizations/en.lproj/localizedStrings.js: Updated.
2371        * UserInterface/ClusterContentView.js:
2372        (WebInspector.ClusterContentView.prototype.get supportsSave):
2373        (WebInspector.ClusterContentView.prototype.get saveData):
2374        * UserInterface/ConsoleMessageImpl.js:
2375        (WebInspector.ConsoleMessageImpl.prototype.toClipboardString): Always include the level. It was omitted
2376        when we didn't have text range selection to make it easier to copy and paste. But we also include the
2377        file and line info, so it was already has more info than just the message.
2378        * UserInterface/ContentBrowser.js:
2379        (WebInspector.ContentBrowser):
2380        (WebInspector.ContentBrowser.prototype._saveDataToFile):
2381        (WebInspector.ContentBrowser.prototype._save):
2382        (WebInspector.ContentBrowser.prototype._saveAs):
2383        * UserInterface/LogContentView.js:
2384        (WebInspector.LogContentView.prototype.get supportsSave):
2385        (WebInspector.LogContentView.prototype.get saveData):
2386        (WebInspector.LogContentView.prototype.handleCopyEvent):
2387        (WebInspector.LogContentView.prototype._formatMessagesAsData.var):
2388        (WebInspector.LogContentView.prototype._formatMessagesAsData):
2389        * UserInterface/ScriptContentView.js:
2390        (WebInspector.ScriptContentView.prototype.get supportsSave):
2391        (WebInspector.ScriptContentView.prototype.get saveData):
2392        * UserInterface/TextContentView.js:
2393        (WebInspector.TextContentView.prototype.get supportsSave):
2394        (WebInspector.TextContentView.prototype.get saveData):
2395        * UserInterface/TextResourceContentView.js:
2396        (WebInspector.TextResourceContentView.prototype.get supportsSave):
2397        (WebInspector.TextResourceContentView.prototype.get saveData):
2398
23992013-05-11  Timothy Hatcher  <timothy@apple.com>
2400
2401        Fix an exception I saw while navigating between pages.
2402
2403        I only reproduced this once, but the fix is a simple null check.
2404        I'm assuming close was called a second time.
2405
2406        Reviewed by Anders Carlsson.
2407
2408        * UserInterface/DOMTreeOutline.js:
2409        (WebInspector.DOMTreeOutline.prototype.close):
2410
24112013-05-10  Timothy Hatcher  <timothy@apple.com>
2412
2413        Tweak layer borders icon.
2414
2415        <rdar://problem/13717886> Two layers buttons with different meanings
2416
2417        * UserInterface/Images/LayerBorders.pdf:
2418
24192013-05-10  Joseph Pecoraro  <pecoraro@apple.com>
2420
2421        <rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
2422
2423        Add a "jump to symbol" mode when the command key is down for the CSS
2424        style sidebar to jump to the display CSS Resource.
2425
2426        Reviewed by Timothy Hatcher.
2427
2428        * UserInterface/CSSStyleDeclarationTextEditor.js:
2429        (WebInspector.CSSStyleDeclarationTextEditor):
2430        (WebInspector.CSSStyleDeclarationTextEditor.prototype.set style):
2431        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateJumpToSymbolTrackingMode):
2432        Listen for GlobalModifierKeysDidChange events when the style for the
2433        editor has an owner rule and that owner rule has a source code location.
2434
2435        (WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
2436        Jump to the display resource when clicking the highlighted range.
2437
2438        (WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
2439        Immediately highlight hovered ranges for jump to symbol mode.
2440
24412013-05-10  Joseph Pecoraro  <pecoraro@apple.com>
2442
2443        <rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
2444
2445        Add a "jump to symbol" mode when the command key is down, to quickly
2446        jump between a SourceMapResource and the original resources for the
2447        hovered token. This mode takes precedence over debugger popovers if
2448        enabled (because the command key is pressed).
2449
2450        Reviewed by Timothy Hatcher.
2451
2452        * UserInterface/SourceCodeTextEditor.js:
2453        (WebInspector.SourceCodeTextEditor):
2454        (WebInspector.SourceCodeTextEditor.prototype.hidden):
2455        (WebInspector.SourceCodeTextEditor.prototype.close):
2456        (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
2457        (WebInspector.SourceCodeTextEditor.prototype._shouldTrackTokenHovering):
2458        Listen for GlobalModifierKeysDidChange events when this file has a source map
2459        (either it is a SourceMapResource or it is a SourceCode with sourceMap resources).
2460
2461        (WebInspector.SourceCodeTextEditor.prototype._startTrackingTokenHoveringIfNeeded):
2462        (WebInspector.SourceCodeTextEditor.prototype._stopTrackingTokenHoveringIfNeeded):
2463        (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
2464        (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
2465        (WebInspector.SourceCodeTextEditor.prototype._sourceCodeSourceMapAdded):
2466        In SourceCodeTextEditors there are 2 possible reasons we may have hover tracking,
2467        when on a breakpoint for JavaScript or in Jump To Symbol tracking mode.
2468
2469        (WebInspector.SourceCodeTextEditor.prototype._updateJumpToSymbolTrackingMode):
2470        (WebInspector.SourceCodeTextEditor.prototype._enableJumpToSymbolTrackingModeSettings):
2471        (WebInspector.SourceCodeTextEditor.prototype._disableJumpToSymbolTrackingModeSettings):
2472        Switch between and different tracking modes with different settings.
2473
2474        (WebInspector.SourceCodeTextEditor.prototype._sourceCodeLocationForEditorPosition):
2475        (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
2476        When in jump to symbol mode, determine the sourceCodeLocation relating to the
2477        token that was clicked and jump between resources.
2478        
2479        (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
2480        When in jump to symbol mode, that takes precedence. Highlight just the hovered token.
2481
24822013-05-10  Joseph Pecoraro  <pecoraro@apple.com>
2483
2484        <rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
2485
2486        Move token tracking out of TextEditor into its own class with settings,
2487        CodeMirrorTokenTrackingController. You can now set the token mode on
2488        the controller to get different types of candidate hovered token results
2489        back to the delegate (TextEditor subclass).
2490
2491        The CodeMirrorTokenTrackingController can start/stop tracking, highlight
2492        a given text range, set delays for mousing over and out of tokens before
2493        actions are taken, and provide different candidates depending the chosen
2494        mode. The current modes are:
2495        
2496            NonSymbolTokens - returns a candidate for just the hovered token.
2497            JavaScriptExpression - returns a candidate for the hovered token with
2498            extra information about the JavaScript expression ending at that token.
2499
2500        When tracking is enabled, the delegate may be notified of changes:
2501
2502            tokenTrackingControllerCanReleaseHighlightedRange - should remove the highlight
2503            tokenTrackingControllerHighlightedRangeReleased - the highlight was removed
2504            tokenTrackingControllerHighlightedRangeWasClicked - the highlight was clicked
2505            tokenTrackingControllerNewHighlightCandidate - new hovered highlight candidate
2506
2507        A plus side of this is that TextEditor now no longer knows about
2508        "JavaScript". It shouldn't need to know about a certain mode of
2509        content that it contains.
2510
2511        Reviewed by Timothy Hatcher.
2512
2513        * UserInterface/Main.html:
2514        * UserInterface/CodeMirrorTokenTrackingController.css: Added.
2515        (.CodeMirror .jump-to-symbol-highlight): Shared style for any type of editor.
2516        * UserInterface/CodeMirrorTokenTrackingController.js: Added.
2517        (WebInspector.CodeMirrorTokenTrackingController):
2518        (WebInspector.CodeMirrorTokenTrackingController.prototype.get delegate):
2519        (WebInspector.CodeMirrorTokenTrackingController.prototype.set delegate):
2520        (WebInspector.CodeMirrorTokenTrackingController.prototype.get mode):
2521        (WebInspector.CodeMirrorTokenTrackingController.prototype.set mode):
2522        (WebInspector.CodeMirrorTokenTrackingController.prototype.get mouseOverDelayDuration):
2523        (WebInspector.CodeMirrorTokenTrackingController.prototype.set mouseOverDelayDuration):
2524        (WebInspector.CodeMirrorTokenTrackingController.prototype.get mouseOutReleaseDelayDuration):
2525        (WebInspector.CodeMirrorTokenTrackingController.prototype.set mouseOutReleaseDelayDuration):
2526        (WebInspector.CodeMirrorTokenTrackingController.prototype.get classNameForHighlightedRange):
2527        (WebInspector.CodeMirrorTokenTrackingController.prototype.set classNameForHighlightedRange):
2528        Different settings of the controller.
2529
2530        (WebInspector.CodeMirrorTokenTrackingController.prototype.get tracking):
2531        (WebInspector.CodeMirrorTokenTrackingController.prototype.get candidate):
2532        Accessors for current state, but cannot be modified.
2533
2534        (WebInspector.CodeMirrorTokenTrackingController.prototype.startTracking):
2535        (WebInspector.CodeMirrorTokenTrackingController.prototype.stopTracking):
2536        (WebInspector.CodeMirrorTokenTrackingController.prototype.highlightRange):
2537        (WebInspector.CodeMirrorTokenTrackingController.prototype.removeHighlightedRange):
2538        API to make use of the tracker to start/stop/highlight.
2539
2540        (WebInspector.CodeMirrorTokenTrackingController.prototype.boundsForRange):
2541        Helper for getting the bounds of a given codemirror text range.
2542
2543        (WebInspector.CodeMirrorTokenTrackingController.prototype.handleEvent):
2544        (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedWithMarkedText):
2545        (WebInspector.CodeMirrorTokenTrackingController.prototype._markedTextIsNoLongerHovered):
2546        (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor):
2547        (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOutOfEditor):
2548        (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasPressedOverEditor):
2549        (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
2550        (WebInspector.CodeMirrorTokenTrackingController.prototype._windowLostFocus):
2551        Events handled while tracking. Very few changes.
2552
2553        (WebInspector.CodeMirrorTokenTrackingController.prototype._processNewHoveredToken):
2554        (WebInspector.CodeMirrorTokenTrackingController.prototype._processNonSymbolToken):
2555        (WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
2556        When a token is hovered, create a candidate depending on the controller's mode.
2557
2558        * UserInterface/TextEditor.js:
2559        (WebInspector.TextEditor):
2560        (WebInspector.TextEditor.prototype.get tokenTrackingController):
2561        Create and expose the tokenTrackingController.
2562
2563        * UserInterface/SourceCodeTextEditor.js:
2564        (WebInspector.SourceCodeTextEditor):
2565        (WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved):
2566        (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
2567        (WebInspector.SourceCodeTextEditor.prototype._shouldTrackTokenHovering):
2568        (WebInspector.SourceCodeTextEditor.prototype._startTrackingTokenHoveringIfNeeded):
2569        (WebInspector.SourceCodeTextEditor.prototype._stopTrackingTokenHoveringIfNeeded):
2570        (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
2571        (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
2572        (WebInspector.SourceCodeTextEditor.prototype._updateJumpToSymbolTrackingMode):
2573        (WebInspector.SourceCodeTextEditor.prototype._enableJumpToSymbolTrackingModeSettings):
2574        (WebInspector.SourceCodeTextEditor.prototype._disableJumpToSymbolTrackingModeSettings):
2575        (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerCanReleaseHighlightedRange):
2576        (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
2577        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
2578        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
2579        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
2580        Switch to the tracking controller instead of TextEditor methods and properties.
2581
2582        * UserInterface/TextEditor.css:
2583        (.text-editor > .CodeMirror .hovered-expression-highlight):
2584        (@-webkit-keyframes text-editor-hovered-expression-highlight-fadeout):
2585        Renamed the class name for expressions to have "expression" in the name.
2586
2587
25882013-05-10  Joseph Pecoraro  <pecoraro@apple.com>
2589
2590        <rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
2591
2592        Introduce WebInspector.modifierKeys to know which modifier keys are
2593        active at any time (command, option, shift). Trigger events on changes
2594        through WebInspector.notifications.
2595
2596        Reviewed by Timothy Hatcher.
2597
2598        * UserInterface/Main.js:
2599        (WebInspector.contentLoaded):
2600        (WebInspector._updateModifierKeys):
2601        (WebInspector._windowKeyDown):
2602        (WebInspector._windowKeyUp):
2603        * UserInterface/Object.js:
2604
26052013-05-10  Joseph Pecoraro  <pecoraro@apple.com>
2606
2607        Do a little renaming on ResourceSidebarPanel show methods for text
2608        ranges. This better matches the showSourceCodeLocation method names.
2609
2610        Reviewed by Timothy Hatcher.
2611
2612        * UserInterface/ResourceSidebarPanel.js:
2613        (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
2614        (WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeTextRange):
2615        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
2616
26172013-05-10  Timothy Hatcher  <timothy@apple.com>
2618
2619        Make the console prompt suggest completions after typing "." or "[".
2620
2621        <rdar://problem/13860627> REGRESSION: Console autocompletion does not suggest anything until first character is typed
2622
2623        Reviewed by Joseph Pecoraro.
2624
2625        * UserInterface/CodeMirrorCompletionController.js:
2626        (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
2627        (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
2628        (WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
2629        (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
2630
26312013-05-09  Timothy Hatcher  <timothy@apple.com>
2632
2633        Tell WebInspector.Resource about its type when it is created instead of changing it later.
2634        
2635        This depends on: https://webkit.org/b/74935
2636
2637        <rdar://problem/13726105> Timeline network filters don't update as resources change type (74935)
2638
2639        Reviewed by David Kilzer.
2640
2641        * UserInterface/FrameResourceManager.js:
2642        (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
2643        (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
2644        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
2645        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
2646        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
2647        * UserInterface/InspectorBackendCommands.js:
2648        * UserInterface/NetworkObserver.js:
2649        (WebInspector.NetworkObserver.prototype.requestWillBeSent):
2650
26512013-05-09  Timothy Hatcher  <timothy@apple.com>
2652
2653        Use a different image for the layer border toggle button.
2654
2655        <rdar://problem/13717886> Two layers buttons with different meanings
2656
2657        Reviewed by Joseph Pecoraro.
2658
2659        * UserInterface/DOMTreeContentView.js:
2660        (WebInspector.DOMTreeContentView):
2661        * UserInterface/Images/LayerBorders.pdf: Added.
2662
26632013-05-08  Timothy Hatcher  <timothy@apple.com>
2664
2665        Fix the heirarchical path components for unrevealed source map resources.
2666
2667        <rdar://problem/13681487> Missing heirarchical path components selecting breakpoints in source map resources in Debugger sidebar
2668
2669        Reviewed by Joseph Pecoraro.
2670
2671        * UserInterface/ResourceSidebarPanel.js:
2672        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
2673        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
2674        Special case WebInspector.SourceMapResource.
2675
2676        * UserInterface/SourceCodeTreeElement.js:
2677        (WebInspector.SourceCodeTreeElement.prototype._updateSourceCode):
2678        Revert r50608.
2679
26802013-05-07  Timothy Hatcher  <timothy@apple.com>
2681
2682        Fix the background color for the Timeline navigation bar.
2683
2684        The container is taller than the navigation bar, and it used for mouse over slop.
2685        So the background color needs to be on the navigation bar.
2686
2687        Reviewed by Joseph Pecoraro.
2688
2689        * UserInterface/TimelinesContentView.css:
2690        (.content-view.timelines > .data-grid > .navigation-bar-container):
2691        (.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
2692
26932013-05-07  Timothy Hatcher  <timothy@apple.com>
2694
2695        Compare async resource types by their first timestamp so they are in chronological order.
2696
2697        <rdar://problem/13827118> Web Inspector: cannot see order of xhrs in resource inspector (115728)
2698
2699        Reviewed by Joseph Pecoraro.
2700
2701        * UserInterface/ResourceTreeElement.js:
2702        (WebInspector.ResourceTreeElement.compareResourceTreeElements):
2703
27042013-05-07  Timothy Hatcher  <timothy@apple.com>
2705
2706        Fix and simplify the layout path for Toolbar.
2707
2708        <rdar://problem/13828232> REGRESSION: Toolbar overflows when using Icons and Text (Horizontal) mode
2709
2710        Reviewed by Joseph Pecoraro.
2711
2712        * UserInterface/Toolbar.css:
2713        (.toolbar .control-section):
2714        * UserInterface/Toolbar.js:
2715        (WebInspector.Toolbar.prototype.customUpdateLayout.isOverflowingToolbar):
2716        (WebInspector.Toolbar.prototype.customUpdateLayout):
2717
27182013-05-07  Joseph Pecoraro  <pecoraro@apple.com>
2719
2720        <rdar://problem/13821139> After deleting a node when remote inspecting, Web Inspector is broken
2721
2722        When using the remote inspector, there is enough of a delay between
2723        messages that the didRemoveNode handler triggers the DOMTreeUpdater to
2724        refresh the portion of the tree before this removeNodeCallback happens.
2725        Since removeNodeCallback is asynchronous anyways, we should bail if
2726        the tree element was already removed from the tree (has no parent).
2727
2728        Reviewed by Timothy Hatcher.
2729
2730        * UserInterface/DOMTreeElement.js:
2731        (WebInspector.DOMTreeElement.prototype.remove.removeNodeCallback):
2732        (WebInspector.DOMTreeElement.prototype.remove):
2733
27342013-05-07  Joseph Pecoraro  <pecoraro@apple.com>
2735
2736        Fix member name typo.
2737
2738        This was the only occurrence of _selectDOMNode. This looks
2739        like it was just a typo of _selectedDOMNode.
2740
2741        Reviewed by Darin Adler.
2742
2743        * UserInterface/DOMTreeOutline.js:
2744        (WebInspector.DOMTreeOutline):
2745
27462013-05-07  Timothy Hatcher  <timothy@apple.com>
2747
2748        Use a brighter blue for selected labels in the label-only toolbar mode.
2749
2750        This better matches the blue used in the selected toolbar icons.
2751
2752        Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
2753
2754        Reviewed by Antoine Quint.
2755
2756        * UserInterface/ButtonToolbarItem.css:
2757        (.toolbar.label-only .item.activate.button.activated > .label):
2758
27592013-05-07  Timothy Hatcher  <timothy@apple.com>
2760
2761        Only allow the LCD to be a single line, giving less difference between toolbar modes and sizes.
2762
2763        This better distributes the space in the LCD and makes it collapse down to 3 items when
2764        there isn't enough room for all 6 items.
2765
2766        Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
2767
2768        Reviewed by Antoine Quint.
2769
2770        * UserInterface/DashboardView.css:
2771        (.toolbar .dashboard):
2772        (body.nightly-build .toolbar .dashboard):
2773        (body.nightly-build .toolbar.collapsed .dashboard):
2774        (body:not(.nightly-build) .toolbar.collapsed .dashboard):
2775        (body:not(.nightly-build) .toolbar.collapsed .dashboard > .logs):
2776        (.toolbar .dashboard > .item):
2777        (.toolbar .dashboard > .resourcesSize):
2778        (.toolbar .dashboard > .item > div):
2779        (.toolbar.normal-size.icon-and-label-vertical .dashboard):
2780        (.toolbar.normal-size.icon-and-label-horizontal .dashboard > .item):
2781        * UserInterface/DashboardView.js:
2782        (WebInspector.DashboardView):
2783
27842013-05-06  Timothy Hatcher  <timothy@apple.com>
2785
2786        Update the LCD background to match Xcode 5.
2787
2788        This change is conditional to non-nightlies.
2789
2790        Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
2791
2792        Reviewed by Joseph Pecoraro.
2793
2794        * UserInterface/DashboardView.css:
2795        (.toolbar .dashboard):
2796        (body:not(.nightly-build) .toolbar .dashboard):
2797        (body.window-inactive:not(.nightly-build) .toolbar .dashboard):
2798        (body.nightly-build .toolbar .dashboard):
2799        (.toolbar .dashboard > .item):
2800        (.toolbar.small-size.icon-and-label-horizontal .dashboard):
2801        (body.nightly-build .toolbar.small-size.icon-and-label-horizontal .dashboard):
2802        (.toolbar.small-size.icon-and-label-horizontal .dashboard > .item):
2803        (body.nightly-build .toolbar.small-size.icon-and-label-horizontal .dashboard > .item):
2804        (.toolbar.normal-size.icon-and-label-horizontal .dashboard):
2805        (body.nightly-build .toolbar.normal-size.icon-and-label-horizontal .dashboard):
2806        (.toolbar.small-size.icon-and-label-vertical .dashboard):
2807        (body.nightly-build .toolbar.small-size.icon-and-label-vertical .dashboard):
2808        (.toolbar.normal-size.icon-and-label-vertical .dashboard):
2809        (body.nightly-build .toolbar.normal-size.icon-and-label-vertical .dashboard):
2810        (.toolbar.icon-and-label-vertical .dashboard > .item):
2811        (body.nightly-build .toolbar.icon-and-label-vertical .dashboard > .item):
2812
28132013-05-06  Timothy Hatcher  <timothy@apple.com>
2814
2815        Update the filter field placeholder in the Resources sidebar when showing search results.
2816
2817        Reviewed by Antoine Quint.
2818
2819        * Localizations/en.lproj/localizedStrings.js:
2820        * UserInterface/ResourceSidebarPanel.js:
2821
28222013-05-06  Timothy Hatcher  <timothy@apple.com>
2823
2824        Always have the HierarchicalPathComponent take space so it gives the last item some padding.
2825
2826        Reviewed by Antoine Quint.
2827
2828        * UserInterface/HierarchicalPathComponent.css:
2829        (.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-child > .separator):
2830        Use visibility: hidden instead of display: none.
2831
28322013-05-06  Timothy Hatcher  <timothy@apple.com>
2833
2834        Make ScopeBarItem and RadioButtonNavigationItem have a min-width so when they are selected the bold
2835        weight does not cause the item to change its width.
2836
2837        This adds some updateLayout calls to places that needed it now or were missing it already.
2838
2839        This change is not conditional to non-nightlies. It does no harm to always do this.
2840
2841        Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
2842
2843        Reviewed by Antoine Quint.
2844
2845        * UserInterface/ButtonNavigationItem.js:
2846        (WebInspector.ButtonNavigationItem.prototype.set label):
2847        * UserInterface/CSSStyleDetailsSidebarPanel.js:
2848        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
2849        * UserInterface/Main.js:
2850        (WebInspector._contentBrowserSizeDidChange):
2851        * UserInterface/RadioButtonNavigationItem.js:
2852        (WebInspector.RadioButtonNavigationItem.prototype.get selected):
2853        (WebInspector.RadioButtonNavigationItem.prototype.set selected):
2854        (WebInspector.RadioButtonNavigationItem.prototype.get active):
2855        (WebInspector.RadioButtonNavigationItem.prototype.set active):
2856        (WebInspector.RadioButtonNavigationItem.prototype.updateLayout):
2857        * UserInterface/ScopeBar.js:
2858        (WebInspector.ScopeBar.prototype.updateLayout):
2859        (WebInspector.ScopeBar.prototype._populate):
2860        * UserInterface/TimelineDataGrid.js:
2861        (WebInspector.TimelineDataGrid):
2862        (WebInspector.TimelineDataGrid.prototype.updateLayout):
2863
28642013-05-06  Timothy Hatcher  <timothy@apple.com>
2865
2866        Show overflow shadow pockets in the navigation sidebar when content can scroll.
2867
2868        This change is conditional to non-nightlies.
2869
2870        Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
2871
2872        Reviewed by Antoine Quint.
2873
2874        * UserInterface/NavigationSidebarPanel.css:
2875        (.sidebar > .panel.navigation > .overflow-shadow):
2876        (body.nightly-build .sidebar > .panel.navigation > .overflow-shadow):
2877        (.sidebar > .panel.navigation > .overflow-shadow.top):
2878        * UserInterface/NavigationSidebarPanel.js:
2879        (WebInspector.NavigationSidebarPanel):
2880        (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
2881        (WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
2882        (WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
2883        (WebInspector.NavigationSidebarPanel.prototype.shown):
2884        (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
2885        (WebInspector.NavigationSidebarPanel.prototype._updateFilter):
2886        (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
2887        (WebInspector.NavigationSidebarPanel.prototype._treeElementExpandedOrCollapsed):
2888        * UserInterface/ResourceSidebarPanel.js:
2889        (WebInspector.ResourceSidebarPanel):
2890        * UserInterface/TreeOutline.js:
2891        (TreeElement.prototype.collapse):
2892        (TreeElement.prototype.expand):
2893
28942013-05-06  Timothy Hatcher  <timothy@apple.com>
2895
2896        Update focus and active focus generated images to match the blues used by Xcode 5.
2897
2898        This change is not conditional to non-nightlies. It shouldn't be too revealing.
2899
2900        Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
2901
2902        Reviewed by Antoine Quint.
2903
2904        * UserInterface/ImageUtilities.js:
2905        (.generateImage):
2906
29072013-05-06  Timothy Hatcher  <timothy@apple.com>
2908
2909        Update styles to match the majority of Xcode 5's design changes.
2910
2911        The style changes are conditional so they wont apply when running a WebKit nightly.
2912        After WWDC we can remove the condition and the extra style rules this adds.
2913
2914        Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
2915
2916        Rubber-stamped by Antoine Quint.
2917
2918        * UserInterface/ButtonNavigationItem.css:
2919        (.navigation-bar .item.button.text-only):
2920        (body.nightly .navigation-bar .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
2921        * UserInterface/CodeMirrorOverrides.css:
2922        (.CodeMirror .CodeMirror-gutters):
2923        (.body.nightly-build .CodeMirror .CodeMirror-gutters):
2924        (.CodeMirror .CodeMirror-linenumber):
2925        * UserInterface/DetailsSection.css:
2926        (.details-section > .header):
2927        (.details-section .details-section > .header):
2928        (body.nightly-build .details-section > .header):
2929        (body.nightly-build .details-section .details-section > .header):
2930        * UserInterface/DividerNavigationItem.css:
2931        (.navigation-bar .item.divider):
2932        (body.nightly .navigation-bar .item.divider):
2933        * UserInterface/FilterBar.css:
2934        (.filter-bar):
2935        (body.nightly-build .filter-bar):
2936        (body:not(.nightly-build) .filter-bar > input[type="search"]):
2937        (body:not(.nightly-build) .filter-bar > input[type="search"]::-webkit-input-placeholder):
2938        (body:not(.nightly-build) .filter-bar > input[type="search"]:valid):
2939        * UserInterface/FilterBar.js:
2940        (WebInspector.FilterBar):
2941        * UserInterface/FindBanner.css:
2942        (body.nightly-build .find-banner):
2943        (body:not(.nightly) .find-banner > input[type="search"]):
2944        (body:not(.nightly) .find-banner > button):
2945        (.find-banner > button > .glyph):
2946        (body.nightly .find-banner > button > .glyph):
2947        * UserInterface/HierarchicalPathComponent.css:
2948        (body.nightly .hierarchical-path-component > .separator):
2949        (.hierarchical-path-component.text-only > select):
2950        * UserInterface/InstrumentSidebarPanel.css:
2951        (.sidebar > .panel.instrument > .title-bar):
2952        (body.nightly-build .sidebar > .panel.instrument > .title-bar):
2953        (.sidebar > .panel.instrument > .title-bar.profiles):
2954        (body.nightly-build .sidebar > .panel.instrument > .title-bar.profiles):
2955        * UserInterface/LayerTreeSidebarPanel.css:
2956        (.layer-tree.panel .bottom-bar):
2957        (body.nightly-build .layer-tree.panel .bottom-bar):
2958        * UserInterface/Main.css:
2959        (#split-content-browser > .navigation-bar):
2960        (body.nightly-build #split-content-browser > .navigation-bar):
2961        * UserInterface/NavigationBar.css:
2962        (.navigation-bar):
2963        (body.nightly-build .navigation-bar):
2964        (body.nightly-build.window-inactive .navigation-bar):
2965        * UserInterface/NavigationSidebarPanel.css:
2966        (.sidebar > .panel.navigation > .content):
2967        (body.nightly-build .sidebar > .panel.navigation > .content):
2968        (.sidebar > .panel.navigation > .overflow-shadow):
2969        (.sidebar > .panel.navigation > .overflow-shadow.top):
2970        * UserInterface/RadioButtonNavigationItem.css:
2971        (.navigation-bar .item.radio.button.text-only.selected):
2972        (body:not(.nightly) .navigation-bar .item.radio.button.text-only.selected):
2973        (body.nightly .navigation-bar .item.radio.button.selected):
2974        * UserInterface/ResourceSidebarPanel.css:
2975        (.sidebar > .panel.resource > .empty-content-placeholder):
2976        (body.nightly-build .sidebar > .panel.resource > .empty-content-placeholder):
2977        (.sidebar > .panel.resource > .search-bar):
2978        (body.nightly-build .sidebar > .panel.resource > .search-bar):
2979        * UserInterface/ResourceSidebarPanel.js:
2980        (WebInspector.ResourceSidebarPanel):
2981        * UserInterface/ScopeBar.css:
2982        (.scope-bar > li):
2983        (body:not(.nightly-build) .scope-bar > li):
2984        (body:not(.nightly-build) .scope-bar > li:active):
2985        (body:not(.nightly-build) .scope-bar > li.selected):
2986        (body.nightly-build .scope-bar > li):
2987        (body.nightly-build .scope-bar > li:active):
2988        (.scope-bar > li:hover):
2989        (.scope-bar > li.selected):
2990        (.scope-bar > li:active):
2991        (body.nightly-build .scope-bar > li.selected):
2992        * UserInterface/SearchBar.css:
2993        (.search-bar > input[type="search"]):
2994        (body:not(.nightly-build) .search-bar > input[type="search"]):
2995        (body:not(.nightly-build) .search-bar > input[type="search"]::-webkit-input-placeholder):
2996        (body:not(.nightly-build) .search-bar > input[type="search"]:valid):
2997        * UserInterface/SearchBar.js:
2998        (WebInspector.SearchBar):
2999        * UserInterface/TimelinesContentView.css:
3000        (.content-view.timelines > .data-grid):
3001        (body.nightly-build .content-view.timelines > .data-grid):
3002        (.content-view.timelines > .data-grid th):
3003        (body.nightly-build .content-view.timelines > .data-grid th):
3004        (.content-view.timelines > .data-grid th:not(:last-child)):
3005        (body.nightly-build .content-view.timelines > .data-grid th:not(:last-child)):
3006        (.content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
3007        (body.nightly-build .content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
3008        (.content-view.timelines > .data-grid th.sort-descending):
3009        (body.nightly-build .content-view.timelines > .data-grid th.sort-descending):
3010        (.content-view.timelines > .data-grid > .navigation-bar-container):
3011        (.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
3012        (body.nightly-build .content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
3013
30142013-05-06  Timothy Hatcher  <timothy@apple.com>
3015
3016        Add a nightly-build class so we can hide new UI from nightly WebKit builds.
3017
3018        Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
3019
3020        Reviewed by Antoine Quint.
3021
3022        * UserInterface/Main.js:
3023        (WebInspector.contentLoaded):
3024        Set the nightly-build class on body if we are in a nightly build.
3025
30262013-05-03  Timothy Hatcher  <timothy@apple.com>
3027
3028        Add stubs for savedURL and appendedToURL.
3029
3030        https://webkit.org/b/115561
3031        rdar://problem/13806055
3032
3033        Reviewed by Joseph Pecoraro.
3034
3035        * UserInterface/InspectorFrontendAPI.js:
3036        (InspectorFrontendAPI.savedURL):
3037        (InspectorFrontendAPI.appendedToURL):
3038
30392013-05-02  Timothy Hatcher  <timothy@apple.com>
3040
3041        Fix the alignment of the titles in the Timelines sidebar.
3042
3043        Reviewed by Joseph Pecoraro.
3044
3045        * UserInterface/GeneralTreeElement.js:
3046        (WebInspector.GeneralTreeElement.prototype._updateTitleElements):
3047        Only create a subtitle if the string has a value, not an empty string.
3048
30492013-05-01  Timothy Hatcher  <timothy@apple.com>
3050
3051        Make the Dashboard timer and Timeline views more robust when going back/forward.
3052
3053        <rdar://problem/13612025> Dashboard: LCD timer never stops when going back/forward
3054        <rdar://problem/13180009> Recording sometimes never stops because the load event marker is never added
3055        <rdar://problem/13510955> Intermittently, timeline is in "days" after refreshing wsj.com site
3056
3057        Reviewed by Antoine Quint.
3058
3059        * UserInterface/DashboardManager.js:
3060        (WebInspector.DashboardManager):
3061        (WebInspector.DashboardManager.prototype._mainResourceDidChange):
3062        (WebInspector.DashboardManager.prototype._recordingStopped):
3063        (WebInspector.DashboardManager.prototype._startUpdatingTime):
3064        (WebInspector.DashboardManager.prototype._stopUpdatingTime): Added.
3065        (WebInspector.DashboardManager.prototype._updateTime):
3066
3067        * UserInterface/NetworkGraphCalculator.js:
3068        (WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
3069        (WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
3070        (WebInspector.NetworkTransferDurationCalculator.prototype._upperBound):
3071        Don't return NaN for the bounds.
3072
3073        * UserInterface/Resource.js:
3074        (WebInspector.Resource.prototype.get firstTimestamp): Added.
3075        Added as a helper to prevent using NaN as the start time.
3076
3077        * UserInterface/ResourceTimelineRecord.js:
3078        (WebInspector.ResourceTimelineRecord.prototype.get startTime):
3079        Use firstTimestamp.
3080
3081        * UserInterface/TimelineManager.js:
3082        (WebInspector.TimelineManager.prototype.startRecording):
3083        (WebInspector.TimelineManager.prototype.stopRecording):
3084        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
3085        (WebInspector.TimelineManager.prototype.eventRecorded):
3086        (WebInspector.TimelineManager.prototype._clear):
3087        (WebInspector.TimelineManager.prototype._addRecord):
3088        (WebInspector.TimelineManager.prototype._startAutoRecording):
3089        (WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
3090        (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
3091        (WebInspector.TimelineManager.prototype._mainResourceDidChange):
3092        Fire an event on clear so the timeline view clears even if recording does not start.
3093        Track the main resource object and not the request identifier, since a resource
3094        might not have a request identifier in the back/forward case. Auto stop recording soon
3095        after every record, not just the load event since we don't always have load events.
3096
3097        * UserInterface/TimelinesContentView.js:
3098        (WebInspector.TimelinesContentView):
3099        (WebInspector.TimelinesContentView.prototype._recordsCleared):
3100        Use RecordsCleared event instead of RecordingStarted to clear the view.
3101
31022013-05-01  Timothy Hatcher  <timothy@apple.com>
3103
3104        Reveal the line (if supplied) when showing a ScriptContentView.
3105
3106        <rdar://problem/13785027> REGRESSION: Extra Scripts: no autoscroll to debugger statement.
3107
3108        Reviewed by Joseph Pecoraro.
3109
3110        * UserInterface/ResourceSidebarPanel.js:
3111        (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
3112
31132013-05-01  Timothy Hatcher  <timothy@apple.com>
3114
3115        Don't update the dashboard text unless it has changed.
3116
3117        Also step up the interval we update the time so it does not try to update every 50ms when the
3118        duration is long enough to not matter.
3119
3120        <rdar://problem/13718056> While JS debugging, everything in the inspector window is repainting all the time
3121
3122        Reviewed by Joseph Pecoraro.
3123
3124        * UserInterface/DashboardManager.js:
3125        (WebInspector.DashboardManager.prototype._startUpdatingTime):
3126        (WebInspector.DashboardManager.prototype._updateTime):
3127        * UserInterface/DashboardView.js:
3128        (WebInspector.DashboardView.prototype.set logs):
3129        (WebInspector.DashboardView.prototype.set issues):
3130        (WebInspector.DashboardView.prototype.set errors):
3131        (WebInspector.DashboardView.prototype.set time):
3132        (WebInspector.DashboardView.prototype.set resourcesCount):
3133        (WebInspector.DashboardView.prototype.set resourcesSize):
3134        (WebInspector.DashboardView.prototype._appendElementForNamedItem.):
3135
31362013-05-01  Timothy Hatcher  <timothy@apple.com>
3137
3138        Breakpoint context menu items should appear for Extra and Anonymous Scripts.
3139
3140        <rdar://problem/13776299>
3141
3142        Reviewed by Joseph Pecoraro.
3143
3144        * UserInterface/DebuggerSidebarPanel.js:
3145        (WebInspector.DebuggerSidebarPanel.prototype._breakpointsBeneathTreeElement):
3146        (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
3147        (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
3148        Check for WebInspector.ScriptTreeElement in addition to WebInspector.ResourceTreeElement.
3149
31502013-04-30  Timothy Hatcher  <timothy@apple.com>
3151
3152        Disable spellcheck and smart quotes in the console prompt.
3153
3154        I'll upstream this to CodeMirror once I get approval from legal.
3155
3156        <rdar://problem/13757709>
3157
3158        Reviewed by Ricky Mondello.
3159
3160        * UserInterface/External/CodeMirror/codemirror.js:
3161        (window.CodeMirror):
3162
31632013-04-30  Timothy Hatcher  <timothy@apple.com>
3164
3165        Tweak the Toolbar layout code to not hide the Dashboard when sizes are off by one.
3166
3167        This wasn't needed when sub-pixel layout was on, but that was disabled in http://webkit.org/b/149209.
3168
3169        <rdar://problem/13757354> REGRESSION: Toolbar thinks it is collapsed, so dashboard is hidden
3170
3171        Reviewed by Joseph Pecoraro.
3172
3173        * UserInterface/Toolbar.js:
3174        (WebInspector.Toolbar.prototype.customUpdateLayout):
3175
31762013-04-30  Timothy Hatcher  <timothy@apple.com>
3177
3178        Have dashboard buttons (console summary buttons) do filtering as well.
3179
3180        <rdar://problem/13685685>
3181
3182        Reviewed by Joseph Pecoraro.
3183
3184        * UserInterface/DashboardView.js:
3185        (WebInspector.DashboardView):
3186        (WebInspector.DashboardView.prototype._consoleItemWasClicked):
3187        * UserInterface/LogContentView.js:
3188        (WebInspector.LogContentView.prototype.get scopeBar):
3189        * UserInterface/Main.js:
3190        (WebInspector.showFullHeightConsole):
3191        (WebInspector.showConsoleView):
3192
31932013-04-30  Joseph Pecoraro  <pecoraro@apple.com>
3194
3195        <rdar://problem/12719925> Call stack should show live line number next to file name
3196
3197        Reviewed by Timothy Hatcher.
3198
3199        * UserInterface/GeneralTreeElement.js:
3200        (WebInspector.GeneralTreeElement):
3201        (WebInspector.GeneralTreeElement.prototype.get tooltipHandledSeparately):
3202        (WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately):
3203        (WebInspector.GeneralTreeElement.prototype._updateTitleElements):
3204        Allow clients to handle the tooltip themselves, and to set subtitle as
3205        an element, instead of a string (already possible with mainTitle).
3206
3207        * UserInterface/CallFrameTreeElement.js:
3208        (WebInspector.CallFrameTreeElement):
3209        Set the subtitle as a live location <span>.
3210        (WebInspector.CallFrameTreeElement.prototype.onattach):
3211        Set the tooltip on the entire tree element once it is created.
3212
3213        * UserInterface/SourceCodeLocation.js:
3214        (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationTooltip):
3215        Allow an optional prefix before the location string.
3216
32172013-04-29  Timothy Hatcher  <timothy@apple.com>
3218
3219        Remove an assert from StyleDetailsPanel.prototype.shown.
3220
3221        The shown function can be called multiple times. Just keep the early return.
3222        Also make sure to call StyleDetailsPanel.prototype.hidden in another case.
3223
3224        Reviewed by Joseph Pecoraro.
3225
3226        * UserInterface/CSSStyleDetailsSidebarPanel.js:
3227        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
3228        * UserInterface/StyleDetailsPanel.js:
3229        (WebInspector.StyleDetailsPanel.prototype.shown):
3230
32312013-04-29  Timothy Hatcher  <timothy@apple.com>
3232
3233        Skip invalid properties when associating related properties.
3234
3235        <rdar://problem/13752586> DOMNodeStyles.js:981: console.assert(property.overridden); on html5please.com
3236
3237        Reviewed by Joseph Pecoraro.
3238
3239        * UserInterface/DOMNodeStyles.js:
3240        (WebInspector.DOMNodeStyles.prototype._associateRelatedProperties):
3241
32422013-04-29  Joseph Pecoraro  <pecoraro@apple.com>
3243
3244        Don't allow Command+Enter in the Console with an empty expression.
3245
3246        Reviewed by Timothy Hatcher.
3247
3248        * UserInterface/ConsolePrompt.js:
3249
32502013-04-29  Joseph Pecoraro  <pecoraro@apple.com>
3251
3252        <rdar://problem/13616567> Can no longer clear the console with clear()
3253
3254        LogContentView starts listening for an event in the constructor which
3255        was getting removed in close and not being added back. This ContentView
3256        is already treated like a singleton with other events, treat this the
3257        same and just avoid removing event listeners in close.
3258
3259        Reviewed by Timothy Hatcher.
3260
3261        * UserInterface/LogContentView.js:
3262
32632013-04-29  Joseph Pecoraro  <pecoraro@apple.com>
3264
3265        <rdar://problem/13765474> REGRESSION: Console should not clear on reload
3266
3267        The backend sends the frontend a messagesCleared messages for many reasons.
3268        We should not clear the active log when there was a navigation. In those
3269        cases the LogManager will send out a Cleared or SessionStarted event.
3270        It would be messy and brittle to determine if we are in the middle of a
3271        main resource load, so it is easier to do a setTimeout and send an event
3272        if we did not do a navigation.
3273
3274        This works well with all common cases, but breaks:
3275
3276            js> console.log(1); console.clear(); console.log(2);
3277
3278        Filed the follow-up bug to handle fixing this by providing the frontend
3279        with the information it needs in messagesCleared.
3280
3281        Reviewed by Timothy Hatcher.
3282
3283        * UserInterface/ConsoleObserver.js:
3284        (WebInspector.ConsoleObserver.prototype.messageAdded):
3285        Don't append a blank ConsoleMessage row for console.clear messages.
3286
3287        * UserInterface/LogManager.js:
3288        (WebInspector.LogManager.prototype.messagesCleared):
3289        (WebInspector.LogManager.prototype._mainResourceDidChange):
3290        Defer ActiveLogCleared events so that we don't issue one while we
3291        are reloading the page.
3292
32932013-04-29  Joseph Pecoraro  <pecoraro@apple.com>
3294
3295        <rdar://problem/13764663> Tooltips on live location links are no longer working
3296
3297        Changing the content in mousemove, even if the content was the same,
3298        would cause the tooltip to disappear. Avoid changing the content unless
3299        we absolutely need to.
3300
3301        Reviewed by Timothy Hatcher.
3302
3303        * UserInterface/SourceCodeLocation.js:
3304        (WebInspector.SourceCodeLocation.prototype.updateDisplayString):
3305        Avoid unnecessary content updates.
3306
3307        (WebInspector.SourceCodeLocation.prototype._locationString):
3308        Fix typo causing column numbers to not show up in tooltips.
3309
33102013-04-29  Joseph Pecoraro  <pecoraro@apple.com>
3311
3312        <rdar://problem/13763988> Jump to "rs.js" error location link not live on theverge.com
3313
3314        The URL in the ConsoleMessage is the URL of the Script, which contains
3315        a fragment. The URL of the Resource does not contain the fragment. When
3316        we create a sourceCodeLocation in linkifyLocation we want to get the
3317        resource that has a sidebar item, because that is the resource in the
3318        sidebar that will show a ContentView. So if we get a Script try to get
3319        the Resource for that Script if one exists.
3320
3321        Reviewed by Timothy Hatcher.
3322
3323        * UserInterface/Main.js:
3324        (WebInspector.linkifyLocation):
3325
33262013-04-29  Joseph Pecoraro  <pecoraro@apple.com>
3327
3328        <rdar://problem/13442566> Console context selector should truncate or generate better names when the names are long
3329
3330        Truncate the context selector quick console nav bar item. And modify
3331        how items are sorted in the context menu to show the frame name if one
3332        is available.
3333
3334        Reviewed by Timothy Hatcher.
3335
3336        * UserInterface/HierarchicalPathComponent.js:
3337        (WebInspector.HierarchicalPathComponent):
3338        (WebInspector.HierarchicalPathComponent.prototype.get displayName):
3339        (WebInspector.HierarchicalPathComponent.prototype.set displayName):
3340        (WebInspector.HierarchicalPathComponent.prototype.get truncatedDisplayNameLength):
3341        (WebInspector.HierarchicalPathComponent.prototype.set truncatedDisplayNameLength):
3342        Separate the display name property from the title element's content, so we
3343        can truncate the display but store the real name.
3344
3345        (WebInspector.HierarchicalPathComponent.prototype._updateElementTitleAndText):
3346        Truncate the display in the navigation bar.
3347
3348        (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption):
3349        (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement):
3350        Work around an NSMenu issue and truncate in the option text in the context menu.
3351
3352        * UserInterface/QuickConsole.js:
3353        (WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
3354        (WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
3355        (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
3356        Set the Frame on the PathComponents to use later for sorting.
3357
33582013-04-29  Timothy Hatcher  <timothy@apple.com>
3359
3360        Abort earlier when loading completions for a null or undefined value.
3361
3362        <rdar://problem/13764611> JavaScriptLogViewController.js:293: CONSOLEAPI ERROR: Unknown result type: undefined
3363
3364        Reviewed by Joseph Pecoraro.
3365
3366        * UserInterface/JavaScriptLogViewController.js:
3367        (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
3368        Return early if the RemoteObject is null or undefined. Also release the completion group.
3369
33702013-04-29  Timothy Hatcher  <timothy@apple.com>
3371
3372        Correct the layout of navigation items when an item has selector arrows.
3373
3374        <rdar://problem/13717922> Layer border toggle button disappears sometimes
3375
3376        Reviewed by Joseph Pecoraro.
3377
3378        * UserInterface/HierarchicalPathComponent.js:
3379        (WebInspector.HierarchicalPathComponent):
3380        (WebInspector.HierarchicalPathComponent.prototype.get minimumWidth): Added.
3381        (WebInspector.HierarchicalPathComponent.prototype.set forcedWidth):
3382        (WebInspector.HierarchicalPathComponent.prototype.get selectorArrows): Added.
3383        (WebInspector.HierarchicalPathComponent.prototype.set selectorArrows): Added.
3384        Account for the width of the selector arrows when using minimum width.
3385
3386        * UserInterface/HierarchicalPathNavigationItem.js:
3387        (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout):
3388        Ask HierarchicalPathComponent for its minimum width.
3389
3390        * UserInterface/NavigationBar.js:
3391        (WebInspector.NavigationBar.prototype.updateLayout):
3392        Skip flexible space items since they can take up no space at the minimum width.
3393
33942013-04-27  Dean Jackson  <dino@apple.com>
3395
3396        <rdar://problem/13441708> Make the Web Inspector work if HiDPI canvas is disabled on OS X
3397
3398        Reviewed by Tim Hatcher.
3399
3400        For <rdar://problem/13437328>, HIGH_DPI_CANVAS was disabled on retina devices, so
3401        the places in the inspector that use a canvas must double the dimensions of
3402        the image buffers they request.
3403
3404        * UserInterface/DashboardView.css:
3405        (.toolbar .dashboard): Since the image being pased in as background might be 2x,
3406            make sure that it uses the element size for the background.
3407        * UserInterface/DashboardView.js: Request a 2x canvas if necessary.
3408
3409        * UserInterface/ImageUtilities.js:
3410        (generateColoredImage): No need to pass in scale, as this method is passed the
3411            correct width and height the caller needs. Use get/setImageData methods.
3412        (generateColoredImagesForCSS): Calculate a scaledWidth/Height to be used throughout
3413            this method. Make sure we create contexts with the correct dimensions, and save/restore
3414            them at full size.
3415        (._drawImageShadow): Use scaledWidth/Height.
3416        (._invertMaskImage): No need to pass in width and height..
3417        (._applyImageMask): Ditto.
3418        (generateEmbossedImages): Calculate a scaledWidth/Height to be used throughout
3419            this method. Make sure we create contexts with the correct dimensions.
3420
3421        * UserInterface/Popover.js:
3422        (WebInspector.Popover.prototype.set frame): Make sure to set the background size when
3423            the frame is updated.
3424        (WebInspector.Popover.prototype._drawBackground): Create a correctly scaled canvas,
3425            and some minor code cleanup.
3426
34272013-04-27  Timothy Hatcher  <timothy@apple.com>
3428
3429        Fix the speed of typing in the Web Inspector.
3430
3431        ToggleControlToolbarItem regenerates its images every time 'toggled' is set, even
3432        if the flag does not change! And the dock button updates 'toggled' on keydown and
3433        keyup to update when Option is pressed.
3434
3435        <rdar://problem/13756496> REGRESSION: Dock/undock buttons regenerates ever keydown and keyup!
3436
3437        Reviewed by Dean Jackson.
3438
3439        * UserInterface/ToggleButtonNavigationItem.js:
3440        (WebInspector.ToggleButtonNavigationItem.prototype.set toggled): Return early if flag does not change.
3441
34422013-04-27  Joseph Pecoraro  <pecoraro@apple.com>
3443
3444        <rdar://problem/13143692> Object literal properties should not have popovers
3445
3446        Given test:
3447
3448          var foo = 300, o = { foo: 1 };
3449          var result = o.foo;
3450
3451        This patch makes it so hovering "foo" in the object literal does not
3452        show a popover, it used to show 300. While hovering the variable "foo"
3453        or hovering the property access "o.foo" both show expected values.
3454
3455        Reviewed by Timothy Hatcher.
3456
3457        * UserInterface/TextEditor.js:
3458        (WebInspector.TextEditor.prototype._mouseMovedOverEditor):
3459        If we are hovering a JavaScript token inside of a <script> in HTML resources
3460        then the JavaScript state is actually token.state.localState. If it is in
3461        a JavaScript resource then it is just token.state. Pass the most specific
3462        state on our partial "token" object.
3463
3464        (WebInspector.TextEditor.prototype._checkHoveredToken):
3465        Bail for JavaScript object literal properties.
3466
34672013-04-26  Joseph Pecoraro  <pecoraro@apple.com>
3468
3469        <rdar://problem/13753106> SourceCodeTextEditor.js:815: JS ERROR: TypeError: undefined is not an object (evaluating this.hoveredToken.bounds)
3470
3471        We have a complete token in tokenWasHovered, however between then and
3472        when the async DebuggerAgent.evaluateOnCallFrame callback happens the
3473        hovered token can change. If it changed, bail, so we don't end up
3474        trying to put the popover on the wrong hovered token or worse
3475        hit this exception and break execution.
3476
3477        Reviewed by Timothy Hatcher.
3478
3479        * UserInterface/SourceCodeTextEditor.js:
3480        (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
3481        (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
3482        (WebInspector.SourceCodeTextEditor.prototype._showPopover):
3483        Add asserts and preventative bails in multiple places to catch
3484        similar issues in the future if new paths are added.
3485
34862013-04-26  Joseph Pecoraro  <pecoraro@apple.com>
3487
3488        <rdar://problem/13746094> Esc inside a read only editor (JavaScript) should not bring up completion suggestions
3489
3490        Pass on "Esc" if the editor is read only.
3491
3492        Reviewed by Timothy Hatcher.
3493
3494        * UserInterface/CodeMirrorCompletionController.js:
3495        (WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
3496
34972013-04-26  Joseph Pecoraro  <pecoraro@apple.com>
3498
3499        <rdar://problem/13573902> Line numbers in JS console.log / console.error Messages should be live, they jump to the wrong location
3500        <rdar://problem/13702357> Line numbers in JS Console Error Messages should be live, they jump to the wrong location
3501
3502        Make the ConsoleMessage and Profiler links live when possible. Create
3503        a live link with createSourceCodeLocationLink or linkifyLocation.
3504        ConsoleMessages's have line and column information now both at the
3505        base and in stack traces. Profiler nodes don't have column info, but we
3506        can still make them live, just not entirely accurate.
3507
3508        Reviewed by Timothy Hatcher.
3509
3510        * UserInterface/ConsoleMessageImpl.js:
3511        (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
3512        (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
3513        Use WebInspector.linkifyLocation with url, line, and column.
3514
3515        * UserInterface/Main.js:
3516        (.showSourceCodeLocation):
3517        (WebInspector.createSourceCodeLocationLink):
3518        (WebInspector.linkifyLocation):
3519        If we have the resource with url passed into linkifyLocation
3520        it creates a link with a sourceCodeLocation. Otherwise it just
3521        creates a basic link with the appropriate styles.
3522
3523        * UserInterface/CSSSelectorProfileView.js:
3524        (WebInspector.CSSSelectorDataGridNode.prototype.createCell):
3525        (WebInspector.CSSSelectorDataGridNode.prototype._linkifyLocation):
3526        * UserInterface/ProfileDataGridTree.js:
3527        (WebInspector.ProfileDataGridNode.prototype._linkifyLocation):
3528        Use WebInspector.linkifyLocation with url and lineNumber. Add
3529        a FIXME about the missing column number.
3530
35312013-04-26  Joseph Pecoraro  <pecoraro@apple.com>
3532
3533        <rdar://problem/13573902> Line numbers in JS console.log / console.error Messages should be live, they jump to the wrong location
3534        <rdar://problem/13702357> Line numbers in JS Console Error Messages should be live, they jump to the wrong location
3535
3536        Give ConsoleMessage a column number. The backend now sends us this info.
3537
3538        Reviewed by Timothy Hatcher.
3539
3540        * UserInterface/ConsoleCommandResult.js:
3541        (WebInspector.ConsoleCommandResult):
3542        * UserInterface/ConsoleMessage.js:
3543        (WebInspector.ConsoleMessage):
3544        (WebInspector.ConsoleMessage.create):
3545        * UserInterface/ConsoleMessageImpl.js:
3546        (WebInspector.ConsoleMessageImpl):
3547        (WebInspector.ConsoleMessageImpl.prototype.get levelString):
3548        * UserInterface/ConsoleObserver.js:
3549        (WebInspector.ConsoleObserver.prototype.messageAdded):
3550        * UserInterface/LogManager.js:
3551        (WebInspector.LogManager.prototype.messageWasAdded):
3552
35532013-04-26  Joseph Pecoraro  <pecoraro@apple.com>
3554
3555        <rdar://problem/13745104> First revealLine to SourceMapResource lineNumber is not working
3556
3557        SourceMapResource's may lazily load their data. In such cases the
3558        ContentView for the resource will be Generic and ignore the revealLine.
3559        Once loaded, the Generic ContentView will be replaced by a better view,
3560        but the line number to reveal has been lost. Save that information in
3561        the cluster content view, as long as the resource has not finished,
3562        and pass it on to the new content view when the resource finishes.
3563
3564        Reviewed by Timothy Hatcher.
3565
3566        * UserInterface/SourceMapResource.js:
3567        (WebInspector.SourceMapResource.prototype.requestContentFromBackend):
3568        Mark as finished after updating types.
3569
3570        * UserInterface/ResourceClusterContentView.js:
3571        (WebInspector.ResourceClusterContentView.prototype.showResponse):
3572        (WebInspector.ResourceClusterContentView.prototype._resourceTypeDidChange):
3573        (WebInspector.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
3574        If a revealLine comes in for a resource not yet finished loading, replay
3575        the reveal line when the resource does finish. If subsequent reveals come
3576        in, the most recent one wins.
3577
3578        * UserInterface/TextEditor.js:
3579        (WebInspector.TextEditor._prettyPrint.prettyPrintAndUpdateEditor):
3580        When a file is formatted we updated the delayed line number to reveal, but
3581        didn't update the delayed text range to select. Do that just in case.
3582
35832013-04-26  Joseph Pecoraro  <pecoraro@apple.com>
3584
3585        <rdar://problem/13701579> Styles sidebar should show source map location by default instead of on hover
3586
3587        When hovering a link with Command we are showing the original,
3588        unformatted location. So make sure that when clicked we jump
3589        to that exact, unformatted location.
3590
3591        Reviewed by Timothy Hatcher.
3592
3593        * UserInterface/Main.js:
3594        (WebInspector.createGoToArrowButton):
3595        Handle Command+Click to jump to an unformatted location.
3596
3597        * UserInterface/ResourceSidebarPanel.js:
3598        (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
3599        (WebInspector.ResourceSidebarPanel.prototype.showOriginalUnformattedSourceCodeLocation):
3600        Allow showing a source code that forces unformatting.
3601
3602        * UserInterface/TextEditor.js:
3603        (WebInspector.TextEditor.prototype._revealPendingLineIfPossible):
3604        (WebInspector.TextEditor.prototype.revealLine):
3605        May need to unformat the resource before revealing the line.
3606
3607        * UserInterface/FrameContentView.js:
3608        (WebInspector.FrameContentView.prototype.showSourceCode):
3609        * UserInterface/ResourceClusterContentView.js:
3610        (WebInspector.ResourceClusterContentView.prototype.showResponse):
3611        * UserInterface/ScriptContentView.js:
3612        (WebInspector.ScriptContentView.prototype.revealLine):
3613        * UserInterface/TextContentView.js:
3614        (WebInspector.TextContentView.prototype.revealLine):
3615        * UserInterface/TextResourceContentView.js:
3616        (WebInspector.TextResourceContentView.prototype.revealLine):
3617        Pass the forceUnformat option through revealLine paths.
3618
36192013-04-26  Joseph Pecoraro  <pecoraro@apple.com>
3620
3621        <rdar://problem/13701579> Styles sidebar should show source map location by default instead of on hover
3622
3623        Update the rules for a live location display.
3624
3625          - Show display location by default if there is one.
3626          - Show display locations in italics, original locations display non-italics.
3627          - Command+Mouseover a display location will show the original location.
3628          - Provide different display styles for column numbers. Default to "OnlyIfLarge"
3629            meaning only show column numbers if the column is > 80.
3630
3631        Reviewed by Timothy Hatcher.
3632
3633        * UserInterface/CallFrameTreeElement.js:
3634        (WebInspector.CallFrameTreeElement):
3635        Simplify by using SourceCodeLocation.prototype.tooltipString.
3636
3637        * UserInterface/SourceCodeLocation.js:
3638        (WebInspector.SourceCodeLocation.prototype.originalLocationString):
3639        (WebInspector.SourceCodeLocation.prototype.formattedLocationString):
3640        (WebInspector.SourceCodeLocation.prototype.displayLocationString):
3641        Add the new column style parameter. Pass it through to _locationString.
3642
3643        (WebInspector.SourceCodeLocation.prototype.tooltipString):
3644        Always show full URLs and columns in tooltips.
3645
3646        (WebInspector.SourceCodeLocation.prototype._locationString):
3647        Respect the column style when including column numbers.
3648
3649        (WebInspector.SourceCodeLocation.prototype.updateDisplayString):
3650        (WebInspector.SourceCodeLocation.prototype.mouseOverOrMove):
3651        (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
3652        Update the default value to displayLocation. And the Command+Mouseover to originalLocation.
3653
36542013-04-26  Joseph Pecoraro  <pecoraro@apple.com>
3655
3656        <rdar://problem/13701576> SASS source map location is wrong on http://html5please.com
3657
3658        CSSRule.selectorList.range has column information, which allows us to
3659        provide a much better location to jump to. So when selectorList and
3660        its SourceRange is available, use that for its start line and column.
3661        Fallback to the CSSRule.sourceLine which is always available.
3662
3663        Reviewed by Timothy Hatcher.
3664
3665        * UserInterface/DOMNodeStyles.js:
3666        (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
3667
36682013-04-26  Timothy Hatcher  <timothy@apple.com>
3669
3670        Update CodeMirror from 3.11+ to 3.12.
3671
3672        * UserInterface/External/CodeMirror/clojure.js: Updated.
3673        * UserInterface/External/CodeMirror/codemirror.js: Updated.
3674        * UserInterface/External/CodeMirror/javascript.js: Updated.
3675        * UserInterface/External/CodeMirror/searchcursor.js: Updated.
3676        * UserInterface/External/CodeMirror/sql.js: Updated.
3677
36782013-04-26  Timothy Hatcher  <timothy@apple.com>
3679
3680        Make completions work after open brackets.
3681
3682        This also improves things to limit keywords to certain contexts.
3683
3684        <rdar://problem/13746491> Should have JavaScript completion suggestions after a base of all open bracket characters, e.g. "if (tr|"
3685
3686        Reviewed by Joseph Pecoraro.
3687
3688        * UserInterface/CodeMirrorCompletionController.js:
3689        (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
3690        * UserInterface/JavaScriptLogViewController.js:
3691        (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
3692
36932013-04-26  Timothy Hatcher  <timothy@apple.com>
3694
3695        Improve multi-line support in the console prompt.
3696
3697        Pressing return at the end of the expression now does a parse to see if the expression
3698        is ready to evaluate. We will insert a new line if the error is recoverable, otherwise
3699        we will evaluate it. Pressing enter will insert a new line when there is no text, when
3700        the cursor is not at the last position or there is a selection. Command-Enter will now
3701        always evaluate the expression.
3702
3703        <rdar://problem/13747367>
3704
3705        Reviewed by Joseph Pecoraro.
3706
3707        * UserInterface/ConsolePrompt.js:
3708        (WebInspector.ConsolePrompt):
3709        (WebInspector.ConsolePrompt.prototype._handleEnterKey.positionsEqual): Added.
3710        (WebInspector.ConsolePrompt.prototype._handleEnterKey.commitTextOrInsertNewLine): Added.
3711        (WebInspector.ConsolePrompt.prototype._handleEnterKey):
3712        (WebInspector.ConsolePrompt.prototype._handleCommandEnterKey):
3713        * UserInterface/InspectorBackendCommands.js:
3714        * UserInterface/JavaScriptLogViewController.js:
3715        (WebInspector.JavaScriptLogViewController.prototype.):
3716        (WebInspector.JavaScriptLogViewController.prototype.consolePromptShouldCommitText):
3717
37182013-04-25  Timothy Hatcher  <timothy@apple.com>
3719
3720        Fix some edge cases with the default JavaScript completions.
3721
3722        Reviewed by Joseph Pecoraro.
3723
3724        * UserInterface/CodeMirrorCompletionController.js:
3725        (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
3726        Correct the check for switch statements which was missing the "type" parts. Use "info"
3727        instead to check for "switch". Substring the suffix, since there are cases it can be longer.
3728        Also prevent keyword completions in var declarations, except for "this".
3729
37302013-04-25  Timothy Hatcher  <timothy@apple.com>
3731
3732        Properly handle duplicate query parameters and form encoded POST data.
3733
3734        <rdar://problem/13737105> Duplicate query parameters only show the last item in the sidebar data grids
3735
3736        Reviewed by Joseph Pecoraro.
3737
3738        * UserInterface/ResourceDetailsSidebarPanel.js:
3739        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
3740        (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
3741        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
3742        Pass true to parseQueryString to get an array of name/value pairs. Then build
3743        the DataGrid using that result.
3744
3745        * UserInterface/Utilities.js:
3746        (parseLocationQueryParameters):
3747        (parseQueryString):
3748        Added arrayResult parameter to allow getting all values, not just the last one.
3749
37502013-04-24  Timothy Hatcher  <timothy@apple.com>
3751
3752        Improve the sort order for array index completions.
3753
3754        Reviewed by Joseph Pecoraro.
3755
3756        * UserInterface/JavaScriptLogViewController.js:
3757        (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames.compare):
3758        (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames):
3759        Try to sort in numerical order first, then as strings.
3760
37612013-04-24  Timothy Hatcher  <timothy@apple.com>
3762
3763        Allow autocompletion after "({a:1,b:2})" to suggest "a" and "b" properties.
3764
3765        <rdar://problem/5866281> Console should allow autocompletion after symbols like ), ], }
3766
3767        Reviewed by Joseph Pecoraro.
3768
3769        * UserInterface/CodeMirrorCompletionController.js:
3770        (WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
3771        Ignore stop characters when we are inside brackets.
3772
37732013-04-24  Timothy Hatcher  <timothy@apple.com>
3774
3775        Remove TextPrompt and JavaScriptTextPrompt.
3776
3777        Reviewed by Joseph Pecoraro.
3778
3779        * UserInterface/JavaScriptTextPrompt.css: Removed.
3780        * UserInterface/JavaScriptTextPrompt.js: Removed.
3781        * UserInterface/Main.html:
3782        * UserInterface/TextPrompt.css: Removed.
3783        * UserInterface/TextPrompt.js: Removed.
3784
37852013-04-24  Timothy Hatcher  <timothy@apple.com>
3786
3787        Update DatabaseContentView to use ConsolePrompt.
3788
3789        Reviewed by Joseph Pecoraro.
3790
3791        * UserInterface/DatabaseContentView.css:
3792        (.database-query-prompt):
3793        (.database-user-query::before, .database-query-prompt::before, .database-query-result::before):
3794        (.database-user-query):
3795        (.database-query-result):
3796        * UserInterface/DatabaseContentView.js:
3797        (WebInspector.DatabaseContentView):
3798        (WebInspector.DatabaseContentView.prototype.shown):
3799        (WebInspector.DatabaseContentView.prototype.updateLayout):
3800        (WebInspector.DatabaseContentView.prototype._messagesClicked):
3801        (WebInspector.DatabaseContentView.prototype.accumulateMatches):
3802        (WebInspector.DatabaseContentView.prototype.tableNamesCallback):
3803        (WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded):
3804        (WebInspector.DatabaseContentView.prototype.consolePromptTextCommited):
3805        (WebInspector.DatabaseContentView.prototype._appendQueryResult):
3806
38072013-04-24  Timothy Hatcher  <timothy@apple.com>
3808
3809        Implement live completions for the ConsolePrompt.
3810
3811        Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
3812        than in Chrome / the WebKit inspector
3813
3814        Reviewed by Joseph Pecoraro.
3815
3816        * UserInterface/ConsolePrompt.js:
3817        (WebInspector.ConsolePrompt.prototype.updateCompletions):
3818        (WebInspector.ConsolePrompt.prototype.completionControllerCompletionsNeeded):
3819        * UserInterface/JavaScriptLogViewController.js:
3820        (WebInspector.JavaScriptLogViewController):
3821        (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.evaluated.getCompletions):
3822        (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.evaluated):
3823        (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNamesFromEvaluate):
3824        (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames):
3825        (WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
3826        (WebInspector.JavaScriptLogViewController.prototype._clearLastProperties):
3827        Most of this is copied and adapted from JavaScriptTextPrompt. The new part if the caching of property names.
3828
38292013-04-24  Timothy Hatcher  <timothy@apple.com>
3830
3831        Prevent the Escape key from toggling and triggering a completion.
3832
3833        When the prompt is empty we allow console toggling. When not empty it triggers completion.
3834
3835        Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
3836        than in Chrome / the WebKit inspector
3837
3838        Reviewed by Joseph Pecoraro.
3839
3840        * UserInterface/CodeMirrorCompletionController.js:
3841        (WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
3842        Call the completionControllerShouldAllowEscapeCompletion delegate function.
3843
3844        * UserInterface/ConsolePrompt.js:
3845        (WebInspector.ConsolePrompt.prototype.completionControllerShouldAllowEscapeCompletion):
3846        Added. Return true if the prompt is not empty.
3847
3848        * UserInterface/KeyboardShortcut.js:
3849        (WebInspector.KeyboardShortcut._handleKeyDown):
3850        Don't process the shortcut if default was prevented. We know someone already handled
3851        the key, but didn't call stopPropagation. CodeMirror does this.
3852
38532013-04-24  Timothy Hatcher  <timothy@apple.com>
3854
3855        Implement default completions for JavaScript in CodeMirrorCompletionController.
3856
3857        Also hook up completions in ConsolePrompt to get the default completions.
3858
3859        Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
3860        than in Chrome / the WebKit inspector
3861
3862        Reviewed by Joseph Pecoraro.
3863
3864        * UserInterface/CodeMirrorCompletionController.js:
3865        (WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
3866        (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
3867        (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
3868        (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchKeywords):
3869        (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchVariables.filterVariables):
3870        (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchVariables):
3871        (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
3872        * UserInterface/ConsolePrompt.js:
3873        (WebInspector.ConsolePrompt):
3874
38752013-04-24  Timothy Hatcher  <timothy@apple.com>
3876
3877        Hook up the ConsolePrompt delegate to JavaScriptLogViewController.
3878
3879        This makes the prompt work and evaluate results. No auto completion yet.
3880
3881        Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
3882        than in Chrome / the WebKit inspector
3883
3884        Reviewed by Joseph Pecoraro.
3885
3886        * UserInterface/JavaScriptLogViewController.js:
3887        (WebInspector.JavaScriptLogViewController.prototype.consolePromptHistoryDidChange):
3888        (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommited.printResult):
3889        (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommited):
3890        (WebInspector.JavaScriptLogViewController.prototype._evaluateInInspectedWindow.evalCallback):
3891        (WebInspector.JavaScriptLogViewController.prototype._evaluateInInspectedWindow):
3892        Copied from JavaScriptTextPrompt.evalInInspectedWindow.
3893
38942013-04-24  Timothy Hatcher  <timothy@apple.com>
3895
3896        Start using ConsolePrompt in the QuickConsole.
3897
3898        This simplifies the DOM structure of the QuickConsole and makes resizing happen
3899        automatically using flex layout instead of JavaScript.
3900
3901        Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
3902        than in Chrome / the WebKit inspector
3903
3904        Reviewed by Joseph Pecoraro.
3905
3906        * UserInterface/JavaScriptLogViewController.js:
3907        (WebInspector.JavaScriptLogViewController):
3908        (WebInspector.JavaScriptLogViewController.prototype.clear):
3909        (WebInspector.JavaScriptLogViewController.prototype.startNewSession):
3910        (WebInspector.JavaScriptLogViewController.prototype._handleClearShortcut):
3911        (WebInspector.JavaScriptLogViewController.prototype._handleFindShortcut):
3912        (WebInspector.JavaScriptLogViewController.prototype._handleFindNextShortcut):
3913        (WebInspector.JavaScriptLogViewController.prototype._handleFindPreviousShortcut):
3914        (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
3915        Remove keydown and bind the the keyboard shortcuts to the messages element
3916        and prompt element using specific event handlers.
3917
3918        * UserInterface/LogContentView.js:
3919        (WebInspector.LogContentView):
3920        (WebInspector.LogContentView.prototype.shown):
3921        (WebInspector.LogContentView.prototype.searchBarWantsToLoseFocus): Match _escapeWasPressed.
3922        (WebInspector.LogContentView.prototype._activeLogCleared):
3923        (WebInspector.LogContentView.prototype._keyDown):
3924        Removed keyboard shortcut handling that was using private properties
3925        from JavaScriptLogViewController.
3926
3927        * UserInterface/Main.html:
3928        Include ConsolePrompt.js and ConsolePrompt.css.
3929
3930        * UserInterface/QuickConsole.css:
3931        (.quick-console):
3932        (.quick-console > .console-prompt):
3933        (.quick-console > .console-prompt::before):
3934        (.quick-console > .console-prompt > .CodeMirror):
3935        (.quick-console > .navigation-bar):
3936        Simplified by removing redundant elements.
3937
3938        * UserInterface/QuickConsole.js:
3939        (WebInspector.QuickConsole): Removed redundant elements.
3940        (WebInspector.QuickConsole.prototype.updateLayout):
3941        Set max-height and stop calling _updateSize.
3942        (WebInspector.QuickConsole.prototype._updateSize): Removed.
3943
39442013-04-23  Timothy Hatcher  <timothy@apple.com>
3945
3946        Start using CodeMirror for the Console prompt.
3947
3948        This introduces a new class, ConsolePrompt.
3949
3950        Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
3951        than in Chrome / the WebKit inspector
3952
3953        Reviewed by Joseph Pecoraro.
3954
3955        * UserInterface/ConsolePrompt.css: Added.
3956        (.console-prompt):
3957        (.console-prompt > .CodeMirror):
3958        (.console-prompt > .CodeMirror-scroll):
3959        * UserInterface/ConsolePrompt.js: Added.
3960        (WebInspector.ConsolePrompt):
3961        (WebInspector.ConsolePrompt.prototype.get element):
3962        (WebInspector.ConsolePrompt.prototype.get delegate):
3963        (WebInspector.ConsolePrompt.prototype.set delegate):
3964        (WebInspector.ConsolePrompt.prototype.get text):
3965        (WebInspector.ConsolePrompt.prototype.set text):
3966        (WebInspector.ConsolePrompt.prototype.get history):
3967        (WebInspector.ConsolePrompt.prototype.set history):
3968        (WebInspector.ConsolePrompt.prototype.get focused):
3969        (WebInspector.ConsolePrompt.prototype.focus):
3970        (WebInspector.ConsolePrompt.prototype.shown):
3971        (WebInspector.ConsolePrompt.prototype._handlePreviousKey):
3972        (WebInspector.ConsolePrompt.prototype._handleNextKey):
3973        (WebInspector.ConsolePrompt.prototype._handleEnterKey):
3974        (WebInspector.ConsolePrompt.prototype._restoreHistoryEntry):
3975        (WebInspector.ConsolePrompt.prototype._historyEntryForCurrentText):
3976        (WebInspector.ConsolePrompt.prototype._rememberCurrentTextInHistory):
3977
39782013-04-23  Antoine Quint  <graouts@apple.com>
3979
3980        <rdar://problem/13681931> Debugger Popover should not dismiss when mouse is over the popover
3981
3982        We would always dismiss the popover when we'd hover more than 1 second
3983        outside of the marked token in the text editor. This would also happen
3984        if the mouse happened to be over the popover shown for the marked token.
3985        We now track whether the mouse is over the presented popover and only
3986        dismiss the popover when no longer hovering the marked text in case the
3987        mouse is not over it.
3988
3989        Reviewed by Timothy Hatcher.
3990
3991        * UserInterface/EventHandler.js: Added.
3992        (WebInspector.EventHandler):
3993        (WebInspector.EventHandler.prototype.handleEvent):
3994        New utility to handle events in a way that makes it convenient to start
3995        and stop tracking events in the scope of that object without using closures.
3996        * UserInterface/Main.html:
3997        Add the new EventHandler helper.
3998        * UserInterface/SourceCodeTextEditor.js:
3999        (WebInspector.SourceCodeTextEditor.prototype.hidden):
4000        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
4001        (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
4002        (WebInspector.SourceCodeTextEditor.prototype.hoveredTokenWasReleased):
4003        (WebInspector.SourceCodeTextEditor.prototype._showPopover):
4004        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
4005        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
4006        (WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
4007        (WebInspector.SourceCodeTextEditor.prototype._dismissPopover):
4008        (WebInspector.SourceCodeTextEditor.prototype._trackPopoverEvents):
4009        (WebInspector.SourceCodeTextEditor.prototype._popoverMouseover):
4010        (WebInspector.SourceCodeTextEditor.prototype._popoverMouseout):
4011
40122013-04-22  Timothy Hatcher  <timothy@apple.com>
4013
4014        Teach CodeMirror about the CSS properties, keywords and colors we support in WebKit.
4015
4016        This keeps syntax highlighting in sync with code completion.
4017
4018        Reviewed by Joseph Pecoraro.
4019
4020        * UserInterface/CSSCompletions.js:
4021        (WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
4022        (WebInspector.CSSCompletions.requestCSSNameCompletions.updateCodeMirrorCSSMode):
4023        (WebInspector.CSSCompletions.requestCSSNameCompletions):
4024
40252013-04-21  Timothy Hatcher  <timothy@apple.com>
4026
4027        Fix some selection issues in the Console.
4028
4029        Allow command-click on a single row selection to deselect that row the first time.
4030        Before it was requiring two clicks -- because it would become selected twice --
4031        before it would deselect.
4032
4033        Also make sure to clear focusable children after populating delayed results,
4034        like a the DOM tree.
4035
4036        Reviewed by Joseph Pecoraro.
4037
4038        * UserInterface/LogContentView.js:
4039        (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
4040        (WebInspector.LogContentView.prototype._updateMessagesSelection):
4041
40422013-04-21  Timothy Hatcher  <timothy@apple.com>
4043
4044        Allow the context menu and clicking on any link in the console.
4045
4046        There are other links in the console besides those with the console-message-url
4047        style class that should work and get the normal context menu.
4048
4049        <rdar://problem/13702031> can't click on a "failed to load" url in console
4050
4051        Reviewed by Joseph Pecoraro.
4052
4053        * UserInterface/LogContentView.js:
4054        (WebInspector.LogContentView.prototype._handleContextMenuEvent):
4055        (WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
4056        Check only for tag name, not class name.
4057
40582013-04-19  Timothy Hatcher  <timothy@apple.com>
4059
4060        Allow both text and row selections in the Console.
4061
4062        Text selection switches to row selection if the text selection spans multiple rows.
4063
4064        <rdar://problem/13599610> REGRESSION: Can't select partial text of console output
4065
4066        Reviewed by Joseph Pecoraro.
4067
4068        * UserInterface/DOMTreeOutline.js:
4069        (WebInspector.DOMTreeOutline.prototype._onmousedown):
4070        Call event.stopPropagation() to prevent row selection in the console.
4071
4072        * UserInterface/LogContentView.css:
4073        (.console-message-text > span): Added. Allow text selection.
4074        (.console-message::before, .console-user-command::before, .javascript-prompt::before, .console-group-title::before):
4075        (.console-group-title::before):
4076        Use px instead of em to fix a positioning issue.
4077
4078        * UserInterface/LogContentView.js:
4079        (WebInspector.LogContentView):
4080        (WebInspector.LogContentView.prototype._mousedown):
4081        (WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
4082        (WebInspector.LogContentView.prototype._mousemove):
4083        Allow text selection that switches to row selection if the text selection spans multiple rows.
4084        This involves delaying operations from mousedown until later in mousemove or mouseup.
4085
4086        * UserInterface/TreeOutline.js:
4087        (TreeElement.treeElementMouseDown):
4088        Call event.stopPropagation() to prevent row selection in the console.
4089
40902013-04-20  Joseph Pecoraro  <pecoraro@apple.com>
4091
4092        <rdar://problem/13701561> Improve SourceMap folder tree hierarchies
4093
4094        Implement a few improvements to folder tree hierarchies.
4095
4096          - if there is a sourceRoot in the sourceMap use that as the base for
4097            subpaths, otherwise fallback to the sourceMappingURL (may change).
4098          - if a source is an absolute URL on a different scheme / host, prefix
4099            the subpath with a folder of the host name.
4100          - flatten folder chains in the UI. Makes expanding folders easier.
4101
4102        Reviewed by Timothy Hatcher.
4103
4104        * UserInterface/SourceMap.js:
4105        (WebInspector.SourceMap):
4106        (WebInspector.SourceMap.prototype.get sourceMappingBasePathURLComponents):
4107        (WebInspector.SourceMap.prototype._parseMap):
4108        Save the sourceRoot. And return urlComponents for the basePath, instead of
4109        just the path.
4110
4111        * UserInterface/Utilities.js:
4112        * UserInterface/SourceMapResource.js:
4113        (WebInspector.SourceMapResource.prototype.get sourceMapDisplaySubpath):
4114        Determine the subpath to display in the UI for this source map resource.
4115
4116        * UserInterface/SourceCodeTreeElement.js:
4117        (WebInspector.SourceCodeTreeElement.prototype.onpopulate.combineFolderChain):
4118        (WebInspector.SourceCodeTreeElement.prototype.onpopulate.findAndCombineFolderChains):
4119        (WebInspector.SourceCodeTreeElement.prototype.onpopulate):
4120        Flatten folder chains.
4121
41222013-04-20  Joseph Pecoraro  <pecoraro@apple.com>
4123
4124        <rdar://problem/13701561> Improve SourceMap folder tree hierarchies
4125
4126        Correctly resolve dots when determining absolute URLs. Previously I had
4127        left in extra "../s", however they should have been removed. And
4128        absoluteURL should handle resolving any dots in the partialURL.
4129
4130        This fixes ASSERTs in Debug WebKit builds where we were calling
4131        loadResourceSynchronously with a URL that was expected to be
4132        absolute and wasn't.
4133
4134        Reviewed by Timothy Hatcher.
4135
4136        * UserInterface/SourceMap.js:
4137        * UserInterface/Utilities.js:
4138
41392013-04-20  Joseph Pecoraro  <pecoraro@apple.com>
4140
4141        <rdar://problem/13701561> Improve SourceMap folder tree hierarchies
4142
4143        Remove the old combine folder chain code. It will be easier to follow
4144        the new code with the old code gone.
4145
4146        Reviewed by Timothy Hatcher.
4147
4148        * UserInterface/SourceCodeTreeElement.js:
4149        (WebInspector.SourceCodeTreeElement.prototype.onpopulate.combineFolderChain):
4150
41512013-04-19  Joseph Pecoraro  <pecoraro@apple.com>
4152
4153        <rdar://problem/13654793> Source Maps: Support for Stylesheets (less / sass / scss) with SourceMaps
4154
4155        The Inspector protocol now tells us when a CSS response contains a
4156        sourceMappingURL for a Resource. If we are given a source map URL,
4157        download the source map and associate it with the Resource.
4158
4159        Give Stylesheet SourceMapResources (like sass stylesheets) a CSS
4160        clipping icon instead of using the generic clipping icon.
4161
4162        Reviewed by Timothy Hatcher.
4163
4164        * UserInterface/FrameResourceManager.js:
4165        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
4166        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):
4167        (WebInspector.FrameResourceManager.prototype._createResource):
4168        If there is a sourceMapURL, download it and associate it with the Resource.
4169
4170        * UserInterface/Images/ClippingCSS.png: Added.
4171        * UserInterface/Images/ClippingCSS@2x.png: Added.
4172        * UserInterface/ResourceIcons.css:
4173        (.source-map-resource.resource-icon.resource-type-stylesheet .icon):
4174        CSS Clipping icon for stylesheet source map resources (like less / sass / scss).
4175
4176        * UserInterface/InspectorBackendCommands.js:
4177        * UserInterface/NetworkObserver.js:
4178        (WebInspector.NetworkObserver.prototype.loadingFinished):
4179        Handle and pass on the new "extraResourceInfo" parameter.
4180
41812013-04-19  Joseph Pecoraro  <pecoraro@apple.com>
4182
4183        <rdar://problem/13654793> Source Maps: Support for Stylesheets (less / sass / scss) with SourceMaps
4184
4185        Follow OpenSource and merge PositionSourceMap into SourceMap.
4186
4187        Reviewed by Timothy Hatcher.
4188
4189        * UserInterface/SourceMap.js:
4190        (WebInspector.SourceMap):
4191        (WebInspector.SourceMap.prototype.findEntry):
4192        (WebInspector.SourceMap.prototype.findEntryReversed):
4193        (WebInspector.SourceMap.prototype._parseMap):
4194        * UserInterface/SourceMapManager.js:
4195        (WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
4196
41972013-04-18  Timothy Hatcher  <timothy@apple.com>
4198
4199        Make sure to call shown on the current Style sub-panel when the sidebar visibility changes.
4200
4201        <rdar://problem/13604148> Content jumps in details sidebar when switching to styles pane
4202
4203        Reviewed by Joseph Pecoraro.
4204
4205        * UserInterface/CSSStyleDetailsSidebarPanel.js:
4206        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
4207        Call shown on the selected panel.
4208
42092013-04-18  Timothy Hatcher  <timothy@apple.com>
4210
4211        Use CSSAgent.setStyleText for Style Attribute editing too.
4212
4213        <rdar://problem/13630483> Style Attribute editing in the Style details sidebar does not work on shadow content (114442)
4214
4215        Reviewed by Joseph Pecoraro.
4216
4217        * UserInterface/DOMNodeStyles.js:
4218        (WebInspector.DOMNodeStyles.prototype.changeStyleText):
4219
42202013-04-18  Timothy Hatcher  <timothy@apple.com>
4221
4222        Switch from X-WebKit-CSP to Content-Security-Policy for the CSP header.
4223
4224        Also stop allowing 'unsafe-eval' since the one place we used eval() is dead code.
4225
4226        Reviewed by Joseph Pecoraro.
4227
4228        * UserInterface/InspectorBackend.js:
4229        (InspectorBackendClass.prototype.loadFromJSONIfNeeded): Removed. Not used by Safari.
4230        * UserInterface/Main.html:
4231
42322013-04-18  Timothy Hatcher  <timothy@apple.com>
4233
4234        Make sure to always include the New Rule button in the Styles sidebar.
4235
4236        <rdar://problem/13683941> Can't add a new rule unless there is a matched rule already
4237
4238        Reviewed by Joseph Pecoraro.
4239
4240        * UserInterface/RulesStyleDetailsPanel.js:
4241        (WebInspector.RulesStyleDetailsPanel.prototype.refresh.addNewRuleButton): Added.
4242        (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Call addNewRuleButton if
4243        addedNewRuleButton isn't true after the end of the loop.
4244
42452013-04-18  Timothy Hatcher  <timothy@apple.com>
4246
4247        Remove workaround for <rdar://problem/13337211> now that it is fixed.
4248
4249        Removing this ends up fixing:
4250        <rdar://problem/13612942> REGRESSION: Style sidebar does not update immediately with node change
4251
4252        Reviewed by Joseph Pecoraro.
4253
4254        * UserInterface/DOMNodeStyles.js:
4255        (WebInspector.DOMNodeStyles.prototype.refresh):
4256        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
4257        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
4258        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
4259        Removed the repeat refresh polling logic.
4260
42612013-04-18  Timothy Hatcher  <timothy@apple.com>
4262
4263        Properly handle !important properties from inherited rules.
4264
4265        <rdar://problem/13683742> Important properties from inherited rules
4266        mistakenly strikeout the effective property
4267
4268        Reviewed by Joseph Pecoraro.
4269
4270        * UserInterface/DOMNodeStyles.js:
4271        (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties):
4272        Mark properties as overridden from inherited elements if there
4273        is already an effective property from another element.
4274
42752013-04-18  Timothy Hatcher  <timothy@apple.com>
4276
4277        Adopt CSSAgent.setStyleText added in https://webkit.org/b/109340.
4278
4279        <rdar://problem/13337211> Editing styles on daringfireball.net interrupts autocompletion and flashes
4280
4281        Reviewed by Joseph Pecoraro.
4282
4283        * UserInterface/DOMNodeStyles.js:
4284        (WebInspector.DOMNodeStyles.prototype.styleChanged): Use CSSAgent.setStyleText.
4285        * UserInterface/InspectorBackendCommands.js: Updated.
4286
42872013-04-18  Joseph Pecoraro  <pecoraro@apple.com>
4288
4289        <rdar://problem/13681577> Unresolved breakpoint in SourceMapResource when reloading page
4290
4291        The ContentBrowser no longer contains ResourceContentViews directly, it
4292        has ResourceClusterContentViews. Update the closeAll prototype call on
4293        page navigations to make sure resource views get closed properly.
4294
4295        Reviewed by Timothy Hatcher.
4296
4297        * UserInterface/ResourceSidebarPanel.js:
4298
42992013-04-18  Joseph Pecoraro  <pecoraro@apple.com>
4300
4301        <rdar://problem/13681487> Missing heirarchical path components selecting breakpoints in source map resources in Debugger sidebar
4302
4303        Force onpopulate to create the SourceMapTreeElements immediately,
4304        instead of lazily waiting for the user to expand the Resource in
4305        the Resources sidebar. Then, when we look up the TreeElement to
4306        get the hierarchical path components it will be found.
4307
4308        Reviewed by Timothy Hatcher.
4309
4310        * UserInterface/SourceCodeTreeElement.js:
4311        (WebInspector.SourceCodeTreeElement.prototype._updateSourceCode):
4312        (WebInspector.SourceCodeTreeElement.prototype._sourceMapAdded):
4313
43142013-04-17  Joseph Pecoraro  <pecoraro@apple.com>
4315
4316        ERROR: TypeError: 'undefined' is not an object (evaluating 'currentContentView.handleCopyEvent.bind')
4317
4318        Right clicking in an editor was producing an error. Check if both
4319        the content view and the handleCopyEvent handler exist.
4320
4321        Reviewed by Timothy Hatcher.
4322
4323        * UserInterface/ClusterContentView.js:
4324        (WebInspector.ClusterContentView.prototype.get handleCopyEvent):
4325
43262013-04-15  Timothy Hatcher  <timothy@apple.com>
4327
4328        Fix an exception that happens when clicking source links multiple times.
4329
4330        Reviewed by Antoine Quint.
4331
4332        * UserInterface/ContentViewContainer.js:
4333        (WebInspector.ContentViewContainer.prototype.showContentView):
4334        Return currentView if it is already showing. This matches the case where we return the view
4335        if it wasn't already showing. Change other returns to return null instead of undefined.
4336
4337        * UserInterface/ResourceClusterContentView.js:
4338        (WebInspector.ResourceClusterContentView.prototype._showContentViewForIdentifier):
4339        Add an assert that we have a content view. This wasn't needed but I used to to pinpoint the bug.
4340
43412013-04-15  Joseph Pecoraro  <pecoraro@apple.com>
4342
4343        <rdar://problem/13644426> Support %c - styled console messages - http://adamschwartz.co/log/
4344
4345        Merge OpenSource r130941, r131448, r134166, r134202.
4346
4347        Reviewed by Timothy Hatcher.
4348
4349        * UserInterface/ConsoleMessageImpl.js:
4350        (WebInspector.ConsoleMessageImpl.prototype.styleFormatter):
4351        (WebInspector.ConsoleMessageImpl.prototype.isWhitelistedProperty):
4352        (WebInspector.ConsoleMessageImpl.prototype.append):
4353        (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
4354
43552013-04-15  Joseph Pecoraro  <pecoraro@apple.com>
4356
4357        <rdar://problem/13658744> Improve %f, %d, %i formatters for numbers and non-numeric input
4358
4359        Developer tools differ subtly in this area. I like Firefox's behavior
4360        the most, calling parseFloat or parseInt on the argument. We now match
4361        that behavior.
4362
4363        Chrome prints NaN for anything but primitive numbers. Which causes it
4364        to print NaN for Infinity and "1.5". Firebug just prints out everything
4365        like "%s", like we used to before this patch.
4366
4367        Reviewed by Timothy Hatcher.
4368
4369        * UserInterface/ConsoleMessageImpl.js:
4370        (WebInspector.ConsoleMessageImpl.prototype.stringFormatter):
4371        (WebInspector.ConsoleMessageImpl.prototype.floatFormatter):
4372        (WebInspector.ConsoleMessageImpl.prototype.integerFormatter):
4373
43742013-04-15  Timothy Hatcher  <timothy@apple.com>
4375
4376        Don't call clearHistory or markClean in TextEditor after the first time.
4377
4378        This allows undo/redo in the content browser after editing in style sidebar.
4379
4380        Reviewed by Joseph Pecoraro.
4381
4382        * UserInterface/TextEditor.js:
4383        (WebInspector.TextEditor): Set _initialStringNotSet.
4384        (WebInspector.TextEditor.prototype.set string.update):
4385        Call clearHistory and markClean only if _initialStringNotSet is set.
4386        And delete _initialStringNotSet afterwards.
4387
43882013-04-14  Timothy Hatcher  <timothy@apple.com>
4389
4390        Default dockSide to "undocked" if it isn't specified in the query parameters.
4391
4392        This hides the dock buttons again in the iOS Inspector.
4393
4394        Reviewed by Dan Bernstein.
4395
4396        * UserInterface/Main.js:
4397        (WebInspector.contentLoaded):
4398
43992013-04-14  Timothy Hatcher  <timothy@apple.com>
4400
4401        Don't allow Command-Z to clear the editor.
4402
4403        Reviewed by Antoine Quint.
4404
4405        * UserInterface/TextEditor.js:
4406        (WebInspector.TextEditor.prototype.set string.update):
4407        Call clearHistory and markClean.
4408
44092013-04-13  Timothy Hatcher  <timothy@apple.com>
4410
4411        Fix an exception when inspecting a request that has a "Content-type"
4412        header instead of "Content-Type".
4413
4414        All HTTP headers are case-insensitive, so we need to handle that.
4415
4416        Reviewed by Ricky Mondello.
4417
4418        * UserInterface/Resource.js:
4419        (WebInspector.Resource.prototype.get requestDataContentType):
4420        (WebInspector.Resource.prototype.get encodedSize):
4421        (WebInspector.Resource.prototype.get compressed):
4422        (WebInspector.Resource.prototype.updateForResponse):
4423        (WebInspector.Resource.prototype.increaseSize):
4424        Use valueForCaseInsensitiveKey to fetch headers.
4425
4426        * UserInterface/ResourceDetailsSidebarPanel.js:
4427        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
4428        Set requestDataContentType to "" if it is null so the split() that comes later works.
4429
4430        * UserInterface/Utilities.js:
4431        (Object.prototype.valueForCaseInsensitiveKey): Added.
4432
44332013-04-13  Timothy Hatcher  <timothy@apple.com>
4434
4435        Rename "Post Data" to "Request Data" and show the data if it exists,
4436        not just for the "POST" method.
4437
4438        Reviewed by Antoine Quint.
4439
4440        * Localizations/en.lproj/localizedStrings.js: Updated.
4441
4442        * UserInterface/FrameResourceManager.js:
4443        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
4444
4445        * UserInterface/Resource.js:
4446        (WebInspector.Resource):
4447        (WebInspector.Resource.prototype.get requestData):
4448        (WebInspector.Resource.prototype.get requestDataContentType):
4449
4450        * UserInterface/ResourceClusterContentView.js:
4451        (WebInspector.ResourceClusterContentView.prototype.get requestContentView):
4452        (WebInspector.ResourceClusterContentView.prototype._canShowRequestContentView):
4453
4454        * UserInterface/ResourceDetailsSidebarPanel.js:
4455        (WebInspector.ResourceDetailsSidebarPanel):
4456        (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
4457        (WebInspector.ResourceDetailsSidebarPanel.prototype._goToRequestDataClicked):
4458        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
4459        Remove a workaround for file data that is no longer needed.
4460
44612013-04-12  Timothy Hatcher  <timothy@apple.com>
4462
4463        Prevent a double layout in the content browser navigation bar when switching views.
4464
4465        By default inserted navigation items schedule a layout soon, which prevents multiple consecutive layouts
4466        when inserting many navigation items. Forcing a layout after inserting navigation items causes the
4467        items to be displayed in their final positions and sizes right away.
4468
4469        Reviewed by Joseph Pecoraro.
4470
4471        * UserInterface/ContentBrowser.js:
4472        (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
4473        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
4474        (WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange):
4475        Call updateLayout after changing the navigation bar.
4476
4477        * UserInterface/HierarchicalPathNavigationItem.js:
4478        (WebInspector.HierarchicalPathNavigationItem.prototype.set components):
4479        Use updateLayoutSoon to coalesce multiple changes.
4480
4481        * UserInterface/NavigationBar.js:
4482        (WebInspector.NavigationBar.prototype.updateLayout): Clear the timeout.
4483
44842013-04-12  Timothy Hatcher  <timothy@apple.com>
4485
4486        Fix the layout of the selector arrows when components start to collapse.
4487
4488        Reviewed by Joseph Pecoraro.
4489
4490        * UserInterface/HierarchicalPathComponent.css:
4491        (.hierarchical-path-component.show-selector-arrows): Added.
4492        (.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component.show-selector-arrows:last-child): Added.
4493        Specify correct min-widths that include space for the selector arrows.
4494
4495        * UserInterface/HierarchicalPathComponent.js:
4496        (WebInspector.HierarchicalPathComponent): Add the show-selector-arrows class name to the element.
4497
44982013-04-12  Timothy Hatcher  <timothy@apple.com>
4499
4500        Add the ability to see POST data that isn't in the application/x-www-form-urlencoded format.
4501
4502        <rdar://problem/12667485> REGRESSION (Safari 6): Missing POST request view for non-urlencoded data
4503
4504        Reviewed by Joseph Pecoraro.
4505
4506        * Localizations/en.lproj/localizedStrings.js: Updated.
4507
4508        * UserInterface/ClusterContentView.js:
4509        (WebInspector.ClusterContentView.prototype.get handleCopyEvent): Added.
4510        Handles passing through the current content view's handleCopyEvent function.
4511
4512        * UserInterface/ContentView.js:
4513        (WebInspector.ContentView):
4514        (WebInspector.ContentView.isViewable):
4515        Added TextContentView.
4516
4517        * UserInterface/DetailsSection.css:
4518        (.details-section > .content > .group > .row.simple > .value .go-to-arrow): Added.
4519
4520        * UserInterface/FrameContentView.js:
4521        (WebInspector.FrameContentView.createPathComponent): Pass true to get double arrows.
4522        (WebInspector.FrameContentView.prototype.showResource): Added.
4523        (WebInspector.FrameContentView.prototype.showSourceCode): Return the view. Use showResource.
4524        (WebInspector.FrameContentView.prototype.showDOMTree): Return the view.
4525
4526        * UserInterface/Images/Request.pdf: Added.
4527        * UserInterface/Images/Response.pdf: Added.
4528
4529        * UserInterface/Main.html: Included new files.
4530
4531        * UserInterface/PathComponentIcons.css:
4532        (.request-icon .icon): Added.
4533        (.response-icon .icon): Added.
4534
4535        * UserInterface/ResourceClusterContentView.js: Added.
4536        (WebInspector.ResourceClusterContentView.createPathComponent):
4537        (WebInspector.ResourceClusterContentView):
4538        (WebInspector.ResourceClusterContentView.prototype.get resource):
4539        (WebInspector.ResourceClusterContentView.prototype.get responseContentView):
4540        (WebInspector.ResourceClusterContentView.prototype.get requestContentView):
4541        (WebInspector.ResourceClusterContentView.prototype.get selectionPathComponents):
4542        (WebInspector.ResourceClusterContentView.prototype.shown):
4543        (WebInspector.ResourceClusterContentView.prototype.closed):
4544        (WebInspector.ResourceClusterContentView.prototype.showRequest):
4545        (WebInspector.ResourceClusterContentView.prototype.showResponse):
4546        (WebInspector.ResourceClusterContentView.prototype._canShowRequestContentView):
4547        (WebInspector.ResourceClusterContentView.prototype._pathComponentForContentView):
4548        (WebInspector.ResourceClusterContentView.prototype._identifierForContentView):
4549        (WebInspector.ResourceClusterContentView.prototype._showContentViewForIdentifier):
4550        (WebInspector.ResourceClusterContentView.prototype._pathComponentSelected):
4551        (WebInspector.ResourceClusterContentView.prototype._resourceTypeDidChange):
4552
4553        * UserInterface/ResourceContentView.js:
4554        (WebInspector.ResourceContentView):
4555        Removed code that handled resource type changes and concrete subclasses.
4556        That is now handled by ResourceClusterContentView.
4557
4558        * UserInterface/ResourceDetailsSidebarPanel.js:
4559        (WebInspector.ResourceDetailsSidebarPanel.prototype._goToPostDataClicked): Added.
4560        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshPostDataSection):
4561        Renamed Size to Data in the Post Data section. Added a go-to arrow.
4562
4563        * UserInterface/ResourceSidebarPanel.js:
4564        (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView): Handle ResourceClusterContentView.
4565        (WebInspector.ResourceSidebarPanel.prototype.showSourceCode): Ditto.
4566        (WebInspector.ResourceSidebarPanel.prototype.showResourceRequest): Added.
4567
4568        * UserInterface/TextContentView.css: Added.
4569        (.content-view.text > .text-editor):
4570
4571        * UserInterface/TextContentView.js: Added.
4572        (WebInspector.TextContentView):
4573        (WebInspector.TextContentView.prototype.get textEditor):
4574        (WebInspector.TextContentView.prototype.get navigationItems):
4575        (WebInspector.TextContentView.prototype.revealLine):
4576        (WebInspector.TextContentView.prototype.shown):
4577        (WebInspector.TextContentView.prototype.hidden):
4578        (WebInspector.TextContentView.prototype.closed):
4579        (WebInspector.TextContentView.prototype.get supportsSearch):
4580        (WebInspector.TextContentView.prototype.get numberOfSearchResults):
4581        (WebInspector.TextContentView.prototype.get hasPerformedSearch):
4582        (WebInspector.TextContentView.prototype.set automaticallyRevealFirstSearchResult):
4583        (WebInspector.TextContentView.prototype.performSearch):
4584        (WebInspector.TextContentView.prototype.searchCleared):
4585        (WebInspector.TextContentView.prototype.revealPreviousSearchResult):
4586        (WebInspector.TextContentView.prototype.revealNextSearchResult):
4587        (WebInspector.TextContentView.prototype.updateLayout):
4588        (WebInspector.TextContentView.prototype._togglePrettyPrint):
4589        (WebInspector.TextContentView.prototype._textEditorFormattingDidChange):
4590        (WebInspector.TextContentView.prototype._numberOfSearchResultsDidChange):
4591
45922013-04-11  Joseph Pecoraro  <pecoraro@apple.com>
4593
4594        <rdar://problem/13630859> Remote Web Inspector doesn't work for some sites (114447)
4595
4596        RWIInspectorFrontendHost always returns undefined for IFH.loadResourceSynchronously.
4597        Gracefully handle that in our frontend while we either implement it, or create
4598        a new Inspector protocol method to load resources through the backend.
4599
4600        Reviewed by Timothy Hatcher.
4601
4602        * UserInterface/SourceMapManager.js:
4603        (WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
4604        * UserInterface/SourceMapResource.js:
4605        (WebInspector.SourceMapResource.prototype._requestResourceAsynchronously):
4606
46072013-04-11  Timothy Hatcher  <timothy@apple.com>
4608
4609        Force CodeMirror editors to be a stacking context to prevent creating many layers
4610        inside when another element overlaps.
4611
4612        <rdar://problem/13608839> REGRESSION: Text in Web Inspector Source Code
4613        view looks heavy (double rendered?)
4614
4615        Reviewed by Joseph Pecoraro.
4616
4617        * UserInterface/CodeMirrorOverrides.css:
4618        (.CodeMirror): Added. Set z-index: 0. Position is already set in codemirror.css.
4619
46202013-04-10  Timothy Hatcher  <timothy@apple.com>
4621
4622        Make the Web Inspector database code tolerant of quota exceptions.
4623
4624        Reviewed by Joseph Pecoraro.
4625
4626        * UserInterface/ImageUtilities.js:
4627        If we can't open the database it isn't the end of the world, we just will
4628        always generate the images and not cache them for better load times.
4629
46302013-04-10  Timothy Hatcher  <timothy@apple.com>
4631
4632        Drop the expected usage down to 5 MB to match the values in RWI and WK1.
4633
4634        This fixes an exception on load for first time users.
4635
4636        Reviewed by Brian Weinstein.
4637
4638        * UserInterface/ImageUtilities.js:
4639
46402013-04-10  Timothy Hatcher  <timothy@apple.com>
4641
4642        Update the Style Attribute in the sidebar when the DOM attribute changes.
4643
4644        Also only update a style rule for external changes if the editor isn't focused.
4645        This prevents external changes from fighting with user edits.
4646
4647        <rdar://problem/13619049>
4648
4649        Reviewed by Antoine Quint.
4650
4651        * UserInterface/CSSStyleDeclarationTextEditor.js:
4652        (WebInspector.CSSStyleDeclarationTextEditor):
4653        (WebInspector.CSSStyleDeclarationTextEditor.prototype._commitChanges):
4654        (WebInspector.CSSStyleDeclarationTextEditor.prototype._editorBlured): Added.
4655        (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertiesChanged):
4656        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
4657        Simplify when we reset the content to only do it when not focused.
4658
4659        * UserInterface/DOMTreeManager.js:
4660        (WebInspector.DOMTreeManager.prototype._loadNodeAttributes):
4661        Fire WebInspector.DOMNode.Event.AttributeModified. Remove StyleInvalidated event.
4662
46632013-04-10  Timothy Hatcher  <timothy@apple.com>
4664
4665        Make DOMNodeStyles mark as needing refresh in all cases when a stylesheet changes.
4666
4667        The stylesheet change might be a rule that we didn't match yet, so checking existing matched
4668        rules for the stylesheet will not trigger a refresh. This code was added back when refresh was
4669        not as smart, so this is the correct thing to do now.
4670
4671        <rdar://problem/13387359> Undoing selector change does not show selector affecting the page anywhere
4672
4673        Reviewed by Antoine Quint.
4674
4675        * UserInterface/DOMNodeStyles.js:
4676        (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange):
4677        Simplify by always calling _markAsNeedsRefresh.
4678
46792013-04-09  Timothy Hatcher  <timothy@apple.com>
4680
4681        Indent invalid style properties, not just blank lines.
4682
4683        Also strike out text that is not recognized as a property or comment.
4684
4685        This will now properly indent and strike out these two error cases:
4686
4687            padding; 0;
4688            *line-height: 1;
4689
4690        <rdar://problem/13608848> Checkbox missing for a style property
4691
4692        Reviewed by Antoine Quint.
4693
4694        * UserInterface/CSSStyleDeclarationTextEditor.css:
4695        Strike out spans that are not comments or marked properties.
4696
4697        * UserInterface/CSSStyleDeclarationTextEditor.js:
4698        (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
4699        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
4700        Call _markLinesWithCheckboxPlaceholder so the placeholders are added if needed for
4701        lines htat didn't have properties.
4702
4703        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
4704        Remove use of __checkboxMarker, it is not set anymore.
4705
4706        (WebInspector.CSSStyleDeclarationTextEditor.prototype._markLinesWithCheckboxPlaceholder):
4707        Renamed from _markBlankLinesWithCheckboxPlaceholder and taught how to mark only lines that
4708        need marked, and ignores the rest.
4709
47102013-04-08  Timothy Hatcher  <timothy@apple.com>
4711
4712        Avoid a console error when viewing Anonymous scripts.
4713
4714        Reviewed by Geoffrey Garen.
4715
4716        * UserInterface/ResourceSidebarPanel.js:
4717        (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView):
4718
47192013-04-08  Timothy Hatcher  <timothy@apple.com>
4720
4721        Make the Scope Variables details sidebar work when evaluating in the Console.
4722
4723        <rdar://problem/12831236> REGRESSION (6.0.3-Curie): Scope Chain shows nothing while debugging
4724
4725        Reviewed by Joseph Pecoraro.
4726
4727        * UserInterface/ScopeChainDetailsSidebarPanel.js:
4728        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.delayedWork): Clear the timeout.
4729        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Set a timeout.
4730
47312013-04-08  Joseph Pecoraro  <pecoraro@apple.com>
4732
4733        Copy PrettyPrinter updates into UserInterface to enact the changes.
4734
4735        Unreviewed, just moving reviewed code between directories.
4736
4737        * UserInterface/CodeMirrorFormatters.js:
4738        * UserInterface/External/CodeMirror/javascript.js:
4739        * UserInterface/Formatter.js:
4740        (Formatter.prototype._handleToken):
4741
47422013-04-08  Joseph Pecoraro  <pecoraro@apple.com>
4743
4744        <rdar://problem/13593779> Pretty printer should line "case" and "default" with "switch"
4745
4746        Dedent before case/default and indent after, so it lines up with the switch.
4747
4748        Reviewed by Timothy Hatcher.
4749
4750        * Tools/PrettyPrinting/CodeMirrorFormatters.js:
4751        * Tools/PrettyPrinting/index.html:
4752        * Tools/PrettyPrinting/js-tests/switch-case-default-expected.js: Added.
4753        * Tools/PrettyPrinting/js-tests/switch-case-default.js: Added.
4754
47552013-04-08  Joseph Pecoraro  <pecoraro@apple.com>
4756
4757        <rdar://problem/13584713> Pretty printer should gracefully handle single line if/else/for/do/while blocks
4758
4759        This adds indentation support for single statement blocks. This had a
4760        pretty big performance cost pretty printing jquery.min.js (20ms), but
4761        I think it is worth it. In the inspector itself, I did not see pretty
4762        printing actually taking longer. I'll continue to look at performance.
4763
4764        Reviewed by Timothy Hatcher.
4765
4766        * Tools/PrettyPrinting/Formatter.js:
4767        (Formatter.prototype._handleToken):
4768        Let the Code modify state before / after the token is consumed.
4769        Let the formatters specify multiple dedents at once.
4770
4771        * Tools/PrettyPrinting/FormatterDebug.js:
4772        (Formatter.prototype.debug):
4773        In JavaScript print out the previous lexical state.
4774
4775        * Tools/PrettyPrinting/CodeMirrorFormatters.js:
4776        Pretty print a good chunk of JavaScript single statement blocks and
4777        if/else chains.
4778
4779        * Tools/PrettyPrinting/javascript.js:
4780        Update to "near" trunk CodeMirror JavaScript. The most recent commit
4781        causes issues.
4782
4783        * Tools/PrettyPrinting/index.html:
4784        * Tools/PrettyPrinting/js-tests/block-comment-expected.js: Added.
4785        * Tools/PrettyPrinting/js-tests/block-comment.js: Added.
4786        * Tools/PrettyPrinting/js-tests/single-statement-blocks-expected.js: Added.
4787        * Tools/PrettyPrinting/js-tests/single-statement-blocks.js: Added.
4788        Added some micro-tests for recent pretty printing changes.
4789
47902013-04-08  Joseph Pecoraro  <pecoraro@apple.com>
4791
4792        Add a little test running harness to the PrettyPrinter tool. No tests yet.
4793
4794        Reviewed by Timothy Hatcher.
4795
4796        * Tools/PrettyPrinting/index.html:
4797
47982013-04-08  Joseph Pecoraro  <pecoraro@apple.com>
4799
4800        Update the PrettyPrinting Tool to match UserInterface.
4801
4802        Unreviewed tools change.
4803
4804        * Tools/PrettyPrinting/codemirror.js:
4805        (window.CodeMirror):
4806        * Tools/PrettyPrinting/javascript.js:
4807
48082013-04-08  Timothy Hatcher  <timothy@apple.com>
4809
4810        Enable completions for resource content views.
4811
4812        <rdar://problem/13598062>
4813
4814        Reviewed by Antoine Quint.
4815
4816        * UserInterface/TextEditor.js:
4817        (WebInspector.TextEditor): Hook up a WebInspector.CodeMirrorCompletionController.
4818
48192013-04-08  Timothy Hatcher  <timothy@apple.com>
4820
4821        Delay computing suggestions for 250ms to keep from slowing down typing.
4822
4823        <rdar://problem/13598014> CSS completions can slow down typing
4824
4825        Reviewed by Antoine Quint.
4826
4827        * UserInterface/CodeMirrorCompletionController.js:
4828        (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
4829        (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
4830        Clear the typing delay timeout.
4831
4832        (WebInspector.CodeMirrorCompletionController.prototype._handleChange):
4833        Set _ignoreNextCursorActivity so hideCompletions isn't called.
4834
48352013-04-08  Antoine Quint  <graouts@apple.com>
4836
4837        <rdar://problem/13597681> Layers sidebar panel may flash popovers with stale content
4838
4839        We only present the popover when the data grid node hasn't changed
4840        between the time we called into the backend and the time the callback
4841        is called.
4842
4843        Reviewed by Timothy Hatcher.
4844
4845        * UserInterface/LayerTreeSidebarPanel.js:
4846        (WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
4847
48482013-04-08  Antoine Quint  <graouts@apple.com>
4849
4850        <rdar://problem/12892280> Layer tree panel data grid should refresh less frequently when layers for nodes are recreated
4851
4852        Provide a custom DataGrid subclass for the Layers panel where we
4853        use CSS transforms to update the position of data grid nodes
4854        instead of relying on DOM order so that we can avoid DOM thrashing
4855        and retain scroll position for rapidly changing content. We also
4856        set the width of "Paints" and "Memory" columns for a nicely
4857        consistent formatting.
4858
4859        Reviewed by Timothy Hatcher.
4860
4861        * UserInterface/DetailsSectionDataGridRow.js:
4862        (WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid):
4863        Perform a quick return in case the new data grid is the same
4864        as the previous in order to remove the possibility of appending
4865        the data grid's element if it was already the current data grid.
4866
4867        * UserInterface/LayerTreeDataGrid.js: Added.
4868        (WebInspector.LayerTreeDataGrid):
4869        Initialize the DataGrid with a custom set of columns and set the
4870        width of the "Paints" and "Memory" columns.
4871
4872        (WebInspector.LayerTreeDataGrid.prototype.insertChild):
4873        (WebInspector.LayerTreeDataGrid.prototype.removeChild):
4874        Override these DataGrid methods to perform our custom layout of
4875        cells when a child is added or removed.
4876
4877        (WebInspector.LayerTreeDataGrid.prototype.setChildren):
4878        Public API used to set the list of children data grid nodes for
4879        this data grid. We compare this new list to the previous list
4880        and only remove / add the nodes that need to be, avoiding having
4881        to remove the entire set of children to update the nodes list.
4882
4883        (WebInspector.LayerTreeDataGrid.prototype._updateChildren):
4884        Position the children data grid nodes using CSS transforms instead
4885        of DOM order. We also manually set the sibling relationship there
4886        since it can no longer be accomplished in insertChild() or
4887        removeChild() calls.
4888
4889        (WebInspector.LayerTreeDataGrid.prototype._recalculateSiblings):
4890        Make this method a no-op since we manually perform the same task in
4891        _updateChildren().
4892
4893        * UserInterface/LayerTreeDataGridNode.js:
4894        (WebInspector.LayerTreeDataGridNode):
4895        Add a new _outlets private ivar we use to stash the DOM elements
4896        we'll need to update when the node's data changes.
4897
4898        (WebInspector.LayerTreeDataGridNode.prototype.createCells):
4899        Override this DataGridNode API in order to add a flag that cells
4900        were created which we'll use as a flag to allow the update of a
4901        cell's data in the data setter.
4902
4903        (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
4904        (WebInspector.LayerTreeDataGridNode.prototype.set layer):
4905        (WebInspector.LayerTreeDataGridNode.prototype.get data):
4906        (WebInspector.LayerTreeDataGridNode.prototype.set data):
4907        Custom data setter as the default version would completely trash
4908        the DOM tree and replace it with a whole new set of elements to
4909        update the data. We choose a more incremental approach here since
4910        individual fields for this node may change (paint count being the
4911        most likely).
4912
4913        (WebInspector.LayerTreeDataGridNode.prototype._makeOutlet):
4914        (WebInspector.LayerTreeDataGridNode.prototype._makeNameCell):
4915        Prepare the DOM elements used to present the node's data. Many
4916        elements for the name cell are dynamically added and removed in
4917        _updateNameCellData().
4918
4919        (WebInspector.LayerTreeDataGridNode.prototype._updateCell):
4920        (WebInspector.LayerTreeDataGridNode.prototype._updateNameCellData):
4921        Update the information on outlets or their very availability based
4922        on the current data and represented layer.
4923
4924        * UserInterface/LayerTreeSidebarPanel.js:
4925        (WebInspector.LayerTreeSidebarPanel.prototype.shown):
4926        (WebInspector.LayerTreeSidebarPanel.prototype.hidden):
4927        Remove the auto-sizing of data grid columns as we're not setting them
4928        to be constant for a more consistent look.
4929
4930        (WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
4931        Instantiate our new LayerTreeDataGrid class.
4932
4933        (WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid):
4934        Use the custom setChildren() API on LayerTreeDataGrid to change the
4935        children order.
4936
4937        (WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid):
4938        * UserInterface/Main.html:
4939        Add LayerTreeDataGrid.js.
4940
49412013-04-07  Joseph Pecoraro  <pecoraro@apple.com>
4942
4943        <rdar://problem/13584696> Pretty printer should preserve whitespace in multi-line comments
4944
4945        Update CodeMirror to trunk to get a few recent fixes.
4946
4947        This update includes project wide tailing whitespace and tab removal
4948        which is why so many files were changed.
4949
4950        Rubber-stamped by Timothy Hatcher.
4951
4952        * UserInterface/External/CodeMirror/clojure.js:
4953        * UserInterface/External/CodeMirror/codemirror.js:
4954        * UserInterface/External/CodeMirror/coffeescript.js:
4955        * UserInterface/External/CodeMirror/javascript.js:
4956        * UserInterface/External/CodeMirror/less.js:
4957        * UserInterface/External/CodeMirror/matchbrackets.js:
4958        * UserInterface/External/CodeMirror/overlay.js:
4959        * UserInterface/External/CodeMirror/sql.js:
4960        * UserInterface/External/CodeMirror/xml.js:
4961
49622013-04-07  Joseph Pecoraro  <pecoraro@apple.com>
4963
4964        <rdar://problem/13043550> REGRESSION: Scrollbar renders behind position: sticky elements in the Web Inspector
4965
4966        Give the Sidebar Panels a stacking context to work around the issue.
4967
4968        Reviewed by Ricky Mondello.
4969
4970        * UserInterface/Sidebar.css:
4971        (.sidebar > .panel):
4972
49732013-04-05  Joseph Pecoraro  <pecoraro@apple.com>
4974
4975        Add a small script to update the Tools/PrettyPrinting directory.
4976
4977        My workflow for fixing a PrettyPrinting bug is to first update the Tools
4978        directory with exact replicas of files in UserInterface. Make changes
4979        and test with the debug page, and then transfer the files back to the
4980        inspector. This script helps automate those steps.
4981
4982        Reviewed by Cody Krieger.
4983
4984        * Scripts/update-codemirror-resources.rb:
4985        * Scripts/update-pretty-printer.rb: Added.
4986
49872013-04-05  Joseph Pecoraro  <pecoraro@apple.com>
4988
4989        Update the PrettyPrinting Tool with a few Debug changes.
4990
4991        Unreviewed tools change.
4992
4993        * Tools/PrettyPrinting/index.html:
4994        * Tools/PrettyPrinting/FormatterDebug.js:
4995        (.pad):
4996        (.debugToken):
4997        (Formatter.prototype.debug):
4998        Output null, undefined, or 'string' for tokens.
4999        Previously null and undefined output as '-'.
5000
50012013-04-05  Joseph Pecoraro  <pecoraro@apple.com>
5002
5003        Update the PrettyPrinting Tool with CodeMirror CSS changes.
5004
5005        Unreviewed tools change.
5006
5007        * Tools/PrettyPrinting/codemirror-additions.css: Added.
5008        * Tools/PrettyPrinting/codemirror.css:
5009        * Tools/PrettyPrinting/index.html:
5010
50112013-04-05  Timothy Hatcher  <timothy@apple.com>
5012
5013        Tweak Web Inspector's image cache database.
5014
5015        We only want to keep the image data around for the first use. These
5016        images are typically only used in one place. This keeps performance
5017        good during page load and frees memory that typically won't be reused.
5018
5019        Also add transaction error logging and a better expected database size.
5020
5021        Reviewed by Joseph Pecoraro.
5022
5023        * UserInterface/ImageUtilities.js:
5024        (_logSQLTransactionError):
5025        (_prefetchCachedImagesAndUpdate):
5026        (.restoreImageData):
5027        (restoreImageFromStorage):
5028
50292013-04-05  Joseph Pecoraro  <pecoraro@apple.com>
5030
5031        Update the PrettyPrinting Tool with new formatter changes.
5032
5033        Also some tweaks so that the Tools files are identical to the ones in
5034        the actual Web Inspector (UserInterface).
5035
5036        Unreviewed tools change.
5037
5038        * Tools/PrettyPrinting/CodeMirrorFormatters.js:
5039        * Tools/PrettyPrinting/Formatter.js:
5040        (Formatter.prototype.format):
5041        (Formatter.prototype._handleToken):
5042        (Formatter.prototype._handleEmptyLine):
5043        * Tools/PrettyPrinting/FormatterContentBuilder.js:
5044        (FormatterContentBuilder.prototype.appendNewline):
5045        (FormatterContentBuilder.prototype.appendMultipleNewlines):
5046        (FormatterContentBuilder.prototype.removeLastNewline):
5047        (FormatterContentBuilder.prototype._addFormattedLineEnding):
5048        * Tools/PrettyPrinting/FormatterDebug.js: Added.
5049        (Formatter.prototype.debug):
5050        * Tools/PrettyPrinting/Utilities.js: Added.
5051        * Tools/PrettyPrinting/codemirror.js:
5052        * Tools/PrettyPrinting/css.js:
5053        * Tools/PrettyPrinting/index.html:
5054        * Tools/PrettyPrinting/javascript.js:
5055
50562013-04-05  Joseph Pecoraro  <pecoraro@apple.com>
5057
5058        Win back performance in pretty-printing large files
5059
5060        With preserving newlines we lost a few ms. This wins back at
5061        least the same amount and a bit more on JavaScript (2-3ms).
5062
5063        Checking if the current token is a comment is a very common
5064        in our pretty printers. Only perform the work once, and pass
5065        the result around as needed to prevent duplicated work.
5066
5067        Reviewed by Timothy Hatcher.
5068
5069        * UserInterface/CodeMirrorFormatters.js:
5070        * UserInterface/Formatter.js:
5071        (Formatter.prototype._handleToken):
5072
50732013-04-05  Joseph Pecoraro  <pecoraro@apple.com>
5074
5075        <rdar://problem/13582023> Web Inspector removes blank lines in my JS when pretty printing
5076
5077        When pretty-printing already pretty code we did a poor job of preserving
5078        the nice extra whitespace the original code had. This preserves the empty
5079        (whitespace only) lines in the original code.
5080
5081        Because our pretty printer sometimes adds multiple newlines, like in CSS
5082        after each rule, we don't need to add yet another newline to just preserve
5083        a blank line from the original content. Handle that gracefully.
5084
5085        This introduces a minor performance regression (1-3ms in large content)
5086        but I think it is well worth it considering the results. Much prettier!
5087
5088        JavaScript Test:
5089
5090            Foo.prototype.f = function() {
5091              // ...
5092            }
5093
5094            Foo.prototype.g = function() {
5095              // ...
5096            }
5097
5098        CSS Test:
5099
5100            /* comment one */
5101          
5102            /* comment two */
5103
5104        Reviewed by Antoine Quint.
5105
5106        * UserInterface/Formatter.js:
5107        (Formatter.prototype.format):
5108        (Formatter.prototype._handleToken):
5109        (Formatter.prototype._handleEmptyLine):
5110        Call handleEmptyLine for whitespace only lines, and force
5111        append a newline unless the builder just had multiple.
5112
5113        * UserInterface/FormatterContentBuilder.js:
5114        (FormatterContentBuilder):
5115        (FormatterContentBuilder.prototype.appendNewline):
5116        (FormatterContentBuilder.prototype.appendMultipleNewlines):
5117        Helper for appending multiple newlines, to set some extra state.
5118
51192013-04-04  Joseph Pecoraro  <pecoraro@apple.com>
5120
5121        <rdar://problem/13583718> Pretty printing should not move comments to the end of the previous line
5122
5123        Previously we removed newlines before comments if they were after a
5124        semicolon. This was intended to keep comments on the same line as code.
5125        This could backfire if the comment was really on actually on the next
5126        line. So be more specific, and don't remove the previous newline if
5127        the comment is the first token on a line.
5128
5129        JavaScript Test:
5130
5131            function() {
5132              var a;
5133              // test
5134            }
5135
5136        CSS Test:
5137
5138            a {
5139              color: red;
5140              /* test */
5141            }
5142
5143        Reviewed by Timothy Hatcher.
5144
5145        * UserInterface/CodeMirrorFormatters.js:
5146        * UserInterface/Formatter.js:
5147        (Formatter.prototype.format):
5148        (Formatter.prototype._handleToken):
5149
51502013-04-05  Antoine Quint  <graouts@apple.com>
5151
5152        <rdar://problem/13472300> Layers in sidebar panel should use iconography
5153
5154        Refreshing the look of the Layers sidebar panel data grid nodes
5155        to use icons to identify the kind of layers presented (element,
5156        pseudo-element or reflection). Also, we mark the pseudo-element
5157        part of the CSS selector by displaying it in lighter text as well
5158        as showing a " � Reflection" extra label in the case of reflections.
5159        Finally, we also trim the text in the CSS selector label and shorten
5160        it to make room for the go-to arrow button should it be visible
5161        when hovering the data grid node.
5162
5163        Reviewed by Timothy Hatcher.
5164
5165        * Localizations/en.lproj/localizedStrings.js:
5166        * UserInterface/Images/PseudoElement.pdf: Added.
5167        * UserInterface/Images/Reflection.pdf: Added.
5168        * UserInterface/LayerTreeDataGridNode.js:
5169        (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
5170        (WebInspector.LayerTreeDataGridNode.prototype.set layer):
5171        (WebInspector.LayerTreeDataGridNode.prototype._createNodeCellContent):
5172        (WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
5173        * UserInterface/LayerTreeSidebarPanel.css:
5174        (.layer-tree.panel .data-grid table.data):
5175        (.layer-tree.panel .data-container tr):
5176        (.layer-tree.panel .data-container td > div):
5177        (.layer-tree.panel .data-container .name-column):
5178        (.layer-tree.panel .data-container .name-column .icon):
5179        (.layer-tree.panel .data-container tr.reflection .name-column .icon):
5180        (.layer-tree.panel .data-container tr.pseudo-element .name-column .icon):
5181        (.layer-tree.panel .data-container .name-column .label):
5182        (.layer-tree.panel .data-container tr:hover .name-column .label):
5183        (.layer-tree.panel .data-container .name-column .reflection):
5184        (.layer-tree.panel .data-container tr.selected .name-column .reflection):
5185        (.layer-tree.panel .data-container .go-to-arrow):
5186        (.layer-tree.panel .data-container tr:hover .go-to-arrow):
5187
51882013-04-04  Joseph Pecoraro  <pecoraro@apple.com>
5189
5190        <rdar://problem/13573165> Pressing Esc in a readOnly editor should still focus the quick console
5191
5192        Reviewed by Timothy Hatcher.
5193
5194        * UserInterface/EditingSupport.js:
5195        (WebInspector.isEventTargetAnEditableField):
5196
51972013-04-04  Joseph Pecoraro  <pecoraro@apple.com>
5198
5199        <rdar://problem/13580154> DOMTreeOutline.js:504: JS ERROR: TypeError: 'true' is not a function (evaluating 'this._contextMenuCallback(contextMenu, node)'
5200
5201        DOMTreeOutline constructors were passing 3 booleans. In the case of
5202        outlines in the Console it was passing "true" expecting that to provide
5203        a "Reveal Element" context menu item, but that mis-matched the
5204        constructor. Fix the error, and add back the context menu item.
5205
5206        Reviewed by Timothy Hatcher.
5207
5208        * UserInterface/DOMTreeOutline.js:
5209        (WebInspector.DOMTreeOutline):
5210        Update parameters.
5211
5212        (WebInspector.DOMTreeOutline.prototype.revealElement):
5213        (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
5214        Append a "Reveal Element" context menu item if needed.
5215
5216        * UserInterface/ObjectPropertiesSection.js:
5217        (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
5218        Update the string. We don't have a panel, the nav bar labels this "DOM Tree".
5219
52202013-04-04  Joseph Pecoraro  <pecoraro@apple.com>
5221
5222        ERROR URIError: URI error in FrameResourceManager.prototype.resourceForScript
5223
5224        decodeURI can throw a URIError, e.g. decodeURI("%"). Protect against
5225        this in FrameResourceManager. This method is meant to work with both
5226        already decoded and encoded URIs.
5227
5228        Reviewed by Timothy Hatcher.
5229
5230        * UserInterface/FrameResourceManager.js:
5231        (WebInspector.FrameResourceManager.prototype.resourceForScript):
5232        Wrap the code with decodeURI in a try/catch.
5233
52342013-04-04  Timothy Hatcher  <timothy@apple.com>
5235
5236        Fix opening the Web Inspector in Production builds.
5237
5238        A function declaration was pushed up next to a parenthesis when minified.
5239        This made the parser think we were trying to make a call. Adding a semicolon
5240        is all we need to make things work again when combined and minified.
5241
5242        <rdar://problem/13577591> REGRESSION (r50120-50124): Can't open Web Inspector
5243
5244        Reviewed by Ricky Mondello.
5245
5246        * UserInterface/MIMETypeUtilities.js:
5247        (WebInspector.fileExtensionForURL):
5248        (WebInspector.mimeTypeForFileExtension):
5249
52502013-04-04  Antoine Quint  <graouts@apple.com>
5251
5252        <rdar://problem/13570821> Reasons for compositing popover should adjust position if inspector window resizes
5253
5254        Allow for popovers to have their target frame updated independently
5255        of their content so we can efficiently update their position as the
5256        element for which a popover is presented changes position. Now that
5257        we have this support, we update the popover presentation when the
5258        window size changes and a popover is visible in the Layers sidebar
5259        panel.
5260
5261        Reviewed by Timothy Hatcher.
5262
5263        * UserInterface/Breakpoint.js:
5264        (WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
5265        Adopt the updated Popover API.
5266
5267        * UserInterface/LayerTreeSidebarPanel.js:
5268        (WebInspector.LayerTreeSidebarPanel):
5269        Track window resize events so that we may update the popover
5270        presentation as it changes.
5271
5272        (WebInspector.LayerTreeSidebarPanel.prototype._windowResized):
5273        Update the popover presentation in case there is a visible popover.
5274
5275        (WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
5276        Use the new _updatePopoverForSelectedNode() method as the callback.
5277
5278        (WebInspector.LayerTreeSidebarPanel.prototype._updatePopoverForSelectedNode):
5279        Adopt the updated Popover API and only set the popover's content
5280        should one be provided, ie. when the method is called as callback
5281        to _contentForPopover().
5282
5283        * UserInterface/Popover.js:
5284        (WebInspector.Popover):
5285        New private ivars to track some popover presentation state.
5286
5287        (WebInspector.Popover.prototype.get visible):
5288        New public property to let clients check on popover visibility.
5289
5290        (WebInspector.Popover.prototype.set content):
5291        (WebInspector.Popover.prototype.present):
5292        New public property and method signature to let clients set the
5293        content of the popover independently of its presentation attributes.
5294
5295        (WebInspector.Popover.prototype._update):
5296        New private method called to update the presentation state
5297        of the popover and basically the old content of the present()
5298        method with use of the presentation ivars instead of method
5299        arguments and some optimizations to check that we only update
5300        the content and draw the canvas background should they have
5301        changed.
5302
5303        * UserInterface/SourceCodeTextEditor.js:
5304        (WebInspector.SourceCodeTextEditor.prototype._showPopover):
5305        Adopt the updated Popover API.
5306
53072013-04-04  Timothy Hatcher  <timothy@apple.com>
5308
5309        Make ContentViewContainer robust against null/undefined elements in contentView.scrollableElements.
5310
5311        DatabaseTableContentView can return a null element when the table is empty, and this causes exceptions.
5312
5313        Reviewed by Antoine Quint.
5314
5315        * UserInterface/ContentViewContainer.js:
5316        (WebInspector.ContentViewContainer.prototype._saveScrollPositionsForContentView):
5317        (WebInspector.ContentViewContainer.prototype._restoreScrollPositionsForContentView):
5318
53192013-04-04  Timothy Hatcher  <timothy@apple.com>
5320
5321        Don't use localStorage to cache generated images in the Web Inspector.
5322
5323        This migrates ImageUtilities off localStorage to a SQL database.
5324
5325        <rdar://problem/13574226> Web Inspector breaks when file:/// localStorage hits 5MB limit
5326
5327        Rubber-stamped by Antoine Quint.
5328
5329        * UserInterface/ImageUtilities.js:
5330        (_devicePixelRatioChanged):
5331        (_registerGeneratedImageUpdateFunction):
5332        (_logSQLError):
5333        (_prefetchCachedImagesAndUpdate.complete):
5334        (_prefetchCachedImagesAndUpdate._generatedImageCacheDatabase.transaction):
5335        (_prefetchCachedImagesAndUpdate):
5336        (restoreImageFromStorage):
5337        (generateColoredImagesForCSS.restoreImages):
5338        (generateColoredImagesForCSS.restoreImages.restoreActiveImages):
5339        (generateColoredImagesForCSS.restoreImage):
5340        (generateColoredImagesForCSS.update):
5341        (generateColoredImagesForCSS.generateImage):
5342        (generateEmbossedImages):
5343        (generateEmbossedImages.generateImages):
5344        (generateEmbossedImages.generateImages.generateActiveImages):
5345
53462013-04-04  Antoine Quint  <graouts@apple.com>
5347
5348        <rdar://problem/13570779> Reasons for compositing popover in layers sidebar is poorly aligned with selected datagrid row
5349
5350        Also apply padding to the target frame size, not just the origin, and
5351        adjust the padding down to 2 to match the padding used for breakpoints.
5352
5353        Reviewed by Timothy Hatcher.
5354
5355        * UserInterface/LayerTreeSidebarPanel.js:
5356        (WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
5357
53582013-04-03  Joseph Pecoraro  <pecoraro@apple.com>
5359
5360        <rdar://problem/13573798> REGRESSION: CodeMirror editor doesn't refresh when split console is hidden and more of the content view is visible
5361
5362        Reviewed by Timothy Hatcher.
5363
5364        * UserInterface/QuickConsole.js:
5365        (WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged):
5366        Trigger a DidResize event because the console would have changed
5367        its visible size.
5368
53692013-04-03  Joseph Pecoraro  <pecoraro@apple.com>
5370
5371        <rdar://problem/13474739> Respect sourcesContent in SourceMaps for SourceMapResources
5372
5373        If the resource's contents are available via the Source Map's
5374        sourcesContent array, then use them. Otherwise, go the normal path of
5375        downloading the resource. Because neither path can get the MIME type of
5376        the resource right now, fallback to trying to determine the MIME type
5377        from the resource's file extension.
5378
5379        Reviewed by Timothy Hatcher.
5380
5381        * UserInterface/Main.html:
5382        * UserInterface/MIMETypeUtilities.js: Added.
5383        (WebInspector.fileExtensionForURL):
5384        (WebInspector.mimeTypeForFileExtension):
5385        Helpers for extensions and MIME types.
5386
5387        * UserInterface/SourceMapResource.js:
5388        (WebInspector.SourceMapResource.prototype._requestResourceAsynchronously):
5389        Check for embedded sourcesContent content, and determine the MIME type
5390        from the file extension.
5391
5392        * UserInterface/Resource.js:
5393        Be sure to give types to some of the MIME types for CodeMirror supported
5394        types, which may show up as SourceMap sources.
5395
53962013-04-03  Joseph Pecoraro  <pecoraro@apple.com>
5397
5398        ERROR: console.assert(alternateImage) in ToggleButtonNavigationItem.js:4
5399
5400        Remove assert that there must be an alternateImage. The undock button
5401        does not have an alternate image, and this assert would trigger each
5402        time the inspector was opened.
5403
5404        Reviewed by Timothy Hatcher.
5405
5406        * UserInterface/ToggleButtonNavigationItem.js:
5407        (WebInspector.ToggleButtonNavigationItem):
5408
54092013-04-03  Jessie Berlin  <jberlin@apple.com>
5410
5411        Ran update-safari-localizable-strings.
5412
5413        * Localizations/en.lproj/localizedStrings.js:
5414
54152013-04-03  Timothy Hatcher  <timothy@apple.com>
5416
5417        Add switch to activate / deactivate all breakpoints.
5418
5419        <rdar://problem/11329057> REGRESSION (Safari 6): Switch to activate / deactivate all
5420        breakpoints is missing (debugger)
5421
5422        Reviewed by Joseph Pecoraro.
5423
5424        * Localizations/en.lproj/localizedStrings.js: Updated.
5425        * UserInterface/Breakpoint.js:
5426        (WebInspector.Breakpoint.prototype.get resolved):
5427        Check DebuggerManager.breakpointsEnabled. This is the easiest approach to get the gray
5428        icons for breakpoints in all the right places without adding checks at all call sites.
5429
5430        * UserInterface/DebuggerManager.js:
5431        (WebInspector.DebuggerManager):
5432        (WebInspector.DebuggerManager.prototype.get breakpointsEnabled):
5433        (WebInspector.DebuggerManager.prototype.set breakpointsEnabled):
5434        (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
5435        Check the breakpointsEnabled setting when updating the break on exception state.
5436
5437        * UserInterface/DebuggerSidebarPanel.css:
5438        (.sidebar > .panel.debugger .breakpoint-toggle): Added.
5439        (.sidebar > .panel.debugger .breakpoint-toggle.enabled): Added.
5440
5441        * UserInterface/DebuggerSidebarPanel.js:
5442        (WebInspector.DebuggerSidebarPanel):
5443        (WebInspector.DebuggerSidebarPanel.prototype._breakpointsToggleButtonClicked):
5444        Added a button to the Breakpoints section header.
5445
54462013-04-03  Antoine Quint  <graouts@apple.com>
5447
5448        <rdar://problem/13566082> DOMTreeManager.highlightRect() does not take scrolling into account
5449
5450        Add support for the new "usePageCoordinates" argument to DOM.highlightRect()
5451        and set it to true when highlighting the bounds of generated layers.
5452
5453        Reviewed by Timothy Hatcher.
5454
5455        * UserInterface/DOMTreeManager.js:
5456        (WebInspector.DOMTreeManager.prototype.highlightRect):
5457        * UserInterface/InspectorBackendCommands.js:
5458        * UserInterface/LayerTreeSidebarPanel.js:
5459        (WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
5460
54612013-04-03  Antoine Quint  <graouts@apple.com>
5462
5463        <rdar://problem/13105224> Reflect data grid timeline filters in the Timeline overview
5464
5465        Apply the filtering of records directly into the timelineOverviewRecordsWithType()
5466        method which is the method used by the TimelineOverview to gather data. Additionally,
5467        we now update the content of the TimelineOverview when the filters applied to one of
5468        the data grids change such that the timeline overview is kept in sync.
5469
5470        Reviewed by Timothy Hatcher.
5471
5472        * UserInterface/TimelinesContentView.js:
5473        (WebInspector.TimelinesContentView.prototype.timelineOverviewRecordsWithType):
5474        (WebInspector.TimelinesContentView.prototype._dataGridFiltersDidChange):
5475
54762013-04-03  Antoine Quint  <graouts@apple.com>
5477
5478        <rdar://problem/13557373> Layers panel doesn't know how to account for anonymous layers
5479
5480        Handle the new "isAnonymous" property on the protocol and the renamed
5481        "pseudoElement" property. We also format use of pseudo-elements better
5482        and handle the somewhat unlikely possibility that we would deal with
5483        layers with unknown nodes.
5484
5485        Reviewed by Timothy Hatcher.
5486
5487        * Localizations/en.lproj/localizedStrings.js:
5488        New localized string for "Unknown node".
5489
5490        * UserInterface/LayerTreeDataGridNode.js:
5491        (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
5492        Update the "no-node" class on the data grid node's element.
5493
5494        (WebInspector.LayerTreeDataGridNode.prototype.set layer):
5495        Set an "Unknown node" label for layers with an unknown node, which
5496        shouldn't really happen, but we should be prepared for the possibility.
5497        Seeing this message means that the agent should be taught how to deal
5498        with a probably edge case. We also update the code to deal with the
5499        "pseudoElement" property instead of "pseudoClass" to match the protocol
5500        change. Finally, we also update the "no-node" class on the data grid's node.
5501
5502        (WebInspector.LayerTreeDataGridNode.prototype._updateDOMNodeAvailability):
5503        New method to update the "no-node" class on the data grid's node so
5504        that we may hide the go-to arrow button in the case where there is
5505        no associated node.
5506
5507        * UserInterface/LayerTreeSidebarPanel.css:
5508        (.layer-tree.panel .data-grid tr.no-node .go-to-arrow):
5509        Hide the go-to arrow button in the case where there is no associated node.
5510
5511        * UserInterface/LayerTreeSidebarPanel.js:
5512        (WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
5513        Also use highlightRect() in the case where the layer is anonymous.
5514
55152013-04-02  Joseph Pecoraro  <pecoraro@apple.com>
5516
5517        <rdar://problem/13548470> REGRESSION: Web inspector hung after searching for "swf"
5518
5519        Reviewed by Timothy Hatcher.
5520
5521        * UserInterface/TextEditor.js:
5522        (WebInspector.TextEditor.prototype._scrollIntoViewCentered):
5523        Be more careful providing a center margin when the text size and editor
5524        height can be fractional. If the margin is greater than half the size of
5525        the editor, CodeMirror gets stuck in an infinite loop.
5526
55272013-04-02  Joseph Pecoraro  <pecoraro@apple.com>
5528
5529        ERROR: TypeError: 'undefined' is not an object (evaluating 'this._profileView.showTimeAsPercent.value')
5530
5531        When selecting a CSS Profile, displayProfile could trigger from the
5532        superclass constructor before the showTimeAsPercent Setting was
5533        initialized, causing this error. ProfileView's are assumed to have
5534        this property, and the ProfileView constructor had an unused
5535        parameter, which looks like it was intended for this purpose.
5536
5537        Reviewed by Timothy Hatcher.
5538
5539        * UserInterface/CSSSelectorProfileView.js:
5540        (WebInspector.CSSSelectorProfileView):
5541        * UserInterface/JavaScriptProfileView.js:
5542        (WebInspector.JavaScriptProfileView):
5543        * UserInterface/ProfileView.js:
5544        (WebInspector.ProfileView):
5545
55462013-04-02  Timothy Hatcher  <timothy@apple.com>
5547
5548        Update toolbar layout for recent flex box changes.
5549
5550        <rdar://problem/13556024>
5551
5552        Reviewed by Joseph Pecoraro.
5553
5554        * UserInterface/Toolbar.css:
5555        (.toolbar .item-section): Added min-width: -webkit-min-content.
5556        min-width now defaults to 0, but we need the sections to stop at the
5557        content size so the JavaScript layout function can do the right thing.
5558
55592013-04-02  Antoine Quint  <graouts@apple.com>
5560
5561        <rdar://problem/13545256> Automatic selection of a CSS profile upon finishing recording fails to show any content
5562
5563        Make sure we set the "showAsTimePercent" property before calling super since
5564        it may be used by the generated WebInspector.CSSSelectorDataGridNode in 
5565        displayProfile() which would be called in the super call in the case where
5566        the view is created as the profile finishes recording.
5567
5568        Reviewed by Timothy Hatcher.
5569
5570        * UserInterface/CSSSelectorProfileView.js:
5571        (WebInspector.CSSSelectorProfileView):
5572
55732013-04-01  Timothy Hatcher  <timothy@apple.com>
5574
5575        Fix the icons for the exception breakpoints.
5576
5577        <rdar://problem/13552326> REGRESSION: Exception breakpoints are missing custom icons
5578
5579        Reviewed by Joseph Pecoraro.
5580
5581        * UserInterface/DebuggerSidebarPanel.js:
5582        (WebInspector.DebuggerSidebarPanel.ExceptionIconStyleClassName): Added.
5583        This property was expected to exist but got removed at some point.
5584        BreakpointTreeElement property handled undefined and used the generic icon.
5585
55862013-04-01  Timothy Hatcher  <timothy@apple.com>
5587
5588        Compressed PNGs with pngcrush and further reduced the size of some PDFs by re-exporting them. Removed some unused images too.
5589
5590        This goes from 2.1 MB of images down to 1.2 MB.
5591
5592        Rubber-stamped by Joseph Pecoraro.
5593
5594        * UserInterface/Images/ApplicationCache.png:
5595        * UserInterface/Images/ApplicationCache@2x.png:
5596        * UserInterface/Images/ApplicationCacheManifest.png:
5597        * UserInterface/Images/ApplicationCacheManifest@2x.png:
5598        * UserInterface/Images/Breakpoint.png:
5599        * UserInterface/Images/Breakpoint@2x.png:
5600        * UserInterface/Images/BreakpointInactive.png:
5601        * UserInterface/Images/BreakpointInactive@2x.png:
5602        * UserInterface/Images/ClippingGeneric.png:
5603        * UserInterface/Images/ClippingGeneric@2x.png:
5604        * UserInterface/Images/ClippingJS.png:
5605        * UserInterface/Images/ClippingJS@2x.png:
5606        * UserInterface/Images/Close.pdf:
5607        * UserInterface/Images/Colors.png:
5608        * UserInterface/Images/Colors@2x.png:
5609        * UserInterface/Images/Cookie.png:
5610        * UserInterface/Images/Cookie@2x.png:
5611        * UserInterface/Images/Crosshair.pdf:
5612        * UserInterface/Images/DOMCharacterData.pdf:
5613        * UserInterface/Images/DOMComment.pdf:
5614        * UserInterface/Images/DOMDocument.pdf:
5615        * UserInterface/Images/DOMDocumentType.pdf:
5616        * UserInterface/Images/DOMElement.pdf:
5617        * UserInterface/Images/DOMNode.pdf:
5618        * UserInterface/Images/DOMTextNode.pdf:
5619        * UserInterface/Images/DOMTree.pdf:
5620        * UserInterface/Images/Database.png:
5621        * UserInterface/Images/Database@2x.png:
5622        * UserInterface/Images/DatabaseTable.png:
5623        * UserInterface/Images/DatabaseTable@2x.png:
5624        * UserInterface/Images/DisclosureTriangleSmallClosed.pdf:
5625        * UserInterface/Images/DisclosureTriangleSmallOpen.pdf:
5626        * UserInterface/Images/DockBottom.pdf:
5627        * UserInterface/Images/DockRight.pdf:
5628        * UserInterface/Images/DocumentCSS.png:
5629        * UserInterface/Images/DocumentCSS@2x.png:
5630        * UserInterface/Images/DocumentFont.png:
5631        * UserInterface/Images/DocumentFont@2x.png:
5632        * UserInterface/Images/DocumentGeneric.png:
5633        * UserInterface/Images/DocumentGeneric@2x.png:
5634        * UserInterface/Images/DocumentImage.png:
5635        * UserInterface/Images/DocumentImage@2x.png:
5636        * UserInterface/Images/DocumentJS.png:
5637        * UserInterface/Images/DocumentJS@2x.png:
5638        * UserInterface/Images/DocumentMarkup.png:
5639        * UserInterface/Images/DocumentMarkup@2x.png:
5640        * UserInterface/Images/EventListener.pdf:
5641        * UserInterface/Images/Exception.pdf:
5642        * UserInterface/Images/FilterFieldGlyph.pdf:
5643        * UserInterface/Images/FolderGeneric.png:
5644        * UserInterface/Images/FolderGeneric@2x.png:
5645        * UserInterface/Images/Function.pdf:
5646        * UserInterface/Images/HierarchicalNavigationItemChevron.pdf:
5647        * UserInterface/Images/InstructionPointer.png:
5648        * UserInterface/Images/InstructionPointer@2x.png:
5649        * UserInterface/Images/LeftSidebarClose.pdf: Removed.
5650        * UserInterface/Images/LeftSidebarOpen.pdf: Removed.
5651        * UserInterface/Images/LessColumns.pdf:
5652        * UserInterface/Images/LocalStorage.png:
5653        * UserInterface/Images/LocalStorage@2x.png:
5654        * UserInterface/Images/Log.png:
5655        * UserInterface/Images/Log@2x.png:
5656        * UserInterface/Images/MoreColumns.pdf:
5657        * UserInterface/Images/NavigationItemAngleBrackets.pdf:
5658        * UserInterface/Images/NavigationItemBug.pdf:
5659        * UserInterface/Images/NavigationItemCurleyBraces.pdf:
5660        * UserInterface/Images/NavigationItemFile.pdf:
5661        * UserInterface/Images/NavigationItemLayers.pdf:
5662        * UserInterface/Images/NavigationItemLog.pdf:
5663        * UserInterface/Images/NavigationItemRuler.pdf: Removed.
5664        * UserInterface/Images/NavigationItemStopwatch.pdf:
5665        * UserInterface/Images/NavigationItemStorage.pdf:
5666        * UserInterface/Images/Network.png:
5667        * UserInterface/Images/Network@2x.png:
5668        * UserInterface/Images/NetworkBarBlue.png:
5669        * UserInterface/Images/NetworkBarBlue@2x.png:
5670        * UserInterface/Images/NetworkBarGray.png:
5671        * UserInterface/Images/NetworkBarGray@2x.png:
5672        * UserInterface/Images/NetworkBarGreen.png:
5673        * UserInterface/Images/NetworkBarGreen@2x.png:
5674        * UserInterface/Images/NetworkBarLabelCalloutLeft.pdf:
5675        * UserInterface/Images/NetworkBarLabelCalloutRight.pdf:
5676        * UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.pdf:
5677        * UserInterface/Images/NetworkBarLabelCalloutWhiteRight.pdf:
5678        * UserInterface/Images/NetworkBarOrange.png:
5679        * UserInterface/Images/NetworkBarOrange@2x.png:
5680        * UserInterface/Images/NetworkBarPurple.png:
5681        * UserInterface/Images/NetworkBarPurple@2x.png:
5682        * UserInterface/Images/NetworkBarRed.png:
5683        * UserInterface/Images/NetworkBarRed@2x.png:
5684        * UserInterface/Images/NetworkBarWhiteFlat.png:
5685        * UserInterface/Images/NetworkBarWhiteFlat@2x.png:
5686        * UserInterface/Images/NetworkBarYellow.png:
5687        * UserInterface/Images/NetworkBarYellow@2x.png:
5688        * UserInterface/Images/NetworkHollowBarBlue.png:
5689        * UserInterface/Images/NetworkHollowBarBlue@2x.png:
5690        * UserInterface/Images/NetworkHollowBarGray.png:
5691        * UserInterface/Images/NetworkHollowBarGray@2x.png:
5692        * UserInterface/Images/NetworkHollowBarGreen.png:
5693        * UserInterface/Images/NetworkHollowBarGreen@2x.png:
5694        * UserInterface/Images/NetworkHollowBarOrange.png:
5695        * UserInterface/Images/NetworkHollowBarOrange@2x.png:
5696        * UserInterface/Images/NetworkHollowBarPurple.png:
5697        * UserInterface/Images/NetworkHollowBarPurple@2x.png:
5698        * UserInterface/Images/NetworkHollowBarRed.png:
5699        * UserInterface/Images/NetworkHollowBarRed@2x.png:
5700        * UserInterface/Images/NetworkHollowBarYellow.png:
5701        * UserInterface/Images/NetworkHollowBarYellow@2x.png:
5702        * UserInterface/Images/Pause.pdf:
5703        * UserInterface/Images/Profile.png:
5704        * UserInterface/Images/Profile@2x.png:
5705        * UserInterface/Images/Recording.png:
5706        * UserInterface/Images/RecordingHovered.png:
5707        * UserInterface/Images/RecordingHovered@2x.png:
5708        * UserInterface/Images/RecordingStopped.png:
5709        * UserInterface/Images/RecordingStopped@2x.png:
5710        * UserInterface/Images/ResultLine.pdf:
5711        * UserInterface/Images/Resume.pdf:
5712        * UserInterface/Images/RightSidebarClose.pdf: Removed.
5713        * UserInterface/Images/RightSidebarOpen.pdf: Removed.
5714        * UserInterface/Images/Script.png:
5715        * UserInterface/Images/Script@2x.png:
5716        * UserInterface/Images/SessionStorage.png:
5717        * UserInterface/Images/SessionStorage@2x.png:
5718        * UserInterface/Images/SourceCode.pdf:
5719        * UserInterface/Images/StepInto.pdf:
5720        * UserInterface/Images/StepOut.pdf:
5721        * UserInterface/Images/StepOver.pdf:
5722        * UserInterface/Images/Stopwatch.png:
5723        * UserInterface/Images/Stopwatch@2x.png:
5724        * UserInterface/Images/StyleRuleAuthor.pdf:
5725        * UserInterface/Images/StyleRuleInherited.pdf:
5726        * UserInterface/Images/StyleRuleInheritedElement.pdf:
5727        * UserInterface/Images/StyleRuleInspector.pdf:
5728        * UserInterface/Images/StyleRuleUser.pdf:
5729        * UserInterface/Images/StyleRuleUserAgent.pdf:
5730        * UserInterface/Images/TimelineBarBlue.png:
5731        * UserInterface/Images/TimelineBarBlue@2x.png:
5732        * UserInterface/Images/TimelineBarOrange.png:
5733        * UserInterface/Images/TimelineBarOrange@2x.png:
5734        * UserInterface/Images/TimelineBarPurple.png:
5735        * UserInterface/Images/TimelineBarPurple@2x.png:
5736        * UserInterface/Images/ToggleArrowDown.pdf: Removed.
5737        * UserInterface/Images/ToggleArrowUp.pdf: Removed.
5738        * UserInterface/Images/Undock.pdf:
5739        * UserInterface/Images/UserInputPrompt.pdf:
5740        * UserInterface/Images/UserInputPromptPrevious.pdf:
5741        * UserInterface/Images/UserInputResult.pdf:
5742
57432013-03-31  Timothy Hatcher  <timothy@apple.com>
5744
5745        Allow changing Web Inspector dock sides without undocking first.
5746
5747        Holding option will change the undock button to the opposite attachment side. When clicked
5748        the button will change to the other attachment side. Holding option with allow undock. This
5749        keeps the last used option available if the user hardly undocks but frequently changes sides.
5750
5751        rdar://problem/13543127
5752
5753        Reviewed by Antoine Quint.
5754
5755        * Localizations/en.lproj/localizedStrings.js: Updated.
5756
5757        * UserInterface/Images/Dock.pdf: Removed.
5758        * UserInterface/Images/DockBottom.pdf: Added.
5759        * UserInterface/Images/DockRight.pdf: Added.
5760
5761        * UserInterface/Main.js:
5762        (WebInspector.loaded): Added key event listeners.
5763        (WebInspector.contentLoaded): Use ToggleControlToolbarItem for undock button.
5764        (WebInspector._windowKeyDown): Added.
5765        (WebInspector._windowKeyUp): Added.
5766
5767        (WebInspector._undock):
5768        (WebInspector._updateDockNavigationItems):
5769        Set and check toggled state for undock button and do the right thing.
5770
5771        * UserInterface/ToggleButtonNavigationItem.js:
5772        (WebInspector.ToggleButtonNavigationItem.prototype.set alternateToolTip): Added.
5773        (WebInspector.ToggleButtonNavigationItem.prototype.set alternateImage): Added.
5774
57752013-04-01  Joseph Pecoraro  <pecoraro@apple.com>
5776
5777        <rdar://problem/13492413> Improve line number subtitle for SourceMap Breakpoints in Debugger sidebar
5778
5779        If a breakpoint is in a SourceMapResource, there is a subtitle showing
5780        the original location. If the original location is in a formatted file
5781        show the italics formatted location that you would jump to. Don't show
5782        a subtitle for breakpoints in formatted resources, just the Line:Column.
5783
5784        Reviewed by Timothy Hatcher.
5785
5786        * UserInterface/BreakpointTreeElement.css:
5787        (.item.breakpoint .subtitle.formatted-location):
5788        Italics if the subtitle is displaying a formatted location.
5789
5790        * UserInterface/BreakpointTreeElement.js:
5791        (WebInspector.BreakpointTreeElement):
5792        (WebInspector.BreakpointTreeElement.prototype._updateTitles):
5793        For SourceMap resources, show the formatted / original location.
5794        Always have the real original location in the tooltip.
5795
5796        (WebInspector.BreakpointTreeElement.prototype._breakpointLocationDidChange):
5797        Update the titles if any location changes (the original file may
5798        have been formatted, and we'd want to update for that).
5799
5800        * UserInterface/GeneralTreeElement.js:
5801        (WebInspector.GeneralTreeElement.prototype.get subtitleElement):
5802        Be sure to create the title element the subtitle gets appended to.
5803
5804        * UserInterface/ResourceSidebarPanel.js:
5805        (WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeLocation):
5806        This essentially means, show location in the editor.
5807
5808        * UserInterface/SourceCodeLocation.js:
5809        (WebInspector.SourceCodeLocation.prototype.formattedLocationString):
5810        Helper for getting the display string for the formatted location.
5811
58122013-04-01  Joseph Pecoraro  <pecoraro@apple.com>
5813
5814        Avoid some asserts that can happen when reformatting files with breakpoints.
5815
5816        Reviewed by Timothy Hatcher.
5817
5818        * UserInterface/SourceCodeTextEditor.js:
5819        (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointLocation):
5820        * UserInterface/TextEditor.js:
5821        (WebInspector.TextEditor.prototype.updateStyles):
5822        (WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
5823
58242013-03-29  Timothy Hatcher  <timothy@apple.com>
5825
5826        Add CSS as a known source type.
5827
5828        <rdar://problem/13498380> ASSERTION: IssueMessage.js:64: Unknown issue source: css
5829
5830        Reviewed by Ricky Mondello.
5831
5832        * UserInterface/IssueMessage.js:
5833        (WebInspector.IssueMessage):
5834
58352013-03-29  Timothy Hatcher  <timothy@apple.com>
5836
5837        Don't try to toggle visibility if a toggle is already pending.
5838
5839        <rdar://problem/13401011> New Shortcut to hide/show elements while
5840        inspecting breaks if you leave the key pressed.
5841
5842        Reviewed by Joseph Pecoraro.
5843
5844        * UserInterface/DOMTreeOutline.js:
5845        (WebInspector.DOMTreeOutline.prototype._hideElement.toggleProperties):
5846        (WebInspector.DOMTreeOutline.prototype._hideElement):
5847
58482013-03-29  Joseph Pecoraro  <pecoraro@apple.com>
5849
5850        Avoid a SourceMapResource Folder chain of single level folders.
5851
5852        On of my test cases, <http://dev.fontdragr.com>, a resource with
5853        a source map has all its source map resources in a "src" folder.
5854        This creates a poor experience in the resources sidebar. When
5855        expanding the resource, there is just a "src" folder. In those
5856        cases, and in general if there is one long chain of folders,
5857        don't even use folders.
5858
5859        Reviewed by Timothy Hatcher.
5860
5861        * UserInterface/SourceCodeTreeElement.js:
5862        (WebInspector.SourceCodeTreeElement.prototype.onpopulate.folderHasOnlyResourceChildren):
5863        (WebInspector.SourceCodeTreeElement.prototype.onpopulate):
5864        (WebInspector.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath):
5865
58662013-03-28  Joseph Pecoraro  <pecoraro@apple.com>
5867
5868        <rdar://problem/13310717> Source Maps: should display folder hierarchy in the sidebar
5869
5870        Resolve "./" and "../" in URL paths in parseURL. Leave the path
5871        unadjusted if we get to a point we don't know how to handle, e.g.
5872        too many "../" components.
5873
5874        Reviewed by Timothy Hatcher.
5875
5876        * UserInterface/SourceCodeTreeElement.js:
5877        (WebInspector.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath):
5878        * UserInterface/Utilities.js:
5879
58802013-03-28  Joseph Pecoraro  <pecoraro@apple.com>
5881
5882        <rdar://problem/13310717> Source Maps: should display folder hierarchy in the sidebar
5883
5884        Often SourceMap's include sources in a hierarchy. We should create
5885        a folder structure for that hierarchy in the resources sidebar. When
5886        the SourceMap is part of a Frame, we don't do this, we still just
5887        sort SourceMapResources into their associated type folder.
5888
5889        Reviewed by Timothy Hatcher.
5890
5891        * UserInterface/ResourceTreeElement.js:
5892        (WebInspector.ResourceTreeElement.compareFolderAndResourceTreeElements):
5893        Added a generic sort function that can take both Folder and Resource
5894        tree elements. It sorts folders first, by name, then resources by their
5895        normal sort order (type and name).
5896
5897        * UserInterface/SourceMap.js:
5898        (WebInspector.SourceMap.prototype.get sourceMappingURLBasePath):
5899        When the source map resolves its sources it builds an absolute URL
5900        using the partial URL (map.sourceRoot + map.source[i]) and base URL
5901        of the provided sourceMappingURL. We can use this "base path" to
5902        get only the individual source's relative subpath later on.
5903
5904        * UserInterface/SourceMapResource.js:
5905        (WebInspector.SourceMapResource.prototype.get sourceMapRelativeSubpath):
5906        Get the subpath relative to the SourceMap's url. This allows us
5907        to get the path components and build a directory tree.
5908
5909        * UserInterface/SourceCodeTreeElement.js:
5910        (WebInspector.SourceCodeTreeElement.prototype.onpopulate):
5911        (WebInspector.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath):
5912        (WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
5913        Given a subpath, create folders as needed and insert the actual
5914        SourceMapResourceTreeElement inside the deepest folder. Cache
5915        folders along the way so we don't re-create folders, and so that
5916        we can look them up again later if needed.
5917
59182013-03-28  Timothy Hatcher  <timothy@apple.com>
5919
5920        Combine and minify CodeMirror scripts and styles in Production builds.
5921
5922        <rdar://problem/13446918>
5923
5924        Reviewed by Joseph Pecoraro.
5925
5926        * Scripts/combine-resources.pl:
5927        * Scripts/copy-user-interface-resources.sh:
5928
59292013-03-28  Joseph Pecoraro  <pecoraro@apple.com>
5930
5931        Unreviewed. Missing semicolon causing warning when stripping asserts.
5932
5933        * UserInterface/TextEditor.js:
5934        (WebInspector.TextEditor.prototype.updateBreakpointLineAndColumn):
5935
59362013-03-28  Joseph Pecoraro  <pecoraro@apple.com>
5937
5938        <rdar://problem/13412969> Reveal line centered hits a code mirror exception unless put in setTimeout
5939
5940        CodeMirror issue has been fixed. Remove the "delay" form paths that
5941        would have hit the exception before. They no longer do.
5942
5943        Reviewed by Timothy Hatcher.
5944
5945        * UserInterface/TextEditor.js:
5946        (WebInspector.TextEditor.prototype.revealAndHighlightLine):
5947        (WebInspector.TextEditor.prototype.revealLine):
5948        (WebInspector.TextEditor.prototype._revealPendingLineIfPossible):
5949        (WebInspector.TextEditor.prototype._scrollIntoViewCentered):
5950
59512013-03-28  Joseph Pecoraro  <pecoraro@apple.com>
5952
5953        <rdar://problem/13412969> Reveal line centered hits a code mirror exception unless put in setTimeout
5954        <rdar://problem/13512430> Idle Inspector recalculates styles a few times a second because of CodeMirror
5955
5956        Update CodeMirror to trunk to get a few recent fixes.
5957
5958        Reviewed by Timothy Hatcher.
5959
5960        * UserInterface/External/CodeMirror/codemirror.js:
5961        * UserInterface/External/CodeMirror/sass.js:
5962
59632013-03-28  Joseph Pecoraro  <pecoraro@apple.com>
5964
5965        Add a small script to update CodeMirror resources.
5966
5967        Reviewed by Cody Krieger.
5968
5969        * Scripts/update-codemirror-resources.rb: Added.
5970
59712013-03-28  Jessie Berlin  <jberlin@apple.com>
5972
5973        Ran update-safari-localizable-strings.
5974
5975        * Localizations/en.lproj/localizedStrings.js:
5976
59772013-03-28  Antoine Quint  <graouts@apple.com>
5978
5979        <rdar://problem/13505485> REGRESSION: Can't copy links from the console via the context menu
5980
5981        Let the default context menu show if the user targeted an
5982        <a> element that is not a console message URL.
5983
5984        Reviewed by Timothy Hatcher.
5985
5986        * UserInterface/LogContentView.js:
5987        (WebInspector.LogContentView.prototype._handleContextMenuEvent):
5988
59892013-03-28  Antoine Quint  <graouts@apple.com>
5990
5991        <rdar://problem/13526203> Recording profiles in the Instruments sidebar should show a spinner
5992
5993        Remove the "Recording" prefix for profiles that are recording and
5994        instead use an indeterminate spinner to indicate the profile is
5995        recording.
5996
5997        Reviewed by Timothy Hatcher.
5998
5999        * Localizations/en.lproj/localizedStrings.js:
6000        Remove unused string "Recording JavaScript Profile %s\u2026".
6001
6002        * UserInterface/InstrumentSidebarPanel.js:
6003        (WebInspector.InstrumentSidebarPanel.prototype._profilingEnded):
6004        Remove the indeterminate spinner from the tree element representing
6005        the profile that finished recording.
6006
6007        (WebInspector.InstrumentSidebarPanel.prototype._titleForProfile):
6008        For profiles that are presently recording, simulate the pending
6009        addition of the tree element by adding 1 to the generated number.
6010        This ensures that the generated title matches the one that will
6011        appear as this method is called again upon recording completion.
6012
6013        (WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded):
6014        Add an indeterminate spinner to the tree element representing
6015        the newly-added profile.
6016
6017        * UserInterface/ProfileManager.js:
6018        (WebInspector.ProfileManager.prototype.startProfilingCSSSelectors):
6019        (WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors):
6020        (WebInspector.ProfileManager.prototype.profileWasStartedFromConsole):
6021        (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
6022        Use the final title directly since we're now using an indeterminate
6023        spinner to indicate a profile is recording.
6024
60252013-03-28  Antoine Quint  <graouts@apple.com>
6026
6027        <rdar://problem/13525984> Profile name in navigation bar breadcrumbs doesn't update when recording completes
6028
6029        Propagate an event when a GeneralTreeElement's "mainTitle"
6030        property changes such that the NavigationBar may eventually
6031        pick it up and update itself.
6032
6033        Reviewed by Timothy Hatcher.
6034
6035        * UserInterface/GeneralTreeElement.js:
6036        (WebInspector.GeneralTreeElement.prototype.set mainTitle):
6037        Dispatch the new MainTitleDidChange event.
6038
6039        * UserInterface/GeneralTreeElementPathComponent.js:
6040        (WebInspector.GeneralTreeElementPathComponent):
6041        Register a listener for the MainTitleDidChange event on the
6042        provided GeneralTreeElement.
6043
6044        (WebInspector.GeneralTreeElementPathComponent.prototype._mainTitleDidChange):
6045        Update the "displayName" property to match the GeneralTreeElement's
6046        updated "mainTitle" property.
6047
6048        * UserInterface/TreeOutline.js:
6049        (TreeOutline):
6050        (TreeElement):
6051        Make both TreeOutline and TreeElement subclasses of
6052        WebInspector.Object such that they may dispatch events.
6053
60542013-03-28  Antoine Quint  <graouts@apple.com>
6055
6056        <rdar://problem/13105775> Handle currently recording profiles in a more graceful manner
6057
6058        We now present a nice-looking "Recording�" message when a recording
6059        profile is selected in the instruments sidebar.
6060
6061        Reviewed by Timothy Hatcher.
6062
6063        * Localizations/en.lproj/localizedStrings.js:
6064        New "Recording�" string used to present when we're recording a profile
6065        of an unknown type (future-proofing).
6066
6067        * UserInterface/CSSSelectorProfileView.js:
6068        (WebInspector.CSSSelectorProfileView):
6069        (WebInspector.CSSSelectorProfileView.prototype.recordingTitle):
6070        (WebInspector.CSSSelectorProfileView.prototype.displayProfile):
6071        Implement the new ProfileView protocol to display the profile
6072        data only when it's available.
6073
6074        * UserInterface/JavaScriptProfileView.js:
6075        (WebInspector.JavaScriptProfileView):
6076        (WebInspector.JavaScriptProfileView.prototype.recordingTitle):
6077        (WebInspector.JavaScriptProfileView.prototype.displayProfile.profileCallback):
6078        (WebInspector.JavaScriptProfileView.prototype.displayProfile):
6079        Implement the new ProfileView protocol to display the profile
6080        data only when it's available.
6081
6082        * UserInterface/Main.html:
6083        Add the new ProfileView.css file.
6084
6085        * UserInterface/ProfileManager.js:
6086        (WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors):
6087        Ensure we set the "recording" property last as it would fire the
6088        new WebInspector.ProfileObject.Event.FinshedRecording event before 
6089        the profile data has been set on the object.
6090
6091        * UserInterface/ProfileObject.js:
6092        (WebInspector.ProfileObject.prototype.set recording):
6093        Dispatch a new WebInspector.ProfileObject.Event.FinshedRecording
6094        event when the profile has finished recording.
6095
6096        * UserInterface/ProfileView.css: Added.
6097        (.recording-profile-view):
6098        (.recording-profile-view > .indeterminate-progress-spinner):
6099        (.recording-profile-view > span):
6100        New CSS support for the new recording message in ProfileView,
6101        using CSS flexbox to vertically and horizontally center the
6102        indeterminate spinner and text.
6103
6104        * UserInterface/ProfileView.js:
6105        (WebInspector.ProfileView):
6106        In case the profile for this ProfileView is still recording,
6107        register for the WebInspector.ProfileObject.Event.FinshedRecording
6108        event to be notified of when the profile is done recording
6109        and show a "Recording�" message until then.
6110
6111        (WebInspector.ProfileView.prototype.displayProfile):
6112        New method called when the profile has finished recording and
6113        we've removed the "Recording�" message from display. Meant to
6114        be implemented by subclasses.
6115
6116        (WebInspector.ProfileView.prototype.recordingTitle):
6117        New method called when populating the "Recording�" message allowing
6118        subclasses to return a clearer message.
6119
6120        (WebInspector.ProfileView.prototype._profileFinishedRecording):
6121        Event handler for the WebInspector.ProfileObject.Event.FinshedRecording
6122        event which removes the "Recording�" message and calls
6123        displayProfile().
6124
6125        (WebInspector.ProfileView.prototype._showRecordingMessage):
6126        Display the "Recording�" message.
6127
6128        (WebInspector.ProfileView.prototype._hideRecordingMessage):
6129        Removes the "Recording�" message, if any.
6130
61312013-03-28  Antoine Quint  <graouts@apple.com>
6132
6133        <rdar://problem/13483963> copying text from the web inspector includes [LOG] when you paste
6134
6135        Don't add [Log] prefix for log-level messages.
6136
6137        Reviewed by Timothy Hatcher.
6138
6139        * UserInterface/ConsoleMessageImpl.js:
6140        (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
6141
61422013-03-26  Timothy Hatcher  <timothy@apple.com>
6143
6144        Support for dock-to-right in the Web Inspector.
6145
6146        rdar://problem/10368152
6147
6148        Reviewed by Joseph Pecoraro.
6149
6150        * UserInterface/InspectorFrontendAPI.js:
6151        (InspectorFrontendAPI.setDockSide):
6152        * UserInterface/Main.css:
6153        (body.docked.bottom):
6154        (body.docked.right):
6155        (#docked-resizer):
6156        (body.docked #docked-resizer):
6157        (body.docked.bottom #docked-resizer):
6158        (body.docked.right #docked-resizer):
6159        (body.docked.bottom #toolbar):
6160        (body.docked.bottom #toolbar .item:not(.flexible-space)):
6161        (body.docked.right #navigation-sidebar.collapsed > .resizer):
6162        * UserInterface/Main.js:
6163        (WebInspector.loaded):
6164        (WebInspector.contentLoaded):
6165        (WebInspector.updateDockedState):
6166        (WebInspector._toolbarDisplayModeDidChange):
6167        (WebInspector._toolbarSizeModeDidChange):
6168        (WebInspector._toolbarMouseDown):
6169        (WebInspector._dockedResizerMouseDown.dockedResizerDrag):
6170        (WebInspector._dockedResizerMouseDown):
6171
61722013-03-27  Antoine Quint  <graouts@apple.com>
6173
6174        <rdar://problem/13105774> Recording a profile with the inspector UI should automatically select the new profile upon completion
6175
6176        Automatically select profiles that completed as a result of the user
6177        pressing the record button in the instruments sidebar panel.
6178
6179        Reviewed by Timothy Hatcher.
6180
6181        * UserInterface/InstrumentSidebarPanel.js:
6182        (WebInspector.InstrumentSidebarPanel.prototype._profilingEnded):
6183        Check the "fromConsole" property on the ProfilingEnded event to
6184        see whether this profile should be automatically selected.
6185
6186        * UserInterface/ProfileManager.js:
6187        (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
6188        Also indicate whether the ProfilingEnded event is created as a
6189        result of a profile finishing recording as a result of calling
6190        one of the console APIs.
6191
61922013-03-27  Antoine Quint  <graouts@apple.com>
6193
6194        <rdar://problem/13190009> Profile recorded prior to the current page load may show empty content view
6195
6196        We now create the content view for a profile that finished recording instantly
6197        rather than delay it until selection. This ensures that all recorded profiles
6198        are available across page loads, until we navigate away.
6199
6200        Reviewed by Timothy Hatcher.
6201
6202        * UserInterface/ConsoleObserver.js:
6203        (WebInspector.ConsoleObserver.prototype.messageAdded):
6204        Fix an oversight from the previous commit where we wouldn't distinguish
6205        calls to console.profile() and console.profileEnd() made as a result
6206        of starting a profile from the UI or starting a profile by actually
6207        calling these methods.
6208
6209        * UserInterface/InstrumentSidebarPanel.js:
6210        (WebInspector.InstrumentSidebarPanel.prototype._profilingEnded):
6211        Force the creation of the content view for the provided profile so that
6212        the profile is immediately retrieved from the backend and available
6213        across page loads.
6214
6215        * UserInterface/ProfileManager.js:
6216        (WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors):
6217        (WebInspector.ProfileManager.prototype.addJavaScriptProfile):
6218        (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
6219        Pass the currently recording profile as data to the ProfilingEnded
6220        event dispatched.
6221
62222013-03-27  Jessie Berlin  <jberlin@apple.com>
6223
6224        Ran update-safari-localizable-strings.
6225
6226        * Localizations/en.lproj/localizedStrings.js:
6227
62282013-03-27  Antoine Quint  <graouts@apple.com>
6229
6230        <rdar://problem/13515381> Profiles started from console API don't appear until done
6231
6232        We now intercept console.profile() and console.profileEnd() messages
6233        appearing through the ConsoleObserver so that we can simulate
6234        setRecordingJavaScriptProfile protocol events in the ConsoleManager.
6235        This allows us to deal with console profiles in a more unified manner.
6236        The recording button, however, does not go red when a profile is
6237        recording from the console.
6238
6239        Reviewed by Timothy Hatcher.
6240
6241        * Localizations/en.lproj/localizedStrings.js:
6242        Changed string for "Recording JavaScript Profile�" to allow for
6243        a profile title as well, since it might be known form the
6244        console.profile() call that initiated it.
6245
6246        * UserInterface/ConsoleObserver.js:
6247        (WebInspector.ConsoleObserver.prototype.messageAdded):
6248        Check for console.profile() and console.profileEnd() calls and
6249        inform the ProfileManager that a profile started or ended from
6250        the console API.
6251
6252        * UserInterface/ProfileManager.js:
6253        (WebInspector.ProfileManager.prototype.profileWasStartedFromConsole):
6254        Simulate a setRecordingJavaScriptProfile protocol event and set up
6255        the profile's title if provided.
6256
6257        (WebInspector.ProfileManager.prototype.profileWasEndedFromConsole):
6258        Simulate a setRecordingJavaScriptProfile protocol event.
6259
6260        (WebInspector.ProfileManager.prototype.addJavaScriptProfile):
6261        Remove custom logic to deal with the belated creation of a
6262        JavaScriptProfileObject for a profile that would have been started
6263        from the console API since we now get the notification via the simulated
6264        setRecordingJavaScriptProfile protocol event.
6265
6266        (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
6267        Only dispatch the ProfilingStarted event if the profile was initiated
6268        from the user interface.
6269
62702013-03-26  Joseph Pecoraro  <pecoraro@apple.com>
6271
6272        Check-in some documentation files on the RWI protocols.
6273
6274        Better these be checked in then floating on my machine.
6275
6276        Rubber-stamped by Timothy Hatcher.
6277
6278        * Documentation/RWI-Messages.graffle: Added.
6279        * Documentation/RWI-Messages.pdf: Added.
6280
62812013-03-26  Antoine Quint  <graouts@apple.com>
6282
6283        <rdar://problem/13096650> Debugger popover does not appear sometimes (or is too slow to appear)
6284
6285        We now dismiss the debugger popover when the hovered token (or the
6286        popover for it) is no longer hovered for a whole second. Additionally,
6287        if there is marked text, we immediately show a popover for a newly
6288        hovered token instead of waiting 500ms so that's easier to go from
6289        token to token to get their information.
6290
6291        Reviewed by Joseph Pecoraro.
6292
6293        * UserInterface/Popover.js:
6294        (WebInspector.Popover.prototype.get element):
6295        Newly public property, used to check in hoveredElementCanReleaseHoveredToken() in
6296        the SourceCodeTextEditor whether the newly hovered element is contained within
6297        a popover.
6298
6299        * UserInterface/SourceCodeTextEditor.js:
6300        (WebInspector.SourceCodeTextEditor.prototype.hoveredElementCanReleaseHoveredToken):
6301        Check whether the newly hovered element is contained within the presented
6302        popover or whether text in the popover is selected.
6303
6304        (WebInspector.SourceCodeTextEditor.prototype.hoveredTokenWasReleased):
6305        Dismiss the popover since the user has moused out of the hovered token long
6306        enough that it shouldn't be considered hovered anymore.
6307
6308        * UserInterface/TextEditor.js:
6309        (WebInspector.TextEditor.prototype.stopTrackingTokenHovering):
6310        Remove the window-wide mousemove event listener.
6311
6312        (WebInspector.TextEditor.prototype.handleEvent):
6313        Route mousemove events to the _mouseMovedWithMarkedText() method
6314        if it's the window-wide mousemove event listener.
6315
6316        (WebInspector.TextEditor.prototype.highlightHoveredExpression):
6317        Start tracking mousemove events at the window level so that we can
6318        detect any element, even outside of the text editor, that might be
6319        hovered long enough to release the hovered token.
6320
6321        (WebInspector.TextEditor.prototype.removeHighlightOnHoveredExpression):
6322        Remove the document-wide mousemove event listener and delete the
6323        _tokenHighlightMarkedText property so that we can use its absence
6324        to gather that there is no marked text when checking for a newly
6325        hovered token in _mouseMovedOverEditor().
6326
6327        (WebInspector.TextEditor.prototype.hoveredElementCanReleaseHoveredToken):
6328        Public method used to identify whether the hovered element qualifies
6329        to release the hovered token. The default implementation simply checks
6330        that the hovered element is the marked text for the hovered token. 
6331
6332        (WebInspector.TextEditor.prototype.hoveredTokenWasReleased):
6333        Public method meant to be subclassed, called when we've identified that
6334        the hovered token has been moused out of for more than a second.
6335
6336        (WebInspector.TextEditor.prototype._mouseMovedOverEditor):
6337        Immediately check the newly hovered token if there already is
6338        hovered token, allowing for a quick inspection of hovered tokens.
6339
6340        (WebInspector.TextEditor.prototype._mouseMovedWithMarkedText):
6341        Check the hovered element qualifies to release the hover token, and if it so,
6342        start a one-second timer to release it.
6343
6344        (WebInspector.TextEditor.prototype._checkHoveredToken):
6345        Stop the timer started in _mouseMovedWithMarkedText() to check whether
6346        the currently hovered element could qualify to release the hovered token.
6347
6348        (WebInspector.TextEditor.prototype._markedTextIsNoLongerHovered):
6349        Method called when the timer started in _mouseMovedWithMarkedText() to
6350        check whether the currently hovered element could qualify to relase the
6351        hovered token has fired.
6352
63532013-03-26  Antoine Quint  <graouts@apple.com>
6354
6355        <rdar://problem/13505817> Debugger popovers don't appear for undefined values
6356
6357        Handle the RemoteObject type "undefined" and also implement better
6358        handling of null Object values as well.
6359
6360        Reviewed by Timothy Hatcher.
6361
6362        * UserInterface/SourceCodeTextEditor.js:
6363        (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
6364        (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
6365        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
6366        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull):
6367        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined):
6368
63692013-03-26  Jessie Berlin  <jberlin@apple.com>
6370
6371        Ran update-safari-localizable-strings.
6372
6373        Reviewed by Conrad Shultz.
6374
6375        * Localizations/en.lproj/localizedStrings.js:
6376
63772013-03-26  Antoine Quint  <graouts@apple.com>
6378
6379        <rdar://problem/13439854> REGRESSION: Copying array or object output does not contain values
6380
6381        We now simply use the _formattedMessage DOM node if available and
6382        if the message isn't a stack trace. Then, we insert the URL line,
6383        with repeat count if set, after the first line.
6384
6385        Reviewed by Timothy Hatcher.
6386
6387        * UserInterface/ConsoleMessageImpl.js:
6388        (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
6389
63902013-03-26  Antoine Quint  <graouts@apple.com>
6391
6392        <rdar://problem/13345023> Logging an Array after it has been sorted results in its undefined elements not being shown
6393
6394        Merging code from OpenSource to match the handling of arrays in the Console.
6395
6396        Reviewed by Timothy Hatcher.
6397
6398        * Localizations/en.lproj/localizedStrings.js:
6399        * UserInterface/ConsoleMessageImpl.js:
6400        (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
6401        (WebInspector.ConsoleMessageImpl.prototype.appendUndefined):
6402        (WebInspector.ConsoleMessageImpl.prototype._printArray):
6403        * UserInterface/RemoteObject.js:
6404        (WebInspector.RemoteObject.prototype.release):
6405        (WebInspector.RemoteObject.prototype.arrayLength):
6406
64072013-03-25  Timothy Hatcher  <timothy@apple.com>
6408
6409        Don't include the main frame document as a separate resource in the sidebar.
6410
6411        <rdar://problem/13484805> REGRESSION: Main frame is included twice in the Resources sidebar
6412
6413        Reviewed by Joseph Pecoraro.
6414
6415        * UserInterface/FrameResourceManager.js:
6416        (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
6417        Skip resources with type "Document" and with the same url as the frame.
6418
64192013-03-25  Timothy Hatcher  <timothy@apple.com>
6420
6421        Fix large image scaling after the switch to the new flex model
6422
6423        <rdar://problem/13493712> REGRESSION: Very poor image squishing when content
6424        window is narrow / image is large (113222)
6425
6426        Reviewed by Joseph Pecoraro.
6427
6428        * UserInterface/ImageResourceContentView.css:
6429        (.content-view.resource.image):
6430        (.content-view.resource.image img):
6431        Use min-width: 0 so the image can shrink.
6432
64332013-03-24  Joseph Pecoraro  <pecoraro@apple.com>
6434
6435        Turn on support for breakpoints in pretty printed resources and SourceMaps
6436
6437        We are now getting expected column information from the backend and
6438        hitting breakpoints on columns as expected. This was the last change
6439        needed to consider the following tasks complete:
6440        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
6441        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
6442
6443        Reviewed by Timothy Hatcher.
6444
6445        * UserInterface/DebuggerSidebarPanel.js:
6446        (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
6447        * UserInterface/SourceCodeTextEditor.js:
6448        (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
6449        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
6450        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
6451
64522013-03-24  Joseph Pecoraro  <pecoraro@apple.com>
6453
6454        Workaround while still investigating <rdar://problem/13412969>.
6455
6456        Jump to line centered can still throw an exception when revealing a
6457        when the content first loads (reveal pending line). So delay in
6458        just that case.
6459
6460        Reviewed by Timothy Hatcher.
6461
6462        * UserInterface/TextEditor.js:
6463        (WebInspector.TextEditor.prototype.revealAndHighlightLine):
6464        (WebInspector.TextEditor.prototype.revealLine):
6465        (WebInspector.TextEditor.prototype._revealPendingLineIfPossible):
6466
64672013-03-25  Antoine Quint  <graouts@apple.com>
6468
6469        <rdar://problem/13495086> Commands and their result should not be subject to search filtering
6470
6471        No longer filter out commands and their results based on search terms.
6472        We also change the CSS class name we use to hide messages that may be
6473        filtered out due to the search terms to be exclusive rather than
6474        inclusive.
6475
6476        Reviewed by Timothy Hatcher.
6477
6478        * UserInterface/LogContentView.css:
6479        (.search-in-progress .console-item.filtered-out-by-search):
6480        (.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted):
6481        (.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted.selected):
6482        * UserInterface/LogContentView.js:
6483        (WebInspector.LogContentView.prototype._isMessageVisible):
6484        (WebInspector.LogContentView.prototype._visibleMessages):
6485        (WebInspector.LogContentView.prototype._performSearch):
6486
64872013-03-25  Antoine Quint  <graouts@apple.com>
6488
6489        <rdar://problem/13494748> Expandable console items should only select when clicking outside of the expandable part
6490
6491        We no longer select messages if the hit area is part of an expandable element.
6492        This makes it easier to expand nodes and JS objects without first having to
6493        select the console message.
6494
6495        Reviewed by Timothy Hatcher.
6496
6497        * UserInterface/LogContentView.js:
6498        (WebInspector.LogContentView.prototype._mousedown):
6499        (WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
6500
65012013-03-25  Antoine Quint  <graouts@apple.com>
6502
6503        <rdar://problem/13495023> JS objects logged to console can't be expanded using keyboard
6504
6505        We now also handle expansion of JS objects logged to the console. To support this,
6506        we add a new VisibleContentDidChange event to WebInspector.Section such that we can
6507        when the visible content of a given WebInspector.ObjectPropertiesSection is updated,
6508        since there is no onexpand() method available as is the case with TreeOutline.
6509
6510        Reviewed by Timothy Hatcher.
6511
6512        * UserInterface/LogContentView.js:
6513        (WebInspector.LogContentView.prototype._leftArrowWasPressed):
6514        (WebInspector.LogContentView.prototype._rightArrowWasPressed.else.bind):
6515        (WebInspector.LogContentView.prototype._rightArrowWasPressed):
6516        (WebInspector.LogContentView.prototype._propertiesSectionDidUpdateContent):
6517        * UserInterface/ObjectPropertiesSection.js:
6518        (WebInspector.ObjectPropertiesSection.prototype.updateProperties):
6519        * UserInterface/Section.js:
6520        (WebInspector.Section):
6521        (WebInspector.Section.prototype.expand):
6522
65232013-03-25  Antoine Quint  <graouts@apple.com>
6524
6525        <rdar://problem/13416461> Message repeat count causes bad layout in the Console
6526
6527        We now always display the warning or error icon as well as the repeat count
6528        for the message, and we copy the repeat count to the clipboard as well.
6529
6530        Reviewed by Timothy Hatcher.
6531
6532        * UserInterface/ConsoleMessageImpl.js:
6533        (WebInspector.ConsoleMessageImpl.prototype.updateRepeatCount):
6534        (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
6535        * UserInterface/LogContentView.css:
6536        (.console-message .bubble):
6537
65382013-03-25  Antoine Quint  <graouts@apple.com>
6539
6540        <rdar://problem/13493775> Console log should scroll to reveal messages for highlighted search match
6541
6542        Make sure we scroll to reveal messages upon highlighting a match.
6543
6544        Reviewed by Joseph Pecoraro.
6545
6546        * UserInterface/LogContentView.js:
6547        (WebInspector.LogContentView.prototype._highlightSearchMatchAtIndex):
6548
65492013-03-24  Joseph Pecoraro  <pecoraro@apple.com>
6550
6551        <rdar://problem/13418317> REGRESSION: DOM Tree "Edit as HTML" is not inserting newlines with return
6552
6553        Give multiline WebInspector.startEditing edit boxes have better white-space behavior.
6554
6555        Reviewed by Timothy Hatcher.
6556
6557        * UserInterface/Editing.css:
6558        (.editing.multiline):
6559        * UserInterface/EditingSupport.js:
6560
65612013-03-24  Joseph Pecoraro  <pecoraro@apple.com>
6562
6563        <rdar://problem/13491916> Searching forward or back in find banner should reveal in center
6564
6565        Reviewed by Dean Jackson.
6566
6567        * UserInterface/TextEditor.js:
6568        (WebInspector.TextEditor.prototype._revealSearchResult):
6569        (WebInspector.TextEditor.prototype._isPositionVisible):
6570        (WebInspector.TextEditor.prototype._scrollIntoViewCentered):
6571        When revealing a search result, reveal the line centered in
6572        the editor if needed. Don't do the setTimeout, the lines in
6573        the editor did not change so we shouldn't need to worry about
6574        the CodeMirror exception.
6575
6576        (WebInspector.TextEditor.prototype.revealAndHighlightLine):
6577        Share the isPositionVisible code.
6578
6579        (WebInspector.TextEditor.prototype._prettyPrint):
6580        This is the only case where I know we need the setTimeout delay
6581        to workaround a CodeMirror exception when autoformatting.
6582
65832013-03-23  Joseph Pecoraro  <pecoraro@apple.com>
6584
6585        <rdar://problem/13491257> CSS pretty printing no longer works
6586
6587        For CSS there is now a "css-base" mode with a "text/css" variant,
6588        and a "text/x-scss" variant. There is a convenience mode "css"
6589        which explicitly gets the "text/css" variant of the "css-base" mode.
6590
6591        The pretty printer should extend "css-base". Whether the content
6592        is "text/css" or "text/x-scss" the mode outputting the tokens will
6593        be "css-base", and that mode needs to have the pretty printer
6594        extensions.
6595
6596        Extend the "css-base" mode, instead of the overly specific text/css
6597        css mode to have extendedToken and alternate name "css". So, as
6598        "css-base" creates tokens for either "text/css" or "text/x-scss",
6599        it will adds our "m-css" style classes and get our styles.
6600
6601        We still define the "css-rule" mode to be an alias of the text/css
6602        specific mode. To workaround a limitation of CodeMirror, we don't
6603        re-extend any properties that have already been extended (token,
6604        alternate name) and only extend new properties. We get the earlier
6605        extensions because internally when creating a "css-rule" mode,
6606        CodeMirror get the text/css variant of "css-base" with "css-base"
6607        extensions and then applies our extensions on top of that.
6608
6609        Reviewed by Timothy Hatcher.
6610
6611        * UserInterface/CodeMirrorFormatters.js:
6612        * UserInterface/TextEditor.js:
6613        (WebInspector.TextEditor.prototype.hasFormatter):
6614        * UserInterface/CodeMirrorAdditions.js:
6615
66162013-03-23  Joseph Pecoraro  <pecoraro@apple.com>
6617
6618        <rdar://problem/13490780> Find banner status does not update after switching between source files
6619
6620        When switching content views, reset the find banner and perform a
6621        search with the find banner's query in the new content view so that
6622        keyboard shortcuts will work in the new content view even though
6623        the find banner is hidden.
6624
6625        Reviewed by Timothy Hatcher.
6626
6627        * UserInterface/ContentView.js:
6628        (WebInspector.ContentView.prototype.get hasPerformedSearch):
6629        (WebInspector.ContentView.prototype.set automaticallyRevealFirstSearchResult):
6630        Properties used by ContentBrowser to update the find banner when
6631        switching to the ContentView. Allow a search to be performed on
6632        a ContentView without automatically jumping to the first result.
6633
6634        * UserInterface/ContentBrowser.js:
6635        (WebInspector.ContentBrowser):
6636        (WebInspector.ContentBrowser.prototype._findBannerDidShow):
6637        (WebInspector.ContentBrowser.prototype._findBannerDidHide):
6638        Allow or disallow jumping to the first search result based on banner visibility.
6639        Keyboard shortcuts will still work.
6640
6641        (WebInspector.ContentBrowser.prototype._updateFindBanner):
6642        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
6643        When the content view changes, update the banner. Search the new
6644        content view so that keyboard shortcuts work.
6645
6646        * UserInterface/FindBanner.js:
6647        (WebInspector.FindBanner.prototype.show):
6648        (WebInspector.FindBanner.prototype.hide):
6649        Emit events for when the banner shows or hides.
6650
6651        * UserInterface/ClusterContentView.js:
6652        (WebInspector.ClusterContentView.prototype.get hasPerformedSearch):
6653        (WebInspector.ClusterContentView.prototype.set automaticallyRevealFirstSearchResult):
6654        * UserInterface/DOMTreeContentView.js:
6655        (WebInspector.DOMTreeContentView.prototype.get hasPerformedSearch):
6656        (WebInspector.DOMTreeContentView.prototype.set automaticallyRevealFirstSearchResult):
6657        (WebInspector.DOMTreeContentView.prototype.performSearch.searchResultsReady):
6658        (WebInspector.DOMTreeContentView.prototype.performSearch):
6659        * UserInterface/ScriptContentView.js:
6660        (WebInspector.ScriptContentView.prototype.get hasPerformedSearch):
6661        (WebInspector.ScriptContentView.prototype.set automaticallyRevealFirstSearchResult):
6662        * UserInterface/TextEditor.js:
6663        (WebInspector.TextEditor):
6664        (WebInspector.TextEditor.prototype.set automaticallyRevealFirstSearchResult):
6665        (WebInspector.TextEditor.prototype.addSearchResults.markRanges):
6666        (WebInspector.TextEditor.prototype.addSearchResults):
6667        * UserInterface/TextResourceContentView.js:
6668        (WebInspector.TextResourceContentView.prototype.get hasPerformedSearch):
6669        (WebInspector.TextResourceContentView.prototype.set automaticallyRevealFirstSearchResult):
6670        Implement the new ContentView properties. Respect the 
6671        automaticallyRevealFirstSearchResult property by not jumping to the
6672        first result unless we are allowed too.
6673
66742013-03-23  Joseph Pecoraro  <pecoraro@apple.com>
6675
6676        Fix a typo causing warnings in the inspector.
6677
6678        Unreviewed.
6679
6680        * UserInterface/Main.html:
6681
66822013-03-23  Antoine Quint  <graouts@apple.com>
6683
6684        <rdar://problem/11682467> Should be able to do a Find in a Log
6685
6686        Add a search / filter bar to the navigation bar of the console log.
6687        The search bar can be given focus by hitting Cmd+F, and it can provide
6688        focus back to the console prompt by hitting Esc. or Enter (which also
6689        highlights the first matching search result). The Cmd+G and Cmd+Shift+G
6690        keyboard shortcuts also work as expected.
6691
6692        Reviewed by Timothy Hatcher.
6693
6694        * Localizations/en.lproj/localizedStrings.js:
6695
6696        * UserInterface/JavaScriptLogViewController.js:
6697        (WebInspector.JavaScriptLogViewController):
6698        (WebInspector.JavaScriptLogViewController.prototype._promptKeyDown):
6699        Add support for the new Cmd+F, Cmd+G and Cmd+Shift+G keyboard shortcuts.
6700
6701        * UserInterface/LogContentView.css:
6702        (.log-search-bar > input):
6703        (.search-in-progress .console-item):
6704        (.search-in-progress .console-item.matches-search:not(.filtered-out)):
6705        (.search-in-progress .console-item.matches-search .highlighted):
6706        (.search-in-progress .console-item.matches-search .highlighted.selected):
6707
6708        * UserInterface/LogContentView.js:
6709        (WebInspector.LogContentView):
6710        Create the SearchBar.
6711
6712        (WebInspector.LogContentView.prototype.get navigationItems):
6713        Add the SearchBar to the navigation bar.
6714
6715        (WebInspector.LogContentView.prototype.get searchInProgress):
6716        Inidicates whether a search is in progress (ie. search term
6717        isn't the empty string).
6718
6719        (WebInspector.LogContentView.prototype.focusSearchBar):
6720        New API to bring focus to the SearchBar's input field.
6721
6722        (WebInspector.LogContentView.prototype.highlightPreviousSearchMatch):
6723        New API to highlight the previous search match.
6724
6725        (WebInspector.LogContentView.prototype.highlightNextSearchMatch):
6726        New API to highlight the next search match.
6727
6728        (WebInspector.LogContentView.prototype.searchBarWantsToLoseFocus):
6729        SearchBar delegate method we use to move focus back to the prompt
6730        as the user hit the Esc. key while the search bar has focus.
6731
6732        (WebInspector.LogContentView.prototype.searchBarDidActivate):
6733        SearchBar delegate method we use to move focus back to the prompt
6734        as the user hit the Enter key while the search bar has focus. We
6735        also select the first search match to make it stand out.
6736
6737        (WebInspector.LogContentView.prototype._updateMessagesSelection):
6738        Refactoring: _allVisibleMessages() is now _visibleMessages().
6739
6740        (WebInspector.LogContentView.prototype._isMessageVisible):
6741        Take into account whether the message matches the search terms
6742        so that it's filtered otherwise.
6743
6744        (WebInspector.LogContentView.prototype._selectAllMessages):
6745        Refactoring: _allVisibleMessages() is now _visibleMessages().
6746
6747        (WebInspector.LogContentView.prototype._unfilteredMessages):
6748        New method to provide the list of messsages that match the
6749        filters provided via the scope bar.
6750
6751        (WebInspector.LogContentView.prototype._visibleMessages):
6752        Refactoring: _allVisibleMessages() is now _visibleMessages().
6753        Also take into account additional filtering via the search bar.
6754
6755        (WebInspector.LogContentView.prototype._filterMessages):
6756        Perform a search after the filters have changed to ensure we
6757        are showing the correct set of messages.
6758
6759        (WebInspector.LogContentView.prototype._keyDown):
6760        Add support for the new Cmd+F, Cmd+G and Cmd+Shift+G keyboard shortcuts.
6761
6762        (WebInspector.LogContentView.prototype._commandFWasPressed):
6763        Focus the search bar upon hitting Cmd+F.
6764
6765        (WebInspector.LogContentView.prototype._commandGWasPressed):
6766        Highlight the next search match upon hitting Cmd+G.
6767
6768        (WebInspector.LogContentView.prototype._commandShiftGWasPressed):
6769        Highlight the next search match upon hitting Cmd+Shift+G.
6770
6771        (WebInspector.LogContentView.prototype._upArrowWasPressed):
6772        (WebInspector.LogContentView.prototype._downArrowWasPressed):
6773        (WebInspector.LogContentView.prototype._previousMessage):
6774        (WebInspector.LogContentView.prototype._nextMessage):
6775        (WebInspector.LogContentView.prototype._clearFocusableChildren):
6776        Refactoring: _allVisibleMessages() is now _visibleMessages().
6777
6778        (WebInspector.LogContentView.prototype._searchTextDidChange):
6779        Run the search as the terms in the search bar changed.
6780
6781        (WebInspector.LogContentView.prototype._performSearch):
6782        (WebInspector.LogContentView.prototype._highlightRanges):
6783        Perform a search based on the text in the search bar and apply
6784        a "matches-search" CSS class to all text ranges matching the
6785        search terms. This is actually performed by method merged from
6786        the OpenSource Web Inspector code.
6787
6788        (WebInspector.LogContentView.prototype._rangesOverlap):
6789        Checks whether two text ranges overlap at all. We use this to identify
6790        if the previously selected search term is still present in the new
6791        set of matching search ranges.
6792
6793        (WebInspector.LogContentView.prototype._highlightSearchMatchAtIndex):
6794        Highlights a given term in the array of highlighted elements created in
6795        _performSearch().
6796
6797        * UserInterface/Main.html:
6798        Include the new SearchBar files.
6799
6800        * UserInterface/Main.js:
6801        (WebInspector.highlightRangesWithStyleClass):
6802        (WebInspector.revertDomChanges):
6803        Methods merged as-is from OpenSource.
6804
6805        * UserInterface/SearchBar.css: Added.
6806        (.search-bar > input):
6807        * UserInterface/SearchBar.js: Added.
6808        (WebInspector.SearchBar):
6809        (WebInspector.SearchBar.prototype.get text):
6810        (WebInspector.SearchBar.prototype.set text):
6811        (WebInspector.SearchBar.prototype.focus):
6812        (WebInspector.SearchBar.prototype._handleSearchEvent):
6813        (WebInspector.SearchBar.prototype._handleKeydownEvent):
6814        New NavigationItem subclass to provide a SearchBar within a NavigationBar.
6815
68162013-03-22  Timothy Hatcher  <timothy@apple.com>
6817
6818        Make the New Rule button 10px taller for a bigger hit target.
6819
6820        <rdar://problem/13470200> I expect the clickable area for "+ New Rule" to be bigger.
6821
6822        Reviewed by Joseph Pecoraro.
6823
6824        * UserInterface/RulesStyleDetailsPanel.css:
6825        (.sidebar > .panel.details.css-style .rules .new-rule):
6826
68272013-03-22  Timothy Hatcher  <timothy@apple.com>
6828
6829        Show the compression status and the compression amount in the Resource details sidebar.
6830
6831        <rdar://problem/13201070> Show gzip status of resources more prominently
6832
6833        Reviewed by Joseph Pecoraro.
6834
6835        * Localizations/en.lproj/localizedStrings.js: Updated.
6836        * UserInterface/Resource.js:
6837        (WebInspector.Resource.prototype.get encodedSize): Added.
6838        (WebInspector.Resource.prototype.get transferSize): Use encodedSize.
6839        (WebInspector.Resource.prototype.get compressed): Added.
6840
6841        * UserInterface/ResourceDetailsSidebarPanel.js:
6842        (WebInspector.ResourceDetailsSidebarPanel): Added compression group.
6843        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Call _refreshCompressed.
6844        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshCompressed): Added.
6845
6846        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshDecodedSize):
6847        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshTransferSize):
6848        Call _refreshCompressed and update encoded size row.
6849
68502013-03-21  Timothy Hatcher  <timothy@apple.com>
6851
6852        Add a placeholder for empty style rules in the Style details sidebar.
6853
6854        Reviewed by Joseph Pecoraro.
6855
6856        * Localizations/en.lproj/localizedStrings.js: Updated.
6857        * UserInterface/CSSStyleDeclarationTextEditor.css:
6858        (.css-style-text-editor > .CodeMirror .CodeMirror-placeholder): Added.
6859
6860        * UserInterface/CSSStyleDeclarationTextEditor.js:
6861        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
6862        Set the placeholder option based on the readOnly state.
6863
68642013-03-21  Timothy Hatcher  <timothy@apple.com>
6865
6866        Enable auto closing brackets and quotes along with matching bracket highlighting.
6867
6868        Also share common CodeMirror styles in CodeMirrorOverrides.css.
6869
6870        Reviewed by Dean Jackson.
6871
6872        * UserInterface/CSSStyleDeclarationTextEditor.css:
6873        (.css-style-text-editor > .CodeMirror):
6874        (.css-style-text-editor > .CodeMirror-scroll):
6875        * UserInterface/CSSStyleDeclarationTextEditor.js:
6876        (WebInspector.CSSStyleDeclarationTextEditor):
6877        * UserInterface/CodeMirrorOverrides.css: Added.
6878        (.CodeMirror *):
6879        (.CodeMirror .CodeMirror-lines):
6880        (.CodeMirror pre):
6881        (.CodeMirror .CodeMirror-selected):
6882        (.CodeMirror.CodeMirror-focused .CodeMirror-selected):
6883        (.CodeMirror .CodeMirror-cursor):
6884        (.CodeMirror .CodeMirror-lines .CodeMirror-matchingbracket):
6885        (.CodeMirror .CodeMirror-lines .CodeMirror-nonmatchingbracket):
6886        (.CodeMirror .CodeMirror-gutters):
6887        (.CodeMirror .CodeMirror-linenumber):
6888        * UserInterface/Main.html:
6889        * UserInterface/TextEditor.css:
6890        (.text-editor > .CodeMirror):
6891        * UserInterface/TextEditor.js:
6892        (WebInspector.TextEditor):
6893
68942013-03-21  Timothy Hatcher  <timothy@apple.com>
6895
6896        Update CodeMirror to ToT (v3.11+) which includes a scroll performance file and other changes.
6897
6898        Include the new placeholder and closebrackets add-ons so we can use them in our editors.
6899        Also includes more modes that could be encountered on the web that we should syntax highlight.
6900        I've included the SQL mode since I plan to switch the database prompt to use it soon.
6901
6902        <rdar://problem/13470814> Scrolling in the Style > Rules sidebar is kind of sluggish
6903
6904        Rubber-stamped by Joseph Pecoraro.
6905
6906        * UserInterface/External/CodeMirror/clojure.js: Added.
6907        * UserInterface/External/CodeMirror/closebrackets.js: Added.
6908        * UserInterface/External/CodeMirror/codemirror.css: Updated.
6909        * UserInterface/External/CodeMirror/codemirror.js: Updated.
6910        * UserInterface/External/CodeMirror/coffeescript.js: Added.
6911        * UserInterface/External/CodeMirror/css.js: Updated.
6912        * UserInterface/External/CodeMirror/less.js: Added.
6913        * UserInterface/External/CodeMirror/livescript.js: Added.
6914        * UserInterface/External/CodeMirror/placeholder.js: Added.
6915        * UserInterface/External/CodeMirror/sass.js: Added.
6916        * UserInterface/External/CodeMirror/searchcursor.js: Updated.
6917        * UserInterface/External/CodeMirror/sql.js: Added.
6918        * UserInterface/External/CodeMirror/xml.js: Updated.
6919        * UserInterface/Main.html: Include added files.
6920
69212013-03-21  Antoine Quint  <graouts@apple.com>
6922
6923        <rdar://problem/13439837> REGRESSION: Copying the output of console.log(1,2,3) only copies "[Log] 1"        
6924
6925        Use the _message property rather than _messageText to provide the base
6926        textual representation of a console message, as hinted by the _formatMessage
6927        method which says that _message "is used for inline message bubbles in
6928        SourceFrames, or other plain-text representations".
6929
6930        Reviewed by Ricky Mondello.
6931
6932        * UserInterface/ConsoleMessageImpl.js:
6933        (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
6934
69352013-03-20  Timothy Hatcher  <timothy@apple.com>
6936
6937        Make the relaod button appear correctly when inspecting web archives.
6938
6939        <rdar://problem/13455883> Extra misplaced folder in Inspector sidebar
6940
6941        Reviewed by Joseph Pecoraro.
6942
6943        * UserInterface/ResourceTreeElement.css:
6944        (.item.resource > .status > .reload-button):
6945        (.item.resource.selected > .status > .reload-button):
6946        Use .resource instead of .resource-type-document. Since the button exists
6947        for web archives, and they get .resource-type-other. Fixing web archives
6948        to get a proper type is tracked by <rdar://problem/6420783>.
6949
69502013-03-20  Timothy Hatcher  <timothy@apple.com>
6951
6952        Correct some inconsistencies with opening the Inspector and what content views are opened.
6953
6954        <rdar://problem/12947914> Opening web inspector with Show Page Resources can open inspector in inconsistent state
6955
6956        Reviewed by Joseph Pecoraro.
6957
6958        * UserInterface/InspectorFrontendAPI.js:
6959        (InspectorFrontendAPI.showResources):
6960        (InspectorFrontendAPI.showMainResourceForFrame):
6961        Set ignoreLastContentCookie so the ResourceSidebarPanel has a chance to show the content view for the main frame
6962        once the main frame is known.
6963
6964        * UserInterface/Main.js:
6965        (WebInspector.contentLoaded):
6966        Set collapsed after loading the pending frontend commands are dispatched so only the final selected sidebar panel
6967        gets shown and has a say in what content view gets shown. Also removed code that collapsed the details sidebar,
6968        now that sidebars are collapsed by default.
6969
6970        (WebInspector.sidebarPanelForCurrentContentView): Added.
6971
6972        * UserInterface/NavigationSidebarPanel.js:
6973        (WebInspector.NavigationSidebarPanel.prototype.shown):
6974        Only select the selected tree element again if the content view is from a different sidebar. This way showing the
6975        Resources sidebar when you have gone back and forth between other resource wont jump to some old selected resource.
6976
6977        * UserInterface/ResourceSidebarPanel.js:
6978        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
6979        Allow onselect if we aren't showing a content view yet. That way the main frame is selected and shown in the content.
6980
6981        * UserInterface/Sidebar.js:
6982        (WebInspector.Sidebar):
6983        (WebInspector.Sidebar.prototype.set width):
6984        Make collapsed by default. Only tell the sidebar panel about width changes if not collapsed.
6985
69862013-03-20  Joseph Pecoraro  <pecoraro@apple.com>
6987
6988        <rdar://problem/13442600> Picking a frame in the console context selector menu should refocus the console input
6989
6990        Detect when the hidden <select> in the HierarchicalPathComponent was
6991        interacted with, even if its value did not change, and trigger a
6992        "Clicked" event for those interested. The Console refocuses its prompt
6993        in these cases when the execution context selector is interacted with.
6994
6995        Reviewed by Antoine Quint.
6996
6997        * UserInterface/HierarchicalPathComponent.js:
6998        (WebInspector.HierarchicalPathComponent):
6999        (WebInspector.HierarchicalPathComponent.prototype._selectElementMouseUp):
7000        * UserInterface/QuickConsole.js:
7001        (WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
7002        (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
7003        (WebInspector.QuickConsole.prototype._pathComponentClicked):
7004
70052013-03-20  Timothy Hatcher  <timothy@apple.com>
7006
7007        Make editing CSS resources work correctly again.
7008
7009        <rdar://problem/13457053> Safari Web Inspector: Editing .css files in main area is jumpy (112750)
7010
7011        Reviewed by Antoine Quint.
7012
7013        * UserInterface/CSSStyleManager.js:
7014        (WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
7015        (WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges):
7016        (WebInspector.CSSStyleManager.prototype._resourceContentDidChange):
7017        (WebInspector.CSSStyleManager.prototype._updateResourceContent.fetchedStyleSheetContent):
7018        We were relying on SourceCode.Event.ContentDidChange not firing if the content was equal. However, since we
7019        coalesce changes the content might be briefly out of sync and the event was firing. That would cause us to
7020        update TextEditor with a slightly older version of the content and mess up the user.
7021
70222013-03-19  Timothy Hatcher  <timothy@apple.com>
7023
7024        Don't create a new console group on reload if the current one is empty.
7025
7026        Also make sure to scroll the new group into view when it is create so it is visible and ready to show new messages.
7027
7028        <rdar://problem/12951299> Web Inspector console shouldn't draw a line on refresh if nothing was printed
7029        <rdar://problem/13209212> Console doesn't scroll to the bottom when a reloaded page logs
7030
7031        Reviewed by Joseph Pecoraro.
7032
7033        * UserInterface/ConsoleGroup.js:
7034        (WebInspector.ConsoleGroup.prototype.hasMessages): Added.
7035
7036        * UserInterface/JavaScriptLogViewController.js:
7037        (WebInspector.JavaScriptLogViewController.prototype.startNewSession):
7038        Reuse the previous group if it does not have messages. Also scroll the new session into view so it is ready
7039        to show messages.
7040
7041        * UserInterface/LogContentView.css:
7042        (.console-group.new-session .console-group-messages .console-item:first-child): Added.
7043        Don't show a border when it is in a new-session since there is already a dashed border.
7044
70452013-03-19  Timothy Hatcher  <timothy@apple.com>
7046
7047        Don't show storage if we don't have a security origin (about:blank).
7048
7049        Reviewed by Joseph Pecoraro.
7050
7051        * UserInterface/StorageManager.js:
7052        (WebInspector.StorageManager.prototype._securityOriginDidChange):
7053
70542013-03-19  Timothy Hatcher  <timothy@apple.com>
7055
7056        Don't refresh the metrics display if the user is incrementing/decrementing via the arrow keys.
7057
7058        When editing is committed or canceled we do a refresh to pick up any changes.
7059
7060        <rdar://problem/13441338> REGRESSION: Safari Web Inspector: Using Up/Down to
7061        modify margins loses focus (112566)
7062
7063        Reviewed by Joseph Pecoraro.
7064
7065        * UserInterface/BoxModelDetailsSectionRow.js:
7066        (WebInspector.BoxModelDetailsSectionRow.prototype._refresh): Return early if _ignoreNextRefresh.
7067        (WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown): Set _ignoreNextRefresh.
7068
70692013-03-19  Timothy Hatcher  <timothy@apple.com>
7070
7071        Make Local and Session storage work again.
7072
7073        <rdar://problem/13266278> REGRESSION: Local and Session storage protocol
7074        changes break displaying these items
7075
7076        Reviewed by Joseph Pecoraro.
7077
7078        * UserInterface/DOMStorageObject.js:
7079        (WebInspector.DOMStorageObject.prototype.getEntries):
7080        Use DOMStorageAgent.getDOMStorageEntries or DOMStorageAgent.getDOMStorageItems.
7081
7082        * UserInterface/DOMStorageObserver.js:
7083        (WebInspector.DOMStorageObserver.prototype.addDOMStorage):
7084        Revert earlier Curie compatibility support since it changed again!
7085
7086        * UserInterface/StorageManager.js:
7087        (WebInspector.StorageManager):
7088        (WebInspector.StorageManager.prototype._securityOriginDidChange): Added.
7089        (WebInspector.StorageManager.prototype._domStorageForId):
7090        When a Frame's security origin changes, add local and session storage if they don't
7091        already exist for that security origin.
7092
70932013-03-19  Timothy Hatcher  <timothy@apple.com>
7094
7095        Add securityOrigin to WebInspector.Frame.
7096
7097        This will be needed to fix DOM Storage inspection.
7098
7099        Reviewed by Joseph Pecoraro.
7100
7101        * UserInterface/Frame.js:
7102        (WebInspector.Frame):
7103        (WebInspector.Frame.prototype.initialize):
7104        (WebInspector.Frame.prototype.get securityOrigin): Added.
7105        Added securityOrigin parameters. Also fire the NameDidChange at the end of initialize
7106        so the Frame is in the final state instead of an intermediate state.
7107
7108        * UserInterface/FrameResourceManager.js:
7109        (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
7110        (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
7111        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
7112        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
7113        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
7114        (WebInspector.FrameResourceManager.prototype._createFrame):
7115        Pass along the securityOrigin so Frame can be created or initialized with it.
7116        Also pass along the frame name in places it was missing, now that we might need it.
7117
71182013-03-19  Timothy Hatcher  <timothy@apple.com>
7119
7120        Update InspectorBackendCommands to the latest.
7121
7122        Reviewed by Joseph Pecoraro.
7123
7124        * UserInterface/InspectorBackend.js:
7125        (InspectorBackendClass.prototype._getAgent):
7126        (InspectorBackendClass.prototype.registerCommand):
7127        (InspectorBackendClass.prototype.registerEnum):
7128        Added support for registerEnum, which is new.
7129
7130        * UserInterface/InspectorBackendCommands.js:
7131        Updated to the latest from Open Source r146200.
7132
71332013-03-18  Timothy Hatcher  <timothy@apple.com>
7134
7135        Make console messages bottom align if the log hasn't scrolled yet.
7136
7137        Also includes:
7138        * Restore clicking the empty space in the log to focus the prompt.
7139        * Make the prompt top border lighten when the log view is showing.
7140
7141        <rdar://problem/13442215> Maybe improve console typing UI (112588)
7142
7143        Reviewed by Joseph Pecoraro.
7144
7145        * UserInterface/ConsoleGroup.js:
7146        (WebInspector.ConsoleGroup.prototype.addMessage):
7147        * UserInterface/LogContentView.css:
7148        (.console-messages):
7149        (.console-messages :first-child):
7150        Use flex layout and an auto top margin to push items to the bottom until scrolled.
7151
7152        (.console-item):
7153        (.console-user-command .console-message):
7154        Move the border to the top since items are bottom aligned now.
7155
7156        * UserInterface/LogContentView.js:
7157        (WebInspector.LogContentView.prototype._mousedown):
7158        Focus the prompt if the click was in empty space.
7159
7160        * UserInterface/Main.js:
7161        (WebInspector.showSplitConsole):
7162        (WebInspector.hideSplitConsole):
7163        (WebInspector.showFullHeightConsole):
7164        (WebInspector._contentBrowserCurrentContentViewDidChange):
7165        Notify the QuickConsole via consoleLogVisibilityChanged when the log view shows
7166        or hides in the main content browser or split content browser.
7167
7168        * UserInterface/QuickConsole.css:
7169        (.quick-console.showing-log): Added. Lighten the border color.
7170
7171        * UserInterface/QuickConsole.js:
7172        (WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged): Added.
7173        Add or remove the showing-log style class.
7174
71752013-03-17  Timothy Hatcher  <timothy@apple.com>
7176
7177        Tweak how the console view and split console work.
7178
7179        Clicking the console button will always show the console full height. The console button
7180        is only blue when the console view is full height. Pressing escape always shows the split
7181        console. Add support for allowing the content view to decide if the split console can be
7182        shown. If it can't the full height console is shown instead.
7183
7184        Reviewed by Joseph Pecoraro.
7185
7186        * Localizations/en.lproj/localizedStrings.js:
7187        * UserInterface/ClusterContentView.js:
7188        (WebInspector.ClusterContentView.prototype.get supportsSplitContentBrowser):
7189        * UserInterface/ContentView.js:
7190        (WebInspector.ContentView.prototype.get supportsSplitContentBrowser):
7191        * UserInterface/ContentViewContainer.js:
7192        (WebInspector.ContentViewContainer.prototype._showContentView):
7193        (WebInspector.ContentViewContainer.prototype._hideContentView):
7194        * UserInterface/InstrumentSidebarPanel.js:
7195        (WebInspector.InstrumentSidebarPanel):
7196        * UserInterface/LogContentView.js:
7197        (WebInspector.LogContentView):
7198        (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
7199        (WebInspector.LogContentView.prototype._toggleSplit):
7200        * UserInterface/Main.js:
7201        (WebInspector.loaded):
7202        (WebInspector.contentLoaded):
7203        (WebInspector.isShowingSplitConsole):
7204        (WebInspector.currentViewSupportsSplitContentBrowser):
7205        (WebInspector.toggleSplitConsole):
7206        (WebInspector.showSplitConsole):
7207        (WebInspector.hideSplitConsole):
7208        (WebInspector.showFullHeightConsole):
7209        (WebInspector.isShowingConsoleView):
7210        (WebInspector.showConsoleView):
7211        (WebInspector.toggleConsoleView):
7212        (WebInspector._contentBrowserCurrentContentViewDidChange):
7213        * UserInterface/QuickConsole.js:
7214        (WebInspector.QuickConsole.prototype._toggleOrFocus):
7215        * UserInterface/TimelinesContentView.js:
7216        (WebInspector.TimelinesContentView.prototype.get supportsSplitContentBrowser):
7217
72182013-03-18  Joseph Pecoraro  <pecoraro@apple.com>
7219
7220        <rdar://problem/13443806> Safari Web Inspector: Point-to-inspect mode breaks when Node details sidebar open (112607)
7221
7222        Fix typos that could cause exceptions.
7223
7224        Reviewed by Timothy Hatcher.
7225
7226        * UserInterface/EventListenerSectionGroup.js:
7227        (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
7228
72292013-03-17  Timothy Hatcher  <timothy@apple.com>
7230
7231        Stop scaling the MoreColumns.pdf and LessColumns.pdf images.
7232
7233        Reviewed by Jon Honeycutt.
7234
7235        * UserInterface/TimelinesContentView.css:
7236        (.content-view.timelines > .data-grid th.collapser > .collapser-button):
7237        * UserInterface/TimelinesContentView.js:
7238
72392013-03-17  Timothy Hatcher  <timothy@apple.com>
7240
7241        Only call SidebarPanel's shown and hidden when the visibility actually changes.
7242
7243        This was causing the Console view to not be remembered between sessions because the
7244        InstrumentsPanel was selecting a tree element in the shown function, even though
7245        the sidebar panel was not visible.
7246
7247        Reviewed by Joseph Pecoraro.
7248
7249        * UserInterface/Sidebar.js:
7250        (WebInspector.Sidebar.prototype.set selectedSidebarPanel):
7251        (WebInspector.Sidebar.prototype.set collapsed):
7252
72532013-03-17  Timothy Hatcher  <timothy@apple.com>
7254
7255        Speed up Web Inspector image generation some by using Uint32Array.
7256
7257        Reviewed by Joseph Pecoraro.
7258
7259        * UserInterface/ImageUtilities.js:
7260        (generateColoredImage):
7261        (generateEmbossedImages._invertMaskImage):
7262        Use Uint32Array to process the pixels faster. Account for endianness (even though we don't
7263        really need to since we don't support Windows or PowerPC.)
7264
7265        * UserInterface/Utilities.js:
7266        (Uint32Array.isLittleEndian): Added.
7267
72682013-03-17  Timothy Hatcher  <timothy@apple.com>
7269
7270        Cache and restore generated images to speed up the load time for the Web Inspector.
7271
7272        <rdar://problem/13436334> Web Inspector takes about 3s to activate
7273
7274        Reviewed by Joseph Pecoraro.
7275
7276        * UserInterface/ButtonNavigationItem.js:
7277        (WebInspector.ButtonNavigationItem.prototype._generateImages):
7278        Pass !this._imageCacheable to generateEmbossedImages.
7279
7280        * UserInterface/ImageUtilities.js:
7281        (generateColoredImage):
7282        Don't set globalCompositeOperation to "clear" before using webkitPutImageDataHD.
7283
7284        (generateColoredImagesForCSS):
7285        (generateColoredImagesForCSS.imageLoaded): Added.
7286        (generateColoredImagesForCSS.ensureImageIsLoaded): Added.
7287        (generateColoredImagesForCSS.restoreImages): Added.
7288        (generateColoredImagesForCSS.restoreImage): Added.
7289        (generateColoredImagesForCSS.devicePixelRatioChanged): Added.
7290        (generateColoredImagesForCSS.generateImagesIfNeeded): Renamed from generateImages.
7291        (generateColoredImagesForCSS.generateImagesIfNeeded.generateActiveImages):
7292        (generateColoredImagesForCSS.generateImage):
7293        Try to restore the images first. If needed, load the image and regenerate them.
7294
7295        (_createImageLocalStorageKey): Added.
7296        (saveImageToLocalStorage): Added.
7297        (restoreImageFromLocalStorage): Added.
7298        (restoreImageFromLocalStorage.parseVersion): Added.
7299        Save and restore images via pixel arrays with localStorage. Abort the restore
7300        if versions mismatch or the array size isn't correct.
7301
7302        (generateEmbossedImages):
7303        (generateEmbossedImages.imageLoaded): Added.
7304        (generateEmbossedImages.ensureImageIsLoaded): Added.
7305        (generateEmbossedImages.restoreImages): Added.
7306        (generateEmbossedImages.restoreImage): Added.
7307        (generateEmbossedImages.devicePixelRatioChanged): Added.
7308        (generateEmbossedImages.generateImagesIfNeeded): Added.
7309        (generateEmbossedImages.generateImagesIfNeeded.generateActiveImages):
7310        (generateEmbossedImages.generateImage): Renamed from _createEmbossedCanvasImage.
7311        Try to restore the images first. If needed, load the image and regenerate them.
7312
7313        (generateEmbossedImages._invertMaskImage):
7314        (generateEmbossedImages._applyImageMask):
7315        Don't set globalCompositeOperation to "clear" before using webkitPutImageDataHD.
7316
7317        * UserInterface/ToggleButtonNavigationItem.js:
7318        Mark the image as not cacheable. We need to swap images with the same identifiers.
7319
73202013-03-17  Timothy Hatcher  <timothy@apple.com>
7321
7322        Make generateColoredImagesForCSS require passing image width and height.
7323
7324        This will be needed to cache and restore generated images for <rdar://problem/13436334>.
7325
7326        Reviewed by Joseph Pecoraro.
7327
7328        * UserInterface/CSSStyleDeclarationSection.js:
7329        (WebInspector.CSSStyleDeclarationSection):
7330        * UserInterface/DataGrid.js:
7331        (WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded):
7332        * UserInterface/DetailsSection.js:
7333        (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded):
7334        * UserInterface/FindBanner.js:
7335        (WebInspector.FindBanner.prototype._generateButtonsGlyphsIfNeeded):
7336        * UserInterface/ImageUtilities.js:
7337        (generateColoredImagesForCSS):
7338        * UserInterface/Main.js:
7339        (WebInspector._generateDisclosureTriangleImages):
7340        * UserInterface/NavigationSidebarPanel.js:
7341        (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded):
7342
73432013-03-17  Joseph Pecoraro  <pecoraro@apple.com>
7344
7345        Simplify giving ExecutionContexts for Frames a name
7346
7347        Reviewed by Dean Jackson.
7348
7349        * UserInterface/FrameResourceManager.js:
7350        (WebInspector.FrameResourceManager.prototype.executionContextCreated):
7351        * UserInterface/QuickConsole.js:
7352        (WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
7353        Make both iOS 6 and trunk use the frame's main resource's display name.
7354
73552013-03-17  Joseph Pecoraro  <pecoraro@apple.com>
7356
7357        Clean-up Weight.svg a little more.
7358
7359        Rubber-stamped by Timothy Hatcher.
7360
7361        * UserInterface/Images/Weight.svg:
7362        Removed the path id, and extra processing instruction attribute.
7363
73642013-03-17  Joseph Pecoraro  <pecoraro@apple.com>
7365
7366        Add Execution Context / Frame selector to the QuickConsole
7367
7368        <rdar://problem/10809363> PARITY (WebKit Web Inspector): UI for evaluating in different windows / frames from the console is missing
7369
7370        Reviewed by Dean Jackson.
7371
7372        * UserInterface/ExecutionContext.js:
7373        (WebInspector.ExecutionContext):
7374        Allow an execution context with the special undefined identifier.
7375
7376        * UserInterface/NavigationBar.js:
7377        (WebInspector.NavigationBar.prototype.get sizesToFit):
7378        * UserInterface/QuickConsoleNavigationBar.js:
7379        (WebInspector.QuickConsoleNavigationBar.prototype.get sizesToFit):
7380        * UserInterface/HierarchicalPathNavigationItem.js:
7381        (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout):
7382        The QuickConsoleNavigationBar stretches. Respect that laying out a hierarchical path.
7383
7384        * UserInterface/HierarchicalPathComponent.css:
7385        (.hierarchical-path-component > .selector-arrows):
7386        (.hierarchical-path-component.text-only):
7387        (.hierarchical-path-component.text-only > select):
7388        * UserInterface/HierarchicalPathComponent.js:
7389        (WebInspector.HierarchicalPathComponent):
7390        * UserInterface/Images/UpDownArrows.svg: Added.
7391        Allow creating a text only HierarchicalPathComponent, and one that shows
7392        up/down popup selector arrows.
7393
7394        * UserInterface/Frame.js:
7395        (WebInspector.Frame.prototype.commitProvisionalLoad):
7396        (WebInspector.Frame.prototype.clearExecutionContexts):
7397        Send an event when clearing contexts. Provide a flag for when it happens
7398        while a frame is navigating, in which case we would expect a new execution
7399        context soon for the new page.
7400
7401        * Localizations/en.lproj/localizedStrings.js:
7402        * UserInterface/QuickConsole.js:
7403        (WebInspector.QuickConsole):
7404        Register for events necessary to fill a selector picker with frames.
7405        iOS 6 needs to provide frame ids, so listen for added / removed frames.
7406        Trunk and later use ExecutionContexts which Frames broadcast changes for.
7407        Executing in the main frame uses "undefined".
7408
7409        (WebInspector.QuickConsole.prototype.get executionContextIdentifier):
7410        This is the selected identifier (contextId or frameId on iOS 6). If no
7411        selector is shown, this will still be the main frame execution context.
7412
7413        (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
7414        (WebInspector.QuickConsole.prototype._rebuildExecutionContextPathComponents):
7415        Update the nav bar components. There is a single segment, with the selected component.
7416
7417        (WebInspector.QuickConsole.prototype._framePageExecutionContextsCleared):
7418        (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
7419        Trunk, event handlers when frames get and clear execution contexts. When a frame
7420        navigates we have a little bit of logic to reselect that frame when its new
7421        execution context comes in.
7422
7423        (WebInspector.QuickConsole.prototype._frameAdded):
7424        (WebInspector.QuickConsole.prototype._frameRemoved):
7425        (WebInspector.QuickConsole.prototype._frameMainResourceChanged):
7426        iOS 6 support. Track frame adds, removes, and resource changes to update the display.
7427
7428        (WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
7429        (WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
7430        Helpers for creating path components. Handles iOS 6 and trunk to get the right id.
7431
7432        (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
7433        (WebInspector.QuickConsole.prototype._insertExecutionContextPathComponentForFrame):
7434        (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
7435        (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame):
7436        PathComponents are a linked list. We display them sorted. These are helpers for
7437        inserting, removing, and updating a path component in that list.
7438
7439        (WebInspector.QuickConsole.prototype._pathComponentSelected):
7440        (WebInspector.QuickConsole.prototype._debuggerActiveCallFrameDidChange):
7441        Changes to the state of the inspector that may require the UI to update.
7442
7443        * UserInterface/JavaScriptTextPrompt.js:
7444        (WebInspector.JavaScriptTextPrompt.prototype.evalInInspectedWindow):
7445        Evaluate in the context selected in the QuickConsole.
7446
74472013-03-17  Joseph Pecoraro  <pecoraro@apple.com>
7448
7449        Create an ExecutionContextList class.
7450
7451        <rdar://problem/10809363> PARITY (WebKit Web Inspector): UI for evaluating in different windows / frames from the console is missing
7452
7453        There may be many ExecutionContexts for a page, one for each isolated
7454        world in the frame. Store each context for a frame in an ExecutionContext
7455        and provide an accessor for the one that is the page context.
7456
7457        This also converges on the name "pageExecutionContext" instead of
7458        "mainExecutionContext" for the special context of the page.
7459
7460        Reviewed by Dean Jackson.
7461
7462        * UserInterface/Main.html:
7463        * UserInterface/ExecutionContextList.js: Added.
7464        (WebInspector.ExecutionContextList):
7465        (WebInspector.ExecutionContextList.prototype.get pageExecutionContext):
7466        (WebInspector.ExecutionContextList.prototype.get contexts):
7467        (WebInspector.ExecutionContextList.prototype.add):
7468        (WebInspector.ExecutionContextList.prototype.clear):
7469        ExecutionContextList holds a list of contexts and has a quick
7470        accessor for the page execution context.
7471
7472        * UserInterface/Frame.js:
7473        (WebInspector.Frame):
7474        (WebInspector.Frame.prototype.get pageExecutionContext):
7475        (WebInspector.Frame.prototype.get executionContextList):
7476        (WebInspector.Frame.prototype.clearExecutionContexts):
7477        (WebInspector.Frame.prototype.addExecutionContext):
7478        Updated to use an ExecutionContextList.
7479
7480        * UserInterface/DOMTree.js:
7481        (WebInspector.DOMTree):
7482        (WebInspector.DOMTree.prototype.requestRootDOMNode):
7483        (WebInspector.DOMTree.prototype._requestRootDOMNode):
7484        (WebInspector.DOMTree.prototype._framePageExecutionContextChanged):
7485        Updated from mainExecutionContext to pageExecutionContext.
7486
74872013-03-16  Timothy Hatcher  <timothy@apple.com>
7488
7489        Move the debugger controls from the quick console to the debugger sidebar.
7490
7491        Also dynamically add and remove the call stack section so it isn't an eyesore
7492        when you are not paused.
7493
7494        Reviewed by Joseph Pecoraro.
7495
7496        * Localizations/en.lproj/localizedStrings.js:
7497        * UserInterface/DebuggerSidebarPanel.css: Added.
7498        (.sidebar > .panel.debugger > .content):
7499        (.sidebar > .panel.debugger > .navigation-bar):
7500        * UserInterface/DebuggerSidebarPanel.js:
7501        (WebInspector.DebuggerSidebarPanel):
7502        (WebInspector.DebuggerSidebarPanel.prototype._debuggerPauseResumeButtonClicked):
7503        (WebInspector.DebuggerSidebarPanel.prototype._debuggerStepOverButtonClicked):
7504        (WebInspector.DebuggerSidebarPanel.prototype._debuggerStepIntoButtonClicked):
7505        (WebInspector.DebuggerSidebarPanel.prototype._debuggerStepOutButtonClicked):
7506        (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
7507        (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
7508        (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
7509        (WebInspector.DebuggerSidebarPanel.prototype.deselectCallStackContentTreeElements): Added.
7510        (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
7511        * UserInterface/Main.html:
7512        * UserInterface/QuickConsole.js:
7513        (WebInspector.QuickConsole):
7514        (WebInspector.QuickConsole.prototype._toggleOrFocus):
7515
75162013-03-16  Timothy Hatcher  <timothy@apple.com>
7517
7518        Make the toolbar labels look better in window mode.
7519
7520        Rubber-stamped by Joseph Pecoraro.
7521
7522        * UserInterface/Toolbar.css:
7523        (body:not(.docked) .toolbar .item.button > .label): Apply antialiased only to the labels
7524        so we don't affect text in the dashboard. Also add a stroke to make the text heavier.
7525
75262013-03-16  Timothy Hatcher  <timothy@apple.com>
7527
7528        Make toolbar items layout and collapse better at narrow window sizes.
7529
7530        <rdar://problem/13189092> Toolbar items can be laid out on top of each other with narrow window
7531
7532        Reviewed by Joseph Pecoraro.
7533
7534        * UserInterface/ButtonToolbarItem.css:
7535        (.toolbar.collapsed .item.button > .label): Removed. We only use icon-only now.
7536
7537        * UserInterface/DashboardView.css:
7538        (.toolbar.collapsed .dashboard): Added. Collapses when there is no room.
7539
7540        * UserInterface/NavigationBar.js:
7541        (WebInspector.NavigationBar.prototype.updateLayout): Call customUpdateLayout() if it exists.
7542
7543        * UserInterface/Toolbar.css:
7544        (.toolbar .item-section:not(.center)): Removed min-width and made flex be 1.
7545        (.toolbar .item-section.left): Added right margin to prevent touching.
7546        (.toolbar .item-section.center): Make flex be 2 so it can be a different width.
7547        (.toolbar .item-section.right): Added a left margin to prevent touching.
7548
7549        * UserInterface/Toolbar.js:
7550        (WebInspector.Toolbar.prototype.set displayMode): Revert the forced icon-only mode.
7551
7552        (WebInspector.Toolbar.prototype.customUpdateLayout.computeItemWidths): Added.
7553        (WebInspector.Toolbar.prototype.customUpdateLayout.computeSectionWidths): Added.
7554        (WebInspector.Toolbar.prototype.customUpdateLayout): Added.
7555        Computes each section individually for overflow. If any section overflow switch to icon-only
7556        mode when in horizontal-label mode. If any section overflows after that then collapse the
7557        toolbar, which only hides the Dashboard right now.
7558
75592013-03-16  Timothy Hatcher  <timothy@apple.com>
7560
7561        Make the labels in the Instruments sidebar be 11px instead of 10px.
7562
7563        Reviewed by Joseph Pecoraro.
7564
7565        * UserInterface/NavigationSidebarPanel.css:
7566        Removed a rule that was making the font-size 10px. Only the Instruments
7567        sidebar triggered this rule.
7568
75692013-03-16  Timothy Hatcher  <timothy@apple.com>
7570
7571        Break-up the generation of images and delay the generation of
7572        active images so the initial page load is faster.
7573
7574        <rdar://problem/13436334> Web Inspector takes about 3s to activate
7575
7576        Reviewed by Joseph Pecoraro.
7577
7578        * UserInterface/ImageUtilities.js:
7579        (.generateImages.generateActiveImages): Added.
7580        (.generateImages): Set a tiemout to call generateActiveImages.
7581        (._generateImages.generateActiveImages): Added.
7582        (._generateImages): Set a tiemout to call generateActiveImages.
7583
75842013-03-15  Timothy Hatcher  <timothy@apple.com>
7585
7586        Sort resources by domain before sorting alphabetically by name.
7587
7588        This was suggested by someone on Twitter. It allows local resources to bubble
7589        to the top and external resources (analytic scripts, etc.) to come later.
7590
7591        Reviewed by Joseph Pecoraro.
7592
7593        * UserInterface/GeneralTreeElement.js:
7594        (WebInspector.GeneralTreeElement):
7595        (WebInspector.GeneralTreeElement.prototype.set mainTitle):
7596        (WebInspector.GeneralTreeElement.prototype.set subtitle):
7597        Fallback to "" for mainTitle and subtitle.
7598 
7599        * UserInterface/ResourceTreeElement.js:
7600        (WebInspector.ResourceTreeElement.compareResourceTreeElements):
7601        Sort resources by domain (subtitle) before sorting by name (mainTitle).
7602
76032013-03-15  Jessie Berlin  <jberlin@apple.com>
7604
7605        Ran update-safari-localizable-strings.
7606
7607        * Localizations/en.lproj/localizedStrings.js:
7608
76092013-03-14  Timothy Hatcher  <timothy@apple.com>
7610
7611        Display em-dashes instead of "0" for resources size and time to make it clear
7612        the values are not known yet.
7613
7614        Reviewed by Joseph Pecoraro.
7615
7616        * UserInterface/DashboardView.js:
7617        (WebInspector.DashboardView.prototype.set time):
7618        (WebInspector.DashboardView.prototype.set resourcesSize):
7619
76202013-03-14  Timothy Hatcher  <timothy@apple.com>
7621
7622        Remove references to bottomUpHead. We can build the bottom-up tree locally.
7623
7624        The bottomUpHead is being removed from the protocol by https://webkit.org/b/112351.
7625        Also remove references to TopDownTreeFactory and BottomUpTreeFactory with is dead code.
7626
7627        Reviewed by Joseph Pecoraro.
7628
7629        * UserInterface/JavaScriptProfileView.js:
7630        (WebInspector.JavaScriptProfileView.prototype.get bottomUpProfileDataGridTree):
7631
76322013-03-14  Timothy Hatcher  <timothy@apple.com>
7633
7634        Always specify overflow-x when specifying overflow-y.
7635
7636        Not specifying overflow-x causes it to be auto and can show scrollbars for wide content.
7637        Also use auto instead of scroll in a few places to prevent scroll bars from always being
7638        visible when the system prefers non-overlay scrollbars.
7639
7640        Reviewed by Joseph Pecoraro.
7641
7642        * UserInterface/CSSStyleDetailsSidebarPanel.css:
7643        (.sidebar > .panel.details.css-style > .content):
7644        * UserInterface/LayerTreeSidebarPanel.css:
7645        (.layer-tree.panel .data-container):
7646        * UserInterface/LogContentView.css:
7647        (.console-messages):
7648        * UserInterface/Popover.css:
7649        (.popover > .container):
7650
76512013-03-14  Timothy Hatcher  <timothy@apple.com>
7652
7653        Remove the memory placeholder in the toolbar dashboard now that we deferred that feature.
7654
7655        This also evenly distributes the items for a better layout in all modes.
7656
7657        <rdar://problem/13237747> Dashboard items are not evenly distributed
7658
7659        Reviewed by Joseph Pecoraro.
7660
7661        * Localizations/en.lproj/localizedStrings.js: Updated.
7662
7663        * UserInterface/DashboardView.css:
7664        Overhauled the styles to use flex layout in all cases.
7665
7666        * UserInterface/DashboardView.js:
7667        (WebInspector.DashboardView):
7668        Removed memory and split resources into resourceCount and resourcesSize.
7669
7670        (WebInspector.DashboardView.prototype.set logs):
7671        (WebInspector.DashboardView.prototype.set issues):
7672        (WebInspector.DashboardView.prototype.set errors):
7673        (WebInspector.DashboardView.prototype.set resourcesCount):
7674        Call _formatPossibleLargeNumber and set the outlet.
7675
7676        (WebInspector.DashboardView.prototype.set resourcesSize):
7677        Set the resourcesSize outlet instead of calling _updateResourcesOutlet.
7678
7679        (WebInspector.DashboardView.prototype._formatPossibleLargeNumber):
7680        Added. This is a better approach to dealing with large numbers than ellipsis.
7681
7682        (WebInspector.DashboardView.prototype._appendElementForNamedItem):
7683        Removed the double div. It is no longer needed to truncate since all the outlets
7684        can't really go larger than 6 characters now.
7685
7686        (WebInspector.DashboardView.prototype._networkItemWasClicked):
7687        Renamed from _timeWasClicked so resourcesSize can use it.
7688
7689        * UserInterface/Images/Weight.svg: Added.
7690
76912013-03-13  Timothy Hatcher  <timothy@apple.com>
7692
7693        Mark DOM node styles as needing refreshed when an ancestor changes pseudo classes or any attributes change.
7694
7695        <rdar://problem/13412234> REGRESSION: Style details sidebar does not update when ancestor nodes change
7696
7697        Reviewed by Joseph Pecoraro.
7698
7699        * UserInterface/CSSStyleManager.js:
7700        (WebInspector.CSSStyleManager): Add event listeners for all nodes.
7701        (WebInspector.CSSStyleManager.prototype._nodePseudoClassesDidChange): Added.
7702        (WebInspector.CSSStyleManager.prototype._nodeAttributesDidChange): Added.
7703        * UserInterface/DOMNodeStyles.js:
7704        (WebInspector.DOMNodeStyles): Remove event listeners on the single node.
7705        (WebInspector.DOMNodeStyles.prototype.pseudoClassesDidChange): Added.
7706        (WebInspector.DOMNodeStyles.prototype.attributeDidChange): Added.
7707
77082013-03-13  Timothy Hatcher  <timothy@apple.com>
7709
7710        Always refresh the DOM node styles when visibility changes for the sidebar or separate panels.
7711
7712        <rdar://problem/13412234> REGRESSION: Style details sidebar does not update when ancestor nodes change
7713
7714        Reviewed by Joseph Pecoraro.
7715
7716        * UserInterface/CSSStyleDetailsSidebarPanel.js:
7717        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
7718        Call markAsNeedsRefresh instead of the removed refreshIfNeeded.
7719
7720        * UserInterface/StyleDetailsPanel.js:
7721        (WebInspector.StyleDetailsPanel):
7722        (WebInspector.StyleDetailsPanel.prototype.shown):
7723        (WebInspector.StyleDetailsPanel.prototype.markAsNeedsRefresh):
7724        (WebInspector.StyleDetailsPanel.prototype._refreshNodeStyles): Added.
7725        (WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed):
7726        (WebInspector.StyleDetailsPanel.prototype._nodeStylesNeedsRefreshed):
7727        Remove the concept of having a separate needs refresh flag. Instead we just call refresh on the DOMNodeStyles
7728        and wait for the Refreshed event. This way we always get the latest styles when first showing the panel.
7729
77302013-03-14  Joseph Pecoraro  <pecoraro@apple.com>
7731
7732        <rdar://problem/13421555> Source code links should always show the original location
7733
7734        Location links will now show the original location normally, and
7735        display a mapped / formatted display location in italics when hovered,
7736        but only if such a location exists.
7737
7738        Reviewed by Timothy Hatcher.
7739
7740        * UserInterface/LayoutTimelineDataGridNode.js:
7741        (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
7742        * UserInterface/Main.js:
7743        (WebInspector.createSourceCodeLocationLink):
7744        Use the SourceCodeLocation helpers to keep the contents live.
7745
7746        * UserInterface/Main.css:
7747        (.display-location):
7748        Make display locations italic.
7749
7750        * UserInterface/SourceCodeLocation.js:
7751        (WebInspector.SourceCodeLocation.prototype.tooltipString):
7752        (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationTooltip):
7753        (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
7754        Different handlers to keep a tooltip or element property live.
7755
77562013-03-14  Joseph Pecoraro  <pecoraro@apple.com>
7757
7758        <rdar://problem/13418338> Show / Hide Shadow DOM should not change the selected node, or select the earliest ancestor
7759
7760        Reviewed by Timothy Hatcher.
7761
7762        * UserInterface/DOMTreeOutline.js:
7763
77642013-03-14  Joseph Pecoraro  <pecoraro@apple.com>
7765
7766        <rdar://problem/13418332> Remove or selectively show "Show Shadow DOM" context menu, there is a nav bar button
7767
7768        Reviewed by Timothy Hatcher.
7769
7770        * UserInterface/DOMTreeOutline.js:
7771        (WebInspector.DOMTreeOutline.prototype.populateContextMenu):
7772        (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
7773
77742013-03-14  Joseph Pecoraro  <pecoraro@apple.com>
7775
7776        Improve JavaScript pretty printing of "finally"
7777
7778        Reviewed by Timothy Hatcher.
7779
7780        * UserInterface/CodeMirrorFormatters.js:
7781        * Tools/PrettyPrinting/CodeMirrorFormatters.js:
7782
77832013-03-14  Joseph Pecoraro  <pecoraro@apple.com>
7784
7785        Provide a SourceCodeLocation helper that keeps an element text up to date.
7786
7787        Reviewed by Timothy Hatcher.
7788
7789        * UserInterface/LayoutTimelineDataGridNode.js:
7790        (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
7791        * UserInterface/SourceCodeLocation.js:
7792        (WebInspector.SourceCodeLocation.prototype.setAndKeepElementDisplayLocationStringUpToDate):
7793
77942013-03-14  Joseph Pecoraro  <pecoraro@apple.com>
7795
7796        Let WebInspector.createSourceCodeLocationLink create a goToArrow
7797
7798        Reviewed by Timothy Hatcher.
7799
7800        This allows LayoutTimelineDataGridNode to use createSourceCodeLocationLink
7801        and not remove its children.
7802
7803        * UserInterface/LayoutTimelineDataGridNode.js:
7804        (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
7805        * UserInterface/Main.js:
7806        (.updateLinkDisplayStrings):
7807        (WebInspector.createSourceCodeLocationLink):
7808
78092013-03-14  Joseph Pecoraro  <pecoraro@apple.com>
7810
7811        WebInspector.createSourceCodeLocationLink use SourceCodeLocation's full power
7812
7813        Reviewed by Timothy Hatcher.
7814
7815        When a link is created with a source code location we can show the real
7816        location (mapped location, formatted location, original location) and
7817        update the link and tooltip when things change.
7818
7819        * UserInterface/EventListenerSectionGroup.js:
7820        (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
7821        Switch to from createSourceCodeLink to createSourceCodeLocationLink.
7822
7823        * UserInterface/Main.js:
7824        (WebInspector.createSourceCodeLocationLink):
7825        Update link text and tooltip when the location changes.
7826
7827        * UserInterface/SourceCodeLocation.js:
7828        (WebInspector.SourceCodeLocation.prototype._locationString):
7829        Use SourceCode.displayName and handle source codes without URLs if needed.
7830
78312013-03-14  Joseph Pecoraro  <pecoraro@apple.com>
7832
7833        <rdar://problem/13386143> REGRESSION (CodeMirror): Jump to line / reveal line should reveal closer to the middle of the editor never the top or bottom if possible
7834
7835        If revealLine is called with a line outside the visible set of lines
7836        in the editor then scroll the editor to make that line the center.
7837        This also behaves as expected for lines the start / end of a document.
7838
7839        Reviewed by Timothy Hatcher.
7840
7841        * UserInterface/TextEditor.js:
7842        (WebInspector.TextEditor.prototype.shown):
7843        In order for cm.getScrollInfo() values to be valid after an editor is
7844        reattached to the DOM Hierarchy we have to call refresh, and because of
7845        the way CodeMirror works (coalescing changes in operations) the
7846        getScrollInfo is only valid after the refresh operation. So remove the
7847        wrapping operation here.
7848
7849        (WebInspector.TextEditor.prototype.set formatted):
7850        If you pretty print a document do not send a change event and
7851        cause the value to be sent to the backend. The frontend style
7852        sidebar expects line and column numbers for the original
7853        unformatted document.
7854
7855        (WebInspector.TextEditor.prototype.revealAndHighlightLine):
7856        (WebInspector.TextEditor.prototype.revealLine):
7857        (WebInspector.TextEditor.prototype._scrollIntoViewCentered):
7858        (WebInspector.TextEditor.prototype._prettyPrint):
7859        In revealLine or prettyPrint when we move the selection make a decision
7860        whether or not to scroll the editor to put that line in the center.
7861
78622013-03-14  Joseph Pecoraro  <pecoraro@apple.com>
7863
7864        Update CodeMirror to ToT (v3.1+) which includes some JavaScript language and selection fixes
7865
7866        <rdar://problem/13396332> CodeMirror: Selection on lines that wrap more than once is incorrect
7867
7868        Rubber-stamped by Timothy Hatcher.
7869
7870        * UserInterface/External/CodeMirror/codemirror.js:
7871        * UserInterface/External/CodeMirror/javascript.js:
7872
78732013-03-14  Joseph Pecoraro  <pecoraro@apple.com>
7874
7875        <rdar://problem/13410237> REGRESSION: Editing CSS resources no longer works (it is read-only)
7876
7877        Reviewed by Ricky Mondello.
7878
7879        * UserInterface/TextEditor.js:
7880        (WebInspector.TextEditor.prototype.set readOnly):
7881
78822013-03-14  Antoine Quint  <graouts@apple.com>
7883
7884        <rdar://problem/13410257> Display the reason why a layer is composited
7885
7886        Retrieve the reason why the selected layer in the layer tree sidebar
7887        panel is composited and display them in a popover anchored to the
7888        selected data grid node, removing the popover when the inspector
7889        loses focus or the data grid node is no longer selected.
7890
7891        Reviewed by Joseph Pecoraro.
7892
7893        * Localizations/en.lproj/localizedStrings.js:
7894        Add new strings used to display the various compositing reasons.
7895
7896        * UserInterface/InspectorBackendCommands.js:
7897        Add new LayerTree.reasonsForCompositingLayer() protocol method.
7898
7899        * UserInterface/LayerTreeManager.js:
7900        (WebInspector.LayerTreeManager.prototype.reasonsForCompositingLayer):
7901        Wrapper for the new LayerTree.reasonsForCompositingLayer() protocol
7902        method.
7903
7904        * UserInterface/LayerTreeSidebarPanel.css:
7905        (.layer-tree-popover):
7906        (.layer-tree-popover p):
7907        (.layer-tree-popover ul):
7908        (.layer-tree-popover li):
7909        Styles for the content displayed in a popover to show the compositing
7910        reasons for the selected layer.
7911
7912        * UserInterface/LayerTreeSidebarPanel.js:
7913        (WebInspector.LayerTreeSidebarPanel.prototype._selectedDataGridNodeChanged):
7914        On top of highlighting the appropriate region in the canvas for the
7915        selected layer, also show a popover with the reasons why it was
7916        composited or remove the popover if there are no selected layers.
7917
7918        (WebInspector.LayerTreeSidebarPanel.prototype._dataGridGainedFocus):
7919        Show the popover for the selected data grid node.
7920
7921        (WebInspector.LayerTreeSidebarPanel.prototype._dataGridLostFocus):
7922        Hide the popover.
7923
7924        (WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
7925        (WebInspector.LayerTreeSidebarPanel.prototype._hidePopover):
7926        (WebInspector.LayerTreeSidebarPanel.prototype.):
7927        (WebInspector.LayerTreeSidebarPanel.prototype._populateListOfCompositingReasons):
7928        Show a popover listing the compositing reasons for the selected layer
7929        anchored to the selected data grid node. The content of the popover
7930        is provided after the call to the agent to retrieve the reasons for
7931        compositing has returned.
7932
7933        * UserInterface/Popover.css:
7934        (.popover):
7935        (.popover.arrow-up):
7936        (.popover.arrow-right):
7937        (.popover.arrow-down):
7938        (.popover.arrow-left):
7939        * UserInterface/Popover.js:
7940        (WebInspector.Popover.prototype.area):
7941        (WebInspector.Popover.prototype.present):
7942        (WebInspector.Popover.prototype._bestMetricsForEdge):
7943        Miscellaneous enhancements for better popover behavior where we correctly
7944        round up the metrics for the hosted content, ensure we interrupt a dismiss
7945        animation when presenting the popover again, and change the sizing behavior
7946        to take into account the various padding metrics applied as a result of
7947        picking a given edge.
7948
79492013-03-13  Timothy Hatcher  <timothy@apple.com>
7950
7951        Don't wait until DOMContentLoaded to do non-UI initialization when loading the Web Inspector.
7952
7953        Part of: <rdar://problem/13412219> REGRESSION: Opening the Web Inspector takes 5s
7954
7955        Reviewed by Joseph Pecoraro.
7956
7957        * UserInterface/CodeMirrorAdditions.js:
7958        Moved extra MIME-type registration here.
7959
7960        * UserInterface/Main.html:
7961        Added a inline script to call WebInspector.loaded(). This needs to be outside of Main.js so it
7962        comes after the scripts added via document.write when Main.js is a combined file.
7963
7964        * UserInterface/Main.js:
7965        (WebInspector.loaded): Added. Moved code from contentLoaded.
7966        (WebInspector.contentLoaded): Moved code to loaded.
7967        (WebInspector._windowResized): Call _contentBrowserSizeDidChange to avoid registering for resize twice.
7968
79692013-03-13  Timothy Hatcher  <timothy@apple.com>
7970
7971        Add selected images for UserInputResult.pdf and UserInputPromptPrevious.pdf.
7972
7973        Reviewed by Joseph Pecoraro.
7974
7975        * UserInterface/Images/UserInputPromptPreviousSelected.pdf: Added.
7976        * UserInterface/Images/UserInputResultSelected.pdf: Added.
7977        * UserInterface/LogContentView.css:
7978        (.console-messages:focus .console-item.selected .console-user-command-result.console-log-level::before):
7979        (.console-messages:focus .console-item.selected .console-user-command::before):
7980
79812013-03-13  Timothy Hatcher  <timothy@apple.com>
7982
7983        Make copy work in the split console.
7984
7985        <rdar://problem/13411428> Copy does not work if the console is in split view
7986
7987        Reviewed by Joseph Pecoraro.
7988
7989        * UserInterface/Main.js:
7990        (WebInspector._focusedContentView): Added.
7991        (WebInspector._beforecopy): Structure more like _copy. Use _focusedContentView.
7992        (WebInspector._copy): Use _focusedContentView.
7993
79942013-03-13  Timothy Hatcher  <timothy@apple.com>
7995
7996        Remove old focus tracking code in EditingSupport.js and start tracking currentFocusElement
7997        and previousFocusElement in Main.js's _focusChanged handler.
7998
7999        Reviewed by Joseph Pecoraro.
8000
8001        * UserInterface/EditingSupport.js:
8002        (WebInspector.startEditing.cleanUpAfterEditing): Use restoreFocusFromElement().
8003
8004        * UserInterface/JavaScriptTextPrompt.js:
8005        (WebInspector.JavaScriptTextPrompt.prototype.focus): Use focus().
8006
8007        * UserInterface/Main.js:
8008        (WebInspector.restoreFocusFromElement): Added.
8009        (WebInspector._focusChanged): Set currentFocusElement and previousFocusElement.
8010
8011        * UserInterface/TextPrompt.js:
8012        (WebInspector.TextPrompt.prototype._startEditing): Use focus().
8013
80142013-03-13  Timothy Hatcher  <timothy@apple.com>
8015
8016        Fix some things with the new console selection behavior.
8017
8018        * Makes sure all disclosure triangles and text are white when the row selection is blue.
8019        * Makes sure all disclosure triangles and text are normal when the row selection is gray.
8020        * Fixes a bug where click would cause the row to jump between top and bottom reveal instead of
8021          toggling a clicked disclosure triangle.
8022        * Only expand recursively if the Option key is pressed. This matches the TreeOutline code.
8023        * Collapse recursively if the option key is pressed.
8024        * Better aligns the disclosure triangles with DOM tree nodes.
8025
8026        Reviewed by Antoine Quint.
8027
8028        * UserInterface/LogContentView.css:
8029        (.console-messages):
8030        (.console-item.selected):
8031        (.console-messages:focus .console-item.selected *):
8032        (.console-group-title::before):
8033        (.console-messages:focus .console-item.selected .console-group-title::before):
8034        (.console-messages:focus .console-group.collapsed .console-item.selected .console-group-title::before):
8035        (.console-messages:focus .console-item.selected .section .header .title):
8036        (.console-message-url):
8037        (.console-messages:focus .console-item.selected .section .header::before):
8038        (.console-messages:focus .console-item.selected .section.expanded .header::before):
8039        (.console-messages:focus .console-item.selected .properties-tree li.parent::before):
8040        (.console-messages:focus .console-item.selected .properties-tree li.parent.expanded::before):
8041        (.outline-disclosure li.parent::before):
8042        (.console-messages:focus .console-item.selected .outline-disclosure li.parent::before):
8043        (.console-messages:focus .console-item.selected .outline-disclosure li.parent.expanded::before):
8044
8045        * UserInterface/LogContentView.js:
8046        (WebInspector.LogContentView.prototype._mousedown):
8047        Use focus() instead of setCurrentFocusElement. The setCurrentFocusElement function is legacy and
8048        should be removed someday.
8049
8050        (WebInspector.LogContentView.prototype._updateMessagesSelection):
8051        Don't call _ensureMessageIsVisible if the message was already selected from the start.
8052
8053        (WebInspector.LogContentView.prototype._rightArrowWasPressed):
8054        (WebInspector.LogContentView.prototype._leftArrowWasPressed):
8055        Only expand or collapse recursively if the Option key is pressed.
8056
80572013-03-13  Timothy Hatcher  <timothy@apple.com>
8058
8059        Tweak the New Rule behavior in the Style details sidebar.
8060
8061        Makes sure to scroll to reveal the section when it is focused. Also use appropriateSelectorFor
8062        instead of displayNameForNode to generate better selectors.
8063
8064        Reviewed by Antoine Quint.
8065
8066        * UserInterface/DOMNodeStyles.js:
8067        (WebInspector.DOMNodeStyles.prototype.addRule): Use appropriateSelectorFor.
8068        * UserInterface/RulesStyleDetailsPanel.js:
8069        (WebInspector.RulesStyleDetailsPanel.prototype.refresh.scrollToFocusedSection): Added.
8070        (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Call scrollToFocusedSection on a timeout.
8071
80722013-03-13  Antoine Quint  <graouts@apple.com>
8073
8074        Make the "Memory" outlet at the bottom of the layer tree
8075        sidebar panel align to the right as expected.
8076
8077        Reviewed by Timothy Hatcher.
8078
8079        * UserInterface/LayerTreeSidebarPanel.css:
8080        (.layer-tree.panel .layers-memory-label):
8081
80822013-03-13  Antoine Quint  <graouts@apple.com>
8083
8084        <rdar://problem/13410203> Correctly identify layers for generated and reflected content
8085
8086        We now correctly identify layers as reflected content and/or generated
8087        content with a more appropriate name in the "child layers" data grid.
8088        Additionally, we highlight the bounds of the layer on the page to
8089        clearly identify what this reflection or generated content is on the
8090        canvas.
8091
8092        Reviewed by Joseph Pecoraro.
8093
8094        * Localizations/en.lproj/localizedStrings.js:
8095        New localized string used to identify reflections layers.
8096
8097        * UserInterface/DOMTreeManager.js:
8098        (WebInspector.DOMTreeManager.prototype.highlightRect):
8099        New method wrapping DOMAgent.highlightRect().
8100
8101        * UserInterface/LayerTreeDataGridNode.js:
8102        (WebInspector.LayerTreeDataGridNode.prototype.set layer):
8103        Further qualify the layer by adding either the ::before or ::after
8104        pseudo-class for layers that are associated to generated content as
8105        well as a localized "Reflection for" prefix for reflected layers.
8106
8107        * UserInterface/LayerTreeSidebarPanel.js:
8108        (WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
8109        Check what type of layer is now selected and call the new
8110        DOMTreeManager.highlightRect() method in case we're dealing with a
8111        reflection or generated layer.
8112
81132013-03-13  Antoine Quint  <graouts@apple.com>
8114
8115        <rdar://problem/13209485> Layer Tree sidebar should respect "show-shadow-dom" setting
8116
8117        The layer tree sidebar panel data grid now respects the
8118        "show-shadow-dom" setting.
8119
8120        Reviewed by Timothy Hatcher.
8121
8122        * UserInterface/LayerTreeSidebarPanel.js:
8123        (WebInspector.LayerTreeSidebarPanel):
8124        Track changes for the "show-shadow-dom" setting.
8125
8126        (WebInspector.LayerTreeSidebarPanel.prototype.refresh):
8127        Keep track of the unfiltered set of child layers returned when calling
8128        into the LayerTreeAgent such that we can reuse this unfiltered list
8129        of child layers layer as the "show-shadow-dom" setting changes.
8130
8131        (WebInspector.LayerTreeSidebarPanel.prototype._showShadowDOMSettingChanged):
8132        Update the display such that the new setting is taken into account.
8133
8134        (WebInspector.LayerTreeSidebarPanel.prototype._updateDisplayWithLayers):
8135        Filter the list of child layers to take into account the
8136        "show-shadow-dom" setting. We also keep track of the layer for
8137        the current node in the new "_layerForNode" property such that
8138        it may be used to call into this method again when we need to
8139        update the shadow DOM filter without querying the backend again.
8140
81412013-03-13  Antoine Quint  <graouts@apple.com>
8142
8143        <rdar://problem/13409543> Adopt new LayerTreeAgent protocol
8144
8145        We remove all code related to the previous LayerTreeAgent protocol where
8146        we'd use the LayerTree.getLayerTree() and LayerTree.nodeIdForLayerId()
8147        methods which have now been replaced by a single method to provide the
8148        layers in the scope of a given DOM subtree with LayerTree.layersForNode().
8149
8150        Reviewed by Joseph Pecoraro.
8151
8152        * Localizations/en.lproj/localizedStrings.js:
8153        Remove the strings related to composited layers since the protocol now
8154        only provides composited layers.
8155
8156        * UserInterface/InspectorBackendCommands.js:
8157        Remove the old LayerTree.getLayerTree() and LayerTree.nodeIdForLayerId()
8158        protocol methods and add the new LayerTree.layersForNode() method.
8159
8160        * UserInterface/LayerTreeDataGridNode.js:
8161        (WebInspector.LayerTreeDataGridNode.prototype.get layer):
8162        New public accessor for the "_layer" property such that the
8163        LayerTreeSidebarPanel may access properties of the selected data grid
8164        node's layer.
8165
8166        (WebInspector.LayerTreeDataGridNode.prototype.set layer):
8167        Remove the check for a valid node since the protocol ensures that layers
8168        now have a valid nodeId pushed to the front-end. We're also removing the
8169        redundant "layerData" property by just letting the layer be accessible
8170        via a public accessor.
8171
8172        (WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
8173        Use the "_layer" property to find out the nodeId rather than the removed
8174        "layerData" property.
8175
8176        * UserInterface/LayerTreeManager.js:
8177        (WebInspector.LayerTreeManager):
8178        Remove the hard-coded disabling of the LayerTree features in the front-end
8179        and instead use a real run-time check for availability of the LayerTreeAgent.
8180        We also remove some ivars we no longer use.
8181
8182        (WebInspector.LayerTreeManager.prototype.layerTreeMutations):
8183        Complete rewrite of the method to account for the richer set of
8184        information exposed by the new protocol. We now have to take into account
8185        much more than just layer ids to indentify mutations, node ids should also
8186        be taken into account to check if a layer for the same node has appeared
8187        with a new layer id (as it may have been destroyed and recreated for a
8188        content update). We also need to take into account generated content and
8189        reflections, which may have pseudo element ids.
8190
8191        (WebInspector.LayerTreeManager.prototype.layersForNode):
8192        New wrapper for the new LayerTreeAgent.layersForNode() protocol method.
8193
8194        (WebInspector.LayerTreeManager.prototype.layerTreeDidChange):
8195        We no longer obtain the layer tree upon a change, we merely dispatch
8196        an event indicating that the layer tree has changed.
8197
8198        * UserInterface/LayerTreeSidebarPanel.js:
8199        (WebInspector.LayerTreeSidebarPanel):
8200        Remove the setting to only show composited layers since the protocol now
8201        only returns composited layers.
8202
8203        (WebInspector.LayerTreeSidebarPanel.prototype.refresh):
8204        Retrieve layers from the agent and update our display with the result.
8205
8206        (WebInspector.LayerTreeSidebarPanel.prototype._layerTreeDidChange):
8207        Mark that we need a refresh following a change in the layer tree.
8208
8209        (WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
8210        No longer show the "Composited" row since all layers are now composited.
8211
8212        (WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
8213        No longer build the "only show composited layers" checkbox.        
8214
8215        (WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid):
8216        (WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
8217        Use the now-public "layer" property on the LayerTreeDataGridNode to
8218        look up layer information for sorting.
8219
8220        (WebInspector.LayerTreeSidebarPanel.prototype._updateDisplayWithLayers):
8221        Keep track of the new child layers in a "_childLayers" property.
8222
8223        (WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
8224        Remove the checks for composited since all layers are now composited.
8225
8226        (WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid):
8227        (WebInspector.LayerTreeSidebarPanel.prototype._updateMetrics):
8228        Update to use new properties on layer objects per the change in protocol.
8229
82302013-03-13  Antoine Quint  <graouts@apple.com>
8231
8232        <rdar://problem/12886275> Selecting errors in the console doesn't select the error and the filename
8233
8234        In order to be able to provide custom content to the clipboard for console messages,
8235        we must also allow selection of console messages in a different way than via text
8236        selection. In this patch, we make the list of messages selectable, supporting the
8237        selection types one would expect from a desktop application. I go into the details
8238        of what features exactly are implemented in the per-method discussion below.
8239
8240        Reviewed by Timothy Hatcher.
8241
8242        * UserInterface/ConsoleCommand.js:
8243        (WebInspector.ConsoleCommand.prototype.toClipboardString):
8244        Adopt the protocol to provide a custom clipboard string in the form of
8245        "> theJSCommand();".
8246        
8247        * UserInterface/ConsoleCommandResult.js:
8248        (WebInspector.ConsoleCommandResult.prototype.toClipboardString):
8249        Adopt the protocol to provide a custom clipboard string in the form of
8250        "< theCommandResult".
8251
8252        * UserInterface/ConsoleGroup.js:
8253        (WebInspector.ConsoleGroup.prototype.addMessage):
8254        Wrap individual messages in a group within a wrapper element with a "console-item"
8255        CSS class. These elements are used to apply a "selected" or "filtered-out" class and
8256        to draw the full-width borders on the items.
8257
8258        * UserInterface/ConsoleMessageImpl.js:
8259        (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
8260        Refactor to use new _shouldDumpStackTrace() method.
8261
8262        (WebInspector.ConsoleMessageImpl.prototype._shouldDumpStackTrace):
8263        New method to share logic once used only in _formatMessage() with
8264        toClipboardString() as well.
8265
8266        (WebInspector.ConsoleMessageImpl.prototype.toString):
8267        Refactor to use new "levelString" property.
8268
8269        (WebInspector.ConsoleMessageImpl.prototype.get levelString):
8270        New accessor to share logic once used only in toString() with toClipboardString()
8271        as well.
8272
8273        (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
8274        Adopt the protocol to provide a custom clipboard string where we log the level,
8275        message text, url, line number and optionally the stack frames.
8276
8277        * UserInterface/JavaScriptLogViewController.js:
8278        (WebInspector.JavaScriptLogViewController.prototype.appendConsoleMessage):
8279        Return the cloned message so that we may manipulate it from call sites (ie. in
8280        LogContentView.prototype._messageAdded()).
8281
8282        (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Fix a
8283        missing semi-colon.
8284
8285        * UserInterface/LogContentView.css:
8286        (.console-messages):
8287        Remove useless properties.
8288
8289        (.console-item):
8290        Basic style for all console item wrappers, draw a 1px bottom border.
8291
8292        (.console-item.selected):
8293        Background color for selected items when the container doesn't have focus (gray).
8294
8295        (.console-messages:focus .console-item.selected):
8296        Background color for selected items when the container has focus (blue).
8297
8298        (.console-messages:focus .console-item.selected *):
8299        Make all text in selected items white.
8300
8301        (.console-item.selected .console-group-title::before):
8302        Use a white triangle for selected items.
8303
8304        (.console-group.collapsed .console-item.selected .console-group-title::before):
8305        Use a white triangle for selected items.
8306
8307        (.console-item.selected .console-error-level .section .header .title):
8308        Ensure text is white in selected items.
8309
8310        (.console-item.selected .console-debug-level .console-message-text):
8311        Ensure text is white in selected items.
8312
8313        (.auto-complete-text, .editing .auto-complete-text):
8314        Remove useless property.
8315
8316        (.console-item.selected .outline-disclosure li.parent::before):
8317        Use a white triangle for selected items.
8318
8319        (.console-item.selected .outline-disclosure li.parent.expanded::before):
8320        Use a white triangle for selected items.
8321
8322        (.console-item.filtered-out):
8323        Remove all filtered-out items from layout.
8324
8325        * UserInterface/LogContentView.js:
8326        (WebInspector.LogContentView):
8327        New ivars to track the current nesting level and the list of all selected message
8328        elements. We also start tracking a series of keyboard and mouse events on the
8329        messages container to implement multiple selection of message elements.
8330
8331        (WebInspector.LogContentView.prototype.updateLayout):
8332        Override this ContentView method to track the height of the messages container
8333        in order to update the scroll position of the container as we ensure the visibility
8334        of selected items.
8335
8336        (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
8337        Manually nest the messages hosted in wrappers and keep track of the nesting level
8338        as groups are opened and closed. We also clear all focusable children there as new
8339        content may have been added with markup using the "tabindex" attributes.
8340
8341        (WebInspector.LogContentView.prototype.handleCopyEvent):
8342        Provide custom content to the clipboard based on the clipboard text of each message
8343        in the selected messages list in DOM order.
8344
8345        (WebInspector.LogContentView.prototype._messageAdded):
8346        Ensure newly added messages are filtered out in case they don't match the selected
8347        filters in the scope bar.
8348
8349        (WebInspector.LogContentView.prototype._mousedown):
8350        Event handler for the "mousedown" event on the messages container. We ignore user
8351        interaction if we would otherwise show a contextual menu, and ensure the messages
8352        container has focus otherwise. In case we're getting focus now and we already had
8353        selected elements, we go no further. Otherwise, we figure out which message was
8354        under the mouse pointer and track that we should prevent a "click" event from being
8355        dispatched in case the message was not yet selected. This ensures that we don't
8356        collapse/expand an outline and select at the same time. We then update the message
8357        selection state and track further mouse interaction. If we detect we didn't click on
8358        a message, ie. the empty area of the messages container, we clear the selection list.
8359
8360        (WebInspector.LogContentView.prototype._mousemove):
8361        Get the message element under the mouse pointer, if any, and update the messages
8362        selection list so that we select messages from the first element we moused down
8363        on to this one.
8364
8365        (WebInspector.LogContentView.prototype._mouseup):
8366        Stop tracking any further "mousemove" and "mouseup" events as the selection-by-mouse
8367        interaction draws to an end.
8368
8369        (WebInspector.LogContentView.prototype._click):
8370        Prevent the propagation of "click" events if we established in the "mousedown" event
8371        handler that we should have.
8372
8373        (WebInspector.LogContentView.prototype.handleEvent):
8374        Router for mouse "mousemove" and "mouseup" events.
8375
8376        (WebInspector.LogContentView.prototype._updateMessagesSelection):
8377        Method that updates the selected state of the provided message based on whether
8378        we're allowing multiple selection (Cmd+click) and range selection
8379        (Shift+click/arrow-up/arrow-down). 
8380
8381        (WebInspector.LogContentView.prototype._ensureMessageIsVisible):
8382        Scrolls the messages container as necessary to reveal the provided message. We avoid
8383        getting metrics from CSS as much as possible by using the positiong of the message
8384        directly after the provided one since we can get that information via
8385        _positionForMessage() without triggering a style recalc. In the case where we want to
8386        ensure the last message is visible, we have no other resort but to query its height.
8387
8388        (WebInspector.LogContentView.prototype._positionForMessage):
8389        Get the position of the given message in the coordinate system established by the
8390        messages container.
8391
8392        (WebInspector.LogContentView.prototype._isMessageVisible):
8393        Indicates whether the provided message is visible (ie. not filtered-out or within a
8394        collapsed group).
8395
8396        (WebInspector.LogContentView.prototype._isMessageSelected):
8397        Indicates whether the provided message is selected.
8398
8399        (WebInspector.LogContentView.prototype._selectAllMessages):
8400        Selects all visible messages.
8401
8402        (WebInspector.LogContentView.prototype._allMessages):
8403        All the messages in the messages container as an Array.
8404
8405        (WebInspector.LogContentView.prototype._allVisibleMessages):
8406        All visible messages in the messages container as an Array.
8407
8408        (WebInspector.LogContentView.prototype._scopeBarSelectionDidChange):
8409        Filter messages as the selected filters in the scope bar have changed.
8410
8411        (WebInspector.LogContentView.prototype._filterMessages):
8412        Filter the messages based on scope bar filters selection. We ensure commands and
8413        results are always visible, no matter what filters are selected.
8414
8415        (WebInspector.LogContentView.prototype._didFocus):
8416        Track that the messages container is focused.
8417
8418        (WebInspector.LogContentView.prototype._didBlur):
8419        Track that the messages container is not focused.
8420
8421        (WebInspector.LogContentView.prototype._keyDown):
8422        Event handler for the "keydown" event, used to route to the more specific handlers.
8423
8424        (WebInspector.LogContentView.prototype._commandAWasPressed):
8425        Event handler for Cmd+A key combination, selects all visible messages.
8426
8427        (WebInspector.LogContentView.prototype._escapeWasPressed):
8428        Event handler for the Esc. key being pressed, clears the selection if there are
8429        any selected messages, otherwise moving focus to the command prompt.
8430
8431        (WebInspector.LogContentView.prototype._upArrowWasPressed):
8432        Event handler for the up arrow key being pressed, selects the message above, or add
8433        it to the selection list if the shift key is selected.
8434
8435        (WebInspector.LogContentView.prototype._downArrowWasPressed):
8436        Event handler for the down arrow key being pressed, selects the message below, or add
8437        it to the selection list if the shift key is selected.
8438
8439        (WebInspector.LogContentView.prototype._leftArrowWasPressed):
8440        Event handler for the left arrow key veing pressed, collapses the current group or
8441        message with stack trace. Otherwise, does nothing.
8442
8443        (WebInspector.LogContentView.prototype._rightArrowWasPressed):
8444        Event handler for the right arrow key veing pressed, expands the current group or
8445        message with stack trace. Otherwise, does nothing.
8446
8447        (WebInspector.LogContentView.prototype._previousMessage):
8448        Traverses the list of visible messages until we find a message located prior to
8449        the provided message.
8450
8451        (WebInspector.LogContentView.prototype._nextMessage):
8452        Traverses the list of visible messages until we find a message located after to the
8453        provided message.
8454
8455        (WebInspector.LogContentView.prototype._clearFocusableChildren):
8456        Remove the "tabindex" attribute on all elements located within the messages container
8457        to ensure no element can steal focus away from the messages container and mess with our
8458        handling of keyboard events.
8459
84602013-03-12  Timothy Hatcher  <timothy@apple.com>
8461
8462        Don't truncate the suggestions menu when it gets close to the right edge.
8463
8464        Restore a line that was removed that we needed after all to get the right behavior.
8465
8466        Rubber-stamped by Joseph Pecoraro.
8467
8468        * UserInterface/CompletionSuggestionsView.js:
8469        (WebInspector.CompletionSuggestionsView.prototype.show): Update width after maximumWidth changes.
8470
84712013-03-12  Timothy Hatcher  <timothy@apple.com>
8472
8473        Prevent style text from shifting as properties are marked with checkboxes.
8474
8475        This marks blanks lines in editable styles with a placeholder that is the same
8476        size as the checkbox. When a checkbox is added the placeholder is removed. That
8477        switch keeps the text in the same position and looks superb!
8478
8479        This also forces checkboxes to be visible when the editor has focus, not just hovered.
8480
8481        Reviewed by Joseph Pecoraro.
8482
8483        * UserInterface/CSSStyleDeclarationTextEditor.css:
8484        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .checkbox-placeholder): Added.
8485        * UserInterface/CSSStyleDeclarationTextEditor.js:
8486        (WebInspector.CSSStyleDeclarationTextEditor.prototype._clearTextMarkers): Added all
8487        param so we don't clear placeholder in all cases, only when doing a reset.
8488        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): Call
8489        _removeCheckboxPlaceholder.
8490        (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): Call
8491        _markBlankLinesWithCheckboxPlaceholder.
8492        (WebInspector.CSSStyleDeclarationTextEditor.prototype._markBlankLinesWithCheckboxPlaceholder): Added.
8493        (WebInspector.CSSStyleDeclarationTextEditor.prototype._removeCheckboxPlaceholder): Added.
8494        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Call
8495        _markBlankLinesWithCheckboxPlaceholder and pass true for _clearTextMarkers's all param.
8496
84972013-03-12  Timothy Hatcher  <timothy@apple.com>
8498
8499        Improve the load time of the Web Inspector by loading localizedString.js sooner.
8500
8501        Reviewed by Joseph Pecoraro.
8502
8503        * UserInterface/LoadLocalizedStrings.js: Added.
8504        * UserInterface/Main.html: Include LoadLocalizedStrings.js before Main.js.
8505        * UserInterface/Main.js: Don't dynamically load localizedString.js.
8506
85072013-03-11  Timothy Hatcher  <timothy@apple.com>
8508
8509        Disable auto completion inside comments.
8510
8511        <rdar://problem/13387317>
8512
8513        Reviewed by Joseph Pecoraro.
8514
8515        * UserInterface/CodeMirrorCompletionController.js:
8516        (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition): Return early inside comments.
8517
85182013-03-11  Timothy Hatcher  <timothy@apple.com>
8519
8520        Don't highlight autocompletion items on hover. Only highlight them when active.
8521
8522        <rdar://problem/13387350> CSS autocompletion can be confusing if mouse cursor is hidden and hovering completion menu
8523
8524        Reviewed by Joseph Pecoraro.
8525
8526        * UserInterface/CompletionSuggestionsView.css:
8527        (.completion-suggestions-container:not(:active) > .item.selected,
8528         .completion-suggestions-container > .item:active): Renamed from being hover to active.
8529
85302013-03-11  Timothy Hatcher  <timothy@apple.com>
8531
8532        Workaround <rdar://problem/13392441> so Images and Fonts don't get cut off at the top.
8533
8534        We can get the expected result by using margin: 0 auto until the behavior of -webkit-align-items
8535        is hashed out more.
8536
8537        Reviewed by Joseph Pecoraro.
8538
8539        * UserInterface/FontResourceContentView.css:
8540        (.content-view.resource.font): Remove -webkit-align-items: center and use margin: 0 auto.
8541        (.content-view.resource.font .preview): Change 13px to 15px to be less arbitrary.
8542        * UserInterface/ImageResourceContentView.css:
8543        (.content-view.resource.image): Ditto.
8544
85452013-03-11  Timothy Hatcher  <timothy@apple.com>
8546
8547        Make SVG fonts work in the Web Inspector.
8548
8549        <rdar://problem/13392056> SVG fonts are not rendered when selected
8550
8551        Reviewed by Jon Lee.
8552
8553        * UserInterface/FontResourceContentView.js:
8554        (WebInspector.FontResourceContentView.prototype.contentAvailable): Supply format("svg") when we
8555        know we are loading an SVG font. This seems to be required for SVG fonts.
8556
85572013-03-11  Timothy Hatcher  <timothy@apple.com>
8558
8559        Don't allow setting a rule's selector to an empty string.
8560
8561        <rdar://problem/13387384> When editing a selector to be the empty string, nothing is committed - UI should reflect that
8562
8563        Reviewed by Antoine Quint.
8564
8565        * UserInterface/CSSStyleDeclarationSection.css:
8566        (.style-declaration-section > .header > .selector:empty): Added.
8567        (.style-declaration-section > .header > .selector:empty::before): Added.
8568        * UserInterface/CSSStyleDeclarationSection.js:
8569        (WebInspector.CSSStyleDeclarationSection.prototype._commitSelector): Call refresh if the selector is empty.
8570
85712013-03-11  Timothy Hatcher  <timothy@apple.com>
8572
8573        Ignore Shift-Tab in CodeMirror instances since it does unexpected things.
8574
8575        <rdar://problem/13387373> CSS editor typing Shift+Tab adds weird pre-indent
8576
8577        Reviewed by Antoine Quint.
8578
8579        * UserInterface/CodeMirrorAdditions.js:
8580        (ignoreKey): Added.
8581
85822013-03-11  Timothy Hatcher  <timothy@apple.com>
8583
8584        Improve the wrapping of the pseudo class checkboxes.
8585
8586        Also make sure the scroll logic handles the different heights possible.
8587
8588        <rdar://problem/13383635> Pseudo class checkboxes should wrap better with narrow sidebar (never 3x1 & 1x1)
8589
8590        Reviewed by Antoine Quint.
8591
8592        * UserInterface/CSSStyleDetailsSidebarPanel.css:
8593        (.sidebar > .panel.details.css-style > .content > .pseudo-classes): Switch to flex layout.
8594        (.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group): Added.
8595        (.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group > label): Split the margin on each side.
8596        * UserInterface/CSSStyleDetailsSidebarPanel.js:
8597        (WebInspector.CSSStyleDetailsSidebarPanel): Create group elements of up to two labels each.
8598        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange): Call _updateNoForcedPseudoClassesScrollOffset.
8599        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Ditto.
8600        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._updateNoForcedPseudoClassesScrollOffset): Update the height.
8601
86022013-03-11  Joseph Pecoraro  <pecoraro@apple.com>
8603
8604        <rdar://problem/11720808> REGRESSION (Safari 6): Conditional breakpoints UI missing
8605
8606        Add back conditional breakpoints UI. The UI is modeled after Xcode's
8607        "Edit Breakpoint" context menu and popover UI.
8608
8609        Reviewed by Timothy Hatcher.
8610
8611        * UserInterface/Breakpoint.js:
8612        (WebInspector.Breakpoint):
8613        (WebInspector.Breakpoint.prototype.get condition):
8614        (WebInspector.Breakpoint.prototype.set condition):
8615        (WebInspector.Breakpoint.prototype.get info):
8616        Give a breakpoint a condition, mutators, and save the condition in
8617        the breakpoint info.
8618
8619        (WebInspector.Breakpoint.prototype.appendContextMenuItems):
8620        Add a context menu item for "Edit Breakpoint".
8621
8622        (WebInspector.Breakpoint.prototype._popoverToggleCheckboxChanged):
8623        (WebInspector.Breakpoint.prototype._popoverConditionInputChanged):
8624        (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
8625        (WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
8626        Generate the popover content and show the popover.
8627
8628        * UserInterface/Breakpoint.css: Added.
8629        (.popover .edit-breakpoint-popover-content):
8630        (.popover .edit-breakpoint-popover-content > label.toggle):
8631        (.popover .edit-breakpoint-popover-content > table):
8632        (.popover .edit-breakpoint-popover-content > table > tr > th):
8633        (.popover .edit-breakpoint-popover-content > table > tr > td):
8634        (#edit-breakpoint-popover-condition):
8635        Styles for the edit breakpoint popover.
8636
8637        * UserInterface/BreakpointTreeElement.js:
8638        (WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
8639        Pass the breakpoint element in the display so that if a popover needs
8640        to be shown, we have the bounds of an element to show it for.
8641
8642        * UserInterface/DebuggerManager.js:
8643        (WebInspector.DebuggerManager):
8644        (WebInspector.DebuggerManager.prototype.isBreakpointEditable):
8645        Never allow setting a condition on the special breakpoints.
8646
8647        (WebInspector.DebuggerManager.prototype._breakpointConditionDidChange):
8648        (WebInspector.DebuggerManager.prototype._breakpointConditionDidChange.breakpointRemoved):
8649        To set the condition delete the old breakpoint and set a new breakpoint
8650        with the new condition. The WebInspector.Breakpoint will get an updated id.
8651
8652        * UserInterface/Main.html:
8653        * Localizations/en.lproj/localizedStrings.js:
8654        Include new files and strings.
8655
86562013-03-09  Joseph Pecoraro  <pecoraro@apple.com>
8657
8658        Add a "Select Output" button to PrettyPrinting tools.
8659
8660        The new button make copying the entire output easier. Useful for saving
8661        before and after contents to see changes. Also update the formatter and
8662        clean up some style issues.
8663
8664        Unreviewed tools change.
8665
8666        * Tools/PrettyPrinting/CodeMirrorFormatters.js:
8667        * Tools/PrettyPrinting/index.html:
8668
86692013-03-09  Joseph Pecoraro  <pecoraro@apple.com>
8670
8671        Pretty printing: Don't try to be smart about unary +/-.
8672
8673        This was causing some simple expressions like "1+1" or "foo+1" to
8674        become "1 +1" and "foo +1" instead of the expected "1 + 1" and
8675        "foo + 1". The most common unary expressions negative numbers,
8676        are parsed as a single token by CodeMirror anyways, so drop the
8677        special case in the formatter.
8678
8679        Reviewed by Timothy Hatcher.
8680
8681        * UserInterface/CodeMirrorFormatters.js:
8682        Remove the special case that tried to handle unary +/-.
8683
86842013-03-09  Joseph Pecoraro  <pecoraro@apple.com>
8685
8686        Update the PrettyPrinting Tool with new formatter changes.
8687
8688        Unreviewed tools change.
8689
8690        * Tools/PrettyPrinting/CodeMirrorFormatters.js:
8691        * Tools/PrettyPrinting/Formatter.js:
8692        (Formatter.prototype._handleToken):
8693        (Formatter.prototype._handleEmptyLine):
8694
86952013-03-09  Joseph Pecoraro  <pecoraro@apple.com>
8696
8697        Pretty Printing: switch from startsWith to regex matching for tokens
8698
8699        This addresses a review comment that using startsWith for checking
8700        token types is brittle and we should check the entire string. The
8701        performance impact was negligible on JavaScript and minor on CSS,
8702        so it is worth making the change to make the code less brittle.
8703
8704        Reviewed by Timothy Hatcher.
8705
8706        * UserInterface/CodeMirrorFormatters.js:
8707        * UserInterface/Formatter.js:
8708        (Formatter.prototype._handleToken):
8709        (Formatter.prototype._handleEmptyLine):
8710
87112013-03-09  Joseph Pecoraro  <pecoraro@apple.com>
8712
8713        Add Pretty Printing Debug Page to WebInspector/Tools/PrettyPrinting
8714
8715        The pretty printing files in the Inspector can be run independently of
8716        the Inspector. The only requirements are CodeMirror, its modes, and a
8717        few Utility functions. This provides a separate tool that makes it
8718        easier to debug and benchmark pretty printing without needing to run
8719        the entire inspector. By default it includes some debug information
8720        that will speed up debugging and make making improvements easier.
8721
8722        Rubber-stamped by Timothy Hatcher.
8723
8724        * Tools/PrettyPrinting/CodeMirrorFormatters.js: Added.
8725        * Tools/PrettyPrinting/Formatter.js: Added.
8726        * Tools/PrettyPrinting/FormatterContentBuilder.js: Added.
8727        * Tools/PrettyPrinting/codemirror.css: Added.
8728        * Tools/PrettyPrinting/codemirror.js: Added.
8729        * Tools/PrettyPrinting/css.js: Added.
8730        * Tools/PrettyPrinting/javascript.js: Added.
8731        CodeMirror and WebInspector pretty printing files copied with only
8732        minor tweaks (debugging code).
8733
8734        * Tools/PrettyPrinting/populate/apple.css: Added.
8735        * Tools/PrettyPrinting/populate/jquery.min.js: Added.
8736        Useful JavaScript and CSS content to populate the editor with. The
8737        contents are decent stress tests for coverage and benchmarking.
8738        jQuery is already in Safari for other tools, and apple.com's CSS
8739        is Apple source. These files are just included as test data.
8740
8741        * Tools/PrettyPrinting/index.html: Added.
8742        Driver. Includes an editor, some buttons, and outputs results.
8743
87442013-03-09  Joseph Pecoraro  <pecoraro@apple.com>
8745
8746        <rdar://problem/13375942> Pretty printing: Search results highlight wrong text range and highlight wrong line
8747
8748        Provide a SourceCodeTextRange. This contains start and end SourceCodeLocation
8749        objects and uses those to provide raw, formatted, and mapped (display)
8750        WebInspector.TextRanges and events when the range bounds change.
8751
8752        Search results coming from the backend have the original content and so
8753        include raw text range information. When we jump to the source code we
8754        will want to reveal and highlight the formatted line.
8755
8756        Reviewed by Timothy Hatcher.
8757
8758        * UserInterface/DOMSearchMatchObject.js:
8759        (WebInspector.DOMSearchMatchObject):
8760        (WebInspector.DOMSearchMatchObject.prototype.get sourceCodeTextRange):
8761        * UserInterface/Main.html:
8762        * UserInterface/ResourceSearchMatchObject.js:
8763        (WebInspector.ResourceSearchMatchObject):
8764        (WebInspector.ResourceSearchMatchObject.prototype.get sourceCodeTextRange):
8765        Switch these to create and hold a SourceCodeTextRange.
8766
8767        * UserInterface/ResourceSidebarPanel.js:
8768        (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
8769        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
8770        When selecting a SearchMatchObject reveal and select the formatted range.
8771        It may be jarring to the user to see a search result for something and
8772        jump to the mapped (display) location which may not contain the search term.
8773
8774        * UserInterface/SearchResultTreeElement.js:
8775        (WebInspector.SearchResultTreeElement):
8776        (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle):
8777        Be aware that the represented SearchMatchObject has a sourceCodeTextRange
8778        now. But we are provided line content from the original resource, so in
8779        highlighting the search string use the original resource's text range.
8780
8781        * UserInterface/SourceCode.js:
8782        (WebInspector.SourceCode.prototype.createSourceCodeTextRange):
8783        * UserInterface/SourceMapResource.js:
8784        (WebInspector.SourceMapResource.prototype.createSourceCodeTextRange):
8785        Helpers for creating a SourceCodeTextRange by providing an unformatted
8786        TextRange in the given resource. Automatically takes care of SourceMaps.
8787
8788        * UserInterface/SourceCodeTextRange.js: Added.
8789        (WebInspector.SourceCodeTextRange):
8790        (WebInspector.SourceCodeTextRange.prototype.get sourceCode):
8791        (WebInspector.SourceCodeTextRange.prototype.get textRange):
8792        (WebInspector.SourceCodeTextRange.prototype.get formattedTextRange):
8793        (WebInspector.SourceCodeTextRange.prototype.get displaySourceCode):
8794        (WebInspector.SourceCodeTextRange.prototype.get displayTextRange):
8795        (WebInspector.SourceCodeTextRange.prototype._startAndEndLocationsInSameMappedResource):
8796        (WebInspector.SourceCodeTextRange.prototype._sourceCodeLocationChanged):
8797        SourceCodeTextRange matching SourceCodeLocation's semantics.
8798
87992013-03-09  Timothy Hatcher  <timothy@apple.com>
8800
8801        Don't flash red strikethrough when actively editing a style.
8802
8803        <rdar://problem/13385762>
8804
8805        Reviewed by Joseph Pecoraro.
8806
8807        * UserInterface/CSSStyleDeclarationTextEditor.css:
8808        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.invalid): Renamed.
8809        * UserInterface/CSSStyleDeclarationTextEditor.js:
8810        (WebInspector.CSSStyleDeclarationTextEditor.prototype._clearRemoveEditingLineClassesTimeout): Added.
8811        (WebInspector.CSSStyleDeclarationTextEditor.prototype._removeEditingLineClasses): Added.
8812        (WebInspector.CSSStyleDeclarationTextEditor.prototype._removeEditingLineClasses.removeEditingLineClasses): Added.
8813        (WebInspector.CSSStyleDeclarationTextEditor.prototype._removeEditingLineClassesSoon): Added.
8814        (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): Add EditingLineStyleClassName to the changed line.
8815        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateProperties): Call _removeEditingLineClassesSoon.
8816        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Call _removeEditingLineClasses.
8817        * UserInterface/CodeMirrorCompletionController.js:
8818        (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint): Don't add line CompletionPendingStyleClassName.
8819        (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint): Remove call to _removePendingCompletionLineStyleClass.
8820        (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint): Ditto.
8821        (WebInspector.CodeMirrorCompletionController.prototype._removePendingCompletionLineStyleClass): Removed.
8822
88232013-03-09  Timothy Hatcher  <timothy@apple.com>
8824
8825        Prevent CSS autocompletion from interfering with the undo/redo history.
8826
8827        We now remove any changes we programmatically do from the undo history.
8828        And before undo or redo we make sure to hide the completions so the editor
8829        is back to the state that matches the history.
8830
8831        <rdar://problem/13384296> CSS Autocompletion causes unexpected Undo behavior
8832
8833        Reviewed by Joseph Pecoraro.
8834
8835        * UserInterface/CodeMirrorCompletionController.js:
8836        (WebInspector.CodeMirrorCompletionController): Hook up _handleHideKey to the standard
8837        undo and redo shortcuts. Also hook up select all so it goes through instead of being
8838        blocked by _handleCursorActivity.
8839        (WebInspector.CodeMirrorCompletionController.prototype.get _currentReplacementText): Added.
8840        (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update): Call
8841        _removeLastChangeFromHistory after replaceRange.
8842        (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update): Added.
8843        Replace the prefix with the full completion text. Don't call _removeLastChangeFromHistory.
8844        (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint): Call update.
8845        (WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory): Added.
8846        (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update): Call
8847        _removeLastChangeFromHistory after each replaceRange.
8848        (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition): Call
8849        _removeCompletionHint before getting the cursor so any cursor changes are done first.
8850        (WebInspector.CodeMirrorCompletionController.prototype._handleHideKey): Added. Hide the completions
8851        and pass through to other the standard handlers.
8852
88532013-03-08  Joseph Pecoraro  <pecoraro@apple.com>
8854
8855        <rdar://problem/12463631> REGRESSION: Subframes don't show the DOM tree
8856
8857        Reviewed by Timothy Hatcher.
8858
8859        * UserInterface/DOMTree.js:
8860        (WebInspector.DOMTree):
8861        (WebInspector.DOMTree.prototype.requestRootDOMNode):
8862        (WebInspector.DOMTree.prototype._requestRootDOMNodeInternal):
8863        (WebInspector.DOMTree.prototype._frameMainResourceDidChange):
8864        (WebInspector.DOMTree.prototype._frameExecutionContextChanged):
8865        If we are a subframe we must wait for a context execution identifier
8866        to do the RuntimeAgent.evaluate to get the document. So we may need
8867        to wait for it. Switch to invoke and clarify we use frameId for
8868        iOS 6 backwards compatibility.
8869
8870        * UserInterface/ExecutionContext.js: Added.
8871        (WebInspector.ExecutionContext):
8872        (WebInspector.ExecutionContext.supported):
8873        (WebInspector.ExecutionContext.prototype.get id):
8874        (WebInspector.ExecutionContext.prototype.get name):
8875        (WebInspector.ExecutionContext.prototype.get isPageContext):
8876        (WebInspector.ExecutionContext.prototype.get frame):
8877        WebInspector.Object class for Runtime.ExecutionContextDescription type.
8878        This was unavailable in iOS 6, so add a static "supported" function.
8879
8880        * UserInterface/Frame.js:
8881        (WebInspector.Frame.prototype.initialize):
8882        (WebInspector.Frame.prototype.commitProvisionalLoad):
8883        Clear executino contexts on initialize, navigating, and detaching (manager).
8884
8885        (WebInspector.Frame.prototype.get mainExecutionContext):
8886        (WebInspector.Frame.prototype.get executionContexts):
8887        (WebInspector.Frame.prototype.clearExecutionContexts):
8888        (WebInspector.Frame.prototype.addExecutionContext):
8889        A frame may have multiple execution contexts. One for each world. We consider
8890        the first execution context we receive for a frame to be the main one.
8891
8892        (WebInspector.Frame.prototype.get executionContextIdentifier):
8893        Backwards compatible execution context identifier. Null if not yet resolved.
8894
8895        * UserInterface/FrameResourceManager.js:
8896        (WebInspector.FrameResourceManager.prototype.frameDidDetach):
8897        When detaching a page, clear the execution contexts.
8898        (WebInspector.FrameResourceManager.prototype.executionContextCreated):
8899        Set the execution context on a frame if provided.
8900
8901        * UserInterface/Main.html:
8902        * UserInterface/Main.js:
8903        (WebInspector.contentLoaded):
8904        Register a "Runtime" domain observer and enable it when it is available.
8905
8906        * UserInterface/RuntimeObserver.js: Added.
8907        (WebInspector.RuntimeObserver):
8908        (WebInspector.RuntimeObserver.prototype.executionContextCreated):
8909        Add a new Observer for "Runtime" domain events.
8910
89112013-03-08  Timothy Hatcher  <timothy@apple.com>
8912
8913        <rdar://problem/13381025> REGRESSION (Safari 6): Bottom-up profiling option missing
8914
8915        Reviewed by Joseph Pecoraro.
8916
8917        * Localizations/en.lproj/localizedStrings.js: Updated.
8918        * UserInterface/Images/BottomUpTree.pdf: Added.
8919        * UserInterface/JavaScriptProfileView.js:
8920        (WebInspector.JavaScriptProfileView.prototype.get navigationItems): Added. Return percent
8921        and bottom up item.
8922        (WebInspector.JavaScriptProfileView.prototype._toggleBottomUpView): Added. Flip the setting
8923        and call _changeView.
8924        (WebInspector.JavaScriptProfileView.prototype._changeView): Check _showTreeBottomUpSetting.
8925        Removing reference to old viewSelectElement property.
8926
89272013-03-08  Timothy Hatcher  <timothy@apple.com>
8928
8929        Make the "H" key toggle the visibility of the selected DOM element.
8930
8931        <rdar://problem/13352674> PARITY (WebKit Web Inspector): Shortcut to hide/show DOM elements while inspecting
8932
8933        Reviewed by Joseph Pecoraro.
8934
8935        * UserInterface/DOMTreeOutline.js:
8936        (WebInspector.DOMTreeOutline): Create the keyboard shortcut.
8937        (WebInspector.DOMTreeOutline.prototype._hideElement.toggleProperties): Added.
8938        (WebInspector.DOMTreeOutline.prototype._hideElement): Added.
8939
89402013-03-08  Timothy Hatcher  <timothy@apple.com>
8941
8942        Always fire the Refreshed event for DOMNodeStyles.
8943
8944        Not firing Refreshed made it hard to listen for when it was safe to use the properties.
8945        If you call refresh, you expect Refreshed to always fire. But it would only fire if there
8946        was a significant change. Now it always fires and passes a flag whether it was significant.
8947
8948        Reviewed by Joseph Pecoraro.
8949
8950        * UserInterface/CSSStyleDeclaration.js:
8951        (WebInspector.CSSStyleDeclaration.prototype.propertyForName): Drive by: don't consider
8952        pending properties if we can't create or are not editable.
8953        * UserInterface/DOMNodeStyles.js:
8954        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Keep track on if we
8955        found a significant change since the last time we fired the Refreshed event. Only recompute
8956        if it was significant if we aren't already marked as significant. Pass significantChange along
8957        with the Refreshed event and always fire it.
8958        * UserInterface/RulesStyleDetailsPanel.js:
8959        (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Added significantChange param. Only
8960        do a rebuild if it was significant.
8961        * UserInterface/StyleDetailsPanel.js:
8962        (WebInspector.StyleDetailsPanel.prototype.markAsNeedsRefresh): Set _forceSignificantChange.
8963        (WebInspector.StyleDetailsPanel.prototype.refresh): Added significantChange param.
8964        (WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition): Pass along
8965        significantChange to refresh, taking into consideration _forceSignificantChange.
8966        (WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed): Pass along significantChange
8967        from the event to _refreshPreservingScrollPosition.
8968
89692013-03-08  Joseph Pecoraro  <pecoraro@apple.com>
8970
8971        <rdar://problem/13372615> REGRESSION: theverge.com shows 2 duplicate "rs.js" Extra Script resources
8972
8973        The URLs passed in scriptParsed messages appears to not match up properly
8974        with the Resource URL. Testing on theverge.com we can get script URLs
8975        that are encoded where the resource URL is decoded, and we can get script
8976        URLs that have a hash where the resource URL does not have a hash. Provide
8977        a generic resourceForScript lookup.
8978
8979        Reviewed by Timothy Hatcher.
8980
8981        * UserInterface/FrameResourceManager.js:
8982        (WebInspector.FrameResourceManager.prototype.resourceForScript):
8983        Walk the frame tree looking for a resource with the same URL as
8984        a script. Check the with fragment encoded and decoded script URL,
8985        an without fragment encoded and decoded script URL.
8986
8987        * UserInterface/ResourceSidebarPanel.js:
8988        (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
8989        (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
8990        * UserInterface/DebuggerManager.js:
8991        (WebInspector.DebuggerManager.prototype.scriptsForURL):
8992        * UserInterface/DebuggerSidebarPanel.js:
8993        (WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
8994        * UserInterface/ScriptContentView.js:
8995        (WebInspector.ScriptContentView):
8996        * UserInterface/SourceCodeTextEditor.js:
8997        (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
8998        * UserInterface/SourceMapManager.js:
8999        (WebInspector.SourceMapManager.prototype._loadAndParseSucceeded):
9000        When we have a script, use the resourceForScript instead of resourceForURL.
9001
9002        * UserInterface/Utilities.js:
9003        (removeURLFragment): helper fro removing URL fragment.
9004
90052013-03-08  Joseph Pecoraro  <pecoraro@apple.com>
9006
9007        <rdar://problem/13371011> Misclassified resources if you open the inspector while the page is loading
9008
9009        When the Web Inspector is opened during a page load it gets a list of
9010        all resources from the backend via getResourceTree. We assume that the
9011        resources in that tree are completed loads. We may later discover that
9012        some of those resources are actively loading, and that other actively
9013        loading resources are not in that list. We can detect both of these
9014        cases by receiving a receiveResponse message. Handle it appropriately
9015        so that a WebInspector.Script can always find a WebInspector.Resource.
9016        Otherwise, the Script would show its own tree element under "Extra
9017        Scripts" in the sidebar.
9018
9019        Reviewed by Timothy Hatcher.
9020
9021        * UserInterface/FrameResourceManager.js:
9022        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
9023        When we don't have an identifier but we find a Resource by URL, then we should
9024        update the Resource to still be loading. If we don't have a Resource at all we
9025        should create one, it is currently loading.
9026
9027        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):
9028        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading):
9029        We can assert again. We always expect to have a Resource by the time we get a
9030        didFinishLoading or didFailLoading message. If we don't then this could be
9031        an extreme edge case (like a dataReceived without a receivedResponse).
9032
9033        * UserInterface/Resource.js:
9034        (WebInspector.Resource.prototype.revertMarkAsFinished):
9035        Revert the finished and finished timestamp properties. When a
9036        finishLoading or didFailLoading message comes in the states will
9037        be updated again.
9038
90392013-03-08  Joseph Pecoraro  <pecoraro@apple.com>
9040
9041        ASSERT: FrameResourceManager.prototype.frameDidNavigate: console.assert(frame)
9042
9043        Fix a typo. A WebInspector.Resource has a parentFrame, not a frame accessor.
9044
9045        Reviewed by Timothy Hatcher.
9046
9047        * UserInterface/FrameResourceManager.js:
9048        (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
9049
90502013-03-08  Timothy Hatcher  <timothy@apple.com>
9051
9052        Fix the font smoothing in the Web Inspector.
9053
9054        This is needed after making the Web Inspector WKView use tiled drawing since our WKView is transparent.
9055
9056        <rdar://problem/12922185> REGRESSION: Text in the Web Inspector is not sub-pixel anti-aliased anymore
9057
9058        Reviewed by Joseph Pecoraro.
9059
9060        * UserInterface/Main.css:
9061        (body): Add -webkit-font-smoothing: subpixel-antialiased to force sub-pixel in our transparent WebView.
9062        * UserInterface/NavigationSidebarPanel.css:
9063        (.sidebar > .panel.navigation > .empty-content-placeholder > .message): Remove -webkit-font-smoothing: antialiased.
9064
90652013-03-07  Timothy Hatcher  <timothy@apple.com>
9066
9067        Don't scroll the Style details sidebar if the pseudo class checkboxes are not present.
9068
9069        This applies when inspecting an iOS 6 device or simulator.
9070
9071        Reviewed by Joseph Pecoraro.
9072
9073        * UserInterface/CSSStyleDetailsSidebarPanel.js:
9074        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.get _initialScrollOffset): Return 0
9075        if we can't for pseudo classes.
9076        * UserInterface/StyleDetailsPanel.js:
9077        (WebInspector.StyleDetailsPanel.prototype.get _initialScrollOffset): Ditto.
9078
90792013-03-07  Timothy Hatcher  <timothy@apple.com>
9080
9081        Display applied media queries in the new Style details sidebar.
9082
9083        <rdar://problem/13376129>
9084
9085        Reviewed by Joseph Pecoraro.
9086
9087        * Localizations/en.lproj/localizedStrings.js: Updated.
9088        * UserInterface/RulesStyleDetailsPanel.css:
9089        (.sidebar > .panel.details.css-style .rules .label): Renamed from .inherited-label.
9090        (.sidebar > .panel.details.css-style .rules .label .go-to-link): Added.
9091        (.sidebar > .panel.details.css-style .rules .label + .style-declaration-section): Added.
9092        (.sidebar > .panel.details.css-style .rules .new-rule): Tweaked opacity to better match .label.
9093        (.sidebar > .panel.details.css-style .rules .new-rule:hover): Ditto.
9094        (.sidebar > .panel.details.css-style .rules .new-rule:active): Ditto.
9095        * UserInterface/RulesStyleDetailsPanel.js:
9096        (WebInspector.RulesStyleDetailsPanel.prototype.refresh.mediaListsEqual): Added.
9097        (WebInspector.RulesStyleDetailsPanel.prototype.refresh.filteredMediaList): Added.
9098        (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Only include the media list if it is
9099        different from the previous media list shown.
9100        * UserInterface/SourceCodeLocation.js:
9101        (WebInspector.SourceCodeLocation.prototype.isEqual): Added.
9102
91032013-03-07  Timothy Hatcher  <timothy@apple.com>
9104
9105        Fix a typo in the Dashboard tooltips.
9106
9107        <rdar://problem/13365669> [WebInspector] typo in source - "click to show to the" should be "click to show the"
9108
9109        Reviewed by Ricky Mondello.
9110
9111        * Localizations/en.lproj/localizedStrings.js: Updated.
9112        * UserInterface/DashboardView.js:
9113        (WebInspector.DashboardView): Removed "to" from two tooltips.
9114
91152013-03-07  Timothy Hatcher  <timothy@apple.com>
9116
9117        Fix the word wrapping for long origins that are links.
9118
9119        Also fixes the location and wrapping of the read-only lock icon.
9120
9121        <rdar://problem/13365935> Long CSS resource names causes poor line wrapping in Style sidebar
9122
9123        Reviewed by Joseph Pecoraro.
9124
9125        * UserInterface/CSSStyleDeclarationSection.css:
9126        (.style-declaration-section.locked > .header::before): Changed from after so the lock sticks
9127        to the top of the section as intended instead of on the last line. Add a left margin to prevent
9128        the origin from touching the icon.
9129        (.style-declaration-section > .header > .origin): Remove display: inline-block and vertical-align.
9130        Added word-wrap: break-word and white-space: nowrap to prevent breaking the built-in origins among
9131        multiple lines.
9132        (.style-declaration-section > .header > .origin a): Added. Set white-space to normal to allow it
9133        to break along multiple lines.
9134
91352013-03-07  Timothy Hatcher  <timothy@apple.com>
9136
9137        Indent wrapped lines by 2 extra spaces to better break up long lines in the details sidebar.
9138
9139        An earlier change made it work for editable styles, this makes it work for read-only styles.
9140
9141        <rdar://problem/13310983> Long styles that wrap are hard to read in new Style details sidebar.
9142
9143        Reviewed by Ricky Mondello.
9144
9145        * UserInterface/CSSStyleDeclarationTextEditor.css:
9146        (.css-style-text-editor.read-only > .CodeMirror pre):
9147
91482013-03-07  Jessie Berlin  <jberlin@apple.com>
9149
9150        Ran update-safari-localizable-strings.
9151
9152        * Localizations/en.lproj/localizedStrings.js:
9153
91542013-03-07  Timothy Hatcher  <timothy@apple.com>
9155
9156        Add Array.lastValue and start using it.
9157
9158        Reviewed by Antoine Quint.
9159
9160        * UserInterface/CodeMirrorCompletionController.js:
9161        (WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
9162        * UserInterface/CodeMirrorFormatters.js:
9163        * UserInterface/DOMNode.js:
9164        (WebInspector.DOMNode.prototype.get lastChild):
9165        * UserInterface/DOMTreeElement.js:
9166        (WebInspector.DOMTreeElement.prototype._updateChildren):
9167        (WebInspector.DOMTreeElement.prototype.moveToNextAttributeIfNeeded):
9168        (WebInspector.DOMTreeElement.prototype._attributeEditingCommitted):
9169        * UserInterface/DataGrid.js:
9170        (WebInspector.DataGrid.prototype.sortNodes):
9171        (WebInspector.DataGridNode.prototype.traversePreviousNode):
9172        * UserInterface/FormatterContentBuilder.js:
9173        (FormatterContentBuilder.prototype.removeLastNewline):
9174        (FormatterContentBuilder.prototype._addFormattedLineEnding):
9175        * UserInterface/HierarchicalPathNavigationItem.js:
9176        (WebInspector.HierarchicalPathNavigationItem.prototype.get lastComponent):
9177        * UserInterface/InspectorBackend.js:
9178        (InspectorBackendClass.prototype._sendMessageToBackend):
9179        * UserInterface/TextPrompt.js:
9180        (WebInspector.TextPrompt.prototype._completionsReady):
9181        * UserInterface/TimelineManager.js:
9182        (WebInspector.TimelineManager.prototype.eventRecorded):
9183        * UserInterface/TimelineOverview.js:
9184        (WebInspector.TimelineOverview.prototype.update):
9185        * UserInterface/Utilities.js:
9186
91872013-03-07  Timothy Hatcher  <timothy@apple.com>
9188
9189        Use Array.contains instead of indexOf.
9190
9191        Reviewed by Antoine Quint.
9192
9193        * UserInterface/Branch.js:
9194        (WebInspector.Branch.prototype.addRevision):
9195        * UserInterface/CSSRule.js:
9196        * UserInterface/CSSStyleDeclaration.js:
9197        * UserInterface/CSSStyleDeclarationSection.js:
9198        (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
9199        * UserInterface/CodeMirrorCompletionController.js:
9200        (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
9201        * UserInterface/ContentBrowser.js:
9202        (WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem):
9203        * UserInterface/ContentViewContainer.js:
9204        (WebInspector.ContentViewContainer.prototype.showContentView):
9205        * UserInterface/DOMNode.js:
9206        * UserInterface/DOMNodeStyles.js:
9207        (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
9208        * UserInterface/DOMTreeElement.js:
9209        * UserInterface/GeneralTreeElement.js:
9210        (WebInspector.GeneralTreeElement.prototype.addClassName):
9211        (WebInspector.GeneralTreeElement.prototype.removeClassName):
9212        * UserInterface/LayerTreeManager.js:
9213        (WebInspector.LayerTreeManager.prototype.var):
9214        * UserInterface/NavigationBar.js:
9215        (WebInspector.NavigationBar.prototype._findNavigationItem):
9216        * UserInterface/Sidebar.js:
9217        (WebInspector.Sidebar.prototype.findSidebarPanel):
9218
92192013-03-07  Timothy Hatcher  <timothy@apple.com>
9220
9221        Don't ignore user agent rules when forced pseudo classes change.
9222
9223        Normally the Refreshed event is not fired only when user agent rules change, due to a bug
9224        in WebCore. However, we need to fire it when the forced pseudo classes change since there
9225        are base rules for most of the pseudo classes that need to show up in the sidebar.
9226
9227        Reviewed by Antoine Quint.
9228
9229        * UserInterface/DOMNodeStyles.js:
9230        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Don't check for
9231        user agent rules if _includeUserAgentRulesOnNextRefresh is true.
9232        (WebInspector.DOMNodeStyles.prototype._markAsNeedsRefresh): Added includeUserAgentRules.
9233        Set _includeUserAgentRulesOnNextRefresh if includeUserAgentRules is true.
9234        (WebInspector.DOMNodeStyles.prototype._pseudoClassesDidChange): Pass true to _markAsNeedsRefresh.
9235
92362013-03-06  Timothy Hatcher  <timothy@apple.com>
9237
9238        Add checkboxes that allow forcing pseudo classes in the Style details sidebar.
9239
9240        The checkboxes are scrolled off the top if there are no forced pseudo classes.
9241        When there are forced classes the checkboxes are initially visible. Also we can
9242        only scroll them away when there is enough content to scroll.
9243
9244        <rdar://problem/13143555> Add the ability to toggle forced CSS pseudo-classes from style sidebar
9245
9246        Reviewed by Joseph Pecoraro.
9247
9248        * Localizations/en.lproj/localizedStrings.js:
9249        * UserInterface/CSSStyleDeclarationSection.css:
9250        * UserInterface/CSSStyleDetailsSidebarPanel.css:
9251        (.sidebar > .panel.details.css-style > .content > .pseudo-classes):
9252        (.sidebar > .panel.details.css-style > .content > .pseudo-classes > label):
9253        * UserInterface/CSSStyleDetailsSidebarPanel.js:
9254        (WebInspector.CSSStyleDetailsSidebarPanel):
9255        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
9256        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.addEventListeners):
9257        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.removeEventListeners):
9258        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.get _initialScrollOffset):
9259        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._navigationItemSelected):
9260        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
9261        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._updatePseudoClassCheckboxes):
9262        * UserInterface/CSSStyleManager.js:
9263        (WebInspector.CSSStyleManager.prototype.canForcePseudoClasses):
9264        * UserInterface/DOMTreeElement.js:
9265        (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
9266        * UserInterface/StyleDetailsPanel.js:
9267        (WebInspector.StyleDetailsPanel.prototype.get _initialScrollOffset):
9268        (WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition):
9269        * UserInterface/Utilities.js:
9270        (Array.prototype.contains): Added.
9271
92722013-03-06  Timothy Hatcher  <timothy@apple.com>
9273
9274        Remove more dead code from CSSStyleManager that I missed.
9275
9276        Rubber-stamped by Joseph Pecoraro.
9277
9278        * UserInterface/CSSStyleManager.js:
9279        (WebInspector.CSSStyleManager.parseRuleArrayPayload): Removed.
9280
92812013-03-06  Timothy Hatcher  <timothy@apple.com>
9282
9283        Add missing image Images/Locked.pdf.
9284
9285        <rdar://problem/13355862>
9286
9287        * UserInterface/Images/Locked.pdf: Added.
9288
92892013-03-05  Timothy Hatcher  <timothy@apple.com>
9290
9291        Add support for adding new rules in the Style details sidebar.
9292
9293        <rdar://problem/11326086> REGRESSION (Safari 6): Can't add new selectors / rules
9294
9295        Reviewed by Joseph Pecoraro.
9296
9297        * Localizations/en.lproj/localizedStrings.js: Updated.
9298        * UserInterface/CSSStyleDeclarationSection.css:
9299        (div:not(.style-declaration-section) + .style-declaration-section): Added. Generic
9300        rule to add a shadow on the top when something is between sections.
9301        * UserInterface/DOMNodeStyles.js:
9302        (WebInspector.DOMNodeStyles.prototype.addRule): Added.
9303        (WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder): Include Inspector
9304        styles. Also collect user and user agent styles into one array.
9305        * UserInterface/Images/Plus.pdf: Added.
9306        * UserInterface/RulesStyleDetailsPanel.css:
9307        (.sidebar > .panel.details.css-style .rules .new-rule): Added.
9308        (.sidebar > .panel.details.css-style .rules .new-rule img): Added.
9309        (.sidebar > .panel.details.css-style .rules .new-rule:hover): Added.
9310        (.sidebar > .panel.details.css-style .rules .new-rule:active): Added.
9311        * UserInterface/RulesStyleDetailsPanel.js:
9312        (WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection): Focus the new
9313        inspector rule when it is added.
9314        (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Create a New Rule button.
9315        (WebInspector.RulesStyleDetailsPanel.prototype._newRuleClicked): Added.
9316
93172013-03-05  Timothy Hatcher  <timothy@apple.com>
9318
9319        Remove dead code from CSSStyleManager.
9320
9321        Rubber-stamped by Joseph Pecoraro.
9322
9323        * UserInterface/CSSStyleManager.js:
9324        Remove old code and the copyright that went with the code. None of the remaining
9325        code came from the original open source file.
9326
93272013-03-04  Timothy Hatcher  <timothy@apple.com>
9328
9329        Always insert a space after ":" when pretty printing in the Style details sidebar.
9330
9331        Reviewed by Joseph Pecoraro.
9332
9333        * UserInterface/CSSProperty.js:
9334        (WebInspector.CSSProperty.prototype.get synthesizedText): Added.
9335        (WebInspector.CSSProperty.prototype.get text): Factored into synthesizedText.
9336        * UserInterface/CSSStyleDeclarationTextEditor.js:
9337        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Use synthesizedText.
9338        Using CSSProperty.text still uses the original text which might not have a space after ":".
9339
93402013-03-04  Timothy Hatcher  <timothy@apple.com>
9341
9342        Skip invalid properties when marking overridden properties.
9343
9344        Reviewed by Joseph Pecoraro.
9345
9346        * UserInterface/DOMNodeStyles.js:
9347        (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Check for not valid and continue early.
9348
93492013-03-04  Timothy Hatcher  <timothy@apple.com>
9350
9351        Flag properties that have other vendor keywords in the value so they are not crossed out in red.
9352
9353        Reviewed by Joseph Pecoraro.
9354
9355        * UserInterface/CSSProperty.js:
9356        (WebInspector.CSSProperty.prototype.hasOtherVendorNameOrKeyword): Check propertyValueHasOtherVendorKeyword too.
9357        * UserInterface/CSSStyleManager.js:
9358        (WebInspector.CSSStyleManager.prototype.propertyValueHasOtherVendorKeyword): Added.
9359
93602013-03-04  Timothy Hatcher  <timothy@apple.com>
9361
9362        Indent wrapped lines by 2 extra spaces to better break up long lines in the details sidebar.
9363
9364        <rdar://problem/13310983> Long styles that wrap are hard to read in new Style details sidebar.
9365
9366        Reviewed by Joseph Pecoraro.
9367
9368        * UserInterface/CSSStyleDeclarationTextEditor.css:
9369        (.css-style-text-editor > .CodeMirror pre): Tweak the padding and text-indent.
9370
93712013-03-04  Timothy Hatcher  <timothy@apple.com>
9372
9373        Add CodeMirrorCompletionController and start using it in CSSStyleDeclarationTextEditor.
9374
9375        This restores auto complete to the Style details sidebar and also paves the way for using
9376        CodeMirror for the console prompt.
9377
9378        <rdar://problem/13304962> REGRESSION: Style property autocomplete missing from the Style details sidebar
9379
9380        Reviewed by Joseph Pecoraro.
9381
9382        * UserInterface/CSSStyleDeclarationTextEditor.css:
9383        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .completion-pending .css-style-declaration-property.invalid):
9384        * UserInterface/CSSStyleDeclarationTextEditor.js:
9385        (WebInspector.CSSStyleDeclarationTextEditor):
9386        (WebInspector.CSSStyleDeclarationTextEditor.prototype.completionControllerCompletionsHidden):
9387        (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
9388        (WebInspector.CSSStyleDeclarationTextEditor.prototype):
9389        * UserInterface/CodeMirrorCompletionController.css: Added.
9390        (.CodeMirror .CodeMirror-lines .completion-hint):
9391        * UserInterface/CodeMirrorCompletionController.js: Added.
9392        (WebInspector.CodeMirrorCompletionController):
9393        (WebInspector.CodeMirrorCompletionController.prototype.get delegate):
9394        (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
9395        (WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange):
9396        (WebInspector.CodeMirrorCompletionController.prototype.isShowingCompletions):
9397        (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
9398        (WebInspector.CodeMirrorCompletionController.prototype.close):
9399        (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion):
9400        (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsClickedCompletion):
9401        (WebInspector.CodeMirrorCompletionController.prototype._hasPendingCompletion):
9402        (WebInspector.CodeMirrorCompletionController.prototype._notifyCompletionsHiddenSoon):
9403        (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
9404        (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
9405        (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
9406        (WebInspector.CodeMirrorCompletionController.prototype.update):
9407        (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
9408        (WebInspector.CodeMirrorCompletionController.prototype._removePendingCompletionLineStyleClass.removePendingStyleClass):
9409        (WebInspector.CodeMirrorCompletionController.prototype._removePendingCompletionLineStyleClass):
9410        (WebInspector.CodeMirrorCompletionController.prototype.isStopCharacter):
9411        (WebInspector.CodeMirrorCompletionController.prototype.isOpenBracketCharacter):
9412        (WebInspector.CodeMirrorCompletionController.prototype.isCloseBracketCharacter):
9413        (WebInspector.CodeMirrorCompletionController.prototype.matchingBracketCharacter):
9414        (WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
9415        (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
9416        (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
9417        (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
9418        (WebInspector.CodeMirrorCompletionController.prototype._handleUpKey):
9419        (WebInspector.CodeMirrorCompletionController.prototype._handleDownKey):
9420        (WebInspector.CodeMirrorCompletionController.prototype._handleRightOrEnterKey):
9421        (WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
9422        (WebInspector.CodeMirrorCompletionController.prototype._handleTabKey):
9423        (WebInspector.CodeMirrorCompletionController.prototype._handleChange):
9424        (WebInspector.CodeMirrorCompletionController.prototype._handleCursorActivity):
9425        (WebInspector.CodeMirrorCompletionController.prototype._handleHideAction):
9426        * UserInterface/CompletionSuggestionsView.css: Added.
9427        (.completion-suggestions):
9428        (.completion-suggestions > .completion-suggestions-container):
9429        (.completion-suggestions-container > .item):
9430        (.completion-suggestions-container > .item:hover):
9431        * UserInterface/CompletionSuggestionsView.js: Added.
9432        (WebInspector.CompletionSuggestionsView):
9433        (WebInspector.CompletionSuggestionsView.prototype.get delegate):
9434        (WebInspector.CompletionSuggestionsView.prototype.get visible):
9435        (WebInspector.CompletionSuggestionsView.prototype.get selectedIndex):
9436        (WebInspector.CompletionSuggestionsView.prototype.set selectedIndex):
9437        (WebInspector.CompletionSuggestionsView.prototype.selectNext):
9438        (WebInspector.CompletionSuggestionsView.prototype.selectPrevious):
9439        (WebInspector.CompletionSuggestionsView.prototype.isHandlingClickEvent):
9440        (WebInspector.CompletionSuggestionsView.prototype.show):
9441        (WebInspector.CompletionSuggestionsView.prototype.hide):
9442        (WebInspector.CompletionSuggestionsView.prototype.update):
9443        (WebInspector.CompletionSuggestionsView.prototype.get _selectedItemElement):
9444        (WebInspector.CompletionSuggestionsView.prototype._mouseDown):
9445        (WebInspector.CompletionSuggestionsView.prototype._mouseUp):
9446        (WebInspector.CompletionSuggestionsView.prototype._itemClicked):
9447        * UserInterface/Main.html:
9448
94492013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9450
9451        Disable some features while column debugging is broken
9452
9453        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9454
9455        To prevent broken behavior and a poor experience with breakpoints and
9456        debugging but still allow for pretty-printing disable some features
9457        related to columns. We can revert this change later and test more when
9458        the underlying issue is fixed.
9459
9460        Reviewed by Timothy Hatcher.
9461
9462        * UserInterface/DebuggerSidebarPanel.js:
9463        (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
9464        Instead of jumping to the display location, jump to the original location.
9465
9466        * UserInterface/SourceCodeTextEditor.js:
9467        (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
9468        Don't autoformat if we're being debugged.
9469
9470        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
9471        If we are going to be debugged unformat.
9472
9473        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
9474        Disallow setting breakpoints in formatted content.
9475
94762013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9477
9478        Update CodeMirror to ToT (v3.1+) which includes some important performance fixes
9479
9480        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9481
9482        Reviewed by Timothy Hatcher.
9483
9484        * UserInterface/External/CodeMirror/codemirror.js:
9485        * UserInterface/External/CodeMirror/javascript.js:
9486
94872013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9488
9489        Set the FormatterSourceMap on both Resource and Script like SourceMaps
9490
9491        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9492
9493        Most source code text editors are for Resources, like external scripts.
9494        However the backend identifies call frames with Script line and column
9495        information. So the Script needs to know about the Resource's formatter.
9496
9497        We register for events in case the execution line changes on the fly.
9498        This could happen if a breakpoint is hit on page load of a script that
9499        is auto formatted. When the page loads, the breakpoint is hit and the
9500        call frame is created with the original location and no formatter. When
9501        the script Resource is shown it gets formatted, the associated Script
9502        gets the formatter and the active call frame location updates its
9503        display location. In that case the text editor for the Resource may
9504        need to update its display of the execution line number.
9505
9506        Reviewed by Timothy Hatcher.
9507
9508        * UserInterface/SourceCodeTextEditor.js:
9509        (WebInspector.SourceCodeTextEditor.prototype.close):
9510        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
9511        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameSourceCodeLocationChanged):
9512        (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
9513
95142013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9515
9516        Update Display Strings in Breakpoint and CallFrame TreeElements
9517
9518        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9519
9520        If a breakpoint is on a column, show line:column. If the breakpoint is
9521        in a formatted view, set the subtitle to the original location. If a
9522        call frame is in a formatted source, include the original location in
9523        the tooltip.
9524
9525        Reviewed by Timothy Hatcher.
9526
9527        * UserInterface/SourceCodeLocation.js:
9528        (WebInspector.SourceCodeLocation.prototype.originalLocationString):
9529        (WebInspector.SourceCodeLocation.prototype.displayLocationString):
9530        (WebInspector.SourceCodeLocation.prototype._locationString):
9531        Provide generic file:line:column string support.
9532
9533        * Localizations/en.lproj/localizedStrings.js:
9534        * UserInterface/BreakpointTreeElement.js:
9535        (WebInspector.BreakpointTreeElement.prototype._updateTitles):
9536        * UserInterface/CallFrameTreeElement.js:
9537        (WebInspector.CallFrameTreeElement):
9538        Update strings where appropriate.
9539
95402013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9541
9542        Automatically pretty print files that look like they are minified.
9543
9544        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9545
9546        Reviewed by Timothy Hatcher.
9547
9548        * UserInterface/SourceCodeTextEditor.js:
9549        (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
9550
95512013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9552
9553        Update breakpoint handling for formatted content
9554
9555        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9556
9557        TextEditor and SourceCodeTextEditor both have a map that stores breakpoint
9558        information for editor lineNumber and columnNumber. For editors it makes
9559        the most sense to keep these maps consistent with the formatted state of
9560        the editor.
9561
9562        Terminology with this in mind "editor line info" is always the line and
9563        column information for the current state of the editor. If the editor
9564        is formatted, this is a formatted line and column of the sourceCode.
9565        if the editor is not formatted this is the original line and column of
9566        the sourceCode.
9567
9568        A tricky part here is that with a FormatterSourceMap is that it may map
9569        a simple line:0 to a more accurate line:#. For example setting the
9570        breakpoint on a pretty printed source code with leading whitespace, the
9571        accurate location will not be column 0 but instead be the column # of
9572        the first character on that line. When this happens we need to make sure
9573        that both the SourceCodeTextEditor and TextEditor have stored the more
9574        accurate location in their maps.
9575
9576        Reviewed by Timothy Hatcher.
9577
9578        * UserInterface/SourceCodeTextEditor.js:
9579        (WebInspector.SourceCodeTextEditor.prototype._unformattedLineInfoForEditorLineInfo):
9580        Given an editor line info, this gives us the original line info depending on
9581        if the text editor is formatted or not.
9582
9583        (WebInspector.SourceCodeTextEditor.prototype._editorLineInfoForSourceCodeLocation):
9584        Given a SourceCodeLocation this gives us a line info for the text editor depending
9585        on if the text editor is formatted or not. SourceCodeLocation already handles this.
9586
9587        (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointLocation):
9588        When a breakpoint moves, we'll need to update our tables removing the old
9589        location and setting the new location. SourceCodeLocation gives us the old
9590        and new formatted location which handles if the text editor is formatted or not.
9591
9592        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved):
9593        If the text editor is formatted, be sure to remove a breakpoint with the
9594        unformatted, original location because we're dealing with the backend.
9595
9596        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
9597        When the TextEditor sends a delegate up to the SourceCodeTextEditor about
9598        a breakpoint being added, it waits for a response to put into its table.
9599        Use this as an opportunity to provide the accurate resolved location.
9600
9601        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved):
9602        When the TextEditor sends a delegate up to the SourceCodeTextEditor about
9603        a breakpoint being moved, it has already put an entry into its table at
9604        line + column 0. We update that entry via updateBreakpointLineAndColumn.
9605
9606        (WebInspector.SourceCodeTextEditor.prototype.textEditorFormattingDidChange):
9607        After pretty printing the editor's value was completely changed. Some
9608        breakpoints may have moved, some might not have. Ignore the DisplayLocation
9609        change events when setting the formatter on the SourceCode and update all
9610        the breakpoint map locations for ourself and the underlying TextEditor.
9611
9612        * UserInterface/TextEditor.js:
9613        (WebInspector.TextEditor.prototype.updateBreakpointLineAndColumn):
9614        (WebInspector.TextEditor.prototype._gutterMouseDown):
9615        Update or set breakpoint info entires with accurante line and column info.
9616
96172013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9618
9619        Pretty print and incorporate the formatted location into the SourceCodeLocation display location
9620
9621        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9622
9623        When a SourceCodeTextEditor formats a SourceCode it produces a
9624        FormatterSourceMap and sets it on the SourceCode. All SourceCodeLocations
9625        associated with that SourceCode can update their display location.
9626        If a location is already listening for DisplayLocation change events
9627        it will just work (BreakPointTreeElements, CallFrameTreeElements).
9628
9629        SourceCodeLocation now has 3 sets of values and a display value:
9630
9631          - [public] sourceCode, lineNumber, columnNumber
9632            - raw original sourceCode and values
9633            - useful for interaction with the backend
9634
9635          - [public] formattedLineNumber, formattedColumnNumber
9636            - for the original sourceCode
9637            - if the sourceCode has a formatter, these are the formatted values
9638            - if the sourceCode doesn't have a formatter, these are the same as the raw values
9639            - useful for TextEditors that are showing content + gutters for formatted source
9640
9641          - [private] mappedResource, mappedLineNumber, mappedColumnNumber
9642            - if the sourceCode has a sourceMap, this is the mapped location of the raw
9643              values into a SourceMapResource line and column
9644            - if the sourceCode doesn't have a sourceMap these are null, NaN, NaN
9645            - useful for a display location, since it is the author's original pre-generated source
9646
9647          - [public] displayResource, displayLineNumber, displayColumnNumber
9648            - if there is a mapped location use that
9649            - if there is a formatted location use that
9650            - otherwise use the raw original location
9651            - useful for anyone who wants to display a location
9652
9653        Most users of SourceCodeLocation should only care about the display
9654        values and should register for DisplayLocation change events to know
9655        when to update.
9656
9657        Reviewed by Timothy Hatcher.
9658
9659        * UserInterface/TextEditor.js:
9660        (WebInspector.TextEditor):
9661        (WebInspector.TextEditor.prototype.get formatterSourceMap):
9662        (WebInspector.TextEditor.prototype._prettyPrint):
9663        Run the formatter. Update selection. Update search. Notify delegate.
9664
9665        * UserInterface/ScriptContentView.js:
9666        (WebInspector.ScriptContentView):
9667        (WebInspector.ScriptContentView.prototype._textEditorFormattingDidChange):
9668        * UserInterface/TextResourceContentView.js:
9669        (WebInspector.TextResourceContentView):
9670        (WebInspector.TextResourceContentView.prototype._textEditorFormattingDidChange):
9671        Update the pretty print button's activated state when formatting changes to match the TextEditor.
9672
9673        * UserInterface/SourceCodeTextEditor.js:
9674        (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
9675        The TextEditor changed formatting and updated its FormatterSourceMap. Set
9676        the FormatterSourceMap on the SourceCode itself.
9677
9678        * UserInterface/SourceCode.js:
9679        (WebInspector.SourceCode):
9680        (WebInspector.SourceCode.prototype.get formatterSourceMap):
9681        (WebInspector.SourceCode.prototype.set formatterSourceMap):
9682        A SourceCode may have a formatter source map when the TextEditor for it
9683        was pretty printed. Store that on the SourceCode so SourceCodeLocation
9684        objects know where to find it, and send an event when it changes.
9685
9686        * UserInterface/SourceCodeLocation.js:
9687        (WebInspector.SourceCodeLocation.prototype.get formattedLineNumber):
9688        (WebInspector.SourceCodeLocation.prototype.get formattedColumnNumber):
9689        (WebInspector.SourceCodeLocation.prototype._resolveFormattedLocation):
9690        Formatted location when the SourceCode is pretty printed. Original otherwise.
9691
9692        (WebInspector.SourceCodeLocation.prototype.get displayLineNumber):
9693        (WebInspector.SourceCodeLocation.prototype.get displayColumnNumber):
9694        Mapped location, fallback to formatted, fallback to raw original.
9695
9696        (WebInspector.SourceCodeLocation.prototype.hasFormattedLocation):
9697        (WebInspector.SourceCodeLocation.prototype.hasDifferentDisplayLocation):
9698        Helpful accessors for those that might be interested.
9699
9700        (WebInspector.SourceCodeLocation.prototype._sourceCodeFormatterDidChange):
9701        When the SourceCode's formatter source map changed resolve our re-resolve
9702        our locations and fire an event if needed.
9703
9704        (WebInspector.SourceCodeLocation.prototype._makeChangeAndDispatchChangeEventIfNeeded):
9705        Make the code simpler and handle formatted location changes.
9706
97072013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9708
9709        Add a pretty print button to text content views
9710
9711        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9712
9713        Reviewed by Timothy Hatcher.
9714
9715        * UserInterface/ContentBrowser.js:
9716        (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
9717        * UserInterface/FrameContentView.js:
9718        (WebInspector.FrameContentView.prototype.get navigationItems):
9719        Be sure to update navigation items when a FrameContentView changes
9720        content views (Source Code and DOM Tree), because the different views
9721        might have different navigation items.
9722
9723        * Localizations/en.lproj/localizedStrings.js:
9724        * UserInterface/ScriptContentView.js:
9725        (WebInspector.ScriptContentView.prototype.get navigationItems):
9726        (WebInspector.ScriptContentView.prototype._contentDidPopulate):
9727        (WebInspector.ScriptContentView.prototype._togglePrettyPrint):
9728        * UserInterface/TextResourceContentView.js:
9729        (WebInspector.TextResourceContentView.prototype.get navigationItems):
9730        (WebInspector.TextResourceContentView.prototype._contentDidPopulate):
9731        (WebInspector.TextResourceContentView.prototype._togglePrettyPrint):
9732        Add a pretty print button to Script and TextResource content views.
9733        Disabled initially, and enabled when content populates and the
9734        TextEditor supports formatting
9735        
9736        * UserInterface/TextEditor.js:
9737        (WebInspector.TextEditor):
9738        (WebInspector.TextEditor.prototype.set readOnly):
9739        (WebInspector.TextEditor.prototype.get formatted):
9740        (WebInspector.TextEditor.prototype.set formatted):
9741        (WebInspector.TextEditor.prototype._updateCodeMirrorReadOnly):
9742        Currently, mark the editor as readyOnly immediately when it is formatted.
9743        This may change in the future.
9744
9745        (WebInspector.TextEditor.prototype.hasFormatter):
9746        (WebInspector.TextEditor.prototype.canBeFormatted):
9747        Accessor for whether the TextEditor can be formatted.
9748
9749        * UserInterface/SourceCodeTextEditor.js:
9750        (WebInspector.SourceCodeTextEditor.prototype.canBeFormatted):
9751        Don't allow SourceMapResources to be formatted. This is to simplify
9752        later changes a bit. We can do this later in the future if we want.
9753        
9754        (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
9755        Fire an event when content populates.
9756
97572013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9758
9759        FormatterSourceMap to convert between original and formatted locations
9760
9761        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9762
9763        Add FormatterSourceMap class. This is nearly identical to OpenSource's
9764        FormatterSourceMapping, which does the same thing. This provides
9765        conversions in either direction between an original and formatted line
9766        and column number. It requires the original and formatted line endings
9767        and a mapping, all data the the ContentBuilder has.
9768
9769        Reviewed by Timothy Hatcher.
9770
9771        * UserInterface/FormatterSourceMap.js: Added.
9772        (WebInspector.FormatterSourceMap):
9773        (WebInspector.FormatterSourceMap.fromBuilder):
9774        (WebInspector.FormatterSourceMap.prototype.originalToFormatted):
9775        (WebInspector.FormatterSourceMap.prototype.formattedToOriginal):
9776        (WebInspector.FormatterSourceMap.prototype._locationToPosition):
9777        (WebInspector.FormatterSourceMap.prototype._positionToLocation):
9778        (WebInspector.FormatterSourceMap.prototype._convertPosition):
9779        * UserInterface/Main.html:
9780        * UserInterface/Utilities.js:
9781
97822013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9783
9784        CSS Pretty Printer
9785
9786        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9787
9788        Reviewed by Timothy Hatcher.
9789
9790        * UserInterface/CodeMirrorFormatters.js:
9791        (CodeMirror["css mode"].shouldHaveSpaceBeforeToken):
9792        (CodeMirror["css mode"].shouldHaveSpaceAfterLastToken):
9793        (CodeMirror["css mode"].newlinesAfterToken):
9794        (CodeMirror["css mode"].removeLastNewline):
9795        (CodeMirror["css mode"].indentAfterToken):
9796        (CodeMirror["css mode"].newlineBeforeToken):
9797        (CodeMirror["css mode"].dedentBeforeToken):
9798        (CodeMirror["css mode"].modifyStateForToken):
9799        The general goals are:
9800          - spaces after ',' in selector lists
9801          - spaces after ':' between properties and values
9802          - newlines after '{', '}', and ';', with 2 newlines between blocks
9803          - newlines after ',' in long selector lists "a,b,..,z {}"
9804          - indent after '{' and dedent before '}'
9805
98062013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9807
9808        Formatter, ContentBuilder, and JavaScript Pretty Printer
9809
9810        <rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
9811
9812        This patch adds a Formatter driver class, a ContentBuilder class that
9813        builds both the formatted string and line ending markers needed for a
9814        source mapping, and JavaScript CodeMirror extensions for pretty printing.
9815
9816        The Formatter and FormatterContentBuilder classes are not WebInspector
9817        prefixed. Their only dependency is CodeMirror and the CodeMirror modes.
9818        They are standalone, and could be moved to a Worker if needed.
9819
9820        The Formatter class takes a tokenizer (in our case a CodeMirror object)
9821        and a builder object. Call format() on a range to tokenize over that
9822        range and populate the builder for that range. The Formatter assumes
9823        the CodeMirror object has the appropriate pretty printing extensions.
9824
9825        The ContentBuilder class manages line endings the resulting string, and
9826        all things whitespace related in the output string (such as collapsing
9827        whitespace, and indentation).
9828
9829        The CodeMirror pretty printing extensions are very primitive. For each
9830        token CodeMirror outputs the mode for that token is asked if we should
9831        add a space before or after, add newlines before or after, indent or
9832        dedent, retroactively remove the last newline, or updating private state.
9833        Most of the time whitespace is already required languages, so whitespace
9834        only really needs to be added where it is optional and would be prettier.
9835        One simple example is "}else{" versus "} else {". The mode doesn't need
9836        to worry about collapsing whitespace. It just suggests where whitespace
9837        goes and the Formatter + ContentBuilder takes care of the rest.
9838
9839        Reviewed by Timothy Hatcher.
9840
9841        * UserInterface/Formatter.js: Added.
9842        (Formatter):
9843        (Formatter.prototype.format):
9844        A StringStream is considered to be one line. So split the content over
9845        the given range into lines, and tokenize over the lines. There are hooks
9846        for handling tokens, empty lines, and line endings.
9847
9848        (Formatter.prototype._handleToken):
9849        Ask the mode how to pretty print the current token.
9850
9851        (Formatter.prototype._handleEmptyLine):
9852        Preserve newlines in multi-line comments. If this is an empty line in
9853        a comment, force the builder to add a new line.
9854
9855        (Formatter.prototype._handleLineEnding):
9856        Notify the builder that of an original line ending.
9857
9858
9859        * UserInterface/FormatterContentBuilder.js: Added.
9860        (FormatterContentBuilder):
9861        (FormatterContentBuilder.prototype.get originalContent):
9862        (FormatterContentBuilder.prototype.get formattedContent):
9863        (FormatterContentBuilder.prototype.get mapping):
9864        (FormatterContentBuilder.prototype.get originalLineEndings):
9865        (FormatterContentBuilder.prototype.get formattedLineEndings):
9866        (FormatterContentBuilder.prototype.setOriginalContent):
9867        Results of a formatting run. Everything needed for a SourceMap.
9868
9869        (FormatterContentBuilder.prototype.appendToken):
9870        (FormatterContentBuilder.prototype.appendSpace):
9871        (FormatterContentBuilder.prototype.appendNewline):
9872        (FormatterContentBuilder.prototype.removeLastNewline):
9873        (FormatterContentBuilder.prototype.indent):
9874        (FormatterContentBuilder.prototype.dedent):
9875        (FormatterContentBuilder.prototype.addOriginalLineEnding):
9876        (FormatterContentBuilder.prototype.finish):
9877        Public interface is simple.
9878
9879        (FormatterContentBuilder.prototype._popNewLine):        
9880        (FormatterContentBuilder.prototype._append):
9881        Handle growing / shrinking the content + content length at the same time.
9882
9883        (FormatterContentBuilder.prototype._appendIndent):
9884        Indentation is stored in a cache to avoid recomputing often. However,
9885        the cache stops at 20, if there is an indentation greater than 20 we
9886        compose it in chunks.
9887
9888        (FormatterContentBuilder.prototype._addMappingIfNeeded):
9889        Add a mapping for each token originalPosition and formattedPosition.
9890
9891        (FormatterContentBuilder.prototype._addFormattedLineEnding):
9892        Keep track of formatted content line endings.
9893
9894        * UserInterface/CodeMirrorFormatters.js: Added.
9895        (CodeMirror["javascript mode"].shouldHaveSpaceBeforeToken):
9896        (CodeMirror["javascript mode"].shouldHaveSpaceAfterLastToken):
9897        (CodeMirror["javascript mode"].newlinesAfterToken):
9898        (CodeMirror["javascript mode"].removeLastNewline):
9899        (CodeMirror["javascript mode"].indentAfterToken):
9900        (CodeMirror["javascript mode"].newlineBeforeToken):
9901        (CodeMirror["javascript mode"].dedentBeforeToken):
9902        The general goal with these hooks are:
9903          - spaces before and after most operators (not unary)
9904          - spaces around keywords
9905          - newlines after '{', '}', and ';'
9906          - newlines after ',' when inside an object context
9907          - indent after '{' and dedent before '}'
9908
9909        * UserInterface/Main.html:
9910        Add new files.
9911
99122013-03-04  Joseph Pecoraro  <pecoraro@apple.com>
9913
9914        <rdar://problem/13331470> REGRESSION: Inspector debugger continue button is a pause icon when it should be an arrow
9915
9916        Reviewed by Timothy Hatcher.
9917
9918        * UserInterface/ButtonNavigationItem.js:
9919        (WebInspector.ButtonNavigationItem.prototype.set image):
9920        This was appending a new child image element each time instead of
9921        replacing the existing image. Remove the old children on changes.
9922
99232013-03-04  Antoine Quint  <graouts@apple.com>
9924
9925        <rdar://problem/13331811> Web Inspector: remove existing LayerTreeAgent protocol APIs (111251)
9926
9927        Deactivate the layer tree sidebar panel until the new API
9928        lands in WebCore and we can update the Internal code to use
9929        this API.
9930
9931        Reviewed by Timothy Hatcher.
9932
9933        * UserInterface/LayerTreeManager.js:
9934        (WebInspector.LayerTreeManager):
9935        * UserInterface/LayerTreeObserver.js:
9936        (WebInspector.LayerTreeObserver.prototype.layerTreeDidChange):
9937        * UserInterface/LayerTreeSidebarPanel.js:
9938        (WebInspector.LayerTreeSidebarPanel.prototype.supportsDOMNode):
9939
99402013-03-01  Timothy Hatcher  <timothy@apple.com>
9941
9942        Update the Style details sidebar when when pseudo classes are forced or media queries change.
9943
9944        <rdar://problem/13328298>
9945
9946        Reviewed by Joseph Pecoraro.
9947
9948        * UserInterface/CSSStyleManager.js:
9949        (WebInspector.CSSStyleManager.prototype.mediaQueryResultChanged): Call mediaQueryResultDidChange on each DOMNodeStyles.
9950        Removed the event since it wasn't used anymore.
9951        * UserInterface/DOMNode.js:
9952        (WebInspector.DOMNode.prototype.setPseudoClassEnabled): Fire the event after the agent actually does the change.
9953        (WebInspector.DOMNode.prototype.setPseudoClassEnabled.changed): Added.
9954        * UserInterface/DOMNodeStyles.js:
9955        (WebInspector.DOMNodeStyles): Added listener for EnabledPseudoClassesChanged.
9956        (WebInspector.DOMNodeStyles.prototype.mediaQueryResultDidChange): Added. Call _markAsNeedsRefresh.
9957        (WebInspector.DOMNodeStyles.prototype._markAsNeedsRefresh): Added.
9958        (WebInspector.DOMNodeStyles.prototype._pseudoClassesDidChange): Added. Call _markAsNeedsRefresh.
9959        (WebInspector.DOMNodeStyles.prototype._attributesDidChange): Use _markAsNeedsRefresh.
9960        (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange.checkRules): Ditto.
9961        (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): Ditto.
9962
99632013-03-01  Timothy Hatcher  <timothy@apple.com>
9964
9965        Changes are committed to frequently since updating to CodeMirror 3.1.
9966
9967        Reviewed by Joseph Pecoraro.
9968
9969        * UserInterface/CSSStyleDeclarationTextEditor.js:
9970        (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): The origin for user input
9971        changed from "input" to "+input". And there is now "+delete". Internally CodeMirror just looks for
9972        the "+" prefix to decide if the change should coalesce in undo history. We should do the same.
9973
99742013-03-01  Timothy Hatcher  <timothy@apple.com>
9975
9976        Fix style editing after an Inspector protocol change for how SourceRange is sent.
9977
9978        <rdar://problem/13324015> Style editing in the new Style details sidebar is broken after r144434
9979
9980        Reviewed by Joseph Pecoraro.
9981
9982        * UserInterface/CSSProperty.js:
9983        (WebInspector.CSSProperty): Removed startStyleSheetTextPosition and endStyleSheetTextPosition.
9984        Added styleSheetTextRange and styleDeclarationTextRange.
9985        (WebInspector.CSSProperty.prototype.update): Ditto. Delete _styleDeclarationTextRange if it isn't
9986        given so it can be recomputed.
9987        (WebInspector.CSSProperty.prototype.get styleSheetTextRange): Added.
9988        (WebInspector.CSSProperty.prototype.get styleDeclarationTextRange): Added. Compute if missing.
9989        * UserInterface/CSSStyleDeclaration.js:
9990        (WebInspector.CSSStyleDeclaration): Removed startStyleSheetTextPosition and endStyleSheetTextPosition.
9991        Added styleSheetTextRange.
9992        (WebInspector.CSSStyleDeclaration.prototype.update): Ditto.
9993        (WebInspector.CSSStyleDeclaration.prototype.get visibleProperties): Look for styleDeclarationTextRange.
9994        (WebInspector.CSSStyleDeclaration.prototype.get styleSheetTextRange): Added.
9995        * UserInterface/CSSStyleDeclarationTextEditor.js:
9996        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): Don't add
9997        checkboxes for properties if the editor is read-only.
9998        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Use styleDeclarationTextRange.
9999        Don't add checkboxes for comments if the editor is read-only.
10000        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Use styleSheetTextRange.
10001        * UserInterface/DOMNodeStyles.js:
10002        (WebInspector.DOMNodeStyles.prototype.changeStyleText): Use styleSheetTextRange.
10003        (WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent): Use styleSheetTextRange.
10004        (WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Update comment.
10005        (WebInspector.DOMNodeStyles.prototype._parseSourceRangePayload): Added. Helper.
10006        (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Use _parseSourceRangePayload.
10007        (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload): Ditto.
10008        * UserInterface/TextRange.js:
10009        (WebInspector.TextRange): Allow 4 or 2 argument construction. One for lines and columns, the other for offsets.
10010        (WebInspector.TextRange.prototype.get startLine): Added.
10011        (WebInspector.TextRange.prototype.get startColumn): Added.
10012        (WebInspector.TextRange.prototype.get endLine): Added.
10013        (WebInspector.TextRange.prototype.get endColumn): Added.
10014        (WebInspector.TextRange.prototype.get startOffset): Added.
10015        (WebInspector.TextRange.prototype.get endOffset): Added.
10016        (WebInspector.TextRange.prototype.resolveLinesAndColumns): Added.
10017        (WebInspector.TextRange.prototype.resolveLinesAndColumns.countNewLineCharacters): Added.
10018        (WebInspector.TextRange.prototype.resolveOffsets): Added.
10019
100202013-02-28  Timothy Hatcher  <timothy@apple.com>
10021
10022        Switch from post-processing for the style pretty printer to fully synthesized content.
10023
10024        Inserting a newline between the semicolon and the next property was causing the newline
10025        to be inserted between the next property and its checkbox. This is controllable via the
10026        insertLeft option on bookmarks in CodeMirror; however, that causes typed text to go on
10027        the left of the checkbox.
10028
10029        Switching to the synthesized code path is cleaner and simpler.
10030
10031        <rdar://problem/13314682> Styles on Twitter.com have checkboxes at the end of the property
10032        instead of beginning
10033
10034        Reviewed by Joseph Pecoraro.
10035
10036        * UserInterface/CSSStyleDeclarationTextEditor.js:
10037        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Renamed lineCount()
10038        to countNewLineCharacters() since it conflicts with the lineCount variable.
10039
100402013-02-28  Timothy Hatcher  <timothy@apple.com>
10041
10042        Don't disable property checkboxes after click to prevent a subtle flash.
10043
10044        <rdar://problem/13306506> CSS rule box flashes checkboxes and crossed-out text during editing
10045
10046        Reviewed by Antoine Quint.
10047
10048        * UserInterface/CSSStyleDeclarationTextEditor.js:
10049        (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCheckboxChanged): Don't set disabled.
10050        Remove assert for range since it might have been removed already.
10051        (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged): Ditto.
10052
100532013-02-28  Timothy Hatcher  <timothy@apple.com>
10054
10055        Use CodeMirror 3.1's new getAllMarks() instead of tracking them ourselves.
10056
10057        Also fix an assert that would fire if we reused a text marker that was removed.
10058
10059        Reviewed by Antoine Quint.
10060
10061        * UserInterface/CSSStyleDeclarationTextEditor.js:
10062        (WebInspector.CSSStyleDeclarationTextEditor): Remove _textMarkers.
10063        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Stop using _textMarkers.
10064        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): Ditto.
10065        Also only reuse a marker if it is still in the document.
10066        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Stop using _textMarkers.
10067        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Ditto.
10068
100692013-02-27  Timothy Hatcher  <timothy@apple.com>
10070
10071        Remove a flash of the color swatch when toggling a property.
10072
10073        Reviewed by Joseph Pecoraro.
10074
10075        * UserInterface/CSSStyleDeclarationTextEditor.js:
10076        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Add lineNumber
10077        parameter to update only that line. Also skip colors that are already marked.
10078        (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCheckboxChanged): Call _createColorSwatches.
10079        (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged): Ditto.
10080        (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked): Set __markedColor
10081        to true so we know it is a color. Remove an unused class name.
10082
100832013-02-27  Timothy Hatcher  <timothy@apple.com>
10084
10085        Pretty print the style text if there are more properties than there are lines.
10086
10087        There are a few style rules on apple.com that are multiple lines with 5-10
10088        properties per line. These were avoiding the pretty printing because the line
10089        count was greater than one.
10090
10091        Reviewed by Joseph Pecoraro.
10092
10093        * UserInterface/CSSStyleDeclaration.js:
10094        (WebInspector.CSSStyleDeclaration.prototype.update): Clear _visibleProperties.
10095        (WebInspector.CSSStyleDeclaration.prototype.get visibleProperties): Added.
10096        * UserInterface/CSSStyleDeclarationTextEditor.js:
10097        (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties): Add an
10098        option to only iterate over the visible properties. Also pass along if this is the last
10099        property to the callback.
10100        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Pass true to
10101        _iterateOverProperties.
10102        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Pretty print if the
10103        visible property count is greater than the line count.
10104
101052013-02-27  Timothy Hatcher  <timothy@apple.com>
10106
10107        Fix the text selection color in the style
10108
10109        This is fallout from upgrading to CodeMirror 3.1.
10110
10111        <rdar://problem/13307885> REGRESSION: Selection color in CodeMirror editors is always showing as gray unfocused
10112
10113        Reviewed by Joseph Pecoraro.
10114
10115        * UserInterface/CSSStyleDeclarationTextEditor.css:
10116        (.css-style-text-editor > .CodeMirror.CodeMirror-focused .CodeMirror-selected): Fixed the selector
10117        to look for CodeMirror-focused on the .CodeMirror element.
10118        * UserInterface/TextEditor.css:
10119        (.text-editor > .CodeMirror.CodeMirror-focused .CodeMirror-selected): Ditto.
10120
101212013-02-27  Timothy Hatcher  <timothy@apple.com>
10122
10123        Don't do a full refresh of the Style details sidebar unless the included style declarations
10124        actually did change.
10125
10126        Firing the DOMNodeStyles refreshed event cause the DOM to be rebuilt and that interrupts typing
10127        and causes the checkboxes to flash.
10128
10129        <rdar://problem/13306506> CSS rule box flashes checkboxes and crossed-out text during editing
10130        <rdar://problem/13306813> Typing very fast drops characters when editing in the Style details sidebar
10131
10132        Reviewed by Joseph Pecoraro.
10133
10134        * UserInterface/DOMNodeStyles.js:
10135        (WebInspector.DOMNodeStyles.prototype.refresh): Removed dontFireRefreshedEvent parameter. We now
10136        smartly detect if the event needs to fire.
10137        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Remove dontFireRefreshedEvent.
10138        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Iterate over the styles and
10139        check if any were added or removed from the last refresh.
10140        (WebInspector.DOMNodeStyles.prototype.attributeChanged): Stop passing true to refresh().
10141        (WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Ditto.
10142
101432013-02-27  Timothy Hatcher  <timothy@apple.com>
10144
10145        WebInspector.CSSProperty.Event.OverriddenStatusChanged is firing too much.
10146
10147        In the workaround that landed in r48890, we delayed the fetch for inline and computed styles.
10148        This caused the OverriddenStatusChanged event to fire because the coalesce delay timed out
10149        while waiting for the inline style to come over the wire.
10150
10151        Now we fetch them immediately again and if matched styles fails we make the inline and computed
10152        style callbacks bail before parsing their results. Failing is an edge case that might be fixed
10153        on the backend soon, so throwing the results away isn't that expensive. This also improves
10154        refresh performance in the common case.
10155
10156        Reviewed by Joseph Pecoraro.
10157
10158        * UserInterface/DOMNodeStyles.js:
10159        (WebInspector.DOMNodeStyles.prototype.refresh): Initialize matchedStylesFailed to false.
10160        (WebInspector.DOMNodeStyles.prototype.fetchedMatchedStyles): Set matchedStylesFailed.
10161        (WebInspector.DOMNodeStyles.prototype.fetchedInlineStyles): Return early if matchedStylesFailed.
10162        (WebInspector.DOMNodeStyles.prototype.fetchedComputedStyle): Ditto.
10163
101642013-02-27  Timothy Hatcher  <timothy@apple.com>
10165
10166        Properties are not updated when overridden status changes.
10167
10168        This is fallout from upgrading to CodeMirror 3.1.
10169
10170        Reviewed by Joseph Pecoraro.
10171
10172        * UserInterface/CSSStyleDeclarationTextEditor.js:
10173        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
10174        The cm property moved to the new doc property of TextMarker.
10175
101762013-02-27  Timothy Hatcher  <timothy@apple.com>
10177
10178        Pretty print the style text if there are multiple properties on only one line.
10179
10180        This helps cases like apple.com and nytimes.com where minified or single line
10181        rules are the norm.
10182
10183        Reviewed by Joseph Pecoraro.
10184
10185        * UserInterface/CSSStyleDeclarationTextEditor.js:
10186        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Loop over
10187        the properties that have markers and add newlines after them.
10188
101892013-02-27  Timothy Hatcher  <timothy@apple.com>
10190
10191        Make color swatches show up for user agent styles, and other styles that don't have text.
10192
10193        Reviewed by Joseph Pecoraro.
10194
10195        * UserInterface/CSSStyleDeclarationTextEditor.js:
10196        (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): Return early if the style isn't
10197        editable. This still can be called when readOnly is set because clicking on a color swatch modifies the text.
10198        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Broke color matching out into
10199        _createColorSwatches. Added nonatomic support to avoid nesting operations.
10200        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Added.
10201        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Call _createColorSwatches in synthesized
10202        case when there isn't style text.
10203
102042013-02-27  Antoine Quint  <graouts@apple.com>
10205
10206        <rdar://problem/13218172> Make hover state for dashboard icons more pronounced
10207
10208        Add a thin border around dashboard items on hover and make it slightly
10209        more pronounced when the item is also being clicked.
10210
10211        Reviewed by Joseph Pecoraro.
10212
10213        * UserInterface/DashboardView.css:
10214        (.dashboard > .item):
10215        (.dashboard > .item.enabled:hover):
10216        (.dashboard > .item.enabled:active):
10217        (.toolbar.normal-size.icon-and-label-horizontal > .item-section > .dashboard > .item):
10218        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .item):
10219        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
10220        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .time):
10221        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
10222        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
10223        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
10224        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
10225        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .item):
10226        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
10227        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .time):
10228        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
10229        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
10230        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
10231        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
10232
102332013-02-27  Timothy Hatcher  <timothy@apple.com>
10234
10235        Update CodeMirror from 3.0.2 to 3.1.
10236
10237        Rubber-stamped by Jeff Miller.
10238
10239        * UserInterface/CSSStyleDeclarationTextEditor.js:
10240        (WebInspector.CSSStyleDeclarationTextEditor.prototype.get focused): Use the wrapper
10241        element since the classname moved from the scroller element.
10242        * UserInterface/External/CodeMirror/codemirror.css: Updated.
10243        * UserInterface/External/CodeMirror/codemirror.js: Updated.
10244        * UserInterface/External/CodeMirror/htmlmixed.js: Updated.
10245        * UserInterface/External/CodeMirror/javascript.js: Updated.
10246        * UserInterface/External/CodeMirror/matchbrackets.js: Updated.
10247        * UserInterface/External/CodeMirror/searchcursor.js: Updated.
10248
102492013-02-26  Timothy Hatcher  <timothy@apple.com>
10250
10251        Add support to CodeMirror for incrementing and decrementing numbers.
10252
10253        The key binding are:
10254        * Option-Up: +1
10255        * Shift-Option-Up: +10
10256        * Option-PageUp: +10
10257        * Shift-Option-PageUp: +100
10258        * Option-Down: -1
10259        * Shift-Option-Down: -10
10260        * Option-PageDown: -10
10261        * Shift-Alt-PageDown: -100
10262
10263        When altering by 1 or -1 any numbers between 1 and -1 will be altered
10264        by 0.1 or -0.1 instead.
10265
10266        Reviewed by Joseph Pecoraro.
10267
10268        * UserInterface/CodeMirrorAdditions.js:
10269        (alterNumber): Added. Hooked up via the default key map that extends the
10270        Mac keybindings. This means all instances of CodeMirror get this support.
10271
102722013-02-26  Timothy Hatcher  <timothy@apple.com>
10273
10274        Add color swatches next to color strings.
10275
10276        <rdar://problem/7206272>
10277
10278        Reviewed by Joseph Pecoraro.
10279
10280        * Localizations/en.lproj/localizedStrings.js: Updated.
10281        * UserInterface/CSSStyleDeclarationTextEditor.css:
10282        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch): Added.
10283        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch > span): Added.
10284        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:hover > span): Added.
10285        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:active > span): Added.
10286        * UserInterface/CSSStyleDeclarationTextEditor.js:
10287        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Search for colors
10288        and add swatches next to them.
10289        (WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked): Added. Replace the
10290        text with the next color format.
10291        * UserInterface/Color.js:
10292        (WebInspector.Color.prototype.nextFormat): Added. Helper to pick the next format.
10293
102942013-02-26  Timothy Hatcher  <timothy@apple.com>
10295
10296        Add checkboxes next to property names and commented out properties.
10297
10298        Unchecking will comment out the property and checking the box next to a property comment
10299        will uncomment it and make it live again.
10300
10301        <rdar://problem/7206272>
10302
10303        Reviewed by Joseph Pecoraro.
10304
10305        * UserInterface/CSSStyleDeclarationTextEditor.css:
10306        (.css-style-text-editor.read-only > .CodeMirror pre): Added. Indent the text the same amount
10307        as if there were checkboxes.
10308        (.css-style-text-editor > .CodeMirror .CodeMirror-lines input[type=checkbox]): Added.
10309        (.css-style-text-editor:hover > .CodeMirror .CodeMirror-lines input[type=checkbox]): Added.
10310        * UserInterface/CSSStyleDeclarationTextEditor.js:
10311        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Look for comments
10312        that look like properties and add checkboxes in front of them.
10313        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
10314        Create checkbox marker for properties or update the existing one.
10315        (WebInspector.CSSStyleDeclarationTextEditor.prototype._clearTextMarkers): Delete __checkboxMarker.
10316        (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCheckboxChanged): Added.
10317        (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged): Added.
10318        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Set the read-only style class
10319        so the text of read-only styles is indented the same amount as if there were checkboxes.
10320
103212013-02-25  Timothy Hatcher  <timothy@apple.com>
10322
10323        Implement the Rules details style panel.
10324
10325        <rdar://problem/7206272&12526319>
10326
10327        Reviewed by Joseph Pecoraro.
10328
10329        * Localizations/en.lproj/localizedStrings.js: Updated.
10330
10331        * UserInterface/CSSStyleDeclarationSection.css: Added.
10332        (.style-declaration-section):
10333        (.style-declaration-section + .style-declaration-section):
10334        (.style-declaration-section.last-in-group):
10335        (.style-declaration-section.last-in-group + .style-declaration-section):
10336        (.style-declaration-section.last-in-group + .style-declaration-section:last-child):
10337        (.style-declaration-section:last-child):
10338        (.style-declaration-section > .header):
10339        (.style-declaration-section > .header > .icon):
10340        (.style-declaration-section > .header > .selector):
10341        (.style-declaration-section > .header > .selector:focus):
10342        (.style-declaration-section.selector-locked > .header > .selector):
10343        (.style-declaration-section.locked > .header::after):
10344        (.style-declaration-section > .header > .selector > .matched):
10345        (.style-declaration-section > .header > .origin):
10346        (.style-declaration-section > .header > .origin > .go-to-link):
10347
10348        * UserInterface/CSSStyleDeclarationSection.js: Added.
10349        (WebInspector.CSSStyleDeclarationSection):
10350        (WebInspector.CSSStyleDeclarationSection.prototype.get element):
10351        (WebInspector.CSSStyleDeclarationSection.prototype.get style):
10352        (WebInspector.CSSStyleDeclarationSection.prototype.get lastInGroup):
10353        (WebInspector.CSSStyleDeclarationSection.prototype.set lastInGroup):
10354        (WebInspector.CSSStyleDeclarationSection.prototype.get focused):
10355        (WebInspector.CSSStyleDeclarationSection.prototype.focus):
10356        (WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
10357        (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
10358        (WebInspector.CSSStyleDeclarationSection.prototype.updateLayout):
10359        (WebInspector.CSSStyleDeclarationSection.prototype._commitSelector):
10360
10361        * UserInterface/Images/StyleRuleAuthor.pdf: Added.
10362        * UserInterface/Images/StyleRuleInherited.pdf: Added.
10363        * UserInterface/Images/StyleRuleInheritedElement.pdf: Added.
10364        * UserInterface/Images/StyleRuleInspector.pdf: Added.
10365        * UserInterface/Images/StyleRuleUser.pdf: Added.
10366        * UserInterface/Images/StyleRuleUserAgent.pdf: Added.
10367
10368        * UserInterface/Main.html: Included new files.
10369
10370        * UserInterface/RulesStyleDetailsPanel.css: Added.
10371        (.sidebar > .panel.details.css-style .rules .inherited-label):
10372        (.sidebar > .panel.details.css-style .rules .inherited-label + .style-declaration-section):
10373
10374        * UserInterface/RulesStyleDetailsPanel.js:
10375        (WebInspector.RulesStyleDetailsPanel):
10376        (WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
10377        (WebInspector.RulesStyleDetailsPanel.prototype.refresh):
10378        (WebInspector.RulesStyleDetailsPanel.prototype.shown):
10379        (WebInspector.RulesStyleDetailsPanel.prototype.hidden):
10380        (WebInspector.RulesStyleDetailsPanel.prototype.widthDidChange):
10381
10382        * UserInterface/StyleRuleIcons.css: Added.
10383        (.author-style-rule-icon .icon):
10384        (.user-style-rule-icon .icon):
10385        (.user-agent-style-rule-icon .icon):
10386        (.inspector-style-rule-icon .icon):
10387        (.inherited-style-rule-icon .icon):
10388        (.inherited-element-style-rule-icon .icon):
10389
103902013-02-25  Timothy Hatcher  <timothy@apple.com>
10391
10392        Implement the Computed details style panel.
10393
10394        Reviewed by Joseph Pecoraro.
10395
10396        * Localizations/en.lproj/localizedStrings.js: Updated.
10397        * UserInterface/ComputedStyleDetailsPanel.js:
10398        (WebInspector.ComputedStyleDetailsPanel):
10399        (WebInspector.ComputedStyleDetailsPanel.prototype.refresh):
10400        (WebInspector.ComputedStyleDetailsPanel.prototype.shown):
10401        (WebInspector.ComputedStyleDetailsPanel.prototype.widthDidChange):
10402        (WebInspector.ComputedStyleDetailsPanel.prototype._computedStyleShowAllCheckboxValueChanged):
10403
104042013-02-25  Timothy Hatcher  <timothy@apple.com>
10405
10406        Add CSSStyleDeclarationTextEditor.
10407
10408        This class implements a rich text editor for style text. It will reflect the assigned CSSStyleDeclaration.
10409        Edits will be applied to the page and property parse errors or overridden status will be highlighted.
10410
10411        Reviewed by Joseph Pecoraro.
10412
10413        * UserInterface/CSSStyleDeclarationTextEditor.css: Added.
10414        (.css-style-text-editor):
10415        (.css-style-text-editor > .CodeMirror):
10416        (.css-style-text-editor > .CodeMirror *):
10417        (.css-style-text-editor > .CodeMirror-scroll):
10418        (.css-style-text-editor > .CodeMirror .CodeMirror-lines):
10419        (.css-style-text-editor > .CodeMirror pre):
10420        (.css-style-text-editor > .CodeMirror .CodeMirror-selected):
10421        (.css-style-text-editor > .CodeMirror .CodeMirror-focused .CodeMirror-selected):
10422        (.css-style-text-editor > .CodeMirror .CodeMirror-cursor):
10423        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.overridden):
10424        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.invalid):
10425        (.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited):
10426        * UserInterface/CSSStyleDeclarationTextEditor.js: Added.
10427        (WebInspector.CSSStyleDeclarationTextEditor):
10428        (WebInspector.CSSStyleDeclarationTextEditor.prototype.get element):
10429        (WebInspector.CSSStyleDeclarationTextEditor.prototype.get delegate):
10430        (WebInspector.CSSStyleDeclarationTextEditor.prototype.set delegate):
10431        (WebInspector.CSSStyleDeclarationTextEditor.prototype.get style):
10432        (WebInspector.CSSStyleDeclarationTextEditor.prototype.set style):
10433        (WebInspector.CSSStyleDeclarationTextEditor.prototype.get focused):
10434        (WebInspector.CSSStyleDeclarationTextEditor.prototype.get alwaysShowPropertyNames):
10435        (WebInspector.CSSStyleDeclarationTextEditor.prototype.set alwaysShowPropertyNames):
10436        (WebInspector.CSSStyleDeclarationTextEditor.prototype.get showsImplicitProperties):
10437        (WebInspector.CSSStyleDeclarationTextEditor.prototype.set showsImplicitProperties):
10438        (WebInspector.CSSStyleDeclarationTextEditor.prototype.get sortProperties):
10439        (WebInspector.CSSStyleDeclarationTextEditor.prototype.set sortProperties):
10440        (WebInspector.CSSStyleDeclarationTextEditor.prototype.focus):
10441        (WebInspector.CSSStyleDeclarationTextEditor.prototype.refresh):
10442        (WebInspector.CSSStyleDeclarationTextEditor.prototype.updateLayout):
10443        (WebInspector.CSSStyleDeclarationTextEditor.prototype.shown):
10444        (WebInspector.CSSStyleDeclarationTextEditor.prototype.hidden):
10445        (WebInspector.CSSStyleDeclarationTextEditor.prototype._formatedContent):
10446        (WebInspector.CSSStyleDeclarationTextEditor.prototype._commitChanges):
10447        (WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
10448        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
10449        (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkerForPropertyIfNeeded):
10450        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
10451        (WebInspector.CSSStyleDeclarationTextEditor.prototype._clearTextMarkers):
10452        (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties.sortProperty):
10453        (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties):
10454        (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyOverriddenStatusChanged):
10455        (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertiesChanged):
10456        (WebInspector.CSSStyleDeclarationTextEditor.prototype._styleOffsetToCodeMirrorPosition):
10457        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update.else.lineCount):
10458        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
10459        (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
10460        * UserInterface/CodeMirrorAdditions.js:
10461        * UserInterface/Main.html:
10462
104632013-02-25  Timothy Hatcher  <timothy@apple.com>
10464
10465        Implement the Metrics details style panel.
10466
10467        Converts BoxModelDetailsSectionRow to use the new CSS model. Removes code needed to
10468        work with the old CSS model.
10469
10470        Reviewed by Joseph Pecoraro.
10471
10472        * Localizations/en.lproj/localizedStrings.js: Updated.
10473        * UserInterface/BoxModelDetailsSectionRow.js:
10474        (WebInspector.BoxModelDetailsSectionRow):
10475        (WebInspector.BoxModelDetailsSectionRow.prototype.get nodeStyles):
10476        (WebInspector.BoxModelDetailsSectionRow.prototype.set nodeStyles):
10477        (WebInspector.BoxModelDetailsSectionRow.prototype._refresh):
10478        (WebInspector.BoxModelDetailsSectionRow.prototype._getPropertyValueAsPx):
10479        (WebInspector.BoxModelDetailsSectionRow.prototype._highlightDOMNode):
10480        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
10481        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaWidthElement):
10482        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaHeightElement):
10483        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
10484        (WebInspector.BoxModelDetailsSectionRow.prototype._startEditing):
10485        (WebInspector.BoxModelDetailsSectionRow.prototype._alteredFloatNumber): Added. Copied from the now
10486        removed CSSPropertyPrompt class.
10487        (WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown):
10488        (WebInspector.BoxModelDetailsSectionRow.prototype._editingCancelled):
10489        (WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput):
10490        * UserInterface/MetricsStyleDetailsPanel.js:
10491        (WebInspector.MetricsStyleDetailsPanel):
10492        (WebInspector.MetricsStyleDetailsPanel.prototype.refresh):
10493
104942013-02-25  Timothy Hatcher  <timothy@apple.com>
10495
10496        Remember the scroll position when refreshing the style detail panels.
10497
10498        Reviewed by Joseph Pecoraro.
10499
10500        * UserInterface/StyleDetailsPanel.js:
10501        (WebInspector.StyleDetailsPanel.prototype.refreshIfNeeded): Call _refreshPreservingScrollPosition
10502        instead refresh.
10503        (WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition): Added. Only remember the
10504        scroll position if the previous node is the same as this one.
10505        (WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed): Call _refreshPreservingScrollPosition
10506        instead refresh.
10507
105082013-02-25  Timothy Hatcher  <timothy@apple.com>
10509
10510        Tell SidebarPanel and StyleDetailsPanel when the width of the Sidebar changes.
10511
10512        This will be needed to update CodeMirror on the size change.
10513
10514        Reviewed by Joseph Pecoraro.
10515
10516        * UserInterface/CSSStyleDetailsSidebarPanel.js:
10517        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange): Added. Tell the selected
10518        panel to refresh if needed.
10519        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Added. Tell the selected panel
10520        that the width changed.
10521        * UserInterface/Sidebar.js:
10522        (WebInspector.Sidebar.prototype.set width): Call widthDidChange on the sidebar panel.
10523        (WebInspector.Sidebar.prototype.set collapsed): Ditto.
10524        * UserInterface/SidebarPanel.js:
10525        (WebInspector.SidebarPanel.prototype.widthDidChange): Added stub.
10526        * UserInterface/StyleDetailsPanel.js:
10527        (WebInspector.StyleDetailsPanel.prototype.widthDidChange): Added stub.
10528
105292013-02-21  Timothy Hatcher  <timothy@apple.com>
10530
10531        Add start implementation for each of the three Style detail panels.
10532
10533        <rdar://problem/7206272&12526319>
10534
10535        Reviewed by Joseph Pecoraro.
10536
10537        * Localizations/en.lproj/localizedStrings.js: Updated.
10538        * UserInterface/CSSStyleDetailsSidebarPanel.css:
10539        (.sidebar > .panel.details.css-style):
10540        (.sidebar > .panel.details.css-style > .navigation-bar):
10541        (.sidebar > .panel.details.css-style > .content):
10542        * UserInterface/CSSStyleDetailsSidebarPanel.js:
10543        (WebInspector.CSSStyleDetailsSidebarPanel):
10544        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
10545        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._navigationItemSelected):
10546        * UserInterface/ComputedStyleDetailsPanel.js: Added.
10547        (WebInspector.ComputedStyleDetailsPanel):
10548        * UserInterface/DOMNodeStyles.js:
10549        (WebInspector.DOMNodeStyles.prototype.get needsRefresh): Added.
10550        * UserInterface/Main.html:
10551        * UserInterface/Main.js:
10552        (WebInspector._updateStickyPostionStyles):
10553        * UserInterface/MetricsStyleDetailsPanel.js: Added.
10554        (WebInspector.MetricsStyleDetailsPanel):
10555        * UserInterface/RulesStyleDetailsPanel.js: Added.
10556        (WebInspector.RulesStyleDetailsPanel):
10557        * UserInterface/StyleDetailsPanel.js: Added.
10558        (WebInspector.StyleDetailsPanel):
10559        (WebInspector.StyleDetailsPanel.prototype.get element):
10560        (WebInspector.StyleDetailsPanel.prototype.get navigationItem):
10561        (WebInspector.StyleDetailsPanel.prototype.get nodeStyles):
10562        (WebInspector.StyleDetailsPanel.prototype.shown):
10563        (WebInspector.StyleDetailsPanel.prototype.hidden):
10564        (WebInspector.StyleDetailsPanel.prototype.markAsNeedsRefresh):
10565        (WebInspector.StyleDetailsPanel.prototype.refreshIfNeeded):
10566        (WebInspector.StyleDetailsPanel.prototype.refresh):
10567        (WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed):
10568        (WebInspector.StyleDetailsPanel.prototype._nodeStylesNeedsRefreshed):
10569
105702013-02-21  Timothy Hatcher  <timothy@apple.com>
10571
10572        Add start of new implementation of CSSStyleDetailsSidebarPanel.
10573
10574        <rdar://problem/7206272&12526319>
10575
10576        Reviewed by Joseph Pecoraro.
10577
10578        * UserInterface/CSSStyleDetailsSidebarPanel.css: Added.
10579        (.sidebar > .panel.details.css-style): Added. Empty for now.
10580        * UserInterface/CSSStyleDetailsSidebarPanel.js: Added.
10581        (WebInspector.CSSStyleDetailsSidebarPanel):
10582        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.supportsDOMNode):
10583        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
10584        * UserInterface/Images/NavigationItemBrushAndRuler.pdf: Added.
10585
105862013-02-21  Timothy Hatcher  <timothy@apple.com>
10587
10588        Remove CSSStyleDetailsSidebarPanel and friends in preparation for a new implementation.
10589
10590        <rdar://problem/7206272&12526319>
10591
10592        Rubber-stamped by Joseph Pecoraro.
10593
10594        * UserInterface/CSSPropertyPrompt.js: Removed.
10595        * UserInterface/CSSStyleDetailsSidebarPanel.css: Removed.
10596        * UserInterface/CSSStyleDetailsSidebarPanel.js: Removed.
10597        * UserInterface/ComputedStylePropertiesSection.js: Removed.
10598        * UserInterface/Main.html: Removed files except CSSStyleDetailsSidebarPanel.{js,css}.
10599        * UserInterface/OldCSSMedia.js: Removed.
10600        * UserInterface/OldCSSProperty.js: Removed.
10601        * UserInterface/OldCSSRule.js: Removed.
10602        * UserInterface/OldCSSStyleDeclaration.js: Removed.
10603        * UserInterface/StylePropertiesSection.js: Removed.
10604        * UserInterface/StylePropertyTreeElement.js: Removed.
10605
106062013-02-21  Timothy Hatcher  <timothy@apple.com>
10607
10608        Remove AppearanceDetailsSidebarPanel in preparation for it being merged with Style details.
10609
10610        <rdar://problem/7206272&12526319>
10611
10612        Reviewed by Joseph Pecoraro.
10613
10614        * UserInterface/AppearanceDetailsSidebarPanel.js: Removed.
10615        * UserInterface/Main.html: Removed AppearanceDetailsSidebarPanel.js.
10616        * UserInterface/Main.js:
10617        (WebInspector.contentLoaded): Removed AppearanceDetailsSidebarPanel.
10618
106192013-02-21  Timothy Hatcher  <timothy@apple.com>
10620
10621        Add support for text only navigation buttons.
10622
10623        This will be used by the navigation bar in the new Styles sidebar.
10624
10625        Reviewed by Joseph Pecoraro.
10626
10627        * UserInterface/ButtonNavigationItem.css:
10628        (.navigation-bar .item.button.text-only): Added.
10629        (.navigation-bar .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
10630        Use -webkit-calc in the background-position to work with variable widths.
10631        * UserInterface/ButtonNavigationItem.js:
10632        (WebInspector.ButtonNavigationItem):
10633        (WebInspector.ButtonNavigationItem.prototype.get label):
10634        (WebInspector.ButtonNavigationItem.prototype.set label):
10635        (WebInspector.ButtonNavigationItem.prototype.set image):
10636        * UserInterface/RadioButtonNavigationItem.css:
10637        (.navigation-bar .item.radio.button:not(.text-only)): Added :not(.text-only) to allow
10638        variable based on text length.
10639        (.navigation-bar.collapsed .item.radio.button:not(.text-only)): Ditto.
10640        (.navigation-bar .item.radio.button.selected): Use -webkit-calc in the background-position
10641        to work with variable widths.
10642
106432013-02-25  Timothy Hatcher  <timothy@apple.com>
10644
10645        Don't try to commit changes before we have new text positions.
10646
10647        We need to keep the startStyleSheetTextPosition and endStyleSheetTextPosition up-to-date.
10648        If we don't have the correct positions then we can corrupt the stylesheet the next time
10649        the user makes an edit.
10650
10651        Reviewed by Joseph Pecoraro.
10652
10653        * UserInterface/DOMNodeStyles.js:
10654        (WebInspector.DOMNodeStyles): Initialize _stylesNeedingTextCommited to [].
10655        (WebInspector.DOMNodeStyles.prototype.refresh): Call changeStyleText for the next style
10656        object that needs changed.
10657        (WebInspector.DOMNodeStyles.prototype.changeRuleSelector): Set _needsRefresh to true.
10658        (WebInspector.DOMNodeStyles.prototype.changeStyleText): If we need a refresh then it is not safe
10659        to make the edits now. Store the text and remember the style so we can commit it after the next refresh.
10660        (WebInspector.DOMNodeStyles.prototype.changePropertyText): Set _needsRefresh to true.
10661        (WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Call refresh to get updated positions and
10662        computed style info.
10663
106642013-02-25  Timothy Hatcher  <timothy@apple.com>
10665
10666        Always try to update the resource when a stylesheet changes.
10667
10668        Reviewed by Joseph Pecoraro.
10669
10670        * UserInterface/CSSStyleManager.js:
10671        (WebInspector.CSSStyleManager.prototype.styleSheetChanged): Always call _updateResourceContent. This
10672        was preventing resource updates when the stylesheet changed because of a sidebar text edit. Checking the result
10673        of noteContentDidChange was to prevent updating the resource content if the change originated from a resource edit.
10674        However, we will soon allow text edits from the sidebar and the check was preventing resources from being updated.
10675        The new check in the content setter of SourceCodeRevision prevents updating resources when they haven't changed.
10676        * UserInterface/SourceCodeRevision.js:
10677        (WebInspector.SourceCodeRevision.prototype.set content): Return early if the content is the same.
10678
106792013-02-25  Timothy Hatcher  <timothy@apple.com>
10680
10681        Fix typo that was preventing refresh of DOMNodeStyles.
10682
10683        Reviewed by Joseph Pecoraro.
10684
10685        * UserInterface/DOMNodeStyles.js:
10686        (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): The property is ownerStyleSheet, not parentStyleSheet.
10687
106882013-02-25  Timothy Hatcher  <timothy@apple.com>
10689
10690        Workaround a bug where matched rules is empty for stylesheets with imported stylesheets.
10691
10692        If matched rules is empty (rare because of user agent stylesheet rules) then WebCore might
10693        be waiting for an @import rule to load. Check again after a delay until we get some results or timeout.
10694        We shouldn't need to poll like this, https://webkit.org/b/110750 tracks this problem.
10695
10696        Reviewed by Joseph Pecoraro.
10697
10698        * UserInterface/DOMNodeStyles.js:
10699        (WebInspector.DOMNodeStyles.prototype.refresh): Removed map clearing and call to CSSAgent.getInlineStylesForNode
10700        and CSSAgent.getComputedStyleForNode. We only want to fetch those if fetchedMatchedStyles succeeds.
10701        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Schedule another refresh attempt and
10702        return early if the match is empty. Moved the map clearing here after the early return. Call CSSAgent.getInlineStylesForNode.
10703        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles): Call CSSAgent.getComputedStyleForNode.
10704
107052013-02-25  Timothy Hatcher  <timothy@apple.com>
10706
10707        Don't reuse a pending property if it is already used.
10708
10709        This was happening when parsing an edit that had multiple properties with the same name.
10710        The last property to be parsed was picking the same pending property and preventing
10711        all properties from being represented with the right value, etc.
10712
10713        Reviewed by Joseph Pecoraro.
10714
10715        * UserInterface/DOMNodeStyles.js:
10716        (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Only pick a pending property
10717        if the index is NaN.
10718
107192013-02-25  Timothy Hatcher  <timothy@apple.com>
10720
10721        Prevent firing change events in more places when nothing has changed.
10722
10723        Reviewed by Joseph Pecoraro.
10724
10725        * UserInterface/CSSStyleDeclaration.js:
10726        (WebInspector.CSSStyleDeclaration.prototype.update.delayed): Don't fire the event if there is text and it hasn't changed.
10727        * UserInterface/DOMNodeStyles.js:
10728        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Only fire Refreshed if !dontFireRefreshedEvent.
10729        (WebInspector.DOMNodeStyles.prototype.changeStyleText.attributeChanged): Pass true to refresh().
10730        (WebInspector.DOMNodeStyles.prototype.changeStyleText.contentDidChange): Added. Call refresh().
10731        (WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent): Listen for content change.
10732        (WebInspector.DOMNodeStyles.prototype._attributesDidChange): Ignore if _ignoreNextStyleAttributeDidChangeEvent
10733        is set and the attribute is "style".
10734
107352013-02-22  Timothy Hatcher  <timothy@apple.com>
10736
10737        Minimize the number of times the OverriddenStatusChanged is fired for properties.
10738
10739        When updating styles, DOMNodeStyles will sometimes temporarily change overridden
10740        to false only to later change it back to true when it finds the effective property
10741        in a later style in the cascade. To minimize churn we coalesce these changes and
10742        only fire the event if the value is different after a delay.
10743
10744        Reviewed by Joseph Pecoraro.
10745
10746        * UserInterface/CSSProperty.js:
10747        (WebInspector.CSSProperty.prototype.update): Use the setter for overridden
10748        if we want to fire events.
10749        (WebInspector.CSSProperty.prototype.set overridden.delayed): Added.
10750        (WebInspector.CSSProperty.prototype.set overridden): Coalesce changes and
10751        only fire the event if the end result differs.
10752
107532013-02-22  Timothy Hatcher  <timothy@apple.com>
10754
10755        Delay firing the PropertiesChanged event so DOMNodeStyles has a chance
10756        to mark overridden and associated properties.
10757
10758        Reviewed by Joseph Pecoraro.
10759
10760        * UserInterface/CSSStyleDeclaration.js:
10761        (WebInspector.CSSStyleDeclaration.prototype.update.delayed): Added. Fire the event here.
10762        (WebInspector.CSSStyleDeclaration.prototype.update): Set a timeout and call delayed.
10763
107642013-02-22  Timothy Hatcher  <timothy@apple.com>
10765
10766        Consider the properties as enabled for computed style declarations.
10767
10768        Reviewed by Joseph Pecoraro.
10769
10770        * UserInterface/CSSProperty.js:
10771        (WebInspector.CSSProperty.prototype.get enabled): Check for CSSStyleDeclaration.Type.Computed.
10772
107732013-02-22  Timothy Hatcher  <timothy@apple.com>
10774
10775        Add support for checking if a property has another vendor prefix.
10776
10777        This will be used to style those properties differently instead of marking
10778        them as completely invalid. Also fix a regex error in canonicalNameForPropertyName.
10779
10780        Reviewed by Joseph Pecoraro.
10781
10782        * UserInterface/CSSProperty.js:
10783        (WebInspector.CSSProperty.prototype.update): Delete _hasOtherVendorPrefix.
10784        (WebInspector.CSSProperty.prototype.hasOtherVendorPrefix): Added.
10785        * UserInterface/CSSStyleManager.js:
10786        (WebInspector.CSSStyleManager.prototype.propertyNameHasOtherVendorPrefix): Added.
10787        (WebInspector.CSSStyleManager.prototype.canonicalNameForPropertyName): Fix the regex
10788        to check the beginning of the string.
10789
107902013-02-25  Timothy Hatcher  <timothy@apple.com>
10791
10792        Add effectivePropertyForName to DOMNodeStyles.
10793
10794        Also mark the longhand properties as effective if the shorthand property is the effective property.
10795
10796        Reviewed by Joseph Pecoraro.
10797
10798        * UserInterface/DOMNodeStyles.js:
10799        (WebInspector.DOMNodeStyles.prototype.effectivePropertyForName): Added.
10800        (WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Pass _propertyNameToEffectivePropertyMap
10801        to _associateRelatedProperties.
10802        (WebInspector.DOMNodeStyles.prototype._associateRelatedProperties): Set propertyNameToEffectiveProperty
10803        for the longhand if the related shorthand is effective.
10804
108052013-02-21  Timothy Hatcher  <timothy@apple.com>
10806
10807        Don't try to add or remove a CSSProperty if the index is wrong.
10808
10809        Reviewed by Joseph Pecoraro.
10810
10811        * UserInterface/CSSProperty.js:
10812        (WebInspector.CSSProperty.prototype.add): Return early if index is not NaN.
10813        (WebInspector.CSSProperty.prototype.remove): Return early if index is NaN.
10814
108152013-02-22  Timothy Hatcher  <timothy@apple.com>
10816
10817        Mark DOMNodesStyles as needing refresh if attributes change on the node.
10818
10819        Also fix a leak with the CSSStyleSheet.Event.ContentDidChange listener.
10820
10821        Reviewed by Joseph Pecoraro.
10822
10823        * UserInterface/DOMNode.js:
10824        (WebInspector.DOMNode.Event.AttributeModified): Added.
10825        (WebInspector.DOMNode.Event.AttributeRemoved): Added.
10826        * UserInterface/DOMNodeStyles.js:
10827        (WebInspector.DOMNodeStyles): Listen for AttributeModified and AttributeRemoved events.
10828        Stop listening for CSSStyleSheet.Event.ContentDidChange globally to avoid a leak.
10829        (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload): Listen for
10830        CSSStyleSheet.Event.ContentDidChange on the stylesheet object here.
10831        (WebInspector.DOMNodeStyles.prototype._parseRulePayload): Ditto.
10832        (WebInspector.DOMNodeStyles.prototype._attributesDidChange): Added. Mark as needing
10833        refresh and fire the NeedsRefresh event.
10834        * UserInterface/DOMTreeManager.js:
10835        (WebInspector.DOMTreeManager.prototype._attributeModified): Fire the event on DOMNode too.
10836        (WebInspector.DOMTreeManager.prototype._attributeRemoved): Ditto.
10837
108382013-02-22  Timothy Hatcher  <timothy@apple.com>
10839
10840        Fix some event listener leaks related to the DOM content view.
10841
10842        Reviewed by Joseph Pecoraro.
10843
10844        * UserInterface/DOMTreeContentView.js:
10845        (WebInspector.DOMTreeContentView.prototype.closed): Call close on the DOMTreeOutline.
10846        Use the new version of removeEventListener by passing null for type and listener.
10847        * UserInterface/DOMTreeOutline.js:
10848        (WebInspector.DOMTreeOutline.prototype.close): Added. Call close on the DOMTreeUpdater.
10849        * UserInterface/DOMTreeUpdater.js:
10850        (WebInspector.DOMTreeUpdater.prototype.close): Added. Call removeEventListener.
10851        * UserInterface/Object.js:
10852        (WebInspector.Object.addEventListener): Prevent registering multiple times.
10853        (WebInspector.Object.removeEventListener): Handle a null eventType by looping over all
10854        the registered types. Delete _listeners if the map is empty.
10855
108562013-02-20  Timothy Hatcher  <timothy@apple.com>
10857
10858        Avoid a crash when changing the text of an inline style.
10859
10860        Reviewed by Joseph Pecoraro.
10861
10862        * UserInterface/DOMNodeStyles.js:
10863        (WebInspector.DOMNodeStyles.prototype.attributeChanged): Set the style attribute
10864        on the node when the style is an inline style.
10865
108662013-02-20  Timothy Hatcher  <timothy@apple.com>
10867
10868        Return early in the CSSProperty and CSSStyleDeclaration setters if the value does not change.
10869
10870        Reviewed by Joseph Pecoraro.
10871
10872        * UserInterface/CSSProperty.js:
10873        (WebInspector.CSSProperty.prototype.set text): Return early.
10874        (WebInspector.CSSProperty.prototype.set name): Ditto.
10875        (WebInspector.CSSProperty.prototype.set value): Ditto.
10876        (WebInspector.CSSProperty.prototype.set priority): Ditto.
10877        * UserInterface/CSSStyleDeclaration.js:
10878        (WebInspector.CSSStyleDeclaration.prototype.set text): Return early.
10879
108802013-02-20  Timothy Hatcher  <timothy@apple.com>
10881
10882        Properly parse CSSProperty.status and handle when it is missing.
10883
10884        The Inspector.json documentation was incorrect about this, and has been
10885        fixed in r143465.
10886
10887        Reviewed by Joseph Pecoraro.
10888
10889        * UserInterface/CSSProperty.js:
10890        (WebInspector.CSSProperty): Added anonymous parameter.
10891        (WebInspector.CSSProperty.prototype.update): Ditto.
10892        (WebInspector.CSSProperty.prototype.get anonymous): Added.
10893        * UserInterface/DOMNodeStyles.js:
10894        (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Set anonymous
10895        to true when status is "style". Also default to "style" when status is missing.
10896        (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Skip anonymous
10897        properties.
10898
108992013-02-19  Timothy Hatcher  <timothy@apple.com>
10900
10901        Correct and simplify overridden property marking.
10902
10903        Reviewed by Joseph Pecoraro.
10904
10905        * UserInterface/CSSProperty.js:
10906        (WebInspector.CSSProperty.prototype.isActive): Removed.
10907        * UserInterface/DOMNodeStyles.js:
10908        (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Only
10909        use the propertyNameToEffectiveProperty map to accomplish what we needed
10910        three maps for before. Only enabled is checked, instead of the old isActive
10911        function. The isActive function was skipping already overridden properties,
10912        so repeat calls to _markOverriddenProperties would not work correctly.
10913
109142013-02-19  Timothy Hatcher  <timothy@apple.com>
10915
10916        Store all properties for inherited styles.
10917
10918        We need all properties so we can allow editing inherited styles while
10919        not removing the non-inherited properties when the edits are applied.
10920
10921        Reviewed by Joseph Pecoraro.
10922
10923        * UserInterface/CSSProperty.js:
10924        (WebInspector.CSSProperty.prototype.update):
10925        (WebInspector.CSSProperty.prototype.get inherited):
10926        * UserInterface/DOMNodeStyles.js:
10927        (WebInspector.DOMNodeStyles.prototype.refresh):
10928        (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
10929        (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
10930        (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties):
10931
109322013-02-19  Timothy Hatcher  <timothy@apple.com>
10933
10934        Properly handle repeat occurrences of the same rule.
10935
10936        A rule might match multiple times if the selector is generic and matches
10937        ancestors and has inherited properties.
10938
10939        Reviewed by Joseph Pecoraro.
10940
10941        * UserInterface/DOMNodeStyles.js:
10942        (WebInspector.DOMNodeStyles.prototype.refresh):
10943        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
10944        (WebInspector.DOMNodeStyles.prototype._handlePropertyChange):
10945        (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
10946        (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
10947
109482013-02-19  Timothy Hatcher  <timothy@apple.com>
10949
10950        Add matchedSelectors and matchedSelectorText to CSSRule.
10951
10952        Reviewed by Joseph Pecoraro.
10953
10954        * UserInterface/CSSRule.js:
10955        (WebInspector.CSSRule.prototype.update): Delete _matchedSelectors and _matchedSelectorText.
10956        (WebInspector.CSSRule.prototype.get matchedSelectors): Added.
10957        (WebInspector.CSSRule.prototype.get matchedSelectorText): Added.
10958
109592013-02-19  Timothy Hatcher  <timothy@apple.com>
10960
10961        Add editable getter to CSSRule.
10962
10963        Reviewed by Joseph Pecoraro.
10964
10965        * UserInterface/CSSRule.js:
10966        (WebInspector.CSSRule.prototype.get editable): Added.
10967        (WebInspector.CSSRule.prototype.set selectorText): Return early if not editable
10968        or if the selectors already match.
10969        * UserInterface/CSSStyleDeclaration.js:
10970        (WebInspector.CSSStyleDeclaration.prototype.get editable): Check the rule's editable
10971        property too.
10972
109732013-02-19  Timothy Hatcher  <timothy@apple.com>
10974
10975        Add orderedStyles to DOMNodeStyles.
10976
10977        This will allow the UI to easily display the styles in the right order.
10978
10979        Reviewed by Joseph Pecoraro.
10980
10981        * UserInterface/DOMNodeStyles.js:
10982        (WebInspector.DOMNodeStyles): Added _orderedStyles.
10983        (WebInspector.DOMNodeStyles.prototype.get orderedStyles): Added.
10984        (WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Store orderedStyles
10985        on the DOMNodeStyles object and the pseudo element objects.
10986
109872013-02-19  Timothy Hatcher  <timothy@apple.com>
10988
10989        Store matched rules in reverse order so the most specific rule is first, not last.
10990
10991        Reviewed by Joseph Pecoraro.
10992
10993        * UserInterface/DOMNodeStyles.js:
10994        (WebInspector.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload):
10995        Iterate in reverse order to match the cascade order.
10996        (WebInspector.DOMNodeStyles.prototype.changeRuleSelector.ruleSelectorChanged): Fix a typo.
10997        (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Ditto.
10998        (WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder):
10999        Iterate in normal order now that they stored in reverse order.
11000
110012013-02-19  Timothy Hatcher  <timothy@apple.com>
11002
11003        Fix parsing of pseudo styles and inherited inline styles.
11004
11005        Reviewed by Joseph Pecoraro.
11006
11007        * UserInterface/DOMNodeStyles.js:
11008        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Properly
11009        iterate of the pseudoElementRulesPayload array. Also fix the arguments passed
11010        to _parseStyleDeclarationPayload. The first argument was 'this', back when
11011        it was using call().
11012
110132013-02-19  Timothy Hatcher  <timothy@apple.com>
11014
11015        Store the relevant node on CSSStyleDeclaration.
11016
11017        The node is useful for inherited styles so we can jump to the
11018        element the styles are inherited from.
11019
11020        Reviewed by Joseph Pecoraro.
11021
11022        * UserInterface/CSSStyleDeclaration.js:
11023        (WebInspector.CSSStyleDeclaration):
11024        (WebInspector.CSSStyleDeclaration.prototype.get node): Added.
11025        * UserInterface/DOMNodeStyles.js:
11026        (WebInspector.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload):
11027        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
11028        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
11029        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
11030        (WebInspector.DOMNodeStyles.prototype.refresh):
11031        (WebInspector.DOMNodeStyles.prototype._handlePropertyChange):
11032        (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
11033        (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
11034
110352013-02-25  Timothy Hatcher  <timothy@apple.com>
11036
11037        Make copy work if there is a CodeMirror editor focused in the sidebar.
11038
11039        The content view was stealing the copy event and preventing the editor from putting
11040        anything on the pasteboard. We were also having a focus issue where the console or
11041        other editor was staying focused after clicking the DOM tree.
11042
11043        Reviewed by Joseph Pecoraro.
11044
11045        * UserInterface/EditingSupport.js:
11046        (WebInspector.isEventTargetAnEditableField): Correct the check to include CodeMirror
11047        and also only count text input types.
11048        * UserInterface/Main.js:
11049        (WebInspector.contentLoaded): Added focus event listener.
11050        (WebInspector._focusChanged): Added. Make a caret selection inside the focused element.
11051        This is needed (at least) to remove caret from console when focus is moved.
11052        (WebInspector._copy): Only pass along the copy event if the target isn't an editable field.
11053
110542013-02-19  Timothy Hatcher  <timothy@apple.com>
11055
11056        Don't allow text selection in data grid rows.
11057
11058        The row selection conflicts with the text range selection.
11059
11060        Reviewed by Joseph Pecoraro.
11061
11062        * UserInterface/DataGrid.css:
11063        (.data-grid td): Removed -webkit-user-select: text.
11064
110652013-02-26  Antoine Quint  <graouts@apple.com>
11066
11067        <rdar://problem/13265166> Remote inspecting an iOS 6.1 device never has the dashboard timer stop
11068
11069        Previous to iOS7, we don't get a frameId reported for timeline events. We fallback to using the
11070        page's loadEventFired event and message the timelineManager to use the reported timestamp
11071        as the _loadEventTime in case it hadn't already been set. 
11072
11073        Reviewed by Timothy Hatcher.
11074
11075        * UserInterface/PageObserver.js:
11076        (WebInspector.PageObserver.prototype.loadEventFired):
11077        * UserInterface/TimelineManager.js:
11078        (WebInspector.TimelineManager.prototype.pageDidLoad):
11079
110802013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11081
11082        <rdar://problem/11978845> Pressing delete on a file should delete all breakpoints
11083
11084        Allow TreeOutlines to handle keyboard events on TreeElements if the
11085        TreeElement hasn't already handled the event. This will allow the
11086        breakpoint outline to handle delete keys pressed on resources.
11087
11088        Likewise, allow TreeOutlines to handle context menus on TreeElements
11089        that don't specifically have a context menu handler. This will allow
11090        the breakpoint outline to show a context menu for resources.
11091
11092        Reviewed by Timothy Hatcher.
11093
11094        * Localizations/en.lproj/localizedStrings.js:
11095        * UserInterface/DebuggerSidebarPanel.js:
11096        (WebInspector.DebuggerSidebarPanel):
11097        (WebInspector.DebuggerSidebarPanel.prototype._breakpointsBeneathTreeElement):
11098        (WebInspector.DebuggerSidebarPanel.prototype._removeAllBreakpoints):
11099        (WebInspector.DebuggerSidebarPanel.prototype._toggleAllBreakpoints):
11100        (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
11101        (WebInspector.DebuggerSidebarPanel.prototype.removeAllResourceBreakpoints):
11102        (WebInspector.DebuggerSidebarPanel.prototype.toggleAllResourceBreakpoints):
11103        (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
11104        Setup ondelete and oncontextmenu handlers on the breakpoint tree outline.
11105        The delete action deletes all breakpoints in that resource. The content
11106        menu action provides a choice to delete or toggle all breakpoints.
11107
11108        * UserInterface/Breakpoint.js:
11109        (WebInspector.Breakpoint.prototype.appendContextMenuItems):
11110        Reorder and rename the context menus to more closely match Xcode.
11111
11112        * UserInterface/TreeOutline.js:
11113        (TreeOutline.prototype._treeKeyDown):
11114        Send common key events up to the tree outline if it implements them.
11115
11116        * UserInterface/GeneralTreeElement.js:
11117        (WebInspector.GeneralTreeElement.prototype.onattach.this._boundContextMenuEventHandler):
11118        (WebInspector.GeneralTreeElement.prototype.onattach):
11119        Bind a TreeOutline context menu to the individual GeneralTreeElements if the
11120        specific GeneralTreeElement does not have a context menu handler.
11121
111222013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11123
11124        <rdar://problem/13299163> Give Breakpoint Tree Elements Context Menus to Delete and Toggle
11125
11126        Reviewed by Timothy Hatcher.
11127
11128        * Localizations/en.lproj/localizedStrings.js:
11129        * UserInterface/Breakpoint.js:
11130        (WebInspector.Breakpoint.prototype.appendContextMenuItems):
11131        (WebInspector.Breakpoint.prototype.appendContextMenuItems.removeBreakpoint):
11132        (WebInspector.Breakpoint.prototype.appendContextMenuItems.toggleBreakpoint):
11133        Offer context menu items to remove and toggle the breakpoint, if possible.
11134
111352013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11136
11137        Update remaining SourceCodeLocation constructors.
11138
11139        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11140
11141        Reviewed by Timothy Hatcher.
11142
11143        * UserInterface/DOMNodeStyles.js:
11144        (WebInspector.DOMNodeStyles.prototype._createSourceCodeLocation):
11145        * UserInterface/TimelineManager.js:
11146        (WebInspector.TimelineManager.prototype._callFramesFromPayload.createCallFrame):
11147        (WebInspector.TimelineManager.prototype._callFramesFromPayload):
11148
111492013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11150
11151        Update CallFrame displays for SourceMap display locations.
11152
11153        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11154
11155        Use the display (mapped) location when available. Multiple editors
11156        may show the execution line, the original and mapped editors.
11157
11158        Reviewed by Timothy Hatcher.
11159
11160        * UserInterface/CallFrameTreeElement.js:
11161        (WebInspector.CallFrameTreeElement):
11162        * UserInterface/DebuggerManager.js:
11163        (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
11164        * UserInterface/DebuggerSidebarPanel.js:
11165        (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
11166        * UserInterface/SourceCodeTextEditor.js:
11167        (WebInspector.SourceCodeTextEditor.prototype):
11168
111692013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11170
11171        Add isEmptyObject instead of doing Object.keys(foo).length
11172
11173        In benchmarks of empty, small, and large objects isEmptyObject
11174        performed better then checking the length of Object.keys. Especially
11175        for large objects.
11176
11177        Reviewed by Timothy Hatcher.
11178
11179        * UserInterface/DOMNodeStyles.js:
11180        (WebInspector.DOMNodeStyles.prototype._associateRelatedProperties):
11181        * UserInterface/LayerTreeSidebarPanel.js:
11182        (WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid):
11183        * UserInterface/RemoteObject.js:
11184        (WebInspector.LocalJSONObject.prototype.get hasChildren):
11185        * UserInterface/ResourceDetailsSidebarPanel.js:
11186        * UserInterface/SourceCodeTextEditor.js:
11187        (WebInspector.SourceCodeTextEditor.prototype._removeBreakpointWithEditorLineInfo):
11188        * UserInterface/TextEditor.js:
11189        (WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
11190        (WebInspector.TextEditor.prototype):
11191        * UserInterface/Utilities.js:
11192        (isEmptyObject):
11193
111942013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11195
11196        Get Breakpoints Working with SourceMaps - Line + Column Breakpoint Support.
11197
11198        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11199
11200        Previously breakpoints could only appear in a single SourceCodeTextEditor, and
11201        only one could be placed on a line. After this patch:
11202
11203          - Breakpoints may show up in multiple editors at the original and mapped locations.
11204          - Breakpoints effective locations may be on columns. If you set a breakpoint on
11205            a line in a mapped resource, it may map back to a non-0 column in the original.
11206          - Multiple breakpoints may be set on a line. If you set a breakpoint on a few
11207            lines in a mapped resource, they may all map back to the same line in the original
11208            but just have different column offsets.
11209
11210        Breakpoints are still set and saved with their original SourceMapLocation locations.
11211
11212        Reviewed by Timothy Hatcher.
11213
11214        * UserInterface/DebuggerManager.js:
11215        (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
11216        (WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
11217        When looking up breakpoints for a source code, associate them with the source code
11218        at the same time by setting the Breakpoint's SourceCodeLocation's sourceCode. The
11219        breakpoints for a SourceMapResource are only those in the originator that have
11220        a display location inside the mapped resource.
11221
11222        (WebInspector.DebuggerManager.prototype.reset):
11223        Disassociate breakpoints on reset, by clearing the SourceCodeLocation's sourceCode.
11224
11225        (WebInspector.DebuggerManager.prototype._breakpointSourceCodeLocationDidChange):
11226        Dispatch a new BreakpointMoved event. There were already existing events for
11227        BreakpointAdded and Removed but not Moved. We add this for convenience, there
11228        are currently no users though, they all watch the breakpoints source code location.
11229
11230        * UserInterface/TextEditor.js:
11231        (WebInspector.TextEditor.prototype.setBreakpointInfoForLineAndColumn):
11232        (WebInspector.TextEditor.prototype._addBreakpointToLineAndColumnWithInfo):
11233        (WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
11234        Update setBreakpointInfo to include line + column numbers.
11235
11236        (WebInspector.TextEditor.prototype._setBreakpointStylesOnLine.updateStyles):
11237        (WebInspector.TextEditor.prototype._setBreakpointStylesOnLine):
11238        Updating breakpoint style now handles multi-breakpoints. For multi-breakpoints
11239        we only style it as disabled if all breakpoints on that line are disabled.
11240        Likewise for resolved.
11241
11242        (WebInspector.TextEditor.prototype._allColumnBreakpointInfoForLine):
11243        (WebInspector.TextEditor.prototype._setColumnBreakpointInfoForLine):
11244        Now that a line may have multiple column breakpoints, this is a bulk
11245        getter and setter used during breakpoint dragging to set the breakpoint
11246        infos on a line.
11247
11248        (WebInspector.TextEditor.prototype._gutterMouseDown):
11249        (WebInspector.TextEditor.prototype._documentMouseMoved):
11250        (WebInspector.TextEditor.prototype._documentMouseUp):
11251        Do nothing if clicking on a multi-breakpoint. Otherwise, when dragging
11252        remember the original breakpoints line and column information. While the
11253        drag is happening, we are already updating our internal line + column
11254        information, so in mouse up when notifying delegates we can ignore their
11255        setBreakpointInfo calls.
11256
11257        * UserInterface/TextEditor.css:
11258        (.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber):
11259        (.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber::before):
11260        Styles for a line with multiple breakpoints. We show a centered white
11261        ellipsis and hide the line number.
11262
11263        * UserInterface/SourceCodeTextEditor.js:
11264        (WebInspector.SourceCodeTextEditor):
11265        (WebInspector.SourceCodeTextEditor.prototype.close):
11266        Now that breakpoints can be added in one editor and affect a different editor
11267        we must listen for breakpoint added and move (via it's source code location).
11268        Register for the events in the constructor and clear in close.
11269
11270        (WebInspector.SourceCodeTextEditor.prototype._editorLineInfoForSourceCodeLocation):
11271        SourceCodeTextEditors for original resources show their content with original line
11272        numbers. For mapped resources show their content with display line numbers. So
11273        whenever we have a sourceCodeLocation, we use this to convert it to the "editor"
11274        line info, which is just the line + column number for this editor + TextEditor.
11275        
11276        (WebInspector.SourceCodeTextEditor.prototype._breakpointForEditorLineInfo):
11277        (WebInspector.SourceCodeTextEditor.prototype._addBreakpointWithEditorLineInfo):
11278        (WebInspector.SourceCodeTextEditor.prototype._removeBreakpointWithEditorLineInfo):
11279        Update addBreakpoint and removeBreakpoint for line + column, instead of just line.
11280
11281        (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
11282        (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointStatus):
11283        (WebInspector.SourceCodeTextEditor.prototype._breakpointAdded):
11284        (WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved):
11285        When breakpoints are added, removed update our map, and pass that information
11286        on to the underlying TextEditor.
11287
11288        (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointLocation):
11289        When a breakpoint moves, we need to lookup the breakpoint from its old location.
11290        The old location is different depending on if we are the editor for the original
11291        or mapped resource. So work out the correct old location, and pass that
11292        information and the underlying TextEditor.
11293
11294        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
11295        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved):
11296        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved):
11297        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled):
11298        When the TextEditor modifies a breakpoint, we must update our maps for that
11299        breakpoint. When we tell the DebuggerManager about the updates, we will
11300        expect some events to fire to update other editors that might be interested
11301        in that breakpoint. We can ignore those events ourselves, because we
11302        just made the change.
11303
113042013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11305
11306        Sort Breakpoints in the Debugger Sidebar
11307
11308        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11309
11310        Reviewed by Timothy Hatcher.
11311
11312        * UserInterface/DebuggerSidebarPanel.js:
11313        (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
11314        (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
11315        (WebInspector.DebuggerSidebarPanel.prototype._compareBreakpointTreeElements):
11316        Sort BreakpointsTreeElements (children of Resources) by Line #.
11317        Sort top level tree elements by title, always placing the special breakpoints at the top.
11318
113192013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11320
11321        Give BreakpointTreeElements a ContextMenu to Reveal Original Resource.
11322
11323        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11324
11325        Reviewed by Timothy Hatcher.
11326
11327        * UserInterface/Breakpoint.js:
11328        (WebInspector.Breakpoint.prototype.appendContextMenuItems):
11329        Given a context menu, add a show original resource menu item.
11330
11331        * UserInterface/TreeOutline.js:
11332        (TreeElement.prototype._detach):
11333        Add an ondetach event to balance onattach.
11334
11335        * UserInterface/GeneralTreeElement.js:
11336        (WebInspector.GeneralTreeElement.prototype.onattach):
11337        (WebInspector.GeneralTreeElement.prototype.ondetach):
11338        Manage adding and removing a contextmenu event listener for oncontextmenu.
11339
11340        * UserInterface/BreakpointTreeElement.js:
11341        (WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
11342        Show a ContextMenu with the Breakpoint's menu items.
11343
113442013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11345
11346        Make Breakpoint to use a SourceCodeLocation. Update its BreakpointTreeElement display.
11347
11348        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11349
11350        This is the start of modifying Breakpoints to use SourceCodeLocation.
11351        There are remaining users (SourceCodeTextEditor) which will be addressed
11352        in a following patch. This updates Breakpoint and its display in the sidebar.
11353
11354        Reviewed by Timothy Hatcher.
11355
11356        * UserInterface/Breakpoint.js:
11357        (WebInspector.Breakpoint):
11358        (WebInspector.Breakpoint.prototype.get sourceCodeLocation):
11359        (WebInspector.Breakpoint.prototype.get info):
11360        Update the constructor and serialization to use SourceCodeLocations,
11361        which includes a line number and column number.
11362
11363        * UserInterface/BreakpointTreeElement.js:
11364        (WebInspector.BreakpointTreeElement):
11365        (WebInspector.BreakpointTreeElement.prototype._updateTitles):
11366        (WebInspector.BreakpointTreeElement.prototype._updateStatus):
11367        BreakpointTreeElements always display the display line + column. They
11368        show the original location as a subtitle.
11369
11370        (WebInspector.BreakpointTreeElement.prototype._breakpointDisplayLocationDidChange):
11371        When the breakpoint's display location changes update our titles.
11372        However, if the breakpoint actually changed resources, then prepare
11373        for removal. The sidebar will detect this and create a new tree element.
11374
11375        * UserInterface/DebuggerManager.js:
11376        (WebInspector.DebuggerManager):
11377        (WebInspector.DebuggerManager.prototype.didSetBreakpoint):
11378        (WebInspector.DebuggerManager.prototype._setBreakpoint):
11379        Set breakpoints with the breakpoints line + column information.
11380
11381        * UserInterface/DebuggerSidebarPanel.js:
11382        (WebInspector.DebuggerSidebarPanel):
11383        (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
11384        Simplify now that the breakpoint's SourceCodeLocation already has the
11385        original SourceCode. Also, create SourceMapResourceTreeElements as needed.
11386
11387        (WebInspector.DebuggerSidebarPanel.prototype._breakpointRemoved):
11388        (WebInspector.DebuggerSidebarPanel.prototype._removeBreakpointTreeElement):
11389        Refactor breakpoint removal code so it can be shared.
11390
11391        (WebInspector.DebuggerSidebarPanel.prototype._breakpointDisplayLocationDidChange):
11392        If a breakpoint changes resources remove the old breakpoint tree element
11393        and add a new one with the new location.
11394
11395        (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
11396        Show the display location.
11397
113982013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11399
11400        Make Find banner when viewing a SourceMapResource work.
11401
11402        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11403
11404        A SourceMapResource can display its content in a SourceCodeTextEditor just
11405        like regular resources. However, it does not use the backend to search
11406        it's contents, because its contents are all loaded by the frontend. Give
11407        customPerformSearch a return value saying whether or not it was handled.
11408        If not handled, we fall back to CodeMirror's text search, which works fine.
11409
11410        Reviewed by Timothy Hatcher.
11411
11412        * UserInterface/SourceCodeTextEditor.js:
11413        (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
11414        * UserInterface/TextEditor.js:
11415        (WebInspector.TextEditor.prototype.performSearch):
11416        If the customPerformSearch returns false, then the custom search did
11417        not handle the search, and we fallback to the default CodeMirror search.
11418
114192013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11420
11421        Make SourceCodeLocation provide raw and mapped locations.
11422
11423        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11424
11425        SourceCodeLocation automatically provide original (raw) and mapped (display)
11426        source code locations. It's API requires that it be constructed with the raw
11427        source code and location information, which is automated by using
11428        SourceCode.prototype.createSourceCodeLocation, passing a lineNumber and
11429        columnNumber for the source code that you're invoking the method on.
11430
11431        All uses of SourceCodeLocation will be audited and updated in later patches,
11432        this patch includes just the core SourceCodeLocation uses.
11433
11434        Reviewed by Timothy Hatcher.
11435
11436        * UserInterface/ResourceSidebarPanel.js:
11437        (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
11438        (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeLocation):
11439        (WebInspector.ResourceSidebarPanel.prototype.showOriginalSourceCodeLocation):
11440        By default, when showing any location we want to show it's display location,
11441        which will be the source map resource if there is one, otherwise the raw resource.
11442        If needed, there is a way to explicitly show the original source code location.
11443
11444        * UserInterface/SourceCode.js:
11445        (WebInspector.SourceCode.prototype.createSourceCodeLocation):
11446        Default implementation, just use the given line and column number.
11447
11448        * UserInterface/SourceMapResource.js:
11449        (WebInspector.SourceMapResource.prototype.createSourceCodeLocation):
11450        Mapped resource. Reverse lookup the raw line and column. Adjust if
11451        needed for inline <script> offsets. And construct the SourceCodeLocation
11452        with the raw values.
11453
11454        * UserInterface/SourceCodeLocation.js:
11455        (WebInspector.SourceCodeLocation):
11456
11457        (WebInspector.SourceCodeLocation.prototype.get sourceCode):
11458        (WebInspector.SourceCodeLocation.prototype.get lineNumber):
11459        (WebInspector.SourceCodeLocation.prototype.get columnNumber):
11460        This is the raw location data.
11461
11462        (WebInspector.SourceCodeLocation.prototype.hasMappedLocation):
11463        (WebInspector.SourceCodeLocation.prototype.get displaySourceCode):
11464        (WebInspector.SourceCodeLocation.prototype.get displayLineNumber):
11465        (WebInspector.SourceCodeLocation.prototype.get displayColumnNumber):
11466        If we have a mapped location, use that. Otherwise use the raw location.
11467
11468        (WebInspector.SourceCodeLocation.prototype.update):
11469        If a user of a SourceCodeLocation wants to update the location there
11470        are restrictions. The updated location must be either the raw resource
11471        or the mapped resource. SourceCodeLocation then does the rest, and
11472        updates its internal values and dispatches events appropriately.
11473
11474        (WebInspector.SourceCodeLocation.prototype.set sourceCode):
11475        There are cases where the inspector (Breakpoints) which may want to keep
11476        around a line/column SourceCodeLocation but without an associated
11477        SourceCode. Setting the source code to null will make this a dumb
11478        location, and setting it to a source code will update appropriately.
11479
11480        (WebInspector.SourceCodeLocation.prototype._resetMappedLocation):
11481        (WebInspector.SourceCodeLocation.prototype._setMappedLocation):
11482        (WebInspector.SourceCodeLocation.prototype._resolveMappedLocation):
11483        We lazily resolve the mapped location when needed. In cases where
11484        a SourceCodeLocation is created from a SourceMapResource the mapped
11485        location is already known and can be set directly.
11486
11487        (WebInspector.SourceCodeLocation.prototype._makeChangeAndDispatchChangeEventIfNeeded):
11488        Clients of SourceCodeLocation may want to update their display if
11489        a source map was added and a new better location is available. We
11490        provide events for any change, or just display location changes.
11491
11492        (WebInspector.SourceCodeLocation.prototype._sourceCodeSourceMapAdded):
11493        Whenever the raw resource adds a source map check if there was a
11494        display location change.
11495
114962013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11497
11498        Show SourceMapResources in the Resources Sidebar
11499
11500        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11501
11502        SourceMapResources are added to the Resources Sidebar as children
11503        of the originator Resource. So if a Script has a SourceMap with
11504        multiple inputs, there will be a disclosure triangle by the Script
11505        and you can see the original resources for that Script.
11506
11507        Since both Resources and Scripts can have SourceMapChildren this
11508        patch refactors both of those TreeElement classes to extend from a
11509        common SourceCodeTreeElement class that manages the new
11510        SourceMapResourceTreeElement children.
11511
11512        FrameTreeElements, special subclasses of ResourceTreeElements and
11513        thus SourceCodeTreeElements handle their own source map resource
11514        children. This is so that SourceMapResources for <script>s in the
11515        frame are placed along with that frame's same typed resources.
11516        SourceMapResources that are scripts will be in the Scripts folder,
11517        or no folder if the frame has only a few resources.
11518
11519        Reviewed by Timothy Hatcher.
11520
11521        * UserInterface/ResourceSidebarPanel.js:
11522        (WebInspector.ResourceSidebarPanel):
11523        A TreeOutline must opt-in to displaying source map tree elements
11524        for resources. We only show source map children of resources in the
11525        main resource tree outline. We will not show them in the search
11526        results tree outline or breakpoints tree outline.
11527
11528        * UserInterface/GeneralTreeElement.js:
11529        (WebInspector.GeneralTreeElement.prototype.callFirstAncestorFunction):
11530        Move this code from ResourceTreeElement to General. It is useful.
11531
11532        * UserInterface/SourceCodeTreeElement.js: Added.
11533        (WebInspector.SourceCodeTreeElement):
11534        (WebInspector.SourceCodeTreeElement.prototype.updateSourceMapResources):
11535        (WebInspector.SourceCodeTreeElement.prototype.onattach):
11536        (WebInspector.SourceCodeTreeElement.prototype.onpopulate):
11537        (WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
11538        (WebInspector.SourceCodeTreeElement.prototype._updateSourceCode):
11539        Common superclass for Script and Resource TreeElements. This manages the
11540        child source map resources. Sorts them, and replaces them when they change.
11541
11542        * UserInterface/ResourceTreeElement.js:
11543        (WebInspector.ResourceTreeElement):
11544        (WebInspector.ResourceTreeElement.compareResourceTreeElements): Common comparison.
11545        (WebInspector.ResourceTreeElement.prototype._updateResource):
11546        (WebInspector.ResourceTreeElement.prototype._updateTitles):
11547        (WebInspector.ResourceTreeElement.prototype._typeDidChange):
11548        * UserInterface/ScriptTreeElement.js:
11549        (WebInspector.ScriptTreeElement):
11550        Refactor as subclasses of SourceCodeTreeElement.
11551
11552        * UserInterface/SourceMapResourceTreeElement.js: Added.
11553        (WebInspector.SourceMapResourceTreeElement):
11554        (WebInspector.SourceMapResourceTreeElement.prototype.onattach):
11555        (WebInspector.SourceMapResourceTreeElement.prototype._updateTitles):
11556        A SourceMapResourceTreeElement is very simple. It adds a style class to
11557        get unique icons, lazy loads on attach, and since it doesn't have a
11558        parent frame it uses it's originator's host to display a subtitle if
11559        it is loaded from a different origin.
11560
11561        * UserInterface/FrameTreeElement.js:
11562        (WebInspector.FrameTreeElement.prototype.updateSourceMapResources):
11563        (WebInspector.FrameTreeElement.prototype.onattach):
11564        (WebInspector.FrameTreeElement.prototype.onpopulate):
11565        (WebInspector.FrameTreeElement.prototype._updateParentStatus):
11566        (WebInspector.FrameTreeElement.prototype._addTreeElementForRepresentedObject):
11567        (WebInspector.FrameTreeElement.prototype._insertResourceTreeElement):
11568        Handle our own SourceMapResource children in onpopulate and addTreeElement paths.
11569
11570        * UserInterface/Main.html:
11571        * UserInterface/ResourceIcons.css:
11572        (.source-map-resource.resource-icon .icon):
11573        (.source-map-resource.resource-icon.resource-type-script .icon):
11574        * UserInterface/Images/ClippingGeneric.png: Added.
11575        * UserInterface/Images/ClippingGeneric@2x.png: Added.
11576        Add new files, images, and styles to trigger the images.
11577
115782013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11579
11580        Download SourceMaps and create SourceMapResources.
11581
11582        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11583
11584        Reviewed by Timothy Hatcher.
11585
11586        * UserInterface/SourceMap.js:
11587        (WebInspector.SourceMap):
11588        (WebInspector.SourceMap.prototype.get originalSourceCode):
11589        (WebInspector.SourceMap.prototype.get resources):
11590        (WebInspector.SourceMap.prototype.addResource):
11591        (WebInspector.SourceMap.prototype.resourceForURL):
11592        Give a SourceMap references to the SourceCode that originally requested
11593        it, and the SourceMapResources created for the input sources.
11594
11595        * UserInterface/SourceMapResource.js: Added.
11596        (WebInspector.SourceMapResource):
11597        (WebInspector.SourceMapResource.prototype.get sourceMap):
11598        A SourceMapResource is a Resource subclass with no loading information.
11599        It has a reference to the SourceMap that it belongs to.
11600
11601        (WebInspector.SourceMapResource.prototype.canRequestContentFromBackend):
11602        (WebInspector.SourceMapResource.prototype.requestContentFromBackend):
11603        The content is loaded on demand. Normal requests for SourceCode content
11604        goes through SourceCode.prototype.requestContent. Since the content is
11605        loaded on demand, the type and data are filled in after content is
11606        requested, and we fire normal Resource events, like Type changed.
11607
11608        * UserInterface/Resource.js:
11609        (WebInspector.Resource.prototype.markAsFinished):
11610        Don't request content if we can't / shouldn't request content from the
11611        backend. Normally resources load their content as soon as they finish
11612        loading. However SourceMapResources load their content and then mark
11613        as finished. Without this we would get a harmless assert.
11614
11615        * UserInterface/SourceCode.js:
11616        (WebInspector.SourceCode):
11617        (WebInspector.SourceCode.prototype.get sourceMaps):
11618        (WebInspector.SourceCode.prototype.addSourceMap):
11619        Any SourceCode resource can have a set of source maps. In the common case,
11620        a Script will have a single source map. However a Document resource map
11621        have multiple sourceMaps for different inline <script> sections.
11622
11623        * UserInterface/DebuggerObserver.js:
11624        (WebInspector.DebuggerObserver.prototype.scriptParsed):
11625        * UserInterface/DebuggerManager.js:
11626        (WebInspector.DebuggerManager.prototype.scriptDidParse):
11627        The SourceMap resource's url comes in from scriptDidParse. Pass it on
11628        eventually to the Script constructor.
11629
11630        * UserInterface/Script.js:
11631        (WebInspector.Script):
11632        If we have a source map URL, load and parse the source map.
11633
11634        * UserInterface/SourceMapManager.js: Added.
11635        (WebInspector.SourceMapManager):
11636        (WebInspector.SourceMapManager.prototype.sourceMapForURL):
11637        (WebInspector.SourceMapManager.prototype.downloadSourceMap):
11638        (WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
11639        (WebInspector.SourceMapManager.prototype._loadAndParseFailed):
11640        (WebInspector.SourceMapManager.prototype._loadAndParseSucceeded):
11641        (WebInspector.SourceMapManager.prototype._mainResourceDidChange):
11642        A global set of SourceMaps by url. This prevents multiple downloads of
11643        the same source map. The map is cleared on main resource changes.
11644
11645        * UserInterface/Main.html:
11646        * UserInterface/Main.js:
11647        (WebInspector.contentLoaded):
11648        Add new files and instantiate the new manager singleton.
11649
116502013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11651
11652        Add parts of SourceMap.js from OpenSource.
11653
11654        <rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
11655
11656        This parses a v3 SourceMap file. The spec is linked at the top.
11657        SourceMap.js comes from OpenSource's frontend/SourceMap.js.
11658
11659        Reviewed by Timothy Hatcher.
11660
11661        * UserInterface/Main.html:
11662        * UserInterface/SourceMap.js: Added.
11663        (WebInspector.SourceMap):
11664        (WebInspector.SourceMap.prototype.sources):
11665        (WebInspector.SourceMap.prototype.sourceContent):
11666        (WebInspector.SourceMap.prototype._parseMappingPayload):
11667        (WebInspector.SourceMap.prototype._parseSections):
11668        (WebInspector.SourceMap.prototype._parseMap):
11669        (WebInspector.SourceMap.prototype._isSeparator):
11670        (WebInspector.SourceMap.prototype._decodeVLQ):
11671        (WebInspector.SourceMap.StringCharIterator):
11672        (WebInspector.SourceMap.StringCharIterator.prototype.next):
11673        (WebInspector.SourceMap.StringCharIterator.prototype.peek):
11674        (WebInspector.SourceMap.StringCharIterator.prototype.hasNext):
11675        (WebInspector.PositionBasedSourceMap):
11676        (WebInspector.PositionBasedSourceMap.prototype.findEntry):
11677        (WebInspector.PositionBasedSourceMap.prototype.findEntryReversed):
11678        (WebInspector.PositionBasedSourceMap.prototype._parseMap):
11679
116802013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11681
11682        Only allow left clicks on the gutter / dragging breakpoints.
11683
11684        Reviewed by Ricky Mondello.
11685
11686        * UserInterface/TextEditor.js:
11687        (WebInspector.TextEditor.prototype):
11688        Bail if the mouse down button is not the left button.
11689
116902013-02-26  Joseph Pecoraro  <pecoraro@apple.com>
11691
11692        Remove unused ContextMenu soft menu code.
11693
11694        Rubber-stamped by Ricky Mondello.
11695
11696        * UserInterface/ContextMenu.js:
11697
116982013-02-21  Joseph Pecoraro  <pecoraro@apple.com>
11699
11700        Standardize on "Event" not "Events". There were a few outliers.
11701
11702        Reviewed by Brian Weinstein.
11703
11704        * UserInterface/DatabaseContentView.js:
11705        (WebInspector.DatabaseContentView.prototype._queryFinished):
11706        * UserInterface/StylePropertyTreeElement.js:
11707        (WebInspector.StylePropertyTreeElement.prototype):
11708        * UserInterface/TextPrompt.js:
11709        (WebInspector.TextPrompt.prototype.applySuggestion):
11710        (WebInspector.TextPrompt.prototype.acceptSuggestion):
11711
117122013-02-19  Jeff Miller  <jeffm@apple.com>
11713
11714        Regenerate localizedStrings.js after recent changes.
11715
11716        * Localizations/en.lproj/localizedStrings.js:
11717        Regenerated.
11718
117192013-02-18  Joseph Pecoraro  <pecoraro@apple.com>
11720
11721        <rdar://problem/13232839> Show Error Console (Option+Cmd+C) should always put keyboard focus in the console
11722
11723        The keyboard shortcut already existed, but if used to open the inspector
11724        the focus was getting stolen away by other elements with tabindex and
11725        the DOM Tree. Fix this so focus is not stolen away. As an added bonus
11726        the console now keeps its focus across page reloads and navigations.
11727
11728        Reviewed by Antoine Quint.
11729
11730        * UserInterface/InspectorFrontendAPI.js:
11731        (InspectorFrontendAPI.showConsole):
11732        When the keyboard shortcut is triggered, focus the quick console. If
11733        the page is still loading, we will need to focus again because other
11734        elements with tabindex may steal focus away from the console prompt.
11735
11736        * UserInterface/Main.js:
11737        (WebInspector.isConsoleFocused):
11738        Global accessor for whether or not the console is focused.
11739
11740        * UserInterface/DOMTreeContentView.js:
11741        (WebInspector.DOMTreeContentView.prototype.shown):
11742        When showing a the DOMTreeOutline, never steal focus from the console.
11743
11744        (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectNode):
11745        When the root dom node changes and we reveal and select an element,
11746        never steal focus from the console.
11747
11748        * UserInterface/DOMTreeOutline.js:
11749        (WebInspector.DOMTreeOutline.prototype.setVisible):
11750        Provide an optional omitFocus parameter to pass on. It already exists below.
11751
117522013-02-18  Joseph Pecoraro  <pecoraro@apple.com>
11753
11754        Move .indeterminate-progress-spinner from resources only to all content views.
11755
11756        ScriptContentViews also use spinners, and they were not getting the
11757        proper styling if you were fast enough to see it!
11758
11759        Reviewed by Brian Weinstein.
11760
11761        * UserInterface/ContentView.css: Renamed from WebInspector/UserInterface/ResourceContentView.css.
11762        (.content-view > .indeterminate-progress-spinner):
11763        * UserInterface/Main.html:
11764
117652013-02-18  Joseph Pecoraro  <pecoraro@apple.com>
11766
11767        Hide the Image Size section for Image resources if the load failed.
11768
11769        Reviewed by Brian Weinstein.
11770
11771        * UserInterface/ResourceDetailsSidebarPanel.js:
11772        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
11773        Don't show an empty image size section if the image failed to load.
11774
117752013-02-16  Joseph Pecoraro  <pecoraro@apple.com>
11776
11777        Accidentally added some code referencing SourceMapResource before it was added.
11778
11779        Unreviewed cleanup.
11780
11781        * UserInterface/ResourceSidebarPanel.js:
11782        (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView):
11783
117842013-02-18  Antoine Quint  <graouts@apple.com>
11785
11786        <rdar://problem/13180267> REGRESSION: Reload button is no longer visible in the Web Inspector
11787
11788        Make the ResourceTreeElement's "status" property a reload button in case we're
11789        dealing with the main resource of the main frame.
11790
11791        Reviewed by Joseph Pecoraro.
11792
11793        * UserInterface/Images/Reload.pdf: Removed.
11794        * UserInterface/Images/Reload.svg: Added.
11795        * UserInterface/Images/ReloadSelected.svg: Added.
11796        * UserInterface/Main.js:
11797        (WebInspector.contentLoaded):
11798        * UserInterface/ResourceTreeElement.css:
11799        (.item.resource-type-document > .status > .reload-button):
11800        (.item.resource-type-document.selected > .status > .reload-button):
11801        * UserInterface/ResourceTreeElement.js:
11802        (WebInspector.ResourceTreeElement.prototype.get reloadButton):
11803        (WebInspector.ResourceTreeElement.prototype._updateResource):
11804        (WebInspector.ResourceTreeElement.prototype._updateStatus):
11805        (WebInspector.ResourceTreeElement.prototype._reloadPageClicked):
11806
118072013-02-15  Joseph Pecoraro  <pecoraro@apple.com>
11808
11809        Double clicking the disclosure triangle for a TreeElement should not
11810        trigger the ondblclick for the element.
11811
11812        This will be more possible once we add SourceMaps, but it is currently
11813        possible right now with the Main Resource's disclosure triangle.
11814
11815        Reviewed by Dean Jackson.
11816
11817        * UserInterface/TreeOutline.js:
11818        (TreeElement.treeElementDoubleClicked):
11819
118202013-02-15  Joseph Pecoraro  <pecoraro@apple.com>
11821
11822        We don't need to check the entire string when we mean to check just the
11823        first character. Convert an indexOf to charAt(0).
11824
11825        Reviewed by Timothy Hatcher.
11826
11827        * UserInterface/FrameTreeElement.js:
11828        (WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders):
11829
118302013-02-15  Joseph Pecoraro  <pecoraro@apple.com>
11831
11832        <rdar://problem/13226395> Multiline console.asserts in ResourceSidebarPanel.js not getting stripped
11833
11834        Reviewed by Timothy Hatcher.
11835
11836        * Scripts/remove-console-asserts.pl:
11837        For safety, keep the script reading line by line and warn if there is
11838        a console.assert that was not stripped. This almost always means the
11839        assert spanned multiple lines.
11840
11841        * UserInterface/ResourceSidebarPanel.js:
11842        Converted multi-line asserts to a single line.
11843
118442013-02-15  Joseph Pecoraro  <pecoraro@apple.com>
11845
11846        Manually running remove-console-asserts.pl was failing on rename.
11847        Change instead to File::move from the File::copy module and
11848        report errors if they happen.
11849
11850        Reviewed by Timothy Hatcher.
11851
11852        * Scripts/remove-console-asserts.pl:
11853
118542013-02-15  Timothy Hatcher  <timothy@apple.com>
11855
11856        Fix exceptions caused by my earlier InspectorBackendCommands change.
11857
11858        Unreviewed.
11859
11860        * UserInterface/DOMStorageObserver.js:
11861        (WebInspector.DOMStorageObserver.prototype.domStorageItemsCleared): Call
11862        updateDOMStorage instead of domStorageUpdated.
11863        (WebInspector.DOMStorageObserver.prototype.domStorageItemRemoved): Ditto.
11864        (WebInspector.DOMStorageObserver.prototype.domStorageItemAdded): Ditto.
11865        (WebInspector.DOMStorageObserver.prototype.domStorageItemUpdated): Ditto.
11866
118672013-02-15  Jessie Berlin  <jberlin@apple.com>
11868
11869        Ran update-safari-localizable-strings.
11870
11871        * Localizations/en.lproj/localizedStrings.js:
11872
118732013-02-15  Timothy Hatcher  <timothy@apple.com>
11874
11875        Update InspectorBackendCommands.js for the latest protocol changes.
11876
11877        Reviewed by Antoine Quint.
11878
11879        * UserInterface/CSSObserver.js:
11880        (WebInspector.CSSObserver.prototype.styleSheetAdded): Added.
11881        (WebInspector.CSSObserver.prototype.styleSheetRemoved): Added.
11882        * UserInterface/CookieStorageContentView.js:
11883        (WebInspector.CookieStorageContentView.prototype._deleteCallback): Pass both domain and url.
11884        * UserInterface/DOMStorageObserver.js:
11885        (WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Renamed from domStorageUpdated.
11886        (WebInspector.DOMStorageObserver.prototype.domStorageItemsCleared): Added.
11887        (WebInspector.DOMStorageObserver.prototype.domStorageItemRemoved): Added.
11888        (WebInspector.DOMStorageObserver.prototype.domStorageItemAdded): Added.
11889        (WebInspector.DOMStorageObserver.prototype.domStorageItemUpdated): Added.
11890        * UserInterface/DOMTreeManager.js:
11891        (WebInspector.DOMTreeManager.prototype.highlightDOMNode): Use invoke since the argument
11892        order changed and objectId is an optional argument we don't use.
11893        * UserInterface/InspectorBackend.js:
11894        (InspectorBackendClass.prototype.reportProtocolError): Log the whole error, not just the message.
11895        * UserInterface/InspectorBackendCommands.js: Updated from OpenSource r142992.
11896        * UserInterface/InspectorObserver.js:
11897        (WebInspector.InspectorObserver.prototype.detached): Added.
11898        * UserInterface/PageObserver.js:
11899        (WebInspector.PageObserver.prototype.javascriptDialogOpening): Added.
11900        (WebInspector.PageObserver.prototype.javascriptDialogClosed): Added.
11901        (WebInspector.PageObserver.prototype.scriptsEnabled): Added.
11902
119032013-02-15  Antoine Quint  <graouts@apple.com>
11904
11905        <rdar://problem/13207008> Allow toggling showing shadow trees with a button in the DOM Tree navigation bar
11906
11907        We do a few things in this patch:
11908
11909        1. We move the existing compositing borders navigation item from
11910        FrameContentView to DOMTreeContentView.
11911
11912        2. We add a new navigation item on DOMTreeContentView to toggle
11913        shadow tree DOM nodes.
11914
11915        3. We make ClusterContentView return its current content view's
11916        navigation items in the navigationItems accessor since otherwise
11917        the DOMTreeContentView navigation items wouldn't get picked up.
11918
11919        4. We add a new event to notify when a ContentView's navigation
11920        items have changed so that they may be picked up by the ContentBrowser.
11921
11922        Reviewed by Timothy Hatcher.
11923
11924        * Localizations/en.lproj/localizedStrings.js:
11925        * UserInterface/ClusterContentView.js:
11926        (WebInspector.ClusterContentView.prototype.get navigationItems):
11927        (WebInspector.ClusterContentView.prototype._currentContentViewDidChange):
11928        * UserInterface/ContentBrowser.js:
11929        (WebInspector.ContentBrowser):
11930        (WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange):
11931        * UserInterface/ContentView.js:
11932        * UserInterface/DOMTreeContentView.js:
11933        (WebInspector.DOMTreeContentView):
11934        (WebInspector.DOMTreeContentView.prototype.get navigationItems):
11935        (WebInspector.DOMTreeContentView.prototype.shown):
11936        (WebInspector.DOMTreeContentView.prototype._mouseWasClicked):
11937        (WebInspector.DOMTreeContentView.prototype._toggleCompositingBorders):
11938        (WebInspector.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
11939        (WebInspector.DOMTreeContentView.prototype._showShadowDOMSettingChanged):
11940        (WebInspector.DOMTreeContentView.prototype._toggleShowsShadowDOMSetting):
11941        * UserInterface/FrameContentView.js:
11942        (WebInspector.FrameContentView.prototype.shown):
11943        (WebInspector.FrameContentView.prototype._pathComponentSelected):
11944        * UserInterface/Images/ShadowDOM.pdf: Added.
11945
119462013-02-15  Antoine Quint  <graouts@apple.com>
11947
11948        <rdar://problem/13026376> Layers sidebar panel should show layers associated with any descendant node
11949
11950        Use the DOM hierarchy to compile a list of layers associated with any
11951        descendant of the node passed to LayerTreeManager's layersForNode()
11952        method.
11953
11954        Reviewed by Timothy Hatcher.
11955
11956        * UserInterface/LayerTreeManager.js:
11957        (WebInspector.LayerTreeManager.prototype.get flatLayerTree): New getter
11958        to make it much easier to debug issues with the LayerTreeManager so we
11959        get the flat list of all known layers from the console.
11960        (WebInspector.LayerTreeManager.prototype.layersForNode):
11961        (WebInspector.LayerTreeManager.prototype.):
11962        (WebInspector.LayerTreeManager.prototype._flattenedLayerTree):
11963        (WebInspector.LayerTreeManager.prototype._obtainNodeIdsForLayerIds):
11964        (WebInspector.LayerTreeManager.prototype._layersForDescendantsOfNode):
11965
119662013-02-15  Antoine Quint  <graouts@apple.com>
11967
11968        <rdar://problem/13223597> Dashboard resources size may be only partial
11969
11970        Wait until we've gotten an event indicating we're loading the main
11971        resource to start tracking sizes.
11972
11973        Reviewed by Timothy Hatcher.
11974
11975        * UserInterface/DashboardManager.js:
11976        (WebInspector.DashboardManager):
11977        (WebInspector.DashboardManager.prototype._mainResourceDidChange):
11978        (WebInspector.DashboardManager.prototype._startUpdatingTime):
11979
119802013-02-15  Antoine Quint  <graouts@apple.com>
11981
11982        <rdar://problem/13217869> Dashboard: LCD timer does not update when going back/forward
11983
11984        Don't forget to kill any previously running timer when a new page loads
11985        and reset the time reported in the dashboard to 0 before starting the
11986        new timer.
11987
11988        Reviewed by Timothy Hatcher.
11989
11990        * UserInterface/DashboardManager.js:
11991        (WebInspector.DashboardManager.prototype._mainResourceDidChange):
11992
119932013-02-15  Antoine Quint  <graouts@apple.com>
11994
11995        <rdar://problem/13207017> Nodes hosted in shadow trees should not be disregarded when "show-shadow-dom" setting is off
11996
11997        We used to only deal with the "show-shadow-dom" setting as immutable and
11998        would simply not create DOMNodes for payloads with shadow roots in case
11999        the setting was false (the default). However, we would run in a situation
12000        where the backend could push nodes that were part of a shadow tree,
12001        regardless of the setting, and the parentId for the node would not be
12002        referenced in the DOMTreeManager's _idToDOMNode map which would eventually
12003        yield an error when handling setChildNodes payloads and break any further
12004        DOM interaction in the inspector. This kind of case happened quite often
12005        when the LayerTreeManager would get composted layers that were part of
12006        an <input> element, <video> element, etc. 
12007
12008        We now switch to a system where the "show-shadow-dom" setting can be changed
12009        at any time and we reflect the correct state in the DOMTreeOutline. Since
12010        the DOMTreeOutline bases its representation on the data represented by
12011        DOMNode instances, we make the "firstChild", "lastChild", "previousSibling",
12012        "nextSibling" and "children" properties getters and dynamically check whether
12013        child nodes hosted in shadow roots should be ignored.
12014
12015        We only build the filtered children list in the case where we shouldn't
12016        show shadow roots and we've identified through a call to _renumber() that
12017        the filtered list needed updating. The filtered list is then cached until
12018        the next time it needs updating.
12019
12020        We also make the "childNodeCount" property use a getter / setter as it was
12021        being accessed using the ivar from outside the DOMNode class and it would
12022        not reflect whether shadow roots should be reported as children.
12023
12024        Then, we move the setting to be a shared setting on the global WebInspector
12025        object and track changes to it, updating all nodes in the DOMTreeOutline
12026        when the change happens.
12027
12028        Further fixes will ensure we refresh the layer tree when the setting changes,
12029        and teach the LayerTreeManager to ignore layers attached to nodes in shadow
12030        roots when the setting is to hide shadow nodes. Another fix will be to provide
12031        a button to toggle that setting in the DOM tree's navigation bar in lieu of
12032        a contextual menu item.
12033
12034        Reviewed by Joseph Pecoraro.
12035
12036        * UserInterface/DOMNode.js:
12037        (WebInspector.DOMNode):
12038        (WebInspector.DOMNode.prototype.get firstChild):
12039        (WebInspector.DOMNode.prototype.get lastChild):
12040        (WebInspector.DOMNode.prototype.get nextSibling):
12041        (WebInspector.DOMNode.prototype.get previousSibling):
12042        (WebInspector.DOMNode.prototype.get childNodeCount):
12043        (WebInspector.DOMNode.prototype.set childNodeCount):
12044        (WebInspector.DOMNode.prototype.hasChildNodes):
12045        (WebInspector.DOMNode.prototype.hasShadowRoots):
12046        (WebInspector.DOMNode.prototype._insertChild):
12047        (WebInspector.DOMNode.prototype._removeChild):
12048        (WebInspector.DOMNode.prototype._setChildrenPayload):
12049        (WebInspector.DOMNode.prototype._renumber):
12050        * UserInterface/DOMTreeElement.js:
12051        (WebInspector.DOMTreeElement.prototype.handleLoadAllChildren):
12052        * UserInterface/DOMTreeManager.js:
12053        (WebInspector.DOMTreeManager.prototype._childNodeCountUpdated):
12054        * UserInterface/DOMTreeOutline.js:
12055        (WebInspector.DOMTreeOutline):
12056        (WebInspector.DOMTreeOutline.prototype.populateContextMenu):
12057        (WebInspector.DOMTreeOutline.prototype._toggleShowShadowDOM):
12058        (WebInspector.DOMTreeOutline.prototype._showShadowDOMSettingChanged):
12059        * UserInterface/Main.js:
12060        (WebInspector.contentLoaded):
12061
120622013-02-14  Timothy Hatcher  <timothy@apple.com>
12063
12064        Switch to the new flexbox model for significantly faster layout times.
12065
12066        <rdar://problem/13206930> REGRESSION: Layout time in the Web Inspector
12067        is 1.21x longer compared to Safari 6
12068
12069        Reviewed by Simon Fraser.
12070
12071        * UserInterface/TextPrompt.js:
12072        (WebInspector.TextPrompt.SuggestBox.prototype._updateBoxPosition): Make sure to absolute position
12073        the element when measuring in the body to avoid flexbox layout.
12074
12075        * UserInterface/HierarchicalPathNavigationItem.js:
12076        (WebInspector.HierarchicalPathNavigationItem.prototype.set components): Use updateLayout instead
12077        of updateLayoutSoon. Delaying the layout causes a visual flash of wrapped items.
12078
12079        * UserInterface/ButtonToolbarItem.css: Replaced -webkit-box with -webkit-flex.
12080        Replaced -webkit-box-flex with -webkit-flex. Replaced -webkit-box-orient: vertical
12081        with -webkit-flex-direction: column. Replaced -webkit-box-orient: horizontal with
12082        -webkit-flex-direction: row. Replaced -webkit-box-align: center with -webkit-align-items: center.
12083        Replaced -webkit-box-pack: center with -webkit-justify-content: center. Replaced
12084        -webkit-box-pack: start with -webkit-justify-content: flex-start. Replaced -webkit-box-pack: end
12085        with -webkit-justify-content: flex-end.
12086        * UserInterface/ContentBrowser.css: Ditto.
12087        * UserInterface/ControlToolbarItem.css: Ditto.
12088        * UserInterface/DashboardView.css: Ditto.
12089        * UserInterface/FilterBar.css: Ditto.
12090        * UserInterface/FlexibleSpaceNavigationItem.css: Ditto.
12091        * UserInterface/FontResourceContentView.css: Ditto.
12092        * UserInterface/ImageResourceContentView.css: Ditto.
12093        * UserInterface/LayerTreeSidebarPanel.css: Ditto.
12094        * UserInterface/Main.css: Ditto.
12095        * UserInterface/NavigationSidebarPanel.css: Ditto.
12096        * UserInterface/Popover.css: Ditto.
12097        * UserInterface/QuickConsole.css: Ditto.
12098        * UserInterface/ResourceSidebarPanel.css: Ditto.
12099        * UserInterface/Toolbar.css: Ditto.
12100
12101        * UserInterface/HierarchicalPathComponent.css: Ditto.
12102        Plus added min-width: 0 in a couple places to get proper shrinking.
12103
12104        * UserInterface/NavigationBar.css: Ditto.
12105        Plus added -webkit-flex-wrap: wrap in a couple places to get proper measuring in JavaScript.
12106
121072013-02-14  Antoine Quint  <graouts@apple.com>
12108
12109        <rdar://problem/13200858> Popovers can draw their background twice
12110
12111        Since the canvas context may be the very same context across
12112        presentations of the popover, ensure that we restore the default
12113        state after we're done drawing so that the previous clip path
12114        is removed.
12115
12116        We also clear the drawing region so that we don't get remnants
12117        of the previously drawn frame in case the frame size is the same
12118        as for the previous popover presentation.
12119
12120        Reviewed by Timothy Hatcher.
12121
12122        * UserInterface/Popover.js:
12123        (WebInspector.Popover.prototype._drawBackground):
12124
121252013-02-14  Antoine Quint  <graouts@apple.com>
12126
12127        <rdar://problem/13192982> Debugger popovers should line-up arrow to match hovered token
12128
12129        Use the token's bounds rather than the expression's bounds
12130        to present the popover.
12131
12132        Reviewed by Timothy Hatcher.
12133
12134        * UserInterface/TextEditor.js:
12135        (WebInspector.TextEditor.prototype._checkHoveredToken):
12136
121372013-02-14  Antoine Quint  <graouts@apple.com>
12138
12139        <rdar://problem/13209159> Dashboard load timer starts over when recording in the Timeline manually
12140
12141        Instead of starting the timer upon starting recording the timeline, use the
12142        WebInspector.Frame.Event.MainResourceDidChange event to track load of the
12143        main frame only since it's the load of the main frame that we're showing
12144        the time for in the dashboard.
12145
12146        Reviewed by Timothy Hatcher.
12147
12148        * UserInterface/DashboardManager.js:
12149        (WebInspector.DashboardManager):
12150        (WebInspector.DashboardManager.prototype._mainResourceDidChange):
12151
121522013-02-13  Timothy Hatcher  <timothy@apple.com>
12153
12154        Don't fire WebInspector.QuickConsole.Event.DidResize if nothing changed.
12155
12156        Part of: <rdar://problem/12745890> Autocomplete slows down my typing in the Web Inspector console while debugging
12157
12158        Reviewed by Antoine Quint.
12159
12160        * UserInterface/QuickConsole.js:
12161        (WebInspector.QuickConsole.prototype._updateSize): Only change the style and fire the event
12162        if the height of the toolbar or element changed.
12163
121642013-02-12  Timothy Hatcher  <timothy@apple.com>
12165
12166        Speed up selection of deeply nested DOM nodes.
12167
12168        <rdar://problem/13201584> UI updates after selecting elements is very slow
12169
12170        Reviewed by Joseph Pecoraro.
12171
12172        * UserInterface/HierarchicalPathNavigationItem.js:
12173        (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout): Remove a offsetWidth
12174        from a loop that also sets style info.
12175
121762013-02-12  Timothy Hatcher  <timothy@apple.com>
12177
12178        Treat an empty URL for frames as "about:blank" for the special empty page.
12179
12180        Reviewed by Joseph Pecoraro.
12181
12182        * UserInterface/FrameResourceManager.js:
12183        (WebInspector.FrameResourceManager.prototype._createFrame):
12184
121852013-02-13  Antoine Quint  <graouts@apple.com>
12186
12187        <rdar://problem/13193125> Debugger popovers don't appear for boolean values
12188
12189        Don't forget to handle boolean values for the debugger popover.
12190
12191        Reviewed by Timothy Hatcher.
12192
12193        * UserInterface/SourceCodeTextEditor.js:
12194        (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
12195        (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
12196        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean):
12197
121982013-02-12  Jessie Berlin  <jberlin@apple.com>
12199
12200        Ran update-safari-localizable-strings.
12201
12202        Reviewed by Cody Krieger.
12203
12204        * Localizations/en.lproj/localizedStrings.js:
12205        Updated by the script.
12206
122072013-02-11  Timothy Hatcher  <timothy@apple.com>
12208
12209        Add support for computed style.
12210
12211        <rdar://problem/7206272&12526319>
12212
12213        Reviewed by Joseph Pecoraro.
12214
12215        * UserInterface/CSSProperty.js:
12216        (WebInspector.CSSProperty.prototype.set text): Return early if not editable.
12217        (WebInspector.CSSProperty.prototype.set name): Ditto.
12218        (WebInspector.CSSProperty.prototype.get canonicalName): Use CSSStyleManager.canonicalNameForPropertyName.
12219        (WebInspector.CSSProperty.prototype.set value): Return early if not editable.
12220        (WebInspector.CSSProperty.prototype.set priority): Ditto.
12221        (WebInspector.CSSProperty.prototype.set enabled): Ditto.
12222        (WebInspector.CSSProperty.prototype.add): Ditto.
12223        (WebInspector.CSSProperty.prototype.remove): Ditto.
12224        * UserInterface/CSSStyleDeclaration.js:
12225        (WebInspector.CSSStyleDeclaration):
12226        (WebInspector.CSSStyleDeclaration.prototype.get editable): Added.
12227        (WebInspector.CSSStyleDeclaration.prototype.update): Store the property in a map if we aren't editable.
12228        (WebInspector.CSSStyleDeclaration.prototype.addProperty): Return early if not editable.
12229        (WebInspector.CSSStyleDeclaration.prototype.removeProperty): Ditto.
12230        (WebInspector.CSSStyleDeclaration.prototype.propertyForName): Use property map if not editable.
12231        * UserInterface/CSSStyleManager.js:
12232        (WebInspector.CSSStyleManager.prototype.canonicalNameForPropertyName): Added. Moved from CSSProperty.
12233        * UserInterface/DOMNodeStyles.js:
12234        (WebInspector.DOMNodeStyles):
12235        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Added. Moved the finish here.
12236        (WebInspector.DOMNodeStyles.prototype.get computedStyle): Added.
12237        (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Handle NaN index better.
12238        (WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Use an external effective property map for
12239        the main element styles.
12240        (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Use an external effective property map
12241        if one is passed in.
12242
122432013-02-11  Timothy Hatcher  <timothy@apple.com>
12244
12245        Add support for editing rules, styles and properties.
12246
12247        <rdar://problem/7206272&12526319>
12248
12249        Reviewed by Joseph Pecoraro.
12250
12251        * UserInterface/CSSProperty.js:
12252        (WebInspector.CSSProperty.prototype.set index): Added.
12253        (WebInspector.CSSProperty.prototype.update): Delete the pending properties.
12254        (WebInspector.CSSProperty.prototype.get text): Use the getters to get the pending values.
12255        (WebInspector.CSSProperty.prototype.set text): Added.
12256        (WebInspector.CSSProperty.prototype.get name): Return _pendingName if index is NaN.
12257        (WebInspector.CSSProperty.prototype.set name): Added.
12258        (WebInspector.CSSProperty.prototype.get value): Return _pendingValue if index is NaN.
12259        (WebInspector.CSSProperty.prototype.set value): Added.
12260        (WebInspector.CSSProperty.prototype.get important): Use priority getter.
12261        (WebInspector.CSSProperty.prototype.set important): Added.
12262        (WebInspector.CSSProperty.prototype.get priority): Return _pendingPriority if index is NaN.
12263        (WebInspector.CSSProperty.prototype.set priority): Added.
12264        (WebInspector.CSSProperty.prototype.get enabled): Check ownerStyle and index too.
12265        (WebInspector.CSSProperty.prototype.set enabled): Added.
12266        (WebInspector.CSSProperty.prototype.add): Added.
12267        (WebInspector.CSSProperty.prototype.remove): Added.
12268        (WebInspector.CSSProperty.prototype._updatePropertySoon): Added.
12269        (WebInspector.CSSProperty.prototype._updatePropertySoon.performUpdate): Added.
12270        (WebInspector.CSSProperty.prototype._cancelPendingUpdate): Added.
12271        * UserInterface/CSSRule.js:
12272        (WebInspector.CSSRule.prototype.set selectorText): Added.
12273        (WebInspector.CSSRule.prototype.set selectors): Added.
12274        * UserInterface/CSSStyleDeclaration.js:
12275        (WebInspector.CSSStyleDeclaration):
12276        (WebInspector.CSSStyleDeclaration.prototype.update): Don't set ownerStyle to null anymore
12277        since we reuse properties and want them associated still.
12278        (WebInspector.CSSStyleDeclaration.prototype.set text): Added.
12279        (WebInspector.CSSStyleDeclaration.prototype.get pendingProperties): Added.
12280        (WebInspector.CSSStyleDeclaration.prototype.propertyForName): Added.
12281        (WebInspector.CSSStyleDeclaration.prototype.propertyForName.findMatch): Added.
12282        (WebInspector.CSSStyleDeclaration.prototype.addProperty): Added.
12283        (WebInspector.CSSStyleDeclaration.prototype.removeProperty): Added.
12284        * UserInterface/DOMNodeStyles.js:
12285        (WebInspector.DOMNodeStyles.prototype.ruleSelectorChanged): Added.
12286        (WebInspector.DOMNodeStyles.prototype.changeRuleSelector): Added.
12287        (WebInspector.DOMNodeStyles.prototype.changeStyleText): Added.
12288        (WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent): Added.
12289        (WebInspector.DOMNodeStyles.prototype.changeProperty): Added.
12290        (WebInspector.DOMNodeStyles.prototype.changePropertyText): Added.
12291        (WebInspector.DOMNodeStyles.prototype.changePropertyEnabledState): Added.
12292        (WebInspector.DOMNodeStyles.prototype.addProperty): Added.
12293        (WebInspector.DOMNodeStyles.prototype.removeProperty): Added.
12294        (WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Added.
12295        (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Reuse pending properties.
12296        (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): Ignore stylesheets we know
12297        we just changed.
12298
122992013-02-11  Timothy Hatcher  <timothy@apple.com>
12300
12301        Mark overridden properties and associate shorthand to longhand properties.
12302
12303        <rdar://problem/7206272&12526319>
12304
12305        Reviewed by Joseph Pecoraro.
12306
12307        * UserInterface/CSSProperty.js:
12308        (WebInspector.CSSProperty.prototype.update):
12309        (WebInspector.CSSProperty.prototype.get canonicalName): Added.
12310        (WebInspector.CSSProperty.prototype.get canonicalName.canonicalPropertyName): Added.
12311        (WebInspector.CSSProperty.prototype.set overridden): Added.
12312        * UserInterface/DOMNodeStyles.js:
12313        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles): Call _updateStyleCascade.
12314        (WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Added.
12315        (WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder): Added.
12316        (WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Added.
12317        (WebInspector.DOMNodeStyles.prototype._associateRelatedProperties): Added.
12318
123192013-02-11  Timothy Hatcher  <timothy@apple.com>
12320
12321        Parse inherited rules, pseudo elements, inline style and attribute styles.
12322
12323        <rdar://problem/7206272&12526319>
12324
12325        Reviewed by Joseph Pecoraro.
12326
12327        * UserInterface/DOMNodeStyles.js:
12328        (WebInspector.DOMNodeStyles): Added maps and properties.
12329        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Parse pseudoElementRulesPayload
12330        and inheritedRulesPayload.
12331        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles): Parse inlineStylePayload and
12332        attributesStylePayload.
12333        (WebInspector.DOMNodeStyles.prototype.get inheritedRules): Added.
12334        (WebInspector.DOMNodeStyles.prototype.get inlineStyle): Added.
12335        (WebInspector.DOMNodeStyles.prototype.get attributesStyle): Added.
12336        (WebInspector.DOMNodeStyles.prototype.get pseudoElements): Added.
12337        (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): Check inherited,
12338        inline, attributes and pseudo elements.
12339
123402013-02-11  Timothy Hatcher  <timothy@apple.com>
12341
12342        Add WebInspector.CSSStyleDeclaration and WebInspector.CSSProperty and have DOMNodeStyles parse and create them.
12343
12344        <rdar://problem/7206272&12526319>
12345
12346        Reviewed by Joseph Pecoraro.
12347
12348        * UserInterface/CSSProperty.js: Added.
12349        (WebInspector.CSSProperty):
12350        (WebInspector.CSSProperty.prototype.get ownerStyle):
12351        (WebInspector.CSSProperty.prototype.set ownerStyle):
12352        (WebInspector.CSSProperty.prototype.get index):
12353        (WebInspector.CSSProperty.prototype.update):
12354        (WebInspector.CSSProperty.prototype.get text):
12355        (WebInspector.CSSProperty.prototype.get name):
12356        (WebInspector.CSSProperty.prototype.get value):
12357        (WebInspector.CSSProperty.prototype.get important):
12358        (WebInspector.CSSProperty.prototype.get priority):
12359        (WebInspector.CSSProperty.prototype.get enabled):
12360        (WebInspector.CSSProperty.prototype.get overridden):
12361        (WebInspector.CSSProperty.prototype.get implicit):
12362        (WebInspector.CSSProperty.prototype.get valid):
12363        (WebInspector.CSSProperty.prototype.get startStyleSheetTextPosition):
12364        (WebInspector.CSSProperty.prototype.get endStyleSheetTextPosition):
12365        (WebInspector.CSSProperty.prototype.get relatedShorthandProperty):
12366        (WebInspector.CSSProperty.prototype.set relatedShorthandProperty):
12367        (WebInspector.CSSProperty.prototype.get relatedLonghandProperties):
12368        (WebInspector.CSSProperty.prototype.addRelatedLonghandProperty):
12369        (WebInspector.CSSProperty.prototype.clearRelatedLonghandProperties):
12370        (WebInspector.CSSProperty.prototype.isActive):
12371        * UserInterface/CSSStyleDeclaration.js: Added.
12372        (WebInspector.CSSStyleDeclaration):
12373        (WebInspector.CSSStyleDeclaration.prototype.get id):
12374        (WebInspector.CSSStyleDeclaration.prototype.get ownerStyleSheet):
12375        (WebInspector.CSSStyleDeclaration.prototype.get type):
12376        (WebInspector.CSSStyleDeclaration.prototype.get inherited):
12377        (WebInspector.CSSStyleDeclaration.prototype.update):
12378        (WebInspector.CSSStyleDeclaration.prototype.get ownerRule):
12379        (WebInspector.CSSStyleDeclaration.prototype.set ownerRule):
12380        (WebInspector.CSSStyleDeclaration.prototype.get text):
12381        (WebInspector.CSSStyleDeclaration.prototype.get properties):
12382        (WebInspector.CSSStyleDeclaration.prototype.get startStyleSheetTextPosition):
12383        (WebInspector.CSSStyleDeclaration.prototype.get endStyleSheetTextPosition):
12384        (WebInspector.CSSStyleDeclaration.prototype.get nodeStyles):
12385        * UserInterface/DOMNodeStyles.js:
12386        (WebInspector.DOMNodeStyles):
12387        (WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload):
12388        (WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
12389        (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
12390        * UserInterface/Main.html:
12391
123922013-02-11  Timothy Hatcher  <timothy@apple.com>
12393
12394        Add WebInspector.CSSRule and WebInspector.CSSMedia and have DOMNodeStyles parse and create them.
12395
12396        <rdar://problem/7206272&12526319>
12397
12398        Reviewed by Joseph Pecoraro.
12399
12400        * UserInterface/CSSMedia.js: Added.
12401        (WebInspector.CSSMedia):
12402        (WebInspector.CSSMedia.prototype.get type):
12403        (WebInspector.CSSMedia.prototype.get text):
12404        (WebInspector.CSSMedia.prototype.get sourceCodeLocation):
12405        * UserInterface/CSSRule.js: Added.
12406        (WebInspector.CSSRule):
12407        (WebInspector.CSSRule.prototype.get id):
12408        (WebInspector.CSSRule.prototype.get ownerStyleSheet):
12409        (WebInspector.CSSRule.prototype.update):
12410        (WebInspector.CSSRule.prototype.get type):
12411        (WebInspector.CSSRule.prototype.get sourceCodeLocation):
12412        (WebInspector.CSSRule.prototype.get selectorText):
12413        (WebInspector.CSSRule.prototype.get selectors):
12414        (WebInspector.CSSRule.prototype.get matchedSelectorIndices):
12415        (WebInspector.CSSRule.prototype.get style):
12416        (WebInspector.CSSRule.prototype.get mediaList):
12417        (WebInspector.CSSRule.prototype.get nodeStyles):
12418        * UserInterface/DOMNodeStyles.js:
12419        (WebInspector.DOMNodeStyles):
12420        (WebInspector.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload):
12421        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
12422        (WebInspector.DOMNodeStyles.prototype.refresh):
12423        (WebInspector.DOMNodeStyles.prototype.get matchedRules):
12424        (WebInspector.DOMNodeStyles.prototype._identifierToString):
12425        (WebInspector.DOMNodeStyles.prototype._createSourceCodeLocation):
12426        (WebInspector.DOMNodeStyles.prototype._parseRulePayload):
12427        (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange.markAsNeedsRefresh):
12428        (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange.checkRules):
12429        (WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange):
12430        * UserInterface/Main.html:
12431
124322013-02-11  Timothy Hatcher  <timothy@apple.com>
12433
12434        Add WebInspector.DOMNodeStyles, a new class to inspect and manage styles for a node.
12435
12436        <rdar://problem/7206272&12526319>
12437
12438        Reviewed by Joseph Pecoraro.
12439
12440        * UserInterface/CSSStyleManager.js:
12441        (WebInspector.CSSStyleManager): Added _nodeStylesMap.
12442        (WebInspector.CSSStyleManager.prototype.stylesForNode): Added.
12443        (WebInspector.CSSStyleManager.prototype._mainResourceDidChange): Clear _nodeStylesMap.
12444        * UserInterface/DOMNodeStyles.js: Added.
12445        (WebInspector.DOMNodeStyles):
12446        (WebInspector.DOMNodeStyles.prototype.get node):
12447        (WebInspector.DOMNodeStyles.prototype.refreshIfNeeded):
12448        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
12449        (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
12450        (WebInspector.DOMNodeStyles.prototype.refresh):
12451        * UserInterface/Main.html: Added DOMNodeStyles.js.
12452
124532013-02-11  Timothy Hatcher  <timothy@apple.com>
12454
12455        Add WebInspector.CSSStyleSheet and start using it.
12456
12457        This replaces a collection of maps and content updating functions in CSSStyleManager
12458        with a proper SourceCode subclass that manages its info, content and works with branches.
12459
12460        <rdar://problem/7206272&12526319>
12461
12462        Reviewed by Joseph Pecoraro.
12463
12464        * UserInterface/BoxModelDetailsSectionRow.js:
12465        (WebInspector.BoxModelDetailsSectionRow): Listen for the change event on CSSStyleSheet.
12466        * UserInterface/CSSStyleDetailsSidebarPanel.js:
12467        (WebInspector.CSSStyleDetailsSidebarPanel): Ditto.
12468        * UserInterface/CSSStyleManager.js:
12469        (WebInspector.CSSStyleManager): Added event listeners for resources.
12470        (WebInspector.CSSStyleManager.prototype.styleSheetForIdentifier): Added.
12471        (WebInspector.CSSStyleManager.prototype.styleSheetChanged): Call noteContentDidChange and
12472        _updateResourceContent.
12473        (WebInspector.CSSStyleManager.prototype._mainResourceDidChange): Added. Clear the maps when the
12474        main frame navigates.
12475        (WebInspector.CSSStyleManager.prototype._resourceAdded): Added. Call _clearStyleSheetsForResource.
12476        (WebInspector.CSSStyleManager.prototype._resourceTypeDidChange): Ditto.
12477        (WebInspector.CSSStyleManager.prototype._clearStyleSheetsForResource): Added.
12478        (WebInspector.CSSStyleManager.prototype._frameURLMapKey): Added.
12479        (WebInspector.CSSStyleManager.prototype._lookupStyleSheetForResource.syleSheetsFetched): Use
12480        _styleSheetFrameURLMap instead of _styleSheetInfoMap.
12481        (WebInspector.CSSStyleManager.prototype._setContentForStyleSheetIdentifier): Removed.
12482        (WebInspector.CSSStyleManager.prototype._lookupStyleSheet): Updated function names.
12483        (WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets): Ditto.
12484        (WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
12485        Use SourceCodeRevision to update the stylesheet content.
12486        (WebInspector.CSSStyleManager.prototype._updateResourceContent): Added.
12487        (WebInspector.CSSStyleManager.prototype._updateResourceContent.fetchedStyleSheetContent): Added.
12488        (WebInspector.CSSStyleManager.prototype._updateResourceContent.styleSheetReady): Added.
12489        (WebInspector.CSSStyleManager.prototype._updateResourceContent.applyStyleSheetChanges): Added.
12490        * UserInterface/CSSStyleSheet.js: Added.
12491        (WebInspector.CSSStyleSheet):
12492        (WebInspector.CSSStyleSheet.resetUniqueDisplayNameNumbers):
12493        (WebInspector.CSSStyleSheet.prototype.get id):
12494        (WebInspector.CSSStyleSheet.prototype.get parentFrame):
12495        (WebInspector.CSSStyleSheet.prototype.get url):
12496        (WebInspector.CSSStyleSheet.prototype.get urlComponents):
12497        (WebInspector.CSSStyleSheet.prototype.get displayName):
12498        (WebInspector.CSSStyleSheet.prototype.updateInfo):
12499        (WebInspector.CSSStyleSheet.prototype.get revisionForRequestedContent):
12500        (WebInspector.CSSStyleSheet.prototype.handleCurrentRevisionContentChange.contentDidChange):
12501        (WebInspector.CSSStyleSheet.prototype.handleCurrentRevisionContentChange):
12502        (WebInspector.CSSStyleSheet.prototype.canRequestContentFromBackend):
12503        (WebInspector.CSSStyleSheet.prototype.requestContentFromBackend):
12504        (WebInspector.CSSStyleSheet.prototype.noteContentDidChange):
12505        * UserInterface/Main.html: Added CSSStyleSheet.js.
12506        * UserInterface/SourceCode.js:
12507        (WebInspector.SourceCode.prototype.revisionContentDidChange): Call handleCurrentRevisionContentChange.
12508        (WebInspector.SourceCode.prototype.handleCurrentRevisionContentChange): Added.
12509        (WebInspector.SourceCode.prototype.get revisionForRequestedContent): Added.
12510        (WebInspector.SourceCode.prototype.markContentAsStale): Added.
12511        (WebInspector.SourceCode.prototype._processContent): Use revisionForRequestedContent.
12512
125132013-02-11  Timothy Hatcher  <timothy@apple.com>
12514
12515        Remove noteStyleSheetChanged and use the styleSheetChanged backend event.
12516
12517        The backend already tells us when a stylesheet changes, so we should use it
12518        instead of trying to fire the event when we think it should.
12519
12520        <rdar://problem/7206272&12526319>
12521
12522        Reviewed by Joseph Pecoraro.
12523
12524        * UserInterface/CSSObserver.js:
12525        (WebInspector.CSSObserver.prototype.styleSheetChanged): Call CSSStyleManager.
12526        * UserInterface/CSSStyleManager.js:
12527        (WebInspector.CSSStyleManager.prototype.mediaQueryResultChanged): Moved to the top.
12528        (WebInspector.CSSStyleManager.prototype.styleSheetChanged): Added.
12529        (WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged): Removed.
12530        * UserInterface/OldCSSProperty.js:
12531        (WebInspector.OldCSSProperty.prototype.callback): Removed call to noteStyleSheetChanged.
12532        (WebInspector.OldCSSProperty.prototype.setText): Ditto.
12533        (WebInspector.OldCSSProperty.prototype.setDisabled): Ditto.
12534        * UserInterface/OldCSSStyleDeclaration.js:
12535        (WebInspector.OldCSSStyleDeclaration.prototype.insertPropertyAt): Removed call to noteStyleSheetChanged.
12536
125372013-02-11  Timothy Hatcher  <timothy@apple.com>
12538
12539        Create mappings between shorthand and longhand property names.
12540
12541        <rdar://problem/7206272&12526319>
12542
12543        Reviewed by Joseph Pecoraro.
12544
12545        * UserInterface/CSSCompletions.js:
12546        (WebInspector.CSSCompletions): Create the mappings.
12547        (WebInspector.CSSCompletions.prototype.longhandsForShorthand): Added.
12548        (WebInspector.CSSCompletions.prototype.shorthandsForLonghand): Added.
12549
125502013-02-11  Timothy Hatcher  <timothy@apple.com>
12551
12552        Rename current CSS model classes to have "Old" prefixes.
12553
12554        This is in preparation for a new and improved CSS model classes.
12555
12556        <rdar://problem/7206272&12526319>
12557
12558        Reviewed by Joseph Pecoraro.
12559
12560        * UserInterface/CSSStyleManager.js:
12561        (WebInspector.CSSStyleManager.parseRuleArrayPayload):
12562        (WebInspector.CSSStyleManager.prototype.):
12563        (WebInspector.CSSStyleManager.prototype.getMatchedStylesAsync):
12564        (WebInspector.CSSStyleManager.prototype.getComputedStyleAsync):
12565        (WebInspector.CSSStyleManager.prototype.getInlineStylesAsync):
12566        * UserInterface/Main.html:
12567        * UserInterface/OldCSSMedia.js: Renamed from WebInspector/UserInterface/CSSMedia.js.
12568        * UserInterface/OldCSSProperty.js: Renamed from WebInspector/UserInterface/CSSProperty.js.
12569        * UserInterface/OldCSSRule.js: Renamed from WebInspector/UserInterface/CSSRule.js.
12570        * UserInterface/OldCSSStyleDeclaration.js: Renamed from WebInspector/UserInterface/CSSStyleDeclaration.js.
12571        * UserInterface/StylePropertiesSection.js:
12572        (WebInspector.StylePropertiesSection):
12573        (WebInspector.StylePropertiesSection.prototype.onpopulate):
12574
125752013-02-12  Antoine Quint  <graouts@apple.com>
12576
12577        <rdar://problem/11053300> Profile recording button falsely indicates "recording" if started and then page navigates or refreshes
12578
12579        We now correctly keep the recording state across a page reload,
12580        only resetting it, as well as removing any previous profile, when
12581        we navigate away from the current page.
12582
12583        To do so, we alert the sidebar panel when a profile is interrupted
12584        such that any old tree item for this profile is pruned and the
12585        state of the profile recording button is updated to match that of
12586        the profiler. Additionally, when the main frame is refreshed, we
12587        attempt to resume profiling by looking for existing, though stale,
12588        profile objects, and creating a new one as needed. In cases where
12589        we navigate to a new frame, the "Cleared" event is dispatched and
12590        the sidebar panel empties itself.
12591
12592        Finally, we ensure that the number set for the profile's title
12593        reflects the current list of profiles of this type and that any
12594        selected CSS profile's content view is hidden if the profile list
12595        is cleared.
12596
12597        Note that profiles that were recorded prior to the current load
12598        will show an empty content view unless they had also been selected
12599        prior to a subsequent load. This is a known issue and will be fixed
12600        with a followup task.
12601
12602        Reviewed by Timothy Hatcher.
12603
12604        * UserInterface/InstrumentSidebarPanel.js:
12605        (WebInspector.InstrumentSidebarPanel):
12606        (WebInspector.InstrumentSidebarPanel.prototype._profilingInterrupted):
12607        (WebInspector.InstrumentSidebarPanel.prototype._titleForProfile):
12608        (WebInspector.InstrumentSidebarPanel.prototype._profilesCleared):
12609        * UserInterface/ProfileManager.js:
12610        (WebInspector.ProfileManager.prototype.initialize):
12611        (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
12612        (WebInspector.ProfileManager.prototype._mainResourceDidChange):
12613        (WebInspector.ProfileManager.prototype._checkForInterruptions):
12614        (WebInspector.ProfileManager.prototype._attemptToResumeProfiling):
12615
126162013-02-12  Antoine Quint  <graouts@apple.com>
12617
12618        <rdar://problem/13171934> Control+click on toolbar doesn't bring up toolbar context menu items
12619
12620        Don't do any custom handling of mousedown events on the toolbar if
12621        the control key was pressed.
12622
12623        Reviewed by Timothy Hatcher.
12624
12625        * UserInterface/Main.js:
12626        (WebInspector._toolbarMouseDown):
12627
126282013-02-11  Antoine Quint  <graouts@apple.com>
12629
12630        <rdar://problem/10854712> REGRESSION (Safari 6): It's hard to see at a glance if a page has any JS/HTML errors/warnings
12631
12632        We add a new DashboardManager singleton which taps into events exposed
12633        by other managers and classes in order to monitor resources, timeline
12634        records and console messages and display the respective counts in a
12635        DashboardView. The DashboardView knows how to lay itself out in the
12636        various toolbar modes and lets the user jump to various parts of the
12637        inspector upon clicking its outlets, while providing useful information
12638        as the user hovers over the item with the mouse.
12639
12640        Reviewed by Timothy Hatcher and Joseph Pecoraro.
12641
12642        * Localizations/en.lproj/localizedStrings.js:
12643        * UserInterface/DashboardManager.js: Added.
12644        (WebInspector.DashboardManager):
12645        (WebInspector.DashboardManager.prototype._resourceWasAdded):
12646        (WebInspector.DashboardManager.prototype._resourcesWereCleared):
12647        (WebInspector.DashboardManager.prototype._frameWasAdded):
12648        (WebInspector.DashboardManager.prototype._resourceSizeDidChange):
12649        (WebInspector.DashboardManager.prototype._timelineRecordingStarted):
12650        (WebInspector.DashboardManager.prototype._updateTime):
12651        (WebInspector.DashboardManager.prototype._consoleMessageAdded):
12652        (WebInspector.DashboardManager.prototype._consoleMessageWasRepeated):
12653        (WebInspector.DashboardManager.prototype._incrementConsoleMessageType):
12654        (WebInspector.DashboardManager.prototype._consoleWasCleared):
12655        * UserInterface/DashboardView.css: Added.
12656        (.dashboard):
12657        (.dashboard > .item):
12658        (.dashboard > .item > *):
12659        (.dashboard > .item > img):
12660        (.dashboard > .item.enabled > img):
12661        (.dashboard > .item.enabled:hover > img):
12662        (.dashboard > .item > div):
12663        (.dashboard > .item.issues > div > div):
12664        (.dashboard > .item.enabled > div):
12665        (.dashboard > .item.enabled:hover > div):
12666        (.dashboard > .resources > img):
12667        (.dashboard > .time > img):
12668        (.dashboard > .logs > img):
12669        (.dashboard > .memory > img):
12670        (.dashboard > .errors > img):
12671        (.dashboard > .errors.enabled > img):
12672        (.dashboard > .errors.enabled:hover > img):
12673        (.dashboard > .errors.enabled > div):
12674        (.dashboard > .errors.enabled:hover > div):
12675        (.dashboard > .issues > img):
12676        (.dashboard > .issues.enabled > img):
12677        (.dashboard > .issues.enabled:hover > img):
12678        (.dashboard > .issues.enabled > div):
12679        (.dashboard > .issues.enabled:hover > div):
12680        (.toolbar.normal-size.icon-and-label-horizontal > .item-section > .dashboard):
12681        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard):
12682        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .item):
12683        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
12684        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .time):
12685        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
12686        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
12687        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
12688        (.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
12689        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard):
12690        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .item):
12691        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
12692        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .time):
12693        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
12694        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
12695        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
12696        (.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
12697        * UserInterface/DashboardView.js: Added.
12698        (WebInspector.DashboardView):
12699        (WebInspector.DashboardView.prototype.get logs):
12700        (WebInspector.DashboardView.prototype.set logs):
12701        (WebInspector.DashboardView.prototype.get issues):
12702        (WebInspector.DashboardView.prototype.set issues):
12703        (WebInspector.DashboardView.prototype.get errors):
12704        (WebInspector.DashboardView.prototype.set errors):
12705        (WebInspector.DashboardView.prototype.set memory):
12706        (WebInspector.DashboardView.prototype.set time):
12707        (WebInspector.DashboardView.prototype.get resourcesCount):
12708        (WebInspector.DashboardView.prototype.set resourcesCount):
12709        (WebInspector.DashboardView.prototype.get resourcesSize):
12710        (WebInspector.DashboardView.prototype.set resourcesSize):
12711        (WebInspector.DashboardView.prototype._appendElementForNamedItem):
12712        (WebInspector.DashboardView.prototype._itemWasClicked):
12713        (WebInspector.DashboardView.prototype._resourcesWasClicked):
12714        (WebInspector.DashboardView.prototype._timeWasClicked):
12715        (WebInspector.DashboardView.prototype._consoleItemWasClicked):
12716        (WebInspector.DashboardView.prototype._updateResourcesOutlet):
12717        (WebInspector.DashboardView.prototype._setItemEnabled):
12718        * UserInterface/Images/Errors.svg: Added.
12719        * UserInterface/Images/ErrorsEnabled.svg: Added.
12720        * UserInterface/Images/Issues.svg: Added.
12721        * UserInterface/Images/IssuesEnabled.svg: Added.
12722        * UserInterface/Images/Logs.svg: Added.
12723        * UserInterface/Images/Memory.svg: Added.
12724        * UserInterface/Images/Resources.svg: Added.
12725        * UserInterface/Images/Time.svg: Added.
12726        * UserInterface/Main.html:
12727        * UserInterface/Main.js:
12728        (WebInspector.contentLoaded):
12729        * UserInterface/Resource.js:
12730        (WebInspector.Resource.prototype.increaseSize):
12731
127322013-02-08  Joseph Pecoraro  <pecoraro@apple.com>
12733
12734        <rdar://problem/13184288> REGRESSION: Undo / Redo no longer works in QuickConsole
12735
12736        Reviewed by Timothy Hatcher.
12737
12738        * UserInterface/KeyboardShortcut.js:
12739        (WebInspector.KeyboardShortcut):
12740        (WebInspector.KeyboardShortcut._handleKeyDown):
12741        (WebInspector.KeyboardShortcut.prototype.get implicitlyPreventsDefault):
12742        (WebInspector.KeyboardShortcut.prototype.set implicitlyPreventsDefault):
12743        By default keyboard shortcuts prevent default. Allow the KeyboardShortcut
12744        to opt out of implicitly preventing default. That way a keyboard shortcut
12745        can be added that does not prevent default.
12746
12747        * UserInterface/Main.js:
12748        (WebInspector.contentLoaded):
12749        The undo and redo keyboard shortcuts will not implicitly prevent default.
12750
12751        (WebInspector._undoKeyboardShortcut):
12752        (WebInspector._redoKeyboardShortcut):
12753        Do not trigger WebInspector.undo or redo if the key event triggered
12754        while in a text field. Instead let the event bubble to get default
12755        text editing behavior.
12756
127572013-02-08  Timothy Hatcher  <timothy@apple.com>
12758
12759        Only record the load event time for the main frame.
12760
12761        Reviewed by Antoine Quint.
12762
12763        * UserInterface/TimelineManager.js:
12764        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Check the frameId against the
12765        mainFrame's id before setting _loadEventTime.
12766
127672013-02-07  Timothy Hatcher  <timothy@apple.com>
12768
12769        Make CSS autocompletion work again when editing a property.
12770
12771        <rdar://problem/13058573> REGRESSION: CSS autocompletion broken after OpenSource r123612
12772
12773        Reviewed by Joseph Pecoraro.
12774
12775        * UserInterface/CSSCompletions.js:
12776        (WebInspector.CSSCompletions): Support the change in format of values.
12777
127782013-02-07  Antoine Quint  <graouts@apple.com>
12779
12780        <rdar://problem/13162142> Contextual menu items on the toolbar are missing
12781
12782        Pass the event when creating a ContextMenu object instead on calling show().
12783
12784        Reviewed by Joseph Pecoraro.
12785
12786        * UserInterface/LogContentView.js:
12787        (WebInspector.LogContentView.prototype._handleContextMenuEvent):
12788        * UserInterface/Toolbar.js:
12789        (WebInspector.Toolbar.prototype._handleContextMenuEvent):
12790
127912013-02-07  Joseph Pecoraro  <pecoraro@apple.com>
12792
12793        Merge OpenSource r116305 to fix TextPrompt event listener and style leaks.
12794
12795        Reviewed by Timothy Hatcher.
12796
12797        * UserInterface/TextPrompt.js:
12798        (WebInspector.TextPrompt.prototype._attachInternal):
12799        (WebInspector.TextPrompt.prototype.detach):
12800
128012013-02-05  Antoine Quint  <graouts@apple.com>
12802
12803        <rdar://problem/11007445> PARITY (WebKit Web Inspector): Support Undo/Redo for DOM changes
12804
12805        Wire up Cmd+Z and Cmd+Shift+Z keyboard shortcuts to call DOMAgent's
12806        undo() and redo() methods while marking DOM and CSS editing tasks
12807        as undoable via the DOMAgent's markUndoableState() method.
12808
12809        Reviewed by Timothy Hatcher.
12810
12811        * UserInterface/CSSProperty.js:
12812        (WebInspector.CSSProperty.prototype.callback):
12813        (WebInspector.CSSProperty.prototype.setText):
12814        (WebInspector.CSSProperty.prototype.setDisabled):
12815        * UserInterface/CSSStyleManager.js:
12816        (WebInspector.CSSStyleManager.prototype.):
12817        (WebInspector.CSSStyleManager.prototype._setContentForStyleSheetIdentifier):
12818        (WebInspector.CSSStyleManager.prototype.callback):
12819        (WebInspector.CSSStyleManager.prototype.setRuleSelector):
12820        (WebInspector.CSSStyleManager.prototype.addRule):
12821        * UserInterface/DOMNode.js:
12822        (WebInspector.DOMNode.prototype.setNodeName):
12823        (WebInspector.DOMNode.prototype.setNodeValue):
12824        (WebInspector.DOMNode.prototype.setAttribute):
12825        (WebInspector.DOMNode.prototype.setAttributeValue):
12826        (WebInspector.DOMNode.prototype.):
12827        (WebInspector.DOMNode.prototype.removeAttribute):
12828        (WebInspector.DOMNode.prototype.setOuterHTML):
12829        (WebInspector.DOMNode.prototype.removeNode):
12830        (WebInspector.DOMNode.prototype.moveTo):
12831        (WebInspector.DOMNode.prototype.setPseudoClassEnabled):
12832        * UserInterface/Main.js:
12833        (WebInspector.contentLoaded):
12834        (WebInspector.undo):
12835        (WebInspector.redo):
12836
128372013-02-05  Antoine Quint  <graouts@apple.com>
12838
12839        <rdar://problem/11133526> PARITY (WebKit Web Inspector): Ability to force pseudo state for an element is missing
12840
12841        In order to show submenu items in contextual menus in the Web Inspector, we update ContextMenu.js
12842        to be the latest from OpenSource and update the way we use this API in our code so that the event
12843        is provided at construction time rather than when calling the .show() method.
12844
12845        We also have to update the RWI-specific front-end host in order to recognize the new "subMenu"
12846        contextual menu item type and handle its items to show as a submenu item in the NSMenu we
12847        create.
12848
12849        Then, we allow the possibility to enforce certain pseudo-classes on a DOMNode, which triggers
12850        a new event that the style and appearance panels listen to in order to refresh their display
12851        and account for any style changes that may result from a pseudo-class being forced.
12852
12853        Finally, we add new menu items to the contextual menu of a DOM node in the inspector's DOM
12854        tree to allow to "Force CSS Pseudo-Classes".
12855
12856        Reviewed by Timothy Hatcher.
12857
12858        * Localizations/en.lproj/localizedStrings.js:
12859        * UserInterface/BoxModelDetailsSectionRow.js:
12860        (WebInspector.BoxModelDetailsSectionRow):
12861        * UserInterface/CSSStyleDetailsSidebarPanel.js:
12862        (WebInspector.CSSStyleDetailsSidebarPanel):
12863        * UserInterface/ContextMenu.js:
12864        (WebInspector.ContextMenuItem):
12865        (WebInspector.ContextMenuItem.prototype.id):
12866        (WebInspector.ContextMenuItem.prototype.type):
12867        (WebInspector.ContextMenuItem.prototype.isEnabled):
12868        (WebInspector.ContextMenuItem.prototype.setEnabled):
12869        (WebInspector.ContextMenuItem.prototype._buildDescriptor):
12870        (WebInspector.ContextSubMenuItem):
12871        (WebInspector.ContextSubMenuItem.prototype.appendItem):
12872        (WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
12873        (WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
12874        (WebInspector.ContextSubMenuItem.prototype.appendSeparator):
12875        (WebInspector.ContextSubMenuItem.prototype._pushItem):
12876        (WebInspector.ContextSubMenuItem.prototype.isEmpty):
12877        (WebInspector.ContextSubMenuItem.prototype._buildDescriptor):
12878        (WebInspector.ContextMenu):
12879        (WebInspector.ContextMenu.prototype.nextId):
12880        (WebInspector.ContextMenu.prototype.show):
12881        (WebInspector.ContextMenu.prototype.showSoftMenu):
12882        (WebInspector.ContextMenu.prototype._setHandler):
12883        (WebInspector.ContextMenu.prototype._buildDescriptor):
12884        (WebInspector.ContextMenu.prototype._itemSelected):
12885        (WebInspector.ContextMenu.prototype.appendApplicableItems):
12886        (WebInspector.ContextMenu.Provider):
12887        (WebInspector.ContextMenu.Provider.prototype.appendApplicableItems):
12888        (WebInspector.ContextMenu.registerProvider):
12889        * UserInterface/DOMNode.js:
12890        (WebInspector.DOMNode):
12891        (WebInspector.DOMNode.prototype.isXMLNode):
12892        (WebInspector.DOMNode.prototype.get enabledPseudoClasses):
12893        (WebInspector.DOMNode.prototype.setPseudoClassEnabled):
12894        * UserInterface/DOMTreeElement.js:
12895        (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
12896        (WebInspector.DOMTreeElement.prototype._populateForcedPseudoStateItems.string_appeared_here.forEach):
12897        (WebInspector.DOMTreeElement.prototype._populateForcedPseudoStateItems):
12898        * UserInterface/DOMTreeOutline.js:
12899        (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
12900        * UserInterface/DataGrid.js:
12901        (WebInspector.DataGrid.prototype._contextMenuInDataTable):
12902        * UserInterface/ObjectPropertiesSection.js:
12903        (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
12904        (WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired):
12905        * UserInterface/Utilities.js:
12906
129072013-02-04  Jessie Berlin  <jberlin@apple.com>
12908
12909        Ran update-safari-localizable-strings.
12910
12911        * Localizations/en.lproj/localizedStrings.js:
12912
129132013-02-04  Antoine Quint  <graouts@apple.com>
12914
12915        <rdar://problem/13042270> Debugger should be smarter about hovered tokens
12916
12917        When notifying that we're hovering a new token, keep going through
12918        previous tokens on the same line to find other expressions and .
12919        so that a full property chain can be resolved. The result is now
12920        stored in a new "fullExpression" property on the "hoveredToken" object.
12921
12922        Additionally, the bounds of the token are now those of the full expression
12923        such that highlight is correct and the highlight-related APIs have been
12924        renamed to work within the context of an expression and not a token.
12925
12926        While this patch doesn't handle expressions across several lines, it gets
12927        us to parity with what the OpenSource Web Inspector knows how to handle.
12928
12929        Reviewed by Joseph Pecoraro.
12930
12931        * UserInterface/SourceCodeTextEditor.js:
12932        (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
12933        (WebInspector.SourceCodeTextEditor.prototype._showPopover):
12934        (WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
12935        * UserInterface/TextEditor.js:
12936        (WebInspector.TextEditor.prototype.highlightHoveredExpression):
12937        (WebInspector.TextEditor.prototype.removeHighlightOnHoveredExpression):
12938        (WebInspector.TextEditor.prototype._mouseMovedOverEditor):
12939        (WebInspector.TextEditor.prototype._checkHoveredToken):
12940
129412013-02-01  Joseph Pecoraro  <pecoraro@apple.com>
12942
12943        <rdar://problem/13137010> Console toggle split / full-height button is showing the wrong direction
12944
12945        Reviewed by Timothy Hatcher.
12946
12947        * UserInterface/LogContentView.js:
12948        (WebInspector.LogContentView.prototype.shown):
12949        (WebInspector.LogContentView.prototype._toggleSplit):
12950        Always update the toggle button whenever the log content view is shown.
12951
12952        * UserInterface/Main.js:
12953        (WebInspector.toggleSplitConsole):
12954        This no longer needs to return true or false, so clean it up.
12955
129562013-02-01  Joseph Pecoraro  <pecoraro@apple.com>
12957
12958        <rdar://problem/13137050> Clicking Console button in main toolbar should always toggle the console, even if no back history
12959
12960        Reviewed by Timothy Hatcher.
12961
12962        * UserInterface/Main.js:
12963        (WebInspector.toggleConsoleView):
12964        When toggling and there is no history, open the source code for the main resource.
12965
129662013-02-01  Timothy Hatcher  <timothy@apple.com>
12967
12968        Add the ability to resize the split console.
12969
12970        Part of: <rdar://problem/13118771> Unify the quick console and full console
12971
12972        Reviewed by Joseph Pecoraro.
12973
12974        * UserInterface/Main.css:
12975        (#split-content-browser > .navigation-bar): Use row-resize cursor.
12976        (#split-content-browser > .navigation-bar .item:not(.flexible-space)): Use default cursor.
12977        * UserInterface/Main.js:
12978        (WebInspector.contentLoaded): Added height setting and event listener. Call _updateSplitConsoleHeight.
12979        (WebInspector._updateSplitConsoleHeight): Added.
12980        (WebInspector._consoleResizerMouseDown): Added.
12981        (WebInspector._consoleResizerMouseDown.dockedResizerDrag): Added.
12982        (WebInspector._consoleResizerMouseDown.dockedResizerDragEnd): Added.
12983
129842013-01-30  Timothy Hatcher  <timothy@apple.com>
12985
12986        Gut the old Quick Console except the prompt and make the Console view use the Quick Console prompt.
12987
12988        Part of: <rdar://problem/13118771> Unify the quick console and full console
12989
12990        Reviewed by Joseph Pecoraro.
12991
12992        * UserInterface/LogContentView.js:
12993        (WebInspector.LogContentView): Use the quick console prompt. Don't append a <br> now that the prompt
12994        isn't in the view.
12995        (WebInspector.LogContentView.prototype.didAppendConsoleMessage): Added.
12996        (WebInspector.LogContentView.prototype.promptDidChangeHeight): Added.
12997        * UserInterface/QuickConsole.css: Removed unused rules.
12998        * UserInterface/QuickConsole.js:
12999        (WebInspector.QuickConsole):
13000        (WebInspector.QuickConsole.prototype.updateLayout): Just call _updateSize.
13001        (WebInspector.QuickConsole.prototype._updateSize): Added.
13002        (WebInspector.QuickConsole.prototype._toggleOrFocus): Call WebInspector.toggleConsoleView.
13003
130042013-01-30  Timothy Hatcher  <timothy@apple.com>
13005
13006        Add the ability to show a second content browser at the bottom for the console view.
13007
13008        Part of: <rdar://problem/13118771> Unify the quick console and full console
13009
13010        Reviewed by Joseph Pecoraro.
13011
13012        * Localizations/en.lproj/localizedStrings.js: Updated.
13013        * UserInterface/ContentBrowser.js:
13014        (WebInspector.ContentBrowser.prototype.get element): Added.
13015        * UserInterface/Images/SplitToggleDown.pdf: Added.
13016        * UserInterface/Images/SplitToggleUp.pdf: Added.
13017        * UserInterface/InspectorFrontendAPI.js:
13018        (InspectorFrontendAPI.showConsole): Use toggleConsoleView instead.
13019        * UserInterface/LogContentView.js:
13020        (WebInspector.LogContentView): Create a navigation item for toggling the split.
13021        (WebInspector.LogContentView.prototype.get navigationItems): Include the new item.
13022        (WebInspector.LogContentView.prototype._toggleSplit): Added.
13023        * UserInterface/Main.css:
13024        (#split-content-browser): Added.
13025        * UserInterface/Main.html: Added #split-content-browser element.
13026        * UserInterface/Main.js:
13027        (WebInspector.contentLoaded): Create settings and the split content browser.
13028        (WebInspector.prefersUsingSplitConsole): Added.
13029        (WebInspector.isShowingSplitConsole): Added.
13030        (WebInspector.toggleSplitConsole): Added.
13031        (WebInspector.showSplitConsole): Added.
13032        (WebInspector.hideSplitConsole): Added.
13033        (WebInspector.showFullHeightConsole): Added.
13034        (WebInspector.isShowingConsoleView): Added.
13035        (WebInspector.showConsoleView): Call showSplitConsole or showFullHeightConsole.
13036        (WebInspector.toggleConsoleView): Added.
13037        (WebInspector._contentBrowserCurrentContentViewDidChange): Added. Update the console
13038        button activated state.
13039
130402013-02-01  Joseph Pecoraro  <pecoraro@apple.com>
13041
13042        <rdar://problem/12808694> Enter and Shift+Enter should search forward and backwards
13043
13044        Reviewed by Antoine Quint.
13045
13046        * UserInterface/FindBanner.js:
13047        (WebInspector.FindBanner):
13048        Initialize new member variables.
13049
13050        (WebInspector.FindBanner.prototype._inputFieldKeyDown):
13051        (WebInspector.FindBanner.prototype._inputFieldKeyUp):
13052        Track when the shift key is down inside the search field. Also track
13053        when the enter key is pressed to trigger the input's "search" event.
13054        We only want to respect shift when the user hits enter to search.
13055
13056        (WebInspector.FindBanner.prototype._inputFieldSearch):
13057        If the search value stayed the same, and there are search results,
13058        and the user hit enter, then search forwards or backwards.
13059
130602013-01-31  Antoine Quint  <graouts@apple.com>
13061
13062        Followup fixes after <rdar://problem/11279186> REGRESSION (Safari 6): Timeline
13063        view missing type filters. Addresses the good feedback from JoePeck.
13064
13065        Reviewed by Timothy Hatcher.
13066
13067        * UserInterface/TimelineDataGrid.js:
13068        (WebInspector.TimelineDataGrid):
13069        (WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
13070        * UserInterface/TimelinesContentView.js:
13071
130722013-01-31  Antoine Quint  <graouts@apple.com>
13073
13074        <rdar://problem/13085826> Add stubs for new Page protocol events (frameStartedLoading, etc.)
13075
13076        WebCore added a bunch of Page events in http://trac.webkit.org/changeset/140649. We're
13077        registering them and providing stub handlers until we actually do something with them.
13078        This removes some annoying errors in the Inception console output.
13079
13080        Reviewed by Timothy Hatcher.
13081
13082        * UserInterface/InspectorBackendCommands.js:
13083        * UserInterface/PageObserver.js:
13084        (WebInspector.PageObserver.prototype.frameDetached):
13085        (WebInspector.PageObserver.prototype.frameStartedLoading):
13086        (WebInspector.PageObserver.prototype.frameStoppedLoading):
13087        (WebInspector.PageObserver.prototype.frameScheduledNavigation):
13088        (WebInspector.PageObserver.prototype.frameClearedScheduledNavigation):
13089
130902013-01-31  Antoine Quint  <graouts@apple.com>
13091
13092        Followup fix to <rdar://problem/10981607> REGRESSION (Safari 6): CSS and JavaScript profiles need a visible way to toggle between absolute times and percentages.
13093
13094        * UserInterface/ProfileView.js:
13095        (WebInspector.ProfileView):
13096
130972013-01-30  Antoine Quint  <graouts@apple.com>
13098
13099        <rdar://problem/13115633> JavaScript profiles percentage values don't have the "%" symbol in them
13100
13101        Ensure we add the "%" symbol to values reported in the JS profile data
13102        grid when percents are used.
13103
13104        Reviewed by Timothy Hatcher.
13105
13106        * Localizations/en.lproj/localizedStrings.js:
13107        * UserInterface/ProfileDataGridTree.js:
13108        (WebInspector.ProfileDataGridNode.prototype.get data):
13109
131102013-01-30  Antoine Quint  <graouts@apple.com>
13111
13112        <rdar://problem/13101516> REGRESSION: JavaScript profile recorded from Web Inspector UI never finishes
13113
13114        Two changes made in WebCore broke our support for JavaScript profiling. The first introduced by
13115        http://trac.webkit.org/changeset/126580 was that ProfilerAgent.getProfileHeaders() needed to be
13116        called for any addProfileHeader event to be dispatched to the front-end. The second issue was
13117        introduced by http://trac.webkit.org/changeset/139998 which changed the backend API in a non-
13118        backward-compatible way so that ProfilerAgent.getProfile() was split in two methods:
13119        getCPUProfile() and getHeapSnapshot().
13120
13121        This patch simply adds a call to ProfilerAgent.getProfileHeaders() as soon as the ProfilerAgent
13122        is enabled and also changes the backend we register and call to get the profile to use the
13123        most current WebCore API.
13124
13125        Reviewed by Timothy Hatcher.
13126
13127        * UserInterface/InspectorBackendCommands.js:
13128        * UserInterface/JavaScriptProfileView.js:
13129        (WebInspector.JavaScriptProfileView):
13130        * UserInterface/ProfileManager.js:
13131        (WebInspector.ProfileManager):
13132
131332013-01-29  Timothy Hatcher  <timothy@apple.com>
13134
13135        Stop showing "undefined" and empty scope bar items in the Timeline view.
13136
13137        <rdar://problem/13109468>
13138
13139        Reviewed by Joseph Pecoraro.
13140
13141        * UserInterface/TimelinesContentView.js:
13142        (WebInspector.TimelinesContentView.prototype._makeColumnScopeBar): Check the type of the value,
13143        not the type of the key.
13144
131452013-01-29  Antoine Quint  <graouts@apple.com>
13146
13147        <rdar://problem/11279186> REGRESSION (Safari 6): Timeline view missing type filters
13148
13149        We now add a ScopeBar above the data grid shown for the currently selected record
13150        type as the data grid is hovered. The filtered type is set by adding a .scopeBar
13151        property on the column descriptor and the filtering code is ready to be able to
13152        deal with multiple filterable types per data grid if/when we decide to do this.
13153        However, the UI code only knows how to handle one filterable column per data grid
13154        as it stands. The scope bar showing above the data grid fits snuggly where the timeline
13155        would usually show and has a 10px invisible padding at the top to ensure the user
13156        doesn't mouse out of it too easily.
13157
13158        The hot path _updatePendingRecordsWithNewBounds was updated to filter the pending
13159        records taking into account the current filters, and a new _refreshAllRecordsForCurrentDataGrid
13160        method was added to deal with changes of filters, which takes a less optimized and
13161        more brutal path.
13162
13163        Reviewed by Timothy Hatcher.
13164
13165        * UserInterface/ScopeBar.js:
13166        (WebInspector.ScopeBar.prototype.get defaultItem):
13167        * UserInterface/TimelineDataGrid.js:
13168        (WebInspector.TimelineDataGrid):
13169        (WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
13170        * UserInterface/TimelinesContentView.css:
13171        (.content-view.timelines > .data-grid > .navigation-bar-container):
13172        (.content-view.timelines > .data-grid:hover > .navigation-bar-container):
13173        (.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
13174        * UserInterface/TimelinesContentView.js:
13175        (WebInspector.TimelinesContentView):
13176        (WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds):
13177        (WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh):
13178        (WebInspector.TimelinesContentView.prototype._makeColumnScopeBar):
13179        (WebInspector.TimelinesContentView.prototype._dataGridFiltersDidChange):
13180        (WebInspector.TimelinesContentView.prototype._refreshAllRecordsForCurrentDataGrid):
13181        (WebInspector.TimelinesContentView.prototype.filterableValueForRecordAndIdentifier):
13182        (WebInspector.TimelinesContentView.prototype._filterRecordsWithType):
13183
131842013-01-29  Antoine Quint  <graouts@apple.com>
13185
13186        <rdar://problem/10981607> REGRESSION (Safari 6): CSS and JavaScript profiles need a visible way to toggle between absolute times and percentages
13187
13188        Refactoring the CSSSelectorProfileView and JavaScriptProfileView classes to both
13189        inherit from the new ProfileView class which provide a navigation bar item to
13190        toggle how times are displayed (absolute times vs. a percentage) via a % icon.
13191
13192        This was also the chance to simplify the settings used in the JavaScriptProfileView
13193        which used three different settings for the self, total and average columns. Now these
13194        columns shared the same setting.
13195
13196        Note that part of this patch is speculative due to <rdar://problem/13101516> REGRESSION:
13197        Profile recorded from Web Inspector UI never finishes.
13198
13199        Reviewed by Timothy Hatcher.
13200
13201        * Localizations/en.lproj/localizedStrings.js:
13202        * UserInterface/CSSSelectorProfileView.js:
13203        (WebInspector.CSSSelectorProfileView):
13204        (WebInspector.CSSSelectorProfileView.prototype.toggleTimeDisplay):
13205        (WebInspector.CSSSelectorProfileView.prototype._sortProfile):
13206        * UserInterface/Images/Percent.pdf: Added.
13207        * UserInterface/JavaScriptProfileView.js:
13208        (WebInspector.JavaScriptProfileView.profileCallback):
13209        (WebInspector.JavaScriptProfileView):
13210        (WebInspector.JavaScriptProfileView.prototype.toggleTimeDisplay):
13211        * UserInterface/Main.html:
13212        * UserInterface/ProfileDataGridTree.js:
13213        (WebInspector.ProfileDataGridNode.prototype.get data):
13214        * UserInterface/ProfileView.js: Added.
13215        (WebInspector.ProfileView):
13216        (WebInspector.ProfileView.prototype.get navigationItems):
13217        (WebInspector.ProfileView.prototype.get profile):
13218        (WebInspector.ProfileView.prototype.set profile):
13219        (WebInspector.ProfileView.prototype.toggleTimeDisplay):
13220
132212013-01-26  Timothy Hatcher  <timothy@apple.com>
13222
13223        Update CodeMirror to from 3.0 to 3.0.2.
13224
13225        https://github.com/marijnh/CodeMirror/compare/v3.0...v3.02
13226
13227        Reviewed by Ricky Mondello.
13228
13229        * UserInterface/External/CodeMirror/LICENSE: Updated.
13230        * UserInterface/External/CodeMirror/codemirror.css: Updated.
13231        * UserInterface/External/CodeMirror/codemirror.js: Updated.
13232        * UserInterface/External/CodeMirror/css.js: Updated.
13233        * UserInterface/External/CodeMirror/javascript.js: Updated.
13234        * UserInterface/External/CodeMirror/runmode.js: Updated.
13235        * UserInterface/External/CodeMirror/searchcursor.js: Updated.
13236        * UserInterface/External/CodeMirror/xml.js: Updated.
13237        * UserInterface/TextEditor.css:
13238        (.text-editor > .CodeMirror pre): Dropped the ":not(.CodeMirror-cursor)".
13239        Since CodeMirror-cursor is now a div.
13240
132412013-01-25  Timothy Hatcher  <timothy@apple.com>
13242
13243        Account for a difference in how frames load about:blank.
13244
13245        There was a change in how about:blank frame loads are reported over the Inspector
13246        protocol that was causing a far reaching exception to break parts of the Inspector.
13247
13248        <rdar://problem/13067806> REGRESSION: Timeline fail to record anything in some cases
13249
13250        Reviewed by Antoine Quint.
13251
13252        * UserInterface/FrameResourceManager.js:
13253        (WebInspector.FrameResourceManager.prototype.frameDidNavigate): If the frame isn't known, then
13254        create a new resource which will make a new frame. Mark is as loaded at the end too since we don't
13255        expect any more events about the load finishing for these frames.
13256
132572013-01-24  Timothy Hatcher  <timothy@apple.com>
13258
13259        Reduce the number layouts and style recalculations when switching views or updating
13260        the navigation bar when the selection changes.
13261
13262        <rdar://problem/12975185> 30 second hang inspecting scrolling perf results page
13263        <rdar://problem/11349044> Changing element selection in the Web Inspector hangs
13264        for ~2s because JavaScript forces 27 layouts
13265
13266        Reviewed by Joseph Pecoraro.
13267
13268        * UserInterface/HierarchicalPathNavigationItem.js:
13269        (WebInspector.HierarchicalPathNavigationItem.prototype.set components): Use updateLayoutSoon.
13270        * UserInterface/NavigationBar.js:
13271        (WebInspector.NavigationBar.prototype.insertNavigationItem): Use updateLayoutSoon. Remove explicit
13272        call to _updateStyle and set _needsStyleUpdated instead.
13273        (WebInspector.NavigationBar.prototype.removeNavigationItem): Ditto.
13274        (WebInspector.NavigationBar.prototype.updateLayoutSoon): Added.
13275        (WebInspector.NavigationBar.prototype.updateLayoutSoon.update): Added.
13276        (WebInspector.NavigationBar.prototype.updateLayout): Clear _needsLayout. Call _updateStyle if
13277        _needsStyleUpdated is true.
13278        (WebInspector.NavigationBar.prototype._updateStyle): Clear _needsStyleUpdated.
13279        * UserInterface/NavigationItem.js:
13280        (WebInspector.NavigationItem.prototype.set hidden): Use updateLayoutSoon.
13281
132822013-01-24  Timothy Hatcher  <timothy@apple.com>
13283
13284        Show the resource and line info in the Initiator column, next to the function name.
13285
13286        This helps further identify which file and line the event occurred on without needing
13287        to hover for the tooltip.
13288
13289        Reviewed by Joseph Pecoraro.
13290
13291        * UserInterface/LayoutTimelineDataGridNode.js:
13292        (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent): Add a subtitle
13293        element so the resource name is visible.
13294        * UserInterface/TimelinesContentView.css:
13295        (.content-view.timelines > .data-grid td .subtitle::before): Added. Show a emdash
13296        before the subtitle.
13297
132982013-01-23  Timothy Hatcher  <timothy@apple.com>
13299
13300        Make editing CSS resources work and update the page live.
13301
13302        <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
13303
13304        Reviewed by Joseph Pecoraro.
13305
13306        * UserInterface/CSSStyleManager.js:
13307        (WebInspector.CSSStyleManager):
13308        (WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged.gotStyleSheetText): Implement the FIXME.
13309        (WebInspector.CSSStyleManager.prototype._lookupStyleSheetIdentifiersForResource): Added.
13310        (WebInspector.CSSStyleManager.prototype._lookupStyleSheetIdentifiers): Added.
13311        (WebInspector.CSSStyleManager.prototype._setContentForStyleSheetIdentifier): Added.
13312        (WebInspector.CSSStyleManager.prototype._resourceContentDidChange): Added.
13313        (WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges): Added.
13314        (WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetIdentifiersFound): Added.
13315        * UserInterface/SourceCode.js:
13316        (WebInspector.SourceCode.prototype.set currentRevision): Fire ContentDidChange event.
13317        (WebInspector.SourceCode.prototype.revisionContentDidChange): Ditto.
13318        (WebInspector.SourceCode.prototype._processContent): Ignore content change events for original content.
13319        * UserInterface/SourceCodeRevision.js:
13320        (WebInspector.SourceCodeRevision.prototype.set content): Call revisionContentDidChange on SourceCode.
13321        * UserInterface/TextEditor.js:
13322        (WebInspector.TextEditor): Listen for change event.
13323        (WebInspector.TextEditor.prototype.set string): Ignore change event when setting the string.
13324        (WebInspector.TextEditor.prototype.get readOnly): Added.
13325        (WebInspector.TextEditor.prototype.set readOnly): Added.
13326        (WebInspector.TextEditor.prototype._contentChanged): Added.
13327        * UserInterface/TextResourceContentView.js:
13328        (WebInspector.TextResourceContentView): Listen for SourceCode ContentDidChange event.
13329        (WebInspector.TextResourceContentView.prototype.closed): Remove ContentDidChange event listener.
13330        (WebInspector.TextResourceContentView.prototype._contentWillPopulate): Make editor writable for CSS.
13331        (WebInspector.TextResourceContentView.prototype._sourceCodeContentDidChange): Added. Update editor content.
13332        (WebInspector.TextResourceContentView.prototype._textEditorContentDidChange): Added. Update source code content.
13333
133342013-01-22  Timothy Hatcher  <timothy@apple.com>
13335
13336        Clean up how CSSStyleManager tracks stylesheet changes.
13337
13338        Replaces _fireStyleSheetChanged with noteStyleSheetChanged and populates stylesheet
13339        identifiers for later use.
13340
13341        <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
13342
13343        Reviewed by Joseph Pecoraro.
13344
13345        * UserInterface/CSSProperty.js:
13346        (WebInspector.CSSProperty.prototype.callback): Use noteStyleSheetChanged instead of _fireStyleSheetChanged.
13347        (WebInspector.CSSProperty.prototype.setText): Ditto.
13348        (WebInspector.CSSProperty.prototype.setDisabled): Ditto.
13349        * UserInterface/CSSStyleDeclaration.js:
13350        (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt): Use noteStyleSheetChanged instead of _fireStyleSheetChanged.
13351        * UserInterface/CSSStyleManager.js:
13352        (WebInspector.CSSStyleManager):
13353        (WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged): Added.
13354        (WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged.gotStyleSheetText): Added.
13355        (WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged.syleSheetsFetched): Added.
13356        (WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets): Added. Populate the identifier maps.
13357        (WebInspector.CSSStyleManager.prototype.setRuleSelector): Use noteStyleSheetChanged instead of _fireStyleSheetChanged.
13358        (WebInspector.CSSStyleManager.prototype.addRule): Ditto.
13359        * UserInterface/CSSStyleSheet.js: Removed.
13360        * UserInterface/Main.html: Removed CSSStyleSheet.js.
13361
133622013-01-22  Timothy Hatcher  <timothy@apple.com>
13363
13364        Add a BranchManager class for tracking various branches.
13365
13366        There are two initial branches -- Original and Working Copy. Currently
13367        the Working Copy is always the current branch, but this will be controllable
13368        from the user interface at some point.
13369
13370        <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
13371
13372        Reviewed by Joseph Pecoraro.
13373
13374        * Localizations/en.lproj/localizedStrings.js: Updated.
13375        * UserInterface/BranchManager.js: Added.
13376        (WebInspector.BranchManager):
13377        (WebInspector.BranchManager.prototype.get branches):
13378        (WebInspector.BranchManager.prototype.get currentBranch):
13379        (WebInspector.BranchManager.prototype.set currentBranch):
13380        (WebInspector.BranchManager.prototype.createBranch):
13381        (WebInspector.BranchManager.prototype.deleteBranch):
13382        * UserInterface/Main.html:
13383        * UserInterface/Main.js:
13384        (WebInspector.contentLoaded): Instantiate BranchManager.
13385
133862013-01-22  Timothy Hatcher  <timothy@apple.com>
13387
13388        Add a SourceCodeRevision class for recording changes to SourceCode objects.
13389
13390        Offloads the the content and contentIsBase64Encoded properties to SourceCodeRevision.
13391        SourceCode now creates an original revision that holds the original content. In addition
13392        to the original revision, there is a current revision that can be set to point to different
13393        content based on the original.
13394
13395        <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
13396
13397        Reviewed by Joseph Pecoraro.
13398
13399        * UserInterface/Branch.js:
13400        (WebInspector.Branch.prototype.revisionForRepresentedObject): Added. Helper for finding or
13401        creating a new revision for an object.
13402        * UserInterface/Main.html:
13403        * UserInterface/SourceCode.js:
13404        (WebInspector.SourceCode):
13405        (WebInspector.SourceCode.prototype.get originalRevision): Added.
13406        (WebInspector.SourceCode.prototype.get currentRevision): Added.
13407        (WebInspector.SourceCode.prototype.set currentRevision): Added.
13408        (WebInspector.SourceCode.prototype.get content): Use currentRevision.
13409        (WebInspector.SourceCode.prototype.get contentIsBase64Encoded): Use currentRevision.
13410        (WebInspector.SourceCode.prototype._processContent): Set originalRevision content.
13411        * UserInterface/SourceCodeRevision.js: Added.
13412        (WebInspector.SourceCodeRevision):
13413        (WebInspector.SourceCodeRevision.prototype.get sourceCode):
13414        (WebInspector.SourceCodeRevision.prototype.get content):
13415        (WebInspector.SourceCodeRevision.prototype.set content):
13416        (WebInspector.SourceCodeRevision.prototype.get contentIsBase64Encoded):
13417        (WebInspector.SourceCodeRevision.prototype.set contentIsBase64Encoded):
13418        (WebInspector.SourceCodeRevision.prototype.apply): Set currentRevision to point to this.
13419        (WebInspector.SourceCodeRevision.prototype.revert): Set currentRevision to point to the original.
13420        (WebInspector.SourceCodeRevision.prototype.copy): Copy the content and create a new SourceCodeRevision.
13421
134222013-01-22  Timothy Hatcher  <timothy@apple.com>
13423
13424        Add a BranchManager class for tracking various branches.
13425
13426        There are two initial branches -- Original and Working Copy. Currently
13427        the Working Copy is always the current branch, but this will be controllable
13428        from the user interface at some point.
13429
13430        <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
13431
13432        Reviewed by Joseph Pecoraro.
13433
13434        * Localizations/en.lproj/localizedStrings.js: Updated.
13435        * UserInterface/BranchManager.js: Added.
13436        (WebInspector.BranchManager):
13437        (WebInspector.BranchManager.prototype.get branches):
13438        (WebInspector.BranchManager.prototype.get currentBranch):
13439        (WebInspector.BranchManager.prototype.set currentBranch):
13440        (WebInspector.BranchManager.prototype.createBranch):
13441        (WebInspector.BranchManager.prototype.deleteBranch):
13442        * UserInterface/Main.html:
13443        * UserInterface/Main.js:
13444        (WebInspector.contentLoaded): Instantiate BranchManager.
13445
134462013-01-22  Timothy Hatcher  <timothy@apple.com>
13447
13448        Add a Branch and Revision class for tracking edits in the Inspector.
13449
13450        These classes are not used yet and will be used in subsequent changes.
13451        A branch holds revisions that are differences from the original page.
13452        Concrete revision subclasses will know the specifics about the edited
13453        part of the page and how to apply or revert the change.
13454
13455        <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
13456
13457        Reviewed by Joseph Pecoraro.
13458
13459        * UserInterface/Branch.js: Added.
13460        (WebInspector.Branch):
13461        (WebInspector.Branch.prototype.get displayName):
13462        (WebInspector.Branch.prototype.set displayName):
13463        (WebInspector.Branch.prototype.get revisions):
13464        (WebInspector.Branch.prototype.get locked):
13465        (WebInspector.Branch.prototype.addRevision):
13466        (WebInspector.Branch.prototype.removeRevision):
13467        (WebInspector.Branch.prototype.reset):
13468        (WebInspector.Branch.prototype.apply):
13469        (WebInspector.Branch.prototype.revert):
13470        (WebInspector.Branch.prototype.lock):
13471        (WebInspector.Branch.prototype.unlock):
13472        * UserInterface/Main.html:
13473        * UserInterface/Revision.js: Added.
13474        (WebInspector.Revision):
13475        (WebInspector.Revision.prototype.apply):
13476        (WebInspector.Revision.prototype.revert):
13477        (WebInspector.Revision.prototype.copy):
13478
134792013-01-22  Timothy Hatcher  <timothy@apple.com>
13480
13481        Move contentURL from SourceCode to Resource since _mimeType is
13482        only available on Resource.
13483
13484        Reviewed by Antoine Quint.
13485
13486        * UserInterface/Resource.js:
13487        (WebInspector.Resource.prototype.get contentURL): Added.
13488        * UserInterface/SourceCode.js:
13489        (WebInspector.SourceCode.prototype.get contentURL): Removed.
13490
134912013-01-23  Antoine Quint  <graouts@apple.com>
13492
13493        <rdar://problem/13069440> Switching away from debugger using keyboard shortcut retains popover on screen
13494
13495        Dismiss the popover upon hiding the debugger.
13496
13497        Reviewed by Timothy Hatcher.
13498
13499        * UserInterface/SourceCodeTextEditor.js:
13500        (WebInspector.SourceCodeTextEditor.prototype.hidden):
13501
135022013-01-23  Antoine Quint  <graouts@apple.com>
13503
13504        <rdar://problem/13059630> Move debugger popover display support to SourceCodeTextEditor
13505
13506        Split code between TextEditor and SourceCodeTextEditor such that TextEditor handles all
13507        the user interaction and the interfacing with CodeMirror and notifies subclasses using
13508        the .tokenWasHovered() method and keeping the currently hovered token in .hoveredToken.
13509        This token contains the bounds of the hovered token as well as its expression, type,
13510        start and end characters information.
13511
13512        Reviewed by Timothy Hatcher.
13513
13514        * UserInterface/SourceCodeTextEditor.css:
13515        (.popover .debugger-popover-content):
13516        (.popover .expandable):
13517        (.popover .debugger-popover-content .title):
13518        (.popover .debugger-popover-content .body):
13519        (.popover .debugger-popover-content.function .body):
13520        * UserInterface/SourceCodeTextEditor.js:
13521        (WebInspector.SourceCodeTextEditor):
13522        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
13523        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled):
13524        (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
13525        (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
13526        (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
13527        (WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
13528        (WebInspector.SourceCodeTextEditor.prototype._showPopover):
13529        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
13530        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
13531        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
13532        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForString):
13533        (WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber):
13534        (WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
13535        * UserInterface/TextEditor.css:
13536        (.text-editor > .CodeMirror .hovered-token-highlight):
13537        (@-webkit-keyframes text-editor-hovered-token-highlight-fadeout):
13538        * UserInterface/TextEditor.js:
13539        (WebInspector.TextEditor):
13540        (WebInspector.TextEditor.prototype.startTrackingTokenHovering):
13541        (WebInspector.TextEditor.prototype.stopTrackingTokenHovering):
13542        (WebInspector.TextEditor.prototype.handleEvent):
13543        (WebInspector.TextEditor.prototype.highlightHoveredToken):
13544        (WebInspector.TextEditor.prototype.removeHighlightOnHoveredToken):
13545        (WebInspector.TextEditor.prototype.tokenWasHovered):
13546        (WebInspector.TextEditor.prototype._openClickedLinks):
13547        (WebInspector.TextEditor.prototype._mouseMovedOverEditor):
13548        (WebInspector.TextEditor.prototype._mouseMovedOutOfEditor):
13549        (WebInspector.TextEditor.prototype._checkHoveredToken):
13550
135512013-01-22  Antoine Quint  <graouts@apple.com>
13552
13553        <rdar://problem/13059425> Console filters should persist across sessions
13554
13555        Make ScopeBarItem save their selected state in a WebInspector.Setting that
13556        we read from to set the initial state. This change requires consumers of the
13557        ScopeBar class to ensure they don't just rely on selection change events
13558        but also run an initial update to match selected ScopeBarItems upon creation,
13559        so we update LogContentView to do this.
13560
13561        Reviewed by Timothy Hatcher.
13562
13563        * UserInterface/LogContentView.js:
13564        (WebInspector.LogContentView):
13565        (WebInspector.LogContentView.prototype._scopeBarSelectionDidChange):
13566        * UserInterface/ScopeBar.js:
13567        (WebInspector.ScopeBar):
13568        (WebInspector.ScopeBar.prototype.get selectedItems):
13569        (WebInspector.ScopeBar.prototype._populate):
13570        (WebInspector.ScopeBar.prototype._itemSelectionDidChange):
13571        * UserInterface/ScopeBarItem.js:
13572        (WebInspector.ScopeBarItem):
13573        (WebInspector.ScopeBarItem.prototype.get selected):
13574        (WebInspector.ScopeBarItem.prototype.setSelected):
13575        (WebInspector.ScopeBarItem.prototype._markElementSelected):
13576
135772013-01-22  Antoine Quint  <graouts@apple.com>
13578
13579        <rdar://problem/11651957> REGRESSION (Safari 6): Does not show var value on hover in the debugger
13580
13581        Display a popover for any variable or function definition in the text editor
13582        hovered long enough (500ms) during a debugging session. The popover contains
13583        the expression as evaluated by the DebuggerAgent. Each value type has a specialized
13584        display as borrowed from OpenSource code (from ObjectPopoverHelper) and adapted to fit
13585        our coding style.
13586
13587        We do a fair bit of nifty work to avoid unwanted actions. For instance, we track mouseout
13588        events to identify when the user mouses out of the editor so that we can reset the hover
13589        state and avoid having whatever was the last hovered token show a popover even though we
13590        may have exited the editor along the way. Additionally, we track the pressed state of the
13591        mouse button to avoid having the popover show during a selection.
13592
13593        We're also making various enhancements to the Popover class to support the attachment of
13594        popovers to tokens in the TextEditor as the debugger is paused. Here are the highlights:
13595
13596        - adopt UIKit-like terminology for present/dismiss methods.
13597        - let consumers of the Popover API provide bounds instead of an element as a reference to
13598        which the popover should be attached, removing the dependency on having an element to work with.
13599        - make the popover's element private since it really needs not to be customised as presentation
13600        is fully managed by the popover itself, however allow a `content` element to be provided to
13601        the .present() method and letting the popover host it as needed.
13602        - no longer remove the popover on window blur as OpenSource leaves it on display and it makes
13603        debugging of the popover difficult.
13604        - handle padding of the popover frame in code for computations of the tighter bounding box
13605        as we can't have it done in CSS until we already know what edge we end up using for the popover.
13606        - begin to offer a delegation protocol for popovers, right now willDismiss / didDismiss.
13607        - horizontal and vertically align content that is smaller than the minimal bounds of the popover.
13608
13609        Reviewed by Joseph Pecoraro and Timothy Hatcher.
13610
13611        * UserInterface/Main.html:
13612        * UserInterface/Popover.css:
13613        (.popover):
13614        (.popover > .container):
13615        (.popover > .container.center):
13616        (.popover.arrow-up > .container):
13617        (.popover.arrow-right > .container):
13618        (.popover.arrow-down > .container):
13619        (.popover.arrow-left > .container):
13620        * UserInterface/Popover.js:
13621        (WebInspector.Popover):
13622        (WebInspector.Popover.prototype.set frame):
13623        (WebInspector.Popover.prototype.present):
13624        (WebInspector.Popover.prototype.dismiss):
13625        (WebInspector.Popover.prototype.handleEvent):
13626        (WebInspector.Popover.prototype._cssClassNameForEdge):
13627        (WebInspector.Popover.prototype._bestFrameForEdge):
13628        * UserInterface/TextEditor.css:
13629        (.text-editor > .CodeMirror .popover-highlight):
13630        (@-webkit-keyframes text-editor-popover-highlight-fadeout):
13631        (to):
13632        (.popover .debugger-popover-content):
13633        (.popover .expandable):
13634        (.popover .debugger-popover-content .title):
13635        (.popover .debugger-popover-content .body):
13636        (.popover .debugger-popover-content.function .body):
13637        * UserInterface/TextEditor.js:
13638        (WebInspector.TextEditor):
13639        (WebInspector.TextEditor.prototype._openClickedLinks):
13640        (WebInspector.TextEditor.prototype._debuggerDidPause):
13641        (WebInspector.TextEditor.prototype._debuggerDidResume):
13642        (WebInspector.TextEditor.prototype._debuggerActiveCallFrameDidChange):
13643        (WebInspector.TextEditor.prototype.handleEvent):
13644        (WebInspector.TextEditor.prototype._mouseMovedOverEditor):
13645        (WebInspector.TextEditor.prototype._mouseMovedOutOfEditor):
13646        (WebInspector.TextEditor.prototype._mouseButtonWasPressedOverEditor):
13647        (WebInspector.TextEditor.prototype._mouseButtonWasReleasedOverEditor):
13648        (WebInspector.TextEditor.prototype._windowLostFocus):
13649        (WebInspector.TextEditor.prototype._tokenWasHovered):
13650        (WebInspector.TextEditor.prototype._populateCallback):
13651        (WebInspector.TextEditor.prototype._showPopover):
13652        (WebInspector.TextEditor.prototype._showPopoverForFunction.didGetDetails):
13653        (WebInspector.TextEditor.prototype._showPopoverForFunction):
13654        (WebInspector.TextEditor.prototype._showPopoverForObject):
13655        (WebInspector.TextEditor.prototype._showPopoverForString):
13656        (WebInspector.TextEditor.prototype._showPopoverForNumber):
13657        (WebInspector.TextEditor.prototype.willDismissPopover):
13658
136592013-01-22  Antoine Quint  <graouts@apple.com>
13660
13661        <rdar://problem/12243633> REGRESSION (Safari 6): Console missing type filters
13662
13663        Adding a new ScopeBar subclass of NavigationItem to allow the display of scope
13664        options in a navigation bar. Use this new class in LogContentView to display
13665        All / Errors / Warnings / Logs options in the right part of the view's navigation bar.
13666
13667        Reviewed by Joseph Pecoraro.
13668
13669        * Localizations/en.lproj/localizedStrings.js:
13670        * UserInterface/ContentBrowser.js:
13671        (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
13672        * UserInterface/LogContentView.css:
13673        (.console-messages.supress-logs .console-log-level):
13674        * UserInterface/LogContentView.js:
13675        (WebInspector.LogContentView):
13676        (WebInspector.LogContentView.prototype.get navigationItems):
13677        (WebInspector.LogContentView.prototype._clearLog):
13678        (WebInspector.LogContentView.prototype._scopeBarSelectionDidChange.toggle):
13679        (WebInspector.LogContentView.prototype._scopeBarSelectionDidChange):
13680        * UserInterface/Main.html:
13681        * UserInterface/ScopeBar.css: Added.
13682        (.scope-bar):
13683        (.scope-bar > li):
13684        (.scope-bar > li:active):
13685        (.scope-bar > li:hover):
13686        (.scope-bar > li.selected):
13687        * UserInterface/ScopeBar.js: Added.
13688        (WebInspector.ScopeBar):
13689        (WebInspector.ScopeBar.prototype.item):
13690        (WebInspector.ScopeBar.prototype._populate):
13691        (WebInspector.ScopeBar.prototype._itemSelectionDidChange):
13692        * UserInterface/ScopeBarItem.js: Added.
13693        (WebInspector.ScopeBarItem):
13694        (WebInspector.ScopeBarItem.prototype.get element):
13695        (WebInspector.ScopeBarItem.prototype.get selected):
13696        (WebInspector.ScopeBarItem.prototype.set selected):
13697        (WebInspector.ScopeBarItem.prototype.setSelected):
13698        (WebInspector.ScopeBarItem.prototype._clicked):
13699
137002013-01-17  Antoine Quint  <graouts@apple.com>
13701
13702        <rdar://problem/13006824> Provide a Popover class
13703
13704        Basic Popover class to allow the display of any HTML content within a popover.
13705
13706        The public API of this class is very simple. Use .showRelativeToElement(element, preferredEdge)
13707        to display the popover pointing to the provided target element with the provided edge as the
13708        preferred edge of the target element towards which the popover's arrow should point to.
13709        The method will check whether it can honour the edge preference based on the available screen
13710        real estate. As it stands, the popover will constrain its display to the entire Web Inspector
13711        window, but it could easily be made to match a more constrained space with a new WebInspector.Rect
13712        parameter or Element reference.
13713
13714        You can then use .close() to dismiss the popover with an animated transition, although the popover
13715        will automatically dismiss itself upon user interaction initiated outside of the popover's bounds
13716        or when the Web Inspector window is no longer focused.
13717
13718        Additionally, the necessary geometry functions for the Popover class is taken from iAd JS and adapted
13719        here to fit with the Web Inspector coding style.
13720
13721        Reviewed by Joseph Pecoraro.
13722
13723        * UserInterface/Geometry.js: Added.
13724        (WebInspector.Point):
13725        (WebInspector.Point.fromEvent):
13726        (WebInspector.Point.fromEventInElement):
13727        (WebInspector.Point.prototype.toString):
13728        (WebInspector.Point.prototype.copy):
13729        (WebInspector.Point.prototype.equals):
13730        (WebInspector.Size):
13731        (WebInspector.Size.prototype.toString):
13732        (WebInspector.Size.prototype.copy):
13733        (WebInspector.Size.prototype.equals):
13734        (WebInspector.Rect):
13735        (WebInspector.Rect.rectFromClientRect):
13736        (WebInspector.Rect.prototype.toString):
13737        (WebInspector.Rect.prototype.copy):
13738        (WebInspector.Rect.prototype.equals):
13739        (WebInspector.Rect.prototype.inset):
13740        (WebInspector.Rect.prototype.minX):
13741        (WebInspector.Rect.prototype.minY):
13742        (WebInspector.Rect.prototype.midX):
13743        (WebInspector.Rect.prototype.midY):
13744        (WebInspector.Rect.prototype.maxX):
13745        (WebInspector.Rect.prototype.maxY):
13746        (WebInspector.Rect.prototype.intersectionWithRect):
13747        (WebInspector.EdgeInsets):
13748        (WebInspector.EdgeInsets.prototype.equals):
13749        (WebInspector.EdgeInsets.prototype.copy):
13750        * UserInterface/Popover.css: Added.
13751        (.popover):
13752        (.popover.arrow-up):
13753        (.popover.arrow-right):
13754        (.popover.arrow-down):
13755        (.popover.arrow-left):
13756        (.popover.fade-out):
13757        * UserInterface/Popover.js: Added.
13758        (WebInspector.Popover):
13759        (WebInspector.Popover.prototype.get element):
13760        (WebInspector.Popover.prototype.get frame):
13761        (WebInspector.Popover.prototype.set frame):
13762        (WebInspector.Popover.prototype.area):
13763        (WebInspector.Popover.prototype.showRelativeToElement):
13764        (WebInspector.Popover.prototype.close):
13765        (WebInspector.Popover.prototype.handleEvent):
13766        (WebInspector.Popover.prototype._drawBackground):
13767        (WebInspector.Popover.prototype._bestFrameForEdge):
13768        (WebInspector.Popover.prototype._drawFrame):
13769
137702013-01-11  Antoine Quint  <graouts@apple.com>
13771
13772        <rdar://problem/10015674> REGRESSION (Safari 5): Option-click on a disclosure triangle does not deep-expand a DOM subtree (66868)
13773
13774        Up to now, the TreeElement.prototype.expandRecursively() method would correctly
13775        expand children recursively based on the provided depth, but would not wait to
13776        perform this task until all child nodes had been populated, which means that this
13777        would only work incrementally with one additional level of child nodes being shown
13778        expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy.
13779        
13780        In order to fix this, we rely on the newly added optional argument to DOMAgent's
13781        requestChildNodes() method to provide the depth at which we want to retrieve children
13782        of a given node (see http://trac.webkit.org/changeset/139429). The DOMAgent provides
13783        a new .getSubtree() method that calls requestChildNodes() with the provided depth.
13784
13785        Then in DOMTreeElement, we subclass .expandRecursively() to first call DOMAgent's
13786        new .getSubtree() method and then call the default implementation when all nodes
13787        have been retrieved from the backend.
13788
13789        Reviewed by Timothy Hatcher.
13790
13791        * UserInterface/DOMNode.js:
13792        (WebInspector.DOMNode.prototype.):
13793        (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what
13794        depth we want to retrieve children of a given node from the backend.
13795        * UserInterface/DOMTreeElement.js:
13796        (WebInspector.DOMTreeElement.prototype.expandRecursively): Override default implementation
13797        to first obtain the deepest subtree for the current node so that deep expansion happens
13798        as expected.
13799        * UserInterface/InspectorBackendCommands.js: Register the new optional `depth` parameter
13800        for DOMAgent's .requestChildNodes().
13801
138022013-01-07  Joseph Pecoraro  <pecoraro@apple.com>
13803
13804        Drive by style fix. Add super constructor call to CSSStyleManager.
13805
13806        Reviewed by Antoine Quint.
13807
13808        * UserInterface/CSSStyleManager.js:
13809        (WebInspector.CSSStyleManager):
13810        No functional difference, but I just noticed a missing call.
13811
138122013-01-07  Joseph Pecoraro  <pecoraro@apple.com>
13813
13814        <rdar://problem/12967231> extract-localizable-js-strings should warn about improper WebInspector.UIString uses
13815
13816        Reviewed by David Kilzer.
13817
13818        * Localizations/en.lproj/localizedStrings.js:
13819        Add missing strings.
13820
13821        * UserInterface/ApplicationCacheFrameContentView.js:
13822        (WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback):
13823        Remove a comment containing a UIString call. This is not needed for Safari.
13824
13825        * UserInterface/DatabaseContentView.js:
13826        (WebInspector.DatabaseContentView.prototype._queryError):
13827        Use WebInspector.UIString("...").format syntax so the string is not missed.
13828
138292013-01-07  Joseph Pecoraro  <pecoraro@apple.com>
13830
13831        <rdar://problem/12964366> LayerTreeSidebarPanel._buildLayerInfoSection is too clever for update-safari-localizable-string / extract-localizable-js-strings
13832
13833        Reviewed by David Kilzer.
13834
13835        * Localizations/en.lproj/localizedStrings.js:
13836        * UserInterface/LayerTreeSidebarPanel.js:
13837        (WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
13838        (WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
13839        Ensure all WebInspector.UIString uses contain a string literal, which
13840        is what extract-localizable-js-strings expects.
13841
138422013-01-04  Joseph Pecoraro  <pecoraro@apple.com>
13843
13844        <rdar://problem/12961674> Resizing QuickConsole drawer may need to refresh CodeMirror editor for new visible size
13845
13846        The CodeMirror TextEditor only has DOM elements for visible lines, with
13847        some buffer. It needs to be updated when the visible (scroll dimensions)
13848        of its content area are updated. The content view's dimensions flex with
13849        the size of the QuickConsole. So, when the QuickConsole resizes we
13850        should update the layout of the content browser.
13851
13852        Reviewed by Antoine Quint.
13853
13854        * UserInterface/Main.js:
13855        (WebInspector.contentLoaded):
13856        (WebInspector._quickConsoleDidResize):
13857        Observe when the quick console resizes and update the layout of the content browser.
13858
13859        * UserInterface/QuickConsole.js:
13860        (WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider):
13861        (WebInspector.QuickConsole.prototype._isResizing):
13862        Whenever we resize we go through this method. Dispatch the resize event.
13863        We may take the early path if we are resizing manually, in that case the
13864        new height would have been set in the mouse handler.
13865
13866        * UserInterface/ScriptContentView.js:
13867        (WebInspector.ScriptContentView.prototype.updateLayout):
13868        * UserInterface/TextResourceContentView.js:
13869        (WebInspector.TextResourceContentView.prototype.updateLayout):
13870        In content views containing text editors be sure to pass update layout
13871        on to the text editor to refresh the CodeMirror editor.
13872
138732013-01-04  Joseph Pecoraro  <pecoraro@apple.com>
13874
13875        <rdar://problem/12961455> "No Style Properties" text in styles HTML Attributes sidebar should not be monospace
13876
13877        Adjust the styles for the sidebar so that things look a bit nicer.
13878
13879        Reviewed by Antoine Quint.
13880
13881        * UserInterface/CSSStyleDetailsSidebarPanel.css:
13882        (.sidebar > .panel.details.css-style .styles-section):
13883        Make the minimum size 17px. This makes the HTML attributes section not
13884        look like there is extra padding at the bottom. This also reduces the
13885        height of empty sections a bit, saving vertical space.
13886
13887        * UserInterface/DetailsSection.css:
13888        (.details-section > .content > .group > .row.empty.syntax-highlighted):
13889        The HTML Attributes section is .syntax-highlighted. Ignore the fonts it
13890        sets and revert back to the normal details section font.
13891
13892        (.details-section > .content > .group > .row.properties:not(.empty)):
13893        Remove extra padding on properties sections when its the empty message.
13894
138952013-01-04  Joseph Pecoraro  <pecoraro@apple.com>
13896
13897        Skip document nodes when searching.
13898
13899        Reviewed by Antoine Quint.
13900
13901        * UserInterface/ResourceSidebarPanel.js:
13902        (WebInspector.ResourceSidebarPanel.prototype.performSearch.domSearchResults):
13903        (WebInspector.ResourceSidebarPanel.prototype.performSearch.domCallback):
13904        (WebInspector.ResourceSidebarPanel.prototype.performSearch):
13905
139062013-01-04  Joseph Pecoraro  <pecoraro@apple.com>
13907
13908        <rdar://problem/12956057> REGRESSION: Cannot develop nodes in the DOM tree inspector for dynamically-generated content (106080)
13909
13910        Handle a null ownerDocument to avoid an error. This worked previously
13911        because each backend message was dispatched individually via setInterval.
13912        Now however, they are batched after a setTimeout so an earlier uncaught
13913        exception can break / prevent handling of other messages in that batch.
13914
13915        Reviewed by Ricky Mondello.
13916
13917        * UserInterface/DOMTreeElement.js:
13918        (WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
13919
139202013-01-04  Joseph Pecoraro  <pecoraro@apple.com>
13921
13922        <rdar://problem/12959910> Uncaught Error in LayerTreeSidebar breaks all right sidebars
13923
13924        In SidebarPanel.prototype.hidden the parentSidebar might be null. In
13925        those cases, LayerTreeSidebarPanel could cause an error that would
13926        make changing the right sidebar impossible.
13927
13928        The error was happening if the sidebar panel was removed instead of
13929        being hidden. Removed meaning the content view changes and the sidebar
13930        panel is no longer relevant. Hidden meaning the user just switched
13931        to a different sidebar panel.
13932
13933        The fix checks if parentSidebar exists when the panel is being hidden,
13934        but we also make sure to remove our event listener if the parentSidebar
13935        is being cleared with a new willRemove method.
13936
13937        Reviewed by Antoine Quint.
13938
13939        * UserInterface/Sidebar.js:
13940        (WebInspector.Sidebar.prototype.removeSidebarPanel):
13941        * UserInterface/SidebarPanel.js:
13942        (WebInspector.SidebarPanel.prototype.willRemove):
13943        Give the sidebar panel an opportunity to handle the parentSidebar being cleared.
13944
13945        * UserInterface/LayerTreeSidebarPanel.js:
13946        (WebInspector.LayerTreeSidebarPanel.prototype.shown):
13947        Assert that there is a parent sidebar when we are shown.
13948
13949        (WebInspector.LayerTreeSidebarPanel.prototype.hidden):
13950        If there is a parent sidebar and we are hidden, the user is just switching
13951        sidebars, and we can remove the listener.
13952
13953        (WebInspector.LayerTreeSidebarPanel.prototype.willRemove):
13954        If the parent sidebar is being cleared remove our listener, if it existed.
13955
139562013-01-05  Dan Bernstein  <mitz@apple.com>
13957
13958        Updated localizable strings.
13959
13960        * Localizations/en.lproj/localizedStrings.js: Let update-safari-localizable-string
13961        remove one entry and one empty line.
13962
139632012-12-20  Antoine Quint  <graouts@apple.com>
13964
13965        Add missing localizedString that I forgot in the previous patch for
13966        <rdar://problem/12908978> Layer Tree: resize data grid upon width change.
13967
13968        * Localizations/en.lproj/localizedStrings.js:
13969
139702012-12-19  Antoine Quint  <graouts@apple.com>
13971
13972        <rdar://problem/12908978> Layer Tree: resize data grid upon width change
13973
13974        Listen to width change events on the parent sidebar as the layer tree panel
13975        is shown, and do the opposite operation when it's hidden. Upon a width change,
13976        call .autoSizeColumns() on the data grid so that the separators are correctly
13977        positioned.
13978
13979        In this patch we also change the string used to show the paint count from
13980        "Paint Count" to "Paints" which makes the data grid look much better.
13981
13982        Reviewed by Joseph Pecoraro.
13983
13984        * Localizations/en.lproj/localizedStrings.js:
13985        * UserInterface/LayerTreeSidebarPanel.js:
13986        (WebInspector.LayerTreeSidebarPanel.prototype.shown):
13987        (WebInspector.LayerTreeSidebarPanel.prototype.hidden):
13988        (WebInspector.LayerTreeSidebarPanel.prototype._widthDidChange):
13989        (WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
13990        (WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
13991        (WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
13992
139932012-12-19  Antoine Quint  <graouts@apple.com>
13994
13995        <rdar://problem/12646424> Show redraw counts in layer tree inspector
13996
13997        Simply add a new "Paint Count" field in the layer info and data grid to display
13998        the contents of the .paintCount property provided by the back-end, which had already
13999        landed in WebCore with <rdar://problem/12882763>.
14000
14001        Reviewed by Joseph Pecoraro.
14002
14003        * Localizations/en.lproj/localizedStrings.js:
14004        * UserInterface/LayerTreeDataGridNode.js:
14005        (WebInspector.LayerTreeDataGridNode.prototype.set layer):
14006        * UserInterface/LayerTreeSidebarPanel.js:
14007        (WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
14008        (WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
14009        (WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
14010
140112012-12-19  Antoine Quint  <graouts@apple.com>
14012
14013        <rdar://problem/12031104> Show which elements are layer-backed
14014
14015        This is the front-end part of the work started on the backend with
14016        https://bugs.webkit.org/show_bug.cgi?id=103513. We now provide a
14017        new details sidebar for the inspected element which lists the characteristics
14018        of its backing RenderLayer (metrics, amount of memory used and whether it is
14019        composited in hardware) and all child RenderLayers, with the option of only
14020        showing layers composited in hardware. At the bottom of the pane, we also have
14021        a status bar indicating the total number of layers for the selected node and
14022        its descendants as well as the total amount of memory used.
14023
14024        The list of child layers allows the developer to select a node to see it
14025        highlighted on the page, and to click an arrow icon to jump to the layer's
14026        associated node in the DOM tree.
14027
14028        Reviewed by Joseph Pecoraro.
14029
14030        * Localizations/en.lproj/localizedStrings.js:
14031        * UserInterface/InspectorBackendCommands.js:
14032        * UserInterface/LayerTreeDataGridNode.js: Added. DataGridNode custom subclass for the type of data grid nodes
14033        we show in the child layers data grid.
14034        (WebInspector.LayerTreeDataGridNode):
14035        (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
14036        (WebInspector.LayerTreeDataGridNode.prototype.set layer):
14037        (WebInspector.LayerTreeDataGridNode.prototype._createNodeCellContent):
14038        (WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
14039        * UserInterface/LayerTreeManager.js: Added.
14040        (WebInspector.LayerTreeManager):
14041        (WebInspector.LayerTreeManager.prototype.get supported):
14042        (WebInspector.LayerTreeManager.prototype.layerTreeMutations): Obtain the complete
14043        list of mutations between two flattened layer trees.
14044        (WebInspector.LayerTreeManager.prototype.refreshLayerTree): Retrieve the current layer
14045        tree from the backend, eventually triggering a layerTreeDidChange event as a result.
14046        (WebInspector.LayerTreeManager.prototype.flattenedLayerTree):
14047        (WebInspector.LayerTreeManager.prototype.):
14048        (WebInspector.LayerTreeManager.prototype.layersForNode): Obtain the layer associated to
14049        the provided node, if any, and a list of child layers, if any.
14050        (WebInspector.LayerTreeManager.prototype.layerTreeDidChange):
14051        (WebInspector.LayerTreeManager.prototype.var):
14052        (WebInspector.LayerTreeManager.prototype._obtainNodeIdsForLayerIds): Obtain the node ids
14053        for the provided layer ids from the backend.
14054        * UserInterface/LayerTreeObserver.js: Added.
14055        (WebInspector.LayerTreeObserver): Listen to "layerTreeDidChange" events triggered by the
14056        LayerTreeAgent exposed by WebCore.
14057        (WebInspector.LayerTreeObserver.prototype.layerTreeDidChange): Inform the layer tree manager
14058        that the layer tree has changed.
14059        * UserInterface/LayerTreeSidebarPanel.css: Added.
14060        * UserInterface/LayerTreeSidebarPanel.js: Added.
14061        (WebInspector.LayerTreeSidebarPanel):
14062        (WebInspector.LayerTreeSidebarPanel.prototype.shown):
14063        (WebInspector.LayerTreeSidebarPanel.prototype.hidden):
14064        (WebInspector.LayerTreeSidebarPanel.prototype.refresh):
14065        (WebInspector.LayerTreeSidebarPanel.prototype.supportsDOMNode): Element nodes only are supported.
14066        (WebInspector.LayerTreeSidebarPanel.prototype._layerTreeDidChange): Event handler for the
14067        "layerTreeDidChange" triggered by the layer tree manager.
14068        (WebInspector.LayerTreeSidebarPanel.prototype._buildCheckbox): Build the checkbox controlling
14069        the option to only show layers composited in hardware.
14070        (WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection): Build the top section
14071        containing information about the inspected node's layer, if any.
14072        (WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection): Build the middle section
14073        containing the data grid showing the list of child layers, if any.
14074        (WebInspector.LayerTreeSidebarPanel.prototype._buildBottomBar): Build the status bar displayed
14075        at the bottom showing the total number of layers for the inspected node and the amount of
14076        memory used.
14077        (WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid.comparator):
14078        (WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid):
14079        (WebInspector.LayerTreeSidebarPanel.prototype._selectedDataGridNodeChanged):
14080        (WebInspector.LayerTreeSidebarPanel.prototype._dataGridGainedFocus):
14081        (WebInspector.LayerTreeSidebarPanel.prototype._dataGridLostFocus):
14082        (WebInspector.LayerTreeSidebarPanel.prototype._dataGridWasClicked):
14083        (WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
14084        (WebInspector.LayerTreeSidebarPanel.prototype._updateDataGridFilter):
14085        (WebInspector.LayerTreeSidebarPanel.prototype._updateDisplayWithLayers): Callback for the call
14086        made to .layersForNode() on the manager, triggers an update of all of the information reported
14087        in the panel.
14088        (WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection): Update only the top section.
14089        (WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid): Update only the data grid.
14090        (WebInspector.LayerTreeSidebarPanel.prototype._dataGridNodeForLayer): Generate a node for the data
14091        grid for the provided layer.
14092        (WebInspector.LayerTreeSidebarPanel.prototype._updateMetrics): Update only the bottom status bar.
14093        * UserInterface/Main.html:
14094        * UserInterface/Main.js:
14095        (WebInspector.contentLoaded):
14096
140972012-12-04  Timothy Hatcher  <timothy@apple.com>
14098
14099        Prevent lines from highlighting again if the user scrolls with a line highlighted.
14100
14101        This switches off of a webkitAnimationEnd event listener because the line element might
14102        be removed if the user scrolls during the animation. In that case webkitAnimationEnd isn't
14103        fired, and the line would highlight again the next time it scrolls into view.
14104
14105        Reviewed by Ricky Mondello.
14106
14107        * UserInterface/TextEditor.js:
14108        (WebInspector.TextEditor.prototype.removeStyleClass): Removed event listener code.
14109        (WebInspector.TextEditor.prototype.revealAndHighlightLine): Schedule a timeout instead
14110        of an event listener.
14111
141122012-12-04  Timothy Hatcher  <timothy@apple.com>
14113
14114        Delay revealing a line until visible and the line exists.
14115
14116        This regressed when we switched to CodeMirror.
14117
14118        Reviewed by Joseph Pecoraro.
14119
14120        * UserInterface/TextEditor.js:
14121        (WebInspector.TextEditor.prototype.set string.update): Call _revealPendingLineIfPossible.
14122        (WebInspector.TextEditor.prototype.shown.update): Call _revealPendingLineIfPossible.
14123        (WebInspector.TextEditor.prototype._revealPendingLineIfPossible): Store the line number
14124        and requested range until visible and the line exists.
14125
141262012-12-03  Dean Jackson  <dino@apple.com>
14127
14128        Followup on <rdar://problem/11492568> Show shadow DOM elements
14129
14130        Reviewed by Joseph Pecoraro.
14131
14132        * Localizations/en.lproj/localizedStrings.js: New string for "Shadow Content".
14133        * UserInterface/DOMNode.js:
14134        (WebInspector.DOMNode): Only create the _shadowRoots if necessary.
14135        (WebInspector.DOMNode.prototype.hasChildNodes): Test for existence of _shadowRoots.
14136        (WebInspector.DOMNode.prototype.hasShadowRoots): Ditto.
14137        (WebInspector.DOMNode.prototype._insertChild): Ditto.
14138        (WebInspector.DOMNode.prototype._setChildrenPayload): Ditto.
14139        * UserInterface/DOMNodeDetailsSidebarPanel.js:
14140        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._nodeTypeDisplayName): Handle Document Fragment in switch.
14141        * UserInterface/DOMTreeElement.js: Use new UIString.
14142        * UserInterface/DOMTreeElementPathComponent.js: Handle Document Fragment in switch.
14143        (WebInspector.DOMTreeElementPathComponent):
14144
141452012-12-03  Dean Jackson  <dino@apple.com>
14146
14147        Allow inspection of Shadow DOM elements in Web Inspector
14148        <rdar://problem/11492568> Show shadow DOM elements
14149
14150        Reviewed by Tim Hatcher.
14151
14152        Add the Shadow DOM fragments to the DOM tree view. This allows
14153        us to inspect things like HTML5 Media captions and controls.
14154        Expose the setting via a checkbox in the context menu on the DOM
14155        tree view (which requires a reload if changed). Luckily the
14156        inspector protocol already provided all the Shadow DOM data so
14157        this was purely a UI change.
14158
14159        * Localizations/en.lproj/localizedStrings.js: New menu item.
14160        * UserInterface/DOMNode.js:
14161        (WebInspector.DOMNode): New parameter to constructor: "isInShadowTree".
14162        (WebInspector.DOMNode.prototype.hasChildNodes): Check for shadow children too.
14163        (WebInspector.DOMNode.prototype.hasShadowRoots): New method.
14164        (WebInspector.DOMNode.prototype.isInShadowTree): New method.
14165        (WebInspector.DOMNode.prototype._insertChild): Inherit the shadow state as constructing children.
14166        (WebInspector.DOMNode.prototype._setChildrenPayload): Ditto.
14167        * UserInterface/DOMObserver.js:
14168        (WebInspector.DOMObserver.prototype.shadowRootPushed): Answer the protocol calls.
14169        (WebInspector.DOMObserver.prototype.shadowRootPopped): Ditto.
14170        * UserInterface/DOMTreeElement.js:
14171        (WebInspector.DOMTreeElement.prototype._buildTagDOM): Document Fragments get a special style if they are shadow root elements.
14172        (WebInspector.DOMTreeElement.prototype._singleTextChild): Return early if in shadow DOM.
14173        * UserInterface/DOMTreeManager.js:
14174        (WebInspector.DOMTreeManager.prototype._setDocument): Use new parameter when constructing DOMNode.
14175        (WebInspector.DOMTreeManager.prototype._setDetachedRoot): Ditto.
14176        * UserInterface/DOMTreeOutline.js:
14177        (WebInspector.DOMTreeOutline):
14178        (WebInspector.DOMTreeOutline.prototype.populateContextMenu): Add a new checkbox to toggle the Shadow DOM visibility.
14179        (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
14180        (WebInspector.DOMTreeOutline.prototype._toggleShowShadowDOM):
14181        * UserInterface/LogContentView.css:
14182        (.webkit-html-fragment.shadow): New style for shadow root fragments.
14183
141842012-12-02  Timothy Hatcher  <timothy@apple.com>
14185
14186        Linkify "src" and "href" attributes in HTML/SVG/XML resources.
14187
14188        This extends the XML tokenizer to change the style of the string following
14189        "src" and "href" attributes into links.
14190
14191        Reviewed by Joseph Pecoraro.
14192
14193        * UserInterface/CodeMirrorAdditions.js:
14194        (tokenizeLinkString): Added.
14195        (tokenizeEndOfLinkString): Added.
14196        (extendedXMLToken): Added.
14197        * UserInterface/SyntaxHighlightingDefaultTheme.css:
14198        (.cm-s-default .cm-link): Added.
14199        (.cm-s-default .cm-link:hover): Added.
14200        * UserInterface/TextEditor.js:
14201        (WebInspector.TextEditor): Added click event listener for _openClickedLinks.
14202        (WebInspector.TextEditor.prototype._openClickedLinks): Added.
14203
142042012-11-30  Timothy Hatcher  <timothy@apple.com>
14205
14206        Use CodeMirror to syntax highlight strings used for the DOM tree.
14207
14208        Reviewed by Joseph Pecoraro.
14209
14210        * UserInterface/SyntaxHighlightingSupport.js:
14211        (WebInspector.syntaxHighlightStringAsDocumentFragment): Use CodeMirror.runMode.
14212        (WebInspector.syntaxHighlightStringAsDocumentFragment.appendText): Added. Create nodes based on the style.
14213
142142012-11-30  Timothy Hatcher  <timothy@apple.com>
14215
14216        Use WebInspector.CSSKeywordCompletions instead of WebInspector.SourceTokenizer to decide what
14217        is a keyword in the Style details sidebar.
14218
14219        Reviewed by Jon Honeycutt.
14220
14221        * UserInterface/StylePropertyTreeElement.js:
14222        (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Get the keywords.
14223        (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processKeyword): Use the keywords
14224        for the current property.
14225
142262012-11-30  Timothy Hatcher  <timothy@apple.com>
14227
14228        Hook up issues using CodeMirror.
14229
14230        Reviewed by Joseph Pecoraro.
14231
14232        * UserInterface/SourceCodeTextEditor.css:
14233        (.source-code.text-editor > .CodeMirror .error): Renamed.
14234        (.source-code.text-editor > .CodeMirror .warning): Renamed.
14235        * UserInterface/SourceCodeTextEditor.js:
14236        (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Moved issue population from here.
14237        (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate): ... to here.
14238        (WebInspector.SourceCodeTextEditor.prototype._issueWasAdded): Call _addIssue.
14239        (WebInspector.SourceCodeTextEditor.prototype._addIssue): Renamed from _addIssueToLine. Use
14240        addStyleClassToLine to add the styles.
14241        (WebInspector.SourceCodeTextEditor.prototype._addIssueToLineNumberMap): Merged with _addIssue.
14242        * UserInterface/TextEditor.js:
14243        (WebInspector.TextEditor.prototype.addStyleClassToLine): Added.
14244        (WebInspector.TextEditor.prototype.removeStyleClassFromLine): Added.
14245        (WebInspector.TextEditor.prototype.toggleStyleClassForLine): Added.
14246
142472012-11-30  Timothy Hatcher  <timothy@apple.com>
14248
14249        Hook up breakpoints using CodeMirror.
14250
14251        Reviewed by Joseph Pecoraro.
14252
14253        * UserInterface/CodeMirrorAdditions.js: Added hasLineClass and toggleLineClass extensions.
14254        * UserInterface/SourceCodeTextEditor.js:
14255        (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Call setBreakpointInfoForLine
14256        for each breakpoint.
14257        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointInfo): Removed.
14258        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved): Removed delete here
14259        since calling removeBreakpoint will fire an event that causes us to delete the breakpoint.
14260        Deleting early was causing an assert in the event handler.
14261        * UserInterface/TextEditor.css:
14262        (.text-editor > .CodeMirror .has-breakpoint:not(.breakpoint-disabled) .CodeMirror-linenumber): Added.
14263        (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before): Added.
14264        (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before): Added.
14265        (.text-editor > .CodeMirror .breakpoint-disabled .CodeMirror-linenumber::before): Added.
14266        (.text-editor > .CodeMirror .execution-line .CodeMirror-linenumber::after): Added.
14267        (.text-editor > .CodeMirror .execution-line pre): Added.
14268        * UserInterface/TextEditor.js:
14269        (WebInspector.TextEditor): Added "gutterClick" event listener.
14270        (WebInspector.TextEditor.prototype.set string):
14271        (WebInspector.TextEditor.prototype.set string.updateStyles): Update the execution line and breakpoints
14272        now that we might have content for that line.
14273        (WebInspector.TextEditor.prototype.get executionLineNumber):
14274        (WebInspector.TextEditor.prototype.set executionLineNumber):
14275        (WebInspector.TextEditor.prototype.setBreakpointInfoForLine):
14276        (WebInspector.TextEditor.prototype._updateExecutionLine): Added.
14277        (WebInspector.TextEditor.prototype._addBreakpointToLineWithInfo): Added.
14278        (WebInspector.TextEditor.prototype._setBreakpointStylesOnLineWithInfo): Added.
14279        (WebInspector.TextEditor.prototype._removeBreakpointFromLine.updateStyles): Added.
14280        (WebInspector.TextEditor.prototype._removeBreakpointFromLine): Added.
14281        (WebInspector.TextEditor.prototype._gutterMouseDown): Added.
14282        (WebInspector.TextEditor.prototype._documentMouseMoved): Added.
14283        (WebInspector.TextEditor.prototype._documentMouseUp): Added.
14284
142852012-11-30  Timothy Hatcher  <timothy@apple.com>
14286
14287        Hook up search using CodeMirror.
14288
14289        Reviewed by Joseph Pecoraro.
14290
14291        * UserInterface/SourceCodeTextEditor.js:
14292        (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch): Move off of textContent and AttributedString.
14293        Use addSearchResults instead of the individual addSearchResultRange.
14294        * UserInterface/TextEditor.css:
14295        (.text-editor .bouncy-highlight): Added.
14296        (@-webkit-keyframes text-editor-bouncy): Added.
14297        * UserInterface/TextEditor.js:
14298        (WebInspector.TextEditor.prototype.performSearch): Create a search cursor.
14299        (WebInspector.TextEditor.prototype.performSearch.batchSearch): Use the search cursor to find matches in
14300        the slow path. Stop using _textContent.
14301        (WebInspector.TextEditor.prototype.addSearchResults): Renamed from addSearchResultRange.
14302        (WebInspector.TextEditor.prototype.addSearchResults.markRanges): Added. Mark the ranges in a CodeMirror
14303        operation to get better performance.
14304        (WebInspector.TextEditor.prototype.searchCleared): Clear the marked text ranges.
14305        (WebInspector.TextEditor.prototype.revealPreviousSearchResult): Call _revealSearchResult.
14306        (WebInspector.TextEditor.prototype.revealNextSearchResult): Ditto.
14307        (WebInspector.TextEditor.prototype.line): Added.
14308        (WebInspector.TextEditor.prototype._revealSearchResult): Added.
14309        (WebInspector.TextEditor.prototype._revealSearchResult.animationEnded): Added.
14310
143112012-11-30  Timothy Hatcher  <timothy@apple.com>
14312
14313        Hook up the basics of CodeMirror in TextEditor.
14314
14315        Reviewed by Joseph Pecoraro.
14316
14317        * UserInterface/SourceCodeTextEditor.js:
14318        (WebInspector.SourceCodeTextEditor.prototype.textEditorLineContentUpdated): Removed.
14319        * UserInterface/SyntaxHighlightingDefaultTheme.css: Added CodeMirror selectors.
14320        * UserInterface/TextEditor.css:
14321        (.text-editor > .CodeMirror): Added. Reset box-sizing to content-box.
14322        (.text-editor > .CodeMirror *): Added. Ditto.
14323        (.text-editor > .CodeMirror .CodeMirror-lines): Added.
14324        (.text-editor > .CodeMirror pre): Added.
14325        (.text-editor > .CodeMirror .CodeMirror-selected): Added.
14326        (.text-editor > .CodeMirror .CodeMirror-focused .CodeMirror-selected): Added.
14327        (.text-editor > .CodeMirror textarea): Added. Prevent pointer events to make right
14328        click Inspect Element hit the line instead of the input area.
14329        (.text-editor > .CodeMirror .CodeMirror-gutters): Added.
14330        (.text-editor > .CodeMirror .CodeMirror-linenumber): Added.
14331        (.text-editor > .CodeMirror .highlighted): Added.
14332        (@-webkit-keyframes text-editor-highlight-fadeout):
14333        * UserInterface/TextEditor.js:
14334        (WebInspector.TextEditor):
14335        (WebInspector.TextEditor.prototype.get string):
14336        (WebInspector.TextEditor.prototype.set string):
14337        (WebInspector.TextEditor.prototype.get selectedTextRange):
14338        (WebInspector.TextEditor.prototype.set selectedTextRange):
14339        (WebInspector.TextEditor.prototype.get mimeType):
14340        (WebInspector.TextEditor.prototype.set mimeType):
14341        (WebInspector.TextEditor.prototype.revealLine): Set the cursor position and highlight the line.
14342        (WebInspector.TextEditor.prototype.updateLayout): Call refresh to let CodeMirror know we might have changed size.
14343        (WebInspector.TextEditor.prototype.shown): Ditto.
14344        (WebInspector.TextEditor.prototype._textRangeFromCodeMirrorPosition): Added.
14345        (WebInspector.TextEditor.prototype._codeMirrorPositionFromTextRange): Added.
14346
143472012-11-30  Timothy Hatcher  <timothy@apple.com>
14348
14349        Remove TextEditor implementation and supporting classes for syntax highlighting.
14350
14351        Rubber-stamped by Jon Honeycutt.
14352
14353        * UserInterface/AttributedString.js: Removed.
14354        * UserInterface/CSSSourceTokenizer.js: Removed.
14355        * UserInterface/HTMLSourceTokenizer.js: Removed.
14356        * UserInterface/JavaScriptSourceTokenizer.js: Removed.
14357        * UserInterface/Main.html: Removed deleted files.
14358        * UserInterface/ScriptContentView.js:
14359        * UserInterface/SourceTokenizer.js: Removed.
14360        * UserInterface/SyntaxHighlighter.js: Removed.
14361        * UserInterface/SyntaxHighlightingSupport.js:
14362        (WebInspector.syntaxHighlightStringAsDocumentFragment): Cleared.
14363        * UserInterface/TextContent.js: Removed.
14364        * UserInterface/TextEditor.css: Removed most rules.
14365        * UserInterface/TextEditor.js:
14366        (WebInspector.TextEditor): Cleared.
14367        (WebInspector.TextEditor.prototype.get string): Cleared.
14368        (WebInspector.TextEditor.prototype.set string): Cleared.
14369        (WebInspector.TextEditor.prototype.get selectedTextRange): Cleared.
14370        (WebInspector.TextEditor.prototype.set selectedTextRange): Cleared.
14371        (WebInspector.TextEditor.prototype.get mimeType): Cleared.
14372        (WebInspector.TextEditor.prototype.set mimeType): Cleared.
14373        (WebInspector.TextEditor.prototype.get executionLineNumber): Cleared.
14374        (WebInspector.TextEditor.prototype.set executionLineNumber): Cleared.
14375        (WebInspector.TextEditor.prototype.performSearch.batchSearch): Cleared.
14376        (WebInspector.TextEditor.prototype.performSearch): Cleared.
14377        (WebInspector.TextEditor.prototype.addSearchResultRange): Cleared.
14378        (WebInspector.TextEditor.prototype.searchCleared): Cleared.
14379        (WebInspector.TextEditor.prototype.revealPreviousSearchResult): Cleared.
14380        (WebInspector.TextEditor.prototype.revealNextSearchResult): Cleared.
14381        (WebInspector.TextEditor.prototype.revealLine): Cleared.
14382        (WebInspector.TextEditor.prototype.updateLayout): Cleared.
14383        (WebInspector.TextEditor.prototype.shown): Cleared.
14384        (WebInspector.TextEditor.prototype.hidden): Cleared.
14385        (WebInspector.TextEditor.prototype.setBreakpointInfoForLine): Cleared.
14386        * UserInterface/TextResourceContentView.js:
14387        (WebInspector.TextResourceContentView.prototype.get scrollableElements): Removed.
14388
143892012-11-30  Timothy Hatcher  <timothy@apple.com>
14390
14391        Extend CodeMirror to allow syntax highlighting styles based on the mode.
14392
14393        By default CodeMirror defines syntax highlighting styles based on token
14394        only and shared styles between modes. This limiting and does not match
14395        what we have done in the Web Inspector. So this modifies the XML, CSS
14396        and JavaScript modes to supply two styles for each token. One for the
14397        token and one with the mode name.
14398
14399        Reviewed by Joseph Pecoraro.
14400
14401        * UserInterface/CodeMirrorAdditions.js: Added.
14402        * UserInterface/Main.html: Included CodeMirrorAdditions.js.
14403
144042012-11-30  Timothy Hatcher  <timothy@apple.com>
14405
14406        Define extra MIME-types for CodeMirror's syntax highlighting modes.
14407
14408        Reviewed by Jon Honeycutt.
14409
14410        * UserInterface/Main.js:
14411        (WebInspector.contentLoaded): Define extra MIME-types for XML, HTML, SVG,
14412        JSON and JavaScript.
14413
144142012-11-30  Timothy Hatcher  <timothy@apple.com>
14415
14416        Update CodeMirror from 3.0 beta 2 to 3.0 release candidate 2.
14417
14418        Rubber-stamped by Jon Honeycutt.
14419
14420        * UserInterface/External/CodeMirror/codemirror.css: Updated.
14421        * UserInterface/External/CodeMirror/codemirror.js: Updated.
14422        * UserInterface/External/CodeMirror/htmlmixed.js: Updated.
14423        * UserInterface/External/CodeMirror/javascript.js: Updated.
14424        * UserInterface/External/CodeMirror/matchbrackets.js: Updated.
14425        * UserInterface/External/CodeMirror/xml.js: Updated.
14426
144272012-11-22  Timothy Hatcher  <timothy@apple.com>
14428
14429        Fix a perl script error that was preventing resources from being
14430        copied on production builds.
14431
14432        Perl thought the [\t ] that followed $tagExpression meant that
14433        tagExpression should be @tagExpression.
14434
14435        * Scripts/combine-resources.pl:
14436        (concatinateFiles): Split the replacementExpression string into parts
14437        and concat it to prevent this. Fix a typo too.
14438
144392012-11-18  Timothy Hatcher  <timothy@apple.com>
14440
14441        Include CodeMirror in the Web Inspector.
14442
14443        This also teaches the scripts we use to copy the CodeMirror resources and skip them
14444        when we concatenate our scripts/styles.
14445
14446        Rubber-stamped by Antoine Quint.
14447
14448        * Scripts/combine-resources.pl:
14449        (concatinateFiles): Skip External files. Smartly replace the first concatenated file's tag
14450        so we don't mix the order of style and script loading.
14451        * Scripts/copy-user-interface-resources.sh:
14452        * UserInterface/Main.html: Included CodeMirror files.
14453
144542012-11-18  Timothy Hatcher  <timothy@apple.com>
14455
14456        Add CodeMirror to the Web Inspector.
14457
14458        Open Source Software use approved by Joyce Chow on 11/16/2012.
14459
14460        Part of: <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
14461
14462        Rubber-stamped by Antoine Quint.
14463
14464        * UserInterface/External/CodeMirror/LICENSE: Added.
14465        * UserInterface/External/CodeMirror/codemirror.css: Added.
14466        * UserInterface/External/CodeMirror/codemirror.js: Added.
14467        * UserInterface/External/CodeMirror/css.js: Added.
14468        * UserInterface/External/CodeMirror/htmlmixed.js: Added.
14469        * UserInterface/External/CodeMirror/javascript.js: Added.
14470        * UserInterface/External/CodeMirror/matchbrackets.js: Added.
14471        * UserInterface/External/CodeMirror/overlay.js: Added.
14472        * UserInterface/External/CodeMirror/runmode.js: Added.
14473        * UserInterface/External/CodeMirror/searchcursor.js: Added.
14474        * UserInterface/External/CodeMirror/xml.js: Added.
14475
144762012-11-17  Timothy Hatcher  <timothy@apple.com>
14477
14478        Hide the toolbar labels if there isn't enough room to show them.
14479
14480        Reviewed by Brady Eidson.
14481
14482        * UserInterface/ButtonToolbarItem.css:
14483        (.toolbar.collapsed .item.button > .label): Added.
14484        * UserInterface/Main.js:
14485        (WebInspector.contentLoaded): Added event listener for window resize.
14486        (WebInspector._windowResized): Added. Update the toolbar layout.
14487        * UserInterface/Toolbar.js:
14488        (WebInspector.Toolbar.prototype.set displayMode): Update the toolbar layout.
14489        (WebInspector.Toolbar.prototype.set sizeMode): Ditto.
14490
144912012-11-17  Timothy Hatcher  <timothy@apple.com>
14492
14493        Keep toolbar items in constant positions as items are added or removed.
14494
14495        This keeps centered items in the center and adds the items on the right in reverse
14496        order since right most items are more stable as context changes. Also vertically stack
14497        the close and undock button if the toolbar is tall enough to fit them.
14498
14499        Reviewed by Dan Bernstein.
14500
14501        * UserInterface/ControlToolbarItem.css:
14502        (.toolbar .item.control):
14503        (.toolbar.small-size .item.control):
14504        (.toolbar.icon-only .item.control):
14505        (.toolbar .item.control:hover):
14506        (.toolbar .item.control:active):
14507        * UserInterface/Main.js:
14508        (WebInspector.contentLoaded): Use addToolbarItem instead of addNavigationItem. Add the
14509        detail sidebar items in reverse order.
14510        * UserInterface/NavigationBar.js:
14511        (WebInspector.NavigationBar.prototype.addNavigationItem): Added parentElement argument.
14512        (WebInspector.NavigationBar.prototype.insertNavigationItem): Added parentElement argument.
14513        Use the nextSibling only if it is in the same parent element.
14514        (WebInspector.NavigationBar.prototype.removeNavigationItem): Use remove to remove the element.
14515        * UserInterface/Toolbar.css:
14516        (.toolbar .control-section): Added.
14517        (.toolbar.label-only .control-section): Added.
14518        (.toolbar .item-section): Added.
14519        (.toolbar .item-section:not(.center)): Added.
14520        (.toolbar .item-section.left): Added.
14521        (.toolbar .item-section.center): Added.
14522        (.toolbar .item-section.right): Added.
14523        * UserInterface/Toolbar.js:
14524        (WebInspector.Toolbar): Create the four sections.
14525        (WebInspector.Toolbar.prototype.addToolbarItem): Added.
14526        * UserInterface/Utilities.js:
14527        (Element.prototype.remove): Added only if the engine does not have it. This is needed
14528        for iAd Producer, which uses an older WebKit.
14529
145302012-11-17  Timothy Hatcher  <timothy@apple.com>
14531
14532        Change ".navigation-bar > .item" and ".toolbar > .item" selectors into ".navigation-bar .item"
14533        and ".toolbar .item" so we can have intermediary elements between the bar and item.
14534
14535        Reviewed by Dan Bernstein.
14536
14537        * UserInterface/ActivateButtonNavigationItem.js:
14538        (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
14539        * UserInterface/ButtonNavigationItem.css:
14540        (.navigation-bar .item.button):
14541        (.navigation-bar .item.button > .glyph):
14542        (body.window-inactive .navigation-bar .item.button:not(.suppress-emboss) > .glyph):
14543        (.navigation-bar .item.button.disabled > .glyph):
14544        (body.window-inactive .navigation-bar .item.button.disabled:not(.suppress-emboss) > .glyph):
14545        (.navigation-bar .item.button.suppress-emboss > .glyph):
14546        (.navigation-bar .item.button.suppress-emboss:active > .glyph):
14547        (.navigation-bar .item.button.suppress-emboss.disabled > .glyph):
14548        (.navigation-bar .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
14549        * UserInterface/ButtonNavigationItem.js:
14550        (WebInspector.ButtonNavigationItem.prototype.generateStyleText):
14551        * UserInterface/ButtonToolbarItem.css:
14552        (.toolbar .item.button):
14553        (.toolbar.icon-and-label-vertical .item.button):
14554        (.toolbar.icon-and-label-horizontal .item.button):
14555        (.toolbar .item.button > .glyph):
14556        (.toolbar.small-size .item.button > .glyph):
14557        (.toolbar.label-only .item.button > .glyph):
14558        (.toolbar .item.button > .label):
14559        (.toolbar.label-only .item.activate.button.activated > .label):
14560        (.toolbar.icon-and-label-horizontal .item.button > .label):
14561        * UserInterface/ControlToolbarItem.css:
14562        (.toolbar .item.control):
14563        (.toolbar .item.control:hover):
14564        (.toolbar .item.control:active):
14565        (.toolbar .item.control > .glyph):
14566        (body.window-inactive .toolbar .item.control):
14567        (body.window-inactive .toolbar .item.control.disabled):
14568        * UserInterface/DividerNavigationItem.css:
14569        (.navigation-bar .item.divider):
14570        * UserInterface/FlexibleSpaceNavigationItem.css:
14571        (.toolbar .item.flexible-space):
14572        * UserInterface/NavigationBar.css:
14573        (.navigation-bar .item):
14574        * UserInterface/RadioButtonNavigationItem.css:
14575        (.navigation-bar .item.radio.button):
14576        (.navigation-bar.collapsed .item.radio.button):
14577        (.navigation-bar .item.radio.button.selected):
14578        (.navigation-bar.collapsed .item.radio.button.selected):
14579        * UserInterface/RadioButtonNavigationItem.js:
14580        (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText):
14581        * UserInterface/Toolbar.css:
14582        (.toolbar .control-section):
14583
145842012-11-17  Timothy Hatcher  <timothy@apple.com>
14585
14586        Make the close and undock buttons in the docked Web Inspector better match
14587        the style of the undock button and the iTunes 11 mini-player controls.
14588
14589        Reviewed by Dan Bernstein.
14590
14591        * UserInterface/ControlToolbarItem.css:
14592        (.toolbar > .item.control): 50% opacity.
14593        (.toolbar > .item.control:hover): Added. 90% opacity.
14594        (.toolbar > .item.control:active): Added. 100% opacity.
14595        (body.window-inactive .toolbar > .item.control): 35% opacity.
14596        (.toolbar > .item.control.disabled): 35% opacity.
14597        (body.window-inactive .toolbar > .item.control.disabled): 20% opacity.
14598        * UserInterface/Images/Undock.pdf: Rounded the corners a bit.
14599
146002012-11-16  Timothy Hatcher  <timothy@apple.com>
14601
14602        Renamed the Breakpoint sidebar to Debugger and give it a new icon.
14603
14604        Also removed unused images from previous sidebar panels.
14605
14606        Reviewed by Brian Weinstein.
14607
14608        * Localizations/en.lproj/localizedStrings.js: Updated.
14609        * UserInterface/DebuggerSidebarPanel.js: Renamed from WebInspector/UserInterface/BreakpointSidebarPanel.js.
14610        (WebInspector.DebuggerSidebarPanel): Updated the keyboard shortcut to be Control-3.
14611        * UserInterface/Images/NavigationItemBreakpoint.pdf: Removed.
14612        * UserInterface/Images/NavigationItemBug.pdf: Added.
14613        * UserInterface/Images/NavigationItemFunction.pdf: Removed.
14614        * UserInterface/Images/NavigationItemThreads.pdf: Removed.
14615        * UserInterface/InstrumentSidebarPanel.js:
14616        (WebInspector.InstrumentSidebarPanel): Updated the keyboard shortcut to be Control-2.
14617        * UserInterface/Main.html: Renamed BreakpointSidebarPanel to DebuggerSidebarPanel.
14618        * UserInterface/Main.js:
14619        (WebInspector.contentLoaded): Ditto.
14620        (WebInspector._debuggerDidPause): Ditto.
14621
146222012-11-16  Timothy Hatcher  <timothy@apple.com>
14623
14624        Merge the Debug sidebar panel into Breakpoints sidebar panel.
14625
14626        Reviewed by Brian Weinstein.
14627
14628        * UserInterface/BreakpointSidebarPanel.js:
14629        (WebInspector.BreakpointSidebarPanel): Added CallFramesDidChange event listener. Create the content tree
14630        outline and section for the Call Stack.
14631        (WebInspector.BreakpointSidebarPanel.prototype._debuggerCallFramesDidChange): Added.
14632        (WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected): Support CallFrameTreeElement.
14633        * UserInterface/DebugSidebarPanel.js: Removed.
14634        * UserInterface/Main.html: Removed DebugSidebarPanel.
14635        * UserInterface/Main.js:
14636        (WebInspector.contentLoaded): Removed DebugSidebarPanel.
14637        (WebInspector._debuggerDidPause): Show the BreakpointSidebarPanel instead.
14638
146392012-11-16  Timothy Hatcher  <timothy@apple.com>
14640
14641        Place breakpoints into a section in preparation of merging the Debug and Breakpoints sidebars.
14642
14643        Reviewed by Brian Weinstein.
14644
14645        * UserInterface/BreakpointSidebarPanel.js:
14646        (WebInspector.BreakpointSidebarPanel): Store contentTreeOutline as _breakpointsContentTreeOutline.
14647        Make a DetailsSection and put the content tree in its only row.
14648        (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Use _breakpointsContentTreeOutline.
14649        (WebInspector.BreakpointSidebarPanel.prototype._scriptsCleared): Ditto.
14650        (WebInspector.BreakpointSidebarPanel.prototype._breakpointRemoved): Ditto.
14651
146522012-11-13  Timothy Hatcher  <timothy@apple.com>
14653
14654        Make dragging the Web Inspector window in the toolbar move the window.
14655
14656        <rdar://problem/12688599> Should be able to drag to move Web Inspector window from empty parts of toolbar
14657
14658        Reviewed by Ricky Mondello.
14659
14660        * UserInterface/Main.js:
14661        (WebInspector.contentLoaded): Changed mousedown event listener to _toolbarMouseDown.
14662        (WebInspector._toolbarMouseDown): Added. Call _moveWindowMouseDown or _dockedResizerMouseDown.
14663        (WebInspector._moveWindowMouseDown): Added.
14664        (WebInspector._moveWindowMouseDown.toolbarDrag): Added.
14665        (WebInspector._moveWindowMouseDown.toolbarDragEnd): Added.
14666
146672012-11-13  Jeff Miller  <jeffm@apple.com>
14668
14669        Regenerated localizedStrings.js, which was out-of-date.
14670
14671        * Localizations/en.lproj/localizedStrings.js:
14672
146732012-11-13  Timothy Hatcher  <timothy@apple.com>
14674
14675        Disable sub-pixel antialiasing in the Web Inspector toolbar when in window mode.
14676
14677        This portion of the window has no background (showing the window chrome). So text rendered
14678        here does not look good when sub-pixel antialiased.
14679
14680        Reviewed by Antoine Quint.
14681
14682        * UserInterface/Toolbar.css:
14683        (body:not(.docked) .toolbar): Added. Set -webkit-font-smoothing: antialiased.
14684
146852012-11-12  Timothy Hatcher  <timothy@apple.com>
14686
14687        Don't show the dock button in the toolbar now that it is in the window title bar.
14688
14689        Reviewed by Antoine Quint.
14690
14691        * UserInterface/InspectorFrontendAPI.js:
14692        (InspectorFrontendAPI.setDockingUnavailable): Empty stub now.
14693        * UserInterface/Main.js:
14694        (WebInspector.contentLoaded): Changed the dock toggle into an undock button.
14695        (WebInspector.updateDockedState): Removed use of dockToggleButtonNavigationItem.
14696        Removed call to _updateDockToggleButtonVisibility.
14697        (WebInspector.setDockingUnavailable): Removed.
14698        (WebInspector._updateDockToggleButtonVisibility): Removed.
14699        (WebInspector._undock): Renamed from _toggleDockedState. Only undock now.
14700        (WebInspector._updateDockNavigationItems): Update undockButtonNavigationItem too.
14701
147022012-11-11  Timothy Hatcher  <timothy@apple.com>
14703
14704        Give WebInspector.ContentBrowser the ability to not have back and forward buttons.
14705
14706        This will be used for the ContentBrowser in the quick console area.
14707
14708        Reviewed by Antoine Quint.
14709
14710        * UserInterface/ContentBrowser.js:
14711        (WebInspector.ContentBrowser): Added disableBackForward argument. Don't create the buttons
14712        or keyboard shortcuts if disableBackForward is true.
14713        (WebInspector.ContentBrowser.prototype._updateBackForwardButtons): Return early if the buttons
14714        don't exist and there is nothing to update.
14715
147162012-11-11  Timothy Hatcher  <timothy@apple.com>
14717
14718        Fix some flashing while scrolling the Web Inspector when docked.
14719
14720        When docked the toolbar isn't transparent, so we can have a background
14721        on the body which fixes the flashing. This isn't an issue in when undocked.
14722        This also isn't an issue with accelerated composting, which we should turn
14723        on for the Inspector in <rdar://problem/12676223>.
14724
14725        Reviewed by Anders Carlsson.
14726
14727        * UserInterface/Main.css:
14728        (body.docked): Set the background-color to white.
14729
147302012-11-11  Timothy Hatcher  <timothy@apple.com>
14731
14732        Fix an exception that was causing the Web Inspector to fail when trying to debug a script.
14733
14734        The fact that we don't know about a script in a call frame is really a deeper bug. But this
14735        at least makes things gracefully keep working. The deeper issue is <rdar://problem/12679475>.
14736
14737        <rdar://problem/12676344> Web Inspector gets stuck trying to debug an exception
14738
14739        Reviewed by Dean Jackson.
14740
14741        * UserInterface/DebuggerManager.js:
14742        (WebInspector.DebuggerManager.prototype.debuggerDidPause): Continue if the SourceCodeLocation
14743        ended up being null. This prevents an exception later.
14744        (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload): Return null if
14745        the script was not found.
14746
147472012-11-11  Timothy Hatcher  <timothy@apple.com>
14748
14749        Remove the Log navigation sidebar.
14750
14751        Create a single LogContentView to be shown for the console. Previous sessions are now shown
14752        inline like the quick console (with a divider between them).
14753
14754        The ultimate goal here is to merge the quick console and the full height console.
14755
14756        Reviewed by Dean Jackson.
14757
14758        * Localizations/en.lproj/localizedStrings.js: Updated.
14759        * UserInterface/InspectorFrontendAPI.js:
14760        (InspectorFrontendAPI.showConsole): Call WebInspector.showConsoleView.
14761        * UserInterface/LogContentView.js:
14762        (WebInspector.LogContentView): Add event listeners that were in LogSidebarPanel.
14763        (WebInspector.LogContentView.prototype.shown): Removed disabled check.
14764        (WebInspector.LogContentView.prototype._sessionsCleared): Added.
14765        (WebInspector.LogContentView.prototype._sessionStarted): Added.
14766        (WebInspector.LogContentView.prototype._messageAdded): Added.
14767        (WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated): Added.
14768        (WebInspector.LogContentView.prototype._handleContextMenuEvent): Removed disabled check.
14769        (WebInspector.LogContentView.prototype._activeLogCleared): Ditto.
14770        (WebInspector.LogContentView.prototype._clearLog): Ditto.
14771        * UserInterface/LogSidebarPanel.js: Removed.
14772        * UserInterface/LogTreeElement.js:
14773        (WebInspector.LogTreeElement): Change "Current Log" to "Console".
14774        * UserInterface/Main.html: Removed LogSidebarPanel.js.
14775        * UserInterface/Main.js:
14776        (WebInspector.contentLoaded): Removed LogSidebarPanel use. Create a Console toolbar button.
14777        Handle the last content cookie for the console.
14778        (WebInspector.sidebarPanelForRepresentedObject): Return null for the console.
14779        (WebInspector.contentBrowserTreeElementForRepresentedObject): Return the special tree element
14780        for the console.
14781        (WebInspector.showConsoleView): Added.
14782        (WebInspector._updateCurrentContentViewCookie): Set a special cookie for the console view.
14783
147842012-11-11  Timothy Hatcher  <timothy@apple.com>
14785
14786        Add reload and inspect toolbar buttons.
14787
14788        <rdar://problem/11187904> REGRESSION (Safari 6): Inspect node button should always be available
14789
14790        Reviewed by Dean Jackson.
14791
14792        * Localizations/en.lproj/localizedStrings.js: Updated.
14793        * UserInterface/FrameContentView.js:
14794        (WebInspector.FrameContentView): Removed _inspectModeButtonNavigationItem.
14795        (WebInspector.FrameContentView.prototype.get navigationItems): Ditto.
14796        * UserInterface/Images/Reload.pdf: Added.
14797        * UserInterface/Main.js:
14798        (WebInspector.contentLoaded): Create the reload and inspect toolbar buttons.
14799        (WebInspector._inspectModeStateChanged): Added.
14800        (WebInspector._toggleInspectMode): Added.
14801        (WebInspector._reloadPageClicked): Added.
14802
148032012-11-11  Timothy Hatcher  <timothy@apple.com>
14804
14805        Use sticky positioning for the section headers in the Details sidebar.
14806
14807        To make this work I had to dynamically generate style rules based on the
14808        current height of the toolbar (now that it is dynamic). Kind of gross, but
14809        the end result is really nice!
14810
14811        While I was at it I bumped the height of the headers to 23px to match the
14812        other bars. That way when they are at the top everything lines up nicely.
14813
14814        <rdar://problem/12611547> Consider using sticky positioning for sidebar section headers
14815
14816        Reviewed by Dean Jackson.
14817
14818        * UserInterface/DetailsSection.css:
14819        (.details-section > .header): Bump the height and padding up.
14820        * UserInterface/Main.js:
14821        (WebInspector.updateDockedState): Call _updateStickyPostionStyles.
14822        (WebInspector._updateStickyPostionStyles): Added.
14823        (WebInspector._toolbarDisplayModeDidChange): Call _updateStickyPostionStyles.
14824        (WebInspector._toolbarSizeModeDidChange): Ditto.
14825        * UserInterface/Utilities.js:
14826        (Element.prototype.totalOffsetLeft): Use getBoundingClientRect for better results.
14827        (Element.prototype.totalOffsetTop): Ditto.
14828
148292012-11-10  Timothy Hatcher  <timothy@apple.com>
14830
14831        Don't deselect the selected row when refreshing the Network data grid.
14832
14833        This preserves selection during refreshes that happen while loading the page.
14834        It also prevents notifying that the selectionPathComponents changed which causes
14835        the details sidebar to refresh and hide because there was no selection.
14836
14837        <rdar://problem/12603744> Details sidebar auto-closes while trying to read it on a loading page
14838
14839        Reviewed by Dean Jackson.
14840
14841        * UserInterface/TimelinesContentView.js:
14842        (WebInspector.TimelinesContentView.prototype._selectedNodeChanged): Return early if _ignoreSelectionEvent.
14843        (WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds): Save and restore the
14844        selectedNode if it was refreshed.
14845        (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid): Set _ignoreSelectionEvent while
14846        updating the data grid.
14847
148482012-11-10  Timothy Hatcher  <timothy@apple.com>
14849
14850        Don't crossfade the indeterminate progress spinner.
14851
14852        <rdar://problem/12676407> Web Inspector shouldn't cross-fade its "discrete" spinner
14853
14854        Reviewed by Dan Bernstein.
14855
14856        * UserInterface/IndeterminateProgressSpinner.css:
14857        (.indeterminate-progress-spinner): Use -webkit-animation-timing-function: step-start.
14858
148592012-11-10  Timothy Hatcher  <timothy@apple.com>
14860
14861        Prevent the details sidebar from ever being shown empty.
14862
14863        This removes the setting to auto hide when empty and always hides when empty.
14864
14865        Reviewed by Antoine Quint.
14866
14867        * UserInterface/Main.js:
14868        (WebInspector.contentLoaded): Removed _detailsSidebarAutoHideWhenEmptySetting and start the
14869        details sidebar out in the collapsed state.
14870        (WebInspector._sidebarCollapsedStateDidChange): Don't remember the collapsed state if
14871        _ignoreDetailsSidebarPanelCollapsedEvent is set. This is for ignoring programatic changes.
14872        (WebInspector._contentBrowserRepresentedObjectsDidChange): Removed _detailsSidebarAutoHideWhenEmptySetting.
14873
148742012-11-10  Timothy Hatcher  <timothy@apple.com>
14875
14876        Don't draw a background on the toolbar when the window is inactive.
14877
14878        We want to show through to the window chrome in this case too.
14879
14880        Reviewed by Dan Bernstein.
14881
14882        * UserInterface/Toolbar.css:
14883        (body.window-inactive .toolbar): Removed background-image.
14884
148852012-11-10  Timothy Hatcher  <timothy@apple.com>
14886
14887        Move the time bar to the bottom so the sidebar elements align with the timelines again.
14888
14889        Now that the sidebars don't have a navigation bar, everything is shifted higher in the sidebar.
14890        This caused a misalignment in the timeline view. The best solution is to move the time bar to the
14891        bottom so the timeline overviews line up with the tree elements in the sidebar again. The Profiles
14892        sidebar header does not align with the data grid header anymore, but that does not matter as much.
14893        Maybe later we can add a summary or zoom slider to sidebar, shifting Profiles down again.
14894
14895        To make the time bar not be as distracting the background is now white and the markers fade out.
14896        The fade points in the direction of the graph, up for the overview and down for the network graph.
14897        This prevents the lines from touching since the two time bars are now next to each other.
14898
14899        Reviewed by Ricky Mondello.
14900
14901        * UserInterface/NetworkDataGrid.css:
14902        (.network-timeline-decorations > .header):
14903        (.network-timeline-decorations > .header > .divider):
14904        (.network-timeline-decorations:not(.sort-active) > .header > .divider:last-child):
14905        (.network-timeline-decorations > .header > .divider > .label):
14906        * UserInterface/TimelineDecorations.css:
14907        (.timeline-decorations > .header):
14908        (.timeline-decorations > .header > .divider):
14909        (.timeline-decorations > .header > .divider:last-child):
14910        (.timeline-decorations > .header > .divider > .label):
14911        * UserInterface/TimelineOverview.js:
14912        (WebInspector.TimelineOverview):
14913        * UserInterface/Toolbar.css:
14914
149152012-11-10  Timothy Hatcher  <timothy@apple.com>
14916
14917        Merge the Storage sidebar into the Resources sidebar.
14918
14919        Most of this is just copied from StorageSidebarPanel with trivial tweaks to work
14920        inside of ResourceSidebarPanel.
14921
14922        Reviewed by Antoine Quint.
14923
14924        * UserInterface/ApplicationCacheFrameTreeElement.js:
14925        (WebInspector.ApplicationCacheFrameTreeElement.prototype.updateTitles):
14926        * UserInterface/InspectorObserver.js:
14927        (WebInspector.InspectorObserver.prototype.inspect):
14928        * UserInterface/Main.html:
14929        * UserInterface/Main.js:
14930        (WebInspector.contentLoaded):
14931        (WebInspector.sidebarPanelForRepresentedObject):
14932        * UserInterface/ResourceSidebarPanel.js:
14933        (WebInspector.ResourceSidebarPanel):
14934        (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView):
14935        (WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie.finalizeCookieChecking):
14936        (WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie):
14937        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
14938        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
14939        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork):
14940        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange):
14941        (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
14942        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
14943        (WebInspector.ResourceSidebarPanel.prototype._domNodeWasInspected):
14944        (WebInspector.ResourceSidebarPanel.prototype._checkStorageTreeElementAgainstPendingContentViewCookie):
14945        (WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasAdded):
14946        (WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasInspected):
14947        (WebInspector.ResourceSidebarPanel.prototype._databaseWasAdded):
14948        (WebInspector.ResourceSidebarPanel.prototype._databaseWasInspected):
14949        (WebInspector.ResourceSidebarPanel.prototype._cookieStorageObjectWasAdded):
14950        (WebInspector.ResourceSidebarPanel.prototype._frameManifestAdded):
14951        (WebInspector.ResourceSidebarPanel.prototype._frameManifestRemoved):
14952        (WebInspector.ResourceSidebarPanel.prototype._compareTreeElements):
14953        (WebInspector.ResourceSidebarPanel.prototype._addStorageChild):
14954        (WebInspector.ResourceSidebarPanel.prototype._storageCleared):
14955        * UserInterface/StorageSidebarPanel.js: Removed.
14956
149572012-11-09  Timothy Hatcher  <timothy@apple.com>
14958
14959        Remove the Issues sidebar.
14960
14961        It might come back in some form in the new Debugger sidebar if there is demand.
14962        But it has proven to not be that helpful in its current form.
14963
14964        Reviewed by Antoine Quint.
14965
14966        * UserInterface/IssueIcons.css: Removed.
14967        * UserInterface/IssueSidebarPanel.js: Removed.
14968        * UserInterface/IssueTreeElement.js: Removed.
14969        * UserInterface/Main.html:
14970        * UserInterface/Main.js:
14971        (WebInspector.contentLoaded):
14972
149732012-11-09  Timothy Hatcher  <timothy@apple.com>
14974
14975        Add placeholders to all the search and filter fields in the navigation sidebars.
14976
14977        <rdar://problem/11113717> Two search-related fields in the Search sidebar is confusing
14978
14979        Reviewed by Dan Bernstein.
14980
14981        * Localizations/en.lproj/localizedStrings.js: Updated.
14982        * UserInterface/BreakpointSidebarPanel.js:
14983        (WebInspector.BreakpointSidebarPanel):
14984        * UserInterface/DebugSidebarPanel.js:
14985        (WebInspector.DebugSidebarPanel):
14986        * UserInterface/FilterBar.js:
14987        (WebInspector.FilterBar.prototype.get placeholder): Added.
14988        (WebInspector.FilterBar.prototype.set placeholder): Added.
14989        * UserInterface/InstrumentSidebarPanel.js:
14990        (WebInspector.InstrumentSidebarPanel):
14991        * UserInterface/LogSidebarPanel.js:
14992        (WebInspector.LogSidebarPanel):
14993        * UserInterface/ResourceSidebarPanel.js:
14994        (WebInspector.ResourceSidebarPanel):
14995        * UserInterface/StorageSidebarPanel.js:
14996        (WebInspector.StorageSidebarPanel):
14997
149982012-11-09  Timothy Hatcher  <timothy@apple.com>
14999
15000        Merge the Search sidebar into the Resources sidebar.
15001
15002        Most of this is just copied from SearchSidebarPanel with trivial tweaks to work
15003        inside of ResourceSidebarPanel.
15004
15005        Rubber-stamped by Antoine Quint.
15006
15007        * UserInterface/Main.html:
15008        * UserInterface/Main.js:
15009        (WebInspector.contentLoaded):
15010        * UserInterface/ResourceSidebarPanel.css: Added.
15011        * UserInterface/ResourceSidebarPanel.js:
15012        (WebInspector.ResourceSidebarPanel):
15013        (WebInspector.ResourceSidebarPanel.prototype.get contentTreeOutlineToAutoPrune):
15014        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
15015        (WebInspector.ResourceSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon):
15016        (WebInspector.ResourceSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder):
15017        (WebInspector.ResourceSidebarPanel.prototype.performSearch.resourceCallback):
15018        (WebInspector.ResourceSidebarPanel.prototype.performSearch.resourcesCallback):
15019        (WebInspector.ResourceSidebarPanel.prototype.performSearch.domSearchResults):
15020        (WebInspector.ResourceSidebarPanel.prototype.performSearch.domCallback):
15021        (WebInspector.ResourceSidebarPanel.prototype.performSearch):
15022        (WebInspector.ResourceSidebarPanel.prototype._searchFieldChanged):
15023        (WebInspector.ResourceSidebarPanel.prototype._searchTreeElementForResource):
15024        (WebInspector.ResourceSidebarPanel.prototype._focusSearchField):
15025        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
15026        (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
15027        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
15028        * UserInterface/SearchSidebarPanel.css: Removed.
15029        * UserInterface/SearchSidebarPanel.js: Removed.
15030
150312012-11-09  Timothy Hatcher  <timothy@apple.com>
15032
15033        Allow setting the contentTreeOutline of a WebInspector.NavigationSidebarPanel.
15034
15035        This will allow one sidebar to manage multiple content trees, so we can merge
15036        Resources and Search into one.
15037
15038        Reviewed by Antoine Quint.
15039
15040        * UserInterface/NavigationSidebarPanel.js:
15041        (WebInspector.NavigationSidebarPanel): Use createContentTreeOutline.
15042        (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineElement): Use .element.
15043        (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline): Added.
15044        (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineToAutoPrune): Added.
15045        (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline): Added.
15046        (WebInspector.NavigationSidebarPanel.prototype.show): Use contentTreeOutlineElement.
15047        (WebInspector.NavigationSidebarPanel.prototype._checkForOldResources.delayedWork): Use the
15048        new contentTreeOutlineToAutoPrune property.
15049        * UserInterface/TreeOutline.js:
15050        (TreeOutline): Set .element for public use.
15051
150522012-11-09  Nathan de Vries  <ndevries@apple.com>
15053
15054        Fix for <rdar://problem/11498628> Can inadvertently copy part of the UI
15055        when attempting to copy the Full URL of a resource
15056
15057        Ensure that when a value in the details side pane is triple-tapped to
15058        select the whole value, the label from the following row is not included
15059        in the selection.
15060
15061        The table-cell selection issue will be addressed properly in
15062        <rdar://problem/12668870> Triple-clicking text within a <div> set to
15063        "display: table-cell" selects text outside the cell
15064
15065        Reviewed by Timothy Hatcher.
15066
15067        * UserInterface/DetailsSectionSimpleRow.js:
15068        (WebInspector.DetailsSectionSimpleRow): Add a click handler to the value
15069        cell and adjust the selection range on triple-click if it extends beyond
15070        the cell.
15071
150722012-11-09  Joseph Pecoraro  <pecoraro@apple.com>
15073
15074        <rdar://problem/12526413> Compositing borders button does not work for iOS 6 (should be suppressed or dimmed)
15075
15076        Reviewed by Jon Honeycutt.
15077
15078        Disable the toggle compositing borders navigation button when debugging
15079        an iOS 6 device, which doesn't have backend support for it.
15080
15081        * UserInterface/FrameContentView.js:
15082        (WebInspector.FrameContentView.prototype._toggleCompositingBorders):
15083        (WebInspector.FrameContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
15084
150852012-11-09  Joseph Pecoraro  <pecoraro@apple.com>
15086
15087        <rdar://problem/12462428> Make the Safari Curie Web Inspector compatible with iOS 6
15088
15089        Reviewed by Timothy Hatcher.
15090
15091        In production builds be sure to copy over resources that are
15092        dynamically loaded in the frontend, and aren't explicitly loaded
15093        by Main.html.
15094
15095        * Scripts/copy-user-interface-resources.sh:
15096
150972012-11-09  Joseph Pecoraro  <pecoraro@apple.com>
15098
15099        <rdar://problem/12462428> Make the Safari Curie Web Inspector compatible with iOS 6
15100
15101        Reviewed by Timothy Hatcher.
15102
15103        In this change the inspector frontend will load a backend commands file
15104        that is exactly compatible with the backend it is communicating with.
15105        When loading the frontend for a remote session the RWI frontend host
15106        can suggest a more specific InspectorBackendCommands file to load.
15107        For non-remote session, or non-legacy remote session
15108        the default InspectorBackendCommands.js file is loaded.
15109
15110        This approach has some benefits:
15111
15112          - loading the exact set of backend commands allows backend feature
15113            detection by simply checking if the "BackendAgent.<method>" exists.
15114            Therefore you immediately get errors if you use a backend agent
15115            method without feature detecting it.
15116
15117          - by having Legacy InspectorBackendCommands files checked in it is
15118            easier to see exactly what an older version of iOS supported and
15119            when functions were added / removed.
15120
15121        And drawbacks:
15122
15123          - if a protocol message changes in some way (renamed params, gains or
15124            loses params, reorders params, changes to multiple methods, etc) we
15125            may need to do extra work to ensure compatibility with older devices.
15126            Like we've already seen with Database SQL handling.
15127
15128        Timothy Hatcher already addressed all of the iOS 6 protocol changes so far.
15129
15130        * UserInterface/LoadInspectorBackendCommands.js: Added.
15131        Load either the default InspectorBackendCommands.js or the one exposed
15132        by InspectorFrontendHost.inspectorBackendCommandsURL() in remote sessions.
15133
15134        * UserInterface/Main.html:
15135        Remove InspectorBackendLegacyCommands, add in LoadInspectorBackendCommands.
15136
15137        * UserInterface/InspectorBackendLegacyCommands.js: Removed.
15138        * UserInterface/Legacy/6.0/InspectorBackendCommands.js: Added.
15139        This is the complete InspectorBackendCommands supported by iOS 6.
15140
151412012-11-08  Timothy Hatcher  <timothy@apple.com>
15142
15143        Fix an exception that started happening in the Web Inspector, that broke everything.
15144
15145        Revision 133862 of WebCore started looking for InspectorFrontendAPI.dispatchMessageAsync.
15146        So we need to implement thta method to make things work again. There are a few other
15147        methods that needed added to InspectorFrontendAPI too.
15148
15149        Reviewed by Antoine Quint.
15150
15151        * UserInterface/InspectorFrontendAPI.js:
15152        (InspectorFrontendAPI.contextMenuItemSelected): Added.
15153        (InspectorFrontendAPI.contextMenuCleared): Added.
15154        (InspectorFrontendAPI.dispatchMessageAsync): Added.
15155        (InspectorFrontendAPI.dispatchMessage): Added.
15156
151572012-11-08  Timothy Hatcher  <timothy@apple.com>
15158
15159        Default to horizontal labels and small icons for the toolbar when docked.
15160
15161        This also remembers the toolbar modes for docked and undocked if the user changes them.
15162
15163        Reviewed by Ricky Mondello.
15164
15165        * UserInterface/Main.js:
15166        (WebInspector.contentLoaded): Listen for the new toolbar events and create the settings.
15167        (WebInspector.updateDockedState): Change the modes using the settings based on docked state.
15168        (WebInspector._toolbarDisplayModeDidChange): Added. Store the mode in the setting.
15169        (WebInspector._toolbarSizeModeDidChange): Added. Ditto.
15170        * UserInterface/Toolbar.js:
15171        (WebInspector.Toolbar.prototype.set displayMode): Fire the DisplayModeDidChange event.
15172        (WebInspector.Toolbar.prototype.set sizeMode): Fire the SizeModeDidChange event.
15173
151742012-11-08  Timothy Hatcher  <timothy@apple.com>
15175
15176        Fix an exception that was preventing console expression from evaluating.
15177
15178        This exposed a deeper issue where we were not using the origin property for DOM storage
15179        objects and still looking for the host property.
15180
15181        There also seems to be a backend issue where local storage is showing up twice.
15182        https://bugs.webkit.org/show_bug.cgi?id=101643
15183
15184        <rdar://problem/12656188> Can't evaluate expressions in the console on this npr.org page
15185
15186        Reviewed by Ricky Mondello.
15187
15188        * UserInterface/DOMStorageObserver.js:
15189        (WebInspector.DOMStorageObserver.prototype.addDOMStorage): Look for origin and parse
15190        the host out of it since our code still expects the host.
15191        * UserInterface/StorageSidebarPanel.js:
15192        (WebInspector.StorageSidebarPanel.prototype._compareTreeElementsByMainTitle): Assert
15193        that the mainTitle is not empty/null/undefined. Handle it anyway just in case.
15194
151952012-11-08  Timothy Hatcher  <timothy@apple.com>
15196
15197        Update the Web Inspector strings for all the string changes in the last few revisions.
15198
15199        Part of:
15200        <rdar://problem/10947541> Navigation bar buttons are too small
15201        <rdar://problem/12294575> Navigation bar button icons are difficult to identify
15202        <rdar://problem/12589291> Navigation bar buttons are unlabeled
15203
15204        Reviewed by Ricky Mondello.
15205
15206        * Localizations/en.lproj/localizedStrings.js: Updated.
15207
152082012-11-08  Timothy Hatcher  <timothy@apple.com>
15209
15210        Add the sidebar panel toolbar items and dock controls to the toolbar.
15211
15212        Part of:
15213        <rdar://problem/10947541> Navigation bar buttons are too small
15214        <rdar://problem/12294575> Navigation bar button icons are difficult to identify
15215        <rdar://problem/12589291> Navigation bar buttons are unlabeled
15216
15217        Reviewed by Ricky Mondello.
15218
15219        * UserInterface/Main.js:
15220        (WebInspector.contentLoaded):
15221        (WebInspector._updateDockToggleButtonVisibility):
15222        (WebInspector._updateDockNavigationItems):
15223        (WebInspector._contentBrowserRepresentedObjectsDidChange):
15224
152252012-11-08  Timothy Hatcher  <timothy@apple.com>
15226
15227        Remove the toggle sidebar buttons and keyboard shortcuts.
15228
15229        Part of:
15230        <rdar://problem/10947541> Navigation bar buttons are too small
15231        <rdar://problem/12294575> Navigation bar button icons are difficult to identify
15232        <rdar://problem/12589291> Navigation bar buttons are unlabeled
15233
15234        Reviewed by Ricky Mondello.
15235
15236        * UserInterface/Main.js:
15237        (WebInspector.contentLoaded):
15238        (WebInspector._navigationSidebarPanelSelected):
15239
152402012-11-08  Timothy Hatcher  <timothy@apple.com>
15241
15242        Don't have sidebars manage and display a NavigationBar anymore.
15243
15244        This removes the navigation bar from Sidebar and makes each SidebarPanel have a toolbar item instead.
15245        To work with the toolbar item the display names and tooltips have been tweaked. The toolbar items
15246        are not used in the toolbar yet.
15247
15248        Part of:
15249        <rdar://problem/10947541> Navigation bar buttons are too small
15250        <rdar://problem/12294575> Navigation bar button icons are difficult to identify
15251        <rdar://problem/12589291> Navigation bar buttons are unlabeled
15252
15253        Reviewed by Ricky Mondello.
15254
15255        * UserInterface/AppearanceDetailsSidebarPanel.js:
15256        (WebInspector.AppearanceDetailsSidebarPanel):
15257        * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
15258        (WebInspector.ApplicationCacheDetailsSidebarPanel):
15259        * UserInterface/BreakpointSidebarPanel.js:
15260        (WebInspector.BreakpointSidebarPanel):
15261        * UserInterface/CSSStyleDetailsSidebarPanel.js:
15262        (WebInspector.CSSStyleDetailsSidebarPanel):
15263        * UserInterface/DOMNodeDetailsSidebarPanel.js:
15264        (WebInspector.DOMNodeDetailsSidebarPanel):
15265        * UserInterface/DebugSidebarPanel.js:
15266        (WebInspector.DebugSidebarPanel):
15267        * UserInterface/DetailsSidebarPanel.js:
15268        (WebInspector.DetailsSidebarPanel):
15269        * UserInterface/InstrumentSidebarPanel.js:
15270        (WebInspector.InstrumentSidebarPanel):
15271        * UserInterface/IssueSidebarPanel.js:
15272        (WebInspector.IssueSidebarPanel):
15273        * UserInterface/LogSidebarPanel.js:
15274        (WebInspector.LogSidebarPanel):
15275        * UserInterface/NavigationSidebarPanel.js:
15276        (WebInspector.NavigationSidebarPanel):
15277        (WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
15278        (WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
15279        (WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder):
15280        (WebInspector.NavigationSidebarPanel.prototype.shown):
15281        (WebInspector.NavigationSidebarPanel.prototype.hidden):
15282        (WebInspector.NavigationSidebarPanel.prototype._updateToolbarItemVisibility):
15283        * UserInterface/ResourceDetailsSidebarPanel.js:
15284        (WebInspector.ResourceDetailsSidebarPanel):
15285        * UserInterface/ResourceSidebarPanel.js:
15286        (WebInspector.ResourceSidebarPanel):
15287        * UserInterface/ScopeChainDetailsSidebarPanel.js:
15288        (WebInspector.ScopeChainDetailsSidebarPanel):
15289        * UserInterface/SearchSidebarPanel.js:
15290        (WebInspector.SearchSidebarPanel):
15291        * UserInterface/Sidebar.css:
15292        (.sidebar > .panel):
15293        (.sidebar.right):
15294        * UserInterface/Sidebar.js:
15295        (WebInspector.Sidebar):
15296        (WebInspector.Sidebar.prototype.addSidebarPanel):
15297        (WebInspector.Sidebar.prototype.removeSidebarPanel):
15298        (WebInspector.Sidebar.prototype.set selectedSidebarPanel):
15299        (WebInspector.Sidebar.prototype.get minimumWidth):
15300        (WebInspector.Sidebar.prototype.set width):
15301        (WebInspector.Sidebar.prototype.set collapsed):
15302        * UserInterface/SidebarPanel.js:
15303        (WebInspector.SidebarPanel):
15304        (WebInspector.SidebarPanel.prototype.get toolbarItem):
15305        (WebInspector.SidebarPanel.prototype.get visible):
15306        (WebInspector.SidebarPanel.prototype.hide):
15307        (WebInspector.SidebarPanel.prototype.toggle):
15308        (WebInspector.SidebarPanel.prototype.added):
15309        (WebInspector.SidebarPanel.prototype.removed):
15310        (WebInspector.SidebarPanel.prototype.hidden):
15311        (WebInspector.SidebarPanel.prototype.visibilityDidChange):
15312        * UserInterface/StorageSidebarPanel.js:
15313        (WebInspector.StorageSidebarPanel):
15314
153152012-11-08  Timothy Hatcher  <timothy@apple.com>
15316
15317        Rename the QuickConsole toolbar style class so it does not conflict with the new Toolbar class.
15318
15319        Part of:
15320        <rdar://problem/10947541> Navigation bar buttons are too small
15321        <rdar://problem/12294575> Navigation bar button icons are difficult to identify
15322        <rdar://problem/12589291> Navigation bar buttons are unlabeled
15323
15324        Reviewed by Ricky Mondello.
15325
15326        * UserInterface/QuickConsole.css:
15327        (.quick-console > .quick-console-toolbar):
15328        (.quick-console > .quick-console-toolbar > .text-prompt):
15329        (.quick-console > .quick-console-toolbar > .navigation-bar-container):
15330        (.quick-console > .quick-console-toolbar > .navigation-bar-container > .navigation-bar-spacer):
15331        (.quick-console > .quick-console-toolbar > .navigation-bar-container > .navigation-bar):
15332        (.quick-console > .quick-console-toolbar.scroll-divider):
15333        (.quick-console > .quick-console-toolbar > .text-prompt > .javascript-prompt):
15334        * UserInterface/QuickConsole.js:
15335
153362012-11-08  Timothy Hatcher  <timothy@apple.com>
15337
15338        Add a toolbar class and toolbar item classes to the Web Inspector.
15339
15340        The toolbar and item inherits most of the functionality from the existing NavigationBar and ButtonNavigationItem.
15341        This also makes the toolbar be the resize area when docked. No items are added to the toolbar yet.
15342
15343        Part of:
15344        <rdar://problem/10947541> Navigation bar buttons are too small
15345        <rdar://problem/12294575> Navigation bar button icons are difficult to identify
15346        <rdar://problem/12589291> Navigation bar buttons are unlabeled
15347
15348        Reviewed by Ricky Mondello.
15349
15350        * UserInterface/ActivateButtonToolbarItem.js: Added.
15351        (WebInspector.ActivateButtonToolbarItem):
15352        (WebInspector.ActivateButtonToolbarItem.prototype.get label):
15353        (WebInspector.ActivateButtonToolbarItem.prototype.set label):
15354        * UserInterface/ButtonToolbarItem.css: Added.
15355        (.toolbar > .item.button):
15356        (.toolbar.icon-and-label-vertical > .item.button):
15357        (.toolbar.icon-and-label-horizontal > .item.button):
15358        (.toolbar > .item.button > .glyph):
15359        (.toolbar.small-size > .item.button > .glyph):
15360        (.toolbar.label-only > .item.button > .glyph):
15361        (.toolbar > .item.button > .label):
15362        (.toolbar.label-only > .item.activate.button.activated > .label):
15363        (.toolbar.icon-and-label-horizontal > .item.button > .label):
15364        (.toolbar.icon-only > .item.button > .label):
15365        (body.window-inactive .toolbar > .item.button):
15366        (.toolbar > .item.button.disabled):
15367        (body.window-inactive .toolbar > .item.button.disabled):
15368        * UserInterface/ButtonToolbarItem.js: Added.
15369        (WebInspector.ButtonToolbarItem):
15370        (WebInspector.ButtonToolbarItem.prototype.get label):
15371        (WebInspector.ButtonToolbarItem.prototype.set label):
15372        * UserInterface/ControlToolbarItem.css: Added.
15373        (.toolbar > .item.control):
15374        (.toolbar.icon-and-label-vertical > .item.control):
15375        (.toolbar > .item.control:not(.hidden) + .item.control):
15376        (.toolbar > .item.control > .glyph):
15377        (body.window-inactive .toolbar > .item.control > .glyph):
15378        (.toolbar > .item.control.disabled > .glyph):
15379        (body.window-inactive .toolbar > .item.control.disabled > .glyph):
15380        * UserInterface/ControlToolbarItem.js: Added.
15381        (WebInspector.ControlToolbarItem):
15382        * UserInterface/Main.css:
15383        (body):
15384        (#toolbar):
15385        (body.docked #toolbar):
15386        (body.docked #toolbar .item:not(.flexible-space)):
15387        (#main):
15388        * UserInterface/Main.html:
15389        * UserInterface/Main.js:
15390        (WebInspector.contentLoaded):
15391        (WebInspector._reloadPageIgnoringCache):
15392        (WebInspector._copy):
15393        * UserInterface/ToggleControlToolbarItem.js: Added.
15394        (WebInspector.ToggleControlToolbarItem):
15395        * UserInterface/Toolbar.css: Added.
15396        (.toolbar):
15397        (.toolbar.icon-and-label-vertical):
15398        (.toolbar.icon-and-label-vertical.small-size):
15399        (.toolbar.icon-only):
15400        (.toolbar.label-only):
15401        (body.docked .toolbar):
15402        (body.window-inactive .toolbar):
15403        (.toolbar > .item):
15404        * UserInterface/Toolbar.js: Added.
15405        (WebInspector.Toolbar):
15406        (WebInspector.Toolbar.prototype.get displayMode):
15407        (WebInspector.Toolbar.prototype.set displayMode):
15408        (WebInspector.Toolbar.prototype.get sizeMode):
15409        (WebInspector.Toolbar.prototype.set sizeMode):
15410        (WebInspector.Toolbar.prototype._handleContextMenuEvent):
15411        (WebInspector.Toolbar.prototype._changeDisplayMode):
15412        (WebInspector.Toolbar.prototype._toggleSmallIcons):
15413
154142012-11-07  Timothy Hatcher  <timothy@apple.com>
15415
15416        Make the Web Inspector correctly reflect the docked state again.
15417
15418        The query parameter changed in r133393. The front-end needs to look for the
15419        new dockSide parameter instead of docked.
15420
15421        Reviewed by Jon Honeycutt.
15422
15423        * UserInterface/Main.js:
15424        (WebInspector.contentLoaded): Look for dockSide === "bottom".
15425
154262012-11-05  Timothy Hatcher  <timothy@apple.com>
15427
15428        Change the point to inspect button icon from a hand to a crosshair.
15429
15430        Reviewed by Dan Bernstein.
15431
15432        * UserInterface/FrameContentView.js:
15433        (WebInspector.FrameContentView): Use Crosshair.pdf instead of Hand.pdf.
15434        * UserInterface/Images/Crosshair.pdf: Added.
15435        * UserInterface/Images/Hand.pdf: Removed.
15436
154372012-11-04  Timothy Hatcher  <timothy@apple.com>
15438
15439        Fix the line numbers in the JavaScript & Events timeline; make them 0-based.
15440
15441        The rest of the Web Inspector expects 0-based line numbers. But the line numbers in the
15442        JavaScript & Events timeline come in 1-based. We were displaying them correctly before,
15443        but clicking the go-to arrow would instead highlight the next line in the source.
15444
15445        Reviewed by Joseph Pecoraro.
15446
15447        * UserInterface/ScriptTimelineDataGridNode.js:
15448        (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Correctly display the now
15449        0-based line number. Also add the line number to the tooltip to match what we do elsewhere.
15450        (WebInspector.ScriptTimelineDataGridNode.prototype._goToResource): Only pass the lineNumber if it
15451        isn't the first line.
15452        * UserInterface/TimelineManager.js:
15453        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Subtract 1 from the line numbers
15454        coming in over the protocol before using them elsewhere in the Inspector.
15455
154562012-11-04  Timothy Hatcher  <timothy@apple.com>
15457
15458        Rename ContentView.keepElementsScrolledToTheBottom to ContentView.shouldKeepElementsScrolledToBottom.
15459
15460        Reviewed by Dan Bernstein.
15461
15462        * UserInterface/ContentView.js:
15463        (WebInspector.ContentView.prototype.get shouldKeepElementsScrolledToBottom):
15464        * UserInterface/ContentViewContainer.js:
15465        (WebInspector.ContentViewContainer.prototype._saveScrollPositionsForContentView):
15466        * UserInterface/LogContentView.js:
15467        (WebInspector.LogContentView.prototype.get shouldKeepElementsScrolledToBottom):
15468        * UserInterface/TimelinesContentView.js:
15469        (WebInspector.TimelinesContentView.prototype.get shouldKeepElementsScrolledToBottom):
15470
154712012-11-04  Timothy Hatcher  <timothy@apple.com>
15472
15473        Save and restore the timeline scroll positions when going back and forth between views.
15474
15475        Reviewed by Dan Bernstein and Joseph Pecoraro.
15476
15477        * UserInterface/TimelinesContentView.js:
15478        (WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Save and restore
15479        the scroll position when swapping the DataGrids.
15480        (WebInspector.TimelinesContentView.prototype.get scrollableElements): Added.
15481        (WebInspector.TimelinesContentView.prototype.get keepElementsScrolledToTheBottom): Added.
15482
154832012-11-04  Timothy Hatcher  <timothy@apple.com>
15484
15485        Show the Initiator for the layout and style events in the Layout and Rendering timeline.
15486
15487        This removes the Area column to make room.
15488
15489        <rdar://problem/10935408> PARITY (WebKit Web Inspector): Add initiator information to the timeline
15490        data grids (e.g. JS stacks for RecalcStyle, Layout and Painting)
15491
15492        Reviewed by Ricky Mondello and Joseph Pecoraro.
15493
15494        * Localizations/en.lproj/localizedStrings.js: Updated.
15495        * UserInterface/CallFrame.js:
15496        (WebInspector.CallFrame): Added nativeCode parameter. Allow more null parameters in asserts.
15497        (WebInspector.CallFrame.prototype.get nativeCode): Ditto.
15498        * UserInterface/LayoutTimelineDataGridNode.js:
15499        (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent): Removed "area" and added
15500        "initiatorCallFrame" support.
15501        * UserInterface/LayoutTimelineRecord.js:
15502        (WebInspector.LayoutTimelineRecord): Added callFrames parameter.
15503        (WebInspector.LayoutTimelineRecord.prototype.get callFrames): Added.
15504        (WebInspector.LayoutTimelineRecord.prototype.get initiatorCallFrame): Added.
15505        * UserInterface/Main.js:
15506        (WebInspector.createSourceCodeLocationLink): Added helper.
15507        * UserInterface/TimelineManager.js:
15508        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Build CallFrames from the
15509        record stack trace.
15510        (WebInspector.TimelineManager.prototype._callFramesFromPayload): Added.
15511        (WebInspector.TimelineManager.prototype._callFramesFromPayload.createCallFrame): Added.
15512        * UserInterface/TimelinesContentView.css:
15513        (.content-view.timelines > .data-grid td .subtitle): Added.
15514        (.content-view.timelines > .data-grid:focus tr.selected td .subtitle): Added.
15515        (.content-view.timelines > .data-grid td .icon): Simplified selector to work with any column.
15516        * UserInterface/TimelinesContentView.js:
15517        (WebInspector.TimelinesContentView): Added Initiator column.
15518        (WebInspector.TimelinesContentView.prototype._sortComparator): Added support for comparing CallFrame.
15519
155202012-11-03  Timothy Hatcher  <timothy@apple.com>
15521
15522        Rename ScriptLocation to SourceCodeLocation so it can be reused for more generic stack traces.
15523
15524        Rubber-stamped by Dan Bernstein.
15525
15526        * UserInterface/CallFrame.js:
15527        (WebInspector.CallFrame):
15528        (WebInspector.CallFrame.prototype.get sourceCodeLocation):
15529        * UserInterface/CallFrameTreeElement.js:
15530        (WebInspector.CallFrameTreeElement):
15531        * UserInterface/DebugSidebarPanel.js:
15532        (WebInspector.DebugSidebarPanel.prototype._treeElementSelected):
15533        * UserInterface/DebuggerManager.js:
15534        (WebInspector.DebuggerManager.prototype.debuggerDidPause):
15535        (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
15536        * UserInterface/Main.html:
15537        * UserInterface/SourceCodeLocation.js: Renamed from WebInspector/UserInterface/ScriptLocation.js.
15538        (WebInspector.SourceCodeLocation):
15539        (WebInspector.SourceCodeLocation.prototype.get sourceCode):
15540        (WebInspector.SourceCodeLocation.prototype.get lineNumber):
15541        (WebInspector.SourceCodeLocation.prototype.get columnNumber):
15542        * UserInterface/SourceCodeTextEditor.js:
15543        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
15544        (WebInspector.SourceCodeTextEditor.prototype._matchesSourceCodeLocation):
15545
155462012-11-03  Timothy Hatcher  <timothy@apple.com>
15547
15548        Start showing "Invalidate Styles" and "Invalidate Layout" in the Layout and Rendering timeline.
15549
15550        These records will be the one showing the initiator (back trace) information.
15551
15552        Part of: <rdar://problem/10935408> PARITY (WebKit Web Inspector): Add initiator information to the timeline
15553        data grids (e.g. JS stacks for RecalcStyle, Layout and Painting)
15554
15555        Reviewed by Joseph Pecoraro.
15556
15557        * Localizations/en.lproj/localizedStrings.js: Updated.
15558        * UserInterface/LayoutTimelineRecord.js:
15559        (WebInspector.LayoutTimelineRecord.EventType.displayName): Support InvalidateStyles and InvalidateLayout.
15560        * UserInterface/TimelineManager.js:
15561        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Handle "ScheduleStyleRecalculation"
15562        and "InvalidateLayout" and create records for them.
15563
155642012-11-03  Timothy Hatcher  <timothy@apple.com>
15565
15566        Round width and height in the metrics sidebar to the nearest hundredth.
15567
15568        Width and height were missed when the other metrics started to be rounded. This also fixes
15569        editing by using the unrounded value instead of keeping the tilde. Also append "px" when
15570        updating the style if there is a decimal value.
15571
15572        Reviewed by Joseph Pecoraro.
15573
15574        * UserInterface/BoxModelDetailsSectionRow.js:
15575        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement): Added. Moved from
15576        the createBoxPartElement function.
15577        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement): Use createElement.
15578        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaWidthElement): Renamed
15579        from getContentAreaWidthPx. Use createElement.
15580        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaHeightElement): Renamed
15581        from getContentAreaHeightPx. Use createElement.
15582        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics): Use createContentAreaWidthElement
15583        and createContentAreaHeightElement instead.
15584        (WebInspector.BoxModelDetailsSectionRow.prototype._startEditing): If the target element has a title use
15585        it as the editing value since the current text is likely truncated/rounded.
15586        (WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput): Account for decimals values.
15587
155882012-11-03  Timothy Hatcher  <timothy@apple.com>
15589
15590        Clear the quick console when navigating to another page.
15591
15592        When reloading the same page we insert a divider.
15593
15594        <rdar://problem/11194811> Quick Console does not clear on navigation/refresh
15595
15596        Reviewed by Joseph Pecoraro.
15597
15598        * UserInterface/ConsoleGroup.js:
15599        (WebInspector.ConsoleGroup): Added newSession parameter and style class.
15600        * UserInterface/JavaScriptLogViewController.js:
15601        (WebInspector.JavaScriptLogViewController): Removed group creation and call startNewSession.
15602        (WebInspector.JavaScriptLogViewController.prototype.clear): Call startNewSession passing true.
15603        (WebInspector.JavaScriptLogViewController.prototype.startNewSession): Added. Moved parts
15604        from clear and the constructor.
15605        * UserInterface/LogContentView.css:
15606        (.console-messages > .console-group:last-of-type .console-user-command): Added.
15607        (.console-message, .console-user-command): Removed border-bottom.
15608        (.console-message:not(:last-child), .console-user-command:not(:last-child)): Added.
15609        (.console-group:not(:first-child)): Added.
15610        (.console-group.new-session): Added.
15611        * UserInterface/LogContentView.js:
15612        (WebInspector.LogContentView.prototype._activeLogCleared): Check isWaitingForResult
15613        to make sure this was the console that requested the clear.
15614        * UserInterface/QuickConsole.css:
15615        (.quick-console > .toolbar): Added shadow to look like a border on the toolbar. This
15616        is needed now that the last console message does not have a bottom-border.
15617        * UserInterface/QuickConsole.js:
15618        (WebInspector.QuickConsole):
15619        (WebInspector.QuickConsole.prototype.didClearMessages): Clear _lastMessage and _lastMessageIgnored.
15620        (WebInspector.QuickConsole.prototype._activeLogCleared): Check isWaitingForResult
15621        to make sure this was the console that requested the clear.
15622        (WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated):
15623        (WebInspector.QuickConsole.prototype._logsCleared): Added.
15624        (WebInspector.QuickConsole.prototype._sessionStarted): Added.
15625
156262012-10-31  Timothy Hatcher  <timothy@apple.com>
15627
15628        Don't show 'undefined' in the console after sending the clear() command.
15629
15630        Reviewed by Ada Chan.
15631
15632        * UserInterface/JavaScriptLogViewController.js:
15633        (WebInspector.JavaScriptLogViewController): Set _cleared to true.
15634        (WebInspector.JavaScriptLogViewController.prototype.clear): Ditto.
15635        (WebInspector.JavaScriptLogViewController.prototype.printResult): Return early if _cleared.
15636        (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Set _cleared to false.
15637
156382012-10-31  Timothy Hatcher  <timothy@apple.com>
15639
15640        Allow independently clearing either the log view or the quick console.
15641
15642        This fixes up the clearing process and mostly decouples it from LogManager.
15643        The ActiveLogCleared event is now only used to honor the clear() command.
15644        This also adds the Clear Log context menu item to the Quick Console.
15645
15646        Reviewed by Antoine Quint.
15647
15648        * UserInterface/JavaScriptLogViewController.js:
15649        (WebInspector.JavaScriptLogViewController.prototype.clear): Focus the prompt
15650        and call the new didClearMessages delegate function.
15651        (WebInspector.JavaScriptLogViewController.prototype._requestClearMessages): Removed.
15652        (WebInspector.JavaScriptLogViewController.prototype._promptKeyDown): Call clear
15653        instead of _requestClearMessages.
15654        * UserInterface/LogContentView.js:
15655        (WebInspector.LogContentView.prototype.didClearMessages): Added. Tell LogManager.
15656        (WebInspector.LogContentView.prototype._activeLogCleared): Only clear this log if
15657        it is being used at the time.
15658        (WebInspector.LogContentView.prototype._clearLog): Call clear instead of requestClearMessages.
15659        * UserInterface/QuickConsole.js:
15660        (WebInspector.QuickConsole.prototype.didClearMessages): Added.
15661        (WebInspector.QuickConsole.prototype.didAppendConsoleMessage): Set _cleared to false.
15662        (WebInspector.QuickConsole.prototype._viewContainerHandleContextMenuEvent): Added Clear Log
15663        context menu item.
15664        (WebInspector.QuickConsole.prototype._clearLog): Added.
15665        (WebInspector.QuickConsole.prototype._activeLogCleared): Only clear this log if it is
15666        being used at the time. Move code from here to didClearMessages.
15667        (WebInspector.QuickConsole.prototype._messageAdded): Even if we show the message,
15668        remember it in case we get an updated repeat count later.
15669        (WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated):
15670
156712012-10-31  Timothy Hatcher  <timothy@apple.com>
15672
15673        Add an option to make the Quick Console only show messages while actively debugging.
15674
15675        This adds a context menu item to toggle the option. When "Always Show Console Messages"
15676        is unchecked then console messages will only show when evaluating and expression or
15677        stepping through code in the debugger. The default is to always show messages.
15678
15679        <rdar://problem/11194915> REGRESSION (Safari 6): Console messages are not echoed to Quick Console
15680
15681        Reviewed by Brian Weinstein.
15682
15683        * Localizations/en.lproj/localizedStrings.js: Updated.
15684        * UserInterface/JavaScriptLogViewController.js:
15685        (WebInspector.JavaScriptLogViewController.prototype.isWaitingForResult): Added.
15686        (WebInspector.JavaScriptLogViewController.prototype._appendCommand): Set _waitingForResult.
15687        (WebInspector.JavaScriptLogViewController.prototype._appendCommand.printResult): Clear _waitingForResult.
15688        * UserInterface/QuickConsole.js:
15689        (WebInspector.QuickConsole): Added event listeners for the contextmenu event.
15690        (WebInspector.QuickConsole.prototype._viewContainerHandleContextMenuEvent): Added. Create and
15691        show the context menu with the new option.
15692        (WebInspector.QuickConsole.prototype._toggleAlwaysShowConsoleMessages): Added. Toggle the setting.
15693        (WebInspector.QuickConsole.prototype._activeLogCleared): Clear the ignored emssage.
15694        (WebInspector.QuickConsole.prototype._shouldAddNewMessage): Added.
15695        (WebInspector.QuickConsole.prototype._messageAdded): Check _shouldAddNewMessage before appending.
15696        Squirrel away the ignored message incase we need to show it later.
15697        (WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated): Check _shouldAddNewMessage.
15698        Appended the squirreled away the ignored message first.
15699
157002012-10-30  Timothy Hatcher  <timothy@apple.com>
15701
15702        Remember and restore the console history between page reloads and Web Inspector sessions.
15703
15704        <rdar://problem/11343640> REGRESSION (Safari 6): Log panel console history of commands
15705        (up/down arrows) lost after page navigation
15706
15707        Reviewed by Brian Weinstein.
15708
15709        * UserInterface/JavaScriptLogViewController.js:
15710        (WebInspector.JavaScriptLogViewController): Create the setting and initialize the prompt.
15711        (WebInspector.JavaScriptLogViewController.prototype.printResult): Update the history setting
15712        with the last 30 commands.
15713        * UserInterface/LogContentView.js:
15714        (WebInspector.LogContentView): Pass a history setting identifier.
15715        * UserInterface/QuickConsole.js:
15716        (WebInspector.QuickConsole): Ditto.
15717
157182012-10-30  Timothy Hatcher  <timothy@apple.com>
15719
15720        Echo console messages to the Web Inspector's quick console.
15721
15722        <rdar://problem/11194915> REGRESSION (Safari 6): Console messages are not echoed to Quick Console
15723
15724        Reviewed by Ada Chan.
15725
15726        * UserInterface/QuickConsole.js:
15727        (WebInspector.QuickConsole): Listen for MessageAdded and PreviousMessageRepeatCountUpdated.
15728        (WebInspector.QuickConsole.prototype.didAppendConsoleMessage): Only auto expand and scroll down
15729        for result messages.
15730        (WebInspector.QuickConsole.prototype._messageAdded): Added. Call through.
15731        (WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated): Added. Call through.
15732
157332012-10-30  Timothy Hatcher  <timothy@apple.com>
15734
15735        Make JavaScriptLogViewController keep track of the previous message and repeat counts.
15736
15737        Part of: <rdar://problem/11194915> REGRESSION (Safari 6): Console messages are not echoed to Quick Console
15738
15739        Reviewed by Ada Chan.
15740
15741        * UserInterface/JavaScriptLogViewController.js:
15742        (WebInspector.JavaScriptLogViewController): Don't store _messages, it wasn't used. Added _previousMessage
15743        and _repeatCountWasInterrupted.
15744        (WebInspector.JavaScriptLogViewController.prototype.clear): Reset _previousMessage and _repeatCountWasInterrupted.
15745        (WebInspector.JavaScriptLogViewController.prototype.appendConsoleMessage): Clone the message since there might be
15746        multiple clients using the message, and since the message has a DOM element it can't be two places at once.
15747        (WebInspector.JavaScriptLogViewController.prototype.updatePreviousMessageRepeatCount): Added. Moved from LogManager.
15748        (WebInspector.JavaScriptLogViewController.prototype._appendCommand): Pass true to _appendConsoleMessage to set the
15749        _repeatCountWasInterrupted flag and not set _previousMessage.
15750        (WebInspector.JavaScriptLogViewController.prototype._appendCommand.printResult): Ditto.
15751        (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Set _repeatCountWasInterrupted and only
15752        set _previousMessage when repeatCountWasInterrupted is false. Don't store _messages, it wasn't used.
15753        * UserInterface/LogContentView.js:
15754        (WebInspector.LogContentView.prototype.updatePreviousMessageRepeatCount): Added. Call through.
15755        * UserInterface/LogManager.js:
15756        (WebInspector.LogManager): Remove initialize call.
15757        (WebInspector.LogManager.prototype.initialize): Removed. Not needed.
15758        (WebInspector.LogManager.prototype.messageWasAdded): Dispatch the message in an object, not as data directly.
15759        Assert the message was not used directly, it should be cloned.
15760        (WebInspector.LogManager.prototype.messagesCleared): Removed call to initialize.
15761        (WebInspector.LogManager.prototype.messageRepeatCountUpdated): MOved to JavaScriptLogViewController.
15762        Fire PreviousMessageRepeatCountUpdated event instead.
15763        (WebInspector.LogManager.prototype._mainResourceDidChange): Removed initialize call.
15764        (WebInspector.LogManager.prototype._addMessage): Removed.
15765        * UserInterface/LogSidebarPanel.js:
15766        (WebInspector.LogSidebarPanel): Added event listener for PreviousMessageRepeatCountUpdated.
15767        (WebInspector.LogSidebarPanel.prototype._messageAdded): Get message off data object. Update comment.
15768        (WebInspector.LogSidebarPanel.prototype._previousMessageRepeatCountUpdated): Added. Call through to current view.
15769
157702012-10-30  Timothy Hatcher  <timothy@apple.com>
15771
15772        Change the icons for Debug, Storage and Log navigators.
15773
15774        This also renamed Debug Navigator to Call Stack Navigator and moved
15775        it and Issue to the end of the list since they are not always visible.
15776        I updated the keyboard shortcut numbers to match the new order.
15777
15778        For better balance, I updated the Breakpoint and Issue icons.
15779
15780        To help clarify these navigation items I added "Navigator" or "Details"
15781        to the tooltips, so they are no longer just singular word tooltips.
15782
15783        <rdar://problem/11991020> Debug icon is unintuitive, consider a new icon
15784        <rdar://problem/12598939> Storage icon is unintuitive, consider a new icon
15785        <rdar://problem/12596756> Log icon is unintuitive, consider a new icon
15786
15787        Reviewed by Conrad Shultz.
15788
15789        * Localizations/en.lproj/localizedStrings.js: Updated.
15790        * UserInterface/AppearanceDetailsSidebarPanel.js:
15791        (WebInspector.AppearanceDetailsSidebarPanel):
15792        * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
15793        (WebInspector.ApplicationCacheDetailsSidebarPanel):
15794        * UserInterface/BreakpointSidebarPanel.js:
15795        (WebInspector.BreakpointSidebarPanel):
15796        * UserInterface/CSSStyleDetailsSidebarPanel.js:
15797        (WebInspector.CSSStyleDetailsSidebarPanel):
15798        * UserInterface/DOMNodeDetailsSidebarPanel.js:
15799        (WebInspector.DOMNodeDetailsSidebarPanel):
15800        * UserInterface/DebugSidebarPanel.js:
15801        (WebInspector.DebugSidebarPanel):
15802        * UserInterface/Images/NavigationItemBreakpoint.pdf: Changed.
15803        * UserInterface/Images/NavigationItemFunction.pdf: Added.
15804        * UserInterface/Images/NavigationItemLog.pdf: Changed.
15805        * UserInterface/Images/NavigationItemStorage.pdf: Changed.
15806        * UserInterface/Images/NavigationItemWarning.pdf: Changed.
15807        * UserInterface/InstrumentSidebarPanel.js:
15808        (WebInspector.InstrumentSidebarPanel):
15809        * UserInterface/IssueSidebarPanel.js:
15810        (WebInspector.IssueSidebarPanel):
15811        * UserInterface/LogSidebarPanel.js:
15812        (WebInspector.LogSidebarPanel):
15813        * UserInterface/Main.js:
15814        (WebInspector.contentLoaded):
15815        * UserInterface/ResourceDetailsSidebarPanel.js:
15816        (WebInspector.ResourceDetailsSidebarPanel):
15817        * UserInterface/ResourceSidebarPanel.js:
15818        (WebInspector.ResourceSidebarPanel):
15819        * UserInterface/ScopeChainDetailsSidebarPanel.js:
15820        (WebInspector.ScopeChainDetailsSidebarPanel):
15821        * UserInterface/SearchSidebarPanel.js:
15822        (WebInspector.SearchSidebarPanel):
15823        * UserInterface/StorageSidebarPanel.js:
15824        (WebInspector.StorageSidebarPanel):
15825
158262012-10-28  Mark Rowe  <mrowe@apple.com>
15827
15828        Remove references to unsupported OS and Xcode versions.
15829
15830        Reviewed by Dan Bernstein.
15831
15832        * Configurations/Base.xcconfig:
15833        * Configurations/CompilerVersion.xcconfig: Removed.
15834        * WebInspectorUI.xcodeproj/project.pbxproj: Remove reference to CompilerVersion.xcconfig.
15835
158362012-10-29  Timothy Hatcher  <timothy@apple.com>
15837
15838        Make the Web Inspector's clear() command work in the console again.
15839
15840        <rdar://problem/11007383> REGRESSION (Safari 6): Should be able to clear current console log via clear() command
15841
15842        Reviewed by Ada Chan.
15843
15844        * UserInterface/ConsoleObserver.js:
15845        (WebInspector.ConsoleObserver.prototype.messagesCleared): Call LogManager.messagesCleared.
15846        * UserInterface/LogManager.js:
15847        (WebInspector.LogManager.prototype.messageWasAdded): Added comment about ConsoleObserver.
15848        (WebInspector.LogManager.prototype.messagesCleared): Added. Moved from requestClearMessages.
15849        (WebInspector.LogManager.prototype.messageRepeatCountUpdated): Added comment about ConsoleObserver.
15850        (WebInspector.LogManager.prototype.requestClearMessages): Removed clearing since that happens
15851        in messagesCleared now in response to the request.
15852
158532012-10-29  Timothy Hatcher  <timothy@apple.com>
15854
15855        Allow resizing the docked Web Inspector from any empty space in the navigation bars.
15856
15857        <rdar://problem/11964849> REGRESSION (Safari 6): Resizing the docked Web Inspector is not easy
15858
15859        Reviewed by Ada Chan.
15860
15861        * UserInterface/Main.css:
15862        (body.docked #details-sidebar > .navigation-bar): Show row-resize cursor.
15863        (body.docked #details-sidebar > .navigation-bar .item:not(.flexible-space)): Reset the cursor to default.
15864        * UserInterface/Main.js:
15865        (WebInspector.contentLoaded): Add event listeners to the navigation bars.
15866
158672012-10-28  Timothy Hatcher  <timothy@apple.com>
15868
15869        Use a specific icon for application cache manifests instead of the generic document icon.
15870
15871        <rdar://problem/11427380> In Storage navigator Application Cache icon should be better than a generic document icon
15872
15873        Reviewed by Ricky Mondello.
15874
15875        * UserInterface/ApplicationCacheIcons.css:
15876        (.application-cache-manifest .icon): Use the new icons.
15877        * UserInterface/Images/ApplicationCacheManifest.png: Added.
15878        * UserInterface/Images/ApplicationCacheManifest@2x.png: Added.
15879
158802012-10-28  Joseph Pecoraro  <pecoraro@apple.com>
15881
15882        Make radio navigation buttons only switch for the left mouse button.
15883
15884        <rdar://problem/11795081> Right-clicking navigator icons produces unexpected results
15885
15886        Reviewed by Timothy Hatcher.
15887
15888        * UserInterface/NavigationBar.js:
15889        (WebInspector.NavigationBar.prototype._mouseDown): Return early if event.button !== 0.
15890        (WebInspector.NavigationBar.prototype._mouseMoved): Assert event.button !== 0.
15891        (WebInspector.NavigationBar.prototype._mouseUp): Ditto.
15892
158932012-10-27  Timothy Hatcher  <timothy@apple.com>
15894
15895        Make the network timeline bars and callouts HiDPI compliant.
15896
15897        <rdar://problem/10643175> Timeline pills/callouts should be made HiDPI compliant
15898
15899        Reviewed by Sam Weinig.
15900
15901        * UserInterface/Images/NetworkBarBlue.png: Added.
15902        * UserInterface/Images/NetworkBarBlue@2x.png: Added.
15903        * UserInterface/Images/NetworkBarGray.png: Added.
15904        * UserInterface/Images/NetworkBarGray@2x.png: Added.
15905        * UserInterface/Images/NetworkBarGreen.png: Added.
15906        * UserInterface/Images/NetworkBarGreen@2x.png: Added.
15907        * UserInterface/Images/NetworkBarLabelCalloutLeft.pdf: Added.
15908        * UserInterface/Images/NetworkBarLabelCalloutRight.pdf: Added.
15909        * UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.pdf: Added.
15910        * UserInterface/Images/NetworkBarLabelCalloutWhiteRight.pdf: Added.
15911        * UserInterface/Images/NetworkBarOrange.png: Added.
15912        * UserInterface/Images/NetworkBarOrange@2x.png: Added.
15913        * UserInterface/Images/NetworkBarPurple.png: Added.
15914        * UserInterface/Images/NetworkBarPurple@2x.png: Added.
15915        * UserInterface/Images/NetworkBarRed.png: Added.
15916        * UserInterface/Images/NetworkBarRed@2x.png: Added.
15917        * UserInterface/Images/NetworkBarWhiteFlat.png: Added.
15918        * UserInterface/Images/NetworkBarWhiteFlat@2x.png: Added.
15919        * UserInterface/Images/NetworkBarYellow.png: Added.
15920        * UserInterface/Images/NetworkBarYellow@2x.png: Added.
15921        * UserInterface/Images/NetworkHollowBarBlue.png: Added.
15922        * UserInterface/Images/NetworkHollowBarBlue@2x.png: Added.
15923        * UserInterface/Images/NetworkHollowBarGray.png: Added.
15924        * UserInterface/Images/NetworkHollowBarGray@2x.png: Added.
15925        * UserInterface/Images/NetworkHollowBarGreen.png: Added.
15926        * UserInterface/Images/NetworkHollowBarGreen@2x.png: Added.
15927        * UserInterface/Images/NetworkHollowBarOrange.png: Added.
15928        * UserInterface/Images/NetworkHollowBarOrange@2x.png: Added.
15929        * UserInterface/Images/NetworkHollowBarPurple.png: Added.
15930        * UserInterface/Images/NetworkHollowBarPurple@2x.png: Added.
15931        * UserInterface/Images/NetworkHollowBarRed.png: Added.
15932        * UserInterface/Images/NetworkHollowBarRed@2x.png: Added.
15933        * UserInterface/Images/NetworkHollowBarYellow.png: Added.
15934        * UserInterface/Images/NetworkHollowBarYellow@2x.png: Added.
15935        * UserInterface/Images/graphLabelCalloutLeft.png: Removed.
15936        * UserInterface/Images/graphLabelCalloutLeftWhite.png: Removed.
15937        * UserInterface/Images/graphLabelCalloutRight.png: Removed.
15938        * UserInterface/Images/graphLabelCalloutRightWhite.png: Removed.
15939        * UserInterface/Images/timelineHollowPillBlue.png: Removed.
15940        * UserInterface/Images/timelineHollowPillGray.png: Removed.
15941        * UserInterface/Images/timelineHollowPillGreen.png: Removed.
15942        * UserInterface/Images/timelineHollowPillOrange.png: Removed.
15943        * UserInterface/Images/timelineHollowPillPurple.png: Removed.
15944        * UserInterface/Images/timelineHollowPillRed.png: Removed.
15945        * UserInterface/Images/timelineHollowPillYellow.png: Removed.
15946        * UserInterface/Images/timelinePillBlue.png: Removed.
15947        * UserInterface/Images/timelinePillGray.png: Removed.
15948        * UserInterface/Images/timelinePillGreen.png: Removed.
15949        * UserInterface/Images/timelinePillOrange.png: Removed.
15950        * UserInterface/Images/timelinePillPurple.png: Removed.
15951        * UserInterface/Images/timelinePillRed.png: Removed.
15952        * UserInterface/Images/timelinePillWhiteFlat.png: Removed.
15953        * UserInterface/Images/timelinePillYellow.png: Removed.
15954        * UserInterface/NetworkTimeline.css:
15955        (.network-graph-label.before):
15956        (.network-graph-label.before::after):
15957        (.network-graph-label.after):
15958        (.network-graph-label.after::before):
15959        (.network-graph-bar):
15960        (.resource-cached .network-graph-bar):
15961        (.network-resource-type-document .network-graph-bar):
15962        (.network-resource-type-document.resource-cached .network-graph-bar):
15963        (.network-resource-type-stylesheet .network-graph-bar):
15964        (.network-resource-type-stylesheet.resource-cached .network-graph-bar):
15965        (.network-resource-type-image .network-graph-bar):
15966        (.network-resource-type-image.resource-cached .network-graph-bar):
15967        (.network-resource-type-font .network-graph-bar):
15968        (.network-resource-type-font.resource-cached .network-graph-bar):
15969        (.network-resource-type-script .network-graph-bar):
15970        (.network-resource-type-script.resource-cached .network-graph-bar):
15971        (.network-resource-type-xhr .network-graph-bar):
15972        (.network-resource-type-xhr.resource-cached .network-graph-bar):
15973        (.network-resource-type-other .network-graph-bar):
15974        (.network-resource-type-other.resource-cached .network-graph-bar):
15975        (.data-grid:focus tr.selected .network-graph-bar):
15976        (.data-grid:focus tr.selected .resource-cached .network-graph-bar):
15977        (.data-grid:focus tr.selected .network-graph-label.before::after):
15978        (.data-grid:focus tr.selected .network-graph-label.after::before):
15979
159802012-10-26  Timothy Hatcher  <timothy@apple.com>
15981
15982        Clear the issue navigator sidebar when the active log is cleared.
15983
15984        Reviewed by Ada Chan.
15985
15986        * UserInterface/IssueManager.js:
15987        (WebInspector.IssueManager): Listen for the ActiveLogCleared event.
15988        (WebInspector.IssueManager.prototype.initialize): Dispatch the Cleared event.
15989        (WebInspector.IssueManager.prototype._activeLogCleared): Added. Call initialize.
15990        (WebInspector.IssueManager.prototype._mainResourceDidChange): Just call initialize
15991        since it now dispatches the Cleared event.
15992        * UserInterface/Main.js:
15993        (WebInspector.contentLoaded): Create logManager before issueManager so IssueManager
15994        can listen for the ActiveLogCleared event.
15995
159962012-10-26  Timothy Hatcher  <timothy@apple.com>
15997
15998        Clean up LogContentView and make clearing the console have straightforward code path.
15999
16000        The icon for the trashcan was also 1px too low and not embossed.
16001
16002        Reviewed by Brian Weinstein.
16003
16004        * UserInterface/Images/NavigationItemTrash.pdf: Updated.
16005        * UserInterface/LogContentView.css:
16006        (.console-messages): Changed from #console-messages.
16007        (.console-messages a): Ditto.
16008        (.console-messages a:hover): Ditto.
16009        * UserInterface/LogContentView.js:
16010        (WebInspector.LogContentView): Don't set ids on elements. Remove unused className.
16011        Directly listen for the ActiveLogCleared event. Remove true from the end of the
16012        ButtonNavigationItem for the clear button to make it embossed.
16013        (WebInspector.LogContentView.prototype.disable): Set _disabled. Also disable the clear
16014        button and add a FIXME.
16015        (WebInspector.LogContentView.prototype.consoleCleared): Removed. Replaced by _activeLogCleared.
16016        (WebInspector.LogContentView.prototype.closed): Added.
16017        (WebInspector.LogContentView.prototype.didAppendConsoleMessage): Removed. Stop firing
16018        and event no one listens for.
16019        (WebInspector.LogContentView.prototype._handleContextMenuEvent): Use _clearLog. Don't
16020        add the context menu item for disabled logs.
16021        (WebInspector.LogContentView.prototype._requestClearMessages): Removed. Replaced by _clearLog.
16022        (WebInspector.LogContentView.prototype._activeLogCleared): Added.
16023        (WebInspector.LogContentView.prototype._clearLog): Call WebInspector.logManager.requestClearMessages
16024        and wait for the ActiveLogCleared event.
16025        * UserInterface/LogSidebarPanel.js:
16026        (WebInspector.LogSidebarPanel): Removed ActiveLogCleared event listener.
16027        (WebInspector.LogSidebarPanel.prototype._activeLogCleared): Removed.
16028
160292012-10-26  Timothy Hatcher  <timothy@apple.com>
16030
16031        Update all of the generated icons in the Web Inspector when the device pixel ratio changes.
16032
16033        <rdar://problem/12579083> Update generated images as the window moves between 1x and 2x screens
16034
16035        Reviewed by Ricky Mondello.
16036
16037        * UserInterface/ImageUtilities.js:
16038        (generateColoredImagesForCSS): Added matchMedia listener.
16039        (generateColoredImagesForCSS.generateImages): Renamed from imageLoaded.
16040        (generateEmbossedImages): Added matchMedia listener.
16041        (generateEmbossedImages._generateImages): Renamed from _imageLoaded.
16042
160432012-10-25  Timothy Hatcher  <timothy@apple.com>
16044
16045        Make ImageUtilities.js in Web Inspector webkitGetImageDataHD and webkitGetImageDataHD.
16046
16047        Since the 2x canvas approach was no longer working we now only generate one canvas that
16048        matches the device pixel ratio. This does not properly update as the Web Inspector
16049        changes screens, and that is tracked by <rdar://problem/12579083>.
16050
16051        The icons are still blurry in HiDPI, and that is tracked by <rdar://problem/12574189>.
16052
16053        <rdar://problem/12579056> Update ImageUtilities.js to properly work in HIDPI
16054
16055        Reviewed by Antoine Quint.
16056
16057        * UserInterface/ActivateButtonNavigationItem.js:
16058        (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText): Remove 2x selectors.
16059        * UserInterface/ButtonNavigationItem.js:
16060        (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Ditto.
16061        * UserInterface/RadioButtonNavigationItem.js:
16062        (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Ditto.
16063
16064        * UserInterface/CSSStyleDetailsSidebarPanel.css: Remove 2x selectors and media queries.
16065        * UserInterface/DOMTreeOutline.css: Ditto.
16066        * UserInterface/DataGrid.css: Ditto.
16067        * UserInterface/DetailsSection.css: Ditto.
16068        * UserInterface/LogContentView.css: Ditto.
16069        * UserInterface/Main.css: Ditto.
16070        * UserInterface/NavigationSidebarPanel.css: Ditto.
16071        * UserInterface/Section.css: Ditto.
16072        * UserInterface/TimelinesContentView.css: Ditto.
16073
16074        * UserInterface/ImageUtilities.js:
16075        (generateColoredImage): Use webkitGetImageDataHD and webkitPutImageDataHD.
16076        (generateColoredImagesForCSS): Stop generating 2x versions.
16077        (generateEmbossedImages): Stop generating 2x versions. Use webkitGetImageDataHD and
16078        webkitPutImageDataHD.
16079
160802012-10-25  Korhan Bircan  <kbircan@apple.com>
16081
16082        Fix for "<rdar://problem/12120092> REGRESSION (Safari 6): No button to clear the Log view or Quick Console".
16083
16084        Reviewed by Timothy Hatcher.
16085
16086        There's no "Clear Console" button in the log content view and we only support Command-K shortcut
16087        to clear the console. This is a missing feature that has been mentioned a few times on Twitter
16088        and Stack Overflow. This patch adds a "Clear Console" button in the navigation bar where we think
16089        is a good place for discoverability.
16090
16091        We can likely do the same for the Quick Console once we decide where the best place to put the
16092        button is.
16093
16094        * Localizations/en.lproj/localizedStrings.js: Regenerated after adding the tooltip.
16095        * UserInterface/Images/NavigationItemTrash.pdf: Added.
16096        * UserInterface/LogContentView.js:
16097        Added a navigation item button with a trashcan icon for clearing the console log.
16098        Renamed context menu tooltip from "Clear Console" to "Clear Log" for consistency.
16099
161002012-10-25  Timothy Hatcher  <timothy@apple.com>
16101
16102        Correct the blurriness of the Close, Dock and Undock navigation items in the Web Inspector.
16103
16104        <rdar://problem/12573816> Close, Dock and Undock navigation items are blurry
16105
16106        Reviewed by Dan Bernstein.
16107
16108        * UserInterface/ButtonNavigationItem.js:
16109        (WebInspector.ButtonNavigationItem.prototype._generateImages): Pass _imageHeight instead of _imageWidth again.
16110
161112012-10-25  Timothy Hatcher  <timothy@apple.com>
16112
16113        Darken the blue used for Web Inspector active navigation items to have better contrast.
16114
16115        This also adds a slight glow to simulate that these buttons have a blue light.
16116
16117        Reviewed by Antoine Quint.
16118
16119        * UserInterface/ImageUtilities.js:
16120        (._createEmbossedCanvasImage): Tweak the colors and add a glow.
16121
161222012-10-24  Timothy Hatcher  <timothy@apple.com>
16123
16124        Hide empty navigation sidebars in the Web Inspector until they have content.
16125
16126        This hides Issues, Debug and Storage if they are empty. This frees up the navigation
16127        bar and makes it less intimidating in most cases.
16128
16129        <rdar://problem/12569339> Empty navigation sidebars should be hidden until they have content.
16130
16131        Rubber-stamped by Antoine Quint.
16132
16133        * UserInterface/DebugSidebarPanel.js:
16134        (WebInspector.DebugSidebarPanel.prototype._showNotPausedEmptyContentPlaceholder): Pass true
16135        to showEmptyContentPlaceholder to indicate the navigation item should be hidden too.
16136        * UserInterface/IssueSidebarPanel.js:
16137        (WebInspector.IssueSidebarPanel): Pass true to NavigationSidebarPanel for auto-hiding.
16138        * UserInterface/NavigationItem.js:
16139        (WebInspector.NavigationItem.prototype.set hidden): Update layout os items expand and collapse
16140        as the space available changes.
16141        * UserInterface/NavigationSidebarPanel.js:
16142        (WebInspector.NavigationSidebarPanel): Start the navigation bar out as hidden if auto-hiding.
16143        (WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder): Call
16144        _updateNavigationItemVisibility after setting _hideNavigationItemWhenEmpty.
16145        (WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder): Ditto.
16146        (WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder): Call
16147        _updateNavigationItemVisibility.
16148        (WebInspector.NavigationSidebarPanel.prototype.shown): Force navigation item visible.
16149        (WebInspector.NavigationSidebarPanel.prototype.hidden): Added. Call _updateNavigationItemVisibility.
16150        (WebInspector.NavigationSidebarPanel.prototype._updateNavigationItemVisibility): Added.
16151        * UserInterface/StorageSidebarPanel.js:
16152        (WebInspector.StorageSidebarPanel): Pass true to NavigationSidebarPanel for auto-hiding.
16153
161542012-10-24  Timothy Hatcher  <timothy@apple.com>
16155
16156        Make Command-Shift-C toggle the "point to inspect" mode.
16157
16158        This shortcut originates from Firebug and is also available in Chrome. To make this work
16159        I had to make DOMTreeManager keep track of the state and fire an event when it changed.
16160        That way the global shortcut could toggle the mode even if there isn't a FrameContentView.
16161        This also allows all the FrameContentViews to keep in sync with the global switch.
16162
16163        <rdar://problem/6275138> Inspect clicked element needs a keyboard shortcut
16164
16165        Reviewed by Joseph Pecoraro.
16166
16167        * Localizations/en.lproj/localizedStrings.js: Updated.
16168        * UserInterface/DOMTreeManager.js:
16169        (WebInspector.DOMTreeManager.prototype.inspectElement): Fire InspectModeStateChanged.
16170        (WebInspector.DOMTreeManager.prototype.get inspectModeEnabled): Added.
16171        (WebInspector.DOMTreeManager.prototype.set inspectModeEnabled.callback): Added.
16172        Handle the error case and fire InspectModeStateChanged.
16173        (WebInspector.DOMTreeManager.prototype.set inspectModeEnabled): Changed from
16174        setInspectModeEnabled into a setter. Use an internal callback.
16175        * UserInterface/FrameContentView.js:
16176        (WebInspector.FrameContentView.prototype.get navigationItems): Renamed _nodeSearchActivateButtonNavigationItem
16177        to _inspectModeButtonNavigationItem.
16178        (WebInspector.FrameContentView.prototype.shown): Removed call to _setNodeSearchEnabled.
16179        (WebInspector.FrameContentView.prototype._inspectModeStateChanged): Renamed from _setNodeSearchEnabled.
16180        (WebInspector.FrameContentView.prototype._toggleNodeSearch): Toggle WebInspector.domTreeManager.inspectModeEnabled
16181        and listen for the event instead of a callback.
16182        * UserInterface/Main.js:
16183        (WebInspector.contentLoaded): Create a shortcut for inspect mode.
16184        (WebInspector._toggleInspectMode): Added.
16185
161862012-10-24  Timothy Hatcher  <timothy@apple.com>
16187
16188        Make it easy to have different tooltips for toggle buttons in the Web Inspector.
16189
16190        Also tweak the wording of the hand button in an attempt to keep it clear and terse.
16191
16192        Reviewed by Jeff Miller.
16193
16194        * Localizations/en.lproj/localizedStrings.js: Updated.
16195        * UserInterface/ActivateButtonNavigationItem.js:
16196        (WebInspector.ActivateButtonNavigationItem): Take an activatedToolTip param in addition to
16197        defaultToolTip and store them.
16198        (WebInspector.ActivateButtonNavigationItem.prototype.get defaultToolTip): Added.
16199        (WebInspector.ActivateButtonNavigationItem.prototype.get activatedToolTip): Added.
16200        (WebInspector.ActivateButtonNavigationItem.prototype.set activated): Switch the tooltips.
16201        * UserInterface/FrameContentView.js:
16202        (WebInspector.FrameContentView): Pass in alternate tooltips for the navigation items.
16203        * UserInterface/Main.js:
16204        (WebInspector.contentLoaded): Setup the tooltips when the navigation items are created.
16205        (WebInspector.updateDockedState): Remove toolTip manipulation.
16206        (WebInspector._sidebarCollapsedStateDidChange): Ditto.
16207        * UserInterface/QuickConsole.js:
16208        (WebInspector.QuickConsole): Setup the tooltips when the navigation items are created.
16209        (WebInspector.QuickConsole.prototype.set collapsed): Remove toolTip manipulation.
16210        (WebInspector.QuickConsole.prototype._debuggerDidPause): Ditto.
16211        (WebInspector.QuickConsole.prototype._debuggerDidResume): Ditto.
16212        * UserInterface/ToggleButtonNavigationItem.js:
16213        (WebInspector.ToggleButtonNavigationItem):Take an alternateToolTip param in addition to
16214        defaultToolTip and store them.
16215        (WebInspector.ToggleButtonNavigationItem.prototype.get defaultToolTip): Added.
16216        (WebInspector.ToggleButtonNavigationItem.prototype.get alternateToolTip): Added.
16217        (WebInspector.ToggleButtonNavigationItem.prototype.set toggled): Switch the tooltips.
16218
162192012-10-25  Antoine Quint  <graouts@apple.com>
16220
16221        Customise the word-wrapping behaviour to break even when there is no space in the text
16222        typed into the console (W3C spec at http://www.w3.org/TR/css3-text/#overflow-wrap)
16223
16224        <rdar://problem/12331949> Quick console text overlaps debugging controls
16225
16226        Reviewed by Timothy Hatcher.
16227
16228        * UserInterface/JavaScriptTextPrompt.css:
16229        (.javascript-prompt):
16230
162312012-10-24  Antoine Quint  <graouts@apple.com>
16232
16233        Add the "active-focus" state as a shared state for all button navigation items and use that state as well
16234        as the "focus" state regardless of keyboard focus.
16235
16236        <rdar://problem/11742049> Web Inspector navigation bar buttons need a more noticeable selected state
16237
16238        Reviewed by Timothy Hatcher.
16239
16240        * UserInterface/ActivateButtonNavigationItem.js: Stop using custom states and use the shared states defined in
16241        ButtonNavigationItem.
16242        (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
16243        * UserInterface/ButtonNavigationItem.js: Add the "active-focus" from ActivateButtonNavigationItem.
16244        * UserInterface/RadioButtonNavigationItem.js: Use the "focus" state even when we're not using keyboard focus
16245        and use the "active-focus" state when we're pressing the button as well.
16246        (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText):
16247
162482012-10-23  Timothy Hatcher  <timothy@apple.com>
16249
16250        Make "Inspect Element" and the inspect() console API switch the sidebar to match the content view.
16251
16252        Reviewed by Joseph Pecoraro.
16253
16254        * UserInterface/InspectorObserver.js:
16255        (WebInspector.InspectorObserver.prototype.inspect): Select the resourceSidebarPanel or
16256        the storageSidebarPanel depending on the type of object being inspected.
16257
162582012-10-23  Timothy Hatcher  <timothy@apple.com>
16259
16260        Fix event listener links and make them work with anonymous scripts.
16261
16262        <rdar://problem/12557978> REGRESSION: Event listener function links are displayed as
16263        numbers and don't work
16264
16265        Reviewed by Joseph Pecoraro.
16266
16267        * Localizations/en.lproj/localizedStrings.js: Updated.
16268        * UserInterface/DebuggerManager.js:
16269        (WebInspector.DebuggerManager.prototype.reset): Call Script.resetUniqueDisplayNameNumbers. This
16270        way the anonymous scripts scripts start back at 1 when you reload or load a new page.
16271        * UserInterface/EventListenerSectionGroup.js:
16272        (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink): In the past scriptId
16273        could be a URL. Now it is always a script identifier. So try looking up the resource by URL
16274        if a script can't be found directly. Use WebInspector.createSourceCodeLink.
16275        * UserInterface/Main.css:
16276        (.go-to-link): Added cursor: pointer for cases when the link has no href.
16277        * UserInterface/Main.js:
16278        (WebInspector.createSourceCodeLink): Added.
16279        (WebInspector.createSourceCodeLink.showSourceCode): Added.
16280        * UserInterface/Resource.js:
16281        (WebInspector.Resource.prototype.get displayName): Added.
16282        * UserInterface/Script.js:
16283        (WebInspector.Script.resetUniqueDisplayNameNumbers): Added.
16284        (WebInspector.Script.prototype.get displayName): Added.
16285        * UserInterface/ScriptTreeElement.js:
16286        (WebInspector.ScriptTreeElement): Use the displayName getter for mainTitle.
16287        * UserInterface/SourceCode.js:
16288        (WebInspector.SourceCode.prototype.get displayName): Added.
16289
162902012-10-22  Timothy Hatcher  <timothy@apple.com>
16291
16292        Make docking/undocking the Web Inspector work again.
16293
16294        <rdar://problem/12554785> REGRESSION (r132045): Docking/undocking does not work
16295
16296        Reviewed by Dan Bernstein.
16297
16298        * UserInterface/InspectorFrontendAPI.js:
16299        (InspectorFrontendAPI.setAttachedWindow): Removed.
16300        (InspectorFrontendAPI.setDockSide): Added.
16301        * UserInterface/Main.js:
16302        (WebInspector._toggleDockedState): Use InspectorFrontendHost.requestSetDockSide.
16303
163042012-10-22  Joseph Pecoraro  <pecoraro@apple.com>
16305
16306        <rdar://problem/12540519> Should be able to copy text from datagrid easier
16307
16308        Reviewed by Timothy Hatcher.
16309
16310        Have a DataGrid handle a copy event if the last selection was in the
16311        DataGrid and it has a selected row. Also add a "Copy Row" context menu.
16312
16313        * Localizations/en.lproj/localizedStrings.js:
16314        Add "Copy Row" context menu string.
16315
16316        * UserInterface/DataGrid.js:
16317        (WebInspector.DataGrid):
16318        (WebInspector.DataGrid.prototype._contextMenuInDataTable):
16319        Add "Copy Row" context menu item if the node is selectable.
16320
16321        (WebInspector.DataGrid.prototype._copyTextForDataGridNode):
16322        Return a tab separated list of values. This uses the original data from
16323        which the node is created. In some cases, like the instrument navigator's
16324        datagrids, this may not match the final DataGrid row's content.
16325
16326        (WebInspector.DataGrid.prototype._beforeCopy):
16327        (WebInspector.DataGrid.prototype._copy):
16328        Allow copy when the event is inside the datagrid, there is no range
16329        selection, and we have a selected row.
16330
16331        (WebInspector.DataGrid.prototype._copyRow):
16332        Directly copy an individual row.
16333
16334        * UserInterface/Main.js:
16335        (WebInspector.contentLoaded):
16336        Remove useCapture from the main document's beforecopy handler.
16337
163382012-10-22  Timothy Hatcher  <timothy@apple.com>
16339
16340        Make the Web Inspector fast!
16341
16342        Use a timeout instead of an interval to prevent being capped on the time between protocol messages.
16343        Only one timeout is created and the whole queue is dispatched when the timer fires. This prevents
16344        creating potentially hundreds of timers that were all firing at the same time.
16345
16346        <rdar://problem/11759145> REGRESSION (Safari 6): console.log() exhibits extremely long delay (slow)
16347        when many javascript files have just been loaded
16348
16349        Reviewed by Joseph Pecoraro.
16350
16351        * UserInterface/Main.js:
16352        (WebInspector.dispatchNextQueuedMessageFromBackend): Removed interval code.
16353        (WebInspector.dispatchMessageFromBackend): Use setTimeout instead of setInterval. Updated the comment
16354        and removed the reentrancy part, which isn't possible since the backend also has a queue with a timer.
16355
163562012-10-22  Timothy Hatcher  <timothy@apple.com>
16357
16358        Make WebInspector.JavaScriptLogViewController be responsible for scrolling to the bottom,
16359        since it can check before new messages are added to know if a scroll is needed.
16360
16361        This fixes a bug where we were not auto scrolling down if you were at the bottom.
16362
16363        <rdar://problem/12049983> REGRESSION (Safari 6): Console doesn't autoscroll when it should
16364
16365        Reviewed by John Sullivan.
16366
16367        * UserInterface/JavaScriptLogViewController.js:
16368        (WebInspector.JavaScriptLogViewController): Store element as _element.
16369        (WebInspector.JavaScriptLogViewController.prototype.isScrolledToBottom): Added.
16370        (WebInspector.JavaScriptLogViewController.prototype.scrollToBottom.delayedWork): Added.
16371        Do the actual scroll here.
16372        (WebInspector.JavaScriptLogViewController.prototype.scrollToBottom): Added. Don't scroll
16373        immediately so we are not causing excessive layouts.
16374        (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Remember if we
16375        were scrolled to the bottom before appending the message. This was the bug, before the delegate
16376        didAppendConsoleMessage was checking and that was after the content was appended and we were
16377        never scrolled to the bottom at that point.
16378        * UserInterface/LogContentView.js:
16379        (WebInspector.LogContentView.prototype.didAppendConsoleMessage): Don't try to scroll, it is
16380        now handled by JavaScriptLogViewController.
16381        (WebInspector.LogContentView.prototype._isScrollIntoViewScheduled): Removed.
16382        (WebInspector.LogContentView.prototype._scheduleScrollIntoView): Removed.
16383        (WebInspector.LogContentView.prototype._immediatelyScrollIntoView): Removed.
16384        (WebInspector.LogContentView.prototype._cancelScheduledScrollIntoView): Removed.
16385        * UserInterface/QuickConsole.js:
16386        (WebInspector.QuickConsole.prototype._isScrolledToBottom): Call through to JavaScriptLogViewController.
16387        (WebInspector.QuickConsole.prototype._scrollToBottom): Ditto.
16388
163892012-10-22  Timothy Hatcher  <timothy@apple.com>
16390
16391        Make WebInspector.JavaScriptLogViewController create the top WebInspector.ConsoleGroup.
16392
16393        JavaScriptLogViewController now takes the parent element so it controls more of the DOM. This will
16394        be needed to control the scroll state instead of having LogContentView and QuickConsole do it.
16395
16396        Part of: <rdar://problem/12049983> REGRESSION (Safari 6): Console doesn't autoscroll when it should
16397
16398        Reviewed by John Sullivan.
16399
16400        * UserInterface/JavaScriptLogViewController.js:
16401        (WebInspector.JavaScriptLogViewController): Don't take in a ConsoleGroup, create it internally.
16402        Insert or append the ConsoleGroup into the parentElement.
16403        * UserInterface/LogContentView.js:
16404        (WebInspector.LogContentView): Don't make the ConsoleGroup, just get it from _logViewController.
16405        Create and assign this.prompt first so it is in the DOM before making the _logViewController.
16406        * UserInterface/QuickConsole.js:
16407        (WebInspector.QuickConsole): Don't make the ConsoleGroup.
16408
164092012-10-21  Timothy Hatcher  <timothy@apple.com>
16410
16411        Prevent the scroll position from changing when rebuilding the styles sidebar.
16412
16413        <rdar://problem/12544009> The Styles details sidebar scrolls to the top after editing a property
16414
16415        Reviewed by Dan Bernstein.
16416
16417        * UserInterface/CSSStyleDetailsSidebarPanel.js:
16418        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Save and restore scrollTop.
16419
164202012-10-20  Timothy Hatcher  <timothy@apple.com>
16421
16422        Add an "Inherited Styles" section to the Style details sidebar.
16423
16424        <rdar://problem/11981468> REGRESSION (Safari 6): Inspector does not show Inherited Style Rules
16425
16426        Reviewed by Ricky Mondello.
16427
16428        * Localizations/en.lproj/localizedStrings.js: Updated.
16429        * UserInterface/CSSStyleDetailsSidebarPanel.css:
16430        (.sidebar > .panel.details.css-style .styles-section.inherited .properties .inherited): Added.
16431        Hides non-iherited properties for inherited rules.
16432        * UserInterface/CSSStyleDetailsSidebarPanel.js:
16433        (WebInspector.CSSStyleDetailsSidebarPanel): Create and add the Inherited Styles section.
16434        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSection):
16435        Pass styleRule.isInherited instead of always passing false.
16436        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createRuleGroups): Added.
16437        Factored out of createMatchedRuleGroups for reuse by inherited rules.
16438        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createMatchedRuleGroups):
16439        Use the factored out createRuleGroups function.
16440        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Append inherited rules
16441        to inheritedStyleRules for later use. Walk the inheritedStyleRules and create the sections and groups.
16442        * UserInterface/DetailsSection.css:
16443        (.details-section > .header): Reduce right padding, it was too wide.
16444        (.details-section > .header > .node-link, .details-section > .header > .go-to-arrow): Added.
16445        Float right to position the arrow on the right side of the title.
16446        (.details-section > .header .go-to-arrow): Added. Adjust the size and margin to better fit the header.
16447        * UserInterface/StylePropertiesSection.js:
16448        (WebInspector.StylePropertiesSection): Changed "show-inherited" to just "inherited". This reduces the
16449        confusion with the computed style "show-inherited" class.
16450
164512012-10-20  Timothy Hatcher  <timothy@apple.com>
16452
16453        Make the console log stay active when navigating to a new page if one was showing.
16454
16455        <rdar://problem/12542303> DOM Tree forces itself visible when navigating to a new page while looking at a Log
16456
16457        Reviewed by Ricky Mondello.
16458
16459        * UserInterface/LogManager.js:
16460        (WebInspector.LogManager.prototype._mainResourceDidChange): Only send SessionStarted or Cleared,
16461        not both. This way listeners of Cleared can start the new session with some context.
16462        * UserInterface/LogSidebarPanel.js:
16463        (WebInspector.LogSidebarPanel.prototype._startSession): Added. Factored out of _sessionStarted.
16464        Honor the forceActiveContentView parameter when deciding to show the content view.
16465        (WebInspector.LogSidebarPanel.prototype._sessionStarted): Call _startSession.
16466        (WebInspector.LogSidebarPanel.prototype._logsCleared): Remember if we were showing a log before
16467        closing all the logs. Call _startSession can force the content view to be active if we were
16468        showing a log before.
16469
164702012-10-20  Timothy Hatcher  <timothy@apple.com>
16471
16472        Make Encoded and Transfer Size update when the values change during page load.
16473
16474        Renamed Encoded Size to Transfer Size to avoid confusion in cases where it isn't encoded. Also
16475        the value includes the response headers size, which is the only size when showing a 304. This
16476        is consistent with the title of the Transferred column in the Network Timeline.
16477
16478        <rdar://problem/12542122> Encoded and Decoded Size doesn't update in the Resource details sidebar
16479
16480        Reviewed by Joseph Pecoraro.
16481
16482        * Localizations/en.lproj/localizedStrings.js: Updated.
16483        * UserInterface/Resource.js:
16484        (WebInspector.Resource.prototype.get transferSize): Move the 304 check before the cached
16485        check since we mark 304 loads as cached now, but there still was network transfer of headers.
16486        (WebInspector.Resource.prototype.updateForResponse): Fire TransferSizeDidChange for 304 and
16487        if we have a Content-Length.
16488        (WebInspector.Resource.prototype.increaseSize): Fire TransferSizeDidChange if we don't have
16489        a _transferSize and it isn't a 304 or Content-Length is missing.
16490        (WebInspector.Resource.prototype.markAsCached): Fire TransferSizeDidChange when not a 304.
16491        * UserInterface/ResourceDetailsSidebarPanel.js:
16492        (WebInspector.ResourceDetailsSidebarPanel): Renamed "Encoded Size" to "Transfer Size".
16493        (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Listen for SizeDidChange and
16494        TransferSizeDidChange events.
16495        (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call _refreshDecodedSize and
16496        _refreshTransferSize.
16497        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Use emDash
16498        in more places. Removed valueForSize and updating of size rows.
16499        (WebInspector.ResourceDetailsSidebarPanel.prototype._valueForSize): Added.
16500        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshDecodedSize): Added.
16501        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshTransferSize): Added.
16502
165032012-10-19  Timothy Hatcher  <timothy@apple.com>
16504
16505        Make the Scope Chain details sidebar update when continuing in a loop.
16506
16507        <rdar://problem/11828667> REGRESSION (Safari 6): Variables do not update when continuing in a loop
16508
16509        Reviewed by Joseph Pecoraro.
16510
16511        * UserInterface/SourceCodeTextEditor.js:
16512        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Don't return early if the line
16513        number didn't change. The execution state still could have changed.
16514        * UserInterface/TextEditor.js:
16515        (WebInspector.TextEditor.prototype.set executionLineNumber): Only return early if there isn't a line
16516        number and that isn't changing. Still dispatch the event even if the number didn't change. The execution
16517        state still could have changed.
16518
165192012-10-19  Timothy Hatcher  <timothy@apple.com>
16520
16521        Better support for complex Content-Types in the Post Data section.
16522
16523        This change splits out the charset and boundary info from the Content-Type and
16524        displays that info on separate rows. It also handles zero size data since the
16525        backend does not send data if there are any files present.
16526
16527        Part of: <rdar://problem/6716080> REGRESSION (Safari 6): Missing POST request data
16528
16529        Reviewed by Joseph Pecoraro.
16530
16531        * Localizations/en.lproj/localizedStrings.js: Updated.
16532        * UserInterface/DetailsSection.css:
16533        (.details-section > .content > .group > .row.simple.data > .value): Added.
16534        * UserInterface/DetailsSectionSimpleRow.js:
16535        (WebInspector.DetailsSectionSimpleRow.prototype.set value): Set the data class name
16536        if the value does not have any spaces for good word breaking. This will allow breaking
16537        on every character, which looks better for the boundary post data string.
16538        * UserInterface/ResourceDetailsSidebarPanel.js:
16539        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshPostDataSection): Parse
16540        the content type into MIME-type and the boundary and/or charset.
16541
165422012-10-19  Timothy Hatcher  <timothy@apple.com>
16543
16544        Add the first part of showing POST data: simple data in the Resource details sidebar.
16545
16546        Part of: <rdar://problem/6716080> REGRESSION (Safari 6): Missing POST request data
16547
16548        Reviewed by Dean Jackson.
16549
16550        * Localizations/en.lproj/localizedStrings.js: Updated.
16551        * UserInterface/FrameResourceManager.js:
16552        (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Removed optional parameters
16553        when making a Resource.
16554        (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass along postData.
16555        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Pass null for postData.
16556        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added parameter for postData.
16557        Pass along postData to Resource constructor.
16558        (WebInspector.FrameResourceManager.prototype._createFrame): Removed optional parameters
16559        when making a Resource.
16560        (WebInspector.FrameResourceManager.prototype._createResource): Ditto.
16561        * UserInterface/Resource.js:
16562        (WebInspector.Resource): Added postData parameter. Store the _postData.
16563        (WebInspector.Resource.prototype.get postData): Added.
16564        (WebInspector.Resource.prototype.get postDataContentType): Added.
16565        * UserInterface/ResourceDetailsSidebarPanel.js:
16566        (WebInspector.ResourceDetailsSidebarPanel): Create _postDataSection. Don't show _queryParametersSection
16567        by default, it is now added or removed in _refreshURL.
16568        (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call _refreshPostDataSection.
16569        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL): Show and hide the query
16570        parameters section based on the query string.
16571        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshPostDataSection): Added.
16572
165732012-10-19  Timothy Hatcher  <timothy@apple.com>
16574
16575        Support text/x-javascript and other MIME-types as scripts.
16576
16577        The code was also throwing an exception for unknown MIME-types, which was causing
16578        the view displaying the Resource to not show anything. Now we just log an error
16579        and return null so plain text will be shown for unknown types.
16580
16581        <rdar://problem/11961403> REGRESSION (Safari 6): XHR response is blank for some
16582        sites (including store.apple.com)
16583
16584        Reviewed by Antoine Quint.
16585
16586        * UserInterface/Resource.js:
16587        (WebInspector.Resource.Type._mimeTypeMap): Added application/x-json and variants.
16588        * UserInterface/SourceTokenizer.js:
16589        (WebInspector.SourceTokenizer): Added application/x-json and variants. Changed a throw
16590        into a console.error with a return of null.
16591
165922012-10-19  Timothy Hatcher  <timothy@apple.com>
16593
16594        Properly clear the special script folders after a reload so old scripts don't stay around.
16595
16596        <rdar://problem/11329600> REGRESSION (Safari 6): Special scripts duplicate for each reload
16597
16598        Reviewed by Antoine Quint.
16599
16600        * UserInterface/ResourceSidebarPanel.js:
16601        (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared): Set each folder to null so they will be
16602        recreated instead of reused the next time there is a script to show.
16603
16604=2012-10-18  Timothy Hatcher  <timothy@apple.com>
16605
16606        Fix an issue where the Inspector would show duplicate broken resources if you opened it
16607        while the page was still loading.
16608
16609        <rdar://problem/11328818> Broken resources if you open the inspector while the page is loading
16610
16611        Reviewed by Joseph Pecoraro.
16612
16613        * UserInterface/FrameResourceManager.js:
16614        (WebInspector.FrameResourceManager.prototype.markResourceRequestAsServedFromMemoryCache): Add a comment
16615        about why we might not have a resource.
16616        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Don't try to make a
16617        resource here since we missed the resourceRequestWillBeSent call. It just caused duplicate resources
16618        and broken ones too. Add a comment and return early.
16619        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveData): Add a comment about why we
16620        might not have a resource. Removed an assert.
16621        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Ditto.
16622        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Ditto.
16623
166242012-10-18  Joseph Pecoraro  <pecoraro@apple.com>
16625
16626        Add missing color aware CSS properties.
16627
16628        Reviewed by Timothy Hatcher.
16629
16630        * UserInterface/CSSKeywordCompletions.js:
16631
166322012-10-18  Joseph Pecoraro  <pecoraro@apple.com>
16633
16634        In cases where the search term is a CSS Selector or XPath query and
16635        not a textual match we were not adding a sidebar entry. In such cases
16636        add a sidebar entry and highlight the entire title.
16637
16638        <rdar://problem/12522494> Searching "link[href]" in search navigator has missing sidebar items
16639
16640        Reviewed by Timothy Hatcher.
16641
16642        * UserInterface/SearchSidebarPanel.js:
16643        (WebInspector.SearchSidebarPanel.performSearch.domCallback.domSearchResults):
16644        First check for partial highlights in textual matches. If none were
16645        found, this is a Selector or XPath match, and we highlight it entirely.
16646
166472012-10-18  Timothy Hatcher  <timothy@apple.com>
16648
16649        Harden the Web Inspector a bit with a Content Security Policy header.
16650
16651        By default only load content from 'self'. Allow external loading of images, media and
16652        fonts; because large resources are not sent over the inspector protocol. Allow inline
16653        styles and eval for scripts.
16654
16655        Reviewed by Joseph Pecoraro.
16656
16657        * UserInterface/Main.html:
16658
166592012-10-17  Timothy Hatcher  <timothy@apple.com>
16660
16661        Improve error reporting for Inspector protocol errors.
16662
16663        Reviewed by Dean Jackson.
16664
16665        * UserInterface/InspectorBackend.js:
16666        (InspectorBackendClass.prototype.reportProtocolError): Log the message of the error
16667        object, not the error object itself.
16668
166692012-10-17  Antoine Quint  <graouts@apple.com>
16670
16671        We now display a new section in the resource details sidebar panel for the image size when we're inspecting
16672        an image resource. To facilitate this, we add a new .getImageSize() method on Resource which creates an
16673        <img> element to load the base64 version of the image as it was loaded and use the loaded element to query
16674        the intrinsic image metrics.
16675        
16676        <rdar://problem/11247288> REGRESSION (Safari 6): Width and height size info for image resources is missing
16677
16678        Reviewed by Timothy Hatcher.
16679
16680        * Localizations/en.lproj/localizedStrings.js:
16681        * UserInterface/Resource.js:
16682        (WebInspector.Resource.prototype.markAsFailed):
16683        (WebInspector.Resource.prototype.getImageSize.imageDidLoad):
16684        (WebInspector.Resource.prototype.getImageSize):
16685        * UserInterface/ResourceDetailsSidebarPanel.js:
16686        (WebInspector.ResourceDetailsSidebarPanel):
16687        (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
16688        (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
16689        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
16690
166912012-10-16  Mark Rowe  <mrowe@apple.com>
16692
16693        Add a configuration setting to control whether resources in the
16694        Web Inspector framework are combined and minified.
16695
16696        Reviewed by Timothy Hatcher.
16697
16698        This allows non-Production builds to enable this functionality if desired.
16699
16700        * Configurations/WebInspectorFramework.xcconfig:
16701        * Scripts/copy-user-interface-resources.sh:
16702
167032012-10-16  Timothy Hatcher  <timothy@apple.com>
16704
16705        Fix an exception and properly deactivate the node search button after a node is inspected.
16706
16707        <rdar://problem/12507181> Remnant mention of .nodeSearchActivateButtonNavigationItem in Main.js
16708
16709        Reviewed by Ricky Mondello.
16710
16711        * UserInterface/FrameContentView.js:
16712        (WebInspector.FrameContentView): Added DOMNodeWasInspected event listener.
16713        (WebInspector.FrameContentView.prototype._domNodeWasInspected): Added. Deactivate the node search button.
16714        * UserInterface/Main.js:
16715        (WebInspector._domNodeWasInspected): Always call InspectorFrontendHost.bringToFront(). This is good
16716        for the Inspect Element context menu item in windowed mode too.
16717
167182012-10-16  Timothy Hatcher  <timothy@apple.com>
16719
16720        Fix the dock buttons in the Web Inspector navigation bar when opening the Inspector with the left sidebar hidden.
16721
16722        <rdar://problem/12509577> REGRESSION: Dock navigation items are in the wrong place if the
16723        Inspector is opened with the left sidebar hidden
16724
16725        Reviewed by Ricky Mondello.
16726
16727        * UserInterface/Main.js:
16728        (WebInspector._updateDockNavigationItems): Only do this work if needed by checking if the close button is not
16729        in the right place. This function can be called multiple times, and the concat can cause the items to be
16730        inserted into the leftNavigationItems array multiple times.
16731
167322012-10-16  Antoine Quint  <graouts@apple.com>
16733
16734        Adding decoded and encoded sizes as a new group in the Request & Response panel in
16735        the resource details sidebar panel. To make the reported sizes more legible, we also
16736        make a small change in Number.bytesToString() such that we have a space between the
16737        value and the unit, just like what the Get Info panel does in the Finder.
16738        
16739        <rdar://problem/12508215> Add decoded and encoded sizes to Request & Response panel
16740
16741        Reviewed by Timothy Hatcher.
16742
16743        * Localizations/en.lproj/localizedStrings.js:
16744        * UserInterface/ResourceDetailsSidebarPanel.js:
16745        (WebInspector.ResourceDetailsSidebarPanel):
16746        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse.valueForSize):
16747        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
16748        * UserInterface/Utilities.js:
16749        (Number.string_appeared_here.value):
16750
167512012-10-16  Antoine Quint  <graouts@apple.com>
16752
16753        We add a new method to sync the state of the compositing borders button to the WebCore page settings
16754        when a frame content view is shown in the Web Inspector UI. We also add a new backend command to complement
16755        the OpenSource patch for https://bugs.webkit.org/show_bug.cgi?id=99458 which is also out for review.
16756        
16757        <rdar://problem/12498181> "Show compositing borders" button is not activated when inspector is re-opened
16758
16759        Reviewed by Timothy Hatcher.
16760
16761        * UserInterface/FrameContentView.js:
16762        (WebInspector.FrameContentView.prototype.shown):
16763        (WebInspector.FrameContentView.prototype._toggleCompositingBorders):
16764        (WebInspector.FrameContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
16765        * UserInterface/InspectorBackendCommands.js:
16766
167672012-10-16  Antoine Quint  <graouts@apple.com>
16768
16769        Add a new .highlight() method on TextEditorChunk which applies a simple CSS
16770        animation to the HTML element for the text chunk, and call this method in
16771        TextEditor's revealLine() method. Since the CSS class we're applying is only
16772        meant to be transitory, we remove the CSS class name upon completion of the
16773        animation.
16774
16775        <rdar://problem/12349298> REGRESSION (Safari 6): When clicking a file/line link
16776        in the console the line is not highlighted in the source
16777
16778        Reviewed by Timothy Hatcher.
16779
16780        * UserInterface/TextEditor.css:
16781        (.text-editor-text-chunk.highlighted):
16782        (@-webkit-keyframes fadeout):
16783        * UserInterface/TextEditor.js:
16784        (WebInspector.TextEditor.prototype.revealLine):
16785        (WebInspector.TextEditorTextChunk.prototype.updateContent):
16786        (WebInspector.TextEditorTextChunk.prototype.highlight):
16787
167882012-10-15  Timothy Hatcher  <timothy@apple.com>
16789
16790        Fix an exception in ContentBrowser._updateContentViewNavigationItems that was causing resource to not be cleared.
16791
16792        <rdar://problem/12501269> REGRESSION: Reloading or loading a new page does not clear previous resources
16793
16794        Reviewed by Antoine Quint.
16795
16796        * UserInterface/ContentBrowser.js:
16797        (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems): The currentContentView can be
16798        null when this is called. In that case just clear _currentContentViewNavigationItems and return early.
16799
168002012-10-15  Timothy Hatcher  <timothy@apple.com>
16801
16802        Remove extra line breaks before color values when copying from the style sidebar.
16803
16804        <rdar://problem/12506099> When copying style rule sets from the sidebar,
16805        line breaks are inserted in the middle of each line
16806
16807        Reviewed by Simon Fraser.
16808
16809        * UserInterface/CSSStyleDetailsSidebarPanel.css:
16810        (.sidebar > .panel.details.css-style .swatch): Improve spacing and alignment since
16811        having swatch-inner as an inline-block affects layout slightly.
16812        (.sidebar > .panel.details.css-style .swatch-inner): Change display from block to
16813        inline-block. This fixes the bug by making WebKit not insert a newline for the block.
16814
168152012-10-15  Timothy Hatcher  <timothy@apple.com>
16816
16817        Treat SVG main resources as documents and syntax highlight them using the HTML tokenizer.
16818
16819        SVG subresources are still treated as images and preview as such. This matches how the
16820        WebKit Web Inspector treats SVGs.
16821
16822        <rdar://problem/11332688> REGRESSION (Safari 6): Source code view shows SVG image instead of source
16823
16824        Reviewed by Ada Chan and Dan Bernstein.
16825
16826        * UserInterface/Resource.js:
16827        (WebInspector.Resource.Type._mimeTypeMap): Added image/svg+xml
16828        * UserInterface/SourceTokenizer.js:
16829        (WebInspector.SourceTokenizer): Use HTMLSourceTokenizer for image/svg+xml.
16830
168312012-10-14  Jeff Miller  <jeffm@apple.com>
16832
16833        Regenerate localizedStrings.js after r45263.
16834
16835        * Localizations/en.lproj/localizedStrings.js:
16836        Regenerated.
16837
168382012-10-13  Timothy Hatcher  <timothy@apple.com>
16839
16840        Avoid direct manipulation of the ContentBrowser and Sidebar navigation bars in Main.js.
16841
16842        <rdar://problem/12494193> Main.js should not modify the navigationBars directly
16843
16844        Reviewed by Antoine Quint.
16845
16846        * UserInterface/ContentBrowser.js:
16847        (WebInspector.ContentBrowser): Added _leftNavigationItems and _rightNavigationItems.
16848        (WebInspector.ContentBrowser.prototype.get leftNavigationItems): Added.
16849        (WebInspector.ContentBrowser.prototype.set leftNavigationItems): Added.
16850        (WebInspector.ContentBrowser.prototype.get rightNavigationItems): Added.
16851        (WebInspector.ContentBrowser.prototype.set rightNavigationItems): Added.
16852        (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems): Fix a
16853        FIXME when calculating the insertionIndex by using _rightNavigationItems.
16854        * UserInterface/Main.js:
16855        (WebInspector.contentLoaded): Use leftNavigationItems and rightNavigationItems
16856        instead of direct manipulation of the navigation bar.
16857        (WebInspector._updateDockNavigationItems): Ditto.
16858        * UserInterface/NavigationBar.js:
16859        (WebInspector.NavigationBar.prototype.insertNavigationItem): Remove the item if it
16860        is already in another NavigationBar.
16861        * UserInterface/Sidebar.js:
16862        (WebInspector.Sidebar): Added _leftNavigationItems and _rightNavigationItems.
16863        (WebInspector.Sidebar.prototype.insertSidebarPanel): Don't use addNavigationItem
16864        since that would go after the right items.
16865        (WebInspector.Sidebar.prototype.get leftNavigationItems): Added.
16866        (WebInspector.Sidebar.prototype.set leftNavigationItems): Added.
16867        (WebInspector.Sidebar.prototype.get rightNavigationItems): Added.
16868        (WebInspector.Sidebar.prototype.set rightNavigationItems): Added.
16869
168702012-10-13  Antoine Quint  <graouts@apple.com>
16871
16872        We add a new navigation item to the FrameContentView to toggle composition debug options using
16873        the page's settings. To facilitate that, we added a new method in InspectorPageAgent to allow
16874        to tap into WebCore and change those settings. That work is covered by an OpenSource patch for
16875        https://bugs.webkit.org/show_bug.cgi?id=99253.
16876        
16877        <rdar://problem/10358004> Would like ability to turn layer borders on/off via the Web Inspector
16878
16879        Reviewed by Timothy Hatcher.
16880
16881        * Localizations/en.lproj/localizedStrings.js:
16882        * UserInterface/FrameContentView.js:
16883        (WebInspector.FrameContentView.prototype.get navigationItems):
16884        (WebInspector.FrameContentView.prototype.shown):
16885        (WebInspector.FrameContentView.prototype._toggleNodeSearch):
16886        (WebInspector.FrameContentView.prototype._toggleCompositingBorders):
16887        * UserInterface/Images/NavigationItemLayers.pdf: Added.
16888        * UserInterface/InspectorBackendCommands.js:
16889
168902012-10-12  Antoine Quint  <graouts@apple.com>
16891
16892        We remove the code that manages the display of the "node inspection by selection" toggle navigation
16893        item from Main.js and let the ContentBrowser add and remove navigation items registered on the ContentView
16894        instance made the current content view.
16895        
16896        <rdar://problem/12487959> Let content views provide navigation items to the content browser.
16897
16898        Reviewed by Timothy Hatcher.
16899
16900        * UserInterface/ContentBrowser.js:
16901        (WebInspector.ContentBrowser):
16902        (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems.var):
16903        (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
16904        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
16905        * UserInterface/ContentView.js:
16906        (WebInspector.ContentView.prototype.get navigationItems):
16907        * UserInterface/FrameContentView.js:
16908        (WebInspector.FrameContentView.prototype.get navigationItems):
16909        (WebInspector.FrameContentView.prototype.shown):
16910        (WebInspector.FrameContentView.prototype._pathComponentSelected):
16911        (WebInspector.FrameContentView.prototype._setNodeSearchEnabled):
16912        (WebInspector.FrameContentView.prototype._toggleNodeSearch):
16913        * UserInterface/Main.js:
16914        (WebInspector.contentLoaded):
16915
169162012-10-12  Timothy Hatcher  <timothy@apple.com>
16917
16918        Update the CSSKeywordCompletions.InheritedProperties list.
16919
16920        <rdar://problem/12371756> Computed -webkit-font-smoothing should appear in Inspector
16921
16922        Rubber-stamped by Brian Weinstein.
16923
16924        * UserInterface/CSSKeywordCompletions.js:
16925        (WebInspector.CSSKeywordCompletions.InheritedProperties): Updated from CSSProperty::isInheritedProperty
16926        from WebCore. The old list was from an old CSS 2.1 list.
16927
169282012-10-12  Timothy Hatcher  <timothy@apple.com>
16929
16930        Don't overdraw the DataGrid sort indicator each time a DataGrid is created.
16931
16932        <rdar://problem/12488653> DataGrid sort indicator keeps getting darker
16933
16934        Reviewed by John Sullivan.
16935
16936        * UserInterface/DataGrid.js:
16937        (WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded): Store _generatedSortIndicatorImages
16938        on the WebInspector.DataGrid constructor so it only generates the images once. Use a solid color for the
16939        arrows. The previous color was too light now that it isn't overdrawing.
16940
169412012-10-11  Timothy Hatcher  <timothy@apple.com>
16942
16943        Show the HTTP method, cached and HTTP status code/text in the Resource details sidebar.
16944
16945        This fixes two cases where the resource was not marked as cached; when loaded from the
16946        disk cache and when there is a 304 response.
16947
16948        <rdar://problem/11256645> REGRESSION (Safari 6): No HTTP method shown
16949
16950        Reviewed by Ricky Mondello.
16951
16952        * Localizations/en.lproj/localizedStrings.js: Updated.
16953        * UserInterface/FrameResourceManager.js:
16954        (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass along the method.
16955        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Pass null
16956        for the request method.
16957        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Mark as cached
16958        when loaded from the disk cache.
16959        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Pass along the method.
16960        * UserInterface/Resource.js:
16961        (WebInspector.Resource): Added requestMethod and store it.
16962        (WebInspector.Resource.prototype.get requestMethod): Added.
16963        (WebInspector.Resource.prototype.updateForResponse): Renamed ResponseHeadersDidChange event to
16964        ResponseReceived since it represents more than headers.
16965        (WebInspector.Resource.prototype.markAsCached): Fire CacheStatusDidChange event.
16966        * UserInterface/ResourceDetailsSidebarPanel.js:
16967        (WebInspector.ResourceDetailsSidebarPanel): Create new rows and section.
16968        (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Listen for new events.
16969        (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call _refreshRequestAndResponse
16970        instead of _refreshResponseHeaders.
16971        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Added.
16972        Update the new section and also call _refreshResponseHeaders.
16973
169742012-10-11  Antoine Quint  <graouts@apple.com>
16975
16976        Identify floating value and display a rounded value to the 100th in the box model
16977        section with a thumbnail showing the full value. Here are screenshots of before
16978        after applying this patch for margins with a floating value.
16979
16980        <rdar://problem/12478166> Box Model section can show values overlapping their label
16981
16982        Reviewed by Timothy Hatcher.
16983
16984        * UserInterface/BoxModelDetailsSectionRow.js
16985
169862012-10-11  Antoine Quint  <graouts@apple.com>
16987
16988        Make headers in the details section use an ellipsis overflow style.
16989
16990        <rdar://problem/12478151> Class names in the list of inherited classes in the Node
16991        sidebar can overflow
16992
16993        Reviewed by Timothy Hatcher.
16994
16995        * UserInterface/DetailsSection.css
16996
169972012-10-10  Timothy Hatcher  <timothy@apple.com>
16998
16999        Prevent searches from breaking links in the Source Code view of the Web Inspector.
17000
17001        This changes how the syntax highlighter appends tokens and search results. The token
17002        elements are now created in whole before processing the inner text and search results.
17003        Before the DOM would end up being flatter, but it caused multiple links to be created
17004        if a search result was in the middle. The links were broken too because it only knew
17005        about the fragment of the text and it resolved the absolute URL on that.
17006
17007        <rdar://problem/12461082> Searching in Safari's Web Inspector breaks links in source
17008
17009        Reviewed by Joseph Pecoraro.
17010
17011        * UserInterface/SyntaxHighlightingSupport.js:
17012        (WebInspector.createSyntaxHighlightedDocumentFragment):
17013        (WebInspector.createSyntaxHighlightedDocumentFragment.createTextNode):
17014        (WebInspector.createSyntaxHighlightedDocumentFragment.appendText):
17015        (WebInspector.createSyntaxHighlightedDocumentFragment.appendToken):
17016
170172012-10-10  Timothy Hatcher  <timothy@apple.com>
17018
17019        Make DOM storage refresh on update when inspecting iOS 6 devices.
17020
17021        <rdar://problem/12472491> REGRESSION: DOM Storage does not refresh when inspecting iOS 6
17022
17023        Reviewed by Brian Weinstein.
17024
17025        * UserInterface/DOMStorageObserver.js:
17026        (WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Added. Call domStorageUpdated.
17027        * UserInterface/InspectorBackendLegacyCommands.js: Registered DOMStorage.updateDOMStorage event.
17028
170292012-10-10  Timothy Hatcher  <timothy@apple.com>
17030
17031        Make database inspection work with Curie and keep it backwards compatible with iOS 6.
17032
17033        <rdar://problem/12463671> REGRESSION: Database inspection is broken
17034
17035        Reviewed by Brian Weinstein.
17036
17037        * Localizations/en.lproj/localizedStrings.js: Updated.
17038        * UserInterface/DatabaseObject.js:
17039        (WebInspector.DatabaseObject.prototype.executeSQL): Set expectsResultObject on the callback.
17040        (WebInspector.DatabaseObject.prototype.executeSQL.queryCallback): Added.
17041        (WebInspector.DatabaseObject.prototype.executeSQL.callback): Reworked for compatibility
17042        by using the result object.
17043        * UserInterface/DatabaseObserver.js:
17044        (WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Added.
17045        (WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Added.
17046        * UserInterface/InspectorBackend.js:
17047        (InspectorBackendClass.prototype.dispatch): See if the callback needs the result
17048        object by checking for expectsResultObject.
17049        * UserInterface/InspectorBackendLegacyCommands.js: Added.
17050        * UserInterface/Main.html: Included InspectorBackendLegacyCommands.js.
17051
170522012-10-09  Timothy Hatcher  <timothy@apple.com>
17053
17054        When using "Inspect Element", select the Style details sidebar panel if one of the DOM
17055        details sidebar panels isn't already selected.
17056
17057        <rdar://problem/12239441> REGRESSION (Safari 6): "Inspect Element" shows Resource
17058        details instead of useful Style details
17059
17060        Reviewed by John Sullivan.
17061
17062        * UserInterface/Main.js:
17063        (WebInspector._domNodeWasInspected): Set this.detailsSidebar.selectedSidebarPanel
17064        to this.cssStyleDetailsSidebarPanel if the current sidebar ins't an instance of
17065        the WebInspector.DOMDetailsSidebarPanel prototype.
17066
170672012-10-09  Timothy Hatcher  <timothy@apple.com>
17068
17069        Make the Style details sidebar work again after recent protocol changes.
17070
17071        This change makes the Web Inspector work with Curie's Inspector protocol as well
17072        as maintaining backwards compatibility with iOS 6.
17073
17074        <rdar://problem/12281730> REGRESSION (r129470): Nothing is showing in the Style sidebar
17075
17076        Reviewed by Ricky Mondello.
17077
17078        * UserInterface/BoxModelDetailsSectionRow.js:
17079        (WebInspector.BoxModelDetailsSectionRow.prototype._refresh): Removed forcedPseudoClasses
17080        from the call to getComputedStyleAsync, because it was always ignored.
17081        * UserInterface/CSSRule.js:
17082        (WebInspector.CSSRule): Support selectorList and selectorText.
17083        * UserInterface/CSSStyleDetailsSidebarPanel.js:
17084        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Removed
17085        forcedPseudoClasses from the calls to getComputedStyleAsync and getMatchedStylesAsync.
17086        Fallback to empty array for matchedCSSRules.
17087        * UserInterface/CSSStyleManager.js:
17088        (WebInspector.CSSStyleManager.parseRuleArrayPayload): The protocol had just an array of
17089        rules, now it is an array of matches that have a 'rule' property. Support both.
17090        (WebInspector.CSSStyleManager.prototype.forcedPseudoClasses): Removed.
17091        (WebInspector.CSSStyleManager.prototype.getMatchedStylesAsync): Removed forcedPseudoClasses
17092        parameter. The protocol used 'rules' as a property, now it is 'matches'. Support both.
17093        Use invoke() when calling CSSAgent.getMatchedStylesForNode since forcedPseudoClasses was removed
17094        as an parameter, and invoke uses parameter names instead of parameter order.
17095        (WebInspector.CSSStyleManager.prototype.getComputedStyleAsync): Removed forcedPseudoClasses
17096        parameter. Use invoke() here too.
17097
170982012-10-09  Timothy Hatcher  <timothy@apple.com>
17099
17100        Update InspectorBackendCommands.js to r130785 of the Inspector protocol.
17101
17102        <rdar://problem/12463786>
17103
17104        Some features need to be updated to work with these changes:
17105        <rdar://problem/12281730> REGRESSION (r129470): Nothing is showing in the Style sidebar
17106        <rdar://problem/12463671> REGRESSION: Database inspection is broken
17107        <rdar://problem/12463631> REGRESSION: Subframes don't show the correct DOM (always the main frame's DOM)
17108
17109        Reviewed by Ricky Mondello.
17110
17111        * UserInterface/CSSObserver.js:
17112        (WebInspector.CSSObserver.prototype.namedFlowCreated): Added stub.
17113        (WebInspector.CSSObserver.prototype.namedFlowRemoved): Added stub.
17114        (WebInspector.CSSObserver.prototype.regionLayoutUpdated): Added stub.
17115        * UserInterface/DOMStorageObserver.js:
17116        (WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Removed.
17117        * UserInterface/DatabaseObserver.js:
17118        (WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Removed.
17119        (WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Removed.
17120        * UserInterface/DebuggerObserver.js:
17121        (WebInspector.DebuggerObserver.prototype.scriptParsed): Added sourceMapURL and hasSourceURL arguments.
17122        * UserInterface/InspectorBackendCommands.js: Updated to r130785.
17123        * UserInterface/InspectorObserver.js:
17124        (WebInspector.InspectorObserver.prototype.didCreateWorker): Removed.
17125        (WebInspector.InspectorObserver.prototype.didDestroyWorker): Removed.
17126
171272012-10-04  Mark Rowe  <mrowe@apple.com>
17128
17129        Take Xcode's suggestions for changes to our internal Xcode projects.
17130
17131        Rubber-stamped by John Sullivan.
17132
17133        Xcode 4.5 suggests enabling several new warnings in most of our projects. While doing this
17134        I also noticed and removed a number of obsolete configuration settings, and upgraded the
17135        project format for the few projects that were not using the latest version.
17136
17137        * Configurations/Base.xcconfig:
17138        * WebInspectorUI.xcodeproj/project.pbxproj:
17139
171402012-09-13  Timothy Hatcher  <timothy@apple.com>
17141
17142        Collapse the Computed Style section by default.
17143
17144        We do remember the state, but lets help people along here and collapse it by default.
17145
17146        <rdar://problem/12294479>
17147
17148        Reviewed by Cody Krieger and Mark Rowe.
17149
17150        * UserInterface/CSSStyleDetailsSidebarPanel.js:
17151        (WebInspector.CSSStyleDetailsSidebarPanel): Pass true when making the _computedStyleSection
17152        to make it collapse by default.
17153
171542012-08-27  Timothy Hatcher  <timothy@apple.com>
17155
17156        Use -webkit-image-set for border-image instead of media queries in the Web Inspector.
17157
17158        Reviewed by Dan Bernstein.
17159
17160        * UserInterface/TextEditor.css:
17161        (.text-editor > .gutter > .line-number > .breakpoint): Use -webkit-image-set.
17162        (.text-editor > .gutter > .line-number.breakpoint-resolved > .breakpoint): Ditto.
17163        (.text-editor > .gutter > .line-number.execution-line::after): Ditto.
17164        * UserInterface/TimelineOverview.css:
17165        (.timeline-overview > .timeline .bar): Combine two rules with identical selectors.
17166        (.timeline-overview > .timeline.timeline-record-type-network .bar): Use -webkit-image-set.
17167        (.timeline-overview > .timeline.timeline-record-type-layout .bar): Ditto.
17168        (.timeline-overview > .timeline.timeline-record-type-script .bar): Ditto.
17169
171702012-08-27  Timothy Hatcher  <timothy@apple.com>
17171
17172        Make the JavaScript & Events timeline pills render correctly in HiDPI.
17173
17174        <rdar://problem/12183848> JavaScript timeline pill broken in HiDPI
17175
17176        Reviewed by Dan Bernstein.
17177
17178        * UserInterface/TimelineOverview.css:
17179        (.timeline-overview > .timeline.timeline-record-type-script .bar): Changed from
17180        .timeline-overview > .timeline.timeline-record-type-script > .bar.
17181
171822012-08-15  Joseph Pecoraro  <pecoraro@apple.com>
17183
17184        Add iOS inheritable properties to the inspector to match
17185        CSSProperty::isInheritedProperty.
17186
17187        Reviewed by Brian Weinstein.
17188
17189        * UserInterface/CSSKeywordCompletions.js:
17190
171912012-08-16  Timothy Hatcher  <timothy@apple.com>
17192
17193        Save and restore the text selection when modifying the DOM representation of the text.
17194
17195        <rdar://problem/12059199> Selection is lost when scrolling in the source code view
17196
17197        Reviewed by Darin Adler.
17198
17199        * UserInterface/TextEditor.js:
17200        (WebInspector.TextEditor.prototype.set selectedTextRange): Return early if null is passed.
17201        This allow the callers to avoid a null check.
17202        (WebInspector.TextEditor.prototype._breakVisibleTextChunksIntoSingleLineTextChunks):
17203        Save at the beginning the text selection, and restore it at the end.
17204        (WebInspector.TextEditor.prototype._consolidateHiddenSingleLineTextChunks): Ditto.
17205
172062012-08-14  Timothy Hatcher  <timothy@apple.com>
17207
17208        Make the "Show Error Console" and "Show Page Source" menu items also change the selected navigator
17209        to match the view showing in the content browser.
17210
17211        <rdar://problem/12058796> Web Inspector comes up in an inconsistent state, always showing the console
17212
17213        Reviewed by Brian Weinstein.
17214
17215        * UserInterface/InspectorFrontendAPI.js:
17216        (InspectorFrontendAPI.showConsole): Select the Log sidebar.
17217        (InspectorFrontendAPI.showMainResourceForFrame): Select the Resource sidebar.
17218
172192012-08-03  Timothy Hatcher  <timothy@apple.com>
17220
17221        Disable pause on exception by default.
17222
17223        Developers are confused that pause on uncaught exceptions is enabled by default.
17224
17225        <rdar://problem/12025998>
17226
17227        Reviewed by Jessie Berlin.
17228
17229        * UserInterface/DebuggerManager.js:
17230        (WebInspector.DebuggerManager): Change true to false for the "break-on-all-uncaught-exceptions"
17231        setting default value.
17232
172332012-08-01  Timothy Hatcher  <timothy@apple.com>
17234
17235        Update CSSKeywordCompletions.js.
17236
17237        <rdar://problem/12008709>
17238
17239        Reviewed by Brian Weinstein.
17240
17241        * UserInterface/CSSKeywordCompletions.js:  Merge r124016 from WebKit.
17242
172432012-08-01  Timothy Hatcher  <timothy@apple.com>
17244
17245        DOMStorageObserver.updateDOMStorage should be DOMStorageObserver.domStorageUpdated.
17246
17247        "updateDOMStorage" was renamed to "domStorageUpdated" in WebKit r118349. We need to support
17248        the old and new name for backwards compatibility.
17249
17250        <rdar://problem/12008490>
17251
17252        Reviewed by Brian Weinstein.
17253
17254        * UserInterface/DOMStorageObserver.js:
17255        (WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Added comment. Call domStorageUpdated.
17256        (WebInspector.DOMStorageObserver.prototype.domStorageUpdated): Added. Does what updateDOMStorage did.
17257
172582012-07-31  Timothy Hatcher  <timothy@apple.com>
17259
17260        Show the file and line number instead of a go-to arrow for style rules and event listeners.
17261
17262        <rdar://problem/11347946> REGRESSION (New Web Inspector): Inspector does not show filename/line number for CSS rules
17263
17264        Reviewed by John Sullivan.
17265
17266        * UserInterface/CSSStyleDetailsSidebarPanel.css:
17267        (.sidebar > .panel.details.css-style .styles-section .header .title .media a): Added !important to color. Renamed from .subtitle.
17268        * UserInterface/DetailsSection.css:
17269        (.details-section > .content > .group > .row.simple > .label): Remove duplicate padding property, set padding-left to be 6px.
17270        (.details-section > .content > .group > .row.simple > .value): Set padding-right to be 6px.
17271        (.details-section > .content > .group > .row.properties): Make left and right padding equal.
17272        * UserInterface/EventListenerSectionGroup.css:
17273        (.event-listener-section > .content > .group > .row.simple > .value .go-to-arrow): Removed.
17274        * UserInterface/EventListenerSectionGroup.js:
17275        (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink): Use WebInspector.createResourceLink.
17276        * UserInterface/Main.css:
17277        (.go-to-link): Added.
17278        (.go-to-link:not(.dont-float)): Added.
17279        * UserInterface/Main.js:
17280        (WebInspector.createResourceLink): Added.
17281        * UserInterface/StylePropertiesSection.js:
17282        (WebInspector.StylePropertiesSection): Use WebInspector.createResourceLink.
17283        (WebInspector.StylePropertiesSection.prototype._linkify): Removed.
17284        (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): Use WebInspector.createResourceLink.
17285
172862012-07-28  Timothy Hatcher  <timothy@apple.com>
17287
17288        Make reloading while viewing a resource in the Web Inspector show the main resource.
17289
17290        This keeps you looking at resources instead of dumping you into a log or timeline view.
17291        This was only an issue if you had viewed a log or timeline before viewing a resource.
17292
17293        <rdar://problem/11981540> Reloading while viewing a resource sometimes switches to the Log or Timeline
17294
17295        Reviewed by John Sullivan.
17296
17297        * UserInterface/ResourceSidebarPanel.js:
17298        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Remember if the current view was one
17299        that we care about before closing them.
17300        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork): Show the main frame since
17301        there is no content view showing or we were showing a resource before.
17302
173032012-07-28  Timothy Hatcher  <timothy@apple.com>
17304
17305        Make selection of a navigator in the Web Inspector show the last selected content view from that navigator.
17306
17307        This makes switching between different content quicker, especially for the Resource, Instrument and Log
17308        navigators which have default initial selections.
17309
17310        <rdar://problem/10854727> Selecting the Log sidebar should select a log by default
17311
17312        Reviewed by John Sullivan.
17313
17314        * UserInterface/InstrumentSidebarPanel.js:
17315        (WebInspector.InstrumentSidebarPanel): Make the Network Requests timeline selected by default.
17316        (WebInspector.InstrumentSidebarPanel.prototype.shown):
17317        (WebInspector.InstrumentSidebarPanel.prototype._timelinesTreeElementSelected): Deselect any tree element
17318        in the main content tree outline to prevent two selections in the sidebar.
17319        (WebInspector.InstrumentSidebarPanel.prototype._profileSelected): Deselect any tree element in the timelines
17320        tree outline to prevent two selections in the sidebar.
17321        * UserInterface/LogSidebarPanel.js:
17322        (WebInspector.LogSidebarPanel.prototype._sessionStarted): Select the Current Log tree element by default the first time.
17323        * UserInterface/Main.js:
17324        (WebInspector.contentLoaded): Move some settings above this.navigationSidebar.selectedSidebarPanel to prevent
17325        an exception from accessing them before they are set. This was triggered by the new code in NavigationSidebarPanel.shown.
17326        * UserInterface/NavigationSidebarPanel.js:
17327        (WebInspector.NavigationSidebarPanel.prototype.shown): Reselect the selected tree element to cause the content view
17328        to be shown as well.
17329        * UserInterface/ResourceSidebarPanel.js:
17330        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Select the main frame tree element by default.
17331
173322012-07-26  Timothy Hatcher  <timothy@apple.com>
17333
17334        Make searching source code via the find banner fast again.
17335
17336        <rdar://problem/11955081> REGRESSION (New Web Inspector): Searching large resources via Find Banner is dramatically slower than Safari 5
17337
17338        Reviewed by John Sullivan.
17339
17340        * UserInterface/SourceCodeTextEditor.js:
17341        (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch): Added. Uses the backend agents to do a quick search pass before doing
17342        the inner-line matches.
17343        * UserInterface/TextEditor.js:
17344        (WebInspector.TextEditor):
17345        (WebInspector.TextEditor.prototype.get currentSearchQuery): Added. Needed by SourceCodeTextEditor.customPerformSearch.
17346        (WebInspector.TextEditor.prototype.performSearch): Use searchCleared to fully clear the previous results.
17347        (WebInspector.TextEditor.prototype.performSearch.batchSearch): Use addSearchResultRange for adding a new result.
17348        (WebInspector.TextEditor.prototype.addSearchResultRange): Added. Factored out of performSearch.batchSearch. Calls _updateLineForSearchResultMatchSoon.
17349        (WebInspector.TextEditor.prototype.searchCleared): Clear _pendingSearchResultLineNumbers.
17350        (WebInspector.TextEditor.prototype._updateLineForSearchResultMatchSoon): Added. Helper for batching line updates.
17351        (WebInspector.TextEditor.prototype._updateLineForSearchResultMatchSoon.delayedWork): Added. Factored out of performSearch.batchSearch.
17352
173532012-07-11  Mark Rowe  <mrowe@apple.com>
17354
17355        Build against the latest SDK when targeting older OS X versions.
17356
17357        The deployment target is already set to the version that we're targeting, and it's that setting
17358        which determines which functionality from the SDK is available to us.
17359
17360        Reviewed by Dan Bernstein.
17361
17362        * Configurations/Base.xcconfig:
17363
173642012-06-18  Timothy Hatcher  <timothy@apple.com>
17365
17366        Fix an exception when viewing a JavaScript profile with milliseconds instead of percentages.
17367
17368        <rdar://problem/11691663> REGRESSION (New Web Inspector): Exception when viewing JavaScript Profile, making profiles unusable
17369
17370        Reviewed by Brian Weinstein.
17371
17372        * UserInterface/ProfileDataGridTree.js:
17373        (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds): Pass true for the last argument of Number.secondsToString.
17374
173752012-06-16  Timothy Hatcher  <timothy@apple.com>
17376
17377        Show Resource details for the selected row in Network requests.
17378
17379        <rdar://problem/11683757>
17380
17381        Reviewed by Joseph Pecoraro.
17382
17383        * UserInterface/DataGrid.js:
17384        (WebInspector.DataGridNode.prototype.select): Fire the WebInspector.DataGrid.Event.SelectedNodeChanged event.
17385        (WebInspector.DataGridNode.prototype.deselect): Ditto.
17386        * UserInterface/Main.html: Include ResourceTimelineDataGridNodePathComponent.js.
17387        * UserInterface/ResourceTimelineDataGridNodePathComponent.js: Added.
17388        (WebInspector.ResourceTimelineDataGridNodePathComponent):
17389        (WebInspector.ResourceTimelineDataGridNodePathComponent.prototyp.get resourceTimelineDataGridNode):
17390        (WebInspector.ResourceTimelineDataGridNodePathComponent.prototype.get previousSibling):
17391        (WebInspector.ResourceTimelineDataGridNodePathComponent.prototype.get nextSibling):
17392        * UserInterface/TimelinesContentView.js:
17393        (WebInspector.TimelinesContentView): Add WebInspector.DataGrid.Event.SelectedNodeChanged listener.
17394        (WebInspector.TimelinesContentView.prototype.get selectionPathComponents): Include a ResourceTimelineDataGridNodePathComponent
17395        if the selected node is a ResourceTimelineDataGridNode.
17396        (WebInspector.TimelinesContentView.prototype._dataGridNodePathComponentSelected): Added. Reveal and select the node.
17397        (WebInspector.TimelinesContentView.prototype._selectedNodeChanged): Dispatch WebInspector.ContentView.Event.SelectionPathComponentsDidChange.
17398
173992012-06-09  Timothy Hatcher  <timothy@apple.com>
17400
17401        Switch the Web Inspector over to use tab-size for the source code view.
17402
17403        <rdar://problem/11633291> Use tab-size CSS property in the Web Inspector instead of an inline-block
17404
17405        Reviewed by Dan Bernstein.
17406
17407        * UserInterface/SyntaxHighlighter.js:
17408        (WebInspector.SyntaxHighlighter.CharacterTokens): Removed \t.
17409        * UserInterface/SyntaxHighlightingDefaultTheme.css:
17410        (.syntax-highlighted): Added tab-size: 4.
17411        (.syntax-highlighted .tab): Removed.
17412        * UserInterface/SyntaxHighlightingSupport.js:
17413        (WebInspector.createSyntaxHighlightedDocumentFragment): Removed tab token support.
17414
174152012-06-07  Joseph Pecoraro  <pecoraro@apple.com>
17416
17417        <rdar://problem/11613940> DataGrid column collapser button should have a tooltip
17418
17419        Reviewed by Darin Adler and Timothy Hatcher.
17420
17421        * Localizations/en.lproj/localizedStrings.js:
17422        * UserInterface/DataGrid.js:
17423        (WebInspector.DataGrid):
17424        (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
17425        (WebInspector.DataGrid.prototype._collapserButtonCollapseColumnsToolTip):
17426        (WebInspector.DataGrid.prototype._collapserButtonExpandColumnsToolTip):
17427
174282012-05-30  Joseph Pecoraro  <pecoraro@apple.com>
17429
17430        Workaround for: <rdar://problem/11536832> Cannot access content view from Instruments navigator if name of file is truncated
17431
17432        Implement a workaround so that go-to arrows still work in situations
17433        where text boxes incorrectly prevent them from being clickable.
17434        Giving the arrows a z-index always makes them work.
17435
17436        Reviewed by Timothy hatcher.
17437
17438        * UserInterface/Main.css:
17439        (.go-to-arrow):
17440
174412012-05-25  Joseph Pecoraro  <pecoraro@apple.com>
17442
17443        <rdar://problem/11538965> Breakpoint callframe tooltips show wrong line number
17444
17445        ScriptLocation lineNumber is 0-based. Convert to 1-based for display.
17446
17447        Reviewed by Timothy Hatcher.
17448
17449        * UserInterface/CallFrameTreeElement.js:
17450        (WebInspector.CallFrameTreeElement):
17451
174522012-05-24  Timothy Hatcher  <timothy@apple.com>
17453
17454        Make the WebInspector.framework build 32/64-bit universal to match WebKit.
17455
17456        Since WebKit links against the WebInspector framework, they need to support
17457        the same architectures. Otherwise, the framework fails to load when soft
17458        linking and the resources aren't found, which causes an exception/crash.
17459
17460        <rdar://problem/11373948> Crash opening the Web Inspector in 32-bit apps
17461
17462        Reviewed by Joseph Pecoraro.
17463
17464        * Configurations/Base.xcconfig: Set VALID_ARCHS to ARCHS_STANDARD_32_64_BIT.
17465        * Configurations/DebugRelease.xcconfig: Set ARCHS to ARCHS_STANDARD_32_64_BIT.
17466
174672012-05-23  Timothy Hatcher  <timothy@apple.com>
17468
17469        Fix some occasional assertions and an exception that happens in CSSStyleDetailsSidebarPanel.
17470
17471        These can happen if there is an error from the protocol when fetching the CSS rules. Now when
17472        this happens the sidebar will not show stale data.
17473
17474        <rdar://problem/11516416>
17475
17476        Reviewed by Brian Weinstein.
17477
17478        * UserInterface/CSSStyleDetailsSidebarPanel.js:
17479        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.matchedStylesCallback): Added fallback values.
17480        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Ditto.
17481
174822012-05-22  Timothy Hatcher  <timothy@apple.com>
17483
17484        Fix a regression that would cause resource content to overlap when reloading.
17485
17486        <rdar://problem/11509620> REGRESSION (r42994): Overlapping content views when navigating
17487
17488        Reviewed by Kevin Decker.
17489
17490        * UserInterface/ContentViewContainer.js:
17491        (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Use oldCurrentContentView
17492        in the loop. The currentContentView variable is not declared until after the loop, so using currentContentView
17493        is just comparing to undefined at this point.
17494
174952012-05-21  Timothy Hatcher  <timothy@apple.com>
17496
17497        Fixes an uncaught exception in WebInspector.ContentBrowser._currentContentViewDidChange.
17498
17499        This event fires when all content views are closed and there is no longer a current view.
17500        The code under this listener was not properly null checking the content view.
17501
17502        <rdar://problem/11467085> ContentBrowser has uncaught exception on reload needs to handle null currentContentView
17503
17504        Reviewed by Oliver Hunt.
17505
17506        * UserInterface/ContentBrowser.js:
17507        (WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Added null check for representedObject.
17508        (WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem): Added null check for contentView.
17509        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Added null check for currentContentView.
17510
175112012-05-16  Joseph Pecoraro  <pecoraro@apple.com>
17512
17513        <rdar://problem/11468003> REGRESSION: Error log messages contains wrong line number in jump link
17514
17515        The Log messages coming from the backend contain the expected, file and 1-based
17516        line number. In the Safari inspector _linkifyLocation was adjusting this to 0-based
17517        and using the 0-based line number as the display text. The OpenSource inspector's
17518        linkifier uses WebInspector.formatLinkText for display text which adds back the 1.
17519        The Safari inspector does not have that. We can just display the correct line number.
17520
17521        Reviewed by Timothy Hatcher.
17522
17523        * UserInterface/ConsoleMessageImpl.js:
17524        (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
17525
175262012-05-11  Timothy Hatcher  <timothy@apple.com>
17527
17528        Fix an issue where the DOM Tree and Source Code would overlap.
17529
17530        <rdar://problem/11329121> REGRESSION (r42567): Overlapping display DOM Tree and Source Code
17531
17532        Reviewed by Joseph Pecoraro.
17533
17534        * UserInterface/ContentViewContainer.js:
17535        (WebInspector.ContentViewContainer.prototype.showContentView): Remove assert and call to _removeContentViewElement.
17536        The content view is already guaranteed to be removed. The _disassociateFromContentView function now does the assert.
17537        (WebInspector.ContentViewContainer.prototype.showBackForwardEntry): Return early if it is the same index. Fire the
17538        CurrentContentViewDidChange event here since _showContentView no longer fires it.
17539        (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Remove call to _removeContentViewElement.
17540        Only call _showContentView and fire the CurrentContentViewDidChange event if the content view actually changed.
17541        (WebInspector.ContentViewContainer.prototype.closeAllContentViews): Remove call to _removeContentViewElement.
17542        Fire the CurrentContentViewDidChange event here since _showContentView no longer fires it.
17543        (WebInspector.ContentViewContainer.prototype.shown): Call _showContentView instead of _prepareContentViewToShow.
17544        (WebInspector.ContentViewContainer.prototype.hidden): Call _hideContentView instead of _prepareContentViewToShow.
17545        (WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Added assert for visible.
17546        (WebInspector.ContentViewContainer.prototype._showContentView): Added assert for visible. Removed event dispatch.
17547        (WebInspector.ContentViewContainer.prototype._hideContentView): Added assert for visible.
17548
175492012-05-10  Timothy Hatcher  <timothy@apple.com>
17550
17551        Timer events in the WebInspector should show where they were scheduled from.
17552
17553        Depends on: https://webkit.org/b/86173
17554
17555        <rdar://problem/11427463>
17556
17557        Reviewed by John Sullivan.
17558
17559        * UserInterface/TimelineManager.js:
17560        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Process TimerFire when the corresponding
17561        EvaluateScript or FunctionCall record is encountered so we can gather the resource and line number.
17562
175632012-05-10  Timothy Hatcher  <timothy@apple.com>
17564
17565        Use a static copy of InspectorBackend.js and InspectorBackendCommands.js.
17566
17567        This fixes a build failure since WebCore renamed the file we were coping.
17568
17569        For compatibility reasons we should use a static copy of the InspectorBackend instead
17570        of copying the latest version from WebCore during the build. Using a stable version of
17571        the InspectorBackend guarantees a constant API for the front-end and protocol level
17572        changes in WebCore are compatible with older versions of the InspectorBackend.
17573
17574        <rdar://problem/11426912>
17575
17576        * Scripts/copy-user-interface-resources.sh: Removed copy commands from derived sources.
17577        * UserInterface/InspectorBackend.js: Copied from OpenSource r116449.
17578        * UserInterface/InspectorBackendCommands.js: Ditto.
17579        * WebInspectorUI.xcodeproj/project.pbxproj: Removed build phase to copy from WebCore.
17580
175812012-04-26  Timothy Hatcher  <timothy@apple.com>
17582
17583        Update the Web Inspector to work with recent protocol changes.
17584
17585        <rdar://problem/11329835>
17586
17587        Reviewed by Joseph Pecoraro.
17588
17589        * UserInterface/DOMNodeDetailsSidebarPanel.js:
17590        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved): Pass undefined for the args parameter of callFunction.
17591        * UserInterface/DOMTreeElement.js:
17592        (WebInspector.DOMTreeElement.prototype._createTooltipForNode.resolvedNode): Ditto.
17593        * UserInterface/JavaScriptTextPrompt.js:
17594        (WebInspector.JavaScriptTextPrompt.prototype.evalInInspectedWindow): Renamed doNotPauseOnExceptions to doNotPauseOnExceptionsAndMuteConsole.
17595        Pass doNotPauseOnExceptionsAndMuteConsole to evaluateOnCallFrame.
17596        (WebInspector.JavaScriptTextPrompt.prototype._completions.evaluated): Pass undefined for the args parameter of callFunctionJSON.
17597        * UserInterface/NetworkObserver.js:
17598        (WebInspector.NetworkObserver.prototype.requestWillBeSent): Removed stackTrace parameter.
17599        * UserInterface/RemoteObject.js:
17600        (WebInspector.RemoteObject.prototype.setPropertyValue): Renamed doNotPauseOnExceptions to doNotPauseOnExceptionsAndMuteConsole.
17601        Pass true for doNotPauseOnExceptionsAndMuteConsole in RuntimeAgent.callFunctionOn.
17602        (WebInspector.RemoteObject.prototype.callFunction): Added args parameter and pass it along. Pass true for doNotPauseOnExceptionsAndMuteConsole.
17603        (WebInspector.RemoteObject.prototype.callFunctionJSON): Ditto.
17604
176052012-04-20  Joseph Pecoraro  <pecoraro@apple.com>
17606
17607        <rdar://problem/11287053> ApplicationCache sorting Resource column is broken
17608
17609        The items being sorted in the data grid are ApplicationCacheResources
17610        from the Inspector protocol. Those resources do not have a "name"
17611        property. Only "url", "size", and "type".        
17612
17613        Reviewed by Jon Honeycutt.
17614
17615        * UserInterface/ApplicationCacheFrameContentView.js:
17616        (WebInspector.ApplicationCacheFrameContentView.prototype._populateDataGrid):
17617
176182012-04-20  Joseph Pecoraro  <pecoraro@apple.com>
17619
17620        <rdar://problem/11287121> REGRESSION: Inspector window should move to front when you hit a breakpoint
17621
17622        Reviewed by Dan Bernstein.
17623
17624        * UserInterface/Main.js:
17625        (WebInspector._debuggerDidPause):
17626
176272012-04-18  Timothy Hatcher  <timothy@apple.com>
17628
17629        Fix an regression where issues were replacing the content view when they should be inline.
17630
17631        This also fixes an regression where issue lines were not highlighting because the style class
17632        was not being applied, 'undefined' was.
17633
17634        <rdar://problem/11180526> REGRESSION (r41932-r41943): ResourceContentView was only showing
17635        an error message and not content
17636
17637        Reviewed by Brian Weinstein.
17638
17639        * UserInterface/ResourceContentView.js:
17640        (WebInspector.ResourceContentView): Only add issue event listener and issues if !managesOwnIssues.
17641        (WebInspector.ResourceContentView.prototype.closed): Remove issue event listener only if !managesOwnIssues.
17642        (WebInspector.ResourceContentView.prototype._issueWasAdded): Assert !managesOwnIssues.
17643        * UserInterface/SourceCodeTextEditor.js:
17644        (WebInspector.SourceCodeTextEditor.prototype._addIssueToLine): Use the connect object for the style classes.
17645        * UserInterface/TextResourceContentView.js:
17646        (WebInspector.TextResourceContentView.get managesOwnIssues): Added. Return true.
17647
176482012-04-16  Timothy Hatcher  <timothy@apple.com>
17649
17650        Save and restore the scroll position for content views when hiding and showing.
17651
17652        <rdar://problem/11184241> REGRESSION (New Web Inspector): Console log view scroll offset
17653        does not follow most recent messages
17654
17655        Reviewed by Joseph Pecoraro.
17656
17657        * UserInterface/ApplicationCacheFrameContentView.js:
17658        (WebInspector.ApplicationCacheFrameContentView.prototype.get scrollableElements): Added.
17659        * UserInterface/ClusterContentView.js:
17660        (WebInspector.ClusterContentView.prototype.shown): Call shown directly on the _contentViewContainer.
17661        (WebInspector.ClusterContentView.prototype.hidden): Ditto for hidden.
17662        * UserInterface/ContentView.js:
17663        (WebInspector.ContentView.prototype.get visible): Use a simple boolean.
17664        (WebInspector.ContentView.prototype.set visible): Ditto.
17665        (WebInspector.ContentView.prototype.get scrollableElements): Added stub.
17666        (WebInspector.ContentView.prototype.get keepElementsScrolledToTheBottom): Added stub.
17667        * UserInterface/ContentViewContainer.css:
17668        (.content-view-container > .content-view): Removed. Using display: none was pointless since the
17669        element is removed from the DOM. This prevented saving scroll positions.
17670        * UserInterface/ContentViewContainer.js:
17671        (WebInspector.ContentViewContainer.prototype.shown): Added. Calls _prepareContentViewToShow.
17672        (WebInspector.ContentViewContainer.prototype.hidden): Added. Calls _prepareContentViewToHide.
17673        (WebInspector.ContentViewContainer.prototype._saveScrollPositionsForContentView): Added.
17674        (WebInspector.ContentViewContainer.prototype._restoreScrollPositionsForContentView): Added.
17675        (WebInspector.ContentViewContainer.prototype._showContentView): Calls _prepareContentViewToShow.
17676        (WebInspector.ContentViewContainer.prototype._prepareContentViewToShow): Added. Calls
17677        _restoreScrollPositionsForContentView in addition to the work _showContentView did.
17678        (WebInspector.ContentViewContainer.prototype._hideContentView): Calls _prepareContentViewToHide.
17679        (WebInspector.ContentViewContainer.prototype._prepareContentViewToHide): Added. Calls
17680        _saveScrollPositionsForContentView in addition to the work _hideContentView did.
17681        * UserInterface/CookieStorageContentView.js:
17682        (WebInspector.CookieStorageContentView.prototype.get scrollableElements): Added.
17683        * UserInterface/DOMStorageContentView.js:
17684        (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Added.
17685        * UserInterface/DOMTreeContentView.js:
17686        (WebInspector.DOMTreeContentView.prototype.get scrollableElements): Added.
17687        * UserInterface/DatabaseTableContentView.js:
17688        (WebInspector.DatabaseTableContentView.prototype.get scrollableElements): Added.
17689        * UserInterface/LogContentView.js:
17690        (WebInspector.LogContentView): Removed _scrolledToBottom.
17691        (WebInspector.LogContentView.prototype.consoleCleared): Removed _scrolledToBottom.
17692        (WebInspector.LogContentView.prototype.hidden): Removed call to storeScrollPositions.
17693        (WebInspector.LogContentView.prototype.get scrollableElements): Added.
17694        (WebInspector.LogContentView.prototype.get keepElementsScrolledToTheBottom): Added.
17695        * UserInterface/ScriptContentView.js:
17696        (WebInspector.ScriptContentView.prototype.get scrollableElements): Added.
17697        * UserInterface/TextEditor.js:
17698        (WebInspector.TextEditor.prototype.get contentContainerElement): Added.
17699        * UserInterface/TextResourceContentView.js:
17700        (WebInspector.TextResourceContentView.prototype.get scrollableElements): Added.
17701
177022012-04-14  Timothy Hatcher  <timothy@apple.com>
17703
17704        Add support for searching the DOM tree with the Find Banner.
17705
17706        Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and source
17707        code view (no Find banner is present)
17708
17709        Reviewed by Joseph Pecoraro.
17710
17711        * UserInterface/DOMTreeContentView.js:
17712        (WebInspector.DOMTreeContentView.prototype.get supportsSearch): Added. Return true.
17713        (WebInspector.DOMTreeContentView.prototype.get numberOfSearchResults): Added.
17714        (WebInspector.DOMTreeContentView.prototype.performSearch): Added. Clear previous results and call
17715        DOMAgent.performSearch.
17716        (WebInspector.DOMTreeContentView.prototype.performSearch.searchResultsReady): Store the identifier and
17717        fire the NumberOfSearchResultsDidChange event.
17718        (WebInspector.DOMTreeContentView.prototype.searchCleared): Added. Clear the result and state.
17719        (WebInspector.DOMTreeContentView.prototype.revealPreviousSearchResult): Added. Call _revealSearchResult.
17720        (WebInspector.DOMTreeContentView.prototype.revealNextSearchResult): Added. Ditto.
17721        (WebInspector.DOMTreeContentView.prototype._revealSearchResult): Added. Call DOMAgent.getSearchResults.
17722        (WebInspector.DOMTreeContentView.prototype._revealSearchResult.revealResult): Select the DOM node.
17723
177242012-04-14  Timothy Hatcher  <timothy@apple.com>
17725
17726        Show the yellow bouncy when highlighting the current search result.
17727
17728        Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and source
17729        code view (no Find banner is present)
17730
17731        Reviewed by Dan Bernstein.
17732
17733        * UserInterface/TextEditor.css:
17734        (.text-editor .bouncy-highlight): Added.
17735        (@-webkit-keyframes bouncy): Added.
17736        * UserInterface/TextEditor.js:
17737        (WebInspector.TextEditor.prototype._revealSearchResultTextRange): Create and add the bouncy element,
17738        positioned to line up with the search result element.
17739
177402012-04-13  Timothy Hatcher  <timothy@apple.com>
17741
17742        Support searching via the find banner on text resources and scripts.
17743
17744        Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and source
17745        code view (no Find banner is present)
17746
17747        Reviewed by Joseph Pecoraro.
17748
17749        * UserInterface/ScriptContentView.js:
17750        (WebInspector.ScriptContentView): Add event listener for TextEditor.Event.NumberOfSearchResultsDidChange.
17751        (WebInspector.ScriptContentView.prototype.get supportsSearch): Return true.
17752        (WebInspector.ScriptContentView.prototype.get numberOfSearchResults): Forward to _textEditor.
17753        (WebInspector.ScriptContentView.prototype.performSearch): Ditto.
17754        (WebInspector.ScriptContentView.prototype.searchCleared): Ditto.
17755        (WebInspector.ScriptContentView.prototype.revealPreviousSearchResult): Ditto.
17756        (WebInspector.ScriptContentView.prototype.revealNextSearchResult): Ditto.
17757        (WebInspector.ScriptContentView.prototype._numberOfSearchResultsDidChange): Added. Fire ContentView.Event.NumberOfSearchResultsDidChange.
17758        * UserInterface/SyntaxHighlighter.js:
17759        * UserInterface/SyntaxHighlightingDefaultTheme.css:
17760        (.supports-find-banner.showing-find-banner .syntax-highlighted .search-result): Added.
17761        * UserInterface/SyntaxHighlightingSupport.js:
17762        (WebInspector.createSyntaxHighlightedDocumentFragment.createTokenElement): Added parameter for search result. Append the search-result
17763        class when needed. Fixes the quoting for links now that the attribute range can be split by a search result.
17764        (WebInspector.createSyntaxHighlightedDocumentFragment.appendText): Changed to work with enumerateAttributes instead of enumerateAttribute.
17765        Check for the search result attribute. Call createTokenElement for search results.
17766        * UserInterface/TextEditor.js:
17767        (WebInspector.TextEditor.prototype.get numberOfSearchResults): Added.
17768        (WebInspector.TextEditor.prototype.performSearch): Added. Iterate over the lines in batches to prevent blocking too long.
17769        (WebInspector.TextEditor.prototype.performSearch.reportNumberOfSearchResultsDidChange):
17770        (WebInspector.TextEditor.prototype.performSearch.batchSearch): Loop over lines and perform a regex to find matches.
17771        (WebInspector.TextEditor.prototype.searchCleared): Added. Clear the results and remove the attribute from the lines.
17772        (WebInspector.TextEditor.prototype.revealPreviousSearchResult): Added. Decrement the index and call _revealSearchResultTextRange.
17773        (WebInspector.TextEditor.prototype.revealNextSearchResult): Added. Increment the index and call _revealSearchResultTextRange.
17774        (WebInspector.TextEditor.prototype._revealSearchResultTextRange): Added. Helper for revealPreviousSearchResult and revealNextSearchResult.
17775        (WebInspector.TextEditor.prototype._removeSearchResultStyles): Added. Query for all the search results and remove the style.
17776        * UserInterface/TextResourceContentView.js:
17777        (WebInspector.TextResourceContentView): Add event listener for TextEditor.Event.NumberOfSearchResultsDidChange.
17778        (WebInspector.TextResourceContentView.prototype.get supportsSearch): Return true.
17779        (WebInspector.TextResourceContentView.prototype.get numberOfSearchResults): Forward to _textEditor.
17780        (WebInspector.TextResourceContentView.prototype.performSearch): Ditto.
17781        (WebInspector.TextResourceContentView.prototype.searchCleared): Ditto.
17782        (WebInspector.TextResourceContentView.prototype.revealPreviousSearchResult): Ditto.
17783        (WebInspector.TextResourceContentView.prototype.revealNextSearchResult): Ditto.
17784        (WebInspector.TextResourceContentView.prototype._numberOfSearchResultsDidChange): Added. Fire ContentView.Event.NumberOfSearchResultsDidChange.
17785
177862012-04-13  Timothy Hatcher  <timothy@apple.com>
17787
17788        Add keyboard shortcuts for next and previous search results.
17789
17790        Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree
17791        and source code view (no Find banner is present)
17792
17793        Reviewed by Brian Weinstein.
17794
17795        * UserInterface/FindBanner.js:
17796        (WebInspector.FindBanner): Added keyboard shortcuts for Command-G and Command-Shift-G.
17797
177982012-04-05  Timothy Hatcher  <timothy@apple.com>
17799
17800        Add support to WebInspector.ContentView for dealing with the find banner.
17801
17802        Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and
17803        source code view (no Find banner is present)
17804
17805        Reviewed by Joseph Pecoraro.
17806
17807        * UserInterface/ClusterContentView.js:
17808        (WebInspector.ClusterContentView):
17809        (WebInspector.ClusterContentView.prototype.get supportsSearch): Added. Always return true.
17810        (WebInspector.ClusterContentView.prototype.get numberOfSearchResults): Added. Forward to the current content view.
17811        (WebInspector.ClusterContentView.prototype.performSearch): Added. Ditto.
17812        (WebInspector.ClusterContentView.prototype.searchCleared): Added. Ditto.
17813        (WebInspector.ClusterContentView.prototype.revealPreviousSearchResult): Added. Ditto.
17814        (WebInspector.ClusterContentView.prototype.revealNextSearchResult): Added. Ditto.
17815        (WebInspector.ClusterContentView.prototype._currentContentViewDidChange): Dispatch the
17816        NumberOfSearchResultsDidChange event.
17817        (WebInspector.ClusterContentView.prototype._contentViewNumberOfSearchResultsDidChange): Re-dispatch
17818        the NumberOfSearchResultsDidChange event with this content view as the target.
17819        * UserInterface/ContentBrowser.js:
17820        (WebInspector.ContentBrowser):
17821        (WebInspector.ContentBrowser.prototype.findBannerPerformSearch): Added. Forward to the current content view.
17822        (WebInspector.ContentBrowser.prototype.findBannerSearchCleared): Added. Ditto.
17823        (WebInspector.ContentBrowser.prototype.findBannerRevealPreviousResult): Added. Ditto.
17824        (WebInspector.ContentBrowser.prototype.findBannerRevealNextResult): Added. Ditto.
17825        (WebInspector.ContentBrowser.prototype._showFindBanner): Don't show if the current content view does not support search.
17826        (WebInspector.ContentBrowser.prototype._contentViewNumberOfSearchResultsDidChange): Added. Update the find banner.
17827        * UserInterface/ContentView.js:
17828        (WebInspector.ContentView.prototype.get supportsSearch): Added stub.
17829        (WebInspector.ContentView.prototype.get numberOfSearchResults): Added stub.
17830        (WebInspector.ContentView.prototype.performSearch): Added stub.
17831        (WebInspector.ContentView.prototype.searchCleared): Added stub.
17832        (WebInspector.ContentView.prototype.revealPreviousSearchResult): Added stub.
17833        (WebInspector.ContentView.prototype.revealNextSearchResult): Added stub.
17834        * UserInterface/FindBanner.js:
17835        (WebInspector.FindBanner): Added event listeners.
17836        (WebInspector.FindBanner.prototype._inputFieldChanged): Added. Call the delegate.
17837        (WebInspector.FindBanner.prototype._previousResultButtonClicked): Added. Ditto.
17838        (WebInspector.FindBanner.prototype._nextResultButtonClicked): Added. Ditto.
17839
178402012-04-02  Timothy Hatcher  <timothy@apple.com>
17841
17842        Add WebInspector.FindBanner which implements the user interface for searching in content views.
17843
17844        The banner shows via Command-F and hides with Escape. Searching is not hooked up yet.
17845
17846        Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the
17847        DOM tree and source code view (no Find banner is present)
17848
17849        Reviewed by Brian Weinstein.
17850
17851        * Localizations/en.lproj/localizedStrings.js: Updated.
17852        * UserInterface/ContentBrowser.js:
17853        (WebInspector.ContentBrowser): Create a FindBanner and keyboard shortcut for Command-F.
17854        (WebInspector.ContentBrowser.prototype._showFindBanner): Added.
17855        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Change the target element
17856        of the find banner to the new content view.
17857        * UserInterface/ContentViewContainer.css:
17858        (.content-view-container): Added overflow hidden so the find-banner does not show when hidden.
17859        (.content-view-container > .content-view): Ditto.
17860        * UserInterface/FindBanner.css: Added.
17861        * UserInterface/FindBanner.js: Added.
17862        (WebInspector.FindBanner):
17863        (WebInspector.FindBanner.prototype.get delegate):
17864        (WebInspector.FindBanner.prototype.set delegate):
17865        (WebInspector.FindBanner.prototype.get element):
17866        (WebInspector.FindBanner.prototype.get inputField):
17867        (WebInspector.FindBanner.prototype.get searchQuery):
17868        (WebInspector.FindBanner.prototype.set searchQuery):
17869        (WebInspector.FindBanner.prototype.get numberOfResults):
17870        (WebInspector.FindBanner.prototype.set numberOfResults):
17871        (WebInspector.FindBanner.prototype.get targetElement):
17872        (WebInspector.FindBanner.prototype.set targetElement.delayedWork):
17873        (WebInspector.FindBanner.prototype.set targetElement):
17874        (WebInspector.FindBanner.prototype.show.delayedWork):
17875        (WebInspector.FindBanner.prototype.show):
17876        (WebInspector.FindBanner.prototype.hide):
17877        (WebInspector.FindBanner.prototype._doneButtonClicked):
17878        (WebInspector.FindBanner.prototype._generateButtonsGlyphsIfNeeded):
17879        * UserInterface/Main.html: Included FindBanner.css and FindBanner.js.
17880
178812012-04-13  Timothy Hatcher  <timothy@apple.com>
17882
17883        Use searchRegex.lastIndex instead of lineMatch.index + searchTerm.length.
17884
17885        When creating TextRanges in SearchSidebarPanel it is better to use lastIndex instead of the search term length.
17886        This isn't a bug now, but it could be later when we support regex search queries in addition of plan text searches.
17887
17888        Reviewed by Brian Weinstein.
17889
17890        * UserInterface/SearchSidebarPanel.js:
17891        (WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback.resourceCallback): Use searchRegex.lastIndex.
17892        (WebInspector.SearchSidebarPanel.prototype.performSearch.domCallback.domSearchResults): Ditto.
17893
178942012-04-05  Timothy Hatcher  <timothy@apple.com>
17895
17896        Add better support for getting and setting the text selection in WebInspector.TextEditor.
17897
17898        This will be needed for the find banner support. <rdar://problem/11193282>
17899
17900        Reviewed by Joseph Pecoraro.
17901
17902        * UserInterface/TextEditor.js:
17903        (WebInspector.TextEditor.prototype.get selectedTextRange): Added.
17904        (WebInspector.TextEditor.prototype.set selectedTextRange): Added.
17905        (WebInspector.TextEditor.prototype.revealLine): Use the selectedTextRange setter.
17906        (WebInspector.TextEditor.prototype._textRangeToDOMRange): Added. Use _textPositionToDOMLocation
17907        to get the start and end and make a new Range.
17908        (WebInspector.TextEditor.prototype._domRangeToTextRange): Added. Use _domLocationToTextPosition
17909        to get the start and end and make a new TextRange.
17910        (WebInspector.TextEditor.prototype._domLocationToTextPosition): Added.
17911        (WebInspector.TextEditor.prototype._textPositionToDOMLocation): Added.
17912        (WebInspector.TextEditorTextChunk): Set _textChunk on the element.
17913        * UserInterface/Utilities.js:
17914        (Node.prototype.traverseNextTextNode): Added. Copied from OpenSource utilities.js.
17915        (Node.prototype.rangeBoundaryForOffset): Added. Ditto.
17916
179172012-04-02  Timothy Hatcher  <timothy@apple.com>
17918
17919        Add support for disabling keyboard shortcuts and unbinding them altogether.
17920
17921        You might disable a shortcut to make it only apply when a content view is showing, but still
17922        have the shortcut be global. Also added support for unbinding a shortcut if you need to remove
17923        it altogether from the document.
17924
17925        This is likely to be required for find banner support.
17926
17927        Reviewed by Brian Weinstein.
17928
17929        * UserInterface/KeyboardShortcut.js:
17930        (WebInspector.KeyboardShortcut):
17931        (WebInspector.KeyboardShortcut.prototype.get disabled): Added.
17932        (WebInspector.KeyboardShortcut.prototype.set disabled): Added.
17933        (WebInspector.KeyboardShortcut.prototype.unbind): Added. Removes the shortcut from the target.
17934        (WebInspector.KeyboardShortcut.prototype.matchesEvent): Return early if disabled.
17935
179362012-04-02  Timothy Hatcher  <timothy@apple.com>
17937
17938        Make it possible to generate colored images at different sizes than the intrinsic image size.
17939
17940        This is useful when the input image is a PDF and a different size is needed. This support
17941        is needed for the find banner back/forward arrows.
17942
17943        Reviewed by Brian Weinstein.
17944
17945        * UserInterface/ImageUtilities.js:
17946        (generateColoredImage): Added optional width and height parameters. Use the intrinsic width and
17947        height as fallback.
17948        (generateColoredImagesForCSS.generateImage): Pull the width and height out of the specification.
17949        Use the intrinsic width and height as fallback. Pass the width and height to generateColoredImage
17950        with a scale of 1 now that the pixelRatio is now premultiplied in the width and height.
17951
179522012-04-02  Timothy Hatcher  <timothy@apple.com>
17953
17954        Tweak the colors and gradients used by the search sidebar to match other bars in the Web Inspector.
17955
17956        If only we had variables in CSS...
17957
17958        Reviewed by John Sullivan.
17959
17960        * UserInterface/SearchSidebarPanel.css:
17961        (.sidebar > .panel.search > .search-bar): Tweaked the colors to match the ones in TimelinesContentView.css
17962        the upcoming FindBanner.css.
17963
179642012-04-12  Timothy Hatcher  <timothy@apple.com>
17965
17966        Create a funnel point for display names of URLs and hosts, and properly decode lastPathComponent.
17967
17968        This decodes lastPathComponent as a URL escaped string. The host needs to be decoded as a punycode string,
17969        but that isn't easily done in JavaScript so <rdar://problem/11237413> tracks that.
17970
17971        <rdar://problem/11236933> High-ascii web addresses show corrupted in Web Inspector
17972
17973        Reviewed by Brian Weinstein.
17974
17975        * UserInterface/ApplicationCacheFrameContentView.js:
17976        (WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback): Remove unused lastPathComponent var.
17977        * UserInterface/ApplicationCacheFrameTreeElement.js:
17978        (WebInspector.ApplicationCacheFrameTreeElement.prototype.updateTitles): Use displayNameForURL and displayNameForHost.
17979        * UserInterface/ApplicationCacheManifestTreeElement.js:
17980        (WebInspector.ApplicationCacheManifestTreeElement.prototype._generateTitles): Ditto.
17981        * UserInterface/CallFrameTreeElement.js:
17982        (WebInspector.CallFrameTreeElement): Use displayNameForURL.
17983        * UserInterface/ConsoleMessageImpl.js:
17984        (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): Ditto.
17985        * UserInterface/CookieStorageTreeElement.js:
17986        (WebInspector.CookieStorageTreeElement): Use displayNameForHost.
17987        * UserInterface/DOMStorageTreeElement.js:
17988        (WebInspector.DOMStorageTreeElement): Ditto.
17989        (WebInspector.DOMStorageTreeElement.prototype.get name): Ditto.
17990        * UserInterface/DatabaseHostTreeElement.js:
17991        (WebInspector.DatabaseHostTreeElement): Ditto.
17992        (WebInspector.DatabaseHostTreeElement.prototype.get name): Ditto.
17993        * UserInterface/EventListenerSectionGroup.js:
17994        (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink): Use displayNameForURL.
17995        * UserInterface/Main.js:
17996        (WebInspector.displayNameForURL): Added. Use decodeURIComponent for lastPathComponent and displayNameForHost for host.
17997        (WebInspector.displayNameForHost): Added. Returns the input, with a comment about decoding punycode.
17998        (WebInspector.updateWindowTitle): Use decodeURIComponent for lastPathComponent and displayNameForHost for host.
17999        * UserInterface/ProfileDataGridTree.js:
18000        (WebInspector.ProfileDataGridNode.prototype._linkifyLocation): Use displayNameForURL.
18001        * UserInterface/ResourceTimelineDataGridNode.js:
18002        (WebInspector.ResourceTimelineDataGridNode.prototype.get data): Use displayNameForURL and displayNameForHost.
18003        * UserInterface/ResourceTreeElement.js:
18004        (WebInspector.ResourceTreeElement.prototype._updateTitles): Ditto.
18005        * UserInterface/ScriptTimelineDataGridNode.js:
18006        (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Use displayNameForURL.
18007        * UserInterface/ScriptTreeElement.js:
18008        (WebInspector.ScriptTreeElement): Use displayNameForURL and displayNameForHost.
18009
180102012-04-11  Timothy Hatcher  <timothy@apple.com>
18011
18012        Strip common error message prefixes from the message line in the Issue sidebar.
18013
18014        The prefix is used to determine the title line, so it redundant to include it in the message.
18015        And removing it from the message gives more room for the important info of the message.
18016
18017        <rdar://problem/11219712> Can't see entire content of errors in the Issue sidebar
18018
18019        Reviewed by Brian Weinstein.
18020
18021        * Localizations/en.lproj/localizedStrings.js: Updated.
18022        * UserInterface/IssueMessage.js:
18023        (WebInspector.IssueMessage): Determine the type based on source and text prefix matching.
18024        Removed _source property, and added _type to replace it.
18025        (WebInspector.IssueMessage.Type.displayName): Added.
18026        (WebInspector.IssueMessage.prototype.get type): Renamed from source and return _type instead.
18027        * UserInterface/IssueTreeElement.js:
18028        (WebInspector.IssueTreeElement): Use a switch for the level instead of raw string comparison.
18029        Use WebInspector.IssueMessage.Type.displayName to get the title.
18030        (WebInspector.IssueTreeElement.titleForIssue): Removed.
18031
180322012-04-09  Timothy Hatcher  <timothy@apple.com>
18033
18034        Add keyboard shortcuts for pause/continue, step over, step into and step out.
18035
18036        This matches Xcode's keyboard shortcuts and also supports the original Web Inspector
18037        keyboard shortcuts for compatibility.
18038
18039        <rdar://problem/11205675> Debugger keyboard shortcuts are broken (step into, step over, etc)
18040
18041        Reviewed by John Sullivan.
18042
18043        * Localizations/en.lproj/localizedStrings.js: Updated.
18044        * UserInterface/QuickConsole.js:
18045        (WebInspector.QuickConsole): Create the KeyboardShortcuts and show them in the tooltips.
18046        (WebInspector.QuickConsole.prototype.set collapsed): Add the keyboard shortcut to the tooltips.
18047        (WebInspector.QuickConsole.prototype._debuggerDidPause): Ditto.
18048        (WebInspector.QuickConsole.prototype._debuggerDidResume): Ditto.
18049
180502012-04-07  Timothy Hatcher  <timothy@apple.com>
18051
18052        Make the completion popup look like the one in Xcode.
18053
18054        <rdar://problem/11201824> Console: Autocomplete suggestion list is ugly (has wrong typeface)
18055
18056        Reviewed by Dan Bernstein.
18057
18058        * UserInterface/TextPrompt.css:
18059        (.suggest-box):
18060        (.suggest-box .container):
18061        (.suggest-box-content-item):
18062        (.suggest-box-content-item.selected):
18063        * UserInterface/TextPrompt.js:
18064        (WebInspector.TextPrompt.SuggestBox.prototype._updateBoxPosition): Adjusted padding. Impose a max
18065        height of 160, which turns out to be 10 items.
18066
180672012-04-07  Timothy Hatcher  <timothy@apple.com>
18068
18069        Make the completion popup work when the console is scrolled.
18070
18071        <rdar://problem/11184504> "Current Log" console input is way broken when using inline completion popup
18072
18073        Reviewed by Joseph Pecoraro.
18074
18075        * UserInterface/Utilities.js:
18076        (Element.prototype.offsetRelativeToWindow): Removed. boxInWindow was the only client.
18077        (Element.prototype.boxInWindow): Removed targetWindow parameter, the only client always passed 'window'.
18078        Use getClientRects instead of the broken offsetRelativeToWindow.
18079
180802012-04-06  Timothy Hatcher  <timothy@apple.com>
18081
18082        Make console completion behave more like Xcode's auto completion.
18083
18084        This makes the suggestion popup appear for single items and completions are always shown
18085        as unselected grey text, not a selected range. The tab key now also accepts the completion.
18086
18087        <rdar://problem/11201751> Console: Tab to autocomplete does not work
18088
18089        Reviewed by Joseph Pecoraro.
18090
18091        * UserInterface/TextPrompt.js:
18092        (WebInspector.TextPrompt.prototype._completionsReady): Always pass true for canShowForSingleItem when call
18093        _suggestBox.updateSuggestions.
18094        (WebInspector.TextPrompt.prototype._completionsReady): Remove the auto completion path. There is now only
18095        one completion style, handled by applySuggestion.
18096        (WebInspector.TextPrompt.prototype.applySuggestion): Don't select the completion, do the what _completionsReady
18097        did for the auto complete path -- create an auto complete element for the grey text.
18098        (WebInspector.TextPrompt.prototype.tabKeyPressed): Call tabKeyPressed on _suggestBox to accept the completion
18099        instead of doing nothing.
18100
181012012-04-06  Timothy Hatcher  <timothy@apple.com>
18102
18103        Make the reload keyboard shortcut work when an input field is focused.
18104
18105        This makes the reload shortcuts and quick console toggle use the KeyboardShortcut class.
18106
18107        <rdar://problem/11187008> Web Inspector is very picky about what has to be focused in order to reload the page
18108
18109        Reviewed by Joseph Pecoraro.
18110
18111        * UserInterface/Main.js:
18112        (WebInspector.contentLoaded): Remove keydown event listener. Added reload keyboard shortcuts.
18113        (WebInspector._reloadPage): Added.
18114        (WebInspector._reloadPageIgnoringCache): Added.
18115        * UserInterface/QuickConsole.js:
18116        (WebInspector.QuickConsole): Added toggle or focus keyboard shortcut.
18117        (WebInspector.QuickConsole.prototype._toggleOrFocus): Added.
18118
181192012-04-02  Timothy Hatcher  <timothy@apple.com>
18120
18121        Select the contents of the search field when pressing the Command-Shift-F keyboard shortcut.
18122
18123        In addition to focusing the field, we now select the contents. This matches behavior of all
18124        search fields tied to keyboard shortcuts.
18125
18126        <rdar://problem/11169101>
18127
18128        Reviewed by Joseph Pecoraro.
18129
18130        * UserInterface/SearchSidebarPanel.js:
18131        (WebInspector.SearchSidebarPanel.prototype._focusSearchField): Call select() on the field.
18132
181332012-04-05  Timothy Hatcher  <timothy@apple.com>
18134
18135        Make clicking search results select the text range again.
18136
18137        This broke when the TextEditor content element was made user modifiable. When a user modifiable region is blurred
18138        it loses its selection. To prevent this we make it user modifiable only when focused.
18139
18140        <rdar://problem/11193282> REGRESSION (r42062): Search results are not selected when clicked in the Search sidebar
18141
18142        Reviewed by Brian Weinstein.
18143
18144        * UserInterface/TextEditor.css:
18145        (.text-editor > .content-container > .content): Removed -webkit-user-modify.
18146        (.text-editor > .content-container > .content:focus): Added. Set -webkit-user-modify here when focused.
18147        * UserInterface/TextEditor.js:
18148        (WebInspector.TextEditor): Set a tabIndex so the content can be focused when not user modifiable.
18149
181502012-03-31  Joseph Pecoraro  <pecoraro@apple.com>
18151
18152        <rdar://problem/11160188> Headers in resource details sidebar panel should be sortable
18153
18154        Reviewed by Timothy Hatcher.
18155
18156        * UserInterface/ResourceDetailsSidebarPanel.js:
18157        (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid.comparator):
18158        (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid):
18159        (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
18160
181612012-03-30  Timothy Hatcher  <timothy@apple.com>
18162
18163        Prevent dragging and dropping everywhere except editable fields in the Web Inspector.
18164
18165        Reviewed by John Sullivan.
18166
18167        * UserInterface/Main.js:
18168        (WebInspector.contentLoaded): Added dragover event listener.
18169        (WebInspector._dragOver): Added. Prevent the drop from being accepted unless the target
18170        is an editable field.
18171
181722012-03-30  Timothy Hatcher  <timothy@apple.com>
18173
18174        Make revealing line numbers in the Web Inspector work again in all cases.
18175
18176        This removes line number revealing from SourceCodeTextEditor and merges the extra logic that
18177        SourceCodeTextEditor had down into TextEditor. The problem was in WebInspector.TextEditor.shown,
18178        where _lineNumberToReveal was being deleted before SourceCodeTextEditor could use it.
18179
18180        <rdar://problem/11148983> REGRESSION: Debugger does not scroll execution line into view when
18181        pausing in the debugger
18182
18183        Reviewed by Brian Weinstein.
18184
18185        * UserInterface/SourceCodeTextEditor.js:
18186        (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate): Remove call to
18187        _revealPendingLineIfPossible.
18188        * UserInterface/TextEditor.js:
18189        (WebInspector.TextEditor.prototype.shown): Call _revealPendingLineIfPossible instead of revealLine.
18190        (WebInspector.TextEditor.prototype.revealLine): Delete _lineNumberToReveal now that the reveal
18191        is likely to happen.
18192        (WebInspector.TextEditor.prototype._revealPendingLineIfPossible): Added.
18193        (WebInspector.TextEditor.prototype._reset): Call _revealPendingLineIfPossible.
18194
181952012-03-29  Timothy Hatcher  <timothy@apple.com>
18196
18197        Switch to the new current log when reloading the page while viewing the current log.
18198
18199        <rdar://problem/11145724> Reloading the page should switch to Current Log
18200
18201        Reviewed by Brian Weinstein.
18202
18203        * UserInterface/LogSidebarPanel.js:
18204        (WebInspector.LogSidebarPanel.prototype._sessionStarted): Select the new Current Log
18205        if the current view is the previously active content view.
18206
182072012-03-29  Joseph Pecoraro  <pecoraro@apple.com>
18208
18209        <rdar://problem/10657781> Remote Inspector: Improve Generic Searching for Node "Inspect Element Eyeglass"
18210
18211        Match Open Source and add the two second highlight for inspected
18212        nodes. This is very useful for the Remote Inspector when using
18213        node searching.
18214
18215        Reviewed by Timothy Hatcher.
18216
18217        * UserInterface/Main.js:
18218        (WebInspector._domNodeWasInspected):
18219
182202012-03-28  Timothy Hatcher  <timothy@apple.com>
18221
18222        Add keyboard shortcuts for back and forward in the content browser.
18223
18224        The shortcuts are Command-Control-Left and Command-Control-Right.
18225
18226        Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
18227
18228        Reviewed by Joseph Pecoraro.
18229
18230        * Localizations/en.lproj/localizedStrings.js: Updated.
18231        * UserInterface/ContentBrowser.js:
18232        (WebInspector.ContentBrowser): Create the KeyboardShortcuts and add the shortcut to the button tooltips.
18233
182342012-03-28  Timothy Hatcher  <timothy@apple.com>
18235
18236        Add keyboard shortcuts for toggling the navigation and details sidebars.
18237
18238        The shortcuts are Control-0 and Control-Shift-0.
18239
18240        Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
18241
18242        Reviewed by Joseph Pecoraro.
18243
18244        * Localizations/en.lproj/localizedStrings.js: Updated.
18245        * UserInterface/Main.js:
18246        (WebInspector.contentLoaded): Create the KeyboardShortcuts.
18247        (WebInspector._leftSidebarToggleButtonToolTip): Include the keyboard shortcut.
18248        (WebInspector._rightSidebarToggleButtonToolTip): Ditto.
18249
182502012-03-28  Timothy Hatcher  <timothy@apple.com>
18251
18252        Add keyboard shortcuts for the details sidebar panels.
18253
18254        The shortcuts are Control-Shift-1, Control-Shift-2, etc.
18255
18256        Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
18257
18258        Reviewed by Joseph Pecoraro.
18259
18260        * UserInterface/AppearanceDetailsSidebarPanel.js:
18261        (WebInspector.AppearanceDetailsSidebarPanel): Pass "4" as the keyboard shortcut key.
18262        * UserInterface/CSSStyleDetailsSidebarPanel.js:
18263        (WebInspector.CSSStyleDetailsSidebarPanel): Pass "3" as the keyboard shortcut key.
18264        * UserInterface/DOMDetailsSidebarPanel.js:
18265        (WebInspector.DOMDetailsSidebarPanel): Pass the keyboard shortcut key through.
18266        * UserInterface/DOMNodeDetailsSidebarPanel.js:
18267        (WebInspector.DOMNodeDetailsSidebarPanel): Pass "2" as the keyboard shortcut key.
18268        * UserInterface/DetailsSidebarPanel.js:
18269        (WebInspector.DetailsSidebarPanel): Create a KeyboardShortcut and add it to the displayName.
18270        * UserInterface/ResourceDetailsSidebarPanel.js:
18271        (WebInspector.ResourceDetailsSidebarPanel): Pass "1" as the keyboard shortcut key.
18272        * UserInterface/ScopeChainDetailsSidebarPanel.js:
18273        (WebInspector.ScopeChainDetailsSidebarPanel): Pass "5" as the keyboard shortcut key.
18274
182752012-03-28  Timothy Hatcher  <timothy@apple.com>
18276
18277        Add keyboard shortcuts for the navigation sidebar panels.
18278
18279        The shortcuts are Control-1, Control-2, etc. We don't use Command to prevent conflicting with
18280        Safari's existing bookmarks bar commands.
18281
18282        Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
18283
18284        Reviewed by Joseph Pecoraro.
18285
18286        * Localizations/en.lproj/localizedStrings.js: Updated.
18287        * UserInterface/BreakpointSidebarPanel.js:
18288        (WebInspector.BreakpointSidebarPanel): Pass "7" as the keyboard shortcut key.
18289        * UserInterface/DebugSidebarPanel.js:
18290        (WebInspector.DebugSidebarPanel): Pass "6" as the keyboard shortcut key.
18291        * UserInterface/InstrumentSidebarPanel.js:
18292        (WebInspector.InstrumentSidebarPanel): Pass "3" as the keyboard shortcut key.
18293        * UserInterface/IssueSidebarPanel.js:
18294        (WebInspector.IssueSidebarPanel): Pass "5" as the keyboard shortcut key.
18295        * UserInterface/LogSidebarPanel.js:
18296        (WebInspector.LogSidebarPanel): Pass "8" as the keyboard shortcut key.
18297        * UserInterface/NavigationSidebarPanel.js:
18298        (WebInspector.NavigationSidebarPanel): Create a KeyboardShortcut and add it to the displayName.
18299        * UserInterface/ResourceSidebarPanel.js:
18300        (WebInspector.ResourceSidebarPanel): Pass "1" as the keyboard shortcut key.
18301        * UserInterface/SearchSidebarPanel.js:
18302        (WebInspector.SearchSidebarPanel): Pass "4" as the keyboard shortcut key.
18303        * UserInterface/StorageSidebarPanel.js:
18304        (WebInspector.StorageSidebarPanel): Pass "2" as the keyboard shortcut key.
18305
183062012-03-28  Timothy Hatcher  <timothy@apple.com>
18307
18308        Make it easier to properly show a sidebar panel in the Web Inspector.
18309
18310        This adds a show function to SidebarPanel that reveals the Sidebar if needed and selects
18311        the sidebar panel. For navigation sidebar panels it also focuses the TreeOutline.
18312
18313        Reviewed by Joseph Pecoraro.
18314
18315        * UserInterface/InspectorFrontendAPI.js:
18316        (InspectorFrontendAPI.stopProfilingJavaScript): Use show().
18317        * UserInterface/Main.js:
18318        (WebInspector._debuggerDidPause): Use show().
18319        * UserInterface/NavigationSidebarPanel.js:
18320        (WebInspector.NavigationSidebarPanel.prototype.show): Added. Call the superclass show and focus the tree.
18321        * UserInterface/SearchSidebarPanel.js:
18322        (WebInspector.SearchSidebarPanel.prototype._focusSearchField): Use show().
18323        * UserInterface/Sidebar.js:
18324        (WebInspector.Sidebar.prototype.addSidebarPanel): Use insertSidebarPanel.
18325        (WebInspector.Sidebar.prototype.insertSidebarPanel): Set the _parentSidebar to this.
18326        (WebInspector.Sidebar.prototype.removeSidebarPanel): Set the _parentSidebar to null.
18327        * UserInterface/SidebarPanel.js:
18328        (WebInspector.SidebarPanel.prototype.get parentSidebar): Added.
18329        (WebInspector.SidebarPanel.prototype.show): Added.
18330
183312012-03-28  Timothy Hatcher  <timothy@apple.com>
18332
18333        Add support to WebInspector.KeyboardShortcut for specifying a target element and callback.
18334
18335        This adds support for Command-Shift-F to focus the search field as the first shortcut.
18336
18337        Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
18338
18339        Reviewed by Joseph Pecoraro.
18340
18341        * UserInterface/KeyboardShortcut.js:
18342        (WebInspector.KeyboardShortcut): Added targetElement and callback parameters. Register a keydown listener.
18343        (WebInspector.KeyboardShortcut._handleKeyDown): Added. Walk the tree from the target and check for matching
18344        keyboard shortcuts.
18345        (WebInspector.KeyboardShortcut.prototype.get callback): Added.
18346        * UserInterface/SearchSidebarPanel.js:
18347        (WebInspector.SearchSidebarPanel): Create a KeyboardShortcut for Command-Shift-F to focus the search field.
18348        (WebInspector.SearchSidebarPanel.prototype._focusSearchFiled): Added.
18349
183502012-03-28  Timothy Hatcher  <timothy@apple.com>
18351
18352        Reintroduce WebInspector.KeyboardShortcut as a proper class.
18353
18354        Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
18355
18356        Reviewed by Joseph Pecoraro.
18357
18358        * UserInterface/EditingSupport.js:
18359        (WebInspector.startEditing.defaultFinishHandler): Use KeyboardShortcut.Key.Escape.keyCode instead of
18360        KeyboardShortcut.Keys.Esc.code.
18361        * UserInterface/JavaScriptLogViewController.js:
18362        (WebInspector.JavaScriptLogViewController): Remove the _shortcuts object and assign individual shortcuts.
18363        (WebInspector.JavaScriptLogViewController.prototype._promptKeyDown): Call matchesEvent on each shortcut.
18364        * UserInterface/KeyboardShortcut.js: Added.
18365        (WebInspector.KeyboardShortcut):
18366        (WebInspector.Key):
18367        (WebInspector.Key.prototype.get keyCode):
18368        (WebInspector.Key.prototype.get displayName):
18369        (WebInspector.Key.prototype.toString):
18370        (WebInspector.KeyboardShortcut.prototype.get modifiers):
18371        (WebInspector.KeyboardShortcut.prototype.get key):
18372        (WebInspector.KeyboardShortcut.prototype.get displayName):
18373        (WebInspector.KeyboardShortcut.prototype.matchesEvent):
18374        * UserInterface/StylePropertyTreeElement.js:
18375        (WebInspector.StylePropertyTreeElement.prototype.editingNameValueKeyDown): Use KeyboardShortcut.Key
18376        instead of KeyboardShortcut.Keys.
18377
183782012-03-28  Timothy Hatcher  <timothy@apple.com>
18379
18380        Remove WebInspector.KeyboardShortcut, soon to be replaced by a better version.
18381
18382        Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
18383
18384        Reviewed by Joseph Pecoraro.
18385
18386        * UserInterface/KeyboardShortcut.js: Removed.
18387
183882012-03-26  Timothy Hatcher  <timothy@apple.com>
18389
18390        Fix an issue where Inspect Element would sometimes not stick and the DOM node selection would revert to
18391        the previous selected DOM node.
18392
18393        <rdar://problem/11122326> Using the Inspect Element content menu sometimes fails to select the right DOM node
18394
18395        Reviewed by Joseph Pecoraro.
18396
18397        * UserInterface/DOMTreeContentView.js:
18398        (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectNode): Return early if the DOM tree
18399        has a selection already. A selection can be made while waiting for the async reply.
18400
184012012-03-26  Timothy Hatcher  <timothy@apple.com>
18402
18403        Add some missing checks to the DOMNodeDetailsSidebarPanel.
18404
18405        This prevents updating the interface if the DOM node selection changed while waiting for a response about
18406        the previous node from the backend.
18407
18408        Reviewed by Ada Chan.
18409
18410        * UserInterface/DOMNodeDetailsSidebarPanel.js:
18411        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady): Return early if the
18412        DOM node does not match the current DOM node. The DOM node changed while we were waiting for the async response.
18413        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection): Ditto.
18414        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback): Ditto.
18415
184162012-03-25  Timothy Hatcher  <timothy@apple.com>
18417
18418        Use DetailsSectionPropertiesRow for the DOM node Properties section.
18419
18420        Reviewed by Joseph Pecoraro.
18421
18422        * UserInterface/DOMNodeDetailsSidebarPanel.css: Removed.
18423        * UserInterface/DOMNodeDetailsSidebarPanel.js:
18424        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection): Create a
18425        DetailsSection and DetailsSectionPropertiesRow for each prototype.
18426        * UserInterface/DetailsSection.css: Set margin-bottom to -1px so nested section borders
18427        collapse into a single border.
18428        (.details-section):
18429        * UserInterface/Main.html: Removed DOMNodeDetailsSidebarPanel.css.
18430
184312012-03-24  Timothy Hatcher  <timothy@apple.com>
18432
18433        Make Select All only select the text content of the resource.
18434
18435        To do this content element needs to either be in an iframe or editable. Working with frames is
18436        pretty annoying, so making the content editable was the best option. But since we don't support
18437        editing resources yet, we need to prevent the editing from occurring.
18438
18439        <rdar://problem/11039596> REGRESSION (New Web Inspector): Select all while viewing source selects
18440        info in Details sidebar
18441
18442        Reviewed by Dan Bernstein.
18443
18444        * UserInterface/TextEditor.css:
18445        (.text-editor > .content-container > .content): Added -webkit-user-modify: read-write-plaintext-only.
18446        * UserInterface/TextEditor.js:
18447        (WebInspector.TextEditor): Added event listeners for keydown, textInput and webkitEditableContentChanged.
18448        (WebInspector.TextEditor.prototype._preventKeyDown): Added. Allow command keys and page up, page down,
18449        home, end, up, down, left, right.
18450        (WebInspector.TextEditor.prototype._preventTextInput): Added. Prevent paste and other input.
18451        (WebInspector.TextEditor.prototype._editableContentChanged): Added. Do a reset if this happens.
18452
184532012-03-24  Timothy Hatcher  <timothy@apple.com>
18454
18455        Remove WebInspector.isMac() and the dead code that came with it.
18456
18457        Rubber-stamped by Dan Bernstein.
18458
18459        * UserInterface/EditingSupport.js:
18460        (WebInspector.startEditing.defaultFinishHandler):
18461        (WebInspector.setCurrentFocusElement):
18462        * UserInterface/KeyboardShortcut.js:
18463        (WebInspector.KeyboardShortcut._modifiersToString):
18464        * UserInterface/TextPrompt.js:
18465        (WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler):
18466
184672012-03-22  Timothy Hatcher  <timothy@apple.com>
18468
18469        Make the Web Inspector DataGrid sort indicator be HiDPI compliant.
18470
18471        Part of: <rdar://problem/10643175> DataGrid sort indicator arrow and Timeline pills/callouts should be made HiDPI compliant
18472
18473        Reviewed by Joseph Pecoraro.
18474
18475        * UserInterface/DataGrid.css:
18476        (.data-grid th.sort-ascending > div:first-child::after): Use the canvas based image.
18477        (.data-grid th.sort-descending > div:first-child::after): Ditto.
18478
18479        * UserInterface/DataGrid.js:
18480        (WebInspector.DataGrid): Call _generateSortIndicatorImagesIfNeeded.
18481        (WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded): Added.
18482
18483        * UserInterface/Images/SortIndicatorDownArrow.pdf: Added.
18484        * UserInterface/Images/SortIndicatorUpArrow.pdf: Added.
18485        * UserInterface/Images/treeDownTriangleBlack.png: Removed.
18486        * UserInterface/Images/treeUpTriangleBlack.png: Removed.
18487
184882012-03-22  Timothy Hatcher  <timothy@apple.com>
18489
18490        Make the rest of the disclosure triangles in the Web Inspector HiDPI compliant.
18491
18492        Part of: <rdar://problem/10643175> Some disclosure triangles and Timeline pills should be made HiDPI compliant
18493
18494        Reviewed by Joseph Pecoraro.
18495
18496        * UserInterface/Images/DisclosureTriangleTinyClosed.pdf: Added.
18497        * UserInterface/Images/DisclosureTriangleTinyOpen.pdf: Added.
18498        * UserInterface/Images/disclosureTriangleSmallDown.png: Removed.
18499        * UserInterface/Images/disclosureTriangleSmallRight.png: Removed.
18500        * UserInterface/Images/treeDownTriangleWhite.png: Removed.
18501        * UserInterface/Images/treeRightTriangleBlack.png: Removed.
18502        * UserInterface/Images/treeRightTriangleWhite.png: Removed.
18503
18504        * UserInterface/ConsoleGroup.js:
18505        (WebInspector.ConsoleGroup): Delete bracket element. It was ugly and sooo Windows...
18506
18507        * UserInterface/Main.js:
18508        (WebInspector.contentLoaded): Call _generateDisclosureTriangleImages.
18509        (WebInspector._generateDisclosureTriangleImages): Added. Generate images for small and tiny.
18510
18511        * UserInterface/CSSStyleDetailsSidebarPanel.css: Use the canvas based disclosure triangles.
18512        * UserInterface/DOMTreeOutline.css: Ditto.
18513        * UserInterface/DataGrid.css: Ditto.
18514        * UserInterface/Section.css: Ditto.
18515        * UserInterface/LogContentView.css: Ditto. Also delete the bracket style rules.
18516
185172012-03-22  Joseph Pecoraro  <pecoraro@apple.com>
18518
18519        <rdar://problem/10391969> Remote Inspector: Add CSS Completion for iOS Properties
18520
18521        Add CSS auto-completion keywords for iOS properties.
18522        Add "touch" to the list of syntax highlighted value keywords.
18523
18524        Reviewed by Timothy Hatcher.
18525
18526        * UserInterface/CSSKeywordCompletions.js:
18527        * UserInterface/CSSSourceTokenizer.js:
18528        (WebInspector.CSSSourceTokenizer):
18529
18530
185312012-03-21  Timothy Hatcher  <timothy@apple.com>
18532
18533        Use -webkit-image-set instead of media queries in the Web Inspector.
18534
18535        This patch also uses separate border-image-slice and border-image-source properties to
18536        avoid duplicate slice numbers in each rule.
18537
18538        I didn't use image-set for the border-image cases since you still need a media query
18539        for the 2x slice numbers.
18540
18541        Reviewed by Jon Honeycutt.
18542
18543        * UserInterface/ApplicationCacheIcons.css:
18544        (.application-cache-manifest .icon): Use -webkit-image-set.
18545        (.application-cache-frame .icon): Ditto.
18546        * UserInterface/CookieIcon.css:
18547        (.cookie-icon .icon): Use -webkit-image-set.
18548        * UserInterface/DOMStorageIcons.css:
18549        (.local-storage-icon .icon): Use -webkit-image-set.
18550        (.session-storage-icon .icon): Ditto.
18551        * UserInterface/DatabaseIcon.css:
18552        (.database-icon .icon): Use -webkit-image-set.
18553        * UserInterface/DatabaseTableIcon.css:
18554        (.database-table-icon .icon): Use -webkit-image-set.
18555        * UserInterface/FolderIcon.css:
18556        (.folder-icon .icon): Use -webkit-image-set.
18557        * UserInterface/InstrumentIcons.css:
18558        (.network-icon .icon): Use -webkit-image-set.
18559        (.colors-icon .icon): Ditto.
18560        (.script-icon .icon): Ditto.
18561        (.stopwatch-icon .icon):
18562        (.profile-icon .icon): Use -webkit-image-set.
18563        * UserInterface/InstrumentSidebarPanel.css:
18564        (.sidebar > .panel.instrument > .title-bar > .record-glyph): Use -webkit-image-set.
18565        (.sidebar > .panel.instrument > .title-bar > .record-glyph.recording): Ditto.
18566        (.sidebar > .panel.instrument > .title-bar > .record-glyph:hover): Ditto.
18567        (.sidebar > .panel.instrument > .title-bar > .record-glyph.recording:hover): Ditto.
18568        (.sidebar > .panel.instrument > .title-bar > .record-glyph.forced): Ditto.
18569        (.sidebar > .panel.instrument > .title-bar > .record-glyph.recording.forced): Ditto.
18570        * UserInterface/LogIcon.css:
18571        (.log-icon .icon): Use -webkit-image-set.
18572        * UserInterface/ResourceIcons.css:
18573        (.resource-icon .icon): Use -webkit-image-set.
18574        (.resource-icon.resource-type-document .icon): Ditto.
18575        (.resource-icon.resource-type-image .icon): Ditto.
18576        (.resource-icon.resource-type-font .icon): Ditto.
18577        (.resource-icon.resource-type-stylesheet .icon): Ditto.
18578        (.resource-icon.resource-type-script .icon): Ditto.
18579        (.anonymous-script-icon .icon): Ditto.
18580        * UserInterface/TextEditor.css:
18581        (.text-editor > .gutter > .line-number.breakpoint-resolved > .breakpoint): Use border-image-source.
18582        * UserInterface/TimelineOverview.css:
18583        (.timeline-overview > .timeline .bar): Use border-image-slice.
18584        (.timeline-overview > .timeline.timeline-record-type-network .bar): Use border-image-source.
18585        (.timeline-overview > .timeline.timeline-record-type-layout .bar): Ditto.
18586        (.timeline-overview > .timeline.timeline-record-type-script .bar): Ditto.
18587
185882012-03-21  Timothy Hatcher  <timothy@apple.com>
18589
18590        Make the Web Inspector navigation bar and some disclosure triangles HiDPI aware again.
18591
18592        This regressed when HiDPI canvas was turned off by <rdar://problem/10887881>. This change also uses
18593        media queries, so dragging the Web Inspector between different DPI monitors will correctly switch.
18594
18595        <rdar://problem/11091555> HiDPI: Many small icons in new Web Inspector are blurry in HiDPI
18596
18597        Reviewed by Joseph Pecoraro.
18598
18599        * UserInterface/ActivateButtonNavigationItem.js:
18600        (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText): Added media query and 2x versions.
18601        * UserInterface/ButtonNavigationItem.js:
18602        (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Added media query and 2x versions.
18603        * UserInterface/DetailsSection.css:
18604        (.details-section > .header::before): Set background-size.
18605        (.details-section > .header:not(.mouse-over-options-element):active::before): Added 2x version.
18606        (.details-section.collapsed > .header::before): Ditto.
18607        (.details-section.collapsed > .header:not(.mouse-over-options-element):active::before): Ditto.
18608        * UserInterface/ImageUtilities.js:
18609        (generateColoredImage): Added scale parameter. Multiply width and height by scale.
18610        (generateColoredImagesForCSS.imageLoaded): Call generateImage for each pixel ratio.
18611        (generateColoredImagesForCSS.generateImage): Added pixelRatio parameter. Multiply the shadow values by pixelRatio.
18612        Pass the pixelRation to generateColoredImage.
18613        (generateColoredImagesForCSS): Remove depth and scale.
18614        (generateEmbossedImages._imageLoaded): Call _createEmbossedCanvasImage for each pixel ratio.
18615        (generateEmbossedImages._createEmbossedCanvasImage): Added pixelRatio parameter. Define the depth. Multiply the
18616        width and height by pixelRatio. Use width and height instead of image.width and image.height through out.
18617        (generateEmbossedImages._invertMaskImage): Added width and height parameters. Use instead of image.width and image.height.
18618        (generateEmbossedImages._applyImageMask): Remove unused HTMLCanvasElement as input code path.
18619        * UserInterface/Main.css:
18620        (.go-to-arrow:active): Added 2x version.
18621        (:focus .selected .go-to-arrow): Added 2x version.
18622        (:focus .selected .go-to-arrow:active): Added 2x version.
18623        * UserInterface/NavigationSidebarPanel.css:
18624        (.navigation-sidebar-panel-content-tree-outline .item .disclosure-button): Set background-size.
18625        (.navigation-sidebar-panel-content-tree-outline .item.selected .disclosure-button): Added 2x version.
18626        (.navigation-sidebar-panel-content-tree-outline .item.expanded .disclosure-button): Added 2x version.
18627        (.navigation-sidebar-panel-content-tree-outline .item.selected.expanded .disclosure-button): Added 2x version.
18628        * UserInterface/RadioButtonNavigationItem.js:
18629        (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Added media query and 2x versions.
18630        * UserInterface/TimelinesContentView.css:
18631        (.content-view.timelines > .data-grid th.collapser > .collapser-button): Set background-size.
18632        (.content-view.timelines > .data-grid th.collapser > .collapser-button:active): Added 2x version.
18633        (.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button): Added 2x version.
18634        (.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button:active): Added 2x version.
18635
186362012-03-20  Timothy Hatcher  <timothy@apple.com>
18637
18638        Don't allow setting breakpoints for resource types that are not Script or Document.
18639
18640        <rdar://problem/11044410> Should not be allowed to set breakpoints on CSS resources
18641
18642        Reviewed by Brian Weinstein.
18643
18644        * UserInterface/SourceCodeTextEditor.js:
18645        (WebInspector.SourceCodeTextEditor): Don't add event listeners unless _supportsDebugging is true.
18646        (WebInspector.SourceCodeTextEditor.prototype.close): Remove event listeners inside if _supportsDebugging block.
18647        (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Don't add breakpoints unless _supportsDebugging.
18648        (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointStatus): Assert _supportsDebugging.
18649        (WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved): Ditto.
18650        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Ditto.
18651        (WebInspector.SourceCodeTextEditor.prototype._matchesBreakpoint): Ditto.
18652        (WebInspector.SourceCodeTextEditor.prototype.get _supportsDebugging): Added.
18653        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointInfo): Return early if !_supportsDebugging.
18654        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded): Ditto.
18655        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved): Assert and return early if !_supportsDebugging.
18656        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved): Ditto.
18657        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled): Ditto.
18658
186592012-03-20  Timothy Hatcher  <timothy@apple.com>
18660
18661        Add and remove the window-inactive style class so controls, row selections, and backgrounds use their inactive colors.
18662
18663        <rdar://problem/11064364> Inspector controls (bars and buttons) have active appearance in inactive windows
18664
18665        Reviewed by Brian Weinstein.
18666
18667        * UserInterface/ButtonNavigationItem.css:
18668        (body.window-inactive .navigation-bar > .item.button:not(.suppress-emboss) > .glyph):
18669        (.navigation-bar > .item.button.disabled > .glyph):
18670        (body.window-inactive .navigation-bar > .item.button.disabled:not(.suppress-emboss) > .glyph):
18671        (.navigation-bar > .item.button.suppress-emboss > .glyph):
18672        (.navigation-bar > .item.button.suppress-emboss:active > .glyph):
18673        (.navigation-bar > .item.button.suppress-emboss.disabled > .glyph): Moved from QuickConsole.css.
18674        * UserInterface/DataGrid.css:
18675        (body.window-inactive .data-grid th.sort-descending): Fixed the selector to use window-inactive.
18676        * UserInterface/Main.js:
18677        (WebInspector.contentLoaded): Added window event listeners for blur and focus.
18678        (WebInspector.updateDockedState): Remove the window-inactive class when docking, just in case.
18679        (WebInspector._windowFocused): Added.
18680        (WebInspector._windowBlurred): Added.
18681        * UserInterface/QuickConsole.css: Moved the disabled button style to ButtonNavigationItem.css.
18682
186832012-03-19  Timothy Hatcher  <timothy@apple.com>
18684
18685        Support showing and working with Script breakpoints from the Breakpoint sidebar.
18686
18687        Part of: <rdar://problem/11075565> REGRESSION (New Web Inspector): Injected extension content scripts are not shown
18688
18689        Reviewed by Joseph Pecoraro.
18690
18691        * UserInterface/BreakpointSidebarPanel.js:
18692        (WebInspector.BreakpointSidebarPanel):
18693        (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Refactor code to work in terms on both Resource and Script.
18694        (WebInspector.BreakpointSidebarPanel.prototype._addBreakpointsForSourceCode): Renamed from _addBreakpointsForResource.
18695        (WebInspector.BreakpointSidebarPanel.prototype._resourceAdded): Use _addBreakpointsForSourceCode.
18696        (WebInspector.BreakpointSidebarPanel.prototype._mainResourceChanged): Ditto.
18697        (WebInspector.BreakpointSidebarPanel.prototype._scriptAdded): Added. Call _addBreakpointsForSourceCode if this script isn't
18698        backed by a Resource.
18699        (WebInspector.BreakpointSidebarPanel.prototype._scriptsCleared): Added. Remove all ScriptTreeElements.
18700        (WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected): Refactored to work with either Resource or Script.
18701        * UserInterface/DebuggerManager.js:
18702        (WebInspector.DebuggerManager.prototype.scriptForIdentifier): Added.
18703        (WebInspector.DebuggerManager.prototype.scriptsForURL): Added.
18704        (WebInspector.DebuggerManager.prototype._setBreakpoint): Set the breakpoint correctly for Script's without URLs.
18705
187062012-03-19  Timothy Hatcher  <timothy@apple.com>
18707
18708        Show Scripts in the Resource sidebar at the top level.
18709
18710        These scripts are grouped into 3 folders: Extension Scripts, Extra Scripts and Anonymous Scripts.
18711
18712        <rdar://problem/11075565> REGRESSION (New Web Inspector): Injected extension content scripts are not shown
18713
18714        Reviewed by Joseph Pecoraro.
18715
18716        * Localizations/en.lproj/localizedStrings.js: Updated.
18717        * UserInterface/DebuggerManager.js:
18718        (WebInspector.DebuggerManager.prototype.reset): Fire ScriptsCleared event.
18719        (WebInspector.DebuggerManager.prototype.scriptDidParse): Fire ScriptAdded event. Pass isContentScript
18720        to the Script constructor.
18721        * UserInterface/Images/ClippingJS.png: Added.
18722        * UserInterface/Images/ClippingJS@2x.png: Added.
18723        * UserInterface/Main.html: Included ScriptTreeElement.js.
18724        * UserInterface/ResourceIcons.css:
18725        (.anonymous-script-icon .icon): Added.
18726        * UserInterface/ResourceSidebarPanel.js:
18727        (WebInspector.ResourceSidebarPanel): Added event listeners for ScriptAdded and ScriptsCleared.
18728        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Create a tree element for
18729        the anonymous script.
18730        (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded): Create a tree element for scripts with URLs.
18731        (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared): Remove the script folders.
18732        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Support ScriptTreeElement.
18733        * UserInterface/Script.js:
18734        (WebInspector.Script): Added injected parameter.
18735        (WebInspector.Script.prototype.get injected): Added.
18736        * UserInterface/ScriptTreeElement.js: Added.
18737        (WebInspector.ScriptTreeElement):
18738        (WebInspector.ScriptTreeElement.prototype.get script):
18739
187402012-03-19  Timothy Hatcher  <timothy@apple.com>
18741
18742        Add WebInspector.ScriptContentView for showing content of Script objects.
18743
18744        Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not show when a
18745        breakpoint is hit while loading the page
18746
18747        Reviewed by Joseph Pecoraro.
18748
18749        * UserInterface/ContentView.js:
18750        (WebInspector.ContentView): Added case for Script.
18751        (WebInspector.ContentView.isViewable): Ditto.
18752        * UserInterface/DebugSidebarPanel.js:
18753        (WebInspector.DebugSidebarPanel.prototype._treeElementSelected): Simplify and use ResourceSidebarPanel.showSourceCode.
18754        * UserInterface/Main.html:
18755        * UserInterface/Main.js:
18756        (WebInspector.sidebarPanelForRepresentedObject):
18757        * UserInterface/ResourceSidebarPanel.js:
18758        (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView): Update assert for ScriptContentView.
18759        (WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie): Move a variable down below an early return.
18760        (WebInspector.ResourceSidebarPanel.prototype.showSourceCode): Updated to work with Scripts.
18761        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Close all ScriptContentViews.
18762        * UserInterface/ScriptContentView.css: Added.
18763        (.content-view.script > .text-editor):
18764        * UserInterface/ScriptContentView.js: Added. Copied mostly from TextResourceContentView.
18765        (WebInspector.ScriptContentView):
18766        (WebInspector.ScriptContentView.prototype.get script):
18767        (WebInspector.ScriptContentView.prototype.get textEditor):
18768        (WebInspector.ScriptContentView.prototype.get supplementalRepresentedObjects):
18769        (WebInspector.ScriptContentView.prototype.revealLine):
18770        (WebInspector.ScriptContentView.prototype.shown):
18771        (WebInspector.ScriptContentView.prototype.hidden):
18772        (WebInspector.ScriptContentView.prototype.closed):
18773        (WebInspector.ScriptContentView.prototype._contentWillPopulate):
18774        (WebInspector.ScriptContentView.prototype._executionLineNumberDidChange):
18775
187762012-03-18  Timothy Hatcher  <timothy@apple.com>
18777
18778        Hide line numbers for blank lines when showing inline scripts while the debugger is paused.
18779
18780        When paused in the debugger we sometimes can only show the scripts for the HTML file. When
18781        this happens the scripts are the only thing visible (in their final position) with blank
18782        lines for the earlier HTML content. This hides the line numbers for those blank lines
18783        to provide a clue to the user that they shouldn't expect content there.
18784
18785        Reviewed by Brian Weinstein.
18786
18787        * UserInterface/SourceCodeTextEditor.js:
18788        (WebInspector.SourceCodeTextEditor): Start with the first line as invalid, before a populate there
18789        is always a blank first line.
18790        (WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Clear the invalid line numbers.
18791        (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
18792        Add blank lines to the invalid line numbers map.
18793        (WebInspector.SourceCodeTextEditor.prototype.textEditorShouldHideLineNumber): Added. Check the invalid
18794        line numbers map.
18795        * UserInterface/TextEditor.js:
18796        (WebInspector.TextEditor.prototype.updateLayout): Added force parameter and pass it to _updateLineNumbers.
18797        (WebInspector.TextEditor.prototype._reset): Pass true to updateLayout.
18798        (WebInspector.TextEditor.prototype._updateLineNumbers): Added force parameter. Always rebuild the line numbers
18799        when this is true.
18800        (WebInspector.TextEditor.prototype._lineNumberTextContent): Added. Helper.
18801        (WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo): Use _lineNumberTextContent.
18802        (WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement): Ditto.
18803
188042012-03-18  Timothy Hatcher  <timothy@apple.com>
18805
18806        Remove duplicate copies of _checkForOldResources and put it in the NavigationSidebarPanel base class.
18807
18808        Now that the individual _checkForOldResources functions don't access different URL maps, this code
18809        can now be shared down in NavigationSidebarPanel.
18810
18811        Reviewed by John Sullivan.
18812
18813        * UserInterface/BreakpointSidebarPanel.js:
18814        (WebInspector.BreakpointSidebarPanel): Removed event listeners for _checkForOldResources.
18815        (WebInspector.BreakpointSidebarPanel.prototype._mainResourceChanged): Remove call to _checkForOldResources.
18816        (WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources): Removed.
18817        * UserInterface/IssueSidebarPanel.js:
18818        (WebInspector.IssueSidebarPanel): Removed event listeners for _checkForOldResources.
18819        (WebInspector.IssueSidebarPanel.prototype._checkForOldResources): Removed.
18820        * UserInterface/NavigationSidebarPanel.js:
18821        (WebInspector.NavigationSidebarPanel): Added event listeners for _checkForOldResources.
18822        (WebInspector.NavigationSidebarPanel.prototype._checkForOldResources): Added.
18823        (WebInspector.NavigationSidebarPanel.prototype._checkForOldResources.delayedWork): Added.
18824        * UserInterface/SearchSidebarPanel.js:
18825        (WebInspector.SearchSidebarPanel): Removed event listeners for _checkForOldResources.
18826        (WebInspector.SearchSidebarPanel.prototype._checkForOldResources): Removed.
18827
188282012-03-18  Timothy Hatcher  <timothy@apple.com>
18829
18830        Simplify IssueSidebarPanel and SearchSidebarPanel by using TreeOutline.getCachedTreeElement to
18831        find existing ResourceTreeElements.
18832
18833        Reviewed by Brian Weinstein.
18834
18835        * UserInterface/IssueSidebarPanel.js:
18836        (WebInspector.IssueSidebarPanel): Removed _issueRootElements.
18837        (WebInspector.IssueSidebarPanel.prototype._issueWasAdded): Use getCachedTreeElement to find
18838        the existing ResourceTreeElement.
18839        (WebInspector.IssueSidebarPanel.prototype._issuesCleared): Removed _issueRootElements reference.
18840        (WebInspector.IssueSidebarPanel.prototype._checkForOldResources.delayedWork): Ditto.
18841        * UserInterface/SearchSidebarPanel.js:
18842        (WebInspector.SearchSidebarPanel): Removed _resourceSearchResultMap.
18843        (WebInspector.SearchSidebarPanel.prototype._treeElementForResource): Removed _resourceSearchResultMap
18844        reference. Use getCachedTreeElement to find the existing ResourceTreeElement.
18845        (WebInspector.SearchSidebarPanel.prototype._checkForOldResources.delayedWork):
18846        Removed _resourceSearchResultMap reference.
18847
188482012-03-18  Timothy Hatcher  <timothy@apple.com>
18849
18850        Simplify BreakpointSidebarPanel by using TreeOutline.getCachedTreeElement to find existing
18851        the BreakpointTreeElements and ResourceTreeElements.
18852
18853        Reviewed by Brian Weinstein.
18854
18855        * UserInterface/BreakpointSidebarPanel.js:
18856        (WebInspector.BreakpointSidebarPanel): Removed _resourceTreeElementURLMap.
18857        (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Use getCachedTreeElement to
18858        find the existing ResourceTreeElement.
18859        (WebInspector.BreakpointSidebarPanel.prototype._breakpointRemoved): Use getCachedTreeElement to
18860        find the BreakpointTreeElement to remove.
18861        (WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources.delayedWork): Removed
18862        _resourceTreeElementURLMap reference.
18863
188642012-03-18  Timothy Hatcher  <timothy@apple.com>
18865
18866        Fix some exceptions I hit while adding ScriptContentView.
18867
18868        Add some null checks at the callers of sidebarPanelForRepresentedObject, since sidebarPanelForRepresentedObject
18869        can return null when the representedObject is unknown. The sidebarPanelForRepresentedObject function logs an
18870        error to the console when it returns null. So the exceptions were just more noise.
18871
18872        Reviewed by John Sullivan.
18873
18874        * UserInterface/Main.js:
18875        (WebInspector.contentBrowserTreeElementForRepresentedObject): Null check the result of sidebarPanelForRepresentedObject.
18876        (WebInspector._updateCurrentContentViewCookie): Ditto.
18877
188782012-03-18  Timothy Hatcher  <timothy@apple.com>
18879
18880        Fix an issue where the execution line was not highlighted for single line scripts.
18881
18882        Reviewed by Brian Weinstein.
18883
18884        * UserInterface/TextEditor.js:
18885        (WebInspector.TextEditor.prototype._reset): Add ExecutionLineStyleClassName to the text chunk element
18886        if the chunk is one line and it is the execution line.
18887
188882012-03-18  Timothy Hatcher  <timothy@apple.com>
18889
18890        Rename ResourceSidebarPanel.showResourceSourceCode to ResourceSidebarPanel.showSourceCode.
18891
18892        This is prep for making ResourceSidebarPanel be responsible for showing Scripts.
18893
18894        Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not show when a
18895        breakpoint is hit while loading the page
18896
18897        Reviewed by Joseph Pecoraro.
18898
18899        * UserInterface/BreakpointSidebarPanel.js:
18900        (WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected):
18901        * UserInterface/DebugSidebarPanel.js:
18902        * UserInterface/IssueSidebarPanel.js:
18903        (WebInspector.IssueSidebarPanel.prototype._treeElementSelected):
18904        * UserInterface/Main.js:
18905        (WebInspector.openURL):
18906        * UserInterface/ResourceSidebarPanel.js:
18907        (WebInspector.ResourceSidebarPanel.prototype.showSourceCode): Renamed from showResourceSourceCode. Changed
18908        to not assume we are dealing with a Resource.
18909        * UserInterface/ResourceTimelineDataGridNode.js:
18910        (WebInspector.ResourceTimelineDataGridNode.prototype._goToResource):
18911        * UserInterface/ScriptTimelineDataGridNode.js:
18912        (WebInspector.ScriptTimelineDataGridNode.prototype._goToResource):
18913        * UserInterface/SearchSidebarPanel.js:
18914        (WebInspector.SearchSidebarPanel.prototype._treeElementSelected):
18915
189162012-03-18  Timothy Hatcher  <timothy@apple.com>
18917
18918        Prevent double dividers in the navigation bar when viewing a non-frame content view.
18919
18920        The node search navigation item is hidden when not on a frame content view, but that causes
18921        the adjacent dividers to come together. We need to hide one divider in this case.
18922
18923        Reviewed by Brian Weinstein.
18924
18925        * UserInterface/Main.js:
18926        (WebInspector.contentLoaded): Remember the divider to the left of the node search item.
18927        (WebInspector._currentContentViewDidChange): Hide the divider too.
18928
189292012-03-18  Timothy Hatcher  <timothy@apple.com>
18930
18931        Show script content when the debugger pauses on a resource that hasn't populated its full content yet.
18932
18933        Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not show when a
18934        breakpoint is hit while loading the page
18935
18936        Reviewed by Joseph Pecoraro.
18937
18938        * UserInterface/DebuggerManager.js:
18939        (WebInspector.DebuggerManager):
18940        (WebInspector.DebuggerManager.prototype.scriptsForResource): Added.
18941        (WebInspector.DebuggerManager.prototype.reset): Clear _scriptURLMap.
18942        (WebInspector.DebuggerManager.prototype.scriptDidParse): Don't add the script again if it is already known.
18943        Add scripts with URLs to _scriptURLMap.
18944        * UserInterface/SourceCodeTextEditor.js:
18945        (WebInspector.SourceCodeTextEditor): Call _activeCallFrameDidChange to update the execution line and request
18946        script content if needed.
18947        (WebInspector.SourceCodeTextEditor.prototype.revealLine): Store the line number if we don't have the line needed
18948        to show yet. Delete the stored values if we call through to TextEditor.
18949        (WebInspector.SourceCodeTextEditor.prototype._revealPendingLineIfPossible): Don't delete the stored values here.
18950        Return early if we don't have the line needed.
18951        (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Added.
18952        (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate): Added.
18953        (WebInspector.SourceCodeTextEditor.prototype._populateWithContent): Added.
18954        (WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Set _fullContentPopulated and call _populateWithContent.
18955        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Call _populateWithInlineScriptContent or
18956        _populateWithScriptContent for Resource source code.
18957        (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent): Added. Request the content for all
18958        the scripts for this URL.
18959        (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable): Concat the scripts
18960        together, adding the script tags.
18961        (WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent): Added. Request the single script content.
18962        (WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent.scriptContentAvailable): Set _fullContentPopulated
18963        and call _populateWithContent.
18964        * UserInterface/TextResourceContentView.js:
18965        (WebInspector.TextResourceContentView): Listen for the ContentWillPopulate event.
18966        (WebInspector.TextResourceContentView.prototype._contentWillPopulate): Renamed from contentAvailable. Do nothing if the text
18967        editor is already added.
18968
189692012-03-16  Timothy Hatcher  <timothy@apple.com>
18970
18971        Factor most of TextResourceContentView out into SourceCodeTextEditor, a new TextEditor subclass.
18972
18973        This is prep work for making a ScriptContentView to show Scripts before the resource loads.
18974
18975        Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not
18976        show when a breakpoint is hit while loading the page
18977
18978        Reviewed by Joseph Pecoraro.
18979
18980        * UserInterface/IssueManager.js:
18981        (WebInspector.IssueManager.prototype.issuesForSourceCode): Renamed from issuesForResource.
18982        * UserInterface/Main.html: Included SourceCodeTextEditor.js and SourceCodeTextEditor.css.
18983        * UserInterface/ResourceContentView.js:
18984        (WebInspector.ResourceContentView): Use issuesForSourceCode.
18985        * UserInterface/SourceCodeTextEditor.css: Copied from TextResourceContentView.css.
18986        (.source-code.text-editor .text-editor-text-chunk.error):
18987        (.source-code.text-editor .text-editor-text-chunk.warning):
18988        * UserInterface/SourceCodeTextEditor.js: Added.
18989        (WebInspector.SourceCodeTextEditor):
18990        (WebInspector.SourceCodeTextEditor.prototype.get sourceCode):
18991        (WebInspector.SourceCodeTextEditor.prototype.revealLine): Copied from TextResourceContentView.
18992        (WebInspector.SourceCodeTextEditor.prototype.shown): Call _revealPendingLineIfPossible.
18993        (WebInspector.SourceCodeTextEditor.prototype.close): Remove event listeners.
18994        (WebInspector.SourceCodeTextEditor.prototype._revealPendingLineIfPossible): Helper.
18995        (WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Copied from TextResourceContentView.
18996        (WebInspector.SourceCodeTextEditor.prototype._updateBreakpointStatus): Ditto.
18997        (WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved): Ditto.
18998        (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Ditto.
18999        (WebInspector.SourceCodeTextEditor.prototype._matchesScriptLocation): Helper.
19000        (WebInspector.SourceCodeTextEditor.prototype._matchesBreakpoint): Helper.
19001        (WebInspector.SourceCodeTextEditor.prototype._matchesIssue): Helper.
19002        (WebInspector.SourceCodeTextEditor.prototype._issueWasAdded): Copied from TextResourceContentView.
19003        (WebInspector.SourceCodeTextEditor.prototype._addIssueToLineNumberMap): Helper.
19004        (WebInspector.SourceCodeTextEditor.prototype._addIssueToLine): Copied from TextResourceContentView.
19005        (WebInspector.SourceCodeTextEditor.prototype._breakpointInfoForBreakpoint): Ditto.
19006        (WebInspector.SourceCodeTextEditor.prototype.textEditorBaseURL): Ditto.
19007        (WebInspector.SourceCodeTextEditor.prototype.textEditorLineContentUpdated): Ditto.
19008        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointInfo): Ditto.
19009        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded): Ditto.
19010        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved): Ditto.
19011        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved): Ditto.
19012        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled): Ditto.
19013        * UserInterface/TextEditor.js:
19014        (WebInspector.TextEditor): Call the Object constructor.
19015        (WebInspector.TextEditor.prototype.set executionLineNumber): Fire the ExecutionLineNumberDidChange event.
19016        * UserInterface/TextResourceContentView.css:
19017        (.text-editor .text-editor-text-chunk.error): Removed.
19018        (.text-editor .text-editor-text-chunk.warning): Removed.
19019        * UserInterface/TextResourceContentView.js:
19020        (WebInspector.TextResourceContentView): Listen for the ExecutionLineNumberDidChange event.
19021        (WebInspector.TextResourceContentView.prototype.get supplementalRepresentedObjects): If the SourceCodeTextEditor
19022        has an executionLineNumber, we can assume it is always the active call frame.
19023        (WebInspector.TextResourceContentView.prototype.contentAvailable): Just remove the spinner or error message
19024        and append the text editor.
19025        (WebInspector.TextResourceContentView.prototype.revealLine): Just call revealLine on the text editor.
19026        (WebInspector.TextResourceContentView.prototype.closed): Call close on the text editor.
19027        (WebInspector.TextResourceContentView.prototype._executionLineNumberDidChange): Added.
19028
190292012-03-15  Timothy Hatcher  <timothy@apple.com>
19030
19031        Allow breakpoints to be set for a Resource or a Script.
19032
19033        This is prep for making a TextEditor subclass that works with either a Script or a Resource.
19034
19035        Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not
19036        show when a breakpoint is hit while loading the page
19037
19038        Reviewed by Joseph Pecoraro.
19039
19040        * UserInterface/Breakpoint.js:
19041        (WebInspector.Breakpoint): Make the constructor take a SourceCode object instead of a URL.
19042        (WebInspector.Breakpoint.prototype.get scriptIdentifier): Added.
19043        (WebInspector.Breakpoint.prototype.get info): Updated the comment.
19044        * UserInterface/BreakpointSidebarPanel.js:
19045        (WebInspector.BreakpointSidebarPanel.prototype._addBreakpointsForResource): Use breakpointsForSourceCode.
19046        * UserInterface/DebuggerManager.js:
19047        (WebInspector.DebuggerManager):
19048        (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode): Renamed from breakpointsForURL. Takes
19049        a SourceCode object and looks up by url or id.
19050        (WebInspector.DebuggerManager.prototype.addBreakpoint): Don't assume there is a url. Adds the breakpoint
19051        to the URL map and/or the script identifier map.
19052        (WebInspector.DebuggerManager.prototype.removeBreakpoint): Ditto for removal.
19053        (WebInspector.DebuggerManager.prototype._saveBreakpoints): Skips breakpoints without URLs.
19054        * UserInterface/TextResourceContentView.js:
19055        (WebInspector.TextResourceContentView.prototype.contentAvailable): Use breakpointsForSourceCode.
19056        (WebInspector.TextResourceContentView.prototype.textEditorBreakpointAdded): Pass the resource to the
19057        Breakpoint constructor instead of the URL.
19058
190592012-03-17  Timothy Hatcher  <timothy@apple.com>
19060
19061        Use Date.toLocaleString() to format the date in the Exprires column of the Cookies view.
19062
19063        <rdar://problem/9628659> Expires date in the Cookies view should be localized
19064
19065        Reviewed by Ada Chan.
19066
19067        * UserInterface/CookieStorageContentView.js:
19068        (WebInspector.CookieStorageContentView.prototype._rebuildTable): Use toLocaleString().
19069
190702012-03-16  Joseph Pecoraro  <pecoraro@apple.com>
19071
19072        Give each Timeline DataGrid a chance to react to EventMarkers.
19073
19074        If another timeline data grid was active when event markers arrived,
19075        then switching to the Network data grid was not showing those event
19076        markers. Give each Timeline data grid a chance to react to the
19077        event marker, not just the active data grid.
19078
19079        Reviewed by Timothy Hatcher.
19080
19081        * UserInterface/TimelinesContentView.js:
19082        (WebInspector.TimelinesContentView):
19083        (WebInspector.TimelinesContentView.prototype._recordingStarted):
19084        (WebInspector.TimelinesContentView.prototype._recordedEventMarker):
19085        (WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecordsAndEventMarkers):
19086
190872012-03-16  Joseph Pecoraro  <pecoraro@apple.com>
19088
19089        Workaround sporatic double thick border appearing in collapsed columns.
19090
19091        Occasionally the Networks data grid will show a double thick border where
19092        the collapsed, 0-width, columns were. Workaround this by just hiding the
19093        border for collapsed columns.
19094
19095        Reviewed by Timothy Hatcher.
19096
19097        * UserInterface/TimelinesContentView.css:
19098        (.content-view.timelines > .data-grid.collapsed-details td.column-group-details:not(:last-child)):
19099        * UserInterface/NetworkDataGrid.js:
19100        (WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
19101
191022012-03-15  Timothy Hatcher  <timothy@apple.com>
19103
19104        Make the Quick Console toolbar buttons pin to the bottom when doing multi-line input.
19105
19106        Also make the scrollbars not interfere if the user has old-school scrollbars.
19107
19108        Reviewed by Joseph Pecoraro.
19109
19110        * UserInterface/QuickConsole.css:
19111        (.quick-console): Specify overflow-x and overflow-y separately. Use auto instead of scroll.
19112        (.quick-console > .view-container): Use auto instead of scroll.
19113        (.quick-console > .toolbar > .navigation-bar-container): Added.
19114        (.quick-console > .toolbar > .navigation-bar-container > .navigation-bar-spacer): Added.
19115        (.quick-console > .toolbar > .navigation-bar-container > .navigation-bar): Updated the selector.
19116        (.quick-console > .toolbar > .navigation-bar-container > .navigation-bar > .item.button.disabled > .glyph): Ditto.
19117        * UserInterface/QuickConsole.js:
19118        (WebInspector.QuickConsole): Create navigation bar container and spacer.
19119
191202012-03-15  Joseph Pecoraro  <pecoraro@apple.com>
19121
19122        <rdar://problem/11049672> Delete key should delete selected breakpoint in sidebar
19123
19124        - Delete key removes the breakpoint.
19125        - Enter / Space toggles the breakpoint.
19126        - All Exceptions and Uncaught Exceptions breakpoints cannot be removed
19127          and will beep if the user attempts to delete them.
19128
19129        Reviewed by Timothy Hatcher.
19130
19131        * UserInterface/TreeOutline.js:
19132        (TreeOutline.prototype._treeKeyDown):
19133        Expose onspace like onenter and ondelete.
19134
19135        * UserInterface/BreakpointTreeElement.js:
19136        (WebInspector.BreakpointTreeElement.prototype.ondelete):
19137        (WebInspector.BreakpointTreeElement.prototype.onenter):
19138        (WebInspector.BreakpointTreeElement.prototype.onspace):
19139        Implement default TreeElement handlers for keys.
19140
19141        * UserInterface/DebuggerManager.js:
19142        (WebInspector.DebuggerManager.prototype.removeBreakpoint):
19143        (WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
19144        Ensure we never try to remove the custom breakpoints.
19145
19146        * UserInterface/TextResourceContentView.js:
19147        (WebInspector.TextResourceContentView):
19148        (WebInspector.TextResourceContentView.prototype._breakpointRemoved):
19149        When a breakpoint is removed update the ContentView and TextEditor.
19150
191512012-03-15  Joseph Pecoraro  <pecoraro@apple.com>
19152
19153        <rdar://problem/11050670> REGRESSION (New Web Inspector): Add Inspect Element button (magnifying glass button)
19154
19155        Only show the button when a FrameView (DOM Tree / Source Code) is available.
19156        When switching away from a FrameView make sure to disable node searching
19157        if it was active. Also since the nav bar may have changed size have the
19158        content browser update its navigation bar layout.
19159
19160        If this happens more in the future the buttons should be owned by the
19161        individual ContentViews instead of WebInspector.
19162
19163        Reviewed by Timothy Hatcher.
19164
19165        * UserInterface/Main.js:
19166        (WebInspector.contentLoaded):
19167        (WebInspector._currentContentViewDidChange):
19168
191692012-03-15  Joseph Pecoraro  <pecoraro@apple.com>
19170
19171        <rdar://problem/11050670> REGRESSION (New Web Inspector): Add Inspect Element button (magnifying glass button)
19172
19173        Add an on/off button for node searching.
19174
19175        Reviewed by Timothy Hatcher.
19176
19177        * UserInterface/ActivateButtonNavigationItem.js: Added.
19178        (WebInspector.ActivateButtonNavigationItem):
19179        (WebInspector.ActivateButtonNavigationItem.prototype.get activated):
19180        (WebInspector.ActivateButtonNavigationItem.prototype.set activated):
19181        (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
19182        ActivateButton uses the normal "Focus" style when "Activated". It
19183        then includes a darker version of "Focus" for "Activated:active".
19184
19185        * UserInterface/ButtonNavigationItem.js:
19186        (WebInspector.ButtonNavigationItem.prototype._generateImages):
19187        Allow for more flexible subclassing.
19188
19189        * UserInterface/ImageUtilities.js:
19190        (generateEmbossedImages._imageLoaded):
19191        (generateEmbossedImages._createEmbossedCanvasImage):
19192        Create a FocusDark style if requested.
19193
19194        * UserInterface/Images/Hand.pdf: Added.
19195        * UserInterface/Main.html:
19196        * UserInterface/Main.js:
19197        (WebInspector.contentLoaded):
19198        (WebInspector._domNodeWasInspected):
19199        (WebInspector._toggleNodeSearch.callback):
19200        (WebInspector._toggleNodeSearch):
19201        Add the button to the right.
19202
192032012-03-14  Timothy Hatcher  <timothy@apple.com>
19204
19205        Fix typo of the servicePendingContentRequests function was mentioned in review but I forgot to save the file.
19206
19207        * UserInterface/Resource.js:
19208        (WebInspector.Resource.prototype.markAsFailed): Fix typo of servicePendingContentRequests.
19209
192102012-03-14  Joseph Pecoraro  <pecoraro@apple.com>
19211
19212        <rdar://problem/10935394> REGRESSION (New Web Inspector): load and DOMContentLoaded event lines are not shown in the Timeline overview
19213        <rdar://problem/10935417> REGRESSION (New Web Inspector): developer generated timestamps are not shown in the Timeline overview
19214
19215        Add event marker decorations to the TimelineOverview.
19216
19217        Reviewed by Timothy Hatcher.
19218
19219        * UserInterface/TimelineDecorations.css:
19220        (.timeline-decorations > .event-markers > .event-marker.timestamp):
19221        Make markTimeline/timeStamp green instead of yellow. Easier to see.
19222
19223        * UserInterface/TimelineDecorations.js:
19224        (WebInspector.TimelineDecorations.prototype.clear):
19225        Clearing should also remove visible EventMarkers.
19226
19227        * UserInterface/TimelineOverview.css:
19228        (.timeline-overview .timeline-decorations > .event-markers):
19229        (.timeline-overview .timeline-decorations > .event-markers > .event-marker-tooltip):
19230
19231        * UserInterface/TimelinesContentView.js:
19232        (WebInspector.TimelinesContentView.prototype._recordedEventMarker):
19233        Pass event markers on to the TimelineOverview.
19234
19235        * UserInterface/TimelineOverview.js:
19236        (WebInspector.TimelineOverview.prototype.update):
19237        (WebInspector.TimelineOverview.prototype.addTimelineEventMarker):
19238        Have the decorator draw event markers.
19239
192402012-03-14  Timothy Hatcher  <timothy@apple.com>
19241
19242        Provide a way to request content from a Script.
19243
19244        Factor out the content requesting parts of Resource down into a SourceCode class that
19245        both Resource and Script now inherit from.
19246
19247        Part of: <rdar://problem/11047982> REGRESSION: Page source does not show when a breakpoint
19248        is hit while loading the page
19249
19250        Reviewed by Joseph Pecoraro.
19251
19252        * UserInterface/Main.html: Included SourceCode.js.
19253        * UserInterface/Resource.js:
19254        (WebInspector.Resource):
19255        (WebInspector.Resource.prototype.canRequestContentFromBackend): Added.
19256        (WebInspector.Resource.prototype.requestContentFromBackend): Added.
19257        (WebInspector.Resource.prototype.markAsFinished): Call requestContentFromBackendIfNeeded.
19258        (WebInspector.Resource.prototype.markAsFailed): Call servicePendingContentRequests with force.
19259        * UserInterface/Script.js:
19260        (WebInspector.Script):
19261        (WebInspector.Script.prototype.canRequestContentFromBackend): Added.
19262        (WebInspector.Script.prototype.requestContentFromBackend): Added.
19263        * UserInterface/SourceCode.js: Added.
19264        (WebInspector.SourceCode):
19265        (WebInspector.SourceCode.prototype.get content):
19266        (WebInspector.SourceCode.prototype.get contentIsBase64Encoded):
19267        (WebInspector.SourceCode.prototype.get contentURL):
19268        (WebInspector.SourceCode.prototype.requestContent):
19269        (WebInspector.SourceCode.prototype.canRequestContentFromBackend):
19270        (WebInspector.SourceCode.prototype.requestContentFromBackend):
19271        (WebInspector.SourceCode.prototype.requestContentFromBackendIfNeeded):
19272        (WebInspector.SourceCode.prototype.servicePendingContentRequests):
19273        (WebInspector.SourceCode.prototype._processContent):
19274
192752012-03-13  Joseph Pecoraro  <pecoraro@apple.com>
19276
19277        <rdar://problem/11044135> Quick Console should handle multiline input better
19278
19279        The QuickConsole consists of two pieces in a fixed height. The toolbar with
19280        JavaScript prompt, and the output content view container. The console itself
19281        grows to a maximum size (75% of the total window size or user specified by
19282        resizing). When handling multiline input the toolbar containing the prompt
19283        is allowed to grow, pushing up the content. When the maximum is reached the
19284        content will scroll under it, and likewise the multiline JavaScript prompt
19285        will eventually scroll under it.
19286
19287        Reviewed by Timothy Hatcher.
19288
19289        * UserInterface/JavaScriptLogViewController.js:
19290        (WebInspector.JavaScriptLogViewController):
19291        (WebInspector.JavaScriptLogViewController.prototype._promptKeyDown):
19292        (WebInspector.JavaScriptLogViewController.prototype._promptHistoryChange):
19293        (WebInspector.JavaScriptLogViewController.prototype._promptPasteboardEvent):
19294        (WebInspector.JavaScriptLogViewController.prototype._detectPromptHeightChanges.afterEvent):
19295        (WebInspector.JavaScriptLogViewController.prototype._detectPromptHeightChanges):
19296        * UserInterface/TextPrompt.js:
19297        (WebInspector.TextPrompt):
19298        (WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler):
19299        In order to detect with the input prompt changes height, we hook into
19300        a number of events. Keydown, cut/paste, and TextPrompt history changes.
19301
19302        * UserInterface/QuickConsole.css:
19303        (.quick-console):
19304        (.quick-console.collapsed):
19305        Let the console scroll when multiline input fills the entire console.
19306        To allow multiline input when collapsed remove !important from height.
19307
19308        * UserInterface/QuickConsole.js:
19309        (WebInspector.QuickConsole):
19310        (WebInspector.QuickConsole.prototype.set collapsed):
19311        (WebInspector.QuickConsole.prototype.get multiline):
19312        (WebInspector.QuickConsole.prototype.get collapsedHeight):
19313        Use constants where possible for height values.
19314
19315        (WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
19316        (WebInspector.QuickConsole.prototype.promptDidChangeHeight):
19317        Responds to actions that will most like require resizes.
19318
19319        (WebInspector.QuickConsole.prototype._updateToolbarSize):
19320        Update the toolbar size if the prompt size changed.
19321
19322        (WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider):
19323        Update the view container's size when single line or multiline.
19324
193252012-03-13  Joseph Pecoraro  <pecoraro@apple.com>
19326
19327        Tweak quick console focusing.
19328
19329        Reviewed by Timothy Hatcher.
19330
19331        * UserInterface/QuickConsole.js:
19332        (WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches):
19333        This didn't appear to work for all actions. Ignore the caret checking,
19334        and more proactively focus as long as there is no selection.
19335
193362012-03-13  Joseph Pecoraro  <pecoraro@apple.com>
19337
19338        Minor quick console mouse improvements.
19339
19340        Allow selection in the messages output.
19341
19342        Clicking in the messages output focuses the prompt if there is no
19343        selection. This matches LogContentView.
19344
19345        Reviewed by Timothy Hatcher.
19346
19347        * UserInterface/QuickConsole.css:
19348        (.quick-console > .view-container):
19349        * UserInterface/QuickConsole.js:
19350        (WebInspector.QuickConsole):
19351        (WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches):
19352
193532012-03-13  Joseph Pecoraro  <pecoraro@apple.com>
19354
19355        Event marker lines should not overlap the quick console.
19356
19357        Reviewed by Brian Weinstein.
19358
19359        * UserInterface/TimelineDecorations.css:
19360        (.timeline-decorations > .event-markers):
19361
193622012-03-13  Joseph Pecoraro  <pecoraro@apple.com>
19363
19364        Renamed isFocused() to a focused getter based on earlier review feedback.
19365
19366        Reviewed by Brian Weinstein.
19367
19368        * UserInterface/JavaScriptTextPrompt.js:
19369        (WebInspector.JavaScriptTextPrompt.prototype.get focused):
19370        * UserInterface/LogContentView.js:
19371        (WebInspector.LogContentView.prototype.consoleCleared):
19372        * UserInterface/Main.js:
19373        (WebInspector._keydown):
19374        * UserInterface/QuickConsole.js:
19375        (WebInspector.QuickConsole.prototype._activeLogCleared):
19376
193772012-03-13  Joseph Pecoraro  <pecoraro@apple.com>
19378
19379        Converge to a single RecordedEventMarker event based on earlier review feedback.
19380
19381        Reviewed by Timothy Hatcher.
19382
19383        * UserInterface/TimelineManager.js:
19384        (WebInspector.TimelineManager):
19385        (WebInspector.TimelineManager.prototype.startRecording):
19386        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
19387        (WebInspector.TimelineManager.prototype.eventRecorded):
19388        * UserInterface/TimelinesContentView.js:
19389        (WebInspector.TimelinesContentView):
19390
193912012-03-13  Timothy Hatcher  <timothy@apple.com>
19392
19393        Make profiles work again while retaining the correct insertion order in the Timeline DataGrids.
19394
19395        This reverts most of r41172 and fixes the single issue from the open source version of the code.
19396        When there isn't a previousGridNode that means we need to insert at the top of the DataGrid.
19397        But the open source code was missing the !previousGridNode check, causing elements to append
19398        at the end instead.
19399
19400        <rdar://problem/10960578> REGRESSION (r41172): DOM exceptions when showing profile data grid
19401
19402        Reviewed by Brian Weinstein.
19403
19404        * UserInterface/DataGrid.js:
19405        (WebInspector.DataGridNode.prototype._attach): Revert r41172 and add a check for !previousGridNode.
19406
194072012-03-13  Timothy Hatcher  <timothy@apple.com>
19408
19409        Don't follow links when they are being edited by the user.
19410
19411        Inspired by the fix for https://webkit.org/b/60814.
19412
19413        Reviewed by Joseph Pecoraro.
19414
19415        * UserInterface/DOMTreeContentView.js:
19416        (WebInspector.DOMTreeContentView.prototype._mouseWasClicked): Call isBeingEdited and return early if true.
19417        * UserInterface/EditingSupport.js:
19418        (WebInspector.isBeingEdited): Check ancestor elements too.
19419        * UserInterface/Main.js:
19420        (WebInspector.handlePossibleLinkClick): Call isBeingEdited and return early if true.
19421
194222012-03-13  Timothy Hatcher  <timothy@apple.com>
19423
19424        Remove duplicate code for the handling clicked links.
19425
19426        Reviewed by Joseph Pecoraro.
19427
19428        * UserInterface/CSSSelectorProfileView.js:
19429        (WebInspector.CSSSelectorProfileView): Removed click event listener.
19430        (WebInspector.CSSSelectorProfileView.prototype._mouseWasClicked): Removed.
19431        * UserInterface/DOMDetailsSidebarPanel.js:
19432        (WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked): Use handlePossibleLinkClick.
19433        * UserInterface/DOMTreeContentView.js:
19434        (WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink): Pass along the lineNumber.
19435        * UserInterface/JavaScriptProfileView.js:
19436        (WebInspector.JavaScriptProfileView): Removed click event listener.
19437        (WebInspector.JavaScriptProfileView.prototype._mouseWasClicked): Removed.
19438        * UserInterface/LogContentView.js:
19439        (WebInspector.LogContentView): Removed click event listener.
19440        (WebInspector.LogContentView.prototype._messagesClicked): Removed.
19441        * UserInterface/Main.js:
19442        (WebInspector.handlePossibleLinkClick): Added.
19443        (WebInspector._mouseWasClicked): Call handlePossibleLinkClick.
19444        * UserInterface/QuickConsole.js:
19445        (WebInspector.QuickConsole): Removed click event listener.
19446        (WebInspector.QuickConsole.prototype._messagesClicked): Removed.
19447        * UserInterface/ResourceContentView.js:
19448        (WebInspector.ResourceContentView.prototype._mouseWasClicked): Use handlePossibleLinkClick.
19449
194502012-03-13  Timothy Hatcher  <timothy@apple.com>
19451
19452        Properly bind and unbind every DOMNode to DOMTreeManager.
19453
19454        Merges the fix for https://webkit.org/b/78116 from open source (r107093).
19455
19456        Reviewed by Joseph Pecoraro.
19457
19458        * UserInterface/DOMNode.js:
19459        (WebInspector.DOMNode): Inserts the node into the DOMTreeManager map here. So all
19460        the callers don't need to do it.
19461        * UserInterface/DOMTreeManager.js:
19462        (WebInspector.DOMTreeManager.prototype._setDocument): Removed binding code.
19463        (WebInspector.DOMTreeManager.prototype._setDetachedRoot): Ditto.
19464        (WebInspector.DOMTreeManager.prototype._setChildNodes): Removed call to _bindNodes.
19465        (WebInspector.DOMTreeManager.prototype._bindNodes): Removed.
19466        (WebInspector.DOMTreeManager.prototype._childNodeRemoved): Call _unbind.
19467        (WebInspector.DOMTreeManager.prototype._unbind): Added. Recursively unbind.
19468
194692012-03-13  Timothy Hatcher  <timothy@apple.com>
19470
19471        Fix an issue where removing a TreeElement from a TreeOutline would cause the TreeOutline
19472        to forget all TreeElements that came after the TreeElement that was removed.
19473
19474        Reviewed by Brian Weinstein.
19475
19476        * UserInterface/TreeOutline.js:
19477        (TreeOutline.prototype._forgetChildrenRecursive): Pass parentElement instead of this to
19478        traverseNextTreeElement, forcing it to stop when it reaches the last descendant of parentElement.
19479
194802012-03-12  Timothy Hatcher  <timothy@apple.com>
19481
19482        Keep the QuickConsole scroll position pinned to the bottom when changing the height.
19483
19484        Reviewed by Joseph Pecoraro.
19485
19486        * UserInterface/QuickConsole.js:
19487        (WebInspector.QuickConsole.prototype.updateLayout): Scroll to the bottom if we were before the possible height change.
19488        (WebInspector.QuickConsole.prototype._isScrolledToBottom): Added.
19489        (WebInspector.QuickConsole.prototype._scrollToBottom): Added.
19490        (WebInspector.QuickConsole.prototype._resizerMouseDown): Remember if the view was scrolled to the bottom before resize.
19491        (WebInspector.QuickConsole.prototype._resizerMouseMoved): Scroll to the bottom if we were before resize.
19492        (WebInspector.QuickConsole.prototype._resizerMouseUp): Delete the flag.
19493        (WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches): Scroll the console element into view that
19494        was clicked or scroll to the bottom if we were before.
19495
194962012-03-12  Timothy Hatcher  <timothy@apple.com>
19497
19498        Allow the QuickConsole to shrink in height when it auto grew in height.
19499
19500        Reviewed by Joseph Pecoraro.
19501
19502        * UserInterface/QuickConsole.js:
19503        (WebInspector.QuickConsole.prototype.set collapsed): Reset _userPreferredMaximumHeightWasSetSinceLastToggle back to false.
19504        (WebInspector.QuickConsole.prototype.set userPreferredMaximumHeight): Set _userPreferredMaximumHeightWasSetSinceLastToggle to true.
19505        (WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider): Return early if _userPreferredMaximumHeightWasSetSinceLastToggle
19506        is set after calling _updateScrollDivider. Added an allowShrinking parameter.
19507        (WebInspector.QuickConsole.prototype._viewContainerClick): Update comment. And call _updateViewContainerSizeAndScrollDivider,
19508        passing true to allow shrinking.
19509
195102012-03-12  Timothy Hatcher  <timothy@apple.com>
19511
19512        Quick fixes to the QuickConsole styles.
19513
19514        Reviewed by Joseph Pecoraro.
19515
19516        * UserInterface/QuickConsole.css:
19517        (.quick-console): Set overflow to hidden so the toolbar box-shadow does not spill out the sides. Also
19518        removes a box-shadow that was not doing anything useful.
19519        (.quick-console > .view-container): Set overflow-x to hidden so the horizontal scrollbar never shows.
19520        (.quick-console > .toolbar): Set a transition on box-shadow so the shadow animates. Add a base box-shadow
19521        that has 0 for blur so it animates nicely.
19522        (.quick-console > .toolbar.scroll-divider): Tweak the shadow so it is rgba() and a larger blur.
19523
195242012-03-12  Joseph Pecoraro  <pecoraro@apple.com>
19525
19526        Disable the Toggle button when there is no Quick Console content.
19527
19528        Reviewed by Timothy Hatcher.
19529
19530        * UserInterface/Main.js:
19531        (WebInspector._keydown):
19532        * UserInterface/QuickConsole.css:
19533        (.quick-console > .toolbar > .navigation-bar > .item.button.disabled > .glyph):
19534        * UserInterface/QuickConsole.js:
19535        (WebInspector.QuickConsole):
19536        (WebInspector.QuickConsole.prototype.toggle):
19537        (WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
19538        (WebInspector.QuickConsole.prototype._toggleButtonClicked):
19539        (WebInspector.QuickConsole.prototype._resizerDoubleClicked):
19540        (WebInspector.QuickConsole.prototype._activeLogCleared):
19541
195422012-03-12  Joseph Pecoraro  <pecoraro@apple.com>
19543
19544        <rdar://problem/11034808> Esc should focus or toggle the QuickConsole
19545
19546        Esc will focus the quick console if nothing else is focused and accepting
19547        input. When focused, Esc will toggle the console's drawer.
19548
19549        Reviewed by Brian Weinstein.
19550
19551        * UserInterface/Main.js:
19552        (WebInspector._keydown):
19553        Handle the Esc key.
19554
19555        * UserInterface/QuickConsole.js:
19556        (WebInspector.QuickConsole.prototype._toggleButtonClicked):
19557        When the quick console is focused and a user clicks the toggle button,
19558        the quick console emits a "blur" event even though the caret is still
19559        inside it and commands can be run. This breaks the "isFocused()" state
19560        of the field and thus the Esc key toggling the field. So, lets just
19561        auto-focus the TextPrompt when the toggle button is clicked.
19562
195632012-03-12  Joseph Pecoraro  <pecoraro@apple.com>
19564
19565        <rdar://problem/11034699> Quick Console should respect clear keyboard shortcuts
19566
19567        React to the clear active log event but only on the currently active console.
19568
19569        Reviewed by Brian Weinstein.
19570
19571        * UserInterface/JavaScriptTextPrompt.js:
19572        (WebInspector.JavaScriptTextPrompt):
19573        (WebInspector.JavaScriptTextPrompt.prototype.isFocused):
19574        (WebInspector.JavaScriptTextPrompt.prototype._focusedPrompt):
19575        (WebInspector.JavaScriptTextPrompt.prototype._blurredPrompt):
19576        * UserInterface/LogContentView.js:
19577        (WebInspector.LogContentView.prototype.consoleCleared):
19578        * UserInterface/QuickConsole.js:
19579        (WebInspector.QuickConsole):
19580        (WebInspector.QuickConsole.prototype._activeLogCleared):
19581
195822012-03-12  Joseph Pecoraro  <pecoraro@apple.com>
19583
19584        Improve QuickConsole content sizing.
19585
19586        Make the quick console work like a calculator. The most recent
19587        result is closest to the console prompt. Older results scroll
19588        up off the top. Now when resizing, the user is setting their
19589        preferred maximum size of the drawer.
19590
19591        Reviewed by Timothy Hatcher.
19592
19593        * UserInterface/QuickConsole.js:
19594        (WebInspector.QuickConsole):
19595        (WebInspector.QuickConsole.prototype.set collapsed):
19596        (WebInspector.QuickConsole.prototype.get collapsedHeight):
19597        (WebInspector.QuickConsole.prototype.get minimumUncollapsedHeight):
19598        (WebInspector.QuickConsole.prototype.get maximumUncollapsedHeight):
19599        Give comments describing the boundary heights.
19600
19601        (WebInspector.QuickConsole.prototype.get userPreferredMaximumHeight):
19602        (WebInspector.QuickConsole.prototype.set userPreferredMaximumHeight):
19603        Add a convenient function for getting the user preferred sizes.
19604
19605        (WebInspector.QuickConsole.prototype.set height):
19606        (WebInspector.QuickConsole.prototype._expandViewContainerSize):
19607        (WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider):
19608        (WebInspector.QuickConsole.prototype._updateScrollDivider):
19609        When setting the height, we typically drop through to updating the
19610        container size to get the size to fit, and update the scroll divider
19611        if needed.
19612
19613        (WebInspector.QuickConsole.prototype._resizerMouseMoved):
19614        When the user resized, save the height into Settings.
19615
19616        (WebInspector.QuickConsole.prototype.updateLayout):
19617        (WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
19618        Times when we need to adjust sizes.
19619
19620        (WebInspector.QuickConsole.prototype._viewContainerScroll):
19621        Don't adjust the size, just show/hide the divider.
19622
19623        (WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches):
19624        (WebInspector.QuickConsole.prototype._viewContainerClick.afterClickHandling):
19625        (WebInspector.QuickConsole.prototype._viewContainerClick):
19626        Adjust the size, but only after any possible work.
19627
196282012-03-12  Timothy Hatcher  <timothy@apple.com>
19629
19630        Don't break into the debugger when evaluating an expression in the console that triggers an exception.
19631
19632        The exception will still be logged as the result in the console. We might tweak how this works later,
19633        but right now breaking into the debugger for this is annoying. This change matches open source.
19634
19635        Reviewed by Brian Weinstein.
19636
19637        * UserInterface/JavaScriptLogViewController.js:
19638        (WebInspector.JavaScriptLogViewController.prototype._appendCommand): Pass true for doNotPauseOnExceptions parameter.
19639
196402012-03-12  Timothy Hatcher  <timothy@apple.com>
19641
19642        Remove an overzealous assert in DebuggerManager.
19643
19644        The script identifier can be reused, so just make a new Script and insert it into the map again.
19645
19646        Reviewed by Brian Weinstein.
19647
19648        * UserInterface/DebuggerManager.js:
19649        (WebInspector.DebuggerManager.prototype.scriptDidParse): Removed console.assert.
19650
196512012-03-12  Timothy Hatcher  <timothy@apple.com>
19652
19653        Clean up the styles for the console and log views.
19654
19655        Reviewed by Brian Weinstein.
19656
19657        * UserInterface/JavaScriptTextPrompt.css:
19658        (.javascript-prompt): Adjust the padding and remove the margin.
19659        * UserInterface/JavaScriptTextPrompt.js:
19660        (WebInspector.JavaScriptTextPrompt): Set the text to "" so a "<br>" is inserted into the prompt. This lets the insertion
19661        caret to position correctly.
19662        * UserInterface/LogContentView.css:
19663        (.console-message, .console-user-command): Adjust the padding and remove the margin.
19664        (.console-message::before, .console-user-command::before, .javascript-prompt::before, .console-group-title::before):
19665        Don't use a negative margin, make it a positive one. The padding above makes room.
19666        (.console-group-messages .section .header::before): Bump up the disclosure triangle, it was 1px too low.
19667        (.console-group-messages .section .header .title): Reset the line-height to make the logged object not take up extra space.
19668        * UserInterface/QuickConsole.css:
19669        (.quick-console > .toolbar > .text-prompt > .javascript-prompt): Reduce top position to better center the prompt.
19670
196712012-03-12  Timothy Hatcher  <timothy@apple.com>
19672
19673        Fix an issue where the whole Web Inspector Ui would just 1px after typing in the quick console.
19674
19675        Reviewed by Joseph Pecoraro.
19676
19677        * UserInterface/QuickConsole.css:
19678        (.quick-console > .toolbar): Removed -webkit-box-sizing.
19679        (.quick-console > .toolbar > .navigation-bar): Set the height to 21px so it does not extend out of .toolbar.
19680
196812012-03-11  Joseph Pecoraro  <pecoraro@apple.com>
19682
19683        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
19684
19685        Give the QuickConsole a LogViewController. The JavaScriptTextPrompt will
19686        go in the toolbar, and the ViewContainer will hold the ConsoleGroup output.
19687
19688        Reviewed by Timothy Hatcher.
19689
19690        * UserInterface/QuickConsole.css:
19691        (.quick-console):
19692        (.quick-console > .toolbar > .text-prompt):
19693        (.quick-console > .toolbar > .text-prompt > .javascript-prompt):
19694        * UserInterface/QuickConsole.js:
19695        (WebInspector.QuickConsole):
19696        (WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
19697        (WebInspector.QuickConsole.prototype._mouseWasClicked):
19698
196992012-03-11  Joseph Pecoraro  <pecoraro@apple.com>
19700
19701        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
19702
19703        Add a scroll divider box shadow when the Quick Console's view
19704        contains scrollable content.
19705
19706        Reviewed by Timothy Hatcher.
19707
19708        * UserInterface/QuickConsole.css:
19709        (.quick-console > .view-container):
19710        (.quick-console > .toolbar.scroll-divider):
19711        * UserInterface/QuickConsole.js:
19712        (WebInspector.QuickConsole):
19713        (WebInspector.QuickConsole.prototype.set collapsed):
19714        (WebInspector.QuickConsole.prototype.set height):
19715        (WebInspector.QuickConsole.prototype._resizerMouseUp):
19716        (WebInspector.QuickConsole.prototype._updateScrollDivider):
19717
197182012-03-11  Joseph Pecoraro  <pecoraro@apple.com>
19719
19720        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
19721
19722        Add JavaScriptLogViewController class. This holds a JavaScriptTextPrompt
19723        for input and a ConsoleGroup to put the output of JavaScript commands.
19724        The idea being that you could swap out either the input source or output
19725        destination. Currently this class just knows how to deal with JavaScript.
19726
19727        This moves out most of the remaining JavaScript knowledge from
19728        LogContentView and puts it into this new controller. There is just one
19729        delegate message back.
19730
19731        Reviewed by Timothy Hatcher.
19732
19733        * UserInterface/JavaScriptLogViewController.js: Added.
19734        (WebInspector.JavaScriptLogViewController):
19735        (WebInspector.JavaScriptLogViewController.prototype.constructor.WebInspector.JavaScriptLogViewController.get prompt):
19736        (WebInspector.JavaScriptLogViewController.prototype.get topConsoleGroup):
19737        (WebInspector.JavaScriptLogViewController.prototype.get currentConsoleGroup):
19738        (WebInspector.JavaScriptLogViewController.prototype.clear):
19739        (WebInspector.JavaScriptLogViewController.prototype.appendConsoleMessage):
19740        (WebInspector.JavaScriptLogViewController.prototype._requestClearMessages):
19741        (WebInspector.JavaScriptLogViewController.prototype._promptKeyDown):
19742        (WebInspector.JavaScriptLogViewController.prototype._enterKeyPressed):
19743        (WebInspector.JavaScriptLogViewController.prototype._appendCommand.printResult):
19744        (WebInspector.JavaScriptLogViewController.prototype._appendCommand):
19745        (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
19746        * UserInterface/LogContentView.js:
19747        (WebInspector.LogContentView):
19748        (WebInspector.LogContentView.prototype.constructor.WebInspector.LogContentView.messageAdded):
19749        (WebInspector.LogContentView.prototype.consoleCleared):
19750        (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
19751        (WebInspector.LogContentView.prototype._messagesClicked):
19752        * UserInterface/Main.html:
19753
197542012-03-11  Joseph Pecoraro  <pecoraro@apple.com>
19755
19756        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
19757
19758        Remove unused OpenSource code from LogContentView.
19759        Also simplify keyboard shortcut registrations.
19760
19761        Reviewed by Timothy Hatcher.
19762
19763        * UserInterface/ConsoleCommandResult.js:
19764        (WebInspector.ConsoleCommandResult):
19765        * UserInterface/LogContentView.js:
19766        (WebInspector.LogContentView):
19767        (WebInspector.LogContentView.prototype._appendCommand.printResult):
19768        (WebInspector.LogContentView.prototype._appendCommand):
19769
197702012-03-11  Joseph Pecoraro  <pecoraro@apple.com>
19771
19772        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
19773
19774        Add OpenSource's ConsoleView copyright headers to JSTextPrompt, ConsoleGroup, and Command files.
19775        Add OpenSource's ConsoleMessage* copyright headers to ConsoleMessage* files.
19776
19777        Reviewed by Timothy Hatcher.
19778
19779        * UserInterface/ConsoleCommand.js:
19780        * UserInterface/ConsoleCommandResult.js:
19781        * UserInterface/ConsoleGroup.js:
19782        * UserInterface/ConsoleMessage.js:
19783        * UserInterface/ConsoleMessageImpl.js:
19784        * UserInterface/JavaScriptTextPrompt.js:
19785
197862012-03-11  Joseph Pecoraro  <pecoraro@apple.com>
19787
19788        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
19789
19790        Split ConsoleGroup, ConsoleCommand, and ConsoleCommandResult into
19791        separate files and do a tiny bit of cleanup to match the Safari
19792        frontend style.
19793
19794        Reviewed by Timothy Hatcher.
19795
19796        * UserInterface/ConsoleCommand.js: Added.
19797        (WebInspector.ConsoleCommand):
19798        (WebInspector.ConsoleCommand.prototype.constructor.WebInspector.ConsoleCommand.clearHighlight):
19799        (WebInspector.ConsoleCommand.prototype.highlightSearchResults):
19800        (WebInspector.ConsoleCommand.prototype.matchesRegex):
19801        (WebInspector.ConsoleCommand.prototype.toMessageElement):
19802        (WebInspector.ConsoleCommand.prototype._formatCommand):
19803        * UserInterface/ConsoleCommandResult.js: Added.
19804        (WebInspector.ConsoleCommandResult):
19805        (WebInspector.ConsoleCommandResult.prototype.constructor.WebInspector.ConsoleCommandResult.toMessageElement):
19806        * UserInterface/ConsoleGroup.js: Added.
19807        (WebInspector.ConsoleGroup):
19808        (WebInspector.ConsoleGroup.prototype.constructor.WebInspector.ConsoleGroup.addMessage):
19809        (WebInspector.ConsoleGroup.prototype._titleClicked):
19810        * UserInterface/ConsoleMessage.js:
19811        (WebInspector.ConsoleMessage.create):
19812        * UserInterface/LogContentView.js:
19813        * UserInterface/Main.html:
19814
198152012-03-11  Joseph Pecoraro  <pecoraro@apple.com>
19816
19817        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
19818
19819        Extract the JavaScript TextPrompt details into a new class,
19820        JavaScriptTextPrompt, which is a TextPrompt with JavaScript
19821        completion logic.
19822
19823        Reviewed by Timothy Hatcher.
19824
19825        * UserInterface/JavaScriptTextPrompt.js: Added.
19826        (WebInspector.JavaScriptTextPrompt):
19827        (WebInspector.JavaScriptTextPrompt.prototype.constructor.WebInspector.JavaScriptTextPrompt.get promptElement):
19828        (WebInspector.JavaScriptTextPrompt.prototype.completions):
19829        (WebInspector.JavaScriptTextPrompt.prototype._completions.evaluated.getCompletions):
19830        (WebInspector.JavaScriptTextPrompt.prototype._completions.evaluated):
19831        (WebInspector.JavaScriptTextPrompt.prototype._completions.receivedPropertyNamesFromEval):
19832        (WebInspector.JavaScriptTextPrompt.prototype._completions.receivedPropertyNames):
19833        (WebInspector.JavaScriptTextPrompt.prototype._completions):
19834        (WebInspector.JavaScriptTextPrompt.prototype._reportCompletions):
19835        * UserInterface/LogContentView.js:
19836        (WebInspector.LogContentView):
19837        (WebInspector.LogContentView.prototype.disable):
19838        (WebInspector.LogContentView.prototype.shown):
19839        (WebInspector.LogContentView.prototype._scheduleScrollIntoView.scrollIntoView):
19840        (WebInspector.LogContentView.prototype._scheduleScrollIntoView):
19841        (WebInspector.LogContentView.prototype._immediatelyScrollIntoView):
19842        * UserInterface/Main.html:
19843
198442012-03-10  Joseph Pecoraro  <pecoraro@apple.com>
19845
19846        <rdar://problem/11025039> Console error when right clicking in Console: missing WebInspector.populateHrefContextMenu
19847
19848        Remove unnecessary or unsupported Console contextmenu options that
19849        came from OpenSource.
19850
19851        Reviewed by Timothy Hatcher.
19852
19853        * UserInterface/LogContentView.js:
19854        (WebInspector.LogContentView.prototype._handleContextMenuEvent):
19855        * Localizations/en.lproj/localizedStrings.js:
19856
198572012-03-11  Timothy Hatcher  <timothy@apple.com>
19858
19859        Don't highlight non-enumerable properties at the top level for Local, Closure, and Catch scopes.
19860
19861        Those scopes are synthesized scope objects, unlike Global and With scopes.
19862
19863        Part of: <rdar://problem/10318770>
19864
19865        Reviewed by Brian Weinstein.
19866
19867        * UserInterface/ObjectPropertiesSection.js:
19868        (WebInspector.ObjectPropertyTreeElement.prototype.update): Check for dontHighlightNonEnumerablePropertiesAtTopLevel.
19869        * UserInterface/ScopeChainDetailsSidebarPanel.js:
19870        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Set dontHighlightNonEnumerablePropertiesAtTopLevel
19871        for the Local, Closure, and Catch scopes.
19872
198732012-03-11  Timothy Hatcher  <timothy@apple.com>
19874
19875        Select and show the Scope Chain details sidebar panel when paused.
19876
19877        Part of: <rdar://problem/10318770>
19878
19879        Reviewed by Brian Weinstein.
19880
19881        * UserInterface/Main.js:
19882        (WebInspector._debuggerDidPause): Set a flag to show it when available.
19883        (WebInspector._contentBrowserRepresentedObjectsDidChange): Check for the flag and show the panel.
19884
198852012-03-11  Timothy Hatcher  <timothy@apple.com>
19886
19887        Populate the Scope Chain details sidebar panel.
19888
19889        Part of: <rdar://problem/10318770>
19890
19891        Reviewed by Brian Weinstein.
19892
19893        * Localizations/en.lproj/localizedStrings.js: Updated.
19894        * UserInterface/Main.html: Included ScopeVariableTreeElement.js.
19895        * UserInterface/ScopeChainDetailsSidebarPanel.js:
19896        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Build ObjectPropertiesSections and DetailsSections
19897        for each ScopeChainNode in the scope chain.
19898        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.delayedWork): Added. Append the DetailsSections.
19899        * UserInterface/ScopeVariableTreeElement.js: Copied from OpenSource/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js.
19900        Some code style clean up and modifications to how _expandedProperties and the _propertyIdentifier prefix are accessed.
19901
199022012-03-11  Timothy Hatcher  <timothy@apple.com>
19903
19904        Clean up the styles for properties sections and support creation without the header element.
19905
19906        This is needed for the Scope Chain sidebar panel.
19907
19908        Reviewed by Brian Weinstein.
19909
19910        * UserInterface/CSSStyleDetailsSidebarPanel.css:
19911        (.sidebar > .panel.details.css-style .styles-section): Removed padding and background properties.
19912        (.sidebar > .panel.details.css-style .styles-section .header): Removed background properties.
19913        (.sidebar > .panel.details.css-style .styles-section.no-header .properties): Added. Reset padding.
19914        * UserInterface/ComputedStylePropertiesSection.js:
19915        (WebInspector.ComputedStylePropertiesSection): Call the PropertiesSection constructor after
19916        some initial setup since Section will now call expand() when there is no header.
19917        * UserInterface/DOMTreeOutline.js:
19918        (WebInspector.DOMTreeOutline): Use the syntax-highlighted class name constant.
19919        * UserInterface/DetailsSection.css:
19920        (.details-section > .content > .group > .row.properties): Added. Specify padding.
19921        * UserInterface/DetailsSectionPropertiesRow.js:
19922        (WebInspector.DetailsSectionPropertiesRow): Add the syntax-highlighted class name.
19923        * UserInterface/PropertiesSection.js:
19924        (WebInspector.PropertiesSection): Call the Section constructor after some initial setup since
19925        Section will now call expand() when there is no header.
19926        * UserInterface/Section.css:
19927        (.section.expanded.no-header .properties): Added. Reset padding-left.
19928        * UserInterface/Section.js:
19929        (WebInspector.Section): Don't create the header element if there if title and subtitle are not
19930        strings or Nodes.
19931        * UserInterface/StylePropertiesSection.js:
19932        (WebInspector.StylePropertiesSection): Removed syntax-highlighted class name since it is added
19933        by DetailsSectionPropertiesRow now.
19934        * UserInterface/SyntaxHighlightingDefaultTheme.css: Removed background-color so this does not cause
19935        sidebar to be white.
19936        * UserInterface/SyntaxHighlightingSupport.js: Added syntax-highlighted class name constant.
19937        * UserInterface/TextEditor.js:
19938        (WebInspector.TextEditor): Use constant from SyntaxHighlightingSupport.js.
19939
199402012-03-10  Timothy Hatcher  <timothy@apple.com>
19941
19942        Add the start of the Scope Chain details sidebar panel which will show all the variables
19943        available when paused in the debugger.
19944
19945        Part of: <rdar://problem/10318770>
19946
19947        Reviewed by Joseph Pecoraro.
19948
19949        * Localizations/en.lproj/localizedStrings.js: Updated.
19950        * UserInterface/Images/NavigationItemVariable.pdf: Added.
19951        * UserInterface/Main.html: Included ScopeChainDetailsSidebarPanel.js.
19952        * UserInterface/Main.js:
19953        (WebInspector.contentLoaded): Create a ScopeChainDetailsSidebarPanel and include it.
19954        * UserInterface/ScopeChainDetailsSidebarPanel.js: Added.
19955        (WebInspector.ScopeChainDetailsSidebarPanel):
19956        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.inspect): Look for CallFrame objects.
19957        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.get callFrame):
19958        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.set callFrame):
19959        (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Needs implemented.
19960        * UserInterface/TextResourceContentView.js:
19961        (WebInspector.TextResourceContentView.prototype.get supplementalRepresentedObjects): Include _callFrame.
19962        (WebInspector.TextResourceContentView.prototype._updateExecutionLineNumber): Store the activeCallFrame when
19963        it applies to this resource to we can return it in supplementalRepresentedObjects.
19964
199652012-03-10  Timothy Hatcher  <timothy@apple.com>
19966
19967        Add support to ContentView for supplemental represented objects.
19968
19969        Supplemental represented objects can be used to provide more matching choices to the details
19970        sidebar panels for things that are are not represented as path components in the navigation bar.
19971        This support will be used to supply the call frame that is active in a TextResourceContentView,
19972        for the purposes of showing a details sidebar panel with scope chain information.
19973
19974        Reviewed by Joseph Pecoraro.
19975
19976        * UserInterface/ClusterContentView.js:
19977        (WebInspector.ClusterContentView): Listen for the SupplementalRepresentedObjectsDidChange event.
19978        (WebInspector.ClusterContentView.prototype.get supplementalRepresentedObjects): Added. Pass through
19979        the current content view's supplementalRepresentedObjects.
19980        (WebInspector.ClusterContentView.prototype._contentViewSupplementalRepresentedObjectsDidChange): Added.
19981        Fire the SupplementalRepresentedObjectsDidChange on behalf of the current content view.
19982        * UserInterface/ContentBrowser.js:
19983        (WebInspector.ContentBrowser): Listen for the SupplementalRepresentedObjectsDidChange event.
19984        (WebInspector.ContentBrowser.prototype.get currentRepresentedObjects): Include the current content view's
19985        supplementalRepresentedObjects if they are not null and not empty.
19986        (WebInspector.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange): Added.
19987        Dispatch the CurrentRepresentedObjectsDidChange event soon.
19988        * UserInterface/ContentView.js:
19989        (WebInspector.ContentView.prototype.get supplementalRepresentedObjects): Added stub.
19990
199912012-03-10  Timothy Hatcher  <timothy@apple.com>
19992
19993        Include scope variables when doing autocompletion in the console.
19994
19995        Part of: <rdar://problem/10318770>
19996
19997        Reviewed by Joseph Pecoraro.
19998
19999        * UserInterface/CallFrame.js:
20000        (WebInspector.CallFrame.prototype.collectScopeChainVariableNames): Added. Walk the scope chain and
20001        request all the properties for each scope node object.
20002        (WebInspector.CallFrame.prototype.collectScopeChainVariableNames.propertiesCollected): Added. Add the property
20003        names to the result and call the callback when pendingRequests is 0.
20004        * UserInterface/LogContentView.js:
20005        (WebInspector.LogContentView.prototype._completions): Use CallFrame.collectScopeChainVariableNames.
20006
200072012-03-10  Timothy Hatcher  <timothy@apple.com>
20008
20009        Support evaluating against the local scope when paused in the debugger.
20010
20011        Part of: <rdar://problem/10318770>
20012
20013        Reviewed by Brian Weinstein.
20014
20015        * UserInterface/LogContentView.js:
20016        (WebInspector.LogContentView.prototype.evalInInspectedWindow): Use DebuggerAgent.evaluateOnCallFrame
20017        when there is an active call frame.
20018
200192012-03-10  Timothy Hatcher  <timothy@apple.com>
20020
20021        Move the flashing prevention code from DebugSidebarPanel to DebuggerManager.
20022
20023        Part of: <rdar://problem/10318770>
20024
20025        Reviewed by Brian Weinstein.
20026
20027        * UserInterface/DebugSidebarPanel.js:
20028        (WebInspector.DebugSidebarPanel): Listen for the new CallFramesDidChange event instead of
20029        the Paused and Resumed events.
20030        (WebInspector.DebugSidebarPanel.prototype._showNotPausedEmptyContentPlaceholder): Added.
20031        (WebInspector.DebugSidebarPanel.prototype._updateEmptyContentPlaceholder): Updated the message.
20032        (WebInspector.DebugSidebarPanel.prototype._debuggerCallFramesDidChange): Check for null callFrames
20033        and call _showNotPausedEmptyContentPlaceholder.
20034        * UserInterface/DebuggerManager.js:
20035        (WebInspector.DebuggerManager.prototype.debuggerDidPause): Remove assert, since we might be paused still.
20036        Clear the delayed resume timeout.
20037        (WebInspector.DebuggerManager.prototype.debuggerDidResume): Delay clearing the state and firing events.
20038
200392012-03-10  Timothy Hatcher  <timothy@apple.com>
20040
20041        Add debugger controls for pause, resume, step over, step in, and step out.
20042
20043        Part of: <rdar://problem/10318770>
20044
20045        Reviewed by Joseph Pecoraro.
20046
20047        * Localizations/en.lproj/localizedStrings.js:
20048        * UserInterface/Images/Pause.pdf: Added.
20049        * UserInterface/Images/Resume.pdf: Added.
20050        * UserInterface/Images/StepInto.pdf: Added.
20051        * UserInterface/Images/StepOut.pdf: Added.
20052        * UserInterface/Images/StepOver.pdf: Added.
20053        * UserInterface/QuickConsole.js:
20054        (WebInspector.QuickConsole): Create the button items.
20055        (WebInspector.QuickConsole.prototype._debuggerPauseResumeButtonClicked): Added.
20056        (WebInspector.QuickConsole.prototype._debuggerStepOverButtonClicked): Added.
20057        (WebInspector.QuickConsole.prototype._debuggerStepIntoButtonClicked): Added.
20058        (WebInspector.QuickConsole.prototype._debuggerStepOutButtonClicked): Added.
20059        (WebInspector.QuickConsole.prototype._debuggerDidPause): Added.
20060        (WebInspector.QuickConsole.prototype._debuggerDidResume): Added.
20061
200622012-03-10  Timothy Hatcher  <timothy@apple.com>
20063
20064        Use ToggleButtonNavigationItem for the quick console toggle button.
20065
20066        Also start using the right artwork for the glyph.
20067
20068        Part of: <rdar://problem/10319586>
20069
20070        Reviewed by Joseph Pecoraro.
20071
20072        * UserInterface/Images/ToggleArrowDown.pdf: Added.
20073        * UserInterface/Images/ToggleArrowUp.pdf: Added.
20074        * UserInterface/QuickConsole.css: Removed styles to flip the arrow when collapsed.
20075        * UserInterface/QuickConsole.js:
20076        (WebInspector.QuickConsole): Use ToggleButtonNavigationItem. Add a divider to the left of the button.
20077        (WebInspector.QuickConsole.prototype.set collapsed): Change the image for the toggle button.
20078
200792012-03-10  Timothy Hatcher  <timothy@apple.com>
20080
20081        Remove QuickConsoleButtonNavigationItem and merge its functionality down into ButtonNavigationItem.
20082
20083        Having a special subclass prevent us from using ToggleButtonNavigationItem without adding another
20084        special QuickConsoleToggleButtonNavigationItem subclass.
20085
20086        Part of: <rdar://problem/10319586>
20087
20088        Reviewed by Joseph Pecoraro.
20089
20090        * UserInterface/ButtonNavigationItem.css:
20091        (.navigation-bar > .item.suppress-emboss > .glyph):
20092        (.navigation-bar > .item.suppress-emboss:active > .glyph):
20093        (.navigation-bar > .item.button.disabled > .glyph):
20094        * UserInterface/ButtonNavigationItem.js:
20095        (WebInspector.ButtonNavigationItem): Call _updateImage and the suppress-emboss style class if needed.
20096        (WebInspector.ButtonNavigationItem.prototype.set image): Call _updateImage.
20097        (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Generate a background-size for _suppressEmboss.
20098        (WebInspector.ButtonNavigationItem.prototype._canvasIdentifier): Added assert.
20099        (WebInspector.ButtonNavigationItem.prototype._updateImage): Added.
20100        (WebInspector.ButtonNavigationItem.prototype._generateImages): Added assert.
20101        * UserInterface/Main.html: Removed QuickConsoleButtonNavigationItem.{css,js}.
20102        * UserInterface/QuickConsole.js:
20103        (WebInspector.QuickConsole): Use ButtonNavigationItem.
20104        * UserInterface/QuickConsoleButtonNavigationItem.css: Removed.
20105        * UserInterface/QuickConsoleButtonNavigationItem.js: Removed.
20106
201072012-03-10  Timothy Hatcher  <timothy@apple.com>
20108
20109        Make line numbers in the Breakpoint sidebar be 1-based. Also fixes a couple asserts that the
20110        breakpoint lineNumber is 0-based.
20111
20112        Reviewed by Dan Bernstein.
20113
20114        * UserInterface/Breakpoint.js:
20115        (WebInspector.Breakpoint): Fix assert.
20116        (WebInspector.Breakpoint.prototype.set lineNumber): Ditto.
20117        * UserInterface/BreakpointTreeElement.js:
20118        (WebInspector.BreakpointTreeElement.prototype._updateMainTitle): Add 1 to the user visible number.
20119
201202012-03-10  Timothy Hatcher  <timothy@apple.com>
20121
20122        Select the Debug sidebar panel and show the navigation sidebar when the debugger pauses.
20123
20124        Part of: <rdar://problem/10318770>
20125
20126        Reviewed by Dan Bernstein.
20127
20128        * UserInterface/Main.js:
20129        (WebInspector.contentLoaded): Added Paused event listener.
20130        (WebInspector._debuggerDidPause): Added.
20131
201322012-03-10  Timothy Hatcher  <timothy@apple.com>
20133
20134        Highlight the current execution line.
20135
20136        Part of: <rdar://problem/10318770>
20137
20138        Reviewed by Joseph Pecoraro.
20139
20140        * UserInterface/DebugSidebarPanel.js:
20141        (WebInspector.DebugSidebarPanel.prototype._debuggerDidPause): Select the active call frame tree element.
20142        (WebInspector.DebugSidebarPanel.prototype._treeElementSelected): Set the active call frame.
20143        * UserInterface/DebuggerManager.js:
20144        (WebInspector.DebuggerManager.prototype.get activeCallFrame): Added.
20145        (WebInspector.DebuggerManager.prototype.set activeCallFrame): Added. Fire ActiveCallFrameDidChange
20146        (WebInspector.DebuggerManager.prototype.debuggerDidPause): Set _activeCallFrame and fire ActiveCallFrameDidChange.
20147        (WebInspector.DebuggerManager.prototype.debuggerDidResume): Ditto.
20148        * UserInterface/Images/InstructionPointer.png: Added.
20149        * UserInterface/Images/InstructionPointer@2x.png: Added.
20150        * UserInterface/TextEditor.css:
20151        (.text-editor > .gutter > .line-number.execution-line::after):
20152        (.text-editor .text-editor-text-chunk.execution-line):
20153        * UserInterface/TextEditor.js:
20154        (WebInspector.TextEditor): Initialize _executionLineNumber to NaN.
20155        (WebInspector.TextEditor.prototype.get executionLineNumber): Added.
20156        (WebInspector.TextEditor.prototype.set executionLineNumber): Added. Call _updateExecutionLineNumber.
20157        (WebInspector.TextEditor.prototype.singleLineElementForLine): Handle a null result from _textChunkForLine.
20158        (WebInspector.TextEditor.prototype._updateExecutionLineNumber): Added. Removes from the old line and adds to the new.
20159        (WebInspector.TextEditor.prototype._updateLineNumbers): Make lineNumber 0-based instead of 1-based.
20160        (WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo): Add 1 for user visible line numbers.
20161        (WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement): Ditto.
20162        (WebInspector.TextEditor.prototype._textChunkForLine): Handle negative numbers and NaN.
20163        (WebInspector.TextEditor.prototype._breakTextChunkAtIndexIntoSingleLineTextChunks): Assert the textChunk isn't null.
20164        * UserInterface/TextResourceContentView.js:
20165        (WebInspector.TextResourceContentView):
20166        (WebInspector.TextResourceContentView.prototype.contentAvailable):
20167        (WebInspector.TextResourceContentView.prototype._updateExecutionLineNumber):
20168
201692012-03-09  Timothy Hatcher  <timothy@apple.com>
20170
20171        Populate the Debug sidebar with call frames when the debugger pauses.
20172
20173        Part of: <rdar://problem/10318770>
20174
20175        Reviewed by Joseph Pecoraro.
20176
20177        * Localizations/en.lproj/localizedStrings.js: Updated.
20178        * UserInterface/CallFrameIcons.css: Added.
20179        (.function-icon .icon):
20180        (.event-listener-icon .icon):
20181        * UserInterface/CallFrameTreeElement.js: Added.
20182        (WebInspector.CallFrameTreeElement):
20183        (WebInspector.CallFrameTreeElement.prototype.get callFrame):
20184        * UserInterface/DebugSidebarPanel.js:
20185        (WebInspector.DebugSidebarPanel):
20186        (WebInspector.DebugSidebarPanel.prototype._updateEmptyContentPlaceholder): Added.
20187        (WebInspector.DebugSidebarPanel.prototype._debuggerDidPause): Added. Create CallFrameTreeElements.
20188        (WebInspector.DebugSidebarPanel.prototype._debuggerDidResume): Added. Set a timeout for delayedWork.
20189        (WebInspector.DebugSidebarPanel.prototype._debuggerDidResume.delayedWork): Added. Remove the tree elements.
20190        (WebInspector.DebugSidebarPanel.prototype._treeElementSelected): Added. Show the resource source code.
20191        * UserInterface/Images/EventListener.pdf: Added.
20192        * UserInterface/Images/Function.pdf: Added.
20193        * UserInterface/Main.html: Included CallFrameIcons.css and CallFrameTreeElement.js.
20194
201952012-03-09  Timothy Hatcher  <timothy@apple.com>
20196
20197        Process the call frames when the debugger pauses and create easy to use objects.
20198
20199        Part of: <rdar://problem/10318770>
20200
20201        Reviewed by Brian Weinstein.
20202
20203        * UserInterface/CallFrame.js: Added.
20204        (WebInspector.CallFrame):
20205        (WebInspector.CallFrame.prototype.get id):
20206        (WebInspector.CallFrame.prototype.get scriptLocation):
20207        (WebInspector.CallFrame.prototype.get functionName):
20208        (WebInspector.CallFrame.prototype.get thisObject):
20209        (WebInspector.CallFrame.prototype.get scopeChain):
20210        * UserInterface/DebuggerManager.js:
20211        (WebInspector.DebuggerManager.prototype.get callFrames): Added.
20212        (WebInspector.DebuggerManager.prototype.debuggerDidPause): Process the callFramesPayload.
20213        (WebInspector.DebuggerManager.prototype.debuggerDidResume): Clear the _callFrames.
20214        (WebInspector.DebuggerManager.prototype._scriptLocationFromPayload): Added. Helper.
20215        (WebInspector.DebuggerManager.prototype._scopeChainFromPayload): Added. Helper.
20216        (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): Added. Helper.
20217        * UserInterface/Main.html: Included CallFrame.js, ScopeChainNode.js, and ScriptLocation.js.
20218        * UserInterface/ScopeChainNode.js: Added.
20219        (WebInspector.ScopeChainNode):
20220        (WebInspector.ScopeChainNode.prototype.get type):
20221        (WebInspector.ScopeChainNode.prototype.get object):
20222        * UserInterface/ScriptLocation.js: Added.
20223        (WebInspector.ScriptLocation):
20224        (WebInspector.ScriptLocation.prototype.get script):
20225        (WebInspector.ScriptLocation.prototype.get lineNumber):
20226        (WebInspector.ScriptLocation.prototype.get columnNumber):
20227
202282012-03-09  Timothy Hatcher  <timothy@apple.com>
20229
20230        Track the paused state of the debugger and add functions to pause, resume, and step.
20231
20232        Part of: <rdar://problem/10318770>
20233
20234        Reviewed by Brian Weinstein.
20235
20236        * UserInterface/DebuggerManager.js:
20237        (WebInspector.DebuggerManager.prototype.get paused): Added.
20238        (WebInspector.DebuggerManager.prototype.pause): Added.
20239        (WebInspector.DebuggerManager.prototype.resume): Added.
20240        (WebInspector.DebuggerManager.prototype.stepOver): Added.
20241        (WebInspector.DebuggerManager.prototype.stepInto): Added.
20242        (WebInspector.DebuggerManager.prototype.reset): Reset _paused and fire the Resumed event.
20243        (WebInspector.DebuggerManager.prototype.debuggerDidPause): Set _paused and fire the Paused event.
20244        (WebInspector.DebuggerManager.prototype.debuggerDidResume): Set _paused and fire the Resumed event.
20245        * UserInterface/DebuggerObserver.js:
20246        (WebInspector.DebuggerObserver.prototype.paused): Call DebuggerManager.debuggerDidPause.
20247        (WebInspector.DebuggerObserver.prototype.resumed): Call DebuggerManager.debuggerDidResume.
20248
202492012-03-09  Timothy Hatcher  <timothy@apple.com>
20250
20251        Add WebInspector.Script and create them when scripts are parsed.
20252
20253        Part of: <rdar://problem/10318770>
20254
20255        Reviewed by Brian Weinstein.
20256
20257        * UserInterface/DebuggerManager.js:
20258        (WebInspector.DebuggerManager):
20259        (WebInspector.DebuggerManager.prototype.reset): Clear the script map.
20260        (WebInspector.DebuggerManager.prototype.scriptDidParse): Added. Create a Script instance
20261        and add it to the id map.
20262        * UserInterface/DebuggerObserver.js:
20263        (WebInspector.DebuggerObserver.prototype.scriptParsed): Call DebuggerManager.scriptDidParse.
20264        * UserInterface/Main.html: Included Script.js.
20265        * UserInterface/Script.js: Added.
20266        (WebInspector.Script):
20267        (WebInspector.Script.prototype.get id):
20268        (WebInspector.Script.prototype.get range):
20269        (WebInspector.Script.prototype.get url):
20270        (WebInspector.Script.prototype.get urlComponents):
20271
202722012-03-09  Timothy Hatcher  <timothy@apple.com>
20273
20274        Add a way to break on all exceptions and uncaught exceptions.
20275
20276        Part of: <rdar://problem/10318770&10318777>
20277
20278        Reviewed by Brian Weinstein and Joseph Pecoraro.
20279
20280        * Localizations/en.lproj/localizedStrings.js: Updated.
20281        * UserInterface/BreakpointIcons.css:
20282        (.breakpoint-exception-icon .icon): Added.
20283        * UserInterface/BreakpointSidebarPanel.js:
20284        (WebInspector.BreakpointSidebarPanel): Create BreakpointTreeElements for the two exception breakpoints.
20285        * UserInterface/BreakpointTreeElement.js:
20286        (WebInspector.BreakpointTreeElement): Add support for a custom style class and title.
20287        * UserInterface/DebuggerManager.js:
20288        (WebInspector.DebuggerManager): Create an all exceptions and and all uncaught exceptions breakpoint.
20289        (WebInspector.DebuggerManager.prototype.get allExceptionsBreakpoint): Added.
20290        (WebInspector.DebuggerManager.prototype.get allUncaughtExceptionsBreakpoint): Added.
20291        (WebInspector.DebuggerManager.prototype.breakpointResolved): Remove an overzealous assert.
20292        (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange): Intercept the exception breakpoints
20293        and call _updateBreakOnExceptionsState after updating the settings.
20294        (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState): Added. Communicate the state to the
20295        backend and update resolved state.
20296
202972012-03-10  Joseph Pecoraro  <pecoraro@apple.com>
20298
20299        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
20300
20301        Allow resizing of the quick console. The quick console behaves like
20302        sidebars. It toggles collapsed state when double clicked, and opens
20303        or closes when resizing. The allowed maximum height is 75% of the
20304        screen. When the window is resized smaller, we may need to shorten
20305        the console to be within the 75%.
20306
20307        Remember the height before we collapsed so that if you toggle
20308        immediately it will restore the height to what it was.
20309
20310        Reviewed by Timothy Hatcher.
20311
20312        * UserInterface/Main.js:
20313        (WebInspector._contentBrowserSizeDidChange):
20314        * UserInterface/QuickConsole.css:
20315        (.quick-console):
20316        (.quick-console > .resizer):
20317        Position the quick-console resizer like a sidebar resizer. 5px
20318        wide, with a couple pixels above and below the border.
20319
20320        * UserInterface/QuickConsole.js:
20321        (WebInspector.QuickConsole):
20322        (WebInspector.QuickConsole.prototype.get collapsedHeight):
20323        (WebInspector.QuickConsole.prototype.get minimumUncollapsedHeight):
20324        (WebInspector.QuickConsole.prototype.get maximumUncollapsedHeight):
20325        (WebInspector.QuickConsole.prototype.updateLayout):
20326        (WebInspector.QuickConsole.prototype.get height):
20327        (WebInspector.QuickConsole.prototype.set height):
20328        (WebInspector.QuickConsole.prototype._toggleButtonClicked):
20329        (WebInspector.QuickConsole.prototype._resizerDoubleClicked):
20330        (WebInspector.QuickConsole.prototype._resizerMouseDown):
20331        (WebInspector.QuickConsole.prototype._resizerMouseMoved):
20332        (WebInspector.QuickConsole.prototype._resizerMouseUp):
20333
203342012-03-09  Joseph Pecoraro  <pecoraro@apple.com>
20335
20336        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
20337
20338        Pull the console out of ContentBrowser and instead just put it underneath.
20339
20340        Reviewed by Timothy Hatcher.
20341
20342        * UserInterface/ContentBrowser.js:
20343        (WebInspector.ContentBrowser):
20344        * UserInterface/Main.css:
20345        (#content):
20346        * UserInterface/Main.html:
20347        * UserInterface/Main.js:
20348        (WebInspector.contentLoaded):
20349        * UserInterface/QuickConsole.css:
20350        (#quick-console):
20351        (#quick-console.collapsed):
20352        (#quick-console .navigation-bar > .console-toggle):
20353        (#quick-console.collapsed .navigation-bar > .console-toggle):
20354        (#quick-console > .quick-console-view-container):
20355        (#quick-console > .quick-console-toolbar):
20356        (#quick-console > .quick-console-toolbar > .quick-console-text-prompt):
20357        (#quick-console > .quick-console-toolbar > .navigation-bar):
20358
203592012-03-09  Joseph Pecoraro  <pecoraro@apple.com>
20360
20361        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
20362
20363        Add a toggle button to the quick console's navigation bar.
20364
20365        Reviewed by Timothy Hatcher.
20366
20367        * Localizations/en.lproj/localizedStrings.js:        
20368        * UserInterface/Main.html:
20369        Misc changes.
20370
20371        * UserInterface/ButtonNavigationItem.js:
20372        (WebInspector.ButtonNavigationItem):
20373        (WebInspector.ButtonNavigationItem.prototype.get glyphElement):
20374        Expose glyphElement for QuickConsole buttons to use.
20375        Add a way to suppress creating embossed images.
20376
20377        * UserInterface/QuickConsoleButtonNavigationItem.css: Added.
20378        (.navigation-bar > .item.quick-console-button):
20379        (.navigation-bar > .item.quick-console-button:active):
20380        * UserInterface/QuickConsoleButtonNavigationItem.js: Added.
20381        (WebInspector.QuickConsoleButtonNavigationItem):
20382        (WebInspector.QuickConsoleButtonNavigationItem.prototype.generateStyleText):
20383        The QuickConsole buttons are just styled with different opacities. We
20384        can remove most of the custom NavigationItem styles and set the glyph
20385        image directly.
20386
20387        * UserInterface/QuickConsole.css:
20388        (.quick-console .navigation-bar > .console-toggle):
20389        (.quick-console.collapsed .navigation-bar > .console-toggle):
20390        * UserInterface/QuickConsole.js:
20391        (WebInspector.QuickConsole):
20392        (WebInspector.QuickConsole.prototype.get collapsed):
20393        (WebInspector.QuickConsole.prototype.set collapsed):
20394        (WebInspector.QuickConsole.prototype._toggleButtonClicked):
20395        Give the console a toggle button.
20396
203972012-03-09  Joseph Pecoraro  <pecoraro@apple.com>
20398
20399        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
20400
20401        View hierarchy for the quick console:
20402
20403          <div class="quick-console">
20404              <!--
20405                Content view container. When the console adjusts its height this becomes
20406                visible. This flex fills the vertical space.
20407              -->
20408              <div class="view-container"></div>
20409
20410              <!--
20411                Toolbar fixed to the bottom. TextPrompt and NavigationBar with buttons.
20412                Fixed height, position:relative to appear on top, and the text-prompt
20413                flex fills horizontally.
20414              -->
20415              <div class="toolbar">
20416                  <div class="text-prompt" contenteditable="true"></div>
20417                  <div class="navigation-bar"></div>
20418              </div>
20419          </div>
20420
20421        Reviewed by Timothy Hatcher.
20422
20423        * UserInterface/Main.html:
20424        * UserInterface/QuickConsole.css:
20425        (.quick-console):
20426        (.quick-console.collapsed):
20427        (.quick-console > .view-container):
20428        (.quick-console > .toolbar):
20429        (.quick-console > .toolbar > .text-prompt):
20430        (.quick-console > .toolbar > .navigation-bar):
20431        * UserInterface/QuickConsole.js:
20432        (WebInspector.QuickConsole):
20433        (WebInspector.QuickConsole.get element):
20434
20435        * UserInterface/QuickConsoleNavigationBar.js: Added.
20436        (WebInspector.QuickConsoleNavigationBar):
20437        (WebInspector.QuickConsoleNavigationBar.prototype.addNavigationItem):
20438        Add navigation items on the left. Since we will always want the toggle button on the right.
20439
204402012-03-09  Joseph Pecoraro  <pecoraro@apple.com>
20441
20442        <rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
20443
20444        Add the QuickConsole to the bottom of the ContentBrowser.
20445
20446        Reviewed by Timothy Hatcher.
20447        
20448        * UserInterface/ContentBrowser.js:
20449        (WebInspector.ContentBrowser):
20450        * UserInterface/Main.html:
20451        * UserInterface/QuickConsole.css: Added.
20452        (.quick-console):
20453        (body.window-inactive .navigation-bar):
20454        * UserInterface/QuickConsole.js: Added.
20455        (WebInspector.QuickConsole):
20456        (WebInspector.QuickConsole.prototype.get element):
20457
204582012-03-09  Joseph Pecoraro  <pecoraro@apple.com>
20459
20460        <rdar://problem/11017753> Sometimes Load event-marker doesn't show up (99%)
20461
20462        When an event-marker is very close to, but not, the new maximum boundary
20463        the maximum boundary wasn't being extended to allow for a nice display of
20464        the event-marker. Now, if the event-marker is within 3% of the maximum
20465        boundary, then just extend the maximum boundary by 3%.
20466
20467        Reviewed by Timothy Hatcher.
20468
20469        * UserInterface/NetworkGraphCalculator.js:
20470        (WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventMarker):
20471
204722012-03-08  Timothy Hatcher  <timothy@apple.com>
20473
20474        Follow up to my previous fix for reloading the page sometimes removes the main resource from breakpoints.
20475
20476        Not all breakpoints pass in the resource to _addBreakpoint. If resource was undefined it would cause
20477        a new ResourceTreeElement to be created for each breakpoint.
20478
20479        Reviewed by Joseph Pecoraro.
20480
20481        * UserInterface/BreakpointSidebarPanel.js:
20482        (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Lookup the resource first,
20483        so it can always be compared to the ResourceTreeElement's resource.
20484
204852012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20486
20487        Follow-up patch to clean up DOMTreeManager events data.
20488
20489        Always pass the node as "node" and parentNode as "parent". There was
20490        one case looking for parentNode that was totally wrong.
20491
20492        Reviewed by Timothy Hatcher.
20493
20494        * UserInterface/DOMTreeContentView.js:
20495        (WebInspector.DOMTreeContentView.prototype._domNodeChanged):
20496        * UserInterface/DOMTreeManager.js:
20497        (WebInspector.DOMTreeManager.prototype._characterDataModified):
20498        (WebInspector.DOMTreeManager.prototype._childNodeInserted):
20499        * UserInterface/DOMTreeUpdater.js:
20500        (WebInspector.DOMTreeUpdater.prototype._characterDataModified):
20501        (WebInspector.DOMTreeUpdater.prototype._nodeInserted):
20502
205032012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20504
20505        <rdar://problem/11005082> Editing node attribute should or HTML should update Path Components
20506
20507        Update path components when the selected node has an attribute
20508        or character data change.
20509
20510        Reviewed by Timothy Hatcher.
20511
20512        * UserInterface/DOMTreeContentView.js:
20513        (WebInspector.DOMTreeContentView):
20514        (WebInspector.DOMTreeContentView.prototype._domNodeChanged):
20515        In the attribute events the changed node is event.data.node.
20516        In the character data event the changed node is event.data.
20517
205182012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20519
20520        <rdar://problem/11014611> Inline Web SQL Database DataGrid resizers are not updated if inspector window resized
20521
20522        When the window resizes, the ContentView gets an updateLayout. Use this
20523        opportunity to update the layout of any inline DataGrids so that their
20524        resizers are positioned correctly.
20525
20526        Reviewed by Timothy Hatcher.
20527
20528        * UserInterface/DatabaseContentView.js:
20529        (WebInspector.DatabaseContentView.prototype.constructor.WebInspector.DatabaseContentView.updateLayout):
20530        (WebInspector.DatabaseContentView.prototype._appendViewQueryResult):
20531
205322012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20533
20534        Remove uses of WebInspector.useLowerCaseMenuTitles. On the Safari frontend
20535        this is always yes and the function doesn't even exist. This code is currently
20536        unreachable, the change is to fix update-safari-localizable-strings usage.
20537
20538        Reviewed by Brian Weinstein.
20539
20540        * Localizations/en.lproj/localizedStrings.js:
20541        * UserInterface/LogContentView.js:
20542
205432012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20544
20545        <rdar://problem/10960903> Include Network timeline graph in the network data grid
20546
20547        Tweak the event-markers so they are always behind the network datagrid's
20548        timeline pills. This is done by making three layers: event-marker (bottom),
20549        timeline pills (middle), and tooltip div (top).
20550
20551        Reviewed by Timothy Hatcher.
20552
20553        * UserInterface/NetworkDataGrid.css:
20554        (.network-timeline-decorations > .event-markers > .event-marker):
20555        (.network-datagrid tr > td.timeline-column):
20556        (.network-timeline-decorations > .event-markers > .event-marker-tooltip):
20557        Style the three layers, z-indexes.
20558
20559        * UserInterface/TimelinesContentView.css:
20560        Remove old z-index.
20561
20562        * UserInterface/NetworkDataGrid.js:
20563        (WebInspector.NetworkDataGrid):
20564        Rename the constants to use the standard "StyleClassName" suffix and
20565        give the DataGrid a class name.
20566
20567        * UserInterface/TimelineDecorations.css:
20568        (.timeline-decorations > .event-markers > .event-marker-tooltip):
20569        (.timeline-decorations > .event-markers > .event-marker):
20570        (.timeline-decorations > .event-markers > .event-marker.load-event):
20571        (.timeline-decorations > .event-markers > .event-marker.dom-content-event):
20572        (.timeline-decorations > .event-markers > .event-marker.timestamp):
20573        Drop the "wrapper" element. The event-marker now displays the same as the tooltip div.
20574
20575        * UserInterface/TimelineDecorations.js:
20576        (WebInspector.TimelineDecorations.prototype.updateEventMarkers):
20577        Rename "wrapper" -> "tooltip" and position the tooltip and marker the same.
20578
205792012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20580
20581        <rdar://problem/10960903> Include Network timeline graph in the network data grid
20582
20583        Remember if the Network DataGrid column group was collapsed or expanded.
20584
20585        Reviewed by Timothy Hatcher.
20586
20587        * UserInterface/DataGrid.js:
20588        (WebInspector.DataGrid.prototype._clickInColumnCollapser):
20589        (WebInspector.DataGrid.prototype.collapseColumnGroup):
20590        (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
20591        Add collapseColumnGroup(name) API to DataGrid and share the
20592        code with the old path, when the user clicks the button.
20593
20594        * UserInterface/NetworkDataGrid.js:
20595        (WebInspector.NetworkDataGrid):
20596        (WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
20597        On creation load the setting, and save the setting on toggle.
20598
20599        * UserInterface/TimelinesContentView.js:
20600        (WebInspector.TimelinesContentView):
20601        Give all columns a starting width (based on the auto-calculated widths).
20602
206032012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20604
20605        <rdar://problem/11014578> DOM Storage DataGrids should be sortable
20606
20607        Allow sorting of both of the DOM Storage DataGrid columns.
20608        Before sorting nodes, make sure to delete the creation node
20609        and re-add it in the end.
20610
20611        Reviewed by Timothy Hatcher.
20612
20613        * UserInterface/DOMStorageContentView.js:
20614        (WebInspector.DOMStorageContentView.prototype._updateDataGridForDOMStorageEntries):
20615        (WebInspector.DOMStorageContentView.prototype._sortDataGrid):
20616        (WebInspector.DOMStorageContentView.prototype._insertNodesIntoDataGridWithSort.comparator):
20617        (WebInspector.DOMStorageContentView.prototype._insertNodesIntoDataGridWithSort):
20618        Share sort code with table creation and sort changed.
20619
20620        * UserInterface/DataGrid.js:
20621        (WebInspector.DataGrid.prototype.removeChild):
20622        When the creation node is removed, delete the reference to it.
20623
206242012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20625
20626        Rename DataGrid methods and events.
20627
20628            DataGrid.prototype.updateWidths -> updateLayout
20629            "sorting changed" event -> WebInspector.DataGrid.Event.SortChanged
20630            "width changed" event -> WebInspector.DataGrid.Event.DidLayout
20631
20632        This then also renames the NetworkDataGrid event handlers
20633        and moves the sorting dispatch function into its only caller.
20634
20635        Reviewed by Brian Weinstein.
20636
20637        * UserInterface/ApplicationCacheFrameContentView.js:
20638        (WebInspector.ApplicationCacheFrameContentView.prototype.updateLayout):
20639        (WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
20640        * UserInterface/CSSSelectorProfileView.js:
20641        (WebInspector.CSSSelectorProfileView):
20642        (WebInspector.CSSSelectorProfileView.prototype.updateLayout):
20643        * UserInterface/CookieStorageContentView.js:
20644        (WebInspector.CookieStorageContentView.prototype.updateLayout):
20645        (WebInspector.CookieStorageContentView.prototype._rebuildTable):
20646        * UserInterface/DOMStorageContentView.js:
20647        (WebInspector.DOMStorageContentView.prototype.updateLayout):
20648        (WebInspector.DOMStorageContentView.prototype._showDOMStorageEntries):
20649        * UserInterface/DataGrid.js:
20650        (WebInspector.DataGrid.prototype.autoSizeColumns):
20651        (WebInspector.DataGrid.prototype.updateLayout):
20652        (WebInspector.DataGrid.prototype.applyColumnWidthsMap):
20653        (WebInspector.DataGrid.prototype._clickInHeaderCell):
20654        (WebInspector.DataGrid.prototype._resizerDragging):
20655        (WebInspector.DataGrid.prototype._endResizerDragging):
20656        * UserInterface/DatabaseTableContentView.js:
20657        (WebInspector.DatabaseTableContentView.prototype.updateLayout):
20658        (WebInspector.DatabaseTableContentView.prototype._queryFinished):
20659        * UserInterface/JavaScriptProfileView.js:
20660        (WebInspector.JavaScriptProfileView.prototype.updateLayout):
20661        * UserInterface/NetworkDataGrid.js:
20662        (WebInspector.NetworkDataGrid):
20663        (WebInspector.NetworkDataGrid.prototype._dataGridSortChanged):
20664        (WebInspector.NetworkDataGrid.prototype._dataGridDidLayout):
20665        * UserInterface/TimelinesContentView.js:
20666        (WebInspector.TimelinesContentView):
20667        (WebInspector.TimelinesContentView.prototype.constructor.WebInspector.TimelinesContentView.showTimelineForRecordType):
20668        (WebInspector.TimelinesContentView.prototype.updateLayout):
20669
206702012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20671
20672        Relayout the selected node when widths change. This is only needed for
20673        the selected node because currently it is the only node that can be
20674        displaying labels when the data grid's columns widths change.
20675
20676        Reviewed by Brian Weinstein.
20677
20678        * UserInterface/DataGrid.js:
20679        (WebInspector.DataGridNode.prototype.updateLayout):
20680        * UserInterface/NetworkDataGrid.js:
20681        (WebInspector.NetworkDataGrid):
20682        (WebInspector.NetworkDataGrid.prototype._updateLayout):
20683        * UserInterface/ResourceTimelineDataGridNode.js:
20684        (WebInspector.ResourceTimelineDataGridNode.prototype.updateLayout):
20685
206862012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20687
20688        <rdar://problem/10960903> Include Network timeline graph in the network data grid
20689
20690        Draw the event markers over the Network datagrid.
20691
20692        Reviewed by Timothy Hatcher.
20693
20694        * Localizations/en.lproj/localizedStrings.js:
20695        Tooltip strings for the event-marker lines.
20696
20697        * UserInterface/NetworkDataGrid.js:
20698        (WebInspector.NetworkDataGrid.prototype.updateCalculatorBoundariesWithEventMarker):
20699        (WebInspector.NetworkDataGrid.prototype._updateDecorations):
20700        (WebInspector.NetworkDataGrid.prototype._updateEventMarkers):
20701        Let the calculator handle updating the bounds and the decorator drawing the markers.
20702
20703        * UserInterface/NetworkGraphCalculator.js:
20704        (WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventMarker):
20705        When updating boundaries for event markers its possible that event markers will
20706        arrive later then resources (onload or console.timeStamp() for example). If such
20707        an event is more than 10% past the current bounds we don't stretch the bounds
20708        because it would distort the graph too much. Likewise, if a timestamp will become
20709        the new maximum extend an extra 3% to provide some white-space past the marker.
20710
20711        * UserInterface/TimelineDecorations.css:
20712        (.timeline-decorations > .event-markers):
20713        (.timeline-decorations > .event-markers > .event-marker-wrapper):
20714        This wrapper provides a larger surface area for the tooltip. 9px total (4px + 1px + 4px).
20715
20716        (.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker):
20717        (.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker.load-event):
20718        (.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker.dom-content-event):
20719        (.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker.timestamp):
20720        Different colors for the different types of event-markers.
20721
20722        * UserInterface/TimelinesContentView.css:
20723        (.content-view.timelines > .data-grid tr.selected td.timeline-column):
20724        Make sure the selected timeline datagrid row draws over the event-marker.
20725
20726        * UserInterface/TimelineDecorations.js:
20727        (WebInspector.TimelineDecorations):
20728        (WebInspector.TimelineDecorations.prototype.updateEventMarkers.toolTipForEventMarker):
20729        (WebInspector.TimelineDecorations.prototype.updateEventMarkers):
20730        Position and style the event markers within the bounds.
20731
207322012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20733
20734        <rdar://problem/10960903> Include Network timeline graph in the network data grid
20735
20736        Add TimelineEventMarkers to the Network's TimelineDecorations. They are
20737        not displayed yet, and the TimelineOverview won't show markers yet.
20738
20739        Reviewed by Timothy Hatcher.
20740
20741        * UserInterface/TimelinesContentView.js:
20742        (WebInspector.TimelinesContentView):
20743        (WebInspector.TimelinesContentView.prototype._recordedEventMarker):
20744        Pass incoming event markers to the current datagrid. Only the network data grid uses them.
20745
20746        (WebInspector.TimelinesContentView.prototype._updatePendingRecords):
20747        (WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecordsAndEventMarkers):
20748        When updating the bounds of the timeline graph also provide pending event markers
20749        so that late events (like onload) can stretch the maximum bounds if necessary.
20750
20751        * UserInterface/TimelineDataGrid.js:
20752        (WebInspector.TimelineDataGrid.prototype.updateCalculatorBoundariesWithEventMarker):
20753        (WebInspector.TimelineDataGrid.prototype.addTimelineEventMarker):
20754        Default empty implementations for DataGrids to handle event markers.
20755
20756        * UserInterface/NetworkDataGrid.js:
20757        (WebInspector.NetworkDataGrid.prototype.reset):
20758        (WebInspector.NetworkDataGrid.prototype.addTimelineEventMarker):
20759        Pass event markers on to the decorations manager. We also need a way to reset now.
20760
20761        * UserInterface/TimelineDecorations.js:
20762        (WebInspector.TimelineDecorations):
20763        (WebInspector.TimelineDecorations.prototype.addTimelineEventMarker):
20764        Keep track of event makers we may need to display.
20765
20766        * UserInterface/TimelineOverview.js:
20767        (WebInspector.TimelineOverview.prototype.clear):
20768        Add clear, just in case it is needed later. The overview currently doesn't handle event markers.
20769
207702012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20771
20772        <rdar://problem/10960903> Include Network timeline graph in the network data grid
20773
20774        Add a TimelineEventMarker class for marked timestamps. Current
20775        event markers that we are interested in are the DOMContent event,
20776        Load event, and console.timeStamp() calls.
20777
20778        Reviewed by Timothy Hatcher.
20779
20780        * UserInterface/Main.html:
20781        * UserInterface/PageObserver.js:
20782        (WebInspector.PageObserver.domContentEventFired):
20783        (WebInspector.PageObserver.prototype.loadEventFired):
20784        Point out that these are not needed, they are covered by TimelineAgent
20785        in the Safari frontend.
20786
20787        * UserInterface/TimelineEventMarker.js: Added.
20788        (WebInspector.TimelineEventMarker):
20789        (WebInspector.TimelineEventMarker.prototype.constructor.WebInspector.TimelineEventMarker.get timestamp):
20790        (WebInspector.TimelineEventMarker.prototype.get type):
20791        Simple class encapsulating a timestamp and type.
20792
20793        * UserInterface/TimelineManager.js:
20794        (WebInspector.TimelineManager):
20795        (WebInspector.TimelineManager.prototype.get timelineEventMarkers):
20796        (WebInspector.TimelineManager.prototype.startRecording):
20797        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
20798        (WebInspector.TimelineManager.prototype.eventRecorded):
20799        Keep a record of event markers.
20800
208012012-03-08  Joseph Pecoraro  <pecoraro@apple.com>
20802
20803        When hiding the dock button also hide the divider between the dock
20804        button and the sidebar's other navigation items. 
20805
20806        Reviewed by Timothy Hatcher.
20807
20808        * UserInterface/ButtonNavigationItem.js:
20809        * UserInterface/Main.js:
20810        (WebInspector.contentLoaded):
20811        (WebInspector._updateDockToggleButtonVisibility):
20812        * UserInterface/NavigationItem.js:
20813        (WebInspector.NavigationItem.prototype.get hidden):
20814        (WebInspector.NavigationItem.prototype.set hidden):
20815
208162012-03-08  Timothy Hatcher  <timothy@apple.com>
20817
20818        Reloading the page sometimes removes the main resource from breakpoints.
20819
20820        The _checkForOldResources function is delayed on the timeout. This caused the
20821        breakpoints to be appended to a ResourceTreeElement that will soon be removed.
20822
20823        Reviewed by Brian Weinstein.
20824
20825        * UserInterface/BreakpointSidebarPanel.js:
20826        (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Create a new ResourceTreeElement
20827        if the resource is different from the previous ResourceTreeElement.
20828        * UserInterface/IssueSidebarPanel.js:
20829        (WebInspector.IssueSidebarPanel.prototype._issueWasAdded): Ditto.
20830        * UserInterface/SearchSidebarPanel.js:
20831        (WebInspector.SearchSidebarPanel.prototype._treeElementForResource): Ditto.
20832
208332012-03-08  Timothy Hatcher  <timothy@apple.com>
20834
20835        Communicate breakpoints to the backend and update the resolved state of the breakpoints.
20836
20837        Part of: <rdar://problem/10318770&10318777>
20838
20839        Reviewed by Brian Weinstein.
20840
20841        * UserInterface/Breakpoint.js:
20842        (WebInspector.Breakpoint): Initialize _id to null.
20843        (WebInspector.Breakpoint.prototype.get id): Added.
20844        (WebInspector.Breakpoint.prototype.set id): Added.
20845        (WebInspector.Breakpoint.prototype.set lineNumber): Report oldLineNumber in the event.
20846        (WebInspector.Breakpoint.prototype.get info): Updated comment.
20847        * UserInterface/BreakpointSidebarPanel.js:
20848        (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Mark disabled breakpoints as resolved
20849        when they are added to the user interface.
20850        * UserInterface/DebuggerManager.js:
20851        (WebInspector.DebuggerManager):
20852        (WebInspector.DebuggerManager.prototype.addBreakpoint): Call _setBreakpoint.
20853        (WebInspector.DebuggerManager.prototype.removeBreakpoint): Call _removeBreakpoint.
20854        (WebInspector.DebuggerManager.prototype.breakpointResolved): Added.
20855        (WebInspector.DebuggerManager.prototype.reset): Added.
20856        (WebInspector.DebuggerManager.prototype._setBreakpoint): Added. Talk to the DebuggerAgent.
20857        (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
20858        (WebInspector.DebuggerManager.prototype._removeBreakpoint): Added. Talk to the DebuggerAgent.
20859        (WebInspector.DebuggerManager.prototype._removeBreakpoint.didRemoveBreakpoint):
20860        (WebInspector.DebuggerManager.prototype._breakpointLineNumberDidChange): Added. Call _removeBreakpoint.
20861        (WebInspector.DebuggerManager.prototype._breakpointLineNumberDidChange.breakpointRemoved): Call _setBreakpoint.
20862        (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange): Call _removeBreakpoint or _setBreakpoint.
20863        * UserInterface/DebuggerObserver.js:
20864        (WebInspector.DebuggerObserver.prototype.globalObjectCleared): Call DebuggerManager.reset.
20865        (WebInspector.DebuggerObserver.prototype.breakpointResolved): Call DebuggerManager.breakpointResolved.
20866
208672012-03-08  Timothy Hatcher  <timothy@apple.com>
20868
20869        Use "resolved" to describe breakpoints instead of "inactive".
20870
20871        The term inactive was confusing since we also have disabled. Using resolved better
20872        describes the property.
20873
20874        Reviewed by Brian Weinstein.
20875
20876        * UserInterface/Breakpoint.js:
20877        (WebInspector.Breakpoint):
20878        (WebInspector.Breakpoint.prototype.set lineNumber):
20879        (WebInspector.Breakpoint.prototype.get resolved): Renamed from inactive.
20880        (WebInspector.Breakpoint.prototype.set resolved): Renamed from inactive.
20881        (WebInspector.Breakpoint.prototype.get info):
20882        * UserInterface/BreakpointTreeElement.css:
20883        (.item.breakpoint .status > .status-image):
20884        (.item.breakpoint .status > .status-image.resolved):
20885        * UserInterface/BreakpointTreeElement.js:
20886        (WebInspector.BreakpointTreeElement):
20887        (WebInspector.BreakpointTreeElement.prototype._updateStatus):
20888        * UserInterface/TextEditor.css:
20889        (.text-editor > .gutter > .line-number > .breakpoint):
20890        (.text-editor > .gutter > .line-number.breakpoint-resolved > .breakpoint):
20891        * UserInterface/TextEditor.js:
20892        (WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo):
20893        (WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement):
20894        * UserInterface/TextResourceContentView.js:
20895        (WebInspector.TextResourceContentView):
20896        (WebInspector.TextResourceContentView.prototype.closed):
20897        (WebInspector.TextResourceContentView.prototype._updateBreakpointStatus):
20898        (WebInspector.TextResourceContentView.prototype.textEditorBreakpointInfo):
20899        (WebInspector.TextResourceContentView.prototype.textEditorBreakpointAdded):
20900        (WebInspector.TextResourceContentView.prototype.textEditorLineContentUpdated):
20901        (WebInspector.TextResourceContentView.prototype._textEditorBreakpointInfoForBreakpoint):
20902
209032012-03-08  Timothy Hatcher  <timothy@apple.com>
20904
20905        Fix an assertion and exception that is seen sometimes when opening the Web Inspector.
20906
20907        The _rebuildSections function is wired up to events. Those events can fire when we don't have
20908        a selected DOM node. So we need to return early in that case and not assert.
20909
20910        Reviewed by Brian Weinstein.
20911
20912        * UserInterface/CSSStyleDetailsSidebarPanel.js:
20913        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Return early if domNode is null.
20914
209152012-03-08  Timothy Hatcher  <timothy@apple.com>
20916
20917        Fix a merge issue that caused breakpoint lines to not have an icon.
20918
20919        Part of: <rdar://problem/10318777>
20920
20921        Reviewed by Brian Weinstein.
20922
20923        * UserInterface/BreakpointTreeElement.js: Remove the duplicate GenericLineIconStyleClassName that
20924        had a typo in the value.
20925
209262012-03-08  Brian Weinstein  <bweinstein@apple.com>
20927
20928        <rdar://problem/11007383> Need a way to clear the current console log.
20929
20930        Reviewed by Tim Hatcher.
20931
20932        * UserInterface/LogContentView.js:
20933        (WebInspector.LogContentView): Call this._registerShortcuts.
20934        (WebInspector.LogContentView.prototype.consoleCleared): Renamed from _consoleCleared.
20935        (WebInspector.LogContentView.prototype._registerShortcuts): Remove the shortcut to dump memory, and remove
20936            the code to set up shortcuts screen.
20937        (WebInspector.LogContentView.prototype._requestClearMessages): Call to the LogManager.
20938        (WebInspector.LogContentView.prototype._promptKeyDown): Actually look up the shortcut in the shortcuts
20939            list.
20940        * UserInterface/LogManager.js:
20941        (WebInspector.LogManager.prototype.requestClearMessages): Call clearMessages on the ConsoleAgent, and fire
20942            an event saying the active log was cleared.
20943        * UserInterface/LogSidebarPanel.js:
20944        (WebInspector.LogSidebarPanel): Listen for the active log being cleared.
20945        (WebInspector.LogSidebarPanel.prototype._activeLogCleared): Call consoleCleared on the active log content view.
20946
209472012-03-08  Brian Weinstein  <bweinstein@apple.com>
20948
20949        <rdar://problem/11012162> Log repeat counts are not updated when the console is open.
20950
20951        Reviewed by Tim Hatcher.
20952
20953        * UserInterface/ConsoleObserver.js:
20954        (WebInspector.ConsoleObserver.prototype.messageRepeatCountUpdated): Call through to the LogManager.
20955        * UserInterface/LogContentView.js:
20956        (WebInspector.LogContentView.prototype._appendCommand): Call LogManager.repeatCountWasInterrupted.
20957        * UserInterface/LogManager.js:
20958        (WebInspector.LogManager.prototype.constructor.WebInspector.LogManager.initialize): Initialize whether or
20959            not the repeat count was interrupted (by the user entering a command in the log content view).
20960        (WebInspector.LogManager.prototype.messageWasAdded): Create a ConsoleMessage and call _addMessage.
20961        (WebInspector.LogManager.prototype.messageRepeatCountUpdated): If the repeat count wasn't interrupted,
20962            update the count. If it was, then clone our message element, and create a new one, and set its repeat
20963            and ignored count.
20964        (WebInspector.LogManager.prototype.repeatCountWasInterrupted): Set the flag indicating our repeat count
20965            was interrupted.
20966        (WebInspector.LogManager.prototype._addMessage): Add the message to our list of messages, set it as our
20967            previous message, and fire our event.
20968
209692012-03-08  Timothy Hatcher  <timothy@apple.com>
20970
20971        Update the disabled and inactive state of breakpoints in the TextEditor gutter as they change.
20972
20973        Part of: <rdar://problem/10318777>
20974
20975        Reviewed by Joseph Pecoraro.
20976
20977        * UserInterface/TextEditor.js:
20978        (WebInspector.TextEditor.prototype.setBreakpointInfoForLine): Added.
20979        * UserInterface/TextResourceContentView.js:
20980        (WebInspector.TextResourceContentView): Added event listeners for DisabledStateDidChange and InactiveStateDidChange.
20981        (WebInspector.TextResourceContentView.prototype.closed): Removed the added event listeners.
20982        (WebInspector.TextResourceContentView.prototype._updateBreakpointStatus): Added. Calls setBreakpointInfoForLine.
20983
209842012-03-08  Timothy Hatcher  <timothy@apple.com>
20985
20986        Show the status of each breakpoint in the Breakpoint sidebar. Also update the title when the line number changes.
20987
20988        Clicking the breakpoint image will toggle the disabled state.
20989
20990        Part of: <rdar://problem/10318777>
20991
20992        Reviewed by Joseph Pecoraro.
20993
20994        * UserInterface/Breakpoint.js:
20995        * UserInterface/BreakpointTreeElement.css: Added.
20996        (.item.breakpoint .status > .status-image):
20997        (.item.breakpoint .status > .status-image.inactive):
20998        (.item.breakpoint .status > .status-image.disabled):
20999        * UserInterface/BreakpointTreeElement.js:
21000        (WebInspector.BreakpointTreeElement):
21001        (WebInspector.BreakpointTreeElement.prototype._updateMainTitle): Added.
21002        (WebInspector.BreakpointTreeElement.prototype._updateStatus): Added.
21003        (WebInspector.BreakpointTreeElement.prototype._statusImageElementMouseDown): Added
21004        (WebInspector.BreakpointTreeElement.prototype._statusImageElementClicked): Added
21005        * UserInterface/Images/BreakpointButton.pdf: Added.
21006        * UserInterface/Images/BreakpointInactiveButton.pdf: Added.
21007        * UserInterface/Main.html: Included BreakpointTreeElement.css.
21008
210092012-03-07  Timothy Hatcher  <timothy@apple.com>
21010
21011        Fix the AttributedString prototype chain.
21012
21013        Reviewed by Brian Weinstein.
21014
21015        * UserInterface/AttributedString.js: Set the AttributedString prototype instead of the SourceTokenizer prototype.
21016
210172012-03-07  Timothy Hatcher  <timothy@apple.com>
21018
21019        Make selecting a breakpoint in the sidebar show the resource and reveal the line.
21020
21021        Part of: <rdar://problem/10318777>
21022
21023        Reviewed by Brian Weinstein and Joseph Pecoraro.
21024
21025        * UserInterface/BreakpointSidebarPanel.js:
21026        (WebInspector.BreakpointSidebarPanel): Set onselect to _treeElementSelected.
21027        (WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected): Added.
21028
210292012-03-07  Timothy Hatcher  <timothy@apple.com>
21030
21031        Populate the Breakpoint sidebar with breakpoints.
21032
21033        Part of: <rdar://problem/10318777>
21034
21035        Reviewed by Brian Weinstein.
21036
21037        * Localizations/en.lproj/localizedStrings.js: Updated.
21038        * UserInterface/BreakpointIcons.css: Added.
21039        (.breakpoint-generic-line-icon .icon):
21040        * UserInterface/BreakpointSidebarPanel.js:
21041        (WebInspector.BreakpointSidebarPanel):
21042        (WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Added. Helper.
21043        (WebInspector.BreakpointSidebarPanel.prototype._addBreakpointsForResource): Added. Helper.
21044        (WebInspector.BreakpointSidebarPanel.prototype._resourceAdded): Added. Call _addBreakpointsForResource.
21045        (WebInspector.BreakpointSidebarPanel.prototype._mainResourceChanged): Added. Call _addBreakpointsForResource.
21046        (WebInspector.BreakpointSidebarPanel.prototype._breakpointAdded): Added. Call _addBreakpoint.
21047        (WebInspector.BreakpointSidebarPanel.prototype._breakpointRemoved): Added. Remove the breakpoint, and resource
21048        if that was the last breakpoint.
21049        (WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources):
21050        (WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources.delayedWork): Check for detached resources
21051        and remove them from the tree.
21052        * UserInterface/BreakpointTreeElement.js: Added.
21053        (WebInspector.BreakpointTreeElement):
21054        (WebInspector.BreakpointTreeElement.prototype.get breakpoint):
21055        * UserInterface/Main.html: Included BreakpointTreeElement.js and BreakpointIcons.css.
21056
210572012-03-07  Timothy Hatcher  <timothy@apple.com>
21058
21059        Rename ResourceSearchMatch.pdf to ResultLine.pdf to be more generic so it can be used by the Breakpoint sidebar.
21060
21061        Part of: <rdar://problem/10318777>
21062
21063        Reviewed by Brian Weinstein.
21064
21065        * UserInterface/Images/ResultLine.pdf: Renamed from WebInspector/UserInterface/Images/ResourceSearchMatch.pdf.
21066        * UserInterface/SearchIcons.css:
21067        (.resource-match-icon .icon): Use ResultLine.pdf.
21068
210692012-03-07  Timothy Hatcher  <timothy@apple.com>
21070
21071        Persist breakpoints between sessions.
21072
21073        Part of: <rdar://problem/10318770&10318777>
21074
21075        Reviewed by Brian Weinstein and Joseph Pecoraro.
21076
21077        * UserInterface/Breakpoint.js:
21078        (WebInspector.Breakpoint): Support taking an info object or url. Make inactive default to true.
21079        The backend will later mark them as active once they are resolved.
21080        (WebInspector.Breakpoint.prototype.get info): Added. Returns an object to store.
21081        * UserInterface/DebuggerManager.js:
21082        (WebInspector.DebuggerManager): Iterate over the info objects in the setting and make breakpoints.
21083        (WebInspector.DebuggerManager.prototype.addBreakpoint): Return early if null.
21084        (WebInspector.DebuggerManager.prototype.removeBreakpoint): Ditto.
21085        (WebInspector.DebuggerManager.prototype._inspectorClosing): Added. Call _saveBreakpoints.
21086        (WebInspector.DebuggerManager.prototype._saveBreakpoints): Added. Make an array of info objects
21087        and save them in the setting.
21088
210892012-03-07  Joseph Pecoraro  <pecoraro@apple.com>
21090
21091        <rdar://problem/10960903> Include Network timeline graph in the network data grid
21092
21093        Bring the padding down to 1px for both sides of the timeline graph.
21094        This makes the percent widths a little more accurate and matches
21095        the padding on the timeline overview.
21096
21097        Reviewed by Timothy Hatcher.
21098
21099        * UserInterface/TimelinesContentView.css:
21100        (.content-view.timelines > .data-grid td.timeline-column):
21101
211022012-03-07  Joseph Pecoraro  <pecoraro@apple.com>
21103
21104        <rdar://problem/10960903> Include Network timeline graph in the network data grid
21105
21106        Dynamically determine the width of the localized string
21107        with similar table heading styles.
21108
21109        Reviewed by Timothy Hatcher.
21110
21111        * UserInterface/NetworkDataGrid.js:
21112        (WebInspector.NetworkDataGrid.prototype._localizedTimelineHeaderWidth):
21113
211142012-03-07  Joseph Pecoraro  <pecoraro@apple.com>
21115
21116        <rdar://problem/10960903> Include Network timeline graph in the network data grid
21117
21118        Improve the header display to only show dividers within the visible range.
21119        Now, when we show dividers in that range, the first divider always has a left
21120        border, and the last divider only does when that column is not the active sort.
21121
21122        Reviewed by Timothy Hatcher.
21123
21124        * UserInterface/NetworkDataGrid.css:
21125        (.network-timeline-decorations > .header > .divider:last-child):
21126        (.network-timeline-decorations:not(.sort-active) > .header > .divider:last-child):
21127        * UserInterface/NetworkDataGrid.js:
21128        (WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
21129        * UserInterface/TimelineDecorations.js:
21130        (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
21131
211322012-03-07  Joseph Pecoraro  <pecoraro@apple.com>
21133
21134        <rdar://problem/10960903> Include Network timeline graph in the network data grid
21135
21136        Changing the sort column might not be enough of a size difference to
21137        cause the headers to refresh. Force a refresh in this case.
21138
21139        Reviewed by Timothy Hatcher.
21140
21141        * UserInterface/NetworkDataGrid.js:
21142        (WebInspector.NetworkDataGrid.prototype._sortChanged):
21143        (WebInspector.NetworkDataGrid.prototype._updateDecorations):
21144        (WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
21145        * UserInterface/TimelineDecorations.js:
21146        (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
21147
211482012-03-07  Joseph Pecoraro  <pecoraro@apple.com>
21149
21150        <rdar://problem/10960903> Include Network timeline graph in the network data grid
21151
21152        The NetworkDataGrid's timeline graph should only show header
21153        values when its "details" columns are collapsed. Give
21154        TimelineDecorations a way to hide header times.
21155
21156        Reviewed by Timothy Hatcher.
21157
21158        * UserInterface/NetworkDataGrid.js:
21159        (WebInspector.NetworkDataGrid):
21160        (WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
21161        Hide / show the header dividers when columns are collapsed / expanded.
21162
21163        * UserInterface/TimelineDecorations.js:
21164        (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
21165        (WebInspector.TimelineDecorations.prototype.isShowingHeaderDividers):
21166        (WebInspector.TimelineDecorations.prototype.showHeaderDividers):
21167        (WebInspector.TimelineDecorations.prototype.hideHeaderDividers):
21168        Hide / show the header dividers by applying the "hidden" class to the headerElement.
21169
211702012-03-07  Joseph Pecoraro  <pecoraro@apple.com>
21171
21172        <rdar://problem/10960903> Include Network timeline graph in the network data grid
21173
21174        Give the NetworkDataGrid timeline TimelineDecorations. We want to
21175        make sure that the header labels don't overlap the column header
21176        "Timeline" on the left or sort / collapse columns button on the right.
21177
21178        Reviewed by Timothy Hatcher.
21179
21180        * UserInterface/DataGrid.js:
21181        (WebInspector.DataGrid.prototype._clickInHeaderCell):
21182        (WebInspector.DataGrid.prototype._sortChanged):
21183        (WebInspector.DataGrid.prototype.isColumnSortColumn):
21184        Expose a way for a subclass to act on sort changes and check
21185        if a column is the active sort column.
21186
21187        * UserInterface/Main.html:
21188        * UserInterface/NetworkDataGrid.css: Added.
21189        (.network-timeline-decorations):
21190        (.network-timeline-decorations > .header):
21191        Give the network timeline decorations some specific styles because
21192        JavaScript will have to position the decorations.
21193
21194        * UserInterface/NetworkDataGrid.js:
21195        (WebInspector.NetworkDataGrid):
21196        (WebInspector.NetworkDataGrid.prototype.reset):
21197        (WebInspector.NetworkDataGrid.prototype.update):
21198        (WebInspector.NetworkDataGrid.prototype.updateWidths):
21199        (WebInspector.NetworkDataGrid.prototype._sortChanged):
21200        Update the timeline decorations whenever widths change or content changes.
21201
21202        (WebInspector.NetworkDataGrid.prototype._localizedTimelineHeaderWidth):
21203        (WebInspector.NetworkDataGrid.prototype._updateDecorations):
21204        (WebInspector.NetworkDataGrid.prototype._updateDecorationsPosition):
21205        (WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
21206        Position the header decorations over the timeline columns, and update the
21207        header times using our current calculator's bounds.
21208
21209        * UserInterface/TimelineDecorations.css:
21210        (.timeline-decorations):
21211        Allow clicking through all decorations, they are simply overlays.
21212
21213        * UserInterface/TimelineDecorations.js:
21214        (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
21215        Adjust for a left / right padding in which we won't let labels overflow into.
21216        This can be improved further by packing the labels just into the visible area.
21217
212182012-03-07  Joseph Pecoraro  <pecoraro@apple.com>
21219
21220        <rdar://problem/10960903> Include Network timeline graph in the network data grid
21221
21222        Make the timeline data grids share a common base class so we don't need
21223        to check for functions before calling them. Only the NetworkDataGrid
21224        has a graph right now and needs extra calls, other others are empty.
21225
21226        Reviewed by Timothy Hatcher.
21227
21228        * UserInterface/TimelinesContentView.js:
21229        (WebInspector.TimelinesContentView):
21230        (WebInspector.TimelinesContentView.prototype._recordingStarted):
21231        (WebInspector.TimelinesContentView.prototype._updatePendingRecords):
21232        (WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecords):
21233        No need to check if the DataGrid implements a function now.
21234        Also call update on the datagrid after we update records.
21235
21236        * UserInterface/TimelineDataGrid.js: Added.
21237        (WebInspector.TimelineDataGrid):
21238        (WebInspector.TimelineDataGrid.prototype.constructor.WebInspector.TimelinesDataGrid.get currentCalculator):
21239        (WebInspector.TimelineDataGrid.prototype.updateCalculatorBoundariesWithRecord):
21240        (WebInspector.TimelineDataGrid.prototype.updateCalculatorBoundariesWithDataGridNode):
21241        (WebInspector.TimelineDataGrid.prototype.reset):
21242        (WebInspector.TimelineDataGrid.prototype.update):
21243        Shared base class interface.
21244
21245        * UserInterface/NetworkDataGrid.js:
21246        (WebInspector.NetworkDataGrid):
21247        Extend from TimelineDataGrid instead of DataGrid directly.
21248
212492012-03-07  Joseph Pecoraro  <pecoraro@apple.com>
21250
21251        <rdar://problem/10960903> Include Network timeline graph in the network data grid
21252
21253        Refactor the display of timeline headers into a separate file.
21254        This currently handles drawing the header dividers, but will
21255        also manage event markers (DOMContent and onload events).
21256
21257        Reviewed by Timothy Hatcher.
21258
21259        * UserInterface/Main.html:
21260        * UserInterface/TimelineOverview.css:
21261        * UserInterface/TimelineDecorations.css: Added.
21262        (.timeline-decorations):
21263        (.timeline-decorations > .header):
21264        (.timeline-decorations > .header > .divider):
21265        (.timeline-decorations > .header > .divider:last-child):
21266        (.timeline-decorations > .header > .divider > .label):
21267        (.timeline-decorations > .header > .divider:first-child > .label):
21268        Move timeline-overview header styles to timeline-decorations header styles.
21269
21270        * UserInterface/TimelineDecorations.js: Added.
21271        (WebInspector.TimelineDecorations):
21272        (WebInspector.TimelineDecorations.prototype.constructor.WebInspector.TimelineDecorations.get element):
21273        (WebInspector.TimelineDecorations.prototype.get headerElement):
21274        (WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
21275        Manage the header and dividers.
21276
21277        * UserInterface/TimelineOverview.js:
21278        (WebInspector.TimelineOverview):
21279        (WebInspector.TimelineOverview.prototype.clear):
21280        (WebInspector.TimelineOverview.prototype.update):
21281        (WebInspector.TimelineOverview.prototype.updateLayout):
21282        User the decorations class to draw headers over the timeline.
21283
212842012-03-07  Timothy Hatcher  <timothy@apple.com>
21285
21286        Install the Web Inspector user interface files in Production builds again.
21287
21288        <rdar://problem/10957655>
21289
21290        Reviewed by Joseph Pecoraro.
21291
21292        * Scripts/copy-user-interface-resources.sh: Removed early exit and FIXME comment.
21293
212942012-03-07  Timothy Hatcher  <timothy@apple.com>
21295
21296        Implement the TextEditor breakpoint delegates in WebInspector.TextResourceContentView.
21297
21298        Part of: <rdar://problem/10318770&10318777>
21299
21300        Reviewed by Brian Weinstein.
21301
21302        * UserInterface/TextResourceContentView.js:
21303        (WebInspector.TextResourceContentView.prototype.contentAvailable): Populate the breakpoint
21304        map by asking the DebuggerManager for all the breakpoints for this URL.
21305        (WebInspector.TextResourceContentView.prototype.textEditorBreakpointInfo): Added.
21306        (WebInspector.TextResourceContentView.prototype.textEditorBreakpointAdded): Added.
21307        (WebInspector.TextResourceContentView.prototype.textEditorBreakpointRemoved): Added.
21308        (WebInspector.TextResourceContentView.prototype.textEditorBreakpointMoved): Added.
21309        (WebInspector.TextResourceContentView.prototype.textEditorBreakpointToggled): Added.
21310
213112012-03-07  Timothy Hatcher  <timothy@apple.com>
21312
21313        Add the start of WebInspector.DebuggerManager.
21314
21315        Part of: <rdar://problem/10318770&10318777>
21316
21317        Reviewed by Brian Weinstein.
21318
21319        * UserInterface/DebuggerManager.js: Added.
21320        (WebInspector.DebuggerManager):
21321        (WebInspector.DebuggerManager.prototype.get breakpoints):
21322        (WebInspector.DebuggerManager.prototype.breakpointsForURL):
21323        (WebInspector.DebuggerManager.prototype.addBreakpoint):
21324        (WebInspector.DebuggerManager.prototype.removeBreakpoint):
21325        * UserInterface/Main.html: Incldued DebuggerManager.js.
21326        * UserInterface/Main.js:
21327        (WebInspector.contentLoaded): Create an instance of WebInspector.DebuggerManager.
21328
213292012-03-07  Timothy Hatcher  <timothy@apple.com>
21330
21331        Add WebInspector.Breakpoint.
21332
21333        Part of: <rdar://problem/10318770&10318777>
21334
21335        Reviewed by Joseph Pecoraro.
21336
21337        * UserInterface/Breakpoint.js: Added.
21338        (WebInspector.Breakpoint):
21339        (WebInspector.Breakpoint.prototype.get url):
21340        (WebInspector.Breakpoint.prototype.get lineNumber):
21341        (WebInspector.Breakpoint.prototype.set lineNumber):
21342        (WebInspector.Breakpoint.prototype.get inactive):
21343        (WebInspector.Breakpoint.prototype.set inactive):
21344        (WebInspector.Breakpoint.prototype.get disabled):
21345        (WebInspector.Breakpoint.prototype.set disabled):
21346        * UserInterface/Main.html: Included Breakpoint.js.
21347
213482012-03-06  Timothy Hatcher  <timothy@apple.com>
21349
21350        Support dragging breakpoints to move them to a new line or to delete them.
21351
21352        Part of: <rdar://problem/10318770&10318777>
21353
21354        Reviewed by Joseph Pecoraro.
21355
21356        * UserInterface/TextEditor.js:
21357        (WebInspector.TextEditor):
21358        (WebInspector.TextEditor.prototype._gutterElementMouseDown): Add a new breakpoint
21359        if the target does not already have one. Otherwise start tracking the existing
21360        breakpoint for dragging.
21361        (WebInspector.TextEditor.prototype._documentMouseMoved): Added.
21362        (WebInspector.TextEditor.prototype._documentMouseUp): Added.
21363        (WebInspector.TextEditor.prototype._gutterElementMouseUp): Only toggle on mouse up.
21364
213652012-03-06  Timothy Hatcher  <timothy@apple.com>
21366
21367        Make clicking on the line gutter create and toggle breakpoints.
21368
21369        Part of: <rdar://problem/10318770&10318777>
21370
21371        Reviewed by Joseph Pecoraro.
21372
21373        * UserInterface/TextEditor.js:
21374        (WebInspector.TextEditor): Added mouseup event listener.
21375        (WebInspector.TextEditor.prototype._gutterElementMouseUp): Added. Notifies the delegate to add
21376        or toggle a breakpoint when a line number if clicked.
21377
213782012-03-06  Timothy Hatcher  <timothy@apple.com>
21379
21380        Add initial support for displaying breakpoints.
21381
21382        Part of: <rdar://problem/10318770&10318777>
21383
21384        Reviewed by Joseph Pecoraro.
21385
21386        * UserInterface/Images/Breakpoint.png: Added.
21387        * UserInterface/Images/Breakpoint@2x.png: Added.
21388        * UserInterface/Images/BreakpointInactive.png: Added.
21389        * UserInterface/Images/BreakpointInactive@2x.png: Added.
21390        * UserInterface/TextEditor.css:
21391        (.text-editor > .gutter):
21392        (.text-editor > .gutter > .line-number.has-breakpoint):
21393        (.text-editor > .gutter > .line-number.has-breakpoint > .text):
21394        (.text-editor > .gutter > .line-number.has-breakpoint.breakpoint-disabled > .text):
21395        (.text-editor > .gutter > .line-number > .breakpoint):
21396        (.text-editor > .gutter > .line-number.breakpoint-inactive > .breakpoint):
21397        * UserInterface/TextEditor.js:
21398        (WebInspector.TextEditor.prototype._updateLineNumbers): Call _addBreakpointElementToLineElementWithInfo
21399        and _removePossibleBreakpointElementFromLineElement depending on the delegate result.
21400        (WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo): Added.
21401        (WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement): Added.
21402
214032012-03-06  Mark Rowe  <mrowe@apple.com>
21404
21405        <rdar://problem/10873285> Make WebInspector.framework work with staged frameworks
21406
21407        Install WebInspector.framework in /System/Library/StagedFrameworks/Safari when USE_STAGING_INSTALL_PATH is set to YES.
21408
21409        Reviewed by Dan Bernstein.
21410
21411        * Configurations/WebInspectorFramework.xcconfig:
21412
214132012-03-06  Joseph Pecoraro  <pecoraro@apple.com>
21414
21415        Share duplicated code to get a display name for a node.
21416
21417        Reviewed by Timothy Hatcher.
21418
21419        * UserInterface/DOMTreeElementPathComponent.js:
21420        (WebInspector.DOMTreeElementPathComponent):
21421        * UserInterface/DOMUtilities.js:
21422        (WebInspector.displayNameForNode):
21423        * UserInterface/Main.html:
21424
214252012-03-06  Joseph Pecoraro  <pecoraro@apple.com>
21426
21427        <rdar://problem/10989550> Inspector should hide docking button when undocked and not allowed to dock (78575)
21428
21429        Reviewed by Timothy Hatcher.
21430
21431        * UserInterface/ButtonNavigationItem.js:
21432        (WebInspector.ButtonNavigationItem.prototype.get hidden):
21433        (WebInspector.ButtonNavigationItem.prototype.set hidden):
21434        Allow a button navigation item to be hidden.
21435
21436        * UserInterface/InspectorFrontendAPI.js:
21437        (InspectorFrontendAPI.setDockingAvailable):
21438        * UserInterface/Main.js:
21439        (WebInspector.contentLoaded):
21440        (WebInspector.updateDockedState):
21441        (WebInspector.setDockingAvailable):
21442        (WebInspector._updateDockToggleButtonVisibility):
21443        Update the dock toggle button's visibility when it is created,
21444        when the attached state changes, or when availability changes.
21445
214462012-03-05  Timothy Hatcher  <timothy@apple.com>
21447
21448        Add WebInspector.BreakpointSidebarPanel and WebInspector.DebugSidebarPanel.
21449
21450        Start of: <rdar://problem/10318770&10318777>
21451
21452        Reviewed by Brian Weinstein.
21453
21454        * UserInterface/BreakpointSidebarPanel.js: Added.
21455        (WebInspector.BreakpointSidebarPanel):
21456        * UserInterface/DebugSidebarPanel.js: Added.
21457        (WebInspector.DebugSidebarPanel):
21458        * UserInterface/Main.html: Included BreakpointSidebarPanel.js and DebugSidebarPanel.js.
21459        * UserInterface/Main.js:
21460        (WebInspector.contentLoaded): Use BreakpointSidebarPanel and DebugSidebarPanel classes.
21461
214622012-03-05  Joseph Pecoraro  <pecoraro@apple.com>
21463
21464        Follow-up and remove unnecessary outline:none from specific
21465        data-grids now that this style is the default.
21466
21467        * UserInterface/ApplicationCacheFrameContentView.css:
21468        (.content-view.application-cache-frame > .data-grid):
21469        * UserInterface/CookieStorageContentView.css:
21470        (.content-view.cookie-storage > .data-grid):
21471        * UserInterface/DatabaseTableContentView.css:
21472        (.content-view.database-table > .data-grid):
21473        * UserInterface/DetailsSection.css:
21474
214752012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21476
21477        WebSQL Database inline data grids should not have an outline
21478        when clicked on. The data grid can keep its tabindex, but
21479        just remove the outline when its focused.
21480
21481        Reviewed by Brian Weinstein.
21482
21483        * UserInterface/DataGrid.css:
21484        (.data-grid):
21485
214862012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21487
21488        Format the Cookie size column using standard size representations.
21489
21490        Reviewed by Brian Weinstein.
21491
21492        * UserInterface/CookieStorageContentView.js:
21493        (WebInspector.CookieStorageContentView.prototype._rebuildTable):
21494
214952012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21496
21497        <rdar://problem/10982421> Event Listeners section flashes when switching between nodes
21498
21499        We no longer need to resolve the node, since the Safari frontend
21500        doesn't show an ObjectProperties tree. We already have all the
21501        information we need in the eventListener callback. Removing this
21502        async call removes the flashing.
21503
21504        Reviewed by Timothy Hatcher.
21505
21506        * UserInterface/DOMNodeDetailsSidebarPanel.js:
21507        * UserInterface/EventListenerSectionGroup.js:
21508        (WebInspector.EventListenerSectionGroup):
21509
215102012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21511
21512        We should save state the expanded/collapsed state of different event types.
21513        Just default to having them collapsed and save the state when they are expanded.
21514
21515        Rubber-stamped by Timothy Hatcher.
21516
21517        * UserInterface/DetailsSection.js:
21518        (WebInspector.DetailsSection):
21519        * UserInterface/EventListenerSection.js:
21520        (WebInspector.EventListenerSection):
21521
215222012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21523
21524        Don't linkify EventListeners without a URL.
21525
21526        This can happen for EventListeners added through the Inspector's console.
21527
21528        Reviewed by Timothy Hatcher.
21529
21530        * UserInterface/EventListenerSectionGroup.js:
21531        (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
21532
215332012-03-04  Timothy Hatcher  <timothy@apple.com>
21534
21535        Hook up the Start Timeline Recording Develop menu items.
21536
21537        Reviewed by Brian Weinstein.
21538
21539        * UserInterface/InspectorFrontendAPI.js:
21540        (InspectorFrontendAPI.isTimelineProfilingEnabled): Return WebInspector.timelineManager.recording.
21541        (InspectorFrontendAPI.setTimelineProfilingEnabled): Show the Instrument panel and timeline, then start recording.
21542        * UserInterface/Main.js:
21543        (WebInspector.contentLoaded): Only load the last content view if InspectorFrontendAPI didn't show one.
21544        * UserInterface/TimelineManager.js:
21545        (WebInspector.TimelineManager.prototype._mainResourceDidChange): Ignore resource events when there isn't a main frame yet.
21546        (WebInspector.TimelineManager.prototype._resourceWasAdded): Ditto.
21547
215482012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21549
21550        <rdar://problem/10981986> Back button should be enabled when link causes a switch between "DOM Tree" and "Source Code"
21551
21552        Update the back/forward buttons when the path components change.
21553
21554        Reviewed by Timothy Hatcher.
21555
21556        * UserInterface/ContentBrowser.js:
21557        (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
21558
215592012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21560
21561        Rename WebInspector.domAgent -> WebInspector.domTreeManager.
21562        This code is currently unreachable.
21563
21564        Reviewed by Brian Weinstein and Timothy Hatcher.
21565
21566        * UserInterface/ObjectPropertiesSection.js:
21567        (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
21568
215692012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21570
21571        <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
21572
21573        Make node name's in the EventListener section links that jump to
21574        that node. Also, when hovering the node it highlights on the page.
21575
21576        Reviewed by Timothy Hatcher.
21577
21578        * UserInterface/DOMUtilites.js: Added.
21579        (WebInspector.displayNameForNode):
21580        (WebInspector.linkifyNodeReference):
21581        Copied from OpenSource's DOMPresentationUtils.js, updated for the new
21582        frontend, and remove unused code.
21583
21584        * UserInterface/EventListenerSectionGroup.js:
21585        (WebInspector.EventListenerSectionGroup.prototype._nodeTextOrLink):
21586        Use the DOMUtilities method to linkify the node.
21587
21588        * UserInterface/Main.html:
21589        * UserInterface/Main.css:
21590        (.node-link):
21591
215922012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21593
21594        <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
21595
21596        Add event listener information to the DOM Node Details Sidebar panel.
21597
21598        Reviewed by Timothy Hatcher.
21599
21600        * UserInterface/DOMNodeDetailsSidebarPanel.js:
21601        (WebInspector.DOMNodeDetailsSidebarPanel):
21602        (WebInspector.DOMNodeDetailsSidebarPanel.prototype.constructor.WebInspector.DOMNodeDetailsSidebarPanel.refresh):
21603        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback):
21604        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners):
21605        Add a new "Event Listeners" Section and refresh it when the selected node changes.
21606        Each row in this section is an EventListenerSection.
21607
21608        * UserInterface/DetailsSection.css:
21609        (.details-section .details-section > .header):
21610        Style a nested details section to be gray.
21611
21612        * UserInterface/DetailsSection.js:
21613        (WebInspector.DetailsSection):
21614        Take an extra parameter in the Constructor to avoid saving collapsed states.
21615        EventListener event type sections will always start out collapsed.
21616
21617        * UserInterface/EventListenerSection.js: Added.
21618        (WebInspector.EventListenerSection):
21619        (WebInspector.EventListenerSection.prototype.constructor.WebInspector.EventListenerSection.addListener):
21620        EventListenerSection is a specific event type, and contains a group for each listener.
21621
21622        * UserInterface/EventListenerSectionGroup.js: Added.
21623        (WebInspector.EventListenerSectionGroup):
21624        (WebInspector.EventListenerSectionGroup.prototype.constructor.WebInspector.EventListenerSectionGroup.update.updateWithNodeObject):
21625        (WebInspector.EventListenerSectionGroup.prototype.constructor.WebInspector.EventListenerSectionGroup.update):
21626        (WebInspector.EventListenerSectionGroup.prototype._nodeTextOrLink):
21627        (WebInspector.EventListenerSectionGroup.prototype._type):
21628        (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
21629        Each listener displays a few rows of information about it. Go-to arrow
21630        links are provided to jump to the function.
21631
21632        * UserInterface/EventListenerSectionGroup.css: Added.
21633        (.event-listener-section > .content > .group > .row.simple > .value .go-to-arrow):
21634        (.event-listener-section > .content > .group > .row.simple > .value):
21635        Style the simple row in the section to play nicely with resizing and the go-to arrow.
21636
21637        * Localizations/en.lproj/localizedStrings.js:
21638        * UserInterface/Main.html:
21639        Add new strings and files.
21640
216412012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21642
21643        <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
21644
21645        Rename the DOM Node sidebar's Properties object group and make sure
21646        to release it when its no longer needed. There will be a separate
21647        object group for Event Listeners.
21648
21649        Reviewed by Timothy Hatcher.
21650
21651        * UserInterface/DOMNodeDetailsSidebarPanel.js:
21652        (WebInspector.DOMNodeDetailsSidebarPanel):
21653
216542012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21655
21656        Add missing Copyright entires to the pre-built License.
21657
21658        Reviewed by Damian Kaleta.
21659
21660        * Scripts/copy-user-interface-resources.sh:
21661
216622012-03-04  Joseph Pecoraro  <pecoraro@apple.com>
21663
21664        Fix outline around previously edited DOM element attribute.
21665
21666        When editing, the tabIndex attribute of the element is set
21667        to 0 and restored to the old value after editing. In most cases
21668        the previous value was unset, which returns -1. When cleaning
21669        up elem.tabIndex = -1 was actually keeping around the tabIndex
21670        attribute and giving the element an outline when clicked once
21671        and receiving :focus.
21672
21673        Instead of restoring the tabIndex to -1, just remove the
21674        tabIndex attribute and avoid its associated focus behavior.
21675
21676        Reviewed by Timothy Hatcher.
21677
21678        * UserInterface/EditingSupport.js:
21679        (WebInspector.startEditing.cleanUpAfterEditing):
21680
216812012-03-04  Brian Weinstein  <bweinstein@apple.com>
21682
21683        Part of <rdar://problem/10981607> CSS and JavaScript profiles need a way to toggle between absolute times and percentages.
21684        
21685        The CSS selector profile code had the ability to switch from percentages to time when the
21686        user double clicks an element in the "Total" column.
21687        
21688        However, we were accessing a WebInspector setting the wrong way.
21689
21690        Reviewed by Tim Hatcher.
21691
21692        * UserInterface/CSSSelectorProfileView.js:
21693        (WebInspector.CSSSelectorProfileView.prototype._mouseDownInDataGrid): Access the WebInspector setting the right way.
21694
216952012-03-04  Brian Weinstein  <bweinstein@apple.com>
21696
21697        Have ConsoleMessageImpl and ProfileDataGridTree use WebInspector.linkifyURLAsNode instead of
21698        using their own custom code to do the same thing.
21699
21700        Reviewed by Tim Hatcher.
21701
21702        * UserInterface/ConsoleMessageImpl.js:
21703        (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): Call WebInspector.linkifyURLAsNode.
21704        * UserInterface/ProfileDataGridTree.js:
21705        (WebInspector.ProfileDataGridNode.prototype._linkifyLocation): Ditto.
21706
217072012-03-04  Brian Weinstein  <bweinstein@apple.com>
21708
21709        Hook up the links in the CSS selector profile view.
21710        
21711        Rest of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
21712
21713        Reviewed by Tim Hatcher.
21714
21715        * UserInterface/CSSSelectorProfileView.js:
21716        (WebInspector.CSSSelectorDataGridNode.prototype.createCell): Pass the line number to WebInspector.linkifyURLAsNode.
21717        (WebInspector.CSSSelectorProfileView): Add a click event listener.
21718        (WebInspector.CSSSelectorProfileView.prototype._mouseWasClicked): Call WebInspector.openURL on the clicked link.
21719        * UserInterface/Main.js:
21720        (WebInspector.linkifyURLAsNode): Set the link's lineNumber property to be the passed in line number.
21721
217222012-03-04  Brian Weinstein  <bweinstein@apple.com>
21723
21724        Make the columns in all DataGrids resizable.
21725        
21726        This fixes:
21727        - JavaScript profile views
21728        - CSS selector profile views
21729        - Application cache views.
21730
21731        Reviewed by Tim Hatcher.
21732
21733        * UserInterface/ApplicationCacheFrameContentView.js:
21734        (WebInspector.ApplicationCacheFrameContentView.prototype.updateLayout):
21735        * UserInterface/CSSSelectorProfileView.js:
21736        (WebInspector.CSSSelectorProfileView.prototype.updateLayout):
21737        * UserInterface/JavaScriptProfileView.js:
21738        (WebInspector.JavaScriptProfileView.prototype.updateLayout):
21739
217402012-03-04  Brian Weinstein  <bweinstein@apple.com>
21741
21742        Rename some functions to make them more clear that they are for JavaScript.
21743
21744        Reviewed by Tim Hatcher.
21745
21746        * UserInterface/ProfileManager.js:
21747        (WebInspector.ProfileManager.prototype.addJavaScriptProfile): Renamed from addProfile.
21748        (WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile): Renamed from setRecordingProfile.
21749        * UserInterface/ProfilerObserver.js:
21750        (WebInspector.ProfilerObserver.prototype.addProfileHeader): Update for naming.
21751        (WebInspector.ProfilerObserver.prototype.setRecordingProfile): Ditto.
21752
217532012-03-04  Brian Weinstein  <bweinstein@apple.com>
21754
21755        Implement the recording of CSS selector profiles, and have them show up in the inspector and be
21756        selectable.
21757        
21758        There are a few loose ends to clean up after this patch.
21759        
21760        - Some renames in ProfileManager.
21761        - Make link clicking work in CSS selector profiles.
21762
21763        More of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
21764
21765        Reviewed by Tim Hatcher.
21766
21767        * Localizations/en.lproj/localizedStrings.js: Updated localized strings
21768
21769        * UserInterface/CSSSelectorProfileType.js:
21770        (WebInspector.CSSSelectorProfileType.prototype.nextProfileId): Returns the available profile ID.
21771        (WebInspector.CSSSelectorProfileType.prototype.startRecordingProfile): Don't call anything in the profiles panel.
21772        (WebInspector.CSSSelectorProfileType.prototype.stopRecordingProfile): Remove the callback that creates a profile
21773            header.
21774
21775        * UserInterface/ContentView.js:
21776        (WebInspector.ContentView): Change ProfileObject to JavaScriptProfileObject and add a case for CSSSelectorProfileObject.
21777        (WebInspector.ContentView.isViewable): Ditto.
21778
21779        * UserInterface/InstrumentSidebarPanel.js:
21780        (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedOver): Check the CSS selector case.
21781        (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedDown): Ditto.
21782        (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphClicked): Ditto.
21783        (WebInspector.InstrumentSidebarPanel.prototype._profileTypeWasSelected): Ditto.
21784
21785        * UserInterface/JavaScriptProfileView.js: Change the assert.
21786
21787        * UserInterface/Main.html: Add new files.
21788
21789        * UserInterface/ProfileManager.js:
21790        (WebInspector.ProfileManager): Create a CSS selector profile type.
21791        (WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Clear the recording CSS
21792            selector profile.
21793        (WebInspector.ProfileManager.prototype.isProfilingCSSSelectors): Returns whether or not we are recording a CSS selector
21794            profile.
21795        (WebInspector.ProfileManager.prototype.startProfilingCSSSelectors): Start recording a CSS selector profile, and create
21796            a WebInspector.CSSSelectorProfileObject, and send an event to tell the instrument sidebar panel about it.
21797        (WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors): Stop recording the CSS selector profile, and in the
21798            callback for when the profile finished, update the information about the CSS selector profile and tell the instrument
21799            sidebar that the profile was updated.
21800        (WebInspector.ProfileManager.prototype.addProfile): Create a JavaScriptProfileObject instead of a ProfileObject.
21801        (WebInspector.ProfileManager.prototype.setRecordingProfile): Ditto.
21802
218032012-03-04  Brian Weinstein  <bweinstein@apple.com>
21804
21805        Add subclasses of ProfileObject for CSS Selector profile and JavaScript profiles. They are not used anywhere,
21806        but they will be to be able to differentiate between the two types of profiles.
21807        
21808        It also gives us a way to store the CSS selector profile data on the CSSSelectorProfileObject.
21809
21810        Reviewed by Tim Hatcher.
21811
21812        * UserInterface/CSSSelectorProfileObject.js: Added.
21813        (WebInspector.CSSSelectorProfileObject):
21814        (WebInspector.CSSSelectorProfileObject.prototype.constructor.WebInspector.CSSSelectorProfileObject.get data): Returns
21815            the data.
21816        (WebInspector.CSSSelectorProfileObject.prototype.set data): Sets the data.
21817        (WebInspector.CSSSelectorProfileObject.prototype.get totalTime): Returns the total time.
21818        (WebInspector.CSSSelectorProfileObject.prototype.set totalTime): Sets the total time.
21819        * UserInterface/JavaScriptProfileObject.js: Added.
21820        (WebInspector.JavaScriptProfileObject):
21821        * UserInterface/Main.html: Add new files
21822
218232012-03-04  Brian Weinstein  <bweinstein@apple.com>
21824
21825        Fix some issues in CSSSelectorProfileView.js to get it running with the new inspector.
21826        
21827        This patch changes the superclass from View -> ContentView, removes instances of the percent button,
21828        and changes *styleClass -> classList.*.
21829
21830        More of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
21831
21832        Reviewed by Tim Hatcher.
21833
21834        * UserInterface/CSSSelectorProfileView.js:
21835        (WebInspector.CSSSelectorDataGridNode.prototype.get data): Switch the format of a setting.
21836        (WebInspector.CSSSelectorDataGridNode.prototype.createCell): Use linkifyURLAsNode instead of 
21837            linkifyResourceAsNode (which we don't have).
21838        (WebInspector.CSSSelectorProfileView): Add an assert, change our superclass type, update the
21839            setting syntax, and call updateWidths on the data grid.
21840        (WebInspector.CSSSelectorProfileView.prototype.refreshShowAsPercents): Use classList.contains.
21841
218422012-03-02  Brian Weinstein  <bweinstein@apple.com>
21843
21844        Bring in some files from open source.
21845        
21846        More of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
21847
21848        Rubber-stamped by Jing Jin.
21849
21850        * UserInterface/CSSSelectorProfileType.js: Added. Moved from CSSSelectorProfileView.js to its own file.
21851        * UserInterface/CSSSelectorProfileView.js: Added. Copied from open source.
21852
218532012-03-02  Brian Weinstein  <bweinstein@apple.com>
21854
21855        Turn the glyph that starts profiles in the inspector into a select with two options.
21856        
21857        - Start JavaScript Profiling
21858        - Start CSS Profiling
21859        
21860        JavaScript profiling uses the same codepath as before, and CSS profiling isn't hooked up
21861        yet, but will be in future patches.
21862
21863        Start of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
21864
21865        Reviewed by Tim Hatcher.
21866
21867        * Localizations/en.lproj/localizedStrings.js: Update localized strings.
21868
21869        * UserInterface/InstrumentSidebarPanel.css:
21870        (.sidebar > .panel.instrument > .title-bar > .record-glyph): Add some additional rules so
21871            this style works for a select and a div.
21872
21873        * UserInterface/InstrumentSidebarPanel.js:
21874        (WebInspector.InstrumentSidebarPanel): Change _recordProfileGlyphElement to a select, and add
21875            options to it.
21876        (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedDown): Clear any selection
21877            the select might have had, and prevent opening the select if we are stopping a profile.
21878        (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphClicked): Return early if we are
21879            ignoring this click.
21880        (WebInspector.InstrumentSidebarPanel.prototype._profileTypeWasSelected): Start a JavaScript profile
21881            if that was the user's selection, and add a FIXME for starting a CSS profile.
21882
218832012-03-04  Timothy Hatcher  <timothy@apple.com>
21884
21885        Strike out all properties that did not parse correctly.
21886
21887        The broken case is if you use: background: -webkit-linear-gradient(...);
21888        and background: -moz-linear-gradient(...) in the same rule. Before they
21889        would both be shown normal (except for the warning icon on the -moz line),
21890        now the -moz property is also striked out.
21891
21892        Reviewed by Brian Weinstein.
21893
21894        * UserInterface/CSSStyleDetailsSidebarPanel.css: Added not-parsed-ok to the
21895        rule that adds text-decoration: line-through to properties.
21896
218972012-03-04  Timothy Hatcher  <timothy@apple.com>
21898
21899        Syntax highlight values in the Style details sidebar.
21900
21901        Reviewed by Brian Weinstein.
21902
21903        * UserInterface/StylePropertyTreeElement.js:
21904        (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor): Call numberProcessor instead
21905        of directly making text nodes for unknown colors and color values.
21906        (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processKeyword): Added.
21907        (WebInspector.StylePropertyTreeElement.prototype.updateTitle.processSimpleSyntax): Added.
21908        (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Add new processors for strings, numbers, and keywords.
21909
219102012-03-03  Brian Weinstein  <bweinstein@apple.com>
21911
21912        <rdar://problem/10977869> Profile Link in Log View doesn't jump to Profile in Instruments View.
21913        
21914        Give WebInspector.openURL the ability to open URLs with the webkit-profile scheme.
21915
21916        Reviewed by Tim Hatcher.
21917
21918        * UserInterface/InstrumentSidebarPanel.js:
21919        (WebInspector.InstrumentSidebarPanel.prototype.showProfile): Look over the tree elements for one with
21920            a profile with the matching title and type, and show it.
21921        * UserInterface/Main.js:
21922        (WebInspector.openURL): If the URL has the webkit-profile scheme, call InstrumentSidebarPanel.showProfile.
21923        * UserInterface/ProfileType.js: Add a constant for "webkit-profile".
21924
219252012-03-03  Timothy Hatcher  <timothy@apple.com>
21926
21927        Hide the DOM node highlight when the DOM tree content view is hidden.
21928
21929        Reviewed by Dan Bernstein.
21930
21931        * UserInterface/DOMTreeContentView.js:
21932        (WebInspector.DOMTreeContentView.prototype.hidden): Call WebInspector.domTreeManager.hideDOMNodeHighlight().
21933
219342012-03-03  Timothy Hatcher  <timothy@apple.com>
21935
21936        Reduce flashing in the details sidebar when switching content views.
21937
21938        This makes sure to fire the represented objects did change event immediately after the content
21939        view changes so the sidebar updates at the same time as the content view. This is especially important
21940        if the sidebar is auto showing or hiding.
21941
21942        Reviewed by Dan Bernstein.
21943
21944        * UserInterface/ContentBrowser.js:
21945        (WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon):
21946        Use _dispatchCurrentRepresentedObjectsDidChangeEvent instead of a nested function.
21947        (WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent): Added.
21948        Clears the timeout if there is one pending.
21949        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call _dispatchCurrentRepresentedObjectsDidChangeEvent
21950        instead of _dispatchCurrentRepresentedObjectsDidChangeEventSoon.
21951
219522012-03-03  Timothy Hatcher  <timothy@apple.com>
21953
21954        Auto hide the details sidebar when empty if the user closed it when empty.
21955
21956        The details sidebar will show again when switching to a content view that has sidebar panels to show.
21957        If the user shows the sidebar when empty it will not auto hide anymore. If the user hides the sidebar
21958        when it isn't empty it will stay hidden until manually shown.
21959
21960        Reviewed by Dan Bernstein.
21961
21962        * UserInterface/Main.js:
21963        (WebInspector.contentLoaded): Added setting.
21964        (WebInspector._sidebarCollapsedStateDidChange): Update setting based on collapsed state and sidebar panel count.
21965        (WebInspector._contentBrowserRepresentedObjectsDidChange): Show or hide the details sidebar when the sidebar
21966        panel count changes.
21967
219682012-03-03  Timothy Hatcher  <timothy@apple.com>
21969
21970        Add the "Show All" checkbox to the Computed Style section header.
21971
21972        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
21973
21974        Reviewed by Brian Weinstein.
21975
21976        * Localizations/en.lproj/localizedStrings.js: Updated.
21977        * UserInterface/CSSStyleDetailsSidebarPanel.css:
21978        (.sidebar > .panel.details.css-style .styles-section .properties li): Clean up to better align the text.
21979        (.sidebar > .panel.details.css-style .styles-section.read-only .properties > li): Ditto.
21980        (.sidebar > .panel.details.css-style .styles-section.computed-style .properties .inherited): Fixed to work.
21981        (.sidebar > .panel.details.css-style .details-section.show-all .styles-section.computed-style .properties .inherited): Ditto.
21982        * UserInterface/CSSStyleDetailsSidebarPanel.js:
21983        (WebInspector.CSSStyleDetailsSidebarPanel): Create the checkbox and label.
21984        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._computedStyleShowAllCheckboxValueChanged): Added. Toggle the setting
21985        and show-all class on the computed style section.
21986        * UserInterface/DetailsSection.css:
21987        (.details-section > .header:not(.mouse-over-options-element):active::before): Don't show active if the options element is.
21988        (.details-section.collapsed > .header:not(.mouse-over-options-element):active::before): Ditto.
21989        (.details-section > .header > label): Added. Generic support for a label and checkbox.
21990        (.details-section.collapsed  > .header > label): Ditto.
21991        (.details-section > .header > label > input[type="checkbox"]): Ditto.
21992        * UserInterface/DetailsSection.js:
21993        (WebInspector.DetailsSection): Make a title element span so it can be updated separately. Append the options element.
21994        (WebInspector.DetailsSection.prototype.get title): Use the title element.
21995        (WebInspector.DetailsSection.prototype.set title): Ditto.
21996        (WebInspector.DetailsSection.prototype._headerElementClicked): Return early if it is within the options element.
21997        (WebInspector.DetailsSection.prototype._optionsElementMouseDown): Added. Add the mouse-over-options-element class.
21998        (WebInspector.DetailsSection.prototype._optionsElementMouseUp): Added. Remove the mouse-over-options-element class.
21999
220002012-03-03  Brian Weinstein  <bweinstein@apple.com>
22001
22002        <rdar://problem/10979339> Links in Log and Profile content views don't take you to the correct line
22003
22004        r41258 added the ability to jump to a certain line number when opening a resource
22005        in the inspector by setting the lineNumber property on the link element that will
22006        be clicked.
22007        
22008        Adopt this for JavaScript profiles and the Log content view. 
22009
22010        Reviewed by Tim Hatcher.
22011
22012        * UserInterface/ConsoleMessageImpl.js:
22013        (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): Set the line number of the link
22014            element.
22015        * UserInterface/JavaScriptProfileView.js:
22016        (WebInspector.JavaScriptProfileView): Add a mouse listener.
22017        (WebInspector.JavaScriptProfileView.prototype._mouseWasClicked): Call WebInspector.openURL.
22018        * UserInterface/LogContentView.js:
22019        (WebInspector.LogContentView.prototype._mouseWasClicked): Get the line number from the link
22020            element and pass that line number to WebInspector.openURL.
22021        * UserInterface/ProfileDataGridTree.js:
22022        (WebInspector.ProfileDataGridNode.prototype._linkifyLocation): Set the line number of the
22023            link element.
22024
220252012-03-03  Timothy Hatcher  <timothy@apple.com>
22026
22027        Make $0..$9 work in the new Web Inspector's console.
22028
22029        Reviewed by Joseph Pecoraro.
22030
22031        * UserInterface/DOMTreeContentView.js:
22032        (WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange): Call ConsoleAgent.addInspectedNode
22033        when the selected DOM node changes.
22034
220352012-03-03  Joseph Pecoraro  <pecoraro@apple.com>
22036
22037        <rdar://problem/10960903> Include Network timeline graph in the network data grid
22038
22039        When we need to refresh all of the rows, we need to make a copy of the
22040        children array, because the children array gets resorted as the rows
22041        are updated.
22042
22043        Reviewed by Timothy Hatcher.
22044
22045        * UserInterface/TimelinesContentView.js:
22046        (WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds):
22047
220482012-03-03  Joseph Pecoraro  <pecoraro@apple.com>
22049
22050        <rdar://problem/10960903> Include Network timeline graph in the network data grid
22051
22052        Tweak to prevent hiding a few of the rows on either end of the
22053        visible bounds. This makes scrolling feel a little bit nicer.
22054
22055        Reviewed by Timothy Hatcher.
22056
22057        * UserInterface/TimelinesContentView.js:
22058        (WebInspector.TimelinesContentView.prototype._updateOffscreenRows):
22059
220602012-03-03  Joseph Pecoraro  <pecoraro@apple.com>
22061
22062        <rdar://problem/10960903> Include Network timeline graph in the network data grid
22063
22064        Style the collapse-button and divider.
22065
22066        Reviewed by Timothy Hatcher.
22067
22068        * UserInterface/DataGrid.css:
22069        (.data-grid th.sortable:not(.mouse-over-collapser):active):
22070        (.data-grid th.sortable.sort-ascending:not(.mouse-over-collapser):active, .data-grid th.sortable.sort-descending:not(.mouse-over-collapser):active):
22071        When the collapse-button is moused over, we shouldn't apply the :active
22072        style to the entire table header cell when its clicked, because the
22073        user will be clicking on the collapser-button.
22074
22075        * UserInterface/TimelinesContentView.css:
22076        (.content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
22077        (.content-view.timelines > .data-grid th.collapser):
22078        (.content-view.timelines > .data-grid th.collapser > .divider):
22079        (.content-view.timelines > .data-grid th.collapser > .collapser-button):
22080        (.content-view.timelines > .data-grid th.collapser > .collapser-button:active):
22081        (.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button):
22082        (.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button:active):
22083        (.content-view.timelines > .data-grid th.sort-descending.collapser > div:first-child):
22084        Style the button to the far right. Adjust the sort indicator
22085        to be the left of the collapse-button and divider.
22086
22087        * UserInterface/TimelinesContentView.js:
22088        (WebInspector.TimelinesContentView):
22089        (WebInspector.TimelinesContentView.generateEmbossedCollapseImages.canvasIdentifier):
22090        (WebInspector.TimelinesContentView.generateEmbossedCollapseImages):
22091        Generate embossed images once for all Timeline DataGrids.
22092
22093        * UserInterface/DataGrid.js:
22094        (WebInspector.DataGrid.prototype._mouseoverColumnCollapser):
22095        (WebInspector.DataGrid.prototype._mouseoutColumnCollapser):
22096        Add a class to the <th> so that the :active highlight won't take
22097        affect when the user clicks the collapser button, but does when
22098        the user clicks on the test of the header cell.
22099
22100        * UserInterface/ImageUtilities.js:
22101        (generateEmbossedImages._imageLoaded):
22102        Make the Focus state optional, and don't generate it if its not needed.
22103
22104        * UserInterface/Images/LessColumns.pdf: Added.
22105        * UserInterface/Images/MoreColumns.pdf: Added.
22106        Images added for the collapse button.
22107
221082012-03-03  Joseph Pecoraro  <pecoraro@apple.com>
22109
22110        <rdar://problem/10960903> Include Network timeline graph in the network data grid
22111
22112        Move generating embossed canvas images into ImageUtilities so
22113        that it can be shared with DataGrid in the next part. This turns
22114        all self/this references into parameters.
22115
22116        Reviewed by Timothy Hatcher.
22117
22118        * UserInterface/ButtonNavigationItem.js:
22119        (WebInspector.ButtonNavigationItem.prototype._generateImages):
22120        * UserInterface/ImageUtilities.js:
22121        (generateEmbossedImages._imageLoaded):
22122        (generateEmbossedImages._createEmbossedCanvasImage):
22123        (generateEmbossedImages._drawImageShadow):
22124        (generateEmbossedImages._invertMaskImage):
22125        (generateEmbossedImages._applyImageMask):
22126        (generateEmbossedImages):
22127        * UserInterface/Main.html:
22128
221292012-03-03  Joseph Pecoraro  <pecoraro@apple.com>
22130
22131        <rdar://problem/10960903> Include Network timeline graph in the network data grid
22132
22133        Reviewed by Timothy Hatcher.
22134
22135        * UserInterface/DataGrid.css:
22136        (.data-grid th):
22137        When columns were collapsed down to width:0, the <th> content was overflowing.
22138        <td> already had overflow:hidden, so this just adds it to <th>.
22139
22140        (.data-grid th.sort-descending > div:first-child):
22141        (.data-grid th.sort-ascending > div:first-child::after):
22142        (.data-grid th.sort-descending > div:first-child::after):
22143        Now that a <th> may have multiple divs, specify that we want the
22144        sort indicator to show up after the first <div>, before the
22145        divider and collapse-button.
22146
22147        * UserInterface/DataGrid.js:
22148        (WebInspector.DataGrid):
22149        (WebInspector.DataGrid.prototype.updateWidths):
22150        Move code into the block that was only used in the block.
22151
22152        (WebInspector.DataGrid.prototype.columnWidthsMap):
22153        (WebInspector.DataGrid.prototype.applyColumnWidthsMap):
22154        A brute force API to get / adjust all column widths.
22155
22156        (WebInspector.DataGrid.prototype._isColumnVisible):
22157        (WebInspector.DataGrid.prototype._showColumn):
22158        (WebInspector.DataGrid.prototype._hideColumn):
22159        (WebInspector.DataGrid.prototype._positionResizers):
22160        Rewrite to actually work. Setting a colgroup as hidden or display:none
22161        was actually ignoring the colgroup alltogether, breaking the normal
22162        colgroup[i] === column[i] relationship. Setting the width to 0 kept
22163        the relationship, and hides the column's contents.
22164
22165        (WebInspector.DataGrid.prototype._clickInHeaderCell):
22166        (WebInspector.NetworkDataGrid.prototype.willToggleColumnGroup):
22167        (WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
22168        Handle clicks on the collapser button. Run some optional subclass
22169        methods so state can be saved and so the column widths can be adjusted.
22170
22171        * UserInterface/NetworkDataGrid.js:
22172        (WebInspector.NetworkDataGrid.prototype.willToggleColumnGroup):
22173        (WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
22174        Handle toggling the column sizes. When collapsing, keep the "Name"
22175        field the same width that it was. But when expanding, just relayout
22176        back to whatever the original widths were.
22177
22178        * UserInterface/TimelinesContentView.js:
22179        (WebInspector.TimelinesContentView):
22180        Add rows to a "details" column group and specify a collapser.
22181
22182        * UserInterface/TimelinesContentView.css:
22183        (.content-view.timelines > .data-grid .column-group-details):
22184        Slightly dim the "details" column group.
22185
221862012-03-03  Joseph Pecoraro  <pecoraro@apple.com>
22187
22188        Update offscreen rows after sorting.
22189
22190        Reviewed by Timothy Hatcher.
22191
22192        * UserInterface/TimelinesContentView.js:
22193        (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid):
22194
221952012-03-03  Joseph Pecoraro  <pecoraro@apple.com>
22196
22197        Sorting the Network Timeline column should sort by resource
22198        response time, falling back to request time. Make this
22199        the default sort for the DataGrid.
22200
22201        Reviewed by Timothy Hatcher.
22202
22203        * UserInterface/ResourceTimelineDataGridNode.js:
22204        (WebInspector.ResourceTimelineDataGridNode.prototype.get data):
22205
222062012-03-03  Joseph Pecoraro  <pecoraro@apple.com>
22207
22208        Fix the Timeline Grid sizes for the RemoteDebugger. It looks
22209        as if this isn't needed anymore and actually displays poorly
22210        on 10.7.3 WebKit.
22211
22212        Reviewed by Timothy Hatcher.
22213
22214        * UserInterface/TimelinesContentView.css:
22215
222162012-03-03  Timothy Hatcher  <timothy@apple.com>
22217
22218        Don't move to editing the next property when pressing return/enter while editing a property value.
22219
22220        Pressing return/enter still moves to the value when you are editing the property name. If you want
22221        to edit the next property, that is what tab is for!
22222
22223        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22224
22225        Reviewed by Brian Weinstein.
22226
22227        * UserInterface/StylePropertyTreeElement.js:
22228        (WebInspector.StylePropertyTreeElement.prototype.editingNameValueKeyDown): Support a move direction of "none".
22229        (WebInspector.StylePropertyTreeElement.prototype.selectElement.editingCommitted): Don't call the moveToNextCallback
22230        if there is no moveDirection or moveDirection is "none".
22231
222322012-03-03  Timothy Hatcher  <timothy@apple.com>
22233
22234        Override TreeElement.ondblclick instead of having a separate dblclick listener in StylePropertyTreeElement.
22235
22236        Reviewed by Joseph Pecoraro.
22237
22238        * UserInterface/StylePropertyTreeElement.js:
22239        (WebInspector.StylePropertyTreeElement.prototype.onattach): Removed dblclick event listener.
22240        (WebInspector.StylePropertyTreeElement.prototype.ondblclick): Renamed from _startEditing.
22241
222422012-03-03  Timothy Hatcher  <timothy@apple.com>
22243
22244        Make URLs that go to the main resource of a frame open in the Web Inspector instead of in a new tab.
22245
22246        Reviewed by Joseph Pecoraro.
22247
22248        * UserInterface/Main.js:
22249        (WebInspector.openURL): Check frame.mainResource.url before calling frame.resourceForURL.
22250
222512012-03-02  Timothy Hatcher  <timothy@apple.com>
22252
22253        Fix an error that was showing in the console and prevented revalidation of styled when DOM attributes are removed.
22254
22255        Reviewed by Joseph Pecoraro.
22256
22257        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22258        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._attributesModified): Renamed from _attributesRemovedOrStyleInvalidated
22259        since _attributesModified is what was registered as the event listener.
22260        * UserInterface/Object.js:
22261        (WebInspector.Object.addEventListener): Assert the event type and listener are not null/undefined/empty.
22262        (WebInspector.Object.removeEventListener): Ditto.
22263
222642012-03-03  Timothy Hatcher  <timothy@apple.com>
22265
22266        Use a go-to arrow to link to the location of the style rule in the stylesheet resource.
22267
22268        The text links added a lot of clutter and often collided with the selector in bad ways.
22269
22270        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22271
22272        Reviewed by Brian Weinstein.
22273
22274        * UserInterface/CSSStyleDetailsSidebarPanel.css:
22275        (.sidebar > .panel.details.css-style .styles-section .go-to-arrow): Sized to fit the line. Hidden by default.
22276        (.sidebar > .panel.details.css-style .styles-section:hover .go-to-arrow): Reveal on hover of the section.
22277        * UserInterface/StylePropertiesSection.js:
22278        (WebInspector.StylePropertiesSection.prototype._linkify): Create the go-to arrow instead of a text link.
22279
222802012-03-02  Timothy Hatcher  <timothy@apple.com>
22281
22282        Show user agent rules in a separate section called "Base Style Rules".
22283
22284        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22285
22286        Reviewed by Brian Weinstein.
22287
22288        * Localizations/en.lproj/localizedStrings.js: Updated.
22289        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22290        (WebInspector.CSSStyleDetailsSidebarPanel): Create the Base Style Rules section.
22291        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createMatchedRuleGroups): Take an array and
22292        return a modified version of the array instead of fixed modification of the matchedRuleGroups array.
22293        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Update the user agent section separately.
22294        * UserInterface/StylePropertiesSection.js:
22295        (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): Don't show an origin for user agent rules, since they are
22296        in their own section now.
22297
222982012-03-02  Timothy Hatcher  <timothy@apple.com>
22299
22300        Style the Style details sidebar.
22301
22302        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22303
22304        Reviewed by Brian Weinstein.
22305
22306        * UserInterface/CSSStyleDetailsSidebarPanel.css: Added.
22307        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22308        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSection):
22309        Stop passing false for isFirstSection argument.
22310        * UserInterface/ComputedStylePropertiesSection.js:
22311        (WebInspector.ComputedStylePropertiesSection): Update className.
22312        * UserInterface/DetailsSection.css:
22313        * UserInterface/Main.html: Included CSSStyleDetailsSidebarPanel.css.
22314        * UserInterface/StylePropertiesSection.js:
22315        (WebInspector.StylePropertiesSection): Remove isFirstSection argument.
22316        * UserInterface/StylePropertyTreeElement.js:
22317        (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Create and append the expand element for the
22318        disclosure triangle use for shorthands. Create an inner element for the swatch for transparent colors.
22319        (WebInspector.StylePropertyTreeElement.prototype.restoreNameElement): Remove "webkit-" class prefix.
22320        (WebInspector.StylePropertyTreeElement.prototype._isNameElement): Ditto.
22321        (WebInspector.StylePropertyTreeElement.prototype._isValueElement): Ditto. Return early if it is the expand element.
22322        (WebInspector.StylePropertyTreeElement.prototype.isEventWithinDisclosureTriangle): Added.
22323
223242012-03-01  Timothy Hatcher  <timothy@apple.com>
22325
22326        Show an empty content message in the Issue sidebar when there are no issues.
22327
22328        Reviewed by Brian Weinstein.
22329
22330        * Localizations/en.lproj/localizedStrings.js: Updated.
22331        * UserInterface/IssueSidebarPanel.js:
22332        (WebInspector.IssueSidebarPanel): Call _updateEmptyContentPlaceholder.
22333        (WebInspector.IssueSidebarPanel.prototype._updateEmptyContentPlaceholder): Added.
22334        (WebInspector.IssueSidebarPanel.prototype._issuesCleared): Call _updateEmptyContentPlaceholder.
22335        (WebInspector.IssueSidebarPanel.prototype._checkForOldResources.delayedWork): Ditto.
22336
223372012-03-01  Timothy Hatcher  <timothy@apple.com>
22338
22339        Don't show the same node twice in the navigation bar when the close tag is selected in the DOM tree.
22340
22341        Reviewed by Brian Weinstein.
22342
22343        * UserInterface/DOMTreeContentView.js:
22344        (WebInspector.DOMTreeContentView.prototype.get selectionPathComponents): Skip close tag tree elements.
22345
223462012-03-01  Timothy Hatcher  <timothy@apple.com>
22347
22348        Update the Style details sidebar when stylesheets, the media query result, or the DOM changes.
22349
22350        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22351
22352        Reviewed by Brian Weinstein.
22353
22354        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22355        (WebInspector.CSSStyleDetailsSidebarPanel): Added event listeners for the DOM and CSS changes.
22356        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.get _userOperationInProgress): Added.
22357        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSectionsIfNonUserAction): Added. Call _rebuildSections.
22358        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._attributesModified): Added. Call _rebuildSectionsIfNonUserAction.
22359        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._attributesRemoved): Added. Ditto.
22360        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._styleInvalidated): Added. Ditto.
22361
223622012-03-01  Timothy Hatcher  <timothy@apple.com>
22363
22364        Include pseudo elements in the Style details sidebar.
22365
22366        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22367
22368        Reviewed by Brian Weinstein.
22369
22370        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22371        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Go through the pseudo elements.
22372        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSection): Broken out from
22373        createStylePropertiesSectionGroup.
22374        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSectionGroup): Only create
22375        the row and group now.
22376        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createMatchedRuleGroups): Added. Creates sections
22377        and groups for each pseudo element identifier.
22378
223792012-03-01  Timothy Hatcher  <timothy@apple.com>
22380
22381        Update the computed style and overloaded properties when editing a style property.
22382
22383        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22384
22385        Reviewed by Brian Weinstein.
22386
22387        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22388        (WebInspector.CSSStyleDetailsSidebarPanel):
22389        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSectionGroup):
22390        Add the StylePropertiesSection to the mainPropertySectionMap.
22391        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Store direct references to the important
22392        property sections and add them to the mainPropertySections.
22393        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshSections): Added.
22394        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshSections.computedStyleCallback): Iterate over all the property sections
22395        and build the style rules needed to update overloaded and used properties.
22396        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._markUsedProperties): Clean up.
22397        * UserInterface/StylePropertiesSection.js:
22398        (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback): Call _refreshSections.
22399        (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): Remove reference to WebInspector.panels.elements.
22400        * UserInterface/StylePropertyTreeElement.js:
22401        (WebInspector.StylePropertyTreeElement.prototype._updatePane): Use _refreshSections.
22402        (WebInspector.StylePropertyTreeElement.prototype.toggleEnabled): Use _parentPane.
22403        (WebInspector.StylePropertyTreeElement.prototype.applyStyleText): Ditto.
22404
224052012-03-01  Joseph Pecoraro  <pecoraro@apple.com>
22406
22407        Fixed localization typo.
22408
22409        Reviewed by Timothy Hatcher.
22410
22411        * Localizations/en.lproj/localizedStrings.js:
22412        * UserInterface/TimelinesContentView.js:
22413        (WebInspector.TimelinesContentView):
22414
224152012-03-01  Joseph Pecoraro  <pecoraro@apple.com>
22416
22417        <rdar://problem/10960903> Include Network timeline graph in the network data grid
22418
22419        Before we make other improvements at least adjust the timeline graph
22420        sizes to reasonable sizes.
22421
22422        Reviewed by Timothy Hatcher.
22423
22424        * UserInterface/TimelinesContentView.js:
22425        (WebInspector.TimelinesContentView):
22426
224272012-03-01  Joseph Pecoraro  <pecoraro@apple.com>
22428
22429        <rdar://problem/10960903> Include Network timeline graph in the network data grid
22430
22431        Adopt OpenSource's "offscreen" row hiding for performance.
22432
22433        Reviewed by Timothy Hatcher.
22434
22435        * UserInterface/TimelinesContentView.css:
22436        (.content-view.timelines > .data-grid tr.offscreen):
22437        (.content-view.timelines > .data-grid tr.offscreen td):
22438        Ensure offscreen table rows still have a height, and hide their contents.
22439
22440        * UserInterface/TimelinesContentView.js:
22441        (WebInspector.TimelinesContentView):
22442        (WebInspector.TimelinesContentView.prototype.updateLayout):
22443        (WebInspector.TimelinesContentView.prototype._updatePendingRecords):
22444        Update offscreen rows when the view resizes, and after we've sorted / added new rows.
22445
22446        (WebInspector.TimelinesContentView.prototype._updateOffscreenRows):
22447        Mark data grid table rows outside the visible bounds as "offscreen".
22448
22449        * UserInterface/ResourceTimelineDataGridNode.js:
22450        (WebInspector.ResourceTimelineDataGridNode.prototype.select):
22451        When a user uses keyboard shortcuts and moves up/down to a row that
22452        was offscreen, the selection happens before the node scrolls into view.
22453        In order for its layout to work properly it can't be display none,
22454        so remove the offscreen class preemptively.
22455
224562012-03-01  Joseph Pecoraro  <pecoraro@apple.com>
22457
22458        <rdar://problem/10960903> Include Network timeline graph in the network data grid
22459
22460        Reviewed by Timothy Hatcher.
22461
22462        * UserInterface/Images/graphLabelCalloutLeft.png: Added.
22463        * UserInterface/Images/graphLabelCalloutLeftWhite.png: Added.
22464        * UserInterface/Images/graphLabelCalloutRight.png: Added.
22465        * UserInterface/Images/graphLabelCalloutRightWhite.png: Added.
22466        * UserInterface/Images/timelineHollowPillBlue.png: Added.
22467        * UserInterface/Images/timelineHollowPillGray.png: Added.
22468        * UserInterface/Images/timelineHollowPillGreen.png: Added.
22469        * UserInterface/Images/timelineHollowPillOrange.png: Added.
22470        * UserInterface/Images/timelineHollowPillPurple.png: Added.
22471        * UserInterface/Images/timelineHollowPillRed.png: Added.
22472        * UserInterface/Images/timelineHollowPillYellow.png: Added.
22473        * UserInterface/Images/timelinePillBlue.png: Added.
22474        * UserInterface/Images/timelinePillGray.png: Added.
22475        * UserInterface/Images/timelinePillGreen.png: Added.
22476        * UserInterface/Images/timelinePillOrange.png: Added.
22477        * UserInterface/Images/timelinePillPurple.png: Added.
22478        * UserInterface/Images/timelinePillRed.png: Added.
22479        * UserInterface/Images/timelinePillWhiteFlat.png: Added.
22480        Open Source images and new white images from Timothy Hatcher.
22481        There will need to be HiDPI versions of these images.
22482
22483        * UserInterface/Main.html:
22484        Added new files.
22485
22486        * UserInterface/Main.html:
22487        * UserInterface/NetworkTimeline.css: Added.
22488        Basic styles copied from Open Source. Minor adjustments for image sizes.
22489
22490        (.data-grid:focus tr.selected .network-graph-bar):
22491        (.data-grid:focus tr.selected .resource-cached .network-graph-bar):
22492        (.data-grid:focus tr.selected .network-graph-bar.waiting):
22493        (.data-grid:focus tr.selected .network-graph-label):
22494        (.data-grid:focus tr.selected .network-graph-label.after):
22495        (.data-grid:focus tr.selected .network-graph-label.before::after):
22496        (.data-grid:focus tr.selected .network-graph-label.after::before):
22497        New frontend styles for the network graph when the data grid row is selected.
22498        This makes the pill, callouts, and text white / blue matching the data grid
22499        selected style.
22500
22501        * UserInterface/NetworkDataGrid.js: Added.
22502        (WebInspector.NetworkDataGrid):
22503        (WebInspector.NetworkDataGrid.prototype.constructor.WebInspector.NetworkDataGrid.get currentCalculator):
22504        (WebInspector.NetworkDataGrid.prototype.updateCalculatorBoundariesWithRecord):
22505        (WebInspector.NetworkDataGrid.prototype.updateCalculatorBoundariesWithDataGridNode):
22506        (WebInspector.NetworkDataGrid.prototype.reset):
22507        NetworkDataGrid has a just a time calculator right now, that adjusts its bounds
22508        based on resource start time, end times, and on-going load times.
22509
22510        * UserInterface/ResourceTimelineDataGridNode.js:
22511        (WebInspector.ResourceTimelineDataGridNode):
22512        (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
22513        (WebInspector.ResourceTimelineDataGridNode.prototype._createGraphElement):
22514        Create and update the network graph elements for the cell content.
22515
22516        (WebInspector.ResourceTimelineDataGridNode.prototype.select):
22517        Show the pill labels when the row is selected. Not just onmouseover.
22518
22519        (WebInspector.ResourceTimelineDataGridNode.prototype._refreshGraph):
22520        (WebInspector.ResourceTimelineDataGridNode.prototype._refreshLabelPositions):
22521        Use the provided network calculator shared with the other grid nodes to create
22522        the appropriate bar for this resource.
22523        appropriately within the network calculators bounds.
22524
22525        * UserInterface/TimelinesContentView.js:
22526        (WebInspector.TimelinesContentView):
22527        Timeline DataGrids may have embedded timeline graphs that adjust their bounds
22528        based on the records (start times, max sizes, etc) their content contains.
22529        Calculator objects manage those bounds. If the current data grid has a
22530        calculator we do a few extra actions to ensure nice updates.
22531
22532        (WebInspector.TimelinesContentView.prototype._recordingStarted):
22533        Reset the data grid's calculators.
22534
22535        (WebInspector.TimelinesContentView.prototype._updatePendingRecords):
22536        (WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecords):
22537        (WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds):
22538        Update the calculator's bounds before updating pending records so that all records
22539        are drawn with the same, most accurate bounds.
22540
225412012-03-01  Joseph Pecoraro  <pecoraro@apple.com>
22542
22543        <rdar://problem/10960903> Include Network timeline graph in the network data grid
22544
22545        Reviewed by Timothy Hatcher.
22546
22547        * Localizations/en.lproj/localizedStrings.js:
22548        New strings for the tooltips provided by the graph calculator.
22549
22550        * UserInterface/Main.html:
22551        * UserInterface/NetworkGraphCalculator.js: Added.
22552        (WebInspector.NetworkTimeCalculator):
22553        (WebInspector.NetworkTimeCalculator.prototype.get boundarySpan):
22554        (WebInspector.NetworkTimeCalculator.prototype.reset):
22555        (WebInspector.NetworkTimeCalculator.prototype.computeBarGraphPercentages):
22556        (WebInspector.NetworkTimeCalculator.prototype.computeBarGraphLabels):
22557        (WebInspector.NetworkTimeCalculator.prototype.updateBoundaries):
22558        (WebInspector.NetworkTimeCalculator.prototype.formatValue):
22559        (WebInspector.NetworkTimeCalculator.prototype._lowerBound):
22560        (WebInspector.NetworkTimeCalculator.prototype._upperBound):
22561        (WebInspector.NetworkTransferTimeCalculator):
22562        (WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
22563        (WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
22564        (WebInspector.NetworkTransferDurationCalculator):
22565        (WebInspector.NetworkTransferDurationCalculator.prototype._upperBound):
22566        Port from OpenSource to work with the new frontend's resource objects.
22567
22568        * UserInterface/ResourceTimelineRecord.js:
22569        (WebInspector.ResourceTimelineRecord.prototype.get endTime):
22570        Move "endTime" resource calculation from here ...
22571
22572        * UserInterface/Resource.js:
22573        (WebInspector.Resource.prototype.get lastTimestamp):
22574        ... to here as "lastTimestamp".
22575
225762012-03-01  Joseph Pecoraro  <pecoraro@apple.com>
22577
22578        Upgrade .hidden to a common case that does display:none.
22579        This is used throughout the OpenSource frontend to hide elements
22580        and some existing code already uses it and may not be getting
22581        the proper treatment.
22582
22583        Reviewed by Timothy Hatcher.
22584
22585        * UserInterface/TextEditor.css:
22586        * UserInterface/NavigationSidebarPanel.css:
22587        * UserInterface/ApplicationCacheFrameContentView.css:
22588        * UserInterface/Main.css:
22589        (.hidden):
22590        * UserInterface/TextEditor.css:
22591        This removes new front-end occurrences of "hidden". However
22592        it did not remove their JavaScript property.
22593
225942012-03-01  Joseph Pecoraro  <pecoraro@apple.com>
22595
22596        Prevent adding a node to the pending refresh list multiple times.
22597
22598        Reviewed by Timothy Hatcher.
22599
22600        * UserInterface/TimelinesContentView.js:
22601        (WebInspector.TimelinesContentView):
22602        (WebInspector.TimelinesContentView.prototype._updatePendingRecords):
22603        (WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh):
22604        Flag on the DataGridNode as pending a refresh if we've added it
22605        to the refresh list and remove the flag after refreshing.
22606
226072012-03-01  Joseph Pecoraro  <pecoraro@apple.com>
22608
22609        <rdar://problem/10952471> Page should reload when pushing <cmd>+R
22610
22611        Reviewed by Timothy Hatcher.
22612
22613        * UserInterface/EditingSupport.js:
22614        (WebInspector.isEventTargetAnEditableField):
22615        Add code, similar to Open Source to detect if the event is inside of
22616        an editable field. Although some TextPrompt's mark their element as
22617        editing, the Console does not. Nor do <input>s.
22618
22619        * UserInterface/Main.js:
22620        (WebInspector.contentLoaded):
22621        (WebInspector._keydown):
22622        Add a keydown listener on the document checking for <cmd>+R.
22623
226242012-03-01  Brian Weinstein  <bweinstein@apple.com>
22625
22626        Finish up JavaScript profiling in the new inspector.
22627        
22628        This patch fixes some loose ends.
22629        - Profiles started by the user now have the title "JavaScript Profile n".
22630        - Profile tree elements now have an icon.
22631        - Selecting "Start Profiling JavaScript" or "Stop Profiling JavaScript" from the Develop menu
22632        now take you to the instrument sidebar panel.
22633        
22634        Rest of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
22635
22636        Reviewed by Tim Hatcher.
22637
22638        * Localizations/en.lproj/localizedStrings.js: Update localized strings.
22639
22640        * UserInterface/Images/Profile.png: Added.
22641        * UserInterface/Images/Profile@2x.png: Added.
22642
22643        * UserInterface/InspectorFrontendAPI.js:
22644        (InspectorFrontendAPI.startProfilingJavaScript): Show the instrument sidebar panel.
22645        (InspectorFrontendAPI.stopProfilingJavaScript): Ditto.
22646
22647        * UserInterface/InstrumentIcons.css: Add icons for profile tree elements.
22648
22649        * UserInterface/InstrumentSidebarPanel.js:
22650        (WebInspector.InstrumentSidebarPanel.prototype._titleForProfile): Make the title for user generated
22651            profiles "JavaScript Profile n", instead of just "Profile n".
22652        (WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded): Use the class name for the icon.
22653
226542012-03-01  Brian Weinstein  <bweinstein@apple.com>
22655
22656        Clear the list of profiles when the page navigates.
22657
22658        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
22659
22660        Reviewed by Tim Hatcher.
22661
22662        * UserInterface/InstrumentSidebarPanel.js:
22663        (WebInspector.InstrumentSidebarPanel): Add a listener for when the profile manager says the profiles
22664            were cleared.
22665        (WebInspector.InstrumentSidebarPanel.prototype._profilesCleared): Remove the tree elements from the sidebar,
22666            clear the map from profile titles -> tree elements, close all profile content views, and update the empty
22667            content placeholder. 
22668        * UserInterface/ProfileManager.js:
22669        (WebInspector.ProfileManager): Add a listener for when the main resource did change.
22670        (WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Remove an unused variable.
22671        (WebInspector.ProfileManager.prototype._mainResourceDidChange): Call initialize and fire an event saying that profiles
22672            were cleared.
22673
226742012-02-29  Brian Weinstein  <bweinstein@apple.com>
22675
22676        Add the ability to start/stop JavaScript profiling from the inspector.
22677        
22678        This patch adds a recording glyph to the profiles title bar (which matches the one in the timelines title bar).
22679        The button will start and stop JavaScript profiling.
22680        
22681        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
22682
22683        Reviewed by Tim Hatcher.
22684
22685        * Localizations/en.lproj/localizedStrings.js: Update localized strings.
22686
22687        * UserInterface/InstrumentSidebarPanel.css: Make all of these rules work for title bars in the instruments
22688            sidebar panel other than the Timelines title bar. We need these rules for the Profiles title bar as well.
22689
22690        * UserInterface/InstrumentSidebarPanel.js:
22691        (WebInspector.InstrumentSidebarPanel): Add a record button and status text next to the profiles sidebar. Also start
22692            listening for when the profile manager starts and stops profiling.
22693        (WebInspector.InstrumentSidebarPanel.prototype._profilingStarted): Start the text of the profiling status and add
22694            a recording style class to the glyph.
22695        (WebInspector.InstrumentSidebarPanel.prototype._profilingEnded): Clear the text of the profiling status and remove
22696            the recording style class from the glyph.
22697        (WebInspector.InstrumentSidebarPanel.prototype._profileGlyphMousedOver): Update the text of the profiling status.
22698        (WebInspector.InstrumentSidebarPanel.prototype._profileGlyphMousedOut): Ditto.
22699        (WebInspector.InstrumentSidebarPanel.prototype._profileGlyphClicked): Toggle the profiling state.
22700
22701        * UserInterface/ProfileManager.js:
22702        (WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Add a flag that represents
22703            whether or not we are currently profiling.
22704        (WebInspector.ProfileManager.prototype.setRecordingProfile): Fire events for when we start or stop profiling.
22705
227062012-02-29  Timothy Hatcher  <timothy@apple.com>
22707
22708        Remember the last selected details sidebar panel and restore it when that panel becomes available.
22709
22710        Reviewed by Jon Honeycutt.
22711
22712        * UserInterface/Main.js:
22713        (WebInspector.contentLoaded): Add event listener for SidebarPanelSelected event.
22714        (WebInspector._detailsSidebarPanelSelected): Added. Remember the identifier of the selected sidebar panel.
22715        (WebInspector._contentBrowserRepresentedObjectsDidChange): Ignore selection changes and restore the selection
22716        when the last selected sidebar panel is reinserted into the sidebar.
22717
227182012-02-29  Timothy Hatcher  <timothy@apple.com>
22719
22720        Prevent the new Web Inspector resources from installing in production builds since we are
22721        not enabling the Inspector in DP2.
22722
22723        Reviewed by Mark Rowe.
22724
22725        * Scripts/copy-user-interface-resources.sh: Exit early before copying.
22726
227272012-02-29  Timothy Hatcher  <timothy@apple.com>
22728
22729        Include missing image needed by the Log and Database content views.
22730
22731        <rdar://problem/10952496> "userInputPreviousIcon.png" resource failed to load in Console
22732
22733        Reviewed by Dan Bernstein.
22734
22735        * UserInterface/DatabaseContentView.css:
22736        (.database-user-query::before): Use UserInputPromptPrevious.pdf.
22737        * UserInterface/Images/UserInputPromptPrevious.pdf: Added.
22738        * UserInterface/LogContentView.css:
22739        (.console-user-command::before): Use UserInputPromptPrevious.pdf.
22740
227412012-02-29  Timothy Hatcher  <timothy@apple.com>
22742
22743        Go through the style rules and mark the used and overloaded properties.
22744
22745        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22746
22747        Reviewed by Brian Weinstein.
22748
22749        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22750        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Call _markUsedProperties and
22751        pass the result to WebInspector.ComputedStylePropertiesSection.
22752        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._markUsedProperties): Added. Copied from open source's
22753        StylesSidebarPane.js file.
22754
227552012-02-29  Timothy Hatcher  <timothy@apple.com>
22756
22757        Populate the Style sidebar sections after getting all the style info.
22758
22759        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22760
22761        Reviewed by Brian Weinstein.
22762
22763        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22764        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Build a list of style rules
22765        that match the cascade order so we can mark used and overloaded properties. Rebuild the sections.
22766        * UserInterface/CSSStyleManager.js:
22767        (WebInspector.CSSStyleManager.prototype.getInlineStylesAsync): Merge from open source to work with TOT protocol.
22768        * UserInterface/StylePropertiesSection.js:
22769        (WebInspector.StylePropertiesSection): Don't show a selector if selectorText is empty.
22770
227712012-02-29  Timothy Hatcher  <timothy@apple.com>
22772
22773        Request the style information and store it, then build the sections after the last callback.
22774
22775        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22776
22777        Reviewed by Brian Weinstein.
22778
22779        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22780        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Request the style info.
22781        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.computedStyleCallback): Store the result.
22782        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.matchedStylesCallback): Store the result.
22783        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.inlineStylesCallback): Store the results and
22784        call buildSections. Since this was the last async call to cssStyleManager, this will always be the last response.
22785        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Added stub that needs implemented.
22786
227872012-02-29  Timothy Hatcher  <timothy@apple.com>
22788
22789        Remove the refresh code in the Style sidebar since it needs reworked to properly update in one step.
22790
22791        The updating needs to be done in one step so the cascade and property priority are taken into account.
22792        The previous way of updating the sections in three async steps was not going to work.
22793
22794        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22795
22796        Reviewed by Brian Weinstein.
22797
22798        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22799        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Call _rebuildSections.
22800        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshStyleRules): Removed.
22801        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshAttributeStyles): Removed.
22802        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshComputedStyle): Removed.
22803        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Added stub that needs implemented.
22804
228052012-02-28  Timothy Hatcher  <timothy@apple.com>
22806
22807        More work for resource links in the Style details sidebar.
22808
22809        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22810
22811        Reviewed by Brian Weinstein.
22812
22813        * UserInterface/DOMDetailsSidebarPanel.js:
22814        (WebInspector.DOMDetailsSidebarPanel): Make the event listener capture since another listener interferes.
22815        (WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked): Pass along the line number.
22816        * UserInterface/Main.js:
22817        (WebInspector.openURL): Add support for opening to a line number. Use ResourceSidebarPanel which does all the work.
22818        * UserInterface/StylePropertiesSection.js:
22819        (WebInspector.StylePropertiesSection): Use _linkify instead of linkifyResourceAsNode.
22820        (WebInspector.StylePropertiesSection.prototype._linkify): Added.
22821        (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): Use _linkify instead of linkifyResourceAsNode.
22822
228232012-02-28  Timothy Hatcher  <timothy@apple.com>
22824
22825        Copy over Color.js from open source and hook it up to the Style details sidebar.
22826
22827        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22828
22829        Reviewed by Joseph Pecoraro.
22830
22831        * UserInterface/CSSStyleManager.js:
22832        (WebInspector.CSSStyleManager): Use WebInspector.Color.Format.
22833        * UserInterface/Color.js: Copied from OpenSource/Source/WebCore/inspector/front-end/Color.js.
22834        * UserInterface/Main.html: Included Color.js.
22835        * UserInterface/StylePropertyTreeElement.js: Use WebInspector.Color.Format.
22836
228372012-02-28  Timothy Hatcher  <timothy@apple.com>
22838
22839        Get style editing working.
22840
22841        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22842
22843        Reviewed by Joseph Pecoraro.
22844
22845        * UserInterface/BoxModelDetailsSectionRow.js:
22846        (WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown): Use WebInspector.CSSPropertyPrompt.alteredFloatNumber.
22847        * UserInterface/CSSPropertyPrompt.js:
22848        (WebInspector.CSSPropertyPrompt):
22849        (WebInspector.CSSPropertyPrompt.alteredFloatNumber): Moved from BoxModelDetailsSectionRow.
22850        (WebInspector.CSSPropertyPrompt.alteredHexNumber): Added from Open Source.
22851        (WebInspector.CSSPropertyPrompt.prototype._handleUpOrDownValue): Use alteredFloatNumber and alteredHexNumber on this class.
22852        * UserInterface/EditingSupport.js:
22853        (WebInspector.restoreFocusFromElement): Added from Open Source.
22854        * UserInterface/Main.html: Included CSSPropertyPrompt.js.
22855        * UserInterface/StylePropertyTreeElement.js:
22856        (WebInspector.StylePropertyTreeElement.prototype): Create CSSPropertyPrompt correctly.
22857
228582012-02-28  Timothy Hatcher  <timothy@apple.com>
22859
22860        Replace more uses of {add,remove,has}StyleClass with classList.{add,remove,contains}.
22861
22862        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22863
22864        Reviewed by Brian Weinstein.
22865
22866        * UserInterface/BlankStylePropertiesSection.js:
22867        (WebInspector.BlankStylePropertiesSection):
22868        (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted.successCallback):
22869        (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted):
22870        (WebInspector.BlankStylePropertiesSection.prototype.makeNormal):
22871        * UserInterface/ProfileDataGridTree.js:
22872        (WebInspector.ProfileDataGridNode.prototype.createCell):
22873        * UserInterface/StylePropertiesSection.js:
22874        (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceDoubleClick):
22875
228762012-02-28  Timothy Hatcher  <timothy@apple.com>
22877
22878        Make links work in the Style details sidebar.
22879
22880        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22881
22882        Reviewed by Brian Weinstein.
22883
22884        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22885        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshAttributeStyles): Pass the domNode.
22886        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshComputedStyle): Ditto.
22887        * UserInterface/DOMDetailsSidebarPanel.js:
22888        (WebInspector.DOMDetailsSidebarPanel): Add click event listener.
22889        (WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked): Added. Find the parentFrame for
22890        the inspected DOM node and then call openURL.
22891        * UserInterface/StylePropertyTreeElement.js:
22892        (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL): Remove references to
22893        elements panel and fix up the linifying code to work with the new Inspector code.
22894
228952012-02-29  Brian Weinstein  <bweinstein@apple.com>
22896
22897        Group together profiles with the same name into folders when there is more than
22898        one of them.
22899        
22900        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
22901
22902        Reviewed by Tim Hatcher.
22903
22904        * Localizations/en.lproj/localizedStrings.js: Update localized strings.
22905        * UserInterface/InstrumentSidebarPanel.js:
22906        (WebInspector.InstrumentSidebarPanel): Add a mapping from profile title -> profile tree element (or folder).
22907        (WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded): Add multiple cases for when
22908            we add a profile. If it's the first profile with a given name, add it to the sidebar. If there already
22909            is a folder that represents all profiles with that name, then add the profile to that folder. If there
22910            is already a profile with that same name, create a folder to represent all profiles with that name,
22911            and add both the previous profile and the new profile to that folder.
22912
229132012-02-28  Brian Weinstein  <bweinstein@apple.com>
22914
22915        Make console.profile work and show entries in the instrument sidebar.
22916        
22917        We now enable profiling when we open the web inspector, instead of when we are just told to create
22918        a profile. This allows console.profile to work when the web inspector is open.
22919        
22920        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
22921
22922        Reviewed by Tim Hatcher.
22923
22924        * UserInterface/ProfileManager.js:
22925        (WebInspector.ProfileManager): Enable the ProfilerAgent when we start the ProfileManager.
22926        (WebInspector.ProfileManager.prototype.startProfilingJavaScript): Call startRecordingProfile.
22927        (WebInspector.ProfileManager.prototype.stopProfilingJavaScript): Don't disable the ProfilerAgent.
22928        (WebInspector.ProfileManager.prototype.addProfile): If we don't have a recording JavaScript profile (which
22929            we wouldn't if addProfile was called from console.profile), then create a new ProfileObject and fire an
22930            event.
22931
229322012-02-28  Timothy Hatcher  <timothy@apple.com>
22933
22934        Start showing Computed Style in the Style details sidebar.
22935
22936        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22937
22938        Reviewed by Brian Weinstein.
22939
22940        * Localizations/en.lproj/localizedStrings.js: Updated.
22941        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22942        (WebInspector.CSSStyleDetailsSidebarPanel): Create a Computed Style section.
22943        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Call _refreshComputedStyle.
22944        (WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshComputedStyle): Added. Request the computed styles
22945        then make a ComputedStylePropertiesSection.
22946        * UserInterface/CSSStyleManager.js:
22947        (WebInspector.CSSStyleManager): Added setting for color format.
22948        (WebInspector.CSSStyleManager.prototype.get preferredColorFormat): Added.
22949        * UserInterface/ComputedStylePropertiesSection.js:
22950        (WebInspector.ComputedStylePropertiesSection): Replace addStyleClass with classList.add.
22951        (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace): Ditto.
22952        * UserInterface/DetailsSection.js:
22953        (WebInspector.DetailsSection): Make a empty group by default if none are passed in.
22954        * UserInterface/DetailsSectionPropertiesRow.js: Added.
22955        (WebInspector.DetailsSectionPropertiesRow):
22956        (WebInspector.DetailsSectionPropertiesRow.prototype.get propertiesSection):
22957        (WebInspector.DetailsSectionPropertiesRow.prototype.set propertiesSection):
22958        * UserInterface/Main.html: Included DetailsSectionPropertiesRow.
22959        * UserInterface/StylePropertiesSection.js:
22960        (WebInspector.StylePropertiesSection): Removed single-click experiment.
22961        * UserInterface/StylePropertyTreeElement.js:
22962        (WebInspector.StylePropertyTreeElement.prototype.onattach): Removed single-click experiment.
22963        (WebInspector.StylePropertyTreeElement.prototype.updateTitle): Use CSSStyleManager for the color format.
22964        Replaced addStyleClass with classList.add and removeStyleClass with classList.remove.
22965
229662012-02-27  Timothy Hatcher  <timothy@apple.com>
22967
22968        Fix some exceptions when running against shipping WebKit.
22969
22970        There are no setters for sortOrder or sortColumnIdentifier. Trying to set them use to throw an exception.
22971        They just are silently ignored in TOT WebKit. The sort info is properly set earlier in the function.
22972
22973        Reviewed by Joseph Pecoraro.
22974
22975        * UserInterface/TimelinesContentView.js:
22976        (WebInspector.TimelinesContentView): Remove sets for sortOrder and sortColumnIdentifier.
22977
229782012-02-27  Timothy Hatcher  <timothy@apple.com>
22979
22980        Hide the appearance and style details sidebars when the node is not an element.
22981
22982        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
22983
22984        Reviewed by Brian Weinstein.
22985
22986        * UserInterface/AppearanceDetailsSidebarPanel.js:
22987        (WebInspector.AppearanceDetailsSidebarPanel.prototype.supportsDOMNode): Added. Support only ELEMENT_NODE types.
22988        * UserInterface/CSSStyleDetailsSidebarPanel.js:
22989        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.supportsDOMNode): Added. Support only ELEMENT_NODE types.
22990        * UserInterface/DOMDetailsSidebarPanel.js:
22991        (WebInspector.DOMDetailsSidebarPanel.prototype..inspect): Call supportsDOMNode before setting domNode.
22992        (WebInspector.DOMDetailsSidebarPanel.prototype.supportsDOMNode): Added. Always return true.
22993
229942012-02-27  Timothy Hatcher  <timothy@apple.com>
22995
22996        Move empty message support from DetailsSectionDataGridRow down to DetailsSectionRow.
22997
22998        This allows BoxModelDetailsSectionRow to show a properly styled empty message. It will
22999        also allow other rows in the Style details sidebar to do the same.
23000
23001        Reviewed by Joseph Pecoraro.
23002
23003        * UserInterface/BoxModelDetailsSectionRow.js:
23004        (WebInspector.BoxModelDetailsSectionRow): Pass the emptyMessage to the DetailsSectionRow constructor.
23005        (WebInspector.BoxModelDetailsSectionRow.prototype._refresh): Use showEmptyMessage.
23006        (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics): Use hideEmptyMessage
23007        * UserInterface/DetailsSection.css:
23008        (.details-section > .content > .group > .row.empty): Removed .data-grid from the selector.
23009        * UserInterface/DetailsSectionDataGridRow.js:
23010        (WebInspector.DetailsSectionDataGridRow): Pass the emptyMessage to DetailsSectionRow constructor.
23011        (WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid): Use showEmptyMessage
23012        and hideEmptyMessage.
23013        * UserInterface/DetailsSectionRow.js:
23014        (WebInspector.DetailsSectionRow): Initialize the _emptyMessage.
23015        (WebInspector.DetailsSectionRow.prototype.get emptyMessage): Added.
23016        (WebInspector.DetailsSectionRow.prototype.set emptyMessage): Added.
23017        (WebInspector.DetailsSectionRow.prototype.showEmptyMessage): Added.
23018        (WebInspector.DetailsSectionRow.prototype.hideEmptyMessage): Added.
23019
230202012-02-27  Timothy Hatcher  <timothy@apple.com>
23021
23022        Add WebInspector.CSSStyleDetailsSidebarPanel and make it show up in the details sidebar.
23023
23024        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
23025
23026        Reviewed by Brian Weinstein.
23027
23028        * UserInterface/CSSStyleDetailsSidebarPanel.js: Added.
23029        (WebInspector.CSSStyleDetailsSidebarPanel):
23030        (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
23031        * UserInterface/Images/NavigationItemCurleyBraces.pdf: Added.
23032        * UserInterface/Main.html:
23033        * UserInterface/Main.js:
23034        (WebInspector.contentLoaded):
23035
230362012-02-27  Timothy Hatcher  <timothy@apple.com>
23037
23038        Add WebInspector.CSSObserver and wire it up to the InspectorBackend.
23039
23040        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
23041
23042        Reviewed by Brian Weinstein.
23043
23044        * UserInterface/CSSObserver.js: Added.
23045        (WebInspector.CSSObserver):
23046        (WebInspector.CSSObserver.prototype.mediaQueryResultChanged):
23047        (WebInspector.CSSObserver.prototype.styleSheetChanged):
23048        * UserInterface/Main.html: Included CSSObserver.js.
23049        * UserInterface/Main.js:
23050        (WebInspector.contentLoaded): Call registerCSSDispatcher with an CSSObserver instance.
23051
230522012-02-24  Brian Weinstein  <bweinstein@apple.com>
23053
23054        Add a sane name for user generated profiles.
23055
23056        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23057
23058        Reviewed by Tim Hatcher.
23059
23060        * UserInterface/InstrumentSidebarPanel.js:
23061        (WebInspector.InstrumentSidebarPanel.prototype.addProfile):
23062        * UserInterface/ProfileManager.js:
23063
230642012-02-24  Brian Weinstein  <bweinstein@apple.com>
23065
23066        Create a JavaScriptProfileView when a profile is selected and show it.
23067
23068        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23069
23070        Reviewed by Tim Hatcher.
23071
23072        * Localizations/en.lproj/localizedStrings.js: Update localized strings.
23073        * UserInterface/ContentView.js:
23074        (WebInspector.ContentView): Add a case for ProfileObject.
23075        (WebInspector.ContentView.isViewable): Ditto.
23076        * UserInterface/InstrumentSidebarPanel.js:
23077        (WebInspector.InstrumentSidebarPanel): Add a listener for when items in the content tree outline are selected.
23078        (WebInspector.InstrumentSidebarPanel.prototype._profileSelected): Call showContentViewForRepresentedObject on
23079            the selected ProfileObject.
23080        * UserInterface/Main.js:
23081        (WebInspector.sidebarPanelForRepresentedObject): Add a case for ProfileObject.
23082
230832012-02-24  Brian Weinstein  <bweinstein@apple.com>
23084
23085        Hook up Start/Stop Profiling JavaScript in the Develop menu, and make each profile show
23086        up as a sidebar item.
23087
23088        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23089
23090        Reviewed by Tim Hatcher.
23091
23092        * UserInterface/InspectorFrontendAPI.js:
23093        (InspectorFrontendAPI.isProfilingJavaScript): Call into the ProfileManager.
23094        (InspectorFrontendAPI.startProfilingJavaScript): Ditto.
23095        (InspectorFrontendAPI.stopProfilingJavaScript): Ditto.
23096
23097        * UserInterface/InstrumentSidebarPanel.js:
23098        (WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded): Create a tree element for the added profile.
23099        (WebInspector.InstrumentSidebarPanel.prototype._profileWasUpdated): Update the title of the tree element for the
23100            profile that was updated.
23101
23102        * UserInterface/JavaScriptProfileType.js: Change the value of a constant to match data we get back
23103            from the Profiler.
23104
23105        * UserInterface/ProfileManager.js:
23106        (WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Clear the current JavaScript
23107            profile variable.
23108        (WebInspector.ProfileManager.prototype.isProfilingJavaScript): Return whether or not we are profiling JavaScript.
23109        (WebInspector.ProfileManager.prototype.startProfilingJavaScript): Enable the ProfilerAgent, we kick off the profile in
23110            the callback.
23111        (WebInspector.ProfileManager.prototype.stopProfilingJavaScript): Stop recording the current profile and disable the
23112            ProfilerAgent.
23113        (WebInspector.ProfileManager.prototype.addProfile): Update our temporary recording profile to give it the information about
23114            the profile that was added, and fire an event that the profile was u pdated.
23115        (WebInspector.ProfileManager.prototype.setRecordingProfile): Create a temporary profile if needed, and fire an event that
23116            it was created.
23117        (WebInspector.ProfileManager.prototype._profilerWasEnabled): Create a JavaScriptProfileType and start recording.
23118
23119        * UserInterface/ProfilerObserver.js:
23120        (WebInspector.ProfilerObserver.prototype.addProfileHeader): Call ProfileManager.addProfile.
23121        (WebInspector.ProfilerObserver.prototype.setRecordingProfile): Call ProfileManager.setRecordingProfile.
23122
231232012-02-24  Brian Weinstein  <bweinstein@apple.com>
23124
23125        Add a stub ProfilerObserver and hook it up in Main.js.
23126        
23127        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23128
23129        Reviewed by Tim Hatcher.
23130
23131        * UserInterface/Main.html: Add new file.
23132        * UserInterface/Main.js:
23133        (WebInspector.contentLoaded): Set up the ProfilerObserver.
23134        * UserInterface/ProfilerObserver.js: Added.
23135        (WebInspector.ProfilerObserver):
23136        (WebInspector.ProfilerObserver.prototype.constructor.WebInspector.ProfilerObserver.resetProfiles):
23137        (WebInspector.ProfilerObserver.prototype.addProfileHeader):
23138        (WebInspector.ProfilerObserver.prototype.addHeapSnapshotChunk):
23139        (WebInspector.ProfilerObserver.prototype.finishHeapSnapshot):
23140        (WebInspector.ProfilerObserver.prototype.setRecordingProfile):
23141        (WebInspector.ProfilerObserver.prototype.reportHeapSnapshotProgress):
23142
231432012-02-24  Brian Weinstein  <bweinstein@apple.com>
23144
23145        Add ProfileType and JavaScriptProfileType to Main.html, since later patches will depend on them.
23146
23147        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23148
23149        Reviewed by Tim Hatcher.
23150
23151        * UserInterface/Main.html:
23152
231532012-02-24  Brian Weinstein  <bweinstein@apple.com>
23154
23155        Make ProfileDataGridTree work with the changes to the new inspector.
23156        
23157        - Update the way formatted strings are created
23158        - Changes the settings to use the new inspector's syntax
23159        - Remove the depedency on the linkifier
23160
23161        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23162
23163        Reviewed by Tim Hatcher.
23164
23165        * UserInterface/ProfileDataGridTree.js:
23166        (WebInspector.ProfileDataGridNode.prototype.get data):
23167        (WebInspector.ProfileDataGridNode.prototype.linkifyLocation):
23168        (WebInspector.ProfileDataGridNode.prototype.createCell):
23169
231702012-02-24  Brian Weinstein  <bweinstein@apple.com>
23171
23172        Bring in some specialized profile data grid components from open source.
23173    
23174        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23175
23176        Reviewed by Tim Hatcher.
23177
23178        * UserInterface/BottomUpProfileDataGridTree.js: Added. Copied from open source.
23179        * UserInterface/ProfileDataGridTree.js: Added. Copied from open source.
23180        * UserInterface/TopDownProfileDataGridTree.js: Added. Copied from open source.
23181        * UserInterface/Main.html: Add new files.
23182
231832012-02-24  Brian Weinstein  <bweinstein@apple.com>
23184
23185        Add rules from open source for the profile view to JavaScriptProfileView.css.
23186        
23187        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23188
23189        Reviewed by Tim Hatcher.
23190
23191        * UserInterface/JavaScriptProfileView.css: Added. Copied rules from open source.
23192        * UserInterface/Main.html: Added file.
23193
231942012-02-24  Brian Weinstein  <bweinstein@apple.com>
23195
23196        Clean up JavaScriptProfileView so it can be used in the new inspector.
23197        
23198        This patch:
23199            - Removes the status bar buttons (adding a FIXME to bring back that functionality)
23200            - Makes the class inherit from ContentView instead of just View
23201            - Replaces *styleClass functions with classList.*
23202            - Changes the settings to use the new inspector's syntax
23203
23204        Reviewed by Tim Hatcher.
23205
23206        * UserInterface/JavaScriptProfileView.js:
23207        (WebInspector.JavaScriptProfileView):
23208        (WebInspector.JavaScriptProfileView.prototype._changeView):
23209        (WebInspector.JavaScriptProfileView.prototype._percentClicked):
23210        (WebInspector.JavaScriptProfileView.prototype._updatePercentButton):
23211        (WebInspector.JavaScriptProfileView.prototype._focusClicked):
23212        (WebInspector.JavaScriptProfileView.prototype._excludeClicked):
23213        (WebInspector.JavaScriptProfileView.prototype._resetClicked):
23214        (WebInspector.JavaScriptProfileView.prototype._dataGridNodeSelected):
23215        (WebInspector.JavaScriptProfileView.prototype._dataGridNodeDeselected):
23216        (WebInspector.JavaScriptProfileView.prototype._mouseDownInDataGrid):
23217        * UserInterface/Main.html: Add JavaScriptProfileView.
23218
232192012-02-24  Brian Weinstein  <bweinstein@apple.com>
23220
23221        Add a ProfileObject class, which just holds some data about profiles (type, title, uid, and whether or not
23222        it is temporary).
23223
23224        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23225
23226        Reviewed by Tim Hatcher.
23227
23228        * UserInterface/ProfileObject.js: Added.
23229        (WebInspector.ProfileObject):
23230        (WebInspector.ProfileObject.prototype.constructor.WebInspector.ProfileObject.get typeId):
23231        (WebInspector.ProfileObject.prototype.get title):
23232        (WebInspector.ProfileObject.prototype.get uid):
23233        (WebInspector.ProfileObject.prototype.get isTemporary):
23234
232352012-02-22  Brian Weinstein  <bweinstein@apple.com>
23236
23237        Create a stub ProfileManager and add an initialize method.
23238        
23239        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23240
23241        Reviewed by Tim Hatcher.
23242
23243        * UserInterface/Main.html: Add new file.
23244        * UserInterface/Main.js:
23245        (WebInspector.contentLoaded): Create a profile manager.
23246        * UserInterface/ProfileManager.js: Added.
23247        (WebInspector.ProfileManager):
23248        (WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize):
23249
232502012-02-20  Brian Weinstein  <bweinstein@apple.com>
23251
23252        Rename CPUProfile to JavaScriptProfile.
23253        
23254        More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23255
23256        Reviewed by Tim Hatcher.
23257
23258        * UserInterface/JavaScriptProfileType.js:
23259        (WebInspector.JavaScriptProfileType):
23260        (WebInspector.JavaScriptProfileType.prototype.createView):
23261        * UserInterface/JavaScriptProfileView.js:
23262        (WebInspector.JavaScriptProfileView.prototype._changeView.set else):
23263
232642012-02-20  Brian Weinstein  <bweinstein@apple.com>
23265
23266        Bring in some files from open source.
23267        
23268        Start of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
23269
23270        Reviewed by Tim Hatcher.
23271
23272        * UserInterface/JavaScriptProfileType.js: Added. Copied from open source.
23273        * UserInterface/JavaScriptProfileView.js: Added. Copied from open source.
23274        * UserInterface/ProfileType.js: Added. Copied from open source.
23275
232762012-02-26  Timothy Hatcher  <timothy@apple.com>
23277
23278        Use insertionIndexForObjectInListSortedByFunction to efficiently build the timeline data grids.
23279
23280        Calling _sortCurrentDataGrid for each update was expensive since it removes all the rows and reinserts them.
23281
23282        Part of: <rdar://problem/10319553&10319567&10319571>
23283
23284        Reviewed by Joseph Pecoraro.
23285
23286        * UserInterface/DataGrid.js:
23287        (WebInspector.DataGridNode.prototype._attach): Fix a bug that prevented inserting the row in the right place.
23288        * UserInterface/TimelinesContentView.js:
23289        (WebInspector.TimelinesContentView.prototype._updatePendingRecords): Use insertionIndexForObjectInListSortedByFunction
23290        when there is a sortColumnIdentifier. Don't call _sortCurrentDataGrid anymore.
23291        (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid): Use _sortComparator.
23292        (WebInspector.TimelinesContentView.prototype._sortComparator): Added. Factored out of _sortCurrentDataGrid.
23293
232942012-02-26  Timothy Hatcher  <timothy@apple.com>
23295
23296        Show recoding status in the Instrument sidebar and allow manually starting and stopping recording.
23297
23298        Part of: <rdar://problem/10319553&10319567&10319571>
23299
23300        Reviewed by Joseph Pecoraro.
23301
23302        * Localizations/en.lproj/localizedStrings.js: Updated.
23303        * UserInterface/Images/Recording.png: Added.
23304        * UserInterface/Images/Recording@2x.png: Added.
23305        * UserInterface/Images/RecordingHovered.png: Added.
23306        * UserInterface/Images/RecordingHovered@2x.png: Added.
23307        * UserInterface/Images/RecordingStopped.png: Added.
23308        * UserInterface/Images/RecordingStopped@2x.png: Added.
23309        * UserInterface/InstrumentSidebarPanel.css:
23310        (.sidebar > .panel.instrument > .title-bar):
23311        (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph):
23312        (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.recording):
23313        (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph:hover):
23314        (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.recording:hover):
23315        (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.forced):
23316        (.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.recording.forced):
23317        (.sidebar > .panel.instrument > .title-bar.timelines > .record-status):
23318        * UserInterface/InstrumentSidebarPanel.js:
23319        (WebInspector.InstrumentSidebarPanel): Create glyph and status elements.
23320        (WebInspector.InstrumentSidebarPanel.prototype._recordingStarted): Added. Update glyph and status.
23321        (WebInspector.InstrumentSidebarPanel.prototype._recordingStopped): Added. Ditto.
23322        (WebInspector.InstrumentSidebarPanel.prototype._recordGlyphMousedOver): Added. Clear forced class.
23323        Update status to reflect what it will be if the button is clicked.
23324        (WebInspector.InstrumentSidebarPanel.prototype._recordGlyphMousedOut): Added. Restore current status.
23325        (WebInspector.InstrumentSidebarPanel.prototype._recordGlyphClicked): Added. Add forced class to prevent
23326        the glyph from showing a confusing status after click.
23327
233282012-02-26  Timothy Hatcher  <timothy@apple.com>
23329
23330        Draw the overview bar graph at the top of the timeline content view.
23331
23332        Part of: <rdar://problem/10319553&10319567&10319571>
23333
23334        Reviewed by Joseph Pecoraro.
23335
23336        * UserInterface/TimelineOverview.css:
23337        (.timeline-overview > .timeline > .bar-container):
23338        (.timeline-overview > .timeline .bar):
23339        (.timeline-overview > .timeline .bar.waiting):
23340        (.timeline-overview > .timeline.timeline-record-type-network .bar):
23341        (.timeline-overview > .timeline.timeline-record-type-layout .bar):
23342        (.timeline-overview > .timeline.timeline-record-type-script .bar):
23343        * UserInterface/TimelineOverview.js:
23344        (WebInspector.TimelineOverview): Create a bar container in each timeline.
23345        (WebInspector.TimelineOverview.prototype.update): Call _updateTimelineBars for each type.
23346        (WebInspector.TimelineOverview.prototype._updateTimelineBars): Added.
23347        (WebInspector.TimelineOverview.prototype._updateTimelineBars.computePercentages): Compute percentages
23348        for startTime and endTime.
23349        (WebInspector.TimelineOverview.prototype._updateTimelineBars.computeActivePercentages): Compute percentages
23350        for endTime and the start of activeDuration.
23351        (WebInspector.TimelineOverview.prototype._updateTimelineBars.addBar): Create a bar and append it.
23352        (WebInspector.TimelineOverview.prototype._updateTimelineBars.createBars): Iterate over the records and find
23353        the distribution on the graph.
23354
233552012-02-26  Timothy Hatcher  <timothy@apple.com>
23356
23357        Improve auto recording of timeline data so it stops at a reasonable time instead of a fixed 30 seconds.
23358
23359        Recording will now stop when there has been 1 second of dead time after the load event fires. Or after a
23360        maximum of 10 seconds after the load event fires. This works well for a number of large and small sites.
23361
23362        Part of: <rdar://problem/10319553&10319567&10319571>
23363
23364        Reviewed by Joseph Pecoraro.
23365
23366        * UserInterface/TimelineManager.js:
23367        (WebInspector.TimelineManager): Initialize _domContentLoadedEventTime and _loadEventTime. 
23368        (WebInspector.TimelineManager.prototype.get mainFrameLoadEventTime): Added.
23369        (WebInspector.TimelineManager.prototype.get mainFrameDOMContentLoadedEventTime): Added.
23370        (WebInspector.TimelineManager.prototype.startRecording): Initialize _domContentLoadedEventTime and _loadEventTime.
23371        (WebInspector.TimelineManager.prototype.stopRecording): Clear _deadTimeTimeout.
23372        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Process the MarkLoad and MarkDOMContent records.
23373        Call _stopAutoRecordingSoon for MarkLoad.
23374        (WebInspector.TimelineManager.prototype._addRecord): Call _resetAutoRecordingDeadTimeTimeout.
23375        (WebInspector.TimelineManager.prototype._startAutoRecording): Removed timeout for stopRecording.
23376        (WebInspector.TimelineManager.prototype._stopAutoRecordingSoon): Added. Start a timeout for the maximum time. Also
23377        call _resetAutoRecordingDeadTimeTimeout to start watching dead time.
23378        (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout): Added. Reset the dead time timeout.
23379
233802012-02-26  Timothy Hatcher  <timothy@apple.com>
23381
23382        Draw the times in the timeline overview header.
23383
23384        Part of: <rdar://problem/10319553&10319567&10319571>
23385
23386        Reviewed by Joseph Pecoraro.
23387
23388        * UserInterface/InstrumentSidebarPanel.css:
23389        (.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item:not(:first-child):not(.selected)): Reduce divider opacity.
23390        * UserInterface/TimelineOverview.css:
23391        (.timeline-overview > .header): Added.
23392        (.timeline-overview > .header > .divider): Added.
23393        (.timeline-overview > .header > .divider:last-child): Added.
23394        (.timeline-overview > .header > .divider > .label): Added.
23395        (.timeline-overview > .header > .divider:first-child > .label): Added.
23396        (.timeline-overview > .timeline): Added.
23397        (.timeline-overview > .timeline:not(:first-child)): Added.
23398        * UserInterface/TimelineOverview.js:
23399        (WebInspector.TimelineOverview): Create the header element and timeline rows.
23400        (WebInspector.TimelineOverview.prototype.get recordTypes): Added.
23401        (WebInspector.TimelineOverview.prototype.clear): Added. Reset the minimum and maximum boundaries. Call _updateHeaderTimes.
23402        (WebInspector.TimelineOverview.prototype.update): Added. Find the minimum and maximum times. Call _updateHeaderTimes.
23403        (WebInspector.TimelineOverview.prototype.updateLayout): Added. Call _updateHeaderTimes.
23404        (WebInspector.TimelineOverview.prototype._updateHeaderTimes): Added. Update the dividers and labels.
23405        * UserInterface/TimelinesContentView.js:
23406        (WebInspector.TimelinesContentView.prototype.updateLayout): Call updateLayout on the timeline overview.
23407        (WebInspector.TimelinesContentView.prototype.timelineOverviewRecordsWithType): Added.
23408        (WebInspector.TimelinesContentView.prototype._addRecordToDataGrid): Don't return early, call _updatePendingRecordsSoon.
23409        (WebInspector.TimelinesContentView.prototype._updatePendingRecordsSoon): Return early if not visible.
23410        (WebInspector.TimelinesContentView.prototype._updatePendingRecords): Call update on the timeline overview. Fix if statement.
23411        (WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh): Don't return early, call _updatePendingRecordsSoon.
23412
234132012-02-25  Timothy Hatcher  <timothy@apple.com>
23414
23415        Add the start of WebInspector.TimelineOverview, the overview graph at the top of the timeline content view.
23416
23417        Part of: <rdar://problem/10319553&10319567&10319571>
23418
23419        Reviewed by Joseph Pecoraro.
23420
23421        * UserInterface/Main.html:
23422        * UserInterface/TimelineOverview.css: Added.
23423        (.timeline-overview):
23424        * UserInterface/TimelineOverview.js: Added.
23425        (WebInspector.TimelineOverview):
23426        (WebInspector.TimelineOverview.prototype.get element):
23427        * UserInterface/TimelinesContentView.css:
23428        (.content-view.timelines > .timeline-overview):
23429        * UserInterface/TimelinesContentView.js:
23430
234312012-02-25  Timothy Hatcher  <timothy@apple.com>
23432
23433        Add a way to jump to resource source code from the Network and Script timeline data grid.
23434
23435        Part of: <rdar://problem/10319553&10319567>
23436
23437        Reviewed by Brian Weinstein.
23438
23439        * UserInterface/DataGrid.js:
23440        (WebInspector.DataGrid): Remove capture on the click and mousedown events. This allows the go-to
23441        to prevent row selection in the data grid.
23442        * UserInterface/ImageUtilities.js:
23443        (generateColoredImage): Added support for adjusting the alpha by multiplying.
23444        (generateColoredImagesForCSS.generateImage): Pass along the fillColor alpha.
23445        * UserInterface/Main.css:
23446        (.go-to-arrow): Added.
23447        (.go-to-arrow:active): Added.
23448        (:focus .selected .go-to-arrow): Added.
23449        (:focus .selected .go-to-arrow:active): Added.
23450        * UserInterface/Main.js:
23451        (WebInspector.createGoToArrowButton.stopPropagation): Added.
23452        (WebInspector.createGoToArrowButton): Added. Generate the images and button element.
23453        * UserInterface/ResourceTimelineDataGridNode.js:
23454        (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): Append a go-to button to the name column.
23455        (WebInspector.ResourceTimelineDataGridNode.prototype._goToResource): Added. Show the resource.
23456        * UserInterface/ScriptTimelineDataGridNode.js:
23457        (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Append a go-to button to the resource column.
23458        (WebInspector.ScriptTimelineDataGridNode.prototype._goToResource): Added. Show the resource and line.
23459        * UserInterface/TimelinesContentView.css:
23460        (.content-view.timelines > .data-grid td .go-to-arrow): Added. Float right, hidden by default
23461        (.content-view.timelines > .data-grid tr:hover .go-to-arrow): Added. Show the button.
23462
234632012-02-25  Timothy Hatcher  <timothy@apple.com>
23464
23465        Fix some exceptions that occurred when clicking on a resource in the Issues sidebar.
23466
23467        Reviewed by John Sullivan.
23468
23469        * UserInterface/TextResourceContentView.js:
23470        (WebInspector.TextResourceContentView): Move _issues and _contentPopulated above the call to the ResourceContentView
23471        constructor since addIssue needs them and ResourceContentView populates the issues.
23472
234732012-02-25  Timothy Hatcher  <timothy@apple.com>
23474
23475        Share code for generating disclosure triangles so it can be used in other places.
23476
23477        Reviewed by John Sullivan.
23478
23479        * UserInterface/DetailsSection.js:
23480        (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded): Use generateColoredImagesForCSS.
23481        * UserInterface/ImageUtilities.js:
23482        (generateColoredImagesForCSS): Added. Copied from NavigationSidebarPanel and made generic.
23483        (generateColoredImagesForCSS.imageLoaded): Added.
23484        (generateColoredImagesForCSS.generateImage): Added.
23485        * UserInterface/NavigationSidebarPanel.js:
23486        (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded): Use generateColoredImagesForCSS.
23487
234882012-02-24  Timothy Hatcher  <timothy@apple.com>
23489
23490        Populate the Script data grid in the timeline content view.
23491
23492        Part of: <rdar://problem/10319567> Implement the Script instrument for the new Web Inspector design
23493
23494        Reviewed by Brian Weinstein.
23495
23496        * Localizations/en.lproj/localizedStrings.js: Updated.
23497        * UserInterface/Main.html: Included ScriptTimelineDataGridNode.js and ScriptTimelineRecord.js.
23498        * UserInterface/ScriptTimelineDataGridNode.js: Added.
23499        (WebInspector.ScriptTimelineDataGridNode):
23500        (WebInspector.ScriptTimelineDataGridNode.prototype.get record):
23501        (WebInspector.ScriptTimelineDataGridNode.prototype.get data):
23502        (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
23503        * UserInterface/ScriptTimelineRecord.js: Added.
23504        (WebInspector.ScriptTimelineRecord):
23505        (WebInspector.ScriptTimelineRecord.EventType.displayName):
23506        (WebInspector.ScriptTimelineRecord.prototype.get eventType):
23507        (WebInspector.ScriptTimelineRecord.prototype.get details):
23508        (WebInspector.ScriptTimelineRecord.prototype.get resource):
23509        (WebInspector.ScriptTimelineRecord.prototype.get lineNumber):
23510        * UserInterface/TimelineManager.js:
23511        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Handle script record types.
23512        (WebInspector.TimelineManager.prototype.eventRecorded): Pass along the parent record to processRecord.
23513        * UserInterface/TimelinesContentView.css:
23514        (.content-view.timelines > .data-grid .resource-column .icon): Updated the selector to work with name-column and resource-column.
23515        * UserInterface/TimelinesContentView.js:
23516        (WebInspector.TimelinesContentView):
23517        (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid.comparator): Handle WebInspector.Resource values.
23518        (WebInspector.TimelinesContentView.prototype._createDataGridNodeForRecord): Create a ScriptTimelineDataGridNode.
23519
235202012-02-24  Timothy Hatcher  <timothy@apple.com>
23521
23522        Populate the Layout & Rendering data grid in timeline content view.
23523
23524        Part of: <rdar://problem/10319571> Implement the Rendering instrument for the new Web Inspector design
23525
23526        Reviewed by Brian Weinstein.
23527
23528        * Localizations/en.lproj/localizedStrings.js: Updated.
23529        * UserInterface/LayoutTimelineDataGridNode.js: Added.
23530        (WebInspector.LayoutTimelineDataGridNode):
23531        (WebInspector.LayoutTimelineDataGridNode.prototype.get record):
23532        (WebInspector.LayoutTimelineDataGridNode.prototype.get data):
23533        (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
23534        * UserInterface/LayoutTimelineRecord.js: Added.
23535        (WebInspector.LayoutTimelineRecord):
23536        (WebInspector.LayoutTimelineRecord.EventType.displayName):
23537        (WebInspector.LayoutTimelineRecord.prototype.get eventType):
23538        (WebInspector.LayoutTimelineRecord.prototype.get x):
23539        (WebInspector.LayoutTimelineRecord.prototype.get y):
23540        (WebInspector.LayoutTimelineRecord.prototype.get width):
23541        (WebInspector.LayoutTimelineRecord.prototype.get height):
23542        (WebInspector.LayoutTimelineRecord.prototype.get area):
23543        * UserInterface/Main.html: Included LayoutTimelineRecord.js and LayoutTimelineDataGridNode.js.
23544        * UserInterface/TimelineManager.js:
23545        (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Create record objects for each type.
23546        (WebInspector.TimelineManager.prototype.eventRecorded): Iterate over the records.
23547        * UserInterface/TimelinesContentView.js:
23548        (WebInspector.TimelinesContentView): Create columns for the Layout data grid.
23549        (WebInspector.TimelinesContentView.prototype._createDataGridNodeForRecord): Create a LayoutTimelineDataGridNode.
23550
235512012-02-22  Timothy Hatcher  <timothy@apple.com>
23552
23553        Adjust the output of Number.secondsToString to give higher resolution for < 100ms.
23554
23555        Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
23556
23557        Reviewed by Brian Weinstein.
23558
23559        * Localizations/en.lproj/localizedStrings.js: Updated.
23560        * UserInterface/Utilities.js:
23561        (Number.secondsToString): Show more decimal points for < 100ms. Reduce the number of
23562        decimal points in higher resolution mode as well.
23563
235642012-02-22  Timothy Hatcher  <timothy@apple.com>
23565
23566        Support sorting the data grids in the timeline view.
23567
23568        Part of: <rdar://problem/10319553&10319567&10319571>
23569
23570        Reviewed by Brian Weinstein.
23571
23572        * UserInterface/DataGrid.css:
23573        (.data-grid th.sort-descending > div): Add some padding so the sort direction arrow does not overlap the text.
23574        * UserInterface/Resource.js:
23575        (WebInspector.Resource): Initialize _cached so it can sort properly.
23576        * UserInterface/TimelinesContentView.js:
23577        (WebInspector.TimelinesContentView): Add event listeners for sorting changes.
23578        (WebInspector.TimelinesContentView.prototype._updatePendingRecords): Call _sortCurrentDataGrid.
23579        (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid): Added.
23580        (WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid.comparator): Added.
23581
235822012-02-22  Timothy Hatcher  <timothy@apple.com>
23583
23584        Separate data from presentation in ResourceTimelineDataGridNode to make it easy to sort using the raw data.
23585
23586        Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
23587
23588        Reviewed by Brian Weinstein.
23589
23590        * UserInterface/DataGrid.js:
23591        (WebInspector.DataGridNode.prototype.createCell): Make a text node if the content isn't a Node.
23592        (WebInspector.DataGridNode.prototype.createCellContent): Return raw data. The text node is made by the caller.
23593        * UserInterface/ResourceTimelineDataGridNode.js:
23594        (WebInspector.ResourceTimelineDataGridNode.prototype.get data): Return the raw data instead of formatted data.
23595        (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): Format the data based on the column.
23596
235972012-02-22  Timothy Hatcher  <timothy@apple.com>
23598
23599        Cause network records to update in batches with any new records being added to reduce flashing.
23600
23601        Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
23602
23603        Reviewed by Brian Weinstein.
23604
23605        * UserInterface/ResourceTimelineDataGridNode.js:
23606        (WebInspector.ResourceTimelineDataGridNode): Update event listeners to call _needsRefresh.
23607        (WebInspector.ResourceTimelineDataGridNode.prototype.get record): Added.
23608        (WebInspector.ResourceTimelineDataGridNode.prototype.refresh): Remove timeout check.
23609        (WebInspector.ResourceTimelineDataGridNode.prototype._needsRefresh): Renamed from _refreshSoon. Fire
23610        NeedsRefresh event.
23611        * UserInterface/TimelinesContentView.js:
23612        (WebInspector.TimelinesContentView): Add event listener for NeedsRefresh.
23613        (WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Call _updatePendingRecords.
23614        (WebInspector.TimelinesContentView.prototype.shown): Call _updatePendingRecords.
23615        (WebInspector.TimelinesContentView.prototype._addRecordToDataGrid): Call _updatePendingRecordsSoon.
23616        (WebInspector.TimelinesContentView.prototype._updatePendingRecordsSoon): Renamed from _addPendingRecordsSoon.
23617        (WebInspector.TimelinesContentView.prototype._updatePendingRecords): Renamed from _addPendingRecords. Also
23618        refresh pending grid nodes.
23619        (WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh): Added. Store the grid node and
23620        call _updatePendingRecordsSoon.
23621
236222012-02-22  Timothy Hatcher  <timothy@apple.com>
23623
23624        Properly record main resources for all frames in the Network timeline.
23625
23626        Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
23627
23628        Reviewed by Brian Weinstein.
23629
23630        * UserInterface/TimelineManager.js:
23631        (WebInspector.TimelineManager): Change MainFrameDidChange listener to _mainResourceDidChange.
23632        (WebInspector.TimelineManager.prototype._startAutoRecording): Return true if recording started.
23633        (WebInspector.TimelineManager.prototype._mainResourceDidChange): Added. Call _startAutoRecording,
23634        return early if true. Add the main resource as a record if it isn't the auto recording resource.
23635
236362012-02-22  Timothy Hatcher  <timothy@apple.com>
23637
23638        Always clear records and restart recording when navigating to a new page.
23639
23640        Part of: <rdar://problem/10319553&10319567&10319571>
23641
23642        Reviewed by Brian Weinstein.
23643
23644        * UserInterface/TimelineManager.js:
23645        (WebInspector.TimelineManager.prototype.stopRecording): Clear _autoRecordingMainResourceRequestIdentifier.
23646        (WebInspector.TimelineManager.prototype._startAutoRecording): Set _autoRecordingMainResourceRequestIdentifier.
23647        Don't return early if _autoRecordingMainResourceRequestIdentifier.
23648
236492012-02-22  Timothy Hatcher  <timothy@apple.com>
23650
23651        Show resource icons and failed loads in the Network data grid.
23652
23653        Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
23654
23655        Reviewed by Brian Weinstein.
23656
23657        * UserInterface/DataGrid.js:
23658        (WebInspector.DataGridNode.prototype.createCell): Call createCellContent.
23659        (WebInspector.DataGridNode.prototype.createCellContent): Added. Make a text node.
23660        * UserInterface/ResourceTimelineDataGridNode.js:
23661        (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): Added. Create a fragment
23662        for the name column with an icon. Add the error class to all cells for failed loads.
23663        * UserInterface/TimelinesContentView.css:
23664        (.content-view.timelines > .data-grid .name-column .icon): Added.
23665        (.content-view.timelines > .data-grid td.error): Added. Color red.
23666        (.content-view.timelines > .data-grid tr.selected td.error): Added. Color white.
23667
236682012-02-21  Timothy Hatcher  <timothy@apple.com>
23669
23670        Start populating the Network timeline data grid with resource load information.
23671
23672        Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
23673
23674        Reviewed by Brian Weinstein.
23675
23676        * Localizations/en.lproj/localizedStrings.js: Updated.
23677        * UserInterface/Main.html: Included ResourceTimelineDataGridNode.js.
23678        * UserInterface/Resource.js:
23679        (WebInspector.Resource): Initialize _responseHeaders to avoid an exception.
23680        (WebInspector.Resource.prototype.get statusCode): Added.
23681        (WebInspector.Resource.prototype.get statusText): Added.
23682        * UserInterface/ResourceTimelineDataGridNode.js: Added.
23683        (WebInspector.ResourceTimelineDataGridNode):
23684        (WebInspector.ResourceTimelineDataGridNode.prototype.get data):
23685        * UserInterface/ResourceTimelineRecord.js:
23686        (WebInspector.ResourceTimelineRecord): Add event listener for TimestampsDidChange.
23687        (WebInspector.ResourceTimelineRecord.prototype._dispatchUpdatedEvent): Added. Fire Updated event.
23688        * UserInterface/TimelinesContentView.css:
23689        (.content-view.timelines > .data-grid td:last-child):
23690        (.content-view.timelines > .data-grid td):
23691        * UserInterface/TimelinesContentView.js:
23692        (WebInspector.TimelinesContentView): Create the Network data grid headers and populate _pendingRecords.
23693        (WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Call updateWidths
23694        and _addPendingRecords.
23695        (WebInspector.TimelinesContentView.prototype.updateLayout): Added.
23696        (WebInspector.TimelinesContentView.prototype.shown): Call _addPendingRecords.
23697        (WebInspector.TimelinesContentView.prototype._recordingStarted): Added.
23698        (WebInspector.TimelinesContentView.prototype._recordAdded): Added.
23699        (WebInspector.TimelinesContentView.prototype._addRecordToDataGrid): Added.
23700        (WebInspector.TimelinesContentView.prototype._addPendingRecordsSoon): Added.
23701        (WebInspector.TimelinesContentView.prototype._addPendingRecords): Added.
23702        (WebInspector.TimelinesContentView.prototype._createDataGridNodeForRecord): Added.
23703        * UserInterface/Utilities.js:
23704        (Number.secondsToString): Added. Copied from open source.
23705
237062012-02-21  Timothy Hatcher  <timothy@apple.com>
23707
23708        Make showing a timeline switch to a different data grid and reflect the selected timeline
23709        in the sidebar and the navigation bar.
23710
23711        Also make the timeline show when reopening the inspector when it was showing last time.
23712
23713        Part of: <rdar://problem/10319553&10319567&10319571>
23714
23715        Reviewed by Brian Weinstein.
23716
23717        * UserInterface/InstrumentSidebarPanel.js:
23718        (WebInspector.InstrumentSidebarPanel): Don't store the tree elements on this. Create a map of tree elements
23719        based on the the record type.
23720        (WebInspector.InstrumentSidebarPanel.prototype.showTimeline): Added.
23721        (WebInspector.InstrumentSidebarPanel.prototype.showTimelineForRecordType): Added. Select the tree element.
23722        (WebInspector.InstrumentSidebarPanel.prototype.cookieForContentView): Added.
23723        (WebInspector.InstrumentSidebarPanel.prototype.showContentViewForCookie): Added.
23724        (WebInspector.InstrumentSidebarPanel.prototype._timelinesTreeElementSelected):
23725        * UserInterface/TimelinesContentView.js:
23726        (WebInspector.TimelinesContentView.createPathComponent): Added.
23727        (WebInspector.TimelinesContentView): Create the path components and test data grids.
23728        (WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Added. Show the data grid. Update
23729        the path component. Tell the sidebar panel to select the right tree element.
23730        (WebInspector.TimelinesContentView.prototype.get selectionPathComponents): Added.
23731        (WebInspector.TimelinesContentView.prototype.shown): Added.
23732        (WebInspector.TimelinesContentView.prototype._pathComponentSelected): Added.
23733
237342012-02-21  Timothy Hatcher  <timothy@apple.com>
23735
23736        Add WebInspector.TimelineRecord and WebInspector.ResourceTimelineRecord. Start recording Network records on load.
23737
23738        Part of: <rdar://problem/10319553&10319567&10319571>
23739
23740        Reviewed by Brian Weinstein.
23741
23742        * UserInterface/Main.html:
23743        * UserInterface/ResourceTimelineRecord.js: Added.
23744        (WebInspector.ResourceTimelineRecord):
23745        (WebInspector.ResourceTimelineRecord.prototype.get resource):
23746        (WebInspector.ResourceTimelineRecord.prototype.get startTime):
23747        (WebInspector.ResourceTimelineRecord.prototype.get endTime):
23748        (WebInspector.ResourceTimelineRecord.prototype.get waitingDuration):
23749        (WebInspector.ResourceTimelineRecord.prototype.get activeDuration):
23750        * UserInterface/TimelineManager.js:
23751        (WebInspector.TimelineManager): Listen for Frame events. Initialize properties.
23752        (WebInspector.TimelineManager.prototype.get recording): Added.
23753        (WebInspector.TimelineManager.prototype.get records): Added.
23754        (WebInspector.TimelineManager.prototype.get recordsWithType): Added.
23755        (WebInspector.TimelineManager.prototype.startRecording): Clear records. Dispatch RecordingStarted event.
23756        (WebInspector.TimelineManager.prototype.stopRecording): Clear timeout. Dispatch RecordingStopped event.
23757        (WebInspector.TimelineManager.prototype._addRecord): Added. Adds record and dispatches RecordAdded event.
23758        (WebInspector.TimelineManager.prototype._startAutoRecording): Added. Start recording and 
23759        (WebInspector.TimelineManager.prototype._resourceWasAdded): Added. Create a record.
23760        * UserInterface/TimelineRecord.js: Added.
23761        (WebInspector.TimelineRecord):
23762        (WebInspector.TimelineRecord.prototype.get startTime):
23763        (WebInspector.TimelineRecord.prototype.get endTime):
23764        (WebInspector.TimelineRecord.prototype.get duration):
23765        (WebInspector.TimelineRecord.prototype.get waitingDuration):
23766        (WebInspector.TimelineRecord.prototype.get activeDuration):
23767
237682012-02-20  Timothy Hatcher  <timothy@apple.com>
23769
23770        Add WebInspector.TimelineObserver and WebInspector.TimelineManager.
23771
23772        Part of: <rdar://problem/10319553&10319567&10319571>
23773
23774        Reviewed by Brian Weinstein.
23775
23776        * UserInterface/Main.html: Included TimelineManager.js and TimelineObserver.js.
23777        * UserInterface/Main.js: Create an instance of TimelineManager.
23778        (WebInspector.contentLoaded):
23779        * UserInterface/TimelineManager.js: Added.
23780        (WebInspector.TimelineManager):
23781        (WebInspector.TimelineManager.prototype.startRecording):
23782        (WebInspector.TimelineManager.prototype.stopRecording):
23783        (WebInspector.TimelineManager.prototype.eventRecorded):
23784        * UserInterface/TimelineObserver.js: Added.
23785        (WebInspector.TimelineObserver):
23786        (WebInspector.TimelineObserver.prototype.eventRecorded): Call TimelineManager.
23787
237882012-02-20  Timothy Hatcher  <timothy@apple.com>
23789
23790        Change the names for the Instrument timelines based on feedback from Adam.
23791
23792        Now: "Network Requests", "Layout & Rendering" and "JavaScript & Events".
23793
23794        Reviewed by Adam Roben.
23795
23796        * Localizations/en.lproj/localizedStrings.js: Updated.
23797        * UserInterface/InstrumentSidebarPanel.js:
23798        (WebInspector.InstrumentSidebarPanel): Update the tree element titles.
23799
238002012-02-19  Timothy Hatcher  <timothy@apple.com>
23801
23802        Record network timestamps on WebInspector.Resource along with HTTP response status and sizes.
23803
23804        Needed for: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
23805
23806        Reviewed by Joseph Pecoraro.
23807
23808        * UserInterface/FrameResourceManager.js:
23809        (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Added timestamp parameter.
23810        (WebInspector.FrameResourceManager.prototype.markResourceRequestAsServedFromMemoryCache): Added.
23811        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Added timestamp parameter.
23812        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Ditto.
23813        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveData): Added.
23814        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Added timestamp parameter.
23815        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Ditto.
23816        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Ditto.
23817        * UserInterface/NetworkObserver.js:
23818        (WebInspector.NetworkObserver.prototype.requestWillBeSent): Pass along timestamp.
23819        (WebInspector.NetworkObserver.prototype.requestServedFromCache): Call markResourceRequestAsServedFromMemoryCache.
23820        (WebInspector.NetworkObserver.prototype.responseReceived): Pass along timestamp.
23821        (WebInspector.NetworkObserver.prototype.dataReceived): Call resourceRequestDidReceiveData.
23822        (WebInspector.NetworkObserver.prototype.loadingFinished): Pass along timestamp.
23823        (WebInspector.NetworkObserver.prototype.loadingFailed): Ditto.
23824        (WebInspector.NetworkObserver.prototype.requestServedFromMemoryCache): Ditto.
23825        * UserInterface/Resource.js:
23826        (WebInspector.Resource): Added timestamp parameter.
23827        (WebInspector.Resource.prototype.get requestSentTimestamp): Added.
23828        (WebInspector.Resource.prototype.get lastRedirectReceivedTimestamp): Added.
23829        (WebInspector.Resource.prototype.get responseReceivedTimestamp): Added.
23830        (WebInspector.Resource.prototype.get lastDataReceivedTimestamp): Added.
23831        (WebInspector.Resource.prototype.get finishedOrFailedTimestamp): Added.
23832        (WebInspector.Resource.prototype.get duration): Added.
23833        (WebInspector.Resource.prototype.get latency): Added.
23834        (WebInspector.Resource.prototype.get receiveDuration): Added.
23835        (WebInspector.Resource.prototype.get cached): Added.
23836        (WebInspector.Resource.prototype.get size): Added.
23837        (WebInspector.Resource.prototype.get transferSize): Added.
23838        (WebInspector.Resource.prototype.updateForRedirectResponse): Added timestamp parameter.
23839        (WebInspector.Resource.prototype.updateForResponse): Ditto.
23840        (WebInspector.Resource.prototype.increaseSize): Added.
23841        (WebInspector.Resource.prototype.increaseTransferSize): Added.
23842        (WebInspector.Resource.prototype.markAsCached): Added.
23843        (WebInspector.Resource.prototype.markAsFinished): Added timestamp parameter.
23844        (WebInspector.Resource.prototype.markAsFailed): Ditto.
23845
238462012-02-19  Timothy Hatcher  <timothy@apple.com>
23847
23848        Show empty content messages for no search results, no recorded profiles and no storage.
23849
23850        Reviewed by Joseph Pecoraro.
23851
23852        * Localizations/en.lproj/localizedStrings.js: Updated.
23853        * UserInterface/InstrumentSidebarPanel.css:
23854        (.sidebar > .panel.instrument > .empty-content-placeholder): Position with the content.
23855        * UserInterface/InstrumentSidebarPanel.js:
23856        (WebInspector.InstrumentSidebarPanel): Call updateEmptyContentPlaceholder.
23857        * UserInterface/NavigationSidebarPanel.css:
23858        (.sidebar > .panel.navigation > .empty-content-placeholder): Use a flex box to center the message.
23859        * UserInterface/NavigationSidebarPanel.js:
23860        (WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder): Added. Helper.
23861        (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults): Set and unset _emptyFilterResults.
23862        * UserInterface/SearchSidebarPanel.css:
23863        (.sidebar > .panel.search > .empty-content-placeholder): Position with the content.
23864        * UserInterface/SearchSidebarPanel.js:
23865        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.updateEmptyContentPlaceholderSoon): Added.
23866        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.updateEmptyContentPlaceholder): Added.
23867        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.resourcesCallback.resourceCallback): Call
23868        updateEmptyContentPlaceholderSoon before any return.
23869        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.resourcesCallback): Ditto.
23870        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.domCallback.domSearchResults): Ditto.
23871        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.domCallback): Ditto.
23872        * UserInterface/StorageSidebarPanel.js:
23873        (WebInspector.StorageSidebarPanel): Call _updateEmptyContentPlaceholder.
23874        (WebInspector.StorageSidebarPanel.prototype._updateEmptyContentPlaceholder): Added.
23875        (WebInspector.StorageSidebarPanel.prototype._addChild): Call _updateEmptyContentPlaceholder.
23876        (WebInspector.StorageSidebarPanel.prototype._storageCleared): Call _updateEmptyContentPlaceholder.
23877
238782012-02-19  Timothy Hatcher  <timothy@apple.com>
23879
23880        Make DataGrid have a custom style in the timelines content view.
23881
23882        Larger headers with matching gradient to the sidebar panel. Also larger rows with a grey alternating row color.
23883
23884        Part of: <rdar://problem/10319553&10319567&10319571>
23885
23886        Reviewed by Brian Weinstein.
23887
23888        * UserInterface/Main.html:
23889        * UserInterface/TimelinesContentView.css: Added.
23890        (.content-view.timelines > .data-grid):
23891        (.content-view.timelines > .data-grid th):
23892        (.content-view.timelines > .data-grid th:not(:last-child)):
23893        (.content-view.timelines > .data-grid th.sortable:active):
23894        (.content-view.timelines > .data-grid th.sort-descending):
23895        (.content-view.timelines > .data-grid .data-container):
23896        (.content-view.timelines > .data-grid table.data):
23897        (.content-view.timelines > .data-grid td):
23898        (.content-view.timelines > .data-grid td:not(:last-child)):
23899        * UserInterface/TimelinesContentView.js:
23900        (WebInspector.TimelinesContentView): Create a dummy DataGrid for position and style testing.
23901
239022012-02-19  Timothy Hatcher  <timothy@apple.com>
23903
23904        Add an empty content view for the Instrument sidebar timelines.
23905
23906        Part of: <rdar://problem/10318728> Implement the Instrument sidebar for the new Web Inspector design
23907
23908        Reviewed by Brian Weinstein.
23909
23910        * UserInterface/ContentView.js:
23911        (WebInspector.ContentView): Added check for TimelinesObject.
23912        (WebInspector.ContentView.isViewable): Added check for TimelinesObject.
23913        * UserInterface/Images/Stopwatch.png: Added.
23914        * UserInterface/Images/Stopwatch@2x.png: Added.
23915        * UserInterface/InstrumentIcons.css:
23916        (.stopwatch-icon .icon):
23917        * UserInterface/InstrumentSidebarPanel.js:
23918        (WebInspector.InstrumentSidebarPanel): Create the _timelinesElement and an instance of TimelinesObject.
23919        (WebInspector.InstrumentSidebarPanel.prototype.treeElementForRepresentedObject): Added.
23920        (WebInspector.InstrumentSidebarPanel.prototype._timelinesTreeElementSelected): Added.
23921        * UserInterface/Main.html: Included TimelinesContentView.js and TimelinesObject.js.
23922        * UserInterface/Main.js:
23923        (WebInspector.sidebarPanelForRepresentedObject): Added check for TimelinesObject.
23924        * UserInterface/TimelinesContentView.js: Added.
23925        (WebInspector.TimelinesContentView):
23926        * UserInterface/TimelinesObject.js: Added.
23927        (WebInspector.TimelinesObject):
23928
239292012-02-18  Timothy Hatcher  <timothy@apple.com>
23930
23931        Start implementing the user interface for the Instrument sidebar panel.
23932
23933        This adds the Loading, Rendering and Scripting tree elements to the top of the sidebar.
23934
23935        Part of: <rdar://problem/10318728> Implement the Instrument sidebar for the new Web Inspector design
23936
23937        Reviewed by Brian Weinstein.
23938
23939        * Localizations/en.lproj/localizedStrings.js: Updated.
23940        * UserInterface/Images/Colors.png: Added.
23941        * UserInterface/Images/Colors@2x.png: Added.
23942        * UserInterface/Images/Network.png: Added.
23943        * UserInterface/Images/Network@2x.png: Added.
23944        * UserInterface/Images/Script.png: Added.
23945        * UserInterface/Images/Script@2x.png: Added.
23946        * UserInterface/InstrumentIcons.css: Added.
23947        (.network-icon .icon):
23948        (.colors-icon .icon):
23949        (.script-icon .icon):
23950        * UserInterface/InstrumentSidebarPanel.css: Added.
23951        (.sidebar > .panel.instrument > .title-bar):
23952        (.sidebar > .panel.instrument > .title-bar.timelines):
23953        (.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines):
23954        (.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item:not(:first-child):not(.selected)):
23955        (.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item.selected + .item):
23956        (.sidebar > .panel.instrument > .title-bar.profiles):
23957        (.sidebar > .panel.instrument > .content):
23958        * UserInterface/InstrumentSidebarPanel.js:
23959        (WebInspector.InstrumentSidebarPanel): Create the title abrs and tree outline.
23960        * UserInterface/Main.html: Included InstrumentSidebarPanel.css and InstrumentIcons.css.
23961
239622012-02-18  Timothy Hatcher  <timothy@apple.com>
23963
23964        Add support for hiding the disclosure triangle column for sidebar panels that don't have a hierarchy.
23965
23966        The only panel we have like this right now is Log, but Instrument will also use it.
23967
23968        Reviewed by Brian Weinstein.
23969
23970        * UserInterface/LogSidebarPanel.js:
23971        (WebInspector.LogSidebarPanel): Set HideDisclosureButtonsStyleClassName on the contentTreeOutlineElement.
23972        * UserInterface/NavigationSidebarPanel.css:
23973        (.navigation-sidebar-panel-content-tree-outline .item): Remove a margin-top that was pushing all items down
23974        for no good reason.
23975        (.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons > .children): Added.
23976        (.navigation-sidebar-panel-content-tree-outline > .children.hide-disclosure-buttons > .children): Added.
23977        (.navigation-sidebar-panel-content-tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) .icon): Added.
23978        (.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons .item .disclosure-button): Added.
23979        * UserInterface/NavigationSidebarPanel.js:
23980
239812012-02-18  Timothy Hatcher  <timothy@apple.com>
23982
23983        Add WebInspector.InstrumentSidebarPanel.
23984
23985        Part of: <rdar://problem/10318728> Implement the Instrument sidebar for the new Web Inspector design
23986
23987        Reviewed by Brian Weinstein.
23988
23989        * UserInterface/InstrumentSidebarPanel.js: Added.
23990        (WebInspector.InstrumentSidebarPanel):
23991        * UserInterface/Main.html: Included InstrumentSidebarPanel.js.
23992        * UserInterface/Main.js:
23993        (WebInspector.contentLoaded): Create an instance of InstrumentSidebarPanel.
23994
239952012-02-20  Jeff Miller  <jeffm@apple.com>
23996
23997        Ignore files generated by Xcode inside WebInspectorUI.xcodeproj.
23998
23999        * WebInspectorUI.xcodeproj: Added property svn:ignore.
24000
240012012-02-17  Timothy Hatcher  <timothy@apple.com>
24002
24003        Fix a couple of issues where settings were not being retrieved or stored.
24004
24005        Reviewed by John Sullivan.
24006
24007        * UserInterface/Setting.js:
24008        (WebInspector.Setting.prototype.get value): Make a copy of the default value so changes to object values don't modify the default value.
24009        Switch a use of _name to _localStorageKey when checking if the key in in localStorage.
24010        (WebInspector.Setting.prototype.set value): Use Object.shallowEqual to better check if objects are equal.
24011        * UserInterface/Utilities.js:
24012        (Object.defineProperty): Return early if a or b are null. null is an object, but Object.keys throws for null.
24013
240142012-02-17  Timothy Hatcher  <timothy@apple.com>
24015
24016        Fix an exception when using the Web Inspector with empty settings.
24017
24018        Reviewed by Brian Weinstein.
24019
24020        * UserInterface/DOMTreeContentView.js:
24021        (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable): Null check this._lastSelectedNodePathSetting.value
24022        and this._lastSelectedNodePathSetting.value.path.
24023
240242012-02-17  Timothy Hatcher  <timothy@apple.com>
24025
24026        Prefix the setting keys in localStorage with "com.apple.WebInspector".
24027
24028        The Web Inspector is loaded from a file url it share localStorage with other local files.
24029        This prevents conflicting with another key.
24030
24031        Reviewed by Brian Weinstein.
24032
24033        * UserInterface/Setting.js:
24034        (WebInspector.Setting): Set _localStorageKey.
24035        (WebInspector.Setting.prototype.get value): Use _localStorageKey.
24036        (WebInspector.Setting.prototype.set value): Ditto.
24037
240382012-02-17  Timothy Hatcher  <timothy@apple.com>
24039
24040        Cache setting values locally to avoid JSON and localStorage when the value doesn't change often.
24041        This mimics r107953 from open source with some style cleanup.
24042
24043        Reviewed by Brian Weinstein.
24044
24045        * UserInterface/Setting.js:
24046        (WebInspector.Setting.prototype.get value): Return this._value if it exists.
24047        (WebInspector.Setting.prototype.set value): Set _value.
24048
240492012-02-16  Timothy Hatcher  <timothy@apple.com>
24050
24051        Don't store settings in localStorage with values equal to the default value.
24052
24053        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24054
24055        Reviewed by Ada Chan.
24056
24057        * UserInterface/Setting.js:
24058        (WebInspector.Setting.prototype.set value): Call removeItem if the value equals the default value.
24059
240602012-02-17  Timothy Hatcher  <timothy@apple.com>
24061
24062        Remember the last selected DOM node between reloads and Inspector sessions.
24063
24064        Last part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24065
24066        Reviewed by Brian Weinstein.
24067
24068        * UserInterface/DOMTreeContentView.js:
24069        (WebInspector.DOMTreeContentView): Create the setting. Use _requestRootDOMNode.
24070        (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable): Try to select the last DOM node
24071        if the URL matches, otherwise just select the body or document element.
24072        (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectNode): Added.
24073        (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectLastSelectedNode): Added.
24074        (WebInspector.DOMTreeContentView.prototype._rootDOMNodeInvalidated): Don't set rootDOMNode to null.
24075        This minimizes DOM tree churn and better matches what the open source inspector does.
24076        (WebInspector.DOMTreeContentView.prototype._requestRootDOMNode): Added helper.
24077        (WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange): Remember the selected node path.
24078        * UserInterface/DOMTreeUpdater.js:
24079        (WebInspector.DOMTreeUpdater.prototype._reset): Don't set rootDOMNode to null. DOMTreeContentView handles it.
24080
240812012-02-17  Timothy Hatcher  <timothy@apple.com>
24082
24083        Minimize the number of times DOMTree's RootDOMNodeInvalidated event fires.
24084
24085        This was causing some DOM tree churn on reload. There is still some churn, but this helps.
24086
24087        Reviewed by Brian Weinstein.
24088
24089        * UserInterface/DOMTree.js:
24090        (WebInspector.DOMTree): Only add extra event listeners when not the main frame.
24091        (WebInspector.DOMTree.prototype.get frame): Added for good measure, will be needed soon.
24092        (WebInspector.DOMTree.prototype.requestRootDOMNode): Bump the request identifier.
24093        (WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Check the request identifier.
24094        (WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Ditto.
24095        (WebInspector.DOMTree.prototype.requestRootDOMNode.dispatchCallbacks): Ditto.
24096        (WebInspector.DOMTree.prototype._nodeRemoved): Assert not the main frame.
24097        (WebInspector.DOMTree.prototype._frameMainResourceDidChange): Ditto.
24098
240992012-02-16  Timothy Hatcher  <timothy@apple.com>
24100
24101        Add support to the storage sidebar panel to restore the last content view.
24102
24103        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24104
24105        Reviewed by Brian Weinstein.
24106
24107        * UserInterface/StorageSidebarPanel.js:
24108        (WebInspector.StorageSidebarPanel.prototype.cookieForContentView): Added. Create a cookie based on the
24109        type of the represented object.
24110        (WebInspector.StorageSidebarPanel.prototype.showContentViewForCookie.finalizeCookieChecking): Walk all the tree
24111        elements and match them based on type alone. So if you were looking at cookies on one site, and later open the
24112        inspector on another site, the new site's cookies will show.
24113        (WebInspector.StorageSidebarPanel.prototype.showContentViewForCookie): Set a timeout to call finalizeCookieChecking.
24114        (WebInspector.StorageSidebarPanel.prototype._checkTreeElementAgainstPendingContentViewCookie): Added.
24115        (WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasAdded): Call _checkTreeElementAgainstPendingContentViewCookie.
24116        (WebInspector.StorageSidebarPanel.prototype._databaseWasAdded): Ditto.
24117        (WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded): Ditto.
24118        (WebInspector.StorageSidebarPanel.prototype._frameManifestAdded): Ditto.
24119        (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Style cleanup.
24120
241212012-02-16  Timothy Hatcher  <timothy@apple.com>
24122
24123        Add support to the log sidebar panel to restore the last content view.
24124
24125        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24126
24127        Reviewed by Brian Weinstein.
24128
24129        * UserInterface/LogSidebarPanel.js:
24130        (WebInspector.LogSidebarPanel.prototype.cookieForContentView): Added.
24131        (WebInspector.LogSidebarPanel.prototype.showContentViewForCookie): Added.
24132
241332012-02-16  Timothy Hatcher  <timothy@apple.com>
24134
24135        Add support to the resource sidebar panel to restore the last content view and select the resource in the sidebar.
24136
24137        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24138
24139        Reviewed by Brian Weinstein.
24140
24141        * UserInterface/ResourceSidebarPanel.js:
24142        (WebInspector.ResourceSidebarPanel.prototype.cookieForContentView): Added. Return a cookie with the resource URL.
24143        (WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie): Added. Find the resource by URL and shows it.
24144        (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeForFrame): Cleaned up to match showContentViewForCookie.
24145        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Call showContentViewForCookie if _cookieToShowWhenAvailable.
24146        (WebInspector.ResourceSidebarPanel.prototype._frameWasAdded): Remove code that moved into showSourceCodeForFrame.
24147
241482012-02-16  Timothy Hatcher  <timothy@apple.com>
24149
24150        Add support for remembering the last content view so it can potentially be restored next session.
24151        This requires each sidebar to supply a cookie and restore it on load. No sidebars support it yet.
24152
24153        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24154
24155        Reviewed by Brian Weinstein.
24156
24157        * UserInterface/Main.js:
24158        (WebInspector.contentLoaded): Create setting objects for the responsible sidebar panel and cookie.
24159        (WebInspector.sidebarPanelForRepresentedObject): Added. Broke out of contentBrowserTreeElementForRepresentedObject.
24160        (WebInspector.contentBrowserTreeElementForRepresentedObject): Use sidebarPanelForRepresentedObject.
24161        (WebInspector._updateCurrentContentViewCookie): Added. Asks the responsible sidebar panel for a cookie.
24162        (WebInspector._contentBrowserRepresentedObjectsDidChange): Call _updateCurrentContentViewCookie.
24163        * UserInterface/NavigationSidebarPanel.js:
24164        (WebInspector.NavigationSidebarPanel.prototype.cookieForContentView): Added stub.
24165        (WebInspector.NavigationSidebarPanel.prototype.showContentViewForCookie): Added. Ditto.
24166        * UserInterface/Sidebar.js:
24167        (WebInspector.Sidebar.prototype.removeSidebarPanel): Use findSidebarPanel.
24168        (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Ditto.
24169        (WebInspector.Sidebar.prototype.findSidebarPanel): Renamed from _findSidebarPanel.
24170
241712012-02-16  Timothy Hatcher  <timothy@apple.com>
24172
24173        Remember what view was last used for frames (DOM Tree or Source Code).
24174
24175        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24176
24177        Reviewed by Joseph Pecoraro.
24178
24179        * UserInterface/FrameContentView.js:
24180        (WebInspector.FrameContentView): Create a setting.
24181        (WebInspector.FrameContentView.prototype.shown): Use the setting to call _showContentViewForIdentifier.
24182        (WebInspector.FrameContentView.prototype._identifierForContentView): Added. Helper.
24183        (WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Set the setting value.
24184
241852012-02-16  Timothy Hatcher  <timothy@apple.com>
24186
24187        If the left sidebar is collapsed, then show the dock buttons in the content browser navigation bar.
24188
24189        Reviewed by Adam Roben.
24190
24191        * UserInterface/Main.js:
24192        (WebInspector.contentLoaded): Make a static dockButtonDividerNavigationItem. Remove inserts for the buttons.
24193        (WebInspector.updateDockedState): Call _updateDockNavigationItems.
24194        (WebInspector._updateDockNavigationItems): Added. Shows the buttons in the right navigation bar based on
24195        docked and left sidebar collapsed state.
24196        (WebInspector._sidebarCollapsedStateDidChange): Call _updateDockNavigationItems.
24197
241982012-02-16  Timothy Hatcher  <timothy@apple.com>
24199
24200        Add a null check in resourceForURL, since the mainFrame can be null if called early enough.
24201
24202        Reviewed by Joseph Pecoraro.
24203
24204        * UserInterface/FrameResourceManager.js:
24205        (WebInspector.FrameResourceManager.prototype.resourceForURL): Null check mainFrame.
24206
242072012-02-16  Timothy Hatcher  <timothy@apple.com>
24208
24209        Add WebInspector.ContentBrowser.Event.CurrentContentViewDidChange.
24210
24211        Reviewed by Joseph Pecoraro.
24212
24213        * UserInterface/ContentBrowser.js:
24214        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Fire the CurrentContentViewDidChange event.
24215
242162012-02-16  Timothy Hatcher  <timothy@apple.com>
24217
24218        Remember the expanded state of frames and folders in the resource sidebar panel.
24219
24220        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24221
24222        Reviewed by Brian Weinstein.
24223
24224        * UserInterface/FrameTreeElement.js:
24225        (WebInspector.FrameTreeElement): Call _updateExpandedSetting.
24226        (WebInspector.FrameTreeElement.prototype.onexpand): Added. Set the expanded setting value.
24227        (WebInspector.FrameTreeElement.prototype.oncollapse): Added. Set the expanded setting value.
24228        (WebInspector.FrameTreeElement.prototype.removeChildren): Delete the folder tree elements.
24229        (WebInspector.FrameTreeElement.prototype._updateExpandedSetting): Added. 
24230        (WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Change the expanded setting since the frame URL has changed.
24231        (WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Removed _shouldExpandWhenFirstChildIsAdded code.
24232        (WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject.createFolderTreeElement): Added.
24233        Sets up the onexpand and oncollapse listeners and creates a expanded setting.
24234        (WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject): Use createFolderTreeElement.
24235        (WebInspector.FrameTreeElement.prototype._folderTreeElementExpandedStateChange): Added. Set the expanded setting value.
24236        * UserInterface/ResourceSidebarPanel.js:
24237        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Remove a call to expand, that is handled by FrameTreeElement now.
24238
242392012-02-16  Timothy Hatcher  <timothy@apple.com>
24240
24241        Support expanding a TreeElement before it has children, so it will expand once the first child is added.
24242
24243        Needed for: <rdar://problem/10854042> Remember aspects of the user interface customization
24244
24245        Reviewed by Brian Weinstein.
24246
24247        * UserInterface/TreeOutline.js:
24248        (TreeOutline.prototype.appendChild): Call expand if this is the first child.
24249        (TreeOutline.prototype.insertChild): Ditto.
24250        (TreeElement.prototype.expand): Set the expanded flag even if there are no children.
24251
242522012-02-16  Timothy Hatcher  <timothy@apple.com>
24253
24254        Use a hash of the URL instead of the whole URL for remembering the last page searched.
24255
24256        This way the URL isn't cluttering localStorage for size and privacy reasons.
24257
24258        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24259
24260        Reviewed by Adam Roben.
24261
24262        * UserInterface/SearchSidebarPanel.js:
24263        (WebInspector.SearchSidebarPanel.prototype.performSearch): Use hash when setting
24264        the _lastSearchedPageSetting.value.
24265        (WebInspector.SearchSidebarPanel.prototype._mainFrameDidChange): Use hash when comparing
24266        with the _lastSearchedPageSetting.value.
24267        * UserInterface/Utilities.js:
24268        (String.prototype.hash): Added. Based on wtf/StringHasher.h (SuperFastHash) algorithm.
24269
242702012-02-15  Timothy Hatcher  <timothy@apple.com>
24271
24272        Remember the search term and rerun the search when re-opening the inspector on the same page.
24273
24274        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24275
24276        Reviewed by Brian Weinstein.
24277
24278        * UserInterface/SearchSidebarPanel.js:
24279        (WebInspector.SearchSidebarPanel): Store the inputElement on the object and add an event
24280        listener for the MainFrameChanged event. Create the setting objects and restore the search term.
24281        (WebInspector.SearchSidebarPanel.prototype.performSearch): Broken out from _searchFieldChanged.
24282        (WebInspector.SearchSidebarPanel.prototype._searchFieldChanged): Call performSearch.
24283        (WebInspector.SearchSidebarPanel.prototype._mainFrameDidChange): Added. Call performSearch
24284        if the frame change is the first and the page is the same as the last time.
24285
242862012-02-15  Timothy Hatcher  <timothy@apple.com>
24287
24288        Remember the filter bar filters for each navigation sidebar panel.
24289
24290        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24291
24292        Reviewed by Brian Weinstein.
24293
24294        * UserInterface/FilterBar.js:
24295        (WebInspector.FilterBar.prototype.set filters): Added.
24296        * UserInterface/NavigationSidebarPanel.js:
24297        (WebInspector.NavigationSidebarPanel): Create the filters setting.
24298        (WebInspector.NavigationSidebarPanel.prototype._updateFilter): Set the filters setting.
24299
243002012-02-15  Timothy Hatcher  <timothy@apple.com>
24301
24302        Remember the collapsed state of sections in the details sidebar.
24303
24304        Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
24305        (sidebar state, last view, etc.)
24306
24307        Reviewed by Brian Weinstein.
24308
24309        * UserInterface/AppearanceDetailsSidebarPanel.js:
24310        (WebInspector.AppearanceDetailsSidebarPanel): Give identifiers to DetailsSections.
24311        * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
24312        (WebInspector.ApplicationCacheDetailsSidebarPanel): Give identifiers to DetailsSections.
24313        * UserInterface/DOMNodeDetailsSidebarPanel.js:
24314        (WebInspector.DOMNodeDetailsSidebarPanel): Give identifiers to DetailsSections.
24315        * UserInterface/DetailsSection.js:
24316        (WebInspector.DetailsSection): Create a collapsed setting. Set collapsed to the value of the setting.
24317        (WebInspector.DetailsSection.prototype.get identifier): Added.
24318        (WebInspector.DetailsSection.prototype.set collapsed): Update the collapsed setting.
24319        * UserInterface/ResourceDetailsSidebarPanel.js:
24320        (WebInspector.ResourceDetailsSidebarPanel): Give identifiers to DetailsSections.
24321
243222012-02-15  Timothy Hatcher  <timothy@apple.com>
24323
24324        Remember the last selected navigation sidebar panel, the sidebar widths and their collapsed state.
24325
24326        <rdar://problem/10854042> Remember aspects of the user interface customization (sidebar state, last view, etc.)
24327
24328        Reviewed by Brian Weinstein.
24329
24330        * UserInterface/Main.js:
24331        (WebInspector.contentLoaded): Listed for SidebarPanelSelected. Use _sidebarWidthDidChange for WidthDidChange.
24332        Create setting objects for last selected navigation sidebar panel, the sidebar widths and their collapsed state.
24333        (WebInspector._sidebarCollapsedStateDidChange): Update the collapsed settings.
24334        (WebInspector._navigationSidebarPanelSelected): Added. Update the last selected navigation sidebar panel setting.
24335        (WebInspector._sidebarWidthDidChange): Added. Update the width settings. Call _contentBrowserSizeDidChange.
24336        * UserInterface/Sidebar.js:
24337        (WebInspector.Sidebar.prototype.set width): Return early if the width is the same. This avoids sending events
24338        if the width didn't change.
24339        (WebInspector.Sidebar.prototype.set collapsed): Return early if the collapsed state is the same. This avoids
24340        sending events if the collapsed state didn't change.
24341
243422012-02-15  Timothy Hatcher  <timothy@apple.com>
24343
24344        Add WebInspector.Setting from Open Source.
24345
24346        <rdar://problem/10854042> Remember aspects of the user interface customization (sidebar state, last view, etc.)
24347
24348        Reviewed by Brian Weinstein.
24349
24350        * UserInterface/Main.html: Included Setting.js.
24351        * UserInterface/Setting.js: Added. Copied partially from OpenSource/Source/WebCore/inspector/front-end/Settings.js.
24352        (WebInspector.Setting):
24353        (WebInspector.Setting.prototype.get name):
24354        (WebInspector.Setting.prototype.get value):
24355        (WebInspector.Setting.prototype.set value):
24356
243572012-02-14  Brian Weinstein  <bweinstein@apple.com>
24358
24359        <rdar://problem/10857306> Consider putting "Show Activity" menu item in Develop menu as mitigation for the old Activity window.
24360
24361        Reviewed by Tim Hatcher.
24362
24363        * UserInterface/InspectorFrontendAPI.js:
24364        (InspectorFrontendAPI.showResources): Make the resources panel the selected panel, and make it not collapsed.
24365
243662012-02-14  Timothy Hatcher  <timothy@apple.com>
24367
24368        Tail truncate the search result title so the tooltip does not get too large.
24369
24370        <rdar://problem/10843369> Web Inspector should impose limit on tooltip size to avoid insanely large tooltips
24371
24372        Reviewed by John Sullivan.
24373
24374        * UserInterface/SearchResultTreeElement.js:
24375        (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): Truncate the title at the end to 50 characters max.
24376        Use \u2026 instead of the actual ellipsis character since UTF8 in source code makes me nervous.
24377
243782012-02-14  Timothy Hatcher  <timothy@apple.com>
24379
24380        Show failed resources when first opening the Web Inspector.
24381
24382        This is the Safari side of the Open Source r107715.
24383
24384        Follow up to: <rdar://problem/10843653>
24385
24386        Reviewed by Brian Weinstein.
24387
24388        * UserInterface/FrameResourceManager.js:
24389        (WebInspector.FrameResourceManager.prototype._createResource): Set the loaderId for good measure.
24390        (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Check for failed and canceled.
24391
243922012-02-13  Joseph Pecoraro  <pecoraro@apple.com>
24393
24394        <rdar://problem/10854052> Cmd-C (and Copy menu item) don't work for selected line in DOM Tree
24395
24396        Allow the current ContentView to handle a "copy" event.
24397        If the ContentView implements handleCopyEvent and there is
24398        no window selection, we send the copy event to the ContentView.
24399
24400        Reviewed by Timothy Hatcher.
24401
24402        * UserInterface/Main.js:
24403        (WebInspector.contentLoaded):
24404        (WebInspector._beforecopy):
24405        (WebInspector._copy):
24406        Add support for passing copy event to a ContentView implementing handleCopyEvent.
24407
24408        * UserInterface/DOMTreeContentView.js:
24409        (WebInspector.DOMTreeContentView.prototype.handleCopyEvent):
24410        * UserInterface/FrameContentView.js:
24411        (WebInspector.FrameContentView.prototype.handleCopyEvent):
24412        A DOMTreeContentView allows copying the current selected element.
24413
244142012-02-13  Joseph Pecoraro  <pecoraro@apple.com>
24415
24416        <rdar://problem/10854052> Cmd-C (and Copy menu item) don't work for selected line in DOM Tree
24417
24418        Merge r105679 from Open Source's frontend to get the "Copy as HTML"
24419        context menu working.
24420
24421        Reviewed by Timothy Hatcher.
24422
24423        * UserInterface/DOMNode.js:
24424        (WebInspector.DOMNode.prototype.copyNode):
24425
244262012-02-13  Joseph Pecoraro  <pecoraro@apple.com>
24427
24428        Make RemoteDebugger work on 10.7.3.
24429
24430        When the front-end is run on an earlier Lion system, such as
24431        SULionDuchess in RemoteDebugger.app, it fails because
24432        Function.prototype.bind is unavailable. Since this appears to be the
24433        only deficiency at the moment, lets define it when its not available.
24434
24435        Reviewed by Timothy Hatcher.
24436
24437        * UserInterface/Main.html:
24438        Move Utilities.js earlier.
24439
24440        * UserInterface/Utilities.js:
24441        Provide a Function.prototype.bind implementation when unavailable.
24442
244432012-02-13  Timothy Hatcher  <timothy@apple.com>
24444
24445        Make failed resources show up with red text in the sidebar and show an error message when selected.
24446
24447        <rdar://problem/10843653> Failed resources have no visible distinction in the new Web Inspector
24448
24449        Reviewed by Brian Weinstein.
24450
24451        * Localizations/en.lproj/localizedStrings.js: Updated.
24452        * UserInterface/FontResourceContentView.js:
24453        (WebInspector.FontResourceContentView.prototype.contentAvailable): Removed FIXME and resource parameter.
24454        * UserInterface/GeneralTreeElement.js:
24455        (WebInspector.GeneralTreeElement.prototype.addClassName): Added.
24456        (WebInspector.GeneralTreeElement.prototype.removeClassName): Added.
24457        * UserInterface/ImageResourceContentView.js:
24458        (WebInspector.ImageResourceContentView.prototype.contentAvailable): Removed FIXME and resource parameter.
24459        * UserInterface/Main.css:
24460        (.message-text-view): Reduced the line-height and added some padding.
24461        (.message-text-view.error): Changed the color of red to a ddarker shade.
24462        (.message-text-view.error::before): Added. Show an error icon.
24463        * UserInterface/Main.html:
24464        * UserInterface/ResourceContentView.js:
24465        (WebInspector.ResourceContentView): Added issue event listener and issue code from TextResourceContentView.
24466        (WebInspector.ResourceContentView.prototype.contentAvailable): Removed resource parameter.
24467        (WebInspector.ResourceContentView.prototype.addIssue): Added.
24468        (WebInspector.ResourceContentView.prototype.closed): Remove issue event listener.
24469        (WebInspector.ResourceContentView.prototype._contentAvailable): Added.
24470        (WebInspector.ResourceContentView.prototype._issueWasAdded): Added.
24471        * UserInterface/ResourceTreeElement.css: Added.
24472        (.item.resource.failed): Color text red.
24473        (.item.resource.failed .subtitle): Ditto.
24474        * UserInterface/ResourceTreeElement.js:
24475        (WebInspector.ResourceTreeElement): Add the resource style class.
24476        (WebInspector.ResourceTreeElement.prototype._updateLoadingStatus): Add or remove the failed style class.
24477        (WebInspector.ResourceTreeElement.prototype._typeDidChange): Use addClassName and removeClassName.
24478        * UserInterface/TextResourceContentView.js:
24479        (WebInspector.TextResourceContentView): Removed the issue code, it is now in ResourceContentView.
24480        (WebInspector.TextResourceContentView.prototype.contentAvailable): Removed FIXME and resource parameter.
24481        (WebInspector.TextResourceContentView.prototype.addIssue): Show a full error message if there is no content yet.
24482
244832012-02-13  Timothy Hatcher  <timothy@apple.com>
24484
24485        Fix a bug where opening the Inspector while loading a page could cause a subresource that just finished loading
24486        to be shown in the Inspector as the main resource.
24487
24488        Reviewed by Brian Weinstein.
24489
24490        * UserInterface/FrameResourceManager.js:
24491        (WebInspector.FrameResourceManager.prototype.initialize): Set _waitingForMainFrameResourceTreePayload.
24492        (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Return early if _waitingForMainFrameResourceTreePayload.
24493        (WebInspector.FrameResourceManager.prototype.frameDidDetach): Ditto.
24494        (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Ditto.
24495        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Ditto.
24496        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Ditto.
24497        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Ditto.
24498        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Ditto.
24499        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Ditto.
24500        (WebInspector.FrameResourceManager.prototype._addResourceToFrame): Ditto.
24501        (WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload): Delete _waitingForMainFrameResourceTreePayload.
24502        Also clear the _resourceRequestIdentifierMap and _frameIdentifierMap maps.
24503
245042012-02-13  Timothy Hatcher  <timothy@apple.com>
24505
24506        Make sure the sidebar tree is ready before showing the source code in response to a Show Page Source user action.
24507        Also reveal and select the frame in the Resource sidebar for which the source was shown.
24508
24509        <rdar://problem/10855004> File path components are missing when using Show Page Source menu item
24510
24511        Reviewed by Brian Weinstein.
24512
24513        * UserInterface/InspectorFrontendAPI.js:
24514        (InspectorFrontendAPI.showMainResourceForFrame):
24515        * UserInterface/ResourceSidebarPanel.js:
24516        (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeForFrame):
24517        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Added. A custom implementation is
24518        needed for this since the frames are populated lazily.
24519        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject.getParent): Added.
24520        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor): Added.
24521        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Check for _frameIdentifierToShowSourceCodeWhenAvailable
24522        and call showSourceCodeForFrame.
24523        (WebInspector.ResourceSidebarPanel.prototype._frameWasAdded): Return early if the main frame tree element isn't
24524        in the sidebar tree outline yet.
24525
245262012-02-13  Timothy Hatcher  <timothy@apple.com>
24527
24528        Remove the "Create RemoteWebInspector.framework symlinks" build phase now that all
24529        clients are off the old framework.
24530
24531        This also fixes a build error seen in the archive builders.
24532
24533        <rdar://problem/10828236> Remove Symlinks for RemoteWebInspector.framework
24534
24535        Rubber-stamped by Joseph Pecoraro.
24536
24537        * WebInspectorUI.xcodeproj/project.pbxproj: Removed "Create RemoteWebInspector.framework symlinks".
24538
245392012-02-12  Timothy Hatcher  <timothy@apple.com>
24540
24541        Enable localization of the new Web Inspector again.
24542
24543        <rdar://problem/10688721>
24544
24545        Reviewed by John Sullivan.
24546
24547        * Localizations/en.lproj/localizedStrings.js: Updated.
24548        * UserInterface/Main.js:
24549        (WebInspector.UIString): Lookup the string in window.localizedStrings again.
24550
245512012-02-11  Timothy Hatcher  <timothy@apple.com>
24552
24553        Minify the CSS and JavaScript resources in Production builds.
24554
24555        <rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
24556
24557        Reviewed by Joseph Pecoraro.
24558
24559        * Scripts/cssmin.py: Added.
24560        * Scripts/jsmin.py: Copied from Safari/Reader/jsmin.py.
24561        * WebInspectorUI.xcodeproj/project.pbxproj: Call cssmin.py on Main.css and jsmin.py on Main.js.
24562
245632012-02-11  Timothy Hatcher  <timothy@apple.com>
24564
24565        Remove console.assert() calls from Productions builds.
24566
24567        <rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
24568
24569        Reviewed by Joseph Pecoraro.
24570
24571        * Scripts/remove-console-asserts.pl: Added.
24572        * WebInspectorUI.xcodeproj/project.pbxproj: Call remove-console-asserts.pl on the combined Main.js file.
24573
245742012-02-11  Timothy Hatcher  <timothy@apple.com>
24575
24576        Combine scripts and stylesheets into single files in Production builds.
24577
24578        <rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
24579
24580        Reviewed by Joseph Pecoraro.
24581
24582        * Scripts/combine-resources.pl: Added.
24583        * Scripts/copy-user-interface-resources.sh: Call combine-resources.pl in Production builds.
24584        * UserInterface/Main.html: Removed a FIXME comment that gets in the way of combine-resources.pl.
24585        * WebInspectorUI.xcodeproj/project.pbxproj: Added combine-resources.pl.
24586
245872012-02-11  Timothy Hatcher  <timothy@apple.com>
24588
24589        Build the user interface files into the WebInspector framework.
24590
24591        <rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
24592
24593        Reviewed by Joseph Pecoraro.
24594
24595        * Configurations/Base.xcconfig: Added WEBKIT_UMBRELLA_FRAMEWORKS_DIR and WEBCORE_PRIVATE_HEADERS_DIR.
24596        * Configurations/DebugRelease.xcconfig: Added WEBKIT_UMBRELLA_FRAMEWORKS_DIR for engineering builds.
24597        * Scripts/copy-user-interface-resources.sh: Added.
24598        * WebInspectorUI.xcodeproj/project.pbxproj: Added UserInterface folder, localizedStrings.js,
24599        Copy User Interface Resources and Copy WebCore Inspector Resources build phases.
24600
246012012-02-11  Timothy Hatcher  <timothy@apple.com>
24602
24603        Move Safari/Develop/WebInspector to WebInspector/UserInterface.
24604
24605        <rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
24606
24607        Reviewed by Joseph Pecoraro.
24608
24609        * ChangeLog: Copied over the Safari/ChangeLog entries with changes in Safari/Develop/WebInspector.
24610        * UserInterface: Renamed from Safari/Develop/WebInspector.
24611
246122012-02-10  Timothy Hatcher  <timothy@apple.com>
24613
24614        Copy over StylesSidebarPane.js from Open Source and break it up into one class per file.
24615
24616        Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
24617
24618        Reviewed by Brian Weinstein.
24619
24620        * UserInterface/BlankStylePropertiesSection.js: Copied from OpenSource/Source/WebCore/inspector/front-end/StylesSidebarPane.js.
24621        * UserInterface/CSSPropertyPrompt.js: Ditto.
24622        * UserInterface/ComputedStylePropertiesSection.js: Ditto.
24623        * UserInterface/StylePropertiesSection.js: Ditto.
24624        * UserInterface/StylePropertyTreeElement.js: Ditto.
24625
246262012-02-10  Timothy Hatcher  <timothy@apple.com>
24627
24628        Collapse bread-crumb compoenents in the middle when there ins't enough room to show them all.
24629        This keeps the important ones (the ends) on the screen while hiding the less important middle.
24630
24631        Reviewed by Brian Weinstein.
24632
24633        * UserInterface/HierarchicalPathComponent.css:
24634        (.hierarchical-path-component.hidden): Added.
24635        (.hierarchical-path-component.collapsed): Added.
24636        (.hierarchical-path-component.collapsed > .icon): Added.
24637        (.hierarchical-path-component.collapsed > .title): Added.
24638        (.hierarchical-path-component.collapsed > select): Added.
24639        (.hierarchical-path-component > .separator): Added.
24640        * UserInterface/HierarchicalPathComponent.js:
24641        (WebInspector.HierarchicalPathComponent.prototype.get hidden): Added.
24642        (WebInspector.HierarchicalPathComponent.prototype.set hidden): Added.
24643        (WebInspector.HierarchicalPathComponent.prototype.get collapsed): Added.
24644        (WebInspector.HierarchicalPathComponent.prototype.set collapsed): Added.
24645        * UserInterface/HierarchicalPathNavigationItem.js:
24646        (WebInspector.HierarchicalPathNavigationItem.prototype.set components): Delete _collapsedComponent.
24647        (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout): Loop through the components starting
24648        at the middle and fanning out in each direction to collapse until widthToRemove depleted.
24649
246502012-02-10  Brian Weinstein  <bweinstein@apple.com>
24651
24652        Show page and frame source using the new inspector if it is enabled.
24653
24654        When the user selects Show Page Source from the Develop menu or Show Page Source or Show Frame Source
24655        from the context menu, call new WKInspector API if we are using the new inspector.
24656
24657        <rdar://problem/10830076> Show Page Source should open the new Web Inspector to the page source
24658        <rdar://problem/10844831> Show Frame Source should open the new Web Inspector to that frame's source
24659
24660        Reviewed by Tim Hatcher.
24661
24662        * UserInterface/InspectorFrontendAPI.js:
24663        (InspectorFrontendAPI.showMainResourceForFrame): Call through to the ResourceSidebarPanel.
24664        * UserInterface/ResourceSidebarPanel.js:
24665        (WebInspector.ResourceSidebarPanel):
24666        (WebInspector.ResourceSidebarPanel.prototype.showSourceCodeForFrame): If we have a Frame object for
24667            the frame ID we were given, find its content view and show the source for it. If there isn't a frame
24668            object yet, store the frame ID for the frame we want to show.
24669        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): If we want to show a frame ID when it becomes
24670            available, then return early before showing the main resource.
24671        (WebInspector.ResourceSidebarPanel.prototype._frameWasAdded): If we are waiting to show a frame's source, and it
24672            was just added, then call showSourceCodeForFrame.
24673
246742012-02-09  Timothy Hatcher  <timothy@apple.com>
24675
24676        Set a default tooltip for GeneralTreeElements if there isn't a custom one already assigned.
24677
24678        This gives the user a way to read truncated titles for all the sidebar tree elements.
24679
24680        Reviewed by Brian Weinstein.
24681
24682        * UserInterface/GeneralTreeElement.js:
24683        (WebInspector.GeneralTreeElement.prototype._updateTitleElements): Build a tool tip based on the
24684        main title and subtitle.
24685
246862012-02-09  Brian Weinstein  <bweinstein@apple.com>
24687
24688        Clean up the code to set the titles of application cache manifest and frame tree elements.
24689
24690        This patch moves the responsibility of generating titles and subtitles for the application cache
24691        manifests and frames from their represented objects to the tree elements.
24692
24693        Reviewed by Tim Hatcher.
24694
24695        * UserInterface/ApplicationCacheFrame.js: Moved code from here...
24696        * UserInterface/ApplicationCacheFrameTreeElement.js: ... to here.
24697        (WebInspector.ApplicationCacheFrameTreeElement): Pass a blank title, it will be populated by updateTitles, and then call updateTitles.
24698        (WebInspector.ApplicationCacheFrameTreeElement.prototype.constructor.WebInspector.ApplicationCacheFrameTreeElement.updateTitles): Set the
24699            mainTitle and the subtitle on the GeneralTreeElement.
24700        * UserInterface/ApplicationCacheManifest.js: Moved code from here...
24701        * UserInterface/ApplicationCacheManifestTreeElement.js: ... to here.
24702        (WebInspector.ApplicationCacheManifestTreeElement): Pass an empty title. StorageTreeElement will populate it when the flattened variable
24703            is set.
24704        (WebInspector.ApplicationCacheManifestTreeElement.prototype.constructor.WebInspector.ApplicationCacheManifestTreeElement.get name): Call _generateTitles
24705            if necessary, and then return the name.
24706        (WebInspector.ApplicationCacheManifestTreeElement.prototype.get secondaryName): Call _generateTitles if necessary, and then
24707            return the secondary name.
24708        (WebInspector.ApplicationCacheManifestTreeElement.prototype._generateTitles): Moved from ApplicationCacheManifest.js.
24709
247102012-02-09  Brian Weinstein  <bweinstein@apple.com>
24711
24712        Implement a better titling scheme for application cache manifests and frames.
24713
24714        This patch reworks the titles and subtitles of application cache manifests and frames.
24715
24716        For the manifest, if it is collapsed, it will say: Application Cache - Manifest Name.
24717        If it isn't collapsed (there is a top level "Application Cache" folder), then it will say: Manifest Name - Host Name.
24718
24719        For the frame, the main title will be the last path component of the frame (if it exists), or the host. The subtitle
24720        will be the host, if the host isn't the same as the main title of the frame, or the subtitle of the application cache
24721        manifest's tree element.
24722
24723        Rest of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24724
24725        Reviewed by Tim Hatcher.
24726
24727        * UserInterface/ApplicationCacheFrame.js:
24728        (WebInspector.ApplicationCacheFrame.prototype.get title): Call _generateTitles, which doesn't return a title anymore.
24729        (WebInspector.ApplicationCacheFrame.prototype.get subtitle): Call _generateTitles and return this._subtitle.
24730        (WebInspector.ApplicationCacheFrame.prototype.clearTitles): Set the subtitle and main title to null, and call _generateTitles.
24731        (WebInspector.ApplicationCacheFrame.prototype._generateTitles): Clean up the code to generate a main title, and generate
24732            a subtitle as well.
24733
24734        * UserInterface/ApplicationCacheFrameTreeElement.js:
24735        (WebInspector.ApplicationCacheFrameTreeElement): Pass the title and the subtitle.
24736        (WebInspector.ApplicationCacheFrameTreeElement.prototype.constructor.WebInspector.ApplicationCacheFrameTreeElement.updateTitles):
24737            Clear the titles on the represented object, and set the mainTitle and subtitle on the tree element to their new values.
24738
24739        * UserInterface/ApplicationCacheManifest.js:
24740        (WebInspector.ApplicationCacheManifest.prototype.get title): Call _generateTitles.
24741        (WebInspector.ApplicationCacheManifest.prototype.get subtitle): Ditto.
24742        (WebInspector.ApplicationCacheManifest.prototype._generateTitles): Clean up the code to generate a main title and also generate
24743            a subtitle.
24744
24745        * UserInterface/ApplicationCacheManifestTreeElement.js:
24746        (WebInspector.ApplicationCacheManifestTreeElement.prototype.get secondaryName): Get the represented object's subtitle.
24747
24748        * UserInterface/StorageTreeElement.js:
24749        (WebInspector.StorageTreeElement): Use the flattened setter instead of setting the variable. The setter does a bit more work
24750            that we need to do.
24751        (WebInspector.StorageTreeElement.prototype.set flattened): Add the ability to set a subtitle when we are not flattened. If the
24752            flattening changes, call _updateChildrensTitles.
24753        (WebInspector.StorageTreeElement.prototype._updateChildrensTitles): Call updateTitles for each child that has updateTitles in their
24754            prototype.
24755
247562012-02-09  Brian Weinstein  <bweinstein@apple.com>
24757
24758        Have ApplicationCacheFrameContentView listen for when application cache statuses change.
24759
24760        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24761
24762        Reviewed by Tim Hatcher.
24763
24764        * UserInterface/ApplicationCacheFrameContentView.js:
24765        (WebInspector.ApplicationCacheFrameContentView): Add an event listener.
24766        (WebInspector.ApplicationCacheFrameContentView.prototype.closed): Remove an event listener.
24767        (WebInspector.ApplicationCacheFrameContentView.prototype._updateStatus): Call through to updateStatus.
24768
247692012-02-09  Brian Weinstein  <bweinstein@apple.com>
24770
24771        Remove a bunch of dead code from ApplicationCacheFrameContentView.
24772
24773        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24774
24775        Reviewed by Tim Hatcher.
24776
24777        * UserInterface/ApplicationCacheFrameContentView.js:
24778        (WebInspector.ApplicationCacheFrameContentView):
24779        (WebInspector.ApplicationCacheFrameContentView.prototype.updateStatus):
24780
247812012-02-09  Brian Weinstein  <bweinstein@apple.com>
24782
24783        Add icons for application cache manifest and frame tree elements.
24784
24785        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24786
24787        Reviewed by Tim Hatcher.
24788
24789        * UserInterface/ApplicationCacheFrameTreeElement.js:
24790        (WebInspector.ApplicationCacheFrameTreeElement): Set a class name.
24791        * UserInterface/ApplicationCacheManifestTreeElement.js:
24792        (WebInspector.ApplicationCacheManifestTreeElement): Ditto.
24793        * UserInterface/ApplicationCacheIcons.css: Added.
24794        * UserInterface/Images/ApplicationCache.png: Added.
24795        * UserInterface/Images/ApplicationCache@2x.png: Added.
24796        * UserInterface/Main.html: Add new file.
24797
247982012-02-09  Timothy Hatcher  <timothy@apple.com>
24799
24800        Fix a file not found error in the Web Inspector.
24801
24802        Reviewed by Brian Weinstein.
24803
24804        * UserInterface/IndeterminateProgressSpinner.css:
24805        (.indeterminate-progress-spinner): Use IndeterminateProgressSpinner1.pdf instead of IndeterminateProgressSpinner.pdf.
24806
248072012-02-09  Timothy Hatcher  <timothy@apple.com>
24808
24809        Don't add event listeners in the ContentView "shown" functions.
24810
24811        This was leading to duplicate listeners if the content view was hidden and shown multiple times.
24812
24813        Reviewed by Brian Weinstein.
24814
24815        * UserInterface/ClusterContentView.js:
24816        (WebInspector.ClusterContentView): Add the event listener here...
24817        (WebInspector.ClusterContentView.prototype.shown): ... instead of here.
24818        * UserInterface/DOMTreeContentView.js:
24819        (WebInspector.DOMTreeContentView): Add the event listener here...
24820        (WebInspector.DOMTreeContentView.prototype.shown): ... instead of here.
24821        * UserInterface/ResourceContentView.js:
24822        (WebInspector.ResourceContentView): Add the event listener here.
24823        (WebInspector.ResourceContentView.prototype.shown): Removed.
24824        * UserInterface/TextResourceContentView.js:
24825        (WebInspector.TextResourceContentView): Add the event listener here...
24826        (WebInspector.TextResourceContentView.prototype.shown): ... instead of here.
24827        (WebInspector.TextResourceContentView.prototype.hidden): Don't remove the event listener here...
24828        (WebInspector.TextResourceContentView.prototype.closed): ... remove it here instead.
24829
248302012-02-07  Brian Weinstein  <bweinstein@apple.com>
24831
24832        Update the details sidebar when the network state or the frame manifest state changes.
24833
24834        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24835
24836        Reviewed by Joseph Pecoraro.
24837
24838        * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
24839        (WebInspector.ApplicationCacheDetailsSidebarPanel):
24840        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh): Call _refreshOnlineRow and _refreshStatusRow.
24841        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._networkStateUpdated): Call _refreshOnlineRow.
24842        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._frameManifestStatusChanged): If the frame that changed
24843            matches ours, call _refreshStatusRow.
24844        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._refreshOnlineRow): Set the text of the online row.
24845        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._refreshStatusRow): Set the text of the status row.
24846        * UserInterface/ApplicationCacheManager.js:
24847        (WebInspector.ApplicationCacheManager.prototype.networkStateUpdated):
24848        (WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated):
24849
248502012-02-07  Brian Weinstein  <bweinstein@apple.com>
24851
24852        Make sure we update the status of an existing cache frame in _frameManifestUpdated.
24853
24854        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24855
24856        Reviewed by Joseph Pecoraro.
24857
24858        * UserInterface/ApplicationCacheFrame.js:
24859        (WebInspector.ApplicationCacheFrame.prototype.set status): Add a setter.
24860        * UserInterface/ApplicationCacheManager.js:
24861        (WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated): If we already have an ApplicationCacheFrame,
24862            make sure to set the status when it changes.
24863
248642012-02-07  Brian Weinstein  <bweinstein@apple.com>
24865
24866        Add a status section to the details sidebar that shows the application cache status and whether the user is online
24867        or offline.
24868
24869        This doesn't listen to changes in state while the sidebar is showing yet, but it will in the next patch.
24870
24871        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24872
24873        Reviewed by Joseph Pecoraro.
24874
24875        * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
24876        (WebInspector.ApplicationCacheDetailsSidebarPanel):
24877        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh):
24878
248792012-02-07  Brian Weinstein  <bweinstein@apple.com>
24880
24881        Add the manifest URL and the frame URL that loaded the manifest to the details sidebar.
24882
24883        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24884
24885        Reviewed by Joseph Pecoraro.
24886
24887        * UserInterface/ApplicationCacheDetailsSidebarPanel.js:
24888        (WebInspector.ApplicationCacheDetailsSidebarPanel): Create a start to our structure of groups and rows.
24889        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.get applicationCacheFrame): Return the application cache frame.
24890        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.set applicationCacheFrame): Set the application cache frame and say
24891            we need a refresh.
24892        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh): Set the data in our rows.
24893
248942012-02-07  Brian Weinstein  <bweinstein@apple.com>
24895
24896        Add a basic ApplicationCacheDetailsSidebarPanel, and make it be enabled at the right time.
24897
24898        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24899
24900        Reviewed by Joseph Pecoraro.
24901
24902        * UserInterface/ApplicationCacheDetailsSidebarPanel.js: Added.
24903        (WebInspector.ApplicationCacheDetailsSidebarPanel): Call the DetailsSidebarPanel constructor.
24904        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.constructor.WebInspector.ApplicationCacheDetailsSidebarPanel.inspect): Determine
24905            if one of the selected objects is an ApplicationCacheFrame.
24906        (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh): Add a FIXME.
24907        * UserInterface/Main.html: Add a new file.
24908        * UserInterface/Main.js:
24909        (WebInspector.contentLoaded): Create the ApplicationCacheDetailsSidebarPanel.
24910
249112012-02-07  Brian Weinstein  <bweinstein@apple.com>
24912
24913        Create an ApplicationCacheFrameContentView when an ApplicationCacheFrameTreeElement is selected.
24914
24915        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24916
24917        Reviewed by Joseph Pecoraro.
24918
24919        * UserInterface/ContentView.js:
24920        (WebInspector.ContentView):
24921        (WebInspector.ContentView.isViewable):
24922        * UserInterface/Main.js:
24923        (WebInspector.contentBrowserTreeElementForRepresentedObject):
24924        * UserInterface/StorageSidebarPanel.js:
24925        (WebInspector.StorageSidebarPanel.prototype._storageCleared):
24926        (WebInspector.StorageSidebarPanel.prototype._treeElementSelected):
24927
249282012-02-07  Brian Weinstein  <bweinstein@apple.com>
24929
24930        Implement some needed functions in ApplicationCacheManager to handle calls from ApplicationCacheObserver and
24931        ApplicationCacheFrameContentView.
24932
24933        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24934
24935        Reviewed by Joseph Pecoraro.
24936
24937        * UserInterface/ApplicationCacheManager.js:
24938        (WebInspector.ApplicationCacheManager):
24939        (WebInspector.ApplicationCacheManager.prototype.networkStateUpdated): Update the online state, and add a FIXME to fire an event.
24940        (WebInspector.ApplicationCacheManager.prototype.get online):
24941        (WebInspector.ApplicationCacheManager.prototype.applicationCacheStatusUpdated):
24942        (WebInspector.ApplicationCacheManager.prototype.requestApplicationCache):
24943        * UserInterface/ApplicationCacheObserver.js:
24944        (WebInspector.ApplicationCacheObserver.prototype.constructor.WebInspector.ApplicationCacheObserver.applicationCacheStatusUpdated):
24945        (WebInspector.ApplicationCacheObserver.prototype.networkStateUpdated):
24946
249472012-02-07  Brian Weinstein  <bweinstein@apple.com>
24948
24949        Implement Number.bytesToString.
24950
24951        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24952
24953        Reviewed by Joseph Pecoraro.
24954
24955        * UserInterface/Utilities.js:
24956        (Number.string_appeared_here.value):
24957
249582012-02-07  Brian Weinstein  <bweinstein@apple.com>
24959
24960        Make more of ApplicationFrameContentView work.
24961
24962        Add some styling, and make some of the code in ApplicationFrameContentView match our mannerisms. There are a couple
24963        places we ask the ApplicationCacheManager for data. These functions don't exist yet, but they will in the next patch.
24964
24965        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24966
24967        Reviewed by Joseph Pecoraro.
24968
24969        * UserInterface/ApplicationCacheFrameContentView.css: Added.
24970        (.content-view.application-cache-frame > .data-grid):
24971        (.content-view.application-cache-frame .hidden):
24972        * UserInterface/ApplicationCacheFrameContentView.js:
24973        (WebInspector.ApplicationCacheFrameContentView): Create our version of an empty view instead of open source's. Ask the application
24974            cache manager for data.
24975        (WebInspector.ApplicationCacheFrameContentView.prototype.shown): Use our correct method name.
24976        (WebInspector.ApplicationCacheFrameContentView.prototype.hidden): Ditto.
24977        (WebInspector.ApplicationCacheFrameContentView.prototype._maybeUpdate): Check this.visible instead of isVisible().
24978        (WebInspector.ApplicationCacheFrameContentView.prototype.updateStatus): Ditto.
24979        (WebInspector.ApplicationCacheFrameContentView.prototype._update): Ask the application cache manager for data.
24980        (WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback): Use our functions to hide and show the empty views / datagrids.
24981        (WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid): Ditto.
24982
249832012-02-07  Brian Weinstein  <bweinstein@apple.com>
24984
24985        Do some clean-up of ApplicationCacheFrameContentView.
24986
24987        Change the argument it takes to a represented object, have it inherit from ContentView, and remove calls to add/removeStyleClass.
24988
24989        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
24990
24991        Reviewed by Joseph Pecoraro.
24992
24993        * UserInterface/ApplicationCacheFrameContentView.js:
24994        (WebInspector.ApplicationCacheFrameContentView):
24995        (WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback):
24996
249972012-02-07  Brian Weinstein  <bweinstein@apple.com>
24998
24999        Bring in ApplicationCacheItemsView from open source as ApplicationCacheFrameContentView.
25000
25001        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
25002
25003        Reviewed by Joseph Pecoraro.
25004
25005        * UserInterface/ApplicationCacheFrameContentView.js: Added. Copied from open source.
25006
250072012-02-07  Brian Weinstein  <bweinstein@apple.com>
25008
25009        Add tree elements for application cache manifests and frames that have an application cache.
25010
25011        When the document adds or removes frames from the application cache, ApplicationCacheManager fires events. The storage sidebar
25012        panel listens for these events and updates the state of the tree elements in the sidebar panel. Currently, we only add
25013        sidebar items, but removing them will be added in a future patch.
25014
25015        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
25016
25017        Reviewed by Joseph Pecoraro.
25018
25019        * UserInterface/ApplicationCacheManager.js:
25020        (WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated):
25021        (WebInspector.ApplicationCacheManager.prototype._frameManifestRemoved):
25022        * UserInterface/StorageSidebarPanel.js:
25023        (WebInspector.StorageSidebarPanel):
25024        (WebInspector.StorageSidebarPanel.prototype._frameManifestAdded):
25025        (WebInspector.StorageSidebarPanel.prototype._frameManifestRemoved):
25026        (WebInspector.StorageSidebarPanel.prototype._storageCleared):
25027
250282012-02-06  Brian Weinstein  <bweinstein@apple.com>
25029
25030        Add tree elements for application cache frames and application cache manifests.
25031
25032        They aren't used yet, but will be used by the StorageSidebarPanel in a later patch.
25033
25034        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
25035
25036        Reviewed by Joseph Pecoraro.
25037
25038        * UserInterface/ApplicationCacheFrameTreeElement.js: Added.
25039        (WebInspector.ApplicationCacheFrameTreeElement): Basic tree element subclass with a FIXME for an icon.
25040        * UserInterface/ApplicationCacheManifest.js:
25041        (WebInspector.ApplicationCacheManifest.prototype.get title): Call _generateTitle if we don't already have one.
25042        (WebInspector.ApplicationCacheManifest.prototype._generateTitle): Try and get a title from the manifest URL's last path component, host
25043            or the whole URL.
25044        * UserInterface/ApplicationCacheManifestTreeElement.js: Added.
25045        (WebInspector.ApplicationCacheManifestTreeElement): Inherits from StorageTreeElement.
25046        (WebInspector.ApplicationCacheManifestTreeElement.prototype.constructor.WebInspector.ApplicationCacheManifestTreeElement.get name): Get the
25047            represented object's title.
25048        (WebInspector.ApplicationCacheManifestTreeElement.prototype.get categoryName): return Application Cache.
25049        * UserInterface/Main.html: Add new files.
25050
250512012-02-06  Brian Weinstein  <bweinstein@apple.com>
25052
25053        Implement the callback functions when we get information about the application cache. We create the necessary
25054        application cache objects now, but don't create tree elements or notify the storage sidebar panel about them
25055        yet.
25056
25057        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
25058
25059        Reviewed by Joseph Pecoraro.
25060
25061        * UserInterface/ApplicationCacheManager.js:
25062        (WebInspector.ApplicationCacheManager): Listen for when child frames are removed.
25063        (WebInspector.ApplicationCacheManager.prototype.constructor.WebInspector.ApplicationCacheManager.initialize): Get the
25064            frames with application caches here..
25065        (WebInspector.ApplicationCacheManager.prototype._mainResourceDidChange): .. Instead of here.
25066        (WebInspector.ApplicationCacheManager.prototype._childFrameWasRemoved): Call _frameManifestRemoved.
25067        (WebInspector.ApplicationCacheManager.prototype._manifestForFrameLoaded): If the frame doesn't have a manifest URL,
25068            call _frameManifestRemoved.
25069        (WebInspector.ApplicationCacheManager.prototype._framesWithManifestsLoaded): Call _frameManifestUpdated for all frames
25070            that have manifests.
25071        (WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated): Create a frame manifest object if it is necessary,
25072            and add FIXMEs to fire some events about the application cache state.
25073        (WebInspector.ApplicationCacheManager.prototype._frameManifestRemoved): Remove the manifest object for this frame.
25074
250752012-02-06  Brian Weinstein  <bweinstein@apple.com>
25076
25077        Add ApplicationCacheFrame and ApplicationCacheManifest. These are just simple objects that wrap a few properties.
25078
25079        More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
25080
25081        Reviewed by Joseph Pecoraro.
25082
25083        * UserInterface/ApplicationCacheFrame.js: Added.
25084        (WebInspector.ApplicationCacheFrame):
25085        (WebInspector.ApplicationCacheFrame.prototype.constructor.WebInspector.ApplicationCacheFrame.get frame):
25086        (WebInspector.ApplicationCacheFrame.prototype.get manifest):
25087        (WebInspector.ApplicationCacheFrame.prototype.get status):
25088        * UserInterface/ApplicationCacheManifest.js: Added.
25089        (WebInspector.ApplicationCacheManifest):
25090        (WebInspector.ApplicationCacheManifest.prototype.constructor.WebInspector.ApplicationCacheManifest.get manifestURL):
25091        * UserInterface/Main.html:
25092
250932012-02-06  Brian Weinstein  <bweinstein@apple.com>
25094
25095        Add ApplicationCacheManager, and have it listen for when frames navigate, and call some ApplicationCacheAgent
25096        methods to get data from WebCore.
25097
25098        We don't do anything with this data yet, but will in follow-up patches.
25099
25100        Part of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
25101
25102        Reviewed by Joseph Pecoraro.
25103
25104        * UserInterface/ApplicationCacheManager.js: Added.
25105        (WebInspector.ApplicationCacheManager): Initialize the ApplicationCacheAgent, and add a listener for when frames navigate.
25106        (WebInspector.ApplicationCacheManager.prototype.constructor.WebInspector.ApplicationCacheManager.initialize): Clear our (always empty)
25107            list of application cache objects.
25108        (WebInspector.ApplicationCacheManager.prototype._mainResourceDidChange): Get the list of frames with application caches if the main frame
25109            navigated. If it was a subframe, check the status of the application cache for the subframe.
25110        (WebInspector.ApplicationCacheManager.prototype._manifestForFrameLoaded): Stub.
25111        (WebInspector.ApplicationCacheManager.prototype._framesWithManifestsLoaded): Ditto.
25112        * UserInterface/Main.html: Add new file.
25113        * UserInterface/Main.js:
25114        (WebInspector.contentLoaded): Create an ApplicationCacheManager.
25115
251162012-02-06  Timothy Hatcher  <timothy@apple.com>
25117
25118        Show the full URL in the tool tip for resources in the Web Inspector.
25119
25120        Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
25121
25122        Reviewed by Brian Weinstein.
25123
25124        * UserInterface/ResourceTreeElement.js:
25125        (WebInspector.ResourceTreeElement.prototype._updateResource): Call _updateToolTip.
25126        (WebInspector.ResourceTreeElement.prototype._updateToolTip): Added.
25127        (WebInspector.ResourceTreeElement.prototype._urlDidChange): Call _updateToolTip.
25128
251292012-02-06  Timothy Hatcher  <timothy@apple.com>
25130
25131        Make double-click in the Web Inspector Resource sidebar open the resource in a new Safari tab/window.
25132
25133        This is like the Activity window, which we want to replace with the new Web Inspector.
25134
25135        Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
25136
25137        Reviewed by Brian Weinstein.
25138
25139        * UserInterface/ResourceTreeElement.js:
25140        (WebInspector.ResourceTreeElement.prototype.ondblclick): Added.
25141
251422012-02-06  Timothy Hatcher  <timothy@apple.com>
25143
25144        Fix an error on reload in the Web Inspector where the main resource would not be marked as finished, so the source
25145        would never display and the spinner in the sidebar would never go away.
25146
25147        Reviewed by Brian Weinstein.
25148
25149        * UserInterface/FrameResourceManager.js:
25150        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Only reuse the main resource
25151        or provisional main resource if the loader identifiers match.
25152
251532012-02-06  Timothy Hatcher  <timothy@apple.com>
25154
25155        Show a spinner in resource content views while waiting for content to become available.
25156
25157        Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
25158
25159        Reviewed by Brian Weinstein.
25160
25161        * UserInterface/Main.html:
25162        * UserInterface/ResourceContentView.css: Added.
25163        (.content-view.resource > .indeterminate-progress-spinner):
25164        * UserInterface/ResourceContentView.js:
25165        (WebInspector.ResourceContentView): Append a spinner.
25166
251672012-02-06  Timothy Hatcher  <timothy@apple.com>
25168
25169        Show a progress spinner in the Resource sidebar next to resources that are still loading.
25170
25171        Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
25172
25173        Reviewed by Brian Weinstein.
25174
25175        * UserInterface/GeneralTreeElement.js:
25176        (WebInspector.GeneralTreeElement): Initialize status to "".
25177        (WebInspector.GeneralTreeElement.prototype.get status): Added.
25178        (WebInspector.GeneralTreeElement.prototype.set status): Added.
25179        (WebInspector.GeneralTreeElement.prototype.onattach): Call _updateStatusElement.
25180        (WebInspector.GeneralTreeElement.prototype._createElementsIfNeeded): Create the status element.
25181        (WebInspector.GeneralTreeElement.prototype._updateStatusElement): Added.
25182        * UserInterface/Images/IndeterminateProgressSpinner1.pdf: Added.
25183        * UserInterface/Images/IndeterminateProgressSpinner10.pdf: Added.
25184        * UserInterface/Images/IndeterminateProgressSpinner11.pdf: Added.
25185        * UserInterface/Images/IndeterminateProgressSpinner12.pdf: Added.
25186        * UserInterface/Images/IndeterminateProgressSpinner2.pdf: Added.
25187        * UserInterface/Images/IndeterminateProgressSpinner3.pdf: Added.
25188        * UserInterface/Images/IndeterminateProgressSpinner4.pdf: Added.
25189        * UserInterface/Images/IndeterminateProgressSpinner5.pdf: Added.
25190        * UserInterface/Images/IndeterminateProgressSpinner6.pdf: Added.
25191        * UserInterface/Images/IndeterminateProgressSpinner7.pdf: Added.
25192        * UserInterface/Images/IndeterminateProgressSpinner8.pdf: Added.
25193        * UserInterface/Images/IndeterminateProgressSpinner9.pdf: Added.
25194        * UserInterface/IndeterminateProgressSpinner.css: Added.
25195        * UserInterface/IndeterminateProgressSpinner.js: Added.
25196        (WebInspector.IndeterminateProgressSpinner):
25197        (WebInspector.IndeterminateProgressSpinner.prototype.get element):
25198        * UserInterface/Main.html:
25199        * UserInterface/NavigationSidebarPanel.css:
25200        (.navigation-sidebar-panel-content-tree-outline .item .status):
25201        (.navigation-sidebar-panel-content-tree-outline .item .status:empty):
25202        (.navigation-sidebar-panel-content-tree-outline .item.small .status):
25203        (.navigation-sidebar-panel-content-tree-outline .item.small .status .indeterminate-progress-spinner):
25204        (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .status):
25205        * UserInterface/ResourceTreeElement.js:
25206        (WebInspector.ResourceTreeElement.prototype._updateResource): Add event listeners and call _updateLoadingStatus.
25207        (WebInspector.ResourceTreeElement.prototype._updateLoadingStatus): Added. Sets status to a spinner when loading.
25208
252092012-02-04  Timothy Hatcher  <timothy@apple.com>
25210
25211        Use PDFs for the user input prompt and result icons.
25212
25213        Part of: <rdar://problem/10643175> DataGrid and the DOM tree and the Console should be HiDPI compliant
25214
25215        Reviewed by Sam Weinig.
25216
25217        * UserInterface/DatabaseContentView.css:
25218        (.database-query-prompt::before): Use Use UserInputPrompt.pdf.
25219        * UserInterface/Images/UserInputPrompt.pdf: Added.
25220        * UserInterface/Images/UserInputResult.pdf: Added.
25221        * UserInterface/Images/userInputIcon.png: Removed.
25222        * UserInterface/Images/userInputResultIcon.png: Removed.
25223        * UserInterface/LogContentView.css:
25224        (#console-prompt::before): Use UserInputPrompt.pdf.
25225        (.console-user-command-result.console-log-level::before): Use UserInputResult.pdf.
25226
252272012-02-04  Timothy Hatcher  <timothy@apple.com>
25228
25229        Use PDFs for the error and wrning icons.
25230
25231        Part of: <rdar://problem/10643175> DataGrid and the DOM tree and the Console should be HiDPI compliant
25232
25233        Reviewed by Sam Weinig.
25234
25235        * UserInterface/DatabaseContentView.css:
25236        (.database-query-result.error::before): Use ErrorSmall.pdf.
25237        * UserInterface/Images/ErrorSmall.pdf: Added.
25238        * UserInterface/Images/WarningSmall.pdf: Added.
25239        * UserInterface/Images/errorIcon.png: Removed.
25240        * UserInterface/Images/warningIcon.png: Removed.
25241        * UserInterface/LogContentView.css:
25242        (.console-error-level::before): Use ErrorSmall.pdf.
25243        (.console-warning-level::before): Use WarningSmall.pdf.
25244
252452012-02-04  Timothy Hatcher  <timothy@apple.com>
25246
25247        Remove unused code and images from the log content view for status bar items and filtering.
25248
25249        Reviewed by Joseph Pecoraro.
25250
25251        * UserInterface/Images/deleteIcon.png: Removed.
25252        * UserInterface/Images/searchSmallBrightBlue.png: Removed.
25253        * UserInterface/LogContentView.css:
25254        (.console-debug-level::before): Use a background color instead of an image. The debug
25255        level is not used by the new Web Inspector.
25256        * UserInterface/LogContentView.js:
25257        (WebInspector.LogContentView): Removed creation code for status bar items and filtering.
25258        (WebInspector.LogContentView.prototype.evalInInspectedWindow): Pass undefined for the context.
25259        * UserInterface/Section.css:
25260        (.section .properties .delete-button): Removed.
25261        (.section .properties li.hovered .delete-button): Removed.
25262
252632012-02-04  Timothy Hatcher  <timothy@apple.com>
25264
25265        Update LogContentView to work with the new Web Inspector's ContentView instead of the old View.
25266
25267        Reviewed by Joseph Pecoraro.
25268
25269        * UserInterface/LogContentView.js:
25270        (WebInspector.LogContentView.prototype.hidden): Renamed from willHide. Call storeScrollPositions.
25271        (WebInspector.LogContentView.prototype.shown): Renamed from willShow. Merged with afterShow.
25272        (WebInspector.LogContentView.prototype.storeScrollPositions): Removed WebInspector.View.prototype call.
25273        (WebInspector.LogContentView.prototype.restoreScrollPositions): Ditto.
25274        (WebInspector.LogContentView.prototype.updateLayout): Renamed from onResize.
25275
252762012-02-04  Timothy Hatcher  <timothy@apple.com>
25277
25278        Make the "Show Error Console" develop menu item work with the new Web Inspector.
25279
25280        Reviewed by Joseph Pecoraro.
25281
25282        * UserInterface/ContentBrowser.js:
25283        (WebInspector.ContentBrowser.prototype.get currentContentView): Added.
25284        (WebInspector.ContentBrowser.prototype.canGoBack): Use this.currentContentView.
25285        (WebInspector.ContentBrowser.prototype.canGoForward): Ditto.
25286        (WebInspector.ContentBrowser.prototype.goBack): Ditto.
25287        (WebInspector.ContentBrowser.prototype.goForward): Ditto.
25288        (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange): Ditto.
25289        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Ditto.
25290        * UserInterface/InspectorFrontendAPI.js:
25291        (InspectorFrontendAPI.showConsole): Call LogSidebarPanel.showCurrentLog.
25292        * UserInterface/LogSidebarPanel.js:
25293        (WebInspector.LogSidebarPanel.prototype.showCurrentLog):
25294        * UserInterface/ResourceSidebarPanel.js:
25295        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Don't select the main frame
25296        if there is already a content view showing.
25297        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork): Ditto.
25298
252992012-02-04  Timothy Hatcher  <timothy@apple.com>
25300
25301        Fix an infinite loop when doing "Show Error Console" or any of the Inspector develop menu items.
25302
25303        <rdar://problem/10801359> Hitting Cmd-Opt-C (Develop -> Show Error Console) causes WebProcess
25304        to freak out (100% CPU, GBs of RAM)
25305
25306        Reviewed by Joseph Pecoraro.
25307
25308        * UserInterface/InspectorFrontendAPI.js:
25309        (InspectorFrontendAPI.loadCompleted): Set _loaded before calling dispatch, otherwise dispatch
25310        will keep append commands to _pendingCommands and the for loop will never finish.
25311
253122012-02-02  Timothy Hatcher  <timothy@apple.com>
25313
25314        Add the Box Model to the Appearance details sidebar panel.
25315
25316        Last part of: <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25317
25318        Reviewed by Brian Weinstein.
25319
25320        * UserInterface/AppearanceDetailsSidebarPanel.js:
25321        (WebInspector.AppearanceDetailsSidebarPanel):
25322        (WebInspector.AppearanceDetailsSidebarPanel.prototype._refreshBoxModel):
25323        * UserInterface/BoxModelDetailsSectionRow.css: Added.
25324        * UserInterface/BoxModelDetailsSectionRow.js: Copied from OpenSource/Source/WebCore/inspector/front-end/MetricsSidebarPane.js.
25325        Modified to use DOMTreeManager and CSSStyleManager and other minor renames to work in the new inspector.
25326        * UserInterface/CSSStyleManager.js:
25327        (WebInspector.CSSStyleManager.prototype.get forcedPseudoClasses): Added stub with FIXME.
25328        * UserInterface/Main.html: Included BoxModelDetailsSectionRow.{css,js}.
25329
253302012-02-02  Timothy Hatcher  <timothy@apple.com>
25331
25332        Add WebInspector.AppearanceDetailsSidebarPanel, future home for the box-model diagram.
25333
25334        Part of: <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25335
25336        Reviewed by Brian Weinstein.
25337
25338        * UserInterface/AppearanceDetailsSidebarPanel.js: Added.
25339        (WebInspector.AppearanceDetailsSidebarPanel):
25340        (WebInspector.AppearanceDetailsSidebarPanel.prototype.refresh): Call _refreshBoxModel.
25341        (WebInspector.AppearanceDetailsSidebarPanel.prototype._refreshBoxModel):
25342        * UserInterface/Main.html: Included AppearanceDetailsSidebarPanel.js.
25343        * UserInterface/Main.js:
25344        (WebInspector.contentLoaded): Create an instance of AppearanceDetailsSidebarPanel.
25345
253462012-02-02  Timothy Hatcher  <timothy@apple.com>
25347
25348        Replace WebInspector.domAgent use with WebInspector.domTreeManager.
25349
25350        Needed for:
25351        <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
25352        <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25353
25354        Reviewed by Brian Weinstein.
25355
25356        * UserInterface/CSSStyleManager.js:
25357        (WebInspector.CSSStyleManager.prototype.setRuleSelector.callback):
25358        (WebInspector.CSSStyleManager.prototype.addRule.callback):
25359        (WebInspector.CSSStyleManager.prototype._ownerDocumentId):
25360
253612012-02-02  Timothy Hatcher  <timothy@apple.com>
25362
25363        Create a singelton WebInspector.CSSStyleManager instance.
25364
25365        Needed for:
25366        <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
25367        <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25368
25369        Reviewed by Brian Weinstein.
25370
25371        * UserInterface/Main.js:
25372        (WebInspector.contentLoaded):
25373
253742012-02-02  Timothy Hatcher  <timothy@apple.com>
25375
25376        WebInspector.CSSStyleModel to WebInspector.CSSStyleManager.
25377
25378        Also rename WebInspector.CSSStyleModel.Events to WebInspector.CSSStyleManager.Event
25379        and delete some calls in the CSSStyleManager constructor we don't need.
25380
25381        Needed for:
25382        <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
25383        <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25384
25385        Reviewed by Brian Weinstein.
25386
25387        * UserInterface/CSSStyleManager.js:
25388        (WebInspector.CSSStyleManager):
25389        (WebInspector.CSSStyleManager.parseRuleArrayPayload):
25390        (WebInspector.CSSStyleManager.prototype.getMatchedStylesAsync):
25391        (WebInspector.CSSStyleManager.prototype.mediaQueryResultChanged):
25392        (WebInspector.CSSStyleManager.prototype._fireStyleSheetChanged.if):
25393        (WebInspector.CSSStyleManager.prototype._fireStyleSheetChanged.mycallback):
25394        (WebInspector.CSSStyleManager.prototype._fireStyleSheetChanged):
25395
253962012-02-02  Timothy Hatcher  <timothy@apple.com>
25397
25398        Copy over classes from open source's CSSStyleModel.js.
25399
25400        Needed for:
25401        <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
25402        <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25403
25404        Reviewed by Brian Weinstein.
25405
25406        * UserInterface/CSSMedia.js: Added.
25407        (WebInspector.CSSMedia):
25408        (WebInspector.CSSMedia.parsePayload):
25409        (WebInspector.CSSMedia.parseMediaArrayPayload):
25410        * UserInterface/CSSProperty.js: Added.
25411        (WebInspector.CSSProperty):
25412        (WebInspector.CSSProperty.parsePayload):
25413        (WebInspector.CSSProperty.prototype.get propertyText):
25414        (WebInspector.CSSProperty.prototype.get isLive):
25415        (WebInspector.CSSProperty.prototype.get active):
25416        (WebInspector.CSSProperty.prototype.get styleBased):
25417        (WebInspector.CSSProperty.prototype.get inactive):
25418        (WebInspector.CSSProperty.prototype.get disabled):
25419        (WebInspector.CSSProperty.prototype.setText):
25420        (WebInspector.CSSProperty.prototype.setText.callback):
25421        (WebInspector.CSSProperty.prototype.setValue):
25422        (WebInspector.CSSProperty.prototype.setDisabled.callback):
25423        (WebInspector.CSSProperty.prototype.setDisabled):
25424        * UserInterface/CSSRule.js: Added.
25425        (WebInspector.CSSRule):
25426        (WebInspector.CSSRule.parsePayload):
25427        (WebInspector.CSSRule.prototype.get isUserAgent):
25428        (WebInspector.CSSRule.prototype.get isUser):
25429        (WebInspector.CSSRule.prototype.get isViaInspector):
25430        (WebInspector.CSSRule.prototype.get isRegular):
25431        * UserInterface/CSSStyleDeclaration.js: Added.
25432        (WebInspector.CSSStyleDeclaration):
25433        (WebInspector.CSSStyleDeclaration.buildShorthandValueMap):
25434        (WebInspector.CSSStyleDeclaration.parsePayload):
25435        (WebInspector.CSSStyleDeclaration.parseComputedStylePayload):
25436        (WebInspector.CSSStyleDeclaration.prototype.get allProperties):
25437        (WebInspector.CSSStyleDeclaration.prototype.getLiveProperty):
25438        (WebInspector.CSSStyleDeclaration.prototype.getPropertyValue):
25439        (WebInspector.CSSStyleDeclaration.prototype.getPropertyPriority):
25440        (WebInspector.CSSStyleDeclaration.prototype.getPropertyShorthand):
25441        (WebInspector.CSSStyleDeclaration.prototype.isPropertyImplicit):
25442        (WebInspector.CSSStyleDeclaration.prototype.styleTextWithShorthands):
25443        (WebInspector.CSSStyleDeclaration.prototype.getLonghandProperties):
25444        (WebInspector.CSSStyleDeclaration.prototype.getShorthandValue):
25445        (WebInspector.CSSStyleDeclaration.prototype.getShorthandPriority):
25446        (WebInspector.CSSStyleDeclaration.prototype.propertyAt):
25447        (WebInspector.CSSStyleDeclaration.prototype.pastLastSourcePropertyIndex):
25448        (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
25449        (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
25450        (WebInspector.CSSStyleDeclaration.prototype.appendProperty):
25451        * UserInterface/CSSStyleManager.js: Added.
25452        (WebInspector.CSSStyleModel):
25453        (WebInspector.CSSStyleModel.parseRuleArrayPayload):
25454        (WebInspector.CSSStyleModel.prototype.getMatchedStylesAsync):
25455        (WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
25456        (WebInspector.CSSStyleModel.prototype.getInlineStylesAsync):
25457        (WebInspector.CSSStyleModel.prototype.setRuleSelector):
25458        (WebInspector.CSSStyleModel.prototype.setRuleSelector.callback):
25459        (WebInspector.CSSStyleModel.prototype.addRule):
25460        (WebInspector.CSSStyleModel.prototype.addRule.callback):
25461        (WebInspector.CSSStyleModel.prototype.mediaQueryResultChanged):
25462        (WebInspector.CSSStyleModel.prototype._ownerDocumentId):
25463        (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged.if):
25464        (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged.mycallback):
25465        (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged):
25466        (WebInspector.CSSStyleModel.prototype.setStyleSheetText):
25467        * UserInterface/CSSStyleSheet.js: Added.
25468        (WebInspector.CSSStyleSheet):
25469        (WebInspector.CSSStyleSheet.createForId):
25470        (WebInspector.CSSStyleSheet.prototype.getText):
25471        (WebInspector.CSSStyleSheet.prototype.setText):
25472        * UserInterface/Main.html:
25473
254742012-02-02  Timothy Hatcher  <timothy@apple.com>
25475
25476        Fix asserts in the Web Inspector when loading a loopinsight.com article.
25477
25478        Reviewed by Brian Weinstein.
25479
25480        * UserInterface/Frame.js:
25481        (WebInspector.Frame.prototype.constructor.WebInspector.Frame.initialize): Don't disassociate from the
25482        old main resource if it didn't change.
25483        (WebInspector.Frame.prototype.commitProvisionalLoad): Ditto.
25484
254852012-02-01  Timothy Hatcher  <timothy@apple.com>
25486
25487        Fix issue where log views would draw over the previous log view on reload.
25488        This fixes a bunch of asserts that ContentViewContainer was spewing.
25489
25490        <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design
25491
25492        Reviewed by Brian Weinstein.
25493
25494        * UserInterface/ContentViewContainer.js:
25495        (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Decrement the
25496        currentIndex when it is greater than or equal to i.
25497
254982012-01-31  Brian Weinstein  <bweinstein@apple.com>
25499
25500        Add DatabaseContentView.{js|css}. These were taken from open source, with a few modifications.
25501
25502        Rest of <rdar://problem/10684679> Implement a database query view for the new Inspector.
25503
25504        Reviewed by Tim Hatcher.
25505
25506        * UserInterface/DatabaseContentView.css: Added. Copied rules from open source.
25507        * UserInterface/DatabaseContentView.js: Added. Copied from open source.
25508        * UserInterface/Main.html: Added new files.
25509
255102012-01-31  Brian Weinstein  <bweinstein@apple.com>
25511
25512        Stub the boilerplate that is needed to hook up DatabaseContentView.
25513
25514        DatabaseContentView doesn't exist yet, but when it does, a new DatabaseContentView will be
25515        created when a DatabaseTreeElement is selected.
25516
25517        Work towards <rdar://problem/10684679> Implement a database query view for the new Inspector.
25518
25519        Reviewed by Tim Hatcher.
25520
25521        * UserInterface/ContentView.js:
25522        (WebInspector.ContentView): Add a new case for DatabaseContentView.
25523        (WebInspector.ContentView.isViewable): Ditto.
25524        * UserInterface/Main.html:
25525        * UserInterface/Main.js: Ditto.
25526        (WebInspector.contentBrowserTreeElementForRepresentedObject):
25527        * UserInterface/StorageSidebarPanel.js:
25528        (WebInspector.StorageSidebarPanel.prototype._storageCleared): Ditto.
25529        (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Ditto.
25530
255312012-01-31  Timothy Hatcher  <timothy@apple.com>
25532
25533        Generate friendlier titles for the current log and previous logs in the Log sidebar.
25534
25535        Part of: <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design
25536
25537        Reviewed by Brian Weinstein.
25538
25539        * UserInterface/LogSidebarPanel.js:
25540        (WebInspector.LogSidebarPanel.prototype._sessionStarted): Set the previous current tree element title
25541        to "Previous Log %d".
25542        (WebInspector.LogSidebarPanel.prototype._activeTreeElement): Added.
25543        (WebInspector.LogSidebarPanel.prototype._activeLogContentView): Use _activeTreeElement().
25544        * UserInterface/LogTreeElement.js:
25545        (WebInspector.LogTreeElement): Set the main title to "Current Log" and the subtitle to the time.
25546
255472012-01-31  Timothy Hatcher  <timothy@apple.com>
25548
25549        Add an icon for logs in the Web Inspector Log sidebar.
25550
25551        Part of: <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design
25552
25553        Reviewed by Brian Weinstein.
25554
25555        * UserInterface/Images/Log.png: Added.
25556        * UserInterface/Images/Log@2x.png: Added.
25557        * UserInterface/LogIcon.css: Added.
25558        * UserInterface/LogObject.js:
25559        (WebInspector.LogObject): Added startDate parameter and set _startDate.
25560        (WebInspector.LogObject.prototype.get startDate): Added.
25561        * UserInterface/LogSidebarPanel.js:
25562        (WebInspector.LogSidebarPanel.prototype._sessionStarted):
25563        * UserInterface/LogTreeElement.js: Added.
25564        (WebInspector.LogTreeElement):
25565        (WebInspector.LogTreeElement.prototype.get logObject):
25566        * UserInterface/Main.html: Included LogTreeElement.js and LogIcon.css.
25567
255682012-01-30  Timothy Hatcher  <timothy@apple.com>
25569
25570        Fix disclosure triangles in the Log content view after they broke in r40433.
25571
25572        Reviewed by Brian Weinstein.
25573
25574        * UserInterface/Section.css:
25575        (.section): Added. Moved position: relative here.
25576        (.section .header): Removed position: relative from here.
25577
255782012-01-30  Brian Weinstein  <bweinstein@apple.com>
25579
25580        Clear all content views of type LogContentView when we clear the log sidebar panel.
25581
25582        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
25583
25584        Reviewed by Tim Hatcher.
25585
25586        * UserInterface/LogSidebarPanel.js:
25587        (WebInspector.LogSidebarPanel.prototype._logsCleared):
25588
255892012-01-30  Brian Weinstein  <bweinstein@apple.com>
25590
25591        Make the log views from previous loads of the page non-editable.
25592
25593        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
25594
25595        Reviewed by Tim Hatcher.
25596
25597        * UserInterface/LogContentView.css:
25598        (#console-prompt.disabled): Make the field read only.
25599        * UserInterface/LogContentView.js:
25600        (WebInspector.LogContentView.prototype.setDisabled): Add the disabled class to the content prompt.
25601        * UserInterface/LogSidebarPanel.js:
25602        (WebInspector.LogSidebarPanel.prototype.constructor.WebInspector.LogSidebarPanel._sessionStarted): Call setDisabled
25603            on the previously active LogContentView.
25604
256052012-01-30  Brian Weinstein  <bweinstein@apple.com>
25606
25607        Have to double click on disclosure triangles for log messages with backtraces.
25608
25609        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
25610
25611        Reviewed by Tim Hatcher.
25612
25613        * UserInterface/DOMTreeOutline.css:
25614        (.dom-tree-outline li.parent): Switch from text-indent to margin-left.
25615        * UserInterface/TreeOutline.js:
25616        (TreeElement.prototype.isEventWithinDisclosureTriangle): Update this to match open source.
25617
256182012-01-30  Brian Weinstein  <bweinstein@apple.com>
25619
25620        Make console log messages with backtraces display correctly in the log view.
25621
25622        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
25623
25624        Reviewed by Tim Hatcher.
25625
25626        * UserInterface/LogContentView.css: Copied some rules about outline-disclosure from Open Source.
25627
256282012-01-30  Brian Weinstein  <bweinstein@apple.com>
25629
25630        Create correct links in the Log content view.
25631
25632        Instead of calling through to this._linkifier (which we don't have), create links ourselves.
25633
25634        This will work by calling through to WebInspector.openURL, which will either open a resource in a new tab,
25635        or show you the resource content view for the link you clicked.
25636
25637        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
25638
25639        Reviewed by Tim Hatcher.
25640
25641        * UserInterface/ConsoleMessageImpl.js:
25642        (WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): We don't have a this._linkifier, so use our own function.
25643
256442012-01-30  Brian Weinstein  <bweinstein@apple.com>
25645
25646        When we get a console message from the ConsoleObserver, add it to the correct LogContentView.
25647
25648        With this patch, we show console logging from the page in the content view, so it is now more than
25649        just a place to evaluate JavaScript.
25650
25651        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
25652
25653        Reviewed by Tim Hatcher.
25654
25655        * UserInterface/ConsoleObserver.js:
25656        (WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded): Tell the LogManager about the
25657            added message.
25658        * UserInterface/LogManager.js:
25659        (WebInspector.LogManager.prototype.messageWasAdded): Create a ConsoleMessage object, and fire an event that a new message
25660            was added.
25661        * UserInterface/LogSidebarPanel.js:
25662        (WebInspector.LogSidebarPanel): Add a listener for when messages are added.
25663        (WebInspector.LogSidebarPanel.prototype._messageAdded): Find the content view for the current log item, and call messageAdded
25664            on the LogContentView.
25665        * UserInterface/LogContentView.js:
25666        (WebInspector.LogContentView.prototype.messageAdded): Call _consoleMessageAdded.
25667        (WebInspector.LogContentView.prototype._consoleMessageAdded): This now takes just the ConsoleMessage instead of an event.
25668
256692012-01-30  Brian Weinstein  <bweinstein@apple.com>
25670
25671        Enable the ConsoleAgent after creating the managers.
25672
25673        Reviewed by Tim Hatcher.
25674
25675        * UserInterface/Main.js:
25676        (WebInspector.contentLoaded):
25677
256782012-01-30  Timothy Hatcher  <timothy@apple.com>
25679
25680        Add DOM properties to the DOM node details sidebar panel.
25681
25682        Last part of: <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
25683
25684        Reviewed by Brian Weinstein.
25685
25686        * UserInterface/DOMNodeDetailsSidebarPanel.css: Added.
25687        (.sidebar > .panel.details.dom-node .row.properties):
25688        * UserInterface/DOMNodeDetailsSidebarPanel.js:
25689        (WebInspector.DOMNodeDetailsSidebarPanel):
25690        (WebInspector.DOMNodeDetailsSidebarPanel.prototype.refresh): Call _refreshProperties.
25691        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties): Added.
25692        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved.collectPrototypes): Added.
25693        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved): Added.
25694        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady): Added.
25695        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection): Added.
25696        * UserInterface/Main.html: Included DOMNodeDetailsSidebarPanel.css.
25697        * UserInterface/Section.css:
25698        (.section .header): Added position: relative so the disclosure triangles show up correctly.
25699        (.properties-tree): Added outline: none to prevent a focus ring.
25700
257012012-01-29  Timothy Hatcher  <timothy@apple.com>
25702
25703        Add a simple DOM node details sidebar panel that shows type, name and attributes.
25704
25705        Part of: <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
25706
25707        Reviewed by Brian Weinstein.
25708
25709        * UserInterface/DOMNodeDetailsSidebarPanel.js: Added.
25710        (WebInspector.DOMNodeDetailsSidebarPanel):
25711        (WebInspector.DOMNodeDetailsSidebarPanel.prototype.refresh):
25712        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAttributes):
25713        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._attributesChanged):
25714        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._nodeTypeDisplayName):
25715        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._createAttributesDataGrid):
25716        * UserInterface/Images/NavigationItemAngleBrackets.pdf: Added.
25717        * UserInterface/Main.html: Included DOMNodeDetailsSidebarPanel.js.
25718        * UserInterface/Main.js:
25719        (WebInspector.contentLoaded): Included DOMNodeDetailsSidebarPanel in the details sidebar list.
25720
257212012-01-29  Timothy Hatcher  <timothy@apple.com>
25722
25723        Add DOMDetailsSidebarPanel as a base class for all the DOM node focused details sidebar panels.
25724
25725        Needed for:
25726        <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
25727        <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
25728        <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25729        <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
25730        <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
25731
25732        Reviewed by Brian Weinstein.
25733
25734        * UserInterface/DOMDetailsSidebarPanel.js: Added.
25735        (WebInspector.DOMDetailsSidebarPanel):
25736        (WebInspector.DOMDetailsSidebarPanel.prototype.inspect):
25737        (WebInspector.DOMDetailsSidebarPanel.prototype.get domNode):
25738        (WebInspector.DOMDetailsSidebarPanel.prototype.set domNode):
25739        (WebInspector.DOMDetailsSidebarPanel.prototype.addEventListeners):
25740        (WebInspector.DOMDetailsSidebarPanel.prototype.removeEventListeners):
25741        * UserInterface/Main.html: Included DOMDetailsSidebarPanel.js.
25742
257432012-01-29  Timothy Hatcher  <timothy@apple.com>
25744
25745        Display information about the selected resource in the resource details sidebar panel.
25746
25747        Last part of: <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
25748
25749        Reviewed by Brian Weinstein.
25750
25751        * UserInterface/ResourceDetailsSidebarPanel.js:
25752        (WebInspector.ResourceDetailsSidebarPanel): Create DetailsSections for the various parts of info to display.
25753        (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Remove and add event listeners.
25754        (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call the individual refresh functions.
25755        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL): Added. Update the affected rows.
25756        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshResourceType): Added. Ditto.
25757        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshMIMEType): Added. Ditto.
25758        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestHeaders): Added. Ditto.
25759        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshResponseHeaders): Added. Ditto.
25760        (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid): Added. Helper to create a simple grid.
25761        * UserInterface/Utilities.js:
25762        (parseLocationQueryParameters): Use the queryString function after trimming the "?".
25763        (queryString): Added. Factored out of parseLocationQueryParameters.
25764        (queryString.decode): Added. Properly decode "+" as " ".
25765
257662012-01-26  Timothy Hatcher  <timothy@apple.com>
25767
25768        Add the start of WebInspector.ResourceDetailsSidebarPanel.
25769
25770        Part of: <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
25771
25772        Reviewed by Brian Weinstein.
25773
25774        * UserInterface/Main.html: Included ResourceDetailsSidebarPanel.js.
25775        * UserInterface/Main.js:
25776        (WebInspector.contentLoaded): Create a WebInspector.ResourceDetailsSidebarPanel.
25777        * UserInterface/ResourceDetailsSidebarPanel.js: Added.
25778        (WebInspector.ResourceDetailsSidebarPanel):
25779        (WebInspector.ResourceDetailsSidebarPanel.prototype.inspect):
25780        (WebInspector.ResourceDetailsSidebarPanel.prototype.get resource):
25781        (WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
25782
257832012-01-29  Timothy Hatcher  <timothy@apple.com>
25784
25785        Add DetailsSection and friends to be used by details sidebar panels.
25786
25787        Needed for:
25788        <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
25789        <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
25790        <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
25791        <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25792        <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
25793        <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
25794
25795        Reviewed by Brian Weinstein.
25796
25797        * UserInterface/DetailsSection.css: Added.
25798        (.details-section):
25799        (.details-section > .header):
25800        (.details-section > .header::before):
25801        (.details-section > .header:active::before):
25802        (.details-section.collapsed > .header::before):
25803        (.details-section.collapsed > .header:active::before):
25804        (.details-section > .content):
25805        (.details-section.collapsed > .content):
25806        (.details-section > .content > .group):
25807        (.details-section > .content > .group:nth-child(even)):
25808        (.details-section > .content > .group:nth-child(even) > .row:first-child > *):
25809        (.details-section > .content > .group:nth-child(even) > .row:last-child > *):
25810        (.details-section > .content > .group > .row):
25811        (.details-section > .content > .group > .row:last-child > *):
25812        (.details-section > .content > .group > .row.empty):
25813        (.details-section > .content > .group:nth-child(even) > .row.empty:last-child):
25814        (.details-section > .content > .group:nth-child(even) > .row.empty:last-child > *):
25815        (.details-section > .content > .group:nth-child(even) > .row.empty:last-child > * > *):
25816        (.details-section > .content > .group > .row > *):
25817        (.details-section > .content > .group > .row > .label):
25818        (.details-section > .content > .group > .row > .value):
25819        (.details-section > .content > .group > .data-grid-row):
25820        (.details-section > .content > .group > .data-grid-row.empty):
25821        (.details-section > .content .data-grid):
25822        * UserInterface/DetailsSection.js: Added.
25823        (WebInspector.DetailsSection):
25824        (WebInspector.DetailsSection.prototype.get element):
25825        (WebInspector.DetailsSection.prototype.get title):
25826        (WebInspector.DetailsSection.prototype.set title):
25827        (WebInspector.DetailsSection.prototype.get collapsed):
25828        (WebInspector.DetailsSection.prototype.set collapsed):
25829        (WebInspector.DetailsSection.prototype.get groups):
25830        (WebInspector.DetailsSection.prototype.set groups):
25831        (WebInspector.DetailsSection.prototype._headerElementClicked):
25832        (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded.disclosureImageLoaded):
25833        (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded.generateDisclosureTriangle):
25834        (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded):
25835        * UserInterface/DetailsSectionDataGridRow.js: Added.
25836        (WebInspector.DetailsSectionDataGridRow):
25837        (WebInspector.DetailsSectionDataGridRow.prototype.constructor.WebInspector.DetailsSectionDataGridRow.get element):
25838        (WebInspector.DetailsSectionDataGridRow.prototype.get emptyMessage):
25839        (WebInspector.DetailsSectionDataGridRow.prototype.set emptyMessage):
25840        (WebInspector.DetailsSectionDataGridRow.prototype.get dataGrid):
25841        (WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid):
25842        * UserInterface/DetailsSectionGroup.js: Added.
25843        (WebInspector.DetailsSectionGroup):
25844        (WebInspector.DetailsSectionGroup.prototype.get element):
25845        (WebInspector.DetailsSectionGroup.prototype.get rows):
25846        (WebInspector.DetailsSectionGroup.prototype.set rows):
25847        * UserInterface/DetailsSectionRow.js: Added.
25848        (WebInspector.DetailsSectionRow):
25849        (WebInspector.DetailsSectionRow.prototype.get element):
25850        (WebInspector.DetailsSectionRow.prototype.get label):
25851        (WebInspector.DetailsSectionRow.prototype.set label):
25852        (WebInspector.DetailsSectionRow.prototype.get value):
25853        (WebInspector.DetailsSectionRow.prototype.set value):
25854        * UserInterface/Main.html: Included DetailsSection.{css,js}, DetailsSectionDataGridRow.js,
25855        DetailsSectionGroup.js, and DetailsSectionRow.js.
25856
258572012-01-26  Timothy Hatcher  <timothy@apple.com>
25858
25859        Selectively show and hide panels in the Details sidebar based on if they can inspect the current
25860        represented objects being viewed in the content browser.
25861
25862        Needed for:
25863        <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
25864        <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
25865        <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
25866        <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25867        <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
25868        <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
25869
25870        Reviewed by Brian Weinstein.
25871
25872        * UserInterface/Main.js:
25873        (WebInspector.contentLoaded): Added event listener for CurrentRepresentedObjectsDidChange event.
25874        (WebInspector._contentBrowserRepresentedObjectsDidChange): Added. Call inspect on each details
25875        sidebar panel and show ones that return true and hide ones that return false.
25876
258772012-01-26  Timothy Hatcher  <timothy@apple.com>
25878
25879        Add WebInspector.DetailsSidebarPanel for use by panels in the Details sidebar.
25880
25881        Needed for:
25882        <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
25883        <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
25884        <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
25885        <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25886        <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
25887        <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
25888
25889        Reviewed by Brian Weinstein.
25890
25891        * UserInterface/DetailsSidebarPanel.js: Added.
25892        (WebInspector.DetailsSidebarPanel):
25893        (WebInspector.DetailsSidebarPanel.prototype.inspect):
25894        (WebInspector.DetailsSidebarPanel.prototype.shown):
25895        (WebInspector.DetailsSidebarPanel.prototype.needsRefresh):
25896        (WebInspector.DetailsSidebarPanel.prototype.refresh):
25897        * UserInterface/Sidebar.js:
25898        (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Call hidden and shown on the SidebarPanel.
25899        (WebInspector.Sidebar.prototype.set collapsed): Update layout of the navigation bar when uncollapsed.
25900        * UserInterface/SidebarPanel.js:
25901        (WebInspector.SidebarPanel.prototype.shown): Added stub.
25902        (WebInspector.SidebarPanel.prototype.hidden): Added stub.
25903
259042012-01-26  Timothy Hatcher  <timothy@apple.com>
25905
25906        Add support for removing and inserting SidebarPanels to WebInspector.Sidebar.
25907
25908        Needed for:
25909        <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
25910        <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
25911        <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
25912        <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25913        <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
25914        <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
25915
25916        Reviewed by Brian Weinstein.
25917
25918        * UserInterface/NavigationBar.js:
25919        (WebInspector.NavigationBar.prototype.removeNavigationItem): Clear the selected navigation item if it is this.
25920        * UserInterface/Sidebar.js:
25921        (WebInspector.Sidebar.prototype.insertSidebarPanel): Added.
25922        (WebInspector.Sidebar.prototype.removeSidebarPanel): Added.
25923        (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Allow setting of null. Factored out code into _findSidebarPanel.
25924        (WebInspector.Sidebar.prototype._findSidebarPanel): Added.
25925
259262012-01-25  Timothy Hatcher  <timothy@apple.com>
25927
25928        Add support for getting the current represented objects from ContentBrowser.
25929
25930        Needed for:
25931        <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
25932        <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
25933        <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
25934        <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
25935        <rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
25936        <rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
25937
25938        Reviewed by Brian Weinstein.
25939
25940        * UserInterface/ContentBrowser.js:
25941        (WebInspector.ContentBrowser.prototype.get currentRepresentedObjects): Added.
25942        (WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem): Make sure to set
25943        components even if it is empty.
25944        (WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon): Set a timeout.
25945        (WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon.delayed): Fire the event.
25946        (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange): Call
25947        _dispatchCurrentRepresentedObjectsDidChangeEventSoon.
25948        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call
25949        _dispatchCurrentRepresentedObjectsDidChangeEventSoon.
25950        * UserInterface/DOMTreeElementPathComponent.js:
25951        (WebInspector.DOMTreeElementPathComponent): Set the representedObject to the treeElement.representedObject if
25952        a representedObject wasn't passed in.
25953        * UserInterface/GeneralTreeElementPathComponent.js:
25954        (WebInspector.GeneralTreeElementPathComponent): Set the representedObject to the treeElement.representedObject if
25955        a representedObject wasn't passed in.
25956        * UserInterface/HierarchicalPathNavigationItem.js:
25957        (WebInspector.HierarchicalPathNavigationItem.prototype.get lastComponent): Added.
25958
259592012-01-26  Timothy Hatcher  <timothy@apple.com>
25960
25961        Center align navigation items in navigation bars by default.
25962
25963        You can still get left alignment by adding a flexible space on the left. This make it easier than
25964        flexible spaces on each side for center alignment.
25965
25966        Reviewed by Brian Weinstein.
25967
25968        * UserInterface/NavigationBar.css:
25969        (.navigation-bar): Set -webkit-box-pack to center.
25970
259712012-01-29  Timothy Hatcher  <timothy@apple.com>
25972
25973        Add a helper function for display names of resource types.
25974
25975        Reviewed by Brian Weinstein.
25976
25977        * UserInterface/FrameTreeElement.js:
25978        (WebInspector.FrameTreeElement.prototype._folderNameForResourceType): Use WebInspector.Resource.Type.displayName.
25979        * UserInterface/Resource.js:
25980        (WebInspector.Resource.Type.displayName): Added. Can return plural or singular strings.
25981
259822012-01-29  Timothy Hatcher  <timothy@apple.com>
25983
25984        Update the request headers when resources are redirected.
25985
25986        Reviewed by Brian Weinstein.
25987
25988        * UserInterface/FrameResourceManager.js:
25989        (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass along the
25990        request headers to updateForRedirectResponse.
25991        * UserInterface/Resource.js:
25992        (WebInspector.Resource.prototype.get updateForRedirectResponse): Added requestHeaders parameter.
25993        Set _requestHeaders and fire the RequestHeadersDidChange event.
25994
259952012-01-29  Timothy Hatcher  <timothy@apple.com>
25996
25997        Centralize the code that adds zero-width spaces to long strings so it can be used
25998        in other places.
25999
26000        Also add a copy event listener that strips the zero-width spaces from the pasteboard.
26001
26002        Reviewed by Brian Weinstein.
26003
26004        * UserInterface/DOMTreeElement.js:
26005        (WebInspector.DOMTreeElement.prototype._buildAttributeDOM): Use insertWordBreakCharacters.
26006        * UserInterface/Main.js:
26007        (WebInspector.contentLoaded): Added copy event listener.
26008        (WebInspector._sanitizeClipboardData): Added.
26009        * UserInterface/Utilities.js:
26010        (String.prototype.insertWordBreakCharacters): Added.
26011        (String.prototype.removeWordBreakCharacters): Added.
26012
260132012-01-27  Brian Weinstein  <bweinstein@apple.com>
26014
26015        Create a log session when the inspector is first loaded.
26016
26017        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26018
26019        Reviewed by Tim Hatcher.
26020
26021        * UserInterface/LogSidebarPanel.js:
26022        (WebInspector.LogSidebarPanel):
26023
260242012-01-27  Brian Weinstein  <bweinstein@apple.com>
26025
26026        Add some functions for open source needed to create links and strings.
26027
26028        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26029
26030        Reviewed by Tim Hatcher.
26031
26032        * UserInterface/LogContentView.js:
26033        (WebInspector.LogContentView): Add a click handler to the content view.
26034        (WebInspector.LogContentView.prototype._mouseWasClicked): Find the <a> element we clicked on,
26035            and open the URL. This does the right thing for external resources (loads them in Safari),
26036            and resources from the page (loads the Resource in the inspector).
26037        * UserInterface/Main.js:
26038        (WebInspector.linkifyURLAsNode): Copied from open source.
26039        (WebInspector.linkifyStringAsFragmentWithCustomLinkifier): Ditto.
26040        (WebInspector.linkifyStringAsFragment): Ditto.
26041
260422012-01-27  Brian Weinstein  <bweinstein@apple.com>
26043
26044        Show the DOM tree for an element that the user enters.
26045
26046        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26047
26048        Reviewed by Tim Hatcher.
26049
26050        * UserInterface/ConsoleMessageImpl.js:
26051        (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode): Create a DOMTreeOutline instead
26052            of an ElementTreeOutline, and get the node from the DOMTreeManager.
26053
260542012-01-26  Brian Weinstein  <bweinstein@apple.com>
26055
26056        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26057
26058        Add working versions of LogContentView.css and LogContentView.js.
26059
26060        LogContentView.css copied rules for open source's
26061        inspector.css, with one change to add outline: none to the prompt and a change to use the same font that
26062        we use in the text editor.
26063
26064        LogContentView.js changed *styleClass to classList.*, and removed calls to objects that we don't have in
26065        our inspector (WebInspector.settings, WebInspector.debuggerPresentationModel).
26066
26067        This patch makes the console view show up, and you can type and run JavaScript.
26068
26069        Reviewed by Tim Hatcher.
26070
26071        * UserInterface/LogContentView.css: Added. Copied selected rules from inspector.css in Open Source.
26072        * UserInterface/LogContentView.js: Added. This file was copied from Open Source, but changes have been
26073            made to remove calls to objects that we don't have in our inspector (WebInspector.settings, WebInspector.debuggerPresentationModel),
26074            and *styleClass has been changed to classList.*.
26075        * UserInterface/Main.html: Added new files.
26076
260772012-01-26  Brian Weinstein  <bweinstein@apple.com>
26078
26079        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26080
26081        Add some needed functions to Utilities.js. These were copied from Open Source, but switched over
26082        to the Object.defineProperty syntax.
26083
26084        Reviewed by Tim Hatcher.
26085
26086        * UserInterface/Utilities.js:
26087
260882012-01-26  Brian Weinstein  <bweinstein@apple.com>
26089
26090        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26091
26092        Add the ConsoleMessage and ConsoleMessageImpl files from Open Source. These will be renamed
26093        and combined in a follow-up patch.
26094
26095        Reviewed by Tim Hatcher.
26096
26097        * UserInterface/ConsoleMessage.js: Added. Copied from Open Source's ConsoleModel.js.
26098        * UserInterface/ConsoleMessageImpl.js: Added. Copied from Open Source. The only changes are
26099            changing *styleClass -> classList.*.
26100        * UserInterface/Main.html: Added new files.
26101
261022012-01-26  Brian Weinstein  <bweinstein@apple.com>
26103
26104        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26105
26106        Add the TextPrompt.js and TextPrompt.css files. These are needed for autocompleting of the
26107        user's input.
26108
26109        Reviewed by Tim Hatcher.
26110
26111        * UserInterface/Main.html: Add new files.
26112        * UserInterface/TextPrompt.css: Added. Copied from Open Source.
26113        * UserInterface/TextPrompt.js: Added. Copied from Open Source. The only changes that were
26114            made were changing *styleClass("class") -> classList.*("class").
26115
261162012-01-26  Brian Weinstein  <bweinstein@apple.com>
26117
26118        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26119
26120        Add some images that will be needed by the log console view.
26121
26122        These need to be in HiDPI. I updated <rdar://problem/10749265> to say that the console images
26123        need to be HiDPI as well.
26124
26125        Reviewed by Tim Hatcher.
26126
26127        * UserInterface/Images/disclosureTriangleSmallDown.png: Added.
26128        * UserInterface/Images/disclosureTriangleSmallRight.png: Added.
26129        * UserInterface/Images/errorIcon.png: Added.
26130        * UserInterface/Images/searchSmallBrightBlue.png: Added.
26131        * UserInterface/Images/userInputIcon.png: Added.
26132        * UserInterface/Images/userInputResultIcon.png: Added.
26133        * UserInterface/Images/warningIcon.png: Added.
26134
261352012-01-26  Brian Weinstein  <bweinstein@apple.com>
26136
26137        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26138
26139        Add some needed files from Open Source.
26140
26141        Reviewed by Tim Hatcher.
26142
26143        * UserInterface/Images/deleteIcon.png: Added.
26144        * UserInterface/Main.html: Added new files.
26145        * UserInterface/ObjectPropertiesSection.js: Added. Copied from Open Source.
26146        * UserInterface/PropertiesSection.js: Added. Copied from Open Source.
26147        * UserInterface/Section.css: Added. Copied selected rules about .section and .properties-tree from Open Source.
26148        * UserInterface/Section.js: Added. Copied from Open Source.
26149
261502012-01-26  Brian Weinstein  <bweinstein@apple.com>
26151
26152        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26153
26154        This patch hooks up the plumbing to show a LogContentView (which doesn't exist), when a tree element
26155        from the Log sidebar panel is selected.
26156
26157        Reviewed by Tim Hatcher.
26158
26159        * UserInterface/ContentView.js:
26160        (WebInspector.ContentView): Add a case for LogObject. It creates a LogContentView, which isn't available
26161            yet, but will be in a later patch.
26162        (WebInspector.ContentView.isViewable): Ditto.
26163        * UserInterface/LogSidebarPanel.js:
26164        (WebInspector.LogSidebarPanel):
26165        (WebInspector.LogSidebarPanel.prototype._treeElementSelected): Make sure the selected element
26166            has a LogObject as its represented object, and then show the correct content view.
26167        * UserInterface/Main.js:
26168        (WebInspector.contentBrowserTreeElementForRepresentedObject): Add a case for LogObject.
26169
26170
261712012-01-26  Brian Weinstein  <bweinstein@apple.com>
26172
26173        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26174
26175        Add a stub LogObject and use that as the represented object for the logs sidebar panel.
26176
26177        Reviewed by Tim Hatcher.
26178
26179        * UserInterface/LogObject.js: Added.
26180        (WebInspector.LogObject):
26181        * UserInterface/LogSidebarPanel.js:
26182        (WebInspector.LogSidebarPanel.prototype._sessionStarted):
26183        * UserInterface/Main.html:
26184
261852012-01-26  Brian Weinstein  <bweinstein@apple.com>
26186
26187        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26188
26189        Add tree elements to the Log Sidebar. Each tree element has the URL and date of when the page started loading,
26190        and selecting it will show a console view in the future.
26191
26192        If the same page is loaded, the console sidebar isn't cleared, but when a page with a different URL is loaded,
26193        then the sidebar is cleared.
26194
26195        Reviewed by Tim Hatcher.
26196
26197        * UserInterface/LogManager.js:
26198        (WebInspector.LogManager):
26199        (WebInspector.LogManager.prototype.constructor.WebInspector.LogManager.initialize):
26200        (WebInspector.LogManager.prototype._mainResourceDidChange):
26201        * UserInterface/LogSidebarPanel.js:
26202        (WebInspector.LogSidebarPanel):
26203        (WebInspector.LogSidebarPanel.prototype.constructor.WebInspector.LogSidebarPanel._sessionStarted):
26204        (WebInspector.LogSidebarPanel.prototype._logsCleared):
26205
262062012-01-26  Brian Weinstein  <bweinstein@apple.com>
26207
26208        More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26209
26210        Add a stub LogManager, and call it from Main.js.
26211
26212        Reviewed by Tim Hatcher.
26213
26214        * UserInterface/ConsoleObserver.js:
26215        (WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded):
26216        * UserInterface/LogManager.js: Added.
26217        (WebInspector.LogManager):
26218        (WebInspector.LogManager.prototype.constructor.WebInspector.LogManager.initialize):
26219        * UserInterface/Main.html:
26220        * UserInterface/Main.js:
26221        (WebInspector.contentLoaded):
26222
262232012-01-26  Brian Weinstein  <bweinstein@apple.com>
26224
26225        Start of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
26226
26227        Add a stub LogSidebarPanel and create it instead of a generic sidebar panel for Log.
26228
26229        Reviewed by Tim Hatcher.
26230
26231        * UserInterface/Main.html:
26232        * UserInterface/Main.js:
26233        (WebInspector.contentLoaded):
26234
262352012-01-25  Brian Weinstein  <bweinstein@apple.com>
26236
26237        More of <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
26238
26239        Highlight lines that have errors or warnings. This patch doesn't behave correctly for lines that
26240        have multiple issues, but that won't be implemented until we actually show the issues on the page.
26241
26242        This patch adds a new delegate call to TextEditor - textEditorLineContentUpdated. When a single line's
26243        content is updated, it calls to the delegate, which will add a style class if there is an issue on that
26244        line. In the future, it will also add the error text, but that will be done later as well.
26245
26246        Reviewed by Tim Hatcher.
26247
26248        * UserInterface/TextResourceContentView.css:
26249        (.text-editor .text-editor-text-chunk.error): Add a background color and a box shadow.
26250        (.text-editor .text-editor-text-chunk.warning): Ditto.
26251        * UserInterface/TextEditor.js:
26252        (WebInspector.TextEditor.prototype.singleLineElementForLine): Returns the element of the line if it is
26253            a single line (if it's not, it isn't visible and we don't need to worry about it).
26254        (WebInspector.TextEditorTextChunk.prototype.updateContent):
26255        * UserInterface/TextResourceContentView.js:
26256        (WebInspector.TextResourceContentView.prototype.addIssue): Call _addIssueToLine if we have an element to update.
26257        (WebInspector.TextResourceContentView.prototype._addIssueToLine): Add a style class to the line if there is an
26258            issue.
26259        (WebInspector.TextResourceContentView.prototype.textEditorLineContentUpdated): Call _addIssueToLine if we have
26260            any issues on that line.
26261        * UserInterface/IssueManager.js
26262        (WebInspector.IssueManager.prototype.issueWasAdded): We are given 1-based line numbers from the protocol, but everywhere
26263            in the inspector deals with 0 based line numbers. Subtract 1 from the issue line number that we are given before
26264            storing the IssueMessage.
26265
262662012-01-24  Brian Weinstein  <bweinstein@apple.com>
26267
26268        More of <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
26269
26270        When a TextResourceContentView is instantiated, get a list of issues for its resource, and start listening for more.
26271
26272        When we get an issue from the listener or from the constructor, call _addIssue on them, which adds the issue to
26273        the content view's collection of issues.
26274
26275        Reviewed by Tim Hatcher.
26276
26277        * UserInterface/TextResourceContentView.js:
26278        (WebInspector.TextResourceContentView): Start listening for issues and build a list of issues.
26279        (WebInspector.TextResourceContentView.prototype._issueWasAdded): Call _addIssue.
26280        (WebInspector.TextResourceContentView.prototype._addIssue): Add the issue to our list of issues, and add a FIXME to do more
26281            with it.
26282
262832012-01-23  Brian Weinstein  <bweinstein@apple.com>
26284
26285        Remove some unused variables.
26286
26287        Rubber-stamped by Joseph Pecoraro.
26288
26289        * UserInterface/TextEditor.js:
26290
262912012-01-23  Brian Weinstein  <bweinstein@apple.com>
26292
26293        Last part of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26294
26295        When a resource match is selected in the search sidebar, select the text that was searched for in
26296        the TextContentResourceView and scroll it into view.
26297
26298        This makes it easier to find the text that the user searched for in long lines.
26299
26300        Reviewed by Tim Hatcher.
26301
26302        * UserInterface/FrameContentView.js:
26303        (WebInspector.FrameContentView.prototype.showSourceCode): Pass the text range to select along.
26304        * UserInterface/ResourceSidebarPanel.js:
26305        (WebInspector.ResourceSidebarPanel.prototype.showResourceSourceCode): Ditto.
26306        * UserInterface/SearchSidebarPanel.js:
26307        (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Ditto.
26308        * UserInterface/TextResourceContentView.js:
26309        (WebInspector.TextResourceContentView.prototype.contentAvailable): Ditto.
26310        (WebInspector.TextResourceContentView.prototype.revealLine): Ditto.
26311        * UserInterface/TextEditor.js:
26312        (WebInspector.TextEditor.prototype.shown): Ditto.
26313        (WebInspector.TextEditor.prototype.revealLine): Build a selection range (start and end nodes and offsets), and set our selection
26314            and bring the container of the selection end into view.
26315        (WebInspector.TextEditor.prototype.revealLine.getTextNodes): Finds all of the text nodes in a possibly syntax highlighted line.
26316        (WebInspector.TextEditor.prototype.revealLine.findOffsetInTextNodes): Iterate over all of the text nodes, and find the child
26317            node and offset into the child node that matches the offset into the whole line.
26318
263192012-01-23  Timothy Hatcher  <timothy@apple.com>
26320
26321        Fix some errors when inspecting frames now that #document is included in the tree.
26322
26323        This gives document nodes their own "D" icon, which was previously missing because of
26324        a typo for the "N" icon.
26325
26326        Reviewed by Brian Weinstein.
26327
26328        * UserInterface/DOMTreeElementPathComponent.js:
26329        (WebInspector.DOMTreeElementPathComponent): Add a case for Node.DOCUMENT_NODE. Fix a typo
26330        by using DOMNodeIconStyleClassName instead of DOMUnknownNodeIconStyleClassName.
26331        * UserInterface/Images/DOMDocument.pdf: Added.
26332        * UserInterface/PathComponentIcons.css:
26333        (.dom-document-icon .icon): Added.
26334
263352012-01-23  Timothy Hatcher  <timothy@apple.com>
26336
26337        Merge the DOMAgent.js change in r105620 so the Inspect Element content menu works in frames.
26338
26339        Reviewed by Brian Weinstein.
26340
26341        * UserInterface/DOMNode.js:
26342        (WebInspector.DOMNode.prototype._setChildrenPayload): Return early for frame elements.
26343
263442012-01-23  Timothy Hatcher  <timothy@apple.com>
26345
26346        Make command-clicking links in the DOM tree always open into a new Safari window/tab.
26347
26348        Since DOMTreeContentView delays the call to WebInspector.openURL, the openURL function
26349        can't look at window.event to see if the command key is down. So we need to do that
26350        check before calling openURL.
26351
26352        Reviewed by Brian Weinstein.
26353
26354        * UserInterface/DOMTreeContentView.js:
26355        (WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink): Check for metaKey
26356        and pass that as alwaysOpenExternally to WebInspector.openURL.
26357
263582012-01-23  Timothy Hatcher  <timothy@apple.com>
26359
26360        Use InspectorFrontendHost.openInNewTab instead of PageAgent.open now that
26361        https://webkit.org/b/74790 is fixed.
26362
26363        Reviewed by Brian Weinstein.
26364
26365        * UserInterface/Main.js:
26366        (WebInspector.openURL): Use InspectorFrontendHost.openInNewTab instead of PageAgent.open.
26367
263682012-01-23  Brian Weinstein  <bweinstein@apple.com>
26369
26370        More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26371
26372        Support the ability to have multiple matches on a line when we search the DOM.
26373
26374        When we find a DOM element matches our search term, we generate a title for it (by moving the _generateTitle
26375        function from DOMSearchMatchObject out of the class to a static method), and find all of our matches in the title.
26376
26377        We then generate DOMSearchMatchObjects and SearchResultTreeElements for each of these.
26378
26379        Reviewed by Tim Hatcher.
26380
26381        * UserInterface/DOMSearchMatchObject.js:
26382        (WebInspector.DOMSearchMatchObject):
26383        (WebInspector.DOMSearchMatchObject.prototype.get title): Returns the title.
26384        (WebInspector.DOMSearchMatchObject.prototype.get textRange): Returns the text range.
26385        (WebInspector.DOMSearchMatchObject.titleForDOMNode):
26386        * UserInterface/SearchResultTreeElement.js:
26387        (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): We always have a textRange now, both DOMSearchMatchObject and ResourceSearchMatchObject
26388            both have a textRange getter.
26389        * UserInterface/SearchSidebarPanel.js:
26390        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): Generate
26391            the text for the DOM node that we found a result for, and find all of the matching instances in that node.
26392
26393
263942012-01-23  Brian Weinstein  <bweinstein@apple.com>
26395
26396        More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26397
26398        Support the ability to have multiple matches on a line for when we search in a resource.
26399
26400        When the PageAgent gives us information about the lines that match our search query, instead of just
26401        finding the first match, find all of the matches on that line. Create a ResourceSearchMatchObject and
26402        SearchResultTreeElement for each result on the line.
26403
26404        Reviewed by Tim Hatcher.
26405
26406        * UserInterface/ResourceSearchMatchObject.js:
26407        (WebInspector.ResourceSearchMatchObject): Set the textRange
26408        (WebInspector.ResourceSearchMatchObject.prototype.get textRange):
26409        * UserInterface/SearchResultTreeElement.js:
26410        (WebInspector.SearchResultTreeElement):
26411        (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): If we were given a text range, use that instead of finding the first match
26412            in the title.
26413        * UserInterface/SearchSidebarPanel.js:
26414        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback): Find
26415            all of the matches on the line instead of just the first one.
26416
264172012-01-23  Brian Weinstein  <bweinstein@apple.com>
26418
26419        More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26420
26421        Bring TextRange over from open source.
26422
26423        Reviewed by Tim Hatcher.
26424
26425        * UserInterface/TextRange.js: Added.
26426        (WebInspector.TextRange):
26427        (WebInspector.TextRange.prototype.constructor.WebInspector.TextRange.isEmpty):
26428        (WebInspector.TextRange.prototype.get linesCount):
26429        (WebInspector.TextRange.prototype.collapseToEnd):
26430        (WebInspector.TextRange.prototype.normalize):
26431        (WebInspector.TextRange.prototype.clone):
26432
264332012-01-20  Brian Weinstein  <bweinstein@apple.com>
26434
26435        More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26436
26437        Cancel old searches when new ones are started.
26438
26439        Reviewed by Tim Hatcher.
26440
26441        * UserInterface/SearchSidebarPanel.js:
26442        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): Check
26443            to make sure we are still appending results for the right searchId.
26444        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback): Set the current _searchId.
26445        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged): Call _cancelCurrentSearch.
26446        (WebInspector.SearchSidebarPanel.prototype._cancelCurrentSearch): If a search ID is set, call DOMAgent.discardSearchResults on it,
26447            and delete the searchId.
26448
264492012-01-22  Timothy Hatcher  <timothy@apple.com>
26450
26451        Collaspe path components in the navigation bar when they are too wide to fit.
26452
26453        The components collapse from left to right with text truncation and eventually to just the icon.
26454
26455        Reviewed by Brian Weinstein.
26456
26457        * UserInterface/HierarchicalPathComponent.css:
26458        (.hierarchical-path-component): Use -webkit-box and set a min-width.
26459        (.hierarchical-path-component > .title): Use -webkit-box so the title can flex.
26460        (.hierarchical-path-component > .title > .content): Added. Needed to make text-overflow work.
26461        (.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-child): Added.
26462        Use a different min-width since the separator is hidden.
26463        (.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-child > .separator):
26464        Renamed to use :last-child instead of :last-of-type.
26465        * UserInterface/HierarchicalPathComponent.js:
26466        (WebInspector.HierarchicalPathComponent): Create a title content element.
26467        (WebInspector.HierarchicalPathComponent.prototype.get displayName): Use the title content element.
26468        (WebInspector.HierarchicalPathComponent.prototype.set displayName): Ditto. Also set the tool tip.
26469        (WebInspector.HierarchicalPathComponent.prototype.get forcedWidth): Added.
26470        (WebInspector.HierarchicalPathComponent.prototype.set forcedWidth): Added.
26471        * UserInterface/HierarchicalPathNavigationItem.js:
26472        (WebInspector.HierarchicalPathNavigationItem.prototype.set components): Call updateLayout on the NavigationBar.
26473        (WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout): Added.
26474        * UserInterface/NavigationBar.js:
26475        (WebInspector.NavigationBar.prototype.insertNavigationItem): Set _parentNavigationBar to this.
26476        (WebInspector.NavigationBar.prototype.removeNavigationItem): Set _parentNavigationBar to null.
26477        (WebInspector.NavigationBar.prototype.updateLayout): Call updateLayout on each navigation item.
26478        * UserInterface/NavigationItem.js:
26479        (WebInspector.NavigationItem.prototype.get parentNavigationBar): Added.
26480        (WebInspector.NavigationItem.prototype.updateLayout): Added stub.
26481
264822012-01-22  Timothy Hatcher  <timothy@apple.com>
26483
26484        Make it possible for content views to update their layout as the size of the content area changes.
26485
26486        The DOM tree needs this to update the size of the selection to stay aligned with the row. Data grid
26487        based content views need this to update the position of the resizer elements. The font content view
26488        uses this to update the size of the font preview.
26489
26490        Reviewed by Brian Weinstein.
26491
26492        * UserInterface/ClusterContentView.js:
26493        (WebInspector.ClusterContentView.prototype.updateLayout): Added. Call through to the current content view.
26494        * UserInterface/ContentBrowser.js:
26495        (WebInspector.ContentBrowser.prototype.updateLayout): Added. Call updateLayout on the navigation bar and
26496        the content view container.
26497        * UserInterface/ContentView.js:
26498        (WebInspector.ContentView.prototype.updateLayout): Added stub.
26499        * UserInterface/ContentViewContainer.js:
26500        (WebInspector.ContentViewContainer.prototype.updateLayout): Added. Call through to the current content view.
26501        * UserInterface/CookieStorageContentView.js:
26502        (WebInspector.CookieStorageContentView.prototype.updateLayout): Added. Call updateWidths on the DataGrid.
26503        * UserInterface/DOMStorageContentView.js:
26504        (WebInspector.DOMStorageContentView.prototype.updateLayout): Added. Call updateWidths on the DataGrid.
26505        * UserInterface/DOMTreeContentView.js:
26506        (WebInspector.DOMTreeContentView.prototype.updateLayout): Added. Call updateSelection on the DOMTreeOutline.
26507        * UserInterface/DatabaseTableContentView.js:
26508        (WebInspector.DatabaseTableContentView.prototype.updateLayout): Added. Call updateWidths on the DataGrid.
26509        * UserInterface/FontResourceContentView.js:
26510        (WebInspector.FontResourceContentView.prototype.updateLayout): Added. Call sizeToFit.
26511        (WebInspector.FontResourceContentView.prototype.shown): Removed call to sizeToFit since updateLayout is
26512        called on show too.
26513        * UserInterface/Main.js:
26514        (WebInspector.contentLoaded): Added event listeners for Sidebar.Event.WidthDidChange and window resize.
26515        (WebInspector._contentBrowserSizeDidChange): Added. Call updateLayout on contentBrowser.
26516        * UserInterface/Sidebar.js:
26517        (WebInspector.Sidebar.prototype.set width): Fire WidthDidChange event.
26518        (WebInspector.Sidebar.prototype.set collapsed): Ditto.
26519
265202012-01-21  Timothy Hatcher  <timothy@apple.com>
26521
26522        Remove resources from the Search and Issue sidebars when the frames they belong to are
26523        removed or navigated to a new page.
26524
26525        Part of:
26526        <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
26527        <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design
26528
26529        Reviewed by Brian Weinstein.
26530
26531        * UserInterface/Frame.js:
26532        (WebInspector.Frame.prototype.isDetached): Added. Helper function.
26533        * UserInterface/IssueSidebarPanel.js:
26534        (WebInspector.IssueSidebarPanel): Added event listeners.
26535        (WebInspector.IssueSidebarPanel.prototype._checkForOldResources): Added.
26536        (WebInspector.IssueSidebarPanel.prototype._checkForOldResources.delayedWork): Added.
26537        * UserInterface/SearchSidebarPanel.js:
26538        (WebInspector.SearchSidebarPanel): Added event listeners.
26539        (WebInspector.SearchSidebarPanel.prototype._checkForOldResources): Added.
26540        (WebInspector.SearchSidebarPanel.prototype._checkForOldResources.delayedWork): Added.
26541
265422012-01-21  Timothy Hatcher  <timothy@apple.com>
26543
26544        Disassociate resources from their frame when the main resource changes.
26545
26546        Resources were not being disassociated, so they always had a valid parentFrame. This made it
26547        hard to tell if a resource was still part of the page or not. This change is needed so the Search
26548        and Issue sidebars knows when it can remove resources during navigation.
26549
26550        Reviewed by Brian Weinstein.
26551
26552        * UserInterface/Frame.js:
26553        (WebInspector.Frame.prototype.initialize): Call _disassociateWithResource for the old main resource.
26554        (WebInspector.Frame.prototype.commitProvisionalLoad): Ditto. Also call removeAllResources before
26555        committing the provisional resources.
26556        * UserInterface/Resource.js:
26557        (WebInspector.Resource.prototype.isMainResource): Null check _parentFrame.
26558        (WebInspector.Resource.prototype._requestContentFromBackend): Null check _parentFrame and add a
26559        fallback branch so pending callbacks get notified.
26560        * UserInterface/ResourceTreeElement.js:
26561        (WebInspector.ResourceTreeElement.prototype._updateTitles): Null check frame.
26562
265632012-01-21  Timothy Hatcher  <timothy@apple.com>
26564
26565        Show a focus ring around the search field in the Search sidebar of the Web Inspector.
26566
26567        The filter field does not show a focus ring (matching Xcode), but the search field should.
26568
26569        Reviewed by Dan Bernstein.
26570
26571        * UserInterface/FilterBar.css:
26572        (.filter-bar): Remove outline: none. Not sure why it was here, it is still set on
26573        .filter-bar > input[type="search"].
26574        * UserInterface/SearchSidebarPanel.css:
26575        (.sidebar > .panel.search > .search-bar): Remove outline: none.
26576        (.sidebar > .panel.search > .search-bar > input[type="search"]): Ditto.
26577
265782012-01-21  Timothy Hatcher  <timothy@apple.com>
26579
26580        Make filtering work again in the Search sidebar of the Web Inspector.
26581
26582        In r40218 the mainTitle became a DocumentFragemnt, but the filtering code expects a string.
26583
26584        Reviewed by Dan Bernstein.
26585
26586        * UserInterface/SearchResultTreeElement.js:
26587        (WebInspector.SearchResultTreeElement.prototype.get filterableData): Added. Return the raw
26588        title of the represented object, which is still a string.
26589
265902012-01-20  Timothy Hatcher  <timothy@apple.com>
26591
26592        Allow resizing the Web Inspector when docked.
26593
26594        Reviewed by Brian Weinstein.
26595
26596        * UserInterface/Main.css:
26597        (#docked-resizer): Added.
26598        (body.docked #docked-resizer): Added.
26599        * UserInterface/Main.html: Added #docked-resizer element.
26600        * UserInterface/Main.js:
26601        (WebInspector.contentLoaded): Add mousedown listener on #docked-resizer.
26602        (WebInspector._dockedResizerMouseDown): Added.
26603        (WebInspector._dockedResizerMouseDown.dockedResizerDrag): Added.
26604        (WebInspector._dockedResizerMouseDown.dockedResizerDragEnd): Added.
26605
266062012-01-20  Timothy Hatcher  <timothy@apple.com>
26607
26608        Add dock toggle and close buttons to the new Web Inspector.
26609
26610        Reviewed by Brian Weinstein.
26611
26612        * UserInterface/ButtonNavigationItem.css:
26613        (.navigation-bar > .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
26614        Added :not(.suppress-bezel).
26615        * UserInterface/ButtonNavigationItem.js:
26616        (WebInspector.ButtonNavigationItem.prototype.get suppressBezel): Added.
26617        (WebInspector.ButtonNavigationItem.prototype.set suppressBezel): Added.
26618        * UserInterface/Images/Close.pdf: Added.
26619        * UserInterface/Images/Dock.pdf: Added.
26620        * UserInterface/Images/Undock.pdf: Added.
26621        * UserInterface/InspectorFrontendAPI.js: Added.
26622        (InspectorFrontendAPI._loaded): Added.
26623        (InspectorFrontendAPI._pendingCommands): Added.
26624        (InspectorFrontendAPI.isDebuggingEnabled): Added stub.
26625        (InspectorFrontendAPI.setDebuggingEnabled): Added stub.
26626        (InspectorFrontendAPI.isTimelineProfilingEnabled): Added stub.
26627        (InspectorFrontendAPI.setTimelineProfilingEnabled): Added stub.
26628        (InspectorFrontendAPI.isProfilingJavaScript): Added stub.
26629        (InspectorFrontendAPI.startProfilingJavaScript): Added stub.
26630        (InspectorFrontendAPI.stopProfilingJavaScript): Added stub.
26631        (InspectorFrontendAPI.setAttachedWindow): Added. Calls updateDockedState.
26632        (InspectorFrontendAPI.showConsole): Added stub.
26633        (InspectorFrontendAPI.dispatch): Added stub.
26634        (InspectorFrontendAPI.loadCompleted): Added stub.
26635        * UserInterface/Main.css:
26636        (body.docked): Added. Adds a top border.
26637        * UserInterface/Main.html: Included InspectorFrontendAPI.js.
26638        * UserInterface/Main.js:
26639        (WebInspector.contentLoaded): Create and insert the dock toggle and close buttons. Tell InspectorFrontendAPI
26640        that we are loaded so pending commands are dispatched.
26641        (WebInspector.updateDockedState): Added. Updates the sate of the navigation bar buttons.
26642        (WebInspector.close): Added.
26643        (WebInspector._dockToggleButtonToolTip): Added.
26644        (WebInspector._toggleDockedState): Added.
26645        * UserInterface/Utilities.js:
26646        (parseLocationQueryParameters): Added. Helper to parse the query string.
26647
266482012-01-19  Brian Weinstein  <bweinstein@apple.com>
26649
26650        More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26651
26652        Instead of passing a string as a title to the GeneralTreeElement, pass a DocumentFragment which
26653        contains our necessary text, but highlights the search string.
26654
26655        Reviewed by Tim Hatcher.
26656
26657        * UserInterface/GeneralTreeElement.js:
26658        (WebInspector.GeneralTreeElement.prototype._updateTitleElements): Add a special case for _mainTitle
26659            being a Node.
26660        * UserInterface/NavigationSidebarPanel.css:
26661        (.navigation-sidebar-panel-content-tree-outline .item .highlight): Set the highlighted text to have
26662            a yellow background with a darker yellow bottom border to match Xcode.
26663        * UserInterface/SearchResultTreeElement.js:
26664        (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): Create a document fragment, and
26665            break the matching text into parts (before match, match, after match), and add a span around
26666            the matching text.
26667
266682012-01-19  Brian Weinstein  <bweinstein@apple.com>
26669
26670        More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26671
26672        Implement proper truncation of the search results, so the search term will always show up in the
26673        title text of the search term
26674
26675        Reviewed by Tim Hatcher.
26676
26677        * UserInterface/DOMSearchMatchObject.js:
26678        (WebInspector.DOMSearchMatchObject.prototype.get searchTerm): Return the search term.
26679        * UserInterface/ResourceSearchMatchObject.js:
26680        (WebInspector.ResourceSearchMatchObject.prototype.get searchTerm): Ditto.
26681        * UserInterface/SearchResultTreeElement.js:
26682        (WebInspector.SearchResultTreeElement): Call truncateAndHighlightTitle.
26683        (WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): Truncate the title, and
26684            add a FIXME about highlighting it.
26685
266862012-01-19  Timothy Hatcher  <timothy@apple.com>
26687
26688        Make selecting an issue in the Issue sidebar show the resource's content view and reveal the line.
26689
26690        Part of: <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design
26691
26692        Reviewed by Brian Weinstein.
26693
26694        * UserInterface/ConsoleObserver.js:
26695        (WebInspector.ConsoleObserver.prototype.messageAdded): Pass line to IssueManager.
26696        * UserInterface/IssueManager.js:
26697        (WebInspector.IssueManager.prototype.issueWasAdded): Added lineNumber parameter.
26698        * UserInterface/IssueMessage.js:
26699        (WebInspector.IssueMessage): Added lineNumber parameter.
26700        (WebInspector.IssueMessage.prototype.get lineNumber): Added.
26701        * UserInterface/IssueSidebarPanel.js:
26702        (WebInspector.IssueSidebarPanel): Set onselect to _treeElementSelected.
26703        (WebInspector.IssueSidebarPanel.prototype._treeElementSelected): Added. Call showResourceSourceCode
26704        based on the type of tree element selected.
26705        * UserInterface/IssueTreeElement.js:
26706        (WebInspector.IssueTreeElement): Added _issueMessage.
26707        (WebInspector.IssueTreeElement.prototype.get issueMessage): Added.
26708
267092012-01-19  Timothy Hatcher  <timothy@apple.com>
26710
26711        Make selecting the resource in the search sidebar show the resource.
26712
26713        Part of: <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
26714
26715        Reviewed by Brian Weinstein.
26716
26717        * UserInterface/ResourceSidebarPanel.js:
26718        (WebInspector.ResourceSidebarPanel.prototype.showResource): Added.
26719        * UserInterface/SearchSidebarPanel.js:
26720        (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Call ResourceSidebarPanel.showResource
26721        if the tree element is a ResourceTreeElement.
26722
267232012-01-19  Timothy Hatcher  <timothy@apple.com>
26724
26725        Make selecting text search results show the resource's content view and reveal the line.
26726
26727        Part of: <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
26728
26729        Reviewed by Brian Weinstein.
26730
26731        * UserInterface/FrameContentView.js:
26732        (WebInspector.FrameContentView.prototype.showSourceCode): Added lineNumberToReveal parameter.
26733        * UserInterface/ResourceSearchMatchObject.js:
26734        (WebInspector.ResourceSearchMatchObject.prototype.get resource): Added.
26735        (WebInspector.ResourceSearchMatchObject.prototype.get lineNumber): Added.
26736        * UserInterface/ResourceSidebarPanel.js:
26737        (WebInspector.ResourceSidebarPanel.prototype.showMainFrameSourceCode): Added lineNumberToReveal parameter.
26738        (WebInspector.ResourceSidebarPanel.prototype.showResourceSourceCode): Added.
26739        * UserInterface/SearchSidebarPanel.js:
26740        (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Handle ResourceSearchMatchObject.
26741        * UserInterface/TextEditor.js:
26742        (WebInspector.TextEditor.prototype.revealLine): Added. Find the right text chunk for the line, then
26743        break it into single line text chunks then call scrollIntoViewIfNeeded on that text chunk.
26744        (WebInspector.TextEditor.prototype.shown): Set _visible to true. Check if there is a line number that
26745        needs to be revealed.
26746        (WebInspector.TextEditor.prototype.hidden):  Set _visible to false.
26747        * UserInterface/TextResourceContentView.js:
26748        (WebInspector.TextResourceContentView): Start _contentPopulated as false.
26749        (WebInspector.TextResourceContentView.prototype.contentAvailable): Set _contentPopulated to true. Check if
26750        there is a line number that needs to be revealed.
26751        (WebInspector.TextResourceContentView.prototype.revealLine): Added.
26752
267532012-01-19  Timothy Hatcher  <timothy@apple.com>
26754
26755        Expand the resources tree elements in the Issues and Search sidebars by default.
26756
26757        Part of:
26758        <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
26759        <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design
26760
26761        Reviewed by Brian Weinstein.
26762
26763        * UserInterface/IssueSidebarPanel.js:
26764        (WebInspector.IssueSidebarPanel.prototype._issueWasAdded): Call expand.
26765        * UserInterface/SearchSidebarPanel.js:
26766        (WebInspector.SearchSidebarPanel.prototype._treeElementForResource): Call expand.
26767
267682012-01-19  Timothy Hatcher  <timothy@apple.com>
26769
26770        Call shown and hidden on the current content view in ClusterContentView.
26771
26772        This is needed for DOMTreeContentView to correctly reveal the selected DOM node when shown.
26773
26774        Reviewed by Brian Weinstein.
26775
26776        * UserInterface/ClusterContentView.js:
26777        (WebInspector.ClusterContentView.prototype.shown): Call shown on the currentContentView if there is one.
26778        (WebInspector.ClusterContentView.prototype.hidden): Call hidden on the currentContentView if there is one.
26779        (WebInspector.ClusterContentView.prototype.get selectionPathComponents): Return [] if there is no currentContentView.
26780
267812012-01-19  Timothy Hatcher  <timothy@apple.com>
26782
26783        Make selecting DOM search results reveal and select the node in the DOM tree.
26784
26785        Part of: <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
26786
26787        Reviewed by Brian Weinstein.
26788
26789        * UserInterface/DOMSearchMatchObject.js:
26790        (WebInspector.DOMSearchMatchObject.get domNode): Added.
26791        * UserInterface/FrameContentView.js:
26792        (WebInspector.FrameContentView.prototype.showDOMTree): Added preventFocusChange parameter.
26793        * UserInterface/ResourceSidebarPanel.js:
26794        (WebInspector.ResourceSidebarPanel.prototype.showMainFrameDOMTree): Added preventFocusChange parameter.
26795        * UserInterface/SearchSidebarPanel.js:
26796        (WebInspector.SearchSidebarPanel): Set onselect to _treeElementSelected.
26797        (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Added. Call showMainFrameDOMTree for
26798        DOMSearchMatchObject results.
26799
268002012-01-18  Brian Weinstein  <bweinstein@apple.com>
26801
26802        Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26803
26804        Add icons for the search sidebar. We are reusing the icons from the path components icons, and added
26805        the resource match icon from Xcode.
26806
26807        Reviewed by Tim Hatcher.
26808
26809        * UserInterface/DOMSearchMatchObject.js:
26810        (WebInspector.DOMSearchMatchObject.prototype.get className): Call _generateClassName.
26811        (WebInspector.DOMSearchMatchObject.prototype._generateClassName): Generate the correct class name from the node
26812            type.
26813        * UserInterface/Images/ResourceSearchMatch.pdf: Added.
26814        * UserInterface/Main.html:
26815        * UserInterface/ResourceSearchMatchObject.js:
26816        (WebInspector.ResourceSearchMatchObject.prototype.get className): Return the resource match class name.
26817        * UserInterface/SearchIcons.css: Added.
26818        * UserInterface/SearchResultTreeElement.js:
26819        (WebInspector.SearchResultTreeElement): Ask either the DOMSearchMatchObject or ResourceSearchMatchObject for its className.
26820
268212012-01-18  Brian Weinstein  <bweinstein@apple.com>
26822
26823        Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26824
26825        Add some new classes, and generate proper titles for DOM search matches.
26826
26827        The new classes added are:
26828            - DOMSearchMatchObject, which represents a match of the search term in the DOM.
26829            - ResourceSearchMatchObject, which represents a match of the search term in a resource.
26830            - SearchResultTreeElement, which represents the tree elements in the search sidebar, and its represented
26831                object is either a DOMSearchMatchObject or a ResourceSearchMatchObject.
26832
26833        Reviewed by Tim Hatcher.
26834
26835        * UserInterface/DOMSearchMatchObject.js: Added.
26836        (WebInspector.DOMSearchMatchObject):
26837        (WebInspector.DOMSearchMatchObject.prototype.constructor.WebInspector.DOMSearchMatchObject.get title): Call _generateTitle if we don't
26838            have one yet.
26839        (WebInspector.DOMSearchMatchObject.prototype._generateTitle): Generate a title from the DOMNode.
26840        * UserInterface/Main.html:
26841        * UserInterface/ResourceSearchMatchObject.js: Added.
26842        (WebInspector.ResourceSearchMatchObject):
26843        (WebInspector.ResourceSearchMatchObject.prototype.constructor.WebInspector.ResourceSearchMatchObject.get title): Return the matching line
26844            text with a FIXME.
26845        * UserInterface/SearchResultTreeElement.js: Added.
26846        (WebInspector.SearchResultTreeElement): Assert our represented object is either a DOMSearchMatchObject or a ResourceSearchMatchObject.
26847        * UserInterface/SearchSidebarPanel.js:
26848        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback): Create a SearchResultTreeElement.
26849        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): Ditto.
26850
268512012-01-18  Brian Weinstein  <bweinstein@apple.com>
26852
26853        Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26854
26855        Implement searching of the DOM, and add the results to the search sidebar alongside matches in resources.
26856
26857        This patch also stores the ResourceTreeElements in the SearchSidebarPanel class, since both DOM search results
26858        and resource search results will need to be under the same parent.
26859
26860        Reviewed by Tim Hatcher.
26861
26862        * UserInterface/SearchSidebarPanel.js:
26863        (WebInspector.SearchSidebarPanel):
26864        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback):
26865        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback):
26866        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): For each
26867            search result, get the DOM Node and owner document's URL, and add the DOM node under the owner document's ResourceTreeElement.
26868        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback): Call DOMAgent.getSearchResults.
26869        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged): Call DOMAgent.performSearch.
26870
268712012-01-18  Brian Weinstein  <bweinstein@apple.com>
26872
26873        Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26874
26875        Implement searching of resources. Call the inspector API to search in all resources for our search term,
26876        and then for each resource that found a match, search in that resource for all of the matching lines.
26877
26878        Reviewed by Tim Hatcher.
26879
26880        * UserInterface/SearchSidebarPanel.js:
26881        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback): Loop
26882            over each matching line, and add a ResourceTreeElement for the parent, and a tree element for each matching search result.
26883        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback): For
26884            each matching resource, search the resource.
26885        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged): Call PageAgent.searchInResources.
26886
268872012-01-17  Brian Weinstein  <bweinstein@apple.com>
26888
26889        Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26890
26891        Add a search field to the search sidebar. It is there and looks pretty, but doesn't do anything yet.
26892
26893        Reviewed by Tim Hatcher.
26894
26895        * UserInterface/Main.html:
26896        * UserInterface/SearchSidebarPanel.css: Added.
26897        (.sidebar > .panel.search > .content):
26898        (.sidebar > .panel.search > .search-bar):
26899        (.search-bar):
26900        (.search-bar > input[type="search"]):
26901        * UserInterface/SearchSidebarPanel.js:
26902        (WebInspector.SearchSidebarPanel):
26903        (WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged):
26904
269052012-01-17  Brian Weinstein  <bweinstein@apple.com>
26906
26907        Start of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
26908
26909        Add a stub Search sidebar and call it from Main.js instead of creating a generic sidebar panel.
26910
26911        Reviewed by Tim Hatcher.
26912
26913        * UserInterface/Main.html:
26914        * UserInterface/Main.js:
26915        (WebInspector.contentLoaded):
26916        * UserInterface/SearchSidebarPanel.js: Added.
26917        (WebInspector.SearchSidebarPanel):
26918
269192012-01-18  Timothy Hatcher  <timothy@apple.com>
26920
26921        Make the Inspect Element context menu item work along with the inspect() console function.
26922
26923        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
26924
26925        Reviewed by Brian Weinstein.
26926
26927        * UserInterface/DOMTreeContentView.js:
26928        (WebInspector.DOMTreeContentView.prototype.selectAndRevealDOMNode): Added.
26929        (WebInspector.DOMTreeContentView.prototype._pathComponentSelected): Use selectDOMNode
26930        instead of revealAndSelect since that also fires an event.
26931        * UserInterface/DOMTreeManager.js:
26932        (WebInspector.DOMTreeManager.prototype.inspectElement): Fire DOMNodeWasInspected.
26933        (WebInspector.DOMTreeManager.prototype.inspectNodeObject): Added. Resolves an object to
26934        a DOMNode and calls inspectElement.
26935        * UserInterface/FrameContentView.js:
26936        (WebInspector.FrameContentView): Remove call to _showContentViewForIdentifier.
26937        (WebInspector.FrameContentView.prototype.get selectionPathComponents): Return [] if there
26938        is no current content view.
26939        (WebInspector.FrameContentView.prototype.shown): Added. Show the DOM tree if _shownInitialContent
26940        is not true.
26941        (WebInspector.FrameContentView.prototype.closed): Added. Reset _shownInitialContent to false.
26942        (WebInspector.FrameContentView.prototype.showSourceCode): Added. Helper function.
26943        (WebInspector.FrameContentView.prototype.showDOMTree): Added. Helper function.
26944        (WebInspector.FrameContentView.prototype._pathComponentForContentView): Return null if there
26945        is no current content view.
26946        * UserInterface/InspectorObserver.js:
26947        (WebInspector.InspectorObserver.prototype.inspect): Pass the object to the right manager.
26948        * UserInterface/Main.js:
26949        (WebInspector.contentLoaded): Enable the InspectorAgent.
26950        * UserInterface/ResourceSidebarPanel.js:
26951        (WebInspector.ResourceSidebarPanel): Add DOMNodeWasInspected event listener.
26952        (WebInspector.ResourceSidebarPanel.prototype.showMainFrameDOMTree): Added. Helper function.
26953        (WebInspector.ResourceSidebarPanel.prototype.showMainFrameSourceCode): Added. Helper function.
26954        (WebInspector.ResourceSidebarPanel.prototype._domNodeWasInspected): Added. Call showMainFrameDOMTree.
26955        * UserInterface/StorageManager.js:
26956        (WebInspector.StorageManager.prototype.inspectDatabase): Added. Fire DatabaseWasInspected event.
26957        (WebInspector.StorageManager.prototype.inspectDOMStorage): Added. Fire DOMStorageObjectWasInspected event.
26958        (WebInspector.StorageManager.prototype._databaseForId): Added.
26959        * UserInterface/StorageSidebarPanel.js:
26960        (WebInspector.StorageSidebarPanel):
26961        (WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasInspected): Added. Reveal and select the tree element.
26962        (WebInspector.StorageSidebarPanel.prototype._databaseWasInspected): Added. Ditto.
26963
269642012-01-18  Timothy Hatcher  <timothy@apple.com>
26965
26966        Add String.prototype.collapseWhitespace since it is needed by DOMTreeElement.js.
26967
26968        Reviewed by Jing Jin.
26969
26970        * UserInterface/Utilities.js:
26971        (String.prototype.collapseWhitespace): Added.
26972
269732012-01-18  Timothy Hatcher  <timothy@apple.com>
26974
26975        Now that the document node for child frames is included in the DOM tree, use it as the root
26976        for child frames to avoid seeing "#document" and having everything nested under it.
26977
26978        Also use the straight forward approach to request the document if the DOMTree is for the main frame.
26979
26980        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
26981
26982        Reviewed by Brian Weinstein.
26983
26984        * UserInterface/DOMTree.js:
26985        (WebInspector.DOMTree.prototype.requestRootDOMNode.mainDocumentAvailable): Added.
26986        (WebInspector.DOMTree.prototype.requestRootDOMNode): Evaluate "document" for child frames instead of
26987        "window.frameElement". And use WebInspector.domTreeManager.requestDocument for the main frame.
26988
269892012-01-17  Timothy Hatcher  <timothy@apple.com>
26990
26991        Rename ContentBrowser.showContentForRepresentedObject to ContentBrowser.showContentViewForRepresentedObject.
26992
26993        Also adds ContentBrowser.showContentView and ContentBrowser.contentViewForRepresentedObject while making
26994        the showContentView* functions return the content view that was shown so it can be used by the caller.
26995
26996        Reviewed by Brian Weinstein.
26997
26998        * UserInterface/ContentBrowser.js:
26999        (WebInspector.ContentBrowser.prototype.showContentViewForRepresentedObject): Renamed from showContentForRepresentedObject.
27000        (WebInspector.ContentBrowser.prototype.showContentView): Added. Call through to the contentViewContainer.
27001        (WebInspector.ContentBrowser.prototype.contentViewForRepresentedObject): Added. Ditto.
27002        (WebInspector.ContentBrowser.prototype._hierarchicalPathComponentWasSelected): Use showContentViewForRepresentedObject.
27003        * UserInterface/ContentViewContainer.js:
27004        (WebInspector.ContentViewContainer.prototype.showContentViewForRepresentedObject): Return the contentView shown.
27005        (WebInspector.ContentViewContainer.prototype.showContentView): Ditto.
27006        * UserInterface/FrameContentView.js:
27007        (WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Return the contentView shown.
27008        * UserInterface/Main.js:
27009        (WebInspector.openURL): Use showContentViewForRepresentedObject.
27010        * UserInterface/ResourceSidebarPanel.js:
27011        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Use showContentViewForRepresentedObject
27012        * UserInterface/StorageSidebarPanel.js:
27013        (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Use showContentViewForRepresentedObject
27014
270152012-01-17  Timothy Hatcher  <timothy@apple.com>
27016
27017        Prevent leaking Web Inspector content views by unregistering event listeners from external objects
27018        when the content views are closed.
27019
27020        Since some content views were registering as event listeners on external objects that had indefinite or
27021        indeterminate lifetimes, that meant the closed content views were still around and responding to events
27022        after they had been closed.
27023
27024        Reviewed by Brian Weinstein.
27025
27026        * UserInterface/ClusterContentView.js:
27027        (WebInspector.ClusterContentView): Moved event listnener to shown.
27028        (WebInspector.ClusterContentView.prototype.shown): Added. Add event listener that was in the constructor.
27029        (WebInspector.ClusterContentView.prototype.closed): Added. Remove event listener and close all
27030        content views so they can do their own work.
27031        * UserInterface/ContentView.js:
27032        (WebInspector.ContentView.prototype.closed): Added stub.
27033        * UserInterface/ContentViewContainer.js:
27034        (WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Call closed on the view.
27035        * UserInterface/DOMTreeContentView.js:
27036        (WebInspector.DOMTreeContentView): Moved event listnener to shown.
27037        (WebInspector.DOMTreeContentView.prototype.shown): Add event listener that was in the constructor.
27038        (WebInspector.DOMTreeContentView.prototype.closed): Added. Remove event listener.
27039        * UserInterface/ResourceContentView.js:
27040        (WebInspector.ResourceContentView): Moved event listnener to shown.
27041        (WebInspector.ResourceContentView.prototype.shown): Added. Add event listener that was in the constructor.
27042        (WebInspector.ResourceContentView.prototype.closed): Added. Remove event listener.
27043        * UserInterface/ResourceSidebarPanel.js:
27044        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Close the content views right away, not after
27045        a delay to prevent the content views from responding to events when they are about to be closed anyway.
27046
270472012-01-17  Timothy Hatcher  <timothy@apple.com>
27048
27049        Minimize churn in the DOM tree content view when navigating between pages.
27050
27051        The DOMTree was calling callbacks multiple times because the list wasn't cleared
27052        when the RootDOMNodeDidChange was sent. And DOMTreeContentView would request
27053        the DOM node again when RootDOMNodeDidChange was observed, causing the same
27054        callback to be added back into the pending callbacks array.
27055
27056        This change clears the pending callbacks array each time the DOMTree is invalidated
27057        so it is the responsibility of the client to listen for the RootDOMNodeInvalidated
27058        event and request the root DOM node again (which is what happens already.)
27059
27060        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27061
27062        Reviewed by Brian Weinstein.
27063
27064        * UserInterface/DOMTree.js:
27065        (WebInspector.DOMTree.Event.RootDOMNodeInvalidated): Renamed from RootDOMNodeDidChange to better
27066        reflect what is means.
27067        (WebInspector.DOMTree.prototype.invalidate.performInvalidate): Always fire the RootDOMNodeInvalidated
27068        event and clear the pending callbacks.
27069        (WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Check if we were invalidated
27070        before continuing.
27071        (WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Ditto.
27072        (WebInspector.DOMTree.prototype.requestRootDOMNode.dispatchCallbacks): Ditto.
27073        * UserInterface/DOMTreeContentView.js:
27074        (WebInspector.DOMTreeContentView): Listen for the renamed RootDOMNodeInvalidated event.
27075        (WebInspector.DOMTreeContentView.prototype._rootDOMNodeInvalidated): Renamed from _rootDOMNodeDidChange.
27076        * UserInterface/DOMTreeUpdater.js:
27077        (WebInspector.DOMTreeUpdater.prototype._documentUpdated): Don't set rootDOMNode since the outline
27078        might be for a subframe, and this is always the main document.
27079
270802012-01-16  Timothy Hatcher  <timothy@apple.com>
27081
27082        Properly create a RemoteObject in WebInspector.DOMTree so it can be released correctly.
27083
27084        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27085
27086        Reviewed by Brian Weinstein.
27087
27088        * UserInterface/DOMTree.js:
27089        (WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Make a RemoteObject using
27090        WebInspector.RemoteObject.fromPayload and bind it to rootDOMNodeAvailable.
27091        (WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Release the remote object.
27092
270932012-01-17  Brian Weinstein  <bweinstein@apple.com>
27094
27095        Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
27096
27097        Add images for for the error and warning tree elements.
27098
27099        Reviewed by Tim Hatcher.
27100
27101        * UserInterface/Images/Error.pdf: Added.
27102        * UserInterface/Images/Warning.pdf: Added.
27103        * UserInterface/IssueIcons.css: Added.
27104        (.error-issue-icon .icon):
27105        (.warning-issue-icon .icon):
27106        * UserInterface/IssueTreeElement.js:
27107        (WebInspector.IssueTreeElement):
27108        * UserInterface/Main.html:
27109
271102012-01-16  Brian Weinstein  <bweinstein@apple.com>
27111
27112        Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
27113
27114        Move the information about an Issue tree element from IssueSidebarPanel to its own class - IssueTreeElement.
27115
27116        Reviewed by Tim Hatcher.
27117
27118        * UserInterface/IssueSidebarPanel.js:
27119        (WebInspector.IssueSidebarPanel.prototype.constructor.WebInspector.IssueSidebarPanel._issueWasAdded): Create a new
27120            IssueTreeElement, instead of a GeneralTreeElement.
27121        * UserInterface/IssueTreeElement.js: Added.
27122        (WebInspector.IssueTreeElement): Call through to GeneralTreeElement and set some properties.
27123        (WebInspector.IssueTreeElement.titleForIssue): Moved from IssueSidebarPanel.
27124        * UserInterface/Main.html: Added new file.
27125
271262012-01-16  Brian Weinstein  <bweinstein@apple.com>
27127
27128        Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
27129
27130        Implement displaying formatted console messages in the Issues Sidebar.
27131
27132        Reviewed by Tim Hatcher.
27133
27134        * UserInterface/ConsoleObserver.js:
27135        (WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded): Pass along the
27136            parameters.
27137        * UserInterface/IssueManager.js:
27138        (WebInspector.IssueManager.prototype.issueWasAdded): Ditto.
27139        * UserInterface/IssueMessage.js:
27140        (WebInspector.IssueMessage): Turn the objects that we were passed in as parameters
27141            into WebInspector.RemoteObjects, and call this._formatTextIfNecessary to format
27142            our text.
27143        (WebInspector.IssueMessage.prototype._formatTextIfNecessary.valueFormatter): Get the value of the RemoteObject.
27144        (WebInspector.IssueMessage.prototype._formatTextIfNecessary.append): Append b to a, and return a.
27145        (WebInspector.IssueMessage.prototype._formatTextIfNecessary): Format our text, and append any unused substitutions
27146            to the string we generate. Once we are done generating the string, we set that as our text.
27147
271482012-01-13  Brian Weinstein  <bweinstein@apple.com>
27149
27150        Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
27151
27152        Clear the issues sidebar when the page is navigated. Add a listener in IssueManager that fires an
27153        event that IssueSidebarPanel listens to.
27154
27155        Reviewed by Tim Hatcher.
27156
27157        * UserInterface/IssueManager.js:
27158        (WebInspector.IssueManager):
27159        (WebInspector.IssueManager.prototype.issueWasAdded):
27160        (WebInspector.IssueManager.prototype._mainResourceDidChange):
27161        * UserInterface/IssueSidebarPanel.js:
27162        (WebInspector.IssueSidebarPanel):
27163        (WebInspector.IssueSidebarPanel.prototype.constructor.WebInspector.IssueSidebarPanel._issueWasAdded):
27164        (WebInspector.IssueSidebarPanel.prototype._issuesCleared):
27165
271662012-01-13  Brian Weinstein  <bweinstein@apple.com>
27167
27168        Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
27169
27170        Add things to the Issues sidebar, sorted by file. We currently only show issues that have a URL provided.
27171
27172        Each folder in the sidebar is a resource where the error came from. Each issue has a main title of the
27173        kind of issue it is, and a subtitle of the issue text.
27174
27175        Reviewed by Tim Hatcher.
27176
27177        * UserInterface/ConsoleObserver.js:
27178        (WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded): If the message
27179            was an error or warning, tell the IssueManager about it.
27180        * UserInterface/IssueManager.js: Added.
27181        (WebInspector.IssueManager):
27182        (WebInspector.IssueManager.prototype.constructor.WebInspector.IssueManager.initialize):
27183        (WebInspector.IssueManager.prototype.issueWasAdded): Dispatch a message saying an issue was added.
27184        * UserInterface/IssueMessage.js: Added.
27185        (WebInspector.IssueMessage):
27186        * UserInterface/IssueSidebarPanel.js:
27187        (WebInspector.IssueSidebarPanel):
27188        (WebInspector.IssueSidebarPanel.prototype.constructor.WebInspector.IssueSidebarPanel._issueWasAdded):
27189        (WebInspector.titleForIssue):
27190        * UserInterface/Main.html: Add new files.
27191        * UserInterface/Main.js:
27192        (WebInspector.contentLoaded): Initialize the IssueManager.
27193        * UserInterface/Utilities.js:
27194        (Object.defineProperty): Add String.prototype.startsWith.
27195
271962012-01-13  Brian Weinstein  <bweinstein@apple.com>
27197
27198        Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
27199
27200        Add a new flavor of tree item to tree elements in a NavigationSidebarPanel. If you set both the small and twoLine properties
27201        on a tree element, the title and subtitle will be on two lines, but it will only be slightly bigger than the
27202        small style, and will still use the same small icon size.
27203
27204        Reviewed by Tim Hatcher.
27205
27206        * UserInterface/GeneralTreeElement.js:
27207        (WebInspector.GeneralTreeElement.prototype.get twoLine):
27208        (WebInspector.GeneralTreeElement.prototype.set twoLine):
27209        (WebInspector.GeneralTreeElement.prototype.onattach):
27210        * UserInterface/NavigationSidebarPanel.css:
27211        (.navigation-sidebar-panel-content-tree-outline .item.small.two-line):
27212        (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .titles):
27213        (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .titles.no-subtitle):
27214        (.navigation-sidebar-panel-content-tree-outline .item.small.two-line .icon):
27215        (.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .title::after):
27216        (.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .subtitle::before):
27217
272182012-01-13  Brian Weinstein  <bweinstein@apple.com>
27219
27220        Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
27221
27222        Implement FrameResourceManager.resourceForURL. This checks the main frame's main resource for the passed in URL,
27223        and then calls the main frame's resourceForURL function, which checks subresources and recursively checks
27224        subframes for the correct URL.
27225
27226        Reviewed by Tim Hatcher.
27227
27228        * UserInterface/FrameResourceManager.js:
27229        (WebInspector.FrameResourceManager.prototype.resourceForURL):
27230
272312012-01-12  Brian Weinstein  <bweinstein@apple.com>
27232
27233        Start of <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
27234
27235        Add a stub IssueSidebarPanel and call it from Main.js instead of just creating a generic sidebar panel.
27236
27237        Reviewed by Tim Hatcher.
27238
27239        * UserInterface/IssueSidebarPanel.js: Added.
27240        (WebInspector.IssueSidebarPanel):
27241        * UserInterface/Main.html: Add new file.
27242        * UserInterface/Main.js:
27243        (WebInspector.contentLoaded): Create an IssueSidebarPanel.
27244
272452012-01-16  Timothy Hatcher  <timothy@apple.com>
27246
27247        Make the DOM tree content view show the current DOM node selection path in the quick navigation bar.
27248
27249        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27250
27251        Reviewed by Brian Weinstein and Joseph Pecoraro.
27252
27253        * UserInterface/DOMTreeContentView.js:
27254        (WebInspector.DOMTreeContentView): Added event listener for DOM tree selection changes.
27255        (WebInspector.DOMTreeContentView.prototype.get selectionPathComponents): Added. Return path components for the DOM tree selection.
27256        (WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange): Added. Fire the SelectionPathComponentsDidChange event.
27257        (WebInspector.DOMTreeContentView.prototype._pathComponentSelected): Added. Reveal and select the DOM tree element.
27258        * UserInterface/DOMTreeElement.js:
27259        (WebInspector.DOMTreeElement.prototype.isCloseTag): Added.
27260        * UserInterface/DOMTreeElementPathComponent.js: Added.
27261        (WebInspector.DOMTreeElementPathComponent): Added.
27262        (WebInspector.DOMTreeElementPathComponent.prototype.get domTreeElement): Added.
27263        (WebInspector.DOMTreeElementPathComponent.prototype.get previousSibling): Added.
27264        (WebInspector.DOMTreeElementPathComponent.prototype.get nextSibling): Added. Return null if isCloseTag.
27265        * UserInterface/Images/DOMCharacterData.pdf: Added.
27266        * UserInterface/Images/DOMComment.pdf: Added.
27267        * UserInterface/Images/DOMDocumentType.pdf: Added.
27268        * UserInterface/Images/DOMElement.pdf: Added.
27269        * UserInterface/Images/DOMNode.pdf: Added.
27270        * UserInterface/Images/DOMTextNode.pdf: Added.
27271        * UserInterface/Main.html: Included DOMTreeElementPathComponent.js.
27272        * UserInterface/PathComponentIcons.css:
27273        (.dom-element-icon .icon): Added.
27274        (.dom-text-node-icon .icon): Added.
27275        (.dom-comment-icon .icon): Added.
27276        (.dom-document-type-icon .icon): Added.
27277        (.dom-character-data-icon .icon): Added.
27278        (.dom-node-icon .icon): Added.
27279
272802012-01-16  Timothy Hatcher  <timothy@apple.com>
27281
27282        Make link navigation work in the DOM tree.
27283
27284        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27285
27286        Reviewed by Brian Weinstein.
27287
27288        * UserInterface/DOMTreeContentView.js:
27289        (WebInspector.DOMTreeContentView): Add click event listener.
27290        (WebInspector.DOMTreeContentView.prototype._mouseWasClicked): Added. Start a timeout since this is a single
27291        click, if the timeout is canceled before it fires, then a double-click happened or another link was clicked.
27292        (WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink): Added.
27293        * UserInterface/DOMTreeElement.js:
27294        (WebInspector.DOMTreeElement.prototype.onattach): Removed call to _preventFollowingLinksOnDoubleClick.
27295        (WebInspector.DOMTreeElement.prototype.updateTitle): Ditto.
27296        (WebInspector.DOMTreeElement.prototype._preventFollowingLinksOnDoubleClick): Removed.
27297        (WebInspector.DOMTreeElement.prototype._buildAttributeDOM): Removed linkify parameter and remove dependency on
27298        WebInspector.resourceURLForRelatedNode by making the anchor element directly.
27299        (WebInspector.DOMTreeElement.prototype._buildTagDOM): Removed linkify parameter.
27300        (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Ditto.
27301        * UserInterface/Utilities.js:
27302        (String.prototype.trimMiddle): Added.
27303        (String.prototype.trimEnd): Added.
27304
273052012-01-16  Timothy Hatcher  <timothy@apple.com>
27306
27307        Remove dependency on WebInspector.DOMSyntaxHighlighter and make style and script DOM nodes syntax highlighted
27308        by using WebInspector.SyntaxHighlighter.
27309
27310        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27311
27312        Reviewed by Brian Weinstein and Joseph Pecoraro.
27313
27314        * UserInterface/DOMTreeElement.js:
27315        (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Use WebInspector.syntaxHighlightStringAsDocumentFragment
27316        instead of WebInspector.DOMSyntaxHighlighter. Also syntax highlight inline script and style text nodes.
27317        * UserInterface/DOMTreeOutline.css:
27318        (.dom-tree-outline .html-text-node.large): Added. Used for large text blocks, making viewing/editing more pleasant.
27319        * UserInterface/SyntaxHighlighter.js:
27320        (WebInspector.SyntaxHighlighter.prototype.synchronousHighlight): Added dontChunk parameter and fix undefined/null checks.
27321        (WebInspector.SyntaxHighlighter.prototype.startHighlighting): Fix undefined/null checks
27322        (WebInspector.SyntaxHighlighter.prototype._highlightNextChunk): Added dontChunk parameter and don't bail early if it is set.
27323        * UserInterface/SyntaxHighlightingSupport.js:
27324        (WebInspector.syntaxHighlightStringAsDocumentFragment): Added. Creates a TextContent and syntax highlights it and returns
27325        the document fragment.
27326
273272012-01-16  Timothy Hatcher  <timothy@apple.com>
27328
27329        Break out the code for creating a syntax highlighted document fragment so it can be used
27330        by the DOM tree for inline CSS and JavaScript.
27331
27332        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27333
27334        Reviewed by Brian Weinstein.
27335
27336        * UserInterface/SyntaxHighlightingSupport.js: Added.
27337        (WebInspector.createSyntaxHighlightedDocumentFragment): Copied from WebInspector.TextEditorTextChunk.prototype.updateContent.
27338        (WebInspector.createSyntaxHighlightedDocumentFragment.appendText): Ditto.
27339        (WebInspector.createSyntaxHighlightedDocumentFragment.createTokenElement): Ditto.
27340        * UserInterface/TextEditor.js:
27341        (WebInspector.TextEditorTextChunk.prototype.updateContent): Use WebInspector.createSyntaxHighlightedDocumentFragment.
27342        * UserInterface/Main.html: Included SyntaxHighlightingSupport.js.
27343
273442012-01-16  Timothy Hatcher  <timothy@apple.com>
27345
27346        Remove references to the Elements panel and make the context menu work in the DOM tree.
27347
27348        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27349
27350        Reviewed by John Sullivan.
27351
27352        * UserInterface/DOMTreeElement.js:
27353        (WebInspector.DOMTreeElement.prototype.selectOnMouseDown): Removed elements panel code.
27354        * UserInterface/DOMTreeOutline.js:
27355        (WebInspector.DOMTreeOutline): Remove showInElementsPanelEnabled parameter.
27356        (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired): Removed elements panel code and call populateContextMenu.
27357        (WebInspector.DOMTreeOutline.prototype.populateContextMenu): Removed call to populateHrefContextMenu which doesn't exist.
27358
273592012-01-16  Timothy Hatcher  <timothy@apple.com>
27360
27361        Style and syntax highlight the DOM tree elements.
27362
27363        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27364
27365        Reviewed by Brian Weinstein and Joseph Pecoraro.
27366
27367        * UserInterface/DOMTreeElement.js: Found and replaced "webkit-" with "" to fix the syntax highlighting class names.
27368        * UserInterface/DOMTreeOutline.css: Added.
27369        (.dom-tree-outline):
27370        (.dom-tree-outline li.hovered:not(.selected) .selection):
27371        (.dom-tree-outline li .selection):
27372        (.dom-tree-outline li.selected .selection):
27373        (.dom-tree-outline li.elements-drag-over .selection):
27374        (.dom-tree-outline:focus li.selected .selection):
27375        (.dom-tree-outline, .dom-tree-outline ol):
27376        (.dom-tree-outline ol.children):
27377        (.dom-tree-outline ol.children.expanded):
27378        (.dom-tree-outline li):
27379        (.dom-tree-outline:focus li.selected):
27380        (.dom-tree-outline:focus li.selected *):
27381        (.dom-tree-outline li.parent):
27382        (.dom-tree-outline li .html-tag.close):
27383        (.dom-tree-outline li.parent::before):
27384        (.dom-tree-outline:focus li.parent.selected::before):
27385        (.dom-tree-outline li.parent.expanded::before):
27386        (.dom-tree-outline:focus li.parent.expanded.selected::before):
27387        * UserInterface/DOMTreeOutline.js:
27388        (WebInspector.DOMTreeOutline): Set the dom-tree-outline and syntax-highlighted class names.
27389        (WebInspector.DOMTreeOutline.prototype.populateContextMenu): Found and replaced "webkit-" with "" to fix the
27390        syntax highlighting class names.
27391        * UserInterface/Main.html: Included DOMTreeOutline.css.
27392
273932012-01-16  Timothy Hatcher  <timothy@apple.com>
27394
27395        Make it possible to share the syntax highlighting styles with the DOM tree.
27396
27397        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27398
27399        Reviewed by John Sullivan.
27400
27401        * UserInterface/Main.html:
27402        * UserInterface/SyntaxHighlightingDefaultTheme.css: Renamed from Safari/Develop/WebInspector/TextEditorDefaultTheme.css.
27403        Found and replaced .text-editor with .syntax-highlighted.
27404        * UserInterface/TextEditor.js:
27405        (WebInspector.TextEditor): Add the syntax-highlighted class name to the content container.
27406
274072012-01-16  Timothy Hatcher  <timothy@apple.com>
27408
27409        Add WebInspector.DOMTreeContentView and have it as a second view available in WebInspector.FrameContentView.
27410
27411        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27412
27413        Reviewed by John Sullivan.
27414
27415        * UserInterface/ContentView.js:
27416        (WebInspector.ContentView): Added support for WebInspector.DOMTree.
27417        (WebInspector.ContentView.isViewable): Ditto.
27418        * UserInterface/DOMTreeContentView.css: Added.
27419        (.content-view.dom-tree):
27420        * UserInterface/DOMTreeContentView.js: Added.
27421        (WebInspector.DOMTreeContentView): Create the DOMTreeOutline and request the root DOMNode.
27422        (WebInspector.DOMTreeContentView.prototype.get domTree): Return _domTree.
27423        (WebInspector.DOMTreeContentView.prototype.shown): Call setVisible on the DOMTreeOutline.
27424        (WebInspector.DOMTreeContentView.prototype.hidden): Ditto.
27425        (WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable): Set the rootDOMNode on DOMTreeOutline.
27426        (WebInspector.DOMTreeContentView.prototype._rootDOMNodeDidChange): Request the root DOMNode.
27427        * UserInterface/FrameContentView.js:
27428        (WebInspector.FrameContentView): Create the DOM tree path component.
27429        (WebInspector.FrameContentView.prototype._pathComponentForContentView): Return the DOM tree patch component
27430        for DOMTree represented objects.
27431        (WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Use the DOMTree of the frame.
27432        * UserInterface/Images/DOMTree.pdf: Added.
27433        * UserInterface/Main.html: Included DOMTreeContentView.{js,css}.
27434        * UserInterface/PathComponentIcons.css:
27435        (.dom-tree-icon .icon): Added.
27436
274372012-01-16  Timothy Hatcher  <timothy@apple.com>
27438
27439        Add support for getting the DOM tree for a specific WebInspector.Frame.
27440
27441        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27442
27443        Reviewed by Brian Weinstein and Joseph Pecoraro.
27444
27445        * UserInterface/DOMTree.js: Added.
27446        (WebInspector.DOMTree):
27447        (WebInspector.DOMTree.prototype.invalidate): Delay the invalidation on a timeout to coalesce multiple calls to invalidate.
27448        (WebInspector.DOMTree.prototype.invalidate.performInvalidate): Do the work to invalidate.
27449        (WebInspector.DOMTree.prototype.requestRootDOMNode): Get window.frameElement or document from the desired frame.
27450        (WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Convert the RemoteObject to a DOMNode.
27451        (WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Get the child nodes before calling the callbacks.
27452        (WebInspector.DOMTree.prototype.requestRootDOMNode.dispatchCallbacks): Helper to dispatch pending callbacks.
27453        (WebInspector.DOMTree.prototype._nodeRemoved): Call invalidate if the node is the root node.
27454        (WebInspector.DOMTree.prototype._documentUpdated): Call invalidate.
27455        (WebInspector.DOMTree.prototype._frameMainResourceDidChange): Ditto.
27456        * UserInterface/Frame.js:
27457        (WebInspector.Frame.prototype.get domTree): Added.
27458
274592012-01-16  Timothy Hatcher  <timothy@apple.com>
27460
27461        Remove dependency on Preferences.maxInlineTextChildLength from WebInspector.DOMTreeElement.
27462
27463        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27464
27465        Reviewed by John Sullivan.
27466
27467        * UserInterface/DOMTreeElement.js:
27468        (WebInspector.DOMTreeElement.MaximumInlineTextChildLength): Added.
27469        (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Use WebInspector.DOMTreeElement.MaximumInlineTextChildLength.
27470        (WebInspector.DOMTreeElement.prototype._showInlineText): Ditto.
27471
274722012-01-16  Timothy Hatcher  <timothy@apple.com>
27473
27474        Use WebInspector.DOMNode instead of WebInspector.DOMDocument since we don't have DOMDocument
27475        in the new Web Inspector.
27476
27477        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27478
27479        Reviewed by John Sullivan.
27480
27481        * UserInterface/DOMNode.js:
27482        (WebInspector.DOMNode): Set ownerDocument to this when this is a document node.
27483        * UserInterface/DOMTreeManager.js:
27484        (WebInspector.DOMTreeManager.prototype._setDocument): Use DOMNode instead of DOMDocument.
27485
274862012-01-16  Timothy Hatcher  <timothy@apple.com>
27487
27488        Update DOMTreeElement to correctly use the new non-formating WebInspector.UIString.
27489
27490        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27491
27492        Rubber-stamped by John Sullivan.
27493
27494        * UserInterface/DOMTreeElement.js:
27495        (WebInspector.DOMTreeElement.prototype._createTooltipForNode.setTooltip): Use format() after UIString.
27496        (WebInspector.DOMTreeElement.prototype.adjustCollapsedRange): Ditto.
27497        (WebInspector.DOMTreeElement.prototype._populateTagContextMenu): Removed WebInspector.useLowerCaseMenuTitles() use.
27498        (WebInspector.DOMTreeElement.prototype._populateTextContextMenu): Ditto.
27499        (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): Ditto.
27500
275012012-01-16  Timothy Hatcher  <timothy@apple.com>
27502
27503        Replace {add,remove,has}StyleClass in DOMTree{Element,Outline} with classList.{add,remove,contains}.
27504
27505        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27506
27507        Rubber-stamped by John Sullivan.
27508
27509        * UserInterface/DOMTreeElement.js:
27510        (WebInspector.ElementsTreeElement.prototype.set hovered):
27511        (WebInspector.ElementsTreeElement.prototype.onattach):
27512        (WebInspector.ElementsTreeElement.prototype._triggerEditAttribute):
27513        * UserInterface/DOMTreeOutline.js:
27514        (WebInspector.ElementsTreeOutline.prototype._ondragover):
27515        (WebInspector.ElementsTreeOutline.prototype._clearDragOverTreeElementMarker):
27516
275172012-01-16  Timothy Hatcher  <timothy@apple.com>
27518
27519        Remove dependancy on WebInspector.Color from WebInspector.DOMTreeManager.
27520
27521        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27522
27523        Rubber-stamped by John Sullivan.
27524
27525        * UserInterface/DOMTreeManager.js:
27526        (WebInspector.DOMTreeManager.prototype._buildHighlightConfig): Include the colors directly.
27527
275282012-01-16  Timothy Hatcher  <timothy@apple.com>
27529
27530        Make WebInspector.DOMTreeUpdater listen for events on the correct object.
27531
27532        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27533
27534        Rubber-stamped by John Sullivan.
27535
27536        * UserInterface/DOMTreeUpdater.js:
27537        (WebInspector.DOMTreeUpdater): Use DOMTreeManager instead of the old DOMAgent name.
27538
275392012-01-16  Timothy Hatcher  <timothy@apple.com>
27540
27541        Make WebInspector.DOMTreeOutline conform to the right style for objects with events.
27542
27543        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27544
27545        Reviewed by John Sullivan.
27546
27547        * UserInterface/DOMTreeOutline.js:
27548        (WebInspector.DOMTreeOutline.prototype._selectedNodeChanged):
27549
275502012-01-16  Timothy Hatcher  <timothy@apple.com>
27551
27552        Make WebInspector.DOMTreeManager events conform to the style we use in the new Web Inspector.
27553
27554        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27555
27556        Reviewed by John Sullivan.
27557
27558        * UserInterface/DOMTreeManager.js:
27559        (WebInspector.DOMTreeManager.prototype._attributeModified): Use WebInspector.DOMTreeManager.Event and spell out Attribute.
27560        (WebInspector.DOMTreeManager.prototype._attributeRemoved): Ditto.
27561        (WebInspector.DOMTreeManager.prototype._loadNodeAttributes): Ditto.
27562        (WebInspector.DOMTreeManager.prototype._characterDataModified): WebInspector.DOMTreeManager.Event.
27563        (WebInspector.DOMTreeManager.prototype._setDocument): Ditto.
27564        (WebInspector.DOMTreeManager.prototype._childNodeCountUpdated): Ditto.
27565        (WebInspector.DOMTreeManager.prototype._childNodeInserted): Ditto.
27566        (WebInspector.DOMTreeManager.prototype._childNodeRemoved): Ditto.
27567        (WebInspector.DOMTreeManager.prototype.inspectElement): Ditto.
27568
275692012-01-16  Timothy Hatcher  <timothy@apple.com>
27570
27571        Don't call InspectorBackend.registerDOMDispatcher from WebInspector.DOMTreeManager.
27572
27573        The new Web Inspector calls InspectorBackend.registerDOMDispatcher from Main.js.
27574
27575        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27576
27577        Reviewed by John Sullivan.
27578
27579        * UserInterface/DOMTreeManager.js:
27580        (WebInspector.DOMTreeManager): Remove call to InspectorBackend.registerDOMDispatcher.
27581
275822012-01-16  Timothy Hatcher  <timothy@apple.com>
27583
27584        Wire up WebInspector.DOMObserver to WebInspector.DOMTreeManager.
27585
27586        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27587
27588        Reviewed by John Sullivan.
27589
27590        * UserInterface/DOMObserver.js:
27591        (WebInspector.DOMObserver.prototype.documentUpdated):
27592        (WebInspector.DOMObserver.prototype.setChildNodes):
27593        (WebInspector.DOMObserver.prototype.attributeModified):
27594        (WebInspector.DOMObserver.prototype.attributeRemoved):
27595        (WebInspector.DOMObserver.prototype.inlineStyleInvalidated):
27596        (WebInspector.DOMObserver.prototype.characterDataModified):
27597        (WebInspector.DOMObserver.prototype.childNodeCountUpdated):
27598        (WebInspector.DOMObserver.prototype.childNodeInserted):
27599        (WebInspector.DOMObserver.prototype.childNodeRemoved):
27600
276012012-01-16  Timothy Hatcher  <timothy@apple.com>
27602
27603        Use WebInspector.domTreeManager instead of the old WebInspector.domAgent.
27604
27605        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27606
27607        Rubber-stamped by John Sullivan.
27608
27609        * UserInterface/DOMTreeElement.js:
27610        (WebInspector.DOMTreeElement.prototype.onselect):
27611        (WebInspector.DOMTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback):
27612        (WebInspector.DOMTreeElement.prototype._tagNameEditingCommitted):
27613        * UserInterface/DOMTreeOutline.js:
27614        (WebInspector.DOMTreeOutline.prototype._onmousemove):
27615        (WebInspector.DOMTreeOutline.prototype._onmouseout):
27616        (WebInspector.DOMTreeOutline.prototype._ondragstart):
27617        (WebInspector.DOMTreeOutline.prototype._ondrop.callback):
27618        (WebInspector.DOMTreeOutline.prototype._ondrop):
27619        (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired.focusElement):
27620        (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
27621        * UserInterface/DOMTreeUpdater.js:
27622        (WebInspector.DOMTreeUpdater.prototype._reset):
27623        * UserInterface/RemoteObject.js:
27624        (WebInspector.RemoteObject.prototype.pushNodeToFrontend):
27625
276262012-01-16  Timothy Hatcher  <timothy@apple.com>
27627
27628        Create a WebInspector.DOMTreeManager instance.
27629
27630        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27631
27632        Reviewed by John Sullivan.
27633
27634        * UserInterface/Main.js:
27635        (WebInspector.contentLoaded): Create a WebInspector.DOMTreeManager instance.
27636
276372012-01-16  Timothy Hatcher  <timothy@apple.com>
27638
27639        Rename WebInspector.ElementsTree{Outline,Element,Updater} to WebInspector.DOMTree{Outline,Element,Updater}.
27640
27641        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27642
27643        Rubber-stamped by John Sullivan.
27644
27645        * UserInterface/DOMTreeElement.js: Found and replaced WebInspector.ElementsTree with WebInspector.DOMTree.
27646        * UserInterface/DOMTreeOutline.js: Ditto.
27647        * UserInterface/DOMTreeUpdater.js: Ditto.
27648
276492012-01-16  Timothy Hatcher  <timothy@apple.com>
27650
27651        Rename WebInspector.DOMAgent to WebInspector.DOMTreeManager.
27652
27653        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27654
27655        Rubber-stamped by John Sullivan.
27656
27657        * UserInterface/DOMTreeManager.js: Found and replaced WebInspector.DOMAgent with WebInspector.DOMTreeManager.
27658
276592012-01-16  Timothy Hatcher  <timothy@apple.com>
27660
27661        Copy over WebInspector.ElementsTree{Outline,Element,Updater} from Open Source.
27662
27663        Copied into DOMTreeElement.js, DOMTreeOutline.js and DOMTreeUpdater.js since the classes will
27664        soon be renamed to WebInspector.DOMTree{Outline,Element,Updater}.
27665
27666        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27667
27668        Rubber-stamped by John Sullivan.
27669
27670        * UserInterface/DOMTreeElement.js: Added.
27671        (WebInspector.ElementsTreeElement):
27672        (WebInspector.ElementsTreeElement.prototype.highlightSearchResults):
27673        (WebInspector.ElementsTreeElement.prototype.hideSearchHighlights):
27674        (WebInspector.ElementsTreeElement.prototype._updateSearchHighlight.updateEntryShow):
27675        (WebInspector.ElementsTreeElement.prototype._updateSearchHighlight.updateEntryHide):
27676        (WebInspector.ElementsTreeElement.prototype._updateSearchHighlight):
27677        (WebInspector.ElementsTreeElement.prototype.get hovered):
27678        (WebInspector.ElementsTreeElement.prototype.set hovered):
27679        (WebInspector.ElementsTreeElement.prototype.get expandedChildrenLimit):
27680        (WebInspector.ElementsTreeElement.prototype.set expandedChildrenLimit):
27681        (WebInspector.ElementsTreeElement.prototype.get expandedChildCount):
27682        (WebInspector.ElementsTreeElement.prototype.showChild):
27683        (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.setTooltip):
27684        (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.resolvedNode.dimensions):
27685        (WebInspector.ElementsTreeElement.prototype._createTooltipForNode.resolvedNode):
27686        (WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
27687        (WebInspector.ElementsTreeElement.prototype.updateSelection):
27688        (WebInspector.ElementsTreeElement.prototype.onattach):
27689        (WebInspector.ElementsTreeElement.prototype._preventFollowingLinksOnDoubleClick):
27690        (WebInspector.ElementsTreeElement.prototype.onpopulate):
27691        (WebInspector.ElementsTreeElement.prototype.updateChildren):
27692        (WebInspector.ElementsTreeElement.prototype.insertChildElement):
27693        (WebInspector.ElementsTreeElement.prototype.moveChild):
27694        (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode):
27695        (WebInspector.ElementsTreeElement.prototype._updateChildren):
27696        (WebInspector.ElementsTreeElement.prototype.adjustCollapsedRange):
27697        (WebInspector.ElementsTreeElement.prototype.handleLoadAllChildren):
27698        (WebInspector.ElementsTreeElement.prototype.onexpand):
27699        (WebInspector.ElementsTreeElement.prototype.oncollapse):
27700        (WebInspector.ElementsTreeElement.prototype.onreveal):
27701        (WebInspector.ElementsTreeElement.prototype.onselect):
27702        (WebInspector.ElementsTreeElement.prototype.ondelete):
27703        (WebInspector.ElementsTreeElement.prototype.onenter):
27704        (WebInspector.ElementsTreeElement.prototype.selectOnMouseDown):
27705        (WebInspector.ElementsTreeElement.prototype.ondblclick):
27706        (WebInspector.ElementsTreeElement.prototype._insertInLastAttributePosition):
27707        (WebInspector.ElementsTreeElement.prototype._startEditingTarget):
27708        (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
27709        (WebInspector.ElementsTreeElement.prototype._populateTextContextMenu):
27710        (WebInspector.ElementsTreeElement.prototype._populateNodeContextMenu):
27711        (WebInspector.ElementsTreeElement.prototype._startEditing):
27712        (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
27713        (WebInspector.ElementsTreeElement.prototype._triggerEditAttribute):
27714        (WebInspector.ElementsTreeElement.prototype._startEditingAttribute.removeZeroWidthSpaceRecursive):
27715        (WebInspector.ElementsTreeElement.prototype._startEditingAttribute):
27716        (WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
27717        (WebInspector.ElementsTreeElement.prototype._startEditingTagName.keyupListener):
27718        (WebInspector.ElementsTreeElement.prototype._startEditingTagName.editingComitted):
27719        (WebInspector.ElementsTreeElement.prototype._startEditingTagName.editingCancelled):
27720        (WebInspector.ElementsTreeElement.prototype._startEditingTagName):
27721        (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.commit):
27722        (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.dispose):
27723        (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
27724        (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded):
27725        (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
27726        (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.cancel):
27727        (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.moveToNextAttributeIfNeeded):
27728        (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback):
27729        (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
27730        (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted):
27731        (WebInspector.ElementsTreeElement.prototype._editingCancelled):
27732        (WebInspector.ElementsTreeElement.prototype._distinctClosingTagElement):
27733        (WebInspector.ElementsTreeElement.prototype.updateTitle):
27734        (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
27735        * UserInterface/DOMTreeOutline.js: Added.
27736        (WebInspector.ElementsTreeOutline):
27737        (WebInspector.ElementsTreeOutline.prototype.wireToDomAgent):
27738        (WebInspector.ElementsTreeOutline.prototype.setVisible):
27739        (WebInspector.ElementsTreeOutline.prototype.addEventListener):
27740        (WebInspector.ElementsTreeOutline.prototype.removeEventListener):
27741        (WebInspector.ElementsTreeOutline.prototype.get rootDOMNode):
27742        (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode):
27743        (WebInspector.ElementsTreeOutline.prototype.get isXMLMimeType):
27744        (WebInspector.ElementsTreeOutline.prototype.selectedDOMNode):
27745        (WebInspector.ElementsTreeOutline.prototype.selectDOMNode):
27746        (WebInspector.ElementsTreeOutline.prototype.get editing):
27747        (WebInspector.ElementsTreeOutline.prototype.update):
27748        (WebInspector.ElementsTreeOutline.prototype.updateSelection):
27749        (WebInspector.ElementsTreeOutline.prototype._selectedNodeChanged):
27750        (WebInspector.ElementsTreeOutline.prototype.findTreeElement):
27751        (WebInspector.ElementsTreeOutline.prototype.findTreeElement.parentNode):
27752        (WebInspector.ElementsTreeOutline.prototype.createTreeElementFor):
27753        (WebInspector.ElementsTreeOutline.prototype.set suppressRevealAndSelect):
27754        (WebInspector.ElementsTreeOutline.prototype._revealAndSelectNode):
27755        (WebInspector.ElementsTreeOutline.prototype._treeElementFromEvent):
27756        (WebInspector.ElementsTreeOutline.prototype._onmousedown):
27757        (WebInspector.ElementsTreeOutline.prototype._onmousemove):
27758        (WebInspector.ElementsTreeOutline.prototype._onmouseout):
27759        (WebInspector.ElementsTreeOutline.prototype._ondragstart):
27760        (WebInspector.ElementsTreeOutline.prototype._ondragover):
27761        (WebInspector.ElementsTreeOutline.prototype._ondragleave):
27762        (WebInspector.ElementsTreeOutline.prototype._isValidDragSourceOrTarget):
27763        (WebInspector.ElementsTreeOutline.prototype._ondrop.callback):
27764        (WebInspector.ElementsTreeOutline.prototype._ondrop):
27765        (WebInspector.ElementsTreeOutline.prototype._ondragend):
27766        (WebInspector.ElementsTreeOutline.prototype._clearDragOverTreeElementMarker):
27767        (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement):
27768        (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
27769        (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
27770        (WebInspector.ElementsTreeOutline.prototype.adjustCollapsedRange):
27771        (WebInspector.ElementsTreeOutline.prototype._updateModifiedNodes):
27772        (WebInspector.ElementsTreeOutline.prototype._populateContextMenu):
27773        * UserInterface/DOMTreeUpdater.js: Added.
27774        (WebInspector.ElementsTreeUpdater):
27775        (WebInspector.ElementsTreeUpdater.prototype._documentUpdated):
27776        (WebInspector.ElementsTreeUpdater.prototype._attributesUpdated):
27777        (WebInspector.ElementsTreeUpdater.prototype._characterDataModified):
27778        (WebInspector.ElementsTreeUpdater.prototype._nodeInserted):
27779        (WebInspector.ElementsTreeUpdater.prototype._nodeRemoved):
27780        (WebInspector.ElementsTreeUpdater.prototype._childNodeCountUpdated):
27781        (WebInspector.ElementsTreeUpdater.prototype._updateModifiedNodesSoon):
27782        (WebInspector.ElementsTreeUpdater.prototype._updateModifiedNodes):
27783        (WebInspector.ElementsTreeUpdater.prototype._reset):
27784        * UserInterface/Main.html: Included DOMTree{Outline,Element,Updater}.js.
27785
277862012-01-16  Timothy Hatcher  <timothy@apple.com>
27787
27788        Copy over WebInspector.DOMAgent from Open Source.
27789
27790        Copied into DOMTreeManager.js since WebInspector.DOMAgent will soon be renamed to WebInspector.DOMTreeManager.
27791
27792        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27793
27794        Rubber-stamped by John Sullivan.
27795
27796        * UserInterface/DOMTreeManager.js: Copied from OpenSource/Source/WebCore/inspector/front-end/DOMAgent.js.
27797        (WebInspector.DOMAgent):
27798        (WebInspector.DOMAgent.prototype.requestDocument.onDocumentAvailable):
27799        (WebInspector.DOMAgent.prototype.requestDocument):
27800        (WebInspector.DOMAgent.prototype.pushNodeToFrontend):
27801        (WebInspector.DOMAgent.prototype.pushNodeByPathToFrontend):
27802        (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable.onDocumentAvailable):
27803        (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable):
27804        (WebInspector.DOMAgent.prototype._attributeModified):
27805        (WebInspector.DOMAgent.prototype._attributeRemoved):
27806        (WebInspector.DOMAgent.prototype._inlineStyleInvalidated):
27807        (WebInspector.DOMAgent.prototype._loadNodeAttributes):
27808        (WebInspector.DOMAgent.prototype._characterDataModified):
27809        (WebInspector.DOMAgent.prototype.nodeForId):
27810        (WebInspector.DOMAgent.prototype._documentUpdated):
27811        (WebInspector.DOMAgent.prototype._setDocument):
27812        (WebInspector.DOMAgent.prototype._setDetachedRoot):
27813        (WebInspector.DOMAgent.prototype._setChildNodes):
27814        (WebInspector.DOMAgent.prototype._bindNodes):
27815        (WebInspector.DOMAgent.prototype._childNodeCountUpdated):
27816        (WebInspector.DOMAgent.prototype._childNodeInserted):
27817        (WebInspector.DOMAgent.prototype._childNodeRemoved):
27818        (WebInspector.DOMAgent.prototype.inspectElement):
27819        (WebInspector.DOMAgent.prototype.performSearch.callback):
27820        (WebInspector.DOMAgent.prototype.performSearch):
27821        (WebInspector.DOMAgent.prototype.searchResult.mycallback):
27822        (WebInspector.DOMAgent.prototype.searchResult):
27823        (WebInspector.DOMAgent.prototype.cancelSearch):
27824        (WebInspector.DOMAgent.prototype.querySelector):
27825        (WebInspector.DOMAgent.prototype.querySelectorAll):
27826        (WebInspector.DOMAgent.prototype.highlightDOMNode):
27827        (WebInspector.DOMAgent.prototype.hideDOMNodeHighlight):
27828        (WebInspector.DOMAgent.prototype.highlightDOMNodeForTwoSeconds):
27829        (WebInspector.DOMAgent.prototype.setInspectModeEnabled):
27830        (WebInspector.DOMAgent.prototype._buildHighlightConfig):
27831
278322012-01-16  Timothy Hatcher  <timothy@apple.com>
27833
27834        Copy over WebInspector.DOMNode from Open Source.
27835
27836        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27837
27838        Rubber-stamped by John Sullivan.
27839
27840        * UserInterface/DOMNode.js: Copied from OpenSource/Source/WebCore/inspector/front-end/DOMAgent.js.
27841        (WebInspector.DOMNode):
27842        (WebInspector.DOMNode.prototype.hasAttributes):
27843        (WebInspector.DOMNode.prototype.hasChildNodes):
27844        (WebInspector.DOMNode.prototype.nodeType):
27845        (WebInspector.DOMNode.prototype.nodeName):
27846        (WebInspector.DOMNode.prototype.nodeNameInCorrectCase):
27847        (WebInspector.DOMNode.prototype.setNodeName):
27848        (WebInspector.DOMNode.prototype.localName):
27849        (WebInspector.DOMNode.prototype.nodeValue):
27850        (WebInspector.DOMNode.prototype.setNodeValue):
27851        (WebInspector.DOMNode.prototype.getAttribute):
27852        (WebInspector.DOMNode.prototype.setAttribute):
27853        (WebInspector.DOMNode.prototype.setAttributeValue):
27854        (WebInspector.DOMNode.prototype.attributes):
27855        (WebInspector.DOMNode.prototype.removeAttribute):
27856        (WebInspector.DOMNode.prototype.getChildNodes.mycallback):
27857        (WebInspector.DOMNode.prototype.getChildNodes):
27858        (WebInspector.DOMNode.prototype.getOuterHTML):
27859        (WebInspector.DOMNode.prototype.setOuterHTML):
27860        (WebInspector.DOMNode.prototype.removeNode):
27861        (WebInspector.DOMNode.prototype.copyNode):
27862        (WebInspector.DOMNode.prototype.eventListeners):
27863        (WebInspector.DOMNode.prototype.path):
27864        (WebInspector.DOMNode.prototype.appropriateSelectorFor):
27865        (WebInspector.DOMNode.prototype.isAncestor):
27866        (WebInspector.DOMNode.prototype.isDescendant):
27867        (WebInspector.DOMNode.prototype._setAttributesPayload):
27868        (WebInspector.DOMNode.prototype._insertChild):
27869        (WebInspector.DOMNode.prototype._removeChild):
27870        (WebInspector.DOMNode.prototype._setChildrenPayload):
27871        (WebInspector.DOMNode.prototype._renumber):
27872        (WebInspector.DOMNode.prototype._addAttribute):
27873        (WebInspector.DOMNode.prototype._setAttribute):
27874        (WebInspector.DOMNode.prototype._removeAttribute):
27875        (WebInspector.DOMNode.prototype.ownerDocumentElement):
27876        (WebInspector.DOMNode.prototype.moveTo):
27877        (WebInspector.DOMNode.prototype.isXMLNode):
27878        * UserInterface/Main.html: Included DOMNode.js.
27879
278802012-01-16  Timothy Hatcher  <timothy@apple.com>
27881
27882        Copy over WebInspector.RemoteObject from Open Source.
27883
27884        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27885
27886        Rubber-stamped by John Sullivan.
27887
27888        * UserInterface/Main.html: Included RemoteObject.js.
27889        * UserInterface/RemoteObject.js: Copied from OpenSource/Source/WebCore/inspector/front-end/RemoteObject.js.
27890
278912012-01-16  Timothy Hatcher  <timothy@apple.com>
27892
27893        Copy over WebInspector.ContextMenu from Open Source.
27894
27895        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
27896
27897        Rubber-stamped by John Sullivan.
27898
27899        * UserInterface/ContextMenu.js: Copied from OpenSource/Source/WebCore/inspector/front-end/ContextMenu.js.
27900        * UserInterface/Main.html: Included ContextMenu.js.
27901
279022012-01-16  Timothy Hatcher  <timothy@apple.com>
27903
27904        Rename TreeElementHierarchicalPathComponent.js to GeneralTreeElementPathComponent.js.
27905
27906        It always dealt with GeneralTreeElements from the start, not TreeElements. This makes it clear
27907        that is can't be used with other TreeElement subclasses (like DOMTreeElement).
27908
27909        Rubber-stamped by John Sullivan.
27910
27911        * UserInterface/ContentBrowser.js:
27912        (WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Use GeneralTreeElementPathComponent.
27913        (WebInspector.ContentBrowser.prototype._hierarchicalPathComponentWasSelected): Ditto.
27914        * UserInterface/GeneralTreeElementPathComponent.js: Renamed from TreeElementHierarchicalPathComponent.js.
27915        * UserInterface/Main.html: Renamed TreeElementHierarchicalPathComponent.js to GeneralTreeElementPathComponent.js.
27916
279172012-01-14  Timothy Hatcher  <timothy@apple.com>
27918
27919        Prevent deselection of frames in the Resources sidebar when they navigate, or when resources redirect.
27920
27921        When a frame navigates or a resource redirects we remove it from the tree and reinsert it at the correct
27922        sort order based on the new URL. When the tree element was removed we would automatically select a sibling.
27923        This uses new TreeOutline support to suppress notifying select/deselect listeners so the temporary removal
27924        is not noticed, so the content view does not change briefly.
27925
27926        Reviewed by Dan Bernstein.
27927
27928        * UserInterface/FrameTreeElement.js:
27929        (WebInspector.FrameTreeElement.prototype._addTreeElement):
27930        (WebInspector.FrameTreeElement.prototype._removeTreeElement):
27931
279322012-01-14  Timothy Hatcher  <timothy@apple.com>
27933
27934        Add more support for suppressing the select and deselect events in TreeOutline. This also fixes
27935        a typo where suppress was pervasively misspelled.
27936
27937        This is needed to prevent changing views when a tree element in the Resources sidebar moves to a folder.
27938
27939        Reviewed by Dan Bernstein.
27940
27941        * UserInterface/TreeOutline.js:
27942        (TreeOutline.prototype.removeChildAtIndex): Added suppressOnDeselect and suppressSelectSibling.
27943        (TreeOutline.prototype.removeChild): Ditto.
27944        (TreeOutline.prototype.removeChildren): Added suppressOnDeselect.
27945        (TreeOutline.prototype.removeChildrenRecursive): Ditto.
27946        (TreeElement.prototype.select): Added suppressOnSelect and suppressOnDeselect.
27947        (TreeElement.prototype.revealAndSelect): Added the same parameters as select.
27948
279492012-01-11  Timothy Hatcher  <timothy@apple.com>
27950
27951        Make DataGrid use CSS gradients for headers instead of images.
27952
27953        Part of: <rdar://problem/10643175> DataGrid should be HiDPI compliant
27954
27955        Reviewed by Jing Jin.
27956
27957        * UserInterface/DataGrid.css:
27958        (.data-grid th):
27959        (.data-grid th:first-child):
27960        (.data-grid th:active:first-child):
27961        (.data-grid th:last-child):
27962        (.data-grid th:active:last-child):
27963        (.data-grid table.data):
27964        (.data-grid td):
27965        (.data-grid td:last-child):
27966        (.data-grid th.sortable:active):
27967        (.data-grid th.sort-ascending, .data-grid th.sort-descending):
27968        (.data-grid th.sortable.sort-ascending:active, .data-grid th.sortable.sort-descending:active):
27969        (.data-grid th.sort-descending + th):
27970        (.data-grid th.sort-descending + th:active):
27971        (.data-grid th.sort-descending:first-child):
27972        (.data-grid th.sort-descending:last-child):
27973        (body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-descending):
27974        * UserInterface/Images/glossyHeader.png: Removed.
27975        * UserInterface/Images/glossyHeaderPressed.png: Removed.
27976        * UserInterface/Images/glossyHeaderSelected.png: Removed.
27977        * UserInterface/Images/glossyHeaderSelectedPressed.png: Removed.
27978
279792012-01-10  Timothy Hatcher  <timothy@apple.com>
27980
27981        Improve appearance of DataGrid in the new Web Inspector.
27982
27983        This removes the extra border and outline around the DOM Storage and Cookie Storage content views.
27984        The empty gutter on the right is also removed now that OS X has overlay scrollers.
27985
27986        Reviewed by Brian Weinstein.
27987
27988        * UserInterface/CookieStorageContentView.css:
27989        (.content-view.cookie-storage > .data-grid): Set border and outline to none.
27990        * UserInterface/DOMStorageContentView.css:
27991        (.content-view.dom-storage > .data-grid): Ditto.
27992        * UserInterface/DataGrid.css:
27993        (.data-grid .data-container): Remove padding-right.
27994        (.data-grid th:last-child): Added. Remove right border and set padding-right to give room for the scroller.
27995        (.data-grid td:last-child): Added. Ditto.
27996        * UserInterface/DataGrid.js:
27997        (WebInspector.DataGrid): Removed the corder cell since it ins't needed to make room for the scroller anymore.
27998
279992012-01-10  Timothy Hatcher  <timothy@apple.com>
28000
28001        Add utility functions needed by the DOM tree code.
28002
28003        Part of: <rdar://problem/10663163> Implement the DOM Tree content view
28004
28005        Reviewed by John Sullivan.
28006
28007        * UserInterface/Utilities.js:
28008        (Node.prototype.isAncestor): Copied from OpenSource/Source/WebCore/inspector/front-end/utilities.js.
28009        (Node.prototype.isDescendant): Ditto.
28010        (Element.prototype.createChild): Ditto.
28011        (DocumentFragment.prototype.createChild): Ditto.
28012
280132012-01-10  Timothy Hatcher  <timothy@apple.com>
28014
28015        Fix a case where Element.totalOffsetLeft is used as a function instead of a property.
28016
28017        Reviewed by Brian Weinstein.
28018
28019        * UserInterface/TreeOutline.js:
28020        (TreeElement.prototype.isEventWithinDisclosureTriangle): Don't call totalOffsetLeft as a function.
28021
280222012-01-10  Timothy Hatcher  <timothy@apple.com>
28023
28024        Make events dispatch to listeners on all constructors up the prototype chain, not just immediate constructor.
28025
28026        This is needed so subclasses of ContentView can dispatch events to listeners without the need for them to listen
28027        on the concrete ContentView subclasses.
28028
28029        Reviewed by Brian Weinstein.
28030
28031        * UserInterface/Object.js:
28032        (WebInspector.Object.prototype.dispatchEventToListeners):
28033
280342012-01-10  Timothy Hatcher  <timothy@apple.com>
28035
28036        Make clicking of links for main resources of frames navigate to those resources. Before this only subresources
28037        were navigable and clicking a main resource link would open a new Safari window instead of showing the source.
28038
28039        Reviewed by Brian Weinstein.
28040
28041        * UserInterface/Frame.js:
28042        (WebInspector.Frame.prototype.resourceForURL): Check the main resources of the child frames for the requested URL.
28043
280442012-01-10  Timothy Hatcher  <timothy@apple.com>
28045
28046        Allow repeated selection of tree elements in the Storage panel (and all future NavigationSidebarPanels.)
28047
28048        Reviewed by Brian Weinstein.
28049
28050        * UserInterface/NavigationSidebarPanel.js:
28051        (WebInspector.NavigationSidebarPanel): Set this._contentTreeOutline.allowsRepeatSelection to true.
28052        * UserInterface/ResourceSidebarPanel.js:
28053        (WebInspector.ResourceSidebarPanel): Moved this.contentTreeOutline.allowsRepeatSelection = true from here
28054        to WebInspector.NavigationSidebarPanel.
28055
280562012-01-12  Timothy Hatcher  <timothy@apple.com>
28057
28058        Exclude Web Inspector strings from localizedStrings.js until they can be included
28059        in Production builds.
28060
28061        Reviewed by Darin Adler.
28062
28063        * UserInterface/Main.js:
28064        (WebInspector.UIString): Always return the string until we can actually do the lookup.
28065        * English.lproj/localizedStrings.js: Updated to exclude Web Inspector strings.
28066
280672012-01-11  Brian Weinstein  <bweinstein@apple.com>
28068
28069        Rest of <rdar://problem/10643012> Implement Database content views for new inspector design.
28070
28071        Implement custom views for when a database table is empty, or when there was an error
28072        loading the data.
28073
28074        If a table is empty, we don't get a list of column names, and can't show an empty data grid.
28075        If there was an error, we also can't show a data grid because we don't know anything about
28076        the table.
28077
28078        Reviewed by Tim Hatcher.
28079
28080        * UserInterface/DatabaseTableContentView.js:
28081        (WebInspector.DatabaseTableContentView.prototype._queryFinished): If we were unable to create
28082            a data grid, the table was empty, so call createMessageTextView.
28083        (WebInspector.DatabaseTableContentView.prototype._queryError): Call createMessageTextView.
28084        * UserInterface/Main.css:
28085        (.message-text-view, message-text-view > p, message-text-view.error): Added styles for createMessageTextView.
28086        * UserInterface/Main.js:
28087        (WebInspector.createMessageTextView): Creates a view and returns it to the caller.
28088        * English.lproj/localizedStrings.js:
28089
280902012-01-11  Brian Weinstein  <bweinstein@apple.com>
28091
28092        Clear database table views when the page navigates.
28093
28094        Reviewed by Tim Hatcher.
28095
28096        * UserInterface/StorageSidebarPanel.js:
28097        (WebInspector.StorageSidebarPanel.prototype._storageCleared):
28098
280992012-01-11  Brian Weinstein  <bweinstein@apple.com>
28100
28101        Work towards <rdar://problem/10643012> Implement Database content views for new inspector design.
28102
28103        Implement the DataGrid for database tables.
28104
28105        This patch adds the ability to be able to execute SQL queries on a DatabaseObject, and DatabaseContentView
28106        uses that to get the data from the selected table.
28107
28108        Reviewed by Tim Hatcher.
28109
28110        * UserInterface/DatabaseObject.js:
28111        (WebInspector.DatabaseObject.prototype.executeSQL): Call through to DatabaseAgent.executeSQL.
28112        * UserInterface/DatabaseObserver.js: Add a map from transaction ID -> callbacks to be able to do the right
28113            thing when sqlTransactionSucceeded or sqlTransactionFailed is called.
28114        (WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Call the onSuccess callback for that
28115            transaction ID.
28116        (WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Call the onError callback for that transaction
28117            ID.
28118        * UserInterface/DatabaseTableContentView.css: Added.
28119        (.content-view.database-table > .data-grid):
28120        * UserInterface/DatabaseTableContentView.js:
28121        (WebInspector.DatabaseTableContentView): Call update.
28122        (WebInspector.DatabaseTableContentView.prototype.constructor.WebInspector.DatabaseTableContentView.update): Get the
28123            data from the table.
28124        (WebInspector.DatabaseTableContentView.prototype._escapeTableName): Taken from open source.
28125        (WebInspector.DatabaseTableContentView.prototype._queryFinished): Create a sortable data grid with the column names
28126            and the values returned from the SQL call.
28127        (WebInspector.DatabaseTableContentView.prototype._queryError): Added a FIXME to handle the error.
28128        * UserInterface/Main.html:
28129
281302012-01-10  Brian Weinstein  <bweinstein@apple.com>
28131
28132        Work towards <rdar://problem/10643012> Implement Database content views for new inspector design.
28133
28134        Add a content view for database tables. It is currently empty, but a datagrid will be added that
28135        will show the correct data.
28136
28137        Reviewed by Tim Hatcher.
28138
28139        * UserInterface/ContentView.js:
28140        (WebInspector.ContentView):
28141        (WebInspector.ContentView.isViewable):
28142        * UserInterface/DatabaseTableContentView.js: Added.
28143        (WebInspector.DatabaseTableContentView):
28144        * UserInterface/Main.html:
28145        * UserInterface/Main.js:
28146        (WebInspector.contentBrowserTreeElementForRepresentedObject):
28147        * UserInterface/StorageSidebarPanel.js:
28148        (WebInspector.StorageSidebarPanel.prototype._treeElementSelected):
28149
281502012-01-10  Brian Weinstein  <bweinstein@apple.com>
28151
28152        Clear the DOM and cookie storage content views when we navigate.
28153
28154        Reviewed by Joseph Pecoraro.
28155
28156        * UserInterface/StorageSidebarPanel.js:
28157        (WebInspector.StorageSidebarPanel.prototype._storageCleared):
28158
281592012-01-10  Brian Weinstein  <bweinstein@apple.com>
28160
28161        Rest of <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
28162
28163        Implement deleting of individual cookies.
28164
28165        Reviewed by Tim Hatcher.
28166
28167        * UserInterface/CookieStorageContentView.js:
28168        (WebInspector.CookieStorageContentView.prototype._rebuildTable): Add a delete callback.
28169        (WebInspector.CookieStorageContentView.prototype._deleteCallback): Delete the cookie.
28170
281712012-01-10  Brian Weinstein  <bweinstein@apple.com>
28172
28173        Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
28174
28175        Implement the sorting of columns in the cookie data grid.
28176
28177        The code to sort the array was brought from open source. The rest of the patch is some refactoring
28178        which makes the code more efficient. When we get the cookies from the PageAgent, we filter them,
28179        and store the filtered cookies as a property in the class. When the sorting order is changed,
28180        we just rebuild the table using the filtered cookies already stored, so we don't need to refilter
28181        them when the sorting order changed.
28182
28183        Reviewed by Tim Hatcher.
28184
28185        * UserInterface/CookieStorageContentView.js:
28186        (WebInspector.CookieStorageContentView.prototype.constructor.WebInspector.CookieStorageContentView.update): Store the filtered
28187            cookies as a property, then call rebuildTable.
28188        (WebInspector.CookieStorageContentView.prototype._rebuildTable): Don't take cookies as a parameter any more, and don't
28189            filter them.
28190
28191        (WebInspector.CookieStorageContentView.prototype._sortCookies.localeCompare): Copied from open source.
28192        (WebInspector.CookieStorageContentView.prototype._sortCookies.numberCompare): Ditto.
28193        (WebInspector.CookieStorageContentView.prototype._sortCookies.expiresCompare): Ditto.
28194        (WebInspector.CookieStorageContentView.prototype._sortCookies): Ditto.
28195        * UserInterface/Utilities.js:
28196        (Object.defineProperty): Copied from open source.
28197
281982012-01-10  Brian Weinstein  <bweinstein@apple.com>
28199
28200        Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
28201
28202        Filter the cookies that are shown for each domain that the page has loaded. This means that when
28203        you see the cookies for twitter.com, you will only see the twitter.com cookies, and not the doubleclick
28204        cookies that twitter might have loaded.
28205
28206        Reviewed by Tim Hatcher.
28207
28208        * UserInterface/CookieStorageContentView.js:
28209        (WebInspector.CookieStorageContentView.prototype._updateWithCookies): Use the filtered cookies.
28210        (WebInspector.CookieStorageContentView.prototype._filterCookies): Get a list of all the resources
28211            that are loaded with the CookieStorageContentView's host, and when looking at the document's cookies,
28212            only add the ones that match the host.
28213        * UserInterface/FrameResourceManager.js:
28214        (WebInspector.FrameResourceManager.prototype.get frames): Get the frames of the document.
28215
28216        (WebInspector.cookieMatchesResourceURL): Brought over from open source.
28217        (WebInspector.cookieDomainMatchesResourceDomain): Ditto.
28218
282192012-01-09  Brian Weinstein  <bweinstein@apple.com>
28220
28221        Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
28222
28223        Show a list of cookies on the page. It can't be sorted, and isn't filtered for the cookie host that
28224        you selected, but cookies do show up.
28225
28226        Reviewed by Tim Hatcher.
28227
28228        * UserInterface/CookieStorageContentView.css: Added.
28229        (.content-view.cookie-storage > .data-grid): The data grid takes up the whole view.
28230        * UserInterface/CookieStorageContentView.js:
28231        (WebInspector.CookieStorageContentView): Call update.
28232        (WebInspector.CookieStorageContentView.prototype.constructor.WebInspector.CookieStorageContentView.update): Get the cookies
28233            on the page, and then call _updateWithCookies on the result.
28234        (WebInspector.CookieStorageContentView.prototype._updateWithCookies): Create the data grid if it hasn't been created yet, and
28235            populate it.
28236        * UserInterface/Main.html: Add new file.
28237        * English.lproj/localizedStrings.js: Update localized string.
28238
282392012-01-09  Brian Weinstein  <bweinstein@apple.com>
28240
28241        Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
28242
28243        Add a content view for cookie storage. It is currently empty, but a datagrid will be added that
28244        will show the correct data.
28245
28246        Reviewed by Tim Hatcher.
28247
28248        * UserInterface/ContentView.js:
28249        (WebInspector.ContentView): Add a new case for CookieStorageObject,
28250        (WebInspector.ContentView.isViewable): Ditto.
28251        * UserInterface/CookieStorageContentView.js: Added.
28252        (WebInspector.CookieStorageContentView):
28253        * UserInterface/Main.html: Add new files.
28254        * UserInterface/Main.js:
28255        (WebInspector.contentBrowserTreeElementForRepresentedObject): Add a new case for CookieStorageObject.
28256        * UserInterface/StorageSidebarPanel.js:
28257        (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Ditto.
28258
282592012-01-09  Brian Weinstein  <bweinstein@apple.com>
28260
28261        When we want to update the DOM storage data grid, don't remove the whole data grid and re-create it,
28262        just remove the DataGridNodes and regenerate those.
28263
28264        Reviewed by Tim Hatcher.
28265
28266        * UserInterface/DOMStorageContentView.js:
28267        (WebInspector.DOMStorageContentView.prototype.constructor.WebInspector.DOMStorageContentView.update): Don't remove the content
28268            view's children.
28269        (WebInspector.DOMStorageContentView.prototype._showDOMStorageEntries): Call _updateDataGridForDOMStorageEntries (which was renamed).
28270        (WebInspector.DOMStorageContentView.prototype._updateDataGridForDOMStorageEntries): Renamed. It also now only creates the data grid
28271            if necessary, and removes the children from the data grid before adding the new children.
28272
282732012-01-06  Brian Weinstein  <bweinstein@apple.com>
28274
28275        Rest towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
28276
28277        Hook up editing of the DOM storage items.
28278
28279        Reviewed by Tim Hatcher.
28280
28281        * UserInterface/DOMStorageContentView.js:
28282        (WebInspector.DOMStorageContentView.prototype._dataGridForDOMStorageEntries): Add an editing callback.
28283        (WebInspector.DOMStorageContentView.prototype._editingCallback): Tell the DOMStorageObject about what
28284            item to modify.
28285        * UserInterface/DOMStorageObject.js:
28286        (WebInspector.DOMStorageObject.prototype.setItem): Call through to DOMStorageAgent.
28287        * UserInterface/Editing.css: Added. Copied some rules from inspector.css in Open Source.
28288        * UserInterface/EditingSupport.js: Added. Copied selected functions from Open Source UIUtils.js.
28289        * UserInterface/KeyboardShortcut.js: Added.
28290        * UserInterface/Main.html: Added new files.
28291        * UserInterface/Utilities.js: Copied isInsertionCaretInside from Open Source utilities.js, but made it
28292            a property.
28293
282942012-01-06  Brian Weinstein  <bweinstein@apple.com>
28295
28296        Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
28297
28298        Implement DOMStorageObserver.updateDOMStorage, and have it call all the way through to calling
28299        update on the DOMStorageContentView.
28300
28301        Reviewed by Tim Hatcher.
28302
28303        * UserInterface/DOMStorageObserver.js:
28304        (WebInspector.DOMStorageObserver.prototype.updateDOMStorage):
28305        * UserInterface/StorageManager.js:
28306        (WebInspector.StorageManager.prototype.domStorageWasUpdated):
28307        (WebInspector.StorageManager.prototype._mainResourceDidChange):
28308        (WebInspector.StorageManager.prototype._domStorageForId):
28309
283102012-01-06  Brian Weinstein  <bweinstein@apple.com>
28311
28312        Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
28313
28314        Hook up the delete callback from the datagrid. When the delete key is pressed and a row is selected,
28315        that DOM storage item will be deleted.
28316
28317        Reviewed by Tim Hatcher.
28318
28319        * UserInterface/DOMStorageContentView.js:
28320        (WebInspector.DOMStorageContentView.prototype._dataGridForDOMStorageEntries):
28321        (WebInspector.DOMStorageContentView.prototype._deleteCallback):
28322        * UserInterface/DOMStorageObject.js:
28323        (WebInspector.DOMStorageObject.prototype.getEntries):
28324        (WebInspector.DOMStorageObject.prototype.removeItem):
28325
283262012-01-06  Brian Weinstein  <bweinstein@apple.com>
28327
28328        Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
28329
28330        Make resizing columns work.
28331
28332        Reviewed by Tim Hatcher.
28333
28334        * UserInterface/DataGrid.js:
28335        (WebInspector.DataGrid.prototype._resizerDragging): Change totalOffsetLeft to be a property instead of
28336            a function. This matches Utilities.js and code that we already have.
28337        (WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle): Ditto.
28338        * UserInterface/Main.js:
28339        (WebInspector.elementDragStart): Copied from Open Source.
28340        (WebInspector.elementDragEnd): Ditto.
28341        * UserInterface/Utilities.js:
28342        (Object.defineProperty):
28343
283442012-01-06  Brian Weinstein  <bweinstein@apple.com>
28345
28346        Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
28347
28348        We now show a data grid with the contents of the local or session storage.
28349
28350        It's not editable, and you can't resize the columns yet, but that will come in
28351        the not too distant future.
28352
28353        Reviewed by Tim Hatcher.
28354
28355        * UserInterface/DOMStorageContentView.css: Added.
28356        (.content-view.dom-storage > .data-grid): Make the data grid take up the whole content view.
28357        * UserInterface/DOMStorageContentView.js:
28358        (WebInspector.DOMStorageContentView): Call update.
28359        (WebInspector.DOMStorageContentView.prototype.constructor.WebInspector.DOMStorageContentView.update): Remove all children
28360            from the content view, and ask the DOM storage object for a list of entries, and pass _showDOMStorageEntries as a callback.
28361        (WebInspector.DOMStorageContentView.prototype._showDOMStorageEntries): Call _dataGridForDOMStorageEntries and add the data grid
28362            to the
28363        (WebInspector.DOMStorageContentView.prototype._dataGridForDOMStorageEntries): Create the data grid and populate it.
28364        * UserInterface/DOMStorageObject.js:
28365        (WebInspector.DOMStorageObject.prototype.isLocalStorage):
28366        (WebInspector.DOMStorageObject.prototype.getEntries): Ask for the entries for the DOM storage.
28367        * UserInterface/Main.html: Add the new CSS file.
28368        * English.lproj/localizedStrings.js: Update the localized strings.
28369
283702012-01-06  Brian Weinstein  <bweinstein@apple.com>
28371
28372        Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
28373
28374        Clean up DataGrid by replacing (add|remove|has)StyleClass with classList.(add|remove|contains).
28375
28376        Reviewed by Tim Hatcher.
28377
28378        * UserInterface/DataGrid.js:
28379
283802012-01-06  Brian Weinstein  <bweinstein@apple.com>
28381
28382        Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
28383
28384        Add a content view for DOM storage. Currently it is just a blank view, but a datagrid will be
28385        added that will show the correct data.
28386
28387        Reviewed by Tim Hatcher.
28388
28389        * UserInterface/ContentView.js:
28390        (WebInspector.ContentView): Add a new case for DOMStorageObject.
28391        (WebInspector.ContentView.isViewable): Ditto.
28392        (.content-view.dom-storage > .content-view-container):
28393        * UserInterface/DOMStorageContentView.js: Added.
28394        (WebInspector.DOMStorageContentView):
28395        * UserInterface/Main.html:
28396        * UserInterface/StorageSidebarPanel.js:
28397        (WebInspector.StorageSidebarPanel): Add a listener for when a tree element is selected.
28398        (WebInspector.StorageSidebarPanel.prototype._storageCleared):
28399        (WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Install the content view.
28400
284012012-01-04  Brian Weinstein  <bweinstein@apple.com>
28402
28403        Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
28404
28405        Add DataGrid JavaScript, CSS files, and necessary images to the internal project.
28406
28407        Reviewed by Tim Hatcher.
28408
28409        * UserInterface/DataGrid.js: Added. This was copied from ToT Open Source, but the changes from
28410            http://trac.webkit.org/changeset/98225 and http://trac.webkit.org/changeset/98228 were rolled out,
28411            because we don't share the same concept of a WebInspector view.
28412
28413        * UserInterface/Images/glossyHeader.png: Added.
28414        * UserInterface/Images/glossyHeaderPressed.png: Added.
28415        * UserInterface/Images/glossyHeaderSelected.png: Added.
28416        * UserInterface/Images/glossyHeaderSelectedPressed.png: Added.
28417        * UserInterface/Images/treeDownTriangleBlack.png: Added.
28418        * UserInterface/Images/treeDownTriangleWhite.png: Added.
28419        * UserInterface/Images/treeRightTriangleBlack.png: Added.
28420        * UserInterface/Images/treeRightTriangleWhite.png: Added.
28421        * UserInterface/Images/treeUpTriangleBlack.png: Added.
28422
28423        * UserInterface/Main.html: Added new files.
28424
28425        * UserInterface/dataGrid.css: Added.
28426
284272012-01-06  Timothy Hatcher  <timothy@apple.com>
28428
28429        Add a path component to WebInspector.FrameContentView that will eventually let you switch
28430        between Source Code and DOM Tree.
28431
28432        Reviewed by Joseph Pecoraro.
28433
28434        * UserInterface/FrameContentView.js:
28435        (WebInspector.FrameContentView.createPathComponent): Added. Helper for making HierarchicalPathComponents.
28436        (WebInspector.FrameContentView): Create a Source Code path component.
28437        (WebInspector.FrameContentView.prototype.get selectionPathComponents): Added. Append the current view's path
28438        components to the path component representing the current view.
28439        (WebInspector.FrameContentView.prototype._pathComponentForContentView): Added.
28440        (WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Added.
28441        (WebInspector.FrameContentView.prototype._pathComponentSelected): Added.
28442        * UserInterface/Images/SourceCode.pdf: Added.
28443        * UserInterface/Main.html: Included PathComponentIcons.css.
28444        * UserInterface/PathComponentIcons.css: Added.
28445        (.source-code-icon .icon):
28446        * English.lproj/localizedStrings.js: Updated.
28447
284482012-01-06  Timothy Hatcher  <timothy@apple.com>
28449
28450        Add support for path components in the Quick Navigation bar that represent the current selection in a content view.
28451
28452        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28453
28454        Reviewed by Joseph Pecoraro.
28455
28456        * UserInterface/ClusterContentView.js:
28457        (WebInspector.ClusterContentView): Listen for CurrentContentViewDidChange and SelectionPathComponentsDidChange events.
28458        (WebInspector.ClusterContentView.prototype.get selectionPathComponents): Added. Forward the selectionPathComponents
28459        of the current view.
28460        (WebInspector.ClusterContentView.prototype._currentContentViewDidChange): Added. Dispatch SelectionPathComponentsDidChange event.
28461        (WebInspector.ClusterContentView.prototype._contentViewSelectionPathComponentDidChange): Added. Dispatch the
28462        SelectionPathComponentsDidChange event if the event target is our current content view.
28463        * UserInterface/ContentBrowser.js:
28464        (WebInspector.ContentBrowser): Create a hierarchical path navigation item for the content view path components.
28465        (WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem): Added. Remove and insert the navigation
28466        item if needed and update the components.
28467        (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange): Added. Call _updateContentViewSelectionPathNavigationItem.
28468        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call _updateContentViewSelectionPathNavigationItem.
28469        * UserInterface/ContentView.js:
28470        (WebInspector.ContentView.prototype.get selectionPathComponents): Added stub.
28471        * UserInterface/HierarchicalPathComponent.css:
28472        (.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-of-type > .separator): Added
28473        the :not(.always-show-last-path-component-separator) part so so prevent hiding the separator in that case.
28474        * UserInterface/HierarchicalPathNavigationItem.js:
28475        (WebInspector.HierarchicalPathNavigationItem.prototype.get alwaysShowLastPathComponentSeparator): Added.
28476        (WebInspector.HierarchicalPathNavigationItem.prototype.set alwaysShowLastPathComponentSeparator): Added.
28477
284782012-01-05  Timothy Hatcher  <timothy@apple.com>
28479
28480        Fix a regression from r39746 where link navigation between Web Inspector resource broke.
28481
28482        Reviewed by Brian Weinstein.
28483
28484        * UserInterface/Main.js:
28485        (WebInspector.openURL): Use contentBrowser instead of the now removed contentViewContainer.
28486        Also show the frame for main resources instead of the resource itself.
28487
284882012-01-05  Timothy Hatcher  <timothy@apple.com>
28489
28490        Fix an issue where host names for frames where not shown when they differ from the frame that includes them.
28491
28492        Reviewed by Brian Weinstein.
28493
28494        * UserInterface/Resource.js:
28495        (WebInspector.Resource.prototype.isMainResource): Added. Helper function.
28496        * UserInterface/ResourceTreeElement.js:
28497        (WebInspector.ResourceTreeElement.prototype._updateTitles): When the resource is a main resource, get the
28498        host from the parent frame instead of the current frame.
28499
285002012-01-05  Timothy Hatcher  <timothy@apple.com>
28501
28502        Add support for intra-view back/forward navigation.
28503
28504        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28505
28506        Reviewed by Brian Weinstein.
28507
28508        * UserInterface/ClusterContentView.js:
28509        (WebInspector.ClusterContentView.prototype.canGoBack): Added. Call through to the content view container.
28510        (WebInspector.ClusterContentView.prototype.canGoForward): Added. Ditto.
28511        (WebInspector.ClusterContentView.prototype.goBack): Added. Ditto.
28512        (WebInspector.ClusterContentView.prototype.goForward): Added. Ditto.
28513        * UserInterface/ContentBrowser.js:
28514        (WebInspector.ContentBrowser.prototype.canGoBack): Added. Check the current content view first.
28515        (WebInspector.ContentBrowser.prototype.canGoForward): Added. Check the current content view first.
28516        (WebInspector.ContentBrowser.prototype.goBack): Added. Try the current content view first.
28517        (WebInspector.ContentBrowser.prototype.goForward): Added. Try the current content view first.
28518        (WebInspector.ContentBrowser.prototype._backButtonClicked): Call goBack on this instead of the content
28519        view container directly.
28520        (WebInspector.ContentBrowser.prototype._forwardButtonClicked): Call goForward on this instead of the
28521        content view container directly.
28522        (WebInspector.ContentBrowser.prototype._updateBackForwardButtons): Added.
28523        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call _udpateBackForwardButtons.
28524        * UserInterface/ContentView.js:
28525        (WebInspector.ContentView.prototype.canGoBack): Added stub.
28526        (WebInspector.ContentView.prototype.canGoForward): Added stub.
28527        (WebInspector.ContentView.prototype.goBack): Added stub.
28528        (WebInspector.ContentView.prototype.goForward): Added stub.
28529
285302012-01-04  Timothy Hatcher  <timothy@apple.com>
28531
28532        Add WebInspector.FrameContentView and WebInspector.ClusterContentView in preparation for showing
28533        either the main resource text or the DOM tree for a frame.
28534
28535        Reviewed by Joseph Pecoraro.
28536
28537        * UserInterface/ClusterContentView.css: Added.
28538        (.content-view.cluster > .content-view-container):
28539        * UserInterface/ClusterContentView.js: Added.
28540        (WebInspector.ClusterContentView):
28541        (WebInspector.ClusterContentView.prototype.get contentViewContainer):
28542        * UserInterface/ContentView.js:
28543        (WebInspector.ContentView): Return a FrameContentView for a Frame.
28544        (WebInspector.ContentView.isViewable): Added Frame.
28545        * UserInterface/FrameContentView.js: Added.
28546        (WebInspector.FrameContentView):
28547        (WebInspector.FrameContentView.prototype.get frame):
28548        * UserInterface/Main.html: Included ClusterContentView.{css,js} and FrameContentView.js.
28549        * UserInterface/Main.js:
28550        (WebInspector.contentBrowserTreeElementForRepresentedObject): Added WebInspector.Frame check.
28551        * UserInterface/ResourceSidebarPanel.js:
28552        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Removed. The base class
28553        version of this function is enough now.
28554        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Close all FrameContentViews
28555        and improve a comment and add a FIXME.
28556        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Use treeElement.representedObject
28557        instead of treeElement.resource since we want a FrameContentView for frames.
28558
285592012-01-04  Timothy Hatcher  <timothy@apple.com>
28560
28561        Populate the on-click menu for path components backed by tree elements.
28562
28563        Reviewed by Joseph Pecoraro.
28564
28565        * UserInterface/ContentBrowser.js:
28566        (WebInspector.ContentBrowser): Add PathComponentWasSelected event listener.
28567        (WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Use TreeElementHierarchicalPathComponent.
28568        (WebInspector.ContentBrowser.prototype._hierarchicalPathComponentWasSelected): Added.
28569        * UserInterface/ContentView.js:
28570        (WebInspector.ContentView): Add assertions that isViewable is correct.
28571        (WebInspector.ContentView.isViewable): Added.
28572        * UserInterface/Main.html: Included TreeElementHierarchicalPathComponent.js.
28573        * UserInterface/TreeElementHierarchicalPathComponent.js: Added.
28574        (WebInspector.TreeElementHierarchicalPathComponent):
28575        (WebInspector.TreeElementHierarchicalPathComponent.prototype.get treeElement):
28576        (WebInspector.TreeElementHierarchicalPathComponent.prototype.get previousSibling):
28577        (WebInspector.TreeElementHierarchicalPathComponent.prototype.get nextSibling):
28578
285792012-01-04  Timothy Hatcher  <timothy@apple.com>
28580
28581        Show a popup menu on click in HierarchicalPathComponent that contains sibling path components.
28582
28583        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28584
28585        Reviewed by Joseph Pecoraro.
28586
28587        * UserInterface/HierarchicalPathComponent.css:
28588        (.hierarchical-path-component): Make positioning relative.
28589        (.hierarchical-path-component > select): Added. Positioned so the text in the menu aligns with the text in .title.
28590        * UserInterface/HierarchicalPathComponent.js:
28591        (WebInspector.HierarchicalPathComponent): Create the select element.
28592        (WebInspector.HierarchicalPathComponent.prototype.get previousSibling): Added.
28593        (WebInspector.HierarchicalPathComponent.prototype.set previousSibling): Added.
28594        (WebInspector.HierarchicalPathComponent.prototype.get nextSibling): Added.
28595        (WebInspector.HierarchicalPathComponent.prototype.set nextSibling): Added.
28596        (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement): Added. Build the select menu.
28597        (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption): Added. Helper to create
28598        an option element from a path component.
28599        (WebInspector.HierarchicalPathComponent.prototype._selectElementMouseDown): Added. Call _updateSelectElement.
28600        (WebInspector.HierarchicalPathComponent.prototype._selectElementSelectionChanged): Added. Fire the SiblingWasSelected event.
28601        * UserInterface/HierarchicalPathNavigationItem.js:
28602        (WebInspector.HierarchicalPathNavigationItem.prototype.set components): Remove and add event listeners.
28603        (WebInspector.HierarchicalPathNavigationItem.prototype._siblingPathComponentWasSelected): Added. Fire the PathComponentWasSelected event.
28604
286052012-01-03  Brian Weinstein  <bweinstein@apple.com>
28606
28607        If a database doesn't have any tables, its tree element shouldn't have a disclosure triangle.
28608
28609        When creating the tree element for a database, initially set it not to have children, but make sure
28610        it is populated when it is first created, so children will be added if it has them.
28611
28612        Reviewed by Tim Hatcher.
28613
28614        * UserInterface/DatabaseTreeElement.js:
28615        (WebInspector.DatabaseTreeElement):
28616        (WebInspector.DatabaseTreeElement.prototype.onpopulate.tableNamesCallback):
28617        (WebInspector.DatabaseTreeElement.prototype.onpopulate):
28618
286192012-01-02  Timothy Hatcher  <timothy@apple.com>
28620
28621        Localize the Web Inspector by adding WebInspector.UIString in places that need it.
28622
28623        Reviewed by Jessie Berlin.
28624
28625        * UserInterface/ContentBrowser.js:
28626        (WebInspector.ContentBrowser):
28627        * UserInterface/CookieStorageTreeElement.js:
28628        (WebInspector.CookieStorageTreeElement.prototype.get categoryName):
28629        * UserInterface/DOMStorageTreeElement.js:
28630        (WebInspector.DOMStorageTreeElement.prototype.get categoryName):
28631        * UserInterface/DatabaseHostTreeElement.js:
28632        (WebInspector.DatabaseHostTreeElement.prototype.get categoryName):
28633        * UserInterface/DatabaseObject.js:
28634        (WebInspector.DatabaseObject):
28635        * UserInterface/FrameTreeElement.js:
28636        (WebInspector.FrameTreeElement.prototype._folderNameForResourceType):
28637        (WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject):
28638        * UserInterface/Main.js:
28639        (WebInspector.contentLoaded):
28640        (WebInspector._leftSidebarToggleButtonToolTip):
28641        (WebInspector._rightSidebarToggleButtonToolTip):
28642        * UserInterface/NavigationSidebarPanel.js:
28643        (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
28644        * UserInterface/ResourceSidebarPanel.js:
28645        (WebInspector.ResourceSidebarPanel):
28646        * UserInterface/StorageSidebarPanel.js:
28647        (WebInspector.StorageSidebarPanel):
28648        (WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasAdded):
28649        (WebInspector.StorageSidebarPanel.prototype._databaseWasAdded):
28650        (WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded):
28651        * English.lproj/localizedStrings.js: Updated with update-safari-localizable-strings.
28652
286532012-01-02  Timothy Hatcher  <timothy@apple.com>
28654
28655        Add WebInspector.UIString and load the localized strings file.
28656
28657        Reviewed by Jessie Berlin.
28658
28659        * UserInterface/Main.js:
28660        (WebInspector.loadLocalizedStrings): Added. Load the localized strings file and call
28661        content loaded when it loads.
28662        (WebInspector.UIString): Added.
28663
286642012-01-02  Timothy Hatcher  <timothy@apple.com>
28665
28666        Add string formatting functions to Web Inspector.
28667
28668        These will be needed for localization and the console.
28669
28670        Reviewed by Brian Weinstein.
28671
28672        * UserInterface/Utilities.js:
28673        (Array.convert): Copied from OpenSource/Source/WebCore/inspector/front-end/utilities.js.
28674        (String.tokenizeFormatString): Ditto.
28675        (String.standardFormatters): Ditto.
28676        (String.format): Ditto.
28677        (String.prototype.format): Added.
28678
286792011-12-31  Timothy Hatcher  <timothy@apple.com>
28680
28681        Add the toggle left and right sidebar buttons to the Quick Navigation bar.
28682
28683        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28684
28685        Reviewed by Brian Weinstein.
28686
28687        * UserInterface/Images/LeftSidebarClose.pdf: Added.
28688        * UserInterface/Images/LeftSidebarOpen.pdf: Added.
28689        * UserInterface/Images/RightSidebarClose.pdf: Added.
28690        * UserInterface/Images/RightSidebarOpen.pdf: Added.
28691        * UserInterface/Main.js:
28692        (WebInspector.contentLoaded): Create the left and right toggle sidebar buttons and add event listeners.
28693        (WebInspector._leftSidebarToggleButtonToolTip): Added. Return the correct tool tip based on which sidebar
28694        is currently on the left.
28695        (WebInspector._rightSidebarToggleButtonToolTip): Added. Ditto for the right.
28696        (WebInspector._toggleLeftSidebar): Added.
28697        (WebInspector._toggleRightSidebar): Added.
28698        (WebInspector._sidebarCollapsedStateDidChange): Added. Update the toggle navigation buttons.
28699        * UserInterface/Sidebar.js:
28700        (WebInspector.Sidebar.prototype.set collapsed): Fire the CollapsedStateDidChange event.
28701        * UserInterface/TextEditor.css:
28702        (.text-editor > .gutter): Made the min-width 1px smaller to align with the divider in the navigation bar.
28703
287042011-12-31  Timothy Hatcher  <timothy@apple.com>
28705
28706        Add support for removing navigation items.
28707
28708        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28709
28710        Reviewed by Brian Weinstein.
28711
28712        * UserInterface/NavigationBar.js:
28713        (WebInspector.NavigationBar.prototype.removeNavigationItem): Added.
28714        (WebInspector.NavigationBar.prototype.set selectedNavigationItem): Moved code from here into _findNavigationItem.
28715        (WebInspector.NavigationBar.prototype._findNavigationItem): Added.
28716
287172011-12-31  Timothy Hatcher  <timothy@apple.com>
28718
28719        Add support for inserting navigation items at a specific index.
28720
28721        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28722
28723        Reviewed by Brian Weinstein.
28724
28725        * UserInterface/NavigationBar.js:
28726        (WebInspector.NavigationBar.prototype.addNavigationItem): Call insertNavigationItem.
28727        (WebInspector.NavigationBar.prototype.insertNavigationItem): Added.
28728
287292011-12-31  Timothy Hatcher  <timothy@apple.com>
28730
28731        Add WebInspector.ToggleButtonNavigationItem for the sidebar toggle buttons in the Quick Navigation bar.
28732
28733        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28734
28735        Reviewed by Brian Weinstein.
28736
28737        * UserInterface/ButtonNavigationItem.js:
28738        (WebInspector.ButtonNavigationItem.prototype.set image): Added.
28739        (WebInspector.ButtonNavigationItem.prototype._generateImages._createEmbossedCanvasImage): Call clearRect
28740        since _generateImages can be called multiple times now.
28741        * UserInterface/Main.html: Included ToggleButtonNavigationItem.js.
28742        * UserInterface/ToggleButtonNavigationItem.js: Added.
28743        (WebInspector.ToggleButtonNavigationItem): Added.
28744        (WebInspector.ToggleButtonNavigationItem.prototype.get defaultImage): Added.
28745        (WebInspector.ToggleButtonNavigationItem.prototype.get alternateImage): Added.
28746        (WebInspector.ToggleButtonNavigationItem.prototype.get toggled): Added.
28747        (WebInspector.ToggleButtonNavigationItem.prototype.set toggled): Added. Set _toggled and set the correct image.
28748
287492011-12-31  Timothy Hatcher  <timothy@apple.com>
28750
28751        Actually set the ButtonNavigationItem tool tip so it shows up as expected.
28752
28753        Reviewed by Dan Bernstein.
28754
28755        * UserInterface/ButtonNavigationItem.js:
28756        (WebInspector.ButtonNavigationItem): Use the toolTip setter instead of _toolTip.
28757        (WebInspector.ButtonNavigationItem.prototype.get toolTip): Return the title instead of _toolTip.
28758        (WebInspector.ButtonNavigationItem.prototype.set toolTip): Added. Set the element title.
28759
287602011-12-31  Timothy Hatcher  <timothy@apple.com>
28761
28762        Rename ButtonNavigationItem.displayName to toolTip.
28763
28764        It was always intended to be used as the tool tip, so this makes it clear.
28765
28766        Reviewed by Dan Bernstein.
28767
28768        * UserInterface/ButtonNavigationItem.js:
28769        (WebInspector.ButtonNavigationItem):
28770        (WebInspector.ButtonNavigationItem.prototype.constructor.WebInspector.ButtonNavigationItem.get toolTip):
28771        * UserInterface/RadioButtonNavigationItem.js:
28772        (WebInspector.RadioButtonNavigationItem):
28773
287742011-12-29  Timothy Hatcher  <timothy@apple.com>
28775
28776        Fix an issue in the Web Inspector where the old page content might appear when
28777        pressing the back button.
28778
28779        Reviewed by Dan Bernstein.
28780
28781        * UserInterface/ResourceSidebarPanel.js:
28782        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Delay this work because
28783        other listeners of this event might not have fired yet. So selecting the main frame before those listeners
28784        do their work might cause the content of the old page to show instead of the new page.
28785
287862011-12-29  Timothy Hatcher  <timothy@apple.com>
28787
28788        Add back/forward buttons to the Quick Navigation bar and hook them up.
28789
28790        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28791
28792        Reviewed by Joseph Pecoraro.
28793
28794        * UserInterface/ContentBrowser.js:
28795        (WebInspector.ContentBrowser): Create the back and forward button navigation items.
28796        (WebInspector.ContentBrowser.prototype._backButtonClicked): Added.
28797        (WebInspector.ContentBrowser.prototype._forwardButtonClicked): Added.
28798        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Update the enabled state
28799        of the back/forward navigation items.
28800        * UserInterface/Images/BackArrow.pdf: Added.
28801        * UserInterface/Images/ForwardArrow.pdf: Added.
28802
288032011-12-29  Timothy Hatcher  <timothy@apple.com>
28804
28805        Add WebInspector.DividerNavigationItem for dividing items in the Quick Navigation bar.
28806
28807        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28808
28809        Reviewed by Joseph Pecoraro.
28810
28811        * UserInterface/DividerNavigationItem.css: Added.
28812        (.navigation-bar > .item.divider):
28813        * UserInterface/DividerNavigationItem.js: Added.
28814        (WebInspector.DividerNavigationItem):
28815        * UserInterface/Main.html: Included DividerNavigationItem.js and DividerNavigationItem.css.
28816
288172011-12-29  Timothy Hatcher  <timothy@apple.com>
28818
28819        Add disabled support to WebInspector.ButtonNavigationItem.
28820
28821        This is needed for the back/forward buttons.
28822
28823        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28824
28825        Reviewed by Joseph Pecoraro.
28826
28827        * UserInterface/ButtonNavigationItem.css:
28828        (.navigation-bar > .item.button.disabled > .glyph): Added.
28829        (.navigation-bar > .item.button:not(.disabled):not(.radio):active): Don't highlight on click when disabled.
28830        * UserInterface/ButtonNavigationItem.js:
28831        (WebInspector.ButtonNavigationItem.prototype.get enabled): Added.
28832        (WebInspector.ButtonNavigationItem.prototype.set enabled): Added.
28833        (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Added :not(.disabled) to the focus and active rules.
28834        (WebInspector.ButtonNavigationItem.StyleClassName._mouseClicked): Don't fire the event when disabled.
28835        * UserInterface/RadioButtonNavigationItem.js:
28836        (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Added :not(.disabled) to the focus and active rules.
28837
288382011-12-29  Timothy Hatcher  <timothy@apple.com>
28839
28840        Add support for click events to WebInspector.ButtonNavigationItem.
28841
28842        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28843
28844        Reviewed by Joseph Pecoraro.
28845
28846        * UserInterface/ButtonNavigationItem.js:
28847        (WebInspector.ButtonNavigationItem): Added click event listener to the element.
28848        (WebInspector.ButtonNavigationItem.StyleClassName._mouseClicked): Added. Dispatch the Clicked event.
28849
288502011-12-29  Timothy Hatcher  <timothy@apple.com>
28851
28852        Support different size glyph images on WebInspector.ButtonNavigationItem. Also adds a highlight to
28853        buttons when pressed and general style clean up.
28854
28855        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28856
28857        Reviewed by Joseph Pecoraro.
28858
28859        * UserInterface/ButtonNavigationItem.css:
28860        (.navigation-bar > .item.button): Default buttons to a width of 26px. Removed background styles.
28861        (.navigation-bar > .item.button > .glyph): Set width and height to 100% and have the background
28862        centered and non-repeating.
28863        (.navigation-bar > .item.button:not(.radio):active): Added. Highlight when pressed.
28864        * UserInterface/ButtonNavigationItem.js:
28865        (WebInspector.ButtonNavigationItem): Added image width and height arguments.
28866        (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Added background-size to the generated rules.
28867        * UserInterface/RadioButtonNavigationItem.css:
28868        (.navigation-bar > .item.radio.button): Added. Moved from ButtonNavigationItem.css.
28869        (.navigation-bar.collapsed > .item.radio.button): Added. Moved from ButtonNavigationItem.css.
28870        (.navigation-bar > .item.radio.button.selected): Moved background-repeat from ButtonNavigationItem.css to here.
28871        (.navigation-bar.collapsed > .item.radio.button.selected): Added. Adjust the background-size to fit the width.
28872        * UserInterface/RadioButtonNavigationItem.js:
28873        (WebInspector.RadioButtonNavigationItem): Added image width and height arguments.
28874        (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Added background-size to the generated rules.
28875
288762011-12-28  Timothy Hatcher  <timothy@apple.com>
28877
28878        Populate the Quick Navigation bar with the path of the selected item.
28879
28880        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28881
28882        Reviewed by Joseph Pecoraro.
28883
28884        * UserInterface/ContentBrowser.js:
28885        (WebInspector.ContentBrowser): Added delegate argument. Create a HierarchicalPathNavigationItem and add
28886        to the navigation bar.
28887        (WebInspector.ContentBrowser.prototype.get delegate): Added.
28888        (WebInspector.ContentBrowser.prototype.set delegate): Added.
28889        (WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Added. Build path components
28890        based on the tree element for the represented object.
28891        (WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Added. Call _updateHierarchicalPathNavigationItem.
28892        * UserInterface/ContentViewContainer.js:
28893        (WebInspector.ContentViewContainer.prototype._showContentView): Dispatch the CurrentContentViewDidChange event.
28894        * UserInterface/Main.js:
28895        (WebInspector.contentLoaded): Pass this as the delegate to the ContentBrowser.
28896        (WebInspector.contentBrowserTreeElementForRepresentedObject): Added. Call treeElementForRepresentedObject on
28897        the ResourceSidebarPanel for Resource represented objects.
28898        * UserInterface/NavigationSidebarPanel.js:
28899        (WebInspector.NavigationSidebarPanel.prototype.treeElementForRepresentedObject): Added. Generic implementation
28900        that will work for most NavigationSidebarPanel subclasses.
28901        * UserInterface/ResourceSidebarPanel.js:
28902        (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Added. If the resource is a
28903        main resource, return the tree element for the parent frame.
28904
289052011-12-28  Timothy Hatcher  <timothy@apple.com>
28906
28907        Add HierarchicalPathNavigationItem and friends for the Quick Navigation Bar.
28908
28909        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28910
28911        Reviewed by Joseph Pecoraro.
28912
28913        * UserInterface/HierarchicalPathComponent.css: Added.
28914        (.hierarchical-path-component):
28915        (.hierarchical-path-component > .icon):
28916        (.hierarchical-path-component > .title):
28917        (.hierarchical-path-component:last-of-type > .separator):
28918        (.hierarchical-path-component > .separator):
28919        (.hierarchical-path-component.collapsed > .title):
28920        * UserInterface/HierarchicalPathComponent.js: Added.
28921        (WebInspector.HierarchicalPathComponent):
28922        (WebInspector.HierarchicalPathComponent.prototype.get element):
28923        (WebInspector.HierarchicalPathComponent.prototype.get representedObject):
28924        (WebInspector.HierarchicalPathComponent.prototype.get displayName):
28925        (WebInspector.HierarchicalPathComponent.prototype.set displayName):
28926        * UserInterface/HierarchicalPathNavigationItem.js: Added.
28927        (WebInspector.HierarchicalPathNavigationItem):
28928        (WebInspector.HierarchicalPathNavigationItem.prototype.get components):
28929        (WebInspector.HierarchicalPathNavigationItem.prototype.set components):
28930        * UserInterface/Images/HierarchicalNavigationItemChevron.pdf: Added.
28931        * UserInterface/Main.html: Included HierarchicalPathComponent.css, HierarchicalPathNavigationItem.js
28932        and HierarchicalPathComponent.js.
28933
289342011-12-26  Timothy Hatcher  <timothy@apple.com>
28935
28936        Add WebInspector.ContentBrowser to coordinate between the Quick Navigation bar and content view container.
28937
28938        Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
28939
28940        Reviewed by Joseph Pecoraro and Brian Weinstein.
28941
28942        * UserInterface/ContentBrowser.css: Added.
28943        (.content-browser):
28944        (.content-browser > .navigation-bar):
28945        (.content-browser > .content-view-container):
28946        * UserInterface/ContentBrowser.js: Added.
28947        (WebInspector.ContentBrowser):
28948        (WebInspector.ContentBrowser.prototype.get navigationBar):
28949        (WebInspector.ContentBrowser.prototype.get contentViewContainer):
28950        (WebInspector.ContentBrowser.prototype.showContentForRepresentedObject):
28951        * UserInterface/ContentViewContainer.js:
28952        (WebInspector.ContentViewContainer.prototype.get element): Add missing return.
28953        * UserInterface/Main.css:
28954        (#content-browser):
28955        * UserInterface/Main.html: Renamed #content to #content-browser.
28956        * UserInterface/Main.js:
28957        (WebInspector.contentLoaded): Create a ContentBrowser instead of a NavigationBar and ContentViewContainer.
28958        * UserInterface/ResourceSidebarPanel.js:
28959        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Use the ContentBrowser.
28960        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Ditto.
28961
289622011-12-28  Timothy Hatcher  <timothy@apple.com>
28963
28964        Hold references to the navigation sidebar panels for easy access.
28965
28966        Reviewed by Adam Roben.
28967
28968        * UserInterface/Main.js:
28969        (WebInspector.contentLoaded): Hold references to the sidebar panels.
28970
289712011-12-28  Timothy Hatcher  <timothy@apple.com>
28972
28973        Remove unused TreeElement class names.
28974
28975        These class names were originally used for icons, but they have been
28976        replaced by icon specific class names.
28977
28978        Reviewed by Brian Weinstein.
28979
28980        * UserInterface/CookieStorageTreeElement.js:
28981        (WebInspector.CookieStorageTreeElement):
28982        * UserInterface/DOMStorageTreeElement.js:
28983        (WebInspector.DOMStorageTreeElement):
28984        * UserInterface/DatabaseHostTreeElement.js:
28985        (WebInspector.DatabaseHostTreeElement):
28986        * UserInterface/DatabaseTableTreeElement.js:
28987        (WebInspector.DatabaseTableTreeElement):
28988        * UserInterface/DatabaseTreeElement.js:
28989        (WebInspector.DatabaseTreeElement):
28990        * UserInterface/FolderTreeElement.js:
28991        (WebInspector.FolderTreeElement):
28992        * UserInterface/FrameTreeElement.js:
28993        (WebInspector.FrameTreeElement):
28994        * UserInterface/ResourceTreeElement.js:
28995        (WebInspector.ResourceTreeElement):
28996        * UserInterface/StorageTreeElement.js:
28997        (WebInspector.StorageTreeElement):
28998
289992011-12-24  Timothy Hatcher  <timothy@apple.com>
29000
29001        Add icons for local and session storage.
29002
29003        Reviewed by Brian Weinstein.
29004
29005        * UserInterface/DOMStorageIcons.css: Added.
29006        (.local-storage-icon .icon):
29007        (.session-storage-icon .icon):
29008        * UserInterface/DOMStorageTreeElement.js:
29009        (WebInspector.DOMStorageTreeElement): Add class names based on if it is local storage or not.
29010        (WebInspector.DOMStorageTreeElement.prototype.get categoryName): Remove blank line.
29011        * UserInterface/Images/LocalStorage.png: Added.
29012        * UserInterface/Images/LocalStorage@2x.png: Added.
29013        * UserInterface/Images/SessionStorage.png: Added.
29014        * UserInterface/Images/SessionStorage@2x.png: Added.
29015        * UserInterface/Main.html: Included DOMStorageIcons.css.
29016
290172011-12-24  Timothy Hatcher  <timothy@apple.com>
29018
29019        Add icons for databases and database tables.
29020
29021        Reviewed by Brian Weinstein.
29022
29023        * UserInterface/DatabaseHostTreeElement.css: Removed. Duplicates FolderIcon.css.
29024        * UserInterface/DatabaseHostTreeElement.js:
29025        (WebInspector.DatabaseHostTreeElement): Pass FolderIconStyleClassName.
29026        * UserInterface/DatabaseIcon.css: Added.
29027        (.database-icon .icon):
29028        * UserInterface/DatabaseTableIcon.css: Added.
29029        (.database-table-icon .icon):
29030        * UserInterface/DatabaseTableTreeElement.js:
29031        (WebInspector.DatabaseTableTreeElement): Pass class names to WebInspector.GeneralTreeElement.
29032        * UserInterface/DatabaseTreeElement.js:
29033        (WebInspector.DatabaseTreeElement): Don't inherit from FolderTreeElement. Pass class names
29034        to WebInspector.GeneralTreeElement.
29035        * UserInterface/Images/Database.png: Added.
29036        * UserInterface/Images/Database@2x.png: Added.
29037        * UserInterface/Images/DatabaseTable.png: Added.
29038        * UserInterface/Images/DatabaseTable@2x.png: Added.
29039        * UserInterface/Main.html: Included new files and removed DatabaseHostTreeElement.css.
29040        * UserInterface/StorageTreeElement.js:
29041        (WebInspector.StorageTreeElement): Remove a FIXME.
29042
290432011-12-24  Timothy Hatcher  <timothy@apple.com>
29044
29045        Add images for the Cookie icon.
29046
29047        Reviewed by Dan Bernstein.
29048
29049        * UserInterface/CookieIcon.css: Added.
29050        (.cookie-icon .icon):
29051        * UserInterface/CookieStorageTreeElement.js:
29052        (WebInspector.CookieStorageTreeElement):
29053        * UserInterface/Images/Cookie.png: Added.
29054        * UserInterface/Images/Cookie@2x.png: Added.
29055        * UserInterface/Main.html: Included CookieIcon.css.
29056
290572011-12-22  Timothy Hatcher  <timothy@apple.com>
29058
29059        Fix a couple of indentation problems in the Web Inspector.
29060
29061        Reviewed by John Sullivan.
29062
29063        * UserInterface/CookieStorageObject.js: Indent before constructor.
29064        * UserInterface/DatabaseHostTreeElement.js: Ditto.
29065
290662011-12-22  Timothy Hatcher  <timothy@apple.com>
29067
29068        Break out WebInspector.NavigationItem and its subclasses from NavigationBar.js and NavigationBar.css into separate files.
29069
29070        Rubber-stamped by John Sullivan.
29071
29072        * UserInterface/ButtonNavigationItem.css: Added.
29073        * UserInterface/ButtonNavigationItem.js: Added.
29074        * UserInterface/FlexibleSpaceNavigationItem.css: Added.
29075        * UserInterface/FlexibleSpaceNavigationItem.js: Added.
29076        * UserInterface/Main.html: Included new files.
29077        * UserInterface/NavigationBar.css: Moved "item" subclasses to seperate files.
29078        * UserInterface/NavigationBar.js: Moved NavigationItem and its subclasses to seperate files.
29079        * UserInterface/NavigationItem.js: Added.
29080        * UserInterface/RadioButtonNavigationItem.css: Added.
29081        * UserInterface/RadioButtonNavigationItem.js: Added.
29082
290832011-12-22  Timothy Hatcher  <timothy@apple.com>
29084
29085        Dynamically register the "mousemove" and "mouseup" event listeners in WebInspector.NavigationBar
29086        so they are not allways listening.
29087
29088        Reviewed by Darin Adler.
29089
29090        * UserInterface/NavigationBar.js:
29091        (WebInspector.NavigationBar): Remove the static "mousemove" and "mouseup" event listeners.
29092        (WebInspector.NavigationBar.prototype._mouseDown): Install the "mousemove" and "mouseup" event listeners
29093        when a WebInspector.RadioButtonNavigationItem is hit.
29094        (WebInspector.NavigationBar.prototype._mouseMoved): Assert the mouse is down now that we register dynamically.
29095        (WebInspector.NavigationBar.prototype._mouseUp): Ditto. Remove the "mousemove" and "mouseup" event listeners.
29096
290972011-12-22  Timothy Hatcher  <timothy@apple.com>
29098
29099        Change WebInspector.NavigationBar.NavigationItemSelectedEventName to WebInspector.NavigationBar.Event.NavigationItemSelected.
29100
29101        This beings WebInspector.NavigationBar in-line with all the other classes in how the event names are defined.
29102
29103        Reviewed by Darin Adler.
29104
29105        * UserInterface/NavigationBar.js:
29106        (WebInspector.NavigationBar.prototype.set selectedNavigationItem): Use WebInspector.NavigationBar.Event.NavigationItemSelected.
29107        (WebInspector.NavigationBar.prototype._mouseUp): Ditto.
29108        * UserInterface/Sidebar.js:
29109        (WebInspector.Sidebar): Use WebInspector.NavigationBar.Event.NavigationItemSelected.
29110
291112011-12-22  Timothy Hatcher  <timothy@apple.com>
29112
29113        Properly define the SidebarPanelSelected event in WebInspector.Sidebar.
29114
29115        Reviewed by John Sullivan.
29116
29117        * UserInterface/Sidebar.js:
29118        (WebInspector.Sidebar.Event): Added.
29119        (WebInspector.Sidebar.Event.SidebarPanelSelected): Added.
29120        (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Use WebInspector.Sidebar.Event.SidebarPanelSelected
29121        instead of the never defined WebInspector.Sidebar.SidebarPanelSelectedEventName.
29122
291232011-12-22  Timothy Hatcher  <timothy@apple.com>
29124
29125        Break out the SidebarPanel class into a separate file and make it correctly inherit from WebInspector.Object.
29126
29127        Reviewed by John Sullivan.
29128
29129        * UserInterface/Main.html: Included SidebarPanel.js.
29130        * UserInterface/Sidebar.js: Moved WebInspector.SidebarPanel and WebInspector.SidebarPanel.prototype from here...
29131        * UserInterface/SidebarPanel.js: Added. ...to here. Also fixed the prototype chain to make SidebarPanel inherit
29132        from WebInspector.Object like it should have been.
29133
291342011-12-22  Timothy Hatcher  <timothy@apple.com>
29135
29136        Fix an incorrect use of typeof in the Web Inspector by using instanceof instead.
29137
29138        Reviewed by Adam Roben.
29139
29140        * UserInterface/NavigationSidebarPanel.js:
29141        (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter): Use instanceof
29142        instead of typeof to check if the input is an array.
29143
291442011-12-22  Timothy Hatcher  <timothy@apple.com>
29145
29146        Make the CSS used for folder and resource icons generic so it can be used by the quick navigation bar.
29147
29148        Reviewed by Darin Adler.
29149
29150        * UserInterface/FolderIcon.css: Renamed from Safari/Develop/WebInspector/FolderTreeElement.css.
29151        Replaced "folder-tree-element" with "folder-icon".
29152        * UserInterface/FolderTreeElement.js:
29153        (WebInspector.FolderTreeElement): Add the "folder-icon" class.
29154        * UserInterface/Main.html:
29155        * UserInterface/ResourceIcons.css: Renamed from Safari/Develop/WebInspector/ResourceTreeElement.css.
29156        Replaced "resource-tree-element" with "resource-icon".
29157        * UserInterface/ResourceTreeElement.js:
29158        (WebInspector.ResourceTreeElement): Add the "resource-icon" class.
29159
291602011-12-22  Timothy Hatcher  <timothy@apple.com>
29161
29162        Make identifier optional in the base class of WebInspector.NavigationItem but required for WebInspector.ButtonNavigationItem.
29163
29164        Reviewed by Darin Adler.
29165
29166        * UserInterface/NavigationBar.js:
29167        (WebInspector.NavigationItem): Remove assert for identifier and added "|| null" to the assignment.
29168        (WebInspector.NavigationItem.prototype.get _classNames): Null check identifier and add it separately.
29169        (WebInspector.ButtonNavigationItem): Added assert for identifier.
29170        (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Don't pass the identifier to _canvasIdentifier.
29171        (WebInspector.ButtonNavigationItem.StyleClassName._canvasIdentifier): Don't take the identifier as an argument, use this.identifier.
29172        (WebInspector.ButtonNavigationItem.prototype._generateImages._createEmbossedCanvasImage): Don't pass the identifier to _canvasIdentifier.
29173        (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Ditto.
29174
291752011-12-20  Timothy Hatcher  <timothy@apple.com>
29176
29177        Show a content view for XHR resources in the new Web Inspector.
29178
29179        Reviewed by Adam Roben.
29180
29181        * UserInterface/ResourceContentView.js:
29182        (WebInspector.ResourceContentView): Add a case for WebInspector.Resource.Type.XHR.
29183
291842011-12-19  Brian Weinstein  <bweinstein@apple.com>
29185
29186        More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
29187
29188        When inserting items into the Storage sidebar, insert them in alphabetical order by main title so
29189        it is easier for the user to navigate.
29190
29191        Reviewed by Tim Hatcher.
29192
29193        * UserInterface/StorageSidebarPanel.js:
29194        (WebInspector.StorageSidebarPanel.prototype._compareTreeElementsByMainTitle):
29195        (WebInspector.StorageSidebarPanel.prototype._addChild):
29196
291972011-12-18  Timothy Hatcher  <timothy@apple.com>
29198
29199        Only fire the WebInspector.SyntaxHighlighter.Event.HighlightsDidChange event for whole lines.
29200
29201        Firing the event for partial lines causes too much DOM churn on large, single-line files.
29202
29203        Reviewed by Joseph Pecoraro.
29204
29205        * UserInterface/SyntaxHighlighter.js:
29206        (WebInspector.SyntaxHighlighter.prototype._highlightNextChunk): Update actualStopLine after the
29207        current line has completely finished. Don't fire the event if actualStopLine is still null.
29208
292092011-12-18  Timothy Hatcher  <timothy@apple.com>
29210
29211        Start and stop syntax highlighting when a TextEditor is shown and hidden. This reduces the chance
29212        of multiple TextEditors highlighting at the same time.
29213
29214        Reviewed by Joseph Pecoraro.
29215
29216        * UserInterface/TextEditor.js:
29217        (WebInspector.TextEditor.prototype.shown): Added. Call startHighlighting and updateLayout.
29218        (WebInspector.TextEditor.prototype.hidden): Added. Call stopHighlighting.
29219        * UserInterface/TextResourceContentView.js:
29220        (WebInspector.TextResourceContentView.prototype.shown): Call TextEditor.shown instead of updateLayout.
29221        (WebInspector.TextResourceContentView.prototype.hidden): Added. Call TextEditor.hidden.
29222
292232011-12-18  Timothy Hatcher  <timothy@apple.com>
29224
29225        Use a synthetic MIME-type to select the syntax highlighter's tokenizer. Resources are often
29226        transferred with a MIME-type that doesn't match the purpose the resource was loaded for.
29227
29228        Reviewed by Joseph Pecoraro.
29229
29230        * UserInterface/Resource.js:
29231        (WebInspector.Resource.prototype.get syntheticMIMEType): Added.
29232        * UserInterface/TextResourceContentView.js:
29233        (WebInspector.TextResourceContentView.prototype.contentAvailable): Use syntheticMIMEType.
29234
292352011-12-18  Timothy Hatcher  <timothy@apple.com>
29236
29237        Intercept link clicks in the Web Inspector and try to show the appropriate resource,
29238        otherwise fallback to opening the URL in a new tab/window.
29239
29240        Reviewed by Joseph Pecoraro.
29241
29242        * UserInterface/Frame.js:
29243        (WebInspector.Frame.prototype.resourceForURL): Added argument to recursively search child frames.
29244        * UserInterface/Main.js:
29245        (WebInspector.contentLoaded): Add click event listener.
29246        (WebInspector.openURL): Added.
29247        (WebInspector._mouseWasClicked): Added. Catch unhandled link clicks, cancel them and log and error.
29248        * UserInterface/ResourceContentView.js:
29249        (WebInspector.ResourceContentView): Added click event listener.
29250        (WebInspector.ResourceContentView.prototype._mouseWasClicked): Added. Call WebInspector.openURL.
29251        * UserInterface/Utilities.js:
29252        (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Copied from WebCore/inspector/front-end/utilities.js.
29253        (Node.prototype.enclosingNodeOrSelfWithNodeName): Copied from WebCore/inspector/front-end/utilities.js.
29254
292552011-12-18  Timothy Hatcher  <timothy@apple.com>
29256
29257        Make links in TextEditor be only absolute URLs. Otherwise relative URLs are resolved
29258        against the Web Inspector as a base URL.
29259
29260        Reviewed by Joseph Pecoraro.
29261
29262        * UserInterface/TextEditor.js:
29263        (WebInspector.TextEditor): Set _delegate to null.
29264        (WebInspector.TextEditor.prototype.get delegate): Added.
29265        (WebInspector.TextEditor.prototype.set delegate): Added.
29266        (WebInspector.TextEditor.prototype._reset): Pass this when making a TextEditorTextChunk.
29267        (WebInspector.TextEditor.prototype._breakTextChunkAtIndexIntoSingleLineTextChunks): Ditto.
29268        (WebInspector.TextEditor.prototype._consolidateSingleLineTextChunks): Ditto.
29269        (WebInspector.TextEditorTextChunk): Added textEditor argument.
29270        (WebInspector.TextEditorTextChunk.prototype.updateContent.createTokenElement): Ask the TextEditor
29271        delegate for the baseURL and use absoluteURL when assigning the href for links.
29272        * UserInterface/TextResourceContentView.js:
29273        (WebInspector.TextResourceContentView): Set the TextEditor delegate to this.
29274        (WebInspector.TextResourceContentView.prototype.textEditorBaseURL): Added. Returns the resource's URL.
29275        * UserInterface/Utilities.js:
29276        (parseURL): Trim whitespace from the URL.
29277        (absoluteURL): Added.
29278
292792011-12-18  Timothy Hatcher  <timothy@apple.com>
29280
29281        Workaround a weird and random JavaScript bug that causes the wrong 'this' object when filtering
29282        the resource sidebar quickly.
29283
29284        The bug is tracked by: https://webkit.org/b/74811
29285
29286        Reviewed by Dan Bernstein.
29287
29288        * UserInterface/TreeOutline.js:
29289        (TreeElement.prototype.traverseNextTreeElement): Use call to always get the right 'this' object.
29290
292912011-12-18  Timothy Hatcher  <timothy@apple.com>
29292
29293        Reduce the number of updates when setting the string of a WebInspector.TextEditor.
29294
29295        Invalidating the syntax highlighter causes HighlightsDidChange events to fire and update the text
29296        chunks. We can ignore those events because _reset will completely rebuild the text chunks anyway.
29297
29298        Reviewed by Dan Bernstein.
29299
29300        * UserInterface/TextEditor.js:
29301        (WebInspector.TextEditor.prototype.set textContent): Set _ignoreHighlightChanges to true.
29302        (WebInspector.TextEditor.prototype.set string): Ditto.
29303        (WebInspector.TextEditor.prototype._reset): Reset _ignoreHighlightChanges back to false.
29304        (WebInspector.TextEditor.prototype._highlightsChanged): Return early if _ignoreHighlightChanges is true.
29305
293062011-12-18  Timothy Hatcher  <timothy@apple.com>
29307
29308        Improve a workaround and get the clientHeight of the correct element in WebInspector.TextEditor.
29309
29310        The bug this is working around is tracked by: https://webkit.org/b/74812
29311
29312        Reviewed by Dan Bernstein.
29313
29314        * UserInterface/TextEditor.css:
29315        (.text-editor > .content-container): Set height to 100%. It isn't clear why we should need to set
29316        the height here, but without this the element collapses sometimes when it should have a height.
29317        * UserInterface/TextEditor.js:
29318        (WebInspector.TextEditor.prototype._consolidateSingleLineTextChunks): Get clientHeight from _contentContainerElement.
29319        (WebInspector.TextEditor.prototype._firstVisibleTextChunkIndex): Ditto.
29320
293212011-12-17  Timothy Hatcher  <timothy@apple.com>
29322
29323        Don't show visited links in the Web Inspector.
29324
29325        Removed the :link pseudo class so visited links are styled the same.
29326
29327        Reviewed by Dan Bernstein.
29328
29329        * UserInterface/TextEditorDefaultTheme.css:
29330        (.text-editor a):
29331        (.text-editor a:hover):
29332
293332011-12-17  Timothy Hatcher  <timothy@apple.com>
29334
29335        Allow clicking the selected resource again to show the content view if another content view
29336        has been shown since the resource was last selected. This matches Xcode.
29337
29338        Reviewed by Dan Bernstein.
29339
29340        * UserInterface/ResourceSidebarPanel.js:
29341        (WebInspector.ResourceSidebarPanel):
29342        * UserInterface/TreeOutline.js:
29343        (TreeOutline): Set allowsRepeatSelection to false.
29344        (TreeElement.prototype.select): Refactored so that when allowsRepeatSelection is true the
29345        onselect functions are called still.
29346
293472011-12-17  Timothy Hatcher  <timothy@apple.com>
29348
29349        Don't attempt to create a tokenizer for "text/plain" resources.
29350
29351        Reviewed by Dan Bernstein.
29352
29353        * UserInterface/SourceTokenizer.js:
29354        (WebInspector.SourceTokenizer): Return null for a MIME-type of "text/plain".
29355
293562011-12-17  Timothy Hatcher  <timothy@apple.com>
29357
29358        Collapse the details sidebar by default. It is empty right now, so there is no reason
29359        to show it until we have some sidebar panels to show.
29360
29361        Reviewed by Dan Bernstein.
29362
29363        * UserInterface/Main.js:
29364        (WebInspector.contentLoaded): Set this.detailsSidebar.collapsed to true.
29365
293662011-12-16  Timothy Hatcher  <timothy@apple.com>
29367
29368        Set the Web Inspector window title and update it when the main frame navigates.
29369
29370        Reviewed by Dan Bernstein.
29371
29372        * UserInterface/Main.js:
29373        (WebInspector.contentLoaded): Added event listeners for changes on the main frame.
29374        (WebInspector.updateWindowTitle): Added. Build a title based on the URL components.
29375        (WebInspector._mainFrameDidChange): Added. Call updateWindowTitle.
29376        (WebInspector._mainResourceDidChange): Added. Call updateWindowTitle if this is the main frame.
29377
293782011-12-16  Timothy Hatcher  <timothy@apple.com>
29379
29380        Force tabs to be 4 spaces wide in the new Web Inspector instead of the default 8 spaces wide.
29381
29382        This is done via the syntax highlighter, which tokenizes the tabs to be styled as inline-blocks
29383        with a width equal to 4 spaces each.
29384
29385        Reviewed by John Sullivan.
29386
29387        * UserInterface/SyntaxHighlighter.js:
29388        (WebInspector.SyntaxHighlighter.CharacterTokens): Added \t.
29389        * UserInterface/TextEditor.js:
29390        (WebInspector.TextEditorTextChunk.prototype.updateContent.createTokenElement): Handle the "tab"
29391        token type by creating a span per tab.
29392        * UserInterface/TextEditorDefaultTheme.css:
29393        (.text-editor .tab): Added. Inline-block with a width equal to 4 spaces.
29394
293952011-12-16  Timothy Hatcher  <timothy@apple.com>
29396
29397        Implement WebInspector.TextResourceContentView.
29398
29399        Create a TextEditor that fills the view and displays the text content of the resource.
29400
29401        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
29402
29403        Reviewed by John Sullivan.
29404
29405        * UserInterface/Main.html: Include TextResourceContentView.css.
29406        * UserInterface/TextResourceContentView.css: Added.
29407        (.content-view.resource.text > .text-editor):
29408        * UserInterface/TextResourceContentView.js:
29409        (WebInspector.TextResourceContentView): Create a TextEditor.
29410        (WebInspector.TextResourceContentView.prototype.get textEditor): Added.
29411        (WebInspector.TextResourceContentView.prototype.contentAvailable): Added. Populate the TextEditor
29412        with content and set the MIME-type.
29413
294142011-12-16  Timothy Hatcher  <timothy@apple.com>
29415
29416        Add the line number gutter to WebInspector.TextEditor.
29417
29418        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
29419
29420        Reviewed by Brian Weinstein.
29421
29422        * UserInterface/TextEditor.css:
29423        (.text-editor > .gutter): Added.
29424        (.text-editor > .gutter > .line-number): Added.
29425        (.text-editor > .gutter > .line-number.maximum): Added.
29426        (.text-editor > .gutter > .line-number.hidden): Added.
29427        * UserInterface/TextEditor.js:
29428        (WebInspector.TextEditor): Create the _gutterElement.
29429        (WebInspector.TextEditor.prototype._reset): Call _updateLineNumbers.
29430        (WebInspector.TextEditor.prototype._scrollPositionChanged): Ditto.
29431        (WebInspector.TextEditor.prototype._updateLineNumbers): Added.
29432
294332011-12-16  Timothy Hatcher  <timothy@apple.com>
29434
29435        Syntax highlight the content of WebInspector.TextEditor.
29436
29437        Only single line text chunks are rendered with syntax highlighting, which are the the text chunks
29438        that are near the visible scroll range of the text editor.
29439
29440        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
29441
29442        Reviewed by Brian Weinstein.
29443
29444        * UserInterface/SyntaxHighlighter.js:
29445        (WebInspector.SyntaxHighlighter.prototype.invalidate): Dispatch the HighlightsDidChange event.
29446        (WebInspector.SyntaxHighlighter.prototype._highlightNextChunk): Ditto.
29447        * UserInterface/TextEditor.js:
29448        (WebInspector.TextEditor): Create a WebInspector.SyntaxHighlighter and listen for the HighlightsDidChange event.
29449        (WebInspector.TextEditor.prototype.set textContent): Set the SyntaxHighlighter textContent.
29450        (WebInspector.TextEditor.prototype.set string): Invalidate the SyntaxHighlighter.
29451        (WebInspector.TextEditor.prototype.get mimeType): Added.
29452        (WebInspector.TextEditor.prototype.set mimeType): Added.
29453        (WebInspector.TextEditor.prototype._reset): Stop highlighting and start again.
29454        (WebInspector.TextEditor.prototype._scrollPositionChanged): Do a sync highlight.
29455        (WebInspector.TextEditor.prototype._scrollingDidStop): Start highlighting.
29456        (WebInspector.TextEditor.prototype._highlightsChanged): Update single line text chunks.
29457        (WebInspector.TextEditor.prototype._textChunkIndexForLine): Added.
29458        (WebInspector.TextEditor.prototype._textChunkForLine): Added.
29459        (WebInspector.TextEditorTextChunk.prototype.updateContent.createTokenElement): Added.
29460        (WebInspector.TextEditorTextChunk.prototype.updateContent.appendText): Added.
29461        (WebInspector.TextEditorTextChunk.prototype.updateContent): Enumerate the syntax highlighting tokens when there is only one line.
29462        * UserInterface/TextEditorDefaultTheme.css: Added.
29463        (.text-editor > .content-container):
29464        (.text-editor .css-comment):
29465        (.text-editor .css-keyword):
29466        (.text-editor .css-number):
29467        (.text-editor .css-at-rule):
29468        (.text-editor .css-selector):
29469        (.text-editor .css-important):
29470        (.text-editor .javascript-comment):
29471        (.text-editor .javascript-keyword):
29472        (.text-editor .javascript-number):
29473        (.text-editor .javascript-regexp):
29474        (.text-editor .javascript-ident):
29475        (.text-editor .html-comment):
29476        (.text-editor .html-tag):
29477        (.text-editor .html-doctype):
29478        (.text-editor .html-attribute-name):
29479        (.text-editor .html-attribute-value):
29480        (.text-editor a:link):
29481        (.text-editor a:link:hover):
29482
294832011-12-16  Timothy Hatcher  <timothy@apple.com>
29484
29485        Break up text chunks into single lines when they are visible, and consolidate them again
29486        when they are not visible after scrolling.
29487
29488        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
29489
29490        Reviewed by Brian Weinstein.
29491
29492        * UserInterface/TextEditor.js:
29493        (WebInspector.TextEditor): Add scroll event listener.
29494        (WebInspector.TextEditor.prototype._reset): Call _breakVisibleTextChunksIntoSingleLineTextChunks.
29495        (WebInspector.TextEditor.prototype._scrollPositionChanged): Added. Schedule timeout for _scrollingDidStop.
29496        Call _breakVisibleTextChunksIntoSingleLineTextChunks.
29497        (WebInspector.TextEditor.prototype._scrollingDidStop): Added. Call _consolidateHiddenSingleLineTextChunksIfNeeded.
29498        (WebInspector.TextEditor.prototype._breakTextChunkAtIndexIntoSingleLineTextChunks): Added.
29499        (WebInspector.TextEditor.prototype._breakVisibleTextChunksIntoSingleLineTextChunks): Added.
29500        (WebInspector.TextEditor.prototype._consolidateHiddenSingleLineTextChunksIfNeeded): Added.
29501        (WebInspector.TextEditor.prototype._consolidateHiddenSingleLineTextChunks): Added.
29502        (WebInspector.TextEditor.prototype._consolidateSingleLineTextChunks): Added.
29503        (WebInspector.TextEditor.prototype._firstVisibleTextChunkIndex.compareTopOffsets): Added.
29504        (WebInspector.TextEditor.prototype._firstVisibleTextChunkIndex): Added.
29505        (WebInspector.TextEditor.prototype._rangeOfVisibleTextChunks): Added.
29506        (WebInspector.TextEditor.prototype._lastLineNumberOfLastVisibleTextChunk): Added.
29507
295082011-12-16  Timothy Hatcher  <timothy@apple.com>
29509
29510        Add WebInspector.TextEditor which is the view for WebInspector.TextContent.
29511
29512        Right now it only shows plain-text. In the end it will support syntax highlighting and editing.
29513
29514        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
29515
29516        Reviewed by Joseph Pecoraro.
29517
29518        * UserInterface/TextEditor.css: Added.
29519        (.text-editor):
29520        (.text-editor > .content-container):
29521        (.text-editor > .content-container > .content):
29522        * UserInterface/TextEditor.js: Added.
29523        (WebInspector.TextEditor):
29524        (WebInspector.TextEditor.prototype.get element):
29525        (WebInspector.TextEditor.prototype.get textContent):
29526        (WebInspector.TextEditor.prototype.set textContent):
29527        (WebInspector.TextEditor.prototype.get string):
29528        (WebInspector.TextEditor.prototype.set string):
29529        (WebInspector.TextEditor.prototype._reset):
29530        (WebInspector.TextEditorTextChunk):
29531        (WebInspector.TextEditorTextChunk.prototype.constructor.WebInspector.TextEditorChunk.get element):
29532        (WebInspector.TextEditorTextChunk.prototype.get firstLineNumber):
29533        (WebInspector.TextEditorTextChunk.prototype.get lastLineNumber):
29534        (WebInspector.TextEditorTextChunk.prototype.get numberOfLines):
29535        (WebInspector.TextEditorTextChunk.prototype.get offsetTop):
29536        (WebInspector.TextEditorTextChunk.prototype.updateContent):
29537
295382011-12-16  Timothy Hatcher  <timothy@apple.com>
29539
29540        Add WebInspector.SyntaxHighlighter which uses SourceTokenizer, TextContent and AttributedString.
29541
29542        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
29543
29544        Reviewed by Joseph Pecoraro.
29545
29546        * UserInterface/SyntaxHighlighter.js: Added.
29547        (WebInspector.SyntaxHighlighter):
29548        (WebInspector.SyntaxHighlighter.prototype.get textContent):
29549        (WebInspector.SyntaxHighlighter.prototype.set textContent):
29550        (WebInspector.SyntaxHighlighter.prototype.get mimeType):
29551        (WebInspector.SyntaxHighlighter.prototype.set mimeType):
29552        (WebInspector.SyntaxHighlighter.prototype.invalidate):
29553        (WebInspector.SyntaxHighlighter.prototype.isHighlighting):
29554        (WebInspector.SyntaxHighlighter.prototype.synchronousHighlight):
29555        (WebInspector.SyntaxHighlighter.prototype.startHighlighting):
29556        (WebInspector.SyntaxHighlighter.prototype.stopHighlighting):
29557        (WebInspector.SyntaxHighlighter.prototype._highlightNextChunk):
29558        (WebInspector.SyntaxHighlighter.prototype._highlightNextChunk.copyState):
29559
295602011-12-16  Timothy Hatcher  <timothy@apple.com>
29561
29562        Add WebInspector.TextContent which will be used for multi-line text, like resources.
29563
29564        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
29565
29566        Reviewed by Joseph Pecoraro.
29567
29568        * UserInterface/TextContent.js: Added.
29569        (WebInspector.TextContent):
29570        (WebInspector.TextContent.prototype.toString):
29571        (WebInspector.TextContent.prototype.get string):
29572        (WebInspector.TextContent.prototype.set string.createAttributedString):
29573        (WebInspector.TextContent.prototype.set string):
29574        (WebInspector.TextContent.prototype.get length):
29575        (WebInspector.TextContent.prototype.get lineBreakString):
29576        (WebInspector.TextContent.prototype.set lineBreakString):
29577        (WebInspector.TextContent.prototype.get lines):
29578        (WebInspector.TextContent.prototype.get numberOfLines):
29579        (WebInspector.TextContent.prototype.line):
29580        (WebInspector.TextContent.prototype.attributesForLine):
29581        (WebInspector.TextContent.prototype.attributeForLine):
29582        (WebInspector.TextContent.prototype.setAttributeForLine):
29583        (WebInspector.TextContent.prototype.removeAttributeFromLine):
29584        (WebInspector.TextContent.prototype.removeAttributesFromLine):
29585
295862011-12-16  Timothy Hatcher  <timothy@apple.com>
29587
29588        Add WebInspector.AttributedString which will be used for syntax highlighted text.
29589
29590        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
29591
29592        Reviewed by Joseph Pecoraro.
29593
29594        * UserInterface/AttributedString.js: Added.
29595        (WebInspector.AttributedString):
29596        (WebInspector.AttributedString.prototype.toString):
29597        (WebInspector.AttributedString.prototype.get string):
29598        (WebInspector.AttributedString.prototype.enumerateAttributes):
29599        (WebInspector.AttributedString.prototype.enumerateAttribute):
29600        (WebInspector.AttributedString.prototype.attributesAtOffset):
29601        (WebInspector.AttributedString.prototype.attributeAtOffset):
29602        (WebInspector.AttributedString.prototype.setAttribute):
29603        (WebInspector.AttributedString.prototype.removeAttribute.processAttributes):
29604        (WebInspector.AttributedString.prototype.removeAttribute):
29605        (WebInspector.AttributedString.prototype.removeAttributes):
29606        * UserInterface/Utilities.js:
29607        (Object.shallowCopy): Added. Helper for making a new object with the same top-level properties.
29608        (Object.shallowEqual): Added. Helper for checking if two objects have the same top-level properties.
29609
296102011-12-16  Timothy Hatcher  <timothy@apple.com>
29611
29612        Add tokenizers and support files needed for syntax highlighting.
29613
29614        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
29615
29616        Rubber-stamped by Joseph Pecoraro.
29617
29618        * UserInterface/CSSCompletions.js: Copied from WebCore/inspector/front-end/CSSCompletions.js.
29619        * UserInterface/CSSKeywordCompletions.js: Copied from WebCore/inspector/front-end/CSSCompletions.js.
29620        * UserInterface/CSSSourceTokenizer.js: Copied from WebCore/inspector/front-end/SourceCSSTokenizer.js.
29621        * UserInterface/HTMLSourceTokenizer.js: Copied from WebCore/inspector/front-end/SourceHTMLTokenizer.js.
29622        * UserInterface/JavaScriptSourceTokenizer.js: Copied from WebCore/inspector/front-end/SourceJavaScriptTokenizer.js.
29623        * UserInterface/Utilities.js:
29624        (Array.keySet): Added.
29625
296262011-12-16  Timothy Hatcher  <timothy@apple.com>
29627
29628        Add WebInspector.SourceTokenizer abstract base class.
29629
29630        This is the base class for HTMLSourceTokenizer, JavaScriptSourceTokenizer and CSSSourceTokenizer.
29631
29632        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
29633
29634        Reviewed by Jessie Berlin.
29635
29636        * UserInterface/SourceTokenizer.js: Added.
29637        (WebInspector.SourceTokenizer):
29638        (WebInspector.SourceTokenizer.prototype.initialize):
29639        (WebInspector.SourceTokenizer.prototype.set line):
29640        (WebInspector.SourceTokenizer.prototype.get condition):
29641        (WebInspector.SourceTokenizer.prototype.set condition):
29642        (WebInspector.SourceTokenizer.prototype.createInitialCondition):
29643        (WebInspector.SourceTokenizer.prototype.nextToken):
29644        (WebInspector.SourceTokenizer.prototype._charAt):
29645
296462011-12-16  Timothy Hatcher  <timothy@apple.com>
29647
29648        Remove the cached ContentView from the represented object when the ContentView is closed.
29649
29650        This allows the ContentView to be garbage collected if the represented object stays around.
29651
29652        Reviewed by Brian Weinstein.
29653
29654        * UserInterface/ContentView.js:
29655        (WebInspector.ContentView): Set _representedObject.
29656        (WebInspector.ContentView.prototype.get representedObject): Added.
29657        * UserInterface/ContentViewContainer.js:
29658        (WebInspector.ContentViewContainer.prototype.contentViewForRepresentedObject):
29659        (WebInspector.ContentViewContainer.prototype.showContentView): Use _disassociateFromContentView
29660        (WebInspector.ContentViewContainer.prototype.replaceContentView): Ditto.
29661        (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Ditto.
29662        (WebInspector.ContentViewContainer.prototype.closeAllContentViews): Ditto.
29663        (WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Added.
29664        * UserInterface/ResourceContentView.js:
29665        (WebInspector.ResourceContentView): Pass resource to ContentView as the representedObject.
29666
296672011-12-16  Timothy Hatcher  <timothy@apple.com>
29668
29669        Don't support creating a WebInspector.ResourceContentView from a WebInspector.Frame.
29670
29671        Since the main frame stays the same between navigations and ContentViewContainer caches
29672        the ContentView on the Frame, the ContentView is not being recreated for the new page.
29673
29674        Reviewed by Brian Weinstein.
29675
29676        * UserInterface/ContentView.js:
29677        (WebInspector.ContentView): Remove the check for WebInspector.Frame as a representedObject.
29678        * UserInterface/ResourceSidebarPanel.js:
29679        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Select the
29680        main resource of the main frame.
29681        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Pass the resource.
29682
296832011-12-16  Timothy Hatcher  <timothy@apple.com>
29684
29685        Mark the main resource of frames as finished when the resource tree is pulled the first time.
29686        Also delay marking resources as finished until they have a parent frame.
29687
29688        This is needed to show content for a selected frame, otherwise the content view is blank.
29689
29690        Reviewed by Brian Weinstein.
29691
29692        * UserInterface/FrameResourceManager.js:
29693        (WebInspector.FrameResourceManager.prototype._createFrame): Call markAsFinished on the mainResource.
29694        (WebInspector.FrameResourceManager.prototype._createResource): Move the call to markAsFinished from here...
29695        (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): ...to here.
29696
296972011-12-15  Brian Weinstein  <bweinstein@apple.com>
29698
29699        More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
29700
29701        Add Database tables to the storage sidebar panel. When a database needs to be populated, we ask
29702        for the database's table names asynchronously. In the callback we create DatabaseTableObjects
29703        and DatabaseTableTreeElements for all of the table names that the database has, and add the
29704        the DatabaseTableTreeElements as children of the DatabaseTreeElement.
29705
29706        Reviewed by Tim Hatcher.
29707
29708        * UserInterface/DatabaseObject.js:
29709        (WebInspector.DatabaseObject.prototype.getTableNames): Calls into WebCore to get the database's table names,
29710            and sorts them.
29711        * UserInterface/DatabaseTableObject.js: Added.
29712        (WebInspector.DatabaseTableObject):
29713        (WebInspector.DatabaseTableObject.prototype.constructor.WebInspector.DatabaseTableObject.get name): Returns the name.
29714        (WebInspector.DatabaseTableObject.prototype.get database): Returns the databaseObject.
29715        * UserInterface/DatabaseTableTreeElement.js: Added.
29716        (WebInspector.DatabaseTableTreeElement):
29717        * UserInterface/DatabaseTreeElement.js:
29718        (WebInspector.DatabaseTreeElement.prototype.constructor.WebInspector.DatabaseTreeElement.oncollapse): Set a flag so that we
29719            repopulate the children when the tree element is re-expanded.
29720        (WebInspector.DatabaseTreeElement.prototype.onpopulate.tableNamesCallback): Create DatabaseTableObjects and DatabaseTableTreeElements
29721            for each of the table names.
29722        (WebInspector.DatabaseTreeElement.prototype.onpopulate): Ask the DatabaseObject for its list of table names.
29723        * UserInterface/Main.html: Add new files.
29724
297252011-12-14  Brian Weinstein  <bweinstein@apple.com>
29726
29727        Some cleanup after r39488.
29728
29729        Don't use FolderTreeElement's style in DatabaseHostTreeElement (because DatabaseHostTreeElement isn't a FolderTreeElement).
29730
29731        Instead, create a new css file and configure DatabaseHostTreeElement to show a folder.
29732
29733        Reviewed by Tim Hatcher.
29734
29735        * UserInterface/DatabaseHostTreeElement.css: Added.
29736        (.database-host-tree-element .icon):
29737        * UserInterface/DatabaseHostTreeElement.js:
29738        (WebInspector.DatabaseHostTreeElement):
29739        * UserInterface/Main.html:
29740
297412011-12-13  Brian Weinstein  <bweinstein@apple.com>
29742
29743        More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
29744
29745        Add Databases to the storage sidebar panel. This patch adds two new classes of tree elements - a DatabaseHostTreeElement,
29746        which represents a host that has at least one database, and a DatabaseTreeElement, which eventually will have tables.
29747
29748        We use the same collapsing logic for databases that we use for cookies and DOM Storage. With one domain,
29749        it will say:
29750
29751        Database - Domain
29752            Name 1
29753            Name 2
29754
29755        With multiple domains, it will say:
29756
29757        Databases
29758            Domain 1
29759                Name 1
29760                Name 2
29761            Domain 2
29762                Name 3
29763                Name 4
29764
29765        Reviewed by Tim Hatcher.
29766
29767        * UserInterface/DatabaseObject.js: Added.
29768        (WebInspector.DatabaseObject):
29769        (WebInspector.DatabaseObject.prototype.constructor.WebInspector.DatabaseObject.get id): Returns the id.
29770        (WebInspector.DatabaseObject.prototype.get host): Returns the host.
29771        (WebInspector.DatabaseObject.prototype.get name): Returns the name.
29772        (WebInspector.DatabaseObject.prototype.get version): Returns the version.
29773        * UserInterface/DatabaseObserver.js:
29774        (WebInspector.DatabaseObserver.prototype.constructor.WebInspector.DatabaseObserver.addDatabase): Tell the StorageManager
29775            a database was added.
29776        * UserInterface/DatabaseTreeElement.js: Added.
29777        (WebInspector.DatabaseTreeElement):
29778        (WebInspector.DatabaseTreeElement.prototype.constructor.WebInspector.DatabaseTreeElement.get name): Initialize the FolderTreeElement.
29779        * UserInterface/DatabaseHostTreeElement.js: Added.
29780        * UserInterface/Main.html:
29781        * UserInterface/StorageManager.js:
29782        (WebInspector.StorageManager):
29783        (WebInspector.StorageManager.prototype.constructor.WebInspector.StorageManager.initialize): Initialize a list of databases.
29784        (WebInspector.StorageManager.prototype.databaseWasAdded): Create a DatabaseObject and tell the StorageSidebarPanel we added
29785            a database.
29786        * UserInterface/StorageSidebarPanel.js:
29787        (WebInspector.StorageSidebarPanel):
29788        (WebInspector.StorageSidebarPanel.prototype._databaseWasAdded): Create a DatabaseTreeElement and add it to the sidebar.
29789        (WebInspector.StorageSidebarPanel.prototype._storageCleared): Clear the root database tree element.
29790
297912011-12-09  Brian Weinstein  <bweinstein@apple.com>
29792
29793        More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
29794
29795        Add Cookies to the Storage sidebar panel. Add a listener for when a cookie storage object is added,
29796        and add it to the sidebar.
29797
29798        Reviewed by Tim Hatcher.
29799
29800        * UserInterface/StorageSidebarPanel.js:
29801        (WebInspector.StorageSidebarPanel):
29802        (WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded): Remove some dead code.
29803        (WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded): Add a child to the storage sidebar.
29804        (WebInspector.StorageSidebarPanel.prototype._addChild): Change the class that we are expecting to a StorageTreeElement, because it can be
29805            either a DOMStorageTreeElement or a CookieStorageTreeElement, but both are StorageTreeElements.
29806        (WebInspector.StorageSidebarPanel.prototype._storageCleared):
29807
298082011-12-09  Brian Weinstein  <bweinstein@apple.com>
29809
29810        More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
29811
29812        Add CookieStorageTreeElement, and refactor DOMStorageTreeElement into StorageTreeElement so the code to handle
29813        flattening of the folders can be shared between CookieStorageTreeElement, DOMStorageTreeElement, and the others
29814        that we will add in the future.
29815
29816        Reviewed by Tim Hatcher.
29817
29818        * UserInterface/CookieStorageTreeElement.js: Added.
29819        (WebInspector.CookieStorageTreeElement): Call
29820        (WebInspector.CookieStorageTreeElement.prototype.constructor.WebInspector.CookieStorageTreeElement.name): Return the host of the CookieStorageObject.
29821        (WebInspector.CookieStorageTreeElement.prototype.category): Return "Cookies".
29822        * UserInterface/DOMStorageTreeElement.js:
29823        (WebInspector.DOMStorageTreeElement):
29824        (WebInspector.DOMStorageTreeElement.prototype.constructor.WebInspector.DOMStorageTreeElement.name): Return the host of the DOMStorageObject.
29825        (WebInspector.DOMStorageTreeElement.prototype.category): Return "Local Storage" or "Session Storage".
29826        * UserInterface/Main.html: Add new files.
29827        (WebInspector.StorageTreeElement):
29828        (WebInspector.StorageTreeElement.prototype.constructor.WebInspector.StorageTreeElement.get flattened): Moved from DOMStorageTreeElement
29829            and refactored to be more general.
29830        (WebInspector.StorageTreeElement.prototype.set flattened): Ditto.
29831
298322011-12-09  Brian Weinstein  <bweinstein@apple.com>
29833
29834        More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
29835
29836        Listen for when the main resource of any frame navigates, and add a cookie storage object for every
29837        frame with a unique host. Any of these frames could have cookies, and we want to show them all.
29838
29839        Reviewed by Tim Hatcher.
29840
29841        * UserInterface/CookieStorageObject.js: Added.
29842        (WebInspector.CookieStorageObject):
29843        (WebInspector.CookieStorageObject.prototype.constructor.WebInspector.CookieStorageObject.get host):
29844        * UserInterface/Main.html: Add a new source file.
29845        * UserInterface/StorageManager.js:
29846        (WebInspector.StorageManager.prototype.constructor.WebInspector.StorageManager.initialize):
29847        (WebInspector.StorageManager.prototype._mainResourceDidChange): If any frame navigates, add create a cookie
29848            storage object for the frame's host.
29849
298502011-12-08  Brian Weinstein  <bweinstein@apple.com>
29851
29852        More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
29853
29854        Generate the local storage and session storage folders on demand. We don't show them in the tree until
29855        a local storage or session storage object has been added, and if there is only one object, we flatten the
29856        folder so it says:
29857
29858        Local Storage � foo.com
29859
29860        If there is more than one object, we create a folder, and the structure will be:
29861
29862        Local Storage
29863            foo.com
29864            bar.com
29865
29866        Reviewed by Tim Hatcher and Joseph Pecoraro.
29867
29868        * UserInterface/DOMStorageTreeElement.js: Added.
29869        (WebInspector.DOMStorageTreeElement): Create a GeneralTreeElement and set a few properties.
29870        (WebInspector.DOMStorageTreeElement.prototype.constructor.WebInspector.DOMStorageTreeElement.set flattened):
29871        * UserInterface/Main.html: Include a new script.
29872        * UserInterface/StorageSidebarPanel.js:
29873        (WebInspector.StorageSidebarPanel): Initialize _localStorageTreeElement and _sessionStorageTreeElement to null.
29874        (WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded): Call _addChild.
29875        (WebInspector.StorageSidebarPanel.prototype._addChild): This object is responsible for setting up the hierarchy described above.
29876            - If there is no current child, it tells the just added child that it is the only child, and will be displayed flattened.
29877            - If the current child is a DOMStorageTreeElement, we create a folder and add the previous only child and the just added child
29878            to the folder.
29879            - If the current child is a folder, we append the just added child to the folder.
29880        (WebInspector.StorageSidebarPanel.prototype._storageCleared):
29881
298822011-12-07  Brian Weinstein  <bweinstein@apple.com>
29883
29884        More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
29885
29886        Clear the Local Storage and Session Storage folders when the main resource of the main frame changes. This means
29887        that we are navigating to a new site, and we want to clear all of the storage folders.
29888
29889        Reviewed by Tim Hatcher and Joseph Pecoraro.
29890
29891        * UserInterface/StorageManager.js:
29892        (WebInspector.StorageManager): Listen for MainResourceDidChange on all frames.
29893        (WebInspector.StorageManager.prototype._mainResourceDidChange): If the main resource changed for the main frame, fire an
29894            event saying storage was cleared.
29895        * UserInterface/StorageSidebarPanel.js:
29896        (WebInspector.StorageSidebarPanel):
29897        (WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded):
29898        (WebInspector.StorageSidebarPanel.prototype._storageCleared): Remove the children from the local storage and session storage folders.
29899
299002011-12-07  Brian Weinstein  <bweinstein@apple.com>
29901
29902        More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
29903
29904        Add folders for Local Storage and Session Storage, and add children when DOMStorageObserver.addDOMStorage is called.
29905
29906        These items are never removed yet, we will need to listen for main frame navigation, and clear the folders, but
29907        that will be done in a follow-up patch.
29908
29909        Reviewed by Tim Hatcher and Joseph Pecoraro.
29910
29911        * UserInterface/DOMStorageObject.js: Added.
29912        (WebInspector.DOMStorageObject):
29913        (WebInspector.DOMStorageObject.prototype.get id): Returns the id.
29914        (WebInspector.DOMStorageObject.prototype.get domain): Returns the domain.
29915        (WebInspector.DOMStorageObject.prototype.get isLocalStorage): Returns whether or not the DOM storage is local storage
29916            (vs. session storage).
29917        * UserInterface/DOMStorageObserver.js:
29918        (WebInspector.DOMStorageObserver.prototype.constructor.WebInspector.DOMStorageObserver.addDOMStorage): Create a new DOMStorageObject
29919            and tell the StorageManager about it.
29920        * UserInterface/Main.html:
29921        * UserInterface/Main.js:
29922        (WebInspector.contentLoaded): Create the StorageManager.
29923        * UserInterface/StorageManager.js: Added.
29924        (WebInspector.StorageManager):
29925        (WebInspector.StorageManager.prototype.constructor.WebInspector.StorageManager.initialize):
29926        (WebInspector.StorageManager.prototype.addDOMStorage): Tell the StorageSidebarPanel we added a DOMStorageObject.
29927        * UserInterface/StorageSidebarPanel.js:
29928        (WebInspector.StorageSidebarPanel):
29929        (WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded): Add a child to either
29930            local or session storage.
29931
299322011-12-05  Brian Weinstein  <bweinstein@apple.com>
29933
29934        Part of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
29935
29936        Add StorageSidebarPanel.js, and have it create a new NavigationSidebarPanel.
29937
29938        Reviewed by Tim Hatcher and Joseph Pecoraro.
29939
29940        * UserInterface/Main.html: Add the new js file.
29941        * UserInterface/Main.js:
29942        (WebInspector.contentLoaded): Call WebInspector.StorageSidebarPanel.
29943        * UserInterface/StorageSidebarPanel.js: Added.
29944        (WebInspector.StorageSidebarPanel):
29945
299462011-12-06  Timothy Hatcher  <timothy@apple.com>
29947
29948        Call WebInspector.Object.addConstructorFunctions on all the Web Inspector constructors that file events.
29949
29950        Reviewed by Joseph Pecoraro.
29951
29952        * UserInterface/FilterBar.js:
29953        * UserInterface/Frame.js:
29954        * UserInterface/FrameResourceManager.js:
29955        * UserInterface/NavigationBar.js:
29956        * UserInterface/Resource.js:
29957        * UserInterface/Sidebar.js:
29958
299592011-12-05  Timothy Hatcher  <timothy@apple.com>
29960
29961        Add support for listening for events on constructors, which gets notified of events that fire
29962        on any of the instances of that constructor.
29963
29964        This lets you do things like listen for navigation in any frame by doing:
29965
29966        WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, ...)
29967
29968        Reviewed by Joseph Pecoraro.
29969
29970        * UserInterface/Object.js:
29971        (WebInspector.Object.addConstructorFunctions): Added. Copies the relevant functions
29972        the subclass constructor.
29973        (WebInspector.Object.addEventListener): Copied from WebInspector.Object.prototype.
29974        (WebInspector.Object.removeEventListener): Ditto.
29975        (WebInspector.Object.removeAllListeners): Ditto.
29976        (WebInspector.Object.hasEventListeners): Ditto.
29977        (WebInspector.Object.prototype.addEventListener): Set to WebInspector.Object version.
29978        (WebInspector.Object.prototype.removeEventListener): Ditto.
29979        (WebInspector.Object.prototype.removeAllListeners): Ditto.
29980        (WebInspector.Object.prototype.hasEventListeners): Ditto.
29981        (WebInspector.Object.prototype.dispatchEventToListeners): Dispatch to listeners of this specific object,
29982        and to listeners interested in all instances of this object's constructor.
29983
299842011-12-05  Timothy Hatcher  <timothy@apple.com>
29985
29986        Use Object.defineProperty for our extensions in WebInspector/Utilities.js so they don't show
29987        up when enumerating instances.
29988
29989        This patch has whitespace changes stripped, but the indentation is correct.
29990
29991        Reviewed by Ada Chan.
29992
29993        * UserInterface/Utilities.js:
29994
299952011-12-05  Timothy Hatcher  <timothy@apple.com>
29996
29997        Provide a direct way to ask if a WebInspector.Frame is the main frame.
29998
29999        This is only needed in one place right now, but in the future it will be needed in more places.
30000        And checking !frame.parentFrame is not an accurate check if the frame is a detached subframe.
30001
30002        Reviewed by Ada Chan.
30003
30004        * UserInterface/Frame.js:
30005        (WebInspector.Frame):
30006        (WebInspector.Frame.prototype.isMainFrame): Added.
30007        (WebInspector.Frame.prototype.markAsMainFrame): Added.
30008        (WebInspector.Frame.prototype.unmarkAsMainFrame): Added.
30009        * UserInterface/FrameResourceManager.js:
30010        (WebInspector.FrameResourceManager.prototype.initialize): Call the renamed _mainFrameDidChange.
30011        (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Ditto.
30012        (WebInspector.FrameResourceManager.prototype.frameDidDetach): Ditto.
30013        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Ditto.
30014        (WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload): Pass true for isMainFrame
30015        when calling _addFrameTreeFromFrameResourceTreePayload.
30016        (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Call markAsMainFrame()
30017        if isMainFrame is true.
30018        (WebInspector.FrameResourceManager.prototype._mainFrameDidChange): Renamed from _dispatchMainFrameDidChangeEvent
30019        and now calls unmarkAsMainFrame and markAsMainFrame.
30020        * UserInterface/ResourceTreeElement.js:
30021        (WebInspector.ResourceTreeElement.prototype._updateTitles): Use isMainFrame().
30022
300232011-12-04  Timothy Hatcher  <timothy@apple.com>
30024
30025        Implement WebInspector.FontResourceContentView.
30026
30027        The font preview includes horizontal lines showing the top, bottom, middle and baseline CSS alignments.
30028
30029        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
30030
30031        Reviewed by Joseph Pecoraro.
30032
30033        * UserInterface/FontResourceContentView.css: Added.
30034        (.content-view.resource.font):
30035        (.content-view.resource.font .preview):
30036        (.content-view.resource.font .preview > .line):
30037        (.content-view.resource.font .preview > .line > .content):
30038        (.content-view.resource.font .preview > .line > .metric):
30039        (.content-view.resource.font .metric.top):
30040        (.content-view.resource.font .metric.baseline):
30041        (.content-view.resource.font .metric.middle):
30042        (.content-view.resource.font .metric.bottom):
30043        * UserInterface/FontResourceContentView.js:
30044        (WebInspector.FontResourceContentView):
30045        (WebInspector.FontResourceContentView.prototype.get previewElement):
30046        (WebInspector.FontResourceContentView.prototype.sizeToFit): Start at the maximum size and try each
30047        font size until minimum is reached. Stop when the preview element is not as wide as the main element.
30048        (WebInspector.FontResourceContentView.prototype.contentAvailable.createMetricElement): Helper function.
30049        (WebInspector.FontResourceContentView.prototype.contentAvailable): Create the elements for the preview.
30050        (WebInspector.FontResourceContentView.prototype.shown): Add the style element since it is removed when hidden.
30051        (WebInspector.FontResourceContentView.prototype.hidden): Remove the style element so it will not stick around
30052        when this content view is destroyed.
30053        * UserInterface/Main.html: Included FontResourceContentView.css.
30054
300552011-12-03  Timothy Hatcher  <timothy@apple.com>
30056
30057        Implement WebInspector.ImageResourceContentView.
30058
30059        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
30060
30061        Reviewed by Joseph Pecoraro.
30062
30063        * UserInterface/ImageResourceContentView.css: Added.
30064        (.content-view.resource.image): Vertically and horizontally center the image.
30065        (.content-view.resource.image img): Set max width to 100% and allow dragging.
30066        * UserInterface/ImageResourceContentView.js:
30067        (WebInspector.ImageResourceContentView): Initialize _imageElement to null.
30068        (WebInspector.ImageResourceContentView.prototype.get imageElement): Added.
30069        (WebInspector.ImageResourceContentView.prototype.contentAvailable): Added. Create and append the _imageElement.
30070        * UserInterface/Main.html: Included ImageResourceContentView.css.
30071        * UserInterface/Resource.js:
30072        (WebInspector.Resource.prototype.get contentURL): Added. Create a data URL if possible.
30073        * UserInterface/ResourceContentView.js:
30074        (WebInspector.ResourceContentView): Call requestContent.
30075        (WebInspector.ResourceContentView.prototype.contentAvailable): Added. Implemented by subclasses.
30076
300772011-12-05  Timothy Hatcher  <timothy@apple.com>
30078
30079        Select the main resource when opening the Web Inspector and when the inspected page navigates.
30080
30081        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
30082
30083        Reviewed by Joseph Pecoraro.
30084
30085        * UserInterface/ResourceSidebarPanel.js:
30086        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Select and expand the main
30087        resource so something is selected by default.
30088        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Select the main
30089        resource since there are no other resources now.
30090
300912011-12-05  Timothy Hatcher  <timothy@apple.com>
30092
30093        Close all resource content views when the inspected page navigates in the main frame.
30094
30095        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
30096
30097        Reviewed by Joseph Pecoraro.
30098
30099        * UserInterface/ContentViewContainer.js:
30100        (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Added.
30101        (WebInspector.ContentViewContainer.prototype.closeAllContentViews): Added.
30102        * UserInterface/ResourceSidebarPanel.js:
30103        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Remove an event listener from
30104        the old frame and add an event listener for MainResourceDidChange on the new frame.
30105        (WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Added. Call
30106        closeAllContentViewsOfPrototype with WebInspector.ResourceContentView on the main content container.
30107
301082011-12-05  Timothy Hatcher  <timothy@apple.com>
30109
30110        Make selecting a resource in the Resources sidebar show the content view for that resource.
30111
30112        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
30113
30114        Reviewed by Joseph Pecoraro.
30115
30116        * UserInterface/ContentViewContainer.js:
30117        (WebInspector.ContentViewContainer.prototype.contentViewForRepresentedObject): Added.
30118        (WebInspector.ContentViewContainer.prototype.showContentViewForRepresentedObject): Added.
30119        * UserInterface/ResourceSidebarPanel.js:
30120        (WebInspector.ResourceSidebarPanel): Set onselect to _treeElementSelected.
30121        (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Added. Call showContentViewForRepresentedObject
30122        on the main content container.
30123
301242011-12-05  Timothy Hatcher  <timothy@apple.com>
30125
30126        Add support for knowing when a TreeElement is selected/deselected in a TreeOutline.
30127
30128        There is already TreeElement.onselect which has been used in the past,
30129        but having a tree-wide notification of selection changes makes it easier
30130        to implement certain things.
30131
30132        Reviewed by Joseph Pecoraro.
30133
30134        * UserInterface/TreeOutline.js:
30135        (TreeElement.prototype.select): Call onselect on the TreeOutline if it exists.
30136        (TreeElement.prototype.deselect): Call ondeselect on the TreeOutline if it exists.
30137
301382011-12-05  Timothy Hatcher  <timothy@apple.com>
30139
30140        Support resource type changes by making a new ResourceContentView and replacing the old one.
30141
30142        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
30143
30144        Reviewed by Joseph Pecoraro.
30145
30146        * UserInterface/ContentViewContainer.js:
30147        (WebInspector.ContentViewContainer.prototype.replaceContentView): Added. Find all instances of the old one
30148        and replace it with the new one.
30149        * UserInterface/ResourceContentView.js:
30150        (WebInspector.ResourceContentView): Add event listener for TypeDidChange.
30151        (WebInspector.ResourceContentView.prototype._resourceTypeDidChange): Added. Make a new ResourceContentView
30152        which will use the new resource type to make the correct concrete ResourceContentView subclass.
30153
301542011-12-05  Timothy Hatcher  <timothy@apple.com>
30155
30156        Add the "constructor" property to all prototypes in the Web Inspector.
30157
30158        While working on a change that requires the constructor, I found it was always Object.
30159        This is because (thanks Gavin) the "constructor" property is added at runtime during
30160        the first lookup of the "prototype" property slot. But when "prototype" is assigned,
30161        like we do in the Web Inspector, the "constructor" property isn't present.
30162
30163        Reviewed by John Sullivan.
30164
30165        * UserInterface/ApplicationCacheObserver.js:
30166        * UserInterface/ConsoleObserver.js:
30167        * UserInterface/ContentView.js:
30168        * UserInterface/ContentViewContainer.js:
30169        * UserInterface/DOMObserver.js:
30170        * UserInterface/DOMStorageObserver.js:
30171        * UserInterface/DatabaseObserver.js:
30172        * UserInterface/DebuggerObserver.js:
30173        * UserInterface/FilterBar.js:
30174        * UserInterface/FolderTreeElement.js:
30175        * UserInterface/FontResourceContentView.js:
30176        * UserInterface/Frame.js:
30177        * UserInterface/FrameResourceManager.js:
30178        * UserInterface/FrameTreeElement.js:
30179        * UserInterface/GeneralTreeElement.js:
30180        * UserInterface/GenericResourceContentView.js:
30181        * UserInterface/ImageResourceContentView.js:
30182        * UserInterface/InspectorObserver.js:
30183        * UserInterface/NavigationBar.js:
30184        * UserInterface/NavigationSidebarPanel.js:
30185        * UserInterface/NetworkObserver.js:
30186        * UserInterface/Object.js:
30187        * UserInterface/PageObserver.js:
30188        * UserInterface/Resource.js:
30189        * UserInterface/ResourceCollection.js:
30190        * UserInterface/ResourceContentView.js:
30191        * UserInterface/ResourceSidebarPanel.js:
30192        * UserInterface/ResourceTreeElement.js:
30193        * UserInterface/Sidebar.js:
30194        * UserInterface/TextResourceContentView.js:
30195        * UserInterface/TreeOutline.js:
30196
301972011-12-05  Timothy Hatcher  <timothy@apple.com>
30198
30199        And WebInspector.ResourceContentView and concrete subclasses for Text, Image and Font resources.
30200
30201        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
30202
30203        Reviewed by Joseph Pecoraro.
30204
30205        * UserInterface/ContentView.js:
30206        (WebInspector.ContentView): Create ResourceContentViews for Resources and Frames.
30207        * UserInterface/FontResourceContentView.js: Added.
30208        (WebInspector.FontResourceContentView):
30209        * UserInterface/GenericResourceContentView.js: Added.
30210        (WebInspector.GenericResourceContentView):
30211        * UserInterface/ImageResourceContentView.js: Added.
30212        (WebInspector.ImageResourceContentView):
30213        * UserInterface/Main.html: Included new files.
30214        * UserInterface/ResourceContentView.js: Added.
30215        (WebInspector.ResourceContentView): When instantiated directly return an instance of a type-based concrete subclass.
30216        (WebInspector.ResourceContentView.prototype.get resource):
30217        * UserInterface/TextResourceContentView.js: Added.
30218        (WebInspector.TextResourceContentView):
30219
302202011-12-05  Timothy Hatcher  <timothy@apple.com>
30221
30222        Add back/forward support to WebInspector.ContentViewContainer.
30223
30224        Reviewed by Joseph Pecoraro.
30225
30226        * UserInterface/ContentViewContainer.js:
30227        (WebInspector.ContentViewContainer): Initialize _backForwardList and _currentIndex.
30228        (WebInspector.ContentViewContainer.prototype.get currentIndex): Added.
30229        (WebInspector.ContentViewContainer.prototype.get backForwardList): Added.
30230        (WebInspector.ContentViewContainer.prototype.get currentContentView): Use _backForwardList and _currentIndex.
30231        (WebInspector.ContentViewContainer.prototype.showContentView): Insert the content view at the new current index.
30232        This will remove any content views greater than or equal to the index. Call showBackForwardEntry for the index.
30233        (WebInspector.ContentViewContainer.prototype.showBackForwardEntry): Added.
30234        (WebInspector.ContentViewContainer.prototype.canGoBack): Added.
30235        (WebInspector.ContentViewContainer.prototype.canGoForward): Added.
30236        (WebInspector.ContentViewContainer.prototype.goBack): Added.
30237        (WebInspector.ContentViewContainer.prototype.goForward): Added.
30238
302392011-12-05  Timothy Hatcher  <timothy@apple.com>
30240
30241        Add WebInspector.ContentView and WebInspector.ContentViewContainer.
30242
30243        These classes will be used to display content for resources and other data.
30244
30245        Reviewed by Joseph Pecoraro.
30246
30247        * UserInterface/ContentView.js: Added.
30248        (WebInspector.ContentView):
30249        (WebInspector.ContentView.prototype.get element):
30250        (WebInspector.ContentView.prototype.get parentContainer):
30251        (WebInspector.ContentView.prototype.get visible):
30252        (WebInspector.ContentView.prototype.set visible):
30253        (WebInspector.ContentView.prototype.shown):
30254        (WebInspector.ContentView.prototype.hidden):
30255        * UserInterface/ContentViewContainer.css: Added.
30256        (.content-view-container): Display relative to allow positioned content.
30257        (.content-view-container > .content-view): Position to fill the container.
30258        (.content-view-container > .content-view:not(.visible)): Display none.
30259        * UserInterface/ContentViewContainer.js: Added.
30260        (WebInspector.ContentViewContainer):
30261        (WebInspector.ContentViewContainer.prototype.get element):
30262        (WebInspector.ContentViewContainer.prototype.get currentContentView):
30263        (WebInspector.ContentViewContainer.prototype.showContentView):
30264        (WebInspector.ContentViewContainer.prototype._addContentViewElement):
30265        (WebInspector.ContentViewContainer.prototype._removeContentViewElement):
30266        (WebInspector.ContentViewContainer.prototype._showContentView):
30267        (WebInspector.ContentViewContainer.prototype._hideContentView):
30268        * UserInterface/Main.css:
30269        (#content-views): Renamed from #content-panels.
30270        * UserInterface/Main.html: Included ContentViewContainer.js and ContentViewContainer.css. Also renamed
30271        content-panels to content-views.
30272        * UserInterface/Main.js:
30273        (WebInspector.contentLoaded): Create an instance of ContentViewContainer that uses the #content-views div.
30274
302752011-12-05  Timothy Hatcher  <timothy@apple.com>
30276
30277        Add support for getting the content of a resource in preparation for showing that content.
30278
30279        Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
30280
30281        Reviewed by Joseph Pecoraro.
30282
30283        * UserInterface/Resource.js:
30284        (WebInspector.Resource): Initialize _content, _pendingContentRequestCallbacks and _contentIsBase64Encoded.
30285        (WebInspector.Resource.prototype.get content): Added.
30286        (WebInspector.Resource.prototype.get contentIsBase64Encoded): Added.
30287        (WebInspector.Resource.prototype.requestContent): Added. Queues the callback and requests the content if needed.
30288        (WebInspector.Resource.prototype.markAsFinished): Call _requestContentFromBackend if there are pending requests.
30289        (WebInspector.Resource.prototype.markAsFailed): Call _servicePendingContentRequests.
30290        (WebInspector.Resource.prototype._requestContentFromBackend): Added. Use the NetworkPageAgent depending on if
30291        we have a requestIdentifier for this Resource.
30292        (WebInspector.Resource.prototype._processContent): Added. Store the content and call _servicePendingContentRequests.
30293        (WebInspector.Resource.prototype._servicePendingContentRequests): Added. Call all the pending callbacks with the content.
30294
302952011-12-05  Timothy Hatcher  <timothy@apple.com>
30296
30297        Mark resources loaded from the memory cache as finished in the Web Inspector so their content can be requested.
30298
30299        Reviewed by Joseph Pecoraro.
30300
30301        * UserInterface/FrameResourceManager.js:
30302        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Call markAsFinished.
30303
303042011-12-05  Timothy Hatcher  <timothy@apple.com>
30305
30306        Add requestIdentifier to WebInspector.Resource.
30307
30308        The requestIdentifier will be needed for getting the resource content from the backend.
30309
30310        Reviewed by Joseph Pecoraro.
30311
30312        * UserInterface/FrameResourceManager.js:
30313        (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Pass null for the requestIdentifier.
30314        (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass the requestIdentifier.
30315        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Ditto.
30316        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Ditto.
30317        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added requestIdentifier parameter.
30318        (WebInspector.FrameResourceManager.prototype._createFrame): Pass null for requestIdentifier.
30319        (WebInspector.FrameResourceManager.prototype._createResource): Ditto.
30320        * UserInterface/Resource.js:
30321        (WebInspector.Resource): Added requestIdentifier parameter.
30322        (WebInspector.Resource.prototype.get requestIdentifier): Added.
30323
303242011-12-05  Timothy Hatcher  <timothy@apple.com>
30325
30326        Override the cursor to prevent the I-beam over various text UI elements in the Web Inspector.
30327
30328        Reviewed by Dan Bernstein.
30329
30330        * UserInterface/Main.css:
30331        (body): Set cursor to default.
30332
303332011-12-05  Timothy Hatcher  <timothy@apple.com>
30334
30335        Call preventDefault and stopPropagation in various event listeners in the Web Inspector.
30336
30337        This prevents text selection while dragging the sidebar resizer or scrubbing a navigation bar.
30338        It also prevents text selection when double clicking the sidebar resizer.
30339
30340        Reviewed by Dan Bernstein.
30341
30342        * UserInterface/NavigationBar.js:
30343        (WebInspector.NavigationBar.prototype._mouseDown):
30344        (WebInspector.NavigationBar.prototype._mouseMoved):
30345        (WebInspector.NavigationBar.prototype._mouseUp):
30346        (WebInspector.NavigationBar.prototype._keyDown):
30347        * UserInterface/Sidebar.js:
30348        (WebInspector.Sidebar.prototype._resizerDoubleClicked):
30349        (WebInspector.Sidebar.prototype._resizerMouseDown):
30350        (WebInspector.Sidebar.prototype._resizerMouseMoved):
30351        (WebInspector.Sidebar.prototype._resizerMouseUp):
30352
303532011-12-05  Timothy Hatcher  <timothy@apple.com>
30354
30355        Add a build phase copy of InspectorBackend.js from WebCore and rename the
30356        InspectorBackendStub.js copied file to InspectorBackendCommands.js.
30357
30358        The InspectorBackend.js file split out of the generated InspectorBackendStub.js
30359        in r101670, and both files are needed to be useful.
30360
30361        Reviewed by Joseph Pecoraro.
30362
30363        * UserInterface/Main.html: Include InspectorBackendCommands.js.
30364        * WebInspectorUI.xcodeproj/project.pbxproj: Update the WebCore Inspector Resources build pahse.
30365
303662011-11-29  Timothy Hatcher  <timothy@apple.com>
30367
30368        Add WebInspector.ResourceCollection to simplify parts of WebInspector.Frame.
30369
30370        The ResourceCollection class tracks resources it holds for URL and type changes
30371        and updates internal mappings accordingly.
30372
30373        Reviewed by Joseph Pecoraro.
30374
30375        * UserInterface/Frame.js:
30376        (WebInspector.Frame): Create a ResourceCollection instead of multiple arrays/maps.
30377        (WebInspector.Frame.prototype.initialize): Call clearProvisionalLoad before the main
30378        resource did change event.
30379        (WebInspector.Frame.prototype.startProvisionalLoad): Create a provisional ResourceCollection.
30380        (WebInspector.Frame.prototype.commitProvisionalLoad): Commit the provisional ResourceCollection.
30381        Added an early return to prevent exceptions if this is called when there isn't provisional load.
30382        (WebInspector.Frame.prototype.clearProvisionalLoad): Added an early return and clear the ResourceCollection.
30383        (WebInspector.Frame.prototype.get resources): Use ResourceCollection.
30384        (WebInspector.Frame.prototype.resourceForURL): Ditto.
30385        (WebInspector.Frame.prototype.resourcesWithType): Ditto.
30386        (WebInspector.Frame.prototype.addResource): Moved the add code from _associateWithResource and use the
30387        new _isProvisionalResource function to check which ResourceCollection to add the resource to.
30388        (WebInspector.Frame.prototype.removeResource): Use ResourceCollection.
30389        (WebInspector.Frame.prototype.removeAllResources): Ditto.
30390        (WebInspector.Frame.prototype._isProvisionalResource): Added.
30391        (WebInspector.Frame.prototype._associateWithResource): Only set _childFrame.
30392        (WebInspector.Frame.prototype._disassociateWithResource): Only clear _childFrame.
30393        * UserInterface/Main.html: Included ResourceCollection.js.
30394        * UserInterface/ResourceCollection.js: Added. Broken out of Frame.js.
30395        (WebInspector.ResourceCollection):
30396        (WebInspector.ResourceCollection.prototype.get resources):
30397        (WebInspector.ResourceCollection.prototype.resourceForURL):
30398        (WebInspector.ResourceCollection.prototype.resourcesWithType):
30399        (WebInspector.ResourceCollection.prototype.addResource):
30400        (WebInspector.ResourceCollection.prototype.removeResource):
30401        (WebInspector.ResourceCollection.prototype.removeAllResources):
30402        (WebInspector.ResourceCollection.prototype._associateWithResource):
30403        (WebInspector.ResourceCollection.prototype._disassociateWithResource):
30404        (WebInspector.ResourceCollection.prototype._resourceURLDidChange):
30405        (WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
30406
304072011-11-28  Timothy Hatcher  <timothy@apple.com>
30408
30409        Improve glob filtering in the Resources sidebar of the new Web Inspector.
30410
30411        Match edge boundaries when there is an asterisk to better meet the expectations
30412        of the user. When someone types "*.js" they don't expect "foo.json" to match. They
30413        would only expect that if they type "*.js*". We use \b (instead of ^ and $) to allow
30414        matches inside paths or URLs, so "ba*.js" will match "foo/bar.js" but not "boo/bbar.js".
30415        When there isn't an asterisk the regexString is just a substring search. Also properly
30416        ignore escaped asterisks and collapse consecutive asterisks down to one.
30417
30418        Reviewed by Joseph Pecoraro.
30419
30420        * UserInterface/Utilities.js:
30421        (simpleGlobStringToRegExp):
30422
304232011-11-28  Timothy Hatcher  <timothy@apple.com>
30424
30425        Show a message in the sidebar when it is empty because there are no filter matches.
30426
30427        Reviewed by Brian Weinstein.
30428
30429        * UserInterface/NavigationSidebarPanel.css:
30430        (.sidebar > .panel.navigation > .content.hidden): Added.
30431        (.sidebar > .panel.navigation > .empty-content-placeholder): Added.
30432        (.sidebar > .panel.navigation > .empty-content-placeholder > .message): Added.
30433        * UserInterface/NavigationSidebarPanel.js:
30434        (WebInspector.NavigationSidebarPanel): Create the empty content placeholder elements.
30435        (WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder): Set the message and add the element.
30436        (WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder): Remove the element.
30437        (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults): Added. Check for hidden top level elements.
30438        (WebInspector.NavigationSidebarPanel.prototype._updateFilter): Call _checkForEmptyFilterResults.
30439        (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Ditto.
30440        * UserInterface/Sidebar.css:
30441        (.sidebar > .panel): Make overflow hidden so when the sidebar is collapsed the empty placeholder doesn't stick out.
30442
304432011-11-28  Timothy Hatcher  <timothy@apple.com>
30444
30445        Add text filtering support to WebInspector.NavigationSidebarPanel.
30446
30447        This makes it so you can filter the resource list, matching against the URLs.
30448
30449        Reviewed by Brian Weinstein.
30450
30451        * UserInterface/FilterBar.js:
30452        (WebInspector.FilterBar): Add an search event listener and set incremental to true.
30453        (WebInspector.FilterBar.prototype.get filters): Added.
30454        (WebInspector.FilterBar.prototype.hasActiveFilters): Added.
30455        (WebInspector.FilterBar.prototype._inputFieldChanged): Added. Dispatch the TextFilterDidChange event.
30456        * UserInterface/GeneralTreeElement.js:
30457        (WebInspector.GeneralTreeElement.prototype.set mainTitle): Call didChange.
30458        (WebInspector.GeneralTreeElement.prototype.set subtitle): Ditto.
30459        (WebInspector.GeneralTreeElement.prototype.get filterableData): Added. Returns the URL.
30460        * UserInterface/NavigationSidebarPanel.css:
30461        (.navigation-sidebar-panel-content-tree-outline .hidden): Added.
30462        * UserInterface/NavigationSidebarPanel.js:
30463        (WebInspector.NavigationSidebarPanel): Set onadd and onchange on the TreeOutline. Listen for
30464        the TextFilterDidChange event.
30465        (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement): Added.
30466        (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter): Added.
30467        (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.makeVisible): Added.
30468        (WebInspector.NavigationSidebarPanel.prototype._updateFilter): Added. Call applyFiltersToTreeElement.
30469        (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Added. Call applyFiltersToTreeElement.
30470        * UserInterface/Utilities.js:
30471        (String.prototype.escapeCharacters): Copied from WebCore/inspector/front-end/utilities.js.
30472        (String.prototype.escapeForRegExp): Copied from WebCore/inspector/front-end/utilities.js.
30473        (simpleGlobStringToRegExp): Added.
30474
304752011-11-28  Timothy Hatcher  <timothy@apple.com>
30476
30477        Add WebInspector.FilterBar to be used in navigation sidebar panels.
30478
30479        The filter bar only contains a specially styled search field in this change.
30480        It does not actually filter the sidebar yet.
30481
30482        Reviewed by Brian Weinstein.
30483
30484        * UserInterface/FilterBar.css: Added.
30485        (.filter-bar): Styled like the filter bar in Xcode 4.
30486        (.filter-bar > input[type="search"]): Set the margins and prevent an outline on focus.
30487        (.filter-bar > input[type="search"]::-webkit-search-decoration): Replace the search
30488        magnifying glass with the filter glyph.
30489        * UserInterface/FilterBar.js: Added.
30490        (WebInspector.FilterBar):
30491        (WebInspector.FilterBar.prototype.get element):
30492        (WebInspector.FilterBar.prototype.get inputField):
30493        * UserInterface/Images/FilterFieldGlyph.pdf: Added.
30494        * UserInterface/Main.html: Included FilterBar.js and FilterBar.css.
30495        * UserInterface/NavigationSidebarPanel.css:
30496        (.sidebar > .panel.navigation > .filter-bar): Position at the bottom.
30497        * UserInterface/NavigationSidebarPanel.js:
30498        (WebInspector.NavigationSidebarPanel): Create a FilterBar.
30499        (WebInspector.NavigationSidebarPanel.prototype.get filterBar): Added.
30500
305012011-11-28  Timothy Hatcher  <timothy@apple.com>
30502
30503        Handle getting a resource load responce without getting the request first.
30504
30505        If the Web Inspector is opened while loading a page we can miss the resourceRequestWillBeSent call.
30506        In that case we might get a respose but not know the resource yet, so make a new resource and add it.
30507
30508        Reviewed by Anders Carlsson.
30509
30510        * UserInterface/FrameResourceManager.js:
30511        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Make a new resource if
30512        one isn't found in the request identifier map.
30513        * UserInterface/NetworkObserver.js:
30514        (WebInspector.NetworkObserver.prototype.responseReceived): Pass the frameId and loaderId along.
30515
305162011-11-28  Timothy Hatcher  <timothy@apple.com>
30517
30518        Store the request and response headers on WebInspector.Resource.
30519
30520        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30521
30522        Reviewed by Anders Carlsson.
30523
30524        * UserInterface/FrameResourceManager.js:
30525        (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Pass null for the requestHeaders in a couple of places.
30526        (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass the requestHeaders along.
30527        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Pass null for the requestHeaders.
30528        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Pass the responseHeaders along to updateForResponse.
30529        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added an argument for requestHeaders.
30530        (WebInspector.FrameResourceManager.prototype._createFrame): Pass null for the requestHeaders.
30531        (WebInspector.FrameResourceManager.prototype._createResource): Ditto.
30532        * UserInterface/Resource.js:
30533        (WebInspector.Resource): Added requestHeaders argument.
30534        (WebInspector.Resource.prototype.get requestHeaders): Added.
30535        (WebInspector.Resource.prototype.get responseHeaders): Added.
30536        (WebInspector.Resource.prototype.updateForResponse): Added responseHeaders argument and fire the ResponseHeadersDidChange event.
30537
305382011-11-28  Timothy Hatcher  <timothy@apple.com>
30539
30540        Keep track of failed, canceled and finished resources in the Web Inspector.
30541
30542        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30543
30544        Reviewed by Joseph Pecoraro.
30545
30546        * UserInterface/FrameResourceManager.js:
30547        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Call markAsFinished.
30548        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Added canceled argument and call markAsFailed.
30549        (WebInspector.FrameResourceManager.prototype._createResource): Call markAsFinished.
30550        * UserInterface/NetworkObserver.js:
30551        (WebInspector.NetworkObserver.prototype.loadingFailed): Pass along the canceled argument.
30552        * UserInterface/Resource.js:
30553        (WebInspector.Resource.prototype.get finished): Added.
30554        (WebInspector.Resource.prototype.get failed): Added.
30555        (WebInspector.Resource.prototype.get canceled): Added.
30556        (WebInspector.Resource.prototype.updateForRedirectResponse): Added asserts that loading hasn't failed, finished or canceled.
30557        (WebInspector.Resource.prototype.updateForResponse): Ditto.
30558        (WebInspector.Resource.prototype.markAsFinished): Added.
30559        (WebInspector.Resource.prototype.markAsFailed): Added.
30560
305612011-11-28  Timothy Hatcher  <timothy@apple.com>
30562
30563        Sort folders by name, resources by type and name in the Web Inspector sidebar.
30564
30565        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30566
30567        Reviewed by Joseph Pecoraro.
30568
30569        * UserInterface/FrameTreeElement.js:
30570        (WebInspector.FrameTreeElement.prototype.descendantResourceTreeElementTypeDidChange): Remove the check for _groupedIntoFolders
30571        since we sort by type in non-folder mode now. Updated the comment.
30572        (WebInspector.FrameTreeElement.prototype.descendantResourceTreeElementMainTitleDidChange): Added.
30573        (WebInspector.FrameTreeElement.prototype._addTreeElement): Use _insertRootFolderTreeElement and _insertResourceTreeElement.
30574        (WebInspector.FrameTreeElement.prototype._compareTreeElementsByMainTitle): Added.
30575        (WebInspector.FrameTreeElement.prototype._insertFolderTreeElement): Added.
30576        (WebInspector.FrameTreeElement.prototype._compareResourceTreeElements): Added.
30577        (WebInspector.FrameTreeElement.prototype._insertResourceTreeElement): Added.
30578        * UserInterface/Main.html: Included BinarySearch.js.
30579        * UserInterface/ResourceTreeElement.js:
30580        (WebInspector.ResourceTreeElement.prototype._updateTitles): Call descendantResourceTreeElementMainTitleDidChange on the first ancestor
30581        if the main title changed.
30582
305832011-11-28  Timothy Hatcher  <timothy@apple.com>
30584
30585        Queue new resources and frames to add them in bulk every half a second.
30586
30587        This reduces flashing in the Web Inspector sidebar as resources load and change folders as their type becomes known.
30588
30589        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30590
30591        Reviewed by Joseph Pecoraro.
30592
30593        * UserInterface/FrameTreeElement.js:
30594        (WebInspector.FrameTreeElement): Initialize _newChildQueue.
30595        (WebInspector.FrameTreeElement.prototype.onpopulate): Call _clearNewChildQueue.
30596        (WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Ditto.
30597        (WebInspector.FrameTreeElement.prototype._resourceWasAdded): Use _addRepresentedObjectToNewChildQueue.
30598        (WebInspector.FrameTreeElement.prototype._childFrameWasAdded): Ditto.
30599        (WebInspector.FrameTreeElement.prototype._addRepresentedObjectToNewChildQueue): Added. Adds the item to the queue and starts
30600        a timer if one isn't already pending.
30601        (WebInspector.FrameTreeElement.prototype._removeRepresentedObjectFromNewChildQueue): Added. Removes the item from the queue.
30602        (WebInspector.FrameTreeElement.prototype._populateFromNewChildQueue): Added. Call _addChildForRepresentedObject
30603        for each item in the queue.
30604        (WebInspector.FrameTreeElement.prototype._clearNewChildQueue): Added. Clears the queue.
30605        (WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject): Call _removeRepresentedObjectFromNewChildQueue.
30606
306072011-11-28  Timothy Hatcher  <timothy@apple.com>
30608
30609        Remember expanded frames when the main resource changes during navigation. Also auto expand the main frame.
30610
30611        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30612
30613        Reviewed by Joseph Pecoraro.
30614
30615        * UserInterface/FrameTreeElement.js:
30616        (WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Remember if this tree element was expanded.
30617        (WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Expand if needed.
30618        * UserInterface/ResourceSidebarPanel.js:
30619        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Expand when the main frame is created.
30620
306212011-11-28  Timothy Hatcher  <timothy@apple.com>
30622
30623        Group resources into folders once certain resource count thresholds are met.
30624
30625        Resources and Frames are grouped into folders if one of two thresholds are met:
30626        1) Once the number of medium categories passes NumberOfMediumCategoriesThreshold.
30627        2) When there is a category that passes LargeChildCountThreshold and there are
30628           any resources in another category.
30629
30630        Folders are avoided when there is only one category or most categories are small.
30631
30632        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30633
30634        Reviewed by Joseph Pecoraro.
30635
30636        * UserInterface/FrameTreeElement.js:
30637        (WebInspector.FrameTreeElement.prototype.descendantResourceTreeElementTypeDidChange): Added. Called by ResourceTreeElement.
30638        (WebInspector.FrameTreeElement.prototype.onpopulate): Call _shouldGroupIntoFolders and use _addTreeElement.
30639        (WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Reset _groupedIntoFolders to false.
30640        (WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Call _shouldGroupIntoFolders and use _addTreeElement.
30641        (WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject): Remove the parent if it is an empty folder.
30642        (WebInspector.FrameTreeElement.prototype._addTreeElement): Added. Adds the tree element to the right folder.
30643        (WebInspector.FrameTreeElement.prototype._removeTreeElement): Added. Removes the tree element and empty folders.
30644        (WebInspector.FrameTreeElement.prototype._folderNameForResourceType): Added.
30645        (WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject): Added. Make the folder tree element if needed.
30646        (WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders): Added. Calculates if folders are needed.
30647        * UserInterface/ResourceTreeElement.js:
30648        (WebInspector.ResourceTreeElement.prototype._typeDidChange): Use _callFirstAncestorFunction to call descendantResourceTreeElementTypeDidChange.
30649        (WebInspector.ResourceTreeElement.prototype._callFirstAncestorFunction): Added. Call the first ancestor that implements a function.
30650
306512011-11-28  Timothy Hatcher  <timothy@apple.com>
30652
30653        Add WebInspector.FolderTreeElement to be used in navigation sidebar panels.
30654
30655        Reviewed by Brian Weinstein.
30656
30657        * UserInterface/FolderTreeElement.css: Added.
30658        (.folder-tree-element .icon):
30659        * UserInterface/FolderTreeElement.js: Added.
30660        (WebInspector.FolderTreeElement):
30661        * UserInterface/Images/FolderGeneric.png: Added.
30662        * UserInterface/Images/FolderGeneric@2x.png: Added.
30663        * UserInterface/Main.html: Included FolderTreeElement.css and FolderTreeElement.js.
30664
306652011-11-28  Timothy Hatcher  <timothy@apple.com>
30666
30667        Remember resources by type for each frame in the Web Inspector.
30668
30669        This will be used to organize the sidebar into folders for each type of resource.
30670
30671        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30672
30673        Reviewed by Joseph Pecoraro.
30674
30675        * UserInterface/Frame.js:
30676        (WebInspector.Frame): Initialize _resourcesTypeMap and _provisionalResourcesTypeMap.
30677        (WebInspector.Frame.prototype.startProvisionalLoad): Initialize _provisionalResourcesURLMap.
30678        (WebInspector.Frame.prototype.commitProvisionalLoad): Commit _provisionalResourcesURLMap over to _resourcesTypeMap.
30679        (WebInspector.Frame.prototype.clearProvisionalLoad): Initialize _provisionalResourcesURLMap.
30680        (WebInspector.Frame.prototype.resourcesWithType): Added. Lookup in _resourcesTypeMap.
30681        (WebInspector.Frame.prototype.removeAllResources): Initialize _resourcesTypeMap.
30682        (WebInspector.Frame.prototype._associateWithResource): Added resource to the type map.
30683        (WebInspector.Frame.prototype._disassociateWithResource): Remove the resource from the type map.
30684        (WebInspector.Frame.prototype._resourceTypeDidChange): Update the resource type map.
30685
306862011-11-28  Timothy Hatcher  <timothy@apple.com>
30687
30688        Add icons for document, image, font, style, script and generic resource types in the Web Inspector.
30689
30690        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30691
30692        Reviewed by Joseph Pecoraro.
30693
30694        * UserInterface/Images/DocumentCSS.png: Added.
30695        * UserInterface/Images/DocumentCSS@2x.png: Added.
30696        * UserInterface/Images/DocumentFont.png: Added.
30697        * UserInterface/Images/DocumentFont@2x.png: Added.
30698        * UserInterface/Images/DocumentGeneric.png: Added.
30699        * UserInterface/Images/DocumentGeneric@2x.png: Added.
30700        * UserInterface/Images/DocumentImage.png: Added.
30701        * UserInterface/Images/DocumentImage@2x.png: Added.
30702        * UserInterface/Images/DocumentJS.png: Added.
30703        * UserInterface/Images/DocumentJS@2x.png: Added.
30704        * UserInterface/Images/DocumentMarkup.png: Added.
30705        * UserInterface/Images/DocumentMarkup@2x.png: Added.
30706        * UserInterface/Main.html: Included ResourceTreeElement.css.
30707        * UserInterface/ResourceTreeElement.css: Added.
30708        (.resource-tree-element .icon):
30709        (.resource-tree-element.resource-type-document .icon):
30710        (.resource-tree-element.resource-type-image .icon):
30711        (.resource-tree-element.resource-type-stylesheet .icon):
30712        (.resource-tree-element.resource-type-script .icon):
30713        * UserInterface/ResourceTreeElement.js:
30714        (WebInspector.ResourceTreeElement): Use the resource type as a class.
30715        (WebInspector.ResourceTreeElement.prototype._updateResource): Added TypeDidChange event listener.
30716        (WebInspector.ResourceTreeElement.prototype._typeDidChange): Added. Update the classNames with the new type.
30717
307182011-11-28  Timothy Hatcher  <timothy@apple.com>
30719
30720        Display the last path component instead of the full URL in the Web Inspector's Resource sidebar panel.
30721        Show the host as the subtitle if it is different from the main resource or if this is the main frame's main resource.
30722
30723        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30724
30725        Reviewed by Joseph Pecoraro.
30726
30727        * UserInterface/Resource.js:
30728        (WebInspector.Resource.prototype.get urlComponents): Added. Calls parseURL if needed.
30729        (WebInspector.Resource.prototype.updateForRedirectResponse): Delete the URL components so the URL is re-parsed the
30730        next time it is requested.
30731        (WebInspector.Resource.prototype.updateForResponse): Ditto.
30732        * UserInterface/ResourceTreeElement.js:
30733        (WebInspector.ResourceTreeElement.prototype._updateTitles): Set the mainTitle and subtitle based on the urlComponents.
30734        * UserInterface/Utilities.js:
30735        (parseURL): Added. Parses a URL into its components.
30736
307372011-11-28  Timothy Hatcher  <timothy@apple.com>
30738
30739        Populate the WebInspector's Resource sidebar panel with frame and resource tree elements.
30740
30741        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30742
30743        Reviewed by Joseph Pecoraro.
30744
30745        * UserInterface/FrameTreeElement.js: Added.
30746        (WebInspector.FrameTreeElement): Set up event listeners.
30747        (WebInspector.FrameTreeElement.prototype.get frame): Returns _frame.
30748        (WebInspector.FrameTreeElement.prototype.onpopulate): Add child frames and resources.
30749        (WebInspector.FrameTreeElement.prototype._updateParentStatus): Update hasChildren.
30750        (WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Update the resource and remove children.
30751        (WebInspector.FrameTreeElement.prototype._resourceWasAdded): Call _addChildForRepresentedObject.
30752        (WebInspector.FrameTreeElement.prototype._resourceWasRemoved): Call _removeChildForRepresentedObject.
30753        (WebInspector.FrameTreeElement.prototype._childFrameWasAdded): Call _addChildForRepresentedObject.
30754        (WebInspector.FrameTreeElement.prototype._childFrameWasRemoved): Call _removeChildForRepresentedObject.
30755        (WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Update parent status and append the new tree element.
30756        (WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject): Update parent status and remove the tree element.
30757        * UserInterface/Main.html: Include FrameTreeElement.js and ResourceTreeElement.js.
30758        * UserInterface/ResourceSidebarPanel.js:
30759        (WebInspector.ResourceSidebarPanel): Add MainFrameDidChange event listener.
30760        (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Added.
30761        * UserInterface/ResourceTreeElement.js: Added.
30762        (WebInspector.ResourceTreeElement):
30763        (WebInspector.ResourceTreeElement.prototype.get resource): Returns _resource.
30764        (WebInspector.ResourceTreeElement.prototype._updateResource): Setup event listeners and update titles.
30765        (WebInspector.ResourceTreeElement.prototype._updateTitles): Set the mainTitle to the URL for now.
30766        (WebInspector.ResourceTreeElement.prototype._urlDidChange): Update the titles.
30767
307682011-11-28  Timothy Hatcher  <timothy@apple.com>
30769
30770        Add WebInspector.GeneralTreeElement to be used in navigation sidebar panels.
30771
30772        Reviewed by Joseph Pecoraro.
30773
30774        * UserInterface/GeneralTreeElement.js: Added.
30775        (WebInspector.GeneralTreeElement):
30776        (WebInspector.GeneralTreeElement.prototype.get element):
30777        (WebInspector.GeneralTreeElement.prototype.get disclosureButton):
30778        (WebInspector.GeneralTreeElement.prototype.get iconElement):
30779        (WebInspector.GeneralTreeElement.prototype.get titlesElement):
30780        (WebInspector.GeneralTreeElement.prototype.get mainTitleElement):
30781        (WebInspector.GeneralTreeElement.prototype.get subtitleElement):
30782        (WebInspector.GeneralTreeElement.prototype.get classNames):
30783        (WebInspector.GeneralTreeElement.prototype.set classNames):
30784        (WebInspector.GeneralTreeElement.prototype.get small):
30785        (WebInspector.GeneralTreeElement.prototype.set small):
30786        (WebInspector.GeneralTreeElement.prototype.get mainTitle):
30787        (WebInspector.GeneralTreeElement.prototype.set mainTitle):
30788        (WebInspector.GeneralTreeElement.prototype.get subtitle):
30789        (WebInspector.GeneralTreeElement.prototype.set subtitle):
30790        (WebInspector.GeneralTreeElement.prototype.isEventWithinDisclosureTriangle):
30791        (WebInspector.GeneralTreeElement.prototype.onattach):
30792        (WebInspector.GeneralTreeElement.prototype.onreveal):
30793        (WebInspector.GeneralTreeElement.prototype._createElementsIfNeeded):
30794        (WebInspector.GeneralTreeElement.prototype._createSubtitleElementIfNeeded):
30795        (WebInspector.GeneralTreeElement.prototype._updateTitleElements):
30796        * UserInterface/Main.html: Add GeneralTreeElement.js.
30797
307982011-11-28  Timothy Hatcher  <timothy@apple.com>
30799
30800        Generate disclosure triangles from PDFs for the Web Inspector's navigation sidebar.
30801
30802        The disclosure triangles are a solid color plus a shadow for a normal and selected state.
30803
30804        Reviewed by Brian Weinstein.
30805
30806        * UserInterface/ImageUtilities.js: Added.
30807        (generateColoredImage): Take an input image and fill the image with a color while preserving the alpha.
30808        * UserInterface/Images/DisclosureTriangleSmallClosed.pdf: Added.
30809        * UserInterface/Images/DisclosureTriangleSmallOpen.pdf: Added.
30810        * UserInterface/Main.html: Added ImageUtilities.js.
30811        * UserInterface/NavigationSidebarPanel.js:
30812        (WebInspector.NavigationSidebarPanel): Call _generateDisclosureTrianglesIfNeeded.
30813        (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded): Load the open and closed images.
30814        (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded._disclosureImageLoaded): Call
30815        _generateDisclosureTriangle for the normal and selected state with different colors for each.
30816        (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded._generateDisclosureTriangle):
30817        Fill the image with the color and draw it with the desired shadow.
30818
308192011-11-28  Timothy Hatcher  <timothy@apple.com>
30820
30821        Create a TreeOutline for WebInspector.NavigationSidebarPanel that is styled like Xcode 4's Project Navigator.
30822
30823        The disclosure triangle generation is not part of this change, they will come in a later change.
30824
30825        Reviewed by Brian Weinstein and Joseph Pecoraro.
30826
30827        * UserInterface/Main.html: Included TreeOutline.js.
30828        * UserInterface/NavigationSidebarPanel.css: Style rules for .navigation-sidebar-panel-content-tree-outline
30829        and decedent elements.
30830        * UserInterface/NavigationSidebarPanel.js:
30831        (WebInspector.NavigationSidebarPanel): Create the TreeOutline and its element. Call _generateStyleRulesIfNeeded.
30832        (WebInspector.NavigationSidebarPanel.prototype.get contentElement): Added.
30833        (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineElement): Added.
30834        (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutline): Added.
30835        (WebInspector.NavigationSidebarPanel.prototype._generateStyleRulesIfNeeded): Added. Make repetitive style rules for
30836        15 levels of indentation.
30837
308382011-11-28  Timothy Hatcher  <timothy@apple.com>
30839
30840        Add WebInspector.NavigationSidebarPanel as a base class for all navigation
30841        sidebar panels so they can share code for the content element and filter bar.
30842
30843        Only the content element is there now, the filter bar is coming later.
30844
30845        Reviewed by Dan Bernstein.
30846
30847        * UserInterface/Main.html: Add NavigationSidebarPanel.js and NavigationSidebarPanel.css.
30848        * UserInterface/NavigationSidebarPanel.css: Added.
30849        (.sidebar > .panel.navigation > .content): Account for 22px at the bottom for the future
30850        filter bar height.
30851        * UserInterface/NavigationSidebarPanel.js: Added.
30852        (WebInspector.NavigationSidebarPanel):
30853        (WebInspector.NavigationSidebarPanel.prototype.get contentElement):
30854        * UserInterface/ResourceSidebarPanel.js:
30855        (WebInspector.ResourceSidebarPanel): Inherit from NavigationSidebarPanel instead of SidebarPanel.
30856
308572011-11-28  Timothy Hatcher  <timothy@apple.com>
30858
30859        Add events to the Web Inspector for frame and resource changes.
30860
30861        These events will be used to keep the user interface up-to-date.
30862
30863        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30864
30865        Reviewed by Joseph Pecoraro.
30866
30867        * UserInterface/Frame.js:
30868        (WebInspector.Frame.prototype.initialize):
30869        (WebInspector.Frame.prototype.startProvisionalLoad):
30870        (WebInspector.Frame.prototype.commitProvisionalLoad):
30871        (WebInspector.Frame.prototype.clearProvisionalLoad):
30872        (WebInspector.Frame.prototype.addChildFrame):
30873        (WebInspector.Frame.prototype.removeChildFrame):
30874        (WebInspector.Frame.prototype.removeAllChildFrames):
30875        (WebInspector.Frame.prototype.addResource):
30876        (WebInspector.Frame.prototype.removeResource):
30877        (WebInspector.Frame.prototype.removeAllResources):
30878        (WebInspector.Frame.prototype._resourceURLDidChange):
30879        (WebInspector.Frame.prototype._dispatchMainResourceDidChangeEvent):
30880        * UserInterface/FrameResourceManager.js:
30881        (WebInspector.FrameResourceManager.prototype.initialize):
30882        (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
30883        (WebInspector.FrameResourceManager.prototype.frameDidDetach):
30884        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
30885        (WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload):
30886        (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
30887        (WebInspector.FrameResourceManager.prototype._dispatchFrameWasAddedEvent):
30888        (WebInspector.FrameResourceManager.prototype._dispatchMainFrameDidChangeEvent):
30889        * UserInterface/Resource.js:
30890        (WebInspector.Resource.prototype.updateForResponse):
30891
308922011-11-28  Timothy Hatcher  <timothy@apple.com>
30893
30894        Keep WebInspector.FrameResourceManager up-to-date during resource loads.
30895
30896        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30897
30898        Reviewed by Joseph Pecoraro.
30899
30900        * UserInterface/Frame.js:
30901        (WebInspector.Frame):
30902        (WebInspector.Frame.prototype.initialize): Add an assert. Set the loaderIdentifier and call clearProvisionalLoad.
30903        (WebInspector.Frame.prototype.startProvisionalLoad): Added.
30904        (WebInspector.Frame.prototype.commitProvisionalLoad): Added.
30905        (WebInspector.Frame.prototype.clearProvisionalLoad): Added.
30906        (WebInspector.Frame.prototype.get loaderIdentifier): Added.
30907        (WebInspector.Frame.prototype.get provisionalLoaderIdentifier): Added.
30908        (WebInspector.Frame.prototype.get provisionalMainResource): Added.
30909        (WebInspector.Frame.prototype.addResource): Use _associateWithResource.
30910        (WebInspector.Frame.prototype.removeResource): Use _disassociateWithResource.
30911        (WebInspector.Frame.prototype.removeAllResources): Ditto.
30912        (WebInspector.Frame.prototype._associateWithResource): Added.
30913        (WebInspector.Frame.prototype._disassociateWithResource): Added.
30914        (WebInspector.Frame.prototype._resourceURLDidChange): Added.
30915        * UserInterface/FrameResourceManager.js:
30916        (WebInspector.FrameResourceManager): Enable the NetworkAgent.
30917        (WebInspector.FrameResourceManager.prototype.initialize): Initialize _resourceRequestIdentifierMap.
30918        (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Call commitProvisionalLoad if this was the provisionalLoaderIdentifier.
30919        (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Added.
30920        (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Added.
30921        (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Added.
30922        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Added.
30923        (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Added.
30924        (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added.
30925        (WebInspector.FrameResourceManager.prototype._addResourceToFrame): Added.
30926        (WebInspector.FrameResourceManager.prototype._createFrame): Pass the loaderId.
30927        * UserInterface/NetworkObserver.js:
30928        (WebInspector.NetworkObserver.prototype.requestWillBeSent): Call FrameResourceManager.
30929        (WebInspector.NetworkObserver.prototype.responseReceived): Ditto.
30930        (WebInspector.NetworkObserver.prototype.loadingFinished): Ditto.
30931        (WebInspector.NetworkObserver.prototype.loadingFailed): Ditto.
30932        (WebInspector.NetworkObserver.prototype.requestServedFromMemoryCache): Ditto.
30933        * UserInterface/PageObserver.js:
30934        (WebInspector.PageObserver.prototype.frameNavigated): Pass the loaderId.
30935        * UserInterface/Resource.js:
30936        (WebInspector.Resource): Added loaderIdentifier.
30937        (WebInspector.Resource.prototype.get loaderIdentifier): Added.
30938        (WebInspector.Resource.prototype.updateForRedirectResponse): Added.
30939        (WebInspector.Resource.prototype.updateForResponse): Added.
30940
309412011-11-28  Timothy Hatcher  <timothy@apple.com>
30942
30943        Add WebInspector.Resource and populate existing resources for page frames.
30944
30945        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30946
30947        Reviewed by Sam Weinig.
30948
30949        * UserInterface/Frame.js:
30950        (WebInspector.Frame.prototype.initialize): Remove _url and _mimeType. Add _mainResource, _resources and _resourceURLMap.
30951        (WebInspector.Frame.prototype.get url): Get the URL from the mainResource.
30952        (WebInspector.Frame.prototype.get mainResource): Added.
30953        (WebInspector.Frame.prototype.get resources): Added.
30954        (WebInspector.Frame.prototype.resourceForURL): Added.
30955        (WebInspector.Frame.prototype.addResource): Added.
30956        (WebInspector.Frame.prototype.removeResource): Added.
30957        (WebInspector.Frame.prototype.removeAllResources): Added.
30958        * UserInterface/FrameResourceManager.js:
30959        (WebInspector.FrameResourceManager.prototype._createResource): Added.
30960        (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Call _createResource for each
30961        resource in the payload.
30962        * UserInterface/Main.html:
30963        * UserInterface/Resource.js: Added.
30964        (WebInspector.Resource):
30965        (WebInspector.Resource.Type.fromMIMEType):
30966        (WebInspector.Resource.prototype.get url):
30967        (WebInspector.Resource.prototype.get type):
30968        (WebInspector.Resource.prototype.get mimeType):
30969        (WebInspector.Resource.prototype.get parentFrame):
30970
309712011-11-28  Timothy Hatcher  <timothy@apple.com>
30972
30973        Keep WebInspector.FrameResourceManager up-to-date during navigation, adding and detaching frames.
30974
30975        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
30976
30977        Reviewed by Ada Chan.
30978
30979        * UserInterface/Frame.js:
30980        (WebInspector.Frame): Call initialize.
30981        (WebInspector.Frame.prototype.initialize): Added.
30982        (WebInspector.Frame.prototype.get parentFrame): Added.
30983        (WebInspector.Frame.prototype.childFrameForIdentifier): Added.
30984        (WebInspector.Frame.prototype.addChildFrame): Call removeChildFrame on the previous parentFrame. Set parentFrame.
30985        (WebInspector.Frame.prototype.removeChildFrame): Added.
30986        (WebInspector.Frame.prototype.removeAllChildFrames): Added.
30987        * UserInterface/FrameResourceManager.js:
30988        (WebInspector.FrameResourceManager.prototype.frameForIdentifier): Added.
30989        (WebInspector.FrameResourceManager.prototype.frameDidNavigate): Added.
30990        (WebInspector.FrameResourceManager.prototype.frameDidDetach): Added.
30991        (WebInspector.FrameResourceManager.prototype._createFrame): Added.
30992        (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Use _createFrame.
30993        * UserInterface/PageObserver.js:
30994        (WebInspector.PageObserver.prototype.frameNavigated): Call WebInspector.FrameResourceManager.frameDidNavigate.
30995        (WebInspector.PageObserver.prototype.frameDetached): Call WebInspector.FrameResourceManager.frameDidDetach.
30996
309972011-11-28  Timothy Hatcher  <timothy@apple.com>
30998
30999        Add WebInspector.FrameResourceManager and have it build up the basic frame tree for the inspected page.
31000
31001        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
31002
31003        Reviewed by Jessie Berlin.
31004
31005        * UserInterface/Frame.js: Added.
31006        (WebInspector.Frame):
31007        (WebInspector.Frame.prototype.get id):
31008        (WebInspector.Frame.prototype.get name):
31009        (WebInspector.Frame.prototype.get url):
31010        (WebInspector.Frame.prototype.get childFrames):
31011        (WebInspector.Frame.prototype.addChildFrame):
31012        * UserInterface/FrameResourceManager.js: Added.
31013        (WebInspector.FrameResourceManager):
31014        (WebInspector.FrameResourceManager.prototype.initialize):
31015        (WebInspector.FrameResourceManager.prototype.get mainFrame):
31016        (WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload):
31017        (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
31018        * UserInterface/Main.html: Include Frame.js and FrameResourceManager.js.
31019        * UserInterface/Main.js:
31020        (WebInspector.contentLoaded): Create an instance of WebInspector.FrameResourceManager.
31021
310222011-11-28  Timothy Hatcher  <timothy@apple.com>
31023
31024        Reorder the calls in WebInspector.contentLoaded to put InspectorBackend first.
31025
31026        This is needed so that the InspectorBackend is ready to use by the user interface elements.
31027
31028        Reviewed by Dan Bernstein.
31029
31030        * UserInterface/Main.js:
31031        (WebInspector.contentLoaded):
31032
310332011-11-28  Timothy Hatcher  <timothy@apple.com>
31034
31035        Add Element.removeChildren, Array.remove and isEnterKey for the Web Inspector,
31036        which are needed by TreeOutline.
31037
31038        Reviewed by Dan Bernstein.
31039
31040        * UserInterface/Utilities.js:
31041        (Element.prototype.removeChildren): Added.
31042        (Array.prototype.remove): Added.
31043        (isEnterKey): Added.
31044
310452011-11-28  Timothy Hatcher  <timothy@apple.com>
31046
31047        Copy the treeoutline.js file from the OpenSource to use in the new Web Inspector.
31048
31049        Rubber-stamped by Dan Bernstein.
31050
31051        * UserInterface/TreeOutline.js: Copied from WebCore/inspector/front-end/treeoutline.js.
31052
310532011-11-28  Timothy Hatcher  <timothy@apple.com>
31054
31055        Copy the BinarySearch.js file from the OpenSource to use in the new Web Inspector.
31056
31057        Rubber-stamped by Dan Bernstein.
31058
31059        * UserInterface/BinarySearch.js: Copied from WebCore/inspector/front-end/BinarySearch.js.
31060
310612011-11-28  Timothy Hatcher  <timothy@apple.com>
31062
31063        Make double clicking a sidebar divider toggle the collapsed state of the sidebar.
31064
31065        Reviewed by Dan Bernstein.
31066
31067        * UserInterface/Sidebar.js:
31068        (WebInspector.Sidebar): Add dblclick event listener on the resizer element.
31069        (WebInspector.Sidebar.prototype._resizerDoubleClicked): Toggle the collapsed state.
31070
310712011-11-28  Timothy Hatcher  <timothy@apple.com>
31072
31073        Make Element.totalOffsetLeft and Element.totalOffsetTop getters again.
31074
31075        Historically these were getters until a Google engineer changed them.
31076        I didn't realize they weren't anymore and used totalOffsetTop as a
31077        getter when making WebInspector.NavigationBar, which is a bug.
31078
31079        Reviewed by Darin Adler.
31080
31081        * UserInterface/Sidebar.js:
31082        (WebInspector.Sidebar.prototype._resizerMouseMoved): Remove the function call
31083        when using totalOffsetLeft.
31084        * UserInterface/Utilities.js:
31085        (Element.prototype.totalOffsetLeft): Made a getter using __defineGetter__.
31086        (Element.prototype.totalOffsetTop): Ditto.
31087
310882011-11-28  Timothy Hatcher  <timothy@apple.com>
31089
31090        Update Web Inspector event observers to reflect changes in Inspector.json from Open Source as of r101194.
31091
31092        Reviewed by Anders Carlsson.
31093
31094        * UserInterface/DebuggerObserver.js:
31095        (WebInspector.DebuggerObserver.prototype.debuggerWasEnabled): Removed.
31096        (WebInspector.DebuggerObserver.prototype.debuggerWasDisabled): Removed.
31097        (WebInspector.DebuggerObserver.prototype.globalObjectCleared): Added.
31098        * UserInterface/InspectorObserver.js:
31099        (WebInspector.InspectorObserver.prototype.disconnectFromBackend): Removed.
31100        (WebInspector.InspectorObserver.prototype.disconnectFromWorker): Added.
31101        (WebInspector.InspectorObserver.prototype.bringToFront): Removed.
31102        (WebInspector.InspectorObserver.prototype.reset): Removed.
31103        (WebInspector.InspectorObserver.prototype.showPanel): Removed.
31104        (WebInspector.InspectorObserver.prototype.startUserInitiatedDebugging): Removed.
31105        * UserInterface/NetworkObserver.js:
31106        (WebInspector.NetworkObserver.prototype.responseReceived): Added frameId and loaderId arguments.
31107
311082011-11-14  Timothy Hatcher  <timothy@apple.com>
31109
31110        Fix copy and paste error that called InspectorBackend.registerConsoleDispatcher
31111        for all the other dispatchers.
31112
31113        Reviewed by Joseph Pecoraro.
31114
31115        * UserInterface/Main.js:
31116        (WebInspector.contentLoaded):
31117
311182011-11-11  Timothy Hatcher  <timothy@apple.com>
31119
31120        Add the ResourceSidebarPanel class in the new Web Inspector.
31121
31122        Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
31123
31124        Reviewed by Jessie Berlin.
31125
31126        * UserInterface/Main.html:
31127        * UserInterface/Main.js:
31128        (WebInspector.contentLoaded): Use ResourceSidebarPanel for the Resource panel.
31129        * UserInterface/ResourceSidebarPanel.js: Added.
31130        (WebInspector.ResourceSidebarPanel):
31131
311322011-11-14  Timothy Hatcher  <timothy@apple.com>
31133
31134        Add WebInspector.ApplicationCacheObserver with stubs for events defined by the "ApplicationCache" domain.
31135
31136        Reviewed by Brian Weinstein.
31137
31138        * UserInterface/ApplicationCacheObserver.js: Added.
31139        (WebInspector.ApplicationCacheObserver):
31140        (WebInspector.ApplicationCacheObserver.prototype.applicationCacheStatusUpdated): Not implemented.
31141        (WebInspector.ApplicationCacheObserver.prototype.networkStateUpdated): Not implemented.
31142        * UserInterface/Main.html: Include ApplicationCacheObserver.js.
31143        * UserInterface/Main.js:
31144        (WebInspector.contentLoaded): Register an instance of WebInspector.ApplicationCacheObserver with InspectorBackend.
31145
311462011-11-14  Timothy Hatcher  <timothy@apple.com>
31147
31148        Add WebInspector.DOMStorageObserver with stubs for events defined by the "DOMStorage" domain.
31149
31150        Reviewed by Brian Weinstein.
31151
31152        * UserInterface/DOMStorageObserver.js: Added.
31153        (WebInspector.DOMStorageObserver):
31154        (WebInspector.DOMStorageObserver.prototype.addDOMStorage): Not implemented.
31155        (WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Not implemented.
31156        * UserInterface/Main.html: Include DOMStorageObserver.js.
31157        * UserInterface/Main.js:
31158        (WebInspector.contentLoaded): Register an instance of WebInspector.DOMStorageObserver with InspectorBackend.
31159
311602011-11-14  Timothy Hatcher  <timothy@apple.com>
31161
31162        Add WebInspector.DatabaseObserver with stubs for events defined by the "Database" domain.
31163
31164        Reviewed by Brian Weinstein.
31165
31166        * UserInterface/DatabaseObserver.js: Added.
31167        (WebInspector.DatabaseObserver):
31168        (WebInspector.DatabaseObserver.prototype.addDatabase): Not implemented.
31169        (WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Not implemented.
31170        (WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Not implemented.
31171        * UserInterface/Main.html: Include DatabaseObserver.js.
31172        * UserInterface/Main.js:
31173        (WebInspector.contentLoaded): Register an instance of WebInspector.DatabaseObserver with InspectorBackend.
31174
311752011-11-14  Timothy Hatcher  <timothy@apple.com>
31176
31177        Add WebInspector.DebuggerObserver with stubs for events defined by the "Debugger" domain.
31178
31179        Reviewed by Brian Weinstein.
31180
31181        * UserInterface/DebuggerObserver.js: Added.
31182        (WebInspector.DebuggerObserver):
31183        (WebInspector.DebuggerObserver.prototype.debuggerWasEnabled): Not implemented.
31184        (WebInspector.DebuggerObserver.prototype.debuggerWasDisabled): Not implemented.
31185        (WebInspector.DebuggerObserver.prototype.scriptParsed): Not implemented.
31186        (WebInspector.DebuggerObserver.prototype.scriptFailedToParse): Not implemented.
31187        (WebInspector.DebuggerObserver.prototype.breakpointResolved): Not implemented.
31188        (WebInspector.DebuggerObserver.prototype.paused): Not implemented.
31189        (WebInspector.DebuggerObserver.prototype.resumed): Not implemented.
31190        * UserInterface/Main.html: Include DebuggerObserver.js.
31191        * UserInterface/Main.js:
31192        (WebInspector.contentLoaded): Register an instance of WebInspector.DebuggerObserver with InspectorBackend.
31193
311942011-11-14  Timothy Hatcher  <timothy@apple.com>
31195
31196        Add WebInspector.DOMObserver with stubs for events defined by the "DOM" domain.
31197
31198        Reviewed by Brian Weinstein.
31199
31200        * UserInterface/DOMObserver.js: Added.
31201        (WebInspector.DOMObserver):
31202        (WebInspector.DOMObserver.prototype.documentUpdated): Not implemented.
31203        (WebInspector.DOMObserver.prototype.setChildNodes): Not implemented.
31204        (WebInspector.DOMObserver.prototype.attributeModified): Not implemented.
31205        (WebInspector.DOMObserver.prototype.attributeRemoved): Not implemented.
31206        (WebInspector.DOMObserver.prototype.inlineStyleInvalidated): Not implemented.
31207        (WebInspector.DOMObserver.prototype.characterDataModified): Not implemented.
31208        (WebInspector.DOMObserver.prototype.childNodeCountUpdated): Not implemented.
31209        (WebInspector.DOMObserver.prototype.childNodeInserted): Not implemented.
31210        (WebInspector.DOMObserver.prototype.childNodeRemoved): Not implemented.
31211        * UserInterface/Main.html: Include DOMObserver.js.
31212        * UserInterface/Main.js:
31213        (WebInspector.contentLoaded): Register an instance of WebInspector.DOMObserver with InspectorBackend.
31214
312152011-11-14  Timothy Hatcher  <timothy@apple.com>
31216
31217        Add WebInspector.NetworkObserver with stubs for events defined by the "Network" domain.
31218
31219        Reviewed by Sam Weinig.
31220
31221        * UserInterface/Main.html: Include NetworkObserver.js.
31222        * UserInterface/Main.js:
31223        (WebInspector.contentLoaded): Register an instance of WebInspector.NetworkObserver with InspectorBackend.
31224        * UserInterface/NetworkObserver.js: Added.
31225        (WebInspector.NetworkObserver):
31226        (WebInspector.NetworkObserver.prototype.requestWillBeSent): Not implemented.
31227        (WebInspector.NetworkObserver.prototype.requestServedFromCache): Not implemented.
31228        (WebInspector.NetworkObserver.prototype.responseReceived): Not implemented.
31229        (WebInspector.NetworkObserver.prototype.dataReceived): Not implemented.
31230        (WebInspector.NetworkObserver.prototype.loadingFinished): Not implemented.
31231        (WebInspector.NetworkObserver.prototype.loadingFailed): Not implemented.
31232        (WebInspector.NetworkObserver.prototype.requestServedFromMemoryCache): Not implemented.
31233        (WebInspector.NetworkObserver.prototype.webSocketWillSendHandshakeRequest): Not implemented.
31234        (WebInspector.NetworkObserver.prototype.webSocketHandshakeResponseReceived): Not implemented.
31235        (WebInspector.NetworkObserver.prototype.webSocketCreated): Not implemented.
31236        (WebInspector.NetworkObserver.prototype.webSocketClosed): Not implemented.
31237
312382011-11-14  Timothy Hatcher  <timothy@apple.com>
31239
31240        Add WebInspector.ConsoleObserver with stubs for events defined by the "Console" domain.
31241
31242        Reviewed by Sam Weinig.
31243
31244        * UserInterface/Main.html: Include ConsoleObserver.js.
31245        * UserInterface/Main.js:
31246        (WebInspector.contentLoaded): Register an instance of WebInspector.ConsoleObserver with InspectorBackend.
31247        * UserInterface/ConsoleObserver.js: Added.
31248        (WebInspector.ConsoleObserver):
31249        (WebInspector.ConsoleObserver.prototype.messageAdded): Not implemented.
31250        (WebInspector.ConsoleObserver.prototype.messageRepeatCountUpdated): Not implemented.
31251        (WebInspector.ConsoleObserver.prototype.messagesCleared): Not implemented.
31252
312532011-11-14  Timothy Hatcher  <timothy@apple.com>
31254
31255        Add WebInspector.PageObserver with stubs for events defined by the "Page" domain.
31256
31257        Reviewed by Sam Weinig.
31258
31259        * UserInterface/Main.html: Include PageObserver.js.
31260        * UserInterface/Main.js:
31261        (WebInspector.contentLoaded): Register an instance of WebInspector.PageObserver with InspectorBackend.
31262        * UserInterface/PageObserver.js: Added.
31263        (WebInspector.PageObserver):
31264        (WebInspector.PageObserver.prototype.domContentEventFired): Not implemented.
31265        (WebInspector.PageObserver.prototype.loadEventFired): Not implemented.
31266        (WebInspector.PageObserver.prototype.frameNavigated): Not implemented.
31267        (WebInspector.PageObserver.prototype.frameDetached): Not implemented.
31268
312692011-11-13  Timothy Hatcher  <timothy@apple.com>
31270
31271        Add WebInspector.InspectorObserver to receive events defined by the "Inspector" domain.
31272        Most of the events are unimplemented stubs at this point.
31273
31274        Reviewed by Sam Weinig.
31275
31276        * UserInterface/InspectorObserver.js: Added.
31277        (WebInspector.InspectorObserver):
31278        (WebInspector.InspectorObserver.prototype.frontendReused): Not implemented.
31279        (WebInspector.InspectorObserver.prototype.bringToFront): Call through to InspectorFrontendHost.
31280        (WebInspector.InspectorObserver.prototype.disconnectFromBackend): Ditto.
31281        (WebInspector.InspectorObserver.prototype.reset): Not implemented.
31282        (WebInspector.InspectorObserver.prototype.showPanel): Not implemented.
31283        (WebInspector.InspectorObserver.prototype.startUserInitiatedDebugging): Not implemented.
31284        (WebInspector.InspectorObserver.prototype.evaluateForTestInFrontend): Not implemented.
31285        (WebInspector.InspectorObserver.prototype.inspect): Not implemented.
31286        (WebInspector.InspectorObserver.prototype.didCreateWorker): Not implemented.
31287        (WebInspector.InspectorObserver.prototype.didDestroyWorker): Not implemented.
31288        * UserInterface/Main.html: Include InspectorObserver.js.
31289        * UserInterface/Main.js:
31290        (WebInspector.contentLoaded): Removed the load event listener and call InspectorFrontendHost.loaded
31291        here. Register an instance of WebInspector.InspectorObserver with InspectorBackend.
31292
312932011-11-13  Timothy Hatcher  <timothy@apple.com>
31294
31295        Include InspectorBackend.js and start accepting messages from the backend.
31296
31297        Reviewed by Joseph Pecoraro.
31298
31299        * UserInterface/Main.html:
31300        * UserInterface/Main.js:
31301        (WebInspector.dispatchNextQueuedMessageFromBackend): Added.
31302        (WebInspector.dispatchMessageFromBackend): Added.
31303
313042011-11-11  Timothy Hatcher  <timothy@apple.com>
31305
31306        Copy InspectorBackendStub.js from WebCore so it can be used by the new Web Inspector.
31307
31308        Reviewed by Joseph Pecoraro.
31309
31310        * WebInspectorUI.xcodeproj/project.pbxproj: Add new Copy WebCore Inspector Resources build phase.
31311        * Configurations/Base.xcconfig: Add WEBCORE_RESOURCES_DIR.
31312
313132011-11-10  Timothy Hatcher  <timothy@apple.com>
31314
31315        Add WebInspector.FlexibleSpaceNavigationItem and make the navigation bar use flex box layout.
31316
31317        This change will allow for controls that float to the right or left (like a close button when docked.)
31318
31319        Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
31320
31321        Reviewed by Joseph Pecoraro.
31322
31323        * UserInterface/Main.js:
31324        (WebInspector.contentLoaded): Add flexible spaces on each side.
31325        * UserInterface/NavigationBar.css:
31326        (.navigation-bar): Use -webkit-box.
31327        (.navigation-bar > .item): Added.
31328        (.navigation-bar > .item.flexible-space): Added.
31329        (.navigation-bar > .item.button): Remove styles that aren't needed anymore.
31330        (.navigation-bar > .item.button > .glyph): Use auto margins to center the glyph since text-align no longer works.
31331        * UserInterface/NavigationBar.js:
31332        (WebInspector.NavigationBar.prototype._calculateMinimumWidth): Skip flexible spaces.
31333        (WebInspector.FlexibleSpaceNavigationItem): Added.
31334        * UserInterface/Sidebar.js:
31335        (WebInspector.Sidebar.prototype.get navigationBar): Added.
31336
313372011-11-10  Timothy Hatcher  <timothy@apple.com>
31338
31339        Rename WebInspector.NavigationItem to WebInspector.ButtonNavigationItem and make new
31340        WebInspector.RadioButtonNavigationItem and WebInspector.NavigationItem classes.
31341
31342        This change allows for future non-radio-button items to be placed in a NavigationBar.
31343
31344        Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
31345
31346        Reviewed by Joseph Pecoraro.
31347
31348        * UserInterface/NavigationBar.css:
31349        (.navigation-bar > .item.button):
31350        (.navigation-bar.collapsed > .item.button):
31351        (.navigation-bar > .item.button > .glyph):
31352        (.navigation-bar > .item.button.selected):
31353        * UserInterface/NavigationBar.js:
31354        (WebInspector.NavigationBar.prototype._mouseDown):
31355        (WebInspector.NavigationBar.prototype._mouseMoved):
31356        (WebInspector.NavigationItem):
31357        (WebInspector.NavigationItem.prototype.get _classNames):
31358        (WebInspector.ButtonNavigationItem):
31359        (WebInspector.ButtonNavigationItem.prototype.generateStyleText):
31360        (WebInspector.ButtonNavigationItem.prototype._additionalClassNames.WebInspector.ButtonNavigationItem.StyleClassName._canvasIdentifier):
31361        (WebInspector.ButtonNavigationItem.prototype._generateImages._imageLoaded):
31362        (WebInspector.ButtonNavigationItem.prototype._generateImages._createEmbossedCanvasImage):
31363        (WebInspector.RadioButtonNavigationItem):
31364        (WebInspector.RadioButtonNavigationItem.prototype.get selected):
31365        (WebInspector.RadioButtonNavigationItem.prototype.set selected):
31366        (WebInspector.RadioButtonNavigationItem.prototype.get active):
31367        (WebInspector.RadioButtonNavigationItem.prototype.set active):
31368        (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText):
31369        * UserInterface/Sidebar.js:
31370        (WebInspector.SidebarPanel):
31371
313722011-11-10  Timothy Hatcher  <timothy@apple.com>
31373
31374        Add support for resizing the sidebars in the new Web Inspector.
31375
31376        Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
31377
31378        Reviewed by John Sullivan.
31379
31380        * UserInterface/Main.css:
31381        (body): Prevent overflow.
31382        (#navigation-sidebar): Moved border and background properties to Sidebar.css.
31383        (#details-sidebar): Ditto.
31384        * UserInterface/Main.js:
31385        (WebInspector.contentLoaded): Specify the side for the sidebars.
31386        * UserInterface/Sidebar.css:
31387        (.sidebar.collapsed): Added.
31388        (.sidebar > .resizer): Added.
31389        (.sidebar.right > .resizer): Added.
31390        (.sidebar.left > .resizer): Added.
31391        (.sidebar.collapsed.right > .resizer): Added.
31392        (.sidebar.collapsed.left > .resizer): Added.
31393        (.sidebar.left): Added.
31394        (.sidebar.left:not(.collapsed) > .navigation-bar): Added.
31395        (body.window-inactive .sidebar.left > .navigation-bar): Added.
31396        (.sidebar.right): Added.
31397        (.sidebar.right:not(.collapsed) > .navigation-bar): Added.
31398        (body.window-inactive .sidebar.right > .navigation-bar): Added.
31399        * UserInterface/Sidebar.js:
31400        (WebInspector.Sidebar): Added the side argument. Setup the resizer element.
31401        (WebInspector.Sidebar.prototype.get minimumWidth): Added.
31402        (WebInspector.Sidebar.prototype.get maximumWidth): Added.
31403        (WebInspector.Sidebar.prototype.get width): Added.
31404        (WebInspector.Sidebar.prototype.set width): Added.
31405        (WebInspector.Sidebar.prototype.get collapsed): Added.
31406        (WebInspector.Sidebar.prototype.set collapsed): Added.
31407        (WebInspector.Sidebar.prototype.get side): Added.
31408        (WebInspector.Sidebar.prototype._resizerMouseDown): Added.
31409        (WebInspector.Sidebar.prototype._resizerMouseMoved): Added.
31410        (WebInspector.Sidebar.prototype._resizerMouseUp): Added.
31411
314122011-11-10  Timothy Hatcher  <timothy@apple.com>
31413
31414        Add minimumWidth and support for collapsing of the navigation bar items in the Web Inspector.
31415
31416        Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
31417
31418        Reviewed by John Sullivan and Joseph Pecoraro.
31419
31420        * UserInterface/NavigationBar.css:
31421        (.navigation-bar): Prevent overflow.
31422        * UserInterface/NavigationBar.js:
31423        (WebInspector.NavigationBar.prototype.addNavigationItem): Set _minimumWidthNeedsRecalculated to true.
31424        (WebInspector.NavigationBar.prototype.updateLayout): Added.
31425        (WebInspector.NavigationBar.prototype.get minimumWidth): Added. Call _calculateMinimumWidth if needed.
31426        (WebInspector.NavigationBar.prototype._calculateMinimumWidth): Added.
31427
314282011-11-09  Timothy Hatcher  <timothy@apple.com>
31429
31430        Use child CSS selectors for the NavigationBar in the new Web Inspector.
31431
31432        Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
31433
31434        Reviewed by Jon Honeycutt.
31435
31436        * UserInterface/NavigationBar.css:
31437        (.navigation-bar > .item):
31438        (.navigation-bar.collapsed > .item):
31439        (.navigation-bar > .item > .glyph):
31440        (.navigation-bar > .item.selected):
31441        * UserInterface/NavigationBar.js:
31442        (WebInspector.NavigationItem.prototype.generateStyleText):
31443
314442011-11-09  Timothy Hatcher  <timothy@apple.com>
31445
31446        Improve the window inactive appearance for the navigation bars and sidebars in the new Web Inspector.
31447
31448        Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
31449
31450        Reviewed by Jon Honeycutt.
31451
31452        * UserInterface/Main.css:
31453        (body.window-inactive #navigation-sidebar > .navigation-bar): Added. Set a grey background color.
31454        (#details-sidebar > .navigation-bar): Use a grey background color.
31455        (body.window-inactive #details-sidebar > .navigation-bar): Added. Set a grey background color.
31456        * UserInterface/NavigationBar.css:
31457        (body.window-inactive .navigation-bar): Use a grey background color.
31458        * UserInterface/Sidebar.css:
31459        (body.window-inactive .sidebar): Slight tweak to the grey color to match Xcode.
31460
314612011-11-09  Timothy Hatcher  <timothy@apple.com>
31462
31463        Layout the sidebars and basic structure of the new Web Inspector.
31464
31465        Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
31466
31467        Reviewed by Joseph Pecoraro.
31468
31469        * UserInterface/Main.css:
31470        (body): Use flex-box, position to fill the viewport. Disabled user select and drag.
31471        (#navigation-sidebar): Added.
31472        (#navigation-sidebar > .navigation-bar): Added.
31473        (#content): Added.
31474        (#content-panels): Added.
31475        (#quick-navigation-bar): Added.
31476        (#details-sidebar): Added.
31477        (#details-sidebar > .navigation-bar): Added.
31478        * UserInterface/Main.html:
31479        * UserInterface/Main.js:
31480        (WebInspector.contentLoaded): Added.
31481        (WebInspector.windowLoaded): Added.
31482
314832011-11-08  Timothy Hatcher  <timothy@apple.com>
31484
31485        Add basic Sidebar support for the new Web Inspector.
31486
31487        Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
31488
31489        Reviewed by Brian Weinstein and Joseph Pecoraro.
31490
31491        * UserInterface/Main.html: Include Sidebar.js and Sidebar.css.
31492        * UserInterface/Main.js:
31493        (windowLoaded): Change test code to use Sidebar classes.
31494        * UserInterface/Sidebar.css: Added.
31495        (.sidebar):
31496        (body.window-inactive .sidebar):
31497        (.sidebar > .navigation-bar):
31498        (.sidebar > .panel):
31499        (.sidebar > .panel.selected):
31500        * UserInterface/Sidebar.js: Added.
31501        (WebInspector.Sidebar):
31502        (WebInspector.Sidebar.prototype.addSidebarPanel):
31503        (WebInspector.Sidebar.prototype.get selectedSidebarPanel):
31504        (WebInspector.Sidebar.prototype.set selectedSidebarPanel):
31505        (WebInspector.Sidebar.prototype.get sidebarPanels):
31506        (WebInspector.Sidebar.prototype.get element):
31507        (WebInspector.Sidebar.prototype._navigationItemSelected):
31508        (WebInspector.SidebarPanel):
31509        (WebInspector.SidebarPanel.prototype.get identifier):
31510        (WebInspector.SidebarPanel.prototype.get navigationItem):
31511        (WebInspector.SidebarPanel.prototype.get element):
31512        (WebInspector.SidebarPanel.prototype.get selected):
31513        (WebInspector.SidebarPanel.prototype.set selected):
31514
315152011-11-08  Timothy Hatcher  <timothy@apple.com>
31516
31517        Fire an event when a navigation item is selected in a navigation bar.
31518
31519        Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
31520
31521        Reviewed by Brian Weinstein.
31522
31523        * UserInterface/NavigationBar.js:
31524        (WebInspector.NavigationBar.prototype.addNavigationItem): Remove unused arguments. (Drive by change.)
31525        (WebInspector.NavigationBar.prototype.set selectedNavigationItem): Avoid doing work if the item is already
31526        selected. Fire the event if the mouse isn't down.
31527        (WebInspector.NavigationBar.prototype._mouseDown): Store the previous selected item.
31528        (WebInspector.NavigationBar.prototype._mouseUp): Fire the event if the selected item is different.
31529
315302011-10-31  Timothy Hatcher  <timothy@apple.com>
31531
31532        Add the navigation bar for the new Web Insector.
31533
31534        Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
31535
31536        Reviewed by Joseph Pecoraro.
31537
31538        * UserInterface/Images/NavigationItemBreakpoint.pdf: Added.
31539        * UserInterface/Images/NavigationItemFile.pdf: Added.
31540        * UserInterface/Images/NavigationItemLog.pdf: Added.
31541        * UserInterface/Images/NavigationItemMagnifyingGlass.pdf: Added.
31542        * UserInterface/Images/NavigationItemStopwatch.pdf: Added.
31543        * UserInterface/Images/NavigationItemStorage.pdf: Added.
31544        * UserInterface/Images/NavigationItemThreads.pdf: Added.
31545        * UserInterface/Images/NavigationItemWarning.pdf: Added.
31546        * UserInterface/Main.css: Added.
31547        (*):
31548        (body):
31549        * UserInterface/Main.html:
31550        * UserInterface/Main.js: Added.
31551        (windowLoaded):
31552        * UserInterface/NavigationBar.css: Added.
31553        (.navigation-bar):
31554        (body.window-inactive .navigation-bar):
31555        (.navigation-bar .item):
31556        (.navigation-bar.collapsed .item):
31557        (.navigation-bar .item .glyph):
31558        (.navigation-bar .item.selected):
31559        (.navigation-bar:focus):
31560        * UserInterface/NavigationBar.js: Added.
31561        (WebInspector.NavigationBar):
31562        (WebInspector.NavigationBar.prototype.addNavigationItem):
31563        (WebInspector.NavigationBar.prototype.get selectedNavigationItem):
31564        (WebInspector.NavigationBar.prototype.set selectedNavigationItem):
31565        (WebInspector.NavigationBar.prototype.get navigationItems):
31566        (WebInspector.NavigationBar.prototype.get element):
31567        (WebInspector.NavigationBar.prototype._mouseDown):
31568        (WebInspector.NavigationBar.prototype._mouseMoved):
31569        (WebInspector.NavigationBar.prototype._mouseUp):
31570        (WebInspector.NavigationBar.prototype._keyDown):
31571        (WebInspector.NavigationBar.prototype._focus):
31572        (WebInspector.NavigationBar.prototype._blur):
31573        (WebInspector.NavigationBar.prototype._updateStyle):
31574        (WebInspector.NavigationItem):
31575        (WebInspector.NavigationItem.prototype.get identifier):
31576        (WebInspector.NavigationItem.prototype.get displayName):
31577        (WebInspector.NavigationItem.prototype.get image):
31578        (WebInspector.NavigationItem.prototype.get element):
31579        (WebInspector.NavigationItem.prototype.get selected):
31580        (WebInspector.NavigationItem.prototype.set selected):
31581        (WebInspector.NavigationItem.prototype.get active):
31582        (WebInspector.NavigationItem.prototype.set active):
31583        (WebInspector.NavigationItem.prototype.generateStyleText):
31584        (WebInspector.NavigationItem.prototype.get _classNames):
31585        (WebInspector.NavigationItem.prototype._canvasIdenitfier):
31586        (WebInspector.NavigationItem.prototype._generateImages._imageLoaded):
31587        (WebInspector.NavigationItem.prototype._generateImages._createEmbossedCanvasImage):
31588        (WebInspector.NavigationItem.prototype._generateImages._drawImageShadow):
31589        (WebInspector.NavigationItem.prototype._generateImages._invertMaskImage):
31590        (WebInspector.NavigationItem.prototype._generateImages._applyImageMask):
31591        (WebInspector.NavigationItem.prototype._generateImages):
31592        * UserInterface/Object.js: Added.
31593        (WebInspector.Object):
31594        (WebInspector.Object.prototype.addEventListener):
31595        (WebInspector.Object.prototype.removeEventListener):
31596        (WebInspector.Object.prototype.removeAllListeners):
31597        (WebInspector.Object.prototype.hasEventListeners):
31598        (WebInspector.Object.prototype.dispatchEventToListeners):
31599        (WebInspector.Event):
31600        (WebInspector.Event.prototype.stopPropagation):
31601        (WebInspector.Event.prototype.preventDefault):
31602        * UserInterface/Utilities.js: Added.
31603        (Node.prototype.enclosingNodeOrSelfWithClass):
31604        (Node.prototype.enclosingNodeWithClass):
31605        (Element.prototype.totalOffsetLeft):
31606        (Element.prototype.totalOffsetTop):
31607        * UserInterface/WebInspector.js: Added.
31608
316092011-10-28  Timothy Hatcher  <timothy@apple.com>
31610
31611        Add a experiments menu item to enabled the new Web Inspector. There is only a placeholder
31612        for the new inspector right now, so it isn't useful for most people yet.
31613
31614        This chnage depends on: https://webkit.org/b/71089
31615
31616        <rdar://problem/10318665> Make it possible to use a different front-end for the Web Inspector
31617
31618        Reviewed by John Sullivan.
31619
31620        * UserInterface/Main.html: Added.
31621