Web Inspector: Cursor and scroll view jumps around when modifying styles
https://bugs.webkit.org/show_bug.cgi?id=137467

This merges commit e2962a5b0df56c8ee5a4482899d308decf3d7677 from CodeMirror.

Reviewed by Joseph Pecoraro.

* UserInterface/External/CodeMirror/codemirror.js:
(maybeScrollWindow): Signal the scrollCursorIntoView event.
(signalDOMEvent): Support string events by transforming them to event objects.

* UserInterface/Views/CodeMirrorAdditions.js:
(scrollCursorIntoView): Added. Default event listener that provides our own
implementation using WebKit's scrollIntoViewIfNeeded.

* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Stop doing an
extra scrollIntoViewIfNeeded call, CodeMirror does this.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename HTMLInputElement::imageLoader() to ensureImageLoader()
https://bugs.webkit.org/show_bug.cgi?id=138508

Reviewed by Andreas Kling.

Rename HTMLInputElement::imageLoader() to ensureImageLoader() and have
it return a reference to make it clear that it constructs an
ImageLoader if missing.
Also introduce a lightweight imageLoader() getter which just returns
the imageLoader or null if missing.

No new tests, no behavior change.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::ensureImageLoader):
(WebCore::HTMLInputElement::didMoveToNewDocument):
(WebCore::HTMLInputElement::imageLoader): Deleted.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::imageLoader):
(WebCore::HTMLInputElement::hasImageLoader): Deleted.
* html/ImageInputType.cpp:
(WebCore::ImageInputType::srcAttributeChanged):
(WebCore::ImageInputType::attach):
(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Avoid repainting scrollbar track when the scrollbar track is transparent.
<https://webkit.org/b/138521>
<rdar://problem/18892090>

Reviewed by Simon Fraser.

Don't bother invalidating the entire WebCore scrollbar when we've opted into
AppKit's special mode to use individual layers for scrollbar components.
NSScrollerImp will invalidate what's necessary below e.g setKnobAlpha.

* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPartAnimation setCurrentProgress:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix an alignment issue with operationPushCatchScope on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=138510

Reviewed by Csaba Osztrogonác.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/JITInlines.h:
(JSC::JIT::callOperation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Layer summary should be bottom sticky
https://bugs.webkit.org/show_bug.cgi?id=138518

Reviewed by Timothy Hatcher.

Previously only NavigationSidebars had a content view. Now, give all
Sidebars a contentElement section for content.

Update all Details Sidebars to append content to the contentElement
instead of directly to the element. Only two Details sidebars append
to the element:

  - CSSStyleDetailsSidebarPanel for the navigation bar at the top
  - LayerTreeDetailsSidebarPanel for the summary view at the bottom

Take this opportunity to fix up some naming and styles as well.

* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel):
(WebInspector.SidebarPanel.prototype.get contentElement):
Give every SidebarPanel a content element.

* UserInterface/Views/DetailsSidebarPanel.css: Removed.
(.sidebar > .panel > .content):
* UserInterface/Views/SidebarPanel.css: Added.
(.sidebar > .panel > .content):
And give that content element a default style.

* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .content):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
(WebInspector.NavigationSidebarPanel.prototype.get contentElement): Deleted.
Navigation sidebar panels now use the parent's contentElement.
Also, carry over their default styles, overriding the base.

* UserInterface/Views/LayerTreeDetailsSidebarPanel.js: Renamed from Source/WebInspectorUI/UserInterface/Views/LayerTreeSidebarPanel.js.
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildLayerInfoSection):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildBottomBar):
Rename LayerTreeSidebarPanel to make it clear this is a DetailsSidebarPanel.
Add the "bottom bar" to the root element, and sections to the contentElement.

* UserInterface/Views/LayerTreeDetailsSidebarPanel.css: Renamed from Source/WebInspectorUI/UserInterface/Views/LayerTreeSidebarPanel.css.
(.sidebar > .layer-tree.panel > .content):
(body.mac-platform.legacy .sidebar > .layer-tree.panel > .content):
Style the bottom bar to pin it to the bottom of the sidebar panel.

(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._navigationItemSelected):
Add the navigation bar to the root element, and sections to the contentElement.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Main.html:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
Update for new names.

* UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
* UserInterface/Views/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
* UserInterface/Views/DetailsSidebarPanel.js:
(WebInspector.DetailsSidebarPanel):
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.delayedWork):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):
All details sidebar panels now use the contentElement instead of element for content.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce the concept of analysis task to perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=138517

Reviewed by Andreas Kling.

Introduced the concept of an analysis task, which is created for a range of measurements for a given metric on
a single platform and used to bisect regressions in the range.
        
Added a new page to see the list of active analysis tasks and a page to view the contents of an analysis task.

* init-database.sql: Added a bunch of tables to store information about analysis tasks.
    analysis_tasks - Represents each analysis task. Associated with a platform and a metric and possibly with two
    test runs. Analysis tasks not associated with test runs are used for try new patches.
    analysis_test_groups - A test group in an analysis task represents a bunch of related A/B testing results.
    root_sets - A root set represents a set of roots (or packages) installed in each A/B testing.
    build_requests - A build request represents a single pending build for A/B testing.

* public/api/analysis-tasks.php: Added. Returns the specified analysis task or all analysis tasks in an array.
(main):
(format_task):

* public/api/test-groups.php: Added. Returns analysis task groups for the specified analysis task or returns
the specified analysis task group as well as build requests associated with them.
(main):
(fetch_test_groups_for_task):
(fetch_build_requests_for_task):
(fetch_build_requests_for_group):
(format_test_group):
(format_build_request):

* public/include/json-header.php:
(remote_user_name): Extracted from compute_token so that we can use it in create-analysis-task.php.
(compute_token):

* public/privileged-api/associate-bug.php:
(main): Fixed a typo.

* public/privileged-api/create-analysis-task.php: Added. Creates a new analysis task for a given test run range.
(main):
(ensure_row_by_id):
(ensure_config_from_runs):

* public/privileged-api/generate-csrf-token.php: Use remote_user_name.

* public/v2/analysis.js: Added. Various Ember data store models to represent analysis tasks and related objects.
(App.AnalysisTask):
(App.AnalysisTask.create):
(App.TestGroup):
(App.TestGroupAdapter):
(App.AnalysisTaskSerializer):
(App.TestGroupSerializer):
(App.BuildRequest):

* public/v2/app.css: Added style rules for the analysis page.

* public/v2/app.js:
(App.Pane._fetch): Use fetchRunsWithPlatformAndMetric, which has been refactored into App.Manifest.

(App.PaneController.actions.toggleBugsPane): Show bugs pane even when there are no bug trackers or there is not
exactly one selected point as we can still create an analysis task.
(App.PaneController.actions.associateBug): Renamed singlySelectedPoint to selectedSinglePoint to be more
grammatical and also alert'ed the error message when there is one.
(App.PaneController.actions.createAnalysisTask): Added. Creates a new analysis task and opens it in a new tab.
Since window.open only works during the click, we open the new "window" preemptively and navigates or closes it
once XHR request has completed.
(App.PaneController._detailsChanged): Changes due to singlySelectedPoint to selectedSinglePoint rename.
(App.PaneController._updateBugs): Fixed a bug that we were showing bugs in the previous point when a single point
is selected in the details pane.

(App.AnalysisRoute): Added.
(App.AnalysisTaskRoute): Added.
(App.AnalysisTaskViewModel): Added.
(App.AnalysisTaskViewModel._taskUpdated): Fetch runs for the associated platform and metric.
(App.AnalysisTaskViewModel._fetchedRuns): Setup the chart data to show.
(App.AnalysisTaskViewModel.testSets): The computed property used to update roots for all repositories/projects.
(App.AnalysisTaskViewModel._rootChangedForTestSet): Updates root selections for all repositories/projects when
the user selects an option for all roots in A or B configuration.
(App.AnalysisTaskViewModel.roots): The computed property used to show root choices for each repository/project.

* public/v2/chart-pane.css: Added style rules for details view in the analysis task page.

* public/v2/data.js:
(Measurement.prototype._formatRevisionRange): Don't prefix a revision number with "At " when there is no previous
point so that we can use it in App.AnalysisTaskViewModel.roots.
(TimeSeries.prototype.findPointByMeasurementId): Added.
(TimeSeries.prototype.seriesBetweenPoints): Added.

* public/v2/index.html: Use Metric.fullName since the same value is needed in the analysis task page. Also added
a button to create an analysis task, and made bugs pane button always enabled since we can an analysis task even
when multiple points are selected. Finally, added a new template for the analysis task page.

* public/v2/manifest.js:
(App.Metric.fullName): Added to share code between the charts page and the analysis task page.
(App.Manifest.fetchRunsWithPlatformAndMetric): Extracted from App.Pane._fetch to be reused in
App.AnalysisTaskViewModel._taskUpdated.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix typos in r175768.

* public/v2/app.js:
(App.AnalysisTaskViewModel.roots):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175769 268f45cc-cd09-0410-ab3c-d52691b4dbfc