blob: 02338b5129c63dc6e849874a2beeb6a83c572f7a [file] [log] [blame]
2016-01-29 Simon Fraser <simon.fraser@apple.com>
image-rendering: -webkit-optimize-contrast not working for background images
https://bugs.webkit.org/show_bug.cgi?id=97991
Reviewed by Darin Adler.
Don't equate "pixelated" and "crisp-edges" values for image-rendering with low
quality scaling; they should map to InterpolationNone, not InterpolationLow.
To support this change ImageQualityController to return a InterpolationQuality
from the renamed chooseInterpolationQuality(). If the returned value is not
InterpolationDefault, set the GraphicsContext image interpolation when drawing
images and image buffers.
Remove the redundant "useLowQualityScale" from
Test: fast/images/image-rendering-interpolation.html
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* html/HTMLCanvasElement.h:
* page/DragController.cpp:
(WebCore::DragController::doImageDrag):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawTiledImage):
(WebCore::GraphicsContext::drawImageBuffer):
(WebCore::GraphicsContext::drawConsumingImageBuffer):
(WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer): Deleted.
(WebCore::InterpolationQualityMaintainer::~InterpolationQualityMaintainer): Deleted.
* platform/graphics/GraphicsContext.h:
(WebCore::ImagePaintingOptions::ImagePaintingOptions):
(WebCore::ImagePaintingOptions::usesDefaultInterpolation):
(WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):
(WebCore::InterpolationQualityMaintainer::~InterpolationQualityMaintainer):
* platform/graphics/GraphicsTypes.h:
* platform/graphics/ImageBuffer.h:
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::drawConsuming):
(WebCore::ImageBuffer::draw):
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::interpolationQualityFromStyle):
(WebCore::ImageQualityController::chooseInterpolationQuality):
(WebCore::ImageQualityController::ImageQualityController): Deleted.
(WebCore::ImageQualityController::shouldPaintAtLowQuality): Deleted.
* rendering/ImageQualityController.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::chooseInterpolationQuality):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::shouldPaintAtLowQuality): Deleted.
* rendering/RenderBoxModelObject.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintSnapshotImage):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot):
* rendering/style/RenderStyle.h:
2016-01-29 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/modern/index-3.html fails.
https://bugs.webkit.org/show_bug.cgi?id=153661
Reviewed by Tim Horton.
No new tests (1 failing test now passes, others get closer).
When indexing a new record fails due to uniqueness constraints, remove all traces of the record.
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
2016-01-29 Brent Fulgham <bfulgham@apple.com>
[WebGL] Check vertex array bounds before permitting a glDrawArrays to execute
https://bugs.webkit.org/show_bug.cgi?id=153643
<rdar://problem/23424456>
Reviewed by Dean Jackson.
Tested by fast/canvas/webgl/webgl-drawarrays-crash.html.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::validateDrawArrays): Make sure that we have at
least one buffer bound to a program if a drawArray call with a non-zero range of
requested data is being made.
(WebCore::WebGLRenderingContextBase::validateDrawElements): Drive-by formatting fix.
2016-01-29 Brady Eidson <beidson@apple.com>
Modern IDB: Fix logging that overwhelms python with strings of excessive length.
https://bugs.webkit.org/show_bug.cgi?id=153652
Reviewed by Tim Horton.
No new tests (Two skipped tests now pass).
* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::loggingString): Limit the length of the string.
* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::loggingString): Limit the length of the string.
2016-01-29 Jer Noble <jer.noble@apple.com>
Unreviewed Windows build fix; one more ResourceLoaderOptions call site which needs to
be updated after adding the CachingPolicy parameter.
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::startLoading):
2016-01-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement overlay scrollbars
https://bugs.webkit.org/show_bug.cgi?id=153405
Reviewed by Michael Catanzaro.
Add support for overlay scrollbars to GTK+ platform following the
same style and behavior than GtkScrolledWindow. They are only
available for GTK+ >= 3.19, but honoring the GTK_OVERLAY_SCROLLING
environment variable, so they could be disable at run time, except
when threaded compositor is enabled. A new ScrollAnimator class
has been added for GTK+ to implement overlay scrollbars and still
allow smooth scrolling when available.
* PlatformGTK.cmake: Add ScrollAnimatorGtk and stop building ScrollAnimatorSmooth.
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::ScrollAnimator::mouseEnteredContentArea):
Remove const to allow the ScrollAnimator to be updated.
(WebCore::ScrollAnimator::ScrollAnimator::mouseExitedContentArea): Ditto.
(WebCore::ScrollAnimator::ScrollAnimator::mouseMovedInContentArea): Ditto.
(WebCore::ScrollAnimator::ScrollAnimator::contentAreaDidShow): Ditto.
(WebCore::ScrollAnimator::ScrollAnimator::contentAreaDidHide): Ditto.
* platform/Scrollbar.h:
(WebCore::Scrollbar::opacity): Get scrollbar opacity.
(WebCore::Scrollbar::setOpacity): Set scrollbar opacity.
* platform/gtk/ScrollAnimatorGtk.cpp: Added.
(WebCore::ScrollAnimator::create): Create a ScrollAnimatorGtk.
(WebCore::ScrollAnimatorGtk::ScrollAnimatorGtk):
(WebCore::ScrollAnimatorGtk::~ScrollAnimatorGtk):
(WebCore::ScrollAnimatorGtk::ensureSmoothScrollingAnimation):
Initialize the ScrollAnimationSmooth if it doesn't exist.
(WebCore::ScrollAnimatorGtk::scroll): Ensure we have a
ScrollAnimationSmooth if smooth scrolling is enabled. This also
fixes the problem of having to reload the page after changing the
smooth scrolling setting.
(WebCore::ScrollAnimatorGtk::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorGtk::willEndLiveResize):
(WebCore::ScrollAnimatorGtk::didAddVerticalScrollbar): Register
the scrollbar if it's an overlay scrollbar and make it visible
without animating it. Start the hide animation.
(WebCore::ScrollAnimatorGtk::didAddHorizontalScrollbar): Ditto.
(WebCore::ScrollAnimatorGtk::willRemoveVerticalScrollbar):
Unregister the scrollbar if it was registered and resrt the
animation state if it was the only scrollbar.
(WebCore::ScrollAnimatorGtk::willRemoveHorizontalScrollbar): Ditto.
(WebCore::ScrollAnimatorGtk::updateOverlayScrollbarsOpacity): Update
the scrollbars opacity and invalidate the indicator.
(WebCore::easeOutCubic):
(WebCore::ScrollAnimatorGtk::overlayScrollbarAnimationTimerFired):
Update the scrollbars opacity and schedule a next frame if the
animation didn't finish or start the hide animation otherwhise.
(WebCore::ScrollAnimatorGtk::showOverlayScrollbars): Start the
fade animation to show the scrollbars if needed.
(WebCore::ScrollAnimatorGtk::hideOverlayScrollbars): Start the
dafe animation to hide the scrollbars if needed.
(WebCore::ScrollAnimatorGtk::mouseEnteredContentArea): Call
showOverlayScrollbars().
(WebCore::ScrollAnimatorGtk::mouseExitedContentArea): Call
hideOverlayScrollbars().
(WebCore::ScrollAnimatorGtk::mouseMovedInContentArea): Call
showOverlayScrollbars().
(WebCore::ScrollAnimatorGtk::contentAreaDidShow): Ditto.
(WebCore::ScrollAnimatorGtk::contentAreaDidHide): Hide the
scrollbars without animations.
(WebCore::ScrollAnimatorGtk::notifyContentAreaScrolled): Call
showOverlayScrollbars().
(WebCore::ScrollAnimatorGtk::lockOverlayScrollbarStateToHidden):
Update the lock state and hide or show the scrollbars when locked
or unlocked.
* platform/gtk/ScrollAnimatorGtk.h: Added.
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::backButtonRect): Pass
StyleContextMode to getOrCreateStyleContext depending on the
painting parameter.
(WebCore::ScrollbarThemeGtk::forwardButtonRect): Ditto.
(WebCore::ScrollbarThemeGtk::trackRect): Ditto.
(WebCore::ScrollbarThemeGtk::getOrCreateStyleContext): Add
StyleContextMode parameter to add the hovering class
unconditionally when using overlay scrollbars in layout mode. In
paint mode we add the hovering clas only when the scrollbar is
hovered. This way we always claim the size of the scrollbar when
hovered to be able to show the full scrollbar when the mouse is
close enough to the indicator.
(WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Initialize
m_usesOverlayScrollbars.
(WebCore::ScrollbarThemeGtk::thumbRect): Pass the scrollbar to
getOrCreateStyleContext().
(WebCore::adjustRectAccordingToMargin): Fix the top margin.
(WebCore::ScrollbarThemeGtk::paintTrackBackground): Pass the
scrollbar and paint mode to getOrCreateStyleContext().
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
(WebCore::ScrollbarThemeGtk::paintThumb): Adjust the thumb
rectangle when overlay scrollbar is not hovered to its current
size, since we always claim the size of the scrollbar in hovered
mode.
(WebCore::ScrollbarThemeGtk::paintButton): Pass the scrollbar and
paint mode to getOrCreateStyleContext().
(WebCore::ScrollbarThemeGtk::paint): Take the scrollbar opacity
into account when rendering overlay scrollbars as indicators. Also
get the scrollbar opacity from the GTK+ theme and use a
transparency group when the global opacity is not full opaque.
(WebCore::ScrollbarThemeGtk::buttonSize): Pass the scrollbar to
getOrCreateStyleContext().
* platform/gtk/ScrollbarThemeGtk.h:
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
2016-01-29 ChangSeok Oh <changseok.oh@collabora.com>
[GStreamer] built-in media player doesn't update
https://bugs.webkit.org/show_bug.cgi?id=151816
Reviewed by Xabier Rodriguez-Calvar.
The timeline of audio controls in media document is not properly updated since it is assumed
that the controls are hidden as soon as playing. However, such full page audio always has
opacity : 1 declared by video:-webkit-full-page-media::-webkit-media-controls-panel.no-video.
i.e. it is not actually hidden. We can fix this by simply returning false for no-video media
in controlsAreHidden();
Test: media/audio-controls-timeline-in-media-document.html
* Modules/mediacontrols/mediaControlsBase.js:
(Controller.prototype.controlsAreAlwaysVisible):
(Controller.prototype.controlsAreHidden):
2016-01-29 Manuel Rego Casasnovas <rego@igalia.com>
[css-grid] Store lines instead of tracks in GridResolvedPosition
https://bugs.webkit.org/show_bug.cgi?id=153592
Reviewed by Sergio Villar Senin.
Due to the new feature that allows to create implicit tracks before the
explicit ones, we will need to use lines instead of tracks in the
code to be able to implement it properly.
This is just a first simple patch using lines instead of tracks in
GridResolvedPosition. It modifies the code that was using it, as it was
considering that the resolvedFinalPosition was a track index and
not a line index.
So if we've an item positioned like:
grid-column: 2 / 5;
grid-row: 1 / span 2;
Before we were storing this information on the GridSpan:
* columns:
* resolvedInitialPosition: 1
* resolvedFinalPosition: 3
* rows:
* resolvedInitialPosition: 0
* resolvedFinalPosition: 1
And now we're storing:
* columns:
* resolvedInitialPosition: 1
* resolvedFinalPosition: 4
* rows:
* resolvedInitialPosition: 0
* resolvedFinalPosition: 2
No new tests, no change of behavior.
* css/CSSGridTemplateAreasValue.cpp:
(WebCore::stringForPosition):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTemplateAreasRow):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::ensureGridSize):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
* rendering/RenderGrid.h:
* rendering/style/GridCoordinate.h:
(WebCore::GridSpan::GridSpan):
(WebCore::GridSpan::integerSpan):
(WebCore::GridSpan::end):
(WebCore::GridCoordinate::GridCoordinate):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
(WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
(WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
(WebCore::resolveGridPositionAgainstOppositePosition):
(WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
(WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
(WebCore::resolveNamedGridLinePositionFromStyle): Deleted.
* rendering/style/GridResolvedPosition.h:
2016-01-28 Brady Eidson <beidson@apple.com>
Modern IDB: SQLite backend mismanages key generator values.
https://bugs.webkit.org/show_bug.cgi?id=153625
Reviewed by Andy Estes.
No new tests (Many failing tests pass, a few get closer).
There's mixed assumptions about whether the value stored is the current value or the next value.
Fixing those assumptions fixes tests.
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber): Store/retrieve the correct value.
(WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber): Ditto.
(WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber): Ditto.
2016-01-28 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: InspectorTimelineAgent doesn't need to recompile functions because it now uses the sampling profiler
https://bugs.webkit.org/show_bug.cgi?id=153500
<rdar://problem/24352458>
Reviewed by Timothy Hatcher.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::supportsLegacyProfiling):
(WebCore::JSDOMWindowBase::supportsRichSourceInfo):
(WebCore::JSDOMWindowBase::supportsProfiling): Deleted.
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::supportsLegacyProfiling):
(WebCore::JSWorkerGlobalScopeBase::supportsProfiling): Deleted.
* bindings/js/JSWorkerGlobalScopeBase.h:
* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::legacyProfilerEnabled):
(WebCore::InspectorController::setLegacyProfilerEnabled):
Be more explicit about enabling legacy profiling.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend): Deleted.
TimelineAgent doesn't need to recompile if using the sampling profiler.
This breaks console.profile, but console.profile should move to using
the sampling profiler as well.
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::stopFromConsole):
(WebCore::startProfiling): Deleted.
(WebCore::stopProfiling): Deleted.
Inlined the use once static functions.
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::profile):
(WebCore::PageConsoleClient::profileEnd):
Added FIXMEs for improving console.profile and profileEnd.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setLegacyJavaScriptProfilingEnabled):
(WebCore::Internals::setJavaScriptProfilingEnabled): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
Be more explicit about enabling legacy profiling.
2016-01-28 Chris Dumez <cdumez@apple.com>
Move attributes to the prototype for List types / and types with indexed/named property getters
https://bugs.webkit.org/show_bug.cgi?id=153599
Reviewed by Darin Adler.
Move attributes to the prototype for List types / and types with indexed/named property getters.
We used to keep them on the instance because:
1. Our GetOwnProperty lookup used to be in incorrect order for interfaces with indexed/named property getters.
-> This was fixed recently and we now match the specification and other browsers.
2. This used to regress performance when iterating over those list types
-> Local testing seems to show that this is no longer a regression (tested Speedometer and various related Bindings PerformanceTests).
No new tests, already covered by existing tests.
* bindings/scripts/CodeGeneratorJS.pm:
(InterfaceRequiresAttributesOnInstance): Deleted.
(AttributeShouldBeOnInstanceForCompatibility): Deleted.
2016-01-28 Antti Koivisto <antti@apple.com>
Tab suspension code hits asserts
Reviewed by Chris Dumez.
Enabling tab suspension and navigating around in a few tabs hits an assert in
ScriptExecutionContext::suspendActiveDOMObject. This is because suspend/resume reasons don't pair properly
* dom/Document.cpp:
(WebCore::Document::documentWillBecomeInactive):
(WebCore::Document::suspend):
(WebCore::Document::resume):
Provide the reason as argument.
* dom/Document.h:
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
No need to call resumeActiveDOMObjects/resumeScriptedAnimationControllerCallbacks explicitly as Document::resume does that.
(WebCore::CachedFrame::CachedFrame):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
* page/Page.cpp:
(WebCore::Page::canTabSuspend):
(WebCore::Page::setIsTabSuspended):
2016-01-28 Brady Eidson <beidson@apple.com>
Modern IDB: Fix several more problems with object store changes during cursor iteration in SQLite backend.
https://bugs.webkit.org/show_bug.cgi?id=153616
Reviewed by Alex Christensen.
No new tests (A few failing tests pass, a few get closer).
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
(WebCore::IDBServer::SQLiteIDBCursor::bindArguments):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
2016-01-28 Daniel Bates <dabates@apple.com>
Cleanup: Make DedicatedWorkerThread::create() an inline template method
https://bugs.webkit.org/show_bug.cgi?id=153612
Reviewed by Andy Estes.
Make use of variadic template arguments and std::forward() to forward the arguments passed
from DedicatedWorkerThread::create() to DedicatedWorkerThread::DedicatedWorkerThread(). This
removes the need to duplicate code whenever we modify the parameter types or number of
parameters taken by DedicatedWorkerThread::DedicatedWorkerThread().
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::create): Deleted.
* workers/DedicatedWorkerThread.h: Reorganized listing of member functions such that we
group the creation/constructor and destructor functions.
(WebCore::DedicatedWorkerThread::create): Modified to be an inline template with variadic
parameters that std::forward()s its arguments to DedicatedWorkerThread::DedicatedWorkerThread().
2016-01-28 Brady Eidson <beidson@apple.com>
Modern IDB: SQLite backend doesn't handle mutation during cursor iteration.
https://bugs.webkit.org/show_bug.cgi?id=153614
Reviewed by Alex Christensen.
No new tests (A few failing tests pass, a few get closer).
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange): Call notifyCursorsOfChanges.
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Ditto.
* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
(WebCore::IDBServer::SQLiteIDBCursor::~SQLiteIDBCursor):
* Modules/indexeddb/server/SQLiteIDBCursor.h:
* Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
(WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor): Remember these transient backing
store cursors so they can be notified of changes.
(WebCore::IDBServer::SQLiteIDBTransaction::closeCursor): Handle removing the cursor from the right set.
(WebCore::IDBServer::SQLiteIDBTransaction::notifyCursorsOfChanges):
* Modules/indexeddb/server/SQLiteIDBTransaction.h:
2016-01-28 Brady Eidson <beidson@apple.com>
Modern IDB: SQLite backend doesn't support deleting ranges with more than one key.
https://bugs.webkit.org/show_bug.cgi?id=153604
Reviewed by Andy Estes.
No new tests (A few failing tests pass, a few get closer).
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
2016-01-28 Alex Christensen <achristensen@webkit.org>
Fix Windows build after r195774.
* platform/network/ParsedContentRange.cpp:
2016-01-28 Anders Carlsson <andersca@apple.com>
Add an ArrayValue::get overload that returns a string
https://bugs.webkit.org/show_bug.cgi?id=153613
Reviewed by Tim Horton.
* bindings/js/ArrayValue.cpp:
(WebCore::ArrayValue::get):
* bindings/js/ArrayValue.h:
2016-01-28 Chris Dumez <cdumez@apple.com>
EventHandler IDL attributes should be enumerable
https://bugs.webkit.org/show_bug.cgi?id=153595
Reviewed by Sam Weinig.
Most of our EventHandler IDL attributes were marked as [NotEnumerable]
but should not have been according to the specification:
- https://html.spec.whatwg.org/#globaleventhandlers
- https://html.spec.whatwg.org/#windoweventhandlers
Firefox and Chrome behave according to the specification.
This patch aligns our behavior.
No new tests, already covered by existing tests.
* dom/Document.idl:
* dom/GlobalEventHandlers.idl:
* page/WindowEventHandlers.idl:
2016-01-28 Jer Noble <jer.noble@apple.com>
Windows build fix; PRId64 formatting macro for int64_t undefined, so provide Windows-specific alternative.
* platform/network/ParsedContentRange.cpp:
2016-01-28 ChangSeok Oh <changseok.oh@collabora.com>
[ThreadedCompositor] Fix flickers happening on video when entering/leaving fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=153585
Reviewed by Michael Catanzaro.
Video thumbnail flickers where threaded compositor is enabled. This is because
a content buffer is not set to a target layer which changes before swapBuffer.
This is a very rare case though, it happens where video size changes many times in a short period.
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
(WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):
2016-01-27 Jer Noble <jer.noble@apple.com>
Allow CachedResourceLoader clients to opt out of the MemoryCache.
https://bugs.webkit.org/show_bug.cgi?id=153549
Reviewed by Darin Adler.
Add a flag to ResourceLoaderOptions which allow loader clients to opt out of having
resources stored in the MemoryCache.
* loader/ResourceLoaderOptions.h:
(WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
(WebCore::ResourceLoaderOptions::cachingPolicy):
Existing clients will have to add the (default) AllowCaching flag when they create a
ResourceLoaderOptions object.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::start):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
(WebCore::ResourceLoaderOptions::setCachingPolicy):
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading):
Every time the CachedResource or CachedResourceLoader accesses the MemoryCache, check
to see whether the resource or the request have allowed caching before adding resources
to, removing resources from, or sourcing resource data from the MemoryCache.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::~CachedResource):
(WebCore::CachedResource::failBeforeStarting):
(WebCore::CachedResource::addClientToSet):
(WebCore::CachedResource::removeClient):
(WebCore::CachedResource::setDecodedSize):
(WebCore::CachedResource::setEncodedSize):
(WebCore::CachedResource::didAccessDecodedData):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::allowsCaching):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::printPreloadStats):
(WebCore::CachedResourceLoader::defaultCachedResourceOptions):
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::allowsCaching):
2016-01-28 Enrica Casucci <enrica@apple.com>
Should avoid navigation for some data detector urls.
https://bugs.webkit.org/show_bug.cgi?id=153600
Reviewed by Tim Horton.
Adding helper function to decide whether the default action should be performed.
* editing/cocoa/DataDetection.h:
* editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::shouldCancelDefaultAction):
2016-01-28 Dave Hyatt <hyatt@apple.com>
Roll out r194555, as it introduced some bad regressions and was not
correct.
* rendering/RenderText.cpp:
(WebCore::RenderText::computePreferredLogicalWidths):
2016-01-28 Brady Eidson <beidson@apple.com>
Modern IDB: Index uniqueness broken in the SQLite backend.
https://bugs.webkit.org/show_bug.cgi?id=153596
Reviewed by Alex Christensen.
No new tests (Many failing tests now pass, others improve).
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateIndexesForAddRecord): Deleted.
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
2016-01-08 Jer Noble <jer.noble@apple.com>
Custom protocol loading through AVFoundation does not support byte-range requests.
https://bugs.webkit.org/show_bug.cgi?id=152919
<rdar://problem/23664657>
Reviewed by Alex Christensen.
Tests: http/tests/xmlhttprequest/blob-request-byte-range.html
TestWebkitAPI/Tests/WebCore/ParsedContentRange.cpp
When loading data through the AVAssetResourceLoaderDelegateProtocol, AVFoundation will issue
requests for specific byte-ranges by adding a "Range:" HTTP header to the NSURLRequest it
passes to the delegate. WebCore ignores this header, loads the entire resource, and replies
to the callback with the requested subset of the entire resource.
For byte-range requests near the end of a resource, this is inefficient, as the entire
resource up to, and including, the requested range must be loaded before any data can be
returned. Explicitly handle byte-range requests by creating a CachedResourceRequest with the
underlying NSURLRequest (which includes the "Range:" header) rather than just the request's
URL. BlobResourceHandle must be modified to add the "Content-Range:" response header to the
ResourceResponse.
To facilitate both generating and parsing the "Content-Range:" header, add a new
ParsedContentRange class for use by ResourceResponse and its clients. This class provides
methods both for parsing a "Content-Range" header value string, and for generating the
header value from elemental values.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading):
(WebCore::WebCoreAVFResourceLoader::responseReceived):
(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::BlobResourceHandle):
(WebCore::BlobResourceHandle::didGetSize):
(WebCore::BlobResourceHandle::seek):
(WebCore::BlobResourceHandle::notifyResponseOnSuccess):
* platform/network/BlobResourceHandle.h:
* platform/network/HTTPHeaderNames.in:
* platform/network/ParsedContentRange.cpp: Added.
(WebCore::areContentRangeValuesValid):
(WebCore::parseContentRange):
(WebCore::ParsedContentRange::ParsedContentRange):
(WebCore::ParsedContentRange::headerValue):
* platform/network/ParsedContentRange.h: Added.
(WebCore::ParsedContentRange::ParsedContentRange):
(WebCore::ParsedContentRange::isValid):
(WebCore::ParsedContentRange::firstBytePosition):
(WebCore::ParsedContentRange::lastBytePosition):
(WebCore::ParsedContentRange::instanceLength):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::updateHeaderParsedState):
(WebCore::parseContentRangeInHeader):
(WebCore::ResourceResponseBase::contentRange):
* platform/network/ResourceResponseBase.h:
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2016-01-28 Chris Dumez <cdumez@apple.com>
Storage interface's attributes / operations should be enumerable
https://bugs.webkit.org/show_bug.cgi?id=153573
Reviewed by Darin Adler.
Storage interface's attributes / operations should be enumerable:
- https://html.spec.whatwg.org/#the-storage-interface
Firefox matches the specification.
No new tests, already covered by existing test.
* storage/Storage.idl:
2016-01-26 Ada Chan <adachan@apple.com>
Get WebVideoFullscreenManager and related classes to also compile for Mac platform
with video presentation mode support.
https://bugs.webkit.org/show_bug.cgi?id=153221
Reviewed by Eric Carlson.
No new tests, no actual behavior change with a stub implementation of WebVideoFullscreenInterfaceMac.
* WebCore.xcodeproj/project.pbxproj:
Add PlatformView.h, WebVideoFullscreenChangeObserver.h, and WebVideoFullscreenInterfaceMac.h.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::mediaPlayerEngineUpdated):
(WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction):
* html/HTMLMediaElement.h:
Enable the code that deals with the video fullscreen layer also for Mac platform with
video presentation mode support.
* platform/cocoa/PlatformView.h:
Header file for declaring the view types for each Cocoa platform.
* platform/cocoa/WebVideoFullscreenChangeObserver.h:
(WebCore::WebVideoFullscreenChangeObserver::~WebVideoFullscreenChangeObserver):
Interface declaration moved from WebVideoFullscreenInterfaceAVKit.h.
* platform/cocoa/WebVideoFullscreenInterface.h:
Stop guarding the declaration of WebVideoFullscreenInterface to be iOS specific. It is now
enabled for iOS and Mac platform with video presentation mode support.
* platform/cocoa/WebVideoFullscreenModel.h:
* platform/cocoa/WebVideoFullscreenModelVideoElement.h:
* platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
Enable also for Mac platform with video presentation mode support.
(WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer):
Set the video fullscreen layer's anchor point to (0, 0) since we are not changing the position of
the video layer on Mac.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
Import WebVideoFullscreenChangeObserver.h now that the interface declaration has been moved to that file.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
Move the declaration of WebVideoFullscreenChangeObserver to a separate header.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
Import WebVideoFullscreenChangeObserver.h now that the interface declaration has been moved to that file.
* platform/mac/WebVideoFullscreenInterfaceMac.h: Added.
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::~WebVideoFullscreenInterfaceMac):
(WebCore::WebVideoFullscreenInterfaceMac::setWebVideoFullscreenModel):
(WebCore::WebVideoFullscreenInterfaceMac::setWebVideoFullscreenChangeObserver):
(WebCore::WebVideoFullscreenInterfaceMac::resetMediaState):
(WebCore::WebVideoFullscreenInterfaceMac::setDuration):
(WebCore::WebVideoFullscreenInterfaceMac::setCurrentTime):
(WebCore::WebVideoFullscreenInterfaceMac::setBufferedTime):
(WebCore::WebVideoFullscreenInterfaceMac::setRate):
(WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
(WebCore::WebVideoFullscreenInterfaceMac::setSeekableRanges):
(WebCore::WebVideoFullscreenInterfaceMac::setCanPlayFastReverse):
(WebCore::WebVideoFullscreenInterfaceMac::setAudioMediaSelectionOptions):
(WebCore::WebVideoFullscreenInterfaceMac::setLegibleMediaSelectionOptions):
(WebCore::WebVideoFullscreenInterfaceMac::setExternalPlayback):
(WebCore::WebVideoFullscreenInterfaceMac::setWirelessVideoPlaybackDisabled):
(WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::cleanupFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::invalidate):
(WebCore::WebVideoFullscreenInterfaceMac::requestHideAndExitFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):
(WebCore::WebVideoFullscreenInterfaceMac::setMode):
(WebCore::WebVideoFullscreenInterfaceMac::clearMode):
(WebCore::WebVideoFullscreenInterfaceMac::mayAutomaticallyShowVideoPictureInPicture):
(WebCore::WebVideoFullscreenInterfaceMac::applicationDidBecomeActive):
(WebCore::supportsPictureInPicture):
Add a stub implementation of WebVideoFullscreenInterfaceMac.
2016-01-28 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
[SVG] Add support for 'lighter' operator in feComposite
https://bugs.webkit.org/show_bug.cgi?id=141376
Reviewed by Darin Adler.
Added new cases where needed to support the lighter (aka 'plus')
Porter Duff operator in SVG Filter Effects.
https://www.w3.org/TR/filter-effects/#valdef-operator-lighter
Note that in the specification, no constant was added to the IDL for
the lighter operator.
Test: svg/filters/feCompositeOpaque.html
svg/dom/script-tests/SVGAnimatedEnumeration-SVGFECompositeElement.js
* platform/graphics/filters/FEComposite.cpp:
(WebCore::FEComposite::platformApplySoftware):
Add case to support lighter.
(WebCore::operator<<):
Add case to support lighter for text stream operations.
* platform/graphics/filters/FEComposite.h:
Add case for lighter to CompositeOperationType enum.
* svg/SVGFECompositeElement.h:
(WebCore::SVGIDLEnumLimits<CompositeOperationType>::highestExposedEnumValue):
Higest exposed value is arithmetic - do not expose lighter.
(WebCore::SVGPropertyTraits<CompositeOperationType>::highestEnumValue):
Highest possible value is now lighter.
(WebCore::SVGPropertyTraits<CompositeOperationType>::toString):
Add case to support lighter.
(WebCore::SVGPropertyTraits<CompositeOperationType>::fromString):
Add case to support lighter.
2016-01-28 Darin Adler <darin@apple.com>
Remove equalIgnoringCase since all callers really wanted equalIgnoringASCIICase
https://bugs.webkit.org/show_bug.cgi?id=153411
Reviewed by Ryosuke Niwa.
Tests: fast/media/media-query-non-ASCII-case-folding.html
fast/dom/HTMLAnchorElement/anchor-non-ASCII-case-folding.html
fast/xpath/xpath-non-ASCII-case-folding.html
No tests included that cover the minor behavior changes in Document::setDomain,
CSPSource::schemeMatches, CSPSource::hostMatches, OriginAccessEntry::operator==,
UserContentURLPattern::matches, UserContentURLPattern::matchesHost,
ContentFilterUnblockHandler::canHandleRequest. Would like to add tests for those
if possible, but it seems clear all are progressions.
For background on why this is the right thing to do in almost every case:
- MIME types are all ASCII and not case sensitive (details in RFC 2045)
<http://tools.ietf.org/html/rfc2045>
- case insensitive comparisons in HTML are all "ASCII case-insensitive"
https://www.w3.org/TR/html/infrastructure.html#ascii-case-insensitive
- same for CSS
* Modules/webdatabase/DatabaseAuthorizer.cpp:
(WebCore::DatabaseAuthorizer::denyBasedOnTableName): Use equalIgnoringASCIICase.
No change in behavior since the string we are comparing with is always
"__WebKitDatabaseInfoTable__" in practice.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::siblingWithAriaRole): Changed argument type to take a const char*,
added some FIXMEs and use equalIgnoringCase. No change in behavior since the
strings we are comparing with are "menu" and "menuitem".
(WebCore::AccessibilityNodeObject::menuElementForMenuButton): Updated to pass
arguments in reverse order.
(WebCore::AccessibilityNodeObject::menuItemElementForMenu): Ditto.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontFaceValue): Use equalIgnoringASCIICase.
No change in behavior because the property names are all ASCII constants.
* css/CSSParserValues.h: Removed unused equalIgnoringCase function.
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::mediaTypeMatch): Use equalIgnoringASCIICase.
Changes behavior: No non-ASCII case folding when matching media types.
Covered by new test.
(WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific): Use equalIgnoringASCIICase.
No change in behavior since the only string this is ever called with is "print".
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::hasFileOfType): Use equalIgnoringASCIICase.
No change in behavior because local files will not have content types with
non-ASCII characters in them. In the extremely unlikely case that this is incorrect,
the change in behavior is a progression.
* dom/Document.cpp:
(WebCore::Document::setDomain): Use equalIgnoringASCIICase.
Changes behavior: Domains considered equal because of non-ASCII case folding
would get through without an error before, and now will properly throw an exception.
* dom/Element.cpp:
(WebCore::isStyleAttribute): Refactored into a helper function. Use
equalLettersIgnoringASCIICase. No change in behavior.
(WebCore::Element::synchronizeAttribute): Use isStyleAttribute.
* dom/TreeScope.cpp:
(WebCore::TreeScope::findAnchor): Use equalIgnoringASCIICase.
Changes behavior: Could go to an anchor and it would be considered a match because
of non-ASCII case folding. Covered by new test.
* html/HiddenInputType.cpp:
(WebCore::HiddenInputType::appendFormData): Use equalIgnoringASCIICase.
No change in behavior: comparing with an ASCII literal.
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::getExtension): Ditto.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension): Ditto.
* html/parser/CSSPreloadScanner.cpp:
(WebCore::CSSPreloadScanner::emitRule): Use equalLettersIgnoringASCIICase and
StringView to avoid needing a special ruleEqualIgnoringCase function.
No change in behavior.
* inspector/InspectorNodeFinder.cpp:
(WebCore::InspectorNodeFinder::matchesElement): Use equalIgnoringASCIICase.
Changes behavior, but it's an inspector UI thing, not a web behavior thing,
so I don't think a new regression test is needed.
* loader/HistoryController.cpp:
(WebCore::HistoryController::currentItemShouldBeReplaced): Use
equalIgnoringASCIICase. No change in behavior because we are comparing
with "about:blank".
* loader/SubframeLoader.cpp:
(WebCore::findPluginMIMETypeFromURL): Use equalIgnoringASCIICase.
No change in behavior unless a plug-in claims an extension with non-ASCII
characters. I don't think a new regression test is needed.
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache):
Use equalIgnoringASCIICase. No change in behavior because both strings are
protocols from URLs and we don't parse non-ASCII characters into protocol strings;
non-ASCII are already encoding as punycode.
* loader/appcache/ManifestParser.cpp:
(WebCore::parseManifest): Ditto.
* page/ContentSecurityPolicy.cpp:
(WebCore::isExperimentalDirectiveName): Added. Used by isDirectiveName.
Uses equalLettersIgnoringASCIICase. No change in behavior.
(WebCore::isDirectiveName): Use equalLettersIgnoringASCIICase.
No change in behavior.
(WebCore::isSourceListNone): Use equalLettersIgnoringASCIICase. No
change in behavior.
(WebCore::CSPSource::schemeMatches): Use equalLettersIgnoringASCIICase
and equalIgnoringASCIICase. It's all about comparing URL protocols. The
old code might have done something strange if someone specified a protocol
with a non-ASCII character in it.
(WebCore::CSPSource::hostMatches): Use equalIgnoringASCIICase.
(WebCore::CSPSourceList::parseSource): Use equalLettersIgnoringASCIICase.
No change in behavior.
(WebCore::CSPDirectiveList::checkSourceAndReportViolation): Tweaked code
to do less unnecessary String allocation.
(WebCore::CSPDirectiveList::parseReflectedXSS): Use
equalLettersIgnoringASCIICase. No change in behavior.
(WebCore::CSPDirectiveList::addDirective): Ditto.
(WebCore::ContentSecurityPolicy::reportUnsupportedDirective): Use
equalLettersIgnoringASCIICase and remove unneeded global constant strings.
No change in behavior.
(WebCore::ContentSecurityPolicy::reportDirectiveAsSourceExpression):
Tweak code to eliminate unneeded local.
(WebCore::ContentSecurityPolicy::reportDuplicateDirective): Ditto.
(WebCore::ContentSecurityPolicy::reportInvalidSourceExpression): Use
equalLettersIgnoringASCIICase. No change in behavior.
* page/OriginAccessEntry.h:
(WebCore::operator==): Use equalLettersIgnoringASCIICase.
* page/Performance.cpp:
(WebCore::Performance::webkitGetEntriesByName): Use equalLettersIgnoringASCIICase.
No change in behavior.
* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::matches): Use equalIgnoringASCIICase to match
schemes.
(WebCore::UserContentURLPattern::matchesHost): Use equalIgnoringASCIICase to
match host names.
* platform/URL.cpp:
(WebCore::URL::init): Use equalIgnoringASCIICase, and also use StringView to
avoid having to allocate a second string just for comparison purposes. Should be
better for efficiency with no change in behavior.
* platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
(WebCore::ContentFilterUnblockHandler::canHandleRequest): Use equalIgnoringASCIICase
to compare hosts.
* platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
(WebCore::PlatformSpeechSynthesisProviderEfl::voiceName): Use StringView and
equalIgnoringASCIICase to compare language tags. No test needed because there are
no language tags with non-ASCII characters in them.
* platform/graphics/FontCache.cpp:
(WebCore::FontPlatformDataCacheKey::operator==): Changed to use the equal
function from CaseFoldingHash. In a subsequent patch we will change this to be
ASCIICaseFoldingHash since font names don't need to compare non-ASCII characters
in a case folding manner, but for now preserve behavior.
(WebCore::alternateFamilyName): Use equalLettersIgnoringASCIICase to avoid having
to use a special familyNameEqualIgnoringCase function. This does mean there will
be a null check and a length check that wasn't there before, but the actual
comparison function will be tighter. Guessing it will be a wash. Also improved
the comments and sorted the Windows cases in with the others. No behavior change.
* platform/graphics/FontCascade.cpp:
(WebCore::operator==): Changed to use the equal function from CaseFoldingHash.
Same rationale as above in FontPlatformDataCacheKey.
* platform/graphics/FontDescription.cpp:
(WebCore::FontCascadeDescription::familiesEqualForTextAutoSizing): Use
equalIgnoringASCIICase to compare font family names. Only possible change in
behavior would be if actual fonts with non-ASCII names but that were specified
with different case in style sheets. Highly unlikely this exists.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::supportsType): Use equalLettersIgnoringASCIICase.
No change in behavior.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::keySystemIsSupported): Ditto.
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::isCommonlyUsedGenericFamily): Added.
(WebCore::FontCache::createFontPlatformData): Moved code into the
isCommonlyUsedGenericFamily helper and used equalIgnoringASCIICase.
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::supportsFormat): Use
equalLettersIgnoringASCIICase. No change in behavior.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::adjustedGDIFontWeight): Ditto.
(WebCore::FontCache::createFontPlatformData): Ditto.
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::supportsFormat): Ditto.
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::supportsFormat): Ditto.
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(-[WebSpeechSynthesisWrapper speakUtterance:]): Use equalIgnoringASCIICase to
compare languages. No change in behavior because languages have all-ASCII names.
* platform/network/CacheValidation.cpp:
(WebCore::shouldUpdateHeaderAfterRevalidation): Use equalIgnoringASCIICase.
No change in behavior since it's a fixed list of all ASCII headers.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isAppendableHeader): Ditto.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::willSendRequest): Use equalIgnoringASCIICase.
No change in behavior because HTTP methods are all ASCII letters.
* platform/text/mac/LocaleMac.mm:
(WebCore::determineLocale): Use equalIgnoringASCIICase. No change in behavior
because locale languages identifiers are all ASCII.
* platform/text/win/LocaleWin.cpp:
(WebCore::LCIDFromLocaleInternal): Ditto.
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable):
Use equalIgnoringASCIICase. No change in behavior because Arabic form attribute
values are all ASCII.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): Use equalIgnoringASCIICase.
No change in behavior because these are all fixed known ASCII HTTP method names.
* xml/XPathFunctions.cpp:
(WebCore::XPath::FunLang::evaluate): Use equalIgnoringASCIICase. Changes behavior
if specifying a non-ASCII character. Covered by new test.
* xml/XPathStep.cpp:
(WebCore::XPath::nodeMatchesBasicTest): Use equalIgnoringASCIICase. Changes
behavior if an element local name or XPath predicate has a non-ASCII character.
Covered by new test.
2016-01-28 Zalan Bujtas <zalan@apple.com>
Unexpected content wrapping at http://email.osh.com/H/2/v100000152474feb8ec7c1a1f4bbe5c7c0/HTML
https://bugs.webkit.org/show_bug.cgi?id=153430
Reviewed by Simon Fraser.
Ensure that min/max preferred and computed widths never shrink while converting LayoutUnit to float and back.
Test: fast/table/fixed-size-table-with-fixed-size-content.html
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
(WebCore::AutoTableLayout::layout):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computePreferredLogicalWidths): Deleted.
2016-01-28 Gwang Yoon Hwang <yoon@igalia.com>
[GStreamer] Clean up includes and headers related with GStreamerGL
https://bugs.webkit.org/show_bug.cgi?id=153590
Reviewed by Philippe Normand.
Remove gstglmemory from the including list and reorder includes to
organize GSTREAMER_GL related headers. It violates style rules of the
include order, but there is no clean way to include gst/gl/gl.h
without violating it.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2016-01-28 Gwang Yoon Hwang <yoon@igalia.com>
[GStreamer] MediaPlayerPrivateGStreamerBase::handleSyncMessage leaks GstContext
https://bugs.webkit.org/show_bug.cgi?id=153580
Reviewed by Philippe Normand.
When we creates GstContext using gst_context_new it increases refcount itself.
And the refcount of GstContext is increased when it is passed to
gst_element_set_context, also. Therefore We should unref GstContext after
using it to prevent GstContext leaks.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef): Added for GstContext.
(WTF::refGPtr<GstContext>): Ditto
(WTF::derefGPtr<GstContext>): Ditto
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
Use GRefPtr<GstContext> to handle currect refcounting
2016-01-27 Alex Christensen <achristensen@webkit.org>
Fix clean CMake build after r195711.
* PlatformWin.cmake:
Copy forwarding headers from the new directory to find ContentSecurityPolicy.h.
This should fix EWS issues like the one seen in bug 153573.
2016-01-27 Chris Dumez <cdumez@apple.com>
Expose ValidityState on the global Window object
https://bugs.webkit.org/show_bug.cgi?id=153582
Reviewed by Antti Koivisto.
Expose ValidityState on the global Window object:
https://html.spec.whatwg.org/#validitystate
Firefox and Chrome match the specification.
No new tests, already covered by existing tests.
* html/ValidityState.idl:
2016-01-27 Chris Dumez <cdumez@apple.com>
Expose ApplicationCache on the global Window object
https://bugs.webkit.org/show_bug.cgi?id=153578
Reviewed by Antti Koivisto.
Expose ApplicationCache on the global Window object as per:
https://html.spec.whatwg.org/#the-storage-interface
Chrome follows the spec.
No new tests, already covered by existing test.
* loader/appcache/DOMApplicationCache.idl:
2016-01-27 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r190430): Assertion failure in Text::~Text()
https://bugs.webkit.org/show_bug.cgi?id=153577
Reviewed by Antti Koivisto.
The bug was caused by destroyRenderTreeIfNeeded exiting early on all HTMLSlotElement as it lacks a render object.
Fixed it by explicitly avoiding the early return when child is a HTMLSlotElement.
Test: fast/shadow-dom/slot-removal-crash-2.html
* dom/ContainerNode.cpp:
(WebCore::destroyRenderTreeIfNeeded):
2016-01-27 Said Abou-Hallawa <sabouhallawa@apple.com>
Garbage is displayed when root svg element has mix-blend-mode set
https://bugs.webkit.org/show_bug.cgi?id=150556
Reviewed by Darin Adler.
This bug happens when compositing on a CALayer and drawing on a transparent
layer, so it happens with WK2 with <svg style="mix-blend-mode...">. And it
can happen with WK1 also with <svg style="opacity=...;mix-blend-mode...">.
But in both cases, the SVG root renderer should be the root of the render
tree. So it happens only with the stand alone SVG documents.
SVGRenderContext::prepareToRenderSVGContent() ignores the opacity of
the SVG root but it creates a transparent layer for the blend-mode.
But RenderLayer::beginTransparencyLayers() creates a transparent layer
for opacity and it sets the blend-mode also.
The fix is to begin two transparent layers for the SVG root renderer: one
for the opacity and the second for the blend-mode. The opacity transparent
layer will be still managed by RenderLayer::beginTransparencyLayers(). While
the blend-mode transparent layer will be managed by SVGRenderContext
::prepareToRenderSVGContent().
Tests: svg/css/mix-blend-mode-background-root.svg
svg/css/mix-blend-mode-opacity-root.svg
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::beginTransparencyLayers):
2016-01-27 Enrica Casucci <enrica@apple.com>
Cache results of data detection in the UI process when load completes.
https://bugs.webkit.org/show_bug.cgi?id=153560
Reviewed by Tim Horton.
Adding new FrameLoaderClient method to notify that data
detection is complete and provide the results.
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
* loader/FrameLoaderClient.h:
2016-01-27 Daniel Bates <dabates@apple.com>
Move ContentSecurityPolicy.{cpp, h} to its own directory
https://bugs.webkit.org/show_bug.cgi?id=153527
<rdar://problem/24359892>
Reviewed by Sam Weinig.
Move ContentSecurityPolicy.{cpp, h} from Source/WebCore/page to Source/WebCore/page/csp.
This will facilitate separating out the policy support classes (e.g. CSPDirectiveList)
into their own files to improve the hackability of this code.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/csp/ContentSecurityPolicy.cpp: Renamed from Source/WebCore/page/ContentSecurityPolicy.cpp.
* page/csp/ContentSecurityPolicy.h: Renamed from Source/WebCore/page/ContentSecurityPolicy.h.
2016-01-27 Brady Eidson <beidson@apple.com>
Modern IDB: Incorrect handling of iterating cursors to their end.
https://bugs.webkit.org/show_bug.cgi?id=153569
Reviewed by Alex Christensen.
No new tests (3 tests now pass, others are closer to passing).
* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::advance):
(WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
2016-01-27 Nan Wang <n_wang@apple.com>
AX: Crash in AccessibilityTableColumn::headerObject
https://bugs.webkit.org/show_bug.cgi?id=153553
<rdar://problem/23196278>
Reviewed by Chris Fleizach.
Webkit was crashing sometimes when we asked for column headers of a table.
The columns vector of the table was reset during the iteration when we
were asking for the headerObject of each column. The column's addChildren()
function calls elementRect() for each child cell and that sometimes causes
the parent table to reset its children.
Fixed it by caching the columns vector and moving out the elementRect() logic
from AccessibilityTalbeColumn::addChildren().
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::columnHeaders):
(WebCore::AccessibilityTable::rowHeaders):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::elementRect):
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::addChildren):
* accessibility/AccessibilityTableColumn.h:
2016-01-27 Chris Dumez <cdumez@apple.com>
Settings a reflected DOMString attribute to null should set it to the "null" string rather than the empty string
https://bugs.webkit.org/show_bug.cgi?id=153504
<rdar://problem/24353072>
Reviewed by Ryosuke Niwa.
Settings a reflected DOMString attribute to null should set it to the "null"
string rather than the empty string:
- https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes
- http://heycam.github.io/webidl/#es-DOMString
- http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring
Firefox and Chrome match the specification here.
This is causing a lot of W3C HTML reflection tests to fail on WebKit, e.g.:
- http://w3c-test.org/html/dom/reflection-text.html
No new tests, already covered by existing tests.
* bindings/scripts/CodeGeneratorJS.pm:
(JSValueToNative):
Call toString() instead of valueToStringWithNullCheck() for reflected
attributes. This way, null gets converted to the string "null", as
expected, instead of a null String object.
* html/HTMLInputElement.idl:
Dropping [TreatNullAs=NullString] IDL extended attribute for
input.defaultValue, as this is not present in the specification:
- https://html.spec.whatwg.org/#htmlinputelement
Without this change, assigning null to input.defaultValue would not
set to to the "null" string, as is expected.
* html/HTMLTextAreaElement.idl:
Dropping [TreatNullAs=NullString] IDL extended attribute for
textArea.defaultValue, as this is not present in the specification:
- https://html.spec.whatwg.org/#htmltextareaelement
Without this change, assigning null to textArea.defaultValue would not
set to to the "null" string, as is expected.
* html/HTMLTitleElement.idl:
Dropping [TreatNullAs=NullString] IDL extended attribute for
title.text, as this is not present in the specification:
- https://html.spec.whatwg.org/#htmltitleelement
Without this change, assigning null to title.text would not
set to to the "null" string, as is expected.
2016-01-27 Simon Fraser <simon.fraser@apple.com>
Support CSS3 Images values for the image-rendering property
https://bugs.webkit.org/show_bug.cgi?id=153556
Reviewed by Dean Jackson.
CSS3 Images has the following values for image-rendering:
auto, crisp-edges, pixelated
The old code supported:
optimizeSpeed, optimizeQuality, -webkit-crisp-edges, -webkit-optimize-contrast
Add support for the new values without prefixes. Map -webkit-crisp-edges to crisp-edges,
and -webkit-optimize-contrast to crisp-edges. Support pixelated which behaves like
crisp-edges (a low quality scale).
The spec says that optimizeQuality should behave like 'auto', but that would be
a behavior change since ImageQualityController::shouldPaintAtLowQuality() currently
uses it as a trigger to avoid low quality scaling, so don't change that for now.
No new tests, covered by fast/css/script-tests/image-rendering-parsing.js
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
* css/CSSValueKeywords.in:
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.h: Need another bit.
2016-01-27 Anders Carlsson <andersca@apple.com>
Add WebKitAdditions extension points to WebCore, WebKit and WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=153550
Reviewed by Sam Weinig.
* DerivedSources.make:
Add the ability for WebKitAdditions to add events and event targets.
* WebCore.xcodeproj/project.pbxproj:
Add new files.
* bindings/scripts/InFilesCompiler.pm:
(initializeFromCommandLine):
(compile):
Handle multiple --input parameters.
* dom/EventNames.h:
Handle adding more event names.
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* page/MainFrame.cpp:
(WebCore::MainFrame::MainFrame):
* page/MainFrame.h:
* page/PageConfiguration.h:
Add extension points.
* platform/cocoa/WebKitAdditions.mm: Added.
Import additions.
2016-01-27 Brady Eidson <beidson@apple.com>
Modern IDB: Fix many Index tests.
https://bugs.webkit.org/show_bug.cgi?id=153561
Reviewed by Alex Christensen.
No new tests (Many failing tests now pass).
* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::getResultForKeyRange):
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
* Modules/indexeddb/server/SQLiteIDBCursor.h:
(WebCore::IDBServer::SQLiteIDBCursor::didComplete):
2016-01-27 Brady Eidson <beidson@apple.com>
Modern IDB: Cursors are utterly broken in the SQLite backend.
https://bugs.webkit.org/show_bug.cgi?id=153558
Reviewed by Alex Christensen.
No new tests (35 failures now pass, others improve).
- Fixes incorrect usage of Index cursors when ObjectStore cursors are intended.
- Improves the state of getting the cursor value vs. reaching the end of a cursor.
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
(WebCore::IDBServer::SQLiteIDBCursor::currentData):
* Modules/indexeddb/server/SQLiteIDBCursor.h:
2016-01-27 Chris Dumez <cdumez@apple.com>
Getting / Setting property on prototype object must throw TypeError
https://bugs.webkit.org/show_bug.cgi?id=153547
<rdar://problem/24370650>
Reviewed by Ryosuke Niwa.
Gettingi / Setting property on prototype object must throw TypeError as per
Web IDL specification:
http://heycam.github.io/webidl/#dfn-attribute-getter (Step 2.4.2)
http://heycam.github.io/webidl/#dfn-attribute-setter (Step 3.5)
Firefox and Chrome already throw a TypeError in this case, as per
the specification. However, WebKit was returning null and merely
logging a deprecation error message. This patch aligns our behavior
with other browsers and the specification.
This patch also adds support for the [LenientThis] IDL extended
attribute:
http://heycam.github.io/webidl/#LenientThis
For [LenientThis] attributes, we do not throw a TypeError if the
attribute getter / setter is called on an object which does not
implement the expected interface, as per:
http://heycam.github.io/webidl/#dfn-attribute-getter (Step 2.4.1)
http://heycam.github.io/webidl/#dfn-attribute-setter (Step 3.5)
No new tests, already covered by existing tests.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
Add support for [LenientThis]:
http://heycam.github.io/webidl/#LenientThis
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
Rebaseline bindings tests.
* bindings/scripts/test/TestObj.idl:
Add coverage for [LenientThis] attributes.
* dom/Document.idl:
Mark 'onreadystatechange' as [LenientThis] as per the HTML
specification:
https://html.spec.whatwg.org/#document
* dom/GlobalEventHandlers.idl:
Mark 'onmouseeneter' / 'onmouseleave' as [LenientThis] as per the
HTML specification:
https://html.spec.whatwg.org/#globaleventhandlers
2016-01-27 Chris Dumez <cdumez@apple.com>
window.atob() should ignore spaces in input
https://bugs.webkit.org/show_bug.cgi?id=153522
<rdar://problem/24357822>
Reviewed by Benjamin Poulain.
window.atob() should ignore spaces in input as per:
- https://html.spec.whatwg.org/#dom-windowbase64-atob (Step 3)
Previously, WebKit would throw an exception and it was the only browser
to do so. Firefox and Chrome behavior according to the specification.
This was causing us to fail 10 checks in the following W3C HTML test:
http://w3c-test.org/html/webappapis/atob/base64.html
No new tests, updated existing test.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::atob):
* page/Page.cpp:
(WebCore::Page::userStyleSheetLocationChanged):
* platform/network/DataURL.cpp:
(WebCore::handleDataURL):
* platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::decodeBase64):
2016-01-27 Ada Chan <adachan@apple.com>
Move some logic related to the presentation mode button from mediaControlsiOS.js to mediaControlsApple.js
https://bugs.webkit.org/show_bug.cgi?id=153476
Reviewed by Eric Carlson.
Also, add the necessary styles to support that control in mediaControlsApple.css.
* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-controls-panel.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture):
(video::-webkit-media-controls-panel .picture-in-picture-button):
Use the same mask image as iOS, but with a different size and a background color specified
(since there's another rule that makes buttons within the panel have a transparent
background color).
(video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
Listen for (and stop listening for) the webkitpresentationmodechanged event if presentation
mode is supported for this video element.
(Controller.prototype.createControls):
Add a class name to the pictureInPictureButton so we can query for it in the stylesheet.
(Controller.prototype.configureInlineControls):
Call updatePictureInPictureButton().
(Controller.prototype.presentationMode):
Moved from mediaControlsiOS.js.
(Controller.prototype.isFullScreen):
Ditto, with a bug fix to not call presentationMode(), since that method calls isFullScreen(),
resulting in infinite recursion.
(Controller.prototype.updatePictureInPictureButton):
Ditto.
(Controller.prototype.handlePresentationModeChange):
Ditto.
(Controller.prototype.handleFullscreenChange):
Call handlePresentationModeChanged() if presentation mode is supported for this video element.
(Controller.prototype.controlsAlwaysVisible):
Ditto.
(Controller.prototype.handlePictureInPictureButtonClicked):
Ditto.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handlePresentationModeChange):
Most logic has been moved to the same method in mediaControlsApple.js, except
updating the style of the panelContainer, which doesn't exist in the Mac controls.
(ControllerIOS.prototype.addVideoListeners): Deleted.
(ControllerIOS.prototype.removeVideoListeners): Deleted.
(ControllerIOS.prototype.presentationMode): Deleted.
(ControllerIOS.prototype.isFullScreen): Deleted.
(ControllerIOS.prototype.handlePictureInPictureButtonClicked): Deleted.
(ControllerIOS.prototype.updatePictureInPictureButton): Deleted.
(ControllerIOS.prototype.handleFullscreenChange): Deleted.
(ControllerIOS.prototype.controlsAlwaysVisible): Deleted.
Delete all code that's already handled in the Controller.
2016-01-26 Ada Chan <adachan@apple.com>
Enable API related to the video fullscreen layer in MediaPlayerPrivateMediaSourceAVFObjC
also on Mac platform with video presentation mode support.
https://bugs.webkit.org/show_bug.cgi?id=153223
Reviewed by Jer Noble.
Reuse VideoFullscreenLayerManager to manage moving the video layer between the fullscreen
layer and the inline layer depending on the current presentation mode.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
Create m_videoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer):
Return the video inline layer from the VideoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
Call VideoFullscreenLayerManager::setVideoLayer() with the m_sampleBufferDisplayLayer.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
Call VideoFullscreenLayerManager::didDestroyVideoLayer().
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer):
Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenFrame):
Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
2016-01-27 Brady Eidson <beidson@apple.com>
Modern IDB: SQLite backend doesn't update index records as object records are added.
https://bugs.webkit.org/show_bug.cgi?id=153548
Reviewed by Alex Christensen.
No new tests (4 more tests pass, others improve).
* Modules/indexeddb/server/IDBBackingStore.h:
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::initializeVM):
(WebCore::IDBServer::SQLiteIDBBackingStore::vm):
(WebCore::IDBServer::SQLiteIDBBackingStore::globalObject):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:
2016-01-27 Ryosuke Niwa <rniwa@webkit.org>
Add API to access closed shadowRoot in InjectedBundle
https://bugs.webkit.org/show_bug.cgi?id=153533
Reviewed by Antti Koivisto.
Always return the shadow root in Element.shadowRootForBindings when the DOM wrapper world has
shadowRootIsAlwaysOpen set to true. Also renamed bindingShadowRoot to shadowRootForBindings
to be consistent.
* bindings/js/DOMWrapperWorld.h:
(WebCore::DOMWrapperWorld::setShadowRootIsAlwaysOpen): Added.
(WebCore::DOMWrapperWorld::shadowRootIsAlwaysOpen): Added.
* dom/Element.cpp:
(WebCore::Element::shadowRootForBindings): Renamed from bindingShadowRoot.
* dom/Element.h:
* dom/Element.idl:
2016-01-27 Zhuo Li <zachli@apple.com>
Need ability to specify alternate image for AutoFill button in input fields.
https://bugs.webkit.org/show_bug.cgi?id=153116.
rdar://problem/23384854.
Reviewed by Darin Adler.
Add a new AutoFill button that can be shown in <input> elements.
Tests: fast/forms/auto-fill-button/input-contacts-auto-fill-button.html
fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes.html
* css/html.css:
(input::-webkit-contacts-auto-fill-button):
(input::-webkit-contacts-auto-fill-button:hover):
(input::-webkit-contacts-auto-fill-button:active):
Add default style rules for the Contacts AutoFill button based on the ones used for
Manual AutoFill button.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setShowAutoFillButton):
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::autoFillButtonType):
- Replace the boolean parameter with a new parameter to specify the type of the AutoFill button.
- Declare a private variable to keep a record of the type of the current AutoFill
button.
(WebCore::HTMLInputElement::showAutoFillButton): Deleted.
* html/HTMLTextFormControlElement.h:
Declare enum for AutoFill button type.
* html/TextFieldInputType.cpp:
(WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
(WebCore::isAutoFillButtonTypeChanged):
(WebCore::TextFieldInputType::shouldDrawAutoFillButton): None means the AutoFill button is not
enabled.
(WebCore::TextFieldInputType::createAutoFillButton): Only create the AutoFill button
if the type is expected.
(WebCore::TextFieldInputType::updateAutoFillButton):
Handle the case where AutoFill button type changes in the text field.
* html/TextFieldInputType.h:
* testing/Internals.cpp:
(WebCore::stringToAutoFillButtonType): Convert the string to AutoFill button type.
(WebCore::Internals::setShowAutoFillButton): Add a new parameter to specify the type of the AutoFill button.
* testing/Internals.h: Ditto.
* testing/Internals.idl: Ditto.
2016-01-26 Ryosuke Niwa <rniwa@webkit.org>
Add Node.treeRoot
https://bugs.webkit.org/show_bug.cgi?id=153537
Reviewed by Antti Koivisto.
Exposed highestAncestor as Node.prototype.treeRoot, which was added to shadow DOM spec in
https://github.com/w3c/webcomponents/commit/6864a40fe4efa8a737e78512e3c85319ddc5bf8b
See also:
http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-node-interface
Test: fast/shadow-dom/Node-interface-treeRoot.html
* dom/Node.idl:
2016-01-26 Ryosuke Niwa <rniwa@webkit.org>
Rename HTMLSlotElement.getDistributedNodes to getAssignedNodes
https://bugs.webkit.org/show_bug.cgi?id=153534
Reviewed by Antti Koivisto.
Did the rename.
* html/HTMLSlotElement.idl:
2016-01-27 Tim Horton <timothy_horton@apple.com>
Need to be able to specify MIME type for <attachment> without filename or handle
https://bugs.webkit.org/show_bug.cgi?id=153552
<rdar://problem/20145857>
Reviewed by Anders Carlsson.
Tests: fast/attachment/attachment-default-icon.html
fast/attachment/attachment-type-attribute.html
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::parseAttribute):
Invalidate attachment when 'type' attribute changes.
(WebCore::HTMLAttachmentElement::attachmentType):
* html/HTMLAttachmentElement.h:
* platform/graphics/Icon.h:
* platform/graphics/mac/IconMac.mm:
(WebCore::Icon::createIconForUTI):
(WebCore::Icon::createIconForMIMEType):
Add Icon class methods to retrieve an icon given a UTI or MIME type.
* rendering/RenderThemeMac.mm:
(WebCore::paintAttachmentIcon):
Use the 'type' attribute (a MIME type) if we have one. Otherwise,
use the filename. Lastly fall back to a plain file icon (using the root
file UTI, public.data).
2016-01-27 Alexey Proskuryakov <ap@apple.com>
Remove ENABLE_CURRENTSRC
https://bugs.webkit.org/show_bug.cgi?id=153545
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
2016-01-26 Anders Carlsson <andersca@apple.com>
Stop echoing echo commands to stdout
https://bugs.webkit.org/show_bug.cgi?id=153531
Reviewed by Csaba Osztrogonác.
* DerivedSources.make:
2016-01-26 Jer Noble <jer.noble@apple.com>
Calling video.controls=true during a scrub operation cancels scrub.
https://bugs.webkit.org/show_bug.cgi?id=153494
Reviewed by Eric Carlson.
Test: media/media-controls-drag-timeline-set-controls-property.html
Verify that the video.controls attribute actually changed before tearing down and
re-adding the media controls to the Shadow DOM.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleControlsChange):
(Controller.prototype.hasControls):
2016-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][EFL] Rename ScrollAnimationNone as ScrollAnimationSmooth
https://bugs.webkit.org/show_bug.cgi?id=153481
Reviewed by Simon Fraser.
ScrollAnimationNone has always been used by EFL and GTK ports to
implement smooth scrolling. I think it should be possible for
other scroll animators to implement smooth scrolling or even
implement other kind of scroll animations. For example, in the
future I would like to have kinetic scrolling implemented for the
GTK+ port to match all other GTK+ application and decide at
runtime between different animations without having to use a
different scroll animator class. So, this patch also moves the
smooth scrolling animation implementation to its own class
ScrollAnimationSmooth that impements an interface ScrollAnimation
that could be used to implement other animations. This will allow
the GTK+ port to add its own scroll animator class and still
support smooth scrolling sharing the code with the
ScrollAnimationSmooth.
* PlatformEfl.cmake: Add new files to compilation and remove ScrollAnimationNone.
* PlatformGTK.cmake: Ditto.
* platform/ScrollAnimation.h: Added.
(WebCore::ScrollAnimation::serviceAnimation):
(WebCore::ScrollAnimation::ScrollAnimation):
* platform/ScrollAnimationSmooth.cpp: Added.
(WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
(WebCore::ScrollAnimationSmooth::scroll):
(WebCore::ScrollAnimationSmooth::stop):
(WebCore::ScrollAnimationSmooth::updateVisibleLengths):
(WebCore::ScrollAnimationSmooth::setCurrentPosition):
(WebCore::ScrollAnimationSmooth::serviceAnimation):
(WebCore::ScrollAnimationSmooth::~ScrollAnimationSmooth):
(WebCore::curveAt):
(WebCore::attackCurve):
(WebCore::releaseCurve):
(WebCore::coastCurve):
(WebCore::curveIntegralAt):
(WebCore::attackArea):
(WebCore::releaseArea):
(WebCore::getAnimationParametersForGranularity):
(WebCore::ScrollAnimationSmooth::updatePerAxisData):
(WebCore::ScrollAnimationSmooth::animateScroll):
(WebCore::ScrollAnimationSmooth::animationTimerFired):
(WebCore::ScrollAnimationSmooth::startNextTimer):
(WebCore::ScrollAnimationSmooth::animationTimerActive):
* platform/ScrollAnimationSmooth.h: Added.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scroll):
(WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimator::setCurrentPosition):
(WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset):
(WebCore::ScrollAnimator::notifyPositionChanged):
(WebCore::ScrollAnimator::scrollOffsetOnAxis):
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::ScrollAnimator::currentPosition):
* platform/ScrollAnimatorNone.cpp: Removed.
* platform/ScrollAnimatorNone.h: Removed.
* platform/ScrollAnimatorSmooth.cpp: Added.
(WebCore::ScrollAnimator::create):
(WebCore::ScrollAnimatorSmooth::ScrollAnimatorSmooth):
(WebCore::ScrollAnimatorSmooth::~ScrollAnimatorSmooth):
(WebCore::ScrollAnimatorSmooth::scroll):
(WebCore::ScrollAnimatorSmooth::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorSmooth::cancelAnimations):
(WebCore::ScrollAnimatorSmooth::serviceScrollAnimations):
(WebCore::ScrollAnimatorSmooth::willEndLiveResize):
(WebCore::ScrollAnimatorSmooth::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorSmooth::didAddHorizontalScrollbar):
* platform/ScrollAnimatorSmooth.h: Added.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::immediateScrollToPosition):
(WebCore::ScrollAnimatorMac::immediateScrollBy):
2016-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
Overlay scrollbars should always use the whole contents
https://bugs.webkit.org/show_bug.cgi?id=153352
Reviewed by Michael Catanzaro.
In case of having both horizontal and vertical scrollbars, the
scrollbars respect the scroll corner. That looks good for legacy
scrollbars that show the track, but with the overlay indicators
it looks weird that the indicator stops so early before the end of
the contents, giving the impression that there's something else to
scroll. This happens because the scroll corner is transparent, so
it's not obvious that's the scroll corner. It also happens with
the text areas having a resizer. Legacy scrollbars take into
account the resizer, which is good, but I expect overlay
scrollbars to be rendered also over the resizer. The resizer takes
precedence so you can still click and drag to resize the text area.
In the case of main frame scrollbars we are indeed returning an
empty rectangle from ScrollView::scrollCornerRect() when using
overlay scrollbars, but when calculating the size of the
scrollbars we are using the actual width/height instead of the
occupied with/height. For other scrollbars
RenderLayer::scrollCornerRect() is not checking whether scrollbars
are overlay or not and we are always returning a scroll corner
rectangle when scrollbars are present.
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars): Use the occupied
width/height when calculating the space the one scrollbar
should leave for the other.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollCornerRect): Return an empty
rectangle when using overlay scrollbars.
2016-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
ScrollAnimator is not notified when mouse entered, moved or exited a RenderListBox
https://bugs.webkit.org/show_bug.cgi?id=153398
Reviewed by Michael Catanzaro.
EvenHandler is checking whether the enclosing layer of a node is
registered as scrollable area of its frame view. That doesn't work
for list boxes, because they are the scrollable area
themselves. Also when entering a list box the node under mouse is
not usually the list box itself, but any of its children, a
HTMLOptionElement or a HTMLOptGroupElement. Instead of comparing
layers, we should find the enclosing scrollable area of the target
elements and compare them to decide whether the mouse has entered,
left or moved a scrollable area.
* page/EventHandler.cpp:
(WebCore::enclosingScrollableArea): Return the enclosing
scrollable area of the given node. If the node doesn't have a
renderer, it traverses its parents. If the renderer is a
RenderListBox it is returned, otherwhise the enclosing layer is
returned.
(WebCore::EventHandler::mouseMoved): Use enclosingScrollableArea.
(WebCore::EventHandler::updateMouseEventTargetNode): Ditto.
2016-01-26 Sam Weinig <sam@webkit.org>
Try touching DerivedSources.make to force rebuilding.
* DerivedSources.make:
* page/DOMWindow.idl:
2016-01-26 Sam Weinig <sam@webkit.org>
Try to force a rebuild.
* page/DOMWindow.idl:
2016-01-26 Chris Dumez <cdumez@apple.com>
fast/history/page-cache-webdatabase-no-transaction-db.html flakily crashes
https://bugs.webkit.org/show_bug.cgi?id=153525
Reviewed by Andreas Kling.
The test was crashing because DatabaseThread::hasPendingDatabaseActivity()
was accessing m_openDatabaseSet from the main thread without any locking
mechanism. This is an issue because m_openDatabaseSet is altered by the
database thread.
No new tests, already covered by fast/history/page-cache-webdatabase-no-transaction-db.html.
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::databaseThread):
(WebCore::DatabaseThread::recordDatabaseOpen):
(WebCore::DatabaseThread::recordDatabaseClosed):
(WebCore::DatabaseThread::hasPendingDatabaseActivity):
* Modules/webdatabase/DatabaseThread.h:
2016-01-26 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed CMake build fix after r195644.
* PlatformMac.cmake:
2016-01-26 Brady Eidson <beidson@apple.com>
Modern IDB: Key generator support for SQLite backend.
https://bugs.webkit.org/show_bug.cgi?id=153427
Reviewed by Alex Christensen.
No new tests (Existing failing tests now pass, others improved).
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
2016-01-26 Simon Fraser <simon.fraser@apple.com>
Allow canvas to use display-list drawing for testing
https://bugs.webkit.org/show_bug.cgi?id=153475
Reviewed by Dean Jackson.
Optionally have 2D <canvas> use display-list drawing, which is only enabled
via Internals for now.
Support displayListAsText() and replayDisplayListAsText() on canvas, so we can
use it to test playback optimizations. [Note that displayListAsText() always
returns an empty string currently, because the display list is cleared when the
canvas is painted to the page.]
Display list rendering is implemented by giving CanvasRenderingContext2D an
optional DisplayListDrawingContext, which packages up a display list, recorder
and recording context. The existing paintRenderingResultsToCanvas() is overridden
to replay the recorded display list into the primary canvas context.
Tracked replay display lists are stored in a static map, keyed by the CanvasRenderingContext2D.
Test: displaylists/canvas-display-list.html
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::HTMLCanvasElement):
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::paint):
(WebCore::HTMLCanvasElement::setUsesDisplayListDrawing):
(WebCore::HTMLCanvasElement::setTracksDisplayListReplay):
(WebCore::HTMLCanvasElement::displayListAsText):
(WebCore::HTMLCanvasElement::replayDisplayListAsText):
* html/HTMLCanvasElement.h:
* html/canvas/CanvasRenderingContext.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::DisplayListDrawingContext::DisplayListDrawingContext):
(WebCore::contextDisplayListMap):
(WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
(WebCore::CanvasRenderingContext2D::setTracksDisplayListReplay):
(WebCore::CanvasRenderingContext2D::displayListAsText):
(WebCore::CanvasRenderingContext2D::replayDisplayListAsText):
(WebCore::CanvasRenderingContext2D::paintRenderingResultsToCanvas):
(WebCore::CanvasRenderingContext2D::drawingContext):
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Deleted.
* html/canvas/CanvasRenderingContext2D.h:
* testing/Internals.cpp:
(WebCore::Internals::setElementUsesDisplayListDrawing):
(WebCore::Internals::setElementTracksDisplayListReplay):
(WebCore::Internals::displayListForElement):
(WebCore::Internals::replayDisplayListForElement):
2016-01-26 Joseph Pecoraro <pecoraro@apple.com>
Generalize ResourceUsageData gathering to be used outside of ResourceUsageOverlay
https://bugs.webkit.org/show_bug.cgi?id=153509
<rdar://problem/24354291>
Reviewed by Andreas Kling.
* CMakeLists.txt:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* page/Page.cpp:
* page/Page.h:
* page/Settings.cpp:
* page/Settings.h:
* page/ResourceUsageOverlay.cpp:
* page/ResourceUsageOverlay.h:
Add new files to the build and updated ENABLE flag name.
* page/ResourceUsageData.cpp: Added.
(WebCore::ResourceUsageData::ResourceUsageData):
* page/ResourceUsageData.h: Added.
(WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
Platform agnostic resource data that may be used by multiple clients,
such as the ResourceUsageOverlay and later the Inspector.
* page/ResourceUsageThread.h: Added.
* page/ResourceUsageThread.cpp: Added.
(WebCore::ResourceUsageThread::ResourceUsageThread):
(WebCore::ResourceUsageThread::singleton):
(WebCore::ResourceUsageThread::addObserver):
(WebCore::ResourceUsageThread::removeObserver):
(WebCore::ResourceUsageThread::waitUntilObservers):
(WebCore::ResourceUsageThread::notifyObservers):
(WebCore::ResourceUsageThread::createThreadIfNeeded):
(WebCore::ResourceUsageThread::threadCallback):
(WebCore::ResourceUsageThread::threadBody):
Platform agnostic resource usage thread that can be used to gather data
into a ResourceUsageData struct on a background thread and notify observers
on the main thread. Platforms need only implement ResourceUsageThread::platformThreadBody
to populate the ResourceUsageData struct with data.
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::HistoricMemoryCategoryInfo::HistoricMemoryCategoryInfo):
(WebCore::HistoricResourceUsageData::HistoricResourceUsageData):
(WebCore::historicUsageData):
(WebCore::appendDataToHistory):
(WebCore::ResourceUsageOverlay::platformInitialize):
(WebCore::ResourceUsageOverlay::platformDestroy):
(WebCore::drawMemHistory):
(WebCore::drawMemoryPie):
(WebCore::ResourceUsageOverlay::platformDraw):
Move CPU and memory resource usage calculations to ResourceUsageThread.
The overlay adds itself as an observer, and builds its RingBuffer list
of data from notifications from the ResourceUsageThread. Renamed
some of the fields.
* page/cocoa/ResourceUsageThreadCocoa.mm: Added.
(WebCore::vmPageSize):
(WebCore::TagInfo::TagInfo):
(WebCore::pagesPerVMTag):
(WebCore::cpuUsage):
(WebCore::categoryForVMTag):
(WebCore::ResourceUsageThread::platformThreadBody):
Extracted from ResourceUsageOverlayCocoa.
* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::dispatch):
Drive-by, don't call singleton again, we already have the result.
2016-01-26 Simon Fraser <simon.fraser@apple.com>
Use initializers in HTMLCanvasElement
https://bugs.webkit.org/show_bug.cgi?id=153472
Reviewed by Michael Catanzaro.
Use initializers, and re-order member variables for better packing.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::HTMLCanvasElement):
* html/HTMLCanvasElement.h:
2016-01-26 Chris Dumez <cdumez@apple.com>
Setting HTMLInputElement.value to null to set its value to the empty string
https://bugs.webkit.org/show_bug.cgi?id=153519
Reviewed by Ryosuke Niwa.
Setting HTMLInputElement.value to null to set its value to the empty string:
- https://html.spec.whatwg.org/#htmlinputelement
- http://heycam.github.io/webidl/#TreatNullAs
WebKit would previously unset the value attribute instead, which caused
it to fallback to input.defaultValue if set.
Firefox and Chrome behave correctly.
Test: fast/dom/HTMLInputElement/input-value-set-null.html
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setValue):
2016-01-26 Anders Carlsson <andersca@apple.com>
WebKitAdditions should be able to modify derived source rules
https://bugs.webkit.org/show_bug.cgi?id=153514
Reviewed by Tim Horton.
* DerivedSources.make:
Include WebCoreDerivedSourcesAdditions.make.
* WebCore.xcodeproj/project.pbxproj:
Pass our WebKitAdditions paths as include paths to make.
2016-01-26 Chris Dumez <cdumez@apple.com>
document.open() / write() should be prevented in beforeunload event handlers
https://bugs.webkit.org/show_bug.cgi?id=153432
Reviewed by Ryosuke Niwa.
document.open() / write() should be prevented in beforeunload event handlers:
- https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-open (step 6)
- https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-write (step 3)
- https://html.spec.whatwg.org/multipage/webappapis.html#ignore-opens-during-unload-counter
- https://html.spec.whatwg.org/multipage/browsers.html#unload-a-document
Test: fast/frames/page-beforeunload-document-open.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::dispatchBeforeUnloadEvent):
2016-01-26 Chris Dumez <cdumez@apple.com>
Add support for HTMLDataElement
https://bugs.webkit.org/show_bug.cgi?id=153459
Reviewed by Ryosuke Niwa.
Add support for HTMLDataElement:
https://html.spec.whatwg.org/multipage/semantics.html#the-data-element
Firefox already supports it.
No new tests, already covered by existing tests.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLDataElement.cpp: Added.
(WebCore::HTMLDataElement::create):
(WebCore::HTMLDataElement::HTMLDataElement):
* html/HTMLDataElement.h: Added.
* html/HTMLDataElement.idl: Added.
* html/HTMLElementsAllInOne.cpp:
* html/HTMLTagNames.in:
2016-01-26 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r195610.
https://bugs.webkit.org/show_bug.cgi?id=153513
The test added with this change is timing out on almost every
run (Requested by ryanhaddad on #webkit).
Reverted changeset:
"Calling video.controls=true during a scrub operation cancels
scrub."
https://bugs.webkit.org/show_bug.cgi?id=153494
http://trac.webkit.org/changeset/195610
2016-01-26 Brady Eidson <beidson@apple.com>
History.pushState causes intense memory pressure.
https://bugs.webkit.org/show_bug.cgi?id=153435
Reviewed by Sam Weinig, Oliver Hunt, and Geoff Garen.
Tests: fast/loader/stateobjects/pushstate-frequency-iframe.html
fast/loader/stateobjects/pushstate-frequency-with-user-gesture.html
fast/loader/stateobjects/pushstate-frequency.html
fast/loader/stateobjects/replacestate-frequency-iframe.html
fast/loader/stateobjects/replacestate-frequency-with-user-gesture.html
fast/loader/stateobjects/replacestate-frequency.html
loader/stateobjects/pushstate-size-iframe.html
loader/stateobjects/pushstate-size.html
loader/stateobjects/replacestate-size-iframe.html
loader/stateobjects/replacestate-size.html
Add restrictions on how frequently push/replaceState can be called,
as well as how much of a cumulative payload they can deliver.
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::pushState):
(WebCore::JSHistory::replaceState):
* page/History.cpp:
(WebCore::History::stateObjectAdded):
* page/History.h:
2016-01-26 Anders Carlsson <andersca@apple.com>
Add a Dictionary overload that returns an Optional result
https://bugs.webkit.org/show_bug.cgi?id=153507
Reviewed by Tim Horton.
* bindings/js/Dictionary.h:
(WebCore::Dictionary::get):
2016-01-26 Philip Rogers <pdr@chromium.org>
Let SVG images not taint canvases except when containing foreignObjects
https://bugs.webkit.org/show_bug.cgi?id=119639
Reviewed by Brent Fulgham.
r153876 caused SVG images to not taint canvases but the patch allowed
for subimage resources. This can be a problem if a subimage (e.g., data
uri image) contains a foreignObject which can violate security (e.g.,
visited links).
This patch updates SVGImage::hasSingleSecurityOrigin to check if the
image contains any foreignObjects or images that themselves contain
foreignObjects. SVG images without foreignObjects are allowed to not
taint canvases.
Canvas patterns are problematic because an animated SVG image can switch
between tainting and not tainting the canvas. A FIXME has been added to
solve this, and in the meantime we cause SVG images to taint patterns.
Tests: svg/as-image/svg-canvas-pattern-with-link-tainted.html
svg/as-image/svg-canvas-svg-with-feimage-with-link-tainted.html
svg/as-image/svg-canvas-svg-with-image-with-link-tainted.html
* html/canvas/CanvasPattern.cpp:
(WebCore::CanvasPattern::CanvasPattern):
(WebCore::CanvasPattern::~CanvasPattern):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::~SVGFEImageElement):
(WebCore::SVGFEImageElement::hasSingleSecurityOrigin):
(WebCore::SVGFEImageElement::clearResourceReferences):
* svg/SVGFEImageElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::create):
(WebCore::SVGImageElement::hasSingleSecurityOrigin):
(WebCore::SVGImageElement::isSupportedAttribute):
* svg/SVGImageElement.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasSingleSecurityOrigin):
2016-01-26 Michael Catanzaro <mcatanzaro@igalia.com>
CSSGrammar.y:1742.31-34: warning: unused value: $3
https://bugs.webkit.org/show_bug.cgi?id=153462
Reviewed by Alex Christensen.
This warning indicates that we have a memory leak. From the bison manual:
"Right-hand side symbols of a rule that explicitly triggers a syntax error via YYERROR are
not discarded automatically. As a rule of thumb, destructors are invoked only when user
actions cannot manage the memory."
Arguably a design error, but that's how it is.
* css/CSSGrammar.y.in:
2016-01-26 Jer Noble <jer.noble@apple.com>
Calling video.controls=true during a scrub operation cancels scrub.
https://bugs.webkit.org/show_bug.cgi?id=153494
Reviewed by Eric Carlson.
Test: media/media-controls-drag-timeline-set-controls-property.html
Verify that the video.controls attribute actually changed before tearing down and
re-adding the media controls to the Shadow DOM.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleControlsChange):
(Controller.prototype.hasControls):
2016-01-26 Jeremy Noble <jer.noble@apple.com>
[EME][Mac] Crash in [AVStreamSession addStreamDataParser:]; uncaught exception
https://bugs.webkit.org/show_bug.cgi?id=153495
Reviewed by Eric Carlson.
When AVContentKeySession is not available, fall back to pre-AVContentKeySession behavior;
namely, immediately create an AVStreamSession object in
willProvideContentKeyRequestInitializationData, rather than waiting for didProvide.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
2016-01-26 Dean Jackson <dino@apple.com>
[iOS] Documents without an explicit width should not get fast tapping
https://bugs.webkit.org/show_bug.cgi?id=153465
<rdar://problem/23962529>
Reviewed by Simon Fraser (and Wenson Hseih).
As the title says, documents that do not set a viewport should
not get the fast click behaviour. There were complaints that we broke
double-tap to scroll in ImageDocuments where the image was narrow and long.
The fix is to just keep a flag that tells the UI process if the
width was explicit. However, it turns out that those ImageDocuments
are given an explicit device-width, which is fine for scaling but
really should behave as auto for fast tapping. So we also need
to tell the UIProcess if the viewport arguments came from an
ImageDocument.
Test: fast/events/ios/viewport-no-width-value-allows-double-tap.html
* dom/ViewportArguments.cpp:
(WebCore::findSizeValue): Add a parameter that toggles a flag
if the size was explicitly set.
(WebCore::setViewportFeature): Remember if the width was
explicit.
* dom/ViewportArguments.h: Add a widthWasExplicit flag.
(WebCore::ViewportArguments::operator==):
2016-01-25 Dave Hyatt <hyatt@apple.com>
Speculative fixes for crashing in viewportChangeAffectedPicture
https://bugs.webkit.org/show_bug.cgi?id=153450
Reviewed by Dean Jackson.
Don't attach any conditions to the removal of a picture element from
the document's HashSet. This ensures that if the condition is ever
wrong for any reason, we'll still remove the picture element on
destruction.
Fix the media query evaluation to match the other evaluations (used by
the preload scanner and HTMLImageElement). This includes using the
document element's computed style instead of our own and also null
checking the document element first. This is the likely cause of the
crashes.
* html/HTMLPictureElement.cpp:
(WebCore::HTMLPictureElement::~HTMLPictureElement):
(WebCore::HTMLPictureElement::didMoveToNewDocument):
(WebCore::HTMLPictureElement::viewportChangeAffectedPicture):
2016-01-26 Chris Dumez <cdumez@apple.com>
Make sure a page is still PageCache-able after firing the 'pagehide' events
https://bugs.webkit.org/show_bug.cgi?id=153449
Reviewed by Andreas Kling.
Make sure a page is still PageCache-able after firing the 'pagehide'
events and abort if it isn't. This should improve robustness and it is
easy for pagehide event handlers to do things that would make a Page no
longer PageCache-able and this leads to bugs that are difficult to
investigate.
To achieve this, the 'pagehide' event firing logic was moved out of the
CachedFrame constructor. It now happens earlier in
PageCache::addIfCacheable() after checking if the page is cacheable and
before constructing the CachedPage / CachedFrames. After firing the
'pagehide' event in PageCache::addIfCacheable(), we check again that
the page is still cacheable and we abort early if it is not.
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* history/PageCache.cpp:
(WebCore::setInPageCache):
(WebCore::firePageHideEventRecursively):
(WebCore::PageCache::addIfCacheable):
* history/PageCache.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
2016-01-26 Beth Dakin <bdakin@apple.com>
Rubber-stamped by Tim Horton.
Add one more bit of SPI.
* platform/spi/mac/NSSpellCheckerSPI.h:
2016-01-26 Olivier Blin <olivier.blin@softathome.com>
Fix build with ENABLE_DEVICE_ORIENTATION on non-iOS platforms
https://bugs.webkit.org/show_bug.cgi?id=153490
Reviewed by Michael Catanzaro.
This has been broken since r178702, which changed the Page
argument from a pointer to a reference in logCanCachePageDecision().
No new tests since this is a build fix.
* history/PageCache.cpp:
(WebCore::canCachePage):
2016-01-25 Ada Chan <adachan@apple.com>
Move WebVideoFullscreenManager and related classes from iOS specific folders to cocoa folders
https://bugs.webkit.org/show_bug.cgi?id=153473
Reviewed by Eric Carlson.
No new tests, just moving files.
* WebCore.xcodeproj/project.pbxproj:
Update due to changes to the file locations.
* platform/cocoa/WebVideoFullscreenModel.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModel.h.
* platform/cocoa/WebVideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.h.
(WebCore::WebVideoFullscreenModelVideoElement::create):
Fix a style error by moving the opening curly brace down one line.
* platform/cocoa/WebVideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm.
2016-01-26 Konstantin Tokarev <annulen@yandex.ru>
Do not convert GlyphBufferAdvance to FloatSize
https://bugs.webkit.org/show_bug.cgi?id=153429
GlyphBufferAdvance is not necessaryly convertible to FloatSize.
Also, this code was doing extra work by transforming height value.
Reviewed by Antti Koivisto.
No new tests needed.
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGGlyphToPathTranslator::extents):
2016-01-22 Ada Chan <adachan@apple.com>
Enable API related to the video fullscreen layer in MediaPlayerPrivateAVFoundationObjC
also on Mac with video presentation mode support.
https://bugs.webkit.org/show_bug.cgi?id=153222
Reviewed by Eric Carlson.
No new tests. Covered by existing tests.
Introduce VideoFullscreenLayerManager to deal with the video layer when switching
between inline and fullscreen mode. We'll reuse it in other MediaPlayerPrivateInterface
implementations.
Now that MediaPlayerPrivateAVFoundationObjC's platform layer can be a WebVideoContainerLayer,
this exposes a bug in PlatformCALayerCocoa::clone() where we assumed the platform layer
is always an AVPlayerLayer if the PlatformCALayer's layer type is LayerTypeAVPlayerLayer.
Add a helper method to get an AVPlayerLayer from a PlatformCALayerCocoa (which also handles
WebVideoContainerLayer case) and use it in PlatformCALayerCocoa::clone().
* WebCore.xcodeproj/project.pbxproj:
Add VideoFullscreenLayerManager to the project.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
Create m_videoFullscreenLayerManager. The video inline layer, video fullscreen layer,
and the video fullscreen frame are now managed by that class.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
Just call VideoFullscreenLayerManager::setVideoLayer() to handle adding the video
layer in either the inline or fullscreen layer.
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
Call VideoFullscreenLayerManager::didDestroyVideoLayer().
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
Get the video inline layer from VideoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
Guard the iOS specific code properly.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
Get the video fullscreen layer from VideoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateAVFoundationObjC::requiresTextTrackRepresentation):
Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
Get the video fullscreen layer and video fullscreen frame from VideoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation):
Get the video fullscreen layer from VideoFullscreenLayerManager.
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h: Added.
(WebCore::VideoFullscreenLayerManager::videoInlineLayer):
(WebCore::VideoFullscreenLayerManager::videoFullscreenLayer):
(WebCore::VideoFullscreenLayerManager::videoFullscreenFrame):
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: Added.
(-[WebVideoContainerLayer setBounds:]):
(-[WebVideoContainerLayer setPosition:]):
WebVideoContainerLayer was moved from MediaPlayerPrivateAVFoundationObjC.mm.
(WebCore::VideoFullscreenLayerManager::create):
(WebCore::VideoFullscreenLayerManager::VideoFullscreenLayerManager):
(WebCore::VideoFullscreenLayerManager::setVideoLayer):
Code moved from MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer().
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):
Code moved from MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer().
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenFrame):
Code moved from MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame().
(WebCore::VideoFullscreenLayerManager::didDestroyVideoLayer):
Code moved from MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer().
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::clone):
Use the new PlatformCALayerCocoa::avPlayerLayer() method to get the AVPlayerLayer from both the
destination and source PlatformCALayers.
(PlatformCALayerCocoa::avPlayerLayer):
Return nil if the layer type is not LayerTypeAVPlayerLayer. Otherwise, return the
platform layer if it is indeed an AVPlayerLayer. If not, it should be a WebVideoContainerLayer
and we should return its sublayer which should be an AVPlayerLayer.
2016-01-26 Chris Dumez <cdumez@apple.com>
First parameter to window.showModalDialog() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=153436
Reviewed by Youenn Fablet.
Make window.showModalDialog()'s first parameter mandatory to match the
last specification containing it:
http://dev.w3.org/html5/spec-preview/user-prompts.html#dialogs-implemented-using-separate-documents
The new behavior also matches Firefox, while Chrome no longer supports
this operation.
With this change, the W3C HTML test suite no longer hangs in the middle
because it mistakenly pops up a modal dialog during testing.
Test: fast/dom/Window/showModalDialog-mandatory-parameter.html
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::showModalDialog):
2016-01-26 Eric Carlson <eric.carlson@apple.com>
LayoutTest media/airplay-target-availability.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=153100
<rdar://problem/24346796>
Reviewed by Daniel Bates.
No new tests, media/airplay-target-availability.html was updated
* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::clientStateDidChange): Schedule a configuration scan if
any of the config flags have changed.
(WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Update logging.
2016-01-25 Carlos Garcia Campos <cgarcia@igalia.com>
Main frame scrollbars not updated on hovering when using overlay scrollbars
https://bugs.webkit.org/show_bug.cgi?id=153304
Reviewed by Michael Catanzaro.
Legacy scrollbars were fixed in r194155, but overlay scrollbars
are not notified when they are hovered. This is because the layer
hit test in RenderView::hitTest always returns true when using
overlay scrollbars and we are returning early in such case,
ignoring the HitTestRequest::AllowFrameScrollbars flag. So, in
case of using overlay scrollbars we still need to check the
RenderView scrollbars even when the layer hit test succeeded.
* rendering/RenderView.cpp:
(WebCore::RenderView::hitTest):
2016-01-26 Daniel Bates <dabates@apple.com>
LayoutTest http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html crashing
https://bugs.webkit.org/show_bug.cgi?id=153250
<rdar://problem/12172843>
And
<rdar://problem/24248040>
Reviewed by Alexey Proskuryakov.
Remove an incorrect assertion that the absolute URL associated with a protection space cannot
contain consecutive forward slash (/) characters. A URL can contain consecutive forward slashes.
This also makes the invariants for CredentialStorage::findDefaultProtectionSpaceForURL() symmetric
with the invariants for WebCore::protectionSpaceMapKeyFromURL().
Tests: http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/xmlhttprequest/basic-auth-load-URL-with-consecutive-slashes.html
* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
2016-01-26 Daniel Bates <dabates@apple.com>
Remove XMLHttpRequestException
https://bugs.webkit.org/show_bug.cgi?id=102698
<rdar://problem/24338476>
Reviewed by Chris Dumez.
Inspired by a patch by Erik Arvidsson.
As per <https://xhr.spec.whatwg.org> (21 January 2016) and <https://html.spec.whatwg.org/multipage/workers.html#dom-workerglobalscope-importscripts> (25 January 2016)
XMLHttpRequest and WorkerGlobalScope.importScripts() should throw a DOMException object instead
of a XMLHttpRequestException object when a NetworkError, AbortError, or TimeoutError occur. This
makes the behavior of WebKit more closely conform to these standards as well as the behavior of
other browsers.
* CMakeLists.txt: Remove entries for XMLHttpRequestException.idl and XMLHttpRequestException.cpp.
* DerivedSources.make: Remove entry for XMLHttpRequestException.idl.
* WebCore.order: Remove exported symbols for XMLHttpRequestException.
* WebCore.vcxproj/WebCore.vcxproj: Remove entries for JSXMLHttpRequestException.{cpp, h}, XMLHttpRequestException.{cpp, h}
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSExceptionBase.cpp:
(WebCore::toExceptionBase): Remove logic for XMLHttpRequestException.
* dom/DOMExceptions.in: Remove entry for XMLHttpRequestException.
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts): Throw DOMException.NETWORK_ERR instead of XMLHttpRequestException.NETWORK_ERR.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest): Ditto.
(WebCore::XMLHttpRequest::didFail): Throw DOMException.ABORT_ERR instead of XMLHttpRequestException.ABORT_ERR.
(WebCore::XMLHttpRequest::didReachTimeout): Throw DOMException.TIMEOUT_ERR instead of XMLHttpRequestException.TIMEOUT_ERR.
* xml/XMLHttpRequestException.cpp: Removed.
* xml/XMLHttpRequestException.h: Removed.
* xml/XMLHttpRequestException.idl: Removed.
2016-01-25 Youenn Fablet <youenn.fablet@crf.canon.fr>
WebCoreJSBuiltins do not use to do conditional include
https://bugs.webkit.org/show_bug.cgi?id=153306
Reviewed by Alex Christensen.
Removing compilation guards as builtin generator adds them in the files themselves.
Fixing MediaDevices.js to generate MEDIA_STREAM compilation guard.
No change in behavior.
* Modules/mediastream/MediaDevices.js: Changing @optional to @conditional.
* Modules/mediastream/NavigatorUserMedia.js: Making it @conditional.
* bindings/js/WebCoreJSBuiltins.cpp:
* bindings/js/WebCoreJSBuiltins.h:
2016-01-25 Alex Christensen <achristensen@webkit.org>
Fix internal Windows build
https://bugs.webkit.org/show_bug.cgi?id=153469
Reviewed by Brent Fulgham.
* CMakeLists.txt:
Pass the GPERF_EXECUTABLE that we found to perl scripts so they can use it instead of just calling gperf.
This is needed for builds where gperf is not in the PATH.
* DerivedSources.make:
Pass "gperf" as the gperf command to retain existing functionality on mac.
* bindings/scripts/preprocess-idls.pl:
(CygwinPathIfNeeded):
* bindings/scripts/preprocessor.pm:
(applyPreprocessor):
Add /cygdrive/c/cygwin/bin to the PATH before calling cygpath.
This is needed for builds where we are using cygwin, but C:/cygwin/bin is not in the PATH.
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
* css/makeSelectorPseudoElementsMap.py:
* css/makeprop.pl:
* platform/network/create-http-header-name-table:
Use the gperf executable passed in as a command line parameter if it is given.
2016-01-25 Simon Fraser <simon.fraser@apple.com>
DisplayList items can log paths now
https://bugs.webkit.org/show_bug.cgi?id=153417
Reviewed by Zalan Bujtas.
Now that Path supports TextStream logging, clean up its output a little and
enable dumping of Paths in DisplayListItems.
* platform/graphics/Path.cpp:
(WebCore::operator<<):
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::operator<<):
2016-01-25 Antti Koivisto <antti@apple.com>
Fix the comment.
* rendering/style/RenderStyle.h:
2016-01-25 Enrica Casucci <enrica@apple.com>
Add support for DataDetectors in WK (iOS).
https://bugs.webkit.org/show_bug.cgi?id=152989
rdar://problem/22855960
Reviewed by Tim Horton.
Adding new helper functions for data detection related tasks.
The patch also fixes a bug when creating DOM ranges from DDQueryRange
spanning multiple fragments.
* editing/cocoa/DataDetection.h:
* editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::isDataDetectorLink):
(WebCore::DataDetection::dataDetectorIdentifier):
(WebCore::detectItemAtPositionWithRange):
(WebCore::DataDetection::detectItemAroundHitTestResult):
(WebCore::resultIsURL):
(WebCore::removeResultLinksFromAnchor):
(WebCore::searchForLinkRemovingExistingDDLinks):
(WebCore::DataDetection::detectContentInRange):
2016-01-25 Myles C. Maxfield <mmaxfield@apple.com>
Remove broken cache from CSSFontFaceSource
https://bugs.webkit.org/show_bug.cgi?id=153440
Reviewed by Simon Fraser.
This cache has been broken since 2013 (r158085). Given we didn't notice a perf
hit when it broke, and the fact it's been broken for years, it clearly isn't
necessary.
https://bugs.webkit.org/show_bug.cgi?id=153414 consists of a fairly invasive
change to CSSFontFaceSource; this patch includes a working version of this
cache, along with an easy way to enable/disable it (to measure possible perf
changes).
This patch is a short-term cleanup patch in the mean time until the above
invasive change gets landed.
No new tests because there is no behavior (or performance!) change.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font):
(WebCore::CSSFontFaceSource::~CSSFontFaceSource): Deleted.
(WebCore::CSSFontFaceSource::pruneTable): Deleted.
(WebCore::CSSFontFaceSource::fontLoaded): Deleted.
* css/CSSFontFaceSource.h:
2016-01-25 Sam Weinig <sam@webkit.org>
Try to fix the simulator build.
* platform/spi/cocoa/DataDetectorsCoreSPI.h:
2016-01-25 Sam Weinig <sam@webkit.org>
Roll back in r195559 with a build fix.
* WebCore.xcodeproj/project.pbxproj:
* editing/cocoa/DataDetection.mm:
* platform/cocoa/DataDetectorsCoreSoftLink.mm: Added.
* platform/cocoa/DataDetectorsCoreSoftLink.h: Added.
* platform/spi/cocoa/DataDetectorsCoreSPI.h:
2016-01-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r195559.
https://bugs.webkit.org/show_bug.cgi?id=153458
This change broke the iOS build (Requested by ryanhaddad on
#webkit).
Reverted changeset:
"Fix the ASAN build."
http://trac.webkit.org/changeset/195559
2016-01-25 Antti Koivisto <antti@apple.com>
Resolving direction and writing mode properties should not mutate document
https://bugs.webkit.org/show_bug.cgi?id=153446
Reviewed by Andreas Kling.
Replace directionSetOnDocumentElement/writingModeSetOnDocumentElement document flags them with style flags.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueDirection):
(WebCore::StyleBuilderCustom::resetEffectiveZoom):
(WebCore::StyleBuilderCustom::applyValueWebkitWritingMode):
(WebCore::StyleBuilderCustom::applyValueWebkitTextOrientation):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::markers):
(WebCore::Document::directionSetOnDocumentElement): Deleted.
(WebCore::Document::writingModeSetOnDocumentElement): Deleted.
(WebCore::Document::setDirectionSetOnDocumentElement): Deleted.
(WebCore::Document::setWritingModeSetOnDocumentElement): Deleted.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/style/RenderStyle.h:
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
2016-01-25 Sam Weinig <sam@webkit.org>
Fix the ASAN build.
* WebCore.xcodeproj/project.pbxproj:
* editing/cocoa/DataDetection.mm:
* platform/cocoa/DataDetectorsCoreSoftLink.mm: Added.
* platform/cocoa/DataDetectorsCoreSoftLink.h: Added.
* platform/spi/cocoa/DataDetectorsCoreSPI.h:
2016-01-25 Alex Christensen <achristensen@webkit.org>
[Win] Another build fix after r195545
* CMakeLists.txt:
r195548 didn't change all the pre-builds back to post-builds.
2016-01-25 Alex Christensen <achristensen@webkit.org>
[Win] Fix clean build after r195545.
* CMakeLists.txt:
* PlatformWin.cmake:
I got a little carried away. WebCore already had a pre-build event. It was correct before r195545.
2016-01-25 Beth Dakin <bdakin@apple.com>
Handle soft spaces after accepted candidates
https://bugs.webkit.org/show_bug.cgi?id=153331
-and corresponding-
rdar://problem/23958418
Reviewed by Darin Adler.
Candidates now come with built-in spaces, so we should not insert a space for
them.
* editing/Editor.cpp:
(WebCore::Editor::handleAcceptedCandidate):
New SPI to properly handle these soft spaces.
* platform/spi/mac/NSSpellCheckerSPI.h:
2016-01-25 Alex Christensen <achristensen@webkit.org>
[Win] Copy forwarding headers before building a project
https://bugs.webkit.org/show_bug.cgi?id=153434
Reviewed by Brent Fulgham.
* CMakeLists.txt:
* PlatformWin.cmake:
2016-01-25 Brady Eidson <beidson@apple.com>
Modern IDB: Implement getIndexRecord in the SQLite backing store.
https://bugs.webkit.org/show_bug.cgi?id=153425
Reviewed by Darin Adler.
No new tests (Some failures now pass, other failures progressed closer to passing).
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
2016-01-25 Eric Carlson <eric.carlson@apple.com>
Media "ended" event incorrectly fires when currentTime is set
https://bugs.webkit.org/show_bug.cgi?id=150348
<rdar://problem/24247974>
Reviewed by Jer Noble.
Test: media/media-ended-fired-once.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::invalidateCachedTime): Always mark m_cachedTime as invalid.
2016-01-25 Konstantin Tokarev <annulen@yandex.ru>
Do not convert GlyphBufferAdvance to FloatSize
https://bugs.webkit.org/show_bug.cgi?id=153421
Reviewed by Simon Fraser.
No new tests needed.
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawGlyphs::computeBounds):
2016-01-22 Ryosuke Niwa <rniwa@webkit.org>
document.createElement should be able to create a custom element
https://bugs.webkit.org/show_bug.cgi?id=153173
Reviewed by Darin Adler.
Added the support for constructing a custom element via document.createElement.
Extracted HTMLElementFactory::createKnownElement, which returns nullptr when the specified name doesn't match
any builtin element instead of out of HTMLUnknownElement, out of HTMLElementFactory::createElement.
Test: fast/custom-elements/Document-createElement.html
* bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::constructHTMLElement): Added. Constructs a custom element by invoking its
constructor. We allow exceptions to be thrown by the constructor so the caller is responsible for checking
any exceptions in the ExecState before preceeding if the returned value is null.
* bindings/js/JSCustomElementInterface.h:
(WebCore::JSCustomElementInterface::constructSVGElement): Added.
* bindings/js/JSElementCustom.cpp:
(WebCore::toJSNewlyCreated): Exit early if the element is a custom element as the wrapper had already been
created by super() call inside the custom element'c constructor.
* bindings/js/JSMainThreadExecState.h:
(WebCore::JSMainThreadExecState):
* bindings/js/JSMainThreadExecStateInstrumentation.h:
(WebCore::JSMainThreadExecState::instrumentFunctionInternal): Generalized from instrumentFunctionCall so that
we can use it for both call and construct.
(WebCore::JSMainThreadExecState::instrumentFunctionCall): Specialized the above function for call.
(WebCore::JSMainThreadExecState::instrumentFunctionConstruct): Ditto for construct.
* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::findInterface): Added.
* dom/CustomElementDefinitions.h:
* dom/Document.cpp:
(WebCore::createHTMLElementWithNameValidation): Extracted from createElement.
(WebCore::Document::createElementForBindings): Renamed from createElement. Specifies
ShouldCreateCustomElement::Create to create a custom element before using fallback elements.
* dom/Document.h:
* dom/Document.idl:
* dom/Node.h:
(WebCore::Node::isCustomElement): Added. This flag is used to identify a custom element.
(WebCore::Node::setIsCustomElement): Added.
* dom/make_names.pl: Extracted createKnownElement from createElement for createHTMLElementWithNameValidation.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument): Use qualified name object to instantiate
a style element and set type content attribute.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setNodeName): Use createElementForBindings here since we might be creating an
arbitrary element here. Also use RefPtr instead of raw pointers while mutating DOM for safety.
2016-01-25 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r192773): [GTK] maps.google.com unresponsive/stalls since r192773
https://bugs.webkit.org/show_bug.cgi?id=153194
Reviewed by Michael Catanzaro.
In r192773 we implemented the JavaScriptCore garbage collector
timers for the GTK+ port. Those timers schedule sources in the
current thread default main context, but JS web worker threads
implementation doesn't use WTF::RunLoop, but its own WorkerRunLoop
class that doesn't create a GMainContext for the new thread. This
means that for web sites using workers, we are now doing garbage
collection of worker VMs in the main thread which ends up in a
deadlock at some point. We need to ensure that worker threads
create a GMainContext and push it as the default one for the
thread before the WorkerGlobalScope is created. This way when the
worker Heap is created, the GC timers use the right context to
schedule their sources. And then we need to check if there are
sources pending in the thread main context on every worker run
loop iteration.
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::runInMode):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):
2016-01-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r195533.
https://bugs.webkit.org/show_bug.cgi?id=153423
It is again breaking builds of several ports (Requested by
youenn on #webkit).
Reverted changeset:
"WebCoreJSBuiltins do not use to do conditional include"
https://bugs.webkit.org/show_bug.cgi?id=153306
http://trac.webkit.org/changeset/195533
2016-01-25 Youenn Fablet <youenn.fablet@crf.canon.fr>
WebCoreJSBuiltins do not use to do conditional include
https://bugs.webkit.org/show_bug.cgi?id=153306
Reviewed by Alex Christensen.
Removing compilation guards as builtin generator adds them in the files themselves.
Fixing MediaDevices.js to generate MEDIA_STREAM compilation guard.
No change in behavior.
* Modules/mediastream/MediaDevices.js: Changing @optional to @conditional.
* bindings/js/WebCoreJSBuiltins.cpp:
* bindings/js/WebCoreJSBuiltins.h:
2016-01-25 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r195531.
https://bugs.webkit.org/show_bug.cgi?id=153420
It is breaking builds of several ports (Requested by youenn on
#webkit).
Reverted changeset:
"WebCoreJSBuiltins do not use to do conditional include"
https://bugs.webkit.org/show_bug.cgi?id=153306
http://trac.webkit.org/changeset/195531
2016-01-25 Youenn Fablet <youenn.fablet@crf.canon.fr>
WebCoreJSBuiltins do not use to do conditional include
https://bugs.webkit.org/show_bug.cgi?id=153306
Reviewed by Alex Christensen.
Removing compilation guards as builtin generator adds them in the files themselves.
No change in behavior.
* bindings/js/WebCoreJSBuiltins.cpp:
* bindings/js/WebCoreJSBuiltins.h:
2016-01-25 Youenn Fablet <youenn.fablet@crf.canon.fr>
[Fetch API] Implement Fetch API Headers
https://bugs.webkit.org/show_bug.cgi?id=152384
Reviewed by Darin Adler.
Adding Fetch Headers API as a wapper around HTTPHeaderMap.
Tests: imported/w3c/web-platform-tests/fetch/api/headers/headers-basic.html
imported/w3c/web-platform-tests/fetch/api/headers/headers-casing.html
imported/w3c/web-platform-tests/fetch/api/headers/headers-errors.html
imported/w3c/web-platform-tests/fetch/api/headers/headers-idl.html
imported/w3c/web-platform-tests/fetch/api/headers/headers-nameshake.html
imported/w3c/web-platform-tests/fetch/api/headers/headers-normalize.html
imported/w3c/web-platform-tests/fetch/api/headers/headers-structure.html
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* Modules/fetch/FetchHeaders.cpp: Added.
(WebCore::FetchHeaders::initializeWith):
(WebCore::isForbiddenHeaderName):
(WebCore::isForbiddenResponseHeaderName):
(WebCore::isSimpleHeader):
(WebCore::canWriteHeader):
(WebCore::FetchHeaders::append):
(WebCore::FetchHeaders::remove):
(WebCore::FetchHeaders::get):
(WebCore::FetchHeaders::has):
(WebCore::FetchHeaders::set):
* Modules/fetch/FetchHeaders.h: Added.
(WebCore::FetchHeaders::create):
(WebCore::FetchHeaders::~FetchHeaders):
(WebCore::FetchHeaders::internalHeaders):
(WebCore::FetchHeaders::FetchHeaders):
* Modules/fetch/FetchHeaders.idl: Added.
* Modules/fetch/FetchHeaders.js: Added.
(initializeFetchHeaders):
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* bindings/js/WebCoreJSBuiltins.cpp:
* bindings/js/WebCoreJSBuiltins.h:
(WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
(WebCore::JSBuiltinFunctions::fetchHeadersBuiltins):
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::contains):
(WebCore::HTTPHeaderMap::remove):
* platform/network/HTTPHeaderMap.h:
2016-01-22 Sergio Villar Senin <svillar@igalia.com>
[css-grid] grid shorthand must reset gap properties to their initial values
https://bugs.webkit.org/show_bug.cgi?id=153354
Reviewed by Darin Adler.
Both 'grid-row-gap' & 'grid-column-gap' are considered reset-only subproperties of the
'grid' shorthand meaning that, even thought the shorthand does not offer a way to set
their values, it must in any case reset them to the initial ones.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridShorthand):
* css/CSSPropertyNames.in:
2016-01-24 Brady Eidson <beidson@apple.com>
Modern IDB: Implement deleteIndex and getCount for the SQLite backing store.
https://bugs.webkit.org/show_bug.cgi?id=153415
Reviewed by Darin Adler.
No new tests (Handful of tests now pass, improvements on a handful of others).
* Modules/indexeddb/server/IDBBackingStore.h:
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::takeIndexByIdentifier):
(WebCore::IDBServer::MemoryObjectStore::deleteIndex):
(WebCore::IDBServer::MemoryObjectStore::deleteAllIndexes):
(WebCore::IDBServer::MemoryObjectStore::takeIndexByName): Deleted.
* Modules/indexeddb/server/MemoryObjectStore.h:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor):
(WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
* Modules/indexeddb/server/SQLiteIDBCursor.h:
* Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
(WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor):
* Modules/indexeddb/server/SQLiteIDBTransaction.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteIndex):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
* Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::deleteIndex):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:
2016-01-24 Brady Eidson <beidson@apple.com>
Unreviewed, speculative fix for:
Modern IDB: Some IDB tests crash in ~SQLiteIDBBackingStore
https://bugs.webkit.org/show_bug.cgi?id=153418
No new tests.
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore): Clear the global object
before wiping out the VM.
2016-01-24 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Reduce PassRefPtr uses in dom - 4
https://bugs.webkit.org/show_bug.cgi?id=153270
Reviewed by Darin Adler.
As a step to remove PassRefPtr uses, this patch reduces the uses in WebCore/dom.
* bindings/js/JSDeviceMotionEventCustom.cpp:
(WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
* dom/DeviceMotionData.cpp:
(WebCore::DeviceMotionData::create):
(WebCore::DeviceMotionData::DeviceMotionData):
* dom/DeviceMotionData.h:
* dom/Document.cpp:
(WebCore::Document::setBodyOrFrameset):
(WebCore::Document::setFocusedElement):
(WebCore::Document::setDecoder):
(WebCore::Document::pushCurrentScript):
* dom/Document.h:
* dom/Event.cpp:
(WebCore::Event::cloneFor):
* dom/Event.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::cloneFor):
* dom/MouseEvent.h:
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::NodePointer::NodePointer):
(WebCore::NodeIterator::NodeIterator):
* dom/NodeIterator.h:
(WebCore::NodeIterator::create):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
* platform/ios/DeviceMotionClientIOS.mm:
(WebCore::DeviceMotionClientIOS::motionChanged):
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):
2016-01-24 Myles C. Maxfield <mmaxfield@apple.com>
[Font Loading] General cleanup
https://bugs.webkit.org/show_bug.cgi?id=153403
Reviewed by Darin Adler.
It turns out that CSSFontFaceSource::m_hasExternalSVGFont exactly equals
whether or not CSSFontFaceSource::m_font is a CachedSVGFont. Therefore,
the variable is redundant.
In addition, it was being passed to functions on CSSFontFaceSource::m_font,
which means it was always true inside the CachedSVGFont subclass and
always false for the CachedFont. Therefore, there is no reason pass this
variable to these functions because its value can be determined at
authorship time.
No new tests because there is no behavior change.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font):
(WebCore::CSSFontFaceSource::CSSFontFaceSource): Deleted.
* css/CSSFontFaceSource.h:
* css/CSSFontSelector.cpp:
(WebCore::createFontFace):
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):
(WebCore::CachedFont::createFont):
* loader/cache/CachedFont.h:
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::createFont):
(WebCore::CachedSVGFont::ensureCustomFontData):
* loader/cache/CachedSVGFont.h:
* platform/network/HTTPParsers.cpp:
(WebCore::isValidHTTPToken):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):
2016-01-24 Chris Dumez <cdumez@apple.com>
An XMLDocument interface should be exposed on the global Window object
https://bugs.webkit.org/show_bug.cgi?id=153378
<rdar://problem/24315465>
Reviewed by Darin Adler.
Expose an XMLDocument interface on the global Window object, as per:
- https://dom.spec.whatwg.org/#xmldocument
DOMImplementation.createDocument() now returns an XMLDocument instead
of a Document, as per:
- https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
Previously, WebKit would alias XMLDocument to Document which caused
some W3C tests to fail.
Chrome and Firefox already match the specification here.
No new tests, already covered by existing tests.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDocumentCustom.cpp:
(WebCore::createNewDocumentWrapper):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* dom/DOMImplementation.h:
* dom/DOMImplementation.idl:
* dom/Document.cpp:
(WebCore::Document::cloneDocumentWithoutChildren):
* dom/Document.h:
(WebCore::Document::isXMLDocument):
(WebCore::Document::create): Deleted.
(WebCore::Document::createNonRenderedPlaceholder): Deleted.
* dom/XMLDocument.h: Added.
(WebCore::XMLDocument::create):
(WebCore::XMLDocument::createXHTML):
(WebCore::XMLDocument::XMLDocument):
(isType):
* dom/XMLDocument.idl: Added.
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchDocument):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setOuterHTML):
* page/DOMWindow.idl:
* page/PageSerializer.cpp:
(WebCore::SerializerMarkupAccumulator::SerializerMarkupAccumulator):
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::SVGDocument):
* svg/SVGDocument.h:
* svg/SVGDocument.idl:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseXML):
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):
2016-01-24 Brady Eidson <beidson@apple.com>
Modern IDB: Support IDBObjectStore.createIndex in the SQLite backing store.
https://bugs.webkit.org/show_bug.cgi?id=153410
Reviewed by Darin Adler.
No new tests (Covered by unskipping many existing tests).
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor):
(WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
* Modules/indexeddb/server/SQLiteIDBCursor.h:
* Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
(WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor):
* Modules/indexeddb/server/SQLiteIDBTransaction.h:
2016-01-24 Simon Fraser <simon.fraser@apple.com>
Make the dumped display list representation a bit more compact
https://bugs.webkit.org/show_bug.cgi?id=153409
Reviewed by Zalan Bujtas.
Don't make a group for every display list item.
* platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::asText):
2016-01-24 Simon Fraser <simon.fraser@apple.com>
Add testing for display list replay, and skip clipped-out items on replay
https://bugs.webkit.org/show_bug.cgi?id=153408
Reviewed by Zalan Bujtas.
Make it possible to save and serialize a DisplayList of Items which were
actually applied on replay, so that replay-time optimizations can be tested.
This exposes internals.setElementTracksDisplayListReplay() and
internals.replayDisplayListForElement().
Do a trivial replay-time optimization, which is to skip items whose extents are
outside the replay clip.
Test: displaylists/replay-skip-clipped-rect.html
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setIsTrackingDisplayListReplay):
(WebCore::GraphicsLayer::isTrackingDisplayListReplay):
(WebCore::GraphicsLayer::replayDisplayListAsText):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::layerDisplayListMap): Use a singleton map to store the replay display lists
to avoid bloating GraphicsLayerCA for test-only code. The map stores a pair of the
replay list and a clip rect, which are both dumped. Dumping the clip rect ensures that
we're reporting the replay for the correct tile in a test (since there will be a replay
for each tile).
(WebCore::GraphicsLayerCA::~GraphicsLayerCA):
(WebCore::GraphicsLayerCA::platformCALayerPaintContents):
(WebCore::GraphicsLayerCA::setIsTrackingDisplayListReplay):
(WebCore::GraphicsLayerCA::replayDisplayListAsText):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/displaylists/DisplayList.h:
(WebCore::DisplayList::DisplayList::appendItem):
* platform/graphics/displaylists/DisplayListReplayer.cpp:
(WebCore::DisplayList::Replayer::replay): In the unlikely event of tracking replays,
allocate a new DisplayList and append to it items which actually get applied.
* platform/graphics/displaylists/DisplayListReplayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setIsTrackingDisplayListReplay):
(WebCore::RenderLayerBacking::replayDisplayListAsText):
* rendering/RenderLayerBacking.h:
* testing/Internals.cpp:
(WebCore::Internals::setElementTracksDisplayListReplay):
(WebCore::Internals::replayDisplayListForElement):
* testing/Internals.h:
* testing/Internals.idl:
2016-01-23 Wonchul Lee <wonchul.lee@collabora.co.uk>
[GTK] Fix media controls displaying without controls attribute
https://bugs.webkit.org/show_bug.cgi?id=152500
Media controls is not displayed without controls attribute by default
when the video element has text track. It'll be displayed on fullscreen
regardless of controls attribute.
Reviewed by Michael Catanzaro.
* Modules/mediacontrols/mediaControlsGtk.js:
(ControllerGtk.prototype.shouldHaveControls):
(ControllerGtk.prototype.reconnectControls):
(ControllerGtk.prototype.removeControls):
(ControllerGtk.prototype.configureControls): Deleted.
2016-01-23 Alex Christensen <achristensen@webkit.org>
Use credentials from a URL with NetworkSession like we did with ResourceHandle
https://bugs.webkit.org/show_bug.cgi?id=153328
Reviewed by Alexey Proskuryakov.
This patch fixes at least http/tests/xmlhttprequest/basic-auth-credentials-escaping.html when using NetworkSession.
* platform/network/ProtectionSpaceBase.h:
(WebCore::ProtectionSpaceBase::encodingRequiresPlatformData):
* platform/network/ResourceRequestBase.h:
Add some WEBCORE_EXPORT macros for functions that are now used in WebKit2.
2016-01-23 Brady Eidson <beidson@apple.com>
Modern IDB: Implement clearing object stores and opening cursors in the SQLite backend.
https://bugs.webkit.org/show_bug.cgi?id=153396
Reviewed by Alex Christensen.
No new tests (Some failing tests now pass, others improved).
Copy more LegacyIDB SQLite backend code over to the new SQLite backend.
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
2016-01-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r195493.
https://bugs.webkit.org/show_bug.cgi?id=153397
Broke authenticaiton tests (leaks credentials) (Requested by
ap on #webkit).
Reverted changeset:
"LayoutTest http/tests/security/xssAuditor/embed-tag-in-path-
unterminated.html crashing"
https://bugs.webkit.org/show_bug.cgi?id=153250
http://trac.webkit.org/changeset/195493
2016-01-20 Ryosuke Niwa <rniwa@webkit.org>
HTMLElement::nodeName should not upper case non-ASCII characters
https://bugs.webkit.org/show_bug.cgi?id=153231
Reviewed by Darin Adler.
Use the newly added convertToASCIIUppercase to generate the string for tagName and nodeName.
Test: fast/dom/Element/tagName-must-be-ASCII-uppercase-in-HTML-document.html
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::localNameUpper): Use convertToASCIIUppercase.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::nodeName): Use convertToASCIIUppercase.
2016-01-22 Brady Eidson <beidson@apple.com>
Modern IDB: Disable simultaneous transactions in the SQLite backend for now.
https://bugs.webkit.org/show_bug.cgi?id=153381
Reviewed by Alex Christensen.
No new tests (This resolves many of the currently crashing/asserting tests).
Right now we're porting the Legacy IDB SQLite backend to Modern IDB.
The way the Legacy backend works is restricted to one transaction at a time.
There's many tricks we can play to resolve this, but that task is better performed
once all of the basic functionality is done.
Fixing this limitation is covered by https://bugs.webkit.org/show_bug.cgi?id=153382
* Modules/indexeddb/server/IDBBackingStore.h: Add a "supports simultaneous transactions" getter.
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction): If the backing store does
not support simultaneous transactions but there is a transaction in progress, return.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2016-01-22 Chris Dumez <cdumez@apple.com>
document.charset should be an alias for document.characterSet
https://bugs.webkit.org/show_bug.cgi?id=153367
Reviewed by Ryosuke Niwa.
document.charset should be an alias for document.characterSet:
- https://dom.spec.whatwg.org/#dom-document-charset
It should also be read-only.
Chrome matches the specification.
No new tests, already covered by existing tests.
* dom/Document.h:
* dom/Document.idl:
2016-01-22 Chris Dumez <cdumez@apple.com>
Document.open / Document.write should be prevented while the document is being unloaded
https://bugs.webkit.org/show_bug.cgi?id=153255
<rdar://problem/22741293>
Reviewed by Ryosuke Niwa.
Document.open / Document.write should be prevented while the document
is being unloaded, as per the HTML specification:
- https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-open (step 6)
- https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-write (step 3)
This patch is aligning our behavior with the specification and Firefox.
Calling Document.open / Document.write during the document was being
unloaded would cause us to crash as this was unexpected.
Tests: fast/frames/page-hide-document-open.html
fast/frames/page-unload-document-open.html
* WebCore.xcodeproj/project.pbxproj:
Add new IgnoreOpensDuringUnloadCountIncrementer.h header.
* dom/Document.cpp:
(WebCore::Document::open):
Abort if the document's ignore-opens-during-unload counter is greater
than zero, as per:
https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-open (step 6)
(WebCore::Document::write):
Abort if the insertion point is undefined and the document's
ignore-opens-during-unload counter is greater than zero, as per:
https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-write (step 3)
* dom/Document.h:
Add data member to maintain the document's ignore-opens-during-unload counter:
https://html.spec.whatwg.org/multipage/webappapis.html#ignore-opens-during-unload-counter
* dom/IgnoreOpensDuringUnloadCountIncrementer.h: Added.
Add utility class to increment / decrement a document's
ignore-opens-during-unload counter.
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
When a page goes into PageCache, we don't end up calling
FrameLoader::detachChildren() so we need to increment the document's
ignore-opens-during-unload counter before calling stopLoading() on each
subframe.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::detachChildren):
detachChildren() will end up firing the pagehide / unload events in each
child frame so we increment the parent frame's document's
ignore-opens-during-unload counter. This behavior matches the text of:
https://html.spec.whatwg.org/multipage/browsers.html#unload-a-document
As per the spec, the document's ignore-opens-during-unload counter should
be incremented before firing the pagehide / unload events at the document's
Window object. It should be decremented only after firing the pagehide /
unload events in each subframe. This is needed in case a subframe tries to
call document.open / document.write on a parent frame's document, from its
pagehide or unload handler.
(WebCore::FrameLoader::dispatchUnloadEvents):
Increment the document's ignore-opens-during-unload counter before firing
the pagehide / unload events and decrement it after. As per the spec, we
are not supposed to decrement this early. We actually supposed to wait
until the pagehide / unload events have been fired in all the subframes.
For this reason, we take care of re-incrementing the document's
ignore-opens-during-unload in detachChildren(), which will take care of
firing the pagehide / unload in the subframes.
2016-01-22 Brady Eidson <beidson@apple.com>
Modern IDB: Implement put, get, and delete records for the SQLite backend.
https://bugs.webkit.org/show_bug.cgi?id=153375
Reviewed by Alex Christensen.
No new tests (Covered by many existing tests now passing).
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
2016-01-22 Enrica Casucci <enrica@apple.com>
Add support for DataDetectors in WK (iOS).
https://bugs.webkit.org/show_bug.cgi?id=152989
rdar://problem/22855960
Reviewed by Tim Horton.
This patch adds the logic to perform data detection and modify
the DOM by adding data detector links as appropriate.
The data detector results returned by detectContentInRange are
stored in the Frame object.
* editing/cocoa/DataDetection.h:
* editing/cocoa/DataDetection.mm:
(WebCore::resultIsURL):
(WebCore::constructURLStringForResult):
(WebCore::removeResultLinksFromAnchor):
(WebCore::searchForLinkRemovingExistingDDLinks):
(WebCore::dataDetectorTypeForCategory):
(WebCore::buildQuery):
(WebCore::DataDetection::detectContentInRange):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
* page/Frame.h:
(WebCore::Frame::setDataDetectionResults):
(WebCore::Frame::dataDetectionResults):
* platform/spi/cocoa/DataDetectorsCoreSPI.h:
(DDQueryOffsetCompare):
2016-01-22 Daniel Bates <dabates@apple.com>
LayoutTest http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html crashing
https://bugs.webkit.org/show_bug.cgi?id=153250
<rdar://problem/12172843>
And
<rdar://problem/24248040>
Reviewed by Alexey Proskuryakov.
Remove an incorrect assertion that the absolute URL associated with a protection space cannot
contain consecutive forward slash (/) characters. A URL can contain consecutive forward slashes.
This also makes the invariants for CredentialStorage::findDefaultProtectionSpaceForURL() symmetric
with the invariants for WebCore::protectionSpaceMapKeyFromURL().
Tests: http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
http/tests/xmlhttprequest/basic-auth-load-URL-with-consecutive-slashes.html
* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
2016-01-22 Chris Dumez <cdumez@apple.com>
DOMImplementation.createHTMLDocument("") should append an empty Text Node to the title Element
https://bugs.webkit.org/show_bug.cgi?id=153374
Reviewed by Ryosuke Niwa.
DOMImplementation.createHTMLDocument("") should append an empty Text
Node to the title Element as per the steps at:
- https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument (step 6)
Firefox and Chrome follow the specification here.
Previously, WebKit would rely on HTMLTitleElement.text setter which
does not create a Text Node if the title is the empty string, as per:
- https://html.spec.whatwg.org/multipage/semantics.html#dom-title-text
- https://dom.spec.whatwg.org/#dom-node-textcontent
No new tests, already covered by existing test.
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createHTMLDocument):
2016-01-17 Ada Chan <adachan@apple.com>
Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().
https://bugs.webkit.org/show_bug.cgi?id=153220
Reviewed by Eric Carlson.
No new tests, just code refactoring.
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::supportsFullscreen):
Just pass in VideoFullscreenModeStandard as this is used for checking the standard fullscreen case.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen):
Only use the FullScreen API if the mode is VideoFullscreenModeStandard. Call ChromeClient::supportsVideoFullscreen()
with the mode.
(WebCore::HTMLMediaElement::exitFullscreen):
Move the fullscreen element check up so we can use this method to exit picture-in-picture mode.
* html/HTMLMediaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::supportsFullscreen):
Ditto.
(WebCore::HTMLVideoElement::webkitEnterFullscreen):
Pass in VideoFullscreenModeStandard to supportsFullscreen() as this is used for the standard fullscreen case.
(WebCore::HTMLVideoElement::webkitSupportsFullscreen):
Ditto.
(WebCore::HTMLVideoElement::webkitSupportsPresentationMode):
Pass in the correct VideoFullscreenMode to supportsFullscreen() corresponding to the mode string passed in.
(WebCore::HTMLVideoElement::setFullscreenMode):
Pass in the mode to supportsFullscreen().
* html/HTMLVideoElement.h:
* html/MediaController.h:
* html/MediaControllerInterface.h:
Make supportsFullscreen() take a VideoFullscreenMode.
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::reset):
Pass in VideoFullscreenModeStandard to supportsFullscreen() here since this is used for the standard
fullscreen button.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::reset):
Ditto.
* page/ChromeClient.h:
Make supportsVideoFullscreen() take a VideoFullscreenMode.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaSupportsFullscreen):
(WebCore::HitTestResult::toggleMediaFullscreenState):
(WebCore::HitTestResult::enterFullscreenForVideo):
Pass in VideoFullscreenModeStandard in the code relating to the standard fullscreen.
2016-01-22 Chris Dumez <cdumez@apple.com>
Document.URL / Document.documentURI should return "about:blank" instead of empty string / null
https://bugs.webkit.org/show_bug.cgi?id=153363
<rdar://problem/22549736>
Reviewed by Ryosuke Niwa.
Document.URL / Document.documentURI should return "about:blank" instead
of empty string / null, as per the specification:
- https://dom.spec.whatwg.org/#dom-document-url
- https://dom.spec.whatwg.org/#concept-document-url
Also, Document.documentURI should be an alias for Document.URL as per:
- https://dom.spec.whatwg.org/#dom-document-url
Firefox matches the specification.
No new tests, already covered by existing W3C tests.
* dom/Document.h:
(WebCore::Document::urlForBindings):
* dom/Document.idl:
2016-01-22 Brent Fulgham <bfulgham@apple.com>
Don't ignore the return value of CCRandomCopyBytes
https://bugs.webkit.org/show_bug.cgi?id=153369
<rdar://problem/22198376>
<rdar://problem/22198378>
Reviewed by Alexey Proskuryakov.
Tested by existing Crypto tests.
* crypto/mac/CryptoKeyMac.cpp:
(WebCore::CryptoKey::randomData): RELEASE_ASSERT if CCRandomCopyBytes ever returns
anything besides kCCSuccess.
* crypto/mac/SerializedCryptoKeyWrapMac.mm:
(WebCore::createAndStoreMasterKey): Ditto.
(WebCore::wrapSerializedCryptoKey): Ditto.
2016-01-21 Sam Weinig <sam@webkit.org>
Treat non-https actions on secure pages as mixed content
<rdar://problem/23144492>
https://bugs.webkit.org/show_bug.cgi?id=153322
Reviewed by Alexey Proskuryakov.
Tests: http/tests/security/mixedContent/insecure-form-in-iframe.html
http/tests/security/mixedContent/insecure-form-in-main-frame.html
http/tests/security/mixedContent/javascript-url-form-in-main-frame.html
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::parseAttribute):
Check form actions for mixed content.
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::checkFormForMixedContent):
* loader/MixedContentChecker.h:
Add new function to check and warn if a form's action is mixed content.
2016-01-22 Nan Wang <n_wang@apple.com>
AX: Crash in setTextMarkerDataWithCharacterOffset
https://bugs.webkit.org/show_bug.cgi?id=153365
<rdar://problem/24287924>
Reviewed by Chris Fleizach.
Sometimes when we try to create a text marker range from a stale text marker with a removed
node, it will cause crash. Fixed it by adding a null check for the AccessibilityObject we
create in setTextMarkerDataWithCharacterOffset.
Test: accessibility/text-marker/text-marker-range-with-removed-node-crash.html
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::setTextMarkerDataWithCharacterOffset):
2016-01-22 Brady Eidson <beidson@apple.com>
Modern IDB: Add transactions and create/delete object store to SQLite backend
https://bugs.webkit.org/show_bug.cgi?id=153359
Reviewed by Alex Christensen.
No new tests (Covered by many tests now passing).
* Modules/indexeddb/server/IDBBackingStore.h: Change deleteObjectStore to work on an ID instead of name.
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByIdentifier):
(WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName): Deleted.
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
Clean up filename generation a bit to actually match the previous directory structure.
Add begin/commit/abort transaction support.
Add create/delete object store support:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::filenameForDatabaseName):
(WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectory):
(WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabasePath):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
Clean up SQLiteIDBTransaction to fit with the new WebCore backing store model, which is slightly
different from the old WebKit2 backing store model:
* Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
(WebCore::IDBServer::SQLiteIDBTransaction::SQLiteIDBTransaction):
(WebCore::IDBServer::SQLiteIDBTransaction::begin):
(WebCore::IDBServer::SQLiteIDBTransaction::commit):
(WebCore::IDBServer::SQLiteIDBTransaction::abort):
(WebCore::IDBServer::SQLiteIDBTransaction::reset):
(WebCore::IDBServer::SQLiteIDBTransaction::rollback): Deleted.
* Modules/indexeddb/server/SQLiteIDBTransaction.h:
(WebCore::IDBServer::SQLiteIDBTransaction::transactionIdentifier):
(WebCore::IDBServer::SQLiteIDBTransaction::mode):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteObjectStore):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
* Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
(WebCore::IDBDatabaseInfo::deleteObjectStore):
* Modules/indexeddb/shared/IDBDatabaseInfo.h:
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:
(WebCore::IDBObjectStoreInfo::maxIndexID):
* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::identifier):
2016-01-22 Antti Koivisto <antti@apple.com>
Style resolver initialization cleanups
https://bugs.webkit.org/show_bug.cgi?id=153356
Reviewed by Simon Fraser.
Simplify StyleResolver::State initialization.
Also use more references and other cleanups.
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::prepareEvaluator):
* css/StyleMedia.cpp:
(WebCore::StyleMedia::matchMedium):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::classNamesAffectedByRules):
(WebCore::StyleResolver::State::State):
Initialize State using a constructor instead of bunch of construction functions.
Remove m_styledElement field which is just a casted version of m_element.
(WebCore::StyleResolver::State::updateConversionData):
(WebCore::StyleResolver::State::setStyle):
(WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
(WebCore::StyleResolver::canShareStyleWithElement):
(WebCore::StyleResolver::locateSharedStyle):
(WebCore::isAtShadowBoundary):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::keyframeStylesForAnimation):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
(WebCore::StyleResolver::clearCachedPropertiesAffectedByViewportUnits):
(WebCore::isCacheableInMatchedPropertiesCache):
Disallow caching of document element style entirely because the writing-mode and direction properties have special handling.
The existing check wasn't robust.
(WebCore::extractDirectionAndWritingMode):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::applyPropertyToStyle):
(WebCore::StyleResolver::State::initElement): Deleted.
(WebCore::StyleResolver::initElement): Deleted.
(WebCore::StyleResolver::State::initForStyleResolve): Deleted.
* css/StyleResolver.h:
(WebCore::StyleResolver::mediaQueryEvaluator):
(WebCore::StyleResolver::State::State):
(WebCore::StyleResolver::State::document):
(WebCore::StyleResolver::State::element):
(WebCore::StyleResolver::State::style):
(WebCore::StyleResolver::State::takeStyle):
(WebCore::StyleResolver::State::styledElement): Deleted.
* dom/Element.cpp:
(WebCore::Element::resolveStyle):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::KeyframeAnimation):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::getUncachedPseudoStyle):
(WebCore::RenderElement::containingBlockForFixedPosition):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::computeStyleInRegion):
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::styleForElement):
* svg/SVGElement.cpp:
(WebCore::SVGElement::customStyleForRenderer):
(WebCore::SVGElement::computedStyle):
(WebCore::addQualifiedName):
* svg/SVGElementRareData.h:
(WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
(WebCore::SVGElementRareData::overrideComputedStyle):
2016-01-22 Chris Fleizach <cfleizach@apple.com>
AX: <code> group and friends should have a custom subrole
https://bugs.webkit.org/show_bug.cgi?id=153282
Reviewed by Mario Sanchez Prada.
Add some custom subroles for the mac for code, ins, del, cite, var, samp, pre, kbd,
so that assistive tech can recognize them.
Test: accessibility/mac/subroles-for-formatted-groups.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isStyleFormatGroup):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper subrole]):
2016-01-22 Enrica Casucci <enrica@apple.com>
Remove dependency from DataDetectorsCore on iOS.
https://bugs.webkit.org/show_bug.cgi?id=153358
rdar://problem/24294651
Reviewed by Anders Carlsson.
Avoid build dependencies.
* Configurations/WebCore.xcconfig:
2016-01-22 Chris Fleizach <cfleizach@apple.com>
AX: ARIA combo boxes are not returning the right value for selected text range
https://bugs.webkit.org/show_bug.cgi?id=153260
Reviewed by Darin Adler.
Just because an element has an ARIA role doesn't mean we should always use the selected text range of the whole document.
If the element is also a text based ARIA control, we can still use the element's inner text range to return the right value.
Test: accessibility/selected-text-range-aria-elements.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::selectedTextRange):
2016-01-22 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r195452.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::colorValue):
2016-01-21 Dave Hyatt <hyatt@apple.com>
Elements with overflow and border-radius don't show in multicolumn properly.
https://bugs.webkit.org/show_bug.cgi?id=152920
Reviewed by Simon Fraser.
Added new test in fast/multicol.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::convertToLayerCoords):
(WebCore::RenderLayer::offsetFromAncestor):
(WebCore::RenderLayer::clipToRect):
* rendering/RenderLayer.h:
Make sure the crawl up the containing block chain to apply clips properly offsets
to account for columns. convertToLayerCoords could already handle this, so
offsetFromAncestor now takes the same extra argument (whether or not to adjust for
columns) that convertToLayerCoords does.
2016-01-22 Darin Adler <darin@apple.com>
Reduce use of equalIgnoringCase to just ignore ASCII case
https://bugs.webkit.org/show_bug.cgi?id=153266
Reviewed by Ryosuke Niwa.
Changed many call sites that were using equalIgnoringCase to instead use
equalLettersIgnoringASCIICase. What these all have in common is that the
thing they are comparing with is a string literal that has all lowercase
letters, spaces, and a few simple examples of punctuation.
Not 100% sure that the new function name is just right, but it's a long name
so it's easy to change it with a global replace if we come up with a better one.
Or if we decide ther eis no need for the "letters" optimization, we can change
these all to just use equalIgnoringASCIICase, also with a global replace.
Also made a few tweaks to some code nearby and some includes.
* Modules/encryptedmedia/CDMPrivateClearKey.cpp:
(WebCore::CDMPrivateClearKey::supportsKeySystem): Use equalLettersIgnoringASCIICase.
(WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Ditto.
* Modules/encryptedmedia/CDMSessionClearKey.cpp:
(WebCore::CDMSessionClearKey::update): Ditto.
* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::supportsMimeType): Ditto.
(WebCore::YouTubePluginReplacement::supportsFileExtension): Ditto.
* Modules/webdatabase/DatabaseAuthorizer.cpp:
(WebCore::DatabaseAuthorizer::createVTable): Ditto.
(WebCore::DatabaseAuthorizer::dropVTable): Ditto.
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readHTTPHeaders): Ditto.
(WebCore::WebSocketHandshake::checkResponseHeaders): Ditto.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::findAriaModalNodes): Ditto.
(WebCore::AXObjectCache::handleMenuItemSelected): Ditto.
(WebCore::AXObjectCache::handleAriaModalChange): Ditto.
(WebCore::isNodeAriaVisible): Ditto.
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::isEnabled): Ditto.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole): Use isColorControl
instead of checking the typeAttr of the HTMLInputElement directly.
(WebCore::AccessibilityNodeObject::isEnabled): Use equalLettersIgnoringASCIICase.
(WebCore::AccessibilityNodeObject::isPressed): Ditto.
(WebCore::AccessibilityNodeObject::isChecked): Ditto.
(WebCore::AccessibilityNodeObject::isMultiSelectable): Ditto.
(WebCore::AccessibilityNodeObject::isRequired): Ditto.
(WebCore::shouldUseAccessibilityObjectInnerText): Ditto.
(WebCore::AccessibilityNodeObject::colorValue): Ditto.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
Use equalLettersIgnoringASCIICase.
(WebCore::AccessibilityObject::ariaIsMultiline): Ditto.
(WebCore::AccessibilityObject::liveRegionStatusIsEnabled): Ditto.
(WebCore::AccessibilityObject::sortDirection): Ditto.
(WebCore::AccessibilityObject::supportsARIAPressed): Ditto.
(WebCore::AccessibilityObject::supportsExpanded): Ditto.
(WebCore::AccessibilityObject::isExpanded): Ditto.
(WebCore::AccessibilityObject::checkboxOrRadioValue): Ditto.
(WebCore::AccessibilityObject::isARIAHidden): Ditto.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::supportsARIADragging): Ditto.
(WebCore::AccessibilityRenderObject::defaultObjectInclusion): Ditto.
(WebCore::AccessibilityRenderObject::elementAttributeValue): Ditto.
(WebCore::AccessibilityRenderObject::isSelected): Ditto.
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): Ditto.
(WebCore::AccessibilityRenderObject::orientation): Ditto.
(WebCore::AccessibilityRenderObject::canSetExpandedAttribute): Ditto.
(WebCore::AccessibilityRenderObject::canSetValueAttribute): Ditto.
(WebCore::AccessibilityRenderObject::ariaLiveRegionAtomic): Ditto.
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::ariaRowSpan): Use == to compare a string
with "0" since there is no need to "ignore case" when there are no letters.
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::create): Use equalLettersIgnoringASCIICase.
* css/CSSCalculationValue.h: Removed unneeded include of CSSParserValues.h.
* css/CSSCustomPropertyValue.h: Ditto.
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::isSVGFontFaceSrc): Use equalLettersIgnoringASCIICase.
* css/CSSGrammar.y.in: Use equalLettersIgnoringASCIICase. Also restructured the code
a bit to have more normal formatting and reordered it slightly.
* css/CSSParser.cpp:
(WebCore::equal): Deleted.
(WebCore::equalIgnoringCase): Deleted.
(WebCore::equalLettersIgnoringASCIICase): Added. Replaces function templates named
equal and equalIgnoringCase that are no longer used.
(WebCore::CSSParser::parseValue): Use equalLettersIgnoringASCIICase.
(WebCore::CSSParser::parseNonElementSnapPoints): Ditto.
(WebCore::CSSParser::parseAlt): Ditto.
(WebCore::CSSParser::parseContent): Ditto.
(WebCore::CSSParser::parseFillImage): Ditto.
(WebCore::CSSParser::parseAnimationName): Ditto.
(WebCore::CSSParser::parseAnimationTrigger): Ditto.
(WebCore::CSSParser::parseAnimationProperty): Ditto.
(WebCore::CSSParser::parseKeyframeSelector): Ditto.
(WebCore::CSSParser::parseAnimationTimingFunction): Ditto.
(WebCore::CSSParser::parseGridTrackList): Ditto.
(WebCore::CSSParser::parseGridTrackSize): Ditto.
(WebCore::CSSParser::parseDashboardRegions): Ditto.
(WebCore::CSSParser::parseClipShape): Ditto.
(WebCore::CSSParser::parseBasicShapeInset): Ditto.
(WebCore::CSSParser::parseBasicShape): Ditto.
(WebCore::CSSParser::parseFontFaceSrcURI): Ditto.
(WebCore::CSSParser::parseFontFaceSrc): Ditto.
(WebCore::CSSParser::isCalculation): Ditto.
(WebCore::CSSParser::parseColorFromValue): Ditto.
(WebCore::CSSParser::parseBorderImage): Ditto.
(WebCore::parseDeprecatedGradientPoint): Ditto.
(WebCore::parseDeprecatedGradientColorStop): Ditto.
(WebCore::CSSParser::parseDeprecatedGradient): Ditto.
(WebCore::CSSParser::parseLinearGradient): Ditto.
(WebCore::CSSParser::parseRadialGradient): Ditto.
(WebCore::CSSParser::isGeneratedImageValue): Ditto.
(WebCore::CSSParser::parseGeneratedImage): Ditto.
(WebCore::filterInfoForName): Ditto.
(WebCore::validFlowName): Ditto.
(WebCore::CSSParser::realLex): Ditto.
(WebCore::isValidNthToken): Ditto.
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePagePseudoSelector): Ditto.
* css/CSSParserValues.h:
(WebCore::equalLettersIgnoringASCIICase): Added.
* css/CSSVariableDependentValue.h: Removed unneeded include of CSSParserValues.h.
* css/MediaList.cpp:
(WebCore::reportMediaQueryWarningIfNeeded): Use equalLettersIgnoringASCIICase.
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::mediaTypeMatch): Ditto.
(WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific): Ditto.
(WebCore::evalResolution): Ditto.
* css/SelectorPseudoTypeMap.h: Removed unneeded include of CSSParserValues.h.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTouchCallout): Use equalLettersIgnoringASCIICase.
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Added an include of
CSSParserValues.h since it's no longer included by SelectorPseudoTypeMap.h.
* dom/Document.cpp:
(WebCore::setParserFeature): Use equalLettersIgnoringASCIICase.
(WebCore::Document::processReferrerPolicy): Ditto.
(WebCore::Document::createEvent): Ditto.
(WebCore::Document::parseDNSPrefetchControlHeader): Ditto.
* dom/Element.cpp:
(WebCore::Element::spellcheckAttributeState): Use isNull instead of doing
checking equality with nullAtom. Use isEmpty instead of equalIgnoringCase("").
Use equalLettersIgnoringASCIICase.
(WebCore::Element::canContainRangeEndPoint): Ditto.
* dom/InlineStyleSheetOwner.cpp:
(WebCore::isValidCSSContentType): Use equalLettersIgnoringASCIICase.
Added comment about peculiar behavior where we do case-sensitive processing of
the MIME type if the document is XML.
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript): Use equalLettersIgnoringASCIICase.
(WebCore::ScriptElement::isScriptForEventSupported): Ditto.
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::parseSandboxPolicy): Ditto.
* dom/ViewportArguments.cpp:
(WebCore::findSizeValue): Ditto.
(WebCore::findScaleValue): Ditto.
(WebCore::findBooleanValue): Ditto.
* editing/EditorCommand.cpp:
(WebCore::executeDefaultParagraphSeparator): Use equalLettersIgnoringASCIICase.
(WebCore::executeInsertBacktab): Use ASCIILiteral.
(WebCore::executeInsertHTML): Use emptyString.
(WebCore::executeInsertLineBreak): Use ASCIILiteral.
(WebCore::executeInsertNewline): Ditto.
(WebCore::executeInsertTab): Ditto.
(WebCore::executeJustifyCenter): Ditto.
(WebCore::executeJustifyFull): Ditto.
(WebCore::executeJustifyLeft): Ditto.
(WebCore::executeJustifyRight): Ditto.
(WebCore::executeStrikethrough): Ditto.
(WebCore::executeStyleWithCSS): Use equalLettersIgnoringASCIICase.
(WebCore::executeUseCSS): Ditto.
(WebCore::executeSubscript): Use ASCIILiteral.
(WebCore::executeSuperscript): Ditto.
(WebCore::executeToggleBold): Ditto.
(WebCore::executeToggleItalic): Ditto.
(WebCore::executeUnderline): Ditto.
(WebCore::executeUnscript): Ditto.
(WebCore::stateBold): Ditto.
(WebCore::stateItalic): Ditto.
(WebCore::stateStrikethrough): Ditto.
(WebCore::stateSubscript): Ditto.
(WebCore::stateSuperscript): Ditto.
(WebCore::stateUnderline): Ditto.
(WebCore::stateJustifyCenter): Ditto.
(WebCore::stateJustifyFull): Ditto.
(WebCore::stateJustifyLeft): Ditto.
(WebCore::stateJustifyRight): Ditto.
(WebCore::valueFormatBlock): Use emptyString.
(WebCore::Editor::Command::value): Use ASCIILiteral.
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement): Use equalLettersIgnoringASCIICase.
* fileapi/Blob.cpp:
(WebCore::Blob::isNormalizedContentType): Use isASCIIUpper.
* history/HistoryItem.cpp:
(WebCore::HistoryItem::setFormInfoFromRequest): Use equalLettersIgnoringASCIICase.
* html/Autocapitalize.cpp:
(WebCore::valueOn): Deleted.
(WebCore::valueOff): Deleted.
(WebCore::valueNone): Deleted.
(WebCore::valueWords): Deleted.
(WebCore::valueSentences): Deleted.
(WebCore::valueAllCharacters): Deleted.
(WebCore::autocapitalizeTypeForAttributeValue): Use equalLettersIgnoringASCIICase.
(WebCore::stringForAutocapitalizeType): Put the AtomicString globals right in the
switch statement instead of in separate functions.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::draggable): Use equalLettersIgnoringASCIICase.
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::parseAttribute): Ditto.
* html/HTMLBRElement.cpp:
(WebCore::HTMLBRElement::collectStyleForPresentationAttribute): Ditto.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::collectStyleForPresentationAttribute): Ditto.
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::parseAttribute): Ditto.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::toDataURL): Use ASCIILiteral.
* html/HTMLDivElement.cpp:
(WebCore::HTMLDivElement::collectStyleForPresentationAttribute):
Use equalLettersIgnoringASCIICase.
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::designMode): Use ASCIILiteral.
(WebCore::HTMLDocument::setDesignMode): Use equalLettersIgnoringASCIICase.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::nodeName): Updated comment.
(WebCore::isLTROrRTLIgnoringCase): Use equalLettersIgnoringASCIICase.
(WebCore::contentEditableType): Ditto.
(WebCore::HTMLElement::collectStyleForPresentationAttribute): Ditto.
(WebCore::toValidDirValue): Ditto.
(WebCore::HTMLElement::insertAdjacent): Ditto.
(WebCore::contextElementForInsertion): Ditto.
(WebCore::HTMLElement::applyAlignmentAttributeToStyle): Ditto.
(WebCore::HTMLElement::setContentEditable): Ditto.
(WebCore::HTMLElement::draggable): Ditto.
(WebCore::HTMLElement::translateAttributeMode): Ditto.
(WebCore::HTMLElement::hasDirectionAuto): Ditto.
(WebCore::HTMLElement::directionality): Ditto.
(WebCore::HTMLElement::dirAttributeChanged): Ditto.
(WebCore::HTMLElement::addHTMLColorToStyle): Ditto.
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::collectStyleForPresentationAttribute): Ditto.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::autocorrect): Ditto.
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::autocorrect): Ditto.
(WebCore::HTMLFormElement::shouldAutocomplete): Ditto.
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseAttribute): Ditto.
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::parseAttribute): Use equalLettersIgnoringASCIICase.
Use == when comparing with "0" and "1" since there is no need for case folding.
* html/HTMLHRElement.cpp:
(WebCore::HTMLHRElement::collectStyleForPresentationAttribute):
Use equalLettersIgnoringASCIICase.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::draggable): Ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute): Ditto.
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::appendFormData): Ditto.
* html/HTMLMarqueeElement.cpp:
(WebCore::HTMLMarqueeElement::collectStyleForPresentationAttribute): Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Ditto.
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::process): Ditto.
* html/HTMLObjectElement.cpp:
(WebCore::mapDataParamToSrc): Use references, modern for loops, simplify
logic to not use array indices, use ASCIILiteral and equalLettersIgnoringASCIICase.
(WebCore::HTMLObjectElement::parametersForPlugin): Update to call new function.
(WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use equalLettersIgnoringASCIICase.
(WebCore::HTMLObjectElement::containsJavaApplet): Ditto.
* html/HTMLParagraphElement.cpp:
(WebCore::HTMLParagraphElement::collectStyleForPresentationAttribute): Ditto.
* html/HTMLParamElement.cpp:
(WebCore::HTMLParamElement::isURLParameter): Ditto.
* html/HTMLTableElement.cpp:
(WebCore::getBordersFromFrameAttributeValue): Ditto.
(WebCore::HTMLTableElement::collectStyleForPresentationAttribute): Ditto.
(WebCore::HTMLTableElement::parseAttribute): Ditto.
* html/HTMLTablePartElement.cpp:
(WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute): Ditto.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::parseAttribute): Ditto.
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setRangeText): Ditto.
(WebCore::HTMLTextFormControlElement::directionForFormData): Ditto.
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::parseAttribute): Ditto.
* html/InputType.cpp:
(WebCore::InputType::applyStep): Ditto.
* html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::LinkRelAttribute): Ditto.
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::wirelessVideoPlaybackDisabled): Ditto.
* html/NumberInputType.cpp:
(WebCore::NumberInputType::sizeShouldIncludeDecoration): Ditto.
* html/RangeInputType.cpp:
(WebCore::RangeInputType::createStepRange): Ditto.
(WebCore::RangeInputType::handleKeydownEvent): Ditto.
* html/StepRange.cpp:
(WebCore::StepRange::parseStep): Ditto.
* html/canvas/CanvasStyle.cpp:
(WebCore::parseColor): Ditto.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::setCompatibilityModeFromDoctype): Ditto.
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLElementStack::isHTMLIntegrationPoint): Ditto.
* html/parser/HTMLMetaCharsetParser.cpp:
(WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes): Ditto.
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Ditto.
(WebCore::TokenPreloadScanner::StartTagScanner::crossOriginModeAllowsCookies): Ditto.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
* html/parser/XSSAuditor.cpp:
(WebCore::isDangerousHTTPEquiv): Ditto.
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::hasRequiredFileIdentifier): Removed unneeded special case
for empty string.
* inspector/InspectorPageAgent.cpp:
(WebCore::createXHRTextDecoder): Use equalLettersIgnoringASCIICase.
* inspector/NetworkResourcesData.cpp:
(WebCore::createOtherResourceTextDecoder): Ditto.
* loader/CrossOriginAccessControl.cpp:
(WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Ditto.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy): Ditto.
* loader/FormSubmission.cpp:
(WebCore::appendMailtoPostFormDataToURL): Ditto.
(WebCore::FormSubmission::Attributes::parseEncodingType): Ditto.
(WebCore::FormSubmission::Attributes::parseMethodType): Ditto.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldPerformFragmentNavigation): Ditto.
(WebCore::FrameLoader::shouldTreatURLAsSrcdocDocument): Ditto.
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement): Ditto.
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::start): Ditto.
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget): Ditto.
* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::determineContentType): Ditto.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::load): Ditto.
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::requestIsHTTPOrHTTPSGet): Ditto.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::canUseSheet): Ditto.
* loader/cache/CachedResource.cpp:
(WebCore::shouldCacheSchemeIndefinitely): Ditto.
* page/DOMSelection.cpp:
(WebCore::DOMSelection::modify): Ditto.
* page/EventSource.cpp:
(WebCore::EventSource::didReceiveResponse): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor): Ditto.
* page/Performance.cpp:
(WebCore::Performance::webkitGetEntriesByType): Ditto.
* page/PerformanceResourceTiming.cpp:
(WebCore::passesTimingAllowCheck): Ditto.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin): Use emptyString.
(WebCore::SecurityOrigin::toString): Use ASCIILiteral.
(WebCore::SecurityOrigin::databaseIdentifier): Ditto.
* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::parse): Use equalLettersIgnoringASCIICase.
(WebCore::UserContentURLPattern::matches): Ditto.
* platform/URL.cpp:
(WebCore::URL::protocolIs): Ditto.
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType):
Changed to use early exit and equalLettersIgnoringASCIICase. Added comment
about inconsistency with next function.
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Added comment
about inconsistency with previous function.
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::generateKeyRequest):
Use equalLettersIgnoringASCIICase.
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::generateKeyRequest): Ditto.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::utiFromMIMEType): Ditto.
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::similarFont): Changed to not use so many global
variables and use equalLettersIgnoringASCIICase.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::platformFontWithFamilySpecialCase): Ditto.
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::supportsFormat): Use equalLettersIgnoringASCIICase.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::readString): Ditto.
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::createAsync): Ditto.
(WebCore::BlobResourceHandle::loadResourceSynchronously): Ditto.
* platform/network/CacheValidation.cpp:
(WebCore::parseCacheControlDirectives): Ditto.
* platform/network/FormData.h:
(WebCore::FormData::parseEncodingType): Ditto.
* platform/network/HTTPParsers.cpp:
(WebCore::contentDispositionType): Ditto.
(WebCore::parseXFrameOptionsHeader): Ditto.
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::isHTTP): Use protocolIsInHTTPFamily, which is
both clearer and more efficient.
(WebCore::ResourceResponseBase::isAttachment): Rewrite to be a bit more terse
and use equalLettersIgnoringASCIICase.
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest):
Use equalLettersIgnoringASCIICase.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::willSendRequest): Ditto.
* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::open): Ditto.
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::isColumnDeclaredAsBlob): Ditto.
* platform/text/TextEncodingRegistry.cpp:
(WebCore::defaultTextEncodingNameForSystemLanguage): Use ASCIILiteral
and equalLettersIgnoringASCIICase.
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement): Use equalLettersIgnoringASCIICase.
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically): Ditto.
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Ditto.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setEditingBehavior): Ditto.
(WebCore::InternalSettings::setShouldDisplayTrackKind): Ditto.
(WebCore::InternalSettings::shouldDisplayTrackKind): Ditto.
* testing/Internals.cpp:
(WebCore::markerTypeFrom): Ditto.
(WebCore::markerTypesFrom): Ditto.
(WebCore::Internals::mediaElementHasCharacteristic): Ditto.
(WebCore::Internals::setCaptionDisplayMode): Ditto.
(WebCore::Internals::beginMediaSessionInterruption): Ditto.
(WebCore::Internals::endMediaSessionInterruption): Ditto.
(WebCore::Internals::setMediaSessionRestrictions): Ditto.
(WebCore::Internals::setMediaElementRestrictions): Ditto.
(WebCore::Internals::postRemoteControlCommand): Ditto.
(WebCore::Internals::setAudioContextRestrictions): Ditto.
(WebCore::Internals::setMockMediaPlaybackTargetPickerState): Ditto.
* testing/MockCDM.cpp:
(WebCore::MockCDM::supportsKeySystem): Ditto.
(WebCore::MockCDM::supportsKeySystemAndMimeType): Ditto.
(WebCore::MockCDM::supportsMIMEType): Ditto.
* xml/XMLHttpRequest.cpp:
(WebCore::isSetCookieHeader): Ditto.
(WebCore::XMLHttpRequest::responseXML): Ditto.
(WebCore::XMLHttpRequest::isAllowedHTTPMethod): Ditto.
(WebCore::XMLHttpRequest::didReceiveData): Ditto.
2016-01-22 Youenn Fablet <youenn.fablet@crf.canon.fr>
Remove PassRefPtr from ResourceRequest and FormData
https://bugs.webkit.org/show_bug.cgi?id=153229
Reviewed by Chris Dumez.
Covered by existing tests.
Making ResourceRequest::setHTTPBody take a RefPtr<FormData>&&.
Moving FormData from PassRefPtr to RefPtr.
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::didBlockScript):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::populateFrameLoadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/PingLoader.cpp:
(WebCore::PingLoader::sendViolationReport):
* loader/PingLoader.h:
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation):
* platform/network/FormData.cpp:
(WebCore::FormData::create):
(WebCore::FormData::createMultiPart):
(WebCore::FormData::copy):
(WebCore::FormData::deepCopy):
(WebCore::FormData::resolveBlobReferences):
* platform/network/FormData.h:
(WebCore::FormData::decode):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::adopt):
(WebCore::ResourceRequestBase::setHTTPBody):
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::setHTTPBody):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::setHTTPBody):
* platform/network/cf/FormDataStreamCFNet.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getFormElementsCount):
* platform/network/mac/FormDataStreamMac.h:
* platform/network/mac/FormDataStreamMac.mm:
(WebCore::setHTTPBody):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::doRedirect):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):
2016-01-22 Csaba Osztrogonác <ossy@webkit.org>
Fix the !ENABLE(INDEXED_DATABASE) build after r195443
https://bugs.webkit.org/show_bug.cgi?id=153350
Unreviewed buildfix.
* page/Page.cpp:
(WebCore::Page::setSessionID):
2016-01-22 ChangSeok Oh <changseok.oh@collabora.com>
[GTK] Remove a focus ring on anchor node when focused by mouse.
https://bugs.webkit.org/show_bug.cgi?id=136121
Reviewed by Michael Catanzaro.
Safari, Chrome and FF don't show a focus ring, the dotted rectangle on anchor node
for mouse clicking. I think the behavior is reasonable and looks better.
No reason for gtk & efl ports to keep the focus on anchor node. Of course, this change should not
affect the focus ring for tab navigation.
No new tests since an existing test can cover this.
Tests: fast/events/click-focus-anchor.html
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isMouseFocusable):
2016-01-21 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r168244): Content in horizontal-bt page is offset such that only the end is viewable and there is a white gap at the top
https://bugs.webkit.org/show_bug.cgi?id=136019
Reviewed by Dan Bernstein.
In horizontal-bt documents (where the page starts scrolled to the bottom, and scrolling up goes into negative scroll positions),
the position of the root content layer would be set incorrectly by the scrolling thread, resulting in misplaced
content.
Fix by having the renamed "yPositionForRootContentLayer" take scroll origin into
account, and being more consistent about using scrollOrigin to position this layer.
Test: fast/scrolling/programmatic-horizontal-bt-document-scroll.html
* page/FrameView.cpp:
(WebCore::FrameView::yPositionForFooterLayer): Moved
(WebCore::FrameView::positionForRootContentLayer): Take scrollOrigin, and subtract it from the computed value.
(WebCore::FrameView::yPositionForRootContentLayer): Renamed.
* page/FrameView.h:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): We've already pushed the new scrollPosition onto the FrameView,
so we can just use the member function to compute the positionForContentsLayer.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition): This is the bug fix; FrameView::positionForRootContentLayer()
now takes scrollOrigin into account.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateRootLayerPosition): Rather than using the documentRect, position the root content layer
in terms of the scroll origin (which is -documentRect.location()).
2016-01-21 Brady Eidson <beidson@apple.com>
Modern IDB: Support populating/extracting database metadata with SQLite backend.
Nhttps://bugs.webkit.org/show_bug.cgi?id=153318
Reviewed by Alex Christensen.
No new tests (Covered by current tests).
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::willAbortTransaction): Committing transactions can abort if the commit
ends in error.
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::didCommit): Before a committing transaction is aborted, notify the
IDBDatabase that it aborted.
Copied over from WK2:
* Modules/indexeddb/server/IDBSerialization.cpp: Added.
(WebCore::serializeIDBKeyPath):
(WebCore::deserializeIDBKeyPath):
(WebCore::serializeIDBKeyData):
(WebCore::deserializeIDBKeyData):
* Modules/indexeddb/server/IDBSerialization.h: Added.
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::createBackingStore): Optionally create a SQLite backing store.
Mostly copied over verbatim from WebKit2's UniqueIDBDatabaseBackingStoreSQLite.cpp:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::idbKeyCollate):
(WebCore::IDBServer::v1RecordsTableSchema):
(WebCore::IDBServer::v1RecordsTableSchemaAlternate):
(WebCore::IDBServer::v2RecordsTableSchema):
(WebCore::IDBServer::v2RecordsTableSchemaAlternate):
(WebCore::IDBServer::createOrMigrateRecordsTableIfNecessary):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidRecordsTable):
(WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::unregisterCursor):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
Copied over from WK2:
* Modules/indexeddb/server/SQLiteIDBCursor.cpp: Added.
(WebCore::IDBServer::SQLiteIDBCursor::maybeCreate):
(WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
(WebCore::IDBServer::buildIndexStatement):
(WebCore::IDBServer::buildObjectStoreStatement):
(WebCore::IDBServer::SQLiteIDBCursor::establishStatement):
(WebCore::IDBServer::SQLiteIDBCursor::createSQLiteStatement):
(WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
(WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
(WebCore::IDBServer::SQLiteIDBCursor::bindArguments):
(WebCore::IDBServer::SQLiteIDBCursor::advance):
(WebCore::IDBServer::SQLiteIDBCursor::advanceUnique):
(WebCore::IDBServer::SQLiteIDBCursor::advanceOnce):
(WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
(WebCore::IDBServer::SQLiteIDBCursor::iterate):
* Modules/indexeddb/server/SQLiteIDBCursor.h: Added.
(WebCore::IDBServer::SQLiteIDBCursor::identifier):
(WebCore::IDBServer::SQLiteIDBCursor::transaction):
(WebCore::IDBServer::SQLiteIDBCursor::objectStoreID):
(WebCore::IDBServer::SQLiteIDBCursor::currentKey):
(WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
(WebCore::IDBServer::SQLiteIDBCursor::currentValueBuffer):
(WebCore::IDBServer::SQLiteIDBCursor::didError):
Copied over from WK2:
* Modules/indexeddb/server/SQLiteIDBTransaction.cpp: Added.
(WebCore::IDBServer::SQLiteIDBTransaction::SQLiteIDBTransaction):
(WebCore::IDBServer::SQLiteIDBTransaction::~SQLiteIDBTransaction):
(WebCore::IDBServer::SQLiteIDBTransaction::begin):
(WebCore::IDBServer::SQLiteIDBTransaction::commit):
(WebCore::IDBServer::SQLiteIDBTransaction::reset):
(WebCore::IDBServer::SQLiteIDBTransaction::rollback):
(WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenCursor):
(WebCore::IDBServer::SQLiteIDBTransaction::closeCursor):
(WebCore::IDBServer::SQLiteIDBTransaction::notifyCursorsOfChanges):
(WebCore::IDBServer::SQLiteIDBTransaction::clearCursors):
(WebCore::IDBServer::SQLiteIDBTransaction::inProgress):
* Modules/indexeddb/server/SQLiteIDBTransaction.h: Added.
(WebCore::IDBServer::SQLiteIDBTransaction::transactionIdentifier):
(WebCore::IDBServer::SQLiteIDBTransaction::mode):
(WebCore::IDBServer::SQLiteIDBTransaction::sqliteTransaction):
* page/Page.cpp:
(WebCore::Page::setSessionID): If the new SessionID is different from the last one,
clear the IDBConnectionToServer.
(WebCore::Page::idbConnection): Always ask the DatabaseProvider; It handles whether or not
the session is ephemeral.
2016-01-21 Alex Christensen <achristensen@webkit.org>
CMake build fix after r195302.
* PlatformMac.cmake:
2016-01-21 Ryosuke Niwa <rniwa@webkit.org>
createElementFromSavedToken shouldn't have the code to create a non-HTML element
https://bugs.webkit.org/show_bug.cgi?id=153327
Reviewed by Chris Dumez.
Since HTMLConstructionSite::createElementFromSavedToken is only used to instantiate a formatting element,
there is no need for it to support creating a non-HTML elements. Remove the branch and assert that this
is indeed the case.
createElementFromSavedToken is called in HTMLTreeBuilder::callTheAdoptionAgency and HTMLConstructionSite's
reconstructTheActiveFormattingElements. In both cases, the stack item passed to createElementFromSavedToken
is guaranteed to be in the list of active formatting elements, which only contains formatting elements.
No new tests since there is no behavioral change.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLHeadElement):
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
(WebCore::HTMLConstructionSite::insertFormattingElement):
(WebCore::HTMLConstructionSite::createElement): Returns Ref<Element> instead of PassRefPtr<Element>.
(WebCore::HTMLConstructionSite::createHTMLElement): Ditto.
(WebCore::HTMLConstructionSite::createElementFromSavedToken): Ditto. Removed the code to instantiate
a non-HTML element. Also assert that an element created by this function is a formatting tag.
* html/parser/HTMLConstructionSite.h:
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLConstructionSite::isFormattingTag): Put into HTMLConstructionSite to add an assertion.
(WebCore::HTMLTreeBuilder::processEndTagForInBody):
2016-01-21 Andreas Kling <akling@apple.com>
CGImageSource sometimes retains temporary SharedBuffer data indefinitely, doubling memory cost.
<https://webkit.org/b/153325>
Reviewed by Anders Carlsson.
After a resource has finished downloading, and has been cached to disk cache,
we mmap() the disk cached version so we can throw out the temporary download buffer.
Due to the way CGImageSource works on Mac/iOS, it's not possible to replace the data
being decoded once the image has been fully decoded once. When doing the replacement,
we'd end up with the SharedBuffer wrapping the mmap() data, and the CGImageSource
keeping the old SharedBuffer::DataBuffer alive, effectively doubling the memory cost.
This patch adds a CachedResource::didReplaceSharedBufferContents() callback that
CachedImage implements to throw out the decoded data. This is currently the only way
to make CGImageSource drop the retain it holds on the SharedBuffer::DataBuffer.
The downside of this approach is that we'll sometimes incur the cost of one additional
image decode after an image downloads and is cached for the first time.
I put a FIXME in there since we could do better with a little help from CGImageSource.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didReplaceSharedBufferContents):
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::tryReplaceEncodedData):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::didReplaceSharedBufferContents):
2016-01-21 Beth Dakin <bdakin@apple.com>
Add the ability to update WebKitAdditions to WK2
https://bugs.webkit.org/show_bug.cgi?id=153320
-and corresponding-
rdar://problem/23639629
Reviewed by Anders Carlsson.
This SPI is un-used now.
* platform/spi/mac/NSSpellCheckerSPI.h:
2016-01-21 Simon Fraser <simon.fraser@apple.com>
GraphicsContext: low quality drawImage and drawImageBuffer should use InterpolationLow
https://bugs.webkit.org/show_bug.cgi?id=49002
Reviewed by Chris Dumez.
When using low quality image scaling for images which are getting painted often,
the code used InterpolationNone, which make the images look even worse than they should.
Not easily testable.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawImageBuffer):
(WebCore::GraphicsContext::drawConsumingImageBuffer):
2016-01-19 Ada Chan <adachan@apple.com>
Make it possible to enable VIDEO_PRESENTATION_MODE on other Cocoa platforms.
https://bugs.webkit.org/show_bug.cgi?id=153218
Reviewed by Eric Carlson.
No new tests. Code refactoring.
* Configurations/FeatureDefines.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
Move WebVideoFullscreenInterface.h from ios to cocoa.
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::webkitSupportsPresentationMode):
The declaration of supportsPictureInPicture() has been moved to WebVideoFullscreenInterface.h
so include that header instead. Guard the supportsPictureInPicture() call with PLATFORM(COCOA)
as that method is only defined in Cocoa.
* platform/cocoa/WebVideoFullscreenInterface.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterface.h.
Also move the declaration of supportsPictureInPicture() here.
* platform/graphics/MediaPlayer.cpp:
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
Implementations of methods related to the video fullscreen layer are now guarded by
PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)) instead.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
Declaration of supportsPictureInPicture() has been moved to WebVideoFullscreenInterface.h
* platform/mac/WebVideoFullscreenInterfaceMac.mm: Added.
(WebCore::supportsPictureInPicture):
Return false for now.
2016-01-21 Said Abou-Hallawa <sabouhallawa@apple.com>
A crash reproducible in Path::isEmpty() under RenderSVGShape::paint()
https://bugs.webkit.org/show_bug.cgi?id=149613
Reviewed by Darin Adler.
When RenderSVGRoot::layout() realizes its layout size has changed and
it has resources which have relative sizes, it marks all the clients of
the resources for invalidates regardless whether they belong to the
same RenderSVGRoot or not. But it reruns the layout only for its children.
If one of these clients comes before the current RenderSVGRoot in the render
tree, ee end up having renderer marked for invalidation at rendering time.
This also prevents scheduling the layout if the same renderer is marked
for another invalidation later. We prevent this because we do not want
to schedule another layout for a renderer which is already marked for
invalidation. This can cause crash if the renderer is an RenderSVGPath.
The fix is to mark "only" the clients of a resource which belong to the
same RenderSVGRoot of the resource. Also we need to run the layout for
all the resources which belong to different RenderSVGRoots before running
the layout for an SVG renderer.
Tests: svg/custom/filter-update-different-root.html
svg/custom/pattern-update-different-root.html
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
We should not mark any client outside the current root for invalidation
* rendering/svg/RenderSVGResourceContainer.h: Remove unneeded private keyword.
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::addResourceForClientInvalidation):
Code clean up; use findTreeRootObject() instead of repeating the same code.
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::isEmpty): Avoid crashing if RenderSVGShape::isEmpty()
is called before calling RenderSVGShape::layout().
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout): findTreeRootObject() now returns a pointer.
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::findTreeRootObject): I do think nothing
guarantees that an SVG renderer has to have an RenderSVGRoot in its
ancestors. So change this function to return a pointer. Also Provide
the non-const version of this function.
(WebCore::SVGRenderSupport::layoutDifferentRootIfNeeded): Runs the layout
if needed for all the resources which belong to different RenderSVGRoots.
(WebCore::SVGRenderSupport::layoutChildren): Make sure all the renderer's
resources which belong to different RenderSVGRoots are laid out before
running the layout for this renderer.
* rendering/svg/SVGRenderSupport.h: Remove a mysterious comment.
* rendering/svg/SVGResources.cpp:
(WebCore::SVGResources::layoutDifferentRootIfNeeded): Run the layout for
all the resources which belong to different RenderSVGRoots outside the
context of their RenderSVGRoots.
* rendering/svg/SVGResources.h:
(WebCore::SVGResources::clipper):
(WebCore::SVGResources::markerStart):
(WebCore::SVGResources::markerMid):
(WebCore::SVGResources::markerEnd):
(WebCore::SVGResources::masker):
(WebCore::SVGResources::filter):
(WebCore::SVGResources::fill):
(WebCore::SVGResources::stroke):
Code clean up; use nullptr instead of 0.
2016-01-21 Jer Noble <jer.noble@apple.com>
[EME] Correctly report errors when generating key requests from AVContentKeySession.
https://bugs.webkit.org/show_bug.cgi?id=151963
Reviewed by Eric Carlson.
WebIDL's "unsigned long" is a 32-bit unsigned integer, and C++'s "unsigned long" is (or, can
be) a 64-bit integer on 64-bit platforms. Casting a negative integer to a 64-bit integer
results in a number which cannot be accurately stored in a double-length floating point
number. Previously, the mac CDM code would work around this issue by returning the absolute
value of NSError code returned by media frameworks. Instead, fix the underlying problem by
storing the MediaKeyError's systemCode as a uint32_t (which more accurately represents the
size of a WebIDL "unsigned long" on all platforms.)
Check the error code issued by -contentKeyRequestDataForApp:contentIdentifier:options:error:.
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/CDMSessionClearKey.cpp:
(WebCore::CDMSessionClearKey::generateKeyRequest):
(WebCore::CDMSessionClearKey::update):
* Modules/encryptedmedia/CDMSessionClearKey.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::keyRequestTimerFired):
(WebCore::MediaKeySession::addKeyTimerFired):
(WebCore::MediaKeySession::sendError):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleReadyStateChange):
* WebCore.xcodeproj/project.pbxproj:
* html/MediaKeyError.h:
(WebCore::MediaKeyError::create):
(WebCore::MediaKeyError::systemCode):
* html/MediaKeyEvent.h:
* platform/graphics/CDMSession.h:
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
(WebCore::CDMSessionAVFoundationCF::generateKeyRequest):
(WebCore::CDMSessionAVFoundationCF::update):
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::generateKeyRequest):
(WebCore::CDMSessionAVContentKeySession::update):
(WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
(WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
(WebCore::CDMSessionAVFoundationObjC::update):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::generateKeyRequest):
(WebCore::CDMSessionAVStreamSession::update):
(WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
(WebCore::CDMSessionMediaSourceAVFObjC::systemCodeForError): Deleted.
* testing/MockCDM.cpp:
(WebCore::MockCDMSession::generateKeyRequest):
(WebCore::MockCDMSession::update):2016-01-15 Simon Fraser <simon.fraser@apple.com>
2016-01-21 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] GResource resources should be cached indefinitely in memory cache
https://bugs.webkit.org/show_bug.cgi?id=153275
Reviewed by Žan Doberšek.
GResources can't change so they will always return the same data,
we never need to revalidate them.
* loader/cache/CachedResource.cpp:
(WebCore::shouldCacheSchemeIndefinitely):
2016-01-21 Nan Wang <n_wang@apple.com>
AX: [IOS] Implement next/previous text marker functions using TextIterator
https://bugs.webkit.org/show_bug.cgi?id=153292
<rdar://problem/24268243>
Reviewed by Chris Fleizach.
Added support for the refactored next/previous text marker functions on iOS. And
made text marker tests working on iOS.
Also, fixed an issue in AXObjectCache where creating a range with a replaced node
at the start or end might exclude that node.
Tests: accessibility/text-marker/text-marker-previous-next.html
accessibility/text-marker/text-marker-with-user-select-none.html
* accessibility/AXObjectCache.cpp:
(WebCore::characterOffsetsInOrder):
(WebCore::resetNodeAndOffsetForReplacedNode):
(WebCore::AXObjectCache::rangeForUnorderedCharacterOffsets):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(+[WebAccessibilityTextMarker textMarkerWithVisiblePosition:cache:]):
(+[WebAccessibilityTextMarker textMarkerWithCharacterOffset:cache:]):
(+[WebAccessibilityTextMarker startOrEndTextMarkerForRange:isStart:cache:]):
(-[WebAccessibilityTextMarker dataRepresentation]):
(-[WebAccessibilityTextMarker visiblePosition]):
(-[WebAccessibilityTextMarker characterOffset]):
(-[WebAccessibilityTextMarker isIgnored]):
(-[WebAccessibilityTextMarker accessibilityObject]):
(-[WebAccessibilityTextMarker description]):
(-[WebAccessibilityObjectWrapper stringForTextMarkers:]):
(blockquoteLevel):
(-[WebAccessibilityObjectWrapper textMarkerRange]):
(-[WebAccessibilityObjectWrapper accessibilityObjectForTextMarker:]):
(-[WebAccessibilityObjectWrapper nextMarkerForMarker:]):
(-[WebAccessibilityObjectWrapper previousMarkerForMarker:]):
(-[WebAccessibilityObjectWrapper textMarkerForPoint:]):
(-[WebAccessibilityObjectWrapper nextMarkerForCharacterOffset:]):
(-[WebAccessibilityObjectWrapper previousMarkerForCharacterOffset:]):
(-[WebAccessibilityObjectWrapper rangeForTextMarkers:]):
(-[WebAccessibilityObjectWrapper lengthForTextMarkers:]):
(-[WebAccessibilityObjectWrapper startOrEndTextMarkerForTextMarkers:isStart:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeForMarkers:]):
(-[WebAccessibilityObjectWrapper accessibilityIdentifier]):
2016-01-20 Zalan Bujtas <zalan@apple.com>
http://victordarras.fr/cssgame/ doesn't work in Safari.
https://bugs.webkit.org/show_bug.cgi?id=153285
<rdar://problem/24212369>
Reviewed by Tim Horton.
This patch adds support for hittesting ClipPathOperation::Reference.
Tests: svg/clip-path/hittest-clip-path-reference-miss.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderObject.h:
(WebCore::RenderObject::isSVGResourceClipper):
* rendering/svg/RenderSVGResourceClipper.h:
(isType):
2016-01-20 David Kilzer <ddkilzer@apple.com>
ResourceHandleCFURLConnectionDelegateWithOperationQueue delegate methods don't NULL-check m_handle->client()
<https://webkit.org/b/152675>
<rdar://problem/24034044>
Reviewed by Brent Fulgham.
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
- Add NULL check for m_handle->client() as is done in the
WebCoreResourceHandleAsOperationQueueDelegate class in
WebCoreResourceHandleAsOperationQueueDelegate.mm. (The NULL
check for -connection:didReceiveResponse: is currently
missing, but there are crashes there, too, that are covered by
Bug 152673.)
2016-01-20 Said Abou-Hallawa <sabouhallawa@apple.com>
Use TinyLRUCache in caching the CGColorRef in WebCore::cachedCGColor()
https://bugs.webkit.org/show_bug.cgi?id=153279
Reviewed by Dean Jackson.
Reuse the new template TinyLRUCache in caching the CGColor instead of
having the same code repeated twice.
* platform/graphics/cg/ColorCG.cpp:
(WebCore::leakCGColor):
(WebCore::RetainPtr<CGColorRef>>::createValueForKey):
(WebCore::cachedCGColor):
2016-01-20 Timothy Hatcher <timothy@apple.com>
Web Inspector: InspectorCSSAgent does not call disable in willDestroyFrontendAndBackend
https://bugs.webkit.org/show_bug.cgi?id=153289
<rdar://problem/24242600>
Reviewed by Joseph Pecoraro.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend): Call disable().
2016-01-20 Said Abou-Hallawa <sabouhallawa@apple.com>
Refactor AtomicStringKeyedMRUCache to be a generic LRU cache
https://bugs.webkit.org/show_bug.cgi?id=153109
Reviewed by Darin Adler.
Replace the template specialization of AtomicStringKeyedMRUCache with
template derived from TinyLRUCachePolicy. Override the functions which
are needed for creating the values and the null value. Also replace the
static function which was returning a NeverDestroyed AtomicStringKeyedMRUCache
with a singleton function 'cache' inside the derived template.
* WebCore.xcodeproj/project.pbxproj:
* platform/text/AtomicStringKeyedMRUCache.h: Removed.
* platform/text/cf/HyphenationCF.cpp:
(WebCore::canHyphenate):
(WebCore::lastHyphenLocation):
(WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>::createValueForNullKey): Deleted.
(WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>::createValueForKey): Deleted.
(WebCore::cfLocaleCache): Deleted.
* platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::countLeadingSpaces):
(WebCore::lastHyphenLocation):
(WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): Deleted.
(WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Deleted.
(WebCore::hyphenDictionaryCache): Deleted.
2016-01-20 Chris Dumez <cdumez@apple.com>
Drop support for obsolete Node.isSupported()
https://bugs.webkit.org/show_bug.cgi?id=153164
Reviewed by Darin Adler.
Drop support for obsolete Node.isSupported(). Chrome and Firefox already
dropped it.
No new tests, already covered by existing test.
* dom/Node.cpp:
(WebCore::Node::isSupportedForBindings):
* dom/Node.h:
* dom/Node.idl:
2016-01-20 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix compile warning when building with GTK+ < 3.14.
* rendering/RenderThemeGtk.cpp:
(WebCore::loadThemedIcon):
2016-01-20 Csaba Osztrogonác <ossy@webkit.org>
[Mac] Speculative cmake buildfix after r195317.
* PlatformMac.cmake:
2016-01-19 Chris Dumez <cdumez@apple.com>
DocumentType.publicId / systemId should never return null
https://bugs.webkit.org/show_bug.cgi?id=153264
Reviewed by Ryosuke Niwa.
DocumentType.publicId / systemId should never return null as these
attributes are not nullable in the IDL:
https://dom.spec.whatwg.org/#interface-documenttype
Instead we should return the empty string. Firefox and Chrome match the
specification.
No new tests, already covered by existing tests.
* dom/DocumentType.idl:
2016-01-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r195302.
https://bugs.webkit.org/show_bug.cgi?id=153267
This change broke the Windows build, rolling out so it isn't
broken all night before investigation. (Requested by
ryanhaddad on #webkit).
Reverted changeset:
"[EME] Correctly report errors when generating key requests
from AVContentKeySession."
https://bugs.webkit.org/show_bug.cgi?id=151963
http://trac.webkit.org/changeset/195302
2016-01-19 Chris Dumez <cdumez@apple.com>
DOMImplementation.createDocument() should treat undefined namespace as null
https://bugs.webkit.org/show_bug.cgi?id=153252
Reviewed by Ryosuke Niwa.
DOMImplementation.createDocument() should treat undefined namespace as null as
the DOMString parameter is nullable:
https://dom.spec.whatwg.org/#domimplementation
Firefox behaves according to the specification, Chrome does not.
No new tests, already covered by existing test.
* dom/DOMImplementation.idl:
2016-01-19 Enrica Casucci <enrica@apple.com>
Add support for DataDetectors in WK (iOS).
https://bugs.webkit.org/show_bug.cgi?id=152989
rdar://problem/22855960
Reviewed by Tim Horton.
This is the first step toward implementing Data Detectors support
in WK2. The patch adds a new memeber to the Settings object
to retrieve the type of detection desired. The DataDetection files
have been moved under cocoa, since they are no longer OS X specific.
* Configurations/FeatureDefines.xcconfig:
* Configurations/WebCore.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* editing/cocoa/DataDetection.h: Copied from Source/WebCore/editing/mac/DataDetection.h.
* editing/cocoa/DataDetection.mm: Copied from Source/WebCore/editing/mac/DataDetection.mm.
(WebCore::detectItemAtPositionWithRange):
(WebCore::DataDetection::detectItemAroundHitTestResult):
(WebCore::DataDetection::detectContentInRange):
* editing/mac/DataDetection.h: Removed.
* editing/mac/DataDetection.mm: Removed.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
* page/Settings.h:
* page/Settings.in:
* platform/spi/mac/DataDetectorsSPI.h:
2016-01-19 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
SVG 2 requires a mechanism for restricting enum values exposed through the DOM
https://bugs.webkit.org/show_bug.cgi?id=152814
Reviewed by Darin Adler.
No new tests (No change in functionality, blocked bugs add new tests).
This patch adds a mechanism to restrict the values returned through the
SVGAnimatedEnumeration interface.
This is required for SVG 2, which does not expose new enumeration
values through the IDL.
See http://www.w3.org/TR/SVG2/types.html#InterfaceSVGAnimatedEnumeration
Getters:
SVG 2 does not add numeric type values for new options, new options
should return UNKNOWN.
E.g. See the table defining numeric type values for orient at
http://www.w3.org/TR/SVG2/painting.html#InterfaceSVGMarkerElement
Setters:
On setting baseVal, the following steps are run:
1. ...
2. If value is 0 or is not the numeric type value for any value of the reflected attribute, then set the reflected attribute to the empty string.
* svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
Override baseVal() and animVal() to perform range checks against
the highest exposed enum value.
* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
(WebCore::SVGAnimatedStaticPropertyTearOff::baseVal): Mark function as virtual as it's over-ridden for enumerations.
(WebCore::SVGAnimatedStaticPropertyTearOff::animVal): Mark function as virtual as it's over-ridden for enumerations.
* svg/properties/SVGPropertyTraits.h:
Add SVGIDLEnumLimits struct that contains function for querying the
highest exposed enum value.
(WebCore::SVGIDLEnumLimits::highestExposedEnumValue): New function that returns the highest enum value that should
be exposed through the DOM. This function should be specialized for enum types that need to restrict the exposed
values.
2016-01-19 Konstantin Tokarev <annulen@yandex.ru>
Fixed compilation of AXObjectCache in case of !HAVE(ACCESSIBILITY).
https://bugs.webkit.org/show_bug.cgi?id=153243
Reviewed by Chris Fleizach.
No new tests needed.
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::nodeHasRole): Deleted.
2016-01-19 Antti Koivisto <antti@apple.com>
Use references in SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=153240
Reviewed by Andreas Kling.
Element and selector can't be null in most places.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):
* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches):
(WebCore::anyAttributeMatches):
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchSelectorList):
(WebCore::SelectorChecker::checkScrollbarPseudoClass):
(WebCore::SelectorChecker::determineLinkMatchType):
(WebCore::isFrameFocused):
(WebCore::SelectorChecker::matchesFocusPseudoClass):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::isCommonPseudoClassSelector):
(WebCore::SelectorChecker::checkExactAttribute): Deleted.
* css/SelectorCheckerTestFunctions.h:
(WebCore::isAutofilled):
(WebCore::isDefaultButtonForForm):
(WebCore::isDisabled):
(WebCore::isEnabled):
(WebCore::isMediaDocument):
(WebCore::isChecked):
(WebCore::isInRange):
(WebCore::isOutOfRange):
(WebCore::isInvalid):
(WebCore::isOptionalFormControl):
(WebCore::isRequiredFormControl):
(WebCore::isValid):
(WebCore::isWindowInactive):
(WebCore::containslanguageSubtagMatchingRange):
(WebCore::matchesLangPseudoClass):
(WebCore::matchesReadOnlyPseudoClass):
(WebCore::matchesReadWritePseudoClass):
(WebCore::shouldAppearIndeterminate):
(WebCore::scrollbarMatchesEnabledPseudoClass):
(WebCore::scrollbarMatchesCornerPresentPseudoClass):
(WebCore::matchesFullScreenPseudoClass):
(WebCore::matchesFullScreenAnimatingFullScreenTransitionPseudoClass):
(WebCore::matchesFullScreenAncestorPseudoClass):
(WebCore::matchesFullScreenDocumentPseudoClass):
(WebCore::matchesFutureCuePseudoClass):
(WebCore::matchesPastCuePseudoClass):
2016-01-19 Chris Dumez <cdumez@apple.com>
Unreviewed, rolling out r195179.
It relies on r195141 which was rolled out
Reverted changeset:
"Allocate style sheet media queries in BumpArena."
https://bugs.webkit.org/show_bug.cgi?id=153188
http://trac.webkit.org/changeset/195179
2016-01-19 Chris Dumez <cdumez@apple.com>
Unreviewed, rolling out r195173.
It relies on r195141 which was rolled out
Reverted changeset:
"Give RuleSet a BumpArena and start using it for
RuleDataVectors."
https://bugs.webkit.org/show_bug.cgi?id=153169
http://trac.webkit.org/changeset/195173
2016-01-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r195300.
https://bugs.webkit.org/show_bug.cgi?id=153244
enrica wants more time to fix Windows (Requested by thorton on
#webkit).
Reverted changeset:
"Add support for DataDetectors in WK (iOS)."
https://bugs.webkit.org/show_bug.cgi?id=152989
http://trac.webkit.org/changeset/195300
2016-01-19 Zalan Bujtas <zalan@apple.com>
outline-offset does not work for inlines.
https://bugs.webkit.org/show_bug.cgi?id=153238
Reviewed by Simon Fraser.
Adjust outline box width/height with outline-offset.
Test: fast/inline/inlines-with-outline-offset.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):
(WebCore::RenderInline::paintOutlineForLine):
2016-01-19 Chris Dumez <cdumez@apple.com>
Unreviewed, rolling out r195141.
Seems to cause crashes on iOS9 64bit
Reverted changeset:
"Fragmentation-free allocator for timeless and/or coupled
allocations."
https://bugs.webkit.org/show_bug.cgi?id=152696
http://trac.webkit.org/changeset/195141
2015-12-07 Jer Noble <jer.noble@apple.com>
[EME] Correctly report errors when generating key requests from AVContentKeySession.
https://bugs.webkit.org/show_bug.cgi?id=151963
Reviewed by Eric Carlson.
WebIDL's "unsigned long" is a 32-bit unsigned integer, and C++'s "unsigned long" is (or, can
be) a 64-bit integer on 64-bit platforms. Casting a negative integer to a 64-bit integer
results in a number which cannot be accurately stored in a double-length floating point
number. Previously, the mac CDM code would work around this issue by returning the absolute
value of NSError code returned by media frameworks. Instead, fix the underlying problem by
storing the MediaKeyError's systemCode as a uint32_t (which more accurately represents the
size of a WebIDL "unsigned long" on all platforms.)
Check the error code issued by -contentKeyRequestDataForApp:contentIdentifier:options:error:.
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/CDMSessionClearKey.cpp:
(WebCore::CDMSessionClearKey::generateKeyRequest):
(WebCore::CDMSessionClearKey::update):
* Modules/encryptedmedia/CDMSessionClearKey.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::keyRequestTimerFired):
(WebCore::MediaKeySession::addKeyTimerFired):
(WebCore::MediaKeySession::sendError):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleReadyStateChange):
* WebCore.xcodeproj/project.pbxproj:
* html/MediaKeyError.h:
(WebCore::MediaKeyError::create):
(WebCore::MediaKeyError::systemCode):
* html/MediaKeyEvent.h:
* platform/graphics/CDMSession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::generateKeyRequest):
(WebCore::CDMSessionAVContentKeySession::update):
(WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
(WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
(WebCore::CDMSessionAVFoundationObjC::update):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
(WebCore::CDMSessionAVStreamSession::generateKeyRequest):
(WebCore::CDMSessionAVStreamSession::update):
(WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
(WebCore::CDMSessionMediaSourceAVFObjC::systemCodeForError): Deleted.
* testing/MockCDM.cpp:
(WebCore::MockCDMSession::generateKeyRequest):
(WebCore::MockCDMSession::update):2016-01-15 Simon Fraser <simon.fraser@apple.com>
2016-01-19 Enrica Casucci <enrica@apple.com>
Add support for DataDetectors in WK (iOS).
https://bugs.webkit.org/show_bug.cgi?id=152989
rdar://problem/22855960
Reviewed by Tim Horton.
This is the first step toward implementing Data Detectors support
in WK2. The patch adds a new memeber to the Settings object
to retrieve the type of detection desired. The DataDetection files
have been moved under cocoa, since they are no longer OS X specific.
* Configurations/FeatureDefines.xcconfig:
* Configurations/WebCore.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* editing/cocoa/DataDetection.h: Copied from Source/WebCore/editing/mac/DataDetection.h.
* editing/cocoa/DataDetection.mm: Copied from Source/WebCore/editing/mac/DataDetection.mm.
(WebCore::detectItemAtPositionWithRange):
(WebCore::DataDetection::detectItemAroundHitTestResult):
(WebCore::DataDetection::detectContentInRange):
* editing/mac/DataDetection.h: Removed.
* editing/mac/DataDetection.mm: Removed.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
* page/Settings.h:
* page/Settings.in:
* platform/spi/mac/DataDetectorsSPI.h:
2016-01-19 Chris Dumez <cdumez@apple.com>
Unreviewed, fix typo in comment added in r195157.
* dom/DocumentType.h:
2016-01-18 Antti Koivisto <antti@apple.com>
Selector checker should not mutate document and style
https://bugs.webkit.org/show_bug.cgi?id=153205
Reviewed by Darin Adler.
Selector checker currently writes affected-by bits and similar directly to the document and style during selector
matching. This is confusing, complicated and wrong.
This patch changes SelectorChecker and SelectorCompiler to collect style relatationship metadata to a separate
data structure (currently part of SelectorChecker::CheckingContext) instead of changing the document and style
directly. The mutations are performed later outside selector checker.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
(WebCore::ElementRuleCollector::commitStyleRelations):
Apply the relationship bit to elements and style.
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/ElementRuleCollector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::LocalContext::LocalContext):
LocalContext is now a separate data structure.
(WebCore::addStyleRelation):
Helper for recording new style relations. This is used where code mutated elements or style directly before.
(WebCore::isFirstChildElement):
(WebCore::isLastChildElement):
(WebCore::isFirstOfType):
(WebCore::isLastOfType):
(WebCore::countElementsBefore):
(WebCore::countElementsOfTypeBefore):
(WebCore::SelectorChecker::SelectorChecker):
(WebCore::SelectorChecker::match):
(WebCore::hasScrollbarPseudoElement):
(WebCore::localContextForParent):
(WebCore::SelectorChecker::matchRecursively):
(WebCore::attributeValueMatches):
(WebCore::anyAttributeMatches):
(WebCore::canMatchHoverOrActiveInQuirksMode):
(WebCore::tagMatches):
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchSelectorList):
(WebCore::SelectorChecker::checkScrollbarPseudoClass):
(WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus): Deleted.
(WebCore::checkingContextForParent): Deleted.
* css/SelectorChecker.h:
(WebCore::SelectorChecker::CheckingContext::CheckingContext):
* css/SelectorCheckerTestFunctions.h:
(WebCore::isEnabled):
(WebCore::isMediaDocument):
(WebCore::isChecked):
(WebCore::isInRange):
(WebCore::isOutOfRange):
* css/StyleResolver.h:
(WebCore::checkRegionSelector):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelationIfResolvingStyle):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelation):
Helpers for generating code for recording new style relations. This is used where code mutated elements or style directly before.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
(WebCore::SelectorCompiler::addStyleRelationElementFunction):
(WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoPreviousAdjacentElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::moduloIsZero):
(WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateContextFunctionCallTest):
(WebCore::SelectorCompiler::elementIsActive):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
(WebCore::SelectorCompiler::jumpIfElementIsNotEmpty):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
(WebCore::SelectorCompiler::elementIsHovered):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
(WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
(WebCore::SelectorCompiler::isPlaceholderShown):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLink):
(WebCore::SelectorCompiler::nthFilterIsAlwaysSatisified):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext): Deleted.
(WebCore::SelectorCompiler::setNodeFlag): Deleted.
(WebCore::SelectorCompiler::SelectorCodeGenerator::markElementIfResolvingStyle): Deleted.
(WebCore::SelectorCompiler::setFirstChildState): Deleted.
(WebCore::SelectorCompiler::elementIsActiveForStyleResolution): Deleted.
(WebCore::SelectorCompiler::setElementStyleIsAffectedByEmpty): Deleted.
(WebCore::SelectorCompiler::setElementStyleFromContextIsAffectedByEmptyAndUpdateRenderStyleIfNecessary): Deleted.
(WebCore::SelectorCompiler::elementIsHoveredForStyleResolution): Deleted.
(WebCore::SelectorCompiler::setLastChildState): Deleted.
(WebCore::SelectorCompiler::setOnlyChildState): Deleted.
(WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown): Deleted.
(WebCore::SelectorCompiler::setElementChildIndex): Deleted.
(WebCore::SelectorCompiler::setChildrenAffectedByBackwardPositionalRules): Deleted.
(WebCore::SelectorCompiler::setParentAffectedByLastChildOf): Deleted.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::selectorMatches):
(WebCore::SelectorDataList::selectorClosest):
(WebCore::SelectorDataList::matches):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
* inspector/InspectorStyleSheet.cpp:
(WebCore::buildObjectForSelectorHelper):
2016-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build with GTK+ < 3.14.
Flags GTK_ICON_LOOKUP_DIR_LTR and GTK_ICON_LOOKUP_DIR_RTL were
added in GTK+ 3.14.
* rendering/RenderThemeGtk.cpp:
(WebCore::loadThemedIcon):
2016-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GObject DOM bindings API break after r195264.
Add webkit_dom_character_data_set_data to the list of functions
that used to raise exceptions.
* bindings/scripts/CodeGeneratorGObject.pm:
(FunctionUsedToRaiseException):
2016-01-19 Javier Fernandez <jfernandez@igalia.com>
[css-grid][css-align] justify-self stretch is not applied for img elements
https://bugs.webkit.org/show_bug.cgi?id=153206
Reviewed by Darin Adler.
When computing the logical height, we check first if there is an override
height value set as a consequence of the stretching logic, so we use it
directly for any kind of element. However, in the case of the width
computation, we don't use such override value because it's the default
behavior of block-level boxes.
However, we consider some special cases which have to be treated as
replaced elements. Theses cases are evaluated first, so we don't let the
regular width computation logic to be executed, which is what we want
to implement the stretch behavior.
In order to let replaced elements, such images, to be stretched as a
consequence of the CSS alignment properties, we need to exclude grid
items from the cases to be treated as replaced elements during the width
computation.
Test: fast/css-grid-layout/grid-align-stretching-replaced-items.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::hasStretchedLogicalWidth):
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
* rendering/RenderBox.h:
2016-01-19 Ryosuke Niwa <rniwa@webkit.org>
Text::splitText doesn't update Range end points anchored on parent nodes
https://bugs.webkit.org/show_bug.cgi?id=153227
Reviewed by Antti Koivisto.
When a Text node is split into two and there is a Range whose boundary points' container node
is its parent and offset appears after the Text node, we must update the boundary points as specified
in step 7 of the concept "split" a Text node at https://dom.spec.whatwg.org/#concept-text-split
1. Insert new node into parent before node’s next sibling.
2. For each range whose start node is node and start offset is greater than offset, set its start node
to new node and decrease its start offset by offset.
3. For each range whose end node is node and end offset is greater than offset, set its end node to
new node and decrease its end offset by offset.
4. For each range whose start node is parent and start offset is equal to the index of node + 1,
increase its start offset by one.
5. For each range whose end node is parent and end offset is equal to the index of node + 1, increase
its end offset by one.
Fixed the bug by implementing steps 4 and 5 in boundaryTextNodesSplit. New behavior matches the DOM spec
as well as the behavior of Firefox.
Test: fast/dom/Range/update-range-in-split-text.html
* dom/Range.cpp:
(WebCore::boundaryTextNodesSplit): See above.
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::setToAfterChild): Added.
2016-01-19 Ryosuke Niwa <rniwa@webkit.org>
CharacterData::setData doesn't need ExceptionCode as an out argument
https://bugs.webkit.org/show_bug.cgi?id=153225
Reviewed by Antti Koivisto.
Removed the ExceptionCode out argument from CharacterData::setData since it's never used.
* dom/CharacterData.cpp:
(WebCore::CharacterData::setData):
(WebCore::CharacterData::containsOnlyWhitespace):
(WebCore::CharacterData::setNodeValue):
(WebCore::CharacterData::setDataAndUpdate):
* dom/CharacterData.h:
(WebCore::CharacterData::data):
(WebCore::CharacterData::dataMemoryOffset):
(WebCore::CharacterData::length):
* dom/CharacterData.idl:
* dom/Range.cpp:
(WebCore::Range::processContentsBetweenOffsets):
* dom/Text.cpp:
(WebCore::Text::replaceWholeText):
* editing/markup.cpp:
(WebCore::replaceChildrenWithFragment):
(WebCore::replaceChildrenWithText):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::setText):
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::setText):
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::setText):
2016-01-19 Ryosuke Niwa <rniwa@webkit.org>
innerHTML should always add a mutation record for removing all children
https://bugs.webkit.org/show_bug.cgi?id=148782
<rdar://problem/22571962>
Reviewed by Antti Koivisto.
Fixed the bug by disabling WebKit's optimization to avoid the node replacement when the behavior
is observable to scripts by either:
- Author scripts has a reference to the node
- MutationObserver can be observing this subtree
- Mutation events can be observing this subtree
Note that no caller of this function exposes fragment to author scripts so it couldn't be referenced.
It also means that we don't need to check DOMNodeInsertedIntoDocument since it doesn't bubble up
(it's only relevant if the text node in fragment has its event listener but that's impossible).
Test: fast/dom/innerHTML-single-text-node.html
* dom/ChildListMutationScope.h:
(WebCore::ChildListMutationScope::canObserve): Added.
* editing/markup.cpp:
(WebCore::hasMutationEventListeners): Added.
(WebCore::replaceChildrenWithFragment):
2016-01-18 Ryosuke Niwa <rniwa@webkit.org>
createAttribute should lowercase the attribute name in a HTML document
https://bugs.webkit.org/show_bug.cgi?id=153112
Reviewed by Darin Adler.
In a HTML document, we should always lowercase localName in document.createAttribute as specified in
https://dom.spec.whatwg.org/#dom-document-createattribute:
1. If localName does not match the Name production in XML, throw an InvalidCharacterError exception.
2. If the context object is an HTML document, let localName be converted to ASCII lowercase.
3. Return a new attribute whose local name is localName.
Change WebKit's behavior to match the spec as well as Firefox. document.createAttributeNS will
continue to preserve the case as spec'ed.
No new tests are added since the behavior change is covered by existing tests.
* dom/Document.cpp:
(WebCore::Document::createAttribute):
2016-01-18 Brady Eidson <beidson@apple.com>
Modern IDB: Add private-browsing variant for many IDB tests, and enable private browsing in Modern IDB.
https://bugs.webkit.org/show_bug.cgi?id=153179
Reviewed by Darin Adler.
Tests: Many private-browsing copies of existing IDB tests.
* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::shouldThrowSecurityException): Allow IDB access in private browsing.
2016-01-18 Eric Carlson <eric.carlson@apple.com>
[iOS Simulator WK1] ASSERT loading Blink layout test imported/web-platform-tests/mediacapture-streams/stream-api/mediastream/mediastream-idl.html
https://bugs.webkit.org/show_bug.cgi?id=153070
<rdar://problem/24183105>
Reviewed by Darin Adler.
No new tests, this prevents an existing test from crashing.
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource): Create the timer with RunLoop::current
instead of RunLoop::main.
2016-01-18 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Reduce PassRefPtr uses in dom - 3
https://bugs.webkit.org/show_bug.cgi?id=153055
Reviewed by Darin Adler.
Third patch to reduce uses of PassRefPtr in WebCore/dom.
* dom/MutationObserverInterestGroup.cpp:
(WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
* dom/MutationRecord.cpp:
(WebCore::MutationRecord::createChildList):
(WebCore::MutationRecord::createAttributes):
(WebCore::MutationRecord::createCharacterData):
(WebCore::MutationRecord::createWithNullOldValue):
* dom/MutationRecord.h:
* dom/NamedFlowCollection.cpp:
(WebCore::NamedFlowCollection::createCSSOMSnapshot):
* dom/NamedFlowCollection.h:
* dom/PendingScript.cpp:
(WebCore::PendingScript::releaseElementAndClear):
* dom/PendingScript.h:
* dom/ScriptRunner.h:
* dom/SecurityContext.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::cloneNode):
* dom/ShadowRoot.h:
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitStringData::create):
* dom/SpaceSplitString.h:
* dom/TreeWalker.cpp:
(WebCore::TreeWalker::setCurrent):
(WebCore::TreeWalker::parentNode):
(WebCore::TreeWalker::previousNode):
(WebCore::TreeWalker::nextNode):
* dom/TreeWalker.h:
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::entangledChannel):
* dom/default/PlatformMessagePortChannel.h:
2016-01-18 Nan Wang <n_wang@apple.com>
AX: [Mac] Implement next/previous text marker functions using TextIterator
https://bugs.webkit.org/show_bug.cgi?id=152728
Reviewed by Chris Fleizach.
The existing AXTextMarker based calls are implemented using visible position, and that introduced
some bugs which make VoiceOver working incorrectly on Mac sometimes. Since TextIterator uses rendering
position, we tried to use it to refactor those AXTextMarker based calls.
In this patch, I implemented functions to navigate to previous/next text marker using Range and TextIterator.
Also added a conversion between visible position and character offset to make sure unconverted text marker
related functions are still working correctly.
Tests: accessibility/mac/previous-next-text-marker.html
accessibility/mac/text-marker-with-user-select-none.html
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::visiblePositionForTextMarkerData):
(WebCore::AXObjectCache::traverseToOffsetInRange):
(WebCore::AXObjectCache::lengthForRange):
(WebCore::AXObjectCache::rangeForNodeContents):
(WebCore::characterOffsetsInOrder):
(WebCore::AXObjectCache::rangeForUnorderedCharacterOffsets):
(WebCore::AXObjectCache::setTextMarkerDataWithCharacterOffset):
(WebCore::AXObjectCache::startOrEndTextMarkerDataForRange):
(WebCore::AXObjectCache::textMarkerDataForCharacterOffset):
(WebCore::AXObjectCache::nextNode):
(WebCore::AXObjectCache::previousNode):
(WebCore::AXObjectCache::visiblePositionFromCharacterOffset):
(WebCore::AXObjectCache::characterOffsetFromVisiblePosition):
(WebCore::AXObjectCache::accessibilityObjectForTextMarkerData):
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
* accessibility/AXObjectCache.h:
(WebCore::CharacterOffset::CharacterOffset):
(WebCore::CharacterOffset::remaining):
(WebCore::CharacterOffset::isNull):
(WebCore::AXObjectCache::setNodeInUse):
(WebCore::AXObjectCache::removeNodeForUse):
(WebCore::AXObjectCache::isNodeInUse):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::selectionRange):
(WebCore::AccessibilityObject::elementRange):
(WebCore::AccessibilityObject::selectText):
(WebCore::AccessibilityObject::lineRangeForPosition):
(WebCore::AccessibilityObject::replacedNodeNeedsCharacter):
(WebCore::renderListItemContainerForNode):
(WebCore::listMarkerTextForNode):
(WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
(WebCore::AccessibilityObject::stringForRange):
(WebCore::AccessibilityObject::stringForVisiblePositionRange):
(WebCore::replacedNodeNeedsCharacter): Deleted.
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::visiblePositionRange):
(WebCore::AccessibilityObject::visiblePositionRangeForLine):
(WebCore::AccessibilityObject::boundsForVisiblePositionRange):
(WebCore::AccessibilityObject::setSelectedVisiblePositionRange):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(isTextMarkerIgnored):
(-[WebAccessibilityObjectWrapper accessibilityObjectForTextMarker:]):
(accessibilityObjectForTextMarker):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromRange:]):
(textMarkerRangeFromRange):
(-[WebAccessibilityObjectWrapper startOrEndTextMarkerForRange:isStart:]):
(startOrEndTextmarkerForRange):
(-[WebAccessibilityObjectWrapper nextTextMarkerForNode:offset:]):
(-[WebAccessibilityObjectWrapper previousTextMarkerForNode:offset:]):
(-[WebAccessibilityObjectWrapper textMarkerForNode:offset:]):
(textMarkerForCharacterOffset):
(-[WebAccessibilityObjectWrapper rangeForTextMarkerRange:]):
(-[WebAccessibilityObjectWrapper characterOffsetForTextMarker:]):
(textMarkerForVisiblePosition):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2016-01-18 Olivier Blin <olivier.blin@softathome.com>
[Mac] Remove unused playerToPrivateMap()
https://bugs.webkit.org/show_bug.cgi?id=153203
Reviewed by Darin Adler.
This was used in previous EME implementations, but is unnecessary
since r163907.
No new tests since this removes dead code only.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::globalLoaderDelegateQueue): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Deleted.
2016-01-18 Simon Fraser <simon.fraser@apple.com>
Add TextStream-based logging for Position and VisiblePosition
https://bugs.webkit.org/show_bug.cgi?id=153195
Reviewed by Ryosuke Niwa.
Make it easy to dump Positions and VisiblePositions with a TextStream.
* dom/Position.cpp:
(WebCore::operator<<):
* dom/Position.h:
* editing/VisiblePosition.cpp:
(WebCore::operator<<):
* editing/VisiblePosition.h:
2016-01-18 Zan Dobersek <zdobersek@igalia.com>
Sink the Vector<uint8_t> buffer into the SerializedScriptValue constructor
https://bugs.webkit.org/show_bug.cgi?id=142634
Reviewed by Darin Adler.
Have the SerializedScriptValue constructor take in the Vector<uint8_t> buffer
through an rvalue reference, avoiding the copying into the m_data member. The
three-parameter constructor now takes in the Vector<String> blob URL object
via const reference, and the std::unique_ptr<> object via a rvalue reference.
Adjust all the call sites and affected code to now either move or copy a
non-movable object into the SerializedScriptValue constructor or the helper
methods.
No new tests -- no change in behavior.
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::deserializeIDBValueDataToJSValue):
(WebCore::deserializeIDBValueBuffer):
(WebCore::idbValueDataToJSValue):
* bindings/js/IDBBindingUtilities.h:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::numberValue):
(WebCore::SerializedScriptValue::undefinedValue):
(WebCore::SerializedScriptValue::nullValue):
* bindings/js/SerializedScriptValue.h:
* testing/Internals.cpp:
(WebCore::Internals::deserializeBuffer):
2016-01-18 Olivier Blin <olivier.blin@softathome.com>
[GStreamer] Remove unused m_endTime
https://bugs.webkit.org/show_bug.cgi?id=153209
Reviewed by Michael Catanzaro.
m_endTime has been unused since r47710 in MediaPlayerPrivateGStreamer.
No new tests since this is just a member cleanup.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2016-01-18 Csaba Osztrogonác <ossy@webkit.org>
Fix the --minimal build due to missing VM.h include
https://bugs.webkit.org/show_bug.cgi?id=153128
Reviewed by Michael Catanzaro.
* bindings/js/WebCoreJSBuiltinInternals.h:
2016-01-18 Csaba Osztrogonác <ossy@webkit.org>
Remove the SKIP_UNUSED_PARAM define
https://bugs.webkit.org/show_bug.cgi?id=153129
Reviewed by Michael Catanzaro.
* bindings/js/WebCoreJSBuiltinInternals.cpp:
(WebCore::JSBuiltinInternalFunctions::visit):
(WebCore::JSBuiltinInternalFunctions::initialize):
* bindings/js/WebCoreJSBuiltinInternals.h:
2016-01-17 Simon Fraser <simon.fraser@apple.com>
More displaylist tests, and minor cleanup
https://bugs.webkit.org/show_bug.cgi?id=153198
Reviewed by Zalan Bujtas.
Have the DisplayListRecorder's constructor push the recorder onto the GraphicsContext,
and remove that code from GraphicsLayerCA.
Tests: displaylists/extent-includes-shadow.html
displaylists/extent-includes-transforms.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::Recorder):
2016-01-16 Myles C. Maxfield <mmaxfield@apple.com>
Remove TextRun::allowsRoundingHacks()
https://bugs.webkit.org/show_bug.cgi?id=153185
Reviewed by Simon Fraser.
Rounding hacks are disallowed by default, and are only re-enabled on iOS 4 and
earlier, which are not supported OSes. Because they are disallowed on all
supported configurations, remove support for them wholesale.
No new tests.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* platform/graphics/FontCascade.cpp:
* platform/graphics/FontCascade.h:
(WebCore::FontCascade::isRoundingHackCharacter): Deleted.
* platform/graphics/StringTruncator.cpp:
(WebCore::stringWidth):
(WebCore::truncateString):
(WebCore::StringTruncator::centerTruncate):
(WebCore::StringTruncator::rightTruncate):
(WebCore::StringTruncator::width):
(WebCore::StringTruncator::leftTruncate):
(WebCore::StringTruncator::rightClipToCharacter):
(WebCore::StringTruncator::rightClipToWord):
* platform/graphics/StringTruncator.h:
* platform/graphics/TextRun.cpp:
(WebCore::TextRun::setAllowsRoundingHacks): Deleted.
(WebCore::TextRun::allowsRoundingHacks): Deleted.
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
(WebCore::TextRun::applyRunRounding): Deleted.
(WebCore::TextRun::applyWordRounding): Deleted.
(WebCore::TextRun::disableRoundingHacks): Deleted.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* platform/mac/DragImageMac.mm:
(WebCore::widthWithFont): Deleted.
(WebCore::drawAtPoint): Deleted.
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::fileTextValue):
(WebCore::RenderFileUploadControl::paintObject): Deleted.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::updateFromElement): Deleted.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::getAverageCharWidth): Deleted.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::fileListNameForWidth):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::fileListNameForWidth):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun): Deleted.
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::constructTextRun): Deleted.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState): Deleted.
(WebCore::Internals::allowRoundingHacks): Deleted.
* testing/Internals.h:
* testing/Internals.idl:
2016-01-16 Andreas Kling <akling@apple.com>
Allocate style sheet media queries in BumpArena.
<https://webkit.org/b/153188>
Reviewed by Antti Koivisto.
Teach the CSS parser to allocate MediaQuery and MediaQueryExp from BumpArena as well.
* css/CSSGrammar.y.in:
* css/MediaQuery.h:
* css/MediaQueryExp.h:
2016-01-16 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Add a couple comments to ScrollbarThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=153184
Reviewed by Carlos Garcia Campos.
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::paint):
2016-01-16 Andreas Kling <akling@apple.com>
Give RuleSet a BumpArena and start using it for RuleDataVectors.
<https://webkit.org/b/153169>
Reviewed by Antti Koivisto.
Since RuleSet only supports appending rules and doesn't need to worry about removing them,
it's a great candidate for BumpArena optimizations.
Give each RuleSet its own BumpArena and teach them how to allocate RuleDataVector objects
out of them.
There are more things that can be done here, ideally all the sub-allocations inside RuleSet
that happen via e.g Vector and HashMap would also come out of the BumpArena.
* css/RuleSet.cpp:
(WebCore::RuleSet::RuleSet):
(WebCore::RuleSet::addToRuleSet):
(WebCore::RuleSet::copyShadowPseudoElementRulesFrom):
* css/RuleSet.h:
(WebCore::RuleSet::RuleDataVector::create):
(WebCore::RuleSet::RuleSet): Deleted.
2016-01-16 Simon Fraser <simon.fraser@apple.com>
Fix flakiness of displaylists/layer-dispay-list.html
When toggling "uses display list drawing" on a GraphicsLayerCA, do
a repaint.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setUsesDisplayListDrawing):
2016-01-15 Simon Fraser <simon.fraser@apple.com>
Remove GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon()
https://bugs.webkit.org/show_bug.cgi?id=153174
Reviewed by Zalan Bujtas.
GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon() were
poorly named (non-convex polygons are allowed), and just syntactic sugar over
clipPath() and drawPath().
Remove them, but add a convenience function to create a Path from a Vector of
points. For CG, we can use the more efficient CGPathAddLines().
Add TextStream dumping for Path.
* platform/graphics/GraphicsContext.h:
* platform/graphics/Path.cpp:
(WebCore::Path::polygonPathFromPoints):
(WebCore::Path::dump):
(WebCore::operator<<):
* platform/graphics/Path.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformShouldAntialias):
(WebCore::addConvexPolygonToContext): Deleted.
(WebCore::GraphicsContext::drawConvexPolygon): Deleted.
(WebCore::GraphicsContext::clipConvexPolygon): Deleted.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::addConvexPolygonToPath): Deleted.
(WebCore::GraphicsContext::drawConvexPolygon): Deleted.
(WebCore::GraphicsContext::clipConvexPolygon): Deleted.
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::polygonPathFromPoints):
(WebCore::Path::moveTo):
(WebCore::Path::addLineTo):
(WebCore::Path::addQuadCurveTo):
(WebCore::Path::addBezierCurveTo):
(WebCore::Path::addArcTo):
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::Item::sizeInBytes): Deleted.
(WebCore::DisplayList::ClipConvexPolygon::ClipConvexPolygon): Deleted.
(WebCore::DisplayList::ClipConvexPolygon::apply): Deleted.
(WebCore::DisplayList::operator<<): Deleted.
(WebCore::DisplayList::addConvexPolygonToPath): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::DrawConvexPolygon): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::localBounds): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::apply): Deleted.
* platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::ClipConvexPolygon::create): Deleted.
(WebCore::DisplayList::ClipConvexPolygon::points): Deleted.
(WebCore::DisplayList::ClipConvexPolygon::antialias): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::create): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::points): Deleted.
(WebCore::DisplayList::DrawConvexPolygon::antialiased): Deleted.
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawConvexPolygon): Deleted.
(WebCore::DisplayList::Recorder::clipConvexPolygon): Deleted.
* platform/graphics/displaylists/DisplayListRecorder.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::clipBorderSidePolygon):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::drawLineForBoxSide):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuListButtonDecorations):
2016-01-16 Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Add Platform.cpp to ANGLESupport
https://bugs.webkit.org/show_bug.cgi?id=153120
Reviewed by Darin Adler.
No new tests, only addresses a build failure.
* CMakeLists.txt:
2016-01-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] List box selections stopped working again with GTK+ from current git master
https://bugs.webkit.org/show_bug.cgi?id=153122
Reviewed by Michael Catanzaro.
The problem is that the ListBox selection implementation is
wrong. We are using a similar implementation to GtkEntry, but
GtkTreeView doesn't have a child CSS node for selections.
* rendering/RenderThemeGtk.cpp:
(WebCore::styleColor): Don't use a child style context for ListBox selections.
(WebCore::createStyleContext): Remove ListBoxSelection.
2016-01-14 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Initialize HTTP version of ResourceResponse
https://bugs.webkit.org/show_bug.cgi?id=153088
Reviewed by Michael Catanzaro.
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::updateFromSoupMessage):
2016-01-16 Myles C. Maxfield <mmaxfield@apple.com>
Tiny cleanup in FontFaceComparator
https://bugs.webkit.org/show_bug.cgi?id=153044
Reviewed by Zalan Bujtas.
This is a follow-up patch to r194923.
No new tests because there is no behavior change.
* css/CSSFontSelector.cpp:
(WebCore::FontFaceComparator::FontFaceComparator):
(WebCore::FontFaceComparator::operator()):
2016-01-15 Jiewen Tan <jiewen_tan@apple.com>
FrameLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame() is never called when loading a main resource from the memory cache
https://bugs.webkit.org/show_bug.cgi?id=152520
<rdar://problem/23305737>
Reviewed by Andy Estes.
Test: http/tests/loading/server-redirect-for-provisional-load-caching.html
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
Dispatch message to notify client that a cached resource was redirected. So,
client can make proper actions to treat server side redirection.
* loader/cache/CachedRawResource.h:
Add a method to tell whether the cached resource was redirected.
2016-01-15 Chris Dumez <cdumez@apple.com>
Drop obsolete HTMLDocument.width / height attributes
https://bugs.webkit.org/show_bug.cgi?id=153144
Reviewed by Ryosuke Niwa.
Drop obsolete HTMLDocument.width / height attributes as these are
obsolete and already not supported by other major browsers (tested
Firefox and Chrome).
No new tests, already covered by existing tests.
* html/HTMLDocument.idl:
2016-01-15 Chris Dumez <cdumez@apple.com>
Drop obsolete DocumentType.entities / notations
https://bugs.webkit.org/show_bug.cgi?id=153147
Reviewed by Ryosuke Niwa.
Drop obsolete DocumentType.entities / notations attributes.
Firefox and Chrome already dropped those. We already dropped support for
entities and notations so these always returned null.
No new tests, already covered by existing tests.
* dom/DocumentType.h:
* dom/DocumentType.idl:
2016-01-10 Simon Fraser <simon.fraser@apple.com>
Make a way to test display-list drawing
https://bugs.webkit.org/show_bug.cgi?id=152956
Reviewed by Ryosuke Niwa.
Make it possible to toggle display-list drawing for a given compositing
layer via internals, as well as getting a textual representation of the display
list, optionally including items with platform-specific behavior.
Add one test that uses this.
Test: displaylists/layer-dispay-list.html
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::displayListAsText):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::displayListAsText):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::shouldDumpForFlags):
(WebCore::DisplayList::DisplayList::asText):
* platform/graphics/displaylists/DisplayList.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setUsesDisplayListDrawing):
(WebCore::RenderLayerBacking::displayListAsText):
* rendering/RenderLayerBacking.h:
* testing/Internals.cpp:
(WebCore::Internals::setElementUsesDisplayListDrawing):
(WebCore::Internals::displayListForElement):
* testing/Internals.h:
* testing/Internals.idl:
2016-01-15 Olivier Blin <olivier.blin@softathome.com>
Fix audio build with video disabled
https://bugs.webkit.org/show_bug.cgi?id=153134
Reviewed by Michael Catanzaro.
Build fails when WebAudio is enabled but VIDEO disabled.
No new tests since this is a build fix only.
* platform/audio/PlatformMediaSession.cpp:
* platform/audio/PlatformMediaSession.h:
* platform/audio/PlatformMediaSessionManager.cpp:
* testing/Internals.cpp:
(WebCore::Internals::setAudioContextRestrictions):
2016-01-15 Olivier Blin <olivier.blin@softathome.com>
[GTK] Fix build of RenderThemeGtk without VIDEO by including HTMLInputElement
https://bugs.webkit.org/show_bug.cgi?id=153133
Reviewed by Michael Catanzaro.
Build was fine with VIDEO enabled, since HTMLInputElement.h was
included by transitivity through MediaControlElements.h and
MediaControlElementTypes.h.
This seems to be broken since r194847.
No new tests since this is just a build fix.
* rendering/RenderThemeGtk.cpp:
2016-01-15 Ryosuke Niwa <rniwa@webkit.org>
createElementNS and createAttributeNS should treat undefined namespaceURI as null string
https://bugs.webkit.org/show_bug.cgi?id=153119
Reviewed by Chris Dumez.
Treat undefined as null in document.createElementNS and document.createAttributeNS as defined in:
https://dom.spec.whatwg.org/#document
Test: fast/dom/Document/createAttributeNS-undefined-namespace.html
* dom/Document.idl:
2016-01-15 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Font features are not applied to the system font
https://bugs.webkit.org/show_bug.cgi?id=153053
Reviewed by Dean Jackson.
We simply need to call preparePlatformFont() on it.
Test: fast/text/system-font-features.html
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::fontWithFamily):
2016-01-15 Tim Horton <timothy_horton@apple.com>
Data detector yellow highlight location is vertically mirrored in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=152216
<rdar://problem/23848003>
Reviewed by Beth Dakin.
No new tests, because we currently have no decent mechanism for testing
where TextIndicator/Lookup/DataDetectors actually make it to the screen,
nor for synthetic force-click in WebKit1.
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):
(WebCore::DictionaryLookup::animationControllerForPopup):
Add an optional function for converting between root-FrameView and
handed-in-NSView coordinates, and use it to convert textBoundingRectInRootViewCoordinates
into the coordinates of the WebView.
2016-01-15 Joseph Pecoraro <pecoraro@apple.com>
Media Query (-webkit-video-playable-inline) is failing as an invalid media query expression
https://bugs.webkit.org/show_bug.cgi?id=153111
Reviewed by Dean Jackson.
Test: fast/media/video-playable-inline-media-query.html
* css/MediaQueryEvaluator.cpp:
(WebCore::video_playable_inlineMediaFeatureEval):
(WebCore::isRunningOnIPhoneOrIPod): Deleted.
Make the media query work regardless of the platform.
It should just check the web view's settings.
* css/MediaQueryExp.cpp:
(WebCore::featureWithoutValue):
This media query expects no value, include it in the list
so it is not treated as invalid.
2016-01-15 Zalan Bujtas <zalan@apple.com>
ASSERTION FAILED: canHaveChildren() || canHaveGeneratedChildren() in WebCore::RenderElement::insertChildInternal
https://bugs.webkit.org/show_bug.cgi?id=123331
Reviewed by Darin Adler.
Do not set named flow fragment bit on the flow until after the renderer is attached. Setting/resetting it too early
could affect the attach/detach process itself (This is similar to attaching a multi column flow thread).
Test: fast/regions/input-box-with-region-assert.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
(WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
2016-01-15 Simon Fraser <simon.fraser@apple.com>
Add kdebug_trace signposts for a few WebCore operations
https://bugs.webkit.org/show_bug.cgi?id=153136
rdar://problem/24208487
Reviewed by Sam Weinig.
Add trace points for style recalc, layout, view painting and layer painting.
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::paintContents):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerPaintContents):
2016-01-15 Andreas Kling <akling@apple.com>
Use BumpArena for style sheet object tree.
<https://webkit.org/b/152696>
Reviewed by Antti Koivisto.
Give each StyleSheetContents its own BumpArena, and plumb it down through CSSParser
to allocate StyleRule, StyleProperties and CSSSelectorList's selector arrays there.
This basically means that most objects that make up a given style sheet will end up
in one (or a few) contiguous region(s) of memory, instead of being scattered all
over the malloc heap.
In the common case (no CSSOM manipulation), the lifetimes of these objects are very
predictable: everything tends to die when the StyleSheetContents dies.
This dramatically improves space-efficiency in those cases, and allows us to return
contiguous chunks of memory to the system once a style sheet is no longer needed.
One-off CSS parses that don't work within a StyleSheetContents context will have
their StyleRules & co allocated through FastMalloc just like before.
Bonus: give SelectorQueryCache a dedicated BumpArena as well, since it has very
predictable lifetime.
* css/CSSGrammar.y.in:
* css/CSSKeyframesRule.h:
(WebCore::StyleRuleKeyframes::create):
* css/CSSParser.cpp:
(WebCore::CSSParser::createStyleProperties):
(WebCore::CSSParser::createMediaRule):
(WebCore::CSSParser::createSupportsRule):
(WebCore::CSSParser::createKeyframesRule):
(WebCore::CSSParser::setArena):
(WebCore::CSSParser::arena):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::createPageRule):
(WebCore::CSSParser::createRegionRule):
(WebCore::CSSParser::createViewportRule):
* css/CSSParser.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
(WebCore::CSSParserSelector::adoptSelectorVector):
* css/CSSParserValues.h:
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::adoptSelectorVector):
(WebCore::CSSSelectorList::deleteSelectors):
* css/CSSSelectorList.h:
* css/StyleProperties.cpp:
(WebCore::ImmutableStyleProperties::create):
(WebCore::StyleProperties::immutableCopyIfNeeded):
* css/StyleProperties.h:
* css/StyleRule.cpp:
(WebCore::StyleRule::create):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
(WebCore::StyleRuleRegion::StyleRuleRegion):
* css/StyleRule.h:
(WebCore::StyleRule::create):
(WebCore::StyleRule::parserAdoptSelectorVector):
(WebCore::StyleRuleFontFace::create):
(WebCore::StyleRulePage::create):
(WebCore::StyleRulePage::parserAdoptSelectorVector):
(WebCore::StyleRuleMedia::create):
(WebCore::StyleRuleSupports::create):
(WebCore::StyleRuleRegion::create):
(WebCore::StyleRuleViewport::create):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::StyleSheetContents):
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseStringAtPosition):
* css/StyleSheetContents.h:
* dom/SelectorQuery.cpp:
(WebCore::SelectorQueryCache::SelectorQueryCache):
(WebCore::SelectorQueryCache::add):
* dom/SelectorQuery.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):
2016-01-15 Dave Hyatt <hyatt@apple.com>
Avoid downloading the wrong image for <picture> elements.
https://bugs.webkit.org/show_bug.cgi?id=153027
Reviewed by Dean Jackson.
No tests, since they are always flaky.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::~HTMLImageElement):
(WebCore::HTMLImageElement::createForJSConstructor):
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
(WebCore::HTMLImageElement::pictureElement):
(WebCore::HTMLImageElement::setPictureElement):
(WebCore::HTMLImageElement::width):
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::hasShadowControls):
* html/HTMLPictureElement.h:
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElement):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
Images that are built underneath a <picture> element are now connected
to that picture element via a setPictureNode call from the parser. This
ensures that the correct <source> elements are examined before checking the image.
This connection between images and their picture owners is handled using a static
HashMap in HTMLImageElement. This connection is made both from the parser and from
DOM insertions, and the map is queried now instead of looking directly at the
image's parentNode().
2016-01-15 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.
Covered by rebased tests.
* Modules/streams/ByteLengthQueuingStrategy.idl:
* Modules/streams/CountQueuingStrategy.idl:
* Modules/streams/ReadableStream.idl:
* Modules/streams/ReadableStreamController.idl:
* Modules/streams/ReadableStreamReader.idl:
2016-01-15 Youenn Fablet <youenn.fablet@crf.canon.fr>
CORS: Fix the handling of redirected request containing Origin null.
https://bugs.webkit.org/show_bug.cgi?id=128816
Reviewed by Brent Fulgham.
Merging Blink patch from George Ancil (https://chromiumcodereview.appspot.com/20735002).
This patch removes the check for securityOrigin->isUnique() in passesAccessControlCheck().
This check prevented a redirected request with "Origin: null" from being
successful even when the response contains "Access-Control-Allow-Origin: null"
Tests: http/tests/xmlhttprequest/access-control-sandboxed-iframe-allow-origin-null.html
http/tests/xmlhttprequest/redirect-cors-origin-null.html
* loader/CrossOriginAccessControl.cpp:
(WebCore::passesAccessControlCheck):
2016-01-14 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r195064.
https://bugs.webkit.org/show_bug.cgi?id=153118
test fails most of the time (Requested by alexchristensen on
#webkit).
Reverted changeset:
"Avoid downloading the wrong image for <picture> elements."
https://bugs.webkit.org/show_bug.cgi?id=153027
http://trac.webkit.org/changeset/195064
2016-01-14 Ryosuke Niwa <rniwa@webkit.org>
createElement should not lowercase non-ASCII characters
https://bugs.webkit.org/show_bug.cgi?id=153114
Reviewed by Alex Christensen.
According to step 2 in https://dom.spec.whatwg.org/#dom-document-createelement, document.createElement should not
lowercase non-ASCII letters, and this is also what Firefox does. Match that behavior by lowercasing the tag name
by convertToASCIILowercase() instead of lower() in createElement.
Also merged HTMLDocument::createElement into Document::createElement for simplicity and avoid duplicating
the call to isValidName and setting a DOM exception.
No new tests since the behavior change is covered by the existing W3C tests.
* dom/Document.cpp:
(WebCore::Document::createElement): Create a HTML element with ASCII-lowercased tag name inside a HTML document.
* dom/Document.h:
* html/HTMLDocument.cpp:
(WebCore::addLocalNameToSet):
(WebCore::HTMLDocument::createElement): Merged into Document::createElement.
* html/HTMLDocument.h:
2016-01-14 Brady Eidson <beidson@apple.com>
Modern IDB: Support opening and deleting SQLite databases on disk.
https://bugs.webkit.org/show_bug.cgi?id=153084
Reviewed by Alex Christensen, Sam Weinig and Andy Estes (oh my!).
No new tests (Infrastructure, no testable change in behavior).
* Modules/indexeddb/IDBDatabaseIdentifier.cpp:
(WebCore::IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot):
* Modules/indexeddb/IDBDatabaseIdentifier.h:
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::create):
(WebCore::IDBServer::IDBServer::IDBServer):
(WebCore::IDBServer::IDBServer::createBackingStore):
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::create):
(WebCore::InProcessIDBServer::InProcessIDBServer):
* Modules/indexeddb/shared/InProcessIDBServer.h:
2016-01-14 Myles C. Maxfield <mmaxfield@apple.com>
Mixing Content Blocking of fonts and display:none rules causes battery drain
https://bugs.webkit.org/show_bug.cgi?id=153051
<rdar://problem/23187709>
Reviewed by Alex Christensen.
If we have applied a rule before and we are not applying it again, don't
resolve the style again.
Test: http/tests/contentextensions/font-display-none-repeated-layout.html
* contentextensions/ContentExtensionStyleSheet.cpp:
(WebCore::ContentExtensions::ContentExtensionStyleSheet::addDisplayNoneSelector):
* contentextensions/ContentExtensionStyleSheet.h:
* dom/ExtensionStyleSheets.cpp:
(WebCore::ExtensionStyleSheets::addDisplayNoneSelector):
2016-01-14 Ryosuke Niwa <rniwa@webkit.org>
Add document.defineCustomElement
https://bugs.webkit.org/show_bug.cgi?id=153092
Reviewed by Chris Dumez.
Added document.defineCustomElement and added a constructor to HTMLElement which can be called
as "super" in a subclass of HTMLElement. This is a prototype of new custom elements API and
willfully violates the current specification at http://w3c.github.io/webcomponents/spec/custom/
Each author defined class can define multiple elements using distinct tag names. In such cases,
the super call must specify the tag name. e.g.
class SomeCustomElement extends HTMLElement { constructor(name) { super(name); } }
document.defineCustomElement('some-custom-element', SomeCustomElement);
document.defineCustomElement('other-custom-element', SomeCustomElement);
new SomeCustomElement('some-custom-element');
When a class is associated with exactly one tag name, the argument can be omitted. e.g.
class AnotherCustomElement extends HTMLElement {}
document.defineCustomElement('another-custom-element', AnotherCustomElement);
new AnotherCustomElement();
We allow only subclassing of HTMLElement and only in (X)HTML namespace.
Tests: fast/custom-elements/Document-defineCustomElement.html
fast/custom-elements/HTMLElement-constructor.html
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCustomElementInterface.cpp: Added. Abstracts an author-defined class associated
with a custom element. It's a Active DOM object and lives until the associated document dies.
(WebCore::JSCustomElementInterface::JSCustomElementInterface):
(WebCore::JSCustomElementInterface::~JSCustomElementInterface):
* bindings/js/JSCustomElementInterface.h: Added.
(WebCore::JSCustomElementInterface::create):
(WebCore::JSCustomElementInterface::scriptExecutionContext):
(WebCore::JSCustomElementInterface::constructor):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::defineCustomElement): Added. Define a custom element by associating a tag
name with an author defined JS class after validating arguments.
* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement): Added. Look up the tag name based on new.target if one is not
specified. If a tag name is specified, check that new.target is associated with the tag name.
* dom/CustomElementDefinitions.cpp: Added.
(WebCore::CustomElementDefinitions::checkName): Added. Restricts tag names similarly to
http://w3c.github.io/webcomponents/spec/custom/#dfn-custom-element-type
(WebCore::CustomElementDefinitions::defineElement): Added. Associates a JS class with a tag name.
(WebCore::CustomElementDefinitions::findInterface): Added. Finds a JS class by a tag name.
(WebCore::CustomElementDefinitions::findName): Added. Finds a tag name by a JS class.
* dom/CustomElementDefinitions.h: Added.
(WebCore::CustomElementDefinitions::CustomElementInfo): Added.
* dom/Document.cpp:
(WebCore::Document::ensureCustomElementDefinitions): Added.
* dom/Document.h:
(WebCore::Document::customElementDefinitions): Added.
* dom/Document.idl:
* html/HTMLElement.idl:
2016-01-14 Simon Fraser <simon.fraser@apple.com>
Remove workaround for rdar://problem/23623670
https://bugs.webkit.org/show_bug.cgi?id=153107
rdar://problem/23633319
Reviewed by Tim Horton.
Remove the code that uses IOSurfaceAcceleratorTransformSurface() when copying from
back-to-front buffer, now that CGIOSurfaceContextCreate()-code path works correctly.
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::ensurePlatformContext):
(IOSurface::copyToSurface): Deleted.
2016-01-14 Beth Dakin <bdakin@apple.com>
WK1 and WK2 should share more candidate request code
https://bugs.webkit.org/show_bug.cgi?id=153108
Reviewed by Simon Fraser.
requestCandidatesForSelection() does not need to be exposed as an
EditorClient function. WK1 can just call invoke this code from the existing
respondToChangedSelection EditorClient function, which is what WK2 does.
* editing/Editor.cpp:
(WebCore::Editor::respondToChangedSelection):
* loader/EmptyClients.h:
* page/EditorClient.h:
(WebCore::EditorClient::supportsGlobalSelection):
2016-01-14 Beth Dakin <bdakin@apple.com>
WK2: Request completion candidates when needed
https://bugs.webkit.org/show_bug.cgi?id=153040
-and corresponding-
rdar://problem/24155631
Reviewed by Enrica Casucci and Tim Horton.
Helper functions for stringForCandidateRequest() and
handleAcceptedCandidate()
* editing/Editor.cpp:
(WebCore::candidateRangeForSelection):
(WebCore::candidateWouldReplaceText):
Request candidates for the word that is currently being typed so long as the
candidate would replace that word. Otherwise, use String().
(WebCore::Editor::stringForCandidateRequest):
When a candidate has been accepted, insert the text.
(WebCore::Editor::handleAcceptedCandidate):
* editing/Editor.h:
2016-01-14 Daniel Bates <dabates@apple.com>
Disallow use of Geolocation service from unique origins
https://bugs.webkit.org/show_bug.cgi?id=153102
<rdar://problem/23055645>
Reviewed by Alexey Proskuryakov.
Tests: fast/dom/Geolocation/dataURL-getCurrentPosition.html
fast/dom/Geolocation/dataURL-watchPosition.html
fast/dom/Geolocation/srcdoc-getCurrentPosition.html
fast/dom/Geolocation/srcdoc-watchPosition.html
http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition.html
http/tests/security/sandboxed-iframe-geolocation-watchPosition.html
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::securityOrigin): Convenience function to get the SecurityOrigin object
associated with this script execution context.
(WebCore::Geolocation::startRequest): Notify requester POSITION_UNAVAILABLE when requested
from a document with a unique origin.
* Modules/geolocation/Geolocation.h:
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::canRequestGeolocation): Added.
2016-01-14 Daniel Bates <dabates@apple.com>
[XSS Auditor] Extract attribute truncation logic and formalize string canonicalization
https://bugs.webkit.org/show_bug.cgi?id=152874
Reviewed by Brent Fulgham.
Derived from Blink patch (by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?revision=176339&view=revision>
Extract the src-like and script-like attribute truncation logic into independent functions
towards making it more straightforward to re-purpose this logic. Additionally, formalize the
concept of string canonicalization as a member function that consolidates the process of
decoding URL escape sequences, truncating the decoded string (if applicable), and removing
characters that are considered noise.
* html/parser/XSSAuditor.cpp:
(WebCore::truncateForSrcLikeAttribute): Extracted from XSSAuditor::decodedSnippetForAttribute().
(WebCore::truncateForScriptLikeAttribute): Ditto.
(WebCore::XSSAuditor::init): Write in terms of XSSAuditor::canonicalize().
(WebCore::XSSAuditor::filterCharacterToken): Updated to make use of formalized canonicalization methods.
(WebCore::XSSAuditor::filterScriptToken): Ditto.
(WebCore::XSSAuditor::filterObjectToken): Ditto.
(WebCore::XSSAuditor::filterParamToken): Ditto.
(WebCore::XSSAuditor::filterEmbedToken): Ditto.
(WebCore::XSSAuditor::filterAppletToken): Ditto.
(WebCore::XSSAuditor::filterFrameToken): Ditto.
(WebCore::XSSAuditor::filterInputToken): Ditto.
(WebCore::XSSAuditor::filterButtonToken): Ditto.
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected): Ditto.
(WebCore::XSSAuditor::eraseAttributeIfInjected): Updated code to use early return style and avoid an unnecessary string
comparison when we know that a src attribute was injected.
(WebCore::XSSAuditor::canonicalizedSnippetForTagName): Renamed; formerly known as XSSAuditor::decodedSnippetForName(). Updated
to make use of XSSAuditor::canonicalize().
(WebCore::XSSAuditor::snippetFromAttribute): Renamed; formerly known as XSSAuditor::decodedSnippetForAttribute(). Moved
truncation logic from here to WebCore::truncateFor{Script, Src}LikeAttribute.
(WebCore::XSSAuditor::canonicalize): Added.
(WebCore::XSSAuditor::canonicalizedSnippetForJavaScript): Added.
(WebCore::canonicalize): Deleted.
(WebCore::XSSAuditor::decodedSnippetForName): Deleted.
(WebCore::XSSAuditor::decodedSnippetForAttribute): Deleted.
(WebCore::XSSAuditor::decodedSnippetForJavaScript): Deleted.
* html/parser/XSSAuditor.h: Define enum class for the various attribute truncation styles.
2016-01-14 Daniel Bates <dabates@apple.com>
[XSS Auditor] Partial bypass when web server collapses path components
https://bugs.webkit.org/show_bug.cgi?id=152872
Reviewed by Brent Fulgham.
Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?revision=167610&view=revision>
Test: http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html
* html/parser/XSSAuditor.cpp:
(WebCore::isNonCanonicalCharacter):
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::decodedSnippetForName):
(WebCore::XSSAuditor::decodedSnippetForAttribute):
(WebCore::XSSAuditor::decodedSnippetForJavaScript):
(WebCore::fullyDecodeString): Deleted.
2016-01-14 Beth Dakin <bdakin@apple.com>
imported/blink/editing/text-iterator/read-past-cloned-first-letter.html
crashes
https://bugs.webkit.org/show_bug.cgi?id=153104
-and corresponding-
rdar://problem/24155631
Reviewed by Simon Fraser.
Though we merged the Blink test, we never merged Blink patch that fixed this
bug. So this is a merge of https://github.com/ChromiumWebApps/blink/commit/5a0d23d4368c661f621364339fde66b41ef019e5
* editing/TextIterator.cpp:
(WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter):
2016-01-14 Zalan Bujtas <zalan@apple.com>
ASSERTION FAILED: !newRelayoutRoot.container() || !newRelayoutRoot.container()->needsLayout() in WebCore::FrameView::scheduleRelayoutOfSubtree
https://bugs.webkit.org/show_bug.cgi?id=151605#c1
Reviewed by David Hyatt.
Do not let RenderMultiColumnSet/RenderFlowThread mark ancestors dirty while updating scrollbars
for overflow content. While updating scrollbars, we only layout descendants so marking parents dirty
is unnecessary and could lead to an invalid dirty state.
Test: fast/multicol/body-stuck-with-dirty-bit-with-columns.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutSpecialExcludedChild):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::invalidateRegions):
* rendering/RenderFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::prepareForLayout):
2016-01-14 Dave Hyatt <hyatt@apple.com>
Avoid downloading the wrong image for <picture> elements.
https://bugs.webkit.org/show_bug.cgi?id=153027
Reviewed by Dean Jackson.
Added test in fast/picture.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::~HTMLImageElement):
(WebCore::HTMLImageElement::createForJSConstructor):
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
(WebCore::HTMLImageElement::pictureElement):
(WebCore::HTMLImageElement::setPictureElement):
(WebCore::HTMLImageElement::width):
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::hasShadowControls):
* html/HTMLPictureElement.h:
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElement):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
Images that are built underneath a <picture> element are now connected
to that picture element via a setPictureNode call from the parser. This
ensures that the correct <source> elements are examined before checking the image.
This connection between images and their picture owners is handled using a static
HashMap in HTMLImageElement. This connection is made both from the parser and from
DOM insertions, and the map is queried now instead of looking directly at the
image's parentNode().
2016-01-14 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r195002.
https://bugs.webkit.org/show_bug.cgi?id=153098
Crashes many/most editing tests (Requested by ap on #webkit).
Reverted changeset:
"WK2: Request completion candidates when needed"
https://bugs.webkit.org/show_bug.cgi?id=153040
http://trac.webkit.org/changeset/195002
2016-01-14 Martin Robinson <mrobinson@igalia.com>
[GTK] [EFL] Hyphenation can never work in practice due to requirements on lang tags
https://bugs.webkit.org/show_bug.cgi?id=147310
Reviewed by Michael Catanzaro.
Test: platform/gtk/fast/text/hyphenate-flexible-locales.html
* platform/text/hyphen/HyphenationLibHyphen.cpp: Make locale matching for dictionary
selection a lot looser by matching case insensitively, matching multiple dictionaries
when only the language is specified, and ignoring the difference between '_' and '-' in
the locale name.
(WebCore::scanDirectoryForDicionaries): Now produce HashMap of Vectors instead of a single
path for each locale. Also add alternate entries to handle different ways of specifying
the locale.
(WebCore::scanTestDictionariesDirectoryIfNecessary): Update to handle the difference
in HashMap type.
(WebCore::availableLocales): Ditto.
(WebCore::canHyphenate): Also look for the lowercased version of the locale.
(WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey):
Key on the dictionary path now so that we can load more than one dictionary per locale.
(WebCore::lastHyphenLocation): Iterate through each matched dictionary in turn.
2016-01-14 Per Arne Vollan <peavo@outlook.com>
[Win] Remove workarounds for fixed bugs in fmod and pow.
https://bugs.webkit.org/show_bug.cgi?id=153071
Reviewed by Brent Fulgham.
Compile fix, help MSVC pick correct pow overload.
* rendering/shapes/BoxShape.cpp:
(WebCore::adjustRadiusForMarginBoxShape):
2016-01-14 Youenn Fablet <youenn.fablet@crf.canon.fr>
Fix problems with cross-origin redirects
https://bugs.webkit.org/show_bug.cgi?id=116075
Reviewed by Daniel Bates.
Merging https://chromium.googlesource.com/chromium/blink/+/7ea774e478f84f355748108d2aaabca15355d512 by Ken Russell
Same origin redirect responses leading to cross-origin requests were checked as cross-origin redirect responses.
Introduced ClientRequestedCredentials to manage whether credentials are needed or not in the cross-origin request.
In addition to Blink patch, it was needed to update some loaders with the newly introduced ClientRequestedCredentials parameter.
Added the clearing of "Accept-Encoding" header from cross-origin requests as Mac HTTP network layer is adding it for same-origin requests.
Test: http/tests/xmlhttprequest/access-control-and-redirects-async-same-origin.html
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource): Added new security parameter (from Blink patch).
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::redirectReceived): Updated checks so that same origin redirections are not treated as cross origin redirections (from Blink patch).
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::start):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Added new security parameter.
* loader/ResourceLoaderOptions.h:
(WebCore::ResourceLoaderOptions::ResourceLoaderOptions): Added new security parameter (from Blink patch).
(WebCore::ResourceLoaderOptions::credentialRequest):
(WebCore::ResourceLoaderOptions::setCredentialRequest):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Ditto.
(WebCore::CachedResourceLoader::defaultCachedResourceOptions): Ditto.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading): Added new security parameter.
* page/EventSource.cpp:
(WebCore::EventSource::connect): Added new security parameter (from Blink patch).
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::startLoading): Added new security parameter.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading): Ditto.
* platform/network/ResourceHandleTypes.h: Added new security parameter constants (from Blink patch).
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::clearHTTPAcceptEncoding): Function to remove "Accept-Encoding" header.
* platform/network/ResourceRequestBase.h: Ditto.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest): Added new security parameter.
2016-01-13 Myles C. Maxfield <mmaxfield@apple.com>
Addressing more post-review comments after r194566
Unreviewed.
No new tests because there is no behavior change.
* platform/text/mac/TextBreakIteratorInternalICUMac.mm:
(WebCore::topLanguagePreference):
2016-01-13 Alex Christensen <achristensen@webkit.org>
Implement custom protocols when using NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=153078
Reviewed by Andy Estes.
No new tests, but this makes the WebKit2CustomProtocolsTest api tests pass when using NetworkSession.
* WebCore.xcodeproj/project.pbxproj:
Make NSURLConnectionSPI.h private so we can include it from within WebKit2.
2016-01-13 Brent Fulgham <bfulgham@apple.com>
Cross-protocol, cross-site scripting (XPSS) using HTML forms
https://bugs.webkit.org/show_bug.cgi?id=153017
<rdar://problem/5873254>
Reviewed by David Kilzer.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived): If response HTTP version is 0.9,
sandbox against script execution and plugins.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveResponse): Ditto.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Ditto.
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt): Update for HTTP version.
(WebCore::ResourceResponseBase::copyData): Ditto.
(WebCore::ResourceResponseBase::httpVersion): Added.
(WebCore::ResourceResponseBase::setHTTPVersion): Ditto.
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::encode): Update for HTTP version.
(WebCore::ResourceResponseBase::decode): Ditto.
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit): Capture HTTP version.
* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformLazyInit): Ditto.
2016-01-13 Beth Dakin <bdakin@apple.com>
WK2: Request completion candidates when needed
https://bugs.webkit.org/show_bug.cgi?id=153040
-and corresponding-
rdar://problem/24155631
Reviewed by Enrica Casucci.
Helper functions for stringForCandidateRequest() and
handleAcceptedCandidate()
* editing/Editor.cpp:
(WebCore::candidateRangeForSelection):
(WebCore::candidateWouldReplaceText):
Request candidates for the word that is currently being typed so long as the
candidate would replace that word. Otherwise, use String().
(WebCore::Editor::stringForCandidateRequest):
When a candidate has been accepted, insert the text.
(WebCore::Editor::handleAcceptedCandidate):
* editing/Editor.h:
2016-01-13 Myles C. Maxfield <mmaxfield@apple.com>
Addressing post-review comments after r194566
Unreviewed.
No new tests because there is no behavior difference.
* platform/text/mac/TextBreakIteratorInternalICUMac.mm:
(WebCore::textBreakLocalePreference):
(WebCore::topLanguagePreference):
(WebCore::getSearchLocale):
(WebCore::getTextBreakLocale):
(WebCore::canonicalLanguageIdentifier): Deleted.
2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
formaction must return document's address when formaction is missing
https://bugs.webkit.org/show_bug.cgi?id=148874
Reviewed by Chris Dumez.
Fixed the bug by falling back to document.url() when the attribute is not set or is empty in formAction getter.
Test: fast/forms/formaction-attribute-with-empty-value.html
* html/HTMLButtonElement.idl:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::formAction): Added.
(WebCore::HTMLFormControlElement::setFormAction): Added.
* html/HTMLFormControlElement.h:
* html/HTMLInputElement.idl:
2016-01-13 Chris Dumez <cdumez@apple.com>
Unreviewed, rolling out r194900.
Roll back in as this did not actually regress PLT
Reverted changeset:
"Unreviewed, rolling out r194826."
https://bugs.webkit.org/show_bug.cgi?id=153020
http://trac.webkit.org/changeset/194900
2016-01-13 Konstantin Tokarev <annulen@yandex.ru>
Removed empty #if block from Font.h
https://bugs.webkit.org/show_bug.cgi?id=153067
Reviewed by Alex Christensen.
No new tests needed.
* platform/graphics/Font.h:
(WebCore::Font::scriptCache): Deleted.
2016-01-13 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Consistently use virtual and override specifiers in ScrollbarThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=153076
Reviewed by Alex Christensen.
No behavior change.
* platform/gtk/ScrollbarThemeGtk.h:
2016-01-13 Daniel Bates <dabates@apple.com>
Cleanup: XSS Auditor should avoid re-evaluating the parsed script tag
https://bugs.webkit.org/show_bug.cgi?id=152870
Reviewed by Brent Fulgham.
Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?revision=154354&view=revision>
Although the XSS Auditor caches the decoded start tag of a script as an optimization to
avoid decoding it again when filtering the character data of the script, it is sufficient
to cache whether the HTTP response contains the decoded start tag of a script. This
avoids both decoding the start tag of a script and determining whether the HTTP response
contains it again when filtering the character data of the script. Moreover, this removes
the need to cache a string object.
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterCharacterToken):
(WebCore::XSSAuditor::filterScriptToken):
* html/parser/XSSAuditor.h:
2016-01-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r194963.
https://bugs.webkit.org/show_bug.cgi?id=153079
This change causes ASan tests to crash and exit early
(Requested by ryanhaddad on #webkit).
Reverted changeset:
"Fragmentation-free allocator for timeless and/or coupled
allocations."
https://bugs.webkit.org/show_bug.cgi?id=152696
http://trac.webkit.org/changeset/194963
2016-01-13 Daniel Bates <dabates@apple.com>
[XSS Auditor] Do not include trailing comment characters in JavaScript snippets
https://bugs.webkit.org/show_bug.cgi?id=152873
Reviewed by Brent Fulgham.
Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?view=rev&revision=169967>
Test: http/tests/security/xssAuditor/script-tag-with-injected-comment.html
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::decodedSnippetForJavaScript):
2016-01-13 Adam Bergkvist <adam.bergkvist@ericsson.com>
WebRTC: Add support for RTCRtpSender.replaceTrack()
https://bugs.webkit.org/show_bug.cgi?id=153063
Reviewed by Eric Carlson.
Add the API and infrastructure to support RTCRtpSender.replaceTrack(). The platform is
reached through the RTCPeerConnection object that created the RTCRtpSender via a client
interface.
Test: fast/mediastream/RTCRtpSender-replaceTrack.html
* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::replaceTrack):
* Modules/mediastream/MediaEndpointPeerConnection.h:
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::removeTrack):
(WebCore::RTCPeerConnection::replaceTrack):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::RTCRtpSender):
(WebCore::RTCRtpSender::replaceTrack):
* Modules/mediastream/RTCRtpSender.h:
(WebCore::RTCRtpSenderClient::~RTCRtpSenderClient):
(WebCore::RTCRtpSender::create):
(WebCore::RTCRtpSender::trackId):
(WebCore::RTCRtpSender::stop):
* Modules/mediastream/RTCRtpSender.idl:
2016-01-13 Brady Eidson <beidson@apple.com>
Modern IDB: A few cursor tests are flaky because JS wrappers are GC'ed.
https://bugs.webkit.org/show_bug.cgi?id=153038
Reviewed by Alex Christensen.
No new tests (Couldn't write a test that was any more reliable than "flaky", so fixing the existing flaky tests will do).
And IDBCursor has an associated IDBRequest that is re-used each time the IDBCursor iterates.
The normal ActiveDOMObject approach to prevent the IDBRequest's wrapper from being garbage collected was not good enough
because, while the IDBRequest may not currently be waiting on any activity, as long as its associated IDBCursor is still
reachable then the request might be reused in the future.
Fortunately there's an IDL allowance for "one object keeping another alive during GC" and that's JSCustomMarkFunction
combined with GenerateIsReachable.
Applying those to IDBCursor and IDBRequest fix this handily.
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/IDBCursor.h:
(WebCore::IDBCursor::isModernCursor):
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::advance):
(WebCore::IDBClient::IDBCursor::continueFunction):
(WebCore::IDBClient::IDBCursor::uncheckedIterateCursor):
(WebCore::IDBClient::IDBCursor::uncheckedIteratorCursor): Deleted. Fixed the typo of this name.
* Modules/indexeddb/client/IDBCursorImpl.h:
* bindings/js/JSIDBCursorCustom.cpp: Added.
(WebCore::JSIDBCursor::visitAdditionalChildren):
2016-01-13 Zalan Bujtas <zalan@apple.com>
Get text drawing working with display lists.
https://bugs.webkit.org/show_bug.cgi?id=152957
Reviewed by Simon Fraser.
This patch enables text drawing for display lists.
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::drawGlyphBuffer):
* platform/graphics/FontCascade.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawGlyphs):
(WebCore::GraphicsContext::drawText): Deleted.
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawGlyphs):
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawGlyphs::apply):
2016-01-13 Zalan Bujtas <zalan@apple.com>
Simple line layout: Add support for word-break property.
https://bugs.webkit.org/show_bug.cgi?id=153054
Reviewed by Antti Koivisto.
This patch enables word-break property for simple line layout.
(https://drafts.csswg.org/css-text-3/#propdef-word-break)
word-break: normal and keep-all -> existing, non-(force)breaking behaviour.
break-all -> breaks words when needed.
Covered by existing tests like fast/text/word-break.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::canUseForStyle): Deleted.
(WebCore::SimpleLineLayout::printReason): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::findNextTextFragment):
* rendering/SimpleLineLayoutTextFragmentIterator.h:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isBreakable): Deleted.
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
2016-01-13 Said Abou-Hallawa <sabouhallawa@apple.com>
Reference cycle between SVGPathElement and SVGPathSegWithContext leaks Document
https://bugs.webkit.org/show_bug.cgi?id=151810
Reviewed by Darin Adler.
Break the reference cycle between SVGPathElement and SVGPathSegWithContext
by changing the back-pointer to be a WeakPtr pointer instead of having it
RefPtr. Make sure the SVGPathSegWithContext derived classes handle correctly
the case when the SVGPathElement back-pointer is deleted.
Also change the SVGPathElement argument to the SVGPathSeg creation functions
and constructors to be a const reference instead of having it as a pointer
since SVGPathElement is the class factory for all these classes.
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::SVGPathElement):
(WebCore::SVGPathElement::createSVGPathSegClosePath):
(WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
(WebCore::SVGPathElement::createSVGPathSegMovetoRel):
(WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
(WebCore::SVGPathElement::createSVGPathSegLinetoRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
(WebCore::SVGPathElement::createSVGPathSegArcAbs):
(WebCore::SVGPathElement::createSVGPathSegArcRel):
(WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
(WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
(WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
(WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
(WebCore::SVGPathElement::isSupportedAttribute):
* svg/SVGPathElement.h:
* svg/SVGPathSegArc.h:
(WebCore::SVGPathSegArc::SVGPathSegArc):
* svg/SVGPathSegArcAbs.h:
(WebCore::SVGPathSegArcAbs::create):
(WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
* svg/SVGPathSegArcRel.h:
(WebCore::SVGPathSegArcRel::create):
(WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
* svg/SVGPathSegClosePath.h:
(WebCore::SVGPathSegClosePath::create):
(WebCore::SVGPathSegClosePath::SVGPathSegClosePath):
* svg/SVGPathSegCurvetoCubic.h:
(WebCore::SVGPathSegCurvetoCubic::SVGPathSegCurvetoCubic):
* svg/SVGPathSegCurvetoCubicAbs.h:
(WebCore::SVGPathSegCurvetoCubicAbs::create):
(WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
* svg/SVGPathSegCurvetoCubicRel.h:
(WebCore::SVGPathSegCurvetoCubicRel::create):
(WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
* svg/SVGPathSegCurvetoCubicSmooth.h:
(WebCore::SVGPathSegCurvetoCubicSmooth::SVGPathSegCurvetoCubicSmooth):
* svg/SVGPathSegCurvetoCubicSmoothAbs.h:
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
* svg/SVGPathSegCurvetoCubicSmoothRel.h:
(WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
* svg/SVGPathSegCurvetoQuadratic.h:
(WebCore::SVGPathSegCurvetoQuadratic::SVGPathSegCurvetoQuadratic):
* svg/SVGPathSegCurvetoQuadraticAbs.h:
(WebCore::SVGPathSegCurvetoQuadraticAbs::create):
(WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
* svg/SVGPathSegCurvetoQuadraticRel.h:
(WebCore::SVGPathSegCurvetoQuadraticRel::create):
(WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
* svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
* svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
* svg/SVGPathSegLinetoAbs.h:
(WebCore::SVGPathSegLinetoAbs::create):
(WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
* svg/SVGPathSegLinetoHorizontal.h:
(WebCore::SVGPathSegLinetoHorizontal::SVGPathSegLinetoHorizontal):
* svg/SVGPathSegLinetoHorizontalAbs.h:
(WebCore::SVGPathSegLinetoHorizontalAbs::create):
(WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
* svg/SVGPathSegLinetoHorizontalRel.h:
(WebCore::SVGPathSegLinetoHorizontalRel::create):
(WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
* svg/SVGPathSegLinetoRel.h:
(WebCore::SVGPathSegLinetoRel::create):
(WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
* svg/SVGPathSegLinetoVertical.h:
(WebCore::SVGPathSegLinetoVertical::SVGPathSegLinetoVertical):
* svg/SVGPathSegLinetoVerticalAbs.h:
(WebCore::SVGPathSegLinetoVerticalAbs::create):
(WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
* svg/SVGPathSegLinetoVerticalRel.h:
(WebCore::SVGPathSegLinetoVerticalRel::create):
(WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
* svg/SVGPathSegMovetoAbs.h:
(WebCore::SVGPathSegMovetoAbs::create):
(WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
* svg/SVGPathSegMovetoRel.h:
(WebCore::SVGPathSegMovetoRel::create):
(WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
* svg/SVGPathSegWithContext.h:
(WebCore::SVGPathSegWithContext::SVGPathSegWithContext):
(WebCore::SVGPathSegWithContext::animatedProperty):
(WebCore::SVGPathSegWithContext::contextElement):
(WebCore::SVGPathSegWithContext::setContextAndRole):
(WebCore::SVGPathSegWithContext::commitChange):
(WebCore::SVGPathSegSingleCoordinate::setY):
(WebCore::SVGPathSegSingleCoordinate::SVGPathSegSingleCoordinate):
* svg/properties/SVGPathSegListPropertyTearOff.cpp:
(WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):
(WebCore::SVGPathSegListPropertyTearOff::replaceItem):
(WebCore::SVGPathSegListPropertyTearOff::removeItem):
2016-01-13 Andreas Kling <akling@apple.com>
Use BumpArena for style sheet object tree.
<https://webkit.org/b/152696>
Reviewed by Antti Koivisto.
Give each StyleSheetContents its own BumpArena, and plumb it down through CSSParser
to allocate StyleRule, StyleProperties and CSSSelectorList's selector arrays there.
This basically means that most objects that make up a given style sheet will end up
in one (or a few) contiguous region(s) of memory, instead of being scattered all
over the malloc heap.
In the common case (no CSSOM manipulation), the lifetimes of these objects are very
predictable: everything tends to die when the StyleSheetContents dies.
This dramatically improves space-efficiency in those cases, and allows us to return
contiguous chunks of memory to the system once a style sheet is no longer needed.
One-off CSS parses that don't work within a StyleSheetContents context will have
their StyleRules & co allocated out of the global BumpArena.
Bonus: give SelectorQueryCache a dedicated BumpArena as well, since it has very
predictable lifetime.
* css/CSSGrammar.y.in:
* css/CSSKeyframesRule.h:
(WebCore::StyleRuleKeyframes::create):
* css/CSSParser.cpp:
(WebCore::CSSParser::createStyleProperties):
(WebCore::CSSParser::createMediaRule):
(WebCore::CSSParser::createSupportsRule):
(WebCore::CSSParser::createKeyframesRule):
(WebCore::CSSParser::setArena):
(WebCore::CSSParser::arena):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::createPageRule):
(WebCore::CSSParser::createRegionRule):
(WebCore::CSSParser::createViewportRule):
* css/CSSParser.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
(WebCore::CSSParserSelector::adoptSelectorVector):
* css/CSSParserValues.h:
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::adoptSelectorVector):
(WebCore::CSSSelectorList::deleteSelectors):
* css/CSSSelectorList.h:
* css/StyleProperties.cpp:
(WebCore::ImmutableStyleProperties::create):
(WebCore::StyleProperties::immutableCopyIfNeeded):
* css/StyleProperties.h:
* css/StyleRule.cpp:
(WebCore::StyleRule::create):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
(WebCore::StyleRuleRegion::StyleRuleRegion):
* css/StyleRule.h:
(WebCore::StyleRule::create):
(WebCore::StyleRule::parserAdoptSelectorVector):
(WebCore::StyleRuleFontFace::create):
(WebCore::StyleRulePage::create):
(WebCore::StyleRulePage::parserAdoptSelectorVector):
(WebCore::StyleRuleMedia::create):
(WebCore::StyleRuleSupports::create):
(WebCore::StyleRuleRegion::create):
(WebCore::StyleRuleViewport::create):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::StyleSheetContents):
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseStringAtPosition):
* css/StyleSheetContents.h:
* dom/SelectorQuery.cpp:
(WebCore::SelectorQueryCache::SelectorQueryCache):
(WebCore::SelectorQueryCache::add):
* dom/SelectorQuery.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):
2016-01-13 YongGeol Jung <yg48.jung@samsung.com>
[TexMap] BitmapTextureGL is not released while scene is updated continuously.
https://bugs.webkit.org/show_bug.cgi?id=152524
Reviewed by Žan Doberšek.
This patch fixes two issues.
First, m_releaseUnusedTexturesTimer is not fired if scene is updated within 0.5s continuously.
In this case, BitmapTexturePool will not remove texture even if texture is not used for long time.
Second, m_releaseUnusedTexturesTimer is triggered by acquireTexture function only.
So, if next scene does not need to use BitmapTexture, remained textures in pool will not removed.
No new tests needed.
* platform/graphics/texmap/BitmapTexturePool.cpp:
(WebCore::BitmapTexturePool::scheduleReleaseUnusedTextures):
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
2016-01-13 Youenn Fablet <youenn.fablet@crf.canon.fr>
[Streams API] Refactor builtin internals to prepare support for streams API in worker
https://bugs.webkit.org/show_bug.cgi?id=152535
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 JSBuiltinInternalFunctions::initialize.
Adding private controller and reader constructors to the JS DOM constructor map so that they do not get garbage collected.
No change in behavior, except that private builtins are usable in workers (but not actually used).
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* 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):
(WebCore::JSDOMWindowBase::visitChildren):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/WebCoreJSBuiltinInternals.cpp: Added.
(WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
(WebCore::JSBuiltinInternalFunctions::visit):
(WebCore::JSBuiltinInternalFunctions::initialize):
* bindings/js/WebCoreJSBuiltinInternals.h:
2016-01-13 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[EFL] Fix wrong return value of paintThemePart in RenderThemeEfl
https://bugs.webkit.org/show_bug.cgi?id=153058
Reviewed by Carlos Garcia Campos.
To return false in paint functions in RenderThemeEfl means that it is supported though,
paintThemePart has returned false even when failing to get image cache of theme.
* rendering/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintThemePart):
2016-01-12 Andy Estes <aestes@apple.com>
[Content Filtering] forEachContentFilterUntilBlocked should accept a lambda by rvalue reference
https://bugs.webkit.org/show_bug.cgi?id=153057
Reviewed by Dan Bernstein.
No new tests. No change in behavior.
Instead of having ContentFilter::forEachContentFilterUntilBlocked() take a std::function, just have it take an
rvalue reference to the lambda its passed.
* loader/ContentFilter.cpp:
(WebCore::ContentFilter::forEachContentFilterUntilBlocked):
* loader/ContentFilter.h:
2016-01-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix return value of some paint methods in RenderThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=153015
Reviewed by Michael Catanzaro.
The bool value returned by paint methods in RenderTheme means
whether the appearance is supported or not, so we should return
true when not supported (so we didn't paint anything) and false
when supported (so we actually painted the theme part).
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
(WebCore::RenderThemeGtk::paintMediaButton):
(WebCore::RenderThemeGtk::paintMediaMuteButton):
(WebCore::RenderThemeGtk::paintMediaPlayButton):
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderContainer): Deleted.
* rendering/RenderThemeGtk.h:
2016-01-12 Andy Estes <aestes@apple.com>
[Content Filtering] De-virtualize PlatformContentFilter::{needsMoreData, didBlockData}()
https://bugs.webkit.org/show_bug.cgi?id=153052
Reviewed by Andreas Kling.
No new tests. No change in behavior.
Instead of having virtual functions that each platform content filter implement in terms of their own state,
store the state in the base class so that these functions can be non-virtual. Teach each subclass to update the
base class state appropriately.
* loader/ContentFilter.h:
* platform/PlatformContentFilter.h:
(WebCore::PlatformContentFilter::needsMoreData):
(WebCore::PlatformContentFilter::didBlockData):
* platform/cocoa/NetworkExtensionContentFilter.h:
* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::willSendRequest):
(WebCore::NetworkExtensionContentFilter::responseReceived):
(WebCore::NetworkExtensionContentFilter::handleDecision):
(WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Deleted.
(WebCore::NetworkExtensionContentFilter::needsMoreData): Deleted.
(WebCore::NetworkExtensionContentFilter::didBlockData): Deleted.
* platform/cocoa/ParentalControlsContentFilter.h:
* platform/cocoa/ParentalControlsContentFilter.mm:
(WebCore::ParentalControlsContentFilter::responseReceived):
(WebCore::ParentalControlsContentFilter::updateFilterState):
(WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Deleted.
(WebCore::ParentalControlsContentFilter::needsMoreData): Deleted.
(WebCore::ParentalControlsContentFilter::didBlockData): Deleted.
* platform/spi/cocoa/NEFilterSourceSPI.h:
* testing/MockContentFilter.cpp:
(WebCore::MockContentFilter::willSendRequest):
(WebCore::MockContentFilter::maybeDetermineStatus):
(WebCore::MockContentFilter::needsMoreData): Deleted.
(WebCore::MockContentFilter::didBlockData): Deleted.
* testing/MockContentFilter.h:
2016-01-12 Andy Estes <aestes@apple.com>
Address missed review feedback after r194950.
* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::initialize): Renamed the NetworkExtension dispatch queue.
2016-01-08 Andy Estes <aestes@apple.com>
[Content Filtering] Lazily load platform frameworks
https://bugs.webkit.org/show_bug.cgi?id=152881
rdar://problem/23270886
Reviewed by Brady Eidson.
On Cocoa platforms, ContentFilter soft-links two frameworks that perform the underlying filtering operations.
There is a one-time cost associated with the soft-linking, and the current design requires all clients to pay
this cost whether or not they ever load a resource that is subject to filtering.
Addressed this by deferring the loading of frameworks until it is known that a resource will require filtering.
It is rather simple to defer the soft-linking at the PlatformContentFilter level, but doing this alone would
mean that every CachedRawResourceClient callback would be routed through ContentFilter, even in the very common
case where both platform content filters are disabled. This is because checking if a platform content filter is
enabled involves loading its framework, so creating a ContentFilter (which DocumentLoader will add as the
CachedRawResource client in place of itself) cannot be avoided by checking that all its platform content filters
are disabled.
Resolved this by inverting the relationship between ContentFilter and DocumentLoader. Instead of ContentFilter
being the CachedRawResource's client and forwarding callbacks to DocumentLoader when one or more platform
filters are enabled, DocumentLoader is now always the client and it forwards callbacks to ContentFilter.
ContentFilter then returns a boolean value indicating whether or not DocumentLoader should proceed with each
callback.
New API test: ContentFiltering.LazilyLoadPlatformFrameworks
* loader/ContentFilter.cpp:
(WebCore::ContentFilter::create): Renamed from createIfEnabled(). Since the enabled check causes frameworks to
be loaded, the check is skipped here and all types are always created.
(WebCore::ContentFilter::continueAfterWillSendRequest): Renamed from willSendRequest(). Renamed requestCopy to
originalRequest, and only created it for logging purposes. Since the copy was only used for logging purposes,
request is now modified directly. Returned false if request is null.
(WebCore::ContentFilter::continueAfterResponseReceived): Renamed from responseReceived(). Stopped asserting that
resource is non-null, since it will be null in the case of substitute data loads. Stopped asserting that m_state
is not Initialized, since that state was removed and the function can now be called in all states. Only logged
if m_state is Filtering. Returned false if m_state is Blocked.
(WebCore::ContentFilter::continueAfterDataReceived): Renamed from dataReceived(). Stopped asserting that
resource is non-null and that m_state is Initialized, and moved the logging, for the same reasons as above.
Returned false if m_state is Filtering or Blocked.
(WebCore::ContentFilter::continueAfterNotifyFinished): Renamed from notifyFinished(). Stopped asserting that
resource is non-null and that m_state is not Initialized, and moved the logging, for the same reasons as above.
If m_state is not Blocked at this point, set m_state to Allowed in order for deliverResourceData() to not get
caught in continueAfterDataReceived(). Returned false if m_state is Blocked or Stopped after delivering data.
(WebCore::ContentFilter::createIfEnabled): Renamed to create().
(WebCore::ContentFilter::~ContentFilter): Stopped removing ourself as m_mainResource's client.
(WebCore::ContentFilter::willSendRequest): Renamed to continueAfterWillSendRequest().
(WebCore::ContentFilter::startFilteringMainResource): Stopped adding ourself as m_mainResource's client. Stopped
asserting that m_state is not Initialized and instead returned early if m_state is not Stopped.
(WebCore::ContentFilter::stopFilteringMainResource): Stopped removing ourself as m_mainResource's client.
(WebCore::ContentFilter::responseReceived): Renamed to continueAfterResponseReceived().
(WebCore::ContentFilter::dataReceived): Renamed to continueAfterDataReceived().
(WebCore::ContentFilter::redirectReceived): Removed. DocumentLoader now calls continueAfterWillSendRequest()
directly on redirects.
(WebCore::ContentFilter::notifyFinished): Renamed to continueAfterNotifyFinished().
(WebCore::ContentFilter::didDecide): Instead of calling DocumentLoader::contentFilterDidDecide(), called
DocumentLoader::contentFilterDidBlock() when m_state is Blocked.
(WebCore::ContentFilter::deliverResourceData): Asserted that m_state is Allowed.
* loader/ContentFilter.h: Stopped inheriting from CachedRawResourceClient. Redeclared the
CachedRawResourceClient virtual functions as the continue* functions mentioned above. Made State enum private
and removed Initialized. Initialized m_state to Stopped and removed its getter.
(WebCore::ContentFilter::type): Returned a ContentFilter::Type that does not include an enabled function.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::notifyFinished): Returned early if ContentFilter::continueAfterNotifyFinished()
returned false.
(WebCore::DocumentLoader::willSendRequest): Called ContentFilter::continueAfterWillSendRequest() even for
redirects, since ContentFilter is no longer a CachedRawResourceClient and so will no longer receive
redirectReceived(). Returned early if continueAfterWillSendRequest() returns false.
(WebCore::DocumentLoader::responseReceived): Returned early if ContentFilter::continueAfterResponseReceived()
returned false.
(WebCore::DocumentLoader::dataReceived): Ditto for ContentFilter::continueAfterDataReceived().
(WebCore::DocumentLoader::startLoadingMainResource): Called ContentFilter::create(), not createIfEnabled().
(WebCore::DocumentLoader::becomeMainResourceClient): Called ContentFilter::startFilteringMainResource() even if
m_state is not Initialized. Added ourself as a client of m_mainResource unconditionally.
(WebCore::DocumentLoader::contentFilterDidBlock): Renamed from contentFilterDidDecide. Removed assertions and
the early return when m_state is Allowed, since the state is guaranteed to be Blocked.
(WebCore::DocumentLoader::contentFilterDidDecide): Renamed to contentFilterDidBlock.
* platform/cocoa/NetworkExtensionContentFilter.h: Moved definition of HAVE_NETWORK_EXTENSION to Platform.h so
that this file doesn't need to become a Private header. Made enabled() private, and declared initialize().
* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::initialize): Added a function to lazily initialize the object.
(WebCore::NetworkExtensionContentFilter::willSendRequest): For the modern NEFilterSource, checked if it is
enabled only after checking if the request is HTTP(S). If both checks pass, then called initialize().
(WebCore::NetworkExtensionContentFilter::responseReceived): Ditto for the legacy NEFilterSource.
* platform/cocoa/ParentalControlsContentFilter.h: Made enabled() private.
* platform/cocoa/ParentalControlsContentFilter.mm:
(WebCore::ParentalControlsContentFilter::responseReceived): Checked if WebFilterEvaluator is enabled only after
checking if the response is from a protocol that can be handled.
* testing/MockContentFilter.cpp:
(WebCore::MockContentFilter::willSendRequest): Immediately set m_status to Status::Allowed if !enabled().
* testing/MockContentFilter.h: Made enabled() private.
2016-01-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r194926 and r194928.
https://bugs.webkit.org/show_bug.cgi?id=153048
This change is causing LayoutTest crashes (Requested by
ryanhaddad on #webkit).
Reverted changesets:
"Avoid downloading the wrong image for <picture> elements."
https://bugs.webkit.org/show_bug.cgi?id=153027
http://trac.webkit.org/changeset/194926
"Avoid downloading the wrong image for <picture> elements."
https://bugs.webkit.org/show_bug.cgi?id=153027
http://trac.webkit.org/changeset/194928
2016-01-11 Dean Jackson <dino@apple.com>
[iOS] Antialiasing doesn't work in WebGL
https://bugs.webkit.org/show_bug.cgi?id=153000
<rdar://problem/9165531>
Reviewed by Alex Christensen.
WebGL has supported platform antialiasing since
the beginning, but we never hooked it up for iOS
because it used a slightly different extension.
Test: fast/canvas/webgl/antialiasing-enabled.html
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::endPaint): Resolve the multisampling
buffer once we're done painting.
(WebCore::GraphicsContext3D::~GraphicsContext3D): We never created
the m_compositorTexture RenderBuffer on iOS, so no point deleting
it.
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension): The iOS extension
has a slightly different name.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs): Make sure to create the
multisample buffer with the correct format.
(WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary): We
need to remember what our bound frame buffer is when we
enter this call, and restore it afterwards. In the middle we can
discard our multisample read buffer once we have resolved it
into the normal framebuffer.
2016-01-12 Daniel Bates <dabates@apple.com>
XSS Auditor should navigate to empty substitute data on full page block
https://bugs.webkit.org/show_bug.cgi?id=152868
<rdar://problem/18658448>
Reviewed by David Kilzer and Andy Estes.
Derived from Blink patch (by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?view=rev&revision=179240>
Test: http/tests/security/xssAuditor/block-does-not-leak-that-page-was-blocked-using-empty-data-url.html
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::didBlockScript): Modified to call NavigationScheduler::schedulePageBlock().
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledPageBlock::ScheduledPageBlock): Added.
(WebCore::NavigationScheduler::schedulePageBlock): Navigate to empty substitute data with
the same URL as the originating document.
* loader/NavigationScheduler.h:
2016-01-12 Dave Hyatt <hyatt@apple.com>
Avoid downloading the wrong image for <picture> elements.
https://bugs.webkit.org/show_bug.cgi?id=153027
Reviewed by Dean Jackson.
I was unable to write a reliable test for this feature (I welcome suggestions regarding
how this could be tested).
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::~HTMLImageElement):
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
(WebCore::HTMLImageElement::pictureNode):
(WebCore::HTMLImageElement::setPictureNode):
* html/HTMLImageElement.h:
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElement):
Images that are built underneath a <picture> element are now connected
to that picture element via a setPictureNode call from the parser. This
ensures that the correct <source> elements are examined before checking the image.
This connection between images and their picture owners is handled using a static
HashMap in HTMLImageElement. This connection is made both from the parser and from
DOM insertions, and the map is queried now instead of looking directly at the
image's parentNode().
Also note the change to pass the document element's computed style in for media
query evaluation. Just as with the preload scanner, the image's style can't be
used as it has not been determined yet.
2016-01-12 Myles C. Maxfield <mmaxfield@apple.com>
Cleanup in font loading code
https://bugs.webkit.org/show_bug.cgi?id=153023
Reviewed by Zalan Bujtas.
See detailed notes below.
No new tests because there is no behavior change.
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::isLoaded): Deleted. Never called.
* css/CSSFontFace.h: Ditto.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font): No need to use a helper
isLoaded() function.
(WebCore::CSSFontFaceSource::isLoaded): Deleted. Unnecessary.
* css/CSSFontFaceSource.h:
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::cachedFont): Un-indent code.
* css/CSSFontSelector.cpp:
(WebCore::registerLocalFontFacesForFamily): constructFamilyFontFaces()
always returns an empty Vector. Therefore, the function of this function
is to perform the ancillary processing related to the case where the Faces
don't already exist. Renames the function and removes the empty vector
return.
(WebCore::CSSFontSelector::addFontFaceRule): Update for
registerLocalFontFacesForFamily().
(WebCore::FontFaceComparator::FontFaceComparator): Instead of using a static,
construct a wrapper class around the comparator.
(WebCore::FontFaceComparator::operator()): Ditto.
(WebCore::CSSFontSelector::getFontFace): Un-indent code and update to use
FontFaceComparator.
(WebCore::CSSFontSelector::fallbackFontAt): Migrate off PassRefPtr.
(WebCore::constructFamilyFontFaces): Deleted.
(WebCore::compareFontFaces): Deleted.
(WebCore::CSSFontSelector::resolvesFamilyFor): Deleted. Never called.
* css/CSSFontSelector.h:
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::isValid): Deleted.
(WebCore::CSSSegmentedFontFace::fontRanges): Cache negative validity results.
* css/CSSSegmentedFontFace.h:
* platform/graphics/FontCascade.h:
(WebCore::FontCascade::fontSelector): Use nullptr.
* platform/graphics/FontSelector.h:
2016-01-12 Ryosuke Niwa <rniwa@webkit.org>
Add a build flag for custom element
https://bugs.webkit.org/show_bug.cgi?id=153005
Reviewed by Alex Christensen.
Added a build flag for enabling custom elements.
* Configurations/FeatureDefines.xcconfig:
2016-01-12 Adam Bergkvist <adam.bergkvist@ericsson.com>
WebRTC: Update RTCPeerConnection.add/removeTrack() and add test
https://bugs.webkit.org/show_bug.cgi?id=153010
Reviewed by Eric Carlson.
RTCPeerConnection.add/removeTrack() are not fully spec compliant yet, since that would
require support for RTCRtpTransceiver which is a new work-in-progress feature. Use
Vector, instead of map, for senders and receivers since nothing is removed from these
sets anymore.
Test: fast/mediastream/RTCPeerConnection-add-removeTrack.html
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::removeTrack):
(WebCore::RTCPeerConnection::queuedCreateOffer): Deleted.
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::RTCRtpSender):
* Modules/mediastream/RTCRtpSender.h:
(WebCore::RTCRtpSender::create):
(WebCore::RTCRtpSender::mediaStreamIds):
2016-01-12 Brady Eidson <beidson@apple.com>
Modern IDB: Check in empty SQLite backing store implementation.
https://bugs.webkit.org/show_bug.cgi?id=153022
Reviewed by Alex Christensen.
No new tests (No change in behavior).
Just to get the implementation files in the tree, this backing store currently does nothing
other than return errors for every operation.
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Added.
(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
(WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h: Added.
2016-01-12 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/dont-wedge.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=152892
Reviewed by Alex Christensen.
No new tests (Reenabled existing test).
* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::abortOpenAndUpgradeNeeded):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::requestCompleted): If the database was opened
or an upgrade transaction was started, but the script execution context is already
stopped, immediately message back to the server so it doesn't wedge.
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::abortOpenAndUpgradeNeeded):
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::abortWithoutCallback):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::abortOpenAndUpgradeNeeded):
* Modules/indexeddb/shared/InProcessIDBServer.h:
2016-01-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r194826.
https://bugs.webkit.org/show_bug.cgi?id=153020
Appears to have regressed PLT (Requested by kling on #webkit).
Reverted changeset:
"Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
cont'd"
https://bugs.webkit.org/show_bug.cgi?id=152902
http://trac.webkit.org/changeset/194826
2016-01-12 Antti Koivisto <antti@apple.com>
Don't reuse memory cache entries with different charset
https://bugs.webkit.org/show_bug.cgi?id=110031
rdar://problem/13666418
Reviewed by Andreas Kling.
Test: fast/loader/cache-encoding.html
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
(WebCore::logResourceRevalidationDecision):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
Pass full CachedResourceRequest to the function.
If charset differs don't reuse the cache entry.
* loader/cache/CachedResourceLoader.h:
2016-01-12 Gyuyoung Kim <gyuyoung.kim@webkit.org>
Use a pointer instead of PassRefPtr in AbstractView argument of UIEvent class
https://bugs.webkit.org/show_bug.cgi?id=152829
Reviewed by Darin Adler.
As a step to reduce uses of PassRefPtr, UIEvent class doesn't need to use PassRefPtr for AbstractView argument.
Nobody hands us ownership when making one of these objects.
* dom/FocusEvent.cpp:
(WebCore::FocusEvent::FocusEvent):
* dom/FocusEvent.h:
* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEvent::KeyboardEvent):
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
(WebCore::MouseEvent::initMouseEvent):
(WebCore::SimulatedMouseEvent::create):
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
* dom/MouseRelatedEvent.h:
* dom/TextEvent.cpp:
(WebCore::TextEvent::create):
(WebCore::TextEvent::createForPlainTextPaste):
(WebCore::TextEvent::createForFragmentPaste):
(WebCore::TextEvent::createForDrop):
(WebCore::TextEvent::createForDictation):
(WebCore::TextEvent::TextEvent):
(WebCore::TextEvent::initTextEvent):
* dom/TextEvent.h:
* dom/TouchEvent.cpp:
(WebCore::TouchEvent::TouchEvent):
(WebCore::TouchEvent::initTouchEvent):
* dom/TouchEvent.h:
* dom/UIEvent.cpp:
(WebCore::UIEvent::UIEvent):
(WebCore::UIEvent::initUIEvent):
* dom/UIEvent.h:
(WebCore::UIEvent::create):
(WebCore::UIEvent::view):
* dom/UIEventWithKeyState.h:
(WebCore::UIEventWithKeyState::UIEventWithKeyState):
2016-01-12 Csaba Osztrogonác <ossy@webkit.org>
Fix unused-private-field warnings in DisplayListItems.h
https://bugs.webkit.org/show_bug.cgi?id=153012
Reviewed by Michael Catanzaro.
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
* platform/graphics/displaylists/DisplayListItems.h:
2016-01-12 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix isRecording condition logic in GraphicsContext::roundToDevicePixels after r194816.
This looks like a typo introduced in r194816, we want to return early logging
a message when isRecording() returns true.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::roundToDevicePixels):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::roundToDevicePixels):
2016-01-11 Carlos Garcia Campos <cgarcia@igalia.com>
Inconsistencies in main resource load delegates when loading from history
https://bugs.webkit.org/show_bug.cgi?id=150927
Reviewed by Michael Catanzaro.
When restoring a page from the page cache, even though there
isn't an actual load of resources, we are still emitting the load
delegates to let the API layer know there are contents being
loaded in the web view. This makes the page cache restoring
transparent for the API layer. However, when restoring a page from
the cache, all the delegates are emitted after the load is
committed. This is not consistent with real loads, where we first
load the main resource and once we get a response we commit the
load. This inconsistency is problematic if the API layer expects
to always have a main resource with a response when the load is
committed. This is the case of the GTK+ port, for example. So,
this patch ensures that when a page is restored from the page
cache, the main resource load delegates that are emitted until a
response is received in normal loads, are emitted before the load
is committed.
Test: http/tests/loading/main-resource-delegates-on-back-navigation.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad): When loading from
the page cache, send delegate messages up to didReceiveResponse
for the main resource before the load is committed, and the
remaining messages afterwards.
2016-01-09 Andy Estes <aestes@apple.com>
[Cocoa] Add SPI to opt out a URL scheme from the memory cache
https://bugs.webkit.org/show_bug.cgi?id=152950
rdar://problem/24066652
Reviewed by Tim Horton.
Added a list of schemes to SchemeRegistry whose resources should always be revalidated. Taught CachedResource to
return a freshness lifetime of 0 for these resources, unless the scheme is one that should be cached indefinitely.
New API test: WebKit2.AlwaysRevalidatedURLSchemes
* loader/cache/CachedResource.cpp:
(WebCore::shouldCacheSchemeIndefinitely): Moved from SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely().
(WebCore::CachedResource::freshnessLifetime): For a scheme that should not be cached indefinitely, return 0 if
that scheme should always be revalidated according to SchemeRegistry.
* platform/SchemeRegistry.cpp:
(WebCore::alwaysRevalidatedSchemes):
(WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
(WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme):
(WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely): Moved to WebCore::shouldCacheSchemeIndefinitely().
There was no reason for this to be in SchemeRegistry.
* platform/SchemeRegistry.h:
2016-01-11 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/index-multientry.html fails under GuardMalloc/ASAN.
https://bugs.webkit.org/show_bug.cgi?id=152990
Reviewed by Alex Christensen.
No new tests (Covered by re-enabling existing test).
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent): Use String::utf8() instead of AtomicString::characters8() for
the format string, as the latter fails under ASAN.
* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::removeEntriesWithValueKey): We can't save off pointers to IDBKeyDatas
used as keys in the map, because the moment we start mutating the map the keys can be rehashed, invalidating
our pointers. Save off the IDBKeyDatas by value instead.
2016-01-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Migrate Page Timeline recording to ScriptProfiler
https://bugs.webkit.org/show_bug.cgi?id=152727
Reviewed by Brian Burg.
Test: inspector/script-profiler/event-type-Other.html
This now shares the JavaScript profiling code between JSContext and Page
inspection. It also moves forward splitting the Page's Timeline domain
into smaller components that can be turned on/off individually.
* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSMainThreadExecState.h:
(WebCore::JSMainThreadExecState::profiledCall):
(WebCore::JSMainThreadExecState::profiledEvaluate):
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::call):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject callWebScriptMethod:withArguments:]):
(-[WebScriptObject evaluateWebScript:]):
Identify entry points into JSC that we want to profile for the frontend.
These were nearly all already classified for the Timeline. We added missing
support for ErrorHandlers (window.onerror handler functions).
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didCallFunction):
(WebCore::InspectorTimelineAgent::didEvaluateScript):
(WebCore::startProfiling): Deleted.
(WebCore::stopProfiling): Deleted.
(WebCore::InspectorTimelineAgent::willCallFunction): Deleted.
(WebCore::InspectorTimelineAgent::willEvaluateScript): Deleted.
* inspector/InspectorTimelineAgent.h:
TimelineAgent no longer needs to start/stop the Legacy Profiler
since ScriptProfiler will automatically do that for us. Delete
all code associated with that. There is still an open question
regarding `console.profile` and `console.profileEnd` that
starts/stops the profiler.
2016-01-11 Anders Carlsson <andersca@apple.com>
Get rid of CFMakeCollectable, it is a no-op
https://bugs.webkit.org/show_bug.cgi?id=152988
Reviewed by Sam Weinig.
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::URLByTruncatingOneCharacterBeforeComponent):
(WebCore::URLByRemovingComponentAndSubsequentCharacter):
2016-01-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r194866.
https://bugs.webkit.org/show_bug.cgi?id=152986
This change broke the mac build (Requested by ryanhaddad on
#webkit).
Reverted changeset:
"[Cocoa] Add SPI to opt out a URL scheme from the memory
cache"
https://bugs.webkit.org/show_bug.cgi?id=152950
http://trac.webkit.org/changeset/194866
2016-01-11 Zalan Bujtas <zalan@apple.com>
Padding added to table-cell element after font-size change.
https://bugs.webkit.org/show_bug.cgi?id=152796
Reviewed by David Hyatt.
Do not include intrinsicPaddingBefore value while figuring out the height of a row.
In RenderTableSection::calcRowLogicalHeight() we are interested in the height of the content
without the additional padding (normal padding is included).
Test: fast/table/table-baseline-grows.html
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
2016-01-11 Andy Estes <aestes@apple.com>
[Cocoa] Add SPI to opt out a URL scheme from the memory cache
https://bugs.webkit.org/show_bug.cgi?id=152950
rdar://problem/24066652
Reviewed by Tim Horton.
Added a list of schemes to SchemeRegistry whose resources should always be revalidated. Taught CachedResource to
return a freshness lifetime of 0 for these resources, unless the scheme is one that should be cached indefinitely.
New API test: WebKit2.AlwaysRevalidatedURLSchemes
* loader/cache/CachedResource.cpp:
(WebCore::shouldCacheSchemeIndefinitely): Moved from SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely().
(WebCore::CachedResource::freshnessLifetime): For a scheme that should not be cached indefinitely, return 0 if
that scheme should always be revalidated according to SchemeRegistry.
* platform/SchemeRegistry.cpp:
(WebCore::alwaysRevalidatedSchemes):
(WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
(WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme):
(WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely): Moved to WebCore::shouldCacheSchemeIndefinitely().
There was no reason for this to be in SchemeRegistry.
* platform/SchemeRegistry.h:
2016-01-11 Dave Hyatt <hyatt@apple.com>
Picture element needs to work with the preload scanner and select the correct
source element instead of loading the image.
https://bugs.webkit.org/show_bug.cgi?id=152983
Reviewed by Dean Jackson.
Added new tests in http/tests/loading.
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::tagIdFor):
(WebCore::TokenPreloadScanner::initiatorFor):
(WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
(WebCore::TokenPreloadScanner::StartTagScanner::processImageAndScriptAttribute):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
(WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
(WebCore::TokenPreloadScanner::scan):
* html/parser/HTMLPreloadScanner.h:
(WebCore::TokenPreloadScanner::setPredictedBaseElementURL):
(WebCore::TokenPreloadScanner::inPicture):
2016-01-11 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/key-generator.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152981
Reviewed by Alex Christensen.
No new tests (One failing test now passes, and one test's results get a progression).
* Modules/indexeddb/server/IDBBackingStore.h:
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber): Throw an error if the current
value is already over 2^53.
(WebCore::IDBServer::MemoryIDBBackingStore::revertGeneratedKeyNumber):
(WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber): Handle double -> uint64_t
conversions properly when calculating the next key.
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::ScopeGuard::ScopeGuard): Add this utility class to call a function
any time it goes out of scope.
(WebCore::IDBServer::ScopeGuard::~ScopeGuard):
(WebCore::IDBServer::ScopeGuard::enable):
(WebCore::IDBServer::ScopeGuard::disable):
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Revert the key generator value if
the put/add operation ends in error.
2016-01-11 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/lazy-index-population.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152976
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
We were restoring objectstores/indexes incorrectly on transaction abort.
* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort):
2016-01-11 Brady Eidson <beidson@apple.com>
Modern IDB: Make MemoryIndex and MemoryObjectStore RefCounted.
https://bugs.webkit.org/show_bug.cgi?id=152966
Reviewed by Alex Christensen.
No new tests (Refactor, no change in behavior)
* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
(WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
(WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::create):
* Modules/indexeddb/server/MemoryIndex.h:
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::create):
(WebCore::IDBServer::MemoryObjectStore::createIndex):
(WebCore::IDBServer::MemoryObjectStore::maybeRestoreDeletedIndex):
(WebCore::IDBServer::MemoryObjectStore::takeIndexByName):
(WebCore::IDBServer::MemoryObjectStore::deleteIndex):
(WebCore::IDBServer::MemoryObjectStore::updateIndexesForDeleteRecord):
(WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
(WebCore::IDBServer::MemoryObjectStore::registerIndex):
* Modules/indexeddb/server/MemoryObjectStore.h:
2016-01-11 Andreas Kling <akling@apple.com>
Fix other builds after my MSVC build fix. :-|
* css/StyleResolver.cpp:
2016-01-11 Andreas Kling <akling@apple.com>
Fix MSVC build after r194848.
Since MSVC refuses to recognize the friendship between LazyNeverDestroyed
and some CSS*Value classes, make their constructors public in MSVC builds.
Added FIXME's to make it look extra gross.
* css/CSSInheritedValue.h:
(WebCore::CSSInheritedValue::create): Deleted.
* css/CSSInitialValue.h:
* css/CSSPrimitiveValue.h:
* css/CSSRevertValue.h:
(WebCore::CSSRevertValue::create): Deleted.
* css/CSSUnsetValue.h:
(WebCore::CSSUnsetValue::create): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2016-01-11 Andreas Kling <akling@apple.com>
CSSValuePool should use nonfragmented storage for eternal caches.
<https://webkit.org/b/152960>
Reviewed by Antti Koivisto.
Store all of the common cached CSS value objects in contiguous arrays
instead of lazily allocating them on the heap.
This reduces heap fragmentation (win) and removes indirection (win)
* css/CSSInheritedValue.h:
* css/CSSInitialValue.h:
* css/CSSPrimitiveValue.h:
* css/CSSRevertValue.h:
* css/CSSUnsetValue.h:
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::createIdentifierValue):
(WebCore::CSSValuePool::createColorValue):
(WebCore::CSSValuePool::createValue):
(WebCore::CSSValuePool::drain): Deleted.
* css/CSSValuePool.h:
(WebCore::CSSValuePool::createInheritedValue):
(WebCore::CSSValuePool::createImplicitInitialValue):
(WebCore::CSSValuePool::createExplicitInitialValue):
(WebCore::CSSValuePool::createUnsetValue):
(WebCore::CSSValuePool::createRevertValue):
2016-01-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Cleanup RenderThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=152888
Reviewed by Michael Catanzaro.
Use a common path for GTK+ 3.19 and previous versions, simplifying
the code and removing a lot of ifdefs.
- createStyleContext() now receives a theme part enum value, and
an optional parent GtkStyleContext. It encapsulates all the
differences between GTK+ 3.19 and previous version leaving the
rendering code common and free of ifdefs.
- Stock icons support have been removed, simplifying the code
that now always renders symbolic icons, updating the colors
depending on the current state.
- Media button and colors have been removed, because they are
unused now that we render the media controls with CSS.
- ComboBox separators support has also been removed. In GTK+ 3.19
combo boxes no longer have separators and most of the GTK+
themes don't use the either, so it's better to simple not render
them anymore in WebKit either.
- Code to paint caps lock indicator has been removed too, since
caps lock indicator is now shadow dom and automatically
rendered by WebCore.
* rendering/RenderThemeGtk.cpp:
(WebCore::createStyleContext):
(WebCore::loadThemedIcon):
(WebCore::gtkIconStateFlags):
(WebCore::RenderThemeGtk::adjustRepaintRect):
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::setCheckboxSize):
(WebCore::RenderThemeGtk::paintCheckbox):
(WebCore::RenderThemeGtk::setRadioSize):
(WebCore::RenderThemeGtk::paintRadio):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::popupInternalPaddingLeft):
(WebCore::RenderThemeGtk::popupInternalPaddingRight):
(WebCore::RenderThemeGtk::popupInternalPaddingTop):
(WebCore::RenderThemeGtk::popupInternalPaddingBottom):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::adjustSearchFieldIconStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::paintIcon):
(WebCore::paintEntryIcon):
(WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
(WebCore::RenderThemeGtk::shouldHaveCapsLockIndicator):
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
(WebCore::paintSpinArrowButton):
(WebCore::RenderThemeGtk::paintInnerSpinButton):
(WebCore::styleColor):
(WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::systemColor):
(WebCore::RenderThemeGtk::paintMediaButton):
(WebCore::RenderThemeGtk::paintMediaFullscreenButton):
(WebCore::RenderThemeGtk::paintMediaMuteButton):
(WebCore::RenderThemeGtk::paintMediaPlayButton):
(WebCore::RenderThemeGtk::paintMediaSeekBackButton):
(WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
(WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
* rendering/RenderThemeGtk.h:
2016-01-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Cleanup ScrollbarThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=152830
Reviewed by Michael Catanzaro.
Use a common path for GTK+ 3.19 and previous versions, simplifying
the code and removing a lot of ifdefs. Use always a new
GtkStyleContext, but when painting cache the newly created one so
all paint methods use that one. We were also caching some theme
properties assuming they don't change unless the theme changes,
but some of them can have different values depending on the state,
for example, when hovered or pressed. Those properties are now
only cached when we create a new GtkStyleContext.
The method updateScrollbarsFrameThickness() has also been removed,
since the Scrollbar constructor already initializes the frame rect
using the scrollbarThickness(). This method was not doing anything
anyway, since that was called on the constructor of the theme,
when there were no scrollbars registered. This also means we no
longer need to track registered/unregistered scrollbars.
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::backButtonRect): Use the cached
GtkStyleContext and properties or create a new.
(WebCore::ScrollbarThemeGtk::forwardButtonRect): Ditto.
(WebCore::ScrollbarThemeGtk::trackRect): Ditto.
(WebCore::orientationStyleClass):
(WebCore::ScrollbarThemeGtk::getOrCreateStyleContext): Create a
new GtkStyleContext for the scrollbar if there isn't a cached
one. Also initialize the properties that depend on the state.
(WebCore::createChildStyleContext): Create a new GtkStyleContext
from a parent one.
(WebCore::ScrollbarThemeGtk::updateThemeProperties): Get the
properties that can only change when the theme changes.
(WebCore::ScrollbarThemeGtk::thumbRect): Use the cached
GtkStyleContext and properties or create a new.
(WebCore::adjustRectAccordingToMargin): Use always the
GtkStyleContext state instead of receiving it and setting it again.
(WebCore::ScrollbarThemeGtk::paintTrackBackground): Get or create
a GtkStyleContext for the scrollbar and create a child one for the trough.
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Use the
cached GtkStyleContext or create a new one.
(WebCore::ScrollbarThemeGtk::paintThumb): Get or create a
GtkStyleContext for the scrollbar and create a child ones for
trough and slider.
(WebCore::ScrollbarThemeGtk::paintButton): Get or create a
GtkStyleContext for the scrollbar and create a child one for the button.
(WebCore::ScrollbarThemeGtk::paint): Create a GtkStyleContext and
cache it temporarily using TemporaryChange until the method finishes.
(WebCore::ScrollbarThemeGtk::scrollbarThickness): Use the cached
GtkStyleContext and properties or create a new.
(WebCore::ScrollbarThemeGtk::buttonSize): Ditto.
* platform/gtk/ScrollbarThemeGtk.h:
2016-01-10 Myles C. Maxfield <mmaxfield@apple.com>
[SVG -> OTF Converter] Parsing failures cause use of incomplete fonts
https://bugs.webkit.org/show_bug.cgi?id=152772
<rdar://problem/24043104>
Reviewed by Simon Fraser.
Originally, if we fail to parse a glyph, we would simply skip the glyph. However, this means that
we will create an incomplete font without all the necessary glyphs. This causes very distressing
text where all the occurances of a particular letter are missing. Instead, we should treat the
entire font as invalid.
Test: fast/text/svg-font-invalid-glyph-path-failure.html
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font):
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::ensureCustomFontData):
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::error):
(WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
(WebCore::SVGToOTFFontConverter::processGlyphElement):
(WebCore::convertSVGToOTFFont):
* svg/SVGToOTFFontConversion.h:
2016-01-10 Andreas Kling <akling@apple.com>
Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL cont'd
<https://webkit.org/b/152902>
Reviewed by Andy Estes.
Convert some more of the remaining clients to use NeverDestroyed.
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::textTrackCueContainerShadowPseudoId):
(WebCore::VTTRegion::textTrackRegionShadowPseudoId):
* svg/properties/SVGAnimatedPropertyMacros.h:
2016-01-09 Simon Fraser <simon.fraser@apple.com>
Hook up display-list drawing in GraphicsLayerCA
https://bugs.webkit.org/show_bug.cgi?id=152946
Reviewed by Zalan Bujtas.
Have GraphicsLayerCA hold a DisplayList. If enabled, do a display-list record
in GraphicsLayerCA::recursiveCommitChanges(), and a playback in GraphicsLayerCA::platformCALayerPaintContents().
GraphicsLayerCA needs to maintain a m_hasEverPainted flag to know to do a full record
at first paint (when there are no dirty rects).
Plumb 'isUsingDisplayListDrawing' through to TileGrid via PlatformCALayer{Client}
so that we can decorate the tile paint counters with an outline.
Have RenderLayerCompositor push the displayListDrawingEnabled state down through
RenderLayerBackings to GraphicsLayers.
Convert RenderLayerCompositor to use initializers.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::usesDisplayListDrawing):
(WebCore::GraphicsLayer::setUsesDisplayListDrawing):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::setUsesDisplayListDrawing):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::platformCALayerPaintContents):
(WebCore::GraphicsLayerCA::updateDrawsContent):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::drawRepaintIndicator):
* platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::isUsingDisplayListDrawing):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::platformCALayerShowRepaintCounter):
(WebCore::TileGrid::isUsingDisplayListDrawing):
* platform/graphics/ca/TileGrid.h:
* platform/graphics/displaylists/DisplayList.h: Sadly need to include DisplayListItems.h
to get things to compile. I wasn't able to avoid this even when making functions non-inline.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
* rendering/RenderLayerCompositor.h:
2016-01-09 Zalan Bujtas <zalan@apple.com>
REGRESSION (r194426): First email field is not autofilled on amazon.com
https://bugs.webkit.org/show_bug.cgi?id=152945
<rdar://problem/24082914>
Reviewed by Simon Fraser.
r194426 missed marking the m_layoutRoot for layout while converting to full layout (it only marked the new layout root).
Test: fast/forms/multiple-subtree-layout-failure.html
* page/FrameView.cpp:
(WebCore::FrameView::scheduleRelayoutOfSubtree):
2016-01-09 Dan Bernstein <mitz@apple.com>
[Cocoa] Allow overriding the frameworks directory independently of using a staging install path
https://bugs.webkit.org/show_bug.cgi?id=152926
Reviewed by Tim Horton.
Introduce a new build setting, WK_OVERRIDE_FRAMEWORKS_DIR. When not empty, it determines
where the frameworks are installed. Setting USE_STAGING_INSTALL_PATH to YES sets
WK_OVERRIDE_FRAMEWORKS_DIR to $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari.
Account for the possibility of WK_OVERRIDE_FRAMEWORKS_DIR containing spaces.
* Configurations/WebCore.xcconfig:
- Replace STAGED_FRAMEWORKS_SEARCH_PATH in FRAMEWORK_SEARCH_PATHS with
WK_OVERRIDE_FRAMEWORKS_DIR and add quotes to account for spaces.
- Define WEBCORE_FRAMEWORKS_DIR and PRODUCTION_FRAMEWORKS_DIR based on
WK_OVERRIDE_FRAMEWORKS_DIR.
* WebCore.xcodeproj/project.pbxproj: Work around make’s inability to handle spaces in paths
by creating a symlink to JAVASCRIPTCORE_PRIVATE_HEADERS_DIR under BUILT_PRODUCTS_DIR and
using the symlink as the value of JavaScriptCore_SCRIPTS_DIR.
2016-01-09 Andreas Kling <akling@apple.com>
Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
<https://webkit.org/b/152902>
Reviewed by Anders Carlsson.
Mostly mechanical conversion to NeverDestroyed throughout WebCore.
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
(WebCore::stringForPlaybackTargetAvailability):
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::directionNext):
(WebCore::IDBCursor::directionNextUnique):
(WebCore::IDBCursor::directionPrev):
(WebCore::IDBCursor::directionPrevUnique):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::modeReadOnly):
(WebCore::IDBTransaction::modeReadWrite):
(WebCore::IDBTransaction::modeVersionChange):
(WebCore::IDBTransaction::modeReadOnlyLegacy):
(WebCore::IDBTransaction::modeReadWriteLegacy):
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::readyState):
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::automaticKeyword):
(WebCore::MediaControlsHost::forcedOnlyKeyword):
(WebCore::MediaControlsHost::alwaysOnKeyword):
(WebCore::MediaControlsHost::externalDeviceType):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::openKeyword):
(WebCore::MediaSource::closedKeyword):
(WebCore::MediaSource::endedKeyword):
(WebCore::MediaSource::streamEndedWithError):
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::quickTimePluginReplacementScript):
(WebCore::QuickTimePluginReplacement::supportsMimeType):
(WebCore::QuickTimePluginReplacement::supportsFileExtension):
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::boundaryEventOccurred):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::cssPropertyIDForJSCSSPropertyName):
* bridge/c/c_instance.cpp:
(JSC::Bindings::globalExceptionString):
* css/MediaList.cpp:
(WebCore::addResolutionWarningMessageToConsole):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
* dom/ChildListMutationScope.cpp:
(WebCore::accumulatorMap):
* dom/DOMImplementation.cpp:
(WebCore::isSupportedSVG10Feature):
(WebCore::isSupportedSVG11Feature):
* dom/Document.cpp:
(WebCore::Document::readyState):
* dom/Element.cpp:
(WebCore::Element::webkitRegionOverset):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::isValidCSSContentType):
* dom/MutationObserver.cpp:
(WebCore::activeMutationObservers):
(WebCore::suspendedMutationObservers):
* dom/MutationRecord.cpp:
* dom/PseudoElement.cpp:
(WebCore::pseudoElementTagName):
(WebCore::PseudoElement::pseudoElementNameForEvents):
* dom/QualifiedName.cpp:
(WebCore::qualifiedNameCache):
(WebCore::nullQName):
* dom/ScriptElement.cpp:
(WebCore::isLegacySupportedJavaScriptLanguage):
(WebCore::ScriptElement::notifyFinished):
* editing/ApplyStyleCommand.cpp:
(WebCore::styleSpanClassString):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::shouldAddNamespaceElement):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::isInterchangeNewlineNode):
(WebCore::isInterchangeConvertedSpaceSpan):
* editing/htmlediting.cpp:
(WebCore::nonBreakingSpaceString):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::styleNodeCloseTag):
(WebCore::createMarkupInternal):
* fileapi/Blob.cpp:
(WebCore::BlobURLRegistry::registry):
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree):
* html/DateInputType.cpp:
(WebCore::DateInputType::createStepRange):
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::createStepRange):
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::createStepRange):
* html/EmailInputType.cpp:
(WebCore::isValidEmailAddress):
* html/FormController.cpp:
(WebCore::FormKeyGenerator::formKey):
(WebCore::formStateSignature):
* html/HTMLAnchorElement.cpp:
(WebCore::rootEditableElementMap):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::formControlType):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::formControlType):
* html/HTMLFrameOwnerElement.h:
(WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::formControlType):
* html/HTMLLinkElement.cpp:
(WebCore::linkLoadEventSender):
* html/HTMLMediaElement.cpp:
(WebCore::documentToElementSetMap):
* html/HTMLObjectElement.cpp:
(WebCore::isRecognizedTagName):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::formControlType):
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::formControlType):
* html/HTMLPlugInElement.cpp:
(WebCore::registeredPluginReplacements):
* html/HTMLPlugInImageElement.cpp:
(WebCore::titleText):
(WebCore::subtitleText):
(WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::formControlType):
* html/HTMLStyleElement.cpp:
(WebCore::styleLoadEventSender):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::formControlType):
* html/HTMLTextFormControlElement.cpp:
(WebCore::directionString):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::appendFormData):
* html/InputTypeNames.cpp:
(WebCore::InputTypeNames::button):
(WebCore::InputTypeNames::checkbox):
(WebCore::InputTypeNames::color):
(WebCore::InputTypeNames::date):
(WebCore::InputTypeNames::datetime):
(WebCore::InputTypeNames::datetimelocal):
(WebCore::InputTypeNames::email):
(WebCore::InputTypeNames::file):
(WebCore::InputTypeNames::hidden):
(WebCore::InputTypeNames::image):
(WebCore::InputTypeNames::month):
(WebCore::InputTypeNames::number):
(WebCore::InputTypeNames::password):
(WebCore::InputTypeNames::radio):
(WebCore::InputTypeNames::range):
(WebCore::InputTypeNames::reset):
(WebCore::InputTypeNames::search):
(WebCore::InputTypeNames::submit):
(WebCore::InputTypeNames::telephone):
(WebCore::InputTypeNames::text):
(WebCore::InputTypeNames::time):
(WebCore::InputTypeNames::url):
(WebCore::InputTypeNames::week):
* html/MediaController.cpp:
(playbackStateWaiting):
(playbackStatePlaying):
(playbackStateEnded):
* html/MonthInputType.cpp:
(WebCore::MonthInputType::createStepRange):
* html/NumberInputType.cpp:
(WebCore::NumberInputType::createStepRange):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::createStepRange):
* html/StepRange.cpp:
(WebCore::StepRange::acceptableError):
(WebCore::StepRange::alignValueForStep):
(WebCore::StepRange::stepMismatch):
* html/TimeInputType.cpp:
(WebCore::TimeInputType::createStepRange):
* html/WeekInputType.cpp:
(WebCore::WeekInputType::createStepRange):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::getImageData):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
(WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId):
(WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId):
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterInnerElement::MeterInnerElement):
(WebCore::MeterValueElement::valuePseudoId):
* html/shadow/MeterShadowElement.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::sliderThumbShadowPseudoId):
(WebCore::mediaSliderThumbShadowPseudoId):
(WebCore::SliderContainerElement::shadowPseudoId):
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::alternativeKeyword):
(WebCore::AudioTrack::descriptionKeyword):
(WebCore::AudioTrack::mainKeyword):
(WebCore::AudioTrack::mainDescKeyword):
(WebCore::AudioTrack::translationKeyword):
(WebCore::AudioTrack::commentaryKeyword):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::subtitlesKeyword):
(WebCore::TextTrack::captionsKeyword):
(WebCore::TextTrack::descriptionsKeyword):
(WebCore::TextTrack::chaptersKeyword):
(WebCore::TextTrack::metadataKeyword):
(WebCore::TextTrack::forcedKeyword):
(WebCore::TextTrack::disabledKeyword):
(WebCore::TextTrack::hiddenKeyword):
(WebCore::TextTrack::showingKeyword):
* html/track/TextTrackCue.h:
(WebCore::TextTrackCue::cueShadowPseudoId):
* html/track/VTTCue.cpp:
(WebCore::startKeyword):
(WebCore::middleKeyword):
(WebCore::endKeyword):
(WebCore::leftKeyword):
(WebCore::rightKeyword):
(WebCore::verticalGrowingLeftKeyword):
(WebCore::verticalGrowingRightKeyword):
(WebCore::VTTCueBox::vttCueBoxShadowPseudoId):
(WebCore::VTTCue::cueBackdropShadowPseudoId):
(WebCore::VTTCue::determineTextDirection):
(WebCore::VTTCue::markFutureAndPastNodes):
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::scroll):
(WebCore::VTTRegion::setScroll):
(WebCore::VTTRegion::parseSettingValue):
(WebCore::VTTRegion::textTrackCueContainerScrollingClass):
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::alternativeKeyword):
(WebCore::VideoTrack::captionsKeyword):
(WebCore::VideoTrack::mainKeyword):
(WebCore::VideoTrack::signKeyword):
(WebCore::VideoTrack::subtitlesKeyword):
(WebCore::VideoTrack::commentaryKeyword):
* html/track/WebVTTElement.cpp:
(WebCore::nodeTypeToTagName):
* html/track/WebVTTElement.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::collectMetadataHeader):
* inspector/InspectorCSSAgent.cpp:
(WebCore::computePseudoClassMask):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::sourceMapURLForResource):
* inspector/InspectorStyleSheet.cpp:
(WebCore::selectorsFromSource):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::sourceMapURLForScript):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::notifyFinished):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::corsPolicyPreventedLoad):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::initiatorName):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::defaultDatabaseFilename):
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS):
(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::allowJavaScriptURLs):
(WebCore::CSPDirectiveList::allowInlineEventHandlers):
(WebCore::CSPDirectiveList::allowInlineScript):
(WebCore::CSPDirectiveList::allowInlineStyle):
(WebCore::CSPDirectiveList::allowEval):
(WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
* page/DOMWindow.cpp:
(WebCore::windowsWithUnloadEventListeners):
(WebCore::windowsWithBeforeUnloadEventListeners):
* page/EventHandler.cpp:
(WebCore::EventHandler::dragState):
(WebCore::focusDirectionForKey):
* page/Frame.cpp:
(WebCore::createRegExpForLabels):
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform):
* page/PageVisibilityState.cpp:
(WebCore::pageVisibilityStateString):
* page/SecurityPolicy.cpp:
(WebCore::originAccessMap):
* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::parse):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::shadowForBlending):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateKeyframeAnimations):
* platform/Cursor.cpp:
(WebCore::pointerCursor):
(WebCore::crossCursor):
(WebCore::handCursor):
(WebCore::moveCursor):
(WebCore::verticalTextCursor):
(WebCore::cellCursor):
(WebCore::contextMenuCursor):
(WebCore::aliasCursor):
(WebCore::zoomInCursor):
(WebCore::zoomOutCursor):
(WebCore::copyCursor):
(WebCore::noneCursor):
(WebCore::progressCursor):
(WebCore::noDropCursor):
(WebCore::notAllowedCursor):
(WebCore::iBeamCursor):
(WebCore::waitCursor):
(WebCore::helpCursor):
(WebCore::eastResizeCursor):
(WebCore::northResizeCursor):
(WebCore::northEastResizeCursor):
(WebCore::northWestResizeCursor):
(WebCore::southResizeCursor):
(WebCore::southEastResizeCursor):
(WebCore::southWestResizeCursor):
(WebCore::westResizeCursor):
(WebCore::northSouthResizeCursor):
(WebCore::eastWestResizeCursor):
(WebCore::northEastSouthWestResizeCursor):
(WebCore::northWestSouthEastResizeCursor):
(WebCore::columnResizeCursor):
(WebCore::rowResizeCursor):
(WebCore::middlePanningCursor):
(WebCore::eastPanningCursor):
(WebCore::northPanningCursor):
(WebCore::northEastPanningCursor):
(WebCore::northWestPanningCursor):
(WebCore::southPanningCursor):
(WebCore::southEastPanningCursor):
(WebCore::southWestPanningCursor):
(WebCore::westPanningCursor):
(WebCore::grabCursor):
(WebCore::grabbingCursor):
* platform/Language.cpp:
(WebCore::preferredLanguagesOverride):
* platform/LocalizedStrings.cpp:
(WebCore::truncatedStringForLookupMenuItem):
* platform/MIMETypeRegistry.cpp:
(WebCore::mediaMIMETypeMap):
(WebCore::defaultMIMEType):
* platform/SchemeRegistry.cpp:
(WebCore::localURLSchemes):
(WebCore::displayIsolatedURLSchemes):
(WebCore::secureSchemes):
(WebCore::schemesWithUniqueOrigins):
(WebCore::emptyDocumentSchemes):
(WebCore::schemesForbiddenFromDomainRelaxation):
(WebCore::canDisplayOnlyIfCanRequestSchemes):
(WebCore::notAllowingJavascriptURLsSchemes):
(WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing):
(WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing):
(WebCore::CORSEnabledSchemes):
(WebCore::ContentSecurityPolicyBypassingSchemes):
* platform/ScrollbarTheme.cpp:
(WebCore::ScrollbarTheme::theme):
* platform/URL.cpp:
(WebCore::blankURL):
* platform/animation/Animation.cpp:
(WebCore::Animation::initialName):
* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::sharedSession):
* platform/audio/AudioSession.h:
* platform/audio/HRTFElevation.cpp:
(WebCore::getConcatenatedImpulseResponsesForSubject):
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::audioDestinations):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::repaintRectMap):
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::transformColorSpace):
* platform/graphics/MediaPlayer.cpp:
(WebCore::applicationOctetStream):
(WebCore::textPlain):
(WebCore::codecs):
* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::singleton):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::playerToPrivateMap):
* platform/graphics/filters/SourceAlpha.cpp:
(WebCore::SourceAlpha::effectName):
* platform/graphics/filters/SourceGraphic.cpp:
(WebCore::SourceGraphic::effectName):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::mimeCommonTypesCache):
(WebCore::mimeModernTypesCache):
* platform/ios/CursorIOS.cpp:
(WebCore::cursor):
* platform/ios/TileControllerMemoryHandlerIOS.cpp:
(WebCore::tileControllerMemoryHandler):
* platform/ios/WebCoreMotionManager.mm:
(+[WebCoreMotionManager sharedManager]):
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::updateForEventName):
* platform/ios/wak/WKContentObservation.cpp:
(WebThreadGetObservedContentModifiers):
* platform/mac/DragImageMac.mm:
(WebCore::fontFromNSFont):
* platform/mac/ThemeMac.mm:
(WebCore::platformTheme):
* platform/mac/ThreadCheck.mm:
(WebCoreReportThreadViolation):
* platform/mediastream/mac/AVCaptureDeviceManager.h:
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureDeviceManager::singleton):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenter::platformCenter):
* platform/mock/mediasource/MockBox.cpp:
(WebCore::MockTrackBox::type):
(WebCore::MockInitializationBox::type):
(WebCore::MockSampleBox::type):
* platform/network/HTTPParsers.cpp:
(WebCore::parseXSSProtectionHeader):
* platform/network/ResourceHandle.cpp:
(WebCore::builtinResourceHandleConstructorMap):
(WebCore::builtinResourceHandleSynchronousLoaderMap):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::allowsAnyHTTPSCertificateHosts):
(WebCore::clientCerts):
* platform/text/AtomicStringKeyedMRUCache.h:
(WebCore::AtomicStringKeyedMRUCache::get):
* platform/text/cf/HyphenationCF.cpp:
(WebCore::cfLocaleCache):
* rendering/RenderBlock.cpp:
(WebCore::continuationOutlineTable):
* rendering/RenderCounter.cpp:
(WebCore::counterMaps):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::drawPlatformResizerImage):
* rendering/RenderScrollbarTheme.cpp:
(WebCore::RenderScrollbarTheme::renderScrollbarTheme):
* rendering/RenderTheme.cpp:
(WebCore::customFocusRingColor):
* rendering/RenderWidget.cpp:
(WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
* rendering/shapes/ShapeOutsideInfo.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::hyphenString):
(WebCore::RenderStyle::textEmphasisMarkString):
(WebCore::RenderStyle::initialDashboardRegions):
(WebCore::RenderStyle::noneDashboardRegions):
* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::zeroLengthLinecapPath):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::nonScalingStrokePath):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::currentContentTransformation):
* rendering/svg/SVGResources.cpp:
(WebCore::clipperFilterMaskerTags):
(WebCore::markerTags):
(WebCore::fillAndStrokeTags):
(WebCore::chainableResourceTags):
* svg/SVGAngle.cpp:
(WebCore::SVGAngle::valueAsString):
* svg/SVGAnimateColorElement.cpp:
(WebCore::attributeValueIsCurrentColor):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::rotateMode):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::setCalcMode):
(WebCore::SVGAnimationElement::setAttributeType):
(WebCore::SVGAnimationElement::isAdditive):
(WebCore::SVGAnimationElement::isAccumulated):
(WebCore::inheritsFromProperty):
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier):
(WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier):
(WebCore::SVGFEConvolveMatrixElement::orderXIdentifier):
(WebCore::SVGFEConvolveMatrixElement::orderYIdentifier):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier):
(WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
(WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::stdDeviationXIdentifier):
(WebCore::SVGFEGaussianBlurElement::stdDeviationYIdentifier):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::radiusXIdentifier):
(WebCore::SVGFEMorphologyElement::radiusYIdentifier):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::kernelUnitLengthXIdentifier):
(WebCore::SVGFESpecularLightingElement::kernelUnitLengthYIdentifier):
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::baseFrequencyXIdentifier):
(WebCore::SVGFETurbulenceElement::baseFrequencyYIdentifier):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::filterResXIdentifier):
(WebCore::SVGFilterElement::filterResYIdentifier):
* svg/SVGGlyphMap.h:
(WebCore::SVGGlyphMap::svgGlyphForGlyph):
* svg/SVGLangSpace.cpp:
(WebCore::SVGLangSpace::xmlspace):
(WebCore::SVGLangSpace::addSupportedAttributes):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientTypeIdentifier):
(WebCore::SVGMarkerElement::orientAngleIdentifier):
(WebCore::SVGMarkerElement::synchronizeOrientType):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::type):
(WebCore::SVGStyleElement::media):
* svg/SVGTransform.cpp:
(WebCore::SVGTransform::transformTypePrefixForParsing):
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::viewBoxIdentifier):
(WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
(WebCore::SVGViewSpec::transformIdentifier):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::parseClockValue):
(WebCore::SVGSMILElement::isSupportedAttribute):
(WebCore::SVGSMILElement::restart):
(WebCore::SVGSMILElement::fill):
(WebCore::SVGSMILElement::repeatCount):
(WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
2016-01-08 Zalan Bujtas <zalan@apple.com>
Absolute positioning -webkit-search-cancel-button crashes Safari.
https://bugs.webkit.org/show_bug.cgi?id=152847
<rdar://problem/24112087>
Reviewed by Simon Fraser.
Do not call offsetFromContainer while resolving the painting position for the search/cancel button renderer.
It skips the static positioned parent input renderer, when the search/cancel renderer is absolute positioned.
This patch also fixes a rendering glitch when the margin-right is > 0.
Test: fast/forms/absolute-positioned-custom-search-cancel-crash.html
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintSearchFieldCancelButton):
(WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
(WebCore::RenderTheme::paintSearchFieldResultsButton):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::convertToPaintingPosition):
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):
(WebCore::RenderThemeMac::convertToPaintingRect): Deleted.
2016-01-08 Simon Fraser <simon.fraser@apple.com>
Add display-list drawing hooks to platform-specific GraphicsContext files
https://bugs.webkit.org/show_bug.cgi?id=152940
Reviewed by Zalan Bujtas.
Call into the display list recorder for top-level entrypoints implemented in platform-specific
files.
The convention is that if a function begins with "platform", it's not a top-level
entry point, and should only be called when there's a platform context (i.e. not
recording, and not paintingDisabled).
A few instances are stubbed out until we have a more complete display list implementation.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawText):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::getCTM):
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::GraphicsContext::clipConvexPolygon):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipPath):
(WebCore::GraphicsContext::clipBounds):
(WebCore::GraphicsContext::drawLinesForText):
(WebCore::GraphicsContext::roundToDevicePixels):
(WebCore::GraphicsContext::translate):
(WebCore::GraphicsContext::setPlatformStrokeThickness):
(WebCore::GraphicsContext::setPlatformStrokeStyle):
(WebCore::GraphicsContext::concatCTM):
(WebCore::GraphicsContext::setCTM):
(WebCore::GraphicsContext::beginPlatformTransparencyLayer):
(WebCore::GraphicsContext::endPlatformTransparencyLayer):
(WebCore::GraphicsContext::clearRect):
(WebCore::GraphicsContext::strokeRect):
(WebCore::GraphicsContext::setLineCap):
(WebCore::GraphicsContext::setLineDash):
(WebCore::GraphicsContext::setLineJoin):
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::rotate):
(WebCore::GraphicsContext::scale):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
(WebCore::GraphicsContext::drawPattern):
(WebCore::GraphicsContext::setPlatformShouldAntialias):
(WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
(WebCore::GraphicsContext::isAcceleratedContext):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::drawPattern):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::GraphicsContext::clipConvexPolygon):
(WebCore::GraphicsContext::applyStrokePattern):
(WebCore::GraphicsContext::applyFillPattern):
(WebCore::GraphicsContext::drawPath):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::clipPath):
(WebCore::GraphicsContext::clipBounds):
(WebCore::GraphicsContext::beginPlatformTransparencyLayer):
(WebCore::GraphicsContext::endPlatformTransparencyLayer):
(WebCore::GraphicsContext::setPlatformShadow):
(WebCore::GraphicsContext::setMiterLimit):
(WebCore::GraphicsContext::clearRect):
(WebCore::GraphicsContext::strokeRect):
(WebCore::GraphicsContext::setLineCap):
(WebCore::GraphicsContext::setLineDash):
(WebCore::GraphicsContext::setLineJoin):
(WebCore::GraphicsContext::scale):
(WebCore::GraphicsContext::rotate):
(WebCore::GraphicsContext::translate):
(WebCore::GraphicsContext::concatCTM):
(WebCore::GraphicsContext::setCTM):
(WebCore::GraphicsContext::getCTM):
(WebCore::GraphicsContext::roundToDevicePixels):
(WebCore::GraphicsContext::drawLinesForText):
(WebCore::GraphicsContext::setURLForRect):
(WebCore::GraphicsContext::setIsCALayerContext):
(WebCore::GraphicsContext::isCALayerContext):
(WebCore::GraphicsContext::setIsAcceleratedContext):
(WebCore::GraphicsContext::isAcceleratedContext):
(WebCore::GraphicsContext::setPlatformTextDrawingMode):
(WebCore::GraphicsContext::setPlatformStrokeColor):
(WebCore::GraphicsContext::setPlatformStrokeThickness):
(WebCore::GraphicsContext::setPlatformFillColor):
(WebCore::GraphicsContext::setPlatformShouldAntialias):
(WebCore::GraphicsContext::setPlatformShouldSmoothFonts):
(WebCore::GraphicsContext::setPlatformAlpha):
(WebCore::GraphicsContext::setPlatformCompositeOperation):
(WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
(WebCore::GraphicsContext::platformFillEllipse):
(WebCore::GraphicsContext::platformStrokeEllipse):
2016-01-08 Simon Fraser <simon.fraser@apple.com>
Add DisplayList hooks into GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=152932
Reviewed by Zalan Bujtas.
Add the hooks into GraphicsContext that call into the DisplayListRecorder if there
is one.
Rename size() to something less ambiguous.
Out-of-line some DisplayList functions so that the header doesn't need to see
DisplayListItems.h.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::save):
(WebCore::GraphicsContext::restore):
(WebCore::GraphicsContext::setStrokeThickness):
(WebCore::GraphicsContext::setStrokeStyle):
(WebCore::GraphicsContext::setStrokeColor):
(WebCore::GraphicsContext::setShadow):
(WebCore::GraphicsContext::setLegacyShadow):
(WebCore::GraphicsContext::clearShadow):
(WebCore::GraphicsContext::setFillColor):
(WebCore::GraphicsContext::setShadowsIgnoreTransforms):
(WebCore::GraphicsContext::setShouldAntialias):
(WebCore::GraphicsContext::setShouldSmoothFonts):
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::setAntialiasedFontDilationEnabled):
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setFillRule):
(WebCore::GraphicsContext::setFillGradient):
(WebCore::GraphicsContext::beginTransparencyLayer):
(WebCore::GraphicsContext::endTransparencyLayer):
(WebCore::GraphicsContext::drawGlyphs):
(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawTiledImage):
(WebCore::GraphicsContext::setTextDrawingMode):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::setAlpha):
(WebCore::GraphicsContext::setCompositeOperation):
(WebCore::GraphicsContext::setDrawLuminanceMask):
(WebCore::GraphicsContext::applyDeviceScaleFactor):
(WebCore::GraphicsContext::applyState):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::setDisplayListRecorder):
(WebCore::GraphicsContext::isRecording):
(WebCore::GraphicsContext::setFillRule): Deleted.
(WebCore::GraphicsContext::setShadowsIgnoreTransforms): Deleted.
(WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts): Deleted.
(WebCore::GraphicsContext::setDrawLuminanceMask): Deleted.
* platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::clear):
(WebCore::DisplayList::DisplayList::removeItemsFromIndex):
* platform/graphics/displaylists/DisplayList.h:
(WebCore::DisplayList::DisplayList::itemCount):
(WebCore::DisplayList::DisplayList::clear): Deleted.
(WebCore::DisplayList::DisplayList::size): Deleted.
(WebCore::DisplayList::DisplayList::removeItemsFromIndex): Deleted.
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::save):
(WebCore::DisplayList::Recorder::restore):
* platform/graphics/displaylists/DisplayListRecorder.h:
(WebCore::DisplayList::Recorder::itemCount):
(WebCore::DisplayList::Recorder::size): Deleted.
* platform/graphics/displaylists/DisplayListReplayer.cpp:
(WebCore::DisplayList::Replayer::replay):
2016-01-08 Brady Eidson <beidson@apple.com>
Modern IDB: imported/w3c/indexeddb/keyorder.htm times out.
https://bugs.webkit.org/show_bug.cgi?id=152929
Reviewed by Alex Christensen.
No new tests (Existing test now runs in the test harness).
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::setGetResult):
2016-01-08 Simon Fraser <simon.fraser@apple.com>
Consider painting to be disabled on a GraphicsContext with no platform data, and make updatingControlTints() immutable state
https://bugs.webkit.org/show_bug.cgi?id=152927
Reviewed by Tim Horton.
GraphicsContext had setters for paintingDisabled and updatingControlTints, but neither
were changed dynamically.
We can eliminate paintingDisabled by simply considering a GraphicsContext that was
created with no platform context to be paint-disabled.
We make updatingControlTints immutable state by providing a constructor that takes
a "NonPaintingReasons" enum, and doesn't create platform data.
More functions in platform code were protected by if (paintingDisabled())...
* page/FrameView.cpp:
(WebCore::FrameView::paintControlTints):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::setUpdatingControlTints): Deleted.
(WebCore::GraphicsContext::clip): Deleted.
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::paintingDisabled):
(WebCore::GraphicsContext::updatingControlTints):
(WebCore::GraphicsContextState::GraphicsContextState): Deleted.
(WebCore::GraphicsContext::setPaintingDisabled): Deleted.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::platformInit):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::drawPattern):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::applyStrokePattern):
(WebCore::GraphicsContext::applyFillPattern):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipBounds):
(WebCore::GraphicsContext::setLineDash):
(WebCore::GraphicsContext::roundToDevicePixels):
(WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
(WebCore::GraphicsContext::setIsCALayerContext):
(WebCore::GraphicsContext::isCALayerContext):
(WebCore::GraphicsContext::setIsAcceleratedContext):
(WebCore::GraphicsContext::isAcceleratedContext):
(WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::GraphicsContext): Deleted.
* platform/graphics/win/GraphicsContextCairoWin.cpp:
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::GraphicsContext): Deleted.
2016-01-08 Anders Carlsson <andersca@apple.com>
InputType::findClosestTickMarkValue should return an Optional<Decimal>
https://bugs.webkit.org/show_bug.cgi?id=152931
Reviewed by Andreas Kling.
This will make it possible to get rid of the notion of infinity from Decimal, allowing for more code simplification.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::findClosestTickMarkValue):
* html/HTMLInputElement.h:
* html/InputType.cpp:
(WebCore::InputType::findClosestTickMarkValue):
* html/InputType.h:
* html/RangeInputType.cpp:
(WebCore::RangeInputType::findClosestTickMarkValue):
* html/RangeInputType.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
2016-01-08 Brady Eidson <beidson@apple.com>
Modern IDB: IDBBindingUtilities chokes on unicode strings for get/set.
https://bugs.webkit.org/show_bug.cgi?id=152921
Reviewed by Alex Christensen.
No new tests (Covered by existing tests).
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::get): Don't do a potentially lossy utf8() conversion on the string.
(WebCore::set): Ditto.
2016-01-08 Per Arne Vollan <peavo@outlook.com>
[WinCairo] Support more video formats.
https://bugs.webkit.org/show_bug.cgi?id=152890
Reviewed by Alex Christensen.
Use MediaFoundation api to detect all supported video/audio formats.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes):
(WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
2016-01-08 Brady Eidson <beidson@apple.com>
Modern IDB: Blocked event can fire on a delete request even after the last open connection has closed.
https://bugs.webkit.org/show_bug.cgi?id=152896
Reviewed by Alex Christensen.
No new tests (Progression in many tests).
* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::IDBFactory::deleteDatabase):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation): Allow for handling 2+ delete operations in a row.
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): Ditto.
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient): Call "notifyCurrentRequestConnectionClosedOrFiredVersionChangeEvent"
after the connection is actually removed from the set of open connections.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2016-01-08 Zalan Bujtas <zalan@apple.com>
Hovering link on http://help.apple.com/appletv/#/ does not show text underline.
https://bugs.webkit.org/show_bug.cgi?id=152906
<rdar://problem/23339617>
Reviewed by Simon Fraser.
GraphicsContext::computeLineBoundsAndAntialiasingModeForText() always integral ceils the origin y position to offset underline text.
This additional visual overflow offset is not taken into account by visualOverflowForDecorations().
Unfortunately we can't compute the exact same offset value while collecting repaint rects, because
computeLineBoundsAndAntialiasingModeForText() uses CTM scaling before adjusting the offset position.
Use 1px (css) bottom offset to cover this underling overflow.
Test: fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position.html
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
* rendering/SimpleLineLayoutResolver.cpp: Add visual overflow to simple line layout.
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::RunResolver):
* rendering/SimpleLineLayoutResolver.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::visualOverflowForDecorations):
2016-01-08 Brady Eidson <beidson@apple.com>
Modern IDB: imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order.htm fails.
https://bugs.webkit.org/show_bug.cgi?id=152891
Reviewed by Alex Christensen.
No new tests (At least two failing tests now pass).
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent): Whenever we add the IDBTransaction as an event target,
also add the IDBDatabase.
2016-01-07 Antti Koivisto <antti@apple.com>
Enable selector filtering for shadow trees
https://bugs.webkit.org/show_bug.cgi?id=152831
Reviewed by Simon Fraser.
Selector filtering doesn't currently work in shadow trees making style resolve for them slow.
This is because SelectorFilter is not in "consistent" state.
This patch moves SelectorFilter ownership from StyleResolver to TreeResolver and guarantees
it is always upadated consistently. It eliminates a bunch of now unnecessary consistency checks
and special cases.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ElementRuleCollector):
Assert for consistency instead of testing for it.
(WebCore::ElementRuleCollector::matchedResult):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
Selector filter can now be used if it exists.
* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::ElementRuleCollector): Deleted.
* css/RuleSet.cpp:
(WebCore::RuleSet::addRule):
Disable selector filtering for custom shadow pseudo rules. They are resolved by shadow DOM resolver
but may contain components matching the normal DOM.
* css/RuleSet.h:
(WebCore::RuleData::descendantSelectorIdentifierHashes):
(WebCore::RuleData::disableSelectorFiltering):
(WebCore::RuleData::compilationStatus):
(WebCore::RuleData::compiledSelectorCodeRef):
* css/SelectorFilter.cpp:
(WebCore::collectElementIdentifierHashes):
(WebCore::SelectorFilter::parentStackIsConsistent):
New consistency conditions. This is now used for asserts only.
(WebCore::SelectorFilter::pushParentStackFrame):
(WebCore::SelectorFilter::popParentStackFrame):
Selector filter only filters the current tree context, replace parentOrShadowHostElement with parentElement.
(WebCore::SelectorFilter::setupParentStack): Deleted.
No longer needed.
(WebCore::SelectorFilter::pushParent):
Remove consistency check. These cases no longer happen.
* css/SelectorFilter.h:
(WebCore::SelectorFilter::popParent):
(WebCore::SelectorFilter::parentStackIsEmpty):
(WebCore::SelectorFilter::fastRejectSelector):
(WebCore::SelectorFilter::parentStackIsConsistent): Deleted.
* css/StyleInvalidationAnalysis.cpp:
(WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
(WebCore::StyleInvalidationAnalysis::invalidateStyle):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::appendAuthorStyleSheets):
(WebCore::StyleResolver::addKeyframeStyle):
(WebCore::StyleResolver::initElement):
(WebCore::StyleResolver::State::initForStyleResolve):
We no longer owner the selector filter. Move it to State.
(WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
(WebCore::isAtShadowBoundary):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
(WebCore::StyleResolver::pushParentElement): Deleted.
(WebCore::StyleResolver::popParentElement): Deleted.
No need for this logic.
* css/StyleResolver.h:
(WebCore::StyleResolver::ruleSets):
(WebCore::StyleResolver::mediaQueryEvaluator):
(WebCore::StyleResolver::State::document):
(WebCore::StyleResolver::State::setAuthorRollback):
(WebCore::StyleResolver::State::setUserRollback):
(WebCore::StyleResolver::State::selectorFilter):
(WebCore::StyleResolver::state):
(WebCore::checkRegionSelector):
(WebCore::StyleResolver::selectorFilter): Deleted.
(WebCore::StyleResolverParentPusher::StyleResolverParentPusher): Deleted.
(WebCore::StyleResolverParentPusher::push): Deleted.
(WebCore::StyleResolverParentPusher::~StyleResolverParentPusher): Deleted.
* style/StyleTreeResolver.cpp:
This now owns the selector filter for a tree context.
(WebCore::Style::SelectorFilterPusher::SelectorFilterPusher):
(WebCore::Style::SelectorFilterPusher::push):
(WebCore::Style::SelectorFilterPusher::~SelectorFilterPusher):
(WebCore::Style::TreeResolver::TreeResolver):
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees):
(WebCore::Style::TreeResolver::createRenderTreeRecursively):
(WebCore::Style::TreeResolver::resolveChildren):
(WebCore::Style::TreeResolver::resolveRecursively):
Push the filter in a few more places to keep it consistent in shadow trees.
* style/StyleTreeResolver.h:
2016-01-07 Zalan Bujtas <zalan@apple.com>
Move computeLineBoundsForText from GraphicsContext* to GraphicsContext.
https://bugs.webkit.org/show_bug.cgi?id=152882
Reviewed by Simon Fraser.
There is nothing platform specific about it.
No change in functionality.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::computeUnderlineBoundsForText): Rename to reflect its usage.
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText): Deleted.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLinesForText):
(WebCore::GraphicsContext::computeLineBoundsForText): Deleted.
* rendering/TextDecorationPainter.cpp:
(WebCore::drawSkipInkUnderline):
2016-01-07 Brady Eidson <beidson@apple.com>
Modern IDB: Success-after-open event should only have the IDBOpenDBRequest as its target.
https://bugs.webkit.org/show_bug.cgi?id=152875
Reviewed by Alex Christensen.
No new tests (At least 2 failing tests now pass).
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent): Only add the transaction and database as potential
targets for this event if it is *not* the success-after-open event.
* Modules/indexeddb/client/IDBRequestImpl.h:
2016-01-07 Brent Fulgham <bfulgham@apple.com>
Correct missing EXT_sRGB Format Handling
https://bugs.webkit.org/show_bug.cgi?id=152876
<rdar://problem/23284389>
Reviewed by Alex Christensen.
Tested by WebGL 1.0.4 suite.
* platform/graphics/GraphicsContext3D.cpp:
(getDataFormat): Handle missing SRGB and SRGB_ALPHA cases.
* platform/graphics/GraphicsContext3D.h: Add missing SRGB_ALPHA value from the Khronos standard.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::texImage2D): Add an assertion that we are not being handed
an internal format to a method that works with normal formats.
2016-01-07 Simon Fraser <simon.fraser@apple.com>
Use an appropriate buffer format for swipe snapshots
https://bugs.webkit.org/show_bug.cgi?id=152880
rdar://problem/23728299
Reviewed by Tim Horton.
Choose an appropriate buffer format for swipe snapshots, and avoid converting
them to YUV422.
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::allowConversionFromFormatToFormat):
2016-01-07 Jer Noble <jer.noble@apple.com>
[EME] Secure stop information not written to disk
https://bugs.webkit.org/show_bug.cgi?id=152855
Reviewed by Eric Carlson.
Two separate bugs for the two APIs provided by AVFoundation. For the AVStreamSession path,
we were not calling the lazy-creation function which creates the AVStreamSession, and were
rather accessing the ivar directly. For the AVContentKeySession, we were not creating the
intermediate paths containing the secure stop database.
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
(WebCore::CDMSessionAVContentKeySession::contentKeySession):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
2016-01-07 Zalan Bujtas <zalan@apple.com>
Use wavy offset for decoration painting when line style is TextDecorationStyleWavy.
https://bugs.webkit.org/show_bug.cgi?id=152856
Reviewed by Simon Fraser.
No change in functionality.
* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintTextDecoration):
2016-01-07 Brady Eidson <beidson@apple.com>
Modern IDB: Various imported/w3c/indexeddb tests fail due to expecting the wrong exception.
https://bugs.webkit.org/show_bug.cgi?id=152866
Reviewed by Alex Christensen.
No new tests (5 skipped tests now pass).
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::putOrAdd): Reorder the exceptions, violating the spec but matching
a vast majority of browsers.
(WebCore::IDBClient::IDBObjectStore::deleteFunction): Ditto.
(WebCore::IDBClient::IDBObjectStore::clear): Ditto.
(WebCore::IDBClient::IDBObjectStore::doCount): Ditto.
2016-01-07 Zalan Bujtas <zalan@apple.com>
Remove unused shouldAntialias parameter from GraphicsContext::computeLineBoundsAndAntialiasingModeForText()
https://bugs.webkit.org/show_bug.cgi?id=152859
Reviewed by Simon Fraser.
No change in functionality.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText):
(WebCore::GraphicsContext::drawLinesForText):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::computeLineBoundsForText):
(WebCore::GraphicsContext::drawLinesForText):
2016-01-07 Brady Eidson <beidson@apple.com>
Modern IDB: imported/w3c/indexeddb/idbcursor-continue.htm fails.
https://bugs.webkit.org/show_bug.cgi?id=152849
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::iterate): Don't allow returning an iterator outside of
the cursor's assigned range.
2016-01-07 Zalan Bujtas <zalan@apple.com>
Incorrect position: fixed; rendering when child of position:relative/sticky.
https://bugs.webkit.org/show_bug.cgi?id=147284
Reviewed by Simon Fraser and David Hyatt.
Computing logical left for positioned objects should take the relative positioned ancestors' offset
into account.
Tests: fast/block/positioning/fixed-container-with-relative-parent.html
fast/block/positioning/fixed-container-with-sticky-parent.html
* rendering/RenderBox.cpp:
(WebCore::computeInlineStaticDistance):
2016-01-06 Simon Fraser <simon.fraser@apple.com>
Initial implementation files for display-list recording and playback
https://bugs.webkit.org/show_bug.cgi?id=152816
Reviewed by Zalan Bujtas.
Add files for:
- DisplayList, a class that holds a vector of display items, and in the future will hold metadata
on the list for optimizations etc.
- DisplayList::Recorder, the outward-facing recording API which GraphicsContext will
call into.
- DisplayList::Replayer, which plays back a DisplayList, possibly applying optimizations.
- Various DisplayList::Items, one type for each display list operation. They cover most of the
GraphicsContext functionality, other than clipping to an image buffer. Text drawing is stubbed
out for now.
Added a "DisplayLists" log channel.
Added GraphicsContextState functions for tracking state deltas with change bits. It may
make sense to combine GraphicsContextStateChange and GraphicsContextState, and use the
dirty bits in non-display-list drawing as well.
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/Logging.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/displaylists/DisplayList.cpp: Added.
(WebCore::DisplayList::DisplayList::description):
(WebCore::DisplayList::DisplayList::dump):
(WebCore::operator<<):
* platform/graphics/displaylists/DisplayListItems.cpp: Added.
* platform/graphics/displaylists/DisplayListItems.h: Added.
* platform/graphics/displaylists/DisplayListRecorder.cpp: Added.
* platform/graphics/displaylists/DisplayListRecorder.h: Added.
* platform/graphics/displaylists/DisplayListReplayer.cpp: Added.
(WebCore::DisplayList::Replayer::Replayer):
(WebCore::DisplayList::Replayer::~Replayer):
(WebCore::DisplayList::Replayer::replay):
* platform/graphics/displaylists/DisplayListReplayer.h: Added.
2016-01-07 Chris Dumez <cdumez@apple.com>
Directly-composited animated GIFs never resume once scrolled offscreen
https://bugs.webkit.org/show_bug.cgi?id=152817
<rdar://problem/19982020>
Reviewed by Daniel Bates.
Directly-composited animated GIFs would never resume once scrolled
offscreen. This is because calling repaint() in this case would not
cause BitmapImage::draw() to be called and the animation would thus
not be resumed. To address the problem,
repaintForPausedImageAnimationsIfNeeded() now calls
RenderBoxModelObject::contentChanged(ImageChanged) in addition to
repaint() to make sure the animation actually gets resumed, even in
the directly-composited animated GIF case.
Test: fast/images/composited-animated-gif-outside-viewport.html
* platform/graphics/BitmapImage.h:
Make currentFrame() public so it can be exposed via Internals for the
purpose of testing.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded):
Call RenderBoxModelObject::contentChanged(ImageChanged) in addition to
calling repaint() to make sure the animation actually gets resumed in
the directly-composited animated GIFs case.
* testing/Internals.cpp:
(WebCore::Internals::imageFrameIndex):
* testing/Internals.h:
* testing/Internals.idl:
Expose new "unsigned long imageFrameIndex(Element)" operation on
Internals so layout tests can better check if an image is actually
animating. Previously, we would rely on the output of
internals.hasPausedImageAnimations(Element) but this is not sufficient
to cover this bug as our rendering code believed it has resumed the
animations but the GIF was not actually animating due to it being
directly-composited.
2016-01-07 Michael Catanzaro <mcatanzaro@igalia.com>
[SOUP] Consider reducing max simultaneous connections
https://bugs.webkit.org/show_bug.cgi?id=137282
Reviewed by Carlos Garcia Campos.
Reduce max simultaneous connections from 35 to 17, because (a) all major browsers except
Chrome use 17, and (b) Chrome uses 10. The only reason we previously used 35 was that other
browsers were using 35 at the time.
* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::SoupNetworkSession):
2016-01-06 Antti Koivisto <antti@apple.com>
Factor free standing tree style resolve functions into a class
https://bugs.webkit.org/show_bug.cgi?id=152786
Reviewed by Simon Fraser.
Factor the free standing tree style resolve functions into a class that can keep state.
Style::TreeResolver instances resolve a single tree scope. It is instantiated for resolving
the document style and then recursively for each encountered shadow tree.
This will enable new features and optimizations later.
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
Move the root style computation code back to Document. It fits better here and avoid some
awkwardness with style resolver construction order.
* style/StyleResolveTree.cpp:
(WebCore::Style::TreeResolver::TreeResolver):
TreeResolver knows the current tree context and the StyleResolver to use for it.
Switch the functions to use these instead of recomputing them repeatedly.
(WebCore::Style::shouldCreateRenderer):
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::moveToFlowThreadIfNeeded):
(WebCore::Style::TreeResolver::createRenderer):
(WebCore::Style::updateTextRendererAfterContentChange):
(WebCore::Style::TreeResolver::createRenderTreeForChildren):
(WebCore::Style::TreeResolver::createRenderTreeForShadowRoot):
(WebCore::Style::needsPseudoElement):
(WebCore::Style::TreeResolver::createRenderTreeForBeforeOrAfterPseudoElement):
(WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees):
(WebCore::Style::TreeResolver::createRenderTreeRecursively):
Rename to reduce the use of confusing "attach" terminology.
(WebCore::Style::pseudoStyleCacheIsInvalid):
(WebCore::Style::TreeResolver::resolveLocally):
(WebCore::Style::resolveTextNode):
(WebCore::Style::TreeResolver::resolveChildAtShadowBoundary):
(WebCore::Style::TreeResolver::resolveShadowTree):
(WebCore::Style::TreeResolver::resolveBeforeOrAfterPseudoElement):
(WebCore::Style::TreeResolver::resolveChildren):
(WebCore::Style::TreeResolver::resolveSlotAssignees):
(WebCore::Style::TreeResolver::resolveRecursively):
(WebCore::Style::TreeResolver::resolve):
(WebCore::Style::detachRenderTree):
(WebCore::Style::styleForElement): Deleted.
(WebCore::Style::createRendererIfNeeded): Deleted.
(WebCore::Style::attachChildren): Deleted.
(WebCore::Style::attachShadowRoot): Deleted.
(WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Deleted.
(WebCore::Style::attachSlotAssignees): Deleted.
(WebCore::Style::attachRenderTree): Deleted.
(WebCore::Style::resolveLocal): Deleted.
(WebCore::Style::resolveChildAtShadowBoundary): Deleted.
(WebCore::Style::resolveShadowTree): Deleted.
(WebCore::Style::updateBeforeOrAfterPseudoElement): Deleted.
(WebCore::Style::resolveChildren): Deleted.
(WebCore::Style::resolveSlotAssignees): Deleted.
(WebCore::Style::resolveTree): Deleted.
* style/StyleResolveTree.h:
2016-01-07 Doug Russell <d_russell@apple.com>
AX: AXObjectCacheMac is passing WebCore enum values directly to VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=151755
Reviewed by Chris Fleizach.
No new tests, covered by existing tests.
* accessibility/mac/AXObjectCacheMac.mm:
(platformChangeTypeForWebCoreChangeType):
(platformEditTypeForWebCoreEditType):
(platformDirectionForWebCoreDirection):
(platformGranularityForWebCoreGranularity):
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::textReplacementChangeDictionary):
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2016-01-06 Brady Eidson <beidson@apple.com>
Modern IDB: Fix up IDBDatabaseIdentifier hash issues.
https://bugs.webkit.org/show_bug.cgi?id=152822
Reviewed by Alex Christensen.
No new tests (No explicitly testable behavior change, existing tests pass, flakiness will be reduced).
* Modules/indexeddb/IDBDatabaseIdentifier.h:
(WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
(WebCore::IDBDatabaseIdentifier::isEmpty):
(WebCore::IDBDatabaseIdentifierHashTraits::isEmptyValue):
* page/SecurityOriginData.h:
2016-01-06 Simon Fraser <simon.fraser@apple.com>
Sort the project file.
* WebCore.xcodeproj/project.pbxproj:
2016-01-06 Simon Fraser <simon.fraser@apple.com>
Add a setting and preferences to enable display-list drawing. Does nothing yet.
https://bugs.webkit.org/show_bug.cgi?id=152807
Reviewed by Zalan Bujtas.
Setting for display-list drawing.
* page/Settings.in:
2016-01-06 Eric Carlson <eric.carlson@apple.com>
AirPlay route availability event not always sent
https://bugs.webkit.org/show_bug.cgi?id=152802
Reviewed by Jer Noble.
Test: media/airplay-target-availability.html
* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::mediaProducerStateString): Log the new flags.
(WebCore::WebMediaSessionManager::clientStateDidChange): Schedule a client reconfiguration if
the 'requires monitoring', 'has listener', or 'has audio or video' flags have changed.
(WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Start monitoring if
at least one client has a listener and at least one has audio/video.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaState): Set new flags.
* html/HTMLMediaElement.h:
* page/MediaProducer.h: Define new flags. Add new state enum.
* platform/graphics/MediaPlaybackTargetContext.h: Initial state is "Unknown".
* platform/mock/MediaPlaybackTargetMock.h:
* platform/mock/MediaPlaybackTargetPickerMock.cpp:
(WebCore::MediaPlaybackTargetPickerMock::externalOutputDeviceAvailable): Enums not bitfields.
(WebCore::MediaPlaybackTargetPickerMock::startingMonitoringPlaybackTargets): Ditto. Don't make
device change callback if the device state is "Unknown".
(WebCore::MediaPlaybackTargetPickerMock::setState): Ditto.
* platform/mock/MediaPlaybackTargetPickerMock.h:
* testing/Internals.cpp:
(WebCore::Internals::setMockMediaPlaybackTargetPickerState): Support new state.
2016-01-06 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/odd-strings.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=152800
Reviewed by Alex Christensen.
No new tests (Existing flaky test is now rock solid and unskipped).
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::IDBDatabase):
(WebCore::IDBClient::IDBDatabase::maybeCloseInServer): Only refuse to close in the server if there
are active transactions. In the case of page navigation where stop() has been called on active DOM objects,
there will never be any active transactions.
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
2016-01-06 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/intversion-gated-on-delete.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=152795
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
Change the HashSet of open connection into a ListHashSet.
This enforces a reliable order of event delivery, which this test relies on,
and which seems better in general.
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2016-01-06 Simon Fraser <simon.fraser@apple.com>
[iOS] Revert overflow:hidden on the body affecting viewport scale (r186786)
https://bugs.webkit.org/show_bug.cgi?id=152803
rdar://problem/22242515
Reviewed by Tim Horton.
You can't assume that if an author uses overflow:hidden on the body, they have no
content outside the body that is important. Sites like Google Translate put
abspos elements outside the body.
So revert the change.
* page/FrameView.cpp:
(WebCore::FrameView::contentsSizeRespectingOverflow): Deleted.
* page/FrameView.h:
2016-01-06 Brent Fulgham <bfulgham@apple.com>
Port blocking bypass issue using 307 redirect
https://bugs.webkit.org/show_bug.cgi?id=152801
<rdar://problem/24048554>
Reviewed by Anders Carlsson.
Tested by http/tests/security/blocked-on-redirect.html.
Make sure that 307 redirects check the requested URL via 'portAllowed'.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest): Confirm that the requested port
is valid, and block load if it is not.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::reportBlockedPortFailed): Added.
(WebCore::FrameLoader::blockedError): Added.
* loader/FrameLoader.h:
2016-01-06 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Tiny cleanup in FontPlatformData::ctFont()
https://bugs.webkit.org/show_bug.cgi?id=152793
Reviewed by Zalan Bujtas.
No new tests because there is no behavior change.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::ctFont):
2016-01-06 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/transaction-scope-sequencing.html fails
https://bugs.webkit.org/show_bug.cgi?id=152775
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes, plus changes to another existing test).
Any transaction enqueued after a read-write transaction whose scope overlaps with
that read-write transaction cannot run until after that read-write transaction runs.
Additionally, read-only transactions were actually sometimes running even though their scopes
overlapped with a running read-write transaction.
This patch fixes both of those issues.
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2016-01-06 Zalan Bujtas <zalan@apple.com>
Float with media query positioned incorrectly after window resize.
https://bugs.webkit.org/show_bug.cgi?id=152558
Reviewed by Simon Fraser and David Hyatt.
This patch ensures that when a renderer becomes floated, it is moved
to the right containing block.
When this floated renderer's previous sibling is an anonymous block, it needs
to be reparented so that the float is positioned as if there was no anonymous block at all.
Test: fast/block/float/float-with-anonymous-previous-sibling.html
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleDidChange):
2016-01-06 Zalan Bujtas <zalan@apple.com>
isAnonymousInlineBlock() should exclude any ruby content.
https://bugs.webkit.org/show_bug.cgi?id=152648
<rdar://problem/23872549>
Reviewed by David Hyatt.
isAnonymousInlineBlock is designed for the new Block-Inside-Inline Model
and all other anonymous inline-block renderers (including Ruby) should bail out of it.
(see webkit.org/b/143145)
Test: fast/ruby/ruby-inline-margin-collapse-crash.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::isAnonymousInlineBlock):
* rendering/RenderObject.h:
(WebCore::RenderObject::isAnonymousInlineBlock): Deleted.
2016-01-05 Zalan Bujtas <zalan@apple.com>
showRenderTree: add inline-block/inline/block column.
https://bugs.webkit.org/show_bug.cgi?id=152771
Reviewed by Simon Fraser.
The name of the renderer (RenderBlock etc) does not always reflect the associated display type.
No change in functionality.
* rendering/RenderObject.cpp:
(WebCore::showRenderTreeLegend):
(WebCore::RenderObject::showRenderObject):
2016-01-05 Simon Fraser <simon.fraser@apple.com>
Move ImageBuffer::clip() code into GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=152769
Reviewed by Zalan Bujtas.
For CG, GraphicsContext had clipToNativeImage(PassNativeImagePtr...), which
was ugly and platform-specific.
Fix by moving code from ImageBuffer::clip() for CG and Cairo into the platform-specific
GraphicsContext implementations. This required some minor refactoring of scaleSizeToUserSpace()
in ImageBufferCG.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::clipToImageBuffer): Deleted.
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::sizeForDestinationSize):
* platform/graphics/ImageBuffer.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::clipToImageBuffer):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::clip): Deleted.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::clipToImageBuffer):
(WebCore::GraphicsContext::clipToNativeImage): Deleted.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::sizeForDestinationSize):
(WebCore::ImageBuffer::putByteArray):
(WebCore::ImageBuffer::toDataURL):
(WebCore::ImageBuffer::clip): Deleted.
2016-01-05 Simon Fraser <simon.fraser@apple.com>
Remove GraphicsContext::drawJoinedLines()
https://bugs.webkit.org/show_bug.cgi?id=152764
Reviewed by Zalan Bujtas.
GraphicsContext::drawJoinedLines() was only used by iOS form-control drawing
and polluted GraphicsContext with platform-specific types.
Rewrite RenderThemeIOS::paintCheckboxDecorations() to use the CGContextRef directly.
* platform/graphics/GraphicsContext.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawJoinedLines): Deleted.
* rendering/RenderThemeIOS.mm:
(WebCore::drawJoinedLines):
(WebCore::RenderThemeIOS::paintCheckboxDecorations):
2016-01-05 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/structured-clone.html crashes.
https://bugs.webkit.org/show_bug.cgi?id=152763
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes).
A lot of SerializedScriptValue code incorrectly assumed the global object is a JSDOMGlobalObject,
which doesn't have to be true for native Javascript types like typed arrays.
Fixing that fixes the test.
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::putOrAdd): If serializing the script value caused an exception,
clear that exception and return a better IDB specific exception.
* bindings/js/JSDOMBinding.h:
(WebCore::toJS): Add a ArrayBufferView specialization for toJS that skips the need for a JSDOMGlobalObject.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readArrayBufferView): Call toJS directly instead of getJSValue, which
incorrectly assumes the existence of a JSDOMGlobalObject (vs a JSGlobalObject)
(WebCore::CloneDeserializer::readTerminal): Instead of getJSValue, call JSArrayBuffer::create directly.
2016-01-05 Pranjal Jumde <pjumde@apple.com>
Image should not be re-registered if m_form already exists. This leads to an assertion failure.
https://bugs.webkit.org/show_bug.cgi?id=152741
<rdar://problem/24030778>
Reviewed by Brent Fulgham.
* Source/WebCore/html/HTMLImageElement.cpp:
Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode& insertionPoint)
2016-01-05 Simon Fraser <simon.fraser@apple.com>
Adjust tile coverage with margin tiles, and tidy up the indicator
https://bugs.webkit.org/show_bug.cgi?id=152742
Reviewed by Beth Dakin.
The tile coverage rect was unfeasibly large when margin tiles are present, and
could be bigger than the layer itself, making the indicator look odd.
Fix by improving the logic in TileController::adjustTileCoverageRect(): this
now first extends the visible rect for scrolling, and then constrains it
within the bounds with margin padding. It also unites with the passed-in
coverageRect, ensuring that we don't lose information about overhang for
margin tile coverage.
Second, update the tiled scrolling indicator when the visible rect changes,
and coalesce the map updates on a timer.
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::adjustCoverageRect):
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setVisibleRect):
(WebCore::TileController::setTiledScrollingIndicatorPosition):
(WebCore::expandRectWithinRect):
(WebCore::TileController::adjustTileCoverageRect):
(WebCore::TileController::updateTileCoverageMap):
(WebCore::TileController::computeTileCoverageRect): Deleted.
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::TileCoverageMap):
(WebCore::TileCoverageMap::setNeedsUpdate):
(WebCore::TileCoverageMap::updateTimerFired):
* platform/graphics/ca/TileCoverageMap.h:
2016-01-05 Antti Koivisto <antti@apple.com>
Remove selector filter update calls from Element child parsing callbacks
https://bugs.webkit.org/show_bug.cgi?id=152749
Reviewed by Andreas Kling.
We haven't done style resolve during parsing for a while now. These calls do nothing useful.
* dom/Element.cpp:
(WebCore::Element::beginParsingChildren):
(WebCore::Element::finishParsingChildren):
2016-01-05 Brady Eidson <beidson@apple.com>
Modern IDB: Error message updates for two failing tests.
https://bugs.webkit.org/show_bug.cgi?id=152735
Reviewed by Alex Christensen.
No new tests (Covered by existing tests).
Add error messages for various operations on deleted objects.
* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::update):
(WebCore::IDBClient::IDBCursor::advance):
(WebCore::IDBClient::IDBCursor::continueFunction):
(WebCore::IDBClient::IDBCursor::deleteFunction):
* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::openCursor):
(WebCore::IDBClient::IDBIndex::doCount):
(WebCore::IDBClient::IDBIndex::openKeyCursor):
(WebCore::IDBClient::IDBIndex::doGet):
(WebCore::IDBClient::IDBIndex::doGetKey):
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::openCursor):
(WebCore::IDBClient::IDBObjectStore::get):
(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::doCount):
* bindings/js/JSIDBObjectStoreCustom.cpp:
(WebCore::JSIDBObjectStore::createIndex):
2016-01-05 Eric Carlson <eric.carlson@apple.com>
Avoid NULL deference in Page::updateIsPlayingMedia
https://bugs.webkit.org/show_bug.cgi?id=152732
No new tests, this fixes a rare crash that I am unable to reproduce.
Reviewed by David Kilzer.
* page/Page.cpp:
(WebCore::Page::updateIsPlayingMedia): frame->document() can return NULL.
2016-01-05 Brady Eidson <beidson@apple.com>
Modern IDB: Transactions from a previous page can leak forward to the next.
https://bugs.webkit.org/show_bug.cgi?id=152698
Reviewed by Alex Christensen.
Test: storage/indexeddb/modern/transactions-stop-on-navigation.html
This patch is mostly about actually implementing IDBDatabase::stop and IDBTransaction::stop.
Most of the rest of the scattered changes are about cleaning up now-incorrect ASSERTs.
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::close):
(WebCore::IDBClient::IDBDatabase::maybeCloseInServer):
(WebCore::IDBClient::IDBDatabase::stop):
(WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
(WebCore::IDBClient::IDBDatabase::didAbortTransaction):
* Modules/indexeddb/client/IDBDatabaseImpl.h:
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::IDBTransaction):
(WebCore::IDBClient::IDBTransaction::stop):
(WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
2016-01-05 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Attempting to fix the AppleWin build after r194577.
Add the ClipStack.cpp build target alongside the TextureMapperGL.cpp
one, since both include GraphicsContext3D.h and ANGLEWebKitBridge.h
indirectly, the latter requiring specific include flags.
* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformWinCairo.cmake:
2016-01-05 Antti Koivisto <antti@apple.com>
Move StyleChange enum into a separate file
https://bugs.webkit.org/show_bug.cgi?id=152730
Reviewed by Andreas Kling.
Fewer whole-world rebuilds.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/CharacterData.cpp:
* dom/ContainerNode.cpp:
* dom/Document.cpp:
* dom/Document.h:
* dom/Element.cpp:
* dom/Element.h:
* style/StyleChange.h: Added.
* style/StyleResolveTree.cpp:
(WebCore::Style::shouldCreateRenderer):
(WebCore::Style::determineChange): Deleted.
* style/StyleResolveTree.h:
2016-01-04 Zan Dobersek <zdobersek@igalia.com>
[PerformanceTiming] Don't expose the restrictedKeyMap() HashMap
https://bugs.webkit.org/show_bug.cgi?id=147366
Reviewed by Sam Weinig.
Instead of the callers looking up in the HashMap that's returned by restrictedKeyMap(),
keep the HashMap local in the static restrictedMarkFunction(). This function accepts
a String reference and performs the lookup, returning the pointer to a PerformanceTiming
method that corresponds to the passed-in mark or returns nullptr otherwise.
The HashMap is now wrapped in a NeverDestroyed object and is populated when the first
mark function is looked for.
* page/PerformanceUserTiming.cpp:
(WebCore::UserTiming::mark):
(WebCore::UserTiming::findExistingMarkStartTime):
2016-01-04 Zan Dobersek <zdobersek@igalia.com>
[TextureMapper] Move ClipStack into its own file
https://bugs.webkit.org/show_bug.cgi?id=152661
Reviewed by Michael Catanzaro.
Move TextureMapperGL::ClipStack into its own file and clean it up a bit.
Move ClipState under the ClipStack class, and simply name it State.
Move the ClipState methods into a more sensible order. Remove the inline
specifiers, these aren't really needed for the methods defined in the header.
apply() and applyIfNeeded() now accept a reference to the GraphicsContext3D
object, not a pointer.
Turn YAxisMode enum into an enum class, update the uses to properly specify
the scope of the enum value.
Reorder the ClipStack member variables into a more efficient order.
No new tests -- no change in behavior.
* CMakeLists.txt:
* platform/graphics/texmap/BitmapTextureGL.cpp:
(WebCore::BitmapTextureGL::clearIfNeeded):
(WebCore::BitmapTextureGL::bindAsSurface):
* platform/graphics/texmap/BitmapTextureGL.h:
(WebCore::BitmapTextureGL::clipStack):
* platform/graphics/texmap/ClipStack.cpp: Added.
(WebCore::ClipStack::push):
(WebCore::ClipStack::pop):
(WebCore::ClipStack::reset):
(WebCore::ClipStack::intersect):
(WebCore::ClipStack::setStencilIndex):
(WebCore::ClipStack::apply):
(WebCore::ClipStack::applyIfNeeded):
* platform/graphics/texmap/ClipStack.h: Added.
(WebCore::ClipStack::State::State):
(WebCore::ClipStack::current):
(WebCore::ClipStack::getStencilIndex):
(WebCore::ClipStack::isCurrentScissorBoxEmpty):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::clipStack):
(WebCore::TextureMapperGL::beginPainting):
(WebCore::TextureMapperGL::bindDefaultSurface):
(WebCore::TextureMapperGL::beginScissorClip):
(WebCore::TextureMapperGL::beginClip):
(WebCore::TextureMapperGL::endClip):
(WebCore::TextureMapperGL::ClipStack::reset): Deleted.
(WebCore::TextureMapperGL::ClipStack::intersect): Deleted.
(WebCore::TextureMapperGL::ClipStack::setStencilIndex): Deleted.
(WebCore::TextureMapperGL::ClipStack::push): Deleted.
(WebCore::TextureMapperGL::ClipStack::pop): Deleted.
(WebCore::TextureMapperGL::ClipStack::apply): Deleted.
(WebCore::TextureMapperGL::ClipStack::applyIfNeeded): Deleted.
* platform/graphics/texmap/TextureMapperGL.h:
(WebCore::TextureMapperGL::ClipState::ClipState): Deleted.
(WebCore::TextureMapperGL::ClipStack::ClipStack): Deleted.
(WebCore::TextureMapperGL::ClipStack::current): Deleted.
(WebCore::TextureMapperGL::ClipStack::getStencilIndex): Deleted.
(WebCore::TextureMapperGL::ClipStack::isCurrentScissorBoxEmpty): Deleted.
2016-01-04 Zan Dobersek <zdobersek@igalia.com>
Shave off a TransformationMatrix copy if RenderLayer's transparencyClipBox()
https://bugs.webkit.org/show_bug.cgi?id=152119
Reviewed by Simon Fraser.
* rendering/RenderLayer.cpp:
(WebCore::transparencyClipBox): Multiply the transformation matrix returned by
layer.transform() directly into the transform object, instead of first
multiplying them and then copying the result back into the transform object.
2016-01-04 Myles C. Maxfield <mmaxfield@apple.com>
TextBreakIterator uses an internal implementation detail of NSLocale
https://bugs.webkit.org/show_bug.cgi?id=152715
<rdar://problem/23775121>
Reviewed by Tim Horton.
Instead of directly querying AppleLanguages, we should use [NSLocale preferredLanguages].
No new tests because there is no behavior change.
* platform/text/mac/TextBreakIteratorInternalICUMac.mm:
(WebCore::topLanguagePreference):
2016-01-04 Joseph Pecoraro <pecoraro@apple.com>
JSCustomXPathNSResolver::lookupNamespaceURI Console Message should render with a column number
https://bugs.webkit.org/show_bug.cgi?id=114312
Reviewed by Brent Fulgham.
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): Deleted.
This now behaves as expected.
2016-01-04 Brady Eidson <beidson@apple.com>
Modern IDB: Memory indexes aren't deleted when their owning memory object stores are deleted.
https://bugs.webkit.org/show_bug.cgi?id=152717
Reviewed by Alex Christensen.
Test: storage/indexeddb/modern/memory-index-not-deleted-with-objectstore.html
* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::deleteAllIndexes):
* Modules/indexeddb/server/MemoryObjectStore.h:
2016-01-04 Tim Horton <timothy_horton@apple.com>
Turn on gesture events when building for Yosemite
https://bugs.webkit.org/show_bug.cgi?id=152704
rdar://problem/24042472
Reviewed by Anders Carlsson.
* Configurations/FeatureDefines.xcconfig:
2016-01-04 Sergio Villar Senin <svillar@igalia.com>
REGRESSION(r194143): Float width incorrectly calculated on Wikipedia
https://bugs.webkit.org/show_bug.cgi?id=152644
Reviewed by Myles C. Maxfield.
The min/max-content contribution computation for non replaced
blocks changed in r194143. The implementation was actually
more complex than it should be and actually incomplete as it
was not considering the case of out of flow elements (because
it was directly calling computeLogicalWidthInRegion()).
This new implementation simplifies a lot the code and makes it
more complete as it relies on min|maxPreferredLogicalWidth()
calls which already consider all the different types of boxes.
Test: fast/css-intrinsic-dimensions/inlinesize-contribution-floats.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2016-01-04 David Hyatt <hyatt@apple.com>
word-wrap: break-word broken inside a flexbox
https://bugs.webkit.org/show_bug.cgi?id=152321
Reviewed by Simon Fraser.
Added fast/text/word-break-on-flexbox-child.html
* rendering/RenderText.cpp:
(WebCore::RenderText::computePreferredLogicalWidths):
At some point word-wrap:break-word was mapped to CSS overflow-wrap, but the code
in RenderText was never updated to use the breakWords() RenderStyle function that
checks overflow-wrap's value.
This means all uses of word-wrap:break-word were broken when measuring the
intrinsic width of a RenderText.
2016-01-04 John Wilander <wilander@apple.com>
webkitGetUserMedia built-in should use @then and not then
https://bugs.webkit.org/show_bug.cgi?id=152296
Reviewed by Brent Fulgham.
Test: streams/webkitGetUserMedia-shadowing-then.html
* Modules/mediastream/NavigatorUserMedia.js:
(webkitGetUserMedia): Modified to use @then syntax.
2016-01-04 Myles C. Maxfield <mmaxfield@apple.com>
Post-commit update for r193484.
https://bugs.webkit.org/show_bug.cgi?id=151884
Unreviwed.
The same null check needs to be applied in fontHasVerticalGlyphs() as well.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::fontHasVerticalGlyphs):
2016-01-04 David Hyatt <hyatt@apple.com>
Video/audio-related cleanup after changes to the source element for picture support.
https://bugs.webkit.org/show_bug.cgi?id=152090
Reviewed by Darin Adler.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectNextSourceChild):
Use the parsed MediaQueryList for video/audio, since we now cache that on the source elements for picture.
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):
Add guards to fix the build when video is not enabled.
2016-01-04 Brent Fulgham <bfulgham@apple.com>
[Win] Clean up some Windows WebCore files
https://bugs.webkit.org/show_bug.cgi?id=148275
Reviewed by Dean Jackson.
No new tests because there is no behavior change.
Update a handful of Windows-specific WebCore files to use
the proper method signatures for our updated interfaces,
get rid of cruft in the COM bindings, and use proper C++14
initializers.
* accessibility/win/AccessibilityObjectWrapperWin.h:
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
* platform/win/PopupMenuWin.cpp:
* platform/win/PopupMenuWin.h:
* platform/win/WCDataObject.cpp:
* platform/win/WCDataObject.h:
2016-01-04 Andreas Kling <akling@apple.com>
Simplify the CachedScript ASCII optimization.
<https://webkit.org/b/152596>
Reviewed by Antti Koivisto.
There's actually no need to keep a non-copying StringImpl around for the
CachedScript's internal SharedBuffer. Get rid of that so we don't need
to fidget with that string when the SharedBuffer changes underneath.
Renamed CachedScript::ASCIIOptimizationState to DecodingState to better
reflect what it's used for. Also added explicit caching of the string
hash since we can't rely on a StringImpl to keep that around now.
Bonus: Implement Darin's suggestion to let TextEncoding answer whether
an encoding is byte-based and thus eligible for the ASCII optimization.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::tryReplaceEncodedData): Deleted.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::didReplaceSharedBufferContents): Deleted.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script):
(WebCore::CachedScript::scriptHash):
(WebCore::encodingMayBeAllASCII): Deleted.
(WebCore::CachedScript::didReplaceSharedBufferContents): Deleted.
* loader/cache/CachedScript.h:
* platform/text/TextEncoding.h:
(WebCore::TextEncoding::isByteBasedEncoding):
2016-01-04 Philippe Normand <pnormand@igalia.com>
[GStreamer] A video element isn't drawn onto the canvas.
https://bugs.webkit.org/show_bug.cgi?id=132671
Reviewed by Michael Catanzaro.
When both cairo-gl and gst-gl are available the texture coming
from glimagesink can be used to create a cairo-gl surface that can
be used for video rendering within a canvas element.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage): Use NativeImage
drawing if both cairo-gl and gst-gl are available.
* platform/graphics/GraphicsContext.h: Implement drawNativeImage
for Cairo GraphicsContext.
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawNativeImage): Ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
Implement nativeImageForCurrentTime(), this method is used by the
canvas rendering context.
(WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2016-01-03 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Fix -Wpessimizing-move warnings after switch to WTFMove
https://bugs.webkit.org/show_bug.cgi?id=152677
Reviewed by Andy Estes.
* platform/glib/KeyedDecoderGlib.cpp:
(WebCore::KeyedDecoderGlib::dictionaryFromGVariant):
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createContext):
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::createContext):
2016-01-03 David Kilzer <ddkilzer@apple.com>
-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:] is missing an m_handle->client() NULL check
<https://webkit.org/b/152673>
<rdar://problem/23560530>
Reviewed by Daniel Bates.
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
Add NULL check for m_handle->client() so we don't crash due to a
NULL dereference inside the dispatch_async() block.
2016-01-03 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, turn off temporary scrolling logging on GTK
https://bugs.webkit.org/show_bug.cgi?id=152649
* platform/Logging.cpp:
(WebCore::initializeLoggingChannelsIfNecessary): Deleted.
2016-01-03 Simon Fraser <simon.fraser@apple.com>
Fix Windows build after r194515.
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::scrollOffset):
(WebCore::PopupMenuWin::scrollPosition): Renamed.
* platform/win/PopupMenuWin.h:
2016-01-03 Khem Raj <raj.khem@gmail.com>
WebKit fails to build with musl libc library
https://bugs.webkit.org/show_bug.cgi?id=152625
Reviewed by Daniel Bates and Alexey Proskuryakov.
malloc_trim is glibc specific API so guard it with __GLIBC__.
* platform/linux/MemoryPressureHandlerLinux.cpp:
(MemoryPressureHandler::platformReleaseMemory): Guard malloc_trim()
call with __GLIBC_.
2016-01-03 Simon Fraser <simon.fraser@apple.com>
Minor cleanup in ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=152656
Reviewed by Dan Bernstein.
Hide the fact that ScrollAnimator's m_currentPosX/m_currentPosY is not a FloatPoint
as much as possible.
Do offset -> position conversion in ScrollAnimator::scrollToOffsetWithoutAnimation().
This is a behavior change, but I could never hit this code on Mac.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scroll):
(WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimator::setCurrentPosition):
(WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset):
(WebCore::ScrollAnimator::notifyPositionChanged):
(WebCore::ScrollAnimator::immediateScrollOnAxis):
(WebCore::ScrollAnimator::ScrollAnimator): Deleted.
(WebCore::ScrollAnimator::currentPosition): Deleted.
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::ScrollAnimator::currentPosition):
(WebCore::ScrollAnimator::ScrollAnimator::setCurrentPositionInternal):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::scroll):
(WebCore::ScrollAnimatorMac::immediateScrollToPosition):
(WebCore::ScrollAnimatorMac::immediateScrollBy):
2016-01-03 Simon Fraser <simon.fraser@apple.com>
Rename scrollPosition(Scrollbar*) to scrollOffset(ScrollbarOrientation)
https://bugs.webkit.org/show_bug.cgi?id=152666
Reviewed by Dan Bernstein.
Scrollbar values take offsets (zero-based), so rename the accessor used
by scrollbars to set their value, and pass in an orientation, rather than
a pointer to the scrollbar.
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollOffset): Use scrollOffsetFromPosition rather than
manually adding scrollOrigin.
(WebCore::ScrollView::scrollPosition): Renamed.
* platform/ScrollView.h:
(WebCore::ScrollView::cachedScrollPosition):
* platform/ScrollableArea.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::Scrollbar):
(WebCore::Scrollbar::offsetDidChange):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollOffset):
(WebCore::RenderLayer::scrollPosition): Renamed.
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollOffset):
(WebCore::RenderListBox::scrollPosition): Renamed.
* rendering/RenderListBox.h:
2016-01-03 Simon Fraser <simon.fraser@apple.com>
scrollLeft returns different values for viewport and non-viewport scrolling with rtl
https://bugs.webkit.org/show_bug.cgi?id=94405
rdar://problem/21829754
Reviewed by Zalan Bujtas.
Use scrollPosition for DOM-exposed scroll* values on overflow scroll elements,
matching the CSS OM View spec, and Gecko behavior.
Test: fast/scrolling/programmatic-overflow-rtl-scrollIntoView.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scrollLeft):
(WebCore::RenderBox::scrollTop):
(WebCore::RenderBox::setScrollLeft):
(WebCore::RenderBox::setScrollTop):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollToXPosition):
(WebCore::RenderLayer::scrollToYPosition):
* rendering/RenderLayer.h:
2016-01-03 Simon Fraser <simon.fraser@apple.com>
Some cleanup in ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=152649
Try to fix GTK scroll position errors in RTL.
ScrollAnimatorNone::scrollToOffsetWithoutAnimation() was failing to map from
offset to position.
Also add logging in ScrollableArea::scrollToOffsetWithoutAnimation().
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::scrollToOffsetWithoutAnimation):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
2016-01-02 Simon Fraser <simon.fraser@apple.com>
Temporarily turn on Scrolling logging on GTK, to investigate
GTK failures from https://bugs.webkit.org/show_bug.cgi?id=152649.
* platform/Logging.cpp:
(WebCore::initializeLoggingChannelsIfNecessary):
2016-01-02 Simon Fraser <simon.fraser@apple.com>
Some cleanup in ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=152649
Try to fix GTK test failures. ScrollAnimatorNone needs to map correctly between
min and max scroll positions.
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters):
(WebCore::ScrollAnimatorNone::scroll):
* platform/ScrollAnimatorNone.h:
2016-01-02 Max Stepin <maxstepin@gmail.com>
APNG decoder: only decode the frames up to haltAtFrame
https://bugs.webkit.org/show_bug.cgi?id=146205
Reviewed by Michael Catanzaro.
No new tests, already covered by existing tests.
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageReader::close):
(WebCore::PNGImageReader::decode):
(WebCore::PNGImageDecoder::isSizeAvailable):
(WebCore::PNGImageDecoder::frameBufferAtIndex):
(WebCore::PNGImageDecoder::pngComplete):
(WebCore::PNGImageDecoder::decode):
* platform/image-decoders/png/PNGImageDecoder.h:
(WebCore::PNGImageDecoder::isComplete):
(WebCore::PNGImageDecoder::isCompleteAtIndex):
2016-01-02 Simon Fraser <simon.fraser@apple.com>
Some cleanup in ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=152649
Reviewed by Zalan Bujtas.
Change ScrollAnimatorMac::adjustScrollPositionIfNecessary() and similar code in
ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary() to
constrain between minimumScrollPosition() and maximumScrollPosition(), rather than
rolling their own code.
This revealed several issues. First, RenderLayer::maximumScrollPosition() is
wrong when the layer has borders, because RenderLayer::visibleContentRectInternal()
seems to have incorrect logic. However, we can just remove it, and use the ScrollableArea
implementation.
Second, ScrollAnimatorMac::scrollToOffsetWithoutAnimation() was failing to do a
position/offset conversion, so do one. We're converting too much, and should probably
just change ScrollAnimator to do everything in terms of positions.
Third, ScrollAnimator::scroll() was clamping a scroll position as an offset
(detected by scrollbars/scroll-rtl-or-bt-layer.html), so fix that.
Remove ScrollController::absoluteScrollPosition() and overrides, since this was
confusingly named, and could just be removed.
Remove ScrollController::m_origOrigin which was assigned to, but never read.
Test: fast/scrolling/arrow-key-scroll-in-rtl-document.html: new
fast/dom/horizontal-scrollbar-in-rtl.html: progressed with these changes.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
(WebCore::ScrollingTreeFrameScrollingNodeMac::absoluteScrollPosition): Deleted.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scroll):
(WebCore::ScrollAnimator::notifyPositionChanged):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::constrainScrollPosition):
* platform/cocoa/ScrollController.h:
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::snapRubberBandTimerFired): Deleted.
(WebCore::ScrollController::snapRubberBand): Deleted.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollAnimationHelperDelegate _immediateScrollToPoint:]):
(WebCore::ScrollAnimatorMac::scroll):
(WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
(WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
(WebCore::ScrollAnimatorMac::immediateScrollToPosition):
(WebCore::ScrollAnimatorMac::immediateScrollToPositionForScrollAnimation):
(WebCore::ScrollAnimatorMac::immediateScrollTo): Deleted.
(WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation): Deleted.
(WebCore::ScrollAnimatorMac::absoluteScrollPosition): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::visibleContentRectInternal):
(WebCore::RenderLayer::overhangAmount):
(WebCore::RenderLayer::maximumScrollPosition): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::minimumScrollPosition):
(WebCore::RenderListBox::maximumScrollPosition): RenderListBox scrolls by lines,
so it needs a custom implementation of this.
* rendering/RenderListBox.h:
2016-01-02 Zalan Bujtas <zalan@apple.com>
Simple line layout:: Add text-decoration support.
https://bugs.webkit.org/show_bug.cgi?id=152623
Reviewed by Antti Koivisto.
This patch enables text-decoration for simple line layout.
-webkit-text-underline-position: under requires normal line layout context, skip it for now.
Test: fast/css3-text/css3-text-decoration/simple-line-layout-text-decoration.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::printReason):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow): In case of multiple RenderText renderers (long text), it's ok
to pass the first text renderer as they all share the same set of decorations.
2015-12-31 Andy Estes <aestes@apple.com>
Replace WTF::move with WTFMove
https://bugs.webkit.org/show_bug.cgi?id=152601
Reviewed by Brady Eidson.
* Modules/battery/NavigatorBattery.cpp:
(WebCore::NavigatorBattery::from):
* Modules/encryptedmedia/CDMSessionClearKey.cpp:
(WebCore::CDMSessionClearKey::update):
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::create):
(WebCore::MediaKeys::MediaKeys):
* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::from):
* Modules/gamepad/deprecated/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::from):
* Modules/geolocation/GeoNotifier.cpp:
(WebCore::GeoNotifier::GeoNotifier):
(WebCore::GeoNotifier::setFatalError):
* Modules/geolocation/GeoNotifier.h:
(WebCore::GeoNotifier::create):
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::Watchers::add):
(WebCore::Geolocation::getCurrentPosition):
(WebCore::Geolocation::watchPosition):
* Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::viewStateDidChange):
* Modules/geolocation/Geoposition.h:
(WebCore::Geoposition::create):
(WebCore::Geoposition::Geoposition):
* Modules/geolocation/NavigatorGeolocation.cpp:
(WebCore::NavigatorGeolocation::from):
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::from):
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
(WebCore::WorkerGlobalScopeIndexedDatabase::from):
* Modules/indexeddb/client/IDBAnyImpl.cpp:
(WebCore::IDBClient::IDBAny::IDBAny):
* Modules/indexeddb/client/IDBAnyImpl.h:
(WebCore::IDBClient::IDBAny::create):
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::willCommitTransaction):
(WebCore::IDBClient::IDBDatabase::willAbortTransaction):
(WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent):
* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::openCursor):
(WebCore::IDBClient::IDBIndex::openKeyCursor):
* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::openCursor):
(WebCore::IDBClient::IDBObjectStore::get):
(WebCore::IDBClient::IDBObjectStore::deleteFunction):
(WebCore::IDBClient::IDBObjectStore::createIndex):
(WebCore::IDBClient::IDBObjectStore::index):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
(WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::enqueueEvent):
(WebCore::IDBClient::IDBRequest::setResult):
(WebCore::IDBClient::IDBRequest::setResultToStructuredClone):
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abort):
(WebCore::IDBClient::IDBTransaction::scheduleOperation):
(WebCore::IDBClient::IDBTransaction::commit):
(WebCore::IDBClient::IDBTransaction::enqueueEvent):
(WebCore::IDBClient::IDBTransaction::createObjectStore):
(WebCore::IDBClient::IDBTransaction::createIndex):
(WebCore::IDBClient::IDBTransaction::doRequestOpenCursor):
(WebCore::IDBClient::IDBTransaction::iterateCursor):
(WebCore::IDBClient::IDBTransaction::requestGetRecord):
(WebCore::IDBClient::IDBTransaction::requestIndexRecord):
(WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
(WebCore::IDBClient::IDBTransaction::requestPutOrAdd):
(WebCore::IDBClient::IDBTransaction::deleteObjectStore):
(WebCore::IDBClient::IDBTransaction::deleteIndex):
* Modules/indexeddb/legacy/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::processPendingOpenCalls):
* Modules/indexeddb/legacy/IDBDatabaseBackend.h:
(WebCore::IDBDatabaseBackend::setPendingSecondHalfOpen):
* Modules/indexeddb/legacy/LegacyAny.h:
(WebCore::LegacyAny::create):
* Modules/indexeddb/legacy/LegacyDatabase.cpp:
(WebCore::LegacyDatabase::enqueueEvent):
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::enqueueEvent):
* Modules/indexeddb/legacy/LegacyTransaction.cpp:
(WebCore::LegacyTransaction::enqueueEvent):
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::postDatabaseTask):
(WebCore::IDBServer::IDBServer::postDatabaseTaskReply):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
(WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
(WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
(WebCore::IDBServer::MemoryBackingStoreTransaction::indexCleared):
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
(WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::objectStoreCleared):
(WebCore::IDBServer::MemoryIndex::replaceIndexValueStore):
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::createIndex):
(WebCore::IDBServer::MemoryObjectStore::maybeRestoreDeletedIndex):
(WebCore::IDBServer::MemoryObjectStore::deleteIndex):
(WebCore::IDBServer::MemoryObjectStore::clear):
(WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
(WebCore::IDBServer::MemoryObjectStore::registerIndex):
* Modules/indexeddb/server/ServerOpenDBRequest.cpp:
(WebCore::IDBServer::ServerOpenDBRequest::notifiedConnectionsOfVersionChange):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::maybeNotifyConnectionsOfVersionChange):
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction):
* Modules/indexeddb/shared/IndexKey.cpp:
(WebCore::IndexKey::isolatedCopy):
* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::setPlaybackTarget):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setPrivateAndOpen):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::create):
(WebCore::SourceBuffer::SourceBuffer):
* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getUserMedia):
(WebCore::MediaDevices::enumerateDevices):
* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::create):
(WebCore::MediaDevicesRequest::MediaDevicesRequest):
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create):
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::didRemoveTrack):
(WebCore::MediaStream::internalAddTrack):
(WebCore::MediaStream::internalRemoveTrack):
* Modules/mediastream/NavigatorMediaDevices.cpp:
(WebCore::NavigatorMediaDevices::from):
* Modules/mediastream/RTCConfiguration.cpp:
(WebCore::RTCConfiguration::initialize):
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::create):
(WebCore::RTCDTMFSender::RTCDTMFSender):
(WebCore::RTCDTMFSender::scheduleDispatchEvent):
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::create):
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::RTCDataChannel::scheduleDispatchEvent):
* Modules/mediastream/RTCIceCandidateEvent.cpp:
(WebCore::RTCIceCandidateEvent::create):
(WebCore::RTCIceCandidateEvent::RTCIceCandidateEvent):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::create):
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::queuedCreateOffer):
(WebCore::RTCPeerConnection::queuedCreateAnswer):
(WebCore::RTCPeerConnection::queuedSetLocalDescription):
(WebCore::RTCPeerConnection::queuedSetRemoteDescription):
(WebCore::RTCPeerConnection::queuedAddIceCandidate):
(WebCore::RTCPeerConnection::setConfiguration):
(WebCore::RTCPeerConnection::privateGetStats):
* Modules/mediastream/RTCRtpReceiver.cpp:
(WebCore::RTCRtpReceiver::RTCRtpReceiver):
* Modules/mediastream/RTCRtpReceiver.h:
(WebCore::RTCRtpReceiver::create):
* Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::RTCRtpSender):
* Modules/mediastream/RTCRtpSender.h:
(WebCore::RTCRtpSender::create):
* Modules/mediastream/RTCTrackEvent.cpp:
(WebCore::RTCTrackEvent::create):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::start):
(WebCore::UserMediaRequest::UserMediaRequest):
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::provideNavigatorContentUtilsTo):
* Modules/navigatorcontentutils/NavigatorContentUtils.h:
* Modules/notifications/DOMWindowNotifications.cpp:
(WebCore::DOMWindowNotifications::from):
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::timerFired):
* Modules/notifications/WorkerGlobalScopeNotifications.cpp:
(WebCore::WorkerGlobalScopeNotifications::from):
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::createElementRenderer):
* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::createElementRenderer):
(WebCore::YouTubePluginReplacement::installReplacement):
* Modules/quota/DOMWindowQuota.cpp:
(WebCore::DOMWindowQuota::from):
* Modules/quota/NavigatorStorageQuota.cpp:
(WebCore::NavigatorStorageQuota::from):
* Modules/quota/WorkerNavigatorStorageQuota.cpp:
(WebCore::WorkerNavigatorStorageQuota::from):
* Modules/speech/DOMWindowSpeechSynthesis.cpp:
(WebCore::DOMWindowSpeechSynthesis::from):
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::setPlatformSynthesizer):
* Modules/webaudio/AsyncAudioDecoder.cpp:
(WebCore::AsyncAudioDecoder::decodeAsync):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::addReaction):
(WebCore::AudioContext::suspend):
(WebCore::AudioContext::resume):
(WebCore::AudioContext::close):
* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::addInput):
(WebCore::AudioNode::addOutput):
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::addEventListener):
* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::setBuffer):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::addEventListener):
* Modules/webdatabase/Database.cpp:
(WebCore::Database::openAndVerifyVersion):
(WebCore::Database::scheduleTransaction):
(WebCore::Database::scheduleTransactionStep):
(WebCore::Database::markAsDeletedAndClose):
(WebCore::Database::runTransaction):
(WebCore::Database::tableNames):
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::scheduleTask):
(WebCore::DatabaseThread::scheduleImmediateTask):
* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::create):
(WebCore::SQLTransaction::SQLTransaction):
(WebCore::SQLTransaction::executeSQL):
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::enqueueStatementBackend):
(WebCore::SQLTransactionBackend::executeSQL):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::didReceiveBinaryData):
(WebCore::WebSocket::dispatchOrQueueEvent):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::processFrame):
* Modules/websockets/WebSocketExtensionDispatcher.cpp:
(WebCore::WebSocketExtensionDispatcher::addProcessor):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::addExtensionProcessor):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::passwordNotificationPostTimerFired):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::ariaLabeledByText):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::selectText):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityText::AccessibilityText):
* bindings/gobject/DOMObjectCache.cpp:
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath):
(WebCore::generateIndexKeyForValue):
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesCbcParams):
(WebCore::createAesKeyGenParams):
(WebCore::createHmacParams):
(WebCore::createHmacKeyParams):
(WebCore::createRsaKeyGenParams):
(WebCore::createRsaOaepParams):
(WebCore::createRsaSsaParams):
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::createHMACParameters):
(WebCore::createRSAKeyParametersWithHash):
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
* bindings/js/JSDOMPromise.h:
(WebCore::DOMPromise::DOMPromise):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::setTimeout):
(WebCore::JSDOMWindow::setInterval):
* bindings/js/JSDOMWrapper.h:
(WebCore::JSDOMWrapper::JSDOMWrapper):
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::JSSubtleCrypto::encrypt):
(WebCore::JSSubtleCrypto::decrypt):
(WebCore::JSSubtleCrypto::sign):
(WebCore::JSSubtleCrypto::verify):
(WebCore::JSSubtleCrypto::digest):
(WebCore::JSSubtleCrypto::generateKey):
(WebCore::importKey):
(WebCore::JSSubtleCrypto::importKey):
(WebCore::JSSubtleCrypto::exportKey):
(WebCore::JSSubtleCrypto::wrapKey):
(WebCore::JSSubtleCrypto::unwrapKey):
* bindings/js/JSWorkerGlobalScopeCustom.cpp:
(WebCore::JSWorkerGlobalScope::setTimeout):
(WebCore::JSWorkerGlobalScope::setInterval):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readRSAKey):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::create):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(WebCore::JSTestActiveDOMObject::create):
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
(WebCore::JSTestClassWithJSBuiltinConstructor::JSTestClassWithJSBuiltinConstructor):
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
(WebCore::JSTestClassWithJSBuiltinConstructor::create):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::create):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(WebCore::JSTestCustomNamedGetter::create):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructor::JSTestEventConstructor):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::create):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::JSTestEventTarget):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::create):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestException::JSTestException):
* bindings/scripts/test/JS/JSTestException.h:
(WebCore::JSTestException::create):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
(WebCore::JSTestGenerateIsReachable::create):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::JSTestInterface):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::create):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::create):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNode::JSTestNode):
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::JSTestNondeterministic::JSTestNondeterministic):
* bindings/scripts/test/JS/JSTestNondeterministic.h:
(WebCore::JSTestNondeterministic::create):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::JSTestObj):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::create):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(WebCore::JSTestOverloadedConstructors::create):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
(WebCore::JSTestOverrideBuiltins::create):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::create):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefs::JSTestTypedefs):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore::JSTestTypedefs::create):
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattribute::JSattribute):
* bindings/scripts/test/JS/JSattribute.h:
(WebCore::JSattribute::create):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonly::JSreadonly):
* bindings/scripts/test/JS/JSreadonly.h:
(WebCore::JSreadonly::create):
* bridge/c/CRuntimeObject.cpp:
(JSC::Bindings::CRuntimeObject::CRuntimeObject):
* bridge/c/CRuntimeObject.h:
(JSC::Bindings::CRuntimeObject::create):
* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::methodNamed):
(JSC::Bindings::CClass::fieldNamed):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::CInstance):
* bridge/c/c_instance.h:
(JSC::Bindings::CInstance::create):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Array::Array):
(JSC::Bindings::Instance::Instance):
* bridge/objc/ObjCRuntimeObject.h:
(JSC::Bindings::ObjCRuntimeObject::create):
* bridge/objc/objc_class.mm:
(JSC::Bindings::ObjcClass::methodNamed):
(JSC::Bindings::ObjcClass::fieldNamed):
* bridge/objc/objc_instance.mm:
(ObjcInstance::ObjcInstance):
(ObjcInstance::create):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcArray::ObjcArray):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::RuntimeObject):
* bridge/runtime_object.h:
* contentextensions/CombinedFiltersAlphabet.cpp:
(WebCore::ContentExtensions::TermCreatorTranslator::translate):
* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::ActiveSubtree::ActiveSubtree):
(WebCore::ContentExtensions::generateSuffixWithReverseSuffixTree):
(WebCore::ContentExtensions::generateNFAForSubtree):
(WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
* contentextensions/ContentExtension.cpp:
(WebCore::ContentExtensions::ContentExtension::create):
(WebCore::ContentExtensions::ContentExtension::ContentExtension):
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::loadEncodedRules):
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
* contentextensions/DFACombiner.cpp:
(WebCore::ContentExtensions::DFACombiner::combineDFAs):
* contentextensions/DFACombiner.h:
(WebCore::ContentExtensions::DFACombiner::addDFA):
* contentextensions/ImmutableNFANodeBuilder.h:
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder):
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::operator=):
* contentextensions/MutableRange.h:
(WebCore::ContentExtensions::MutableRange::MutableRange):
(WebCore::ContentExtensions::MutableRange::operator=):
* contentextensions/MutableRangeList.h:
(WebCore::ContentExtensions::MutableRangeList::extend):
(WebCore::ContentExtensions::MutableRangeList::insertBetween):
* contentextensions/Term.h:
(WebCore::ContentExtensions::Term::Term):
(WebCore::ContentExtensions::Term::operator=):
(WebCore::ContentExtensions::Term::generateSubgraphForAtom):
* crypto/CryptoAlgorithm.cpp:
(WebCore::CryptoAlgorithm::encryptForWrapKey):
(WebCore::CryptoAlgorithm::decryptForUnwrapKey):
* crypto/CryptoKeyPair.cpp:
(WebCore::CryptoKeyPair::CryptoKeyPair):
* crypto/CryptoKeyPair.h:
(WebCore::CryptoKeyPair::create):
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
(WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey):
(WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::generatePair):
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* css/CSSBasicShapes.cpp:
(WebCore::CSSBasicShapePath::CSSBasicShapePath):
* css/CSSBasicShapes.h:
* css/CSSBorderImage.cpp:
(WebCore::createBorderImageValue):
* css/CSSCalculationValue.cpp:
* css/CSSCalculationValue.h:
(WebCore::CSSCalcValue::CSSCalcValue):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForNinePieceImageSlice):
(WebCore::valueForNinePieceImageQuad):
(WebCore::computedTransform):
(WebCore::ComputedStyleExtractor::valueForShadow):
(WebCore::ComputedStyleExtractor::valueForFilter):
(WebCore::valueForGridTrackList):
(WebCore::valueForGridPosition):
(WebCore::scrollSnapPoints):
(WebCore::scrollSnapCoordinates):
(WebCore::getWillChangePropertyValue):
(WebCore::fontVariantLigaturesPropertyValue):
(WebCore::fontVariantNumericPropertyValue):
(WebCore::fontVariantEastAsianPropertyValue):
(WebCore::fillRepeatToCSSValue):
(WebCore::fillSizeToCSSValue):
(WebCore::fontVariantFromStyle):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::blend):
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::CSSCursorImageValue):
* css/CSSCursorImageValue.h:
(WebCore::CSSCursorImageValue::create):
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::image):
* css/CSSFilterImageValue.h:
(WebCore::CSSFilterImageValue::create):
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::addSource):
* css/CSSFontFace.h:
(WebCore::CSSFontFace::create):
(WebCore::CSSFontFace::insertFeature):
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font):
* css/CSSFontFeatureValue.cpp:
(WebCore::CSSFontFeatureValue::CSSFontFeatureValue):
* css/CSSFontFeatureValue.h:
(WebCore::CSSFontFeatureValue::create):
* css/CSSFontSelector.cpp:
(WebCore::createFontFace):
(WebCore::constructFamilyFontFaces):
* css/CSSGrammar.y.in:
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cloneForCSSOM):
* css/CSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::StyleKeyframe):
* css/CSSKeyframeRule.h:
(WebCore::StyleKeyframe::create):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontFaceValue):
(WebCore::CSSParser::parseMediaQuery):
(WebCore::CSSParser::parseSizesAttribute):
(WebCore::CSSParser::SourceSize::SourceSize):
(WebCore::CSSParser::sourceSize):
(WebCore::CSSParser::addFillValue):
(WebCore::CSSParser::addAnimationValue):
(WebCore::CSSParser::parse4ValuesFillPosition):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillSize):
(WebCore::CSSParser::parseDashboardRegions):
(WebCore::CSSParser::parseClipShape):
(WebCore::CSSParser::parseBasicShapePath):
(WebCore::CSSParser::parseSystemFont):
(WebCore::CSSParser::parseBorderImageRepeat):
(WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
(WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
(WebCore::CSSParser::parseBuiltinFilterArguments):
(WebCore::CSSParser::parseFontFeatureTag):
(WebCore::CSSParser::parseFontVariantLigatures):
(WebCore::CSSParser::parseFontVariantNumeric):
(WebCore::CSSParser::parseFontVariantEastAsian):
(WebCore::CSSParser::createKeyframesRule):
(WebCore::CSSParser::rewriteSpecifiers):
(WebCore::CSSParser::createPageRule):
(WebCore::CSSParser::createSelectorVector):
(WebCore::CSSParser::recycleSelectorVector):
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::~CSSParserSelector):
(WebCore::CSSParserSelector::adoptSelectorVector):
(WebCore::CSSParserSelector::setLangArgumentList):
(WebCore::CSSParserSelector::insertTagHistory):
(WebCore::CSSParserSelector::appendTagHistory):
(WebCore::CSSParserSelector::prependTagSelector):
* css/CSSParserValues.h:
(WebCore::CSSParserSelector::releaseSelector):
(WebCore::CSSParserSelector::setTagHistory):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::wrapValueInCommaSeparatedList):
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::appendFontFace):
(WebCore::appendFontWithInvalidUnicodeRangeIfLoading):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::setLangArgumentList):
(WebCore::CSSSelector::setSelectorList):
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::create):
(WebCore::CSSStyleSheet::CSSStyleSheet):
* css/CSSValueList.h:
(WebCore::CSSValueList::append):
(WebCore::CSSValueList::prepend):
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::initUserStyle):
* css/FontLoader.cpp:
(WebCore::FontLoader::scheduleEvent):
* css/MediaList.cpp:
(WebCore::MediaQuerySet::parse):
(WebCore::MediaQuerySet::add):
(WebCore::MediaQuerySet::addMediaQuery):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* css/Pair.h:
(WebCore::Pair::create):
(WebCore::Pair::Pair):
* css/RuleSet.cpp:
(WebCore::RuleSet::addRegionRule):
* css/RuleSet.h:
(WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::paintOrder):
* css/SourceSizeList.cpp:
(WebCore::match):
(WebCore::parseSizesAttribute):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue):
(WebCore::StyleBuilderCustom::applyValueContent):
(WebCore::StyleBuilderCustom::applyValueWillChange):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::setStyle):
(WebCore::StyleResolver::addToMatchedPropertiesCache):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::setParentStyle):
(WebCore::StyleResolver::State::setAuthorRollback):
(WebCore::StyleResolver::State::setUserRollback):
* css/StyleRule.cpp:
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::create):
(WebCore::StyleRulePage::StyleRulePage):
(WebCore::StyleRuleFontFace::StyleRuleFontFace):
(WebCore::StyleRuleGroup::wrapperInsertRule):
(WebCore::StyleRuleViewport::StyleRuleViewport):
* css/StyleRule.h:
(WebCore::StyleRule::create):
(WebCore::StyleRule::wrapperAdoptSelectorList):
(WebCore::StyleRuleFontFace::create):
(WebCore::StyleRulePage::create):
(WebCore::StyleRulePage::wrapperAdoptSelectorList):
(WebCore::StyleRuleViewport::create):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
* dom/ActiveDOMCallbackMicrotask.cpp:
(WebCore::ActiveDOMCallbackMicrotask::ActiveDOMCallbackMicrotask):
* dom/Attr.cpp:
(WebCore::Attr::cloneNodeInternal):
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::ChildListMutationAccumulator):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::append):
(WebCore::ContainerNode::prepend):
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::DataTransfer):
* dom/Document.cpp:
(WebCore::Document::createNodeIterator):
(WebCore::Document::createTreeWalker):
(WebCore::Document::logExceptionToConsole):
(WebCore::Document::cloneNodeInternal):
(WebCore::Document::enqueueWindowEvent):
(WebCore::Document::enqueueDocumentEvent):
(WebCore::Document::enqueueOverflowEvent):
(WebCore::Document::setTransformSource):
(WebCore::Document::addMessage):
(WebCore::Document::postTask):
(WebCore::Document::pendingTasksTimerFired):
(WebCore::Document::sendWillRevealEdgeEventsIfNeeded):
* dom/DocumentEventQueue.cpp:
(WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent):
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::cloneNodeInternal):
* dom/Element.cpp:
(WebCore::Element::createElementRenderer):
(WebCore::Element::addShadowRoot):
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):
(WebCore::Element::resolveComputedStyle):
(WebCore::Element::setBeforePseudoElement):
(WebCore::Element::setAfterPseudoElement):
* dom/ElementRareData.h:
(WebCore::ElementRareData::setShadowRoot):
(WebCore::ElementRareData::setAttributeMap):
(WebCore::ElementRareData::setComputedStyle):
(WebCore::ElementRareData::setClassList):
(WebCore::ElementRareData::setDataset):
(WebCore::ElementRareData::setBeforePseudoElement):
(WebCore::ElementRareData::setAfterPseudoElement):
* dom/Event.cpp:
(WebCore::Event::setTarget):
* dom/EventTarget.cpp:
(WebCore::EventTarget::addEventListener):
* dom/ExtensionStyleSheets.cpp:
(WebCore::ExtensionStyleSheets::addUserStyleSheet):
(WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting):
* dom/FocusEvent.cpp:
(WebCore::FocusEvent::FocusEvent):
* dom/FocusEvent.h:
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::initMessageEvent):
* dom/MessageEvent.h:
* dom/MessagePort.cpp:
(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::disentangle):
(WebCore::MessagePort::entangle):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::disentanglePorts):
(WebCore::MessagePort::entanglePorts):
(WebCore::MessagePort::addEventListener):
* dom/Microtasks.cpp:
(WebCore::MicrotaskQueue::append):
(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
* dom/MutationObserver.cpp:
(WebCore::queueMutationObserverCompoundMicrotask):
* dom/NativeNodeFilter.h:
* dom/Node.cpp:
(WebCore::Node::before):
(WebCore::Node::after):
(WebCore::Node::replaceWith):
(WebCore::Document::invalidateNodeListAndCollectionCaches):
(WebCore::tryAddEventListener):
(WebCore::Node::addEventListener):
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::NodeIterator):
* dom/NodeIterator.h:
(WebCore::NodeIterator::create):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::setCSSStyleSheet):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didRecalcStyle):
* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::enqueueEvent):
(WebCore::ScopedEventQueue::dispatchAllEvents):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::reportException):
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::Task::Task):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::setSecurityOriginPolicy):
(WebCore::SecurityContext::setContentSecurityPolicy):
* dom/SecurityOriginPolicy.cpp:
(WebCore::SecurityOriginPolicy::create):
(WebCore::SecurityOriginPolicy::SecurityOriginPolicy):
* dom/SelectorQuery.cpp:
(WebCore::SelectorQuery::SelectorQuery):
(WebCore::SelectorQueryCache::add):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
* dom/ShadowRoot.h:
* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::SlotAssignment):
* dom/StyledElement.cpp:
(WebCore::StyledElement::rebuildPresentationAttributeStyle):
* dom/Text.cpp:
(WebCore::Text::splitText):
(WebCore::Text::replaceWholeText):
* dom/Traversal.cpp:
(WebCore::NodeIteratorBase::NodeIteratorBase):
* dom/TreeWalker.cpp:
(WebCore::TreeWalker::TreeWalker):
(WebCore::TreeWalker::traverseSiblings):
* dom/TreeWalker.h:
(WebCore::TreeWalker::create):
* dom/TypedElementDescendantIterator.h:
(WebCore::DoubleTypedElementDescendantIteratorAdapter<ElementType>::DoubleTypedElementDescendantIteratorAdapter):
(WebCore::DoubleTypedElementDescendantIterator<ElementType>::DoubleTypedElementDescendantIterator):
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::EventData::EventData):
(WebCore::MessagePortChannel::createChannel):
(WebCore::MessagePortChannel::postMessageToRemote):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::EventData::channels):
(WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
* editing/AppendNodeCommand.cpp:
(WebCore::AppendNodeCommand::AppendNodeCommand):
* editing/AppendNodeCommand.h:
(WebCore::AppendNodeCommand::create):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::replaceTextInNode):
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/DeleteFromTextNodeCommand.h:
(WebCore::DeleteFromTextNodeCommand::create):
* editing/EditingStyle.cpp:
(WebCore::applyTextDecorationChangeToValueList):
(WebCore::EditingStyle::overrideTypingStyleAt):
(WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
(WebCore::mergeTextDecorationValues):
(WebCore::StyleChange::StyleChange):
* editing/Editor.cpp:
(WebCore::Editor::insertDictationPhrases):
(WebCore::Editor::setTextAsChildOfElement):
(WebCore::Editor::applyStyleToSelection):
* editing/EditorCommand.cpp:
(WebCore::applyCommandToFrame):
(WebCore::executeInsertNode):
(WebCore::executeInsertHorizontalRule):
(WebCore::executeInsertImage):
(WebCore::executeStrikethrough):
(WebCore::executeUnderline):
* editing/InsertIntoTextNodeCommand.h:
(WebCore::InsertIntoTextNodeCommand::create):
* editing/InsertNodeBeforeCommand.h:
(WebCore::InsertNodeBeforeCommand::create):
* editing/MergeIdenticalElementsCommand.cpp:
(WebCore::MergeIdenticalElementsCommand::doApply):
(WebCore::MergeIdenticalElementsCommand::doUnapply):
* editing/MoveSelectionCommand.cpp:
(WebCore::MoveSelectionCommand::doApply):
* editing/RemoveNodeCommand.cpp:
(WebCore::RemoveNodeCommand::RemoveNodeCommand):
* editing/RemoveNodeCommand.h:
(WebCore::RemoveNodeCommand::create):
* editing/ReplaceDeleteFromTextNodeCommand.cpp:
(WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
* editing/ReplaceDeleteFromTextNodeCommand.h:
* editing/ReplaceInsertIntoTextNodeCommand.cpp:
(WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
* editing/ReplaceInsertIntoTextNodeCommand.h:
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren):
* editing/ReplaceSelectionCommand.h:
(WebCore::ReplaceSelectionCommand::create):
* editing/SplitElementCommand.cpp:
(WebCore::SplitElementCommand::executeApply):
(WebCore::SplitElementCommand::doUnapply):
* editing/TextCheckingHelper.cpp:
(WebCore::findGrammaticalErrors):
(WebCore::checkTextOfParagraph):
* editing/TextIterator.cpp:
(WebCore::TextIteratorCopyableText::set):
(WebCore::TextIterator::handleReplacedElement):
(WebCore::TextIterator::emitText):
(WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
(WebCore::TextIterator::rangeFromLocationAndLength):
* editing/WrapContentsInDummySpanCommand.cpp:
(WebCore::WrapContentsInDummySpanCommand::executeApply):
(WebCore::WrapContentsInDummySpanCommand::doUnapply):
* editing/ios/DictationCommandIOS.cpp:
(WebCore::DictationCommandIOS::DictationCommandIOS):
* editing/ios/DictationCommandIOS.h:
(WebCore::DictationCommandIOS::create):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::WebContentReader::readURL):
(WebCore::Editor::createFragmentForImageResourceAndAddResource):
* editing/mac/EditorMac.mm:
(WebCore::Editor::WebContentReader::readFilenames):
(WebCore::Editor::WebContentReader::readURL):
(WebCore::Editor::createFragmentForImageResourceAndAddResource):
* editing/markup.cpp:
(WebCore::fillContainerFromString):
(WebCore::createFragmentFromText):
(WebCore::replaceChildrenWithFragment):
(WebCore::replaceChildrenWithText):
* fileapi/AsyncFileStream.cpp:
(WebCore::callOnFileThread):
* fileapi/Blob.cpp:
(WebCore::Blob::Blob):
* fileapi/Blob.h:
(WebCore::Blob::create):
* fileapi/FileList.h:
(WebCore::FileList::create):
(WebCore::FileList::FileList):
(WebCore::FileList::append):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::BlobRegistryContext::BlobRegistryContext):
(WebCore::ThreadableBlobRegistry::registerBlobURL):
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::append):
(WebCore::BlobBuilder::finalize):
* history/BackForwardController.cpp:
(WebCore::BackForwardController::BackForwardController):
(WebCore::BackForwardController::addItem):
* history/BackForwardList.cpp:
(WebCore::BackForwardList::addItem):
* history/CachedFrame.cpp:
(WebCore::CachedFrame::setCachedFramePlatformData):
* history/HistoryItem.cpp:
(WebCore::HistoryItem::setStateObject):
(WebCore::HistoryItem::addChildItem):
(WebCore::HistoryItem::setChildItem):
(WebCore::HistoryItem::setFormData):
(WebCore::HistoryItem::setRedirectURLs):
* history/PageCache.cpp:
(WebCore::PageCache::take):
* html/BaseButtonInputType.cpp:
(WebCore::BaseButtonInputType::createInputRenderer):
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree):
* html/ColorInputType.cpp:
(WebCore::ColorInputType::createShadowSubtree):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::appendEntry):
(WebCore::FTPDirectoryDocumentParser::createTDForFilename):
(WebCore::FTPDirectoryDocumentParser::createBasicDocument):
(WebCore::FTPDirectoryDocumentParser::append):
* html/FileInputType.cpp:
(WebCore::FileInputType::createInputRenderer):
(WebCore::FileInputType::createFileList):
* html/FormController.cpp:
(WebCore::FormController::formStatesFromStateVector):
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::createElementRenderer):
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::createElementRenderer):
* html/HTMLBRElement.cpp:
(WebCore::HTMLBRElement::createElementRenderer):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::createElementRenderer):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createElementRenderer):
(WebCore::HTMLCanvasElement::setImageBuffer):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::updateNamedElementCache):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::setNamedItemCache):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::createElementRenderer):
(WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::populateEventHandlerNameMap):
(WebCore::HTMLElement::setInnerText):
(WebCore::HTMLElement::createElementRenderer):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::createElementRenderer):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchBlurEvent):
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::updateNamedElementCache):
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::createElementRenderer):
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::createElementRenderer):
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::createElementRenderer):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::createElementRenderer):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::createElementRenderer):
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::HTMLKeygenElement):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createElementRenderer):
(WebCore::HTMLMediaElement::addEventListener):
(WebCore::HTMLMediaElement::setWirelessPlaybackTarget):
(WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::createElementRenderer):
(WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::createForJSConstructor):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::createElementRenderer):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::createElementRenderer):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::createElementRenderer):
(WebCore::HTMLProgressElement::didAddUserAgentShadowRoot):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::createElementRenderer):
(WebCore::HTMLSelectElement::dispatchFocusEvent):
(WebCore::HTMLSelectElement::dispatchBlurEvent):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::createElementRenderer):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::insertRow):
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::insertCell):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::createElementRenderer):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
(WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::createElementRenderer):
* html/HTMLWBRElement.cpp:
(WebCore::HTMLWBRElement::createElementRenderer):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::createDocumentStructure):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::createInputRenderer):
* html/InputType.cpp:
(WebCore::InputType::createInputRenderer):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::setPlaybackTarget):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::createShadowSubtree):
(WebCore::RangeInputType::createInputRenderer):
* html/RubyElement.cpp:
(WebCore::RubyElement::createElementRenderer):
* html/RubyTextElement.cpp:
(WebCore::RubyTextElement::createElementRenderer):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::createInputRenderer):
(WebCore::SearchInputType::createShadowSubtree):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createInputRenderer):
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::buildBubbleTree):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createLinearGradient):
(WebCore::CanvasRenderingContext2D::createRadialGradient):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
* html/parser/AtomicHTMLToken.h:
(WebCore::AtomicHTMLToken::AtomicHTMLToken):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::executeQueuedTasks):
(WebCore::HTMLConstructionSite::insertTextNode):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::append):
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLElementStack::ElementRecord::ElementRecord):
(WebCore::HTMLElementStack::pushCommon):
* html/parser/HTMLElementStack.h:
(WebCore::HTMLElementStack::ElementRecord::releaseNext):
(WebCore::HTMLElementStack::ElementRecord::setNext):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::scan):
(WebCore::HTMLPreloadScanner::scan):
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::HTMLResourcePreloader::preload):
* html/parser/HTMLStackItem.h:
(WebCore::HTMLStackItem::HTMLStackItem):
(WebCore::HTMLStackItem::create):
* html/parser/HTMLToken.h:
(WebCore::HTMLToken::releaseDoctypeData):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::takeScriptToProcess):
(WebCore::HTMLTreeBuilder::processFakeStartTag):
(WebCore::HTMLTreeBuilder::insertPhoneNumberLink):
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::append):
(WebCore::TextDocumentParser::insertFakePreElement):
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::generateViolationReport):
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::createElementRenderer):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineContainerElement::createElementRenderer):
(WebCore::MediaControlVolumeSliderContainerElement::createElementRenderer):
(WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
(WebCore::MediaControlTextTrackContainerElement::createElementRenderer):
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::createTextTrackDisplay):
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::createControls):
(WebCore::MediaControlsApple::showClosedCaptionTrackList):
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterInnerElement::createElementRenderer):
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressInnerElement::createElementRenderer):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::RenderSliderThumb):
(WebCore::SliderThumbElement::createElementRenderer):
(WebCore::SliderContainerElement::createElementRenderer):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerContainer::createElementRenderer):
(WebCore::TextControlInnerTextElement::createElementRenderer):
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::RenderImageControlsButton::RenderImageControlsButton):
(WebCore::ImageControlsButtonElementMac::createElementRenderer):
* html/shadow/mac/ImageControlsRootElementMac.cpp:
(WebCore::RenderImageControls::RenderImageControls):
(WebCore::ImageControlsRootElement::maybeCreate):
(WebCore::ImageControlsRootElementMac::createElementRenderer):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::createElementRenderer):
* html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTTreeBuilder::constructTreeFromToken):
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::inspectImpl):
(WebCore::CommandLineAPIHost::addInspectedObject):
* inspector/DOMEditor.cpp:
(WebCore::DOMEditor::InsertBeforeAction::InsertBeforeAction):
(WebCore::DOMEditor::ReplaceChildNodeAction::ReplaceChildNodeAction):
(WebCore::DOMEditor::insertBefore):
(WebCore::DOMEditor::setOuterHTML):
(WebCore::DOMEditor::replaceChild):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::createDigest):
(WebCore::DOMPatchSupport::removeChildAndMoveToNew):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::addRule):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::getSupportedSystemFontFamilyNames):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
(WebCore::InspectorCSSAgent::buildArrayForRegions):
(WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::consoleCount):
(WebCore::InspectorInstrumentation::stopConsoleTiming):
(WebCore::InspectorInstrumentation::consoleTimeStamp):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::pushNodePathToFrontend):
(WebCore::InspectorDOMAgent::highlightRect):
(WebCore::InspectorDOMAgent::highlightQuad):
(WebCore::InspectorDOMAgent::innerHighlightQuad):
(WebCore::InspectorDOMAgent::highlightSelector):
(WebCore::InspectorDOMAgent::buildObjectForNode):
(WebCore::InspectorDOMAgent::buildArrayForPseudoElements):
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
(WebCore::InspectorDOMAgent::didCommitLoad):
(WebCore::InspectorDOMAgent::didInsertDOMNode):
(WebCore::InspectorDOMAgent::styleAttributeInvalidated):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::didOpenDatabase):
(WebCore::InspectorDatabaseAgent::executeSQL):
* inspector/InspectorDatabaseResource.cpp:
(WebCore::InspectorDatabaseResource::create):
(WebCore::InspectorDatabaseResource::bind):
* inspector/InspectorDatabaseResource.h:
(WebCore::InspectorDatabaseResource::setDatabase):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
* inspector/InspectorHistory.cpp:
(WebCore::InspectorHistory::perform):
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
(WebCore::InspectorIndexedDBAgent::requestDatabase):
(WebCore::InspectorIndexedDBAgent::requestData):
(WebCore::ClearObjectStoreListener::create):
(WebCore::ClearObjectStoreListener::ClearObjectStoreListener):
(WebCore::ClearObjectStore::create):
(WebCore::ClearObjectStore::ClearObjectStore):
(WebCore::InspectorIndexedDBAgent::clearObjectStore):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
(WebCore::InspectorInstrumentation::sessionCreatedImpl):
(WebCore::InspectorInstrumentation::sessionLoadedImpl):
(WebCore::InspectorInstrumentation::sessionModifiedImpl):
(WebCore::InspectorInstrumentation::segmentCreatedImpl):
(WebCore::InspectorInstrumentation::segmentCompletedImpl):
(WebCore::InspectorInstrumentation::segmentLoadedImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didOpenDatabase):
(WebCore::InspectorInstrumentation::sessionCreated):
(WebCore::InspectorInstrumentation::sessionLoaded):
(WebCore::InspectorInstrumentation::sessionModified):
(WebCore::InspectorInstrumentation::segmentCreated):
(WebCore::InspectorInstrumentation::segmentCompleted):
(WebCore::InspectorInstrumentation::segmentLoaded):
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
* inspector/InspectorNetworkAgent.cpp:
(WebCore::buildObjectForResourceResponse):
(WebCore::buildObjectForCachedResource):
(WebCore::InspectorNetworkAgent::buildInitiatorObject):
(WebCore::InspectorNetworkAgent::willSendWebSocketHandshakeRequest):
(WebCore::InspectorNetworkAgent::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorNetworkAgent::didReceiveWebSocketFrame):
(WebCore::InspectorNetworkAgent::didSendWebSocketFrame):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::highlightNodeList):
(WebCore::InspectorOverlay::highlightQuad):
(WebCore::buildObjectForHighlight):
(WebCore::buildObjectForFlowRegions):
(WebCore::InspectorOverlay::drawPaintRects):
(WebCore::buildArrayForRendererFragments):
(WebCore::buildObjectForShapeOutside):
(WebCore::buildObjectForElementData):
(WebCore::InspectorOverlay::buildHighlightObjectForNode):
(WebCore::InspectorOverlay::buildObjectForHighlightedNodes):
(WebCore::InspectorOverlay::reset):
(WebCore::InspectorOverlay::evaluateInOverlay):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/InspectorReplayAgent.cpp:
(WebCore::buildInspectorObjectForSession):
(WebCore::SerializeInputToJSONFunctor::operator()):
(WebCore::SerializeInputToJSONFunctor::returnValue):
(WebCore::buildInspectorObjectForSegment):
(WebCore::InspectorReplayAgent::switchSession):
(WebCore::InspectorReplayAgent::insertSessionSegment):
(WebCore::InspectorReplayAgent::removeSessionSegment):
(WebCore::InspectorReplayAgent::getSessionData):
(WebCore::InspectorReplayAgent::getSegmentData):
* inspector/InspectorStyleSheet.cpp:
(WebCore::asCSSRuleList):
(WebCore::InspectorStyle::create):
(WebCore::InspectorStyle::buildObjectForStyle):
(WebCore::InspectorStyle::buildArrayForComputedStyle):
(WebCore::InspectorStyle::styleWithProperties):
(WebCore::InspectorStyleSheet::create):
(WebCore::InspectorStyleSheet::InspectorStyleSheet):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
(WebCore::buildObjectForSelectorHelper):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::ensureSourceData):
(WebCore::InspectorStyleSheet::buildArrayForRuleList):
(WebCore::InspectorStyleSheet::collectFlatRules):
(WebCore::InspectorStyleSheetForInlineStyle::create):
(WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::startProfiling):
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
(WebCore::InspectorTimelineAgent::appendRecord):
(WebCore::InspectorTimelineAgent::sendEvent):
(WebCore::InspectorTimelineAgent::createRecordEntry):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
* inspector/InspectorTimelineAgent.h:
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::addResourceSharedBuffer):
* inspector/NetworkResourcesData.h:
(WebCore::NetworkResourcesData::ResourceData::setDecoder):
(WebCore::NetworkResourcesData::ResourceData::setBuffer):
* inspector/TimelineRecordFactory.cpp:
(WebCore::buildInspectorObject):
(WebCore::buildProfileInspectorObject):
* inspector/WebInjectedScriptManager.cpp:
(WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
* loader/ContentFilter.cpp:
(WebCore::ContentFilter::createIfEnabled):
(WebCore::ContentFilter::ContentFilter):
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCache::appendEntry):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::subresources):
(WebCore::DocumentLoader::installContentFilterUnblockHandler):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setQuickLookHandle):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::didReceiveResponse):
* loader/HistoryController.cpp:
(WebCore::HistoryController::updateBackForwardListClippedAtTarget):
(WebCore::HistoryController::pushState):
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::MediaResourceLoader):
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::timerFired):
(WebCore::NavigationScheduler::schedule):
(WebCore::NavigationScheduler::cancel):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::willSendRequest):
* loader/PolicyCallback.cpp:
(WebCore::PolicyCallback::set):
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::checkContentPolicy):
* loader/PolicyChecker.h:
(WebCore::PolicyChecker::setContentFilterUnblockHandler):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest):
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
(WebCore::ThreadableLoaderOptions::isolatedCopy):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::saveParsedStyleSheet):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::syncThreadMainLoop):
* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::createElementRenderer):
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::createElementRenderer):
* mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::createElementRenderer):
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::createElementRenderer):
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createElementRenderer):
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
* page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::install):
* page/DOMWindow.cpp:
(WebCore::PostMessageTimer::PostMessageTimer):
(WebCore::PostMessageTimer::event):
(WebCore::DOMWindow::postMessage):
(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::setInterval):
(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::showModalDialog):
* page/DebugPageOverlays.cpp:
(WebCore::MouseWheelRegionOverlay::updateRegion):
(WebCore::NonFastScrollableRegionOverlay::updateRegion):
(WebCore::DebugPageOverlays::ensureRegionOverlayForFrame):
* page/DragController.cpp:
(WebCore::documentFragmentFromDragData):
(WebCore::DragController::concludeEditDrag):
* page/Frame.cpp:
(WebCore::Frame::setView):
* page/FrameView.cpp:
(WebCore::FrameView::sendResizeEventIfNeeded):
(WebCore::FrameView::updateOverflowStatus):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setSessionStorage):
(WebCore::Page::setStorageNamespaceProvider):
(WebCore::Page::setVisitedLinkStore):
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
(WebCore::PageConsoleClient::messageWithTypeAndLevel):
(WebCore::PageConsoleClient::count):
(WebCore::PageConsoleClient::profileEnd):
(WebCore::PageConsoleClient::timeEnd):
(WebCore::PageConsoleClient::timeStamp):
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::installPageOverlay):
* page/TextIndicator.cpp:
(WebCore::takeSnapshot):
* page/UserContentController.cpp:
(WebCore::UserContentController::addUserScript):
(WebCore::UserContentController::addUserStyleSheet):
* page/UserScript.h:
(WebCore::UserScript::UserScript):
* page/UserStyleSheet.h:
(WebCore::UserStyleSheet::UserStyleSheet):
* page/WheelEventTestTrigger.cpp:
(WebCore::WheelEventTestTrigger::setTestCallbackAndStartNotificationTimer):
(WebCore::WheelEventTestTrigger::triggerTestTimerFired):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
(WebCore::AnimationControllerPrivate::addElementChangeToDispatch):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFilter):
(WebCore::crossfadeBlend):
(WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
(WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::RingBuffer::append):
(WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::clearTextIndicator):
* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::updateSnapOffsetsForScrollableArea):
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::setRemovedNodes):
* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::dispatchBarrier):
(WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::commitNewTreeState):
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::commitNewTreeState):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeState):
* platform/CalculationValue.cpp:
(WebCore::CalculationValue::create):
* platform/CalculationValue.h:
(WebCore::CalculationValue::CalculationValue):
(WebCore::CalcExpressionBinaryOperation::CalcExpressionBinaryOperation):
* platform/DragImage.cpp:
(WebCore::createDragImageFromSnapshot):
* platform/KeyedCoding.h:
(WebCore::KeyedDecoder::decodeObjects):
* platform/Length.cpp:
(WebCore::Length::Length):
(WebCore::Length::blendMixedTypes):
* platform/LengthSize.h:
(WebCore::LengthSize::LengthSize):
(WebCore::LengthSize::setWidth):
(WebCore::LengthSize::setHeight):
* platform/MainThreadSharedTimer.cpp:
(WebCore::MainThreadSharedTimer::setFiredFunction):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::setHorizontalSnapOffsets):
(WebCore::ScrollableArea::setVerticalSnapOffsets):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::createWithContentsOfFile):
(WebCore::SharedBuffer::maybeTransferMappedFileData):
* platform/Supplementable.h:
(WebCore::Supplement::provideTo):
(WebCore::Supplementable::provideSupplement):
* platform/Timer.h:
(WebCore::Timer::Timer):
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
* platform/URL.h:
(WebCore::URLCapture::releaseURL):
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::AudioBus):
* platform/audio/HRTFDatabase.cpp:
(WebCore::HRTFDatabase::HRTFDatabase):
* platform/audio/HRTFElevation.cpp:
(WebCore::HRTFElevation::createForSubject):
(WebCore::HRTFElevation::createByInterpolatingSlices):
* platform/audio/HRTFElevation.h:
(WebCore::HRTFElevation::HRTFElevation):
* platform/audio/HRTFKernel.cpp:
(WebCore::HRTFKernel::createInterpolatedKernel):
* platform/audio/HRTFKernel.h:
(WebCore::HRTFKernel::create):
(WebCore::HRTFKernel::HRTFKernel):
* platform/audio/ReverbConvolver.cpp:
(WebCore::ReverbConvolver::ReverbConvolver):
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper dealloc]):
* platform/cf/KeyedDecoderCF.cpp:
(WebCore::KeyedDecoderCF::KeyedDecoderCF):
* platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
(WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler):
* platform/glib/KeyedDecoderGlib.cpp:
(WebCore::KeyedDecoderGlib::dictionaryFromGVariant):
* platform/graphics/FloatPolygon.cpp:
(WebCore::FloatPolygon::FloatPolygon):
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
(WebCore::createAndFillGlyphPage):
(WebCore::Font::systemFallbackFontForCharacter):
* platform/graphics/Font.h:
(WebCore::Font::create):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::purgeInactiveFontData):
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascadeCacheEntry::FontCascadeCacheEntry):
(WebCore::retrieveOrAddCachedFonts):
(WebCore::FontCascade::update):
* platform/graphics/FontCascadeFonts.cpp:
(WebCore::realizeNextFallback):
* platform/graphics/FontCascadeFonts.h:
(WebCore::FontCascadeFonts::create):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::setFeatureSettings):
* platform/graphics/FontFeatureSettings.cpp:
(WebCore::FontFeature::FontFeature):
(WebCore::FontFeatureSettings::insert):
* platform/graphics/FontRanges.h:
(WebCore::FontRanges::Range::Range):
* platform/graphics/GLContext.cpp:
(WebCore::GLContext::createContextForWindow):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::setStrokePattern):
(WebCore::GraphicsContext::setFillPattern):
(WebCore::GraphicsContext::setStrokeGradient):
(WebCore::GraphicsContext::setFillGradient):
(WebCore::GraphicsContext::drawConsumingImageBuffer):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::KeyframeValueList::insert):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setWirelessPlaybackTarget):
(WebCore::MediaPlayer::createResourceLoader):
* platform/graphics/PlatformMediaResourceLoader.h:
(WebCore::PlatformMediaResourceLoader::PlatformMediaResourceLoader):
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::CDMPrivateMediaSourceAVFObjC::createSession):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setWirelessPlaybackTarget):
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setContentsScale):
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::takeSurface):
(WebCore::IOSurfacePool::addSurface):
(WebCore::IOSurfacePool::insertSurfaceIntoPool):
(WebCore::IOSurfacePool::collectInUseSurfaces):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::copyImage):
(WebCore::ImageBuffer::sinkIntoImage):
(WebCore::ImageBuffer::sinkIntoNativeImage):
(WebCore::ImageBuffer::drawConsuming):
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::moveToPool):
(IOSurface::createFromImageBuffer):
(IOSurface::convertToFormat):
* platform/graphics/efl/CairoUtilitiesEfl.cpp:
(WebCore::evasObjectFromCairoImageSurface):
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::setContextLostCallback):
* platform/graphics/efl/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::setContextLostCallback):
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createWindowContext):
(WebCore::GLContextEGL::createPixmapContext):
(WebCore::GLContextEGL::createContext):
(WebCore::GLContextEGL::GLContextEGL):
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware):
* platform/graphics/filters/Filter.h:
(WebCore::Filter::setSourceImage):
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::createWindowContext):
(WebCore::GLContextGLX::createPbufferContext):
(WebCore::GLContextGLX::createPixmapContext):
(WebCore::GLContextGLX::createContext):
(WebCore::GLContextGLX::GLContextGLX):
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::Texture):
(WebCore::Texture::create):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
* platform/graphics/gstreamer/MediaPlayerRequestInstallMissingPluginsCallback.h:
(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::create):
(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::MediaPlayerRequestInstallMissingPluginsCallback):
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(VideoRenderRequestScheduler::render):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::setWirelessPlaybackTarget):
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
(WebCore::Extensions3DOpenGLES::setEXTContextLostCallback):
* platform/graphics/surfaces/GLTransportSurface.cpp:
(WebCore::GLTransportSurface::createTransportSurface):
(WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
* platform/graphics/surfaces/egl/EGLSurface.cpp:
(WebCore::EGLTransportSurface::createTransportSurface):
(WebCore::EGLTransportSurface::createTransportSurfaceClient):
* platform/graphics/texmap/BitmapTexturePool.cpp:
(WebCore::BitmapTexturePool::BitmapTexturePool):
* platform/graphics/texmap/BitmapTexturePool.h:
(WebCore::BitmapTexturePool::Entry::Entry):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::removeAllChildren):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
(WebCore::TextureMapperPlatformLayerBuffer::setUnmanagedBufferDataHolder):
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
(WebCore::TextureMapperPlatformLayerProxy::pushNextBuffer):
(WebCore::TextureMapperPlatformLayerProxy::getAvailableBuffer):
(WebCore::TextureMapperPlatformLayerProxy::releaseUnusedBuffersTimerFired):
(WebCore::TextureMapperPlatformLayerProxy::swapBuffer):
(WebCore::TextureMapperPlatformLayerProxy::scheduleUpdateOnCompositorThread):
(WebCore::TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
* platform/graphics/wayland/PlatformDisplayWayland.cpp:
(WebCore::PlatformDisplayWayland::createSharingGLContext):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/win/SharedGDIObject.h:
(WebCore::SharedGDIObject::create):
(WebCore::SharedGDIObject::SharedGDIObject):
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::Font::platformCreateScaledFont):
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::deviceAdded):
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::create):
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::create):
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::currentFrameImage):
* platform/network/BlobData.h:
(WebCore::RawData::create):
(WebCore::RawData::RawData):
* platform/network/BlobPart.h:
(WebCore::BlobPart::BlobPart):
(WebCore::BlobPart::moveData):
* platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
(WebCore::DataURLDecoder::DecodingResultDispatcher::DecodingResultDispatcher):
(WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
(WebCore::DataURLDecoder::createDecodeTask):
(WebCore::DataURLDecoder::decode):
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::adopt):
* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
* platform/network/ResourceHandle.h:
(WebCore::ResourceHandle::setQuickLookHandle):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::adopt):
(WebCore::ResourceRequestBase::copyData):
(WebCore::ResourceRequestBase::setHTTPHeaderFields):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::copyData):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::advanceCurrentStream):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::releaseConnectionForDownload):
* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::loadIndex):
(WebCore::CurlCacheManager::didReceiveResponse):
* platform/network/curl/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::SocketData::SocketData):
* platform/network/curl/SocketStreamHandleCurl.cpp:
(WebCore::SocketStreamHandle::platformSend):
(WebCore::SocketStreamHandle::readData):
(WebCore::SocketStreamHandle::sendData):
(WebCore::SocketStreamHandle::didReceiveData):
(WebCore::SocketStreamHandle::createCopy):
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::setSoupNetworkSession):
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::createLabelVector):
(WebCore::createFallbackMonthLabels):
(WebCore::createFallbackAMPMLabels):
* platform/win/WCDataObject.cpp:
(WebCore::WCDataObject::SetData):
* plugins/DOMMimeType.cpp:
(WebCore::DOMMimeType::DOMMimeType):
* plugins/DOMMimeType.h:
(WebCore::DOMMimeType::create):
* plugins/DOMPlugin.cpp:
(WebCore::DOMPlugin::DOMPlugin):
* plugins/DOMPlugin.h:
(WebCore::DOMPlugin::create):
* plugins/PluginData.cpp:
(WebCore::PluginData::publiclyVisiblePlugins):
* rendering/ClipPathOperation.h:
* rendering/FloatingObjects.cpp:
(WebCore::FloatingObjects::moveAllToFloatInfoMap):
(WebCore::FloatingObjects::add):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::RenderAttachment):
* rendering/RenderBlock.cpp:
(WebCore::OverflowEventDispatcher::~OverflowEventDispatcher):
(WebCore::RenderBlock::RenderBlock):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::layoutLineGridBox):
(WebCore::RenderBlockFlow::insertFloatingObject):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::setLineGridBox):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createAndAppendRootInlineBox):
(WebCore::constructBidiRunsForSegment):
(WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::RenderBox):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::RenderBoxModelObject):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::RenderDetailsMarker):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
(WebCore::RenderElement::createFor):
(WebCore::RenderElement::setStyle):
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
* rendering/RenderElement.h:
(WebCore::RenderElement::setStyleInternal):
(WebCore::RenderElement::setAnimatableStyle):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::createForApplet):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::RenderFieldset):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::RenderFileUploadControl):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::RenderFlexibleBox):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
* rendering/RenderFrame.cpp:
(WebCore::RenderFrame::RenderFrame):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::RenderFrameBase):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::RenderFrameSet):
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::RenderFullScreen):
(WebCore::RenderFullScreen::createPlaceholder):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::RenderGrid):
(WebCore::RenderGrid::computeFlexFactorUnitSize):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::RenderHTMLCanvas):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::RenderIFrame):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::RenderImage):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::RenderInline):
(WebCore::updateStyleOfAnonymousBlockContinuations):
(WebCore::RenderInline::addChildIgnoringContinuation):
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::createAndAppendInlineFlowBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::RenderLayerModelObject):
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::RenderLineBreak):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::styleDidChange):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::RenderListMarker):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::RenderMedia):
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
(WebCore::RenderMediaControlTimelineContainer::RenderMediaControlTimelineContainer):
(WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::RenderMenuList):
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::RenderMeter):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
* rendering/RenderMultiColumnSpannerPlaceholder.cpp:
(WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::RenderNamedFlowFragment):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::updateWritingMode):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::RenderProgress):
* rendering/RenderPtr.h:
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::RenderQuote):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
* rendering/RenderRegionSet.cpp:
(WebCore::RenderRegionSet::RenderRegionSet):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::RenderReplaced):
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::RenderReplica):
* rendering/RenderRuby.cpp:
(WebCore::RenderRubyAsInline::RenderRubyAsInline):
(WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::RenderRubyBase):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::createRubyBase):
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::RenderRubyText):
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::RenderScrollbarPart):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::RenderSearchField):
(WebCore::RenderSearchField::updateCancelButtonVisibility):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::RenderSlider):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::RenderTable):
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::RenderTableCaption):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::RenderTableCell):
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::RenderTableCol):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::RenderTableRow):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::RenderTableSection):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::getThemePartFromCache):
(WebCore::RenderThemeEfl::loadTheme):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::RenderVTTCue):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::RenderVideo):
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
(WebCore::RenderView::updateSelectionForSubtrees):
(WebCore::RenderView::applySubtreeSelection):
* rendering/RenderView.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::RenderWidget):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::placeEllipsis):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::RenderMathMLFenced):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::RenderMathMLFraction):
* rendering/mathml/RenderMathMLMath.cpp:
(WebCore::RenderMathMLMath::RenderMathMLMath):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::RenderMathMLMenclose):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::RenderMathMLOperator):
(WebCore::RenderMathMLOperator::updateStyle):
* rendering/mathml/RenderMathMLRadicalOperator.cpp:
(WebCore::RenderMathMLRadicalOperator::RenderMathMLRadicalOperator):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::RenderMathMLRoot):
(WebCore::RenderMathMLRoot::updateStyle):
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::RenderMathMLRow):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::RenderMathMLScripts):
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::RenderMathMLSpace):
* rendering/mathml/RenderMathMLSquareRoot.cpp:
(WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot):
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::RenderMathMLToken):
(WebCore::RenderMathMLToken::updateStyle):
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver):
* rendering/shapes/PolygonShape.h:
(WebCore::PolygonShape::PolygonShape):
* rendering/shapes/RasterShape.h:
* rendering/shapes/Shape.cpp:
(WebCore::createPolygonShape):
(WebCore::Shape::createShape):
(WebCore::Shape::createRasterShape):
(WebCore::Shape::createBoxShape):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeCenterCoordinate::updateComputedLength):
(WebCore::BasicShapeCircle::blend):
(WebCore::BasicShapeEllipse::blend):
(WebCore::BasicShapePolygon::blend):
(WebCore::BasicShapePath::BasicShapePath):
(WebCore::BasicShapePath::blend):
(WebCore::BasicShapeInset::blend):
* rendering/style/BasicShapes.h:
* rendering/style/ContentData.cpp:
(WebCore::ContentData::clone):
(WebCore::ImageContentData::createContentRenderer):
(WebCore::TextContentData::createContentRenderer):
(WebCore::QuoteContentData::createContentRenderer):
* rendering/style/ContentData.h:
(WebCore::ContentData::setNext):
* rendering/style/DataRef.h:
(WebCore::DataRef::DataRef):
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::~FillLayer):
* rendering/style/FillLayer.h:
(WebCore::FillLayer::setXPosition):
(WebCore::FillLayer::setYPosition):
(WebCore::FillLayer::setNext):
* rendering/style/NinePieceImage.cpp:
(WebCore::NinePieceImage::NinePieceImage):
* rendering/style/NinePieceImage.h:
(WebCore::NinePieceImage::setImageSlices):
(WebCore::NinePieceImage::setBorderSlices):
(WebCore::NinePieceImage::setOutset):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setWillChange):
(WebCore::RenderStyle::appendContent):
(WebCore::RenderStyle::setContent):
(WebCore::RenderStyle::setTextShadow):
(WebCore::RenderStyle::setBoxShadow):
(WebCore::RenderStyle::setWordSpacing):
(WebCore::RenderStyle::setScrollSnapPointsX):
(WebCore::RenderStyle::setScrollSnapPointsY):
(WebCore::RenderStyle::setScrollSnapDestination):
(WebCore::RenderStyle::setScrollSnapCoordinates):
* rendering/style/RenderStyle.h:
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::setShadow):
* rendering/style/ShadowData.h:
(WebCore::ShadowData::setNext):
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::StyleGeneratedImage):
* rendering/style/StyleGeneratedImage.h:
* rendering/style/StyleReflection.h:
(WebCore::StyleReflection::setOffset):
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::RenderSVGBlock):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::RenderSVGContainer):
* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::RenderSVGEllipse):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::RenderSVGForeignObject):
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::RenderSVGGradientStop):
* rendering/svg/RenderSVGHiddenContainer.cpp:
(WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::RenderSVGImage):
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::RenderSVGInline):
(WebCore::RenderSVGInline::createInlineFlowBox):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::createTextBox):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::RenderSVGModelObject):
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::RenderSVGPath):
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::RenderSVGRect):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::RenderSVGResourceFilter):
(WebCore::RenderSVGResourceFilter::buildPrimitives):
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::postApplyResource):
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::RenderSVGResourceGradient):
(WebCore::createMaskAndSwapContextForTextGradient):
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
(WebCore::RenderSVGResourceLinearGradient::RenderSVGResourceLinearGradient):
* rendering/svg/RenderSVGResourceMarker.cpp:
(WebCore::RenderSVGResourceMarker::RenderSVGResourceMarker):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::RenderSVGResourceMasker):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::RenderSVGResourcePattern):
(WebCore::RenderSVGResourcePattern::buildPattern):
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
(WebCore::RenderSVGResourceRadialGradient::RenderSVGResourceRadialGradient):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::RenderSVGRoot):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::RenderSVGShape):
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::RenderSVGText):
(WebCore::RenderSVGText::createRootInlineBox):
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::RenderSVGTextPath):
* rendering/svg/RenderSVGTransformableContainer.cpp:
(WebCore::RenderSVGTransformableContainer::RenderSVGTransformableContainer):
* rendering/svg/RenderSVGViewportContainer.cpp:
(WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::addResourcesFromRenderer):
* replay/CapturingInputCursor.cpp:
(WebCore::CapturingInputCursor::CapturingInputCursor):
(WebCore::CapturingInputCursor::create):
(WebCore::CapturingInputCursor::storeInput):
* replay/FunctorInputCursor.h:
(WebCore::FunctorInputCursor::FunctorInputCursor):
* replay/MemoizedDOMResult.cpp:
(JSC::InputTraits<MemoizedDOMResultBase>::decode):
* replay/ReplayController.cpp:
(WebCore::ReplayController::createSegment):
* replay/ReplayInputCreationMethods.cpp:
(WebCore::InitialNavigation::createFromPage):
* replay/ReplaySession.cpp:
(WebCore::ReplaySession::appendSegment):
(WebCore::ReplaySession::insertSegment):
* replay/ReplayingInputCursor.cpp:
(WebCore::ReplayingInputCursor::ReplayingInputCursor):
(WebCore::ReplayingInputCursor::create):
* replay/SegmentedInputStorage.cpp:
(WebCore::SegmentedInputStorage::store):
* replay/SerializationMethods.cpp:
(JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
* replay/UserInputBridge.cpp:
(WebCore::UserInputBridge::handleMousePressEvent):
(WebCore::UserInputBridge::handleMouseReleaseEvent):
(WebCore::UserInputBridge::handleMouseMoveEvent):
(WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
(WebCore::UserInputBridge::handleKeyEvent):
(WebCore::UserInputBridge::handleWheelEvent):
* storage/Storage.cpp:
(WebCore::Storage::create):
(WebCore::Storage::Storage):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleResolveTree.cpp:
(WebCore::Style::createRendererIfNeeded):
(WebCore::Style::setBeforeOrAfterPseudoElement):
(WebCore::Style::resolveTree):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::createElementRenderer):
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::createElementRenderer):
* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::constructFromString):
(WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
* svg/SVGAnimatedTypeAnimator.cpp:
(WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::createElementRenderer):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::createElementRenderer):
* svg/SVGDefsElement.cpp:
(WebCore::SVGDefsElement::createElementRenderer):
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
(WebCore::SVGDocumentExtensions::addElementReferencingTarget):
(WebCore::SVGDocumentExtensions::rebuildElements):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::createElementRenderer):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::createElementRenderer):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::createElementRenderer):
* svg/SVGFontElement.cpp:
(WebCore::SVGKerningMap::insert):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::createElementRenderer):
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::createElementRenderer):
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::createElementRenderer):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::createElementRenderer):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::createElementRenderer):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::createElementRenderer):
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::createElementRenderer):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::createElementRenderer):
* svg/SVGPathUtilities.cpp:
(WebCore::appendSVGPathByteStreamFromSVGPathSeg):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::createElementRenderer):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::createElementRenderer):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::createElementRenderer):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::createElementRenderer):
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::createElementRenderer):
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::createElementRenderer):
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::createElementRenderer):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefTargetEventListener::attach):
(WebCore::SVGTRefElement::createElementRenderer):
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::createElementRenderer):
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::createElementRenderer):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::createElementRenderer):
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::releaseResult):
(WebCore::SVGToOTFFontConverter::appendKERNSubtable):
(WebCore::SVGToOTFFontConverter::processGlyphElement):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::createElementRenderer):
(WebCore::SVGUseElement::cloneTarget):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::~SVGImage):
(WebCore::SVGImage::drawPatternForContainer):
* testing/Internals.cpp:
(WebCore::Internals::insertAuthorCSS):
(WebCore::Internals::insertUserCSS):
(WebCore::Internals::queueMicroTask):
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::postMessage):
* workers/Worker.cpp:
(WebCore::Worker::create):
(WebCore::Worker::postMessage):
* workers/WorkerEventQueue.cpp:
(WebCore::WorkerEventQueue::EventDispatcher::EventDispatcher):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::postTask):
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::setInterval):
(WebCore::WorkerGlobalScope::importScripts):
(WebCore::WorkerGlobalScope::addMessage):
(WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postTaskToLoader):
(WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::workerThreadCreated):
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::postTask):
(WebCore::WorkerRunLoop::postTaskAndTerminate):
(WebCore::WorkerRunLoop::postTaskForMode):
(WebCore::WorkerRunLoop::Task::Task):
* xml/DOMParser.cpp:
(WebCore::DOMParser::parseFromString):
* xml/NativeXPathNSResolver.cpp:
(WebCore::NativeXPathNSResolver::NativeXPathNSResolver):
* xml/NativeXPathNSResolver.h:
(WebCore::NativeXPathNSResolver::create):
* xml/XMLErrors.cpp:
(WebCore::XMLErrors::insertErrorMessageBlock):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseBlob):
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
* xml/XMLTreeViewer.cpp:
(WebCore::XMLTreeViewer::transformDocumentToTreeView):
* xml/XPathExpression.cpp:
(WebCore::XPathExpression::XPathExpression):
(WebCore::XPathExpression::createExpression):
* xml/XPathExpressionNode.cpp:
(WebCore::XPath::Expression::setSubexpressions):
* xml/XPathExpressionNode.h:
(WebCore::XPath::Expression::addSubexpression):
* xml/XPathFunctions.cpp:
(WebCore::XPath::Function::setArguments):
(WebCore::XPath::FunId::evaluate):
(WebCore::XPath::Function::create):
* xml/XPathGrammar.y:
* xml/XPathNodeSet.cpp:
(WebCore::XPath::NodeSet::sort):
(WebCore::XPath::NodeSet::traversalSort):
* xml/XPathNodeSet.h:
(WebCore::XPath::NodeSet::NodeSet):
(WebCore::XPath::NodeSet::append):
* xml/XPathParser.cpp:
(WebCore::XPath::Parser::parseStatement):
* xml/XPathParser.h:
(WebCore::XPath::Parser::setParseResult):
* xml/XPathPath.cpp:
(WebCore::XPath::Filter::Filter):
(WebCore::XPath::Filter::evaluate):
(WebCore::XPath::LocationPath::evaluate):
(WebCore::XPath::LocationPath::appendStep):
(WebCore::XPath::LocationPath::prependStep):
(WebCore::XPath::Path::Path):
* xml/XPathPredicate.cpp:
(WebCore::XPath::StringExpression::StringExpression):
(WebCore::XPath::Negative::Negative):
(WebCore::XPath::NumericOp::NumericOp):
(WebCore::XPath::EqTestOp::EqTestOp):
(WebCore::XPath::LogicalOp::LogicalOp):
(WebCore::XPath::Union::Union):
* xml/XPathStep.cpp:
(WebCore::XPath::Step::Step):
(WebCore::XPath::Step::optimize):
(WebCore::XPath::optimizeStepPair):
(WebCore::XPath::Step::evaluate):
* xml/XPathStep.h:
(WebCore::XPath::Step::NodeTest::NodeTest):
(WebCore::XPath::Step::NodeTest::operator=):
* xml/XPathValue.h:
(WebCore::XPath::Value::Value):
(WebCore::XPath::Value::Data::create):
(WebCore::XPath::Value::Data::Data):
* xml/XSLTProcessor.h:
(WebCore::XSLTProcessor::setXSLStyleSheet):
(WebCore::XSLTProcessor::importStylesheet):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::append):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::PendingCallbacks::appendStartElementNSCallback):
(WebCore::PendingCallbacks::appendCharactersCallback):
(WebCore::PendingCallbacks::appendProcessingInstructionCallback):
(WebCore::PendingCallbacks::appendCDATABlockCallback):
(WebCore::PendingCallbacks::appendCommentCallback):
(WebCore::PendingCallbacks::appendInternalSubsetCallback):
(WebCore::PendingCallbacks::appendErrorCallback):
(WebCore::OffsetBuffer::OffsetBuffer):
(WebCore::openFunc):
(WebCore::XMLDocumentParser::cdataBlock):
(WebCore::XMLDocumentParser::comment):
(WebCore::parseAttributes):
2016-01-01 Simon Fraser <simon.fraser@apple.com>
Fix naming in HistoryItem to refer to scrollPositions
https://bugs.webkit.org/show_bug.cgi?id=152646
Reviewed by Zalan Bujtas.
HistoryItem stores a scrollPosition, so call it that.
No behavior change.
* history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
(WebCore::HistoryItem::scrollPosition):
(WebCore::HistoryItem::setScrollPosition):
(WebCore::HistoryItem::clearScrollPosition):
(WebCore::HistoryItem::scrollPoint): Deleted.
(WebCore::HistoryItem::setScrollPoint): Deleted.
(WebCore::HistoryItem::clearScrollPoint): Deleted.
* history/HistoryItem.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
(WebCore::HistoryController::clearScrollPositionAndViewState):
(WebCore::HistoryController::restoreScrollPositionAndViewState):
(WebCore::HistoryController::updateForClientRedirect):
2016-01-01 Zalan Bujtas <zalan@apple.com>
Simple line layout: Add support for toggling simple line layout from command line.
https://bugs.webkit.org/show_bug.cgi?id=152636
Reviewed by Simon Fraser.
No change in functionality.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::toggleSimpleLineLayout):
2016-01-01 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/database-deletepending-flag.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152600
Reviewed by Alex Christensen.
No new tests (At least one failing test now passes, and at least 2 crashing tests now timeout).
* Modules/indexeddb/server/IDBBackingStore.h:
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::deleteBackingStore):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2016-01-01 Simon Fraser <simon.fraser@apple.com>
Fix reload and programmatic scrolling in RTL documents
https://bugs.webkit.org/show_bug.cgi?id=152639
Reviewed by Zalan Bujtas.
Reloading a left-scrolled RTL document would cause the content to appear
at an odd offset, and programmatic sideways scrolls in RTL documents also
jumped to the wrong location.
Fix by resolving offset/position confusion in ScrollableArea::scrollPositionChanged()
and the scrolling tree.
ScrollableArea::scrollPositionChanged() was erroneously passing a scrollPosition
to setScrollOffset().
ScrollingTreeFrameScrollingNode* were confused about offsets and positions. It
turns out that the layer position is just -scrollPosition, but minimumScrollPosition()
and maximumScrollPosition() need fixing to return positions, not offsets.
ScrollingTreeFrameScrollingNode::viewToContentsOffset() was also doing incorrect
math with scrollOrigin, which was detected by a failing test.
Add more logging to the Scrolling channel.
Tests: fast/scrolling/programmatic-document-rtl-scroll.html
fast/scrolling/programmatic-document-rtl-scrollIntoView.html
fast/scrolling/scroll-position-on-reload-rtl.html
* page/FrameView.cpp:
(WebCore::FrameView::requestScrollPositionUpdate):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::scrollBy):
(WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset):
* page/scrolling/ScrollingTreeFrameScrollingNode.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollPosition):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollLayerPosition):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::minimumScrollPosition):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::maximumScrollPosition):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollBy):
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollPosition):
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
(WebCore::ScrollingTreeFrameScrollingNodeMac::minimumScrollPosition):
(WebCore::ScrollingTreeFrameScrollingNodeMac::maximumScrollPosition):
* platform/ScrollView.cpp:
(WebCore::ScrollView::setScrollOffset):
(WebCore::ScrollView::scrollTo):
(WebCore::ScrollView::setScrollPosition):
(WebCore::ScrollView::updateScrollbars):
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollPositionChanged):
(WebCore::ScrollableArea::setScrollOffsetFromAnimation):
(WebCore::ScrollableArea::scrollPositionFromOffset):
(WebCore::ScrollableArea::scrollOffsetFromPosition):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollPositionFromOffset):
(WebCore::ScrollableArea::scrollOffsetFromPosition):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::setScrollOffset):
* rendering/RenderListBox.h:
2016-01-01 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r194448): Scrolling overflow:scroll goes too far
https://bugs.webkit.org/show_bug.cgi?id=152645
Reviewed by Zalan Bujtas.
Fix a bug introduced in r194448: use the scrollPosition, not the scrollOrigin
to compute the overhang amount.
Test: fast/scrolling/overflow-scroll-past-max.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::overhangAmount):
2015-12-22 Brent Fulgham <bfulgham@apple.com>
[WebGL] Blacklisted OpenGL contexts are not safe to use
https://bugs.webkit.org/show_bug.cgi?id=152513
<rdar://problem/23127838>
Reviewed by Zalan Bujtas.
When the GPU has blacklisted an OpenGL context, it is not safe to use -- even to
attempt to release GL resources. Instead, our only correct behavior is to terminate
the WebProcess.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): If the context was lost
because the GPU blacklisted it, terminate the process.
2016-01-01 Jeff Miller <jeffm@apple.com>
Update user-visible copyright strings to include 2016
https://bugs.webkit.org/show_bug.cgi?id=152531
Reviewed by Alexey Proskuryakov.
* Info.plist:
2015-12-31 Simon Fraser <simon.fraser@apple.com>
Change RenderLayer::scrollTo() to take a ScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=152633
Reviewed by Zalan Bujtas.
RenderLayer::scrollTo() took x and y offsets. Change this to take a position,
like ScrollView::scrollTo() and fix the one caller.
Preserve the dubious behavior of the adjustForIOSCaretWhenScrolling() code by converting
to and from offsets, even though testing suggests that this code can just be removed,
even with an extra wide caret for testing.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::setScrollOffset):
* rendering/RenderLayer.h:
2015-12-31 Simon Fraser <simon.fraser@apple.com>
Rename documentScrollOffsetRelativeTo* functions
https://bugs.webkit.org/show_bug.cgi?id=152632
Reviewed by Zalan Bujtas.
ScrollView::documentScrollOffsetRelativeTo* functions return scroll positions,
not offsets, so rename them and fix their return types, and fix callers. Make
their code more similar.
* platform/ScrollView.cpp:
(WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
(WebCore::ScrollView::documentScrollPositionRelativeToScrollableAreaOrigin):
(WebCore::ScrollView::viewToContents):
(WebCore::ScrollView::contentsToView):
(WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin): Deleted.
(WebCore::ScrollView::documentScrollOffsetRelativeToScrollableAreaOrigin): Deleted.
* platform/ScrollView.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
2015-12-31 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Fix incorrect scrollPosition handling
https://bugs.webkit.org/show_bug.cgi?id=152630
Reviewed by Zalan Bujtas.
WebPage::updateVisibleContentRects() was setting the ScrollView's scroll position
to a scrollOffset, which was counteracted by ScrollView::unobscuredContentRect()
adding the scrollOrigin to the scrollPosition, which resulted in the correct
rects, but an incorrect scrollPosition. Fix.
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::unobscuredContentRect):
2015-12-31 David Kilzer <ddkilzer@apple.com>
Fix typo in FIXME comment
* dom/make_event_factory.pl:
(generateImplementation): FIXEME => FIXME.
2015-12-31 David Kilzer <ddkilzer@apple.com>
Stop using USE(CFNETWORK) path on iOS
https://bugs.webkit.org/show_bug.cgi?id=142540
Step 1/2: Do everything but turn off USE(CFNETWORK) internally.
Original patch by Antti Koivisto <antti@apple.com> on 2015-03-10
Reviewed by Daniel Bates.
Unify OS X and iOS code paths.
This patch just fixes the NSURLConnection code path on iOS. It
doesn't yet delete any unnecessary code.
Changes covered by most existing tests.
* loader/DocumentLoader.h:
* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:
* loader/mac/DocumentLoaderMac.cpp:
- Update for iOS to use NSURLConnection loader.
* page/mac/PageMac.mm:
(WebCore::Page::platformInitialize): Always use the correct
runloop on iOS regardless of which thread this was called on.
(WebCore::Page::addSchedulePair): Update for iOS to use
NSURLConnection loader.
(WebCore::Page::removeSchedulePair): Ditto.
* platform/ios/wak/WebCoreThread.h:
(WebThreadRunLoop): No longer needs to be exported.
(WebThreadNSRunLoop): Export for WebKitLegacy.
* platform/network/ios/QuickLook.mm: Fix header order.
(WebQuickLookHandleAsDelegate): Make delegate objects implement
WebCoreResourceLoaderDelegate protocol. This unifies the
-clearHandle and -detachHandle methods that were used on iOS and
OS X, respectively.
(-[WebQuickLookHandleAsDelegate clearHandle]): Deleted.
(-[WebQuickLookHandleAsDelegate detachHandle]): Renamed from
-clearHandle.
(WebResourceLoaderQuickLookDelegate): Make delegate objects
implement WebCoreResourceLoaderDelegate protocol.
(-[WebResourceLoaderQuickLookDelegate clearHandle]): Deleted.
(-[WebResourceLoaderQuickLookDelegate detachHandle]): Renamed from
-clearHandle.
(WebCore::QuickLookHandle::~QuickLookHandle): Call
-detachHandle instead of -clearHandle.
* platform/network/mac/ResourceHandleMac.mm:
- Update for iOS to use NSURLConnection loader.
* platform/network/mac/WebCoreResourceHandleAsDelegate.h:
(WebCoreResourceLoaderDelegate): Define new protocol.
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate detachHandle]): Gratuitous
nullptr fix.
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
(WebCoreResourceHandleAsOperationQueueDelegate): Implement
WebCoreResourceLoaderDelegate protocol.
* platform/spi/cocoa/NSURLDownloadSPI.h: Declare more
NSURDownload SPI to clean up other source files and make
source compile on iOS with NSURLConnection code path.
2015-12-31 Andy Estes <aestes@apple.com>
Fix warnings uncovered by migrating to WTF_MOVE
https://bugs.webkit.org/show_bug.cgi?id=152601
Reviewed by Daniel Bates.
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::createSession): Moving a return value prevented copy elision.
2015-12-31 Brady Eidson <beidson@apple.com>
Review feedback followup for:
Modern IDB: Only fire blocked events after all open connections have handled their versionchange events.
https://bugs.webkit.org/show_bug.cgi?id=152593
Suggested by Andy Estes.
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::dispatchEvent): Use downcast instead of static_cast.
Add traits to support downcast<>:
* Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
(isType):
2015-12-31 Zalan Bujtas <zalan@apple.com>
Move decoration context setup calls to InlineTextBox::paintDecoration.
https://bugs.webkit.org/show_bug.cgi?id=152622
Reviewed by Simon Fraser.
No change in functionality.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintDecoration):
* rendering/InlineTextBox.h:
2015-12-31 Simon Fraser <simon.fraser@apple.com>
More scrollOffset/scrollPosition disambiguation, in RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=152617
Reviewed by Zalan Bujtas.
Change RenderLayer's m_scrollOffset to be m_scrollPosition, since it stores
scroll positions (negative in RTL overflow). scrollOffset() was accurately
named already, but fix the return type, and remove the unnecessary scrollXOffset()/
scrollYOffset() variants, fixing callers to use .x() and .y().
scrollToOffset() was also accurately named, but fix its argument.
Fix functions related to saving scroll positions on Element to refer to scroll positions.
No behavior change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::scrollTo):
* dom/Element.cpp:
(WebCore::Element::removedFrom):
(WebCore::Element::savedLayerScrollPosition):
(WebCore::Element::setSavedLayerScrollPosition):
(WebCore::Element::savedLayerScrollOffset): Deleted.
(WebCore::Element::setSavedLayerScrollOffset): Deleted.
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::savedLayerScrollPosition):
(WebCore::ElementRareData::setSavedLayerScrollPosition):
(WebCore::ElementRareData::savedLayerScrollOffset): Deleted.
(WebCore::ElementRareData::setSavedLayerScrollOffset): Deleted.
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent):
* platform/graphics/IntPoint.h:
(WebCore::IntPoint::isZero):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::baselinePosition):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::scrollLeft):
(WebCore::RenderBox::scrollTop):
(WebCore::RenderBox::scrolledContentOffset):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::~RenderLayer):
(WebCore::RenderLayer::scrollByRecursively):
(WebCore::RenderLayer::clampScrollOffset):
(WebCore::RenderLayer::scrollToOffset):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::scrollPosition):
(WebCore::RenderLayer::maximumScrollPosition):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::start):
(WebCore::RenderMarquee::timerFired):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
2015-12-31 Zalan Bujtas <zalan@apple.com>
text-decoration: line-through is mispositioned when text has overline/underline too.
https://bugs.webkit.org/show_bug.cgi?id=152619
Reviewed by Simon Fraser.
Line-through painting was mistakenly calling drawLineForText with overline/underline positioning.
Test: fast/css3-text/css3-text-decoration/text-decoration-line-through-mispositioned.html
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration): Deleted.
* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintTextDecoration):
2015-12-31 Simon Fraser <simon.fraser@apple.com>
Clarify that scrollPositionChangedViaPlatformWidget takes offsets
https://bugs.webkit.org/show_bug.cgi?id=152606
Reviewed by Zalan Bujtas.
scrollPositionChangedViaPlatformWidget actually gets scroll offsets, since the
values we get from AppKit are zero-based, so rename to scrollOffsetChangedViaPlatformWidget().
Change ScrollableArea's setScrollPosition() and requestScrollPositionUpdate() to take
ScrollPositions.
Add a FIXME noting that willRevealEdge events are probably broken in RTL documents.
* dom/Document.cpp:
(WebCore::Document::sendWillRevealEdgeEventsIfNeeded):
* page/FrameView.cpp:
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::scrollOffsetChangedViaPlatformWidgetImpl):
(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::requestScrollPositionUpdate):
(WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Deleted.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollOffsetChangedViaPlatformWidget):
(WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange):
(WebCore::ScrollView::scrollTo):
(WebCore::ScrollView::setScrollPosition):
(WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Deleted.
* platform/ScrollView.h:
(WebCore::ScrollView::scrollOffsetChangedViaPlatformWidgetImpl):
(WebCore::ScrollView::scrollPositionChangedViaPlatformWidgetImpl): Deleted.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::notifyScrollPositionChanged):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::requestScrollPositionUpdate):
2015-12-31 Zalan Bujtas <zalan@apple.com>
Simple line layout: Text with stroke width is not positioned correctly.
https://bugs.webkit.org/show_bug.cgi?id=152614
Reviewed by Simon Fraser.
Visual overflow should not affect text position.
Test: fast/text/simple-line-layout-text-position-with-stroke.html
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
2015-12-31 Zalan Bujtas <zalan@apple.com>
Simple line layout: Nested block with pseudo first-line parent should bail out of simple line layout.
https://bugs.webkit.org/show_bug.cgi?id=152599
Reviewed by Simon Fraser.
We should bail out of simple line layout if any of the ancestors have pseudo first-line style.
(see RenderBlock::firstLineBlock())
Test: fast/block/line-layout/first-line-should-bail-out-of-simple-line-layout.html
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForWithReason):
2015-12-30 Simon Fraser <simon.fraser@apple.com>
Change ScrollView::scrollTo() to take a ScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=152607
Reviewed by Zalan Bujtas.
Make it more explicit that ScrollView::scrollTo() takes a ScrollPosition, and
change the name and type of the m_scrollOffset member variable.
* page/FrameView.cpp:
(WebCore::FrameView::scrollTo):
(WebCore::FrameView::wheelEvent):
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::unobscuredContentRectInternal):
(WebCore::ScrollView::setScrollOffset):
(WebCore::ScrollView::scrollTo):
* platform/ScrollView.h:
2015-12-30 Brady Eidson <beidson@apple.com>
Modern IDB: Only fire blocked events after all open connections have handled their versionchange events.
https://bugs.webkit.org/show_bug.cgi?id=152593
Reviewed by Andy Estes.
No new tests (At least two previously timing-out tests now pass, others are now closer to passing).
Before this patch, whenever we sent all open connections the versionchange event, we would immediately
fire the blocked event on the request.
That's not right, as those event handlers can close the connections, rendering the request unblocked.
So this patch implements the behavior of waiting for each open connection to either close or positively
message back "I finished firing my versionchange event handler"
This behavior is explicitly denoted in the spec and is covered by existing tests.
* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
(WebCore::IDBClient::IDBConnectionToServer::didFireVersionChangeEvent):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent):
(WebCore::IDBClient::IDBDatabase::dispatchEvent):
* Modules/indexeddb/client/IDBDatabaseImpl.h:
* Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
(WebCore::IDBClient::IDBVersionChangeEvent::IDBVersionChangeEvent):
* Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent):
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::didFireVersionChangeEvent):
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/ServerOpenDBRequest.cpp:
(WebCore::IDBServer::ServerOpenDBRequest::notifyRequestBlocked):
(WebCore::IDBServer::ServerOpenDBRequest::notifiedConnectionsOfVersionChange):
(WebCore::IDBServer::ServerOpenDBRequest::connectionClosedOrFiredVersionChangeEvent):
(WebCore::IDBServer::ServerOpenDBRequest::notifyDeleteRequestBlocked): Deleted.
* Modules/indexeddb/server/ServerOpenDBRequest.h:
(WebCore::IDBServer::ServerOpenDBRequest::hasNotifiedBlocked):
(WebCore::IDBServer::ServerOpenDBRequest::hasConnectionsPendingVersionChangeEvent):
(WebCore::IDBServer::ServerOpenDBRequest::hasNotifiedConnectionsOfVersionChange):
(WebCore::IDBServer::ServerOpenDBRequest::hasNotifiedDeleteRequestBlocked): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::maybeNotifyConnectionsOfVersionChange):
(WebCore::IDBServer::UniqueIDBDatabase::notifyCurrentRequestConnectionClosedOrFiredVersionChangeEvent):
(WebCore::IDBServer::UniqueIDBDatabase::didFireVersionChangeEvent):
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didFireVersionChangeEvent):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::fireVersionChangeEvent):
(WebCore::InProcessIDBServer::didFireVersionChangeEvent):
* Modules/indexeddb/shared/InProcessIDBServer.h:
* dom/Event.h:
(WebCore::Event::isVersionChangeEvent):
2015-12-30 Simon Fraser <simon.fraser@apple.com>
Add explicit conversions between scrollOffset and scrollPostion, and use them in a few places
https://bugs.webkit.org/show_bug.cgi?id=152594
Reviewed by Sam Weinig.
Add functions to ScrollableArea to convert between scrollPosition and scrollOffset,
and use them in places where code did the math with scrollOrigin.
* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition): totalContentsSize().width() == contentsWidth(),
so we can use the base class maximumScrollPosition(), which also clamps.
* platform/ScrollView.cpp:
(WebCore::ScrollView::maximumScrollPosition):
(WebCore::ScrollView::setScrollOffset):
(WebCore::ScrollView::overhangAmount):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::calculateOverhangAreasForPainting):
(WebCore::ScrollView::minimumScrollPosition): Deleted. Can use base class implementation.
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::minimumScrollPosition):
(WebCore::ScrollableArea::maximumScrollPosition):
(WebCore::ScrollableArea::maximumScrollOffset):
(WebCore::ScrollableArea::scrollPositionFromOffset):
(WebCore::ScrollableArea::scrollOffsetFromPosition):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollOrigin):
(WebCore::ScrollableArea::scrollOriginChanged):
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::unobscuredContentRect):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::pinnedInDirection):
(WebCore::ScrollAnimatorMac::absoluteScrollPosition):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollPosition):
(WebCore::RenderLayer::maximumScrollPosition):
(WebCore::RenderLayer::overhangAmount):
(WebCore::RenderLayer::minimumScrollPosition): Deleted.
* rendering/RenderLayer.h:
2015-12-30 Zalan Bujtas <zalan@apple.com>
Move InlineTextBox's text decoration painting to its own class.
https://bugs.webkit.org/show_bug.cgi?id=152587
Reviewed by Myles C. Maxfield.
This is in preparation for adding text decoration support for simple line layout.
No change in functionality.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
(WebCore::compareTuples): Deleted.
(WebCore::translateIntersectionPointsToSkipInkBoundaries): Deleted.
(WebCore::drawSkipInkUnderline): Deleted.
(WebCore::textDecorationStyleToStrokeStyle): Deleted.
(WebCore::adjustStepToDecorationLength): Deleted.
(WebCore::strokeWavyTextDecoration): Deleted.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColorsAndStyles):
* rendering/RenderObject.h:
* rendering/RenderingAllInOne.cpp:
* rendering/TextDecorationPainter.cpp: Added.
(WebCore::adjustStepToDecorationLength):
(WebCore::strokeWavyTextDecoration):
(WebCore::compareTuples):
(WebCore::translateIntersectionPointsToSkipInkBoundaries):
(WebCore::drawSkipInkUnderline):
(WebCore::textDecorationStyleToStrokeStyle):
(WebCore::TextDecorationPainter::TextDecorationPainter):
(WebCore::TextDecorationPainter::paintTextDecoration):
* rendering/TextDecorationPainter.h: Added.
(WebCore::TextDecorationPainter::setInlineTextBox):
(WebCore::TextDecorationPainter::setFont):
(WebCore::TextDecorationPainter::setIsHorizontal):
(WebCore::TextDecorationPainter::setWidth):
(WebCore::TextDecorationPainter::setBaseline):
(WebCore::TextDecorationPainter::addTextShadow):
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
(WebCore::visualOverflowForDecorations):
* style/InlineTextBoxStyle.h:
2015-12-30 Zan Dobersek <zdobersek@igalia.com>
[CoordinatedGraphics] VideoRenderRequestScheduler shouldn't dispatch to main thread in threaded compositor
https://bugs.webkit.org/show_bug.cgi?id=152584
Reviewed by Carlos Garcia Campos.
The VideoRenderRequestScheduler class should only send the repaint-requested
signal dispatch to the main thread when not using the threaded compositor.
In case that is used (guarded via WTF_USE_COORDINATED_GRAPHICS_THREADED), the
signal dispatch can be done on the current thread (normally a GStreamer thread)
since the actual GL texture update will be then dispatched to the compositor
thread (unlike when gstreamer-gl is used, when the update can be done on the
very same thread).
When that is the case we don't need the RunLoop::Timer, Condition and the
video sink GRefPtr protector that are otherwise used by this class, so these
can just be guarded with the USE(...) flag.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(VideoRenderRequestScheduler::VideoRenderRequestScheduler):
(VideoRenderRequestScheduler::stop):
(VideoRenderRequestScheduler::requestRender):
2015-12-30 Zan Dobersek <zdobersek@igalia.com>
[TexMap] Clean up TextureMapperAnimation, TextureMapperAnimations
https://bugs.webkit.org/show_bug.cgi?id=152112
Reviewed by Darin Adler.
Clean up the TextureMapperAnimation class. Turn AnimationState into an enum
class. Use references for non-null pointer parameters to one version of the
constructor and the apply() and applyInternal() methods. Remove unnecessary
public methods and reorder the remaining ones into something more sensible.
In terms of the implementation of this class, the methods are moved around to
follow the order of declarations, along with some small cleanups and improvements
applied.
TextureMapperAnimations class is also refreshed. The constructor is defaulted,
and the method implementations are reordered a bit and also adjusted to use the
range-based for-loops and some STL utilities.
Static functions in the implementation file are also updated to use range-based
for-loops, references and nullptrs where possible.
There's no change in behavior as this is just a refactoring.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::addAnimation):
* platform/graphics/texmap/TextureMapperAnimation.cpp:
(WebCore::blendFunc):
(WebCore::applyFilterAnimation):
(WebCore::shouldReverseAnimationValue):
(WebCore::applyTransformAnimation):
(WebCore::TextureMapperAnimation::TextureMapperAnimation):
(WebCore::TextureMapperAnimation::apply):
(WebCore::TextureMapperAnimation::pause):
(WebCore::TextureMapperAnimation::resume):
(WebCore::TextureMapperAnimation::computeTotalRunningTime):
(WebCore::TextureMapperAnimation::isActive):
(WebCore::TextureMapperAnimation::applyInternal):
(WebCore::TextureMapperAnimations::add):
(WebCore::TextureMapperAnimations::remove):
(WebCore::TextureMapperAnimations::pause):
(WebCore::TextureMapperAnimations::suspend):
(WebCore::TextureMapperAnimations::resume):
(WebCore::TextureMapperAnimations::apply):
(WebCore::TextureMapperAnimations::hasActiveAnimationsOfType):
(WebCore::TextureMapperAnimations::hasRunningAnimations):
(WebCore::TextureMapperAnimations::getActiveAnimations):
* platform/graphics/texmap/TextureMapperAnimation.h:
(WebCore::TextureMapperAnimation::name):
(WebCore::TextureMapperAnimation::boxSize):
(WebCore::TextureMapperAnimation::animation):
(WebCore::TextureMapperAnimation::startTime):
(WebCore::TextureMapperAnimation::pauseTime):
(WebCore::TextureMapperAnimation::state):
(WebCore::TextureMapperAnimation::setState): Deleted.
(WebCore::TextureMapperAnimation::property): Deleted.
(WebCore::TextureMapperAnimations::TextureMapperAnimations): Deleted.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::syncAnimations):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::addAnimation):
2015-12-29 Simon Fraser <simon.fraser@apple.com>
Rename "scrollOffsetForFixedPosition" and related functions to refer to scrollPosition
https://bugs.webkit.org/show_bug.cgi?id=152590
Reviewed by Zalan Bujtas.
FrameView::scrollOffsetForFixedPosition() actually returned a scroll position
(possibly negative for RTL content), not a scroll offset, so rename it and related
functions.
* page/FrameView.cpp:
(WebCore::FrameView::fixedScrollableAreaBoundsInflatedForScrolling):
(WebCore::FrameView::scrollPositionRespectingCustomFixedPosition):
(WebCore::FrameView::viewportConstrainedVisibleContentRect):
(WebCore::FrameView::scrollPositionForFixedPosition):
(WebCore::FrameView::scrollOffsetRespectingCustomFixedPosition): Deleted.
(WebCore::FrameView::scrollOffsetForFixedPosition): Deleted.
* page/FrameView.h:
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::timeToNextService):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::scrollWasUpdated):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::setSize):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollLayerPosition):
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::pushMappingToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):
(WebCore::RenderView::computeRectForRepaint):
2015-12-29 Simon Fraser <simon.fraser@apple.com>
Fix the Windows build.
* page/win/FrameCGWin.cpp:
(WebCore::drawRectIntoContext):
2015-12-29 Simon Fraser <simon.fraser@apple.com>
Remove ScrollView::scrollOffset() in preparation for scrollOffset vs. scrollPosition clarification
https://bugs.webkit.org/show_bug.cgi?id=152589
Reviewed by Sam Weinig.
Current code uses scrollOffset vs. scrollPosition interchangeably, and confusingly.
Longer term, I plan to make "scrollPosition" be the value that is relative to the
contents, i.e. affected by scrollOrigin, and "scrollOffset" be the zero-based value
that's used to set scrollbar values.
To prepare for this, remove ScrollView::scrollOffset(), which is just the
scrollPosition as an IntSize.
Add some typedefs in ScrollableArea, which will slowly propagate through the
code as position vs. offset is clarified.
* inspector/InspectorOverlay.cpp:
(WebCore::contentsQuadToCoordinateSystem):
(WebCore::InspectorOverlay::highlightQuad):
(WebCore::localPointToRoot):
* page/FrameView.cpp:
(WebCore::FrameView::scrollOffsetRespectingCustomFixedPosition):
(WebCore::FrameView::topContentInsetDidChange):
(WebCore::FrameView::addTrackedRepaintRect):
(WebCore::FrameView::scrollTo):
(WebCore::FrameView::wheelEvent):
(WebCore::FrameView::setScrollPinningBehavior):
* page/FrameView.h:
* page/SpatialNavigation.cpp:
(WebCore::canScrollInDirection):
(WebCore::rectToAbsoluteCoordinates):
* platform/ScrollView.cpp:
(WebCore::ScrollView::setScrollbarModes):
(WebCore::ScrollView::availableContentSizeChanged):
(WebCore::ScrollView::setContentsSize):
(WebCore::ScrollView::maximumScrollPosition):
(WebCore::ScrollView::minimumScrollPosition):
(WebCore::ScrollView::adjustScrollPositionWithinRange):
(WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
(WebCore::ScrollView::documentScrollOffsetRelativeToScrollableAreaOrigin):
(WebCore::ScrollView::setScrollPosition):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::rootViewToTotalContents):
(WebCore::ScrollView::setFrameRect):
(WebCore::ScrollView::scrollbarStyleChanged):
(WebCore::ScrollView::setScrollOrigin):
* platform/ScrollView.h:
(WebCore::ScrollView::convertChildToSelf):
(WebCore::ScrollView::convertSelfToChild):
(WebCore::ScrollView::scrollOffset): Deleted.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollbarIntrusion):
(WebCore::ScrollableArea::scrollPosition):
(WebCore::ScrollableArea::minimumScrollPosition):
(WebCore::ScrollableArea::maximumScrollPosition):
* platform/ScrollableArea.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calculateAutoscrollDirection):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollPosition):
(WebCore::RenderLayer::minimumScrollPosition):
(WebCore::RenderLayer::maximumScrollPosition):
* rendering/RenderLayer.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::nodeAtPoint):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
2015-12-28 Alex Christensen <achristensen@webkit.org>
Fix Windows build, ostensibly after r194424.
* CMakeLists.txt:
* PlatformWin.cmake:
ml.exe was given too many unneeded parameters (/Idir1 /Idir2 etc.), and it was failing sometimes with long directories.
Instead of compiling makesafeseh.asm as a normal source file, we now put only the parameters that are needed to assemble
the object file, then link with the object file.
2015-12-28 Brady Eidson <beidson@apple.com>
Modern IDB: Rename IDBServerOperation to ServerOpenDBRequest.
https://bugs.webkit.org/show_bug.cgi?id=152577
Reviewed by Andy Estes.
No new tests (Refactor, no behavior change)
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* Modules/indexeddb/server/ServerOpenDBRequest.cpp: Renamed from Source/WebCore/Modules/indexeddb/server/IDBServerOperation.cpp.
(WebCore::IDBServer::ServerOpenDBRequest::create):
(WebCore::IDBServer::ServerOpenDBRequest::ServerOpenDBRequest):
(WebCore::IDBServer::ServerOpenDBRequest::isOpenRequest):
(WebCore::IDBServer::ServerOpenDBRequest::isDeleteRequest):
(WebCore::IDBServer::ServerOpenDBRequest::notifyDeleteRequestBlocked):
(WebCore::IDBServer::ServerOpenDBRequest::notifyDidDeleteDatabase):
* Modules/indexeddb/server/ServerOpenDBRequest.h: Renamed from Source/WebCore/Modules/indexeddb/server/IDBServerOperation.h.
(WebCore::IDBServer::ServerOpenDBRequest::connection):
(WebCore::IDBServer::ServerOpenDBRequest::requestData):
(WebCore::IDBServer::ServerOpenDBRequest::hasNotifiedDeleteRequestBlocked):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
(WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
2015-12-28 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[CMake][EFL] Fix build breaks when enabling GAMEPAD
https://bugs.webkit.org/show_bug.cgi?id=152573
Reviewed by Alex Christensen.
When enabling GAMEPAD feature on EFL and GTK, there are build breaks.
Fixed all.
* CMakeLists.txt:
2015-12-25 Andy Estes <aestes@apple.com>
Stop moving local objects in return statements
https://bugs.webkit.org/show_bug.cgi?id=152557
Reviewed by Brady Eidson.
Calling std::move() on a local object in a return statement prevents the compiler from applying the return value optimization.
Clang can warn about these mistakes with -Wpessimizing-move, although only when std::move() is called directly.
I found these issues by temporarily replacing WTF::move with std::move and recompiling.
* Modules/indexeddb/IDBDatabaseIdentifier.cpp:
(WebCore::IDBDatabaseIdentifier::isolatedCopy):
* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::deletedValue):
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::objectStoreNames):
(WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::createObjectStore):
(WebCore::IDBClient::IDBTransaction::createIndex):
(WebCore::IDBClient::IDBTransaction::doRequestOpenCursor):
(WebCore::IDBClient::IDBTransaction::requestGetRecord):
(WebCore::IDBClient::IDBTransaction::requestIndexRecord):
(WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
(WebCore::IDBClient::IDBTransaction::requestPutOrAdd):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
* Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
(WebCore::IDBDatabaseInfo::isolatedCopy):
(WebCore::IDBDatabaseInfo::objectStoreNames):
* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::error):
(WebCore::IDBResultData::openDatabaseSuccess):
(WebCore::IDBResultData::openDatabaseUpgradeNeeded):
* Modules/indexeddb/shared/IDBTransactionInfo.cpp:
(WebCore::IDBTransactionInfo::versionChange):
(WebCore::IDBTransactionInfo::isolatedCopy):
* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::create):
* Modules/webaudio/OfflineAudioContext.cpp:
(WebCore::OfflineAudioContext::create):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::originLockFor):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::create):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberValue):
* dom/NodeOrString.cpp:
(WebCore::convertNodesOrStringsIntoNode):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
(WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
(WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
* inspector/InspectorNetworkAgent.cpp:
(WebCore::buildObjectForHeaders):
(WebCore::buildObjectForResourceRequest):
(WebCore::buildObjectForCachedResource):
* inspector/InspectorOverlay.cpp:
(WebCore::buildArrayForQuad):
(WebCore::buildObjectForFlowRegions):
(WebCore::InspectorOverlay::buildObjectForHighlightedNodes):
* inspector/InspectorPageAgent.cpp:
(WebCore::createXHRTextDecoder):
(WebCore::buildArrayForCookies):
(WebCore::InspectorPageAgent::buildObjectForFrame):
* inspector/InspectorStyleSheet.cpp:
(WebCore::buildMediaObject):
(WebCore::InspectorStyle::buildArrayForComputedStyle):
(WebCore::buildObjectForSelectorHelper):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForStyle):
(WebCore::InspectorStyleSheet::buildArrayForRuleList):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::stopFromConsole):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
(WebCore::TimelineRecordFactory::createFunctionCallData):
(WebCore::TimelineRecordFactory::createConsoleProfileData):
(WebCore::TimelineRecordFactory::createProbeSampleData):
(WebCore::TimelineRecordFactory::createEventDispatchData):
(WebCore::TimelineRecordFactory::createGenericTimerData):
(WebCore::TimelineRecordFactory::createTimerInstallData):
(WebCore::TimelineRecordFactory::createEvaluateScriptData):
(WebCore::TimelineRecordFactory::createTimeStampData):
(WebCore::TimelineRecordFactory::createAnimationFrameData):
(WebCore::createQuad):
(WebCore::TimelineRecordFactory::createPaintData):
(WebCore::buildInspectorObject):
* loader/FrameLoader.cpp:
(WebCore::createWindow):
* loader/NavigationAction.cpp:
(WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow):
* platform/network/ios/QuickLook.mm:
(WebCore::QuickLookHandle::create):
* testing/Internals.cpp:
(WebCore::Internals::openDummyInspectorFrontend):
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::createResourceRequest):
* xml/XPathExpression.cpp:
(WebCore::XPathExpression::evaluate):
2015-12-27 Zalan Bujtas <zalan@apple.com>
Should never be reached failure in WebCore::RenderElement::clearLayoutRootIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=151590
Reviewed by Simon Fraser.
We should always set the layoutroot when a new subtree layout is requested (and convert it
to a full layout when needed). It ensures that renderers are detached cleanly even when
they are set as layoutroot.
Test: fast/block/assert-when-layout-root-is-not-cleared.html
* page/FrameView.cpp:
(WebCore::FrameView::scheduleRelayoutOfSubtree):
2015-12-26 Gyuyoung Kim <gyuyoung.kim@webkit.org>
[CMake] Rearrange new gamepad files with deprecated files
https://bugs.webkit.org/show_bug.cgi?id=152564
Reviewed by Alex Christensen.
New gamepad files have been commented out in CMakeLists.txt so far. This patch
rearrange the files with deprecated files using ENABLE_GAMEPAD.
* CMakeLists.txt:
2015-12-26 Per Arne Vollan <peavo@outlook.com>
[Curl] Compile errors.
https://bugs.webkit.org/show_bug.cgi?id=152563
Reviewed by Alex Christensen.
The ResourceError constructor has changed signature.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::downloadTimerCallback):
(WebCore::ResourceHandleManager::dispatchSynchronousJob):
2015-12-25 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Add subpixel support for outline.
https://bugs.webkit.org/show_bug.cgi?id=152560
Reviewed by Simon Fraser.
This patch adds support for subpixel outline-width/outline-offset.
Test: fast/borders/hidpi-outline-hairline-painting.html
* css/CSSPropertyNames.in:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* platform/graphics/GraphicsContext.h:
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawFocusRing):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::computeMaxOutlineSize):
(WebCore::RenderElement::paintOutline):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutlineForLine):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::adjustRectForOutlineAndShadow):
* rendering/RenderView.cpp:
(WebCore::RenderView::setMaximalOutlineSize):
* rendering/RenderView.h:
* rendering/style/OutlineValue.h:
(WebCore::OutlineValue::offset):
(WebCore::OutlineValue::OutlineValue): Deleted.
* rendering/style/RenderStyle.h:
2015-12-25 Alexey Proskuryakov <ap@apple.com>
ASSERT(m_nsResponse) in ResourceResponse::platformCertificateInfo() when running tests in iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=152559
Reviewed by Andy Estes.
Fix a regression from r194378.
* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformCertificateInfo):
2015-12-25 David Kilzer <ddkilzer@apple.com>
ResourceError should store failingURL as URL instead of String to avoid reparsing and to address FIXME comments in ResourceErrorCF.cpp and ResourceErrorMac.mm
<http://webkit.org/b/146391>
Reviewed by Antti Koivisto.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::preflightFailure):
* loader/DocumentThreadableLoader.h:
(WebCore::DocumentThreadableLoader::preflightFailure):
- Switch type of 'url' argument of preflightFailure() from
String to URL.
- Update for type change of 'failingURL' argument to
ResourceError().
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::responseReceived):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::loadDataURL):
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
- Update for type change of 'failingURL' argument to
ResourceError().
* page/EventSource.cpp:
(WebCore::EventSource::didFailAccessControlCheck):
- Convert failingURL() to String explicitly.
* platform/efl/ErrorsEfl.cpp:
(WebCore::cancelledError):
(WebCore::blockedError):
(WebCore::blockedByContentBlockerError):
(WebCore::cannotShowURLError):
(WebCore::interruptedForPolicyChangeError):
(WebCore::cannotShowMIMETypeError):
(WebCore::fileDoesNotExistError):
(WebCore::pluginWillHandleLoadError):
(WebCore::downloadCancelledByUserError):
(WebCore::downloadDestinationError):
* platform/gtk/ErrorsGtk.cpp:
(WebCore::cancelledError):
(WebCore::blockedError):
(WebCore::blockedByContentBlockerError):
(WebCore::cannotShowURLError):
(WebCore::interruptedForPolicyChangeError):
(WebCore::cannotShowMIMETypeError):
(WebCore::fileDoesNotExistError):
(WebCore::pluginWillHandleLoadError):
(WebCore::downloadCancelledByUserError):
(WebCore::downloadDestinationError):
- Update for type change of 'failingURL' argument to
ResourceError().
* platform/network/ResourceErrorBase.h:
(WebCore::ResourceErrorBase::failingURL):
- Change return type from String to URL.
(WebCore::ResourceErrorBase::ResourceErrorBase):
* platform/network/cf/ResourceError.h:
(WebCore::ResourceError::ResourceError):
- Change type of 'failingURL' from String to URL.
* platform/network/cf/ResourceErrorCF.cpp:
(WebCore::ResourceError::ResourceError):
- Change type of 'failingURL' from String to URL.
(WebCore::ResourceError::platformLazyInit):
- Clean up code and address FIXME by parsing CFURLRef using
URL() constructor.
(WebCore::ResourceError::cfError):
- Clean up code and address FIXME after switching type of
m_failingURL.
* platform/network/curl/ResourceError.h:
(WebCore::ResourceError::ResourceError):
- Change type of 'failingURL' from String to URL.
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::createNSErrorFromResourceErrorBase):
(WebCore::ResourceError::platformLazyInit):
- Clean up code and address FIXME after switching type of
m_failingURL.
* platform/network/soup/ResourceError.h:
(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::timeoutError):
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::failingURI):
(WebCore::ResourceError::timeoutError):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::timeoutFired):
- Change type of 'failingURL' from String to URL.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::didFail):
- Convert failingURL() to String explicitly.
- Also switch to using makeString().
2015-12-24 Zalan Bujtas <zalan@apple.com>
ASSERTION FAILED: x2 >= x1 in WebCore::RenderElement::drawLineForBoxSide
https://bugs.webkit.org/show_bug.cgi?id=151210
Reviewed by Simon Fraser.
"IntRect outer = snappedIntRect(inner)" explicitly converts inner to LayoutRect first and
returns a snapped IntRect. When inner (after the inflate) overflows LayoutUnit,
the snapped rect might become smaller than the inner rect.
This patch also enables outline painting on subpixel positions.
Tests: fast/borders/hidpi-outline-on-subpixel-position.html
fast/borders/outline-offset-overflow.html
* rendering/RenderElement.cpp:
(WebCore::RenderElement::paintOutline):
2015-12-24 Simon Fraser <simon.fraser@apple.com>
Use an enum for RenderElement's baseTypeFlags
https://bugs.webkit.org/show_bug.cgi?id=152553
Reviewed by Zalan Bujtas.
Use an enum, rather than unsigned, for the BaseTypeFlags bit mask.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::RenderBox):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::RenderBoxModelObject):
* rendering/RenderBoxModelObject.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::RenderLayerModelObject):
* rendering/RenderLayerModelObject.h:
2015-12-24 Simon Fraser <simon.fraser@apple.com>
Remove the unused #define _USE_MATH_DEFINES
https://bugs.webkit.org/show_bug.cgi?id=152034
Reviewed by Tim Horton.
_USE_MATH_DEFINES was added in r123968 but no longer does anything.
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cg/PDFDocumentImage.cpp:
* rendering/mathml/RenderMathMLMenclose.cpp:
* rendering/mathml/RenderMathMLOperator.cpp:
2015-12-23 Brady Eidson <beidson@apple.com>
Modern IDB: Don't open any new connections until after version change transactions are completely handled.
https://bugs.webkit.org/show_bug.cgi?id=152441
Reviewed by Alex Christensen.
No new tests (At least 4 failing tests now pass).
When a version change transaction is in progress for a database, the server should not open any new connections
to that database until the version change transaction has been 100% completed.
This means *all* events related to finishing the transaction must fire.
To support this, a new message from client -> server is added.
* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::dispatchEvent):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::didFinishHandlingVersionChangeTransaction):
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::didFinishHandlingVersionChange):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::didFinishHandlingVersionChange):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
* Modules/indexeddb/shared/IDBTransactionInfo.cpp:
(WebCore::IDBTransactionInfo::loggingString):
* Modules/indexeddb/shared/IDBTransactionInfo.h:
* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::didFinishHandlingVersionChangeTransaction):
* Modules/indexeddb/shared/InProcessIDBServer.h:
2015-12-23 Brady Eidson <beidson@apple.com>
Modern IDB: storage/indexeddb/transaction-basics.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152481
Reviewed by Alex Christensen.
No new tests (Failing test now passes).
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::transaction): Include the invalid string argument
in the error message.
2015-12-23 Simon Fraser <simon.fraser@apple.com>
Use "constrainedBetween" in more places
https://bugs.webkit.org/show_bug.cgi?id=152543
Reviewed by Zalan Bujtas.
Replace code that contrains points via shrunkTo/expandedTo() with calls
to constrainedBetween(), and implement constrainedBetween() on IntPoint,
FloatPoint and LayoutPoint.
Convert some functions that return points to more modern syntax.
* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::setScrollPosition):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::setScrollPosition):
* platform/ScrollView.cpp:
(WebCore::ScrollView::adjustScrollPositionWithinRange):
* platform/graphics/FloatPoint.cpp:
(WebCore::FloatPoint::constrainedBetween):
* platform/graphics/FloatPoint.h:
(WebCore::FloatPoint::shrunkTo):
(WebCore::FloatPoint::expandedTo):
(WebCore::FloatPoint::transposedPoint):
* platform/graphics/IntPoint.cpp:
* platform/graphics/LayoutPoint.cpp:
(WebCore::LayoutPoint::constrainedBetween):
* platform/graphics/LayoutPoint.h:
(WebCore::LayoutPoint::expandedTo):
(WebCore::LayoutPoint::shrunkTo):
(WebCore::LayoutPoint::transposedPoint):
(WebCore::LayoutPoint::fraction):
(WebCore::LayoutPoint::operator FloatPoint):
2015-12-23 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r187593): Scroll position jumps when selecting text in an iframe
https://bugs.webkit.org/show_bug.cgi?id=152541
rdar://problem/23886181
Reviewed by Tim Horton.
r154382 added code that modifies parentLayer traversal, looking for ancestor
scrollable layers. However, it confusingly added another code path in which
the ancestor layer traversal cross a frame boundary, when RenderLayer::scrollRectToVisible()
already has one. I fixed this new location to adjust the rect coordinates in r187593,
but then code that hit both crossing points double-mapped the coordinates, causing
autoscroll jumping.
Fix by reverting r154382 and r187593, going back to doing the ancestor walk in
one place. Re-fix r154382 by implementing RenderLayer::allowsCurrentScroll(),
which contains the logic for line clamp, autoscroll and ensuring that overflow:hidden
can be programmatically scrolled.
Form controls are special; they can have overflow:hidden but still be user-scrollable
during autoscroll; this is handled via the confusingly-named canBeProgramaticallyScrolled().
RenderTextControlSingleLine implements this to ensure that readonly text inputs
autoscroll (which is exercised by a test).
The frame-to-parent-frame rect mapping in RenderLayer::scrollRectToVisible() is
fixed to use the coordinate mapping functions from Widget/ScrollView, with the
addition of a new utility function contentsToContainingViewContents().
A "Scrolling" logging channel is added with a few log points.
Test: fast/events/autoscroll-in-iframe-body.html
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
use contentsToContainingViewContents().
* platform/Logging.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::contentsToContainingViewContents):
* platform/ScrollView.h:
* platform/graphics/IntPoint.cpp:
(WebCore::IntPoint::constrainedBetween): New helper to constrain a point between
two other points.
* platform/graphics/IntPoint.h:
(WebCore::IntPoint::expandedTo):
(WebCore::IntPoint::shrunkTo):
* rendering/RenderBox.cpp:
* rendering/RenderLayer.cpp:
(WebCore::parentLayerCrossFrame):
(WebCore::RenderLayer::enclosingScrollableLayer):
(WebCore::frameElementAndViewPermitScroll):
(WebCore::RenderLayer::allowsCurrentScroll):
(WebCore::RenderLayer::scrollRectToVisible):
* rendering/RenderLayer.h:
* rendering/RenderTextControlSingleLine.h:
2015-12-22 Simon Fraser <simon.fraser@apple.com>
Minor cleanup in RenderBox::canBeProgramaticallyScrolled()
https://bugs.webkit.org/show_bug.cgi?id=152515
Reviewed by Tim Horton.
Remove the scrollsOverflow() check in RenderBox::canBeProgramaticallyScrolled(),
since if hasScrollableOverflow is true, scrollsOverflow() must also be true.
Factor clientWidth/Height vs. scrollWidth/Height checks into separate functions,
and call them from two places.
Added a test which is not affected by this particular change, but will verify
that a later change doesn't break anything.
Test: fast/overflow/overflow-hidden-scroll-into-view.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
(WebCore::RenderBox::canBeProgramaticallyScrolled):
* rendering/RenderBox.h:
(WebCore::RenderBox::hasHorizontalOverflow):
(WebCore::RenderBox::hasVerticalOverflow):
(WebCore::RenderBox::hasScrollableOverflowX):
(WebCore::RenderBox::hasScrollableOverflowY):
2015-12-23 Pranjal Jumde <pjumde@apple.com>
Avoids stack recursion when indexed propertyNames defined using Object.defineProperty are deleted.
https://bugs.webkit.org/show_bug.cgi?id=149179
<rdar://problem/22708019>.
Reviewed by Filip Pizlo.
* runtime/JSObject.cpp:
(JSStorage::deletePropertyByIndex was invoking Base::deleteProperty for indexed propertyNames instead of Base::deletePropertyByIndex leading to a stack recursion)
2015-12-23 Eric Carlson <eric.carlson@apple.com>
[MediaStream] MediaDeviceInfo.label must be empty in some situations
https://bugs.webkit.org/show_bug.cgi?id=152000
Reviewed by Brent Fulgham.
No new tests, updated fast/mediastream/MediaDevices-enumerateDevices.html.
* Modules/mediastream/CaptureDeviceManager.cpp:
(CaptureDeviceManager::getSourcesInfo): TrackSourceInfo constructor takes persistent ID.
* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::start): If Document had an active stream track, don't bother
checking for a persistent permission to access devices.
(WebCore::MediaDevicesRequest::didCompleteCheck): m_hasUserMediaPermission -> m_canShowLabels.
(WebCore::MediaDevicesRequest::getTrackSources): New, factored out of didCompleteCheck so it
can be called when we don't need to check permissions.
(WebCore::MediaDevicesRequest::didCompleteRequest): m_hasUserMediaPermission -> m_canShowLabels.
* Modules/mediastream/MediaDevicesRequest.h:
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream): Call setIsActive. Register new stream with MediaStreamRegistry.
(WebCore::MediaStream::~MediaStream): Unregister stream with MediaStreamRegistry.
(WebCore::MediaStream::setIsActive): New. Set m_isActive and call Document if stream is active.
(WebCore::MediaStream::scheduleActiveStateChange): Call setIsActive.
(WebCore::MediaStream::registry): MediaStreamRegistry::registry -> MediaStreamRegistry::shared.
(WebCore::mediaStreams): Deleted. Drive-by cleanup: moved list of all streams to MediaStreamRegistry.
(WebCore::registerMediaStream): Ditto.
(WebCore::unRegisterMediaStream): Ditto.
(WebCore::MediaStream::lookUp): Ditto.
(WebCore::MediaStream::setRegistry): Ditto.
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamRegistry.cpp:
(WebCore::MediaStreamRegistry::shared): Renamed from "registry".
(WebCore::MediaStreamRegistry::MediaStreamRegistry):
(WebCore::MediaStreamRegistry::lookUp): Moved here from MediaStream.
(WebCore::mediaStreams): Ditto.
(WebCore::MediaStreamRegistry::registerStream): Ditto.
(WebCore::MediaStreamRegistry::unregisterStream): Ditto.
(WebCore::MediaStreamRegistry::registry): Deleted.
* Modules/mediastream/MediaStreamRegistry.h:
* dom/Document.h:
(WebCore::Document::setHasActiveMediaStreamTrack): New, set m_hasHadActiveMediaStreamTrack.
(WebCore::Document::hasHadActiveMediaStreamTrack): New, return m_hasHadActiveMediaStreamTrack.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource): MediaStream::lookUp -> MediaStreamRegistry::shared().lookUp.
* platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
(WebCore::TrackSourceInfo::create): Take track persistent ID.
(WebCore::TrackSourceInfo::persistentId): New.
(WebCore::TrackSourceInfo::TrackSourceInfo): Take track persistent ID.
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::sourceWithUID): TrackSourceInfo::create takes persistent ID.
* platform/mock/MockRealtimeMediaSource.cpp:
(WebCore::MockRealtimeMediaSource::trackSourceWithUID): Ditto.
* platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp:
(WebCore::RealtimeMediaSourceCenterMac::sourceWithUID): TrackSourceInfo::create takes persistent ID.
2015-12-23 Xabier Rodriguez Calvar <calvaris@igalia.com>
[Streams API] In RS during enqueuing error should be reported only if readable
https://bugs.webkit.org/show_bug.cgi?id=152505
Reviewed by Youenn Fablet.
This commit fixes last spec change done in
https://github.com/whatwg/streams/commit/4ba861e6f60c248060811830e11271c84b439cc3.
Test: imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies.html
* Modules/streams/ReadableStreamInternals.js:
(enqueueInReadableStream): Call @errorReadableStream only if state is readable.
2015-12-23 Chris Aljoudi <chris@chrismatic.io> and Alex Christensen <achristensen@webkit.org>
Content blockers should be able to promote http to https
https://bugs.webkit.org/show_bug.cgi?id=148966
Reviewed by Benjamin Poulain.
Test: http/tests/contentextensions/make-https.html
* contentextensions/ContentExtensionActions.h:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::loadAction):
* contentextensions/ContentExtensionRule.cpp:
(WebCore::ContentExtensions::Action::deserialize):
(WebCore::ContentExtensions::Action::deserializeType):
(WebCore::ContentExtensions::Action::serializedLength):
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* platform/URL.cpp:
(WebCore::URL::isBlankURL):
(WebCore::defaultPortsMap):
(WebCore::defaultPortForProtocol):
(WebCore::isDefaultPortForProtocol):
(WebCore::portAllowed):
* platform/URL.h:
2015-12-22 Andy Estes <aestes@apple.com>
Try to fix the iOS build after r194378
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
2015-12-22 Andy Estes <aestes@apple.com>
[CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI
https://bugs.webkit.org/show_bug.cgi?id=152463
Reviewed by Alexey Proskuryakov.
Replaced WebkitSystemInterface calls that wrapped CFNetwork SPI with direct calls to SPI that is now forward
declared in CFNetworkSPI.h.
Also removed some unused declarations and renamed ResourceResponseMac.mm to ResourceResponseCocoa.mm.
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/network/NetworkStorageSession.h:
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::copyCredentialFromProtectionSpace):
(WebCore::CredentialStorage::getFromPersistentStorage):
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::cookieStorage):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest):
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::setStorageSession):
(WebCore::initializeMaximumHTTPConnectionCountPerHost):
(WebCore::initializeHTTPConnectionSettingsOnStartup):
* platform/network/cf/ResourceRequestCFNet.h:
(WebCore::toResourceLoadPriority):
(WebCore::toPlatformRequestPriority):
* platform/network/cf/ResourceResponse.h:
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformCertificateInfo):
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
* platform/network/cocoa/ResourceResponseCocoa.mm: Renamed from Source/WebCore/platform/network/mac/ResourceResponseMac.mm.
(WebCore::ResourceResponse::platformCertificateInfo):
(WebCore::copyNSURLResponseStatusLine):
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/ios/QuickLook.h:
* platform/network/ios/QuickLook.mm:
* platform/network/ios/WebCoreURLResponseIOS.mm:
(WebCore::adjustMIMETypeIfNecessary):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
* platform/network/mac/WebCoreURLResponse.h:
* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::adjustMIMETypeIfNecessary):
* platform/spi/cf/CFNetworkConnectionCacheSPI.h:
* platform/spi/cf/CFNetworkSPI.h:
2015-12-22 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Everything broken in GTK+ 3.19
https://bugs.webkit.org/show_bug.cgi?id=150550
Reviewed by Carlos Garcia Campos.
Port RenderThemeGtk and ScrollbarThemeGtk to use CSS nodes. This makes it possible to render
stuff with modern GTK+.
No new tests. We already have tons of tests for this functionality, but we're running them
with GTK+ 3.16, so they cannot have detected this breakage. These fixes require unreleased
GTK+, and GTK+ rendering is currently in a state of flux; once things settle down, we can
consider upgrading the GTK+ used for our layout tests.
* platform/gtk/GRefPtrGtk.cpp:
(WTF::refGPtr):
(WTF::derefGPtr):
* platform/gtk/GRefPtrGtk.h:
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::themeChanged):
(WebCore::ScrollbarThemeGtk::updateThemeProperties):
(WebCore::orientationStyleClass):
(WebCore::applyScrollbarStyleContextClasses):
(WebCore::ScrollbarThemeGtk::paintTrackBackground):
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
(WebCore::ScrollbarThemeGtk::paintThumb):
(WebCore::ScrollbarThemeGtk::paintButton):
* rendering/RenderThemeGtk.cpp:
(WebCore::createStyleContext):
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::applySliderStyleContextClasses):
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::paintSpinArrowButton):
(WebCore::styleColor):
2015-12-22 Eric Carlson <eric.carlson@apple.com>
[MediaStream] MediaStreamTrackPrivate.source should be a reference
https://bugs.webkit.org/show_bug.cgi?id=152509
Reviewed by Tim Horton.
No new tests, no functional change.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::trackVectorForType):
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::create):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::didCreateStream):
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::platformLayer):
(WebCore::MediaStreamPrivate::currentFrameImage):
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
* platform/mediastream/MediaStreamTrackPrivate.h:
(WebCore::MediaStreamTrackPrivate::source):
2015-12-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r194362.
https://bugs.webkit.org/show_bug.cgi?id=152508
crashes release bot (Requested by mcatanzaro on #webkit).
Reverted changeset:
"[GTK] Everything broken in GTK+ 3.19"
https://bugs.webkit.org/show_bug.cgi?id=150550
http://trac.webkit.org/changeset/194362
2015-12-22 Keith Miller <keith_miller@apple.com>
Remove OverridesHasInstance from TypeInfoFlags
https://bugs.webkit.org/show_bug.cgi?id=152005
Reviewed by Saam Barati.
Currently, we have three TypeInfo flags associated with instanceof behavior,
ImplementsHasInstance, ImplementDefaultHasInstance, and OverridesHasInstance. This patch
removes the third and moves the first to the out of line flags. In theory, we should only
need one flag but removing ImplementsHasInstance is more involved and should be done in a
separate patch.
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
2015-12-22 Brent Fulgham <bfulgham@apple.com>
Allow JavaScript to iterate over plugins for local SecurityOrigins
https://bugs.webkit.org/show_bug.cgi?id=152489
Reviewed by Alexey Proskuryakov.
Instead of calling 'isLocalFile' on the URL, we check the Document's SecurityOrigin. If
no origin exists, we construct a SecurityOrigin from the URL, and check whether it
satisfies 'isLocal'.
* page/Page.cpp:
(WebCore::Page::showAllPlugins): Revised to use SecurityOrigin.
2015-12-22 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Everything broken in GTK+ 3.19
https://bugs.webkit.org/show_bug.cgi?id=150550
Reviewed by Carlos Garcia Campos.
Port RenderThemeGtk and ScrollbarThemeGtk to use CSS nodes. This makes it possible to render
stuff with modern GTK+.
No new tests. We already have tons of tests for this functionality, but we're running them
with GTK+ 3.16, so they cannot have detected this breakage. These fixes require unreleased
GTK+, and GTK+ rendering is currently in a state of flux; once things settle down, we can
consider upgrading the GTK+ used for our layout tests.
* platform/gtk/GRefPtrGtk.cpp:
(WTF::refGPtr):
(WTF::derefGPtr):
* platform/gtk/GRefPtrGtk.h:
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::themeChanged):
(WebCore::ScrollbarThemeGtk::updateThemeProperties):
(WebCore::orientationStyleClass):
(WebCore::applyScrollbarStyleContextClasses):
(WebCore::ScrollbarThemeGtk::paintTrackBackground):
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
(WebCore::ScrollbarThemeGtk::paintThumb):
(WebCore::ScrollbarThemeGtk::paintButton):
* rendering/RenderThemeGtk.cpp:
(WebCore::createStyleContext):
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::applySliderStyleContextClasses):
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::paintSpinArrowButton):
(WebCore::styleColor):
2015-12-20 Jeremy Zerfas <WebKit@JeremyZerfas.com>
Don't allocate a NSImage and skip unneeded call to TIFFRepresentation when copying image to clipboard.
https://bugs.webkit.org/show_bug.cgi?id=152374
Reviewed by Darin Adler.
When copying an image to the clipboard, don't bother allocating a
NSImage and skip the unneeded call to TIFFRepresentation since the data
from the previous getTIFFRepresentation call can be used instead. This
considerably reduces the amount of memory and CPU time used for large
images/animations.
Test: fast/images/image-copy-memory-usage.html
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::write):
2015-12-20 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-20 Michael Catanzaro <mcatanzaro@igalia.com>
[SOUP] Performs DNS prefetch when a proxy is configured (information leak)
https://bugs.webkit.org/show_bug.cgi?id=145542
Reviewed by Darin Adler.
Perform DNS prefetch only when no proxy is configured.
No new tests. Test this manually with Wireshark. Run the simple-proxy example program found
in libsoup's examples directory, set that as your system HTTP proxy, and see if DNS queries
show up in Wireshark when refreshing a page sent over HTTP. They should appear only when the
proxy is not configured.
* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::DNSResolveQueue):
(WebCore::DNSResolveQueue::isUsingProxy):
* platform/network/DNSResolveQueue.h:
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::updateIsUsingProxy):
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
* platform/network/soup/DNSSoup.cpp:
(WebCore::didResolveProxy):
(WebCore::proxyResolvedForHttpUriCallback):
(WebCore::proxyResolvedForHttpsUriCallback):
(WebCore::DNSResolveQueue::updateIsUsingProxy):
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
2015-12-20 Dan Bernstein <mitz@apple.com>
Remove unused setToolbarHeight
https://bugs.webkit.org/show_bug.cgi?id=152466
Reviewed by Darin Adler.
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::setToolbarHeight): Deleted.
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* testing/Internals.cpp:
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 ==