1 2015-11-20 Joseph Pecoraro <pecoraro@apple.com>
3 Web Inspector: Timeline does not immediately update current time after switching tabs while recording
4 https://bugs.webkit.org/show_bug.cgi?id=151528
6 Reviewed by Timothy Hatcher.
8 * UserInterface/Views/TimelineRecordingContentView.js:
9 (WebInspector.TimelineRecordingContentView.prototype.shown):
10 Provide a number so that _startUpdatingCurrentTime doesn't decide
11 to wait until the next event to update current time.
13 (WebInspector.TimelineRecordingContentView.prototype._update):
14 When switching tabs we stop updating and hit this code. However
15 we want to keep _lastUpdateTimestamp so that if we switch back
16 to the tab we can re-compute the current time. So don't clear it
17 in cases where the view was hidden, as it might need to use
18 it when it is shown again.
20 2015-11-20 Matt Baker <mattbaker@apple.com>
22 Web Inspector: Remove "Show only resources with breakpoints" filter button
23 https://bugs.webkit.org/show_bug.cgi?id=151517
25 Reviewed by Timothy Hatcher.
27 Removed filter button in preparation for https://bugs.webkit.org/show_bug.cgi?id=151119.
29 * UserInterface/Views/DebuggerSidebarPanel.js:
30 (WebInspector.DebuggerSidebarPanel.showResourcesWithBreakpointsOnlyFilterFunction): Deleted.
31 (WebInspector.DebuggerSidebarPanel): Deleted.
33 2015-11-20 Devin Rousso <dcrousso+webkit@gmail.com>
35 Web Inspector: Add support for Gradients in the Visual sidebar background editor
36 https://bugs.webkit.org/show_bug.cgi?id=150494
38 Reviewed by Timothy Hatcher.
40 Allows the editors in the Visual sidebar Background Style section to
41 work with gradients and data URIs.
43 * Localizations/en.lproj/localizedStrings.js:
44 * UserInterface/Controllers/CodeMirrorGradientEditingController.css: Deleted.
45 Some styling was reused in VisualStyleBackgroundPicker.css.
47 * UserInterface/Controllers/CodeMirrorGradientEditingController.js:
48 (WebInspector.CodeMirrorGradientEditingController):
49 (WebInspector.CodeMirrorGradientEditingController.prototype.popoverWillPresent):
50 (WebInspector.CodeMirrorGradientEditingController.prototype.popoverDidPresent):
51 (WebInspector.CodeMirrorGradientEditingController.prototype._gradientEditorGradientChanged):
52 (WebInspector.CodeMirrorGradientEditingController.prototype.handleEvent): Deleted.
53 (WebInspector.CodeMirrorGradientEditingController.prototype.gradientSliderStopsDidChange): Deleted.
54 (WebInspector.CodeMirrorGradientEditingController.prototype.gradientSliderStopWasSelected): Deleted.
55 (WebInspector.CodeMirrorGradientEditingController.prototype.dragToAdjustControllerWasAdjustedByAmount): Deleted.
56 (WebInspector.CodeMirrorGradientEditingController.prototype._handleInputEvent): Deleted.
57 (WebInspector.CodeMirrorGradientEditingController.prototype._angleInputValueDidChange): Deleted.
58 (WebInspector.CodeMirrorGradientEditingController.prototype._handleChangeEvent): Deleted.
59 (WebInspector.CodeMirrorGradientEditingController.prototype._colorPickerColorChanged): Deleted.
60 (WebInspector.CodeMirrorGradientEditingController.prototype._updateCSSClassForGradientType): Deleted.
61 Reworked gradient editor popup into WebInspector.GradientEditor.
63 * UserInterface/Main.html:
64 * UserInterface/Models/Gradient.js:
65 (WebInspector.Gradient.fromString):
66 (WebInspector.Gradient.stopsWithComponents):
67 (WebInspector.LinearGradient.linearGradientWithComponents):
68 Removed console.error statements as they didn't do anything but clog the console.
70 * UserInterface/Views/GradientEditor.css: Added.
72 (.gradient-editor.radial-gradient):
73 (.gradient-editor.editing-color):
74 (.gradient-editor.radial-gradient.editing-color):
75 (.gradient-editor > .gradient-type-select):
76 (.gradient-editor > .gradient-slider):
77 (.gradient-editor > .color-picker):
78 (.gradient-editor > .color-picker > .slider):
79 (.gradient-editor > .color-picker > .brightness):
80 (.gradient-editor > .color-picker > .opacity):
81 (.gradient-editor > .gradient-angle):
82 (.gradient-editor.radial-gradient > .gradient-angle):
83 (.gradient-editor > .gradient-angle > input):
85 * UserInterface/Views/GradientEditor.js: Added.
86 (WebInspector.GradientEditor):
87 (WebInspector.GradientEditor.prototype.get element):
88 (WebInspector.GradientEditor.prototype.set gradient):
89 (WebInspector.GradientEditor.prototype.get gradient):
90 (WebInspector.GradientEditor.prototype.gradientSliderStopsDidChange):
91 (WebInspector.GradientEditor.prototype.gradientSliderStopWasSelected):
92 (WebInspector.GradientEditor.prototype.dragToAdjustControllerWasAdjustedByAmount):
93 (WebInspector.GradientEditor.prototype._updateCSSClassForGradientType):
94 (WebInspector.GradientEditor.prototype._gradientTypeChanged):
95 (WebInspector.GradientEditor.prototype._colorPickerColorChanged):
96 (WebInspector.GradientEditor.prototype._angleChanged):
97 (WebInspector.GradientEditor.prototype._angleInputValueDidChange):
98 New standalone editor for CSS Gradients.
100 * UserInterface/Views/VisualStyleBackgroundPicker.css: Added.
101 (.visual-style-property-container.background-picker > .visual-style-property-value-container):
102 (.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch):
103 (.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch:hover):
104 (.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch:active):
105 (.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch > span):
106 (.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .color-gradient-swatch):
107 (.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .color-gradient-swatch + .value-input):
108 (.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-input):
109 (.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-input[disabled]):
110 (.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-type-picker-select):
112 * UserInterface/Views/VisualStyleBackgroundPicker.js: Added.
113 (WebInspector.VisualStyleBackgroundPicker):
114 (WebInspector.VisualStyleBackgroundPicker.prototype.get value):
115 (WebInspector.VisualStyleBackgroundPicker.prototype.set value):
116 (WebInspector.VisualStyleBackgroundPicker.prototype.get synthesizedValue):
117 (WebInspector.VisualStyleBackgroundPicker.prototype.parseValue):
118 (WebInspector.VisualStyleBackgroundPicker.prototype._updateValueInput):
119 (WebInspector.VisualStyleBackgroundPicker.prototype._updateGradientSwatch):
120 (WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked):
121 (WebInspector.VisualStyleBackgroundPicker.prototype._gradientEditorGradientChanged):
122 (WebInspector.VisualStyleBackgroundPicker.prototype._valueInputValueChanged):
123 (WebInspector.VisualStyleBackgroundPicker.prototype._keywordSelectMouseDown):
124 (WebInspector.VisualStyleBackgroundPicker.prototype._handleKeywordChanged):
125 (WebInspector.VisualStyleBackgroundPicker.prototype._createValueOptions):
126 (WebInspector.VisualStyleBackgroundPicker.prototype._addAdvancedValues):
127 (WebInspector.VisualStyleBackgroundPicker.prototype._removeAdvancedValues):
128 (WebInspector.VisualStyleBackgroundPicker.prototype._toggleTabbingOfSelectableElements):
129 Visual property editor for the CSS background-image property. Supports
130 limited keywords, as well as url() and gradients.
132 * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
133 (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value):
134 Fixed regular expression parsing to not match commas inside parenthesis.
136 * UserInterface/Views/VisualStyleDetailsPanel.js:
137 (WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):
139 * UserInterface/Views/VisualStylePropertyEditorLink.css:
140 (.visual-style-property-editor-link:not(.link-all) > .visual-style-property-editor-link-border):
141 Fixed spacing of link line.
143 * UserInterface/Views/VisualStyleURLInput.js: Removed.
144 Reworked into VisualStyleBackgroundPicker.js.
146 2015-11-19 Brian Burg <bburg@apple.com>
148 Web Inspector: yank/kill shortcuts (CTRL+Y, K) don't work in Console / QuickConsole
149 https://bugs.webkit.org/show_bug.cgi?id=151157
151 Reviewed by Joseph Pecoraro.
153 CodeMirror maintains its own editor buffer and implements its own
154 `killLine` command but doesn't implement the yank command. So, text
155 that is "killed" with CTRL-k inside a CodeMirror instance isn't
156 added to WebCore's kill ring. Subsequent yank commands won't match
157 up with the killed text, instead returning text from a prior kill
158 that was handled by WebCore (i.e., in a contenteditable or form input).
160 This patch adds a host function so that the Inspector frontend can
161 append "missed" killed text to WebCore's kill ring. Subsequent
162 yanks handled by WebCore will then match the text killed by CodeMirror.
164 In the frontend, we implement our own key binding handler for
165 CTRL-k that captures killed text, detects whether the kill
166 should start a new sequence, and sends it to WebCore. Because this
167 involves several flags and listeners, and we want this behavior for
168 all editable CodeMirror instances, the text kill handling is
169 factored into its own CodeMirrorTextKillController.
171 To add this behavior to all instances, this patch centralizes the
172 code that constructs a base CodeMirror instance, and attaches the
173 CodeMirrorTextKillController to all instances. The shortcut
174 does nothing when its CodeMirror instance is read-only.
176 The particulars of the kill controller are documented inline.
178 No new tests, because we need to use both InspectorFrontendHost
179 and TestRunner.execCommand, but the latter is not available in
180 the inspector context where we would need to simulate a kill.
182 * UserInterface/Controllers/CodeMirrorTextKillController.js: Added.
183 (WebInspector.CodeMirrorTextKillController):
184 (WebInspector.CodeMirrorTextKillController.prototype._handleKillLine):
185 (WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
186 (WebInspector.CodeMirrorTextKillController.prototype._handleEditorBlur):
187 (WebInspector.CodeMirrorTextKillController.prototype._handleSelectionOrCaretChange):
188 * UserInterface/Main.html:
189 * UserInterface/Protocol/InspectorFrontendHostStub.js:
190 (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.killText): Add a stub to avoid check-before-use.
191 * UserInterface/Views/BreakpointActionView.js:
192 (WebInspector.BreakpointActionView.prototype._updateBody):
193 * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
194 (WebInspector.CSSStyleDeclarationTextEditor):
195 * UserInterface/Views/CodeMirrorEditor.js: Added.
196 (WebInspector.CodeMirrorEditor.create):
197 (WebInspector.CodeMirrorEditor):
198 * UserInterface/Views/ConsolePrompt.js:
199 (WebInspector.ConsolePrompt):
200 * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
201 * UserInterface/Views/TextEditor.js:
202 (WebInspector.TextEditor):
204 2015-11-19 Matt Baker <mattbaker@apple.com>
206 Web Inspector: Convert remaining timeline views to use View base class
207 https://bugs.webkit.org/show_bug.cgi?id=151410
209 Reviewed by Timothy Hatcher.
211 Converted timeline views to use View base class. Mostly mechanical
212 changes (override View.prototype.layout, use let in more places).
214 * UserInterface/Views/LayoutTimelineOverviewGraph.js:
215 (WebInspector.LayoutTimelineOverviewGraph.prototype.layout):
216 (WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout): Deleted.
218 * UserInterface/Views/NetworkTimelineOverviewGraph.js:
219 (WebInspector.NetworkTimelineOverviewGraph.prototype.layout.createBar):
220 (WebInspector.NetworkTimelineOverviewGraph.prototype.layout):
221 (WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout.createBar): Deleted.
222 (WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout): Deleted.
224 * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
225 (WebInspector.RenderingFrameTimelineOverviewGraph.prototype.layout):
226 (WebInspector.RenderingFrameTimelineOverviewGraph.prototype.updateLayout): Deleted.
228 * UserInterface/Views/ScriptTimelineOverviewGraph.js:
229 (WebInspector.ScriptTimelineOverviewGraph.prototype.layout.createBar):
230 (WebInspector.ScriptTimelineOverviewGraph.prototype.layout):
231 (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout.createBar): Deleted.
232 (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout): Deleted.
234 * UserInterface/Views/TimelineOverview.js:
236 (WebInspector.TimelineOverview):
237 Add ruler as a subview.
238 (WebInspector.TimelineOverview.prototype.set startTime):
239 (WebInspector.TimelineOverview.prototype.set currentTime):
240 (WebInspector.TimelineOverview.prototype.set secondsPerPixel):
241 (WebInspector.TimelineOverview.prototype.set endTime):
242 (WebInspector.TimelineOverview.prototype.set scrollStartTime):
243 (WebInspector.TimelineOverview.prototype.updateLayoutIfNeeded):
244 (WebInspector.TimelineOverview.prototype.get timelineRuler):
245 (WebInspector.TimelineOverview.prototype.canShowTimeline):
246 (WebInspector.TimelineOverview.prototype.layout):
247 (WebInspector.TimelineOverview.prototype._handleWheelEvent):
248 (WebInspector.TimelineOverview._handleGestureStart):
249 (WebInspector.TimelineOverview.prototype._handleGestureChange):
250 (WebInspector.TimelineOverview.prototype._timelineAdded):
251 (WebInspector.TimelineOverview.prototype._timelineRemoved):
252 (WebInspector.TimelineOverview.prototype.get element): Deleted.
253 (WebInspector.TimelineOverview.prototype.updateLayout): Deleted.
255 * UserInterface/Views/TimelineOverviewGraph.js:
257 (WebInspector.TimelineOverviewGraph):
258 (WebInspector.TimelineOverviewGraph.prototype.needsLayout):
259 (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
260 (WebInspector.TimelineOverviewGraph.prototype.updateLayout): Deleted.
261 (WebInspector.TimelineOverviewGraph.prototype.updateLayoutIfNeeded): Deleted.
262 (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout.update): Deleted.
264 * UserInterface/Views/TimelineRecordingContentView.js:
265 (WebInspector.TimelineRecordingContentView):
266 Add overview as a subview.
267 (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
268 Use View.prototype.replaceSubview to swap overview graphs.
270 2015-11-18 Brian Burg <bburg@apple.com>
272 Web Inspector: Storage tab shouldn't hide cookies for .example.com when inspected page is foo.bar.example.com
273 https://bugs.webkit.org/show_bug.cgi?id=151408
275 Reviewed by Timothy Hatcher.
277 The regex should allow multiple subdomains to match a cookie for domain .example.com.
279 Test: inspector/page/filter-cookies-for-domain.html
281 * UserInterface/Models/CookieStorageObject.js:
282 (WebInspector.CookieStorageObject.cookieDomainMatchesResourceDomain):
284 Also make the group non-capturing. We don't use the match.
286 (WebInspector.CookieStorageObject.prototype.saveIdentityToCookie):
287 (WebInspector.CookieStorageObject):
288 * UserInterface/Test.html:
290 2015-11-18 Brian Burg <bburg@apple.com>
292 Web Inspector: move cookie url matching out of CookieStorageContentView and clean up some code
293 https://bugs.webkit.org/show_bug.cgi?id=151424
295 Reviewed by Timothy Hatcher.
297 Move the code that decides whether a cookie matches a resource URL to a model class.
298 This will make it possible to test this code easily without pulling Views into tests.
300 * UserInterface/Models/CookieStorageObject.js:
301 (WebInspector.CookieStorageObject.cookieMatchesResourceURL):
302 (WebInspector.CookieStorageObject.cookieDomainMatchesResourceDomain):
303 (WebInspector.CookieStorageObject.prototype.saveIdentityToCookie):
304 (WebInspector.CookieStorageObject):
305 * UserInterface/Views/CookieStorageContentView.js:
306 (WebInspector.CookieStorageContentView.prototype.update): use Promises.
307 (WebInspector.CookieStorageContentView.prototype._rebuildTable):
308 (WebInspector.CookieStorageContentView.prototype._filterCookies):
310 Use Array.filter() and Array.some() to express this logic more directly.
312 (WebInspector.CookieStorageContentView.cookieMatchesResourceURL): Deleted.
313 (WebInspector.CookieStorageContentView.cookieDomainMatchesResourceDomain): Deleted.
314 (WebInspector.CookieStorageContentView.prototype.update.callback): Deleted.
316 2015-11-18 Matt Baker <mattbaker@apple.com>
318 Web Inspector: Clear watch expressions button using wrong icon
319 https://bugs.webkit.org/show_bug.cgi?id=151422
321 Reviewed by Timothy Hatcher.
323 Updated "clear" button to use trashcan image. This was broken by
324 https://bugs.webkit.org/show_bug.cgi?id=151377.
326 * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
327 (WebInspector.ScopeChainDetailsSidebarPanel):
329 2015-11-18 Matt Baker <mattbaker@apple.com>
331 Web Inspector: Reduce synchronous view layouts
332 https://bugs.webkit.org/show_bug.cgi?id=151058
334 Reviewed by Timothy Hatcher.
336 Replace calls to View.updateLayout with needsLayout, when a synchronous layout
337 isn't absolutely necessary.
339 * UserInterface/Models/BackForwardEntry.js:
340 (WebInspector.BackForwardEntry.prototype.prepareToShow):
342 * UserInterface/Views/ApplicationCacheFrameContentView.js:
343 (WebInspector.ApplicationCacheFrameContentView.prototype.updateLayout): Deleted.
344 View subclasses shouldn't override updateLayout.
346 * UserInterface/Views/ButtonNavigationItem.js:
347 (WebInspector.ButtonNavigationItem.prototype.set label):
349 * UserInterface/Views/ContentBrowser.js:
350 (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
351 (WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
352 (WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange):
354 * UserInterface/Views/DatabaseTableContentView.js:
355 (WebInspector.DatabaseTableContentView.prototype._queryFinished):
356 Just update DataGrid's layout, not the whole view. The grid is the only subview
357 so the result is identical, but the intent is cleared this way.
358 (WebInspector.DatabaseTableContentView.prototype.updateLayout): Deleted.
359 View subclasses shouldn't override updateLayout.
361 * UserInterface/Views/LogContentView.js:
362 (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
363 (WebInspector.LogContentView.prototype.promptDidChangeHeight): Deleted.
366 * UserInterface/Views/Sidebar.js:
367 (WebInspector.Sidebar.prototype.set width):
368 (WebInspector.Sidebar.prototype.set collapsed):
370 * UserInterface/Views/TextResourceContentView.js:
371 (WebInspector.TextResourceContentView.prototype._contentWillPopulate):
372 Add TextEditor as a subview.
373 (WebInspector.TextResourceContentView.prototype.updateLayout): Deleted.
374 View subclasses shouldn't override updateLayout.
377 2015-11-18 Matt Baker <mattbaker@apple.com>
379 Web Inspector: Probes sidebar panel sections should use NavigationBar
380 https://bugs.webkit.org/show_bug.cgi?id=151373
382 Reviewed by Brian Burg.
384 Replaces image elements with a NavigationBar instance. The "Clear samples"
385 button is disabled when no samples exist in the probe set.
387 * Localizations/en.lproj/localizedStrings.js:
388 New navigation item labels.
390 * UserInterface/Models/ProbeSet.js:
391 (WebInspector.ProbeSet.prototype._sampleCollected):
392 Dispatch new event WebInspector.ProbeSet.Event.SampleAdded.
394 * UserInterface/Views/DetailsSection.css:
395 (.details-section > .header > .options > .navigation-bar):
396 (.details-section > .header > .options > .navigation-bar > .item):
397 Define consistent style for showing a NavigationBar inside the section header.
399 * UserInterface/Views/DetailsSection.js:
400 (WebInspector.DetailsSection):
401 Add "options" class name in the base class.
403 * UserInterface/Views/ProbeDetailsSidebarPanel.css:
404 (.details-section.probe-set .options > :matches(.probe-remove, .probe-clear-samples, .probe-add)): Deleted.
405 (.details-section.probe-set .options > .probe-clear-samples): Deleted.
406 (.details-section.probe-set .options > .probe-remove): Deleted.
407 (.details-section.probe-set .options > .probe-add): Deleted.
408 Remove <img> button styles.
410 * UserInterface/Views/ProbeSetDetailsSection.js:
411 (WebInspector.ProbeSetDetailsSection):
412 (WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked.createProbeFromEnteredExpression):
413 (WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
414 (WebInspector.ProbeSetDetailsSection.prototype._clearSamplesButtonClicked):
415 (WebInspector.ProbeSetDetailsSection.prototype._probeSetSamplesChanged):
416 Update "Clear samples" enabled state.
417 (WebInspector.ProbeSetDetailsSection.prototype._probeSetHasSamples):
418 Helper function to check if the probe set is empty.
420 2015-11-18 Matt Baker <mattbaker@apple.com>
422 Web Inspector: Watch Expressions details section should use NavigationBar
423 https://bugs.webkit.org/show_bug.cgi?id=151377
425 Reviewed by Timothy Hatcher.
427 Replaces image elements with a NavigationBar instance. The refresh and
428 clear buttons are disabled if no watch expressions exist.
430 * Localizations/en.lproj/localizedStrings.js:
431 New navigation item labels.
433 * UserInterface/Views/ScopeChainDetailsSidebarPanel.css:
434 (.details-section.watch-expressions .options > *): Deleted.
435 (.details-section.watch-expressions .options > *:active): Deleted.
436 (.details-section.watch-expressions .options > .watch-expression-add): Deleted.
437 (.details-section.watch-expressions .options > .watch-expression-clear): Deleted.
438 (.details-section.watch-expressions .options > .watch-expression-refresh): Deleted.
439 Remove <img> button styles.
441 * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
442 (WebInspector.ScopeChainDetailsSidebarPanel):
443 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked.presentPopoverOverTargetElement):
444 Use the navigation item element.
445 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._updateWatchExpressionsNavigationBar):
446 Enable/disable refresh and clear buttons.
448 2015-11-17 Joseph Pecoraro <pecoraro@apple.com>
450 Web Inspector: Move Timeline creation into a recording
451 https://bugs.webkit.org/show_bug.cgi?id=151367
453 Reviewed by Timothy Hatcher.
455 * UserInterface/Controllers/TimelineManager.js:
456 (WebInspector.TimelineManager.prototype._loadNewRecording): Deleted.
457 * UserInterface/Models/Timeline.js:
458 (WebInspector.Timeline.create):
459 (WebInspector.Timeline.prototype.get type):
460 (WebInspector.Timeline): Deleted.
461 (WebInspector.Timeline.prototype.get recording): Deleted.
462 * UserInterface/Models/TimelineRecording.js:
463 (WebInspector.TimelineRecording):
464 (WebInspector.TimelineRecording.prototype.get readonly):
465 (WebInspector.TimelineRecording.prototype.unloaded):
466 (WebInspector.TimelineRecording.prototype.reset):
467 (WebInspector.TimelineRecording.prototype.isWritable): Deleted.
468 * UserInterface/Views/TimelineOverview.js:
469 (WebInspector.TimelineOverview):
470 * UserInterface/Views/TimelineRecordingContentView.js:
471 (WebInspector.TimelineRecordingContentView.prototype.shown):
473 2015-11-17 Matt Baker <mattbaker@apple.com>
475 Web Inspector: Breakpoint condition field should use CodeMirror
476 https://bugs.webkit.org/show_bug.cgi?id=151333
478 Reviewed by Joseph Pecoraro.
480 Updated breakpoint popover's condition field to use CodeMirror.
482 * UserInterface/Controllers/BreakpointPopoverController.js:
483 Removed keyboard shortcuts. Now handled by CodeMirror.
484 (WebInspector.BreakpointPopoverController.prototype.completionControllerShouldAllowEscapeCompletion):
485 Prevent handling of escape to allow tabbing to next element.
486 (WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
487 Create CodeMirror instance.
488 (WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorChanged):
489 (WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorBeforeChange):
490 Enforce single-line editor.
491 (WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorEscapeOrEnterKey):
492 (WebInspector.BreakpointPopoverController): Deleted.
493 (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint):
494 Removed condition element select. CodeMirror sets focus when popover content is created.
495 (WebInspector.BreakpointPopoverController.prototype._popoverConditionInputChanged): Deleted.
496 Replaced by BreakpointPopoverController.prototype._conditionCodeMirrorChanged.
497 (WebInspector.BreakpointPopoverController.prototype._popoverConditionInputKeyDown): Deleted.
498 Replaced by BreakpointPopoverController.prototype._conditionCodeMirrorEscapeOrEnterKey.
500 * UserInterface/Views/BreakpointPopoverController.css:
501 (.edit-breakpoint-popover-condition):
502 (.edit-breakpoint-popover-condition > .CodeMirror):
503 (#edit-breakpoint-popover-condition): Deleted.
504 Replace selector id with class, styled CodeMirror element to match original input element.
506 * UserInterface/Views/CSSStyleDeclarationTextEditor.css:
507 (.css-style-text-editor > .CodeMirror .CodeMirror-placeholder): Deleted.
508 Moved common CodeMirror placeholder text style to CodeMirrorOverrides.css.
510 * UserInterface/Views/CodeMirrorOverrides.css:
511 (.CodeMirror .CodeMirror-placeholder):
512 Add placeholder style.
514 2015-11-12 Matt Baker <mattbaker@apple.com>
516 Web Inspector: Deleting a probe should remove probe breakpoint actions only.
517 https://bugs.webkit.org/show_bug.cgi?id=151245
519 Reviewed by Brian Burg.
521 Fixed breakpoint action filter.
523 * UserInterface/Models/Breakpoint.js:
524 (WebInspector.Breakpoint.prototype.clearActions):
525 Missing return in named function expression.
527 2015-11-12 Joseph Pecoraro <pecoraro@apple.com>
529 Web Inspector: Auto-log inspect node selected elements to the console
530 https://bugs.webkit.org/show_bug.cgi?id=151178
532 Reviewed by Brian Burg.
534 Auto-logging user selected elements to the console helps with
535 quick use in the console. $0 is not very discoverable, and $n
536 values are expendable. This also makes it convenient to use the
537 inspect node toolbar search option to select a few different
538 nodes and use each of them in the console without extra work.
540 * UserInterface/Controllers/DOMTreeManager.js:
541 (WebInspector.DOMTreeManager.prototype.inspectNodeObject.nodeAvailable):
542 (WebInspector.DOMTreeManager.prototype.inspectNodeObject):
543 Log selected nodes to the console. Treat this as a synthetic log that
544 will not immediately open the console like normal evaluation results.
546 * UserInterface/Controllers/JavaScriptLogViewController.js:
547 (WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult.saveResultCallback):
548 (WebInspector.JavaScriptLogViewController.prototype.appendImmediateExecutionWithResult):
549 (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted.printResult):
550 (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
551 Initialize ConsoleCommandResultMessage's synthetic properties.
553 * UserInterface/Views/DOMTreeOutline.js:
554 (WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
555 (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
556 * UserInterface/Controllers/RuntimeManager.js:
557 Create a global for the special "console" object group used in multiple places.
559 * UserInterface/Models/ConsoleCommandResultMessage.js:
560 (WebInspector.ConsoleCommandResultMessage):
561 (WebInspector.ConsoleCommandResultMessage.prototype.get synthetic):
562 Add a synthetic property.
564 * UserInterface/Views/LogContentView.js:
565 (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
566 When the ConsoleResult is a synthetic result, do not auto-open the console.
568 2015-11-12 Joseph Pecoraro <pecoraro@apple.com>
570 Web Inspector: timeline event markers are added to overview even when not capturing a timeline recording
571 https://bugs.webkit.org/show_bug.cgi?id=151166
573 Reviewed by Timothy Hatcher.
575 * UserInterface/Models/TimelineRecording.js:
576 (WebInspector.TimelineRecording.prototype.addEventMarker):
577 Do not add event markers when not capturing. This would have resulted in more
578 and more markers showing in the Timeline for page loads when the Timeline was
579 not active. For example reloading when a non-Timeline tab was active.
581 2015-11-11 Joseph Pecoraro <pecoraro@apple.com>
583 Web Inspector: Add Debug toolbar button to toggle InspectorBackend.dumpInspectorProtocolMessages
584 https://bugs.webkit.org/show_bug.cgi?id=151175
586 Reviewed by Brian Burg.
588 Add debug UI and a way to toggle it on and off in non-production builds.
589 To enable the debug UI use a keyboard shortcut in Inspector:
590 Option+Shift+Command+D (Mac) or Option+Shift+Ctrl+D (Windows / Linux)
592 The debug UI setting is a persistent setting, so those of use developing
593 Web Inspector will turn it on and leave it on.
595 Currently the only debug UI is a new toolbar button to toggle
596 the frontend logging on or off.
598 * Scripts/combine-resources.pl:
600 Exclude "Debug" files when combining resources for minification.
602 * UserInterface/Main.html:
603 Rename "Base/Bootstrap.js" to "Debug/Bootstrap" so that we can easily exclude it.
605 * UserInterface/Base/Main.js:
606 (WebInspector.contentLoaded):
607 Only evaluate bootstrap functions if they exist.
609 * UserInterface/Debug/Bootstrap.js: Renamed from Source/WebInspectorUI/UserInterface/Base/Bootstrap.js.
610 (WebInspector.runBootstrapOperations):
611 Add a debug setting, toolbar button, and keyboard shortcut.
613 2015-11-11 Brian Burg <bburg@apple.com>
615 Web Inspector: blank debugger tab when opening inspector on unvisited website
616 https://bugs.webkit.org/show_bug.cgi?id=151149
618 Reviewed by Joseph Pecoraro.
620 When Inspector tries to show default content when initially showing a tab upon opening,
621 there may not be any tree elements added to the navigation bar yet. In the case of an
622 unvisited website, there will be no state restoration cookie to trigger deferred selection.
623 So, showDefaultContentView finds no tree elements it can show, and the main view is blank.
625 We can fix this by speculatively showing the first script/resource that's added to the tree
626 if no content view is being shown. If a state restoration cookie exists, it will take priority
627 over the default-displayed content view.
629 * UserInterface/Views/DebuggerSidebarPanel.js:
630 (WebInspector.DebuggerSidebarPanel.prototype._addResource):
631 (WebInspector.DebuggerSidebarPanel.prototype._addScript):
633 2015-11-11 Matt Baker <mattbaker@apple.com>
635 Web Inspector: Convert sidebars to use View base class
636 https://bugs.webkit.org/show_bug.cgi?id=151057
638 Reviewed by Timothy Hatcher.
640 This patch makes Sidebar a subclass of View. Mostly mechanical changes and cleanup,
641 such as adding navigation bars and panels as subviews, removing element getters,
642 and replacing external properties with symbols.
644 * UserInterface/Base/Main.js:
645 Added sidebars to view hierarchy.
647 * UserInterface/Views/DebuggerSidebarPanel.js:
648 Add navigation bar as a subview.
650 * UserInterface/Views/NetworkSidebarPanel.js:
651 Add navigation bar as a subview.
652 (WebInspector.NetworkSidebarPanel):
653 (WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
654 (WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
655 (WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):
656 (WebInspector.NetworkSidebarPanel.prototype._treeElementGoToArrowWasClicked):
657 External properties replaced with symbols.
659 * UserInterface/Views/ResourceSidebarPanel.js:
660 Add navigation bar as a subview.
661 (WebInspector.ResourceSidebarPanel):
662 (WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
663 (WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
664 External properties replaced with symbols.
666 * UserInterface/Views/Sidebar.js:
667 (WebInspector.Sidebar):
668 (WebInspector.Sidebar.prototype.addSidebarPanel):
669 (WebInspector.Sidebar.prototype.removeSidebarPanel):
670 Panels are now added and removed as subviews.
671 (WebInspector.Sidebar.prototype.get width):
672 (WebInspector.Sidebar.prototype.set width):
673 (WebInspector.Sidebar.prototype.get collapsed):
674 (WebInspector.Sidebar.prototype.set collapsed):
675 "collapsed" property now backed by private class variable, not DOM state.
676 (WebInspector.Sidebar.prototype.get element): Deleted.
678 * UserInterface/Views/SidebarPanel.js:
679 (WebInspector.SidebarPanel):
680 (WebInspector.SidebarPanel.prototype.get visible):
681 (WebInspector.SidebarPanel.prototype.get selected):
682 (WebInspector.SidebarPanel.prototype.set selected):
683 "selected" property now backed by private class variable, not DOM state.
684 (WebInspector.SidebarPanel.prototype.get parentSidebar):
685 No longer stored as separate property. Wrapper around View.prototype.parentView.
686 Original getter retained for clarity.
687 (WebInspector.SidebarPanel.prototype.show):
688 (WebInspector.SidebarPanel.prototype.hide):
689 (WebInspector.SidebarPanel.prototype.added):
690 (WebInspector.SidebarPanel.prototype.removed):
691 (WebInspector.SidebarPanel.prototype.get element): Deleted.
693 * UserInterface/Views/StorageSidebarPanel.js:
694 (WebInspector.StorageSidebarPanel):
695 Add navigation bar as a subview.
697 2015-11-10 Matt Baker <mattbaker@apple.com>
699 Web Inspector: Enable/disable All Breakpoints not usable when "No Filter Results" displayed
700 https://bugs.webkit.org/show_bug.cgi?id=151062
702 Reviewed by Timothy Hatcher.
704 Position the placeholder element below the navigation bar. This was already being done
705 for the other navigation sidebars.
707 * UserInterface/Views/DebuggerSidebarPanel.css:
708 (.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)):
709 (.sidebar > .panel.navigation.debugger > .content): Deleted.
711 2015-11-10 Matt Baker <mattbaker@apple.com>
713 Web Inspector: Batch all scheduled layouts and update the view tree in a single animation frame
714 https://bugs.webkit.org/show_bug.cgi?id=150993
716 Reviewed by Brian Burg.
718 Shifts responsibility for scheduling asynchronous layouts from view objects to a controller
719 layer, implemented as private static methods and properties in the View class. A single animation
720 frame callback performs a breadth-first traversal of the view tree starting at the root view,
721 updating views marked as needing a layout.
723 * UserInterface/Base/Main.js:
724 (WebInspector.contentLoaded):
727 * UserInterface/Views/View.js:
728 Added private class properties for root view reference and rAF identifier.
730 (WebInspector.View.prototype.get layoutPending):
731 (WebInspector.View.prototype.get parentView):
732 (WebInspector.View.prototype.makeRootView):
733 Set current view to be the root of the view hierarchy.
734 Can only be called once.
735 (WebInspector.View.prototype.insertSubviewBefore):
736 No longer appends subview element to parent element, if subview already in the DOM.
737 Checks that view being inserted isn't the root view.
738 (WebInspector.View.prototype.removeSubview):
739 (WebInspector.View.prototype.updateLayout):
740 Cancels any scheduled layouts for the view, then does a synchronous layout.
741 (WebInspector.View.prototype.updateLayoutIfNeeded):
742 (WebInspector.View.prototype.needsLayout):
743 Schedules view for the next asynchronous layout, if not already scheduled.
744 (WebInspector.View.prototype.didAttach):
745 (WebInspector.View.prototype.didDetach):
746 Inform view of changing parent view.
747 (WebInspector.View.prototype._layoutSubtree):
748 (WebInspector.View._scheduleLayoutForView):
749 Increments dirty counts on ancestor views, schedules a layout if needed.
750 (WebInspector.View._cancelScheduledLayoutForView):
751 Decrements dirty counts on ancestor views, cancels a pending layout if needed.
752 (WebInspector.View._visitViewTreeForLayout):
753 Animation frame callback. Does a breadth-first traversal of the view tree,
754 and updates the layout of views marked as dirty.
756 2015-11-10 Nikita Vasilyev <nvasilyev@apple.com>
758 Web Inspector: Code coverage profiler: incorrect "in-viewport" detection algorithm
759 https://bugs.webkit.org/show_bug.cgi?id=151116
761 Reviewed by Brian Burg.
763 * UserInterface/Controllers/BasicBlockAnnotator.js:
764 (WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
766 2015-11-09 Joseph Pecoraro <pecoraro@apple.com>
768 Web Inspector: Support Gesture Events to zoom in / out of the Timeline
769 https://bugs.webkit.org/show_bug.cgi?id=151071
771 Reviewed by Timothy Hatcher.
773 Adjust the Timeline's secondsPerPixel value by the gesture event's scale factor.
775 * UserInterface/Views/TimelineOverview.js:
776 (WebInspector.TimelineOverview):
777 (WebInspector.TimelineOverview.prototype._handleWheelEvent):
778 (WebInspector.TimelineOverview._handleGestureStart):
779 (WebInspector.TimelineOverview.prototype._handleGestureChange):
780 (WebInspector.TimelineOverview.prototype._handleGestureEnd):
782 2015-11-09 Joseph Pecoraro <pecoraro@apple.com>
784 Web Inspector: Uncaught exception creating TimelineRecord alternate subtitles
785 https://bugs.webkit.org/show_bug.cgi?id=151046
787 Reviewed by Brian Burg.
789 * UserInterface/Views/TimelineRecordTreeElement.js:
790 (WebInspector.TimelineRecordTreeElement):
791 We just need to create an element, it does not need to be
792 a child of subtitle, as it gets appended to the right
795 2015-11-09 Nikita Vasilyev <nvasilyev@apple.com>
797 Web Inspector: [Regression] [Mavericks] Top border of selected tab matches the background when Web Inspector is undocked
798 https://bugs.webkit.org/show_bug.cgi?id=150981
800 Reviewed by Timothy Hatcher.
802 * UserInterface/Views/TabBar.css:
803 (body.mavericks .tab-bar > .item:not(.disabled).selected): Added.
805 2015-11-09 Matt Baker <mattbaker@apple.com>
807 Web Inspector: Convert DatabaseContentView to use View base class
808 https://bugs.webkit.org/show_bug.cgi?id=150959
810 Reviewed by Timothy Hatcher.
812 Update DatabaseContentView to inherit from View. This required that query results be
813 promoted to a first-class view object, and that ConsolePrompt's DOM element not be wrapped
814 inside a container element.
816 Two new query result view classes (and their base class) wrap up DOM element creation
817 which was being performed by DatabaseContentView.
819 * Localizations/en.lproj/localizedStrings.js:
821 * UserInterface/Main.html:
824 * UserInterface/Views/ConsolePrompt.js:
825 (WebInspector.ConsolePrompt):
826 Removed unused parameter.
828 * UserInterface/Views/DatabaseContentView.css:
830 (.storage-view > .console-prompt):
831 (.storage-view > .console-prompt::before):
832 (:matches(.database-user-query, .database-query-result)::before):
833 (.database-query-result.no-results):
834 (.database-query-prompt): Deleted.
835 (:matches(.database-user-query, .database-query-prompt, .database-query-result)::before): Deleted.
836 (.database-query-prompt::before): Deleted.
837 Modified styles to create prompt without needing a wrapper element.
839 * UserInterface/Views/DatabaseContentView.js:
840 (WebInspector.DatabaseContentView):
841 (WebInspector.DatabaseContentView.prototype.shown):
842 (WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded.accumulateMatches):
843 (WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded.tableNamesCallback):
844 (WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded):
845 (WebInspector.DatabaseContentView.prototype._messagesClicked):
846 (WebInspector.DatabaseContentView.prototype._queryFinished):
847 (WebInspector.DatabaseContentView.prototype._queryError):
848 (WebInspector.DatabaseContentView.prototype.updateLayout): Deleted.
850 (WebInspector.DatabaseContentView.prototype._appendViewQueryResult): Deleted.
851 (WebInspector.DatabaseContentView.prototype._appendErrorQueryResult): Deleted.
852 (WebInspector.DatabaseContentView.prototype._appendQueryResult): Deleted.
853 Removed methods subsumed under DatabaseUserQueryView.
855 * UserInterface/Views/DatabaseUserQueryErrorView.js: Added.
856 (WebInspector.DatabaseUserQueryErrorView):
857 Displays supplied error message.
859 * UserInterface/Views/DatabaseUserQuerySuccessView.js: Added.
860 (WebInspector.DatabaseUserQuerySuccessView):
861 Creates data grid if results exist, otherwise displays "no results" message.
862 (WebInspector.DatabaseUserQuerySuccessView.prototype.get dataGrid):
863 External access to view's data grid for autosizing columns, etc.
864 (WebInspector.DatabaseUserQuerySuccessView.prototype.layout):
865 Update grid layout manually, since the grid's parent in the DOM isn't the view's root element.
867 * UserInterface/Views/DatabaseUserQueryViewBase.js: Added.
868 Base class for success and error message views.
869 (WebInspector.DatabaseUserQueryViewBase):
870 Creates DOM common to subclasses.
871 (WebInspector.DatabaseUserQueryViewBase.prototype.get resultElement):
872 Protected getter exposing the content root for both subclasses.
874 2015-11-07 Nikita Vasilyev <nvasilyev@apple.com>
876 Web Inspector: [Regression] [Mavericks] Toolbar is too dark while docked
877 https://bugs.webkit.org/show_bug.cgi?id=150977
879 Set the toolbar color of the docked inspector to be the same as on OS X 10.10+.
880 Undocked toolbar color on Mavericks is unnaffected.
882 Reviewed by Timothy Hatcher.
884 * UserInterface/Views/Toolbar.css:
885 (body.mavericks.docked .toolbar):
886 (body:not(.mavericks) .toolbar): Added.
888 2015-11-06 Timothy Hatcher <timothy@apple.com>
890 Web Inspector: Search Results tab causes jump to Resources tab on reload
891 https://bugs.webkit.org/show_bug.cgi?id=150817
893 Reviewed by Brian Burg.
895 Remove the "search on reload" behavior from the Search Results tab. It often didn't find everything
896 on large pages, since it only searched after 500ms of the main resource changing. The bug here
897 was caused by performSearch selecting the first result, even if it was a background tab. We now
898 avoid doing unnecessary search work in the background when the Search Results tab isn't visible.
900 * UserInterface/Views/SearchSidebarPanel.js:
901 (WebInspector.SearchSidebarPanel): Deleted.
902 (WebInspector.SearchSidebarPanel.prototype._mainResourceDidChange): Remove children from the
903 sidebar since performSearch isn't doing it now and ScriptTreeElements were not being removed.
904 ResourceTreeElements were already being removed by NavigationSidebarPanel's prune behavior.
905 Removed the call to performSearch and related code.
906 (WebInspector.SearchSidebarPanel.prototype._mainResourceDidChange.delayedWork): Deleted.
908 2015-11-05 Matt Baker <mattbaker@apple.com>
910 Web Inspector: Convert remaining ContentViews to View base class
911 https://bugs.webkit.org/show_bug.cgi?id=150729
913 Reviewed by Brian Burg.
915 Refactor content views to reuse View features: remove updateLayout and
916 element getters, and use View.prototype.addSubview and removeSubview
919 * UserInterface/Views/ApplicationCacheFrameContentView.js:
920 (WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
921 * UserInterface/Views/ClusterContentView.js:
922 (WebInspector.ClusterContentView):
923 (WebInspector.ClusterContentView.prototype.updateLayout): Deleted.
924 * UserInterface/Views/CookieStorageContentView.js:
925 (WebInspector.CookieStorageContentView.prototype._rebuildTable):
926 (WebInspector.CookieStorageContentView.prototype.updateLayout): Deleted.
927 * UserInterface/Views/DOMStorageContentView.js:
928 (WebInspector.DOMStorageContentView):
929 (WebInspector.DOMStorageContentView.prototype.updateLayout): Deleted.
930 * UserInterface/Views/DOMTreeContentView.js:
931 (WebInspector.DOMTreeContentView.prototype.layout):
932 (WebInspector.DOMTreeContentView.prototype.updateLayout): Deleted.
933 * UserInterface/Views/DatabaseTableContentView.js:
934 (WebInspector.DatabaseTableContentView):
935 (WebInspector.DatabaseTableContentView.prototype._queryFinished):
936 (WebInspector.DatabaseTableContentView.prototype._queryError):
937 * UserInterface/Views/FontResourceContentView.js:
938 (WebInspector.FontResourceContentView.prototype.layout):
939 (WebInspector.FontResourceContentView):
940 (WebInspector.FontResourceContentView.prototype.updateLayout): Deleted.
941 * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
942 (WebInspector.IndexedDatabaseObjectStoreContentView):
943 (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.updateLayout): Deleted.
944 * UserInterface/Views/LogContentView.js:
945 (WebInspector.LogContentView.prototype.layout):
946 (WebInspector.LogContentView.prototype.updateLayout): Deleted.
947 * UserInterface/Views/NetworkGridContentView.js:
948 (WebInspector.NetworkGridContentView):
949 (WebInspector.NetworkGridContentView.prototype.needsLayout):
950 (WebInspector.NetworkGridContentView.prototype.layout):
951 (WebInspector.NetworkGridContentView.prototype.updateLayout): Deleted.
952 * UserInterface/Views/OverviewTimelineView.js:
953 (WebInspector.OverviewTimelineView):
954 (WebInspector.OverviewTimelineView.prototype.layout): Deleted.
955 * UserInterface/Views/ScriptContentView.js:
956 (WebInspector.ScriptContentView.prototype._contentWillPopulate):
957 (WebInspector.ScriptContentView.prototype.updateLayout): Deleted.
958 * UserInterface/Views/TextContentView.js:
959 (WebInspector.TextContentView):
960 (WebInspector.TextContentView.prototype.updateLayout): Deleted.
961 * UserInterface/Views/TextEditor.js:
962 (WebInspector.TextEditor):
963 (WebInspector.TextEditor.prototype.layout):
964 (WebInspector.TextEditor.prototype.get element): Deleted.
965 (WebInspector.TextEditor.prototype.updateLayout): Deleted.
966 * UserInterface/Views/TimelineRecordingContentView.js:
967 (WebInspector.TimelineRecordingContentView):
968 (WebInspector.TimelineRecordingContentView.prototype.layout):
969 (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
970 (WebInspector.TimelineRecordingContentView.prototype.updateLayout): Deleted.
972 2015-11-05 Nikita Vasilyev <nvasilyev@apple.com>
974 Web Inspector: Pretty print falsely triggers on some JS that wasn't minified
975 https://bugs.webkit.org/show_bug.cgi?id=150876
977 Change the minification detection heuristic. Look for the ratio of whitespace to
978 non-whitespace characters in the first 5000 characters.
980 The previous heuristic looked for lines longer than 500 characters. Not only it was
981 slower on large unminified files, it also had a false positive on unminified codemirror.js.
983 Reviewed by Timothy Hatcher.
985 * UserInterface/Views/SourceCodeTextEditor.js:
986 (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
987 (WebInspector.SourceCodeTextEditor.prototype._isLikelyMinified):
988 Exit early if whitespace to non-whitespace ratio drops below 5%.
990 2015-11-05 Matt Baker <mattbaker@apple.com>
992 Web Inspector: Convert TimelineRuler to View base class
993 https://bugs.webkit.org/show_bug.cgi?id=150703
995 Reviewed by Brian Burg.
997 Convert TimelineRuler to View base class. Ruler markers and selection elements
998 can be updated independent from its main layout. The logic for these additional
999 layouts is implemented as an override of View.prototype.needsLayout, and remains
1002 * UserInterface/Views/OverviewTimelineView.js:
1003 (WebInspector.OverviewTimelineView):
1004 Add ruler as a subview.
1005 (WebInspector.OverviewTimelineView.prototype.layout): Deleted.
1006 Separate ruler layout no longer needed.
1008 * UserInterface/Views/TimelineRuler.js:
1009 (WebInspector.TimelineRuler):
1010 (WebInspector.TimelineRuler.prototype.set allowsClippedLabels):
1011 (WebInspector.TimelineRuler.prototype.set formatLabelCallback):
1012 (WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
1013 (WebInspector.TimelineRuler.prototype.set zeroTime):
1014 (WebInspector.TimelineRuler.prototype.set startTime):
1015 (WebInspector.TimelineRuler.prototype.set duration):
1016 (WebInspector.TimelineRuler.prototype.get endTime):
1017 (WebInspector.TimelineRuler.prototype.set endTime):
1018 (WebInspector.TimelineRuler.prototype.get secondsPerPixel):
1019 (WebInspector.TimelineRuler.prototype.set secondsPerPixel):
1020 (WebInspector.TimelineRuler.prototype.updateLayoutIfNeeded):
1021 (WebInspector.TimelineRuler.prototype.needsLayout):
1022 (WebInspector.TimelineRuler.prototype.layout):
1023 (WebInspector.TimelineRuler.prototype._needsMarkerLayout):
1024 (WebInspector.TimelineRuler.prototype._needsSelectionLayout):
1025 (WebInspector.TimelineRuler.prototype._recalculate):
1026 (WebInspector.TimelineRuler.prototype._updateMarkers):
1027 (WebInspector.TimelineRuler.prototype._updateSelection):
1028 (WebInspector.TimelineRuler.prototype._handleMouseDown):
1029 (WebInspector.TimelineRuler.prototype._handleMouseMove):
1030 (WebInspector.TimelineRuler.prototype._handleMouseUp):
1031 (WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseDown):
1032 (WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseMove):
1033 (WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseUp):
1034 Renamed methods to match new View.prototype methods and cleaned up
1035 some code to use let, for...of.
1036 (WebInspector.TimelineRuler.prototype.get element): Deleted.
1038 (WebInspector.TimelineRuler.prototype.updateLayout): Deleted.
1039 Renamed to layout, overrides View.prototype.layout.
1040 (WebInspector.TimelineRuler.prototype._needsLayout): Deleted.
1041 Renamed to needsLayout, overrides View.prototype.needsLayout.
1042 (WebInspector.TimelineRuler.prototype._needsMarkerLayout.update): Deleted.
1043 (WebInspector.TimelineRuler.prototype._needsSelectionLayout.update): Deleted.
1045 * UserInterface/Views/View.js:
1046 (WebInspector.View.prototype.get isLayoutPending):
1047 Added getter to check for pending layout.
1049 2015-11-05 Joseph Pecoraro <pecoraro@apple.com>
1051 Web Inspector: ⌥⌘C sometimes ends ups up opening inspector without console prompt focused
1052 https://bugs.webkit.org/show_bug.cgi?id=150916
1054 Reviewed by Timothy Hatcher.
1056 When first opening the inspector we hide the window until the document
1057 is mostly ready / loaded. However once displaying the window WK2 would
1058 set the initial focus, clearing what we already had and focusing the
1059 first natural element (tabindex dictates the toolbar). Workaround this
1060 by detecting when the document becomes visible and then focusing the
1063 * UserInterface/Protocol/InspectorFrontendAPI.js:
1064 (InspectorFrontendAPI.showConsole):
1065 (InspectorFrontendAPI.handleEvent):
1067 2015-11-05 Joseph Pecoraro <pecoraro@apple.com>
1069 Web Inspector: Toolbar "Inspect Node" button not highlighting when active
1070 https://bugs.webkit.org/show_bug.cgi?id=150938
1072 Reviewed by Timothy Hatcher.
1074 * UserInterface/Views/ButtonToolbarItem.css:
1075 (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph):
1076 (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph):
1077 Copy the navigation-bar button activated styles to toolbar.
1079 2015-11-04 Matt Baker <mattbaker@apple.com>
1081 Web Inspector: Load markers persist in timeline ruler after resetting recording
1082 https://bugs.webkit.org/show_bug.cgi?id=150918
1084 Reviewed by Joseph Pecoraro.
1086 * UserInterface/Views/OverviewTimelineView.js:
1087 (WebInspector.OverviewTimelineView):
1088 (WebInspector.OverviewTimelineView.prototype._recordingReset):
1089 Clears ruler markers on recording reset. Adds current time marker back.
1091 * UserInterface/Views/TimelineOverview.js:
1092 (WebInspector.TimelineOverview):
1093 (WebInspector.TimelineOverview.prototype._recordingReset):
1094 Clears ruler markers on recording reset. Adds current time marker back.
1096 * UserInterface/Views/TimelineRuler.js:
1097 (WebInspector.TimelineRuler.prototype.clearMarkers):
1098 Added method to clear markers and marker elements.
1100 2015-11-04 Matt Baker <mattbaker@apple.com>
1102 Web Inspector: Uncaught Exception opening inspector - TypeError: Attempted to assign to readonly property.
1103 https://bugs.webkit.org/show_bug.cgi?id=150913
1105 Reviewed by Timothy Hatcher.
1107 Fix invalid call to BackForwardEntry.prototype.contentView set.
1109 * UserInterface/Views/ContentViewContainer.js:
1110 (WebInspector.ContentViewContainer.prototype.replaceContentView):
1111 Replace each BackForwardEntry matching the old content view with a new entry.
1113 2015-11-04 Nikita Vasilyev <nvasilyev@apple.com>
1115 Web Inspector: Uncaught exception mousing over CSS resource
1116 https://bugs.webkit.org/show_bug.cgi?id=150917
1118 Reviewed by Joseph Pecoraro.
1120 * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
1121 (WebInspector.CodeMirrorTokenTrackingController.prototype._processMarkedToken): Add missing parameter.
1123 2015-11-04 Joseph Pecoraro <pecoraro@apple.com>
1125 Web Inspector: WebInspector.Color should support #rgba and #rrggbbaa syntax
1126 https://bugs.webkit.org/show_bug.cgi?id=150894
1128 Reviewed by Timothy Hatcher.
1130 Support for hex with alpha color syntax.
1132 * UserInterface/Models/Color.js:
1133 (WebInspector.Color.fromString):
1134 (WebInspector.Color.prototype.nextFormat):
1135 (WebInspector.Color.prototype.copy):
1136 (WebInspector.Color.prototype.toString):
1137 (WebInspector.Color.prototype._toShortHEXAlphaString):
1138 (WebInspector.Color.prototype._toHEXAlphaString):
1139 Add support for new hex syntax. Address some minor issues
1140 like case insensitivity and extra comma separate values.
1142 * UserInterface/Views/CodeMirrorTextMarkers.js:
1143 This prevent trailing hex characters from showing up
1144 when cycling through color variants.
1146 * UserInterface/Views/CodeMirrorAdditions.js:
1147 When CodeMirror stops treating the new values as error
1148 this will give them our hex-color styles.
1150 2015-11-03 Matt Baker <mattbaker@apple.com>
1152 Web Inspector: REGRESSION (r191612): Storage sidebar panel tree outline is broken
1153 https://bugs.webkit.org/show_bug.cgi?id=150862
1155 Reviewed by Joseph Pecoraro.
1157 * UserInterface/Views/ApplicationCacheFrameContentView.js:
1158 Inherit from ContentView.
1160 * UserInterface/Views/StorageSidebarPanel.js:
1161 (WebInspector.StorageSidebarPanel.prototype._addDatabase):
1163 (WebInspector.StorageSidebarPanel.prototype._addIndexedDatabase):
1164 (WebInspector.StorageSidebarPanel.prototype._addFrameManifest):
1165 WebInspector.TreeOutline.append doesn't exist; changed to appendChild.
1167 2015-11-03 Matt Baker <mattbaker@apple.com>
1169 Web Inspector: Create View base class, refactor some core view classes
1170 https://bugs.webkit.org/show_bug.cgi?id=149186
1172 Reviewed by Brian Burg and Timothy Hatcher.
1174 This patch introduces a new View base class, which encapsulates DOM element creation,
1175 layout scheduling, and subview management. The View class constructor accepts an optional
1176 element parameter, allowing an existing DOM element to be associated with the View object,
1177 rather than dynamically creating a new element. View also adds a `__view` property to its
1178 associated DOM element to facilitate debugging the Inspector UI.
1180 For the view classes refactored in this patch, the changes are largely mechanical. Dynamically
1181 created DOM elements and redundant element getters have been removed. needsLayout has replaced
1182 updateLayoutIfNeeded where appropriate. updateLayout has been removed entirely for views that
1183 performed no layout other than to cascade layouts to their children.
1185 * UserInterface/Base/Main.js:
1186 Moved TabBar layout updates out of TabBrowser and into Main.js.
1188 * UserInterface/Main.html:
1189 * UserInterface/Views/ConsolePrompt.js:
1190 (WebInspector.ConsolePrompt):
1191 (WebInspector.ConsolePrompt.prototype.layout):
1192 (WebInspector.ConsolePrompt.prototype.get element): Deleted.
1193 (WebInspector.ConsolePrompt.prototype.updateLayout): Deleted.
1194 * UserInterface/Views/ContentBrowser.js:
1195 (WebInspector.ContentBrowser):
1196 (WebInspector.ContentBrowser.prototype.get element): Deleted.
1197 (WebInspector.ContentBrowser.prototype.updateLayout): Deleted.
1198 * UserInterface/Views/ContentBrowserTabContentView.js:
1199 (WebInspector.ContentBrowserTabContentView):
1200 (WebInspector.ContentBrowserTabContentView.prototype.updateLayout): Deleted.
1201 * UserInterface/Views/ContentView.js:
1202 (WebInspector.ContentView):
1203 (WebInspector.ContentView.prototype.get element): Deleted.
1204 (WebInspector.ContentView.prototype.updateLayout): Deleted.
1205 * UserInterface/Views/ContentViewContainer.js:
1206 (WebInspector.ContentViewContainer):
1207 (WebInspector.ContentViewContainer.prototype._showEntry):
1208 (WebInspector.ContentViewContainer.prototype._hideEntry):
1209 (WebInspector.ContentViewContainer.prototype.get element): Deleted.
1210 (WebInspector.ContentViewContainer.prototype.updateLayout): Deleted.
1211 (WebInspector.ContentViewContainer.prototype._addContentViewElement): Deleted.
1212 (WebInspector.ContentViewContainer.prototype._removeContentViewElement): Deleted.
1213 * UserInterface/Views/DataGrid.js:
1214 (WebInspector.DataGrid.prototype.autoSizeColumns):
1215 (WebInspector.DataGrid.prototype.layout):
1216 (WebInspector.DataGrid.prototype.applyColumnWidthsMap):
1217 (WebInspector.DataGrid): Deleted.
1218 (WebInspector.DataGrid.prototype.updateLayout): Deleted.
1219 (WebInspector.DataGrid.prototype.resizerDragging): Deleted.
1220 (WebInspector.DataGrid.prototype.resizerDragEnded): Deleted.
1221 * UserInterface/Views/HierarchicalPathNavigationItem.js:
1222 (WebInspector.HierarchicalPathNavigationItem.prototype.set components):
1223 * UserInterface/Views/LayoutTimelineView.js:
1224 (WebInspector.LayoutTimelineView):
1225 (WebInspector.LayoutTimelineView.prototype.layout):
1226 (WebInspector.LayoutTimelineView.prototype.updateLayout): Deleted.
1227 * UserInterface/Views/NavigationBar.js:
1228 (WebInspector.NavigationBar):
1229 (WebInspector.NavigationBar.prototype.insertNavigationItem):
1230 (WebInspector.NavigationBar.prototype.removeNavigationItem):
1231 (WebInspector.NavigationBar.prototype.get minimumWidth):
1232 (WebInspector.NavigationBar.prototype.layout):
1233 (WebInspector.NavigationBar.prototype._mouseDown):
1234 (WebInspector.NavigationBar.prototype._mouseMoved):
1235 (WebInspector.NavigationBar.prototype._mouseUp):
1236 (WebInspector.NavigationBar.prototype._calculateMinimumWidth):
1237 (WebInspector.NavigationBar.prototype.updateLayoutSoon.update): Deleted.
1238 (WebInspector.NavigationBar.prototype.updateLayoutSoon): Deleted.
1239 (WebInspector.NavigationBar.prototype.updateLayout): Deleted.
1240 (WebInspector.NavigationBar.prototype.get element): Deleted.
1241 * UserInterface/Views/NavigationItem.js:
1242 (WebInspector.NavigationItem.prototype.set hidden):
1243 * UserInterface/Views/NetworkTimelineView.js:
1244 (WebInspector.NetworkTimelineView):
1245 (WebInspector.NetworkTimelineView.prototype.layout):
1246 (WebInspector.NetworkTimelineView.prototype.updateLayout): Deleted.
1247 * UserInterface/Views/OverviewTimelineView.js:
1248 (WebInspector.OverviewTimelineView):
1249 (WebInspector.OverviewTimelineView.prototype.layout):
1250 (WebInspector.OverviewTimelineView.prototype.updateLayout): Deleted.
1251 * UserInterface/Views/QuickConsole.js:
1252 (WebInspector.QuickConsole):
1253 (WebInspector.QuickConsole.prototype.layout):
1254 (WebInspector.QuickConsole.prototype.get element): Deleted.
1255 (WebInspector.QuickConsole.prototype.updateLayout): Deleted.
1256 * UserInterface/Views/RenderingFrameTimelineView.js:
1257 (WebInspector.RenderingFrameTimelineView):
1258 (WebInspector.RenderingFrameTimelineView.prototype.layout):
1259 (WebInspector.RenderingFrameTimelineView.prototype.updateLayout): Deleted.
1260 * UserInterface/Views/ScriptTimelineView.js:
1261 (WebInspector.ScriptTimelineView):
1262 (WebInspector.ScriptTimelineView.prototype.layout):
1263 (WebInspector.ScriptTimelineView.prototype.updateLayout): Deleted.
1264 * UserInterface/Views/TabBar.js:
1265 (WebInspector.TabBar):
1266 (WebInspector.TabBar.prototype.insertTabBarItem.animateTabs):
1267 (WebInspector.TabBar.prototype.insertTabBarItem.removeStyles):
1268 (WebInspector.TabBar.prototype.insertTabBarItem):
1269 (WebInspector.TabBar.prototype.removeTabBarItem.animateTabs):
1270 (WebInspector.TabBar.prototype.removeTabBarItem.removeStyles):
1271 (WebInspector.TabBar.prototype.removeTabBarItem):
1272 (WebInspector.TabBar.prototype.hasNormalTab):
1273 (WebInspector.TabBar.prototype.layout):
1274 (WebInspector.TabBar.prototype._recordTabBarItemSizesAndPositions):
1275 (WebInspector.TabBar.prototype._finishExpandingTabsAfterClose.):
1276 (WebInspector.TabBar.prototype._finishExpandingTabsAfterClose):
1277 (WebInspector.TabBar.prototype._handleClick):
1278 (WebInspector.TabBar.prototype._handleMouseMoved):
1279 (WebInspector.TabBar.prototype._handleMouseUp):
1280 (WebInspector.TabBar.prototype._handleMouseLeave):
1281 (WebInspector.TabBar.prototype._handleNewTabMouseEnter):
1282 (WebInspector.TabBar.prototype.updateLayoutSoon.update): Deleted.
1283 (WebInspector.TabBar.prototype.updateLayoutSoon): Deleted.
1284 (WebInspector.TabBar.prototype.updateLayout): Deleted.
1285 (WebInspector.TabBar.prototype.get element): Deleted.
1286 * UserInterface/Views/TabBrowser.js:
1287 (WebInspector.TabBrowser):
1288 (WebInspector.TabBrowser.prototype.get element): Deleted.
1289 (WebInspector.TabBrowser.prototype.updateLayout): Deleted.
1290 * UserInterface/Views/TimelineView.js:
1291 (WebInspector.TimelineView.prototype.filterUpdated):
1292 (WebInspector.TimelineView.prototype.needsLayout):
1293 (WebInspector.TimelineView.prototype.updateLayout): Deleted.
1294 (WebInspector.TimelineView.prototype.updateLayoutIfNeeded): Deleted.
1295 (WebInspector.TimelineView): Deleted.
1297 * UserInterface/Views/Toolbar.js:
1298 (WebInspector.Toolbar):
1299 (WebInspector.Toolbar.prototype.set displayMode):
1300 (WebInspector.Toolbar.prototype.set sizeMode):
1301 (WebInspector.Toolbar.prototype.addToolbarItem):
1302 (WebInspector.Toolbar.prototype.layout):
1303 (WebInspector.Toolbar.prototype.customUpdateLayout): Deleted.
1304 Renamed to layout. This eliminated a layering violation in NavigationBar,
1305 where the function previously known as updateLayout checked for a
1306 a `customUpdateLayout` function property, and would call it instead of its
1307 own layout logic if found.
1309 * UserInterface/Views/View.js: Added.
1310 (WebInspector.View):
1311 (WebInspector.View.prototype.get element):
1312 (WebInspector.View.prototype.get subviews):
1313 (WebInspector.View.prototype.addSubview):
1314 Appends a view to the end of the subview list.
1315 (WebInspector.View.prototype.insertSubviewBefore):
1316 Inserts a view into subview list before another subview.
1317 (WebInspector.View.prototype.removeSubview):
1318 (WebInspector.View.prototype.replaceSubview):
1319 (WebInspector.View.prototype.updateLayout):
1320 No longer overridden by subclasses.
1321 (WebInspector.View.prototype.updateLayoutIfNeeded):
1322 Forces a layout if one has been scheduled, otherwise does nothing.
1323 (WebInspector.View.prototype.needsLayout):
1324 Schedules a layout for the view.
1325 (WebInspector.View.prototype.layout):
1326 Overridden by views that require special layout logic. Layouts
1327 cascade to child views automatically.
1328 (WebInspector.View.prototype._layoutSubtree):
1329 Main layout entry point. Called by requestAnimationFrame via needsLayut, by
1330 updateLayout when forcing a synchronous layout, and called recursively during
1333 2015-11-03 Joseph Pecoraro <pecoraro@apple.com>
1335 Web Inspector: Handle or Remove ParseHTML Timeline Event Records
1336 https://bugs.webkit.org/show_bug.cgi?id=150689
1338 Reviewed by Timothy Hatcher.
1340 * UserInterface/Controllers/TimelineManager.js:
1341 (WebInspector.TimelineManager.prototype._processRecord):
1343 2015-11-02 Andy Estes <aestes@apple.com>
1345 [Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
1346 https://bugs.webkit.org/show_bug.cgi?id=150819
1348 Reviewed by Dan Bernstein.
1350 This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
1352 * Configurations/Base.xcconfig:
1354 2015-10-30 Timothy Hatcher <timothy@apple.com>
1356 Web Inspector: Unexpected background color behind the Continue button in the DebuggerDashboardView
1357 https://bugs.webkit.org/show_bug.cgi?id=150734
1359 Reviewed by Brian Burg.
1361 * UserInterface/Views/DebuggerDashboardView.css:
1362 (.dashboard.debugger .navigation-bar .item.button):
1363 (.dashboard.debugger .navigation-bar .item.button > .glyph):
1365 2015-10-29 Joseph Pecoraro <pecoraro@apple.com>
1367 Web Inspector: Make use of other Timer details in Timeline (timeout, singleShot)
1368 https://bugs.webkit.org/show_bug.cgi?id=150697
1370 Reviewed by Timothy Hatcher.
1372 * Localizations/en.lproj/localizedStrings.js:
1373 * UserInterface/Controllers/TimelineManager.js:
1374 (WebInspector.TimelineManager.prototype._processRecord):
1375 Create a small object for timer details.
1377 * UserInterface/Models/ScriptTimelineRecord.js:
1378 (WebInspector.ScriptTimelineRecord.EventType.displayName):
1379 New details object requires new path to timer identifier.
1381 * UserInterface/Views/ScriptTimelineView.css:
1382 (.sidebar > .panel.navigation.timeline:not(.timeline-recording-content-view-showing) .navigation-sidebar-panel-content-tree-outline.script .item .alternate-subtitle):
1383 (.navigation-sidebar-panel-content-tree-outline .item .alternate-subtitle):
1384 (.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .alternate-subtitle):
1385 (.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .alternate-subtitle::before):
1386 Styles for an alternate-subtitle, a subtitle to show when the timeline
1387 content view is showing and not a resource content view.
1389 * UserInterface/Views/TimelineRecordTreeElement.js:
1390 (WebInspector.TimelineRecordTreeElement):
1391 Create alternate subtitle for Timers with the timeout millisecond details.
1392 Differentiate between setTimeout / setInterval.
1394 * UserInterface/Views/ScriptTimelineDataGridNode.js:
1395 (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Deleted.
1396 (WebInspector.ScriptTimelineDataGridNode): Deleted.
1397 Remove dead code. Normally there would be a filter / scope bar for an eventType
1398 column but no such column exists.
1400 2015-10-29 Joseph Pecoraro <pecoraro@apple.com>
1402 Web Inspector: Display console.timeStamp(title) title in timeline markers
1403 https://bugs.webkit.org/show_bug.cgi?id=150691
1405 Reviewed by Timothy Hatcher.
1407 * Localizations/en.lproj/localizedStrings.js:
1408 * UserInterface/Controllers/TimelineManager.js:
1409 (WebInspector.TimelineManager.prototype._processRecord):
1410 (WebInspector.TimelineManager.prototype._processEvent):
1411 Detect unused timeline records.
1413 * UserInterface/Models/TimelineMarker.js:
1414 (WebInspector.TimelineMarker):
1415 (WebInspector.TimelineMarker.prototype.get details):
1416 Give markers an optional details argument.
1418 * UserInterface/Views/TimelineRuler.js:
1419 (WebInspector.TimelineRuler.prototype.addMarker):
1420 When a marker is a TimeStamp, use the details title in
1421 the tooltip if one is available.
1423 * UserInterface/Views/TimelineSidebarPanel.js:
1424 (WebInspector.TimelineSidebarPanel.prototype._refreshFrameSelectionChart):
1425 Used \u in localized string. Kept this an endash since it is a range.
1427 2015-10-29 Timothy Hatcher <timothy@apple.com>
1429 Web Inspector: Navigation bar icons are missing
1430 https://bugs.webkit.org/show_bug.cgi?id=150677
1432 Reviewed by Joseph Pecoraro.
1434 The glyph width and height were not being set correctly and it broke NavigationBar buttons.
1435 The width and height attribute was being set on a div, when it should have used the style property.
1436 Also remove the suppressEmboss flag, which is no longer used but the clients and subclasses still did.
1438 * UserInterface/Base/ImageUtilities.js:
1439 (useSVGSymbol): Use style property instead of setting width and height. The attributes
1440 didn't accomplish the same thing in all cases. Use title and className property on the
1441 wrapper element and remove the comments, which applied when there wasn't a wrapper.
1443 * UserInterface/Views/ActivateButtonNavigationItem.js:
1444 (WebInspector.ActivateButtonNavigationItem): Remove suppressEmboss.
1445 * UserInterface/Views/ActivateButtonToolbarItem.js:
1446 (WebInspector.ActivateButtonToolbarItem): Remove suppressEmboss.
1448 * UserInterface/Views/ButtonNavigationItem.js:
1449 (WebInspector.ButtonNavigationItem): Remove suppressEmboss.
1450 (WebInspector.ButtonNavigationItem.prototype.set image): Use style property instead of setting
1451 width and height attributes. This assumed the SVG element was the glyph element, which changed
1452 at one point without me remembering to fix this client.
1454 * UserInterface/Views/ButtonToolbarItem.js:
1455 (WebInspector.ButtonToolbarItem): Remove suppressEmboss.
1456 * UserInterface/Views/DebuggerDashboardView.js:
1457 (WebInspector.DebuggerDashboardView): Remove suppressEmboss use.
1458 * UserInterface/Views/FilterBar.js:
1459 (WebInspector.FilterBar.prototype.addFilterBarButton): Remove suppressEmboss.
1460 * UserInterface/Views/FilterBarButton.js:
1461 (WebInspector.FilterBarButton): Remove suppressEmboss.
1462 * UserInterface/Views/TimelineSidebarPanel.js:
1463 (WebInspector.TimelineSidebarPanel): Remove suppressEmboss use.
1464 * UserInterface/Views/ToggleButtonNavigationItem.js:
1465 (WebInspector.ToggleButtonNavigationItem): Remove suppressEmboss.
1467 2015-10-29 Joseph Pecoraro <pecoraro@apple.com>
1469 Web Inspector: Clean up and audit TimelineRecordFactory records
1470 https://bugs.webkit.org/show_bug.cgi?id=150660
1472 Reviewed by Brian Burg.
1474 * Localizations/en.lproj/localizedStrings.js:
1475 * UserInterface/Controllers/TimelineManager.js:
1476 (WebInspector.TimelineManager.prototype._processRecord):
1477 (WebInspector.TimelineManager.prototype._processEvent):
1478 Add FIXME for payload data which we are not yet using but could.
1479 Fix typo in some rAF records where we were mistakenly using "timerId"
1480 instead of "id" for the request identifier.
1482 * UserInterface/Models/ScriptTimelineRecord.js:
1483 (WebInspector.ScriptTimelineRecord.EventType.displayName):
1484 Display the now correctly accessed rAF identifier in the Scripts timeline.
1486 2015-10-28 Joseph Pecoraro <pecoraro@apple.com>
1488 Web Inspector: Add "revert" to CSS value autocompletion
1489 https://bugs.webkit.org/show_bug.cgi?id=150652
1491 Reviewed by Timothy Hatcher.
1493 * UserInterface/Models/CSSCompletions.js:
1494 * UserInterface/Models/CSSKeywordCompletions.js:
1495 (WebInspector.CSSKeywordCompletions.forProperty):
1496 * UserInterface/Views/VisualStyleDetailsPanel.js:
1497 (WebInspector.VisualStyleDetailsPanel):
1498 (WebInspector.VisualStyleDetailsPanel.prototype._populateDisplaySection):
1499 (WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):
1500 Treat "revert" like initial and unset. It is valid on all properties.
1502 2015-10-28 Nikita Vasilyev <nvasilyev@apple.com>
1504 REGRESSION(r191071): Web Inspector: Can't resize split console when the window is too narrow
1505 https://bugs.webkit.org/show_bug.cgi?id=150492
1507 Reviewed by Timothy Hatcher.
1509 Make some items inside of the navigation bar click-through to incsease the draggable area.
1511 * UserInterface/Views/Main.css:
1512 (#split-content-browser > .navigation-bar > :matches(.hierarchical-path, .log-scope-bar)):
1514 2015-10-28 Joseph Pecoraro <pecoraro@apple.com>
1516 Web Inspector: Show Timeline Markers again (DOMContentLoaded, Load, console.timeStamp)
1517 https://bugs.webkit.org/show_bug.cgi?id=150612
1519 Reviewed by Timothy Hatcher.
1521 * Localizations/en.lproj/localizedStrings.js:
1522 Tooltip strings for the timeline markers.
1524 * UserInterface/Models/TimelineRecording.js:
1525 (WebInspector.TimelineRecording.prototype.addEventMarker):
1526 Dispatch an event so the views listening to this recording can add the markers.
1528 * UserInterface/Views/OverviewTimelineView.js:
1529 (WebInspector.OverviewTimelineView):
1530 (WebInspector.OverviewTimelineView.prototype._markerAdded):
1531 Add the marker to the OverviewTimelineView's ruler.
1533 * UserInterface/Views/TimelineOverview.js:
1534 (WebInspector.TimelineOverview):
1535 (WebInspector.TimelineOverview.prototype._markerAdded):
1536 (WebInspector.TimelineOverview.prototype.addMarker): Deleted.
1537 Add the marker to the TimelineOverview's ruler. Remove the unused method.
1539 * UserInterface/Views/TimelineRuler.js:
1540 (WebInspector.TimelineRuler.prototype.addMarker):
1541 Give some marker's a tooltip based on their type.
1543 * UserInterface/Views/TimelineOverview.css:
1544 (.timeline-overview > .timeline-ruler > .markers):
1545 (.timeline-overview.frames > .timeline-ruler > .markers > .marker:not(.current-time)):
1546 Correct the height of markers in the timeline overview.
1547 Hide markers non-current-time markers in the rendering frames view.
1549 * UserInterface/Views/TimelineRuler.css:
1550 (.timeline-ruler > .markers > .marker):
1551 (.timeline-ruler > .markers > .marker::before):
1552 Give markers a bit of width to make it easier to trigger their tooltip.
1554 (.timeline-ruler > .markers > .marker.load-event):
1555 (.timeline-ruler > .markers > .marker.dom-content-event):
1556 (.timeline-ruler > .markers > .marker.timestamp):
1557 Adjust coloring of the markers. hsla(0.5) was causing bleeding
1558 with width 1px to 2px. hsl() with opacity it was always 1px.
1560 2015-10-28 Timothy Hatcher <timothy@apple.com>
1562 Web Inspector: Zoom never goes back to 100% size
1563 https://bugs.webkit.org/show_bug.cgi?id=150637
1565 Add and subtract 20% from the zoom level so the zoom factor can return
1566 to the 1 starting zoom factor if you go back the other direction.
1568 Reviewed by Joseph Pecoraro.
1570 * UserInterface/Base/Main.js:
1571 (WebInspector._increaseZoom): Add 0.2 instead of multiplying 1.2.
1572 (WebInspector._decreaseZoom): Subtract 0.2 instead of multiplying 0.8.
1574 2015-10-28 Matt Baker <mattbaker@apple.com>
1576 Web Inspector: Rendering Frames pie chart does not update during initial selection of a timeline range
1577 https://bugs.webkit.org/show_bug.cgi?id=150630
1579 Reviewed by Geoffrey Garen.
1581 No longer suppress selection changed events while dragging to create a new selection.
1582 We dispatch selection changed events when adjusting an existing selection, so it makes
1583 sense to treat both cases identically.
1585 * UserInterface/Views/TimelineRuler.js:
1586 (WebInspector.TimelineRuler): Deleted.
1587 (WebInspector.TimelineRuler.prototype._dispatchTimeRangeSelectionChangedEvent): Deleted.
1588 (WebInspector.TimelineRuler.prototype._handleMouseMove): Deleted.
1590 2015-10-27 Timothy Hatcher <timothy@apple.com>
1592 Web Inspector: Remove image generators and use SVG directly
1593 https://bugs.webkit.org/show_bug.cgi?id=150602
1595 Reviewed by Brian Burg.
1597 This removes the code used to generate button image states as various canvas bitmaps.
1598 With the simplification of the UI in Yosemite, we can now just style SVG images to change
1599 the color used by the glyphs in these images. To do that we use the special "currentColor"
1600 color keyword. That keyword represents the current value of the applied CSS text color.
1601 This approach was used since it works across shadow DOM boundaries, which are there with
1602 our new use of the SVG <use> element to import glyphs. This allows us to eliminate the
1603 "stroked" and "filled" classes that were used to style some images that used the old
1604 wrappedSVGDocument image utility.
1606 Some of the SVG images had to be recreated -- specifically the removal of <clipPath> and
1607 <text> elements. Those elements do not work or work well with the <use> element. We can
1608 now only use graphical elements like <path>, <rect>, <circle>, etc.
1610 * UserInterface/Images/*.svg: Added id to the top level for most images. Use currentColor instead of black. Sorted attributes.
1611 * UserInterface/Images/gtk/*.svg: Added id to the top level for most images. Filed bug 150603 to track adopting currentColor.
1613 * UserInterface/Base/ImageUtilities.js:
1614 (useSVGSymbol): Added.
1616 (_devicePixelRatioChanged): Deleted.
1617 (_registerGeneratedImageUpdateFunction): Deleted.
1618 (_logSQLError): Deleted.
1619 (_logSQLTransactionError): Deleted.
1620 (_prefetchCachedImagesAndUpdate): Deleted.
1621 (_prefetchCachedImagesAndUpdate.): Deleted.
1623 (restoreImageFromStorage): Deleted.
1624 (imageLoaded): Deleted.
1625 (ensureImageIsLoaded): Deleted.
1626 (restoreImages.restoreActiveImages): Deleted.
1627 (restoreImages): Deleted.
1628 (restoreImage): Deleted.
1630 (generateImages.generateActiveImages): Deleted.
1631 (generateImages): Deleted.
1632 (generateImage): Deleted.
1633 (_drawImageShadow): Deleted.
1634 (_invertMaskImage): Deleted.
1635 (_applyImageMask): Deleted.
1636 (generateEmbossedImages): Deleted.
1637 (invokeCallbackWithDocument): Deleted.
1638 (imageLoad): Deleted.
1639 (imageError): Deleted.
1640 (wrappedSVGDocument): Deleted.
1641 * UserInterface/Views/ActivateButtonNavigationItem.js:
1642 (WebInspector.ActivateButtonNavigationItem.prototype.set activated):
1643 (WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText): Deleted.
1644 * UserInterface/Views/ButtonNavigationItem.css:
1645 (.navigation-bar .item.button):
1646 (.navigation-bar .item.button > .glyph):
1647 (.navigation-bar .item.button:not(.disabled):active > .glyph):
1648 (.navigation-bar .item.button:not(.disabled):matches(:focus, .activate.activated, .radio.selected) > .glyph):
1649 (.navigation-bar .item.button:not(.disabled):active:matches(:focus, .activate.activated, .radio.selected) > .glyph):
1650 (body.window-inactive .navigation-bar .item.button > .glyph):
1651 (.navigation-bar .item.button.disabled > .glyph):
1652 (body.window-inactive .navigation-bar .item.button.disabled > .glyph):
1653 (.navigation-bar .item.button.text-only): Deleted.
1654 (body.window-inactive .navigation-bar .item.button:not(.suppress-emboss) > .glyph): Deleted.
1655 (body.window-inactive .navigation-bar .item.button.disabled:not(.suppress-emboss) > .glyph): Deleted.
1656 (.navigation-bar .item.button.suppress-emboss): Deleted.
1657 (.navigation-bar .item.button.suppress-emboss > .glyph): Deleted.
1658 (.navigation-bar .item.button.suppress-emboss:active > .glyph): Deleted.
1659 (.navigation-bar .item.button.suppress-emboss.disabled > .glyph): Deleted.
1660 * UserInterface/Views/ButtonNavigationItem.js:
1661 (WebInspector.ButtonNavigationItem.prototype.set image):
1662 (WebInspector.ButtonNavigationItem): Deleted.
1663 (WebInspector.ButtonNavigationItem.prototype.get suppressBezel): Deleted.
1664 (WebInspector.ButtonNavigationItem.prototype.set suppressBezel): Deleted.
1665 (WebInspector.ButtonNavigationItem.prototype.generateStyleText): Deleted.
1666 (WebInspector.ButtonNavigationItem.prototype._canvasIdentifier): Deleted.
1667 (WebInspector.ButtonNavigationItem.prototype._updateImage): Deleted.
1668 (WebInspector.ButtonNavigationItem.prototype._generateImages): Deleted.
1669 * UserInterface/Views/ButtonToolbarItem.css:
1670 (.toolbar .item.button > .glyph):
1671 (.toolbar .item.button:not(.disabled):active > .glyph):
1672 * UserInterface/Views/ControlToolbarItem.css:
1673 (.toolbar .item.control):
1674 (.toolbar .item.control:hover):
1675 * UserInterface/Views/MultipleScopeBarItem.js:
1676 (WebInspector.MultipleScopeBarItem):
1677 * UserInterface/Views/NavigationBar.js:
1678 (WebInspector.NavigationBar.prototype.updateLayoutSoon.update):
1679 (WebInspector.NavigationBar.prototype.updateLayoutSoon):
1680 (WebInspector.NavigationBar): Deleted.
1681 (WebInspector.NavigationBar.prototype.insertNavigationItem): Deleted.
1682 (WebInspector.NavigationBar.prototype.removeNavigationItem): Deleted.
1683 (WebInspector.NavigationBar.prototype.updateLayout): Deleted.
1684 (WebInspector.NavigationBar.prototype._updateStyle): Deleted.
1685 * UserInterface/Views/NetworkSidebarPanel.js:
1686 (WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):
1687 * UserInterface/Views/RadioButtonNavigationItem.js:
1688 (WebInspector.RadioButtonNavigationItem.prototype.set active):
1689 (WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Deleted.
1690 * UserInterface/Views/ScopeBar.css:
1691 (.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows):
1692 (.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows svg .filled): Deleted.
1693 (.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows svg .stroked): Deleted.
1694 * UserInterface/Views/ScopeBarItem.js:
1695 (WebInspector.ScopeBarItem):
1696 * UserInterface/Views/ScopeRadioButtonNavigationItem.css:
1697 (.scope-radio-button-navigation-item:hover > .arrows):
1698 (.scope-radio-button-navigation-item.selected > .arrows > svg .stroked): Deleted.
1699 * UserInterface/Views/ScopeRadioButtonNavigationItem.js:
1700 (WebInspector.ScopeRadioButtonNavigationItem):
1701 * UserInterface/Views/TimelineSidebarPanel.css:
1702 (.sidebar > .panel.navigation.timeline > .title-bar.timeline-events > .title-bar-scope-bar > .default-item-selected > .multiple .arrows):
1703 (.sidebar > .panel.navigation.timeline > .title-bar.timeline-events > .title-bar-scope-bar > .default-item-selected > .multiple svg .filled): Deleted.
1704 (.sidebar > .panel.navigation.timeline > .title-bar.timeline-events > .title-bar-scope-bar > .default-item-selected > .multiple svg .stroked): Deleted.
1705 * UserInterface/Views/TimelineSidebarPanel.js:
1706 (WebInspector.TimelineSidebarPanel.prototype.treeElementAddedOrChanged):
1707 (WebInspector.TimelineSidebarPanel.prototype._timelineAdded):
1708 * UserInterface/Views/ToggleButtonNavigationItem.js:
1709 (WebInspector.ToggleButtonNavigationItem): Deleted.
1710 * UserInterface/Views/TreeElementStatusButton.css:
1711 (.item > .status > .status-button):
1712 (:matches(:focus, .force-focus) .item.selected > .status > .status-button):
1713 (.item > .status > .status-button > svg .filled): Deleted.
1714 (:matches(:focus, .force-focus) .item.selected > .status > .status-button > svg .filled): Deleted.
1715 (.item > .status > .status-button > svg .stroked): Deleted.
1716 (:matches(:focus, .force-focus) .item.selected > .status > .status-button > svg .stroked): Deleted.
1717 * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
1718 (WebInspector.VisualStyleCommaSeparatedKeywordEditor):
1719 * UserInterface/Views/VisualStyleDetailsPanel.css:
1720 (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .header > .visual-style-section-clear):
1721 * UserInterface/Views/VisualStyleKeywordIconList.css:
1722 (.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected):
1723 (.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon:not(.selected) > div):
1724 (.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected svg .stroked): Deleted.
1725 (.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected svg .filled): Deleted.
1726 * UserInterface/Views/VisualStyleKeywordIconList.js:
1727 (WebInspector.VisualStyleKeywordIconList.createListItem):
1728 (WebInspector.VisualStyleKeywordIconList):
1729 * UserInterface/Views/VisualStylePropertyEditorLink.css:
1730 (.visual-style-property-editor-link > .visual-style-property-editor-link-icon > :matches(.linked-icon, .unlinked-icon)):
1731 (.visual-style-property-editor-link:not(.linked) > .visual-style-property-editor-link-icon > :matches(.linked-icon, .unlinked-icon)):
1732 (.visual-style-property-editor-link > .visual-style-property-editor-link-icon): Deleted.
1733 (.visual-style-property-editor-link > .visual-style-property-editor-link-icon > .unlinked-icon svg .filled): Deleted.
1734 (.visual-style-property-editor-link > .visual-style-property-editor-link-icon > .unlinked-icon svg .stroked): Deleted.
1735 * UserInterface/Views/VisualStylePropertyEditorLink.js:
1736 (WebInspector.VisualStylePropertyEditorLink):
1737 * UserInterface/Views/VisualStyleSelectorSection.css:
1738 (.details-section.visual-style-selector-section > .header > .controls > .visual-style-selector-section-add-rule):
1739 * UserInterface/Views/VisualStyleSelectorSection.js:
1740 (WebInspector.VisualStyleSelectorSection):
1742 2015-10-28 Timothy Hatcher <timothy@apple.com>
1744 Web Inspector: jsmin.py mistakenly removes whitespace from template literal strings
1745 https://bugs.webkit.org/show_bug.cgi?id=148728
1747 Reviewed by Joseph Pecoraro.
1750 (JavascriptMinify.minify): Make backtick a quoting character.
1752 2015-10-28 Joseph Pecoraro <pecoraro@apple.com>
1754 Web Inspector: Timeline recording start button missing when WEB_REPLAY disabled (no ReplayAgent)
1755 https://bugs.webkit.org/show_bug.cgi?id=150633
1757 Reviewed by Timothy Hatcher.
1759 * UserInterface/Views/TimelineSidebarPanel.js:
1760 (WebInspector.TimelineSidebarPanel.prototype._updateReplayInterfaceVisibility):
1761 Ensure we pass a boolean to classList.toggle.
1763 2015-10-27 Joseph Pecoraro <pecoraro@apple.com>
1765 Web Inspector: Remove Timeline MarkDOMContent and MarkLoad, data is already available
1766 https://bugs.webkit.org/show_bug.cgi?id=150615
1768 Reviewed by Timothy Hatcher.
1770 * UserInterface/Controllers/TimelineManager.js:
1771 (WebInspector.TimelineManager.prototype._processEvent):
1772 Remove the now unneed mark event handling.
1774 (WebInspector.TimelineManager.prototype.pageDOMContentLoadedEventFired):
1775 (WebInspector.TimelineManager.prototype.pageLoadEventFired):
1776 Update the main frame and create markers for the current recording.
1778 * UserInterface/Protocol/PageObserver.js:
1779 (WebInspector.PageObserver.prototype.domContentEventFired):
1780 (WebInspector.PageObserver.prototype.loadEventFired):
1781 Forward to TimelineManager.
1783 2015-10-27 Joseph Pecoraro <pecoraro@apple.com>
1785 Web Inspector: Remove unused / duplicated XHR timeline instrumentation
1786 https://bugs.webkit.org/show_bug.cgi?id=150605
1788 Reviewed by Timothy Hatcher.
1790 * UserInterface/Controllers/TimelineManager.js:
1791 (WebInspector.TimelineManager.prototype._processRecord):
1792 Remove unused events and add an assert that we don't miss
1793 any script embedders.
1795 2015-10-27 Matt Baker <mattbaker@apple.com>
1797 REGRESSION: Web Inspector: DOM path bar blinks when modifying inline styles
1798 https://bugs.webkit.org/show_bug.cgi?id=149258
1800 Reviewed by Timothy Hatcher.
1802 Now that Object now longer spams constructor event listeners, ContentBrowser can safely
1803 update the NavigationBar synchronously. This fixes the issue, with zero impact on layout
1804 responsiveness when selecting Rendering Frames tree elements.
1806 * UserInterface/Views/ContentBrowser.js:
1807 (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
1808 Force NavigationBar to update synchronously.
1810 2015-10-27 Joseph Pecoraro <pecoraro@apple.com>
1812 Web Inspector: Timeline current time marker does not start moving when starting recording after just opening inspector
1813 https://bugs.webkit.org/show_bug.cgi?id=150178
1815 Reviewed by Brian Burg.
1817 * UserInterface/Controllers/TimelineManager.js:
1818 (WebInspector.TimelineManager.prototype.capturingStarted):
1819 * UserInterface/Models/TimelineRecording.js:
1820 (WebInspector.TimelineRecording.prototype.initializeTimeBoundsIfNecessary):
1821 For a recording to start updating current time the recording itself
1822 must have a start time. Provide a setter so that the start time can
1823 be set without waiting for a timeline record. For example the
1824 timestamp that the frontend receives when it starts a recording.
1826 * UserInterface/Views/TimelineRecordingContentView.js:
1827 (WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
1828 When we have a startTime number (new backends) always use it as the current time.
1829 Previously we were only doing this if current time was NaN, which would be when
1830 re-starting a recording after it had stopped, but not for the initial recording
1831 after opening the inspector.
1833 * UserInterface/Views/TimelineRuler.js:
1834 (WebInspector.TimelineRuler.prototype.updateLayout):
1835 Even if we do not need to create new time dividers we may need to perform
1836 other updates like update the current time marker. So do work before bailing.
1838 2015-10-26 Matt Baker <mattbaker@apple.com>
1840 Web Inspector: WebInspector.Object can dispatch constructor-level events multiple times
1841 https://bugs.webkit.org/show_bug.cgi?id=150579
1843 Reviewed by Timothy Hatcher.
1845 Use `hasOwnProperty` when checking for constructor event listeners when walking the
1846 prototype chain. This prevents listeners registered with a base class constructor
1847 from being dispatched multiple times by getting picked up higher in the prototype chain.
1849 * UserInterface/Base/Object.js:
1850 (WebInspector.Object.prototype.dispatchEventToListeners.dispatch):
1851 (WebInspector.Object.prototype.dispatchEventToListeners):
1852 (WebInspector.Object):
1854 2015-10-26 Matt Baker <mattbaker@apple.com>
1856 Web Inspector: Hundreds of failed assertions after switching to Rendering Frames after recording complete
1857 https://bugs.webkit.org/show_bug.cgi?id=150568
1859 Reviewed by Timothy Hatcher.
1861 When the TimelineRecordingContentView responds to the current content view changing,
1862 the TimelineOverview may be swapped out (if switching from a Timelines content view to a
1863 Rendering Frames content view). This patch installs a new overview (if it's changing) prior
1864 to setting the TimelineSidebarPanel's tree outline, as setting the tree outline forces
1867 Filtering tree elements requires that the timeline overview is up to date, which was the
1868 cause the assertion deluge.
1870 * UserInterface/Views/TimelineRecordingContentView.js:
1871 (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
1873 2015-10-26 Joseph Pecoraro <pecoraro@apple.com>
1875 Web Inspector: Spacebar to start recording should not cause system beep
1876 https://bugs.webkit.org/show_bug.cgi?id=150573
1878 Reviewed by Timothy Hatcher.
1880 * UserInterface/Views/TimelineSidebarPanel.js:
1881 (WebInspector.TimelineSidebarPanel.prototype._toggleRecordingOnSpacebar):
1882 (WebInspector.TimelineSidebarPanel.prototype._toggleNewRecordingOnSpacebar):
1883 The keyboard shortcuts do not implicitly prevent default because they may bail.
1884 So in cases where they do handle the key, prevent default to prevent system beeps.
1886 2015-10-26 Matt Baker <mattbaker@apple.com>
1888 Web Inspector: Cleanup sidebar panels, reduce `delete` and use Maps instead of objects
1889 https://bugs.webkit.org/show_bug.cgi?id=150548
1891 Reviewed by Timothy Hatcher.
1893 * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
1894 (WebInspector.LayerTreeDetailsSidebarPanel):
1895 (WebInspector.LayerTreeDetailsSidebarPanel.prototype._updateDataGrid):
1896 (WebInspector.LayerTreeDetailsSidebarPanel.prototype._dataGridNodeForLayer):
1898 * UserInterface/Views/NavigationSidebarPanel.js:
1899 (WebInspector.NavigationSidebarPanel):
1900 (WebInspector.NavigationSidebarPanel.restoreStateFromCookie.finalAttemptToRestoreViewStateFromCookie):
1901 (WebInspector.NavigationSidebarPanel.restoreStateFromCookie):
1902 (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
1903 (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
1904 (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
1905 Switched to using Symbol() to set external properties on tree elements.
1907 * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1908 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
1910 * UserInterface/Views/StorageSidebarPanel.js:
1911 (WebInspector.StorageSidebarPanel):
1912 (WebInspector.StorageSidebarPanel.prototype._addDatabase):
1913 (WebInspector.StorageSidebarPanel.prototype._addIndexedDatabase):
1914 (WebInspector.StorageSidebarPanel.prototype._addFrameManifest):
1915 (WebInspector.StorageSidebarPanel.prototype._storageCleared):
1917 2015-10-24 Nikita Vasilyev <nvasilyev@apple.com>
1919 Unreviewed, rolling out r191419.
1920 https://bugs.webkit.org/show_bug.cgi?id=150537
1924 "Web Inspector: Autocompletion previews in the CSS sidebar do not apply"
1925 https://bugs.webkit.org/show_bug.cgi?id=147720
1926 http://trac.webkit.org/changeset/191419
1928 2015-10-23 Joseph Pecoraro <pecoraro@apple.com>
1930 Web Inspector: Remove unused ScrollLayer Timeline EventType
1931 https://bugs.webkit.org/show_bug.cgi?id=150518
1933 Reviewed by Timothy Hatcher.
1935 * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
1936 * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
1937 * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
1938 * Versions/Inspector-iOS-7.0.json:
1939 * Versions/Inspector-iOS-8.0.json:
1940 * Versions/Inspector-iOS-9.0.json:
1942 2015-10-23 Joseph Pecoraro <pecoraro@apple.com>
1944 Web Inspector: xlink:href should be linkified
1945 https://bugs.webkit.org/show_bug.cgi?id=150505
1947 Reviewed by Timothy Hatcher.
1949 * UserInterface/Base/Main.js:
1950 When opening a URL with a fragment, prefer opening a resource
1951 that has the same URL without the fragment, otherwise this would
1954 * UserInterface/Base/URLUtilities.js:
1956 Better handling absoluteURL("#frag", baseURL).
1958 * UserInterface/Views/CodeMirrorAdditions.js:
1959 * UserInterface/Views/DOMTreeElement.js:
1960 (WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
1961 Allow for more "href" style attributes, such as XML namespaced
1962 "xlink:href" attribute names.
1964 2015-10-23 Nikita Vasilyev <nvasilyev@apple.com>
1966 Web Inspector: Command-Enter in Debugger should show a popover with evaluation result
1967 https://bugs.webkit.org/show_bug.cgi?id=149195
1969 Currenty, the only way to display the popover is to hover over the text with a mouse cursor.
1970 Provide a way to display it via a keyboard shortcut.
1972 Reviewed by Timothy Hatcher.
1974 * UserInterface/Controllers/CodeMirrorCompletionController.js:
1975 (WebInspector.CodeMirrorCompletionController): Deleted.
1976 (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions): Deleted.
1977 Don't evaluate selected text from Debugger or Sources in the console.
1979 * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
1980 (WebInspector.CodeMirrorTokenTrackingController):
1981 (WebInspector.CodeMirrorTokenTrackingController.prototype._handleCommandEnterKey):
1982 (WebInspector.CodeMirrorTokenTrackingController.prototype._hidePopover):
1983 Cmd-Enter triggers the popover, Esc hides it.
1985 (WebInspector.CodeMirrorTokenTrackingController.prototype.set mode):
1986 (WebInspector.CodeMirrorTokenTrackingController.prototype.removeHighlightedRange):
1989 (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedWithMarkedText):
1990 When a token isn't hovered, hide it only when it was triggered not by the keyboard.
1992 (WebInspector.CodeMirrorTokenTrackingController.prototype._markedTextIsNoLongerHovered):
1995 (WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
1996 (WebInspector.CodeMirrorTokenTrackingController.prototype._getTokenInfoForPosition):
1997 Abstract out a no side effects _getTokenInfoForPosition method, which is also used by _handleCommandEnterKey.
1999 (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOutOfEditor):
2000 (WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
2003 (WebInspector.CodeMirrorTokenTrackingController.prototype._processNewHoveredToken):
2004 (WebInspector.CodeMirrorTokenTrackingController.prototype._processNonSymbolToken):
2005 (WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
2006 Pass tokenInfo as an argument to explicitly state that these methods require it.
2008 (WebInspector.CodeMirrorTokenTrackingController.prototype._resetTrackingStates):
2011 * UserInterface/Views/SourceCodeTextEditor.js:
2012 (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeReleased):
2013 Allow to hide the popover regardless of mouse position. Used when the text cursor moves or
2014 when Esc key is pressed.
2016 2015-10-23 Devin Rousso <dcrousso+webkit@gmail.com>
2018 Web Inspector: Visual sidebar should support multiple backgrounds
2019 https://bugs.webkit.org/show_bug.cgi?id=148310
2021 Reviewed by Timothy Hatcher.
2023 Changes the layout of the Background - Style section in the Visual sidebar
2024 to be a list instead of a single editable field for a background-image URL.
2025 Allows for comma-separated background properties (both shorthand and
2026 longhand) and displays them all in a single list for editing.
2028 * Localizations/en.lproj/localizedStrings.js:
2029 * UserInterface/Views/VisualStyleColorPicker.js:
2030 (WebInspector.VisualStyleColorPicker):
2031 * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
2032 (.visual-style-property-container.comma-separated-keyword-editor):
2033 * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
2034 (WebInspector.VisualStyleCommaSeparatedKeywordEditor):
2035 (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties.propertyValue):
2036 (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties):
2037 (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.modifyPropertyText):
2038 Comma separated properties will now try to assemble a value from related longhand
2039 properties so that a single shorthand property with commas may be used.
2041 * UserInterface/Views/VisualStyleDetailsPanel.css:
2042 (.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.background-style .visual-style-property-container.comma-separated-keyword-editor.background):
2043 * UserInterface/Views/VisualStyleDetailsPanel.js:
2044 (WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):
2045 (WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection):
2046 (WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection):
2047 (WebInspector.VisualStyleDetailsPanel.prototype._noRemainingCommaSeparatedEditorItems):
2048 (WebInspector.VisualStyleDetailsPanel.prototype._selectedCommaSeparatedEditorItemValueChanged):
2049 (WebInspector.VisualStyleDetailsPanel.prototype._commaSeparatedEditorTreeItemSelected):
2050 (WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.noRemainingTreeItems): Deleted.
2051 (WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.selectedBoxShadowItemValueChanged): Deleted.
2052 (WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.boxShadowItemSelected): Deleted.
2053 (WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.noRemainingTreeItems): Deleted.
2054 (WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.selectedtransitionItemValueChanged): Deleted.
2055 (WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.transitionItemSelected): Deleted.
2056 Made the "background-image" property into a comma separated editor.
2058 * UserInterface/Views/VisualStyleFontFamilyListEditor.js:
2059 (WebInspector.VisualStyleFontFamilyListEditor):
2060 * UserInterface/Views/VisualStyleKeywordIconList.js:
2061 (WebInspector.VisualStyleKeywordIconList.prototype.set value):
2062 (WebInspector.VisualStyleKeywordIconList.prototype._handleKeywordChanged):
2063 (WebInspector.VisualStyleKeywordIconList):
2064 * UserInterface/Views/VisualStyleKeywordPicker.js:
2065 (WebInspector.VisualStyleKeywordPicker.prototype.updateEditorValues):
2066 (WebInspector.VisualStyleKeywordPicker.prototype._setValue):
2067 * UserInterface/Views/VisualStyleNumberInputBox.js:
2068 (WebInspector.VisualStyleNumberInputBox.prototype.set value):
2069 * UserInterface/Views/VisualStylePropertyCombiner.js:
2070 (WebInspector.VisualStylePropertyCombiner):
2071 (WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor):
2072 (WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText):
2073 * UserInterface/Views/VisualStylePropertyEditor.js:
2074 (WebInspector.VisualStylePropertyEditor):
2075 (WebInspector.VisualStylePropertyEditor.prototype.update):
2076 (WebInspector.VisualStylePropertyEditor.prototype.getValuesFromText):
2077 (WebInspector.VisualStylePropertyEditor.prototype.get propertyMissing):
2078 (WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
2079 Moved "propertyMissing" into a member variable for better access.
2081 * UserInterface/Views/VisualStyleURLInput.js:
2082 (WebInspector.VisualStyleURLInput):
2083 (WebInspector.VisualStyleURLInput.prototype.get synthesizedValue):
2084 (WebInspector.VisualStyleURLInput.prototype.parseValue):
2085 Added support for specific keywords to be used in the input field.
2087 2015-10-22 Timothy Hatcher <timothy@apple.com>
2089 Web Inspector: Remove generateColoredImagesForCSS and its clients
2090 https://bugs.webkit.org/show_bug.cgi?id=150474
2092 Reviewed by Joseph Pecoraro.
2094 * UserInterface/Base/ImageUtilities.js:
2095 (generateColoredImage): Deleted.
2096 (imageLoaded): Deleted.
2097 (ensureImageIsLoaded): Deleted.
2098 (restoreImages.restoreActiveImages): Deleted.
2099 (restoreImages): Deleted.
2100 (restoreImage): Deleted.
2102 (generateImage): Deleted.
2103 (generateColoredImagesForCSS): Deleted.
2105 * UserInterface/Base/Main.js:
2106 (WebInspector.loaded): Deleted call to _generateDisclosureTriangleImages.
2107 (WebInspector._generateDisclosureTriangleImages): Deleted.
2108 (WebInspector.createGoToArrowButton): Deleted code to generate the states.
2110 * UserInterface/Images/BackArrow.svg: Removed.
2111 * UserInterface/Images/BackForwardArrows.svg: Added.
2112 * UserInterface/Images/DisclosureTriangleSmallClosed.svg: Removed.
2113 * UserInterface/Images/DisclosureTriangleSmallOpen.svg: Removed.
2114 * UserInterface/Images/DisclosureTriangleTinyClosed.svg: Removed.
2115 * UserInterface/Images/DisclosureTriangleTinyOpen.svg: Removed.
2116 * UserInterface/Images/DisclosureTriangles.svg: Added.
2117 * UserInterface/Images/ForwardArrow.svg: Removed.
2118 * UserInterface/Images/GoToArrow.svg:
2119 * UserInterface/Images/Locked.svg: Moved fill color here.
2120 * UserInterface/Images/SortIndicatorArrows.svg: Added.
2121 * UserInterface/Images/SortIndicatorDownArrow.svg: Removed.
2122 * UserInterface/Images/SortIndicatorUpArrow.svg: Removed.
2123 * UserInterface/Images/gtk/BackArrow.svg: Removed.
2124 * UserInterface/Images/gtk/BackForwardArrows.svg: Added.
2125 * UserInterface/Images/gtk/DisclosureTriangleSmallClosed.svg: Removed.
2126 * UserInterface/Images/gtk/DisclosureTriangleSmallOpen.svg: Removed.
2127 * UserInterface/Images/gtk/DisclosureTriangleTinyClosed.svg: Removed.
2128 * UserInterface/Images/gtk/DisclosureTriangleTinyOpen.svg: Removed.
2129 * UserInterface/Images/gtk/DisclosureTriangles.svg: Added.
2130 * UserInterface/Images/gtk/ForwardArrow.svg: Removed.
2131 * UserInterface/Images/gtk/GoToArrow.svg:
2132 * UserInterface/Images/gtk/Locked.svg: Moved fill color here.
2133 * UserInterface/Images/gtk/SortIndicatorArrows.svg: Added.
2134 * UserInterface/Images/gtk/SortIndicatorDownArrow.svg: Removed.
2135 * UserInterface/Images/gtk/SortIndicatorUpArrow.svg: Removed.
2137 * UserInterface/Views/CSSStyleDeclarationSection.css:
2138 (.style-declaration-section.locked > .header::before):
2140 * UserInterface/Views/CSSStyleDeclarationSection.js:
2141 (WebInspector.CSSStyleDeclarationSection): Deleted.
2143 * UserInterface/Views/ConsoleMessageView.css:
2144 (.console-message.expandable .console-top-level-message::before):
2145 (.console-message.expandable.expanded .console-top-level-message::before):
2147 * UserInterface/Views/ContentBrowser.js:
2148 (WebInspector.ContentBrowser): Use BackForwardArrows.svg.
2150 * UserInterface/Views/DOMTreeOutline.css:
2151 (.dom-tree-outline li.parent::before):
2152 (.dom-tree-outline:focus li.parent.selected::before):
2153 (.dom-tree-outline li.parent.expanded::before):
2154 (.dom-tree-outline:focus li.parent.expanded.selected::before):
2156 * UserInterface/Views/DataGrid.css:
2157 (.data-grid th.sort-ascending > div:first-child::after):
2158 (.data-grid th.sort-descending > div:first-child::after):
2159 (.data-grid tr.parent td.disclosure::before):
2160 (.data-grid tr.parent.expanded td.disclosure::before):
2161 (.data-grid:matches(:focus, .force-focus) tr.parent.selected td.disclosure::before):
2162 (.data-grid:matches(:focus, .force-focus) tr.parent.expanded.selected td.disclosure::before):
2164 * UserInterface/Views/DataGrid.js:
2165 (WebInspector.DataGrid): Deleted call to _generateSortIndicatorImagesIfNeeded.
2166 (WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded): Deleted.
2168 * UserInterface/Views/DetailsSection.css:
2169 (.details-section > .header::before):
2170 (.details-section > .header:not(.mouse-over-options-element):active::before):
2171 (.details-section.collapsed > .header::before):
2172 (.details-section.collapsed > .header:not(.mouse-over-options-element):active::before):
2174 * UserInterface/Views/DetailsSection.js:
2175 (WebInspector.DetailsSection): Deleted call to _generateDisclosureTrianglesIfNeeded.
2176 (WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded): Deleted.
2178 * UserInterface/Views/ErrorObjectView.css:
2179 (.error-object > .formatted-error::before):
2180 (.error-object.expanded > .formatted-error::before):
2182 * UserInterface/Views/FindBanner.css:
2183 (.find-banner > button.segmented.left > .glyph):
2184 (.find-banner > button.segmented.left:active:not(:disabled) > .glyph):
2185 (.find-banner > button.segmented.right > .glyph):
2186 (.find-banner > button.segmented.right:active:not(:disabled) > .glyph):
2188 * UserInterface/Views/FindBanner.js:
2189 (WebInspector.FindBanner): Deleted call to _generateButtonsGlyphsIfNeeded.
2190 (WebInspector.FindBanner.prototype._generateButtonsGlyphsIfNeeded): Deleted.
2192 * UserInterface/Views/LogContentView.css:
2193 (.console-group-title::before):
2194 (.console-group.collapsed .console-group-title::before):
2196 * UserInterface/Views/Main.css:
2198 (.go-to-arrow:active):
2199 (:matches(:focus, .force-focus) .selected .go-to-arrow):
2200 (:matches(:focus, .force-focus) .selected .go-to-arrow:active):
2202 * UserInterface/Views/NavigationSidebarPanel.css:
2203 (.navigation-sidebar-panel-content-tree-outline .item .disclosure-button):
2204 (.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .disclosure-button):
2205 (.navigation-sidebar-panel-content-tree-outline .item.expanded .disclosure-button):
2206 (.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected.expanded .disclosure-button):
2208 * UserInterface/Views/NavigationSidebarPanel.js:
2209 (WebInspector.NavigationSidebarPanel): Deleted call to _generateDisclosureTrianglesIfNeeded.
2210 (WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded): Deleted.
2212 * UserInterface/Views/ObjectTreePropertyTreeElement.css:
2213 (.object-tree-property.parent > .disclosure-button):
2214 (.object-tree-property.parent.expanded > .disclosure-button):
2215 (.object-tree-property .read-only): Deleted.
2217 * UserInterface/Views/ObjectTreeView.css:
2218 (.object-tree > :matches(.title, .object-preview)::before):
2219 (.object-tree.expanded > :matches(.title, .object-preview)::before):
2221 * UserInterface/Views/TypeTreeElement.css:
2222 (.type-tree-element.parent > .disclosure-button):
2223 (.type-tree-element.parent.expanded > .disclosure-button):
2225 2015-10-22 Matt Baker <mattbaker@apple.com>
2227 Web Inspector: CSS Data URIs count against page weight twice
2228 https://bugs.webkit.org/show_bug.cgi?id=150101
2230 Reviewed by Timothy Hatcher.
2232 * UserInterface/Models/DefaultDashboard.js:
2233 (WebInspector.DefaultDashboard.prototype._resourceSizeDidChange):
2234 Exclude resources with a data URI from the total page weight.
2236 * UserInterface/Models/Resource.js:
2237 (WebInspector.Resource):
2238 (WebInspector.Resource.prototype.updateForRedirectResponse):
2239 (WebInspector.Resource.prototype.updateForResponse):
2240 (WebInspector.Resource.prototype.markAsFinished):
2241 Removed uses of `delete`.
2243 2015-10-22 Joseph Pecoraro <pecoraro@apple.com>
2245 Web Inspector: Remove unused Timeline GCEvent Record type
2246 https://bugs.webkit.org/show_bug.cgi?id=150477
2248 Reviewed by Timothy Hatcher.
2250 iOS backends never emitted a GCEvent timeline event.
2252 * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
2253 * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
2254 * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
2255 * Versions/Inspector-iOS-7.0.json:
2256 * Versions/Inspector-iOS-8.0.json:
2257 * Versions/Inspector-iOS-9.0.json:
2259 2015-10-22 Joseph Pecoraro <pecoraro@apple.com>
2261 Web Inspector: srcset attributes should have hyperlinks to the resources
2262 https://bugs.webkit.org/show_bug.cgi?id=150409
2264 Reviewed by Timothy Hatcher.
2266 Follow-up tweaks and fixes that were intended to be landed.
2268 * UserInterface/Views/CodeMirrorAdditions.js:
2269 (tokenizeSrcSetString):
2270 Multiline parsing has issues recovering the state CodeMirror
2271 expects, so we just bail in those cases. Leading whitespace
2272 is also handled poorly, but expected to be rare.
2274 * UserInterface/Views/DOMTreeElement.js:
2275 (WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
2276 Trim to eliminate leading whitespace.
2278 2015-10-22 Joseph Pecoraro <pecoraro@apple.com>
2280 Web Inspector: Restore :not(:placeholder-shown) behavior on search bars with comments
2281 https://bugs.webkit.org/show_bug.cgi?id=150452
2283 Reviewed by Timothy Hatcher.
2285 * UserInterface/Views/FindBanner.css:
2286 (.find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown)):
2287 * UserInterface/Views/SearchBar.css:
2288 (.search-bar > input[type="search"]:not(:placeholder-shown)):
2289 Add back the placeholder-shown related styles and add a comment about what they are for.
2291 2015-10-22 Devin Rousso <dcrousso+webkit@gmail.com>
2293 Web Inspector: Tabbing over CSS properties prepended by * doesn't move the highlighted range
2294 https://bugs.webkit.org/show_bug.cgi?id=150294
2296 Reviewed by Timothy Hatcher.
2298 Moving the selected text when tabbing and shift-tabbing now relies upon
2299 the last index of ";" if it exists instead of whether the line ends with it.
2301 * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2302 (WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey):
2303 (WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey):
2305 2015-10-21 Joseph Pecoraro <pecoraro@apple.com>
2307 Web Inspector: srcset attributes should have hyperlinks to the resources
2308 https://bugs.webkit.org/show_bug.cgi?id=150409
2310 Reviewed by Timothy Hatcher.
2312 The "srcset" attribute parsing is a simplification of:
2313 https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-srcset
2315 The "srcset" attribute value is expected to be in comma
2316 separated groups. Within each group we always expect a link,
2317 and an optional descriptor. We want to linkify the link.
2319 * UserInterface/Views/CodeMirrorAdditions.js:
2320 (tokenizeSrcSetString):
2322 When parsing srcset attribute, parse links as link tokens
2323 so that they are linkified in resource content views.
2325 * UserInterface/Views/DOMTreeElement.js:
2326 (WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
2327 When creating the DOMTree DOM for srcset attributes,
2328 create link elements for the link values of attribute value.
2330 2015-10-21 Devin Rousso <dcrousso+webkit@gmail.com>
2332 Web Inspector: Autocompletion previews in the CSS sidebar do not apply
2333 https://bugs.webkit.org/show_bug.cgi?id=147720
2335 Reviewed by Timothy Hatcher.
2337 When autocompletion hints are added to styles or the console, the history
2338 object used by CodeMirror was edited to remove the last entry. Instead of
2339 using this method (which caused glitchy behaviour when undo-ing), call
2340 CodeMirror.undo() and adjust accordingly. In addition, a marker was being
2341 used as the completion hint instead of applying text, whereas these
2342 changes use actual text, ensuring that completions are previewed in the page.
2344 * UserInterface/Controllers/CodeMirrorCompletionController.js:
2345 (WebInspector.CodeMirrorCompletionController):
2346 (WebInspector.CodeMirrorCompletionController.prototype.close):
2347 (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
2348 (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update):
2349 (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
2350 (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
2351 (WebInspector.CodeMirrorCompletionController.prototype._handleBeforeChange):
2352 (WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker): Deleted.
2353 (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker): Deleted.
2355 2015-10-21 Devin Rousso <dcrousso+webkit@gmail.com>
2357 Web Inspector: Add forgotten WebInspector.UIString from r190521
2358 https://bugs.webkit.org/show_bug.cgi?id=150425
2360 Reviewed by Timothy Hatcher.
2362 * Localizations/en.lproj/localizedStrings.js:
2363 * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2364 (UserInterface/Views/CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded)
2366 2015-10-21 Devin Rousso <dcrousso+webkit@gmail.com>
2368 Web Inspector: Adjust usages of classList.toggle to ensure a true/false value instead of undefined
2369 https://bugs.webkit.org/show_bug.cgi?id=150424
2371 Reviewed by Timothy Hatcher.
2373 Adds "!!" in front of force parameters in classList.toggle calls that
2374 could possibly be undefined (thereby breaking the UI).
2376 * UserInterface/Views/ScopeBarItem.js:
2377 (WebInspector.ScopeBarItem):
2378 * UserInterface/Views/VisualStyleDetailsPanel.js:
2379 (WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
2380 * UserInterface/Views/VisualStylePropertyEditor.js:
2381 (WebInspector.VisualStylePropertyEditor):
2383 2015-10-21 Devin Rousso <dcrousso+webkit@gmail.com>
2385 Web Inspector: Option-Up doesn't increment certain attribute values
2386 https://bugs.webkit.org/show_bug.cgi?id=149257
2388 Reviewed by Brian Burg.
2390 If the user tries to modify a numerical attribute in HTML and the cursor
2391 was at the beginning of the attribute value, the range of the selection
2392 was within a sibling element instead of the text node containin the value.
2393 This patch fixes this issue and ensures that the correct text is selected.
2395 * UserInterface/Views/EditingSupport.js:
2396 (WebInspector.startEditing.handleEditingResult):
2397 Replaced var with let.
2399 2015-10-21 Joseph Pecoraro <pecoraro@apple.com>
2401 Web Inspector: Use some CSS Variables in Web Inspector
2402 https://bugs.webkit.org/show_bug.cgi?id=150405
2404 Reviewed by Timothy Hatcher.
2406 * UserInterface/Main.html:
2407 Include the new variables stylesheet.
2409 * UserInterface/Views/Variables.css: Added.
2411 Introduce new global variables.
2413 * UserInterface/Views/CSSStyleDeclarationTextEditor.css:
2414 (.css-style-text-editor > .CodeMirror .cm-link):
2415 * UserInterface/Views/ConsoleMessageView.css:
2416 (.console-message-preview-divider):
2417 (.console-message-enclosed):
2418 (.console-message .console-message-extra-parameters-container > li::before):
2419 (.console-saved-variable):
2420 * UserInterface/Views/DOMTreeOutline.css:
2421 (.dom-tree-outline li.selected > span::after):
2422 * UserInterface/Views/FormattedValue.css:
2423 (:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap, .formatted-weakset) > .size):
2424 (.formatted-number):
2425 (.formatted-boolean):
2426 (.formatted-string):
2427 (.formatted-regexp):
2428 (.formatted-symbol):
2429 * UserInterface/Views/ObjectPreviewView.css:
2430 (.object-preview > .size):
2431 * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
2432 (.object-tree-array-index .index-name):
2433 * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
2434 (.syntax-highlighted :matches(.css-keyword, .css-tag, .css-at-rule, .css-important, .javascript-keyword, .html-tag)):
2435 (.syntax-highlighted :matches(.css-number, .javascript-number)):
2436 (.syntax-highlighted :matches(.css-string, .javascript-string, .html-attribute-value)):
2437 (.syntax-highlighted .javascript-regexp):
2438 * UserInterface/Views/TypeTokenView.css:
2439 (.type-token-symbol):
2440 Make use of variables.
2442 2015-10-21 Nikita Vasilyev <nvasilyev@apple.com>
2444 Web Inspector: Typo in a property name: style.inerhited
2445 https://bugs.webkit.org/show_bug.cgi?id=150391
2447 Reviewed by Csaba Osztrogonác.
2449 * UserInterface/Views/RulesStyleDetailsPanel.js:
2450 (WebInspector.RulesStyleDetailsPanel.prototype.refresh):
2452 2015-10-20 Nikita Vasilyev <nvasilyev@apple.com>
2454 Web Inspector: Pressing Command-S while focused on the styles sidebar should save CSS file
2455 https://bugs.webkit.org/show_bug.cgi?id=150298
2457 Reviewed by Timothy Hatcher.
2459 * UserInterface/Views/CSSStyleDeclarationSection.js:
2460 (WebInspector.CSSStyleDeclarationSection):
2461 Beep when saving didn't work. Inline CSS and CSS in style attributes aren't curently supported.
2463 2015-10-20 Joseph Pecoraro <pecoraro@apple.com>
2465 Web Inspector: JavaScriptCore should parse sourceURL and sourceMappingURL directives
2466 https://bugs.webkit.org/show_bug.cgi?id=150096
2468 Reviewed by Geoffrey Garen.
2470 * UserInterface/Test/InspectorProtocol.js:
2471 (InspectorProtocol._sendMessage):
2472 (InspectorProtocol.dispatchMessageFromBackend):
2473 This is only used for tests, so avoid console.log
2474 and just dump directly to the system console.
2476 2015-10-19 Xabier Rodriguez Calvar <calvaris@igalia.com>
2478 [Streams API] Add skeleton for initial WritableStream support
2479 https://bugs.webkit.org/show_bug.cgi?id=149951
2481 Reviewed by Darin Adler.
2483 * UserInterface/Models/NativeFunctionParameters.js: Added support for WritableStream.
2485 2015-10-19 James Craig <jcraig@apple.com>
2487 Web Inspector: AX: console list 'input'/'output' markers are not perceivable
2488 https://bugs.webkit.org/show_bug.cgi?id=133045
2490 Enabling WebKit Web Inspector console pseudo-element labels using the new CSS4 'alt' property.
2492 Reviewed by Brian Burg.
2494 * UserInterface/Views/LogContentView.css:
2495 (.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted.selected):
2496 (.console-messages:focus .console-item.selected .console-user-command-result.console-log-level::before):
2497 (@media reader): Deleted.
2499 2015-10-18 Joseph Pecoraro <pecoraro@apple.com>
2501 Web Inspector: Console Search should update when console is cleared
2502 https://bugs.webkit.org/show_bug.cgi?id=150141
2504 Reviewed by Brian Burg.
2506 * UserInterface/Views/LogContentView.js:
2507 (WebInspector.LogContentView.prototype._logCleared):
2508 Reperform the search if there is a search query.
2510 (WebInspector.LogContentView.prototype._filterMessageElements):
2511 Reperform the current search.
2513 2015-10-16 Joseph Pecoraro <pecoraro@apple.com>
2515 Web Inspector: Add "unset" to CSS value autocompletion
2516 https://bugs.webkit.org/show_bug.cgi?id=127616
2518 Reviewed by Brian Burg.
2520 * UserInterface/Models/CSSCompletions.js:
2521 * UserInterface/Models/CSSKeywordCompletions.js:
2522 (WebInspector.CSSKeywordCompletions.forProperty):
2523 Treat "unset" similiar to "initial". Also, no need for "initial"
2524 in an individual property's list. We always include it.
2526 * UserInterface/Views/VisualStyleDetailsPanel.js:
2527 (WebInspector.VisualStyleDetailsPanel):
2528 (WebInspector.VisualStyleDetailsPanel.prototype._populateDisplaySection):
2529 (WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):
2530 Add "Unset" alongside "Initial".
2532 2015-10-14 Joseph Pecoraro <pecoraro@apple.com>
2534 Web Inspector: Include Garbage Collection Event in Timeline
2535 https://bugs.webkit.org/show_bug.cgi?id=142510
2537 Reviewed by Geoffrey Garen and Brian Burg.
2539 * UserInterface/Base/Utilities.js:
2540 (Array.prototype.partition):
2541 Helper to partition an Array into two arrays.
2543 * Localizations/en.lproj/localizedStrings.js:
2544 * UserInterface/Base/Main.js:
2545 (WebInspector.loaded):
2546 * UserInterface/Test.html:
2547 * UserInterface/Test/Test.js:
2548 (WebInspector.loaded):
2549 * UserInterface/Protocol/HeapObserver.js: Added.
2550 (WebInspector.HeapObserver.prototype.garbageCollected):
2551 (WebInspector.HeapObserver):
2552 Create the new observer and manager.
2554 * UserInterface/Models/GarbageCollection.js: Added.
2555 (WebInspector.GarbageCollection):
2556 (WebInspector.GarbageCollection.fromPayload):
2557 (WebInspector.GarbageCollection.prototype.get type):
2558 (WebInspector.GarbageCollection.prototype.get startTime):
2559 (WebInspector.GarbageCollection.prototype.get endTime):
2560 (WebInspector.GarbageCollection.prototype.get duration):
2561 Model object for Heap.GarbageCollection.
2563 * UserInterface/Controllers/HeapManager.js: Added.
2564 (WebInspector.HeapManager):
2565 (WebInspector.HeapManager.prototype.garbageCollected):
2566 Dispatch events with the GC object.
2568 * UserInterface/Controllers/TimelineManager.js:
2569 (WebInspector.TimelineManager):
2570 (WebInspector.TimelineManager.prototype._garbageCollected):
2571 Include new GC Timeline Events as Script events.
2573 * UserInterface/Views/ScriptTimelineOverviewGraph.js:
2574 (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
2575 For the Script overview, make two sets of bars, one for Scripts and one for GCs.
2576 The GCs bar will be overlaid on top of the the Scripts bar. This is particularly
2577 useful since a GC can happen during script execution.
2579 * UserInterface/Images/TimelineRecordGarbageCollection.svg: Added.
2580 * UserInterface/Main.html:
2581 * UserInterface/Models/ScriptTimelineRecord.js:
2582 (WebInspector.ScriptTimelineRecord.prototype.isGarbageCollection):
2583 (WebInspector.ScriptTimelineRecord.EventType.displayName):
2584 * UserInterface/Views/ScriptTimelineDataGridNode.js:
2585 (WebInspector.ScriptTimelineDataGridNode.prototype.get data):
2586 (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
2587 (WebInspector.ScriptTimelineDataGridNode):
2588 * UserInterface/Views/ScriptTimelineView.js:
2589 (WebInspector.ScriptTimelineView.prototype._processPendingRecords):
2590 * UserInterface/Views/SourceCodeTimelineTreeElement.js:
2591 (WebInspector.SourceCodeTimelineTreeElement):
2592 * UserInterface/Views/TimelineIcons.css:
2593 (.garbage-collection-profile-record .icon):
2594 * UserInterface/Views/TimelineRecordBar.css:
2595 (.timeline-record-bar.timeline-record-type-script.script-timeline-record-garbage-collected > .segment):
2598 * UserInterface/Views/TimelineRecordBar.js:
2599 (WebInspector.TimelineRecordBar.createCombinedBars):
2600 Simplify by storing start time into a variable.
2602 * UserInterface/Views/TimelineRecordTreeElement.js:
2603 (WebInspector.TimelineRecordTreeElement):
2606 2015-10-15 Commit Queue <commit-queue@webkit.org>
2608 Unreviewed, rolling out r191135.
2609 https://bugs.webkit.org/show_bug.cgi?id=150197
2611 This patch causes 50+ LayoutTest crashes related to the
2612 inspector (Requested by ryanhaddad on #webkit).
2616 "Web Inspector: JavaScriptCore should parse sourceURL and
2617 sourceMappingURL directives"
2618 https://bugs.webkit.org/show_bug.cgi?id=150096
2619 http://trac.webkit.org/changeset/191135
2621 2015-10-15 Joseph Pecoraro <pecoraro@apple.com>
2623 Web Inspector: JavaScriptCore should parse sourceURL and sourceMappingURL directives
2624 https://bugs.webkit.org/show_bug.cgi?id=150096
2626 Reviewed by Geoffrey Garen.
2628 * UserInterface/Test/InspectorProtocol.js:
2629 (InspectorProtocol._sendMessage):
2630 (InspectorProtocol.dispatchMessageFromBackend):
2631 This is only used for tests, so avoid console.log
2632 and just dump directly to the system console.
2634 2015-10-13 João Oliveira <hello@jxs.pt>
2636 Web Inspector: Console SearchBar should work more like ContentBrowser FindBanner
2637 https://bugs.webkit.org/show_bug.cgi?id=149505
2639 Reviewed by Joseph Pecoraro.
2641 Console tab now uses findBanner, adapted LogContentView to use findBanner,
2642 and findBanner to be more agnostic to both usecases, either as fixed, on console tab,
2643 and hideable on other inspector tabs.
2645 * UserInterface/Views/FindBanner.css:
2646 (.find-banner.console-find-banner):
2647 (.find-banner.console-findbanner input[type="search"]):
2648 * UserInterface/Views/FindBanner.js:
2649 (WebInspector.FindBanner):
2650 (WebInspector.FindBanner.set targetElement.delayedWork):
2651 (WebInspector.FindBanner.prototype.set targetElement):
2652 (WebInspector.FindBanner.prototype.get showing):
2653 (WebInspector.FindBanner.prototype.focus):
2654 (WebInspector.FindBanner.prototype._clearAndBlur):
2655 (WebInspector.FindBanner.prototype.show.delayedWork):
2656 (WebInspector.FindBanner.prototype.show):
2657 (WebInspector.FindBanner.prototype.hide):
2658 (WebInspector.FindBanner.prototype.get element): Deleted.
2659 (WebInspector.FindBanner.prototype._inputFieldSearch): Deleted.
2660 * UserInterface/Views/LogContentView.js:
2661 (WebInspector.LogContentView):
2662 (WebInspector.LogContentView.prototype.get navigationItems):
2663 (WebInspector.LogContentView.prototype.handleFindEvent):
2664 (WebInspector.LogContentView.prototype.findBannerRevealPreviousResult):
2665 (WebInspector.LogContentView.prototype.findBannerRevealNextResult):
2666 (WebInspector.LogContentView.prototype._filterMessageElements):
2667 (WebInspector.LogContentView.prototype.findBannerPerformSearch):
2668 (WebInspector.LogContentView.prototype.findBannerSearchCleared):
2669 (WebInspector.LogContentView.prototype.revealNextSearchResult):
2670 (WebInspector.LogContentView.prototype.revealPreviousSearchResult):
2671 (WebInspector.LogContentView.prototype._performSearch):
2672 (WebInspector.LogContentView.prototype.searchBarDidActivate): Deleted.
2673 (WebInspector.LogContentView.prototype._searchTextDidChange): Deleted.
2675 2015-10-13 Nikita Vasilyev <nvasilyev@apple.com>
2677 REGRESSION(r189567): Web Inspector: Clipped filter icons when debugger sidebar is narrow
2678 https://bugs.webkit.org/show_bug.cgi?id=150023
2680 r189567 changed flexbox items' default min-width from 0 to auto.
2681 Explicitly set it to 0 in CSS.
2683 Reviewed by Brian Burg.
2685 * UserInterface/Views/FilterBar.css:
2686 (.filter-bar > input[type="search"]):
2688 2015-10-13 Yusuke Suzuki <utatane.tea@gmail.com>
2690 Web Inspector: Don't shadow global Object constructor in WebInspector.Object class definition
2691 https://bugs.webkit.org/show_bug.cgi?id=150093
2693 Reviewed by Joseph Pecoraro.
2695 Currently, class expression does not define any variables. So even in `class Object { }`,
2696 we were able to touch the global Object constructor (like `Object.keys`).
2697 However, that is a bug. After https://bugs.webkit.org/show_bug.cgi?id=150089 fixes that bug,
2698 the global `Object` is shadowed by the user-defined `class Object` name.
2700 To solve this issue, we changed the `class Object` to `class WebInspectorObject`.
2701 And we expose this class as a `WebInspector.Object`.
2703 * UserInterface/Base/Object.js:
2705 2015-10-10 Nikita Vasilyev <nvasilyev@apple.com>
2707 Web Inspector: Improve error messages for internal Inspector code
2708 https://bugs.webkit.org/show_bug.cgi?id=149995
2710 Don't log "error.stack" since the error view already includes a nicely formatted stacktrace.
2712 Reviewed by Timothy Hatcher.
2714 * UserInterface/Protocol/InspectorBackend.js:
2715 (InspectorBackendClass.prototype._dispatchResponseToCallback):
2716 (InspectorBackendClass.prototype._dispatchEvent):
2718 2015-10-08 Nikita Vasilyev <nvasilyev@apple.com>
2720 Web Inspector: Stack trace view doesn't properly display lines without function names
2721 https://bugs.webkit.org/show_bug.cgi?id=149922
2723 Reviewed by Timothy Hatcher.
2725 * UserInterface/Models/StackTrace.js:
2726 (WebInspector.StackTrace._parseStackTrace):
2727 (WebInspector.StackTrace._parseLocation): Added.
2729 2015-10-08 Nikita Vasilyev <nvasilyev@apple.com>
2731 Web Inspector: An error view doesn't get expanded by clicking on the expand arrow
2732 https://bugs.webkit.org/show_bug.cgi?id=149917
2734 Reviewed by Timothy Hatcher.
2736 * UserInterface/Views/ErrorObjectView.css:
2737 (.error-object > .formatted-error::before):
2738 (.error-object.expanded > .formatted-error::before):
2739 (.error-object::before): Deleted.
2740 (.error-object.expanded::before): Deleted.
2742 2015-10-06 Nikita Vasilyev <nvasilyev@apple.com>
2744 Web Inspector: Clicking on a stack trace link does not navigate to the corresponding line
2745 https://bugs.webkit.org/show_bug.cgi?id=149405
2747 lineNumber should be a number type but it was a string.
2749 Reviewed by Timothy Hatcher.
2751 * UserInterface/Base/Main.js:
2752 (WebInspector.openURL):
2753 (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
2754 Keep lineNumber undefined when it isn't present in the string.
2755 WebInspector.linkifyStringAsFragmentWithCustomLinkifier is only used by
2756 WebInspector.linkifyStringAsFragment and it expects lineNumber to be undefined
2757 when it wasn't found in the parsed string.
2759 2015-10-06 Devin Rousso <dcrousso+webkit@gmail.com>
2761 Web Inspector: Fix spacing of FindBanner prev/next buttons
2762 https://bugs.webkit.org/show_bug.cgi?id=149717
2764 Reviewed by Darin Adler.
2766 The sizing and spacing of the previous and next buttons in the FindBanner
2767 is slightly off and should be readjusted to ensure that both buttons are
2768 the same size and have the same spacing.
2770 * UserInterface/Views/FindBanner.css:
2771 (.find-banner > button.segmented.right > .glyph):
2772 (.find-banner > button.segmented):
2773 (.find-banner > button.segmented > .glyph):
2774 (.find-banner > button.segmented.left): Deleted.
2775 (.find-banner > button.segmented.left > .glyph): Deleted.
2776 (.find-banner > button.segmented.right): Deleted.
2778 2015-10-06 Joseph Pecoraro <pecoraro@apple.com>
2780 Web Inspector: Simplify TimelineRecordBar a bit
2781 https://bugs.webkit.org/show_bug.cgi?id=149733
2783 Reviewed by Timothy Hatcher.
2785 * UserInterface/Views/TimelineRecordBar.js:
2786 (WebInspector.TimelineRecordBar.prototype.set records):
2788 2015-10-05 Nikita Vasilyev <nvasilyev@apple.com>
2790 Web Inspector: Error displayed as an object when passed as a second argument to console.log
2791 https://bugs.webkit.org/show_bug.cgi?id=149799
2793 Reviewed by Joseph Pecoraro.
2795 * UserInterface/Views/ConsoleMessageView.js:
2796 (WebInspector.ConsoleMessageView.prototype._appendExtraParameters):
2797 Don't format errors as objects.
2799 (WebInspector.ConsoleMessageView.prototype._formatParameter):
2800 (WebInspector.ConsoleMessageView.prototype._formatParameterAsValue):
2801 (WebInspector.ConsoleMessageView.prototype._formatParameterAsString):
2802 (WebInspector.ConsoleMessageView.prototype._formatParameterAsNode):
2803 (WebInspector.ConsoleMessageView.prototype._formatParameterAsObject):
2804 (WebInspector.ConsoleMessageView.prototype._formatParameterAsError):
2805 (WebInspector.ConsoleMessageView.prototype._formatParameterAsArray):
2806 Replace an unnecessary span element with a document fragment.
2808 * UserInterface/Views/ErrorObjectView.css:
2810 Display an error object on the same line as a list bullet.
2812 2015-10-05 Myles C. Maxfield <mmaxfield@apple.com>
2814 Unprefix -webkit-font-feature-settings
2815 https://bugs.webkit.org/show_bug.cgi?id=149722
2817 Reviewed by Sam Weinig.
2819 * UserInterface/Models/CSSKeywordCompletions.js:
2821 2015-10-04 Nikita Vasilyev <nvasilyev@apple.com>
2823 Web Inspector: Wrong column numbers in error object views
2824 https://bugs.webkit.org/show_bug.cgi?id=149795
2826 Convert columnNumber and lineNumber properties from strings to numbers
2827 to prevent accidental string concatenations.
2829 Reviewed by Timothy Hatcher.
2831 * UserInterface/Models/StackTrace.js:
2832 (WebInspector.StackTrace._parseStackTrace):
2834 2015-10-02 Matt Baker <mattbaker@apple.com>
2836 Web Inspector: Add breakpoint option to ignore n times before stopping
2837 https://bugs.webkit.org/show_bug.cgi?id=147664
2839 Reviewed by Timothy Hatcher.
2841 * Localizations/en.lproj/localizedStrings.js:
2842 New strings for breakpoint popover labels.
2844 * UserInterface/Controllers/BreakpointPopoverController.js:
2845 (WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
2846 Add ignoreCount UI to popover, if backend support exists. UI based on same
2847 feature in Xcode's breakpoint editing dialog.
2848 (WebInspector.BreakpointPopoverController.prototype._popoverIgnoreInputChanged):
2849 User input sanity checks on numeric input.
2851 * UserInterface/Controllers/DebuggerManager.js:
2852 Listen for changes to breakpoint ignoreCount property.
2854 * UserInterface/Models/Breakpoint.js:
2855 (WebInspector.Breakpoint):
2856 (WebInspector.Breakpoint.prototype.get ignoreCount):
2857 (WebInspector.Breakpoint.prototype.set ignoreCount):
2858 New property for ignoreCount.
2859 (WebInspector.Breakpoint.prototype.get options):
2860 Added ignoreCount to options object.
2861 (WebInspector.Breakpoint.prototype.get info):
2862 Added ignoreCount to info object.
2864 * UserInterface/Views/BreakpointPopoverController.css:
2865 (#edit-breakpoint-popover-ignore):
2866 New styles for breakpoint popover.
2868 2015-10-02 Matt Baker <mattbaker@apple.com>
2870 Web Inspector: Cleanup DebuggerManager, reduce `delete` and use Maps instead of objects
2871 https://bugs.webkit.org/show_bug.cgi?id=149760
2873 Reviewed by Joseph Pecoraro.
2875 Replaced objects used as hashmaps with Map.
2877 * UserInterface/Controllers/DebuggerManager.js:
2878 (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
2879 (WebInspector.DebuggerManager.prototype.breakpointForIdentifier):
2880 (WebInspector.DebuggerManager.prototype.scriptForIdentifier):
2881 (WebInspector.DebuggerManager.prototype.scriptsForURL):
2882 (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
2883 (WebInspector.DebuggerManager.prototype.removeBreakpoint):
2884 (WebInspector.DebuggerManager.prototype.breakpointResolved):
2885 (WebInspector.DebuggerManager.prototype.reset):
2886 (WebInspector.DebuggerManager.prototype.scriptDidParse):
2887 (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
2888 (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
2889 (WebInspector.DebuggerManager.prototype._setBreakpoint):
2890 (WebInspector.DebuggerManager.prototype._removeBreakpoint.didRemoveBreakpoint):
2891 (WebInspector.DebuggerManager.prototype._removeBreakpoint):
2893 2015-10-02 Devin Rousso <dcrousso+webkit@gmail.com>
2895 Web Inspector: Copying inline style text puts "undefined" in the pasteboard
2896 https://bugs.webkit.org/show_bug.cgi?id=149155
2898 Reviewed by Brian Burg.
2900 CSSStyleDeclarations for inline styles do not have a owner CSSRule, which means
2901 that they do not have a selector or media list. CSS strings must have a selector
2902 and, for inline styles without an owner rule and selector, this was a problem.
2904 * UserInterface/Models/CSSStyleDeclaration.js:
2905 (WebInspector.CSSStyleDeclaration.prototype.get mediaList):
2906 (WebInspector.CSSStyleDeclaration.prototype.get selectorText):
2907 (WebInspector.CSSStyleDeclaration.prototype.generateCSSRuleString):
2908 Added getters for the list of media queries and selector text with fallbacks
2909 for CSSStyleDeclarations that do not have an owner CSSRule (inline styles).
2911 * UserInterface/Test.html:
2912 Added CSSMedia include for new inspector/css/generate-css-rule-string.html test.
2914 * UserInterface/Views/VisualStyleSelectorTreeItem.js:
2915 (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2916 Removed parameter that no longer exists.
2918 2015-10-02 Joseph Pecoraro <pecoraro@apple.com>
2920 Unreviewed, rolling out r190520, some tests assert / crash.
2922 * Localizations/en.lproj/localizedStrings.js:
2923 * UserInterface/Base/Main.js:
2924 (WebInspector.loaded): Deleted.
2925 * UserInterface/Base/Utilities.js:
2927 * UserInterface/Controllers/HeapManager.js: Removed.
2928 * UserInterface/Controllers/TimelineManager.js:
2929 (WebInspector.TimelineManager): Deleted.
2930 (WebInspector.TimelineManager.prototype._garbageCollected): Deleted.
2931 * UserInterface/Images/TimelineRecordGarbageCollection.svg: Removed.
2932 * UserInterface/Main.html:
2933 * UserInterface/Models/GarbageCollection.js: Removed.
2934 * UserInterface/Models/ScriptTimelineRecord.js:
2935 (WebInspector.ScriptTimelineRecord.EventType.displayName):
2936 (WebInspector.ScriptTimelineRecord.prototype.isGarbageCollection): Deleted.
2937 * UserInterface/Protocol/HeapObserver.js: Removed.
2938 * UserInterface/Test.html:
2939 * UserInterface/Test/Test.js:
2940 (WebInspector.loaded): Deleted.
2941 * UserInterface/Views/ScriptTimelineDataGridNode.js:
2942 (WebInspector.ScriptTimelineDataGridNode.prototype.get data):
2943 (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Deleted.
2944 (WebInspector.ScriptTimelineDataGridNode): Deleted.
2945 * UserInterface/Views/ScriptTimelineOverviewGraph.js:
2946 (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
2947 * UserInterface/Views/ScriptTimelineView.js:
2948 (WebInspector.ScriptTimelineView.prototype._processPendingRecords):
2949 * UserInterface/Views/SourceCodeTimelineTreeElement.js:
2950 (WebInspector.SourceCodeTimelineTreeElement):
2951 * UserInterface/Views/TimelineIcons.css:
2952 (.garbage-collection-profile-record .icon): Deleted.
2953 * UserInterface/Views/TimelineRecordBar.css:
2954 (.timeline-record-bar.timeline-record-type-script.script-timeline-record-garbage-collected > .segment): Deleted.
2955 * UserInterface/Views/TimelineRecordBar.js:
2956 (WebInspector.TimelineRecordBar.createCombinedBars):
2957 * UserInterface/Views/TimelineRecordTreeElement.js:
2958 (WebInspector.TimelineRecordTreeElement):
2960 2015-10-02 Devin Rousso <dcrousso+webkit@gmail.com>
2962 Web Inspector: Option-Click on a property name in the Computed view should jump to resource view
2963 https://bugs.webkit.org/show_bug.cgi?id=149521
2965 Reviewed by Timothy Hatcher.
2967 * UserInterface/Models/DOMNodeStyles.js:
2968 (WebInspector.DOMNodeStyles.prototype.effectivePropertyForName):
2969 Now tries to search for a non-canonical property before falling back to
2970 the canonical version.
2972 * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2973 (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
2974 If the user option-clicks the goto arrow, it shows the source for the
2977 * UserInterface/Views/ComputedStyleDetailsPanel.js:
2978 (WebInspector.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorShowProperty.delegateShowProperty):
2979 (WebInspector.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorShowProperty):
2980 Attempts to show the source of the given property. Will fallback to
2981 highlighting the property in the rules panel.
2983 2015-10-02 Joseph Pecoraro <pecoraro@apple.com>
2985 Web Inspector: Include Garbage Collection Event in Timeline
2986 https://bugs.webkit.org/show_bug.cgi?id=142510
2988 Reviewed by Geoffrey Garen.
2990 * UserInterface/Base/Utilities.js:
2991 (Array.prototype.parition):
2992 Helper to partition an Array into two arrays.
2994 * UserInterface/Main.html:
2995 * Localizations/en.lproj/localizedStrings.js:
2996 * UserInterface/Base/Main.js:
2997 (WebInspector.loaded):
2998 * UserInterface/Test.html:
2999 * UserInterface/Test/Test.js:
3000 (WebInspector.loaded):
3001 * UserInterface/Protocol/HeapObserver.js:
3002 (WebInspector.HeapObserver.prototype.garbageCollected):
3003 (WebInspector.HeapObserver):
3004 Create the new observer and manager.
3006 * UserInterface/Models/GarbageCollection.js:
3007 (WebInspector.GarbageCollection):
3008 (WebInspector.GarbageCollection.fromPayload):
3009 (WebInspector.GarbageCollection.prototype.get type):
3010 (WebInspector.GarbageCollection.prototype.get startTime):
3011 (WebInspector.GarbageCollection.prototype.get endTime):
3012 (WebInspector.GarbageCollection.prototype.get duration):
3013 Model object for Heap.GarbageCollection.
3015 * UserInterface/Controllers/HeapManager.js:
3016 (WebInspector.HeapManager):
3017 (WebInspector.HeapManager.prototype.garbageCollected):
3018 Dispatch events with.
3020 * UserInterface/Controllers/TimelineManager.js:
3021 (WebInspector.TimelineManager):
3022 (WebInspector.TimelineManager.prototype._garbageCollected):
3023 Include new GC Timeline Events as Script events.
3025 * UserInterface/Views/ScriptTimelineOverviewGraph.js:
3026 (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
3027 For the Script overview, make two sets of bars, one for Scripts and one for GCs.
3028 The GCs bar will be on top of the the Scripts bar. This is particularly useful
3029 since a GC can happen during script execution.
3031 * UserInterface/Views/ScriptTimelineDataGridNode.js:
3032 (WebInspector.ScriptTimelineDataGridNode.prototype.get data):
3033 (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
3034 (WebInspector.ScriptTimelineDataGridNode):
3035 Give a NaN call count to top level Script DataGridNodes.
3036 In the UI, display the empty placeholder for NaN call counts.
3038 * UserInterface/Images/TimelineRecordGarbageCollection.svg: Added.
3039 * UserInterface/Models/ScriptTimelineRecord.js:
3040 (WebInspector.ScriptTimelineRecord.prototype.isGarbageCollection):
3041 (WebInspector.ScriptTimelineRecord.EventType.displayName):
3042 * UserInterface/Views/ScriptTimelineView.js:
3043 (WebInspector.ScriptTimelineView.prototype._processPendingRecords):
3044 * UserInterface/Views/SourceCodeTimelineTreeElement.js:
3045 (WebInspector.SourceCodeTimelineTreeElement):
3046 * UserInterface/Views/TimelineIcons.css:
3047 (.garbage-collection-profile-record .icon):
3048 * UserInterface/Views/TimelineRecordBar.css:
3049 (.timeline-record-bar.timeline-record-type-script.script-timeline-record-garbage-collected > .segment):
3052 * UserInterface/Views/TimelineRecordBar.js:
3053 (WebInspector.TimelineRecordBar.createCombinedBars):
3054 Simplify by storing start time into a variable.
3056 * UserInterface/Views/TimelineRecordTreeElement.js:
3057 (WebInspector.TimelineRecordTreeElement):
3060 2015-10-02 Nikita Vasilyev <nvasilyev@apple.com>
3062 Web Inspector: Fix indentation of console message parameters
3063 https://bugs.webkit.org/show_bug.cgi?id=149740
3065 Reviewed by Darin Adler.
3067 * UserInterface/Views/ConsoleMessageView.css:
3068 (.console-message .console-message-stack-trace-container > li):
3069 (.console-message .console-message-extra-parameters-container > li::before):
3071 2015-10-02 Andres Gomez <agomez@igalia.com>
3073 [GTK] Web Inspector: Add GTK+ icons for new plus icons in the style sidebar
3074 https://bugs.webkit.org/show_bug.cgi?id=149227
3076 Reviewed by Carlos Garcia Campos.
3078 * UserInterface/Images/gtk/NewTabPlus.svg: Updated.
3079 * UserInterface/Images/gtk/Plus13.svg: Copied from Source/WebInspectorUI/UserInterface/Images/gtk/Plus.svg.
3080 * UserInterface/Images/gtk/Plus15.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/gtk/Plus.svg.
3082 2015-10-01 Joseph Pecoraro <pecoraro@apple.com>
3084 Web Inspector: Simplify filterableData processing
3085 https://bugs.webkit.org/show_bug.cgi?id=149730
3087 Reviewed by Timothy Hatcher.
3089 * UserInterface/Views/BreakpointTreeElement.js:
3090 (WebInspector.BreakpointTreeElement.prototype.get filterableData):
3091 * UserInterface/Views/NavigationSidebarPanel.js:
3092 (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter):
3093 * UserInterface/Views/ResourceTreeElement.js:
3094 (WebInspector.ResourceTreeElement.prototype.get filterableData):
3095 * UserInterface/Views/ScriptTimelineView.js:
3096 (WebInspector.ScriptTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
3097 * UserInterface/Views/SearchResultTreeElement.js:
3098 (WebInspector.SearchResultTreeElement.prototype.get filterableData):
3099 (WebInspector.SearchResultTreeElement):
3101 2015-10-01 Joseph Pecoraro <pecoraro@apple.com>
3103 Web Inspector: Do not immediately create all ProfileNodeTreeElements when showing JavaScript and Events timeline
3104 https://bugs.webkit.org/show_bug.cgi?id=149726
3106 Reviewed by Timothy Hatcher.
3108 * UserInterface/Views/NavigationSidebarPanel.js:
3109 (WebInspector.NavigationSidebarPanel.prototype.shouldFilterPopulate):
3110 (WebInspector.NavigationSidebarPanel.prototype._updateFilter):
3111 (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
3112 We were populating during filtering if there were any custom filters.
3113 However the TimelineSidebarPanel has custom filters (based on time and type)
3114 but those don't need to trigger population. Delay population until it
3115 would actually be needed (like a text search).
3117 * UserInterface/Views/TimelineSidebarPanel.js:
3118 (WebInspector.TimelineSidebarPanel.prototype.shouldFilterPopulate):
3119 Do not populate on filter via this custom filters.
3121 2015-10-01 Matt Baker <mattbaker@apple.com>
3123 Web Inspector: REGRESSION (r189567): Toolbar collapses when inspector at minimum height with console open
3124 https://bugs.webkit.org/show_bug.cgi?id=149725
3126 Reviewed by Timothy Hatcher.
3128 CSS Flexible Box Layout Module Level 1 introduces a new `auto` initial value for the min-{width|height}
3129 of flex box items, breaking some areas of the inspector UI. This is fixed by setting a min-height of
3130 zero for the #main <div>.
3132 * UserInterface/Views/Main.css:
3135 2015-10-01 Nikita Vasilyev <nvasilyev@apple.com>
3137 Web Inspector: Clip string previews
3138 https://bugs.webkit.org/show_bug.cgi?id=149708
3140 Only show first 140 characters in strings previews.
3142 Reviewed by Joseph Pecoraro.
3144 * UserInterface/Base/Utilities.js:
3145 (String.prototype.truncate): Added.
3146 A smart trancate function that doesn't split words.
3148 * UserInterface/Views/ConsoleMessageView.js:
3149 (WebInspector.ConsoleMessageView.prototype._shouldConsiderObjectLossless):
3150 * UserInterface/Views/FormattedValue.js:
3151 (WebInspector.FormattedValue.createElementForTypesAndValue):
3153 2015-09-30 João Oliveira <hello@jxs.pt>
3155 Web Inspector: Adjust font size of Developer Tools using Command,+ or Command,-
3156 https://bugs.webkit.org/show_bug.cgi?id=149590
3158 Reviewed by Joseph Pecoraro.
3160 Patch by João Oliveira and Brian Burg.
3162 * UserInterface/Base/Main.js:
3163 (WebInspector.contentLoaded): Add global keyboard shortcuts for zoom in and zoom out.
3165 2015-10-01 Andres Gomez <agomez@igalia.com>
3167 [GTK] Web Inspector: Add GTK+ icons for the numerical input and slider based Visual editors for CSS properties
3168 https://bugs.webkit.org/show_bug.cgi?id=147847
3170 Reviewed by Carlos Garcia Campos.
3172 * UserInterface/Images/gtk/VisualStylePropertyLinked.svg: Added.
3173 * UserInterface/Images/gtk/VisualStylePropertyUnlinked.svg: Added.
3175 2015-10-01 Andres Gomez <agomez@igalia.com>
3177 [GTK] Web Inspector: Add GTK+ icons for the different types of non-numerical Visual editors for CSS properties
3178 https://bugs.webkit.org/show_bug.cgi?id=147846
3180 Reviewed by Carlos Garcia Campos.
3182 * UserInterface/Images/gtk/AUTHORS: Updated.
3183 * UserInterface/Images/gtk/ClearBoth.svg: Added.
3184 * UserInterface/Images/gtk/ClearLeft.svg: Added.
3185 * UserInterface/Images/gtk/ClearRight.svg: Added.
3186 * UserInterface/Images/gtk/CubicBezier.svg: Updated.
3187 * UserInterface/Images/gtk/FloatLeft.svg: Added.
3188 * UserInterface/Images/gtk/FloatRight.svg: Added.
3189 * UserInterface/Images/gtk/FontStyleItalic.svg: Added.
3190 * UserInterface/Images/gtk/FontStyleNormal.svg: Added.
3191 * UserInterface/Images/gtk/FontVariantSmallCaps.svg: Added.
3192 * UserInterface/Images/gtk/TextAlignCenter.svg: Added.
3193 * UserInterface/Images/gtk/TextAlignJustify.svg: Added.
3194 * UserInterface/Images/gtk/TextAlignLeft.svg: Added.
3195 * UserInterface/Images/gtk/TextAlignRight.svg: Added.
3196 * UserInterface/Images/gtk/TextDecorationLineThrough.svg: Added.
3197 * UserInterface/Images/gtk/TextDecorationOverline.svg: Added.
3198 * UserInterface/Images/gtk/TextDecorationUnderline.svg: Added.
3199 * UserInterface/Images/gtk/TextTransformCapitalize.svg: Added.
3200 * UserInterface/Images/gtk/TextTransformLowercase.svg: Added.