Make offset from ancestor computation explicit by moving it to the callers.
https://bugs.webkit.org/show_bug.cgi?id=134168.

Reviewed by Simon Fraser.

Explicit offset computation helps code reading and less error-prone than passing
the offset pointer and compute it locally when it is null.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::transparencyClipBox):
(WebCore::performOverlapTests):
(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestTransformedLayerInFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, GTK build fix after r170266.

* Source/cmake/OptionsGTK.cmake: Geoclue also requires gio-unix.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, GTK build fix after r170274.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
Drawing::m_webPage changed to reference.

(WebKit::DrawingAreaImpl::DrawingAreaImpl):
(WebKit::DrawingAreaImpl::setNeedsDisplay):
(WebKit::DrawingAreaImpl::setNeedsDisplayInRect):
(WebKit::DrawingAreaImpl::forceRepaint):
(WebKit::DrawingAreaImpl::updatePreferences):
(WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
(WebKit::DrawingAreaImpl::updateBackingStoreState):
(WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/DrawingAreaImpl.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=134183

Reviewed by Sam Weinig.

GraphicsContext3D has a reference to a WebGLLayer that was
hidden behind a PlatformLayer. This meant we had to cast it
to use a WebGLLayer method.

* platform/graphics/GraphicsContext3D.h: Replace RefPtr<PlatformLayer>
with RefPtr<WebGLLayer>.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::~GraphicsContext3D): No need to cast.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r170257) http/tests/navigation/javascriptlink-frames.html fails on MountainLion
https://bugs.webkit.org/show_bug.cgi?id=134182

Rebaseline for Mountain Lion.

* platform/mac-mountainlion/TestExpectations: Removed.
* platform/mac-mountainlion/http/tests/navigation/javascriptlink-frames-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make it clear to get m_svgExtensions using svgExtensions().
https://bugs.webkit.org/show_bug.cgi?id=134186.

Patch by Jeongeun Kim <je_julie.kim@samsung.com> on 2014-06-23
Reviewed by Dirk Schulze.

This patch makes sure that the purpose of code is to get m_svgExtensions
as changing accessSVGExtensions() to svgExtensions().
svgExtensions() is a getter API and accessSVGExtensions() checks
the presence of m_svgExtensions and create m_svgExtensions if it does not exist.

No new tests, no behavior change.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::removeChildren):
* dom/Document.cpp:
(WebCore::Document::commonTeardown):
(WebCore::Document::implicitClose):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::startAnimations):
(WebCore::SVGDocumentExtensions::pauseAnimations):
(WebCore::SVGDocumentExtensions::unpauseAnimations):
(WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
(WebCore::SVGDocumentExtensions::rebuildElements):
* svg/SVGDocumentExtensions.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Platform support for WebSpeech feature.
https://bugs.webkit.org/show_bug.cgi?id=116438

Reviewed by Csaba Osztrogonác.

.:
Add ENABLE_SPEECH_SYNTHESIS flag to have Speech Synthesis in EFL.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/WebCore:
It's a first step of adding support for Speech Synthesis in EFL port.
Just stub out required API and support for compilation.

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake: Added some idls to not break GTK build.
* platform/PlatformSpeechSynthesizer.h:
* platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: Added.
(WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
(WebCore::PlatformSpeechSynthesisProviderEfl::~PlatformSpeechSynthesisProviderEfl):
(WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
(WebCore::PlatformSpeechSynthesisProviderEfl::pause):
(WebCore::PlatformSpeechSynthesisProviderEfl::resume):
(WebCore::PlatformSpeechSynthesisProviderEfl::speak):
(WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
* platform/efl/PlatformSpeechSynthesisProviderEfl.h: Added.
* platform/efl/PlatformSpeechSynthesizerEfl.cpp: Added.
(WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
(WebCore::PlatformSpeechSynthesizer::pause):
(WebCore::PlatformSpeechSynthesizer::resume):
(WebCore::PlatformSpeechSynthesizer::speak):
(WebCore::PlatformSpeechSynthesizer::cancel):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Remove the WebKit1 EFL code
https://bugs.webkit.org/show_bug.cgi?id=134096

Patch by Ryuan Choi <ryuan.choi@samsung.com> on 2014-06-23
Reviewed by Gyuyoung Kim.

* PlatformEfl.cmake: Removed.
* efl: Removed entire efl directory.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Move WebKit2 test results into LayoutTests/platform/efl

Unreviewed gardening, moving files into LayoutTests/platform/efl after removing EFL WebKit1.

* platform/efl/accessibility/: Renamed from LayoutTests/platform/efl-wk2/accessibility/.
* platform/efl/compositing/: Renamed from LayoutTests/platform/efl-wk2/compositing/.
* platform/efl/editing/: Renamed from LayoutTests/platform/efl-wk2/editing/.
* platform/efl/fast/: Renamed from LayoutTests/platform/efl-wk2/fast/.
* platform/efl/http/: Renamed from LayoutTests/platform/efl-wk2/http/.
* platform/efl/ietestcenter: Renamed from LayoutTests/platform/efl-wk2/ietestcenter/.
* platform/efl/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local-expected.txt: Renamed from LayoutTests/platform/efl-wk2/inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local-expected.txt.
* platform/efl/loader/go-back-cached-main-resource-expected.txt: Renamed from LayoutTests/platform/efl-wk2/loader/go-back-cached-main-resource-expected.txt.
* platform/efl/media/video-layer-crash-expected.png: Renamed from LayoutTests/platform/efl-wk2/media/video-layer-crash-expected.png.
* platform/efl/media/video-transformed-expected.png: Renamed from LayoutTests/platform/efl-wk2/media/video-transformed-expected.png.
* platform/efl/media/video-zoom-controls-expected.png: Renamed from LayoutTests/platform/efl-wk2/media/video-zoom-controls-expected.png.
* platform/efl/media/video-zoom-expected.png: Renamed from LayoutTests/platform/efl-wk2/media/video-zoom-expected.png.
* platform/efl/plugins/npruntime/object-from-destroyed-plugin-expected.txt: Renamed from LayoutTests/platform/efl-wk2/plugins/npruntime/object-from-destroyed-plugin-expected.txt.
* platform/efl/plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt: Renamed from LayoutTests/platform/efl-wk2/plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt.
* platform/efl/svg/: Renamed from LayoutTests/platform/efl-wk2/svg/.
* platform/efl/transforms/2d/hindi-rotated-expected.png:
* platform/efl/transforms/2d/hindi-rotated-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r168046): Incorrect handling of object information in WebCore::RenderFlowThread::removeLineRegionInfo
https://bugs.webkit.org/show_bug.cgi?id=133587

Reviewed by Antti Koivisto.

When an object flowed in multicol is moved from in-flow positioning to out-of-flow positioning,
its information must be removed from the flowthread prior to the change being made.
Otherwise, the flow thread will no longer be its containing block and a reference to it
will not be possible to obtain.

No new tests can be added because the code still hits in an unrelated assertion followed by a null dereference.
The issue was discussed with Antti Koivisto and we decided its better to fix this problem first and
handle the following issue in a separate bug.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleWillChange):
* rendering/RenderObject.h:
(WebCore::RenderObject::flowThreadContainingBlock):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Move WebKit2 test results into LayoutTests/platform/efl
https://bugs.webkit.org/show_bug.cgi?id=134192

Unreviewed gardening, moving files into LayoutTests/platform/efl after removing EFL WebKit1.

* platform/efl/fast/: Renamed from LayoutTests/platform/efl-wk2/fast/.
* platform/efl/webaudio/audiobuffersource-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/audiobuffersource-expected.wav.
* platform/efl/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav.
* platform/efl/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.txt: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.txt.
* platform/efl/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.txt: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.txt.
* platform/efl/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.txt: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.txt.
* platform/efl/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav.
* platform/efl/webaudio/codec-tests/wav/24bit-44khz-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/codec-tests/wav/24bit-44khz-expected.wav.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Move WebKit2 test results into LayoutTests/platform/efl
https://bugs.webkit.org/show_bug.cgi?id=134192

Unreviewed gardening, moving files into LayoutTests/platform/efl after removing EFL WebKit1.

* platform/efl/webaudio/audiobuffersource-loop-points-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/audiobuffersource-loop-points-expected.wav.
* platform/efl/webaudio/audiobuffersource-multi-channels-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/audiobuffersource-multi-channels-expected.wav.
* platform/efl/webaudio/audiobuffersource-playbackrate-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/audiobuffersource-playbackrate-expected.wav.
* platform/efl/webaudio/gain-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/gain-expected.wav.
* platform/efl/webaudio/mixing-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/mixing-expected.wav.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Move WebKit2 test results into LayoutTests/platform/efl
https://bugs.webkit.org/show_bug.cgi?id=134192

Unreviewed gardening, moving files into LayoutTests/platform/efl after removing EFL WebKit1.

* platform/efl/webaudio/oscillator-custom-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/oscillator-custom-expected.wav.
* platform/efl/webaudio/oscillator-sawtooth-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/oscillator-sawtooth-expected.wav.
* platform/efl/webaudio/oscillator-sine-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/oscillator-sine-expected.wav.
* platform/efl/webaudio/oscillator-square-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/oscillator-square-expected.wav.
* platform/efl/webaudio/oscillator-triangle-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/oscillator-triangle-expected.wav.
* platform/efl/webaudio/up-mixing-mono-51-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/up-mixing-mono-51-expected.wav.
* platform/efl/webaudio/up-mixing-mono-stereo-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/up-mixing-mono-stereo-expected.wav.
* platform/efl/webaudio/up-mixing-stereo-51-expected.wav: Renamed from LayoutTests/platform/efl-wk2/webaudio/up-mixing-stereo-51-expected.wav.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Fix video in WebGL.
https://bugs.webkit.org/show_bug.cgi?id=133511

Reviewed by Jer Noble.

* WebCore.exp.in:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
(WebCore::wkAVAssetResolvedURL): Deleted.
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Declare and use resolvedURL on AVURLAsset instead of using wkAVAssetResolvedURL through WebKitSystemInterface.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r160908): Unable to unset bold while entering text
https://bugs.webkit.org/show_bug.cgi?id=134196
<rdar://problem/17051653>

Reviewed by Andreas Kling.
        
No test, this code path is used by some WK1 API clients only.

* editing/Editor.cpp:
(WebCore::Editor::styleForSelectionStart):
        
    This needs to update the style before requesting the renderer.

* editing/Editor.h:
* editing/ios/EditorIOS.mm:
(WebCore::styleForSelectionStart): Deleted.
* editing/mac/EditorMac.mm:
(WebCore::styleForSelectionStart): Deleted.
        
    Removed the duplicated functions, moved to Editor.cpp.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused FrameView::setUseCustomFixedPositionLayoutRect().
<https://webkit.org/b/134194>

Reviewed by Anders Carlsson.

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Deleted.
* page/FrameView.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Give read-only properties proper ownership attributes
https://bugs.webkit.org/show_bug.cgi?id=134197
<rdar://problem/16830117>

Reviewed by Dan Bernstein.

Also, make WKFrameInfo conform to NSCopying since it's a data-only object and thus intended to be copied.

* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo copyWithZone:]):
(-[WKFrameInfo setRequest:]): Deleted.
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction setSourceFrame:]):
(-[WKNavigationAction setTargetFrame:]):
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKUserScript.h:
* UIProcess/API/Cocoa/WKWebView.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More build fixing after r170295.

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Uncaught exception crash when destroying MediaPlayerPrivateAVFoundationObjC
https://bugs.webkit.org/show_bug.cgi?id=134198

Reviewed by Eric Carlson.

Now that we always create an AVPlayerLayer when creating an AVPlayer, but we don't
return that layer from platformLayer() unless we've been asked to, we no longer are
asked to destroy our video layer from MediaPlayerPrivateAVFoundation::tearDownVideoRendering().

Instead, explicitly destroy our video layer (and remove the KVO-observer which is
causing this exception) in the MediaPlayerPrivateAVFoundationObjC destructor.

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

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