Partially revert 104427, change WebWidgetClient::didHandleGestureEvent semantics.
https://bugs.webkit.org/show_bug.cgi?id=107605

Patch by Tien-Ren Chen <trchen@chromium.org> on 2013-01-23
Reviewed by Darin Fisher.

Per discussion in https://codereview.chromium.org/11473027/ we decided
not to introduce an enum to WebWidgetClient::didHandleGestureEvent().
Instead, change the semantics of the bool flag to indicate whether the
gesture event is cancelled for disambiguation.

* public/WebWidgetClient.h:
(WebKit::WebWidgetClient::didHandleGestureEvent):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):
* tests/WebViewTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Checkin the OpenSource WebKit solution.

* WebKit.vcxproj/WebKit.sln:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Fix inclusion of pch .cpp in webcore_platform and webcore_rendering
https://bugs.webkit.org/show_bug.cgi?id=107700

Patch by Scott Graham <scottmg@chromium.org> on 2013-01-23
Reviewed by Dirk Pranke.

No new tests, Chromium should link on VS 2012.

* WebCore.gyp/WebCore.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Bump webkitgtk-test-fonts dependency to cover fallbacks for Tamil, Bengali, and others
https://bugs.webkit.org/show_bug.cgi?id=107727

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-01-23
Reviewed by Gustavo Noronha Silva.

Tools:

* gtk/jhbuild.modules: Update the JHBuild moduleset to point to the new webkitgtk-test-fonts.
We are using the git repository now that github has deprecated the downloads feature.

LayoutTests:

Update test results to reflect the new fonts.

* platform/gtk/fast/text/atsui-multiple-renderers-expected.png:
* platform/gtk/fast/text/atsui-multiple-renderers-expected.txt:
* platform/gtk/fast/text/complex-text-opacity-expected.png:
* platform/gtk/fast/text/complex-text-opacity-expected.txt:
* platform/gtk/fast/text/international/bold-bengali-expected.png:
* platform/gtk/fast/text/international/bold-bengali-expected.txt:
* platform/gtk/fast/text/international/complex-character-based-fallback-expected.png:
* platform/gtk/fast/text/international/complex-character-based-fallback-expected.txt:
* platform/gtk/fast/text/international/danda-space-expected.png:
* platform/gtk/fast/text/international/danda-space-expected.txt:
* platform/gtk/fast/text/international/hindi-spacing-expected.png:
* platform/gtk/fast/text/international/hindi-spacing-expected.txt:
* platform/gtk/fast/text/international/hindi-whitespace-expected.png:
* platform/gtk/fast/text/international/hindi-whitespace-expected.txt:
* platform/gtk/fast/text/international/thai-baht-space-expected.png:
* platform/gtk/fast/text/international/thai-baht-space-expected.txt:
* platform/gtk/fast/text/international/thai-line-breaks-expected.png:
* platform/gtk/fast/text/international/thai-line-breaks-expected.txt:
* platform/gtk/svg/text/non-bmp-positioning-lists-expected.png: Added.
* platform/gtk/svg/text/non-bmp-positioning-lists-expected.txt:
* platform/gtk/transforms/2d/hindi-rotated-expected.png:
* platform/gtk/transforms/2d/hindi-rotated-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Replace some internal API usage in EwkView with C API
https://bugs.webkit.org/show_bug.cgi?id=107652

Reviewed by Benjamin Poulain.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_url_set):
(ewk_view_reload):
(ewk_view_reload_bypass_cache):
(ewk_view_stop):
(ewk_view_load_progress_get):
(ewk_view_scale_set):
(ewk_view_scale_get):
(ewk_view_device_pixel_ratio_get):
(ewk_view_back):
(ewk_view_forward):
(ewk_view_back_possible):
(ewk_view_forward_possible):
(ewk_view_html_string_load):
(ewk_view_text_find):
(ewk_view_text_find_highlight_clear):
(ewk_view_text_matches_count):
(ewk_view_inspector_show):
(ewk_view_inspector_close):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: remove CoordinatedLayerInfo::encode/decode.
https://bugs.webkit.org/show_bug.cgi?id=107644

Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-23
Reviewed by Anders Carlsson.

We want to remove the dependency on CoreIPC from CoordinatedLayerInfo because we
will extract Coordinated Graphics from WK2.

* CMakeLists.txt:
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC):
(CoreIPC::::decode):
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
(WebKit):
* Shared/CoordinatedGraphics/CoordinatedLayerInfo.cpp: Removed.
* Shared/CoordinatedGraphics/CoordinatedLayerInfo.h:
* Target.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Remove IDBVersionChangeRequest
https://bugs.webkit.org/show_bug.cgi?id=107711

Reviewed by Tony Chang.

Source/WebCore:

When the setVersion() API was removed from the Indexed DB spec the IDBVersionChangeRequest
interface was replaced with IDBOpenDBRequest. We switched over for open(), this completes
the work by switching over for deleteDatabase() and removing the old code. (On the Event
side we still need to combine IDBVersionChangeEvent and IDBUpgradeNeededEvent.)

Test: storage/indexeddb/intversion-long-queue.html
      storage/indexeddb/intversion-upgrades.html

* CMakeLists.txt: Remove references to deleted code.
* DerivedSources.make: Ditto.
* GNUmakefile.list.am: Ditto.
* Modules/indexeddb/IDBCallbacks.h: Remove unused onBlocked() overload.
* Modules/indexeddb/IDBDatabase.cpp: Remove references to deleted code.
* Modules/indexeddb/IDBDatabase.h: Ditto.
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::deleteDatabase): Fire onBlocked with current version.
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::openInternal): Don't need to specify source.
(WebCore::IDBFactory::deleteDatabase): Use an IDBOpenDBRequest.
* Modules/indexeddb/IDBFactory.h: Change return type of deleteDatabase()
* Modules/indexeddb/IDBFactory.idl: Ditto.
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::create): Always use a null source.
(WebCore::IDBOpenDBRequest::IDBOpenDBRequest): Pass null source to base class.
(WebCore::IDBOpenDBRequest::dispatchEvent): Don't assume result is a database in existing
special case.
* Modules/indexeddb/IDBOpenDBRequest.h: Don't need a source argument (always null).
* Modules/indexeddb/IDBVersionChangeRequest.cpp: Removed.
* Modules/indexeddb/IDBVersionChangeRequest.h: Removed.
* Modules/indexeddb/IDBVersionChangeRequest.idl: Removed.
* WebCore.gypi: Remove references to deleted code.
* WebCore.xcodeproj/project.pbxproj: Remove references to deleted code.
* dom/EventTarget.h: Remove references to deleted code.
* dom/EventTargetFactory.in: Ditto.

Source/WebKit/chromium:

* public/WebIDBCallbacks.h: Note to delete onBlocked() once Chromium is cleaned up.
* src/IDBCallbacksProxy.cpp: Remove unused onBlocked() overload.
* src/IDBCallbacksProxy.h: Ditto.
* src/WebIDBCallbacksImpl.cpp: Ditto.
* src/WebIDBCallbacksImpl.h: Ditto.
* tests/IDBAbortOnCorruptTest.cpp: Ditto.
* tests/IDBDatabaseBackendTest.cpp: Ditto.

LayoutTests:

Update expectations - change a handful of FAIL to PASS because past-us were awesome.

* storage/indexeddb/intversion-long-queue-expected.txt:
* storage/indexeddb/intversion-upgrades-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Added eol-style=native to solution file.

* WebKit.vcxproj/WebKit.sln: Added property eol-style.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement Canvas Path object
https://bugs.webkit.org/show_bug.cgi?id=97333

Reviewed by Dean Jackson.

Source/WebCore:

The Canvas part of the WHATWG specification defines a Path object. This Path object
shares several path segment functions (path methods) with the CanvasRenderingContext2D
interface. This patch introduces the Path object and shares the path segment functions
in the class CanvasPathMethods.
This patch does just implement the basic path functions that have a general agreement on
the WHAT WG and W3C mailing lists.
This feature is behind a flag and won't be activated by default.

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#path-objects

Test: fast/canvas/canvas-path-object.html

* CMakeLists.txt: Add DOMPath and CanvasPathMedthods to build system.
* DerivedSources.cpp: Ditto.
* DerivedSources.make: Ditto.
* DerivedSources.pri: Ditto.
* GNUmakefile.list.am: Ditto.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* html/canvas/CanvasPathMethods.cpp: Added.
(WebCore): This class shares the path segment functions (moveTo, lineTo, ...) between
    DOMPath (the Path object) and CanvasRenderingContext2D.
(WebCore::CanvasPathMethods::closePath):
(WebCore::CanvasPathMethods::moveTo):
(WebCore::CanvasPathMethods::lineTo):
(WebCore::CanvasPathMethods::quadraticCurveTo):
(WebCore::CanvasPathMethods::bezierCurveTo):
(WebCore::CanvasPathMethods::arcTo):
(WebCore::CanvasPathMethods::arc):
(WebCore::CanvasPathMethods::rect):
* html/canvas/CanvasPathMethods.h: Added.
(WebCore):
(CanvasPathMethods):
(WebCore::CanvasPathMethods::~CanvasPathMethods):
(WebCore::CanvasPathMethods::transformIsInvertible):
(WebCore::CanvasPathMethods::CanvasPathMethods):
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/CanvasRenderingContext2D.h: Remove the path segment functions here.
(CanvasRenderingContext2D):
(WebCore::CanvasRenderingContext2D::transformIsInvertible): This checks if the CTM
    of the context is still invertible. Drawing should stop if it is not.
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.h: Added.
(WebCore):
(DOMPath):
(WebCore::DOMPath::create):
(WebCore::DOMPath::~DOMPath):
(WebCore::DOMPath::DOMPath):
* html/canvas/DOMPath.idl: Added.
* page/DOMWindow.idl: Added CTOR for Path.

LayoutTests:

Add a test for checking existence of Path object and dependent functions.
The test is supposed to fail if canvas-path is not activated on compile time.

* fast/canvas/canvas-path-object-expected.txt: Added.
* fast/canvas/canvas-path-object.html: Added.
* fast/canvas/script-tests/canvas-path-object.js: Added.
* platform/chromium/TestExpectations: Different error handling on Chromium. Needs rebaseline.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Message receiver generation should work in terms of MessageReceiver objects
https://bugs.webkit.org/show_bug.cgi?id=107742

Reviewed by Beth Dakin.

The generated message receiver code should generate the MessageReceiver
member functions didReceiveMessage and didReceiveSyncMessage instead of
receiver specific member functions.

* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.messages.in:
* PluginProcess/PluginControllerProxy.messages.in:
* PluginProcess/PluginProcess.messages.in:
* PluginProcess/WebProcessConnection.messages.in:
* Scripts/webkit2/messages.py:
(generate_message_handler):
* Scripts/webkit2/messages_unittest.py:
* Scripts/webkit2/model.py:
(MessageReceiver.__init__):
(MessageReceiver.has_attribute):
* Scripts/webkit2/parser.py:
(parse):
* Shared/Network/CustomProtocols/CustomProtocolManager.messages.in:
* Shared/Plugins/NPObjectMessageReceiver.messages.in:
* Shared/WebConnection.messages.in:
* Shared/mac/SecItemShim.messages.in:
* SharedWorkerProcess/SharedWorkerProcess.messages.in:
* UIProcess/Downloads/DownloadProxy.messages.in:
* UIProcess/DrawingAreaProxy.messages.in:
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/Notifications/WebNotificationManagerProxy.messages.in:
* UIProcess/Plugins/PluginProcessProxy.messages.in:
* UIProcess/SharedWorkers/SharedWorkerProcessProxy.messages.in:
* UIProcess/WebApplicationCacheManagerProxy.messages.in:
* UIProcess/WebContext.messages.in:
* UIProcess/WebCookieManagerProxy.messages.in:
* UIProcess/WebDatabaseManagerProxy.messages.in:
* UIProcess/WebFullScreenManagerProxy.messages.in:
* UIProcess/WebGeolocationManagerProxy.messages.in:
* UIProcess/WebIconDatabase.messages.in:
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/WebKeyValueStorageManagerProxy.messages.in:
* UIProcess/WebMediaCacheManagerProxy.messages.in:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessProxy.messages.in:
* UIProcess/WebResourceCacheManagerProxy.messages.in:
* UIProcess/mac/RemoteLayerTreeHost.messages.in:
* UIProcess/mac/SecItemShimProxy.messages.in:
* WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in:
* WebProcess/Authentication/AuthenticationManager.h:
* WebProcess/Authentication/AuthenticationManager.messages.in:
* WebProcess/Cookies/WebCookieManager.messages.in:
* WebProcess/FullScreen/WebFullScreenManager.messages.in:
* WebProcess/Geolocation/WebGeolocationManager.messages.in:
* WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in:
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in:
* WebProcess/MediaCache/WebMediaCacheManager.messages.in:
* WebProcess/Network/NetworkProcessConnection.messages.in:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/Notifications/WebNotificationManager.messages.in:
* WebProcess/Plugins/PluginProcessConnection.messages.in:
* WebProcess/Plugins/PluginProxy.messages.in:
* WebProcess/ResourceCache/WebResourceCacheManager.messages.in:
* WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/EventDispatcher.messages.in:
* WebProcess/WebPage/WebInspector.messages.in:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/WebPageGroupProxy.messages.in:
* WebProcess/WebProcess.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] Add support for computing first included interval position for polygons
https://bugs.webkit.org/show_bug.cgi?id=103429

Patch by Hans Muller <hmuller@adobe.com> on 2013-01-23
Reviewed by Dirk Schulze.

Source/WebCore:

Added support for computing the "first fit" location, i.e. the logical shape-inside
location where a line's layout begins. The algorithm for doing so is described here:
http://hansmuller-webkit.blogspot.com/2012/08/revised-algorithm-for-finding-first.html.

Tests: fast/exclusions/shape-inside/shape-inside-first-fit-001.html
       fast/exclusions/shape-inside/shape-inside-first-fit-002.html
       fast/exclusions/shape-inside/shape-inside-first-fit-003.html

* platform/graphics/FloatSize.h:
(WebCore::operator*): Scale a FloatSize. This simplified the final expression in VertexPair::intersection().
* rendering/ExclusionPolygon.cpp:
(WebCore::isPointOnLineSegment): Returns true if the specified point is collinear and within the line segement's bounds.
(WebCore::leftSide): Return a value > 0 if point is on the left side of the line segment, < 0 if it's on the right, 0 if it's collinear.
(WebCore::ExclusionPolygon::contains): Return true if the point is within the polygon or on an edge.
(WebCore::VertexPair::overlapsRect): Returns true if the line segment from vertex1 to vertex2 overlaps the specified FloatRect.
(WebCore::VertexPair::intersection): Finds the intersection of a pair of line segments defined by VertexPairs.
(WebCore::ExclusionPolygon::firstFitRectInPolygon): Returns true if none of the polygon's edges, except the two used
    to define by the offset edges, overlap the FloatRect.
(WebCore::aboveOrToTheLeft): Defines the top/left preference for "first fit" locations.
(WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Replaced the stub implementation of this method.
* rendering/ExclusionPolygon.h:
(ExclusionPolygon): Added declarations noted above.
(VertexPair): Abstract class that defines a pair of FloatPoints.
(OffsetPolygonEdge): Represents an edge that's horizontally offset from a polygon edge.
(WebCore::OffsetPolygonEdge::edgeIndex): The ExclusionPolygon edge index used to define this OffsetEdge.

LayoutTests:

All of the existing shape-inside tests exercise the new code.  Added new tests which
verify that layout works correctly when layout can not begin at the shape's logical top.
Test 001 additionally checks all writing-modes, test 002 verifies that the topmost/leftmost
rule is followed, and test3 checks a self-intersecting polygon.

* fast/exclusions/shape-inside/shape-inside-first-fit-001-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-first-fit-001.html: Added.
* fast/exclusions/shape-inside/shape-inside-first-fit-002-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-first-fit-002.html: Added.
* fast/exclusions/shape-inside/shape-inside-first-fit-003-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-first-fit-003.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove LegacyReceiver from a couple of .messages.in files
https://bugs.webkit.org/show_bug.cgi?id=107749

Reviewed by Beth Dakin.

* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
(WebNotificationManagerProxy):
* UIProcess/Notifications/WebNotificationManagerProxy.messages.in:
* UIProcess/WebGeolocationManagerProxy.cpp:
* UIProcess/WebGeolocationManagerProxy.h:
(WebGeolocationManagerProxy):
* UIProcess/WebGeolocationManagerProxy.messages.in:
* UIProcess/WebIconDatabase.cpp:
* UIProcess/WebIconDatabase.h:
(WebIconDatabase):
* UIProcess/WebIconDatabase.messages.in:
* UIProcess/WebKeyValueStorageManagerProxy.cpp:
* UIProcess/WebKeyValueStorageManagerProxy.h:
(WebKeyValueStorageManagerProxy):
* UIProcess/WebKeyValueStorageManagerProxy.messages.in:
* UIProcess/WebMediaCacheManagerProxy.cpp:
* UIProcess/WebMediaCacheManagerProxy.h:
(WebMediaCacheManagerProxy):
* UIProcess/WebMediaCacheManagerProxy.messages.in:
* UIProcess/WebResourceCacheManagerProxy.cpp:
* UIProcess/WebResourceCacheManagerProxy.h:
(WebResourceCacheManagerProxy):
* UIProcess/WebResourceCacheManagerProxy.messages.in:
* WebProcess/Geolocation/WebGeolocationManager.cpp:
* WebProcess/Geolocation/WebGeolocationManager.h:
(WebGeolocationManager):
* WebProcess/Geolocation/WebGeolocationManager.messages.in:
* WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
* WebProcess/IconDatabase/WebIconDatabaseProxy.h:
(WebIconDatabaseProxy):
* WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in:
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.h:
(WebKeyValueStorageManager):
* WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in:
* WebProcess/MediaCache/WebMediaCacheManager.cpp:
* WebProcess/MediaCache/WebMediaCacheManager.h:
(WebMediaCacheManager):
* WebProcess/MediaCache/WebMediaCacheManager.messages.in:
* WebProcess/Notifications/WebNotificationManager.cpp:
* WebProcess/Notifications/WebNotificationManager.h:
(WebNotificationManager):
* WebProcess/Notifications/WebNotificationManager.messages.in:
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
* WebProcess/ResourceCache/WebResourceCacheManager.h:
(WebResourceCacheManager):
* WebProcess/ResourceCache/WebResourceCacheManager.messages.in:
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit):
* WebProcess/WebPage/WebPageGroupProxy.h:
(WebPageGroupProxy):
* WebProcess/WebPage/WebPageGroupProxy.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Constant folding an access to an uncaptured variable that is captured later in the same basic block shouldn't lead to assertion failures
https://bugs.webkit.org/show_bug.cgi?id=107750
<rdar://problem/12387265>

Source/JavaScriptCore: 

Reviewed by Mark Hahnenberg.
        
The point of this assertion was that if there is no variable capturing going on, then there should only be one GetLocal
for the variable anywhere in the basic block. But if there is some capturing, then we'll have an unbounded number of
GetLocals. The assertion was too imprecise for the latter case. I want to keep this assertion, so I introduced a
checker that verifies this precisely: if there are any captured accesses to the variable anywhere at or after the
GetLocal we are eliminating, then we allow redundant GetLocals.

* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
(ConstantFoldingPhase):
(JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter):

LayoutTests: 

Reviewed by Mark Hahnenberg.

* fast/js/dfg-constant-fold-uncaptured-variable-that-is-later-captured-expected.txt: Added.
* fast/js/dfg-constant-fold-uncaptured-variable-that-is-later-captured.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-constant-fold-uncaptured-variable-that-is-later-captured.js: Added.
(bar):
(baz):
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop the background-parser during HTMLDocumentParser::detatch to prevent crashes/asserts
https://bugs.webkit.org/show_bug.cgi?id=107751

Reviewed by Tony Gentilcore.

This appears to fix the 2 intermitent crashers we were seeing while
running fast/parser.  And definitely fixes 8 ASSERTs seen using a Debug build.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::detach):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit should support decoding multi-byte entities in XML content
https://bugs.webkit.org/show_bug.cgi?id=107459

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-01-23
Reviewed by Adam Barth.

Source/WebCore:

Test: fast/parser/entities-in-xhtml.xhtml

* html/parser/HTMLEntityParser.cpp:
(WebCore::appendUChar32ToUCharArray): Added this helper function. Later patches
may try to move this code to somewhere that it can be shared more easily.
(WebCore::decodeNamedEntityToUCharArray): Modify this function to work on a UChar
array four elements long, so that multi-byte and multi-character entities can be resolved.
* html/parser/HTMLEntityParser.h: Updated function declaratoin.
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore): Modify the statically allocated entity string memory area to accommodate
up to two UTF-8 characters. Each UTF-8 character can be 4 bytes, so this brings the
total size to 9 bytes.
(WebCore::getXHTMLEntity): Use the new entity decoding API.
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::EntityResolver::resolveUndeclaredEntity): Ditto.
(WebCore::XMLDocumentParser::parse): Ditto.

LayoutTests:

Add a simple test for decoding some entities that resolve to multiple
bytes in XML.

* fast/parser/entities-in-xhtml.xhtml: Added a few multi-bye entities.
* fast/parser/entities-in-xhtml-expected.txt: Updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Reduce usage of deprecatedV8String() and deprecatedV8Integer()
https://bugs.webkit.org/show_bug.cgi?id=107674

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/v8/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::evaluate):
* bindings/v8/NPV8Object.cpp:
(_NPN_Enumerate):
* bindings/v8/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::addListener):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::bindToWindowObject):
(WebCore::ScriptController::disableEval):
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::setScriptSource):
(WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled):
(WebCore::ScriptDebugServer::compileScript):
* bindings/v8/ScriptFunctionCall.cpp:
(WebCore::ScriptCallArgumentHandler::appendArgument):
(WebCore::ScriptFunctionCall::call):
(WebCore::ScriptFunctionCall::construct):
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::start):
(WebCore::ScriptProfiler::stop):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::initializeIfNeeded):
(WebCore::V8DOMWindowShell::namedItemAdded):
(WebCore::V8DOMWindowShell::namedItemRemoved):
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
* bindings/v8/V8MutationCallback.cpp:
(WebCore::V8MutationCallback::handleEvent):
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* bindings/v8/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::addListener):
* bindings/v8/custom/V8InjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::createInjectedScript):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move Move WebKeyValueStorageManager to WebProcess/Storage.

Rubber-stamped by Sam Weinig.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Storage/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp.
* WebProcess/Storage/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.h.
* WebProcess/Storage/WebKeyValueStorageManager.messages.in: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: WebKit does not render selection in non-first ruby text nodes.
https://bugs.webkit.org/show_bug.cgi?id=92818

Reviewed by Levi Weintraub.

Source/WebCore: 

The patch is based on the one submitted by Sukolsak Sakshuwong.

The bug was caused by the fact isSelectionRoot was returning false on RenderRubyRun even though
it doesn't lay down its children in block direction.

The selection painting code assumes that all blocks in each selection root are laid down in
the containing block direction. In particular, InlineTextBox::paintSelection calls
RootInlineBox::selectionTopAdjustedForPrecedingBlock in order to determine the end of the previous
line, which in turn calls blockBeforeWithinSelectionRoot. blockBeforeWithinSelectionRoot goes
through block nodes that appears before "this" block, and selectionTopAdjustedForPrecedingBlock
assumes that to compute the end of the previous line.

Now suppose we have markup such as <ruby>Ichi<rt>One</rt></ruby><ruby>Ni<rt>Two</rt></ruby>. When
selectionTopAdjustedForPrecedingBlock is called on the line box generated for "Two", it tries to
determine the bottom of the inline box above that of "Two", which blockBeforeWithinSelectionRoot
determines to be that of "One". At this point, everything goes wrong and the selection height is
computed to be 0.

The fix to this problem is to allow RenderRubyRun to be a selection root. Since RenderRubyRun is
already an inline-block, it suffices to bypass the !nonPseudoNode() check. In fact, there is no
need to check this condition anymore as far as I can tell. The check was added in
http://trac.webkit.org/changeset/12986 but all tests added by this change set as well as the rest
of layout tests pass without this condition.

Test: fast/ruby/select-ruby.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::isSelectionRoot):

LayoutTests: 

Add a test, authored by Sukolsak Sakshuwong.

* fast/ruby/select-ruby.html: Added.
* platform/mac/fast/ruby/ruby-base-merge-block-children-crash-expected.png: Added.
* platform/mac/fast/ruby/select-ruby-expected.png: Added.
* platform/mac/fast/ruby/select-ruby-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: AXObjectCache should be initialized with topDocument
https://bugs.webkit.org/show_bug.cgi?id=107638

Reviewed by Chris Fleizach.

Initialize AXObjectCache with the top document, not the
document that axObjectCache happened to be called on, which
could be an iframe. Having an AXObjectCache with the wrong
document could cause a heap-use-after-free in
notificationPostTimerFired if the inner document was deleted
while notifications were pending.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Move V8DOMWrapper::getEventListener() to V8EventListerList
https://bugs.webkit.org/show_bug.cgi?id=107683

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrSetter):
(GenerateEventListenerCallback):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::TestEventTargetV8Internal::addEventListenerCallback):
(WebCore::TestEventTargetV8Internal::removeEventListenerCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::addEventListenerCallback):
(WebCore::TestObjV8Internal::removeEventListenerCallback):
* bindings/v8/V8DOMWrapper.cpp:
* bindings/v8/V8DOMWrapper.h:
(V8DOMWrapper):
* bindings/v8/V8EventListenerList.cpp:
(WebCore::V8EventListenerList::getEventListener):
(WebCore):
* bindings/v8/V8EventListenerList.h:
(WebCore):
(V8EventListenerList):
(WebCore::V8EventListenerList::findWrapper):
(WebCore::V8EventListenerList::clearWrapper):
(WebCore::V8EventListenerList::doFindWrapper):
(WebCore::V8EventListenerList::getHiddenProperty):
(WebCore::V8EventListenerList::findOrCreateWrapper):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::addEventListenerCallback):
(WebCore::V8DOMWindow::removeEventListenerCallback):


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