summaryrefslogtreecommitdiff
path: root/Source/WebCore/inspector
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-26 10:42:44 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-26 10:42:44 +0200
commit33b26980cb24288b5a9f2590ccf32a949281bb79 (patch)
treecc0203dac37338b24b0b25a4694c0b76d4e4164b /Source/WebCore/inspector
parent715be629d51174233403237bfc563cf150087dc8 (diff)
downloadqtwebkit-33b26980cb24288b5a9f2590ccf32a949281bb79.tar.gz
Imported WebKit commit c596dd7f03007fa7ed896b928106497e8784b3b5 (http://svn.webkit.org/repository/webkit/trunk@129610)
New snapshot that removes QtQuick1 support (to be moved into QtQuick1 module)
Diffstat (limited to 'Source/WebCore/inspector')
-rw-r--r--Source/WebCore/inspector/front-end/CookieParser.js12
-rw-r--r--Source/WebCore/inspector/front-end/CookiesTable.js2
-rw-r--r--Source/WebCore/inspector/front-end/Popover.js10
3 files changed, 19 insertions, 5 deletions
diff --git a/Source/WebCore/inspector/front-end/CookieParser.js b/Source/WebCore/inspector/front-end/CookieParser.js
index ebb31bbf9..b61937710 100644
--- a/Source/WebCore/inspector/front-end/CookieParser.js
+++ b/Source/WebCore/inspector/front-end/CookieParser.js
@@ -255,8 +255,16 @@ WebInspector.Cookie.prototype = {
*/
expires: function(requestDate)
{
- return this._attributes["expires"] ? new Date(this._attributes["expires"]) :
- (this._attributes["max-age"] ? new Date(requestDate.getTime() + 1000 * this._attributes["max-age"]) : null);
+ // RFC 6265 indicates that the max-age attribute takes precedence over the expires attribute
+ if (this._attributes["max-age"]) {
+ var targetDate = requestDate === null ? new Date() : requestDate;
+ return new Date(targetDate.getTime() + 1000 * this._attributes["max-age"]);
+ }
+
+ if (this._attributes["expires"])
+ return new Date(this._attributes["expires"]);
+
+ return null;
},
/**
diff --git a/Source/WebCore/inspector/front-end/CookiesTable.js b/Source/WebCore/inspector/front-end/CookiesTable.js
index dfcfa0e5b..881e9e668 100644
--- a/Source/WebCore/inspector/front-end/CookiesTable.js
+++ b/Source/WebCore/inspector/front-end/CookiesTable.js
@@ -202,7 +202,7 @@ WebInspector.CookiesTable.prototype = {
data[2] = cookie.domain || "";
data[3] = cookie.path || "";
data[4] = cookie.type === WebInspector.Cookie.Type.Request ? "" :
- (cookie.session ? WebInspector.UIString("Session") : new Date(cookie.expires).toGMTString());
+ (cookie.session ? WebInspector.UIString("Session") : cookie.expires().toUTCString());
data[5] = cookie.size;
const checkmark = "\u2713";
data[6] = (cookie.httpOnly ? checkmark : "");
diff --git a/Source/WebCore/inspector/front-end/Popover.js b/Source/WebCore/inspector/front-end/Popover.js
index 5dfb33fe4..ce1e10a53 100644
--- a/Source/WebCore/inspector/front-end/Popover.js
+++ b/Source/WebCore/inspector/front-end/Popover.js
@@ -74,8 +74,10 @@ WebInspector.Popover.prototype = {
document.body.appendChild(this.element);
this._positionElement(anchor, preferredWidth, preferredHeight);
this._visible = true;
- if (this._popoverHelper)
+ if (this._popoverHelper) {
contentElement.addEventListener("mousemove", this._popoverHelper._killHidePopoverTimer.bind(this._popoverHelper), true);
+ this.element.addEventListener("mouseout", this._popoverHelper._mouseOut.bind(this._popoverHelper), true);
+ }
},
hide: function()
@@ -237,7 +239,11 @@ WebInspector.PopoverHelper.prototype = {
_mouseOut: function(event)
{
- if (event.target === this._hoverElement)
+ // isPopoverMouseOut - check the mouse is out of the popover window
+ var isPopoverMouseOut = this.isPopoverVisible()
+ && event.relatedTarget
+ && !event.relatedTarget.isSelfOrDescendant(this._popover._contentDiv);
+ if (event.target === this._hoverElement || isPopoverMouseOut)
this._startHidePopoverTimer();
},