IndexedDB: Cursor property value identities should be preserved
https://bugs.webkit.org/show_bug.cgi?id=100051

Reviewed by Tony Chang.

Source/WebCore:

Some W3C test submissions point out that subsequent accesses to cursor properties should
yield the same value until the cursor advances. We handled this with custom binding code for
IDBCursor.value but not IDBCursor.key or IDBCursor.primaryKey. The custom value code is
being removed in webkit.org/b/100034 in favor of returning ScriptValue and the same fix can
be applied to key/primaryKey.

Test: storage/indexeddb/cursor-properties.html

* Modules/indexeddb/IDBCursor.cpp: Compute/store/serve up ScriptValues instead of IDBKeys
(WebCore::IDBCursor::key):
(WebCore::IDBCursor::primaryKey):
(WebCore::IDBCursor::setValueReady):
* Modules/indexeddb/IDBCursor.h:
(IDBCursor):
(WebCore::IDBCursor::idbPrimaryKey): Expose this for callers that need access to the IDBKey
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBObjectStore.cpp: ... like this one.
(WebCore):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::dispatchEvent): Pass along script context, for the conversion.
* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::idbKeyToScriptValue): New method for explicit conversion.
(WebCore):
* bindings/v8/IDBBindingUtilities.h:
(WebCore):

LayoutTests:

Add tests to verify identity/read-only/mutability of cursor properties.

* storage/indexeddb/cursor-properties-expected.txt: Added.
* storage/indexeddb/cursor-properties.html: Added.
* storage/indexeddb/resources/cursor-properties.js: Added.
(test.request.onsuccess):
(test):
(onUpgradeNeeded):
(onOpenSuccess.request.onsuccess):
(onOpenSuccess):
(checkProperty):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132401 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a crash seen during the Inspector tests on the WebKit1 bots.

Reviewed by Filip Pizlo.

* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::bringToFront): Use the window from the WebView since m_windowController's window
is not the same when the Inspector is docked.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r132303 and r132312.
http://trac.webkit.org/changeset/132303
http://trac.webkit.org/changeset/132312
https://bugs.webkit.org/show_bug.cgi?id=100287

Triggering crashes on many popular websites (Requested by
leviw|gardening on #webkit).

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

Source/WebCore:

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectAtToken):
* css/CSSParser.h:
* css/CSSPropertySourceData.h:
* css/RuleSet.cpp:
(WebCore::RuleData::RuleData):
(WebCore::RuleSet::addRule):
(WebCore::RuleSet::addRegionRule):
(WebCore::RuleSet::addRulesFromSheet):
(WebCore::RuleSet::addStyleRule):
* css/RuleSet.h:
(RuleData):
(RuleSet):
* css/StyleResolver.cpp:
(WebCore::makeRuleSet):
(WebCore::StyleResolver::appendAuthorStyleSheets):
(WebCore::StyleResolver::matchScopedAuthorRules):
(WebCore::StyleResolver::locateSharedStyle):
* css/StyleResolver.h:
(StyleResolver):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::reportMemoryUsage):
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRuleBase::createCSSOMWrapper):
* css/StyleRule.h:
* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::reportMemoryUsage):
* css/StyleScopeResolver.h:
(WebCore):
(StyleScopeResolver):
* css/StyleSheetContents.cpp:
(WebCore::childRulesHaveFailedOrCanceledSubresources):

LayoutTests:

* fast/dom/shadow/athost-atrules-expected.txt: Removed.
* fast/dom/shadow/athost-atrules.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132403 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX:When aria-label is used, the text under an element is still appearing as the AXTitle
https://bugs.webkit.org/show_bug.cgi?id=98167

Reviewed by Beth Dakin.

Source/WebCore: 

According to WAI-ARIA text computation, the presence of aria-label and alternative text
should override the visible text within an element.

Test: platform/mac/accessibility/aria-label-overrides-visible-text.html

* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityTitle]):

LayoutTests: 

* platform/mac/accessibility/aria-label-overrides-visible-text-expected.txt: Added.
* platform/mac/accessibility/aria-label-overrides-visible-text.html: Added.
* platform/mac/accessibility/aria-labelledby-overrides-aria-label-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Get rid of Ewk_View private C API (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=100230

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-24
Reviewed by Kenneth Rohde Christiansen.

Remove part of the Ewk_View private C API and replace
it by C++ methods in EwkViewImpl class. Eventually,
all the private C functions will be removed but it
will be done in several patches.

* UIProcess/API/C/efl/WKView.cpp:
(WKViewGetPage):
* UIProcess/API/efl/EwkViewImpl.cpp:
(_ewk_view_commit):
(_ewk_view_preedit_changed):
(EwkViewImpl::EwkViewImpl):
(EwkViewImpl::smartData):
(EwkViewImpl::fromEvasObject):
(EwkViewImpl::wkPage):
(EwkViewImpl::setCursor):
(EwkViewImpl::redrawRegion):
(EwkViewImpl::informDownloadJobCancelled):
(EwkViewImpl::informDownloadJobFailed):
(EwkViewImpl::informDownloadJobFinished):
(EwkViewImpl::informDownloadJobRequested):
(EwkViewImpl::informNewFormSubmissionRequest):
(EwkViewImpl::enterFullScreen):
(EwkViewImpl::exitFullScreen):
(EwkViewImpl::setImageData):
(EwkViewImpl::informLoadError):
(EwkViewImpl::informLoadFinished):
(EwkViewImpl::informLoadProgress):
(EwkViewImpl::informProvisionalLoadFailed):
(EwkViewImpl::informLoadCommitted):
(EwkViewImpl::informProvisionalLoadRedirect):
(EwkViewImpl::informProvisionalLoadStarted):
(EwkViewImpl::informNavigationPolicyDecision):
(EwkViewImpl::informNewWindowPolicyDecision):
(EwkViewImpl::informResourceLoadStarted):
(EwkViewImpl::informResourceLoadResponse):
(EwkViewImpl::informResourceLoadFailed):
(EwkViewImpl::informResourceLoadFinished):
(EwkViewImpl::informResourceRequestSent):
(EwkViewImpl::informTitleChange):
(EwkViewImpl::informTooltipTextChange):
(EwkViewImpl::informTextFound):
(EwkViewImpl::size):
(EwkViewImpl::informIconChange):
(EwkViewImpl::informIntentRequest):
(EwkViewImpl::informIntentServiceRegistration):
(EwkViewImpl::createGLSurface):
(EwkViewImpl::enterAcceleratedCompositingMode):
(EwkViewImpl::exitAcceleratedCompositingMode):
(EwkViewImpl::requestColorPicker):
(EwkViewImpl::dismissColorPicker):
(EwkViewImpl::informBackForwardListChange):
* UIProcess/API/efl/EwkViewImpl.h:
(WebCore):
(EwkViewImpl):
(EwkViewImpl::view):
(EwkViewImpl::page):
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::viewImpl):
(WebKit):
(WebKit::PageClientImpl::createDrawingAreaProxy):
(WebKit::PageClientImpl::setViewNeedsDisplay):
(WebKit::PageClientImpl::viewSize):
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::processDidCrash):
(WebKit::PageClientImpl::didRelaunchProcess):
(WebKit::PageClientImpl::toolTipChanged):
(WebKit::PageClientImpl::setCursor):
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::enterAcceleratedCompositingMode):
(WebKit::PageClientImpl::exitAcceleratedCompositingMode):
(WebKit::PageClientImpl::updateTextInputState):
(WebKit::PageClientImpl::handleDownloadRequest):
(WebKit::PageClientImpl::didChangeContentsSize):
* UIProcess/API/efl/PageClientImpl.h:
(WebKit::PageClientImpl::create):
(PageClientImpl):
* UIProcess/API/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::PageViewportControllerClientEfl):
(WebKit::PageViewportControllerClientEfl::drawingArea):
(WebKit::PageViewportControllerClientEfl::updateViewportSize):
(WebKit::PageViewportControllerClientEfl::didChangeContentsSize):
(WebKit::PageViewportControllerClientEfl::didChangeVisibleContents):
* UIProcess/API/efl/PageViewportControllerClientEfl.h:
(WebKit::PageViewportControllerClientEfl::create):
(PageViewportControllerClientEfl):
* UIProcess/API/efl/ewk_download_job.cpp:
(Ewk_Download_Job::Ewk_Download_Job):
(Ewk_Download_Job::viewImpl):
* UIProcess/API/efl/ewk_download_job_private.h:
(Ewk_Download_Job::create):
(Ewk_Download_Job):
* UIProcess/API/efl/ewk_view.cpp:
(pageViewMap):
(addToPageViewMap):
(removeFromPageViewMap):
(_ewk_view_on_favicon_changed):
(_ewk_view_smart_focus_in):
(_ewk_view_smart_focus_out):
(mapToWebContent):
(_ewk_view_smart_mouse_wheel):
(_ewk_view_smart_mouse_down):
(_ewk_view_smart_mouse_up):
(_ewk_view_smart_mouse_move):
(_ewk_view_smart_key_down):
(_ewk_view_smart_key_up):
(_ewk_view_on_show):
(_ewk_view_on_hide):
(_ewk_view_impl_del):
(_ewk_view_smart_del):
(_ewk_view_smart_calculate):
(_ewk_view_smart_color_set):
(_ewk_view_initialize):
(_ewk_view_add_with_smart):
(ewk_view_context_get):
(ewk_view_url_update):
(ewk_view_url_set):
(ewk_view_url_get):
(ewk_view_icon_url_get):
(ewk_view_reload):
(ewk_view_reload_bypass_cache):
(ewk_view_stop):
(ewk_view_settings_get):
(ewk_view_title_get):
(ewk_view_text_input_state_update):
(ewk_view_load_progress_get):
(ewk_view_scale_set):
(ewk_view_scale_get):
(ewk_view_device_pixel_ratio_set):
(ewk_view_device_pixel_ratio_get):
(ewk_view_theme_set):
(ewk_view_theme_get):
(ewk_view_back):
(ewk_view_forward):
(ewk_view_intent_deliver):
(ewk_view_back_possible):
(ewk_view_forward_possible):
(ewk_view_back_forward_list_get):
(ewk_view_html_string_load):
(ewk_view_setting_encoding_custom_get):
(ewk_view_setting_encoding_custom_set):
(ewk_view_page_create):
(ewk_view_text_find):
(ewk_view_text_find_highlight_clear):
(ewk_view_text_matches_count):
(ewk_view_contents_size_changed):
(ewk_view_popup_menu_request):
(ewk_view_popup_menu_close):
(ewk_view_popup_menu_select):
(ewk_view_mouse_events_enabled_set):
(ewk_view_mouse_events_enabled_get):
(ewk_view_webprocess_crashed):
(ewk_view_color_picker_color_set):
(ewk_view_feed_touch_event):
(ewk_view_touch_events_enabled_set):
(ewk_view_touch_events_enabled_get):
(ewk_view_inspector_show):
(ewk_view_inspector_close):
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::incorporateUpdate):
* UIProcess/efl/DownloadManagerEfl.cpp:
(WebKit::DownloadManagerEfl::decideDestinationWithSuggestedFilename):
(WebKit::DownloadManagerEfl::didFail):
(WebKit::DownloadManagerEfl::didCancel):
(WebKit::DownloadManagerEfl::didFinish):
(WebKit::DownloadManagerEfl::registerDownload):
* UIProcess/efl/DownloadManagerEfl.h:
(DownloadManagerEfl):
* UIProcess/efl/FindClientEfl.cpp:
(WebKit::FindClientEfl::didFindString):
(WebKit::FindClientEfl::didFailToFindString):
(WebKit::FindClientEfl::FindClientEfl):
* UIProcess/efl/FindClientEfl.h:
(WebKit::FindClientEfl::create):
(FindClientEfl):
* UIProcess/efl/FormClientEfl.cpp:
(WebKit::FormClientEfl::willSubmitForm):
(WebKit::FormClientEfl::FormClientEfl):
* UIProcess/efl/FormClientEfl.h:
(WebKit::FormClientEfl::create):
(FormClientEfl):
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit::PageLoadClientEfl::didReceiveTitleForFrame):
(WebKit::PageLoadClientEfl::didReceiveIntentForFrame):
(WebKit::PageLoadClientEfl::registerIntentServiceForFrame):
(WebKit::PageLoadClientEfl::didChangeProgress):
(WebKit::PageLoadClientEfl::didFinishLoadForFrame):
(WebKit::PageLoadClientEfl::didFailLoadWithErrorForFrame):
(WebKit::PageLoadClientEfl::didStartProvisionalLoadForFrame):
(WebKit::PageLoadClientEfl::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame):
(WebKit::PageLoadClientEfl::didCommitLoadForFrame):
(WebKit::PageLoadClientEfl::didChangeBackForwardList):
(WebKit::PageLoadClientEfl::didSameDocumentNavigationForFrame):
(WebKit::PageLoadClientEfl::PageLoadClientEfl):
* UIProcess/efl/PageLoadClientEfl.h:
(WebKit::PageLoadClientEfl::create):
(PageLoadClientEfl):
(WebKit::PageLoadClientEfl::viewImpl):
* UIProcess/efl/PagePolicyClientEfl.cpp:
(WebKit::PagePolicyClientEfl::decidePolicyForNavigationAction):
(WebKit::PagePolicyClientEfl::decidePolicyForNewWindowAction):
(WebKit::PagePolicyClientEfl::PagePolicyClientEfl):
* UIProcess/efl/PagePolicyClientEfl.h:
(WebKit::PagePolicyClientEfl::create):
(PagePolicyClientEfl):
* UIProcess/efl/PageUIClientEfl.cpp:
(WebKit::PageUIClientEfl::closePage):
(WebKit::PageUIClientEfl::createNewPage):
(WebKit::PageUIClientEfl::runJavaScriptAlert):
(WebKit::PageUIClientEfl::runJavaScriptConfirm):
(WebKit::PageUIClientEfl::runJavaScriptPrompt):
(WebKit::PageUIClientEfl::showColorPicker):
(WebKit::PageUIClientEfl::hideColorPicker):
(WebKit::PageUIClientEfl::exceededDatabaseQuota):
(WebKit::PageUIClientEfl::focus):
(WebKit::PageUIClientEfl::unfocus):
(WebKit::PageUIClientEfl::takeFocus):
(WebKit::PageUIClientEfl::getWindowFrame):
(WebKit::PageUIClientEfl::setWindowFrame):
(WebKit::PageUIClientEfl::PageUIClientEfl):
* UIProcess/efl/PageUIClientEfl.h:
(WebKit::PageUIClientEfl::create):
(PageUIClientEfl):
* UIProcess/efl/ResourceLoadClientEfl.cpp:
(WebKit::ResourceLoadClientEfl::didInitiateLoadForResource):
(WebKit::ResourceLoadClientEfl::didSendRequestForResource):
(WebKit::ResourceLoadClientEfl::didReceiveResponseForResource):
(WebKit::ResourceLoadClientEfl::didFinishLoadForResource):
(WebKit::ResourceLoadClientEfl::didFailLoadForResource):
(WebKit::ResourceLoadClientEfl::ResourceLoadClientEfl):
(WebKit::ResourceLoadClientEfl::~ResourceLoadClientEfl):
* UIProcess/efl/ResourceLoadClientEfl.h:
(WebKit::ResourceLoadClientEfl::create):
(ResourceLoadClientEfl):
* UIProcess/efl/WebFullScreenManagerProxyEfl.cpp:
(WebKit::WebFullScreenManagerProxy::enterFullScreen):
(WebKit::WebFullScreenManagerProxy::exitFullScreen):
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::viewWidget):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Handle two-finger tap gestures in the same way as long-press gestures
https://bugs.webkit.org/show_bug.cgi?id=99947

Reviewed by Adam Barth.

Source/WebCore:

Currently a long-press gesture is used to dispatch a context menu (for platforms
defining CONTEXT_MENUS) or to select text (for Android). Additionally, for platforms
defining TOUCH_ADJUSTMENT, gesture target fuzzing is performed on the location and
touch area of the long-press gesture.

This CL will cause two-finger tap gestures to be handled in the same way as long-press
gestures. The location and touch area of a two-finger tap gesture will correspond to
the location and touch area of the first finger down; the location/area of the second
finger will be ignored.

Test: touchadjustment/touch-links-two-finger-tap.html

* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureLongPress):
(WebCore):
(WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
(WebCore::EventHandler::handleGestureTwoFingerTap):
(WebCore::EventHandler::adjustGesturePosition):
* page/EventHandler.h:
(EventHandler):

Source/WebKit/chromium:

Set the area of a two-finger tap gesture to be the area of the enclosing
rectangle for the first finger down.

* src/WebInputEventConversion.cpp:
(WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):

LayoutTests:

New layout test for dispatching context menus on a two-finger tap
gesture when touch adjustment is enabled.

* touchadjustment/touch-links-two-finger-tap-expected.txt: Added.
* touchadjustment/touch-links-two-finger-tap.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Marking 2 more mathml tests as flaky crashers on debug.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Marking the software compositing version of
compositing/tiling/backface-preserve-3d-tiled.html as failing as well.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Null-check the RenderView in ocument::windowScreenDidChange to fix a crash when saving PDFs
https://bugs.webkit.org/show_bug.cgi?id=100141
<rdar://problem/12559147>

Reviewed by Tim Horton.

For PDF documents the RenderView is null, so null-check it to avoid a crash
when saving PDFs.

* dom/Document.cpp:
(WebCore::Document::windowScreenDidChange):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: clean up references to Skipped files
https://bugs.webkit.org/show_bug.cgi?id=100045

Reviewed by Ojan Vafai.

Since they are no longer used or needed ...

* Scripts/webkitpy/layout_tests/port/apple.py:
(ApplePort._generate_all_test_configurations):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.skipped_layout_tests):
(Port.expectations_files):
(Port._wk2_port_name):
* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort):
* Scripts/webkitpy/layout_tests/port/mac_unittest.py:
(MacTest.test_default_timeout_ms):
* Scripts/webkitpy/layout_tests/port/port_testcase.py:
(test_expectations_files):
(test_expectations_files.platform_dirs):
* Scripts/webkitpy/layout_tests/port/qt.py:
(QtPort.__init__):

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