WebKit-https.git
5 years agoAdd APIs for customizing the user agent
andersca@apple.com [Wed, 19 Nov 2014 22:07:22 +0000 (22:07 +0000)]
Add APIs for customizing the user agent
https://bugs.webkit.org/show_bug.cgi?id=138881
rdar://problem/17233981

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView customUserAgent]):
(-[WKWebView setCustomUserAgent:]):
(-[WKWebView _customUserAgent]):
(-[WKWebView _setCustomUserAgent:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(LazyInitialized::set):
(-[WKWebViewConfiguration copyWithZone:]):
(defaultApplicationNameForUserAgent):
(-[WKWebViewConfiguration applicationNameForUserAgent]):
(-[WKWebViewConfiguration setApplicationNameForUserAgent:]):

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

5 years ago[WK2 UI-side compositing] Initialize RemoteLayerTreeTransaction properties which...
simon.fraser@apple.com [Wed, 19 Nov 2014 22:05:03 +0000 (22:05 +0000)]
[WK2 UI-side compositing] Initialize RemoteLayerTreeTransaction properties which are unset on Mac
https://bugs.webkit.org/show_bug.cgi?id=138877

Reviewed by Tim Horton.

These data members are unused on Mac, but still encoded, so initialize them with
reasonable values.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):

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

5 years agoRefactor iOS selection gestures.
enrica@apple.com [Wed, 19 Nov 2014 21:57:10 +0000 (21:57 +0000)]
Refactor iOS selection gestures.
https://bugs.webkit.org/show_bug.cgi?id=138720
rdar://problem/18964359

Reviewed by Benjamin Poulain.

This is a first step towards refactoring the selection gestures code.
It introduces more general selection movement functions that can be used to build
the gestures.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(toWKTextGranularity):
(toWKSelectionDirection):
(-[WKContentView selectPositionAtPoint:completionHandler:]):
(-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
(-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
(-[WKContentView beginSelectionInDirection:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
(WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
(WebKit::WebPageProxy::selectPositionAtPoint):
(WebKit::WebPageProxy::beginSelectionInDirection):
(WebKit::WebPageProxy::updateSelectionWithExtentPoint):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::beginSelectionInDirection):
(WebKit::WebPage::updateSelectionWithExtentPoint):

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

5 years agoUnreviewed build fixes after r176329.
joepeck@webkit.org [Wed, 19 Nov 2014 21:39:33 +0000 (21:39 +0000)]
Unreviewed build fixes after r176329.

  - export all of the codegen python files as they are included by the main generator
  - update the imports of the main generator to match __init__.py
  - remove bundling the python scripts as framework resources, just have them PrivateHeaders

* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/scripts/generate-inspector-protocol-bindings.py:

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

5 years ago[WK2 UI-side Compositing] Fix the position and scroll indicator of the UI-side tiled...
simon.fraser@apple.com [Wed, 19 Nov 2014 21:31:11 +0000 (21:31 +0000)]
[WK2 UI-side Compositing] Fix the position and scroll indicator of the UI-side tiled scrolling indicator
https://bugs.webkit.org/show_bug.cgi?id=138876

Reviewed by Beth Dakin.

Fix the position of the tiled scrolling indicator in MiniBrowser by taking top
content offset into account.

On Mac, pass the current scroll position back to the UI process via the RemoteLayerTreeTransaction
so that we can use it to show the correctly scroll offset in the indicator. This is temporary until
Mac does UI-side scrolling.

* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::scrollPosition):
(WebKit::RemoteLayerTreeTransaction::setScrollPosition):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):

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

5 years agoAdd layout test for throttling of DOM timer changing the style of visible and invisib...
cdumez@apple.com [Wed, 19 Nov 2014 21:15:00 +0000 (21:15 +0000)]
Add layout test for throttling of DOM timer changing the style of visible and invisible elements
https://bugs.webkit.org/show_bug.cgi?id=138875

Reviewed by Simon Fraser.

Add a layout test to test that a repeating DOM timer changing the style
of both visible and invisible elements does not get throttled.

Also rename existing tests to use "display-none" instead of "invisible"
for clarity.

* fast/dom/nested-timer-display-none-element-throttling-expected.txt: Renamed from LayoutTests/fast/dom/nested-timer-invisible-element-throttling-expected.txt.
* fast/dom/nested-timer-display-none-element-throttling.html: Renamed from LayoutTests/fast/dom/nested-timer-invisible-element-throttling.html.
* fast/dom/repeating-timer-display-none-element-throttling-expected.txt: Renamed from LayoutTests/fast/dom/repeating-timer-invisible-element-throttling-expected.txt.
* fast/dom/repeating-timer-display-none-element-throttling.html: Renamed from LayoutTests/fast/dom/repeating-timer-invisible-element-throttling.html.
* fast/dom/repeating-timer-mixed-visible-display-none-elements-throttling-expected.txt: Added.
* fast/dom/repeating-timer-mixed-visible-display-none-elements-throttling.html: Added.

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

5 years agoGet rid of AccessibilityObject::setRoleValue()
benjamin@webkit.org [Wed, 19 Nov 2014 20:50:54 +0000 (20:50 +0000)]
Get rid of AccessibilityObject::setRoleValue()
https://bugs.webkit.org/show_bug.cgi?id=138861

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-19
Reviewed by Chris Fleizach.

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::setRoleValue): Deleted.

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

5 years agoAdd layout test for DOM timer throttling and element moving into view after layout
cdumez@apple.com [Wed, 19 Nov 2014 20:46:36 +0000 (20:46 +0000)]
Add layout test for DOM timer throttling and element moving into view after layout
https://bugs.webkit.org/show_bug.cgi?id=138874

Reviewed by Simon Fraser.

Add a layout test to make sure we unthrottle a DOM timer changing the
style of an element outside viewport if the element ends up inside
the viewport after layout.

* fast/dom/timer-unthrottle-on-layout-expected.txt: Added.
* fast/dom/timer-unthrottle-on-layout.html: Added.

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

5 years agoWeb Inspector: standardize language-specific protocol generator file, class, and...
burg@cs.washington.edu [Wed, 19 Nov 2014 19:16:23 +0000 (19:16 +0000)]
Web Inspector: standardize language-specific protocol generator file, class, and method prefixes
https://bugs.webkit.org/show_bug.cgi?id=138237

Reviewed by Joseph Pecoraro.

Settle on cpp/objc/js file prefixes and Cpp/ObjC/JS class prefixes for generators.
Move C++-specific static methods into CppGenerator and add cpp_ prefixes where relevant.
Split the templates file into language-specific template files.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/scripts/codegen/__init__.py:
* inspector/scripts/codegen/cpp_generator.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generator.py.
* inspector/scripts/codegen/cpp_generator_templates.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generator_templates.py.
(CppGeneratorTemplates):
* inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py.
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_dispatcher_header.py.
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_frontend_dispatcher_header.py.
* inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_cpp_protocol_types_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_protocol_types_header.py.
* inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_protocol_types_implementation.py.
* inspector/scripts/codegen/generate_js_backend_commands.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_commands.py.
* inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_backend_dispatcher_header.py.
* inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_backend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_objc_configuration_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_configuration_header.py.
* inspector/scripts/codegen/generate_objc_configuration_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_configuration_implementation.py.
* inspector/scripts/codegen/generate_objc_conversion_helpers.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_conversion_helpers.py.
* inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_frontend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_objc_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_header.py.
* inspector/scripts/codegen/generate_objc_internal_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_internal_header.py.
* inspector/scripts/codegen/generate_objc_protocol_types_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_types_implementation.py.
* inspector/scripts/codegen/generator.py:
* inspector/scripts/codegen/generator_templates.py:
* inspector/scripts/codegen/objc_generator.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c.py.
* inspector/scripts/codegen/objc_generator_templates.py: Added.
* inspector/scripts/generate-inspector-protocol-bindings.py:

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 19 Nov 2014 18:59:00 +0000 (18:59 +0000)]
Versioning.

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

5 years agoUpdate WebKit to build with LLVM TOT
commit-queue@webkit.org [Wed, 19 Nov 2014 18:46:17 +0000 (18:46 +0000)]
Update WebKit to build with LLVM TOT
https://bugs.webkit.org/show_bug.cgi?id=138519

Patch by Juergen Ributzka <juergen@apple.com> on 2014-11-19
Reviewed by Alexey Proskuryakov.

* Configurations/LLVMForJSC.xcconfig:
* llvm/LLVMAPIFunctions.h:
* llvm/library/LLVMExports.cpp:
(initializeAndGetJSCLLVMAPI):

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

5 years agoWeb Inspector: Debugger should not mutate variable when hovering mouse over ++n expre...
commit-queue@webkit.org [Wed, 19 Nov 2014 18:34:19 +0000 (18:34 +0000)]
Web Inspector: Debugger should not mutate variable when hovering mouse over ++n expression
https://bugs.webkit.org/show_bug.cgi?id=138839

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-19
Reviewed by Timothy Hatcher.

* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):

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

5 years agoWeb Inspector: Improve basic JavaScript completion in inline <script>s
commit-queue@webkit.org [Wed, 19 Nov 2014 18:32:30 +0000 (18:32 +0000)]
Web Inspector: Improve basic JavaScript completion in inline <script>s
https://bugs.webkit.org/show_bug.cgi?id=138845

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-19
Reviewed by Timothy Hatcher.

* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
Fix up CodeMirror mode handling for JavaScript completion when inside of mixed mode
input (html). Also add completion for CodeMirror's localVars list.

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

5 years agoAdd layout test for DOM timers throttling and 0 height element with visible overflowi...
cdumez@apple.com [Wed, 19 Nov 2014 18:27:33 +0000 (18:27 +0000)]
Add layout test for DOM timers throttling and 0 height element with visible overflowing content
https://bugs.webkit.org/show_bug.cgi?id=138873

Reviewed by Simon Fraser.

Add a layout test for verify that a DOM timer changing the style of a 0
height element with visible overflowing content does not get throttled.
If the implementation did not properly use the overflow rect to
determine if the element is visible, this test would fail.

This covers the case of the top scrolling banner on huffingtonpost.com.

* fast/dom/repeating-timer-element-overflow-throttling-expected.txt: Added.
* fast/dom/repeating-timer-element-overflow-throttling.html: Added.

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

5 years agoMissing NULL-check in VideoTrack::setLanguage
philn@webkit.org [Wed, 19 Nov 2014 17:52:58 +0000 (17:52 +0000)]
Missing NULL-check in VideoTrack::setLanguage
https://bugs.webkit.org/show_bug.cgi?id=138867

Reviewed by Jer Noble.

* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::setLanguage): Prevent change event creation
on an empty video track list.

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

5 years agoAX: Safari fails to load a web page with VoiceOver
cfleizach@apple.com [Wed, 19 Nov 2014 17:36:29 +0000 (17:36 +0000)]
AX: Safari fails to load a web page with VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=138849

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Sometimes an inlineElementContinuation will continue to an inline RenderBlock, so we case this incorrectly and bad things happen.

Test: accessibility/inline-block-assertion.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::startOfContinuations):

LayoutTests:

* accessibility/inline-block-assertion-expected.txt: Added.
* accessibility/inline-block-assertion.html: Added.

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

5 years agoSimple line layout: RenderTreeAsText should use rangeForRenderer() when dumping simpl...
zalan@apple.com [Wed, 19 Nov 2014 17:26:31 +0000 (17:26 +0000)]
Simple line layout: RenderTreeAsText should use rangeForRenderer() when dumping simple line text.
https://bugs.webkit.org/show_bug.cgi?id=138847

Reviewed by Antti Koivisto.

This is in preparation to support multiple renderers for simple line layout.
Use rangeForRenderer() to get runs for a particular renderer as opposed to for the entire flow.

Not testable.

* rendering/RenderTreeAsText.cpp:
(WebCore::write):

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

5 years ago[WinCairo] Compile error when CSS_SELECTORS_LEVEL4 is not enabled.
commit-queue@webkit.org [Wed, 19 Nov 2014 17:23:14 +0000 (17:23 +0000)]
[WinCairo] Compile error when CSS_SELECTORS_LEVEL4 is not enabled.
https://bugs.webkit.org/show_bug.cgi?id=138870

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-11-19
Reviewed by Alex Christensen.

* css/CSSSelector.cpp:
(WebCore::simpleSelectorSpecificityInternal):

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

5 years agoAX: Screen braille input doesn't work on forms.
cfleizach@apple.com [Wed, 19 Nov 2014 15:47:16 +0000 (15:47 +0000)]
AX: Screen braille input doesn't work on forms.
https://bugs.webkit.org/show_bug.cgi?id=138804

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Allow iOS to set values of text fields through the API.

Test: platform/ios-sim/accessibility/set-value.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:]):

Tools:

Add a method to setValue through the AX API in DRT.

* DumpRenderTree/AccessibilityUIElement.cpp:
(setValueCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::setValue):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::setValue):

LayoutTests:

* platform/ios-sim: Copied from LayoutTests/platform/ios-sim.
* platform/ios-sim/accessibility/set-value-expected.txt: Added.
* platform/ios-sim/accessibility/set-value.html: Added.

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

5 years agoSimple line layout: Add renderer based rect collecting to RunResolver.
zalan@apple.com [Wed, 19 Nov 2014 15:40:35 +0000 (15:40 +0000)]
Simple line layout: Add renderer based rect collecting to RunResolver.
https://bugs.webkit.org/show_bug.cgi?id=138818

Reviewed by Antti Koivisto.

This is in preparation to multiple renderers support.
RunResolver should be able to collect rects for a particular renderer
that might overlap multiple runs. (or might just be a subset of a Run)

Covered by existing tests.

* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::renderer): It operates on a single renderer currently.
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): It operates on a single renderer currently.
* rendering/SimpleLineLayoutFlowContents.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::computeTextBoundingBox):
(WebCore::SimpleLineLayout::computeTextFirstRunLocation):
(WebCore::SimpleLineLayout::collectTextAbsoluteRects):
(WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
(WebCore::SimpleLineLayout::showLineLayoutForFlow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::baselinePosition):
(WebCore::SimpleLineLayout::linePosition):
(WebCore::SimpleLineLayout::lineSize):
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::Run::rectForTextRenderer):
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):
(WebCore::SimpleLineLayout::RunResolver::Run::text):
(WebCore::SimpleLineLayout::RunResolver::Run::computeRect):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
* rendering/SimpleLineLayoutResolver.h:

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

5 years ago[GTK] Error in documentation of webkit_print_operation_get_page_setup()
commit-queue@webkit.org [Wed, 19 Nov 2014 14:24:10 +0000 (14:24 +0000)]
[GTK] Error in documentation of webkit_print_operation_get_page_setup()
https://bugs.webkit.org/show_bug.cgi?id=138868

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-11-19
Reviewed by Carlos Garcia Campos.

Fix copypaste error in documentation of
webkit_print_operation_get_page_setup().

* UIProcess/API/gtk/WebKitPrintOperation.cpp:

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

5 years agoRemove an unused file.
mrowe@apple.com [Wed, 19 Nov 2014 09:55:12 +0000 (09:55 +0000)]
Remove an unused file.

* version.plist: Removed.

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

5 years agoFix the detection of toolchain support for Cortex-A53 erratum 835769 workaround
commit-queue@webkit.org [Wed, 19 Nov 2014 09:06:30 +0000 (09:06 +0000)]
Fix the detection of toolchain support for Cortex-A53 erratum 835769 workaround
https://bugs.webkit.org/show_bug.cgi?id=138840

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-11-19
Reviewed by Csaba Osztrogonác.

* Source/cmake/OptionsCommon.cmake:

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

5 years agoAdd selector checker for :lang pseudo class in Selectors level 4
commit-queue@webkit.org [Wed, 19 Nov 2014 08:57:13 +0000 (08:57 +0000)]
Add selector checker for :lang pseudo class in Selectors level 4
https://bugs.webkit.org/show_bug.cgi?id=138281

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2014-11-19
Reviewed by Benjamin Poulain.

Source/WebCore:

Add selector checker for :lang pseudo class in Selectors level 4.

The language tags matching is specified in [1,2].

[1] http://www.ietf.org/rfc/rfc4647.txt
[2] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo

Tests: fast/selectors/lang-extended-filtering.html
       fast/selectors/lang-multiple.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorCheckerTestFunctions.h:
(WebCore::containslanguageSubtagMatchingRange):
(WebCore::matchesLangPseudoClass):
(WebCore::matchesLangPseudoClassDeprecated):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):

LayoutTests:

Add layout tests for :lang selector checker with multiple arguments and
related behaviors on extended filtering.

* fast/selectors/lang-extended-filtering-expected.txt: Added.
* fast/selectors/lang-extended-filtering.html: Added.
* fast/selectors/lang-multiple-expected.txt: Added.
* fast/selectors/lang-multiple.html: Added.

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

5 years agoRoll over WebInspectorUI's ChangeLog.
mrowe@apple.com [Wed, 19 Nov 2014 08:53:28 +0000 (08:53 +0000)]
Roll over WebInspectorUI's ChangeLog.

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

5 years agostart/stop method for AudioBufferSourceNodes and OscillatorNodes can take no args
philn@webkit.org [Wed, 19 Nov 2014 07:49:29 +0000 (07:49 +0000)]
start/stop method for AudioBufferSourceNodes and OscillatorNodes can take no args
https://bugs.webkit.org/show_bug.cgi?id=138739

Reviewed by Darin Adler.

Source/WebCore:

The patch is inspired by the following Blink revision by
<rtoy@google.com>:
<https://src.chromium.org/viewvc/blink?view=rev&revision=160845>

Test: webaudio/dom-exceptions.html

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::start):
(WebCore::AudioBufferSourceNode::startPlaying):
(WebCore::AudioBufferSourceNode::noteGrainOn):
(WebCore::AudioBufferSourceNode::startGrain): Deleted.
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start):
(WebCore::AudioScheduledSourceNode::stop):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/OscillatorNode.idl:

LayoutTests:

* webaudio/dom-exceptions-expected.txt: Added.
* webaudio/dom-exceptions.html: Added.

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

5 years agoAad failing test expectations to some tests imported in r176144.
rniwa@webkit.org [Wed, 19 Nov 2014 06:45:29 +0000 (06:45 +0000)]
Aad failing test expectations to some tests imported in r176144.

* platform/win/TestExpectations:

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

5 years agoUse of uninitialized value in string eq in many http tests
ap@apple.com [Wed, 19 Nov 2014 05:41:15 +0000 (05:41 +0000)]
Use of uninitialized value in string eq in many http tests
https://bugs.webkit.org/show_bug.cgi?id=138852

Reviewed by Daniel Bates.

* http/tests/security/xssAuditor/resources/echo-intertag.pl: Don't use it uninitialized.

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

5 years ago[WK2] Remove the minimalUI code from the UIProcess
benjamin@webkit.org [Wed, 19 Nov 2014 05:13:54 +0000 (05:13 +0000)]
[WK2] Remove the minimalUI code from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=138819

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-18
Reviewed by Sam Weinig.

It looks like the only interface we have to keep alive is
[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:].

Clean up everything else, it is a pile of useless code.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _didRelaunchProcess]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
(-[WKWebView _setUsesMinimalUI:]): Deleted.
(-[WKWebView _usesMinimalUI]): Deleted.
(activeMinimumLayoutSizeForMinimalUI): Deleted.
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _frameOrBoundsChanged]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setUsesMinimalUI): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.
(WebKit::WebPageProxy::setUsesMinimalUI): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportPropertiesDidChange):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.

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

5 years agoAdd the initial implementation of dynamic specificity for :matches()
benjamin@webkit.org [Wed, 19 Nov 2014 05:12:53 +0000 (05:12 +0000)]
Add the initial implementation of dynamic specificity for :matches()
https://bugs.webkit.org/show_bug.cgi?id=138822

Reviewed by Andreas Kling.

Source/WebCore:

Previously we completely ignored the selector list of :matches() when computing
the specificity of the selector.

The spec (http://dev.w3.org/csswg/selectors4/#specificity) says:
"The specificity of a :matches() pseudo-class, however, is the specificity
 of the most specific complex selector that matched the given element."

This patch does just that.

In the CSS JIT, we only consider specificities that can be computed statically
for now, this should be extended later.
When the specificity is dynamic, we fall back to SelectorChecker. In that case,
we execute every selector of the selector list and we keep the maximum value
as the specificity for the whole :matches().

Tests: fast/css/matches-specificity-1.html
       fast/css/matches-specificity-2.html
       fast/css/matches-specificity-3.html
       fast/css/matches-specificity-4.html
       fast/css/matches-specificity-5.html
       fast/css/matches-specificity-6.html
       fast/css/matches-specificity-7.html
       fast/css/matches-specificity-8.html
       fast/css/matches-specificity-9.html
       fast/css/matches-specificity-10.html

* css/CSSSelector.cpp:
(WebCore::selectorSpecificity):
(WebCore::maxSpecificity):
(WebCore::CSSSelector::specificity):
(WebCore::simpleSelectorSpecificityInternal):
(WebCore::CSSSelector::simpleSelectorSpecificity):
:matches() itself should not have any specificity. The specificity of its components
is computed in SelectorChecker.

Since :matches() is no longer accounted as a class B specificity, I had to finish
the specificity of :not() or some test breaks.

* css/CSSSelector.h:
* css/PageRuleCollector.cpp:
(WebCore::comparePageRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
We can no longer shortcut the execution when context.pseudoElementEffective is false.
There is no guarantee that a following selector wouldn't match with a higher specificity.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):

LayoutTests:

* fast/css/matches-specificity-1-expected.html: Added.
* fast/css/matches-specificity-1.html: Added.
* fast/css/matches-specificity-2-expected.html: Added.
* fast/css/matches-specificity-2.html: Added.
* fast/css/matches-specificity-3-expected.html: Added.
* fast/css/matches-specificity-3.html: Added.
* fast/css/matches-specificity-4-expected.html: Added.
* fast/css/matches-specificity-4.html: Added.
* fast/css/matches-specificity-5-expected.html: Added.
* fast/css/matches-specificity-5.html: Added.
* fast/css/matches-specificity-6-expected.html: Added.
* fast/css/matches-specificity-6.html: Added.
* fast/css/matches-specificity-7-expected.html: Added.
* fast/css/matches-specificity-7.html: Added.
* fast/css/matches-specificity-8-expected.html: Added.
* fast/css/matches-specificity-8.html: Added.
* fast/css/matches-specificity-9-expected.html: Added.
* fast/css/matches-specificity-9.html: Added.
* fast/css/matches-specificity-10-expected.html: Added.
* fast/css/matches-specificity-10.html: Added.

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

5 years agoUnreviewed. Revision to the build fix in r176304.
conrad_shultz@apple.com [Wed, 19 Nov 2014 05:08:41 +0000 (05:08 +0000)]
Unreviewed. Revision to the build fix in r176304.

The guarded method should simply be in the !TARGET_OS_IPHONE block.

* UIProcess/API/Cocoa/WKViewPrivate.h:

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

5 years agoiOS8 new "slow tap" heuristic fires mouse compat events despite preventDefault on...
benjamin@webkit.org [Wed, 19 Nov 2014 05:06:58 +0000 (05:06 +0000)]
iOS8 new "slow tap" heuristic fires mouse compat events despite preventDefault on touchend
https://bugs.webkit.org/show_bug.cgi?id=137069
rdar://problem/18481464

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-18
Reviewed by Simon Fraser.

On WebKit2, we let UIWebTouchEventsGestureRecognizer and _UIWebHighlightLongPressGestureRecognizer
run concurrently. This causes a race with an incorrect behavior:
1) If UIWebTouchEventsGestureRecognizer does not cancel the native gestures on start.
2) _UIWebHighlightLongPressGestureRecognizer starts after highlightDelay.
3) When the finger leaves the screen, both gestures end.
-> If the touch end sent to JavaScript in [3] ask the priority over native events, that no longer stops
   the _UIWebHighlightLongPressGestureRecognizer.

The two gesture recognizers can run in any order, there is no guarantee on which one runs first.
To solve the bug, I must make sure the _UIWebHighlightLongPressGestureRecognizer never trigger a click
if the page wants the event.

To solve the order problem, I use the fact that event recognition goes in two phases for
non cancelled events:
1) Update the gesture recognizers.
2) Trigger the actions.

I do not know the order of recognizers in [1], but I know both have run before [2] is executed.
I use that to stop _UIWebHighlightLongPressGestureRecognizer from ending with a click in the case of the bug:
1) When _UIWebHighlightLongPressGestureRecognizer starts, I set _highlightLongPressCanClick signaling
   the gesture can end normally. This is done on a timer and not direct input so I don't really have to worry
   about a race here.
2) When processing the touch event for UIWebTouchEventsGestureRecognizer, I reset the flag _highlightLongPressCanClick
   if the page wants the event.
3) When the actions of _UIWebHighlightLongPressGestureRecognizer are processed, the touch event
   has already been processed by the page and the flag has been cleared if needed.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEvent:preventsNativeGestures:]):
(-[WKContentView _highlightLongPressRecognized:]):

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

5 years agoiOS build fix after r176299. This method is not defined in WKViewIOS.mm.
rniwa@webkit.org [Wed, 19 Nov 2014 04:31:51 +0000 (04:31 +0000)]
iOS build fix after r176299. This method is not defined in WKViewIOS.mm.

* UIProcess/API/Cocoa/WKViewPrivate.h:

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

5 years agoFeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
ddkilzer@apple.com [Wed, 19 Nov 2014 02:42:49 +0000 (02:42 +0000)]
FeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
<http://webkit.org/b/138813>

Reviewed by Mark Rowe.

* Configurations/FeatureDefines.xcconfig: Switch to using SDK
selectors.

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

5 years agoCrash when setting 'z-index' / 'flex-shrink' CSS properties to a calculated value
cdumez@apple.com [Wed, 19 Nov 2014 02:05:34 +0000 (02:05 +0000)]
Crash when setting 'z-index' / 'flex-shrink' CSS properties to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138783

Reviewed by Andreas Kling.

Source/WebCore:

Update operators converting CSSPrimitiveValue to integer / floating
point types to properly handle calculated values (e.g. 'calc(2 * 3)').
Previously, this was not working in release builds and we would hit an
ASSERT_NOT_REACHED() in debug builds.

Tests: fast/css/flex-shrink-calculated-value.html
       fast/css/z-index-calculated-value.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator unsigned short):
(WebCore::CSSPrimitiveValue::operator int):
(WebCore::CSSPrimitiveValue::operator unsigned):
(WebCore::CSSPrimitiveValue::operator float):

LayoutTests:

Add layout tests to check that settings 'z-index' / 'flex-shrink' CSS
properties to a calculated value does not crash and behaves as
expected.

* fast/css/flex-shrink-calculated-value-expected.txt: Added.
* fast/css/flex-shrink-calculated-value.html: Added.
* fast/css/z-index-calculated-value-expected.txt: Added.
* fast/css/z-index-calculated-value.html: Added.

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

5 years agoGive clients a way to cancel preview popovers
conrad_shultz@apple.com [Wed, 19 Nov 2014 01:43:14 +0000 (01:43 +0000)]
Give clients a way to cancel preview popovers
https://bugs.webkit.org/show_bug.cgi?id=138855

Reviewed by Tim Horton.

Promote -[WKView _dismissActionMenuPopovers] from internal to private.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissActionMenuPopovers]):
* UIProcess/API/mac/WKViewInternal.h:

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

5 years agoUnreviewed, rolling out r176263 and r176273.
mmaxfield@apple.com [Wed, 19 Nov 2014 01:19:43 +0000 (01:19 +0000)]
Unreviewed, rolling out r176263 and r176273.
https://bugs.webkit.org/show_bug.cgi?id=138854

Underlines are hideous. (Requested by litherum on #webkit).

Reverted changesets:

"Use underlining metrics from the font file"
https://bugs.webkit.org/show_bug.cgi?id=138762
http://trac.webkit.org/changeset/176263

"iOS build fix."
http://trac.webkit.org/changeset/176273

Patch by Commit Queue <commit-queue@webkit.org> on 2014-11-18# Please enter the commit message for your changes. Lines starting

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

5 years agoAdd a setting to toggle DOMTimer throttling support
cdumez@apple.com [Wed, 19 Nov 2014 00:56:33 +0000 (00:56 +0000)]
Add a setting to toggle DOMTimer throttling support
https://bugs.webkit.org/show_bug.cgi?id=138844
<rdar://problem/19020874>

Reviewed by Andreas Kling.

Add a setting to disable DOM timers throttling, in order to help
developers determine if a specific issue is caused by timer
throttling.

Source/WebCore:

* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::contextDocument):
(WebCore::DOMTimerFireState::scriptMadeUserObservableChanges):
(WebCore::DOMTimer::isDOMTimersThrottlingEnabled):
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
* page/DOMTimer.h:
* page/Settings.in:

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences domTimersThrottlingEnabled]):
(-[WebPreferences setDOMTimersThrottlingEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetDOMTimersThrottlingEnabled):
(WKPreferencesGetDOMTimersThrottlingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

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

5 years agoREGRESSION: Invoking dictionary lookup on text in some search fields searches for
bdakin@apple.com [Wed, 19 Nov 2014 00:49:33 +0000 (00:49 +0000)]
REGRESSION: Invoking dictionary lookup on text in some search fields searches for
incorrect item
https://bugs.webkit.org/show_bug.cgi?id=138853
-and corresponding-
rdar://problem/18912505

Reviewed by Tim Horton.

Get the visible position based on the frame, not just the renderer.
* editing/mac/DictionaryLookup.mm:
(WebCore::rangeForDictionaryLookupAtHitTestResult):

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

5 years agoREGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
hyatt@apple.com [Wed, 19 Nov 2014 00:37:35 +0000 (00:37 +0000)]
REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
https://bugs.webkit.org/show_bug.cgi?id=137590

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/block/selection-block-gaps-crash.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::blockSelectionGaps):
Check that we really are a RenderBlock before recurring.

LayoutTests:

* fast/block/selection-block-gap-crash-expected.txt: Added.
* fast/block/selection-block-gap-crash.html: Added.

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

5 years agoAvoid synchronous style recalc in Document.activeElement
akling@apple.com [Wed, 19 Nov 2014 00:20:07 +0000 (00:20 +0000)]
Avoid synchronous style recalc in Document.activeElement
<https://webkit.org/b/138850>

Reviewed by Ryosuke Niwa.

Source/WebCore:

This subtly changes the behavior of <input autofocus>, which was caught by
a layout test. Auto-focus doesn't happen until the render tree is attached,
although it was possible to force it by accessing document.activeElement.

Now auto-focus is always lazy. This is consistent with other browser engines.

~1% progression on Speedometer locally.

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

LayoutTests:

Tweak a test to run once the DOM is loaded instead of during parsing.

* fast/forms/autofocus-in-sandbox-with-allow-scripts.html:

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

5 years agoHave Vector::capacity() return an unsigned instead of a size_t
cdumez@apple.com [Wed, 19 Nov 2014 00:17:27 +0000 (00:17 +0000)]
Have Vector::capacity() return an unsigned instead of a size_t
https://bugs.webkit.org/show_bug.cgi?id=138842

Reviewed by Andreas Kling.

Source/WebCore:

Update the code base now that Vector::capacity() returns an unsigned
type instead of a size_t.

No new tests, no behavior change.

* editing/TextIterator.cpp:
(WebCore::SearchBuffer::append):
(WebCore::SearchBuffer::prependContext):
(WebCore::SearchBuffer::search):
(WebCore::SearchBuffer::length):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary):

Source/WTF:

Have Vector::capacity() return an unsigned instead of a size_t as
capacity is stored as an unsigned internally.

* wtf/Vector.h:
(WTF::Vector::capacity):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):

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

5 years agoRemoved the custom allocator for ListHashSet nodes
ggaren@apple.com [Tue, 18 Nov 2014 23:06:00 +0000 (23:06 +0000)]
Removed the custom allocator for ListHashSet nodes
https://bugs.webkit.org/show_bug.cgi?id=138841

Reviewed by Andreas Kling.

Source/WebCore:

Uses of ListHashSet no longer need to declare an inline capacity,
since that was only used to specify the capacity of the custom allocator.

* dom/DOMNamedFlowCollection.h:
* dom/DocumentEventQueue.h:
* dom/DocumentStyleSheetCollection.h:
* dom/NamedFlowCollection.h:
* html/FormController.h:
* rendering/FloatingObjects.h:
* rendering/RenderBlock.h:

Source/WebKit2:

Uses of ListHashSet no longer need to declare an inline capacity,
since that was only used to specify the capacity of the custom allocator.

* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::loadPluginsIfNecessary):

Source/WTF:

bmalloc is fast, so we don't need a custom allocator.

The MallocBench test for linked list node allocation (list_allocate) is
4.09X faster in bmalloc than TCMalloc. Also, I wrote a stress test to
add/remove link elements, which modify a ListHashSet on insertion and
removal, and it was 1% faster / in the noise with bmalloc enabled.

* wtf/ListHashSet.h:
(WTF::ListHashSetNode::ListHashSetNode):
(WTF::ListHashSetTranslator::translate):
(WTF::U>::ListHashSet):
(WTF::=):
(WTF::U>::swap):
(WTF::U>::~ListHashSet):
(WTF::U>::size):
(WTF::U>::capacity):
(WTF::U>::isEmpty):
(WTF::U>::first):
(WTF::U>::removeFirst):
(WTF::U>::takeFirst):
(WTF::U>::last):
(WTF::U>::removeLast):
(WTF::U>::takeLast):
(WTF::U>::contains):
(WTF::U>::remove):
(WTF::U>::clear):
(WTF::U>::unlink):
(WTF::U>::unlinkAndDelete):
(WTF::U>::appendNode):
(WTF::U>::prependNode):
(WTF::U>::insertNodeBefore):
(WTF::U>::deleteAllNodes):
(WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): Deleted.
(WTF::ListHashSetNodeAllocator::allocate): Deleted.
(WTF::ListHashSetNodeAllocator::deallocate): Deleted.
(WTF::ListHashSetNodeAllocator::pool): Deleted.
(WTF::ListHashSetNodeAllocator::pastPool): Deleted.
(WTF::ListHashSetNodeAllocator::inPool): Deleted.
(WTF::ListHashSetNode::operator new): Deleted.
(WTF::ListHashSetNode::destroy): Deleted.

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

5 years agoUnreviewed build fix after r176283.
eric.carlson@apple.com [Tue, 18 Nov 2014 22:57:43 +0000 (22:57 +0000)]
Unreviewed build fix after r176283.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

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

5 years agoAvoid re-encoding action menu image data
timothy_horton@apple.com [Tue, 18 Nov 2014 22:54:52 +0000 (22:54 +0000)]
Avoid re-encoding action menu image data
https://bugs.webkit.org/show_bug.cgi?id=138817
<rdar://problem/18840382>

Reviewed by Anders Carlsson.

* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Store and encode a SharedMemory with the raw encoded image data,
instead of re-painting the image into a ShareableBitmap.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _hitTestResultImage]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _copyImage:]):
(-[WKActionMenuController _addImageToPhotos:]):
(-[WKActionMenuController _defaultMenuItems]):
(-[WKActionMenuController _canAddMediaToPhotos]): Deleted.
Build a temporary filename from a UUID and the image's desired extension.
Use the Image's encoded data instead of re-encoding it with CGImageDestination.
Build an image menu only if we have an image, URL, data, and extension.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItemsForImage:]):
(-[WebActionMenuController _addImageToPhotos:]):
Build a temporary filename from a UUID and the image's desired extension.
Use the Image's encoded data instead of re-encoding it with CGImageDestination.
Build an image menu only if we have an image, URL, data, and extension.

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

5 years agoREGRESSION(r152313): Inline-block element doesn't wrap properly
hyatt@apple.com [Tue, 18 Nov 2014 22:51:42 +0000 (22:51 +0000)]
REGRESSION(r152313): Inline-block element doesn't wrap properly
https://bugs.webkit.org/show_bug.cgi?id=138846 - <rdar://problem/18838703>

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/inline-block/inline-block-empty-spans.html

* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::canBreakAtThisPosition):

LayoutTests:

* fast/inline-block/inline-block-empty-spans-expected.html: Added.
* fast/inline-block/inline-block-empty-spans.html: Added.

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

5 years agoMulticolumn layout with negative line spacing and orphans causes pieces of letters...
mmaxfield@apple.com [Tue, 18 Nov 2014 22:40:29 +0000 (22:40 +0000)]
Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns
https://bugs.webkit.org/show_bug.cgi?id=138204

Source/WebCore:

Reviewed by Dave Hyatt.

This code is responsible for pushing block elements to the next column if
the "orphans" CSS property is triggered. The mechanism by which this is
achieved is to push the block down such that the origin of the block is
at the origin of the next column. However, if there is negative line
spacing, the top portion of the text might actually be on top of the
origin of the block. Therefore, the block wasn't being pushed down enough
to entirely contain its text, so the top pieces were being drawn on the
previous column.

Test: fast/multicol/orphans-negative-line-spacing.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):

LayoutTests:

Patch by Myles C. Maxfield <litherum@gmail.com> on 2014-11-18
Reviewed by Dave Hyatt.

Create a layout where the "orphans" css property causes a block element to
be pushed to the next column.

* fast/multicol/orphans-negative-line-spacing-expected.html: Added.
* fast/multicol/orphans-negative-line-spacing.html: Added.

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

5 years ago[iOS] allow host application to opt-out of alternate fullscreen
eric.carlson@apple.com [Tue, 18 Nov 2014 22:10:09 +0000 (22:10 +0000)]
[iOS] allow host application to opt-out of alternate fullscreen
https://bugs.webkit.org/show_bug.cgi?id=138787

Reviewed by Sam Weinig.

"allowsAlternateFullscreen" doesn't need to be in the public WKWebView header.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): allowsAlternateFullscreen -> _allowsAlternateFullscreen.

* UIProcess/API/Cocoa/WKWebViewConfiguration.h: Remove allowsAlternateFullscreen.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _allowsAlternateFullscreen]): New.
(-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]): New.

* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declare _allowsAlternateFullscreen.

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

5 years agoDOMTimers sometimes don't get unthrottled on scrolling
cdumez@apple.com [Tue, 18 Nov 2014 22:05:10 +0000 (22:05 +0000)]
DOMTimers sometimes don't get unthrottled on scrolling
https://bugs.webkit.org/show_bug.cgi?id=138838

Reviewed by Antti Koivisto.

Source/WebCore:

DOMTimers sometimes didn't get unthrottled on scrolling. This is
because we stopped listening for viewport changes every time the
timer fires, but we didn't listen for those changes again if we
decided the timer should stay throttled after the timer's action
was executed.

We should listen for viewport changes again after executing the
timer's action, if there are elements outside the viewport causing
the DOMTimer to be throttled, even if the throttleState hasn't
changed (i.e the timer stays throttled).

Test: fast/dom/timer-unthrottle-on-scroll.html

* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):
(WebCore::DOMTimer::updateThrottlingStateAfterViewportChange):

LayoutTests:

Add a layout test to verify that DOMTimers get unthrottled on scroll if
the element whose style they are changing is inside the viewport after
the scroll.

* fast/dom/timer-unthrottle-on-scroll-expected.txt: Added.
* fast/dom/timer-unthrottle-on-scroll.html: Added.

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

5 years agoRemove the WinCairo buildbot
ossy@webkit.org [Tue, 18 Nov 2014 20:59:40 +0000 (20:59 +0000)]
Remove the WinCairo buildbot
https://bugs.webkit.org/show_bug.cgi?id=138805

Reviewed by Alex Christensen.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(appendCustomBuildFlags):
* BuildSlaveSupport/test-result-archive:
(archiveTestResults):

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

5 years ago[iOS] Make WebCore build and link with public SDK
dbates@webkit.org [Tue, 18 Nov 2014 20:56:31 +0000 (20:56 +0000)]
[iOS] Make WebCore build and link with public SDK
https://bugs.webkit.org/show_bug.cgi?id=136487

Patch by Daniel Bates <dbates@webkit.org> on 2014-11-18
Reviewed by David Kilzer.

* bindings/objc/DOMInternal.mm: Include header NSMapTableSPI.h.
* bindings/objc/WebScriptObject.mm: Ditto; Also fix style nit, substitute
#import for #include when importing header WTFString.h.
* bridge/objc/objc_instance.mm: Include header NSMapTableSPI.h and remove
#import NSMapTable.h as the former will import the latter.
* platform/ios/PlatformEventFactoryIOS.mm: Include header wtf/CurrentTime.h
for the declaration of WTF::currentTime().
* platform/ios/wak/WebCoreThread.mm: Remove unnecessary include of header CoreFoundation/CFPriv.h.
* platform/spi/ios/AVKitSPI.h: Add more SPI.
* platform/spi/ios/MPAVRoutingControllerSPI.h: Ditto.

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

5 years agoUnreviewed. Updated the install instruction.
rniwa@webkit.org [Tue, 18 Nov 2014 20:12:53 +0000 (20:12 +0000)]
Unreviewed. Updated the install instruction.

* Install.md:

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

5 years agoSubclass CachedFont for SVG fonts
mmaxfield@apple.com [Tue, 18 Nov 2014 20:04:38 +0000 (20:04 +0000)]
Subclass CachedFont for SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=138686

Reviewed by Simon Fraser.

Re-landing due to flakey bots.

Source/WebCore:

CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it.
Splitting out this SVG-specific code into a subclass of CachedFont
cleans up the design.

No new tests because there is no behavior change.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): There are two sections
in this function; one for SVG fonts and one for regular fonts.
I've moved these two sections into CachedFont and SVGCachedFont,
thereby simplifying this function.
(WebCore::CSSFontFaceSource::ensureFontData): Ditto.
(WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header.
(WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto.
(WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto.
* css/CSSFontFaceSource.h: Put functions that are simple enough to
be inlined here.
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience
function.
(WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean
from CSSFontSelector to CachedResourceHandle regarding if we should
be using SVGCachedFont instead of CachedFont.
* css/CSSFontFaceSrcValue.h: New convenience function.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceType): Update for new
CachedResource type
(WebCore::cachedResourcesForFrame): Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
(WebCore::CachedFont::ensureCustomFontData): Taken from
CSSFontFaceSource::getFontData()
(WebCore::CachedFont::getFontData): Ditto.
(WebCore::CachedFont::platformDataFromCustomData): Ditto.
(WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont.
(WebCore::CachedFont::getSVGFontById): Ditto.
* loader/cache/CachedFont.h:
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType): Update for new enum
type.
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource): Takes new boolean.
(WebCore::CachedResourceLoader::requestFont): Ditto.
(WebCore::CachedResourceLoader::checkInsecureContent): Update for
new enum type
(WebCore::CachedResourceLoader::canRequest): Ditto.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGFont.cpp: Added.
(WebCore::CachedSVGFont::CachedSVGFont): Moved from
CSSFontFaceSource::getFontData() and CachedFont
(WebCore::CachedSVGFont::getFontData): Ditto.
(WebCore::CachedSVGFont::platformDataFromCustomData): Ditto.
(WebCore::CachedSVGFont::ensureCustomFontData): Ditto.
(WebCore::CachedSVGFont::getSVGFontById): Ditto.
(WebCore::CachedSVGFont::firstFontFace): Ditto.
* loader/cache/CachedSVGFont.h: Subclass CachedFont.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getStatistics): Update for new enum.
* svg/SVGFontFaceUriElement.cpp:
(WebCore::isSVGFontTarget): Convenience function.
(WebCore::SVGFontFaceUriElement::loadFont): Update for new
boolean.

Source/WebKit2:

Update for enum type.

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::maximumBufferingTime):

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

5 years agoUpdate the Vector API to deal with unsigned types instead of size_t
cdumez@apple.com [Tue, 18 Nov 2014 19:56:01 +0000 (19:56 +0000)]
Update the Vector API to deal with unsigned types instead of size_t
https://bugs.webkit.org/show_bug.cgi?id=138824

Reviewed by Andreas Kling.

Source/JavaScriptCore:

Update code base to fix build errors related to the typing changes
in the Vector API (size_t -> unsigned).

* bytecode/PreciseJumpTargets.cpp:
* replay/EncodedValue.h:

Source/WebCore:

Update code base to fix build errors related to the typing changes
in the Vector API (size_t -> unsigned).

No new tests, no behavior change.

* WebCore.exp.in:
* bindings/js/JSDOMBinding.h:
(WebCore::jsArray):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* cssjit/SelectorCompiler.cpp:
* html/HTMLFormElement.cpp:
(WebCore::removeFromVector):
* html/parser/HTMLParserIdioms.h:
* html/parser/XSSAuditor.cpp:

Source/WebKit2:

Update code base to fix build errors related to the typing changes
in the Vector API (size_t -> unsigned).

* Platform/IPC/ArgumentCoders.h:
* Platform/IPC/DataReference.h:

Source/WTF:

Update part of the Vector API to deal with unsigned types instead of
size_t. The Vector class is already using unsigned type for its
capacity and size data members. However, the Vector API was never
updated accordingly.

The rest of the Vector API will be ported in follow-up patches to
make the change smaller and more easily reviewable.

* wtf/Forward.h:
* wtf/Vector.h:
(WTF::VectorTypeOperations::compare):
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::shouldReallocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
(WTF::VectorBufferBase::capacity):
(WTF::VectorBufferBase::VectorBufferBase):
(WTF::VectorBuffer::VectorBuffer):
(WTF::VectorBuffer::allocateBuffer):
(WTF::VectorBuffer::tryAllocateBuffer):
(WTF::VectorBuffer::shouldReallocateBuffer):
(WTF::VectorBuffer::reallocateBuffer):
(WTF::VectorBuffer::swap):
(WTF::VectorBuffer::swapInlineBuffer):
(WTF::VectorBuffer::swapInlineBuffers):
(WTF::Vector::Vector):
(WTF::Vector::at):
(WTF::Vector::operator[]):
(WTF::OverflowHandler>::find):
(WTF::OverflowHandler>::reverseFind):
(WTF::OverflowHandler>::fill):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):
(WTF::OverflowHandler>::resize):
(WTF::OverflowHandler>::resizeToFit):
(WTF::OverflowHandler>::shrink):
(WTF::OverflowHandler>::grow):
(WTF::OverflowHandler>::reserveCapacity):
(WTF::OverflowHandler>::tryReserveCapacity):
(WTF::OverflowHandler>::reserveInitialCapacity):
(WTF::OverflowHandler>::shrinkCapacity):
(WTF::OverflowHandler>::append):
(WTF::OverflowHandler>::tryAppend):
(WTF::OverflowHandler>::insert):
(WTF::OverflowHandler>::insertVector):
(WTF::OverflowHandler>::remove):
(WTF::OverflowHandler>::reverse):
(WTF::OverflowHandler>::checkConsistency):
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::adopt):
(WTF::equalIgnoringNullity):
* wtf/text/StringView.h:
(WTF::append):
* wtf/text/WTFString.h:

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

5 years agoUnreviewed iOS build fix
mmaxfield@apple.com [Tue, 18 Nov 2014 19:32:51 +0000 (19:32 +0000)]
Unreviewed iOS build fix

* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::platformInit):

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

5 years agoiOS build fix.
mitz@apple.com [Tue, 18 Nov 2014 19:31:49 +0000 (19:31 +0000)]
iOS build fix.

* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::platformInit):

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

5 years ago[WinCairo] Compile errors when GStreamer is enabled.
commit-queue@webkit.org [Tue, 18 Nov 2014 19:10:21 +0000 (19:10 +0000)]
[WinCairo] Compile errors when GStreamer is enabled.
https://bugs.webkit.org/show_bug.cgi?id=137000

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-11-18
Reviewed by Philippe Normand.

MSVC does not allow the keyword default on move constructors and move assignment operators.

* wtf/gobject/GMainLoopSource.cpp:
(WTF::GMainLoopSource::cancel):
(WTF::GMainLoopSource::socketCallback):
* wtf/gobject/GMainLoopSource.h:
(WTF::GMainLoopSource::Context::operator=):

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

5 years agoUnreviewed, rolling out r176264.
commit-queue@webkit.org [Tue, 18 Nov 2014 18:52:38 +0000 (18:52 +0000)]
Unreviewed, rolling out r176264.
https://bugs.webkit.org/show_bug.cgi?id=138837

caused many test failures (Requested by litherum on #webkit).

Reverted changeset:

"Subclass CachedFont for SVG fonts"
https://bugs.webkit.org/show_bug.cgi?id=138686
http://trac.webkit.org/changeset/176264

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

5 years agoUnreviewed, rolling out r176207.
commit-queue@webkit.org [Tue, 18 Nov 2014 18:14:45 +0000 (18:14 +0000)]
Unreviewed, rolling out r176207.
https://bugs.webkit.org/show_bug.cgi?id=138836

Not ready yet (Requested by ap on #webkit).

Reverted changeset:

"Update WebKit to build with LLVM TOT"
https://bugs.webkit.org/show_bug.cgi?id=138519
http://trac.webkit.org/changeset/176207

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

5 years ago[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
dbates@webkit.org [Tue, 18 Nov 2014 18:05:57 +0000 (18:05 +0000)]
[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138802

Reviewed by David Kilzer.

Source/WebCore:

Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h
that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI
and use these headers instead of the including private headers corresponding to these libraries/frameworks.

* WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and
MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h,
DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project.
* bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h.
* bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives.
* platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h
for private header IOKit/pwr_mgt/IOPMLib.h.
* platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h
for private header dispatch/private.h.
* platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h
for private header mach-o/dyld_priv.h.
* platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for
private header MobileGestalt.h.
* platform/spi/cocoa/DispatchSPI.h: Added.
* platform/spi/cocoa/DynamicLinkerSPI.h: Added.
* platform/spi/cocoa/IOPMLibSPI.h: Added.
* platform/spi/cocoa/MachVMSPI.h: Added.
* platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
* platform/spi/ios/MobileGestaltSPI.h: Added.

Source/WebKit/mac:

Include headers DispatchSPI.h and MobileGestaltSPI.h instead of including
libdispatch and MobileGestalt headers directly.

* WebView/WebView.mm:

Source/WebKit2:

Include headers DispatchSPI.h and MachVMSPI.h.h instead of including
libdispatch and Mach headers directly.

* Platform/mac/SharedMemoryMac.cpp:
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm:

Tools:

Include header MachVMSPI.h instead of including the private header mach/mach_vm.h.

* DumpRenderTree/mac/CheckedMalloc.cpp:

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

5 years agoSubclass CachedFont for SVG fonts
mmaxfield@apple.com [Tue, 18 Nov 2014 18:04:17 +0000 (18:04 +0000)]
Subclass CachedFont for SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=138686

Reviewed by Simon Fraser.

Source/WebCore:

CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it.
Splitting out this SVG-specific code into a subclass of CachedFont
cleans up the design.

No new tests because there is no behavior change.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): There are two sections
in this function; one for SVG fonts and one for regular fonts.
I've moved these two sections into CachedFont and SVGCachedFont,
thereby simplifying this function.
(WebCore::CSSFontFaceSource::ensureFontData): Ditto.
(WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header.
(WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto.
(WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto.
* css/CSSFontFaceSource.h: Put functions that are simple enough to
be inlined here.
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience
function.
(WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean
from CSSFontSelector to CachedResourceHandle regarding if we should
be using SVGCachedFont instead of CachedFont.
* css/CSSFontFaceSrcValue.h: New convenience function.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceType): Update for new
CachedResource type
(WebCore::cachedResourcesForFrame): Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
(WebCore::CachedFont::ensureCustomFontData): Taken from
CSSFontFaceSource::getFontData()
(WebCore::CachedFont::getFontData): Ditto.
(WebCore::CachedFont::platformDataFromCustomData): Ditto.
(WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont.
(WebCore::CachedFont::getSVGFontById): Ditto.
* loader/cache/CachedFont.h:
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType): Update for new enum
type.
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource): Takes new boolean.
(WebCore::CachedResourceLoader::requestFont): Ditto.
(WebCore::CachedResourceLoader::checkInsecureContent): Update for
new enum type
(WebCore::CachedResourceLoader::canRequest): Ditto.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGFont.cpp: Added.
(WebCore::CachedSVGFont::CachedSVGFont): Moved from
CSSFontFaceSource::getFontData() and CachedFont
(WebCore::CachedSVGFont::getFontData): Ditto.
(WebCore::CachedSVGFont::platformDataFromCustomData): Ditto.
(WebCore::CachedSVGFont::ensureCustomFontData): Ditto.
(WebCore::CachedSVGFont::getSVGFontById): Ditto.
(WebCore::CachedSVGFont::firstFontFace): Ditto.
* loader/cache/CachedSVGFont.h: Subclass CachedFont.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getStatistics): Update for new enum.
* svg/SVGFontFaceUriElement.cpp:
(WebCore::isSVGFontTarget): Convenience function.
(WebCore::SVGFontFaceUriElement::loadFont): Update for new
boolean.

Source/WebKit2:

Update for enum type.

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::maximumBufferingTime):

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

5 years agoUse underlining metrics from the font file
mmaxfield@apple.com [Tue, 18 Nov 2014 18:04:13 +0000 (18:04 +0000)]
Use underlining metrics from the font file
https://bugs.webkit.org/show_bug.cgi?id=138762

Patch by Myles C. Maxfield <litherum@gmail.com> on 2014-11-18
Reviewed by Dave Hyatt.

Source/WebCore:

Test: platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html

* platform/graphics/FontMetrics.h: Adding variables for text decoration thickness and
underline position.
(WebCore::FontMetrics::FontMetrics):
(WebCore::FontMetrics::decorationThickness):
(WebCore::FontMetrics::setDecorationThickness):
(WebCore::FontMetrics::underlinePosition):
(WebCore::FontMetrics::setUnderlinePosition):
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::platformInit): Initialize new FontMetrics members.
* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/win/SimpleFontDataCGWin.cpp:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/win/SimpleFontDataCairoWin.cpp:
(WebCore::SimpleFontData::platformInit): Ditto.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::initGDIFont): Ditto.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration): Use FontMetrics data.
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset): Ditto.
(WebCore::visualOverflowForDecorations): Ditto.
* style/InlineTextBoxStyle.h:
(WebCore::textDecorationStrokeThickness): Deleted.
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFontData): Initialize new FontMetrics members.

LayoutTests:

This patch makes underline placement platform-dependent.

* platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html: Renamed from LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-thickness-expected.html.
* platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html: Renamed from LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-thickness.html.

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

5 years agoImprove Ruby selection (getting rid of overlap and improving gap filling)
hyatt@apple.com [Tue, 18 Nov 2014 17:54:52 +0000 (17:54 +0000)]
Improve Ruby selection (getting rid of overlap and improving gap filling)
https://bugs.webkit.org/show_bug.cgi?id=138250

Reviewed by Dean Jackson.

Source/WebCore:

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::blockSelectionGaps):
Add Ruby text in along with the Ruby base.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::inlineSelectionGaps):
Don't let block gaps get filled in here.

* rendering/RenderRubyBase.h:
Expose accessor to the ruby run.

* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::rubyRun):
* rendering/RenderRubyText.h:
Add accessor to the ruby run.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::selectionTop):
(WebCore::RootInlineBox::selectionBottom):
Improve selectionTop and selectionBottom of ruby bases to avoid the
ruby text. Improve the selectionTop and selectionBottom of ruby texts
to fill the gap up to the previous/next line as appropriate.

LayoutTests:

Added fast/repaint/selection-ruby-rl.html

* fast/repaint/selection-ruby-rl-expected.txt: Added.
* fast/repaint/selection-ruby-rl.html: Added.

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

5 years agocrypto: Use sequence<> instead of KeyUsage[] in IDL.
commit-queue@webkit.org [Tue, 18 Nov 2014 17:45:00 +0000 (17:45 +0000)]
crypto: Use sequence<> instead of KeyUsage[] in IDL.
https://bugs.webkit.org/show_bug.cgi?id=138823

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-11-18
Reviewed by Darin Adler.

Use sequence<KeyUsage> instead of KeyUsage[] in crypto IDL as per spec: https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/
Overview.html#SubtleCrypto-method-generateKey

No new tests, no behavior change.

* crypto/SubtleCrypto.idl:

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

5 years agoUnreviewed. Fix after /webkit2/WebKitWebView/default-context r176256.
carlosgc@webkit.org [Tue, 18 Nov 2014 17:21:27 +0000 (17:21 +0000)]
Unreviewed. Fix after /webkit2/WebKitWebView/default-context r176256.

Forgot to fix this test before landing.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewDefaultContext):

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

5 years agoHRTFDatabaseLoader is not an absolute condition to run audioContext
philn@webkit.org [Tue, 18 Nov 2014 16:31:36 +0000 (16:31 +0000)]
HRTFDatabaseLoader is not an absolute condition to run audioContext
https://bugs.webkit.org/show_bug.cgi?id=138829

Reviewed by Jer Noble.

This patch is a port of the following Blink revision by
<keonho07.kim@samsung.com>:
<https://src.chromium.org/viewvc/blink?revision=167887&view=revision>

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::isRunnable): Deleted.
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::hrtfDatabaseLoader): Deleted.
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::render):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::offlineRender):
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::PannerNode):
(WebCore::PannerNode::process):
(WebCore::PannerNode::initialize):
(WebCore::PannerNode::setPanningModel):
* Modules/webaudio/PannerNode.h:
* Modules/webaudio/RealtimeAnalyser.cpp:
* Modules/webaudio/RealtimeAnalyser.h:
* platform/audio/HRTFDatabaseLoader.cpp:
(WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):

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

5 years agoUnreviewed, rolling out r176218.
commit-queue@webkit.org [Tue, 18 Nov 2014 16:09:46 +0000 (16:09 +0000)]
Unreviewed, rolling out r176218.
https://bugs.webkit.org/show_bug.cgi?id=138827

seems to have caused regressions on the perf bots (Requested
by lajava on #webkit).

Reverted changeset:

"[CSS Grid Layout] Upgrade align-self and align-items parsing
to CSS 3"
https://bugs.webkit.org/show_bug.cgi?id=133359
http://trac.webkit.org/changeset/176218

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

5 years agofast/multicol/newmulticol tests use a non-existent resource
mihnea@adobe.com [Tue, 18 Nov 2014 15:24:19 +0000 (15:24 +0000)]
fast/multicol/newmulticol tests use a non-existent resource
https://bugs.webkit.org/show_bug.cgi?id=138800

Reviewed by Andrei Bucur.

Fix path in tests.

* fast/multicol/newmulticol/compare-with-old-impl/shrink-to-column-height-for-pagination-expected.html:
* fast/multicol/newmulticol/compare-with-old-impl/shrink-to-column-height-for-pagination.html:
* fast/multicol/newmulticol/float-multicol-expected.html:
* fast/multicol/newmulticol/float-multicol.html:

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

5 years ago[GTK] Add API to create a WebKitWebContext
carlosgc@webkit.org [Tue, 18 Nov 2014 14:19:15 +0000 (14:19 +0000)]
[GTK] Add API to create a WebKitWebContext
https://bugs.webkit.org/show_bug.cgi?id=138826

Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

We have always used a default web context without providing API to
create others. The main reason was that nobody requested it and we
haven't needed it either. The main problem of the default web
context is that you can't configure anything during
construction. This hasn't been a problem so far because all the
web context configuration we expose in the API can be configured
after construction. But now we need to expose API to allow the
user to configure the local storage directory, which is a
construct only configuration. The default web context was also a
problem for our unit tests, because sharing the same context made
it difficult to ensure tests cases are independent to each other.

* UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
(WebKitGeolocationProvider::~WebKitGeolocationProvider): Reset the
provider to avoid crashes when web context is destroyed and a new
one is created.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed): Add constructed implementation to
create the WebContext and initialize it.
(webkitWebContextDispose): Detach web context clients to avoid
crashes when a client callback is called on a disposed WebKitWebContext.
(webkit_web_context_class_init): Initialize gettext, add
constructed implementation and add the pointer to the vmethods
when creating signals.
(createDefaultWebContext): Simply create a WebKitWebContext.
(webkit_web_context_new): New public method to create a WebKitWebContext.
(injectedBundleFilename): Deleted.
* UIProcess/API/gtk/WebKitWebContext.h: Add virtual methods for
signals, so that users can inherit from WebKitWebContext and
override the virtual methods.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.

Tools:

Use a different WebKitWebContext for every test to ensure test
cases are independent to each other. Tests using DBus to
communicate with the injected bundle extension now use a unique
name for the well known DBus name.

* TestWebKitAPI/Tests/WebKit2Gtk/TestAuthentication.cpp:
(beforeAll): Remove comment about the order of the tests and
move the success test before the failed one now that tests don't
depend on each others.
* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:
(beforeAll): Remove call to set the web extensions directory,
since this is now done for all test in the Test constructor.
* TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp:
(beforeAll): Do not create a temporary directory, a temporary data
directory is now created for all tests.
(afterAll):
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp:
(testWebKitDOMNodeHierarchyNavigation): Pass the web extension ID
to the web process test runner.
(testWebKitDOMNodeInsertion): Ditto.
(testWebKitDOMNodeTagNames): Ditto.
(beforeAll): Remove call to set the web extensions directory.
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNodeFilter.cpp:
(runTest): Pass the web extension ID to the web process test runner.
(beforeAll): Remove call to set the web extensions directory.
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMXPathNSResolver.cpp:
(runTest): Pass the web extension ID to the web process test runner.
(beforeAll): Remove call to set the web extensions directory.
* TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:
(createFileAtDestination): Use Test::dataDirectory() as base dir
for temporary files.
(beforeAll): Do not create a temporary directory.
(afterAll):
* TestWebKitAPI/Tests/WebKit2Gtk/TestFrame.cpp:
(webkitFrameTestRun): Pass the web extension ID to the web process
test runner.
(beforeAll): Remove call to set the web extensions directory.
* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:
(beforeAll): Remove call to set the web extensions directory.
* TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp:
(testProcessPerWebView): Use local member instead of global variable.
(testMultiprocessWebViewCreateReadyClose): Ditto.
(beforeAll): Do not connect to initialize-web-extensions, Test now
connects to the signal for all tests and calls a virtual method
that test can override.
(afterAll):
(initializeWebExtensions): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp:
(testPrintOperationPrint): Use Test::dataDirectory() as base dir
for temporary files.
(beforeAll): Do not create a temporary directory.
(afterAll):
* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
(beforeAll): Remove call to set the web extensions directory.
* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(beforeAll): Remove comment about the tests order.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp:
(testWebExtensionGetTitle): Build the DBus service name using the
web extension ID.
(testDocumentLoadedSignal): Ditto.
(testWebKitWebViewProcessCrashed): Ditto.
(testWebExtensionIsolatedWorld): Ditto.
(beforeAll): Remove initialization-user-data test, since now all
tests are passing user data to the web extension.
(testWebExtensionInitializationUserData): Deleted.
(initializeWebExtensions): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp:
(testSetDirectory): Use the web context member inherited from Test.
(testClearDatabase): Ditto.
(testGetFaviconURI): Ditto.
(beforeAll): Do not create a temporary directory.
(afterAll):
(webkitFaviconDatabaseFinalizedCallback): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp:
(UserContentManagerTest::UserContentManagerTest):
(beforeAll): Remove call to set the web extensions directory.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
(testWebContextDefault): Check also that a newly create web
context is not the default web context.
(testWebContextSpellChecker): Use the web context member inherited
from Test.
(testWebContextLanguages): Ditto.
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(methodCallCallback): Remove GetInitializationUserData method.
(webkit_web_extension_initialize_with_user_data): Always create
the DBus name using the user data provided.
(makeBusName): Deleted.
* TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp:
(webkit_web_extension_initialize_with_user_data): Create the DBus
name using the user data provided.
(webkit_web_extension_initialize): Deleted.
* TestWebKitAPI/gtk/WebKit2Gtk/TestMain.cpp:
(Test::dataDirectory): Return the temporary data directory.
(removeNonEmptyDirectory): Also remove directories recursively.
(main): Remove the disk cache directory initialization, since this
is now done in the Test constructor.
* TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h:
(Test::initializeWebExtensionsCallback): Call the virtual method
initializeWebExtensions()
(Test::Test): Create a new WebKitWebContext and initialize it.
(Test::~Test): Disconnect initialize-web-extensions signal.
(Test::initializeWebExtensions): Set the web extensions directory
and user data.
* TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp:
(WebProcessTestRunner::~WebProcessTestRunner): Use nullptr.
(WebProcessTestRunner::runTest): Build the DBus proxy using a
unique name created with the Test web extension ID.
(WebProcessTestRunner::proxy): Deleted.
* TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.h:
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:
(WebViewTest::WebViewTest): Create the web view with the Test web
context.
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h: Add optional user
content manager parameter to the constructor.

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

5 years ago[GTK] Mesa build fails over llvm-3.5
changseok.oh@collabora.com [Tue, 18 Nov 2014 13:40:49 +0000 (13:40 +0000)]
[GTK] Mesa build fails over llvm-3.5
https://bugs.webkit.org/show_bug.cgi?id=138825

Reviewed by Gustavo Noronha Silva.

OwningPtr.h have been removed in llvm-3.5. Instread we should use std::unique_ptr for mesa build.

* gtk/jhbuild.modules:
* gtk/patches/mesa-gallivm-Fix-build-after-LLVM-commit-211259.patch: Added.

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

5 years agoAX: [ATK] Crash getting the orientation of a MenuListOption after the MenuList was...
jdiggs@igalia.com [Tue, 18 Nov 2014 12:51:59 +0000 (12:51 +0000)]
AX: [ATK] Crash getting the orientation of a MenuListOption after the MenuList was removed from the document
https://bugs.webkit.org/show_bug.cgi?id=138727

Reviewed by Chris Fleizach.

Source/WebCore:

AccessibilityMenuListOption::elementRect() returns the value of the
grandparent MenuList, asserting that the grandparent exists with that
role. But it is possible to have an existing MenuListOption and remove
the element which had been backing that MenuList from the document.
Adding null checks prior to the assertions prevents our crashing if the
parent or grandparent was removed.

Test: platform/gtk/accessibility/combobox-descendants-orientation-crash.html

* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::elementRect):

LayoutTests:

* platform/gtk/accessibility/combobox-descendants-orientation-crash-expected.txt: Added.
* platform/gtk/accessibility/combobox-descendants-orientation-crash.html: Added.

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

5 years ago[SOUP] [GnuTLS] Don't use a SSL3.0 record version in client hello.
clopez@igalia.com [Tue, 18 Nov 2014 09:32:23 +0000 (09:32 +0000)]
[SOUP] [GnuTLS] Don't use a SSL3.0 record version in client hello.
https://bugs.webkit.org/show_bug.cgi?id=138794

Reviewed by Sergio Villar Senin.

It seems that following POODLE many sites incorrectly banned SSL 3.0
record packet versions. Since GnuTLS uses a SSL 3.0 record to
advertise TLS 1.2, they are effectively banning it even if it doesn't
advertise SSL 3.0. That is a server issue, but it can be worked around
by using the modifier %LATEST_RECORD_VERSION.

With this modifier, GnuTLS will use the latest TLS version record
in client hello instead of using the default SSL 3.0.

* NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
(main):
* WebProcess/EntryPoint/unix/WebProcessMain.cpp:
(main):

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

5 years agoFix a small indentation mistake in SelectorCodeGenerator::generateNthFilterTest
benjamin@webkit.org [Tue, 18 Nov 2014 04:50:31 +0000 (04:50 +0000)]
Fix a small indentation mistake in SelectorCodeGenerator::generateNthFilterTest

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-17

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthFilterTest):

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

5 years agoFix two bad function names of HTMLFormControlElement
benjamin@webkit.org [Tue, 18 Nov 2014 04:30:08 +0000 (04:30 +0000)]
Fix two bad function names of HTMLFormControlElement
https://bugs.webkit.org/show_bug.cgi?id=138790

Reviewed by Andreas Kling.

Darin suggested some name improvements in https://bugs.webkit.org/show_bug.cgi?id=138769

* dom/CheckedRadioButtons.cpp:
(WebCore::RadioButtonGroup::add):
(WebCore::RadioButtonGroup::updateCheckedState):
(WebCore::RadioButtonGroup::requiredAttributeChanged):
(WebCore::RadioButtonGroup::remove):
(WebCore::RadioButtonGroup::updateValidityForAllButtons):
(WebCore::RadioButtonGroup::setNeedsValidityCheckForAllButtons): Deleted.
* html/FileInputType.cpp:
(WebCore::FileInputType::setFiles):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::computeWillValidate):
(WebCore::HTMLButtonElement::recalcWillValidate): Deleted.
* html/HTMLButtonElement.h:
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::requiredAttributeChanged):
(WebCore::HTMLFormControlElement::computeWillValidate):
(WebCore::HTMLFormControlElement::willValidate):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::isValidFormControlElement):
(WebCore::HTMLFormControlElement::updateValidity):
(WebCore::HTMLFormControlElement::setCustomValidity):
(WebCore::HTMLFormControlElement::recalcWillValidate): Deleted.
(WebCore::HTMLFormControlElement::setNeedsValidityCheck): Deleted.
* html/HTMLFormControlElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setValueInternal):
(WebCore::HTMLInputElement::setValueFromRenderer):
(WebCore::HTMLInputElement::computeWillValidate):
(WebCore::HTMLInputElement::parseMaxLengthAttribute):
(WebCore::HTMLInputElement::recalcWillValidate): Deleted.
* html/HTMLInputElement.h:
* html/HTMLKeygenElement.h:
* html/HTMLOutputElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::deselectItems):
(WebCore::HTMLSelectElement::optionSelectedByUser):
(WebCore::HTMLSelectElement::listBoxSelectItem):
(WebCore::HTMLSelectElement::add):
(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::childrenChanged):
(WebCore::HTMLSelectElement::optionElementChildrenChanged):
(WebCore::HTMLSelectElement::setLength):
(WebCore::HTMLSelectElement::selectAll):
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::restoreFormControlState):
(WebCore::HTMLSelectElement::parseMultipleAttribute):
(WebCore::HTMLSelectElement::reset):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::parseAttribute):
(WebCore::HTMLTextAreaElement::subtreeHasChanged):
(WebCore::HTMLTextAreaElement::setValue):
(WebCore::HTMLTextAreaElement::setNonDirtyValue):

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

5 years agoAdd parsing for :role()
commit-queue@webkit.org [Tue, 18 Nov 2014 02:21:39 +0000 (02:21 +0000)]
Add parsing for :role()
https://bugs.webkit.org/show_bug.cgi?id=138310

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2014-11-17
Reviewed by Benjamin Poulain.

Source/WebCore:

Add support for parsing :role() pseudo class. The implementation of selector
matching will be in a follow-up patch.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSSelector.cpp:
(WebCore::appendPseudoClassFunctionTail):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):

LayoutTests:

* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
* fast/selectors/invalid-functional-pseudo-class-expected.txt:
* fast/selectors/invalid-functional-pseudo-class.html:

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

5 years ago[iOS WK1] Sometimes, missing tiles in -webkit-overflow-scrolling: touch in UIWebViews
simon.fraser@apple.com [Tue, 18 Nov 2014 01:49:33 +0000 (01:49 +0000)]
[iOS WK1] Sometimes, missing tiles in -webkit-overflow-scrolling: touch in UIWebViews
https://bugs.webkit.org/show_bug.cgi?id=138815
rdar://problem/18746203

Reviewed by Tim Horton.

The scroll-velocity-related data members on FrameView, added in r168233, were uninitialized in UIWebViews,
so FrameView::computeCoverageRect() could return garbage results, leading to too much or too little tile coverage.

We still add additional coverage from the new inclusion of a margin area, but, for simplicity, leave that the same
between WK1 and WK2 for now.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):

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

5 years agoAdd initial layout testing coverage for timer throttling
cdumez@apple.com [Tue, 18 Nov 2014 01:14:46 +0000 (01:14 +0000)]
Add initial layout testing coverage for timer throttling
https://bugs.webkit.org/show_bug.cgi?id=138809

Reviewed by Simon Fraser.

Source/WebCore:

Add isTimerThrottled() API to Internals so that we can add layout test
coverage for timer throttling.

Tests: fast/dom/nested-timer-invisible-element-throttling.html
       fast/dom/nested-timer-visible-element-throttling.html
       fast/dom/repeating-timer-invisible-element-throttling.html
       fast/dom/repeating-timer-visible-element-throttling.html

* page/DOMTimer.h:
* testing/Internals.cpp:
(WebCore::Internals::isTimerThrottled):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Add initial layout test coverage for timer throttling. It currently
covers the following cases:
- Repeating timer changes the style of an Element that is visible
- Repeating timer changes the style of an Element that is not visible
  (i.e. "display: none").
- Repeating timer doing DOM mutations
- Nested timer changes the style of an Element that is visible
- Nested timer changes the style of an Element that is not visible
  (i.e. "display: none").
- Nested timer doing DOM mutations

More layout tests are coming. In particular, we should add coverage for
changing the style of an Element outside the viewport. We should also
Test that the timer gets unthrottled if necessary on scrolling / layout.

* fast/dom/nested-timer-invisible-element-throttling-expected.txt: Added.
* fast/dom/nested-timer-invisible-element-throttling.html: Added.
* fast/dom/nested-timer-visible-element-throttling-expected.txt: Added.
* fast/dom/nested-timer-visible-element-throttling.html: Added.
* fast/dom/repeating-timer-invisible-element-throttling-expected.txt: Added.
* fast/dom/repeating-timer-invisible-element-throttling.html: Added.
* fast/dom/repeating-timer-visible-element-throttling-expected.txt: Added.
* fast/dom/repeating-timer-visible-element-throttling.html: Added.

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

5 years agoPage previews should be loaded sooner
conrad_shultz@apple.com [Tue, 18 Nov 2014 01:13:16 +0000 (01:13 +0000)]
Page previews should be loaded sooner
https://bugs.webkit.org/show_bug.cgi?id=138814

Reviewed by Tim Horton.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
Send -_createPreviewPopover..
(-[WKActionMenuController _previewURLFromActionMenu:]):
Relocate some logic to the new -_createPreviewPopover; gate early return on popover visibility.
(-[WKActionMenuController _createPreviewPopover]):
Renamed from -_createPreviewPopoverForURL:originRect:; explicitly send -loadView to warm up the preview view.
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]): Deleted.

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

5 years agoPreview is sometimes dismissed too early
bdakin@apple.com [Tue, 18 Nov 2014 00:47:40 +0000 (00:47 +0000)]
Preview is sometimes dismissed too early
https://bugs.webkit.org/show_bug.cgi?id=138811
-and corresponding-
rdar://problem/18900839

Reviewed by Tim Horton.

Don’t make the popover transient until didCloseMenu: time.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):

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

5 years agoRemove calls to deprecated NSMenu methods
bweinstein@apple.com [Mon, 17 Nov 2014 23:26:44 +0000 (23:26 +0000)]
Remove calls to deprecated NSMenu methods
https://bugs.webkit.org/show_bug.cgi?id=138808.

Reviewed by Anders Carlsson.

-[NSMenu menuChangedMessagesEnabled] and -[NSMenu setMenuChangedMessagesEnabled:] are no-ops as of 10.6.

* WebCoreSupport/PopupMenuMac.mm:
(PopupMenuMac::populate):

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

5 years agoSimple line layout: Rename FlowContentIterator and move implementation to SimpleLineL...
zalan@apple.com [Mon, 17 Nov 2014 23:17:51 +0000 (23:17 +0000)]
Simple line layout: Rename FlowContentIterator and move implementation to SimpleLineLayoutFlowContents.cpp
https://bugs.webkit.org/show_bug.cgi?id=138799

Reviewed by Antti Koivisto.

This is in preparation to support multiple renderers.
The FlowContents class will be used not just when we create runs, but also when we resolve them at painting time.

No change in functionality.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::textWidth): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent): Deleted.
(WebCore::SimpleLineLayout::FlowContentIterator::style): Deleted.
(WebCore::SimpleLineLayout::computeLineLeft): Deleted.
* rendering/SimpleLineLayoutFlowContents.cpp: Added.
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth):
* rendering/SimpleLineLayoutFlowContents.h: Added.
(WebCore::SimpleLineLayout::FlowContents::Style::Style):
(WebCore::SimpleLineLayout::FlowContents::style):
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):

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

5 years agoUnreviewed, rolling out r176232.
dbates@webkit.org [Mon, 17 Nov 2014 22:36:19 +0000 (22:36 +0000)]
Unreviewed, rolling out r176232.

Broke the Mac build. Will investigate offline.

Reverted changeset:

"[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions,
MobileGestalt"
https://bugs.webkit.org/show_bug.cgi?id=138802
http://trac.webkit.org/changeset/176232

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

5 years agoAdd printing functionality in JITted code for debugging purposes.
mark.lam@apple.com [Mon, 17 Nov 2014 22:03:04 +0000 (22:03 +0000)]
Add printing functionality in JITted code for debugging purposes.
<https://webkit.org/b/138660>

Reviewed by Geoffrey Garen.

Sometimes, for debugging, it'd be nice to be able to just print the
values of constants or registers used in JITted code, or even just
a string to log that certain pieces of JITted code have been executed.
Using the JIT probe mechanism, we can make this happen.

* assembler/ARMv7Assembler.h:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::CPUState::registerName):
(JSC::AbstractMacroAssembler::CPUState::registerValue):
(JSC::AbstractMacroAssembler::print):
(JSC::AbstractMacroAssembler::PrintArg::PrintArg):
(JSC::AbstractMacroAssembler::appendPrintArg):
(JSC::AbstractMacroAssembler::printInternal):
(JSC::AbstractMacroAssembler::printCallback):
* assembler/MacroAssemblerARM.cpp:
(JSC::MacroAssemblerARM::printCPURegisters):
(JSC::MacroAssemblerARM::printRegister):
* assembler/MacroAssemblerARM.h:
* assembler/MacroAssemblerARMv7.cpp:
(JSC::MacroAssemblerARMv7::printCPURegisters):
(JSC::MacroAssemblerARMv7::printRegister):
* assembler/MacroAssemblerARMv7.h:
* assembler/MacroAssemblerX86Common.cpp:
(JSC::MacroAssemblerX86Common::printRegister):
* assembler/MacroAssemblerX86Common.h:

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

5 years ago[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
dbates@webkit.org [Mon, 17 Nov 2014 21:59:03 +0000 (21:59 +0000)]
[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138802

Reviewed by David Kilzer.

Source/WebCore:

Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h
that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI
and use these headers instead of the including private headers corresponding to these libraries/frameworks.

* WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and
MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h,
DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project.
* bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h.
* bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives.
* platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h
for private header IOKit/pwr_mgt/IOPMLib.h.
* platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h
for private header dispatch/private.h.
* platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h
for private header mach-o/dyld_priv.h.
* platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for
private header MobileGestalt.h.
* platform/spi/cocoa/DispatchSPI.h: Added.
* platform/spi/cocoa/DynamicLinkerSPI.h: Added.
* platform/spi/cocoa/IOPMLibSPI.h: Added.
* platform/spi/cocoa/MachVMSPI.h: Added.
* platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
* platform/spi/ios/MobileGestaltSPI.h: Added.

Source/WebKit/mac:

Include headers DispatchSPI.h and MobileGestaltSPI.h instead of including
libdispatch and MobileGestalt headers directly.

* WebView/WebView.mm:

Source/WebKit2:

Include headers DispatchSPI.h and MachVMSPI.h.h instead of including
libdispatch and Mach headers directly.

* Platform/mac/SharedMemoryMac.cpp:
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm:

Tools:

Include header MachVMSPI.h instead of including the private header mach/mach_vm.h.

* DumpRenderTree/mac/CheckedMalloc.cpp:

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

5 years ago[iOS] CoreText and CoreUI SPI are not available in public SDK
dbates@webkit.org [Mon, 17 Nov 2014 21:52:58 +0000 (21:52 +0000)]
[iOS] CoreText and CoreUI SPI are not available in public SDK
https://bugs.webkit.org/show_bug.cgi?id=138760

Reviewed by David Kilzer.

Source/WebCore:

Add a SPI wrapper header CoreUISPI.h that forward declares CoreUI SPI
and use this header instead of including private headers of CoreUI directly.

Additionally, add more forward declarations for CoreText SPI.

* WebCore.xcodeproj/project.pbxproj: Add project header CoreUISPI.h.
* platform/graphics/ios/FontCacheIOS.mm: Include header CoreTextSPI.h instead
of including CoreText headers directly.
* platform/graphics/mac/FontMac.mm: Include header CoreUISPI.h instead
of including CoreUI headers directly.
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Remove unnecessary
include of CoreText headers. These headers will be included by header
CoreTextSPI.h (at the top of the file).
* platform/graphics/mac/SimpleFontDataMac.mm: Remove forward declaration
of CTFontDescriptorIsSystemUIFont() and include of header CTFontDescriptorPriv.h
as this duplicates the logic in CoreTextSPI.h, which is included in this file.
* platform/spi/cocoa/CoreTextSPI.h: Added more forward declarations. Simplified
#include directives.
* platform/spi/ios/CoreUISPI.h: Added.
* rendering/RenderThemeIOS.mm: Move CoreUI externs from this file to file
CoreUISPI.h and include header CoreUISPI.h.

Source/WebKit2:

Include header CoreTextSPI.h instead of including CoreText private headers.

* WebProcess/WebPage/WebPage.cpp:

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

5 years agomedia/track/track-in-band-cues-added-once.html fails sometimes
ap@apple.com [Mon, 17 Nov 2014 21:52:21 +0000 (21:52 +0000)]
media/track/track-in-band-cues-added-once.html fails sometimes
https://bugs.webkit.org/show_bug.cgi?id=138806

* platform/mac/TestExpectations: Marked as flaky.

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

5 years agoSimple line layout: Drop 16bit support temporarily.
zalan@apple.com [Mon, 17 Nov 2014 21:14:57 +0000 (21:14 +0000)]
Simple line layout: Drop 16bit support temporarily.
https://bugs.webkit.org/show_bug.cgi?id=138796

Reviewed by Antti Koivisto.

This is in preparation to multiple renderers support.
It requires code refactoring on top of the coming multiple renderers codebase.
(Not expecting any significant coverage shrinking.)

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::textWidth):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):

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

5 years agofast/multicol/newmulticol/spanner-crash.html still crashes sometimes
ap@apple.com [Mon, 17 Nov 2014 20:59:13 +0000 (20:59 +0000)]
fast/multicol/newmulticol/spanner-crash.html still crashes sometimes
https://bugs.webkit.org/show_bug.cgi?id=137316

* TestExpectations: Skipped it.

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

5 years agoDataDetectors PageOverlay callbacks can come in to the wrong overlay
timothy_horton@apple.com [Mon, 17 Nov 2014 20:27:55 +0000 (20:27 +0000)]
DataDetectors PageOverlay callbacks can come in to the wrong overlay
https://bugs.webkit.org/show_bug.cgi?id=138801
<rdar://problem/18991369>

Reviewed by Anders Carlsson.

We can call dataDetectorsDidHideUI on the wrong (or no) PageOverlay,
because it's possible to have another performActionMenuHitTestAtLocation
between the first one and the dataDetectorsDid*UI that correspond to it.

To make sure that the callbacks come to the right PageOverlay, plumb
an integer ID through all of the callbacks and find the overlay based on that.

* Shared/mac/ActionMenuHitTestResult.h:
Store the ID of the PageOverlay that overrode data detection.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Send the ID back to the Web process when replying from DD callbacks.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Store the ID of the PageOverlay that overrode data detection instead of
keeping the PageOverlay itself.

(WebKit::WebPage::dataDetectorsDidPresentUI):
(WebKit::WebPage::dataDetectorsDidChangeUI):
(WebKit::WebPage::dataDetectorsDidHideUI):
Find and reply to the correct page overlay.

* page/PageOverlay.cpp:
(WebCore::generatePageOverlayID):
(WebCore::PageOverlay::PageOverlay):
* page/PageOverlay.h:
Give each PageOverlay a unique ID.

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

5 years agoWhitespace action menus should focus the HitTestResult and create an insertion
bdakin@apple.com [Mon, 17 Nov 2014 20:09:50 +0000 (20:09 +0000)]
Whitespace action menus should focus the HitTestResult and create an insertion
point
https://bugs.webkit.org/show_bug.cgi?id=138786
-and corresponding-
rdar://problem/18944893

Reviewed by Tim Horton.

Whitespace menus should cause the HitTestResult to be focused, and they should set
the selection based on the HitTest location.
Source/WebKit/mac:

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController isMenuForTextContent]):
(-[WebActionMenuController focusAndSelectHitTestResult]):
(-[WebActionMenuController willOpenMenu:withEvent:]):

Source/WebKit2:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController isMenuForTextContent]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):

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

5 years agoFix JavaScriptCore build with newer versions of clang.
andersca@apple.com [Mon, 17 Nov 2014 19:58:22 +0000 (19:58 +0000)]
Fix JavaScriptCore build with newer versions of clang.
<rdar://problem/18978716>

* heap/Heap.cpp:
(JSC::Heap::visitTempSortVectors):
(JSC::Heap::deleteAllCompiledCode): Deleted.
* inspector/agents/InspectorConsoleAgent.h:

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

5 years ago[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
jfernandez@igalia.com [Mon, 17 Nov 2014 19:52:42 +0000 (19:52 +0000)]
[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
https://bugs.webkit.org/show_bug.cgi?id=133359

Reviewed by David Hyatt.

Source/WebCore:

Broaden justify-self's parsing name as a preparation of migrating
align-self, align-items and justify-items to the CSS 3 Alignment syntax.

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

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

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

This change also removes EAlignItems as it is now unused.

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

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isKeywordPropertyID): Removed align-items and align-self from the list.
(WebCore::isValidKeywordPropertyAndValue): Removed align-items and align-self from the list.
(WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
(WebCore::isBaselinePositionKeyword): Utility function added to identify Baseline keyword values.
(WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
(WebCore::CSSParser::parseJustifySelf): Deleted.
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Refactoring some mapping functions.
       (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
(WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
(WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
(WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
(WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Added a new adjustment to resolve the "auto" vale on the alignment properties.
(WebCore::StyleResolver::adjustStyleForAlignment): Added. Function to resolve the "auto" vale on the alignment properties.
(WebCore::StyleResolver::applyProperty):
(WebCore::isDisplayFlexibleBox): Deleted. Moved to the RenderStyle.
(WebCore::isDisplayGridBox): Deleted. Moved to the RenderStyle.
(WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to the RenderStyle.
* css/StyleResolver.h:
* rendering/RenderBox.cpp:
(WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPosition enum.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPosition enum.
(WebCore::resolveAlignment): Consider also that align-items could be "auto", since it's the default now.
(WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPosition enum.
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.cpp:
(WebCore::createFullScreenStyle): Adapted to the new ItemPosition enum.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPosition enum.
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPosition enum.
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPosition enum.
(WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPosition enum.
* rendering/style/RenderStyle.h: Adapted to the new ItemPosition enum.
* rendering/style/RenderStyleConstants.h: Adapted to the new ItemPosition enum.
* rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPosition enum.
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPosition enum.
(WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPosition enum.
* rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPosition enum.
* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange): Changes in the alignItems property will cause a Detach.

LayoutTests:

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

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

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

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

5 years agoFix WTF build with newer versions of clang.
andersca@apple.com [Mon, 17 Nov 2014 19:48:47 +0000 (19:48 +0000)]
Fix WTF build with newer versions of clang.
<rdar://problem/18978705>

* wtf/HashTable.h:
(WTF::removeIterator):
* wtf/dtoa/utils.h:
(WTF::double_conversion::BitCast):

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

5 years agoAttribute text in HTMLAnchorElement should behave as per specification.
commit-queue@webkit.org [Mon, 17 Nov 2014 19:24:52 +0000 (19:24 +0000)]
Attribute text in HTMLAnchorElement should behave as per specification.
https://bugs.webkit.org/show_bug.cgi?id=138557

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-11-17
Reviewed by Darin Adler.

Source/WebCore:

attribute text in HTMLAnchorElement should not be readonly as per specification
http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute.
Also This matches the behavior of Chrome 38 and FireFox.

Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::text):
(WebCore::HTMLAnchorElement::setText):
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:

LayoutTests:

* fast/dom/HTMLAnchorElement/anchor-text-attribute-expected.txt: Added.
* fast/dom/HTMLAnchorElement/anchor-text-attribute.html: Added.

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

5 years agoThrottle timers that change the style of elements outside the viewport
cdumez@apple.com [Mon, 17 Nov 2014 19:23:43 +0000 (19:23 +0000)]
Throttle timers that change the style of elements outside the viewport
https://bugs.webkit.org/show_bug.cgi?id=138292

Reviewed by Antti Koivisto.

Throttle timers that change the style of elements outside the viewport
to 1 second, similarly to what was already done for timers interacting
with non user observable plugins. To be conservative, we don't throttle
timers that also cause DOM Tree modifications (e.g. adding/removing
nodes, modify element attributes).

On huffingtonpost.com, the CPU usage is at ~17% when the top scrolling
banner is inside the viewport on my machine. Without this patch, CPU
usage would stay ~17% when the banner is outside the viewport. Thanks
to timer throttling, CPU usage now goes down to ~1.5%, without user
observable side effects. The timers get unthrottled when they are
inside the viewport again (i.e. due to scrolling or layout).

On espn.com, the CPU usage goes down from ~7% at the top of the page
to ~1% when scrolling to the bottom of the page. On ebay.com, CPU
usage goes down from ~25% at the top of the page to less than 1% when
scrolling to the bottom of the page.

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

5 years agoHaving 30+ flaky failures breaks EWS
commit-queue@webkit.org [Mon, 17 Nov 2014 19:06:38 +0000 (19:06 +0000)]
Having 30+ flaky failures breaks EWS
https://bugs.webkit.org/show_bug.cgi?id=138743

Patch by Jake Nielsen <jacob_nielsen@apple.com> on 2014-11-17
Reviewed by Alexey Proskuryakov.

Adds tests to ensure that the problem has been solved.
* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
(test_first_failure_limit):
(test_first_failure_limit_with_some_tree_redness):
(test_second_failure_limit):
(test_tree_failure_limit_with_patch_that_potentially_fixes_some_redness):
(test_first_and_second_failure_limit):
(test_first_and_clean_failure_limit):
(test_first_second_and_clean_failure_limit):
(test_very_red_tree_retry): Deleted.
Really this was renamed to test_first_second_and_clean_failure_limit.
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
Makes the appropriate changes to PatchAnalysisTask to make sure that
even when the first test run hits the failure limit, it will still try
a second run.
(PatchAnalysisTask._results_failed_different_tests):
(PatchAnalysisTask._test_patch):
(PatchAnalysisTask._continue_testing_patch_that_exceeded_failure_limit_on_first_or_second_try): Deleted.

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

5 years ago[WinCairo] Compile error, CoreGraphics header file included.
commit-queue@webkit.org [Mon, 17 Nov 2014 18:58:58 +0000 (18:58 +0000)]
[WinCairo] Compile error, CoreGraphics header file included.
https://bugs.webkit.org/show_bug.cgi?id=138795

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-11-17
Reviewed by Brent Fulgham.

CoreGraphics is not available on WinCairo.

* platform/graphics/win/FontCacheWin.cpp:

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

5 years agomedia/track/track-cues-sorted-before-dispatch.html is flaky on Mountain Lion
ap@apple.com [Mon, 17 Nov 2014 18:56:36 +0000 (18:56 +0000)]
media/track/track-cues-sorted-before-dispatch.html is flaky on Mountain Lion
https://bugs.webkit.org/show_bug.cgi?id=138798

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

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

5 years agoUnreviewed, rolling out r176169.
commit-queue@webkit.org [Mon, 17 Nov 2014 18:48:51 +0000 (18:48 +0000)]
Unreviewed, rolling out r176169.
https://bugs.webkit.org/show_bug.cgi?id=138797

Appears to have broken svg/custom/anchor-on-use.svg (Requested
by ap on #webkit).

Reverted changeset:

"Attribute text in HTMLAnchorElement should behave as per
specification."
https://bugs.webkit.org/show_bug.cgi?id=138557
http://trac.webkit.org/changeset/176169

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

5 years agoUpdate WebKit to build with LLVM TOT
commit-queue@webkit.org [Mon, 17 Nov 2014 18:42:14 +0000 (18:42 +0000)]
Update WebKit to build with LLVM TOT
https://bugs.webkit.org/show_bug.cgi?id=138519

Patch by Juergen Ributzka <juergen@apple.com> on 2014-11-17
Reviewed by Alexey Proskuryakov.

* Configurations/LLVMForJSC.xcconfig:
* llvm/LLVMAPIFunctions.h:
* llvm/library/LLVMExports.cpp:
(initializeAndGetJSCLLVMAPI):

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