WebKit-https.git
6 years agoAdd a new 'analyze' target to the makefile. This will make use of a new
dburkart@apple.com [Fri, 18 Jul 2014 22:39:39 +0000 (22:39 +0000)]
Add a new 'analyze' target to the makefile. This will make use of a new
'PATH_TO_SCAN_BUILD' which, if set will wrap xcodebuild in the clang
static analyzer.
https://bugs.webkit.org/show_bug.cgi?id=135057
<rdar://problem/10193187>

Reviewed by David Kilzer.

* Makefile:
* Makefile.shared:
* Source/Makefile:

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

6 years agoFixed position elements are misplaced when a WK1 view has contentInsets set
bdakin@apple.com [Fri, 18 Jul 2014 22:24:36 +0000 (22:24 +0000)]
Fixed position elements are misplaced when a WK1 view has contentInsets set
https://bugs.webkit.org/show_bug.cgi?id=135031
-and corresponding-
<rdar://problem/17682335>

Reviewed by Tim Horton.

[NSScrollView documentVisibleRect] includes content that is within the inset-area
of a view, but WebCore is interested in the content that is fully visible, so we
need to factor the inset sizes out of this rect.

Implement contract() to avoid the awkwardness of calling expand() with negative
values.
* platform/graphics/IntSize.h:
(WebCore::IntSize::contract):

Factor out insets
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformVisibleContentRect):
(WebCore::ScrollView::platformVisibleContentSize):

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

6 years agoFix EFL+GTK.
fpizlo@apple.com [Fri, 18 Jul 2014 22:08:19 +0000 (22:08 +0000)]
Fix EFL+GTK.

* Scripts/run-jsc-stress-tests:

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

6 years agomedia/video-seek-with-negative-playback.html is flaky on Mac
ap@apple.com [Fri, 18 Jul 2014 20:58:56 +0000 (20:58 +0000)]
media/video-seek-with-negative-playback.html is flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=135071

* platform/mac/TestExpectations: Marked it as such.

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

6 years agoException fuzzing should work on iOS
fpizlo@apple.com [Fri, 18 Jul 2014 20:54:24 +0000 (20:54 +0000)]
Exception fuzzing should work on iOS
https://bugs.webkit.org/show_bug.cgi?id=135070

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:
* tests/exceptionFuzz.yaml:

Tools:
* Scripts/jsc-stress-test-helpers/js-exception-fuzz:
(fail):
* Scripts/run-jsc-stress-tests:

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

6 years ago[Cocoa] Use RetainPtr in _WKRemoteObjectInterface
commit-queue@webkit.org [Fri, 18 Jul 2014 20:50:11 +0000 (20:50 +0000)]
[Cocoa] Use RetainPtr in _WKRemoteObjectInterface
https://bugs.webkit.org/show_bug.cgi?id=135062

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-07-18
Reviewed by Anders Carlsson.

Switch to RetainPtr instead of manual memory management of ivars.

* Shared/API/Cocoa/_WKRemoteObjectInterface.h:
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
(-[_WKRemoteObjectInterface identifier]):
(-[_WKRemoteObjectInterface description]):
(-[_WKRemoteObjectInterface dealloc]): Deleted.

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

6 years agoTake navigation snapshots whenever the current back-forward item is going to change
timothy_horton@apple.com [Fri, 18 Jul 2014 20:34:36 +0000 (20:34 +0000)]
Take navigation snapshots whenever the current back-forward item is going to change
https://bugs.webkit.org/show_bug.cgi?id=135058
<rdar://problem/17464515>

Reviewed by Dan Bernstein.

Instead of trying to have the UI process figure out when to take navigation snapshots by itself,
snapshot whenever the Web process says that the current back-forward item is going to change.
This fixes snapshotting timing with pushState, and lets us bottleneck snapshotting down to
just two places instead of 5.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
We no longer need to special-case taking navigation snapshots
when the UI process changes the back forward item or upon
didStartProvisionalLoadForFrame, because we'll always snapshot
in willChangeCurrentHistoryItem in all of these cases.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willChangeCurrentHistoryItem):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Add willChangeCurrentHistoryItem message, which comes from the Web process.
When it arrives, take a navigation snapshot.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Take the pre-swipe navigation snapshot before telling WebPageProxy that we're doing a swipe,
so that it doesn't bail from taking the snapshot because we have a snapshot up.

(WebKit::ViewGestureController::endSwipeGesture):
We no longer need to explicitly disable snapshotting while navigating, because
we will avoid taking the snapshot if there's a snapshot being displayed.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::~ViewGestureController):
Remove the snapshot if it's still up when ViewGestureController is destroyed.
The Mac version of ViewGestureController is destroyed on Web process crashes
because it is a message receiver, so it is not guaranteed to have the same
lifetime as the WebPageProxy and friends.

(WebKit::ViewGestureController::trackSwipeGesture):
Make use of recordNavigationSnapshot.

(WebKit::ViewGestureController::endSwipeGesture):
Ditto from the Mac version.

* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshotStore::disableSnapshotting): Deleted.
(WebKit::ViewSnapshotStore::enableSnapshotting): Deleted.
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::recordSnapshot):
Remove the snapshot disabling mechanism and bail from snapshotting if we're
showing a snapshot, as mentioned above.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willChangeCurrentHistoryItem):
* WebProcess/WebPage/WebPage.h:
Proxy willChangeCurrentHistoryItem from HistoryController to the UI process.

* loader/HistoryController.cpp:
(WebCore::HistoryController::updateForCommit):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::createItem):
Use setCurrentItem instead of duplicating the contents of it inside each of these functions.

(WebCore::HistoryController::setCurrentItem):
(WebCore::HistoryController::replaceCurrentItem):
When setting or replacing the current item, let the FrameLoaderClient know that we're going
to change which history item is "current".

* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Added.

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

6 years agorun-jsc-stress-tests should be able to run helper-based tests in remote mode
fpizlo@apple.com [Fri, 18 Jul 2014 19:41:04 +0000 (19:41 +0000)]
run-jsc-stress-tests should be able to run helper-based tests in remote mode
https://bugs.webkit.org/show_bug.cgi?id=135064

Reviewed by Mark Hahnenberg.

* Scripts/run-jsc-stress-tests:

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

6 years agorun-jsc-stress-tests: rename $copy to $doNotMessWithVMPath
fpizlo@apple.com [Fri, 18 Jul 2014 19:29:30 +0000 (19:29 +0000)]
run-jsc-stress-tests: rename $copy to $doNotMessWithVMPath
https://bugs.webkit.org/show_bug.cgi?id=135061

Rubber stamped by Mark Hahnenberg.

* Scripts/run-jsc-stress-tests:

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

6 years agoRefactor run-jsc-stress-tests VM copying code to remove some abstractions
fpizlo@apple.com [Fri, 18 Jul 2014 19:13:09 +0000 (19:13 +0000)]
Refactor run-jsc-stress-tests VM copying code to remove some abstractions
https://bugs.webkit.org/show_bug.cgi?id=135059

Reviewed by Mark Lam.

This is meant to make it easier for me to extend the copying functionality to copy things other than
the framework.

* Scripts/run-jsc-stress-tests:

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

6 years agoFix cloop build.
fpizlo@apple.com [Fri, 18 Jul 2014 18:41:03 +0000 (18:41 +0000)]
Fix cloop build.

Source/JavaScriptCore:
* jsc.cpp:
(jscmain):

Tools:
* Scripts/jsc-stress-test-helpers/js-exception-fuzz:

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

6 years agoRevert r169735 since it broke Timeline, and fix bug 129696 in a more targeted way.
timothy@apple.com [Fri, 18 Jul 2014 18:20:54 +0000 (18:20 +0000)]
Revert r169735 since it broke Timeline, and fix bug 129696 in a more targeted way.

REGRESSION (r169735): Web Inspector: Timeline tree outline missing data until collapse-expand.
https://bugs.webkit.org/show_bug.cgi?id=134845

Reviewed by Joseph Pecoraro.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.adjustCollapsedRange): Use button isteand of assuming
item.listItemElement will be ready to use. The listItemElement node is lazily created.
* UserInterface/Views/TreeOutline.js:
(TreeOutline.prototype.appendChild): Don't attach unless _childrenListNode exists.
(TreeOutline.prototype.insertChild): Ditto.

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

6 years agoAdd timeout for transition end. Speculative layout test fix.
zalan@apple.com [Fri, 18 Jul 2014 18:01:24 +0000 (18:01 +0000)]
Add timeout for transition end. Speculative layout test fix.

* fast/layers/no-clipping-overflow-hidden-added-after-transform.html:

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

6 years agoREGRESSION: Crash when typing into text field that clears itself on iOS
jhoneycutt@apple.com [Fri, 18 Jul 2014 17:21:20 +0000 (17:21 +0000)]
REGRESSION: Crash when typing into text field that clears itself on iOS

<https://bugs.webkit.org/show_bug.cgi?id=135044>
<rdar://problem/17640443>

Reviewed by Darin Adler.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestAutocorrectionData):
wordRangeFromPosition() returns null in some cases; null check range
before dereferencing it. Moved some variable declarations around to
better match our style.

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

6 years agoUnreviewed, rolling out r171207.
commit-queue@webkit.org [Fri, 18 Jul 2014 17:14:38 +0000 (17:14 +0000)]
Unreviewed, rolling out r171207.
https://bugs.webkit.org/show_bug.cgi?id=135056

Broke multiple tests on Yosemite (Requested by ap on #webkit).

Reverted changeset:

"Fixed position elements are misplaced when a WK1 view has
contentInsets set"
https://bugs.webkit.org/show_bug.cgi?id=135031
http://trac.webkit.org/changeset/171207

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

6 years ago[GTK] Unreviewed gardening. Removing failure expectations for tests now passing.
mario@webkit.org [Fri, 18 Jul 2014 17:01:44 +0000 (17:01 +0000)]
[GTK] Unreviewed gardening. Removing failure expectations for tests now passing.

* platform/gtk/TestExpectations: Removed failure expectations.

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

6 years agoUnreviewed, rolling out r171218.
commit-queue@webkit.org [Fri, 18 Jul 2014 16:53:51 +0000 (16:53 +0000)]
Unreviewed, rolling out r171218.
https://bugs.webkit.org/show_bug.cgi?id=135055

Made fast/dom/HTMLObjectElement/beforeload-set-text-
crash.xhtml crash (Requested by ap on #webkit).

Reverted changeset:

"REGRESSION (r169105): Crash in selection"
https://bugs.webkit.org/show_bug.cgi?id=134303
http://trac.webkit.org/changeset/171218

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

6 years ago[GTK] Unreviewed GTK gardening. Tests passing after SVN r171001
mario@webkit.org [Fri, 18 Jul 2014 15:23:16 +0000 (15:23 +0000)]
[GTK] Unreviewed GTK gardening. Tests passing after SVN r171001

* platform/gtk/TestExpectations: Removed tests that are now passing.

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

6 years agoFix -v|--verbose option in sort-export-file script.
commit-queue@webkit.org [Fri, 18 Jul 2014 14:12:26 +0000 (14:12 +0000)]
Fix -v|--verbose option in sort-export-file script.
https://bugs.webkit.org/show_bug.cgi?id=135043

Patch by Renato Nagy <nagy.renato@stud.u-szeged.hu> on 2014-07-18
Reviewed by Tim Horton.

-v|--verbose option does not work. Option added to getOptionsResult.

* Scripts/sort-export-file:

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

6 years ago[WK2] Provide a mechanism to grab the back-forward list for gesture navigation purpos...
timothy_horton@apple.com [Fri, 18 Jul 2014 13:41:06 +0000 (13:41 +0000)]
[WK2] Provide a mechanism to grab the back-forward list for gesture navigation purposes from another WKWebView
https://bugs.webkit.org/show_bug.cgi?id=134999
<rdar://problem/17238025>

Reviewed by Sam Weinig.

In some cases, clients may need to throw a WKWebView with no back-forward list over
another WKWebView, and want to participate in gesture swipe as if they were actually
the page being overlaid.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _alternateWebViewForNavigationGestures]):
(-[WKWebViewConfiguration _setAlternateWebViewForNavigationGestures:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
Keep an "alternate" WKWebView "for navigation gestures", which ViewGestureController
will use as the real source of back-forward items, and the destination of the swipe navigation.
All swipe delegate callbacks will also fire from the alternate view, because it owns the items
and will be doing the navigation.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::setAlternateBackForwardListSourceView):
(WebKit::ViewGestureController::beginSwipeGesture):
Send navigationGestureDidBegin via the alternate view's WebPageProxy if it exists.
Record a new snapshot on the current page, but copy it to the alternate view if necessary,
so that when swiping forward from the alternate view, it will have the "right" snapshot.
Get the target back forward item from the alternate view.
Send navigationGestureWillEnd via the alternate view's WebPageProxy if it exists.

(WebKit::ViewGestureController::canSwipeInDirection):
Determine if we can swipe in a direction by looking at the alternate view's back-forward list if necessary.

(WebKit::ViewGestureController::endSwipeGesture):
Send navigationGestureDidEnd via the alternate view's WebPageProxy if it exists.
Perform the navigation on the alternate view if necessary.

(WebKit::ViewGestureController::removeSwipeSnapshot):
Send navigationGestureSnapshotWasRemoved via the alternate view's WebPageProxy if it exists.

* UIProcess/mac/ViewGestureController.h:

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

6 years agoREGRESSION (r169105): Crash in selection
krit@webkit.org [Fri, 18 Jul 2014 09:50:01 +0000 (09:50 +0000)]
REGRESSION (r169105): Crash in selection
https://bugs.webkit.org/show_bug.cgi?id=134303

Patch by Radu Stavila <stavila@adobe.com> on 2014-07-18
Reviewed by Ryosuke Niwa.

Source/WebCore:
When splitting the selection between different subtrees, all subtrees must have their selection cleared before
starting to apply the new selection. Otherwise, when selecting objects in a named flow thread and going up
its containing block chain, we can end up in the view's selection root, which has not yet been updated and so
we get inconsistent data.

To achieve this goal, the selection update was split into a "clear" and an "apply" method. The updateSelectionForSubtrees
method first iterates through all subtrees and performs the "clear" method and then starts all over again
and performs the "apply" method.

Also, the selectionStart/End members in RenderView have been renamed to fix problems caused by the fact that
RenderView inherits SelectionSubtreeRoot, which also has the same selectionStart/End members.

Test: fast/regions/selection/crash-deselect.html

* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::isSelectionRoot):
* rendering/RenderSelectionInfo.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
(WebCore::RenderView::setSelection): Renamed m_selectionStart/End to m_unsplitSelectionStart/End
(WebCore::RenderView::splitSelectionBetweenSubtrees):
(WebCore::RenderView::updateSelectionForSubtrees): Added, clears and re-applies selection for all selection subtrees.
(WebCore::RenderView::clearSubtreeSelection): Added, clears selection and returns previously selected information.
(WebCore::RenderView::applySubtreeSelection): Added, updates the selection status of all objects inside the selection tree, compares old and new data and repaints accordingly.
(WebCore::RenderView::getSelection): Renamed m_selectionStart/End to m_unsplitSelectionStart/End
(WebCore::RenderView::setSubtreeSelection): Deleted.
* rendering/RenderView.h:
* rendering/SelectionSubtreeRoot.cpp:
(WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
* rendering/SelectionSubtreeRoot.h:
(WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData):

LayoutTests:
Added test for the crash that occurred in some cases when selecting.

* fast/regions/selection/crash-deselect-expected.txt: Added.
* fast/regions/selection/crash-deselect.html: Added.

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

6 years agoReally remove dependency on ShellQuote.
fpizlo@apple.com [Fri, 18 Jul 2014 07:13:36 +0000 (07:13 +0000)]
Really remove dependency on ShellQuote.

* Scripts/jsc-stress-test-helpers/js-exception-fuzz:

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

6 years agoUnreviewed, fix build for platforms that don't have ShellQuote.
fpizlo@apple.com [Fri, 18 Jul 2014 07:11:11 +0000 (07:11 +0000)]
Unreviewed, fix build for platforms that don't have ShellQuote.

* Scripts/jsc-stress-test-helpers/js-exception-fuzz: Take a single argument that has the whole command string.
* Scripts/run-jsc-stress-tests: Do the escaping in Ruby.

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

6 years ago[MSE] Re-enqueue after a removeCodedFrames() only if the removed frames overlap what...
jer.noble@apple.com [Fri, 18 Jul 2014 06:16:56 +0000 (06:16 +0000)]
[MSE] Re-enqueue after a removeCodedFrames() only if the removed frames overlap what may have possibly been enqueued but undisplayed.
https://bugs.webkit.org/show_bug.cgi?id=135039

Reviewed by Eric Carlson.

When a client calls removeCodedFrames(), we must re-enqueue those ranges if the removed samples overlap with
enqueued but possibly un-displayed samples. Otherwise, replacement samples may lead to decode errors as those
new samples dependencies are not met. But if we re-enqueue too frequently, this may cause subtle but noticible
display timing glitches, so only re-enqueue when removeCodedFrames have a possiblity of removing enqueued, but
not yet displayed samples.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::removeCodedFrames):

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

6 years agoNeed ability to fuzz exception throwing
fpizlo@apple.com [Fri, 18 Jul 2014 04:34:16 +0000 (04:34 +0000)]
Need ability to fuzz exception throwing
https://bugs.webkit.org/show_bug.cgi?id=134945
<rdar://problem/17722027>

Reviewed by Sam Weinig.

Source/JavaScriptCore:
Adds the ability to instrument exception checks, and to force some random
exception check to artificially throw an exception. Also adds new tests that
are suitable for testing this. Note that this is closely tied to the Tools
directory changes that are also part of this changeset.

This also fixes an activation tear-off bug that arises if we ever throw an
exception from operationOptimize, or if due to some other bug it's only due
to the operationOptimize exception check that we realize that there is an
exception to be thrown.

* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::fastExceptionCheck):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::callCheck):
* interpreter/Interpreter.cpp:
(JSC::unwindCallFrame):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::callExceptionFuzz):
(JSC::AssemblyHelpers::emitExceptionCheck):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitExceptionCheck): Deleted.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_enter):
* jit/JITOperations.cpp:
(JSC::numberOfExceptionFuzzChecks):
* jit/JITOperations.h:
* jsc.cpp:
(jscmain):
* runtime/Options.h:
* runtime/TestRunnerUtils.h:
* tests/exceptionFuzz.yaml: Added.
* tests/exceptionFuzz: Added.
* tests/exceptionFuzz/3d-cube.js: Added.
* tests/exceptionFuzz/date-format-xparb.js: Added.
* tests/exceptionFuzz/earley-boyer.js: Added.

Tools:
Adds a new script, js-exception-fuzz, which will run some jsc command-line using
exception fuzzing. This means that we will force exceptions to be thrown in random
places to see how the engine reacts. This is now integrated with the various test
drivers, so run-javascriptcore-tests will run some exception fuzzing tests by
default.

* Scripts/jsc-stress-test-helpers/js-exception-fuzz: Added.
(fail):
* Scripts/run-javascriptcore-tests:
* Scripts/run-jsc-stress-tests:

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

6 years agoSECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
ddkilzer@apple.com [Fri, 18 Jul 2014 03:59:47 +0000 (03:59 +0000)]
SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
<http://webkit.org/b/135006>

Reviewed by Darin Adler.

Source/JavaScriptCore:
* Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
JavaScriptCore.xcconfig.
* Configurations/CompileRuntimeToLLVMIR.xcconfig: Remove empty
SECTORDER_FLAGS definition.
* Configurations/DebugRelease.xcconfig: Ditto.
* Configurations/JavaScriptCore.xcconfig: Use $(CONFIGURATION)
so SECTORDER_FLAGS is only set on Production builds.

Source/WebCore:
* Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
WebCore.xcconfig.
* Configurations/DebugRelease.xcconfig: Remove empty
SECTORDER_FLAGS definition.
* Configurations/WebCoreTestShim.xcconfig: Ditto.
* Configurations/WebCoreTestSupport.xcconfig: Ditto.
* Configurations/WebCore.xcconfig: Use $(CONFIGURATION) so
SECTORDER_FLAGS is only set on Production builds.

Source/WebKit:
* WebKit.xcodeproj/project.pbxproj: Remove references to unused
WebKit.xcconfig file.

Source/WebKit/mac:
* Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
WebKitLegacy.xcconfig.
* Configurations/DebugRelease.xcconfig: Remove empty
SECTORDER_FLAGS definition.
* Configurations/WebKit.xcconfig: Removed.  Unused.
* Configurations/WebKitLegacy.xcconfig: Use $(CONFIGURATION) so
SECTORDER_FLAGS is only set on Production builds.

Source/WebKit2:
* Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
WebKit.xcconfig.
* Configurations/DebugRelease.xcconfig: Remove empty
SECTORDER_FLAGS definition.
* Configurations/WebKit.xcconfig: Use $(CONFIGURATION) so
SECTORDER_FLAGS is only set on Production builds.

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

6 years agoREGRESSION (r171167): LoaderClient processDidCrash call is made after load state...
ap@apple.com [Fri, 18 Jul 2014 02:16:00 +0000 (02:16 +0000)]
REGRESSION (r171167): LoaderClient processDidCrash call is made after load state changes
https://bugs.webkit.org/show_bug.cgi?id=135032
<rdar://problem/17716602>

Reviewed by Dan Bernstein.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processDidCrash): Create a transaction, so that the nested
transaction in resetStateAfterProcessExited() wouldn't be committed.
(WebKit::WebPageProxy::resetStateAfterProcessExited): Don't use auto - it was hiding
the most important fact that this is a stack object that can't be simply moved to
a different function.

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

6 years agoSubpixel rendering: Embedded non-compositing rotate transform paints to wrong position.
zalan@apple.com [Fri, 18 Jul 2014 01:56:12 +0000 (01:56 +0000)]
Subpixel rendering: Embedded non-compositing rotate transform paints to wrong position.
https://bugs.webkit.org/show_bug.cgi?id=135028

Reviewed by Simon Fraser.

CTM always translates to where the layer's renderer() is going to paint.
It ensures that the pixel snapped renderer() always end up painting to (0, 0) which is
required to be able to position properly on transformed context.

Source/WebCore:
Test: fast/layers/hidpi-transform-on-child-content-is-mispositioned.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::beginTransparencyLayers):
(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::paintLayerByApplyingTransform):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
(WebCore::RenderLayer::paintOverflowControlsForFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:

LayoutTests:
* fast/layers/hidpi-transform-on-child-content-is-mispositioned-expected.html: Added.
* fast/layers/hidpi-transform-on-child-content-is-mispositioned.html: Added.

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

6 years ago[iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
benjamin@webkit.org [Fri, 18 Jul 2014 01:16:40 +0000 (01:16 +0000)]
[iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
https://bugs.webkit.org/show_bug.cgi?id=135036

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-07-17
Reviewed by Dan Bernstein.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
I forgot to update one of the condition after changing from lastTransaction to next transaction
in r171154.

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

6 years agoDisable live-out calculation for stackmap intrinsics.
commit-queue@webkit.org [Thu, 17 Jul 2014 23:59:52 +0000 (23:59 +0000)]
Disable live-out calculation for stackmap intrinsics.
https://bugs.webkit.org/show_bug.cgi?id=134366

The live-out variables are not required for the stackmaps, because we
don't care about preserving the state when we perform destructive
patching.

Patch by Juergen Ributzka <juergen@apple.com> on 2014-07-17
Reviewed by Filip Pizlo.

* llvm/library/LLVMExports.cpp:
(initializeAndGetJSCLLVMAPI):

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

6 years agoFixed position elements are misplaced when a WK1 view has contentInsets set
bdakin@apple.com [Thu, 17 Jul 2014 23:49:21 +0000 (23:49 +0000)]
Fixed position elements are misplaced when a WK1 view has contentInsets set
https://bugs.webkit.org/show_bug.cgi?id=135031
-and corresponding-
<rdar://problem/17682335>

Reviewed by Tim Horton.

[NSScrollView documentVisibleRect] is not the rect that we are looking for when
this function is called. WebCore is interested in the rect that does not include
content that is within the inset region.

Implement contract() to avoid the awkwardness of calling expand() with negative
values.
* platform/graphics/IntSize.h:
(WebCore::IntSize::contract):

Use _insetBounds instead of documentVisibleRect, and when it’s necessary to use
the frame’s dimensions, extract the inset from that size.
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformVisibleContentRect):
(WebCore::ScrollView::platformVisibleContentSize):

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

6 years agoFollow-up fix to r171195 to prevent ASSERT in fast/profiler/profile-with-no-title...
joepeck@webkit.org [Thu, 17 Jul 2014 23:30:36 +0000 (23:30 +0000)]
Follow-up fix to r171195 to prevent ASSERT in fast/profiler/profile-with-no-title.html

Rubber-stamped by Alexey Proskuryakov.

Null / empty titles should be fine. Tests pass in release builds
which allowed empty titles, and it looks like the LegacyProfiler
stopProfiling handles empty titles as expected already.

* profiler/LegacyProfiler.cpp:
(JSC::LegacyProfiler::startProfiling):

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

6 years ago[REGRESSION WK2]The menu bar does not show up when tapping on the caret.
enrica@apple.com [Thu, 17 Jul 2014 22:46:20 +0000 (22:46 +0000)]
[REGRESSION WK2]The menu bar does not show up when tapping on the caret.
https://bugs.webkit.org/show_bug.cgi?id=135023
<rdar://problem/17617282>

../WebCore:
Reviewed by Benjamin Poulain.

Adding some exports.

* WebCore.exp.in:

../WebKit2:
Reviewed by Benjamin Poulain and Ryosuke Niwa.

WKContentView needs to implement hasContent to correctly show
the appropriate menu bar content. The patch adds this information
to the EditorState.

* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView hasContent]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):

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

6 years ago[iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
benjamin@webkit.org [Thu, 17 Jul 2014 22:08:41 +0000 (22:08 +0000)]
[iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
https://bugs.webkit.org/show_bug.cgi?id=135010

Reviewed by Darin Adler.

This patch add a new SPI, [WKWebView _resizeWhileHidingContentWithUpdates:] to perform all the work
of a dynamic viewport size update, but instead of animating the old content, it is hidden.

The patch is built on top of the animated resize mechanism. Instead of having an animation driving
the beginning and end, we let the content do that. The dynamic resize begins, it runs for as long as
the WebProcess needs, and it ends when first layer tree commit with the new content is processed.

The attribute "_isAnimatingResize" is generalized to support two modes of resizing: animated and
hiding content.

The attribute "_hasCommittedLoadForMainFrame" is rather silly. It is only needed because
[WKWebView _resizeWhileHidingContentWithUpdates:] is intended to be called a lot before the page
is initialized, and doing an animated resize would trash the WebProcess state.
I wish I had a better solution, this is not great.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _processDidExit]):
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _didCommitLayerTree:]):
This is the key to make this work properly. We want _resizeWhileHidingContentWithUpdates: to behave
exactly like an animated resize to avoid bugs. So we went to the whole update mechanism using
_resizeAnimationTransformAdjustments to accumulate the adjustments, now we need to restore a correct
view state.

Calling [WKWebView _endAnimatedResize] will do exactly that, but we need to make sure we do not hit
the synchronization path or we would be blocked there for a while, which is what we are trying to avoid.

After r171154, WebPageProxy keeps track of what stage of dynamic viewport update we are in. Since we are
executing the layer tree update stage, with the right transaction ID, WebPageProxy already knows we have
everything we need and does not use any synchronous messages.

(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
(-[WKWebView _restorePageStateToExposedRect:scale:]):
(-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
(-[WKWebView _scrollToContentOffset:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _setMinimumLayoutSizeOverride:]):
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
(-[WKWebView _setInterfaceOrientationOverride:]):
(-[WKWebView _setMaximumUnobscuredSizeOverride:]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
(-[WKWebView _resizeWhileHidingContentWithUpdates:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

6 years agoFix failing API tests.
weinig@apple.com [Thu, 17 Jul 2014 21:38:08 +0000 (21:38 +0000)]
Fix failing API tests.

* TestWebKitAPI/mac/PlatformWebViewMac.mm:
(-[ActiveOffscreenWindow isVisible]):
Override isVisible to make the NSWindows pretend they are visible.

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

6 years agofast/repaint/obscured-background-no-repaint.html is very flaky
ap@apple.com [Thu, 17 Jul 2014 21:33:55 +0000 (21:33 +0000)]
fast/repaint/obscured-background-no-repaint.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=131477

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
Moved the expectation out of WK2, as this also happens with WK1 on some bots.

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

6 years ago[Mac] Full screen video not always animating in the correct Space
bfulgham@apple.com [Thu, 17 Jul 2014 21:27:56 +0000 (21:27 +0000)]
[Mac] Full screen video not always animating in the correct Space
https://bugs.webkit.org/show_bug.cgi?id=135020
<rdar://problem/17542310>

Reviewed by Dean Jackson.

       The fullscreen window can "remember" the Space it was part of the first time you enter fullscreen
       mode. Subsequent fullscreen transitions will always start from this Space, even if you move
       the WebKit-hosted application to a different Space.

       We can help the display system know when we've moved to a new Space by calling NSWindow's
       'orderBack' method on the fullscreen window prior to starting the transition to fullscreen mode.
       This method call hooks the window into the current Space so everything works properly.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): Add the
new fullscreen window to the current Space before starting transition to fullscreen.

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

6 years agoRemove inspector-protocol/profiler tests from TestExpectations, now that they no
ap@apple.com [Thu, 17 Jul 2014 21:27:00 +0000 (21:27 +0000)]
Remove inspector-protocol/profiler tests from TestExpectations, now that they no
longer exist.

* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:

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

6 years agoMake console.profile record to the Timeline.
timothy@apple.com [Thu, 17 Jul 2014 21:16:46 +0000 (21:16 +0000)]
Make console.profile record to the Timeline.

https://bugs.webkit.org/show_bug.cgi?id=134643

Reviewed by Joseph Pecoraro.

Source/WebCore:
Passes existing profiler tests in fast/profiler.

* bindings/js/ScriptState.cpp:
(WebCore::domWindowFromExecState):
(WebCore::frameFromExecState):
(WebCore::scriptExecutionContextFromExecState):
(WebCore::mainWorldExecState):
(WebCore::execStateFromNode):
* bindings/js/ScriptState.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::profilerEnabled):
(WebCore::InspectorController::setProfilerEnabled):
* inspector/InspectorController.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::startProfilingImpl):
(WebCore::InspectorInstrumentation::stopProfilingImpl):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::stop):
(WebCore::startProfiling):
(WebCore::stopProfiling):
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::stopFromConsole):
(WebCore::InspectorTimelineAgent::didWriteHTML):
(WebCore::InspectorTimelineAgent::breakpointActionProbe):
(WebCore::toProtocol):
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
(WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::sendEvent):
(WebCore::InspectorTimelineAgent::createRecordEntry):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
* inspector/InspectorTimelineAgent.h:
(WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::InstrumentingAgents):
(WebCore::InstrumentingAgents::reset):
* inspector/InstrumentingAgents.h:
(WebCore::InstrumentingAgents::persistentInspectorTimelineAgent):
(WebCore::InstrumentingAgents::setPersistentInspectorTimelineAgent):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createConsoleProfileData):
* inspector/TimelineRecordFactory.h:
* inspector/protocol/Timeline.json:
* page/PageConsole.cpp:
(WebCore::PageConsole::profileEnd):

Source/WebInspectorUI:
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.startCapturing):
(WebInspector.TimelineManager.prototype.stopCapturing):
(WebInspector.TimelineManager.prototype.capturingStarted):
(WebInspector.TimelineManager.prototype.capturingStopped):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
* UserInterface/Images/TimelineRecordConsoleProfile.svg: Added.
* UserInterface/Models/ScriptTimelineRecord.js:
* UserInterface/Protocol/TimelineObserver.js:
(WebInspector.TimelineObserver.prototype.eventRecorded):
(WebInspector.TimelineObserver.prototype.recordingStarted):
(WebInspector.TimelineObserver.prototype.recordingStopped):
* UserInterface/Views/TimelineIcons.css:
(.console-profile-record .icon):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):

Source/WebKit/mac:
* WebInspector/WebInspector.mm:
(-[WebInspector isProfilingJavaScript]):
(-[WebInspector toggleProfilingJavaScript:]):
(-[WebInspector startProfilingJavaScript:]):
(-[WebInspector stopProfilingJavaScript:]):
(-[WebInspector isJavaScriptProfilingEnabled]):
(-[WebInspector setJavaScriptProfilingEnabled:]):

Source/WebKit2:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::setJavaScriptProfilingEnabled):
(WebKit::WebInspector::startJavaScriptProfiling):
(WebKit::WebInspector::stopJavaScriptProfiling):

LayoutTests:
* fast/profiler/profile-with-no-title-expected.txt:

* inspector-protocol/profiler/console-profile-expected.txt: Removed.
* inspector-protocol/profiler/console-profile.html: Removed.
* inspector-protocol/profiler/console-profileEnd-parameterless-expected.txt: Removed.
* inspector-protocol/profiler/console-profileEnd-parameterless.html: Removed.
Removed because console.profile does not go through the profiler protocol now.

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

6 years agoCrash in ServicesOverlayController::~ServicesOverlayController.
beidson@apple.com [Thu, 17 Jul 2014 21:04:54 +0000 (21:04 +0000)]
Crash in ServicesOverlayController::~ServicesOverlayController.
<rdar://problem/17622172> and https://bugs.webkit.org/show_bug.cgi?id=135022

Reviewed by Tim Horton.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::~ServicesOverlayController): Don’t need to uninstall the
    PageOverlay as it has already been destroyed by this point in WebPage::~WebPage.

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

6 years agoDisable button animations in regression tests
ap@apple.com [Thu, 17 Jul 2014 19:31:48 +0000 (19:31 +0000)]
Disable button animations in regression tests
https://bugs.webkit.org/show_bug.cgi?id=133647
<rdar://problem/16677530>

Reviewed by Dean Jackson.

* DumpRenderTree/mac/DumpRenderTree.mm: (setDefaultsToConsistentValuesForTesting):
We already did this for WebKit2, let's do it for WebKit1 too.

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

6 years agoAdd test for r169820.
roger_fong@apple.com [Thu, 17 Jul 2014 19:20:31 +0000 (19:20 +0000)]
Add test for r169820.
        https://bugs.webkit.org/show_bug.cgi?id=135002.

        Reviewed by Dean Jackson.

        * platform/mac-wk2/plugins/snapshotting/autoplay-dominant-blank-plugin-moved-into-view-expected.txt: Added.
        * plugins/snapshotting/autoplay-dominant-blank-plugin-moved-into-view.html: Added.

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

6 years agoSometimes purgeable (or empty!) tiles are shown on screen when resuming the app
timothy_horton@apple.com [Thu, 17 Jul 2014 19:19:37 +0000 (19:19 +0000)]
Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
https://bugs.webkit.org/show_bug.cgi?id=135018
<rdar://problem/17615038>

Reviewed by Simon Fraser.

* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::hideContentUntilNextUpdate):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate):
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::detachRootLayer):
Add a mechanism to "hide" drawing area content until the next commit,
by detaching the root layer. RemoteLayerTreeHost will automatically reattach
it at the next commit.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
* UIProcess/WebPageProxy.h:
Add a parameter to viewStateDidChange specifying whether dispatching the change
to the Web process is deferrable or not. We will also automatically use "Immediate" if
the view is coming in-window, like we did before.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationWillEnterForeground:]):
Make use of the aforementioned new mechanisms to ensure that we immediately dispatch
view state changes when coming into the foreground, and will have removed the root layer
if a commit didn't come in while waitForDidUpdateViewState blocks.

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

6 years agoDFG Flush(SetLocal) store elimination is overzealous for captured variables in the...
fpizlo@apple.com [Thu, 17 Jul 2014 18:17:43 +0000 (18:17 +0000)]
DFG Flush(SetLocal) store elimination is overzealous for captured variables in the presence of nodes that have no effects but may throw
https://bugs.webkit.org/show_bug.cgi?id=134988
<rdar://problem/17706349>

Reviewed by Oliver Hunt.

Luckily, we also don't need this optimization to be super powerful: the only place
where it really matters is for getting rid of the redundancy between op_enter and
op_init_lazy_reg, and in that case, there is a small set of possible nodes between the
two things. This change updates the store eliminator to know about only that small,
obviously safe, set of nodes over which we can store-eliminate.

This shouldn't have any performance impact in the DFG because this optimization kicks
in relatively rarely already. And once we tier up into the FTL, we get a much better
store elimination over LLVM IR, so this really shouldn't matter at all.

The tricky part of this patch is that there is a close relative of this optimization,
for uncaptured variables that got flushed. This happens for arguments to inlined calls.
I make this work by splitting it into two different store eliminators.

Note that in the process of crafting the tests, I realized that we were incorrectly
DCEing NewArrayWithSize. That's not cool, since that can throw an exception for
negative array sizes. If we ever did want to DCE this node, we'd need to lower the node
to a check node followed by the actual allocation.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::uncapturedSetLocalStoreElimination):
(JSC::DFG::CSEPhase::capturedSetLocalStoreElimination):
(JSC::DFG::CSEPhase::setLocalStoreElimination):
(JSC::DFG::CSEPhase::performNodeCSE):
(JSC::DFG::CSEPhase::SetLocalStoreEliminationResult::SetLocalStoreEliminationResult): Deleted.
* dfg/DFGNodeType.h:
* tests/stress/capture-escape-and-throw.js: Added.
(foo.f):
(foo):
* tests/stress/new-array-with-size-throw-exception-and-tear-off-arguments.js: Added.
(foo):
(bar):

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

6 years agoDon't send geolocation permission requests when the page is not visible
weinig@apple.com [Thu, 17 Jul 2014 17:35:35 +0000 (17:35 +0000)]
Don't send geolocation permission requests when the page is not visible
<rdar://problem/17208715>
https://bugs.webkit.org/show_bug.cgi?id=134989

Reviewed by Darin Adler.

Instead of eagerly requesting geolocation permission for pages that aren't visible,
store a set of pending requests, and send them only once the page has become visible.

* Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::GeolocationController):
(WebCore::GeolocationController::~GeolocationController):
(WebCore::GeolocationController::requestPermission):
(WebCore::GeolocationController::cancelPermissionRequest):
(WebCore::GeolocationController::viewStateDidChange):
(WebCore::provideGeolocationTo):
* Modules/geolocation/GeolocationController.h:
Store pending requests to be fired once the page is visible.

* WebCore.xcodeproj/project.pbxproj:
Add ViewStateChangeObserver.h

* page/Page.cpp:
(WebCore::Page::addViewStateChangeObserver):
(WebCore::Page::removeViewStateChangeObserver):
(WebCore::Page::setViewState):
* page/Page.h:
Add a set of registered view state observers, and notify them when the
view state changes.

* page/ViewStateChangeObserver.h: Added.
(WebCore::ViewStateChangeObserver::~ViewStateChangeObserver):
Add an observer that can register with the page for view state changes.

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

6 years agoplugins/quicktime-plugin-replacement.html is flaky
ap@apple.com [Thu, 17 Jul 2014 17:33:37 +0000 (17:33 +0000)]
plugins/quicktime-plugin-replacement.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=135015

* platform/mac/TestExpectations: Marked as such.

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

6 years agoSome inspector-protocol test expectations gardening.
ap@apple.com [Thu, 17 Jul 2014 17:26:21 +0000 (17:26 +0000)]
Some inspector-protocol test expectations gardening.

Moved cross-platform expectations for inspector-protocol/debugger/setBreakpoint-dfg*
tests to a cross-platform file, and added a Mac expectation for
inspector-protocol/profiler/console-profile.html.

* TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

6 years agoFlaky Test: media/video-ended-event-negative-playback.html
ap@apple.com [Thu, 17 Jul 2014 17:07:27 +0000 (17:07 +0000)]
Flaky Test: media/video-ended-event-negative-playback.html
https://bugs.webkit.org/show_bug.cgi?id=134490

* platform/mac/TestExpectations: Marking as such.

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

6 years agoEnable legacy fullscreen API in media controls
jer.noble@apple.com [Thu, 17 Jul 2014 16:27:32 +0000 (16:27 +0000)]
Enable legacy fullscreen API in media controls
https://bugs.webkit.org/show_bug.cgi?id=134985

Reviewed by Eric Carlson.

Source/WebCore:
Allow clients who have not enabled HTML5 Fullscreen APIs to still use fullscreen mode
with <video> elements by using the legacy, video-element-specific fullscreen APIs in
the <video> media controls.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.handleReadyStateChange):
(Controller.prototype.isFullScreen):
(Controller.prototype.handlePlayButtonClicked):
(Controller.prototype.updateFullscreenButton):
(Controller.prototype.handleFullscreenButtonClicked):

LayoutTests:
Rebaseline expected results.

* platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt:
* platform/mac/fast/layers/video-layer-expected.txt:
* platform/mac/media/media-controls-clone-expected.txt:
* platform/mac/webarchive/loading/video-in-webarchive-expected.txt:

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

6 years ago[CSS Grid Layout] Add element.style coverage for grid-auto-flow
rego@igalia.com [Thu, 17 Jul 2014 15:58:13 +0000 (15:58 +0000)]
[CSS Grid Layout] Add element.style coverage for grid-auto-flow
https://bugs.webkit.org/show_bug.cgi?id=134966

Reviewed by Sergio Villar Senin.

As follow-up patch after r170996 we're adding new test cases for
grid-auto-flow to check the correct behavior of element.style.

* fast/css-grid-layout/grid-auto-flow-get-set-expected.txt: Updated
expectations accordingly.
* fast/css-grid-layout/grid-auto-flow-get-set.html: Updated test to add
checks for element.style.
* fast/css-grid-layout/resources/grid-definitions-parsing-utils.js:
(checkGridAutoFlowSetCSSValue): Add new helper method to check
grid-auto-flow property.
(checkGridAutoFlowSetJSValue): Ditto.

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

6 years ago[EFL][WK2] Add a "focus,notfound" signal.
commit-queue@webkit.org [Thu, 17 Jul 2014 10:55:57 +0000 (10:55 +0000)]
[EFL][WK2] Add a "focus,notfound" signal.
https://bugs.webkit.org/show_bug.cgi?id=134674

Patch by Sanghyup Lee <sh53.lee@samsung.com> on 2014-07-17
Reviewed by Gyuyoung Kim.

Add a "focus,notfound" signal to handover focus control to application
because there are no elements of webview to focus on the given direction.

Application can decide to move the focus to next widget of ewk_view or something else
by using this signal.

* UIProcess/API/efl/EwkViewCallbacks.h:
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added keyDown and keyUp function.
(EWK2UnitTest::EWK2UnitTestBase::waitUntilDirectionChanged):
(EWK2UnitTest::EWK2UnitTestBase::keyDown):
(EWK2UnitTest::EWK2UnitTestBase::keyUp):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(EWK2ViewTest::FocusNotFoundCallback):
(TEST_F):
* UIProcess/efl/PageUIClientEfl.cpp: Removed unnecessary calls to evas_object_focus_set().
(WebKit::PageUIClientEfl::takeFocus):

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

6 years ago[GObject] StrictTypeChecking extended attribute fails for methods with sequence<T>.
commit-queue@webkit.org [Thu, 17 Jul 2014 09:29:49 +0000 (09:29 +0000)]
[GObject] StrictTypeChecking extended attribute fails for methods with sequence<T>.
https://bugs.webkit.org/show_bug.cgi?id=121698

Patch by Vineet Chaudhary <code.vineet@gmail.com> on 2014-07-17
Reviewed by Antonio Gomes.

GodeGenerator was including wrong heeaders as WebKitDOMlong[] for methods with
array parameters and StrictTypeChecking extended attribute.
No new tests. TestObj.idl covers the tests.

* bindings/scripts/CodeGenerator.pm:
(GetArrayOrSequenceType):
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_strict_function_with_array):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
(webkit_dom_test_typedefs_func):
(webkit_dom_test_typedefs_nullable_array_arg):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
* bindings/scripts/test/TestObj.idl:

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

6 years agoCSS JIT: Clean up return path
utatane.tea@gmail.com [Thu, 17 Jul 2014 07:58:05 +0000 (07:58 +0000)]
CSS JIT: Clean up return path
https://bugs.webkit.org/show_bug.cgi?id=135011

Reviewed by Benjamin Poulain.

Clean up the existing CSS JIT return path before adding new early return path
for pseudo elements.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::StackReference::StackReference):
(WebCore::StackAllocator::StackReference::isValid):
(WebCore::StackAllocator::popAndDiscard): Deleted.

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

6 years agoFix Versioning after r171175.
lforschler@apple.com [Thu, 17 Jul 2014 07:55:59 +0000 (07:55 +0000)]
Fix Versioning after r171175.

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

6 years agoVersioning.
lforschler@apple.com [Thu, 17 Jul 2014 07:41:24 +0000 (07:41 +0000)]
Versioning.

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

6 years agoFix Versioning after r171118.
lforschler@apple.com [Thu, 17 Jul 2014 07:14:48 +0000 (07:14 +0000)]
Fix Versioning after r171118.

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

6 years agoWeb Inspector: TextContentView calls the wrong super function in shown()
commit-queue@webkit.org [Thu, 17 Jul 2014 04:07:41 +0000 (04:07 +0000)]
Web Inspector: TextContentView calls the wrong super function in shown()
https://bugs.webkit.org/show_bug.cgi?id=135001

Patch by Saam Barati <sbarati@apple.com> on 2014-07-16
Reviewed by Timothy Hatcher.
TextContentView calls ResourceContentView.shown instead of ContentView.shown.
It should call ContentView.shown because ContentView is its prototype.

* UserInterface/Views/TextContentView.js:
(WebInspector.TextContentView.prototype.shown):

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

6 years agoReintroduce the SPI _websiteDataURLForContainerWithURL: that was removed in r171160
beidson@apple.com [Thu, 17 Jul 2014 03:31:38 +0000 (03:31 +0000)]
Reintroduce the SPI _websiteDataURLForContainerWithURL: that was removed in r171160
https://bugs.webkit.org/show_bug.cgi?id=134984

Reviewed by David Kilzer.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(+[WKProcessPool _websiteDataURLForContainerWithURL:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

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

6 years agoVersioning.
lforschler@apple.com [Thu, 17 Jul 2014 03:04:11 +0000 (03:04 +0000)]
Versioning.

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

6 years ago[GTK] Unreviewed GTK gardening.
clopez@igalia.com [Thu, 17 Jul 2014 02:52:46 +0000 (02:52 +0000)]
[GTK] Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Report and mark new failures. Update some expectations.
* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_xserver_redirect-expected.txt: Rebaseline after r171033.
* platform/gtk/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt: Added. Rebaseline after r171046.

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

6 years agoUnreviewed gardening. Skip some text track tests that fail only on release wk1 builds.
roger_fong@apple.com [Thu, 17 Jul 2014 02:50:57 +0000 (02:50 +0000)]
Unreviewed gardening. Skip some text track tests that fail only on release wk1 builds.

* platform/mac-wk1/TestExpectations:

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

6 years agoA test that hangs at cleanup stage confuses webkitpy hugely
ap@apple.com [Thu, 17 Jul 2014 02:26:41 +0000 (02:26 +0000)]
A test that hangs at cleanup stage confuses webkitpy hugely
https://bugs.webkit.org/show_bug.cgi?id=122475
<rdar://problem/17184354>

Reviewed by Anders Carlsson.

Source/WebKit2:
Reset m_pageLoadState when the process exits cleanly - otherwise messages from a
new process for the same WebPageProxy would hit assertions.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::resetStateAfterProcessExited):

Tools:
Terminate WebContent process if it freezes between tests. Ideally, we should report
this somehow, but this is better than blaming the wrong test.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::terminateWebContentProcess):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::invoke):

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

6 years agoUnreviewed. Skip in-band text track test on Mountain Lion.
roger_fong@apple.com [Thu, 17 Jul 2014 01:59:50 +0000 (01:59 +0000)]
Unreviewed. Skip in-band text track test on Mountain Lion.

* platform/mac/TestExpectations:
In-band text tracks not supported on ML.

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

6 years agoSubpixel rendering: Adjust cliprect with devicePixelFractionFromRenderer() before...
zalan@apple.com [Thu, 17 Jul 2014 01:47:10 +0000 (01:47 +0000)]
Subpixel rendering: Adjust cliprect with devicePixelFractionFromRenderer() before painting.
https://bugs.webkit.org/show_bug.cgi?id=134950
<rdar://problem/17617994>

Reviewed by Simon Fraser.

The cliprect coming from the graphics layer needs to be adjusted with the subpixel gap
from renderer. This is symmetric with the offsetting we do, when the dirty rect is sent off to the GraphicsLayer.
It puts us back to the correct coordinating system for intersecting with renderers.

Source/WebCore:
Test: compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::beginTransparencyLayers):
(WebCore::RenderLayer::clipToRect):

LayoutTests:
* compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position-expected.html: Added.
* compositing/hidpi-compositing-layer-with-tile-layers-on-subpixel-position.html: Added.

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

6 years ago[iOS] Update order file paths for WebKit and WebKit2
ddkilzer@apple.com [Thu, 17 Jul 2014 01:38:06 +0000 (01:38 +0000)]
[iOS] Update order file paths for WebKit and WebKit2
<http://webkit.org/b/134993>
<rdar://problem/17557776>

Reviewed by Darin Adler.

Source/WebKit/mac:
* Configurations/Base.xcconfig: Rename WebKit.order to
WebKitLegacy.order.

Source/WebKit2:
* Configurations/Base.xcconfig: Add order file for iOS
named WebKit.order.

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

6 years agoFix a typo noticed by Darin.
simon.fraser@apple.com [Thu, 17 Jul 2014 01:10:22 +0000 (01:10 +0000)]
Fix a typo noticed by Darin.

* rendering/RenderBox.cpp:
(WebCore::shouldApplyContainersClipAndOffset):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::shouldAppyContainersClipAndOffset): Deleted.

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

6 years agoImprove showTree() logging
simon.fraser@apple.com [Thu, 17 Jul 2014 01:04:22 +0000 (01:04 +0000)]
Improve showTree() logging
https://bugs.webkit.org/show_bug.cgi?id=134997

Reviewed by Tim Horton.

Have the debug showTree(), which dumps the Node/Element tree, show which nodes need
style recalc, and print element renderers.

* dom/Node.cpp:
(WebCore::Node::showNode):

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

6 years ago[iOS] Expose the points on WebEventRegion
simon.fraser@apple.com [Thu, 17 Jul 2014 01:04:20 +0000 (01:04 +0000)]
[iOS] Expose the points on WebEventRegion
https://bugs.webkit.org/show_bug.cgi?id=134978

Reviewed by Tim Horton.

Expose WebEventRegion's points so that UIKit can get at them.

* page/ios/WebEventRegion.h:
* page/ios/WebEventRegion.mm:
(-[WebEventRegion p1]):
(-[WebEventRegion p2]):
(-[WebEventRegion p3]):
(-[WebEventRegion p4]):

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

6 years agoAdd WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websi...
beidson@apple.com [Thu, 17 Jul 2014 00:20:21 +0000 (00:20 +0000)]
Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI

Source/WebCore:
https://bugs.webkit.org/show_bug.cgi?id=134984

Reviewed by Dan Bernstein.

* WebCore.exp.in:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::maybeCreateFromDatabaseIdentifier): Add a form of createFromDatabaseIdentifier
    that can fail and return a nullptr.
(WebCore::SecurityOrigin::createFromDatabaseIdentifier): Use maybeCreateFromDatabaseIdentifier before creating
    the empty origin.
* page/SecurityOrigin.h:

Source/WebKit/mac:
<rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984

Reviewed by Dan Bernstein.

* WebCoreSupport/WebSecurityOrigin.mm:
(+[WebSecurityOrigin webSecurityOriginFromDatabaseIdentifier:]): Added.
(-[WebSecurityOrigin initWithURL:]): Update using RefPtr API to avoid a ref().
* WebCoreSupport/WebSecurityOriginPrivate.h:

Source/WebKit2:
<rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984

Reviewed by Dan Bernstein.

Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
(+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

Add a big shiny comment in a few key places:
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::initializeDatabaseProcess):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
(WebKit::WebContext::ensureDatabaseProcess):

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

6 years agoREGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
enrica@apple.com [Thu, 17 Jul 2014 00:00:34 +0000 (00:00 +0000)]
REGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
https://bugs.webkit.org/show_bug.cgi?id=134992
<rdar://problem/17528020>

Reviewed by Benjamin Poulain.

This patch exposes the scroller and the visible content rect so that
UIKit can implement autoscroll when dragging the selections.
It also changes that way we do hit testing to allow hit test outside
the clipping region and fixes the way we compute the selection rectangle
for the block selection, ensuring that we consider also non text elements
like images.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView scroller]):
(-[WKContentView visibleRect]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::selectionBoxForRange):
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::rangeForBlockAtPoint):
(WebKit::WebPage::expandedRangeFromHandle):
(WebKit::WebPage::contractedRangeFromHandle):
(WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
(WebKit::WebPage::changeBlockSelection):

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

6 years agoCaptions container should not clip content.
roger_fong@apple.com [Wed, 16 Jul 2014 23:34:23 +0000 (23:34 +0000)]
Captions container should not clip content.
https://bugs.webkit.org/show_bug.cgi?id=134840.
<rdar://problem/14553608>.

Reviewed by Simon Fraser.

Tests: media/track/track-in-band-subtitles-too-large.html
       media/track/track-long-word-container-sizing.html

* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-text-track-container):
Set word break property of WebCTT cues to normal to make it consistent with in-band cues.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
Set -webkit-min-content on min-width/min-height property of the text track display.
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):
Do the same for WebVTT cues.

* media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt: Rebaseline.
* media/track/captions-webvtt/long-word-small-track-display.vtt: Added.
* media/track/track-in-band-subtitles-too-large-expected.txt: Added.
* media/track/track-in-band-subtitles-too-large.html: Added.
* media/track/track-long-word-container-sizing-expected.txt: Added.
* media/track/track-long-word-container-sizing.html: Added.

We no longer break in the middle of a word, this test is no longer useful.
* media/track/captions-webvtt/long-word.vtt: Removed.
* media/track/track-word-breaking-expected.txt: Removed.
* media/track/track-word-breaking.html: Removed.

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

6 years ago[Mac] replace AVPlayerItem on the main thread
eric.carlson@apple.com [Wed, 16 Jul 2014 23:11:49 +0000 (23:11 +0000)]
[Mac] replace AVPlayerItem on the main thread
https://bugs.webkit.org/show_bug.cgi?id=134983

Reviewed by Jer Noble.

No new tests, this fixes a problem with a thread configuration not present in the
test environment.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem): New, when called off of
    the main thread, dispatch to the main thread before setting AVPlayerItem.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setAVPlayerItem.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Ditto.

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

6 years ago<rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
ap@apple.com [Wed, 16 Jul 2014 23:08:26 +0000 (23:08 +0000)]
<rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
CFNetwork cache path in WebContent process

Rubber-stamped by Sam Weinig.

Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
false at this point in initialization sequence. But we did the right thing, as we
always need to set the cache path, even when network process is used for most loading.

* WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):

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

6 years agoDispatch top content inset changes immediately if synchronously waiting for view...
timothy_horton@apple.com [Wed, 16 Jul 2014 22:36:24 +0000 (22:36 +0000)]
Dispatch top content inset changes immediately if synchronously waiting for view state changes
​https://bugs.webkit.org/show_bug.cgi?id=134942
<rdar://problem/17666800>

Reviewed by Simon Fraser.

* UIProcess/API/mac/WKView.mm:
(-[WKView _dispatchSetTopContentInset]):
(-[WKView _setTopContentInset:]):
Move the check from _setTopContentInset: to _dispatchSetTopContentInset
that ensures that we only send the message if the top content inset changed.

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

6 years ago[iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit
benjamin@webkit.org [Wed, 16 Jul 2014 22:26:56 +0000 (22:26 +0000)]
[iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit
https://bugs.webkit.org/show_bug.cgi?id=134965
Related to <rdar://problem/17082607>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-07-16
Reviewed by Tim Horton.

Dynamic viewport update relies on the _resizeAnimationTransformAdjustments being applied
to the page at the new size during the transition.

Because of the races between the LayerTree Commit and DynamicViewportSizeUpdate, the transform
can be applied to the wrong set of tiles.
This is mostly a problem for unresponsive WebProcess or when the synchronization is done
immediately.

There is at least one more case that is not handled: if synchronizeDynamicViewportUpdate()
completely fails to get the new page, the UIProcess is in a somewhat messy state.
I will look into that separately than the layer tree synchronization.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
(WebKit::WebPageProxy::didCommitLayerTree):
(WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::synchronizeDynamicViewportUpdate):
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
(WebKit::RemoteLayerTreeDrawingArea::nextTransactionID):
(WebKit::RemoteLayerTreeDrawingArea::currentTransactionID): Deleted.

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

6 years ago[MSE] http/tests/media/media-source/mediasource-buffered.html is flakey
jer.noble@apple.com [Wed, 16 Jul 2014 20:51:19 +0000 (20:51 +0000)]
[MSE] http/tests/media/media-source/mediasource-buffered.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=134949

Reviewed by Eric Carlson.

Depending on which SourceBuffer is successfully parsed first, the order of activeSourceBuffers
may change from run to run, breaking the http/tests/media/media-source/mediasource-buffered.html
test. Make the order of activeSourceBuffers the same as (a subset of) sourceBuffers, by replacing
calls to activeSourceBuffers->add() and with a new call to regenerateActiveSourceBuffers(), which
swaps the contents of the SourceBufferList with a new, ordered Vector.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::sourceBufferDidChangeAcitveState):
(WebCore::MediaSource::regenerateActiveSourceBuffers):
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SourceBufferList.cpp:
(WebCore::SourceBufferList::swap):
* Modules/mediasource/SourceBufferList.h:

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

6 years agoCSP: Drop 'script-nonce' directive.
mkwst@chromium.org [Wed, 16 Jul 2014 20:31:06 +0000 (20:31 +0000)]
CSP: Drop 'script-nonce' directive.
https://bugs.webkit.org/show_bug.cgi?id=134926

Reviewed by Darin Adler.

Source/WebCore:
This patch drops the outdated 'script-nonce' Content Security
Policy directive. It was removed from the spec, and replaced in
CSP2 with a new 'script-src' syntax. We should implement that
instead.

Until then, removing the outdated syntax will ensure that no one
ends up relying on it in WebKit's implementation.

This should have limited web-visible impact, as the feature is
behind the CSP_NEXT flag, which is not enabled by default.

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript):
(WebCore::ScriptElement::executeScript):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::allowJavaScriptURLs):
(WebCore::CSPDirectiveList::allowInlineEventHandlers):
(WebCore::CSPDirectiveList::addDirective):
(WebCore::NonceDirective::NonceDirective): Deleted.
(WebCore::NonceDirective::allows): Deleted.
(WebCore::NonceDirective::parse): Deleted.
(WebCore::CSPDirectiveList::checkNonce): Deleted.
(WebCore::CSPDirectiveList::checkNonceAndReportViolation): Deleted.
(WebCore::CSPDirectiveList::allowScriptNonce): Deleted.
(WebCore::isAllowedByAllWithNonce): Deleted.
(WebCore::ContentSecurityPolicy::allowScriptNonce): Deleted.
(WebCore::ContentSecurityPolicy::reportInvalidNonce): Deleted.
* page/ContentSecurityPolicy.h:

LayoutTests:
Dropping the nonce tests, as we're removing the functionality.

* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed.html: Removed.

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

6 years agoREGRESSION(r171069) 75% repro crash in WebCore::AudioHardwareListenerMac::processIsRu...
jer.noble@apple.com [Wed, 16 Jul 2014 19:10:22 +0000 (19:10 +0000)]
REGRESSION(r171069) 75% repro crash in WebCore::AudioHardwareListenerMac::processIsRunningChanged()
https://bugs.webkit.org/show_bug.cgi?id=134986

Reviewed by Eric Carlson.

Add a WeakPtrFactory to AudioHardwareListenerMac, so that if CoreAudio calls our block after
being unregistered, we can bail early instead of calling into a deleted object.

* platform/audio/mac/AudioHardwareListenerMac.cpp:
(WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac):
* platform/audio/mac/AudioHardwareListenerMac.h:

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

6 years ago[MSE] REGRESSION(r171033): ASSERT in WebCore::MediaSource::onReadyStateChange()
jer.noble@apple.com [Wed, 16 Jul 2014 18:05:09 +0000 (18:05 +0000)]
[MSE] REGRESSION(r171033): ASSERT in WebCore::MediaSource::onReadyStateChange()
https://bugs.webkit.org/show_bug.cgi?id=134941

Reviewed by Eric Carlson.

Source/WebCore:
Only do our modified-order change of the readyState if the error parameter is empty,
as that's the only case where a duration change will cause an inadvertant readyState
change.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::streamEndedWithError):

LayoutTests:
Update media/media-source/media-source-end-of-stream.html to use an empty parameter, rather
than an empty string parameter, to endOfStream().

* media/media-source/media-source-end-of-stream-expected.txt:
* media/media-source/media-source-end-of-stream.html:

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

6 years agoRemove svn:executable property erroneously added in <http://trac.webkit.org/changeset...
ap@apple.com [Wed, 16 Jul 2014 16:42:00 +0000 (16:42 +0000)]
Remove svn:executable property erroneously added in <trac.webkit.org/changeset/171144> somehow.

* ChangeLog: Removed property svn:executable.
* svg/SVGSVGElement.h: Removed property svn:executable.
* svg/animation/SVGSMILElement.h: Removed property svn:executable.

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

6 years agoREGRESSION (r170653): Web Content service’s Info.plist has wrong format
mitz@apple.com [Wed, 16 Jul 2014 16:33:04 +0000 (16:33 +0000)]
REGRESSION (r170653): Web Content service’s Info.plist has wrong format
https://bugs.webkit.org/show_bug.cgi?id=134973

Reviewed by Alexey Proskuryakov.

* WebKit2.xcodeproj/project.pbxproj: Updated the Add CFBundle Localization Info.plist Key
script build phases to convert Info.plist back to binary format if the
PLIST_FILE_OUTPUT_FORMAT build setting requires it.

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

6 years agoSubstitute CGRectZero for NSZeroRect in -[DOMNode hrefFrame].
dbates@webkit.org [Wed, 16 Jul 2014 15:38:55 +0000 (15:38 +0000)]
Substitute CGRectZero for NSZeroRect in -[DOMNode hrefFrame].

Rubber-stamped by Zalan Bujtas.

The method -[DOMNode hrefFrame] returns a CGRect. So, when we don't have a renderer
we should return CGRectZero instead of a NSZeroRect.

* bindings/objc/DOM.mm:
(-[DOMNode hrefFrame]): Also, fix up some code style issues.

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

6 years agomutable pointers from const methods, timeContainer().
commit-queue@webkit.org [Wed, 16 Jul 2014 15:03:37 +0000 (15:03 +0000)]
mutable pointers from const methods, timeContainer().
https://bugs.webkit.org/show_bug.cgi?id=134757

Patch by Jeongeun Kim <je_julie.kim@samsung.com> on 2014-07-16
Reviewed by Alexey Proskuryakov.

Avoid return mutable pointers from const methods.
No new tests, no behavior change.

* svg/SVGSVGElement.h:
* svg/animation/SVGSMILElement.h:
(WebCore::SVGSMILElement::timeContainer):

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

6 years ago[EFL] Unreviewed EFL gardening.
jinwoo7.song@samsung.com [Wed, 16 Jul 2014 12:24:25 +0000 (12:24 +0000)]
[EFL] Unreviewed EFL gardening.

Rebaseline tests after r168575, r170138 and r170418.

* platform/efl/fast/dynamic/text-combine-expected.png: Rebaseline after r170418.
* platform/efl/fast/dynamic/text-combine-expected.txt: Rebaseline after r170418.
* platform/efl/fast/forms/control-restrict-line-height-expected.png: Rebaseline after r168575.
* platform/efl/fast/forms/control-restrict-line-height-expected.txt: Rebaseline after r168575.
* platform/efl/fast/forms/placeholder-position-expected.png: Rebaseline after r168575.
* platform/efl/fast/forms/placeholder-position-expected.txt: Rebaseline after r168575.
* platform/efl/fast/repaint/japanese-rl-selection-clear-expected.png: Rebaseline after r170418.
* platform/efl/fast/repaint/japanese-rl-selection-clear-expected.txt: Added. Rebaseline after r170418.
* platform/efl/fast/repaint/japanese-rl-selection-repaint-expected.png: Rebaseline after r170418.
* platform/efl/fast/repaint/japanese-rl-selection-repaint-expected.txt: Added. Rebaseline after r170418.
* platform/efl/fast/text/international/wrap-CJK-001-expected.txt: Added. Rebaseline after r170418.
* platform/efl/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Rebaseline after r170418.
* platform/efl/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt: Rebaseline after r170418.

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

6 years agoChange style check path with EFL WK2's path in checker_unittest.py
gyuyoung.kim@samsung.com [Wed, 16 Jul 2014 11:20:52 +0000 (11:20 +0000)]
Change style check path with EFL WK2's path in checker_unittest.py
https://bugs.webkit.org/show_bug.cgi?id=134967

Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/style/checker_unittest.py: Change ewk_view.h path.
(GlobalVariablesTest.test_path_rules_specifier):

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

6 years agoUnreviewed. Added myself to the list of committers.
clopez@igalia.com [Wed, 16 Jul 2014 10:26:40 +0000 (10:26 +0000)]
Unreviewed. Added myself to the list of committers.

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

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

6 years ago[EFL] Unreviewed EFL gardening after r170138.
jinwoo7.song@samsung.com [Wed, 16 Jul 2014 09:48:57 +0000 (09:48 +0000)]
[EFL] Unreviewed EFL gardening after r170138.

* platform/efl/accessibility/image-map2-expected.txt: Updated.
* platform/efl/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt: Updated.

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

6 years ago[CMAKE] ENABLE_ENCRYPTED_MEDIA_V2 should depend on ENABLE_VIDEO
ryuan.choi@samsung.com [Wed, 16 Jul 2014 06:04:05 +0000 (06:04 +0000)]
[CMAKE] ENABLE_ENCRYPTED_MEDIA_V2 should depend on ENABLE_VIDEO
https://bugs.webkit.org/show_bug.cgi?id=134963

Reviewed by Gyuyoung Kim.

ENCRYPTED_MEDIA_V2 requires VIDEO enabled.

* Source/cmake/WebKitFeatures.cmake: Added the dependency for ENABLE_ENCRYPTED_MEDIA_V2.

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

6 years agoCSS: Generalize CSS First Letter treatment
utatane.tea@gmail.com [Wed, 16 Jul 2014 04:44:38 +0000 (04:44 +0000)]
CSS: Generalize CSS First Letter treatment
https://bugs.webkit.org/show_bug.cgi?id=134936

Reviewed by Benjamin Poulain.

first-letter pseudo element rule is handled differently from the other rules
such as first-line. This patch removes this special handling in SelectorChecker
and handles it in RulesFeatureSet.

* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::collectFeaturesFromSelector):
(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
* css/RuleFeature.h:
(WebCore::RuleFeatureSet::RuleFeatureSet):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
* css/StyleResolver.h:
(WebCore::StyleResolver::usesFirstLetterRules):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::setUsesFirstLetterRules): Deleted.

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

6 years ago[EFL] Remove EFL WK1 directory from the checker.py
ryuan.choi@samsung.com [Wed, 16 Jul 2014 04:33:44 +0000 (04:33 +0000)]
[EFL] Remove EFL WK1 directory from the checker.py
https://bugs.webkit.org/show_bug.cgi?id=134954

Reviewed by Gyuyoung Kim.

* Scripts/webkitpy/style/checker.py:

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

6 years agoAdding myself to contributors.json breaks a webkitpy test
clopez@igalia.com [Wed, 16 Jul 2014 04:31:23 +0000 (04:31 +0000)]
Adding myself to contributors.json breaks a webkitpy test
https://bugs.webkit.org/show_bug.cgi?id=134958

Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/tool/bot/irc_command_unittest.py:
(IRCCommandTest.test_whois): Be more specific and include also the
first name when asking for the whois of Xan in the unit test.

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

6 years agoFix r171124
benjamin@webkit.org [Wed, 16 Jul 2014 03:56:41 +0000 (03:56 +0000)]
Fix r171124

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-07-15

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToContentOffset:]):
On landing, I changed the min/max branches to shrunkTo/expandedTo, but the return value
of those was ignored.

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

6 years agoWeb Inspector: Modernize UI styles and better sync with platform styles
jonowells@apple.com [Wed, 16 Jul 2014 03:07:03 +0000 (03:07 +0000)]
Web Inspector: Modernize UI styles and better sync with platform styles
https://bugs.webkit.org/show_bug.cgi?id=134846

Reviewed by Timothy Hatcher.

Updated styles to better match the OS UI design. Updated the forward/back button.
Moved several rules to selectors that support older OS designs. Added global platform
data to support this patch.

* UserInterface/Images/BackArrow.svg: Added.
* UserInterface/Images/BackArrowLegacy.svg: Copied from Source/WebInspectorUI/UserInterface/Images/BackArrow.svg.
* UserInterface/Images/ForwardArrow.svg: Added.
* UserInterface/Images/ForwardArrowLegacy.svg: Copied from Source/WebInspectorUI/UserInterface/Images/ForwardArrow.svg.

* UserInterface/Base/ImageUtilities.js: Updated image version
(.generateImage.generateModernImage):
(.generateImage.generateLegacyImage):
(.generateImage):
Updated image generation to support modern look. Updated versioning scheme and version.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.contentLoaded.WebInspector.Platform.version.toString):
(WebInspector.contentLoaded.WebInspector.Platform.toString):
(WebInspector.contentLoaded):
Added global platform information.

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser):
Updated back and forward buttons.

* UserInterface/Views/FindBanner.js:
(WebInspector.FindBanner.prototype._generateButtonsGlyphsIfNeeded):
Updated images for the find banner.

* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
Added new images.

* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button > .label):
(body.mac-platform.legacy .toolbar .item.button > .label):
* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section):
(body.mac-platform.legacy .style-declaration-section):
(body.mac-platform.legacy .style-declaration-section + .style-declaration-section):
(.style-declaration-section.last-in-group):
(body.mac-platform.legacy .style-declaration-section.last-in-group):
(.style-declaration-section.last-in-group + .style-declaration-section):
(body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section):
(body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:last-child):
(.style-declaration-section + .style-declaration-section): Deleted.
(.style-declaration-section.last-in-group + .style-declaration-section:last-child): Deleted.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content > .pseudo-classes):
* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline li.hovered:not(.selected) .selection):
(body.mac-platform.legacy .dom-tree-outline li.hovered:not(.selected) .selection):
(.dom-tree-outline li.elements-drag-over .selection):
(body.mac-platform.legacy .dom-tree-outline li.elements-drag-over .selection):
(.dom-tree-outline:focus li.selected .selection):
(body.mac-platform.legacy .dom-tree-outline:focus li.selected .selection):
* UserInterface/Views/DashboardContainerView.css:
(.toolbar .dashboard-container):
(body.mac-platform.legacy .toolbar .dashboard-container):
(body.window-inactive .toolbar .dashboard-container):
(body.mac-platform.legacy.window-inactive .toolbar .dashboard-container):
(.toolbar .dashboard):
(body.window-inactive .toolbar .dashboard):
(body.mac-platform.legacy.window-inactive .toolbar .dashboard):
* UserInterface/Views/DataGrid.css:
(.data-grid th):
(body.mac-platform.legacy .data-grid th):
(.data-grid tr.selected):
(body.mac-platform.legacy .data-grid tr.selected):
(.data-grid:focus tr.selected):
(body.mac-platform.legacy .data-grid:focus tr.selected):
* UserInterface/Views/DetailsSection.css:
(.details-section):
(body.mac-platform.legacy .details-section):
(.details-section .details-section):
(body.mac-platform.legacy .details-section .details-section):
(.details-section .details-section:last-child):
(.details-section .details-section:first-child):
(.details-section > .header):
(body.mac-platform.legacy .details-section > .header):
(.details-section .details-section > .header):
(body.mac-platform.mountain-lion .details-section .details-section > .header):
(.details-section .details-section.collaspsed > .header):
(.details-section.computed-style-properties:not(.collapsed) > .header):
(body.mac-platform.legacy .details-section.computed-style-properties:not(.collapsed) > .header):
(.details-section > .content > .group):
(body.mac-platform.legacy .details-section > .content > .group):
(.details-section > .content > .group:last-child):
(.details-section > .content > .group:nth-child(even)):
(body.mac-platform.legacy .details-section > .content > .group:nth-child(even)):
(body.mac-platform.legacy .details-section > .content > .group:last-child > .row.simple:last-child > *):
(.details-section > .content > .group:last-child > .row.simple:last-child > *): Deleted.
* UserInterface/Views/FilterBar.css:
(.filter-bar > input[type="search"]):
(body.mac-platform.legacy .filter-bar > input[type="search"]):
* UserInterface/Views/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline .item.selected):
(body.mac-platform.legacy .navigation-sidebar-panel-content-tree-outline .item.selected):
(.navigation-sidebar-panel-content-tree-outline:focus .item.selected):
(body.mac-platform.legacy .navigation-sidebar-panel-content-tree-outline:focus .item.selected):
(body.window-inactive .navigation-sidebar-panel-content-tree-outline .item.selected):
(body.mac-platform.legacy.window-inactive .navigation-sidebar-panel-content-tree-outline .item.selected):
* UserInterface/Views/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only.selected):
(body.mac-platform.legacy .navigation-bar .item.radio.button.text-only.selected):
* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .rules .label + .style-declaration-section):
(body.mac-platform.legacy .sidebar > .panel.details.css-style .rules .label + .style-declaration-section):
(.sidebar > .panel.details.css-style .rules .new-rule):
(body.mac-platform.legacy .sidebar > .panel.details.css-style .rules .new-rule):
(.sidebar > .panel.details.css-style .rules .new-rule + .style-declaration-section):
(body.mac-platform.legacy .sidebar > .panel.details.css-style .rules .new-rule + .style-declaration-section):
* UserInterface/Views/ScopeBar.css:
(.scope-bar > li):
(body.mac-platform.legacy .scope-bar > li):
(.scope-bar > li.selected):
(body.mac-platform.legacy .scope-bar > li.selected):
* UserInterface/Views/SearchBar.css:
(.search-bar > input[type="search"]):
(body.mac-platform.legacy .search-bar > input[type="search"]):
* UserInterface/Views/Sidebar.css:
(.sidebar):
(body.mac-platform.legacy .sidebar):
(body.mac-platform.legacy.window-inactive .sidebar):
(body.mac-platform.legacy .sidebar.right):
(body.window-inactive .sidebar): Deleted.
(.sidebar.right): Deleted.
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .title-bar):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .title-bar):
Style updates for new look and feel.

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

6 years agoFix non-iOS builds.
simon.fraser@apple.com [Wed, 16 Jul 2014 03:06:15 +0000 (03:06 +0000)]
Fix non-iOS builds.

* rendering/RenderBox.cpp:
(WebCore::shouldAppyContainersClipAndOffset):

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

6 years ago[iOS] Fix touches inside accelerated overflow:scroll
simon.fraser@apple.com [Wed, 16 Jul 2014 02:58:21 +0000 (02:58 +0000)]
[iOS] Fix touches inside accelerated overflow:scroll
https://bugs.webkit.org/show_bug.cgi?id=134961
<rdar://problem/16088789>

Reviewed by Benjamin Poulain.

When individual elements inside an overflow:scroll with -webkit-overflow-scrolling: touch
had touch event listeners, we would fail to take the scroll offset into account when
building the touch event region, causing touches on those elements to fail after scrolling.

Touch event region building uses RenderObject::absoluteClippedOverflowRect(), and that
code path tries to fix up repaint rects to work correctly in composited overflow:scroll.
However, that broke the touch region computation.

Fix by only ignoring the scroll offset for calls to computeRectForRepaint() which
have a non-null repaintContainer (which indicates that we're doing a repaint in the
compositing layer), and for which the repaintContainer is the containing block
which is using composited scrolling. This restores correct behavior to the event region
code which always calls this with a null repaintContainer.

* rendering/RenderBox.cpp:
(WebCore::shouldAppyContainersClipAndOffset):
(WebCore::RenderBox::computeRectForRepaint):

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

6 years agoUnreviewed, rolling out r171107.
commit-queue@webkit.org [Wed, 16 Jul 2014 02:26:49 +0000 (02:26 +0000)]
Unreviewed, rolling out r171107.
https://bugs.webkit.org/show_bug.cgi?id=134959

This was not the problem! (Requested by kling on #webkit).

Reverted changeset:

"Revert: Run the FastMalloc scavenger thread on iOS as well."
https://bugs.webkit.org/show_bug.cgi?id=134927
http://trac.webkit.org/changeset/171107

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

6 years agoMake css jit benchmark work on IE11.
achristensen@apple.com [Wed, 16 Jul 2014 01:40:54 +0000 (01:40 +0000)]
Make css jit benchmark work on IE11.
https://bugs.webkit.org/show_bug.cgi?id=134956

Reviewed by Benjamin Poulain.

* blog-files/css-jit-introduction/html5-single-page-microbenchmark.html:
Remove an iframe which caused IE11 to try to open content as a URL.

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

6 years agoWKWebView’s FormClient::willSubmitForm should use CompletionHandlerCallChecker
mitz@apple.com [Wed, 16 Jul 2014 01:29:18 +0000 (01:29 +0000)]
WKWebView’s FormClient::willSubmitForm should use CompletionHandlerCallChecker
https://bugs.webkit.org/show_bug.cgi?id=134951

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setFormDelegate:]):

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

6 years ago[iOS][WK2] Scrolling request from the scrolling tree must be limited to offsets in...
benjamin@webkit.org [Wed, 16 Jul 2014 00:14:33 +0000 (00:14 +0000)]
[iOS][WK2] Scrolling request from the scrolling tree must be limited to offsets in the document
https://bugs.webkit.org/show_bug.cgi?id=134952
<rdar://problem/17647116>

Reviewed by Enrica Casucci.

When we received a scroll request, we were taking that offset directly to set the UIScrollView
scroll position. This is a problem if a page request scrolling to an invalid position, we were
still doing it.

This patch limits the position to be inside the document.

-- Why not limit the scroll offset in the WebProcess when we receive the scroll request? --

Some pages rely on the page scale factor changing instantly, because that is how it worked
on WebKit1.

On WebKit2, the WebProcess cannot know the valid range because the obscured insets are changing
dynamically, and the page scale factor can change in response to WebProcess events (the focus
changing for example). To make the page works, the WebProcess does not restrict the scroll position.

In that architecture, the UIProcess has to sanitize the input, which was not done before this patch.

-- Why not use changeContentOffsetBoundedInValidRange()?

The scroll offset as seen by the page is relative to the unobscured rect. While the position used
for history item is a visual position. All we need in this case is a position in the view.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToContentOffset:]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::resendLastVisibleContentRects):

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

6 years agoReduce the overhead of updating the AssemblerBuffer
benjamin@webkit.org [Tue, 15 Jul 2014 23:59:14 +0000 (23:59 +0000)]
Reduce the overhead of updating the AssemblerBuffer
https://bugs.webkit.org/show_bug.cgi?id=134659

Reviewed by Gavin Barraclough.

In r164548, the linker was changed to allow the LinkBuffer to survive its MacroAssembler.
That feature is useful for JSC to get offsets inside a linked buffer in order to jump directly
there.

On ARM, we use branch compaction and we need to keep the "compaction offset" somewher to be able
to get the real address of a lable. That is done by reusing the memory of AssemblerData.

To share the memory between LinkBuffer and the Assembler, r164548 moved the AssemblerData into
a ref-counted object. Unfortunately, the extra complexity related to the new AssemblerData was enough
to make clang give up a bunch of optimizations.

This patch solve (some of) the problems by making AssemblerBuffer and AssemblerData super low overhead structures.
In particular, the grow() function becomes 8 Thumb instructions, which is easily inlined everywhere it is used.

Instead of sharing ownership between the Assembler and LinkBuffer, LinkBuffer now takes full ownership of
the AssemblerData. I feel this is also safer since LinkBuffer is reusing the AssemblerData is a very
specific way that would make it unusable for the Assembler.

-- Technical details --

From LinkBuffer, we don't want to ever access the Assembler after releasing its buffer (or writting anything
into it really). This was obviously already the case, but that was hard to prove from LinkBuffer::copyCompactAndLinkCode().
To make this easier to work with, I changed all the assembler specific function to be static. This way we know
exactly what code access the Assembler instance. The code that does access the instance is then moved
at the beginning, before we modify anything.

The function recordLinkOffsets() that was on the MacroAssembler and copied in Assembler was moved directly
to LinkBuffer. This make the modification of AssemblerData completely explicit, and that code is specific
to LinkBuffer anyway (see LinkBuffer::executableOffsetFor()).

-- Perf impact --

This does not put us exactly at before r164548 due to the missing inline buffer. Still, it is very close.
On ARMv7, this reduces the time spent in Assembler by half. On the CSS JIT, this reduces the compilation
time by ~20%.

I could not measure any difference on x86_64.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::jumpSizeDelta):
(JSC::ARM64Assembler::canCompact):
(JSC::ARM64Assembler::computeJumpType):
(JSC::ARM64Assembler::link):
(JSC::ARM64Assembler::recordLinkOffsets): Deleted.
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::ifThenElseConditionBit):
(JSC::ARMv7Assembler::ifThenElse):
(JSC::ARMv7Assembler::jumpSizeDelta):
(JSC::ARMv7Assembler::canCompact):
(JSC::ARMv7Assembler::computeJumpType):
(JSC::ARMv7Assembler::link):
(JSC::ARMv7Assembler::linkJumpT1):
(JSC::ARMv7Assembler::linkJumpT3):
(JSC::ARMv7Assembler::linkConditionalJumpT4):
(JSC::ARMv7Assembler::linkConditionalBX):
(JSC::ARMv7Assembler::recordLinkOffsets): Deleted.
* assembler/AssemblerBuffer.h:
(JSC::AssemblerData::AssemblerData):
(JSC::AssemblerData::operator=):
(JSC::AssemblerData::~AssemblerData):
(JSC::AssemblerData::buffer):
(JSC::AssemblerData::capacity):
(JSC::AssemblerData::grow):
(JSC::AssemblerBuffer::AssemblerBuffer):
(JSC::AssemblerBuffer::isAvailable):
(JSC::AssemblerBuffer::data):
(JSC::AssemblerBuffer::releaseAssemblerData):
(JSC::AssemblerBuffer::putIntegral):
(JSC::AssemblerBuffer::putIntegralUnchecked):
(JSC::AssemblerBuffer::append):
(JSC::AssemblerBuffer::grow):
(JSC::AssemblerBuffer::~AssemblerBuffer): Deleted.
(JSC::AssemblerBuffer::storage): Deleted.
* assembler/LinkBuffer.cpp:
(JSC::recordLinkOffsets):
(JSC::LinkBuffer::copyCompactAndLinkCode):
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::executableOffsetFor):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::canCompact):
(JSC::MacroAssemblerARM64::computeJumpType):
(JSC::MacroAssemblerARM64::jumpSizeDelta):
(JSC::MacroAssemblerARM64::link):
(JSC::MacroAssemblerARM64::recordLinkOffsets): Deleted.
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::canCompact):
(JSC::MacroAssemblerARMv7::computeJumpType):
(JSC::MacroAssemblerARMv7::jumpSizeDelta):
(JSC::MacroAssemblerARMv7::link):
(JSC::MacroAssemblerARMv7::recordLinkOffsets): Deleted.

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