The storage manager should know the local storage directory
https://bugs.webkit.org/show_bug.cgi?id=114765

Reviewed by Beth Dakin.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::create):
(WebKit::StorageManager::setLocalStorageDirectory):
(WebKit::StorageManager::setLocalStorageDirectoryInternal):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::setLocalStorageDirectory):
* UIProcess/WebContext.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up spellcheck state when changing focus.
https://bugs.webkit.org/show_bug.cgi?id=114758

Patch by Nima Ghanavatian <nghanavatian@blackberry.com> on 2013-04-17
Reviewed by Rob Buis.

Internally reviewed by Mike Fenton and Gen Mak.

PR325941
If we lose focus while waiting for a spellcheck request to return, we will
never see the reply and continue to queue up future requests. By clearing
the queue we ensure that all requests being processed and waiting to fire
are valid.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::setElementUnfocused):
* WebKitSupport/SpellingHandler.cpp:
(BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in WebCore::HTMLMediaElement::~HTMLMediaElement.
https://bugs.webkit.org/show_bug.cgi?id=113531

Reviewed by Eric Carlson.

No new tests, though this is intermittently reproducible with
http/tests/misc/delete-frame-during-readystatechange.html under ASAN.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement): Clear the media player manually
    before the destructor exits. Clearing the media player may cancel a resource load,
    which can trigger a readystatechange event. It's possible for the HTMLMediaElement
    to attempt to fire an abort event within the readystatechange event, even though it is
    now in an inconsistent state. Clearling the media player before finishing the destructor
    ensures that the HTMLMediaElement will at least still be alive if this case is triggered.
    Set m_completelyLoaded to true to ensure that if userCancelledLoad() is called, it doesn't
    attempt to fire events while destructing.

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