blob: 3a59c5f13a75976692bc209e673bd23268b84975 [file] [log] [blame]
2014-03-06 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[WebRTC] Updating RTCPeerConnection.idl
https://bugs.webkit.org/show_bug.cgi?id=129804
Reviewed by Eric Carlson.
Some methods signatures were wrong, marking some arguments as optional when they are mandatory.
Existing tests were updated.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::getStats):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::create):
(WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
(WebCore::RTCStatsRequestImpl::requestFailed):
* Modules/mediastream/RTCStatsRequestImpl.h:
* platform/mediastream/RTCStatsRequest.h:
2014-03-06 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[WebRTC] Updating RTCIceServer to match spec
https://bugs.webkit.org/show_bug.cgi?id=129844
Reviewed by Eric Carlson.
Move RTCIceServer from RTCConfiguration to its own file.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::validateIceServerURL):
(WebCore::processIceServer):
* platform/mediastream/RTCConfiguration.h:
(WebCore::RTCConfiguration::iceServers):
* platform/mediastream/RTCIceServer.h: Added.
2014-03-06 Hyowon Kim <hw1008.kim@samsung.com>
[EFL] Move EvasGL classes from WebKit to WebCore namespace.
https://bugs.webkit.org/show_bug.cgi?id=129797
Reviewed by Gyuyoung Kim.
Though EvasGLContext and EvasGLSurface files were moved from WebKit2/UIProcess/API/efl/
to WebCore/platform/graphics/efl/, they are still in WebKit namespace.
Patch for namespace changes.
* platform/graphics/efl/EvasGLContext.cpp:
* platform/graphics/efl/EvasGLContext.h:
* platform/graphics/efl/EvasGLSurface.cpp:
* platform/graphics/efl/EvasGLSurface.h:
2014-03-06 Brian Burg <bburg@apple.com>
CodeGeneratorJS.pm doesn't need to add spaces between consecutive closing template brackets
https://bugs.webkit.org/show_bug.cgi?id=129836
Reviewed by Andreas Kling.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
(GetNativeVectorInnerType):
(GetSVGPropertyTypes):
2014-03-06 Jinwoo Song <jinwoo7.song@samsung.com>
Remove unused method from BatteryController
https://bugs.webkit.org/show_bug.cgi?id=129850
Reviewed by Gyuyoung Kim.
isActive() method is never called anywhere.
* Modules/battery/BatteryController.cpp:
* Modules/battery/BatteryController.h:
2014-03-06 Pratik Solanki <psolanki@apple.com>
[iOS] Crash on launch with website restrictions enabled
https://bugs.webkit.org/show_bug.cgi?id=129854
<rdar://problem/16207016>
Reviewed by Simon Fraser.
* platform/mac/ContentFilterMac.mm:
(WebCore::ContentFilter::ContentFilter): Initialize m_neFilterSourceQueue so that we don't
crash in the dtor due to garbage value in the field.
2014-03-06 Simon Fraser <simon.fraser@apple.com>
Minor optimization in ScrollingTreeScrollingNodeMac
https://bugs.webkit.org/show_bug.cgi?id=129848
Reviewed by Dean Jackson.
No need to call scrollOffsetForFixedPosition() again if we don't have header
and footer layers.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2014-03-06 Mark Lam <mark.lam@apple.com>
XMLHttpRequest: status and statusText throw DOM Exception 11 when the state is UNSENT or OPENED.
https://bugs.webkit.org/show_bug.cgi?id=45994
Not reviewed.
Re-landing r161051 (originally by Ryosuke Niwa, reviewed by Alexey Proskuryakov)
since https://bugs.webkit.org/show_bug.cgi?id=126219 is no longer an issue.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::status):
(WebCore::XMLHttpRequest::statusText):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequest.idl:
2014-03-06 Brent Fulgham <bfulgham@apple.com>
Revise Out-of-band VTT support for better integration with AVFoundation engine
https://bugs.webkit.org/show_bug.cgi?id=129749
<rdar://problem/16215701>
Reviewed by Eric Carlson.
Revise the platform handling of out-of-band text tracks so that we can keep AVFoundation
informed of track selections we make. Use a dummy out-of-band child of the existing text
track classes to avoid code duplication.
* WebCore.xcodeproj/project.pbxproj: Add new OutOfBandTextTrackPrivateAVF.h file.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Notify player when OOB tracks change.
(WebCore::HTMLMediaElement::outOfBandTrackSources): Also pass track mode to platform backend.
* html/track/TextTrack.cpp:
(WebCore::TextTrack::platformTextTrack): Also pass track mode to constructor.
* html/track/TrackBase.cpp:
(WebCore::TrackBase::TrackBase): Move ownership of track unique identifier to this base class.
* html/track/TrackBase.h:
(WebCore::TrackBase::uniqueId): Ditto.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::notifyTrackModeChanged): Added stub to pass message to platform player.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::notifyTrackModeChanged): Stub for most platforms.
* platform/graphics/PlatformTextTrack.h:
(WebCore::PlatformTextTrack::create): Update for revised constructor (with 'mode' argument).
(WebCore::PlatformTextTrack::createOutOfBand): Ditto.
(WebCore::PlatformTextTrack::mode): Added.
(WebCore::PlatformTextTrack::captionMenuOffItem): Use revised constructor arguments.
(WebCore::PlatformTextTrack::captionMenuAutomaticItem): Ditto.
(WebCore::PlatformTextTrack::PlatformTextTrack): Ditto.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Change predicate to return enum indicating the category
of track (out-of-band, legacy closed caption, or in band).
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::notifyTrackModeChanged): Added.
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h: Override predicate to return category enum.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Revise to use new category enum.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h: Override predicate to return category enum.
that this is NOT an out-of-band track.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::notifyTrackModeChanged): Added implementation.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): Revise to handle out-of-band
track placeholders.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Modify to inform AVFoundation about any
out-of-band tracks we've selected.
(WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState): Added.
* platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h: Added.
(WebCore::OutOfBandTextTrackPrivateAVF::create):
(WebCore::OutOfBandTextTrackPrivateAVF::processCue):
(WebCore::OutOfBandTextTrackPrivateAVF::resetCueValues):
(WebCore::OutOfBandTextTrackPrivateAVF::mediaSelectionOption):
(WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
(WebCore::OutOfBandTextTrackPrivateAVF::processCueAttributes):
* platform/graphics/ios/InbandTextTrackPrivateAVFIOS.h: Override predicate to indicate
that this is NOT an out-of-band track.
* platform/graphics/ios/MediaPlayerPrivateIOS.mm:
(WebCore::MediaPlayerPrivateIOS::setSelectedTextTrack): Correct typo in logging text.
2014-03-06 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[WebRTC] Updating createOffer and createAnswer methods to match WebRTC editor's draft of 01/27/2014
https://bugs.webkit.org/show_bug.cgi?id=129484
Reviewed by Eric Carlson.
According to the spec, createOffer and createAnswer will no longer have MediaConstraints as an argument,
instead they will have RTCOfferOptions and RTCOfferAnswerOptions, respectively.
Existing tests were updated.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/RTCOfferAnswerOptions.cpp: Added.
* Modules/mediastream/RTCOfferAnswerOptions.h: Added.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createOffer):
(WebCore::RTCPeerConnection::createAnswer):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* platform/mediastream/RTCPeerConnectionHandler.h:
* platform/mock/RTCPeerConnectionHandlerMock.cpp:
(WebCore::RTCPeerConnectionHandlerMock::createOffer):
(WebCore::RTCPeerConnectionHandlerMock::createAnswer):
* platform/mock/RTCPeerConnectionHandlerMock.h:
2014-03-06 Brian Burg <bburg@apple.com>
Web Replay: premature release() of PassRefPtr in InspectorReplayAgent
https://bugs.webkit.org/show_bug.cgi?id=129827
Reviewed by Timothy Hatcher.
* inspector/InspectorReplayAgent.cpp:
(WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
2014-03-06 Benjamin Poulain <bpoulain@apple.com>
[iOS] Do not compile fake mouse event handling when iOS Touch Events are enabled
https://bugs.webkit.org/show_bug.cgi?id=129725
Reviewed by Dan Bernstein.
Bug <rdar://problem/16218636>. The code is #ifdef'ed out to avoid setting up useless objects
and to avoid future mistake.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::~EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::startAutoHideCursorTimer):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
(WebCore::EventHandler::dispatchFakeMouseMoveEventSoonInQuad):
* page/EventHandler.h:
2014-03-06 Pratik Solanki <psolanki@apple.com>
Unreviewed. iOS build fix after r165199.
* rendering/RootInlineBox.cpp:
2014-03-06 Benjamin Poulain <bpoulain@apple.com>
[iOS] Rename the actualVisibleXXXRect to unobscuredContentRect for consistency
https://bugs.webkit.org/show_bug.cgi?id=129773
Reviewed by Simon Fraser.
* dom/TreeScope.cpp:
(WebCore::nodeFromPoint):
* platform/ScrollView.cpp:
(WebCore::ScrollView::visibleContentRectInternal):
* platform/ScrollView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::unoscuredContentRect):
* platform/ios/wak/WAKScrollView.h:
* platform/ios/wak/WAKScrollView.mm:
(-[WAKScrollView unoscuredContentRect]):
(-[WAKScrollView description]):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
2014-03-05 Oliver Hunt <oliver@apple.com>
Support caching of custom setters
https://bugs.webkit.org/show_bug.cgi?id=129519
Reviewed by Filip Pizlo.
Add forwarding header
Tests: js/regress/assign-custom-setter-polymorphic.html
js/regress/assign-custom-setter.html
* ForwardingHeaders/jit/SpillRegistersMode.h: Added.
2014-03-05 Jon Honeycutt <jhoneycutt@apple.com>
Invalid cast in WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients()
<https://bugs.webkit.org/show_bug.cgi?id=121887>
<rdar://problem/15073043>
Clang appears to be optimizing out a branch in RenderObject::node()
when compiling RenderLayer::FilterInfo::updateReferenceFilterClients().
We'll work around this by factoring out the code in question into a
separate member function marked NEVER_INLINE.
No test possible due to <https://bugs.webkit.org/show_bug.cgi?id=129757>.
Reviewed by David Kilzer.
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::layerElement):
Code moved from updateReferenceFilterClients(). Returns the Element*
for m_layer.
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
Use layerElement().
* rendering/RenderLayerFilterInfo.h:
Declared layerElement().
2014-03-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Expose the console object in JSContexts to interact with Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=127944
Reviewed by Geoffrey Garen.
Covered by existing tests.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* ForwardingHeaders/runtime/ConsoleClient.h: Added.
* ForwardingHeaders/runtime/ConsoleTypes.h: Renamed from Source/WebCore/ForwardingHeaders/inspector/ConsoleTypes.h.
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am:
Update build systems.
* page/Console.cpp: Removed.
* page/Console.h: Removed.
* page/Console.idl: Removed.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::resetDOMWindowProperties):
* page/DOMWindow.h:
(WebCore::DOMWindow::defaultStatus):
* page/DOMWindow.idl:
Removed the old IDL generated Console object on window.
* page/PageConsole.cpp:
(WebCore::PageConsole::shouldPrintExceptions):
(WebCore::PageConsole::setShouldPrintExceptions):
(WebCore::PageConsole::mute):
(WebCore::PageConsole::unmute):
(WebCore::PageConsole::messageWithTypeAndLevel):
(WebCore::PageConsole::count):
(WebCore::PageConsole::profile):
(WebCore::PageConsole::profileEnd):
(WebCore::PageConsole::time):
(WebCore::PageConsole::timeEnd):
(WebCore::PageConsole::timeStamp):
(WebCore::PageConsole::group):
(WebCore::PageConsole::groupCollapsed):
(WebCore::PageConsole::groupEnd):
(WebCore::PageConsole::clearProfiles):
* page/PageConsole.h:
Move the handling of Console object into PageConsole.
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::clearWindowShell):
(WebCore::ScriptController::initScript):
Set the PageConsole as the ConsoleClient of the JSGlobalObject
so that WebCore may handle console messages directly. For instance
it may pass messages on to the ChromeClient.
* testing/Internals.cpp:
(WebCore::Internals::consoleProfiles):
To access profiles, go through PageConsole now instead of Console.
* bindings/js/JSDOMWindowBase.cpp:
* bindings/objc/WebScriptObject.mm:
* css/MediaList.cpp:
* dom/ScriptExecutionContext.h:
* dom/UIEvent.cpp:
* dom/ViewportArguments.cpp:
* html/parser/XSSAuditorDelegate.cpp:
* inspector/CommandLineAPIHost.h:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/InspectorProfilerAgent.cpp:
* inspector/WebConsoleAgent.cpp:
* loader/FrameLoader.cpp:
* loader/MixedContentChecker.cpp:
* loader/appcache/ApplicationCacheGroup.cpp:
* loader/cache/CachedResourceLoader.cpp:
* page/ChromeClient.h:
* page/ContentSecurityPolicy.cpp:
* page/Page.cpp:
* page/Page.h:
* svg/SVGDocumentExtensions.cpp:
* workers/WorkerMessagingProxy.cpp:
* workers/WorkerReportingProxy.h:
Update includes.
2014-03-06 Zsolt Borbely <borbezs@inf.u-szeged.hu>
Fix the !ENABLE(CSS_STICKY_POSITION) build
https://bugs.webkit.org/show_bug.cgi?id=129793
Reviewed by Simon Fraser.
Add missing ENABLE(CSS_STICKY_POSITION) guard to EditingStyle::convertPositionStyle().
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::convertPositionStyle):
2014-03-06 Joseph Pecoraro <pecoraro@apple.com>
[Mac] Leak: dispatch_semaphore leak allocated in MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange
https://bugs.webkit.org/show_bug.cgi?id=129792
Reviewed by Anders Carlsson.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
2014-03-06 Brendan Long <b.long@cablelabs.com>
Implement VideoTrackList.selectedIndex
https://bugs.webkit.org/show_bug.cgi?id=129770
Reviewed by Eric Carlson.
Tests: media/track/video/video-track-mkv-theora-selected.html
* html/track/VideoTrackList.idl:
2014-03-06 Lorenzo Tilve <ltilve@igalia.com>
[GTK][CMake] Fix the GTK+ CMake build
https://bugs.webkit.org/show_bug.cgi?id=129801
Reviewed by Martin Robinson.
Include missing files for CMake build
* CMakeLists.txt: Add a missing references to DOMURLMediaStream
2014-03-06 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Setting content to opaque on m_graphicsLayer depends on subpixel accumulation.
https://bugs.webkit.org/show_bug.cgi?id=129776
Reviewed by Simon Fraser.
isEmpty() returns true when any of the dimensions is <= 0. Subpixel accumulation could happen
in one direction only. Use isZero() instead().
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2014-03-06 Gurpreet Kaur <k.gurpreet@samsung.com>
REGRESSION (r158254): Rubber-banding at Bing image search causes the toolbar to move up and away
https://bugs.webkit.org/show_bug.cgi?id=128873
Reviewed by Antonio Gomes.
This regression is caused by http://trac.webkit.org/changeset/154614
and http://trac.webkit.org/changeset/156605. So reverting the changes
to make it Web compatible as earlier.
* dom/Element.cpp:
(WebCore::Element::scrollLeft):
(WebCore::Element::scrollTop):
(WebCore::Element::setScrollLeft):
(WebCore::Element::setScrollTop):
Reverting changes as it caused regression.
2014-03-06 Zan Dobersek <zdobersek@igalia.com>
Move Source/WebCore/html/canvas/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129668
Reviewed by Anders Carlsson.
Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/html/canvas/ to std::unique_ptr.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::~HTMLCanvasElement):
(WebCore::HTMLCanvasElement::getContext):
* html/HTMLCanvasElement.h:
* html/canvas/ANGLEInstancedArrays.cpp:
* html/canvas/ANGLEInstancedArrays.h:
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/EXTTextureFilterAnisotropic.cpp:
* html/canvas/EXTTextureFilterAnisotropic.h:
* html/canvas/OESElementIndexUint.cpp:
* html/canvas/OESElementIndexUint.h:
* html/canvas/OESStandardDerivatives.cpp:
* html/canvas/OESStandardDerivatives.h:
* html/canvas/OESTextureFloat.cpp:
* html/canvas/OESTextureFloat.h:
* html/canvas/OESTextureFloatLinear.cpp:
* html/canvas/OESTextureFloatLinear.h:
* html/canvas/OESTextureHalfFloat.cpp:
* html/canvas/OESTextureHalfFloat.h:
* html/canvas/OESTextureHalfFloatLinear.cpp:
* html/canvas/OESTextureHalfFloatLinear.h:
* html/canvas/OESVertexArrayObject.cpp:
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGLCompressedTextureATC.cpp:
* html/canvas/WebGLCompressedTextureATC.h:
* html/canvas/WebGLCompressedTexturePVRTC.cpp:
* html/canvas/WebGLCompressedTexturePVRTC.h:
* html/canvas/WebGLCompressedTextureS3TC.cpp:
* html/canvas/WebGLCompressedTextureS3TC.h:
* html/canvas/WebGLDebugRendererInfo.cpp:
* html/canvas/WebGLDebugRendererInfo.h:
* html/canvas/WebGLDebugShaders.cpp:
* html/canvas/WebGLDebugShaders.h:
* html/canvas/WebGLDepthTexture.cpp:
* html/canvas/WebGLDepthTexture.h:
* html/canvas/WebGLDrawBuffers.cpp:
* html/canvas/WebGLDrawBuffers.h:
* html/canvas/WebGLLoseContext.cpp:
* html/canvas/WebGLLoseContext.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
(WebCore::WebGLRenderingContext::getExtension):
* html/canvas/WebGLRenderingContext.h:
2014-03-06 Zan Dobersek <zdobersek@igalia.com>
Move Source/WebCore/editing/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129665
Reviewed by Anders Carlsson.
Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/editing/ with std::unique_ptr.
* editing/EditingStyle.cpp:
(WebCore::htmlElementEquivalents):
(WebCore::EditingStyle::conflictsWithImplicitStyleOfElement):
(WebCore::htmlAttributeEquivalents):
(WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
(WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
(WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
* editing/Editor.cpp:
(WebCore::Editor::Editor):
(WebCore::Editor::clear):
* editing/Editor.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/Frame.h:
2014-03-06 Zan Dobersek <zdobersek@igalia.com>
Move to using std::unique_ptr for KeyboardEvent, ScriptExecutionContext::PendingException
https://bugs.webkit.org/show_bug.cgi?id=129061
Reviewed by Eric Carlson.
Replace uses of OwnPtr and PassOwnPtr for KeyboardEvent and ScriptExecutionContext::PendingException
classes with std::unique_ptr. ScriptExecutionContext::Task objects are still handled through OwnPtr,
but this will be addressed later.
* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEvent::KeyboardEvent):
* dom/KeyboardEvent.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::reportException):
* dom/ScriptExecutionContext.h:
* dom/ScriptRunner.h: Remove an unnecessary PassOwnPtr header inclusion.
2014-03-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r165175.
http://trac.webkit.org/changeset/165175
https://bugs.webkit.org/show_bug.cgi?id=129788
Linking failures on GTK, EFL due to missing gstreamer-tag-1.0
dependency (Requested by zdobersek on #webkit).
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
2014-03-05 Brendan Long <b.long@cablelabs.com>
[GStreamer] human readable language code for tracks
https://bugs.webkit.org/show_bug.cgi?id=124514
Reviewed by Philippe Normand.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Run language codes though gst_tag_get_language_code_iso_639_1() to make sure they're valid.
2014-03-05 Ryuan Choi <ryuan.choi@samsung.com>
Remove unused method from Vibration
https://bugs.webkit.org/show_bug.cgi?id=129732
Reviewed by Gyuyoung Kim.
* Modules/vibration/Vibration.cpp:
Removed isActive(), which is never called since r152441.
* Modules/vibration/Vibration.h: Ditto.
2014-03-05 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r165141, r165157, and r165158.
http://trac.webkit.org/changeset/165141
http://trac.webkit.org/changeset/165157
http://trac.webkit.org/changeset/165158
https://bugs.webkit.org/show_bug.cgi?id=129772
"broke ftl" (Requested by olliej_ on #webkit).
* ForwardingHeaders/jit/SpillRegistersMode.h: Removed.
2014-03-05 Martin Robinson <mrobinson@igalia.com>
[GTK][CMake] The GObject DOM bindings should always be built
https://bugs.webkit.org/show_bug.cgi?id=127963
Reviewed by Ryosuke Niwa.
* PlatformGTK.cmake: Make compilation of the WebKitGTK+ GObject DOM bindings
unconditional, instead of conditional on the WebKit2 build.
2014-03-05 Jer Noble <jer.noble@apple.com>
[MSE] Crash in SourceBuffer::sourceBufferPrivateDidReceiveSample() - received samples after SourceBuffer was removed.
https://bugs.webkit.org/show_bug.cgi?id=129761
Reviewed by Eric Carlson.
Guard against the possibility that SourceBufferPrivates will continue to generate samples even after
a parse error. Bail out early from sourceBufferPrivateDidReceiveInitializationSegment and
sourceBufferPrivateDidReceiveSample if the SourceBuffer has been removed.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2014-03-05 Enrica Casucci <enrica@apple.com>
Build fix, take 2.
* platform/mac/HTMLConverter.mm:
2014-03-05 Enrica Casucci <enrica@apple.com>
Build fix.
* platform/mac/HTMLConverter.mm:
2014-03-05 Enrica Casucci <enrica@apple.com>
Crash when copying content that contains <sup>.
https://bugs.webkit.org/show_bug.cgi?id=129765
<rdar://problem/16139498>
Reviewed by Benjamin Poulain.
Adding static definition of NSAttributeSuperscriptName.
* platform/mac/HTMLConverter.mm:
2014-03-05 Gavin Barraclough <barraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=128625
Add fast mapping from StringImpl to JSString
Unreviewed roll-out.
Reverting r164347, r165054, r165066 - not clear the performance tradeoff was right.
* bindings/js/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::clearWrappers):
* bindings/js/DOMWrapperWorld.h:
* bindings/js/JSDOMBinding.h:
(WebCore::jsStringWithCache):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
* bindings/scripts/StaticString.pm:
(GenerateStrings):
2014-03-05 Daniel Bates <dabates@apple.com>
And Alexey Proskuryakov <ap@apple.com>
ASSERT(newestManifest) fails in WebCore::ApplicationCacheGroup::didFinishLoadingManifest()
https://bugs.webkit.org/show_bug.cgi?id=129753
<rdar://problem/12069835>
Reviewed by Alexey Proskuryakov.
Fixes an issue where an assertion failure would occur when visiting a web site whose on-disk
app cache doesn't contain a manifest resource.
For some reason an app cache for a web site may be partially written to disk. In particular, the
app cache may only contain a CacheGroups entry. That is, the manifest resource and origin records
may not be persisted to disk. From looking over the code, we're unclear how such a situation can occur
and hence have been unable to create such an app cache. We were able to reproduce this issue using
an app cache database file that was provided by a person that was affected by this issue.
No test included because it's not straightforward to write a test for this change.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Assert that m_cacheBeingUpdated->manifestResource()
is non-null. Currently we only document this assumption in a code comment. Also separated a single assertion
expression into two assertion expressions to make it straightforward to identify the failing sub-expression
on failure.
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::store): Modified to call ApplicationCacheStorage::deleteCacheGroupRecord()
to remove a cache group and associated cache records (if applicable) before inserting a cache group entry.
This replacement approach will ultimately repair incomplete app cache data for people affected by this bug.
(WebCore::ApplicationCacheStorage::loadCache): Log an error and return nullptr if the cache we loaded doesn't
have a manifest resource.
(WebCore::ApplicationCacheStorage::deleteCacheGroupRecord): Added.
(WebCore::ApplicationCacheStorage::deleteCacheGroup): Extracted deletion logic for cache group record into
ApplicationCacheStorage::deleteCacheGroupRecord().
* loader/appcache/ApplicationCacheStorage.h:
2014-03-05 Oliver Hunt <oliver@apple.com>
Support caching of custom setters
https://bugs.webkit.org/show_bug.cgi?id=129519
Reviewed by Filip Pizlo.
Add forwarding header
Tests: js/regress/assign-custom-setter-polymorphic.html
js/regress/assign-custom-setter.html
* ForwardingHeaders/jit/SpillRegistersMode.h: Added.
2014-03-05 David Kilzer <ddkilzer@apple.com>
Fix crash in CompositeEditCommand::cloneParagraphUnderNewElement()
<http://webkit.org/b/129751>
<rdar://problem/16237965>
Reviewed by Jon Honeycutt.
Merged from Blink (patch by Yuta Kitamura):
https://src.chromium.org/viewvc/blink?revision=168160&view=revision
http://crbug.com/345005
The root cause is CompositeEditCommand::moveParagraphWithClones() passing
two positions |start| and |end| which do not follow the document order,
i.e. in some situations |start| is located after |end| because of
the difference in affinity.
This patch fixes this crash by normalizing |end| to |start| in such situations.
It also adds an ASSERT that checks the relationship between |start| and |end|.
Test: editing/execCommand/format-block-crash.html
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
(WebCore::CompositeEditCommand::moveParagraphWithClones):
* editing/CompositeEditCommand.h:
2014-03-05 Radu Stavila <stavila@adobe.com>
[CSS Regions] Scrollable regions
https://bugs.webkit.org/show_bug.cgi?id=129301
Reviewed by David Hyatt.
Named flow fragments do not inherit the overflow property from the fragment container.
When asked if the flow thread content should be clipped, the named flow fragments
will respond using the overflow property of the named flow fragment container.
When painting the flow thread layer inside the region, the scrolled content offset of
the region must be used to offset the flow thread's layer.
Tests: fast/regions/scrollable-last-region.html
fast/regions/scrollable-single-region-bt.html
fast/regions/scrollable-single-region-lr.html
fast/regions/scrollable-single-region-relative-element.html
fast/regions/scrollable-single-region-rl.html
fast/regions/scrollable-single-region.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::createStyle):
(WebCore::RenderNamedFlowFragment::shouldClipFlowThreadContent):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::shouldClipFlowThreadContent):
* rendering/RenderRegion.h:
2014-03-05 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Device pixel round accumulated subpixel value when the RenderLayer with transform paints its content.
https://bugs.webkit.org/show_bug.cgi?id=129079
Reviewed by Simon Fraser.
Snap the content to the device pixel position (as opposed to integral position) before
applying the transform. Recalculate the remaining subpixels that need offsetting at painting time.
Test: compositing/hidpi-absolute-subpixel-positioned-transformed-elements.html
* platform/graphics/LayoutPoint.h:
(WebCore::roundedForPainting):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerByApplyingTransform):
2014-03-05 Eric Carlson <eric.carlson@apple.com>
[iOS] Show external device name/type in placeholder
https://bugs.webkit.org/show_bug.cgi?id=129723
Reviewed by Jer Noble.
Make the name and type of the external device available to the JS based controls.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::externalDeviceDisplayName):
(WebCore::MediaControlsHost::externalDeviceType):
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updateWirelessPlaybackStatus): Display device type-specific infomation
in the placeholder image.
* WebCore.exp.in: Export new WebKitSystemInterface functions.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::wirelessPlaybackTargetName): Added.
(WebCore::MediaPlayer::wirelessPlaybackTargetType): Ditto.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetName): Ditto.
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2014-03-05 Benjamin Poulain <bpoulain@apple.com>
[iOS] Rename the various VisibleExtent variations to exposedContentRect
https://bugs.webkit.org/show_bug.cgi?id=129728
Reviewed by Simon Fraser.
Rename DocumentVisibleExtent and VisibleExtentContentRect to ExposedContentRect in a desperate
attempt to make things a tiny little bit less confusing.
The name is ExposedContentRect and not ExposedRect as that rect is exposed on ScrollView, while the
rect is in document coordinates (which does not make any difference on WebKit1...).
* WebCore.exp.in:
* platform/ScrollView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::exposedContentRect):
(WebCore::ScrollView::setExposedContentRect):
* platform/ios/wak/WAKScrollView.h:
* platform/ios/wak/WAKScrollView.mm:
(-[WAKScrollView exposedContentRect]):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::didChangeVisibleRect):
2014-03-05 Simon Fraser <simon.fraser@apple.com>
ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
https://bugs.webkit.org/show_bug.cgi?id=129752
Reviewed by Enrica Casucci.
Add C functions for NSURL-related functionality required by WebKit2
* WebCore.exp.in:
* platform/mac/WebCoreNSURLExtras.h:
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::URLByCanonicalizingURL):
(WebCore::rangeOfURLScheme):
(WebCore::looksLikeAbsoluteURL):
2014-03-05 Martin Hock <mhock@apple.com>
Add support for sessions to MemoryCache.
https://bugs.webkit.org/show_bug.cgi?id=127794
Reviewed by Sam Weinig.
* WebCore.exp.in:
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI): Initialize CachedImage with sessionID.
* html/DOMURL.cpp:
(WebCore::DOMURL::revokeObjectURL): Remove URL from MemoryCache for all sessions.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource): Pass sessionID to MemoryCache.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR): Ditto.
* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable): Ditto.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Ditto.
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement): Initialize CachedImage with sessionID.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Pass sessionID to MemoryCache.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Constructor takes sessionID.
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp: Ditto.
(WebCore::CachedFont::CachedFont):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp: Ditto.
(WebCore::CachedImage::CachedImage):
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp: Ditto.
(WebCore::CachedRawResource::CachedRawResource):
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp: Ditto.
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::~CachedResource): Pass sessionID to MemoryCache.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::sessionID):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource): Constructors take sessionID.
(WebCore::CachedResourceLoader::sessionID): Retrieve sessionID from page.
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Pass sessionID to MemoryCache.
(WebCore::CachedResourceLoader::requestResource): Initialize CachedCSSStyleSheet with sessionID.
(WebCore::CachedResourceLoader::revalidateResource): Initialize cached resource with sessionID.
(WebCore::CachedResourceLoader::loadResource): Pass sessionID to MemoryCache and initialize cached resource with sessionID.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGDocument.cpp: Constructor takes sessionID.
(WebCore::CachedSVGDocument::CachedSVGDocument):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.cpp: Ditto.
(WebCore::CachedScript::CachedScript):
* loader/cache/CachedScript.h:
* loader/cache/CachedTextTrack.cpp: Ditto.
(WebCore::CachedTextTrack::CachedTextTrack):
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.cpp: Ditto.
(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
* loader/cache/CachedXSLStyleSheet.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getSessionMap): Retrieve CachedResourceMap based on sessionID.
(WebCore::MemoryCache::add): Use sessionID from CachedResource parameter.
(WebCore::MemoryCache::revalidationSucceeded): Add sessionID parameter.
(WebCore::MemoryCache::resourceForURL): Ditto.
(WebCore::MemoryCache::resourceForRequest): Ditto, also move impl into impl method.
(WebCore::MemoryCache::resourceForRequestImpl): Add CachedResourceMap parameter.
(WebCore::MemoryCache::addImageToCache): Use default sessionID.
(WebCore::MemoryCache::removeImageFromCache): Ditto.
(WebCore::MemoryCache::evict): Use sessionID from CachedResource parameter.
(WebCore::MemoryCache::removeResourcesWithOrigin): Iterate through all CachedResourceMaps.
(WebCore::MemoryCache::getOriginsWithCache): Ditto.
(WebCore::MemoryCache::removeUrlFromCache): Add sessionID parameter.
(WebCore::MemoryCache::removeRequestFromCache): Ditto.
(WebCore::MemoryCache::removeRequestFromSessionCaches): Remove request from all CachedResourceMaps, with multithread support.
(WebCore::MemoryCache::removeRequestFromCacheImpl): Add sessionID parameter.
(WebCore::MemoryCache::removeRequestFromSessionCachesImpl): Iterate through all CachedResourceMaps.
(WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Add sessionID parameter.
(WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches): Pass on request to removeRequestFromSessionCachesImpl.
(WebCore::MemoryCache::getStatistics): Iterate through all CachedResourceMaps.
(WebCore::MemoryCache::setDisabled): Ditto.
* loader/cache/MemoryCache.h: Create another level for cache.
* platform/CrossThreadCopier.cpp: Allow copying SessionIDs across threads.
(WebCore::SessionID>::copy):
* platform/CrossThreadCopier.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest): Remove trailing whitespace.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::updateSnapshot): Initialize CachedImage with sessionID.
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache): Pass sessionID to MemoryCache.
2014-03-03 Martin Robinson <mrobinson@igalia.com>
[GTK][CMake] Generate documentation for the DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=126211
Reviewed by Carlos Garcia Campos.
* PlatformGTK.cmake: Add some files to the GObjectDOMBindings build, so that the
doc generation succeeds. Have the GObjectDOMBindings_INSTALLED_HEADERS variable contain
all installed headers and use another variable for GIR generation. Create the configuration
file for the gtkdoc generation.
2014-03-05 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Wrong cliprect on absolute positioned elements.
https://bugs.webkit.org/show_bug.cgi?id=129656
Reviewed by Simon Fraser.
outlineBoundsForRepaint() is expected to return the outline repaint rect. Using enclosingIntRect()
to calculate the outline boundaries breaks repaint logic in RenderElement::repaintAfterLayoutIfNeeded().
Since enclosingIntRect() can return bigger rect than repaint rect, the old/new bounds' dimensions could end up
being different which triggers the size change repaint code path.
Test: fast/repaint/hidpi-absolute-positioned-element-wrong-cliprect-after-move.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::outlineBoundsForRepaint):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::repaintAfterLayoutIfNeeded):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
2014-03-05 Krzysztof Czech <k.czech@samsung.com>
[ATK] Expose missing functionalities of AtkTableCell to AT.
https://bugs.webkit.org/show_bug.cgi?id=129492
Reviewed by Mario Sanchez Prada.
Implemented missing API of AtkTableCell.
No new tests. Covered by existing ones.
* accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
(webkitAccessibleTableCellGetColumnSpan):
(webkitAccessibleTableCellGetRowSpan):
(webkitAccessibleTableCellGetPosition):
(webkitAccessibleTableCellGetTable):
(webkitAccessibleTableCellInterfaceInit):
2014-03-05 Andres Gomez <agomez@igalia.com>
[GStreamer] WebSource doesn't need the "iradio-mode" property
https://bugs.webkit.org/show_bug.cgi?id=129685
Reviewed by Philippe Normand.
Removed the "iradio-mode" property from the WK source element
since this was only available for its modification from
playbin/uridecodebin and, as discussed in GStreamer bug #725383,
it was not being set and now is going to be removed.
It is safe just to send always the "icy-metadata" header set and
deal with returning "icy" headers as we were already doing.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(webKitWebSrcStart):
2014-03-05 Chang Shu <cshu@webkit.org>
Copying wrapping text results in multiple spaces between wrapped lines stripped.
https://bugs.webkit.org/show_bug.cgi?id=129609.
Reviewed by Ryosuke Niwa.
While checking the condition of restoring the missing space, the collapsed spaces
may not be exactly one.
editing/pasteboard/copy-text-with-wrapped-tag.html is enhanced to test this case.
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextBox):
2014-03-05 Ryosuke Niwa <rniwa@webkit.org>
appendChild shouldn't invalidate LiveNodeLists and HTMLCollections if they don't have valid caches
https://bugs.webkit.org/show_bug.cgi?id=129727
Reviewed by Andreas Kling.
Before this patch, invalidateNodeListAndCollectionCachesInAncestors invalidated node lists and HTML
collections on ancestors of a node whenever we're inserting or removing a child node. This patch
makes HTMLCollections and LiveNodeLists register themselves with Document only when they have valid
caches.
Each user of CollectionIndexCache now implements willValidateIndexCache member function that gets
called when CollectionIndexCache caches any state and necessitates the registration with document.
* dom/ChildNodeList.h: Added an empty willValidateIndexCache since child node lists are never
registered with document.
* dom/CollectionIndexCache.h:
(WebCore::CollectionIndexCache::hasValidCache): Added.
(WebCore::CollectionIndexCache::nodeCount): Calls willValidateIndexCache when caching node count.
(WebCore::CollectionIndexCache::nodeAfterCached): Ditto. Also assert that hasValidCache() true in
the cases where we're simply updating our caches or adding more caches.
(WebCore::CollectionIndexCache::nodeAt): Ditto. Also added a code to set the length cache when
we've reached the end of the list. This should be a slight speed up on some cases.
* dom/Document.cpp:
(WebCore::Document::Document): Initializes a variable used by assertions.
(WebCore::Document::unregisterNodeList): Added an early exit for when m_listsInvalidatedAtDocument
is empty since invalidateNodeListAndCollectionCaches swaps out the list.
(WebCore::Document::registerCollection): Removed the boolean hasIdNameMap since we now explicitly
call collectionCachedIdNameMap in HTMLCollection.
(WebCore::Document::unregisterCollection): Ditto. Exit early if m_collectionsInvalidatedAtDocument
is empty since invalidateNodeListAndCollectionCaches swaps out the list.
* dom/Document.h:
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::invalidateCache): Unregister the node list with document if we had caches.
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::LiveNodeList):
(WebCore::LiveNodeList::~LiveNodeList): Ditto.
(WebCore::LiveNodeList::invalidateCache): Pass around document. This is necessary since document()
had already moved to the new document inside NodeListsNodeData::invalidateCaches.
(WebCore::LiveNodeList::willValidateIndexCache): Added. Registers itself with document.
* dom/Node.cpp:
(WebCore::Document::invalidateNodeListAndCollectionCaches): Swap the lists since invalidateCache
tries to unregister node lists and HTML collections with document. Since this is the only case in
which node lists and HTML collections being removed may not be in the lists in unregisterNodeList
and unregisterCollection, assert this condition via m_inInvalidateNodeListAndCollectionCaches.
(WebCore::NodeListsNodeData::invalidateCaches):
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptDocument): Unregister node lists and HTML collections from old
document via invalidateCache. We need to explicitly pass in oldDocument here since owner node's
document had already been changed to newDocument at this point. Since we're invalidating caches,
there is no need to register node lists and HTML collections with newDocument.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::~HTMLCollection): Unregister the node list with document if we had caches.
(WebCore::HTMLCollection::invalidateCache): Ditto.
(WebCore::HTMLCollection::invalidateNamedElementCache):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::invalidateCache): Pass around document as done in LiveNodeList.
(WebCore::HTMLCollection::willValidateIndexCache): Ditto.
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::invalidateCache): Ditto.
* html/HTMLFormControlsCollection.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::invalidateSelectedItems): Ditto.
(WebCore::HTMLSelectElement::setRecalcListItems): Ditto.
2014-03-05 Jon Lee <jonlee@apple.com>
Fix linker error after r165087
https://bugs.webkit.org/show_bug.cgi?id=129730
Reviewed by Csaba Osztrogonác.
* WebCore.exp.in: Remove undefined symbol __ZN7WebCore32WebVideoFullscreenChangeObserverD2Ev.
2014-03-04 Zalan Bujtas <zalan@apple.com>
Enable device pixel repaint rect tracking.
https://bugs.webkit.org/show_bug.cgi?id=129712
Reviewed by Simon Fraser.
Tracked repaint rects are device pixel snapped now to support hiDPI test cases.
Test: fast/repaint/hidpi-device-pixel-based-repaint-rect-tracking.html
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::addTrackedRepaintRect):
(WebCore::FrameView::trackedRepaintRectsAsText): Print them as LayoutUnits to get
trailing zeros cut off.
* page/FrameView.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):
2014-03-04 Simon Fraser <simon.fraser@apple.com>
Don't clamp scrolling node offsets when the offset is changed by delegated scrolling
https://bugs.webkit.org/show_bug.cgi?id=129724
Reviewed by Sam Weinig.
Call setScrollPositionWithoutContentEdgeConstraints() from
ScrollingTree::scrollPositionChangedViaDelegatedScrolling() so that
layers are not clamped during rubber-banding.
This requires making setScrollPositionWithoutContentEdgeConstraints()
a pure virtual function on the base class.
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2014-03-04 Jeremy Jones <jeremyj@apple.com>
WebVideoFullscreen, should make the hand off of the video layer explicit.
https://bugs.webkit.org/show_bug.cgi?id=128844
Reviewed by Simon Fraser.
This change introduces a more explicit hand-off of the video layer.
This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
WebVideoFullscreenModel <-> WebVideoFullscreenInterface
enterFullScreen(*) ->
<- borrowVideoLayer
willLendVideoLayer ->
didLendVideoLayer ->
<- didEnterFullscreen
...
<- requestExitFullscreen
exitFullscreen ->
<- returnVideoLayer
<- didExitFullscreen
(*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.
* WebCore.exp.in:
Export new functions in WebVideoFullscreenInterfaceAVKit, WebVideoFullscreenModelMediaElement, etc.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
Add WebVideoFullscreenControllerChangeObserver to forward fullscreen callbacks to WebVideoFullscreenController
(WebVideoFullscreenControllerChangeObserver::setTarget):
Sets obj-c target of fullscreen change callbacks.
(-[WebVideoFullscreenController init]):
Point _changeObserver's target at self.
(-[WebVideoFullscreenController dealloc]):
Clear _changeObserver's target.
(-[WebVideoFullscreenController enterFullscreen:]):
Retain self to prevent dealloc during animation or while fullscreen.
Connect _interface to _changeObserver.
(-[WebVideoFullscreenController exitFullscreen]):
Remove use of completion move cleanup to -didExitFullscreen.
(-[WebVideoFullscreenController didEnterFullscreen]):
Nothing to see here.
(-[WebVideoFullscreenController didExitFullscreen]):
Move clean up code that was in a completion to here.
* platform/ios/WebVideoFullscreenInterface.h:
Add delarations for more explicit hand-off of video layer.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
Add WebVideoFullscreenChangeObserver to notify when fullscreen animations complete.
Add declarations for more explicit hand-off of video layer.
Add WebAVPlayerLayer now always wraps the m_videoLayer to prevent default behavior
of AVPlayerLayer.
(WebCore::WebVideoFullscreenChangeObserver::~WebVideoFullscreenChangeObserver):
Add empty virtual destructor.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
Include AVKit headers instead of declaring everything locally.
AVPlayerLayer protocol renamed to AVVideoLayer per AVKit.
(-[WebAVPlayerController dealloc]):
Don't refer to self.
(-[WebAVPlayerController playerViewController:shouldDismissWithReason:]):
Pause before requesting exit fullscreen.
(-[WebAVPlayerLayer setPlayerController:]):
This is required by AVVideoLayer, but we don't need it.
(WebVideoFullscreenInterfaceAVKit::playerController):
White space.
(WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenChangeObserver):
Set observer to forward fullscreen changes to.
(WebVideoFullscreenInterfaceAVKit::enterFullscreen):
Use more explicit video layer hand-off.
(WebVideoFullscreenInterfaceAVKit::doEnterFullscreen):
Move enterFullscreen logic here.
AVPlayerViewController now takes the video layer at init time.
Always provide a video layer wrapped in a WebAVPlayerLayer.
(WebVideoFullscreenInterfaceAVKit::willLendVideoLayer):
Use more explicit video layer hand-off.
(WebVideoFullscreenInterfaceAVKit::didLendVideoLayer):
Use more explicit video layer hand-off.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen):
Use more explicit video layer hand-off.
* platform/ios/WebVideoFullscreenModel.h:
Add functions for more explicit video layer hand-off.
* platform/ios/WebVideoFullscreenModelMediaElement.h:
Mark virtual functions as virtual.
Add changes for WebVideoFullscreenModel.
* platform/ios/WebVideoFullscreenModelMediaElement.mm:
Use more explicit video layer hand-off.
(WebVideoFullscreenModelMediaElement::setMediaElement):
Don't push the video layer. Wait for a request for it.
(WebVideoFullscreenModelMediaElement::handleEvent):
Make sure m_videoFullscreenInterface is valid.
(WebVideoFullscreenModelMediaElement::borrowVideoLayer):
Use more explicit video layer hand-off.
Lend videoLayer in request to a request to borrow the videoLayer.
Make sure to retain the video layer before it is removed from the layer tree.
(WebVideoFullscreenModelMediaElement::returnVideoLayer):
Use more explicit video layer hand-off.
(WebVideoFullscreenModelMediaElement::requestExitFullscreen):
Don't clear the mediaElement reference until completely exited from fullscreen.
2014-03-04 Simon Fraser <simon.fraser@apple.com>
Get position:fixed working slightly better on iOS
https://bugs.webkit.org/show_bug.cgi?id=129714
Reviewed by Benjamin Poulain.
Send the scroll position as a FloatPoint, rather than an IntPoint.
* WebCore.exp.in:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
* page/scrolling/ScrollingTree.h:
2014-03-04 Alex Christensen <achristensen@webkit.org>
Fixed Windows build without MEDIA_CONTROLS_SCRIPT enabled.
https://bugs.webkit.org/show_bug.cgi?id=129701
Reviewed by Jer Noble.
* WebCore.vcxproj/WebCore.vcxproj:
* DerivedSources.cpp:
Moved UserAgentScriptsData.cpp to DerivedSources.cpp to only be built if MEDIA_CONTROLS_SCRIPT is enabled.
* DerivedSources.make:
Only generate UserAgentScripts.cpp/h when USER_AGENT_SCRIPTS is non-empty.
* rendering/RenderThemeWin.cpp:
Only include UserAgentScripts.h when MEDIA_CONTROLS_SCRIPT is enabled.
2014-03-04 Simon Fraser <simon.fraser@apple.com>
Allow iOS DumpRenderTree crashes to show application-specific information
https://bugs.webkit.org/show_bug.cgi?id=129705
Reviewed by David Kilzer.
Make the WKSI function SetCrashReportApplicationSpecificInformation available
in iOS simulator builds.
* WebCore.exp.in:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
2014-03-04 Andreas Kling <akling@apple.com>
Spam static branch prediction hints on JS bindings.
<https://webkit.org/b/129703>
Add UNLIKELY hints to all !castedThis and exec->hadException() paths
in the JS bindings since they are almost always going to get skipped.
Reviewed by Geoff Garen.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateImplementationFunctionCall):
(GenerateConstructorDefinition):
2014-03-04 Adenilson Cavalcanti <cavalcantii@gmail.com>
Remove unused StdDeviation from Gaussian Blur effect
https://bugs.webkit.org/show_bug.cgi?id=129693
Reviewed by Simon Fraser.
No new tests, no change on behavior.
* platform/graphics/filters/FEGaussianBlur.cpp:
* platform/graphics/filters/FEGaussianBlur.h:
2014-03-04 Andreas Kling <akling@apple.com>
Add a Document::updateStyleIfNeededForNode(Node&).
<https://webkit.org/b/129689>
Generalize the mechanism that computed style uses to avoid doing full
style updates when the node we're interested in isn't actually dirty.
Reviewed by Antti Koivisto.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* dom/Document.cpp:
(WebCore::nodeOrItsAncestorNeedsStyleRecalc):
(WebCore::Document::updateStyleIfNeededForNode):
* dom/Document.h:
* editing/htmlediting.cpp:
(WebCore::isEditablePosition):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::defaultEventHandler):
2014-03-04 Mark Hahnenberg <mhahnenberg@apple.com>
Merge API shims and JSLock
https://bugs.webkit.org/show_bug.cgi?id=129650
Reviewed by Mark Lam.
No new tests.
JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason
to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.
* bindings/js/DOMRequestState.h:
(WebCore::DOMRequestState::Scope::Scope):
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredWrapper::resolve):
(WebCore::DeferredWrapper::reject):
(WebCore::DeferredWrapper::resolve<String>):
(WebCore::DeferredWrapper::resolve<bool>):
(WebCore::char>>):
(WebCore::DeferredWrapper::reject<String>):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):
2014-03-04 Beth Dakin <bdakin@apple.com>
REGRESSION: Overlay scrollbars that have grown are sometimes askew in the track
https://bugs.webkit.org/show_bug.cgi?id=129691
-and corresponding-
<rdar://problem/15666846>
Reviewed by Simon Fraser.
This regression started happening after we adopted the setPresentationValue
ScrollbarPainter API which allows us to update the position of the scrollbar knob
from our secondary scrolling thread. The bug occurs when the scrollbar grows while
it still thinks it is in presentation-value mode. Whenever the scrollbar grows, it
should be in non-presentation value mode.
If the wheel event has ended or been cancelled, we can switch out of presentation
value mode.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
Sometimes we will grow the scrollbar before we have received a wheel event with
the end or cancelled phase, and so automatically switch out of presentation-value
mode whenever we start one of these animations.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
2014-03-04 Zan Dobersek <zdobersek@igalia.com>
Move Source/WebCore/html/track/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129666
Reviewed by Eric Carlson.
Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/html/track/ with std::unique_ptr.
* html/track/AudioTrack.h:
* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::parseWebVTTCueData):
* html/track/InbandWebVTTTextTrack.h:
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::loadTimerFired):
(WebCore::LoadableTextTrack::newCuesAvailable):
(WebCore::LoadableTextTrack::cueLoadingCompleted):
(WebCore::LoadableTextTrack::newRegionsAvailable):
* html/track/LoadableTextTrack.h:
* html/track/TextTrack.h:
* html/track/TextTrackCue.h:
* html/track/TextTrackRegion.h:
* html/track/VTTCue.cpp:
(WebCore::VTTCue::createWebVTTNodeTree):
(WebCore::VTTCue::markFutureAndPastNodes):
* html/track/VTTCue.h:
* html/track/VideoTrack.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::WebVTTParser):
* html/track/WebVTTParser.h:
* html/track/WebVTTTokenizer.h:
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::processNewCueData):
* loader/TextTrackLoader.h:
2014-03-04 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Make border-radius painting device pixel aware.
https://bugs.webkit.org/show_bug.cgi?id=129558
Reviewed by Simon Fraser.
Snap rounded rects to device pixels right before passing them to GraphicsContext.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::clipRoundedInnerRect):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::paintBorder):
* rendering/RenderBoxModelObject.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
2014-03-04 Simon Fraser <simon.fraser@apple.com>
Crashes and assertions running iOS compositing tests
https://bugs.webkit.org/show_bug.cgi?id=129688
Reviewed by Dean Jackson.
When a layer is no longer composited, we need to unregister it
from the scrolling coordinator, and remove it from m_scrollCoordinatedLayers.
Tested by compositing tests on iOS.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
2014-03-04 Antti Koivisto <antti@apple.com>
Update bindings test results after r165046.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_set_property):
(webkit_dom_test_obj_set_reflected_string_attr):
(webkit_dom_test_obj_set_reflected_url_attr):
(webkit_dom_test_obj_set_reflected_custom_url_attr):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj setReflectedStringAttr:]):
(-[DOMTestObj setReflectedURLAttr:]):
(-[DOMTestObj setReflectedCustomURLAttr:]):
2014-03-04 Martin Robinson <mrobinson@igalia.com>
[GTK] Simplify the GObject DOM bindings API break check into one step
https://bugs.webkit.org/show_bug.cgi?id=129571
Reviewed by Carlos Garcia Campos.
* bindings/gobject/GNUmakefile.am: We no longer generate the webkitdom.symbols file in the
DerivedSources directory. All the logic is handled internally in the script now.
* bindings/scripts/gobject-run-api-break-test: Removed.
2014-03-04 Zalan Bujtas <zalan@apple.com>
Build fix for iOS.
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::addRoundedBorderClip):
(WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
2014-03-04 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Make GraphicsLayer::fillRect FloatRoundedRect based and cleanup dependencies.
https://bugs.webkit.org/show_bug.cgi?id=129557
Reviewed by Simon Fraser.
This is the preparation for snapping rounded rects to device pixel position. It enables
device pixel aware border-radius painting.
No change in functionality.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMediaSliderThumb):
* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::FloatRoundedRect):
(WebCore::FloatRoundedRect::isRenderable):
* platform/graphics/FloatRoundedRect.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::clipRoundedRect):
(WebCore::GraphicsContext::clipOutRoundedRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/GraphicsContext.h:
* platform/graphics/Path.cpp:
(WebCore::Path::addRoundedRect):
* platform/graphics/Path.h:
* platform/graphics/RoundedRect.cpp:
(WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
* platform/graphics/RoundedRect.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::drawRectShadow):
(WebCore::ShadowBlur::drawInsetShadow):
(WebCore::ShadowBlur::drawRectShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithTiling):
(WebCore::ShadowBlur::drawRectShadowWithTiling):
* platform/graphics/ShadowBlur.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::fillRoundedRect):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::borderRadiiFromStyle):
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaSliderThumb):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::pushContentsClip):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::clipRoundedInnerRect):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
(WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintRadioDecorations):
(WebCore::RenderThemeIOS::paintTextFieldDecorations):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
(WebCore::RenderThemeIOS::paintSliderTrack):
(WebCore::RenderThemeIOS::paintProgressBar):
(WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuListButtonGradients):
(WebCore::RenderThemeMac::paintSliderTrack):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMenuListButtonGradients):
(WebCore::RenderThemeSafari::paintSliderTrack):
* rendering/shapes/BoxShape.cpp:
(WebCore::BoxShape::buildDisplayPaths):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeInset::path):
2014-03-04 Andreas Kling <akling@apple.com>
Micro-optimize Strings in JS bindings.
<https://webkit.org/b/129673>
Tweaked for new jsStringWithWeakOwner signature. This patch removes
36 bytes of code from every wrapper getter that returns a DOMString.
Reviewed by Ryosuke Niwa.
* bindings/js/JSDOMBinding.h:
(WebCore::jsStringWithCache):
2014-03-03 David Kilzer <ddkilzer@apple.com>
SVGPropertyTearOffs should detachChildren before deleting its value.
<http://webkit.org/b/129618>
<rdar://problem/15661617>
Reviewed by Maciej Stachowiak.
Merged from Blink (patch by kouhei@chromium.org):
https://src.chromium.org/viewvc/blink?revision=158563&view=revision
http://crbug.com/296276
Test: svg/transforms/svg-matrix-tearoff-crash.html
NOTE: The test does not reproduce a crash on WebKit using
JavaScriptCore.
* svg/properties/SVGPropertyTearOff.h:
(WebCore::SVGPropertyTearOff::setValue):
(WebCore::SVGPropertyTearOff::~SVGPropertyTearOff):
- Call detachChildren() if m_value is a copy. The original
Blink patch did not modify the destructor code path, although
that seems obvious via code inspection.
2014-03-04 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Incorrect repaint rect cuts off content's right edge after move.
https://bugs.webkit.org/show_bug.cgi?id=129652
Reviewed by Simon Fraser.
When repaint rect is adjusted in order to take the distance from renderer into account,
the accumulated fraction value need to be added too. This is always a positive value.
Test: fast/borders/hidpi-border-clipping-right-after-move.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2014-03-04 Ryuan Choi <ryuan.choi@samsung.com>
Remove unused member variable of NetworkInfoController
https://bugs.webkit.org/show_bug.cgi?id=129674
Reviewed by Gyuyoung Kim.
* Modules/networkinfo/NetworkInfoController.cpp:
(WebCore::NetworkInfoController::NetworkInfoController):
(WebCore::NetworkInfoController::create):
(WebCore::provideNetworkInfoTo):
* Modules/networkinfo/NetworkInfoController.h: Removed m_page which is not really used.
2014-02-07 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Percentages of indefinite sizes should compute to auto
https://bugs.webkit.org/show_bug.cgi?id=128173
Reviewed by Darin Adler.
We should treat percentages of indefinite sizes as auto as
mandated by the spec. Otherwise we would end up calculating a
percentage of -1, the value we use to represent infinite.
Added some test cases to the current tests.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::gridTrackSize):
* rendering/style/GridTrackSize.h:
(WebCore::GridTrackSize::isPercentage):
2014-03-04 Ryosuke Niwa <rniwa@webkit.org>
Don't synchronize attributes in reflect setters when we don't need to
https://bugs.webkit.org/show_bug.cgi?id=129662
Reviewed by Andreas Kling.
The vast majority of attributes don't need synchronization. Avoid calling synchronizeAttribute in setters
for those content attributes generated by "Reflect" keyword in IDL.
* bindings/scripts/CodeGenerator.pm:
(SetterExpression):
* dom/Element.cpp:
(WebCore::Element::setAttributeWithoutSynchronization): Added.
* dom/Element.h:
2014-03-04 Andreas Kling <akling@apple.com>
Remove Document::idAttributeName().
<https://webkit.org/b/129663>
Reviewed by Ryosuke "DYEB" Niwa.
This abstraction is not actually used and causes unnecessary indirection
in some pretty hot code paths.
Replace it with hard-coded HTMLNames::idAttr instead which is a compile
time constant pointer. We can revisit this in the future if we wish to
implement support for custom id attributes.
* dom/Attr.cpp:
(WebCore::Attr::isId):
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore::Element::willModifyAttribute):
* dom/Element.h:
(WebCore::Element::getIdAttribute):
(WebCore::Element::getNameAttribute):
(WebCore::Element::setIdAttribute):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseAttribute):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::parseAttribute):
* svg/SVGElement.cpp:
(WebCore::SVGElement::attributeChanged):
(WebCore::SVGElement::isKnownAttribute):
(WebCore::SVGElement::svgAttributeChanged):
2014-03-04 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r164856): Use after free in WebCore::QualifiedName::operator== / WebCore::StyledElement::attributeChanged
https://bugs.webkit.org/show_bug.cgi?id=129550
Reviewed by Andreas Kling.
We can't store a reference to QualifiedName here because ensureUniqueElementData could delete QualifiedName inside Attribute.
Test: fast/dom/uniquing-attributes-via-setAttribute.html
* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
2014-03-04 Hyowon Kim <hw1008.kim@samsung.com>
Move EvasGLContext and EvasGLSurface files into the efl common directory.
https://bugs.webkit.org/show_bug.cgi?id=129603
Reviewed by Gyuyoung Kim.
EFL port will use EvasGLContext and EvasGLSurface files in both WK1 and WK2.
No new tests, just refactorings.
* PlatformEfl.cmake:
* platform/graphics/efl/EvasGLContext.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLContext.cpp.
(WebKit::EvasGLContext::EvasGLContext):
(WebKit::EvasGLContext::~EvasGLContext):
* platform/graphics/efl/EvasGLContext.h: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLContext.h.
(WebKit::EvasGLContext::create):
(WebKit::EvasGLContext::context):
* platform/graphics/efl/EvasGLSurface.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLSurface.cpp.
(WebKit::EvasGLSurface::EvasGLSurface):
(WebKit::EvasGLSurface::~EvasGLSurface):
* platform/graphics/efl/EvasGLSurface.h: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLSurface.h.
(WebKit::EvasGLSurface::create):
(WebKit::EvasGLSurface::surface):
2014-03-03 Martin Robinson <mrobinson@igalia.com>
Fix the GTK+ CMake build
* PlatformGTK.cmake: Add a missing file to the source list.
2014-03-03 Sanghyup Lee <sh53.lee@samsung.com>
:active style is not cleared when its display property is set to none before mouse released.
https://bugs.webkit.org/show_bug.cgi?id=129465
Reviewed by Antonio Gomes.
Source/WebCore:
We currently clearing the :active style when element has a renderer.
This patch makes elements clear its active style regardless of renderer.
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
LayoutTests:
* fast/css/active-display-none-expected.txt: Added.
* fast/css/active-display-none.html: Added.
2014-03-03 Andreas Kling <akling@apple.com>
Remove 2 unnecessary includes from JSDOMBinding.h
<https://webkit.org/b/129619>
Reviewed by Antti Koivisto.
* bindings/js/JSDOMBinding.h:
2014-03-03 Myles C. Maxfield <mmaxfield@apple.com>
GraphicsContext::drawLineForText needs to be exported from WebCore.dylib for iOS builds
https://bugs.webkit.org/show_bug.cgi?id=129647
Reviewed by NOBODY (This is a build fix).
Fixing after r165025 and r165016.
No new tests as this is a build fix.
* WebCore.exp.in:
2014-03-03 Jer Noble <jer.noble@apple.com>
[iOS] Start playback button misplaced
https://bugs.webkit.org/show_bug.cgi?id=129628
Reviewed by Simon Fraser.
On YouTube embeds, while the video is loading it is placed into the DOM with a 0x0 size.
This causes the start playback button to be visible in the upper-left corner of the embed
area. The button wasn't visible previously (in plugin mode) because the plugin clipped its
drawing to its bounds, and so the <video> shadow should do the same.
* Modules/mediacontrols/mediaControlsiOS.css:
(::-webkit-media-controls):
2014-03-03 Enrica Casucci <enrica@apple.com>
Build fix for iOS simulator.
* WebCore.exp.in:
2014-03-03 Jeremy Jones <jeremyj@apple.com>
Forward application suspend resume notifications to the web process.
https://bugs.webkit.org/show_bug.cgi?id=129356
Reviewed by Eric Carlson.
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper initWithCallback:]):
Observe UIApplicationDidBecomeActiveNotification,
WebUIApplicationDidBecomeActiveNotification,
WebUIApplicationWillEnterForegroundNotification, and
WebUIApplicationWillResignActiveNotification
(-[WebMediaSessionHelper applicationDidBecomeActive:]):
Resume session.
2014-03-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r165013.
http://trac.webkit.org/changeset/165013
https://bugs.webkit.org/show_bug.cgi?id=129646
New code is not thread safe, asserting on a worker test
(Requested by ap on #webkit).
* WebCore.exp.in:
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI):
* html/DOMURL.cpp:
(WebCore::DOMURL::revokeObjectURL):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR):
* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage):
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::CachedRawResource):
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::~CachedResource):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::CachedSVGDocument):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::CachedScript):
* loader/cache/CachedScript.h:
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::CachedTextTrack):
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
* loader/cache/CachedXSLStyleSheet.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForURL):
(WebCore::MemoryCache::resourceForRequest):
(WebCore::MemoryCache::addImageToCache):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::evict):
(WebCore::MemoryCache::removeResourcesWithOrigin):
(WebCore::MemoryCache::getOriginsWithCache):
(WebCore::MemoryCache::removeUrlFromCache):
(WebCore::MemoryCache::removeRequestFromCache):
(WebCore::MemoryCache::removeRequestFromCacheImpl):
(WebCore::MemoryCache::crossThreadRemoveRequestFromCache):
(WebCore::MemoryCache::getStatistics):
(WebCore::MemoryCache::setDisabled):
* loader/cache/MemoryCache.h:
* platform/CrossThreadCopier.cpp:
* platform/CrossThreadCopier.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::updateSnapshot):
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache):
2014-03-03 Sam Weinig <sam@webkit.org>
Fix the iOS Simulator build.
* WebCore.exp.in:
2014-03-03 Myles C. Maxfield <mmaxfield@apple.com>
Space between double underlines does not scale with font size
https://bugs.webkit.org/show_bug.cgi?id=129521
Reviewed by Simon Fraser.
This patch moves the logic about how far to draw the second underline (when text-decoration-style: double
is specified) from InlineTextBox to GraphicsContext, because GraphicsContext is the authoritative source
about how thick underlines should be. The space between the two underlines is set to the thickness of
each of the underlines.
This patch also deletes some unused code in InlineTextBox that was never getting triggered, in addition
to unifying drawLineForText with drawLinesForText. This didn't have any performance impact in my testing.
Test: fast/css3-text/css3-text-decoration/text-decoration-style-double-space-scales.html
* platform/graphics/GraphicsContext.h: drawLineForText takes a boolean for if we should draw double
underlines.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLineForText):
(WebCore::GraphicsContext::drawLinesForText):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::drawLineForText):
* rendering/InlineTextBox.cpp: Use new boolean argument
(WebCore::drawSkipInkUnderline):
(WebCore::InlineTextBox::paintDecoration):
2014-02-28 Chris Fleizach <cfleizach@apple.com>
AX: Support IOS Accessibility in WK2
https://bugs.webkit.org/show_bug.cgi?id=129527
Reviewed by Sam Weinig.
Update the iOS wrapper so that it can convert points to screen space in WebKit2.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
2014-03-03 Martin Hock <mhock@apple.com>
Add support for sessions to MemoryCache.
https://bugs.webkit.org/show_bug.cgi?id=127794
Reviewed by Sam Weinig.
* WebCore.exp.in:
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI): Initialize CachedImage with sessionID.
* html/DOMURL.cpp:
(WebCore::DOMURL::revokeObjectURL): Remove URL from MemoryCache for all sessions.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource): Pass sessionID to MemoryCache.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR): Ditto.
* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable): Ditto.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Ditto.
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement): Initialize CachedImage with sessionID.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Pass sessionID to MemoryCache.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Constructor takes sessionID.
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp: Ditto.
(WebCore::CachedFont::CachedFont):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp: Ditto.
(WebCore::CachedImage::CachedImage):
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp: Ditto.
(WebCore::CachedRawResource::CachedRawResource):
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp: Ditto.
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::~CachedResource): Pass sessionID to MemoryCache.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::sessionID):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource): Constructors take sessionID.
(WebCore::CachedResourceLoader::sessionID): Retrieve sessionID from page.
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Pass sessionID to MemoryCache.
(WebCore::CachedResourceLoader::requestResource): Initialize CachedCSSStyleSheet with sessionID.
(WebCore::CachedResourceLoader::revalidateResource): Initialize cached resource with sessionID.
(WebCore::CachedResourceLoader::loadResource): Pass sessionID to MemoryCache and initialize cached resource with sessionID.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGDocument.cpp: Constructor takes sessionID.
(WebCore::CachedSVGDocument::CachedSVGDocument):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.cpp: Ditto.
(WebCore::CachedScript::CachedScript):
* loader/cache/CachedScript.h:
* loader/cache/CachedTextTrack.cpp: Ditto.
(WebCore::CachedTextTrack::CachedTextTrack):
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.cpp: Ditto.
(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
* loader/cache/CachedXSLStyleSheet.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getSessionMap): Retrieve CachedResourceMap based on sessionID.
(WebCore::MemoryCache::add): Use sessionID from CachedResource parameter.
(WebCore::MemoryCache::revalidationSucceeded): Add sessionID parameter.
(WebCore::MemoryCache::resourceForURL): Ditto.
(WebCore::MemoryCache::resourceForRequest): Ditto, also move impl into impl method.
(WebCore::MemoryCache::resourceForRequestImpl): Add CachedResourceMap parameter.
(WebCore::MemoryCache::addImageToCache): Use default sessionID.
(WebCore::MemoryCache::removeImageFromCache): Ditto.
(WebCore::MemoryCache::evict): Use sessionID from CachedResource parameter.
(WebCore::MemoryCache::removeResourcesWithOrigin): Iterate through all CachedResourceMaps.
(WebCore::MemoryCache::getOriginsWithCache): Ditto.
(WebCore::MemoryCache::removeUrlFromCache): Add sessionID parameter.
(WebCore::MemoryCache::removeRequestFromCache): Ditto.
(WebCore::MemoryCache::removeRequestFromCacheImpl): Ditto.
(WebCore::MemoryCache::removeRequestFromSessionCaches): Iterate through all CachedResourceMaps.
(WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Add sessionID parameter.
(WebCore::MemoryCache::getStatistics): Iterate through all CachedResourceMaps.
(WebCore::MemoryCache::setDisabled): Ditto.
* loader/cache/MemoryCache.h: Create another level for cache.
* platform/CrossThreadCopier.cpp: Allow copying SessionIDs across threads.
(WebCore::SessionID>::copy):
* platform/CrossThreadCopier.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest): Remove trailing whitespace.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::updateSnapshot): Initialize CachedImage with sessionID.
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache): Pass sessionID to MemoryCache.
2014-03-03 Andreas Kling <akling@apple.com>
Remove unused DataView code from JSDOMBinding.h
<https://webkit.org/b/129616>
Reviewed by Antti Koivisto.
* bindings/js/JSDOMBinding.h:
2014-03-03 Simon Fraser <simon.fraser@apple.com>
Allow overflow-scroll to be one-finger scrolled until we hook up UIScrollViews
https://bugs.webkit.org/show_bug.cgi?id=129621
Reviewed by Benjamin Poulain.
Temporary change to allow overflow:scroll to be scrolled in iOS WK2.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hasAcceleratedTouchScrolling):
2014-03-03 Antti Koivisto <antti@apple.com>
Find results on simple lines are not marked correctly
https://bugs.webkit.org/show_bug.cgi?id=129586
Reviewed by Andreas Kling.
Tests: editing/text-iterator/count-mark-lineboxes.html
editing/text-iterator/count-mark-simple-lines.html
TextIterator operating on simple lines failed to take the end of the range into account.
This also causes performance issues on long documents as range traversals would miss the end
node and end up going through the entire document.
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextNode):
Stop when hitting the range end on simple text nodes.
(WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
Use hasRenderedText test instead of linebox-only firstTextBox.
* testing/Internals.cpp:
(WebCore::Internals::countMatchesForText):
* testing/Internals.h:
* testing/Internals.idl:
Add testing interface for counting and marking matches.
2014-03-03 Benjamin Poulain <benjamin@webkit.org>
SelectorQuery failing RightMostWithIdMatch are compiling their selectors for each execution
https://bugs.webkit.org/show_bug.cgi?id=129601
Reviewed by Andreas Kling.
This caused a regression after r164924 for documents in quirks mode. Since those always fail
selectorForIdLookup(), they ended up compiling the selector every time they were called.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):
2014-03-01 Jer Noble <jer.noble@apple.com>
[Mac] Crash in MediaPlayer::rateChanged()
https://bugs.webkit.org/show_bug.cgi?id=129548
Reviewed by Darin Adler.
WTF::bind will automatically ref the parameters added to it. But MediaPlayerPrivate-
AVFoundation and -MediaSOurceAVFObjC are not RefCounted, so by the time the bound
function is called, the underlying objects may have been freed.
Replace or augment callOnMainThread arguments with lambdas and weakPtrs so that
if the argument has been destroyed, its methods will not be called.
Make the MediaPlayerPrivateAVFoundation::Notification function type a std::function:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
(WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
Make createWeakPtr() public so that it can be called from non-class methods:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createWeakPtr):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr):
Use a weakPtr to abort callOnMainThread() if the object has been destroyed:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::CMTimebaseEffectiveRateChangedCallback):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
2014-02-28 Jer Noble <jer.noble@apple.com>
[MSE] YouTube videos fail to play
https://bugs.webkit.org/show_bug.cgi?id=129525
Reviewed by Darin Adler.
Test: media/media-source/media-source-fudge-factor.html
Add a very simple playability metric to SourceBuffer. Track the number of seconds buffered
and use that metric to determine whether the MediaSource has buffered enough data to play
through.
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::currentTime): Added simple accessor.
(WebCore::MediaSource::monitorSourceBuffers): Replace the functor-based iterators with lambdas.
(WebCore::MediaSource::addSourceBuffer): Drive-by fix; only add new source buffers to the
activeSourceBuffers list if those buffers are actually active.
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::SourceBuffer): Initialize new ivars.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Measure the number of seconds buffered.
(WebCore::SourceBuffer::monitorBufferingRate): Use a simple Exponential moving average to
track the buffering rate.
(WebCore::SourceBuffer::hasCurrentTime): Return true if the current time is within 1/24 s
of a buffered range.
(WebCore::SourceBuffer::hasFutureTime): Moved from MediaSource.
(WebCore::SourceBuffer::canPlayThrough): Return true if the buffering rate is > 1s per
second, or if the rate is sufficient to keep up over the remaining time.
* Modules/mediasource/SourceBuffer.h:
2014-03-03 Bear Travis <betravis@adobe.com>
[CSS Shapes] Serialize circle positions
https://bugs.webkit.org/show_bug.cgi?id=129404
Reviewed by Dirk Schulze.
Circle positions should always be present when serialized, and should
only have the 2 or 4-valued form. Keywords are converted to percentages
and simplified where possible. This patch adds some additional processing
that converts the parsed position into the serialized format, before
converting it to text. See http://dev.w3.org/csswg/css-shapes/#basic-shape-serialization.
Updated existing parsing tests.
* css/CSSBasicShapes.cpp:
(WebCore::serializePositionOffset): Convert a position offset to a serialized string.
The offset must be a pair, as generated by buildSerializablePositionOffset.
(WebCore::buildSerializablePositionOffset): Generates a keyword + offset pair for each
position offset. The keywords may later be dropped during serialization.
(WebCore::CSSBasicShapeCircle::cssText): Use the new serialization methods.
2014-03-03 Lorenzo Tilve <ltilve@igalia.com>
Optimize StylePropertiesSet::findPropertyIndex() to improve CSS properties performance
https://bugs.webkit.org/show_bug.cgi?id=129605
Reviewed by Andreas Kling.
Merged from Blink (patch by Mikhail Pozdnyakov):
https://src.chromium.org/viewvc/blink?view=revision&revision=167325
Avoid checking whether 'StylePropertiesSet' is mutable and accesing directly to its
data members to achieve performance improvements
Before the optimization applied:
mean: 3064.8337171934063 runs/s
median: 3097.5899379343855 runs/s
stdev: 66.89274074044187 runs/s
min: 2891.7479324362585 runs/s
max: 3113.288683440125 runs/s
After the optimization applied:
mean: 3343.8356114138105 runs/s
median: 3356.25682957446 runs/s
stdev: 36.297533087489036 runs/s
min: 3238.5468032264243 runs/s
max: 3368.664837531425 runs/s
Performance gain for the average value is approx. 9.1%, in the
range of the 10% - 8.2% for the min and max measured
values (Linux desktop x64).
* css/StyleProperties.cpp:
(WebCore::ImmutableStyleProperties::findPropertyIndex):
(WebCore::MutableStyleProperties::findPropertyIndex):
* css/StyleProperties.h:
(WebCore::toMutableStyleProperties):
(WebCore::toImmutableStyleProperties):
(WebCore::StyleProperties::findPropertyIndex):
2014-03-03 Brian Burg <bburg@apple.com>
Unreviewed build fix for Windows after r164986.
* WebCore.vcxproj/build-generated-files.sh: Export WebReplayScripts
so that the build system knows how to find CodeGeneratorReplayInputs.py.
2014-03-03 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Overset computation is incorrect in some cases
https://bugs.webkit.org/show_bug.cgi?id=129032
Reviewed by Mihnea Ovidenie.
This patch reworks the way overset is computed for regions and named flows.
1. Regions overflow no longer trigger an overset changed event. This is because
the overflow of a box is contained within the region range of the box. The content
edge should be considered the logical bottom position of the content inside the
flow thread.
2. The regions events logic was moved from RenderFlowThread to RenderNamedFlowThread
and from RenderRegion to RenderNamedFlowFragment (including the regionOverset property).
3. The overset value of the named flow is no longer stored in the named flow. It is
extracted from the overset of the last region in the chain.
4. The regions overset is not computed every time the flow thread is laid out which
should improve performance for flows with many regions. With the patch, each region
computes the overset value during its layout when the flow thread is in the overflow
or the final layout phase.
5. The overset changed event is dispatched only at the end of the layout of the named flows,
after all the region overset changes have been considered. This means that the overset
event can't be dispatched in the middle of the auto-height processing algorithm that
requires multiple layout passes for the flow threads.
However, the region layout update event dispatch timing was not changed, it is dispatched
every time the flow thread has a layout. This preserves the current behavior of the event.
Tests: The old tests were modified to take into account the change.
* dom/Element.cpp:
(WebCore::Element::webkitRegionOverset):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::overset):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForRegions):
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::layout):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::layoutBlock):
(WebCore::RenderNamedFlowFragment::setRegionOversetState):
(WebCore::RenderNamedFlowFragment::regionOversetState):
(WebCore::RenderNamedFlowFragment::updateOversetState):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::computeOverflow):
(WebCore::RenderNamedFlowThread::layout):
(WebCore::RenderNamedFlowThread::dispatchNamedFlowEvents):
(WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEventIfNeeded):
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
* rendering/RenderNamedFlowThread.h:
There's a new field called m_flowContentBottom that tracks the content bottom of the flow thread
after layout. This value is used to compute the overset value of the regions because it's not
affected by relative positioning or visual overflow such as shadows.
* rendering/RenderRegion.cpp:
* rendering/RenderRegion.h:
2014-03-03 Tomas Popela <tpopela@redhat.com>
[GTK] CodeGeneratorGObject.pm remove usage of undefined variable
https://bugs.webkit.org/show_bug.cgi?id=129602
Reviewed by Martin Robinson.
Remove usage of undefined variable hdrPropIncludes in CodeGeneratorGObject.pm
* bindings/scripts/CodeGeneratorGObject.pm:
(WriteData):
2014-03-03 Brian Burg <bburg@apple.com>
Web Replay: upstream input storage, capture/replay machinery, and inspector domain
https://bugs.webkit.org/show_bug.cgi?id=128782
Reviewed by Timothy Hatcher, Joseph Pecoraro, and Andreas Kling.
No new tests yet, as they rely on infrastructure tracked in https://webkit.org/b/129190.
Replayable executions are organized into ReplaySessions, which can
contain several ReplaySessionSegments that divide overall execution
at main frame navigation boundaries. NondeterministicInput subclasses
are stored in SegmentedInputStorage according to the input's InputQueue.
Capture and playback are controlled at the page granularity by the Page's
ReplayController. The controller knows how to create new segments, replay to
arbitrary positions in the ReplaySession, and track the active InputCursor.
The capturing and replaying input cursor subclasses encapsulate state for
storing new inputs and loading/dispatching saved inputs, respectively.
The ReplayAgent and associated inspector protocol domain is the friendly
public API for programmatically capturing and replaying sessions.
* DerivedSources.make: Add replay inputs code generation target. Add the
replay domain specification to the list of inspector domains.
* ForwardingHeaders/replay/EncodedValue.h: Added.
* WebCore.xcodeproj/project.pbxproj: Add many files, and export
`WebReplayScripts` environment variable to DerivedSources.make.
* inspector/InspectorController.cpp: Add the replay agent.
(WebCore::InspectorController::InspectorController):
* inspector/InspectorInstrumentation.cpp:
Add events for segment lifecycle events, and loading/unloading of sessions
and segments, and capture/replay progress events. The replay controller
also needs to know about detached and committed frames.
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::sessionCreatedImpl):
(WebCore::InspectorInstrumentation::sessionLoadedImpl):
(WebCore::InspectorInstrumentation::sessionModifiedImpl):
(WebCore::InspectorInstrumentation::segmentCreatedImpl):
(WebCore::InspectorInstrumentation::segmentCompletedImpl):
(WebCore::InspectorInstrumentation::segmentLoadedImpl):
(WebCore::InspectorInstrumentation::segmentUnloadedImpl):
(WebCore::InspectorInstrumentation::captureStartedImpl):
(WebCore::InspectorInstrumentation::captureStoppedImpl):
(WebCore::InspectorInstrumentation::playbackStartedImpl):
(WebCore::InspectorInstrumentation::playbackPausedImpl):
(WebCore::InspectorInstrumentation::playbackHitPositionImpl):
(WebCore::InspectorInstrumentation::replayAgentEnabled):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::replayAgentEnabled):
(WebCore::InspectorInstrumentation::sessionCreated):
(WebCore::InspectorInstrumentation::sessionLoaded):
(WebCore::InspectorInstrumentation::sessionModified):
(WebCore::InspectorInstrumentation::segmentCreated):
(WebCore::InspectorInstrumentation::segmentCompleted):
(WebCore::InspectorInstrumentation::segmentLoaded):
(WebCore::InspectorInstrumentation::segmentUnloaded):
(WebCore::InspectorInstrumentation::captureStarted):
(WebCore::InspectorInstrumentation::captureStopped):
(WebCore::InspectorInstrumentation::playbackStarted):
(WebCore::InspectorInstrumentation::playbackPaused):
(WebCore::InspectorInstrumentation::playbackHitPosition):
* inspector/InspectorReplayAgent.cpp: Added.
(WebCore::buildInspectorObjectForPosition):
(WebCore::buildInspectorObjectForInput):
(WebCore::buildInspectorObjectForSession):
(WebCore::SerializeInputToJSONFunctor::SerializeInputToJSONFunctor):
(WebCore::SerializeInputToJSONFunctor::~SerializeInputToJSONFunctor):
(WebCore::SerializeInputToJSONFunctor::operator()):
(WebCore::SerializeInputToJSONFunctor::returnValue):
(WebCore::buildInspectorObjectForSegment):
(WebCore::InspectorReplayAgent::InspectorReplayAgent):
(WebCore::InspectorReplayAgent::~InspectorReplayAgent):
(WebCore::InspectorReplayAgent::sessionState):
(WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
(WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorReplayAgent::frameNavigated):
(WebCore::InspectorReplayAgent::frameDetached):
(WebCore::InspectorReplayAgent::sessionCreated):
(WebCore::InspectorReplayAgent::sessionModified):
(WebCore::InspectorReplayAgent::sessionLoaded):
(WebCore::InspectorReplayAgent::segmentCreated):
(WebCore::InspectorReplayAgent::segmentCompleted):
(WebCore::InspectorReplayAgent::segmentLoaded):
(WebCore::InspectorReplayAgent::segmentUnloaded):
(WebCore::InspectorReplayAgent::captureStarted):
(WebCore::InspectorReplayAgent::captureStopped):
(WebCore::InspectorReplayAgent::playbackStarted):
(WebCore::InspectorReplayAgent::playbackPaused):
(WebCore::InspectorReplayAgent::playbackHitPosition):
(WebCore::InspectorReplayAgent::startCapturing):
(WebCore::InspectorReplayAgent::stopCapturing):
(WebCore::InspectorReplayAgent::replayToPosition):
(WebCore::InspectorReplayAgent::replayToCompletion):
(WebCore::InspectorReplayAgent::pausePlayback):
(WebCore::InspectorReplayAgent::cancelPlayback):
(WebCore::InspectorReplayAgent::switchSession):
(WebCore::InspectorReplayAgent::insertSessionSegment):
(WebCore::InspectorReplayAgent::removeSessionSegment):
Provide a public API for modifying sessions. This is the backend support
for user editing of replay sessions to add/remove specific segments.
(WebCore::InspectorReplayAgent::findSession):
(WebCore::InspectorReplayAgent::findSegment):
(WebCore::InspectorReplayAgent::getAvailableSessions):
(WebCore::InspectorReplayAgent::getSerializedSession):
(WebCore::InspectorReplayAgent::getSerializedSegment):
Most of the replay protocol domain speaks in terms of sesssion and
segment identifiers. These functions return the actual data associated
with these identifiers.
* inspector/InspectorReplayAgent.h: Added.
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::InstrumentingAgents):
(WebCore::InstrumentingAgents::reset):
* inspector/InstrumentingAgents.h:
(WebCore::InstrumentingAgents::inspectorReplayAgent): Added.
(WebCore::InstrumentingAgents::setInspectorReplayAgent): Added.
* inspector/protocol/Replay.json: Added.
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::replayController): Added.
* platform/Logging.h: Add WebReplay logging channel.
* replay/AllReplayInputs.h: Added. Simplifies importing all input definitions.
* replay/CapturingInputCursor.cpp: Added.
(WebCore::CapturingInputCursor::CapturingInputCursor):
(WebCore::CapturingInputCursor::~CapturingInputCursor):
(WebCore::CapturingInputCursor::create):
(WebCore::CapturingInputCursor::storeInput):
(WebCore::CapturingInputCursor::loadInput):
(WebCore::CapturingInputCursor::uncheckedLoadInput):
* replay/CapturingInputCursor.h: Added.
* replay/EventLoopInput.h:
(WebCore::EventLoopInputBase::EventLoopInputBase):
(WebCore::EventLoopInputBase::timestamp):
(WebCore::EventLoopInputBase::setTimestamp): Support deserialization.
* replay/EventLoopInputDispatcher.cpp: Added. This class encapsulates the timers
and measurements used to dispatch event loop inputs during replay.
(WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
(WebCore::EventLoopInputDispatcher::run):
(WebCore::EventLoopInputDispatcher::pause):
(WebCore::EventLoopInputDispatcher::timerFired):
(WebCore::EventLoopInputDispatcher::dispatchInputSoon):
(WebCore::EventLoopInputDispatcher::dispatchInput):
* replay/EventLoopInputDispatcher.h: Added.
(WebCore::EventLoopInputDispatcherClient::EventLoopInputDispatcherClient):
(WebCore::EventLoopInputDispatcherClient::~EventLoopInputDispatcherClient):
* replay/FunctorInputCursor.h: Added.
(WebCore::FunctorInputCursor::~FunctorInputCursor):
(WebCore::FunctorInputCursor::forEachInputInQueue):
(WebCore::FunctorInputCursor::FunctorInputCursor):
(WebCore::FunctorInputCursor::storeInput):
(WebCore::FunctorInputCursor::loadInput):
(WebCore::FunctorInputCursor::uncheckedLoadInput):
* replay/ReplayController.cpp: Added.
(WebCore::ReplayController::ReplayController):
(WebCore::ReplayController::switchSession):
(WebCore::ReplayController::createSegment):
(WebCore::ReplayController::completeSegment):
(WebCore::ReplayController::loadSegment):
(WebCore::ReplayController::unloadSegment):
(WebCore::ReplayController::startCapturing):
(WebCore::ReplayController::stopCapturing):
(WebCore::ReplayController::startPlayback):
(WebCore::ReplayController::pausePlayback):
(WebCore::ReplayController::cancelPlayback):
(WebCore::ReplayController::replayToPosition):
(WebCore::ReplayController::frameDetached):
(WebCore::ReplayController::frameNavigated):
(WebCore::ReplayController::loadedSession):
(WebCore::ReplayController::loadedSegment):
(WebCore::ReplayController::activeInputCursor):
(WebCore::ReplayController::dispatcher):
(WebCore::ReplayController::willDispatchInput):
(WebCore::ReplayController::didDispatchInput):
(WebCore::ReplayController::didDispatchFinalInput):
* replay/ReplayController.h: Added.
(WebCore::ReplayPosition::ReplayPosition):
(WebCore::ReplayPosition::operator<):
(WebCore::ReplayPosition::operator==):
* replay/ReplayInputCreationMethods.cpp: Added.
Static factory implementations for inputs belong here.
(WebCore::InitialNavigation::createFromPage):
* replay/ReplayInputDispatchMethods.cpp: Added.
All dispatch() implementations for generated replay inputs belong here.
(WebCore::BeginSegmentSentinel::dispatch):
(WebCore::EndSegmentSentinel::dispatch):
(WebCore::InitialNavigation::dispatch):
* replay/ReplayInputTypes.cpp:
(WebCore::ReplayInputTypes::ReplayInputTypes):
* replay/ReplayInputTypes.h: Define strings for WebCore inputs.
* replay/ReplaySession.cpp: Added.
(WebCore::ReplaySession::create):
(WebCore::ReplaySession::ReplaySession):
(WebCore::ReplaySession::~ReplaySession):
(WebCore::ReplaySession::appendSegment):
(WebCore::ReplaySession::insertSegment):
(WebCore::ReplaySession::removeSegment):
* replay/ReplaySession.h: Added.
(WebCore::ReplaySession::identifier):
(WebCore::ReplaySession::timestamp):
(WebCore::ReplaySession::size):
(WebCore::ReplaySession::at):
(WebCore::ReplaySession::begin):
(WebCore::ReplaySession::end):
* replay/ReplaySessionSegment.cpp: Added.
(WebCore::ReplaySessionSegment::create):
(WebCore::ReplaySessionSegment::ReplaySessionSegment):
(WebCore::ReplaySessionSegment::~ReplaySessionSegment):
(WebCore::ReplaySessionSegment::createCapturingCursor):
(WebCore::ReplaySessionSegment::createReplayingCursor):
(WebCore::ReplaySessionSegment::createFunctorCursor):
* replay/ReplaySessionSegment.h: Added.
(WebCore::ReplaySessionSegment::identifier):
(WebCore::ReplaySessionSegment::timestamp):
* replay/ReplayingInputCursor.cpp: Added.
(WebCore::ReplayingInputCursor::ReplayingInputCursor):
(WebCore::ReplayingInputCursor::~ReplayingInputCursor):
(WebCore::ReplayingInputCursor::create):
(WebCore::ReplayingInputCursor::storeInput):
(WebCore::ReplayingInputCursor::loadInput):
(WebCore::ReplayingInputCursor::uncheckedLoadInput):
* replay/ReplayingInputCursor.h: Added.
* replay/SegmentedInputStorage.cpp: Added.
(WebCore::queueTypeToLogPrefix):
(WebCore::jsonStringForInput):
(WebCore::offsetForInputQueue):
(WebCore::SegmentedInputStorage::SegmentedInputStorage):
(WebCore::SegmentedInputStorage::~SegmentedInputStorage):
(WebCore::SegmentedInputStorage::load):
(WebCore::SegmentedInputStorage::store):
(WebCore::SegmentedInputStorage::queueSize):
* replay/SegmentedInputStorage.h: Added.
* replay/SerializationMethods.cpp: Added.
Specializations of EncodingTraits for WebCore types belong here.
(JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
(JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
(JSC::EncodingTraits<SecurityOrigin>::encodeValue):
(JSC::EncodingTraits<SecurityOrigin>::decodeValue):
(JSC::EncodingTraits<URL>::encodeValue):
(JSC::EncodingTraits<URL>::decodeValue):
* replay/SerializationMethods.h: Added.
* replay/WebInputs.json: Added.
In this inital patch, we define BeginSegmentSentinel,
EndSegmentSentinel, and InitialNavigation inputs.
2014-03-03 Antoine Quint <graouts@webkit.org>
Respect SVG fragment identifiers in <img> src attribute
https://bugs.webkit.org/show_bug.cgi?id=129387
Reviewed by Dirk Schulze.
Following Dirk Schulze's suggestion, we set the URL on the SVGImage itself and handle the URL's
fragment identifier at draw time in the SVGImage itself, which will provide a sounder base for
handling of fragment identifier in SVG resource URLs in CSS properties, and should also deal
with the crasher reported in http://webkit.org/b/129498 since there is a guaranteed Frame at the
time we call SVGImage::draw().
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.cpp:
* svg/graphics/SVGImageForContainer.h:
2014-03-03 Laszlo Vidacs <lvidacs.u-szeged@partner.samsung.com>
Move function calls outside loop in dom
https://bugs.webkit.org/show_bug.cgi?id=126525
Reviewed by Csaba Osztrogonác.
Store the result of length() in a local variable and use it in each iteration.
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::isXMLMIMEType):
* dom/ElementData.cpp:
(WebCore::UniqueElementData::UniqueElementData):
* dom/EventContext.cpp:
(WebCore::TouchEventContext::checkReachability):
2014-03-03 Tomas Popela <tpopela@redhat.com>
[GTK] webkit_dom_range_compare_boundary_points fails when 0 is passed as how parameter
https://bugs.webkit.org/show_bug.cgi?id=129145
Reviewed by Carlos Garcia Campos.
While generating GObject DOM API the generator should skip non pointer
types while generating the g_return_val_if_fail macro.
This will avoid the situation when Range.START_TO_START is defined as 0,
thus the webkit_dom_range_compare_boundary_points function will fail
everytime it is called with 0 as how value.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
2014-03-03 Jozsef Berta <jberta.u-szeged@partner.samsung.com>
[cmake] *Names.cpp file should be regenerated after touching StaticString.pm
https://bugs.webkit.org/show_bug.cgi?id=129031
Reviewed by Csaba Osztrogonác.
* CMakeLists.txt: Added make_names.pl dependencies: bindings/scripts/Hasher.pm and bindings/scripts/StaticString.pm
2014-03-03 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GTK] Multimedia controls captions icon needs its own metaphor
https://bugs.webkit.org/show_bug.cgi?id=129091
Reviewed by Martin Robinson.
As we got the new icon created, we used it with a fallback to the
old icon to keep run-time compatibility.
No new tests, current ones suffice.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
Replicated RenderThemeGtk::paintMediaButton to check for the
necessary icon first and do the fallback to the old and stock
icons.
* platform/gtk/RenderThemeGtk2.cpp:
(WebCore::getStockIconForWidgetType): Added ASSERT for non-empty
icon name.
(WebCore::getStockSymbolicIconForWidgetType): Check for non empty
icon name before calling getStockIconForWidgetType. Fixed coding
style.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::getStockIconForWidgetType): Added ASSERT for non-empty
icon name.
(WebCore::getStockSymbolicIconForWidgetType): Check for non empty
icon name before calling getStockIconForWidgetType. Fixed coding
style.
2014-03-02 Benjamin Poulain <benjamin@webkit.org>
Add a fallback path for compiling the remaining attribute checkers
https://bugs.webkit.org/show_bug.cgi?id=129580
Reviewed by Darin Adler.
The remaining attribute checkers appear to be less common than the simple value match.
This patch adds them to SelectorCompiler for completeness but no attempt is made at optimizing them,
they all default to function calls.
If the assumption that those selectors are not common turn out to be incorrect, we should see
the function calls in profiles and optimize them as needed.
* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches):
If we get anything but attribute match here, something has gone horribly wrong. Update the code
to fail if that were to happen.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
Add the missing match type to the selector fragment.
Begin, End, Contain cannot match an empty value per specification. We can test that at compile time
and fail immediately. See http://www.w3.org/TR/css3-selectors/#attribute-substrings
List has the extra requirement that a value containing a space does not match anything. It also cannot
match with an empty string. See http://www.w3.org/TR/css3-selectors/#attribute-representation
(WebCore::SelectorCompiler::attributeValueBeginsWith):
(WebCore::SelectorCompiler::attributeValueContains):
(WebCore::SelectorCompiler::attributeValueEndsWith):
(WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
(WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
The slow fallbacks.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
A generic code generator making function call to match an attribute value.
2014-02-25 Andreas Kling <akling@apple.com>
JSDOMWindow::commonVM() should return a reference.
<https://webkit.org/b/129293>
Since this function always returns a VM and never null, make it
return a reference instead. There are more VM getters that never
return null, but I tried to keep the patch from snowballing.
Reviewed by Geoff Garen.
2014-03-02 Timothy Hatcher <timothy@apple.com>
Remove ASSERT in ~IDBRequest since it is firing during legitimate uses in Web Inspector.
Adding the ASSERT back is tracked by https://webkit.org/b/129593.
https://bugs.webkit.org/show_bug.cgi?id=129328
Reviewed by Sam Weinig.
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::~IDBRequest):
2014-03-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r164961.
http://trac.webkit.org/changeset/164961
https://bugs.webkit.org/show_bug.cgi?id=129596
Caused many assertion failures (Requested by ap on #webkit).
* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
2014-03-02 Darin Adler <darin@apple.com>
Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
https://bugs.webkit.org/show_bug.cgi?id=129592
Reviewed by Sam Weinig.
* WebCore.exp.in: Re-sorted this file. Not sure how it got unsorted.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::stringForVisiblePositionRange): Call TextIterator::text
instead of TextIterator::length. Also removed unneeded special case for empty string
and exception code.
(WebCore::AccessibilityObject::lengthForVisiblePositionRange): Ditto.
* accessibility/AccessibilityObject.h: Include TextIteratorBehavior.h instead of
TextIterator.h.
* accessibility/AccessibilityRenderObject.cpp: Include TextIterator.h.
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm: Removed unneeded
TextIterator.h include.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): Call
TextIterator::text instead of TextIterator::length.
* dom/Element.cpp: Include TextIterator.h.
* dom/Node.cpp: Include Range.h.
* dom/Position.cpp:
(WebCore::Position::isCandidate): Cast to RenderBlockFlow since that's what the
type check above does. Use a return statement instead of an else for better flow.
(WebCore::Position::leadingWhitespacePosition): Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
(WebCore::Position::trailingWhitespacePosition): Ditto.
* dom/Range.cpp:
(WebCore::Range::firstNode): Added a FIXME about code that clearly does not
belong. This is something we really need to fix.
* editing/AlternativeTextController.cpp: Include TextIterator.h.
* editing/ApplyStyleCommand.cpp: Ditto.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit): Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
* editing/Editor.h: Include TextIteratorBehavior.h instead of TextIterator.h.
* editing/HTMLInterchange.cpp:
(WebCore::convertHTMLTextToInterchangeFormat): Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
* editing/SpellingCorrectionCommand.cpp: Include TextIterator.h.
* editing/TextIterator.h: Moved isCollapsibleWhitespace from here into
htmlediting.h and renamed it deprecatedIsCollapsibleWhitespace.
* editing/TextIterator.cpp: Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
* editing/TypingCommand.cpp: Include TextIterator.h.
* editing/VisibleUnits.cpp:
(WebCore::previousBoundary): Call TextIterator::text instead of
TextIterator::length.
(WebCore::nextBoundary): Ditto.
* editing/htmlediting.cpp: Include TextIterator.h.
* editing/htmlediting.h: Removed non-helpful section comments.
Added FIXME about isWhitespace. Added deprecatedIsCollapsibleWhitespace,
formerly not deprecated and in TextIterator.h.
* editing/markup.cpp: Include TextIterator.h.
* html/HTMLTextAreaElement.cpp: Include TextIterator.h.
* page/ContextMenuController.cpp:
(WebCore::selectionContainsPossibleWord): Call TextIterator::text
instead of TextIterator::length and TextIterator::characterAt.
* page/EventHandler.cpp: Sorted conditional includes alphabetically by condition.
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]): Call TextIterator::text
instead of TextIterator::length.
2014-03-02 Benjamin Poulain <benjamin@webkit.org>
Add a fallback path for compiling the remaining attribute checkers
https://bugs.webkit.org/show_bug.cgi?id=129580
Reviewed by Darin Adler.
The remaining attribute checkers appear to be less common than the simple value match.
This patch adds them to SelectorCompiler for completeness but no attempt is made at optimizing them,
they all default to function calls.
If the assumption that those selectors are not common turn out to be incorrect, we should see
the function calls in profiles and optimize them as needed.
* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches):
If we get anything but attribute match here, something has gone horribly wrong. Update the code
to fail if that were to happen.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
Add the missing match type to the selector fragment.
Begin, End, Contain cannot match an empty value per specification. We can test that at compile time
and fail immediately. See http://www.w3.org/TR/css3-selectors/#attribute-substrings
List has the extra requirement that a value containing a space does not match anything. It also cannot
match with an empty string. See http://www.w3.org/TR/css3-selectors/#attribute-representation
(WebCore::SelectorCompiler::attributeValueBeginsWith):
(WebCore::SelectorCompiler::attributeValueContains):
(WebCore::SelectorCompiler::attributeValueEndsWith):
(WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
(WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
The slow fallbacks.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
A generic code generator making function call to match an attribute value.
2014-03-02 Darin Adler <darin@apple.com>
Fix build for case-sensitive file systems.
* platform/UserActivity.h: Runloop -> RunLoop.
2014-03-02 Gavin Barraclough <barraclough@apple.com>
HysteresisTimer should use WebCore::Timer
https://bugs.webkit.org/show_bug.cgi?id=129587
Reviewed by Sam Weinig.
* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::HysteresisActivity):
(WebCore::HysteresisActivity::hysteresisTimerFired):
- RunLoop::Timer -> WebCore::Timer.
* platform/UserActivity.h:
2014-03-02 Darin Adler <darin@apple.com>
Split TextIteratorBehavior into a separate header
https://bugs.webkit.org/show_bug.cgi?id=129578
Reviewed by Sam Weinig.
This is in preparation to greatly cut down on includes of TextIterator.h.
* GNUmakefile.list.am: Added new header.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* editing/FindOptions.h: Changed typedef to unsigned char;
there is no reason to store these in a 32-bit integer.
* editing/TextIterator.h: Added include of TextIteratorBehavior.h
and moved comments about the meanings of flag bits to their definition.
* editing/TextIteratorBehavior.h: Added.
* WebCore.exp.in: Updated for type changes.
2014-03-02 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Form controls handling
https://bugs.webkit.org/show_bug.cgi?id=129344
<rdar://problem/16053643>
Reviewed by Simon Fraser.
Updates localizable strings and adds some exports.
* English.lproj/Localizable.strings:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
2014-03-02 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Pages using tiled compositing layers allocate too many tiles on zoom
https://bugs.webkit.org/show_bug.cgi?id=129471
Reviewed by Simon Fraser.
A few issues with TileController were causing sublayers of the root layers
to tile incorrect surfaces on zoom.
First, the exposedRect API was not updating the sublayers. The layers go correctly
into tiling mode, but the tiles cover the full document instead of the visible area.
The other major issue was the margins being applied to the coverage size in document
coordinates. Since each margin is 512px, the total coverage size after zoom was
gigantic.
To solve this, this patch switch from the exposedRect API to the generic concept
of VisibleExtentContentRect introduced for iOS WebKit1.
* WebCore.exp.in:
* platform/ScrollView.h:
Define a VisibleExtentContentRect on the scrollview itself when there is no
platformWidget().
The case with inside frame is untested due to stability issues :(.
(see <rdar://problem/16199219>)
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::computeTileCoverageRect):
Remove the margin from the tile coverage.
On iOS, m_tileCoverage is always zero at the moment. Previously, the tile coverage
was artificially extended by the margins. With the margins removed, I temporarily added
a factor of 1.5.
ViewUpdateDispatcher has all the information to compute a great tile coverage, I will need
a follow up patch to fix that.
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::visibleExtentContentRect):
(WebCore::ScrollView::setVisibleExtentContentRect):
2014-03-02 Darin Adler <darin@apple.com>
Sort Mac platform export files so they merge better
https://bugs.webkit.org/show_bug.cgi?id=129581
Reviewed by Sam Weinig.
* WebCore.exp.in: Ran the new sort-export-file on this.
2014-03-02 Dean Jackson <dino@apple.com>
Add protected casting to FilterOperation classes.
https://bugs.webkit.org/show_bug.cgi?id=124062
Reviewed by Sam Weinig.
Use the type cast macro generators to produce some toFilterOperation-style
functions, and then use them in our PlatformCA filter code.
Test: css3/filters/animation-from-initial-values-with-color-matrix.html
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Use the toFilterOperation methods, in
some cases removing the unnecessary double cast.
(PlatformCAFilters::filterValueForOperation):
(PlatformCAFilters::colorMatrixValueForFilter):
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::BasicColorMatrixFilterOperation::blend):
(WebCore::BasicColorMatrixFilterOperation::operator==): Move this to the .cpp file so it can use the casting methods.
(WebCore::BasicComponentTransferFilterOperation::blend):
(WebCore::BasicComponentTransferFilterOperation::operator==): Ditto.
* platform/graphics/filters/FilterOperation.h: Add the casting macros.
2014-03-02 Yoav Weiss <yoav@yoav.ws>
Fix srcset related bugs
https://bugs.webkit.org/show_bug.cgi?id=129539
Fixed a bug reported against Blink's srcset implementation at https://code.google.com/p/chromium/issues/detail?id=347998
When both src and srcset had only 1x descriptors and the DPR was higher than 1, the src's resource was picked.
Also fixed the invalid descriptor handling, which wasn't aligned with the spec, and therefore was not as forward compatible as it should be.
Invalid descriptors caused the entire resource to be ignored, rather than just the descriptors themselves.
Reviewed by Andreas Kling.
Tests: fast/hidpi/image-srcset-invalid-descriptor.html
fast/hidpi/image-srcset-src-selection-1x-both.html
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseDescriptors):
(WebCore::parseImagesWithScaleFromSrcsetAttribute):
(WebCore::bestFitSourceForImageAttributes):
2014-03-01 Gavin Barraclough <barraclough@apple.com>
Split UserActivity, simplify PageThrottler
https://bugs.webkit.org/show_bug.cgi?id=129551
Reviewed by Darin Adler.
The class UserActivity currently implements two things – a hysteresis mechanism, and
an abstraction of NSActivity controlled by that mechanism. PageThrottler implements
its own hysteresis mechanism, which directly controls DOM timer throttling and also
controls a couple of UserActivities, giving a total of 3 separate hysteresis mechanisms,
layered two deep.
Split UserActivity into three, with HysteresisActivity implementing an abstract hysteresis
mechanism, UserActivity::Impl controlling the NSActivity, and then UserActivity combining
these two back together. The interface to UserActivity is unchanged.
Remove PageThrottler's bespoke hysteresis, replacing it with a use of HysteresisActivity.
Replace the two UserActivities with a single UserActivity::Impl, so there are no longer
layered hysteresis mechanisms.
* WebCore.exp.in:
- exports changed.
* WebCore.xcodeproj/project.pbxproj:
- added HysteresisActivity.h.
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
- if the page starts visible, begin activity. If it starts hidden throttle DOM timers.
(WebCore::PageThrottler::hiddenPageDOMTimerThrottlingStateChanged):
- when the DOM timer throttling setting changes, make sure we update.
(WebCore::PageThrottler::incrementActivityCount):
(WebCore::PageThrottler::decrementActivityCount):
- when m_activityCount changes update the hysteresis state.
(WebCore::PageThrottler::updateHysteresis):
(WebCore::PageThrottler::setViewState):
- when IsVisuallyIdle changes update the hysteresis state.
(WebCore::PageThrottler::started):
(WebCore::PageThrottler::stopped):
- callbacks from HysteresisActivity, these control m_activity and DOM timer throttling.
* page/PageThrottler.h:
(WebCore::PageThrottler::didReceiveUserInput):
(WebCore::PageThrottler::pluginDidEvaluate):
- call impulse to temporarily enable the activity.
* platform/HysteresisActivity.h: Copied from Source/WebCore/platform/UserActivity.h.
(WebCore::HysteresisActivity::HysteresisActivity):
- constructor takes a delegate optionally a timeout.
(WebCore::HysteresisActivity::start):
- start activity immediately. If stopped, call started method on delegate. If in timeout period, cancel the timer.
(WebCore::HysteresisActivity::stop):
- stop activity after hysteresis. If started, initiate timeout period.
(WebCore::HysteresisActivity::impulse):
- ensure activity for at least the timeout period.
(WebCore::HysteresisActivity::hysteresisTimerFired):
- delayed stop - when the timer fires call stopped on the delegate.
* platform/UserActivity.cpp:
(WebCore::UserActivity::Impl::Impl):
(WebCore::UserActivity::Impl::beginActivity):
(WebCore::UserActivity::Impl::endActivity):
- nop implementation.
(WebCore::UserActivity::UserActivity):
- UserActivity maintains existing interface with hysteresis.
(WebCore::UserActivity::started):
(WebCore::UserActivity::stopped):
- callbacks from HysteresisTimer; forward to Impl.
* platform/UserActivity.h:
* platform/mac/UserActivityMac.mm:
(WebCore::UserActivity::Impl::Impl):
- UserActivity::Impl, abstraction for NSActivity without added hysteresis.
(WebCore::UserActivity::Impl::beginActivity):
- allocate NSActivity.
(WebCore::UserActivity::Impl::endActivity):
- release NSActivity.
2014-03-02 Brian Burg <bburg@apple.com>
DocumentLoader should keep maps of ResourceLoaders instead of sets
https://bugs.webkit.org/show_bug.cgi?id=129388
Reviewed by Darin Adler.
For web replay, we need to be able to pull a ResourceLoader instance by
identifier from the DocumentLoader. This is easy to do if we convert
ResourceLoaderSet to ResourceLoaderMap, keyed by the loader's identifier.
Added assertions whenever adding or removing from the map to ensure
that we don't try to add duplicates or resources with zero identifiers.
No new tests required. No functionality was added.
* loader/DocumentLoader.cpp:
(WebCore::cancelAll):
(WebCore::setAllDefersLoading):
(WebCore::areAllLoadersPageCacheAcceptable):
(WebCore::DocumentLoader::addSubresourceLoader):
(WebCore::DocumentLoader::removeSubresourceLoader):
(WebCore::DocumentLoader::addPlugInStreamLoader):
(WebCore::DocumentLoader::removePlugInStreamLoader):
(WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
* loader/DocumentLoader.h:
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::create): Only add the loader
to the document loader's map if it initialized successfully.
The old code was probably leaking resource loaders that failed to
initialize.
* loader/mac/DocumentLoaderMac.cpp:
(WebCore::scheduleAll):
(WebCore::unscheduleAll):
2014-03-02 Dirkjan Ochtman <d.ochtman@activevideo.com>
Support ENABLE_ENCRYPTED_MEDIA in cmake builds
https://bugs.webkit.org/show_bug.cgi?id=129575
Reviewed by Philippe Normand.
No new tests, only fixes the build.
* CMakeLists.txt:
Add support for ENABLE_ENCRYPTED_MEDIA.
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::close):
Assign nullptr instead of 0 to OwnPtr to appease gcc-4.7.
2014-03-01 Tim Horton <timothy_horton@apple.com>
WebKit2 View Gestures (Smart Magnification): Support for iOS
https://bugs.webkit.org/show_bug.cgi?id=129146
<rdar://problem/16032668>
Reviewed by Benjamin Poulain.
* WebCore.exp.in:
Add an export.
2014-03-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r164929 and r164934.
http://trac.webkit.org/changeset/164929
http://trac.webkit.org/changeset/164934
https://bugs.webkit.org/show_bug.cgi?id=129570
Caused assertions on two srcset tests (Requested by ap on
#webkit).
* html/parser/HTMLParserIdioms.cpp:
(WebCore::isHTMLSpaceOrComma):
(WebCore::parseImagesWithScaleFromSrcsetAttribute):
(WebCore::bestFitSourceForImageAttributes):
2014-03-01 Dan Bernstein <mitz@apple.com>
Build fix.
* html/parser/HTMLParserIdioms.cpp: Removed an unused function.
2014-03-01 David Kilzer <ddkilzer@apple.com>
Ensure keySplines is valid in SMIL animations
<http://webkit.org/b/129547>
<rdar://problem/15676128>
Reviewed by Darin Adler.
Merged from Blink (patch by Philip Rogers):
https://src.chromium.org/viewvc/blink?revision=156452&view=revision
http://crbug.com/276111
This patch fixes a crash in SMIL animations when keySplines are not
specified. The SMIL spec is clear on this:
http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncCalcMode
"If there are any errors in the keyTimes specification (bad values,
too many or too few values), the animation will have no effect."
This patch simply checks that keyTimes is not empty. Previously,
splinesCount was set to be m_keySplines.size() + 1 in
SVGAnimationElement.cpp; this patch changes splinesCount to be equal
to m_keySplines.size() to make the logic easier to follow and to
match other checks in SVGAnimationElement::startedActiveInterval.
Test: svg/animations/animate-keysplines-crash.html
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::startedActiveInterval):
2014-03-01 Benjamin Poulain <benjamin@webkit.org>
Tighten minimumRegisterRequirements()
https://bugs.webkit.org/show_bug.cgi?id=129538
Reviewed by Andreas Kling.
Fix small things that made minimumRegisterRequirements() a little optimistic
when dealing with attributes.
Test: fast/selectors/adjacent-descendant-tail-register-requirement.html
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
Attribute Set does not do value matching, the case sensitive value matching is irrelevant
The problem is that flag is also used by minimumRegisterRequirements()
to find if one more register is needed.
Set the flag to case sensitive to avoid reserving one extra register.
(WebCore::SelectorCompiler::minimumRegisterRequirements):
Use a new backtrackingFlag to know if there is a descendant tail, thus a backtracking register
reserved.
This is better than using the backtracking action because the backtracking chain could be
an adjacent chain inside a descendant chain.
The flags are designed for that, just set one for minimumRegisterRequirements().
The 2 extra registers for the attribute count and address become limited to all attributes
except the last one. We don't keep a copy for the last matching, those registers were not needed.
(WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
2014-03-01 Pratik Solanki <psolanki@apple.com>
[iOS] selectionImageForcingBlackText should return autoreleased object
https://bugs.webkit.org/show_bug.cgi?id=129437
<rdar://problem/15810384>
Reviewed by Darin Adler.
* bindings/objc/DOM.mm:
(-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
2014-03-01 Yoav Weiss <yoav@yoav.ws>
Fix srcset related bugs
https://bugs.webkit.org/show_bug.cgi?id=129539
Fixed a bug reported against Blink's srcset implementation at https://code.google.com/p/chromium/issues/detail?id=347998
When both src and srcset had only 1x descriptors and the DPR was higher than 1, the src's resource was picked.
Also fixed the invalid descriptor handling, which wasn't aligned with the spec, and therefore was not as forward compatible as it should be.
Invalid descriptors caused the entire resource to be ignored, rather than just the descriptors themselves.
Reviewed by Andreas Kling.
Tests: fast/hidpi/image-srcset-invalid-descriptor.html
fast/hidpi/image-srcset-src-selection-1x-both.html
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseDescriptors):
(WebCore::parseImagesWithScaleFromSrcsetAttribute):
(WebCore::bestFitSourceForImageAttributes):
2014-03-01 Darin Adler <darin@apple.com>
Improve "bad parent" and "bad child list" assertions in line boxes
https://bugs.webkit.org/show_bug.cgi?id=125656
Reviewed by Sam Weinig.
My previous fix for this problem was incomplete. This continuation of that fix addresses
the flaw in the original and adds additional lifetime checking so problems can be seen in
debug builds without a memory debugger.
* rendering/InlineBox.cpp:
(WebCore::InlineBox::assertNotDeleted): Added. Poor man's memory debugging helper.
(WebCore::InlineBox::~InlineBox): Refactored body into a new function named
invalidateParentChildList. Added code to update the deletion sentinel to record
that this object is deleted.
(WebCore::InlineBox::setHasBadParent): Moved here from header since this debug-only
feature does not need to be inlined. Added a call to assertNotDeleted.
(WebCore::InlineBox::invalidateParentChildList): Added. Refactored from the destructor,
this is used by RenderTextLineBoxes.
* rendering/InlineBox.h: Added the deletion sentinel, and called it in the parent
function. Also changed the expansion/setExpansion functions to use the type name "int",
since we don't use the type name "signed" in the WebKit coding style.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::~InlineFlowBox): Call setHasBadChildList rather than doing the
setHasBadParent work on children directly, to avoid code duplication.
(WebCore::InlineFlowBox::setHasBadChildList): Moved here from header. Added code to set
"has bad parent" on all children, something we previously did only on destruction. Also
added assertNotDeleted.
(WebCore::InlineFlowBox::checkConsistency): Added call to assertNotDeleted. Also tweaked
code style and variable names a little bit.
* rendering/InlineFlowBox.h: Moved setHasBadChildList out of the header when it's on.
The empty version for ASSERT_WITH_SECURITY_IMPLICATION_DISABLED is still in the header.
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::invalidateParentChildLists): Call the new
InlineBox::invalidateParentChildList function instead of calling setHasBadChildList directly.
The new function checks m_hasBadParent, something we couldn't do here.
2014-03-01 Benjamin Poulain <benjamin@webkit.org>
Optimized querySelector(All) when selector contains #id
https://bugs.webkit.org/show_bug.cgi?id=116502
Reviewed by Andreas Kling.
Test: fast/selectors/querySelector-id-filtering.html
The idea of this patch is to perform querySelector on a subtree
rooted at the last element with #id matching. For example, if we have the selector
"#foobar div a", we start by looking for the element with ID foobar in the TreeScope
cache, and start matching the children from there.
The idea comes from Rune for
https://chromium.googlesource.com/chromium/blink/+/1cd83d3588973a02ab15d94b1b05a28620853624
but the code as diverged too much so it had to be reimplemented specifically for WebKit.
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::operator=):
* css/CSSSelectorList.h:
(WebCore::CSSSelectorList::~CSSSelectorList):
* css/StyleRule.h:
(WebCore::StyleRule::wrapperAdoptSelectorList):
(WebCore::StyleRulePage::wrapperAdoptSelectorList):
* dom/SelectorQuery.cpp:
(WebCore::isSingleTagNameSelector):
(WebCore::isSingleClassNameSelector):
(WebCore::findIdMatchingType):
(WebCore::SelectorDataList::SelectorDataList):
(WebCore::filterRootById):
(WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
(WebCore::SelectorDataList::execute):
(WebCore::SelectorQuery::SelectorQuery):
(WebCore::SelectorQueryCache::add):
* dom/SelectorQuery.h:
(WebCore::SelectorDataList::SelectorData::SelectorData):
2014-02-28 Alexey Proskuryakov <ap@apple.com>
Node::compareDocumentPosition leaks memory structure
https://bugs.webkit.org/show_bug.cgi?id=120244
Reviewed by Ryosuke Niwa.
* dom/Node.cpp: (WebCore::Node::compareDocumentPosition): Don't do it.
2014-03-01 David Kilzer <ddkilzer@apple.com>
Fix lifetime handling of SVGPropertyTearOffs
<http://webkit.org/b/129211>
<rdar://problem/15696025>
Reviewed by Maciej Stachowiak.
Merged from Blink (patch by Ojan Vafai):
https://src.chromium.org/viewvc/blink?revision=157801&view=revision
http://crbug.com/288771
-Replace SVGStaticPropertyWithParentTearOff with SVGMatrixTearOff
since it's only used in that one place. This means we can get rid
of the templatizing and the method pointer.
-Change SVGPropertyTearOff to keep track of it's child tearoffs
and call detachWrapper on its child tearoffs when it's destroyed
or when it's wrapper is detached.
-Have SVGPropertyTearOff hold WeakPtrs to the child tearoffs
to avoid having a cycle.
Test: svg/transforms/svg-matrix-tearoff-crash.html
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue):
* svg/properties/SVGMatrixTearOff.h: Renamed from Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h.
(WebCore::SVGMatrixTearOff::create):
(WebCore::SVGMatrixTearOff::commitChange):
(WebCore::SVGMatrixTearOff::SVGMatrixTearOff):
* svg/properties/SVGPropertyTearOff.h:
(WebCore::SVGPropertyTearOff::addChild):
(WebCore::SVGPropertyTearOff::detachChildren):
2014-03-01 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix after r164913.
* platform/CountedUserActivity.h: Some ports don't (yet) support forwarding headers for WebCore,
so UserActivity.h should be included as non-forwarding.
2014-03-01 Gavin Barraclough <barraclough@apple.com>
Change PageActivityAssertionToken to use a WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=129526
Reviewed by Sam Weinig.
PageThrottler effectively implements a bespoke weak pointer mechanism; remove this & just use WeakPtr.
* page/PageActivityAssertionToken.cpp:
(WebCore::PageActivityAssertionToken::PageActivityAssertionToken):
(WebCore::PageActivityAssertionToken::~PageActivityAssertionToken):
- addActivityToken->incrementActivityCount, removeActivityToken->decrementActivityCount
* page/PageActivityAssertionToken.h:
- removed invalidate, made m_throttler a WeakPtr
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
- initialize m_weakPtrFactory, m_activityCount.
(WebCore::PageThrottler::~PageThrottler):
- removed called to invalidate.
(WebCore::PageThrottler::startThrottleHysteresisTimer):
- m_activityTokens.size()->m_activityCount
(WebCore::PageThrottler::throttleHysteresisTimerFired):
- m_activityTokens.size()->m_activityCount
(WebCore::PageThrottler::incrementActivityCount):
- m_activityTokens.add->++
(WebCore::PageThrottler::decrementActivityCount):
- m_activityTokens.remove->--
* page/PageThrottler.h:
(WebCore::PageThrottler::weakPtr):
- replaced HashSet with WeakPtrFactory & count.
2014-03-01 Gavin Barraclough <barraclough@apple.com>
Split UserActivity/CountedUserActivity
https://bugs.webkit.org/show_bug.cgi?id=129520
Reviewed by Sam Weinig.
UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
* WebCore.exp.in:
- beginActivity->start, endActivity->stop.
* WebCore.xcodeproj/project.pbxproj:
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
(WebCore::PageThrottler::~PageThrottler):
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
(WebCore::PageThrottler::setIsVisuallyIdle):
- beginActivity->increment, endActivity->decrement.
* page/PageThrottler.h:
- UserActivity->CountedUserActivity for m_pageActivity
* platform/CountedUserActivity.h: Copied from Source/WebCore/platform/UserActivity.h.
(WebCore::CountedUserActivity::CountedUserActivity):
(WebCore::CountedUserActivity::increment):
(WebCore::CountedUserActivity::decrement):
- Added, provides counted interface to UserActivity.
* platform/UserActivity.cpp:
(WebCore::UserActivity::UserActivity):
- m_count removed
(WebCore::UserActivity::start):
(WebCore::UserActivity::stop):
- beginActivity->start, endActivity->stop, implentation now empty.
* platform/UserActivity.h:
- beginActivity->start, endActivity->stop, m_count moved to HAVE(NS_ACTIVITY)
* platform/mac/UserActivityMac.mm:
(WebCore::UserActivity::UserActivity):
- m_count->m_started
(WebCore::UserActivity::isValid):
- m_count->m_started
(WebCore::UserActivity::start):
(WebCore::UserActivity::stop):
- beginActivity->start, endActivity->stop, no longer nest
2014-02-28 Benjamin Poulain <benjamin@webkit.org>
Caller saved registers can be accidentally discarded when clearing the local stack
https://bugs.webkit.org/show_bug.cgi?id=129532
Reviewed by Andreas Kling.
Tests: fast/selectors/tree-modifying-case-insensitive-selectors.html
fast/selectors/tree-modifying-selectors.html
StackAllocator::discard() no longer make sense now that we can use caller saved regsiter.
We should instead discard everything up to the beginning of the local stack.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::popAndDiscardUpTo):
2014-02-28 Andy Estes <aestes@apple.com>
[iOS] FrameLoader has a NULL m_progressTracker when initialized with initForSynthesizedDocument()
https://bugs.webkit.org/show_bug.cgi?id=129534
Reviewed by Simon Fraser.
No new tests because TestWebKitAPI does not yet support iOS. See <http://webkit.org/b/129535>.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::initForSynthesizedDocument): Create a FrameProgressTracker.
2014-02-28 Sam Weinig <sam@webkit.org>
ASSERT(isMainThread()) hit under platformUserPreferredLanguages() with WebKit1 and WebKit2 in the same process
https://bugs.webkit.org/show_bug.cgi?id=129528
Reviewed by Andreas Kling.
* platform/mac/Language.mm:
(WebCore::preferredLanguagesMutex):
(WebCore::preferredLanguages):
(+[WebLanguageChangeObserver languagePreferencesDidChange:]):
(WebCore::httpStyleLanguageCode):
(WebCore::platformUserPreferredLanguages):
Add a mutex and do an isolated copy of the strings to allow this function to be called from multiple threads.
2014-02-28 Dean Jackson <dino@apple.com>
Crash at ebay.com when viewing auction items at com.apple.WebCore: WebCore::GraphicsContext3D::getExtensions + 10
https://bugs.webkit.org/show_bug.cgi?id=129523
Reviewed by Simon Fraser.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getSupportedExtensions): Early return if the
context is pending policy resolution.
2014-02-28 Andreas Kling <akling@apple.com>
Micro-optimize JSNodeOwner::isReachableFromOpaqueRoots().
<https://webkit.org/b/129518>
Only do image and audio element specific checks for element nodes.
Time spent in here goes from 0.8% to 0.5% on DYEB.
Reviewed by Benjamin Poulain.
* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):
2014-02-28 Geoffrey Garen <ggaren@apple.com>
JSC Assertion failure every time I start Safari (r164846)
https://bugs.webkit.org/show_bug.cgi?id=129510
Reviewed by Mark Hahnenberg.
Take the lock before allocating objects because afterward is too late.
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::windowScriptNPObject):
(WebCore::ScriptController::jsObjectForPluginElement):
2014-02-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ASSERT in WebCore::JSDOMWindowBase::supportsRichSourceInfo inspecting iOS
https://bugs.webkit.org/show_bug.cgi?id=129512
Reviewed by Simon Fraser.
* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::connect):
(WebCore::PageDebuggable::disconnect):
2014-02-28 Anders Carlsson <andersca@apple.com>
VisitedLinkStore should be able to invalidate link styles for associated pages
https://bugs.webkit.org/show_bug.cgi?id=129515
Reviewed by Dan Bernstein.
* page/Page.cpp:
(WebCore::Page::Page):
Add the VisitedLinkStore if we have one.
(WebCore::Page::~Page):
Remove the VisitedLinkStore if we have one.
* page/VisitedLinkStore.cpp:
(WebCore::VisitedLinkStore::~VisitedLinkStore):
Assert that we don't have any pages.
(WebCore::VisitedLinkStore::addPage):
Add the page to the set.
(WebCore::VisitedLinkStore::removePage):
Remove the page from the set.
(WebCore::VisitedLinkStore::invalidateStylesForAllLinks):
Traverse all the pages and invalidate the style for all links.
(WebCore::VisitedLinkStore::invalidateStylesForLink):
Traverse all the pages and invalidate the style for a given link.
* page/VisitedLinkStore.h:
Add new members.
2014-02-28 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] highlight rects should never big bigger than the view
https://bugs.webkit.org/show_bug.cgi?id=129472
Reviewed by Enrica Casucci.
* WebCore.exp.in:
2014-02-28 Beth Dakin <bdakin@apple.com>
Turn off margin tiles on iOS
https://bugs.webkit.org/show_bug.cgi?id=129509
-and corresponding-
<rdar://problem/16200383>
Reviewed by Simon Fraser.
* page/FrameView.cpp:
(WebCore::FrameView::needsExtendedBackgroundRectForPainting):
2014-02-28 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Add subpixel support to border type of double, groove, ridge, inset and outset.
https://bugs.webkit.org/show_bug.cgi?id=129226
Reviewed by Simon Fraser.
This is the conversion of double, inset, outset, groove and ridge border type
painting to support device pixel precision width/height.
Regression is covered by existing tests.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
* rendering/RenderObject.h:
2014-02-28 Adenilson Cavalcanti <cavalcantii@gmail.com>
Filters should test for area instead of single dimension
https://bugs.webkit.org/show_bug.cgi?id=123716
Reviewed by Dirk Schulze.
A filtered SVG element with a sigle dimension bigger than 5000
(counting the margin/border) will fail to render. So an element
with 4000x4000 will render fine, while another with 5000x10
won't. This patch instead tests against the total element area,
which fixes such cases.
It also fixes some layer violations where FilterEffectRenderer and
RenderSVGResourceFilter were directly accessing the maximum filter
size in FilterEffect. Since before a somewhat bigger filter would
be aborted, it required to change the maximum kernel size
for blur filter (some filters are slower to run than others for
bigger SVGs).
Tests: svg/filters/big-height-filter-expected.svg
svg/filters/big-height-filter.svg
svg/filters/big-width-filter-expected.svg
svg/filters/big-width-filter.svg
* platform/graphics/filters/FEGaussianBlur.cpp:
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::maxFilterArea): New function, returns the
maximum allowed element area (currently is 4096 x 4096).
(WebCore::FilterEffect::isFilterSizeValid): Now it tests for
element area instead of a single dimension. This code is reused by
FilterEffectRenderer.
* platform/graphics/filters/FilterEffect.h:
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::updateBackingStoreRect): Uses the
new function in FilterEffect to test for valid sizes.
(WebCore::FilterEffectRendererHelper::beginFilterEffect): Same case.
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Test
for maximum area and properly changes the scale of transformed
element to fit.
2014-02-28 Brent Fulgham <bfulgham@apple.com>
[Mac, iOS] Incorrect ordering of construction arguments for out-of-band text elements
https://bugs.webkit.org/show_bug.cgi?id=129501
<rdar://problem/16198587>
Reviewed by Eric Carlson.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Correct order of arguments
to PlatformTextTrack.
2014-02-28 Bem Jones-Bey <bjonesbe@adobe.com>
Properly clear m_logicallyLastRun to remove use-after-free possibility
https://bugs.webkit.org/show_bug.cgi?id=129489
Reviewed by David Hyatt.
A use-after-free issue was caught in Blink because m_logicallyLastRun
is not cleared when the item it points to is deleted. Clearing it
turns the use-after-free into a segfault, and prevents any future
use-after-frees from happening.
* platform/text/BidiRunList.h:
(WebCore::BidiRunList<Run>::deleteRuns):
2014-02-28 Jer Noble <jer.noble@apple.com>
[Mac] Disambiguate calls to [[window contentView] layer] and [... setLayer:]
https://bugs.webkit.org/show_bug.cgi?id=129491
Reviewed by Alexey Proskuryakov.
-[NSWindow contentView] returns a bare id, leading to ambiguity when calling
certain methods, including -layer and -setLayer:. Resolve the ambiguity by
explicitly casting the -contentView call to a NSView*.
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setupVideoOverlay:]):
(-[WebVideoFullscreenController windowDidLoad]):
(-[WebVideoFullscreenController windowDidExitFullscreen]):
2014-02-28 Andreas Kling <akling@apple.com>
MouseEvent.offsetX/Y should just return 0,0 for simulated clicks.
<https://webkit.org/b/129477>
There's no need to compute the exact target-relative coordinates for
simulated mouse events, e.g those fired by HTMLElement.click().
The offsetX/Y properties are not supported by Firefox.
Test: fast/events/relative-offset-of-simulated-click.html
Reviewed by Alexey Proskuryakov.
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::offsetX):
(WebCore::MouseRelatedEvent::offsetY):
2014-02-27 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Fix positioning grid items using named grid lines/areas
https://bugs.webkit.org/show_bug.cgi?id=129372
Reviewed by Darin Adler.
Our code was assuming that a <custom-ident> in
-webkit-grid-{column|row}-{start|end} and
-webkit-grid-{column|row} was always a grid area name. That's
wrong because the <custom-ident> could be also a explicitly named
grid line or the an implicitly named grid line created by a grid
area definition.
The style resolution code was not correct either. This patch fixes
it so it now matches the spec, which means that:
- first we try to match any existing grid area.
- then if there is a named grid line with the name
<custom-ident>-{start|end} for -webkit-grid-{column|row}-{start|end}
defined before the grid area then we use it instead of the grid
area.
- otherwise if there is a named grid line we resolve to the first such line.
- otherwise we treat it as 'auto'.
Fixing this uncovered a bug in GridPosition, we were not using the
name of the stored grid area to check if two GridPositions were
the same.
Tests: fast/css-grid-layout/grid-item-position-changed-dynamic.html
fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html
* css/StyleResolver.cpp:
(WebCore::gridLineDefinedBeforeGridArea): New function to check if
a given named grid line was defined before an implicit named grid
line created by a grid area definition.
(WebCore::StyleResolver::adjustNamedGridItemPosition): New
function that adjusts the position of a GridPosition parsed as a
grid area.
(WebCore::StyleResolver::adjustGridItemPosition): Use the new
function adjustNamedGridItemPosition to adjust the positions of
named grid lines.
* css/StyleResolver.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle): Use GridPosition:: namespace.
(WebCore::RenderGrid::resolveGridPositionFromStyle): Ditto.
(WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Ditto.
* rendering/RenderGrid.h:
* rendering/style/GridPosition.h:
(WebCore::GridPosition::adjustGridPositionForRowEndColumnEndSide): Moved from RenderGrid.cpp.
(WebCore::GridPosition::adjustGridPositionForSide): Ditto.
(WebCore::GridPosition::operator==): Use the named grid line to check equality.
2014-02-28 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Update line segments for ShapeInside only if the new line is wide enough
https://bugs.webkit.org/show_bug.cgi?id=129461
Reviewed by David Hyatt.
Shape-inside can make a line only narrower than the original line width, thus we don't need
to update the line/shape segments in fitBelowFloats for every single line inside shape-inside.
This patch adds a helper function, which updates the line segments, furthermore it updates the
line segments only when the content would fit without the shape.
No new tests, no behavior change.
* rendering/line/BreakingContextInlineHeaders.h: Use new helper.
(WebCore::updateSegmentsForShapes):
* rendering/line/LineWidth.cpp: Use new helper.
(WebCore::LineWidth::updateLineSegment): Add new helper.
(WebCore::LineWidth::fitBelowFloats):
2014-02-28 Mario Sanchez Prada <mario.prada@samsung.com>
paragraphs with different directionality in textarea with unicode-bidi: plaintext are aligned the same
https://bugs.webkit.org/show_bug.cgi?id=71194
Reviewed by David Hyatt.
Merged from Blink r157263 by <igor.o@sisa.samsung.com>
<https://src.chromium.org/viewvc/blink?revision=157263&view=revision>
In the css3-text spec (http://www.w3.org/TR/css3-text/#bidi-linebox):
The start and end edges of a line box are determined by the inline
base direction of the line box. In most cases, this is given by
its containing block's computed ‘direction’. However if its
containing block has ‘unicode-bidi: plaintext’, the inline base
direction the line box must be determined by the base direction of
the bidi paragraph to which it belongs: that is, the bidi
paragraph for which the line box holds content.
This patch just implements the behavior described above modifying
updateLogicalWidthForAlignment and setting the bidi level of the
RootInlineBox.
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
(WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
(WebCore::RenderBlockFlow::checkLinesForTextOverflow):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):
2014-02-28 Jochen Eisinger <jochen@chromium.org>
Update meta-referrer behavior for invalid policies
https://bugs.webkit.org/show_bug.cgi?id=129475
This patch aligns the behavior with the CSP 1.1 referrer directive,
where the fallback for an invalid value is the "never" policy.
Original patch from Mike West: https://src.chromium.org/viewvc/blink?view=rev&revision=165627
Reviewed by Alexey Proskuryakov.
Test: http/tests/security/referrer-policy-invalid.html
* dom/Document.cpp:
(WebCore::Document::processReferrerPolicy):
2014-02-28 Daniel Bates <dabates@apple.com>
SubresourceLoader::didFinishLoading() should not assert when a decode error occurs
https://bugs.webkit.org/show_bug.cgi?id=127029
Reviewed by Darin Adler.
SubresourceLoader::didFinishLoading() can be called for a resource (e.g. an image) that
failed to be decoded or, in the case of an image, whose estimated decoded size exceeds
the maximum decoded size (Settings::maximumDecodedImageSize()).
Test: fast/images/decoded-size-exceeds-max-decoded-size.html
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFinishLoading):
2014-02-28 Martin Hodovan <mhodovan@inf.u-szeged.hu>
ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result) in WebCore::RenderGeometryMap::mapToContainer
https://bugs.webkit.org/show_bug.cgi?id=119626
SVGRenderSupport::mapLocalToContainer() was trying to apply transforms
in the incorrect order. Specifically, it would attempt to apply its
localToParentTransform before its localToBorderBoxTransform. This
was causing an ASSERT to fail when the computed transforms didn't
match up to those computed by RenderGeometryMap.
Backported from Blink: https://codereview.chromium.org/143363004
Reviewed by Simon Fraser.
Test: svg/transforms/svg-geometry-crash.html
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer):
2014-02-28 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] ASSERTION FAILED: !m_regionsInvalidated in RenderFlowThread::regionAtBlockOffset
https://bugs.webkit.org/show_bug.cgi?id=129371
Reviewed by Andrei Bucur.
regionAtBlockOffset method is meant to be used after the flow thread validated
its region chain, otherwise we cannot rely on regionAtBlockOffset to determine correctly
the target region based on the offset in flow thread coordinates.
When the video element is collected in a named flow and displayed in a region, we ensure
that the region's decorations are taken into account to properly position the video.
However, we have to do that only if the named flow regions are validated.
I changed the method cachedRegionForCompositedLayer to check only the "cached" region
for a layer and not update the layer to region mappings before returning the region.
Because method cachedRegionForCompositedLayer does not update the region - layer mappings,
the code does not call regionAtBlockOffset in situations where the region chain is not validated yet.
Test: compositing/regions/video-in-overflow-region.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::getLayerListForRegion): Make it a getter that relies on
cached information and refrain from updating the mappings. Make it const too.
(WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
* rendering/RenderFlowThread.h:
2014-02-28 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GTK] Finetune captions menu as per design team
https://bugs.webkit.org/show_bug.cgi?id=129432
Reviewed by Eric Carlson.
Some design fine tuning of the captions dialog was required.
No new tests, current suffice.
* Modules/mediacontrols/mediaControlsApple.js:
Added out class.
* Modules/mediacontrols/mediaControlsGtk.js:
(ControllerGtk.prototype.buildCaptionMenu): Setting out class when
menu is going to show overlap the panel right border.
* css/mediaControlsGtk.css:
(video::-webkit-media-controls-closed-captions-container.out):
Setting all borders to 5px;
(video::-webkit-media-controls-closed-captions-container h3):
Reduced font size and increasing top padding.
(video::-webkit-media-controls-closed-captions-container ul):
Increased top padding.
2014-02-27 Ryosuke Niwa <rniwa@webkit.org>
Element::attributeChanged shouldn't do any work when attribute value didn't change
https://bugs.webkit.org/show_bug.cgi?id=129467
Reviewed by Geoffrey Garen.
Exit early in childrenChanged when the attribute value didn't change.
* dom/Attr.cpp:
(WebCore::Attr::setValue):
(WebCore::Attr::childrenChanged):
* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
(WebCore::Element::attributeChanged):
(WebCore::Element::parserSetAttributes):
(WebCore::Element::removeAttributeInternal):
(WebCore::Element::didAddAttribute):
(WebCore::Element::didModifyAttribute):
(WebCore::Element::didRemoveAttribute):
(WebCore::Element::cloneAttributesFromElement):
* dom/Element.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
* dom/StyledElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::attributeChanged):
* mathml/MathMLElement.h:
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::attributeChanged):
* mathml/MathMLSelectElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::attributeChanged):
* svg/SVGElement.h:
2014-02-27 Jinwoo Song <jinwoo7.song@samsung.com>
[EFL] Remove duplicated keyboard string key from keyMap
https://bugs.webkit.org/show_bug.cgi?id=129469
Reviewed by Gyuyoung Kim.
"Down" key is duplicated in keyMap().
* platform/efl/EflKeyboardUtilities.cpp:
(WebCore::createKeyMap):
2014-02-27 Benjamin Poulain <benjamin@webkit.org>
Unify the three call sites of SelectorQueryCache
https://bugs.webkit.org/show_bug.cgi?id=129249
Reviewed by Andreas Kling.
The three call sites of SelectorQueryCache were doing the exact same thing.
That code is mvoed to a new function Document::selectorQueryForString().
Also use String instead of AtomicString for querySelector() and querySelectorAll().
This prevent the call sites from creating AtomicString just for the time of the call.
This causes a tiny slow down on microbenchmarks that continuously query the same string
but has no negative impact on realistic/good test cases (and the bindings are simplified).
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::querySelector):
(WebCore::ContainerNode::querySelectorAll):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::selectorQueryForString):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::webkitMatchesSelector):
* dom/SelectorQuery.cpp:
(WebCore::SelectorQueryCache::add):
* dom/SelectorQuery.h:
2014-02-27 Ryosuke Niwa <rniwa@webkit.org>
JSC ignores the extra memory cost of HTMLCollection after a major GC
https://bugs.webkit.org/show_bug.cgi?id=129450
Reviewed by Andreas Kling.
Report the extra memory cost of HTMLCollection to JSC.
Unfortunately, the existing mechanism to report the extra memory cost in toJS is insufficient for
HTMLCollection since collection caches are populated later when HTMLCollection is accessed. Also,
the extra memory cost reported by Heap::reportExtraMemoryCost will be thrown away after a major GC.
To work around this limitation, added a visitor.reportExtraMemoryUsage call inside visitChildren
for interfaces with a newly added ReportExtraMemoryCost IDL extension flag to report the extra cost.
Since we may need to generate visitChildren when this flag is set, we can't automatically detect
and generate calls using C++ template as done in r148648.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/webaudio/AudioBuffer.idl:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(InstanceNeedsVisitChildren):
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::toJS):
* dom/ChildNodeList.h:
* dom/CollectionIndexCache.cpp: Added.
(WebCore::reportExtraMemoryCostForCollectionIndexCache):
* dom/CollectionIndexCache.h:
(WebCore::CollectionIndexCache::memoryCost):
(WebCore::NodeType>::CollectionIndexCache):
(WebCore::NodeType>::nodeCount):
(WebCore::NodeType>::computeNodeCountUpdatingListCache):
(WebCore::NodeType>::nodeAt):
(WebCore::NodeType>::invalidate):
* dom/DOMAllInOne.cpp:
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::memoryCost):
* dom/LiveNodeList.h:
* dom/NodeList.h:
(WebCore::NodeList::memoryCost):
* dom/NodeList.idl:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::updateNamedElementCache):
* html/HTMLCollection.h:
(WebCore::CollectionNamedElementCache::didPopulate):
(WebCore::CollectionNamedElementCache::memoryCost):
(WebCore::CollectionNamedElementCache::find):
(WebCore::HTMLCollection::memoryCost):
* html/HTMLCollection.idl:
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::updateNamedElementCache):
2014-02-27 Benjamin Poulain <benjamin@webkit.org>
Compile attribute value matching
https://bugs.webkit.org/show_bug.cgi?id=129228
Reviewed by Geoffrey Garen.
Add support for compiling value matching when matching attributes in Selector.
This patch only adds exact matching, the other cases will follow.
There is a little infrastructure changes since FunctionCall now needs to support
calls taking 2 arguments. The fun begins when the arguments are not in the right
registers and need to be moved to the right place. Otherwise the code is straightforward.
In SelectorCompiler, it is necessary to handle two different cases of matching: case sensitive
and case insensitive. The choice is done in part at compilation time by asking HTMLDocument
if the name filter can include case insensitive attribute. The other part is done at runtime
by querying the element for its type and document.
Test: fast/selectors/case-insensitive-value-matching.html
* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches): Null values matching should never happen, when an attribute
has no value, its value is empty.
* cssjit/FunctionCall.h:
(WebCore::FunctionCall::FunctionCall):
Add support for calls with two arguments.
(WebCore::FunctionCall::setOneArgument):
(WebCore::FunctionCall::setTwoArguments):
(WebCore::FunctionCall::swapArguments):
Here we need to swap two registers, but we cannot allocate a new register (because the context
of the function call may have taken all the available registers already).
On x86, the solution is simple, we can swap the two registers without side effects.
On other platforms, it is a little more complex. If there is any available register, we can just
use it as a temporary to make the swap.
If there are no available registers, we know that all the registers are taken. Since swapArguments()
was called after pushing all the arguments on the stack, we can safely trash the value of any of those.
We take the first available register that is not a function argument and use it as a temporary.
(WebCore::FunctionCall::prepareAndCall):
This is the fun part, we have two registers where the values must go before the function call. The values
can be in any combination of the allocated registers. The code here needs to move the two values to
their target register while avoiding conflicts.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
(WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch):
(WebCore::SelectorCompiler::AttributeMatchingInfo::selector):
The value of HTMLDocument::isCaseSensitiveAttribute is needed at compilation time to compute the number
of required registers. As a result, we need to keep it along in the selector fragment.
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::attributeNameTestingRequiresNamespaceRegister):
(WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
(WebCore::SelectorCompiler::minimumRegisterRequirements):
(WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
(WebCore::SelectorCompiler::canMatchStyleAttribute):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeStyleAttribute):
(WebCore::SelectorCompiler::canMatchAnimatableSVGAttribute):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeAllAnimatedSVGAttribute):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
The matching code is moved in a local scope. This is done to recover the register of qualifiedNameImpl
before doing any value matching. That register can then be used to store the expected value when matching
an attribute value.
It is unfortunate there is so much register pressure in this part.
Value matching is done outside the loop. The idea is to keep the loop really small since in the vast majority
of cases, name matching fails.
If the value matching fails, we jump back into the tight loop.
This is not ideal in all situation. For example trivial name matching with trivial value matching should
be done in loop. There is a FIXME to improve those cases later.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
(WebCore::SelectorCompiler::testIsHTMLClassOnDocument):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
In the case sensitive branch, things are really simple. We have to AtomicStringImpl pointers, if they
don't match, it is a failure.
The case sensitive branch start by comparing the pointers in case the values are equal. This is a common
case and it simplifies the cases for SVG, XHTML, etc.
If the two values are not equal, we must first find if the context requires case insensitive comparison
(HTMLElement in HTMLDocument). If the conditions require case insensitive matching, we then fall back
to a function call.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
* dom/Attribute.h:
(WebCore::Attribute::valueMemoryOffset):
* dom/Document.h:
(WebCore::Document::documentClassesMemoryOffset):
(WebCore::Document::isHTMLDocumentClassFlag):
* dom/Node.h:
(WebCore::Node::treeScopeMemoryOffset):
* dom/TreeScope.h:
(WebCore::TreeScope::documentScopeMemoryOffset):
2014-02-27 Ryuan Choi <ryuan.choi@samsung.com>
Build break when disabled CSS_GRID_LAYOUT
https://bugs.webkit.org/show_bug.cgi?id=129459
Reviewed by Gyuyoung Kim.
* css/CSSValue.h: Added guards of CSS_GRID_LAYOUT for GridTemplateAreasClass.
2014-02-17 Myles C. Maxfield <mmaxfield@apple.com>
text-decoration-skip: ink does not skip over SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=128936
Reviewed by Darin Adler.
When drawing glyphs in an SVG font, the glyphs are converted to paths and then filled. This patch moves
the glyph -> path conversion into a helper class, GlyphToPathTranslator, and creates an implementation
for the SVG drawing code. Once this helper class is created, it can be used to trace paths in order
to make underlines skip over SVG glyphs. This helper class also has an implementation for non-SVG glyphs,
which allows for the glyph tracing code to be paramaterized over the implementation of the helper class
rather than if the FontData itself is SVG or not.
Tests: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-svg.html
* platform/graphics/Font.h:
(WebCore::GlyphToPathTranslator::~GlyphToPathTranslator): Virtual implementation of helper class
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::Path): Created constructor that takes a RefPtr<CGMutablePathRef>
* platform/graphics/Path.h:
* platform/graphics/TextRun.h: Give RenderingContext a factory function to create the helper class
instance
* platform/graphics/mac/FontMac.mm: Implementation of helper class used for skipping underlines on
regular (CoreText) glyphs
(WebCore::MacGlyphToPathTranslator::MacGlyphToPathTranslator):
(WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph):
(WebCore::MacGlyphToPathTranslator::incrementIndex):
(WebCore::Font::dashesForIntersectionsWithRect): Call the relevant factory function, and use it
to successively generate Paths
* rendering/svg/SVGTextRunRenderingContext.cpp: Implementation of helper class used for SVG fonts
(WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
(WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph):
(WebCore::SVGGlyphToPathTranslator::incrementIndex):
(WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
(WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Use the above implementation
* rendering/svg/SVGTextRunRenderingContext.h: Factory function declaration
2014-02-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[WebRTC] Removing MediaConstraints argument from RTCPeerConnection addStream, updateIce methods and constructor
https://bugs.webkit.org/show_bug.cgi?id=129449
Reviewed by Eric Carlson.
According to WebRTC editor's draft, MediaConstraints will no longer be an argument of those methods and
constructor.
Existing tests were updated.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::create):
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::updateIce):
(WebCore::RTCPeerConnection::addStream):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* bindings/js/JSRTCPeerConnectionCustom.cpp:
(WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
* platform/mediastream/RTCPeerConnectionHandler.h:
* platform/mock/RTCPeerConnectionHandlerMock.cpp:
(WebCore::RTCPeerConnectionHandlerMock::initialize):
(WebCore::RTCPeerConnectionHandlerMock::updateIce):
(WebCore::RTCPeerConnectionHandlerMock::addStream):
* platform/mock/RTCPeerConnectionHandlerMock.h:
2014-02-27 Radu Stavila <stavila@adobe.com>
[CSS Regions] Move named-flow specific method decorationsClipRectForBoxInRegion to RenderNamedFlowThread
https://bugs.webkit.org/show_bug.cgi?id=129428
Reviewed by Andreas Kling.
Since the decorationsClipRectForBoxInRegion method is a named flow specific method, it makes
sense to be in the named flow specific class, RenderNamedFlowThread, instead of the more
generic RenderFlowThread.
No new tests required. No new functionality.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
* rendering/RenderFlowThread.cpp:
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
* rendering/RenderNamedFlowThread.h:
2014-02-27 Zoltan Horvath <zoltan@webkit.org>
Avoid calling logicalLeftOffsetForLine 2 times in LineWidth::fitBelowFloats
https://bugs.webkit.org/show_bug.cgi?id=129433
Reviewed by Darin Adler.
This change updates fitBelowFloats and its helpers to call RenderBlock::logicalLeftOffsetForLine only once.
No new tests, no behavior change.
* rendering/line/LineWidth.cpp:
(WebCore::availableWidthAtOffset):
(WebCore::LineWidth::updateLineDimension):
(WebCore::LineWidth::wrapNextToShapeOutside):
(WebCore::LineWidth::fitBelowFloats):
* rendering/line/LineWidth.h:
2014-02-27 Andreas Kling <akling@apple.com>
Micro-optimize elementAffectsDirectionality().
<https://webkit.org/b/129444>
Tweak this function to skip an unnecessary bit check and use
fastHasAttribute() instead of hasAttribute() for looking up dirAttr.
~1% speedup on DYEB/AngularJS.
Reviewed by Ryosuke Niwa.
* html/HTMLElement.cpp:
(WebCore::elementAffectsDirectionality):
2014-02-27 Brian Burg <bburg@apple.com>
Web Inspector: model tests should use a special Test.html inspector page
https://bugs.webkit.org/show_bug.cgi?id=129190
Reviewed by Timothy Hatcher.
Convert InspectorController::isUnderTest() into a flag, and expose an
Internals method so it can be set by the test before opening the inspector.
Test: inspector/test-harness-trivially-works.html
* inspector/InspectorController.cpp:
(WebCore::InspectorController::evaluateForTestInFrontend):
* inspector/InspectorController.h:
* testing/Internals.cpp:
(WebCore::Internals::setInspectorIsUnderTest): Added.
* testing/Internals.h:
* testing/Internals.idl:
2014-02-27 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed build fix after r164824.
Accidentally re-added some code that was removed.
* page/ContentSecurityPolicy.cpp:
2014-02-26 Alex Christensen <achristensen@webkit.org>
Compile fix when not using TEXTURE_MAPPER_GL.
https://bugs.webkit.org/show_bug.cgi?id=129417
Reviewed by Darin Adler.
* platform/graphics/texmap/TextureMapperGL.cpp:
Protect platformCreateAccelerated with USE(TEXTURE_MAPPER_GL).
2014-02-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JSContext inspection should report exceptions in the console
https://bugs.webkit.org/show_bug.cgi?id=128776
Reviewed by Timothy Hatcher.
Include some clean up of ConsoleMessage and ScriptCallStack construction.
Covered by existing tests.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
Simplify code now that createStackTraceFromException handles it.
* page/ContentSecurityPolicy.cpp:
(WebCore::gatherSecurityPolicyViolationEventData):
(WebCore::ContentSecurityPolicy::reportViolation):
ScriptCallStack can give us the first non-native callframe.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::buildInitiatorObject):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::breakpointActionLog):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
* page/Console.cpp:
(WebCore::internalAddMessage):
(WebCore::Console::profile):
(WebCore::Console::profileEnd):
(WebCore::Console::timeEnd):
* page/ContentSecurityPolicy.cpp:
(WebCore::gatherSecurityPolicyViolationEventData):
(WebCore::ContentSecurityPolicy::reportViolation):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
2014-02-27 Andreas Kling <akling@apple.com>
Remove FeatureObserver.
<https://webkit.org/b/129439>
This code was only used by the Chromium port and nobody else is
making use of it.
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
* dom/EventTarget.h:
* html/ColorInputType.cpp:
* html/ColorInputType.h:
* html/DateInputType.cpp:
* html/DateInputType.h:
* html/DateTimeInputType.cpp:
* html/DateTimeInputType.h:
* html/DateTimeLocalInputType.cpp:
* html/DateTimeLocalInputType.h:
* html/EmailInputType.cpp:
* html/EmailInputType.h:
* html/HTMLDataListElement.cpp:
(WebCore::HTMLDataListElement::create):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::parseAttribute):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::parseAttribute):
* html/InputType.cpp:
* html/InputType.h:
* html/MonthInputType.cpp:
* html/MonthInputType.h:
* html/NumberInputType.cpp:
* html/NumberInputType.h:
* html/RangeInputType.cpp:
* html/RangeInputType.h:
* html/SearchInputType.cpp:
* html/SearchInputType.h:
* html/TelephoneInputType.cpp:
* html/TelephoneInputType.h:
* html/TextInputType.cpp:
* html/TextInputType.h:
* html/TimeInputType.cpp:
* html/TimeInputType.h:
* html/URLInputType.cpp:
* html/URLInputType.h:
* html/WeekInputType.cpp:
* html/WeekInputType.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::dispatchDidCommitLoad):
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::didReceiveHeader):
* page/EventHandler.cpp:
(WebCore::EventHandler::selectCursor):
* page/FeatureObserver.cpp: Removed.
* page/FeatureObserver.h: Removed.
* page/Page.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* workers/SharedWorker.cpp:
(WebCore::SharedWorker::create):
* workers/Worker.cpp:
(WebCore::Worker::create):
2014-02-27 Chris Fleizach <cfleizach@apple.com>
speechSynthesis.speak of a zero length utterance kills future speech
https://bugs.webkit.org/show_bug.cgi?id=129403
Reviewed by Mario Sanchez Prada.
Empty length strings may choke a synthesizer and result in didFinishSpeaking not being called.
The WebKit code should be proactive about screening out empty length strings.
Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak-empty-string.html
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::startSpeakingImmediately):
2014-02-27 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r164783.
http://trac.webkit.org/changeset/164783
https://bugs.webkit.org/show_bug.cgi?id=129425
Broke number of multicol tests (Requested by anttik on
#webkit).
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::containingColumnsBlock):
2014-02-27 Antoine Quint <graouts@webkit.org>
Respect SVG fragment identifiers in <img> src attribute
https://bugs.webkit.org/show_bug.cgi?id=129387
Reviewed by Antti Koivisto.
Test: svg/css/svg-resource-fragment-identifier-img-src.html
When providing an SVG image for a given renderer, check that the URL used to load
that image is taken into account in case it featured a fragment identifier, ensuring
that the CSS :target pseudo-class is correctly handled for SVG resources. This patch
is specific to <img> elements, specific support will also need to be added for various
CSS properties that support SVG images.
* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::imageForRenderer):
Check if the provided renderer is attached to an <img> element and, if so, pass the
resolved <img> source URL, taking into account srcset, to the SVGImageForContainer.
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::setURL):
Trigger the FrameView machinery to ensure that the :target pseudo-class is respected
should the provided URL feature a fragment identifier.
* svg/graphics/SVGImageForContainer.h:
Declare the new setURL() method.
2014-02-27 Krzysztof Czech <k.czech@samsung.com>
[ATK] Fix style errors in enum members
https://bugs.webkit.org/show_bug.cgi?id=129421
Reviewed by Mario Sanchez Prada.
No new tests. No new functionality.
Enum members should use InterCaps with an initial capital letter.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):
2014-02-27 Mihai Tica <mitica@adobe.com>
[CSS Blending] Parse and implement the -webkit-isolation CSS property.
https://bugs.webkit.org/show_bug.cgi?id=128958
Reviewed by Dirk Schulze.
Parse and implement -webkit-isolation, part of the CSS Blending and Compositing spec.
This patch adds functionality for HTML and SVG.
-webkit-isolation: isolate restricts any child elements from blending with any of the content outside the isolated parent element.
Tests: css3/compositing/isolation-isolate-blended-child.html
css3/compositing/isolation-parsing.html
css3/compositing/svg-isolation-default.html
css3/compositing/svg-isolation-isolated-group.html
css3/compositing/svg-isolation-simple.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator Isolation):
* css/CSSPropertyNames.in: Add -webkit-isolation.
* css/CSSValueKeywords.in: Add the isolate value.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Explicitly set isolation:isolate to create a stacking context.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayerRepaint): Changing isolation should trigger a repaint.
* rendering/style/RenderStyle.h: Setters and getters for isolation.
* rendering/style/RenderStyleConstants.h: Add Isolation enum.
* rendering/style/StyleRareNonInheritedData.cpp: Add m_isolation.
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent): If isolated, paint in a transparency layer.
2014-02-27 Krzysztof Czech <k.czech@samsung.com>
[ATK] Utilize AtkTableCell to expose directly AccessibilityTableCell to AT
https://bugs.webkit.org/show_bug.cgi?id=129250
Reviewed by Mario Sanchez Prada.
Test: accessibility/table-scope.html
Exposing AtkTableCell to AT. Implementing possibility to get column headers and row headers
as an array of cells.
* GNUmakefile.list.am:
* PlatformEfl.cmake:
* accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp: Added.
(convertToGPtrArray):
(core):
(webkitAccessibleTableCellGetColumnHeaderCells):
(webkitAccessibleTableCellGetRowHeaderCells):
(webkitAccessibleTableCellInterfaceInit):
* accessibility/atk/WebKitAccessibleInterfaceTableCell.h: Added.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):
2014-02-27 Renata Hodovan <rhodovan.u-szeged@partner.samsung.com>
Improving containing column block determination
https://bugs.webkit.org/show_bug.cgi?id=125449
Reviewed by Darin Adler.
Making sure that the containing column block of any elements
can not be oneself.
Test: fast/css/crash-on-column-splitting.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::containingColumnsBlock):
(WebCore::RenderBlock::splitFlow):
2014-02-27 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GTK] Improve JavaScript multimedia controls
https://bugs.webkit.org/show_bug.cgi?id=129044
Reviewed by Jer Noble.
After webkit.org/b/123097 a follow up was needed to improve
accessibily and some other cosmetic problems, like cleaner CSS and
new missing baselines.
No new tests because of no new functionality.
* Modules/mediacontrols/mediaControlsApple.js:
Added hiding class name.
* Modules/mediacontrols/mediaControlsGtk.js:
(ControllerGtk.prototype.createControls): Set remaining time as
hidden by default and turned volumebox hidden into hiding.
(ControllerGtk.prototype.updateTime): Simplified the hiding and
showing by removing the show class and using hidden only.
(ControllerGtk.prototype.handleMuteButtonMouseOver):
(ControllerGtk.prototype.handleVolumeBoxMouseOut): Turned hidden
into hiding.
(ControllerGtk.prototype.updateReadyState): Changed coding style
and added down class for the panel too.
(ControllerGtk.prototype.updatePlaying): Change for coding style
coherence.
(ControllerGtk.prototype.handleCaptionButtonClicked): Call
handleCaptionButtonShowMenu.
(ControllerGtk.prototype.handleCaptionButtonMouseOver): Call
handleCaptionButtonShowMenu.
(ControllerGtk.prototype.handleCaptionButtonShowMenu): Created
with the former behavior of handleCaptionButtonMouseOver.
* css/mediaControlsGtk.css:
(.hidden): Set display none for all objects with hidden class.
(audio::-webkit-media-controls-panel *:focus):
(audio::-webkit-media-controls-panel.down *:focus): Added gradient
for the active and focus status.
(audio::-webkit-media-controls-time-remaining-display)
(video::-webkit-media-controls-time-remaining-display): Set
display block.
(audio::-webkit-media-controls-volume-slider-container)
(video::-webkit-media-controls-volume-slider-container): Set
display flex.
(video::-webkit-media-controls-volume-slider-container.hiding):
Changed from hidden.
(video::-webkit-media-controls-panel .hiding.down): Changed from
hidden.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintMediaButton): Returning true to
allow CSS painting the gradient.
2014-02-27 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Fixing the GTK build fix after r164757.
* platform/network/NetworkStateNotifier.cpp: r164757 introduced a layering violation by including
the Settings.h header. The use of that class is guarded by PLATFORM(IOS), so the header inclusion
should be guarded as well.
2014-02-26 Ryosuke Niwa <rniwa@webkit.org>
Extract named items caches in HTMLCollection as a class
https://bugs.webkit.org/show_bug.cgi?id=129365
Reviewed by Antti Koivisto.
Extracted CollectionNamedElementCache, like CollectionIndexCache, out of HTMLCollection.
We can move more named item related functions into this class in the future.
HTMLCollection's member variables m_isNameCacheValid, m_idCache, and m_nameCache were replaced by
a single unique_ptr that holds an instance of CollectionNamedElementCache since this object rarely
exists in most HTMLCollections.
Also removed m_isItemRefElementsCacheValid since it was only used by Microdata API removed in r153772
and renamed a whole bunch of member functions and variables for consistency.
* dom/Document.cpp:
(WebCore::Document::collectionCachedIdNameMap):
(WebCore::Document::collectionWillClearIdNameMap):
* dom/Document.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptDocument):
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::namedItemWithIndex):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::~HTMLCollection):
(WebCore::HTMLCollection::invalidateCache):
(WebCore::HTMLCollection::invalidateNamedElementCache): Renamed from invalidateIdNameCacheMaps.
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNamedElementCache): Renamed from updateNameCache.
(WebCore::HTMLCollection::namedItems):
* html/HTMLCollection.h:
(WebCore::CollectionNamedElementCache::findElementsWithId): Renamed from HTMLCollection::idCache.
(WebCore::CollectionNamedElementCache::findElementsWithName): Renamed from HTMLCollection::nameCache.
(WebCore::CollectionNamedElementCache::appendIdCache): Moved from HTMLCollection.
(WebCore::CollectionNamedElementCache::appendNameCache): Ditto.
(WebCore::CollectionNamedElementCache::find): Ditto.
(WebCore::CollectionNamedElementCache::append): Ditto.
(WebCore::HTMLCollection::invalidateCache):
(WebCore::HTMLCollection::hasNamedElementCache): Renamed from hasIdNameCache.
(WebCore::HTMLCollection::createNameItemCache): Added.
(WebCore::HTMLCollection::namedItemCaches): Added.
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::updateNamedElementCache):
* html/HTMLFormControlsCollection.h:
2014-02-26 Ryosuke Niwa <rniwa@webkit.org>
Indenting an indented image element resulted in an extra indentation
https://bugs.webkit.org/show_bug.cgi?id=129201
Reviewed by Enrica Casucci.
The bug was caused by endOfParagraph returning a position at the beginning of a block when the position
passed into the function was at the beginning of the block. Consider the following DOM:
<blockquote><img></blockquote>
When endOfParagraph is called on (blockquote, 0), the condition r->isBR() || isBlock(n) in endOfParagraph
matches immediately on startNode and it returns (blockquote, 0) again.
This resulted in moveParagraphWithClones invoked by indentIntoBlockquote to erroneously clone the inner
blockquote. Worked around this bug in ApplyBlockElementCommand::formatSelection by checking this specific
condition and moving the position to the end of the block. Unfortunately, a lot of existing code depends
on the current behavior of endOfParagraph so fixing the function itself was not possible.
There was another bug in indentIntoBlockquote to incorrectly insert a new blockquote into the existing
blockquote due to the code introduced in r99594 to avoid inserting before the root editable element.
Since this happens only if outerBlock is the root editable element, which is nodeToSplitTo or an ancestor
of nodeToSplitTo, explicitly look for this condition.
Test: editing/execCommand/indent-img-twice.html
* editing/ApplyBlockElementCommand.cpp:
(WebCore::ApplyBlockElementCommand::formatSelection):
(WebCore::isNewLineAtPosition):
* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::indentIntoBlockquote):
* editing/VisibleUnits.cpp:
(WebCore::endOfParagraph): Added a FIXME.
2014-02-26 Simon Fraser <simon.fraser@apple.com>
Fix two assertions/crashes in compositing code
https://bugs.webkit.org/show_bug.cgi?id=129414
Reviewed by Dean Jackson.
Fix two issues introduced in r164759.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers): Don't call
ourselves recursively!
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): We call this
function unconditionally on layer teardown, so this assertion is bogus.
2014-02-26 Simon Fraser <simon.fraser@apple.com>
Fix the build with some compiler configurations.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2014-02-26 Myles C. Maxfield <mmaxfield@apple.com>
Ranges given to createMarkupInternal might not be canonicalized
https://bugs.webkit.org/show_bug.cgi?id=129408
Reviewed by Ryosuke Niwa.
When WebKit clients (such as Mail) call WKWebArchiveCreateFromRange() with a range,
that range is not necessarily canonicalized. Therefore, comparing it for equality
with a canonicalized range might return a false negative. Instead, we should compare
canonicalized ranges.
No new tests because this codepath will only be reached via SPI.
* editing/markup.cpp:
(WebCore::createMarkupInternal):
2014-02-26 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Form controls handling: implement date and time controls.
https://bugs.webkit.org/show_bug.cgi?id=129344
Reviewed by Simon Fraser and Joseph Pecoraro.
Adding one localizable string.
* English.lproj/Localizable.strings:
2014-02-26 Simon Fraser <simon.fraser@apple.com>
Prepare for overflow scrolling nodes in the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=129398
Reviewed by Tim Horton.
Lay some groundwork for overflow:scrolling nodes in the scrolling tree.
Change terminology to refer to "scroll-coordinatored" layers now, not just viewport-constrained
layers.
A given layer can be both viewport-constrained and overflow-scrolling (e.g. position:fixed,
overflow:scroll), so handle that in RenderLayerBacking, and use some "reason" flags
in RenderLayerCompositor.
* page/FrameView.cpp:
(WebCore::FrameView::scrollLayerID): Rename
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode): Remove invalid assertion.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::updateScrollingLayers): Simplify the logic with
an early return.
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
Allow a layer to play both viewport-constrained and scrolling roles
in the scrolling tree.
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::viewportConstrainedNodeID):
(WebCore::RenderLayerBacking::setViewportConstrainedNodeID):
(WebCore::RenderLayerBacking::scrollingNodeID):
(WebCore::RenderLayerBacking::setScrollingNodeID):
(WebCore::RenderLayerBacking::scrollingNodeIDForChildren):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::didFlushChangesForLayer):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::layerWillBeRemoved):
(WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged):
(WebCore::RenderLayerCompositor::clearBackingForLayerIncludingDescendants):
(WebCore::RenderLayerCompositor::requiresCompositingLayer):
(WebCore::RenderLayerCompositor::requiresOwnBackingStore):
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForScrolling):
(WebCore::isViewportConstrainedFixedOrStickyLayer):
(WebCore::isMainFrameScrollingOrOverflowScrolling):
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
(WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
(WebCore::nearestScrollCoordinatedAncestor):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
(WebCore::RenderLayerCompositor::willRemoveScrollingLayer):
(WebCore::RenderLayerCompositor::didAddScrollingLayer):
* rendering/RenderLayerCompositor.h:
2014-02-26 Andy Estes <aestes@apple.com>
[iOS] Support network state notification using CPNetworkObserver
https://bugs.webkit.org/show_bug.cgi?id=129358
Reviewed by Dan Bernstein.
Add iOS support for navigator.onLine and online/offline events. Since
it can be expensive to query CPNetworkObserver, wait to do so until
someone calls NetworkStateObserver::onLine() or
NetworkStateObserver::addNetworkStateChangeListener(). For clients that
don't wish to observe network reachability at all, add a global opt-out.
These clients will only pay the cost of CPNetworkObserver if they load
a page that explicitly accesses navigator.onLine.
No new tests. Covered by existing tests.
* WebCore.exp.in: Stopped exporting NetworkStateNotifier::setIsOnLine()
and started exporting Settings::gShouldOptOutOfNetworkStateObservation.
* WebCore.xcodeproj/project.pbxproj: Renamed NetworkStateNotifierIOS.cpp
to NetworkStateNotifierIOS.mm.
* page/Settings.cpp: Defaulted gShouldOptOutOfNetworkStateObservation
to false.
* page/Settings.h:
(WebCore::Settings::setShouldOptOutOfNetworkStateObservation):
(WebCore::Settings::shouldOptOutOfNetworkStateObservation):
* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::addNetworkStateChangeListener): Ignored
the listener if Settings::shouldOptOutOfNetworkStateObservation().
Called registerObserverIfNecessary() and added the listener otherwise.
(WebCore::NetworkStateNotifier::notifyNetworkStateChange): Const qualified.
* platform/network/NetworkStateNotifier.h
(NetworkStateNotifier::onLine):
* platform/network/ios/NetworkStateNotifierIOS.cpp: Removed.
* platform/network/ios/NetworkStateNotifierIOS.mm: Added.
(-[NetworkStateObserver initWithNotifier:WebCore::]): Registered self
as a network reachable observer on CPNetworkObserver.
(-[NetworkStateObserver dealloc]): Removed self as a network reachable
observer.
(-[NetworkStateObserver networkStateChanged:]): Called setOnLine() on
the web thread, passing the reachability value from the notification.
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
(WebCore::NetworkStateNotifier::~NetworkStateNotifier): Cleared
m_observer's pointer back to us.
(WebCore::NetworkStateNotifier::registerObserverIfNecessary): Initialized
m_observer if necessary.
(WebCore::NetworkStateNotifier::onLine): Called
registerObserverIfNecessary() and set an initial value for m_isOnLine
if m_isOnLineInitialized is false. Returned m_isOnLine.
(WebCore::setOnLine): Set m_isOnLine and called
notifyNetworkStateChange() if needed. Unconditionally set
m_isOnLineInitialized to true.
2014-02-26 Brian Burg <bburg@apple.com>
Unreviewed build fix for !ENABLE(CONTEXT_MENUS).
I forgot to add guards to handleContextMenuEvent().
* replay/UserInputBridge.cpp:
* replay/UserInputBridge.h:
2014-02-26 Dean Jackson <dino@apple.com>
[WebGL] Only skip context error retrieval if a pending context
https://bugs.webkit.org/show_bug.cgi?id=129397
Reviewed by Tim Horton.
A lost context should still ask the GC3D what the error is. Only
a pending context should return early.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getError):
2014-02-26 Brian Burg <bburg@apple.com>
Web Replay: route through UserInputBridge when delivering user inputs to WebCore
https://bugs.webkit.org/show_bug.cgi?id=128150
Reviewed by Timothy Hatcher.
Add an UserInputBridge instance to each Page. WebKit2 routes a page's user inputs through
the WebCore page's user input bridge so that the inputs can be selectively captured, filtered,
and replayed using instrumentation inside the UserInputBridge.
For now, the routing methods of UserInputBridge have no replay-specific code paths, and just
put the input delivery code inside WebCore rather than its external clients. Replay-specific
code paths will be added once https://bugs.webkit.org/show_bug.cgi?id=128782 is fixed. However,
once complete the code will work as follows:
- When neither capturing or replaying, behavior is unchanged.
- When capturing user inputs, each external input is saved into a replay log as it crosses
the bridge from outside WebCore.
- When replaying, the bridge closes and user inputs from WebKit2 are not accepted. Instead,
the saved inputs from the replay log are re-dispatched as if they had crossed the bridge.
* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.exp.in: Add symbols for input routing methods.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/Page.cpp:
(WebCore::Page::Page): Initialize the owned UserInputBridge in the Page constructor.
* page/Page.h:
(WebCore::Page::inputBridge): Added a by-reference getter.
* replay/UserInputBridge.cpp: Added.
(WebCore::UserInputBridge::UserInputBridge):
(WebCore::UserInputBridge::~UserInputBridge):
(WebCore::UserInputBridge::handleContextMenuEvent):
(WebCore::UserInputBridge::handleMousePressEvent):
(WebCore::UserInputBridge::handleMouseReleaseEvent):
(WebCore::UserInputBridge::handleMouseMoveEvent):
(WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
(WebCore::UserInputBridge::handleKeyEvent):
(WebCore::UserInputBridge::handleAccessKeyEvent):
(WebCore::UserInputBridge::handleWheelEvent):
(WebCore::UserInputBridge::focusSetActive):
(WebCore::UserInputBridge::focusSetFocused):
(WebCore::UserInputBridge::scrollRecursively):
(WebCore::UserInputBridge::logicalScrollRecursively):
(WebCore::UserInputBridge::loadRequest):
(WebCore::UserInputBridge::reloadFrame):
(WebCore::UserInputBridge::stopLoadingFrame):
(WebCore::UserInputBridge::tryClosePage):
* replay/UserInputBridge.h: Added.
2014-02-26 Dean Jackson <dino@apple.com>
[WebGL] Protect more WebGL entry points for pending contexts
https://bugs.webkit.org/show_bug.cgi?id=129386
Reviewed by Tim Horton.
There are entry points into a WebGLRenderingContext that don't
come from the web-exposed API directly, such as drawImage with
the WebGL canvas. Protect these by returning early if we're
a pending context.
Also a bunch of drive-by 0 -> nullptr changes.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::markLayerComposited):
(WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
(WebCore::WebGLRenderingContext::paintRenderingResultsToImageData):
(WebCore::WebGLRenderingContext::reshape):
(WebCore::WebGLRenderingContext::createBuffer):
(WebCore::WebGLRenderingContext::createFramebuffer):
(WebCore::WebGLRenderingContext::createTexture):
(WebCore::WebGLRenderingContext::createProgram):
(WebCore::WebGLRenderingContext::createRenderbuffer):
(WebCore::WebGLRenderingContext::createShader):
(WebCore::WebGLRenderingContext::getActiveAttrib):
(WebCore::WebGLRenderingContext::getActiveUniform):
(WebCore::WebGLRenderingContext::getContextAttributes):
(WebCore::WebGLRenderingContext::getError):
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getShaderPrecisionFormat):
(WebCore::WebGLRenderingContext::getUniformLocation):
(WebCore::WebGLRenderingContext::drawImageIntoBuffer):
(WebCore::WebGLRenderingContext::videoFrameToImage):
(WebCore::WebGLRenderingContext::validateBufferDataParameters):
(WebCore::WebGLRenderingContext::LRUImageBufferCache::imageBuffer):
2014-02-26 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] inset and inset-rectangle trigger assert with replaced element and large percentage dimension
https://bugs.webkit.org/show_bug.cgi?id=129060
Reviewed by Simon Fraser.
A bounds check was omitted when computing the width and height for inset
rectangles, making it possible for the width or height to end up being
negative. This patch adds in that check for both. It seems that only
replaced elements like iframe and img trigger this problem.
Tests: fast/shapes/shape-outside-floats/shape-outside-floats-img-inset-negative-width-crash.html
fast/shapes/shape-outside-floats/shape-outside-floats-img-inset-rectangle-negative-width-crash.html
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
2014-02-26 Myles C. Maxfield <mmaxfield@apple.com>
Underlines are too thick when zoomed in
https://bugs.webkit.org/show_bug.cgi?id=129352
Reviewed by Dean Jackson.
The input to the underline drawing code is in user-space, not device-space.
The underlines were getting scaled twice, once in InlineTextBox and the other
in GraphicsContext.
Test: fast/css3-text/css3-text-decoration/text-decoration-scaled.html
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
2014-02-26 Andreas Kling <akling@apple.com>
Remove unused InspectorCounters.
<https://webkit.org/b/129367>
The InspectorCounters code was only used to implement two layout test
APIs (window.internals.numberOfLive{Nodes,Documents}) yet it had hooks
in crazy places like Node construction and destruction.
Rewrote the internals APIs to iterate over all live Documents instead,
totaling up their referencing Node count. Added a process-global
Document::allDocuments() HashSet to make this whole thing possible.
Reviewed by Sam Weinig.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSEventListener.cpp:
* dom/Document.cpp:
(WebCore::Document::allDocuments):
(WebCore::Document::Document):
(WebCore::Document::~Document):
* dom/Document.h:
(WebCore::Node::Node):
* dom/Node.cpp:
(WebCore::Node::~Node):
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorCounters.cpp: Removed.
* inspector/InspectorCounters.h: Removed.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
* inspector/protocol/Timeline.json:
* platform/ThreadGlobalData.cpp:
* testing/Internals.cpp:
(WebCore::Internals::numberOfLiveNodes):
(WebCore::Internals::numberOfLiveDocuments):
* testing/Internals.h:
* testing/Internals.idl:
2014-02-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove console.profiles from window.console API
https://bugs.webkit.org/show_bug.cgi?id=116883
Reviewed by Timothy Hatcher.
console.profiles has been removed or never implemented by other
browsers. We should remove it as well. However, since tests
rely on it, keep it as window.internals.consoleProfiles.
* WebCore.exp.in:
* page/Console.idl:
* testing/Internals.cpp:
(WebCore::Internals::consoleProfiles):
* testing/Internals.h:
* testing/Internals.idl:
2014-02-26 Martin Hock <mhock@apple.com>
Create SessionID value-style class for session IDs.
https://bugs.webkit.org/show_bug.cgi?id=129141
Reviewed by Sam Weinig.
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/Page.cpp: Add SessionID member.
(WebCore::Page::Page):
(WebCore::Page::sessionID): Retrieve sessionID or use settings if not set.
* page/Page.h:
(WebCore::Page::isSessionIDSet):
(WebCore::Page::setSessionID):
* page/SessionID.h: Session ID class consisting solely of its uint64_t session ID.
(WebCore::SessionID::SessionID):
(WebCore::SessionID::isValid): Not empty.
(WebCore::SessionID::isEphemeral):
(WebCore::SessionID::sessionID):
(WebCore::SessionID::operator==): Value-based equality.
(WebCore::SessionID::operator!=):
(WebCore::SessionID::emptySessionID): Zero value also used for HashTraits emptyValue.
(WebCore::SessionID::defaultSessionID):
(WebCore::SessionID::legacyPrivateSessionID):
* page/SessionIDHash.h:
(WTF::SessionIDHash::hash): Just the casted session ID (low order bytes)
(WTF::SessionIDHash::equal):
(WTF::HashTraits<WebCore::SessionID>::emptyValue): Equal to emptySessionID.
(WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): -1 value.
(WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
2014-02-26 Eric Carlson <eric.carlson@apple.com>
Fix builds that don't define IMAGE_CONTROLS.
* page/ContextMenuContext.cpp:
(WebCore::ContextMenuContext::ContextMenuContext):
2014-02-26 Eric Carlson <eric.carlson@apple.com>
Build fix for OS X after r164720.
* page/ContextMenuContext.cpp:
2014-02-26 Brady Eidson <beidson@apple.com>
Pipe experimental image controls menu up to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=129339
Reviewed by Simon Fraser.
Handle events for the image control, starting down the context menu code path if appropriate:
* html/shadow/mac/ImageControlsRootElementMac.cpp:
(WebCore::ImageControlsRootElementMac::defaultEventHandler):
* html/shadow/mac/ImageControlsRootElementMac.h:
Add a class to hold a HitTestResult and addition info about the current ContextMenu invocation:
* page/ContextMenuContext.cpp: Added.
(WebCore::ContextMenuContext::ContextMenuContext):
* page/ContextMenuContext.h: Added.
(WebCore::ContextMenuContext::hitTestResult):
(WebCore::ContextMenuContext::isImageControl):
Update ContextMenuController to work with ContextMenuContext instead of HitTestResult directly:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::showContextMenu):
(WebCore::ContextMenuController::createContextMenu):
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::addInspectElementItem):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
(WebCore::ContextMenuController::showImageControlsMenu):
* page/ContextMenuController.h:
(WebCore::ContextMenuController::contextMenu):
(WebCore::ContextMenuController::setContextMenuContext):
(WebCore::ContextMenuController::context):
(WebCore::ContextMenuController::hitTestResult):
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
2014-02-26 Zan Dobersek <zdobersek@igalia.com>
REGRESSION(r162947): Document::topDocument() returns an incorrect reference for cached Documents
https://bugs.webkit.org/show_bug.cgi?id=128175
Reviewed by Antti Koivisto.
* dom/Document.cpp:
(WebCore::Document::topDocument): Fall back to pre-r162947 way of determining the top document
when the Document is in page cache or is in the middle of having its render tree destroyed.
In the first case, the determined top document is actually the document currently loaded in the
Frame to which the cached document is still connected, which is obviously not desired. In the
second case the top document is similarly incorrectly deduced, leading to non-deletion of the
proper top document's AXObjectCache. Because of this AccessibilityRenderObjects are not detached
which results in assertions in RenderObject destructor where the objects are found to be still
flagged as in use by the AX cache.
2014-02-26 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Remove unused method RenderFlowThread::updateLayerToRegionMappings()
https://bugs.webkit.org/show_bug.cgi?id=129368
Reviewed by Andrei Bucur.
Remove unused code, no new tests.
* rendering/RenderFlowThread.h:
2014-02-26 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GTK] Regression when showing the captions menu
https://bugs.webkit.org/show_bug.cgi?id=129106
Reviewed by Martin Robinson.
In some cases, when clicking the captions button the menu was not
shown.
Updated test: media/video-controls-captions-trackmenu.html
* Modules/mediacontrols/mediaControlsGtk.js:
(ControllerGtk.prototype.buildCaptionMenu):
(ControllerGtk.prototype.showCaptionMenu): Specify sizes in
pixels.
2014-02-26 Ryosuke Niwa <rniwa@webkit.org>
Avoid unnecessary HTML Collection invalidations for id and name attribute changes
https://bugs.webkit.org/show_bug.cgi?id=129361
Reviewed by Benjamin Poulain.
Before this patch, setting id and name attributes resulted in traversing all the ancestors to invalidate
HTML collections on those nodes whenever we had more than one HTMLCollection alive.
Avoid the traversal when HTMLCollections don't have any valid id and name map caches by making each
HTMLCollection explicitly call collectionCachedIdNameMap and collectionWillClearIdNameMap when it caches
or clears the id and name map.
Inspired by https://chromium.googlesource.com/chromium/blink/+/5b06b91b79098f7d42e480f85be32198315d2440
* dom/Document.cpp:
(WebCore::Document::registerCollection): Takes a boolean to indicate whether collection has a valid cache
for the id and name map.
(WebCore::Document::unregisterCollection): Ditto.
(WebCore::Document::collectionCachedIdNameMap): Added.
(WebCore::Document::collectionWillClearIdNameMap): Added.
* dom/Document.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptDocument): Call invalidateCache on HTML collections after, not before,
calling unregisterCollection and registerCollection since collections' owner nodes have already been
moved to the new document here and invalidateCache uses owner node's document to call
collectionWillClearIdNameMap. So calling invalidateCache before calling unregister/registerCollection
would result in collectionWillClearIdNameMap getting called on a wrong document.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::~HTMLCollection):
(WebCore::HTMLCollection::invalidateCache):
(WebCore::HTMLCollection::invalidateIdNameCacheMaps): Added the code to uncount itself from the number
of live node lists and HTML collections that need to be invalidated upon id and name attribute changes.
(WebCore::HTMLCollection::updateNameCache):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::invalidateCache):
(WebCore::HTMLCollection::hasIdNameCache): Renamed from hasNameCache.
(WebCore::HTMLCollection::setHasIdNameCache): Renamed from setHasIdNameCache.
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::updateNameCache):
2014-02-25 Frédéric Wang <fred.wang@free.fr>
Add support for minsize/maxsize attributes.
https://bugs.webkit.org/show_bug.cgi?id=122567
Reviewed by Chris Fleizach.
This change implements the minsize/maxsize attributes of the mo element.
We also switch stretch sizes from int to LayoutUnit to improve accuracy.
Tests: mathml/presentation/stretchy-minsize-maxsize-dynamic.html
mathml/presentation/stretchy-minsize-maxsize.html
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::SetOperatorProperties):
(WebCore::RenderMathMLOperator::stretchTo):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layout):
2014-02-25 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Small clean-up of flow threads accelerated compositing code
https://bugs.webkit.org/show_bug.cgi?id=129312
Reviewed by Andrei Bucur.
Some clean-up for the code used for regions in accelerated compositing functionality:
1. Rename updateRenderFlowThreadLayersIfNeeded -> updateFlowThreadsLayerToRegionMappingsIfNeeded
as the function updates the mapping between the flow threads layers and their corresponding regions
2. Remove RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded and move the code in place
at call site since the function body does not require a dedicated function.
No new functionality, no new tests.
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::updateFlowThreadsLayerToRegionMappingsIfNeeded):
Now that the regions are always layers, we do not need to iterate backwards.
* rendering/FlowThreadController.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
* rendering/RenderLayerCompositor.h:
2014-02-25 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Ensure consistent border painting width.
https://bugs.webkit.org/show_bug.cgi?id=129259
Reviewed by Simon Fraser.
Border edges are painted as (semi)independent rectangles. When snapping an edge rectangle
to device pixels, its painted dimensions depend on its size and its fractional position.
Specific combination of position and border width can result in painting edges sized differently.
Using device snapped border width to calculate inner/outer rectangles helps to maintain
uniform border width.
Currently not testable.
* rendering/RenderBoxModelObject.cpp:
(WebCore::BorderEdge::BorderEdge):
(WebCore::BorderEdge::shouldRender):
(WebCore::BorderEdge::presentButInvisible):
(WebCore::BorderEdge::widthForPainting):
(WebCore::BorderEdge::getDoubleBorderStripeWidths):
(WebCore::RenderBoxModelObject::paintOneBorderSide):
(WebCore::calculateSideRect):
(WebCore::RenderBoxModelObject::paintBorderSides):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
(WebCore::calculateSideRectIncludingInner):
2014-02-25 Zalan Bujtas <zalan@apple.com>
Subpixel layout: Remove explicit static_cast<LayoutUnit> conversions.
https://bugs.webkit.org/show_bug.cgi?id=129359
Reviewed by Simon Fraser.
No testable change in behavior.
* css/LengthFunctions.cpp:
(WebCore::minimumValueForLength):
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintFillLayer):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::logicalLeftVisualOverflow):
(WebCore::InlineFlowBox::logicalRightVisualOverflow):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::isSelected):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeColumnCountAndWidth):
(WebCore::getBPMWidth):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustForBorderFit):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderTable.h:
(WebCore::RenderTable::borderSpacingInRowDirection):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::beforeAnnotationsAdjustment):
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::resolveLengthAttributeForSVG):
2014-02-25 Anders Carlsson <andersca@apple.com>
Build fixes.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2014-02-25 Benjamin Poulain <bpoulain@apple.com>
Build fix for OS X after r164690
* WebCore.exp.in:
2014-02-25 Anders Carlsson <andersca@apple.com>
Rename WebCore::VisitedLinkProvider to WebCore::VisitedLinkStore
https://bugs.webkit.org/show_bug.cgi?id=129357
Reviewed by Sam Weinig.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* dom/VisitedLinkState.cpp:
(WebCore::VisitedLinkState::determineLinkStateSlowCase):
* loader/HistoryController.cpp:
(WebCore::addVisitedLink):
* page/DefaultVisitedLinkStore.cpp: Renamed from Source/WebCore/page/DefaultVisitedLinkProvider.cpp.
(WebCore::DefaultVisitedLinkStore::create):
(WebCore::DefaultVisitedLinkStore::DefaultVisitedLinkStore):
(WebCore::DefaultVisitedLinkStore::~DefaultVisitedLinkStore):
(WebCore::DefaultVisitedLinkStore::isLinkVisited):
(WebCore::DefaultVisitedLinkStore::addVisitedLink):
* page/DefaultVisitedLinkStore.h: Renamed from Source/WebCore/page/DefaultVisitedLinkProvider.h.
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::visitedLinkStore):
* page/Page.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::visitedLinkStore):
* page/PageGroup.h:
* page/VisitedLinkStore.cpp: Renamed from Source/WebCore/page/VisitedLinkProvider.cpp.
(WebCore::VisitedLinkStore::VisitedLinkStore):
(WebCore::VisitedLinkStore::~VisitedLinkStore):
* page/VisitedLinkStore.h: Renamed from Source/WebCore/page/VisitedLinkProvider.h.
2014-02-25 Enrica Casucci <enrica@apple.com>
[WebKit2] Form controls handling.
https://bugs.webkit.org/show_bug.cgi?id=129344
<rdar://problem/16053643>
Reviewed by Simon Fraser and Joseph Pecoraro.
Adding some exports.
* WebCore.exp.in:
2014-02-25 Samuel White <samuel_white@apple.com>
Add accessibility search predicate support for AXOutlines
https://bugs.webkit.org/show_bug.cgi?id=123748
Reviewed by Chris Fleizach.
Added new AXOutlineSearchKey to support finding elements with aria role=tree.
No new tests, updated existing search-predicate.html test to cover AXOutlineSearchKey.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilitySearchKeyMap):
2014-02-25 Mark Lam <mark.lam@apple.com>
Need to initialize VM stack data even when the VM is on an exclusive thread.
<https://webkit.org/b/129265>
Not reviewed.
No new tests.
Relanding r164627 now that <https://webkit.org/b/129341> is fixed.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
2014-02-25 Mark Lam <mark.lam@apple.com>
JSDOMPromise methods should acquire VM lock before calling into JS.
<https://webkit.org/b/129341>
Reviewed by Geoffrey Garen.
No new tests.
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredWrapper::resolve):
(WebCore::DeferredWrapper::reject):
(WebCore::DeferredWrapper::resolve<String>):
(WebCore::DeferredWrapper::resolve<bool>):
(WebCore::char>>):
(WebCore::DeferredWrapper::reject<String>):
2014-02-25 Anders Carlsson <andersca@apple.com>
Simplify visited link style invalidation
https://bugs.webkit.org/show_bug.cgi?id=129340
Reviewed by Dan Bernstein.
Get rid of the static Page::allVisitedStateChanged and Page::visitedStateChanged
member functions and add functions to invalidate all styles on a single page or the style
for a single link hash on a single page.
* WebCore.exp.in:
* page/Page.cpp:
(WebCore::Page::invalidateStylesForAllLinks):
(WebCore::Page::invalidateStylesForLink):
* page/Page.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::addVisitedLink):
(WebCore::PageGroup::removeVisitedLink):
(WebCore::PageGroup::removeVisitedLinks):
2014-02-25 Andreas Kling <akling@apple.com>
Remove unused ThreadSpecificInspectorCounters.
<https://webkit.org/b/129337>
We were keeping count of all the JS event listeners in every thread
to support an old Chromium feature that's no longer relevant.
Removing this gets rid of expensive thread-local storage lookups.
Reviewed by Anders Carlsson.
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::~JSEventListener):
* inspector/InspectorCounters.cpp:
* inspector/InspectorCounters.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::setDOMCounters):
* inspector/protocol/Timeline.json:
* platform/ThreadGlobalData.cpp:
(WebCore::ThreadGlobalData::ThreadGlobalData):
(WebCore::ThreadGlobalData::destroy):
* platform/ThreadGlobalData.h:
2014-02-25 Laszlo Vidacs <lvidacs.u-szeged@partner.samsung.com>
display:table with padding and/or borders in border-box calculates height incorrectly
https://bugs.webkit.org/show_bug.cgi?id=126576
Reviewed by David Hyatt.
Based on blink issue https://codereview.chromium.org/25206002/
Tests: fast/box-sizing/css-table-collapse.html
fast/box-sizing/css-table-no-collapse.html
fast/box-sizing/table-collapse.html
fast/box-sizing/table-no-collapse.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
2014-02-25 Anders Carlsson <andersca@apple.com>
Get rid of VisitedLinkStrategy
https://bugs.webkit.org/show_bug.cgi?id=129324
Reviewed by Dan Bernstein.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::PlatformStrategies):
* platform/VisitedLinkStrategy.h: Removed.
2014-02-25 Alexey Proskuryakov <ap@apple.com>
Rolling out http://trac.webkit.org/changeset/164611, because it broke
WebKit2.PrivateBrowsingPushStateNoHistoryCallback API test
The change was for:
https://bugs.webkit.org/show_bug.cgi?id=129141
Create SessionID class
2014-02-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r164627.
http://trac.webkit.org/changeset/164627
https://bugs.webkit.org/show_bug.cgi?id=129325
Broke SubtleCrypto tests (Requested by ap on #webkit).
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
2014-02-25 Anders Carlsson <andersca@apple.com>
DefaultVisitedLinkProvider can just call into the page group directly
https://bugs.webkit.org/show_bug.cgi?id=129320
Reviewed by Andreas Kling.
* page/DefaultVisitedLinkProvider.cpp:
(WebCore::DefaultVisitedLinkProvider::isLinkVisited):
(WebCore::DefaultVisitedLinkProvider::addVisitedLink):
2014-02-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r164638.
http://trac.webkit.org/changeset/164638
https://bugs.webkit.org/show_bug.cgi?id=129321
Broke Windows build. (Requested by bfulgham on #webkit).
* dom/ContainerNode.h:
(WebCore::ChildNodesLazySnapshot::takeSnapshot):
(WebCore::ChildNodesLazySnapshot::hasSnapshot):
* dom/Element.cpp:
(WebCore::ensureAttrNodeListForElement):
(WebCore::Element::attributes):
* dom/ElementIteratorAssertions.h:
(WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
* dom/ElementRareData.h:
(WebCore::ElementRareData::create):
(WebCore::ElementRareData::setAttributeMap):
* dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::create):
(WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
(WebCore::MutationObserverRegistration::clearTransientRegistrations):
(WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
* dom/MutationObserverRegistration.h:
* dom/NamedNodeMap.h:
(WebCore::NamedNodeMap::create):
(WebCore::NamedNodeMap::NamedNodeMap):
* dom/Node.cpp:
(WebCore::Node::ensureRareData):
(WebCore::Node::didMoveToNewDocument):
(WebCore::Node::ensureEventTargetData):
(WebCore::Node::mutationObserverRegistry):
(WebCore::Node::registerMutationObserver):
(WebCore::Node::unregisterMutationObserver):
(WebCore::Node::notifyMutationObserversNodeWillDetach):
* dom/Node.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::create):
(WebCore::NodeListsNodeData::NodeListsNodeData):
(WebCore::NodeMutationObserverData::create):
(WebCore::NodeMutationObserverData::NodeMutationObserverData):
(WebCore::NodeRareData::create):
(WebCore::NodeRareData::clearNodeLists):
(WebCore::NodeRareData::ensureNodeLists):
(WebCore::NodeRareData::ensureMutationObserverData):
(WebCore::NodeRareData::NodeRareData):
* dom/StyledElement.cpp:
(WebCore::StyledElement::rebuildPresentationAttributeStyle):
2014-02-25 Eric Carlson <eric.carlson@apple.com>
[iOS] Show status image when playing video to external device
https://bugs.webkit.org/show_bug.cgi?id=129277
Reviewed by Jer Noble.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleEvent): Restructure the code so it is possible to handle events
that target the video element which aren't in the HandledVideoEvents array.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.currentPlaybackTargetIsWireless): webkitCurrentPlaybackTargetIsWireless
is an attribute, not a function.
(ControllerIOS.prototype.updateWirelessPlaybackStatus): Fix style.
(ControllerIOS.prototype.updateWirelessTargetAvailable): Ditto.
(ControllerIOS.prototype.updateProgress): Ditto.
(ControllerIOS.prototype.handleWrapperTouchStart): Show the controls if the wireless status
display is touched.
(ControllerIOS.prototype.handleFullscreenButtonClicked): Fix style
(ControllerIOS.prototype.handleWirelessPlaybackChange): Ditto.
(ControllerIOS.prototype.handleWirelessTargetAvailableChange):
(ControllerIOS.prototype.handleWirelessPickerButtonClicked): Ditto. Stop even propagation.
Move "playback target" logic into HTMLMediaSession.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement): Call media session.
(WebCore::HTMLMediaElement::loadResource): Tell media session to apply media player
restrictions now that it has a url.
(WebCore::HTMLMediaElement::invalidateCachedTime): Only log when cached time is not
already invalie.
(WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Call media session.
(WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
(WebCore::HTMLMediaElement::addEventListener): Ditto.
(WebCore::HTMLMediaElement::removeEventListen): Ditto.
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
(WebCore::HTMLMediaElement::createMediaPlayer): Ditto.
* html/HTMLMediaSession.cpp:
(WebCore::restrictionName): Log new WirelessVideoPlaybackDisabled restriction.
(WebCore::HTMLMediaSession::showingPlaybackTargetPickerPermitted): Return false if there
is no page, or if wireless playback is disabled.
(WebCore::HTMLMediaSession::currentPlaybackTargetIsWireless): New, logic from HTMLMediaElement.
(WebCore::HTMLMediaSession::showPlaybackTargetPicker): Ditto.
(WebCore::HTMLMediaSession::hasWirelessPlaybackTargets): Ditto.
(WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Ditto.
(WebCore::HTMLMediaSession::setWirelessVideoPlaybackDisabled): Ditto.
(WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Ditto.
(WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): New, apply media player specific
restriction.
* html/HTMLMediaSession.h:
Move "playback target" logic into HTMLMediaSession.
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::parseAttribute): Call media session.
(WebCore::HTMLVideoElement::webkitWirelessVideoPlaybackDisabled): Call media session.
* platform/audio/MediaSessionManager.h:
(WebCore::MediaSessionManager::showPlaybackTargetPicker): New method, does nothing in base class.
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::showPlaybackTargetPicker): Add non-functional stub.
Implement wireless playback control and status API.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Dispatch TargetIsWirelessChanged.
(WebCore::MediaPlayerPrivateAVFoundation::playbackTargetIsWirelessChanged): Pass through to
media element.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
m_allowsWirelessVideoPlayback.
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Remove "externalPlaybackActive" observer.
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): Fix broken logging.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Add "externalPlaybackActive" observer,
set initial wireless playback.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer): Fix broken logging.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless): New.
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled): New.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled): New.
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackTargetIsWirelessDidChange): New.
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Deal with
externalPlaybackActive.
2014-02-24 Brent Fulgham <bfulgham@apple.com>
[Win] Gracefully recover from missing 'naturalSize' parameter for media
https://bugs.webkit.org/show_bug.cgi?id=129278
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add declaration for
missing function call.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::assetStatus): Don't treat missing 'naturalSize'
as a fatal error.
(WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged): Handle case of asset track
not being available yet.
(WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged): If the 'naturalSize' is empty,
use the Player Item's 'presentationSize' instead.
(WebCore::AVFWrapper::processNotification): Add missing handler for duration changed.
2014-02-25 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Add ENABLE flag
https://bugs.webkit.org/show_bug.cgi?id=129153
Reviewed by Simon Fraser.
Added ENABLE_CSS_GRID_LAYOUT feature flag.
* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSGridTemplateAreasValue.cpp:
* css/CSSGridTemplateAreasValue.h:
* css/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSParser.h:
* css/CSSParserMode.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSPropertyNames.in:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
* css/StyleResolver.cpp:
(WebCore::equivalentBlockDisplay):
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::applyProperty):
* css/StyleResolver.h:
* dom/Document.cpp:
* dom/Document.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
* rendering/RenderGrid.cpp:
* rendering/RenderGrid.h:
* rendering/style/GridCoordinate.h:
* rendering/style/GridLength.h:
* rendering/style/GridPosition.h:
* rendering/style/GridTrackSize.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleAllInOne.cpp:
* rendering/style/StyleGridData.cpp:
* rendering/style/StyleGridData.h:
* rendering/style/StyleGridItemData.cpp:
* rendering/style/StyleGridItemData.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2014-02-25 Jer Noble <jer.noble@apple.com>
[EME][Mac] Fix a few issues in CDMSessionMediaSourceAVFObjC.
https://bugs.webkit.org/show_bug.cgi?id=129310
Reviewed by Eric Carlson.
Only send a 'keyerror' event if an actual error code was returned, not just
when no key was added:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::addKeyTimerFired):
The 'length' parameter to a typed ArrayBufferView is the number of entries
in the array, not the byte length:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
The return value of streamingContentKeyRequestDataForApp:contentIdentifier:trackId:options:error
is autoreleased; do not wrap it in an adoptNS:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::update):
2014-02-25 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[MediaStream] Adding mock implementation of UserMediaClient
https://bugs.webkit.org/show_bug.cgi?id=129274
Reviewed by Eric Carlson.
* platform/mock/UserMediaClientMock.h: Added.
(WebCore::UserMediaClientRequestNotifier::UserMediaClientRequestNotifier):
* testing/Internals.cpp:
(WebCore::Internals::Internals):
2014-02-25 Ryosuke Niwa <rniwa@webkit.org>
Tighten bitfields in live NodeLists and HTMLCollections
https://bugs.webkit.org/show_bug.cgi?id=129300
Reviewed by Geoffrey Garen.
Reduce the number of bits used for m_rootType and m_type in LiveNodeList.
Also use enum class for LiveNodeList types. We keep "Type" suffix not to
confuse old-ish compilers.
* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::ClassNodeList):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getElementsByTagName):
(WebCore::ContainerNode::getElementsByName):
(WebCore::ContainerNode::getElementsByClassName):
(WebCore::ContainerNode::radioNodeList):
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::collectionFirst):
(WebCore::LiveNodeList::collectionTraverseForward):
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::LiveNodeList):
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::NameNodeList):
* dom/NameNodeList.h:
(WebCore::NameNodeList::create):
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::namedNodeListKey):
* dom/TagNodeList.cpp:
(WebCore::HTMLTagNodeList::HTMLTagNodeList):
* dom/TagNodeList.h:
(WebCore::TagNodeList::create):
(WebCore::HTMLTagNodeList::create):
* html/HTMLCollection.h:
* html/LabelableElement.cpp:
(WebCore::LabelableElement::labels):
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList):
* html/LabelsNodeList.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
* html/RadioNodeList.h:
(WebCore::RadioNodeList::create):
2014-02-24 Anders Carlsson <andersca@apple.com>
Make it possible to set the visited link provider on a per page basis
https://bugs.webkit.org/show_bug.cgi?id=129288
Reviewed by Andreas Kling.
* WebCore.exp.in:
Export symbols needed by WebKit2.
* WebCore.xcodeproj/project.pbxproj:
Make VisitedLinkProvider a private header.
* page/Page.cpp:
(WebCore::Page::Page):
Take the visited link provider from the PageClients object.
(WebCore::Page::visitedLinkProvider):
If the page has a visited link provider set, return it.
* page/Page.h:
Add VisitedLinkProvider to Page and PageClients.
2014-02-25 Morten Stenshorne <mstensho@opera.com>
[New Multicolumn] -webkit-column-break-inside:avoid doesn't work
https://bugs.webkit.org/show_bug.cgi?id=129299
Reviewed by Andrei Bucur.
adjustForUnsplittableChild() simply forgot to check whether we
were inside flow thread based multicol.
Test: fast/multicol/newmulticol/avoid-column-break-inside.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustForUnsplittableChild):
2014-02-25 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Remove unused function RenderFlowThread::regionForCompositedLayer
https://bugs.webkit.org/show_bug.cgi?id=129303
Reviewed by Andrei Bucur.
Cleanup, no funtionality change, no new tests.
* rendering/RenderFlowThread.h:
2014-02-25 Mihai Tica <mitica@adobe.com>
[CSS Blending] -webkit-mix-blend-mode should force transform-style: flat.
https://bugs.webkit.org/show_bug.cgi?id=126158
Reviewed by Mihnea Ovidenie.
As stated in the http://www.w3.org/TR/css3-transforms/#propdef-transform-style, an element with blending
should force transform-style: flat.
Test: css3/compositing/blend-mode-transform-style.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): If blending is detected, set transform-style to flat.
2014-02-25 Zan Dobersek <zdobersek@igalia.com>
Move to using std::unique_ptr for Element, Node and related classes
https://bugs.webkit.org/show_bug.cgi?id=129058
Reviewed by Anders Carlsson.
Replace uses of OwnPtr and PassOwnPtr in Element, Node and the related
classes with std::unique_ptr and move semantics.
* dom/ContainerNode.h:
(WebCore::ChildNodesLazySnapshot::takeSnapshot):
(WebCore::ChildNodesLazySnapshot::hasSnapshot):
* dom/Element.cpp:
(WebCore::ensureAttrNodeListForElement):
(WebCore::Element::attributes):
* dom/ElementIteratorAssertions.h:
(WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
* dom/ElementRareData.h:
(WebCore::ElementRareData::setAttributeMap):
* dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
(WebCore::MutationObserverRegistration::clearTransientRegistrations):
(WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
* dom/MutationObserverRegistration.h:
* dom/NamedNodeMap.h:
(WebCore::NamedNodeMap::NamedNodeMap):
* dom/Node.cpp:
(WebCore::Node::ensureRareData):
(WebCore::Node::didMoveToNewDocument):
(WebCore::Node::ensureEventTargetData):
(WebCore::Node::mutationObserverRegistry):
(WebCore::Node::registerMutationObserver):
(WebCore::Node::unregisterMutationObserver):
(WebCore::Node::notifyMutationObserversNodeWillDetach):
* dom/Node.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::NodeListsNodeData):
(WebCore::NodeRareData::NodeRareData):
(WebCore::NodeRareData::clearNodeLists):
(WebCore::NodeRareData::ensureNodeLists):
(WebCore::NodeRareData::ensureMutationObserverData):
* dom/StyledElement.cpp:
(WebCore::StyledElement::rebuildPresentationAttributeStyle):
2014-02-25 Andreas Kling <akling@apple.com>
Prune dead code for Web Inspector memory instrumentation.
<https://webkit.org/b/129286>
This was leftover code from Chromium's inspector. It's not used by
today's WebKit inspector.
Reviewed by Sam Weinig.
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorController.h:
* inspector/InspectorMemoryAgent.cpp: Removed.
* inspector/InspectorMemoryAgent.h: Removed.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
* inspector/protocol/Memory.json: Removed.
2014-02-24 Chris Fleizach <cfleizach@apple.com>
AX: Support abbr, acronym
https://bugs.webkit.org/show_bug.cgi?id=128860
Reviewed by Mario Sanchez Prada.
Expose the data in <abbr>, <acronym> and <th abbr=""> as an
alternateTextValue() parameter.
Test: platform/mac/accessibility/abbr-acronym-tags.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasTagName):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::alternateTextValue):
(WebCore::AccessibilityObject::supportsAlternateTextValue):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::alternateTextValue):
(WebCore::AccessibilityRenderObject::supportsAlternateTextValue):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::alternateTextValue):
(WebCore::AccessibilityTableCell::supportsAlternateTextValue):
* accessibility/AccessibilityTableCell.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetAlternateTextValue):
(AXAttributedStringAppendText):
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2014-02-24 Martin Robinson <mrobinson@igalia.com>
[GTK] generate-gtkdoc should not generate documentation for source files for unbuilt source files
https://bugs.webkit.org/show_bug.cgi?id=128417
Reviewed by Carlos Garcia Campos.
* bindings/gobject/GNUmakefile.am: Generate a config file for webkitdom documentation generation.
2014-02-24 Mark Lam <mark.lam@apple.com>
Need to initialize VM stack data even when the VM is on an exclusive thread.
<https://webkit.org/b/129265>
Reviewed by Geoffrey Garen.
No new tests.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
- Added an assertion to ensure that we are holding the JSLock.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
- Updated to use the new VM::setExclusiveThread().
2014-02-24 Anders Carlsson <andersca@apple.com>
Add a DefaultVisitedLinkProvider and route visited link actions through it
https://bugs.webkit.org/show_bug.cgi?id=129285
Reviewed by Dan Bernstein.
DefaultVisitedLinkProvider currently just forwards everything to the visited link strategy,
but will soon take over the responsibilities of visited link handling from PageGroup.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/VisitedLinkState.cpp:
(WebCore::VisitedLinkState::determineLinkStateSlowCase):
* loader/HistoryController.cpp:
(WebCore::addVisitedLink):
(WebCore::HistoryController::updateForStandardLoad):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::updateForClientRedirect):
(WebCore::HistoryController::updateForSameDocumentNavigation):
(WebCore::HistoryController::pushState):
(WebCore::HistoryController::replaceState):
* page/DefaultVisitedLinkProvider.cpp: Copied from Source/WebCore/page/VisitedLinkProvider.h.
(WebCore::DefaultVisitedLinkProvider::create):
(WebCore::DefaultVisitedLinkProvider::DefaultVisitedLinkProvider):
(WebCore::DefaultVisitedLinkProvider::~DefaultVisitedLinkProvider):
(WebCore::DefaultVisitedLinkProvider::isLinkVisited):
(WebCore::DefaultVisitedLinkProvider::addVisitedLink):
* page/DefaultVisitedLinkProvider.h: Copied from Source/WebCore/page/VisitedLinkProvider.h.
* page/Page.cpp:
(WebCore::Page::visitedLinkProvider):
* page/Page.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
(WebCore::PageGroup::visitedLinkProvider):
* page/PageGroup.h:
* page/VisitedLinkProvider.h:
2014-02-24 Jeremy Jones <jeremyj@apple.com>
WK2 AVKit fullscreen doesn't display video.
https://bugs.webkit.org/show_bug.cgi?id=128564
Reviewed by Simon Fraser.
* WebCore.exp.in:
Export WebCore::PlatformCALayer::platformCALayer()
* platform/ios/WebVideoFullscreenInterface.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
Remove SetVideoLayerID().
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setVideoLayer):
Wrap make video layer look like an AVAVPlayerLayer with WebAVPlayerLayer
* platform/ios/WebVideoFullscreenModelMediaElement.mm:
(WebVideoFullscreenModelMediaElement::setMediaElement):
Pass along the videoLayer before borrowing it so the interface will be ready to
catch the transaction that removes it.
2014-02-24 Samuel White <samuel_white@apple.com>
AX: AccessibilityObject::findMatchingObjects should never include 'this' in results.
https://bugs.webkit.org/show_bug.cgi?id=129243
Reviewed by Chris Fleizach.
Fix removes the container object from the search results when searching backwards. This
makes backwards & forwards search results consistent with each other.
Test: platform/mac/accessibility/search-predicate-container-not-included.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::findMatchingObjects):
2014-02-24 Samuel White <samuel_white@apple.com>
AX: findMatchingObjects backwards start position inconsistent with forwards start position when startObject == nullptr.
https://bugs.webkit.org/show_bug.cgi?id=129266
Reviewed by Chris Fleizach.
When searching forward with no start object, the first thing considered is the first child of
the container. However, when searching backwards with no start object nothing in the container
is considered; this basically negates the search. This patch makes backwards searching without
a start object start from the last child of the container to match forward search expectations.
Test: platform/mac/accessibility/search-predicate-start-not-specified.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::findMatchingObjects):
2014-02-24 Andreas Kling <akling@apple.com>
Prune dead code for Web Inspector canvas instrumentation.
<https://webkit.org/b/129269>
This was leftover code from Chromium's inspector. It's not used by
today's WebKit inspector.
Reviewed by Timothy Hatcher.
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::getContext):
* inspector/InjectedScriptCanvasModule.cpp: Removed.
* inspector/InjectedScriptCanvasModule.h: Removed.
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorCanvasAgent.cpp: Removed.
* inspector/InspectorCanvasAgent.h: Removed.
* inspector/InspectorCanvasInstrumentation.h: Removed.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::didBeginFrame):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
* inspector/InspectorInstrumentation.h:
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::InstrumentingAgents):
(WebCore::InstrumentingAgents::reset):
* inspector/InstrumentingAgents.h:
2014-02-24 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Adjust lineTop position to the next available wrapping location at shape-outsides
https://bugs.webkit.org/show_bug.cgi?id=128693
Reviewed by David Hyatt.
When we don't have space next to the floating container, but we have space inside the floating-container next
to the defined shape-outside, we should wrap around the shape-outside. This patch fixes the behavior both for
cases when there is no space to fit at the first line, and for the additional lines cases.
Test: fast/shapes/shape-outside-floats/shape-outside-floats-linetop-adjustment.html
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
* rendering/line/LineWidth.cpp:
(WebCore::availableWidthAtOffset):
(WebCore::LineWidth::updateLineDimension): Added new helper.
(WebCore::isWholeLineFit): Added new helper.
(WebCore::LineWidth::wrapNextToShapeOutside): Added new helper.
(WebCore::LineWidth::fitBelowFloats): Add optional parameter for the function.
* rendering/line/LineWidth.h:
2014-02-24 Martin Hock <mhock@apple.com>
Create SessionID value-style class for session IDs.
https://bugs.webkit.org/show_bug.cgi?id=129141
Reviewed by Brady Eidson.
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/Page.cpp: Add SessionID member.
(WebCore::Page::Page):
(WebCore::Page::sessionID): Retrieve sessionID or use settings if not set.
* page/Page.h:
(WebCore::Page::setSessionID):
* page/SessionID.h: Session ID class consisting solely of its uint64_t session ID.
(WebCore::SessionID::SessionID):
(WebCore::SessionID::isValid): Not empty.
(WebCore::SessionID::isEphemeral):
(WebCore::SessionID::sessionID):
(WebCore::SessionID::operator==): Value-based equality.
(WebCore::SessionID::operator!=):
(WebCore::SessionID::emptySessionID): Zero value also used for HashTraits emptyValue.
(WebCore::SessionID::defaultSessionID):
(WebCore::SessionID::legacyPrivateSessionID):
* page/SessionIDHash.h:
(WTF::SessionIDHash::hash): Just the casted session ID (low order bytes)
(WTF::SessionIDHash::equal):
(WTF::HashTraits<WebCore::SessionID>::emptyValue): Equal to emptySessionID.
(WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): -1 value.
(WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
2014-02-24 Javier Fernandez <jfernandez@igalia.com>
[CSS Grid Layout] handle undefined RemainingSpace in computeUsedBreadthOfGridTracks algorithm
https://bugs.webkit.org/show_bug.cgi?id=128372
Reviewed by David Hyatt.
From Blink r165692 by <svillar@igalia.com>
The spec defines a different code path for the computeUsedBreadthOfGridTracks algorithm
http://dev.w3.org/csswg/css-grid/#function-ComputeUsedBreadthOfGridTracks.
Basically the track breadth is different when the available size is undefined and thus,
cannot be taken into account during the computations.
The available size is undefined whenever the height is auto or the grid element has a
shrink-to-fit behavior.
It was also renamed the function to match the specs so the function name starts with
'compute' instead of 'computed'.
No new tests, but added new cases to some of them.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::gridElementIsShrinkToFit):
(WebCore::RenderGrid::computeNormalizedFractionBreadth):
(WebCore::RenderGrid::layoutGridItems):
* rendering/RenderGrid.h:
2014-02-24 Roger Fong <roger_fong@apple.com>
[Windows] Unreviewed pre-emptive build fix.
* WebCore.vcxproj/WebCoreCommon.props: Add replay directory to include path.
2014-02-24 Brady Eidson <beidson@apple.com>
Break out ImageControls style into an external stylesheet
https://bugs.webkit.org/show_bug.cgi?id=129273
Reviewed by Jer Noble.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* css/CSSDefaultStyleSheets.h:
* html/shadow/mac/ImageControlsRootElementMac.cpp:
(WebCore::ImageControlsRootElementMac::maybeCreate):
* html/shadow/mac/imageControlsMac.css:
(.x-webkit-imagemenu):
(.x-webkit-imagemenu:hover):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::mediaControlsScript):
(WebCore::RenderTheme::imageControlsStyleSheet):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::imageControlsStyleSheet):
2014-02-24 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[WebRTC] Validating RTCConfiguration according to the spec
https://bugs.webkit.org/show_bug.cgi?id=129182
Reviewed by Eric Carlson.
Spec states that:
- iceServers should not be an empty list
- the entry in the configuration dictionary is "urls", instead of "url"
- urls can be either a list or a string
Fixing all that in RTCConfiguration validation when creating a RTCPeerConnection
Existing tests were updated.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::appendIceServer): Added.
(WebCore::processIceServer): Added.
(WebCore::RTCPeerConnection::parseConfiguration):
2014-02-24 Radu Stavila <stavila@adobe.com>
[CSS Regions] Relative positioned elements overflowing the region do not get painted into the next tile
https://bugs.webkit.org/show_bug.cgi?id=129254
Reviewed by Antti Koivisto.
The painting of the region's layer should not be aborted so early if the region's fragment shouldn't be painted
because that would prevent all the layer's children from being painted.
Another problem this patch addresses is that clipping should also be performed when the clip rect is empty,
which is what happens when painting in a tile in which the flowed element would normally be painted
if it wasn't clipped by the region.
Test: fast/regions/content-relative-next-tile.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):
2014-02-24 Renata Hodovan <rhodovan.u-szeged@partner.samsung.com>
Get rid of the unused 'immediate' parameters from repaint related functions
https://bugs.webkit.org/show_bug.cgi?id=129111
Reviewed by Simon Fraser.
Removing the 'immediate' parameters from repaint related functions - accoring
to the FIXME in RenderView::repaintViewRectangle() - since they have no effect.
No new tests are necessary because there is no behavior change
* dom/Element.cpp:
(WebCore::Element::setActive):
* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::invalidateRootView):
(WebCore::Chrome::invalidateContentsAndRootView):
(WebCore::Chrome::invalidateContentsForSlowScroll):
* page/Chrome.h:
* page/ChromeClient.h:
* page/Frame.cpp:
(WebCore::Frame::tiledBackingStorePaintEnd):
* page/FrameView.cpp:
(WebCore::FrameView::invalidateRect):
(WebCore::FrameView::scrollContentsFastPath):
(WebCore::FrameView::repaintContentRectangle):
(WebCore::FrameView::shouldUpdate):
* page/FrameView.h:
* platform/HostWindow.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollContents):
(WebCore::ScrollView::scrollContentsSlowPath):
(WebCore::ScrollView::repaintContentRectangle):
(WebCore::ScrollView::updateOverhangAreas):
(WebCore::ScrollView::addPanScrollIcon):
(WebCore::ScrollView::removePanScrollIcon):
(WebCore::ScrollView::platformRepaintContentRectangle):
* platform/ScrollView.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::repaintLayerRectsForImage):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::repaintRectangleInRegions):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
* rendering/RenderLayer.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintUsingContainer):
(WebCore::RenderObject::repaint):
(WebCore::RenderObject::repaintRectangle):
(WebCore::RenderObject::repaintSlowRepaintObject):
* rendering/RenderObject.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::repaintFlowThreadContent):
(WebCore::RenderRegion::repaintFlowThreadContentRectangle):
* rendering/RenderRegion.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):
(WebCore::RenderView::flushAccumulatedRepaintRegion):
(WebCore::RenderView::repaintRectangleInViewAndCompositedLayers):
* rendering/RenderView.h:
* svg/graphics/SVGImageChromeClient.h:
2014-02-24 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
Code cleanup: remove leftover ENABLE(WORKERS) macros and support.
https://bugs.webkit.org/show_bug.cgi?id=129255
Reviewed by Csaba Osztrogonác.
ENABLE_WORKERS macro was removed in r159679, but r161589 added back some occurrences.
Support is now also removed from xcconfig files.
No new tests needed.
* Configurations/FeatureDefines.xcconfig:
* platform/ThreadGlobalData.cpp:
* platform/ThreadGlobalData.h:
* platform/Timer.h:
(WebCore::TimerBase::isActive):
* platform/ios/wak/WebCoreThread.mm:
(RunWebThread):
(StartWebThread):
2014-02-24 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
[CMake] Get rid of "FIXME: The Blackberry port ..." from WebCore/CmakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=129152
Reviewed by Gyuyoung Kim.
* CMakeLists.txt:
2014-02-24 David Kilzer <ddkilzer@apple.com>
Remove redundant setting in FeatureDefines.xcconfig
* Configurations/FeatureDefines.xcconfig:
2014-02-24 Mihai Tica <mitica@adobe.com>
[CSS Blending] An element having -webkit-mix-blend-mode should only blend with the contents of the parent stacking context
https://bugs.webkit.org/show_bug.cgi?id=129154
Reviewed by Dean Jackson.
The blending operation of an element having -webkit-mix-blend-mode should be restricted to the parent stacking context.
This change isolates blending, preventing it from blending with other underlying elements besides the parent stacking context.
Tests: css3/compositing/blend-mode-isolated-group-1.html
css3/compositing/blend-mode-isolated-group-2.html
css3/compositing/blend-mode-isolated-group-3.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer): Initialize added members to false.
(WebCore::RenderLayer::updateBlendMode): Check if a blend mode was set or unset. If so, set the m_updateParentStackingContextShouldIsolateBlendingDirty to true.
(WebCore::RenderLayer::updateParentStackingContextShouldIsolateBlending): Traverse to the parent stacking context and update the
m_isolatesBlending member accordingly.
* rendering/RenderLayer.h:
- Add isolatesBlending() as a condition for creating a transparency layer in the paintsWithTransparency method.
- Add m_updateParentStackingContextShouldIsolateBlendingDirty member.
- Add m_isolatesBlending member and getter.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements): Call updateParentStackingContextShouldIsolateBlending.
2014-02-24 Krzysztof Czech <k.czech@samsung.com>
[ATK] Wrong selected element at a given index in a list box.
https://bugs.webkit.org/show_bug.cgi?id=129039
Reviewed by Chris Fleizach.
Test: accessibility/select-element-at-index.html
The selected element at a given index was wrong. One should be considered among the
all children of a list box, not only selected ones.
* accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(core):
(listObjectForSelection):
(optionFromList):
(optionFromSelection):
(webkitAccessibleSelectionRefSelection):
2014-02-23 Dean Jackson <dino@apple.com>
[WebGL] Allow ANGLE to initialize unused varyings
https://bugs.webkit.org/show_bug.cgi?id=129240
<rdar://problem/15203342>
Reviewed by Sam Weinig.
Covered by: conformance/glsl/misc/shaders-with-varyings.html
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
Add SH_INIT_VARYINGS_WITHOUT_STATIC_USE to compiler flags.
2014-02-23 Sam Weinig <sam@webkit.org>
Update FeatureDefines.xcconfig
Rubber-stamped by Anders Carlsson.
* Configurations/FeatureDefines.xcconfig:
2014-02-23 Dean Jackson <dino@apple.com>
Sort the project file with sort-Xcode-project-file.
Rubber-stamped by Sam Weinig.
* WebCore.xcodeproj/project.pbxproj:
2014-02-23 Sam Weinig <sam@webkit.org>
Fix incorrectly commented out code.
* platform/TelephoneNumberDetector.h:
2014-02-23 Sam Weinig <sam@webkit.org>
Extract platform specific parts of telephone number detection
https://bugs.webkit.org/show_bug.cgi?id=129238
Reviewed by Dean Jackson.
* WebCore.xcodeproj/project.pbxproj:
Add new files.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::linkifyPhoneNumbers):
(WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
* platform/TelephoneNumberDetector.h: Added.
* platform/cocoa/TelephoneNumberDetectorCocoa.cpp: Added.
(WebCore::TelephoneNumberDetector::phoneNumbersScanner):
(WebCore::TelephoneNumberDetector::isSupported):
(WebCore::TelephoneNumberDetector::find):
Move code to TelephoneNumberDetector.
2014-02-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Change a url parameter type with URL in NavigatorContentUtils
https://bugs.webkit.org/show_bug.cgi?id=129202
Reviewed by Sam Weinig.
It would be good if we use *URL* for url parameters instead of using String.
Merge from blink. https://src.chromium.org/viewvc/blink?view=rev&revision=165458.
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::verifyCustomHandlerURL):
(WebCore::NavigatorContentUtils::registerProtocolHandler):
(WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
(WebCore::NavigatorContentUtils::unregisterProtocolHandler):
* Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
2014-02-23 Dean Jackson <dino@apple.com>
Update ANGLE to 836bd2176e5607b14846cf1fbc5932dbc91318f4
https://bugs.webkit.org/show_bug.cgi?id=129232
Reviewed by Brent Fulgham.
New files added, derived sources compiled directly, and generated
steps removed for both EFL and GTK, with much-needed help from
Sergio Correia.
* CMakeLists.txt:
* GNUMakefile.am:
2014-02-23 Sam Weinig <sam@webkit.org>
Move RenderMathMLMenclose.h/cpp to the right place in the Xcode project and sort.
Rubber-stamped by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj:
2014-02-23 Sam Weinig <sam@webkit.org>
Move telephone number detection behind its own ENABLE macro
https://bugs.webkit.org/show_bug.cgi?id=129236
Reviewed by Dean Jackson.
* Configurations/FeatureDefines.xcconfig:
Add ENABLE_TELEPHONE_NUMBER_DETECTION.
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
* html/parser/HTMLConstructionSite.h:
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
* html/parser/HTMLTreeBuilder.h:
Use ENABLE(TELEPHONE_NUMBER_DETECTION).
* platform/mac/SoftLinking.h:
Remove PLATOFORM(IOS) from SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL, it is not iOS specific.
2014-02-23 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Fix bleed avoidance subpixel calculation.
https://bugs.webkit.org/show_bug.cgi?id=129225
Reviewed by Simon Fraser.
static_cast<LayoutUnit>(int value) only produces the desired result when subpixel is off.
Currently not testable.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
(WebCore::shrinkRectByOneDevicePixel):
(WebCore::RenderBoxModelObject::borderInnerRectAdjustedForBleedAvoidance):
(WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderBoxModelObject.h:
2014-02-23 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Add devicepixel based computation to BorderEdge class.
https://bugs.webkit.org/show_bug.cgi?id=129224
Reviewed by Simon Fraser.
To produce correct width (and type) results, BorderEdge class needs to take device pixel ratio into account.
Currently not testable.
* rendering/RenderBoxModelObject.cpp:
(WebCore::BorderEdge::BorderEdge):
(WebCore::BorderEdge::obscuresBackgroundEdge):
(WebCore::BorderEdge::getDoubleBorderStripeWidths): this does not always produce the same
result as before, but the sum of inner and outer is not different.
(WebCore::BorderEdge::borderWidthInDevicePixel):
(WebCore::RenderBoxModelObject::getBorderEdgeInfo):
2014-02-22 Dan Bernstein <mitz@apple.com>
REGRESSION (r164507): Crash beneath JSGlobalObjectInspectorController::reportAPIException at facebook.com, twitter.com, youtube.com
https://bugs.webkit.org/show_bug.cgi?id=129227
Reviewed by Eric Carlson.
Reverted r164507.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::buildInitiatorObject):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::breakpointActionLog):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
* page/Console.cpp:
(WebCore::internalAddMessage):
(WebCore::Console::profile):
(WebCore::Console::profileEnd):
(WebCore::Console::timeEnd):
* page/ContentSecurityPolicy.cpp:
(WebCore::gatherSecurityPolicyViolationEventData):
(WebCore::ContentSecurityPolicy::reportViolation):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
2014-02-22 Joseph Pecoraro <pecoraro@apple.com>
Remove some unreachable code (-Wunreachable-code)
https://bugs.webkit.org/show_bug.cgi?id=129220
Reviewed by Eric Carlson.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processCharacterBuffer):
(WebCore::HTMLTreeBuilder::processEndTag):
The only tricky case. Here there was a break inside the
#if, but not the #else, and a break after the #endif.
Remove the break inside the #if, and always use the
break after the #endif.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::modeToString):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toJS):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::functionForUniform):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionDisplayMode):
2014-02-22 Dean Jackson <dino@apple.com>
Letterpress effect disabled for synthetic italic
https://bugs.webkit.org/show_bug.cgi?id=129218
<rdar://problem/15997846>
Reviewed by Dan Bernstein.
There was no need to guard against synthetic italics and letterpress.
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs): Remove !useLetterpressEffect from conditional.
2014-02-21 Sam Weinig <sam@webkit.org>
Expose phase and momentum phase as SPI on DOMWheelEvent
<rdar://problem/16110871>
https://bugs.webkit.org/show_bug.cgi?id=129184
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Export core(DOMWheelEvent).
* WebCore.xcodeproj/project.pbxproj:
Make DOMWheelEventInternal.h available in WebKit.
* dom/Element.cpp:
(WebCore::Element::dispatchWheelEvent):
* dom/WheelEvent.cpp:
(WebCore::determineDeltaMode):
(WebCore::WheelEvent::WheelEvent):
(WebCore::WheelEvent::initWheelEvent):
(WebCore::WheelEvent::initWebKitWheelEvent):
Move PlatformWheelEvent -> DOMWheelEvent conversion to DOMWheelEvent.
* dom/WheelEvent.h:
(WebCore::WheelEvent::create):
(WebCore::WheelEvent::phase):
(WebCore::WheelEvent::momentumPhase):
Store phase and momentumPhase on the WheelEvent.
2014-02-22 Alexey Proskuryakov <ap@apple.com>
Rename JWK key_ops values from wrap/unwrap to wrapKey/unwrapKey
https://bugs.webkit.org/show_bug.cgi?id=129121
Reviewed by Sam Weinig.
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Updated to newer names.
(WebCore::addUsagesToJSON): Ditto.
(WebCore::JSCryptoKeySerializationJWK::serialize): rsa-oaep-key-manipulation test
started ot fail, because RSA-OAEP with 2048 bit key and sha-1 can only encrypt
214 bytes, and the new longer names made JSON serialization slightly longer.
Compensate by not doing any indentation in JSON.
2014-02-22 Frédéric Wang <fred.wang@free.fr>
Only skip stretchy operators when determining the stretch height.
https://bugs.webkit.org/show_bug.cgi?id=126842
Reviewed by Chris Fleizach.
The MathML code only takes into account non-mo children for the computation of the stretch size. This change includes non-stretchy mo in that computation. A new test is added into mathml/presentation/stretchy-depth-height.html.
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layout):
2014-02-22 Frédéric Wang <fred.wang@free.fr>
Implement asymmetric/symmetric stretching of vertical operators.
https://bugs.webkit.org/show_bug.cgi?id=124827.
Reviewed by Chris Fleizach.
The MathML code stretches vertical operators asymmetrically by default. This patch takes into account the symmetric attribute or the symmetric property of the operator dictionary to stretch operators symmetrically.
Test: mathml/presentation/stretchy-depth-height-symmetric.html
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::stretchTo):
(WebCore::RenderMathMLOperator::updateFromElement):
(WebCore::RenderMathMLOperator::updateStyle):
2014-02-22 Frédéric Wang <fred.wang@free.fr>
Bug 119043 - Large stretch size error for MathML operators.
https://bugs.webkit.org/show_bug.cgi?id=119043
Reviewed by Chris Fleizach.
The MathML code used some arbitrary gOperatorExpansion factor for the
stretch size and 2/3 1/2 constants for the baseline. This change tries
to consider height/depth of siblings of the stretchy operator so that
the stretchy operator now matches its target.
Test: mathml/presentation/stretchy-depth-height.html
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderMathMLTable):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::RenderMathMLOperator):
(WebCore::RenderMathMLOperator::stretchTo):
(WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter):
(WebCore::RenderMathMLOperator::updateStyle):
(WebCore::RenderMathMLOperator::firstLineBaseline):
(WebCore::RenderMathMLOperator::computeLogicalHeight):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layout):
2014-02-22 Frédéric Wang <fred.wang@free.fr>
Unreviewed, rolling out r164534.
http://trac.webkit.org/changeset/164534
https://bugs.webkit.org/show_bug.cgi?id=119043
missing tests
* rendering/RenderObject.h:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::RenderMathMLOperator):
(WebCore::RenderMathMLOperator::expandedStretchHeight):
(WebCore::RenderMathMLOperator::stretchToHeight):
(WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter):
(WebCore::RenderMathMLOperator::updateStyle):
(WebCore::RenderMathMLOperator::firstLineBaseline):
(WebCore::RenderMathMLOperator::computeLogicalHeight):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layout):
2014-02-22 Frédéric Wang <fred.wang@free.fr>
Bug 119043 - Large stretch size error for MathML operators.
https://bugs.webkit.org/show_bug.cgi?id=119043
Reviewed by Chris Fleizach.
The MathML code used some arbitrary gOperatorExpansion factor for the
stretch size and 2/3 1/2 constants for the baseline. This change tries
to consider height/depth of siblings of the stretchy operator so that
the stretchy operator now matches its target.
Test: mathml/presentation/stretchy-depth-height.html
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderMathMLTable):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::RenderMathMLOperator):
(WebCore::RenderMathMLOperator::stretchTo):
(WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter):
(WebCore::RenderMathMLOperator::updateStyle):
(WebCore::RenderMathMLOperator::firstLineBaseline):
(WebCore::RenderMathMLOperator::computeLogicalHeight):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layout):
2014-02-21 Zalan Bujtas <zalan@apple.com>
REGRESSION(r164412): Pixel cracks when zooming in to any web content.
https://bugs.webkit.org/show_bug.cgi?id=129195
Reviewed by Simon Fraser.
Integral clipping of the repaint rect was prematurely removed in RenderLayerBacking::paintContents().
Repaint rects needs a uniform, device pixel precise clipping across the painting flow including RenderLayer,
RenderView and TileController.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintContents):
(WebCore::RenderLayerBacking::compositedBoundsIncludingMargin):
2014-02-21 Jer Noble <jer.noble@apple.com>
Unreviewed Mac build fix after r164529.
Replace the string-to-array algorithm with a archictecture-independant
one.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
2014-02-21 Jer Noble <jer.noble@apple.com>
[EME] Add a CDMSession for MediaPlayerPrivateMediaSourceAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=129166
Reviewed by Eric Carlson.
Add a new CDMSession, cerated by MediaPlayerPrivateMediaSourceAVFObjC allowing
media-source-backed media elements to play protected content.
Add a new CDMSessionMediaSourceAVFObjC class:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Added.
(WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: Added.
(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest): Do not actually generate a
key request until the certificate data has been added via update();
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): No-op.
(WebCore::CDMSessionMediaSourceAVFObjC::update): If no certificate data has yet been
added, assume the incoming message contains it.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): Add supportsKeySystem.
(WebCore::keySystemIsSupported): Use "com.apple.fps.2_0" to distinguish from the not-media-source scheme.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Check the keySystem type.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsKeySystem): Added.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createSession): Added, pass through to MediaSourcePrivate.
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::createSession): Added.
(WebCore::MediaSourcePrivateAVFObjC::sourceBufferKeyNeeded): Pass through to MediaPlayer.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
Added, pass through to SourceBufferPrivate.
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID): Remember
which track is requesting the key, and pass the request to MediaSourcePrivate.
Add new files to the project.
* WebCore.xcodeproj/project.pbxproj:
2014-02-21 Alexey Proskuryakov <ap@apple.com>
CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify contains seemingly accidental unreachable code
https://bugs.webkit.org/show_bug.cgi?id=129193
Reviewed by Joseph Pecoraro.
* crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify): Fix the accidental code.
2014-02-21 Brent Fulgham <bfulgham@apple.com>
Extend media support for WebVTT sources
https://bugs.webkit.org/show_bug.cgi?id=129156
Reviewed by Eric Carlson.
* Configurations/FeatureDefines.xcconfig: Add new feature define for AVF_CAPTIONS
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::outOfBandTrackSources): Added.
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::outOfBandTrackSources): Added.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::outOfBandTrackSources): Added.
* platform/graphics/PlatformTextTrack.h:
(WebCore::PlatformTextTrack::create): Update for new constructor signature.
(WebCore::PlatformTextTrack::createOutOfBand): Added.
(WebCore::PlatformTextTrack::url): Added.
(WebCore::PlatformTextTrack::isDefault): Added.
(WebCore::PlatformTextTrack::PlatformTextTrack): Revised to take new URL and
'isDefault' arguments.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::mediaDescriptionForKind): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Tell AVFoundation about any
WebVTT tracks supplied by the web page.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): Filter out any out-of-band
WebVTT tracks returned by the media engine to avoid double-counting tracks.
2014-02-21 Ryosuke Niwa <rniwa@webkit.org>
Inner text element should not use -webkit-user-modify
https://bugs.webkit.org/show_bug.cgi?id=129035
Reviewed by Andreas Kling.
To eliminate the internal use of -webkit-user-modify, use contenteditable attribute in the inner text elements
instead of manually inspecting disabled-ness and readonly-ness in RenderTextControl.
Unfortunately, we still have to manually set UserModify value in RenderTextControl::adjustInnerTextStyle since
RenderTextControl::styleDidChange creates RenderStyle for its inner text from scratch via createInnerTextStyle.
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::disabledStateChanged): Don't use childrenOfType iterator which asserts that DOM
isn't mutated during the traversal since we now set contenteditable attribute inside disabledStateChanged via
updateFromControlElementsAncestorDisabledStateUnder.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::parseAttribute): Extracted readOnlyAttributeChanged out of this function so
that HTMLTextFormControl could override it to call updateInnerTextElementEditability.
(WebCore::HTMLFormControlElement::readOnlyAttributeChanged): Ditto.
* html/HTMLFormControlElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::didAddUserAgentShadowRoot): Call updateInnerTextElementEditability after creating
shadow DOM for the current input type.
(WebCore::HTMLInputElement::updateType): Ditto.
(WebCore::HTMLInputElement::parseAttribute): Ditto.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot): Call updateInnerTextElementEditability.
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::disabledStateChanged): Added to update contenteditable attribute since
the editability of the inner text element depends on disabled-ness of the element.
(WebCore::HTMLTextFormControlElement::readOnlyAttributeChanged): Ditto for the readonly-ness of the element.
(WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability): Added.
* html/HTMLTextFormControlElement.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::adjustInnerTextStyle): Use the inner text element's presentationAttributeStyle() to
compute the appropriate EUserModify value instead of hard-coding it here.
* rendering/RenderTextControl.h:
2014-02-21 ChangSeok Oh <changseok.oh@collabora.com>
[GTK] Support WEBGL_draw_buffers extension.
https://bugs.webkit.org/show_bug.cgi?id=129143
Reviewed by Dean Jackson.
Support the WEBGL_draw_buffers WebGL extension for gtk port. Relevant opengl APIs
are exposed for WebGLRenderingContext to access them properly.
Covered by fast/canvas/webgl/webgl-draw-buffers.html
* platform/graphics/OpenGLShims.cpp:
(WebCore::initializeOpenGLShims):
* platform/graphics/OpenGLShims.h:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension):
(WebCore::Extensions3DOpenGL::drawBuffersEXT):
2014-02-21 ChangSeok Oh <changseok.oh@collabora.com>
Mac port uses ANGLE_instanced_arrays related apis through those in GraphicsContext3DCommon.cpp
https://bugs.webkit.org/show_bug.cgi?id=128803
Reviewed by Dean Jackson.
Merge mac port implementation of ANGLE_instanced_arrays into common code.
No new tests, no functionality changed.
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::drawArraysInstanced):
(WebCore::Extensions3DOpenGL::drawElementsInstanced):
(WebCore::Extensions3DOpenGL::vertexAttribDivisor):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::vertexAttribDivisor):
2014-02-21 Myles C. Maxfield <mmaxfield@apple.com>
After copy and paste, cursor may appear to be above the bottom of content
https://bugs.webkit.org/show_bug.cgi?id=129167
Reviewed by Ryosuke Niwa.
Adding a clear:both to the end of content.
I can't handle the case of the cursor appearing above the bottom of
absolutely positioned divs (of the case of floats inside absolutely
positioned divs) because you can't know where the bottom of a div
will end up being rendered (it is affected by things like browser
window width and text size settings). Therefore, the only case I
can handle is the case where there is a floating div in the same
level as the document itself.
Test: editing/pasteboard/copy-paste-inserts-clearing-div.html
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::isFloating):
* editing/EditingStyle.h:
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator):
(WebCore::StyledMarkupAccumulator::appendElement):
(WebCore::createMarkupInternal):
2014-02-21 Dean Jackson <dino@apple.com>
[iOS Media] Wireless target UI
https://bugs.webkit.org/show_bug.cgi?id=129189
<rdar://problem/15349928>
<rdar://problem/16100060>
Reviewed by Eric Carlson.
Implement a prototype UI for wireless playback targets. The UI
doesn't currently work, but can be simulated via a class variable
in ControllerIOS.
* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-panel button): Reset the default style of
button elements, to avoid getting a border.
(audio::-webkit-media-controls-wireless-playback-status): Holds the UI showing
the user that the media is playing on another target.
(audio::-webkit-media-controls-wireless-playback-status.hidden):
(audio::-webkit-media-controls-wireless-playback-picker-button): The button to
trigger selection of targets.
(audio::-webkit-media-controls-wireless-playback-picker-button.active):
(audio::-webkit-media-controls-panel): This needs to be position absolute for
the wireless playback status to fill the viewport.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS): Check for targets.
(ControllerIOS.prototype.addVideoListeners):
(ControllerIOS.prototype.removeVideoListeners):
(ControllerIOS.prototype.UIString): New method to return localized strings (with
a FIXME).
(ControllerIOS.prototype.shouldHaveAnyUI): Needs to display if there is a wireless
target.
(ControllerIOS.prototype.currentPlaybackTargetIsWireless):
(ControllerIOS.prototype.updateWirelessPlaybackStatus): Create the status content,
replacing the device name if it is available.
(ControllerIOS.prototype.updateWirelessTargetAvailable):
(ControllerIOS.prototype.createControls):
(ControllerIOS.prototype.configureInlineControls):
(ControllerIOS.prototype.handleWirelessPlaybackChange):
(ControllerIOS.prototype.handleWirelessTargetAvailableChange):
(ControllerIOS.prototype.handleWirelessPickerButtonClicked):
2014-02-21 Jer Noble <jer.noble@apple.com>
Make a generic CDMPrivateMediaPlayer and move its CDMSession into platform/.
https://bugs.webkit.org/show_bug.cgi?id=129164
Reviewed by Eric Carlson.
Move the session created by CDMPrivateAVFoundation into platform, and rename
CDMPrivateAVFoundation to CDMPrivateMediaPlayer. Future media engines who want
to support a keysystem from within the media engine can create their own
CDMSession as part of the MediaPlayerPrivate interface.
* Modules/encryptedmedia/CDM.cpp:
(WebCore::installedCDMFactories):
(WebCore::CDM::createSession):
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/CDMPrivate.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/encryptedmedia/CDMPrivateAVFoundation.mm: Removed.
* Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateAVFoundation.cpp.
(WebCore::CDMPrivateMediaPlayer::supportsKeySystem):
(WebCore::CDMPrivateMediaPlayer::supportsKeySystemAndMimeType):
(WebCore::CDMPrivateMediaPlayer::supportsMIMEType):
(WebCore::CDMPrivateMediaPlayer::createSession):
* Modules/encryptedmedia/CDMPrivateMediaPlayer.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateAVFoundation.h.
(WebCore::CDMPrivateMediaPlayer::create):
(WebCore::CDMPrivateMediaPlayer::~CDMPrivateMediaPlayer):
(WebCore::CDMPrivateMediaPlayer::cdm):
(WebCore::CDMPrivateMediaPlayer::CDMPrivateMediaPlayer):
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/CDMSession.h: Extracted from CDMPrivateAVFoundation.h.
(WebCore::CDMSessionClient::~CDMSessionClient):
(WebCore::CDMSession::CDMSession):
(WebCore::CDMSession::~CDMSession):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::createSession):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::createSession):
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateAVFoundation.h.
(WebCore::CDMSessionAVFoundationObjC::~CDMSessionAVFoundationObjC):
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateAVFoundation.mm.
(WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC):
(WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
(WebCore::CDMSessionAVFoundationObjC::releaseKeys):
(WebCore::CDMSessionAVFoundationObjC::update):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createSession):
* testing/MockCDM.cpp:
(WebCore::MockCDMSession::setClient):
(WebCore::MockCDM::createSession):
* testing/MockCDM.h:
2014-02-21 Jer Noble <jer.noble@apple.com>
Add a supportsKeySystem media engine factory parameter.
https://bugs.webkit.org/show_bug.cgi?id=129161
Reviewed by Eric Carlson.
Add a new parameter to the MediaPlayerFactory to allow registered media
engines to be queried for keySystem support:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayerFactory::MediaPlayerFactory):
(WebCore::MediaPlayer::supportsKeySystem):
* platform/graphics/MediaPlayer.h:
Support this new field in MediaPlayerPrivateAVFoundationObjC:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
(WebCore::keySystemIsSupported):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
Add an empty field for SupportsKeySystem to the remaining media engines:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
* platform/graphics/ios/MediaPlayerPrivateIOS.mm:
(WebCore::MediaPlayerPrivateIOS::registerMediaEngine):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::registerMediaEngine):
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
2014-02-21 Benjamin Poulain <bpoulain@apple.com>
Fix WebCore's internals after r164505
* testing/Internals.cpp:
(WebCore::Internals::findEditingDeleteButton): The call became ambiguous after r164505.
2014-02-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JSContext inspection should report exceptions in the console
https://bugs.webkit.org/show_bug.cgi?id=128776
Reviewed by Timothy Hatcher.
Include some clean up of ConsoleMessage and ScriptCallStack construction.
Covered by existing tests.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
Simplify code now that createStackTraceFromException handles it.
* page/ContentSecurityPolicy.cpp:
(WebCore::gatherSecurityPolicyViolationEventData):
(WebCore::ContentSecurityPolicy::reportViolation):
ScriptCallStack can give us the first non-native callframe.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::buildInitiatorObject):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::breakpointActionLog):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
* page/Console.cpp:
(WebCore::internalAddMessage):
(WebCore::Console::profile):
(WebCore::Console::profileEnd):
(WebCore::Console::timeEnd):
* page/ContentSecurityPolicy.cpp:
(WebCore::gatherSecurityPolicyViolationEventData):
(WebCore::ContentSecurityPolicy::reportViolation):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
2014-02-21 Benjamin Poulain <benjamin@webkit.org>
jsDocumentPrototypeFunctionGetElementById should not create an AtomicString for the function argument
https://bugs.webkit.org/show_bug.cgi?id=128893
Reviewed by Darin Adler.
The declaration of TreeScope::getElementById() was taking an AtomicString as the parameter.
Because of this, all the call sites manipulating String were creating and keeping alive an AtomicString
to make the call.
This had two negative consequences:
-The call sites were ref-ing the ID's atomic string for no reason.
-When there is no ID associated with the input string, an atomic string was created for the sole
purpose of failing the query. Since IDs are stored as AtomicString, if there is not an existing
AtomicString for the input, there is no reason to query anything.
* WebCore.exp.in:
* bindings/js/JSDOMBinding.cpp:
(WebCore::findAtomicString): Update this after the rename.
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
Now that there are two overloads for TreeScope::getElementById(), the conversion from NSString*
is ambiguous. I add the keyword ObjCExplicitAtomicString to force an explicit conversion to AtomicString.
* dom/Document.idl:
* dom/TreeScope.cpp:
(WebCore::TreeScope::getElementById):
When getting an AtomicString, the case of a empty string is not important, use isNull() instead.
When getting a String, get the corresponding AtomicString if any and use that for getting the element.
* dom/TreeScope.h:
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
Solve the ambiguous call.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
This is a wonderful candidate for substringSharingImpl. The substring does not survive the call since
the new getElementById never create any AtomicString.
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::getElementById):
It looks like there are opportunities to get faster here, Ryosuke should have a look.
* svg/SVGSVGElement.h:
* xml/XMLTreeViewer.cpp:
(WebCore::XMLTreeViewer::transformDocumentToTreeView):
Unrelated cleanup: noStyleMessage was useless.
2014-02-21 Daniel Bates <dabates@apple.com>
COL element in table has 0 for offsetWidth
https://bugs.webkit.org/show_bug.cgi?id=15277
Reviewed by David Hyatt.
Implements offset{Left, Top, Width, Height} for table columns and column groups
per section Extensions to the HTMLElement Interface of the CSSOM View spec,
<http://www.w3.org/TR/cssom-view/#extensions-to-the-htmlelement-interface> (Draft 17 December 2013).
For now, we fail almost all of the offset{Height, Top} sub-tests in the included test
for the separate border model as we need to fix <https://bugs.webkit.org/show_bug.cgi?id=128988>.
Test: fast/table/col-and-colgroup-offsets.html
* rendering/RenderTable.cpp:
(WebCore::RenderTable::RenderTable): Initialize cached column offset top and offset height.
We cache these offsets since they are the same for all columns in the table.
(WebCore::RenderTable::invalidateCachedColumns): Clear cached effective column index map.
(WebCore::RenderTable::invalidateCachedColumnOffsets): Added.
(WebCore::RenderTable::layout): Invalidate cached column offsets as the location or height
of one or more sections may have changed.
(WebCore::RenderTable::updateColumnCache): Modified to build effective column index map.
(WebCore::RenderTable::effectiveIndexOfColumn): Added.
(WebCore::RenderTable::offsetTopForColumn): Added.
(WebCore::RenderTable::offsetLeftForColumn): Added.
(WebCore::RenderTable::offsetWidthForColumn): Added.
(WebCore::RenderTable::offsetHeightForColumn): Added.
* rendering/RenderTable.h: Make isTableColumnGroupWithColumnChildren() const.
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::offsetLeft): Added; turns around and calls RenderTable::offsetLeftForColumn().
(WebCore::RenderTableCol::offsetTop): Added; turns around and calls RenderTable::offsetTopForColumn().
(WebCore::RenderTableCol::offsetWidth): Added; turns around and calls RenderTable::offsetWidthForColumn().
(WebCore::RenderTableCol::offsetHeight): Added; turns around and calls RenderTable::offsetHeightForColumn().
* rendering/RenderTableCol.h:
2014-02-21 Enrica Casucci <enrica@apple.com>
Build fix for iOS after r164498.
Unreviewed.
* platform/graphics/ios/MediaPlayerPrivateIOS.mm:
(WebCore::MediaPlayerPrivateIOS::buffered):
2014-02-21 Ryosuke Niwa <rniwa@webkit.org>
Disallow the use of -webkit-user-modify on shadow pseudo elements
https://bugs.webkit.org/show_bug.cgi?id=129144
Reviewed by Geoffrey Garen.
Completely disallow -webkit-user-modify on user agent (builtin) pseudo elements.
We've already had rules to do this in html.css but just hard code it into the engine
in order to eliminate the all uses of -webkit-user-modify in html.css.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* css/html.css:
(input::-webkit-textfield-decoration-container):
(input::-webkit-clear-button):
(input[type="search"]::-webkit-search-cancel-button):
(input[type="search"]::-webkit-search-decoration):
(input[type="search"]::-webkit-search-results-decoration):
(input[type="search"]::-webkit-search-results-button):
(input::-webkit-inner-spin-button):
(input::-webkit-input-speech-button):
(input::-webkit-input-placeholder, isindex::-webkit-input-placeholder):
(input[type="file"]::-webkit-file-upload-button):
(input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container):
(input[type="range"]::-webkit-slider-runnable-track):
(input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb):
(input[type="color"]::-webkit-color-swatch-wrapper):
(input[type="color"]::-webkit-color-swatch):
(::-webkit-validation-bubble):
(::-webkit-validation-bubble-message):
(::-webkit-validation-bubble-text-block):
(::-webkit-validation-bubble-heading):
(::-webkit-validation-bubble-arrow):
(::-webkit-validation-bubble-arrow-clipper):
(meter::-webkit-meter-inner-element):
(meter::-webkit-meter-bar):
(meter::-webkit-meter-optimum-value):
(meter::-webkit-meter-suboptimum-value):
(meter::-webkit-meter-even-less-good-value):
(progress::-webkit-progress-inner-element):
(progress::-webkit-progress-bar):
(progress::-webkit-progress-value):
2014-02-21 Eric Carlson <eric.carlson@apple.com>
Fix TimeRanges layering violations
https://bugs.webkit.org/show_bug.cgi?id=128717
Reviewed by Jer Noble.
No new tests, no functionality changed.
* CMakeLists.txt:
* GNUmakefile.list.am: Add PlatformTimeRanges.
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::buffered): TimeRanges -> PlatformTimeRanges.
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): TimeRanges* -> TimeRanges&.
* WebCore.exp.in: Update for signature changes.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj: Add PlatformTimeRanges.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::percentLoaded): Create TimeRanges from PlatformTimeRanges.
(WebCore::HTMLMediaElement::buffered): Ditto.
(WebCore::HTMLMediaElement::seekable): Ditto.
* html/MediaController.cpp:
(MediaController::buffered): TimeRanges* -> TimeRanges&.
(MediaController::seekable): Ditto.
(MediaController::played): Ditto.
Move all of the logic into PlatformTimeRanges. Change API to take TimeRanges& instead of TimeRanges*.
* html/TimeRanges.cpp:
(WebCore::TimeRanges::create): Move to .cpp from .h.
(WebCore::TimeRanges::TimeRanges): Initialize the PlatformTimeRanges member variable.
(WebCore::TimeRanges::start): Passthrough to PlatformTimeRanges.
(WebCore::TimeRanges::end): Ditto.
(WebCore::TimeRanges::invert): Ditto.
(WebCore::TimeRanges::copy): Ditto.
(WebCore::TimeRanges::intersectWith): Ditto.
(WebCore::TimeRanges::unionWith): Ditto.
(WebCore::TimeRanges::length): Ditto.
(WebCore::TimeRanges::add): Ditto.
(WebCore::TimeRanges::contain): Ditto.
(WebCore::TimeRanges::find): Ditto.
(WebCore::TimeRanges::nearest): Ditto.
(WebCore::TimeRanges::totalDuration): Ditto.
* html/TimeRanges.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::NullMediaPlayerPrivate::buffered): TimeRanges -> PlatformTimeRanges.
(WebCore::MediaPlayer::buffered): Ditto.
(WebCore::MediaPlayer::seekable): Ditto.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
* platform/graphics/MediaSourcePrivateClient.h:
* platform/graphics/PlatformTimeRanges.cpp: Added.
* platform/graphics/PlatformTimeRanges.h: Added.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::buffered): TimeRanges -> PlatformTimeRanges.
(WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged): Drive-by fix to log
FunctionType notifications. ASSERT when passed an unknown notification.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges): TimeRanges -> PlatformTimeRanges.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::buffered): Ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/ios/MediaPlayerPrivateIOS.h:
* platform/graphics/ios/MediaPlayerPrivateIOS.mm:
(WebCore::MediaPlayerPrivateIOS::buffered): Ditto.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::buffered): Ditto.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::buffered): Ditto.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
* platform/graphics/wince/MediaPlayerPrivateWinCE.h:
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::buffered): Ditto.
(WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
* platform/mock/mediasource/MockMediaPlayerMediaSource.h:
2014-02-21 Enrica Casucci <enrica@apple.com>
Support WebSelections in WK2 on iOS.
https://bugs.webkit.org/show_bug.cgi?id=127015
<rdar://problem/15211964>
Reviewed by Benjamin Poulain.
Adding some exports.
* WebCore.exp.in:
2014-02-21 Benjamin Poulain <bpoulain@apple.com>
'mouseenter' mouse compat event not fired when listeners for touch events
https://bugs.webkit.org/show_bug.cgi?id=128534
Reviewed by Andreas Kling.
The code dispatching mouseenter and mouseleave events was making the assumption that
only mouse move would cause Document::updateHoverActiveState.
This is not true in some cases. In the case of this bug, the first touch handler sets
the hover state. From there, the code handling enter/leave is in an inconsistent state.
This patch changes the delivery of mouse enter/leave events to be done through the regular
processing of mouse events. The update is done with the mouseover and mouseout events.
* dom/Document.cpp:
(WebCore::Document::prepareMouseEvent):
(WebCore::Document::updateHoverActiveState):
* dom/Document.h:
* page/EventHandler.cpp:
(WebCore::nearestCommonHoverAncestor):
(WebCore::hierarchyHasCapturingEventListeners):
(WebCore::EventHandler::updateMouseEventTargetNode):
2014-02-21 Jon Honeycutt <jhoneycutt@apple.com>
Crash reloading page with position: fixed content
https://bugs.webkit.org/show_bug.cgi?id=129119
<rdar://problem/16127090>
Reviewed by Brent Fulgham.
Test: platform/mac-wk2/tiled-drawing/crash-reloading-with-position-fixed-content.html
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::removeDestroyedNodes):
Check the node's ID against the latched node's ID before the node is
removed from the tree.
2014-02-21 Joseph Pecoraro <pecoraro@apple.com>
Revert r164486, causing a number of test failures.
Unreviewed rollout.
2014-02-21 David Kilzer <ddkilzer@apple.com>
StyleResolver::loadPendingImage() should take a reference to StylePendingImage
<http://webkit.org/b/129021>
Reviewed by Brent Fulgham.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingImage): Change pendingImage
parameter to a reference.
(WebCore::StyleResolver::loadPendingShapeImage): Update to use
references.
(WebCore::StyleResolver::loadPendingImages): Ditto.
* css/StyleResolver.h:
(WebCore::StyleResolver::loadPendingImage): Change pendingImage
parameter to a reference.
2014-02-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JSContext inspection should report exceptions in the console
https://bugs.webkit.org/show_bug.cgi?id=128776
Reviewed by Timothy Hatcher.
Include some clean up of ConsoleMessage and ScriptCallStack construction.
Covered by existing tests.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
Simplify code now that createStackTraceFromException handles it.
* page/ContentSecurityPolicy.cpp:
(WebCore::gatherSecurityPolicyViolationEventData):
(WebCore::ContentSecurityPolicy::reportViolation):
ScriptCallStack can give us the first non-native callframe.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::buildInitiatorObject):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::breakpointActionLog):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
* page/Console.cpp:
(WebCore::internalAddMessage):
(WebCore::Console::profile):
(WebCore::Console::profileEnd):
(WebCore::Console::timeEnd):
* page/ContentSecurityPolicy.cpp:
(WebCore::gatherSecurityPolicyViolationEventData):
(WebCore::ContentSecurityPolicy::reportViolation):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
2014-02-21 Martin Hodovan <mhodovan@inf.u-szeged.hu>
Fixing the !ENABLE(SVG_FONTS) build
https://bugs.webkit.org/show_bug.cgi?id=129150
Reviewed by Anders Carlsson.
No new tests required.
* svg/SVGAltGlyphElement.cpp:
* svg/SVGAltGlyphElement.h:
* svg/svgtags.in:
2014-02-21 Radu Stavila <stavila@adobe.com>
[CSS Regions] Use the named-flow-specific object RenderNamedFlowFragment instead of the generic RenderRegion whenever possible
https://bugs.webkit.org/show_bug.cgi?id=128599
Reviewed by Andrei Bucur.
Use the named flow specific RenderNamedFlowFragment instead of the generic RenderRegion, whenever possible.
Move named flow specific methods from RenderRegion to RenderNamedFlowFragment.
No new tests required.
* dom/Element.cpp:
(WebCore::Element::renderNamedFlowFragment):
(WebCore::Element::webkitRegionOverset):
(WebCore::Element::webkitGetRegionFlowRanges):
* dom/Element.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForRegions):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::PaintInfo):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::paintObject):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::pushContentsClip):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderBoxModelObject.h:
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintLayerByApplyingTransform):
(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
(WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::getRanges):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::updateWritingMode):
(WebCore::compareRenderNamedFlowFragments):
(WebCore::addFragmentToList):
(WebCore::RenderNamedFlowThread::addFragmentToNamedFlowThread):
(WebCore::RenderNamedFlowThread::addRegionToThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
(WebCore::RenderNamedFlowThread::getRanges):
(WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderRegion.cpp:
* rendering/RenderRegion.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint):
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::paint):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paint):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
2014-02-21 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Regions don't paint correctly in new-multicol elements
https://bugs.webkit.org/show_bug.cgi?id=120711
Reviewed by David Hyatt.
This patch implements basic support for regions inside multi-column elements.
Currently, the painting and hit-testing logic of CSS Regions is not aware of
enclosing multi-column elements. The change is integrated at a layer level by
making use of the pre-computed layer fragments during the painting and hit-testing
phases for regions.
There are limitations such that self painting layers found inside the named flow
thread layer will not be correctly processed because they don't go through the
layer fragment collection step. This is not trivial to implement because the enclosing
pagination layer provided by the multi-column element is not visibile from inside
the named flow thread layer and they reside in different coordinate systems.
A side effect of this patch is the fix of regions incorrect clipping in certain
cases (when both a region and its container clip their overflow, the region's
content is visible outside the container).
Tests: fast/regions/region-clipping.html
fast/regions/regions-in-multicol-bt.html
fast/regions/regions-in-multicol-hover-overflow.html
fast/regions/regions-in-multicol-hover.html
fast/regions/regions-in-multicol-lr.html
fast/regions/regions-in-multicol-rl.html
fast/regions/regions-in-multicol.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):
(WebCore::RenderLayer::hitTestFlowThreadIfRegionForFragments):
* rendering/RenderLayer.h:
2014-02-21 Mihai Tica <mitica@adobe.com>
[CSS Blending] Refactor -webkit-blend-mode to -webkit-mix-blend-mode
https://bugs.webkit.org/show_bug.cgi?id=128805
Reviewed by Dean Jackson.
The spec defines the mix-blend-mode property. This means that the
prefixed version should be -webkit-mix-blend-mode, instead of
-webkit-blend-mode.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2014-02-21 Ryosuke Niwa <rniwa@webkit.org>
Bindings tests rebaseline after r164473.
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj mutablePoint]):
(-[DOMTestObj immutablePoint]):
(-[DOMTestObj mutablePointFunction]):
(-[DOMTestObj immutablePointFunction]):
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
(-[DOMTestTypedefs immutablePointFunction]):
2014-02-21 Tim Horton <timothy_horton@apple.com>
Remove removed symbol from exports list.
* WebCore.exp.in:
2014-02-20 ChangSeok Oh <changseok.oh@collabora.com>
Rename EXT_draw_buffers to WEBGL_draw_buffers
https://bugs.webkit.org/show_bug.cgi?id=128894
Reviewed by Dean Jackson.
I noticed the related spec has changed. Accordingly chromium also changed its implementation
to meet the spec. So here I'd like to apply it to webkit as well.
Merged from Blink (patch by bajones):
https://src.chromium.org/viewvc/blink?revision=152065&view=revision
Test: fast/canvas/webgl/webgl-draw-buffers.html
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* html/canvas/EXTDrawBuffers.idl: Removed.
* html/canvas/WebGLDrawBuffers.cpp: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.cpp.
(WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::~WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::getName):
(WebCore::WebGLDrawBuffers::create):
(WebCore::WebGLDrawBuffers::supported):
(WebCore::WebGLDrawBuffers::drawBuffersWEBGL):
(WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
* html/canvas/WebGLDrawBuffers.h: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.h.
* html/canvas/WebGLDrawBuffers.idl: Added.
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
(WebCore::WebGLRenderingContext::supportsDrawBuffers):
* html/canvas/WebGLRenderingContext.h:
2014-02-20 Ryosuke Niwa <rniwa@webkit.org>
m_ancestorDisabledState should never be unknown
https://bugs.webkit.org/show_bug.cgi?id=129084
Reviewed by Benjamin Poulain.
In order to resolve the bug 129035, a text form control elements needs to synchronously change
its inner text element's editability by setting or unsetting contenteditable content attribute.
Before this patch, we could not do this because editability of a text form control dependent on
its disabled-ness which was only computed lazily via updateAncestorDisabledState().
This patch makes HTMLFieldSetElement and HTMLFormControlElement update this state synchronously.
To avoid O(k) DOM traversal, where k is the depth of the tree, in insertedInto and removedFrom of
HTMLFormControlElement on most pages, a new document-level flag, m_disabledFieldsetElementsCount,
has been added to indicate whether the document contains any disabled fieldset or not.
Also renamed the misleadingly named disabledAttributeChanged to disabledStateChanged, and added
new function of the same name (disabledAttributeChanged) to be used by HTMLFieldSetElement
for keeping the document-level flag up-to-date upon disabled attribute changes.
Tests: fast/forms/fieldset/fieldset-disabled-2.html
* dom/Document.cpp:
(WebCore::Document::Document): Initializes newly added m_disabledFieldsetElementsCount.
(WebCore::Document::~Document): Assert that we've done house keeping right.
* dom/Document.h:
(WebCore::Document::hasDisabledFieldsetElement): Added.
(WebCore::Document::addDisabledFieldsetElement): Added.
(WebCore::Document::removeDisabledFieldsetElement): Added.
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::~HTMLFieldSetElement): Removes itself from the owner document.
(WebCore::updateFromControlElementsAncestorDisabledStateUnder): Added. Updates startNode and
its descendants' ancestor disabled flag. We don't update controls under another disabled
fieldset element since disabled-ness of those controls aren't affected by startNode.
(WebCore::HTMLFieldSetElement::disabledAttributeChanged): Call addDisabledFieldsetElement and
removeDisabledFieldsetElement to update the owner document's flag.
(WebCore::HTMLFieldSetElement::disabledStateChanged): Renamed from disabledAttributeChanged.
Enable form control elements under the first legend element and disable or enable other
descendent form controls in accordance with the presence of disabled content attribute.
(WebCore::HTMLFieldSetElement::childrenChanged): Update disabled-ness of form controls under
child legend elements because controls aren't disabled in the first legend element, and adding
or removing child elements may have changed the first legend element.
(WebCore::HTMLFieldSetElement::didMoveToNewDocument): Update the flag on the owner document.
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
(WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor): Returns boolean instead of
updating m_ancestorDisabledState internally. Also renamed from updateAncestorDisabledState.
(WebCore::HTMLFormControlElement::setAncestorDisabled): Replaced ancestorDisabledStateWasChanged.
This function updates m_disabledByAncestorFieldset and calls disabledAttributeChanged as needed.
(WebCore::HTMLFormControlElement::disabledAttributeChanged): Added. Calls disabledStateChanged.
(WebCore::HTMLFormControlElement::disabledStateChanged): Renamed from disabledAttributeChanged.
(WebCore::HTMLFormControlElement::insertedInto): Update m_disabledByAncestorFieldset if there is
a possibility (i.e. the document contains any disabled fieldset element) that this form control
is inserted under a disabled fieldset element.
(WebCore::HTMLFormControlElement::removedFrom): If this form control element is not disabled by
a fieldset ancestor, then there is nothing to do. If it is, then check to see if the element is
still disabled now that we've lost some ancestors.
(WebCore::HTMLFormControlElement::isDisabledFormControl): No longer updates m_ancestorDisabledState
lazily since m_disabledByAncestorFieldset is never ambiguous now.
* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::disabledByAncestorFieldset): Added.
2014-02-20 Zalan Bujtas <zalan@apple.com>
Remove redundant deviceScaleFactor() functions and make callers use Document::deviceScaleFactor() when accessible.
https://bugs.webkit.org/show_bug.cgi?id=129137
Reviewed by Simon Fraser.
No change in behavior.
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI):
* page/Page.cpp:
* page/Page.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageSizeForError):
(WebCore::RenderImage::paintReplaced):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::drawPlatformResizerImage):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
2014-02-20 David Kilzer <ddkilzer@apple.com>
Stop generating Objective-C bindings for the SVG DOM
<http://webkit.org/b/129107>
Reviewed by Timothy Hatcher.
Bug 114076 stopped compiling the Objective-C bindings for the
SVG DOM, but we continued to generate the header and source
files after that landed in r147822. This patch also stops
generating the unused header and source files.
* DerivedSources.make:
- Split BINDING_IDLS into NON_SVG_BINDING_IDLS and
SVG_BINDING_IDLS so that they may operated on separately.
- Define BINDING_IDLS again as the full list of IDL files.
- Rename DOM_CLASSES to JS_DOM_CLASSES so that JavaScript
bindings are still generated for all IDL files.
- Add OBJC_DOM_CLASSES so that Objective-C bindings are only
generated for non-SVG IDL files.
* bindings/scripts/CodeGeneratorObjC.pm:
(GetBaseClass):
(GetPropertyAttributes):
(AddIncludesForType):
(GenerateHeader):
(GenerateImplementation):
- Remove support for SVG classes.
2014-02-20 Simon Fraser <simon.fraser@apple.com>
RenderBox::updateShapeOutsideInfoAfterStyleChange shows up on profiles
https://bugs.webkit.org/show_bug.cgi?id=129075
Reviewed by Dean Jackson.
updateShapeOutsideInfoAfterStyleChange() showed up on profiles in content
with no shapes. Avoid calling this if no style has shapeOutside().
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
2014-02-20 ChangSeok Oh <changseok.oh@collabora.com>
Remove unused chromium stuff in Extensions3D
https://bugs.webkit.org/show_bug.cgi?id=129086
Reviewed by Anders Carlsson.
Remove GL_CHROMIUM_copy_texture and GL_CHROMIUM_flipy interfaces since they are used nowhere.
No new tests since no functionality changed.
* platform/graphics/Extensions3D.h:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
* platform/graphics/opengl/Extensions3DOpenGL.h:
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
* platform/graphics/opengl/Extensions3DOpenGLES.h:
2014-02-20 Joseph Pecoraro <pecoraro@apple.com>
[iOS] Assert / crash trying to draw empty checked input
https://bugs.webkit.org/show_bug.cgi?id=129138
Reviewed by Simon Fraser.
Test: fast/forms/checkbox-empty-size.html
* rendering/RenderThemeIOS.mm:
(WebCore::shortened):
Avoid a divide by 0, but checking for the condition upfront.
2014-02-20 Benjamin Poulain <bpoulain@apple.com>
Start fixing the view states driven by the WKScrollView
https://bugs.webkit.org/show_bug.cgi?id=129140
Reviewed by Tim Horton and Simon Fraser.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::scaledExposedRect):
That comment was more confusing than helping. FrameView-relative coordinates should not need
scaling.
2014-02-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Start to use std::unique_ptr for DragImageLoader
https://bugs.webkit.org/show_bug.cgi?id=129078
Reviewed by Ryosuke Niwa.
As a step to use std::unique_ptr, this patch replace uses of OwnPtr and PassOwnPtr
in the DragImageLoader class with std::unique_ptr. Besides DragImageLoader is set to
non-copyable class.
* dom/Clipboard.cpp:
(WebCore::Clipboard::setDragImage):
* dom/Clipboard.h:
2014-02-20 Brady Eidson <beidson@apple.com>
Move the image controls setting to Settings.in
https://bugs.webkit.org/show_bug.cgi?id=129126
Reviewed by Tim Horton.
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
* page/Settings.in:
2014-02-20 Brady Eidson <beidson@apple.com>
Add very basic image control rendering
https://bugs.webkit.org/show_bug.cgi?id=129080
Reviewed by Tim Horton.
Test: fast/images/image-controls-basic.html
This patch is groundwork that adds a very basic image control that can render on top of images.
* dom/Node.h:
(WebCore::Node:: isImageControlsRootElement): Returns false, unless you are an ImageControls object.
* html/HTMLAttributeNames.in:
Teach HTMLImageElement how to understand an experimental attribute to install controls,
how to actually build the DOM to attach to the shadow root, how to tear that DOM down,
and how to make sure that Renderers are created for that DOM:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::didAttachRenderers):
(WebCore::HTMLImageElement::updateImageControls):
(WebCore::HTMLImageElement::createImageControls):
(WebCore::HTMLImageElement::destroyImageControls):
(WebCore::HTMLImageElement::hasImageControls):
(WebCore::HTMLImageElement::childShouldCreateRenderer):
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::hasShadowControls): For RenderImage to query when it is constructed.
Add a generic, platform independent ImageControls root element that does nothing:
* html/shadow/ImageControlsRootElement.cpp: Added.
(WebCore::ImageControlsRootElement::maybeCreate):
(WebCore::ImageControlsRootElement::ImageControlsRootElement):
(WebCore::ImageControlsRootElement::~ImageControlsRootElement):
* html/shadow/ImageControlsRootElement.h: Added.
Add a Mac-specific ImageControls root element that renders a 20x20 red box (for now):
* html/shadow/mac/ImageControlsRootElementMac.cpp: Added.
(WebCore::ImageControlsRootElementMac::ImageControlsRootElementMac):
(WebCore::ImageControlsRootElementMac::~ImageControlsRootElementMac):
(WebCore::ImageControlsRootElement::maybeCreate):
(WebCore::ImageControlsRootElementMac::maybeCreate):
* html/shadow/mac/ImageControlsRootElementMac.h: Added.
Since much of the RenderMedia::layout() method is now required for RenderImage as well,
move the logic to RenderImage. The extra work is controlled by a bool flag that will always
be set for RenderMedias but will only be set for certain RenderImages:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::RenderImage):
(WebCore::RenderImage::canHaveChildren):
(WebCore::RenderImage::layout):
(WebCore::RenderImage::layoutShadowControls):
* rendering/RenderImage.h:
(WebCore::RenderImage::setHasShadowControls):
(WebCore::RenderImage::shadowControlsNeedCustomLayoutMetrics):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::RenderMedia):
* rendering/RenderMedia.h:
(WebCore::RenderMedia::shadowControlsNeedCustomLayoutMetrics):
* WebCore.xcodeproj/project.pbxproj:
== Rolled over to ChangeLog-2014-02-20 ==