WebKit-https.git
6 years agoUnreviewed build fix after r167755.
zalan@apple.com [Thu, 24 Apr 2014 15:33:48 +0000 (15:33 +0000)]
Unreviewed build fix after r167755.

* rendering/RenderThemeMac.h:

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

6 years agoWeb Inspector: gradient editor does not appear for linear-gradient with no specified...
graouts@webkit.org [Thu, 24 Apr 2014 14:37:15 +0000 (14:37 +0000)]
Web Inspector: gradient editor does not appear for linear-gradient with no specified angle
https://bugs.webkit.org/show_bug.cgi?id=132083

Reviewed by Timothy Hatcher.

Only assume we're parsing a legacy-formatted gradient if the first parameter is not a color.

* UserInterface/Models/Gradient.js:
(WebInspector.LinearGradient.linearGradientWithComponents):

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

6 years agoTransition RenderTheme API from RenderObject* to const RenderObject&
zalan@apple.com [Thu, 24 Apr 2014 14:27:54 +0000 (14:27 +0000)]
Transition RenderTheme API from RenderObject* to const RenderObject&
https://bugs.webkit.org/show_bug.cgi?id=132037

Reviewed by Andreas Kling.

Using const references provides better encapsulation and improve security.

No change in behavior.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::boundingBoxForQuads):
* dom/Element.cpp:
(WebCore::Element::setActive):
(WebCore::Element::setHovered):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::focusedOrActiveStateChanged):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::disabledStateChanged):
(WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setIndeterminate):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addVisualOverflowFromTheme):
(WebCore::RenderBlock::baselinePosition):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleDidChange):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
* rendering/RenderObject.h:
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::computeLogicalHeight):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::paint):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::paintDecorations):
(WebCore::RenderTheme::baselinePosition):
(WebCore::RenderTheme::adjustRepaintRect):
(WebCore::RenderTheme::stateChanged):
(WebCore::RenderTheme::updateControlStatesForRenderer):
(WebCore::RenderTheme::extractControlStatesForRenderer):
(WebCore::RenderTheme::isActive):
(WebCore::RenderTheme::isChecked):
(WebCore::RenderTheme::isIndeterminate):
(WebCore::RenderTheme::isEnabled):
(WebCore::RenderTheme::isFocused):
(WebCore::RenderTheme::isPressed):
(WebCore::RenderTheme::isSpinUpButtonPartPressed):
(WebCore::RenderTheme::isReadOnlyControl):
(WebCore::RenderTheme::isHovered):
(WebCore::RenderTheme::isSpinUpButtonPartHovered):
(WebCore::RenderTheme::isDefault):
(WebCore::RenderTheme::paintInputFieldSpeechButton):
(WebCore::RenderTheme::paintMeter):
(WebCore::RenderTheme::paintSliderTicks):
(WebCore::RenderTheme::progressBarRectForBounds):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::controlSupportsTints):
(WebCore::RenderTheme::paintCapsLockIndicator):
(WebCore::RenderTheme::paintFileUploadIconDecorations):
(WebCore::RenderTheme::imageControlsButtonSize):
(WebCore::RenderTheme::paintCheckbox):
(WebCore::RenderTheme::paintRadio):
(WebCore::RenderTheme::paintButton):
(WebCore::RenderTheme::paintInnerSpinButton):
(WebCore::RenderTheme::paintCheckboxDecorations):
(WebCore::RenderTheme::paintRadioDecorations):
(WebCore::RenderTheme::paintButtonDecorations):
(WebCore::RenderTheme::paintTextField):
(WebCore::RenderTheme::paintTextFieldDecorations):
(WebCore::RenderTheme::paintTextArea):
(WebCore::RenderTheme::paintTextAreaDecorations):
(WebCore::RenderTheme::paintMenuList):
(WebCore::RenderTheme::paintMenuListDecorations):
(WebCore::RenderTheme::paintMenuListButtonDecorations):
(WebCore::RenderTheme::paintPushButtonDecorations):
(WebCore::RenderTheme::paintSquareButtonDecorations):
(WebCore::RenderTheme::paintProgressBar):
(WebCore::RenderTheme::paintSliderTrack):
(WebCore::RenderTheme::paintSliderThumb):
(WebCore::RenderTheme::paintSliderThumbDecorations):
(WebCore::RenderTheme::paintSearchField):
(WebCore::RenderTheme::paintSearchFieldDecorations):
(WebCore::RenderTheme::paintSearchFieldCancelButton):
(WebCore::RenderTheme::paintSearchFieldDecorationPart):
(WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
(WebCore::RenderTheme::paintSearchFieldResultsButton):
(WebCore::RenderTheme::paintMediaFullscreenButton):
(WebCore::RenderTheme::paintMediaPlayButton):
(WebCore::RenderTheme::paintMediaOverlayPlayButton):
(WebCore::RenderTheme::paintMediaMuteButton):
(WebCore::RenderTheme::paintMediaSeekBackButton):
(WebCore::RenderTheme::paintMediaSeekForwardButton):
(WebCore::RenderTheme::paintMediaSliderTrack):
(WebCore::RenderTheme::paintMediaSliderThumb):
(WebCore::RenderTheme::paintMediaVolumeSliderContainer):
(WebCore::RenderTheme::paintMediaVolumeSliderTrack):
(WebCore::RenderTheme::paintMediaVolumeSliderThumb):
(WebCore::RenderTheme::paintMediaRewindButton):
(WebCore::RenderTheme::paintMediaReturnToRealtimeButton):
(WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton):
(WebCore::RenderTheme::paintMediaControlsBackground):
(WebCore::RenderTheme::paintMediaCurrentTime):
(WebCore::RenderTheme::paintMediaTimeRemaining):
(WebCore::RenderTheme::paintMediaFullScreenVolumeSliderTrack):
(WebCore::RenderTheme::paintMediaFullScreenVolumeSliderThumb):
(WebCore::RenderTheme::paintSnapshottedPluginOverlay):
(WebCore::RenderTheme::paintImageControlsButton):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::addRoundedBorderClip):
(WebCore::RenderThemeIOS::paintCheckboxDecorations):
(WebCore::RenderThemeIOS::baselinePosition):
(WebCore::RenderThemeIOS::paintRadioDecorations):
(WebCore::RenderThemeIOS::paintTextFieldDecorations):
(WebCore::RenderThemeIOS::paintTextAreaDecorations):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
(WebCore::RenderThemeIOS::paintSliderTrack):
(WebCore::RenderThemeIOS::paintSliderThumbDecorations):
(WebCore::RenderThemeIOS::paintProgressBar):
(WebCore::RenderThemeIOS::paintSearchFieldDecorations):
(WebCore::RenderThemeIOS::paintButtonDecorations):
(WebCore::RenderThemeIOS::paintPushButtonDecorations):
(WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
* rendering/RenderThemeMac.h:
(WebCore::RenderThemeMac::updateActiveState):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::documentViewFor):
(WebCore::RenderThemeMac::adjustRepaintRect):
(WebCore::RenderThemeMac::convertToPaintingRect):
(WebCore::RenderThemeMac::updateCheckedState):
(WebCore::RenderThemeMac::updateEnabledState):
(WebCore::RenderThemeMac::updateFocusedState):
(WebCore::RenderThemeMac::updatePressedState):
(WebCore::RenderThemeMac::controlSupportsTints):
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::paintCapsLockIndicator):
(WebCore::RenderThemeMac::paintTextArea):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::paintMeter):
(WebCore::RenderThemeMac::progressBarRectForBounds):
(WebCore::RenderThemeMac::paintProgressBar):
(WebCore::RenderThemeMac::paintMenuListButtonGradients):
(WebCore::RenderThemeMac::paintMenuListButtonDecorations):
(WebCore::RenderThemeMac::setPopupButtonCellState):
(WebCore::RenderThemeMac::paintSliderTrack):
(WebCore::RenderThemeMac::paintSliderThumb):
(WebCore::RenderThemeMac::paintSearchField):
(WebCore::RenderThemeMac::setSearchCellState):
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSearchFieldDecorationPart):
(WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
(WebCore::RenderThemeMac::paintImageControlsButton):
(WebCore::RenderThemeMac::imageControlsButtonSize):

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

6 years ago[EFL] Update baselines after r167568
commit-queue@webkit.org [Thu, 24 Apr 2014 12:58:16 +0000 (12:58 +0000)]
[EFL] Update baselines after r167568
https://bugs.webkit.org/show_bug.cgi?id=132125

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-04-24

* platform/efl-wk2/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local-expected.txt: Added.
* platform/efl/fast/repaint/reflection-redraw-expected.txt: Rebaseline after r167568.
* platform/efl/fast/table/multiple-captions-display-expected.txt: Rebaseline after r167568.
* platform/efl/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt: Added.
* platform/efl/svg/W3C-SVG-1.1-SE/filters-image-05-f-expected.txt: Added.
* platform/efl/svg/W3C-SVG-1.1/filters-composite-02-b-expected.txt: Added.
* platform/efl/svg/W3C-SVG-1.1/filters-displace-01-f-expected.txt: Added.
* platform/efl/svg/W3C-SVG-1.1/filters-image-01-b-expected.txt: Added.
* platform/efl/tables/mozilla/marvin/body_col-expected.txt: Rebaseline after r167568.
* platform/efl/tables/mozilla/marvin/x_th_valign_baseline-expected.txt: Rebaseline after r167568.
* platform/efl/tables/mozilla/other/body_col-expected.txt: Rebaseline after r167568.
* platform/efl/tables/mozilla_expected_failures/bugs/bug10140-expected.txt: Rebaseline after r167568.
* platform/efl/tables/mozilla_expected_failures/bugs/bug10216-expected.txt: Rebaseline after r167568.
* platform/efl/tables/mozilla_expected_failures/core/captions3-expected.txt: Rebaseline after r167568.
* platform/efl/tables/mozilla_expected_failures/other/test4-expected.txt: Rebaseline after r167568.

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

6 years agoprepare-ChangeLog reports as deleted methods that has not been removed.
llango.u-szeged@partner.samsung.com [Thu, 24 Apr 2014 08:55:18 +0000 (08:55 +0000)]
prepare-ChangeLog reports as deleted methods that has not been removed.
https://bugs.webkit.org/show_bug.cgi?id=131733

Reviewed by Ryosuke Niwa.

* Scripts/prepare-ChangeLog:
(originalFile): Set merge base to origin/master by default.

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

6 years ago[GTK] HTML Media capture attribute is a boolean since r163958
carlosgc@webkit.org [Thu, 24 Apr 2014 07:17:15 +0000 (07:17 +0000)]
[GTK] HTML Media capture attribute is a boolean since r163958
https://bugs.webkit.org/show_bug.cgi?id=132061

Reviewed by Gustavo Noronha Silva.

Add new methods webkit_dom_html_input_element_get_capture_enabled
and webkit_dom_html_input_element_set_capture_enabled using a
boolean and deprecate the old methods.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_html_input_element_get_capture):
(webkit_dom_html_input_element_set_capture):
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols:
* bindings/gobject/webkitdom.symbols:
* bindings/scripts/CodeGeneratorGObject.pm:
(GetEffectiveFunctionName): Helper function to rename API methods
for special cases.
(GenerateFunction): Use GetEffectiveFunctionName().

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

6 years agoprepare-Changelog and svn-create-patch should optionally run check-webkit-style.
jcraig@apple.com [Thu, 24 Apr 2014 07:07:06 +0000 (07:07 +0000)]
prepare-Changelog and svn-create-patch should optionally run check-webkit-style.
https://bugs.webkit.org/show_bug.cgi?id=131115

Reviewed by Daniel Bates.

Added [--[no-]style] param to run check-webkit-style as part of prepare-Changelog and svn-create-patch.

* Scripts/commit-log-editor: Added --no-style.
* Scripts/prepare-ChangeLog: Primary patch.
(main): Primary patch.
(createPatchCommand): Added --no-style.
* Scripts/svn-create-patch: Primary patch.
* Scripts/webkit-tools-completion.sh: Added --style and --no-style.
* Scripts/webkitpy/common/checkout/scm/svn.py: Added --no-style.
(SVN.create_patch): Added --no-style.

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

6 years ago[MediaStream] Implement MediaStream active attribute
commit-queue@webkit.org [Thu, 24 Apr 2014 06:37:51 +0000 (06:37 +0000)]
[MediaStream] Implement MediaStream active attribute
https://bugs.webkit.org/show_bug.cgi?id=131973

Patch by Praveen R Jadhav <praveen.j@samsung.com> on 2014-04-23
Reviewed by Eric Carlson.

Source/WebCore:
MediaStream .active attribute are introduced which will replace
.ended attribute. This patch implements the newly introduced attributes.

MediaStream-add-remove-tracks.html is updated to handle this scenario.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::active): Added.
(WebCore::MediaStream::setActive): Added.
(WebCore::MediaStream::addTrack): Propagates 'onactive' event when required.
(WebCore::MediaStream::removeTrack): Propagates 'oninactive' event when required.
(WebCore::MediaStream::trackDidEnd): Propagates 'oninactive' event when required.
(WebCore::MediaStream::streamDidEnd):
(WebCore::MediaStream::setStreamIsActive): Added.
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStream.idl:
* dom/EventNames.h:
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::MediaStreamPrivate): Initialize .active attribute
(WebCore::MediaStreamPrivate::setEnded):
(WebCore::MediaStreamPrivate::setActive): Added.
* platform/mediastream/MediaStreamPrivate.h:
(WebCore::MediaStreamPrivate::active): Added.

LayoutTests:
MediaStream .onended attribute will be replaced with .active attribute.
Patch updates the test case to verify the .active attribute.

* fast/mediastream/MediaStream-add-remove-tracks-expected.txt:
* fast/mediastream/MediaStream-add-remove-tracks.html:

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

6 years ago[iOS WK2] Missing content inside long overflow-scrolling:touch
simon.fraser@apple.com [Thu, 24 Apr 2014 05:16:45 +0000 (05:16 +0000)]
[iOS WK2] Missing content inside long overflow-scrolling:touch
https://bugs.webkit.org/show_bug.cgi?id=132105

Reviewed by Tim Horton.

PlatformCALayerRemote needs to track bounds origin as well as size,
since iOS uses bounds origin for overflow scrolling.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer):
* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::updateBackingStore):
(WebKit::PlatformCALayerRemote::bounds):
(WebKit::PlatformCALayerRemote::setBounds):

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

6 years agoVersioning.
lforschler@apple.com [Thu, 24 Apr 2014 04:49:22 +0000 (04:49 +0000)]
Versioning.

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

6 years ago[Cocoa] fix CF leaks found by code inspection
darin@apple.com [Thu, 24 Apr 2014 04:46:28 +0000 (04:46 +0000)]
[Cocoa] fix CF leaks found by code inspection
https://bugs.webkit.org/show_bug.cgi?id=132106

Reviewed by Andreas Kling.

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::trackDisplayName): Added a missing adoptCF.

* platform/Language.cpp:
(WebCore::displayNameForLanguageLocale): Added a missing adoptCF.

* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::openTypeTable): Added a missing adoptCF.

* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
(WebCore::InbandTextTrackPrivateAVCF::label): Added two missing adoptCF.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createImageForTimeInRect): Added two missing adoptCF.

* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::createPDFDocument): Added missing adoptCF.

* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::cascadeToLastResortFontDescriptor): Added two missing adoptCF.

* platform/graphics/mac/FontMac.mm:
(WebCore::Font::primaryFontDataIsSystemFont): Added missing adoptCF.

* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::hasCustomTracking): Added missing adoptCF.

* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::qcmsOutputDeviceProfile): Added CFRelease.

* plugins/mac/PluginPackageMac.cpp:
(WebCore::readPListFile): Added two missing adoptCF.

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

6 years agoRemove Apple Dictionary workaround in WebFrameLoaderClient.
akling@apple.com [Thu, 24 Apr 2014 04:42:32 +0000 (04:42 +0000)]
Remove Apple Dictionary workaround in WebFrameLoaderClient.
<https://webkit.org/b/132095>

Kill a hack to work around a WK1 client bug that got fixed years ago.
See <rdar://problem/6471058> for backstory.

Reviewed by Darin Adler.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
(WebFrameLoaderClient::dispatchWillSendRequest):
(applyAppleDictionaryApplicationQuirkNonInlinePart): Deleted.
(applyAppleDictionaryApplicationQuirk): Deleted.

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

6 years agoREGRESSION (r157328): popover to check into flight ba.com dismisses instantly when...
rniwa@webkit.org [Thu, 24 Apr 2014 04:24:30 +0000 (04:24 +0000)]
REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
https://bugs.webkit.org/show_bug.cgi?id=131949

Address the review comment.

* dom/EventDispatcher.cpp:
(WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):

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

6 years agoCachedResourceLoader hoards URLs indefinitely for no good reason.
akling@apple.com [Thu, 24 Apr 2014 04:11:50 +0000 (04:11 +0000)]
CachedResourceLoader hoards URLs indefinitely for no good reason.
<https://webkit.org/b/132102>
<rdar://problem/16708265>

Since we don't care about CachedResourceLoader::m_validatedURL's after
the Document has finished dispatching its initial load event, clear the
set at that point, and don't add any new URLs to it.

Reviewed by Anders Carlsson.

* dom/Document.cpp:
(WebCore::Document::dispatchWindowLoadEvent):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::documentDidFinishLoadEvent):
* loader/cache/CachedResourceLoader.h:

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

6 years agoRemove unused WKPageSetMemoryCacheClientCallsEnabled API.
akling@apple.com [Thu, 24 Apr 2014 03:56:09 +0000 (03:56 +0000)]
Remove unused WKPageSetMemoryCacheClientCallsEnabled API.
<https://webkit.org/b/132098>

This API was added to WK2 back in 2011 but never actually used.

Reviewed by Anders Carlsson.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetMemoryCacheClientCallsEnabled): Deleted.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setMemoryCacheMessagesEnabled): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

6 years agoCanvas cache of clean URLs can grow without bounds.
akling@apple.com [Thu, 24 Apr 2014 03:43:47 +0000 (03:43 +0000)]
Canvas cache of clean URLs can grow without bounds.
<https://webkit.org/b/132091>
<rdar://problem/16695665>

Remove a silly "optimization" that kept a cache of clean URLs
that can be drawn into a canvas without tainting it, all to avoid
the "expensive" checks to determine whether it would taint.

Reviewed by Benjamin Poulain.

* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::wouldTaintOrigin):
* html/canvas/CanvasRenderingContext.h:

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

6 years ago[iOS WK2] Make -webkit-overflow-scrolling:touch work
simon.fraser@apple.com [Thu, 24 Apr 2014 03:31:30 +0000 (03:31 +0000)]
[iOS WK2] Make -webkit-overflow-scrolling:touch work
https://bugs.webkit.org/show_bug.cgi?id=132097

Reviewed by Tim Horton.

Scrolling of UIScrollViews in content (for -webkit-overflow-scrolling:touch)
depends on them getting hit-tested correctly. UIKit hit testing assumes
that subviews are enclosed by their ancestors, but this is not true of
web content. In addition, we had a root layer that was zero sized.

Fix by overriding hitTest:withEvent: on our content WKViews to hit
test subviews even if they are not enclosed.

* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]):
(-[UIView _findDescendantViewAtPoint:withEvent:]):
(-[WKCompositingView hitTest:withEvent:]):
(-[WKTransformView hitTest:withEvent:]):
(-[WKRemoteView hitTest:withEvent:]):
(WebKit::RemoteLayerTreeHost::createLayer):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
Update debug borders on the root layer.
(WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
Size the root layer to the contents size. This isn't strictly necessary
given the hit testing overrides, but seems sensible to do anyway.

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

6 years agoNonopaque layers double-paint with UI-side compositing
simon.fraser@apple.com [Thu, 24 Apr 2014 03:31:28 +0000 (03:31 +0000)]
Nonopaque layers double-paint with UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=132101

Reviewed by Tim Horton.

The non-IOSurface code path was failing to clear the backing store
before painting.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::drawInContext):

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

6 years ago[iOS][WK2] Image and text documents sometime gets the webpage viewport configuration
benjamin@webkit.org [Thu, 24 Apr 2014 02:37:05 +0000 (02:37 +0000)]
[iOS][WK2] Image and text documents sometime gets the webpage viewport configuration
https://bugs.webkit.org/show_bug.cgi?id=132099

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-23
Reviewed by Tim Horton.

When didReceiveMobileDocType(), if the doctype was not XHTML mobile, we were setting
the viewport configuration to webpageParameters(). This is obviously not correct for
Image and Text documents.

This patch moves the code deciding the default configuration out of WebPage::didCommitLoad()
and use it from WebPage::didCommitLoad() and WebPage::didReceiveMobileDocType().

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::didReceiveMobileDocType):
(WebKit::WebPage::resetViewportDefaultConfiguration):

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

6 years ago[EFL][WK1] Add *const* keyword to _get() APIs
commit-queue@webkit.org [Thu, 24 Apr 2014 02:25:08 +0000 (02:25 +0000)]
[EFL][WK1] Add *const* keyword to _get() APIs
https://bugs.webkit.org/show_bug.cgi?id=132094

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-04-23
Reviewed by Gyuyoung Kim.

Some _get() EFL APIs don't have *const* keyword though the _get() APIs don't modify passed argument.
We need to add *const* keyword to those APIs.

* ewk/ewk_history.cpp:
(ewk_history_limit_get):
* ewk/ewk_history.h:
* ewk/ewk_js.cpp:
(ewk_js_object_type_get):
* ewk/ewk_js.h:

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

6 years agoTry to fix iOS build.
andersca@apple.com [Thu, 24 Apr 2014 02:23:32 +0000 (02:23 +0000)]
Try to fix iOS build.

* DumpRenderTree/mac/DumpRenderTree.mm:

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

6 years ago[iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured...
benjamin@webkit.org [Thu, 24 Apr 2014 02:13:06 +0000 (02:13 +0000)]
[iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
https://bugs.webkit.org/show_bug.cgi?id=132093

Source/WebCore:

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-23
Reviewed by Tim Horton.

Change the minimum layout size to float point values to account for size defined on retina displays.
The minimum layout size supports half-pixels, the value is rounded later when computing the layout size
in document coordinates.

* WebCore.exp.in:
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::ViewportConfiguration):
Setting the initial content size is incorrect. The layout size computation already take into account
empty size for the first layout.

Setting the content size upfront make the first computation incorrect when the viewport arguments specify
the initial scale.

(WebCore::ViewportConfiguration::setMinimumLayoutSize):
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::minimumLayoutSize):

Source/WebKit2:
<rdar://problem/16703237>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-23
Reviewed by Tim Horton.

The user of WKWebView can setup a size on device pixels, which can add half a point to the minimum
layout size. By rounding this up before applying the page scale, we ended up with rounding errors
on the layout size and the transitory unobscured content rect.

This patch fixes changes the minimal layout size to float point values to reduce the rounding problems.

* UIProcess/API/Cocoa/WKWebView.mm:
(setViewportConfigurationMinimumLayoutSize):
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
(WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
Defaulting the content size to the minimum layout size only works if the initial-scale is 1.
ViewportConfiguration knows exactly what to do before the first layout.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
(WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
(WebKit::WebPage::dynamicViewportSizeUpdate):
A few fixes here:
-setZoomedOutPageScaleFactor() was incorrectly using the initial scale. 99% of the time, initial scale
 and minimum scale are equal, but the page can specify something different with the viewport meta tag.
-Use floating point for manipulating the minimum layout sizes, then round the value.
-minimumLayoutSizeInDocumentCoordinate was scaled the wrong way around.

(WebKit::WebPage::viewportConfigurationChanged):

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

6 years ago[Mac, iOS] Stop buffering media when on an inactive tab.
bfulgham@apple.com [Thu, 24 Apr 2014 01:23:58 +0000 (01:23 +0000)]
[Mac, iOS] Stop buffering media when on an inactive tab.
https://bugs.webkit.org/show_bug.cgi?id=132077

Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp: Rename 'm_isDisplaySleepDisablingSuspended'
to 'm_elementIsHidden'.
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::visibilityStatusChanged): Notify the
media session that the element is (or is not) hidden.
(WebCore::HTMLMediaElement::setShouldBufferData): Added.
* html/HTMLMediaElement.h:
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::clientWillBeginPlayback): Tell media to
buffer if not hidden or playing.
(WebCore::MediaSession::clientWillPausePlayback): Ditto.
(WebCore::MediaSession::visibilityChanged): Added. Client API, just relays call
to updateClientDataBuffering.
(WebCore::MediaSession::updateClientDataBuffering): Tell client it should only
buffer data if it's currently playing, or not hidden.
* platform/audio/MediaSession.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setShouldBufferData): Added: Just relays to
MediaPlayerPrivate object.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setShouldBufferData):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Added.
Detach the player item from the player if we don't want to continue
buffering or other background tasks.

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

6 years agoThe GC should only resume compiler threads that it suspended in the same GC pass.
mark.lam@apple.com [Thu, 24 Apr 2014 00:43:15 +0000 (00:43 +0000)]
The GC should only resume compiler threads that it suspended in the same GC pass.
<https://webkit.org/b/132088>

Reviewed by Mark Hahnenberg.

Previously, this scenario can occur:
1. Thread 1 starts a GC and tries to suspend DFG worklist threads.  However,
   no worklists were created yet at the that time.
2. Thread 2 starts to compile some functions and creates a DFG worklist, and
   acquires the worklist thread's lock.
3. Thread 1's GC completes and tries to resume suspended DFG worklist thread.
   This time, it sees the worklist created by Thread 2 and ends up unlocking
   the worklist thread's lock that is supposedly held by Thread 2.
Thereafter, chaos ensues.

The fix is to cache the worklists that were actually suspended by each GC pass,
and only resume those when the GC is done.

This issue was discovered by enabling COLLECT_ON_EVERY_ALLOCATION and running
the fast/workers layout tests.

* heap/Heap.cpp:
(JSC::Heap::visitCompilerWorklists):
(JSC::Heap::deleteAllCompiledCode):
(JSC::Heap::suspendCompilerThreads):
(JSC::Heap::resumeCompilerThreads):
* heap/Heap.h:

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

6 years agoEliminate internals.setMockScrollbarsEnabled()
ap@apple.com [Thu, 24 Apr 2014 00:32:14 +0000 (00:32 +0000)]
Eliminate internals.setMockScrollbarsEnabled()
https://bugs.webkit.org/show_bug.cgi?id=132085

Reviewed by Tim Horton.

Source/WebCore:
This was essentially unused, and also didnt work.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setMockScrollbarsEnabled): Deleted.
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Tools:
* DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues):
No need to reset the preference, there is no way it can change.

LayoutTests:
Remove calls, all of which were resetting it to true (which is the default, and
the only value that makes sense).

* compositing/geometry/fixed-position.html:
* compositing/geometry/horizontal-scroll-composited.html:
* compositing/geometry/vertical-scroll-composited.html:
* compositing/iframes/resources/scrollgrandchild-inner.html:
* compositing/overflow/fixed-position-ancestor-clip.html:
* compositing/resources/mock_scrollbars.js: Removed.
* css3/filters/blur-filter-page-scroll-parents.html:
* css3/filters/blur-filter-page-scroll-self.html:
* css3/filters/blur-filter-page-scroll.html:
* fast/dom/window-scroll-scaling.html:
* fast/events/touch/gesture/gesture-scrollbar.html:
* fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html:
* fast/sub-pixel/transformed-iframe-copy-on-scroll.html:
* media/video-controls-rendering.html:
* media/video-zoom.html:
* scrollingcoordinator/resources/non-fast-scrollable-region-testing.js:

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

6 years agoUnreviewed. Moving myself from Contributors to Committers list.
jcraig@apple.com [Thu, 24 Apr 2014 00:08:28 +0000 (00:08 +0000)]
Unreviewed. Moving myself from Contributors to Committers list.

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

6 years agoDon't migrate the WKView.h header from WebCore to WebKit
andersca@apple.com [Wed, 23 Apr 2014 23:17:49 +0000 (23:17 +0000)]
Don't migrate the WKView.h header from WebCore to WebKit
https://bugs.webkit.org/show_bug.cgi?id=132086

Reviewed by Dan Bernstein.

Source/WebCore:
* WebCore.xcodeproj/project.pbxproj:
Add WAKViewInternal.h.

* platform/WAKViewInternal.h: Added.

* platform/ios/wak/WAKClipView.m:
Import WAKViewInternal.h instead of WAKViewPrivate.h.

* platform/ios/wak/WAKScrollView.mm:
Import WAKViewInternal.h instead of WAKViewPrivate.h.

* platform/ios/wak/WAKView.h:
Move ivars to a class extension in WAKViewInternal.h and remove WKView.h import.

* platform/ios/wak/WAKView.mm:
Import WAKViewInternal.h instead of WAKViewPrivate.h.

* platform/ios/wak/WAKViewPrivate.h:
Import WKViewPrivate.h.

Source/WebKit/mac:
* MigrateHeaders.make:
Remove WKView.h from the list of headers to migrate.

* WebView/WebView.mm:
Import WKView.h.

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

6 years agoArguments::copyBackingStore needs to update m_registers in tandem with m_registerArray
mhahnenberg@apple.com [Wed, 23 Apr 2014 22:35:16 +0000 (22:35 +0000)]
Arguments::copyBackingStore needs to update m_registers in tandem with m_registerArray
https://bugs.webkit.org/show_bug.cgi?id=132079

Reviewed by Michael Saboff.

Since we're moving the register backing store, we don't want to leave a dangling pointer into a random CopiedBlock.

Also added a test that previously triggered this bug.

* runtime/Arguments.cpp:
(JSC::Arguments::copyBackingStore): D'oh!
* tests/stress/arguments-copy-register-array-backing-store.js: Added.
(foo):
(bar):

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

6 years agoMock scrollbars don't always work in DumpRenderTree
timothy_horton@apple.com [Wed, 23 Apr 2014 22:22:00 +0000 (22:22 +0000)]
Mock scrollbars don't always work in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=132082

Reviewed by Alexey Proskuryakov.

* DumpRenderTree/mac/DumpRenderTree.mm:
(prepareConsistentTestingEnvironment):
Set the mock scrollbar setting before creating the WebView, as this setting
cannot be dynamically changed, so any scrollbars that are created during
WebView initialization and are not replaced before snapshotting will end
up being platform scrollbars instead of mock ones.
WebKitTestRunner already sets this preference before creating WKViews,
so we're just matching its behavior.

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

6 years ago[New Multicolumn] fast/multicol/fixed-column-percent-logical-height-orthogonal-writin...
hyatt@apple.com [Wed, 23 Apr 2014 22:19:19 +0000 (22:19 +0000)]
[New Multicolumn] fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html fails
https://bugs.webkit.org/show_bug.cgi?id=132078

Reviewed by Anders Carlsson.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
Add a parameter to test for orthogonal writing modes. If we're perpendicular,
then we should not skip the flow thread, since we resolve relative to the column width,
and that is always set.

(WebCore::RenderBox::computePercentageLogicalHeight):
Patched to pass in whether or not the box and the ancestor block are perpendicular.

* rendering/RenderBox.h:
Patched the signature of skipContainingBlockForPercentHeightCalculation

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

6 years ago[OS X] Make checking if a font is the system font more robust
mmaxfield@apple.com [Wed, 23 Apr 2014 21:33:14 +0000 (21:33 +0000)]
[OS X] Make checking if a font is the system font more robust
https://bugs.webkit.org/show_bug.cgi?id=132030

Reviewed by Dean Jackson.

Instead of inspecting a font's name to determine if it is a system font,
on OS X we can ask the system directly.

This patch also moves a platform-specific check into platform-specific
code, so that other platforms don't check for OS X-specific behavior.

Covered by existing tests.

* platform/graphics/Font.cpp:
(WebCore::Font::hasValidAverageCharWidth):
* platform/graphics/Font.h:
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::primaryFontDataIsSystemFont):

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

6 years ago[New Multicolumn] Assertion failure in huge-column-count.html
hyatt@apple.com [Wed, 23 Apr 2014 21:27:54 +0000 (21:27 +0000)]
[New Multicolumn] Assertion failure in huge-column-count.html
https://bugs.webkit.org/show_bug.cgi?id=132071

Reviewed by Dean Jackson.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::regionAtBlockOffset):
Back out this change, since it wasn't general enough.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::getRegionRangeForBox):
The real issue was that this loop needed to consider the actual box
rather than starting from the parent. This was a non-issue for normal
regions (which cannot have nested flow threads), but for columns, you
have to consider the fact that the box could itself be a flow thread.

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

6 years ago[iOS] Memory pressure notification should fire on main thread.
akling@apple.com [Wed, 23 Apr 2014 21:22:53 +0000 (21:22 +0000)]
[iOS] Memory pressure notification should fire on main thread.
<https://webkit.org/b/132074>

Rejig the memory pressure notification to fire on the main queue
directly instead of rerouting it manually.

Reviewed by Mark Rowe.

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::install):

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

6 years agoUnreviewed, rolling out r167720.
commit-queue@webkit.org [Wed, 23 Apr 2014 20:54:12 +0000 (20:54 +0000)]
Unreviewed, rolling out r167720.
https://bugs.webkit.org/show_bug.cgi?id=132075

broke eight newmulticol tests (Requested by thorton on
#webkit).

Reverted changeset:

"[New Multicolumn] Assertion failure in huge-column-
count.html"
https://bugs.webkit.org/show_bug.cgi?id=132071
http://trac.webkit.org/changeset/167720

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

6 years ago[New Multicolumn] Assertion failure in huge-column-count.html
hyatt@apple.com [Wed, 23 Apr 2014 20:01:01 +0000 (20:01 +0000)]
[New Multicolumn] Assertion failure in huge-column-count.html
https://bugs.webkit.org/show_bug.cgi?id=132071

Reviewed by Dean Jackson.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::regionAtBlockOffset):
Remove the code that returned 0 here, since we're going to patch a lower-level
function to catch all cases.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::getRegionRangeForBox):
Don't allow in-flow RenderFlowThreads to ever have a region range. The sets
are what should have ranges... the flow thread needs to just be ignored.

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

6 years agoSupport encoding/decoding NSUInteger arguments in WKRemoteObjectCoder.
commit-queue@webkit.org [Wed, 23 Apr 2014 19:38:42 +0000 (19:38 +0000)]
Support encoding/decoding NSUInteger arguments in WKRemoteObjectCoder.
https://bugs.webkit.org/show_bug.cgi?id=132040

Add support for encoding/decoding NSUInteger arguments.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-04-23
Reviewed by Sam Weinig.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(decodeInvocationArguments):

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

6 years ago[New Multicolumn] Crasher when clearing out a flow thread in multicolumn layout.
hyatt@apple.com [Wed, 23 Apr 2014 18:55:43 +0000 (18:55 +0000)]
[New Multicolumn] Crasher when clearing out a flow thread in multicolumn layout.
https://bugs.webkit.org/show_bug.cgi?id=132069

Reviewed by Dean Jackson.

Source/WebCore:
This is imported from a patch Morten did for Blink, but I had to change it a fair
bit. deleteLines() is used to handle simple line box layout instead of just calling
deleteLineBoxTree.

I also had to disable the layout state to stop asserts on repaint when the children
get moved. Not sure why Blink didn't hit this, but it's simple enough to add a
LayoutStateDisabler to stop the assert.

Added fast/multicol/inline-children-crash.html

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):

LayoutTests:
* fast/multicol/inline-children-crash-expected.txt: Added.
* fast/multicol/inline-children-crash.html: Added.

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

6 years ago[iOS WebKit2] IOSurfacePool should force CA to actually garbage collect surfaces.
akling@apple.com [Wed, 23 Apr 2014 18:47:15 +0000 (18:47 +0000)]
[iOS WebKit2] IOSurfacePool should force CA to actually garbage collect surfaces.
<https://webkit.org/b/132065>
<rdar://problem/16110687>

Add a platformGarbageCollectNow() helper function to IOSurfacePool that
triggers a sweep of the IOSurfaces. Call this from collectionTimerFired()
and discardAllSurfaces().

This lets us drop all otherwise-unused 420f surfaces on memory pressure.

Reviewed by Tim Horton.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::collectionTimerFired):
(WebCore::IOSurfacePool::discardAllSurfaces):
* platform/graphics/cg/IOSurfacePool.h:
* platform/graphics/cocoa/IOSurfacePoolCocoa.mm: Added.
(WebCore::IOSurfacePool::platformGarbageCollectNow):

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

6 years agoREGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
commit-queue@webkit.org [Wed, 23 Apr 2014 18:39:57 +0000 (18:39 +0000)]
REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
https://bugs.webkit.org/show_bug.cgi?id=113058

Patch by Morten Stenshorne <mstensho@opera.com> on 2014-04-23
Reviewed by David Hyatt.

Source/WebCore:
Before sharing CSS properties with an element in the cache, we need to
check that the new element is suitable for this, just like we check
elements before inserting them into the cache.

Test: fast/css/identical-logical-height-decl.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyMatchedProperties):

LayoutTests:
* fast/css/identical-logical-height-decl-expected.html: Added.
* fast/css/identical-logical-height-decl.html: Added.

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

6 years agoUnreviewed, rolling out r167713.
commit-queue@webkit.org [Wed, 23 Apr 2014 18:36:26 +0000 (18:36 +0000)]
Unreviewed, rolling out r167713.
https://bugs.webkit.org/show_bug.cgi?id=132070

broke hundreds of tests (Requested by thorton on #webkit).

Reverted changeset:

"[OS X] Make checking if a font is the system font more
robust"
https://bugs.webkit.org/show_bug.cgi?id=132030
http://trac.webkit.org/changeset/167713

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

6 years ago[New Multicolumn] Nested columns not working at all.
hyatt@apple.com [Wed, 23 Apr 2014 18:05:33 +0000 (18:05 +0000)]
[New Multicolumn] Nested columns not working at all.
https://bugs.webkit.org/show_bug.cgi?id=131805

Reviewed by Dean Jackson.

Add support for nested pagination contexts, allowing for an arbitrary level
of nesting of multicolumn layouts. There were a number of things that had to
be patched in order for this to work.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::regionAtBlockOffset):
Make sure RenderMultiColumnFlowThreads just return null for regions at any
block offset. Individual region sets will be created as you cross ancestor
regions eventually, so this is just getting in the way.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
Add a new helper method for obtaining an enclosingPaginationLayer when
constrained by some root. This function ensures you don't accidentally
cross your subtree root when looking for enclosing pagination layers.

(WebCore::RenderLayer::collectFragments):
Patch collectFragments to know how to recur to collect ancestor fragments
in order to apply nested splitting as you cross pagination boundaries.

(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::LayerFragment::LayerFragment):
(WebCore::LayerFragment::setRects):
(WebCore::LayerFragment::moveBy):
(WebCore::LayerFragment::intersect):
Improve the LayerFragment so that it caches transformed bounding boxes as
well. This is needed to fix intersectsDamageRect so that it doesn't grab
the wrong bounding box when checking inline layers that are paginated.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
Ignore inserted flow threads inside an ancestor flow thread, since we only
care about what the sets do.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::insertedIntoTree):
Make sure that nested flow thread layers return themselves when a child
is inserted directly under them.

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

6 years ago[OS X] Make checking if a font is the system font more robust
mmaxfield@apple.com [Wed, 23 Apr 2014 17:49:40 +0000 (17:49 +0000)]
[OS X] Make checking if a font is the system font more robust
https://bugs.webkit.org/show_bug.cgi?id=132030

Reviewed by Dean Jackson.

Instead of inspecting a font's name to determine if it is a system font,
on OS X we can ask the system directly.

This patch also moves a platform-specific check into platform-specific
code, so that other platforms don't check for OS X-specific behavior.

Covered by existing tests.

* platform/graphics/Font.cpp:
(WebCore::Font::hasValidAverageCharWidth):
* platform/graphics/Font.h:
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::primaryFontDataIsSystemFont):

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

6 years ago[GTK] Focus management API was moved from HTMLDocument to Document in r166668
commit-queue@webkit.org [Wed, 23 Apr 2014 16:44:13 +0000 (16:44 +0000)]
[GTK] Focus management API was moved from HTMLDocument to Document in r166668
https://bugs.webkit.org/show_bug.cgi?id=132060

Patch by Philippe Normand <pnormand@igalia.com> on 2014-04-23
Reviewed by Carlos Garcia Campos.

Deprecate the removed methods in WebKitDOMHTMLDocument to keep API compatibility.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_html_document_get_active_element):
(webkit_dom_html_document_has_focus):
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols:
* bindings/gobject/webkitdom.symbols:

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

6 years ago[iOS WebKit1] MemoryPressureHandler::respondToMemoryPressure called on wrong thread.
akling@apple.com [Wed, 23 Apr 2014 16:19:24 +0000 (16:19 +0000)]
[iOS WebKit1] MemoryPressureHandler::respondToMemoryPressure called on wrong thread.
<https://webkit.org/b/132041>
<rdar://problem/16687238>

Always dispatch the memory pressure relief code on the main queue.
This is really only needed for iOS/WK1, but we might as well share the code.

Reviewed by Michael Saboff.

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::install):

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

6 years ago[GTK] Unreviewed GTK gardening
commit-queue@webkit.org [Wed, 23 Apr 2014 15:38:31 +0000 (15:38 +0000)]
[GTK] Unreviewed GTK gardening
https://bugs.webkit.org/show_bug.cgi?id=132058

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-04-23

* platform/gtk/TestExpectations:

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

6 years ago[Mac] REGRESSION (r164823): Building JavaScriptCore creates files under /tmp/JavaScri...
mrowe@apple.com [Wed, 23 Apr 2014 14:39:46 +0000 (14:39 +0000)]
[Mac] REGRESSION (r164823): Building JavaScriptCore creates files under /tmp/JavaScriptCore.dst
<https://webkit.org/b/132053>

Reviewed by Dan Bernstein.

* JavaScriptCore.xcodeproj/project.pbxproj: Don't try to create a symlink at /usr/local/bin/jsc inside
the DSTROOT unless we're building to the deployment location. Also remove the unnecessary -x argument
from /bin/sh since that generates unnecessary output.

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

6 years ago[GTK] ShadowRoot API was removed in r164131
commit-queue@webkit.org [Wed, 23 Apr 2014 13:43:12 +0000 (13:43 +0000)]
[GTK] ShadowRoot API was removed in r164131
https://bugs.webkit.org/show_bug.cgi?id=132059

Source/WebCore:
Patch by Philippe Normand <pnormand@igalia.com> on 2014-04-23
Reviewed by Gustavo Noronha Silva.

Add ShadowRoot removed API to WebKitDOMDeprecated to keep API/ABI compatibility.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_shadow_root_class_init):
(webkit_dom_shadow_root_init):
(webkit_dom_shadow_root_element_from_point):
(webkit_dom_shadow_root_get_active_element):
(webkit_dom_shadow_root_get_apply_author_styles):
(webkit_dom_shadow_root_get_element_by_id):
(webkit_dom_shadow_root_get_elements_by_class_name):
(webkit_dom_shadow_root_get_elements_by_tag_name):
(webkit_dom_shadow_root_get_elements_by_tag_name_ns):
(webkit_dom_shadow_root_get_inner_html):
(webkit_dom_shadow_root_get_reset_style_inheritance):
(webkit_dom_shadow_root_get_selection):
(webkit_dom_shadow_root_set_apply_author_styles):
(webkit_dom_shadow_root_set_inner_html):
(webkit_dom_shadow_root_set_reset_style_inheritance):
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols:

Tools:
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2014-04-23
Reviewed by Gustavo Noronha Silva.

Add WebKitDOMShadowRoot to the list of deleted classes to generate
the API docs.

* gtk/webkitdom.py:
(WebKitDOMDocGenerator):

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

6 years ago[New Multicolumn] fast/multicol/overflow-content.html displays red
commit-queue@webkit.org [Wed, 23 Apr 2014 13:36:30 +0000 (13:36 +0000)]
[New Multicolumn] fast/multicol/overflow-content.html displays red
https://bugs.webkit.org/show_bug.cgi?id=131809

Patch by Morten Stenshorne <mstensho@opera.com> on 2014-04-23
Reviewed by David Hyatt.

Source/WebCore:
Insert a break at end of content on our own in the multicol code, to make sure
that overflow is accounted for, and also to make sure that we account for all
content in non-final sets (i.e. those preceding spanners).

In other words, this will additionally fix balancing issues in sets preceding
a spanner. Added a test for that.

Tests: fast/multicol/break-in-columns-before-spanner.html
       fast/multicol/newmulticol/compare-with-old-impl/overflow-content.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::regionInRange): Deleted.
* rendering/RenderFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::applyBreakAfterContent):
* rendering/RenderNamedFlowThread.h:

LayoutTests:
* fast/multicol/break-in-columns-before-spanner-expected.html: Added.
* fast/multicol/break-in-columns-before-spanner.html: Added.
* fast/multicol/newmulticol/compare-with-old-impl/overflow-content-expected.html: Added.
* fast/multicol/newmulticol/compare-with-old-impl/overflow-content.html: Added.

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

6 years agoOverflow propagation broken in BTT and RTL writing-modes
commit-queue@webkit.org [Wed, 23 Apr 2014 13:32:56 +0000 (13:32 +0000)]
Overflow propagation broken in BTT and RTL writing-modes
https://bugs.webkit.org/show_bug.cgi?id=113781

Patch by Morten Stenshorne <mstensho@opera.com> on 2014-04-23
Reviewed by David Hyatt.

Source/WebCore:
Overflow rectangles are not quite physical, not quite logical. This
means that we cannot use clientBoxRect() directly to represent a
rectangle that expresses exactly no overflow. This rectangle is the
padding box (relative to the border box) in vertical-lr and
horizontal-tb, but the block-direction borders need to be flipped in
vertical-rl and horizontal-bt.

Tests: fast/css/overflow-btt-border-after.html
       fast/css/overflow-rtl-border-after.html

* WebCore.exp.in:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::addLayoutOverflow):
(WebCore::RenderBox::addVisualOverflow):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBox.h:
(WebCore::RenderBox::layoutOverflowRect):

LayoutTests:
* fast/css/overflow-btt-border-after-expected.txt: Added.
* fast/css/overflow-btt-border-after.html: Added.
* fast/css/overflow-rtl-border-after-expected.txt: Added.
* fast/css/overflow-rtl-border-after.html: Added.
* fast/multicol/vertical-rl/rules-with-border-before-expected.png: Removed.
* platform/gtk/fast/multicol/vertical-rl/rules-with-border-before-expected.png: Removed.
* platform/mac/fast/multicol/vertical-rl/rules-with-border-before-expected.png: Removed.
Removed incorrect screenshots that now differ from the actual (correct) rendering.

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

6 years ago[CSS Regions] Improve the debugging infrastructure
abucur@adobe.com [Wed, 23 Apr 2014 12:30:22 +0000 (12:30 +0000)]
[CSS Regions] Improve the debugging infrastructure
https://bugs.webkit.org/show_bug.cgi?id=132042

Reviewed by Mihnea Ovidenie.

This patch improves the debugging code for CSS Regions.

Tests: No function change. No new tests.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::showRegionsInformation): Print brackets around the region range when dumping
the render tree to the console.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::containingRegion): Convert the ASSERT to an ASSERT_WITH_SECURITY_IMPLICATION.

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

6 years agoUnreviewed EFL gardening.
ryuan.choi@samsung.com [Wed, 23 Apr 2014 11:19:36 +0000 (11:19 +0000)]
Unreviewed EFL gardening.

* platform/efl-wk1/css3/flexbox/flexbox-baseline-expected.png: Removed.
* platform/efl-wk1/css3/flexbox/flexbox-baseline-expected.txt: Removed.
* platform/efl-wk1/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt: Removed.
* platform/efl-wk1/fast/block/basic/020-expected.txt: Removed.
* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:
* platform/efl/css3/flexbox/flexbox-baseline-expected.png: Renamed from LayoutTests/platform/efl-wk2/css3/flexbox/flexbox-baseline-expected.png.
* platform/efl/css3/flexbox/flexbox-baseline-expected.txt: Renamed from LayoutTests/platform/efl-wk2/css3/flexbox/flexbox-baseline-expected.txt.
* platform/efl/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt: Renamed from LayoutTests/platform/efl-wk2/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt.

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

6 years ago[EFL] Add expectations of new added tests.
commit-queue@webkit.org [Wed, 23 Apr 2014 11:11:47 +0000 (11:11 +0000)]
[EFL] Add expectations of new added tests.
https://bugs.webkit.org/show_bug.cgi?id=132052

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-04-23

* platform/efl-wk2/TestExpectations:
* platform/efl/fast/repaint/spanner-with-margin-expected.txt: Added. Rebaseline after r167439

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

6 years ago[GTK] run-webkit-tests script is failing to invoke run-launcher
commit-queue@webkit.org [Wed, 23 Apr 2014 09:39:51 +0000 (09:39 +0000)]
[GTK] run-webkit-tests script is failing to invoke run-launcher
https://bugs.webkit.org/show_bug.cgi?id=132051

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-04-23
Reviewed by Philippe Normand.

After the WK1 support was dropped, if run-webkit-tests is executed
without --no-show-results parameter, the launcher is being called
using a -2 parameter that is it causing the run-launcher to break.

* Scripts/webkitpy/port/gtk.py:
(GtkPort.show_results_html_file):

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

6 years agoRefactoring editing/selection/13804.html
g.czajkowski@samsung.com [Wed, 23 Apr 2014 07:34:01 +0000 (07:34 +0000)]
Refactoring editing/selection/13804.html
https://bugs.webkit.org/show_bug.cgi?id=131986

Reviewed by Darin Adler.

This test does not need pixel baselines (MAC, EFL, GTK) to just
check whether spelling marker appears on 'adf'.

According to bug 125688, the test starts using asynchronous
spellchecking.

Since the test mostly verifies spelling behaviour, it was moved
to editing/spelling directory.
Its name was changed to spelling-backward.html.

* editing/selection/13804.html: Removed.
* editing/spelling/spelling-backward-expected.txt: Added, renamed from editing/selection/13804.html.
* editing/spelling/spelling-backward.html: Added.

* platform/efl/editing/selection/13804-expected.png: Removed.
* platform/efl/editing/selection/13804-expected.txt: Removed.
* platform/gtk/editing/selection/13804-expected.png: Removed.
* platform/gtk/editing/selection/13804-expected.txt: Removed.
* platform/mac/editing/selection/13804-expected.png: Removed.
* platform/mac/editing/selection/13804-expected.txt: Removed.
Get rid of platform specific expectation.

* platform/gtk/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:
Mark spelling-backward.html as failure due to missing asynchronous spellchecking.

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

6 years agoCursor doesn't change back to pointer when leaving the Safari window
rniwa@webkit.org [Wed, 23 Apr 2014 06:11:22 +0000 (06:11 +0000)]
Cursor doesn't change back to pointer when leaving the Safari window
https://bugs.webkit.org/show_bug.cgi?id=132038

Reviewed by Alexey Proskuryakov.

Source/WebCore:
r147739 incorrectly added an early exit in EventHandler::selectCursor when hit test result didn't have
any node associated with it. Since we will hit this code when the cursor is outside of the WebView,
we still need to take the CURSOR_AUTO path as did the code before r147739.

No new test is added since this behavior can't be tested in DRT or WTR.

* page/EventHandler.cpp:
(WebCore::EventHandler::selectCursor):

Source/WebKit/mac:
Since the cursor type is now updated asynchronously after r147739,
[window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]
evalutes to false depending on how fast cursor is moving.

Instead, check whether the NSWindow of the WebView is the key window or not since
key window appears to control the cursor style in Cocoa as far as I've tested:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html

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

Source/WebKit2:
Since the cursor type is now updated asynchronously after r147739,
[window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]
evalutes to false depending on how fast cursor is moving.

Instead, check whether the NSWindow of the WebView is the key window or not since
key window appears to control the cursor style in Cocoa as far as I've tested:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html

* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setCursor):

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

6 years agoAdd SPI to expose provisional URL from Frame.
commit-queue@webkit.org [Wed, 23 Apr 2014 05:59:34 +0000 (05:59 +0000)]
Add SPI to expose provisional URL from Frame.
https://bugs.webkit.org/show_bug.cgi?id=132014

Add methods to return the provisional URL from WKWebProcessPlugInFrame.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-04-22
Reviewed by Dan Bernstein.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame _provisionalURL]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:

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

6 years ago[iOS][WK2] Split iOS touch event dispatch for the regular touch event dispatch
benjamin@webkit.org [Wed, 23 Apr 2014 05:53:05 +0000 (05:53 +0000)]
[iOS][WK2] Split iOS touch event dispatch for the regular touch event dispatch
https://bugs.webkit.org/show_bug.cgi?id=132033

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

The generic touch event dispatching does not work well with iOS gesture recognizers.
Some events are required to be synchronous, while other needs can be asynchronous and
can even use event coalescing. We only need UI callback for the synchronous events.

Previously, that was implemented by changing the property ShouldSendEventsSynchronously
on WebPageProxy. That is causing issues when synchronous events are sent right after asynchronous
events because the responses in WebPageProxy::didReceiveEvent() easily get out of order.

This patch completely split the UIGestureRecognizerDispatching from the normal asynchronous event dispatching.

Synchronous events are sent directly to the WebProcess and report the result to the PageClient right away.

Asynchronous events are sent to the EventDispatcher where they are coalesced until the main thread is free
to process events.

There can be a race where a synchronous event comes before the asynchronous events are processed. In that case,
the synchronous event handler starts by getting the events out of the EventDispatcher and dispatch them first.

* Shared/NativeWebTouchEvent.h:
(WebKit::NativeWebTouchEvent::uniqueId): Deleted.
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleSynchronousTouchEvent):
(WebKit::WebPageProxy::sendAsynchronousTouchEvent):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::EventDispatcher):
(WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
(WebKit::EventDispatcher::getQueuedTouchEventsForPage):
(WebKit::EventDispatcher::touchEvent):
(WebKit::EventDispatcher::dispatchTouchEvents):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/EventDispatcher.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dispatchTouchEvent):
(WebKit::WebPage::touchEventSync):
(WebKit::WebPage::touchEvent):
(WebKit::WebPage::touchEventSyncForTesting):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dispatchAsynchronousTouchEventsQueue):

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

6 years ago[EFL][WK1] There are many failures in fast/forms since r163033
ryuan.choi@samsung.com [Wed, 23 Apr 2014 05:28:20 +0000 (05:28 +0000)]
[EFL][WK1] There are many failures in fast/forms since r163033
https://bugs.webkit.org/show_bug.cgi?id=132039

Reviewed by Gyuyoung Kim.

* ewk/ewk_view.cpp: Added break statements which is missing while remove COMPILE_ASSERT_MATCHING_ENUM
(ewk_view_navigation_policy_decision):

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

6 years agoUnreviewed EFL gardening. media tests has been broken since r166395 on both EFL wk1...
gyuyoung.kim@samsung.com [Wed, 23 Apr 2014 05:03:07 +0000 (05:03 +0000)]
Unreviewed EFL gardening. media tests has been broken since r166395 on both EFL wk1 and wk2.

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

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

6 years agoSkip fast/events/ghostly-mousemoves-in-subframe.html on Mac/WK1.
akling@apple.com [Wed, 23 Apr 2014 03:13:41 +0000 (03:13 +0000)]
Skip fast/events/ghostly-mousemoves-in-subframe.html on Mac/WK1.

* platform/mac-wk1/TestExpectations:

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

6 years agoDo not paint border image when the border rect is empty.
zalan@apple.com [Wed, 23 Apr 2014 02:44:25 +0000 (02:44 +0000)]
Do not paint border image when the border rect is empty.
https://bugs.webkit.org/show_bug.cgi?id=131988

Reviewed by Darin Adler.

http://trac.webkit.org/changeset/167351 introduced an early return when border
rect is empty. This patch ensures that border image is not painted either in that case.

Source/WebCore:
Modified padding-margin-negative-border.html to cover border-image case.

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

LayoutTests:
* fast/css/padding-margin-negative-border-expected.html: Borders in -expected.html does not get painted either, just
ensure that they are explicitly different colors.
* fast/css/padding-margin-negative-border.html:

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

6 years agoASSERTION FAILED: scrollerImp == scrollbarPainterForScrollbar(_scrollbar) on two...
timothy_horton@apple.com [Wed, 23 Apr 2014 01:37:39 +0000 (01:37 +0000)]
ASSERTION FAILED: scrollerImp == scrollbarPainterForScrollbar(_scrollbar) on two API tests
https://bugs.webkit.org/show_bug.cgi?id=132034
<rdar://problem/16624332>

Reviewed by Simon Fraser.

* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):
scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp: moves the delegate
from the old scrollerImp to the new one, and also happens to call shouldUseLayerPerPartForScrollerImp.
Since scrollerImpWithStyle: has not returned yet, the scrollbarPainterForScrollbar still returns the old scrollerImp,
so this assertion fires. It's safe to remove this because supportsUpdateOnSecondaryThread doesn't make use of the imp.

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

6 years agoDFG::Worklist should acquire the m_lock before iterating DFG plans.
mark.lam@apple.com [Wed, 23 Apr 2014 00:36:49 +0000 (00:36 +0000)]
DFG::Worklist should acquire the m_lock before iterating DFG plans.
<https://webkit.org/b/132032>

Reviewed by Filip Pizlo.

Currently, there's a rightToRun mechanism that ensures that no compilation
threads are running when the GC is iterating through the DFG worklists.
However, this does not prevent a Worker thread from doing a DFG compilation
and modifying the plans in the worklists thereby invalidating the plan
iterator that the GC is using.  This patch fixes the issue by acquiring
the worklist m_lock before iterating the worklist plans.

This issue was uncovered by running the fast/workers layout tests with
COLLECT_ON_EVERY_ALLOCATION enabled.

* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::isActiveForVM):
(JSC::DFG::Worklist::visitChildren):

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

6 years agoDumpRenderTree generates black snapshots on some platforms
timothy_horton@apple.com [Tue, 22 Apr 2014 23:54:49 +0000 (23:54 +0000)]
DumpRenderTree generates black snapshots on some platforms
https://bugs.webkit.org/show_bug.cgi?id=132029
<rdar://problem/16679363>

Reviewed by Simon Fraser.

* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createBitmapContextFromWebView):
DRT checks with the WebView to determine whether it can use the window's
backing store directly or (because of compositing) needs to take a WindowServer
snapshot. However, on some platforms and in some situations, the window can
be layer backed without the WebView necessarily currently being composited.
We should check with the window in addition to the WebView before going
ahead and using its backing store.

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

6 years agoAX: iOS hit-testing does not work when page is zoomed
cfleizach@apple.com [Tue, 22 Apr 2014 23:51:51 +0000 (23:51 +0000)]
AX: iOS hit-testing does not work when page is zoomed
https://bugs.webkit.org/show_bug.cgi?id=132013

Reviewed by Simon Fraser.

Implement accessibilityHitTest so that the point can be converted correctly.

* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):

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

6 years agoREGRESSION (r157328): popover to check into flight ba.com dismisses instantly when...
rniwa@webkit.org [Tue, 22 Apr 2014 23:25:59 +0000 (23:25 +0000)]
REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
https://bugs.webkit.org/show_bug.cgi?id=131949

Reviewed by Darin Adler.

Source/WebCore:
The regression was caused by two bugs:
1. The event didn't stop propagating itself even when it should.
   If the related target is same as the event origin, the event propagation should stop when the event reaches
   the root of the related target's tree scope. Otherwise, it should stop when it reaches the related target.

2. Mouse event's related target exposed nodes inside a user-agent shadow DOM when the related target appeared
   inside the origin.

Fixed the bugs by re-introducing path shrinkage algorithm removed in r157328 into EventPath::setRelatedTarget
and adding an algorithm to determine the least common ancestor of the related target and the current target
in moveToParentOrShadowHost. The latter algorithm doesn't match the shadow DOM specification:
http://www.w3.org/TR/2013/WD-shadow-dom-20130514/
but it's good enough in terms of the Web exposed behavior as we don't support author defined insertion points.

Test: fast/events/shadow-event-path.html

* dom/EventDispatcher.cpp:
(WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
(WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope): Added.
(WebCore::EventDispatcher::dispatchEvent):
(WebCore::EventPath::setRelatedTarget):

LayoutTests:
Add a test that dumps the event target and the related target of every mouse event
when dispatched inside an input element inside a details element.

This catches the regression as well as other bugs I encountered while fixing the bug.

We need a WK2 specific results because WK1 mac results contain an extra fake mouse move event.

* fast/events/shadow-event-path-expected.txt: Added.
* fast/events/shadow-event-path.html: Added.
* platform/mac-wk2/fast/events/shadow-event-expected.txt: Added.

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

6 years agoRollout r156635 since the old behavior was intentional.
rniwa@webkit.org [Tue, 22 Apr 2014 23:05:53 +0000 (23:05 +0000)]
Rollout r156635 since the old behavior was intentional.

Source/WebCore:
* page/EventHandler.cpp:
(WebCore::EventHandler::selectCursor):

LayoutTests:
* editing/caret/selection-with-caret-type-progress-expected.txt: Removed.
* editing/caret/selection-with-caret-type-progress.html: Removed.

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

7 years agoDumpRenderTree generates white snapshots on some platforms
timothy_horton@apple.com [Tue, 22 Apr 2014 22:44:51 +0000 (22:44 +0000)]
DumpRenderTree generates white snapshots on some platforms
https://bugs.webkit.org/show_bug.cgi?id=132026
<rdar://problem/16679363>

Reviewed by Simon Fraser.

* DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
Link DRT against QuartzCore.

* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createBitmapContextFromWebView):
Force CoreAnimation to synchronously update layers in a more explicit
way that doesn't depend on AppKit behavior. This is very similar to what
WebKitTestRunner does (indirectly) during its force repaint.

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

7 years agoUnreviewed, rolling out r167674.
commit-queue@webkit.org [Tue, 22 Apr 2014 22:05:46 +0000 (22:05 +0000)]
Unreviewed, rolling out r167674.
https://bugs.webkit.org/show_bug.cgi?id=132025

Going a different way with this (Requested by bradee-oh on
#webkit).

Reverted changeset:

"Change Image Controls replacement to use selection and paste"
https://bugs.webkit.org/show_bug.cgi?id=131992
http://trac.webkit.org/changeset/167674

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

7 years ago[Win] Support Python 2.7 in Cygwin
bfulgham@apple.com [Tue, 22 Apr 2014 21:58:42 +0000 (21:58 +0000)]
[Win] Support Python 2.7 in Cygwin
https://bugs.webkit.org/show_bug.cgi?id=132023

Reviewed by Michael Saboff.

Source/JavaScriptCore:
* DerivedSources.make: Use a conditional variable to define
the path to Python/Perl.

Source/WebCore:
* DerivedSources.make: Use proper path to Cygwin on
all platforms.

Source/WebInspectorUI:
* WebInspectorUI.vcxproj/build-webinspectorui.sh: use
proper path to Python under Cygwin.

Source/WebKit:
* WebKit.vcxproj/WebKit/WebKitVersion.cmd: Use correct
path to Python under Cygwin.

Source/WTF:
* WTF.vcxproj/WTFGenerated.make: Use proper path to Python.

Tools:
* Scripts/webkitdirs.pm:
(checkInstalledTools): Remove check for Python 2.7, since
it now works properly.

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

7 years agoREGRESSION (r151839): Subframe keeps getting mousemove events with the same coordinat...
akling@apple.com [Tue, 22 Apr 2014 21:55:59 +0000 (21:55 +0000)]
REGRESSION (r151839): Subframe keeps getting mousemove events with the same coordinates after hiding a hovered element.
<https://webkit.org/b/131974>
<rdar://problem/15907469>

Source/WebCore:
When the currently hovered element disappears as a result of style recalc,
we send a fake mousemove event to the page, to see if anything newly added
should become hovered.

The faking mechanism lives in EventHandler and simply synthesizes a new
mousemove event using the last seen mouse location.

The problem here is that we were sending this fake mousemove event to the
subframe where the hovered element lived. Since subframes aren't kept up
to date on recent mouse locations, this could cause some strange behavior
where a subframe would dispatch mousemove events with stale coordinates.

The solution is to always dispatch fake mousemove events from the main
frame's event handler. This is how real event delivery happens, and hit
testing will then find the appropriate subframe, if any.

Reviewed by Benjamin Poulain.

Test: fast/events/ghostly-mousemoves-in-subframe.html

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

LayoutTests:
Add a test that triggers the weirdness where removing the renderer from
a hovered element in a subframe would leave the subframe's EventHandler
in a state where it could dispatch fake mousemove events with stale
coordinates in response to style recalc.

Note that the final 500ms delay is because fake mousemove events are
sent on 250ms delay timers so we need to give it some time to catch up.

Reviewed by Benjamin Poulain.

* fast/events/ghostly-mousemoves-in-subframe-expected.txt: Added.
* fast/events/ghostly-mousemoves-in-subframe.html: Added.
* platform/mac-wk2/fast/events/resources/ghostly-mousemoves-in-subframe-the-actual-subframe.html: Added.

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

7 years ago[OS X] Glyph spacing for system fonts may be incorrect
mmaxfield@apple.com [Tue, 22 Apr 2014 21:07:11 +0000 (21:07 +0000)]
[OS X] Glyph spacing for system fonts may be incorrect
https://bugs.webkit.org/show_bug.cgi?id=131967

Unreviewed iOS build fix after r167679.

* platform/graphics/mac/SimpleFontDataMac.mm:

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

7 years agoRemove unused local variable
commit-queue@webkit.org [Tue, 22 Apr 2014 20:51:14 +0000 (20:51 +0000)]
Remove unused local variable
https://bugs.webkit.org/show_bug.cgi?id=132020

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-22
Reviewed by Alexey Proskuryakov.

* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectPopover initWithView:hasGroups:]):

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

7 years ago[OS X] Glyph spacing for system fonts may be incorrect
mmaxfield@apple.com [Tue, 22 Apr 2014 20:49:13 +0000 (20:49 +0000)]
[OS X] Glyph spacing for system fonts may be incorrect
https://bugs.webkit.org/show_bug.cgi?id=131967

Unreviewed build fix after r167679.

* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::hasCustomTracking):

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

7 years agoREGRESSION: JSRegress's js/slow-stress/new-spread.html fails sometimes
timothy_horton@apple.com [Tue, 22 Apr 2014 20:40:49 +0000 (20:40 +0000)]
REGRESSION: JSRegress's js/slow-stress/new-spread.html fails sometimes
https://bugs.webkit.org/show_bug.cgi?id=132022
<rdar://problem/16690671>

* TestExpectations:
Mark the test as flaky pass/fail/timeout, because that's what it is.

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

7 years ago[OS X] Glyph spacing for system fonts may be incorrect
mmaxfield@apple.com [Tue, 22 Apr 2014 20:38:00 +0000 (20:38 +0000)]
[OS X] Glyph spacing for system fonts may be incorrect
https://bugs.webkit.org/show_bug.cgi?id=131967

Reviewed by Simon Fraser.

Source/WebCore:
Covered by existing tests.

* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformWidthForGlyph): Update to use CTFontGetAdvancesForGlyphs() for system fonts
(WebCore::hasCustomTracking):

LayoutTests:
Updating test to be more robust.

* fast/forms/search/intrinsic-search-width-with-decoration-border-padding-expected.txt:
* fast/forms/search/intrinsic-search-width-with-decoration-border-padding.html:

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

7 years ago[New Multicolumn] widows/orphans cause assertion failures.
hyatt@apple.com [Tue, 22 Apr 2014 20:31:47 +0000 (20:31 +0000)]
[New Multicolumn] widows/orphans cause assertion failures.
https://bugs.webkit.org/show_bug.cgi?id=131233

Reviewed by Dean Jackson.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::recordSpaceShortage):
Fix an obvious bug where the space shortage is recorded twice (and the
if statement that kept it from being negative is accidentally ignored).

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

7 years ago[New Multicolumn] Make sure columnTranslationForOffset has the same column-span-aware
hyatt@apple.com [Tue, 22 Apr 2014 20:05:29 +0000 (20:05 +0000)]
[New Multicolumn] Make sure columnTranslationForOffset has the same column-span-aware
translation that fragment collection does.
https://bugs.webkit.org/show_bug.cgi?id=131738

Reviewed by Anders Carlsson.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::collectLayerFragments):
Remove a FIXME that is no longer needed, since the translation offset of the
column set did get patched.

(WebCore::RenderMultiColumnSet::columnTranslationForOffset):
Add the exact same fix to columnTranslationForOffset that was applied to collectLayerFragments.

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

7 years agoWebCore::HTMLMediaElement::ensureMediaControlsInjectedScript() needs to acquire the...
mark.lam@apple.com [Tue, 22 Apr 2014 19:58:24 +0000 (19:58 +0000)]
WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript() needs to acquire the JSLock before calling into JS.
<https://webkit.org/b/132021>

Reviewed by Mark Hahnenberg.

Covered by existing layout test.

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

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

7 years agoREGRESSION (r167652): Broke fast/regions/cssom/region-range-for-box-crash.html in...
rego@igalia.com [Tue, 22 Apr 2014 19:48:29 +0000 (19:48 +0000)]
REGRESSION (r167652): Broke fast/regions/cssom/region-range-for-box-crash.html in debug mode
https://bugs.webkit.org/show_bug.cgi?id=131982

Reviewed by David Hyatt.

Source/WebCore:
The problem was creating the Range from the arguments received at RenderView::setSelection(). Specifically
in this test endPos is 1 when the element has not children which creates an invalid Range.

* rendering/RenderView.cpp:
(WebCore::RenderView::splitSelectionBetweenSubtrees): Pass 0 as startPos and endPos to Range::create() as we are
not interested in the positions at this point.

LayoutTests:
* TestExpectations: Unskip fast/regions/cssom/region-range-for-box-crash.html.

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

7 years agoChange Image Controls replacement to use selection and paste
beidson@apple.com [Tue, 22 Apr 2014 19:22:28 +0000 (19:22 +0000)]
Change Image Controls replacement to use selection and paste
<rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992

Reviewed by Tim Horton.

Source/WebCore:
* WebCore.exp.in: Remove deleted symbol.

* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::ImageControlsButtonElementMac::defaultEventHandler):

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::showImageControlsMenu): Select the image element
  before showing the menu.
(WebCore::ContextMenuController::replaceControlledImage): Deleted.
* page/ContextMenuController.h:

Source/WebKit/mac:
* Misc/WebSharingServicePickerController.mm:
(-[WebSharingServicePickerController sharingService:didShareItems:]): Write the
  replacement data to a special pasteboard, then replace the current selection from
  that pasteboard.

Source/WebKit2:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Write the
  replacement data to a special pasteboard, then replace the current selection from
  that pasteboard.

Remove all other code used to support the old replacement mechanism:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::replaceControlledImage): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::page):
(WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::replaceControlledImage): Deleted.
* WebProcess/WebPage/WebContextMenu.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::replaceControlledImage): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

7 years agoREGRESSION: Hitting asserts in new flow thread selection code.
hyatt@apple.com [Tue, 22 Apr 2014 19:00:06 +0000 (19:00 +0000)]
REGRESSION: Hitting asserts in new flow thread selection code.
https://bugs.webkit.org/show_bug.cgi?id=132019

Reviewed by Anders Carlsson.

Null checking flowThreadController is not enough. The list of threads
can be null even when the flowThreadController is not. That's why you
use hasRenderNamedFlowThreads. I patched the two bad places in the code
to use hasRenderNamedFlowThreads to stop the crashes.

* rendering/RenderView.cpp:
(WebCore::RenderView::selectionBounds):
(WebCore::RenderView::repaintSelection):

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

7 years agoCheck (rather than assume) element is a RenderTableSection before using it
bfulgham@apple.com [Tue, 22 Apr 2014 18:36:52 +0000 (18:36 +0000)]
Check (rather than assume) element is a RenderTableSection before using it
https://bugs.webkit.org/show_bug.cgi?id=121858

Reviewed by David Kilzer.

Source/WebCore:
Test: fast/table/table-insert-object-before-td-crash.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild): Check that lastBox is a table section before
using the node as if it was one.

LayoutTests:
* fast/table/table-insert-object-before-td-crash-expected.txt: Added.
* fast/table/table-insert-object-before-td-crash.html: Added.

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

7 years agoSwitch the LLVMForJSC target to using the LLVM in /usr/local rather than /usr/local...
fpizlo@apple.com [Tue, 22 Apr 2014 18:36:23 +0000 (18:36 +0000)]
Switch the LLVMForJSC target to using the LLVM in /usr/local rather than /usr/local/LLVMForJavaScriptCore on iOS
https://bugs.webkit.org/show_bug.cgi?id=130867
<rdar://problem/16432456>

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:
* Configurations/Base.xcconfig:
* Configurations/LLVMForJSC.xcconfig:

Tools:
* Scripts/build-webkit:
* Scripts/copy-webkitlibraries-to-product-directory:

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

7 years agoBegin implementation of video using Media Foundation.
alex.christensen@flexsim.com [Tue, 22 Apr 2014 18:22:02 +0000 (18:22 +0000)]
Begin implementation of video using Media Foundation.
https://bugs.webkit.org/show_bug.cgi?id=131830

Reviewed by Brent Fulgham.

Source/WebCore:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Added MediaPlayerPrivateMediaFoundation files.
* platform/graphics/MediaPlayer.cpp:
Include MediaPlayerPrivateMediaFoundation inside new USE(MEDIA_FOUNDATION) flag.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: Added.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Added.

Source/WebKit/win:
* FullscreenVideoController.cpp:
* WebView.cpp:
Added new USE(MEDIA_FOUNDATION) flag to prevent using the unsupported fullscreen api.

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

7 years ago[GTK] Fails to build documentation when output is redirected
gns@gnome.org [Tue, 22 Apr 2014 18:12:56 +0000 (18:12 +0000)]
[GTK] Fails to build documentation when output is redirected
https://bugs.webkit.org/show_bug.cgi?id=131178

Reviewed by Martin Robinson.

* gtk/generate-gtkdoc: set the output for stdout and stderr to UTF-8
explicitly to avoid encoding issues when they are redirected.

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

7 years ago[Win] Unreviewed build fix after my r167666.
alex.christensen@flexsim.com [Tue, 22 Apr 2014 18:08:53 +0000 (18:08 +0000)]
[Win] Unreviewed build fix after my r167666.

* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props:
Added ../../../ again to include headers in Source/JavaScriptCore.

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

7 years ago[GTK] YCM choose a newer compile_commands.json in between Release or Debug
changseok.oh@collabora.com [Tue, 22 Apr 2014 17:38:15 +0000 (17:38 +0000)]
[GTK] YCM choose a newer compile_commands.json in between Release or Debug
https://bugs.webkit.org/show_bug.cgi?id=131911

Reviewed by Martin Robinson.

common.get_build_path returns release path even though Debug configuration
is newer than Release. So YouCompleteMe is used to refer old build setup inadvertently.

* gtk/ycm_extra_conf.py:
(get_build_path): Compare modified time of Release and Debug. And return a recent modified path.
(FlagsForFile):

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

7 years agoRemoved old stdbool and inttypes headers.
alex.christensen@flexsim.com [Tue, 22 Apr 2014 17:30:56 +0000 (17:30 +0000)]
Removed old stdbool and inttypes headers.
https://bugs.webkit.org/show_bug.cgi?id=131966

Reviewed by Brent Fulgham.

.:
* Source/cmake/OptionsWindows.cmake:
* Source/cmake/WebKitPackaging.cmake:
Removed references to os-win32 directory.

Source/JavaScriptCore:
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props:
* JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props:
Removed references to os-win32 directory.
* os-win32: Removed.
* os-win32/inttypes.h: Removed.
* os-win32/stdbool.h: Removed.

WebKitLibraries:
* win/tools/vsprops/WinCairo.props:
Removed references to os-win32 directory.

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

7 years ago[EFL][WK2] Remove duplicated code to set size to the DrawingArea.
eunmi15.lee@samsung.com [Tue, 22 Apr 2014 17:04:23 +0000 (17:04 +0000)]
[EFL][WK2] Remove duplicated code to set size to the DrawingArea.
https://bugs.webkit.org/show_bug.cgi?id=131972

Reviewed by Andreas Kling.

DrawingArea's size is set in the WebView.cpp when EwkView's size is
changed, so we don't have to set again in the PageViewportController.

* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::didChangeViewportSize):

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

7 years agoUnreviewed, rolling out r167658.
commit-queue@webkit.org [Tue, 22 Apr 2014 16:56:24 +0000 (16:56 +0000)]
Unreviewed, rolling out r167658.
https://bugs.webkit.org/show_bug.cgi?id=131993

Caused many crashes on media tests (Requested by ap on
#webkit).

Reverted changeset:

"[Mac] don't ask for AVAssetTrack properties before they are
available"
https://bugs.webkit.org/show_bug.cgi?id=131902
http://trac.webkit.org/changeset/167658

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

7 years ago[New Multicolumn] fast/multicol/multicol-with-child-renderLayer-for-input.html puts...
hyatt@apple.com [Tue, 22 Apr 2014 16:08:18 +0000 (16:08 +0000)]
[New Multicolumn] fast/multicol/multicol-with-child-renderLayer-for-input.html puts the textfield in the wrong place
https://bugs.webkit.org/show_bug.cgi?id=131808

Reviewed by Brady Eidson.

Source/WebCore:

Make sure FrameView is patched to pass in the update pagination flag when subtree layout
is done on textfields. It had code for the old multicolumn system but did not have a check
for the new multicolumn system.

Added fast/multicol/newmulticol/compare-with-old-impl/multicol-with-child-renderLayer-for-input.html

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

LayoutTests:

* fast/multicol/newmulticol/compare-with-old-impl/multicol-with-child-renderLayer-for-input-expected.html: Added.
* fast/multicol/newmulticol/compare-with-old-impl/multicol-with-child-renderLayer-for-input.html: Added.

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

7 years agoWKThumbnailView doesn't quite work with topContentInset
timothy_horton@apple.com [Tue, 22 Apr 2014 15:51:33 +0000 (15:51 +0000)]
WKThumbnailView doesn't quite work with topContentInset
https://bugs.webkit.org/show_bug.cgi?id=131976
<rdar://problem/16642127>

Reviewed by Darin Adler.

* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
_WKThumbnailView always needs a layer.
We don't want to use snapshots by default, this was debugging accidentally landed in the last change.

(-[_WKThumbnailView _requestSnapshotIfNeeded]):
Don't request a new snapshot if the scale is the same as the existing one.
Reduce the height of the snapshot by the topContentInset.
Having the origin at (0, 0) is still correct, as the inset content is in negative Y space,
and (0, 0) is the true origin of the content.

(-[_WKThumbnailView setScale:]):
When not snapshotting, we've decided that WKThumbnailView should apply the scale to the WKView layer tree,
instead of depending on clients to do so.

(-[_WKThumbnailView setUsesSnapshot:]):
We *do* need to apply thumbnail scale in the web process even when snapshotting,
because we use the live layer tree temporarily while waiting for the asynchronous
snapshot to return. This was a misstep in the last thumbnail view patch.

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

7 years ago[EFL][WK1] There are many warnings in layout test since r167428
ryuan.choi@samsung.com [Tue, 22 Apr 2014 15:39:26 +0000 (15:39 +0000)]
[EFL][WK1] There are many warnings in layout test since r167428
https://bugs.webkit.org/show_bug.cgi?id=131985

Reviewed by Gyuyoung Kim.

Since r167428, implementation of flush method was removed, but ewk_view_frame_main_cleared
still checked and generated many warnings.

Now, ewk_view_frame_main_cleared is not required because flush is already
meaningless and others are covered by ewk_frame_view_create_for_view.
So, this patch removed ewk_view_frame_main_cleared and related code which is already dead.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::transitionToCommittedForNewPage):
* ewk/ewk_view.cpp:
(ewk_view_frame_main_cleared): Deleted.
(ewk_view_did_first_visually_nonempty_layout): Deleted.
(ewk_view_dispatch_did_finish_loading): Deleted.
* ewk/ewk_view.h: Removed flush smart method.

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

7 years ago[WebKit2] Cleanup the build from unused parameter in WebProcess Module
commit-queue@webkit.org [Tue, 22 Apr 2014 15:19:02 +0000 (15:19 +0000)]
[WebKit2] Cleanup the build from unused parameter in WebProcess Module
https://bugs.webkit.org/show_bug.cgi?id=131970

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

Fix a build warning by removing the parameters in function paintLayerContents() to fix build warning.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::paintLayerContents):

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

7 years agoborder-style: double rendered as solid when combined with border-radius
zalan@apple.com [Tue, 22 Apr 2014 14:17:43 +0000 (14:17 +0000)]
border-style: double rendered as solid when combined with border-radius
https://bugs.webkit.org/show_bug.cgi?id=131927

Reviewed by Simon Fraser.

BorderEdge::getDoubleBorderStripeWidths() should return the calculated inner, outer border widths.

Source/WebCore:
Test: fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html

* rendering/BorderEdge.cpp:
(WebCore::BorderEdge::getDoubleBorderStripeWidths):
* rendering/BorderEdge.h:

LayoutTests:
* fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line-expected.html: Added.
* fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html: Added.

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

7 years ago[Mac] don't ask for AVAssetTrack properties before they are available
eric.carlson@apple.com [Tue, 22 Apr 2014 14:06:36 +0000 (14:06 +0000)]
[Mac] don't ask for AVAssetTrack properties before they are available
https://bugs.webkit.org/show_bug.cgi?id=131902
<rdar://problem/16505076>

Reviewed by Jer Noble.

No new tests, the behavior this changes can not be tested with a layout test.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
    m_cachedTotalBytes.
(WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Don't report that
    metadata has been loaded until the track properties we need have been loaded too.
(WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Cache totalBytes instead
    of recalculating it every time.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Invalidate cached
    total bytes.
(WebCore::assetTrackMetadataKeyNames): Array of AVAssetTrack properties we use.

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

7 years ago[GTK] Crash after getting web view context property with g_object_get
carlosgc@webkit.org [Tue, 22 Apr 2014 13:36:21 +0000 (13:36 +0000)]
[GTK] Crash after getting web view context property with g_object_get
https://bugs.webkit.org/show_bug.cgi?id=131983

Reviewed by Philippe Normand.

The problem is that the getter is using g_value_take_object() and
the default context is destroyed when the caller releases its ref.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewGetProperty): Use g_value_set_object() instead of
g_value_take_object().

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

7 years agoUnreviewed gardening.
rego@igalia.com [Tue, 22 Apr 2014 12:00:04 +0000 (12:00 +0000)]
Unreviewed gardening.

* TestExpectations: fast/regions/cssom/region-range-for-box-crash.html is crashing on debug mode after r167652.

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

7 years agoBuildfix after r167650 broke non-Cocoa builds
pmolnar.u-szeged@partner.samsung.com [Tue, 22 Apr 2014 11:03:04 +0000 (11:03 +0000)]
Buildfix after r167650 broke non-Cocoa builds
https://bugs.webkit.org/show_bug.cgi?id=131980

Reviewed by Mario Sanchez Prada.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent):

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