Stop all the crashing!

The WebProcessProxy is not the Connection::Client, the WebConnectionToWebProcess is.

* UIProcess/WebConnectionToWebProcess.h:
(WebKit::WebConnectionToWebProcess::webProcessProxy):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::fromConnection):



git-svn-id: svn://svn.chromium.org/blink/trunk@131285 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[Chromium] Unreviewed gardening, TestExpectations updated.

* platform/chromium/TestExpectations:

git-svn-id: svn://svn.chromium.org/blink/trunk@131286 bbb929c8-8fbe-4397-9dbb-9b2b20218538
REGRESSION(126886): Fat binary builds don't know how to handle architecture variants to which the LLInt is agnostic
https://bugs.webkit.org/show_bug.cgi?id=99270

Reviewed by Geoffrey Garen.

The fix is to hash cons the offsets based on configuration index, not the offsets
themselves.

* offlineasm/offsets.rb:



git-svn-id: svn://svn.chromium.org/blink/trunk@131287 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix the world.

Add back a forgotten !.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@131288 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DFG should handle polymorphic array modes by eagerly transforming arrays into the most general applicable form
https://bugs.webkit.org/show_bug.cgi?id=99269

Reviewed by Geoffrey Garen.

This kills off a bunch of code for "polymorphic" array modes in the DFG. It should
also be a performance win for code that uses a lot of array storage arrays.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGArrayMode.cpp:
(JSC::DFG::fromObserved):
(JSC::DFG::modeAlreadyChecked):
(JSC::DFG::modeToString):
* dfg/DFGArrayMode.h:
(DFG):
(JSC::DFG::modeUsesButterfly):
(JSC::DFG::modeIsJSArray):
(JSC::DFG::mayStoreToTail):
(JSC::DFG::mayStoreToHole):
(JSC::DFG::canCSEStorage):
(JSC::DFG::modeSupportsLength):
(JSC::DFG::benefitsFromStructureCheck):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::checkArray):
(JSC::DFG::FixupPhase::blessArrayOperation):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::byValIsPure):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::arrayify):
(DFG):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister):
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):



git-svn-id: svn://svn.chromium.org/blink/trunk@131289 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Web Inspector: NMI remove hand made object builders with automatic builder.
https://bugs.webkit.org/show_bug.cgi?id=99186

Reviewed by Yury Semikhatsky.

Old builders were replaced with single automatic builder.
It does the next things:
a) deduplicates entries in the MemoryInstrumentationClient's map and converts objectType pointers to String;
b) creates parent entries and assigns their aggregated sizes;
c) creates the hierarchy of MemoryBlocks recursively.

* dom/WebCoreMemoryInstrumentation.cpp:
(WebCore):
* dom/WebCoreMemoryInstrumentation.h:
(WebCoreMemoryTypes):
* inspector/InspectorMemoryAgent.cpp:
(WebCore):
(WebCore::jsHeapInfo):
(WebCore::renderTreeInfo):
(WebCore::addPlatformComponentsInfo):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
* inspector/MemoryInstrumentationImpl.cpp:
(WebCore::MemoryInstrumentationClientImpl::sizesMap):
(WebCore):
* inspector/MemoryInstrumentationImpl.h:
(WebCore):
(MemoryInstrumentationClientImpl):

git-svn-id: svn://svn.chromium.org/blink/trunk@131290 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[Chromium] Unreviewed gardening, TestExpectations updated.

* platform/chromium/TestExpectations:

git-svn-id: svn://svn.chromium.org/blink/trunk@131291 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Unreviewed. Fix make distcheck.

Source/JavaScriptCore:

* GNUmakefile.list.am: Add missing header file.

Source/WebKit2:

* GNUmakefile.am: Add .in files in WebKit2/Shared to EXTRA_DIST.
* GNUmakefile.list.am: Remove deleted file.

git-svn-id: svn://svn.chromium.org/blink/trunk@131292 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Improve code of LocaleMac.mm
https://bugs.webkit.org/show_bug.cgi?id=98383

Reviewed by Darin Adler.

- Use isNull instead of isEmpty because isNull is more efficient.
- create*Formatter should return RetainPtr to avoid to retain in each of callsites.
- Explicit String conversion is not needed.

No new tests. This doesn't change any behavior.

* platform/text/mac/LocaleMac.h:
(LocaleMac):
- Change the return types of createShortDateFormatter,
createTimeFormatter, and createShortTimeFormatter from NSDateFormatter*
to RetainPtr<NSDateFormatter>.
- Omit 'create' from their names.
- Add m_gregorianCalendar.
* platform/text/mac/LocaleMac.mm:
(WebCore::createDateTimeFormatter):
Change the return type from NSDateFormatter* to RetainPtr<NSDateFormatter>.
Add an NSCalendar argument.
(WebCore::LocaleMac::shortDateFormatter):
Renamed from createShortTimeFormatter.
Change the return type from NSDateFormatter* to RetainPtr<NSDateFormatter>.
(WebCore::LocaleMac::parseDateTime): Follow the return type change and the renaming.
(WebCore::LocaleMac::formatDateTime): Ditto. Also, remove explicit String construction.
(WebCore::LocaleMac::dateFormatText): Ditto. Also, use isNull.
(WebCore::LocaleMac::monthLabels): Follow the return type change and the renaming.
(WebCore::LocaleMac::weekDayShortLabels): Ditto.
(WebCore::LocaleMac::timeFormatter):
Change the return type from NSDateFormatter* to RetainPtr<NSDateFormatter>.
Renamed from createTimeFormatter.
(WebCore::LocaleMac::shortTimeFormatter): Ditto.
(WebCore::LocaleMac::dateFormat):
Use isNull. Remove explicit String construction. Follow the return type
change and the renaming.
(WebCore::LocaleMac::timeFormat): ditto.
(WebCore::LocaleMac::shortTimeFormat): ditto.
(WebCore::LocaleMac::timeAMPMLabels):
Remove explicit String construction. Follow the return type change.
(WebCore::LocaleMac::initializeLocalizerData):
Remove explicit String construction.

git-svn-id: svn://svn.chromium.org/blink/trunk@131293 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[Qt][WK2] Buildfix for newer Qt5.
https://bugs.webkit.org/show_bug.cgi?id=99303

Reviewed by Simon Hausmann.

* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::PlatformWebView::resizeTo):

git-svn-id: svn://svn.chromium.org/blink/trunk@131294 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[Qt] Unskip and rebase now passing tests.
https://bugs.webkit.org/show_bug.cgi?id=98824

Patch by Tullio Lucena <tullio.lucena@openbossa.org> on 2012-10-15
Reviewed by Csaba Osztrogonác.

Updating tests results.

* platform/qt/TestExpectations:
* platform/qt/editing/selection/caret-rtl-2-expected.png: Added.
* platform/qt/editing/selection/caret-rtl-2-expected.txt:
* platform/qt/editing/selection/caret-rtl-expected.png: Added.
* platform/qt/editing/selection/caret-rtl-expected.txt:
* platform/qt/editing/selection/extend-selection-bidi-expected.png: Added.
* platform/qt/editing/selection/extend-selection-bidi-expected.txt: Added.
* platform/qt/editing/selection/move-past-trailing-space-expected.png: Added.
* platform/qt/editing/selection/move-past-trailing-space-expected.txt: Added.

git-svn-id: svn://svn.chromium.org/blink/trunk@131295 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[chromium] Removes unnecessary dependencies in DumpRenderTree.gyp
https://bugs.webkit.org/show_bug.cgi?id=99132

Reviewed by Kent Tamura.

Removing webkit_support:blob dependency for DumpRenderTree target as it doesn't seem necessary.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:

git-svn-id: svn://svn.chromium.org/blink/trunk@131296 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[Qt] Regression(r130031) coverRect is used in wrong coordinates.
https://bugs.webkit.org/show_bug.cgi?id=97777

Reviewed by Jocelyn Turcotte.

Convert coverRect from screen coordinates to content coordinates before using it
outside tiled-backing store.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(WebCore::CoordinatedGraphicsLayer::coverRect):

git-svn-id: svn://svn.chromium.org/blink/trunk@131297 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[EFL][WK2] Encapsulate ref counting for Ewk objects in a parent class
https://bugs.webkit.org/show_bug.cgi?id=99174

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-15
Reviewed by Kenneth Rohde Christiansen.

Ewk objects can be inherited from RefCounted class, so that ref counting is encapsulated and RefPtr can be used.
Applied the new approach for Ewk_Navigation_Data and Ewk_Url_Request objects as an example.
The requirement of adoption can be satisfied as long as we keep dealing with smart pointers only. 
In case external client provides an already referenced object as a raw pointer, relaxAdoptionRequirement() can be set
explicitly in this specific place.

* UIProcess/API/efl/ewk_context_history_client.cpp:
(didNavigateWithNavigationData):
* UIProcess/API/efl/ewk_download_job.cpp:
(_Ewk_Download_Job):
(_Ewk_Download_Job::_Ewk_Download_Job):
(_Ewk_Download_Job::~_Ewk_Download_Job):
(ewk_download_job_request_get):
* UIProcess/API/efl/ewk_navigation_data.cpp:
(ewk_navigation_data_ref):
(ewk_navigation_data_unref):
(ewk_navigation_data_original_request_get):
* UIProcess/API/efl/ewk_navigation_data_private.h:
(_Ewk_Navigation_Data):
(_Ewk_Navigation_Data::_Ewk_Navigation_Data):
* UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
(_Ewk_Navigation_Policy_Decision):
(_Ewk_Navigation_Policy_Decision::_Ewk_Navigation_Policy_Decision):
(_Ewk_Navigation_Policy_Decision::~_Ewk_Navigation_Policy_Decision):
(ewk_navigation_policy_request_get):
(ewk_navigation_policy_decision_new):
* UIProcess/API/efl/ewk_url_request.cpp:
(ewk_url_request_ref):
(ewk_url_request_unref):
* UIProcess/API/efl/ewk_url_request_private.h:
(_Ewk_Url_Request):
(_Ewk_Url_Request::_Ewk_Url_Request):
* UIProcess/API/efl/ewk_view_resource_load_client.cpp:
(didInitiateLoadForResource):
(didSendRequestForResource):


git-svn-id: svn://svn.chromium.org/blink/trunk@131298 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Web Inspector: convert manual size calculation of different WebKit things into MemoryInstrumentation.
https://bugs.webkit.org/show_bug.cgi?id=99309

Reviewed by Yury Semikhatsky.

JSHeap, DOMStorage and HeapProfiler data were counted manually.
Now we count the sizes more generic way.

Source/WebCore:

* dom/WebCoreMemoryInstrumentation.cpp:
* dom/WebCoreMemoryInstrumentation.h:
(WebCoreMemoryTypes): new string identifiers were added for Inspector's data.
* inspector/InspectorBaseAgent.cpp:
(WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface): common data members were moved from template to base class.
(WebCore::InspectorBaseAgentInterface::reportMemoryUsage): NMI instrumentation was added to the base template.
* inspector/InspectorBaseAgent.h:
(InspectorBaseAgentInterface): ditto
(WebCore::InspectorBaseAgent::InspectorBaseAgent): ditto
* inspector/InspectorController.cpp:
(WebCore::InspectorController::reportMemoryUsage): NMI instrumentation was added to the class.
* inspector/InspectorController.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::reportMemoryUsage): NMI instrumentation was added to the class.
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDOMStorageResource.cpp:
(WebCore::InspectorDOMStorageResource::reportMemoryUsage): NMI instrumentation was added to the class.
* inspector/InspectorDOMStorageResource.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::reportJSHeapInfo): these methods now use MemoryInstrumentation for reporting the size of underlying data.
(WebCore::reportRenderTreeInfo):
(WebCore::collectDomTreeInfo):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
(WebCore::InspectorMemoryAgent::reportMemoryUsage): NMI instrumentation was added to the class.
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::reportMemoryUsage):
* inspector/InspectorProfilerAgent.h:
(InspectorProfilerAgent): NMI instrumentation was added to the class.
* inspector/MemoryInstrumentationImpl.cpp: allocatedObjects map was converted from InspectorMemoryAgent::getProcessMemoryDistribution local variable to member variable.
(WebCore::MemoryInstrumentationClientImpl::checkCountedObject):
(WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage): NMI instrumentation was added to the class.
(WebCore::MemoryInstrumentationImpl::reportMemoryUsage): NMI instrumentation was added to the class.
* inspector/MemoryInstrumentationImpl.h:
(WebCore::MemoryInstrumentationClientImpl::MemoryInstrumentationClientImpl):
(WebCore::MemoryInstrumentationClientImpl::allocatedObjects):
(WebCore::MemoryInstrumentationClientImpl::checkInstrumentedObjects):
* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.MemoryBlockViewProperties._initialize):
(WebInspector.NativeMemoryBarChart.prototype._updateView):
* page/Page.cpp:
(WebCore::Page::reportMemoryUsage): NMI instrumentation was added to the class.
* page/Page.h:

Source/WTF:

* wtf/MemoryInstrumentation.h: calculateContainerSize were removed.
* wtf/MemoryInstrumentationSequence.h: empty instrumentations were added for 'const char*' and 'const void*' sequences.

git-svn-id: svn://svn.chromium.org/blink/trunk@131299 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
https://bugs.webkit.org/show_bug.cgi?id=88162

Reviewed by Kenneth Rohde Christiansen.

Rename the QtWebKit module to QtWebKitWidgets.

.:

* Source/api.pri:
* Source/sync.profile:

Source/WebKit/qt:

* declarative/experimental/experimental.pri:
* declarative/public.pri:
* docs/webkitsnippets/simple/simple.pro:
* docs/webkitsnippets/webpage/webpage.pro:
* tests/tests.pri:

Source/WebKit2:

* PluginProcess.pro:
* UIProcess/API/qt/tests/inspectorserver/inspectorserver.pro:
* UIProcess/API/qt/tests/publicapi/publicapi.pro:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/WebView.pro:
* UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
* UIProcess/API/qt/tests/qrawwebview/qrawwebview.pro:
* UIProcess/API/qt/tests/tests.pri:
* WebProcess.pro:

Tools:

* DumpRenderTree/qt/DumpRenderTree.pro:
* MiniBrowser/qt/MiniBrowser.pro:
* MiniBrowser/qt/raw/Target.pri:
* QtTestBrowser/QtTestBrowser.pro:
* Scripts/webkitpy/layout_tests/port/qt.py:
(QtPort._path_to_webcore_library):
* WebKitTestRunner/InjectedBundle/Target.pri:
* WebKitTestRunner/Target.pri:
* qmake/mkspecs/features/default_post.prf:
* qmake/mkspecs/features/webkit_modules.prf:
* qmake/mkspecs/features/win32/default_post.prf:

git-svn-id: svn://svn.chromium.org/blink/trunk@131300 bbb929c8-8fbe-4397-9dbb-9b2b20218538
REGRESSION(130613): Reintroduces crashes when using soup's timeout functionality
https://bugs.webkit.org/show_bug.cgi?id=99311

Reviewed by Gustavo Noronha Silva.

Removing the cleanupSoupRequestOperation call, since the cancel() call will eventually trigger the
cleanup already setting the right flag. Cleaning the handle already here will result in crashes when
using the soup timeout functionality.
The explicit cleanup call reintroduced in r130613, after it had been previously removed in r130348.

No new tests, tests that catch this will be part of bug 74802 for XHR timeout support.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::requestTimeoutCallback):

git-svn-id: svn://svn.chromium.org/blink/trunk@131301 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Web Inspector: Scripts for dynamically added script elements are not shown in sources panel.
https://bugs.webkit.org/show_bug.cgi?id=99324

Reviewed by Pavel Feldman.

Source/WebCore:

NetworkUISourceCodeProvider now adds uiSourceCodes for dynamic anonymous scripts
and dynamic scripts loaded before inspector was opened.

Tests: http/tests/inspector-enabled/dynamic-scripts.html
       inspector/debugger/dynamic-scripts.html

* inspector/front-end/NetworkLog.js:
(WebInspector.NetworkLog.prototype.requestForURL):
* inspector/front-end/NetworkUISourceCodeProvider.js:
(WebInspector.NetworkUISourceCodeProvider):
(WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
(WebInspector.NetworkUISourceCodeProvider.prototype._projectWillReset):

LayoutTests:

* http/tests/inspector-enabled/dynamic-scripts-expected.txt: Added.
* http/tests/inspector-enabled/dynamic-scripts.html: Added.
* http/tests/inspector-enabled/resources/dynamic-script.js: Added.
(fooDynamicScript):
* inspector/debugger/dynamic-scripts-expected.txt: Added.
* inspector/debugger/dynamic-scripts.html: Added.
* inspector/debugger/resources/dynamic-script.js: Added.
(fooDynamicScript):

git-svn-id: svn://svn.chromium.org/blink/trunk@131302 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Silencing a style-checker warning.

git-svn-id: svn://svn.chromium.org/blink/trunk@131303 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Layout Test plugins/update-widgets-crash.html is failing
https://bugs.webkit.org/show_bug.cgi?id=99333

Unreviewed gardening.

* platform/chromium/TestExpectations:

git-svn-id: svn://svn.chromium.org/blink/trunk@131304 bbb929c8-8fbe-4397-9dbb-9b2b20218538