WebKit-https.git
5 years agoREGRESSION(160908): vube.com video won't play after going into and out of fullscreen
antti@apple.com [Wed, 2 Jul 2014 20:22:04 +0000 (20:22 +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.

* fullscreen/full-screen-plugin-expected.txt: Added.
* fullscreen/full-screen-plugin.html: Added.

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

5 years agoUse legacy state coding directly in WKWebView
andersca@apple.com [Wed, 2 Jul 2014 20:19:06 +0000 (20:19 +0000)]
Use legacy state coding directly in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=134553

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKPage.cpp:
(WKPageRestoreFromSessionState):
* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateCreateFromData):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionStateData]):
(-[WKWebView _sessionState]):
(-[WKWebView _restoreFromSessionStateData:]):
(-[WKWebView _restoreFromSessionState:]):
(releaseNSData): Deleted.
* UIProcess/LegacySessionStateCoding.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::restoreFromState): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeLegacySessionState):

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

5 years agoUnreviewed. Moved self to reviewers list.
achristensen@apple.com [Wed, 2 Jul 2014 19:55:22 +0000 (19:55 +0000)]
Unreviewed.  Moved self to reviewers list.

* Scripts/webkitpy/common/config/contributors.json:
Moved self to reviewers list, added WebGL to expertise.

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

5 years agoWebCore JIT: rename registerCount to something less generic and add new types for...
benjamin@webkit.org [Wed, 2 Jul 2014 19:48:16 +0000 (19:48 +0000)]
WebCore JIT: rename registerCount to something less generic and add new types for lists of registers and lists of stack references
https://bugs.webkit.org/show_bug.cgi?id=134552

Reviewed by Alex Christensen.

Little cleanup:
-The name registerCount was a little too generic. Rename that to "maximumRegisterCount" to avoid confusion.
-Add a new type RegisterVector for any vector holding registers. This is just to avoid repeating the inline
 size everywhere, no functional change.
-Same idea for the stack: welcome StackReferenceVector!

* cssjit/FunctionCall.h:
(WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
Remove the appendVector here. It was unnecessarily cautious, StackAllocator already protect us
from mistakes.

* cssjit/RegisterAllocator.h:
(WebCore::RegisterAllocator::allocatedRegisters):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
Changing from the count of "calleeSavedRegisterCount" to "maximumRegisterCount" will cause
calleeSavedRegisterStackReferences to always overallocate.
The code generator is never on the heap, so that should not change anything.

* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
(WebCore::StackAllocator::pop):

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

5 years agoiOS build fix after http://trac.webkit.org/changeset/170697.
enrica@apple.com [Wed, 2 Jul 2014 19:40:52 +0000 (19:40 +0000)]
iOS build fix after trac.webkit.org/changeset/170697.

Unreviewed.

* wtf/Deque.h:

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

5 years agoSkip fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image...
dino@apple.com [Wed, 2 Jul 2014 18:30:03 +0000 (18:30 +0000)]
Skip fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html
on Mountain Lion. It doesn't support such large textures (or at least our
bots don't).

* platform/mac/TestExpectations:

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

5 years agoAdd -[WKWebView _sessionStateData] and -[WKWebView _restoreFromSessionStateData:]
andersca@apple.com [Wed, 2 Jul 2014 17:40:38 +0000 (17:40 +0000)]
Add -[WKWebView _sessionStateData] and -[WKWebView _restoreFromSessionStateData:]
https://bugs.webkit.org/show_bug.cgi?id=134549

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionState]):
(-[WKWebView _sessionStateData]):
(-[WKWebView _restoreFromSessionState:]):
(-[WKWebView _restoreFromSessionStateData:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

5 years agoRemove some code only needed for versions of Safari that are no longer supported
mitz@apple.com [Wed, 2 Jul 2014 17:33:32 +0000 (17:33 +0000)]
Remove some code only needed for versions of Safari that are no longer supported
https://bugs.webkit.org/show_bug.cgi?id=134537

Reviewed by Anders Carlsson.

Source/WebCore:
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLInputElement _rectOnScreen]): Deleted.
(-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): Deleted.
(-[DOMHTMLInputElement _selectedRange]): Deleted.
* bindings/objc/DOMPrivate.h:
* editing/EditorCommand.cpp:
(WebCore::createCommandMap):

Source/WebKit/mac:
* History/WebHistoryItem.mm:
* Misc/WebKitVersionChecks.h:
* WebCoreSupport/WebSecurityOrigin.mm:
(-[WebSecurityOrigin domain]): Deleted.
* WebInspector/WebInspector.mm:
(-[WebInspector showTimeline:]): Deleted.
(+[WebInspector webInspector]): Deleted.
(-[WebInspector setWebFrame:]): Deleted.
(-[WebInspector window]): Deleted.
(-[WebInspector showWindow:]): Deleted.
* WebView/WebFrame.mm:
(-[WebFrame reload]):
* WebView/WebPDFView.mm:
(-[WebPDFView menuForEvent:]):
(-[WebPDFView _anyPDFTagsFoundInMenu:]): Deleted.
* WebView/WebView.mm:
(-[WebView _initWithFrame:frameName:groupName:]):
(-[WebView _preferencesChanged:]):
(-[WebView initWithFrame:frameName:groupName:]):
(-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]): Deleted.
(+[WebView _setAlwaysUseATSU:]): Deleted.
(-[WebView _needsUnrestrictedGetMatchedCSSRules]): Deleted.
* WebView/WebViewPrivate.h:

Source/WTF:
* wtf/Assertions.cpp:
* wtf/Assertions.h:

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

5 years ago[GStreamer] MediaPlayerPrivateGStreamer.cpp fails to build when VIDEO_TRACK is enable...
carlosgc@webkit.org [Wed, 2 Jul 2014 16:02:55 +0000 (16:02 +0000)]
[GStreamer] MediaPlayerPrivateGStreamer.cpp fails to build when VIDEO_TRACK is enabled and using GSTREAMER_MPEGTS
https://bugs.webkit.org/show_bug.cgi?id=134548

Reviewed by Philippe Normand.

Include AtomicStringHash.h when ENABLE(VIDEO_TRACK) && USE(GSTREAMER_MPEGTS)
since it's used by HashMap<AtomicString, RefPtr<InbandMetadataTextTrackPrivateGStreamer>>

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

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

5 years ago[GTK] Unstable headers should include webkitdomdefines-unstable.h
carlosgc@webkit.org [Wed, 2 Jul 2014 15:24:31 +0000 (15:24 +0000)]
[GTK] Unstable headers should include webkitdomdefines-unstable.h
https://bugs.webkit.org/show_bug.cgi?id=134540

Reviewed by Martin Robinson.

Instead of the class header that can only be included from webkitdom.h.

* bindings/scripts/CodeGeneratorGObject.pm:
(WriteData):

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

5 years ago[GTK] WebKitVersion.h should be shared between UI and Web Process APIs
carlosgc@webkit.org [Wed, 2 Jul 2014 15:22:44 +0000 (15:22 +0000)]
[GTK] WebKitVersion.h should be shared between UI and Web Process APIs
https://bugs.webkit.org/show_bug.cgi?id=134538

Reviewed by Martin Robinson.

To be able to check current version from web extensions too.

* UIProcess/API/gtk/WebKitVersion.h.in: Allow to include WebKitVersion.h also from webkit-web-extension.h.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Include WebKitVersion.h.

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

5 years ago[GTK] Make dist only works when run from the source directory
carlosgc@webkit.org [Wed, 2 Jul 2014 15:13:33 +0000 (15:13 +0000)]
[GTK] Make dist only works when run from the source directory
https://bugs.webkit.org/show_bug.cgi?id=134543

Reviewed by Martin Robinson.

Since the paths in the manifest are relative to the source dir,
and the script expects the current working directory to be the
source directory, resolve all passed in relative paths while
parsing the arguments and then change the current working
directory.

* gtk/make-dist.py:

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

5 years ago[GTK] make dist is broken
carlosgc@webkit.org [Wed, 2 Jul 2014 15:11:41 +0000 (15:11 +0000)]
[GTK] make dist is broken
https://bugs.webkit.org/show_bug.cgi?id=134542

Reviewed by Martin Robinson.

.:
* Source/PlatformGTK.cmake: Remove ENABLE_WEBKIT check.

Tools:
* gtk/make-dist.py: Rename command line options to match what cmake uses.
* gtk/manifest.txt: Remove WebKit1 references and add WebKitDOM documentation.

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

5 years agoREGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html...
mario.prada@samsung.com [Wed, 2 Jul 2014 09:52:38 +0000 (09:52 +0000)]
REGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html and fast/forms/select-live-pseudo-selectors.html crash.
https://bugs.webkit.org/show_bug.cgi?id=134399

Reviewed by Chris Fleizach.

Source/WebCore:
Check that the value of optionIndex passed as a parameter is valid
before calling didUpdateActiveOption() over the item of the menu
list, to prevent crashes in platforms where renderers (and therefore
accessibility objects) might not be created for items at the time
of calling AccessibilityMenuList::didUpdateActiveOption().

* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption): Added check.

LayoutTests:
Removing Crash expectations for two layout tests.

* platform/gtk/TestExpectations: Updated.

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

5 years ago[GTK] WebKitWebView::create should receive information about the navigation action
carlosgc@webkit.org [Wed, 2 Jul 2014 07:19:46 +0000 (07:19 +0000)]
[GTK] WebKitWebView::create should receive information about the navigation action
https://bugs.webkit.org/show_bug.cgi?id=133680

Reviewed by Martin Robinson.

Source/WebKit2:
Add WebKitNavigationAction boxed type representing a navigation
action to be passed as parameter of WebKitWebView::create
signal. In the future it could be also for the
WebKitNavigationPolicyDecision class. The class contains
information about a navigation action like the navigation type,
the request, the mouse button and key modifiers and whether it was
started by a user gesture. This information is needed to be able
to implement a proper popup blocker. Since all that information is
not provided by the C API, we have switched the UI client to use a
custom client derived from API::UIClient. This also avoids a lot
of toAPI -> toImpl unneeded conversions.

* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/WebKitHitTestResult.cpp:
(webkitHitTestResultCreate): Use a WebHitTestResult::Data const
reference instead of a pointer to a WebHitTestResult.
(webkitHitTestResultCompare): Ditto.
* UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
* UIProcess/API/gtk/WebKitNavigationAction.cpp: Added.
(webkitNavigationActionCreate): Create a WebKitNavigationAction
for the given ResourceRequest and NavigationActionData.
(webkit_navigation_action_copy):
(webkit_navigation_action_free):
(webkit_navigation_action_get_navigation_type):
(webkit_navigation_action_get_mouse_button):
(webkit_navigation_action_get_modifiers):
(webkit_navigation_action_get_request):
(webkit_navigation_action_is_user_gesture):
* UIProcess/API/gtk/WebKitNavigationAction.h: Added.
* UIProcess/API/gtk/WebKitNavigationActionPrivate.h: Added.
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
* UIProcess/API/gtk/WebKitPrivate.cpp:
(toGdkModifiers):
(toWebKitNavigationType):
(toWebKitMouseButton):
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitUIClient.cpp:
(UIClient::UIClient): Implement the UIClient using a custom class.
(attachUIClientToView): Set the UIClient directly to the WebPageProxy.
(createNewPage): Deleted.
(showPage): Deleted.
(closePage): Deleted.
(runJavaScriptAlert): Deleted.
(runJavaScriptConfirm): Deleted.
(runJavaScriptPrompt): Deleted.
(toolbarsAreVisible): Deleted.
(setToolbarsAreVisible): Deleted.
(menuBarIsVisible): Deleted.
(setMenuBarIsVisible): Deleted.
(statusBarIsVisible): Deleted.
(setStatusBarIsVisible): Deleted.
(isResizable): Deleted.
(setIsResizable): Deleted.
(getWindowFrame): Deleted.
(setWindowFrame): Deleted.
(mouseDidMoveOverElement): Deleted.
(printFrame): Deleted.
(runOpenPanel): Deleted.
(decidePolicyForGeolocationPermissionRequest): Deleted.
(runModal): Deleted.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreate): Add WebKitNavigationAction parameter.
(webkit_web_view_class_init): Add WebKitNavigationAction paramter
to CREATE signal.
(webkitWebViewCreateNewPage): Add WebKitNavigationAction parameter
and pass it to the signal callbacks.
(webkitWebViewMouseTargetChanged): Use a WebHitTestResult::Data
const reference.
(webkitWebViewPopulateContextMenu): Ditto.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/WebKitWindowProperties.cpp:
(webkitWindowPropertiesUpdateFromWebWindowFeatures): Use a
WebCore::WindowFeatures const reference.
* UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/webkit2.h: Include WebKitNavigationAction.h.

Tools:
Add unit test to check the WebKitNavigationAction passed to
WebKitWebView::create callback.

* MiniBrowser/gtk/BrowserWindow.c:
(webViewCreate): Add WebKitNavigationAction parameter.
* TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
(testWebViewCreateNavigationData):
(beforeAll):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitPolicyClient.cpp:
(createCallback):

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

5 years ago[GTK] Do not add forward declaration of class struct for interfaces
carlosgc@webkit.org [Wed, 2 Jul 2014 07:09:26 +0000 (07:09 +0000)]
[GTK] Do not add forward declaration of class struct for interfaces
https://bugs.webkit.org/show_bug.cgi?id=134297

Reviewed by Martin Robinson.

Source/WebCore:
* PlatformGTK.cmake: Make files generated by
gobject-generate-headers.pl script depend on it.
* bindings/gobject/WebKitDOMEventTarget.h: Remove forward declaration.
* bindings/gobject/WebKitDOMNodeFilter.h: Ditto
* bindings/gobject/WebKitDOMXPathNSResolver.h: Ditto.
* bindings/scripts/gobject-generate-headers.pl: Use Iface instead
of Class suffix for interfaces.

Tools:
Add Iface symbol to documentation instead of Class for interfaces.

* gtk/webkitdom.py:
(WebKitDOMDocGeneratorSections.write_section):

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

5 years ago[GTK] XPathNSResolver should be exposed as an interface instead of as a class
carlosgc@webkit.org [Wed, 2 Jul 2014 07:04:23 +0000 (07:04 +0000)]
[GTK] XPathNSResolver should be exposed as an interface instead of as a class
https://bugs.webkit.org/show_bug.cgi?id=134028

Reviewed by Gustavo Noronha Silva.

Source/WebCore:
Add custom implementation of WebKitDOMXPathNSResolver to expose it
as an interface instead of a class. It also includes an internal
default implementation of the interface to support methods that
create a XPathNSResolver using the native implementation.

* PlatformGTK.cmake: Add new files to compilation.
* bindings/gobject/GObjectXPathNSResolver.cpp: Added.
(WebCore::GObjectXPathNSResolver::~GObjectXPathNSResolver):
(WebCore::GObjectXPathNSResolver::lookupNamespaceURI): Call
webkit_dom_xpath_ns_resolver_lookup_namespace_uri().
* bindings/gobject/GObjectXPathNSResolver.h: Added.
(WebCore::GObjectXPathNSResolver::create):
(WebCore::GObjectXPathNSResolver::GObjectXPathNSResolver): Create
a new GObjectXPathNSResolver for the given WebKitDOMXPathNSResolver.
* bindings/gobject/WebKitDOMXPathNSResolver.cpp: Added.
(webkit_dom_xpath_ns_resolver_default_init):
(webkit_dom_xpath_ns_resolver_lookup_namespace_uri):
(webkitDOMNativeXPathNSResolverFinalize):
(webkitDOMNativeXPathNSResolverConstructor):
(webkit_dom_native_xpath_ns_resolver_init):
(webkit_dom_native_xpath_ns_resolver_class_init):
(webkitDOMNativeXPathNSResolverLookupNamespaceURI):
(webkitDOMXPathNSResolverIfaceInit):
(WebKit::core): Return the native XPathNSResolver when using the
internal implementation or create a custom XPathNSResolver when
using a user provided WebKitDOMXPathNSResolver.
(WebKit::kit):
* bindings/gobject/WebKitDOMXPathNSResolver.h: Added.
* bindings/gobject/WebKitDOMXPathNSResolverPrivate.h: Added.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction): Add exceptions for XPathNSResolver since
the core method returns a PassRefPtr.

Tools:
Add unit tests to check WebKitDOMXPathNSResolver API when using the
native one and a user provided one.

* Scripts/webkitpy/style/checker.py: Add WebKitDOMXPathNSResolver
to the list of GTK+ public API exceptions.
* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: Add new files to compilation.
* TestWebKitAPI/Tests/WebKit2Gtk/DOMXPathNSResolverTest.cpp: Added.
(webkitXPathNSResolverLookupNamespaceURI):
(webkitXPathNSResolverDOMXPathNSResolverIfaceInit):
(webkit_xpath_ns_resolver_init):
(webkit_xpath_ns_resolver_class_init):
(WebKitDOMXPathNSResolverTest::create):
(WebKitDOMXPathNSResolverTest::webPageFromArgs):
(WebKitDOMXPathNSResolverTest::evaluateFooChildTextAndCheckResult):
(WebKitDOMXPathNSResolverTest::testXPathNSResolverNative):
(WebKitDOMXPathNSResolverTest::testXPathNSResolverCustom):
(WebKitDOMXPathNSResolverTest::runTest):
(registerTests):
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMXPathNSResolver.cpp: Added.
(runTest):
(testWebKitDOMXPathNSResolverNative):
(testWebKitDOMXPathNSResolverCustom):
(serverCallback):
(beforeAll):
(afterAll):
* gtk/webkitdom.py:
(WebKitDOMDocGeneratorSections.write_section): Add
WebKitDOMXPathNSResolver to the list of interfaces.

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

5 years agoThe OpenType MATH table is not read on Mac
fred.wang@free.fr [Wed, 2 Jul 2014 06:44:05 +0000 (06:44 +0000)]
The OpenType MATH table is not read on Mac
https://bugs.webkit.org/show_bug.cgi?id=133569

Reviewed by Chris Fleizach.

Source/WebCore:
An incorrect tag format is used to load the OpenType MATH table on Mac.
This commit makes the format consistent with what is used for other tables on Mac.
This will allow to load the MATH table and to use it for the MathML rendering.

No new tests. platform/graphics/opentype already contains tests for the OpenType MATH support.

* platform/graphics/opentype/OpenTypeMathData.cpp:

LayoutTests:
We update the references for some tests in LayoutTests/mathml/opentype/ and remove the failure from TestExpectations.
Other tests require a font with a MATH table to be installed on Mac bots and to be used by default (bug 133603).

* platform/mac-wk2/mathml/opentype/opentype-stretchy-expected.txt: Removed.
* platform/mac/TestExpectations: Enable mathml/opentype/opentype-stretchy-horizontal.html and mathml/opentype/opentype-stretchy.html.
* platform/mac/mathml/horizontal-LatinModern-expected.txt: Removed. This file should not have been in this directory.
* platform/mac/mathml/horizontal-LatinModern-munderover-expected.txt: Removed. This file should not have been in this directory.
* platform/mac/mathml/opentype-stretchy-horizontal-expected.txt: Removed. This file should not have been in this directory.
* platform/mac/mathml/opentype/opentype-stretchy-expected.txt: Add text reference.
* platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt: Add text reference.

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

5 years ago[Win64] Unreviewed build fix.
achristensen@apple.com [Wed, 2 Jul 2014 05:57:33 +0000 (05:57 +0000)]
[Win64] Unreviewed build fix.

Source/WebCore:
* WebCore.vcxproj/WebCore.vcxproj:
Exclude CA files from 32 and 64 bit WinCairo builds.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
Don't use a precompiled header in 32 or 63 bit builds of MockCDM.cpp.

Source/WebKit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Corrected 64-bit linker symbols.

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

5 years agoReduce dynamic memory allocation in css jit.
achristensen@apple.com [Wed, 2 Jul 2014 04:49:39 +0000 (04:49 +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::saveAllocatedRegisters):
* cssjit/RegisterAllocator.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
(WebCore::StackAllocator::pop):
Use inlineCapacity template parameter to reduce malloc calls.
I use 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.

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

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

5 years ago[EFL] Fix occurrence of two cursors on WK2 EFL.
commit-queue@webkit.org [Wed, 2 Jul 2014 04:49:27 +0000 (04:49 +0000)]
[EFL] Fix occurrence of two cursors on WK2 EFL.
https://bugs.webkit.org/show_bug.cgi?id=134436

Patch by KwangHyuk Kim <hyuki.kim@samsung.com> on 2014-07-01
Reviewed by Anders Carlsson.

ecore_x_window_cursor is released when ecore_evas_object_cursor should be shown in order to avoid occurrence of two cursors.

* UIProcess/API/efl/EwkView.cpp:
(EwkView::updateCursor):

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

5 years agoFix build break on EFL and GTK ports since r170683
gyuyoung.kim@samsung.com [Wed, 2 Jul 2014 03:44:17 +0000 (03:44 +0000)]
Fix build break on EFL and GTK ports since r170683
https://bugs.webkit.org/show_bug.cgi?id=134536

Unreviewed, build fix.

Source/WebKit2:
* CMakeLists.txt:

Tools:
* TestWebKitAPI/Tests/WebKit2/RestoreSessionStateContainingFormData.cpp:

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

5 years agoWebVTT percentage value can be a float
eric.carlson@apple.com [Wed, 2 Jul 2014 03:35:51 +0000 (03:35 +0000)]
WebVTT percentage value can be a float
https://bugs.webkit.org/show_bug.cgi?id=134511

Reviewed by Brent Fulgham.

Source/WebCore:
No new tests, existing tests modified.

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::setLine): int -> double.
(WebCore::TextTrackCueGeneric::setPosition): Ditto.
* html/track/TextTrackCueGeneric.h:

* html/track/VTTCue.cpp:
(WebCore::VTTCue::setLine): Ditto.
(WebCore::VTTCue::setPosition):  Ditto.
(WebCore::VTTCue::setCueSettings): Support floating point values for line, position, and size.
(WebCore::scanPercentage): Deleted.
* html/track/VTTCue.h:

* html/track/VTTScanner.cpp:
(WebCore::VTTScanner::scanFloat): Support negative values.
* html/track/VTTScanner.h:

* html/track/WebVTTParser.cpp: Include parseFloatPercentageValue in non-WEBVTT_REGIONS builds.
* html/track/WebVTTParser.h:

* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Drive by change to take a cue
    reference rather than a pointer.
(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Ditto.
(WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Loop over all cues, don't LOG that
    we are asking the client to delete the cue because the client will have already deleted
    it when status when to GenericCueData::Complete.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:

LayoutTests:
* media/track/captions-webvtt/tc015-positioning-ltr.vtt:
* media/track/captions-webvtt/tc015-positioning.vtt:
* media/track/captions-webvtt/tc017-line-position.vtt:
* media/track/captions-webvtt/tc018-align-text-line-position.vtt:
* media/track/captions-webvtt/tc019-cue-size.vtt:
* media/track/track-webvtt-tc015-positioning-expected.txt:
* media/track/track-webvtt-tc015-positioning.html:
* media/track/track-webvtt-tc017-line-position-expected.txt:
* media/track/track-webvtt-tc017-line-position.html:
* media/track/track-webvtt-tc018-align-text-line-position-expected.txt:
* media/track/track-webvtt-tc018-align-text-line-position.html:
* media/video-test.js:
(testCues):

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

5 years agoMake LogsPageMessagesToSystemConsoleEnabled a global debug preference
dino@apple.com [Wed, 2 Jul 2014 03:21:43 +0000 (03:21 +0000)]
Make LogsPageMessagesToSystemConsoleEnabled a global debug preference
https://bugs.webkit.org/show_bug.cgi?id=134534

Reviewed by Joseph Pecoraro.

* Shared/WebPreferencesDefinitions.h:

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

5 years agoHandle invalid data more gracefully.
timothy_horton@apple.com [Wed, 2 Jul 2014 03:06:15 +0000 (03:06 +0000)]
Handle invalid data more gracefully.

Reviewed by Anders Carlsson.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeFormData):
(WebKit::decodeBackForwardTreeNode):

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

5 years agoFix this test; it was waiting about 32 years for the end of an animation.
simon.fraser@apple.com [Wed, 2 Jul 2014 02:50:09 +0000 (02:50 +0000)]
Fix this test; it was waiting about 32 years for the end of an animation.
What we really care about is the start of the animation.

* compositing/animation/keyframe-order.html:

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

5 years agoImprove behavior of position:sticky on zoomed pages
simon.fraser@apple.com [Wed, 2 Jul 2014 02:43:32 +0000 (02:43 +0000)]
Improve behavior of position:sticky on zoomed pages
https://bugs.webkit.org/show_bug.cgi?id=134535
<rdar://problem/12898829>

Reviewed by Dean Jackson.

Despite r138036, position:sticky still had incorrect behavior in zoomed pages.

Fix by removing the scaling of the rect from viewportConstrainedVisibleContentRect(),
since all the other math happens in unscaled coordinates.

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

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

5 years agoAdd a missing return statement in WKPageCopySessionState.
mrowe@apple.com [Wed, 2 Jul 2014 02:24:44 +0000 (02:24 +0000)]
Add a missing return statement in WKPageCopySessionState.

Reviewed by Anders Carlsson.

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

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

5 years agoRemove WebChromeClient code that was only needed for Safari versions earlier than 3.1
mitz@apple.com [Wed, 2 Jul 2014 01:36:40 +0000 (01:36 +0000)]
Remove WebChromeClient code that was only needed for Safari versions earlier than 3.1
https://bugs.webkit.org/show_bug.cgi?id=134531

Reviewed by Daniel Bates.

* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::exceededDatabaseQuota):

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

5 years agoDon't encode/decode the snapshot UUID
andersca@apple.com [Wed, 2 Jul 2014 01:27:55 +0000 (01:27 +0000)]
Don't encode/decode the snapshot UUID
https://bugs.webkit.org/show_bug.cgi?id=134532

Reviewed by Sam Weinig.

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

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

5 years agoUnreviewed, rolling out r170608.
commit-queue@webkit.org [Wed, 2 Jul 2014 01:24:17 +0000 (01:24 +0000)]
Unreviewed, rolling out r170608.
https://bugs.webkit.org/show_bug.cgi?id=134533

Safari keeps crashing on device due to sandbox violation.
(Requested by enrica on #webkit).

Reverted changeset:

"Restrict network process sandbox"
https://bugs.webkit.org/show_bug.cgi?id=134360
http://trac.webkit.org/changeset/170608

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

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

Reviewed by Andreas Kling.

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

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

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

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

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

Reviewed by Enrica Casucci.

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

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

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

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

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

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

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

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

Reviewed by Sam Weinig.

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

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

(WKPageRestoreFromSessionState):
Handle both WKDataRef and WKSessionStateref.

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

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

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

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

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

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

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

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

Reviewed by Joseph Pecoraro.

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

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

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

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

Reviewed by Tim Horton.

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

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

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

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

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

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

Reviewed by Enrica Casucci.

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

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

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

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

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

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

Reviewed by Geoffrey Garen.

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

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

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

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

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

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

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

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

Reviewed by Tim Horton.

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

Renamed m_scale to m_subsamplingScale on FrameData.

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

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

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

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

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

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

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

Reviewed by Anders Carlsson.

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

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

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

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

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

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

Reviewed by Tim Horton.

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

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

(WebKit::createDictionary):
Fix a typo.

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

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

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

Reviewed by Darin Adler.

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

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

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

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

Reviewed by Tim Horton.

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

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

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

Reviewed by Mark Rowe.

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

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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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