[BlackBerry] Page Popup for Month is non-functional.
https://bugs.webkit.org/show_bug.cgi?id=96651

Patch by Jessica Cao <jecao@rim.com> on 2012-09-13
Reviewed by Rob Buis.

Hook up support for Month popup.

* WebCoreSupport/DatePickerClient.cpp:
(WebCore::DatePickerClient::generateHTML):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::openDatePopup):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] fast/forms/access-key-for-all-elements.html fails
https://bugs.webkit.org/show_bug.cgi?id=73917

Patch by Lauro Neto <lauro.neto@openbossa.org> on 2012-09-13
Reviewed by Simon Hausmann.

Access-key tests were failing due to hardcoded Mac OS X in the
Qt WK2 user agent string. This commit moves the WK1 implementation
to a shared one to be used by both versions.

Source/WebCore:

Adds the shared user agent implementation.

* Target.pri:
* platform/qt/UserAgentQt.cpp: Added.
(WebCore):
(WebCore::UserAgentQt::standardUserAgent):
* platform/qt/UserAgentQt.h: Added.
(WebCore):
(UserAgentQt):

Source/WebKit/qt:

Change QWebPage to use the shared user agent implementation.

* Api/qwebpage.cpp:
(QWebPage::userAgentForUrl):

Source/WebKit2:

Use the shared implementation instead of hardcoding the user agent.

* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit::WebPageProxy::standardUserAgent):

LayoutTests:

Unskip now passing tests.

* platform/qt-5.0-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] LayerTreeCoordinator should release unused UpdatedAtlases
https://bugs.webkit.org/show_bug.cgi?id=95072

Reviewed by Jocelyn Turcotte.

Release graphic buffers that haven't been used for a while in order to save memory.
This way we can give back memory to the system when no user interaction happens
after a period of time, for example when we are in the background.

* Shared/ShareableBitmap.h:
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::beginContentUpdate):
(WebKit):
(WebKit::LayerTreeCoordinator::scheduleReleaseInactiveAtlases):
(WebKit::LayerTreeCoordinator::releaseInactiveAtlasesTimerFired):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
* WebProcess/WebPage/UpdateAtlas.cpp:
(WebKit::UpdateAtlas::UpdateAtlas):
(WebKit::UpdateAtlas::didSwapBuffers):
Don't call buildLayoutIfNeeded here. It's enought to call it in beginPaintingOnAvailableBuffer
and this way we can track whether this atlas is used with m_areaAllocator.
(WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer):
* WebProcess/WebPage/UpdateAtlas.h:
(WebKit::UpdateAtlas::addTimeInactive):
(WebKit::UpdateAtlas::isInactive):
(WebKit::UpdateAtlas::isInUse):
(UpdateAtlas):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed prospective Qt/MSVC build fix.

* platform/qt/UserAgentQt.cpp:
(WebCore::UserAgentQt::standardUserAgent): Try to make the conversion from the 8-bit
String to a QLatin1String successful.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop shuttling PseudoId from StyleResolver to SelectorChecker.
https://bugs.webkit.org/show_bug.cgi?id=96431

Reviewed by Eric Seidel.

SelectorChecker retained extra state to store the PseudoId value of the element. It was sad, because we needed to explicitly maintain its integrity. Instead, we now just make it part of StyleResolver and feed to SelectorChecker as part of SelectorCheckingContext.

No new tests, refactoring only. Covered by existing tests.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::SelectorChecker): Removed state initializer.
(WebCore::SelectorChecker::checkSelector): Changed to look into context, rather than own member.
* css/SelectorChecker.h:
(WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): Added pseudoStyle as parameter.
(SelectorCheckingContext): Added pseudoStyle as member.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList): Changed to look at own member, rather than m_checker.
* css/StyleResolver.h:
(StyleResolver): Added new member.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another prospective Qt/Windows build fix: Add missing CString.h include.

* platform/qt/UserAgentQt.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Missing conditions in InRegionScrollerPrivate::canScrollRenderBox
https://bugs.webkit.org/show_bug.cgi?id=96660

Reviewed by Antonio Gomes.
Patch by Jacky Jiang <zhajiang@rim.com>

PR: 207884
According to RenderBox::canBeScrolledAndHasScrollableArea(), we should
bail out early in InRegionScrollerPrivate::canScrollRenderBox() if the
RenderBox's scroll height equals the client height and the scroll width
equals the client width. Otherwise, we will miss the conditions.

* Api/InRegionScroller.cpp:
(BlackBerry::WebKit::InRegionScrollerPrivate::canScrollRenderBox):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor paint overflow clipping
https://bugs.webkit.org/show_bug.cgi?id=96625

Patch by Sami Kyostila <skyostil@chromium.org> on 2012-09-13
Reviewed by Simon Fraser.

The same logic for applying overflow clipping based on the cached size of a
RenderBox has been duplicated to four different places. Consolidate them to a
single RenderBox utility function.

This is in preparation for https://bugs.webkit.org/show_bug.cgi?id=96087.

No new functionality; covered by existing tests.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::applyCachedClipAndScrollOffsetForRepaint):
(WebCore):
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint):
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Continue to send mouse move events to a non-scrollable page
even if they are not consumed.
PR #207024
https://bugs.webkit.org/show_bug.cgi?id=96655

Patch by Genevieve Mak <gmak@rim.com> on 2012-09-13
Reviewed by Antonio Gomes.

* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::isMainFrameScrollable):
(WebKit):
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add an SVG entry to the watchlist

Unreviewed config change.

* Scripts/webkitpy/common/config/watchlist:
- Created a new SVG watchlist label covering WebCore/svg and WebCore/rendering/svg
- Added myself and pdr as watchers


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed changes to watchlist.

- Add myself to BlackBerry bugs

* Scripts/webkitpy/common/config/watchlist:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Properties of IDBKeyRange should default to undefined
https://bugs.webkit.org/show_bug.cgi?id=96401

Reviewed by Adam Barth.

Source/WebCore:

Per the IndexedDB spec, properties of IDBKeyRange should be |undefined| if
not set (i.e. range.upper if created with lowerBound(), and vice versa), rather
than null.

Test: storage/indexeddb/keyrange.html

* bindings/v8/custom/V8IDBKeyCustom.cpp:
(WebCore::toV8): Since IDBKeyRange is the only place where possibly-null
keys are returned to script, change the JS value from null to undefined.
And call v8Undefined(). It's faster.
* bindings/js/custom/JSIDBKeyCustom.cpp:
(WebCore::toJS): Ditto.

LayoutTests:

Update test expectations.

* storage/indexeddb/keyrange-expected.txt:
* storage/indexeddb/resources/keyrange.js:
(checkLowerBoundKeyRange):
(checkUpperBoundKeyRange):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] alter fling animation parameters.
https://bugs.webkit.org/show_bug.cgi?id=96666

Reviewed by Adrienne Walker.

Adjusted configuration parameters for fling animation to have a longer
tail and more similarity between touchpad and touchscreen.

Covered by existing tests.

* platform/TouchFlingPlatformGestureCurve.cpp:
(WebCore::TouchFlingPlatformGestureCurve::createForTouchPad):
(WebCore::TouchFlingPlatformGestureCurve::createForTouchScreen):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, warning fix left over from r128456 (bug 96645)

Patch by Antonio Gomes <agomes@rim.com> on 2012-09-13

* Api/InRegionScroller.cpp:
(WebKit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Assertion reached on RenderThemeEFL when setting a theme to an invalid path
https://bugs.webkit.org/show_bug.cgi?id=96649

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-09-13
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Keep the consistence by restoring the reference to the old theme path
when the new one cannot be loaded.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::setThemePath):

Source/WebKit2:

Updated the alternative test theme file. It is basically
the default theme with extra padding on the button widget as
specified by the comments on the test case.

* UIProcess/API/efl/tests/resources/big_button_theme.edj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flexitem margins should be based on content width, not width
https://bugs.webkit.org/show_bug.cgi?id=96674

Reviewed by Ojan Vafai.

Source/WebCore:

Margins should be based on content width. Also remove some calls to
mainAxisContentExtent() when we can use contentLogicalWidth instead.

Tests: css3/flexbox/percent-margins.html has a new testcase.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild): Use contentLogicalWidth instead of
passing in the maximum value (only used in the width case).
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): Don't pass in mainAxisContentExtent.
(WebCore::RenderFlexibleBox::computeChildMarginValue): Use contentLogicalWidth and simplify the code.
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Remove unnecessary mainAxisContentExtent() call.
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): Remove unnecessary flexboxAvailableContentExtent.
(WebCore::RenderFlexibleBox::computeNextFlexLine): Remove unnecessary mainAxisContentExtent() call.
(WebCore::RenderFlexibleBox::resolveFlexibleLengths): Remove unnecessary mainAxisContentExtent() call.
* rendering/RenderFlexibleBox.h: Remove unnecessary params.

LayoutTests:

Add a test case where contentWidth != width.

* css3/flexbox/percent-margins-expected.txt:
* css3/flexbox/percent-margins.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-13

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Temporarily remove Android Builder (dbg) from garden-o-matic view
https://bugs.webkit.org/show_bug.cgi?id=96678

Reviewed by Dirk Pranke.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
(.):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Consolidate two-phase connection to avoid race conditions
https://bugs.webkit.org/show_bug.cgi?id=90411

Reviewed by Tony Chang.

Source/WebCore:

Previously, IDB connections were opened by having the front-end (1) call through to
a back-end open() method, eventually receive a success message with a back-end object
handle, and (2) call into the back-end object to register front-end callbacks. This left
the back-end's notion of an open connection in a limbo state between these two calls.
In multi-process ports, a crash of the front-end process could leave the back-end wedged
waiting for this second call (e.g. can't delete until all connections are closed).

Simplify this by having the front-end pass through the callbacks into the back-end
during the initial open() call, which eliminates the limbo state.

No new tests - no functional changes. Chromium port's webkit_unit_tests updated.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::create):
(WebCore::IDBDatabase::IDBDatabase): Db-callbacks is available at creation time.
(WebCore::IDBDatabase::~IDBDatabase):
* Modules/indexeddb/IDBDatabase.h:
(IDBDatabase):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create): Need to track db-callbacks as well.
(WebCore::IDBDatabaseBackendImpl::PendingOpenCall::databaseCallbacks):
(WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
(IDBDatabaseBackendImpl::PendingOpenCall):
(WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create): Ditto.
(WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::databaseCallbacks):
(WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall):
(IDBDatabaseBackendImpl::PendingOpenWithVersionCall):
(WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
(WebCore::IDBDatabaseBackendImpl::setVersion):
(WebCore::IDBDatabaseBackendImpl::connectionCount): Don't need to count limbo connections any more.
(WebCore::IDBDatabaseBackendImpl::processPendingCalls): Pass through db-callbacks.
(WebCore::IDBDatabaseBackendImpl::openConnection): No more limbo connections (yay!).
(WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction): Pass through db-callbacks.
(WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion): Ditto.
(WebCore::IDBDatabaseBackendImpl::deleteDatabase): Style.
(WebCore::IDBDatabaseBackendImpl::close): Resolve FIXME about connectionCount.
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
(IDBDatabaseBackendInterface):
* Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
(WebCore::IDBDatabaseCallbacksImpl::create):
(WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl):
(WebCore::IDBDatabaseCallbacksImpl::connect):
* Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
(IDBDatabaseCallbacksImpl):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open): Mint the db-callbacks here...
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::open): ...passed through to here...
* Modules/indexeddb/IDBFactoryBackendImpl.h:
(IDBFactoryBackendImpl):
* Modules/indexeddb/IDBFactoryBackendInterface.h:
(IDBFactoryBackendInterface):
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::create): ...all the way to here...
(WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
(WebCore::IDBOpenDBRequest::onUpgradeNeeded): ...and finally hooked up here.
(WebCore::IDBOpenDBRequest::onSuccess): (or here, if no upgrade needed).
* Modules/indexeddb/IDBOpenDBRequest.h:
(WebCore):
(IDBOpenDBRequest):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::onAbort): Tweak event/notification ordering; the
notifying the database that the transaction is finished may unblock closing,
which fires more events, and the delivery matters. Previously the close would
be blocked by the transaction which gave the desired order.
(WebCore::IDBTransaction::onComplete): Ditto.
* inspector/InspectorIndexedDBAgent.cpp: New hookup logic.
(WebCore):

Source/WebKit/chromium:

API plumbing for simplified single-phase connection opening, and tests updated
to exercise the new APIs.

* public/WebIDBDatabase.h:
(WebIDBDatabase): Just a FIXME to remove the old second-phase hookup API.
* public/WebIDBFactory.h:
(WebKit):
(WebIDBFactory):
(WebKit::WebIDBFactory::open): New overload that takes db-callbacks.
* src/IDBCallbacksProxy.cpp: The db-callbacks plumbing is needed earlier.
(WebKit::IDBCallbacksProxy::onSuccess):
(WebKit::IDBCallbacksProxy::onUpgradeNeeded):
(WebKit):
(WebKit::IDBCallbacksProxy::setDatabaseCallbacks): Needs to hold on to
the db-callbacks and hook it up when the onSuccess callback comes through.
* src/IDBCallbacksProxy.h:
(WebKit):
(IDBCallbacksProxy):
* src/IDBDatabaseBackendProxy.cpp:
* src/IDBDatabaseBackendProxy.h:
(IDBDatabaseBackendProxy):
* src/IDBFactoryBackendProxy.cpp:
(WebKit::IDBFactoryBackendProxy::open):
* src/IDBFactoryBackendProxy.h:
(IDBFactoryBackendProxy):
* src/WebIDBDatabaseImpl.cpp:
(WebKit::WebIDBDatabaseImpl::WebIDBDatabaseImpl):
(WebKit::WebIDBDatabaseImpl::close):
* src/WebIDBDatabaseImpl.h:
(WebIDBDatabaseImpl):
* src/WebIDBFactoryImpl.cpp:
(WebKit::WebIDBFactoryImpl::open):
* src/WebIDBFactoryImpl.h:
(WebIDBFactoryImpl):
* tests/IDBAbortOnCorruptTest.cpp:
(FakeIDBDatabaseCallbacks):
(WebCore::FakeIDBDatabaseCallbacks::create):
(WebCore::FakeIDBDatabaseCallbacks::~FakeIDBDatabaseCallbacks):
(WebCore::FakeIDBDatabaseCallbacks::FakeIDBDatabaseCallbacks):
(WebCore):
(WebCore::TEST): Updated connection sequence.
* tests/IDBDatabaseBackendTest.cpp: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r128453.
http://trac.webkit.org/changeset/128453
https://bugs.webkit.org/show_bug.cgi?id=96681

Having tests use the same appcache directory leads to timeouts
(Requested by zdobersek on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-13

Source/WebKit/gtk: 

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::clearMemoryCache):
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Tools: 

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(runTest):
* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort.setup_environ_for_server):


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