[WK2] Use per destination ID message receivers for DownloadProxy.
https://bugs.webkit.org/show_bug.cgi?id=100342

Patch by Byungwoo Lee <bw80.lee@samsung.com> on 2012-10-25
Reviewed by Anders Carlsson.

Per destination ID message receivers were proposed in r132386.
IPC messages of DownloadProxy use download ID for destination ID,
so the messages should be handled by the messsage receiver that was
newly proposed.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::createDownloadProxy):
(WebKit::WebContext::downloadFinished):
(WebKit::WebContext::addMessageReceiver):
(WebKit):
(WebKit::WebContext::removeMessageReceiver):
* UIProcess/WebContext.h:
(WebContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r132514.
http://trac.webkit.org/changeset/132514
https://bugs.webkit.org/show_bug.cgi?id=100440

"Broke chromium content_browsertests AccessibilityAriaMenu
AccessibilityInputRange AccessibilityListMarkers" (Requested
by scheib on #webkit).

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

Source/WebCore:

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):
(WebCore::AXObjectCache::contentChanged):
(WebCore::AXObjectCache::childrenChanged):
(WebCore::AXObjectCache::handleAriaRoleChanged):
* accessibility/AXObjectCache.h:
(AXObjectCache):
(WebCore::AXObjectCache::contentChanged):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::AccessibilityObject):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::contentChanged):
(AccessibilityObject):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
(WebCore::AccessibilityRenderObject::contentChanged):
* accessibility/AccessibilityRenderObject.h:
(AccessibilityRenderObject):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::isAttachment):
(WebCore::AccessibilityScrollView::widgetForAttachmentView):
(WebCore::AccessibilityScrollView::updateScrollbars):
(WebCore::AccessibilityScrollView::webAreaObject):
(WebCore::AccessibilityScrollView::elementRect):
(WebCore::AccessibilityScrollView::documentFrameView):
(WebCore::AccessibilityScrollView::parentObject):
(WebCore::AccessibilityScrollView::parentObjectIfExists):
(WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable):
(WebCore::AccessibilityScrollView::scrollTo):
* accessibility/AccessibilityScrollView.h:
(WebCore::AccessibilityScrollView::scrollView):
(AccessibilityScrollView):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* accessibility/chromium/AXObjectCacheChromium.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::deleteLineBoxTree):
(WebCore::RenderBlock::createAndAppendRootInlineBox):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::styleWillChange):
* rendering/RenderText.cpp:
(WebCore::RenderText::setText):

Source/WebKit/chromium:

* public/WebAccessibilityNotification.h:
* src/AssertMatchingEnums.cpp:

Tools:

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::postAccessibilityNotification):

LayoutTests:

* accessibility/aria-checkbox-sends-notification.html:
* accessibility/notification-listeners.html:
* fast/forms/date-multiple-fields/date-multiple-fields-ax-value-changed-notification-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-ax-value-changed-notification-expected.txt:
* platform/chromium/accessibility/add-to-menu-list-crashes-expected.txt:
* platform/chromium/accessibility/add-to-menu-list-crashes.html:
* platform/chromium/accessibility/is-ignored-change-sends-notification-expected.txt: Removed.
* platform/chromium/accessibility/is-ignored-change-sends-notification.html: Removed.
* platform/chromium/accessibility/other-aria-attribute-change-sends-notification-expected.txt: Removed.
* platform/chromium/accessibility/other-aria-attribute-change-sends-notification.html: Removed.
* platform/chromium/accessibility/text-change-notification-expected.txt: Removed.
* platform/chromium/accessibility/text-change-notification.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove feed and feeds URL scheme workarounds
https://bugs.webkit.org/show_bug.cgi?id=100442

Reviewed by Dan Bernstein.

* dom/DocumentEventQueue.cpp:
(WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):

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

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] remove remaining usages of webkit_support from the TestRunner library
https://bugs.webkit.org/show_bug.cgi?id=100344

Reviewed by Adam Barth.

The most important part is to not rely on calling out to gdk/X11 to
translate keycodes to hardware keycodes, as this is not possible inside
the sandbox.

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/chromium/DRTTestRunner.h:
(WebKit):
(webkit_support):
* DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
(WebTestDelegate):
* DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
* DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
(WebTestRunner):
(WebTestRunner::EventSender::doDragDrop):
(WebTestRunner::EventSender::updateClickCountForButton):
(WebTestRunner::EventSender::mouseDown):
(WebTestRunner::EventSender::mouseUp):
(WebTestRunner::EventSender::mouseMoveTo):
(WebTestRunner::EventSender::keyDown):
(WebTestRunner::EventSender::replaySavedEvents):
(WebTestRunner::EventSender::contextClick):
(WebTestRunner::EventSender::beginDragWithFiles):
(WebTestRunner::EventSender::sendCurrentTouchEvent):
(WebTestRunner::EventSender::handleMouseWheel):
(WebTestRunner::EventSender::gestureEvent):
(WebTestRunner::EventSender::gestureFlingCancel):
(WebTestRunner::EventSender::gestureFlingStart):
* DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Added.
(WebTestRunner):
(WebTestRunner::NativeKeyCodeForWindowsKeyCode):
* DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h.
(WebTestRunner):
* DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
(TestDelegate):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
* DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
(WebTestInterfaces::Internal):
(WebTestRunner::WebTestInterfaces::Internal::getCurrentTimeInMillisecond):
(WebTestRunner):
(WebTestRunner::WebTestInterfaces::Internal::getAbsoluteWebStringFromUTF8Path):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::getCurrentTimeInMillisecond):
(WebViewHost::getAbsoluteWebStringFromUTF8Path):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Hide popup while transitioning from the suggestion picker to the calendar picker
https://bugs.webkit.org/show_bug.cgi?id=99537

Reviewed by Kent Tamura.

Source/WebCore:

Right now you can see a squished calendar picker while transitioning
from suggestion picker from calendar picker. This change will hide the
popup before opening the calendar picker.

No new tests.

* Resources/pagepopups/pickerCommon.js: Hiding the window will also trigger a resize event so I created a separate event, didOpenPicker.
(hideWindow): Resize the window to 1x1 because we can't resize to 0x0.
* Resources/pagepopups/suggestionPicker.js:
(SuggestionPicker.prototype.selectEntry): Hide the window first and then open the calendar picker.

LayoutTests:

* fast/forms/resources/picker-common.js:
(popupOpenCallbackWrapper): Use didOpenPicker event.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG Arrayify elimination should replace it with GetButterfly rather than Phantom
https://bugs.webkit.org/show_bug.cgi?id=100441

Reviewed by Oliver Hunt and Gavin Barraclough.

Source/JavaScriptCore: 

Made array profiler's to-string helper behave correctly.
        
Made Arrayify elimination do the right thing (convert to GetButterfly).
        
Made CFA's interference analysis track clobbered array modes correctly, mostly by
simplifying the machinery.

* bytecode/ArrayProfile.cpp:
(JSC::arrayModesToString):
* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::clobberArrayModes):
(AbstractValue):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):

LayoutTests: 

* fast/js/dfg-arrayify-elimination-expected.txt: Added.
* fast/js/dfg-arrayify-elimination.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-arrayify-elimination.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flip ImageOrientation coordinate system from lefthanded to righthanded
https://bugs.webkit.org/show_bug.cgi?id=100414

Reviewed by Eric Seidel.

platform/graphics, noteably GraphicsContext uses a right-handed
coordinate system (origin in the top left corner, x growing to the
right, y to the bottom).  ImageOrientation was an outlier from
and used a left-handed coordinate system.  This patch makes
ImageOrientation match the rest of platform/graphics.

This is a pure refactoring and has no observable effects.

* platform/chromium/DragImageChromiumSkia.cpp:
(WebCore::createDragImageFromImage):
* platform/graphics/ImageOrientation.cpp:
(WebCore::ImageOrientation::transformFromDefault):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawNativeImage):
* platform/graphics/skia/ImageSkia.cpp:
(WebCore::BitmapImage::draw):
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::shouldRespectImageOrientation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Infinite redirect loop is not displayed to user
https://bugs.webkit.org/show_bug.cgi?id=100420

Reviewed by George Staikos.

CNN.com is redirecting us infinitely with 302 http code and response body. We catch
it my setting our extended error code as we defined. But we were not trying to notify
error because we have received body. This was wrong. For extended http status code
which is less than 0 we should display our own error page regardless there was data
received from the server or not.

Tested by manually loading CNN.com.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::shouldNotifyClientFailed):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Display tooltip in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=99322

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-10-25
Reviewed by Kenneth Rohde Christiansen.

Display tooltip in MiniBrowser using elm_object_tooltip_text_set().

* MiniBrowser/efl/main.c:
(on_tooltip_text_set):
(on_tooltip_text_unset):
(window_create):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] WebView process crashed at AuthenticationChallengeManager::pageVisibilityChanged()
https://bugs.webkit.org/show_bug.cgi?id=100330

Patch by Sean Wang <Xuewen.Wang@torchmobile.com.cn> on 2012-10-25
Reviewed by Rob Buis.

Reviewed internally by Charles Wei.
PR #231232

Since AuthenticationChallengeManager keeps a map of WebPages, WebPage setting
visible needs AuthenticationChallengeManager to update its records, deleting
webpage from AuthenticationChallengeManager's map should be done after setting
webpage visibility.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused static methods from DOMTimer.h
https://bugs.webkit.org/show_bug.cgi?id=100427

Reviewed by Kenneth Russell.

Since these values got moved into Settings, these methods are no longer called.

No new tests, removing dead code.

* page/DOMTimer.h:
(DOMTimer): Remove unused getters.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Test full-block-iframe-no-inherit.php generates an invalid X-XSS-PROTECTION header.
https://bugs.webkit.org/show_bug.cgi?id=100423

Reviewed by Adam Barth.

Changed header syntax from full-block to mode=block.

* http/tests/security/xssAuditor/full-block-iframe-no-inherit.php:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] We can merge ActiveDOMObjectPrologueVisitor with ObjectVisitor
https://bugs.webkit.org/show_bug.cgi?id=100430

Reviewed by Eric Seidel.

There's no reason for these visitors to be separate objects anymore.

* bindings/v8/V8GCController.cpp:
(WebCore::ObjectVisitor::ObjectVisitor):
(WebCore::ObjectVisitor::visitDOMWrapper):
(WebCore::V8GCController::majorGCPrologue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a layout test crash if a TestWebkitPlugin is put inside an iframe
https://bugs.webkit.org/show_bug.cgi?id=100406

Patch by Min Qin <qinmin@chromium.org> on 2012-10-25
Reviewed by Adam Barth.

Tools:

Resize the context with an empty rect will cause a gl_error in gles2_cmd_decoder.cc.
Don't paint the plugin if m_rect is empty.

* DumpRenderTree/chromium/TestWebPlugin.cpp:
(TestWebPlugin::updateGeometry):

LayoutTests:

Test for adding a webplugin into an iframe and make sure it doesn't crash.

* platform/chromium/plugins/plugin-inside-iframe-expected.txt: Added.
* platform/chromium/plugins/plugin-inside-iframe.html: Added.
* platform/chromium/plugins/resources/plugin-page.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SymbolTableIndexHashTraits::needsDestruction should be set to true
https://bugs.webkit.org/show_bug.cgi?id=100437

Reviewed by Mark Hahnenberg.

For correctness, set SymbolTableIndexHashTraits::needsDestruction to true since SymbolTableEntry's do
need to have their destructor called due to the possibility of rare data.

* runtime/SymbolTable.h:
(SymbolTableIndexHashTraits):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add expectations for fast/images/exif-orientation.html
https://bugs.webkit.org/show_bug.cgi?id=100434

Unreviewed, just baselines.


* platform/chromium-linux/fast/images/exif-orientation-expected.png: Added.
* platform/chromium-mac-lion/fast/images/exif-orientation-expected.png: Added.
* platform/chromium-mac-snowleopard/fast/images/exif-orientation-expected.png: Added.
* platform/chromium-mac/fast/images/exif-orientation-expected.png: Added.
* platform/chromium-win/fast/images/exif-orientation-expected.png: Added.
* platform/chromium/fast/images/exif-orientation-expected.png: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Add histogram statistics for backing store errors
https://bugs.webkit.org/show_bug.cgi?id=98465

Reviewed by Adam Barth.

Define a macro for consistent asserting (during development), logging, and recording
internal backing store errors via histograms. Define specific histogram values to
track issues with opening backing stores to gather stats on corruption.

No new tests - just the stats, ma'am, just the stats.

* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore):
(WebCore::setUpMetadata):
(WebCore::IDBLevelDBBackingStore::open):
(WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData):
(WebCore::IDBLevelDBBackingStore::createIDBDatabaseMetaData):
(WebCore::IDBLevelDBBackingStore::updateIDBDatabaseIntVersion):
(WebCore::IDBLevelDBBackingStore::updateIDBDatabaseMetaData):
(WebCore::deleteRange):
(WebCore::IDBLevelDBBackingStore::getObjectStores):
(WebCore::IDBLevelDBBackingStore::createObjectStore):
(WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
(WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
(WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
(WebCore::IDBLevelDBBackingStore::getIndexes):
(WebCore::IDBLevelDBBackingStore::createIndex):
(WebCore::IDBLevelDBBackingStore::deleteIndex):
(WebCore::IDBLevelDBBackingStore::findKeyInIndex):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] User Challenged again after browser restart for HTTP/FTP sites already successfully authenticated.
https://bugs.webkit.org/show_bug.cgi?id=100448

Reviewed by George Staikos.

Internally reviewed by Joe Mason.

We didn't check the persistent Credential Storage for Credentials when challenged by the server.

Manual Test: login to ftp://localhost on BlackBerry device, and restart the browser to login again.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] We can merge the wrapper maps for DOM objects and active DOM objects
https://bugs.webkit.org/show_bug.cgi?id=100432

Reviewed by Eric Seidel.

Now that we use the same object to visit both DOM objects and active
DOM objects, there's no reason to keep them in separate hash maps.

* bindings/scripts/CodeGeneratorV8.pm:
(GetDomMapName):
* bindings/v8/DOMDataStore.cpp:
(WebCore::DOMDataStore::DOMDataStore):
(WebCore::DOMDataStore::~DOMDataStore):
(WebCore::DOMDataStore::reportMemoryUsage):
* bindings/v8/DOMDataStore.h:
(DOMDataStore):
* bindings/v8/V8DOMMap.cpp:
* bindings/v8/V8DOMMap.h:
(NodeWrapperVisitor):
(WebCore):
* bindings/v8/V8DOMWrapper.h:
(V8DOMWrapper):
* bindings/v8/V8GCController.cpp:
(WebCore::V8GCController::majorGCPrologue):
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::constructorCallback):
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::V8XMLHttpRequest::constructorCallback):


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