WebKit-https.git
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

6 years agoAdd support for HTMLImageElement's sizes attribute
yoav@yoav.ws [Mon, 30 Jun 2014 04:07:08 +0000 (04:07 +0000)]
Add support for HTMLImageElement's sizes attribute
https://bugs.webkit.org/show_bug.cgi?id=133620

Reviewed by Dean Jackson.

.:
Added an ENABLE_PICTURE_SIZES compile flag.

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:
Added an ENABLE_PICTURE_SIZES compile flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
Tests: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
       fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
       fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html
       fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html
       http/tests/loading/sizes/preload-image-sizes-2x.html
       http/tests/loading/sizes/preload-image-sizes.html

This patch adds support for HTMLImageElement's sizes attribute and the
related srcset extended syntax as defined in
http://picture.responsiveimages.org/.
This sizes attribute syntax is added to the CSSGrammar and parsed by
the CSSParser.
The SourceSizeList class is generated by the parser, and used to get
the final source size.
HTMLImageElement and HTMLPreloadScanner send this value to
HTMLSrcsetParser.
HTMLSrcsetParser uses this value in order to pick the right resource.

* CMakeLists.txt: Added css/SourceSizeList.cpp.
* Configurations/FeatureDefines.xcconfig: Added the PICTURE_SIZES flag.
* WebCore.vcxproj/WebCore.vcxproj: Added css/SourceSizeList.*.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added css/SourceSizeList.*.
* WebCore.xcodeproj/project.pbxproj: Added css/SourceSizeList.*.
* css/CSSGrammar.y.in: Added 4 grammar rules that define a Media condition,
Source size list, Source size length and source size.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseSizesAttribute): Parse the sizes attribute.
(WebCore::CSSParser::detectAtToken): Set the token to SIZESATTR.
* css/CSSParser.h:
* css/SourceSizeList.cpp: Added. Defined the SourceSize and SourceSizeList classes.
(WebCore::SourceSize::match):
(WebCore::computeLength):
(WebCore::defaultValue):
(WebCore::SourceSize::length):
(WebCore::SourceSizeList::parseSizesAttribute):
(WebCore::SourceSizeList::getEffectiveSize):
* css/SourceSizeList.h: Added.
(WebCore::SourceSize::SourceSize):
(WebCore::SourceSizeList::append):
* html/HTMLImageElement.cpp: Integrated sizes attribute parsing and added currentSrc.
(WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::currentSrc):
* html/HTMLImageElement.h:
* html/HTMLImageElement.idl:
* html/parser/HTMLDocumentParser.cpp: Added information required for sizes parsing to
HTMLPreloadScanner calls.
(WebCore::HTMLDocumentParser::pumpTokenizer):
(WebCore::HTMLDocumentParser::insert):
(WebCore::HTMLDocumentParser::append):
(WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
* html/parser/HTMLPreloadScanner.cpp: Integrated sizes attribute parsing.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
(WebCore::TokenPreloadScanner::scan):
(WebCore::HTMLPreloadScanner::scan):
* html/parser/HTMLPreloadScanner.h:
* html/parser/HTMLSrcsetParser.cpp: Added 'w' descriptor parsing sizes based normalization.
(WebCore::parseDescriptors):
(WebCore::pickBestImageCandidate):
(WebCore::bestFitSourceForImageAttributes):
* html/parser/HTMLSrcsetParser.h:

Source/WebKit/mac:
Added an ENABLE_PICTURE_SIZES compile flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
Added an ENABLE_PICTURE_SIZES compile flag.

* Configurations/FeatureDefines.xcconfig:

Tools:
Added an ENABLE_PICTURE_SIZES compile flag.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:
These layout tests check that the sizes attribute and the related
srcset syntax are well supported, that the right resource is displayed,
that the currentSrc attribute is well supported and also that the right
resource is preloaded.

* fast/dom/HTMLImageElement/resources/currentSrcHelper.js: Added.
(fileName):
(currentSrcFileName):
* fast/dom/HTMLImageElement/resources/image-set-4x.png: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-1x-expected.txt: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-1x.html: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-2x-expected.txt: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-2x.html: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-js-change-expected.txt: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml-expected.txt: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html: Added.
* http/tests/loading/sizes/preload-image-sizes-2x-expected.txt: Added.
* http/tests/loading/sizes/preload-image-sizes-2x.html: Added.
* http/tests/loading/sizes/preload-image-sizes-expected.txt: Added.
* http/tests/loading/sizes/preload-image-sizes.html: Added.

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

6 years agoNo need to lazily initialize ResourceResponse internals when accessing timing data.
akling@apple.com [Sun, 29 Jun 2014 21:51:00 +0000 (21:51 +0000)]
No need to lazily initialize ResourceResponse internals when accessing timing data.
<https://webkit.org/b/134437>
<rdar://problem/17499876>

When building with ENABLE(WEB_TIMING), the last thing that would happen when
serializing a ResourceResponse in the network process is that we'd retrieve
the ResourceLoadTiming to encode it as part of the response. Doing so would
trigger the lazy instantiation of ResourceResponse's internal data structures.

Since timing data is not actually lazily instantiated, we can just not do that.

This shaves off ~550ms of network process main thread time on PLT, reducing
response latency by not doing unnecessary stuff before letting the web process
look at the downloaded data.

Reviewed by Gavin Barraclough.

* WebCore.exp.in:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::resourceLoadTiming): Deleted.
(WebCore::ResourceResponseBase::setResourceLoadTiming): Deleted.
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::resourceLoadTiming):

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

6 years agoRefactor ResourceRequest into Cocoa and iOS specific files
psolanki@apple.com [Sun, 29 Jun 2014 20:59:03 +0000 (20:59 +0000)]
Refactor ResourceRequest into Cocoa and iOS specific files
https://bugs.webkit.org/show_bug.cgi?id=134430

Reviewed by Andreas Kling.

No new tests because no functional changes.

* WebCore.xcodeproj/project.pbxproj:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::applyWebArchiveHackForMail): Deleted.
* platform/network/cocoa/ResourceRequestCocoa.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
(WebCore::ResourceRequest::nsURLRequest):
(WebCore::ResourceRequest::cfURLRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdateResourceHTTPBody):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
(WebCore::ResourceRequest::applyWebArchiveHackForMail):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/ios/ResourceRequestIOS.mm: Added.
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::updateNSURLRequest):
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::initQuickLookResourceCachingQuirks):
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::updateNSURLRequest):
(WebCore::ResourceRequest::applyWebArchiveHackForMail):
(WebCore::ResourceRequest::nsURLRequest): Deleted.
(WebCore::ResourceRequest::cfURLRequest): Deleted.
(WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
(WebCore::ResourceRequest::doUpdateResourceHTTPBody): Deleted.
(WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody): Deleted.
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
(WebCore::ResourceRequest::setStorageSession): Deleted.

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

6 years agoTextCodecICU::encode turns the whole string as yen signs if there is any backslash...
commit-queue@webkit.org [Sun, 29 Jun 2014 17:10:27 +0000 (17:10 +0000)]
TextCodecICU::encode turns the whole string as yen signs if there is any backslash in it
https://bugs.webkit.org/show_bug.cgi?id=133678

Patch by Youenn Fablet <youenn.fablet@crf.canon.fr> on 2014-06-29
Reviewed by Alexey Proskuryakov.

Source/WebCore:
Test: fast/encoding/backslash-encoding-jp.html

* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::encode): fixed the copy of characters other than backslash.

LayoutTests:
* fast/encoding/backslash-encoding-jp-expected.txt: Added.
* fast/encoding/backslash-encoding-jp.html: Added.

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

6 years ago[iOS] Pinching into a video (fullscreen gesture) leaves page zoomed in
dino@apple.com [Sun, 29 Jun 2014 02:44:15 +0000 (02:44 +0000)]
[iOS] Pinching into a video (fullscreen gesture) leaves page zoomed in
https://bugs.webkit.org/show_bug.cgi?id=134433
<rdar://problem/16630794>

Reviewed by Eric Carlson.

Detect the number of target touches (those directly on the
video element) and disable the page zoom if it looks
like the user is trying to trigger fullscreen.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handleBaseGestureStart): If we are seeing
two touches in this video element, don't trigger fullscreen. The
exception is if we haven't yet started playback.
(ControllerIOS.prototype.handleBaseGestureChange): Don't allow fullscreen
if we haven't started playback (iOS 7 behaviour).
(ControllerIOS.prototype.handleWrapperTouchStart): Keep track of the
number of targetted touches.

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

6 years ago[iOS][WK2] PDFs never load inline again after the Web process crashes
timothy_horton@apple.com [Sat, 28 Jun 2014 22:39:31 +0000 (22:39 +0000)]
[iOS][WK2] PDFs never load inline again after the Web process crashes
https://bugs.webkit.org/show_bug.cgi?id=134432
<rdar://problem/17484205>

Reviewed by Dan Bernstein.

After a crash, the WebPage never gets mimeTypesWithCustomContentProviders filled back in.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Add mimeTypesWithCustomContentProviders to WebPageCreationParameters.

* UIProcess/Cocoa/WKWebViewContentProviderRegistry.h:
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
(-[WKWebViewContentProviderRegistry addPage:]):
We don't need to send the MIME types across when a page is added, because it already got them in its creation parameters.

(-[WKWebViewContentProviderRegistry removePage:]):
(-[WKWebViewContentProviderRegistry _mimeTypesWithCustomContentProviders]):
Return a vector of all registered MIME types.

* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::mimeTypesWithCustomContentProviders):
* UIProcess/PageClient.h:
Add (iOS only for now) mimeTypesWithCustomContentProviders to PageClient.

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

6 years agoREGRESSION: WebPageProxy::attributedSubstringForCharacterRangeAsync never calls its...
mitz@apple.com [Sat, 28 Jun 2014 22:31:26 +0000 (22:31 +0000)]
REGRESSION: WebPageProxy::attributedSubstringForCharacterRangeAsync never calls its callback function
https://bugs.webkit.org/show_bug.cgi?id=134429

Reviewed by Tim Horton.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):

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

6 years ago[iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
simon.fraser@apple.com [Sat, 28 Jun 2014 14:50:39 +0000 (14:50 +0000)]
[iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
https://bugs.webkit.org/show_bug.cgi?id=134426
<rdar://problem/17474523>

Reviewed by Tim Horton.

After committing a new layer tree (with possibly stale position:fixed layer
positions), we need the scrolling tree to update those positions based on
the current scroll offset.

Source/WebCore:
Give ScrollingTreeScrollingNode an implementation of updateLayersAfterAncestorChange()
which is required to update fixed/sticky child nodes.

* WebCore.exp.in:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::updateLayersAfterAncestorChange):
* page/scrolling/ScrollingTreeScrollingNode.h:

Source/WebKit2:
To achieve that, implement ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterAncestorChange()
and have it add to the cumulative delta the difference between the last committed scroll
position and the current scroll position.

Also make sure that ScrollingTreeOverflowScrollingNodeIOS doesn't call back to scrollViewDidScroll()
when we're updating its scroll position inside a scrolling tree commit.

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

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

6 years ago[GTK] Use public getter/setter in GObject DOM bindings properties implementation.
commit-queue@webkit.org [Sat, 28 Jun 2014 09:06:09 +0000 (09:06 +0000)]
[GTK] Use public getter/setter in GObject DOM bindings properties implementation.
https://bugs.webkit.org/show_bug.cgi?id=134390.

Patch by Juan A. Suarez Romero  <jasuarez@igalia.com>  and  Carlos Garcia Campos <cgarcia@igalia.com> on 2014-06-28
Reviewed by Carlos Garcia Campos.

The current GObject DOM bindings generator is duplicating code when
implementing the get/set_property methods and the public
getters/setters, instead of making one invoking the other.

This commit changes this behaviour so the code is not duplicated,
making it easier to maintain.

No new tests needed.

* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperty):
(GenerateProperties):
(WriteData):
(GetCoreObject): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
(webkit_dom_test_active_dom_object_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
(webkit_dom_test_event_constructor_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
(webkit_dom_test_exception_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(webkit_dom_test_interface_set_property):
(webkit_dom_test_interface_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
(webkit_dom_test_nondeterministic_set_property):
(webkit_dom_test_nondeterministic_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_set_property):
(webkit_dom_test_obj_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(webkit_dom_test_serialized_script_value_interface_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
(webkit_dom_test_typedefs_set_property):
(webkit_dom_test_typedefs_get_property):
* bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
(webkit_dom_test_exception_get_property):
(webkit_dom_attribute_get_property):

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

6 years ago[New Multicolumn] Elements with rounded corners and overflow:hidden do not properly...
stavila@adobe.com [Sat, 28 Jun 2014 08:44:54 +0000 (08:44 +0000)]
[New Multicolumn] Elements with rounded corners and overflow:hidden do not properly clip their content
https://bugs.webkit.org/show_bug.cgi?id=133941

Reviewed by Darin Adler.

Source/WebCore:
When having a multicol element inside an element with overflow:hidden and border-radius,
the fragments representing the columns need to have the border radius set also, to ensure
proper clipping.

Test: fast/multicol/newmulticol/multicol-clip-rounded-corners.html

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

LayoutTests:
Added test for multicol element inside an element with overflow:hidden and border radius.

* fast/multicol/newmulticol/multicol-clip-rounded-corners-expected.html: Added.
* fast/multicol/newmulticol/multicol-clip-rounded-corners.html: Added.

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

6 years agocheck-webkit-style should check the order of #imports as well as #includes
timothy_horton@apple.com [Sat, 28 Jun 2014 05:51:13 +0000 (05:51 +0000)]
check-webkit-style should check the order of #imports as well as #includes
https://bugs.webkit.org/show_bug.cgi?id=134428

Reviewed by Dan Bernstein.

* Scripts/webkitpy/style/checkers/cpp.py:
Allow "import" in addition to "include", so that the sort order of headers in ObjC files is checked.

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

6 years agoSubpixel rendering: Background clipping with subpixel behaves differently when compos...
zalan@apple.com [Sat, 28 Jun 2014 01:34:27 +0000 (01:34 +0000)]
Subpixel rendering: Background clipping with subpixel behaves differently when composited.
https://bugs.webkit.org/show_bug.cgi?id=134422

Reviewed by Simon Fraser.

Adjust cliprect with the subpixel offset from the graphics layer the same way we do it for painting.
It ensures that cliprect starts from the right position when graphics layer is not on the same
coordinates as the associated render layer.

Source/WebCore:
Test: compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::applyFilters):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
(WebCore::RenderLayer::paintOverflowControlsForFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:

LayoutTests:
* compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping-expected.html: Added.
* compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping.html: Added.

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

6 years ago[Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
bfulgham@apple.com [Sat, 28 Jun 2014 00:19:41 +0000 (00:19 +0000)]
[Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
https://bugs.webkit.org/show_bug.cgi?id=134418

Reviewed by Eric Carlson.

../WebCore:
Land an initial implementation of AVFOUNDATION_LOADER_DELEGATE for
Windows.

* DerivedSources.cpp: Add new IDL files
* DerivedSources.make: Add check for AVFOUNDATION_LOADER_DELEGATE.
* Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Added (ported from
Objective C.)
* WebCore.vcxproj/WebCore.vcxproj: Update for new files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.vcxproj/WebCoreCommon.props: Add new search paths.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj: Update for new files.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
Moved from MediaPlayerPrivateAVFoundationObjC.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
Update for new API calls.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: Added.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Added.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Updated for new AVFOUNDATION_LOADER_DELEGATE methods.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Added.
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h: Added.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
Remove method that was moved to base class.

../WebKit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add new
export.

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

6 years agoRemove BufferForAppendingHyphen
benjamin@webkit.org [Fri, 27 Jun 2014 23:32:51 +0000 (23:32 +0000)]
Remove BufferForAppendingHyphen
https://bugs.webkit.org/show_bug.cgi?id=134376

Reviewed by Darin Adler.

It is legacy, from a time when that code was using a Vector.

The problem is that StringBuilder's memory was also implicitly used to keep
the string alive for the lifespan of the TextRun. That seems quite dangerous
as changes in StringBuilder could have changed that.

To fix the lifetime issue, my first idea was to make it explicit by passing
a String reference to hold the memory alive, and a boolean to say if the text
need an hyphen. The problem with that is this code is very hot and I made things
worse.

The solution with this patch is to just pass a pointer to a String to do both
the buffer reference, and the decision to add the hyphen. Having a single
argument with 2 meanings is not pretty but that's not worse than the old buffer.

* editing/TextIterator.cpp:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::constructTextRun):
(WebCore::adjustCharactersAndLengthForHyphen): Deleted.
* rendering/InlineTextBox.h:
(WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen): Deleted.
* rendering/RenderText.cpp:

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

6 years agoLazily link frameworks in WebVideoFullscreenInterfaceAVKit.
commit-queue@webkit.org [Fri, 27 Jun 2014 23:28:35 +0000 (23:28 +0000)]
Lazily link frameworks in WebVideoFullscreenInterfaceAVKit.
https://bugs.webkit.org/show_bug.cgi?id=134407

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-06-27
Reviewed by Eric Carlson.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController init]):
Load AVPlayerController on use.
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
Remove loading on construction.
(WebVideoFullscreenInterfaceAVKit::setCurrentTime): Load AVValueTiming on use.
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): Load several classes on use.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): Load UIColor on use.

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

6 years agoRemove extra operations from 64-bit or on armv7.
commit-queue@webkit.org [Fri, 27 Jun 2014 22:29:24 +0000 (22:29 +0000)]
Remove extra operations from 64-bit or on armv7.
https://bugs.webkit.org/show_bug.cgi?id=134408

Patch by Alex Christensen <achristensen@webkit.org> on 2014-06-27
Reviewed by Geoffrey Garen.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
Only do or operations if it would change values.
Often we're only setting one flag, so half the operations are not necessary.

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