Title: [115194] trunk
Revision
115194
Author
pfeld...@chromium.org
Date
2012-04-25 06:34:06 -0700 (Wed, 25 Apr 2012)

Log Message

Source/WebCore: Web Inspector: extract Linkifier from DebuggerPresentationModel.
https://bugs.webkit.org/show_bug.cgi?id=84855

Reviewed by Yury Semikhatsky.

There is nothing Linkifier needs from the model, extracting as a top-level class.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/ConsoleMessage.js:
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView):
* inspector/front-end/DebuggerPresentationModel.js:
* inspector/front-end/EventListenersSidebarPane.js:
* inspector/front-end/Linkifier.js: Added.
(WebInspector.LinkifierFormatter):
(WebInspector.LinkifierFormatter.prototype.formatLiveAnchor):
(WebInspector.Linkifier):
(WebInspector.Linkifier.prototype.linkifyLocation):
(WebInspector.Linkifier.prototype.linkifyRawLocation):
(WebInspector.Linkifier.prototype.reset):
(WebInspector.Linkifier.prototype._updateAnchor):
(WebInspector.Linkifier.DefaultFormatter):
(WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
* inspector/front-end/NetworkPanel.js:
* inspector/front-end/ObjectPopoverHelper.js:
(WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.):
(WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
* inspector/front-end/ProfileView.js:
* inspector/front-end/ScriptsSearchScope.js:
(WebInspector.ScriptsSearchResultsPane):
* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:

Source/WebKit2: [Qt] Make the web view's url property follow the active url

https://bugs.webkit.org/show_bug.cgi?id=77554

The url property of the webview now reflects the 'active' url of the
page, which maps to either the currently loading url, in the case of
an ongoing load, or the result of a load, even when the load failed.

In practice this means that setting the url though QML, or navigating
to a new url in the page by e.g clicking, will both instantly change
the url-property of the webview to the target url. This differs from
earlier behavior, where we would update the url when the load
committed.

An optional argument is added to loadHtml(), to allow setting
the unreachable url when providing replacement content for failed
loads.

A slight change in the activeUrl() implementation is also done,
where we now favour the url of an pending API request, even when
we don't have a mainframe yet.

Finally, the location bar in the minibrowser is updated to behave
a bit more like normal browsers in terms of when the url will change
and how active focus is handled.

Patch by Tor Arne Vestbø <tor.arne.ves...@nokia.com> on 2012-04-18
Reviewed by Simon Hausmann.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::onComponentComplete):
(QQuickWebView::reload):
(QQuickWebView::url):
(QQuickWebView::setUrl):
(QQuickWebView::loadHtml):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/WebView.pro:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
* UIProcess/API/qt/tests/qmltests/common/link.html: Added.
* UIProcess/API/qt/tests/qmltests/common/redirect.html: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::activeURL):
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::QtWebPageLoadClient):
(QtWebPageLoadClient::didStartProvisionalLoadForFrame):
(QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(QtWebPageLoadClient::didCommitLoadForFrame):
(QtWebPageLoadClient::dispatchLoadFailed):
(QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
(QtWebPageLoadClient::didFailLoadWithErrorForFrame):
* UIProcess/qt/QtWebPageLoadClient.h:
(QtWebPageLoadClient):

LayoutTests: Web Inspector: extract Linkifier from DebuggerPresentationModel.
https://bugs.webkit.org/show_bug.cgi?id=84855

Reviewed by Yury Semikhatsky.

* inspector/debugger/linkifier.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (115193 => 115194)


--- trunk/LayoutTests/ChangeLog	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/LayoutTests/ChangeLog	2012-04-25 13:34:06 UTC (rev 115194)
@@ -1,5 +1,14 @@
 2012-04-25  Pavel Feldman  <pfeld...@chromium.org>
 
+        Web Inspector: extract Linkifier from DebuggerPresentationModel.
+        https://bugs.webkit.org/show_bug.cgi?id=84855
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/debugger/linkifier.html:
+
+2012-04-25  Pavel Feldman  <pfeld...@chromium.org>
+
         Web Inspector: move sourcemap-agnostic part of the debugger presentation model into the raw debugger.
         https://bugs.webkit.org/show_bug.cgi?id=84852
 

Modified: trunk/LayoutTests/inspector/debugger/linkifier.html (115193 => 115194)


--- trunk/LayoutTests/inspector/debugger/linkifier.html	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/LayoutTests/inspector/debugger/linkifier.html	2012-04-25 13:34:06 UTC (rev 115194)
@@ -33,7 +33,7 @@
 
     function debuggerTest()
     {
-        linkifier = WebInspector.debuggerPresentationModel.createLinkifier();
+        linkifier = new WebInspector.Linkifier();
 
         var count1 = liveLocationsCount();
         link = linkifier.linkifyLocation(WebInspector.inspectedPageURL, 20, 0, "dummy-class");

Modified: trunk/Source/WebCore/ChangeLog (115193 => 115194)


--- trunk/Source/WebCore/ChangeLog	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/ChangeLog	2012-04-25 13:34:06 UTC (rev 115194)
@@ -1,5 +1,44 @@
 2012-04-25  Pavel Feldman  <pfeld...@chromium.org>
 
+        Web Inspector: extract Linkifier from DebuggerPresentationModel.
+        https://bugs.webkit.org/show_bug.cgi?id=84855
+
+        Reviewed by Yury Semikhatsky.
+
+        There is nothing Linkifier needs from the model, extracting as a top-level class.
+
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * inspector/compile-front-end.py:
+        * inspector/front-end/ConsoleMessage.js:
+        * inspector/front-end/ConsoleView.js:
+        (WebInspector.ConsoleView):
+        * inspector/front-end/DebuggerPresentationModel.js:
+        * inspector/front-end/EventListenersSidebarPane.js:
+        * inspector/front-end/Linkifier.js: Added.
+        (WebInspector.LinkifierFormatter):
+        (WebInspector.LinkifierFormatter.prototype.formatLiveAnchor):
+        (WebInspector.Linkifier):
+        (WebInspector.Linkifier.prototype.linkifyLocation):
+        (WebInspector.Linkifier.prototype.linkifyRawLocation):
+        (WebInspector.Linkifier.prototype.reset):
+        (WebInspector.Linkifier.prototype._updateAnchor):
+        (WebInspector.Linkifier.DefaultFormatter):
+        (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
+        * inspector/front-end/NetworkPanel.js:
+        * inspector/front-end/ObjectPopoverHelper.js:
+        (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.):
+        (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
+        * inspector/front-end/ProfileView.js:
+        * inspector/front-end/ScriptsSearchScope.js:
+        (WebInspector.ScriptsSearchResultsPane):
+        * inspector/front-end/TimelinePresentationModel.js:
+        (WebInspector.TimelinePresentationModel):
+        * inspector/front-end/WebKit.qrc:
+        * inspector/front-end/inspector.html:
+
+2012-04-25  Pavel Feldman  <pfeld...@chromium.org>
+
         Web Inspector: move sourcemap-agnostic part of the debugger presentation model into the raw debugger.
         https://bugs.webkit.org/show_bug.cgi?id=84852
 

Modified: trunk/Source/WebCore/WebCore.gypi (115193 => 115194)


--- trunk/Source/WebCore/WebCore.gypi	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/WebCore.gypi	2012-04-25 13:34:06 UTC (rev 115194)
@@ -6369,6 +6369,7 @@
             'inspector/front-end/_javascript_Source.js',
             'inspector/front-end/_javascript_SourceFrame.js',
             'inspector/front-end/KeyboardShortcut.js',
+            'inspector/front-end/Linkifier.js',
             'inspector/front-end/MemoryStatistics.js',
             'inspector/front-end/MetricsSidebarPane.js',
             'inspector/front-end/NavigatorOverlayController.js',

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (115193 => 115194)


--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-04-25 13:34:06 UTC (rev 115194)
@@ -74137,6 +74137,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\inspector\front-end\Linkifier.js"
+					>
+				</File>
+				<File
 					RelativePath="..\inspector\front-end\MetricsSidebarPane.js"
 					>
 				</File>

Modified: trunk/Source/WebCore/inspector/compile-front-end.py (115193 => 115194)


--- trunk/Source/WebCore/inspector/compile-front-end.py	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/compile-front-end.py	2012-04-25 13:34:06 UTC (rev 115194)
@@ -76,6 +76,7 @@
             "DebuggerPresentationModel.js",
             "HAREntry.js",
             "IndexedDBModel.js",
+            "Linkifier.js",
             "NetworkLog.js",
             "Placard.js",
             "Script.js",

Modified: trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js	2012-04-25 13:34:06 UTC (rev 115194)
@@ -35,7 +35,7 @@
  * @param {string} source
  * @param {string} level
  * @param {string} message
- * @param {WebInspector.DebuggerPresentationModel.Linkifier} linkifier
+ * @param {WebInspector.Linkifier} linkifier
  * @param {string=} type
  * @param {string=} url
  * @param {number=} line

Modified: trunk/Source/WebCore/inspector/front-end/ConsoleView.js (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/ConsoleView.js	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleView.js	2012-04-25 13:34:06 UTC (rev 115194)
@@ -109,7 +109,7 @@
     WebInspector.console.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, this._consoleMessageAdded, this);
     WebInspector.console.addEventListener(WebInspector.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, this);
 
-    this._linkifier = WebInspector.debuggerPresentationModel.createLinkifier();
+    this._linkifier = new WebInspector.Linkifier();
 
     this.prompt = new WebInspector.TextPromptWithHistory(this.completionsForTextPrompt.bind(this), ExpressionStopCharacters + ".");
     this.prompt.setSuggestBoxEnabled("generic-suggest");
@@ -776,7 +776,7 @@
 /**
  * @extends {WebInspector.ConsoleMessageImpl}
  * @constructor
- * @param {WebInspector.DebuggerPresentationModel.Linkifier} linkifier
+ * @param {WebInspector.Linkifier} linkifier
  */
 WebInspector.ConsoleCommandResult = function(result, wasThrown, originatingCommand, linkifier)
 {

Modified: trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js	2012-04-25 13:34:06 UTC (rev 115194)
@@ -69,14 +69,6 @@
     },
 
     /**
-     * @param {WebInspector.DebuggerPresentationModel.LinkifierFormatter=} formatter
-     */
-    createLinkifier: function(formatter)
-    {
-        return new WebInspector.DebuggerPresentationModel.Linkifier(this, formatter);
-    },
-
-    /**
      * @param {DebuggerAgent.Location} rawLocation
      * @return {?WebInspector.UILocation}
      */
@@ -413,111 +405,6 @@
 WebInspector.DebuggerPresentationModelResourceBinding.prototype.__proto__ = WebInspector.ResourceDomainModelBinding.prototype;
 
 /**
- * @interface
- */
-WebInspector.DebuggerPresentationModel.LinkifierFormatter = function()
-{
-}
-
-WebInspector.DebuggerPresentationModel.LinkifierFormatter.prototype = {
-    /**
-     * @param {Element} anchor
-     * @param {WebInspector.UILocation} uiLocation
-     */
-    formatLiveAnchor: function(anchor, uiLocation) { },
-}
-
-/**
- * @constructor
- * @implements {WebInspector.DebuggerPresentationModel.LinkifierFormatter}
- * @param {number=} maxLength
- */
-WebInspector.DebuggerPresentationModel.DefaultLinkifierFormatter = function(maxLength)
-{
-    this._maxLength = maxLength;
-}
-
-WebInspector.DebuggerPresentationModel.DefaultLinkifierFormatter.prototype = {
-    /**
-     * @param {Element} anchor
-     * @param {WebInspector.UILocation} uiLocation
-     */
-    formatLiveAnchor: function(anchor, uiLocation)
-    {
-        anchor.textContent = WebInspector.formatLinkText(uiLocation.uiSourceCode.url, uiLocation.lineNumber);
-
-        var text = WebInspector.formatLinkText(uiLocation.uiSourceCode.url, uiLocation.lineNumber);
-        if (this._maxLength)
-            text = text.trimMiddle(this._maxLength);
-        anchor.textContent = text;
-    }
-}
-
-WebInspector.DebuggerPresentationModel.DefaultLinkifierFormatter.prototype.__proto__ = WebInspector.DebuggerPresentationModel.LinkifierFormatter.prototype;
-
-/**
- * @constructor
- * @param {WebInspector.DebuggerPresentationModel} model
- * @param {WebInspector.DebuggerPresentationModel.LinkifierFormatter=} formatter
- */
-WebInspector.DebuggerPresentationModel.Linkifier = function(model, formatter)
-{
-    this._model = model;
-    this._formatter = formatter || new WebInspector.DebuggerPresentationModel.DefaultLinkifierFormatter();
-    this._liveLocations = [];
-}
-
-WebInspector.DebuggerPresentationModel.Linkifier.prototype = {
-    /**
-     * @param {string} sourceURL
-     * @param {number} lineNumber
-     * @param {number=} columnNumber
-     * @param {string=} classes
-     */
-    linkifyLocation: function(sourceURL, lineNumber, columnNumber, classes)
-    {
-        var rawLocation = WebInspector.debuggerModel.createRawLocationByURL(sourceURL, lineNumber, columnNumber || 0);
-        if (!rawLocation)
-            return WebInspector.linkifyResourceAsNode(sourceURL, lineNumber, classes);
-        return this.linkifyRawLocation(rawLocation, classes);
-    },
-
-    /**
-     * @param {DebuggerAgent.Location} rawLocation
-     * @param {string=} classes
-     */
-    linkifyRawLocation: function(rawLocation, classes)
-    {
-        if (!WebInspector.debuggerModel.scriptForId(rawLocation.scriptId))
-            return null;
-        var anchor = WebInspector.linkifyURLAsNode("", "", classes, false);
-        var liveLocation = this._model.createLiveLocation(rawLocation, this._updateAnchor.bind(this, anchor));
-        this._liveLocations.push(liveLocation);
-        return anchor;
-    },
-
-    reset: function()
-    {
-        for (var i = 0; i < this._liveLocations.length; ++i)
-            this._liveLocations[i].dispose();
-        this._liveLocations = [];
-    },
-
-    /**
-     * @param {Element} anchor
-     * @param {WebInspector.UILocation} uiLocation
-     */
-    _updateAnchor: function(anchor, uiLocation)
-    {
-        anchor.preferredPanel = "scripts";
-        anchor.href = ""
-        anchor.uiSourceCode = uiLocation.uiSourceCode;
-        anchor.lineNumber = uiLocation.lineNumber;
-        this._formatter.formatLiveAnchor(anchor, uiLocation);
-    }
-}
-
-/**
  * @type {?WebInspector.DebuggerPresentationModel}
  */
 WebInspector.debuggerPresentationModel = null;

Modified: trunk/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js	2012-04-25 13:34:06 UTC (rev 115194)
@@ -61,7 +61,7 @@
 
     this.titleElement.appendChild(this.settingsSelectElement);
 
-    this._linkifier = WebInspector.debuggerPresentationModel.createLinkifier();
+    this._linkifier = new WebInspector.Linkifier();
 }
 
 WebInspector.EventListenersSidebarPane._objectGroupName = "event-listeners-sidebar-pane";

Added: trunk/Source/WebCore/inspector/front-end/Linkifier.js (0 => 115194)


--- trunk/Source/WebCore/inspector/front-end/Linkifier.js	                        (rev 0)
+++ trunk/Source/WebCore/inspector/front-end/Linkifier.js	2012-04-25 13:34:06 UTC (rev 115194)
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @interface
+ */
+WebInspector.LinkifierFormatter = function()
+{
+}
+
+WebInspector.LinkifierFormatter.prototype = {
+    /**
+     * @param {Element} anchor
+     * @param {WebInspector.UILocation} uiLocation
+     */
+    formatLiveAnchor: function(anchor, uiLocation) { }
+}
+
+/**
+ * @constructor
+ * @param {WebInspector.LinkifierFormatter=} formatter
+ */
+WebInspector.Linkifier = function(formatter)
+{
+    this._formatter = formatter || new WebInspector.Linkifier.DefaultFormatter();
+    this._liveLocations = [];
+}
+
+WebInspector.Linkifier.prototype = {
+    /**
+     * @param {string} sourceURL
+     * @param {number} lineNumber
+     * @param {number=} columnNumber
+     * @param {string=} classes
+     */
+    linkifyLocation: function(sourceURL, lineNumber, columnNumber, classes)
+    {
+        var rawLocation = WebInspector.debuggerModel.createRawLocationByURL(sourceURL, lineNumber, columnNumber || 0);
+        if (!rawLocation)
+            return WebInspector.linkifyResourceAsNode(sourceURL, lineNumber, classes);
+        return this.linkifyRawLocation(rawLocation, classes);
+    },
+
+    /**
+     * @param {DebuggerAgent.Location} rawLocation
+     * @param {string=} classes
+     */
+    linkifyRawLocation: function(rawLocation, classes)
+    {
+        var script = WebInspector.debuggerModel.scriptForId(rawLocation.scriptId);
+        if (!script)
+            return null;
+        var anchor = WebInspector.linkifyURLAsNode("", "", classes, false);
+        var liveLocation = script.createLiveLocation(rawLocation, this._updateAnchor.bind(this, anchor));
+        this._liveLocations.push(liveLocation);
+        return anchor;
+    },
+
+    reset: function()
+    {
+        for (var i = 0; i < this._liveLocations.length; ++i)
+            this._liveLocations[i].dispose();
+        this._liveLocations = [];
+    },
+
+    /**
+     * @param {Element} anchor
+     * @param {WebInspector.UILocation} uiLocation
+     */
+    _updateAnchor: function(anchor, uiLocation)
+    {
+        anchor.preferredPanel = "scripts";
+        anchor.href = ""
+        anchor.uiSourceCode = uiLocation.uiSourceCode;
+        anchor.lineNumber = uiLocation.lineNumber;
+        this._formatter.formatLiveAnchor(anchor, uiLocation);
+    }
+}
+
+/**
+ * @constructor
+ * @implements {WebInspector.LinkifierFormatter}
+ * @param {number=} maxLength
+ */
+WebInspector.Linkifier.DefaultFormatter = function(maxLength)
+{
+    this._maxLength = maxLength;
+}
+
+WebInspector.Linkifier.DefaultFormatter.prototype = {
+    /**
+     * @param {Element} anchor
+     * @param {WebInspector.UILocation} uiLocation
+     */
+    formatLiveAnchor: function(anchor, uiLocation)
+    {
+        anchor.textContent = WebInspector.formatLinkText(uiLocation.uiSourceCode.url, uiLocation.lineNumber);
+
+        var text = WebInspector.formatLinkText(uiLocation.uiSourceCode.url, uiLocation.lineNumber);
+        if (this._maxLength)
+            text = text.trimMiddle(this._maxLength);
+        anchor.textContent = text;
+    }
+}
+
+WebInspector.Linkifier.DefaultFormatter.prototype.__proto__ = WebInspector.LinkifierFormatter.prototype;
Property changes on: trunk/Source/WebCore/inspector/front-end/Linkifier.js
___________________________________________________________________

Added: svn:eol-style

Modified: trunk/Source/WebCore/inspector/front-end/NetworkPanel.js (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/NetworkPanel.js	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/NetworkPanel.js	2012-04-25 13:34:06 UTC (rev 115194)
@@ -53,7 +53,7 @@
 
     this._createStatusbarButtons();
     this._createFilterStatusBarItems();
-    this._linkifier = WebInspector.debuggerPresentationModel.createLinkifier();
+    this._linkifier = new WebInspector.Linkifier();
 
     WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestStarted, this._onRequestStarted, this);
     WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestUpdated, this._onRequestUpdated, this);

Modified: trunk/Source/WebCore/inspector/front-end/ObjectPopoverHelper.js (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/ObjectPopoverHelper.js	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/ObjectPopoverHelper.js	2012-04-25 13:34:06 UTC (rev 115194)
@@ -89,7 +89,7 @@
                         var functionName = title.createChild("span", "function-name");
                         functionName.textContent = response.name || response.inferredName || response.displayName || WebInspector.UIString("(anonymous function)");
 
-                        this._linkifier = WebInspector.debuggerPresentationModel.createLinkifier();
+                        this._linkifier = new WebInspector.Linkifier();
                         var link = this._linkifier.linkifyRawLocation(response.location, "function-location-link");
                         if (link)
                             title.appendChild(link);

Modified: trunk/Source/WebCore/inspector/front-end/ProfileView.js (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/ProfileView.js	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/ProfileView.js	2012-04-25 13:34:06 UTC (rev 115194)
@@ -100,7 +100,7 @@
         this._updatePercentButton();
     }
 
-    this._linkifier = WebInspector.debuggerPresentationModel.createLinkifier(new WebInspector.DebuggerPresentationModel.DefaultLinkifierFormatter(30));
+    this._linkifier = new WebInspector.Linkifier(new WebInspector.Linkifier.DefaultFormatter(30));
 
     ProfilerAgent.getProfile(this.profile.typeId, this.profile.uid, profileCallback.bind(this));
 }

Modified: trunk/Source/WebCore/inspector/front-end/ScriptsSearchScope.js (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/ScriptsSearchScope.js	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsSearchScope.js	2012-04-25 13:34:06 UTC (rev 115194)
@@ -133,7 +133,7 @@
 {
     WebInspector.FileBasedSearchResultsPane.call(this, searchConfig)
 
-    this._linkifier = WebInspector.debuggerPresentationModel.createLinkifier(new WebInspector.ScriptsSearchResultsPane.LinkifierFormatter());
+    this._linkifier = new WebInspector.Linkifier(new WebInspector.ScriptsSearchResultsPane.LinkifierFormatter());
 }
 
 WebInspector.ScriptsSearchResultsPane.prototype = {
@@ -166,7 +166,7 @@
 
 /**
  * @constructor
- * @implements {WebInspector.DebuggerPresentationModel.LinkifierFormatter}
+ * @implements {WebInspector.LinkifierFormatter}
  */
 WebInspector.ScriptsSearchResultsPane.LinkifierFormatter = function()
 {

Modified: trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js	2012-04-25 13:34:06 UTC (rev 115194)
@@ -34,7 +34,7 @@
  */
 WebInspector.TimelinePresentationModel = function()
 {
-    this._linkifier = WebInspector.debuggerPresentationModel.createLinkifier();
+    this._linkifier = new WebInspector.Linkifier();
     this._glueRecords = false;
     this._filters = [];
     this.reset();

Modified: trunk/Source/WebCore/inspector/front-end/WebKit.qrc (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/WebKit.qrc	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/WebKit.qrc	2012-04-25 13:34:06 UTC (rev 115194)
@@ -82,6 +82,7 @@
     <file>_javascript_Source.js</file>
     <file>_javascript_SourceFrame.js</file>
     <file>KeyboardShortcut.js</file>
+    <file>Linkifier.js</file>
     <file>MemoryStatistics.js</file>
     <file>MetricsSidebarPane.js</file>
     <file>NavigatorOverlayController.js</file>

Modified: trunk/Source/WebCore/inspector/front-end/inspector.html (115193 => 115194)


--- trunk/Source/WebCore/inspector/front-end/inspector.html	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebCore/inspector/front-end/inspector.html	2012-04-25 13:34:06 UTC (rev 115194)
@@ -177,6 +177,7 @@
     <script type="text/_javascript_" src=""
     <script type="text/_javascript_" src=""
     <script type="text/_javascript_" src=""
+    <script type="text/_javascript_" src=""
     <script type="text/_javascript_" src=""
     <script type="text/_javascript_" src=""
     <script type="text/_javascript_" src=""

Modified: trunk/Source/WebKit2/ChangeLog (115193 => 115194)


--- trunk/Source/WebKit2/ChangeLog	2012-04-25 13:32:19 UTC (rev 115193)
+++ trunk/Source/WebKit2/ChangeLog	2012-04-25 13:34:06 UTC (rev 115194)
@@ -1,3 +1,58 @@
+2012-04-18  Tor Arne Vestbø  <tor.arne.ves...@nokia.com>
+
+        [Qt] Make the web view's url property follow the active url
+
+        https://bugs.webkit.org/show_bug.cgi?id=77554
+
+        The url property of the webview now reflects the 'active' url of the
+        page, which maps to either the currently loading url, in the case of
+        an ongoing load, or the result of a load, even when the load failed.
+
+        In practice this means that setting the url though QML, or navigating
+        to a new url in the page by e.g clicking, will both instantly change
+        the url-property of the webview to the target url. This differs from
+        earlier behavior, where we would update the url when the load
+        committed.
+
+        An optional argument is added to loadHtml(), to allow setting
+        the unreachable url when providing replacement content for failed
+        loads.
+
+        A slight change in the activeUrl() implementation is also done,
+        where we now favour the url of an pending API request, even when
+        we don't have a mainframe yet.
+
+        Finally, the location bar in the minibrowser is updated to behave
+        a bit more like normal browsers in terms of when the url will change
+        and how active focus is handled.
+
+        Reviewed by Simon Hausmann.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewPrivate::onComponentComplete):
+        (QQuickWebView::reload):
+        (QQuickWebView::url):
+        (QQuickWebView::setUrl):
+        (QQuickWebView::loadHtml):
+        * UIProcess/API/qt/qquickwebview_p.h:
+        * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
+        * UIProcess/API/qt/tests/qmltests/WebView.pro:
+        * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
+        * UIProcess/API/qt/tests/qmltests/common/link.html: Added.
+        * UIProcess/API/qt/tests/qmltests/common/redirect.html: Added.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::activeURL):
+        * UIProcess/qt/QtWebPageLoadClient.cpp:
+        (QtWebPageLoadClient::QtWebPageLoadClient):
+        (QtWebPageLoadClient::didStartProvisionalLoadForFrame):
+        (QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame):
+        (QtWebPageLoadClient::didCommitLoadForFrame):
+        (QtWebPageLoadClient::dispatchLoadFailed):
+        (QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame):
+        (QtWebPageLoadClient::didFailLoadWithErrorForFrame):
+        * UIProcess/qt/QtWebPageLoadClient.h:
+        (QtWebPageLoadClient):
+
 2012-04-25  Allan Sandfeld Jensen  <allan.jen...@nokia.com>
 
         [Qt] Zoom back can overscroll document edges.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to