1 2015-12-10 Nikita Vasilyev <nvasilyev@apple.com>
3 Web Inspector: [Meta] Unify z-index values in Inspector's CSS
4 https://bugs.webkit.org/show_bug.cgi?id=151978
6 Introduce CSS variables for z-index due to recurring issues with incorrectly overlapping elements.
8 From now on, all z-index values >= 64 must be defined as variables.
9 Values below 64 must not.
11 Reviewed by Timothy Hatcher.
13 * UserInterface/Views/Variables.css:
15 Introduce z-index variables.
17 * UserInterface/Debug/UncaughtExceptionReporter.css:
19 * UserInterface/Views/BoxModelDetailsSectionRow.css:
20 (.details-section .row.box-model .editing):
21 * UserInterface/Views/CompletionSuggestionsView.css:
22 (.completion-suggestions):
23 * UserInterface/Views/DashboardContainerView.css:
24 (.dashboard-container .advance-arrow):
25 * UserInterface/Views/DataGrid.css:
26 (.data-grid .resizer):
27 * UserInterface/Views/DetailsSection.css:
28 (.details-section > .header):
29 (.details-section .details-section > .header):
30 * UserInterface/Views/FindBanner.css:
32 (.find-banner > button.segmented:active):
33 * UserInterface/Views/Main.css:
37 * UserInterface/Views/Popover.css:
39 * UserInterface/Views/Resizer.css:
41 (.glass-pane-for-drag):
42 * UserInterface/Views/TimelineOverview.css:
43 (.timeline-overview > .scroll-container):
44 * UserInterface/Views/VisualStyleSelectorSection.css:
45 (.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider):
47 2015-12-09 Matt Baker <mattbaker@apple.com>
49 Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
50 https://bugs.webkit.org/show_bug.cgi?id=151876
52 Reviewed by Brian Burg.
54 * UserInterface/Base/Main.js:
55 Use root view singleton instead of creating it explicitly.
57 * UserInterface/Views/View.js:
59 (WebInspector.View.rootView):
60 Singleton root view access. Lazily create and return a view backed
61 by the document's body element.
62 (WebInspector.View.prototype.isDescendantOf):
63 (WebInspector.View.prototype.insertSubviewBefore):
64 (WebInspector.View.prototype.removeSubview):
65 (WebInspector.View.prototype.didMoveToWindow):
66 Notify the view when it becomes, or is no longer, descended from the root view.
67 (WebInspector.View.prototype.didMoveToParent):
68 Notify the view when it's added to, or removed from, a parent view.
69 (WebInspector.View._scheduleLayoutForView):
70 (WebInspector.View._cancelScheduledLayoutForView):
71 (WebInspector.View.prototype.makeRootView): Deleted.
73 (WebInspector.View.prototype.didAttach): Deleted.
74 (WebInspector.View.prototype.didDetach): Deleted.
75 Replaced by didMoveToParent.
77 2015-12-09 Brian Burg <bburg@apple.com>
79 Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting
80 https://bugs.webkit.org/show_bug.cgi?id=151635
82 Reviewed by Timothy Hatcher.
84 When closing and reopening the inspector, the setting for whether
85 to dump protocol messages should be persisted. Otherwise, enabling
86 dumping from the debug-only UI will miss the initial flood of
87 messages that are processed when the Inspector loads initial data.
89 To support a persistent setting, and build some infrastructure for
90 more advanced uses of collected protocol messages, this patch adds
91 a new object to trace protocol events. It gets callbacks for each
92 and implements the console-dumping functionality previously baked in
95 In follow-up patches, other protocol tracers will be added to save
96 protocol data to disk, marshall it to a higher inspection level,
97 or provide more fine-grained control over what is logged.
99 This change moves Setting.js into the Base/ directory,
100 since it is used by Views, Models, and now Protocol classes.
102 * UserInterface/Base/Setting.js: Renamed from Source/WebInspectorUI/UserInterface/Models/Setting.js.
103 (WebInspector.Setting):
104 (WebInspector.Setting.prototype.get name):
105 (WebInspector.Setting.prototype.get value):
106 (WebInspector.Setting.prototype.set value):
107 * UserInterface/Main.html:
108 * UserInterface/Protocol/InspectorBackend.js:
109 (InspectorBackendClass):
110 (InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
111 (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
113 We still want to support the legacy way to enable dumping:
114 `InspectorBackend.dumpInspectorProtocolMessages = true`. This
115 is because some tests always use it, and it's easier to set this
116 flag in a custom Bootstrap.js file than to configure the Setting.
118 (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
119 (InspectorBackendClass.prototype.get dumpInspectorTimeStats):
121 We still want to support the legacy way to enable dumping:
122 `InspectorBackend.dumpInspectorTimeStats = true`. This is
123 because MessageDispatcher checks this flag for its logging.
125 (InspectorBackendClass.prototype.set activeTracer):
126 (InspectorBackendClass.prototype.get activeTracer):
128 Set the active tracer, finalizing and removing any active tracer
129 if one exists. If removing a custom tracer (setting to null), then
130 re-sync activeTracer with the automatic tracing Setting.
132 (InspectorBackendClass.prototype.dispatch):
133 (InspectorBackendClass.prototype._startOrStopAutomaticTracing):
135 Sync the Setting with activeTracer. If an custom tracer is active,
136 don't replace it with the automatic logging tracer.
138 (InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
139 (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
140 (InspectorBackendClass.prototype._sendMessageToBackend):
141 (InspectorBackendClass.prototype._dispatchResponse):
142 (InspectorBackendClass.prototype._dispatchEvent):
143 (InspectorBackendClass.prototype._flushPendingScripts):
144 * UserInterface/Protocol/LoggingProtocolTracer.js: Added.
145 (WebInspector.LoggingProtocolTracer):
146 (WebInspector.LoggingProtocolTracer.prototype.set dumpMessagesToConsole):
147 (WebInspector.LoggingProtocolTracer.prototype.get dumpMessagesToConsole):
148 (WebInspector.LoggingProtocolTracer.prototype.set dumpTimingDataToConsole):
149 (WebInspector.LoggingProtocolTracer.prototype.get dumpTimingDataToConsole):
150 (WebInspector.LoggingProtocolTracer.prototype.logFrontendException):
151 (WebInspector.LoggingProtocolTracer.prototype.logProtocolError):
152 (WebInspector.LoggingProtocolTracer.prototype.logFrontendRequest):
153 (WebInspector.LoggingProtocolTracer.prototype.logWillHandleResponse):
154 (WebInspector.LoggingProtocolTracer.prototype.logDidHandleResponse):
155 (WebInspector.LoggingProtocolTracer.prototype.logWillHandleEvent):
156 (WebInspector.LoggingProtocolTracer.prototype.logDidHandleEvent):
157 (WebInspector.LoggingProtocolTracer.prototype._processEntry):
158 * UserInterface/Protocol/ProtocolTracer.js: Added.
159 (WebInspector.ProtocolTracer.prototype.logStarted):
160 (WebInspector.ProtocolTracer.prototype.logFrontendException):
161 (WebInspector.ProtocolTracer.prototype.logProtocolError):
162 (WebInspector.ProtocolTracer.prototype.logFrontendRequest):
163 (WebInspector.ProtocolTracer.prototype.logWillHandleResponse):
164 (WebInspector.ProtocolTracer.prototype.logDidHandleResponse):
165 (WebInspector.ProtocolTracer.prototype.logWillHandleEvent):
166 (WebInspector.ProtocolTracer.prototype.logDidHandleEvent): (WebInspector.ProtocolTracer.prototype.logFinished):
167 (WebInspector.ProtocolTracer):
168 * UserInterface/Test.html:
170 2015-12-09 Brian Burg <bburg@apple.com>
172 Web Inspector: zoom with Ctrl +/- doesn't work correctly when inspector is docked
173 https://bugs.webkit.org/show_bug.cgi?id=152076
175 Reviewed by Timothy Hatcher.
177 When computing the new width or height of the inspector, take the zoom level into
178 account. window.inner{Width,Height} are in document pixels, but we need to specify
179 device pixels to InspectorFrontendHost.
181 * UserInterface/Base/Main.js:
183 2015-12-08 Joseph Pecoraro <pecoraro@apple.com>
185 Web Inspector: Workaround arrow function issue in TimelineOverviewGraph.js
186 https://bugs.webkit.org/show_bug.cgi?id=152031
188 Reviewed by Timothy Hatcher.
190 * UserInterface/Views/TimelineOverviewGraph.js:
191 (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
192 Workaround an existing arrow function issue by moving off of arrow functions here.
194 2015-12-08 Matt Baker <mattbaker@apple.com>
196 Web Inspector: Add a hidden property to TreeOutline
197 https://bugs.webkit.org/show_bug.cgi?id=152014
199 Reviewed by Timothy Hatcher.
201 * UserInterface/Views/NavigationSidebarPanel.js:
202 Removed static property for "hidden" CSS class. No longer used.
203 (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
204 Fixed bug in order of visibleTreeOutlines add/remove.
205 (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
207 * UserInterface/Views/TimelineSidebarPanel.js:
208 (WebInspector.TimelineSidebarPanel):
209 (WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
211 * UserInterface/Views/TreeOutline.js:
212 (WebInspector.TreeOutline):
213 (WebInspector.TreeOutline.prototype.get hidden):
214 (WebInspector.TreeOutline.prototype.set hidden):
215 Added hidden property, set DOM element hidden attribute.
216 (WebInspector.TreeElement.prototype.set hidden):
217 Remove CSS class, set DOM element hidden attribute.
218 (WebInspector.TreeElement.prototype._attach):
219 (WebInspector.TreeElement.prototype.expand):
221 2015-12-08 Matt Baker <mattbaker@apple.com>
223 Web Inspector: Global Breakpoints should always be visible
224 https://bugs.webkit.org/show_bug.cgi?id=151066
226 Reviewed by Timothy Hatcher.
228 * UserInterface/Views/DebuggerSidebarPanel.js:
229 (WebInspector.DebuggerSidebarPanel):
230 Turn off filtering for Global Breakpoints elements.
232 * UserInterface/Views/NavigationSidebarPanel.js:
233 (WebInspector.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
234 Allow filtering to be turned off for specific tree elements.
235 (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
236 Make element visible if filtering suppressed.
237 (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
238 Visible elements with filtering disabled aren't considered when
239 showing/hiding the empty content placeholder.
241 2015-12-07 Brian Burg <bburg@apple.com>
243 Web Inspector: Uncaught Exception page should have better styles and handle more error cases
244 https://bugs.webkit.org/show_bug.cgi?id=151923
246 Reviewed by Timothy Hatcher.
248 Restructure the Uncaught Exception reporting page to act more like
249 a modal sheet. Distinguish between uncaught exceptions before and
250 after the frontend is initially loaded. If the frontend is loaded,
251 add a clickable link that dismisses the sheet and ignores the error.
252 If the inspector finished loading, then only show at most one
253 exception at a time, since subsequent interactions can cause spurious
254 errors when the sheet is active.
256 Split existing code into multiple functions so it's easier to follow.
257 Add miscellaneous guards against internal corruption and weird cases.
259 * UserInterface/Base/Main.js:
260 (WebInspector.contentLoaded): Store the flag on the global object
261 in case WebInspector becomes shadowed or otherwise unusable.
263 * UserInterface/Debug/UncaughtExceptionReporter.css: Renamed from Source/WebInspectorUI/UserInterface/Debug/CatchEarlyErrors.css.
264 (div.sheet-container):
265 (div.uncaught-exception-sheet):
266 (div.uncaught-exception-sheet a):
267 (div.uncaught-exception-sheet a:active):
268 (div.uncaught-exception-sheet h2):
269 (div.uncaught-exception-sheet h1 > img):
270 (div.uncaught-exception-sheet h2 > img):
271 (div.uncaught-exception-sheet dl):
272 (div.uncaught-exception-sheet dt):
273 (div.uncaught-exception-sheet dd):
274 (div.uncaught-exception-sheet ul):
275 (div.uncaught-exception-sheet li):
276 * UserInterface/Debug/UncaughtExceptionReporter.js: Renamed from CatchEarlyErrors.js.
277 (stopEventPropagation): Allow clicking whitelisted links on the sheet.
278 (blockEventHandlers):
279 (unblockEventHandlers):
280 (handleUncaughtException):
282 (createErrorSheet.insertWordBreakCharacters):
285 * UserInterface/Main.html:
286 * UserInterface/Protocol/MessageDispatcher.js:
287 (WebInspector.dispatchMessageFromBackend): Don't try to dispatch
288 messages from the backend when showing the error sheet. They will
289 probably fail, so suspend dispatching until the sheet is dismissed.
291 2015-12-06 Devin Rousso <dcrousso+webkit@gmail.com>
293 Web Inspector: Regression (r192936) - changing selectors in the visual styles sidebar is broken
294 https://bugs.webkit.org/show_bug.cgi?id=151924
296 Reviewed by Brian Burg.
298 * UserInterface/Views/VisualStyleSelectorSection.js:
299 (WebInspector.VisualStyleSelectorSection):
300 (WebInspector.VisualStyleSelectorSection.prototype._selectorChanged):
301 Now uses an event listener instead of an "onselect" function.
303 2015-12-06 Matt Baker <mattbaker@apple.com>
305 Web Inspector: Comparisons in setters should use the massaged value (" = x || 0/false/null/etc")
306 https://bugs.webkit.org/show_bug.cgi?id=151910
308 Reviewed by Timothy Hatcher.
310 Updated setters that use default values to convert falsy inputs to the default value
311 before compariing against the current value.
313 * UserInterface/Models/TimelineMarker.js:
314 (WebInspector.TimelineMarker.prototype.set time):
315 Assert new value is a number.
317 * UserInterface/Views/DataGrid.js:
318 (WebInspector.DataGridNode.prototype.set hidden):
319 (WebInspector.DataGridNode.prototype.set data):
320 Assert new value is of type object. Use shallowEqual compare before setting value.
322 * UserInterface/Views/GeneralTreeElement.js:
323 (WebInspector.GeneralTreeElement.prototype.set classNames):
324 Use shallowEqual compare before setting value.
325 (WebInspector.GeneralTreeElement.prototype.set mainTitle):
326 (WebInspector.GeneralTreeElement.prototype.set subtitle):
327 (WebInspector.GeneralTreeElement.prototype.set status):
328 (WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately):
330 * UserInterface/Views/TimelineOverview.js:
331 (WebInspector.TimelineOverview.prototype.set startTime):
332 (WebInspector.TimelineOverview.prototype.set currentTime):
333 (WebInspector.TimelineOverview.prototype.set endTime):
334 (WebInspector.TimelineOverview.prototype.set scrollStartTime):
335 (WebInspector.TimelineOverview.prototype.set selectionStartTime):
336 Check current ruler selectionStartTime before setting value.
338 * UserInterface/Views/TimelineOverviewGraph.js:
339 (WebInspector.TimelineOverviewGraph.prototype.set zeroTime):
340 (WebInspector.TimelineOverviewGraph.prototype.set startTime):
341 (WebInspector.TimelineOverviewGraph.prototype.set endTime):
342 (WebInspector.TimelineOverviewGraph.prototype.set currentTime):
344 * UserInterface/Views/TimelineRuler.js:
345 (WebInspector.TimelineRuler):
346 (WebInspector.TimelineRuler.prototype.set allowsClippedLabels):
347 (WebInspector.TimelineRuler.prototype.set formatLabelCallback):
348 (WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
349 (WebInspector.TimelineRuler.prototype.set zeroTime):
350 (WebInspector.TimelineRuler.prototype.set startTime):
351 (WebInspector.TimelineRuler.prototype.set endTime):
352 (WebInspector.TimelineRuler.prototype.set secondsPerPixel):
353 (WebInspector.TimelineRuler.prototype.set selectionStartTime):
354 (WebInspector.TimelineRuler.prototype.set selectionEndTime):
355 (WebInspector.TimelineRuler.prototype.set duration): Deleted.
356 The ruler duration and "pinned" state are controlled by setting an end
357 time. Removed since it wasn't being used, and there shouldn't be two
358 ways to the exact same thing.
360 * UserInterface/Views/TimelineView.js:
361 (WebInspector.TimelineView.prototype.set zeroTime):
362 (WebInspector.TimelineView.prototype.set startTime):
363 (WebInspector.TimelineView.prototype.set endTime):
365 2015-12-04 Commit Queue <commit-queue@webkit.org>
367 Unreviewed, rolling out r193486.
368 https://bugs.webkit.org/show_bug.cgi?id=151904
370 Causes Infinite Recursion in Timeline Recording (Requested by
375 "Web Inspector: when a marked-dirty subview is attached to a
376 parent View, dirtyDescendantsCount gets out of sync"
377 https://bugs.webkit.org/show_bug.cgi?id=151876
378 http://trac.webkit.org/changeset/193486
380 2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
382 Web Inspector: Uncaught Exception with Reload shortcut in JSContext Inspector
383 https://bugs.webkit.org/show_bug.cgi?id=151896
385 Reviewed by Timothy Hatcher.
387 * UserInterface/Base/Main.js:
388 (WebInspector.contentLoaded):
389 Do not implicitly prevent default on these keyboard shortcuts
390 so we can system beep if we do not do anything.
392 (WebInspector._reloadPage):
393 (WebInspector._reloadPageIgnoringCache):
394 Bail if there is no PageAgent without preventing default for
395 a beep system beep. Prevent default if we did something.
397 2015-12-04 Matt Baker <mattbaker@apple.com>
399 Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
400 https://bugs.webkit.org/show_bug.cgi?id=151876
402 Reviewed by Brian Burg.
404 * UserInterface/Views/NewTabContentView.js:
405 (WebInspector.NewTabContentView.prototype._updateShownTabs):
406 Removed workaround added in https://bugs.webkit.org/show_bug.cgi?id=151594.
408 * UserInterface/Views/View.js:
409 (WebInspector.View._scheduleLayoutForView):
410 Always perform a synchronous layout when a view that isn't descended from the
411 root view schedules a layout.
413 2015-12-04 Brian Burg <bburg@apple.com>
415 Web Inspector: support runtime registration of tab type associations
416 https://bugs.webkit.org/show_bug.cgi?id=151594
418 Reviewed by Joseph Pecoraro.
420 We want to add special tabs that only exist in engineering builds
421 for debugging purposes. Though the relevant models and views can be
422 put in the Debug/ directory to exclude them from production builds,
423 there's no way to register tabs conditionally at runtime; tabs are
426 This patch makes it possible to register new tab types at runtime.
427 First, WebInspector keeps a map of known, registered tab classes.
428 Details that were hardcoded before---whether to show in New Tab,
429 whether a tab can be instantiated given the active domains, UI text,
430 etc.---are now static methods on the base TabContentView or overidden
431 in its subclasses. Lastly, a public method allows code in Bootstrap.js
432 to register tabs at runtime. Doing so sends a notification so the
433 NewTabContentView can show the newly available tab item.
435 * UserInterface/Base/Main.js:
436 (WebInspector.contentLoaded):
437 (WebInspector.isTabTypeAllowed):
438 (WebInspector.knownTabClasses): Added, used by NewTabContentView.
439 (WebInspector._createTabContentViewForType): Renamed from _tabContentViewForType.
440 (WebInspector._rememberOpenTabs):
441 (WebInspector._updateNewTabButtonState):
442 (WebInspector._tryToRestorePendingTabs): Added.
444 Whenever a new tab is registered, try to restore pending tabs, since
445 an extra tab won't be added initially when production tabs are added.
446 But, it could have been saved in the Setting for opened tabs.
448 (WebInspector.showNewTabTab):
449 (WebInspector.isNewTabWithTypeAllowed):
450 (WebInspector.createNewTabWithType):
451 (WebInspector._tabContentViewForType): Deleted.
452 * UserInterface/Base/Object.js:
453 * UserInterface/Views/ConsoleTabContentView.js:
454 (WebInspector.ConsoleTabContentView):
455 (WebInspector.ConsoleTabContentView.tabInfo): Added.
456 * UserInterface/Views/DebuggerTabContentView.js:
457 (WebInspector.DebuggerTabContentView):
458 (WebInspector.DebuggerTabContentView.tabInfo): Added.
459 * UserInterface/Views/ElementsTabContentView.js:
460 (WebInspector.ElementsTabContentView):
461 (WebInspector.ElementsTabContentView.tabInfo): Added.
462 (WebInspector.ElementsTabContentView.isTabAllowed): Added.
463 * UserInterface/Views/NetworkTabContentView.js:
464 (WebInspector.NetworkTabContentView):
465 (WebInspector.NetworkTabContentView.tabInfo): Added.
466 (WebInspector.NetworkTabContentView.isTabAllowed): Added.
467 * UserInterface/Views/NewTabContentView.js:
469 Keep a list of shown tab items, so we don't have to query the DOM
470 to update enabled/disabled state. Put tree construction inside a
471 layout() override and dirty the view whenever known tab types change.
473 (WebInspector.NewTabContentView):
474 (WebInspector.NewTabContentView.tabInfo): Added.
475 (WebInspector.NewTabContentView.isEphemeral): Added.
476 (WebInspector.NewTabContentView.shouldSaveTab): Added.
477 (WebInspector.NewTabContentView.prototype.layout): Added.
478 (WebInspector.NewTabContentView.prototype._updateShownTabs): Added.
479 (WebInspector.NewTabContentView.prototype._allowableTabTypes):
480 (WebInspector.NewTabContentView.prototype._updateTabItems):
481 (WebInspector.NewTabContentView.prototype.get tabItemElements): Deleted.
482 * UserInterface/Views/ResourcesTabContentView.js:
483 (WebInspector.ResourcesTabContentView):
484 (WebInspector.ResourcesTabContentView.tabInfo): Added.
485 * UserInterface/Views/SearchTabContentView.js:
486 (WebInspector.SearchTabContentView):
487 (WebInspector.SearchTabContentView.tabInfo): Added.
488 (WebInspector.SearchTabContentView.isEphemeral): Added.
489 * UserInterface/Views/SettingsTabContentView.js:
490 (WebInspector.SettingsTabContentView.isTabAllowed): Added.
491 (WebInspector.SettingsTabContentView.shouldSaveTab): Added.
492 * UserInterface/Views/StorageTabContentView.js:
493 (WebInspector.StorageTabContentView):
494 (WebInspector.StorageTabContentView.tabInfo): Added.
495 (WebInspector.StorageTabContentView.isTabAllowed): Added.
496 * UserInterface/Views/TabBrowser.js:
497 (WebInspector.TabBrowser.showTabForContentView):
499 Add a workaround for <https://webkit.org/b/151876>. This bug is
500 revealed by the changes to NewTabContentView in this patch.
502 * UserInterface/Views/TabContentView.js:
503 (WebInspector.TabContentView.isTabAllowed): Added.
504 (WebInspector.TabContentView.isEphemeral): Added.
505 (WebInspector.TabContentView.shouldSaveTab): Added.
506 * UserInterface/Views/TimelineTabContentView.js:
507 (WebInspector.TimelineTabContentView):
508 (WebInspector.TimelineTabContentView.tabInfo): Added.
509 (WebInspector.TimelineTabContentView.isTabAllowed): Added.
511 2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
513 Web Inspector: Remove untested and unused Worker inspection
514 https://bugs.webkit.org/show_bug.cgi?id=151848
516 Reviewed by Brian Burg.
518 * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
519 * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
520 * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
521 * Versions/Inspector-iOS-7.0.json:
522 * Versions/Inspector-iOS-8.0.json:
523 * Versions/Inspector-iOS-9.0.json:
524 Since this was untested in older releases as well, remove
525 the protocol interfaces for legacy versions.
527 2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
529 Web Inspector: Specifically Identify the Global Lexical Environment Scope
530 https://bugs.webkit.org/show_bug.cgi?id=151828
532 Reviewed by Brian Burg.
534 * Localizations/en.lproj/localizedStrings.js:
535 * UserInterface/Controllers/DebuggerManager.js:
536 (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
537 * UserInterface/Models/ScopeChainNode.js:
538 * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
539 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
540 Include a new scope type and give it a localized string.
542 2015-12-03 Anders Carlsson <andersca@apple.com>
544 Remove Objective-C GC support
545 https://bugs.webkit.org/show_bug.cgi?id=151819
546 rdar://problem/23746991
548 Reviewed by Dan Bernstein.
550 * Configurations/Base.xcconfig:
552 2015-12-03 Matt Baker <mattbaker@apple.com>
554 Uncaught Exception in Web Inspector: TypeError: null is not an object (evaluating 'dataGridNode.element.classList')
555 https://bugs.webkit.org/show_bug.cgi?id=151790
557 Reviewed by Timothy Hatcher.
559 * UserInterface/Views/DataGrid.js:
560 (WebInspector.DataGridNode):
561 (WebInspector.DataGridNode.prototype.get hidden):
562 (WebInspector.DataGridNode.prototype.set hidden):
563 Make hidden a property, so it can be set before the grid node's DOM element exists.
564 (WebInspector.DataGridNode.prototype.get selectable):
565 (WebInspector.DataGridNode.prototype.get element):
566 Add hidden style, if needed, when element is created.
568 * UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
569 (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange):
570 (WebInspector.TreeOutlineDataGridSynchronizer):
571 Don't access the grid node's element directly, since it may not exist yet.
573 2015-12-02 Joseph Pecoraro <pecoraro@apple.com>
575 Web Inspector: Handle YieldExpressions in the ScriptSyntaxTree
576 https://bugs.webkit.org/show_bug.cgi?id=151730
578 Reviewed by Brian Burg.
580 * UserInterface/Models/NativeFunctionParameters.js:
581 Add the Generator API.
583 * UserInterface/Models/ScriptSyntaxTree.js:
584 (WebInspector.ScriptSyntaxTree.prototype._recurse):
585 (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
586 Handle YieldExpressions.
588 2015-12-01 Matt Baker <mattbaker@apple.com>
590 Web Inspector: TreeOutline should just dispatch events via WebInspector.Object
591 https://bugs.webkit.org/show_bug.cgi?id=148067
593 Reviewed by Timothy Hatcher.
595 TreeOutline now dispatches most events via WebInspector.Object. The onselect and
596 ondeselect callbacks are replaced by a SelectionDidChange event, which includes
597 both the selected and deselected elements in its event data. The onexpand and oncollapse
598 callbacks are replaced by an ElementDisclosureDidChange event. This is consistent with the
599 behavior of onhidden, which had no corresponding onvisible callback.
601 Alas, TimelineView and TreeOutlineDataGridSynchronizer depended on the order in which
602 TreeOutline.onselect callbacks were chained together. The synchronizer added its
603 callback after the timeline view, which ensured that the tree and grid were in sync
604 before the view handled onselect and dispatched a SelectionPathComponentsDidChange.
605 The change notification causes the view's path components to be read, and timeline
606 views need the grid selection to be in a valid state to build path components.
608 This is addressed by having timeline views dispatch SelectionPathComponentsDidChange
609 events when the grid selection changes, instead of the tree selection. The change
610 required that the synchronizer no longer suppress notifications when selecting grid nodes.
612 * UserInterface/Views/DebuggerSidebarPanel.js:
613 (WebInspector.DebuggerSidebarPanel):
614 (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
615 (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
617 * UserInterface/Views/NavigationSidebarPanel.js:
618 (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
619 (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
621 * UserInterface/Views/NetworkGridContentView.js:
622 (WebInspector.NetworkGridContentView):
623 (WebInspector.NetworkGridContentView.prototype._treeSelectionDidChange):
625 * UserInterface/Views/ResourceSidebarPanel.js:
626 (WebInspector.ResourceSidebarPanel):
627 (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
628 (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Deleted.
630 * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
631 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
632 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
633 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementAdded):
634 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementDisclosureDidChange):
635 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeExpandHandler): Deleted.
636 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeCollapseHandler): Deleted.
638 * UserInterface/Views/SearchSidebarPanel.js:
639 (WebInspector.SearchSidebarPanel):
640 (WebInspector.SearchSidebarPanel.prototype._treeSelectionDidChange):
641 (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Deleted.
643 * UserInterface/Views/StorageSidebarPanel.js:
644 (WebInspector.StorageSidebarPanel):
645 (WebInspector.StorageSidebarPanel._treeSelectionDidChange):
647 * UserInterface/Views/TimelineDataGrid.js:
648 (WebInspector.TimelineDataGrid.prototype._createPopoverContent):
649 (WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange):
650 (WebInspector.TimelineDataGrid):
652 * UserInterface/Views/TimelineSidebarPanel.js:
653 (WebInspector.TimelineSidebarPanel):
654 (WebInspector.TimelineSidebarPanel.prototype._recordingsTreeSelectionDidChange):
655 (WebInspector.TimelineSidebarPanel.prototype._timelinesTreeSelectionDidChange):
656 (WebInspector.TimelineSidebarPanel.prototype._timelinesTreeElementSelected): Deleted.
658 * UserInterface/Views/TimelineView.js:
659 (WebInspector.TimelineView):
660 (WebInspector.TimelineView.prototype._treeSelectionDidChange):
661 (WebInspector.TimelineView.prototype.treeElementSelected):
662 Don't dispatch SelectionPathComponentsDidChange. Timeline views already do this
663 in response to grid selection events.
665 * UserInterface/Views/TreeOutline.js:
666 (WebInspector.TreeOutline.prototype.appendChild):
667 (WebInspector.TreeOutline.prototype.insertChild):
668 (WebInspector.TreeOutline.prototype.removeChildAtIndex):
669 (WebInspector.TreeOutline.prototype.removeChildren):
670 (WebInspector.TreeOutline.prototype.removeChildrenRecursive):
671 (WebInspector.TreeOutline.prototype._treeElementDidChange):
672 (WebInspector.TreeElement.prototype.set hidden):
673 (WebInspector.TreeElement.prototype.collapse):
674 (WebInspector.TreeElement.prototype.expand):
675 (WebInspector.TreeElement.prototype.select):
676 (WebInspector.TreeElement.prototype.deselect):
677 (WebInspector.TreeElement.prototype.get childrenListElement): Deleted.
680 * UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
681 (WebInspector.TreeOutlineDataGridSynchronizer):
682 (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeSelectionDidChange):
683 (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):
684 (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementRemoved):
685 (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementDisclosureDidChange):
686 (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange):
687 (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onadd): Deleted.
688 (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onremove): Deleted.
689 (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onexpand): Deleted.
690 (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.oncollapse): Deleted.
691 (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onhidden): Deleted.
692 (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onselect): Deleted.
693 (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementSelected): Deleted.
694 (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementExpanded): Deleted.
695 (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementCollapsed): Deleted.
696 (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementHiddenChanged): Deleted.
698 * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
699 (WebInspector.VisualStyleCommaSeparatedKeywordEditor):
700 (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeSelectionDidChange):
701 (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeElementSelected): Deleted.
703 2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
705 Web Inspector: Timestamp in Tooltip of Event Markers is incorrect
706 https://bugs.webkit.org/show_bug.cgi?id=151722
708 Reviewed by Timothy Hatcher.
710 * UserInterface/Views/TimelineRuler.js:
711 (WebInspector.TimelineRuler.prototype.addMarker):
712 Convert the marker's time, to be relative to the start of the recording.
714 2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
716 Unreviewed common typo fix "occurance" => "occurrence".
718 * Scripts/combine-resources.pl:
721 2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
723 Web Inspector: Spacebar to toggle Timeline recording doesn't work in Timeline tab after reloading the page
724 https://bugs.webkit.org/show_bug.cgi?id=151530
726 Reviewed by Timothy Hatcher.
728 If reloading the page caused the console to clear, that was triggering
729 the console prompt to be focused. When the console prompt is focused,
730 keyboard input like Spacebar, was just inputing characters instead of
731 triggering the keyboard shortcut that was expected.
733 This also means that console.clear() in the inspected page would cause
734 the inspector to focus the console. That is unexpected as well.
736 Focusing the console prompt whenever the console log is cleared
737 is not ideal. If we do want to focus the prompt the caller should
738 make that determination, not clear.
740 * UserInterface/Controllers/JavaScriptLogViewController.js:
741 (WebInspector.JavaScriptLogViewController.prototype.clear):
743 2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
745 Web Inspector: Update Timeline UI based on the Instruments in the Active Recording
746 https://bugs.webkit.org/show_bug.cgi?id=151374
748 Reviewed by Brian Burg.
750 * UserInterface/Views/TimelineRecordingContentView.js:
751 (WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
752 Modernize as I was in this code while looking into this patch.
754 * UserInterface/Views/TimelineSidebarPanel.css:
755 (.sidebar > .panel.navigation.timeline > .title-bar.timeline-events): Deleted.
756 (.sidebar > .panel.navigation.timeline > .timelines-content): Deleted.
757 These defaults are no longer necessary, the UI overrides them anyways.
759 * UserInterface/Views/TimelineSidebarPanel.js:
760 (WebInspector.TimelineSidebarPanel):
761 Include both the basic and rendering frames toolbars. They will be
762 mutually exclusive based on if the FPSIntrument is available.
764 (WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
765 (WebInspector.TimelineSidebarPanel.prototype._clearInstruments):
766 When loading a new Recording clear the UI.
768 (WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
769 (WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
770 (WebInspector.TimelineSidebarPanel.prototype._addedFPSInstrument):
771 (WebInspector.TimelineSidebarPanel.prototype._removedFPSInstrument):
772 Handle toggling the toolbars when the FPS instrument is added/removed.
774 (WebInspector.TimelineSidebarPanel.prototype._timelineCountChanged):
775 (WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
776 (WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
777 Properly update the sidebar's understanding of the TimelineOverview size.
779 2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
781 Web Inspector: Initial support for variable timelines
782 https://bugs.webkit.org/show_bug.cgi?id=151372
784 Reviewed by Brian Burg.
786 * UserInterface/Controllers/TimelineManager.js:
787 (WebInspector.TimelineManager.defaultInstruments):
788 (WebInspector.TimelineManager.prototype._loadNewRecording):
789 Keep the status quo which is the same set of instruments for each recording.
791 (WebInspector.TimelineManager.prototype.startCapturing):
792 (WebInspector.TimelineManager.prototype.stopCapturing):
793 Push responsibility of capturing to the Recording, which has a specific set
794 of instruments that know what they need to turn on an off from the backend.
796 * UserInterface/Main.html:
797 * UserInterface/Models/Instrument.js: Added.
798 (WebInspector.Instrument):
799 (WebInspector.Instrument.startLegacyTimelineAgent):
800 (WebInspector.Instrument.stopLegacyTimelineAgent):
801 (WebInspector.Instrument.prototype.get timelineRecordType):
802 (WebInspector.Instrument.prototype.startInstrumentation):
803 (WebInspector.Instrument.prototype.stopInstrumentation):
804 New class representing something that can be turned on and off
805 from the backend and produces a set of Timeline record types.
806 Currently instruments are 1-to-1 to a Timeline type.
808 * UserInterface/Models/LayoutInstrument.js: Added.
809 (WebInspector.LayoutInstrument.prototype.get timelineRecordType):
810 (WebInspector.LayoutInstrument):
811 * UserInterface/Models/NetworkInstrument.js: Added.
812 (WebInspector.NetworkInstrument.prototype.get timelineRecordType):
813 (WebInspector.NetworkInstrument.prototype.startInstrumentation):
814 (WebInspector.NetworkInstrument.prototype.stopInstrumentation):
815 (WebInspector.NetworkInstrument):
816 * UserInterface/Models/ScriptInstrument.js: Added.
817 (WebInspector.ScriptInstrument.prototype.get timelineRecordType):
818 (WebInspector.ScriptInstrument):
819 The default set of instruments. Currently they all enable the TimelineAgent,
820 so they share code to enable/disable in the base class to avoid duplication.
822 * UserInterface/Models/FPSInstrument.js: Added.
823 (WebInspector.FPSInstrument):
824 (WebInspector.FPSInstrument.supported):
825 (WebInspector.FPSInstrument.prototype.get timelineRecordType):
826 Provide a "supported" static method and simplify other code that
827 checks whether or not RenderingFrames is available or not.
830 * UserInterface/Models/Timeline.js:
831 (WebInspector.Timeline.prototype.get displayName): Deleted.
832 (WebInspector.Timeline.prototype.get iconClassName): Deleted.
833 Move these to a View class, as this is primarily View logic.
835 * UserInterface/Models/TimelineRecording.js:
836 (WebInspector.TimelineRecording):
837 (WebInspector.TimelineRecording.prototype.get instruments):
838 (WebInspector.TimelineRecording.prototype.start):
839 (WebInspector.TimelineRecording.prototype.stop):
840 (WebInspector.TimelineRecording.prototype.timelineForInstrument):
841 (WebInspector.TimelineRecording.prototype.addInstrument):
842 (WebInspector.TimelineRecording.prototype.removeInstrument):
843 (WebInspector.TimelineRecording.prototype.addEventMarker):
844 (WebInspector.TimelineRecording.prototype.addTimeline): Deleted.
845 (WebInspector.TimelineRecording.prototype.removeTimeline): Deleted.
846 A recording now has a set of Instruments and its own start/stop
847 which starts/stops its set of Instruments! Treat Instruments as
848 the variable property of a Recording instead of Timelines.
850 * UserInterface/Views/TimelineOverview.js:
851 (WebInspector.TimelineOverview):
852 (WebInspector.TimelineOverview.prototype._instrumentAdded):
853 (WebInspector.TimelineOverview.prototype._instrumentRemoved):
854 (WebInspector.TimelineOverview.prototype._timelineAdded): Deleted.
855 (WebInspector.TimelineOverview.prototype._timelineRemoved): Deleted.
856 * UserInterface/Views/TimelineRecordingContentView.js:
857 (WebInspector.TimelineRecordingContentView):
858 (WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
859 (WebInspector.TimelineRecordingContentView.prototype._instrumentRemoved):
860 (WebInspector.TimelineRecordingContentView.prototype._timelineAdded): Deleted.
861 (WebInspector.TimelineRecordingContentView.prototype._timelineRemoved): Deleted.
862 * UserInterface/Views/TimelineSidebarPanel.js:
863 (WebInspector.TimelineSidebarPanel):
864 (WebInspector.TimelineSidebarPanel.displayNameForTimeline):
865 (WebInspector.TimelineSidebarPanel.iconClassNameForTimeline):
866 (WebInspector.TimelineSidebarPanel.prototype.updateFrameSelection):
867 (WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie):
868 (WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
869 (WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
870 (WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
871 (WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
872 (WebInspector.TimelineSidebarPanel.prototype._timelineAdded): Deleted.
873 (WebInspector.TimelineSidebarPanel.prototype._timelineRemoved): Deleted.
874 Update all TimelineAdded/TimelineRemoved clients to instead check
875 InstrumentAdded/InstrumentRemoved. Immediately convert from an Instrument
876 to a Timeline to keep the patch simple.
878 2015-12-01 Joseph Pecoraro <pecoraro@apple.com>
880 Web Inspector: Broken Inspector when resources are minified
881 https://bugs.webkit.org/show_bug.cgi?id=151711
883 Reviewed by Timothy Hatcher.
885 * Scripts/combine-resources.pl:
887 Provide a way to just strip resources matches a pattern.
889 * Scripts/copy-user-interface-resources.pl:
890 Strip "Debug/" resources before combining / minifying others.
892 * UserInterface/Views/View.js:
893 (WebInspector.View.prototype.makeRootView):
894 (WebInspector.View.prototype.didDetach):
895 Address warnings from the console.assert stripping phase
896 for console.assert statements lacking a trailing semicolon.
898 2015-11-30 Brian Burg <bburg@apple.com>
900 Web Inspector: show something useful when the inspector frontend fails to load
901 https://bugs.webkit.org/show_bug.cgi?id=151643
903 Reviewed by Timothy Hatcher.
905 When a parse error or other early error happens before the inspector
906 is fully loaded, we can't use the second-level inspector to tell what's
907 going on. It would be better to catch any early errors and list them.
909 This patch adds an error page that shows the early errors that happened
910 during loading. It provides a list of errors, a link to reload the
911 inspector, and a link to submit a pre-filled bug report about the error.
913 For now, this page only shows up in engineering builds because it's
914 located in the Debug/ directory. We can move it later when it works
915 better in all cases. Follow-up patches can address smaller issues,
916 such as the transparent title bar and broken text selection.
918 * UserInterface/Debug/CatchEarlyErrors.css: Added.
919 * UserInterface/Debug/CatchEarlyErrors.js: Added.
920 * UserInterface/Main.html:
921 * UserInterface/Main.js: Abort setting up the UI if something happened.
923 2015-11-30 Brian Burg <bburg@apple.com>
925 Web Inspector: delete-by-word and similar shortcuts should add text to the WebCore kill ring
926 https://bugs.webkit.org/show_bug.cgi?id=151312
928 Reviewed by Darin Adler.
930 Add support for other kill ring-eligible keybindinsg, such as
931 deleting by word, group, or line forwards and backwards.
933 * UserInterface/Controllers/CodeMirrorTextKillController.js:
934 (WebInspector.CodeMirrorTextKillController):
935 (WebInspector.CodeMirrorTextKillController.prototype._handleTextKillCommand): Renamed from _handleKillLine.
937 Parameterize the function so it can handle any keybinding and
938 command. Take a kill ring insertion mode argument, too.
940 (WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
942 Add some special casing for changes received from Delete Line
943 (Cmd-D) so the right text is added to the kill ring. Thread the
944 kill ring insertion mode to the frontend host call.
946 (WebInspector.CodeMirrorTextKillController.prototype._handleKillLine): Deleted.
948 2015-11-29 Brian Burg <bburg@apple.com>
950 Web Inspector: Add context menu item to Reload the Inspector
951 https://bugs.webkit.org/show_bug.cgi?id=141742
953 Reviewed by Timothy Hatcher.
955 Add a global context menu and global shortcut (Cmd-Opt-Shift-R) to
956 reload the Web Inspector frontend without closing the browser.
958 This should make it possible to more quickly fix typos, small nits,
959 etc. without having to relaunch. It might also make state
960 restoration bugs more visible in engineering builds, since there
961 is hardly any delay between seeing the old and reloaded frontends.
963 Note that this functionality reloads scripts from the configuration's
964 build directory, so you still need to "build" WebInspectorUI to ensure
965 that any changed files are properly minified and staged.
967 * UserInterface/Base/Main.js:
968 (WebInspector.unlocalizedString):
970 Added. Make it obvious when strings are intentionally not localized.
972 (WebInspector._contextMenuRequested):
974 If the "Show Debug UI" setting is available and true, add
975 a global "Reload Web Inspector" menu item to every context
976 menu. Otherwise, don't eagerly create a context menu.
977 * UserInterface/Debug/Bootstrap.js: Add Cmd-Opt-Shift-R shortcut.
979 2015-11-29 Brian Burg <bburg@apple.com>
981 Web Inspector: allow multiple UI components to add menu items upon getting a "contextmenu" event
982 https://bugs.webkit.org/show_bug.cgi?id=151629
984 Reviewed by Timothy Hatcher.
986 The existing Context Menu system assumes that only one UI component
987 will need to provide context menu items. But in some scenarios, there
988 are multiple UI components that could provide relevant menu items. For
989 example, right-clicking on an DOM element in the console should show
990 menu items relevant to 1) the DOM element, 2) the console in general,
991 and 3) global menu items. Existing code shows menu items provided by
992 the first object that handles the event and calls ContextMenu.show().
994 This patch changes behavior so that a context menu can be built up
995 by multiple 'contextmenu' event handlers. A ContextMenu instance is
996 hidden on the 'contextmenu' event object; client code calls a
997 factory method that digs out this existing context menu or creates a
998 new one as needed. To actually show the context menu through the
999 InspectorFrontendHost methods, the top-level app controller adds a
1000 bubbling listener for 'contextmenu' and shows the event's context
1001 menu if one has been created.
1003 Along the way, do some cleanup. Do s/var/let/, arrowize some functions,
1004 use Array.{map,some}, and simplify some other code as a result.
1006 No new tests yet, since we can't trigger context menu easily from
1007 an inspector test. All affected context menus were manually verified.
1009 * UserInterface/Base/Main.js:
1010 (WebInspector.contentLoaded):
1011 * UserInterface/Controllers/BreakpointPopoverController.js:
1012 (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
1013 (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint): Deleted.
1014 (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.removeBreakpoint): Deleted.
1015 (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleBreakpoint): Deleted.
1016 (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleAutoContinue): Deleted.
1017 (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation): Deleted.
1018 * UserInterface/Views/BreakpointTreeElement.js:
1019 (WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
1020 * UserInterface/Views/CSSStyleDeclarationSection.js:
1021 * UserInterface/Views/ContextMenu.js:
1022 (WebInspector.ContextMenuItem.prototype._buildDescriptor):
1023 (WebInspector.ContextMenuItem):
1024 (WebInspector.ContextSubMenuItem.prototype.appendItem):
1025 (WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
1026 (WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
1027 (WebInspector.ContextSubMenuItem.prototype._pushItem):
1028 (WebInspector.ContextSubMenuItem.prototype._buildDescriptor):
1029 (WebInspector.ContextSubMenuItem):
1030 (WebInspector.ContextMenu.createFromEvent):
1031 (WebInspector.ContextMenu.prototype.show):
1032 (WebInspector.ContextMenu.prototype.handleEvent):
1033 (WebInspector.ContextMenu.prototype._buildDescriptor):
1034 * UserInterface/Views/DOMTreeOutline.js:
1035 (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
1036 (WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
1037 (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
1038 * UserInterface/Views/DataGrid.js:
1039 (WebInspector.DataGrid.prototype._contextMenuInDataTable):
1040 * UserInterface/Views/DebuggerSidebarPanel.js:
1041 (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
1042 (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.removeAllResourceBreakpoints): Deleted.
1043 (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.toggleAllResourceBreakpoints): Deleted.
1044 * UserInterface/Views/LogContentView.js:
1045 (WebInspector.LogContentView.prototype._handleContextMenuEvent):
1046 * UserInterface/Views/ObjectPreviewView.js:
1047 (WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
1048 (WebInspector.ObjectPreviewView):
1049 * UserInterface/Views/ObjectTreeBaseTreeElement.js:
1050 (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
1051 (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
1052 (WebInspector.ObjectTreeBaseTreeElement):
1053 * UserInterface/Views/SourceCodeTextEditor.js:
1054 (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
1055 (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.continueToLocation): Deleted.
1056 (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.addBreakpoint): Deleted.
1057 (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.revealInSidebar): Deleted.
1058 (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.removeBreakpoints): Deleted.
1059 (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.toggleBreakpoints): Deleted.
1060 * UserInterface/Views/TabBarItem.js:
1061 (WebInspector.TabBarItem.prototype._handleContextMenuEvent):
1062 (WebInspector.TabBarItem):
1063 (WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeTab): Deleted.
1064 (WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeOtherTabs): Deleted.
1065 * UserInterface/Views/TimelineSidebarPanel.js:
1066 (WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar):
1067 (WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar.toggleReplayInterface): Deleted.
1068 * UserInterface/Views/Toolbar.js:
1069 (WebInspector.Toolbar.prototype._handleContextMenuEvent):
1070 * UserInterface/Views/VisualStyleSelectorTreeItem.js:
1071 (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
1073 2015-11-28 Devin Rousso <dcrousso+webkit@gmail.com>
1075 Web Inspector: Styles sidebar placeholder is misaligned
1076 https://bugs.webkit.org/show_bug.cgi?id=151638
1078 Reviewed by Brian Burg.
1080 * UserInterface/Views/CSSStyleDeclarationTextEditor.css:
1081 (.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):
1083 2015-11-28 Devin Rousso <dcrousso+webkit@gmail.com>
1085 Web Inspector: REGRESSION: "Duplicate Selector" context menu item doesn't work
1086 https://bugs.webkit.org/show_bug.cgi?id=151628
1088 Reviewed by Brian Burg.
1090 Merged the two "add rule" functions inside DOMNodeStyles to create a
1091 new rule with the given selector and use the generated best selector
1092 for that node otherwise. This also preserves all fallbacks across all
1093 functions for creating new CSS rules.
1095 * UserInterface/Models/DOMNodeStyles.js:
1096 (WebInspector.DOMNodeStyles.prototype.addEmptyRule): Deleted.
1097 (WebInspector.DOMNodeStyles.prototype.addRuleWithSelector): Deleted.
1098 (WebInspector.DOMNodeStyles.prototype.addRule):
1099 Creates a new CSS rule using either the provided selector or the best
1100 selector for the current node.
1102 * UserInterface/Views/CSSStyleDeclarationSection.js:
1103 (WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
1104 * UserInterface/Views/RulesStyleDetailsPanel.js:
1105 (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
1106 * UserInterface/Views/VisualStyleSelectorSection.js:
1107 (WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
1109 2015-11-24 Brian Burg <bburg@apple.com>
1111 Web Inspector: save Inspector's breakpoints to localStorage whenever they are modified
1112 https://bugs.webkit.org/show_bug.cgi?id=151581
1114 Reviewed by Timothy Hatcher.
1116 Serialize all breakpoints to the "breakpoints" Setting in local storage
1117 whenever any breakpoint model object is added, removed, or modified.
1119 Remove the old listener that attempted to save breakpoints on the
1120 pagehide event. It did not fire in important scenarios like exiting
1121 the browser via Cmd-Q or killing the process via Ctrl-C / SIGKILL.
1123 This is not expected to be a performance problem because most people
1124 do not keep thousands of breakpoints active, and breakpoints are not
1125 set very often. If it's a problem, we can mitigate it with coalescing.
1127 * UserInterface/Controllers/DebuggerManager.js:
1128 (WebInspector.DebuggerManager.prototype.addBreakpoint):
1129 (WebInspector.DebuggerManager.prototype.removeBreakpoint):
1130 (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
1131 (WebInspector.DebuggerManager.prototype._saveBreakpoints):
1132 (WebInspector.DebuggerManager.prototype._inspectorClosing): Deleted.
1134 2015-11-24 Brian Burg <bburg@apple.com>
1136 Web Inspector: Cmd-1 to Cmd-9 shortcuts should select tabs by ordinal
1137 https://bugs.webkit.org/show_bug.cgi?id=151577
1139 Reviewed by Timothy Hatcher.
1141 The shortcuts only work if a tab at the specified ordinal exists.
1143 * UserInterface/Base/Main.js:
1144 (WebInspector.contentLoaded):
1146 2015-11-23 Brian Burg <bburg@apple.com>
1148 Web Inspector: Add a keyboard shortcut to restore the default zoom level
1149 https://bugs.webkit.org/show_bug.cgi?id=151237
1151 Reviewed by Timothy Hatcher.
1153 The Cmd-0 shortcut matches the keybindings of Safari and other browsers.
1155 * UserInterface/Base/Main.js:
1156 (WebInspector.contentLoaded):
1158 2015-11-23 Brian Burg <bburg@apple.com>
1160 Web Inspector: inspector settings should not be shared between different inspection levels
1161 https://bugs.webkit.org/show_bug.cgi?id=151151
1163 Reviewed by Timothy Hatcher.
1165 It's really annoying to have shared settings between Inspector^1 and Inspector^2, because
1166 they are not designed to respond to external changes to local storage keys. As a result,
1167 the two inspectors seemingly have different settings while both are open, but the settings
1168 clobber each other depending on which inspector is closed first. On the next inspector
1169 being opened, it has settings that reflect whichever inspector closed last.
1171 To fix this, alter the local storage key prefix to incude the inspection level when it is
1172 greater than 1 (i.e., inspecting the inspector). The storage prefix becomes
1173 "com.apple.WebInspector-${inspectionLevel}." in this case.
1174 This is backwards-compatible for normal Inspector, who keeps the same storage prefix.
1176 Alternate approaches that were considered and abandoned:
1178 - Use separate WKWebSiteDataStores for each inspection level. This API (as it currently is)
1179 does not support multiple on-disk storage locations. We don't want to add an entirely new
1180 Library directory for each inspector level, and sharing a single location doesn't fix the
1181 shared-settings bug. Changing storage location would lose all existing Inspector settings.
1183 - Sync settings between multiple open Inspectors. This would be catastrophic, as changing
1184 the active tab on one inspector would immediately propagate to the other open inspectors.
1186 * UserInterface/Models/Setting.js:
1187 (WebInspector.Setting):
1188 * UserInterface/Protocol/InspectorFrontendHostStub.js:
1189 (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.inspectionLevel):
1191 2015-11-23 Brian Burg <bburg@apple.com>
1193 Web Inspector: use Cmd-Option-L and Cmd-Option-R for toggling navigation and details sidebars
1194 https://bugs.webkit.org/show_bug.cgi?id=151572
1196 Reviewed by Timothy Hatcher.
1198 The previous shortcuts were Cmd-0 and Cmd-Option-0, but these didn't match Safari's
1199 sidebar shortcuts and conflict with Cmd-0 as the cross-browser way to reset page zoom.
1201 * UserInterface/Base/Main.js:
1202 (WebInspector.contentLoaded):
1204 2015-11-23 Brian Burg <bburg@apple.com>
1206 Web Inspector: when inspecting the inspector, add the inspection level to the title bar
1207 https://bugs.webkit.org/show_bug.cgi?id=151555
1209 Reviewed by Timothy Hatcher.
1211 Drive-by update to remove some localization strings that are no longer used.
1213 * Localizations/en.lproj/localizedStrings.js:
1215 2015-11-22 Matt Baker <mattbaker@apple.com>
1217 Web Inspector: Clean up FolderizedTreeElement folder settings
1218 https://bugs.webkit.org/show_bug.cgi?id=151539
1220 Reviewed by Brian Burg.
1222 The expanded state for each folder was stored as an external property on the folder
1223 tree element. Now FolderizedTreeElement keeps a map of folders to settings.
1225 * UserInterface/Views/FolderizedTreeElement.js:
1226 (WebInspector.FolderizedTreeElement):
1227 (WebInspector.FolderizedTreeElement.prototype.removeChildren):
1228 (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
1229 (WebInspector.FolderizedTreeElement.prototype._folderTreeElementExpandedStateChange):
1231 == Rolled over to ChangeLog-2015-11-21 ==