blob: 77b83181068b7d045e7c25f59de8aa96125102a6 [file] [log] [blame]
2015-12-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r194033 and r194267.
https://bugs.webkit.org/show_bug.cgi?id=152465
Caused crashes on Mac WK1 bots (Requested by youenn on
#webkit).
Reverted changesets:
"[Streams API] Expose ReadableStream and relatives to Worker"
https://bugs.webkit.org/show_bug.cgi?id=152066
http://trac.webkit.org/changeset/194033
"[Streams API] imported/w3c/web-platform-tests/streams-api
/readable-streams/cancel.html has a flaky test"
https://bugs.webkit.org/show_bug.cgi?id=152065
http://trac.webkit.org/changeset/194267
2015-12-19 Dan Bernstein <mitz@apple.com>
[Mac] WebKit contains dead source code for OS X Mavericks and earlier
https://bugs.webkit.org/show_bug.cgi?id=152462
Reviewed by Alexey Proskuryakov.
- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
that became uniform across all OS X versions as a result:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
- Removed support for animating default buttons:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton): Removed m_default initialization.
(WebCore::RenderButton::styleDidChange): Removed checking for animating default button and
starting the animation timer.
(WebCore::RenderButton::timerFired): Deleted.
* rendering/RenderButton.h: Removed m_timer and m_default member variables
* rendering/RenderTheme.h:
(WebCore::RenderTheme::defaultButtonHasAnimation): Deleted.
* rendering/RenderThemeMac.h: Deleted override.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::defaultButtonHasAnimation): Deleted.
- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
never getting compiled:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
* html/canvas/WebGLDrawBuffers.cpp:
* loader/DocumentLoader.cpp:
* loader/cache/CachedFont.cpp:
* loader/cocoa/DiskCacheMonitorCocoa.h:
* page/cocoa/SettingsCocoa.mm:
* platform/Scrollbar.cpp:
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
* platform/cocoa/NetworkExtensionContentFilter.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/cg/ImageSourceCG.cpp:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
* platform/graphics/cocoa/FontCascadeCocoa.mm:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/ScrollAnimatorMac.mm:
* platform/mac/ScrollViewMac.mm:
* platform/mac/ScrollbarThemeMac.mm:
* platform/mac/ThemeMac.mm:
* platform/mac/WebCoreFullScreenPlaceholderView.h:
* platform/mac/WebCoreFullScreenPlaceholderView.mm:
* platform/network/cf/CookieJarCFNet.cpp:
* platform/network/cf/ResourceRequest.h:
* platform/spi/cf/CFNetworkSPI.h:
* platform/spi/cocoa/CoreTextSPI.h:
* platform/spi/cocoa/NSButtonCellSPI.h:
* platform/spi/cocoa/NSColorSPI.h:
* platform/spi/cocoa/QuartzCoreSPI.h:
* platform/spi/mac/LookupSPI.h:
* platform/spi/mac/NSFontSPI.h:
* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
* platform/spi/mac/NSPopoverSPI.h:
* platform/spi/mac/NSSharingServicePickerSPI.h:
* platform/spi/mac/NSSharingServiceSPI.h:
* platform/spi/mac/TUCallSPI.h:
* platform/sql/SQLiteDatabase.cpp:
2015-12-18 Antti Koivisto <antti@apple.com>
Cache redirects as separate entries
https://bugs.webkit.org/show_bug.cgi?id=152424
Reviewed by Alex Christensen.
Test: http/tests/cache/disk-cache/disk-cache-redirect.html
* platform/network/ResourceRequestBase.h:
2015-12-18 Per Arne Vollan <peavo@outlook.com>
[WinCairo] Empty context menu item.
https://bugs.webkit.org/show_bug.cgi?id=152423
Reviewed by Alex Christensen.
The context menu contains a submenu item with no text.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
2015-12-18 Michael Catanzaro <mcatanzaro@igalia.com>
Avoid triggering clang's -Wundefined-bool-conversion
https://bugs.webkit.org/show_bug.cgi?id=152408
Reviewed by Mark Lam.
Remove use of ASSERT(this).
* dom/TreeScope.cpp:
(WebCore::TreeScope::adoptIfNeeded):
* page/Frame.cpp:
(WebCore::Frame::createView):
2015-12-18 Simon Fraser <simon.fraser@apple.com>
Remove the 'ignoreViewportScalingConstraints' Setting, which was unused
https://bugs.webkit.org/show_bug.cgi?id=152435
Reviewed by Tim Horton.
r177110 added a WebCore setting called ignoreViewportScalingConstraints,
but it was never used, so remove it.
* page/Settings.in:
2015-12-18 Brent Fulgham <bfulgham@apple.com>
Place an upper bound on canvas pixel count
https://bugs.webkit.org/show_bug.cgi?id=151825
<rdar://problem/23324916>
Reviewed by Simon Fraser (Relanded by Brent Fulgham)
Malformed JavaScript can attempt to create lots of canvas contexts. Limit the amount of memory
we will use for this purpose to some percentage of system RAM.
* html/HTMLCanvasElement.cpp:
(WebCore::removeFromActivePixelMemory): Added helper function
(WebCore::HTMLCanvasElement::~HTMLCanvasElement): Call new 'releaseImageBufferAndContext' method
to ensure ImageBuffer and graphics context state are properly cleaned up.
(WebCore::maxActivePixels): Use one quarter of the system RAM, or 2 GB (whichever is more) as
an upper bound on active pixel memory.
(WebCore::HTMLCanvasElement::getContext): If we are attempting to create a context that will cause
us to exceed the allowed active pixel count, fail.
(WebCore::HTMLCanvasElement::releaseImageBufferAndContext): Added helper function
(WebCore::HTMLCanvasElement::setSurfaceSize): Use the new 'releaseImageBufferAndContext' method
to handle active pixel memory counts.
(WebCore::HTMLCanvasElement::createImageBuffer): Refuse to create a backing buffer if it will
exceed our available pixel memory.
2015-12-18 Olivier Blin <olivier.blin@softathome.com>
Fix the !ENABLE(VIDEO) build after r192953 for <picture> element introduction
https://bugs.webkit.org/show_bug.cgi?id=152431
Since r192953, HTMLSourceElement is built even if video is disabled,
since it is used by the picture element.
But build was broken with -no-video, since HTMLMediaElement usage
should be guarded by VIDEO guards, and its JS bindings were still
under a video conditional.
Reviewed by Alex Christensen.
No new tests, build fix only.
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):
* html/HTMLSourceElement.idl:
2015-12-18 Brady Eidson <beidson@apple.com>
Modern IDB: Refactor when opening the backing store takes place.
https://bugs.webkit.org/show_bug.cgi?id=152405
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Move the "open backing store" logic
from here to performCurrentOpenOperation.
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): If the database backing store is
not open yet, kick off opening it here.
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations): Rework this stuff to be better.
2015-12-17 Brady Eidson <beidson@apple.com>
Modern IDB: Refactor open/delete requests to exist in the same queue.
https://bugs.webkit.org/show_bug.cgi?id=152397
Reviewed by Alex Christensen.
No new tests (Refactor, all existing tests continue to pass).
The order between incoming open and delete requests matters, and each request
needs to be handled individually.
This patch does the above without changing behavior on existing passing tests,
while moving many currently skipped tests closer to passing.
* Modules/indexeddb/server/IDBServerOperation.cpp:
(WebCore::IDBServer::IDBServerOperation::notifyDeleteRequestBlocked):
(WebCore::IDBServer::IDBServerOperation::notifyDidDeleteDatabase):
* Modules/indexeddb/server/IDBServerOperation.h:
(WebCore::IDBServer::IDBServerOperation::hasNotifiedDeleteRequestBlocked):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabase::isVersionChangeInProgress):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
(WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2015-12-17 Csaba Osztrogonác <ossy@webkit.org>
[EFL] edje shouldn't have verbose output
https://bugs.webkit.org/show_bug.cgi?id=152381
Reviewed by Gyuyoung Kim.
* platform/efl/DefaultTheme/CMakeLists.txt:
2015-12-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r194241 and r194252.
https://bugs.webkit.org/show_bug.cgi?id=152415
Caused crashes on GuardMalloc (Requested by ap on #webkit).
Reverted changesets:
"Modern IDB: Refactor open/delete requests to exist in the
same queue."
https://bugs.webkit.org/show_bug.cgi?id=152397
http://trac.webkit.org/changeset/194241
"Modern IDB: Refactor when opening the backing store takes
place."
https://bugs.webkit.org/show_bug.cgi?id=152405
http://trac.webkit.org/changeset/194252
2015-12-17 Brady Eidson <beidson@apple.com>
Modern IDB: Refactor when opening the backing store takes place.
https://bugs.webkit.org/show_bug.cgi?id=152405
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Move the "open backing store" logic
from here to performCurrentOpenOperation.
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): If the database backing store is
not open yet, kick off opening it here.
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations): Rework this stuff to be better.
2015-12-16 Simon Fraser <simon.fraser@apple.com>
ViewportConfiguration functions should return a bool to say if anything changed
https://bugs.webkit.org/show_bug.cgi?id=152353
Reviewed by Tim Horton.
Rather than callers all checking whether setting ViewportConfiguration values
changes state, have its functions return a bool if the values change.
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::setContentsSize):
(WebCore::ViewportConfiguration::setMinimumLayoutSize):
(WebCore::ViewportConfiguration::setViewportArguments):
(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): Deleted.
2015-12-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add JSContext Script Profiling
https://bugs.webkit.org/show_bug.cgi?id=151899
Reviewed by Brian Burg.
Tests: inspector/script-profiler/event-type-API.html
inspector/script-profiler/event-type-Microtask.html
inspector/script-profiler/tracking.html
* ForwardingHeaders/inspector/agents/InspectorScriptProfilerAgent.h: Added.
* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
Create the new agent, even if we don't use it yet for Page inspection.
(WebCore::InspectorController::willCallInjectedScriptFunction): Deleted.
(WebCore::InspectorController::didCallInjectedScriptFunction): Deleted.
No longer needed, implementation was pushed up into InjectedScriptBase.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
* inspector/InspectorReplayAgent.cpp:
(WebCore::buildInspectorObjectForSession):
Disambiguate types.
2015-12-17 Brady Eidson <beidson@apple.com>
Modern IDB: Refactor open/delete requests to exist in the same queue.
https://bugs.webkit.org/show_bug.cgi?id=152397
Reviewed by Alex Christensen.
No new tests (Refactor, all existing tests continue to pass).
The order between incoming open and delete requests matters, and each request
needs to be handled individually.
This patch does the above without changing behavior on existing passing tests,
while moving many currently skipped tests closer to passing.
* Modules/indexeddb/server/IDBServerOperation.cpp:
(WebCore::IDBServer::IDBServerOperation::notifyDeleteRequestBlocked):
(WebCore::IDBServer::IDBServerOperation::notifyDidDeleteDatabase):
* Modules/indexeddb/server/IDBServerOperation.h:
(WebCore::IDBServer::IDBServerOperation::hasNotifiedDeleteRequestBlocked):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabase::isVersionChangeInProgress):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
(WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2015-12-17 Brent Fulgham <bfulgham@apple.com>
[Win] Prevent flashing/strobing repaints on certain hardware
https://bugs.webkit.org/show_bug.cgi?id=152394
<rdar://problem/23875302>
Reviewed by Simon Fraser.
This patch reverts a change I made in r192166, where I always set the
m_viewNeedsUpdate flag to true when a 'flushContext' call was made. Instead,
we should go back to letting the view decide when it needs to paint.
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
(WebCore::WKCACFViewLayerTreeHost::flushContext): Don't just claim that
the view needs to be updated any time we are asked to flush.
2015-12-17 Per Arne Vollan <peavo@outlook.com>
[WinCairo][MediaFoundation] Release Direct3D swap chain object earlier.
https://bugs.webkit.org/show_bug.cgi?id=152392
Reviewed by Alex Christensen.
Since we don't use the swap chain object to render the video to a window,
but render frames to Cairo bitmaps, we can let go of the swap chain object
earlier than we currently do.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::clearDesiredSampleTime):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createVideoSamples):
2015-12-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r194201.
https://bugs.webkit.org/show_bug.cgi?id=152391
Caused crashes with GuardMalloc (Requested by ap|away on
#webkit).
Reverted changeset:
"Reduce PassRefPtr uses in dom - 2"
https://bugs.webkit.org/show_bug.cgi?id=151936
http://trac.webkit.org/changeset/194201
2015-12-17 Csaba Osztrogonác <ossy@webkit.org>
Fix unused parameter handling in WebGLRenderingContextBase.cp
https://bugs.webkit.org/show_bug.cgi?id=152387
Reviewed by Alex Christensen.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::activeTexture):
(WebCore::WebGLRenderingContextBase::attachShader):
(WebCore::WebGLRenderingContextBase::bindAttribLocation):
(WebCore::WebGLRenderingContextBase::bindBuffer):
(WebCore::WebGLRenderingContextBase::bindFramebuffer):
(WebCore::WebGLRenderingContextBase::bindRenderbuffer):
(WebCore::WebGLRenderingContextBase::bindTexture):
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::compileShader):
(WebCore::WebGLRenderingContextBase::createShader):
(WebCore::WebGLRenderingContextBase::detachShader):
(WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
(WebCore::WebGLRenderingContextBase::drawArrays):
(WebCore::WebGLRenderingContextBase::drawElements):
(WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
(WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
(WebCore::WebGLRenderingContextBase::framebufferTexture2D):
(WebCore::WebGLRenderingContextBase::getActiveAttrib):
(WebCore::WebGLRenderingContextBase::getActiveUniform):
(WebCore::WebGLRenderingContextBase::getAttachedShaders):
(WebCore::WebGLRenderingContextBase::getBufferParameter):
(WebCore::WebGLRenderingContextBase::getProgramParameter):
(WebCore::WebGLRenderingContextBase::getProgramInfoLog):
(WebCore::WebGLRenderingContextBase::getRenderbufferParameter):
(WebCore::WebGLRenderingContextBase::getShaderParameter):
(WebCore::WebGLRenderingContextBase::getShaderInfoLog):
(WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat):
(WebCore::WebGLRenderingContextBase::getShaderSource):
(WebCore::WebGLRenderingContextBase::getTexParameter):
(WebCore::WebGLRenderingContextBase::getUniform):
(WebCore::WebGLRenderingContextBase::getUniformLocation):
(WebCore::WebGLRenderingContextBase::getVertexAttrib):
(WebCore::WebGLRenderingContextBase::linkProgram):
(WebCore::WebGLRenderingContextBase::shaderSource):
(WebCore::WebGLRenderingContextBase::uniform1f):
(WebCore::WebGLRenderingContextBase::uniform1fv):
(WebCore::WebGLRenderingContextBase::uniform1i):
(WebCore::WebGLRenderingContextBase::uniform1iv):
(WebCore::WebGLRenderingContextBase::uniform2f):
(WebCore::WebGLRenderingContextBase::uniform2fv):
(WebCore::WebGLRenderingContextBase::uniform2i):
(WebCore::WebGLRenderingContextBase::uniform2iv):
(WebCore::WebGLRenderingContextBase::uniform3f):
(WebCore::WebGLRenderingContextBase::uniform3fv):
(WebCore::WebGLRenderingContextBase::uniform3i):
(WebCore::WebGLRenderingContextBase::uniform3iv):
(WebCore::WebGLRenderingContextBase::uniform4f):
(WebCore::WebGLRenderingContextBase::uniform4fv):
(WebCore::WebGLRenderingContextBase::uniform4i):
(WebCore::WebGLRenderingContextBase::uniform4iv):
(WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
(WebCore::WebGLRenderingContextBase::useProgram):
(WebCore::WebGLRenderingContextBase::validateProgram):
(WebCore::WebGLRenderingContextBase::vertexAttribPointer):
2015-12-16 Alex Christensen <achristensen@webkit.org>
Make SessionID use intHash
https://bugs.webkit.org/show_bug.cgi?id=152356
Reviewed by Darin Adler.
* page/SessionID.h:
(WTF::SessionIDHash::hash):
(WTF::SessionIDHash::equal):
(WTF::HashTraits<WebCore::SessionID>::emptyValue):
(WTF::HashTraits<WebCore::SessionID>::constructDeletedValue):
(WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
Use intHash instead of just casting a uint64_t to an unsigned.
This reduces hash collisions in HashTables that are usually quite small so it isn't much of a problem.
Also, needsDestruction hasn't been in HashTraits since r156507.
2015-12-16 Simon Fraser <simon.fraser@apple.com>
Fix the debug region overlays for RTL documents
https://bugs.webkit.org/show_bug.cgi?id=152372
Reviewed by Darin Adler.
Fix document overlays to use document coordinates when painting, which requires
translating the CTM, and counter-translating the dirtyRect by the scroll origin.
This is only non-zero for RTL documents.
While doing this, I noticed that the scroll origin was misplaced by the scrollbar
width when using overlay scrollbars. Fix by using occupiedWidth/Height() in
ScrollView::updateScrollbars(). I was not able to make a test for this change.
* page/FrameView.cpp:
(WebCore::FrameView::adjustViewSize):
* page/PageOverlay.cpp:
(WebCore::PageOverlay::drawRect):
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):
2015-12-16 Andy Estes <aestes@apple.com>
[iOS] Block loading external stylesheets in the Content-Disposition: attachment sandbox
https://bugs.webkit.org/show_bug.cgi?id=152375
<rdar://problem/22020902>
Reviewed by Darin Adler.
Tests: http/tests/contentdispositionattachmentsandbox/at-import-stylesheets-disabled.html
http/tests/contentdispositionattachmentsandbox/external-stylesheets-disabled.html
http/tests/contentdispositionattachmentsandbox/xml-stylesheet-processing-instructions-disabled.html
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest): Moved handling of CachedResource::MainResource to canRequestInContentDispositionAttachmentSandbox().
(WebCore::CachedResourceLoader::canRequestInContentDispositionAttachmentSandbox): In addition to handling CachedResource::MainResource,
added handling for CachedResource::CSSStyleSheet. Added a FIXME asking whether we should handle other types of resources, too.
* loader/cache/CachedResourceLoader.h:
2015-12-16 Simon Fraser <simon.fraser@apple.com>
ViewportConfiguration functions should return a bool to say if anything changed
https://bugs.webkit.org/show_bug.cgi?id=152353
Reviewed by Tim Horton.
Rather than callers all checking whether setting ViewportConfiguration values
changes state, have its functions return a bool if the values change.
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::setContentsSize):
(WebCore::ViewportConfiguration::setMinimumLayoutSize):
(WebCore::ViewportConfiguration::setViewportArguments):
(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): Deleted.
2015-12-16 Andreas Kling <akling@apple.com>
Give kernel VM some hints about non-live memory-cached resources.
<https://webkit.org/b/152362>
Reviewed by Geoffrey Garen.
When a file-backed CachedResource has no live clients left, and is only being kept alive
because it's cached in the MemoryCache, give the OS a hint that we probably won't need
that memory very soon.
Normally this doesn't do anything, but in case the system comes under memory pressure,
the kernel can prioritize eviction of such clean-but-unneeded pages, which prevents us
from throwing other processes under the bus too soon.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::deleteIfPossible):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::hintMemoryNotNeededSoon):
* platform/SharedBuffer.h:
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::hintMemoryNotNeededSoon):
2015-12-16 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Reduce PassRefPtr uses in dom - 2
https://bugs.webkit.org/show_bug.cgi?id=151936
Reviewed by Darin Adler.
Change PassRefPtr with RefPtr<Foo>&&, WTF::move(), Foo*, and Foo&.
* dom/ScopedEventQueue.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::registerCallback):
* dom/ScriptedAnimationController.h:
* dom/StaticNodeList.h:
* dom/Traversal.cpp:
(WebCore::NodeIteratorBase::NodeIteratorBase):
* dom/Traversal.h:
* dom/TreeWalker.cpp:
(WebCore::TreeWalker::TreeWalker):
(WebCore::TreeWalker::setCurrentNode):
* dom/TreeWalker.h:
(WebCore::TreeWalker::create):
* dom/UserActionElementSet.h:
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::WebKitNamedFlow):
(WebCore::WebKitNamedFlow::create):
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
(WebCore::WebKitNamedFlow::getContent):
* dom/WebKitNamedFlow.h:
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
(WebCore::WheelEvent::initWheelEvent):
(WebCore::WheelEvent::initWebKitWheelEvent):
* dom/WheelEvent.h:
2015-12-16 Simon Fraser <simon.fraser@apple.com>
Simplify isOverlayScrollbar() logic
https://bugs.webkit.org/show_bug.cgi?id=152357
Reviewed by Beth Dakin.
Replace code that checks for isOverlayScrollbar() explicitly with calls to new
occupiedWidth()/occupiedHeight() functions on Scrollbar, which do the overlay
scrollbar check internally.
Add ScrollableArea::scrollbarIntrusion() which returns an IntSize with the occupiedWidth
and occupiedHeight of any scrollbars, and use it in a few places.
* page/FrameView.cpp:
(WebCore::FrameView::autoSizeIfEnabled):
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
(WebCore::ScrollView::calculateOverhangAreasForPainting):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollbarIntrusion):
(WebCore::ScrollableArea::visibleContentRectInternal):
* platform/ScrollableArea.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::occupiedWidth):
(WebCore::Scrollbar::occupiedHeight):
* platform/Scrollbar.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::visibleContentRectInternal):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::verticalScrollbarWidth):
2015-12-16 Alex Christensen <achristensen@webkit.org>
Fix internal Windows build
https://bugs.webkit.org/show_bug.cgi?id=152364
rdar://problem/23928759
Reviewed by Tim Horton.
* WebCore.vcxproj/WebCore.proj:
2015-12-16 Brady Eidson <beidson@apple.com>
Modern IDB: Refactor UniqueIDBDatabase in preparation for consolidation open and delete requests.
https://bugs.webkit.org/show_bug.cgi?id=152355
Reviewed by Alex Christensen.
No new tests (Refactor, existing tests pass).
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2015-12-16 Brady Eidson <beidson@apple.com>
Modern IDB: Have IDBServerOperations know whether they represent an open or delete request.
https://bugs.webkit.org/show_bug.cgi?id=152351
Reviewed by Alex Christensen.
No new tests (Refactor, existing tests pass).
* Modules/indexeddb/IndexedDB.h:
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::createDeleteRequest):
(WebCore::IDBClient::IDBOpenDBRequest::createOpenRequest):
(WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.h:
(WebCore::IDBClient::IDBRequest::requestType):
* Modules/indexeddb/server/IDBServerOperation.cpp:
(WebCore::IDBServer::IDBServerOperation::isOpenRequest):
(WebCore::IDBServer::IDBServerOperation::isDeleteRequest):
* Modules/indexeddb/server/IDBServerOperation.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
* Modules/indexeddb/shared/IDBRequestData.h:
(WebCore::IDBRequestData::isOpenRequest):
(WebCore::IDBRequestData::isDeleteRequest):
2015-12-16 Alex Christensen <achristensen@webkit.org>
Build fix after r194156.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
2015-12-16 Brady Eidson <beidson@apple.com>
Modern IDB: Combine handling open requests, delete requests, and transactions into one timer.
https://bugs.webkit.org/show_bug.cgi?id=152344
Reviewed by Alex Christensen.
No new tests (Refactor, existing tests pass).
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
(WebCore::IDBServer::UniqueIDBDatabase::invokeDeleteOrRunTransactionTimer): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2015-12-16 Alex Christensen <achristensen@webkit.org>
Build fix after r194156.
* platform/network/cf/ResourceHandleCFNet.cpp:
* platform/network/mac/ResourceHandleMac.mm:
Include definition of _TimingDataOptionsEnableW3CNavigationTiming
2015-12-16 Alex Christensen <achristensen@webkit.org>
Implement Web Timing when using NETWORK_SESSION
https://bugs.webkit.org/show_bug.cgi?id=152285
Reviewed by Darin Adler.
Covered by existing tests.
* WebCore.xcodeproj/project.pbxproj:
* platform/network/ResourceHandle.h:
* platform/network/ResourceLoadTiming.h:
(WebCore::ResourceLoadTiming::encode):
Moved setCollectsTimingData from ResourceHandle to ResourceLoadTiming.h to be shared
with WebKit2 when using NETWORK_SESSION, which does not use ResourceHandle.
Also moved getConnectionTimingData to copyTimingData in ResourceLoadTiming for the same reason.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::start):
Use the proper definition of _TimingDataOptionsEnableW3CNavigationTiming.
* platform/network/cocoa/ResourceLoadTiming.mm: Added.
(WebCore::timingValue):
(WebCore::copyTimingData):
Moved from getConnectionTimingData, and use objectForKey instead of valueForKey,
and check to see if there is no object in the dictionary with the given key.
This should never happen with the current CFNetwork implementation, but it's good to check dictionaries.
(WebCore::setCollectsTimingData):
Use _collectTimingDataWithOptions, which should be a slight performance improvement on Mavericks
because we are not collecting unused timing data. Hooray!
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
(WebCore::ResourceHandle::getConnectionTimingData):
(WebCore::ResourceHandle::setCollectsTimingData): Deleted.
* platform/spi/cf/CFNetworkSPI.h:
* platform/spi/cocoa/NSURLConnectionSPI.h:
Moved definitions of SPI to proper SPI headers.
2015-12-16 Beth Dakin <bdakin@apple.com>
Legacy style scrollbars do not change color when you mouse over them if you
are scrolled
https://bugs.webkit.org/show_bug.cgi?id=152319
-and corresponding-
rdar://problem/23317668
Reviewed by Darin Adler.
The scrollbar’s frameRect is in window coordinates, so we need to compare a
point in window coordinates when we test this.
The call to convertFromContainingWindow does not return a point in view
coordinates, so we should not call the variable viewPoint. We do still need
to call it for subframes. convertFromContainingWindow doesn’t do anything for
the root ScrollView (for Mac WK2 at least).
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollbarAtPoint):
HitTestLocation is in contents coordinates. It needs to be converted to
window coordinates
* rendering/RenderView.cpp:
(WebCore::RenderView::hitTest):
2015-12-08 Sergio Villar Senin <svillar@igalia.com>
Fix computation of min|max-content contribution of non-replaced blocks
https://bugs.webkit.org/show_bug.cgi?id=152004
Reviewed by Darin Adler.
WebKit currently always returns the min preferred logical
width for the min-content contribution (and the max preferred
logical width for the max-content contribution) for
non-replaced blocks. That is not correct according to specs
https://drafts.csswg.org/css-sizing/#block-intrinsic.
The min-content and max-content contributions actually depend
on the computed inline size of the block:
* for min-content,max-content or definite sizes: min-content
and max-content contributions are the inline size plus border,
margin and padding.
* otherwise: min-content contribution is the min-content size
and max-content contribution is the max-content size (in both
cases plus border, padding and margin).
Tests: fast/css-intrinsic-dimensions/auto-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/auto-mincontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/fillavailable-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/fillavailable-mincontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/fitcontent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/fitcontent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/fixed-inlinesize-contribution-nonreplaced-blocks-1.html
fast/css-intrinsic-dimensions/fixed-inlinesize-contribution-nonreplaced-blocks-2.html
fast/css-intrinsic-dimensions/indefinite-percent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/indefinite-percent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/maxcontent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/maxcontent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/mincontent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
fast/css-intrinsic-dimensions/mincontent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2015-12-16 Youenn Fablet <youenn.fablet@crf.canon.fr>
[Fetch API] Add fetch API compile time flag
https://bugs.webkit.org/show_bug.cgi?id=152254
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
2015-12-15 Zalan Bujtas <zalan@apple.com>
FontCascade cleanup: Remove ::drawSimpleText and ::drawComplexText.
https://bugs.webkit.org/show_bug.cgi?id=152323
Reviewed by Myles C. Maxfield.
Platform code for ::drawComplexText() is redundant and has
no platform dependent logic. Move it all to ::drawText()
No change in functionality.
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::glyphBufferForTextRun):
(WebCore::FontCascade::drawText):
(WebCore::FontCascade::drawSimpleText): Deleted.
* platform/graphics/FontCascade.h:
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::FontCascade::drawComplexText): Deleted.
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawComplexText): Deleted.
* platform/graphics/win/FontWin.cpp:
(WebCore::FontCascade::drawComplexText): Deleted.
2015-12-15 Tim Horton <timothy_horton@apple.com>
[Mac] Gesture Events should not have negative scale
https://bugs.webkit.org/show_bug.cgi?id=151065
<rdar://problem/23474123>
Reviewed by Anders Carlsson.
* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
* page/EventHandler.h:
Make it possible to use m_gestureInitialDiameter for Mac gesture events too.
2015-12-15 Timothy Horton <timothy_horton@apple.com>
Try to fix the CMake build
* CMakeLists.txt:
2015-12-15 Timothy Horton <timothy_horton@apple.com>
Try to fix the CMake build
* CMakeLists.txt:
2015-12-15 Tim Horton <timothy_horton@apple.com>
REGRESSION (r191849): There's no yellow bouncy highlight when using Find on Page on iOS
https://bugs.webkit.org/show_bug.cgi?id=152241
<rdar://problem/23642574>
Reviewed by Simon Fraser.
Tests: pageoverlay/overlay-small-frame-mouse-events.html
pageoverlay/overlay-small-frame-paints.html
* page/PageOverlay.cpp:
(WebCore::PageOverlay::bounds):
Revert r191849's change that made bounds() actually return the frame()
if we frame is manually overriden.
(WebCore::PageOverlay::mouseEvent):
Convert the mouse event the rest of the way into overlay coordinates (by
applying the overlay's frame origin) before deciding whether to handle
the event.
* page/PageOverlay.h:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* testing/Internals.cpp:
(WebCore::Internals::installMockPageOverlay):
* testing/Internals.h:
* testing/Internals.idl:
* testing/MockPageOverlay.cpp: Added.
(WebCore::MockPageOverlay::create):
(WebCore::MockPageOverlay::MockPageOverlay):
(WebCore::MockPageOverlay::setFrame):
* testing/MockPageOverlay.h: Added.
(WebCore::MockPageOverlay::overlay):
* testing/MockPageOverlay.idl: Added.
* testing/MockPageOverlayClient.cpp:
(WebCore::MockPageOverlayClient::installOverlay):
(WebCore::MockPageOverlayClient::uninstallAllOverlays):
(WebCore::MockPageOverlayClient::pageOverlayDestroyed):
(WebCore::MockPageOverlayClient::drawRect):
(WebCore::MockPageOverlayClient::mouseEvent):
* testing/MockPageOverlayClient.h:
Make internals.installMockPageOverlay return a MockPageOverlay object so
tests can manipulate their overlay. For now, expose setFrame.
Also, log when MockPageOverlayClient gets asked to paint or receives a mouse event,
which will show up in test output. Slightly unconventional, but very convenient.
2015-12-15 Myles C. Maxfield <mmaxfield@apple.com>
[Font Features] TrueType fonts trigger real features even when synthesis is applied
https://bugs.webkit.org/show_bug.cgi?id=152287
Reviewed by Darin Adler.
When using a font feature that is synthesizable, and synthesis is triggered,
we should make sure to turn off the original font feature. Otherwise, the
feature will be applied twice on top of itself.
This worked for OpenType fonts, but not for TrueType fonts.
Tests: css3/font-variant-petite-caps-synthesis.html
css3/font-variant-small-caps-synthesis.html
css3/font-variant-petite-caps-synthesis-coverage.html
css3/font-variant-small-caps-synthesis-coverage.html
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::defaultSelectorForTrueTypeFeature):
(WebCore::removedFeature):
(WebCore::createCTFontWithoutSynthesizableFeatures):
2015-12-15 Per Arne Vollan <peavo@outlook.com>
[WinCairo][MediaFoundation] Full screen mode is not supported.
https://bugs.webkit.org/show_bug.cgi?id=152300
Reviewed by Darin Adler.
We need to let WebCore know MediaFoundation supports full screen mode.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::pause):
(WebCore::MediaPlayerPrivateMediaFoundation::supportsFullscreen):
(WebCore::MediaPlayerPrivateMediaFoundation::naturalSize):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2015-12-15 Javier Fernandez <jfernandez@igalia.com>
[css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe'
https://bugs.webkit.org/show_bug.cgi?id=152251
Reviewed by Darin Adler.
The 'True' Overflow Alignment keyword is now defined in the Box Alignment
specification as 'Unsafe'.
This patch applies the required changes in the CSS parsing logic, as well
Grid Layout specific codebase, so it complies with the last version of the
spec.
No new tests, no change in functionality.
* css/CSSParser.cpp:
(WebCore::isAlignmentOverflowKeyword):
(WebCore::CSSParser::parseItemPositionOverflowPosition):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator OverflowAlignment):
* css/CSSValueKeywords.in:
* rendering/RenderGrid.cpp:
(WebCore::computeOverflowAlignmentOffset):
* rendering/style/RenderStyleConstants.h:
2015-12-15 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Operate with a reference to the TextureMapper wherever possible
https://bugs.webkit.org/show_bug.cgi?id=152118
Reviewed by Martin Robinson.
In most cases where used, the pointer to the TextureMapper is non-null, so it
should really be a reference. The pointer is still used for the
TextureMapperLayer member variable which is null until the TextureMapper object
is created and set on the root layer.
* platform/graphics/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
* platform/graphics/GraphicsContext3DPrivate.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::paintToTextureMapper):
* platform/graphics/cairo/ImageBufferDataCairo.h:
* platform/graphics/efl/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
* platform/graphics/efl/GraphicsContext3DPrivate.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/surfaces/GraphicsSurface.cpp:
(WebCore::GraphicsSurface::paintToTextureMapper):
* platform/graphics/surfaces/GraphicsSurface.h:
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
(WebCore::GraphicsSurface::platformPaintToTextureMapper):
* platform/graphics/texmap/BitmapTexture.cpp:
(WebCore::BitmapTexture::updateContents):
* platform/graphics/texmap/BitmapTexture.h:
(WebCore::BitmapTexture::applyFilters):
* platform/graphics/texmap/BitmapTextureGL.cpp:
(WebCore::BitmapTextureGL::applyFilters):
* platform/graphics/texmap/BitmapTextureGL.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
* platform/graphics/texmap/TextureMapperBackingStore.h:
(WebCore::TextureMapperBackingStore::drawRepaintCounter):
* platform/graphics/texmap/TextureMapperFPSCounter.cpp:
(WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
* platform/graphics/texmap/TextureMapperFPSCounter.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
(WebCore::TextureMapperLayer::paint):
(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::paintSelfAndChildren):
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):
(WebCore::TextureMapperLayer::applyMask):
(WebCore::TextureMapperLayer::paintIntoSurface):
(WebCore::commitSurface):
(WebCore::TextureMapperLayer::paintWithIntermediateSurface):
* platform/graphics/texmap/TextureMapperPlatformLayer.h:
(WebCore::TextureMapperPlatformLayer::drawBorder):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
* platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp:
(WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
* platform/graphics/texmap/TextureMapperSurfaceBackingStore.h:
* platform/graphics/texmap/TextureMapperTile.cpp:
(WebCore::TextureMapperTile::updateContents):
(WebCore::TextureMapperTile::paint):
* platform/graphics/texmap/TextureMapperTile.h:
* platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
(WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
(WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
(WebCore::TextureMapperTiledBackingStore::drawBorder):
(WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
(WebCore::TextureMapperTiledBackingStore::updateContents):
* platform/graphics/texmap/TextureMapperTiledBackingStore.h:
2015-12-15 Youenn Fablet <youenn.fablet@crf.canon.fr>
WebIDL generator should support the possibility for C++ classes to have a JS Builtin constructor
https://bugs.webkit.org/show_bug.cgi?id=152171
Reviewed by Darin Adler.
Reintroducing JSBuiltinConstructor keyword as a way to run automatically a JS builtin initialization function
to process the arguments passed to the DOM C++ constructor.
Specialized createJSObject for those classes.
Fixing typo in TestCustomConstructor.idl.
Covered by binding tests.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
(IsConstructable):
(IsJSBuiltinConstructor):
(AddJSBuiltinIncludesIfNeeded):
* bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructor.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructor.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructorPrivate.h: Added.
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: Added.
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: Added.
* bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.h: Added.
* bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.mm: Added.
* bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructorInternal.h: Added.
* bindings/scripts/test/TestClassWithJSBuiltinConstructor.idl: Copied from Source/WebCore/bindings/scripts/test/TestCustomConstructor.idl.
* bindings/scripts/test/TestCustomConstructor.idl:
2015-12-14 Andreas Kling <akling@apple.com>
ResourceUsageOverlay should show GC timers.
<https://webkit.org/b/152151>
Reviewed by Darin Adler.
Add countdowns until next Eden and Full GC to the overlay. It also shows if there
is no garbage collection scheduled. This will be helpful in understanding why GC
sometimes takes a very long time to happen.
* page/ResourceUsageOverlay.h:
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::formatByteNumber): Drive-by silly math fix. :|
(WebCore::gcTimerString):
(WebCore::ResourceUsageOverlay::platformDraw):
(WebCore::nextFireTimeForGCTimer):
(WebCore::runSamplerThread):
2015-12-14 Chris Fleizach <cfleizach@apple.com>
AX: iOS: Text field variations do not have the correct traits
https://bugs.webkit.org/show_bug.cgi?id=152237
Reviewed by Mario Sanchez Prada.
Make search fields and text areas use the appropriate iOS traits to
distinguish them.
Test: accessibility/ios-simulator/textentry-traits.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
(-[WebAccessibilityObjectWrapper _accessibilityTextEntryTraits]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
2015-12-14 Tim Horton <timothy_horton@apple.com>
Remove some Mavericks guards in ServicesOverlayController
https://bugs.webkit.org/show_bug.cgi?id=152238
Reviewed by Darin Adler.
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::selectionRectsDidChange): Deleted.
(WebCore::ServicesOverlayController::selectedTelephoneNumberRangesChanged): Deleted.
The whole file is already PLATFORM(MAC) guarded, and the 10.9 guards
are no longer necessary.
2015-12-14 Daniel Bates <dabates@apple.com>
[iOS] DOM click event may not be dispatched when page has :active style and <input type="search">
https://bugs.webkit.org/show_bug.cgi?id=144451
<rdar://problem/23099482>
Reviewed by Simon Fraser.
Fixes an issue where a DOM click event is not dispatched to an element in a subframe on a page
that has a <input type="search"> and defines a CSS :active pseudo-class for the HTML body element.
On iOS we only dispatch a DOM click event if the content of the page does not change as part of
dispatching a DOM mousemove event at the tapped element as a means of providing a good user
experience on web pages that reveal or hide content based on mouse hover. Currently we consider
the content of the page to have changed if the visibility of any element on the page changes.
In particular we consider the content of the page to have changed if the visibility of a user
agent shadow DOM element changes (e.g. the search field cancel button). Instead we should only
consider visibility changes to the actual web page content and ignore visibility changes to
user agent shadow DOM elements.
Tests: fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html
fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html
fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html
fast/forms/search/search-cancel-in-formerly-invisible-element.html
fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html
fast/forms/search/search-cancel-toggle-visibility-initially-visible.html
* style/StyleResolveTree.cpp:
(WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle):
Ignore visibility changes to user agent shadow DOM elements.
2015-12-14 Youenn Fablet <youenn.fablet@crf.canon.fr>
[Streams API] Directly use @then as much as possible
https://bugs.webkit.org/show_bug.cgi?id=151631
Reviewed by Darin Adler.
Moved from @Promise.prototype.@then.@call(promise,...) to promise.@then.(...)
for promise objects that are not exposed to user scripts.
Updated promiseInvokeXX stream utility functions to ensure that returned promise always has a @then.
This allows improving the readability of code calling promiseInvokeXX functions.
Changed invokeOrNoop to promiseInvokeOrNoopNoCatch as invokeOrNoop
result is always wrapped as a promise using Promise.resolve.
No change in behavior.
* Modules/streams/ReadableStream.js:
(initializeReadableStream):
* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream):
(teeReadableStreamBranch2CancelFunction):
(cancelReadableStream):
* Modules/streams/StreamInternals.js:
(shieldingPromiseResolve): introduced this routine to ensure the returned promise has a @then property.
(promiseInvokeOrNoopNoCatch):
(promiseInvokeOrNoop):
(promiseInvokeOrFallbackOrNoop):
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(abort):
* Modules/streams/WritableStreamInternals.js:
(callOrScheduleWritableStreamAdvanceQueue):
2015-12-14 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
[Streams API] Expose ReadableStream and relatives to Worker
https://bugs.webkit.org/show_bug.cgi?id=152066
Reviewed by Darin Adler.
Moving the code that links internal functions to the GlobalObject in WebCoreJSBuiltinInternals.cpp.
This file should be generated by the builtin generator once refactoring is done.
This code is located in JSBuiltinFunctions::initialize.
Moving ReadableStream private constructors and constants code from JSDOMWindowBase to JSDOMGlobalObject.
Calling JSBuiltinInternalFunctions::initialize in JSDOMGlobalObject so that internals are also available in Worker.
Made ReadableStream and relatives exposed in Worker.
Patch by Youenn Fablet.
Rebased and fixed style by Xabier Rodriguez Calvar.
Covered by rebased tests.
* CMakeLists.txt:
* Modules/streams/ByteLengthQueuingStrategy.idl:
* Modules/streams/CountQueuingStrategy.idl:
* Modules/streams/ReadableStream.idl:
* Modules/streams/ReadableStreamController.idl:
* Modules/streams/ReadableStreamReader.idl:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):
(WebCore::JSDOMGlobalObject::finishCreation):
(WebCore::JSDOMGlobalObject::visitChildren):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation): Deleted.
(WebCore::JSDOMWindowBase::visitChildren): Deleted.
* bindings/js/JSDOMWindowBase.h:
* bindings/js/WebCoreJSBuiltinInternals.cpp: Added.
(WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
(WebCore::JSBuiltinInternalFunctions::visit):
(WebCore::JSBuiltinInternalFunctions::initialize):
* bindings/js/WebCoreJSBuiltinInternals.h:
* bindings/js/WebCoreJSBuiltins.h:
2015-12-14 Frederic Wang <fred.wang@free.fr>
Move MathMLOperatorDictionary features into a separate module.
https://bugs.webkit.org/show_bug.cgi?id=152242
Reviewed by Martin Robinson.
The definitions, properties and search of the MathML operator dictionary are really independent of the renderer object for math operators.
This patch moves them in a separate module/file to make them more manageable and readable.
No new tests. We already have sufficient test coverage.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/mathml/MathMLOperatorDictionary.cpp:
(WebCore::ExtractKey):
(WebCore::ExtractChar):
(WebCore::ExtractKeyHorizontal):
(WebCore::MathMLOperatorDictionary::getEntry):
(WebCore::MathMLOperatorDictionary::isVertical):
* rendering/mathml/MathMLOperatorDictionary.h: Added.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::setOperatorProperties):
(WebCore::MathMLOperatorDictionary::ExtractKey): Deleted.
(WebCore::MathMLOperatorDictionary::ExtractChar): Deleted.
(WebCore::MathMLOperatorDictionary::ExtractKeyHorizontal): Deleted.
* rendering/mathml/RenderMathMLOperator.h:
2015-12-14 Sergio Villar Senin <svillar@igalia.com>
[css-grid] Fix height computation of grid items with borders
https://bugs.webkit.org/show_bug.cgi?id=151800
Reviewed by Darin Adler.
When computing the logical height of grid items for the
default "min-height: auto;" case we were constraning the
min-content size using constrainLogicalHeightByMinMax()
instead of constrainContentLogicalHeightByMinMax(). The
problem of using the former is that we were adding the borders
twice.
Test: fast/css-grid-layout/grid-item-with-border-in-intrinsic.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeight):
2015-12-13 Tim Horton <timothy_horton@apple.com>
Adopt CGIOSurfaceContextCreateImageReference to avoid unnecessary readback
https://bugs.webkit.org/show_bug.cgi?id=150988
<rdar://problem/18993594>
Reviewed by Darin Adler.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawConsumingImageBuffer):
* platform/graphics/GraphicsContext.h:
* platform/graphics/ImageBuffer.h:
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::createBitmapImageAfterScalingIfNeeded):
(WebCore::ImageBuffer::copyImage):
(WebCore::ImageBuffer::sinkIntoImage):
(WebCore::ImageBuffer::sinkIntoNativeImage):
(WebCore::ImageBuffer::drawConsuming):
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::createFromImageBuffer):
(IOSurface::sinkIntoImage):
Add sinkIntoImage, sinkIntoNativeImage, and drawConsuming to ImageBuffer,
which all consume the ImageBuffer and allow us to tell the system to
make a CGImage that references the IOSurface, which is in many cases
more efficient than making an image with a "copy" of the IOSurface.
(The copy is done lazily, but we often hit a corner case that causes
it to happen unnecessarily.)
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* page/TextIndicator.cpp:
(WebCore::takeSnapshot):
* platform/DragImage.cpp:
(WebCore::createDragImageFromSnapshot):
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware):
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::currentFrameImage):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawPatternForContainer):
Adopt sinkIntoImage and drawConsumingImageBuffer in a few places.
2015-12-13 Andreas Kling <akling@apple.com>
CachedScript could have a copy-free path for all-ASCII scripts.
<https://webkit.org/b/152203>
Reviewed by ANtti Koivisto.
Many (if not most) of script resources on the web contain nothing but ASCII characters.
Such resources, when streamed through a text decoder, will yield the exact same byte
sequence, except in anonymous heap memory instead of delicious file-backed pages.
Care is taken to ensure that the wrapper StringImpl is updated to target newly cached
resource data if an asynchronous caching notification comes in.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::tryReplaceEncodedData):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::didReplaceSharedBufferContents):
* loader/cache/CachedScript.cpp:
(WebCore::encodingMayBeAllASCII):
(WebCore::CachedScript::script):
(WebCore::CachedScript::didReplaceSharedBufferContents):
* loader/cache/CachedScript.h:
* platform/SharedBuffer.h:
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer):
2015-12-13 Zalan Bujtas <zalan@apple.com>
Clean up absolute positioned map properly.
https://bugs.webkit.org/show_bug.cgi?id=152219
rdar://problem/23861165
Reviewed by Simon Fraser.
We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
Since this static map is at block level, (positioned)inline renderers use their containing block to store
their positioned descendants.
This patch ensures that when an inline element can no longer hold positioned children, we remove them from
the inline's containing block's map. -unless the container itself can hold positioned renderers(see RenderElement::canContainAbsolutelyPositionedObjects).
Test: fast/block/positioning/crash-when-positioned-inline-has-positioned-child.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleWillChange):
* rendering/RenderInline.h:
2015-12-13 Joanmarie Diggs <jdiggs@igalia.com>
AX: [EFL] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
https://bugs.webkit.org/show_bug.cgi?id=152079
Reviewed by Chris Fleizach.
Map the element to WebCore AccessibilityRole DivRole for EFL. As with GTK, this
is being done in the shared layer rather than in the platform layer because we
want all subsequent logic to treat anonymous render block flow elements as divs.
No new tests. We already have sufficient test coverage. The expectations
been updated accordingly.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2015-12-12 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/index-duplicate-keypaths.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152201
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
The spec states that if an object store uses a key generator, and then a record is stored whose
key was an explicitly set number, then the key generator value should be bumped to the next
integer higher than the explicit number.
We didn't do that.
Now we do.
* Modules/indexeddb/IndexedDB.h: Add an "OverwriteForCursor" option for overwrite mode.
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::putForCursorUpdate): Use the "OverwriteForCursor" mode.
* Modules/indexeddb/server/IDBBackingStore.h: Add maybeUpdateKeyGeneratorNumber
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber): If the number value
from the provided key should bump the key generator value, do so now.
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): After successfully adding the new record,
possibly bump the key generator value.
2015-12-12 Katlyn Graff <kgraff@apple.com>
Safari background tabs should be fully suspended where possible.
https://bugs.webkit.org/show_bug.cgi?id=150515
Reviewed by Ryosuke Niwa.
Support for tab suspension for Mac, enabled by defaults writing to WebKitTabSuspension.
Page-down suspension consolidated with PageCache suspension code in Document::
suspend and Document::resume. Pages canTabSuspend if cacheable, nonvisible, nonprerender,
and nonactive.
* dom/Document.cpp: moved scrollbar handling from setInPageCache to suspend/resume
(WebCore::Document::suspend): moved scrollbar, dom, animation, timer, and visual update suspending into here
(WebCore::Document::resume): moved scrollbar, dom, animation, timer, and visual update resuming into here
* dom/Document.h: added m_isSuspended to prevent repeat calls from PageCache/Tab Suspension contention
* history/CachedFrame.cpp: moved dom, animation, and timer suspension into Document::suspend
(WebCore::CachedFrame::CachedFrame):
* history/PageCache.cpp: Added a few nullchecks to prevent crashes if canCacheFrame is called but document is null
(WebCore::PageCache::canCacheFrame):
* page/Page.cpp:
(WebCore::Page::Page): Added timer to fire delayed suspension
(WebCore::Page::setPageActivityState): Added a call to schedule tab suspension
(WebCore::Page::setIsVisibleInternal): Added a call to schedule tab suspension
(WebCore::Page::canTabSuspend): Added support for suspending if cacheable, nonvisible, nonprerender, and nonactive
(WebCore::Page::setIsTabSuspended): Added a function to suspend or resume tabs
(WebCore::Page::setTabSuspensionEnabled): Added support for a defaults write enable
(WebCore::Page::scheduleTabSuspension): Added ability to schedule the suspension timer to fire or resume
(WebCore::Page::timerFired): Added a suspension timer
* page/Page.h:
* page/PageThrottler.h:
(WebCore::PageThrottler::activityState): Added access to m_activityState for canTabSuspend
2015-12-11 Simon Fraser <simon.fraser@apple.com>
Mousewheel events don't work in iframes in RTL documents
https://bugs.webkit.org/show_bug.cgi?id=152200
Reviewed by Beth Dakin.
When dispatching wheel events, the testing of the event point against the
non-fast scrollable region was broken in an RTL document. Fix by taking
the scrollOrigin into account in ScrollingTreeFrameScrollingNode::viewToContentsOffset().
Test: fast/scrolling/rtl-point-in-iframe.html
* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset):
2015-12-11 Zalan Bujtas <zalan@apple.com>
ASSERTION FAILED: !rect.isEmpty() in WebCore::GraphicsContext::drawRect
https://bugs.webkit.org/show_bug.cgi?id=151201
Reviewed by Simon Fraser.
Drawing empty rect is a waste.
Test: fast/borders/empty-drawrect-assert-after-pixelsnap.html
* rendering/RenderElement.cpp:
(WebCore::RenderElement::drawLineForBoxSide):
2015-12-11 Jiewen Tan <jiewen_tan@apple.com>
Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
https://bugs.webkit.org/show_bug.cgi?id=152102
<rdar://problem/22124230>
Reviewed by Andy Estes.
Keep the ReferrerPolicy for a document as ReferrerPolicyNever if the document is loaded with
"Content-Disposition: attachment".
Test: http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header.html
* dom/Document.cpp:
(WebCore::Document::processReferrerPolicy):
(WebCore::Document::applyContentDispositionAttachmentSandbox):
2015-12-11 Eric Carlson <eric.carlson@apple.com>
[MediaStream] Add a setting to allow the mock media capture devices to be enabled and disabled
https://bugs.webkit.org/show_bug.cgi?id=152197
Reviewed by Dean Jackson.
Test: fast/mediastream/mock-media-source.html
* page/Settings.cpp:
(WebCore::Settings::mockCaptureDevicesEnabled):
(WebCore::Settings::setMockCaptureDevicesEnabled):
* page/Settings.h:
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::setSharedStreamCenterOverride): Renamed.
(WebCore::RealtimeMediaSourceCenter::setSharedStreamCenter): Deleted.
* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled): Renamed. Allow
it to be enabled and disabled.
(WebCore::MockRealtimeMediaSourceCenter::registerMockRealtimeMediaSourceCenter): Deleted.
* platform/mock/MockRealtimeMediaSourceCenter.h:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::setMockMediaCaptureDevicesEnabled):
* testing/Internals.h:
* testing/Internals.idl:
2015-12-11 Jer Noble <jer.noble@apple.com>
[EME] Do not pass in the initialization data to AVContentKeyRequest as the contentIdentifier.
https://bugs.webkit.org/show_bug.cgi?id=152204
rdar://problem/23867877
Reviewed by Eric Carlson.
The AVContentKeyRequest API has been updated to no longer require a contentId parameter if the
ID can be derived from the initialization data.
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::update):
2015-12-11 Alexey Proskuryakov <ap@apple.com>
Roll out http://trac.webkit.org/r193984, because the new test is timing out.
Was: Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
https://bugs.webkit.org/show_bug.cgi?id=152102
<rdar://problem/22124230>
* dom/Document.cpp:
(WebCore::Document::processReferrerPolicy):
(WebCore::Document::applyContentDispositionAttachmentSandbox):
2015-12-11 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/optional-arguments.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152194
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::continueFunction): Allow 'undefined' for the key.
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::add): Ditto.
(WebCore::IDBClient::IDBObjectStore::put): Ditto.
2015-12-11 Brady Eidson <beidson@apple.com>
Followup to:
Modern IDB: storage/indexeddb/index-count.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152175
Noticed by Darin Adler.
* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::count): Replace a curly brace to its proper place.
2015-12-11 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/cursor-continue.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152192
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::continueFunction): Check against the current key, not the current primary key.
(WebCore::IDBClient::IDBCursor::setGetResult): Also save off the current IDBKeyData.
* Modules/indexeddb/client/IDBCursorImpl.h:
2015-12-11 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/index-basics.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152190
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* bindings/js/JSIDBObjectStoreCustom.cpp:
(WebCore::JSIDBObjectStore::createIndex): Custom error message for the TypeError
2015-12-11 Jiewen Tan <jiewen_tan@apple.com>
Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
https://bugs.webkit.org/show_bug.cgi?id=152102
<rdar://problem/22124230>
Reviewed by Andy Estes.
Keep the ReferrerPolicy for a document as ReferrerPolicyNever if the document is loaded with
"Content-Disposition: attachment".
Test: http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header.html
* dom/Document.cpp:
(WebCore::Document::processReferrerPolicy):
(WebCore::Document::applyContentDispositionAttachmentSandbox):
2015-12-11 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/key-type-array.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152187
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::putOrAdd): Perform the correct validity check on array keys.
2015-12-11 Joseph Pecoraro <pecoraro@apple.com>
check-for-inappropriate-objc-class-names should check all class names, not just externally visible ones
https://bugs.webkit.org/show_bug.cgi?id=152156
Reviewed by Dan Bernstein.
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession):
Rename classes with a "Web" prefix.
2015-12-11 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152177
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionDidFinish): Renamed from below.
(WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionWillFinish): Deleted.
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::setVersionChangeTransaction): OpenDBRequests usually don't have transactions,
unless they end up being upgrade requests.
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::IDBTransaction): Call setVersionChangeTransaction on the request if appropriate.
(WebCore::IDBClient::IDBTransaction::dispatchEvent): Call versionChangeTransactionDidFinish after the
abort/complete events fire.
(WebCore::IDBClient::IDBTransaction::abort): Deleted.
(WebCore::IDBClient::IDBTransaction::commit): Deleted.
2015-12-11 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/index-count.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152175
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::count): If the passed in IDBKeyRange* is nullptr, use IDBKeyRangeData::allKeys.
(WebCore::IDBClient::IDBIndex::doCount): Change an isNull check to a more correct !isValid() check.
2015-12-11 Per Arne Vollan <peavo@outlook.com>
[WinCairo][MediaFoundation] Setting playback rate does not work.
https://bugs.webkit.org/show_bug.cgi?id=152172
Reviewed by Brent Fulgham.
Implement method to set playback rate.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
(WebCore::MediaPlayerPrivateMediaFoundation::setRateDouble):
(WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2015-12-11 Darin Adler <darin@apple.com>
Reduce the number of events that can be created by Document.createEvent
https://bugs.webkit.org/show_bug.cgi?id=151931
Reviewed by Alex Christensen.
Document.createEvent is intended for use only with a certain set of legacy events.
Ideally it should only be the ones mentioned in the DOM specification.
For now, at least remove all the events that can't usefully be created and initialized
this way. Later, we should cut it down even smaller. And stop automatically generating
this, which was causing everyone who made an event IDL file to get supported here!
The modern alternative is to use event class constructors instead.
* CMakeLists.txt: Don't compile EventFactory.cpp. For now, we still generate
EventFactory.cpp but we do not use it.
* DerivedSources.make: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto. Also don't include EventFactory.h in the
project file.
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::hasFeature): Added a comment about the SVGZoomEvents feature.
* dom/Document.cpp: Re-sorted includes and added the new ones needed for createEvent.
(WebCore::Document::createEvent): Moved all the logic here from EventFactory, and
took a crack at comments that explain what this should and should not be used for.
* dom/EventFactory.h: Removed.
2015-12-10 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/objectstore-count.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152167
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/IDBKeyRangeData.h:
(WebCore::IDBKeyRangeData::allKeys):
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::count): If the passed in IDBKeyRange* is nullptr, use IDBKeyRangeData::allKeys.
(WebCore::IDBClient::IDBObjectStore::doCount): Change an isNull check to a more correct !isValid() check.
2015-12-10 Youenn Fablet <youenn.fablet@crf.canon.fr>
Binding and builtin generators should lowercase RTCXX as rtcXX and not rTCXX
https://bugs.webkit.org/show_bug.cgi?id=152121
Reviewed by Darin Adler.
No change in behavior.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation): Using rtcXX in lieu of rTCXX.
* bindings/js/WebCoreJSBuiltinInternals.h:
(WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions): Ditto.
(WebCore::JSBuiltinInternalFunctions::rtcPeerConnectionInternals): Added.
(WebCore::JSBuiltinInternalFunctions::visit): Ditto.
(WebCore::JSBuiltinInternalFunctions::init): Ditto.
(WebCore::JSBuiltinInternalFunctions::rTCPeerConnectionInternals): Deleted.
* bindings/js/WebCoreJSBuiltins.h:
(WebCore::JSBuiltinFunctions::JSBuiltinFunctions): Using rtcXX in lieu of rTCXX.
(WebCore::JSBuiltinFunctions::rtcPeerConnectionBuiltins): Added.
(WebCore::JSBuiltinFunctions::rtcPeerConnectionInternalsBuiltins): Added.
(WebCore::JSBuiltinFunctions::rTCPeerConnectionBuiltins): Deleted.
(WebCore::JSBuiltinFunctions::rTCPeerConnectionInternalsBuiltins): Deleted.
* bindings/scripts/CodeGenerator.pm:
(WK_lcfirst): Added RTC special rule.
2015-12-10 Zalan Bujtas <zalan@apple.com>
ASSERTION FAILED: !simpleLineLayout() in WebCore::RenderText::collectSelectionRectsForLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=152115
Reviewed by Simon Fraser.
document.execCommand("indent") generates a blockquote wrapper and moves the indented content inside.
If the indented content is already inside a selection, we need to make sure that newly created flow uses
normal line layout.
This patch fixes the generic case as re-parenting an already selected renderer is not specific to document.execCommand("indent").
Test: fast/block/selection-inside-simple-line-layout.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::printReason):
2015-12-10 Eric Carlson <eric.carlson@apple.com>
[MediaStream] Expose media capture devices persistent permissions to WebCore
https://bugs.webkit.org/show_bug.cgi?id=152087
Reviewed by Chris Dumez.
No new tests, an existing test was updated to test the change.
* CMakeLists.txt: Add UserMediaPermissionCheck.cpp.
* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the permission checker client.
(WebCore::MediaDevicesRequest::contextDestroyed): Ditto.
(WebCore::MediaDevicesRequest::start): Create a permission checker and start it running.
(WebCore::MediaDevicesRequest::didCompleteCheck): Start the media source checker.
(WebCore::MediaDevicesRequest::didCompleteRequest): Only include a track's label if the
page has permission to use a capture device.
* Modules/mediastream/MediaDevicesRequest.h:
* Modules/mediastream/UserMediaClient.h: Include prototypes for permission checker.
(WebCore::UserMediaClient::~UserMediaClient):
* Modules/mediastream/MediaStreamTrackSourcesRequest.cpp: Removed, not longer used.
* Modules/mediastream/MediaStreamTrackSourcesRequest.h:
* Modules/mediastream/UserMediaController.h:
(WebCore::UserMediaController::checkUserMediaPermission): New.
(WebCore::UserMediaController::cancelUserMediaPermissionCheck): Ditto.
* Modules/mediastream/UserMediaPermissionCheck.cpp: Added.
(WebCore::UserMediaPermissionCheck::create):
(WebCore::UserMediaPermissionCheck::UserMediaPermissionCheck):
(WebCore::UserMediaPermissionCheck::~UserMediaPermissionCheck):
(WebCore::UserMediaPermissionCheck::securityOrigin):
(WebCore::UserMediaPermissionCheck::contextDestroyed):
(WebCore::UserMediaPermissionCheck::start):
(WebCore::UserMediaPermissionCheck::setDeviceAccessMode):
* Modules/mediastream/UserMediaPermissionCheck.h: Added.
(WebCore::UserMediaPermissionCheckClient::~UserMediaPermissionCheckClient):
(WebCore::UserMediaPermissionCheck::setClient):
* WebCore.xcodeproj/project.pbxproj: Add UserMediaPermissionCheck.cpp|.h
* platform/mock/UserMediaClientMock.h: Removed, it is no longer used.
* testing/Internals.cpp: Remove UserMediaClientMock.h include, it is gone.
2015-12-10 Myles C. Maxfield <mmaxfield@apple.com>
Build fix
Unreviewed.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::smallCapsTrueTypeDictionary):
2015-12-10 Simon Fraser <simon.fraser@apple.com>
Mordernize viewport dumping
https://bugs.webkit.org/show_bug.cgi?id=152159
Reviewed by Zalan Bujtas.
Use groupings to simplify the viewport configuration dumping code.
* page/ViewportConfiguration.cpp:
(WebCore::operator<<):
(WebCore::ViewportConfiguration::description):
2015-12-10 Joseph Pecoraro <pecoraro@apple.com>
Remote Inspector: Verify the identity of the other side of XPC connections
https://bugs.webkit.org/show_bug.cgi?id=152153
Reviewed by Brian Burg.
* WebCore.xcodeproj/project.pbxproj:
* platform/network/mac/CertificateInfoMac.mm:
Use the new header.
2015-12-10 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html fails
https://bugs.webkit.org/show_bug.cgi?id=152144
Reviewed by Alex Christensen.
No new tests (At least two failing tests now pass, and other incorrect tests updated to be more correct).
- An IDBOpenDBRequest resulting in a versionchange transaction should not have the onsuccess event fire if
the database connection was closed during the versionchange transaction. onerror should fire instead.
- When firing an event at an IDBRequest, it should not have the transaction as an additional target if the
transaction has finished.
- When firing an event at an IDBRequest, it should not have the database as an additional target if the
database is closed or is closing.
* Modules/indexeddb/client/IDBDatabaseImpl.h:
(WebCore::IDBClient::IDBDatabase::isClosingOrClosed):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
(WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort): Deleted.
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent): Don't add finished transactions or closed databases as event targets.
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::notifyDidAbort):
(WebCore::IDBClient::IDBTransaction::dispatchEvent): If this was a versionchange transaction completing, possibly fire
the error event on the OpenDBRequest instead of the success event.
* Modules/indexeddb/client/IDBTransactionImpl.h:
(WebCore::IDBClient::IDBTransaction::isFinished):
2015-12-10 Zalan Bujtas <zalan@apple.com>
Simple line layout: Use TextPainter to draw simple line text.
https://bugs.webkit.org/show_bug.cgi?id=152150
Reviewed by Simon Fraser.
No change in functionality.
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
* rendering/TextPainter.h:
2015-12-10 Myles C. Maxfield <mmaxfield@apple.com>
[Font Features] r193894 introduces leaks
https://bugs.webkit.org/show_bug.cgi?id=152154
Reviewed by Joe Pecoraro.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::smallCapsTrueTypeDictionary):
(WebCore::createCTFontWithoutSynthesizableFeatures):
2015-12-10 Myles C. Maxfield <mmaxfield@apple.com>
Build fix
Unreviewed.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::variantCapsSupportsCharacterForSynthesis):
2015-12-10 Zalan Bujtas <zalan@apple.com>
TextPainter: Add support for painting multiple text runs.
https://bugs.webkit.org/show_bug.cgi?id=152148
Reviewed by Simon Fraser.
This is in preparation for adding simple line layout as a client.
No change in functionality.
* rendering/InlineTextBox.cpp:
(WebCore::drawSkipInkUnderline): Decouple underline skipping intersection calculation and text painter.
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintDecoration):
* rendering/InlineTextBox.h:
* rendering/TextPainter.cpp:
(WebCore::TextPainter::TextPainter):
(WebCore::TextPainter::paintTextWithShadows):
(WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
(WebCore::TextPainter::paintText):
(WebCore::TextPainter::dashesForIntersectionsWithRect): Deleted.
* rendering/TextPainter.h:
(WebCore::TextPainter::setTextPaintStyle):
(WebCore::TextPainter::setSelectionPaintStyle):
(WebCore::TextPainter::setIsHorizontal):
(WebCore::TextPainter::setFont):
(WebCore::TextPainter::addEmphasis):
(WebCore::TextPainter::addTextShadow):
2015-12-10 Enrica Casucci <enrica@apple.com>
Change skin tone support for two emoji.
https://bugs.webkit.org/show_bug.cgi?id=152147
rdar://problem/23716993
rdar://problem/23716344
Reviewed by Darin Adler.
Horse race emoji (1F3C7) should no longer have skin tone variation.
Sleuth/Spy emoji (!F575) should instead have skin tone variation.
* platform/text/TextBreakIterator.cpp:
(WebCore::cursorMovementIterator):
2015-12-10 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r193500.
https://bugs.webkit.org/show_bug.cgi?id=152143
do not want to have to disable canvas-to-large-to-draw test
(Requested by bfulgham on #webkit).
Reverted changeset:
"Place an upper bound on canvas pixel count"
https://bugs.webkit.org/show_bug.cgi?id=151825
http://trac.webkit.org/changeset/193500
2015-12-10 Brady Eidson <beidson@apple.com>
Followup for:
Modern IDB: storage/indexeddb/intversion-close-between-events.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152096
Implementing Darin Adler's review feedback that came after the patch landed.
* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::transaction): No need to explicitly cast to Vector<String>.
2015-12-10 Youenn Fablet <youenn.fablet@crf.canon.fr>
JSC Builtins should use safe array methods
https://bugs.webkit.org/show_bug.cgi?id=151501
Reviewed by Darin Adler.
Using @push and @shift in internal arrays in lieu of push and shift.
This cannot be disrupted by user scripts except if arrays are also made accessible to user scripts.
Covered by added tests for ReadableStream constructs.
* Modules/mediastream/RTCPeerConnectionInternals.js:
(runNext):
(enqueueOperation):
* Modules/streams/ReadableStreamInternals.js:
(enqueueInReadableStream):
(readFromReadableStreamReader):
* Modules/streams/StreamInternals.js:
(dequeueValue):
(enqueueValueWithSize):
2015-12-10 Zan Dobersek <zdobersek@igalia.com>
[TexMap] pixel coverage multiplication in TiledBackingStore can overflow
https://bugs.webkit.org/show_bug.cgi?id=152055
Reviewed by Carlos Garcia Campos.
The computation of the pixel coverage in TiledBackingStore can easily overflow
when the candidate size is relatively large (for instance when the backed
layer is transformed in a way that increases its perceived size). This can result
in missing tiles for this specific backing store, at least until the layer in
question is transformed again into a shape that produces a smaller candidate size.
To avoid the integer overflow, the multiplication is done in a safe manner,
defaulting to the max positive value an integer can hold in case the overflow
is detected.
* platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::adjustForContentsRect):
2015-12-10 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Clean up BitmapTexturePool
https://bugs.webkit.org/show_bug.cgi?id=152073
Reviewed by Daniel Bates.
Move BitmapTexturePoolEntry class under the BitmapTexturePool class, renaming
it to simply Entry and keeping it private. Have the constructor take in an
rvalue reference to the RefPtr<BitmapTexture> object. Remove the static
compareTimeLastUsed() function and use a lambda directly in its place.
Remove the default BitmapTexturePool constructor, which isn't used anywhere.
Have the constructor and some methods accept or return RefPtr objects, possibly
via rvalue references. Clean up the header file by removing a few unnecessary
header includes and using forward declarations where possible.
In the BitmapTexturePool implementation file, mark the two const variables as
static. The ::acquireTexture() method now uses the std::find_if() algorithm
to find a fitting Entry object in the Vector. The same method is also moved
upwards so we follow the order of declaration in the header. ::createTexture()
inlines the return of the new expression into the adoptRef() call in the return
statement.
TextureMapperGL constructor is updated to pass a copied RefPtr object into the
BitmapTexturePool constructor.
* platform/graphics/texmap/BitmapTexturePool.cpp:
(WebCore::BitmapTexturePool::BitmapTexturePool):
(WebCore::BitmapTexturePool::acquireTexture):
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
(WebCore::BitmapTexturePool::createTexture):
* platform/graphics/texmap/BitmapTexturePool.h:
(WebCore::BitmapTexturePool::Entry::Entry):
(WebCore::BitmapTexturePool::Entry::markUsed):
(WebCore::BitmapTexturePoolEntry::BitmapTexturePoolEntry): Deleted.
(WebCore::BitmapTexturePoolEntry::markUsed): Deleted.
(WebCore::BitmapTexturePoolEntry::compareTimeLastUsed): Deleted.
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::TextureMapperGL):
2015-12-10 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor, et. al. should not clobber state of cached GtkStyleContexts
https://bugs.webkit.org/show_bug.cgi?id=151533
Reviewed by Carlos Garcia Campos.
Remove the style context cache to simplify the code, drastically reduce the number of
expensive save/restore operations performed on style contexts, and avoid unwanted
side-effects in RenderThemeGtk::styleColor. This is also a speculative fix for improper
button rendering with certain custom themes, and a simplification that will make it easier
to fix bug #150550.
This change does have performance implications, which I intend to check on the perf bot
after landing to ensure that removing the cache does not have a significant negative impact
on performance; I have no clue whether this will be a net performance win or loss. However,
this is a bit tricky, because the bot is running GTK+ 3.16, whereas I expect save/restore
might be much more expensive in GTK+ 3.20, and I do not want to make performance decisions
except based on the latest GTK+ due to large changes in the implementation of
GtkStyleContext.
* rendering/RenderThemeGtk.cpp:
(WebCore::createStyleContext):
(WebCore::getStockIconForWidgetType):
(WebCore::getStockSymbolicIconForWidgetType):
(WebCore::RenderThemeGtk::initMediaColors):
(WebCore::RenderThemeGtk::adjustRepaintRect):
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::setCheckboxSize):
(WebCore::RenderThemeGtk::setRadioSize):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeGtk::paintInnerSpinButton):
(WebCore::styleColor):
(WebCore::gtkStyleChangedCallback): Deleted.
(WebCore::styleContextMap): Deleted.
(WebCore::getStyleContext): Deleted.
2015-12-10 Myles C. Maxfield <mmaxfield@apple.com>
font-variant-caps does not work if the font does not support font features
https://bugs.webkit.org/show_bug.cgi?id=149774
Reviewed by Antti Koivisto.
This test implements synthesis for small-caps and all-small-caps. It does so by
moving font variant selection into a higher level (ComplexTextController).
In general, the approach is to use the pure font feature until we encounter
a character which needs to be uppercased, and which the font feature does not
support uppercasing. In this situation, we try again with synthesis. In this
case, synthesis means artificially uppercasing letters and rendering them with
a smaller font.
We require system support to know which glyphs a particular font feature supports.
Therefore, on operating systems which do not include this support, we will simply
say that the font feature does not support any glyphs.
Test: css3/font-variant-small-caps-synthesis.html
css3/font-variant-petite-caps-synthesis.html
* platform/graphics/Font.cpp:
(WebCore::Font::noSmallCapsFont): Return the same font, but without smcp or c2sc.
This function utilizes a cache.
* platform/graphics/Font.h:
(WebCore::Font::variantFont): Small caps should never go through this function
anymore.
* platform/graphics/FontCascade.h: Because we're moving variant selection into
a higher level, we remove the FontVariant argument from the lower-level call.
* platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::glyphDataForVariant): Use early-return style.
(WebCore::FontCascadeFonts::glyphDataForNormalVariant): Ditto.
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::fontForCombiningCharacterSequence): Because we're moving
variant selection into a higher level, we remove the FontVariant argument from
the lower-level call.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::smallCapsSupportsCharacter):
(WebCore::Font::allSmallCapsSupportsCharacter):
(WebCore::smallCapsOpenTypeDictionary): Helper function for
smallCapsSupportsCharacter().
(WebCore::smallCapsTrueTypeDictionary): Ditto.
(WebCore::unionBitVectors):
(WebCore::Font::glyphsSupportedBySmallCaps): Compute a bit vector of supported
glyphs.
(WebCore::Font::glyphsSupportedByAllSmallCaps): Ditto.
(WebCore::createDerivativeFont): Moving common code into its own helper function.
(WebCore::Font::createFontWithoutSmallCaps):
(WebCore::Font::platformCreateScaledFont): Use the common code.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::capitalized): What is the capitalized form of a character?
(WebCore::ComplexTextController::collectComplexTextRuns): Implement the core
logic of this patch. This includes the retry when we encounter a character which
is not supported by the font feature.
* platform/spi/cocoa/CoreTextSPI.h:
2015-12-10 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Remove the TEXMAP_OPENGL_ES_2 define
https://bugs.webkit.org/show_bug.cgi?id=152069
Reviewed by Alex Christensen.
Remove the TEXMAP_OPENGL_ES_2 macro define and clean up the code
that it was (not) guarding.
* platform/graphics/texmap/BitmapTexture.h:
* platform/graphics/texmap/BitmapTextureGL.cpp: Remove the TEXMAP_OPENGL_ES_2
guard. Keep the GL_UNSIGNED_INT_8_8_8_8_REV define for OS(DARWIN), but use
the GraphicsContext3D constants for other values.
(WebCore::BitmapTextureGL::updateContentsNoSwizzle):
(WebCore::BitmapTextureGL::initializeStencil): Remove the TEXMAP_OPENGL_ES_2
guard and default to calling the renderbufferStorage() function with the
GraphicsContext3D::STENCIL_INDEX8 argument.
* platform/graphics/texmap/BitmapTexturePool.h:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperGL.cpp: Remove both the TEXMAP_OPENGL_ES_2
guard and the code it guarded. Because we were defining TEXMAP_OPENGL_ES_2 and not
USE_TEXMAP_OPENGL_ES_2, the guarded defines were always enforced, but they're never
actually used in this file anyway.
2015-12-09 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/objectstore-basics.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152101
Reviewed by Alex Christensen.
No new tests (Multiple tests updated to the new error messaging cover it).
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::putOrAdd): Add plenty of detailed error messaging.
2015-12-09 Zalan Bujtas <zalan@apple.com>
TextPainter: Make before and after selection painting more explicit.
https://bugs.webkit.org/show_bug.cgi?id=152104
Reviewed by Myles C. Maxfield.
Instead of swapping start end end positions and expecting TextPainter::drawTextOrEmphasisMarks()
to recognize it, we call painting with 0 - startPosition and endPosition - length.
No change in functionality.
* rendering/TextPainter.cpp:
(WebCore::TextPainter::drawTextOrEmphasisMarks):
(WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
(WebCore::TextPainter::paintText):
(WebCore::TextPainter::paintEmphasisMarksIfNeeded): Deleted.
(WebCore::TextPainter::paintTextWithStyle): Deleted.
* rendering/TextPainter.h:
2015-12-09 Daniel Bates <dabates@apple.com>
[iOS] Suspend and resume device motion and device orientation updates when page is hidden and visible, respectively
https://bugs.webkit.org/show_bug.cgi?id=151840
<rdar://problem/23753931>
Reviewed by Simon Fraser.
* dom/Document.cpp:
(WebCore::Document::suspendDeviceMotionAndOrientationUpdates): Added.
(WebCore::Document::resumeDeviceMotionAndOrientationUpdates): Added.
(WebCore::Document::platformSuspendOrStopActiveDOMObjects): Moved logic to suspend device motion and
orientation updates from here to Document::suspendDeviceMotionAndOrientationUpdates().
(WebCore::Document::suspendActiveDOMObjects): Modified to call Document::suspendDeviceMotionAndOrientationUpdates().
(WebCore::Document::resumeActiveDOMObjects): Modified to call Document::resumeDeviceMotionAndOrientationUpdates().
* dom/Document.h:
* page/Page.cpp:
(WebCore::Page::setIsVisibleInternal): Suspend device motion and orientation updates when the page is hidden and
resume updates when the page is visible.
(WebCore::Page::suspendDeviceMotionAndOrientationUpdates): Added.
(WebCore::Page::resumeDeviceMotionAndOrientationUpdates): Added.
* page/Page.h:
2015-12-09 Daniel Bates <dabates@apple.com>
Unify iOS Frame::setTimersPaused() logic and Frame::{suspend, resume}ActiveDOMObjectsAndAnimations()
https://bugs.webkit.org/show_bug.cgi?id=152006
Reviewed by Simon Fraser.
Currently we have almost identical logic to suspend and resume a web page for iOS and non-iOS ports.
We should unify this logic instead of duplicating it.
* dom/ActiveDOMObject.h: Remove iOS-specific enumeration DocumentWillBePaused and standardize on
enumerator PageWillBeSuspended.
* dom/Document.cpp:
(WebCore::Document::didBecomeCurrentDocumentInFrame): Unify iOS and non-iOS-specific code.
(WebCore::Document::suspendScheduledTasks): Ignore subsequent calls to this function so long as the reason for
the first invocation was ActiveDOMObject::PageWillBeSuspended. Such a subsequent call may occur as part of
handling a scroll or zoom gesture.
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Ignore subsequent calls to this function
so long as the reason for the first invocation was ActiveDOMObject::PageWillBeSuspended. Such a subsequent
call may occur as part of the process of a page being added to the page cache.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::suspend): Remove case for ActiveDOMObject::DocumentWillBePaused as this
enumerator is being removed.
* page/DOMTimer.cpp:
(WebCore::DOMTimer::install): Write logic that used Frame::timersPaused() terms of
ScriptExecutionContext::activeDOMObjectsAreSuspended() as we are removing Frame::timersPaused().
(WebCore::DOMTimer::fired): Remove iOS-specific assertion with respect to Frame::timersPaused().
This function already asserts the equivalent condition that ScriptExecutionContext::activeDOMObjectsAreSuspended()
evaluates to false. Clean up iOS-specific code that depends on the ScriptExecutionContext being a
Document object by taking advantage of the fact that this assumption is true when shouldBeginObservingChanges
evaluates to true.
* page/Frame.cpp:
(WebCore::Frame::Frame): Remove instance variable m_timersPausedCount and unify the iOS and non-iOS logic.
(WebCore::Frame::suspendActiveDOMObjectsAndAnimations): Standardize on the iOS logic for suspending
DOM objects and animations because it is more comprehensive on what it suspends and works with the deferred
loading machinery (Page::setDefersLoading() - see remarks in Frame::resumeActiveDOMObjectsAndAnimations() for
more details). Specifically, make use of Frame::clearTimers() to suspend non-scripted animations (i.e. non-requestAnimationFrame()
animations), auto-scroll timer, and pending relayouts. And use Document::suspendScheduledTasks() to suspend
all other tasks, including WebSQL database callbacks, active DOM objects, scripted animations and execution of
<script async>/<script defer> JavaScript scripts.
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations): Standardize on the iOS logic for resuming
DOM objects and animations for symmetry and because it works with the deferred loading machinery. We call
Document::resumeScheduledTasks() (which calls Document::resumeActiveDOMObjects()) instead of calling
Document::resumeActiveDOMObjects() directly because the former will ultimately process the queue of pending
tasks (Document::m_pendingTasks).
* page/Frame.h: Remove instance variable m_timersPausedCount.
(WebCore::Frame::timersPaused): Deleted.
* page/ios/FrameIOS.mm:
(WebCore::Frame::setTimersPaused): Write this function in terms of Page::{suspend, resume}ActiveDOMObjectsAndAnimations().
We need to keep this function for Legacy WebKit on iOS.
(WebCore::Frame::setTimersPausedInternal): Deleted.
* rendering/RenderElement.cpp:
(WebCore::shouldRepaintForImageAnimation): Remove iOS-specific code to early return when Frame::timersPaused()
evaluates to true. This function already has the equivalent code to early return when Document::activeDOMObjectsAreSuspended()
evaluates to true.
2015-12-09 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/metadata.html fails
https://bugs.webkit.org/show_bug.cgi?id=152099
Reviewed by Alex Christensen.
Test: storage/indexeddb/modern/abort-objectstore-info.html
And at least one existing failure now passes.
We did not properly reset object store info when version change transactions aborted.
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::IDBObjectStore):
(WebCore::IDBClient::IDBObjectStore::rollbackInfoForVersionChangeAbort):
* Modules/indexeddb/client/IDBObjectStoreImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abort):
2015-12-09 Simon Fraser <simon.fraser@apple.com>
Adjust layer backing store format
https://bugs.webkit.org/show_bug.cgi?id=152097
rdar://problem/23305376
Reviewed by Tim Horton.
Call setBackingStoreFormat() on UIWebView tile grid layers, and on compositing
layers which can allocate backing store.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::setBackingStoreFormat):
(PlatformCALayerCocoa::commonInit):
* platform/ios/LegacyTileGridTile.mm:
(WebCore::setBackingStoreFormat):
(WebCore::LegacyTileGridTile::LegacyTileGridTile):
2015-12-09 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/intversion-close-between-events.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152096
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::transaction): In addition to JSArrays, treat DOMStringLists as a valid string sequence.
2015-12-09 Andreas Kling <akling@apple.com>
[iOS] ResourceUsageOverlay should work on iOS.
<https://webkit.org/b/152021>
Reviewed by Antti Koivisto.
Make ResourceUsageOverlay work on iOS and on Mac desktops with UI-side compositing.
* page/ResourceUsageOverlay.cpp:
(WebCore::ResourceUsageOverlay::initialize): Move the overlay to the top of the view on iOS for now.
* page/ResourceUsageOverlay.h:
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::createColor): Make a custom CGColor factory since we can't use CGColorCreateGenericRGB on iOS.
(WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
(WebCore::ResourceUsageOverlay::platformInitialize): Put the overlay CALayer into a container layer and
hook it up with GraphicsLayer::setContentsToPlatformLayer so it works with all compositing modes.
(WebCore::showText): Move CGContextSaveGState call to the top of the function to preserve everything.
(WebCore::drawGraphLabel):
(WebCore::drawCpuHistory):
(WebCore::drawGCHistory):
(WebCore::ResourceUsageOverlay::platformDraw): Flip the CGContext if needed.
(WebCore::runSamplerThread): Update the layer rects on each thread iteration. This shouldn't be
necessary but it papers over an issue where the containing layer would shrink down to 0x0 and
disappear. Added a FIXME for this.
* platform/spi/cocoa/MachVMSPI.h: Add purgeable VM SPI.
2015-12-09 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/database-closepending-flag.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152095
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
The server-side checks the closepending flag before dispatching the event to the client,
but due to the inherent asynchronous race between server and client, the client needs to
check its closePending flag as well.
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent): Don't fire if m_closePending is set.
2015-12-09 David Hyatt <hyatt@apple.com>
Picture element needs to respond to dynamic viewport changes.
https://bugs.webkit.org/show_bug.cgi?id=152013
<rdar://problem/23766375>
Reviewed by Dean Jackson.
Added new tests in fast/picture.
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::evalCheckingViewportDependentResults):
Add new evaluation method that adds viewport dependent results to a vector. A follow-up patch
will refactor the style resolver code to use this function instead of the special style resolver one, in order to
get rid of the code duplication. Tracked by https://bugs.webkit.org/show_bug.cgi?id=152089.
* css/MediaQueryEvaluator.h:
(WebCore::MediaQueryResult::MediaQueryResult):
* css/StyleResolver.h:
(WebCore::MediaQueryResult::MediaQueryResult): Deleted.
Move MediaQueryResult into a header since it is used in multiple places now and not just by the style
resolver.
* dom/Document.cpp:
(WebCore::Document::evaluateMediaQueryList):
(WebCore::Document::checkViewportDependentPictures):
(WebCore::Document::optimizedStyleSheetUpdateTimerFired):
(WebCore::Document::applyContentDispositionAttachmentSandbox):
(WebCore::Document::addViewportDependentPicture):
(WebCore::Document::removeViewportDependentPicture):
* dom/Document.h:
The document now maintains a HashSet of viewport-dependent pictures, and it checks them whenever the
viewport changes. If their media queries stay the same, then nothing happens. If they change, then
the <picture> will go back and re-check all its <source> elements to see what the new best candidate is.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
Revised to check for viewport dependencies and to cache viewport-dependent results on the <picture> elements.
When a <picture> is found to be viewport-dependent (or not) it is also added to or removed from the document's
set of tracked pictures.
* html/HTMLPictureElement.cpp:
(WebCore::HTMLPictureElement::HTMLPictureElement):
(WebCore::HTMLPictureElement::~HTMLPictureElement):
(WebCore::HTMLPictureElement::didMoveToNewDocument):
(WebCore::HTMLPictureElement::create):
(WebCore::HTMLPictureElement::sourcesChanged):
(WebCore::HTMLPictureElement::viewportChangeAffectedPicture):
* html/HTMLPictureElement.h:
New caching of results and updating of the document HashSet when the picture gets destroyed or moves to
a different document.
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::parseAttribute):
* html/HTMLSourceElement.h:
Cache the media attribute in a parsed form. A follow-up patch will improve the <video>/<audio>
code to make use of this parsed result. Tracked by https://bugs.webkit.org/show_bug.cgi?id=152090.
2015-12-09 Zalan Bujtas <zalan@apple.com>
TextPainter: Rename start and end position to selectionStart and selectionEnd.
https://bugs.webkit.org/show_bug.cgi?id=152088
Reviewed by Myles C. Maxfield.
They actually mean selection start/end.
No change in functionality.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/TextPainter.cpp:
(WebCore::TextPainter::TextPainter):
(WebCore::TextPainter::paintText):
* rendering/TextPainter.h:
2015-12-09 Joanmarie Diggs <jdiggs@igalia.com>
AX: [GTK] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
https://bugs.webkit.org/show_bug.cgi?id=152070
Reviewed by Mario Sanchez Prada.
Map the element to WebCore AccessibilityRole DivRole for GTK. This is being
done in the shared layer rather than in the platform layer because we want all
subsequent logic to treat anonymous render block flow elements as divs.
No new tests. We already have sufficient test coverage. The expectations
been updated accordingly.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2015-12-09 Keith Rollin <krollin@apple.com>
form.elements should reflect the element ordering after the HTML tree builder algorithm
https://bugs.webkit.org/show_bug.cgi?id=148870
rdar://problem/22589879
Reviewed by Ryosuke Niwa.
form.elements should return form-associated elements in tree order.
However, when presented with an HTML fragment like the following,
forms.elements is not built in tree order. Instead, the elements
appear in forms.element in the same order they appear in the HTML --
that is in the same order as they are parsed.
<form id=form>
<table>
<tr>
<td><input type="radio" name="radio1" id="r1" value=1></td>
<td><input type="radio" name="radio2" id="r2" value=2></td>
<input type="radio" name="radio0" id="r0" value=0>
</tr>
</table>
</form>
The reason why elements appear in forms.elements in parse order is
because they register themselves with the designated form when they
are created. At this time, they are not in the DOM tree, so the form
can only assume that the element will be appended to the DOM tree,
with the result that it records the elements in the HTML fragment
above as [r1, r2, r0].
However, it's not always the case that the newly-created element will
be appended to the current tree. In the HTML fragment above, the r0
input element is hoised out of the table element. It ends up being the
preceding sibling of the table element, with the result that the
actual tree-order of the input elements is [r0, r1, r2].
Because the problem is due to registering form-associated elements
with the form *before* the elements are added to the DOM tree, the
solution is to defer that registration until afterwards. With the new
element in the tree, the form can now use its current location in the
tree to correctly place the element in form.elements.
Existing tests now pass:
- imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-elements-nameditem-02-html
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::FormAssociatedElement):
(WebCore::FormAssociatedElement::insertedInto):
(WebCore::FormAssociatedElement::removedFrom):
(WebCore::FormAssociatedElement::formRemovedFromTree):
(WebCore::FormAssociatedElement::formWillBeDestroyed):
* html/FormAssociatedElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
* html/HTMLImageElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::HTMLObjectElement):
2015-12-09 Gwang Yoon Hwang <yoon@igalia.com>
[ThreadedCompositor] Support HTML5 Video
https://bugs.webkit.org/show_bug.cgi?id=143301
Reviewed by Žan Doberšek.
This patch implements HTML5 Video supports in Threaded Compositor.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
Added to support GStreamer GL by ensuring unmapping of the swapped
GstVideoFrame performed at GStreamer GL's gl thread.
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
Modified to upload decoded frame to the given texture instead of
creating a texture itself because we should use a texture from the
proxy when we are using the threaded compositor.
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
Implements two ways to send a texture from GStreamer to the compositor.
1. If we are not using GStreamer GL, we are going to acquire a free texture
from a TextureMapperPlatformLayerProxy and upload the decoded frame to the
texture. This should be done at the compositing thread because we
don't have a Gst's GL thread.
2. If we are using GStreamer GL, we map a texture for the given frame
and passes it to the compositing thread. The mapped frame will be
freed if it is swapped out or the layer is removed.
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
Modified to aquire a new texture itself.
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
Adds a way to pass a function to the compositing thread to allocate /
upload textures at the compositing thread.
2015-12-09 Xabier Rodriguez Calvar <calvaris@igalia.com>
[Streams API] pipeThrough test failing
https://bugs.webkit.org/show_bug.cgi?id=152061
Reviewed by Youenn Fablet.
Test: imported/w3c/web-platform-tests/streams-api/readable-streams/pipe-through.html
* Modules/streams/ReadableStream.js:
(pipeThrough): Mimic destructuring for the streams parameter.
2015-12-09 Frederic Wang <fred.wang@free.fr>
Bad position of large operators inside an munderover element
https://bugs.webkit.org/show_bug.cgi?id=151916
Reviewed by Alejandro G. Castro.
Test: mathml/opentype/large-operators-munderover.html
* rendering/mathml/RenderMathMLOperator.h:
(WebCore::RenderMathMLOperator::isVertical): Expose the direction of the operator.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layout): Remove call to horizontal stretching for vertical operators.
2015-12-09 Zan Dobersek <zdobersek@igalia.com>
[TexMap] TextureMapperTiledBackingStore should notify the ImageObserver of the data access
https://bugs.webkit.org/show_bug.cgi?id=152053
Reviewed by Martin Robinson.
TextureMapperTiledBackingStore should call ImageObserver::didDraw() on the Image's
observer after updating the tile with the Image's data. This way the CachedImage
(i.e. the observer) can mark the data access with the current timestamp, avoiding
removing the decoded data in the very near future during a cache purge.
* platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
(WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
2015-12-09 Zan Dobersek <zdobersek@igalia.com>
Make MainThreadSharedTimerGtk implementation GLib-specific
https://bugs.webkit.org/show_bug.cgi?id=152044
Reviewed by Carlos Garcia Campos.
MainThreadSharedTimerGtk has implementation that only directly depends
on GLib, and not GTK+. Because of that it can be moved under
Source/WebCore/platform/glib and slightly renamed.
* PlatformGTK.cmake:
* platform/glib/MainThreadSharedTimerGLib.cpp: Renamed from Source/WebCore/platform/gtk/MainThreadSharedTimerGtk.cpp.
(WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
(WebCore::MainThreadSharedTimer::setFireInterval):
(WebCore::MainThreadSharedTimer::stop):
(WebCore::MainThreadSharedTimer::invalidate):
* platform/gtk/MainThreadSharedTimerGtk.cpp:
(WebCore::MainThreadSharedTimer::MainThreadSharedTimer): Deleted.
(WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
(WebCore::MainThreadSharedTimer::stop): Deleted.
(WebCore::MainThreadSharedTimer::invalidate): Deleted.
2015-12-09 Zan Dobersek <zdobersek@igalia.com>
[TextureMapper] TextureMapperShaderProgram::setMatrix() should use TransformationMatrix::FloatMatrix4
https://bugs.webkit.org/show_bug.cgi?id=152042
Reviewed by Martin Robinson.
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::setMatrix): Instead of manually writing out
the complete matrix in a C array, simply use TransformationMatrix::FloatMatrix4
and fill that via the TransformationMatrix::toColumnMajorFloatArray() method
called on the passed-in TransformationMatrix.
2015-12-09 Zan Dobersek <zdobersek@igalia.com>
[Soup] Attach the SocketStreamHandleSoup write-ready source to the thread-default context
https://bugs.webkit.org/show_bug.cgi?id=152041
Reviewed by Carlos Garcia Campos.
* platform/network/soup/SocketStreamHandleSoup.cpp:
(WebCore::SocketStreamHandle::beginWaitingForSocketWritability): Attach the
write-ready source to the thread-default context, instead of implicitly
relying on the default context for dispatching.
2015-12-09 Zan Dobersek <zdobersek@igalia.com>
[Soup] SocketStreamHandle should call g_source_destroy() on the write-ready source
https://bugs.webkit.org/show_bug.cgi?id=152040
Reviewed by Carlos Garcia Campos.
* platform/network/soup/SocketStreamHandleSoup.cpp:
(WebCore::SocketStreamHandle::stopWaitingForSocketWritability): Instead of
calling the g_source_get_id()-g_source_remove() pair, destroy the source via
the g_source_destroy() call. Also use nullptr to clear out the pointer
variable.
2015-12-09 Zan Dobersek <zdobersek@igalia.com>
Make AudioBusGtk implementation GLib-specific
https://bugs.webkit.org/show_bug.cgi?id=152049
Reviewed by Philippe Normand.
AudioBusGtk only depends on GLib, so it should be moved to
Source/WebCore/platform/audio/glib and the implementation file
renamed to AudioBusGLib.cpp.
The hard-coded webkitgtk path component can be addressed later.
* PlatformGTK.cmake: Update the build target.
* platform/audio/glib/AudioBusGLib.cpp: Renamed from Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp.
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource): Deleted.
2015-12-09 Joanmarie Diggs <jdiggs@igalia.com>
AX: [EFL] Consider deferring to WebCore Accessibility for table exposure
https://bugs.webkit.org/show_bug.cgi?id=144898
Reviewed by Darin Adler.
Stop unconditionally exposing all HTMLTableElement nodes as AccessibilityTables
for WebKitEfl.
No new tests. Several existing tests already cover table exposure. They have
been updated accordingly.
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
2015-12-08 Simon Fraser <simon.fraser@apple.com>
Convert resetAnimValToBaseVal take a reference to a SVGAnimatedType
https://bugs.webkit.org/show_bug.cgi?id=152036
Reviewed by Zalan Bujtas.
Change resetAnimValToBaseVal() to take a reference at the last argument.
* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::resetAnimatedType):
* svg/SVGAnimatedAngle.cpp:
(WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedAngle.h:
* svg/SVGAnimatedBoolean.cpp:
(WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedBoolean.h:
* svg/SVGAnimatedColor.h:
* svg/SVGAnimatedEnumeration.cpp:
(WebCore::SVGAnimatedEnumerationAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedEnumeration.h:
* svg/SVGAnimatedInteger.cpp:
(WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedInteger.h:
* svg/SVGAnimatedIntegerOptionalInteger.cpp:
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedIntegerOptionalInteger.h:
* svg/SVGAnimatedLength.cpp:
(WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedLength.h:
* svg/SVGAnimatedLengthList.cpp:
(WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedLengthList.h:
* svg/SVGAnimatedNumber.cpp:
(WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedNumber.h:
* svg/SVGAnimatedNumberList.cpp:
(WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedNumberList.h:
* svg/SVGAnimatedNumberOptionalNumber.cpp:
(WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedNumberOptionalNumber.h:
* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedPath.h:
* svg/SVGAnimatedPointList.cpp:
(WebCore::SVGAnimatedPointListAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedPointList.h:
* svg/SVGAnimatedPreserveAspectRatio.cpp:
(WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedPreserveAspectRatio.h:
* svg/SVGAnimatedRect.cpp:
(WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedRect.h:
* svg/SVGAnimatedString.cpp:
(WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedString.h:
* svg/SVGAnimatedTransformList.cpp:
(WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedTransformList.h:
* svg/SVGAnimatedTypeAnimator.h:
(WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
(WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):
2015-12-08 Myles C. Maxfield <mmaxfield@apple.com>
Remove Mavericks-specific code from FontCacheMac
https://bugs.webkit.org/show_bug.cgi?id=152030
Reviewed by Simon Fraser.
Mavericks is no longer a supported platform.
No new tests because there is no behavior change.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::platformLookupFallbackFont):
(WebCore::platformFontWithFamilySpecialCase): Deleted.
2015-12-08 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/objectstore-cursor.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152023
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::MemoryObjectStoreCursor):
(WebCore::IDBServer::MemoryObjectStoreCursor::setReverseIteratorFromRemainingRange): Make sure the
found iterator is actually in the target range.
2015-12-08 Jer Noble <jer.noble@apple.com>
Changing <video> src during 'ended' event can leave screen sleep disabled
https://bugs.webkit.org/show_bug.cgi?id=152018
Reviewed by Eric Carlson.
Resetting a HTMLMediaElement's src during 'ended' introduces a race condition: whether
the 'mediaPlayerRateChanged()' notification will fire before createMediaPlayer() destroys
the old MediaPlayer firing said notification.
To break the race condition, always update the sleep disabling assertion after destroying
the media player (by creating a new one).
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createMediaPlayer):
2015-12-08 Brady Eidson <beidson@apple.com>
Modern IDB: Fire blocked events for delete requests that are blocked.
https://bugs.webkit.org/show_bug.cgi?id=152015
Reviewed by Alex Christensen.
No new tests (Previous failing tests now pass, and previously timing-out tests now complete).
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
(WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2015-12-08 Brady Eidson <beidson@apple.com>
Modern IDB: Fire blocked events for upgrade requests that are blocked.
https://bugs.webkit.org/show_bug.cgi?id=152007
Reviewed by Alex Christensen.
Test: storage/indexeddb/modern/blocked-open-db-requests.html
And some that used to fail now pass.
And some that used to timeout now complete.
* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::notifyOpenDBRequestBlocked):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::IDBDatabase):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::requestBlocked):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent):
* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::notifyOpenDBRequestBlocked):
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): When a request that would
result in a version change transaction is blocked by open connections, notify it.
* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::notifyOpenDBRequestBlocked):
* Modules/indexeddb/shared/InProcessIDBServer.h:
2015-12-08 Per Arne Vollan <peavo@outlook.com>
[WinCairo] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=152008
Reviewed by Brent Fulgham.
GLuint is undefined.
* platform/graphics/GraphicsContext3D.h:
2015-12-08 Zalan Bujtas <zalan@apple.com>
Light cleanup in TextPainter.
https://bugs.webkit.org/show_bug.cgi?id=151994
Reviewed by Darin Adler.
No change in functionality.
* rendering/TextPainter.cpp:
(WebCore::TextPainter::TextPainter):
* rendering/TextPainter.h: Address post review comment.
(WebCore::ShadowApplier::isLastShadowIteration):
(WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):
2015-12-08 Zalan Bujtas <zalan@apple.com>
Do not insert positioned renderers to multiple gPositionedDescendantsMap.
https://bugs.webkit.org/show_bug.cgi?id=151878
rdar://problem/22229889
Reviewed by Simon Fraser.
We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
This static map is at block level. A particular absolute positioned object is added to its closest ancestor that
returns true for RenderElement::canContainAbsolutelyPositionedObjects().
canContainAbsolutelyPositionedObjects() returns true if the ancestor is either positioned or has transform.
If this container's style changes so that it's no longer positioned and it has no transform anymore,
we need to clear its static map of positioned objects (they'll get re-inserted to another ancestor at next layout).
This patch addresses the case when the renderer does not have transforms anymore.
Test: fast/block/positioning/crash-when-transform-is-removed.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleWillChange):
2015-12-08 Eric Carlson <eric.carlson@apple.com>
[MediaStream] Rename UserMediaClient and UserMediaController methods
https://bugs.webkit.org/show_bug.cgi?id=152001
Reviewed by Brady Eidson.
No new tests, no behavior change.
* Modules/mediastream/UserMediaClient.h:
(WebCore::UserMediaClient::~UserMediaClient):
* Modules/mediastream/UserMediaController.h:
(WebCore::UserMediaController::client):
(WebCore::UserMediaController::from):
(WebCore::UserMediaController::requestUserMediaAccess):
(WebCore::UserMediaController::cancelUserMediaAccessRequest):
(WebCore::UserMediaController::requestPermission): Deleted.
(WebCore::UserMediaController::cancelRequest): Deleted.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::constraintsValidated):
(WebCore::UserMediaRequest::contextDestroyed):
* platform/mock/UserMediaClientMock.h:
2015-12-08 Jer Noble <jer.noble@apple.com>
[iOS] Do not exit fullscreen mode during auto-PiP.
https://bugs.webkit.org/show_bug.cgi?id=151889
Reviewed by Darin Adler.
When auto-PiPing, do not exit fullscreen mode, as that causes a two-step animation upon returing from auto-PiP.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::applicationDidBecomeActive): Handle the case where we open Safari after an
auto-PiP by clicking on a link; if so, hide the fullscreen window.
(WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture): Do not exit fullscreen during auto-PiP.
(WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Ditto.
2015-12-08 Per Arne Vollan <peavo@outlook.com>
[WinCairo] Remove unneeded function.
https://bugs.webkit.org/show_bug.cgi?id=151989
Reviewed by Brent Fulgham.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::createOptimalVideoType):
(MFCreateMediaType): Deleted.
2015-12-08 Jer Noble <jer.noble@apple.com>
[iOS] Adopt WebFullScreenVideoRootViewController.
https://bugs.webkit.org/show_bug.cgi?id=151996
Reviewed by Dan Bernstein.
Adopt WebFullScreenVideoRootViewController from WebKitAdditions. If it is not available, create and use
a generic UIViewController subclass.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(createFullScreenVideoRootViewControllerClass):
(allocWebFullScreenVideoRootViewControllerInstance):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
2015-12-08 Andy Estes <aestes@apple.com>
ImmutableNFANodeBuilder's move constructor moves an uninitialized member variable into itself
https://bugs.webkit.org/show_bug.cgi?id=151982
Reviewed by Darin Adler.
* contentextensions/ImmutableNFANodeBuilder.h:
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder):
2015-12-08 Andreas Kling <akling@apple.com>
[Cocoa] ResourceUsageOverlay should query kernel for VM page size.
<https://webkit.org/b/151920>
Reviewed by Andy Estes.
Read the vm.pagesize sysctl to find the correct page size for memory usage calculations.
This fixes broken math on systems that have different hw.pagesize and vm.pagesize.
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::vmPageSize):
(WebCore::pagesPerVMTag):
(WebCore::runSamplerThread):
2015-12-08 Chris Dumez <cdumez@apple.com>
Add diagnostic logging to measure speculative revalidation accuracy
https://bugs.webkit.org/show_bug.cgi?id=151953
<rdar://problem/23092196>
Reviewed by Darin Adler.
Add diagnostic logging to measure speculative revalidation accuracy.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::entryRightlyNotWarmedUpKey):
(WebCore::DiagnosticLoggingKeys::entryWronglyNotWarmedUpKey):
(WebCore::DiagnosticLoggingKeys::successfulSpeculativeWarmupWithRevalidationKey):
(WebCore::DiagnosticLoggingKeys::successfulSpeculativeWarmupWithoutRevalidationKey):
(WebCore::DiagnosticLoggingKeys::unknownEntryRequestKey):
(WebCore::DiagnosticLoggingKeys::wastedSpeculativeWarmupWithRevalidationKey):
(WebCore::DiagnosticLoggingKeys::wastedSpeculativeWarmupWithoutRevalidationKey):
* page/DiagnosticLoggingKeys.h:
2015-12-08 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/index-cursor.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151973
Reviewed by Darin Adler.
No new tests (At least one failing test now passes).
* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor): When the initial cursor creation
generates an iterator outside of the cursor's IDBKeyRange, invalidate the iterator.
2015-12-08 Joanmarie Diggs <jdiggs@igalia.com>
[EFL] some ax tests have been failed since r186692
https://bugs.webkit.org/show_bug.cgi?id=146887
Reviewed by Mario Sanchez Prada.
The tests were failing because there are now two WebCore accessibility
roles which need to implement the AtkTable interface: TableRole and
GridRole. Because the latter was not added in r186692, any tests with
ARIA role grid that accessed cells via coordinates stopped working.
No new tests; instead unskipped all the broken table tests which now pass.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):
2015-12-08 Gwang Yoon Hwang <yoon@igalia.com>
[ThreadedCompositor] Add support for Cairo GL-backed ImageBuffer.
https://bugs.webkit.org/show_bug.cgi?id=151986
Reviewed by Žan Doberšek.
This patch adds a support for accelerated 2d canvas which uses cairo-gl as its
backend to the threaded compositor. Basically, it applies same way to support
WebGL for the threaded compositor.
Unfortunately, we cannot swap the buffer for the accelerated 2d canvas because
it should preserve the buffer of the previous frame when drawing new contents.
Because of that, the surface of the accelerated 2d canvas will be copied for
each frame.
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::ImageBufferData):
(WebCore::ImageBufferData::createCompositorBuffer): Prepare a texture
surface to push the rendered result to the compositing thread.
(WebCore::ImageBufferData::swapBuffersIfNeeded): Copies the contents
of the canvas's surface to the compositing texture.
(WebCore::ImageBufferData::createCairoGLSurface): Moved to the inside
of ImageBufferData.
2015-12-08 Joanmarie Diggs <jdiggs@igalia.com>
[GTK] 15 accessibility tests fail since r186692.
https://bugs.webkit.org/show_bug.cgi?id=148938
Reviewed by Mario Sanchez Prada.
Failing tests rebaselined.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole): Treat GridCellRole and CellRole the same.
(roleIsTextType): Treat GridCellRole and CellRole the same.
2015-12-08 Frederic Wang <fred.wang@free.fr>
[cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
https://bugs.webkit.org/show_bug.cgi?id=151947
Reviewed by Martin Robinson.
Test: mathml/presentation/radical-bar-visibility.html
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLine): Force a minimal thickness of 1px
2015-12-08 Gwang Yoon Hwang <yoon@igalia.com>
[ThreadedCompositor] Support WebGL for OpenGL.
https://bugs.webkit.org/show_bug.cgi?id=143300
Reviewed by Žan Doberšek.
To remove pixel transfer operation, this patch adds m_compositorFBO which uses same depth and stencil
buffer with m_fbo but uses m_compositorTexture as a color attachment in GraphicsContext3D.
Because switching target framebuffer is cheaper than pixel transfer operation and switching color
attachment of m_fbo. In Threaded Compositor, when WebGL renders a scene, prepareTexture swaps
m_fbo with m_compositorFBO and send the color attachment to the compositor thread.
This patch only supports WebGL for OpenGL. OpenGLES will be covered in following-up patches.
No new tests needed.
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::proxy):
(WebCore::GraphicsContext3DPrivate::swapBuffersIfNeeded):
Implement interfaces to pass a rendered texture to the compositing
thread.
* platform/graphics/GraphicsContext3DPrivate.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
Create additional compositing texture and FBO to swaping buffers for
threaded compositor.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
Split attaching depth and stencil buffer codes from reshapeFBOs
to make complete framebuffer with not only m_fbo but m_compositorFBO also.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture):
If we are in the threaded compositor, we will swap m_fbo with
m_compositorFBO instead of copying it.
2015-12-07 Zalan Bujtas <zalan@apple.com>
Make paintTextWithShadows a member function (TextPainter).
https://bugs.webkit.org/show_bug.cgi?id=151979
Reviewed by Simon Fraser.
This patch also simplifies paintTextWithShadows and
rearranges some of the functions' arguments.
No change in functionality.
* rendering/TextPainter.cpp:
(WebCore::TextPainter::drawTextOrEmphasisMarks):
(WebCore::TextPainter::paintTextWithShadows):
(WebCore::TextPainter::paintEmphasisMarksIfNeeded):
(WebCore::TextPainter::paintTextWithStyle):
(WebCore::TextPainter::paintText):
(WebCore::drawTextOrEmphasisMarks): Deleted.
(WebCore::paintTextWithShadows): Deleted.
* rendering/TextPainter.h:
2015-12-07 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/factory-deletedatabase.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151966
Reviewed by Sam Weinig.
No new tests (At least one failing test now passes).
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::onDeleteDatabaseSuccess): The spec says that the result of
deleteDatabase should be undefined. Without explicitly making it undefined, it's incorrectly null.
2015-12-07 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/cursor-continue-validity.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151961
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
When an index cursor's iterator was invalidated, there were some cases where it did
not correctly find the next iterator to pick up where it left off.
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::update):
(WebCore::IDBClient::IDBCursor::deleteFunction):
* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::find):
(WebCore::IDBServer::IndexValueStore::loggingString):
* Modules/indexeddb/server/IndexValueStore.h:
2015-12-07 Zalan Bujtas <zalan@apple.com>
Refactor TextPainter::paintText() into sub methods.
https://bugs.webkit.org/show_bug.cgi?id=151962
Reviewed by Myles C. Maxfield.
No change in functionality.
* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextWithEmphasisIfNeeded):
(WebCore::TextPainter::paintTextWithStyle):
(WebCore::TextPainter::paintText):
* rendering/TextPainter.h:
2015-12-07 Gwang Yoon Hwang <yoon@igalia.com>
[GTK] Clean up virtual functions in MediaPlayerPrivateGStreamerBase
https://bugs.webkit.org/show_bug.cgi?id=151940
Reviewed by Carlos Garcia Campos.
- Using 'override' when appropriate
- Explicitly marking methods as virtual when they are inherently virtual
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2015-12-07 Saam barati <sbarati@apple.com>
Add op_watchdog opcode that is generated when VM has a watchdog
https://bugs.webkit.org/show_bug.cgi?id=151954
Reviewed by Mark Lam.
No new tests because JSC already has tests for this.
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::scheduleExecutionTermination):
(WebCore::WorkerScriptController::isTerminatingExecution):
2015-12-07 Brian Burg <bburg@apple.com>
Web Inspector: Uncaught Exception page should have better styles and handle more error cases
https://bugs.webkit.org/show_bug.cgi?id=151923
Reviewed by Timothy Hatcher.
Add a check for InspectorFrontendAPI before calling it. This can fail
easily if an uncaught exception stalls initial loading, or whenever
the Inspector frontend is reloaded.
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
2015-12-07 Beth Dakin <bdakin@apple.com>
Hook up request and show for typing candidates in WK1
https://bugs.webkit.org/show_bug.cgi?id=151831
-and corresponding-
<rdar://problem/23751214>
Reviewed by Enrica Casucci.
New SPI that is needed.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSSpellCheckerSPI.h: Added.
Request candidates for editable content whenever selection changes.
* editing/Editor.cpp:
(WebCore::Editor::respondToChangedSelection):
Implement requestCandidatesForSelection on the EditorClient.
* loader/EmptyClients.h:
* page/EditorClient.h:
(WebCore::EditorClient::requestCandidatesForSelection):
2015-12-07 Brady Eidson <beidson@apple.com>
Modern IDB: Fix "old versions" when upgrading databases.
https://bugs.webkit.org/show_bug.cgi?id=151948
Reviewed by Alex Christensen.
No new tests (5 failing tests now pass, and updated results for a 6th test).
This includes the old version on the IDBVersionChangeEvent, as well as the version the
IDBDatabase is left with if the version change transaction is aborted.
Primary mechanism of the fix is to include the original IDBDatabaseInfo along with
IDBTransactionInfos that represent version change transactions.
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::willAbortTransaction):
(WebCore::IDBClient::IDBDatabase::didAbortTransaction):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::IDBTransaction): Deleted.
(WebCore::IDBClient::IDBTransaction::finishAbortOrCommit): Deleted.
* Modules/indexeddb/client/IDBTransactionImpl.h:
(WebCore::IDBClient::IDBTransaction::info):
(WebCore::IDBClient::IDBTransaction::originalDatabaseInfo):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
* Modules/indexeddb/shared/IDBTransactionInfo.cpp:
(WebCore::IDBTransactionInfo::versionChange):
(WebCore::IDBTransactionInfo::IDBTransactionInfo):
(WebCore::IDBTransactionInfo::isolatedCopy):
* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::originalDatabaseInfo):
2015-12-07 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
Update Objective-C code generator to pass a reference to calling object for partial interfaces
https://bugs.webkit.org/show_bug.cgi?id=151739
Reviewed by Darin Adler.
The fix updates the Objective-C code generator to pass a reference to calling object for partial interfaces.
The change from pass by pointer to pass by reference was introduced in r192849.
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/test/ObjC/DOMTestInterface.mm:
(-[DOMTestInterface supplementalStr1]):
(-[DOMTestInterface supplementalStr2]):
(-[DOMTestInterface setSupplementalStr2:]):
(-[DOMTestInterface supplementalStr3]):
(-[DOMTestInterface setSupplementalStr3:]):
(-[DOMTestInterface supplementalNode]):
(-[DOMTestInterface setSupplementalNode:]):
(-[DOMTestInterface builtinAttribute]):
(-[DOMTestInterface setBuiltinAttribute:]):
(-[DOMTestInterface supplementalMethod1]):
(-[DOMTestInterface supplementalMethod2:objArg:]):
(-[DOMTestInterface supplementalMethod3]):
(-[DOMTestInterface supplementalMethod4]):
(-[DOMTestInterface builtinFunction]):
2015-12-07 Chris Dumez <cdumez@apple.com>
Crash in MemoryCache::pruneDeadResourcesToSize()
https://bugs.webkit.org/show_bug.cgi?id=151833
<rdar://problem/22392235>
Reviewed by David Kilzer.
MemoryCache::pruneDeadResourcesToSize() is iterating over m_allResources
(which is a vector of LRUList). It first destroys decoded data for each
resource in the LRUList. Then, if it does not suffice to reach the
target size, and starts actually removing resources from the cache.
The issue is that this code alters m_allResources (and its LRULists) as
it is iterating over it. We tried to deal with this in various ways:
1. Increment the iterator before removing the resource pointed by the
iterator.
2. Protect the next resource in the LRUList and abort early if it is no
longer in the cache.
This adds code complexity and apparently does not correctly handle all
the edge cases as we still see crashes in this code. In particular, I
suspect that 2. may not be sufficient if it is possible for the next
resource to be moved to another LRUList (in which case, next->inCache()
would still return true but the iterator would however become invalid).
To make the code simpler and more robust, this patch copies the LRUList
(and refs the CachedResources) before iterating over it. This is a lot
safer and should hopefully fix the crashes we see in this function.
No new tests, no reproduction case.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneDeadResourcesToSize):
2015-12-07 Brady Eidson <beidson@apple.com>
Modern IDB: Add some more custom exception messages, passing some more tests..
https://bugs.webkit.org/show_bug.cgi?id=151912
Reviewed by Andy Estes.
No new tests (Covered by existing tests).
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::index):
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::objectStore):
2015-12-07 Gwang Yoon Hwang <yoon@igalia.com>
[ThreadedCompositor] Add support for PlatformLayer.
https://bugs.webkit.org/show_bug.cgi?id=143299
Reviewed by Žan Doberšek.
This patch implements TextureMapperPlatformLayerProxy and TextureMapperPlatformLayerBuffer to
send a texture (actual texture or BitmapTexture) to the compositing thread directly.
Platform layer renderers should implement TextureMapperPlatformLayerProxyProvider to establish
a connection to the compositing thread. After the connection has been established, the renderer
can render its contents to the TextureMapperPlatformLayerBuffer and pass it to the compositing thread
via TextureMapperPlatformLayer proxy.
The buffer can be an unmanaged texture (a.k.a. platform texture) or BitmapTexture.
For the unmanaged texture, the renderer should manage its life cycle itself. For the BitmapTexture,
it will be managed by TextureMapperPlatformLayerProxy. In that case, used (swapped) buffer will be
recycled because the renderer will use same size and format until it changes its size.
No new tests needed.
* PlatformGTK.cmake:
Adds TextureMapperPlatformLayerBuffer and TextureMapperPlaytformLayerProxy.
* platform/graphics/GraphicsContext3DPrivate.cpp:
* platform/graphics/GraphicsContext3DPrivate.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/cairo/ImageBufferDataCairo.h:
Adds mock implementation.
* platform/graphics/PlatformLayer.h:
Adds TextureMapperPlatformLayerProxyProvider as a PlatformLayer for the Threaded Compositor
* platform/graphics/texmap/BitmapTextureGL.h:
(WebCore::BitmapTextureGL::internalFormat): Adds a getter to check the
internal format of texture to check reusability.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
* platform/graphics/texmap/TextureMapperLayer.h:
Exclude GraphicsLayerTextureMapper from build when we are using Coordinated Graphics.
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: Added.
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: Added.
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: Added.
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.h: Added.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::GraphicsLayer::create):
Because we removed GraphicsLayerTextureMapper from build, we need to add own factory function.
(WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::platformLayerWillBeDestroyed):
(WebCore::CoordinatedGraphicsLayer::setPlatformLayerNeedsDisplay):
Implements sync operations for TextureMapperPlatformLayerProxy
2015-12-07 Gwang Yoon Hwang <yoon@igalia.com>
Fix GTK+ build with GStreamer GL
https://bugs.webkit.org/show_bug.cgi?id=151939
Reviewed by Žan Doberšek.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::drawCallback):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2015-12-06 Simon Fraser <simon.fraser@apple.com>
Show more information about SVG renderers in showLayerTree() output
https://bugs.webkit.org/show_bug.cgi?id=151930
Reviewed by Zalan Bujtas.
In showLayerTree() output, for SVG renderers show:
- visual and layout overflow, for boxes
- frame rect, for boxes
- layout state
- class and id
* rendering/RenderLayer.cpp:
(WebCore::showLayerTree):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::writeDebugInfo): New function to share dumping with svg output.
(WebCore::write):
* rendering/RenderTreeAsText.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writePositionAndStyle): Show the frameRect for boxes (e.g. RenderSVGRoot).
Much more useful that showing the clippedOverflowRect.
(WebCore::writeStandardPrefix):
(WebCore::writeChildren):
(WebCore::writeSVGResourceContainer):
(WebCore::writeSVGContainer):
(WebCore::write):
(WebCore::writeSVGText):
(WebCore::writeSVGInlineText):
(WebCore::writeSVGImage):
(WebCore::writeSVGGradientStop):
(WebCore::writeResources):
(WebCore::operator<<): Deleted.
* rendering/svg/SVGRenderTreeAsText.h:
2015-12-06 Simon Fraser <simon.fraser@apple.com>
Clipping along compositing borders in svg-edit
https://bugs.webkit.org/show_bug.cgi?id=151791
Reviewed by Zalan Bujtas.
RenderSVGRoot::layout() failed to clear overflow before recomputing
visual overflow, which could cause it to get stuck with stale overflow.
This would cause underpainting if its size went from small to large.
Test: svg/overflow/visual-overflow-change.html
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
2015-12-06 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r187121): Can't get to the main content of the page at https://theintercept.com/drone-papers/
https://bugs.webkit.org/show_bug.cgi?id=151849
rdar://problem/23132828
Reviewed by Zalan Bujtas.
This page uses a fill-forwards animation where the last keyframe has height: auto.
After r187121, we tried to blend the height Length value from the last keyframe to the
first keyframe with progress=0 (which should pick up the 'auto' from the last keyframe).
However, Length::blend() just considered both 0 and 'auto' to be zero, and returned
the 0 length.
So fix Length::blend() to return the "from" length if progress is zero.
Test: animations/fill-forwards-auto-height.html
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc): Length::blend takes a double, so don't narrow to float.
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): Declare two variables
at first use.
* platform/Length.h:
(WebCore::Length::blend):
2015-12-06 Simon Fraser <simon.fraser@apple.com>
Give SVGTransformList some inline vector capacity
https://bugs.webkit.org/show_bug.cgi?id=151644
Reviewed by Andreas Kling.
Giving SVGTransformList inline capacity of one drops time under SVGTransformList::parse() by
about 1% on http://animateplus.com/demos/stress-test/
* svg/SVGTransformList.h:
2015-12-06 Zalan Bujtas <zalan@apple.com>
Addressing post-review comments on r193374.
Reviewed by Antti Koivisto.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForText):
(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList):
(WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
2015-12-04 Myles C. Maxfield <mmaxfield@apple.com>
Remove CORETEXT_WEB_FONTS
https://bugs.webkit.org/show_bug.cgi?id=151891
Reviewed by Simon Fraser.
The only platform where this was turned off (Mavericks) is no longer supported.
No new tests because there is no behavior difference.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformCreateScaledFont): Deleted.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::registeredFont):
(WebCore::FontPlatformData::ctFont):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Deleted.
(WebCore::createFontCustomPlatformData): Deleted.
* platform/graphics/mac/FontCustomPlatformData.h:
(WebCore::FontCustomPlatformData::FontCustomPlatformData): Deleted.
* platform/text/TextFlags.h:
2015-12-04 Zalan Bujtas <zalan@apple.com>
Garbage in page tiles when document is too long.
https://bugs.webkit.org/show_bug.cgi?id=151906
rdar://problem/23695858
Reviewed by Simon Fraser.
This patch partially fixes the broken concept(webkit.org/b/151908) of having a nearlyMax/2 sized rectangle to define infiniteness.
(see LayoutRect::infiniteRect() and ClipRect::isInfinite())
Covered by existing test.
* rendering/ClipRect.h: Branch for infinite clipping.
(WebCore::ClipRect::intersect):
(WebCore::ClipRect::intersects):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect): Do not clip when clipping is infinite.
(WebCore::RenderLayer::restoreClip):
(WebCore::RenderLayer::calculateClipRects):
2015-12-04 Brady Eidson <beidson@apple.com>
Modern IDB: Add some more custom exception messages, passing some more tests.
https://bugs.webkit.org/show_bug.cgi?id=151898
Reviewed by Alex Christensen.
No new tests (Some failing tests now pass).
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::objectStore):
2015-12-04 Brent Fulgham <bfulgham@apple.com>
Place an upper bound on canvas pixel count
https://bugs.webkit.org/show_bug.cgi?id=151825
<rdar://problem/23324916>
Reviewed by Simon Fraser.
Malformed JavaScript can attempt to create lots of canvas contexts. Limit the amount of memory
we will use for this purpose to some percentage of system RAM.
* html/HTMLCanvasElement.cpp:
(WebCore::removeFromActivePixelMemory): Added helper function
(WebCore::HTMLCanvasElement::~HTMLCanvasElement): Call new 'releaseImageBufferAndContext' method
to ensure ImageBuffer and graphics context state are properly cleaned up.
(WebCore::maxActivePixels): Use one quarter of the system RAM, or 1 GB (whichever is more) as
an upper bound on active pixel memory.
(WebCore::HTMLCanvasElement::getContext): If we are attempting to create a context that will cause
us to exceed the allowed active pixel count, fail.
(WebCore::HTMLCanvasElement::releaseImageBufferAndContext): Added helper function
(WebCore::HTMLCanvasElement::setSurfaceSize): Use the new 'releaseImageBufferAndContext' method
to handle active pixel memory counts.
(WebCore::HTMLCanvasElement::createImageBuffer): Refuse to create a backing buffer if it will
exceed our available pixel memory.
2015-12-04 Brady Eidson <beidson@apple.com>
Modern IDB: Add some more custom exception messages, passing some more tests.
https://bugs.webkit.org/show_bug.cgi?id=151895
Reviewed by Alex Christensen.
No new tests (Some failing tests now pass).
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::transaction):
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::deleteIndex):
2015-12-04 Jonathan Davis <jond@apple.com>
Update feature status for up-to-date status information.
https://bugs.webkit.org/show_bug.cgi?id=151821
Reviewed by Timothy Hatcher.
* features.json:
2015-12-04 Brady Eidson <beidson@apple.com>
Modern IDB: Flip test expectations around so we only list failures.
https://bugs.webkit.org/show_bug.cgi?id=151880
Reviewed by Alex Christensen.
No new tests (Covered by all existing tests).
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::stop):
(WebCore::IDBClient::IDBRequest::enqueueEvent):
(WebCore::IDBClient::IDBRequest::dispatchEvent):
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
(WebCore::IDBClient::IDBTransaction::hasPendingActivity):
(WebCore::IDBClient::IDBTransaction::stop):
(WebCore::IDBClient::IDBTransaction::enqueueEvent):
(WebCore::IDBClient::IDBTransaction::dispatchEvent):
* Modules/indexeddb/client/IDBTransactionImpl.h:
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyToScriptValue): Protection against a ScriptExecutionContext that no longer has an ExecState.
A full reworking on the binding utilities to prevent this through is covered by b/151890
2015-12-04 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Some fonts cause CTFontCopyAvailableTables() to return nullptr
https://bugs.webkit.org/show_bug.cgi?id=151884
<rdar://problem/23752253>
Reviewed by Brian Burg.
No new tests.
* platform/graphics/opentype/OpenTypeCG.cpp:
(WebCore::OpenType::fontHasMathTable):
2015-12-04 Jer Noble <jer.noble@apple.com>
Unreviewed build-fix; Add new parameter to overloaded createSession() method in MediaPlayerPrivateAVFoundationCF.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
(WebCore::CDMSessionAVFoundationCF::CDMSessionAVFoundationCF):
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2015-12-01 Jer Noble <jer.noble@apple.com>
Adopt AVContentKeySession
https://bugs.webkit.org/show_bug.cgi?id=151221
Reviewed by Eric Carlson.
Adopt a new API for managing key state, AVContentKeySession. Because this necessitates a change
in both the initialization data returned by the needkey event, and passed into the createSession()
method, bump the protocol version number (to 3), and keep supporting the old key management API
for legacy content.
To do so, move most of the implementation of CDMPrivateMediaSourceAVFObjC into a new subclass,
CDMSessionAVStreamSession, and add a new subclass, CDMSessionAVContentKeySession, to support the
new API.
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
(WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC): Moved to implementation file.
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::validKeySystemRE): Support "com.apple.fps.3_x".
(WebCore::CDMPrivateMediaSourceAVFObjC::~CDMPrivateMediaSourceAVFObjC): Invalidate all outstanding sessions.
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Only support "com.apple.fps.3_x" if the AVContentKeySession class is available.
(WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Create an instance of CDMSessionAVContentKeySession if "com.apple.fps.3_x" is specified and AVContentKeySession is available.
(WebCore::CDMPrivateMediaSourceAVFObjC::invalidateSession): Remove session from the list of outstanding sessions.
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Deleted.
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h.
(WebCore::CDMSessionAVContentKeySession::hasContentKeySession): Simple accessor.
(WebCore::toCDMSessionAVContentKeySession): Safe casting.
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: Added.
(-[CDMSessionAVContentKeySessionDelegate initWithParent:]): Simple constructor.
(-[CDMSessionAVContentKeySessionDelegate invalidate]): Remove reference to parent.
(-[CDMSessionAVContentKeySessionDelegate contentKeySession:willProvideKeyRequestInitializationDataForTrackID:]): Pass to parent.
(-[CDMSessionAVContentKeySessionDelegate contentKeySession:didProvideKeyRequestInitializationData:requestHandling:]): Ditto.
(-[CDMSessionAVContentKeySessionDelegate contentKeySessionContentProtectionSessionIdentifierDidChange:]): Ditto.
(WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession): Create the delegate.
(WebCore::CDMSessionAVContentKeySession::~CDMSessionAVContentKeySession): Invalidate the delegate and remove all parsers.
(WebCore::CDMSessionAVContentKeySession::isAvailable): Return true if AVContentKeySession class is available.
(WebCore::CDMSessionAVContentKeySession::generateKeyRequest): Support "keyrelease" message, setting of the certificate, and creating key request object.
(WebCore::CDMSessionAVContentKeySession::releaseKeys): Retrieve keys from storage location.
(WebCore::isEqual): Compares a Uint8Array to a char*.
(WebCore::CDMSessionAVContentKeySession::update): Support "acknowledged" message, "renew" message, and key addition.
(WebCore::CDMSessionAVContentKeySession::addParser): Add the parser to the AVContentKeySession.
(WebCore::CDMSessionAVContentKeySession::removeParser): Remove parser from same.
(WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage): Retrieve key release message from AVContentKeySession.
(WebCore::CDMSessionAVContentKeySession::didProvideContentKeyRequest): Simple setter.
(WebCore::CDMSessionAVContentKeySession::contentKeySession): Lazily create the AVContentKeySession.
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
(WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h.
(WebCore::toCDMSessionAVStreamSession):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm.
(-[CDMSessionAVStreamSessionObserver initWithParent:]): Moved from CDMSessionMediaSourceAVFObjcObserver.
(-[CDMSessionAVStreamSessionObserver contentProtectionSessionIdentifierChanged:]): Ditto.
(WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession): Ditto.
(WebCore::CDMSessionAVStreamSession::~CDMSessionAVStreamSession): Ditto.
(WebCore::CDMSessionAVStreamSession::generateKeyRequest): Ditto.
(WebCore::CDMSessionAVStreamSession::releaseKeys): Ditto.
(WebCore::isEqual): Ditto.
(WebCore::CDMSessionAVStreamSession::update): Ditto.
(WebCore::CDMSessionAVStreamSession::setStreamSession): Ditto.
(WebCore::CDMSessionAVStreamSession::addParser): Ditto.
(WebCore::CDMSessionAVStreamSession::removeParser): Ditto.
(WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage): Ditto.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
(WebCore::CDMSessionMediaSourceAVFObjC::invalidateCDM): Clear the m_cdm.
(WebCore::toCDMSessionMediaSourceAVFObjC):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Instruct our CDM to invalidate their references to us.
(WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): Call addParser().
(WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Call removeParser().
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Deleted.
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Deleted.
To give us a chance to create a CDMPrivate before we continue decoding media data, "block" further decoding
on the background thread by creating a semaphore and passing it to the main thread, to be triggered when
a CDM is created and attached to this source buffer.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
(-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Deleted.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
Drive-by fix: Only throw an error from keyRequestTimerFired() if the underlying call to
generateKeyRequest() returned an error, rather than just failed to create a message.
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::keyRequestTimerFired):
Drive-by fix: Pass the CDMSessionClient into CDM::createSession() so that it is immediately available
in the CDMSessionPrivate constructor, rather than setting the client immediately after construction.
* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::createSession):
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/CDMPrivate.h:
* Modules/encryptedmedia/CDMPrivateClearKey.cpp:
(WebCore::CDMPrivateClearKey::createSession):
* Modules/encryptedmedia/CDMPrivateClearKey.h:
* Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
(WebCore::CDMPrivateMediaPlayer::createSession):
* Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
* Modules/encryptedmedia/CDMSessionClearKey.cpp:
(WebCore::CDMSessionClearKey::CDMSessionClearKey):
* Modules/encryptedmedia/CDMSessionClearKey.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::MediaKeySession):
* platform/graphics/CDMSession.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::createSession):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::createSession):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createSession):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::keyNeeded): Deleted.
* testing/MockCDM.cpp:
(WebCore::MockCDM::createSession):
(WebCore::MockCDMSession::MockCDMSession):
* testing/MockCDM.h:
Add new files to the project:
* WebCore.xcodeproj/project.pbxproj:
2015-12-04 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/cursor-update.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151879
Reviewed by Oliver Hunt.
No new tests (At least one failing test now passes).
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::IDBRequest):
2015-12-04 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/version-change-exclusive.html fails
https://bugs.webkit.org/show_bug.cgi?id=151870
Reviewed by Alex Christensen.
Test: storage/indexeddb/modern/double-open.html
storage/indexeddb/version-change-exclusive.html
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Delay handling open operations
while the first is still in progress.
(WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2015-12-04 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/exceptions.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151732
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
- Lots of customized exception messages for IDB code to match the text expectations.
- Updates to the test expectations where we can't/won't match them exactly.
- And a couple of little required behavior changes exposed by the test
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBDatabaseException.cpp:
(WebCore::IDBDatabaseException::initializeDescription):
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::update):
(WebCore::IDBClient::IDBCursor::advance):
(WebCore::IDBClient::IDBCursor::continueFunction):
(WebCore::IDBClient::IDBCursor::deleteFunction):
* Modules/indexeddb/client/IDBCursorImpl.h:
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::createObjectStore):
(WebCore::IDBClient::IDBDatabase::transaction):
(WebCore::IDBClient::IDBDatabase::deleteObjectStore):
* Modules/indexeddb/client/IDBDatabaseImpl.h:
* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::IDBFactory::cmp):
* Modules/indexeddb/client/IDBFactoryImpl.h:
* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::openCursor):
(WebCore::IDBClient::IDBIndex::count):
(WebCore::IDBClient::IDBIndex::doCount):
(WebCore::IDBClient::IDBIndex::openKeyCursor):
(WebCore::IDBClient::IDBIndex::get):
(WebCore::IDBClient::IDBIndex::doGet):
(WebCore::IDBClient::IDBIndex::getKey):
(WebCore::IDBClient::IDBIndex::doGetKey):
* Modules/indexeddb/client/IDBIndexImpl.h:
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::openCursor):
(WebCore::IDBClient::IDBObjectStore::get):
(WebCore::IDBClient::IDBObjectStore::add):
(WebCore::IDBClient::IDBObjectStore::put):
(WebCore::IDBClient::IDBObjectStore::putForCursorUpdate):
(WebCore::IDBClient::IDBObjectStore::putOrAdd):
(WebCore::IDBClient::IDBObjectStore::deleteFunction):
(WebCore::IDBClient::IDBObjectStore::clear):
(WebCore::IDBClient::IDBObjectStore::createIndex):
(WebCore::IDBClient::IDBObjectStore::index):
(WebCore::IDBClient::IDBObjectStore::deleteIndex):
(WebCore::IDBClient::IDBObjectStore::count):
(WebCore::IDBClient::IDBObjectStore::doCount):
* Modules/indexeddb/client/IDBObjectStoreImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::result):
(WebCore::IDBClient::IDBRequest::error):
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::objectStore):
(WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
(WebCore::IDBClient::IDBTransaction::abort):
* Modules/indexeddb/client/IDBTransactionImpl.h:
* Modules/indexeddb/legacy/LegacyCursor.cpp:
(WebCore::LegacyCursor::update):
(WebCore::LegacyCursor::continueFunction):
(WebCore::LegacyCursor::deleteFunction):
* Modules/indexeddb/legacy/LegacyCursor.h:
* Modules/indexeddb/legacy/LegacyDatabase.cpp:
(WebCore::LegacyDatabase::createObjectStore):
(WebCore::LegacyDatabase::deleteObjectStore):
(WebCore::LegacyDatabase::transaction):
(WebCore::LegacyDatabase::forceClose):
* Modules/indexeddb/legacy/LegacyDatabase.h:
* Modules/indexeddb/legacy/LegacyFactory.cpp:
(WebCore::LegacyFactory::cmp):
* Modules/indexeddb/legacy/LegacyFactory.h:
* Modules/indexeddb/legacy/LegacyIndex.cpp:
(WebCore::LegacyIndex::openCursor):
(WebCore::LegacyIndex::count):
(WebCore::LegacyIndex::openKeyCursor):
(WebCore::LegacyIndex::get):
(WebCore::LegacyIndex::getKey):
* Modules/indexeddb/legacy/LegacyIndex.h:
* Modules/indexeddb/legacy/LegacyObjectStore.cpp:
(WebCore::LegacyObjectStore::get):
(WebCore::LegacyObjectStore::add):
(WebCore::LegacyObjectStore::put):
(WebCore::LegacyObjectStore::deleteFunction):
(WebCore::LegacyObjectStore::clear):
(WebCore::LegacyObjectStore::createIndex):
(WebCore::LegacyObjectStore::index):
(WebCore::LegacyObjectStore::deleteIndex):
(WebCore::LegacyObjectStore::openCursor):
(WebCore::LegacyObjectStore::count):
* Modules/indexeddb/legacy/LegacyObjectStore.h:
(WebCore::LegacyObjectStore::createIndex):
(WebCore::LegacyObjectStore::count):
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::result):
(WebCore::LegacyRequest::error):
(WebCore::LegacyRequest::dispatchEvent):
(WebCore::LegacyRequest::uncaughtExceptionInEventHandler):
* Modules/indexeddb/legacy/LegacyRequest.h:
* Modules/indexeddb/legacy/LegacyTransaction.cpp:
(WebCore::LegacyTransaction::objectStore):
(WebCore::LegacyTransaction::abort):
(WebCore::LegacyTransaction::stop):
* Modules/indexeddb/legacy/LegacyTransaction.h:
* bindings/js/JSDOMBinding.cpp:
(WebCore::createDOMException): For IDBDatabase exceptions, use createWithDescriptionAsMessage
* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::createObjectStore):
(WebCore::JSIDBDatabase::transaction):
* bindings/js/JSIDBObjectStoreCustom.cpp:
(WebCore::putOrAdd):
(WebCore::JSIDBObjectStore::createIndex):
* dom/DOMCoreException.h:
(WebCore::DOMCoreException::createWithDescriptionAsMessage): Create an exception whose message
is the description.
(WebCore::DOMCoreException::DOMCoreException):
* dom/ExceptionBase.cpp:
(WebCore::ExceptionBase::ExceptionBase): Add a flag to determine where the message comes from
* dom/ExceptionBase.h:
* dom/make_dom_exceptions.pl:
(generateHeader): Add an IDBDatabaseException type
* inspector/InspectorIndexedDBAgent.cpp:
2015-12-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove untested and unused Worker inspection
https://bugs.webkit.org/show_bug.cgi?id=151848
Reviewed by Brian Burg.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/WorkerScriptController.cpp:
* bindings/js/WorkerScriptDebugServer.cpp: Removed.
* bindings/js/WorkerScriptDebugServer.h: Removed.
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController): Deleted.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStartImpl): Deleted.
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl): Deleted.
(WebCore::InspectorInstrumentation::willEvaluateWorkerScript): Deleted.
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl): Deleted.
(WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope): Deleted.
(WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
(WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart): Deleted.
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScope): Deleted.
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminated): Deleted.
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWebAgentBase.h:
(WebCore::WorkerAgentContext::WorkerAgentContext): Deleted.
* inspector/InspectorWorkerAgent.cpp: Removed.
* inspector/InspectorWorkerAgent.h: Removed.
* inspector/InspectorWorkerResource.h: Removed.
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::reset): Deleted.
* inspector/InstrumentingAgents.h:
(WebCore::InstrumentingAgents::workerRuntimeAgent): Deleted.
(WebCore::InstrumentingAgents::setWorkerRuntimeAgent): Deleted.
(WebCore::InstrumentingAgents::inspectorWorkerAgent): Deleted.
(WebCore::InstrumentingAgents::setInspectorWorkerAgent): Deleted.
* inspector/PageConsoleAgent.h:
* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::PageScriptDebugServer):
* inspector/WorkerConsoleAgent.cpp: Removed.
* inspector/WorkerConsoleAgent.h: Removed.
* inspector/WorkerDebuggerAgent.cpp: Removed.
* inspector/WorkerDebuggerAgent.h: Removed.
* inspector/WorkerInspectorController.cpp: Removed.
* inspector/WorkerInspectorController.h: Removed.
* inspector/WorkerRuntimeAgent.cpp: Removed.
* inspector/WorkerRuntimeAgent.h: Removed.
* workers/Worker.cpp:
(WebCore::Worker::notifyFinished): Deleted.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope): Deleted.
(WebCore::WorkerGlobalScope::~WorkerGlobalScope): Deleted.
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::workerInspectorController): Deleted.
* workers/WorkerGlobalScopeProxy.h:
(WebCore::WorkerGlobalScopeProxy::PageInspector::~PageInspector): Deleted.
(WebCore::WorkerGlobalScopeProxy::connectToInspector): Deleted.
(WebCore::WorkerGlobalScopeProxy::disconnectFromInspector): Deleted.
(WebCore::WorkerGlobalScopeProxy::sendMessageToInspector): Deleted.
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::WorkerMessagingProxy): Deleted.
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope): Deleted.
(WebCore::WorkerMessagingProxy::connectToInspector): Deleted.
(WebCore::WorkerMessagingProxy::disconnectFromInspector): Deleted.
(WebCore::WorkerMessagingProxy::sendMessageToInspector): Deleted.
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal): Deleted.
(WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope): Deleted.
(WebCore::WorkerMessagingProxy::postMessageToPageInspector): Deleted.
* workers/WorkerMessagingProxy.h:
* workers/WorkerReportingProxy.h:
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread): Deleted.
2015-12-03 Sergio Villar Senin <svillar@igalia.com>
[css-grid] Fix height computation of grid items with borders inside fr tracks
https://bugs.webkit.org/show_bug.cgi?id=151798
Reviewed by Zalan Bujtas.
Since r192154 we run a second pass of the track sizing
algorithm whenever the height of the grid is indefinite in
order to properly compute row sizes. The available space
passed to the track sizing algorithm must not contain neither
borders nor paddings, otherwise it will think that it has more
space available than the existing one. We should use the
height of the content box instead.
Test: fast/css-grid-layout/grid-item-with-border-in-fr.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
2015-12-03 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/cursor-index-delete.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151847
Reviewed by Andy Estes.
No new tests (At least one failing test now passes).
* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor):
(WebCore::IDBServer::MemoryIndexCursor::currentData):
2015-12-03 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Reduce uses of PassRefPtr in DOM - 1
https://bugs.webkit.org/show_bug.cgi?id=149788
Reviewed by Darin Adler.
As a step to purge PassRefPtr, this patch reduces the uses in WebCore/dom.
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::getOrCreate):
* dom/ChildListMutationScope.h:
* dom/ClipboardEvent.cpp:
(WebCore::ClipboardEvent::ClipboardEvent):
* dom/ClipboardEvent.h:
* dom/CompositionEvent.cpp:
(WebCore::CompositionEvent::CompositionEvent):
(WebCore::CompositionEvent::initCompositionEvent):
* dom/CompositionEvent.h:
* dom/DOMNamedFlowCollection.cpp:
(WebCore::DOMNamedFlowCollection::item):
* dom/DOMNamedFlowCollection.h:
* dom/DOMStringList.h:
* dom/DeviceMotionController.cpp:
(WebCore::DeviceMotionController::getLastEvent):
* dom/DeviceMotionController.h:
* dom/DeviceOrientationController.cpp:
(WebCore::DeviceOrientationController::getLastEvent):
* dom/DeviceOrientationController.h:
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent):
* page/DeviceController.h:
(WebCore::DeviceController::getLastEvent):
2015-12-03 Said Abou-Hallawa <sabouhallawa@apple.com>
Remove the use of GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform
https://bugs.webkit.org/show_bug.cgi?id=151829
Reviewed by Simon Fraser.
Set the CTM of the GraphicsContext to its original value before changing
it. This is a lot cheaper than using GraphicsContextStateSaver to save the
whole state of the GraphicsContext and restore it back;
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerByApplyingTransform):
2015-12-03 Eric Carlson <eric.carlson@apple.com>
[MediaStream] Update MediaStreamTrack.getCapabilities
https://bugs.webkit.org/show_bug.cgi?id=151728
Reviewed by Jer Noble.
Test: fast/mediastream/MediaStreamTrack-getCapabilities.html
* CMakeLists.txt: Remove files deleted from the repository.
* DerivedSources.make: Ditto.
* Modules/mediastream/AllAudioCapabilities.h: Removed.
* Modules/mediastream/AllAudioCapabilities.idl: Removed.
* Modules/mediastream/AllVideoCapabilities.h: Removed.
* Modules/mediastream/AllVideoCapabilities.idl: Removed.
* Modules/mediastream/CapabilityRange.cpp: Removed.
* Modules/mediastream/CapabilityRange.h: Removed.
* Modules/mediastream/CapabilityRange.idl: Removed.
* Modules/mediastream/MediaSourceSettings.h:
(WebCore::MediaSourceSettings::supportsVolume): Volume is a double.
(WebCore::MediaSourceSettings::volume): Double.
* Modules/mediastream/MediaStreamCapabilities.cpp: Removed.
* Modules/mediastream/MediaStreamCapabilities.h: Removed.
* Modules/mediastream/MediaStreamCapabilities.idl: Removed.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::getCapabilities): MediaStreamCapabilities is gone, return a RealtimeMediaSourceCapabilities.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:
* WebCore.xcodeproj/project.pbxproj: Remove files deleted from the repository.
* bindings/js/JSMediaStreamTrackCustom.cpp:
(WebCore::capabilityValue):
(WebCore::JSMediaStreamTrack::getCapabilities): Create and return a dictionary of capatilities.
* platform/mediastream/RealtimeMediaSourceCapabilities.h:
(WebCore::CapabilityValueOrRange::type):
(WebCore::CapabilityValueOrRange::CapabilityValueOrRange):
(WebCore::CapabilityValueOrRange::rangeMin):
(WebCore::CapabilityValueOrRange::rangeMax):
(WebCore::CapabilityValueOrRange::value):
(WebCore::RealtimeMediaSourceCapabilities::create):
(WebCore::RealtimeMediaSourceCapabilities::~RealtimeMediaSourceCapabilities):
(WebCore::RealtimeMediaSourceCapabilities::supportsWidth):
(WebCore::RealtimeMediaSourceCapabilities::width):
(WebCore::RealtimeMediaSourceCapabilities::setWidth):
(WebCore::RealtimeMediaSourceCapabilities::supportsHeight):
(WebCore::RealtimeMediaSourceCapabilities::height):
(WebCore::RealtimeMediaSourceCapabilities::setHeight):
(WebCore::RealtimeMediaSourceCapabilities::supportsFrameRate):
(WebCore::RealtimeMediaSourceCapabilities::frameRate):
(WebCore::RealtimeMediaSourceCapabilities::setFrameRate):
(WebCore::RealtimeMediaSourceCapabilities::supportsFacingMode):
(WebCore::RealtimeMediaSourceCapabilities::facingMode):
(WebCore::RealtimeMediaSourceCapabilities::addFacingMode):
(WebCore::RealtimeMediaSourceCapabilities::supportsAspectRatio):
(WebCore::RealtimeMediaSourceCapabilities::aspectRatio):
(WebCore::RealtimeMediaSourceCapabilities::setAspectRatio):
(WebCore::RealtimeMediaSourceCapabilities::supportsVolume):
(WebCore::RealtimeMediaSourceCapabilities::volume):
(WebCore::RealtimeMediaSourceCapabilities::setVolume):
(WebCore::RealtimeMediaSourceCapabilities::supportsSampleRate):
(WebCore::RealtimeMediaSourceCapabilities::sampleRate):
(WebCore::RealtimeMediaSourceCapabilities::setSampleRate):
(WebCore::RealtimeMediaSourceCapabilities::supportsSampleSize):
(WebCore::RealtimeMediaSourceCapabilities::sampleSize):
(WebCore::RealtimeMediaSourceCapabilities::setSampleSize):
(WebCore::RealtimeMediaSourceCapabilities::supportsEchoCancellation):
(WebCore::RealtimeMediaSourceCapabilities::echoCancellation):
(WebCore::RealtimeMediaSourceCapabilities::setEchoCancellation):
(WebCore::RealtimeMediaSourceCapabilities::supportsDeviceId):
(WebCore::RealtimeMediaSourceCapabilities::deviceId):
(WebCore::RealtimeMediaSourceCapabilities::setDeviceId):
(WebCore::RealtimeMediaSourceCapabilities::supportsGroupId):
(WebCore::RealtimeMediaSourceCapabilities::groupId):
(WebCore::RealtimeMediaSourceCapabilities::setGroupId):
(WebCore::RealtimeMediaSourceCapabilities::RealtimeMediaSourceCapabilities):
(WebCore::RealtimeMediaSourceCapabilityRange::RealtimeMediaSourceCapabilityRange): Deleted.
(WebCore::RealtimeMediaSourceCapabilityRange::min): Deleted.
(WebCore::RealtimeMediaSourceCapabilityRange::max): Deleted.
(WebCore::RealtimeMediaSourceCapabilityRange::type): Deleted.
(WebCore::RealtimeMediaSourceCapabilityRange::supported): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::sourceId): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::setSourceId): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::facingModes): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::setWidthRange): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::setHeightRange): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::setFrameRateRange): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::setAspectRatioRange): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::setVolumeRange): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::hasVideoSource): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::setHasVideoSource): Deleted.
* platform/mediastream/RealtimeMediaSourceSettings.h:
(WebCore::RealtimeMediaSourceSettings::volume): Volume is a double.
(WebCore::RealtimeMediaSourceSettings::setVolume): Ditt.
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::initializeCapabilities): Initialize volume capability.
* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::capabilities): RealtimeMediaSourceCapabilities constructor takes
supportedConstraints. sourceId -> deviceId.
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::initializeCapabilities): DeviceId is set by the base class.
* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm: Drive-by cleanup, remove unused code.
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::initializeCapabilities): Updated.
(WebCore::MockRealtimeAudioSource::initializeSupportedConstraints): Ditto.
* platform/mock/MockRealtimeMediaSource.cpp:
(WebCore::MockRealtimeMediaSource::capabilities): sourceId -> deviceId.
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::initializeCapabilities): Updated.
(WebCore::MockRealtimeVideoSource::initializeSupportedConstraints): Ditto.
2015-12-03 Simon Fraser <simon.fraser@apple.com>
Have layer memory use consult the backing store format
https://bugs.webkit.org/show_bug.cgi?id=151827
rdar://problem/23746497
Reviewed by Dean Jackson.
When computing the backing store memory size, take the pixel format into account,
rather than assuming 4 bytes per pixel.
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/ca/PlatformCALayer.h:
2015-12-03 Anders Carlsson <andersca@apple.com>
Remove Objective-C GC support
https://bugs.webkit.org/show_bug.cgi?id=151819
rdar://problem/23746991
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject initialize]): Deleted.
(-[WebScriptObject finalize]): Deleted.
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
(-[DOMTestActiveDOMObject finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestCallback.mm:
(-[DOMTestCallback finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm:
(-[DOMTestCallbackFunction finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm:
(-[DOMTestCustomConstructorWithNoInterfaceObject finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
(-[DOMTestCustomNamedGetter finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
(-[DOMTestEventConstructor finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
(-[DOMTestEventTarget finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestException.mm:
(-[DOMTestException finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm:
(-[DOMTestGenerateIsReachable finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestInterface.mm:
(-[DOMTestInterface finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm:
(-[DOMTestJSBuiltinConstructor finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm:
(-[DOMTestMediaQueryListListener finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm:
(-[DOMTestNamedConstructor finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestNondeterministic.mm:
(-[DOMTestNondeterministic finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm:
(-[DOMTestOverloadedConstructors finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.mm:
(-[DOMTestOverrideBuiltins finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
(-[DOMTestSerializedScriptValueInterface finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
(-[DOMTestTypedefs finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMattribute.mm:
(-[DOMattribute finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMreadonly.mm:
(-[DOMreadonly finalize]): Deleted.
* bridge/objc/objc_instance.mm:
(ObjcInstance::virtualBegin):
(allocateAutoReleasePool): Deleted.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
* platform/mac/SharedBufferMac.mm:
(+[WebCoreSharedBufferData initialize]): Deleted.
(-[WebCoreSharedBufferData finalize]): Deleted.
* platform/mac/WebCoreObjCExtras.h:
(WebCoreObjCFinalizeOnMainThread): Deleted.
2015-12-03 Zalan Bujtas <zalan@apple.com>
Simple line layout: Print out simple line layout statistics for the current page from command line.
https://bugs.webkit.org/show_bug.cgi?id=151806
Reviewed Simon Fraser.
com.apple.WebKit.showSimpleLineLayoutCoverage prints out a coverage summary of the current page,
while com.apple.WebKit.showSimpleLineLayoutReasons lists the non-simple line layout blocks including the reasons why
they are not covered.
No change in functionality.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForText):
(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::printReason):
(WebCore::SimpleLineLayout::printReasons):
(WebCore::SimpleLineLayout::printTextForSubtree):
(WebCore::SimpleLineLayout::textLengthForSubtree):
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlows):
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):
(WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList):
(WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
2015-12-03 Jonathan Davis <jond@apple.com>
Add WebCrypto to status page
https://bugs.webkit.org/show_bug.cgi?id=151760
Reviewed by Timothy Hatcher.
* features.json:
2015-12-03 Keith Rollin <krollin@apple.com>
[Win] fast/forms/HTMLOptionElement_label03.html failing on win7
https://bugs.webkit.org/show_bug.cgi?id=150909
rdar://problem/23539673
Reviewed by Darin Adler.
When returning text to be displayed, an <option> element will return
the value of a label attribute if it exists, or the text content as a
fallback. The failing test concerned the display of a <select>
element when it contained a sole <option> element that had a label
attribute set to a single space. When displayed, various
platform-specific bits of code will strip off the leading and trailing
whitespace. However, when WebKit would use this text to measure how
wide the <select> popup menu button should be, it would not strip off
spaces, leading to the calculated width being wider than necessary.
The approach taken to fix this is to strip whitespace in the label
attribute before it is returned from the <option> element.
No new tests. fast/forms/HTMLOptionElement_label03.html had been
marked as being expected to fail in TestExpectations; that test now
succeeds.
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::label):
2015-12-03 Sam Weinig <sam@webkit.org>
Try to fix the Windows build.
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
2015-12-03 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/cursor-advance.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151731
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::advance): Return a custom exception message for TypeError.
* Modules/indexeddb/client/IDBCursorImpl.h:
* Modules/indexeddb/legacy/LegacyCursor.cpp:
(WebCore::LegacyCursor::advance):
* Modules/indexeddb/legacy/LegacyCursor.h:
* bindings/js/JSDOMBinding.cpp:
(WebCore::createDOMException):
(WebCore::setDOMException):
* bindings/js/JSDOMBinding.h:
* bindings/scripts/IDLAttributes.txt:
* inspector/InspectorIndexedDBAgent.cpp:
2015-12-03 Brent Fulgham <bfulgham@apple.com>
Allow JavaScript to iterate over plugins for local files
https://bugs.webkit.org/show_bug.cgi?id=151783
<rdar://problem/23692113>
Reviewed by Alexey Proskuryakov.
Test: http/tests/plugins/plugin-javascript-access.html
plugins/plugin-javascript-access.html
* page/Page.cpp:
(WebCore::Page::showAllPlugins): True if we set the debugging flag to show
all plugins, or if the document's origin is from a local file.
* page/Page.h:
2015-12-03 Jer Noble <jer.noble@apple.com>
Unreviewed build-fix; missing include.
* html/HTMLVideoElement.cpp:
2015-12-03 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/cursor-skip-deleted.html crashes.
https://bugs.webkit.org/show_bug.cgi?id=151794
Reviewed by Alex Christensen.
STL reverse_iterators are a tricky beast.
They are implemented in terms of a normal forward iterator (called the "base" iterator),
and they decrement a copy of that iterator when dereferenced.
So when monitoring deletes from a std::set to check if we should invalidate our current
reverse_iterator, we were incorrectly comparing the deleted key to the value pointed by the
reverse_iterator instead of its base iterator.
Since the iterators in question are bidirectional, anyways, we can just use a single iterator
and either increment or decrement it as needed.
No new tests (At least one failing (crashing) test now passes).
* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::objectStoreCleared):
(WebCore::IDBServer::MemoryObjectStoreCursor::keyDeleted):
(WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded):
(WebCore::IDBServer::MemoryObjectStoreCursor::setFirstInRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::setForwardIteratorFromRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::setReverseIteratorFromRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
(WebCore::IDBServer::MemoryObjectStoreCursor::iterate):
(WebCore::IDBServer::MemoryObjectStoreCursor::firstForwardIteratorInRemainingRange): Deleted.
(WebCore::IDBServer::MemoryObjectStoreCursor::firstReverseIteratorInRemainingRange): Deleted.
(WebCore::IDBServer::MemoryObjectStoreCursor::hasIterators): Deleted.
(WebCore::IDBServer::MemoryObjectStoreCursor::hasValidPosition): Deleted.
(WebCore::IDBServer::MemoryObjectStoreCursor::clearIterators): Deleted.
* Modules/indexeddb/server/MemoryObjectStoreCursor.h:
2015-12-03 Per Arne Vollan <peavo@outlook.com>
[WinCairo][MediaFoundation] Main thread can block when session is destroyed.
https://bugs.webkit.org/show_bug.cgi?id=151803
Reviewed by Alex Christensen.
Set flag to make sure that the scheduler thread stops when the session ends.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::stopScheduler):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::processSamplesInQueue):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::schedulerThreadProcPrivate):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::stopThread):
2015-12-03 Jer Noble <jer.noble@apple.com>
[iOS] Fullscreen -> PiP should resume to Fullscreen, not inline
https://bugs.webkit.org/show_bug.cgi?id=150906
Reviewed by Simon Fraser.
When restoring the user interface when exiting PiP, we should return to Fullscreen if that
is where fullscreen was initiated from. Additionally, when we "auto-PiP" by backgrounding the
app in Fullscreen mode, we should "auto-un-PiP" when restoring the application to foreground.
Rather than have a separate method to request exiting fullscreen, entering standard fullscreen,
and switching to & from PiP, add a new method setFullscreenMode() which does all three.
* html/HTMLVideoElement.cpp:
(WebCore::presentationModeToFullscreenMode):
(WebCore::HTMLVideoElement::webkitSetPresentationMode):
(WebCore::HTMLVideoElement::setFullscreenMode):
* html/HTMLVideoElement.h:
Add methods to for clients to request a specific fullscreen mode, and to query whether
the page is currently visible.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(WebVideoFullscreenControllerContext::requestFullscreenMode):
(WebVideoFullscreenControllerContext::isVisible):
(WebVideoFullscreenControllerContext::requestExitFullscreen): Deleted.
* platform/ios/WebVideoFullscreenModel.h:
* platform/ios/WebVideoFullscreenModelVideoElement.h:
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::requestFullscreenMode):
(WebVideoFullscreenModelVideoElement::isVisible):
(WebVideoFullscreenModelVideoElement::requestExitFullscreen): Deleted.
Track whether returning from PiP should enter fullscreen, or whether foregrounding the app
should cause PiP to return to fullscreen.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerLayer layoutSublayers]): Renamed from -setBounds:. -layoutSublayers is called
more consistently than -setBounds:, including when a sublayer is added to the layer.
(WebAVPlayerLayerView_stopRoutingVideoToPictureInPicturePlayerLayerView): The PiP WebAVPlayerLayer's
modelVideoLayerFrame property may have been modified, so pass it back up to the fullscreen
layer when exiting PiP.
(WebVideoFullscreenInterfaceAVKit::applicationDidBecomeActive): Request fullscreen if we auto-PiPed.
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): Only recreate owned objects if they did not already exist.
(WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): If we are in PiP mode, enter fullscreen by stopping PiP.
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): requestExitFullscreen() -> requestFullscreenMode().
(WebVideoFullscreenInterfaceAVKit::willStartPictureInPicture): Animate out the fullscreen window, if exiting Fullscreen -> PiP.
(WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture): Set m_shouldReturnToFullscreenAfterEnteringForeground if we auto-PiPed.
(WebVideoFullscreenInterfaceAVKit::failedToStartPictureInPicture): requestExitFullscreen() -> requestFullscreenMode().
(WebVideoFullscreenInterfaceAVKit::willStopPictureInPicture): If we are returning from PiP -> Fullscreen, do not hide the fullscreen window.
(WebVideoFullscreenInterfaceAVKit::didStopPictureInPicture): If we are returning from PiP -> Fullscreen, show the controls and notify clients.
(WebVideoFullscreenInterfaceAVKit::prepareForPictureInPictureStopWithCompletionHandler): Animate in the fullscreen window, if returning from PiP -> Fullscreen.
(WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Set m_shouldReturnToFullscreenWhenStoppingPiP if we are entering PiP from Fullscreen.
* platform/spi/cocoa/AVKitSPI.h:
2015-12-02 Sam Weinig <sam@webkit.org>
Promise callbacks should be called at microtask checkpoints
https://bugs.webkit.org/show_bug.cgi?id=147933
Reviewed by Chris Dumez.
- Re-names MicroTaskQueue and MicroTask to MicrotaskQueue and Microtask to match the spec language.
- Re-implements MicrotaskQueue and Microtask support suspended Microtasks (via the new KeepInQueue
result value a Microtask can have when running) and correct behavior when Microtasks are added to
the queue during a Microtask checkpoint.
- MicrotaskQueue now has a mainThreadQueue() static function, replacing the old singleton() function,
which can be used for the Document (non-Worker) Microtasks. For Workers, the a MicrotaskQueue
can be separately allocated for each WorkerGlobalScope (though this was not done in this change).
- Adds a helper subclass of Microtask, ActiveDOMCallbackMicrotask, for Microtasks that are
per-ScriptExecutationContext, and need to act as ActiveDOMCallbacks.
- Re-implement Document (non-Worker) Promises on top of ActiveDOMCallbackMicrotask.
- Re-implement MutationObserver delivery on top of Microtask.
Layout Test:
fast/dom/microtask-promise-mutation-observer-order.html
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
Add new files.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
Switch to using ActiveDOMCallbackMicrotask/MicrotaskQueue rather than ScriptExecutionContext's Task mechanism
for JavaScriptCore tasks.
* bindings/js/JSMainThreadExecState.cpp:
(WebCore::JSMainThreadExecState::didLeaveScriptContext):
Perform a microtask checkpoint rather than calling MutationObserver code explicitly now that mutation observers
use microtasks.
* dom/ActiveDOMCallbackMicrotask.cpp: Added.
(WebCore::ActiveDOMCallbackMicrotask::ActiveDOMCallbackMicrotask):
(WebCore::ActiveDOMCallbackMicrotask::~ActiveDOMCallbackMicrotask):
(WebCore::ActiveDOMCallbackMicrotask::run):
(WebCore::ActiveDOMCallbackMicrotask::contextDestroyed):
* dom/ActiveDOMCallbackMicrotask.h: Added.
Add a helper subclass of Microtask which behaves like a ActiveDOMCallback (e.g. supports suspension
and context destruction).
* dom/MicroTask.cpp: Renamed to Microtasks.cpp.
* dom/MicroTask.h: Renamed to Microtasks.h.
* dom/Microtasks.cpp: Renamed from Source/WebCore/dom/MicroTask.cpp.
(WebCore::Microtask::removeSelfFromQueue):
(WebCore::MicrotaskQueue::mainThreadQueue):
(WebCore::MicrotaskQueue::append):
(WebCore::MicrotaskQueue::remove):
(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
(WebCore::MicroTaskQueue::singleton): Deleted.
(WebCore::MicroTaskQueue::queueMicroTask): Deleted.
(WebCore::MicroTaskQueue::runMicroTasks): Deleted.
* dom/Microtasks.h: Renamed from Source/WebCore/dom/MicroTask.h.
(WebCore::Microtask::~Microtask):
(WebCore::MicrotaskQueue::MicrotaskQueue):
(WebCore::MicrotaskQueue::~MicrotaskQueue):
(WebCore::MicroTask::~MicroTask): Deleted.
(WebCore::MicroTaskQueue::~MicroTaskQueue): Deleted.
(WebCore::MicroTaskQueue::MicroTaskQueue): Deleted.
Re-implement MicrotaskQueue and Microtask to support Microtask suspension (via the KeepInQueue result
value) and correct behavior when Microtasks are queued during checkpoints.
* dom/MutationObserver.cpp:
(WebCore::suspendedMutationObservers):
(WebCore::MutationObserverMicrotask::MutationObserverMicrotask):
(WebCore::MutationObserverMicrotask::~MutationObserverMicrotask):
(WebCore::MutationObserverMicrotask::run):
(WebCore::queueMutationObserverCompoundMicrotask):
(WebCore::MutationObserver::enqueueMutationRecord):
(WebCore::MutationObserver::setHasTransientRegistration):
* dom/MutationObserver.h:
Re-implement MutationObserver delivery on top of Microtasks.
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::timerFired):
Remove unnecessary call to runMicroTasks().
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::runScript):
Remove calls to MutationObserver::deliverAllMutations() now that the MicrotaskQueue will take care of it.
(WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
Remove unnecessary call to runMicroTasks().
* testing/Internals.cpp:
(WebCore::Internals::queueMicroTask):
Use ActiveDOMCallbackMicrotask rather than a custom test subclass.
* testing/MicroTaskTest.cpp: Removed.
* testing/MicroTaskTest.h: Removed.
Remove custom test subclass of Microtask, just use ActiveDOMCallbackMicrotask directly.
2015-12-03 Brady Eidson <beidson@apple.com>
Add GetterRaisesExceptionWithMessage and SetterRaisesExceptionWithMessage to the code generator.
https://bugs.webkit.org/show_bug.cgi?id=151807
Reviewed by Alex Christensen.
No new tests (Covered by changes to existing bindings tests).
While we're at it, rework the existing 'RaisesExceptionWithMessage' concept to use a struct instead of
two separate variables to reduce complexity.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateImplementationFunctionCall):
(GenerateConstructorDefinition):
(GenerateParametersCheck): Deleted.
(GenerateReturnParameters): Deleted.
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_set_property):
(webkit_dom_test_obj_get_property):
(webkit_dom_test_obj_class_init):
(webkit_dom_test_obj_get_attr_with_getter_exception_with_message):
(webkit_dom_test_obj_set_attr_with_getter_exception_with_message):
(webkit_dom_test_obj_get_attr_with_setter_exception_with_message):
(webkit_dom_test_obj_set_attr_with_setter_exception_with_message):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjAttrWithGetterExceptionWithMessage):
(WebCore::jsTestObjAttrWithSetterExceptionWithMessage):
(WebCore::setJSTestObjAttrWithGetterExceptionWithMessage):
(WebCore::setJSTestObjAttrWithSetterExceptionWithMessage):
(WebCore::jsTestObjPrototypeFunctionMethodWithExceptionWithMessage):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj attrWithGetterExceptionWithMessage]):
(-[DOMTestObj setAttrWithGetterExceptionWithMessage:]):
(-[DOMTestObj attrWithSetterExceptionWithMessage]):
(-[DOMTestObj setAttrWithSetterExceptionWithMessage:]):
* bindings/scripts/test/TestObj.idl:
* dom/ExceptionCode.h:
2015-12-03 Javier Fernandez <jfernandez@igalia.com>
[css-grid] margin-left:auto and margin-top:auto discards the margin on opposite side
https://bugs.webkit.org/show_bug.cgi?id=151802
Reviewed by Sergio Villar Senin.
When resolving auto margins so that they use the available space, in the
corresponding axis, we must consider that there might be other specified
margins. Such margins must account to determine the actual available space.
Test: fast/css-grid-layout/grid-item-auto-margins-must-respect-specified-margins.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded):
(WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):
2015-12-02 Antti Koivisto <antti@apple.com>
Move ResourceLoadScheduler to WebKit1
https://bugs.webkit.org/show_bug.cgi?id=151743
Reviewed by Alex Christensen.
It is no longer used by WebKit2. Simplify the WebKit/WebCore interface.
* WebCore.xcodeproj/project.pbxproj:
* dom/ContainerNode.cpp:
* dom/Document.cpp:
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
* dom/Document.h:
* loader/DocumentLoader.h:
* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::~LoaderStrategy):
(WebCore::ResourceLoadSuspender::ResourceLoadSuspender):
(WebCore::ResourceLoadSuspender::~ResourceLoadSuspender):
(WebCore::LoaderStrategy::resourceLoadScheduler): Deleted.
(WebCore::LoaderStrategy::loadResourceSynchronously): Deleted.
(WebCore::LoaderStrategy::createBlobRegistry): Deleted.
(WebCore::LoaderStrategy::createPingHandle): Deleted.
* loader/LoaderStrategy.h:
Loading functions implemented on WebKit side move to pure virtual LoaderStrategy.
* loader/ResourceLoadScheduler.cpp: Removed.
* loader/ResourceLoadScheduler.h: Removed.
ResourceLoadScheduler moves to WebKit1 as WebResourceLoadScheduler.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::finishNetworkLoad):
(WebCore::ResourceLoader::setDefersLoading):
(WebCore::ResourceLoader::frameLoader):
(WebCore::ResourceLoader::willSwitchToSubstituteResource):
(WebCore::ResourceLoader::willSendRequestInternal):
* loader/archive/ArchiveResourceCollection.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::performPostLoadActions):
(WebCore::CachedResourceLoader::incrementRequestCount):
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::pluginStrategy):
(WebCore::PlatformStrategies::blobRegistry):
Move BlobRegistry factory function here from LoaderStrategy as this allows network process to have null loaderStrategy.
(it could be renamed BlobStrategy for consistency later).
(WebCore::PlatformStrategies::PlatformStrategies):
* platform/network/BlobRegistry.cpp:
(WebCore::blobRegistry):
(WebCore::BlobRegistry::~BlobRegistry):
* platform/network/ResourceRequestBase.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler):
(WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler):
2015-12-02 Myles C. Maxfield <mmaxfield@apple.com>
Unify font-variant-* with font-variant shorthand
https://bugs.webkit.org/show_bug.cgi?id=149773
Reviewed by Darin Adler.
This patch makes font-variant a shorthand for the following properties:
font-variant-ligatures
font-variant-position
font-variant-caps
font-variant-numeric
font-variant-alternates
font-variant-east-asian
This is consistent with the CSS Fonts Level 3 spec.
This patch also migrates the "font" longhand to use the font-variant-caps
property.
Test: fast/text/font-variant-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontVariantEastAsianPropertyValue): Rename FontVariantEastAsian values.
(WebCore::fontVariantFromStyle): We must consult with the longhand properties to determine
font-variant computed style.
(WebCore::ComputedStyleExtractor::propertyValue): Don't put any-old font-variant-caps inside
the font shorthand.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Guard against incorrect downcasts (due to inherit
of the new shorthand property).
* css/CSSParser.cpp: Parse font-variant as a shorthand. Also implement its "normal" and "none" values.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFont):
(WebCore::CSSParser::parseSystemFont):
(WebCore::CSSParser::parseFontVariantLigatures):
(WebCore::CSSParser::parseFontVariantNumeric):
(WebCore::CSSParser::parseFontVariantEastAsian):
(WebCore::CSSParser::parseFontVariant):
(WebCore::isValidKeywordPropertyAndValue): Deleted.
(WebCore::isKeywordPropertyID): Deleted.
* css/CSSParser.h:
* css/CSSPropertyNames.in: Turn font-variant into a shorthand property.
* css/FontVariantBuilder.h: Guard against incorrect downcasts. Also update for renamed
FontVariantEastAsian type.
(WebCore::applyValueFontVariantLigatures):
(WebCore::applyValueFontVariantNumeric):
(WebCore::applyValueFontVariantEastAsian):
* css/StyleProperties.cpp: Update to use the more specific property.
(WebCore::StyleProperties::appendFontLonghandValueIfExplicit):
(WebCore::StyleProperties::fontValue):
(WebCore::StyleProperties::asText):
* css/StyleResolver.cpp: Ditto.
(WebCore::StyleResolver::isValidCueStyleProperty):
* editing/EditingStyle.cpp: Ditto.
* editing/cocoa/HTMLConverter.mm: Ditto.
(HTMLConverterCaches::propertyValueForNode):
(HTMLConverter::computedAttributesForElement):
* editing/ios/EditorIOS.mm: Ditto.
(WebCore::Editor::removeUnchangeableStyles):
* html/canvas/CanvasRenderingContext2D.cpp: Ditto.
(WebCore::CanvasRenderingContext2D::font):
(WebCore::CanvasRenderingContext2D::setFont):
* platform/graphics/FontCache.h: Removing duplicate cache key value.
(WebCore::FontDescriptionKey::makeFlagsKey):
* platform/graphics/FontCascade.cpp: Migrate to the new font-variant-caps from the old member variable.
(WebCore::FontCascade::glyphDataForCharacter):
* platform/graphics/FontCascade.h: Ditto.
(WebCore::FontCascade::isSmallCaps):
* platform/graphics/FontDescription.cpp: Ditto.
(WebCore::FontDescription::FontDescription):
* platform/graphics/FontDescription.h: Ditto.
(WebCore::FontCascadeDescription::equalForTextAutoSizing):
(WebCore::FontDescription::smallCaps): Deleted.
(WebCore::FontDescription::setSmallCaps): Deleted.
(WebCore::FontDescription::setIsSmallCaps): Deleted.
(WebCore::FontDescription::operator==): Deleted.
* platform/graphics/cocoa/FontCacheCoreText.cpp: Rename FontVariantEastAsianWidth.
(WebCore::computeFeatureSettingsFromVariants):
* platform/text/TextFlags.h: Ditto.
(WebCore::FontVariantSettings::operator==):
* rendering/RenderText.cpp: Migrage to the new font-variant-caps from the old member variable.
(WebCore::RenderText::widthFromCache):
2015-12-02 Alex Christensen <achristensen@webkit.org>
Reduce size of ScriptElement
https://bugs.webkit.org/show_bug.cgi?id=151786
Reviewed by Andreas Kling.
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::requestScript):
* dom/ScriptElement.h:
Use callOnMainThread instead of a Timer to save memory on a timer that is rarely used.
Use bit fields for the boolean values to save another 8 bytes per ScriptElement.
This reduces sizeof(ScriptElement) from 168 to 48 bytes.
2015-12-02 Alex Christensen <achristensen@webkit.org>
Asynchronously call onerror when a content blocker blocks ascript element's load
https://bugs.webkit.org/show_bug.cgi?id=151649
Reviewed by Brady Eidson.
Test: http/tests/contentextensions/script-onerror.html
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::requestScript):
* dom/ScriptElement.h:
2015-12-02 Jer Noble <jer.noble@apple.com>
[iOS] Abrupt transition between Fullscreen -> PiP
https://bugs.webkit.org/show_bug.cgi?id=151719
Reviewed by Eric Carlson.
Follow-up to r192922: When moving from inline -> PiP, don't forget to hide the fullscreen
window once the PiP transition completes.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture):
2015-12-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r192955.
https://bugs.webkit.org/show_bug.cgi?id=151776
A large number of the tests added with this change are failing
on Windows (Requested by ryanhaddad on #webkit).
Reverted changeset:
"[css border] border-image doesn't honor border-style"
https://bugs.webkit.org/show_bug.cgi?id=99922
http://trac.webkit.org/changeset/192955
2015-12-02 Yoav Weiss <yoav@yoav.ws>
Fix preloader issue with srcdoc documents.
https://bugs.webkit.org/show_bug.cgi?id=151744
Reviewed by Ryosuke Niwa.
Make sure that PreloadRequest is resolving URLs based on the document's
baseURL() rather than using url() as the base URL, which is not how URLs
are resolved by the parser, and fails when document->url() diverges from
the document's base URL (e.g. in the case of srcdoc based documents).
Test: fast/preloader/iframe-srcdoc.html
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::PreloadRequest::completeURL):
2015-12-02 Jer Noble <jer.noble@apple.com>
Add a setting and restriction which will pause invisible autoplaying video
https://bugs.webkit.org/show_bug.cgi?id=151412
Reviewed by Eric Carlson.
Test: media/video-restricted-invisible-autoplay-not-allowed.html
Drive-by fix: m_autoplaying is reset in many places by calling pause() or play(), where those
calls did not originate from an explicit request to pause or play, e.g., during an interruption.
This causes m_autoplaying to be set to false, thus breaking resumption of autoplaying when the
interruption ends. Update PlatformMediaSession to remember its client's "autoplaying" state and
restore it when an interruption ends.
Add a means to register for viewport visibility notifications to FrameView, RenderView,
and RenderElement. Elements who wish to recieve these notifications must do so through their
renderer, and thus will have to re-register whenever a new renderer is attached.
Add a restriction to HTMLMediaElement which will pause autoplaying video when that video scrolls
out of the viewport, or is hidden with CSS.
Add a setting which controls whether that new restriction is set.
* dom/Element.h:
(WebCore::Element::isVisibleInViewportChanged): Add default empty virtual method.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::didMoveToNewDocument):
(WebCore::HTMLMediaElement::documentDidResumeFromPageCache):
(WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
(WebCore::HTMLMediaElement::resumeAutoplaying):
(WebCore::mediaElementIsAllowedToAutoplay):
(WebCore::HTMLMediaElement::isVisibleInViewportChanged):
(WebCore::HTMLMediaElement::updateShouldAutoplay):
(WebCore::HTMLMediaElement::HTMLMediaElement): Set the new restriction based on the current Settings.
(WebCore::HTMLMediaElement::resumeAutoplaying): Continue autoplay, or begin playback.
(WebCore::HTMLMediaElement::didMoveToNewDocument): Update our autoplay state.
(WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.
(WebCore::HTMLMediaElement::removedFrom): Ditto.
(WebCore::HTMLMediaElement::didAttachRenderers): Ditto.
(WebCore::HTMLMediaElement::didDetachRenderers): Ditto.
(WebCore::HTMLMediaElement::visibilityDidChange): Ditto.
(WebCore::HTMLMediaElement::willDetachRenderers): Unregister for visibility callbacks.
(WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Clear new restriction.
(WebCore::mediaElementIsAllowedToAutoplay): Check for autoplay requirements.
(WebCore::HTMLMediaElement::isVisibleInViewportChanged): Added, update our autoplay state.
(WebCore::HTMLMediaElement::updateShouldAutoplay): Set interruption if necessary, clear otherwise.
* html/HTMLMediaElement.h:
* html/MediaElementSession.cpp:
(WebCore::restrictionName): Added support for new restriction.
* html/MediaElementSession.h:
* page/FrameView.cpp:
(WebCore::FrameView::viewportContentsChanged): Update clients of viewport visibility.
* page/Settings.in:
* platform/audio/PlatformMediaSession.cpp:
(WebCore::stateName): Add new "Autoplay" state.
(WebCore::interruptionName): Added new interruption type.
(WebCore::PlatformMediaSession::beginInterruption): Set the m_interruptionType.
(WebCore::PlatformMediaSession::clientWillBeginAutoplaying): Set the m_state to Autoplaying.
* platform/audio/PlatformMediaSession.h:
(WebCore::PlatformMediaSession::interruptionType): Added getter.
(WebCore::PlatformMediaSessionClient::resumeAutoplaying): Added default.
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback): Only pause session if its state is playing.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement): Set new ivars.
(WebCore::RenderElement::~RenderElement): Unregister for callbacks if necessary.
(WebCore::RenderElement::registerForVisibleInViewportCallback): Register for callbacks from RenderView.
(WebCore::RenderElement::unregisterForVisibleInViewportCallback): Unregister from same.
(WebCore::RenderElement::visibleInViewportStateChanged): Notify Element if value has changed.
* rendering/RenderElement.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::registerForVisibleInViewportCallback): Add renderer to list of callbacks.
(WebCore::RenderView::unregisterForVisibleInViewportCallback): Remove renderer from same.
(WebCore::RenderView::updateVisibleViewportRect): Walk renderers setting their visiblility based on the viewport visible rect.
* rendering/RenderView.h:
* testing/Internals.cpp:
(WebCore::Internals::setMediaElementRestrictions): Support new restriction.
2015-12-02 Brady Eidson <beidson@apple.com>
Modern IDB: IDBTransaction::error is not exposed.
https://bugs.webkit.org/show_bug.cgi?id=151752
Reviewed by Alex Christensen.
No new tests (At least 3 failing tests now pass, plus changes to other faulty tests).
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent):
(WebCore::IDBClient::IDBRequest::uncaughtExceptionInEventHandler):
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::error):
(WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
(WebCore::IDBClient::IDBTransaction::abort):
(WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
* Modules/indexeddb/client/IDBTransactionImpl.h:
2015-12-02 Adenilson Cavalcanti <cavalcantii@gmail.com>
[css border] border-image doesn't honor border-style
https://bugs.webkit.org/show_bug.cgi?id=99922
Reviewed by Simon Fraser.
Ensure that WebKit will be compliant to css-backgrounds spec where a
border with an image will only be rendered if there is a style defined.
Quote: "None: No border. Color and width are ignored (i.e., the border has width 0)".
Reference: http://www.w3.org/TR/css3-background/#border-style
From W3C discussion: "The fact that these properties set the style of the border is
normative". Reference: https://lists.w3.org/Archives/Public/www-style/2015Nov/0260.html
Test: fast/borders/border-image-should-not-display.html
* rendering/style/BorderData.h:
(WebCore::BorderData::hasBorder):
(WebCore::BorderData::borderLeftWidth):
(WebCore::BorderData::borderRightWidth):
(WebCore::BorderData::borderTopWidth):
(WebCore::BorderData::borderBottomWidth):
* rendering/style/BorderValue.h:
(WebCore::BorderValue::nonZero):
(WebCore::BorderValue::isVisible):
2015-12-02 Eric Carlson <eric.carlson@apple.com>
[MediaStream] Implement MediaStreamTrack.getSettings()
https://bugs.webkit.org/show_bug.cgi?id=151727
Reviewed by Jer Noble.
MediaStreamTrack.getStates has been replaced by MediaStreamTrack.getSettings.
Test: fast/mediastream/MediaStreamTrack-getSettings.html
* CMakeLists.txt: MediaSourceStates.* -> MediaSourceSettings.*.
* DerivedSources.make: No more MediaSourceStates.idl.
* Modules/mediastream/CapabilityRange.cpp: MediaSourceStates.* -> MediaSourceSettings.*.
* Modules/mediastream/MediaSourceSettings.cpp: Copied from Source/WebCore/Modules/mediastream/MediaSourceStates.cpp.
(WebCore::MediaSourceSettings::create):
(WebCore::MediaSourceSettings::MediaSourceSettings):
(WebCore::MediaSourceSettings::facingMode):
(WebCore::MediaSourceStates::create): Deleted.
(WebCore::MediaSourceStates::MediaSourceStates): Deleted.
(WebCore::MediaSourceStates::sourceType): Deleted.
(WebCore::MediaSourceStates::facingMode): Deleted.
* Modules/mediastream/MediaSourceSettings.h: Copied from Source/WebCore/Modules/mediastream/MediaSourceStates.h.
MediaSourceStates.* renamed to MediaSourceSettings.* and updated to new API.
* Modules/mediastream/MediaSourceStates.cpp: Removed.
* Modules/mediastream/MediaSourceStates.h: Removed.
* Modules/mediastream/MediaSourceStates.idl: Removed.
* Modules/mediastream/MediaStreamCapabilities.cpp:
(WebCore::MediaStreamCapabilities::sourceType): Return an empty vector for now, will be fixed
by the changes for https://bugs.webkit.org/show_bug.cgi?id=151728.
(WebCore::MediaStreamCapabilities::sourceId): RealtimeMediaSourceStates -> MediaSourceSettings.
(WebCore::MediaStreamCapabilities::facingMode): Ditto.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::getSettings): New.
(WebCore::MediaStreamTrack::getCapabilities): Don't modify states, just pass through whatever
private track returns.
(WebCore::MediaStreamTrack::trackSettingsChanged):
(WebCore::MediaStreamTrack::states): Deleted.
(WebCore::MediaStreamTrack::trackStatesChanged): Deleted.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl: MediaSourceStates -> MediaSourceSettings.
* Modules/webaudio/MediaStreamAudioSource.cpp:
(WebCore::MediaStreamAudioSource::settings):
(WebCore::MediaStreamAudioSource::states): Deleted.
* Modules/webaudio/MediaStreamAudioSource.h: MediaSourceStates -> MediaSourceSettings.
* WebCore.xcodeproj/project.pbxproj: MediaSourceStates.* -> MediaSourceSettings.*.
* bindings/js/JSMediaSourceStatesCustom.cpp: Removed.
* bindings/js/JSMediaStreamTrackCustom.cpp: Added.
(WebCore::JSMediaStreamTrack::getSettings): MediaSourceSettings is a generic dictionary so
it has to be generated manually.
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::intrinsicSize): states -> settings.
(WebCore::MediaStreamPrivate::trackStatesChanged): Deleted.
* platform/mediastream/MediaStreamPrivate.h:
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::settings):
(WebCore::MediaStreamTrackPrivate::sourceSettingsChanged):
(WebCore::MediaStreamTrackPrivate::states): Deleted.
(WebCore::MediaStreamTrackPrivate::sourceStatesChanged): Deleted.
* platform/mediastream/MediaStreamTrackPrivate.h:
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::settingsDidChanged):
(WebCore::RealtimeMediaSource::statesDidChanged): Deleted.
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/RealtimeMediaSourceCapabilities.h:
(WebCore::RealtimeMediaSourceCapabilities::facingModes): States -> Settings.
(WebCore::RealtimeMediaSourceCapabilities::addFacingMode): Ditto.
(WebCore::RealtimeMediaSourceCapabilities::sourceTypes): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::setSourceType): Deleted.
(WebCore::RealtimeMediaSourceCapabilities::addSourceType): Deleted.
* platform/mediastream/RealtimeMediaSourceCenter.h: States -> Settings.
* platform/mediastream/RealtimeMediaSourceSettings.cpp: Copied from Source/WebCore/platform/mediastream/RealtimeMediaSourceStates.cpp.
(WebCore::RealtimeMediaSourceSettings::facingMode):
(WebCore::RealtimeMediaSourceStates::facingMode): Deleted.
(WebCore::RealtimeMediaSourceStates::sourceType): Deleted.
* platform/mediastream/RealtimeMediaSourceSettings.h: Copied from Source/WebCore/platform/mediastream/RealtimeMediaSourceStates.h.
* platform/mediastream/RealtimeMediaSourceStates.cpp: Removed.
* platform/mediastream/RealtimeMediaSourceStates.h: Removed.
* platform/mediastream/mac/AVAudioCaptureSource.h:
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::updateStates): Deleted.
* platform/mediastream/mac/AVCaptureDeviceManager.h:
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
* platform/mediastream/mac/AVMediaCaptureSource.h:
* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::states): Deleted.
* platform/mediastream/mac/AVVideoCaptureSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::updateStates): Deleted.
* platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::initializeSupportedConstraints):
(WebCore::MockRealtimeAudioSource::updateStates): Deleted.
* platform/mock/MockRealtimeAudioSource.h:
* platform/mock/MockRealtimeMediaSource.cpp:
(WebCore::MockRealtimeMediaSource::capabilities): Minor cleanup.
(WebCore::MockRealtimeMediaSource::settings):
(WebCore::MockRealtimeMediaSource::supportedConstraints):
(WebCore::MockRealtimeMediaSource::states): Deleted.
* platform/mock/MockRealtimeMediaSource.h:
(WebCore::MockRealtimeMediaSource::constraints):
(WebCore::MockRealtimeMediaSource::currentStates): Deleted.
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::updateSettings):
(WebCore::MockRealtimeVideoSource::initializeCapabilities):
(WebCore::MockRealtimeVideoSource::initializeSupportedConstraints):
(WebCore::MockRealtimeVideoSource::setFrameRate): states -> settings.
(WebCore::MockRealtimeVideoSource::setSize): Ditto.
(WebCore::MockRealtimeVideoSource::drawAnimation): Ditto.
(WebCore::MockRealtimeVideoSource::drawText): Ditto.
(WebCore::MockRealtimeVideoSource::updateStates): Deleted.
(WebCore::MockRealtimeVideoSource::setFacingMode): Deleted.
* platform/mock/MockRealtimeVideoSource.h:
2015-11-30 David Hyatt <hyatt@apple.com>
Implement the picture element.
https://bugs.webkit.org/show_bug.cgi?id=116963
Reviewed by Dean Jackson.
Added fast/picture tests.
* WebCore.xcodeproj/project.pbxproj:
Add HTMLPictureElement.* to the project.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
Remove the CURRENT_SRC ifdef.
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
New helper function that checks the <source> elements of a <picture> parent
for the best match.
(WebCore::HTMLImageElement::selectImageSource):
Pull out the process of image selection into its own function so that this can
be called from many places (to ensure that dynamic changes are reflected as elements
get changed, added or removed).
(WebCore::HTMLImageElement::parseAttribute):
Call selectImageSource when attributes change.
(WebCore::HTMLImageElement::insertedInto):
If inserted into a picture element, make sure to update the source.
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::currentSrc):
Remove the CURRENT_SRC ifdef.
* html/HTMLImageElement.idl:
Remove the CURRENT_SRC ifdef.
* html/HTMLPictureElement.cpp: Added.
(WebCore::HTMLPictureElement::HTMLPictureElement):
(WebCore::HTMLPictureElement::create):
(WebCore::HTMLPictureElement::sourcesChanged):
* html/HTMLPictureElement.h: Added.
The new picture element. Has a sourcesChanged() function that is invoked whenever anything
about the <source> elements changes.
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):
(WebCore::HTMLSourceElement::parseAttribute):
Make sure to call sourcesChanged when new sources come and go or when attributes on
source elements change.
* html/HTMLSourceElement.h:
Added parseAttribute function so we can see when attributes change that force us to
do a dynamic update.
* html/HTMLTagNames.in:
Add the picture element.
* html/parser/HTMLSrcsetParser.h:
(WebCore::ImageCandidate::srcOrigin):
(WebCore::ImageCandidate::isEmpty):
Some helpers for picture parsing.
2015-12-02 Per Arne Vollan <peavo@outlook.com>
[WinCairo][MediaFoundation] Video is not rendered correctly on some graphics cards.
https://bugs.webkit.org/show_bug.cgi?id=151757
Reviewed by Alex Christensen.
We need to make sure we use the same bitmap format as in the Direct3D surface
in video memory when copying surface data and rendering with Cairo.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):
2015-12-02 Brady Eidson <beidson@apple.com>
Modern IDB: Get rid of IDBExceptionCode.
https://bugs.webkit.org/show_bug.cgi?id=151753
Reviewed by Alex Christensen.
No new tests (No change in behavior).
* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::count):
(WebCore::IDBClient::IDBIndex::doCount):
(WebCore::IDBClient::IDBIndex::get):
(WebCore::IDBClient::IDBIndex::doGet):
(WebCore::IDBClient::IDBIndex::getKey):
(WebCore::IDBClient::IDBIndex::doGetKey):
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::get):
(WebCore::IDBClient::IDBObjectStore::deleteFunction):
(WebCore::IDBClient::IDBObjectStore::clear):
(WebCore::IDBClient::IDBObjectStore::createIndex):
(WebCore::IDBClient::IDBObjectStore::index):
(WebCore::IDBClient::IDBObjectStore::deleteIndex):
(WebCore::IDBClient::IDBObjectStore::count):
(WebCore::IDBClient::IDBObjectStore::doCount):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort):
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::addRecord):
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
(WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getCount):
(WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
(WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::putIndexKey):
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::createIndex):
(WebCore::IDBServer::MemoryObjectStore::deleteIndex):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
* Modules/indexeddb/shared/IDBError.cpp:
(WebCore::IDBError::IDBError):
(WebCore::IDBError::name):
(WebCore::IDBError::message):
(WebCore::idbErrorName): Deleted.
(WebCore::idbErrorDescription): Deleted.
* Modules/indexeddb/shared/IDBError.h:
(WebCore::IDBError::code):
(WebCore::IDBError::isNull):
2015-12-02 Jiewen Tan <jiewen_tan@apple.com>
Null dereference loading Blink layout test fast/loader/unload-mutation-crash.html
https://bugs.webkit.org/show_bug.cgi?id=149305
<rdar://problem/22747892>
Reviewed by Brent Fulgham.
Add an extra guard to replaceDocument() against rude JS in unload event handlers.
Test: fast/loader/unload-mutation-crash.html
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocument):
(WebCore::DocumentWriter::begin):
2015-12-02 Per Arne Vollan <peavo@outlook.com>
[WinCairo] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=151742
Reviewed by Csaba Osztrogonác.
System font flag has moved from Font class to FontData class.
* platform/graphics/win/SimpleFontDataCairoWin.cpp:
(WebCore::Font::platformInit):
2015-12-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r192894 and r192904.
https://bugs.webkit.org/show_bug.cgi?id=151738
Crashes sometimes on Windows (Requested by litherum on
#webkit).
Reverted changesets:
"[Win] Web fonts with small caps have excess whitespace with
the complex text codepath"
https://bugs.webkit.org/show_bug.cgi?id=151698
http://trac.webkit.org/changeset/192894
"Test gardening after r192894"
http://trac.webkit.org/changeset/192904
2015-12-01 Yusuke Suzuki <utatane.tea@gmail.com>
[ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
https://bugs.webkit.org/show_bug.cgi?id=150792
Reviewed by Saam Barati.
* Configurations/FeatureDefines.xcconfig:
2015-12-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r192914.
https://bugs.webkit.org/show_bug.cgi?id=151734
JSC tests for this change are failing on 32 and 64-bit bots
(Requested by ryanhaddad on #webkit).
Reverted changeset:
"[ES6] Implement LLInt/Baseline Support for ES6 Generators and
enable this feature"
https://bugs.webkit.org/show_bug.cgi?id=150792
http://trac.webkit.org/changeset/192914
2015-12-01 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Force UnitsPerEm to 1000
https://bugs.webkit.org/show_bug.cgi?id=151650
Reviewed by Antti Koivisto.
According to the Adobe Type 1 Font Format:
"Type 1 font programs generally use a 1000 to 1 scaling matrix
for the definition of the relationship of character space unites
to user space units."
Windows actually disregards the "unitsPerEm" value in the "head"
table for some calculations, and hardcodes 1000 instead. In order
to have consistent renderings on Windows and OS X, this patch
forces all generated fonts to have a unitsPerEm of 1000, and
appropriately scales all necessary values.
Test: svg/W3C-SVG-1.1/fonts-elem-03-b.svg
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::scaleUnitsPerEm):
(WebCore::SVGToOTFFontConverter::appendHEADTable):
(WebCore::SVGToOTFFontConverter::appendOS2Table):
(WebCore::SVGToOTFFontConverter::appendVORGTable):
(WebCore::SVGToOTFFontConverter::appendVHEATable):
(WebCore::SVGToOTFFontConverter::appendVMTXTable):
(WebCore::SVGToOTFFontConverter::addKerningPair):
(WebCore::CFFBuilder::CFFBuilder):
(WebCore::CFFBuilder::boundingBox):
(WebCore::CFFBuilder::updateBoundingBox):
(WebCore::CFFBuilder::unscaledLineTo):
(WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
(WebCore::SVGToOTFFontConverter::processGlyphElement):
(WebCore::SVGToOTFFontConverter::appendLigatureGlyphs):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
2015-12-01 Brady Eidson <beidson@apple.com>
Give a more detailed message for TypeErrors that result from EnforceRange.
https://bugs.webkit.org/show_bug.cgi?id=151725
Reviewed by Tim Horton.
No new tests (Covered by changes to existing tests).
* bindings/js/JSDOMBinding.cpp:
(WebCore::rangeErrorString):
(WebCore::enforceRange):
2015-12-01 Jer Noble <jer.noble@apple.com>
[iOS] Abrupt transition between Fullscreen -> PiP
https://bugs.webkit.org/show_bug.cgi?id=151719
Reviewed by Eric Carlson.
Rather than abruptly hiding the fullscreen window, explicitly exit fullscreen mode upon entering PiP.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture):
2015-12-01 Myles C. Maxfield <mmaxfield@apple.com>
Give String and AtomicString an existingHash() function
https://bugs.webkit.org/show_bug.cgi?id=151717
Reviewed by Andreas Kling.
No new tests because there is no behavior change.
* platform/graphics/Font.cpp:
(WebCore::CharacterFallbackMapKeyHash::hash):
2015-12-01 Myles C. Maxfield <mmaxfield@apple.com>
[Win] Build fix after r192895
Unreviewed.
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::isSystemFont):
(WebCore::FontPlatformData::setIsSystemFont):
* platform/graphics/win/SimpleFontDataCGWin.cpp:
(WebCore::Font::platformInit):
(WebCore::Font::platformWidthForGlyph):
2015-12-01 Alexey Proskuryakov <ap@apple.com>
Update bindings test results after r192903.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::construct):
2015-12-01 Yusuke Suzuki <utatane.tea@gmail.com>
[ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
https://bugs.webkit.org/show_bug.cgi?id=150792
Reviewed by Saam Barati.
* Configurations/FeatureDefines.xcconfig:
2015-12-01 Brady Eidson <beidson@apple.com>
Add "RaisesExceptionWithMessage" IDL attribute.
https://bugs.webkit.org/show_bug.cgi?id=151720
Reviewed by Alex Christensen.
No new tests (Covered by changes to existing bindings tests).
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateReturnParameters):
(GenerateImplementationFunctionCall):
(GenerateConstructorDefinition):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_method_with_exception_with_message):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionMethodWithExceptionWithMessage):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj methodWithExceptionWithMessage]):
* bindings/scripts/test/TestObj.idl:
2015-12-01 Darin Adler <darin@apple.com>
Fix anomaly where isMouseEvent returns false for wheel events
https://bugs.webkit.org/show_bug.cgi?id=151685
Reviewed by Alexey Proskuryakov.
Back three years ago when we made WheelEvent inherit from MouseEvent,
someone decided that isMouseEvent should return false for the wheel events.
An audit of all the callers of isMouseEvent indicated that in almost every
case, it's better to return true, so this patch does that.
All the other call sites that were checking isMouseEvent, here and in the
higher levels of WebKit, benefit from getting true even for wheel events.
* bindings/objc/DOMEvents.mm:
(kitClass): Use eventInterface instead of isMouseEvent to create the appropriate
wrapper class.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition): Eliminated a peculiar search and replace
mistake; "stateution" instead of "execution".
* dom/Node.cpp:
(WebCore::Node::handleLocalEvents): Add an isWheelEvent check here so that we
will not ignore wheel events. This preserves behavior. A FIXME questions whether
that is the behavior we want.
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::isMouseEvent): Deleted. No need to override and return false.
* dom/WheelEvent.h: Ditto.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::defaultEventHandler): Removed unneeded checks for
drag events and wheel events; both are types of mouse event, and so a single
isMouseEvent check takes care of all three of these.
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent): Ditto.
2015-12-01 Alex Christensen <achristensen@webkit.org>
Use Optional for matrix inverses
https://bugs.webkit.org/show_bug.cgi?id=151575
Reviewed by Myles C. Maxfield.
This patch should have no change in behavior. Some unnecessary checks are removed.
There are a few places where we are no longer multiplying by the identity matrix.
This should remind future coders that not all matrices are invertible.
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::inverse):
(WebCore::WebKitCSSMatrix::translate):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::restore):
(WebCore::CanvasRenderingContext2D::scale):
(WebCore::CanvasRenderingContext2D::rotate):
(WebCore::CanvasRenderingContext2D::translate):
(WebCore::CanvasRenderingContext2D::transform):
(WebCore::CanvasRenderingContext2D::setTransform):
(WebCore::CanvasRenderingContext2D::isPointInPathInternal):
(WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::calculateLayerBoundingRect):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::putByteArray):
* platform/graphics/filters/Filter.h:
(WebCore::Filter::setFilterScale):
(WebCore::Filter::absoluteTransform):
(WebCore::Filter::mapAbsolutePointToLocalPoint):
(WebCore::Filter::renderingMode):
(WebCore::Filter::setRenderingMode):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
(WebCore::TextureMapperLayer::replicaTransform):
(WebCore::TextureMapperLayer::setAnimatedFilters):
(WebCore::TextureMapperLayer::mapScrollOffset):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
(WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
* platform/graphics/transforms/AffineTransform.cpp:
(WebCore::AffineTransform::yScale):
(WebCore::det):
(WebCore::AffineTransform::isInvertible):
(WebCore::AffineTransform::inverse):
(WebCore::AffineTransform::det): Deleted.
* platform/graphics/transforms/AffineTransform.h:
* platform/graphics/transforms/TransformState.cpp:
(WebCore::TransformState::mappedPoint):
(WebCore::TransformState::mappedQuad):
(WebCore::TransformState::mapQuad):
(WebCore::TransformState::flattenWithTransform):
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::isInvertible):
(WebCore::TransformationMatrix::inverse):
* platform/graphics/transforms/TransformationMatrix.h:
* rendering/HitTestingTransformState.cpp:
(WebCore::HitTestingTransformState::flattenWithTransform):
(WebCore::HitTestingTransformState::mappedPoint):
(WebCore::HitTestingTransformState::mappedQuad):
(WebCore::HitTestingTransformState::mappedArea):
(WebCore::HitTestingTransformState::boundsOfMappedArea):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::applyTransform):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerByApplyingTransform):
(WebCore::RenderLayer::hitTestLayer):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::nodeAtFloatPoint):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::nodeAtFloatPoint):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::postApplyResource):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::setupNonScalingStrokeContext):
(WebCore::RenderSVGShape::nodeAtFloatPoint):
(WebCore::RenderSVGShape::calculateStrokeBoundingBox):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::nodeAtFloatPoint):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::intersectRepaintRectWithShadows):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::clipToImageBuffer):
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::getTransformToElement):
* svg/SVGMatrix.h:
(WebCore::SVGMatrix::inverse):
(WebCore::SVGMatrix::rotateFromVector):
2015-12-01 Tim Horton <timothy_horton@apple.com>
Remove swipe snapshot before main document load if scroll position is already restored
https://bugs.webkit.org/show_bug.cgi?id=151224
Reviewed by Darin Adler.
* loader/FrameLoaderClient.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):
Each time we try to restore the scroll position, see if the requested
scroll position is something we can scroll to by going through ScrollView's
scroll position constraint logic. If we can scroll there, tell our client
(and eventually ViewGestureController) that we successfully restored the
scroll position!
2015-12-01 Myles C. Maxfield <mmaxfield@apple.com>
[iOS] Adjacent emoji overlap each other
https://bugs.webkit.org/show_bug.cgi?id=151690
<rdar://problem/23430453>
Reviewed by Simon Fraser.
This is a partial revert of r188737. It turns out that only CoreText gives correct
glyph advances for emoji. In r188737, I reverted the special iOS emoji processing,
but also removed the logic of using CoreText for emoji advances. This patch adds
the m_isEmoji boolean back, so we can tell if we need to force
platformWidthForGlyph() to use CoreText.
This patch also performs a little bit of cleanup by moving Font's m_isSystemFont
to FontPlatformData where it belongs.
Test: fast/text/emoji-overlap.html
* platform/graphics/Font.cpp:
(WebCore::fillGlyphPage): Removed unnecessary argument.
(WebCore::Font::Font): Deleted.
* platform/graphics/Font.h: Moved getters and booleans to FontPlatformData.
(WebCore::Font::hasCustomTracking): Deleted.
(WebCore::Font::isSystemFont): Deleted.
* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData): Initialize new booleans.
(WebCore::FontPlatformData::operator=): Ditto.
* platform/graphics/FontPlatformData.h: Getters for new booleans.
(WebCore::FontPlatformData::isSystemFont):
(WebCore::FontPlatformData::hasCustomTracking):
(WebCore::FontPlatformData::isEmoji):
* platform/graphics/GlyphPage.h: Remove unnecessary argument.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::advanceForColorBitmapFont): Return an Optional instead of using an out
argument.
(WebCore::canUseFastGlyphAdvanceGetter): Make sure that we use CoreText if we are
using the Emoji font.
(WebCore::Font::platformWidthForGlyph):
(WebCore::Font::platformInit): Deleted.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm: Deal with the new booleans.
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::platformDataAssign):
(WebCore::FontPlatformData::setFont):
* platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
(WebCore::GlyphPage::fill): Removed unnecessary argument.
* platform/graphics/mac/GlyphPageMac.cpp:
(WebCore::shouldUseCoreText): Use a reference instead of a pointer.
(WebCore::GlyphPage::fill): Removed unnecessary argument.
* platform/graphics/win/FontCGWin.cpp:
(WebCore::FontCascade::drawGlyphs): Update for new location of booleans.
* platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
(WebCore::GlyphPage::fill): Removed unnecessary argument.
* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
(WebCore::GlyphPage::fill): Removed unnecessary argument.
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::shapeAndPlaceItem): Update for new location of
booleans.
2015-12-01 Myles C. Maxfield <mmaxfield@apple.com>
[Win] Web fonts with small caps have excess whitespace with the complex text codepath
https://bugs.webkit.org/show_bug.cgi?id=151698
Reviewed by Darin Adler.
When performing small-caps on OS X, we bake in the smaller font size into the platform's native font
object. On Windows, we currently don't do that; instead, we just change some ancillary data inside
the FontPlatformData, and our advance & drawing calculations are sensitive to this ancillary data.
However, in the complex text codepath, Uniscribe only takes the native font object as input, and
therefore operates with the wrong font size.
The solution is to bake the smaller font size into the native platform font on Windows, similar to
OS X. It isn't clear why we didn't do this previously, but it seems like we weren't sure that
Windows would select the correct font when we provide new selection criteria. However, for web fonts,
we already use the same mechanism (CreateFontIndirect()) when we create the font in the first place;
therefore, this scaled font request will always work as well.
Test: fast/text/small-caps-complex.html
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::Font::platformCreateScaledFont): Deleted.
2015-12-01 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/create-and-remove-object-store.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151704
Reviewed by Alex Christensen.
No new tests (At least one previously failing test now passes).
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::deleteObjectStore):
2015-12-01 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/basics.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151694
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes, and covered by changes to 3 previously incorrect tests).
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionWillFinish): Set the flag determining whether
or not the request's transaction should be exposed to the DOM.
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::result): Throw an exception if the request is not done.
(WebCore::IDBClient::IDBRequest::error): Ditto.
(WebCore::IDBClient::IDBRequest::transaction): Only return the transaction to the DOM if the flag says so.
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abort):
(WebCore::IDBClient::IDBTransaction::commit):
2015-12-01 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] ASSERTION FAILED: m_table running /webkit2/BackForwardList/navigation in Debug build
https://bugs.webkit.org/show_bug.cgi?id=151700
Reviewed by Martin Robinson.
This happens when the frame notifies its observers that the page
will be detached. The m_table that asserts is the
FrameDestructionObserver HashSet. It happens when clearing the
GObject DOM cache wrappers during frame destruction, and there's a
Document object wrapped whose last reference is held by the DOM
wrapper. In that case, the Document object is destroyed while the
frame is being destroyed. Deleting the wrapper objects after the
frame destruction fixes the crash.
* bindings/gobject/DOMObjectCache.cpp:
2015-12-01 Youenn Fablet <youenn.fablet@crf.canon.fr>
[Streams API] pull function of tee should call readFromReadableStreamReader directly
https://bugs.webkit.org/show_bug.cgi?id=151497
Reviewed by Darin Adler.
Covered by added test.
* Modules/streams/ReadableStreamInternals.js:
(teeReadableStreamPullFunction): directly calling readFromReadableStreamReader.
2015-12-01 Youenn Fablet <youenn.fablet@crf.canon.fr>
[Streams API] Clean-up JS built-in code using arrow functions
https://bugs.webkit.org/show_bug.cgi?id=151489
Reviewed by Darin Adler.
Using arrow functions to remove need for _this.
Made errorWritableStream take two parameters to simplify code and align it with the spec.
No change in behavior.
* Modules/streams/ReadableStream.js:
(initializeReadableStream):
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(abort):
(write):
* Modules/streams/WritableStreamInternals.js:
(errorWritableStream):
(writableStreamAdvanceQueue):
(closeWritableStream):
2015-12-01 Youenn Fablet <youenn.fablet@crf.canon.fr>
[Streams API] teeReadableStream should not directly use stream.getReader()
https://bugs.webkit.org/show_bug.cgi?id=151487
Reviewed by Darin Adler.
Covered by added test.
* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream): Create a @ReadableStreamReader instead of calling getReader() which may be disrupted by user scripts.
2015-12-01 Youenn Fablet <youenn.fablet@crf.canon.fr>
[Streams API] streams should not directly use Number and related methods
https://bugs.webkit.org/show_bug.cgi?id=151499
Reviewed by Darin Adler.
Covered by updated test.
Using @Number, @isFinite and @isNaN in place of Number, Number.isFinite and Number.isNaN.
* Modules/streams/ReadableStreamInternals.js:
(enqueueInReadableStream):
* Modules/streams/StreamInternals.js:
(validateAndNormalizeQueuingStrategy):
(enqueueValueWithSize):
2015-12-01 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r192849.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(webkit_dom_test_interface_supplemental_method1):
(webkit_dom_test_interface_supplemental_method2):
(webkit_dom_test_interface_set_supplemental_str2):
(webkit_dom_test_interface_get_supplemental_node):
(webkit_dom_test_interface_set_supplemental_node):
2015-12-01 Youenn Fablet <youenn.fablet@crf.canon.fr>
[Streams API] Remove use of @catch for exposed promises
https://bugs.webkit.org/show_bug.cgi?id=151625
Reviewed by Darin Adler.
Promise @catch is calling "then" which may be controlled by user scripts.
This patch simply replaces @catch by calling @then directly.
Covered by modified tests.
* Modules/streams/ReadableStream.js:
(pipeTo):
* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream):
2015-11-30 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed, fix build after r192848 and r192849
- Rename canSuspendForPageCache to canSuspendForDocumentSuspension
- Use references instead of pointers
* Modules/battery/BatteryManager.cpp:
(WebCore::BatteryManager::canSuspendForDocumentSuspension):
(WebCore::BatteryManager::canSuspendForPageCache): Deleted.
* Modules/battery/BatteryManager.h:
* Modules/battery/NavigatorBattery.cpp:
(WebCore::NavigatorBattery::webkitBattery):
* Modules/battery/NavigatorBattery.h:
* Modules/gamepad/deprecated/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::webkitGetGamepads):
* Modules/gamepad/deprecated/NavigatorGamepad.h:
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::NavigatorContentUtils::registerProtocolHandler):
(WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
(WebCore::NavigatorContentUtils::unregisterProtocolHandler):
* Modules/navigatorcontentutils/NavigatorContentUtils.h:
* Modules/vibration/NavigatorVibration.cpp:
(WebCore::NavigatorVibration::vibrate):
* Modules/vibration/NavigatorVibration.h:
2015-11-30 Jiewen Tan <jiewen_tan@apple.com>
Amazon.com Additional Information links aren't clickable
https://bugs.webkit.org/show_bug.cgi?id=151401
<rdar://problem/23454261>
Reviewed by Darin Adler.
The cause of this issue is that the painting order is different from the hittest order so we can end up
with visible but unreachable content. To fix this, the executation flow of hittest has been reordered.
According to the paint system, which renders the webpage from the bottom RenderLayer to the top, contents
are rendered before floats. Hence, for the hittest, which determines the hitted location from top RenderLayer
to the bottom, should do it reversedly. Now, hittest will first test floats then contents.
Test: fast/block/float/hit-test-on-overlapping-floats.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
2015-11-30 Simon Fraser <simon.fraser@apple.com>
Fix possible crash with animated layers in reflections
https://bugs.webkit.org/show_bug.cgi?id=151689
rdar://problem/23018612
Reviewed by Darin Adler.
Reflections create additional PlatformCALayers whose owner is set to the GraphicsLayerCA.
Those PlatformCALayers need their owner pointer cleared out when the GraphicsLayerCA
is destroyed.
Tested by compositing/reflections/nested-reflection-transition.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/ca/GraphicsLayerCA.h:
2015-11-30 Brady Eidson <beidson@apple.com>
Modern IDB: Iterating index cursors to a specific key is busted.
https://bugs.webkit.org/show_bug.cgi?id=151684
Reviewed by Darin Adler.
No new tests (At least one failing test now passes).
* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::iterate):
2015-11-30 Brady Eidson <beidson@apple.com>
Modern IDB: ObjectStore cursors should not be able to iterate out of their range.
https://bugs.webkit.org/show_bug.cgi?id=151683
Reviewed by Darin Adler.
No new tests (Covered by at least one failing test that now passes).
* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
2015-11-30 Anders Carlsson <andersca@apple.com>
CTTE autogenerated bindings code
https://bugs.webkit.org/show_bug.cgi?id=151682
Reviewed by Darin Adler.
Make sure that JS bindings pass a reference to the object when calling static member functions.
* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::getGamepads):
* Modules/gamepad/NavigatorGamepad.h:
* Modules/geolocation/NavigatorGeolocation.cpp:
(WebCore::NavigatorGeolocation::geolocation):
* Modules/geolocation/NavigatorGeolocation.h:
* Modules/mediasource/AudioTrackMediaSource.h:
(WebCore::AudioTrackMediaSource::sourceBuffer):
* Modules/mediasource/TextTrackMediaSource.h:
(WebCore::TextTrackMediaSource::sourceBuffer):
* Modules/mediasource/VideoTrackMediaSource.h:
(WebCore::VideoTrackMediaSource::sourceBuffer):
* Modules/mediastream/HTMLMediaElementMediaStream.cpp:
(WebCore::HTMLMediaElementMediaStream::srcObject):
(WebCore::HTMLMediaElementMediaStream::setSrcObject):
* Modules/mediastream/HTMLMediaElementMediaStream.h:
* Modules/mediastream/NavigatorMediaDevices.cpp:
(WebCore::NavigatorMediaDevices::mediaDevices):
* Modules/mediastream/NavigatorMediaDevices.h:
* Modules/notifications/DOMWindowNotifications.cpp:
(WebCore::DOMWindowNotifications::webkitNotifications):
* Modules/notifications/DOMWindowNotifications.h:
* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
* Modules/notifications/WorkerGlobalScopeNotifications.cpp:
(WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
* Modules/notifications/WorkerGlobalScopeNotifications.h:
* Modules/speech/DOMWindowSpeechSynthesis.cpp:
(WebCore::DOMWindowSpeechSynthesis::speechSynthesis):
* Modules/speech/DOMWindowSpeechSynthesis.h:
* Modules/webdatabase/DOMWindowWebDatabase.cpp:
(WebCore::DOMWindowWebDatabase::openDatabase):
* Modules/webdatabase/DOMWindowWebDatabase.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
* testing/Internals.cpp:
(WebCore::Internals::enableMockSpeechSynthesizer):
2015-11-30 Katlyn Graff <kgraff@apple.com>
Rename ActiveDOMObject/DOMWindow PageCacheSuspension code to support more reasons for suspension
https://bugs.webkit.org/show_bug.cgi?id=151677
Reviewed by Ryosuke Niwa.
Simply a refactoring patch, so no new tests.
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::canSuspendForDocumentSuspension):
(WebCore::MediaKeySession::canSuspendForPageCache): Deleted.
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::canSuspendForDocumentSuspension):
(WebCore::Geolocation::canSuspendForPageCache): Deleted.
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowIndexedDatabase::reconnectFrameFromDocumentSuspension):
(WebCore::DOMWindowIndexedDatabase::disconnectFrameForPageCache): Deleted.
(WebCore::DOMWindowIndexedDatabase::reconnectFrameFromPageCache): Deleted.
* Modules/indexeddb/DOMWindowIndexedDatabase.h:
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::canSuspendForDocumentSuspension):
(WebCore::IDBClient::IDBDatabase::canSuspendForPageCache): Deleted.
* Modules/indexeddb/client/IDBDatabaseImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::canSuspendForDocumentSuspension):
(WebCore::IDBClient::IDBRequest::canSuspendForPageCache): Deleted.
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::canSuspendForDocumentSuspension):
(WebCore::IDBClient::IDBTransaction::canSuspendForPageCache): Deleted.
* Modules/indexeddb/client/IDBTransactionImpl.h:
* Modules/indexeddb/legacy/LegacyDatabase.cpp:
(WebCore::LegacyDatabase::canSuspendForDocumentSuspension):
(WebCore::LegacyDatabase::canSuspendForPageCache): Deleted.
* Modules/indexeddb/legacy/LegacyDatabase.h:
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::canSuspendForDocumentSuspension):
(WebCore::LegacyRequest::canSuspendForPageCache): Deleted.
* Modules/indexeddb/legacy/LegacyRequest.h:
* Modules/indexeddb/legacy/LegacyTransaction.cpp:
(WebCore::LegacyTransaction::canSuspendForDocumentSuspension):
(WebCore::LegacyTransaction::canSuspendForPageCache): Deleted.
* Modules/indexeddb/legacy/LegacyTransaction.h:
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::canSuspendForDocumentSuspension):
(WebCore::MediaSource::canSuspendForPageCache): Deleted.
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::canSuspendForDocumentSuspension):
(WebCore::SourceBuffer::canSuspendForPageCache): Deleted.
* Modules/mediasource/SourceBuffer.h:
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::canSuspendForDocumentSuspension):
(WebCore::MediaStreamTrack::canSuspendForPageCache): Deleted.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::canSuspendForDocumentSuspension):
(WebCore::RTCDTMFSender::canSuspendForPageCache): Deleted.
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::canSuspendForDocumentSuspension):
(WebCore::RTCPeerConnection::canSuspendForPageCache): Deleted.
* Modules/mediastream/RTCPeerConnection.h:
* Modules/notifications/DOMWindowNotifications.cpp:
(WebCore::DOMWindowNotifications::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowNotifications::reconnectFrameFromDocumentSuspension):
(WebCore::DOMWindowNotifications::disconnectFrameForPageCache): Deleted.
(WebCore::DOMWindowNotifications::reconnectFrameFromPageCache): Deleted.
* Modules/notifications/DOMWindowNotifications.h:
* Modules/notifications/Notification.cpp:
(WebCore::Notification::canSuspendForDocumentSuspension):
(WebCore::Notification::canSuspendForPageCache): Deleted.
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::canSuspendForDocumentSuspension):
(WebCore::NotificationCenter::canSuspendForPageCache): Deleted.
* Modules/notifications/NotificationCenter.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::canSuspendForDocumentSuspension):
(WebCore::AudioContext::canSuspendForPageCache): Deleted.
* Modules/webaudio/AudioContext.h:
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::canSuspendForDocumentSuspension):
(WebCore::DatabaseContext::canSuspendForPageCache): Deleted.
* Modules/webdatabase/DatabaseContext.h:
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::canSuspendForDocumentSuspension):
(WebCore::WebSocket::canSuspendForPageCache): Deleted.
* Modules/websockets/WebSocket.h:
* css/FontLoader.cpp:
(WebCore::FontLoader::canSuspendForDocumentSuspension):
(WebCore::FontLoader::canSuspendForPageCache): Deleted.
* css/FontLoader.h:
* dom/ActiveDOMObject.cpp:
(WebCore::ActiveDOMObject::canSuspendForDocumentSuspension):
(WebCore::ActiveDOMObject::canSuspendForPageCache): Deleted.
* dom/ActiveDOMObject.h:
* dom/Document.cpp:
(WebCore::Document::~Document):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForTabSuspension):
(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache): Deleted.
* dom/ScriptExecutionContext.h:
* fileapi/FileReader.cpp:
(WebCore::FileReader::canSuspendForDocumentSuspension):
(WebCore::FileReader::canSuspendForPageCache): Deleted.
* fileapi/FileReader.h:
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* history/PageCache.cpp:
(WebCore::canCacheFrame):
* html/HTMLMarqueeElement.cpp:
(WebCore::HTMLMarqueeElement::canSuspendForDocumentSuspension):
(WebCore::HTMLMarqueeElement::canSuspendForPageCache): Deleted.
* html/HTMLMarqueeElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canSuspendForDocumentSuspension):
(WebCore::HTMLMediaElement::canSuspendForPageCache): Deleted.
* html/HTMLMediaElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::canSuspendForDocumentSuspension):
(WebCore::HTMLSourceElement::canSuspendForPageCache): Deleted.
* html/HTMLSourceElement.h:
* html/PublicURLManager.cpp:
(WebCore::PublicURLManager::canSuspendForDocumentSuspension):
(WebCore::PublicURLManager::canSuspendForPageCache): Deleted.
* html/PublicURLManager.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::canSuspendForDocumentSuspension):
(WebCore::WebGLRenderingContextBase::canSuspendForPageCache): Deleted.
* html/canvas/WebGLRenderingContextBase.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::open):
* loader/appcache/DOMApplicationCache.cpp:
(WebCore::DOMApplicationCache::disconnectFrameForDocumentSuspension):
(WebCore::DOMApplicationCache::reconnectFrameFromDocumentSuspension):
(WebCore::DOMApplicationCache::disconnectFrameForPageCache): Deleted.
(WebCore::DOMApplicationCache::reconnectFrameFromPageCache): Deleted.
* loader/appcache/DOMApplicationCache.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::DOMWindow):
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::resetUnlessSuspendedForDocumentSuspension):
(WebCore::DOMWindow::suspendForDocumentSuspension):
(WebCore::DOMWindow::resumeFromDocumentSuspension):
(WebCore::DOMWindow::disconnectDOMWindowProperties):
(WebCore::DOMWindow::reconnectDOMWindowProperties):
(WebCore::DOMWindow::resetUnlessSuspendedForPageCache): Deleted.
(WebCore::DOMWindow::suspendForPageCache): Deleted.
(WebCore::DOMWindow::resumeFromPageCache): Deleted.
* page/DOMWindow.h:
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowExtension::reconnectFrameFromDocumentSuspension):
(WebCore::DOMWindowExtension::disconnectFrameForPageCache): Deleted.
(WebCore::DOMWindowExtension::reconnectFrameFromPageCache): Deleted.
* page/DOMWindowExtension.h:
* page/DOMWindowProperty.cpp:
(WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowProperty::reconnectFrameFromDocumentSuspension):
(WebCore::DOMWindowProperty::disconnectFrameForPageCache): Deleted.
(WebCore::DOMWindowProperty::reconnectFrameFromPageCache): Deleted.
* page/DOMWindowProperty.h:
* page/EventSource.cpp:
(WebCore::EventSource::canSuspendForDocumentSuspension):
(WebCore::EventSource::canSuspendForPageCache): Deleted.
* page/EventSource.h:
* page/SuspendableTimer.cpp:
(WebCore::SuspendableTimer::canSuspendForDocumentSuspension):
(WebCore::SuspendableTimer::canSuspendForPageCache): Deleted.
* page/SuspendableTimer.h:
* workers/Worker.cpp:
(WebCore::Worker::canSuspendForDocumentSuspension):
(WebCore::Worker::canSuspendForPageCache): Deleted.
* workers/Worker.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::canSuspendForDocumentSuspension):
(WebCore::XMLHttpRequest::canSuspendForPageCache): Deleted.
* xml/XMLHttpRequest.h:
2015-11-30 Brady Eidson <beidson@apple.com>
Modern IDB: "prevunique" cursors should point at the lowest primary key that matches, not the highest.
https://bugs.webkit.org/show_bug.cgi?id=151675.
Reviewed by Darin Adler.
No new tests (Covered by at least one failing test that now passes, and updates to previously incorrect tests).
* Modules/indexeddb/server/IndexValueEntry.cpp:
(WebCore::IDBServer::IndexValueEntry::reverseBegin): If CursorDuplicity is NoDuplicates, start at the lowest
entry instead of the highest.
(WebCore::IDBServer::IndexValueEntry::reverseFind):
* Modules/indexeddb/server/IndexValueEntry.h:
* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::reverseFind):
(WebCore::IDBServer::IndexValueStore::Iterator::Iterator):
(WebCore::IDBServer::IndexValueStore::Iterator::nextIndexEntry):
* Modules/indexeddb/server/IndexValueStore.h:
* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor):
(WebCore::IDBServer::MemoryIndexCursor::iterate):
* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::duplicity):
(WebCore::IDBCursorInfo::isDirectionNoDuplicate): Deleted.
* Modules/indexeddb/shared/IDBCursorInfo.h:
2015-11-30 Jiewen Tan <jiewen_tan@apple.com>
Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html
https://bugs.webkit.org/show_bug.cgi?id=149309
<rdar://problem/22748363>
Reviewed by Brent Fulgham.
A weird order of event execution introduced by the test case will kill the webpage in a
subframe of the page while executing its |frame.loader().checkLoadCompleteForThisFrame()|.
Therefore, any frames comes after the failing subframe will have no page. Check it before
calling to those frames' |frame.loader().checkLoadCompleteForThisFrame()|, otherwise the
assertion in |frame.loader().checkLoadCompleteForThisFrame()| will fail.
Test: http/tests/misc/detach-during-notifyDone.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadComplete):
2015-11-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r192819.
https://bugs.webkit.org/show_bug.cgi?id=151681
This change broke existing layout tests on Windows (Requested
by ryanhaddad on #webkit).
Reverted changeset:
"Unify font-variant-* with font-variant shorthand"
https://bugs.webkit.org/show_bug.cgi?id=149773
http://trac.webkit.org/changeset/192819
2015-11-30 Darin Adler <darin@apple.com>
Use Optional instead of isNull out argument for nullable getters
https://bugs.webkit.org/show_bug.cgi?id=151676
Reviewed by Anders Carlsson.
No behavior change, just cleaner code.
* Modules/geolocation/Coordinates.cpp:
(WebCore::Coordinates::altitude): Return an Optional.
(WebCore::Coordinates::altitudeAccuracy): Ditto.
(WebCore::Coordinates::heading): Ditto.
(WebCore::Coordinates::speed): Ditto.
* Modules/geolocation/Coordinates.h: Ditto.
* Modules/indexeddb/IDBVersionChangeEvent.cpp:
(WebCore::IDBVersionChangeEvent::create): Added. The code before was calling
through to Event::create, which is clearly not what was wanted. Also removed
unneeded explicit destructor.
* Modules/indexeddb/IDBVersionChangeEvent.h: Changed return type of newVersion
to Optional and updated for above change.
* Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
(WebCore::IDBClient::IDBVersionChangeEvent::newVersion): Changed to return
an Optional.
* Modules/indexeddb/client/IDBVersionChangeEventImpl.h: Removed unused
default argument values; the event type one, at least, was clearly incorrect.
Made more things private, got rid of unneeded destructor, marked class final
instead of marking all functions final.
* Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp:
(WebCore::LegacyVersionChangeEvent::newVersion): Same as above.
* Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Ditto.
* Modules/mediastream/MediaTrackConstraints.cpp:
(WebCore::MediaTrackConstraints::optional): Removed bogus bool value. If we
come back to finish later we will have to implement optional return values
for arrays in the JavaScript bindings generator, which should be straightforward.
* Modules/mediastream/MediaTrackConstraints.h: Ditto.
* bindings/js/JSDOMBinding.h:
(WebCore::toNullableJSNumber): Added. This function template is used for
return values that are nullable numbers.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction): Replaced some existing bogus code to handle nullables with
new equally-bogus code that should be no worse and will compile.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Removed old support for nullables.
(NativeToJSValue): Added new support for nullable numbers.
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation): Removed support for nullables. We almost certainly
won't need it for Objective-C bindings.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Updated.
* bindings/scripts/test/JS/JSTestObj.cpp: Updated.
* bindings/scripts/test/ObjC/DOMTestObj.mm: Updated.
2015-11-30 Wenson Hsieh <wenson_hsieh@apple.com>
Split platform-independent logic in AVCaptureDeviceManager out into a new class
https://bugs.webkit.org/show_bug.cgi?id=151388
<rdar://problem/23593980>
Reviewed by Eric Carlson.
To prepare for creating a MockCaptureDeviceManager to be able to test
MediaDevices.getUserMedia, we create a platform-independent capture device manager
which all platforms should extend and add platform-specific logic to.
The methods CaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints and
CaptureDeviceManager::captureDeviceList should be overridden by each platform
CaptureDeviceManager to respectively create a RealtimeMediaSource and return a list of
capture devices. createMediaSourceForCaptureDeviceWithConstraints attempts to create
a media source for a given device with some constraints; if the contraints cannot be
satisfied, this returns null.
The refactored capture device manager also introduces the notion of a platform-
independent capture session which may be extended by platform device managers for
determining whether a given constraint name, value and media type is valid.
A platform-independent CaptureDeviceInfo now represents either the video or audio
component of a capture device, but not both at once. This means a capture device that
supports both video and audio will emit two separate capture devices.
No new tests, since there should be no behavior change.
* Modules/mediastream/CaptureDeviceInfo.h: Added.
(WebCore::CaptureSessionInfo::~CaptureSessionInfo):
(WebCore::CaptureSessionInfo::supportsVideoSize):
(WebCore::CaptureSessionInfo::bestSessionPresetForVideoDimensions):
* Modules/mediastream/CaptureDeviceManager.cpp: Added.
(CaptureDeviceManager::~CaptureDeviceManager):
(CaptureDeviceManager::getSourcesInfo):
(CaptureDeviceManager::captureDeviceFromDeviceID):
(CaptureDeviceManager::verifyConstraintsForMediaType):
(CaptureDeviceManager::bestSourcesForTypeAndConstraints):
(CaptureDeviceManager::sourceWithUID):
(CaptureDeviceManager::bestDeviceForFacingMode):
(facingModeFromString):
(CaptureDeviceManager::sessionSupportsConstraint):
(CaptureDeviceManager::isSupportedFrameRate):
* Modules/mediastream/CaptureDeviceManager.h: Added.
(WebCore::CaptureDeviceManager::refreshCaptureDeviceList):
(WebCore::CaptureDeviceManager::defaultCaptureSession):
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp: Added.
(WebCore::RealtimeMediaSourceSupportedConstraints::nameForConstraint):
(WebCore::RealtimeMediaSourceSupportedConstraints::constraintFromName):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsConstraint):
* platform/mediastream/RealtimeMediaSourceSupportedConstraints.h:
* platform/mediastream/mac/AVCaptureDeviceManager.h:
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureSessionInfo::AVCaptureSessionInfo):
(WebCore::AVCaptureSessionInfo::supportsVideoSize):
(WebCore::AVCaptureSessionInfo::bestSessionPresetForVideoDimensions):
(WebCore::AVCaptureDeviceManager::captureDeviceList):
(WebCore::shouldConsiderDeviceInDeviceList):
(WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList):
(WebCore::AVCaptureDeviceManager::AVCaptureDeviceManager):
(WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):
(WebCore::AVCaptureDeviceManager::sourceWithUID):
(WebCore::AVCaptureDeviceManager::getSourcesInfo):
(WebCore::AVCaptureDeviceManager::verifyConstraintsForMediaType):
(WebCore::AVCaptureDeviceManager::defaultCaptureSession):
(WebCore::AVCaptureDeviceManager::sessionSupportsConstraint):
(WebCore::AVCaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints):
(WebCore::AVCaptureDeviceManager::deviceDisconnected):
(WebCore::AVCaptureDeviceManager::isSupportedFrameRate):
(WebCore::CaptureDevice:::m_enabled): Deleted.
(WebCore::captureDeviceList): Deleted.
(WebCore::captureDeviceFromDeviceID): Deleted.
(WebCore::refreshCaptureDeviceList): Deleted.
(WebCore::AVCaptureDeviceManager::bestSessionPresetForVideoSize): Deleted.
(WebCore::AVCaptureDeviceManager::deviceSupportsFacingMode): Deleted.
(WebCore::AVCaptureDeviceManager::bestDeviceForFacingMode): Deleted.
(WebCore::AVCaptureDeviceManager::isValidConstraint): Deleted.
(WebCore::AVCaptureDeviceManager::validConstraintNames): Deleted.
(WebCore::AVCaptureDeviceManager::validFacingModes): Deleted.
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::applyConstraints):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
2015-11-30 Brady Eidson <beidson@apple.com>
Modern IDB: Set the correct source on the IDBRequest for cursor updates
https://bugs.webkit.org/show_bug.cgi?id=151665
Reviewed by Andy Estes.
No new tests (At least one existing failing test now passes).
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::update):
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::putForCursorUpdate):
(WebCore::IDBClient::IDBObjectStore::putOrAdd):
* Modules/indexeddb/client/IDBObjectStoreImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::IDBRequest):
(WebCore::IDBClient::IDBRequest::setSource):
* Modules/indexeddb/client/IDBRequestImpl.h:
2015-11-30 Tim Horton <timothy_horton@apple.com>
Get rid of the legacy TextIndicatorWindow style
https://bugs.webkit.org/show_bug.cgi?id=151674
Reviewed by Anders Carlsson.
* page/TextIndicator.h:
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]): Deleted.
2015-11-30 Brady Eidson <beidson@apple.com>
Modern IDB: Correct handling of cursors finishing iteration.
https://bugs.webkit.org/show_bug.cgi?id=151664
Reviewed by Andy Estes.
No new tests (At least one previously failing test now passes).
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::setGetResult):
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::putOrAdd):
2015-11-30 Myles C. Maxfield <mmaxfield@apple.com>
Unify font-variant-* with font-variant shorthand
https://bugs.webkit.org/show_bug.cgi?id=149773
Reviewed by Darin Adler.
This patch makes font-variant a shorthand for the following properties:
font-variant-ligatures
font-variant-position
font-variant-caps
font-variant-numeric
font-variant-alternates
font-variant-east-asian
This is consistent with the CSS Fonts Level 3 spec.
This patch also migrates the "font" longhand to use the font-variant-caps
property.
Test: fast/text/font-variant-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontVariantEastAsianPropertyValue): Rename FontVariantEastAsian values.
(WebCore::fontVariantFromStyle): We must consult with the longhand properties to determine
font-variant computed style.
(WebCore::ComputedStyleExtractor::propertyValue): Don't put any-old font-variant-caps inside
the font shorthand.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Guard against incorrect downcasts (due to inherit
of the new shorthand property).
* css/CSSParser.cpp: Parse font-variant as a shorthand. Also implement its "normal" and "none" values.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFont):
(WebCore::CSSParser::parseSystemFont):
(WebCore::CSSParser::parseFontVariantLigatures):
(WebCore::CSSParser::parseFontVariantNumeric):
(WebCore::CSSParser::parseFontVariantEastAsian):
(WebCore::CSSParser::parseFontVariant):
(WebCore::isValidKeywordPropertyAndValue): Deleted.
(WebCore::isKeywordPropertyID): Deleted.
* css/CSSParser.h:
* css/CSSPropertyNames.in: Turn font-variant into a shorthand property.
* css/FontVariantBuilder.h: Guard against incorrect downcasts. Also update for renamed
FontVariantEastAsian type.
(WebCore::applyValueFontVariantLigatures):
(WebCore::applyValueFontVariantNumeric):
(WebCore::applyValueFontVariantEastAsian):
* css/StyleProperties.cpp: Update to use the more specific property.
(WebCore::StyleProperties::appendFontLonghandValueIfExplicit):
(WebCore::StyleProperties::fontValue):
(WebCore::StyleProperties::asText):
* css/StyleResolver.cpp: Ditto.
(WebCore::StyleResolver::isValidCueStyleProperty):
* editing/EditingStyle.cpp: Ditto.
* editing/cocoa/HTMLConverter.mm: Ditto.
(HTMLConverterCaches::propertyValueForNode):
(HTMLConverter::computedAttributesForElement):
* editing/ios/EditorIOS.mm: Ditto.
(WebCore::Editor::removeUnchangeableStyles):
* html/canvas/CanvasRenderingContext2D.cpp: Ditto.
(WebCore::CanvasRenderingContext2D::font):
(WebCore::CanvasRenderingContext2D::setFont):
* platform/graphics/FontCache.h: Removing duplicate cache key value.
(WebCore::FontDescriptionKey::makeFlagsKey):
* platform/graphics/FontCascade.cpp: Migrate to the new font-variant-caps from the old member variable.
(WebCore::FontCascade::glyphDataForCharacter):
* platform/graphics/FontCascade.h: Ditto.
(WebCore::FontCascade::isSmallCaps):
* platform/graphics/FontDescription.cpp: Ditto.
(WebCore::FontDescription::FontDescription):
* platform/graphics/FontDescription.h: Ditto.
(WebCore::FontCascadeDescription::equalForTextAutoSizing):
(WebCore::FontDescription::smallCaps): Deleted.
(WebCore::FontDescription::setSmallCaps): Deleted.
(WebCore::FontDescription::setIsSmallCaps): Deleted.
(WebCore::FontDescription::operator==): Deleted.
* platform/graphics/cocoa/FontCacheCoreText.cpp: Rename FontVariantEastAsianWidth.
(WebCore::computeFeatureSettingsFromVariants):
* platform/text/TextFlags.h: Ditto.
(WebCore::FontVariantSettings::operator==):
* rendering/RenderText.cpp: Migrage to the new font-variant-caps from the old member variable.
(WebCore::RenderText::widthFromCache):
2015-11-30 Brady Eidson <beidson@apple.com>
Modern IDB: After versionchange transactions abort, fire onerror on the original IDBOpenDBRequest.
https://bugs.webkit.org/show_bug.cgi?id=151648
Reviewed by Andy Estes.
No new tests. Covered by at least one existing failing test which now passes, and many
other tests updated to fix their incorrect behavior.
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::transaction):
(WebCore::IDBClient::IDBDatabase::willAbortTransaction):
(WebCore::IDBClient::IDBDatabase::didAbortTransaction):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::notifyDidAbort):
(WebCore::IDBClient::IDBTransaction::didAbort):
(WebCore::IDBClient::IDBTransaction::didCommit):
* Modules/indexeddb/client/IDBTransactionImpl.h:
2015-11-30 Chris Dumez <cdumez@apple.com>
location.origin is undefined in a web worker
https://bugs.webkit.org/show_bug.cgi?id=151614
Reviewed by Darin Adler.
Expose location.origin to web workers, as per:
https://html.spec.whatwg.org/multipage/workers.html#workerlocation
This behavior is consistent with the behavior of Firefox and Chrome.
Test: fast/workers/worker-location.html
* workers/WorkerLocation.cpp:
(WebCore::WorkerLocation::origin):
* workers/WorkerLocation.h:
* workers/WorkerLocation.idl:
2015-11-30 Brady Eidson <beidson@apple.com>
Modern IDB: Support updating cursor values when the object store uses inline keys.
https://bugs.webkit.org/show_bug.cgi?id=151647
Reviewed by Andy Estes.
No new tests (At least two previously failing tests now pass and are unskipped).
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::update): Use putForCursorUpdate() instead of put()
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::add):
(WebCore::IDBClient::IDBObjectStore::put):
(WebCore::IDBClient::IDBObjectStore::putForCursorUpdate): Use the flag to skip the inline-key check.
(WebCore::IDBClient::IDBObjectStore::putOrAdd): Add a flag to skip the inline-key check.
* Modules/indexeddb/client/IDBObjectStoreImpl.h:
2015-11-30 Brady Eidson <beidson@apple.com>
Modern IDB: Resolve flaky GC-vs-wrapper issue with IDBOpenDBRequest.
https://bugs.webkit.org/show_bug.cgi?id=151645
Reviewed by Andy Estes.
No new tests (Resolves flakiness with hundreds of existing IDB tests).
Do to improper management of the m_hasPendingActivity flag on IDBRequestImpl,
the request wrapper for an IDBOpenDBRequest might be garbage collected in between the
onUpgradeNeeded event and onSuccess event.
This manifested as flakiness in many tests, some more than others.
I tried to write a targeted 100% reproducible case manually forcing GC, but could not get
the timing right.
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent):
(WebCore::IDBClient::IDBRequest::willIterateCursor):
* Modules/indexeddb/client/IDBRequestImpl.h:
(WebCore::IDBClient::IDBRequest::isOpenDBRequest):
2015-11-30 Per Arne Vollan <peavo@outlook.com>
[WinCairo][MediaFoundation] Implement seek.
https://bugs.webkit.org/show_bug.cgi?id=151609
Reviewed by Alex Christensen.
The methods maxTimeSeekable() and buffered() needs to be implemented.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
(WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
(WebCore::MediaPlayerPrivateMediaFoundation::readyState):
(WebCore::MediaPlayerPrivateMediaFoundation::maxTimeSeekable):
(WebCore::MediaPlayerPrivateMediaFoundation::buffered):
(WebCore::MediaPlayerPrivateMediaFoundation::didLoadingProgress):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::currentTime):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isActive):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::maxTimeLoaded):
2015-11-30 Brady Eidson <beidson@apple.com>
Modern IDB: openCursor() fix resulting in at least 4 more passing tests.
https://bugs.webkit.org/show_bug.cgi?id=151630
Reviewed by Andy Estes.
No new tests (At least 4 failing tests now pass, and 9 other incorrect tests updated).
* Modules/indexeddb/IDBGetResult.cpp:
(WebCore::IDBGetResult::isolatedCopy):
* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::IDBGetResult):
(WebCore::IDBGetResult::isDefined):
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::didOpenOrIterateCursor): If the IDBGetResult is undefined,
do not expose the cursor as the result property of the IDBRequest.
2015-11-30 Brady Eidson <beidson@apple.com>
Modern IDB: Support keyPath injection into object store records.
https://bugs.webkit.org/show_bug.cgi?id=151640
Reviewed by Andy Estes.
No new tests (At least one existing failure now passes and is unskipped,
while many other existing failures are now closer to passing).
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord): Use the new UniqueIDBDatabase VM/ExecState.
(WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords): Ditto
(WebCore::IDBServer::indexVM): Deleted.
(WebCore::IDBServer::indexGlobalExec): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::databaseThreadVM):
(WebCore::IDBServer::UniqueIDBDatabase::databaseThreadExecState):
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): If appropriate, inject the key that will be used into
the value before storing the record.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
Add modern JSValue/ExecState& version of some binding utilities, for use today and in preparation of getting
rid of the DOMRequestState and Deprecated::ScriptValue versions later:
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyToJSValue):
(WebCore::injectIDBKeyIntoScriptValue):
(WebCore::deserializeIDBValueData):
(WebCore::deserializeIDBValueDataToJSValue):
* bindings/js/IDBBindingUtilities.h:
2015-11-25 Andy Estes <aestes@apple.com>
[Content Filtering] Avoid creating a ContentFilter when loading the empty document
https://bugs.webkit.org/show_bug.cgi?id=151615
Reviewed by Daniel Bates.
It's expensive to create the first ContentFilter since two frameworks must be soft-linked. There's no reason to
pay this cost if we're just loading the empty document.
No new tests. It's not possible to write a test that would fail without this change since ContentFilter is not
notified of empty document loads.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource): Don't initialize m_contentFilter until we know we aren't
loading the empty document.
(WebCore::DocumentLoader::DocumentLoader):
2015-11-29 Antoine Quint <graouts@apple.com>
Browser does not fall back to SVG attribute value when CSS style value is invalid or not supported
https://bugs.webkit.org/show_bug.cgi?id=147932
Reviewed by Dean Jackson.
Instead of returning an SVGPaint object of type SVG_PAINTTYPE_UNKNOWN when we encounter an SVG paint
value that cannot be parsed, we now return `nullptr` which will cause that value to be ignored and
let another paint value in the cascade be used instead. This is the same approach used for SVGColor.
Since we're removing the only call site for `SVGPaint::createUnknown()`, we remove that function entirely.
Tests: svg/css/invalid-color-cascade.svg
svg/css/invalid-paint-cascade.svg
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGPaint):
* svg/SVGPaint.h:
(WebCore::SVGPaint::createUnknown): Deleted.
2015-11-29 Simon Fraser <simon.fraser@apple.com>
Use SVGTransform::SVGTransformType instead of an unsigned short
https://bugs.webkit.org/show_bug.cgi?id=151637
Reviewed by Brady Eidson.
Make 'type' more strongly typed.
* svg/SVGTransformable.cpp:
(WebCore::SVGTransformable::parseTransformValue):
(WebCore::parseAndSkipType):
(WebCore::SVGTransformable::parseTransformType):
(WebCore::SVGTransformable::parseTransformAttribute):
* svg/SVGTransformable.h:
2015-11-27 Brady Eidson <beidson@apple.com>
Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong.
https://bugs.webkit.org/show_bug.cgi?id=151627
Reviewed by Alexey Proskuryakov.
No new tests (No change in behavior).
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBGetResult.cpp: Added.
(WebCore::IDBGetResult::dataFromBuffer):
(WebCore::IDBGetResult::isolatedCopy):
* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::IDBGetResult):
(WebCore::IDBGetResult::valueBuffer):
(WebCore::IDBGetResult::keyData):
(WebCore::IDBGetResult::primaryKeyData):
(WebCore::IDBGetResult::keyPath):
(WebCore::IDBGetResult::setValueBuffer):
(WebCore::IDBGetResult::setKeyData):
(WebCore::IDBGetResult::setPrimaryKeyData):
(WebCore::IDBGetResult::setKeyPath):
(WebCore::IDBGetResult::dataFromBuffer): Deleted.
(WebCore::IDBGetResult::isolatedCopy): Deleted.
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::setGetResult):
* Modules/indexeddb/client/IDBCursorImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
* Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
(WebCore::GetOperation::perform):
* Modules/indexeddb/server/IDBBackingStore.h:
* Modules/indexeddb/server/MemoryCursor.h:
* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::currentData):
* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
* platform/CrossThreadCopier.h:
2015-11-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Do not use the WebCore garbage collector timer
https://bugs.webkit.org/show_bug.cgi?id=151623
Reviewed by Martin Robinson.
Now that garbage collector timers have been implemented in
JavaScriptCore for glib, we don't need to use another Timer in WebCore.
* bindings/js/GCController.cpp:
(WebCore::GCController::garbageCollectSoon):
(WebCore::GCController::garbageCollectNowIfNotDoneRecently):
2015-11-18 Andy Estes <aestes@apple.com>
[Content Filtering] Crash in DocumentLoader::notifyFinished() when allowing a media document to load
https://bugs.webkit.org/show_bug.cgi?id=151433
rdar://problem/23506594
Reviewed by Alexey Proskuryakov.
When the main resource of a media document commits, WebKit cancels its load since the plug-in or media engine
will do its own loading. If content filtering is enabled, and the filter waits allow the load until the entire
resource is downloaded, then ContentFilter will attempt to call DocumentLoader::notifyFinished() immediately
after delivering the buffered resource data to DocumentLoader. However, delivering the data will have nulled out
DocumentLoader's m_mainResource when the load was cancelled, leading to a crash in notifyFinished().
To resolve this, add a new Stopped state to ContentFilter. Set this state if DocumentLoader clears its main
resource or detaches from its frame. If ContentFilter is in the Stopped state after calling
DocumentLoader::dataReceived(), do not proceed to call DocumentLoader::notifyFinished().
Test: contentfiltering/allow-media-document.html
* loader/ContentFilter.cpp:
(WebCore::ContentFilter::stopFilteringMainResource): Set m_state to Stopped. If m_mainResource is non-null,
removed ContentFilter as a client and set m_mainResource to null.
(WebCore::ContentFilter::notifyFinished): Stopped calling DocumentLoader::notifyFinished() if m_state is Stopped
after calling DocumentLoader::dataReceived().
* loader/ContentFilter.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::detachFromFrame): Called ContentFilter::stopFilteringMainResource() instead of setting
m_contentFilter to null.
(WebCore::DocumentLoader::clearMainResource): Ditto.
2015-11-25 Pranjal Jumde <pjumde@apple.com>
Checks for buffer-overflows when reading characters from textRun
https://bugs.webkit.org/show_bug.cgi?id=151055
<rdar://problem/23251789>
Reviewed by Myles C. Maxfield.
Prevents an off by one error when adding the last font data to the GlyphBuffer.
* Source/WebCore/platform/graphics/WidthIterator.cpp:
* Source/WebCore/platform/graphics/FontCascade.cpp:
2015-11-24 Xabier Rodriguez Calvar <calvaris@igalia.com>
[Streams API] Implement pipeTo method in readable Stream
https://bugs.webkit.org/show_bug.cgi?id=151588
Reviewed by Darin Adler.
Implemented pipeTo method according to the reference implementation in the spec as the spec is not written
yet. It can be found at https://github.com/whatwg/streams/blob/632b26a05f3106650b1ec91239ad5b012e6c64af/reference-implementation/lib/readable-stream.js#L75.
Tests: streams/pipe-to.html
streams/reference-implementation/brand-checks.html
streams/reference-implementation/pipe-through.html
streams/reference-implementation/pipe-to.html
streams/reference-implementation/pipe-to-options.html
streams/reference-implementation/readable-stream-templated
* Modules/streams/ReadableStream.js:
(doPipe): Internal function of pipeTo.
(closeDest): Internal function of pipeTo.
(abortDest): Internal function of pipeTo.
(pipeTo): Implemented as per spec with some other internal functions as helpers.
2015-11-24 Antti Koivisto <antti@apple.com>
REGRESSION (r190983): Non-element, non-text nodes should not be distributed to slots
https://bugs.webkit.org/show_bug.cgi?id=151566
rdar://problem/23430177
Reviewed by Zalan Bujtas.
We don't invalidate slot assignments except for text or element children. Fix by not
not assigning other nodes to slots as it is not useful.
Test: fast/html/details-comment-crash.html
* dom/SlotAssignment.cpp:
(WebCore::slotNameFromSlotAttribute):
(WebCore::SlotAssignment::findAssignedSlot):
(WebCore::SlotAssignment::assignSlots):
2015-11-23 David Kilzer <ddkilzer@apple.com>
Hardening against CSSSelector double frees
<http://webkit.org/b/56124>
<rdar://problem/9119036>
Reviewed by Antti Koivisto.
Add some security assertions to catch this issue if it ever
happens in Debug builds, and make changes in
CSSSelector::~CSSSelector() and
CSSSelectorList::deleteSelectors() to prevent obvious issues if
they're ever called twice in Release builds.
No new tests because we don't know how to reproduce this.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::CSSSelector): Initialize
m_destructorHasBeenCalled.
* css/CSSSelector.h:
(WebCore::CSSSelector::m_destructorHasBeenCalled): Add bitfield.
(WebCore::CSSSelector::CSSSelector): Initialize
m_destructorHasBeenCalled.
(WebCore::CSSSelector::~CSSSelector): Add security assertion
that this is never called twice. Clear out any fields that
would have caused us to dereference an object twice.
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::deleteSelectors): Clear
m_selectorArray when freeing the memory to which it was
pointing. This prevents re-entrancy issues or calling this
method twice on the same thread. Also restructure the for()
loop to prevent calling CSSSelector::isLastInSelectorList()
after CSSSelector::~CSSSelector() has been called (via CRBug
241892).
2015-11-23 Brian Burg <bburg@apple.com>
Web Inspector: inspector settings should not be shared between different inspection levels
https://bugs.webkit.org/show_bug.cgi?id=151151
Reviewed by Timothy Hatcher.
InspectorController and InspectorFrontendClient should know how to compute their
inspection levels, so that this level can be exposed to the Inspector frontend for
preference disambiguation by inspection level.
- A Page with normal web content has an inspection level of 0.
- The first Web Inspector has an inspection level of 1.
- The second Web Inspector that inspects the Inspector has an inspection level of 2.
- And so forth...
For local frontend clients (WK1 and the ProtocolTestStub), the inspection level of
a Page computed as follows:
- If the page's inspector controller has no frontend client, then the Page
is normal web content (level 0).
- If the page's inspector controller has a frontend client, ask for its inspection level.
A frontend client looks at the inspection level reported by inspected page's inspector
controller and increments by one to account for the crossed inspection boundary.
No new tests, this is blocked by test infrastructure fixes (https://webkit.org/b/151573).
* inspector/InspectorController.cpp:
(WebCore::InspectorController::inspectionLevel): Added.
(WebCore::InspectorController::hasInspectorFrontendClient): Deleted.
* inspector/InspectorController.h:
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::canAttachWindow): Check inspectionLevel().
(WebCore::InspectorFrontendClientLocal::inspectionLevel): Added.
* inspector/InspectorFrontendClientLocal.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::inspectionLevel): Added.
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate): Check inspectionLevel().
2015-11-20 Brian Burg <bburg@apple.com>
Web Inspector: RemoteInspector should track targets and connections for remote automation
https://bugs.webkit.org/show_bug.cgi?id=151042
Reviewed by Joseph Pecoraro.
Use the new RemoteControllableTarget API method names.
No new tests, no behavior change.
* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::connect):
(WebCore::PageDebuggable::dispatchMessageFromRemote):
(WebCore::PageDebuggable::dispatchMessageFromRemoteFrontend): Deleted.
* page/PageDebuggable.h:
2015-11-23 Brady Eidson <beidson@apple.com>
Modern IDB: Unskip all indexeddb/mozilla tests that pass.
https://bugs.webkit.org/show_bug.cgi?id=151568
Reviewed by Alex Christensen.
No new tests (Lots of skipped existing tests now pass).
* Modules/indexeddb/shared/IDBError.h:
2015-11-23 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
Add WebCore namespace for generated bindings for supplemental method calls
https://bugs.webkit.org/show_bug.cgi?id=151431
Reviewed by Alex Christensen.
Address build failures for generated supplemental method calls which are in the WebCore namespace.
The bindings are outside the WebCore namespace - so add WebCore namespace specifier where required.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
(WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
(WebCore::jsTestInterfaceSupplementalStr1):
(WebCore::jsTestInterfaceSupplementalStr2):
(WebCore::jsTestInterfaceSupplementalNode):
(WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
(WebCore::setJSTestInterfaceSupplementalStr2):
(WebCore::setJSTestInterfaceSupplementalNode):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
(WebCore::jsTestInterfaceConstructorFunctionSupplementalMethod4):
* bindings/scripts/test/ObjC/DOMTestInterface.mm:
(-[DOMTestInterface supplementalStr1]):
(-[DOMTestInterface supplementalStr2]):
(-[DOMTestInterface setSupplementalStr2:]):
(-[DOMTestInterface supplementalStr3]):
(-[DOMTestInterface setSupplementalStr3:]):
(-[DOMTestInterface supplementalNode]):
(-[DOMTestInterface setSupplementalNode:]):
(-[DOMTestInterface builtinAttribute]):
(-[DOMTestInterface setBuiltinAttribute:]):
(-[DOMTestInterface supplementalMethod1]):
(-[DOMTestInterface supplementalMethod2:objArg:]):
(-[DOMTestInterface supplementalMethod3]):
(-[DOMTestInterface supplementalMethod4]):
(-[DOMTestInterface builtinFunction]):
2015-11-23 Brady Eidson <beidson@apple.com>
Modern IDB: When a transaction is aborted, call onerror handlers for all in-progress requests.
https://bugs.webkit.org/show_bug.cgi?id=151550
Reviewed by Alex Christensen.
Test: storage/indexeddb/modern/abort-requests-cancelled.html
storage/indexeddb/modern/idbtransaction-objectstore-failures.html (with changes)
storage/indexeddb/modern/index-5.html (with changes)
Various (currently skipped) legacy IDB tests.
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::transaction):
(WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
(WebCore::IDBClient::IDBDatabase::didStartTransaction):
(WebCore::IDBClient::IDBDatabase::willCommitTransaction):
(WebCore::IDBClient::IDBDatabase::didCommitTransaction):
(WebCore::IDBClient::IDBDatabase::willAbortTransaction):
(WebCore::IDBClient::IDBDatabase::didAbortTransaction):
(WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abort):
(WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
(WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer):
(WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
(WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
(WebCore::IDBClient::IDBTransaction::didDeleteObjectStoreOnServer):
(WebCore::IDBClient::IDBTransaction::didDeleteIndexOnServer):
(WebCore::IDBClient::IDBTransaction::immediateAbort): Deleted.
(WebCore::IDBClient::IDBTransaction::abortOnServer): Deleted.
* Modules/indexeddb/client/IDBTransactionImpl.h:
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
* Modules/indexeddb/shared/IDBError.cpp:
(WebCore::idbErrorName):
(WebCore::idbErrorDescription):
* Modules/indexeddb/shared/IDBError.h:
* Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::IDBResourceIdentifier::loggingString):
* Modules/indexeddb/shared/IDBResourceIdentifier.h:
2015-11-23 Brady Eidson <beidson@apple.com>
Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
https://bugs.webkit.org/show_bug.cgi?id=151557
Reviewed by Alex Christensen.
No new tests (Unskipping existing test storage/indexeddb/mozilla/global-data.html).
- Reworking some invalid ASSERTS
- Actually opening pending open-database-requests after a version change transaction completes
- Allow starting new transactions when the version change transaction has *started* finishing,
but before it finishes finishing.
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::transaction):
* Modules/indexeddb/client/IDBTransactionImpl.h:
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):
* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2015-11-23 Youenn Fablet <youenn.fablet@crf.canon.fr>
Remove DOMPromiseWithCallback
https://bugs.webkit.org/show_bug.cgi?id=151565
Reviewed by Eric Carlson.
DOMPromiseWithCallback is no longer used as WebCore JS built-ins are used to the cases where DOMPromiseWithCallback made sense.
No change in behavior.
* Modules/mediastream/MediaDevices.h: Moved from DOMPromiseWithCallback to DOMPromise since the API is now called by JS built-ins.
* bindings/js/JSDOMPromise.h:
(WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback): Deleted.
(WebCore::DOMPromiseIteratorWithCallback::DOMPromiseIteratorWithCallback): Deleted.
(WebCore::Error>::resolve): Deleted.
(WebCore::Error>::reject): Deleted.
(WebCore::Error>::resolveEnd): Deleted.
2015-11-23 Brian Burg <bburg@apple.com>
Web Inspector: when inspecting the inspector, add the inspection level to the title bar
https://bugs.webkit.org/show_bug.cgi?id=151555
Reviewed by Timothy Hatcher.
* English.lproj/Localizable.strings: add new localized string for alternate inspector title.
2015-11-23 Zan Dobersek <zdobersek@igalia.com>
[GStreamer] No need to assert the pipeline's bus presence in MediaPlayerPrivateGStreamerBase dtor
https://bugs.webkit.org/show_bug.cgi?id=151558
Reviewed by Carlos Garcia Campos.
In the MediaPlayerPrivateGStreamerBase destructor, there's some leftover code
that acquires a reference to the GStreamer pipeline's bus object and then
just asserts that it's not null. Not very useful, so remove it.
Also use nullptr to null out the m_player member.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2015-11-17 Sergio Villar Senin <svillar@igalia.com>
ASSERTION FAILED: freeSpace >= 0 in WebCore::RenderGrid::computeTrackSizesForDirection
https://bugs.webkit.org/show_bug.cgi?id=151254
Reviewed by Darin Adler.
When in quirks mode, abnormally huge margins could lead to
negative computations of available logical sizes. We could add
an !document.inQuirksMode() check in the assertion but since
negative freeSpace values are valid (i.e. the condition is not
really part of the contract and everything will work as
expected) I've decided to simply remove it.
Test: fast/css-grid-layout/grid-quirks-mode-huge-margin-crash.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeTrackSizesForDirection): Deleted.
2015-11-22 Myles C. Maxfield <mmaxfield@apple.com>
Font selection should not consult font-variant property
https://bugs.webkit.org/show_bug.cgi?id=151537
Reviewed by Simon Fraser.
In section 4.7 of the CSS Fonts Level 3 spec, it says "[The font-variant and
font-feature-settings] do not affect font selection."
All the other browsers (Chrome, Firefox, and Edge) all obey the spec here. We
are the only one who misbehaves. This patch aligns our behavior with the other
browsers.
Test: fast/text/font-selection-font-variant.html
* css/CSSFontSelector.cpp:
(WebCore::computeTraitsMask): Deleted.
(WebCore::compareFontFaces): Deleted.
(WebCore::CSSFontSelector::getFontFace): Deleted.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::CSSParser): Deleted.
(WebCore::CSSParser::parseValue): Deleted.
(WebCore::CSSParser::parseDeclaration): Deleted.
(WebCore::CSSParser::clearProperties): Deleted.
(WebCore::CSSParser::parseFontVariant): Deleted.
(WebCore::CSSParser::createStyleRule): Deleted.
(WebCore::CSSParser::deleteFontFaceOnlyValues): Deleted.
* css/CSSParser.h:
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::traitsMask): Deleted.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::traitsInFamilyEnumProc):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::toTraitsMask):
* platform/text/TextFlags.h:
2015-11-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed, rolling out r192727.
It made the selections transparent again and broke
/webkit2/WebKitWebView/snapshot
Reverted changeset:
"[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor,
et. al. should not clobber state of cached GtkStyleContexts"
https://bugs.webkit.org/show_bug.cgi?id=151533
http://trac.webkit.org/changeset/192727
2015-11-22 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor, et. al. should not clobber state of cached GtkStyleContexts
https://bugs.webkit.org/show_bug.cgi?id=151533
Reviewed by Carlos Garcia Campos.
platformActiveSelectionBackgroundColor(), platformInactiveSelectionBackgroundColor(), etc.
are const functions intended only to return a color used for painting, but since r174929
they also change the state of the cached style contexts we use for GTK_TYPE_ENTRY and
GTK_TYPE_TREE_VIEW. That's wrong; those style contexts should not have any state set. This
could cause theme colors returned by those GtkStyleContexts to change unexpectedly,
depending on whether the state is explicitly set before each use, or whether the theme
actually uses the states.
This didn't cause any regression only because every place using these style contexts
explicitly sets the state of the style contexts before use. In fact, the GtkTreeView style
context is not used anywhere else, and the GtkEntry style context is only used in
paintTextField, which does set the state before use (and then reverts it using
save/restore), so this cannot have broken anything in practice. But it's a landmine waiting
for the next programmer to trip it.
Fix this with a gtk_style_context_save()/gtk_style_context_restore() pair.
* rendering/RenderThemeGtk.cpp:
(WebCore::styleColor):
2015-11-21 Myles C. Maxfield <mmaxfield@apple.com>
Tiny cleanup in ComplexTextController::collectComplexTextRuns()
https://bugs.webkit.org/show_bug.cgi?id=151534
Reviewed by Zalan Bujtas.
The isMissingGlyph boolean is completely unnecessary. Its entire
responsiblity is duplicated by the "font" pointer.
No new tests because there is no behavior change.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::collectComplexTextRuns):
== Rolled over to ChangeLog-2015-11-21 ==