Web Inspector: Cookie info in Network Resources Cookies tab shows "Invalid Date"
https://bugs.webkit.org/show_bug.cgi?id=97471

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-09-25
Reviewed by Yury Semikhatsky.

The original implementation is trying to create a new Date object
using another Date object, which is invalid. Also, Date.toGMTString is
deprecated.

The fix replaces toGMTString with toUTCString and fixes cookie.expire
so it won't crash when an empty requestDate is passed in.

Following RFC 6265, Max-age attributes now take precedence over expiresi
attribute in CookieParser.

Manual testing on inspector to make sure the CookiesTable is properly generated.

* inspector/front-end/CookieParser.js:
(WebInspector.Cookie.prototype.expires):
* inspector/front-end/CookiesTable.js:
(WebInspector.CookiesTable.prototype._createGridNode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Don't use the C API internally in WebKitFindController
https://bugs.webkit.org/show_bug.cgi?id=96775

Reviewed by Gustavo Noronha Silva.

Using the C++ classes directly instead of the C API wrappers we
avoid a lot of toImpl/toAPI casts, string conversions and
allocations. The code is also a lot simpler and easier to read.

* UIProcess/API/gtk/WebKitFindController.cpp:
(getPage):
(webkitFindControllerConstructed):
(webKitFindControllerPerform):
(webkit_find_controller_search_next):
(webkit_find_controller_search_previous):
(webkit_find_controller_search_finish):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Reverting implementation for 407 error pages
https://bugs.webkit.org/show_bug.cgi?id=97455

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-09-25
Reviewed by Rob Buis.

Revert "[BlackBerry] Show custom error page when 407 is received"
This reverts commit f6fe97ec3f1841a151e4ebdde21f710a6185f9d6.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyStatusReceived):
(WebCore::NetworkJob::notifyAuthReceived):
(WebCore::NetworkJob::sendRequestWithCredentials):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Skip crashing test after r129479.

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix failing assertion when calling QWebSettings::setIconDatabasePath multiple times

Reviewed by Jocelyn Turcotte.

This happens in various auto-tests. We can implement this by closing the database before
opening it with the new path.

* Api/qwebsettings.cpp:
(QWebSettings::setIconDatabasePath):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Fix typo in accessing union field in a GdkEvent in a WebKit2 unit test
https://bugs.webkit.org/show_bug.cgi?id=97564

Patch by Simon Pena <spena@igalia.com> on 2012-09-25
Reviewed by Martin Robinson.

In the WebViewTest::moveMouseTo method, the wrong field in
a union was being accessed in a GdkEvent: instead of the button
field, we were supposed to act on the motion one. This patch
fixes the typo.

* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::mouseMoveTo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Abstract as much devicePixelRatio logic as possible behind PageViewportController
https://bugs.webkit.org/show_bug.cgi?id=97214

Patch by Jocelyn Turcotte <jocelyn.turcotte@digia.com> on 2012-09-25
Reviewed by Kenneth Rohde Christiansen.

Currently the client is required to multiply the scales it receives each bime by the
devicePixelRatio. This shouldn't be required since essentially, the only places that the
devicePixelRatio should be in use, is to adjust the layout size, multiply the base scale
and for scale constants.

Other related changes:
- Make sure that the controller and it's client are only exchanging effective scales
 (cssScale * devicePixelRatio)
- Remove members duplicating m_rawAttributes values
- Use a separate member for the minimum scale to fit the page, separate from the viewport arguments
- Make sure that the minimum scale to fit is adjusted if the contents size isn't
  updated after the viewport attributes changed
- Make the scale conversion functions private to discourage this logic from spreading in the client

* UIProcess/PageViewportController.cpp:
(WebKit::PageViewportController::PageViewportController):
(WebKit::PageViewportController::innerBoundedViewportScale):
(WebKit::PageViewportController::outerBoundedViewportScale):
(WebKit):
(WebKit::PageViewportController::devicePixelRatio):
(WebKit::PageViewportController::didChangeContentsSize):
(WebKit::PageViewportController::didChangeViewportAttributes):
(WebKit::PageViewportController::resumeContent):
(WebKit::PageViewportController::updateMinimumScaleToFit):
* UIProcess/PageViewportController.h:
(PageViewportController):
(WebKit::PageViewportController::minimumContentsScale):
(WebKit::PageViewportController::maximumContentsScale):
(WebKit::PageViewportController::currentContentsScale):
(WebKit::PageViewportController::fromViewportScale):
(WebKit::PageViewportController::toViewportScale):
* UIProcess/qt/PageViewportControllerClientQt.cpp:
(WebKit::PageViewportControllerClientQt::focusEditableArea):
(WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded):
(WebKit::PageViewportControllerClientQt::nearestValidVisibleContentsRect):
(WebKit::PageViewportControllerClientQt::setContentsRectToNearestValidBounds):
(WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Skip another test after r129479.

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add Undo / Redo method to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=97553

Patch by Simon Pena <spena@igalia.com> on 2012-09-25
Reviewed by Martin Robinson.

Add the macros for Undo / Redo support, and include them
in the documentation.

* UIProcess/API/gtk/WebKitEditingCommands.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] adding a page overlay causes endless update loop when accelerated compositing is used
https://bugs.webkit.org/show_bug.cgi?id=97466

Reviewed by James Robinson.

Do not update overlays in composite() -- doing so ultimately causes invalidation
of the view, hence another update and another call do composite(). Overlays should be
updated only when their content changes.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::composite):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening, skip test that has started showing some flakiness.

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening.

Use the right bug number related to
fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Make sure that desktop pages honour the devicePixelRatio
https://bugs.webkit.org/show_bug.cgi?id=97215

Patch by Jocelyn Turcotte <jocelyn.turcotte@digia.com> on 2012-09-25
Reviewed by Kenneth Rohde Christiansen.

The desktopWidth given to computeViewportAttributes is expected to be pixel-ratio adjusted already.
We need to make sure that the viewport size is divided by the pixel ratio to prevent
the equivalent of a 1.0 devicePixelRatio to be in effect once viewportSize.width() is larger
than layoutFallbackWidth.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unify the PageViewportController<->Client interface regarding positions
https://bugs.webkit.org/show_bug.cgi?id=97220

Patch by Jocelyn Turcotte <jocelyn.turcotte@digia.com> on 2012-09-25
Reviewed by Kenneth Rohde Christiansen.

- Make sure that css units are used for all position arguments
- Make sure that all positions represent the viewport relatively to the contents
  rather than the other way around
- Delay clamping the viewport to the contents size in the controller rather than in the client

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::updateViewportSize):
* UIProcess/PageViewportController.cpp:
(WebKit::PageViewportController::pageDidRequestScroll):
(WebKit::PageViewportController::didChangeViewportSize):
(WebKit::PageViewportController::didChangeContentsVisibility):
(WebKit::PageViewportController::syncVisibleContents):
(WebKit::PageViewportController::positionRangeForViewportAtScale):
* UIProcess/PageViewportController.h:
(PageViewportController):
* UIProcess/PageViewportControllerClient.h:
(PageViewportControllerClient):
* UIProcess/qt/PageViewportControllerClientQt.cpp:
(WebKit::PageViewportControllerClientQt::animateContentRectVisible):
(WebKit::PageViewportControllerClientQt::focusEditableArea):
(WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded):
(WebKit::PageViewportControllerClientQt::nearestValidVisibleContentsRect):
(WebKit::PageViewportControllerClientQt::setViewportPosition):
(WebKit::PageViewportControllerClientQt::updateViewportController):
* UIProcess/qt/PageViewportControllerClientQt.h:
(PageViewportControllerClientQt):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: yellow on-hover pop-up won't go if another pane asynchronously opens
https://bugs.webkit.org/show_bug.cgi?id=97120

Patch by mire <mbudaes@adobe.com> on 2012-09-25
Reviewed by Alexander Pavlov.

Add mouseout event listener to popover element so that the pop-up will go when moving to another panel.

No new tests.

* inspector/front-end/Popover.js:
(WebInspector.Popover.prototype.show):
(WebInspector.PopoverHelper.prototype._mouseOut):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Update getUserMedia to match the latest specification
https://bugs.webkit.org/show_bug.cgi?id=97540

Reviewed by Adam Barth.

Source/Platform:

* chromium/public/WebMediaConstraints.h:
(WebMediaConstraints):

Source/WebCore:

http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia
Navigator.getUserMedia is changed so that the audio and video members can either
be a bool or a constraints object.

Existing tests expanded to cover the new change.

* Modules/mediastream/MediaConstraintsImpl.cpp:
(WebCore::MediaConstraintsImpl::create):
(WebCore):
* Modules/mediastream/MediaConstraintsImpl.h:
(MediaConstraintsImpl):
* Modules/mediastream/NavigatorMediaStream.cpp:
(WebCore::NavigatorMediaStream::webkitGetUserMedia):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::parseOptions):
(WebCore):
(WebCore::UserMediaRequest::create):
(WebCore::UserMediaRequest::UserMediaRequest):
(WebCore::UserMediaRequest::audio):
(WebCore::UserMediaRequest::video):
(WebCore::UserMediaRequest::audioConstraints):
(WebCore::UserMediaRequest::videoConstraints):
* Modules/mediastream/UserMediaRequest.h:
(WebCore):
(UserMediaRequest):
* platform/chromium/support/WebMediaConstraints.cpp:
(WebKit::WebMediaConstraints::WebMediaConstraints):
(WebKit):

Source/WebKit/chromium:

http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia
Navigator.getUserMedia is changed so that the audio and video members can either
be a bool or a constraints object.

* public/WebUserMediaRequest.h:
(WebKit):
(WebUserMediaRequest):
* src/WebUserMediaRequest.cpp:
(WebKit::WebUserMediaRequest::audioConstraints):
(WebKit):
(WebKit::WebUserMediaRequest::videoConstraints):

Tools:

Adding mock support for the enhanced getUserMedia call.

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/chromium/MockConstraints.cpp: Copied from Source/WebCore/platform/chromium/support/WebMediaConstraints.cpp.
(MockConstraints):
(MockConstraints::isSupported):
(MockConstraints::isValid):
(MockConstraints::verify):
* DumpRenderTree/chromium/MockConstraints.h: Copied from Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h.
(WebKit):
(MockConstraints):
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(RTCSessionDescriptionRequestSuccededTask::RTCSessionDescriptionRequestSuccededTask):
(RTCSessionDescriptionRequestFailedTask::RTCSessionDescriptionRequestFailedTask):
(RTCVoidRequestTask::RTCVoidRequestTask):
(MockWebRTCPeerConnectionHandler::initialize):
* DumpRenderTree/chromium/WebUserMediaClientMock.cpp:
(UserMediaRequestTask):
(UserMediaRequestTask::UserMediaRequestTask):
(WebUserMediaClientMock::requestUserMedia):
* DumpRenderTree/chromium/WebUserMediaClientMock.h:
(WebUserMediaClientMock):
(WebUserMediaClientMock::taskList):
* DumpRenderTree/chromium/WebViewHost.h:
(WebKit):
(WebViewHost):

LayoutTests:

Expanding tests to cover the new getUserMedia behaviour.

* fast/mediastream/getusermedia-expected.txt:
* fast/mediastream/getusermedia.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
#undef some symbols before redefining them.
https://bugs.webkit.org/show_bug.cgi?id=97568.

Reviewed by Michael Saboff.

* wtf/Platform.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Removing failure expectations for a few passing reftests and reclassifying
one reftest as flaky.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
committers-autocomplete.js works only with WebKit based browsers
https://bugs.webkit.org/show_bug.cgi?id=66752

Patch by Peter Gal <galpeter@inf.u-szeged.hu> on 2012-09-25
Reviewed by Darin Adler.

Modified the code do only add event listeners to the given inputs,
and not to the full document.

* committers-autocomplete.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Android's build archives have grown from 38M to 102M in 11 days
https://bugs.webkit.org/show_bug.cgi?id=97336

Reviewed by Adam Barth.

Each WebKit target results in four APKs in the out/{Debug,Release}/ directory,
while we really only need one. Ignoring the unsigned APKs removes six from
the archive will make sure that we only archive a single APK per target,
bringing its size back to rougly 40 megabytes.

* BuildSlaveSupport/built-product-archive:
(archiveBuiltProduct):


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