WebKit-https.git
6 years agoAX: Do the early return when role is different than UnknownRole
k.czech@samsung.com [Thu, 23 Oct 2014 09:02:00 +0000 (09:02 +0000)]
AX: Do the early return when role is different than UnknownRole
https://bugs.webkit.org/show_bug.cgi?id=137880

Reviewed by Chris Fleizach.

We do not need to call ariaRoleAttribute() to check whether m_ariaRole is different than UnknownRole.
Just check m_ariaRole instead.

No new tests, no behavior change, just some cleanup

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::determineAccessibilityRole):

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

6 years ago[EFL] Set proper default value for WebPageAccessibilityObject
k.czech@samsung.com [Thu, 23 Oct 2014 08:21:40 +0000 (08:21 +0000)]
[EFL] Set proper default value for WebPageAccessibilityObject
https://bugs.webkit.org/show_bug.cgi?id=137951

Reviewed by Csaba Osztrogonác.

Initial value for WebPageAccessibilityObject should be nullptr.

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

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

6 years ago[EFL] Introduce EFL Accessibility in WebKit
k.czech@samsung.com [Thu, 23 Oct 2014 08:02:35 +0000 (08:02 +0000)]
[EFL] Introduce EFL Accessibility in WebKit
https://bugs.webkit.org/show_bug.cgi?id=137819

Reviewed by Gyuyoung Kim.

EFL Accessibility provides an API that is used to notify clients that certain
Accessibility events occur. Utilizing it makes WebKit-EFL coherent with EFL native
accessibility approach.

* PlatformEfl.cmake:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/EwkView.h:
(EwkView::webAccessibility):
* UIProcess/API/efl/WebAccessibility.cpp: Added.
(WebKit::WebAccessibility::WebAccessibility):
(WebKit::WebAccessibility::~WebAccessibility):
(WebKit::WebAccessibility::eventHandler):
(WebKit::WebAccessibility::executeGestureAction):
(WebKit::WebAccessibility::activate):
(WebKit::WebAccessibility::read):
(WebKit::WebAccessibility::readNext):
(WebKit::WebAccessibility::readPrev):
(WebKit::WebAccessibility::up):
(WebKit::WebAccessibility::down):
(WebKit::WebAccessibility::scroll):
(WebKit::WebAccessibility::mouse):
(WebKit::WebAccessibility::enable):
(WebKit::WebAccessibility::disable):
* UIProcess/API/efl/WebAccessibility.h: Added.
(WebKit::WebAccessibility::activateAction):
(WebKit::WebAccessibility::nextAction):
(WebKit::WebAccessibility::prevAction):
(WebKit::WebAccessibility::readAction):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_accessibility_action_activate_get):
(ewk_view_accessibility_action_next_get):
(ewk_view_accessibility_action_prev_get):
(ewk_view_accessibility_action_read_by_point_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Added.
(EWK2Accessibility::xwindow):
(TEST_F):
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::accessibilityObjectReadByPoint):
(WebKit::WebPageProxy::accessibilityObjectReadPrevious):
(WebKit::WebPageProxy::accessibilityObjectReadNext):

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

6 years agoCSS JIT: Implement :matches
utatane.tea@gmail.com [Thu, 23 Oct 2014 07:27:38 +0000 (07:27 +0000)]
CSS JIT: Implement :matches
https://bugs.webkit.org/show_bug.cgi?id=137947

Reviewed by Benjamin Poulain.

Source/WebCore:

Initial patch for supporting :matches in CSS JIT.
In this patch, we implement :matches
by leveraging the generalized nested backtracking implementation.

Tests: fast/selectors/matches-backtracking.html
       fast/selectors/matches-complex.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::hasAnyCombinators):
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesMatchesPseudoClass):

LayoutTests:

* fast/selectors/matches-backtracking-expected.txt: Added.
* fast/selectors/matches-backtracking.html: Added.
* fast/selectors/matches-complex-expected.txt: Added.
* fast/selectors/matches-complex.html: Added.
    - nested :matches
    - multiple :matches
    - :matches with CannotMatchAnything
    - :matches with :not
    - :matches(with a lot of selectors)
    are tested.

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

6 years agoRenderThemeGtk::mediaControlsScript() is not defined when VIDEO is disabled.
commit-queue@webkit.org [Thu, 23 Oct 2014 07:17:50 +0000 (07:17 +0000)]
RenderThemeGtk::mediaControlsScript() is not defined when VIDEO is disabled.
<https://webkit.org/b/137970>.

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-23
Reviewed by Carlos Garcia Campos.

* rendering/RenderThemeGtk.cpp:

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

6 years agoPrefix isnan() with std::.
commit-queue@webkit.org [Thu, 23 Oct 2014 06:54:06 +0000 (06:54 +0000)]
Prefix isnan() with std::.
<https://webkit.org/b/137966>.

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-22
Reviewed by Carlos Garcia Campos.

* profiler/ProfileNode.h:
(JSC::ProfileNode::Call::setStartTime):
(JSC::ProfileNode::Call::setElapsedTime):

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

6 years agoDo not include GraphicsContext3D.h when 3D_GRAPHICS is not used.
commit-queue@webkit.org [Thu, 23 Oct 2014 06:45:49 +0000 (06:45 +0000)]
Do not include GraphicsContext3D.h when 3D_GRAPHICS is not used.
<https://webkit.org/b/137969>.

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-22
Reviewed by Carlos Garcia Campos.

* platform/graphics/cairo/GraphicsContext3DCairo.cpp:

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

6 years agoDo not build WidgetBackingStoreGtkX11 when not used.
commit-queue@webkit.org [Thu, 23 Oct 2014 06:41:51 +0000 (06:41 +0000)]
Do not build WidgetBackingStoreGtkX11 when not used.
<https://webkit.org/b/137972>.

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-22
Reviewed by Carlos Garcia Campos.

* platform/gtk/WidgetBackingStoreGtkX11.cpp:
* platform/gtk/WidgetBackingStoreGtkX11.h:

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

6 years ago[iOS] Toggling overflow:scroll to hidden on element with -webkit-overflow-scrolling...
simon.fraser@apple.com [Thu, 23 Oct 2014 06:15:44 +0000 (06:15 +0000)]
[iOS] Toggling overflow:scroll to hidden on element with -webkit-overflow-scrolling:touch can cause children to disappear
https://bugs.webkit.org/show_bug.cgi?id=137999
rdar://problem/18425550

Reviewed by Zalan Bujtas.

Source/WebCore:

When toggling overflow from scroll to hidden on an element with -webkit-overflow-scrolling:touch,
we'd fail to do a compositing layer rebuild, which caused various issues like unparented
descendants, and misplaced and unrepainted content.

This happened because we'd get to RenderLayerBacking::updateConfiguration() via styleChanged
with the view needing layout, so never hit the updateScrollingLayers() code, and the subsequent
updateCompositingLayers() would be a no-op.

Fix by explicitly triggering a layer rebuild when style changes such that the touch-scrollability
of an element changes, as we do for changes in clip.

Test: compositing/scrolling/touch-scroll-to-clip.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::isScrollableOverflow):
(WebCore::styleHasTouchScrolling):
(WebCore::styleChangeRequiresLayerRebuild):

LayoutTests:

Test that toggles overflow on a touch scrolling div, and dumps layers.

* compositing/scrolling/touch-scroll-to-clip-expected.txt: Added.
* compositing/scrolling/touch-scroll-to-clip.html: Added.
* platform/ios-simulator/compositing/scrolling/touch-scroll-to-clip-expected.txt: Added.

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

6 years agoClean up virtual functions in rendering/
cdumez@apple.com [Thu, 23 Oct 2014 04:32:27 +0000 (04:32 +0000)]
Clean up virtual functions in rendering/
https://bugs.webkit.org/show_bug.cgi?id=137984

Reviewed by Darin Adler.

Clean up virtual functions in rendering/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
  inherently virtual
- Dropping virtual destructors when the class does not have subclasses
  and mark the class as final, to get rid of unnecessary vtables
- Making isXXX() virtual functions private on XXX classes to avoid
  unnecessary type checks
- De-virtualizing some functions that do not need to be virtual
- Dropping final for virtual functions in classes already marked as
  final

No new tests, no behavior change.

* html/shadow/SliderThumbElement.cpp:
* rendering/AutoTableLayout.h:
* rendering/ClipPathOperation.h:
(WebCore::ClipPathOperation::type):
(WebCore::ClipPathOperation::isSameType):
* rendering/EllipsisBox.h:
* rendering/FixedTableLayout.h:
* rendering/InlineElementBox.h:
* rendering/RenderBlockFlow.h:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderLineBreak.h:
* rendering/RenderMarquee.h:
* rendering/RenderMediaControlElements.h:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderQuote.h:
* rendering/RenderRegion.h:
(WebCore::RenderRegion::renderName): Deleted.
* rendering/RenderReplica.h:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.h:
* rendering/RenderScrollbar.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderScrollbarTheme.h:
(WebCore::RenderScrollbarTheme::~RenderScrollbarTheme): Deleted.
(WebCore::RenderScrollbarTheme::scrollbarThickness): Deleted.
(WebCore::RenderScrollbarTheme::buttonsPlacement): Deleted.
(WebCore::RenderScrollbarTheme::supportsControlTints): Deleted.
(WebCore::RenderScrollbarTheme::shouldCenterOnThumb): Deleted.
(WebCore::RenderScrollbarTheme::initialAutoscrollTimerDelay): Deleted.
(WebCore::RenderScrollbarTheme::autoscrollTimerDelay): Deleted.
(WebCore::RenderScrollbarTheme::registerScrollbar): Deleted.
(WebCore::RenderScrollbarTheme::unregisterScrollbar): Deleted.
* rendering/RenderSnapshottedPlugIn.h:
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextFragment.h:
* rendering/RenderThemeGtk.h:
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeWin.h:
* rendering/RenderVideo.h:
* rendering/TextAutosizer.h:
* rendering/TrailingFloatsRootInlineBox.h:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLMenclose.h:
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRadicalOperator.h:
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLToken.h:
* rendering/mathml/RenderMathMLUnderOver.h:
* rendering/shapes/BoxShape.h:
* rendering/shapes/PolygonShape.h:
* rendering/shapes/RasterShape.h:
* rendering/shapes/RectangleShape.h:
* rendering/style/BasicShapes.h:
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::computeIntrinsicDimensions): Deleted.
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRootInlineBox.h:

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

6 years agoREGRESSION(r175000): Crash in SourceBufferPrivateAVFObjC::destroyParser()
jer.noble@apple.com [Thu, 23 Oct 2014 03:49:41 +0000 (03:49 +0000)]
REGRESSION(r175000): Crash in SourceBufferPrivateAVFObjC::destroyParser()
https://bugs.webkit.org/show_bug.cgi?id=137990

Reviewed by Alexey Proskuryakov.

NULL-check m_mediaSource before using.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::destroyParser):

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

6 years agocommitqueuetask_unittest.py should be made more concise.
commit-queue@webkit.org [Thu, 23 Oct 2014 02:54:24 +0000 (02:54 +0000)]
commitqueuetask_unittest.py should be made more concise.
https://bugs.webkit.org/show_bug.cgi?id=137985

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

* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
Refactors tests to use MockSimpleTestPlanCommitQueue where possible.
(MockCommitQueue.__init__):
(MockCommitQueue.report_flaky_tests):
(MockCommitQueue):
(MockCommitQueue.get_reported_flaky_tests):
(MockSimpleTestPlanCommitQueue.__init__):
(MockSimpleTestPlanCommitQueue.run_command):
(MockSimpleTestPlanCommitQueue.did_run_clean_tests):
(CommitQueueTaskTest._run_and_expect_patch_analysis_result):
(test_land_failure):
(test_failed_archive):
(test_double_flaky_test_failure):
(test_test_failure):
(test_red_test_failure):
(test_very_red_tree_retry):
(test_red_tree_patch_rejection):
(test_one_flaky_test):
(test_tree_more_red_than_patch):
(MockCommitQueue.test_results): Deleted.
(test_simple_flaky_test_failure): Deleted.
(_expect_validate): Deleted.
(_expect_validate.MockDelegate): Deleted.
(_expect_validate.MockDelegate.refetch_patch): Deleted.
(_expect_validate.MockDelegate.expected_failures): Deleted.
(_mock_patch): Deleted.
(test_validate): Deleted.
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
Fixes a bug that slipped through the cracks prior to this change.
(PatchAnalysisTask._test_patch):

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

6 years ago[iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
benjamin@webkit.org [Thu, 23 Oct 2014 02:40:07 +0000 (02:40 +0000)]
[iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
https://bugs.webkit.org/show_bug.cgi?id=137988
rdar://problem/17785162

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

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
The algorithm behind dynamic size update finds the best content area to put in the viewport
after a viewport change. If an initial size or a target size is empty, it is impossible to
compute a reasonable area to keep in the view. We end up handling NaN scales
and/or sizes and CoreAnimation raises an exception when applying that value.

This patch add early exits when that occurs and fallback to the common code.

On Input, things are easy. If any of the initial values is empty, we just execute the updateBlock
without attempting any of the dynamic behaviors.

For the target values, things are trickier. We do not know what the values are going to be before we execute
the block. But once we executed the block, we have already skipped all the setters that call the web process.

To handle that, every value is set manually on WebPageProxy. This is a bit unfortunate because the setters
get yet another entry point.

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

6 years agoRefactoring to simplify some code in DatePrototype.cpp.
mark.lam@apple.com [Thu, 23 Oct 2014 02:39:14 +0000 (02:39 +0000)]
Refactoring to simplify some code in DatePrototype.cpp.
<https://webkit.org/b/137997>

Reviewed by Filip Pizlo.

A bunch of functions in DatePrototype.cpp have the pattern of loading a
constant into a local variable only to pass it to a callee function
immediately after.  There is no other use for that variable.  This adds
additional verbosity with no added benefit.

This patch refactors those functions to just pass the constant arg directly.

* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):

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

6 years agoEFL and GTK ports have broken since r175075
gyuyoung.kim@samsung.com [Thu, 23 Oct 2014 01:37:08 +0000 (01:37 +0000)]
EFL and GTK ports have broken since r175075
https://bugs.webkit.org/show_bug.cgi?id=137995

Unreviewed, EFL and GTK ports build fix.

Need to use PLATFORM(MAC) guard for ActionMenuHitTest functions.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::removeNavigationGestureSnapshot):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

6 years agoString(new Date(Mar 30 2014 01:00:00)) is wrong in CET
commit-queue@webkit.org [Thu, 23 Oct 2014 01:15:08 +0000 (01:15 +0000)]
String(new Date(Mar 30 2014 01:00:00)) is wrong in CET
https://bugs.webkit.org/show_bug.cgi?id=130967

Patch by Byungseon Shin <sun.shin@lge.com> on 2014-10-22
Reviewed by Mark Lam.

Source/JavaScriptCore:

By definition of calculateLocalTimeOffset, input time should be UTC time.
But there are many cases when input time is based on local time.
So, it gives erroneous results while calculating offset of DST boundary time.
By adding a argument to distinguish UTC and local time, we can get the correct offset.

* JavaScriptCore.order:
* runtime/DateConstructor.cpp:
(JSC::constructDate):
(JSC::callDate):
(JSC::dateUTC):
* runtime/DateInstance.cpp:
(JSC::DateInstance::calculateGregorianDateTime):
(JSC::DateInstance::calculateGregorianDateTimeUTC):
* runtime/DatePrototype.cpp:
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
* runtime/JSDateMath.cpp:
(JSC::localTimeOffset):
(JSC::gregorianDateTimeToMS):
(JSC::msToGregorianDateTime):
(JSC::parseDateFromNullTerminatedCharacters):
* runtime/JSDateMath.h:
* runtime/VM.h:
(JSC::LocalTimeOffsetCache::LocalTimeOffsetCache):
(JSC::LocalTimeOffsetCache::reset):
Passing TimeType argument to distingush UTC time and local time.

Source/WTF:

By definition of calculateLocalTimeOffset, input time should be UTC time.
But there are many cases when input time is based on local time.
So, it gives erroneous results while calculating offset of DST boundary time.
By adding a argument to distinguish UTC and local time, we can get the correct offset.

* wtf/DateMath.cpp:
(WTF::calculateLocalTimeOffset):
(WTF::parseDateFromNullTerminatedCharacters):
Compensate time offset depends on UTC time or local time.
* wtf/DateMath.h:
Add argument to differenciate UTC or local time.

LayoutTests:

Set latest DST timezone boundary values on
<http://www.timeanddate.com/time/zone/usa/los-angeles>

* js/dom/script-tests/date-DST-time-cusps.js:

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

6 years ago[Win] Rebaseline various tests after switching to Windows rendering for native controls.
bfulgham@apple.com [Thu, 23 Oct 2014 01:13:35 +0000 (01:13 +0000)]
[Win] Rebaseline various tests after switching to Windows rendering for native controls.

* platform/win/editing/inserting/before-after-input-element-expected.txt: Added.
* platform/win/editing/pasteboard/4806874-expected.txt: Added.
* platform/win/editing/pasteboard/pasting-tabs-expected.txt:
* platform/win/editing/selection/4397952-expected.txt:
* platform/win/editing/selection/4895428-3-expected.txt: Added.
* platform/win/editing/selection/select-across-readonly-input-4-expected.txt:
* platform/win/editing/selection/select-across-readonly-input-5-expected.txt:
* platform/win/fast/block/basic: Added.
* platform/win/fast/block/basic/fieldset-stretch-to-legend-expected.txt: Added.
* platform/win/fast/block/float/032-expected.txt: Added.
* platform/win/fast/css/text-input-with-webkit-border-radius-expected.txt:
* platform/win/fast/dom/isindex-001-expected.txt: Added.
* platform/win/fast/dom/isindex-002-expected.txt: Added.
* platform/win/fast/forms/007-expected.txt: Added.
* platform/win/fast/forms/button-align-expected.txt: Added.
* platform/win/fast/forms/button-cannot-be-nested-expected.txt: Added.
* platform/win/fast/forms/button-default-title-expected.txt:
* platform/win/fast/forms/button-table-styles-expected.txt:
* platform/win/fast/forms/button-white-space-expected.txt: Added.
* platform/win/fast/forms/encoding-test-expected.txt: Added.
* platform/win/fast/forms/floating-textfield-relayout-expected.txt: Added.
* platform/win/fast/forms/input-align-expected.txt: Added.
* platform/win/fast/forms/input-appearance-bkcolor-expected.txt: Added.
* platform/win/fast/forms/input-appearance-default-bkcolor-expected.txt: Added.
* platform/win/fast/forms/input-appearance-disabled-expected.txt: Added.
* platform/win/fast/forms/input-appearance-preventDefault-expected.txt: Added.
* platform/win/fast/forms/input-appearance-width-expected.txt: Added.
* platform/win/fast/forms/input-baseline-expected.txt: Added.
* platform/win/fast/forms/input-disabled-color-expected.txt: Added.
* platform/win/fast/forms/input-field-text-truncated-expected.txt: Added.
* platform/win/fast/forms/input-placeholder-visibility-1-expected.txt: Added.
* platform/win/fast/forms/input-placeholder-visibility-3-expected.txt: Added.
* platform/win/fast/forms/input-readonly-empty-expected.txt: Added.
* platform/win/fast/forms/input-table-expected.txt: Added.
* platform/win/fast/forms/input-text-click-inside-expected.txt: Added.
* platform/win/fast/forms/input-text-option-delete-expected.txt: Added.
* platform/win/fast/forms/input-text-scroll-left-on-blur-expected.txt: Added.
* platform/win/fast/forms/input-text-self-emptying-click-expected.txt: Added.
* platform/win/fast/forms/input-text-word-wrap-expected.txt: Added.
* platform/win/fast/forms/menulist-restrict-line-height-expected.txt: Added.
* platform/win/fast/forms/menulist-style-color-expected.txt:
* platform/win/fast/forms/minWidthPercent-expected.txt: Added.
* platform/win/fast/forms/placeholder-position-expected.txt: Added.
* platform/win/fast/forms/select-listbox-multiple-no-focusring-expected.txt:
* platform/win/fast/forms/select-overflow-scroll-expected.txt:
* platform/win/fast/forms/select-overflow-scroll-inherited-expected.txt:
* platform/win/fast/forms/text-style-color-expected.txt: Added.
* platform/win/fast/forms/textfield-focus-ring-expected.txt: Added.
* platform/win/fast/forms/textfield-outline-expected.txt: Added.
* platform/win/fast/forms/visual-hebrew-text-field-expected.txt: Added.
* platform/win/fast/lists/dynamic-marker-crash-expected.txt: Added.
* platform/win/fast/table/spanOverlapRepaint-expected.txt: Added.
* platform/win/fast/table/text-field-baseline-expected.txt: Added.
* platform/win/fast/text/textIteratorNilRenderer-expected.txt:
* platform/win/svg/custom/inline-svg-in-html-expected.txt: Added.
* platform/win/svg/hixie/mixed: Added.
* platform/win/svg/hixie/mixed/003-expected.txt: Added.
* platform/win/tables/mozilla/bugs/45621-expected.txt: Added.
* platform/win/tables/mozilla/bugs/bug138725-expected.txt:
* platform/win/tables/mozilla/bugs/bug194024-expected.txt: Added.
* platform/win/tables/mozilla/bugs/bug24200-expected.txt: Added.
* platform/win/tables/mozilla/bugs/bug2479-3-expected.txt:
* platform/win/tables/mozilla/bugs/bug2479-4-expected.txt:
* platform/win/tables/mozilla/bugs/bug39209-expected.txt:
* platform/win/tables/mozilla/bugs/bug4527-expected.txt:
* platform/win/tables/mozilla/bugs/bug46368-1-expected.txt:
* platform/win/tables/mozilla/bugs/bug46368-2-expected.txt:
* platform/win/tables/mozilla/bugs/bug51727-expected.txt:
* platform/win/tables/mozilla/bugs/bug52505-expected.txt:
* platform/win/tables/mozilla/bugs/bug52506-expected.txt:
* platform/win/tables/mozilla/bugs/bug59354-expected.txt: Added.
* platform/win/tables/mozilla/bugs/bug60749-expected.txt:
* platform/win/tables/mozilla/bugs/bug68912-expected.txt: Added.
* platform/win/tables/mozilla/bugs/bug7342-expected.txt:
* platform/win/tables/mozilla/bugs/bugs28928-expected.txt: Added.
* platform/win/tables/mozilla/collapsing_borders/bug41262-4-expected.txt:
* platform/win/tables/mozilla_expected_failures/bugs/bug92647-1-expected.txt: Added.
* platform/win/tables/mozilla_expected_failures/collapsing_borders: Added.
* platform/win/tables/mozilla_expected_failures/collapsing_borders/bug41262-5-expected.txt: Added.
* platform/win/tables/mozilla_expected_failures/collapsing_borders/bug41262-6-expected.txt: Added.
* platform/win/tables/mozilla_expected_failures/core/captions1-expected.txt:
* platform/win/tables/mozilla_expected_failures/core/captions2-expected.txt:

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

6 years agoFlakiness dashboard should support OS X Yosemite
ap@apple.com [Thu, 23 Oct 2014 00:05:03 +0000 (00:05 +0000)]
Flakiness dashboard should support OS X Yosemite
https://bugs.webkit.org/show_bug.cgi?id=137986

Reviewed by Ryosuke Niwa.

* TestResultServer/app.yaml:
* TestResultServer/static-dashboards/builders.jsonp:
* TestResultServer/static-dashboards/flakiness_dashboard.js:

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

6 years agoAdd action menu support for images
timothy_horton@apple.com [Wed, 22 Oct 2014 23:48:38 +0000 (23:48 +0000)]
Add action menu support for images
https://bugs.webkit.org/show_bug.cgi?id=137987
<rdar://problem/18717767>

Reviewed by Anders Carlsson, Sam Weinig, and Beth Dakin.

* Resources/AddImageToPhotos.pdf: Added.
* Resources/CopyImage.pdf: Added.
* Resources/SaveImageToDownloads.pdf: Added.
* Resources/ShareImage.pdf: Added.
Add some temporary artwork.

* Scripts/webkit/messages.py:
(struct_or_class):
ActionMenuHitTestResult is a struct.

* Shared/API/c/WKActionMenuItemTypes.h:
Add new items for image menus.

* Shared/mac/ActionMenuHitTestResult.cpp:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
For now, pass the hit image data across to the UI process as a ShareableBitmap.

* Shared/mac/ActionMenuHitTestResult.h:

* UIProcess/API/mac/WKView.mm:
(-[WKView _createActionMenuItemForTag:]):
Refactor action menu item creation into a single function, so that
callers can share code and be much simpler.

(webKitBundleImageNamed):
Add a helper to acquire an image from the WebKit2 bundle.

(-[WKView _copyImage:]):
(-[WKView _saveImageToDownloads:]):
(temporaryPhotosDirectoryPath):
(pathToPhotoOnDisk):
(-[WKView _addImageToPhotos:]):
Add rudimentary implementations of image actions.

(-[WKView _defaultMenuItemsForImage]):
Support the image menu, plus a submenu acquired from NSSharingServicePicker
for the Share menu.

(-[WKView _defaultMenuItems]):
Call _defaultMenuItemsForImage if needed.

(-[WKView _updateActionMenu]):
Refactor _updateActionMenu out of prepareForMenu:withEvent:.

(-[WKView prepareForMenu:withEvent:]):
Ask the Web process to re-hit-test under the location that the menu
will appear. Mark the menu as pending.

(-[WKView _didPerformActionMenuHitTest:]):
When we get the hit test reply, record the result for future use.

(-[WKView willOpenMenu:withEvent:]):
If we got a hit test reply, rebuild the menu immediately. If not, wait
up to 500ms for the reply to come in. This eventually needs to be
cancellable if the menu is rejected in the interim.

(-[WKView didCloseMenu:withEvent:]):
Clear all state when the menu closes.

* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performActionMenuHitTestAtLocation):
(WebKit::WebPageProxy::didPerformActionMenuHitTest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Plumb didPerformActionMenuHitTest back from WebPageProxy to WKView.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Hit test at the given location, recording the image data if there is any,
and return the result to the UI process.

* WebKit2.xcodeproj/project.pbxproj:
Add the PDFs.

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

6 years agoSVG loaded through html <img> can't request to load any external resources.
dbates@webkit.org [Wed, 22 Oct 2014 23:43:11 +0000 (23:43 +0000)]
SVG loaded through html <img> can't request to load any external resources.
https://bugs.webkit.org/show_bug.cgi?id=137762.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2014-10-22
Reviewed by Daniel Bates.

Source/WebCore:

SVG images have unique security rules that prevent them from loading any external
resources. This patch enforces these rules in CachedResourceLoader::canRequest for
all non-data-uri resources.

The fix and the tests are ported but modified a little from the chromium fix:
http://src.chromium.org/viewvc/blink?view=rev&rev=176084

Test: http/tests/security/svg-image-with-cached-remote-image.html
      http/tests/security/svg-image-with-css-cross-domain.html

For the SVG image, prevent loading any external sub-resource except for data urls.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):

LayoutTests:

Ensure that SVG images, which are loaded through the <img> tag or through the
CSS background image, cannot load any external sub-resource except for data-
URL resources (though this doesn't work at the time of writing, see bug #137941).
Also ensure the same rule is enforced on cached resources.

The tests are ported but modified a little from the chromium fix:
http://src.chromium.org/viewvc/blink?view=rev&rev=176084

Set the circle background to orange
* http/tests/security/resources/image-with-css-cross-domain-circle.css: Added.
(circle):

Set the circle stroke-width = 2 and the circle stroke = red
* http/tests/security/resources/image-with-css-cross-domain-circle2.css: Added.
(circle):

This svg references the two css files: one is relative path and the other is absolute path
* http/tests/security/resources/image-with-css-cross-domain.svg: Added.

This svg references an external image.
* http/tests/security/resources/image-with-remote-image.svg: Added.

A helper css which sets the formatting style for some html tags
* http/tests/security/svg-image-with-css-cross-domain.css: Added.
(span):
(span.circle-css-cross-domain):
(embed):
(iframe):

Test the svg which is referenced as a cached image by an <object> tag, does not load
external sub-resource.
* http/tests/security/svg-image-with-cached-remote-image-expected.html: Added.
* http/tests/security/svg-image-with-cached-remote-image.html: Added.

Test loading sub-resources for an svg which is included in the html by different ways
and which references external css files.
Ensure the image object does not load any external sub-resources.
* http/tests/security/svg-image-with-css-cross-domain-expected.html: Added.
* http/tests/security/svg-image-with-css-cross-domain.html: Added.

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

6 years agocommitqueuetask should include more tests to ensure that the behavior
commit-queue@webkit.org [Wed, 22 Oct 2014 23:27:27 +0000 (23:27 +0000)]
commitqueuetask should include more tests to ensure that the behavior
of PatchAnalysisTask._test_patch() is well defined
https://bugs.webkit.org/show_bug.cgi?id=137977

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

* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
Adds the MockSimpleTestPlanCommitQueue class, which makes it easier
and more readable to define tests that are meant to test the behaviour
of PatchAnalysisTask._test_patch(), and adds several unit tests.
(FailingTestCommitQueue.test_results):
(PatchAnalysisResult):
(MockSimpleTestPlanCommitQueue):
(MockSimpleTestPlanCommitQueue.__init__):
(MockSimpleTestPlanCommitQueue.run_command):
(MockSimpleTestPlanCommitQueue._mock_test_result):
(MockSimpleTestPlanCommitQueue.test_results):
(CommitQueueTaskTest._run_and_expect_patch_analysis_result):
(test_flaky_test_failure):
(test_failed_archive):
(test_two_flaky_tests):
(test_one_flaky_test):
(test_very_flaky_patch):
(test_very_flaky_patch_with_some_tree_redness):
(test_different_test_failures):
(test_different_test_failures_with_some_tree_redness):
(test_mildly_flaky_patch):
(test_mildly_flaky_patch_with_some_tree_redness):
(test_tree_more_red_than_patch):

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

6 years agoMediaPlayerPrivateAVFoundation::hasAudio() returns false even when there is an audibl...
adachan@apple.com [Wed, 22 Oct 2014 23:18:30 +0000 (23:18 +0000)]
MediaPlayerPrivateAVFoundation::hasAudio() returns false even when there is an audible AVMediaSelectionOption selected
https://bugs.webkit.org/show_bug.cgi?id=137935

Reviewed by Eric Carlson.

Source/WebCore:

Set hasAudio to true if there's a selected audible AVMediaSelectionOption
after the call to updateAudioTracks(). Ditto for video.

Test: http/tests/media/hls/hls-audio-tracks-has-audio.html

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):

* testing/Internals.cpp:
(WebCore::Internals::mediaElementHasCharacteristic):
* testing/Internals.h:
* testing/Internals.idl:
Add internals.mediaElementHasCharacteristic for the new test.

LayoutTests:

* http/tests/media/hls/hls-audio-tracks-has-audio-expected.txt: Added.
* http/tests/media/hls/hls-audio-tracks-has-audio.html: Added.

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

6 years agoRemove WidgetBackingStoreCairo::create() factory function
gyuyoung.kim@samsung.com [Wed, 22 Oct 2014 23:03:15 +0000 (23:03 +0000)]
Remove WidgetBackingStoreCairo::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137943

Reviewed by Darin Adler.

WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.

Source/WebCore:

No new tests, no behavior changes.

* platform/cairo/WidgetBackingStoreCairo.cpp:
(WebCore::WidgetBackingStoreCairo::create): Deleted.
* platform/cairo/WidgetBackingStoreCairo.h:
* platform/gtk/WidgetBackingStoreGtkX11.cpp:
(WebCore::WidgetBackingStoreGtkX11::create): Deleted.
* platform/gtk/WidgetBackingStoreGtkX11.h:

Source/WebKit2:

* UIProcess/BackingStore.h:
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::createBackingStoreForGTK):
(WebKit::BackingStore::incorporateUpdate):

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

6 years agoRemove TextCheckerEnchant::create() factory function
gyuyoung.kim@samsung.com [Wed, 22 Oct 2014 23:01:08 +0000 (23:01 +0000)]
Remove TextCheckerEnchant::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137944

Reviewed by Darin Adler.

TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.

Source/WebCore:

No new tests, no behavior change.

* platform/text/enchant/TextCheckerEnchant.h:
(WebCore::TextCheckerEnchant::create): Deleted.

Source/WebKit2:

* UIProcess/API/gtk/WebKitTextChecker.cpp:
(WebKitTextChecker::WebKitTextChecker):
* UIProcess/API/gtk/WebKitTextChecker.h:
* UIProcess/efl/TextCheckerClientEfl.cpp:
(TextCheckerClientEfl::TextCheckerClientEfl):
* UIProcess/efl/TextCheckerClientEfl.h:

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

6 years agoAvoid confusion between AccessibilityObject::isTable() / isAccessibilityTable()
cdumez@apple.com [Wed, 22 Oct 2014 21:45:20 +0000 (21:45 +0000)]
Avoid confusion between AccessibilityObject::isTable() / isAccessibilityTable()
https://bugs.webkit.org/show_bug.cgi?id=137899

Reviewed by Darin Adler.

Avoid confusion between AccessibilityObject::isTable() and
isAccessibilityTable(). isTable() is equivalent to
is<AccessibilityTable>(), while isAccessibilityTable() is an
AccessibilityTable that is exposed as an AccessibilityTable to the
platform.

This patch is renaming isAccessibilityTable() to
isExposableThroughAccessibility(), makes it non-virtual and defines it
on AccessibilityTable only, for clarity.

This patch also renames isTableExposableThroughAccessibility() to
computeIisTableExposableThroughAccessibility() as it is called only
once to initialize the m_isExposableThroughAccessibility data member.

No new tests, no behavior change.

* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityARIAGrid.h:
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable):
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
(WebCore::AccessibilityARIAGridCell::columnIndexRange):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentTable):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldUseAccessiblityObjectInnerText):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
(WebCore::appendChildrenToArray):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAccessibilityTable): Deleted.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::ariaSelectedRows):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::AccessibilityTable):
(WebCore::AccessibilityTable::init):
(WebCore::AccessibilityTable::isExposableThroughAccessibility):
(WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::tableLevel):
(WebCore::AccessibilityTable::roleValue):
(WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
(WebCore::AccessibilityTable::title):
(WebCore::AccessibilityTable::isAccessibilityTable): Deleted.
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility): Deleted.
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::isTableCell):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::addChildren):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::isTableRow):
(WebCore::AccessibilityTableRow::parentTable):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetNChildren):
(webkitAccessibleRefChild):
(webkitAccessibleGetAttributes):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

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

6 years agoAvoid repeated is<MutableStyleProperties>() checks in StyleProperties
cdumez@apple.com [Wed, 22 Oct 2014 21:16:48 +0000 (21:16 +0000)]
Avoid repeated is<MutableStyleProperties>() checks in StyleProperties
https://bugs.webkit.org/show_bug.cgi?id=137978

Reviewed by Andreas Kling.

Reduce the amount of is<MutableStyleProperties>() checks in
StyleProperties by:
- Removing the checks in each method of StyleProperties::PropertyReference,
  and replace them by a single check in StyleProperties::propertyAt().
- Providing faster propertyCount() / propertyAt() / isEmpty() methods on
  MutableStyleProperties / ImmutableStyleProperties as a lot of callers use
  tight typing.
- Using tighter typing at call sites whenever possible.

Ideally, we could be able to use iterators instead of propertyCount() /
propertyAt() but this is not trivial to do efficiently as the
representation in memory is fundamentally different for MutableStyleProperties
/ ImmutableStyleProperties. We may be able to do better longer term, but
this is already more efficient short term at least.

No new tests, no behavior change.

* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::MutableStyleProperties):
(WebCore::StyleProperties::PropertyReference::cssText):
* css/StyleProperties.h:
(WebCore::StyleProperties::PropertyReference::PropertyReference):
(WebCore::StyleProperties::PropertyReference::id):
(WebCore::StyleProperties::PropertyReference::shorthandID):
(WebCore::StyleProperties::PropertyReference::isImportant):
(WebCore::StyleProperties::PropertyReference::isInherited):
(WebCore::StyleProperties::PropertyReference::isImplicit):
(WebCore::StyleProperties::PropertyReference::value):
(WebCore::StyleProperties::PropertyReference::toCSSProperty):
(WebCore::StyleProperties::isEmpty):
(WebCore::ImmutableStyleProperties::isEmpty):
(WebCore::MutableStyleProperties::isEmpty):
(WebCore::ImmutableStyleProperties::propertyAt):
(WebCore::MutableStyleProperties::propertyAt):
(WebCore::StyleProperties::propertyAt):
(WebCore::StyleProperties::propertyCount):
(WebCore::StyleProperties::PropertyReference::propertyMetadata): Deleted.
(WebCore::StyleProperties::PropertyReference::propertyValue): Deleted.
* editing/EditingStyle.cpp:
(WebCore::removePropertiesInStyle):
(WebCore::EditingStyle::removePropertiesInElementDefaultStyle):

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

6 years ago[Mac][MediaStream] clean up bit rot
eric.carlson@apple.com [Wed, 22 Oct 2014 21:14:07 +0000 (21:14 +0000)]
[Mac][MediaStream] clean up bit rot
https://bugs.webkit.org/show_bug.cgi?id=137976

Reviewed by Jer Noble.

No new tests, this just gets the Mac port compiling again.

* Modules/mediastream/MediaStream.h: Add a virtual destructor to Observer since it has
    a virtual method.

* WebCore.exp.in: Export RTCPeerConnectionHandler::create and RTCPeerConnectionHandlerMock::create(WebCore::RTCPeerConnectionHandlerClient*),
    they are both use by Internals for testing.

* WebCore.xcodeproj/project.pbxproj: Add RTC and MediaStream files.

* html/HTMLMediaElement.h: Forward declare MediaStream instead of including MediaStream.h.

* platform/mediastream/RTCPeerConnectionHandler.h: EXPORT the create method.

* platform/mock/MediaConstraintsMock.cpp:
(WebCore::isSupported): Make static.
(WebCore::isValid): Ditto.

* platform/mock/RTCPeerConnectionHandlerMock.h: EXPORT the create method.

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

6 years agoRevert fix for REGRESSION (r173356): Safari can't install a profile, gets 'Download...
antti@apple.com [Wed, 22 Oct 2014 20:14:29 +0000 (20:14 +0000)]
Revert fix for REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
(https://bugs.webkit.org/show_bug.cgi?id=137493)

Turns out the root cause was a bug in MIME type sniffing, https://bugs.webkit.org/show_bug.cgi?id=137855

Remove the workaround.

* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::startWithHandle):
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::startWithHandle):

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

6 years agoPatchAnalysisTask._test_patch() needs refactoring
commit-queue@webkit.org [Wed, 22 Oct 2014 20:04:37 +0000 (20:04 +0000)]
PatchAnalysisTask._test_patch() needs refactoring
https://bugs.webkit.org/show_bug.cgi?id=137904

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

* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
Fixes several small bugs, and makes minor changes to accomodate the
changes in PatchAnalysisTask.
(MockCommitQueue.refetch_patch):
(MockCommitQueue.test_results):
(test_flaky_test_failure):
(test_failed_archive):
(test_very_red_tree_retry):
(_expect_validate.MockDelegate.refetch_patch):
(MockCommitQueue.expected_failures): Deleted.
(_expect_validate.MockDelegate.expected_failures): Deleted.
* Scripts/webkitpy/tool/bot/expectedfailures.py: Removed.
* Scripts/webkitpy/tool/bot/expectedfailures_unittest.py: Removed.
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
Removes the unexpected_failures member, adds the _clean_tree_results
member, adds a helper function for _test_patch, and refactors
_test_patch to be more readable.
(PatchAnalysisTask.__init__):
(PatchAnalysisTask._continue_testing_patch_that_exceeded_failure_limit_on_first_or_second_try):
(PatchAnalysisTask._test_patch):
(PatchAnalysisTask.results_from_test_run_without_patch):
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
Removes AbstractEarlyWarningSystem's dependancy on ExpectedFailures.
(AbstractEarlyWarningSystem.begin_work_queue):
(AbstractEarlyWarningSystem._failing_tests_message):
(AbstractEarlyWarningSystem.command_failed):
(AbstractEarlyWarningSystem.expected_failures): Deleted.
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
Makes changes to accomodate the changes made to PatchAnalysisTask.
(AbstractEarlyWarningSystemTest.test_failing_tests_message):
* Scripts/webkitpy/tool/commands/perfalizer.py:
Removes Perfalizer's dependancy on ExpectedFailures.
(PerfalizerTask.refetch_patch):
(PerfalizerTask.expected_failures): Deleted.
* Scripts/webkitpy/tool/commands/queues.py:
Removes CommitQueue's dependancy on ExpectedFailures, and adds an
initializer to allow for mock injection.
(CommitQueue.__init__):
(CommitQueue.begin_work_queue):
(CommitQueue.process_work_item):
(CommitQueue._failing_tests_message):
* Scripts/webkitpy/tool/commands/queues_unittest.py:
Removes dependancy on ExpectedFailures, and instead uses mock
injection.
(MockCommitQueueTask):
(MockCommitQueueTask.results_from_patch_test_run):
(MockCommitQueueTask.results_from_test_run_without_patch):
(mock_run_webkit_patch):

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

6 years agoRemove action menu web preference
bdakin@apple.com [Wed, 22 Oct 2014 19:13:30 +0000 (19:13 +0000)]
Remove action menu web preference
https://bugs.webkit.org/show_bug.cgi?id=137975

Reviewed by Tim Horton.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetActionMenuSupportEnabled): Deleted.
(WKPreferencesGetActionMenuSupportEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):

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

6 years agoWeb Inspector: Fix generator importing of protocol type "any", treat as value
commit-queue@webkit.org [Wed, 22 Oct 2014 19:11:18 +0000 (19:11 +0000)]
Web Inspector: Fix generator importing of protocol type "any", treat as value
https://bugs.webkit.org/show_bug.cgi?id=137931

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

Treat incoming "any" objects as InspectorValues, which can be any type.
Add the necessary boilerplate to import.

* inspector/InspectorBackendDispatcher.cpp:
(Inspector::AsMethodBridges::asValue):
(Inspector::InspectorBackendDispatcher::getValue):
* inspector/InspectorBackendDispatcher.h:
* inspector/scripts/codegen/generator.py:
(Generator.keyed_get_method_for_type):
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:

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

6 years agoREGRESSION(r174996): Broke C_LOOP
msaboff@apple.com [Wed, 22 Oct 2014 18:59:04 +0000 (18:59 +0000)]
REGRESSION(r174996): Broke C_LOOP
https://bugs.webkit.org/show_bug.cgi?id=137971

Reviewed by Mark Lam.

Removed incorrect move to cfr (CallFrameRegister) before we make the call to a native function.
After r174996, the source register for the move contained garbage causing the crash.  The move
to cfr before making the call to the native function is wrong and should have been removed
some time ago.  This brings the ARM64 / C_LOOP code path inline with the other CPU paths.
Tested on ARM64 as well as a C_LOOP build.

* llint/LowLevelInterpreter64.asm:

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

6 years ago[EFL] Unreviewed EFL gardening.
commit-queue@webkit.org [Wed, 22 Oct 2014 17:50:23 +0000 (17:50 +0000)]
[EFL] Unreviewed EFL gardening.
https://bugs.webkit.org/show_bug.cgi?id=137950

Some tests that are passed in latest build.

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2014-10-22

* platform/efl/TestExpectations: Remove passing tests from TestExceptation file.

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

6 years ago[Win] Mark a number of tests as failing due to white selected text color.
bfulgham@apple.com [Wed, 22 Oct 2014 17:45:22 +0000 (17:45 +0000)]
[Win] Mark a number of tests as failing due to white selected text color.
https://bugs.webkit.org/show_bug.cgi?id=137963

* platform/win/TestExpectations:

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

6 years ago[Mac][WK2] Fix applicationIsSafari() detection
cdumez@apple.com [Wed, 22 Oct 2014 17:43:07 +0000 (17:43 +0000)]
[Mac][WK2] Fix applicationIsSafari() detection
https://bugs.webkit.org/show_bug.cgi?id=137893

Reviewed by Alexey Proskuryakov.

Source/WebCore:

I noticed when profiling Safari on Mac that we were exercising a code
path we shouldn't because it is meant for other applications that
Safari.

The detection relies on the applicationIsSafari() function in
RuntimeApplicationChecks.cpp. This was in some cases returning false on
my machine even though I was running Safari so I investigated a bit and
noticed that the check relies on the main bundle identifier string and
is doing:
isSafari = mainBundleIsEqualTo("com.apple.Safari")
    || mainBundleIsEqualTo("com.apple.WebProcess");

This WebProcess detection is very unreliable because:
- It matches other apps than Safari's WebProcesses
- The bundle name for the WebProcess is sometimes
"com.apple.WebKit.WebContent" or
"com.apple.WebKit.WebContent.Development".

The solution used in this patch is to move the applicationIsSafari()
check to the UIProcess so that the check actually succeeds reliably.
The call site for applicationIsSafari() was in
ResourceRequest::useQuickLookResourceCachingQuirks(). This match
removes that logic from ResourceRequest and move it to
FrameLoaderClient as only the FrameLoader is interested in this
information. The logic to determine if we should use QuickLook
resource caching quirks is moved to a new QuickLook class under
platform/ as the code needs to be shared between WebKit and WebKit2.
On WebKit2, we make use that code on the UIProcess side and pass
the flag as a parameter when constructing the WebProcess. The flag
is then stored on the WebProcess and queried by WebFrameLoaderClient.

Previously, we would spend ~1% of the WebProcess cpu time (when loading
apple.com) trying to detect if we should use QuickLook resource caching
quirks even though that check was supposed to be disabled and return
early when running Safari.

No new tests, not easily testable.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):
* loader/FrameLoaderClient.h:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsSafari):
Remove "com.apple.WebProcess" bundle name matching as this causes false
positives (matches other applications than Safari's WebProcesses) and
it is no longer needed now that applicationIsSafari() is always called
from the UIProcess.

* platform/mac/QuickLookMac.h: Added.
* platform/mac/QuickLookMac.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
(WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
* platform/network/cf/ResourceRequest.h:
* platform/network/ios/ResourceRequestIOS.mm:
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::initQuickLookResourceCachingQuirks): Deleted.
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.

Source/WebKit/mac:

Provide an implementation for FrameLoaderClient's new
needsQuickLookResourceCachingQuirks() that returns
a static flag initialized using
QuickLookMac::computeNeedsQuickLookResourceCachingQuirks().

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:

Source/WebKit2:

Provide an implementation for FrameLoaderClient's new
needsQuickLookResourceCachingQuirks(), which accesses the flag stored
on the WebProcess, which is initialized upon WebProcess creation.

QuickLookMac::computeNeedsQuickLookResourceCachingQuirks() is called
on UIProcess side so that it works reliably and the flag is passed as
parameter when constructing the WebProcess.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::needsQuickLookResourceCachingQuirks):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

6 years ago[Win] Mark a number of tests as failing due to <select> bug.
bfulgham@apple.com [Wed, 22 Oct 2014 17:41:57 +0000 (17:41 +0000)]
[Win] Mark a number of tests as failing due to <select> bug.
https://bugs.webkit.org/show_bug.cgi?id=137962

* platform/win/TestExpectations:

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

6 years agoXMLHttpRequest should support attribute responseURL as per latest XHR spec.
commit-queue@webkit.org [Wed, 22 Oct 2014 17:16:44 +0000 (17:16 +0000)]
XMLHttpRequest should support attribute responseURL as per latest XHR spec.
https://bugs.webkit.org/show_bug.cgi?id=136938

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-10-22
Reviewed by Alexey Proskuryakov.

Source/WebCore:

Tests: http/tests/xmlhttprequest/basic-auth-responseURL.html
       http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html
       http/tests/xmlhttprequest/redirect-credentials-responseURL.html
       http/tests/xmlhttprequest/xmlhttprequest-responseURL.html

XMLHttpRequest should support attribute responseURL

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseURL):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequest.idl:

LayoutTests:

Added test to check responseURL attribute in XMLHttpRequest.

* http/tests/xmlhttprequest/basic-auth-responseURL-expected.txt: Added.
* http/tests/xmlhttprequest/basic-auth-responseURL.html: Added.
* http/tests/xmlhttprequest/cross-origin-redirect-responseURL-expected.txt: Added.
* http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html: Added.
* http/tests/xmlhttprequest/redirect-credentials-responseURL-expected.txt: Added.
* http/tests/xmlhttprequest/redirect-credentials-responseURL.html: Added.
* http/tests/xmlhttprequest/xmlhttprequest-responseURL-expected.txt: Added.
* http/tests/xmlhttprequest/xmlhttprequest-responseURL.html: Added.

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

6 years agoAdd initial support for generating the StyleBuilder from CSSPropertyNames.in
cdumez@apple.com [Wed, 22 Oct 2014 16:56:36 +0000 (16:56 +0000)]
Add initial support for generating the StyleBuilder from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=137910

Reviewed by Andreas Kling.

Add initial support for generating the StyleBuilder from
CSSPropertyNames.in. This is a first step towards getting rid of the
legacy DeprecatedStyleBuilder class and having everything defined in one
place (CSSPropertyNames.in).

This patch updates makeprop.pl script to generate a StyleBuilder.cpp
file that generate a the StyleBuilder::applyProperty() method
implementation using a huge switch statement for all the CSS
properties. With this patch, we are now generating the new StyleBuilder
code for all the "simple" CSS properties (i.e. those that were using
ApplyPropertyDefault<> in DeprecatedStyleBuilder.cpp). I am using a
"NewStyleBuilder" option in CSSPropertyNames.in for properties that
we generate to help with improving incrementally the generator. Once
we are able to generate all properties, this transition option will
do away and become the default.

By default, the generator will make an educated guess for the type
name, the getter, the setter and the initial function of each property.
For example, for the border-collapse property, it will use:
- TypeName: EBorderCollapse (i.e. 'E' + PropertyId)
- Getter: borderCollapse() (i.e. PropertyId with first letter lowercased)
- Setter: setBorderCollapse() (i.e. 'set' + PropertyId)
- Initial: initialBorderCollapse() (i.e. 'initial' + PropertyId)

This works for most properties. For properties that need
special-casing, developers can use the following options in
CSSPropertyNames.in:
- TypeName: Overrides the type name
- Getter: Overrides the getter name
- Setter: Overrides the setter name
- Initial: Overrides the initial function name
- NameForMethods: Overrides the Getter / Setter / Initial function
  names. For e.g. "NameForMethods=OverflowWrap" will use
  "overflowWrap() / setOverflowWrap() / initialOverflowWrap()".

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

No new tests, no behavior change.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyVerticalAlign::createHandler):
(WebCore::ApplyPropertyDisplay::applyInitialValue):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleBuilder.h: Added.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:
* rendering/style/RenderStyle.h:
Move the initialXXX() methods that were in NonInheritedFlags to
RenderStyle class, with the other initialXXX() methods to facilitate
code generation.

* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):

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

6 years agoUnreviewed. Fix GStreamer debug build after r175050.
carlosgc@webkit.org [Wed, 22 Oct 2014 15:56:24 +0000 (15:56 +0000)]
Unreviewed. Fix GStreamer debug build after r175050.

Explicitly include wtf/MainThread.h.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

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

6 years ago[GStreamer] Do not use CachedResourceLoader, SecurityOrigin, ResourceBuffer and other...
carlosgc@webkit.org [Wed, 22 Oct 2014 15:12:08 +0000 (15:12 +0000)]
[GStreamer] Do not use CachedResourceLoader, SecurityOrigin, ResourceBuffer and other WebCore types
https://bugs.webkit.org/show_bug.cgi?id=137064

Reviewed by Philippe Normand.

Source/WebCore:

Move the media resource loader to a new class in WebCore/loader
that inherits from a PlatformMediaResourceLoader class defined in
the platform layer. The platform specific behaviour is implemented
using a client also defined in the platform layer, implemented by
every media backend, and used by the WebCore MediaResourceLoader.

* CMakeLists.txt: Add new files to compilation.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
Create a MediaResourceLoader.
(WebCore::HTMLMediaElement::mediaPlayerCORSMode): Deleted. This is
no longer used.
* html/HTMLMediaElement.h:
* loader/MediaResourceLoader.cpp: Added.
(WebCore::MediaResourceLoader::MediaResourceLoader):
(WebCore::MediaResourceLoader::~MediaResourceLoader):
(WebCore::MediaResourceLoader::start): Start a new load for the
given request and load options.
(WebCore::MediaResourceLoader::stop): Stop the load if needed.
(WebCore::MediaResourceLoader::setDefersLoading):
(WebCore::MediaResourceLoader::responseReceived): Handle CORS
access check and notify the client about the response.
(WebCore::MediaResourceLoader::dataReceived): Notify the client.
(WebCore::MediaResourceLoader::notifyFinished): Ditto.
(WebCore::MediaResourceLoader::getOrCreateReadBuffer): Ask the
client to create the read buffer.
* loader/MediaResourceLoader.h: Added.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::createResourceLoader): Call
mediaPlayerCreateResourceLoader() if there's a client.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
(WebCore::MediaPlayerClient::mediaPlayerCORSMode): Deleted.
* platform/graphics/PlatformMediaResourceLoader.h: Added.
(WebCore::PlatformMediaResourceLoaderClient::responseReceived):
(WebCore::PlatformMediaResourceLoaderClient::dataReceived):
(WebCore::PlatformMediaResourceLoaderClient::bufferReceived):
(WebCore::PlatformMediaResourceLoaderClient::accessControlCheckFailed):
(WebCore::PlatformMediaResourceLoaderClient::loadFailed):
(WebCore::PlatformMediaResourceLoaderClient::loadFinished):
(WebCore::PlatformMediaResourceLoaderClient::getOrCreateReadBuffer):
(WebCore::PlatformMediaResourceLoader::~PlatformMediaResourceLoader):
(WebCore::PlatformMediaResourceLoader::stop):
(WebCore::PlatformMediaResourceLoader::setDefersLoading):
(WebCore::PlatformMediaResourceLoader::didPassAccessControlCheck):
(WebCore::PlatformMediaResourceLoader::PlatformMediaResourceLoader):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStop): Also delete the PlatformMediaResourceLoader.
(webKitWebSrcStart): Create a new resource loader using
MediaPlayer::createResourceLoader() with a new
CachedResourceStreamingClient as client.
(webKitWebSrcNeedDataMainCb): Call setDefersLoading() for the
resource loader if there's one.
(webKitWebSrcEnoughDataMainCb): Ditto.
(webKitSrcPassedCORSAccessCheck): Return didPassAccessControlCheck.
(StreamingClient::handleResponseReceived): Remove the CORS check
result parameter since that's now handled by MediaResourceLoader.
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::~CachedResourceStreamingClient):
(CachedResourceStreamingClient::getOrCreateReadBuffer):
(CachedResourceStreamingClient::responseReceived): Update didPassAccessControlCheck.
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::accessControlCheckFailed): Log the
error and stop the load.
(CachedResourceStreamingClient::loadFailed): Log the error if it
was not a cancellation.
(CachedResourceStreamingClient::loadFinished):
(ResourceHandleStreamingClient::didReceiveResponse):
(CachedResourceStreamingClient::setDefersLoading): Deleted.
(CachedResourceStreamingClient::notifyFinished): Deleted.

LayoutTests:

Update expected results of http/tests/security/video-cross-origin-accessfailure.html, since
now the error is also logged in the console.

* http/tests/security/video-cross-origin-accessfailure-expected.txt:

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

6 years ago[EFL][WK2] Minibrowser : Add support for mouse middle button to open links in new...
commit-queue@webkit.org [Wed, 22 Oct 2014 15:09:43 +0000 (15:09 +0000)]
[EFL][WK2] Minibrowser : Add support for mouse middle button to open links in new window
https://bugs.webkit.org/show_bug.cgi?id=136736

Patch by Rohit Kumar <kumar.rohit@samsung.com> on 2014-10-22
Reviewed by Gyuyoung Kim.

* MiniBrowser/efl/main.c:
(on_navigation_policy_decision): Check whether it's a link clicked with the middle mouse button and load the request in a new window.
(window_create):

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

6 years agoSpeed up line parsing for simple line layout (part I)
zalan@apple.com [Wed, 22 Oct 2014 14:59:00 +0000 (14:59 +0000)]
Speed up line parsing for simple line layout (part I)
https://bugs.webkit.org/show_bug.cgi?id=137275

Reviewed by Antti Koivisto.

Extend simple line layout performance test with a few more cases.
Now we've got:
<div center
<div right
<div justify
<div white-space: pre (new)
<div overflow-wrap: break-word (new)
<pre
<pre white-space: pre-wrap
<pre white-space: pre-line (new)
<pre white-space: nowrap (new)
<pre white-space: pre-wrap overflow-wrap: break-word
<div + embedded <span etc.
<div + br

* Layout/line-layout-simple.html:

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

6 years agoUnreviewed. Fix GTK+ debug build after r175046.
carlosgc@webkit.org [Wed, 22 Oct 2014 14:03:34 +0000 (14:03 +0000)]
Unreviewed. Fix GTK+ debug build after r175046.

Remove invalid ASSERT.

* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::setCursorRect):

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

6 years ago[GTK] Move GtkInputMethodFilter from Platform to WebKit2
carlosgc@webkit.org [Wed, 22 Oct 2014 13:00:12 +0000 (13:00 +0000)]
[GTK] Move GtkInputMethodFilter from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137884

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Remove GtkInputMethodFilter.

* PlatformGTK.cmake:
* platform/gtk/GtkInputMethodFilter.cpp: Removed.
* platform/gtk/GtkInputMethodFilter.h: Removed.

Source/WebKit2:

Merge WebViewBaseInputMethodFilter and GtkInputMethodFilter into a
single class InputMethodFilter. The code is mostly the same, but
instead of having a setWebView method only to get the WebPageProxy,
it has a setPage method that passes the WebPageProxy. The GtkIMContext
client window is set by the WebView when it's realized/unrealized.

* PlatformGTK.cmake:
* Shared/NativeWebKeyboardEvent.h:
* Shared/gtk/NativeWebKeyboardEventGtk.cpp:
(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):
(webkitWebViewBaseUnrealize):
(webkit_web_view_base_class_init):
(webkitWebViewBaseCreateWebPage):
(webkitWebViewBaseEnterFullScreen): Deleted.
* UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Removed.
* UIProcess/API/gtk/WebViewBaseInputMethodFilter.h: Removed.
* UIProcess/gtk/InputMethodFilter.cpp: Added.
(WebKit::InputMethodFilter::handleCommitCallback):
(WebKit::InputMethodFilter::handlePreeditStartCallback):
(WebKit::InputMethodFilter::handlePreeditChangedCallback):
(WebKit::InputMethodFilter::handlePreeditEndCallback):
(WebKit::InputMethodFilter::InputMethodFilter):
(WebKit::InputMethodFilter::~InputMethodFilter):
(WebKit::InputMethodFilter::setEnabled):
(WebKit::InputMethodFilter::setCursorRect):
(WebKit::InputMethodFilter::handleKeyboardEvent):
(WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
(WebKit::InputMethodFilter::filterKeyEvent):
(WebKit::InputMethodFilter::confirmComposition):
(WebKit::InputMethodFilter::updatePreedit):
(WebKit::InputMethodFilter::notifyFocusedIn):
(WebKit::InputMethodFilter::notifyFocusedOut):
(WebKit::InputMethodFilter::notifyMouseButtonPress):
(WebKit::InputMethodFilter::confirmCurrentComposition):
(WebKit::InputMethodFilter::cancelContextComposition):
(WebKit::InputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
(WebKit::InputMethodFilter::handleCommit):
(WebKit::InputMethodFilter::handlePreeditStart):
(WebKit::InputMethodFilter::handlePreeditChanged):
(WebKit::InputMethodFilter::handlePreeditEnd):
(WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
(WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
(WebKit::InputMethodFilter::logConfirmCompositionForTesting):
(WebKit::InputMethodFilter::logSetPreeditForTesting):
* UIProcess/gtk/InputMethodFilter.h: Added.
(WebKit::InputMethodFilter::context):
(WebKit::InputMethodFilter::setPage):
(WebKit::InputMethodFilter::setTestingMode):
(WebKit::InputMethodFilter::events):

Tools:

Move InputMethodFilter test from WebCore tests to WebKit2 tests
and adapt it to use the new InputMethodFilter WebKit class. Instead
of having virtual methods just for testing, it has a testing mode
that logs the events.

* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebKit2/gtk/InputMethodFilter.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebCore/gtk/InputMethodFilter.cpp.
(TestWebKitAPI::TestInputMethodFilter::TestInputMethodFilter):
(TestWebKitAPI::TestInputMethodFilter::~TestInputMethodFilter):
(TestWebKitAPI::TestInputMethodFilter::sendKeyEventToFilter):
(TestWebKitAPI::TestInputMethodFilter::sendPressAndReleaseKeyEventPairToFilter):
(TestWebKitAPI::TEST):
(TestWebKitAPI::temporaryGetPreeditStringOverride):
(TestWebKitAPI::temporaryResetOverride):
(TestWebKitAPI::verifyCanceledComposition):

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

6 years agoMatch spec for font-weight: bolder|lighter
commit-queue@webkit.org [Wed, 22 Oct 2014 11:16:39 +0000 (11:16 +0000)]
Match spec for font-weight: bolder|lighter
https://bugs.webkit.org/show_bug.cgi?id=137919

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-10-22
Reviewed by Andreas Kling.

This patch is a merge of Blink's
Source/WebCore:

https://chromiumcodereview.appspot.com/15994009

Currently, bolder and lighter change font-weight in a non-compliant way.
The spec (http://www.w3.org/TR/css3-fonts/#bolderlighter) defines
exactly what the computed values should be given the inherited weight values,
so we should match those.

The removed FIXME's for selecting the next lightest/heaviest weight from
the used font family seems to refer to behaviour from
CSS1 (http://www.w3.org/TR/CSS1/#font-weight), while this is replaced
with a simpler procedure for resolving bolder and lighter in font weights
in CSS2 (http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight) and CSS3 (link above).

and https://codereview.chromium.org/137813004

According to http://dev.w3.org/csswg/css-fonts/#font-weight-prop, the computed
weight of 'lighter' and 'bolder' are based on the inherited 'font-weight', so set
that inherited weight before calculating 'lighter' and 'bolder'.

Tests: css3/font-weight-multiple-selectors.html
       css3/font-weight.html

* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontWeight::applyValue):
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::lighterWeight):
(WebCore::FontDescription::bolderWeight):

LayoutTests:

https://chromiumcodereview.appspot.com/15994009 and
https://codereview.chromium.org/137813004

* css3/font-weight-expected.txt: Added.
* css3/font-weight-multiple-selectors-expected.txt: Added.
* css3/font-weight-multiple-selectors.html: Added.
* css3/font-weight.html: Added.

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

6 years ago[GTK]: Fix unused parameter build warnings in WebCore/platform module
commit-queue@webkit.org [Wed, 22 Oct 2014 10:11:58 +0000 (10:11 +0000)]
[GTK]: Fix unused parameter build warnings in WebCore/platform module
https://bugs.webkit.org/show_bug.cgi?id=137921

Patch by Rohit Kumar <kumar.rohit@samsung.com> on 2014-10-22
Reviewed by Carlos Garcia Campos.

* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData):
(WebCore::ScrollAnimatorNone::animationTimerFired):

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

6 years agoAdd relList to the anchor, area and link elements
commit-queue@webkit.org [Wed, 22 Oct 2014 09:22:05 +0000 (09:22 +0000)]
Add relList to the anchor, area and link elements
https://bugs.webkit.org/show_bug.cgi?id=137860

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2014-10-22
Reviewed by Darin Adler and Chris Dumez.

Source/WebCore:

Add relList to reflect the rel content attribute for anchor[1],
area[2] and link[3] elements.

[1] https://html.spec.whatwg.org/multipage/semantics.html#dom-a-rellist
[2] https://html.spec.whatwg.org/multipage/embedded-content.html#dom-area-rellist
[3] https://html.spec.whatwg.org/multipage/semantics.html#dom-link-rellist

Tests: fast/dom/rel-list-gc.html
       fast/dom/rel-list.html
       perf/rel-list-remove.html

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitString::set):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
(WebCore::HTMLAnchorElement::relList):
(WebCore::HTMLAnchorElement::setRel): Deleted.
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
(WebCore::HTMLLinkElement::relList):
* html/HTMLLinkElement.h:
* html/HTMLLinkElement.idl:
* html/RelList.cpp: Added.
(WebCore::RelList::RelList):
(WebCore::RelList::ref):
(WebCore::RelList::deref):
(WebCore::RelList::length):
(WebCore::RelList::item):
(WebCore::RelList::element):
(WebCore::RelList::updateRelAttribute):
(WebCore::RelList::containsInternal):
(WebCore::RelList::value):
(WebCore::RelList::setValue):
* html/RelList.h: Added.

LayoutTests:

Tests relList aspects for anchor, area and list elements.
Update dom static property for-in iteration test result to include relList.

* fast/dom/rel-list-expected.txt: Added.
* fast/dom/rel-list-gc-expected.txt: Added.
* fast/dom/rel-list-gc.html: Added.
* fast/dom/rel-list.html: Added.
* js/dom/dom-static-property-for-in-iteration-expected.txt: Updated results.
* perf/rel-list-remove-expected.txt: Added.
* perf/rel-list-remove.html: Added.

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

6 years agoVersioning.
bshafiei@apple.com [Wed, 22 Oct 2014 06:50:07 +0000 (06:50 +0000)]
Versioning.

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

6 years ago[EFL] Remove unnecessary ENABLE_3D_RENDERING definition from OptionsEfl.cmake
ryuan.choi@gmail.com [Wed, 22 Oct 2014 05:07:24 +0000 (05:07 +0000)]
[EFL] Remove unnecessary ENABLE_3D_RENDERING definition from OptionsEfl.cmake
https://bugs.webkit.org/show_bug.cgi?id=137946

Reviewed by Gyuyoung Kim.

ENABLE_3D_RENDERING is already enabled as WEBKIT_OPTION_DEFAULT_PORT_VALUE since r135813.

* Source/cmake/OptionsEfl.cmake:

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

6 years ago[Win] More rebaselines.
bfulgham@apple.com [Wed, 22 Oct 2014 04:47:38 +0000 (04:47 +0000)]
[Win] More rebaselines.

* platform/win/css1/box_properties/acid_test-expected.txt:
* platform/win/editing/selection/3690719-expected.txt:
* platform/win/editing/selection/move-left-right-expected.txt:
* platform/win/fast/css/continuationCrash-expected.txt:
* platform/win/fast/css/fieldset-display-row-expected.txt:
* platform/win/fast/css/margin-top-bottom-dynamic-expected.txt:
* platform/win/fast/dom/HTMLTextAreaElement/reset-textarea-expected.txt:
* platform/win/fast/forms/file/file-input-direction-expected.txt:
* platform/win/fast/forms/file/file-input-disabled-expected.txt:
* platform/win/fast/forms/file/input-file-re-render-expected.txt:
* platform/win/fast/forms/formmove-expected.txt:
* platform/win/fast/forms/formmove2-expected.txt:
* platform/win/fast/forms/formmove3-expected.txt:
* platform/win/fast/forms/input-appearance-height-expected.txt:
* platform/win/fast/forms/input-button-sizes-expected.txt:
* platform/win/fast/forms/input-step-as-double-expected.txt: Removed.
* platform/win/fast/forms/input-text-drag-down-expected.txt:
* platform/win/fast/forms/input-value-expected.txt:
* platform/win/fast/forms/listbox-bidi-align-expected.txt:
* platform/win/fast/forms/targeted-frame-submission-expected.txt:
* platform/win/fast/forms/text-control-intrinsic-widths-expected.txt:

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

6 years agoOne more iOS build fix after r175013.
aestes@apple.com [Wed, 22 Oct 2014 04:33:11 +0000 (04:33 +0000)]
One more iOS build fix after r175013.

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

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

6 years agoCSS Rule features are ignored for nested CSS Selector lists
benjamin@webkit.org [Wed, 22 Oct 2014 03:28:29 +0000 (03:28 +0000)]
CSS Rule features are ignored for nested CSS Selector lists
https://bugs.webkit.org/show_bug.cgi?id=137908

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-21
Reviewed by Andreas Kling.

Source/WebCore:

When Rule feature sets were collected, any selector list nested inside an other
selector list was ignored when collecting properties of the CSS Selector.

As a result, style was not invalidated properly when any property listed in
the nested selectors.

This patch fixes the issue by make RuleFeatureSet::collectFeaturesFromSelector()
recursive, evaluating every chain of every selector lists.

Tests: fast/css/class-style-invalidation-optimization.html
       fast/css/direct-adjacent-style-sharing-1.html
       fast/css/direct-adjacent-style-sharing-2.html
       fast/css/direct-adjacent-style-sharing-3.html
       fast/css/id-style-invalidation-optimization.html
       fast/selectors/class-style-update-with-not.html
       fast/selectors/class-style-update-with-nth-child-of.html
       fast/selectors/class-style-update.html

* css/RuleFeature.cpp:
(WebCore::recursivelyCollectFeaturesFromSelector):
(WebCore::RuleFeatureSet::collectFeaturesFromSelector):
* css/RuleFeature.h:
* css/RuleSet.cpp:
(WebCore::collectFeaturesFromRuleData):

LayoutTests:

* fast/selectors/class-style-update-with-not-expected.txt: Added.
* fast/selectors/class-style-update-with-not.html: Added.
Parts of this test fail due to a bug with specificity. This will be addressed
separately.

* fast/css/class-style-invalidation-optimization-expected.txt: Added.
* fast/css/class-style-invalidation-optimization.html: Added.
* fast/css/direct-adjacent-style-sharing-1-expected.html: Added.
* fast/css/direct-adjacent-style-sharing-1.html: Added.
* fast/css/direct-adjacent-style-sharing-2-expected.html: Added.
* fast/css/direct-adjacent-style-sharing-2.html: Added.
* fast/css/direct-adjacent-style-sharing-3-expected.html: Added.
* fast/css/direct-adjacent-style-sharing-3.html: Added.
* fast/css/id-style-invalidation-optimization-expected.txt: Added.
* fast/css/id-style-invalidation-optimization.html: Added.
* fast/selectors/class-style-update-expected.txt: Added.
* fast/selectors/class-style-update-with-nth-child-of-expected.txt: Added.
* fast/selectors/class-style-update-with-nth-child-of.html: Added.
* fast/selectors/class-style-update.html: Added.

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

6 years agoTry to fix the iOS build after r175013.
timothy_horton@apple.com [Wed, 22 Oct 2014 02:56:54 +0000 (02:56 +0000)]
Try to fix the iOS build after r175013.

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

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

6 years agoQuick Look preview bubble has unnecessary controls
timothy_horton@apple.com [Wed, 22 Oct 2014 02:53:26 +0000 (02:53 +0000)]
Quick Look preview bubble has unnecessary controls
https://bugs.webkit.org/show_bug.cgi?id=137940
<rdar://problem/18731860>

Reviewed by Simon Fraser.

* UIProcess/API/mac/WKView.mm:
(-[WKView _quickLookURLFromActionMenu:]):
Temporarily use more SPI to allow us to hide the preview bubble's controls.

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

6 years agoUse std::unique_ptr | std::make_unique in FontCacheFoo
gyuyoung.kim@samsung.com [Wed, 22 Oct 2014 01:53:06 +0000 (01:53 +0000)]
Use std::unique_ptr | std::make_unique in FontCacheFoo
https://bugs.webkit.org/show_bug.cgi?id=137905

Reviewed by Darin Adler.

Clean up PassOwnPtr|OwnPtr using std::unique_ptr|std::make_unique.

No new tests, no behavior changes.

* platform/graphics/FontCache.cpp:
(WebCore::FontCache::getCachedFontPlatformData):
* platform/graphics/FontCache.h:
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::createFontPlatformData):

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

6 years agoPerf dashboard should provide a way to associate bugs with a test run
rniwa@webkit.org [Wed, 22 Oct 2014 00:53:39 +0000 (00:53 +0000)]
Perf dashboard should provide a way to associate bugs with a test run
https://bugs.webkit.org/show_bug.cgi?id=137857

Reviewed by Andreas Kling.

Added a "privileged" API, /privileged-api/associate-bug, to associate a bug with a test run.
/privileged-api/ is to be protected by an authentication mechanism such as DigestAuth over https by
the Apache configuration.

The Cross Site Request (CSRF) Forgery prevention for privileged APIs work as follows. When a user is
about to make a privileged API access, the front end code obtains a CSRF token generated by POST'ing
to privileged-api/generate-csrf-token; the page sets a randomly generated salt and an expiration time
via the cookie and returns a token computed from those two values as well as the remote username.

The font end code then POST's the request along with the returned token. The server side code verifies
that the specified token can be generated from the salt and the expiration time set in the cookie, and
the token hasn't expired.

* init-database.sql: Added bug_url to bug_trackers table, and added bugs table. Each bug tracker will
have zero or exactly one bug associated with a test run.

* public/admin/bug-trackers.php: Added the support for editing bug_url.
* public/api/runs.php:
(fetch_runs_for_config): Modified the query to fetch bugs associated with test_runs.
(parse_bugs_array): Added. Parses the aggregated bugs and creates a dictionary that maps a tracker id to
an associated bug if there is one.
(format_run): Calls parse_bugs_array.

* public/include/json-header.php: Added helper functions to deal for CSRF prevention.
(ensure_privileged_api_data): Added. Dies immediately if the request's method is not POST or doesn't
have a valid JSON payload.
(ensure_privileged_api_data_and_token): Ditto. Also checks that the CSRF prevention token is valid.
(compute_token): Computes a CSRF token using the REMOTE_USER (e.g. set via BasicAuth), the salt, and
the expiration time stored in the cookie.
(verify_token): Returns true iff the specified token matches what compute_token returns from the cookie.

* public/include/manifest.php:
(ManifestGenerator::bug_trackers): Include bug_url as bugUrl in the manifest. Also use tracker_id instead
of tracker_name as the key in the manifest. This requires changes to both v1 and v2 front end.

* public/index.html:
(Chart..showTooltipWithResults): Updated for the manifest format changed mentioned above.

* public/privileged-api/associate-bug.php: Added.
(main): Added. Associates or dissociates a bug with a test run inside a transaction. It prevent a CSRF
attack via ensure_privileged_api_data_and_token, which calls verify_token.

* public/privileged-api/generate-csrf-token.php: Added. Generates a CSRF token valid for one hour.

* public/v2/app.css:
(.disabled .icon-button:hover g): Used by the "bugs" icon when a range of points or no points are
selected in a chart.

* public/v2/app.js:
(App.PaneController.actions.toggleBugsPane): Added. Toggles the visibility of the bugs pane when exactly
one point is selected in the chart. Also hides the search pane when making the bugs pane visible since
they would overlap on each other if both of them are shown.
(App.PaneController.actions.associateBug): Makes a privileged API request to associate the specified bug
with the currently selected point (test run). Updates the bug information in "details" and colors of dots
in the charts to reflect new states. Because chart data objects aren't real Ember objects for performance
reasons, we have to use a dirty hack of modifying a dummy counter bugsChangeCount.
(App.PaneController.actions.toggleSearchPane): Renamed from toggleSearch. Also hides the bugs pane when
showing the search pane.
(App.PaneController.actions.rangeChanged): Takes all selected points as the second argument instead of
taking start and end points as the second and the third arguments so that _showDetails can enumerate all
bugs in the selected range.

(App.PaneController._detailsChanged): Added. Hide the bugs pane whenever a new point is selected.
Also update singlySelectedPoint, which is used by toggleBugsPane and associateBug.
(App.PaneController._currentItemChanged): Updated for the _showDetails change.
(App.PaneController._showDetails): Takes an array of selected points in place of old arguments.
Simplified the code to compute the revision information. Calls _updateBugs to format the associated bugs.
(App.PaneController._updateBugs): Sets details.bugTrackers to a dictionary that maps a bug tracker id to
a bug tracker proxy with an array of (bugNumber, bugUrl) pairs and also editedBugNumber, which is used by
the bugs pane to associate or dissociate a bug number, if exactly one point is selected.

(App.InteractiveChartComponent._updateDotsWithBugs): Added. Sets hasBugs class on dots as needed.
(App.InteractiveChartComponent._setCurrentSelection): Finds and passes all points in the selected range
to selectionChanged action instead of just finding the first and the last points.

* public/v2/chart-pane.css: Updated the style.

* public/v2/data.js:
(PrivilegedAPI): Added. A wrapper for privileged APIs' CSRF tokens.
(PrivilegedAPI.sendRequest): Makes a privileged API call. Fetches a new CSRF token if needed.
(PrivilegedAPI._generateTokenInServerIfNeeded): Makes a request to privileged-api/generate-csrf-token if
we haven't already obtained a CSRF token or if the token has already been expired.
(PrivilegedAPI._post): Makes a single POST request to /privileged-api/* with a JSON payload.

(Measurement.prototype.bugs): Added.
(Measurement.prototype.hasBugs): Returns true iff bugs has more than one bug number.
(Measurement.prototype.associateBug): Associates a bug with a test run via privileged-api/associate-bug.

* public/v2/index.html: Added the bugs pane. Also added a list of bugs associated with the current run in
the details.

* public/v2/manifest.js:
(App.BugTracker.bugUrl):
(App.BugTracker.newBugUrl): Added.
(App.BugTracker.repositories): Added. This was a missing back reference to repositories.
(App.MetricSerializer.normalizePayload): Now parses/loads the list of bug trackers from the manifest.
(App.Manifest.repositoriesWithReportedCommits): Now initialized to an empty array instead of null.
(App.Manifest.bugTrackers): Added.
(App.Manifest._fetchedManifest): Sets App.Manifest.bugTrackers. Also sorts the list of repositories by
their respective ids to make the ordering stable.

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

6 years agoRemove erroneous canUseJIT() in the intrinsics version of JITThunks::hostFunctionStub().
mark.lam@apple.com [Wed, 22 Oct 2014 00:52:40 +0000 (00:52 +0000)]
Remove erroneous canUseJIT() in the intrinsics version of JITThunks::hostFunctionStub().
<https://webkit.org/b/137937>

Reviewed by Michael Saboff.

This version of JITThunks::hostFunctionStub() can only be called from the intrinsics
version of VM::getHostFunction() which asserts canUseJIT().  Hence, we can eliminate
the canUseJIT() check in JITThunks::hostFunctionStub().  We don't handle the
!canUseJIT() case properly there anyway.

* jit/JITThunks.cpp:
(JSC::JITThunks::hostFunctionStub):

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

6 years ago[Win] Unreviewed test updates after switching to Windows theme for tests.
bfulgham@apple.com [Wed, 22 Oct 2014 00:26:13 +0000 (00:26 +0000)]
[Win] Unreviewed test updates after switching to Windows theme for tests.
https://bugs.webkit.org/show_bug.cgi?id=137932

* platform/win/css1/box_properties/acid_test-expected.txt:
* platform/win/editing/inserting/4960120-1-expected.txt:

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

6 years agoCalling WebCore::Page::setMediaVolume(0) does not mute videos as expected.
adachan@apple.com [Wed, 22 Oct 2014 00:17:46 +0000 (00:17 +0000)]
Calling WebCore::Page::setMediaVolume(0) does not mute videos as expected.
https://bugs.webkit.org/show_bug.cgi?id=137305

Reviewed by Darin Adler.

This was broken in http://trac.webkit.org/changeset/154970. To fix this (but not break
GStreamer), remove the "if (m_volumeInitialized)" check before updating the MediaPlayer's
volume to the value multiplied with the Page's mediaVolume. This should not affect GStreamer's
behavior because MediaPlayerPrivateGStreamerBase::setStreamVolumeElement does nothing unless
m_volumeInitialized is true.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateVolume):

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

6 years agoRemove const from WKURLRequestRef parameter to WKContextDownloadURLRequest()
jeffm@apple.com [Tue, 21 Oct 2014 23:38:12 +0000 (23:38 +0000)]
Remove const from WKURLRequestRef parameter to WKContextDownloadURLRequest()
https://bugs.webkit.org/show_bug.cgi?id=137928

Reviewed by Darin Adler.

* UIProcess/API/C/WKContext.cpp:
(WKContextDownloadURLRequest):
* UIProcess/API/C/WKContext.h:

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

6 years agobuild.webkit.org/dashboard: Cannot click on green tester bubbles
ap@apple.com [Tue, 21 Oct 2014 23:32:44 +0000 (23:32 +0000)]
build.webkit.org/dashboard: Cannot click on green tester bubbles
https://bugs.webkit.org/show_bug.cgi?id=137909

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus):

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

6 years ago[EME][Mac] Update to match new AVStreamSession API and requirements.
jer.noble@apple.com [Tue, 21 Oct 2014 23:06:59 +0000 (23:06 +0000)]
[EME][Mac] Update to match new AVStreamSession API and requirements.
https://bugs.webkit.org/show_bug.cgi?id=137923

Reviewed by Eric Carlson.

The session identifier has moved from AVStreamDataParser to -[AVStreamSession contentProtectionSessionIdentifier]
and the property is no longer KVObservable. A new notification key has been added in place of KVO.

Additionally, the requirements for using AVStreamDataParser with AVStreamSession have changed. It is now
required that AVStreamDataParsers be added to an AVStreamSession before the
-streamSession:didProvideContentKeyRequestInitializationData:forTrackID delegate method is called. A
-streamParserWillProvideContentKeyRequestInitializationData:forTrackID delegate has been added, and
an AVStreamSession must be created and the AVStreamDataParser added to it during the scope of that delegate
method.

To facilitate this, the MediaPlayerPrivateMediaSourceAVFObjC object will lazily create and own a AVStreamSession
object when requested. The SourceBufferPrivateAVFObjC object will listen for the -willProvide delegate call
and will add its AVStreamDataParser to that AVStreamSession when called.

The CDMSessionMediaSourceAVFObjC object is no longer responsible for creating the AVStreamSession, and because
the session identifier has moved from many AVStreamDataParsers to a single AVStreamSession, the
CDMSessionMediaSourceAVFObjCObserver class can become much simpler, as it only has to observe a single object.

* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[CDMSessionMediaSourceAVFObjCObserver dealloc]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver invalidate]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver observeValueForKeyPath:ofObject:change:context:]): Deleted.
(-[CDMSessionMediaSourceAVFObjCObserver contentProtectionSessionIdentifierChanged:]): Added.
(WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Call setStreamSession(nullptr).
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): The sessionId is now a value in the dictionary, not the key.
(WebCore::CDMSessionMediaSourceAVFObjC::update): No longer create an AVStreamSession.
(WebCore::CDMSessionMediaSourceAVFObjC::setStreamSession): Add and remove observers as appropriate.
(WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): No longer add or remove parsers from AVStreamSessions.
(WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasStreamSession): Simple getter.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Lazy initializing getter.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Call setStreamSession().
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVStreamDataParserListener streamParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Synchronously pass to SourceBufferPrivateAVFObjC.
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID): Add the parser to an AVStreamSession.
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID): Check the trackId.
* platform/mac/SoftLinking.h:

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

6 years ago'true' isn't a valid value for justify-self
ljaehun.lim@samsung.com [Tue, 21 Oct 2014 21:37:05 +0000 (21:37 +0000)]
'true' isn't a valid value for justify-self
https://bugs.webkit.org/show_bug.cgi?id=137913

Reviewed by Andreas Kling.

Merged from Blink (patch by dstockwell):
<https://src.chromium.org/viewvc/blink?view=rev&revision=174638>

CSS Box Alignment Module Level 3:
http://dev.w3.org/csswg/css-align/#justify-self-property

Source/WebCore:

No new tests, modify existing test case.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseJustifySelf):

LayoutTests:

Add a bad case where "justify-self: true"

* fast/css/parse-justify-self-expected.txt:
* fast/css/parse-justify-self.html:

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

6 years ago[Win] Run DumpRenderTree using native controls, not SafariTheme.dll.
bfulgham@apple.com [Tue, 21 Oct 2014 21:13:56 +0000 (21:13 +0000)]
[Win] Run DumpRenderTree using native controls, not SafariTheme.dll.
https://bugs.webkit.org/show_bug.cgi?id=137932

Reviewed by Simon Fraser.

This is the first step in moving over to native Windows rendering for our layout tests.
Once this change lands, approximately 300 tests will start failing on Windows. I will
rebaseline these changes against our test hardware and update this bug with the
commits related to that work.

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues): Call 'setShouldPaintNativeControls(TRUE)' so that
we use native Windows drawing style.

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

6 years agoAdd operator==(PropertyName, const char*)
msaboff@apple.com [Tue, 21 Oct 2014 20:43:18 +0000 (20:43 +0000)]
Add operator==(PropertyName, const char*)
https://bugs.webkit.org/show_bug.cgi?id=137925

Reviewed by Mark Lam.

Source/JavaScriptCore:

* runtime/PropertyName.h:
(JSC::operator==): Added to simplify comparison with string literals.

Source/WebCore:

Use new == operator to compare a PropertyName with a string literal.

* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):

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

6 years agoChange native call frames to use the scope from their Callee instead of their caller...
msaboff@apple.com [Tue, 21 Oct 2014 20:03:28 +0000 (20:03 +0000)]
Change native call frames to use the scope from their Callee instead of their caller's scope
https://bugs.webkit.org/show_bug.cgi?id=137907

Source/JavaScriptCore:

Reviewed by Mark Lam.

Changed setting of scope for native CallFrames to use the scope associated with the
Callee instead of the caller's scope.

* jit/ThunkGenerators.cpp:
(JSC::nativeForGenerator):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

LayoutTests:

Updated tests to reflect that the results of changing where a native call frame
and therefore the lexicalGlobalObject came from.  Verified that these tests changes
are consistent with the HTML standard.  These changes are also closer to the behavior
of other browsers.

Reviewed by Mark Lam.

* fast/frames/sandboxed-iframe-navigation-parent-expected.txt:
* fast/frames/sandboxed-iframe-navigation-parent.html:
Changed the test and results to show that a sandboxed iframe can navigate its
ancesters when it is sandbox with both "allow-scripts" and "allow-same-origin".

* http/tests/security/calling-versus-current.html:
Updated the test to really have a different domain.  We do a simple string comparison
to check for that we are part of the same domain.  The test expected that 0.0.1 was
from the same domain as 127.0.0.1.  Changed the test to try 0.0.2 and expect a
security exception.

* http/tests/security/frameNavigation/context-for-location-assign-expected.txt:
Updated test results.

* traversal/node-iterator-prototype-expected.txt:
* traversal/node-iterator-prototype.html:
Fixed as a result of this change.

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

6 years agoUnreviewed iOS build fix after r174921.
cdumez@apple.com [Tue, 21 Oct 2014 19:53:35 +0000 (19:53 +0000)]
Unreviewed iOS build fix after r174921.

Export new symbol after function rename.

* WebCore.exp.in:
* WebCore.order:

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

6 years agoUnreviewed iOS build fix after r174921.
cdumez@apple.com [Tue, 21 Oct 2014 19:47:31 +0000 (19:47 +0000)]
Unreviewed iOS build fix after r174921.

Remove symbol from export files that no longer exists.

* WebCore.exp.in:
* WebCore.order:

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

6 years ago[Curl] Optimization; avoid string reallocation.
commit-queue@webkit.org [Tue, 21 Oct 2014 19:41:47 +0000 (19:41 +0000)]
[Curl] Optimization; avoid string reallocation.
https://bugs.webkit.org/show_bug.cgi?id=137920

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-10-21
Reviewed by Brent Fulgham.

Profiling reveals that the cookiesForDOM function is spending time on removing a character from a string.

* platform/network/curl/CookieJarCurl.cpp:
(WebCore::domainMatch):
(WebCore::addMatchingCurlCookie):

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

6 years agoAX: [ATK] CSS-generated text content not exposed to assistive technologies
jdiggs@igalia.com [Tue, 21 Oct 2014 18:44:20 +0000 (18:44 +0000)]
AX: [ATK] CSS-generated text content not exposed to assistive technologies
https://bugs.webkit.org/show_bug.cgi?id=137669

Reviewed by Chris Fleizach.

Source/WebCore:

Do not use a text iterator to get the text for elements which include
pseudo elements.

Test: accessibility/css-content-attribute.html

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

LayoutTests:

Moved the Mac platform test and modified it to dump the accessible tree
and string values rather than a platform-specific hierarchy so that it
could be shared across platforms.

* accessibility/css-content-attribute.html: Added.
* platform/gtk/accessibility/css-content-attribute-expected.txt: Added.
* platform/mac/accessibility/css-content-attribute-expected.txt: Modified to reflect new output.
* platform/mac/accessibility/css-content-attribute.html: Removed.

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

6 years agoUpdated ChangeLog entry to include tests that cover r174985
msaboff@apple.com [Tue, 21 Oct 2014 18:19:34 +0000 (18:19 +0000)]
Updated ChangeLog entry to include tests that cover r174985

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

6 years agoREGRESSION(r174676): It broke the !ENABLE(VIDEO) build
cdumez@apple.com [Tue, 21 Oct 2014 18:09:49 +0000 (18:09 +0000)]
REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=137916

Reviewed by Csaba Osztrogonác.

Fix the !ENABLE(VIDEO) build by adding an #if ENABLE(VIDEO) where
needed.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):

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

6 years agoWKRemoteObjectCoder should handle floats
andersca@apple.com [Tue, 21 Oct 2014 17:58:01 +0000 (17:58 +0000)]
WKRemoteObjectCoder should handle floats
https://bugs.webkit.org/show_bug.cgi?id=137926
<rdar://problem/18695126>

Reviewed by Beth Dakin.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(-[WKRemoteObjectEncoder encodeFloat:forKey:]):
(decodeInvocationArguments):
(-[WKRemoteObjectDecoder decodeFloatForKey:]):

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

6 years agoWKContext needs to provide an API to resume a download
jeffm@apple.com [Tue, 21 Oct 2014 17:46:11 +0000 (17:46 +0000)]
WKContext needs to provide an API to resume a download
https://bugs.webkit.org/show_bug.cgi?id=137507

Reviewed by Darin Adler.

This patch adds WKContextResumeDownload(), which is only supported on the Mac, and requires the
resume data from WKDownloadGetResumeData().

We have to create a sandbox extension for the partially downloaded file in the UI process so the
network or web process can resume writing to it.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::resumeDownload):
Added, calls through to DownloadManager::resumeDownload().

* NetworkProcess/NetworkProcess.h:
Added resumeDownload().

* NetworkProcess/NetworkProcess.messages.in:
Added ResumeDownload message.

* Shared/Downloads/Download.h:
Added resume().

* Shared/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::resumeDownload):
Added. The URL being downloaded is part of the opaque resumeData, so we can't specify it when the
Download is constructed.

* Shared/Downloads/DownloadManager.h:
Added resumeDownload().

* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::resume):
Added, not implemented on this platform.

* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::resume):
Added. Consumes the sandbox extension, resumes the download, and sets m_request after the
NSURLDownload has been created. Note that we already have code to revoke the sandbox extension when
the download is finished, canceled, or fails.

* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::resume):
Added, not implemented on this platform.

* UIProcess/API/C/WKContext.cpp:
(WKContextResumeDownload):
Added.

* UIProcess/API/C/WKContext.h:
Added WKContextResumeDownload().

* UIProcess/WebContext.cpp:
(WebKit::WebContext::resumeDownload):
Added. Creates a sandbox extension for the existing file and includes it in the message to the
network or web process.

* UIProcess/WebContext.h:
Added resumeDownload().

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::resumeDownload):
Added, calls through to DownloadManager::resumeDownload().

* WebProcess/WebProcess.h:
Added resumeDownload().

* WebProcess/WebProcess.messages.in:
Added ResumeDownload message.

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

6 years agoREGRESSION: Google Search (mobile) video thumbnails are too large.
zalan@apple.com [Tue, 21 Oct 2014 17:32:09 +0000 (17:32 +0000)]
REGRESSION: Google Search (mobile) video thumbnails are too large.
https://bugs.webkit.org/show_bug.cgi?id=137895

Reviewed by Simon Fraser.

This patch fixes layer clipping when an ancestor layer has border-radius clipping.

In cases, where the current layer has non-radius cliprect, while an ancestor layer
has border-radius clipping, we only use the border-radius rect to clip.

Source/WebCore:

Test: fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::restoreClip):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRect::ClipRect):
(WebCore::ClipRect::effectedByRadius):
(WebCore::ClipRect::setEffectedByRadius):
(WebCore::ClipRect::operator==):
(WebCore::ClipRect::operator!=):
(WebCore::ClipRect::intersect):
(WebCore::ClipRect::hasRadius): Deleted.
(WebCore::ClipRect::setHasRadius): Deleted.

LayoutTests:

* fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent-expected.html: Added.
* fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent.html: Added.

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

6 years agoDon't create cached functions for HTMLDocument.write*()
msaboff@apple.com [Tue, 21 Oct 2014 17:19:49 +0000 (17:19 +0000)]
Don't create cached functions for HTMLDocument.write*()
https://bugs.webkit.org/show_bug.cgi?id=137906

Reviewed by Darin Adler.

Made it so that JSHTMLDocument::write() and ::writeln() are always created for every prototype.
This is similar to the change in r174847.

* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
* html/HTMLDocument.idl:

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

6 years agoAdd missing ENABLE(FTL_NATIVE_CALL_INLINING) guard to BundlePath.cpp after r174940
commit-queue@webkit.org [Tue, 21 Oct 2014 16:48:29 +0000 (16:48 +0000)]
Add missing ENABLE(FTL_NATIVE_CALL_INLINING) guard to BundlePath.cpp after r174940
https://bugs.webkit.org/show_bug.cgi?id=137924

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

* runtime/BundlePath.cpp:

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

6 years agoREGRESSION(r174676): It broke the !ENABLE(VIDEO) build
cdumez@apple.com [Tue, 21 Oct 2014 16:46:13 +0000 (16:46 +0000)]
REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
https://bugs.webkit.org/show_bug.cgi?id=137916

Unreviewed build fix. Add missing header include.

* rendering/RenderLayerBacking.cpp:

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

6 years agoREGRESSION (r170808): Volume slider in built-in media controls only changes volume...
jer.noble@apple.com [Tue, 21 Oct 2014 16:28:34 +0000 (16:28 +0000)]
REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
https://bugs.webkit.org/show_bug.cgi?id=137805

Reviewed by Dan Bernstein.

Source/WebCore:

Test: media/video-volume-slider-drag.html

Respond to the 'input' event rather than the 'change' event for the volume slider, so that
volume changes are continuous during drag operations.

Also listen for both 'input' and 'change' events for the timeline slider, doing fastSeek()
during 'input' and setting an explicit currentTime during 'change'. This is the same behavior
as current, but using 'change' instead of 'mouseup' to do the final currentTime change.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.handleTimelineInput):
(Controller.prototype.handleTimelineChange):
(Controller.prototype.handleTimelineMouseUp):
(Controller.prototype.handleVolumeSliderInput):
(Controller.prototype.handlePlayButtonClicked): Deleted.
(Controller.prototype.handleMaxButtonClicked): Deleted.

LayoutTests:

* media/video-volume-slider-drag-expected.txt: Added.
* media/video-volume-slider-drag.html: Added.

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

6 years agoASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid
rego@igalia.com [Tue, 21 Oct 2014 12:11:29 +0000 (12:11 +0000)]
ASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid
https://bugs.webkit.org/show_bug.cgi?id=136939

Reviewed by Darin Adler.

Source/WebCore:

In some particular situations computeIntrinsicLogicalWidths() is called
in the middle of layoutGridItems(). In these cases we do not need to
populate the grid again, so we should avoid calling placeItemsOnGrid().
In addition, we do not need to clean the grid either, as that will be
done later by layoutGridItems().

Test: fast/css-grid-layout/grid-was-populated-assert.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Avoid calls to
placeItemsOnGrid() and clearGrid() if the grid was already populated.
* rendering/RenderGrid.h: Move gridWasPopulated() header out of the
debug ifdefs.

LayoutTests:

Added a test case to reproduce the crash in debug mode.

* fast/css-grid-layout/grid-was-populated-assert-expected.txt: Added.
* fast/css-grid-layout/grid-was-populated-assert.html: Added.

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

6 years agoFix FTL Native Inlining for EFL
dbatyai.u-szeged@partner.samsung.com [Tue, 21 Oct 2014 10:18:13 +0000 (10:18 +0000)]
Fix FTL Native Inlining for EFL
https://bugs.webkit.org/show_bug.cgi?id=137774

Reviewed by Michael Saboff.

.:

Updated CMake for FTL Native Inlining.

* CMakeLists.txt:
* Source/cmake/FindClang.cmake: Added.
* Source/cmake/OptionsEfl.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

Added required functionality for Native Inlining to EFL, and fixed a bug/typo in the original code,
which caused incorrect memory allocation.

* CMakeLists.txt:
* create-llvm-ir-from-source-file.py: Added.
* create-symbol-table-index.py: Added.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::lower):
(JSC::FTL::LowerDFGToLLVM::getModuleByPathForSymbol):
(JSC::FTL::LowerDFGToLLVM::exitValueForAvailability):
(JSC::FTL::LowerDFGToLLVM::exitValueForNode):
* runtime/BundlePath.cpp: Added.
(JSC::bundlePath):
* runtime/JSDataViewPrototype.cpp:
(JSC::getData):
(JSC::setData):
* runtime/MathObject.cpp:

Source/WTF:

Updated guard definition for Native Inlining, and added an attribute define for marking functions
that should not be left out of the symbol table.

* wtf/Platform.h:

Tools:

Added Clang as an optional module to jhbuild.

* efl/jhbuild.modules:

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

6 years agoMove JSC::MacroAssemblerX86Common::s_sse2CheckState definition to MacroAssemblerX86Co...
commit-queue@webkit.org [Tue, 21 Oct 2014 08:57:22 +0000 (08:57 +0000)]
Move JSC::MacroAssemblerX86Common::s_sse2CheckState definition to MacroAssemblerX86Common.cpp.
<https://webkit.org/b/137807>

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-21
Reviewed by Csaba Osztrogonác.

* assembler/MacroAssemblerX86Common.cpp:
* jit/JIT.cpp:

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

6 years ago[Cairo] Make dashPattern, dotPattern in GraphicsContext::setPlatformStrokeStyle(...
zandobersek@gmail.com [Tue, 21 Oct 2014 08:24:45 +0000 (08:24 +0000)]
[Cairo] Make dashPattern, dotPattern in GraphicsContext::setPlatformStrokeStyle() const
https://bugs.webkit.org/show_bug.cgi?id=137912

Reviewed by Carlos Garcia Campos.

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformStrokeStyle): Make the two static variables
constants since their value doesn't change after initialization.

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

6 years agoChange the default TLS errors policy to WEBKIT_TLS_ERRORS_POLICY_FAIL
carlosgc@webkit.org [Tue, 21 Oct 2014 08:05:28 +0000 (08:05 +0000)]
Change the default TLS errors policy to WEBKIT_TLS_ERRORS_POLICY_FAIL
https://bugs.webkit.org/show_bug.cgi?id=137832

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

Source/WebKit2:

Too many general-purpose browsers that really need this policy
are not selecting it, so let's do so for them.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):

Tools:

Ensure each test sets the TLS errors policy that it really needs.
Have each test except testTLSErrorsPolicy stash and restore the original
TLS errors policy. Update testTLSErrorsPolicy to account for the new
default policy.

* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(testSSL):
(testInsecureContent):
(testTLSErrorsPolicy):
(testTLSErrorsRedirect):
(testTLSErrorsHTTPAuth):
(testLoadFailedWithTLSErrors):
(beforeAll):

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

6 years ago[GTK] Several labels are white instead of black
carlosgc@webkit.org [Tue, 21 Oct 2014 07:46:37 +0000 (07:46 +0000)]
[GTK] Several labels are white instead of black
https://bugs.webkit.org/show_bug.cgi?id=137803

Reviewed by Martin Robinson.

Recent GTK+ versions require to explicitly set the state before
getting a color.

* rendering/RenderThemeGtk.cpp:
(WebCore::styleColor): Helper function to get a color from a
GtkStylecontext that explicitly sets the state before getting the color.
(WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor): Use styleColor().
(WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor): Ditto.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor): Ditto.
(WebCore::RenderThemeGtk::systemColor): Ditto.

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

6 years agoUnreviewed. Unskip inspector server unit tests.
carlosgc@webkit.org [Tue, 21 Oct 2014 07:41:54 +0000 (07:41 +0000)]
Unreviewed. Unskip inspector server unit tests.

They should pass now.

* Scripts/run-gtk-tests:
(TestRunner):

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

6 years ago[SOUP] Disable SSLv3
commit-queue@webkit.org [Tue, 21 Oct 2014 07:35:05 +0000 (07:35 +0000)]
[SOUP] Disable SSLv3
https://bugs.webkit.org/show_bug.cgi?id=137859

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

Set G_TLS_GNUTLS_PRIORITY if unset.

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

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

6 years ago[GTK] Test TestWebKitAPI/WebKit2Gtk/TestInspectorServer fails
carlosgc@webkit.org [Tue, 21 Oct 2014 07:32:24 +0000 (07:32 +0000)]
[GTK] Test TestWebKitAPI/WebKit2Gtk/TestInspectorServer fails
https://bugs.webkit.org/show_bug.cgi?id=132044

Reviewed by Brian Burg.

Source/WebInspectorUI:

Make sure Protocol/InspectorFrontendHostStub.js is loaded before
Base/Platform.js, because Platform uses the InspectorFrontendHost
object.

* UserInterface/Main.html:

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:
(openRemoteDebuggingSession): Remove trailing slash when
concatenating base inspector URL with the page, because the
inspector returns the relative paths with a leading slash.

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

6 years ago[EFL][WK2] Minibrowser : Add support for Case sensitive and word start search
commit-queue@webkit.org [Tue, 21 Oct 2014 07:04:49 +0000 (07:04 +0000)]
[EFL][WK2] Minibrowser : Add support for Case sensitive and word start search
https://bugs.webkit.org/show_bug.cgi?id=137023

Patch by Tanay C <tanay.c@samsung.com> on 2014-10-20
Reviewed by Gyuyoung Kim.

* MiniBrowser/efl/main.c: Added functionality to support case sensitive and word start search
(search_box_show): Modified.
(search_box_hide): Modified.
(on_search_field_activated): Modified.
(on_search_backward_button_clicked): Modified.
(on_search_forward_button_clicked): Modified.
(on_search_case_option_changed): Added.
(on_search_word_start_option_changed): Added.
(window_create): Modified.

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

6 years ago[Coordinated Graphics] '-webkit-mask-image: -webkit-gradient' doesn't work for AC...
commit-queue@webkit.org [Tue, 21 Oct 2014 06:12:54 +0000 (06:12 +0000)]
[Coordinated Graphics] '-webkit-mask-image: -webkit-gradient' doesn't work for AC layer.
https://bugs.webkit.org/show_bug.cgi?id=125326

Patch by YongGeol Jung <yg48.jung@samsung.com> on 2014-10-20
Reviewed by Gyuyoung Kim.

Mask layer hasn't requested to synchronize with AC layer in CoordinatedGraphics so far.
That's why the mask layer isn't shown under CoordinatedGraphics.
Thus this patch lets the mask layer synchronize with the AC layer whenever AC layer is updated.

Below layout test case is related to this issue when --pixel test is enabled.
Unfortunately EFL WebKitTestRunner doesn't support AC mode yet.
When EFL test framework supports AC mode, the test will be passed.

Test: compositing/masks/mask-of-clipped-layer.html

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):

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

6 years agoEnsure attached frame count doesn't exceed the maximum allowed frames
jpfau@apple.com [Tue, 21 Oct 2014 03:15:04 +0000 (03:15 +0000)]
Ensure attached frame count doesn't exceed the maximum allowed frames
https://bugs.webkit.org/show_bug.cgi?id=136457

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: fast/frames/exponential-frames.html

* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::isURLAllowed):

LayoutTests:

* fast/frames/exponential-frames-expected.txt: Added.
* fast/frames/exponential-frames.html: Added.

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

6 years agoResourceRequest deserialization unnecessarily calls partitionName() on encoded cache...
cdumez@apple.com [Tue, 21 Oct 2014 02:10:47 +0000 (02:10 +0000)]
ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition
https://bugs.webkit.org/show_bug.cgi?id=137797

Reviewed by Darin Adler.

Source/WebCore:

ResourceRequest deserialization was unnecessarily calling partitionName()
on the decoded cache partition. In the deserialization case, we already
know the cache partition is a valid partition name so we can bypass the
call to partitionName() (which is fairly expensive) for performance.

This patch adds a setDomainForCachePartion() method to ResourceRequest
that calls partitionName() on the domain argument, and moves all the
callers of setCachedPartition() to this new setter, except
ArgumentCoder<ResourceRequest>::decode().

This patch updates the setCachedPartition() to merely set the
m_cachePartition member, without calling partitionName() on the
argument. There is also a new assertion in place to make sure the
argument is a valid partition name.

No new tests, no behavior change.

* html/DOMURL.cpp:
(WebCore::DOMURL::revokeObjectURL):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::addImageToCache):
(WebCore::MemoryCache::removeImageFromCache):
* loader/cache/MemoryCache.h:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::domainForCachePartition):
(WebCore::SecurityOrigin::cachePartition): Deleted.
Rename cachePartition() getter to domainForCachePartition() to make it
clear it returns a domain and not a partition name. As such, the caller
should then use ResourceRequest::setDomainForCachePartition(), not
setCachePartition().

* page/SecurityOrigin.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::setCachePartition):
(WebCore::ResourceRequest::setDomainForCachePartition):

Source/WebKit/mac:

Call ResourceRequest::setDomainForPartitionName() instead of
setPartitionName() as the argument is a domain, not a valid
partition name.

* Misc/WebCache.mm:
(+[WebCache addImageToCache:forURL:forFrame:]):
(+[WebCache removeImageFromCacheForURL:forFrame:]):

Source/WebKit2:

This patch adds a |needsValidation| argument to
ResourceRequest::setCachePartition() setter so that the caller can
indicate that the partition name is valid (because it was already
processed by partitionName() before). Use this new argument in
ArgumentCoder<ResourceRequest>::decode() to spent a bit less time
deserializing resource requests.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceRequest>::decode):

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

6 years agoTighten XMLHttpRequest setRequestHeader value check
commit-queue@webkit.org [Tue, 21 Oct 2014 01:50:41 +0000 (01:50 +0000)]
Tighten XMLHttpRequest setRequestHeader value check
https://bugs.webkit.org/show_bug.cgi?id=128593

Patch by Youenn Fablet <youenn.fablet@crf.canon.fr> on 2014-10-20
Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/xmlhttprequest/set-bad-headervalue.html

* platform/network/HTTPParsers.cpp:
(WebCore::isValidHTTPHeaderValue): Updated header values check according RFC 7230.
(WebCore::isValidHTTPToken): Renamed variable name and updated RFC related comment.

LayoutTests:

Added a test originating from w3c-test.org to test header values checking.
Testing headers with non ASCII characters and various control characters.

* http/tests/xmlhttprequest/set-bad-headervalue-expected.txt: Added.
* http/tests/xmlhttprequest/set-bad-headervalue.html: Added.

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

6 years ago[WinCairo] Crash in ATI display driver in accelerated compositing mode.
commit-queue@webkit.org [Tue, 21 Oct 2014 01:49:43 +0000 (01:49 +0000)]
[WinCairo] Crash in ATI display driver in accelerated compositing mode.
https://bugs.webkit.org/show_bug.cgi?id=137879

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-10-20
Reviewed by Darin Adler.

Speculative fix; don't enable antialiasing when drawing textures.

* WebCoreSupport/AcceleratedCompositingContext.cpp:
(AcceleratedCompositingContext::initialize):

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

6 years agoMake post checkin suggested changes to r174847
msaboff@apple.com [Tue, 21 Oct 2014 01:21:03 +0000 (01:21 +0000)]
Make post checkin suggested changes to r174847
https://bugs.webkit.org/show_bug.cgi?id=137885

Reviewed by Mark Lam.

Eliminated the creation of a temporary Identifier when comparing propertyName to "open".
Made the suggested post checkin change to put the declaration of "entry" into the if.

* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):

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

6 years agoUse is<>() / downcast<>() for SpinButtonElement
cdumez@apple.com [Tue, 21 Oct 2014 01:19:23 +0000 (01:19 +0000)]
Use is<>() / downcast<>() for SpinButtonElement
https://bugs.webkit.org/show_bug.cgi?id=137896

Reviewed by Gyuyoung Kim.

Use is<>() / downcast<>() for SpinButtonElement instead of
isSpinButtonElement() / static_cast for consistency with the rest of
the code and for safety.

No new tests, no behavior change.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* html/shadow/SpinButtonElement.h:
(isType):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isSpinUpButtonPartPressed):
(WebCore::RenderTheme::isHovered):
(WebCore::RenderTheme::isSpinUpButtonPartHovered):

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

6 years agoUnreviewed. Fix Changelog and add more explanation for r174915
roger_fong@apple.com [Tue, 21 Oct 2014 01:16:45 +0000 (01:16 +0000)]
Unreviewed. Fix Changelog and add more explanation for r174915

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

6 years agoUse glFinish instead of glFlush when drawing WebGL output to screen.
roger_fong@apple.com [Tue, 21 Oct 2014 01:07:38 +0000 (01:07 +0000)]
Use glFinish instead of glFlush when drawing WebGL output to screen.
https://bugs.webkit.org/show_bug.cgi?id=137897.
<rdar://problem/15846550>

Reviewed by Brent Fulgham.

Passes all conformance tests.
Performance tested by http://threejs.org/examples/#webgl_performance and Unity WebGL performance tests.

* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture):

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

6 years agoGeneralize the compilation of :not() to support arbitrary selector lists
benjamin@webkit.org [Tue, 21 Oct 2014 00:43:29 +0000 (00:43 +0000)]
Generalize the compilation of :not() to support arbitrary selector lists
https://bugs.webkit.org/show_bug.cgi?id=137843

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-20
Reviewed by Andreas Kling.

This builds :not() on top of the code created for :nth-child(An+B of selectorList)
to support any selector list.

The tests for the JIT were added previously:
-not-boundaries.html
-not-backtracking.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
Any :not() of a selector is handled through a simple selector list. Cases like
:not(foo, bar) simply generate not([fragmentFoo, bragmentBar]).

Old cases like :not(foo):not(bar) simply add those cases to the selector list,
generating not([fragmentFoo, bragmentBar]).

(WebCore::SelectorCompiler::minimumRegisterRequirements):
Register pressure is now tracked through computeBacktrackingMemoryRequirements.

(WebCore::SelectorCompiler::hasAnyCombinators):
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
Abstract the code creating Selector Lists from :nth-child(of). Use that for :not()
and  :nth-child(of).

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):

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

6 years agoAction menu items should have tags
bdakin@apple.com [Mon, 20 Oct 2014 23:25:51 +0000 (23:25 +0000)]
Action menu items should have tags
https://bugs.webkit.org/show_bug.cgi?id=137898

Reviewed by Anders Carlsson.

* Shared/API/c/WKActionMenuItemTypes.h: Added.
* UIProcess/API/mac/WKView.mm:
(-[WKView _defaultMenuItemsForLink]):
* WebKit2.xcodeproj/project.pbxproj:

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