ChangeLog   [plain text]

2018-02-12  Jason Marcell  <>

        Cherry-pick r228362. rdar://problem/37449316

    2018-02-09  Matt Baker  <>

            Web Inspector: Canvas tab: tree selection abruptly changes when selecting a recording frame

            Reviewed by Devin Rousso.

            * UserInterface/Views/CanvasSidebarPanel.css:
            (.sidebar > .panel.navigation.canvas > .content > .recording-content > .navigation-bar):
            (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
            (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.recording > .icon):
            (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.folder-icon > .icon):
            (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.folder-icon > .status):
            (.sidebar > .panel.navigation.canvas > .content > .navigation-bar): Deleted.
            (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.recording > .icon): Deleted.
            (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .icon): Deleted.
            (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .status): Deleted.
            Style changes for the additional DOM element required to virtualize the recording tree outline.

            * UserInterface/Views/CanvasSidebarPanel.js:
            In order to be virtualized, the tree must be the only child of its parent.

            (WI.CanvasSidebarPanel.prototype.set action):
            Ensure that a frame tree element isn't deselected when the last action
            in the frame becomes selected in the RecordingContentView.

            Refresh the sidebar, as represented objects may have changed while hidden.

            Unset the recording when no valid represented objects are found, to
            prevent a stale recording tree from being shown when viewing the overview.

            Moved toggling of the "has-recordings" style to _canvasChanged, since
            the navigation bar should be hidden when no canvas exists.

            * UserInterface/Views/CollectionContentView.js:
            Drive by fixes for child view visible state.

            * UserInterface/Views/TreeOutline.css:
            (.tree-outline:not(.large):matches(:focus, .force-focus) .item.selected .status .indeterminate-progress-spinner):
            Make spinner easier to see against the selection background color.

2018-02-09  Jason Marcell  <>

        Cherry-pick r228336. rdar://problem/37408902

    2018-02-09  Matt Baker  <>

            Web Inspector: Object.shallowEqual always fails when comparing array property values

            Reviewed by Devin Rousso.

            Object.shallowEqual should use Array.shallowEqual when comparing property
            values, since strictly comparing objects/arrays is only true if both
            operands reference the same Object.

            * UserInterface/Base/Utilities.js:

2018-02-09  Jason Marcell  <>

        Cherry-pick r228301. rdar://problem/37408879

    2018-02-08  Matt Baker  <>

            Web Inspector: add listing of Canvases/Programs/Recordings to the NavigationSidebar

            Reviewed by Devin Rousso.

            * Localizations/en.lproj/localizedStrings.js:

            * UserInterface/Images/Canvas2D.svg:
            * UserInterface/Images/Canvas3D.svg:
            * UserInterface/Images/Recording.svg:
            Update canvas icons to be monochrome. Simplified the recording icon.

            * UserInterface/Main.html:

            * UserInterface/Models/RecordingAction.js:
            (WI.RecordingAction.prototype.get state):
            (WI.RecordingAction.prototype.set state):
            Allow (2D) snapshot state to be associated with the action. Used by
            RecordingActionDetailsSidebarPanel to retrieve the snapshot state.

            * UserInterface/Views/CanvasContentView.css:
            (.content-view.canvas:not(.tab) > .progress): Deleted.
            (.content-view.canvas:not(.tab) > .progress > .frame-count): Deleted.

            * UserInterface/Views/CanvasContentView.js:
            (WI.CanvasContentView.prototype.get navigationItems):
            Replace progress UI with a reusable ProgressView class.
            When in the overview, clicking the CanvasContentView shows a dedicated
            CanvasContentView for inspecting shaders and recordings. This behavior
            is controlled by CollectionContentView, so we need to prevent it when
            clicking inside the header and footer elements, which contain clickable UI.

            * UserInterface/Views/CanvasDetailsSidebarPanel.js:

            * UserInterface/Views/CanvasOverviewContentView.css:
            (.content-view.canvas-overview .content-view.canvas):
            (.content-view.canvas-overview .content-view.canvas > :matches(header, footer)):
            (.content-view.canvas-overview .content-view.canvas > header):
            (.content-view.canvas-overview > header):
            (.content-view.canvas-overview .content-view.canvas > header > .navigation-bar):
            (.content-view.canvas-overview .content-view.canvas:matches(:hover, .is-recording) > header > .navigation-bar):
            (.content-view.canvas-overview > .progress-view,):
            (.content-view.canvas-overview > .preview):
            (.content-view.canvas-overview .content-view.canvas > :matches(header, .progress, .preview, footer)): Deleted.
            (.content-view.canvas-overview .content-view.canvas.selected > :matches(.progress, .preview, footer),): Deleted.
            (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording, .selected) > header > .navigation-bar): Deleted.
            (.content-view.canvas-overview .content-view.canvas > :matches(.progress, .preview)): Deleted.
            (.content-view.canvas-overview .content-view.canvas > .preview): Deleted.
            (.content-view.canvas-overview .content-view.canvas > .progress ~ .preview): Deleted.
            Clean up styles, and remove selection styles as canvases are no longer selectable in the overview.

            * UserInterface/Views/CanvasOverviewContentView.js:
            (WI.CanvasOverviewContentView.prototype.get navigationItems):
            (WI.CanvasOverviewContentView.prototype.get selectionPathComponents): Deleted.
            (WI.CanvasOverviewContentView.prototype._changeSelectedItemVertically): Deleted.
            (WI.CanvasOverviewContentView.prototype._changeSelectedItemHorizontally): Deleted.
            (WI.CanvasOverviewContentView.prototype._selectionPathComponentsChanged): Deleted.
            (WI.CanvasOverviewContentView.prototype._handleUp): Deleted.
            (WI.CanvasOverviewContentView.prototype._handleRight): Deleted.
            (WI.CanvasOverviewContentView.prototype._handleDown): Deleted.
            (WI.CanvasOverviewContentView.prototype._handleLeft): Deleted.
            (WI.CanvasOverviewContentView.prototype._handleSpace): Deleted.
            (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange): Deleted.
            Disable canvas selection. Remove logic for supplemental represented objects,
            path components, and selection keyboard shortcuts.

            * UserInterface/Views/CanvasSidebarPanel.css: Added.
            (.sidebar > .panel.navigation.canvas > .content):
            (.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled):
            (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.canvas-2d .icon):
            (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.webgl .icon):
            (.sidebar > .panel.navigation.canvas > .content > .navigation-bar):
            (.sidebar > .panel.navigation.canvas.has-recordings > .content > .tree-outline.canvas):
            (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
            (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.recording > .icon):
            (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.shader-program > .icon):
            (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .icon):
            (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .status):

            * UserInterface/Views/CanvasSidebarPanel.js: Added.
            (WI.CanvasSidebarPanel.prototype.get canvas):
            (WI.CanvasSidebarPanel.prototype.set canvas):
            (WI.CanvasSidebarPanel.prototype.set recording):
            (WI.CanvasSidebarPanel.prototype.set action):
            Add new navigation sidebar, split into two sections. The upper section
            contains a tree with a single element for the current canvas, and child
            elements for any shader programs. The maximum height of this section is 50%
            of the sidebar's height. The lower section contains a tree for the selected
            recording, and a scope bar for choosing between recordings.

            * UserInterface/Views/CanvasTabContentView.css:
            ( .navigation-bar > .item .canvas-overview .icon):
            ( .navigation-bar > .item .canvas.canvas-2d .icon):
            ( .navigation-bar > .item .canvas.webgl .icon):
            ( .navigation-bar > .item .shader-program > .icon):
            ( .navigation-bar > .item > .hierarchical-path-component > .icon): Deleted.
            ( .navigation-bar > .item .canvas .icon): Deleted.

            * UserInterface/Views/CanvasTabContentView.js:
            (WI.CanvasTabContentView.prototype.showRepresentedObject): Deleted.
            (WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged): Deleted.
            (WI.CanvasTabContentView.prototype._recordingActionIndexChanged): Deleted.
            (WI.CanvasTabContentView.prototype._updateActionIndex): Deleted.
            The canvas tab now maintains a tree outline of all canvases, with an
            "Overview" element as the root. The Overview element is always the first
            item of content browser's hierarchical path.

            * UserInterface/Views/CanvasTreeElement.js:
            (WI.CanvasTreeElement.prototype.ondetach): Deleted.
            Make it possible to not show recordings under the Canvas element.
            Create `isRecording` status element (spinner).

            * UserInterface/Views/CollectionContentView.js:
            Child ContentViews need to be updated when the collection's visibility changes.

            * UserInterface/Views/ContentView.js:

            * UserInterface/Views/ProgressView.css: Added.
            (.progress-view > .titles):
            (.progress-view > .titles > .title):
            (.progress-view > .titles > .subtitle):
            (.progress-view > .titles > .subtitle::before):
            (.progress-view > .indeterminate-progress-spinner):

            * UserInterface/Views/ProgressView.js: Added.
            (WI.ProgressView.prototype.get title):
            (WI.ProgressView.prototype.set title):
            (WI.ProgressView.prototype.get subtitle):
            (WI.ProgressView.prototype.set subtitle):
            (WI.ProgressView.prototype.get visible):
            (WI.ProgressView.prototype.set visible):
            New view class (not a ContentView) for showing a generic progress message,
            with a title, subtitle, and progress spinner.

            * UserInterface/Views/RecordingContentView.css:
            (.content-view:not(.tab).recording > .preview-container):
            Remove unnecessary styles.

            * UserInterface/Views/RecordingContentView.js:
            (WI.RecordingContentView.prototype.get navigationItems):
            (WI.RecordingContentView.prototype.get supplementalRepresentedObjects):
            (WI.RecordingContentView.prototype.get saveData):
            Relocate the recording export logic and UI.
            Refactor logic for notifying the rest of the UI of changes to the action slider.
            The selected action is now exposed as a supplemental represented object, and a
            corresponding SupplementalRepresentedObjectsDidChange event.

            * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
            (WI.RecordingStateDetailsSidebarPanel.prototype.set action):
            (WI.RecordingStateDetailsSidebarPanel.prototype.updateAction): Deleted.

            * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
            (WI.RecordingTraceDetailsSidebarPanel.prototype.set action):
            (WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction): Deleted.
            Now that the selected action is exposed to the UI as a supplemental
            represented object, details sidebars can be more decoupled from the
            canvas tab, and be notified of changes to the selection via `inspect()`.

            * UserInterface/Views/ResourceIcons.css:
            (.canvas > .icon): Deleted.
            (.shader-program .icon): Deleted.

2018-02-09  Jason Marcell  <>

        Cherry-pick r228296. rdar://problem/37408890

    2018-02-08  Nikita Vasilyev  <>

            Web Inspector: Styles: Typing value and quickly moving focus away may display outdated value in UI

            Reviewed by Matt Baker.

            CSSProperty models were updated with a 250ms delay. Quickly adding a blank property after modifying
            an existing property could result in outdated values being shown.

            This patch removes the 250ms delay.

            * UserInterface/Views/SpreadsheetStyleProperty.js:

2018-02-04  Jason Marcell  <>

        Cherry-pick r228030. rdar://problem/37220121

    2018-02-02  Devin Rousso  <>

            Web Inspector: Styles Redesign: Pasting multiple properties should create properties instead of a bad property

            Reviewed by Matt Baker.

            * UserInterface/Views/SpreadsheetStyleProperty.js:
            When the user pastes into the name field, parse the text for a list of name-value pairs and
            replace the property being edited with the text of those pairs.

            * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
            (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved): Deleted.
            Calling `addBlankProperty` will trigger a layout on the next frame, but that might be before
            the CSSAgent has had a chance to finish refreshing, so we need a way to defer the creation
            of a new property until after we have finished the next layout (which is after the refresh).
            Drive-by: fix naming of some delegate functions.

            * UserInterface/Models/CSSProperty.js:
            Provide a way for replacing the property with new text.

2018-01-30  Jason Marcell  <>

        Cherry-pick r227707. rdar://problem/37019463

    2018-01-26  Matt Baker  <>

            Web Inspector: Timelines content browser NavigationBar is squashed at narrow heights

            Reviewed by Joseph Pecoraro.

            * UserInterface/Views/NavigationBar.css:

2018-01-30  Jason Marcell  <>

        Cherry-pick r227666. rdar://problem/37019530

    2018-01-25  Joseph Pecoraro  <>

            Web Inspector: Network - Cookies view should behave better at narrow widths, all data is hidden

            Reviewed by Brian Burg.

            * UserInterface/Views/ResourceCookiesContentView.css:
            (.resource-cookies .table):
            Give these tables a reasonable minimum size so that if the inspector
            is narrow, the content view can still be scrolled to see all of
            the table data.

            * UserInterface/Views/Table.css:
            (.table > .header):
            Match the data-container and mark overflow as hidden, otherwise
            super narrow widths show header content beyond the edge.

2018-01-25  Jason Marcell  <>

        Cherry-pick r227585. rdar://problem/36873363

    2018-01-24  Nikita Vasilyev  <>

            REGRESSION (r226994): Web Inspector: Styles: Suggestions popover floats in top-left corner of Web Inspector after tabbing

            Reviewed by Matt Baker.

            r226994 added a layout of all properties on property removal. Layout caused
            a property element to be removed from DOM right before dislaying the suggestion
            popover, resulting in the popover being displayed at the top left corner.

            * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
            Only update property view indices when a property is removed.

            * UserInterface/Views/SpreadsheetStyleProperty.js:
            (WI.SpreadsheetStyleProperty.prototype.set index):

            * UserInterface/Views/SpreadsheetTextField.js:
            Checking this._element.parentNode to see if the element is attached to the DOM tree is unreliable,
            since the element may have a non-null parent node that is detached from the DOM tree. To fix that,
            we could traverse element's ancestors, but I used a concise isConnected property instead.

2018-01-25  Jason Marcell  <>

        Cherry-pick r227572. rdar://problem/36873386

    2018-01-24  Joseph Pecoraro  <>

            ReferenceError:​ Can't find variable:​ DOMAgent (at ScriptSyntaxTree.js:​178:​22)​

            Reviewed by Matt Baker.

            * UserInterface/Models/ScriptSyntaxTree.js:
            DOMAgent won't be available in a ServiceWorker or JSContext inspector. So add
            a check for DOMAgent, and assume if DOMAgent doesn't exist that we should fall
            back to the latest path (non-iOS 9) target.

2018-01-23  Jason Marcell  <>

        Cherry-pick r227463. rdar://problem/36807123

    2018-01-23  Joseph Pecoraro  <>

            Web Inspector: Network's columns shake when scrolling at non-default zoom level

            Reviewed by Matt Baker.

            * UserInterface/Views/Table.js:
            When zoomed the bounding client rect values were fractional, which was
            unexpected by this area of code. Floor the values to get a value we expect
            to be able to evenly distribute.

2018-01-22  Jason Marcell  <>

        Cherry-pick r227370. rdar://problem/36763189

    2018-01-22  Nikita Vasilyev  <>

            Web Inspector: Styles Redesign: data corruption when updating values quickly

            Reviewed by Joseph Pecoraro.

            Data corruption used to happen because CSSStyleDeclaration.prototype.text didn't
            update synchronously. Making two or more quick changes resulted in corrupted data.

            Imagine we modify a CSS value 3 times:

            Front-end:  (1)-(2)---(3)
            Back-end:          (1)-----(2)-(3)

            The first response from the backend could happen after the 2nd edit. In this patch,
            CSSStyleDeclaration is locked when its view is being edited.

            To correctly display invalid and overridden properties, the backend is allowed to update
            CSSStyleDeclaration and CSSProperty when they're locked if the text from the backend
            matches the model's text. This should happen when the backend is caught up with the
            front-end changes.

            * UserInterface/Models/CSSProperty.js:
            * UserInterface/Models/CSSStyleDeclaration.js:
            (WI.CSSStyleDeclaration.prototype.get locked):
            (WI.CSSStyleDeclaration.prototype.set locked):
            (WI.CSSStyleDeclaration.prototype.set text):

            * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
            (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get editing):
            (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set focused):
            (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set inlineSwatchActive):
            Lock CSSStyleDeclaration when a CSS property name or value is focused or
            an inline widget is active.

            * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
            * UserInterface/Views/SpreadsheetStyleProperty.js:
            When selector is focused, clicking on the white-space should not add a new blank property.

2018-01-22  Jason Marcell  <>

        Cherry-pick r227243. rdar://problem/36722430

    2018-01-19  Matt Baker  <>

            Web Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed

            Reviewed by Devin Rousso.

            * UserInterface/Views/CanvasContentView.js:

2018-01-22  Jason Marcell  <>

        Cherry-pick r227232. rdar://problem/36722564

    2018-01-19  Nikita Vasilyev  <>

            Web Inspector: Styles Redesign: tabbing on commented out property throws exception

            Reviewed by Joseph Pecoraro.

            * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
            Tabbing from the selector field should focus on the first editable property.
            When no editable properties are present, a new blank property should be added after the commented out ones.

            Shift-tabbing from the selector field should focus on the last editable property of the previous CSS rule.
            When no editable properties are present, a new blank property should be added after the commented out ones.

            When navigating between properties skip the commented out ones.

            * UserInterface/Views/SpreadsheetStyleProperty.js:
            (WI.SpreadsheetStyleProperty.prototype.get enabled):

2018-01-22  Jason Marcell  <>

        Cherry-pick r227228. rdar://problem/36722601

    2018-01-19  Nikita Vasilyev  <>

            Web Inspector: Make styles sidebar always LTR

            Reviewed by Joseph Pecoraro.

            * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

2018-01-22  Jason Marcell  <>

        Cherry-pick r227008. rdar://problem/36722458

    2018-01-16  Matt Baker  <>

            Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording

            Reviewed by Joseph Pecoraro.

            * UserInterface/Views/CanvasOverviewContentView.js:

2018-01-17  Jason Marcell  <>

        Cherry-pick r227078. rdar://problem/36597996

    2018-01-17  Joseph Pecoraro  <>

            Web Inspector: Add back localized strings for Styles sidebar panels

            Reviewed by Brian Burg.

            * Localizations/en.lproj/localizedStrings.js:
            * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
            * UserInterface/Views/RulesStyleDetailsSidebarPanel.js:
            * UserInterface/Views/VisualStyleDetailsSidebarPanel.js:
            Add back localized strings for panel titles lost in r225547.

2018-01-16  Jason Marcell  <>

        Cherry-pick r226995. rdar://problem/36568070

    2018-01-16  Nikita Vasilyev  <>

            Web Inspector: Styles Redesign: Long value causes bad wrapping

            Reviewed by Joseph Pecoraro.

            Wrap long values only when editing.

            * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
            (.spreadsheet-style-declaration-editor .value.editing):

2018-01-16  Jason Marcell  <>

        Cherry-pick r226996. rdar://problem/36568089

    2018-01-16  Nikita Vasilyev  <>

            Web Inspector: Styles: pressing down key should select first item from completion list when focusing on empty value

            Reviewed by Joseph Pecoraro.

            * UserInterface/Views/SpreadsheetTextField.js:

2018-01-16  Jason Marcell  <>

        Cherry-pick r226994. rdar://problem/36568074

    2018-01-16  Nikita Vasilyev  <>

            Web Inspector: Styles Redesign: clicking on the white space after the property sometimes places a blank property at the wrong index

            Reviewed by Joseph Pecoraro.

            * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
            Layout call is needed to update data-property-index attributes on the property views.

2018-01-16  Jason Marcell  <>

        Cherry-pick r226992. rdar://problem/36568053

    2018-01-16  Joseph Pecoraro  <>

            Web Inspector: Network Tab - Export HAR Context Menu not working

            Reviewed by Brian Burg.

            * UserInterface/Views/NetworkTableContentView.js:
            Ensure `this` works in the handler.

2018-01-16  Jason Marcell  <>

        Cherry-pick r226821. rdar://problem/36568038

    2018-01-11  Joseph Pecoraro  <>

            Web Inspector: Rename "Query String" section as "Query String Parameters" for clarity

            Reviewed by Darin Adler.

            * Localizations/en.lproj/localizedStrings.js:
            * UserInterface/Views/ResourceHeadersContentView.js:

2018-01-16  Jason Marcell  <>

        Cherry-pick r226765. rdar://problem/36568045

    2018-01-10  Joseph Pecoraro  <>

            REGRESSION(r218975): Web Inspector: Add back NavigationSidebarPanel initialization parameter used by SearchSidebarPanel (top overflow shadow)

            Reviewed by Matt Baker.

            * UserInterface/Views/NavigationSidebarPanel.css:
            (.sidebar > .panel.navigation >
            * UserInterface/Views/NavigationSidebarPanel.js:
            Add back the initialization parameter still used by SearchSidebarPanel
            and add back its implementation. There were still references to
            dynamically update _topOverflowShadowElement in NavigationSidebarPanel.

2018-01-16  Jason Marcell  <>

        Cherry-pick r226674. rdar://problem/36568078

    2018-01-09  Joseph Pecoraro  <>

            REGRESSION(r201855): Web Inspector: Should see "length" autocompletion suggestion on a string literal

            Reviewed by Matt Baker.

            * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
            This is code that runs on the inspected target, which may have an old version of
            WebKit/JavaScriptCore, so don't use new syntax like this.

            We intended to return the result by as a JSON value instead of a RemoteObject.

2018-01-11  Jason Marcell  <>

        Cherry-pick r226755. rdar://problem/36429123

    2018-01-10  Matt Baker  <>

            Web Inspector: Canvas tab: throttle recording slider updates

            Reviewed by Joseph Pecoraro

            * UserInterface/Base/Utilities.js:
            Add Object.throttle and Function.cancelThrottle. Repeated calls to a
            function on a throttled object are delayed, so that the function isn't
            invoked more frequently than the specified delay value.

            For a description of throttling behavior see:

            * UserInterface/Views/RecordingContentView.js:
            Throttle frequency of canvas snapshot creation to 200ms.
            Prevent trailing edge call after hiding the view.

2018-01-09  Jason Marcell  <>

        Cherry-pick r226517. rdar://problem/36392371

    2018-01-08  Joseph Pecoraro  <>

            Web Inspector: Find next / previous within a resource content view does not have bouncy highlight when editor scrolls

            Reviewed by Brian Burg.

            * UserInterface/Views/TextEditor.js:
            Reposition the bouncy highlight on scroll based on the CodeMirror
            line/ch position of the search result.

            Track the bouncy highlight scroll handler in a member variable so that
            we always remember to remove it and don't leak scroll handlers.

2018-01-07  David Kilzer  <>

        Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects

        Reviewed by Darin Adler.

        * Configurations/Base.xcconfig:
        (WARNING_CFLAGS): Add -Wcast-qual.

2018-01-05  Joseph Pecoraro  <>

        Web Inspector: Add another Protocol Version

        Reviewed by Matt Baker.

        * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js: Added.
        * Versions/Inspector-iOS-11.3.json: Added.

2018-01-04  Devin Rousso  <>

        Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic

        Reviewed by Joseph Pecoraro.

        * UserInterface/Models/Canvas.js:
        (WI.Canvas.prototype.get contextType):
        (WI.Canvas.prototype.get frame): Deleted.

2018-01-04  Joseph Pecoraro  <>

        REGRESSION (r225709): Web Inspector: CSS Source maps not loading

        Reviewed by Brian Burg.

        * UserInterface/Controllers/SourceMapManager.js:
        * UserInterface/Models/SourceMapResource.js:
        Correct this so that we only fall back to a reasonable frame id
        if we couldn't determine a frame id from earlier. Previously this
        was incorrectly clearing the frame id if we had gotten it earlier.

        * UserInterface/Test.html:
        * UserInterface/Test/Test.js:
        Add SourceMap related files for tests.

2018-01-04  Brian Burg  <>

        Web Inspector: Capture Element Screenshot looks fuzzy

        Reviewed by Joseph Pecoraro and Simon Fraser.

        Spruce up these functions a bit. They now optionally return a promise
        if no callback is supplied. They now can take either a WI.DOMNode or a node id.

        * UserInterface/Controllers/DOMTreeManager.js:

2018-01-04  Brian Burg  <>

        Web Inspector: add RemoteObject.fetchProperties and some basic tests for RemoteObject API

        Reviewed by Joseph Pecoraro.

        Add a new method, fetchProperties, which async fetches an arbitrary list of properties
        from a RemoteObject. This is intended for writing tests and other quick evaluations,
        so it has some behaviors that are suitable in these situations:
        - If the evaluation throws an exception, the result will reject with that exception.
        - If there is a protocol error for some reason, the result will reject with an exception.
        - Non-string and non-number keys cause an exception, as this is probably not intended.
        - Does not accept a callback, returns a promise only. New code should use async.

        For full fidelity introspection of property descriptors, clients should use the existing
        getOwnPropertyDescriptor[s] class of methods.

        * UserInterface/Protocol/RemoteObject.js:
        (WI.RemoteObject.prototype.async.fetchProperties): Added.
        - Validate specified keys and remove duplicates.
        - Request properties one-by-one to avoid fetching all descriptors and dealing with previews.
        - Unwrap returned primitive values to avoid unnecessary munging in tests.

        - Rework this to return a promise if no callback was supplied.
        - Introduce stricter property type checking to avoid unintended mistakes.

        - Rework this to return a promise if no callback was supplied.
        - Turn thrown exceptions and protocol errors into rejected promises.

2018-01-04  Joseph Pecoraro  <>

        Web Inspector: ⌘G / ⇧⌘G text search does not working after closing find banner

        Reviewed by Matt Baker.

        * UserInterface/Views/ContentBrowser.js:
        When the find banner is hidden trigger a new ContentView method,
        searchHidden instead of the destructive searchCleared. This allows
        most content views (text editors, DOM tree, Network Headers view)
        to keep their populated search results.

        * UserInterface/Views/ContentView.js:
        * UserInterface/Views/LogContentView.js:
        By default searchHidden does nothing. The Console's LogContentView
        treats the find banner differently and clears its search results.

        * UserInterface/Views/TextEditor.js:
        Modernize some code while working in this area.

        * UserInterface/Views/Main.css:
        Ensure black text on yellow background in the bouncy highlight. In the
        DOM Tree it could have been white if the find banner was closed.

2018-01-03  Ting-Wei Lan  <>

        Replace hard-coded paths in shebangs with #!/usr/bin/env

        Reviewed by Alex Christensen.

        * Scripts/
        * Scripts/copy-user-interface-resources-dryrun.rb:
        * Scripts/
        * Scripts/
        * Scripts/remove-console-asserts-dryrun.rb:
        * Scripts/
        * Scripts/update-LegacyInspectorBackendCommands.rb:
        * Scripts/update-codemirror-resources.rb:
        * WebInspectorUI.vcxproj/

2018-01-03  Joseph Pecoraro  <>

        Web Inspector: "Log Value" context menu is sometimes unavailable

        Reviewed by Devin Rousso.

        * UserInterface/Views/ObjectPreviewView.css:
        (.object-preview > .title):
        * UserInterface/Views/ObjectTreeView.css:
        (.object-tree.expanded > .title):
        Make the expanded object title information 16px tall to match ObjectTree
        tree element row heights. This eliminates the floating console message
        location from overlapping the first ObjectTree's TreeElement and causing
        truncation and other behavior issues (like Context Menu identification).

2018-01-03  Joseph Pecoraro  <>

        Web Inspector: RTL - DOM Tree Element selection doesn't work

        Reviewed by Devin Rousso.

        * UserInterface/Views/TreeOutline.js:
        Provide a better explanation for why we are making the `x` adjustment here,
        to detect the inner most tree element along the horizontal. Fix the algorithm
        for RTL, since the intent is to adjust to the trailing edge of the container
        which is on the opposite side in RTL.

2018-01-03  Joseph Pecoraro  <>

        Web Inspector: Find banner sometimes does not work (when already populated and shown for first time on resource)

        Reviewed by Matt Baker.

        * UserInterface/Views/TextEditor.js:
        (WI.TextEditor.prototype.set string):
        Defer any early searches until the initial content of a TextEditor has been set.
        Such searches can happen when the FindBanner already has content when a
        ContentView is first opened and needs to load its content from the backend.
        Further, even though the content may be loaded from the backend before the
        search results, microtask hops might cause the content to get to the TextEditor
        after the search results.

2018-01-03  Joseph Pecoraro  <>

        REGRESSION: Web Inspector: Debugger tab doesn't restore selected resource on reload

        Reviewed by Matt Baker.

        * UserInterface/Views/DebuggerSidebarPanel.js:
        Add braces to ensure the trailing else is actually trailing the outer
        chain as it was intended to be.

2018-01-02  Joseph Pecoraro  <>

        Web Inspector: Clicking source location link in Console unexpectedly jumps to Network tab

        Reviewed by Matt Baker.

        * UserInterface/Base/Main.js:
        Cleanup linkifyURLAsNode. Ignore Search tab in generic handlePossibleLinkClick
        when not already in the Search tab.

        * UserInterface/Views/CallFrameView.js:
        Ignore Search and Network tab in CallFrame links.

        * UserInterface/Views/TabBrowser.js:
        Improve style.

== Rolled over to ChangeLog-2018-01-01 ==