WebKit-https.git
6 years agoUnreviewed EFL Gardening on 15th Oct.
commit-queue@webkit.org [Fri, 16 Oct 2015 07:29:58 +0000 (07:29 +0000)]
Unreviewed EFL Gardening on 15th Oct.
https://bugs.webkit.org/show_bug.cgi?id=150223

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-10-16

* platform/efl/TestExpectations:

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

6 years ago[GTK] Try to fix the build after r191137
commit-queue@webkit.org [Fri, 16 Oct 2015 07:14:03 +0000 (07:14 +0000)]
[GTK] Try to fix the build after r191137
https://bugs.webkit.org/show_bug.cgi?id=150222

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-10-16
Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithKeyEvent):
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::populate):
(WebKit::WebContextMenuProxyGtk::showContextMenu):
(WebKit::WebContextMenuProxyGtk::hideContextMenu):
(WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
* UIProcess/gtk/WebContextMenuProxyGtk.h:
(WebKit::WebContextMenuProxyGtk::create):
(WebKit::WebContextMenuProxyGtk::gtkMenu):
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
(WebKit::WebPopupMenuProxyGtk::create):
(WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem):

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

6 years ago[Content Extensions] Content blocking rules are not consulted for pings
achristensen@apple.com [Fri, 16 Oct 2015 04:26:43 +0000 (04:26 +0000)]
[Content Extensions] Content blocking rules are not consulted for pings
https://bugs.webkit.org/show_bug.cgi?id=149873

Patch by Roopesh Chander <roop@roopc.net> on 2015-10-15
Reviewed by Alex Christensen.

Source/WebCore:

This patch makes requests sent through the PingLoader
respect content blocking rules. Specifically, the following
are now subject to content blocking rules:

 1. <a ping> pings
 2. Images loaded in unload / beforeunload / pagehide handlers
 3. X-XSS-Protection / CSP violation reports

Tests: http/tests/contentextensions/block-cookies-in-csp-report.html
       http/tests/contentextensions/block-cookies-in-image-load-in-onunload.html
       http/tests/contentextensions/block-cookies-in-ping.html
       http/tests/contentextensions/block-csp-report.html
       http/tests/contentextensions/block-image-load-in-onunload.html
       http/tests/contentextensions/block-ping.html
       http/tests/contentextensions/hide-on-csp-report.html

* loader/PingLoader.cpp:
(WebCore::processContentExtensionRulesForLoad):
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::sendViolationReport):

LayoutTests:

Tests for ensuring that requests loaded through the PingLoader
are subject to content blocking rules.

* http/tests/contentextensions/block-cookies-in-csp-report-expected.txt: Added.
* http/tests/contentextensions/block-cookies-in-csp-report.html: Added.
* http/tests/contentextensions/block-cookies-in-csp-report.html.json: Added.
* http/tests/contentextensions/block-cookies-in-image-load-in-onunload-expected.txt: Added.
* http/tests/contentextensions/block-cookies-in-image-load-in-onunload.html: Added.
* http/tests/contentextensions/block-cookies-in-image-load-in-onunload.html.json: Added.
* http/tests/contentextensions/block-cookies-in-ping-expected.txt: Added.
* http/tests/contentextensions/block-cookies-in-ping.html: Added.
* http/tests/contentextensions/block-cookies-in-ping.html.json: Added.
* http/tests/contentextensions/block-csp-report-expected.txt: Added.
* http/tests/contentextensions/block-csp-report.html: Added.
* http/tests/contentextensions/block-csp-report.html.json: Added.
* http/tests/contentextensions/block-image-load-in-onunload-expected.txt: Added.
* http/tests/contentextensions/block-image-load-in-onunload.html: Added.
* http/tests/contentextensions/block-image-load-in-onunload.html.json: Added.
* http/tests/contentextensions/block-ping-expected.txt: Added.
* http/tests/contentextensions/block-ping.html: Added.
* http/tests/contentextensions/block-ping.html.json: Added.
* http/tests/contentextensions/hide-on-csp-report-expected.txt: Added.
* http/tests/contentextensions/hide-on-csp-report.html: Added.
* http/tests/contentextensions/hide-on-csp-report.html.json: Added.
* http/tests/contentextensions/resources/check-ping.html: Added.
* http/tests/contentextensions/resources/delete-ping.php: Added.
* http/tests/contentextensions/resources/get-ping-data.php: Added.
* http/tests/contentextensions/resources/ping-file-path.php: Added.
* http/tests/contentextensions/resources/redirect.php: Added.
* http/tests/contentextensions/resources/save-ping.php: Added.

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

6 years agoUnreviewed gardening. Make inspector/heap/gc.html more reliable.
joepeck@webkit.org [Fri, 16 Oct 2015 03:54:06 +0000 (03:54 +0000)]
Unreviewed gardening. Make inspector/heap/gc.html more reliable.

* inspector/heap/gc.html:
Stop outputing after we see the first Full GC. Resolving waits
for pending events which could incldue more GCs.

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

6 years agoUnreviewed. Attempted EFL build fix 2 after r191159.
joepeck@webkit.org [Fri, 16 Oct 2015 03:07:25 +0000 (03:07 +0000)]
Unreviewed. Attempted EFL build fix 2 after r191159.

* PlatformEfl.cmake:

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

6 years agoUnreviewed. Attempted EFL build fix after r191159.
joepeck@webkit.org [Fri, 16 Oct 2015 02:58:36 +0000 (02:58 +0000)]
Unreviewed. Attempted EFL build fix after r191159.

* PlatformEfl.cmake:

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

6 years ago EFL build fix since r191137
gyuyoung.kim@webkit.org [Fri, 16 Oct 2015 02:51:06 +0000 (02:51 +0000)]
 EFL build fix since r191137

 Unreviewed EFL build fix.

* UIProcess/CoordinatedGraphics/WebView.cpp: Removed.

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

6 years agoUnreviewed. Build fix after r191160.
joepeck@webkit.org [Fri, 16 Oct 2015 02:36:29 +0000 (02:36 +0000)]
Unreviewed. Build fix after r191160.

* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::InspectorHeapAgent::didGarbageCollect):

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

6 years agoUnreviewed. Revert part of r191159 which caused ASSERTs.
joepeck@webkit.org [Fri, 16 Oct 2015 02:34:24 +0000 (02:34 +0000)]
Unreviewed. Revert part of r191159 which caused ASSERTs.

A review comment suggested using WeakPtr. It is not suitable
here and causes ASSERTs across threads. Will address separately.

* inspector/agents/InspectorHeapAgent.h:
* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::InspectorHeapAgent::didGarbageCollect):
(Inspector::InspectorHeapAgent::InspectorHeapAgent): Deleted.

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

6 years agoWeb Inspector: Include Garbage Collection Event in Timeline
joepeck@webkit.org [Fri, 16 Oct 2015 02:15:56 +0000 (02:15 +0000)]
Web Inspector: Include Garbage Collection Event in Timeline
https://bugs.webkit.org/show_bug.cgi?id=142510

Reviewed by Geoffrey Garen and Brian Burg.

Source/JavaScriptCore:

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
Include new files in the build.

* heap/HeapObserver.h:
(JSC::HeapObserver::~HeapObserver):
* heap/Heap.cpp:
(JSC::Heap::willStartCollection):
(JSC::Heap::didFinishCollection):
* heap/Heap.h:
(JSC::Heap::addObserver):
(JSC::Heap::removeObserver):
Allow observers on heap to add hooks for starting / ending garbage collection.

* inspector/InspectorEnvironment.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::vm):
* inspector/JSGlobalObjectInspectorController.h:
Access the VM through the InspectorEnvironment as it won't change.

* inspector/agents/InspectorHeapAgent.cpp: Added.
(Inspector::InspectorHeapAgent::InspectorHeapAgent):
(Inspector::InspectorHeapAgent::~InspectorHeapAgent):
(Inspector::InspectorHeapAgent::didCreateFrontendAndBackend):
(Inspector::InspectorHeapAgent::willDestroyFrontendAndBackend):
(Inspector::InspectorHeapAgent::enable):
(Inspector::InspectorHeapAgent::disable):
(Inspector::InspectorHeapAgent::gc):
(Inspector::protocolTypeForHeapOperation):
(Inspector::InspectorHeapAgent::willGarbageCollect):
(Inspector::InspectorHeapAgent::didGarbageCollect):
* inspector/agents/InspectorHeapAgent.h: Added.
* inspector/protocol/Heap.json: Added.
New domain and agent to handle tasks related to the JavaScriptCore heap.

Source/WebCore:

Tests: inspector/heap/garbageCollected.html
       inspector/heap/gc.html

* ForwardingHeaders/heap/HeapObserver.h: Added.
* ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Added.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Forwarding headers.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::vm):
* inspector/InspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::vm):
* inspector/WorkerInspectorController.h:
Implement InspectorEnvironment::vm and create a Heap agent for the
Page inspector controller.

Source/WebInspectorUI:

* UserInterface/Base/Utilities.js:
(Array.prototype.partition):
Helper to partition an Array into two arrays.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Test.html:
* UserInterface/Test/Test.js:
(WebInspector.loaded):
* UserInterface/Protocol/HeapObserver.js: Added.
(WebInspector.HeapObserver.prototype.garbageCollected):
(WebInspector.HeapObserver):
Create the new observer and manager.

* UserInterface/Models/GarbageCollection.js: Added.
(WebInspector.GarbageCollection):
(WebInspector.GarbageCollection.fromPayload):
(WebInspector.GarbageCollection.prototype.get type):
(WebInspector.GarbageCollection.prototype.get startTime):
(WebInspector.GarbageCollection.prototype.get endTime):
(WebInspector.GarbageCollection.prototype.get duration):
Model object for Heap.GarbageCollection.

* UserInterface/Controllers/HeapManager.js: Added.
(WebInspector.HeapManager):
(WebInspector.HeapManager.prototype.garbageCollected):
Dispatch events with the GC object.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype._garbageCollected):
Include new GC Timeline Events as Script events.

* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
For the Script overview, make two sets of bars, one for Scripts and one for GCs.
The GCs bar will be overlaid on top of the the Scripts bar. This is particularly
useful since a GC can happen during script execution.

* UserInterface/Images/TimelineRecordGarbageCollection.svg: Added.
* UserInterface/Main.html:
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype.isGarbageCollection):
(WebInspector.ScriptTimelineRecord.EventType.displayName):
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ScriptTimelineDataGridNode):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype._processPendingRecords):
* UserInterface/Views/SourceCodeTimelineTreeElement.js:
(WebInspector.SourceCodeTimelineTreeElement):
* UserInterface/Views/TimelineIcons.css:
(.garbage-collection-profile-record .icon):
* UserInterface/Views/TimelineRecordBar.css:
(.timeline-record-bar.timeline-record-type-script.script-timeline-record-garbage-collected > .segment):
UI for GC events.

* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.createCombinedBars):
Simplify by storing start time into a variable.

* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
Icon for GC events.

LayoutTests:

* inspector/heap/garbageCollected-expected.txt: Added.
* inspector/heap/garbageCollected.html: Added.
* inspector/heap/gc-expected.txt: Added.
* inspector/heap/gc.html: Added.

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

6 years agoRemove deprecated function insertRule(), replace with appendRule()
dino@apple.com [Fri, 16 Oct 2015 01:33:00 +0000 (01:33 +0000)]
Remove deprecated function insertRule(), replace with appendRule()
https://bugs.webkit.org/show_bug.cgi?id=150188

Unreviewed. This was a mistake in my review of Ryan's patch.
The CSSOM is confusing. This test was not always using a CSSKeyframesRule
object, so it should still be calling insertRule. This does produce
a console message, so added that to the expected result.

* http/tests/css/resources/shared-stylesheet-mutation.js:
(executeTests): Back to insertRule.
* http/tests/css/shared-stylesheet-mutation-expected.txt:
* http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt:

* http/tests/css/resources/shared-stylesheet-mutation.js:
(executeTests): Back to insertRule.

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

6 years agoUnreviewed, rolling out r191156.
commit-queue@webkit.org [Fri, 16 Oct 2015 00:34:38 +0000 (00:34 +0000)]
Unreviewed, rolling out r191156.
https://bugs.webkit.org/show_bug.cgi?id=150215

Introduced crashing test (Requested by bradee-oh on #webkit).

Reverted changeset:

"Modern IDB: Support IDBDatabase.close()."
https://bugs.webkit.org/show_bug.cgi?id=150150
http://trac.webkit.org/changeset/191156

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

6 years agoModern IDB: Support IDBDatabase.close().
beidson@apple.com [Fri, 16 Oct 2015 00:25:02 +0000 (00:25 +0000)]
Modern IDB: Support IDBDatabase.close().
https://bugs.webkit.org/show_bug.cgi?id=150150

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by changes to storage/indexeddb/modern/opendatabase-versions.html).

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::databaseConnectionClosed):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:

* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::IDBDatabase):
(WebCore::IDBClient::IDBDatabase::~IDBDatabase):
(WebCore::IDBClient::IDBDatabase::close):
(WebCore::IDBClient::IDBDatabase::maybeCloseInServer):
(WebCore::IDBClient::IDBDatabase::commitTransaction):
* Modules/indexeddb/client/IDBDatabaseImpl.h:
(WebCore::IDBClient::IDBDatabase::databaseConnectionIdentifier):

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::result):

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::databaseConnectionClosed):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::hasNonFinishedTransactions):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::databaseConnectionClosed):
* Modules/indexeddb/shared/InProcessIDBServer.h:

LayoutTests:

* storage/indexeddb/modern/opendatabase-versions-expected.txt:
* storage/indexeddb/modern/opendatabase-versions.html:

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

6 years agoPatch parseKeywordValue to accept "unset" so that it goes down the faster parsing...
hyatt@apple.com [Fri, 16 Oct 2015 00:18:35 +0000 (00:18 +0000)]
Patch parseKeywordValue to accept "unset" so that it goes down the faster parsing path.
https://bugs.webkit.org/show_bug.cgi?id=150213

Reviewed by Dean Jackson.

No new tests as correctness doesn't change (just speed).

* css/CSSParser.cpp:
(WebCore::parseKeywordValue):

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

6 years agoMarking another disk-cache test as flaky on mac-wk2
commit-queue@webkit.org [Fri, 16 Oct 2015 00:09:38 +0000 (00:09 +0000)]
Marking another disk-cache test as flaky on mac-wk2
https://bugs.webkit.org/show_bug.cgi?id=149087

Patch by Ryan Haddad <ryanhaddad@apple.com> on 2015-10-15
Reviewed by Alexey Proskuryakov.

* platform/mac-wk2/TestExpectations:

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

6 years agoAdd support for the CSS 'unset' keyword.
hyatt@apple.com [Thu, 15 Oct 2015 23:54:46 +0000 (23:54 +0000)]
Add support for the CSS 'unset' keyword.
https://bugs.webkit.org/show_bug.cgi?id=148614

Reviewed by Dean Jackson.

Source/WebCore:

Added new test in fast/css, and existing variables tests also use unset in several tests.

* WebCore.xcodeproj/project.pbxproj:
Add CSSUnsetValue.cpp to the project.

* bindings/objc/DOMCSS.mm:
(kitClass):
Make sure UNSET is handled in the switch.

* css/CSSParser.cpp:
(WebCore::parseKeywordValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseCustomPropertyDeclaration):
Add cases to create a CSSUnsetValue properly.

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::styleImage):
(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillClip):
(WebCore::CSSToStyleMap::mapFillComposite):
(WebCore::CSSToStyleMap::mapFillBlendMode):
(WebCore::CSSToStyleMap::mapFillOrigin):
(WebCore::CSSToStyleMap::mapFillImage):
(WebCore::CSSToStyleMap::mapFillRepeatX):
(WebCore::CSSToStyleMap::mapFillRepeatY):
(WebCore::convertToLengthSize):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapFillMaskSourceType):
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapAnimationTrigger):
The background and animation functions need to check for unset and be able to map it properly to initial. This is done
with a new treatAsInitial method on CSSValue that can take the property ID and check for both initial
or unset on a non-inherited property.

* css/CSSUnsetValue.cpp: Added.
(WebCore::CSSUnsetValue::customCSSText):
* css/CSSUnsetValue.h: Added.
(WebCore::CSSUnsetValue::create):
(WebCore::CSSUnsetValue::equals):
(WebCore::CSSUnsetValue::CSSUnsetValue):
This new value looks exactly like CSSInheritedValue and CSSInitialValue.

* css/CSSValue.cpp:
(WebCore::CSSValue::cssValueType):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::isInvalidCustomPropertyValue):
(WebCore::CSSValue::treatAsInheritedValue):
(WebCore::CSSValue::treatAsInitialValue):
* css/CSSValue.h:
(WebCore::CSSValue::isUnsetValue):
Add isUnsetValue and the UnsetClass. Add support for treatAsInheritedValue and treatAsInitialValue to have
a way to query for initial/inherit or the matching unset type.

* css/CSSValueKeywords.in:
Add the unset keyword.

* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::CSSValuePool):
* css/CSSValuePool.h:
(WebCore::CSSValuePool::createUnsetValue):
Have a singleton model for unset just like we do for inherit/initial.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
Handle unset correctly. It maps to inherit for inherited properties and initial for non-inherited ones.

LayoutTests:

* TestExpectations:
Remove the 3 failing variables tests that used the unset keyword now that they pass.

* fast/css/unset-keyword-expected.html: Added.
* fast/css/unset-keyword.html: Added.
New test for both inherited and initial properties.

* fast/css/variables/test-suite/129-expected.html: Added.
* fast/css/variables/test-suite/129.html: Added.
* fast/css/variables/test-suite/130-expected.html: Added.
* fast/css/variables/test-suite/130.html: Added.
* fast/css/variables/test-suite/134-expected.html: Added.
* fast/css/variables/test-suite/134.html: Added.
* fast/css/variables/test-suite/failures/129-expected.html: Removed.
* fast/css/variables/test-suite/failures/129.html: Removed.
* fast/css/variables/test-suite/failures/130-expected.html: Removed.
* fast/css/variables/test-suite/failures/130.html: Removed.
* fast/css/variables/test-suite/failures/134-expected.html: Removed.
* fast/css/variables/test-suite/failures/134.html: Removed.
Move these tests into the passing directory.

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

6 years agoMigrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
mmaxfield@apple.com [Thu, 15 Oct 2015 23:20:07 +0000 (23:20 +0000)]
Migrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
https://bugs.webkit.org/show_bug.cgi?id=150155

Reviewed by Tim Horton.

Source/WebCore:

No new tests because there is no behavior change.

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawPattern):
(WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::putByteArray):
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
* WebView/WebView.mm:
(-[WebView _setBaseCTM:forContext:]):

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.

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

6 years agoRemove deprecated function insertRule(), replace with appendRule()
dino@apple.com [Thu, 15 Oct 2015 23:18:09 +0000 (23:18 +0000)]
Remove deprecated function insertRule(), replace with appendRule()
https://bugs.webkit.org/show_bug.cgi?id=150188

Patch by Ryan Haddad <ryanhaddad@apple.com> on 2015-10-15
Reviewed by Dean Jackson.

* http/tests/css/resources/shared-stylesheet-mutation.js:
(executeTests):

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

6 years agoFix the iOS build. And hopefully not breaking the other builds
dino@apple.com [Thu, 15 Oct 2015 23:03:17 +0000 (23:03 +0000)]
Fix the iOS build. And hopefully not breaking the other builds
at the same time.

* UIProcess/PageClient.h:
* UIProcess/WebContextMenuProxy.cpp:
* UIProcess/WebContextMenuProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:

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

6 years agoUnreviewed, rolling out r191135.
commit-queue@webkit.org [Thu, 15 Oct 2015 23:02:43 +0000 (23:02 +0000)]
Unreviewed, rolling out r191135.
https://bugs.webkit.org/show_bug.cgi?id=150197

This patch causes 50+ LayoutTest crashes related to the
inspector (Requested by ryanhaddad on #webkit).

Reverted changeset:

"Web Inspector: JavaScriptCore should parse sourceURL and
sourceMappingURL directives"
https://bugs.webkit.org/show_bug.cgi?id=150096
http://trac.webkit.org/changeset/191135

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

6 years agoUse the context inside WebContextMenuProxyMac
andersca@apple.com [Thu, 15 Oct 2015 22:51:33 +0000 (22:51 +0000)]
Use the context inside WebContextMenuProxyMac
https://bugs.webkit.org/show_bug.cgi?id=150196

Reviewed by Tim Horton.

* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):

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

6 years agoUse the context menu location that's stored in the context data
andersca@apple.com [Thu, 15 Oct 2015 22:34:20 +0000 (22:34 +0000)]
Use the context menu location that's stored in the context data
https://bugs.webkit.org/show_bug.cgi?id=150194

Reviewed by Tim Horton.

* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):

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

6 years agoFixed the build.
mitz@apple.com [Thu, 15 Oct 2015 22:20:03 +0000 (22:20 +0000)]
Fixed the build.

* platform/network/mac/ResourceHandleMac.mm:

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

6 years agoStore the context menu data and user data in the WebContextMenuProxy object
andersca@apple.com [Thu, 15 Oct 2015 22:15:45 +0000 (22:15 +0000)]
Store the context menu data and user data in the WebContextMenuProxy object
https://bugs.webkit.org/show_bug.cgi?id=150191

Reviewed by Tim Horton.

* UIProcess/PageClient.h:
* UIProcess/WebContextMenuProxy.cpp:
(WebKit::WebContextMenuProxy::WebContextMenuProxy):
* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createContextMenuProxy):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createContextMenuProxy):
* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::create):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):

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

6 years ago[Cocoa] Stop using WKSetNSURLConnectionDefersCallbacks
mitz@apple.com [Thu, 15 Oct 2015 21:59:24 +0000 (21:59 +0000)]
[Cocoa] Stop using WKSetNSURLConnectionDefersCallbacks
https://bugs.webkit.org/show_bug.cgi?id=150189

Reviewed by Anders Carlsson.

Source/WebCore:

* platform/ios/WebCoreSystemInterfaceIOS.mm: Removed definition.
* platform/mac/WebCoreSystemInterface.h: Removed declaration.
* platform/mac/WebCoreSystemInterface.mm: Removed definition.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::start): Changed to use -[NSURLConnection setDefersLoading:].
(WebCore::ResourceHandle::platformSetDefersLoading): Ditto.

* platform/spi/cocoa/NSURLConnectionSPI.h: Added declaration of
  -[NSURLConnection setDefersLoading:].

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Removed initialization.

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Removed initialization.

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

6 years ago2015-10-15 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 15 Oct 2015 21:52:05 +0000 (21:52 +0000)]
2015-10-15  Geoffrey Garen  <ggaren@apple.com>

        Unreviewed, rolling out r191003.
        https://bugs.webkit.org/show_bug.cgi?id=150042

        We're seeing some crashes in GC beneath speculationFromCell. Maybe this
        patch caused them?

        Reverted changeset:

        CodeBlock write barriers should be precise
        https://bugs.webkit.org/show_bug.cgi?id=150042
        http://trac.webkit.org/changeset/191003

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

6 years agoFix build.
andersca@apple.com [Thu, 15 Oct 2015 21:31:09 +0000 (21:31 +0000)]
Fix build.

* UIProcess/API/APIFrameInfo.cpp:
(API::FrameInfo::~FrameInfo):
* UIProcess/API/APIFrameInfo.h:
* UIProcess/API/Cocoa/WKUserContentController.mm:

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

6 years agoCTTE menu proxies
andersca@apple.com [Thu, 15 Oct 2015 21:27:15 +0000 (21:27 +0000)]
CTTE menu proxies
https://bugs.webkit.org/show_bug.cgi?id=150187

Reviewed by Tim Horton.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPopupMenuProxy.h:
(WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy): Deleted.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::create):
(WebKit::WebContextMenuProxyMac::page):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
(WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
* UIProcess/mac/WebPopupMenuProxyMac.h:
(WebKit::WebPopupMenuProxyMac::create):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):

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

6 years agoAdd -[WKFrameInfo _handle]
andersca@apple.com [Thu, 15 Oct 2015 21:16:03 +0000 (21:16 +0000)]
Add -[WKFrameInfo _handle]
https://bugs.webkit.org/show_bug.cgi?id=150185
rdar://problem/23132371

Reviewed by Tim Horton.

* UIProcess/API/APIFrameInfo.cpp:
(API::FrameInfo::FrameInfo):
* UIProcess/API/APIFrameInfo.h:
* UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo _handle]):
* UIProcess/API/Cocoa/WKFrameInfoInternal.h:
* UIProcess/API/Cocoa/WKFrameInfoPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKFrameInfoInternal.h.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPopupMenuProxy.h:
(WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoWeb Inspector: JavaScriptCore should parse sourceURL and sourceMappingURL directives
commit-queue@webkit.org [Thu, 15 Oct 2015 20:50:02 +0000 (20:50 +0000)]
Web Inspector: JavaScriptCore should parse sourceURL and sourceMappingURL directives
https://bugs.webkit.org/show_bug.cgi?id=150096

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-10-15
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* inspector/ContentSearchUtilities.cpp:
(Inspector::ContentSearchUtilities::scriptCommentPattern): Deleted.
(Inspector::ContentSearchUtilities::findScriptSourceURL): Deleted.
(Inspector::ContentSearchUtilities::findScriptSourceMapURL): Deleted.
* inspector/ContentSearchUtilities.h:
No longer need to search script content.

* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchDidParseSource):
Carry over the sourceURL and sourceMappingURL from the SourceProvider.

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::sourceMapURLForScript):
(Inspector::InspectorDebuggerAgent::didParseSource):
No longer do content searching.

* parser/Lexer.cpp:
(JSC::Lexer<T>::setCode):
(JSC::Lexer<T>::skipWhitespace):
(JSC::Lexer<T>::parseCommentDirective):
(JSC::Lexer<T>::parseCommentDirectiveValue):
(JSC::Lexer<T>::consume):
(JSC::Lexer<T>::lex):
* parser/Lexer.h:
(JSC::Lexer::sourceURL):
(JSC::Lexer::sourceMappingURL):
(JSC::Lexer::sourceProvider): Deleted.
Give lexer the ability to detect script comment directives.
This just consumes characters in single line comments and
ultimately sets the sourceURL or sourceMappingURL found.

* parser/Parser.h:
(JSC::Parser<LexerType>::parse):
* parser/SourceProvider.h:
(JSC::SourceProvider::url):
(JSC::SourceProvider::sourceURL):
(JSC::SourceProvider::sourceMappingURL):
(JSC::SourceProvider::setSourceURL):
(JSC::SourceProvider::setSourceMappingURL):
After parsing a script, update the Source Provider with the
value of directives that may have been found in the script.

Source/WebInspectorUI:

* UserInterface/Test/InspectorProtocol.js:
(InspectorProtocol._sendMessage):
(InspectorProtocol.dispatchMessageFromBackend):
This is only used for tests, so avoid console.log
and just dump directly to the system console.

LayoutTests:

* inspector/debugger/sourceURLs-expected.txt: Added.
* inspector/debugger/sourceURLs.html: Added.
sourceURL and sourceMappingURL detection.

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

6 years agoInferredTypeTable should ref its keys
fpizlo@apple.com [Thu, 15 Oct 2015 20:34:10 +0000 (20:34 +0000)]
InferredTypeTable should ref its keys
https://bugs.webkit.org/show_bug.cgi?id=150138
rdar://problem/23080555

Reviewed by Michael Saboff.

InferredTypeTable was incorrectly using a key hash traits that caused the underlying HashTable to
store keys as UniquedStringImpl* rather than RefPtr<UniquedStringImpl>, even though the HashMap's
nominal key type was RefPtr<UniquedStringImpl>. This arose because I copy-pasted the HashMap type
instantiation from other places and then made random changes to adapt it to my needs, rather than
actually thinking about what I was doing. The solution is to remove the key hash traits argument,
since all it accomplishes is to produce this bug.

The way this bug manifested is probably best described in http://webkit.org/b/150008. After a while
the InferredTypeTable would have dangling references to its strings, if some recompilation or other
thing caused us to drop all other references to those strings. InferredTypeTable is particularly
susceptible to this because it is designed to know about a superset of the property names that its
client Structures know about. The debug assert would then happen when we rehashed the
InferredTypeTable's HashMap, because we'd try to get the hashes of strings that were already
deleted. AFAICT, we didn't have release crashes arising from those strings' memory being returned
to the OS - but it's totally possible that this could have happened. So, we definitely should treat
this bug as more than just a debug issue.

Interestingly, we could have also solved this problem by changing the hash function to use PtrHash.
In all other ways, it's OK for InferredTypeTable to hold dangling references, since it uses the
address of the UniquedStringImpl as a way to name an abstract heap. It's fine if the name of an
abstract heap is a bogus memory address, and it's also fine if that name referred to an entirely
different UniquedStringImpl at some point in the past. That's a nice benefit of any data structure
that keys by abstract heap - if two of them get unified then it's no big deal. I've filed another
bug, http://webkit.org/b/150137 about changing all of our UniquedStringImpl* hashing to use
PtrHash.

* runtime/Identifier.h: Add a comment about http://webkit.org/b/150137.
* runtime/InferredTypeTable.h: Fix the bug.
* tests/stress/inferred-type-table-stale-identifiers.js: Added. I couldn't get this to cause a crash before my change, but it's an interesting test nonetheless.

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

6 years agoUpdate the help message of --system-malloc
ossy@webkit.org [Thu, 15 Oct 2015 20:21:06 +0000 (20:21 +0000)]
Update the help message of --system-malloc
https://bugs.webkit.org/show_bug.cgi?id=150169

Reviewed by Geoffrey Garen.

* Scripts/webkitperl/FeatureList.pm:

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

6 years agoCSSKeyframesRule::appendRule is deprecated, but is actually the spec
dino@apple.com [Thu, 15 Oct 2015 19:57:43 +0000 (19:57 +0000)]
CSSKeyframesRule::appendRule is deprecated, but is actually the spec
https://bugs.webkit.org/show_bug.cgi?id=150113

Reviewed by Simon Fraser.

Source/WebCore:

I stupidly deprecated the wrong function in
http://trac.webkit.org/changeset/174469

* css/CSSKeyframesRule.cpp:
(WebCore::CSSKeyframesRule::insertRule): Swap the code between these two.
(WebCore::CSSKeyframesRule::appendRule):

LayoutTests:

Update tests to deprecate the correct function.

* animations/change-keyframes-expected.txt:
* animations/keyframes-rule.html:
* animations/unprefixed-keyframes-rule.html:

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

6 years agoThe menu location and menu items should be part of ContextMenuContextData
andersca@apple.com [Thu, 15 Oct 2015 19:56:38 +0000 (19:56 +0000)]
The menu location and menu items should be part of ContextMenuContextData
https://bugs.webkit.org/show_bug.cgi?id=150182

Reviewed by Andreas Kling.

* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::menuLocation):
(WebKit::ContextMenuContextData::menuItems):
(WebKit::ContextMenuContextData::ContextMenuContextData):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showSelectionServiceMenu):
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):

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

6 years agoAdd MASM_PROBE support for ARM64.
mark.lam@apple.com [Thu, 15 Oct 2015 19:54:02 +0000 (19:54 +0000)]
Add MASM_PROBE support for ARM64.
https://bugs.webkit.org/show_bug.cgi?id=150128

Reviewed by Michael Saboff.

* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/ARM64Assembler.h:
- Convert the ARM64 registers enum list into a macro list so that we can use
  it elsewhere e.g. to declare fields in the probe CPUState.
  Also de-tabbed the contents of the ARM64Registers namespace since the enum
  list change touches almost all of it anyway. This reduces the amount of
  complaints from the style checker.

* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::CPUState::registerName):
(JSC::AbstractMacroAssembler::CPUState::registerValue):
- Change CPUState methods to allow for registers ID that do not map to one of
  its fields. This is needed because ARM64's registers include aliases for some
  register names. The CPUState will not allocate separate storage for the
  aliases.

* assembler/MacroAssemblerARM64.cpp: Added.
(JSC::arm64ProbeTrampoline):
- Unlike the probe mechanism for other CPUs, the ARM64 implementation does not
  allow the probe function to modify the sp and pc registers.  We insert this
  wrapper function between ctiMasmProbeTrampoline() and the user's probe function
  so that we can check if the user tried to modify sp and pc.  If so, we will
  print an error message so that we can alert the user that we don't support
  that on ARM64.

  See the comment in ctiMasmProbeTrampoline() in JITStubsARM64.h for details
  on why we cannot support sp and pc modifications by the probe function.

(JSC::MacroAssemblerARM64::probe):

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::repatchCall):
(JSC::MacroAssemblerARM64::makeBranch):
* jit/JITStubs.cpp:
* jit/JITStubsARM64.h: Added.

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

6 years ago[Win] Update anonymous table results for Win port.
zalan@apple.com [Thu, 15 Oct 2015 19:52:34 +0000 (19:52 +0000)]
[Win] Update anonymous table results for Win port.

Unreviewed gardening.

* platform/win/css2.1/tables/table-anonymous-objects-103-expected.txt: Added.
* platform/win/css2.1/tables/table-anonymous-objects-104-expected.txt: Added.
* platform/win/css2.1/tables/table-anonymous-objects-117-expected.txt: Added.
* platform/win/css2.1/tables/table-anonymous-objects-118-expected.txt: Added.
* platform/win/css2.1/tables/table-anonymous-objects-119-expected.txt: Added.
* platform/win/css2.1/tables/table-anonymous-objects-120-expected.txt: Added.

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

6 years agoImplement CSS Variables.
hyatt@apple.com [Thu, 15 Oct 2015 19:48:58 +0000 (19:48 +0000)]
Implement CSS Variables.
https://bugs.webkit.org/show_bug.cgi?id=19660

Reviewed by Dean Jackson.

Source/WebCore:

Added new tests in fast/css/custom-properties and fast/css/variables.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Add CSSVariableValue.cpp and CSSVariableDependentValue.cpp to builds.

* css/CSSCalculationValue.cpp:
(WebCore::hasDoubleValue):
Handle the new CSS_PARSER_WHITESPACE value.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::customPropertyValue):
Patched to make sure style is updated so that dynamic changes to custom properties are reflected
immediately when querying values.

(WebCore::CSSComputedStyleDeclaration::length):
(WebCore::CSSComputedStyleDeclaration::item):
The custom properties table is a reference and not a pointer now.

* css/CSSCustomPropertyValue.h:
(WebCore::CSSCustomPropertyValue::create):
(WebCore::CSSCustomPropertyValue::createInvalid):
(WebCore::CSSCustomPropertyValue::customCSSText):
(WebCore::CSSCustomPropertyValue::equals):
(WebCore::CSSCustomPropertyValue::isInvalid):
(WebCore::CSSCustomPropertyValue::containsVariables):
(WebCore::CSSCustomPropertyValue::value):
(WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
The CSSCustomPropertyValue represents a custom property/value pair in the back end. It holds on
to both the property name and a CSSValueList that has the original parser terms. This class also
doubles as the invalid-at-compute-time value for custom properties when they contain cycles, etc.

* css/CSSFunctionValue.cpp:
(WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):
 * css/CSSFunctionValue.h:
(WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):
Hands back a CSSParserValue for a function with variables replaced with their real values (or fallback).

* css/CSSGrammar.y.in:
Many changes to support the var() syntax and to handle error conditions and cases.

* css/CSSParser.cpp:
(WebCore::filterProperties):
Null check the value here. Shouldn't happen, but being paranoid.

(WebCore::CSSParser::parseVariableDependentValue):
This function converts a CSSValueList back into a CSSParserValueList and then passes
it off to the parser. If the result parses, successfully, then the parsed CSSValue is handed back.

(WebCore::CSSParser::parseValue):
Detect when a property value contains variables and simply make a CSSVariableDependentValue to hold
a copy of the parser value list (as a CSSValueList). We defer parsing the list until compute-time
when we know the values of the variables to use.

(WebCore::CSSParser::parseCustomPropertyDeclaration):
Add support for inherit, initial and variable references in custom properties.

(WebCore::CSSParser::detectFunctionTypeToken):
Add support for detection of the "var" token.

(WebCore::CSSParser::realLex):
Fix the parsing of custom properties to allow "--" and to allow them to start with digits, e.g., "--0".

* css/CSSParser.h:
Add parseVariableDependentValue function for handling variable substitution and subsequent parsing
of the resolved parser value list.

* css/CSSParserValues.cpp:
(WebCore::CSSParserValueList::containsVariables):
Get rid of the toString() function (no longer needed) and replace it with containsVariables(). This
check is used to figure out if a parser value list has variables and thus needs to defer parsing
until later.

(WebCore::CSSParserValue::createCSSValue):
Add support for the creation of values for variables, CSSVariableValues.

(WebCore::CSSParserValueList::toString): Deleted.
No longer needed.

* css/CSSParserValues.h:
Add CSSParserVariable as a new kind of parser value. This represents a var() that is encountered
during parsing. It is similar to a function except it has to hold both the reference (custom property name)
and fallback arguments.

* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):
Add support for CSS_PARSER_WHITESPACE as a way of preserving whitespace as a parsed item (variables can
be only whitespace, and this has to be retained).

(WebCore::CSSPrimitiveValue::buildParserValue):
Conversion from a CSSPrimitiveValue back into a parser value is handled by this function.

* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isParserOperator):
(WebCore::CSSPrimitiveValue::parserOperator):
Add ability to get parser operator info. Add the buildParserValue declaration.

* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):
(WebCore::CSSValue::isInvalidCustomPropertyValue):
* css/CSSValue.h:
Add support for variable values and variable dependent values.

* css/CSSValueList.cpp:
(WebCore::CSSValueList::customCSSText):
Improve serialization to not output extra spaces when a comma operator is a value.

(WebCore::CSSValueList::containsVariables):
Whether or not a CSSVariableValue can be found somewhere within the list (or its descendants).

(WebCore::CSSValueList::checkVariablesForCycles):
Called to check variables for cycles.

(WebCore::CSSValueList::buildParserValueSubstitutingVariables):
(WebCore::CSSValueList::buildParserValueListSubstitutingVariables):
Functions that handle converting the value list to a parser value list while making
variable substitutions along the way.

* css/CSSValueList.h:
Add the new buildParserXXX functions.

* css/CSSVariableDependentValue.cpp: Added.
(WebCore::CSSVariableDependentValue::checkVariablesForCycles):
* css/CSSVariableDependentValue.h: Added.
(WebCore::CSSVariableDependentValue::create):
(WebCore::CSSVariableDependentValue::customCSSText):
(WebCore::CSSVariableDependentValue::equals):
(WebCore::CSSVariableDependentValue::propertyID):
(WebCore::CSSVariableDependentValue::valueList):
(WebCore::CSSVariableDependentValue::CSSVariableDependentValue):
This value represents a list of terms that have not had variables substituted yet. The list
is held by the value so that it can be converted back into a parser value list once the
variable values are known.

* css/CSSVariableValue.cpp: Added.
(WebCore::CSSVariableValue::CSSVariableValue):
(WebCore::CSSVariableValue::customCSSText):
(WebCore::CSSVariableValue::equals):
(WebCore::CSSVariableValue::buildParserValueListSubstitutingVariables):
* css/CSSVariableValue.h: Added.
(WebCore::CSSVariableValue::create):
(WebCore::CSSVariableValue::name):
(WebCore::CSSVariableValue::fallbackArguments):
This value represents a var() itself. It knows how to do the substitution of the variable
value and to apply fallback if that value is not present.

* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::borderSpacingValue):
(WebCore::StyleProperties::getLayeredShorthandValue):
(WebCore::StyleProperties::getShorthandValue):
(WebCore::StyleProperties::getCommonValue):
(WebCore::StyleProperties::getPropertyCSSValue):
(WebCore::StyleProperties::getPropertyCSSValueInternal):
(WebCore::StyleProperties::asText):
(WebCore::StyleProperties::copyPropertiesInSet):
* css/StyleProperties.h:
Patched to factor property fetching into an internal method so that variables can work with shorthands
in the CSS OM.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
Resolve variable values at compute time. If they fail to resolve, use inherit or initial as the
value (depending on whether the property inherits by default).

(WebCore::StyleResolver::resolvedVariableValue):
Helper function that calls parseVariableDependentValue and gets the resolved result.

(WebCore::StyleResolver::applyCascadedProperties):
After custom properties have been collected, we check for cycles and perform variable substitutions.
This way we get all the variables replaced before we inherit down the style tree.

* css/StyleResolver.h:
Add resolvedVariableValue declaration.

* css/makeprop.pl:
Make sure custom properties are inherited by default.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::checkVariablesInCustomProperties):
This function handles updating variables with cycles to be invalid in the RenderStyle. It then also
handles the replacement of variables found in custom properties with resolved values. All custom
properties are either invalid or are real non-variable-dependent value lists after this function
completes.

* rendering/style/RenderStyle.h:
Add checkVariablesInCustomProperties declaration.

* rendering/style/StyleCustomPropertyData.h:
(WebCore::StyleCustomPropertyData::create):
(WebCore::StyleCustomPropertyData::copy):
(WebCore::StyleCustomPropertyData::operator==):
(WebCore::StyleCustomPropertyData::operator!=):
(WebCore::StyleCustomPropertyData::setCustomPropertyValue):
(WebCore::StyleCustomPropertyData::getCustomPropertyValue):
(WebCore::StyleCustomPropertyData::values):
(WebCore::StyleCustomPropertyData::hasCustomProperty):
(WebCore::StyleCustomPropertyData::containsVariables):
(WebCore::StyleCustomPropertyData::setContainsVariables):
(WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
Miscellaneous cleanup, and the addition of whether or not the properties still contain variable
dependent values that need to be resolved.

LayoutTests:

* fast/css/custom-properties/inheritance-expected.html: Added.
* fast/css/custom-properties/inheritance.html: Added.
* fast/css/variables: Added.
* fast/css/variables/custom-property-computed-style-access-expected.html: Added.
* fast/css/variables/custom-property-computed-style-access.html: Added.
* fast/css/variables/custom-property-dynamic-update-expected.html: Added.
* fast/css/variables/custom-property-dynamic-update.html: Added.
* fast/css/variables/custom-property-simple-cycle-expected.html: Added.
* fast/css/variables/custom-property-simple-cycle.html: Added.
* fast/css/variables/inherited-fallback-expected.html: Added.
* fast/css/variables/inherited-fallback.html: Added.
* fast/css/variables/invalid-reference-expected.html: Added.
* fast/css/variables/invalid-reference.html: Added.
* fast/css/variables/rule-property-get-css-value-expected.html: Added.
* fast/css/variables/rule-property-get-css-value.html: Added.
* fast/css/variables/rule-property-get-expected.html: Added.
* fast/css/variables/rule-property-get.html: Added.
* fast/css/variables/rule-serialization-expected.html: Added.
* fast/css/variables/rule-serialization.html: Added.

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

6 years agoFix the !(ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)) build after r191112
ossy@webkit.org [Thu, 15 Oct 2015 19:46:24 +0000 (19:46 +0000)]
Fix the !(ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)) build after r191112
https://bugs.webkit.org/show_bug.cgi?id=150175

Reviewed by Antti Koivisto.

* dom/ComposedTreeAncestorIterator.h:
(WebCore::ComposedTreeAncestorIterator::traverseParent):
* dom/ComposedTreeIterator.cpp:
(WebCore::ComposedTreeIterator::initializeShadowStack):
* dom/Element.cpp:
(WebCore::Element::childrenChanged):

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

6 years agoGet rid of the only once used isIntegerArray function
ossy@webkit.org [Thu, 15 Oct 2015 19:34:09 +0000 (19:34 +0000)]
Get rid of the only once used isIntegerArray function
https://bugs.webkit.org/show_bug.cgi?id=150170

Reviewed by Geoffrey Garen.

* page/Crypto.cpp:
(WebCore::Crypto::getRandomValues):

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

6 years agoFix some typos in comments.
mark.lam@apple.com [Thu, 15 Oct 2015 19:31:12 +0000 (19:31 +0000)]
Fix some typos in comments.
https://bugs.webkit.org/show_bug.cgi?id=150181

Rubber stamped by Michael Saboff.

* jit/JITStubsARM.h:
* jit/JITStubsARMv7.h:

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

6 years agoRebaselining css2.1/tables/table-anonymous-objects-045.xht for win
commit-queue@webkit.org [Thu, 15 Oct 2015 18:38:58 +0000 (18:38 +0000)]
Rebaselining css2.1/tables/table-anonymous-objects-045.xht for win
https://bugs.webkit.org/show_bug.cgi?id=150125

Patch by Ryan Haddad <ryanhaddad@apple.com> on 2015-10-15
Reviewed by Zalan Bujtas.

* platform/win/css2.1/tables/table-anonymous-objects-045-expected.txt:

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

6 years agoRefactoring: give the MASM probe CPUState methods shorter names.
mark.lam@apple.com [Thu, 15 Oct 2015 18:37:38 +0000 (18:37 +0000)]
Refactoring: give the MASM probe CPUState methods shorter names.
https://bugs.webkit.org/show_bug.cgi?id=150177

Reviewed by Michael Saboff.

The existing names are longer than they need to be.  Renaming them as follows:
    For GPR, registerName ==> gprName
    For GPR, registerValue ==> gpr
    For FPR, registerName ==> fprName
    For FPR, registerValue ==> fpr

* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::CPUState::gprName):
(JSC::AbstractMacroAssembler::CPUState::fprName):
(JSC::AbstractMacroAssembler::CPUState::gpr):
(JSC::AbstractMacroAssembler::CPUState::fpr):
(JSC::AbstractMacroAssembler::CPUState::registerName): Deleted.
(JSC::AbstractMacroAssembler::CPUState::registerValue): Deleted.

* assembler/MacroAssemblerPrinter.cpp:
(JSC::printRegister):
(JSC::printMemory):
- Updated to use the new names.

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

6 years ago[iOS] Update anonymous table results for iOS port.
zalan@apple.com [Thu, 15 Oct 2015 18:09:50 +0000 (18:09 +0000)]
[iOS] Update anonymous table results for iOS port.

Unreviewed gardening.

* platform/ios-simulator/css2.1/tables/table-anonymous-objects-103-expected.txt: Added.
* platform/ios-simulator/css2.1/tables/table-anonymous-objects-104-expected.txt: Added.
* platform/ios-simulator/css2.1/tables/table-anonymous-objects-117-expected.txt: Added.
* platform/ios-simulator/css2.1/tables/table-anonymous-objects-118-expected.txt: Added.
* platform/ios-simulator/css2.1/tables/table-anonymous-objects-119-expected.txt: Added.
* platform/ios-simulator/css2.1/tables/table-anonymous-objects-120-expected.txt: Added.

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

6 years agoTry to fix the iOS build.
timothy_horton@apple.com [Thu, 15 Oct 2015 18:02:47 +0000 (18:02 +0000)]
Try to fix the iOS build.

* page/EventHandler.h:

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

6 years agoUpdate ImportExpectations according currently imported wpt tests
youenn.fablet@crf.canon.fr [Thu, 15 Oct 2015 17:45:43 +0000 (17:45 +0000)]
Update ImportExpectations according currently imported wpt tests
https://bugs.webkit.org/show_bug.cgi?id=150158

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* resources/ImportExpectations:

Tools:

* Scripts/webkitpy/w3c/test_downloader.py:
(TestDownloader.copy_tests): ensuring that directories marked as [ Skip ] are not copied.

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

6 years agoAnonymous table objects: Collapse anonymous table rows.
zalan@apple.com [Thu, 15 Oct 2015 17:30:26 +0000 (17:30 +0000)]
Anonymous table objects: Collapse anonymous table rows.
https://bugs.webkit.org/show_bug.cgi?id=150154

Reviewed by David Hyatt.

Merge anonymous table rows when they are not needed anymore.
Generated table rows can be collapsed into one when there's no
non-generated sibling table row left in the tree.

Import W3C CSS2.1 anonymous table tests.

Source/WebCore:

* rendering/RenderObject.cpp:
(WebCore::collapseAnonymousTableRowsIfNeeded):
(WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):

LayoutTests:

* css2.1/tables/table-anonymous-objects-103.xht: Added.
* css2.1/tables/table-anonymous-objects-104.xht: Added.
* css2.1/tables/table-anonymous-objects-117.xht: Added.
* css2.1/tables/table-anonymous-objects-118.xht: Added.
* css2.1/tables/table-anonymous-objects-119.xht: Added.
* css2.1/tables/table-anonymous-objects-120.xht: Added.
* platform/mac/css2.1/tables/table-anonymous-objects-103-expected.txt: Added.
* platform/mac/css2.1/tables/table-anonymous-objects-104-expected.txt: Added.
* platform/mac/css2.1/tables/table-anonymous-objects-117-expected.txt: Added.
* platform/mac/css2.1/tables/table-anonymous-objects-118-expected.txt: Added.
* platform/mac/css2.1/tables/table-anonymous-objects-119-expected.txt: Added.
* platform/mac/css2.1/tables/table-anonymous-objects-120-expected.txt: Added.

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

6 years agoUn-indent contents of the WebCore namespace
simon.fraser@apple.com [Thu, 15 Oct 2015 17:23:32 +0000 (17:23 +0000)]
Un-indent contents of the WebCore namespace
in GraphicsContext.h. No code changes.

* platform/graphics/GraphicsContext.h:

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

6 years agoMove ImageBuffer:clip() into GraphicsContextCG
simon.fraser@apple.com [Thu, 15 Oct 2015 17:20:10 +0000 (17:20 +0000)]
Move ImageBuffer:clip() into GraphicsContextCG
https://bugs.webkit.org/show_bug.cgi?id=150140

Reviewed by Zalan Bujtas.

Move the guts of CG's ImageBuffer:clip() into GraphicsContextCG.

* platform/graphics/GraphicsContext.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::clipToNativeImage):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::clip):

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

6 years ago[Win] Unreviewed gardenining after r190816.
bfulgham@apple.com [Thu, 15 Oct 2015 16:54:49 +0000 (16:54 +0000)]
[Win] Unreviewed gardenining after r190816.

Update Windows expectation to match new mac test expectation.

* platform/win/svg/custom/simple-text-double-shadow-expected.txt:

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

6 years agoUnreviewed fix of a test after r190687.
rniwa@webkit.org [Thu, 15 Oct 2015 16:44:33 +0000 (16:44 +0000)]
Unreviewed fix of a test after r190687.

* tests/admin-regenerate-manifest.js:

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

6 years agoModern IDB: Add basic transaction committing.
beidson@apple.com [Thu, 15 Oct 2015 16:41:30 +0000 (16:41 +0000)]
Modern IDB: Add basic transaction committing.
https://bugs.webkit.org/show_bug.cgi?id=150147

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/opendatabase-versions.html

* Modules/indexeddb/IDBTransaction.h:

* Modules/indexeddb/IndexedDB.h:

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::commitTransaction):
(WebCore::IDBClient::IDBConnectionToServer::didCommitTransaction):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:

* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
(WebCore::IDBClient::IDBDatabase::commitTransaction):
(WebCore::IDBClient::IDBDatabase::didCommitTransaction):
(WebCore::IDBClient::IDBDatabase::didAbortTransaction):
(WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
* Modules/indexeddb/client/IDBDatabaseImpl.h:

* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::IDBFactory::open):

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::IDBTransaction):
(WebCore::IDBClient::IDBTransaction::db):
(WebCore::IDBClient::IDBTransaction::hasPendingActivity):
(WebCore::IDBClient::IDBTransaction::isActive):
(WebCore::IDBClient::IDBTransaction::scheduleOperationTimer):
(WebCore::IDBClient::IDBTransaction::operationTimerFired):
(WebCore::IDBClient::IDBTransaction::commit):
(WebCore::IDBClient::IDBTransaction::didCommit):
(WebCore::IDBClient::IDBTransaction::fireOnComplete):
(WebCore::IDBClient::IDBTransaction::fireOnAbort):
(WebCore::IDBClient::IDBTransaction::enqueueEvent):
(WebCore::IDBClient::IDBTransaction::dispatchEvent):
* Modules/indexeddb/client/IDBTransactionImpl.h:
(WebCore::IDBClient::IDBTransaction::database):

* Modules/indexeddb/legacy/LegacyTransaction.cpp:
(WebCore::LegacyTransaction::db):
* Modules/indexeddb/legacy/LegacyTransaction.h:

* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::didCommitTransaction):
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h:

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::registerTransaction):
(WebCore::IDBServer::IDBServer::unregisterTransaction):
(WebCore::IDBServer::IDBServer::commitTransaction):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::generateUniqueCallbackIdentifier):
(WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::performErrorCallback):
(WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
(WebCore::IDBServer::UniqueIDBDatabase::server):

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:

* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

* Modules/indexeddb/shared/IDBDatabaseInfo.h:
(WebCore::IDBDatabaseInfo::setVersion):

* Modules/indexeddb/shared/IDBError.cpp:
(WebCore::IDBError::isolatedCopy):
* Modules/indexeddb/shared/IDBError.h:

* Modules/indexeddb/shared/IDBRequestData.h:

* Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::IDBResourceIdentifier::isolatedCopy):
* Modules/indexeddb/shared/IDBResourceIdentifier.h:

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::didCommitTransaction):
(WebCore::InProcessIDBServer::commitTransaction):
* Modules/indexeddb/shared/InProcessIDBServer.h:

* WebCore.xcodeproj/project.pbxproj:

* platform/CrossThreadCopier.cpp:
(WebCore::IDBResourceIdentifier>::copy):
(WebCore::IDBError>::copy):
* platform/CrossThreadCopier.h:

LayoutTests:

* storage/indexeddb/modern/opendatabase-versions-expected.txt: Added.
* storage/indexeddb/modern/opendatabase-versions.html: Added.

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

6 years ago[iOS] DOM click event may not be dispatched when page has :active style and <input...
dbates@webkit.org [Thu, 15 Oct 2015 16:08:24 +0000 (16:08 +0000)]
[iOS] DOM click event may not be dispatched when page has :active style and <input type="search">
https://bugs.webkit.org/show_bug.cgi?id=144451
<rdar://problem/23099482>

Reviewed by Simon Fraser.

Source/WebCore:

Fixes an issue where a DOM click event is not dispatched to an element in a subframe on a page
that has a <input type="search"> and defines a CSS :active pseudo-class for the HTML body element.

On iOS we only dispatch a DOM click event if the content does not change as part
of dispatching a DOM mousemove event at the tapped element. In particular, we do not
dispatch a DOM click event if there is a visibility change to some element on the page
as part of dispatching a mousemove event at the tapped element. For a web page
that specifies CSS :active pseudo-class and contains a search field, applying/unapplying
this pseudo-class as part of dispatching a DOM mousemove event may cause the
visibility of the search field cancel button to change; => a DOM click event will not
be dispatched to the tapped element.

Tests: fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html
       fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html
       fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html
       fast/forms/search/search-cancel-in-formerly-invisible-element.html
       fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html
       fast/forms/search/search-cancel-toggle-visibility-initially-visible.html

* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::updateCancelButtonVisibility): Write logic for determining
whether the visibility of the cancel button changed in terms of m_isCancelButtonVisible
instead of querying for the current style data as the latter is overwritten on a full
style recalculation.
(WebCore::RenderSearchField::RenderSearchField): Deleted.
(WebCore::RenderSearchField::visibilityForCancelButton): Deleted.
* rendering/RenderSearchField.h: Define instance variable m_isCancelButtonVisible to
store the visibility state of the cancel button.

LayoutTests:

Add a test to ensure that a DOM click event is dispatched to an element in a subframe on a page
with a search field and that specifies a CSS :active pseudo-class that changes the tap highlight
color.

Additionally, add tests to ensure we update the cancel button visibility whenever the visibility
of the search field changes.

* fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field-expected.txt: Added.
* fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html: Added.
* fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled-expected.html: Added.
* fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html: Added.
* fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly-expected.html: Added.
* fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html: Added.
* fast/forms/search/search-cancel-in-formerly-invisible-element-expected.html: Added.
* fast/forms/search/search-cancel-in-formerly-invisible-element.html: Added.
* fast/forms/search/search-cancel-toggle-visibility-initially-hidden-expected.html: Added.
* fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html: Added.
* fast/forms/search/search-cancel-toggle-visibility-initially-visible-expected.html: Added.
* fast/forms/search/search-cancel-toggle-visibility-initially-visible.html: Added.

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

6 years agoImplement iterator for traversing composed ancestors
antti@apple.com [Thu, 15 Oct 2015 15:12:39 +0000 (15:12 +0000)]
Implement iterator for traversing composed ancestors
https://bugs.webkit.org/show_bug.cgi?id=150162

Reviewed by Andreas Kling.

The existing general purpose ComposedTreeIterator can traverse parent chain but not efficiently
(since it builds stack). Add a separate stackless iterator for ancestor chain traversal.

* WebCore.xcodeproj/project.pbxproj:
* dom/ComposedTreeAncestorIterator.h: Added.
(WebCore::ComposedTreeAncestorIterator::operator*):
(WebCore::ComposedTreeAncestorIterator::operator->):
(WebCore::ComposedTreeAncestorIterator::operator==):
(WebCore::ComposedTreeAncestorIterator::operator!=):
(WebCore::ComposedTreeAncestorIterator::operator++):
(WebCore::ComposedTreeAncestorIterator::get):
(WebCore::ComposedTreeAncestorIterator::ComposedTreeAncestorIterator):
(WebCore::ComposedTreeAncestorIterator::traverseParent):
(WebCore::ComposedTreeAncestorAdapter::ComposedTreeAncestorAdapter):
(WebCore::ComposedTreeAncestorAdapter::begin):
(WebCore::ComposedTreeAncestorAdapter::end):
(WebCore::ComposedTreeAncestorAdapter::first):
(WebCore::composedTreeAncestors):
* dom/ComposedTreeIterator.h:
* dom/ContainerNode.h:
(WebCore::Node::highestAncestor):
(WebCore::Node::isTreeScope):
(WebCore::Node::needsNodeRenderingTraversalSlowPath): Deleted.

    With NodeRenderingTraversal::parent removed this bit is no longer used.

* dom/Element.cpp:
(WebCore::Element::shadowRoot):
(WebCore::Element::addShadowRoot):
(WebCore::shouldUseNodeRenderingTraversalSlowPath): Deleted.
(WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath): Deleted.
* dom/Element.h:
(WebCore::Element::didAddUserAgentShadowRoot):
(WebCore::Element::alwaysCreateUserAgentShadowRoot):
* dom/Node.cpp:
(WebCore::Node::derefEventTarget):
(WebCore::Node::updateAncestorsForStyleRecalc):
(WebCore::traverseStyleParent): Deleted.
(WebCore::traverseFirstStyleParent): Deleted.

    Switch to iterator interface.

* dom/Node.h:
(WebCore::Node::isDocumentFragment):
(WebCore::Node::isShadowRoot):
(WebCore::Node::isNamedFlowContentNode):
(WebCore::Node::hasCustomStyleResolveCallbacks):
(WebCore::Node::setHasCustomStyleResolveCallbacks):
(WebCore::Node::setTreeScope):
(WebCore::Node::setStyleChange):
(WebCore::Node::setNeedsNodeRenderingTraversalSlowPath): Deleted.
* dom/NodeRenderingTraversal.cpp:
(WebCore::NodeRenderingTraversal::traverseParent):
(WebCore::NodeRenderingTraversal::traverseFirstChild):
(WebCore::NodeRenderingTraversal::traverseLastChild):
(WebCore::NodeRenderingTraversal::traversePreviousSibling):
(WebCore::NodeRenderingTraversal::nextInScope):
(WebCore::NodeRenderingTraversal::previousInScope):
(WebCore::NodeRenderingTraversal::parentInScope):
(WebCore::NodeRenderingTraversal::lastChildInScope):
(WebCore::NodeRenderingTraversal::parentSlow): Deleted.
* dom/NodeRenderingTraversal.h:
(WebCore::NodeRenderingTraversal::parent): Deleted.

    No longer used.

* html/HTMLSummaryElement.cpp:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::isChildAllowed):

    Switch to iterator interface.

* style/RenderTreePosition.cpp:
* style/StyleResolveTree.cpp:
(WebCore::Style::updateTextRendererAfterContentChange):

    Switch to iterator interface.

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

6 years agoUnreviewed, Update my email address.
eunmi15.lee@samsung.com [Thu, 15 Oct 2015 14:54:52 +0000 (14:54 +0000)]
Unreviewed, Update my email address.

* Scripts/webkitpy/common/config/contributors.json:

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

6 years ago[ES6] Class expression should have lexical environment that has itself as an imutable...
utatane.tea@gmail.com [Thu, 15 Oct 2015 14:35:12 +0000 (14:35 +0000)]
[ES6] Class expression should have lexical environment that has itself as an imutable binding
https://bugs.webkit.org/show_bug.cgi?id=150089

Reviewed by Geoffrey Garen.

According to ES6 spec, class expression has its own lexical environment that holds itself
as an immutable binding[1] (section 14.5.14 step 2, 3, 4, 23)

As a result, even if the binding declared in the outer scope is overridden, methods inside
class expression can refer its class by the class name.

[1]: http://ecma-international.org/ecma-262/6.0/#sec-runtime-semantics-classdefinitionevaluation

* bytecompiler/NodesCodegen.cpp:
(JSC::ClassExprNode::emitBytecode):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createClassExpr):
* parser/NodeConstructors.h:
(JSC::ClassExprNode::ClassExprNode):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createClassExpr):
* tests/es6.yaml:
* tests/stress/class-expression-generates-environment.js: Added.
(shouldBe):
(shouldThrow):
(prototype.method):
(staticMethod):
(A.prototype.method):
(A.staticMethod):
(A):
* tests/stress/class-expression-should-be-tdz-in-heritage.js: Added.
(shouldThrow):
(shouldThrow.A):

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

6 years ago[GTK] Test WebKit2.RestoreSessionStateContainingFormData fails
carlosgc@webkit.org [Thu, 15 Oct 2015 08:18:58 +0000 (08:18 +0000)]
[GTK] Test WebKit2.RestoreSessionStateContainingFormData fails
https://bugs.webkit.org/show_bug.cgi?id=84960

Reviewed by Žan Doberšek.

Source/WebKit2:

Add a cross-platform implementation to LegacySessionStateCodingNone
using the new SessionState, so that non mac ports can make unit
tests that use the legacy session state coding pass.

* UIProcess/LegacySessionStateCodingNone.cpp:
(WebKit::encodeLegacySessionState):
(WebKit::decodeLegacySessionState):
(WebKit::encodeLegacySessionHistoryEntryData): Deleted.
(WebKit::decodeLegacySessionHistoryEntryData): Deleted.

Tools:

* Scripts/run-gtk-tests:
(TestRunner): Unskip tests using SessionState.
* TestWebKitAPI/PlatformGTK.cmake: Add
WKPageCopySessionStateWithFiltering test.

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

6 years agoUnreviewed. Fix wrong #ifdef added in r190615.
carlosgc@webkit.org [Thu, 15 Oct 2015 08:16:53 +0000 (08:16 +0000)]
Unreviewed. Fix wrong #ifdef added in r190615.

This disabled accelerated compositing unconditionally.

* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore):

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

6 years agoUnreviewed GTK+ gardening. Unskip several tests that are passing now.
carlosgc@webkit.org [Thu, 15 Oct 2015 07:53:16 +0000 (07:53 +0000)]
Unreviewed GTK+ gardening. Unskip several tests that are passing now.

* platform/gtk/TestExpectations:

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

6 years ago[GTK] Missing return value on TestWebExtensions.cpp:193
carlosgc@webkit.org [Thu, 15 Oct 2015 07:51:17 +0000 (07:51 +0000)]
[GTK] Missing return value on TestWebExtensions.cpp:193
https://bugs.webkit.org/show_bug.cgi?id=149755

Unreviewed. Add missing return value.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp:
(permissionRequestCallback):

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

6 years ago[ES6] Class method should not declare any variables to upper scope.
utatane.tea@gmail.com [Thu, 15 Oct 2015 05:30:43 +0000 (05:30 +0000)]
[ES6] Class method should not declare any variables to upper scope.
https://bugs.webkit.org/show_bug.cgi?id=150115

Reviewed by Geoffrey Garen.

In the current implementation, class methods attempt to declare variables to an upper scope with their method names.
But this is not specified behavior in the ES6 spec.

And as a result, previously, we attempted to declare variables with invalid identifiers.
For example, `class A { 1() { } }` attempt to declare a variable with name `1`.
This (declaring variables with incorrect names) is not allowed in the lexical environment.
And it fires assertions in https://bugs.webkit.org/show_bug.cgi?id=150089.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass): Deleted.
* tests/stress/class-method-does-not-declare-variable-to-upper-scope.js: Added.
(shouldBe):
(A.prototype.method):
(A.staticMethod):
(A):

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

6 years ago[Win] Layout Test http/tests/multipart/multipart-replace-non-html-content.php has...
ap@apple.com [Thu, 15 Oct 2015 05:27:46 +0000 (05:27 +0000)]
[Win] Layout Test http/tests/multipart/multipart-replace-non-html-content.php has extra whitespace
https://bugs.webkit.org/show_bug.cgi?id=150130

Landing a custom expectation. The test still passes, although it surprisingly gets
the extra newline.

* platform/win/http/tests/multipart/multipart-replace-non-html-content-expected.txt: Copied from LayoutTests/http/tests/multipart/multipart-replace-non-html-content-expected.txt.

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

6 years agoAugment <input type=search>’s recent search history with the time each entry was...
commit-queue@webkit.org [Thu, 15 Oct 2015 05:19:02 +0000 (05:19 +0000)]
Augment <input type=search>’s recent search history with the time each entry was added,
in order to allow time-based clearing of search history.
https://bugs.webkit.org/show_bug.cgi?id=148388.

Patch by Zhuo Li <zachli@apple.com> on 2015-10-14
Reviewed by Darin Adler.

Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
Source/WebCore:

that consists search string and time, for recent searches in order to store additional time
information.

* WebCore.xcodeproj/project.pbxproj: Added SearchPopupMenuCocoa.h and SearchPopupMenuCocoa.mm
and sort the project file.
* loader/EmptyClients.cpp:
(WebCore::EmptySearchPopupMenu::saveRecentSearches):
(WebCore::EmptySearchPopupMenu::loadRecentSearches):
* platform/SearchPopupMenu.h:
* platform/cocoa/SearchPopupMenuCocoa.h: Added methods for SeachPopupMenuMac in WebKit
and WebPageProxyCocoa in WebKit2 to call.
* platform/cocoa/SearchPopupMenuCocoa.mm: Added.
(WebCore::searchFieldRecentSearchesStorageDirectory): Recent searches with the new structure
are stored in a new location.
(WebCore::searchFieldRecentSearchesPlistPath): Get the path for the plist of the recent
searches entries.
(WebCore::RetainPtr<NSMutableDictionary> readSearchFieldRecentSearchesPlist): Return the
recent searches plist as NSMutableDictionary.
(WebCore::fromNSDatetoSystemClockTime): Convert from NSDate to system_clock::time_point.
(WebCore::fromSystemClockTimetoNSDate): Convert from system_clock::time_point to NSDate.
(WebCore::SearchPopupMenuCocoa::saveRecentSearches): Add a dictionary where it has two pairs
that the first one is the search string and the second one is the time.
(WebCore::SearchPopupMenuCocoa::loadRecentSearches): We expect the recent search item in the
plist to be a two-pair dictionary, and convert the dictionary to the struct RecentSearch.
* platform/win/SearchPopupMenuWin.cpp:
(WebCore::SearchPopupMenuWin::saveRecentSearches): Only save the RecentSearch's search
string on Windows platform, which is what we used to do.
(WebCore::SearchPopupMenuWin::loadRecentSearches): Since we need to construct a
RecentSearch, we get the string from the app's preferences, and set the time to be
std::chrono::system_clock::time_point::min().
* platform/win/SearchPopupMenuWin.h:
* rendering/RenderSearchField.cpp: Now that m_recentSearches are Vector<RecentSearch>,
we cannot use -removeAll with a search string. Use -removeAllMatching instead to remove the
item that has its member search string equal to the search string user inputs.
(WebCore::RenderSearchField::addSearchResult):
(WebCore::RenderSearchField::itemText):

Source/WebKit/ios:

that consists search string and time, for recent searches in order to store additional time information.

* WebCoreSupport/SearchPopupMenuIOS.cpp:
(SearchPopupMenuIOS::saveRecentSearches):
(SearchPopupMenuIOS::loadRecentSearches):
* WebCoreSupport/SearchPopupMenuIOS.h:

Source/WebKit/mac:

that consists search string and time, for recent searches in order to store additional time information.

All these new RecentSearches are stored in a plist in which the structure looks like:
Root {
    "items": {
        autosave name: {
            "searches": [
                { "searchString": searchString, "date": date },
                ...
            ]
        }
    }
}

* WebCoreSupport/SearchPopupMenuMac.h:
* WebCoreSupport/SearchPopupMenuMac.mm:
(SearchPopupMenuMac::saveRecentSearches): Call saveRecentSearches in WebCore::SearchPopupMenuCocoa.
(SearchPopupMenuMac::loadRecentSearches): Call loadRecentSearches in WebCore::SearchPopupMenuCocoa.
(autosaveKey): Deleted.

Source/WebKit2:

that consists search string and time, for recent searches in order to store additional time
information.

All these new RecentSearches are stored in a plist in which the structure looks like:
Root {
    "items": {
        autosave name: {
            "searches": [
                { "searchString": searchString, "date": date },
                ...
            ]
        }
    }
}

* Scripts/webkit/messages.py:
(headers_for_type):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<RecentSearch>::encode): Encode the new struct RecentSearch
(IPC::ArgumentCoder<RecentSearch>::decode): Decode the new struct RecentSearch
* Shared/WebCoreArgumentCoders.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::saveRecentSearches): Call saveRecentSearches in WebCore::SearchPopupMenuCocoa.
(WebKit::WebPageProxy::loadRecentSearches): Call loadRecentSearches in WebCore::SearchPopupMenuCocoa.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):
* WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
(WebKit::WebSearchPopupMenu::saveRecentSearches):
(WebKit::WebSearchPopupMenu::loadRecentSearches):
* WebProcess/WebCoreSupport/WebSearchPopupMenu.h:

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

6 years agoUse RefPtr<Image> return type for StyleImage::image()
simon.fraser@apple.com [Thu, 15 Oct 2015 04:55:08 +0000 (04:55 +0000)]
Use RefPtr<Image> return type for StyleImage::image()
https://bugs.webkit.org/show_bug.cgi?id=150112

Reviewed by Andreas Kling.

Change StyleImage::image() and subclasses to return RefPtr<Image>
instead of a PassRefPtr<Image>.

* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderImageResource.cpp:
(WebCore::RenderImageResource::image):
* rendering/RenderImageResource.h:
* rendering/RenderImageResourceStyleImage.cpp:
(WebCore::RenderImageResourceStyleImage::image):
* rendering/RenderImageResourceStyleImage.h:
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::image):
* rendering/style/StyleCachedImage.h:
* rendering/style/StyleCachedImageSet.cpp:
(WebCore::StyleCachedImageSet::image):
* rendering/style/StyleCachedImageSet.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::image):
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleImage.h:
* rendering/style/StylePendingImage.h:

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

6 years agoGive subclasses of CSSImageGeneratorValue a consistent image() return type
simon.fraser@apple.com [Thu, 15 Oct 2015 04:47:44 +0000 (04:47 +0000)]
Give subclasses of CSSImageGeneratorValue a consistent image() return type
https://bugs.webkit.org/show_bug.cgi?id=150111

Reviewed by Andreas Kling.

CSSImageGeneratorValue and subclasses had signatures of the non-virtual image() function
with mistmatched return types; some returned RefPtr<Image>, and others PassRefPtr<Image>. Make
them all the same.

* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::image):
* css/CSSImageGeneratorValue.h:
* css/CSSNamedImageValue.cpp:
(WebCore::CSSNamedImageValue::image):
* css/CSSNamedImageValue.h:

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

6 years agoREGRESSION: Web Inspector hangs for many seconds when trying to reload page
commit-queue@webkit.org [Thu, 15 Oct 2015 03:53:49 +0000 (03:53 +0000)]
REGRESSION: Web Inspector hangs for many seconds when trying to reload page
https://bugs.webkit.org/show_bug.cgi?id=150065

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-10-14
Reviewed by Mark Lam.

When debugging Web Pages, the same Debugger (PageScriptDebugServer) is
attached to each of the different JSGlobalObjects on the page. This could
mean multiple frames or isolated scripting contexts. Therefore we should
only need to send sourceParsed events to the frontend for scripts within
this new JSGlobalObject, not any JSGlobalObject that has this debugger.

* debugger/Debugger.cpp:
(JSC::Debugger::attach):
Only send sourceParsed events for Scripts in this JSGlobalObject.

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

6 years agoMove some EventHandler initialization to the header
timothy_horton@apple.com [Thu, 15 Oct 2015 01:21:19 +0000 (01:21 +0000)]
Move some EventHandler initialization to the header
https://bugs.webkit.org/show_bug.cgi?id=150139

Reviewed by Andreas Kling.

No new tests, just cleanup.

* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler): Deleted.
* page/EventHandler.h:
Also found one member which was unused, and a few that were uninitialized.
It's likely the uninitialized ones didn't actually cause any trouble because
they are reset in lots of places, but this seems better.

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

6 years agoRemove unimplemented methods in CopiedSpace
commit-queue@webkit.org [Thu, 15 Oct 2015 01:06:39 +0000 (01:06 +0000)]
Remove unimplemented methods in CopiedSpace
https://bugs.webkit.org/show_bug.cgi?id=150143

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-10-14
Reviewed by Andreas Kling.

* heap/CopiedSpace.h:

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

6 years ago[iOS] build-dumprendertree does not build ImageDiff
aestes@apple.com [Thu, 15 Oct 2015 00:57:38 +0000 (00:57 +0000)]
[iOS] build-dumprendertree does not build ImageDiff
https://bugs.webkit.org/show_bug.cgi?id=150152

Reviewed by Tim Horton.

run-webkit-tests attempts to build the tools it requires by calling build-dumprendertree and build-webkittestrunner.
On iOS, build-dumprendertree builds the DumpRenderTree.app target, which does not contain the ImageDiff target
as a dependent. If you haven't built ImageDiff by other means (say, because you built the 'All Source' scheme in
WebKit.xcworkspace), tests that rely on image diffing won't work properly.

There's actually no reason to build the DumpRenderTree.app target on iOS; the default aggregate target works
fine on that platform, and results in ImageDiff being built.

* Scripts/build-dumprendertree:

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

6 years ago[Content Extensions] Make blocked async XHR call onerror
commit-queue@webkit.org [Thu, 15 Oct 2015 00:52:23 +0000 (00:52 +0000)]
[Content Extensions] Make blocked async XHR call onerror
https://bugs.webkit.org/show_bug.cgi?id=146706

Patch by Alex Christensen <achristensen@webkit.org> on 2015-10-14
Reviewed by Brady Eidson.

Source/WebCore:

Test: http/tests/contentextensions/async-xhr-onerror.html

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::createRequest):
(WebCore::XMLHttpRequest::networkError):
(WebCore::XMLHttpRequest::networkErrorTimerFired):
(WebCore::XMLHttpRequest::abortError):
* xml/XMLHttpRequest.h:
Make a timer that calls networkError in 0 time if a content blocker blocks the asynchronous load.
It is necessary to call setPendingActivity and dropProtection (which calls unsetPendingActivity)
to keep a reference to the XMLHttpRequest alive.

LayoutTests:

* http/tests/contentextensions/async-xhr-onerror-expected.txt: Added.
* http/tests/contentextensions/async-xhr-onerror.html: Added.
* http/tests/contentextensions/async-xhr-onerror.html.json: Added.

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

6 years ago[iOS] QuickLook documents loaded over https do not load their subresources
aestes@apple.com [Thu, 15 Oct 2015 00:21:27 +0000 (00:21 +0000)]
[iOS] QuickLook documents loaded over https do not load their subresources
https://bugs.webkit.org/show_bug.cgi?id=150145
<rdar://problem/22884521>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

When QuickLook generates an HTML preview of a document, subresources are referenced using the x-apple-ql-id scheme,
for which QuickLook installs an NSURLProtocol. If a document is loaded over https, then this scheme needs to be
considered secure in order to avoid mixed content errors.

Test: http/tests/quicklook/secure-document-with-subresources.html

* platform/SchemeRegistry.cpp:
(WebCore::secureSchemes): Registered QLPreviewProtocol() as a secure scheme.

LayoutTests:

* TestExpectations: Skipped http/tests/quicklook on all platforms.
* http/tests/quicklook/resources/secure-document-with-subresources-expected/index.css: Added.
* http/tests/quicklook/resources/secure-document-with-subresources-expected/index.html: Added.
* http/tests/quicklook/resources/secure-document-with-subresources.pages: Added.
* http/tests/quicklook/resources/webkit-icon.tiff: Added.
* http/tests/quicklook/secure-document-with-subresources-expected.html: Added.
* http/tests/quicklook/secure-document-with-subresources.html: Added.
* platform/ios-simulator/TestExpectations: Expected http/tests/quicklook to pass on iOS.

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

6 years ago[Win] Enforce launcher/library naming scheme
bfulgham@apple.com [Thu, 15 Oct 2015 00:11:54 +0000 (00:11 +0000)]
[Win] Enforce launcher/library naming scheme
https://bugs.webkit.org/show_bug.cgi?id=150124

Reviewed by Alex Christensen.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/jsc/DLLLauncherMain.cpp: Look for
{name}Lib.dll instead of {name}.dll.
(wWinMain):
* shell/PlatformWin.cmake: Add 'Lib' suffix to DLLs.

Tools:

* DumpRenderTree/PlatformWin.cmake: Use 'Lib' suffix for DLLs.
* MiniBrowser/win/CMakeLists.txt: Ditto.
* TestWebKitAPI/PlatformWin.cmake: Ditto.
* win/DLLLauncher/DLLLauncherMain.cpp:
(wWinMain): Look for a DLL named {name}Lib.dll, rather than the
original {name}.dll.

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

6 years agoFixing expectations for imported/w3c/web-platform-tests/html/dom/interfaces.html
commit-queue@webkit.org [Wed, 14 Oct 2015 23:19:20 +0000 (23:19 +0000)]
Fixing expectations for imported/w3c/web-platform-tests/html/dom/interfaces.html
https://bugs.webkit.org/show_bug.cgi?id=150144.

Patch by Ryan Haddad <ryanhaddad@apple.com> on 2015-10-14
Reviewed by Dean Jackson.

* web-platform-tests/html/dom/interfaces-expected.txt:

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

6 years agoWeb pages with unscalable viewports shouldn't have a single tap delay
wenson_hsieh@apple.com [Wed, 14 Oct 2015 21:20:50 +0000 (21:20 +0000)]
Web pages with unscalable viewports shouldn't have a single tap delay
https://bugs.webkit.org/show_bug.cgi?id=149968
<rdar://problem/23054453>

Reviewed by Simon Fraser.

Source/WebKit2:

When a viewport is unscalable (specified through the meta viewport tag) we
do not add a delay to our single tap gesture recognizer. We do this by
disabling or reinitializing the WKContentView's double tap gesture recognizer
when the viewport becomes unscalable or scalable, respectively. A viewport is
deemed unscalable when it has user-scalable = no, or when the minimum scale is
greater than or equal to the maximum scale.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]): Pulled logic
        for initializing a double tap gesture recognizer out into a helper function.
(-[WKContentView setupInteraction]):
(-[WKContentView _setDoubleTapGesturesEnabled:]): Turns gesture recognition for double
        taps on or off.

LayoutTests:

Add a layout test to check that when a viewport is unscalable (specified through
the meta viewport tag) we do not add a delay to our single tap gesture recognizer.

* fast/events/ios/unscalable-viewport-clicks-on-doubletap-expected.txt: Added.
* fast/events/ios/unscalable-viewport-clicks-on-doubletap.html: Added.

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

6 years agoWeb Inspector: Console SearchBar should work more like ContentBrowser FindBanner
joepeck@webkit.org [Wed, 14 Oct 2015 21:03:05 +0000 (21:03 +0000)]
Web Inspector: Console SearchBar should work more like ContentBrowser FindBanner
https://bugs.webkit.org/show_bug.cgi?id=149505

Patch by João Oliveira <hello@jxs.pt> on 2015-10-13
Reviewed by Joseph Pecoraro.

Console tab now uses findBanner, adapted LogContentView to use findBanner,
and findBanner to be more agnostic to both usecases, either as fixed, on console tab,
and hideable on other inspector tabs.

* UserInterface/Views/FindBanner.css:
(.find-banner.console-find-banner):
(.find-banner.console-findbanner input[type="search"]):
* UserInterface/Views/FindBanner.js:
(WebInspector.FindBanner):
(WebInspector.FindBanner.set targetElement.delayedWork):
(WebInspector.FindBanner.prototype.set targetElement):
(WebInspector.FindBanner.prototype.get showing):
(WebInspector.FindBanner.prototype.focus):
(WebInspector.FindBanner.prototype._clearAndBlur):
(WebInspector.FindBanner.prototype.show.delayedWork):
(WebInspector.FindBanner.prototype.show):
(WebInspector.FindBanner.prototype.hide):
(WebInspector.FindBanner.prototype.get element): Deleted.
(WebInspector.FindBanner.prototype._inputFieldSearch): Deleted.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.get navigationItems):
(WebInspector.LogContentView.prototype.handleFindEvent):
(WebInspector.LogContentView.prototype.findBannerRevealPreviousResult):
(WebInspector.LogContentView.prototype.findBannerRevealNextResult):
(WebInspector.LogContentView.prototype._filterMessageElements):
(WebInspector.LogContentView.prototype.findBannerPerformSearch):
(WebInspector.LogContentView.prototype.findBannerSearchCleared):
(WebInspector.LogContentView.prototype.revealNextSearchResult):
(WebInspector.LogContentView.prototype.revealPreviousSearchResult):
(WebInspector.LogContentView.prototype._performSearch):
(WebInspector.LogContentView.prototype.searchBarDidActivate): Deleted.
(WebInspector.LogContentView.prototype._searchTextDidChange): Deleted.

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

6 years agoUpdate test result for Canvas2DRenderingContext::commit.
dino@apple.com [Wed, 14 Oct 2015 20:52:04 +0000 (20:52 +0000)]
Update test result for Canvas2DRenderingContext::commit.

* web-platform-tests/html/dom/interfaces-expected.txt:

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

6 years agoREGRESSION(r190882): Concatenating a character array and an empty string is broken.
akling@apple.com [Wed, 14 Oct 2015 20:45:12 +0000 (20:45 +0000)]
REGRESSION(r190882): Concatenating a character array and an empty string is broken.
<https://webkit.org/b/150135>

Reviewed by Geoffrey Garen.

Source/WTF:

StringAdapter templates for raw character arrays were always using 1 as the array length
in toString().

* wtf/text/StringConcatenate.h:

Tools:

Add a new WTF API test that covers this issue.

* TestWebKitAPI/Tests/WTF/StringOperators.cpp:
(TestWebKitAPI::build):
(TestWebKitAPI::TEST):

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

6 years agoVersioning.
bshafiei@apple.com [Wed, 14 Oct 2015 20:24:33 +0000 (20:24 +0000)]
Versioning.

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

6 years agoPostpone mutation events before invoke Editor::Command command(Document*, const Strin...
commit-queue@webkit.org [Wed, 14 Oct 2015 20:11:19 +0000 (20:11 +0000)]
Postpone mutation events before invoke Editor::Command command(Document*, const String&, bool).
https://bugs.webkit.org/show_bug.cgi?id=149299
<rdar://problem/22746995>

Patch by Jiewen Tan <jiewen_tan@apple.com> on 2015-10-14
Reviewed by Andreas Kling.

Source/WebCore:

Test: editing/inserting/insert-with-mutation-event.html

This is a merge of a part of Blink r166294:
https://codereview.chromium.org/141103006

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

LayoutTests:

* editing/inserting/insert-with-mutation-event-expected.txt: Added.
* editing/inserting/insert-with-mutation-event.html: Added.

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

6 years agoRemove a message that isn't used by anyone
andersca@apple.com [Wed, 14 Oct 2015 20:10:11 +0000 (20:10 +0000)]
Remove a message that isn't used by anyone
https://bugs.webkit.org/show_bug.cgi?id=150136

Reviewed by Andreas Kling.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didRemoveFrameFromHierarchy): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::detachedFromParent2): Deleted.

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

6 years agoImplement CanvasRenderingContext2D::commit
dino@apple.com [Wed, 14 Oct 2015 20:05:02 +0000 (20:05 +0000)]
Implement CanvasRenderingContext2D::commit
https://bugs.webkit.org/show_bug.cgi?id=150110
<rdar://problem/23057398>

Reviewed by Anders Carlsson.

Source/WebCore:

As part of getting as close as possible to the HTML5 specification,
implement the commit() method on 2d canvas, even though it doesn't
do anything.

Test: fast/canvas/commit.html

* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::JSCanvasRenderingContext2D::commit): Intercept it here to
avoid adding a method to the actual implementation.
* html/canvas/CanvasRenderingContext2D.idl: Add commit.

LayoutTests:

* fast/canvas/commit-expected.txt: Added.
* fast/canvas/commit.html: Added.

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

6 years agoAdd SPI for reloading without content blockers
achristensen@apple.com [Wed, 14 Oct 2015 20:03:14 +0000 (20:03 +0000)]
Add SPI for reloading without content blockers
https://bugs.webkit.org/show_bug.cgi?id=150058
rdar://problem/22742222

Reviewed by Sam Weinig.

Source/WebCore:

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
* loader/FrameLoader.h:
* page/Page.h:
(WebCore::Page::userContentController):
(WebCore::Page::userContentExtensionsEnabled): Deleted.
(WebCore::Page::setUserContentExtensionsEnabled): Deleted.
* replay/UserInputBridge.cpp:
(WebCore::UserInputBridge::loadRequest):
(WebCore::UserInputBridge::reloadFrame):
(WebCore::UserInputBridge::stopLoadingFrame):
* replay/UserInputBridge.h:
Pass a bool from the reloadWithoutContentBlockers call to the DocumentLoader,
which stores the state of whether the content blockers are enabled or not.
Remove the state from the Page and copying the state from the Page to the DocumentLoader
because that caused issues with the content blockers being re-enabled at the wrong time.

Source/WebKit2:

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageReload):
(WKPageReloadWithoutContentBlockers):
(WKPageReloadFromOrigin):
(WKPageTryClose):
(WKPageSetUserContentExtensionsEnabled):
(WKPageSupportsTextEncoding):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController reload]):
(-[WKBrowsingContextController reloadFromOrigin]):
(-[WKBrowsingContextController applicationNameForUserAgent]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView _setUserContentExtensionsEnabled:]):
(-[WKWebView _userContentExtensionsEnabled]):
(-[WKWebView _webProcessIdentifier]):
(-[WKWebView _killWebContentProcess]):
(-[WKWebView _reloadWithoutContentBlockers]):
(-[WKWebView _killWebContentProcessAndResetState]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_reload):
(webkit_web_view_reload_bypass_cache):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didHandleContentFilterUnblockNavigation):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setShouldScaleViewToFitDocument):
(WebKit::WebPageProxy::setUserContentExtensionsEnabled): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::userContentExtensionsEnabled): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldDispatchFakeMouseMoveEvents):
(WebKit::WebPage::setDefersLoading):
(WebKit::WebPage::reload):
(WebKit::WebPage::goForward):
(WebKit::WebPage::createDocumentLoader):
(WebKit::WebPage::setShouldScaleViewToFitDocument):
(WebKit::WebPage::imageOrMediaDocumentSizeChanged):
(WebKit::WebPage::setUserContentExtensionsEnabled): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Tools:

* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaResetStateToConsistentValues):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformConfigureViewForTest):

LayoutTests:

* http/tests/contentextensions/disable-blocker-expected.txt: Removed.
* http/tests/contentextensions/disable-blocker.html: Removed.
* http/tests/contentextensions/disable-blocker.html.json: Removed.
_userContentExtensionsEnabled is going to be removed, and its functionality is what this test tested.

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

6 years agoRename JSDOMWrapper to JSDOMObject and JSDOMWrapperWithImplementation to JSDOMWrapper
youenn.fablet@crf.canon.fr [Wed, 14 Oct 2015 19:18:36 +0000 (19:18 +0000)]
Rename JSDOMWrapper to JSDOMObject and JSDOMWrapperWithImplementation to JSDOMWrapper
https://bugs.webkit.org/show_bug.cgi?id=150120

Reviewed by Sam Weinig.

No change in behavior.

* bindings/js/DOMWrapperWorld.h:
* bindings/js/JSDOMBinding.h:
(WebCore::DOMConstructorObject::DOMConstructorObject):
(WebCore::getInlineCachedWrapper):
(WebCore::setInlineCachedWrapper):
(WebCore::clearInlineCachedWrapper):
(WebCore::createWrapper):
(WebCore::getStaticValueSlotEntryWithoutCaching<JSDOMObject>):
* bindings/js/JSDOMWrapper.cpp:
* bindings/js/JSDOMWrapper.h:
(WebCore::JSDOMObject::JSDOMObject):
(WebCore::JSDOMWrapper::~JSDOMWrapper):
(WebCore::JSDOMWrapper::JSDOMWrapper):
* bindings/js/JSElementCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSNodeCustom.cpp:
(WebCore::createWrapperInline):
* bindings/js/ScriptWrappable.h:
* bindings/js/ScriptWrappableInlines.h:
(WebCore::ScriptWrappable::wrapper):
(WebCore::ScriptWrappable::setWrapper):
(WebCore::ScriptWrappable::clearWrapper):
* bindings/scripts/CodeGeneratorJS.pm:
(GetParentClassName):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructor::JSTestEventConstructor):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::JSTestEventTarget):
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestException::JSTestException):
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::JSTestInterface):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
(WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::JSTestNondeterministic::JSTestNondeterministic):
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::JSTestObj):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefs::JSTestTypedefs):
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattribute::JSattribute):
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonly::JSreadonly):
* bindings/scripts/test/JS/JSreadonly.h:
* dom/make_names.pl:
(printWrapperFunctions):
(printWrapperFactoryCppFile):
(printWrapperFactoryHeaderFile):

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

6 years agoES6 Fix TypedArray constructors.
keith_miller@apple.com [Wed, 14 Oct 2015 19:07:12 +0000 (19:07 +0000)]
ES6 Fix TypedArray constructors.
https://bugs.webkit.org/show_bug.cgi?id=149975

Reviewed by Geoffrey Garen.

The ES6 spec requires that any object argument passed to a TypedArray constructor that is not a TypedArray
and has an iterator should use the iterator to construct the TypedArray. To avoid performance regressions related
to iterating we check if the iterator attached to the object points to the generic array iterator and length is a value.
If so, we do not use the iterator since there should be no observable difference. Another other interesting note is
that the ES6 spec has the of and from functions on a shared constructor between all the TypedArray constructors.
When the TypedArray is constructed the expectation is to crawl the prototype chain of the this value
passed to the function. If the function finds a known TypedArray constructor (Int32Array, Float64Array,...) then
it creates a TypedArray of that type. This is implemented by adding a private function (@allocateTypedArray) to each
of the constructors that can be called in order to construct the array. By using the private functions the JIT should
hopefully be able to optimize this to a direct call.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/TypedArrayConstructor.js: Added.
(of):
(from):
(allocateInt8Array):
(allocateInt16Array):
(allocateInt32Array):
(allocateUint32Array):
(allocateUint16Array):
(allocateUint8Array):
(allocateUint8ClampedArray):
(allocateFloat32Array):
(allocateFloat64Array):
* runtime/CommonIdentifiers.h:
* runtime/JSDataView.cpp:
(JSC::JSDataView::setIndex):
* runtime/JSDataView.h:
* runtime/JSGenericTypedArrayView.h:
(JSC::JSGenericTypedArrayView::toAdaptorNativeFromValue):
* runtime/JSGenericTypedArrayViewConstructor.h:
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::create):
(JSC::constructGenericTypedArrayViewFromIterator):
(JSC::constructGenericTypedArrayView):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncIndexOf):
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSTypedArrayViewConstructor.cpp: Added.
(JSC::JSTypedArrayViewConstructor::JSTypedArrayViewConstructor):
(JSC::JSTypedArrayViewConstructor::finishCreation):
(JSC::JSTypedArrayViewConstructor::create):
(JSC::JSTypedArrayViewConstructor::createStructure):
(JSC::constructTypedArrayView):
(JSC::JSTypedArrayViewConstructor::getConstructData):
(JSC::JSTypedArrayViewConstructor::getCallData):
* runtime/JSTypedArrayViewConstructor.h: Copied from Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h.
* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::JSTypedArrayViewPrototype::create):
* tests/es6.yaml:
* tests/stress/resources/typedarray-constructor-helper-functions.js: Added.
(forEachTypedArray):
(hasSameValues):
(foo):
(testConstructorFunction):
(testConstructor):
* tests/stress/typedarray-constructor.js: Added.
(A):
(iterator.return.next):
(iterator):
(obj.valueOf):
(iterator2.return.next):
(iterator2):
* tests/stress/typedarray-from.js: Added.
(even):
(isBigEnoughAndException):
* tests/stress/typedarray-of.js: Added.

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

6 years agoRename some JSC option names to be more uniform.
mark.lam@apple.com [Wed, 14 Oct 2015 18:57:07 +0000 (18:57 +0000)]
Rename some JSC option names to be more uniform.
https://bugs.webkit.org/show_bug.cgi?id=150127

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Renaming JSC_enableXXX options to JSC_useXXX, and JSC_showXXX options to JSC_dumpXXX.
Also will renaming a few other miscellaneous to options, to abide by this scheme.

Also renaming some functions to match the option names where relevant.

* API/tests/ExecutionTimeLimitTest.cpp:
(testExecutionTimeLimit):
* assembler/AbstractMacroAssembler.h:
(JSC::optimizeForARMv7IDIVSupported):
(JSC::optimizeForARM64):
(JSC::optimizeForX86):
* assembler/LinkBuffer.cpp:
(JSC::shouldDumpDisassemblyFor):
(JSC::LinkBuffer::finalizeCodeWithoutDisassembly):
(JSC::shouldShowDisassemblyFor): Deleted.
* assembler/LinkBuffer.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::jettison):
* bytecode/CodeBlockJettisoningWatchpoint.cpp:
(JSC::CodeBlockJettisoningWatchpoint::fireInternal):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp:
(JSC::DFG::AdaptiveInferredPropertyValueWatchpoint::fire):
* dfg/DFGAdaptiveStructureWatchpoint.cpp:
(JSC::DFG::AdaptiveStructureWatchpoint::fireInternal):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parse):
* dfg/DFGCommon.h:
(JSC::DFG::leastUpperBound):
(JSC::DFG::shouldDumpDisassembly):
(JSC::DFG::shouldShowDisassembly): Deleted.
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::JITCompiler):
(JSC::DFG::JITCompiler::disassemble):
* dfg/DFGJumpReplacement.cpp:
(JSC::DFG::JumpReplacement::fire):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSRExitCompiler.cpp:
* dfg/DFGOSRExitFuzz.h:
(JSC::DFG::doOSRExitFuzzing):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithSqrt):
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::~JITCode):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::callCheck):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
(JSC::FTL::compileFTLOSRExit):
* ftl/FTLState.h:
(JSC::FTL::verboseCompilationEnabled):
(JSC::FTL::shouldDumpDisassembly):
(JSC::FTL::shouldShowDisassembly): Deleted.
* heap/Heap.cpp:
(JSC::Heap::addToRememberedSet):
(JSC::Heap::didFinishCollection):
(JSC::Heap::shouldDoFullCollection):
* heap/Heap.h:
(JSC::Heap::isDeferred):
(JSC::Heap::structureIDTable):
* heap/HeapStatistics.cpp:
(JSC::StorageStatistics::storageCapacity):
(JSC::HeapStatistics::dumpObjectStatistics):
(JSC::HeapStatistics::showObjectStatistics): Deleted.
* heap/HeapStatistics.h:
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::createArguments):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::callExceptionFuzz):
* jit/ExecutableAllocationFuzz.cpp:
(JSC::doExecutableAllocationFuzzing):
* jit/ExecutableAllocationFuzz.h:
(JSC::doExecutableAllocationFuzzingIfEnabled):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JITCode.cpp:
(JSC::JITCodeWithCodeRef::~JITCodeWithCodeRef):
* jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallNode::unlink):
(JSC::PolymorphicCallNode::clearCallLinkInfo):
(JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine):
* jit/Repatch.cpp:
(JSC::linkFor):
(JSC::unlinkFor):
(JSC::linkVirtualFor):
* jsc.cpp:
(functionEnableExceptionFuzz):
(jscmain):
* llvm/InitializeLLVM.cpp:
(JSC::initializeLLVMImpl):
* runtime/ExceptionFuzz.cpp:
(JSC::doExceptionFuzzing):
* runtime/ExceptionFuzz.h:
(JSC::doExceptionFuzzingIfEnabled):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
(JSC::Options::initialize):
(JSC::Options::dumpOptionsIfNeeded):
(JSC::Options::setOption):
(JSC::Options::dumpAllOptions):
(JSC::Options::dumpAllOptionsInALine):
(JSC::Options::dumpOption):
* runtime/Options.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
(JSC::VM::exceptionFuzzingBuffer):
* runtime/WriteBarrierInlines.h:
(JSC::WriteBarrierBase<T>::set):
(JSC::WriteBarrierBase<Unknown>::set):
* tests/executableAllocationFuzz.yaml:
* tests/stress/arrowfunction-typeof.js:
* tests/stress/disable-function-dot-arguments.js:
(foo):
* tests/stress/math-sqrt-basics-disable-architecture-specific-optimizations.js:
(sqrtOnInteger):
* tests/stress/regress-148564.js:

Tools:

* Scripts/jsc-stress-test-helpers/js-executable-allocation-fuzz:
* Scripts/run-jsc-stress-tests:

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

6 years agoChange GraphicsContext image-drawing functions to take references
simon.fraser@apple.com [Wed, 14 Oct 2015 18:10:32 +0000 (18:10 +0000)]
Change GraphicsContext image-drawing functions to take references
https://bugs.webkit.org/show_bug.cgi?id=150108

Reviewed by Tim Horton and Sam Weinig.

Change GraphicsContext::drawImage(), drawTiledImage(), drawImageBuffer(), clipToImageBuffer()
and isCompatibleWithBuffer() to take references, and adjust calling code, adding
null-checks where necessary.

Source/WebCore:

* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::image):
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::image):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::compositeBuffer):
(WebCore::drawImageToContext):
(WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::texSubImage2D):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::texSubImage2D):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
(WebCore::WebGLRenderingContextBase::texImage2D):
* html/canvas/WebGLRenderingContextBase.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::paintPanScrollIcon):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
(WebCore::drawCrossfadeSubimage):
(WebCore::CrossfadeGeneratedImage::drawCrossfade):
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::drawPattern):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawTiledImage):
(WebCore::GraphicsContext::drawImageBuffer):
(WebCore::GraphicsContext::clipToImageBuffer):
(WebCore::GraphicsContext::isCompatibleWithBuffer):
* platform/graphics/GraphicsContext.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::drawShadowBuffer):
(WebCore::ShadowBlur::drawRectShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithTiling):
(WebCore::ShadowBlur::drawRectShadowWithTiling):
(WebCore::ShadowBlur::drawLayerPieces):
(WebCore::ShadowBlur::endShadowLayer):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::draw):
* platform/graphics/filters/FEBlend.cpp:
(WebCore::FEBlend::platformApplySoftware):
* platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::platformApplySoftware):
* platform/graphics/filters/FEComposite.cpp:
(WebCore::FEComposite::platformApplySoftware):
* platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::platformApplySoftware):
* platform/graphics/filters/FEMerge.cpp:
(WebCore::FEMerge::platformApplySoftware):
* platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::platformApplySoftware):
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware):
* platform/graphics/filters/SourceAlpha.cpp:
(WebCore::SourceAlpha::platformApplySoftware):
* platform/graphics/filters/SourceGraphic.cpp:
(WebCore::SourceGraphic::platformApplySoftware):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::ImageBackingSurfaceClient::ImageBackingSurfaceClient):
(WebCore::CoordinatedImageBacking::update):
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRendererHelper::applyFilterEffect):
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
* rendering/ImageQualityController.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::shouldPaintAtLowQuality):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderBoxModelObject.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintSnapshotImage):
(WebCore::RenderEmbeddedObject::paintContents):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderImageResourceStyleImage.cpp:
(WebCore::RenderImageResourceStyleImage::shutdown):
(WebCore::RenderImageResourceStyleImage::image):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::drawPlatformResizerImage):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintSearchFieldCancelButton):
(WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeWin::paintSearchFieldResultsButton):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::createShapeForImage): Deleted.
* rendering/style/NinePieceImage.cpp:
(WebCore::NinePieceImage::paint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paintForeground):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::postApplyResource):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::clipToImageBuffer):
(WebCore::SVGRenderingContext::bufferForeground):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):

Source/WebKit/win:

* FullscreenVideoController.cpp:
(HUDButton::draw):
* Plugins/PluginView.cpp:
(WebCore::PluginView::paintMissingPluginIcon):

Source/WebKit2:

* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeImage):
(IPC::encodeOptionalImage):
(IPC::ArgumentCoder<Cursor>::encode):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSelectionSnapshot):

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

6 years agoREGRESSION(r53318): background-repeat: space with gradients doesn't render correctly
commit-queue@webkit.org [Wed, 14 Oct 2015 17:29:18 +0000 (17:29 +0000)]
REGRESSION(r53318): background-repeat: space with gradients doesn't render correctly
https://bugs.webkit.org/show_bug.cgi?id=150068

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-10-14
Reviewed by Simon Fraser.

Source/WebCore:

This is a regression of r53318 in which we were trying to make the pattern
of the gradient image as small as possible: 1-pixel wide or tall. But this
broke the rendering of the background image when container element has the
style background-repeat: space. The reason for this is tiling the gradient
image is done completely by CG. To do the tiling, we start by creating a
CGPattern by calling CGPatternCreate() which takes the rect of the pattern
and the step. If the width or the height of the pattern image is adjusted
to be 1-pixel wide or tall, that will force CG to leave a space after every
it draws the pattern image which is 1-pixel wide or tall which is wrong.

The fix is to disable this optimization altogether if the container element
has the style background-repeat: space.

Test: fast/gradients/background-image-repeat-space.html

* platform/graphics/Gradient.cpp:
(WebCore::Gradient::adjustParametersForTiledDrawing):
* platform/graphics/Gradient.h:
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::drawPattern):

LayoutTests:

Ensure the gradient background-image is drawn correctly when it is repeated
with spaces.

* fast/gradients/background-image-repeat-space-expected.html: Added.
* fast/gradients/background-image-repeat-space.html: Added.

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

6 years agoChange the bundle app cache APIs to take a page
andersca@apple.com [Wed, 14 Oct 2015 17:23:12 +0000 (17:23 +0000)]
Change the bundle app cache APIs to take a page
https://bugs.webkit.org/show_bug.cgi?id=150123

Reviewed by Sam Weinig.

Source/WebKit2:

This is another step towards getting rid of ApplicationCacheStorage::singleton().
Ideally the WKTR tests that use this should be converted to API tests.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleClearApplicationCache): Deleted.
(WKBundleClearApplicationCacheForOrigin): Deleted.
(WKBundleSetAppCacheMaximumSize): Deleted.
(WKBundleGetAppCacheUsageForOrigin): Deleted.
(WKBundleSetApplicationCacheOriginQuota): Deleted.
(WKBundleResetApplicationCacheOriginQuota): Deleted.
(WKBundleCopyOriginsWithApplicationCache): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageClearApplicationCache):
(WKBundlePageClearApplicationCacheForOrigin):
(WKBundlePageSetAppCacheMaximumSize):
(WKBundlePageGetAppCacheUsageForOrigin):
(WKBundlePageSetApplicationCacheOriginQuota):
(WKBundlePageResetApplicationCacheOriginQuota):
(WKBundlePageCopyOriginsWithApplicationCache):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearApplicationCache): Deleted.
(WebKit::InjectedBundle::clearApplicationCacheForOrigin): Deleted.
(WebKit::InjectedBundle::setAppCacheMaximumSize): Deleted.
(WebKit::InjectedBundle::appCacheUsageForOrigin): Deleted.
(WebKit::InjectedBundle::setApplicationCacheOriginQuota): Deleted.
(WebKit::InjectedBundle::resetApplicationCacheOriginQuota): Deleted.
(WebKit::InjectedBundle::originsWithApplicationCache): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:

Tools:

Update APIs.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::clearAllApplicationCaches):
(WTR::TestRunner::clearApplicationCacheForOrigin):
(WTR::TestRunner::setAppCacheMaximumSize):
(WTR::TestRunner::applicationCacheDiskUsageForOrigin):
(WTR::TestRunner::originsWithApplicationCache):

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

6 years agoSpeculative build fix: the CallSiteIndex constructor is explicit and requires an...
mark.lam@apple.com [Wed, 14 Oct 2015 16:23:16 +0000 (16:23 +0000)]
Speculative build fix: the CallSiteIndex constructor is explicit and requires an uint32_t.

Not Reviewed.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::newExceptionHandlingCallSiteIndex):

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

6 years ago[Win64] Enable concurrent JIT.
peavo@outlook.com [Wed, 14 Oct 2015 12:59:11 +0000 (12:59 +0000)]
[Win64] Enable concurrent JIT.
https://bugs.webkit.org/show_bug.cgi?id=150098

Reviewed by Csaba Osztrogonác.

* wtf/Platform.h:

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

6 years agoUpdating LayoutTests/imported/w3c/web-platform-tests svn:ignore property as done...
youenn.fablet@crf.canon.fr [Wed, 14 Oct 2015 12:46:36 +0000 (12:46 +0000)]
Updating LayoutTests/imported/w3c/web-platform-tests svn:ignore property as done in LayoutTests/imported/w3c/web-platform-tests/.gitignore in revision 191043

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

6 years agoUpdate web-platform-tests tools to the latest revision
youenn.fablet@crf.canon.fr [Wed, 14 Oct 2015 12:37:14 +0000 (12:37 +0000)]
Update web-platform-tests tools to the latest revision
https://bugs.webkit.org/show_bug.cgi?id=149645

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Removed tools folder.
Updated ImportExpectations and TestRepositories files to match latest wpt repo revision.
Updated web-platform-tests using the import tool.

* resources/ImportExpectations: Skipping new test suites.
* resources/TestRepositories: Updating revision of default imported web-platform-tests. Disabled conversion of git submodules information.
* resources/web-platform-tests-modules.json: Updated by hand the modules description to align with wpt repo.
* web-platform-tests/.gitignore: Marking tools folder as ignored.
* web-platform-tests/README.md:
* web-platform-tests/common/w3c-import.log:
* web-platform-tests/config.default.json:
* web-platform-tests/domparsing/w3c-import.log:
* web-platform-tests/lint: Added.
* web-platform-tests/lint.whitelist: Renamed from LayoutTests/imported/w3c/web-platform-tests/tools/scripts/lint.whitelist.
* web-platform-tests/manifest: Added.
* web-platform-tests/serve: Added.
* web-platform-tests/serve.py:
(main):
* web-platform-tests/tools/__init__.py: Removed.
* web-platform-tests/tools/runner/css/bootstrap-theme.min.css: Removed.
* web-platform-tests/tools/runner/css/bootstrap.min.css: Removed.
* web-platform-tests/tools/runner/css/w3c-import.log: Removed.
* web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.eot: Removed.
* web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.svg: Removed.
* web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.ttf: Removed.
* web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.woff: Removed.
* web-platform-tests/tools/runner/fonts/w3c-import.log: Removed.
* web-platform-tests/tools/runner/logo.svg: Removed.
* web-platform-tests/tools/runner/report.css: Removed.
* web-platform-tests/tools/runner/report.py: Removed.
* web-platform-tests/tools/runner/runner.css: Removed.
* web-platform-tests/tools/runner/runner.js: Removed.
* web-platform-tests/tools/runner/update_manifest.py: Removed.
* web-platform-tests/tools/runner/w3c-import.log: Removed.
* web-platform-tests/tools/scripts/__init__.py: Removed.
* web-platform-tests/tools/scripts/_env.py: Removed.
* web-platform-tests/tools/scripts/html5lib_test.xml: Removed.
* web-platform-tests/tools/scripts/html5lib_test_fragment.xml: Removed.
* web-platform-tests/tools/scripts/id2path.js: Removed.
* web-platform-tests/tools/scripts/id2path.json: Removed.
* web-platform-tests/tools/scripts/lint.py: Removed.
* web-platform-tests/tools/scripts/manifest.js: Removed.
* web-platform-tests/tools/scripts/manifest.py: Removed.
* web-platform-tests/tools/scripts/package.json: Removed.
* web-platform-tests/tools/scripts/toc.js: Removed.
* web-platform-tests/tools/scripts/update-directory-structure.js: Removed.
* web-platform-tests/tools/scripts/update_html5lib_tests.py: Removed.
* web-platform-tests/tools/scripts/w3c-import.log: Removed.
* web-platform-tests/tools/sslutils/__init__.py: Removed.
* web-platform-tests/tools/sslutils/base.py: Removed.
* web-platform-tests/tools/sslutils/openssl.py: Removed.
* web-platform-tests/tools/sslutils/pregenerated.py: Removed.
* web-platform-tests/tools/sslutils/w3c-import.log: Removed.
* web-platform-tests/tools/w3c-import.log: Removed.
* web-platform-tests/tools/webdriver/webdriver/__init__.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/alert.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/capabilities.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/command.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/driver.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/exceptions.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/keys.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/searchcontext.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/w3c-import.log: Removed.
* web-platform-tests/tools/webdriver/webdriver/wait.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/webelement.py: Removed.
* web-platform-tests/w3c-import.log:

Tools:

Disabling git submodules information conversion to json install file for web-platform-tests.
Disabling related python unit tests.
The tools submodules contain submodules and the conversion tool does not support that yet.

Updating wpt launcher script to aling it with web-platform-test main script.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
(main):
* Scripts/webkitpy/layout_tests/servers/web_platform_test_server_unittest.py:
(TestWebPlatformTestServer.test_corrupted_subserver_files): Deleted.
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.test_submodules_generation):

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

6 years ago[GTK][EFL] Fix build with cmake 3.4
commit-queue@webkit.org [Wed, 14 Oct 2015 10:57:49 +0000 (10:57 +0000)]
[GTK][EFL] Fix build with cmake 3.4
https://bugs.webkit.org/show_bug.cgi?id=150117

Explicitely include the CheckIncludeFiles module before using
the CHECK_INCLUDE_FILES command.

Patch by Tomas Popela <tpopela@redhat.com> on 2015-10-14
Reviewed by Žan Doberšek.

* Source/cmake/FindOpenGL.cmake:
* Source/cmake/FindWebP.cmake:
* Source/cmake/OptionsEfl.cmake:

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

6 years ago[EFL] Fix the problem in which environment variable included in webprocess-cmd-prefix...
commit-queue@webkit.org [Wed, 14 Oct 2015 10:34:09 +0000 (10:34 +0000)]
[EFL] Fix the problem in which environment variable included in webprocess-cmd-prefix can't be parsed
https://bugs.webkit.org/show_bug.cgi?id=148616

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-10-14
Reviewed by Gyuyoung Kim.

This patch fixes the problem in which environment variable in web process-cmd-prefix can't be parsed.
process-cmd-prefix option doesn't work in two cases.
1. When executing run-layout-tests,
2. When executing MiniBrowser with web process-cmd-prefix environment variable.

* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::parseAndRemoveEnvironments):
(WebKit::ProcessLauncher::launchProcess):

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

6 years agohttp/tests/xmlhttprequest/xmlhttprequest-overridemimetype-invalidstaterror.html flaki...
commit-queue@webkit.org [Wed, 14 Oct 2015 07:59:03 +0000 (07:59 +0000)]
http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-invalidstaterror.html flakily times out during Mac-WK2 tests
https://bugs.webkit.org/show_bug.cgi?id=150095

Patch by Ryan Haddad <ryanhaddad@apple.com> on 2015-10-14
Reviewed by Alexey Proskuryakov.

* platform/mac-wk2/TestExpectations:

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

6 years agoUnreviewed, rolling out r191030.
commit-queue@webkit.org [Wed, 14 Oct 2015 07:08:54 +0000 (07:08 +0000)]
Unreviewed, rolling out r191030.
https://bugs.webkit.org/show_bug.cgi?id=150116

caused js/class-syntax-method-names.html to crash on debug
builds (Requested by alexchristensen_ on #webkit).

Reverted changeset:

"[ES6] Class expression should have lexical environment that
has itself as an imutable binding"
https://bugs.webkit.org/show_bug.cgi?id=150089
http://trac.webkit.org/changeset/191030

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

6 years agoMore debug queue build fixing.
ap@apple.com [Wed, 14 Oct 2015 06:26:11 +0000 (06:26 +0000)]
More debug queue build fixing.

Preserve the build style in one more place. Changed mock build_style from "both"
to "release", as we don't support testing both debug and release.

* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
(MockCommitQueue.archive_last_test_results):
(MockCommitQueue):
(MockCommitQueue.build_style):
(MockCommitQueue.did_pass_testing_ews):
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
(PatchAnalysisTask._test):
(PatchAnalysisTask._build_and_test_without_patch):
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
(EarlyWarningSystemTest._default_expected_logs):
* Scripts/webkitpy/tool/commands/queues_unittest.py:

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

6 years agoMore debug queue build fixing.
ap@apple.com [Wed, 14 Oct 2015 05:11:55 +0000 (05:11 +0000)]
More debug queue build fixing.

Add build_style argument to derived classes as well.

* Scripts/webkitpy/common/config/ports.py:
(MacPort):
(MacPort.run_webkit_tests_command):
(WinPort.run_bindings_tests_command):
(WinPort):
(WinPort.run_webkit_tests_command):
(GtkWK2Port.build_webkit_command):
(GtkWK2Port):
(GtkWK2Port.run_webkit_tests_command):

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

6 years ago[iOS] Build fix
mmaxfield@apple.com [Wed, 14 Oct 2015 05:10:51 +0000 (05:10 +0000)]
[iOS] Build fix

Unreviewed.

Mach-O section names are limited to 16 characters.

* DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig:
* DumpRenderTree/mac/DumpRenderTree.mm:
(activateFontsIOS):

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

6 years agoBuild fix for mac-debug EWS queue.
ap@apple.com [Wed, 14 Oct 2015 04:54:37 +0000 (04:54 +0000)]
Build fix for mac-debug EWS queue.

Unreviewed.

Pass --debug to run-webkit-tests.

While at it, removed unsupported run_webkit_unit_tests_command. All the test steps
will need to be substantially modified to work in EWS, so the dummy implementation
was not helpful.

* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.run_javascriptcore_tests_command):
(DeprecatedPort):
(DeprecatedPort.run_webkit_tests_command):
(DeprecatedPort.run_python_unittests_command):
(DeprecatedPort.run_webkit_unit_tests_command): Deleted.
* Scripts/webkitpy/common/config/ports_mock.py:
(MockPort.run_javascriptcore_tests_command):
(MockPort):
(MockPort.run_webkit_tests_command):
(MockPort.run_bindings_tests_command):
(MockPort.run_webkit_unit_tests_command): Deleted.
* Scripts/webkitpy/tool/commands/download_unittest.py:
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run):
* Scripts/webkitpy/tool/steps/runtests_unittest.py:
(RunTestsTest.test_webkit_run_unit_tests):
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(StepsTest.test_runtests_args):

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

6 years ago[ES6] Class expression should have lexical environment that has itself as an imutable...
utatane.tea@gmail.com [Wed, 14 Oct 2015 03:56:53 +0000 (03:56 +0000)]
[ES6] Class expression should have lexical environment that has itself as an imutable binding
https://bugs.webkit.org/show_bug.cgi?id=150089

Reviewed by Geoffrey Garen.

According to ES6 spec, class expression has its own lexical environment that holds itself
as an immutable binding[1] (section 14.5.14 step 2, 3, 4, 23)

As a result, even if the binding declared in the outer scope is overridden, methods inside
class expression can refer its class by the class name.

[1]: http://ecma-international.org/ecma-262/6.0/#sec-runtime-semantics-classdefinitionevaluation

* bytecompiler/NodesCodegen.cpp:
(JSC::ClassExprNode::emitBytecode):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createClassExpr):
* parser/NodeConstructors.h:
(JSC::ClassExprNode::ClassExprNode):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createClassExpr):
* tests/es6.yaml:
* tests/stress/class-expression-generates-environment.js: Added.
(shouldBe):
(shouldThrow):
(prototype.method):
(staticMethod):
(A.prototype.method):
(A.staticMethod):
(A):
* tests/stress/class-expression-should-be-tdz-in-heritage.js: Added.
(shouldThrow):
(shouldThrow.A):

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