WebKit-https.git
5 years agoREGRESSION(r180000): Changing moving average or enveloping strategy doesn't update...
rniwa@webkit.org [Tue, 31 Mar 2015 17:16:07 +0000 (17:16 +0000)]
REGRESSION(r180000): Changing moving average or enveloping strategy doesn't update the graph
https://bugs.webkit.org/show_bug.cgi?id=143254

Reviewed by Antti Koivisto.

The bug was caused by App.Pane no longer replacing 'chartData' property when updating the moving average
or the enveloping values. Fixed the bug by creating a new chartData object when the strategy is changed
so that the interactive chart component will observe a change to 'chartData'.

* public/v2/app.js:
(App.Pane._movingAverageOrEnvelopeStrategyDidChange): Added.

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

5 years agoGTK+ Gardening 30th March
commit-queue@webkit.org [Tue, 31 Mar 2015 12:35:25 +0000 (12:35 +0000)]
GTK+ Gardening 30th March
https://bugs.webkit.org/show_bug.cgi?id=143220

Unreviewed.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-03-31

* platform/gtk/TestExpectations:

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

5 years agoUnreviewed, revert accidental change by r182138.
ossy@webkit.org [Tue, 31 Mar 2015 12:23:04 +0000 (12:23 +0000)]
Unreviewed, revert accidental change by r182138.

* Scripts/generate-forwarding-headers.pl:
(createForwardingHeadersForFramework):

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

5 years agohttp/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy.html failing...
antti@apple.com [Tue, 31 Mar 2015 10:59:24 +0000 (10:59 +0000)]
http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy.html failing on Mavericks wk2 debug
https://bugs.webkit.org/show_bug.cgi?id=143258

The test relies on resource priorities. Those don't roundtrip when serializing via NSURLRequest on Mavericks due
to ResourceRequest::resourcePrioritiesEnabled() returning false.

It is bit surprising it works on release but not on debug. I suspect some debug code forces NSURLRequest construction
and so we end up on the roundtrip code path.

* platform/mac-mavericks/TestExpectations: Added.

    Skip the test on Mavericks.

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

5 years ago[Streams API] Implement a barebone ReadableStreamReader interface
youenn.fablet@crf.canon.fr [Tue, 31 Mar 2015 10:09:56 +0000 (10:09 +0000)]
[Streams API] Implement a barebone ReadableStreamReader interface
https://bugs.webkit.org/show_bug.cgi?id=142866

Reviewed by Benjamin Poulain.

Source/WebCore:

This patch implements a barebone ReadableStreamReader as described in https://streams.spec.whatwg.org/#reader-class.
It implements the IDL without implementing most of the functionality behind.
It implements ReadableStreamReader JS constructor and the link with ReadableStream.getReader:
- Raise an error if stream is already locked
- Set the stream reader to the newly created ReadableStreamReader instance.

Test: streams/readablestreamreader-constructor.html

* CMakeLists.txt: Adding ReadableStreamReader files.
* DerivedSources.cpp: Ditto.
* DerivedSources.make: Ditto.
* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::createReader): Used by JS binding to get access to the reader.
* Modules/streams/ReadableStream.h: Declaration of createReader, reader and lock.
(WebCore::ReadableStream::reader):
(WebCore::ReadableStream::lock):
* Modules/streams/ReadableStream.idl: Cleaning-up the IDL.
* Modules/streams/ReadableStreamReader.cpp: Added.
(WebCore::ReadableStreamReader::create):
(WebCore::ReadableStreamReader::ReadableStreamReader):
(WebCore::ReadableStreamReader::~ReadableStreamReader):
(WebCore::ReadableStreamReader::closed):
(WebCore::ReadableStreamReader::activeDOMObjectName):
(WebCore::ReadableStreamReader::canSuspend):
* Modules/streams/ReadableStreamReader.h: Added.
(WebCore::ReadableStreamReader::stream):
* Modules/streams/ReadableStreamReader.idl: Added.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSReadableStreamCustom.cpp:
(WebCore::JSReadableStream::getReader):
* bindings/js/JSReadableStreamReaderCustom.cpp: Added.
(WebCore::JSReadableStreamReader::read):
(WebCore::getOrCreatePromiseDeferredFromObject):
(WebCore::closedPromiseSlotName):
(WebCore::JSReadableStreamReader::closed):
(WebCore::JSReadableStreamReader::cancel):
(WebCore::JSReadableStreamReader::releaseLock):
(WebCore::constructJSReadableStreamReader):

LayoutTests:

Adding tests to check API, constructor and link with ReadableStream.getReader.
Rebasing of global-constructors-attributes.html to include ReadableStreamReader.

* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:
* streams/readablestreamreader-constructor-expected.txt: Added.
* streams/readablestreamreader-constructor.html: Added.

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

5 years agounreviewed config fix after r182178.
lforschler@apple.com [Tue, 31 Mar 2015 10:05:29 +0000 (10:05 +0000)]
unreviewed config fix after r182178.

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

5 years ago[EFL] Add AArch64 builder and tester bot to build.webkit.org
ossy@webkit.org [Tue, 31 Mar 2015 09:19:59 +0000 (09:19 +0000)]
[EFL] Add AArch64 builder and tester bot to build.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=143092

Reviewed by Gyuyoung Kim.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(Factory.__init__):
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:

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

5 years ago[buildbot] clean-build script should remove untracked files and revert local changes too
youenn.fablet@crf.canon.fr [Tue, 31 Mar 2015 08:58:31 +0000 (08:58 +0000)]
[buildbot] clean-build script should remove untracked files and revert local changes too
https://bugs.webkit.org/show_bug.cgi?id=142400

Reviewed by Ryosuke Niwa.

This patch cleans the WebKit folder by reverting tracked files changes and deleting SCM untracked files, including SCM ignored files.
A helper routine SCM.discard_untracked_files is added for that purpose.

* BuildSlaveSupport/clean-build:
(main): Making call to Scripts/clean-webkit
* Scripts/clean-webkit: Added.
(main): Revert changes and delete untracked files.
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.discard_untracked_files): Helper function to discard untracked files or folders found by SCM.
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(SCMTest._shared_test_discard_untracked_files):
(test_discard_untracked_files): Tests that untracked file and untracked folder get discarded correctly.

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

5 years agoUnreviewed. Fix GTK+ build with REDIRECTED_XCOMPOSITE_WINDOW disabled in X11 platform.
carlosgc@webkit.org [Tue, 31 Mar 2015 08:37:04 +0000 (08:37 +0000)]
Unreviewed. Fix GTK+ build with REDIRECTED_XCOMPOSITE_WINDOW disabled in X11 platform.

Also fix some unused parameter warnings when
REDIRECTED_XCOMPOSITE_WINDOW is disabled.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewRenderAcceleratedCompositingResults):
(resizeWebKitWebViewBaseFromAllocation):

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

5 years ago[GTK] DnD icon/widget has odd background
carlosgc@webkit.org [Tue, 31 Mar 2015 07:49:54 +0000 (07:49 +0000)]
[GTK] DnD icon/widget has odd background
https://bugs.webkit.org/show_bug.cgi?id=143217

Reviewed by Martin Robinson.

Source/WebCore:

Remove DragIcon class since it's no longer needed with GTK+3 and
the GTK+2 code there is unused. GTK+ knows what to do with a cairo
surface, I guess we migrated the GTK+2 code to GTK+3 without
realizing that using the surface was enough.

* PlatformGTK.cmake:
* platform/gtk/DragIcon.cpp: Removed.
* platform/gtk/DragIcon.h: Removed.

Source/WebKit2:

Use gtk_drag_set_icon_surface() to set the drag icon image,
instead of DragIcon class.

* UIProcess/API/gtk/WebKitWebView.cpp:
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::startDrag):
* UIProcess/gtk/DragAndDropHandler.h:

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

5 years agoPython SCM should be able to retrieve untracked files
youenn.fablet@crf.canon.fr [Tue, 31 Mar 2015 07:34:11 +0000 (07:34 +0000)]
Python SCM should be able to retrieve untracked files
https://bugs.webkit.org/show_bug.cgi?id=143135

Reviewed by Ryosuke Niwa.

This patch introduces SCM.untracked_files to retrieve a list of untracked files.
Ignored files may be included or not in this list according boolean passed to the function.

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.untracked_files):
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.untracked_files):
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(SCMTest._shared_test_untracked_files):
(test_untracked_files):
(GitSVNTest.test_untracked_files):
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN.untracked_files):

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

5 years agoUnreviewed, rolling out r182172.
commit-queue@webkit.org [Tue, 31 Mar 2015 03:27:01 +0000 (03:27 +0000)]
Unreviewed, rolling out r182172.
https://bugs.webkit.org/show_bug.cgi?id=143250

Since this class is an API object, we don't know for sure when
it will be destroyed. (Requested by kling on #webkit).

Reverted changeset:

"WebBackForwardList doesn't need to manually clear the
snapshot of an entry when removing it."
https://bugs.webkit.org/show_bug.cgi?id=143231
http://trac.webkit.org/changeset/182172

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

5 years agoWebBackForwardList doesn't need to manually clear the snapshot of an entry when remov...
akling@apple.com [Tue, 31 Mar 2015 03:02:41 +0000 (03:02 +0000)]
WebBackForwardList doesn't need to manually clear the snapshot of an entry when removing it.
<https://webkit.org/b/143231>

Reviewed by Tim Horton.

Now that we don't keep WebBackForwardListItem objects alive forever, it's not necessary
to clear the snapshot when removing them from the WebBackForwardList, since the entire
object will be deleted shortly after that anyway.

* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::didRemoveItem):

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

5 years agoExtending null should set __proto__ to null
rniwa@webkit.org [Tue, 31 Mar 2015 01:59:31 +0000 (01:59 +0000)]
Extending null should set __proto__ to null
https://bugs.webkit.org/show_bug.cgi?id=142882

Reviewed by Geoffrey Garen and Benjamin Poulain.

Source/JavaScriptCore:

Set Derived.prototype.__proto__ to null when extending null.

* bytecompiler/NodesCodegen.cpp:
(JSC::ClassExprNode::emitBytecode):

LayoutTests:

Added more test cases for extending from null, and added checks for prototypes.

Also rebaselined existing tests.

* js/class-syntax-call-expected.txt:
* js/class-syntax-extends-expected.txt:
* js/class-syntax-super-expected.txt:
* js/script-tests/class-syntax-call.js:
* js/script-tests/class-syntax-extends.js:
* js/script-tests/class-syntax-super.js:

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

5 years agoFix failing v8-deltablue.js for ARM
msaboff@apple.com [Tue, 31 Mar 2015 01:21:21 +0000 (01:21 +0000)]
Fix failing v8-deltablue.js for ARM
https://bugs.webkit.org/show_bug.cgi?id=138392

Rubber-stamped by Mark Lam.

Re-enable this test for ARM32 on iOS as the tests now run without issues.

* tests/v8-v6/v8-deltablue.js:

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

5 years agoUnreviewed build fix after r182168.
achristensen@apple.com [Tue, 31 Mar 2015 01:09:08 +0000 (01:09 +0000)]
Unreviewed build fix after r182168.

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
Explicitly cast to unsigned.

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

5 years ago[Content Extensions] Correctly handle regular expressions matching everything
achristensen@apple.com [Tue, 31 Mar 2015 00:48:30 +0000 (00:48 +0000)]
[Content Extensions] Correctly handle regular expressions matching everything
https://bugs.webkit.org/show_bug.cgi?id=143235

Reviewed by Benjamin Poulain.

Source/WebCore:

Test: http/tests/contentextensions/whitelist.html

* contentextensions/CompiledContentExtension.cpp:
(WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
Global actions can have non-css actions.  Only put the selectors into the list of selectors.
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeSelector):
(WebCore::ContentExtensions::serializeActions):
Merge sequential css selectors with identical triggers (usually .*) into one action to reduce the number of actions.
(WebCore::ContentExtensions::compileRuleList):
Fail if a regular expression matches everything after ignore-previous-rules.
* contentextensions/ContentExtensionError.cpp:
(WebCore::ContentExtensions::contentExtensionErrorCategory):
* contentextensions/ContentExtensionError.h:
Add more failure cases.
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Trigger::operator==):
Allow comparing of Triggers to determine if sequential triggers are equal.
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
Put non-css actions that match everything into the list of actions if ignore-previous-rules was not hit.
These actions will be out of order, but order only matters when determining if ignore-previous-rules, and this case is handled correctly.
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
Added an assertion that all actions that match everything should be in the first DFA root.
We should catch them all with URLFilterParser::MatchesEverything.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::checkCompilerError):
(TestWebKitAPI::TEST_F):
Test ContentExtensionErrors.

LayoutTests:

* http/tests/contentextensions/css-display-none.html:
* http/tests/contentextensions/css-display-none.html.json:
Test multiple selectors with triggers that match everything.
* http/tests/contentextensions/whitelist-expected.txt: Added.
* http/tests/contentextensions/whitelist.html: Added.
* http/tests/contentextensions/whitelist.html.json: Added.

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

5 years agoREGRESSION (r181993): inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local...
mark.lam@apple.com [Tue, 31 Mar 2015 00:43:49 +0000 (00:43 +0000)]
REGRESSION (r181993): inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local.html crashes.
<https://webkit.org/b/143105>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

With r181993, the DFG and FTL may elide the storing of the scope register.  As a result,
on OSR exits from DFG / FTL frames where this elision has take place, we may get baseline
JIT frames that may have its scope register not set.  The Debugger's current implementation
which relies on the scope register is not happy about this.  For example, this results in a
crash in the layout test inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local.html.

The fix is to disable inlining when the debugger is in use.  Also, we add Flush nodes to
ensure that the scope register value is flushed to the register in the stack frame.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::ByteCodeParser):
(JSC::DFG::ByteCodeParser::setLocal):
(JSC::DFG::ByteCodeParser::flush):
- Add code to flush the scope register.
(JSC::DFG::ByteCodeParser::inliningCost):
- Pretend that all codeBlocks are too expensive to inline if the debugger is in use, thereby
  disabling inlining whenever the debugger is in use.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::hasDebuggerEnabled):
* dfg/DFGStackLayoutPhase.cpp:
(JSC::DFG::StackLayoutPhase::run):
- Update the DFG codeBlock's scopeRegister since it can be moved during stack layout.
* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
- Update the FTL codeBlock's scopeRegister since it can be moved during stack layout.

LayoutTests:

* TestExpectations:
- Undid test skipped in r182072.

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

5 years agoDumpRenderTree should set NSWindowDisplayWithRunLoopObserver
ap@apple.com [Tue, 31 Mar 2015 00:33:19 +0000 (00:33 +0000)]
DumpRenderTree should set NSWindowDisplayWithRunLoopObserver
https://bugs.webkit.org/show_bug.cgi?id=143241
rdar://problem/20351297

Reviewed by Mark Lam.

* DumpRenderTree/mac/DumpRenderTree.mm: (setDefaultsToConsistentValuesForTesting):

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

5 years ago[CMake][EFL] Remove redundant library link and include path
gyuyoung.kim@samsung.com [Tue, 31 Mar 2015 00:29:17 +0000 (00:29 +0000)]
[CMake][EFL] Remove redundant library link and include path
https://bugs.webkit.org/show_bug.cgi?id=143221

Reviewed by Csaba Osztrogonác.

Source/WTF:

* wtf/PlatformEfl.cmake: Remove unnecessary library link and include path.

Tools:

* ImageDiff/PlatformEfl.cmake: Remove unnecessary library link and include path.

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

5 years agoAllow building on Windows without Cygwin
mmaxfield@apple.com [Mon, 30 Mar 2015 23:59:02 +0000 (23:59 +0000)]
Allow building on Windows without Cygwin
https://bugs.webkit.org/show_bug.cgi?id=143219

Reviewed by Brent Fulgham.

* AVFoundationSupport.py: Renamed from Source/WebCore/WebCore.vcxproj/MigrateScripts.
Move logic from DerivedSources.make to its own script
(lookFor):
* DerivedSources.make: Paths like /usr/bin don't exist on Windows.
Windows uses del instead of rm -f
Windows doesn't have printf
* WebCore.vcxproj/WebCoreGenerated.make: Pass the CC executable to
build-generated-files.pl
* WebCore.vcxproj/build-generated-files.pl: Export the CC executable as an environment
variable. Don't use /usr/bin.
* WebCore.vcxproj/migrate-scripts.pl: Deleted the MigrateScripts makefile. We don't
need a whole Makefile just to copy 5 files. Moved this logic into migrate-scripts.pl.
(copyFile):
* bindings/scripts/preprocessor.pm:
(applyPreprocessor): Support passing preprocessing flags to the Visual Studio
compiler.
* dom/make_names.pl: Ditto.

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

5 years agoBuild fix.
ap@apple.com [Mon, 30 Mar 2015 23:54:01 +0000 (23:54 +0000)]
Build fix.

* platform/spi/mac/AVFoundationSPI.h:

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

5 years ago[iOS] WebContent crashing at WebCore: WebCore::Range::collectSelectionRects.
enrica@apple.com [Mon, 30 Mar 2015 23:25:44 +0000 (23:25 +0000)]
[iOS] WebContent crashing at WebCore: WebCore::Range::collectSelectionRects.
https://bugs.webkit.org/show_bug.cgi?id=143234
<rdar://problem/18571345>

Reviewed by Tim Horton.

This is a speculative fix that adds a null check before referencing the range.
In both places where the check has been added the range returned by the call
that should create it could be null.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState):

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

5 years ago[Content Extensions] Flesh out the UserContentExtensionStore
commit-queue@webkit.org [Mon, 30 Mar 2015 23:22:09 +0000 (23:22 +0000)]
[Content Extensions] Flesh out the UserContentExtensionStore
https://bugs.webkit.org/show_bug.cgi?id=143123

Patch by Sam Weinig <sam@webkit.org> on 2015-03-30
Reviewed by Benjamin Poulain.

Source/WebCore:

- Adds a variant of getFileSize() that takes a PlatformFileHandle.
- Adds a new file system function, rename() which operates as the POSIX
  rename function does.

* platform/FileSystem.h:
Add new functions.

* platform/posix/FileSystemPOSIX.cpp:
(WebCore::renameFile):
(WebCore::getFileSize):
Add implementations.

* platform/gtk/FileSystemGtk.cpp:
(WebCore::renameFile):
(WebCore::getFileSize):
* platform/win/FileSystemWin.cpp:
(WebCore::getFileSize):
(WebCore::renameFile):
Add stubs.

Source/WebKit2:

* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
Switch the order in memory of actions and bytecode (and switch the order of the
variables as well, to keep it clear). This will become necessary when streaming
the data to disk, as actions are created before the bytecode and we would have to keep them
in memory until the bytecode was finished compiling if they didn't come before in the file.

* UIProcess/API/APIUserContentExtensionStore.h:
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::UserContentExtensionStore::defaultStore):
Add accessor for the processes default shared store.

(API::constructedPath):
Helper for constructing the path to a file in the store based on identifier.

(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
Helpers for encoding/decoding the file metadata (version, bytecode size, actions size).

(API::openAndMapContentExtension):
Helper to open and map a filed back content extension.

(API::writeDataToFile):
Helper to write a Data object to a file.

(API::compiledToFile):
Helper to run the content extension compiler and write it to disk. It first
writes it to a temporary file and then does an atomic rename operation to put
the file in the final location. Doing this means that if the process crashes while
the compile is taking place, the partially written file won't end up in the cache,
but rather, will be cleaned up by the OS.

(API::UserContentExtensionStore::lookupContentExtension):
API entry point to lookup an extension that has been compiled to disk. On a background queue,
it attempts to open and map the extension (based on the identifier passed in) and return it
to the caller via the callback function passed in.

(API::UserContentExtensionStore::compileContentExtension):
API entry point to compile an extension and write it to store. On a background queue, it
compiles the file to disk and if successful, returns the memory mapped data via the callback
function passed in.

(API::UserContentExtensionStore::removeContentExtension):
API entry point to remove an extension from the store. On a background queue, it
unlinks the extension (based on the identifier passed in) and tells the caller it completed
the action vial the callback function passed in.

(API::UserContentExtensionStore::synchronousRemoveAllContentExtensions):
Helper for testing which synchronously unlinks all the files in the store.

(API::userContentExtensionStoreErrorCategory):
std::error_code adaptor for some generic errors that can happen in the store. We will want
to flesh these out further.

* UIProcess/API/Cocoa/APIUserContentExtensionStoreCocoa.mm: Added.
(API::UserContentExtensionStore::defaultStorePath):
Helper to get the platform specific path for the store.

* UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
(WKUserContentExtensionStoreGetTypeID):
Add ENABLE(CONTENT_EXTENSIONS) guards.

* UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
(-[_WKUserContentExtensionStore dealloc]):
(+[_WKUserContentExtensionStore defaultStore]):
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore _removeAllContentExtensions]):
(-[_WKUserContentExtensionStore init]): Deleted.
* UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h:
* UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h: Added.
SPI wrappers for the store.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm: Added.
Add tests for _WKUserContentExtensionStore.

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

5 years ago[WinCairo] Crash when closing window while video is loading
peavo@outlook.com [Mon, 30 Mar 2015 23:01:51 +0000 (23:01 +0000)]
[WinCairo] Crash when closing window while video is loading
https://bugs.webkit.org/show_bug.cgi?id=143088

Reviewed by Mark Lam.

When the media player is destroyed, we have to cancel possible calls on the
main thread made by a worker thread. Otherwise the destroyed media player
will be accessed when performing the call.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
(WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
(WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
(WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
(WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSourceCallback):
(WebCore::MediaPlayerPrivateMediaFoundation::onTopologySetCallback):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

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

5 years ago[Threaded Compositor] Crash when animation changes frequently.
yoon@igalia.com [Mon, 30 Mar 2015 22:59:58 +0000 (22:59 +0000)]
[Threaded Compositor] Crash when animation changes frequently.
https://bugs.webkit.org/show_bug.cgi?id=143213

Reviewed by Simon Fraser.

CompositingCoordinator copies CoordinatedGraphicsLayerState when
flushing GraphicsLayer changes, and ThreadedCoordinatedCompositor passes
it to compositing thread.

To ensure thread-safety, we need to provide copy constructor to copy
Animation object in TextureMapperAnimation instead of referencing it.

Since TimingFunction and TransformOperation used by KeyframeValueList are
not ThreadSafeRefCounted, these should be cloned also.

No new tests needed.

* platform/graphics/GraphicsLayer.h:
(WebCore::AnimationValue::AnimationValue):
(WebCore::FloatAnimationValue::FloatAnimationValue):
(WebCore::TransformAnimationValue::TransformAnimationValue):
(WebCore::FilterAnimationValue::FilterAnimationValue):
Adds deep copy constructor.

* platform/graphics/texmap/TextureMapperAnimation.cpp:
(WebCore::TextureMapperAnimation::TextureMapperAnimation):
Because the name of the animation can be AtomicString, we need to create
isolated version of string to ensure thread safty.

* platform/graphics/texmap/TextureMapperAnimation.h:
* platform/graphics/transforms/IdentityTransformOperation.h:
* platform/graphics/transforms/Matrix3DTransformOperation.h:
* platform/graphics/transforms/MatrixTransformOperation.h:
* platform/graphics/transforms/PerspectiveTransformOperation.h:
* platform/graphics/transforms/RotateTransformOperation.h:
* platform/graphics/transforms/ScaleTransformOperation.h:
* platform/graphics/transforms/SkewTransformOperation.h:
* platform/graphics/transforms/TransformOperation.h:
* platform/graphics/transforms/TranslateTransformOperation.h:
Adds TransformOperation::clone() for threadsafety.

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

5 years agoFix flakey float32-repeat-out-of-bounds.js and int8-repeat-out-of-bounds.js tests...
msaboff@apple.com [Mon, 30 Mar 2015 22:58:22 +0000 (22:58 +0000)]
Fix flakey float32-repeat-out-of-bounds.js and int8-repeat-out-of-bounds.js tests for ARM64
https://bugs.webkit.org/show_bug.cgi?id=138391

Reviewed by Mark Lam.

Re-enabling these tests as I can't get them to fail on local iOS test devices.
There have been many changes since these tests were disabled.
I'll watch automated test results for failures.  If there are failures running automated
testing, it might be due to the device's relative CPU performance.

* tests/stress/float32-repeat-out-of-bounds.js:
* tests/stress/int8-repeat-out-of-bounds.js:

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

5 years agoCached "Expires" header is not updated upon successful resource revalidation
cdumez@apple.com [Mon, 30 Mar 2015 22:47:05 +0000 (22:47 +0000)]
Cached "Expires" header is not updated upon successful resource revalidation
https://bugs.webkit.org/show_bug.cgi?id=143228
<rdar://problem/20348059>

Reviewed by Antti Koivisto.

Source/WebCore:

Cached "Expires" header was not updated upon successful resource
revalidation. This affected both our disk cache and our memory cache.
This was caused by shouldUpdateHeaderAfterRevalidation() in
CacheValidation.cpp returning false for the "Expires" header.

There is a comment there stating that the list of ignored headers
matches Chromium's net library but that's not the case, at least not
anymore:
http://osxr.org/android/source/external/chromium/net/http/http_response_headers.cc

HTTP servers such as Apache return an "Expires" header in their 304
responses and the "Expires" header is potentially a new one. However,
our caches were ignoring the updated expiration date and kept using the
old one, which meant that the cached resource expired sooner than it
should have.

See the following Apache bugs that explain the issue:
https://bz.apache.org/bugzilla/show_bug.cgi?id=24884
https://bz.apache.org/bugzilla/show_bug.cgi?id=25123

Test: http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html

* platform/network/CacheValidation.cpp:

LayoutTests:

Add layout test to check that a cached response's "Expires" header is
updated from the 304 response's headers upon successful revalidation.

* http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header-expected.txt: Added.
* http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html: Added.
* http/tests/cache/disk-cache/resources/cache-test.js:
(generateTestURL):
(loadResource):
* http/tests/cache/disk-cache/resources/generate-response.cgi:

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

5 years agoWeb Inspector: Regression: Preview for [[null]] shouldn't be []
commit-queue@webkit.org [Mon, 30 Mar 2015 22:43:26 +0000 (22:43 +0000)]
Web Inspector: Regression: Preview for [[null]] shouldn't be []
https://bugs.webkit.org/show_bug.cgi?id=143208

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

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
Handle null when generating simple object previews.

LayoutTests:

* inspector/model/remote-object-expected.txt:
* inspector/model/remote-object.html:

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

5 years agoWeb Inspector: Regression: null shouldn't be expandable in object outline
commit-queue@webkit.org [Mon, 30 Mar 2015 22:41:58 +0000 (22:41 +0000)]
Web Inspector: Regression: null shouldn't be expandable in object outline
https://bugs.webkit.org/show_bug.cgi?id=143209

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

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
When creating an object tree or formatted value, choose just a formatted value
for "null", since it does not have properties.

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

5 years agoDon't cache resources that are very unlikely to be reused
antti@apple.com [Mon, 30 Mar 2015 22:00:17 +0000 (22:00 +0000)]
Don't cache resources that are very unlikely to be reused
https://bugs.webkit.org/show_bug.cgi?id=143226

Reviewed by Chris Dumez.

Source/WebKit2:

Follow-up to cover Cache-control: no-cache case which also has zero cache lifetime.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeStoreDecision):

LayoutTests:

* http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy-expected.txt:

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

5 years agoInclude cache entry worth to json dump
antti@apple.com [Mon, 30 Mar 2015 21:25:21 +0000 (21:25 +0000)]
Include cache entry worth to json dump
https://bugs.webkit.org/show_bug.cgi?id=143202

Follow-up fix.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::computeRecordWorth):

    This accidentally gave the error case worth 1 rather than 0 as it should be.

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

5 years agoDon't cache resources that are very unlikely to be reused
antti@apple.com [Mon, 30 Mar 2015 21:09:14 +0000 (21:09 +0000)]
Don't cache resources that are very unlikely to be reused
https://bugs.webkit.org/show_bug.cgi?id=143226
<rdar://problem/20347160>

Reviewed by Geoff Garen.

Source/WebCore:

Allow overriding resource load priorities via Internals for testing.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::addExtraFieldsToRequest):
(WebCore::FrameLoader::clearTestingOverrides):
* loader/FrameLoader.h:
(WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting):
(WebCore::FrameLoader::clearOverrideCachePolicyForTesting): Deleted.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::unlikelyToReuseKey):
* page/DiagnosticLoggingKeys.h:

    Add a key.

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::stringToResourceLoadPriority):
(WebCore::Internals::setOverrideResourceLoadPriority):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

We are writing lots of resources to the cache that are never used again.

In browse-around-randomly test this reduced number of cache entries created by ~20% and bytes written by ~5%.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeUseDecision):
(WebKit::NetworkCache::makeRetrieveDecision):

    Rename for clarity.

(WebKit::NetworkCache::makeStoreDecision):

    Store only if the resource has non-zero expiration or has validation headers.

    Very High priority resources (main resources) keep the existing policy to minimize impact
    on back navigation and tab restore.

(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::store):
(WebKit::NetworkCache::canUse): Deleted.
(WebKit::NetworkCache::canRetrieve): Deleted.
(WebKit::NetworkCache::canStore): Deleted.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::storeDecisionToDiagnosticKey):

LayoutTests:

* http/tests/cache/disk-cache/disk-cache-request-max-stale-expected.txt:
* http/tests/cache/disk-cache/disk-cache-request-max-stale-expected.html:

    Keep max-age: 0 cacheable in this test by adding a validation header.

* http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy-expected.txt:
* http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy.html:

    Rebase and expand to cover the high priority resource case.

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

5 years agoAvoid using hardcoded values for JSValue::Int32Tag, if possible.
peavo@outlook.com [Mon, 30 Mar 2015 20:12:19 +0000 (20:12 +0000)]
Avoid using hardcoded values for JSValue::Int32Tag, if possible.
https://bugs.webkit.org/show_bug.cgi?id=143134

Reviewed by Geoffrey Garen.

* jit/JSInterfaceJIT.h:
* jit/Repatch.cpp:
(JSC::tryCacheGetByID):

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

5 years agoSwipe snapshot removed too early (jumps around) on arstechnica and NYT
timothy_horton@apple.com [Mon, 30 Mar 2015 19:02:15 +0000 (19:02 +0000)]
Swipe snapshot removed too early (jumps around) on arstechnica and NYT
https://bugs.webkit.org/show_bug.cgi?id=143199
<rdar://problem/18420467>

Reviewed by Dan Bernstein.

Make ViewGestureControllerIOS's snapshot removal timing behave more like the Mac version.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
Let ViewGestureController know when the page has finished state restoration.

(-[WKWebView _didFinishLoadForMainFrame]):
(-[WKWebView _didSameDocumentNavigationForMainFrame:]):
Forward these to ViewGestureController.

* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didFinishLoadForMainFrame):
Forward didFinishLoadForMainFrame to WKWebView.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::endSwipeGesture):
Split the swipe snapshot removal state into a bunch of bools.

(WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
(WebKit::ViewGestureController::setRenderTreeSize):
(WebKit::ViewGestureController::removeSwipeSnapshotIfReady):
(WebKit::ViewGestureController::removeSwipeSnapshot):
Unify the snapshot removal logic into one function; removeSwipeSnapshotIfReady
completely owns the decision. For now, we're waiting for everything, but
we can do better in the future (using firstVisuallyNonEmptyLayout like Mac used to).

(WebKit::ViewGestureController::didRestoreScrollPosition):
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
Add more conditions for swipe snapshot removal. We'll now wait for
didFinishLoadForMainFrame (or didSameDocumentNavigationForMainFrame),
for active loads to finish, and for the scroll position to be restored.
This brings the iOS implementation in line with the slightly better Mac
implementation, and also sets the stage for deduplication of all of this code.

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):

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

5 years agoRebaseline accessibility/aria-toggle-button-with-title.html
commit-queue@webkit.org [Mon, 30 Mar 2015 18:58:23 +0000 (18:58 +0000)]
Rebaseline accessibility/aria-toggle-button-with-title.html
https://bugs.webkit.org/show_bug.cgi?id=143229

Unreviewed.

Revision r182012 updates the way a role=button + aria-pressed object should be exposed as AXCheckbox. We need to create a new baseline.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-03-30

* platform/gtk/accessibility/aria-toggle-button-with-title-expected.txt: Added.

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

5 years agoREGRESSION: js/regress/inline-arguments-local-escape.html is flaky
fpizlo@apple.com [Mon, 30 Mar 2015 18:36:08 +0000 (18:36 +0000)]
REGRESSION: js/regress/inline-arguments-local-escape.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=143104

Reviewed by Geoffrey Garen.

Created a test that is a 100% repro of the flaky failure. This test is called
get-my-argument-by-val-for-inlined-escaped-arguments.js. It fails all of the time because it
always causes the compiler to emit a GetMyArgumentByVal of the arguments object returned by
the inlined function. Other than that, it's the same as inline-arguments-local-escape.

Also created three more tests for three similar, but not identical, failures.

Then fixed the bug: PreciseLocalClobberize was assuming that if we read(Stack) then we are
only reading those parts of the stack that are relevant to the current semantic code origin.
That's false after ArgumentsEliminationPhase - we might have operations on phantom arguments,
like GetMyArgumentByVal, ForwardVarargs, CallForwardVarargs, and ConstructForwardVarargs, that
read parts of the stack associated with the inline call frame for the phantom arguments. This
may not be subsumed by the current semantic origin's stack area in cases that the arguments
were allowed to "locally" escape.

The higher-order lesson here is that in DFG SSA IR, the current semantic origin's stack area
is not really a meaningful concept anymore. It is only meaningful for nodes that will read
the stack due to function.arguments, but there are a bunch of other ways that we could also
read the stack and those operations may read any stack slot. I believe that this change makes
PreciseLocalClobberize right: it will refine a read(Stack) from Clobberize correctly by casing
on node type. In future, if we add a read(Stack) to Clobberize, we'll have to make sure that
readTop() in PreciseLocalClobberize does the right thing.

* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):
* dfg/DFGPutStackSinkingPhase.cpp:
* tests/stress/call-forward-varargs-for-inlined-escaped-arguments.js: Added.
* tests/stress/construct-forward-varargs-for-inlined-escaped-arguments.js: Added.
* tests/stress/forward-varargs-for-inlined-escaped-arguments.js: Added.
* tests/stress/get-my-argument-by-val-for-inlined-escaped-arguments.js: Added.
* tests/stress/real-forward-varargs-for-inlined-escaped-arguments.js: Added.

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

5 years ago[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
jfernandez@igalia.com [Mon, 30 Mar 2015 18:33:39 +0000 (18:33 +0000)]
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
https://bugs.webkit.org/show_bug.cgi?id=133359

Reviewed by David Hyatt.

From Blink r164817 and r165264 by <jchaffraix@chromium.org>

Source/WebCore:

Broaden justify-self's parsing name

This is in preparation of migrating align-self, align-items
and justify-items to the CSS 3 Alignment syntax.

The current naming was too tied to justify-self and needs to
be broadened. This will reduce the follow-up implementations'
patches.

Upgrade align-self and align-items parsing to CSS 3

This change migrates the 2 properties to the CSS 3 Alignment
parsing. The new parsing is identical to how we parse
'justify-self'. The 2 properties need to be migrated together
as they are used in tandem in CSSComputedStyleDeclaration.

This change also removes EAlignItems as it is now unused.

Tests: css3/parse-align-items.html
       css3/parse-align-self.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties.
(WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
 (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items.
(WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items.
(WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value.
(WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
(WebCore::CSSParser::parseJustifySelf): Deleted.
(WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added.
(WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
(WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
(WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
(WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
(WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added.
(WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added.
(WebCore::StyleBuilderCustom::applyValueAlignSelf): Added.
(WebCore::StyleBuilderCustom::applyInheritAlignItems): Added.
(WebCore::StyleBuilderCustom::applyInitialAlignItems): Added.
(WebCore::StyleBuilderCustom::applyValueAlignItems): Added.
(WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added.
(WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added.
(WebCore::StyleBuilderCustom::applyValueJustifySelf): Added.
(WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function.
(WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle.
(WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle.
(WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle.
* rendering/RenderBox.cpp:
(WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum.
(WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum.
(WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum.
(WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum.
(WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum.
(WebCore::resolveAlignment): Deleted. Moved to RenderStyle.
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.cpp:
(WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum.
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum.
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum.
(WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum.
* rendering/style/ContentData.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::resolveAlignment): Added.
* rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum.
* rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum.
* rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum.
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum.
(WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum.
* rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum.
* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange): Changes in the alignItems property cause a Detach.

LayoutTests:

Broaden justify-self's parsing name and upgrade align-self and
align-items parsing to CSS 3.

* TestExpectations:
* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html:
* css3/parse-align-items-expected.txt: Added.
* css3/parse-align-items.html: Added.
* css3/parse-align-self-expected.txt: Added.
* css3/parse-align-self.html: Added.
* css3/resources/alignment-parsing-utils.js: Added.
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/resources/property-names.js:
* fast/css/parse-justify-self-expected.txt:
* fast/css/parse-justify-self.html:
* svg/css/getComputedStyle-basic-expected.txt:

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

5 years ago[New Block-Inside-Inline Model] Create anonymous inline blocks to hold blocks-inside...
hyatt@apple.com [Mon, 30 Mar 2015 18:02:37 +0000 (18:02 +0000)]
[New Block-Inside-Inline Model] Create anonymous inline blocks to hold blocks-inside-inlines.
https://bugs.webkit.org/show_bug.cgi?id=143145

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/block/inside-inlines/ tests.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::renderName):
Add support for labeling anonymous inline-blocks when dumped by the render tree.

* rendering/RenderInline.cpp:
(WebCore::RenderInline::addChildIgnoringContinuation):
When the pref is set to use the new block-inside-inline model, create an anonymous inline block to
hold block children of RenderInlines instead of splitting flows or creating continuations.

* rendering/RenderObject.h:
(WebCore::RenderObject::isAnonymousInlineBlock):
Add the definition of isAnonymousInlineBlock (note the exclusion of Ruby, since Ruby creates anonymous
inline-blocks also).

LayoutTests:

* fast/block/inside-inlines: Added.
* fast/block/inside-inlines/empty-block-expected.html: Added.
* fast/block/inside-inlines/empty-block.html: Added.
* fast/block/inside-inlines/new-model: Added.
* fast/block/inside-inlines/new-model/empty-block-expected.html: Added.
* fast/block/inside-inlines/new-model/empty-block.html: Added.

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

5 years ago[WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
cdumez@apple.com [Mon, 30 Mar 2015 17:35:39 +0000 (17:35 +0000)]
[WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
https://bugs.webkit.org/show_bug.cgi?id=143159
<rdar://problem/20333296>

Reviewed by Antti Koivisto.

Source/WebCore:

Add support for "Cache-Control: max-stale" request header:
https://tools.ietf.org/html/rfc7234#section-5.2.1.2

Test: http/tests/cache/disk-cache/disk-cache-request-max-stale.html

* platform/network/CacheValidation.cpp:
(WebCore::parseCacheControlDirectives):
* platform/network/CacheValidation.h:

Source/WebKit2:

Add support for "Cache-Control: max-stale" request header:
https://tools.ietf.org/html/rfc7234#section-5.2.1.2

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::responseHasExpired):
(WebKit::NetworkCache::requestRequiresRevalidation):
(WebKit::NetworkCache::canUse):

LayoutTests:

Add layout test to cover support for "Cache-Control: max-stale" request
header.

* http/tests/cache/disk-cache/disk-cache-request-max-stale-expected.txt: Added.
* http/tests/cache/disk-cache/disk-cache-request-max-stale.html: Added.

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

5 years agoUpdate install-dependencies Fedora packages after r181624
commit-queue@webkit.org [Mon, 30 Mar 2015 17:01:45 +0000 (17:01 +0000)]
Update install-dependencies Fedora packages after r181624
https://bugs.webkit.org/show_bug.cgi?id=143215

Add json-glib, libv4l, openssl and pulseaudio development packages to
the Fedora list providing we need them to build WebKit dependencies
for this distribution.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-03-30
Reviewed by Philippe Normand.

* gtk/install-dependencies:

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

5 years agoFix iOS internal build after r182132.
simon.fraser@apple.com [Mon, 30 Mar 2015 16:45:12 +0000 (16:45 +0000)]
Fix iOS internal build after r182132.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):

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

5 years agoWeb Inspector: Add more ESLint rules that reflect the current state of the code base
commit-queue@webkit.org [Mon, 30 Mar 2015 16:29:18 +0000 (16:29 +0000)]
Web Inspector: Add more ESLint rules that reflect the current state of the code base
https://bugs.webkit.org/show_bug.cgi?id=143212

Patch by Tobias Reiss <tobi+webkit@basecode.de> on 2015-03-30
Reviewed by Timothy Hatcher.

* .eslintrc:
Define some utilities as globals.
Replace "no-comma-dangle" with "comma-dangle". "no-comma-dangle" is deprecated and does not trigger in ESLint v.0.17.1
Set "new-cap" to 0 due to the usage of "WebInspector.UIString".
Disable "no-redeclare" for now and enable it back as soon as block scoped `let` is used.
Disable "dot-notation", "no-shadow" and "no-use-before-define" due to a lot of hits.
Disable "no-inner-declarations" as this is a common pattern to save memory.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
* UserInterface/Models/SourceCodeLocation.js:
It's not necessary to initialize x to undefined.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
* UserInterface/Views/TextEditor.js:
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
Remove unused variable x.
* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
* UserInterface/Models/PropertyPath.js:
* UserInterface/Views/RadioButtonNavigationItem.js:
* UserInterface/Views/ReplayDashboardView.js:
* UserInterface/Models/ScriptSyntaxTree.js:
* UserInterface/Views/SourceCodeTextEditor.js:
* UserInterface/Views/SourceCodeTreeElement.js:
Remove trailing and unexpected whitespace.
* UserInterface/Views/ProbeSetDataGrid.js:
* UserInterface/Views/TimelineRuler.js:
Add missing semicolon.
* UserInterface/Views/TimelineDataGrid.js:
* UserInterface/Views/TimelineRecordFrame.js:
Add missing var statement.
* UserInterface/Views/TypeTokenView.js:
Remove unnecessary `bind`.

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

5 years ago[iOS] When Web Audio is interrupted by a phone call, it cannot be restarted.
jer.noble@apple.com [Mon, 30 Mar 2015 16:15:00 +0000 (16:15 +0000)]
[iOS] When Web Audio is interrupted by a phone call, it cannot be restarted.
https://bugs.webkit.org/show_bug.cgi?id=143190

Reviewed by Darin Adler.

Source/WebCore:

Tests: webaudio/audiocontext-state-interrupted.html
       webaudio/audiocontext-state.html

Implement the following methods and properties from the Web Audio spec:
close(), suspend(), resume(), onstatechange.

AudioContext will take more responsibility for tracking state and interruptions (and
AudioDestination will give up that responsibility). This means AudioContext must be a
MediaSessionClient, and own its own MediaSession. In return, AudioDestinationIOS and
AudioDestinationMac relinquish both.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext): Set default values in header.
(WebCore::AudioContext::uninitialize): Call setState() instead of setting m_state.
(WebCore::AudioContext::addReaction): Added. Append the callback to the appropriate vector for the state.
(WebCore::AudioContext::setState): Added. Fire events and resolve the appropriate reaction callbacks for the new state.
(WebCore::AudioContext::state): Return a string representing the context's state.
(WebCore::AudioContext::stop): Close the event queue.
(WebCore::AudioContext::startRendering): Call setState().
(WebCore::AudioContext::fireCompletionEvent): Call setState().
(WebCore::AudioContext::suspendContext): Added. Add reaction callback and call suspend() on the destination node.
(WebCore::AudioContext::resumeContext): Added. Add reaction callback and call resume() on the destination node.
(WebCore::AudioContext::closeContext): Added. Add reaction callback and call close() on the destination node.
(WebCore::AudioContext::suspendPlayback): Added. Suspend playback and set state to interrupted.
(WebCore::AudioContext::mayResumePlayback): Added. Conditionally resume playback.
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContext::suspend): Added. Create and return a new Promise object.
(WebCore::JSAudioContext::resume): Ditto.
(WebCore::JSAudioContext::close): Ditto.
* Modules/webaudio/AudioContext.idl: Add new methods and properties.

Extensive organizational changes were made to AudioContext.h to group instance
variables together and add C++11 initializers in their declarations:

* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::mediaType): Moved from AudioDestinationNode.
(WebCore::AudioContext::presentationType): Ditto.
(WebCore::AudioContext::canReceiveRemoteControlCommands): Ditto.
(WebCore::AudioContext::didReceiveRemoteControlCommand): Ditto.
(WebCore::AudioContext::overrideBackgroundPlaybackRestriction): Ditto.

Other changes to support the new AudioContext methods:

* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::resume): Add empty default virtual method.
(WebCore::AudioDestinationNode::suspend): Ditto.
(WebCore::AudioDestinationNode::close): Ditto.
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::resume): Added. Pass to AudioDestination.
(WebCore::DefaultAudioDestinationNode::suspend): Ditto.
(WebCore::DefaultAudioDestinationNode::close): Ditto.
* Modules/webaudio/DefaultAudioDestinationNode.h:
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredWrapper::resolve): Add an overload for a nullptr resolve value.
* dom/EventNames.h: Added 'statechange'.
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::Task::Task): Add a constructor which takes a void() callback.

Modify MediaSession, AudioSession, and MediaSessionManager to support the new
interruption behavior.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::suspendPlayback): Renamed from pausePlayback().
(WebCore::HTMLMediaElement::mayResumePlayback): Renamed from resumePlayback().
* html/HTMLMediaElement.h:
* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::tryToSetActive): Renamed from setActive. Return true by default.
(WebCore::AudioSession::setActive): Deleted.
* platform/audio/AudioSession.h:
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::beginInterruption): pausePlayback() was renamed to suspendPlayback().
(WebCore::MediaSession::endInterruption): Always notify the client, telling it whether to resume.
(WebCore::MediaSession::clientWillBeginPlayback): Bail early if reentrant.  Check the (new)
    return value of sessionWillBeginPlayback() and remember to resume once the interruption ends.
(WebCore::MediaSession::clientWillPausePlayback): Bail early if reentrant.
(WebCore::MediaSession::pauseSession): pausePlayback() was renamed to suspendPlayback().
* platform/audio/MediaSession.h:
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::sessionWillBeginPlayback): Return false if not allowed to break interruption or
    if activating the audio session failed. Otherwise, end the interruption.
* platform/audio/MediaSessionManager.h:
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::AudioDestinationIOS): m_mediaSession was removed.
(WebCore::AudioDestinationIOS::start): Ditto.
* platform/audio/ios/AudioDestinationIOS.h:
* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSession::tryToSetActive): Renamed from setActive. Return false if the AVAudioSession could not be activated.
(WebCore::AudioSession::setActive): Deleted.
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Do not update the now playing info if session playback was blocked.
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestinationMac::AudioDestinationMac): m_mediaSession was removed.
* platform/audio/mac/AudioDestinationMac.h:
* platform/audio/mac/AudioSessionMac.cpp:
(WebCore::AudioSession::tryToSetActive): Renamed from setActive(). Return true by default.
(WebCore::AudioSession::setActive): Deleted.
* platform/audio/mac/MediaSessionManagerMac.cpp:
(MediaSessionManager::updateSessionState): No longer attempt to activate the session, as this is done
    MediaSessionManager::sessionWillBeginPlayback().
* testing/Internals.cpp:
(WebCore::Internals::setMediaSessionRestrictions): Add "InterruptedPlaybackNotPermitted".

LayoutTests:

* webaudio/audiocontext-state-expected.txt: Added.
* webaudio/audiocontext-state-interrupted-expected.txt: Added.
* webaudio/audiocontext-state-interrupted.html: Added.
* webaudio/audiocontext-state.html: Added.

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

5 years ago[Streams API] Error storage should be moved from source to stream/reader
youenn.fablet@crf.canon.fr [Mon, 30 Mar 2015 15:23:24 +0000 (15:23 +0000)]
[Streams API] Error storage should be moved from source to stream/reader
https://bugs.webkit.org/show_bug.cgi?id=143048

Reviewed by Benjamin Poulain.

This patch removes error storage from the source as it should be stored at the stream level as error access goes through the reader.
It removes abstract ReadableStreamSource::isErrored and the storage of JavaScript errors from ReadableStreamJSSource.

Existing tests cover most of the changes.
Added test case for creating readable stream from empty JS object.

* Modules/streams/ReadableStreamSource.h: Removing isErrored().
* bindings/js/JSReadableStreamCustom.cpp:
(WebCore::constructJSReadableStream): Added JS stream constructor parameters checking.
* bindings/js/ReadableStreamJSSource.cpp:
(WebCore::ReadableStreamJSSource::ReadableStreamJSSource): Removed JS stream constructor parameters checking.
(WebCore::ReadableStreamJSSource::start): Changed prototype of start so that start can throw errors directly.
(WebCore::ReadableStreamJSSource::setInternalError): Deleted.
* bindings/js/ReadableStreamJSSource.h: Removed m_error, setInternalError and updated start declaration.

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

5 years ago[GStreamer] More GL shared context fixes
philn@webkit.org [Mon, 30 Mar 2015 15:22:04 +0000 (15:22 +0000)]
[GStreamer] More GL shared context fixes
https://bugs.webkit.org/show_bug.cgi?id=143216

Reviewed by Carlos Garcia Campos.

Moved the GLX/EGL context tests to be done at runtime rather than
using build-time macros because in the GTK port at least, both EGL
and GLX support are mutually exclusive. Also fixed a couple wrong
defines (USE(GLES2) doesn't exist).

* platform/graphics/GLContext.h: Simple utility method to check if
the platform context is compatible with EGL APIs or not.
* platform/graphics/egl/GLContextEGL.h:
(WebCore::GLContextEGL::isEGLContext):
* platform/graphics/glx/GLContextGLX.h:
(WebCore::GLContextGLX::isEGLContext):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): Do
runtime checks and properly ensure GLES2/GL API usage.

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

5 years ago[EFL][GTK] WebKit2's generate-forwarding-headers.pl should fail if clashing headers...
ossy@webkit.org [Mon, 30 Mar 2015 13:17:55 +0000 (13:17 +0000)]
[EFL][GTK] WebKit2's generate-forwarding-headers.pl should fail if clashing headers found
https://bugs.webkit.org/show_bug.cgi?id=142909

Reviewed by Philippe Normand.

* Scripts/generate-forwarding-headers.pl:
(createForwardingHeadersForFramework):

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

5 years agoSource/WebCore:
commit-queue@webkit.org [Mon, 30 Mar 2015 12:41:02 +0000 (12:41 +0000)]
Source/WebCore:
Add support for deleting emoji on GTK
https://bugs.webkit.org/show_bug.cgi?id=141419

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-03-30
Reviewed by Gustavo Noronha Silva.

The code for deleting special group of characters was specific for
COCOA and EFL platforms. The fix consists on add GTK to the #if
preprocessor directive.

* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffsetForBackwardDeletion):

LayoutTests:
Update expectations for delete-emoji test since the bug is fixed now.
https://bugs.webkit.org/show_bug.cgi?id=141419

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-03-30
Reviewed by Gustavo Noronha Silva.

* platform/gtk/TestExpectations:

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

5 years agoInclude cache entry worth to json dump
antti@apple.com [Mon, 30 Mar 2015 12:22:24 +0000 (12:22 +0000)]
Include cache entry worth to json dump
https://bugs.webkit.org/show_bug.cgi?id=143202

Reviewed by Darin Adler.

This is useful for analyzing cache performance.
Also include the body size, total item count and average worth.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::traverse):
(WebKit::NetworkCache::Cache::dumpContentsToFile):
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::asJSON):
* NetworkProcess/cache/NetworkCacheEntry.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::traverse):

    Add flags for specificying what sort of information is needed.

(WebKit::NetworkCache::computeRecordWorth):

    Factor to a function.

(WebKit::NetworkCache::deletionProbability):
* NetworkProcess/cache/NetworkCacheStorage.h:

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

5 years agoUnreviewed, rolling out r182119.
commit-queue@webkit.org [Mon, 30 Mar 2015 07:25:10 +0000 (07:25 +0000)]
Unreviewed, rolling out r182119.
https://bugs.webkit.org/show_bug.cgi?id=143196

problem with syntax (Requested by youenn on #webkit).

Reverted changeset:

"[buildbot] clean-build script should remove untracked files
and revert local changes too"
https://bugs.webkit.org/show_bug.cgi?id=142400
http://trac.webkit.org/changeset/182119

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

5 years agoStart the features.json files
benjamin@webkit.org [Mon, 30 Mar 2015 07:20:43 +0000 (07:20 +0000)]
Start the features.json files
https://bugs.webkit.org/show_bug.cgi?id=143207

Reviewed by Darin Adler.

Source/JavaScriptCore:

Start the features.json files to have something to experiment
with for the UI.

* features.json: Added.

Source/WebCore:

* features.json: Added.

Tools:

I kept the style checking light. We'll have to figure
what is the best format for each field.

* Scripts/webkitpy/style/checker.py:
(CheckerDispatcher._create_checker):
* Scripts/webkitpy/style/checkers/jsonchecker.py:
(JSONContributorsChecker.check):
(JSONFeaturesChecker):
(JSONFeaturesChecker.check):

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

5 years agoFix iOS scrollperf crash after a web process crash
simon.fraser@apple.com [Mon, 30 Mar 2015 04:17:45 +0000 (04:17 +0000)]
Fix iOS scrollperf crash after a web process crash
https://bugs.webkit.org/show_bug.cgi?id=143110

Reviewed by Dean Jackson.

When we destroy the drawing area after a web process crash, we also need to destroy
the scrollingPerformanceData which has a reference to the drawing area.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState):

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

5 years agoConvert arguments to ScrollingCoordinator functions to references
simon.fraser@apple.com [Mon, 30 Mar 2015 04:13:45 +0000 (04:13 +0000)]
Convert arguments to ScrollingCoordinator functions to references
https://bugs.webkit.org/show_bug.cgi?id=143198

Reviewed by Darin Adler.

Convert all the FrameView* and ScrollableArea* arguments to ScrollingCoordinator functions to
references, and use references in a few other places.

Source/WebCore:

* dom/Document.cpp:
(WebCore::wheelEventHandlerCountChanged):
* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):
* page/DebugPageOverlays.cpp:
(WebCore::NonFastScrollableRegionOverlay::updateRegion):
* page/Frame.cpp:
(WebCore::Frame::willDetachPage):
* page/FrameView.cpp:
(WebCore::FrameView::prepareForDetach):
(WebCore::FrameView::addSlowRepaintObject):
(WebCore::FrameView::removeSlowRepaintObject):
(WebCore::FrameView::addViewportConstrainedObject):
(WebCore::FrameView::removeViewportConstrainedObject):
(WebCore::FrameView::requestScrollPositionUpdate):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::scrollableAreaSetChanged):
(WebCore::FrameView::wheelEvent):
* page/Page.cpp:
(WebCore::Page::nonFastScrollableRects):
* page/Page.h:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
(WebCore::AsyncScrollingCoordinator::updateMainFrameScrollLayerPosition):
(WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::pageDestroyed):
(WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged):
(WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
(WebCore::ScrollingCoordinator::scrollLayerForScrollableArea):
(WebCore::ScrollingCoordinator::scrollLayerForFrameView):
(WebCore::ScrollingCoordinator::headerLayerForFrameView):
(WebCore::ScrollingCoordinator::footerLayerForFrameView):
(WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView):
(WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
(WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
(WebCore::ScrollingCoordinator::rootContentLayerForFrameView):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
(WebCore::ScrollingCoordinator::synchronousScrollingReasons):
(WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
(WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
(WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
(WebCore::ScrollingCoordinator::replaySessionStateDidChange):
(WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
* page/scrolling/ScrollingCoordinator.h: Align the bitmask enums to make mistakes easier to spot.
(WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::ScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
(WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::ScrollingCoordinator::handleWheelEvent):
(WebCore::ScrollingCoordinator::willDestroyScrollableArea):
(WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
(WebCore::ScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
(WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
(WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::handleWheelEvent):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::~RenderLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateOverflowControlsLayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::hasCoordinatedScrolling):
(WebCore::RenderLayerCompositor::scrollingLayerDidChange):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::destroyRootLayer):
(WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
(WebCore::RenderLayerCompositor::didAddScrollingLayer):
* testing/Internals.cpp:
(WebCore::Internals::nonFastScrollableRects):

Source/WebKit2:

* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):

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

5 years agoUse :matches() instead of :-webkit-any() for the sections and headings default style
benjamin@webkit.org [Mon, 30 Mar 2015 03:12:23 +0000 (03:12 +0000)]
Use :matches() instead of :-webkit-any() for the sections and headings default style
https://bugs.webkit.org/show_bug.cgi?id=143197

Reviewed by Darin Adler.

We no longer need to use the :-webkit-any() hack in the default stylesheet.

The pseudo class :matches() also support correct specificity. This is not observable
since those selector do not conflict with any other rule in the default stylesheet.

* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::determineLinkMatchType):
* css/html.css:
(:matches(article, aside, nav, section) h1):
(:matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
(:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
(:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
(:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
(:-webkit-any(article,aside,nav,section) h1): Deleted.
(:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
(:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
(:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
(:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.

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

5 years ago`currentColor` computes to the same colour on all elements, even if 'color' is inheri...
benjamin@webkit.org [Mon, 30 Mar 2015 03:10:48 +0000 (03:10 +0000)]
`currentColor` computes to the same colour on all elements, even if 'color' is inherited differently
https://bugs.webkit.org/show_bug.cgi?id=133420

Reviewed by Darin Adler.

Source/WebCore:

When resolving a style with the help of the property cache, we were
completely ignoring currentColor.

Since you can set currentColor on properties that are not inherited,
those properties would just be copied from the cached style, which
may have a completely different inherited color.

This pacth fixes the issue by preventing any MatchResult from hitting
the cache if it contains any non-inherited property that would require
resolution by the cache:
-Using the inherit value.
-Using the currentColor value.

Tests: fast/css/currentColor-on-before-after-pseudo-elements.html
       fast/css/currentColor-style-update-reftest.html
       fast/css/currentColor-value-style-update.html

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::addElementStyleProperties):
(WebCore::ElementRuleCollector::matchAuthorRules):
(WebCore::ElementRuleCollector::matchUserRules):
(WebCore::ElementRuleCollector::matchUARules):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::MatchResult::addMatchedProperties):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::findFromMatchedPropertiesCache):
(WebCore::StyleResolver::addToMatchedPropertiesCache):
(WebCore::extractDirectionAndWritingMode):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::CascadedProperties::addStyleProperties):
(WebCore::StyleResolver::CascadedProperties::addMatches):
* css/StyleResolver.h:
(WebCore::StyleResolver::MatchResult::matchedProperties):

LayoutTests:

* fast/css/currentColor-on-before-after-pseudo-elements-expected.html: Added.
* fast/css/currentColor-on-before-after-pseudo-elements.html: Added.
* fast/css/currentColor-style-update-reftest-expected.html: Added.
* fast/css/currentColor-style-update-reftest.html: Added.
* fast/css/currentColor-value-style-update-expected.txt: Added.
* fast/css/currentColor-value-style-update.html: Added.

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

5 years agoEnable :any-link by default
benjamin@webkit.org [Mon, 30 Mar 2015 03:05:48 +0000 (03:05 +0000)]
Enable :any-link by default
https://bugs.webkit.org/show_bug.cgi?id=143201

Reviewed by Sam Weinig.

The pseudo class :any-link has been stable for a while. This patch enables
it by default and remove the -webkit- prefix on the default style.

* css/CSSDefaultStyleSheets.cpp:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::addRule):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::isCommonPseudoClassSelector):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* css/html.css:
(a:any-link):
(a:any-link:active):
(:any-link img):
(a:-webkit-any-link): Deleted.
(a:-webkit-any-link:active): Deleted.
(:-webkit-any-link img): Deleted.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):

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

5 years ago[CMake] Update old CMakeList.txt in gtest
gyuyoung.kim@samsung.com [Mon, 30 Mar 2015 02:27:23 +0000 (02:27 +0000)]
[CMake] Update old CMakeList.txt in gtest
https://bugs.webkit.org/show_bug.cgi?id=143192

Reviewed by Darin Adler.

CMake ports have used cmake/gtest/CMakeLists.txt instead of ThirdParty/test/CMakeLists.txt
in order to build gtest. However it looks ThirdParty/test/CMakeLists.txt won't be used anymore.
So this patch moves cmake/gtest/CMakeLists.txt to ThirdPart/test/CMakeLists.txt, and use it.

.:

* Source/CMakeLists.txt:
* Source/cmake/gtest/CMakeLists.txt: Removed.

Source/ThirdParty:

* gtest/CMakeLists.txt:

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

5 years agonullptr cleanup in RenderFooBox classes
commit-queue@webkit.org [Mon, 30 Mar 2015 02:00:20 +0000 (02:00 +0000)]
nullptr cleanup in RenderFooBox classes
https://bugs.webkit.org/show_bug.cgi?id=143182

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-03-29
Reviewed by Ryosuke Niwa.

No new tests, no behavior changes

Replace 0 with nullptr in RenderFooBox classes.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::RenderBox):
(WebCore::RenderBox::paintFillLayer):
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
(WebCore::RenderBox::renderBoxRegionInfo):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::positionForPoint):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBox.h:
(WebCore::RenderBox::setMarginBefore):
(WebCore::RenderBox::setMarginAfter):
(WebCore::RenderBox::setMarginStart):
(WebCore::RenderBox::setMarginEnd):
(WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
(WebCore::RenderBox::setInlineBoxWrapper):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::willBeDestroyed):
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintBorderSides):
(WebCore::RenderBoxModelObject::firstLetterRemainingText):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::moveChildTo):
(WebCore::RenderBoxModelObject::moveAllChildrenTo):
(WebCore::RenderBoxModelObject::moveChildrenTo):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::FlexBoxIterator::reset):
(WebCore::FlexBoxIterator::next):
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::firstLineBaseline):
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::deleteLineBoxTree):
(WebCore::RenderLineBoxList::extractLineBox):
(WebCore::RenderLineBoxList::deleteLineBoxes):
(WebCore::RenderLineBoxList::checkConsistency):
* rendering/RenderLineBoxList.h:
(WebCore::RenderLineBoxList::RenderLineBoxList):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::enclosingScrollableArea):
(WebCore::RenderListBox::setHasVerticalScrollbar):
* rendering/RenderListBox.h:

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

5 years ago[iOS WK2] WKContentView should implement _selectionClipRect
enrica@apple.com [Mon, 30 Mar 2015 01:03:07 +0000 (01:03 +0000)]
[iOS WK2] WKContentView should implement _selectionClipRect
https://bugs.webkit.org/show_bug.cgi?id=143143
rdar://problem/20330075

Reviewed by Benjamin Poulain.

UIKit checks if the text delegate responds to this selector
to retrieve the clipping rectangle for the editable element
where the selection is being create.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _selectionClipRect]):

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

5 years agoHTMLCollection caches incorrect length if item(0) is called before length on an empty...
darin@apple.com [Mon, 30 Mar 2015 00:33:02 +0000 (00:33 +0000)]
HTMLCollection caches incorrect length if item(0) is called before length on an empty collection
https://bugs.webkit.org/show_bug.cgi?id=143203
Source/WebCore:

rdar://problem/18460462

Reviewed by Antti Koivisto.

Test: fast/dom/htmlcollection-length-after-item-2.html

* dom/CollectionIndexCache.h:
(CollectionIndexCache::nodeAt): If we hit the end looking for index 0, cache a length
of 0, not a length of 1.

LayoutTests:

Reviewed by Antti Koivisto.

* fast/dom/htmlcollection-length-after-item-2-expected.txt: Added.
* fast/dom/htmlcollection-length-after-item-2.html: Added.

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

5 years agoUse st_mtime instead of st_atime to track file access time
antti@apple.com [Sun, 29 Mar 2015 23:43:32 +0000 (23:43 +0000)]
Use st_mtime instead of st_atime to track file access time
https://bugs.webkit.org/show_bug.cgi?id=143200

Reviewed by Darin Adler.

On OS X atime updates automatically on read so calling Storage::traverse() would always ends up updating access times
for all cache entries to the current time. This would make entry worth computation produce unexpected results.
We update mtime manually on successful cache retrieve only so switching to it fixes the problem.

* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes):
(WebKit::NetworkCache::updateFileModificationTimeIfNeeded):
(WebKit::NetworkCache::updateFileAccessTimeIfNeeded): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::updateFileModificationTime):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::deletionProbability):
(WebKit::NetworkCache::Storage::updateFileAccessTime): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:

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

5 years ago[Win] Addresing post-review comment after r182122
mmaxfield@apple.com [Sun, 29 Mar 2015 21:54:36 +0000 (21:54 +0000)]
[Win] Addresing post-review comment after r182122
https://bugs.webkit.org/show_bug.cgi?id=143189

Unreviewed.

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

5 years ago[Win] Allow building JavaScriptCore without Cygwin
mmaxfield@apple.com [Sun, 29 Mar 2015 20:56:20 +0000 (20:56 +0000)]
[Win] Allow building JavaScriptCore without Cygwin
https://bugs.webkit.org/show_bug.cgi?id=143189

Reviewed by Brent Fulgham.

Paths like /usr/bin/ don't exist on Windows.
Hashbangs don't work on Windows. Instead we must explicitly call the executable.
Prefixing commands with environment variables doesn't work on Windows.
Windows doesn't have 'cmp'
Windows uses 'del' instead of 'rm'
Windows uses 'type NUL' intead of 'touch'

* DerivedSources.make:
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make:
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.pl:
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make:
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.pl:
* JavaScriptCore.vcxproj/build-generated-files.pl:
* UpdateContents.py: Copied from Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.pl.

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

5 years agoRemove unneeded SVG code, including most isSupportedAttribute functions
darin@apple.com [Sun, 29 Mar 2015 20:40:15 +0000 (20:40 +0000)]
Remove unneeded SVG code, including most isSupportedAttribute functions
https://bugs.webkit.org/show_bug.cgi?id=143194

Reviewed by Antti Koivisto.

- Removed most implementations of isSupportedAttribute. Others can be removed in
  future patches. The ones left behind are now all private static member functions.
  It's dangerous for them to be public because they tend to indicate which attributes
  are supported at a particular level in the class hierarchy and they are not virtual
  functions; might want to rethink the function name if we keep any of these long term.

- Removed unneeded includes, especially of Attr.h and Attribute.h.

- Changed most parseAttribute and svgAttributeChanged functions so they no longer
  rely on checking attribute names against a set. Also removed lots of unneeded calls
  to SVGLangSpace::parseAttribute, which is called by SVGElement::parseAttribute and
  need not be called by derived classes.

- Removed return values from parseAttribute functions. Skipping other parseAttribute
  logic is not an important optimization and makes functions needlessly complex.

- Moved use of InstanceInvalidationGuard closer to where they are needed. Eventually
  we may be able to remove many of these.

- Used auto in a few places where the same type is repeated twice on the same line of
  code, and auto makes it a bit smaller.

- Got rid of protected sections in some final classes; doesn't make sense to combine
  these two. Also moved a few functions from protected to private in other classes.

- Made a number of functions into static member functions in the base classes such
  as SVGLangSpace; they were not making any use of the object, and so it was wasteful
  to compile them as non-static member functions.

* rendering/svg/RenderSVGImage.cpp: Removed unneeded includes.
* svg/SVGAElement.cpp: Removed unneeded includes.
(WebCore::SVGAElement::isSupportedAttribute): Deleted.
(WebCore::SVGAElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGAElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGAElement.h: Removed isSupportedAttribute.
* svg/SVGAnimateMotionElement.cpp: Removed unneeded includes.
(WebCore::SVGAnimateMotionElement::isSupportedAttribute): Deleted.
(WebCore::SVGAnimateMotionElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGAnimateMotionElement.h: Removed isSupportedAttribute.
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::isSupportedAttribute): Deleted.
(WebCore::SVGAnimateTransformElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGAnimateTransformElement.h: Removed isSupportedAttribute.
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::isSupportedAttribute): Deleted.
(WebCore::SVGCircleElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGCircleElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGCircleElement.h: Removed isSupportedAttribute.
* svg/SVGClipPathElement.cpp: Removed unneeded includes.
(WebCore::SVGClipPathElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGCursorElement.cpp: Removed unneeded includes.
(WebCore::SVGCursorElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGCursorElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGElement.cpp: Removed unneeded includes.
* svg/SVGEllipseElement.cpp: Removed unneeded includes.
(WebCore::SVGEllipseElement::isSupportedAttribute): Deleted.
(WebCore::SVGEllipseElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGEllipseElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGEllipseElement.h: Removed isSupportedAttribute.
* svg/SVGExternalResourcesRequired.cpp: Removed unneeded includes.
(WebCore::SVGExternalResourcesRequired::parseAttribute): Don't return a boolean.
* svg/SVGExternalResourcesRequired.h: Don't return a boolean.
* svg/SVGFEBlendElement.cpp: Removed unneeded includes.
(WebCore::SVGFEBlendElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEBlendElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEBlendElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEBlendElement.h: Removed isSupportedAttribute.
* svg/SVGFEColorMatrixElement.cpp: Removed unneeded includes.
(WebCore::SVGFEColorMatrixElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEColorMatrixElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEColorMatrixElement.h: Removed isSupportedAttribute.
* svg/SVGFEComponentTransferElement.cpp: Removed unneeded includes.
(WebCore::SVGFEComponentTransferElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEComponentTransferElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGFEComponentTransferElement.h: Removed unneeded includes.
* svg/SVGFECompositeElement.cpp: Removed unneeded includes.
(WebCore::SVGFECompositeElement::isSupportedAttribute): Deleted.
(WebCore::SVGFECompositeElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFECompositeElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFECompositeElement.h:
* svg/SVGFEConvolveMatrixElement.cpp: Removed unneeded includes.
(WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEConvolveMatrixElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEConvolveMatrixElement.h:
* svg/SVGFEDiffuseLightingElement.cpp: Removed unneeded includes.
(WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEDiffuseLightingElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEDiffuseLightingElement.h:
* svg/SVGFEDisplacementMapElement.cpp: Removed unneeded includes.
(WebCore::SVGFEDisplacementMapElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEDisplacementMapElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEDisplacementMapElement.h:
* svg/SVGFEDropShadowElement.cpp: Removed unneeded includes.
(WebCore::SVGFEDropShadowElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEDropShadowElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEDropShadowElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEDropShadowElement.h:
* svg/SVGFEFloodElement.cpp: Removed unneeded includes.
* svg/SVGFEGaussianBlurElement.cpp: Removed unneeded includes.
(WebCore::SVGFEGaussianBlurElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEGaussianBlurElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEGaussianBlurElement.h:
* svg/SVGFEImageElement.cpp: Removed unneeded includes.
(WebCore::SVGFEImageElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEImageElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEImageElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEImageElement.h:
* svg/SVGFELightElement.cpp: Removed unneeded includes.
(WebCore::SVGFELightElement::isSupportedAttribute): Deleted.
(WebCore::SVGFELightElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFELightElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFELightElement.h:
* svg/SVGFEMergeNodeElement.cpp: Removed unneeded includes.
(WebCore::SVGFEMergeNodeElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEMergeNodeElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEMergeNodeElement.h:
* svg/SVGFEMorphologyElement.cpp: Removed unneeded includes.
(WebCore::SVGFEMorphologyElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEMorphologyElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEMorphologyElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEMorphologyElement.h:
* svg/SVGFEOffsetElement.cpp: Removed unneeded includes.
(WebCore::SVGFEOffsetElement::isSupportedAttribute): Deleted.
(WebCore::SVGFEOffsetElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFEOffsetElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFEOffsetElement.h:
* svg/SVGFESpecularLightingElement.cpp: Removed unneeded includes.
(WebCore::SVGFESpecularLightingElement::isSupportedAttribute): Deleted.
(WebCore::SVGFESpecularLightingElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFESpecularLightingElement.h:
* svg/SVGFETileElement.cpp: Removed unneeded includes.
(WebCore::SVGFETileElement::isSupportedAttribute): Deleted.
(WebCore::SVGFETileElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFETileElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFETileElement.h:
* svg/SVGFETurbulenceElement.cpp: Removed unneeded includes.
(WebCore::SVGFETurbulenceElement::isSupportedAttribute): Deleted.
(WebCore::SVGFETurbulenceElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGFETurbulenceElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGFETurbulenceElement.h:
* svg/SVGFilterElement.cpp: Removed unneeded includes.
(WebCore::SVGFilterElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGFilterPrimitiveStandardAttributes.cpp: Removed unneeded includes.
(WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGFilterPrimitiveStandardAttributes.h: Removed isSupportedAttribute and also moved a
couple functions out of the class definition.
* svg/SVGFitToViewBox.cpp: Removed unneeded includes.
* svg/SVGFontFaceElement.cpp: Removed unneeded includes.
* svg/SVGFontFaceUriElement.cpp: Removed unneeded includes.
* svg/SVGForeignObjectElement.cpp: Removed unneeded includes.
(WebCore::SVGForeignObjectElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGGElement.cpp: Removed unneeded includes.
(WebCore::SVGGElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGGlyphElement.cpp: Removed unneeded includes.
* svg/SVGGlyphRefElement.cpp: Removed unneeded includes.
(WebCore::SVGGlyphRefElement::hasValidGlyphElement): Rewrote to use is<> instead of hasTagName.
(WebCore::SVGGlyphRefElement::parseAttribute): Don't use return value from SVGURIReference::parseAttribute.
* svg/SVGGradientElement.cpp: Removed unneeded includes.
(WebCore::SVGGradientElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGGraphicsElement.cpp: Removed unneeded includes.
(WebCore::SVGGraphicsElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGImageElement.cpp: Removed unneeded includes.
(WebCore::SVGImageElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGLangSpace.cpp: Removed unneeded includes.
(WebCore::SVGLangSpace::parseAttribute): Removed the return value.
* svg/SVGLangSpace.h: Converted functions to static member functions and removed the
return value from parseAttribute.
* svg/SVGLineElement.cpp: Removed unneeded includes.
(WebCore::SVGLineElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGLinearGradientElement.cpp: Removed unneeded includes.
(WebCore::SVGLinearGradientElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGMPathElement.cpp: Removed unneeded includes.
(WebCore::SVGMPathElement::isSupportedAttribute): Deleted.
(WebCore::SVGMPathElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGMPathElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGMPathElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
private instead of protected.
* svg/SVGMarkerElement.cpp: Removed unneeded includes.
(WebCore::SVGMarkerElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGMaskElement.cpp: Removed unneeded includes.
(WebCore::SVGMaskElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGPathElement.cpp: Removed unneeded includes.
(WebCore::SVGPathElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGPatternElement.cpp: Removed unneeded includes.
(WebCore::SVGPatternElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGPolyElement.cpp: Removed unneeded includes.
(WebCore::SVGPolyElement::isSupportedAttribute): Deleted.
(WebCore::SVGPolyElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGPolyElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGPolyElement.h:
* svg/SVGRadialGradientElement.cpp: Removed unneeded includes.
(WebCore::SVGRadialGradientElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGRectElement.cpp: Removed unneeded includes.
(WebCore::SVGRectElement::isSupportedAttribute): Deleted.
(WebCore::SVGRectElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGRectElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGRectElement.h:
* svg/SVGSVGElement.cpp: Removed unneeded includes.
(WebCore::SVGSVGElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGScriptElement.cpp: Removed unneeded includes.
* svg/SVGStopElement.cpp: Removed unneeded includes.
(WebCore::SVGStopElement::isSupportedAttribute): Deleted.
(WebCore::SVGStopElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGStopElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGStopElement.h: Removed isSupportedAttribute.
* svg/SVGStyleElement.cpp: Removed unneeded includes.
(WebCore::SVGStyleElement::isSupportedAttribute): Deleted.
(WebCore::SVGStyleElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGStyleElement.h: Removed isSupportedAttribute.
* svg/SVGSymbolElement.cpp: Removed unneeded includes.
(WebCore::SVGSymbolElement::isSupportedAttribute): Deleted.
(WebCore::SVGSymbolElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGSymbolElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGSymbolElement.h: Removed isSupportedAttribute.
* svg/SVGTRefElement.cpp: Removed unneeded includes.
(WebCore::SVGTRefElement::isSupportedAttribute): Deleted.
(WebCore::SVGTRefElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGTRefElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGTRefElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
private instead of protected.
* svg/SVGTests.cpp: Removed unneeded includes.
(WebCore::SVGTests::parseAttribute): Removed return value.
* svg/SVGTests.h: Removed return value of parseAttribute.
* svg/SVGTextContentElement.cpp: Removed unneeded includes.
(WebCore::SVGTextContentElement::collectStyleForPresentationAttribute): Don't use
isSupportedAttribute. Also removed global to optimize comparing attribute value against
the string "preserve".
(WebCore::SVGTextContentElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGTextContentElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGTextContentElement.h: Made isSupportedAttribute private instead of protected.
* svg/SVGTextElement.cpp: Removed unneeded includes.
* svg/SVGTextPathElement.cpp: Removed unneeded includes.
(WebCore::SVGTextPathElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGTextPositioningElement.cpp: Removed unneeded includes.
(WebCore::SVGTextPositioningElement::isSupportedAttribute): Deleted.
(WebCore::SVGTextPositioningElement::parseAttribute): Don't use isSupportedAttribute.
(WebCore::SVGTextPositioningElement::svgAttributeChanged): Don't use isSupportedAttribute.
* svg/SVGTextPositioningElement.h: Removed isSupportedAttribute and made some functions
private insetad of protected.
* svg/SVGURIReference.cpp: Removed unneeded includes.
(WebCore::SVGURIReference::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGURIReference.h:
(WebCore::SVGURIReference::isExternalURIReference):
* svg/SVGUseElement.cpp: Removed unneeded includes.
(WebCore::SVGUseElement::parseAttribute): Don't use isSupportedAttribute.
* svg/SVGViewElement.h: Removed isSupportedAttribute.
* svg/animation/SVGSMILElement.cpp: Removed unneeded includes.

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

5 years agoRemove unneeded includes of "Attribute.h"
darin@apple.com [Sun, 29 Mar 2015 20:38:07 +0000 (20:38 +0000)]
Remove unneeded includes of "Attribute.h"
https://bugs.webkit.org/show_bug.cgi?id=143195

Reviewed by Antti Koivisto.

* css/StyleResolver.cpp:
* html/HTMLAnchorElement.cpp:
* html/HTMLAreaElement.cpp:
* html/HTMLBRElement.cpp:
* html/HTMLBaseElement.cpp:
* html/HTMLBodyElement.cpp:
* html/HTMLButtonElement.cpp:
* html/HTMLCanvasElement.cpp:
* html/HTMLDivElement.cpp:
* html/HTMLElement.cpp:
* html/HTMLEmbedElement.cpp:
* html/HTMLFontElement.cpp:
* html/HTMLFormControlElement.cpp:
* html/HTMLFormElement.cpp:
* html/HTMLFrameElement.cpp:
* html/HTMLFrameElementBase.cpp:
* html/HTMLFrameSetElement.cpp:
* html/HTMLHRElement.cpp:
* html/HTMLIFrameElement.cpp:
* html/HTMLImageElement.cpp:
* html/HTMLOListElement.cpp:
* html/HTMLOptionElement.cpp:
* html/HTMLParagraphElement.cpp:
* html/HTMLParamElement.cpp:
* html/HTMLPlugInElement.cpp:
* html/HTMLPreElement.cpp:
* html/HTMLProgressElement.cpp:
* html/HTMLScriptElement.cpp:
* html/HTMLSelectElement.cpp:
* html/HTMLStyleElement.cpp:
* html/HTMLTableCaptionElement.cpp:
* html/HTMLTableCellElement.cpp:
* html/HTMLTableColElement.cpp:
* html/HTMLTableElement.cpp:
* html/HTMLTablePartElement.cpp:
* html/HTMLTextAreaElement.cpp:
* html/HTMLTextFormControlElement.cpp:
* html/HTMLUListElement.cpp:
* html/HTMLVideoElement.cpp:
* html/parser/HTMLScriptRunner.cpp:
* inspector/InspectorNodeFinder.cpp:
Removed includes of "Attribute.h".

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

5 years ago[buildbot] clean-build script should remove untracked files and revert local changes too
youenn.fablet@crf.canon.fr [Sun, 29 Mar 2015 18:47:04 +0000 (18:47 +0000)]
[buildbot] clean-build script should remove untracked files and revert local changes too
https://bugs.webkit.org/show_bug.cgi?id=142400

Reviewed by Ryosuke Niwa.

This patch cleans the WebKit folder by deleting SCM untracked files and reverting changes for tracked files.

* BuildSlaveSupport/clean-build:
(main): Adding call to Tools/Scripts/clean-webkit.
* Scripts/clean-webkit: Added.
(main): Removes untracked and changed files.
* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.untracked_files): Retrieves GIT untracked files.
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.untracked_files): Retrieves SVN untracked files.
(SCM):
(SCM.discard_untracked_files): Deletes untracked files/folders.
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(SCMTest._shared_test_untracked_files): Unit testing for untracked files.
(test_untracked_files):
(GitSVNTest.test_untracked_files):
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN.untracked_files):

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

5 years agoClean up JavaScriptCore/builtins
commit-queue@webkit.org [Sun, 29 Mar 2015 06:58:26 +0000 (06:58 +0000)]
Clean up JavaScriptCore/builtins
https://bugs.webkit.org/show_bug.cgi?id=143177

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-28
Reviewed by Ryosuke Niwa.

* builtins/ArrayConstructor.js:
(from):
- We can compare to undefined instead of using a typeof undefined check.
- Converge on double quoted strings everywhere.

* builtins/ArrayIterator.prototype.js:
(next):
* builtins/StringIterator.prototype.js:
(next):
- Use shorthand object construction to avoid duplication.
- Improve grammar in error messages.

* tests/stress/array-iterators-next-with-call.js:
* tests/stress/string-iterators.js:
- Update for new error message strings.

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

5 years ago[Mac] Update for output device API change
eric.carlson@apple.com [Sun, 29 Mar 2015 02:07:43 +0000 (02:07 +0000)]
[Mac] Update for output device API change
https://bugs.webkit.org/show_bug.cgi?id=143187

Reviewed by Zalan Bujtas.

The API used for output device is being deprecated, update to the replacement.

* WebCore.xcodeproj/project.pbxproj: Add SPI headers.

* platform/graphics/MediaPlaybackTarget.h:
(WebCore::MediaPlaybackTarget::MediaPlaybackTarget): Update for API change.
(WebCore::MediaPlaybackTarget::setDevicePickerContext):
(WebCore::MediaPlaybackTarget::devicePickerContext):

* platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
(WebCore::MediaPlaybackTarget::encode):
(WebCore::MediaPlaybackTarget::decode):

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
(WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
(WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired):
(WebCore::MediaPlaybackTargetPickerMac::devicePicker):
(WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
(WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets):
(-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
(-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Deleted.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

* platform/spi/cocoa/AVKitSPI.h: Copied from Source/WebCore/platform/spi/ios/AVKitSPI.h. Moved
    from ios directory, added Mac includes and prototypes.
* platform/spi/ios/AVKitSPI.h: Removed.

* platform/spi/mac/AVFoundationSPI.h: Added.

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

5 years agoOptimize RenderLayer::intersectsDamageRect() slightly
simon.fraser@apple.com [Sat, 28 Mar 2015 23:17:30 +0000 (23:17 +0000)]
Optimize RenderLayer::intersectsDamageRect() slightly
https://bugs.webkit.org/show_bug.cgi?id=143186

Reviewed by Zalan Bujtas.

We can early return from RenderLayer::intersectsDamageRect() if the
damageRect is empty, since nothing will intersect with the empty rect.

Slight performance gain when scrolling overflow-scroll with lots of nested,
clipping layers.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

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

5 years agoRemove an unused SPI method from WebKitLegacy
andersca@apple.com [Sat, 28 Mar 2015 20:44:39 +0000 (20:44 +0000)]
Remove an unused SPI method from WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=143185

Reviewed by Sam Weinig.

Source/WebCore:

* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::storeCopyOfCache): Deleted.
* loader/appcache/ApplicationCacheStorage.h:

Source/WebKit/mac:

* WebView/WebDataSource.mm:
(-[WebDataSource _transferApplicationCache:]): Deleted.
* WebView/WebDataSourcePrivate.h:

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

5 years agoWeb Inspector: ES6: Better support for Symbol types in Type Profiler
saambarati1@gmail.com [Sat, 28 Mar 2015 17:28:11 +0000 (17:28 +0000)]
Web Inspector: ES6: Better support for Symbol types in Type Profiler
https://bugs.webkit.org/show_bug.cgi?id=141257

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

ES6 introduces the new primitive type Symbol. This patch makes JSC's
type profiler support this new primitive type.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* inspector/protocol/Runtime.json:
* runtime/RuntimeType.cpp:
(JSC::runtimeTypeForValue):
* runtime/RuntimeType.h:
(JSC::runtimeTypeIsPrimitive):
* runtime/TypeSet.cpp:
(JSC::TypeSet::addTypeInformation):
(JSC::TypeSet::dumpTypes):
(JSC::TypeSet::doesTypeConformTo):
(JSC::TypeSet::displayName):
(JSC::TypeSet::inspectorTypeSet):
(JSC::TypeSet::toJSONString):
* runtime/TypeSet.h:
(JSC::TypeSet::seenTypes):
* tests/typeProfiler/driver/driver.js:
* tests/typeProfiler/symbol.js: Added.
(wrapper.foo):
(wrapper.bar):
(wrapper.bar.bar.baz):
(wrapper):

Source/WebInspectorUI:

The Web Inspector's visualization of JSC's type profiler
should have support for the Symbol type.

* UserInterface/Models/TypeSet.js:
(WebInspector.TypeSet):
(WebInspector.TypeSet.prototype.get primitiveTypeNames):
* UserInterface/Views/TypeTokenView.css:
TypeTokenView will display Symbol type tokens using the same color that
Symbol values are displayed as formatted values.

(.type-token-symbol):
* UserInterface/Views/TypeTokenView.js:
(WebInspector.TypeTokenView.prototype._displayTypeName):
(WebInspector.TypeTokenView):

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

5 years agoWeb Inspector: Adopt Array.prototype.includes and String.prototype.includes
commit-queue@webkit.org [Sat, 28 Mar 2015 16:38:00 +0000 (16:38 +0000)]
Web Inspector: Adopt Array.prototype.includes and String.prototype.includes
https://bugs.webkit.org/show_bug.cgi?id=143176

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-28
Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

* UserInterface/Base/Utilities.js:
Remove our custom implementations of Array/String contains functions.

* UserInterface/Base/Main.js:
(WebInspector._updateContentViewForCurrentNavigationSidebar):
(WebInspector._contentBrowserCurrentContentViewDidChange):
* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
* UserInterface/Controllers/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._extraDomainsActivated):
(WebInspector.FrameResourceManager):
* UserInterface/Controllers/LayerTreeManager.js:
(WebInspector.LayerTreeManager.prototype.layerTreeMutations):
* UserInterface/Controllers/StorageManager.js:
(WebInspector.StorageManager.prototype._extraDomainsActivated):
(WebInspector.StorageManager):
* UserInterface/Models/Branch.js:
(WebInspector.Branch.prototype.addRevision):
* UserInterface/Models/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.get matchedSelectors):
* UserInterface/Models/CSSStyleDeclaration.js:
* UserInterface/Models/Color.js:
(WebInspector.Color.fromString):
* UserInterface/Models/DOMNode.js:
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._updatePseudoClassCheckboxes):
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem):
* UserInterface/Views/DOMTreeElement.js:
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._resourceAdded):
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.addClassName):
(WebInspector.GeneralTreeElement.prototype.removeClassName):
* UserInterface/Views/LegacyConsoleMessageImpl.js:
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsTable):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._updateMessagesSelection):
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype._findNavigationItem):
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.findSidebarPanel):
Replace contains with includes where appropriate.

LayoutTests:

* inspector/css/pseudo-element-matches.html:

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

5 years agoWeb Inspector: Tweak node styles in ObjectTreeView
commit-queue@webkit.org [Sat, 28 Mar 2015 16:33:48 +0000 (16:33 +0000)]
Web Inspector: Tweak node styles in ObjectTreeView
https://bugs.webkit.org/show_bug.cgi?id=143179

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-28
Reviewed by Timothy Hatcher.

* UserInterface/Views/LogContentView.css:
(.console-group-messages .outline-disclosure.single-node li):
* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline.single-node li):
This style makes sense as a generic DOMTreeOutline style.

* UserInterface/Views/FormattedValue.css:
(.formatted-node > .dom-tree-outline):
(.formatted-node > .dom-tree-outline ol):
(.formatted-node > .dom-tree-outline li.hovered:not(.selected) .selection):
Style for nodes in ObjectTreeView.

* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-value .formatted-node .dom-tree-outline):
Styles for node in Array value.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForNode):
Address the FIXME.

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

5 years agonullptr cleanup in InlineFooBox classes
commit-queue@webkit.org [Sat, 28 Mar 2015 11:59:49 +0000 (11:59 +0000)]
nullptr cleanup in InlineFooBox classes
https://bugs.webkit.org/show_bug.cgi?id=143178

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-03-28
Reviewed by Csaba Osztrogonác.

No new tests, no behavior changes

Replace 0 with nullptr in InlineFooBox classes.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::prevLeafChildIgnoringLineBreak):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::removeChild):
(WebCore::InlineFlowBox::deleteLine):
(WebCore::InlineFlowBox::placeBoxesInInlineDirection):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::InlineFlowBox):
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::InlineTextBox):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::getLogicalStartBoxWithNode):
(WebCore::RootInlineBox::getLogicalEndBoxWithNode):
* rendering/RootInlineBox.h:
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::SVGInlineTextBox):
(WebCore::SVGInlineTextBox::releasePaintingResource):
(WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::closestLeafChildForPosition):
(WebCore::findFirstAndLastAttributesInVector):
* rendering/svg/SVGRootInlineBox.h:

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

5 years agoREGRESSION(r181326): It made dfg-int16array.js and dfg-int8array.js fail on AArch64...
ossy@webkit.org [Sat, 28 Mar 2015 09:57:07 +0000 (09:57 +0000)]
REGRESSION(r181326): It made dfg-int16array.js and dfg-int8array.js fail on AArch64 Linux
https://bugs.webkit.org/show_bug.cgi?id=142629

Unreviewed gardening, unskip now passing tests after r182091.

* js/script-tests/dfg-int16array.js:
* js/script-tests/dfg-int8array.js:

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

5 years agoDeconstruction parameters are bound too late
saambarati1@gmail.com [Sat, 28 Mar 2015 06:01:33 +0000 (06:01 +0000)]
Deconstruction parameters are bound too late
https://bugs.webkit.org/show_bug.cgi?id=143148

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Currently, a deconstruction pattern named with the same
name as a function will shadow the function. This is
wrong. It should be the other way around.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):

LayoutTests:

* js/regress/deconstructing-parameters-overridden-by-function-expected.txt: Added.
* js/regress/deconstructing-parameters-overridden-by-function.html: Added.
* js/regress/script-tests/deconstructing-parameters-overridden-by-function.js: Added.
(f):
(test):
(.arg):

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

5 years agoMore modern loops in RenderLayer.cpp
simon.fraser@apple.com [Sat, 28 Mar 2015 05:45:27 +0000 (05:45 +0000)]
More modern loops in RenderLayer.cpp
https://bugs.webkit.org/show_bug.cgi?id=143175

Reviewed by Ryosuke Niwa.

Use modern loops in more places in RenderLayer.app.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::update3DTransformedDescendantStatus):
(WebCore::RenderLayer::paint):
(WebCore::performOverlapTests):
(WebCore::RenderLayer::paintFixedLayersInNamedFlows):
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
(WebCore::RenderLayer::calculateClipRects):

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

5 years agonullptr cleanup in RenderLayer
simon.fraser@apple.com [Sat, 28 Mar 2015 05:45:20 +0000 (05:45 +0000)]
nullptr cleanup in RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=143174

Reviewed by Ryosuke Niwa.

Replace 0 with nullptr in RenderLayer.cpp.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::filterRenderer):
(WebCore::RenderLayer::updateLayerPositionsAfterLayout):
(WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll):
(WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
(WebCore::RenderLayer::enclosingOverflowClipLayer):
(WebCore::RenderLayer::enclosingCompositingLayer):
(WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
(WebCore::RenderLayer::enclosingFilterLayer):
(WebCore::RenderLayer::enclosingFilterRepaintLayer):
(WebCore::RenderLayer::clippingRootForPainting):
(WebCore::RenderLayer::transparentPaintingAncestor):
(WebCore::transparencyClipBox):
(WebCore::RenderLayer::removeChild):
(WebCore::RenderLayer::removeOnlyThisLayer):
(WebCore::RenderLayer::insertOnlyThisLayer):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::enclosingScrollableArea):
(WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
(WebCore::RenderLayer::enclosingElement):
(WebCore::RenderLayer::enclosingFlowThreadAncestor):
(WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestTransformedLayerInFragments):
(WebCore::RenderLayer::hitTestLayerByApplyingTransform):
(WebCore::RenderLayer::hitTestList):
(WebCore::RenderLayer::updateClipRects):
(WebCore::RenderLayer::clipRects):
(WebCore::RenderLayer::calculateClipRects):

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

5 years agoWeb Inspector: TypeProfiler doesn't work on files with ES6 Class Syntax
commit-queue@webkit.org [Sat, 28 Mar 2015 05:04:23 +0000 (05:04 +0000)]
Web Inspector: TypeProfiler doesn't work on files with ES6 Class Syntax
https://bugs.webkit.org/show_bug.cgi?id=143169

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-27
Reviewed by Timothy Hatcher.

* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):
Add basic support for Esprima's ES6 Class/Method/Spread nodes.
There are more ES6 features that should be covered, but this
covers all the features we use in Web Inspector source, so
Type Profiling can work with our own source.

Treat Methods like getters / setters right now because their
syntax is very similiar to getters/setters. There is a bug
handling generic ES6 cleanup to better name things.

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

5 years agoWeb Inspector: Uncaught TDZ Exception with Type Profiler
commit-queue@webkit.org [Sat, 28 Mar 2015 04:42:48 +0000 (04:42 +0000)]
Web Inspector: Uncaught TDZ Exception with Type Profiler
https://bugs.webkit.org/show_bug.cgi?id=143167

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-27
Reviewed by Timothy Hatcher.

* UserInterface/Views/TypePropertiesSection.js:
(WebInspector.TypePropertyTreeElement):
Avoid TDZ issue by not using "this" before "super".

* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):
Better handle unsupported node types by returning null and avoiding an exception.

* UserInterface/Views/SourceCodeTextEditor.js:
Fix an issue I saw once where the sourceCode was a Script itself.

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

5 years agoWeb Inspector: Uncaught exception while debugging, after performSearch callback line...
commit-queue@webkit.org [Sat, 28 Mar 2015 04:41:47 +0000 (04:41 +0000)]
Web Inspector: Uncaught exception while debugging, after performSearch callback line does not exists
https://bugs.webkit.org/show_bug.cgi?id=143172

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-27
Reviewed by Timothy Hatcher.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
(WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
Gracefully handle if the line does not exist.

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

5 years ago.:
gyuyoung.kim@samsung.com [Sat, 28 Mar 2015 04:18:13 +0000 (04:18 +0000)]
.:
[CMake] Remove unnecessary INCLUDE_IF_EXISTS macro
https://bugs.webkit.org/show_bug.cgi?id=143138

Reviewed by Csaba Osztrogonác.

INCLUDE_IF_EXISTS isn't used except for 2 places. However those uses can
be replaced with WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS.

* Source/cmake/OptionsWindows.cmake:
Set "PORT" instead of "PORT_FALLBACK" because there is no benefit to define PORT_FALLBACK.
* Source/cmake/WebKitMacros.cmake:

Tools:
[CMake] Remove unnecessary INCLUDE_IF_EXISTS macro
https://bugs.webkit.org/show_bug.cgi?id=143138

Reviewed by Csaba Osztrogonác.

INCLUDE_IF_EXISTS isn't used except for 2 places. However those uses can
be replaced with WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS.

* ImageDiff/CMakeLists.txt:
Use WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() instead of INCLUDE_IF_EXISTS.
* WebKitTestRunner/CMakeLists.txt: ditto.

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

5 years agoparse doesn't initialize the 16-bit version of the JSC parser with defaultConstructorKind
rniwa@webkit.org [Sat, 28 Mar 2015 04:02:49 +0000 (04:02 +0000)]
parse doesn't initialize the 16-bit version of the JSC parser with defaultConstructorKind
https://bugs.webkit.org/show_bug.cgi?id=143170

Reviewed by Benjamin Poulain.

Assert that we never use 16-bit version of the parser to parse a default constructor
since both base and derived default constructors should be using a 8-bit string.

* parser/Parser.h:
(JSC::parse):

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

5 years ago[TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
yoon@igalia.com [Sat, 28 Mar 2015 03:15:07 +0000 (03:15 +0000)]
[TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=142386

Reviewed by Žan Doberšek.

TextureMapper and TextureMapperGL are bloated and tightly coupled with
BitmapTexture. We should move these classes to seperated file of their own.
Also, this patch removes friend relationship from TextureMapperGL and  its
subsidiary classes.

The main purpose of this refactoring is to expose BitmapTexturePool to
renderers of platformlayers like Video and Canvas. By doing this, each
renderer can acquire textures from the global texture pool to paint
their contents directly.

Source/WebCore:

No new tests needed.

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
Include BitmapTextureGL and BitmapTexturePool explicitly

* platform/graphics/texmap/BitmapTexture.cpp: Added.
* platform/graphics/texmap/BitmapTexture.h: Added.
(WebCore::BitmapTexture::updateContents):
Exclude BitmapTexture class from TextureMapper

* platform/graphics/texmap/BitmapTextureGL.cpp: Added.
* platform/graphics/texmap/BitmapTextureGL.h: Added.
Exclude BitmapTextureGL class from TextureMapperGL
(WebCore::BitmapTextureGL::clipStack): Added.
Add the getter for clipStack for TextureMapperGL
(WebCore::BitmapTextureGL::Bind): Deleted.
(WebCore::BitmapTextureGL::BindAsSurface): Added.
Bind used TextureMapperGL's internal data directly to compute projection matrix as a friend class,
However, TextureMapperGL can compute projection matrix itself after binding job, so this
friend ship is not needed. Also, this patch renames Bind to BindAsSurface to remove ambiguity.

* platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Added.
* platform/graphics/texmap/BitmapTextureImageBuffer.h: Added.
Exclude BitmapTextureImageBuffer class from TextureMapperImageBuffer

* platform/graphics/texmap/BitmapTexturePool.cpp: Added.
* platform/graphics/texmap/BitmapTexturePool.h: Added.
Exclude BitmapTexturePool class from TextureMapperGL
(WebCore::BitmapTexturePool::acquireTexture):
Modified to use passed GraphicsContext3D instead of TextureMapperGL to remove redundant coupling

* platform/graphics/texmap/TextureMapper.cpp:
* platform/graphics/texmap/TextureMapper.h:
Remove BitmapTexturePool and BitmapTexture from its implementation.

* platform/graphics/texmap/TextureMapperGL.cpp:
* platform/graphics/texmap/TextureMapperGL.h:
Remove BitmapTextureGL from its implementation.
(WebCore::TextureMapperGL::TextureMapperGL):
(WebCore::TextureMapperGL::clipStack):
(WebCore::TextureMapperGL::bindSurface):
(WebCore::TextureMapperGL::currentSurface):
Add a getter of the current surface for filtering operation in BitmapTextureGL.
It would be clear to move filtering operation from BitmapTextureGL to TextureMapperGL later.

(WebCore::TextureMapperGL::ClipStack):
Move inner class declaration to public.

* platform/graphics/texmap/TextureMapperImageBuffer.cpp:
* platform/graphics/texmap/TextureMapperImageBuffer.h:
Remove BitmapTextureImageBuffer from its implementation.

Source/WebKit2:

* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: Include BitmapTextureGL.h explicitly

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

5 years agoES6 Classes: Runtime error in JIT'd class calling super() with arguments and supercla...
rniwa@webkit.org [Sat, 28 Mar 2015 03:09:20 +0000 (03:09 +0000)]
ES6 Classes: Runtime error in JIT'd class calling super() with arguments and superclass has default constructor
https://bugs.webkit.org/show_bug.cgi?id=142862

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Add a test that used to fail in DFG now that the bug has been fixed by r181993.

* tests/stress/class-syntax-derived-default-constructor.js: Added.

Source/WebInspectorUI:

Removed the workaround for the bug since it has been fixed by r181993.

* UserInterface/Base/Object.js:
* UserInterface/Models/DebuggerDashboard.js:
* UserInterface/Models/NetworkTimeline.js:
* UserInterface/Models/ReplayDashboard.js:
* UserInterface/Models/Revision.js:

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

5 years agoWeb Inspector: Add Setter Icon for ObjectTreeView
joepeck@webkit.org [Sat, 28 Mar 2015 02:56:24 +0000 (02:56 +0000)]
Web Inspector: Add Setter Icon for ObjectTreeView
https://bugs.webkit.org/show_bug.cgi?id=143129

Reviewed by Timothy Hatcher.

* UserInterface/Images/Pencil.svg: Added.
New icon used to indicate setter properties.

* Localizations/en.lproj/localizedStrings.js:
Remove "Read only" and replace with "Setter".

* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeArrayIndexTreeElement):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitleAPIStyle):
Update cases that created setter / getter elements.

* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement):
(WebInspector.ObjectTreeBaseTreeElement.prototype.createInteractiveGetterElement): Deleted.
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property :matches(.getter, .setter)):
(.object-tree-property .spacer):
(.object-tree-property .getter):
(.object-tree-property .setter):
(.object-tree-property .getter + .setter):
New setter element and styles. Setters are always non-interactable right now.

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

5 years agoload8Signed() and load16Signed() should be renamed to avoid confusion
msaboff@apple.com [Sat, 28 Mar 2015 02:55:12 +0000 (02:55 +0000)]
load8Signed() and load16Signed() should be renamed to avoid confusion
https://bugs.webkit.org/show_bug.cgi?id=143168

Reviewed by Benjamin Poulain.

Renamed load8Signed() to load8SignedExtendTo32() and load16Signed() to load16SignedExtendTo32().

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::load8SignedExtendTo32):
(JSC::MacroAssemblerARM::load16SignedExtendTo32):
(JSC::MacroAssemblerARM::load8Signed): Deleted.
(JSC::MacroAssemblerARM::load16Signed): Deleted.
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::load16SignedExtendTo32):
(JSC::MacroAssemblerARM64::load8SignedExtendTo32):
(JSC::MacroAssemblerARM64::load16Signed): Deleted.
(JSC::MacroAssemblerARM64::load8Signed): Deleted.
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::load16SignedExtendTo32):
(JSC::MacroAssemblerARMv7::load8SignedExtendTo32):
(JSC::MacroAssemblerARMv7::load16Signed): Deleted.
(JSC::MacroAssemblerARMv7::load8Signed): Deleted.
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::load8SignedExtendTo32):
(JSC::MacroAssemblerMIPS::load16SignedExtendTo32):
(JSC::MacroAssemblerMIPS::load8Signed): Deleted.
(JSC::MacroAssemblerMIPS::load16Signed): Deleted.
* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::load8SignedExtendTo32):
(JSC::MacroAssemblerSH4::load8):
(JSC::MacroAssemblerSH4::load16SignedExtendTo32):
(JSC::MacroAssemblerSH4::load16):
(JSC::MacroAssemblerSH4::load8Signed): Deleted.
(JSC::MacroAssemblerSH4::load16Signed): Deleted.
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::load8SignedExtendTo32):
(JSC::MacroAssemblerX86Common::load16SignedExtendTo32):
(JSC::MacroAssemblerX86Common::load8Signed): Deleted.
(JSC::MacroAssemblerX86Common::load16Signed): Deleted.
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitIntTypedArrayGetByVal):

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

5 years agoUse a typedef for the WKPluginLoadClientPolicy enum
andersca@apple.com [Sat, 28 Mar 2015 01:57:22 +0000 (01:57 +0000)]
Use a typedef for the WKPluginLoadClientPolicy enum
https://bugs.webkit.org/show_bug.cgi?id=143161

Reviewed by Tim Horton.

* UIProcess/API/C/WKPluginLoadPolicy.h:

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

5 years agoWeb Inspector: Uncaught Exceptions with Context Menus
commit-queue@webkit.org [Sat, 28 Mar 2015 00:59:28 +0000 (00:59 +0000)]
Web Inspector: Uncaught Exceptions with Context Menus
https://bugs.webkit.org/show_bug.cgi?id=143162

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-27
Reviewed by Timothy Hatcher.

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.contextMenuCleared):

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

5 years agoWeb Inspector: Disable editing in Metrics section while it is not working
commit-queue@webkit.org [Sat, 28 Mar 2015 00:57:53 +0000 (00:57 +0000)]
Web Inspector: Disable editing in Metrics section while it is not working
https://bugs.webkit.org/show_bug.cgi?id=143165

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-27
Reviewed by Timothy Hatcher.

* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement):
(WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput):
Disable double click to edit while it is not working. The value setter
and add methods no longer exist.

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

5 years agoWeb Inspector: Uncaught Exceptions evaluating code while paused
commit-queue@webkit.org [Sat, 28 Mar 2015 00:56:03 +0000 (00:56 +0000)]
Web Inspector: Uncaught Exceptions evaluating code while paused
https://bugs.webkit.org/show_bug.cgi?id=143163

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-27
Reviewed by Timothy Hatcher.

* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.prototype.collectScopeChainVariableNames):
We define a property named "valueForCaseInsensitiveKey" on Object.prototype
that is readonly. So we should avoid Object.prototype when building our
result list. This should probably move to a Map object eventually.

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

5 years agoWeb Inspector: Remove unused testing properties
commit-queue@webkit.org [Sat, 28 Mar 2015 00:54:31 +0000 (00:54 +0000)]
Web Inspector: Remove unused testing properties
https://bugs.webkit.org/show_bug.cgi?id=143156

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-27
Reviewed by Timothy Hatcher.

* UserInterface/Views/LegacyConsoleMessageImpl.js:
(WebInspector.LegacyConsoleMessageImpl.prototype._formatMessage):
* UserInterface/Views/Section.js:
(WebInspector.Section.prototype.get subtitleAsTextForTest): Deleted.

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

5 years agoWeb Inspector: Uncaught Exception: TypeError: Attempted to assign to readonly - DOMNo...
commit-queue@webkit.org [Sat, 28 Mar 2015 00:51:18 +0000 (00:51 +0000)]
Web Inspector: Uncaught Exception: TypeError: Attempted to assign to readonly - DOMNodeDetailsSidebarPanel.js
https://bugs.webkit.org/show_bug.cgi?id=143139

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-27
Reviewed by Timothy Hatcher.

DataGridNodes do not have a selectable setter. TreeElements do.
DataGridNodes are always selectable. Match current behavior by
removing all instances of attempting to set the selectability
which would, under strict mode, result in an error.

* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._populateDataGrid):
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._createAttributesDataGrid):
(WebInspector.DOMNodeDetailsSidebarPanel):
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.reset):
* UserInterface/Views/DataGrid.js:

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

5 years agoFix flakey dfg-int8array.js and dfg-int16array.js tests for ARM64
msaboff@apple.com [Sat, 28 Mar 2015 00:40:56 +0000 (00:40 +0000)]
Fix flakey dfg-int8array.js and dfg-int16array.js tests for ARM64
https://bugs.webkit.org/show_bug.cgi?id=138390

Reviewed by Mark Lam.

Source/JavaScriptCore:

Changed load8Signed() and load16Signed() to only sign extend the loaded value to 32 bits
instead of 64 bits.  This is what X86-64 does.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::load16Signed):
(JSC::MacroAssemblerARM64::load8Signed):

LayoutTests:

Reenabled the tests for ARM64/iOS.  Left the tests disabled for ARM64/linux and will let linux
developers test and reenable under existing but https://bugs.webkit.org/show_bug.cgi?id=142629.

* js/script-tests/dfg-int16array.js:
* js/script-tests/dfg-int8array.js:

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

5 years ago[WK2][NetworkCache] Use WTF::WorkQueue abstraction inside NetworkCacheStatistics
cdumez@apple.com [Fri, 27 Mar 2015 23:49:15 +0000 (23:49 +0000)]
[WK2][NetworkCache] Use WTF::WorkQueue abstraction inside NetworkCacheStatistics
https://bugs.webkit.org/show_bug.cgi?id=143154

Reviewed by Antti Koivisto.

Use WTF::WorkQueue abstraction inside NetworkCacheStatistics, like we
already do in NetworkCacheStorage.

* NetworkProcess/cache/NetworkCacheStatistics.cpp: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm.
(WebKit::NetworkCache::executeSQLCommand):
(WebKit::NetworkCache::executeSQLStatement):
(WebKit::NetworkCache::Statistics::open):
(WebKit::NetworkCache::Statistics::Statistics):
(WebKit::NetworkCache::Statistics::initialize):
(WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
(WebKit::NetworkCache::Statistics::shrinkIfNeeded):
(WebKit::NetworkCache::Statistics::recordRetrievalRequest):
(WebKit::NetworkCache::Statistics::recordNotCachingResponse):
(WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::storeDecisionToDiagnosticKey):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):
(WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
(WebKit::NetworkCache::Statistics::markAsRequested):
(WebKit::NetworkCache::Statistics::writeTimerFired):
(WebKit::NetworkCache::Statistics::queryWasEverRequested):
(WebKit::NetworkCache::Statistics::clear):
(WebKit::NetworkCache::Statistics::addHashesToDatabase):
(WebKit::NetworkCache::Statistics::addStoreDecisionsToDatabase):
* NetworkProcess/cache/NetworkCacheStatistics.h:
(WebKit::NetworkCache::Statistics::serialBackgroundIOQueue):
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoSupport building WTF on Windows without Cygwin
mmaxfield@apple.com [Fri, 27 Mar 2015 23:08:01 +0000 (23:08 +0000)]
Support building WTF on Windows without Cygwin
https://bugs.webkit.org/show_bug.cgi?id=143084

Reviewed by Brent Fulgham.

Tools:
Windows without Cygwin doesn't have curl, unzip, or grep. Luckily, Perl does all of these things.
This patch also migrates to using File::Spec->catfile() for directory separators.

* Scripts/update-webkit-dependency:
(wanted):
* Scripts/update-webkit-support-libs:
(wanted):
(downloadExpectedVersionNumber):
(zipFileVersion):
(toUnixPath): Deleted.
* Scripts/webkitdirs.pm:
(determineSourceDir):
(windowsSourceSourceDir):
(windowsLibrariesDir):
(windowsOutputDir):
(checkInstalledTools):
(buildVisualStudioProject):

Source/WTF:
Windows doesn't have "touch".

* WTF.vcxproj/WTFGenerated.make:

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

5 years agoWebProcess started by editable WKWebView spends 15% of its initialization time loadin...
timothy_horton@apple.com [Fri, 27 Mar 2015 23:01:37 +0000 (23:01 +0000)]
WebProcess started by editable WKWebView spends 15% of its initialization time loading DataDetectors
https://bugs.webkit.org/show_bug.cgi?id=143142
<rdar://problem/20324495>

Reviewed by Anders Carlsson.

Calling DataDetectorsLibrary() is expensive; we should avoid doing it
until actually necessary. When loading a page that makes a caret selection,
ServicesOverlayController was calling DataDetectorsLibrary() (ignoring the fact
that a caret selection can't have any services associated with it) to avoid
crashing on systems where DataDetectors is not available. Instead, we should
first check if there's anything to do, and then check for the existence
of DataDetectors.

* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
Build the list of phone number ranges, and bail (clearing the potential highlights)
if it is empty, before calling DataDetectorsLibrary().

(WebCore::ServicesOverlayController::buildSelectionHighlight):
Check the list of selection rects, and bail (clearing the potential highlights)
if it is empty, before calling DataDetectorsLibrary().

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

5 years agoSafari clears selection when its window gets activated via mouse down
rniwa@webkit.org [Fri, 27 Mar 2015 22:56:15 +0000 (22:56 +0000)]
Safari clears selection when its window gets activated via mouse down
https://bugs.webkit.org/show_bug.cgi?id=143157

Reviewed by Anders Carlsson.

The bug was caused by PlatformMouseEvent created in WebKit2 not having its event number
even though we were correctly calling setActivationEventNumber in WebPage::acceptsFirstMouse.

Fixed the bug by storing [NSEvent eventNumber] in WebMouseEvent on Mac in WebKit2 as done in WebKit1.

* Shared/WebEvent.h:
(WebKit::WebMouseEvent::eventNumber):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::WebMouseEvent):
(WebKit::WebMouseEvent::encode):
(WebKit::WebMouseEvent::decode):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):

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

5 years agoOnly do the Connection::setShouldCloseConnectionOnMachExceptions() hack where necessary
andersca@apple.com [Fri, 27 Mar 2015 22:07:47 +0000 (22:07 +0000)]
Only do the Connection::setShouldCloseConnectionOnMachExceptions() hack where necessary
https://bugs.webkit.org/show_bug.cgi?id=143141
rdar://problem/19471284

Reviewed by Andreas Kling.

* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::platformInvalidate):
(IPC::Connection::platformInitialize):
(IPC::Connection::open):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):

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

5 years agoImplement iOS WebKit2 PDF Find-in-Page
timothy_horton@apple.com [Fri, 27 Mar 2015 22:04:55 +0000 (22:04 +0000)]
Implement iOS WebKit2 PDF Find-in-Page
https://bugs.webkit.org/show_bug.cgi?id=143065
<rdar://problem/16793370>

Reviewed by Dan Bernstein.

* Platform/spi/ios/CorePDFSPI.h:
Add some SPI.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _countStringMatches:options:maxCount:]):
(-[WKWebView _findString:options:maxCount:]):
(-[WKWebView _hideFindUI]):
If we have a custom content view, forward find-in-page methods to it.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKFindOptions.h:
Move _WKFindOptions into its own file.

* UIProcess/Cocoa/WKWebViewContentProvider.h:
Add find-related methods to the WKWebViewContentProvider protocol.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:]):
(-[WKPDFView dealloc]):
Maintain a dispatch queue for searching the PDF.

(-[WKPDFView web_setContentProviderData:suggestedFilename:]):
Fix a type.

(-[WKPDFView _ensureViewForPage:]):
Split the code to create/parent a page view out from _revalidateViews,
so that the find code can create/parent the targetted UIPDFPageView
in order to install the find highlight in it, but before it is scrolled into view.

(-[WKPDFView _revalidateViews]):
Use the stored page index instead of counting again.
Don't unparent page views that have find-in-page highlights in them, because
we won't know enough to recreate them later.

(-[WKPDFView _computePageAndDocumentFrames]):
Put the page index in PDFPageInfo, for reference elsewhere.

(-[WKPDFView _stringCompareOptionsFromWKFindOptions:]):
(-[WKPDFView _computeMatchesForString:options:maxCount:completionHandler:]):
Asynchronously (and on our serial queue) search the PDF for the given string.
We'll cache the most recent results to avoid searching more than once,
cancel existing searches when another begins (since it's a serial queue,
this ensures we'll only have one search active at a time).

(-[WKPDFView web_countStringMatches:options:maxCount:]):
Count the number of matches for the given string, and inform the FindClient
of the result.

(-[WKPDFView _didFindMatch:]):
When we find a match, create a view for it, highlight the match, and
zoom so that it's in-view.

(-[WKPDFView web_findString:options:maxCount:]):
Incrementally search the document for the given string. We do an incremental
search even if we have all of the results so that we can anchor the search
in the right place if the new string is a prefix of the old string, etc.
Wrap around appropriately when searching past the beginning or end of the
document. If we have all of the results (there were less than maxCount results),
look through the cached matches for the incrementally-found result and
report its index to the client.

(-[WKPDFView web_hideFindUI]):
Dismiss the selection and clear some state so we start the next search afresh.

* WebKit2.xcodeproj/project.pbxproj:

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