WebKit-https.git
6 years agoEncode/decode CFURLRequestRefs when USE(CFNETWORK) is enabled
psolanki@apple.com [Wed, 2 Jul 2014 00:57:52 +0000 (00:57 +0000)]
Encode/decode CFURLRequestRefs when USE(CFNETWORK) is enabled
https://bugs.webkit.org/show_bug.cgi?id=134454
<rdar://problem/17510980>

Reviewed by Andreas Kling.

Source/WebKit2:
Use new helper methods to serialize/deserialize CFURLRequestRef directly so we can avoid
creating NSURLRequest.

* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

WebKitLibraries:
* WebKitSystemInterface.h:
* libWebKitSystemInterfaceMavericks.a:
* libWebKitSystemInterfaceMountainLion.a:

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

6 years ago[iOS][WK2] Fix a race between the short tap and long tap highlight
benjamin@webkit.org [Wed, 2 Jul 2014 00:49:13 +0000 (00:49 +0000)]
[iOS][WK2] Fix a race between the short tap and long tap highlight
https://bugs.webkit.org/show_bug.cgi?id=134530

Reviewed by Enrica Casucci.

There was a potential race of event that can theoretically cause WKContentViewInteraction
to call [WKContentView _showTapHighlight] after all interactions have been cancelled.

The race would be like this:
1) On a short tap, _singleTapRecognized: is called, a tap highlight ID is defined and
   _potentialTapInProgress is set to YES.
2) For some reason, the gesture is cancelled. The method _singleTapDidReset is called,
   setting _potentialTapInProgress but leaving the tap highlight ID as valid.
3) The UIProcess receives the tap highlight information from the WebProcess, _didGetTapHighlightForRequest:
   has a valid ID, _potentialTapInProgress is false -> the highlight is shown right away as if a long tap
   was in progress.

The missing piece that causes this is _singleTapDidReset: must also invalidate the tap highlight ID. This is done
in the new static function cancelPotentialTapIfNecessary().

Just invalidating the ID would create another race:
1) Short tap gesture recognizer starts.
2) The long press recognizer starts before (1) is commited.
3) The long press recognizers sets up its own tap highlight ID.
4) The short tap gesture recognizer resets, erasing the tap highlight ID defined in (3).

To avoid this, the long press gesture recognizers immediately cancels any potential tap in progress.
If _singleTapDidReset: is called before (3), this does nothing. If the reset is called after (3),
_singleTapDidReset does nothing.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _highlightLongPressRecognized:]):
(cancelPotentialTapIfNecessary):
(-[WKContentView _singleTapDidReset:]):

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

6 years agoAdd ABI hacks to allow WKPageRef to use WKSessionStateRef
andersca@apple.com [Wed, 2 Jul 2014 00:47:19 +0000 (00:47 +0000)]
Add ABI hacks to allow WKPageRef to use WKSessionStateRef
https://bugs.webkit.org/show_bug.cgi?id=134529

Reviewed by Sam Weinig.

* UIProcess/API/APISessionState.h:
Add a sessionState() getter.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
Add a hack where we return a WKSessionStateRef if the least significant bit of the context pointer
is 1, and a WKDataRef otherwise.

(WKPageRestoreFromSessionState):
Handle both WKDataRef and WKSessionStateref.

* UIProcess/API/C/WKPage.h:
Use WKTypeRefs for state saving and restoration.

* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateCopyData):
Add helper function.

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

6 years ago[WebGL] Fix PVRTC extension.
commit-queue@webkit.org [Wed, 2 Jul 2014 00:43:42 +0000 (00:43 +0000)]
[WebGL] Fix PVRTC extension.
https://bugs.webkit.org/show_bug.cgi?id=134525

Patch by Alex Christensen <achristensen@webkit.org> on 2014-07-01
Reviewed by Dean Jackson.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
Remove the return false which I mistakenly committed in r170128
and make the gl error match the S3TC error and the khronos test.

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

6 years agoWeb Inspector: Hexadecimal color values in all CSS editors are purple when they shoul...
jonowells@apple.com [Wed, 2 Jul 2014 00:13:19 +0000 (00:13 +0000)]
Web Inspector: Hexadecimal color values in all CSS editors are purple when they should be blue
https://bugs.webkit.org/show_bug.cgi?id=133997

Reviewed by Joseph Pecoraro.

CodeMirror 4 removed the style for hex colors from the CSS tokenizer.
Feature has been added to CodeMirrorAdditions.js.

* UserInterface/Views/CodeMirrorAdditions.js: Added hex-color to style for a valid hexadecimal color.
* UserInterface/Views/SyntaxHighlightingDefaultTheme.css: Added selector for hexadecimal color.

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

6 years agoWKPageRestoreFromSessionState should use the new session state restore code path
andersca@apple.com [Wed, 2 Jul 2014 00:08:13 +0000 (00:08 +0000)]
WKPageRestoreFromSessionState should use the new session state restore code path
https://bugs.webkit.org/show_bug.cgi?id=134526

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageRestoreFromSessionState):
Use the new code path.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromState):
Only restore the back-forward state if we have a back-forward list.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistory):
Save the original URL string as well.

(WebKit::decodeV1SessionHistory):
If we don't have a current index, set it to Nullopt instead of 0.

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

6 years agoAX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
cfleizach@apple.com [Tue, 1 Jul 2014 23:57:07 +0000 (23:57 +0000)]
AX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
https://bugs.webkit.org/show_bug.cgi?id=133875

Reviewed by Enrica Casucci.

Source/WebCore:
Support the toggle button type in iOS.

Test: platform/ios-sim/accessibility/toggle-button.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):

LayoutTests:
* platform/ios-sim/accessibility/toggle-button-expected.txt: Added.
* platform/ios-sim/accessibility/toggle-button.html: Added.

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

6 years agoDebugger's breakpoint list should not be a Vector.
mark.lam@apple.com [Tue, 1 Jul 2014 23:40:32 +0000 (23:40 +0000)]
Debugger's breakpoint list should not be a Vector.
<https://webkit.org/b/134514>

Reviewed by Geoffrey Garen.

The debugger currently stores breakpoint data as entries in a Vector (see
BreakpointsInLine).  It also keeps a fast map look up of breakpoint IDs to
the breakpoint data (see m_breakpointIDToBreakpoint).  Because a Vector can
compact or reallocate its backing store, this can causes all sorts of havoc.
The m_breakpointIDToBreakpoint map assumes that the breakpoint data doesn't
move in memory.

The fix is to replace the BreakpointsInLine Vector with a BreakpointsList
doubly linked list.

* debugger/Breakpoint.h:
(JSC::Breakpoint::Breakpoint):
(JSC::BreakpointsList::~BreakpointsList):
* debugger/Debugger.cpp:
(JSC::Debugger::setBreakpoint):
(JSC::Debugger::removeBreakpoint):
(JSC::Debugger::hasBreakpoint):
* debugger/Debugger.h:

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

6 years agoUnreviewed. EFL and GTK build fix since r170654.
gyuyoung.kim@samsung.com [Tue, 1 Jul 2014 23:40:06 +0000 (23:40 +0000)]
Unreviewed. EFL and GTK build fix since r170654.

* UIProcess/LegacySessionStateCodingNone.cpp: Add a dummy encodeLegacySessionState(const SessionState&).
(WebKit::encodeLegacySessionState):

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

6 years ago[iOS] Subsampled JPEG images do not draw correctly via the canvas APIs
dino@apple.com [Tue, 1 Jul 2014 23:26:12 +0000 (23:26 +0000)]
[iOS] Subsampled JPEG images do not draw correctly via the canvas APIs
https://bugs.webkit.org/show_bug.cgi?id=134513
<rdar://problem/12078860>
<rdar://problem/16745393>

Reviewed by Tim Horton.

Source/WebCore:
Subsampled images (e.g. JPEG) were not consistently using
their original dimensions and subsampled dimensions. This caused
things like texImage2D to pack the pixels incorrectly, or drawImage
to squish the rendering.

Renamed m_scale to m_subsamplingScale on FrameData.

Tests: fast/canvas/image-potential-subsample.html
       fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::cacheFrame): Rename to m_subsamplingScale.
(WebCore::BitmapImage::frameAtIndex): Ditto.
* platform/graphics/BitmapImage.h:
(WebCore::FrameData::FrameData): Ditto.
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::FrameData::clear): Ditto.
(WebCore::BitmapImage::BitmapImage): Ditto.
(WebCore::BitmapImage::draw): Use a scaledSrcRect that reflects the subsampled size,
rather than assuming the srcRect accurately reflects how many pixels we have
in the Bitmap.
(WebCore::BitmapImage::copyUnscaledFrameAtIndex):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage): Similar fix, although this
time we just ask the image decoder to take into account the subsampled size
when it is "generating" a frame, causing it to use the bitmap data it has already
decoded.

LayoutTests:
Add Canvas2D and WebGL tests that exercise a very large JPEG image.

The WebGL test is mostly copied from the WebGL test suite, so please
excuse the coding style.

* fast/canvas/image-potential-subsample-expected.txt: Added.
* fast/canvas/image-potential-subsample.html: Added.
* fast/canvas/resources/image-8000x8000.jpg: Added.
* fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-potentially-subsampled-image.js: Added.
(.init):
(.runOneIteration):
(.runTestOnImage):
(.runTest):
(generateTest):
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image-expected.txt: Added.
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html: Added.

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

6 years agoCrash in WebDocumentLoader::setNavigationID
mitz@apple.com [Tue, 1 Jul 2014 23:22:03 +0000 (23:22 +0000)]
Crash in WebDocumentLoader::setNavigationID
https://bugs.webkit.org/show_bug.cgi?id=134520

Reviewed by Anders Carlsson.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision): Null-check the policy document loader.

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

6 years agoBuild fix.
mitz@apple.com [Tue, 1 Jul 2014 23:01:51 +0000 (23:01 +0000)]
Build fix.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didDestroyNavigation):

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

6 years agoUse the new legacy session state coding in WKPageCopySessionState
andersca@apple.com [Tue, 1 Jul 2014 22:34:10 +0000 (22:34 +0000)]
Use the new legacy session state coding in WKPageCopySessionState
https://bugs.webkit.org/show_bug.cgi?id=134516

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
Call encodeLegacySessionState.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistoryEntryData):
Use leakPtr() so we won't attempt to double-free the buffer.

(WebKit::createDictionary):
Fix a typo.

(WebKit::encodeLegacySessionState):
Don't encode the provisional URL if it's empty.

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

6 years agoAX: [iOS WebKit2] Support for Speak selection
cfleizach@apple.com [Tue, 1 Jul 2014 22:25:25 +0000 (22:25 +0000)]
AX: [iOS WebKit2] Support for Speak selection
https://bugs.webkit.org/show_bug.cgi?id=134512

Reviewed by Darin Adler.

Implement a method that Speak Selection can use to retrieve the selected content.

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

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

6 years agoUpdate the highest back-forward list item ID in the other WebBackForwardListItem...
andersca@apple.com [Tue, 1 Jul 2014 22:19:55 +0000 (22:19 +0000)]
Update the highest back-forward list item ID in the other WebBackForwardListItem constructor
https://bugs.webkit.org/show_bug.cgi?id=134515

Reviewed by Tim Horton.

* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):

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

6 years agoFix ServicesOverlayController teardown
beidson@apple.com [Tue, 1 Jul 2014 21:21:09 +0000 (21:21 +0000)]
Fix ServicesOverlayController teardown
<rdar://problem/17523998> and https://bugs.webkit.org/show_bug.cgi?id=134510

Reviewed by Mark Rowe.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::~ServicesOverlayController): Flipped logic on null-checking the overlay.

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

6 years ago[Cocoa][Mac] WKWebView should automatically set topContentInset when beneath a toolbar
weinig@apple.com [Tue, 1 Jul 2014 21:16:14 +0000 (21:16 +0000)]
[Cocoa][Mac] WKWebView should automatically set topContentInset when beneath a toolbar
<rdar://problem/17523159>
https://bugs.webkit.org/show_bug.cgi?id=134496

Reviewed by Beth Dakin.

Source/WebKit2:
- Adds _automaticallyAdjustsContentInsets SPI to both WKView and WKWebView.
- Defaults _automaticallyAdjustsContentInsets to NO for WKView to keep legacy clients working.
- Defaults _automaticallyAdjustsContentInsets to YES for WKWebView.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Add _automaticallyAdjustsContentInsets SPI.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Default _automaticallyAdjustsContentInsets to YES for WKWebView.

(-[WKWebView _setTopContentInset:]):
(-[WKWebView _topContentInset]):
Change to forward to the WKView, since we now do coalescing and caching there.

(-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
(-[WKWebView _automaticallyAdjustsContentInsets]):
Forward to the WKView.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Add _automaticallyAdjustsContentInsets SPI.

* UIProcess/API/mac/WKView.mm:
(-[WKView renewGState]):
Ensure the contentInset is updated when the view changes, as its relative location to the toolbar may have changed.

(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView observeValueForKeyPath:ofObject:change:context:]):
Add observers for the contentLayoutRect and titlebarAppearsTransparent properties on the window. If either of them
change, we need to recalculate the content inset.

(-[WKView _updateContentInsetsIfAutomatic]):
If _automaticallyAdjustsContentInsets is YES, follow the same rules as AppKit in setting the top content inset. Like
AppKit this is only done when:
    - The window's style mask has the NSFullSizeContentViewWindowMask bit.
    - The window does not have titlebarAppearsTransparent set.
    - And we are not in an enclosing NSScrollView.

(-[WKView _setTopContentInset:]):
(-[WKView _topContentInset]):
Coalesce setting the topContentInset to avoid a visual lag when resizing the window that was caused by us sending
multiple topContentInsets to the WebContentProcess per runloop cycle. The reason for the lag was that at the time
we observe the contentLayoutRect changing, our view may not yet be in its final position yet, so the inset will be
temporarily wrong. When the view is finally positioned correctly, we will get a renewGState, at which point we will
again calculate the inset, which now will be correct. Since these both happen in the same runloop iteration, we can
just defer sending the inset to the WebContentProcess.

(-[WKView _setAutomaticallyAdjustsContentInsets:]):
(-[WKView _automaticallyAdjustsContentInsets]):
Add the new SPI.

Tools:
* MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController windowDidLoad]):
Use the NSFullSizeContentViewWindowMask bit on Yosemite and later to enable toolbar blurring.

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

6 years agoOops, didn't mean to commit this.
andersca@apple.com [Tue, 1 Jul 2014 21:13:42 +0000 (21:13 +0000)]
Oops, didn't mean to commit this.

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

6 years agoWeb Inspector: Selected DOM element highlights invisible near bottom of the viewport...
commit-queue@webkit.org [Tue, 1 Jul 2014 21:12:08 +0000 (21:12 +0000)]
Web Inspector: Selected DOM element highlights invisible near bottom of the viewport (topContentInset?)
https://bugs.webkit.org/show_bug.cgi?id=133818

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-07-01
Reviewed by Beth Dakin.

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
Take the topContentInset into account when sizing the InspectorOverlay's FrameView.

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

6 years agoAdd a function for restoring page state given a SessionState object
andersca@apple.com [Tue, 1 Jul 2014 21:07:40 +0000 (21:07 +0000)]
Add a function for restoring page state given a SessionState object
https://bugs.webkit.org/show_bug.cgi?id=134509

Reviewed by Tim Horton.

* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::itemState):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::saveState):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::saveState):
* UIProcess/WebPageProxy.h:

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

6 years ago[CMake] Add necessary support for building for the Wayland target
zandobersek@gmail.com [Tue, 1 Jul 2014 20:45:47 +0000 (20:45 +0000)]
[CMake] Add necessary support for building for the Wayland target
https://bugs.webkit.org/show_bug.cgi?id=134160

Reviewed by Darin Adler.

.:
* Source/cmake/FindGTK3.cmake: Check for the gtk+-x11-3.0 package if the X11 target
is enabled, and that its version matches the version of the generic package. Same
for the gtk+-wayland-3.0 package and the Wayland target.
* Source/cmake/OptionsCommon.cmake: Don't add the -DXP_UNIX definition here.
* Source/cmake/OptionsEfl.cmake: Add -DXP_UNIX here for the EFL port, under the same
condition as in OptionsCommon.cmake. ENABLE_X11_TARGET is enabled by default for EFL
so they keep building the TestNetscapePlugin target.
* Source/cmake/OptionsGTK.cmake: Enable the X11 target and disable the Wayland target
by default. Group all the X11-specific macro definitions (WTF_PLATFORM_X11, MOZ_X11,
XP_UNIX) and only add them if the X11 target is enabled. Similar goes for the Wayland
target and WTF_PLATFORM_WAYLAND. The Wayland target requires GTK+ 3.12.0, so that's
the minimum required version as soon as that target is enabled. Only search for GLX
if the X11 target is enabled.

Tools:
* CMakeLists.txt: Only build the TestNetscapePlugIn target in case
the X11 windowing target is enabled.

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

6 years agoFollowup for: Combine the Telephone and Selection overlay controllers, updating UI...
beidson@apple.com [Tue, 1 Jul 2014 20:38:37 +0000 (20:38 +0000)]
Followup for: Combine the Telephone and Selection overlay controllers, updating UI behavior.
https://bugs.webkit.org/show_bug.cgi?id=134461

Rubberstamped by Tim Horton.

* WebProcess/WebPage/mac/ServicesOverlayController.mm: Include the correct constant.

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

6 years agoAX: HTML indeterminate IDL attribute not mapped to checkbox value=2
cfleizach@apple.com [Tue, 1 Jul 2014 20:29:52 +0000 (20:29 +0000)]
AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
https://bugs.webkit.org/show_bug.cgi?id=134492

Reviewed by Andreas Kling.

Source/WebCore:
Support the indeterminate attribute in AX code.

Test: Update existing test: accessibility/aria-checked-mixed-value

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::checkboxOrRadioValue):

Tools:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::isIndeterminate):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::isIndeterminate):

LayoutTests:
* accessibility/aria-checked-mixed-value-expected.txt:
* accessibility/aria-checked-mixed-value.html:
* platform/mac/accessibility/aria-checked-mixed-value-expected.txt: Added.

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

6 years ago[Cocoa] Navigation parameter in navigation delegate messages is nil for navigations...
mitz@apple.com [Tue, 1 Jul 2014 20:22:58 +0000 (20:22 +0000)]
[Cocoa] Navigation parameter in navigation delegate messages is nil for navigations started by the Web Content process
https://bugs.webkit.org/show_bug.cgi?id=134482

Reviewed by Tim Horton.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didDestroyNavigation): New client function, called when a navigation ID
is not going to be used anymore.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _restoreFromSessionState:]): If restoring triggered a navigation, create a
WKNavigation for its ID.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoadRequestNavigation): Removed FIXME, because we now remove
navigations from the map in LoaderClient::didDestroyNavigation.
(WebKit::NavigationState::createBackForwardNavigation): Ditto.
(WebKit::NavigationState::createReloadNavigation): Ditto.
(WebKit::NavigationState::createLoadDataNavigation): Ditto.
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction): If we are only
getting a navigation ID now, create a WKNavigation for it. Also changed to create the
NSURLRequest lazily.
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame): Assert that
navigationID is not zero and that it maps to an existing WKNavigation.
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
Ditto.
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didDestroyNavigation): Override the new client
function to remove the navigation from the map.
(WebKit::NavigationState::LoaderClient::processDidCrash): Clear the navigations map.

* UIProcess/WebFrameListenerProxy.cpp:
(WebKit::WebFrameListenerProxy::WebFrameListenerProxy): Initialize new m_navigationID
member variable.
(WebKit::WebFrameListenerProxy::receivedPolicyDecision): Pass the navigation ID to
WebFrame::receivedPolicyDecision.
* UIProcess/WebFrameListenerProxy.h:
(WebKit::WebFrameListenerProxy::navigationID): Added this accessor.
(WebKit::WebFrameListenerProxy::setNavigationID): Ditto.

* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::receivedPolicyDecision): Added navigationID parameter, which is
passed along to the WebPageProxy.
* UIProcess/WebFrameProxy.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision): Added navigationID parameter, which is
passed along in the message to the Web Content process.
(WebKit::WebPageProxy::restoreFromSessionStateData): Changed to return a navigation ID of 0.
(WebKit::WebPageProxy::restoreFromState): Changed to return a navigation ID if one was
started.
(WebKit::WebPageProxy::didDestroyNavigation): Added. Calls the new client function.
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Added navigationID and
newNavigationID parameters. If a main-frame navigation doesn’t already have an ID, assign it
a new ID and return it in the newNavigationID parmeter as well as setting it on the listener
for the asynchronous case.
* UIProcess/WebPageProxy.h:

* UIProcess/WebPageProxy.messages.in: Added navigationID and newNavigationID parameters.

* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData): Changed to return a navigation ID if
one was started.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Updated for additional
parameter.
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the navigation
ID to the UI process, get the new navigation ID from the reply, and set it on the document
loader.

* WebProcess/WebPage/WebDocumentLoader.cpp:
(WebKit::WebDocumentLoader::detachFromFrame): Override to let the UI process know that the
navigation ID will not be used anymore.
* WebProcess/WebPage/WebDocumentLoader.h:

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision): Added navigationID parameter, set it on the
document loader.
(WebKit::WebFrame::documentLoaderDetached): Pass the message along to the UI process.
* WebProcess/WebPage/WebFrame.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceivePolicyDecision): Pass new navigationID parameter along.
* WebProcess/WebPage/WebPage.h:

* WebProcess/WebPage/WebPage.messages.in: Added navigationID parameter.

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

6 years agoFix build.
andersca@apple.com [Tue, 1 Jul 2014 19:43:48 +0000 (19:43 +0000)]
Fix build.

* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoTemporarily encode and decode the snapshot UUID
andersca@apple.com [Tue, 1 Jul 2014 19:42:03 +0000 (19:42 +0000)]
Temporarily encode and decode the snapshot UUID
https://bugs.webkit.org/show_bug.cgi?id=134507

Reviewed by Tim Horton.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistory):
(WebKit::decodeSessionHistoryEntry):
(WebKit::decodeSessionHistoryEntries):

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

6 years agoImplement encodeSessionHistoryEntryData
andersca@apple.com [Tue, 1 Jul 2014 19:34:57 +0000 (19:34 +0000)]
Implement encodeSessionHistoryEntryData
https://bugs.webkit.org/show_bug.cgi?id=134505

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
Add back a missing null check for the filter pointer.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistoryEntryData):

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

6 years ago[UI-side compositing] Bad spinner on news.google.com: animations need to be ordered
simon.fraser@apple.com [Tue, 1 Jul 2014 19:15:39 +0000 (19:15 +0000)]
[UI-side compositing] Bad spinner on news.google.com: animations need to be ordered
https://bugs.webkit.org/show_bug.cgi?id=134504
<rdar://problem/17507892>

Reviewed by Tim Horton.

Source/WebKit2:
The layer's addedAnimations property needs to maintain order, since the order
in which transforms are applied is important.

* Shared/mac/RemoteLayerTreeTransaction.h: Use a Vector<pair<>> for addedAnimations.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::updateLayerAnimations):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::addAnimationForKey): If this is a new entry, we
can just append to addedAnimations, otherwise we have to find the existing one
and update its properties.
(WebKit::PlatformCALayerRemote::removeAnimationForKey): Do linear search to
find the animation to remove (this list will normally be short).

LayoutTests:
Test that the transforms from the animation are applied in the correct order.

* compositing/animation/keyframe-order-expected.html: Added.
* compositing/animation/keyframe-order.html: Added.

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

6 years agoTyping an automatic text replacement phrase after a br in contenteditable is not...
mmaxfield@apple.com [Tue, 1 Jul 2014 19:10:30 +0000 (19:10 +0000)]
Typing an automatic text replacement phrase after a br in contenteditable is not rendered as expected
https://bugs.webkit.org/show_bug.cgi?id=133883

Reviewed by Enrica Casucci.

enclosingDeletableElement() makes sure that the element's container is editable, but not
that it is capable of having content inside it (like how a <br> can't).

No new tests. I don't think this is testable because it requires setting some state in System Preferences.

* editing/DeleteButtonController.cpp:
(WebCore::enclosingDeletableElement):

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

6 years agoAdd a encodeLegacySessionState function
andersca@apple.com [Tue, 1 Jul 2014 19:04:54 +0000 (19:04 +0000)]
Add a encodeLegacySessionState function
https://bugs.webkit.org/show_bug.cgi?id=134502

Reviewed by Tim Horton.

* UIProcess/LegacySessionStateCoding.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistoryEntryData):
(WebKit::encodeLegacySessionHistoryEntryData):
(WebKit::createDictionary):
(WebKit::encodeSessionHistory):
(WebKit::encodeLegacySessionState):

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

6 years ago[Cocoa] WebProcess doesn't follow localization of UI process when run as a service
timothy_horton@apple.com [Tue, 1 Jul 2014 18:41:27 +0000 (18:41 +0000)]
[Cocoa] WebProcess doesn't follow localization of UI process when run as a service
https://bugs.webkit.org/show_bug.cgi?id=133126
<rdar://problem/13396515>

Patch by Alexey Proskuryakov.
Reviewed by Tim Horton.

* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:
Figure out which of the two keys to use. CFBundleAllowMixedLocalizations was
a workaround before we got CFBundleFollowParentLocalization, and these cannot be
used together.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService): Set up
XPC bootstrap for CFBundle to use.

* WebKit2.xcodeproj/project.pbxproj: Added a script that applies the key to Info.plist.

* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
Removed CFBundleAllowMixedLocalizations, we now add it programmatically.

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

6 years ago[iOS] Unreviewed build fix after r170640.
achristensen@apple.com [Tue, 1 Jul 2014 18:29:53 +0000 (18:29 +0000)]
[iOS] Unreviewed build fix after r170640.

Source/WebCore:
* page/EditorClient.h:
(WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
Add ifdefs to make everything compile and link.

Source/WebKit2:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
(WebKit::WebEditorClient::selectionRectsDidChange):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebPage.h:
Add ifdefs to make everything compile and link.

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

6 years agoAdd WKSessionStateGetTypeID
andersca@apple.com [Tue, 1 Jul 2014 18:00:35 +0000 (18:00 +0000)]
Add WKSessionStateGetTypeID
https://bugs.webkit.org/show_bug.cgi?id=134499

Reviewed by Tim Horton.

* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateGetTypeID):
* UIProcess/API/C/WKSessionStateRef.h:

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

6 years agoRemove unnecessary calls to std::move()
dbates@webkit.org [Tue, 1 Jul 2014 17:49:47 +0000 (17:49 +0000)]
Remove unnecessary calls to std::move()
https://bugs.webkit.org/show_bug.cgi?id=134493

Reviewed by Anders Carlsson.

Source/WebCore:
* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::CDM):
* css/CSSGrammar.y.in:
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberValue):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::dashesForIntersectionsWithRect):

Source/WebKit2:
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::Handle::tryWrapInCFData):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::certificateInfo): Return a WebCore::CertificateInfo instead
of const WebCore::CertificateInfo& to avoid returning a dangling reference to
a local variable. Also, remove the unnecessary calls to std::move() as the compiler
will invoke the move constructor for WebCore::CertificateInfo on return from the
function.
* WebProcess/WebPage/WebFrame.h:

Tools:
* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:
(TestWebKitAPI::TEST):

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

6 years agoAdd a BackForwardListItemState struct and put the snapshot UUID there
andersca@apple.com [Tue, 1 Jul 2014 17:46:29 +0000 (17:46 +0000)]
Add a BackForwardListItemState struct and put the snapshot UUID there
https://bugs.webkit.org/show_bug.cgi?id=134497

Reviewed by Sam Weinig.

* Shared/SessionState.cpp:
(WebKit::PageState::encode):
(WebKit::PageState::decode):
(WebKit::BackForwardListItemState::encode):
(WebKit::BackForwardListItemState::decode):
* Shared/SessionState.h:
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::backForwardData):
(WebKit::WebBackForwardListItem::setBackForwardData):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setPageState):
(WebKit::WebBackForwardListItem::setOriginalURL):
(WebKit::WebBackForwardListItem::originalURL):
(WebKit::WebBackForwardListItem::setURL):
(WebKit::WebBackForwardListItem::url):
(WebKit::WebBackForwardListItem::setTitle):
(WebKit::WebBackForwardListItem::title):
(WebKit::WebBackForwardListItem::setSnapshotUUID):
(WebKit::WebBackForwardListItem::snapshotUUID):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::restoreFromState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeSessionHistoryEntries):

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

6 years ago[iOS] Compile fix with pointer lock enabled.
achristensen@apple.com [Tue, 1 Jul 2014 17:33:43 +0000 (17:33 +0000)]
[iOS] Compile fix with pointer lock enabled.
https://bugs.webkit.org/show_bug.cgi?id=134472

Reviewed by Pratik Solanki.

* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):
Add parameters required for pointer lock.

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

6 years agoUnreviewed. Adding myself to the reviewers list to make commit bot happy.
psolanki@apple.com [Tue, 1 Jul 2014 17:29:15 +0000 (17:29 +0000)]
Unreviewed. Adding myself to the reviewers list to make commit bot happy.

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

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

6 years agoSubpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
zalan@apple.com [Tue, 1 Jul 2014 17:25:10 +0000 (17:25 +0000)]
Subpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
https://bugs.webkit.org/show_bug.cgi?id=134491

Reviewed by Simon Fraser.

Do not early round geometry values, while computing background image position. It changes the final
subpixel values and that could lead to wrong snap positions.
pixelSnapBackgroundImageGeometryForPainting() takes care of geometry snapping.

Source/WebCore:
Test: fast/backgrounds/background-image-size-double-rounding.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

LayoutTests:
* fast/backgrounds/background-image-size-double-rounding-expected.html: Added.
* fast/backgrounds/background-image-size-double-rounding.html: Added.

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

6 years agoAdd encodeInteger and decodeInteger for remote object encoder and decoder.
commit-queue@webkit.org [Tue, 1 Jul 2014 17:14:35 +0000 (17:14 +0000)]
Add encodeInteger and decodeInteger for remote object encoder and decoder.
https://bugs.webkit.org/show_bug.cgi?id=134453

In 64bit system, encodeInteger/decodeInteger is by default mapped into encodeInt64/decodeInt64.  For
32bit system, they are mapped to encodeInt32/decodeInt32.  However, since we don't have encodeInt32/decodeInt32
implementation in WKRemoteObjectCoder, we could hit crash in 32bit systems.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-07-01
Reviewed by Sam Weinig.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder encodeInteger:forKey:]): Instead of creating a new number type UInt32, use encodeInt64 for
    encoding NSInteger.
(-[WKRemoteObjectDecoder decodeIntegerForKey:]):

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

6 years agoUse an std::function for filtering session state data
andersca@apple.com [Tue, 1 Jul 2014 17:04:30 +0000 (17:04 +0000)]
Use an std::function for filtering session state data
https://bugs.webkit.org/show_bug.cgi?id=134481

Reviewed by Sam Weinig.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionState]):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sessionStateData):
* UIProcess/WebPageProxy.h:
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::sessionStateData):

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

6 years agoClean up the WebKit build from unused parameter warning in Webkit2/UIProcess module
commit-queue@webkit.org [Tue, 1 Jul 2014 16:59:00 +0000 (16:59 +0000)]
Clean up the WebKit build from unused parameter warning in Webkit2/UIProcess module
https://bugs.webkit.org/show_bug.cgi?id=134294

Patch by Rohit Kumar <kumar.rohit@samsung.com> on 2014-07-01
Reviewed by Darin Adler.

* UIProcess/API/APIUIClient.h:
(API::UIClient::reachedApplicationCacheOriginQuota):

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

6 years agoCreate NSURLRequest lazily when USE(CFNETWORK) is enabled
psolanki@apple.com [Tue, 1 Jul 2014 16:45:03 +0000 (16:45 +0000)]
Create NSURLRequest lazily when USE(CFNETWORK) is enabled
https://bugs.webkit.org/show_bug.cgi?id=134441

Reviewed by Andreas Kling.

No new tests. Should be covered by existing tests.

* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::encodingRequiresPlatformData):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::nsURLRequest):

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

6 years agoBuild fix.
beidson@apple.com [Tue, 1 Jul 2014 16:43:03 +0000 (16:43 +0000)]
Build fix.

Forgot to commit locally before pushing.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::servicesOverlayController): s/this/*this/

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

6 years agoCombine the Telephone and Selection overlay controllers, updating UI behavior.
beidson@apple.com [Tue, 1 Jul 2014 16:22:01 +0000 (16:22 +0000)]
Combine the Telephone and Selection overlay controllers, updating UI behavior.
https://bugs.webkit.org/show_bug.cgi?id=134461

Reviewed by Tim Horton.

Source/WebCore:
* WebCore.exp.in:

* dom/Range.cpp:
(WebCore::Range::contains): Returns true if the Range completely contains the passed-in Range.
* dom/Range.h:

Source/WebKit2:
* WebKit2.xcodeproj/project.pbxproj:

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
(WebKit::WebEditorClient::selectionRectsDidChange):

Remove the separate Selection overlay controller:
* WebProcess/WebPage/SelectionOverlayController.cpp: Removed.
* WebProcess/WebPage/ServicesOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/SelectionOverlayController.h.
(WebKit::ServicesOverlayController::create):
* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm: Removed.

Remove the separate TelephoneNumber overlay controller:
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp: Removed.
* WebProcess/WebPage/TelephoneNumberOverlayController.h: Removed.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm: Removed.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::servicesOverlayController):
(WebKit::WebPage::telephoneNumberOverlayController): Deleted.
(WebKit::WebPage::selectionOverlayController): Deleted.
(WebKit::WebPage::didChangeScrollOffsetForFrame): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::serviceControlsEnabled): Deleted.

ServicesOverlayController is a combination of the old TelephoneNumber and Selection overlay controllers.
A lot of code duplication is resolved, and things are generally easier to follow.
It enforces displaying a telephone number highlight if precisely one telephone number is selected, or
the selection highlight if the selection contains more than a single phone number
* WebProcess/WebPage/mac/ServicesOverlayController.mm: Added.
(WebKit::textQuadsToBoundingRectForRange):
(WebKit::ServicesOverlayController::ServicesOverlayController):
(WebKit::ServicesOverlayController::destroyOverlay):
(WebKit::ServicesOverlayController::pageOverlayDestroyed):
(WebKit::ServicesOverlayController::willMoveToWebPage):
(WebKit::ServicesOverlayController::didMoveToWebPage):
(WebKit::ServicesOverlayController::createOverlayIfNeeded):
(WebKit::ServicesOverlayController::selectionRectsDidChange):
(WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
(WebKit::ServicesOverlayController::clearHighlightState):
(WebKit::ServicesOverlayController::drawRect):
(WebKit::ServicesOverlayController::drawSelectionHighlight):
(WebKit::ServicesOverlayController::drawTelephoneNumberHighlight):
(WebKit::ServicesOverlayController::drawCurrentHighlight):
(WebKit::ServicesOverlayController::mouseEvent):
(WebKit::ServicesOverlayController::handleClick):

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

6 years agowebkit-patch apply-from-bug / apply-attachment should not ask for credentials if...
commit-queue@webkit.org [Tue, 1 Jul 2014 15:22:44 +0000 (15:22 +0000)]
webkit-patch apply-from-bug / apply-attachment should not ask for credentials if none are required
https://bugs.webkit.org/show_bug.cgi?id=40095

Patch by Youenn Fablet <youenn.fablet@crf.canon.fr> on 2014-07-01
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla.fetch_attachment_contents): make a first fetch on bugzilla without authentication. If failing, use authentication (similar to fetch_bug_dictionary).
(Bugzilla):
(Bugzilla.bug_id_for_attachment_id): ditto.

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

6 years agoREGRESSION(160908): vube.com video won't play after going into and out of fullscreen
antti@apple.com [Tue, 1 Jul 2014 15:16:24 +0000 (15:16 +0000)]
REGRESSION(160908): vube.com video won't play after going into and out of fullscreen
https://bugs.webkit.org/show_bug.cgi?id=134489

Reviewed by Zalan Bujtas.

Test: fullscreen/full-screen-plugin.html

It is difficult to restore the render tree correctly in all cases after removing a full screen
renderer from the tree. r160908 avoided dealing with this by simply always reconstructing the subtree.
Unfortunately plugin lifetime is currently tied to its renderer so this would cause the plugin to restart.

With this patch we avoid reconstruction in normal cases and only force it if the render tree is complicated.

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

    Force reconstruction conditionally.

(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::wrapRenderer):
(WebCore::RenderFullScreen::unwrapRenderer):

    Deal with the simple case of single child, possibly in anonymous wrapper.
    In other cases request reconstruction.
    This is covered by the existing fullscreen tests.

* rendering/RenderFullScreen.h:

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

6 years ago[webkitpy] Refactor pluralizer in grammar.py
commit-queue@webkit.org [Tue, 1 Jul 2014 13:10:18 +0000 (13:10 +0000)]
[webkitpy] Refactor pluralizer in grammar.py
https://bugs.webkit.org/show_bug.cgi?id=133067

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-07-01
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.run_tests):
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run):
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_found):
(Printer.print_workers_and_shards):
(Printer._print_one_line_summary):
* Scripts/webkitpy/test/printer.py:
(Printer.print_result):
* Scripts/webkitpy/tool/bot/feeders.py:
(EWSFeeder.feed):
* Scripts/webkitpy/tool/bot/flakytestreporter.py:
(FlakyTestReporter._lookup_bug_for_flaky_test):
* Scripts/webkitpy/tool/bot/irc_command.py:
(Rollout._check_diff_failure):
* Scripts/webkitpy/tool/bot/irc_command_unittest.py:
(IRCCommandTest.test_rollout):
* Scripts/webkitpy/tool/commands/download.py:
(AbstractPatchProcessingCommand._process_patch.execute):
(ProcessBugsMixin._fetch_list_of_patches_to_process):
(ProcessURLsMixin._fetch_list_of_patches_to_process):
* Scripts/webkitpy/tool/commands/queries.py:
(WhatBroke.execute):
* Scripts/webkitpy/tool/commands/suggestnominations.py:
(SuggestNominations._print_nominations):
(SuggestNominations._print_counts):
* Scripts/webkitpy/tool/commands/suggestnominations_unittest.py:
(_make_options):
(test_basic):
(test_with_verbose):
* Scripts/webkitpy/tool/commands/upload.py:
(PostCommits.execute):
* Scripts/webkitpy/tool/grammar.py:
(pluralize):
* Scripts/webkitpy/tool/grammar_unittest.py:
(GrammarTest.test_join_with_separators):
(GrammarTest):
(GrammarTest.test_plural):
(GrammarTest.test_pluralize):
* Scripts/webkitpy/tool/multicommandtool.py:
(Command.check_arguments_and_execute):
* Scripts/webkitpy/tool/steps/obsoletepatches.py:
(ObsoletePatches.run):
* Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
(PrepareChangeLogForRevert._message_for_revert):

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

6 years ago[WK2] IPC messages' arguments() method returns const std::tuple<> copies
zandobersek@gmail.com [Tue, 1 Jul 2014 11:32:36 +0000 (11:32 +0000)]
[WK2] IPC messages' arguments() method returns const std::tuple<> copies
https://bugs.webkit.org/show_bug.cgi?id=131975

Reviewed by Darin Adler.

The arguments() method of the different IPC message objects should return a const reference
to the std::tuple<> containing the arguments, instead of a const value. This avoids copying
the std::tuple<> every time the arguments are encoded, and works best with the
ArgumentEncoder::encode<std::tuple<...>>(const std::tuple<...>&) template instantiation.

The unit test baselines are updated accordingly.

* Scripts/webkit2/LegacyMessages-expected.h:
(Messages::WebPage::LoadURL::arguments):
(Messages::WebPage::LoadSomething::arguments):
(Messages::WebPage::TouchEvent::arguments):
(Messages::WebPage::AddEvent::arguments):
(Messages::WebPage::LoadSomethingElse::arguments):
(Messages::WebPage::DidReceivePolicyDecision::arguments):
(Messages::WebPage::Close::arguments):
(Messages::WebPage::PreferencesDidChange::arguments):
(Messages::WebPage::SendDoubleAndFloat::arguments):
(Messages::WebPage::SendInts::arguments):
(Messages::WebPage::CreatePlugin::arguments):
(Messages::WebPage::RunJavaScriptAlert::arguments):
(Messages::WebPage::GetPlugins::arguments):
(Messages::WebPage::GetPluginProcessConnection::arguments):
(Messages::WebPage::TestMultipleAttributes::arguments):
(Messages::WebPage::TestParameterAttributes::arguments):
(Messages::WebPage::TemplateTest::arguments):
(Messages::WebPage::SetVideoLayerID::arguments):
(Messages::WebPage::DidCreateWebProcessConnection::arguments):
(Messages::WebPage::InterpretKeyEvent::arguments):
(Messages::WebPage::DeprecatedOperation::arguments):
(Messages::WebPage::ExperimentalOperation::arguments):
* Scripts/webkit2/Messages-expected.h:
(Messages::WebPage::LoadURL::arguments):
(Messages::WebPage::LoadSomething::arguments):
(Messages::WebPage::TouchEvent::arguments):
(Messages::WebPage::AddEvent::arguments):
(Messages::WebPage::LoadSomethingElse::arguments):
(Messages::WebPage::DidReceivePolicyDecision::arguments):
(Messages::WebPage::Close::arguments):
(Messages::WebPage::PreferencesDidChange::arguments):
(Messages::WebPage::SendDoubleAndFloat::arguments):
(Messages::WebPage::SendInts::arguments):
(Messages::WebPage::CreatePlugin::arguments):
(Messages::WebPage::RunJavaScriptAlert::arguments):
(Messages::WebPage::GetPlugins::arguments):
(Messages::WebPage::GetPluginProcessConnection::arguments):
(Messages::WebPage::TestMultipleAttributes::arguments):
(Messages::WebPage::TestParameterAttributes::arguments):
(Messages::WebPage::TemplateTest::arguments):
(Messages::WebPage::SetVideoLayerID::arguments):
(Messages::WebPage::DidCreateWebProcessConnection::arguments):
(Messages::WebPage::InterpretKeyEvent::arguments):
(Messages::WebPage::DeprecatedOperation::arguments):
(Messages::WebPage::ExperimentalOperation::arguments):
* Scripts/webkit2/MessagesSuperclass-expected.h:
(Messages::WebPage::LoadURL::arguments):
* Scripts/webkit2/messages.py:
(message_to_struct_declaration):

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

6 years agoRemove remaining Vector<> copies in WebCore accessibility code
zandobersek@gmail.com [Tue, 1 Jul 2014 11:29:24 +0000 (11:29 +0000)]
Remove remaining Vector<> copies in WebCore accessibility code
https://bugs.webkit.org/show_bug.cgi?id=133263

Reviewed by Darin Adler.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired): Don't copy the Vector member and
then clear it -- move it into the local variable instead.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::ariaLabeledByText): Move the axElements Vector into
the AccessibilityText constructor.
(WebCore::AccessibilityNodeObject::stringValue): Create a const reference to the Vector of
HTMLSelectElement's list items instead of copying it.
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityText::AccessibilityText): Take the Vector parameter by non-const
value and move it into the member variable.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::stringValue): Create a const reference to the Vector
of HTMLSelectElement's list items instead of copying it.
(WebCore::AccessibilityRenderObject::ariaSelectedRows): Wrap the AccessibilityChildrenVector
iteration in a lambda. Use it to iterate over either the newly-constructed Vector (in case
the object has the tree role) or the reference to the vector returned by
AccessibilityTable::rows() (in case the object is an AccessibilityTable instance).

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

6 years ago[GTK] Annotations for WebResource.get_data produce wrong signature in Vala binding
commit-queue@webkit.org [Tue, 1 Jul 2014 09:10:56 +0000 (09:10 +0000)]
[GTK] Annotations for WebResource.get_data produce wrong signature in Vala binding
https://bugs.webkit.org/show_bug.cgi?id=134476

Patch by Evan Nemerson <evan@nemerson.com> on 2014-07-01
Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitWebResource.cpp: Add array length and
element-type annotations to return value of webkit_web_resource_get_data_finish().

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

6 years ago[WK2] Can not convert ‘sessionState.WebKit::SessionState::provisionalURL’ from ‘WebCo...
gyuyoung.kim@samsung.com [Tue, 1 Jul 2014 08:17:46 +0000 (08:17 +0000)]
[WK2] Can not convert ‘sessionState.WebKit::SessionState::provisionalURL’ from ‘WebCore::URL’ to ‘bool’
https://bugs.webkit.org/show_bug.cgi?id=134487

Rubber-stamped by Carlos Garcia Campos.

* UIProcess/WebPageProxy.cpp: Use isNull().
(WebKit::WebPageProxy::restoreFromState):

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

6 years agoFix build break on EFL and GTK ports since r170611 and r170614
gyuyoung.kim@samsung.com [Tue, 1 Jul 2014 07:57:18 +0000 (07:57 +0000)]
Fix build break on EFL and GTK ports since r170611 and r170614
https://bugs.webkit.org/show_bug.cgi?id=134479

Reviewed by Carlos Garcia Campos.

Add LegacySessionStateCodingNone.cpp in order to fix build break on EFL and GTK ports. Additionally
SessionStateConversion.cpp is added to CMakeLists.txt as well.

* CMakeLists.txt:
* UIProcess/LegacySessionStateCoding.h: Copied from Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h.
* UIProcess/LegacySessionStateCodingNone.cpp: Renamed from Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h.
(WebKit::encodeLegacySessionHistoryEntryData):
(WebKit::decodeLegacySessionState):
(WebKit::decodeLegacySessionHistoryEntryData):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::restoreFromState):
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoUnreviewed, rolling out r170605.
commit-queue@webkit.org [Tue, 1 Jul 2014 04:16:49 +0000 (04:16 +0000)]
Unreviewed, rolling out r170605.
https://bugs.webkit.org/show_bug.cgi?id=134484

The changes cause crashes on ARM64 (Requested by benjaminp on
#webkit).

Reverted changeset:

"Reduce dynamic memory allocation in css jit."
https://bugs.webkit.org/show_bug.cgi?id=134416
http://trac.webkit.org/changeset/170605

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

6 years ago[iOS][WK2] The long press gesture recognizers should not block the pinch gesture
benjamin@webkit.org [Tue, 1 Jul 2014 03:12:17 +0000 (03:12 +0000)]
[iOS][WK2] The long press gesture recognizers should not block the pinch gesture
https://bugs.webkit.org/show_bug.cgi?id=134477
<rdar://problem/17514936>

Reviewed by Tim Horton.

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

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

6 years agoAdd WebPageProxy::restoreFromState
andersca@apple.com [Tue, 1 Jul 2014 01:40:13 +0000 (01:40 +0000)]
Add WebPageProxy::restoreFromState
https://bugs.webkit.org/show_bug.cgi?id=134480

Reviewed by Tim Horton.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromState):
* UIProcess/WebPageProxy.h:

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

6 years agoAdd a function to restore a WebBackForwardList object from a BackForwardListState...
andersca@apple.com [Tue, 1 Jul 2014 01:29:38 +0000 (01:29 +0000)]
Add a function to restore a WebBackForwardList object from a BackForwardListState object
https://bugs.webkit.org/show_bug.cgi?id=134478

Reviewed by Tim Horton.

* UIProcess/WebBackForwardList.cpp:
(WebKit::generateWebBackForwardItemID):
(WebKit::WebBackForwardList::restoreFromState):
* UIProcess/WebBackForwardList.h:
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::generateWebBackForwardItemID): Deleted.

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

6 years agoChange the AddBackForwardItem message to take a page state object
andersca@apple.com [Tue, 1 Jul 2014 01:06:35 +0000 (01:06 +0000)]
Change the AddBackForwardItem message to take a page state object
https://bugs.webkit.org/show_bug.cgi?id=134475

Reviewed by Andreas Kling.

Source/WebCore:
* WebCore.exp.in:

Source/WebKit2:
* Scripts/webkit2/messages.py:
(struct_or_class):
(headers_for_type):
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setPageState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem):

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

6 years ago[WK2] Add a flatter find-in-page current match indicator style
timothy_horton@apple.com [Tue, 1 Jul 2014 00:50:07 +0000 (00:50 +0000)]
[WK2] Add a flatter find-in-page current match indicator style
https://bugs.webkit.org/show_bug.cgi?id=134434
<rdar://problem/16225673>

Reviewed by Simon Fraser.

* UIProcess/FindIndicator.cpp:
(WebKit::findIndicatorsForTextRectsOverlap):
(WebKit::FindIndicator::frameRect):
(WebKit::flatHighlightColor):
(WebKit::flatRimShadowColor):
(WebKit::flatDropShadowColor):
(WebKit::FindIndicator::draw):
Add a flatter find indicator, with a bigger shadow.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::getFindIndicatorBitmapAndRect):
(WebKit::FindController::hideFindIndicator):
(WebKit::FindController::drawRect):
Don't paint a shadow behind the secondary matches if we're using the new style.

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

6 years ago[iOS] GSFontAddCGFont is deprecated and we use it in DumpRenderTree
mmaxfield@apple.com [Tue, 1 Jul 2014 00:45:50 +0000 (00:45 +0000)]
[iOS] GSFontAddCGFont is deprecated and we use it in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=134133

Reviewed by Simon Fraser.

Replace it with CTFontManagerRegisterGraphicsFont

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/mac/DumpRenderTree.mm:
(activateFontIOS):

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

6 years ago[iOS][WK2] Improve double-tap-to-scroll on image documents
benjamin@webkit.org [Tue, 1 Jul 2014 00:42:49 +0000 (00:42 +0000)]
[iOS][WK2] Improve double-tap-to-scroll on image documents
https://bugs.webkit.org/show_bug.cgi?id=134474
<rdar://problem/17496778>

Reviewed by Enrica Casucci.

On image document, we were always rendering the center of the image as the origin, which broke
double tap to scroll.

This patch improves on this in two ways:
1) If the hit testing already got the image, only change the type to replaced (to get the right
   scaling behavior for images since the type is block on iOS's image document).
2) If the hit testing is outside the image, only center the axis that is not in the image.
   This way, we "fix" the component that is not valid, and keep the vali component.
   This works great for viewing comics on iPad.

* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):

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

6 years ago[iOS][WK2] Do not put tap highlight on images that are not in links, and on applet...
benjamin@webkit.org [Tue, 1 Jul 2014 00:38:12 +0000 (00:38 +0000)]
[iOS][WK2] Do not put tap highlight on images that are not in links, and on applet/embed/object
https://bugs.webkit.org/show_bug.cgi?id=134471
<rdar://problem/17513542>

Reviewed by Enrica Casucci.

UIKit has some special code to avoid tap highlight on certain type of object. This is not very flexible
since the page has no way of overriding that behavior.

This patch implement the same feature by changing the default stylesheet. The tap highlight is disabled
by default for those object, and enabled for images that are in a link.

* css/html.css:
(applet, embed, object, img):
(:-webkit-any-link img):

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

6 years agoREGRESSION (WK2): Weird selection behavior on autos.yahoo.com, en.wikipedia.org.
enrica@apple.com [Tue, 1 Jul 2014 00:27:25 +0000 (00:27 +0000)]
REGRESSION (WK2): Weird selection behavior on autos.yahoo.com, en.wikipedia.org.
https://bugs.webkit.org/show_bug.cgi?id=134466
<rdar://problem/16817263>

Reviewed by Benjamin Poulain.

Avoid selecting blocks across frame boundaries and skip non-selectable
blocks. If the only block we find is almost the same height as the
visible area, we should not select at all.
This patch also fixes the logic to compute the next block when
shrinking the selection. When calculating the new range after shrinking,
we should not include the block that corresponds to the current handle position.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::expandedRangeFromHandle):
(WebKit::WebPage::contractedRangeFromHandle):
(WebKit::WebPage::updateSelectionWithTouches):

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

6 years agoAll Indic text is rendered as boxes on iOS
mmaxfield@apple.com [Tue, 1 Jul 2014 00:17:09 +0000 (00:17 +0000)]
All Indic text is rendered as boxes on iOS
https://bugs.webkit.org/show_bug.cgi?id=134464

Reviewed by Simon Fraser.

Source/WebCore:
I made a typo in r170207.

Test: fast/text/indic.html

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::languageSpecificFallbackFont):

LayoutTests:
Simply draw some indic text and test that against currently good metric values.

* fast/text/indic.html: Added
* platform/ios-sim/fast/text/indic-expected.txt: Added.
* platform/mac/fast/text/indic-expected.txt: Added.
* platform/mac/fast/text/indic-expected.png: Added.

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

6 years ago[iOS] languageSpecificFallbackFont() is not consistent
mmaxfield@apple.com [Tue, 1 Jul 2014 00:14:38 +0000 (00:14 +0000)]
[iOS] languageSpecificFallbackFont() is not consistent
https://bugs.webkit.org/show_bug.cgi?id=134473

Reviewed by Darin Adler.

It can use "<" throughout the function as well as keeping the fallthrough behavior consistent.

No tests because there is no behavior change.

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::languageSpecificFallbackFont):

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

6 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Tue, 1 Jul 2014 00:11:09 +0000 (00:11 +0000)]
[Win] Unreviewed gardening.

* WebCore.vcxproj/WebCore.vcxproj: Do not compile JSFileException
and JSFileReaderSync multiple times.

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

6 years agoAvoid copying function object in lambda function in ScrollingThread::dispatchBarrier...
dbates@webkit.org [Tue, 1 Jul 2014 00:04:11 +0000 (00:04 +0000)]
Avoid copying function object in lambda function in ScrollingThread::dispatchBarrier(); actually use move semantics
https://bugs.webkit.org/show_bug.cgi?id=134470

Reviewed by Anders Carlsson.

Currently we always copy construct the captured std::function object when calling callOnMainThread()
in the lambda function created in ScrollingThread::dispatchBarrier() because captured variables are
const in a lambda expression's body by default. That is, the std::function object is captured as const.
Instead, we should mark this lambda expression as mutable so the captured std::function object is
non-const and hence we can use move semantics when passing it to callOnMainThread().

* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::dispatchBarrier):

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

6 years agoMake TransformIterator::TransformIterator() take rvalue references
dbates@webkit.org [Tue, 1 Jul 2014 00:00:27 +0000 (00:00 +0000)]
Make TransformIterator::TransformIterator() take rvalue references
https://bugs.webkit.org/show_bug.cgi?id=134468

Reviewed by Darin Adler.

It's unnecessary to support TransformIterator::TransformIterator() taking const lvalue references
as we only call it with rvalues. As a side benefit, we can use move semantics to initialize the
members of TransformIterator.

* wtf/IteratorAdaptors.h:
(WTF::TransformIterator::TransformIterator): Make constructor take arguments as rvalue references.
(WTF::makeTransformIterator): Substitute std::move() for std::forward().

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

6 years agoWebBackForwardListItem should not store back-forward data
andersca@apple.com [Mon, 30 Jun 2014 23:39:43 +0000 (23:39 +0000)]
WebBackForwardListItem should not store back-forward data
https://bugs.webkit.org/show_bug.cgi?id=134469

Reviewed by Darin Adler.

Change WebBackForwardListItem::backForwardData to encode the main frame state lazily,
and change WebBackForwardListItem::setBackForwardData to decode it into the main frame state.

* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::backForwardData):
(WebKit::WebBackForwardListItem::setBackForwardData):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::backForwardData): Deleted.
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):

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

6 years agoWebBackForwardListItems should hold on to PageState objects
andersca@apple.com [Mon, 30 Jun 2014 23:26:42 +0000 (23:26 +0000)]
WebBackForwardListItems should hold on to PageState objects
https://bugs.webkit.org/show_bug.cgi?id=134467

Reviewed by Darin Adler.

* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setOriginalURL):
(WebKit::WebBackForwardListItem::originalURL):
(WebKit::WebBackForwardListItem::setURL):
(WebKit::WebBackForwardListItem::url):
(WebKit::WebBackForwardListItem::setTitle):
(WebKit::WebBackForwardListItem::title):

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

6 years agoAdd a missing semicolon in WKContentViewInteraction
benjamin@webkit.org [Mon, 30 Jun 2014 23:24:15 +0000 (23:24 +0000)]
Add a missing semicolon in WKContentViewInteraction

* UIProcess/ios/WKContentViewInteraction.mm:
(nsSizeForTapHighlightBorderRadius):
I messed up this when fixing the patch on landing.

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

6 years agoAdopt the legacy session decoding inside WebPage::restoreSession for now
andersca@apple.com [Mon, 30 Jun 2014 23:05:45 +0000 (23:05 +0000)]
Adopt the legacy session decoding inside WebPage::restoreSession for now
https://bugs.webkit.org/show_bug.cgi?id=134465

Reviewed by Sam Weinig.

Source/WebCore:
* WebCore.exp.in:

Source/WebKit2:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeLegacySessionHistoryEntryData):
* UIProcess/mac/LegacySessionStateCoding.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):

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

6 years ago[iOS WK2] Don't crash on status bar tap with overflow scroll views
simon.fraser@apple.com [Mon, 30 Jun 2014 22:58:36 +0000 (22:58 +0000)]
[iOS WK2] Don't crash on status bar tap with overflow scroll views
https://bugs.webkit.org/show_bug.cgi?id=134459

Reviewed by Tim Horton.

The tiled scrolling indicator parents UIViews under CALayers, but that causes
those views to miss -willMoveToWindow:nil notifications on teardown. This can leave
deleted UIScrollViews in UIKit's "scroll to top" list.

Fix by not making UIScrollViews in the debug layer tree host.

* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):

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

6 years agoUnreviewed, rolling out r170578.
commit-queue@webkit.org [Mon, 30 Jun 2014 22:52:32 +0000 (22:52 +0000)]
Unreviewed, rolling out r170578.
https://bugs.webkit.org/show_bug.cgi?id=134462

causes assertions loading nytimes.com on iOS (Requested by
smfr on #webkit).

Reverted changeset:

"Create NSURLRequest lazily when USE(CFNETWORK) is enabled"
https://bugs.webkit.org/show_bug.cgi?id=134441
http://trac.webkit.org/changeset/170578

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

6 years ago Restrict network process sandbox
oliver@apple.com [Mon, 30 Jun 2014 22:51:39 +0000 (22:51 +0000)]
   Restrict network process sandbox
       https://bugs.webkit.org/show_bug.cgi?id=134360

       Reviewed by Sam Weinig.

       Add more restrictions to the network process sandbox.

       * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
       (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
 Always use the cache directory provided in the initialization parameters,
 and make sure we consume the cookie directory extension.
       * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
 Make the sandbox profile much more restrictive.
       * Shared/Network/NetworkProcessCreationParameters.cpp:
       (WebKit::NetworkProcessCreationParameters::encode):
       (WebKit::NetworkProcessCreationParameters::decode):
       * Shared/Network/NetworkProcessCreationParameters.h:
 The network process now requires an extension to access
 its cookie storage.
       * Shared/mac/SandboxUtilities.cpp:
       (WebKit::pathForProcessContainer):
       * Shared/mac/SandboxUtilities.h:
 We need to be able to get hold of our container so
 that we can get the correct cookie storage directory.
       * UIProcess/WebContext.cpp:
       (WebKit::WebContext::ensureNetworkProcess):
 We have to pass in the an extension for the cookie storage directory when
       initalising the network process
       * UIProcess/mac/WebContextMac.mm:
       (WebKit::WebContext::platformDefaultCookieStorageDirectory):
 Make sure we provide the correct location on IOS
       * WebProcess/cocoa/WebProcessCocoa.mm:
       (WebKit::WebProcess::platformInitializeWebProcess):
 Consume the cookie storage extension

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

6 years ago[iOS WK2] Turn off scrollsToTop on overflow UIScrollViews
simon.fraser@apple.com [Mon, 30 Jun 2014 22:50:59 +0000 (22:50 +0000)]
[iOS WK2] Turn off scrollsToTop on overflow UIScrollViews
https://bugs.webkit.org/show_bug.cgi?id=134456

Reviewed by Tim Horton.

Set scrollsToTop to NO on our UIScrollViews created for overflow scrolling, since
we don't have a good strategy for when to allow it, and doing so would also require
some smarts in the main UIScrollView.

* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):

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

6 years agoREGRESSION (Okemo): The contextual menu on tap and hold does not cancel the other...
enrica@apple.com [Mon, 30 Jun 2014 22:50:28 +0000 (22:50 +0000)]
REGRESSION (Okemo): The contextual menu on tap and hold does not cancel the other gestures.
https://bugs.webkit.org/show_bug.cgi?id=134463
<rdar://problem/17388907>

Reviewed by Benjamin Poulain.

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

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

6 years agoReduce dynamic memory allocation in css jit.
achristensen@apple.com [Mon, 30 Jun 2014 22:48:47 +0000 (22:48 +0000)]
Reduce dynamic memory allocation in css jit.
https://bugs.webkit.org/show_bug.cgi?id=134416

Reviewed by Benjamin Poulain.

Source/WebCore:
* cssjit/FunctionCall.h:
(WebCore::FunctionCall::FunctionCall):
(WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
* cssjit/RegisterAllocator.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
Use inlineCapacity template parameter to reduce malloc calls.
I use 16 and 32 as the inline capacity for non-register related vectors because that
is probably big enough for the selector compiler, and if it is not then a malloc
call will not be significant because the selector is very complex.
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
Pass a vector of stack references to match calls to pop and to avoid a call to appendVector.

Source/WTF:
* wtf/Deque.h:
Added inlineCapacity optional template parameter.

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

6 years agoImplement the last pieces of encodeFrameStateNode
andersca@apple.com [Mon, 30 Jun 2014 22:14:35 +0000 (22:14 +0000)]
Implement the last pieces of encodeFrameStateNode
https://bugs.webkit.org/show_bug.cgi?id=134460

Reviewed by Andreas Kling.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataEncoder::operator<<):
(WebKit::isValidEnum):
(WebKit::encodeFormDataElement):
(WebKit::encodeFormData):
(WebKit::encodeFrameStateNode):

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

6 years agojs/script-tests/function-apply-many-args.js fails on ARM
msaboff@apple.com [Mon, 30 Jun 2014 22:13:37 +0000 (22:13 +0000)]
js/script-tests/function-apply-many-args.js fails on ARM
https://bugs.webkit.org/show_bug.cgi?id=126588

Reviewed by Mark Lam.

Removed three test cases that fail on some platforms and pass on others due
to stack size.  Other test cases cover what will fit on a stack or what will
throw an out of stack exception.

* js/function-apply-many-args-expected.txt:
* js/script-tests/function-apply-many-args.js:

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

6 years agoAdd option to run-jsc-stress-testes to filter out tests that use large heaps
msaboff@apple.com [Mon, 30 Jun 2014 22:12:17 +0000 (22:12 +0000)]
Add option to run-jsc-stress-testes to filter out tests that use large heaps
https://bugs.webkit.org/show_bug.cgi?id=134458

Reviewed by Filip Pizlo.

Source/JavaScriptCore:
Added test to skip js1_5/Regress/regress-159334.js when testing on a memory limited device.

* tests/mozilla/mozilla-tests.yaml:

Tools:
Added new --memory-limited to filter out tests that have large heap usage.
Such tests are either tagged with //@largeHeap or logic is added to their .yaml file.

* Scripts/run-jsc-stress-tests:

LayoutTests:
* js/regress/script-tests/lots-of-fields.js: Added //@largeHeap tag to skip when
running on a memoryLimited device.

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

6 years ago[iOS][WK2] Move tap highlight to the inverseScaleRootView
benjamin@webkit.org [Mon, 30 Jun 2014 22:10:56 +0000 (22:10 +0000)]
[iOS][WK2] Move tap highlight to the inverseScaleRootView
https://bugs.webkit.org/show_bug.cgi?id=134424
<rdar://problem/17480880>

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

Enrica introduced the inverseScaleRootView that is a dynamic version of _highlightRootView.

This patch moves the tap highlight from its own inverse root to inverseScaleRootView. This provides better handling
of scale, better behavior on crash, and remove one extra view from the hierarchy.

The code is pretty much the same, just moved around. Some of the changes:

Now the code needs to handle repainting live when the view scale. To do that, _showTapHighlightXXX was split in two:
-_showTapHighlight to setup the view.
-_updateTapHighlight to update the view based on the current scale.

Since the view updates live on scaling, we need to recompute the coordinates for each update. To do that, the _potentialTapHighlightInformation
was generalized to handle all cases of highlight.

Since we can no longer test for the nullity of _potentialTapHighlightInformation,
a new attribute is introduced for that: _hasTapHighlightForPotentialTap.

The last bit of change concern reentering the tap highlight. This becomes quite simple:
1) _isTapHighlightIDValid is updated before the animation starts
   so that it can be set again during an animation.
2) The animation checks the "finished" flags before removing the view from its superview
   to avoid breaking the new animation.

* UIProcess/API/Cocoa/WKWebView.mm:
(withinEpsilon): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
Make _updateUnscaledView conditional to scale changes, that thing isn't cheap!

* UIProcess/ios/WKContentViewInteraction.h:
(withinEpsilon):
Move withinEpsilon() from WKContentView to use it from both classes.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView _updateUnscaledView]):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
(-[WKContentView _cancelInteraction]):
(-[WKContentView _finishInteraction]):
(-[WKContentView _singleTapDidReset:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _showTapHighlightWithColor:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]): Deleted.

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

6 years agoAdd code for encoding legacy session history entries
andersca@apple.com [Mon, 30 Jun 2014 21:53:58 +0000 (21:53 +0000)]
Add code for encoding legacy session history entries
https://bugs.webkit.org/show_bug.cgi?id=134452

Reviewed by Andreas Kling.

Source/WebKit2:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataEncoder::HistoryEntryDataEncoder):
(WebKit::HistoryEntryDataEncoder::operator<<):
(WebKit::HistoryEntryDataEncoder::finishEncoding):
(WebKit::HistoryEntryDataEncoder::encodeArithmeticType):
(WebKit::HistoryEntryDataEncoder::encodeFixedLengthData):
(WebKit::HistoryEntryDataEncoder::grow):
(WebKit::HistoryEntryDataEncoder::growCapacity):
(WebKit::encodeFrameStateNode):
(WebKit::encodeLegacySessionHistoryEntryData):
(WebKit::decodeSessionHistoryEntryData):
(WebKit::decodeLegacySessionHistoryEntryData):
* UIProcess/mac/LegacySessionStateCoding.h:

Source/WTF:
* wtf/MallocPtr.h:
(WTF::MallocPtr::malloc):
(WTF::MallocPtr::realloc):

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

6 years agoUse non-thumb registers in armv7 css jit.
achristensen@apple.com [Mon, 30 Jun 2014 21:25:33 +0000 (21:25 +0000)]
Use non-thumb registers in armv7 css jit.
https://bugs.webkit.org/show_bug.cgi?id=134450

Reviewed by Geoff Garen.

* cssjit/RegisterAllocator.h:
(WebCore::RegisterAllocator::isValidRegister):
(WebCore::RegisterAllocator::isCallerSavedRegister):
Use additional general purpose registers.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
Always succeed when compiling css selectors.

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

6 years agoTiles on bottom of screen are not always allocated when necessary
mmaxfield@apple.com [Mon, 30 Jun 2014 21:21:29 +0000 (21:21 +0000)]
Tiles on bottom of screen are not always allocated when necessary
https://bugs.webkit.org/show_bug.cgi?id=134272

Reviewed by Simon Fraser.

Source/WebCore:
The initial visibleRect is in the coordinate of the root layer, so its origin
is at the top left of the view. The initial rect we were using doesn't
include the contents inset, so it was too short, which was causing tiles near
the bottom of the screen to not always be allocated if the tile threshold was
close to the bottom of the view. Instead, we want to include the contents
inset size so the visible rect includes the entire view.
GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
the visible rect into the tiled layer's coordinate system, at which point it
is used for visible tile logic.

Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html

* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::update):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

LayoutTests:
Apply a content inset, then dump visible rects.

* platform/mac-wk2/tiled-drawing/visible-rect-content-inset-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html: Added.
* compositing/visible-rect/iframe-no-layers.html: For WK2, the size of the visibleRect
includes the size of the border of the iframe. In order to elliminate platform
differences, set this border to 0.

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

6 years agoDRT in iOS sim crashes while loading fonts
mmaxfield@apple.com [Mon, 30 Jun 2014 20:57:18 +0000 (20:57 +0000)]
DRT in iOS sim crashes while loading fonts
https://bugs.webkit.org/show_bug.cgi?id=134451

Reviewed by Geoffrey Garen.

The magic linker symbols had the same name, and were therefore being unified
to a single font file. Then, adding the same file twice was failing.

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

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

6 years ago[Win] Unreviewed project gardening.
bfulgham@apple.com [Mon, 30 Jun 2014 19:01:49 +0000 (19:01 +0000)]
[Win] Unreviewed project gardening.

* WebCore.vcxproj/WebCore.vcxproj: Clean up path information so
files appear in appropriate places in project view.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

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

6 years agoAvoid copying closed variables vector; actually use move semantics
dbates@webkit.org [Mon, 30 Jun 2014 18:48:56 +0000 (18:48 +0000)]
Avoid copying closed variables vector; actually use move semantics

Rubber-stamped by Oliver Hunt.

Currently we always copy the closed variables vector passed by Parser::closedVariables()
to ProgramNode::setClosedVariables() because these member functions return and take a const
rvalue reference, respectively. Instead, these member functions should take an return a non-
constant rvalue reference so that we actually move the closed variables vector from the Parser
object to the Node object.

* parser/Nodes.cpp:
(JSC::ProgramNode::setClosedVariables): Remove const qualifier for argument.
* parser/Nodes.h:
(JSC::ScopeNode::setClosedVariables): Ditto.
* parser/Parser.h:
(JSC::Parser::closedVariables): Remove const qualifier on return type.
(JSC::parse): Remove extraneous call to std::move(). Calling std::move() is unnecessary here
because Parser::closedVariables() returns an rvalue reference.

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

6 years agoReduce memory required for js/typedarray-zero-size.js
msaboff@apple.com [Mon, 30 Jun 2014 18:22:25 +0000 (18:22 +0000)]
Reduce memory required for js/typedarray-zero-size.js
https://bugs.webkit.org/show_bug.cgi?id=134448

Reviewed by Mark Hahnenberg.

Reduce the loop count from 10000 to 4000 to further reduce memory requirements
on older devices.

* js/script-tests/typedarray-zero-size.js:

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

6 years agoRemove redundant repaintCompositedLayers() parameter and its dependencies.
zalan@apple.com [Mon, 30 Jun 2014 18:06:56 +0000 (18:06 +0000)]
Remove redundant repaintCompositedLayers() parameter and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=134431

Reviewed by Darin Adler.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::convertToPixelSnappedLayerCoords): Deleted.
(WebCore::RenderLayer::convertToLayerCoords): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::repaintCompositedLayers):
(WebCore::RenderLayerCompositor::recursiveRepaintLayer):
* rendering/RenderLayerCompositor.h:

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

6 years agoJSContext Inspection: Provide a way to use a non-Main RunLoop for Inspector JavaScrip...
joepeck@webkit.org [Mon, 30 Jun 2014 17:57:39 +0000 (17:57 +0000)]
JSContext Inspection: Provide a way to use a non-Main RunLoop for Inspector JavaScript Evaluations
https://bugs.webkit.org/show_bug.cgi?id=134371

Reviewed by Timothy Hatcher.

* API/JSContextPrivate.h:
* API/JSContext.mm:
(-[JSContext _debuggerRunLoop]):
(-[JSContext _setDebuggerRunLoop:]):
Private API for setting the CFRunLoop for a debugger to evaluate in.

* API/JSContextRefInternal.h: Added.
* API/JSContextRef.cpp:
(JSGlobalContextGetDebuggerRunLoop):
(JSGlobalContextSetDebuggerRunLoop):
Internal API for setting a CFRunLoop on a JSContextRef.
Set this on the debuggable.

* inspector/remote/RemoteInspectorDebuggable.h:
* inspector/remote/RemoteInspectorDebuggableConnection.h:
(Inspector::RemoteInspectorBlock::RemoteInspectorBlock):
(Inspector::RemoteInspectorBlock::~RemoteInspectorBlock):
(Inspector::RemoteInspectorBlock::operator=):
(Inspector::RemoteInspectorBlock::operator()):
Moved into the header.

* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::inspectorDebuggable):
Lets store the RunLoop on the debuggable instead of this core
platform agnostic class, so expose the debuggable.

* inspector/remote/RemoteInspectorDebuggableConnection.mm:
(Inspector::RemoteInspectorHandleRunSourceGlobal):
(Inspector::RemoteInspectorQueueTaskOnGlobalQueue):
(Inspector::RemoteInspectorInitializeGlobalQueue):
Rename the global functions for clarity.

(Inspector::RemoteInspectorHandleRunSourceWithInfo):
Handler for private run loops.

(Inspector::RemoteInspectorDebuggableConnection::RemoteInspectorDebuggableConnection):
(Inspector::RemoteInspectorDebuggableConnection::~RemoteInspectorDebuggableConnection):
(Inspector::RemoteInspectorDebuggableConnection::dispatchAsyncOnDebuggable):
(Inspector::RemoteInspectorDebuggableConnection::setupRunLoop):
(Inspector::RemoteInspectorDebuggableConnection::teardownRunLoop):
(Inspector::RemoteInspectorDebuggableConnection::queueTaskOnPrivateRunLoop):
Setup and teardown and use private run loop sources if the debuggable needs it.

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

6 years agoReduce memory required for js/typedarray-zero-size.js
msaboff@apple.com [Mon, 30 Jun 2014 17:37:06 +0000 (17:37 +0000)]
Reduce memory required for js/typedarray-zero-size.js
https://bugs.webkit.org/show_bug.cgi?id=134448

Reviewed by Darin Adler.

Making the loop count down reduces memory usage from ~190MB to ~22MB while
still testing the original issue.

* js/script-tests/typedarray-zero-size.js:

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

6 years agoRemove webkit prefix from pointer lock.
commit-queue@webkit.org [Mon, 30 Jun 2014 16:59:24 +0000 (16:59 +0000)]
Remove webkit prefix from pointer lock.
https://bugs.webkit.org/show_bug.cgi?id=134312

Patch by Alex Christensen <achristensen@webkit.org> on 2014-06-30
Reviewed by Dean Jackson.

* dom/Document.cpp:
(WebCore::Document::exitPointerLock):
(WebCore::Document::pointerLockElement):
(WebCore::Document::webkitExitPointerLock): Deleted.
(WebCore::Document::webkitPointerLockElement): Deleted.
* dom/Document.h:
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::requestPointerLock):
(WebCore::Element::webkitRequestPointerLock): Deleted.
* dom/Element.h:
* dom/Element.idl:
* dom/EventNames.h:
* dom/MouseEvent.idl:
* dom/MouseRelatedEvent.h:
(WebCore::MouseRelatedEvent::movementX):
(WebCore::MouseRelatedEvent::movementY):
(WebCore::MouseRelatedEvent::webkitMovementX): Deleted.
(WebCore::MouseRelatedEvent::webkitMovementY): Deleted.
* page/PointerLockController.cpp:
(WebCore::PointerLockController::PointerLockController):
Initialize all data members.
(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::didAcquirePointerLock):
(WebCore::PointerLockController::didNotAcquirePointerLock):
(WebCore::PointerLockController::didLosePointerLock):

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

6 years agoU16_IS_SURROGATE should not be called with a UChar32
mmaxfield@apple.com [Mon, 30 Jun 2014 15:13:25 +0000 (15:13 +0000)]
U16_IS_SURROGATE should not be called with a UChar32
https://bugs.webkit.org/show_bug.cgi?id=134440

Reviewed by Darin Adler.

No new tests because there is no behavior change.

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::advanceByCombiningCharacterSequence):

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

6 years agoAdd missing ENABLE(DFG_JIT) guards
commit-queue@webkit.org [Mon, 30 Jun 2014 14:48:16 +0000 (14:48 +0000)]
Add missing ENABLE(DFG_JIT) guards
https://bugs.webkit.org/show_bug.cgi?id=134444

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-06-30
Reviewed by Darin Adler.

* dfg/DFGFunctionWhitelist.cpp:
* dfg/DFGFunctionWhitelist.h:

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

6 years agoRemove Qt cruft from webkitpy
commit-queue@webkit.org [Mon, 30 Jun 2014 14:45:51 +0000 (14:45 +0000)]
Remove Qt cruft from webkitpy
https://bugs.webkit.org/show_bug.cgi?id=134445

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-06-30
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(QtPort): Deleted.
(QtPort.build_webkit_command): Deleted.
(QtPort.run_webkit_tests_command): Deleted.
(QtWK2Port): Deleted.
(QtWK2Port.build_webkit_command): Deleted.
(QtWK2Port.run_webkit_tests_command): Deleted.
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest): Deleted.
(DeprecatedPortTest.test_qt_port): Deleted.
(DeprecatedPortTest.test_qt_wk2_port): Deleted.

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

6 years ago[EFL] Remove m_evasObject from Widget
ryuan.choi@samsung.com [Mon, 30 Jun 2014 08:46:01 +0000 (08:46 +0000)]
[EFL] Remove m_evasObject from Widget
https://bugs.webkit.org/show_bug.cgi?id=134442

Reviewed by Gyuyoung Kim.

Since WebKit1/EFL was dropped, we don't need to keep the m_evasObject
in the Widget.cpp because it's not used for WebKit2/Efl.

* platform/Widget.h:
(WebCore::Widget::evasObject): Deleted.
* platform/efl/ScrollbarEfl.cpp:
Removed WebKit1/Efl specific code which uses m_evasObject.
It will be a dummy until WebKit2/Efl support proper scrollbar implementation.
(WebCore::ScrollbarEfl::ScrollbarEfl):
(WebCore::ScrollbarEfl::~ScrollbarEfl):
(WebCore::ScrollbarEfl::setParent):
(WebCore::ScrollbarEfl::frameRectsChanged):
(WebCore::ScrollbarEfl::invalidate):
(ScrollbarEfl::ScrollbarEfl): Deleted.
(ScrollbarEfl::~ScrollbarEfl): Deleted.
(scrollbarEflEdjeMessage): Deleted.
(ScrollbarEfl::setParent): Deleted.
(ScrollbarEfl::updateThumbPosition): Deleted.
(ScrollbarEfl::updateThumbProportion): Deleted.
(ScrollbarEfl::updateThumbPositionAndProportion): Deleted.
(ScrollbarEfl::frameRectsChanged): Deleted.
(ScrollbarEfl::invalidate): Deleted.
* platform/efl/ScrollbarEfl.h:
Removed unnecessary methods. In addition, applied final, override keyword.
(WebCore::ScrollbarEfl::handleMouseMoveEvent): Deleted.
(WebCore::ScrollbarEfl::handleMouseOutEvent): Deleted.
(WebCore::ScrollbarEfl::handleMousePressEvent): Deleted.
(WebCore::ScrollbarEfl::handleMouseReleaseEvent): Deleted.
* platform/efl/WidgetEfl.cpp:
(WebCore::Widget::Widget):
(WebCore::Widget::setEvasObject): Deleted.

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

6 years agoFix deprecated warning with bison 3
commit-queue@webkit.org [Mon, 30 Jun 2014 08:35:06 +0000 (08:35 +0000)]
Fix deprecated warning with bison 3
https://bugs.webkit.org/show_bug.cgi?id=133791

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-06-30
Reviewed by Csaba Osztrogonác.

No new tests because no functional changes.

* css/CSSGrammar.y.in:
* xml/XPathGrammar.y:

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

6 years agoRemove HarfBuzzShaper::setDrawRange()
ljaehun.lim@samsung.com [Mon, 30 Jun 2014 08:32:19 +0000 (08:32 +0000)]
Remove HarfBuzzShaper::setDrawRange()
https://bugs.webkit.org/show_bug.cgi?id=134243

Reviewed by Gyuyoung Kim.

setDrawRange() is not used anywhere. Remove it.
And m_fromIndex and m_toIndex are changed by only setDrawRange().
So remove them too and use the default values instead of them.

No new tests, no behavior changes.

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzShaper):
(WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun):
    currentCharacterIndex is unsigned, always greater than 0. Clean up if statements.
(WebCore::HarfBuzzShaper::setDrawRange): Deleted.
* platform/graphics/harfbuzz/HarfBuzzShaper.h:

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

6 years agoCreate NSURLRequest lazily when USE(CFNETWORK) is enabled
psolanki@apple.com [Mon, 30 Jun 2014 06:36:13 +0000 (06:36 +0000)]
Create NSURLRequest lazily when USE(CFNETWORK) is enabled
https://bugs.webkit.org/show_bug.cgi?id=134441

Reviewed by Sam Weinig.

No new tests. Should be covered by exsting tests.

* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::nsURLRequest):

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

6 years ago[EFL] Remove netscape plugin implementation from WebCore
ryuan.choi@samsung.com [Mon, 30 Jun 2014 04:43:29 +0000 (04:43 +0000)]
[EFL] Remove netscape plugin implementation from WebCore
https://bugs.webkit.org/show_bug.cgi?id=134438

Reviewed by Gyuyoung Kim.

Because WebKit1/Efl was dropped, PluginPackageEfl.cpp and PluginViewEfl.cpp are not necessary.

* PlatformEfl.cmake:
* plugins/efl/PluginPackageEfl.cpp: Removed.
* plugins/efl/PluginViewEfl.cpp: Removed.
* plugins/x11/PluginViewX11.cpp: Removed.
This file is to share common code between WebKit1/Efl and WebKit1/GTk.
Now, both ports are dropped WebKit1 support and the GTK port already removed the related files at r167016.

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