WebKit-https.git
5 years agoWebKit2 View Gestures: Swipe gesture can track vertical movement instead of horizonta...
timothy_horton@apple.com [Wed, 19 Mar 2014 17:56:55 +0000 (17:56 +0000)]
WebKit2 View Gestures: Swipe gesture can track vertical movement instead of horizontal movement
https://bugs.webkit.org/show_bug.cgi?id=130441
<rdar://problem/16337279>

Reviewed by Simon Fraser.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::scrollEventCanBecomeSwipe):
Factor logic that determines if a scroll event can become a swipe
out into scrollEventCanBecomeSwipe.
Use <= instead of < when comparing the axes, because we don't want
to start a swipe on a completely diagonal scroll either (because AppKit
can start tracking a vertical swipe in that case).

(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
Make use of scrollEventCanBecomeSwipe.

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

5 years agoUpdate type of local vars to match the type of String length.
mark.lam@apple.com [Wed, 19 Mar 2014 17:53:08 +0000 (17:53 +0000)]
Update type of local vars to match the type of String length.
<https://webkit.org/b/130077>

Reviewed by Geoffrey Garen.

* runtime/JSStringJoiner.cpp:
(JSC::JSStringJoiner::join):

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

5 years agoAdd new functionality that will be required by the history item decoding
andersca@apple.com [Wed, 19 Mar 2014 17:36:37 +0000 (17:36 +0000)]
Add new functionality that will be required by the history item decoding
https://bugs.webkit.org/show_bug.cgi?id=130433

Reviewed by Sam Weinig.

Source/WebCore:

* platform/KeyedCoding.h:
(WebCore::KeyedDecoder::decodeConditionalObject):

Source/WebKit2:

* Shared/cf/KeyedDecoder.cpp:
(WebKit::KeyedDecoder::decodeUInt32):
(WebKit::KeyedDecoder::decodeInt32):
(WebKit::KeyedDecoder::decodeFloat):
* Shared/cf/KeyedDecoder.h:

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

5 years agoREGRESSION (OS X 10.9.2): PageVisibilityStateWithWindowChanges.WebKit2 API test fails
ap@apple.com [Wed, 19 Mar 2014 17:27:24 +0000 (17:27 +0000)]
REGRESSION (OS X 10.9.2): PageVisibilityStateWithWindowChanges.WebKit2 API test fails
https://bugs.webkit.org/show_bug.cgi?id=130463

* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: Disable the test.

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

5 years agoUnreviewed test system fix.
bfulgham@apple.com [Wed, 19 Mar 2014 16:47:08 +0000 (16:47 +0000)]
Unreviewed test system fix.

* TestExpectations: I mistakenly checked in the region-webvtt tests as enabled. This feature is not
ready to be turned on for all platforms yet.

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

5 years agoFix the iOS build.
timothy_horton@apple.com [Wed, 19 Mar 2014 16:00:13 +0000 (16:00 +0000)]
Fix the iOS build.

* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::parseToDateComponents):
Missing a StringView().

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

5 years ago[iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
timothy_horton@apple.com [Wed, 19 Mar 2014 15:39:06 +0000 (15:39 +0000)]
[iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
https://bugs.webkit.org/show_bug.cgi?id=130444
<rdar://problem/15580682>

Reviewed by Sam Weinig.

* WebView/WebPDFViewPlaceholder.h:
* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder layout]):
Get rid of boundingSize, it's never assigned to anything but CGSizeZero,
which is confusing.

Don't divide by zero if we have no pages, instead return an empty bounding size.

(-[WebPDFViewPlaceholder _computePageRects:]):
If we have an empty document, set the background color to white.
Otherwise, set it to black. It's not clear that black is the ideal
background color, but this retains existing behavior.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setContentProviderData:]):
Don't make UIPDFPageViews for null pages.

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

5 years agoUnreviewed gardening.
fred.wang@free.fr [Wed, 19 Mar 2014 15:32:48 +0000 (15:32 +0000)]
Unreviewed gardening.

* platform/efl/TestExpectations: remove failures for mo/row since they are already in skipped in the main TestExpectations.
* platform/gtk/mathml/presentation/mspace-children-expected.png: Move mspace-children-expected.png to platform/gtk.
* platform/gtk/mathml/presentation/mspace-children-expected.txt: Move mspace-children-expected.txt to platform/gtk.
* platform/win/TestExpectations: remove failures for mo/row/roots since they are already in skipped in the main TestExpectations.

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

5 years agoTighten ElementRuleCollector::m_matchedRuleList typing
antti@apple.com [Wed, 19 Mar 2014 15:19:46 +0000 (15:19 +0000)]
Tighten ElementRuleCollector::m_matchedRuleList typing
https://bugs.webkit.org/show_bug.cgi?id=130446

Reviewed by Anders Carlsson.

StyleRuleBase -> StyleRule.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchedRuleList):
* css/ElementRuleCollector.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleRulesForElement):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
* css/StyleResolver.h:
* editing/EditingStyle.cpp:
(WebCore::styleFromMatchedRulesForElement):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
* inspector/InspectorCSSAgent.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):

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

5 years ago[CSSRegions] An unsplittable box is always displayed in a single region
mihnea@adobe.com [Wed, 19 Mar 2014 15:11:51 +0000 (15:11 +0000)]
[CSSRegions] An unsplittable box is always displayed in a single region
https://bugs.webkit.org/show_bug.cgi?id=130451

Reviewed by Andrei Bucur.

Add an ASSERT stating that an unsplittable box region range always contains 1 region.
No new functionality, no new tests.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::getRegionRangeForBox):

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

5 years agoSubpixel rendering: Transform origin is miscalculated when RenderLayer's
zalan@apple.com [Wed, 19 Mar 2014 14:25:34 +0000 (14:25 +0000)]
Subpixel rendering: Transform origin is miscalculated when RenderLayer's
offsetfromRenderer has device pixel fraction value.
https://bugs.webkit.org/show_bug.cgi?id=129859

Reviewed by Simon Fraser.

We need to calculate the transformed origin using the painting coordinates to produce
pixel precise result.

Source/WebCore:

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::computeTransformOriginForPainting):
* rendering/RenderLayerBacking.h:

LayoutTests:

* compositing/columns/composited-columns-expected.txt:
* compositing/geometry/limit-layer-bounds-opacity-transition-expected.txt:
* compositing/repaint/resize-repaint-expected.txt:
* platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt:

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

5 years ago[GStreamer] Clean timeout source ids
csaavedra@igalia.com [Wed, 19 Mar 2014 13:49:41 +0000 (13:49 +0000)]
[GStreamer] Clean timeout source ids
https://bugs.webkit.org/show_bug.cgi?id=130450

Reviewed by Philippe Normand.

Sources IDs need to be cleaned up if the callback removes the
source, otherwise we'll be attempting to remove an empty source at
some point.

* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
(webKitMediaVideoSrcStart): Clean the source id.
(webKitMediaAudioSrcStart): Ditto.
(webKitMediaVideoSrcSeekMainCb): Ditto.
(webKitMediaAudioSrcSeekMainCb): Ditto.

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

5 years ago[CSSRegions] Compute region ranges for children of inline blocks
mihnea@adobe.com [Wed, 19 Mar 2014 12:38:51 +0000 (12:38 +0000)]
[CSSRegions] Compute region ranges for children of inline blocks
https://bugs.webkit.org/show_bug.cgi?id=130392

Reviewed by Andrei Bucur.

Source/WebCore:

Extend the region ranges computation for children of inline blocks.
When we cannot retrieve the region range for a box using cached information,
either from region range map or from the region cached on the RootInlineBox,
try to find the top most unsplittable box up to the flow thread boundary.
If we find such unsplittable box and the box has a region range, then return
this range.

Before this patch, method getRegionRangeForBox did not return true/false
if it was able to retrieve the range and the caller checked the returned
region values. I modified the method to return true if we were able to compute
the range.

Tests: fast/regions/inline-block-inline-children-flowed-in-regions.html
       fast/regions/inline-blocks-dyn-enlarged-regions.html
       fast/regions/inline-blocks-dyn-shrunk-regions.html
       fast/regions/inline-blocks-in-two-regions.html

* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForRendererFragments):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionRangeForBoxChild):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::hasNextPage):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clampToStartAndEndRegions):
(WebCore::RenderBox::borderBoxRectInRegion):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
(WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo):
(WebCore::RenderFlowThread::getRegionRangeForBox):
(WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
(WebCore::RenderFlowThread::objectInFlowRegion):
(WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
(WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
(WebCore::RenderFlowThread::addRegionsLayoutOverflow):
(WebCore::RenderFlowThread::addRegionsVisualOverflow):
(WebCore::RenderFlowThread::clearRegionsOverflow):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::locateFlowThreadContainingBlock):
Make sure we return the right render flow thread in the case of
region-based multicolumn inside named flows.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::rectFlowPortionForBox):

LayoutTests:

* fast/regions/inline-block-inline-children-flowed-in-regions-expected.html: Added.
* fast/regions/inline-block-inline-children-flowed-in-regions.html: Added.
* fast/regions/inline-blocks-dyn-enlarged-regions-expected.html: Added.
* fast/regions/inline-blocks-dyn-enlarged-regions.html: Added.
* fast/regions/inline-blocks-dyn-shrunk-regions-expected.html: Added.
* fast/regions/inline-blocks-dyn-shrunk-regions.html: Added.
* fast/regions/inline-blocks-in-two-regions-expected.html: Added.
* fast/regions/inline-blocks-in-two-regions.html: Added.

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

5 years agoFix reftest failure of mathml/presentation/bug95404.html.
fred.wang@free.fr [Wed, 19 Mar 2014 12:21:01 +0000 (12:21 +0000)]
Fix reftest failure of mathml/presentation/bug95404.html.

Unreviewed gardering.

After bug 116600, the test is only failing because of some difference
invisible by the naked eye, due to antialiasing of the radical symbol.

* mathml/presentation/bug95404-expected.html: add a 2px border to prevent antialiasing.
* mathml/presentation/bug95404.html: ditto.
* platform/efl/TestExpectations: remove test failure.
* platform/gtk/TestExpectations: ditto.

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

5 years ago[EFL] vibration/cancelVibration-during-pattern-vibrating.html is failing after r165598
commit-queue@webkit.org [Wed, 19 Mar 2014 09:16:47 +0000 (09:16 +0000)]
[EFL] vibration/cancelVibration-during-pattern-vibrating.html is failing after r165598
https://bugs.webkit.org/show_bug.cgi?id=130333

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-03-19
Reviewed by Gyuyoung Kim.

Added setting m_state when calling Vibration::vibrate. It was missing after
refactoring Vibration (r165598).

* Modules/vibration/Vibration.cpp:
(WebCore::Vibration::vibrate):

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

5 years agoRewrite WebHTMLConverter::_colorForNode in C++
commit-queue@webkit.org [Wed, 19 Mar 2014 08:04:52 +0000 (08:04 +0000)]
Rewrite WebHTMLConverter::_colorForNode in C++
https://bugs.webkit.org/show_bug.cgi?id=130443

Patch by Sam Weinig <sam@webkit.org> on 2014-03-19
Reviewed by Andreas Kling.

* platform/mac/HTMLConverter.mm:
(_platformColor):
Rename from _colorForRGBColor and simplify to just do the platform conversion.

(normalizedColor):
Extract normalization out of _colorForRGBColor and remove cases that are impossible to hit
due to us only ever using the device color space.

(HTMLConverterCaches::colorPropertyValueForNode):
(-[WebHTMLConverter _colorForNode:property:]):
Convert to C++.

(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):
Remove caches, we already cache in ColorMac.

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

5 years ago[l10n] Updated Polish translation of WebKitGTK+
berto@igalia.com [Wed, 19 Mar 2014 07:13:37 +0000 (07:13 +0000)]
[l10n] Updated Polish translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=130334

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2014-03-19
Reviewed by Gustavo Noronha Silva.

* pl.po: updated.

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

5 years ago[CSS Regions] Strange layout for content with region breaks
abucur@adobe.com [Wed, 19 Mar 2014 06:57:17 +0000 (06:57 +0000)]
[CSS Regions] Strange layout for content with region breaks
https://bugs.webkit.org/show_bug.cgi?id=121318

Reviewed by Mihnea Ovidenie.

Source/WebCore:

When break-inside: avoid is used on an element, the implementation tries to
force it inside a single fragmentation container even though the descendants
of the element specify forced breaks. This leads to unexpected results and
unstable layout.

The change extends the definition of unsplittable elements for flow threads
using the same conditions found inside RenderBlockFlow::adjustForUnsplittableChild.
This change forces elements that require break avoidance to have a single region
in the region range. As a result, forced breaks have no effect inside them.

It should be noted this may not the behavior defined by the CSS3 Fragmentation spec.
From my understanding of the text, forced breaks override any avoidance specified
by ancestor elements. However, implementing this is a larger change that will require
a fundamental new approach in handling break avoidance. This patch just brings
consistency to the API.

Test: fast/regions/forced-break-inside-avoid-break.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation):
(WebCore::RenderBlock::computeRegionRangeForBoxChild):
(WebCore::RenderBlock::estimateRegionRangeForBoxChild):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustForUnsplittableChild): Move the avoidance conditions inside
a helper method RenderBlock::childBoxIsUnsplittableForFragmentation.

LayoutTests:

The test verifies that elements specifying break-inside: avoid can't
be splitted by forced breaks applied inside of them.

* fast/regions/forced-break-inside-avoid-break-expected.txt: Added.
* fast/regions/forced-break-inside-avoid-break.html: Added.

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

5 years ago[iOS][WebKit2] Provide generic software-snapshotting API
timothy_horton@apple.com [Wed, 19 Mar 2014 06:55:29 +0000 (06:55 +0000)]
[iOS][WebKit2] Provide generic software-snapshotting API
https://bugs.webkit.org/show_bug.cgi?id=130385
<rdar://problem/16005957>

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::takeSnapshot):
(WebKit::WebPage::scaledSnapshotWithOptions):
(WebKit::WebPage::snapshotAtSize):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Rename TakeThumbnailSnapshot message to TakeSnapshot.

Fill the snapshot image with the FrameView's background color, to avoid
half-pixel alpha around the edges.

Factor snapshotAtSize out of scaledSnapshotWithOptions.

Don't apply both the custom and device scale factor to the base CTM,
only the device scale factor. Custom scale factor should only be
applied to the user CTM.

* Shared/ImageOptions.h:
Add a snapshot option, RespectDrawingAreaTransform, that maps
the rect through the drawing area's root layer transform.
Use this in place of the thumbnail-specific code in TakeThumbnailSnapshot.
Add a snapshot option, ExcludeDeviceScaleFactor, which means that
snapshotting will not factor the device scale in (useful for drawing
to a bitmap at an exact requested size).

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

5 years agoAX: Not able to use arrow keys to read text with VoiceOver before selection is set...
samuel_white@apple.com [Wed, 19 Mar 2014 06:16:40 +0000 (06:16 +0000)]
AX: Not able to use arrow keys to read text with VoiceOver before selection is set someplace (anyplace).
https://bugs.webkit.org/show_bug.cgi?id=130250

Reviewed by Chris Fleizach.

Source/WebCore:

If initial selection isn't set when we handle selection movement for accessibility, we need to set it. If we don't, using arrow
keys to read text with VoiceOver doesn't work as expected. Things will only start working after the user holds shift and arrows
around to select any arbitrary thing to force selection to get set. This logic handles that special case more gracefully.

Test: platform/mac/accessibility/selection-initial.html

* page/EventHandler.cpp:
(WebCore::handleKeyboardSelectionMovement):
(WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/mac:

Added ability to toggle enhanced accessibility on and off to support tests that require it.

* WebView/WebFrame.mm:
(-[WebFrame enhancedAccessibilityEnabled]):
(-[WebFrame setEnhancedAccessibility:]):
* WebView/WebFramePrivate.h:

Source/WebKit2:

Added ability to toggle enhanced accessibility on and off to support tests that require it.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKAccessibilityEnableEnhancedAccessibility):
(WKAccessibilityEnhancedAccessibilityEnabled):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools:

Added ability to toggle enhanced accessibility on and off to support tests that require it.

* DumpRenderTree/AccessibilityController.cpp:
(enableEnhancedAccessibilityCallback):
(getEnhancedAccessibilityEnabledCallback):
(AccessibilityController::getJSClass):
* DumpRenderTree/AccessibilityController.h:
* DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
(AccessibilityController::enableEnhancedAccessibility):
(AccessibilityController::enhancedAccessibilityEnabled):
* DumpRenderTree/ios/AccessibilityControllerIOS.mm:
(AccessibilityController::enableEnhancedAccessibility):
(AccessibilityController::enhancedAccessibilityEnabled):
* DumpRenderTree/mac/AccessibilityControllerMac.mm:
(AccessibilityController::enableEnhancedAccessibility):
(AccessibilityController::enhancedAccessibilityEnabled):
* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(AccessibilityController::enableEnhancedAccessibility):
(AccessibilityController::enhancedAccessibilityEnabled):
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::enableEnhancedAccessibility):
(WTR::AccessibilityController::enhancedAccessibilityEnabled):
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl:

LayoutTests:

Added test to ensure that initial selection gets set when enhanced accessibility is enabled and an arrow key is pressed.

* platform/mac/accessibility/selection-initial-expected.txt: Added.
* platform/mac/accessibility/selection-initial.html: Added.

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

5 years agoGet rid of Flush in SSA
fpizlo@apple.com [Wed, 19 Mar 2014 04:44:22 +0000 (04:44 +0000)]
Get rid of Flush in SSA
https://bugs.webkit.org/show_bug.cgi?id=130440

Reviewed by Sam Weinig.

This is basically a red patch. We used to use backwards flow for determining what was
flushed, until it became clear that this doesn't make sense. Now the Flush nodes don't
accomplish anything. Keeping them around in SSA can only make things hard.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGBasicBlock.cpp:
(JSC::DFG::BasicBlock::SSAData::SSAData):
* dfg/DFGBasicBlock.h:
* dfg/DFGFlushLivenessAnalysisPhase.cpp: Removed.
* dfg/DFGFlushLivenessAnalysisPhase.h: Removed.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):

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

5 years agoUnreviewed, add some contributors, and fix Nadav's entry (he's not really a reviewer
fpizlo@apple.com [Wed, 19 Mar 2014 03:07:27 +0000 (03:07 +0000)]
Unreviewed, add some contributors, and fix Nadav's entry (he's not really a reviewer
yet).

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

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

5 years agoTextTrackRegion Not Implemented
bfulgham@apple.com [Wed, 19 Mar 2014 02:54:16 +0000 (02:54 +0000)]
TextTrackRegion Not Implemented
https://bugs.webkit.org/show_bug.cgi?id=116546

Reviewed by Eric Carlson.

Merged from Blink (patch by vcarbune@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/4940f89a087fea5b5ea628e98d0b355d398a9eea
http://crbug.com/25798003

Source/WebCore:

Tests: media/track/regions-webvtt/text-track-region-display.html
       media/track/regions-webvtt/text-track-region-dom-layout.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::newRegionsAvailable):
* html/track/TextTrack.cpp:
* html/track/TextTrack.h:
* html/track/TextTrackRegion.cpp:
(WebCore::TextTrackRegion::TextTrackRegion):
(WebCore::TextTrackRegion::appendTextTrackCueBox):
* html/track/TextTrackRegion.h:
* html/track/VTTCue.cpp:
(WebCore::VTTCue::VTTCue):
(WebCore::VTTCue::notifyRegionWhenRemovingDisplayTree):
(WebCore::VTTCue::removeDisplayTree):
* html/track/VTTCue.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseBytes):
(WebCore::WebVTTParser::collectMetadataHeader):
* html/track/WebVTTParser.h:

LayoutTests:

* media/track/captions-webvtt/captions-regions.vtt: Added.
* media/track/regions-webvtt/text-track-cue-region-attribute-expected.txt: Rebaseline.
* media/track/regions-webvtt/text-track-region-display-expected.txt: Added.
* media/track/regions-webvtt/text-track-region-display.html: Added.
* media/track/regions-webvtt/text-track-region-dom-layout-expected.txt: Added.
* media/track/regions-webvtt/text-track-region-dom-layout.html: Added.
* media/track/regions-webvtt/text-track-region-list-expected.txt: Rebaseline.
* media/track/regions-webvtt/text-track-region-parser-expected.txt: Rebaseline.

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

5 years agoShare MemoryPressureHandler::releaseMemory() between platforms.
akling@apple.com [Wed, 19 Mar 2014 02:33:27 +0000 (02:33 +0000)]
Share MemoryPressureHandler::releaseMemory() between platforms.
<https://webkit.org/b/130416>

Move the code that scours WebKit for things we can free up right now
to the common part of MemoryPressureHandler. This will enable other
platforms to do the same thing under pressure.

There's now also a platformReleaseMemory() where platform-specific
pressure relief stuff can go.

Reviewed by Antti Koivisto.

* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseMemory):
(WebCore::MemoryPressureHandler::platformReleaseMemory):
* platform/MemoryPressureHandler.h:
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::respondToMemoryPressure):
(WebCore::MemoryPressureHandler::platformReleaseMemory):

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

5 years ago[WebGL] Destroy EAGLContext's backing store
dino@apple.com [Wed, 19 Mar 2014 02:02:00 +0000 (02:02 +0000)]
[WebGL] Destroy EAGLContext's backing store
https://bugs.webkit.org/show_bug.cgi?id=130439
<rdar://problem/16295217>

Reviewed by Tim Horton.

When a GraphicsContext3D is being destroyed, we should
also remove any EAGLContext backing store.

* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::~GraphicsContext3D):

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

5 years ago[EFL][WK2] Rename async APIs for better consistency with EFL
ryuan.choi@samsung.com [Wed, 19 Mar 2014 01:57:35 +0000 (01:57 +0000)]
[EFL][WK2] Rename async APIs for better consistency with EFL
https://bugs.webkit.org/show_bug.cgi?id=130319

Reviewed by Gyuyoung Kim.

There are inconsistency with async keyword in several ewebkit2 APIs.
This patch rename them to {module/feature}_async_{verb} for better consistency with EFL.
In addition, added Async keyword into their callback name.

* UIProcess/API/efl/ewk_application_cache_manager.cpp:
(EwkApplicationCacheOriginsAsyncData::EwkApplicationCacheOriginsAsyncData):
(getApplicationCacheOriginsCallback):
(ewk_application_cache_manager_origins_async_get):
* UIProcess/API/efl/ewk_application_cache_manager.h:
* UIProcess/API/efl/ewk_cookie_manager.cpp:
(EwkCookiePolicyAsyncData::EwkCookiePolicyAsyncData):
(getAcceptPolicyCallback):
(ewk_cookie_manager_accept_policy_async_get):
(EwkCookieHostnamesAsyncData::EwkCookieHostnamesAsyncData):
(getHostnamesWithCookiesCallback):
(ewk_cookie_manager_hostnames_with_cookies_async_get):
* UIProcess/API/efl/ewk_cookie_manager.h:
* UIProcess/API/efl/ewk_database_manager.cpp:
(EwkDatabaseOriginsAsyncData::EwkDatabaseOriginsAsyncData):
(getDatabaseOriginsCallback):
(ewk_database_manager_origins_async_get):
* UIProcess/API/efl/ewk_database_manager.h:
* UIProcess/API/efl/ewk_storage_manager.cpp:
(EwkStorageOriginsAsyncData::EwkStorageOriginsAsyncData):
(getStorageOriginsCallback):
(ewk_storage_manager_origins_async_get):
* UIProcess/API/efl/ewk_storage_manager.h:
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(timerCallback):
* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
(EWK2CookieManagerTest::getAcceptPolicy):
(EWK2CookieManagerTest::getHostnamesWithCookies):
* UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
(EWK2DatabaseManagerTest::timerCallback):
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
(EWK2StorageManagerTest::timerCallback):
(TEST_F):

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

5 years ago[iOS][WebKit2] Mark layer contents as being opaque if they are
timothy_horton@apple.com [Wed, 19 Mar 2014 01:51:56 +0000 (01:51 +0000)]
[iOS][WebKit2] Mark layer contents as being opaque if they are
https://bugs.webkit.org/show_bug.cgi?id=130427
<rdar://problem/15540434>

Reviewed by Simon Fraser.

* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::isOpaque):
* Shared/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::RemoteLayerBackingStore):
(RemoteLayerBackingStore::ensureBackingStore):
(RemoteLayerBackingStore::encode):
(RemoteLayerBackingStore::decode):
(RemoteLayerBackingStore::display):
(RemoteLayerBackingStore::applyBackingStoreToLayer):
Move the code to set a RemoteLayerBackingStore as a CALayer's contents
from RemoteLayerTreePropertyApplier to RemoteLayerBackingStore (mostly
as a way to keep the USE(IOSURFACE) #ifs in one place).
Remove the surface() getter, because it's no longer needed, and make
image() private as it can be now (and rename it to createImageForFrontBuffer
for clarity's sake).

Add an isOpaque argument to ensureBackingStore, encode/decode it, and
add a getter. If isOpaque is true when applying backing store to the
CALayer on the UI process side, set CALayer.contentsOpaque to let CA know.

Make opaque bitmaps if not using accelerated drawing. For the IOSurface
case, we can't make opaque IOSurfaces, but telling CA that we have filled
the whole bitmap still enables similar optimizations.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer):
Reset contentsOpaque if the layer loses its backing store.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
(WebKit::dumpChangedLayers):
Add a bit more logging about RemoteLayerBackingStore's opaqueness
and acceleratedness.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::updateBackingStore):
(PlatformCALayerRemote::setOpaque):
Invalidate the RemoteLayerBackingStore if layer opaqueness changes.

* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::paintsOpaquelyAtNonIntegralScales):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateContentsOpaque):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintsOpaquelyAtNonIntegralScales):
* rendering/RenderLayerBacking.h:
r159463 stopped us from setting layers opaque if they were being painted
at non-integral scale. This makes sense for compositing layers, which
are painted by arbitrary elements, but the main frame's RenderView
will always paint its entire contents. To restore the opaque contents
optimization to the main frame's tiles, don't de-opaquify layers
belonging to the main frame's RenderView.

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

5 years agoUnify <media> element callback registration and unregistration
jpfau@apple.com [Wed, 19 Mar 2014 01:48:54 +0000 (01:48 +0000)]
Unify <media> element callback registration and unregistration
https://bugs.webkit.org/show_bug.cgi?id=130417

Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::registerWithDocument):
(WebCore::HTMLMediaElement::unregisterWithDocument):
(WebCore::HTMLMediaElement::didMoveToNewDocument):
* html/HTMLMediaElement.h:

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

5 years agoUnreviewed, fix iOS production build.
fpizlo@apple.com [Wed, 19 Mar 2014 01:36:17 +0000 (01:36 +0000)]
Unreviewed, fix iOS production build.

* JavaScriptCore.xcodeproj/project.pbxproj:

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

5 years agoMediaDocument should set a max-width on its <video> element.
jer.noble@apple.com [Wed, 19 Mar 2014 00:38:01 +0000 (00:38 +0000)]
MediaDocument should set a max-width on its <video> element.
https://bugs.webkit.org/show_bug.cgi?id=114691

Reviewed by Eric Carlson.

Set a style attribute containing max-width:100% and max-height:100% so that large videos
are entirely visible within the browser window bounds.

* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):

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

5 years ago[WebRTC] Fix layering violation in RTCStatsRequest
thiago.lacerda@openbossa.org [Wed, 19 Mar 2014 00:28:29 +0000 (00:28 +0000)]
[WebRTC] Fix layering violation in RTCStatsRequest
https://bugs.webkit.org/show_bug.cgi?id=130426

Reviewed by Eric Carlson.

RTCStatsRequest::track() should return a MediaStreamTrackPrivate*.

No new tests needed.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::getStats):
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::create):
(WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
(WebCore::RTCStatsRequestImpl::track):
* Modules/mediastream/RTCStatsRequestImpl.h:
* platform/mediastream/RTCStatsRequest.h:

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

5 years agoAttempt to fix the Production build.
timothy@apple.com [Wed, 19 Mar 2014 00:01:41 +0000 (00:01 +0000)]
Attempt to fix the Production build.

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

5 years agoMake image controls menu work in WK2
beidson@apple.com [Tue, 18 Mar 2014 23:54:30 +0000 (23:54 +0000)]
Make image controls menu work in WK2
<rdar://problem/16294412> and https://bugs.webkit.org/show_bug.cgi?id=130424

Reviewed by Tim Horton.

* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::Handle::~Handle):
(WebKit::SharedMemory::Handle::clear):

* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::~Handle):
(WebKit::SharedMemory::Handle::clear):

* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::operator=):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::controlledImageHandle):

* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::Handle::clear):
* Shared/ShareableBitmap.h:
* UIProcess/WebContextMenuProxy.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::replaceControlledImage):
* UIProcess/WebPageProxy.h:

* UIProcess/efl/WebContextMenuProxyEfl.cpp:
(WebKit::WebContextMenuProxyEfl::showContextMenu):
* UIProcess/efl/WebContextMenuProxyEfl.h:

* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::showContextMenu):
* UIProcess/gtk/WebContextMenuProxyGtk.h:

Add a sharing service context menu that lives side-by-side with the normal one:
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
(-[WKSharingServicePickerDelegate setMenuProxy:WebKit::]):
(-[WKSharingServicePickerDelegate setPicker:]):
(-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
(-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:sourceFrameOnScreenForShareItem:]):
(-[WKSharingServicePickerDelegate sharingService:transitionImageForShareItem:contentRect:]):
(-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
(WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
(WebKit::WebContextMenuProxyMac::clearImageServicesMenu):
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
(WebKit::WebContextMenuProxyMac::window):
(WebKit::WebContextMenuProxyMac::replaceControlledImage):

* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
(WebKit::WebContextMenu::replaceControlledImage):
* WebProcess/WebPage/WebContextMenu.h:

Teach the WebProcess how to accept the replaced image.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::replaceControlledImage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

5 years agoUpdate RegExp Tracing code
msaboff@apple.com [Tue, 18 Mar 2014 23:53:49 +0000 (23:53 +0000)]
Update RegExp Tracing code
https://bugs.webkit.org/show_bug.cgi?id=130381

Reviewed by Andreas Kling.

Updated the regular expression tracing code for 8/16 bit JIT as
well as match only entry points.  Also added average string length
metric.

* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::match):
(JSC::RegExp::printTraceData):
* runtime/RegExp.h:
* runtime/VM.cpp:
(JSC::VM::addRegExpToTrace):
(JSC::VM::dumpRegExpTrace):
* runtime/VM.h:
* yarr/YarrJIT.h:
(JSC::Yarr::YarrCodeBlock::get8BitMatchOnlyAddr):
(JSC::Yarr::YarrCodeBlock::get16BitMatchOnlyAddr):
(JSC::Yarr::YarrCodeBlock::get8BitMatchAddr):
(JSC::Yarr::YarrCodeBlock::get16BitMatchAddr):

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

5 years agoFix a trivial FIXME
andersca@apple.com [Tue, 18 Mar 2014 23:09:44 +0000 (23:09 +0000)]
Fix a trivial FIXME
https://bugs.webkit.org/show_bug.cgi?id=130432

Reviewed by Tim Horton.

* history/HistoryItem.cpp:
(WebCore::HistoryItem::encodeBackForwardTreeNode):

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

5 years agoBegin cleaning up KeyedDecoder and KeyedEncoder
andersca@apple.com [Tue, 18 Mar 2014 22:56:26 +0000 (22:56 +0000)]
Begin cleaning up KeyedDecoder and KeyedEncoder
https://bugs.webkit.org/show_bug.cgi?id=130431

Reviewed by Tim Horton.

Source/WebCore:

Rename KeyedDecoder::decodeVerifiedEnum to decodeEnum to match the encode function,
and sort the decode functions to be in the same logical order as the encode functions.

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::decode):
* Modules/indexeddb/IDBKeyPath.cpp:
(WebCore::IDBKeyPath::decode):
* platform/KeyedCoding.h:
(WebCore::KeyedDecoder::decodeEnum):

Source/WebKit2:

* Shared/cf/KeyedDecoder.cpp:
(WebKit::KeyedDecoder::KeyedDecoder):
If we can't parse the property list data, just add an empty dictionary to the stack.

(WebKit::KeyedDecoder::decodeBool):
Remove unneeded m_dictionaryStack.last() null check. m_dictionaryStack would either be empty
or at least have a root element; it would never have a null element.

(WebKit::KeyedDecoder::decodeDouble):
Remove the same check as above and remove the CFNumberGetType checks since CFNumberGetValue will
do the type conversion for us and return false if it's lossy.

(WebKit::KeyedDecoder::decodeInt64):
Remove the m_dictionaryStack.last() check.

(WebKit::KeyedDecoder::decodeUInt32):
Ditto.

(WebKit::KeyedDecoder::decodeString):
Ditto.

(WebKit::KeyedDecoder::beginObject):
Ditto.

(WebKit::KeyedDecoder::beginArray):
Ditto.

(WebKit::KeyedDecoder::beginArrayElement):
Ditto.

* Shared/cf/KeyedDecoder.h:
Sort functions to be in the same logical order as the base class.

* Shared/cf/KeyedEncoder.cpp:
(WebKit::KeyedEncoder::finishEncoding):
Don't check for a non-null CFErrorRef here (which we incidentally never released on error). Instead,
just null check the returned CFDataRef object.

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

5 years ago[WinCairo] Unreviewed build fix after r165763.
alex.christensen@flexsim.com [Tue, 18 Mar 2014 22:41:20 +0000 (22:41 +0000)]
[WinCairo] Unreviewed build fix after r165763.

* win/tools/vsprops/GStreamerCommon.props:
Link to gsttag-1.0.lib in addition to other GStreamer libraries.

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

5 years agoUnreviewed typo build fix for r165846.
joepeck@webkit.org [Tue, 18 Mar 2014 22:08:25 +0000 (22:08 +0000)]
Unreviewed typo build fix for r165846.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::decode):

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

5 years agoUnreviewed GTK Gardening.
commit-queue@webkit.org [Tue, 18 Mar 2014 22:05:45 +0000 (22:05 +0000)]
Unreviewed GTK Gardening.

Move expected accesibility results to the right path and update them.

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-03-18

* platform/gtk/accessibility/aria-help-expected.txt: Renamed from LayoutTests/platform/gtk/accessibility/accessibility/aria-help-expected.txt.
* platform/gtk/accessibility/aria-hidden-false-works-in-subtrees-expected.txt: Renamed from LayoutTests/platform/gtk/accessibility/accessibility/aria-hidden-false-works-in-subtrees-expected.txt.
* platform/gtk/accessibility/fieldset-element-expected.txt: Renamed from LayoutTests/platform/gtk/accessibility/accessibility/fieldset-element-expected.txt.
* platform/gtk/accessibility/meter-element-expected.txt: Renamed from LayoutTests/platform/gtk/accessibility/accessibility/meter-element-expected.txt.
* platform/gtk/accessibility/negative-tabindex-does-not-expose-label-expected.txt: Renamed from LayoutTests/platform/gtk/accessibility/accessibility/negative-tabindex-does-not-expose-label-expected.txt.

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

5 years agoReduce use of deprecatedCharacters in WebCore
darin@apple.com [Tue, 18 Mar 2014 21:57:44 +0000 (21:57 +0000)]
Reduce use of deprecatedCharacters in WebCore
https://bugs.webkit.org/show_bug.cgi?id=130318

Reviewed by Andreas Kling.

Source/WebCore:

* Modules/indexeddb/IDBKeyPath.cpp:
(WebCore::IDBKeyPathLexer::IDBKeyPathLexer): Use StringView for parsing.
(WebCore::IDBKeyPathLexer::lex): Ditto.
(WebCore::IDBKeyPathLexer::lexIdentifier): Ditto.

* Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::encodeString): Index directly into string instead of
using deprecatedCharacters.

* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): Use
StringView::getCharactersWithUpconvert.
(WebCore::ThreadableWebSocketChannelClientWrapper::setExtensions): Ditto.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
Use operator NSString * instead of explicitly creating an NSString.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::writeLittleEndianUInt16): Added.
(WebCore::CloneSerializer::serialize): Added a separate code path for 8-bit strings.
(WebCore::CloneSerializer::write): Ditto.

* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
Use operator NSString * instead of explicitly creating an NSString.

* dom/Document.cpp:
(WebCore::Document::parseQualifiedName): Index directly into string instead of
using deprecatedCharacters.
* editing/CompositeEditCommand.cpp:
(WebCore::containsOnlyWhitespace): Ditto.
* editing/SmartReplace.cpp:
(WebCore::addAllCodePoints): Ditto.
(WebCore::getSmartSet): Use StringView::upconvertedCharacters.

* editing/TextIterator.cpp:
(WebCore::foldQuoteMarksAndSoftHyphens): Changed to return a value so it can be
used in initialization rather than assignment.
(WebCore::SearchBuffer::SearchBuffer): Use StringView::upconvertedCharacters.

* editing/TypingCommand.cpp:
(WebCore::TypingCommand::insertText): Index directly into string instead of using
deprecatedCharacters.
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::characterAfter): Ditto.
* editing/VisibleUnits.cpp:
(WebCore::startOfParagraph): Ditto.
(WebCore::endOfParagraph): Ditto.

* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::append): Pass a StringView to TextEncoding::encode.

* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::parseToDateComponents): Use
StringView::upconvertedCharacters.

* html/FormDataList.cpp:
(WebCore::FormDataList::appendString): Pass a StringView to TextEncoding::encode.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::normalizeSpaces): Use StringView::getCharactersWithUpconvert.

* html/parser/HTMLParserIdioms.cpp:
(WebCore::stripLeadingAndTrailingHTMLSpaces): Use characters16 for a code path
that already handled 8-bit characters separately.
(WebCore::parseHTMLNonNegativeInteger): Ditto.
(WebCore::parseDescriptors): Added an 8-bit code path.

* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::newLineAndWhitespaceDelimiters): Index directly into
string instead of using deprecatedCharacters.
* inspector/InspectorStyleTextEditor.cpp:
(WebCore::InspectorStyleTextEditor::insertProperty): Ditto.
(WebCore::InspectorStyleTextEditor::internalReplaceProperty): Ditto.

* page/ContentSecurityPolicy.cpp:
(WebCore::isSourceListNone): Use StringView::upconvertedCharacters.
(WebCore::CSPSourceList::parse): Ditto.
(WebCore::NonceDirective::parse): Ditto.
(WebCore::MediaListDirective::parse): Ditto.
(WebCore::CSPDirectiveList::parse): Ditto.
(WebCore::CSPDirectiveList::parseReportURI): Ditto.
(WebCore::CSPDirectiveList::parseReflectedXSS): Ditto.
(WebCore::ContentSecurityPolicy::didReceiveHeader): Ditto.

* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame): Pass a StringView into
TextEncoding::encode.
(WebCore::PageSerializer::serializeCSSStyleSheet): Ditto.

* platform/Length.cpp:
(WebCore::countCharacter): Index directly into string instead of using
deprecatedCharacters. Also changed to take a StringImpl&.
(WebCore::newCoordsArray): Ditto. Call countCharacter the new way, and
use StringView::upconvertedCharacters.
(WebCore::newLengthArray): Ditto.

* platform/LinkHash.cpp:
(WebCore::visitedLinkHash): Use characters16 for the 16-bit path.
Also removed unused visitedURL function.
* platform/LinkHash.h: Removed unused visitedURL function.

* platform/SharedBuffer.cpp:
(WebCore::utf8Buffer): Added an 8-bit code path.
* platform/URL.cpp:
(WebCore::URL::port): Ditto.
(WebCore::encodeRelativeString): Use StringView to call TextEncoding::encode.

* platform/graphics/Color.cpp:
(WebCore::Color::parseHexColor): Use characters16 in the 16-bit path.
(WebCore::Color::Color): Ditto.

* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
(WebCore::harfBuzzGetGlyph): Use StringView to call TextEncoding::encode.

* platform/graphics/StringTruncator.cpp:
(WebCore::centerTruncateToBuffer): Use StringView::getCharactersWithUpconvert.
(WebCore::rightTruncateToBuffer): Ditto.
(WebCore::rightClipToCharacterBuffer): Ditto.
(WebCore::rightClipToWordBuffer): Ditto.
(WebCore::leftTruncateToBuffer): Ditto.
(WebCore::truncateString): Ditto.

* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun): Use characters16 in the 16-bit code path.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
Use StringView::upconvertedCharacters.

* platform/network/DataURL.cpp:
(WebCore::handleDataURL): Use StringView to call TextEncoding::encode.
* platform/network/FormDataBuilder.cpp:
(WebCore::FormDataBuilder::addFilenameToMultiPartHeader): Ditto.

* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::bindBlob): Use StringView::upconvertedCharacters.
(WebCore::SQLiteStatement::bindText): Ditto.

* platform/text/DecodeEscapeSequences.h:
(WebCore::Unicode16BitEscapeSequence::decodeRun): Changed to take a StringView.
(WebCore::URLEscapeSequence::decodeRun): Ditto.
(WebCore::decodeEscapeSequences): Pass StringView to decodeRun.

* platform/text/Hyphenation.cpp:
(WebCore::lastHyphenLocation): Take a StringView.
* platform/text/Hyphenation.h: Make lastHyphenLocation take a StringView.

* platform/text/TextBreakIterator.cpp:
(WebCore::initializeIteratorWithRules): Use StringView::upconvertedCharacters.

* platform/text/TextEncoding.cpp:
(WebCore::TextEncoding::encode): Use StringView::upconvertedCharacters.
Change argument type to StringView.
* platform/text/TextEncoding.h: Ditto.

* platform/text/TextEncodingRegistry.cpp:
(WebCore::atomicCanonicalTextEncodingName): Use characters16 for the 16-bit path.

* platform/text/cf/HyphenationCF.cpp:
(WebCore::lastHyphenLocation): Use StringView::text.createCFStringWithoutCopying.
Change argument type to StringView.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun): Use characters16 for the 16-bit path.

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::width): Removed check for null characters pointer,
since the pointer will never be null, and even if it was there would be no need
for an early exit.

* rendering/RenderText.cpp:
(WebCore::maxWordFragmentWidth): Take a StringView.
(WebCore::RenderText::computePreferredLogicalWidths): Pass in a StringView.
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::tryHyphenating): Ditto.

* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath): Use
StringView::upconvertedCharacters.

* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::SVGTextMetrics): Use String::substring.

* svg/SVGAngle.cpp:
(WebCore::SVGAngle::setValueAsString): Use StringView::upconvertedCharacters.
* svg/SVGAnimateMotionElement.cpp:
(WebCore::parsePoint): Ditto.
* svg/SVGAnimationElement.cpp:
(WebCore::parseKeySplines): Ditto.
* svg/SVGFitToViewBox.cpp:
(WebCore::SVGFitToViewBox::parseViewBox): Ditto.

* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection): Pass StringView to
createStringWIthMirroredCharacters.
(WebCore::createStringWithMirroredCharacters): Changed to use StringView and
use indexing into that instead of a characters pointer.

* svg/SVGFontData.h: Removed createStringWithMirroredCharacters member function,
since it has nothing to do with the SVGFontData object. Now it's just a private
helper function in the SVGFontData.cpp source file.

* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::registerLigaturesInGlyphCache): Index into the string
instead of using deprecatedCharacters.

* svg/SVGGlyphMap.h:
(WebCore::SVGGlyphMap::addGlyph): Use StringView::upconvertedCharacters.
(WebCore::SVGGlyphMap::collectGlyphsForString): Ditto.
* svg/SVGGlyphRefElement.cpp:
(WebCore::SVGGlyphRefElement::parseAttribute): Ditto.
* svg/SVGLength.cpp:
(WebCore::SVGLength::setValueAsString): Ditto.
* svg/SVGLengthList.cpp:
(WebCore::SVGLengthList::parse): Ditto.
* svg/SVGNumberList.cpp:
(WebCore::SVGNumberList::parse): Ditto.
* svg/SVGParserUtilities.cpp:
(WebCore::parseNumberFromString): Ditto.
(WebCore::parseNumberOptionalNumber): Ditto.
(WebCore::parseRect): Ditto.
(WebCore::pointsListFromSVGData): Ditto.
(WebCore::parseGlyphName): Ditto.
(WebCore::parseKerningUnicodeString): Ditto.
(WebCore::parseDelimitedString): Ditto.
* svg/SVGPreserveAspectRatio.cpp:
(WebCore::SVGPreserveAspectRatio::parse): Ditto.
* svg/SVGStringList.cpp:
(WebCore::SVGStringList::parse): Ditto.
* svg/SVGTransformList.cpp:
(WebCore::SVGTransformList::parse): Ditto.
* svg/SVGTransformable.cpp:
(WebCore::SVGTransformable::parseTransformType): Ditto.
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::parseViewSpec): Ditto.
* svg/SVGZoomAndPan.h:
(WebCore::SVGZoomAndPan::parseAttribute): Ditto.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send): Pass a StringView to TextEncoding::encode.

* xml/XSLStyleSheetLibxslt.cpp:
(WebCore::XSLStyleSheet::parseString): Use StringView::upconvertedCharacters.

Source/WTF:

* wtf/text/WTFString.h: Export another overload of charactersToFloat since it's used
in WebCore now.

* wtf/text/cf/StringViewCF.cpp: Change so this can build on Windows.

* WTF.vcxproj/WTF.vcxproj: Added StringViewCF.cpp.
* WTF.vcxproj/WTF.vcxproj.filters: Added StringViewCF.cpp.

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

5 years agoWebKit2 SPI to disable remote inspection on a WKWebView / WKPage
joepeck@webkit.org [Tue, 18 Mar 2014 21:46:21 +0000 (21:46 +0000)]
WebKit2 SPI to disable remote inspection on a WKWebView / WKPage
https://bugs.webkit.org/show_bug.cgi?id=130371

Reviewed by Dan Bernstein.

* Shared/WebPageCreationParameters.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
Add allowsRemoteInspection bool.

* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetAllowsRemoteInspection):
(WKPageSetAllowsRemoteInspection):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _allowsRemoteInspection]):
(-[WKWebView _setAllowsRemoteInspection:]):
Getter and setter for allowing remote inspection state.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::allowsRemoteInspection):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setAllowsRemoteInspection):
(WebKit::WebPageProxy::creationParameters):
Cached allows remote inspection state, with getter and setter.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setAllowsRemoteInspection):
When setting, call into WebCore to adjust the Page's setting.

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

5 years agoUnreviewed GTK gardening.
commit-queue@webkit.org [Tue, 18 Mar 2014 21:38:05 +0000 (21:38 +0000)]
Unreviewed GTK gardening.

Test fast/events/touch/touch-target-limited.html crashes.

Some tests on editing/spelling are timing out, but not longer failing:
editing/spelling/spellcheck-paste.html
editing/spelling/spelling-changed-text.html
editing/spelling/spellcheck-paste-disabled.html
editing/spelling/spellcheck-paste-continuous-disabled.html

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-03-18

* platform/gtk-wk2/TestExpectations:
* platform/gtk/TestExpectations:

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

5 years agoLayoutBox is a terrible name
bjonesbe@adobe.com [Tue, 18 Mar 2014 20:58:38 +0000 (20:58 +0000)]
LayoutBox is a terrible name
https://bugs.webkit.org/show_bug.cgi?id=130351

Reviewed by Simon Fraser.

Rename LayoutBox to CSSBoxType. Also rename the functions and methods
that mention "LayoutBox" to something that makes sense for each
specific situation.

No new tests, no behavior change.

* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* css/CSSBasicShapes.cpp:
(WebCore::CSSBasicShapeCircle::cssText):
(WebCore::CSSBasicShapeCircle::equals):
(WebCore::CSSBasicShapeEllipse::cssText):
(WebCore::CSSBasicShapeEllipse::equals):
(WebCore::CSSBasicShapePolygon::cssText):
(WebCore::CSSBasicShapePolygon::equals):
(WebCore::CSSBasicShapeInset::cssText):
* css/CSSBasicShapes.h:
(WebCore::CSSBasicShape::referenceBox):
(WebCore::CSSBasicShape::setReferenceBox):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::shapePropertyValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator CSSBoxType):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* rendering/ClipPathOperation.h:
(WebCore::ShapeClipPathOperation::setReferenceBox):
(WebCore::ShapeClipPathOperation::referenceBox):
(WebCore::BoxClipPathOperation::create):
(WebCore::BoxClipPathOperation::referenceBox):
(WebCore::BoxClipPathOperation::BoxClipPathOperation):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createBoxShape):
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeInfo.cpp:
(WebCore::ShapeInfo<RenderType>::computedShape):
* rendering/shapes/ShapeInfo.h:
* rendering/shapes/ShapeInsideInfo.h:
* rendering/shapes/ShapeOutsideInfo.h:
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShape::canBlend):
* rendering/style/BasicShapes.h:
(WebCore::BasicShape::referenceBox):
(WebCore::BasicShape::setReferenceBox):
(WebCore::BasicShape::BasicShape):
* rendering/style/RenderStyleConstants.h:
* rendering/style/ShapeValue.h:
(WebCore::ShapeValue::createShapeValue):
(WebCore::ShapeValue::createBoxShapeValue):
(WebCore::ShapeValue::cssBox):
(WebCore::ShapeValue::ShapeValue):

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

5 years agoAdd CompareStrictEq(StringIdent:, NotStringVar:) and CompareStrictEq(String:, Untyped:)
fpizlo@apple.com [Tue, 18 Mar 2014 20:53:07 +0000 (20:53 +0000)]
Add CompareStrictEq(StringIdent:, NotStringVar:) and CompareStrictEq(String:, Untyped:)
https://bugs.webkit.org/show_bug.cgi?id=130300

Reviewed by Mark Hahnenberg.

We can quickly strictly compare StringIdent's to NotStringVar's and String's to Untyped's.
This makes the DFG aware of this.

Also adds StringIdent-to-StringIdent and StringIdent-to-NotStringVar strict comparisons to
the FTL. Also adds StringIdent-to-StringIdent non-strict comparisons to the FTL.

This also gives the DFG some abstractions for checking something is a cell or is other.
This made this patch easier to write and also simplified a bunch of other stuff.

1% speed-up on Octane.

* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::JumpList::JumpList):
* bytecode/SpeculatedType.h:
(JSC::isNotStringVarSpeculation):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::childFor):
(JSC::DFG::Node::shouldSpeculateNotStringVar):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::SafeToExecuteEdge::operator()):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileIn):
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
(JSC::DFG::SpeculativeJIT::compileInstanceOf):
(JSC::DFG::SpeculativeJIT::compileStrictEq):
(JSC::DFG::SpeculativeJIT::compileBooleanCompare):
(JSC::DFG::SpeculativeJIT::compileStringEquality):
(JSC::DFG::SpeculativeJIT::compileStringToUntypedEquality):
(JSC::DFG::SpeculativeJIT::compileStringIdentEquality):
(JSC::DFG::SpeculativeJIT::compileStringIdentToNotStringVarEquality):
(JSC::DFG::SpeculativeJIT::compileStringZeroLength):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
(JSC::DFG::SpeculativeJIT::speculateString):
(JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage):
(JSC::DFG::SpeculativeJIT::speculateNotStringVar):
(JSC::DFG::SpeculativeJIT::speculateNotCell):
(JSC::DFG::SpeculativeJIT::speculateOther):
(JSC::DFG::SpeculativeJIT::speculate):
(JSC::DFG::SpeculativeJIT::emitSwitchChar):
(JSC::DFG::SpeculativeJIT::emitSwitchString):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::blessedBooleanResult):
(JSC::DFG::SpeculativeJIT::unblessedBooleanResult):
(JSC::DFG::SpeculativeJIT::booleanResult):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::branchIsCell):
(JSC::DFG::branchNotCell):
(JSC::DFG::SpeculativeJIT::branchIsOther):
(JSC::DFG::SpeculativeJIT::branchNotOther):
(JSC::DFG::SpeculativeJIT::moveTrueTo):
(JSC::DFG::SpeculativeJIT::moveFalseTo):
(JSC::DFG::SpeculativeJIT::blessBoolean):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::writeBarrier):
(JSC::DFG::SpeculativeJIT::branchIsCell):
(JSC::DFG::SpeculativeJIT::branchNotCell):
(JSC::DFG::SpeculativeJIT::branchIsOther):
(JSC::DFG::SpeculativeJIT::branchNotOther):
(JSC::DFG::SpeculativeJIT::moveTrueTo):
(JSC::DFG::SpeculativeJIT::moveFalseTo):
(JSC::DFG::SpeculativeJIT::blessBoolean):
* dfg/DFGUseKind.cpp:
(WTF::printInternal):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq):
(JSC::FTL::LowerDFGToLLVM::lowString):
(JSC::FTL::LowerDFGToLLVM::lowStringIdent):
(JSC::FTL::LowerDFGToLLVM::speculate):
(JSC::FTL::LowerDFGToLLVM::speculateString):
(JSC::FTL::LowerDFGToLLVM::speculateStringIdent):
(JSC::FTL::LowerDFGToLLVM::speculateNotStringVar):
* runtime/JSCJSValue.h:
* tests/stress/string-ident-to-not-string-var-equality.js: Added.
(foo):
(bar):
(test):

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

5 years agoREGRESSION: Visited link coloring seems to be completely broken in tip of tree
andersca@apple.com [Tue, 18 Mar 2014 20:45:27 +0000 (20:45 +0000)]
REGRESSION: Visited link coloring seems to be completely broken in tip of tree
https://bugs.webkit.org/show_bug.cgi?id=130419
<rdar://problem/16337850>

Reviewed by Dan Bernstein.

Make sure to send any queued up messages before calling connectionWillOpen so we'll ensure
FIFO ordering if any messages are sent from within connectionWillOpen.

* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):

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

5 years agoAdd Copyright to framework.sb
commit-queue@webkit.org [Tue, 18 Mar 2014 20:36:09 +0000 (20:36 +0000)]
Add Copyright to framework.sb
https://bugs.webkit.org/show_bug.cgi?id=130413

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

Other sb files got the copyright. Follow suit.

* framework.sb:

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

5 years agoWebPageCreationParameters colorSpace should be MAC not COCOA
commit-queue@webkit.org [Tue, 18 Mar 2014 20:18:37 +0000 (20:18 +0000)]
WebPageCreationParameters colorSpace should be MAC not COCOA
https://bugs.webkit.org/show_bug.cgi?id=130414

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-03-18
Reviewed by Dan Bernstein.

The colorSpace param was only set and used on Mac, not iOS.

* Shared/WebPageCreationParameters.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):

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

5 years agoWeb Inspector: Make update-InspectorBackendCommands.rb only update legacy protocol...
commit-queue@webkit.org [Tue, 18 Mar 2014 20:07:26 +0000 (20:07 +0000)]
Web Inspector: Make update-InspectorBackendCommands.rb only update legacy protocol versions
https://bugs.webkit.org/show_bug.cgi?id=130412

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

Rename the script and simplify to only update Legacy protocol versions.

* Scripts/update-LegacyInspectorBackendCommands.rb: Renamed from Source/WebInspectorUI/Scripts/update-InspectorBackendCommands.rb.

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

5 years agoREGRESSION (r162334): RenderTableCol::styleDidChange uses out-of-date table information
dbates@webkit.org [Tue, 18 Mar 2014 20:00:47 +0000 (20:00 +0000)]
REGRESSION (r162334): RenderTableCol::styleDidChange uses out-of-date table information
https://bugs.webkit.org/show_bug.cgi?id=129561

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/table/update-col-width-and-remove-table-cell-crash.html

Fixes an issue where a table column or table column group may query an out-
of-date model of its associated table as part of its process to propagate
style changes to affected table cells.

* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::styleDidChange): Ensure that all sections in the table
are up-to-date before querying for a table cell.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::recalcCells): Update comment to read well. In
particular, remove the reference to RenderTableSection::fillRowsWithDefaultStartingAtPosition()
as this function was removed in <http://trac.webkit.org/changeset/99919>.
(WebCore::RenderTableSection::setNeedsCellRecalc): Clear the grid preemptively to
to ensure that accessors cannot access stale data. We'll build the grid again
in RenderTableSection::recalcCells().
(WebCore::RenderTableSection::numColumns): Add ASSERT(!m_needsCellRecalc) to assert
that the grid cells are up-to-date. That is, we don't need to calculate them again.
* rendering/RenderTableSection.h: Add ASSERT(!m_needsCellRecalc) or call recalcCellsIfNeeded()
before accessing the grid to ensure that it's up-to-date.

LayoutTests:

Add a test to ensure that a table column propagates a style change to applicable
table cells.

* fast/table/update-col-width-and-remove-table-cell-crash-expected.txt: Added.
* fast/table/update-col-width-and-remove-table-cell-crash.html: Added.

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

5 years agoREGRESSION (r163560): ASSERTION FAILED: childrenInline() in WebCore::RenderSVGText...
dbates@webkit.org [Tue, 18 Mar 2014 19:59:05 +0000 (19:59 +0000)]
REGRESSION (r163560): ASSERTION FAILED: childrenInline() in WebCore::RenderSVGText::layout
https://bugs.webkit.org/show_bug.cgi?id=130346

Reviewed by Andreas Kling.

Source/WebCore:

Following <http://trac.webkit.org/changeset/163560>, SVG inline elements may be treated as block-
level elements depending on their CSS styles (e.g. display: block). But such elements should always
be treated as inline-level elements.

Partially revert <http://trac.webkit.org/changeset/164368> as it addressed a similar issue for
<tspan> and <tref>. Instead we should implement RenderSVGInline::updateFromStyle() to ensure that
RenderSVGInline and any derived classes (e.g. RenderSVGTSpan) are always treated as inline elements
regardless of their CSS style because the SVG text layout code depends on this assumption as part
of a performance optimization. We may want to revaluate the benefits of this optimization with respect
to code clarity and ensuring the code is less error prone.

Test: svg/text/a-display-block.html
      svg/text/tref-display-inherit.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Revert changes from <http://trac.webkit.org/changeset/164368>.
* rendering/RenderInline.h:
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::updateFromStyle): Added; ensure that RenderSVGInline and any derived
classes are treated as inline elements because the SVG text layout code depends on this assumption.
* rendering/svg/RenderSVGInline.h:

LayoutTests:

Added tests to ensure that SVG <a> and <tref> are always treated as inline-level elements.

* svg/text/a-display-block-expected.txt: Added.
* svg/text/a-display-block.html: Added.
* svg/text/tref-display-inherit-expected.txt: Added.
* svg/text/tref-display-inherit.html: Added.

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

5 years ago[CSS Shapes] shape-outside: ellipse(50% 50% at) causes crash
hmuller@adobe.com [Tue, 18 Mar 2014 19:50:57 +0000 (19:50 +0000)]
[CSS Shapes] shape-outside: ellipse(50% 50% at) causes crash
https://bugs.webkit.org/show_bug.cgi?id=130366

Reviewed by Andreas Kling.

Source/WebCore:

The BasicShape ellipse and circle functions now report a syntax error
if the "at" keyword is not followed by a position.

The existing parsing tests have been updated to include this case.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseBasicShapeCircle):
(WebCore::CSSParser::parseBasicShapeEllipse):

LayoutTests:

Added invalid syntax tests for ellipse(.. at), circle(.. at) variations.

* fast/shapes/parsing/parsing-shape-inside-expected.txt:
* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-test-utils.js:

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

5 years agoRemoving MediaStreamVector typedef
thiago.lacerda@openbossa.org [Tue, 18 Mar 2014 19:47:56 +0000 (19:47 +0000)]
Removing MediaStreamVector typedef
https://bugs.webkit.org/show_bug.cgi?id=130402

Reviewed by Eric Carlson.

* Modules/mediastream/MediaStream.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::getLocalStreams):
(WebCore::RTCPeerConnection::getRemoteStreams):
(WebCore::RTCPeerConnection::getStreamById):
(WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
* Modules/mediastream/RTCPeerConnection.h:

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

5 years agoWeb Inspector: Remove stale ReportMemoryUsagePlugin
commit-queue@webkit.org [Tue, 18 Mar 2014 19:46:20 +0000 (19:46 +0000)]
Web Inspector: Remove stale ReportMemoryUsagePlugin
https://bugs.webkit.org/show_bug.cgi?id=130405

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-03-18
Reviewed by Andreas Kling.

This clang plugin looks like it was used for the old Inspector memory
instrumentation that was removed. So the tool can be removed.

* clang/ReportMemoryUsagePlugin/CMakeLists.txt: Removed.
* clang/ReportMemoryUsagePlugin/Makefile: Removed.
* clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp: Removed.
* clang/ReportMemoryUsagePlugin/tests/Source/WebCore/Test.cpp: Removed.

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

5 years agoRemoved extra parens from if statement in a preprocessor define.
commit-queue@webkit.org [Tue, 18 Mar 2014 19:39:18 +0000 (19:39 +0000)]
Removed extra parens from if statement in a preprocessor define.
https://bugs.webkit.org/show_bug.cgi?id=130408

Patch by Matthew Mirman <mmirman@apple.com> on 2014-03-18
Reviewed by Filip Pizlo.

* parser/Parser.cpp:

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

5 years agoUnreviewed, rolling out r165815.
commit-queue@webkit.org [Tue, 18 Mar 2014 19:16:01 +0000 (19:16 +0000)]
Unreviewed, rolling out r165815.
https://bugs.webkit.org/show_bug.cgi?id=130410

Broke many VTT tests (Requested by bfulgham on #webkit).

Reverted changeset:

Source/WebCore:

"TextTrackRegion Not Implemented"
https://bugs.webkit.org/show_bug.cgi?id=116546
http://trac.webkit.org/changeset/165815

LayoutTests:

"TextTrackRegion Not Implemented"
https://bugs.webkit.org/show_bug.cgi?id=116546
http://trac.webkit.org/changeset/165815

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

5 years agoBad cast with toRenderBox in WebCore::RenderView::repaintViewRectangle
reni@webkit.org [Tue, 18 Mar 2014 18:57:45 +0000 (18:57 +0000)]
Bad cast with toRenderBox in WebCore::RenderView::repaintViewRectangle
https://bugs.webkit.org/show_bug.cgi?id=129104

Reviewed by Simon Fraser.

Source/WebCore:

We should not cast the renderer of a RenderView's owner to RenderBox
unless we are sure it is one.

Test: plugins/crash-invalid-data-reference.html

* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):

LayoutTests:

* plugins/crash-invalid-data-reference-expected.txt: Added.
* plugins/crash-invalid-data-reference.html: Added.

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

5 years agoDan says that options should be unsigned, and enums should be signed.
simon.fraser@apple.com [Tue, 18 Mar 2014 18:30:45 +0000 (18:30 +0000)]
Dan says that options should be unsigned, and enums should be signed.

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(NS_ENUM):

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

5 years agowebkit-patch land shouldn't add a reviewer for unreviewed build fixes
commit-queue@webkit.org [Tue, 18 Mar 2014 18:30:16 +0000 (18:30 +0000)]
webkit-patch land shouldn't add a reviewer for unreviewed build fixes
https://bugs.webkit.org/show_bug.cgi?id=130220

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

* Scripts/webkitpy/common/checkout/changelog.py:
(ChangeLog.set_reviewer):
* Scripts/webkitpy/common/checkout/changelog_unittest.py:
(test_set_reviewer):

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

5 years ago[WK2] Pass ranges over IPC in a cross-platform manner
ap@apple.com [Tue, 18 Mar 2014 18:13:44 +0000 (18:13 +0000)]
[WK2] Pass ranges over IPC in a cross-platform manner
https://bugs.webkit.org/show_bug.cgi?id=130376

Reviewed by Anders Carlsson.

Added an EditingRange class for IPC, which automatically converts to and from
NSRanges, knowing the difference between notFound and NSNotFound.

Manually applied the same fix to characterIndexForPoint.

* Scripts/webkit2/messages.py:
(struct_or_class):
* Shared/EditingRange.h: Added.
(WebKit::EditingRange::EditingRange):
(WebKit::EditingRange::isValid):
(WebKit::EditingRange::operator NSRange):
* UIProcess/API/mac/WKView.mm:
(-[WKView insertText:replacementRange:]):
(-[WKView selectedRange]):
(-[WKView hasMarkedText]):
(-[WKView setMarkedText:selectedRange:replacementRange:]):
(-[WKView markedRange]):
(-[WKView attributedSubstringForProposedRange:actualRange:]):
(-[WKView characterIndexForPoint:]):
(-[WKView firstRectForCharacterRange:actualRange:]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setMarkedText:selectedRange:]):
(-[WKContentView insertText:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::insertText):
(WebKit::WebPageProxy::insertDictatedText):
(WebKit::WebPageProxy::getMarkedRange):
(WebKit::WebPageProxy::getSelectedRange):
(WebKit::WebPageProxy::getAttributedSubstringFromRange):
(WebKit::WebPageProxy::firstRectForCharacterRange):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::insertText):
(WebKit::WebPageProxy::insertDictatedText):
(WebKit::WebPageProxy::getMarkedRange):
(WebKit::WebPageProxy::getSelectedRange):
(WebKit::WebPageProxy::getAttributedSubstringFromRange):
(WebKit::WebPageProxy::firstRectForCharacterRange):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::rangeFromEditingRange):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getMarkedRange):
(WebKit::WebPage::getSelectedRange):
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::WebPage::firstRectForCharacterRange):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getMarkedRange):
(WebKit::WebPage::getSelectedRange):
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::WebPage::characterIndexForPoint):
(WebKit::WebPage::firstRectForCharacterRange):

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

5 years agoMicro-optimize element descendant iterator.
akling@apple.com [Tue, 18 Mar 2014 18:11:46 +0000 (18:11 +0000)]
Micro-optimize element descendant iterator.
<https://webkit.org/b/130384>

Add a slightly more efficient ElementDescendantIterator that keeps a stack
of relevant ancestor siblings instead of walking up the parent chain every
time we run out of children.

Reviewed by Antti Koivisto.

* WebCore.xcodeproj/project.pbxproj:
* dom/ElementDescendantIterator.h: Added.
(WebCore::ElementDescendantIterator::ElementDescendantIterator):
(WebCore::ElementDescendantIterator::operator++):
(WebCore::ElementDescendantConstIterator::ElementDescendantConstIterator):
(WebCore::ElementDescendantConstIterator::operator++):
(WebCore::ElementDescendantIteratorAdapter::ElementDescendantIteratorAdapter):
(WebCore::ElementDescendantIteratorAdapter::begin):
(WebCore::ElementDescendantIteratorAdapter::end):
(WebCore::ElementDescendantConstIteratorAdapter::ElementDescendantConstIteratorAdapter):
(WebCore::ElementDescendantConstIteratorAdapter::begin):
(WebCore::ElementDescendantConstIteratorAdapter::end):
(WebCore::elementDescendants):
* dom/ElementIterator.h:
* dom/SelectorQuery.cpp:
(WebCore::elementsForLocalName):
(WebCore::anyElement):
(WebCore::SelectorDataList::executeSingleTagNameSelectorData):
(WebCore::SelectorDataList::executeSingleClassNameSelectorData):
(WebCore::SelectorDataList::executeSingleSelectorData):
(WebCore::SelectorDataList::executeSingleMultiSelectorData):
(WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):

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

5 years agoMutating rules returned by getMatchedCSSRules can result in crash
antti@apple.com [Tue, 18 Mar 2014 18:06:52 +0000 (18:06 +0000)]
Mutating rules returned by getMatchedCSSRules can result in crash
https://bugs.webkit.org/show_bug.cgi?id=130209

Source/WebCore:

Reviewed by Andreas Kling.

The non-standard getMatchedCSSRules API returns CSSStyleRule objects that don't
have parent stylesheet pointer (as we don't know which sheet the rule originated from).
Mutating the rule via such wrapper can lead to crashes later as we fail to invalidate
the underlying stylesheet.

Fix by disallowing mutation of style rules that don't have parent sheet pointer. CSSStyleRule
has two mutable properties selectorText and style. The latter gives back CSSStyleDeclaration.
This patch disallows mutations in both cases for CSSStyleRules that don't have parent stylesheet
pointer.

While it is technically possible to have CSSRules that are legitimately disconnected
from stylesheet (by removing rule from sheet while holding a reference to it) it never
makes sense to mutate such rule as there is no way to do anything with it afterwards.

Tests: fast/css/getMatchedCSSProperties-rule-mutation.html
       fast/css/getMatchedCSSRules-crash.html

* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::setSelectorText):

    Bail out if parent stylesheet is null.

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::setCssText):
(WebCore::PropertySetCSSStyleDeclaration::setProperty):
(WebCore::PropertySetCSSStyleDeclaration::removeProperty):
(WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):

    Allow StyleRuleCSSStyleDeclaration subclass cancel the mutation via
    boolean return value from willMutate.

(WebCore::StyleRuleCSSStyleDeclaration::willMutate):

    Disallow mutation if the owning CSSStyleRule is null or has null stylesheet.

(WebCore::StyleRuleCSSStyleDeclaration::didMutate):

    We never get here with null rule or stylesheet anymore.

* css/PropertySetCSSStyleDeclaration.h:
(WebCore::PropertySetCSSStyleDeclaration::willMutate):

LayoutTests:

Reviewed by Andreas Kling.

* fast/css/getMatchedCSSProperties-rule-mutation-expected.txt: Added.
* fast/css/getMatchedCSSProperties-rule-mutation.html: Added.
* fast/css/getMatchedCSSRules-crash-expected.txt: Added.
* fast/css/getMatchedCSSRules-crash.html: Added.

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

5 years ago<media> elements are not properly moved to new documents' visibility callback lists
jpfau@apple.com [Tue, 18 Mar 2014 18:05:14 +0000 (18:05 +0000)]
<media> elements are not properly moved to new documents' visibility callback lists
https://bugs.webkit.org/show_bug.cgi?id=127711

Reviewed by David Kilzer.

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

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

5 years agoMore FTL enabling.
fpizlo@apple.com [Tue, 18 Mar 2014 17:59:15 +0000 (17:59 +0000)]
More FTL enabling.

Source/JavaScriptCore:

Rubber stamped by Dan Bernstein and Mark Hahnenberg.

* Configurations/FeatureDefines.xcconfig:
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):

Source/WebCore:

Rubber stamped by Dan Bernstein and Mark Hahnenberg.

No new tests.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Rubber stamped by Dan Bernstein.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Rubber stamped by Dan Bernstein.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Rubber stamped by Dan Bernstein and Mark Hahnenberg.

* wtf/Platform.h:

Tools:

Rubber stamped by Dan Bernstein.

* Tools/Scripts/build-webkit:

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

5 years agoRenable pagination mode in WK2 MiniBrowser
simon.fraser@apple.com [Tue, 18 Mar 2014 17:57:19 +0000 (17:57 +0000)]
Renable pagination mode in WK2 MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=130374

Source/WebKit2:

Reviewed by Anders Carlsson.

Add SPI for pagination mode.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _paginationMode]):
(-[WKWebView _setPaginationMode:]):
(-[WKWebView _paginationBehavesLikeColumns]):
(-[WKWebView _setPaginationBehavesLikeColumns:]):
(-[WKWebView _pageLength]):
(-[WKWebView _setPageLength:]):
(-[WKWebView _gapBetweenPages]):
(-[WKWebView _setGapBetweenPages:]):
(-[WKWebView _pageCount]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(NS_ENUM):

Tools:

Reviewed by Anders Carlsson.

Put the implementation of togglePaginationMode: back, and correctly
enable the menu item.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController validateMenuItem:]):
(-[WK2BrowserWindowController isPaginated]):
(-[WK2BrowserWindowController togglePaginationMode:]):

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

5 years agoAdd --reset option to Tools/Scripts/set-webkit-configuration script
commit-queue@webkit.org [Tue, 18 Mar 2014 17:54:53 +0000 (17:54 +0000)]
Add --reset option to Tools/Scripts/set-webkit-configuration script
https://bugs.webkit.org/show_bug.cgi?id=130401

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

* Scripts/set-webkit-configuration:

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

5 years agoTextTrackRegion Not Implemented
bfulgham@apple.com [Tue, 18 Mar 2014 17:40:25 +0000 (17:40 +0000)]
TextTrackRegion Not Implemented
https://bugs.webkit.org/show_bug.cgi?id=116546

Reviewed by Eric Carlson.

Merged from Blink (patch by vcarbune@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/4940f89a087fea5b5ea628e98d0b355d398a9eea
http://crbug.com/25798003

Source/WebCore:

Tests: media/track/regions-webvtt/text-track-region-display.html
       media/track/regions-webvtt/text-track-region-dom-layout.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::newRegionsAvailable):
* html/track/TextTrack.cpp:
* html/track/TextTrack.h:
* html/track/TextTrackRegion.cpp:
(WebCore::TextTrackRegion::TextTrackRegion):
(WebCore::TextTrackRegion::appendTextTrackCueBox):
* html/track/TextTrackRegion.h:
* html/track/VTTCue.cpp:
(WebCore::VTTCue::VTTCue):
(WebCore::VTTCue::notifyRegionWhenRemovingDisplayTree):
(WebCore::VTTCue::removeDisplayTree):
* html/track/VTTCue.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseBytes):
(WebCore::WebVTTParser::collectMetadataHeader):
* html/track/WebVTTParser.h:

LayoutTests:

* media/track/captions-webvtt/captions-regions.vtt: Added.
* media/track/regions-webvtt/text-track-cue-region-attribute-expected.txt: Rebaseline.
* media/track/regions-webvtt/text-track-region-display-expected.txt: Added.
* media/track/regions-webvtt/text-track-region-display.html: Added.
* media/track/regions-webvtt/text-track-region-dom-layout-expected.txt: Added.
* media/track/regions-webvtt/text-track-region-dom-layout.html: Added.
* media/track/regions-webvtt/text-track-region-list-expected.txt: Rebaseline.
* media/track/regions-webvtt/text-track-region-parser-expected.txt: Rebaseline.

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

5 years ago[GTK] ResourceLoaderSoup.cpp was added by mistake
philn@webkit.org [Tue, 18 Mar 2014 15:37:28 +0000 (15:37 +0000)]
[GTK] ResourceLoaderSoup.cpp was added by mistake
https://bugs.webkit.org/show_bug.cgi?id=130396

Reviewed by Carlos Garcia Campos.

This file was committed by mistake in r152778 and is not built by
any port.

* loader/soup/ResourceLoaderSoup.cpp: Removed.

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

5 years ago[CMAKE][WK2]Move CoordinatedGraphics related files out of WebKit2/CMakeLists.txt
ryuan.choi@samsung.com [Tue, 18 Mar 2014 15:03:55 +0000 (15:03 +0000)]
[CMAKE][WK2]Move CoordinatedGraphics related files out of WebKit2/CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=130390

Reviewed by Martin Robinson.

Now, only EFL port use CoordinatedGraphics among CMake based ports.

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake: Removed CoordinatedGraphics related files.

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

5 years ago[GTK] Race condition when the socket event source is cancelled
carlosgc@webkit.org [Tue, 18 Mar 2014 15:02:51 +0000 (15:02 +0000)]
[GTK] Race condition when the socket event source is cancelled
https://bugs.webkit.org/show_bug.cgi?id=130395

Reviewed by Martin Robinson.

In some cases when the socket event source is cancelled the socket
event source callback is called with the condition of the previous
poll instead of 0. This can happen sometimes when the source is
cancelled from the socket event source callback. Once the socket
event source is cancelled, it's dispatched by glib without
polling, so the condition is never reset again and the callback is
called again and again with the previous condition. When the
condition is G_IO_IN, the source is re-scheduled entering into an
infinite loop. We should always check if the source has been
cancelled at the beginning of the callback to destroy the source
instead of relying on the condition being 0.

* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::SocketEventSource::isCancelled):
(WorkQueue::SocketEventSource::eventCallback):

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

5 years agoWeb Inspector: sourceMapResourceLoaded expects statusCode parameter
commit-queue@webkit.org [Tue, 18 Mar 2014 14:33:40 +0000 (14:33 +0000)]
Web Inspector: sourceMapResourceLoaded expects statusCode parameter
https://bugs.webkit.org/show_bug.cgi?id=130377

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

* UserInterface/Models/SourceMapResource.js:

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

5 years ago[GTK][CMake] Fix WebKit unused parameter warnings
jaepark@webkit.org [Tue, 18 Mar 2014 14:08:50 +0000 (14:08 +0000)]
[GTK][CMake] Fix WebKit unused parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=130383

Reviewed by Martin Robinson.

* WebCoreSupport/AcceleratedCompositingContextGL.cpp: Fix unused parameters warning.
* WebCoreSupport/ChromeClientGtk.cpp: Ditto.
* WebCoreSupport/DragClientGtk.cpp: Ditto.
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp: Ditto.
* WebCoreSupport/EditorClientGtk.cpp: Ditto.
* WebCoreSupport/FrameLoaderClientGtk.cpp: Ditto.
* WebCoreSupport/InspectorClientGtk.cpp: Ditto.
* WebCoreSupport/PlatformStrategiesGtk.cpp: Ditto.
* WebCoreSupport/ProgressTrackerClientGtk.cpp: Ditto.
* WebCoreSupport/WebViewInputMethodFilter.cpp: Ditto.
* webkit/webkitdownload.cpp: Ditto.
* webkit/webkitfavicondatabase.cpp: Ditto.
* webkit/webkitsoupauthdialog.cpp: Ditto.
* webkit/webkitspellchecker.cpp: Ditto.
* webkit/webkitspellcheckerenchant.cpp: Ditto.
* webkit/webkitwebframe.cpp: Ditto.
* webkit/webkitwebinspector.cpp: Ditto.
* webkit/webkitwebview.cpp: Ditto.

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

5 years ago[GTK] [CMake] build-webkit-options.txt is not generated during a fresh build
berto@igalia.com [Tue, 18 Mar 2014 13:44:28 +0000 (13:44 +0000)]
[GTK] [CMake] build-webkit-options.txt is not generated during a fresh build
https://bugs.webkit.org/show_bug.cgi?id=130388

Reviewed by Sergio Villar Senin.

* Scripts/webkitdirs.pm:
(shouldRemoveCMakeCache): make sure that the build directory
exists before attempting to create a file in it.

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

5 years ago[EFL] fontconfig-2.8.0 is not compliant with C++11 leading to a build break
commit-queue@webkit.org [Tue, 18 Mar 2014 12:51:19 +0000 (12:51 +0000)]
[EFL] fontconfig-2.8.0 is not compliant with C++11 leading to a build break
https://bugs.webkit.org/show_bug.cgi?id=130336

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2014-03-18
Reviewed by Gyuyoung Kim.

Compilation with gcc 4.8.x results in 'invalid suffix on literal; C++11
requires a space between literal and string macro [-Wliteral-suffix]'
warning treated as error.

This patch applies a solution from r162448 to the EFL port.

* efl/patches/fontconfig-C-11-requires-a-space-between-literal-and-identifier.patch: Added.
* efl/jhbuild.modules: Added appropriate patch section.

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

5 years ago[EFL] Update baselines and test expectations
ryuan.choi@samsung.com [Tue, 18 Mar 2014 11:56:53 +0000 (11:56 +0000)]
[EFL] Update baselines and test expectations
https://bugs.webkit.org/show_bug.cgi?id=130387

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-03-18

* fast/events/touch/touch-slider-expected.txt:
* fast/events/touch/touch-slider-no-js-touch-listener-expected.txt:
Update baselines after enabling TOUCH_SLIDER macro (r165722).
* platform/efl-wk2/TestExpectations:
fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html
is failing after adding in r165587
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
Update baselines after refactoring Path to Path2D (r165651).

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

5 years ago[EFL] Update baselines and test expectations
commit-queue@webkit.org [Tue, 18 Mar 2014 10:06:37 +0000 (10:06 +0000)]
[EFL] Update baselines and test expectations
https://bugs.webkit.org/show_bug.cgi?id=130249111

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-03-18

* fast/events/touch/touch-slider-expected.txt:
* fast/events/touch/touch-slider-no-js-touch-listener-expected.txt:
Update baselines after enabling TOUCH_SLIDER macro (r165722).
* platform/efl-wk2/TestExpectations:
fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html
is failing after adding in r165587
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
Update baselines after refactoring Path to Path2D (r165651).

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

5 years agoRename ElementDescendantIterator to TypedElementDescendantIterator.
akling@apple.com [Tue, 18 Mar 2014 09:42:58 +0000 (09:42 +0000)]
Rename ElementDescendantIterator to TypedElementDescendantIterator.
Romper-stubbed by Antti "Latte Lung" Koivisto.

* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/ElementDescendantIterator.h: Removed.
* dom/ElementIterator.h:
* dom/TypedElementDescendantIterator.h: Added.
(WebCore::TypedElementDescendantIterator<ElementType>::TypedElementDescendantIterator):
(WebCore::TypedElementDescendantIterator<ElementType>::operator):
(WebCore::TypedElementDescendantConstIterator<ElementType>::TypedElementDescendantConstIterator):
(WebCore::TypedElementDescendantConstIterator<ElementType>::operator):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::TypedElementDescendantIteratorAdapter):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::begin):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::end):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::first):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::last):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::TypedElementDescendantConstIteratorAdapter):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::begin):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::end):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::first):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::last):
(WebCore::descendantsOfType):

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

5 years agoAdd blend mode property to dumped information in GraphicsLayer.
commit-queue@webkit.org [Tue, 18 Mar 2014 08:51:55 +0000 (08:51 +0000)]
Add blend mode property to dumped information in GraphicsLayer.
https://bugs.webkit.org/show_bug.cgi?id=130331

Patch by Ion Rosca <rosca@adobe.com> on 2014-03-18
Reviewed by Simon Fraser.

Source/WebCore:

Functionality is not changed, therefore no new tests added.
I adjusted the affected test results generated with layerTreeAsText.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties):

LayoutTests:

* css3/compositing/blend-mode-blended-element-overlapping-composited-sibling-should-have-compositing-layer-expected.txt:
* css3/compositing/blend-mode-parent-of-composited-blended-has-layer-expected.txt:
* css3/compositing/blend-mode-with-composited-descendant-should-have-layer-expected.txt:

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

5 years agowebdatabase: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T>
svillar@igalia.com [Tue, 18 Mar 2014 08:50:52 +0000 (08:50 +0000)]
webdatabase: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T>
https://bugs.webkit.org/show_bug.cgi?id=130347

Reviewed by Darin Adler.

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::openDatabaseMutex):
(WebCore::notificationMutex):
(WebCore::notificationQueue):

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

5 years ago[GTK] URTFB after r165789. Stub function added.
ossy@webkit.org [Tue, 18 Mar 2014 07:15:30 +0000 (07:15 +0000)]
[GTK] URTFB after r165789. Stub function added.

* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WebKit::InjectedBundle::setBundleParameter):

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

5 years agoUnreviewed, EFL build fix after r165789
ljaehun.lim@samsung.com [Tue, 18 Mar 2014 07:02:36 +0000 (07:02 +0000)]
Unreviewed, EFL build fix after r165789

* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::setBundleParameter): Implemented.

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

5 years agoRevert the erroneous change made by Xcode.
rniwa@webkit.org [Tue, 18 Mar 2014 04:55:44 +0000 (04:55 +0000)]
Revert the erroneous change made by Xcode.

* WebKit.xcodeproj/project.pbxproj:

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

5 years ago[GTK] Build fix for debug build
jaepark@webkit.org [Tue, 18 Mar 2014 04:55:14 +0000 (04:55 +0000)]
[GTK] Build fix for debug build

Unreviewed.

finalizedListItem was actually used in ASSERT.  So, use ASSERT_UNUSED
instead of ASSERT.

* UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
(webkitBackForwardListItemFinalized):

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

5 years agoV8 regexp spends most of its time in operationGetById
msaboff@apple.com [Tue, 18 Mar 2014 03:46:10 +0000 (03:46 +0000)]
V8 regexp spends most of its time in operationGetById
https://bugs.webkit.org/show_bug.cgi?id=130380

Reviewed by Filip Pizlo.

Added String.length case to tryCacheGetByID that will only help the BaseLine JIT.
When V8 regexp is run from the command line, this nets a 2% performance improvement.
When the test is run for a longer amount of time, there is much less benefit as the
DFG will emit the appropriate code for String.length.  This does remove
operationGetById as the hottest function whne run from the command line.

* jit/Repatch.cpp:
(JSC::tryCacheGetByID):

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

5 years agoAdd one-deep cache to opaque roots hashset.
akling@apple.com [Tue, 18 Mar 2014 03:28:19 +0000 (03:28 +0000)]
Add one-deep cache to opaque roots hashset.
<https://webkit.org/b/130357>

The vast majority of WebCore JS wrappers will have their Document*
as the root(). This change adds a simple optimization where we cache
the last lookup and avoid going to the hashset for repeated queries.

Looks like 0.4% progression on DYEB on my MBP.

Reviewed by Mark Hahnenberg.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/OpaqueRootSet.h: Added.
(JSC::OpaqueRootSet::OpaqueRootSet):
(JSC::OpaqueRootSet::contains):
(JSC::OpaqueRootSet::isEmpty):
(JSC::OpaqueRootSet::clear):
(JSC::OpaqueRootSet::add):
(JSC::OpaqueRootSet::size):
(JSC::OpaqueRootSet::begin):
(JSC::OpaqueRootSet::end):
* heap/SlotVisitor.h:

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

5 years agoImplement Math.hypot
commit-queue@webkit.org [Tue, 18 Mar 2014 03:21:22 +0000 (03:21 +0000)]
Implement Math.hypot
https://bugs.webkit.org/show_bug.cgi?id=129486

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

Source/JavaScriptCore:

* runtime/MathObject.cpp:
(JSC::MathObject::finishCreation):
(JSC::mathProtoFuncHypot):

LayoutTests:

* js/Object-getOwnPropertyNames-expected.txt:
* js/math-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/math.js:

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

5 years ago[WK2] Getting rid of compilation warnings
thiago.lacerda@openbossa.org [Tue, 18 Mar 2014 03:17:44 +0000 (03:17 +0000)]
[WK2] Getting rid of compilation warnings
https://bugs.webkit.org/show_bug.cgi?id=130348

Reviewed by Benjamin Poulain.

* UIProcess/API/APIHistoryClient.h:
(API::HistoryClient::didPerformClientRedirect):
(API::HistoryClient::didPerformServerRedirect):
(API::HistoryClient::didUpdateHistoryTitle):
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartProvisionalLoadForFrame):
(API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(API::LoaderClient::didCommitLoadForFrame):
(API::LoaderClient::didFinishLoadForFrame):
(API::LoaderClient::didFailLoadWithErrorForFrame):
(API::LoaderClient::didChangeBackForwardList):
* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
(API::PolicyClient::unableToImplementPolicy):
* UIProcess/API/APIUIClient.h:
(API::UIClient::exceededDatabaseQuota):
(API::UIClient::saveDataToFileInDownloadsFolder):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/APISession.cpp:
(API::generateID):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewStateDidChange):

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

5 years agoAdd RemoteCommandListener support to MediaSessionManager.
jer.noble@apple.com [Tue, 18 Mar 2014 03:16:43 +0000 (03:16 +0000)]
Add RemoteCommandListener support to MediaSessionManager.
https://bugs.webkit.org/show_bug.cgi?id=130354

Reviewed by Eric Carlson.

Listen for remote commands in MediaSessionManager.

* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::addSession):
(WebCore::MediaSessionManager::removeSession):
* platform/audio/MediaSessionManager.h:

Add RemoteCommandListener to the project files:
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:

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

5 years agoRemove most uses of deprecatedCharacter in WTF
darin@apple.com [Tue, 18 Mar 2014 03:00:06 +0000 (03:00 +0000)]
Remove most uses of deprecatedCharacter in WTF
https://bugs.webkit.org/show_bug.cgi?id=130317

Reviewed by Andreas Kling.

Re-landing after fixing the "80 instead of 0x80" typo in equalLatin1WithUTF8.

* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal): Add an 8-bit code path to the
non-ASCII path.
(WTF::SubstringTranslator8::hash): Added.
(WTF::SubstringTranslator8::equal): Added.
(WTF::SubstringTranslator16::hash): Renamed class.
(WTF::SubstringTranslator16::equal): Ditto.
(WTF::AtomicString::add): Added an 8-bit code path to the substring case.

* wtf/text/Base64.cpp:
(WTF::base64Decode): Added an 8 bit code path.
(WTF::base64URLDecode): Ditto.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find): Fixed a case that was incorrectly using characters16
without first using is8Bit. Need to return later to remove use of deprecatedCharacters.

* wtf/unicode/UTF8.cpp:
(WTF::Unicode::equalUTF16WithUTF8): Added a case for when the UTF-16 characters
are ASCII. Also removed the aEnd argument, since the caller only calls this when the
lengths are equal.
(WTF::Unicode::equalLatin1WithUTF8): Added.
* wtf/unicode/UTF8.h: Updated as described above.

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

5 years agowebkitpy test rebaseline.
rniwa@webkit.org [Tue, 18 Mar 2014 02:45:24 +0000 (02:45 +0000)]
webkitpy test rebaseline.

* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(MainTest.test_default_args):

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

5 years agoUpdate the bundle parameters dictionary and send out KVO notifications
andersca@apple.com [Tue, 18 Mar 2014 01:52:15 +0000 (01:52 +0000)]
Update the bundle parameters dictionary and send out KVO notifications
https://bugs.webkit.org/show_bug.cgi?id=130379
<rdar://problem/16213914>

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setObject:forBundleParameter:]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
(-[WKWebProcessBundleParameters setParameter:forKey:]):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setInjectedBundleParameter):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

5 years agoRewrite WebHTMLConverter::_elementHasOwnBackgroundColor in C++
rniwa@webkit.org [Tue, 18 Mar 2014 01:44:17 +0000 (01:44 +0000)]
Rewrite WebHTMLConverter::_elementHasOwnBackgroundColor in C++
https://bugs.webkit.org/show_bug.cgi?id=130291

Reviewed by Andreas Kling.

Extracted HTMLConverterCaches::elementHasOwnBackgroundColor.

* platform/mac/HTMLConverter.mm:
(HTMLConverterCaches::elementHasOwnBackgroundColor):
(-[WebHTMLConverter _elementHasOwnBackgroundColor:]):

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

5 years agoRewrite WebHTMLConverter::_elementIsBlockLevel in C++
rniwa@webkit.org [Tue, 18 Mar 2014 01:38:01 +0000 (01:38 +0000)]
Rewrite WebHTMLConverter::_elementIsBlockLevel in C++
https://bugs.webkit.org/show_bug.cgi?id=130287

Reviewed by Andreas Kling.

Rewrote _elementIsBlockLevel as HTMLConverterCaches::isBlockElement. Also removed the code to update
_elementIsBlockLevel in _traverseNode as computing the value of _elementIsBlockLevel is now fast.

* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
(HTMLConverterCaches::isBlockElement):
(-[WebHTMLConverter _elementIsBlockLevel:]):
(-[WebHTMLConverter _traverseNode:depth:embedded:]):
(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):

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

5 years agoRewrite WebHTMLConverter::_getComputedFloat in C++
rniwa@webkit.org [Tue, 18 Mar 2014 01:35:46 +0000 (01:35 +0000)]
Rewrite WebHTMLConverter::_getComputedFloat in C++
https://bugs.webkit.org/show_bug.cgi?id=130284

Reviewed by Andreas Kling.

Rewrote _getComputedFloat as HTMLConverterCaches::floatPropertyValueForNode.

* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
(HTMLConverterCaches::floatPropertyValueForNode):
(-[WebHTMLConverter _getFloat:forNode:property:]): Now that computing the float value is fast, we don't need to
store it in the cache.
(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):

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

5 years agoFix a bad URL in the ChangeLog of the previous commit.
aestes@apple.com [Tue, 18 Mar 2014 01:26:08 +0000 (01:26 +0000)]
Fix a bad URL in the ChangeLog of the previous commit.

* WebView/WebView.mm:

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

5 years agoRemove staging code added for <http://webkit.org/b/164757> [iOS] Support network...
aestes@apple.com [Tue, 18 Mar 2014 01:24:27 +0000 (01:24 +0000)]
Remove staging code added for <webkit.org/b/164757> [iOS] Support network state notification using CPNetworkObserver

Reviewed by Enrica Casucci.

* WebView/WebView.mm:

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

5 years ago--profile should imply --test-runner-count=1 in run-perf-tests
rniwa@webkit.org [Tue, 18 Mar 2014 00:58:40 +0000 (00:58 +0000)]
--profile should imply --test-runner-count=1 in run-perf-tests
https://bugs.webkit.org/show_bug.cgi?id=130375

Reviewed by Benjamin Poulain.

Use the test runner count of 1 when --profile is specified but not --test-runner-count.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args): Use -1 as the default value.
(PerfTestsRunner._collect_tests): If --test-runner-count is set (i.e. it's a positive value),
then use that value. Otherwise, if it's never set and --profile is present, test-runner-count
should be 1.

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

5 years agoWeb Inspector: Uncaught Exception in JSContext Inspector
commit-queue@webkit.org [Tue, 18 Mar 2014 00:34:28 +0000 (00:34 +0000)]
Web Inspector: Uncaught Exception in JSContext Inspector
https://bugs.webkit.org/show_bug.cgi?id=130368

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

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._accessibilitySupported):
Feature check DOMAgent as well as the function.

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

5 years agoWebKitLegacy headers should #import the relevant WebKit headers
andersca@apple.com [Tue, 18 Mar 2014 00:05:30 +0000 (00:05 +0000)]
WebKitLegacy headers should #import the relevant WebKit headers
https://bugs.webkit.org/show_bug.cgi?id=130372
<rdar://problem/16349094>

Reviewed by Dan Bernstein.

Create forwarding headers instead.

* WebKitLegacy/MigrateHeadersToLegacy.make:

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

5 years agoAddress some style nits.
timothy_horton@apple.com [Mon, 17 Mar 2014 23:53:41 +0000 (23:53 +0000)]
Address some style nits.

* UIProcess/API/Cocoa/_WKThumbnailViewInternal.h:

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

5 years agoAddress some style nits.
simon.fraser@apple.com [Mon, 17 Mar 2014 23:49:58 +0000 (23:49 +0000)]
Address some style nits.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:

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