1 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
3 Remove ENABLE_THREADED_COMPOSITOR build option
4 https://bugs.webkit.org/show_bug.cgi?id=168606
6 Reviewed by Michael Catanzaro.
8 * platform/TextureMapper.cmake:
10 2017-02-20 Alex Christensen <achristensen@webkit.org>
12 Fix some 32-bit builds after r212699
14 * platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:
15 (WebCore::RealtimeIncomingVideoSource::OnFrame):
16 Explicitly cast OSStatus to int for logging.
18 2017-02-20 Joseph Pecoraro <pecoraro@apple.com>
20 Remove unnecessary PerformanceEntry virtual methods
21 https://bugs.webkit.org/show_bug.cgi?id=168633
23 Reviewed by Ryosuke Niwa.
25 * page/PerformanceEntry.h:
26 (WebCore::PerformanceEntry::isResource):
27 (WebCore::PerformanceEntry::isMark):
28 (WebCore::PerformanceEntry::isMeasure):
29 Implement based on the Type.
31 * page/PerformanceMark.h:
32 * page/PerformanceMeasure.h:
33 * page/PerformanceResourceTiming.h:
34 Remove virtual overrides.
36 2017-02-20 Youenn Fablet <youenn@apple.com>
38 [WebRTC][Mac] Activate libwebrtc
39 https://bugs.webkit.org/show_bug.cgi?id=167293
41 Reviewed by Alex Christensen.
43 * Configurations/WebCore.xcconfig:
44 * Configurations/WebCoreTestSupport.xcconfig:
46 2017-02-20 Joseph Pecoraro <pecoraro@apple.com>
48 ASSERTION FAILED: m_normalWorld->hasOneRef() under WorkerThread::stop
49 https://bugs.webkit.org/show_bug.cgi?id=168356
50 <rdar://problem/30592486>
52 Reviewed by Ryosuke Niwa.
55 (WebCore::DOMWindow::removeAllEventListeners):
56 Remove Performance object EventListeners.
58 * workers/WorkerGlobalScope.cpp:
59 (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
60 (WebCore::WorkerGlobalScope::removeAllEventListeners):
61 (WebCore::WorkerGlobalScope::performance):
62 * workers/WorkerGlobalScope.h:
63 Remove Performance object EventListeners.
64 Also clear Performance early in destruction since its ContextDestructionObserver
65 destruction makes checks about the WorkerThread.
67 2017-02-20 Jer Noble <jer.noble@apple.com>
69 Local audio-only stream will not trigger playback to begin
70 https://bugs.webkit.org/show_bug.cgi?id=168412
72 Reviewed by Youenn Fablet.
74 Test: fast/mediastream/local-audio-playing-event.html
76 With video-bearing streams, the first video sample emitted from the stream causes the
77 readyState to move from HAVE_NOTHING to HAVE_ENOUGH_DATA. Wire up this same behavior for
78 audio-bearing streams. Add a MediaStreamTrackPrivate::Observer callback method
79 audioSamplesAvailable(), which gets passed up to MediaPlayerPrivateMediaStreamAVFObjC.
80 Because this callback may be (and probably will be) called on a background thread, run the
81 updateReadyState() task in a scheduledDeferredTask().
83 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
84 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
85 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::audioSamplesAvailable):
86 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):
87 * platform/mediastream/MediaStreamTrackPrivate.cpp:
88 (WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):
89 * platform/mediastream/MediaStreamTrackPrivate.h:
90 (WebCore::MediaStreamTrackPrivate::Observer::audioSamplesAvailable):
92 2017-02-20 Zalan Bujtas <zalan@apple.com>
94 Simple line layout: Implement absoluteQuadsForRange.
95 https://bugs.webkit.org/show_bug.cgi?id=168613
96 <rdar://problem/30614618>
98 Reviewed by Simon Fraser.
100 This patch ensures that the commonly used Range::getClientRects calls do not
101 throw us off of the simple line layout path.
103 Test: fast/dom/Range/simple-line-layout-getclientrects.html
105 * rendering/RenderText.cpp:
106 (WebCore::RenderText::absoluteQuadsForRange):
107 * rendering/SimpleLineLayoutFunctions.cpp:
108 (WebCore::SimpleLineLayout::collectAbsoluteQuadsForRange): Special case empty ranges with multiple empty runs.
109 * rendering/SimpleLineLayoutFunctions.h:
110 * rendering/SimpleLineLayoutResolver.cpp:
111 (WebCore::SimpleLineLayout::RunResolver::rangeForRendererWithOffsets):
112 * rendering/SimpleLineLayoutResolver.h:
114 2017-02-20 Ryan Haddad <ryanhaddad@apple.com>
116 Unreviewed, rolling out r212685.
118 This change broke the 32-bit Sierra build.
122 "Resource Load Statistics: Add alternate classification
124 https://bugs.webkit.org/show_bug.cgi?id=168347
125 http://trac.webkit.org/changeset/212685
127 2017-02-20 Sam Weinig <sam@webkit.org>
129 [WebIDL] Add support for constructors that have variadic parameters
130 https://bugs.webkit.org/show_bug.cgi?id=168614
132 Reviewed by Alex Christensen.
134 In preparation of removing some more custom bindings, move the constructor calling
135 code over to using GenerateParametersCheck completely. This required
136 - Removing special case of NamedConstructors automatically getting a Document passed
137 to them. The three named constructors that expected this have been updated to add
138 the required attributes.
139 - Add a version of the GenerateCallWith prologue for constructors.
140 - Remove now unnecessary argumentCount return value from GenerateParametersCheck.
142 * bindings/scripts/CodeGeneratorJS.pm:
143 (GenerateImplementation):
144 (GenerateCallWithUsingReferences):
145 (GenerateCallWithUsingPointers):
146 (GenerateConstructorCallWithUsingPointers):
148 (GenerateParametersCheck):
149 (GenerateConstructorDefinition):
151 * bindings/scripts/test/JS/JSTestInterface.cpp:
152 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
153 * bindings/scripts/test/JS/JSTestObj.cpp:
154 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
155 Update results for more consistent placement of ScriptExecutionContext and Document
156 accessors, add UNLIKELY to context checks, and remove automatic Document passing
157 for NamedConstructors.
159 * html/HTMLAudioElement.idl:
160 * html/HTMLImageElement.idl:
161 * html/HTMLOptionElement.idl:
162 Add ConstructorCallWith=Document.
164 2017-02-20 John Wilander <wilander@apple.com>
166 Resource Load Statistics: Add alternate classification method
167 https://bugs.webkit.org/show_bug.cgi?id=168347
168 <rdar://problem/30352793>
170 Reviewed by Alex Christensen.
172 This patch only adds test infrastructure in WebCore.
174 Tests: http/tests/loading/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics.html
175 http/tests/loading/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins.html
176 http/tests/loading/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins.html
177 http/tests/loading/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to.html
178 http/tests/loading/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics.html
179 http/tests/loading/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins.html
180 http/tests/loading/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html
181 http/tests/loading/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to.html
183 * loader/ResourceLoadObserver.cpp:
184 (WebCore::ResourceLoadObserver::setSubframeUnderTopFrameOrigin):
185 (WebCore::ResourceLoadObserver::setSubresourceUnderTopFrameOrigin):
186 (WebCore::ResourceLoadObserver::setSubresourceUniqueRedirectTo):
187 * loader/ResourceLoadObserver.h:
189 2017-02-20 Anders Carlsson <andersca@apple.com>
191 Use the new drag code path when dragging links
192 https://bugs.webkit.org/show_bug.cgi?id=168612
194 Reviewed by Tim Horton.
196 * editing/Editor.cpp:
197 (WebCore::Editor::copyURL):
198 Use userVisibleString instead of fillInUserVisibleForm.
200 (WebCore::Editor::pasteboardWriterURL):
201 New function that returns a PasteboardWriterData::URL for a given URL + title.
206 * editing/mac/EditorMac.mm:
207 (WebCore::Editor::userVisibleString):
208 (WebCore::Editor::fillInUserVisibleForm): Deleted.
209 Add a getter instead of a function that fills in a struct member.
211 * page/DragController.cpp:
212 (WebCore::DragController::startDrag):
213 Add the new DragItem code path when dragging links.
215 * platform/PasteboardWriterData.cpp:
216 (WebCore::PasteboardWriterData::isEmpty):
217 Check for m_url as well.
219 (WebCore::PasteboardWriterData::setURL):
222 * platform/PasteboardWriterData.h:
225 * platform/mac/PasteboardWriter.mm:
227 New helper function that returns an UTI from a pasteboard type.
229 (WebCore::createPasteboardWriter):
230 Handle converting URLs to the various pasteboard types.
232 2017-02-20 Wenson Hsieh <wenson_hsieh@apple.com>
234 Add plumbing to the UI process for TextIndicatorData when computing the drag image
235 https://bugs.webkit.org/show_bug.cgi?id=168583
236 Work towards <rdar://problem/30313681>
238 Reviewed by Tim Horton.
240 Adds some additional arguments to drag image creation functions to allow platforms to specify TextIndicatorData
241 for a link or selection-based DragImage. This TextIndicatorData is an optional member of the DragImage, and is
242 propagated to the UI process via SetDragImage in the WebDragClient.
244 Additionally renames hasDataInteractionAtPosition to hasSelectionAtPosition to better reflect its purpose.
246 No new tests, since there is no behavior change.
248 * page/DragController.cpp:
249 (WebCore::DragController::startDrag):
251 (WebCore::Page::hasSelectionAtPosition):
252 (WebCore::Page::hasDataInteractionAtPosition): Deleted.
254 * platform/DragImage.cpp:
255 (WebCore::createDragImageForSelection):
256 (WebCore::createDragImageForLink):
257 (WebCore::DragImage::operator=):
258 * platform/DragImage.h:
259 * platform/gtk/DragImageGtk.cpp:
260 (WebCore::createDragImageForLink):
261 * platform/mac/DragImageMac.mm:
262 (WebCore::createDragImageForLink):
263 * platform/win/DragImageWin.cpp:
264 (WebCore::createDragImageForLink):
266 2017-02-20 Brent Fulgham <bfulgham@apple.com>
268 Nullptr dereferences when stopping a load
269 https://bugs.webkit.org/show_bug.cgi?id=168608
270 <rdar://problem/29852056>
272 Reviewed by Ryosuke Niwa.
274 Don't attempt to notify a detached frame's load client that the load is
277 * loader/DocumentLoader.cpp:
278 (WebCore::DocumentLoader::stopLoading): Check for null frame loader and
279 bypass dereferencing it.
281 2017-02-17 Anders Carlsson <andersca@apple.com>
283 Add a new drag code path and use it for dragging plain text
284 https://bugs.webkit.org/show_bug.cgi?id=168534
286 Reviewed by Geoffrey Garen.
288 The new code path is currently only used for plain text selection dragging.
290 * WebCore.xcodeproj/project.pbxproj:
292 (WebCore::DragClient::useLegacyDragClient):
293 Add a new member function. This currently returns true everywhere except legacy WebKit on Mac.
295 (WebCore::DragClient::beginDrag):
296 Add new empty member function.
298 * page/DragController.cpp:
299 (WebCore::dragImageAnchorPointForSelectionDrag):
300 Helper function that returns the anchor point for a selection drag image.
302 (WebCore::DragController::startDrag):
303 If we can use the new code path, set up a drag item with an image and pasteboard data.
305 (WebCore::DragController::beginDrag):
306 New function that calls out to the client.
308 * page/DragController.h:
311 * platform/DragItem.h:
312 Add a new class - it's essentially a tuple of a drag image, an anchor point and the pasteboard data the item represents.
314 * platform/mac/PasteboardWriter.h:
315 Rename createPasteboardWriting to createPasteboardWriter.
317 * platform/mac/PasteboardWriter.mm:
318 (WebCore::createPasteboardWriter):
319 Use the UTI pasteboard type.
321 2017-02-20 Alex Christensen <achristensen@webkit.org>
323 Fix libwebrtc build after r212644.
324 https://bugs.webkit.org/show_bug.cgi?id=168596
326 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
327 (WebCore::LibWebRTCMediaEndpoint::StatsCollector::OnStatsDelivered):
328 m_endpoint changed from a c++ reference to a WTF::Ref, so we need to use operator -> instead of .
330 2017-02-20 Romain Bellessort <romain.bellessort@crf.canon.fr>
332 [Readable Streams API] Add ReadableByteStreamController byobRequest attribute
333 https://bugs.webkit.org/show_bug.cgi?id=168319
335 Reviewed by Youenn Fablet.
337 Added ReadableByteStreamController byobRequest attribute.
339 Added tests related to ReadableStreamBYOBRequest as a dedicated object
340 and also as an attribute of ReadableByteStreamController.
342 * CMakeLists.txt: Added new files.
343 * DerivedSources.cpp: Added new files.
344 * DerivedSources.make: Added new files.
345 * Modules/streams/ReadableByteStreamController.idl: Added byobRequest support.
346 * Modules/streams/ReadableByteStreamController.js: Added byobRequest support.
347 * Modules/streams/ReadableByteStreamInternals.js:
348 (privateInitializeReadableStreamBYOBRequest): Added constructor.
349 * Modules/streams/ReadableStreamBYOBRequest.idl: Added.
350 * Modules/streams/ReadableStreamBYOBRequest.js: Added.
351 (respond): Not implemented yet.
352 (respondWithNewView): Not implemented yet.
353 (view): Not implemented yet.
354 * WebCore.xcodeproj/project.pbxproj: Added new files.
355 * bindings/js/JSDOMGlobalObject.cpp: Added ReadableStreamBYOBRequest support.
356 (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
357 (WebCore::JSDOMGlobalObject::finishCreation):
358 (WebCore::JSDOMGlobalObject::visitChildren):
359 * bindings/js/JSReadableStreamPrivateConstructors.cpp: Added ReadableStreamBYOBRequest support.
360 (WebCore::constructJSReadableByteStreamController):
361 (WebCore::constructJSReadableStreamBYOBRequest):
362 (WebCore::JSBuiltinReadableStreamBYOBRequestPrivateConstructor::initializeExecutable):
363 (WebCore::createReadableStreamBYOBRequestPrivateConstructor):
364 * bindings/js/JSReadableStreamPrivateConstructors.h: Added ReadableStreamBYOBRequest support.
365 * bindings/js/WebCoreBuiltinNames.h: Added ReadableStreamBYOBRequest support.
367 2017-02-20 Per Arne Vollan <pvollan@apple.com>
369 [Win] Custom scale factor is not applied in all cases.
370 https://bugs.webkit.org/show_bug.cgi?id=168117
372 Reviewed by Brent Fulgham.
374 We should not call the function deviceScaleFactorForWindow directly, since this
375 will return the system scale factor, and ignore the custom scale factor.
377 * platform/graphics/ca/win/CACFLayerTreeHost.h:
378 * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
379 (WebCore::WKCACFViewLayerTreeHost::initializeContext):
380 (WebCore::WKCACFViewLayerTreeHost::resize):
381 (WebCore::WKCACFViewLayerTreeHost::setScaleFactor):
382 * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
383 * platform/win/GDIUtilities.h:
384 (WebCore::makeScaledPoint):
385 * platform/win/PlatformMouseEventWin.cpp:
386 (WebCore::positionForEvent):
387 * platform/win/PopupMenuWin.cpp:
388 (WebCore::PopupMenuWin::show):
389 (WebCore::PopupMenuWin::wndProc):
390 * platform/win/PopupMenuWin.h:
392 2017-02-20 Jon Lee <jonlee@apple.com>
394 Fix build error for iOS. Unreviewed.
396 * platform/graphics/GraphicsContext3D.cpp: Move stub function into !PLATFORM(COCOA) instead of !PLATFORM(MAC).
398 2017-02-20 Jon Lee <jonlee@apple.com>
400 Unreviewed, rolling out r212639.
402 Have a fix for the linker error on iOS.
406 "Unreviewed, rolling out r212637."
407 https://bugs.webkit.org/show_bug.cgi?id=168595
408 http://trac.webkit.org/changeset/212639
410 2017-02-20 Youenn Fablet <youenn@apple.com>
412 [WebRTC] Fix some memory leaks in libwebrtc binding code
413 https://bugs.webkit.org/show_bug.cgi?id=168596
415 Reviewed by Eric Carlson.
417 Covered by manual testing.
419 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
420 (WebCore::LibWebRTCMediaEndpoint::StatsCollector::StatsCollector): Using the libwebrtc way of creating such objects.
421 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
422 (WebCore::LibWebRTCMediaEndpoint::StatsCollector::create):
423 * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
424 (WebCore::PeerConnectionFactoryAndThreads::OnMessage):
426 2017-02-20 Alexey Proskuryakov <ap@apple.com>
428 Clean up how WebKit exports _WebCreateFragment
429 https://bugs.webkit.org/show_bug.cgi?id=168579
431 Reviewed by Dan Bernstein.
433 * editing/Editor.h: Removed the declaration of _WebCreateFragment, SOFT_LINK doesn't need it.
434 * editing/cocoa/EditorCocoa.mm: Moved a FIXME comment here.
436 2017-02-20 Ryan Haddad <ryanhaddad@apple.com>
438 Unreviewed, rolling out r212637.
440 This change broke iOS builds.
444 "Add 'webglcontextchanged' WebGLContextEvent"
445 https://bugs.webkit.org/show_bug.cgi?id=168595
446 http://trac.webkit.org/changeset/212637
448 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
450 Remove code under USE(GRAPHICS_SURFACE)
451 https://bugs.webkit.org/show_bug.cgi?id=168592
453 Reviewed by Michael Catanzaro.
455 This was only used by EFL port.
457 * platform/TextureMapper.cmake:
458 * platform/graphics/opengl/GLPlatformSurface.cpp: Removed.
459 * platform/graphics/surfaces/GLTransportSurface.cpp: Removed.
460 * platform/graphics/surfaces/GLTransportSurface.h: Removed.
461 * platform/graphics/surfaces/GraphicsSurface.cpp: Removed.
462 * platform/graphics/surfaces/GraphicsSurface.h: Removed.
463 * platform/graphics/surfaces/GraphicsSurfaceToken.h: Removed.
464 * platform/graphics/surfaces/egl/EGLConfigSelector.cpp: Removed.
465 * platform/graphics/surfaces/egl/EGLConfigSelector.h: Removed.
466 * platform/graphics/surfaces/egl/EGLContext.cpp: Removed.
467 * platform/graphics/surfaces/egl/EGLContext.h: Removed.
468 * platform/graphics/surfaces/egl/EGLHelper.cpp: Removed.
469 * platform/graphics/surfaces/egl/EGLHelper.h: Removed.
470 * platform/graphics/surfaces/egl/EGLSurface.cpp: Removed.
471 * platform/graphics/surfaces/egl/EGLSurface.h: Removed.
472 * platform/graphics/surfaces/egl/EGLXSurface.cpp: Removed.
473 * platform/graphics/surfaces/egl/EGLXSurface.h: Removed.
474 * platform/graphics/surfaces/glx/GLXConfigSelector.h: Removed.
475 * platform/graphics/surfaces/glx/GLXContext.cpp: Removed.
476 * platform/graphics/surfaces/glx/GLXContext.h: Removed.
477 * platform/graphics/surfaces/glx/GLXSurface.cpp: Removed.
478 * platform/graphics/surfaces/glx/GLXSurface.h: Removed.
479 * platform/graphics/surfaces/glx/X11Helper.cpp: Removed.
480 * platform/graphics/surfaces/glx/X11Helper.h: Removed.
481 * platform/graphics/texmap/TextureMapperBackingStore.cpp:
482 * platform/graphics/texmap/TextureMapperBackingStore.h:
483 * platform/graphics/texmap/TextureMapperPlatformLayer.h:
484 (WebCore::TextureMapperPlatformLayer::setClient):
485 * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: Removed.
486 * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: Removed.
487 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
488 (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
489 (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
490 (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
491 (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
492 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
493 * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
494 (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
496 2017-02-20 Dean Jackson <dino@apple.com>
498 Add 'webglcontextchanged' WebGLContextEvent
499 https://bugs.webkit.org/show_bug.cgi?id=168595
500 <rdar://problem/30604254>
502 Reviewed by Antoine Quint.
504 Add a new event that is dispatched when the GraphicsContext3D
505 notices that the active GPU has changed.
507 Test: fast/canvas/webgl/webglcontextchangedevent.html
509 * dom/EventNames.h: Add 'webglcontextchanged'.
510 * html/canvas/WebGLRenderingContextBase.cpp:
511 (WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent): Dispatch the new event.
512 (WebCore::WebGLRenderingContextBase::simulateContextChanged): Tell the GraphicsContext3D to
513 pretend there was a GPU switch. This is called from Internals for testing.
514 * html/canvas/WebGLRenderingContextBase.h:
515 * html/canvas/WebGLRenderingContextBase.idl: Export the interface so Internals can see it.
517 * platform/graphics/GraphicsContext3D.cpp:
518 (WebCore::GraphicsContext3D::simulateContextChanged): Tell the GraphicsContext3DManager
519 that it should pretend a GPU change has happened, which causes it to notify all the
521 * platform/graphics/GraphicsContext3D.h:
523 * platform/graphics/mac/GraphicsContext3DMac.mm:
524 (WebCore::GraphicsContext3DManager::updateAllContexts): Tell the GraphicsContext3Ds
525 to tell their WebGLRenderingContexts to dispatch an event.
526 (WebCore::GraphicsContext3D::simulateContextChanged): Fake the display change.
527 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
528 (WebCore::GraphicsContext3D::dispatchContextChangedNotification): Tell the WebGLRenderingContext
529 that a change has occurred, and that it should dispatch an event. This is a layering
530 violation which will need to be fixed (although with other communication from GC3D back
532 * testing/Internals.cpp:
533 (WebCore::Internals::simulateWebGLContextChanged):
534 * testing/Internals.h:
535 * testing/Internals.idl:
537 2017-02-19 Dean Jackson <dino@apple.com>
539 Activate/deactivate high performance GPU when requested
540 https://bugs.webkit.org/show_bug.cgi?id=168559
541 <rdar://problem/30592266>
545 Respect the high-performance powerPreference for WebGL, by managing an
546 object that enables the high-performance GPU. If a WebGL context wants
547 high-performance, and it is visible, then a manager class in GraphicsContext3D
548 creates and retains the object, causing all the WebGL contexts to move GPUs.
549 If all the high-performance contexts are not visible, such as in a background tab,
550 then the manager will release the object, allowing the GPU to power down.
552 The swapping back from the high-performance GPU happens on a timer, to make
553 sure we don't churn between GPUs if the user is swapping between a lot of tabs,
556 Unfortunately testing this change properly requires hardware with
557 multiple GPUs. I plan to write an API test that fakes most of the
558 system interaction, such as occluding the page. An API test might
559 also be able to verify if the system has more than one GPU. Otherwise
560 I'll have to plumb everything through Internals.
562 * html/canvas/WebGLRenderingContextBase.cpp:
563 (WebCore::isHighPerformanceContext): Helper to detect if the GraphicsContext3D actually
564 used high-performance mode.
565 (WebCore::WebGLRenderingContextBase::create): Add logging if we are
566 actually overriding a high-performance request.
567 (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase): If we are high-performance,
568 then register for activity state changes.
569 (WebCore::WebGLRenderingContextBase::addActivityStateChangeObserverIfNecessary):
570 (WebCore::WebGLRenderingContextBase::removeActivityStateChangeObserver):
571 (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D): Call removeActivityStateChangeObserver
572 as the GC3D is destroyed.
573 (WebCore::WebGLRenderingContextBase::maybeRestoreContext): If the context was
574 restored successfully, and came back in high-performance, then we need
575 to listen for activity state changes as usual.
576 (WebCore::WebGLRenderingContextBase::activityStateDidChange): If we changed visibility,
578 * html/canvas/WebGLRenderingContextBase.h: Class inherits ActivityStateChangeObserver.
580 * page/Settings.in: No longer force low-power everywhere.
582 * platform/graphics/GraphicsContext3D.cpp:
583 (WebCore::GraphicsContext3D::setContextVisibility): Empty implementation for non-Mac.
584 * platform/graphics/GraphicsContext3D.h:
585 (WebCore::GraphicsContext3D::powerPreferenceUsedForCreation): Tells clients what power preference
586 was actually used during creation (e.g. a single GPU system will use default, even if
587 they requested high-performance).
589 * platform/graphics/mac/GraphicsContext3DMac.mm:
590 (WebCore::GraphicsContext3DManager::GraphicsContext3DManager): Helper class to
591 look after all GraphicsContext3Ds.
592 (WebCore::GraphicsContext3DManager::hasTooManyContexts): We have a limit on the
593 number of contexts we can keep alive at any one time.
594 (WebCore::manager): Helper to return the static instance.
595 (WebCore::displayWasReconfigured): Send a message to all the contexts.
596 (WebCore::GraphicsContext3DManager::addContext):
597 (WebCore::GraphicsContext3DManager::removeContext):
598 (WebCore::GraphicsContext3DManager::addContextRequiringHighPerformance):
599 (WebCore::GraphicsContext3DManager::removeContextRequiringHighPerformance):
600 (WebCore::GraphicsContext3DManager::updateHighPerformanceState): Check if the number
601 of contexts requiring high-performance means we need to enable/disable that GPU.
602 (WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired): Releases our
603 object that keeps the high-performance GPU on.
604 (WebCore::GraphicsContext3DManager::recycleContextIfNecessary): Get rid of the first (oldest)
605 context. This code was in GC3D proper, but it made more sense here in the helper.
606 (WebCore::setPixelFormat): All contexts are created muxable now.
607 (WebCore::GraphicsContext3D::create): Use the manager.
608 (WebCore::GraphicsContext3D::GraphicsContext3D): Ditto.
609 (WebCore::GraphicsContext3D::~GraphicsContext3D): Add logging.
610 (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Better logging.
611 (WebCore::GraphicsContext3D::updateCGLContext):
612 (WebCore::GraphicsContext3D::setContextVisibility): This is the responder to the
613 ActivityStateChanges in the WebGLRenderingContext.
614 (WebCore::activeContexts): Deleted.
615 (WebCore::addActiveContext): Deleted.
616 (WebCore::removeActiveContext): Deleted.
618 2017-02-20 Manuel Rego Casasnovas <rego@igalia.com>
620 [css-grid] Remove compilation flag ENABLE_CSS_GRID_LAYOUT
621 https://bugs.webkit.org/show_bug.cgi?id=167693
623 Reviewed by Sergio Villar Senin.
625 * Configurations/FeatureDefines.xcconfig:
626 * css/CSSComputedStyleDeclaration.cpp:
627 (WebCore::valueForGridPosition):
628 (WebCore::isLayoutDependent):
629 (WebCore::resolveJustifySelfAuto):
630 (WebCore::isImplicitlyInheritedGridOrFlexProperty):
631 (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
632 (WebCore::ComputedStyleExtractor::propertyValue):
633 * css/CSSGridAutoRepeatValue.cpp:
634 * css/CSSGridAutoRepeatValue.h:
635 * css/CSSGridLineNamesValue.cpp:
636 * css/CSSGridLineNamesValue.h:
637 * css/CSSGridTemplateAreasValue.cpp:
638 * css/CSSGridTemplateAreasValue.h:
639 * css/CSSPrimitiveValueMappings.h:
640 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
641 * css/CSSProperties.json:
643 (WebCore::CSSValue::equals):
644 (WebCore::CSSValue::cssText):
645 (WebCore::CSSValue::destroy):
647 (WebCore::CSSValue::isContentDistributionValue):
648 (WebCore::CSSValue::isGridLineNamesValue):
649 * css/CSSValueKeywords.in:
650 * css/StyleBuilderConverter.h:
651 (WebCore::StyleBuilderConverter::convertGridAutoFlow):
652 (WebCore::StyleBuilderConverter::convertContentAlignmentData):
653 * css/StyleBuilderCustom.h:
654 (WebCore::StyleBuilderCustom::applyValueGridTemplateRows):
655 * css/StyleProperties.cpp:
656 (WebCore::StyleProperties::getPropertyValue):
657 * css/StyleResolver.cpp:
658 (WebCore::equivalentBlockDisplay):
659 * css/StyleResolver.h:
660 * css/parser/CSSParser.cpp:
661 (WebCore::CSSParserContext::CSSParserContext):
662 (WebCore::operator==):
663 * css/parser/CSSParserFastPaths.cpp:
664 (WebCore::isSimpleLengthPropertyID):
665 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
666 (WebCore::CSSParserFastPaths::isKeywordPropertyID):
667 * css/parser/CSSParserMode.h:
668 (WebCore::CSSParserContextHash::hash):
669 * css/parser/CSSPropertyParser.cpp:
670 (WebCore::consumeGridAutoFlow):
671 (WebCore::consumeGridTemplateAreas):
672 (WebCore::CSSPropertyParser::parseSingleValue):
673 (WebCore::CSSPropertyParser::consumeGridShorthand):
674 (WebCore::CSSPropertyParser::parseShorthand):
678 (WebCore::Position::isCandidate):
679 * page/RuntimeEnabledFeatures.h:
680 (WebCore::RuntimeEnabledFeatures::isCSSGridLayoutEnabled):
681 * rendering/Grid.cpp:
683 * rendering/RenderBlock.cpp:
684 (WebCore::RenderBlock::getFirstLetter):
685 * rendering/RenderBox.cpp:
686 (WebCore::RenderBox::~RenderBox):
687 (WebCore::RenderBox::styleDidChange):
688 (WebCore::RenderBox::clearExtraInlineAndBlockOffests):
689 (WebCore::RenderBox::containingBlockLogicalWidthForContent):
690 (WebCore::RenderBox::containingBlockLogicalHeightForContent):
691 (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
692 (WebCore::RenderBox::computeLogicalWidthInRegion):
693 (WebCore::RenderBox::sizesLogicalWidthToFitContent):
694 (WebCore::RenderBox::computeLogicalHeight):
695 (WebCore::RenderBox::computePercentageLogicalHeight):
696 (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
697 (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
698 (WebCore::RenderBox::computePositionedLogicalWidth):
699 (WebCore::RenderBox::computePositionedLogicalHeight):
700 (WebCore::RenderBox::createsNewFormattingContext):
701 (WebCore::logicalWidthIsResolvable):
702 (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
703 (WebCore::RenderBox::hasDefiniteLogicalHeight):
704 * rendering/RenderBox.h:
705 (WebCore::RenderBox::isGridItem):
706 * rendering/RenderElement.cpp:
707 (WebCore::RenderElement::createFor):
708 * rendering/RenderFlexibleBox.cpp:
709 (WebCore::RenderFlexibleBox::alignChildren):
710 * rendering/RenderGrid.cpp:
711 * rendering/RenderGrid.h:
712 * rendering/RenderObject.h:
713 (WebCore::RenderObject::isRenderGrid):
714 * rendering/style/GridArea.h:
715 * rendering/style/GridLength.h:
716 * rendering/style/GridPosition.h:
717 * rendering/style/GridPositionsResolver.cpp:
718 * rendering/style/GridPositionsResolver.h:
719 * rendering/style/GridTrackSize.h:
720 * rendering/style/RenderStyle.cpp:
721 (WebCore::RenderStyle::isCSSGridLayoutEnabled):
722 (WebCore::RenderStyle::changeRequiresLayout):
723 * rendering/style/RenderStyle.h:
724 (WebCore::RenderStyle::gridItemRowEnd):
725 (WebCore::RenderStyle::setGridRowGap):
726 (WebCore::RenderStyle::initialGridItemRowEnd):
727 (WebCore::RenderStyle::isDisplayReplacedType):
728 (WebCore::RenderStyle::isDisplayGridBox):
729 * rendering/style/RenderStyleConstants.h:
730 * rendering/style/StyleGridData.cpp:
731 * rendering/style/StyleGridData.h:
732 * rendering/style/StyleGridItemData.cpp:
733 * rendering/style/StyleGridItemData.h:
734 * rendering/style/StyleRareNonInheritedData.cpp:
735 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
736 (WebCore::StyleRareNonInheritedData::operator==):
737 * rendering/style/StyleRareNonInheritedData.h:
738 * testing/InternalSettings.cpp:
739 (WebCore::InternalSettings::Backup::Backup):
740 (WebCore::InternalSettings::Backup::restoreTo):
741 (WebCore::InternalSettings::setCSSGridLayoutEnabled):
743 2017-02-20 Carlos Garcia Campos <cgarcia@igalia.com>
745 REGRESSION(r212345): [GTK] ASSERT(cookieChangeCallbackMap().contains(jar)) failed in WebCore::stopObservingCookieChanges:54
746 https://bugs.webkit.org/show_bug.cgi?id=168375
748 Reviewed by Alex Christensen.
750 Simplify the way cookie storage is handled in NetworkStorageSessionSoup. Now we always keep a reference to the
751 cookie jar, no matter if we have a session or not, that is always kept in sync with the one actually used by the
752 session. We always connect to the changed signal of the current cookie jar and notify the observer if it has been
755 * platform/network/NetworkStorageSession.h:
756 * platform/network/soup/CookieStorageSoup.cpp:
757 (WebCore::startObservingCookieChanges): Remove this implementation and add an ASSERT to ensure we don't use this anymore.
758 (WebCore::stopObservingCookieChanges): Ditto.
759 (WebCore::cookieChangeCallbackMap): Deleted.
760 (WebCore::soupCookiesChanged): Deleted.
761 * platform/network/soup/NetworkStorageSessionSoup.cpp:
762 (WebCore::NetworkStorageSession::NetworkStorageSession): Initialize the cookie storage.
763 (WebCore::NetworkStorageSession::~NetworkStorageSession): Disconnect the changed signal.
764 (WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession): Always pass the current cookie storage.
765 (WebCore::NetworkStorageSession::cookiesDidChange): Notify the observer.
766 (WebCore::NetworkStorageSession::cookieStorage): Return the current cookie storage.
767 (WebCore::NetworkStorageSession::setCookieStorage): Update the current cookie storage and update the session if
768 needed too. We always have a valid cookie storage so if nullptr is given we create a new one.
769 (WebCore::NetworkStorageSession::setCookieObserverHandler): Set a cookie observer handler.
771 2017-02-19 Chris Dumez <cdumez@apple.com>
773 onbeforeunload event return value coercion is not per-spec
774 https://bugs.webkit.org/show_bug.cgi?id=168382
776 Reviewed by Darin Adler.
778 Update handling of value returned by onbeforeunload event listeners
779 to match Firefox and the specification:
780 - https://html.spec.whatwg.org/#the-event-handler-processing-algorithm (step 4)
782 Namely, the following changes were made:
783 - Only set the event's returnValue attribute to the returned value if the attribute
784 value is the empty string (so as to not override the attribute value if it has
785 explicitly been set by JS).
786 - Cancel the event when the return value is not null by calling preventDefault().
788 Additionally, the following changes were made:
789 - Ask the user to confirm the navigation if the event was canceled, not just if the
790 returnValue attribute was set to a non-empty string.
792 - https://html.spec.whatwg.org/#prompt-to-unload-a-document (step 8)
794 Tests: fast/events/before-unload-return-string-conversion.html
795 imported/w3c/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html
797 * bindings/js/JSEventListener.cpp:
798 (WebCore::handleBeforeUnloadEventReturnValue):
799 (WebCore::JSEventListener::handleEvent):
800 * loader/FrameLoader.cpp:
801 (WebCore::shouldAskForNavigationConfirmation):
802 (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
804 2017-02-19 Carlos Garcia Campos <cgarcia@igalia.com>
806 [SOUP] Call SoupNetworkSession::setShouldIgnoreTLSErrors when testRunner.setAllowsAnySSLCertificate() is called
807 https://bugs.webkit.org/show_bug.cgi?id=168571
809 Reviewed by Michael Catanzaro.
811 Fixes: http/tests/ssl/upgrade-origin-usage.html
813 * testing/InternalSettings.cpp:
814 (WebCore::InternalSettings::setAllowsAnySSLCertificate):
816 2017-02-18 Ryosuke Niwa <rniwa@webkit.org>
818 REGRESSION(r212218): Assertion failures in and after parserRemoveChild
819 https://bugs.webkit.org/show_bug.cgi?id=168458
821 Reviewed by Antti Koivisto.
823 The bug was caused by parserRemoveChild not preceeding to remove oldChild even when
824 oldChild had been inserted elsewhere during unload evnets of the disconnected frames.
825 Fixed the bug by checking this condition and exiting early.
827 Also fixed various callers of parserRemoveChild to not call parserAppendChild when
828 the removed node had already been inserted elsewhere by scripts.
830 Tests: fast/parser/adoption-agency-unload-iframe-3.html
831 fast/parser/adoption-agency-unload-iframe-4.html
832 fast/parser/xml-error-unload-iframe.html
834 * dom/ContainerNode.cpp:
835 (WebCore::ContainerNode::parserRemoveChild): Exit early when the node had been
836 inserted elsewhere while firing unload events. Also moved the call to
837 notifyRemovePendingSheetIfNeeded outside NoEventDispatchAssertion since it can
838 synchrnously fire a focus event.
839 (WebCore::ContainerNode::parserAppendChild): Moved adoptNode call to inside
840 NoEventDispatchAssertion since adoptNode call here should never mutate DOM.
841 * html/parser/HTMLConstructionSite.cpp:
842 (WebCore::executeReparentTask): Added an early exit when the node had already been
844 (WebCore::executeInsertAlreadyParsedChildTask): Ditto.
846 (WebCore::XMLErrors::insertErrorMessageBlock): Ditto.
847 * xml/parser/XMLDocumentParser.cpp:
848 (WebCore::XMLDocumentParser::end): Fixed a crash unveiled by one of the test cases.
849 Exit early when insertErrorMessageBlock detached the parser (by author scripts).
850 (WebCore::XMLDocumentParser::finish): Keep the parser alive until we exit.
852 2017-02-19 Chris Dumez <cdumez@apple.com>
854 <input type=color readonly> doesn't act per spec
855 https://bugs.webkit.org/show_bug.cgi?id=168421
856 <rdar://problem/30593185>
858 Reviewed by Ryosuke Niwa.
860 The 'readonly' attribute should not apply to <input type=color> as per the
862 - https://html.spec.whatwg.org/#the-input-element:attr-input-readonly-3
864 Chrome / Firefox and Edge already behave as per the specification.
866 Tests: fast/forms/color/input-color-disabled.html
867 fast/forms/color/input-color-readonly.html
869 * html/ColorInputType.cpp:
870 (WebCore::ColorInputType::handleDOMActivateEvent):
871 (WebCore::ColorInputType::didChooseColor):
873 2017-02-19 Commit Queue <commit-queue@webkit.org>
875 Unreviewed, rolling out r212466.
876 https://bugs.webkit.org/show_bug.cgi?id=168577
878 causes crashes on AArch64 on linux, maybe it's causing crashes
879 on iOS too (Requested by pizlo on #webkit).
883 "The collector thread should only start when the mutator
884 doesn't have heap access"
885 https://bugs.webkit.org/show_bug.cgi?id=167737
886 http://trac.webkit.org/changeset/212466
888 2017-02-19 Zalan Bujtas <zalan@apple.com>
890 Simple line layout: Implement positionForPoint.
891 https://bugs.webkit.org/show_bug.cgi?id=168565
892 <rdar://problem/30593370>
894 Reviewed by Antti Koivisto.
896 With this patch, now we don't need to switch over to line box tree anymore when positionForPoint()
897 is called on a single RenderText content (which is the majority of the simple line content).
898 This patch also adds a new positionForPoint method which returns a Position object instead of VisiblePosition.
899 Some of the positionForPoint() callsites are only interested in the Position object so constructing a VisiblePosition
900 (which could potentially kick off a layout) is a waste. At this point the non-simple line layout codepath still constructs
901 a VisiblePosition and that should be addresses as part of webkit.org/b/168566.
903 Covered by existing tests.
906 (WebCore::Document::caretRangeFromPoint):
907 * rendering/RenderBlockFlow.cpp:
908 (WebCore::RenderBlockFlow::positionForPoint):
909 * rendering/RenderBlockFlow.h:
910 * rendering/RenderObject.cpp:
911 (WebCore::RenderObject::positionForPoint):
912 * rendering/RenderObject.h:
913 * rendering/RenderText.cpp:
914 (WebCore::RenderText::positionForPoint):
915 * rendering/RenderText.h:
916 * rendering/SimpleLineLayoutFunctions.cpp:
917 (WebCore::SimpleLineLayout::positionForPoint):
918 * rendering/SimpleLineLayoutFunctions.h:
919 * rendering/SimpleLineLayoutResolver.cpp:
920 (WebCore::SimpleLineLayout::RunResolver::runForPoint):
921 * rendering/SimpleLineLayoutResolver.h:
922 (WebCore::SimpleLineLayout::RunResolver::Run::logicalLeft):
923 (WebCore::SimpleLineLayout::RunResolver::Run::logicalRight):
925 2017-02-19 Antti Koivisto <antti@apple.com>
927 Execute pending scripts asynchronously after stylesheet loads complete
928 https://bugs.webkit.org/show_bug.cgi?id=168367
929 rdar://problem/30561379
931 Reviewed by Andreas Kling.
933 The current synchronous execution is fragile and creates various problems.
935 * css/StyleSheetContents.cpp:
936 (WebCore::StyleSheetContents::checkLoaded):
937 * dom/ContainerNode.cpp:
938 (WebCore::ContainerNode::takeAllChildrenFrom):
939 (WebCore::ContainerNode::notifyChildInserted):
940 (WebCore::ContainerNode::removeChild):
941 (WebCore::ContainerNode::parserRemoveChild):
942 (WebCore::ContainerNode::removeChildren):
944 Remove various places where we would trigger delayed synchronous execution.
947 (WebCore::Document::Document):
948 (WebCore::Document::recalcStyle):
950 Trigger scroll to anchor at the end of style resolution instead of when style sheet load completes.
952 (WebCore::Document::didRemoveAllPendingStylesheet):
954 Call asynchronous script execution function.
957 (WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet): Deleted.
958 (WebCore::Document::notifyRemovePendingSheetIfNeeded): Deleted.
959 * dom/ScriptableDocumentParser.cpp:
960 (WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
961 (WebCore::ScriptableDocumentParser::executeScriptsWaitingForStylesheetsSoon):
962 (WebCore::ScriptableDocumentParser::scriptsWaitingForStylesheetsExecutionTimerFired):
964 Add a timer for executing pending scripts.
966 (WebCore::ScriptableDocumentParser::detach):
967 * dom/ScriptableDocumentParser.h:
968 (WebCore::ScriptableDocumentParser::executeScriptsWaitingForStylesheets):
969 * html/HTMLLinkElement.cpp:
970 (WebCore::HTMLLinkElement::removedFrom):
971 (WebCore::HTMLLinkElement::removePendingSheet):
972 * html/HTMLLinkElement.h:
973 * html/parser/HTMLDocumentParser.cpp:
974 (WebCore::HTMLDocumentParser::detach):
975 * loader/DocumentLoader.cpp:
976 (WebCore::DocumentLoader::isLoadingInAPISense):
978 Stay in loading state if we have a pending script. This matches existing behavior.
980 * style/StyleScope.cpp:
981 (WebCore::Style::Scope::removePendingSheet):
982 * style/StyleScope.h:
984 2017-02-18 Chris Dumez <cdumez@apple.com>
986 <input type=range readonly> doesn't act per spec
987 https://bugs.webkit.org/show_bug.cgi?id=168422
988 <rdar://problem/30593189>
990 Reviewed by Ryosuke Niwa.
992 'readonly' attribute should not apply to <input type=range> as per the HTML
994 - https://html.spec.whatwg.org/#the-input-element:attr-input-readonly-3
996 Firefox and Edge already behave as per the specification.
998 No new tests, updated existing tests.
1000 * html/RangeInputType.cpp:
1001 (WebCore::RangeInputType::handleMouseDownEvent):
1002 (WebCore::RangeInputType::handleTouchEvent):
1003 (WebCore::RangeInputType::handleKeydownEvent):
1004 * html/shadow/SliderThumbElement.cpp:
1005 (WebCore::SliderThumbElement::defaultEventHandler):
1006 (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
1007 (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
1009 2017-02-18 Chris Dumez <cdumez@apple.com>
1011 Recursive MessagePort.postMessage() calls causes tab to become unresponsive
1012 https://bugs.webkit.org/show_bug.cgi?id=168548
1013 <rdar://problem/29808005>
1015 Reviewed by Darin Adler.
1017 MessagePort::dispatchMessages() was getting messages one by one of the
1018 channel's MessageQueue and firing the MessageEvent for each of them.
1019 The issue is that we can get stuck in an infinite loop if the
1020 MessageEvent handler posts a message on the same post.
1022 To address the issue, we now takes all messages from the queue before
1023 iterating over them to fire the event. This way, if new messages are
1024 added to the queue in one of the MessageEvent handlers, they will not
1025 be processed until the next event loop iteration, as is expected.
1027 Test: fast/events/message-port-postMessage-recursive.html
1029 * dom/MessagePort.cpp:
1030 (WebCore::MessagePort::dispatchMessages):
1031 * dom/MessagePortChannel.h:
1032 (WebCore::MessagePortChannel::EventData::EventData):
1033 * dom/default/PlatformMessagePortChannel.cpp:
1034 (WebCore::MessagePortChannel::postMessageToRemote):
1035 * dom/default/PlatformMessagePortChannel.h:
1036 (WebCore::PlatformMessagePortChannel::MessagePortQueue::takeMessage):
1037 (WebCore::PlatformMessagePortChannel::MessagePortQueue::takeAllMessages):
1038 (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
1040 2017-02-18 Michael Catanzaro <mcatanzaro@igalia.com>
1042 Remove COORDINATED_GRAPHICS_MULTIPROCESS
1043 https://bugs.webkit.org/show_bug.cgi?id=168514
1045 Reviewed by Darin Adler.
1047 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1048 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1050 2017-02-17 Simon Fraser <simon.fraser@apple.com>
1052 Allow properties in CSSProperties.json that don't trigger code generation
1053 https://bugs.webkit.org/show_bug.cgi?id=168535
1055 Reviewed by Sam Weinig.
1057 In order to track the development of CSS properties that we have not yet implemented,
1058 support '"skip-codegen" : true' in "codegen-properties".
1060 Test by adding a few fill-related properties with this attribute.
1062 * css/CSSProperties.json:
1064 (isPropertyEnabled):
1067 2017-02-17 Brian Burg <bburg@apple.com>
1069 Web Inspector: RTL: Inspector window should dock to the left when using RTL layout direction
1070 https://bugs.webkit.org/show_bug.cgi?id=168273
1071 <rdar://problem/29949325>
1073 Reviewed by Matt Baker.
1075 Add the ability to dock Web Inspector to the left of the inspected view.
1076 The frontend decides whether the Dock to Side button docks left or right
1077 based on the current layout direction.
1079 * inspector/InspectorFrontendClient.h:
1080 * inspector/InspectorFrontendClientLocal.cpp:
1081 (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
1082 * inspector/InspectorFrontendHost.cpp:
1083 (WebCore::InspectorFrontendHost::requestSetDockSide):
1085 2017-02-16 Simon Fraser <simon.fraser@apple.com>
1087 Allow PlatformCALayers to specify that they want deep color backing store
1088 https://bugs.webkit.org/show_bug.cgi?id=168495
1090 Reviewed by Tim Horton.
1092 Currently capable iOS devices get deep color backing store by virtue of a supports
1093 check in PlatformCALayerCocoa::PlatformCALayerCocoa(), and LegacyTileGridTile.
1095 Future work will make layer contents format selection more complex, so express the need
1096 for deep color on PlatformCALayer, and have the creators of PlatformCALayer (mainly the
1097 flavors of GraphicsLayerCA) choose for them to support deep color. A bit of special-casing
1098 is needed to propagte the state to TileControllers.
1100 The deep-colorness now propagates from PlatformCALayerRemote to RemoteLayerBackingStore,
1101 instead of RemoteLayerBackingStore looking at the properties of the screen directly.
1103 Remove PlatformCALayer::LayerTypeWebTiledLayer which was only used for the old CATiledLayers
1104 that we no longer use.
1106 An iphone7 test verifies that page tiles, normal layers and tiled layers get the deep
1107 color state set on them.
1109 Test: tiled-drawing/ios/iphone7/compositing-layers-deep-color.html
1111 * platform/graphics/ca/GraphicsLayerCA.cpp:
1112 (WebCore::GraphicsLayerCA::createPlatformCALayer):
1113 (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
1114 * platform/graphics/ca/GraphicsLayerCA.h:
1115 * platform/graphics/ca/PlatformCALayer.cpp:
1116 (WebCore::PlatformCALayer::canHaveBackingStore):
1117 (WebCore::operator<<):
1118 * platform/graphics/ca/PlatformCALayer.h:
1119 * platform/graphics/ca/TileController.cpp:
1120 (WebCore::TileController::setZoomedOutContentsScale):
1121 (WebCore::TileController::setAcceleratesDrawing):
1122 (WebCore::TileController::setWantsDeepColorBackingStore):
1123 (WebCore::TileController::createTileLayer):
1124 * platform/graphics/ca/TileController.h:
1125 * platform/graphics/ca/TileGrid.cpp:
1126 (WebCore::TileGrid::updateTileLayerProperties):
1127 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
1128 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1129 (PlatformCALayerCocoa::PlatformCALayerCocoa):
1130 (PlatformCALayerCocoa::commonInit):
1131 (PlatformCALayerCocoa::wantsDeepColorBackingStore):
1132 (PlatformCALayerCocoa::setWantsDeepColorBackingStore):
1133 (layerContentsFormat):
1134 (PlatformCALayerCocoa::updateContentsFormat):
1135 * platform/graphics/ca/cocoa/WebTiledBackingLayer.h:
1136 * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
1137 (-[WebTiledBackingLayer setWantsDeepColorBackingStore:]):
1138 (-[WebTiledBackingLayer wantsDeepColorBackingStore]):
1139 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1140 (PlatformCALayerWin::wantsDeepColorBackingStore):
1141 (PlatformCALayerWin::setWantsDeepColorBackingStore):
1143 * platform/graphics/ca/win/PlatformCALayerWin.h:
1144 * platform/spi/cocoa/QuartzCoreSPI.h:
1146 2017-02-17 Jer Noble <jer.noble@apple.com>
1148 Refactoring: Make sure to unprepare WebAudioSourceProviderAVFObjC when its owner is destroyed.
1149 https://bugs.webkit.org/show_bug.cgi?id=168532
1151 Reviewed by Youenn Fablet.
1153 Because WebAudioSourceProviderAVFObjC has a back-pointer to the object which creted it, make
1154 sure that back-pointer is invalidated once the creating object is destroyed by calling
1155 WebAudioSOurceProviderAVFObjC::unprepare().
1157 Drive-by Fix: In WebAudioSourceProviderAVFObjC::audioSamplesAvailable(), PlatformAudioData will
1158 always be of the WebAudioBufferList type. If this ever becomes untrue, an invalid downcast will
1159 be caught by downcast<>, so just remove the is<> check.
1161 * platform/mediastream/mac/AVAudioCaptureSource.mm:
1162 (WebCore::AVAudioCaptureSource::~AVAudioCaptureSource):
1163 * platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
1164 * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
1165 (WebCore::MockRealtimeAudioSourceMac::~MockRealtimeAudioSourceMac):
1166 * platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:
1167 (WebCore::RealtimeIncomingAudioSource::~RealtimeIncomingAudioSource):
1168 * platform/mediastream/mac/RealtimeIncomingAudioSource.h:
1169 * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
1170 (WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
1171 (WebCore::WebAudioSourceProviderAVFObjC::setClient):
1172 (WebCore::WebAudioSourceProviderAVFObjC::unprepare):
1173 (WebCore::WebAudioSourceProviderAVFObjC::audioSamplesAvailable):
1175 2017-02-17 Antoine Quint <graouts@apple.com>
1177 [Modern Media Controls] Improve handling of <video> with only audio tracks
1178 https://bugs.webkit.org/show_bug.cgi?id=167836
1179 <rdar://problem/30255812>
1181 Reviewed by Dean Jackson.
1183 We now check for the availability of video tracks before considering a <video>
1184 element is displaying an actual video file and turning auto-hide on. We also
1185 check that we have video tracks before enabling the fullscreen button. This
1186 brings the behavior of a <video> pointing to a resource with no video tracks
1187 to be the same as an <audio> element.
1189 Test: media/modern-media-controls/media-controller/media-controller-video-with-only-audio.html
1191 * Modules/modern-media-controls/media/controls-visibility-support.js:
1192 (ControlsVisibilitySupport.prototype.get tracksToMonitor):
1193 (ControlsVisibilitySupport.prototype._updateControls):
1194 (ControlsVisibilitySupport):
1195 * Modules/modern-media-controls/media/fullscreen-support.js:
1196 (FullscreenSupport.prototype.syncControl):
1197 (FullscreenSupport):
1199 2017-02-17 Antoine Quint <graouts@apple.com>
1201 [Modern Media Controls] Toggle playback when clicking on the video on macOS
1202 https://bugs.webkit.org/show_bug.cgi?id=168515
1203 <rdar://problem/30577441>
1205 Reviewed by Dean Jackson.
1207 Listen to click events on the macOS media controls. Detect any clicks that were on the
1208 background instead of the controls widgets themselves, and tell the delegate (MediaController)
1211 Tests: media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause.html
1212 media/modern-media-controls/media-controller/media-controller-click-on-video-background-to-dismiss-tracks-panel-should-not-toggle-playback.html
1213 media/modern-media-controls/media-controller/media-controller-click-on-video-controls-should-not-pause.html
1215 * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
1216 (MacOSFullscreenMediaControls.prototype._handleMousedown):
1217 * Modules/modern-media-controls/controls/macos-inline-media-controls.js:
1218 (MacOSInlineMediaControls.prototype.handleEvent):
1219 * Modules/modern-media-controls/controls/macos-media-controls.js:
1220 (MacOSMediaControls.prototype.handleEvent):
1221 (MacOSMediaControls):
1222 * Modules/modern-media-controls/media/media-controller.js:
1223 (MediaController.prototype.togglePlayback):
1224 (MediaController.prototype.macOSControlsBackgroundWasClicked):
1225 (MediaController.prototype._updateControlsIfNeeded):
1226 * Modules/modern-media-controls/media/playback-support.js:
1227 (PlaybackSupport.prototype.buttonWasPressed):
1229 2017-02-17 Jer Noble <jer.noble@apple.com>
1231 Refactoring: Remove AudioSourceObserverObjC and AudioCaptureSourceProviderObjC
1232 https://bugs.webkit.org/show_bug.cgi?id=168520
1234 Reviewed by Youenn Fablet.
1236 Having AudioCaptureSourceProviderObjC as the type provided to WebAudioSourceProviderAVFObjC
1237 (and only ever to WebAudioSourceProviderAVFObjC) makes it impossible for that class to add
1238 an observer on RealtimeMediaSource, of which all classes inheriting from
1239 WebAudioSourceProviderAVFObjC are subclasses. There is no need to treat
1240 WebAudioSourceProviderAVFObjC as an "observer", since the only thing it will ever observe is
1241 the object which created it and hold an explicit reference to it. So replace all instances
1242 of the "observer" pattern with direct calls to the necessary (newly non-virtual) methods.
1243 This allows WebAudioSourceProviderAVFObjC to register as an observer directly on
1244 RealtimeMediaSource, to listen for audioSamplesAvailable() instead of process(), and remove
1245 a lot of unnecessary conversion code and observer duplication.
1247 * WebCore.xcodeproj/project.pbxproj:
1248 * platform/mediastream/RealtimeMediaSource.h:
1249 (WebCore::RealtimeMediaSource::Observer::sourceStopped):
1250 (WebCore::RealtimeMediaSource::Observer::sourceMutedChanged):
1251 (WebCore::RealtimeMediaSource::Observer::sourceEnabledChanged):
1252 (WebCore::RealtimeMediaSource::Observer::sourceSettingsChanged):
1253 (WebCore::RealtimeMediaSource::Observer::preventSourceFromStopping):
1254 * platform/mediastream/mac/AVAudioCaptureSource.h:
1255 * platform/mediastream/mac/AVAudioCaptureSource.mm:
1256 (WebCore::AVAudioCaptureSource::shutdownCaptureSession):
1257 (WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
1258 (WebCore::AVAudioCaptureSource::addObserver): Deleted.
1259 (WebCore::AVAudioCaptureSource::removeObserver): Deleted.
1260 (WebCore::AVAudioCaptureSource::start): Deleted.
1261 * platform/mediastream/mac/AudioCaptureSourceProviderObjC.h: Removed.
1262 * platform/mediastream/mac/AudioSourceObserverObjC.h: Removed.
1263 * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
1264 * platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
1265 * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
1266 (WebCore::MockRealtimeAudioSourceMac::emitSampleBuffers):
1267 (WebCore::MockRealtimeAudioSourceMac::reconfigure):
1268 (WebCore::MockRealtimeAudioSourceMac::audioSourceProvider):
1269 (WebCore::MockRealtimeAudioSourceMac::addObserver): Deleted.
1270 (WebCore::MockRealtimeAudioSourceMac::removeObserver): Deleted.
1271 (WebCore::MockRealtimeAudioSourceMac::start): Deleted.
1272 * platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:
1273 (WebCore::RealtimeIncomingAudioSource::audioSourceProvider):
1274 (WebCore::RealtimeIncomingAudioSource::addObserver): Deleted.
1275 (WebCore::RealtimeIncomingAudioSource::removeObserver): Deleted.
1276 (WebCore::RealtimeIncomingAudioSource::start): Deleted.
1277 * platform/mediastream/mac/RealtimeIncomingAudioSource.h:
1278 * platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
1279 * platform/mediastream/mac/RealtimeOutgoingVideoSource.h:
1280 * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
1281 * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
1282 (WebCore::WebAudioSourceProviderAVFObjC::create):
1283 (WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
1284 (WebCore::WebAudioSourceProviderAVFObjC::setClient):
1285 (WebCore::WebAudioSourceProviderAVFObjC::audioSamplesAvailable):
1286 (WebCore::WebAudioSourceProviderAVFObjC::process): Deleted.
1288 2017-02-17 Antoine Quint <graouts@apple.com>
1290 REGRESSION: Subtitles menu in media controls allows multiple items to be selected
1291 https://bugs.webkit.org/show_bug.cgi?id=168168
1292 <rdar://problem/30488605>
1294 Reviewed by Dean Jackson.
1296 Ensure that only a single audio track and a single text track can be selected
1297 in the tracks panel at any given point.
1299 * Modules/modern-media-controls/media/tracks-support.js:
1300 (TracksSupport.prototype.tracksPanelSelectionDidChange):
1301 (TracksSupport.prototype._sortedTrackList):
1304 2017-02-17 Jeremy Jones <jeremyj@apple.com>
1306 Invalidate WebAVSampleBufferStatusChangeListener when MediaPlayerPrivateMediaStreamAVFObjC is deallocated.
1307 https://bugs.webkit.org/show_bug.cgi?id=168488
1309 Reviewed by Jer Noble.
1311 Fixes periodically crashing test: fast/mediastream/MediaStream-video-element-track-stop.html
1313 WebAVSampleBufferStatusChangeListener has an unretained referecne to MediaPlayerPrivateMediaStreamAVFObjC
1314 that must be invaldated when MediaPlayerPrivateMediaStreamAVFObjC is deallocated.
1316 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1317 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
1319 2017-02-17 Antoine Quint <graouts@apple.com>
1321 [Modern Media Controls] Improve handling of live broadcast video
1322 https://bugs.webkit.org/show_bug.cgi?id=168506
1323 <rdar://problem/30432094>
1325 Reviewed by Dean Jackson.
1327 We improve the handling of live broadcast video by:
1329 - checking that we have a media source before deciding to show the controls
1330 bar and start button
1331 - support a mode where neither the status text nor the scrubber is visible
1332 in case we're still waiting on sufficient data to determine the video
1333 time and we haven't really started loading data yet
1334 - not showing time labels when we have an infinite duration
1335 - ensuring the status label is left-aligned
1337 Test: media/modern-media-controls/status-label/status-label-text-align.html
1339 * Modules/modern-media-controls/controls/macos-inline-media-controls.js:
1340 (MacOSInlineMediaControls.prototype.layout):
1341 * Modules/modern-media-controls/controls/status-label.css:
1343 * Modules/modern-media-controls/controls/status-label.js:
1344 (StatusLabel.prototype.get enabled):
1345 (StatusLabel.prototype.set enabled):
1346 * Modules/modern-media-controls/media/controls-visibility-support.js:
1347 (ControlsVisibilitySupport.prototype._updateControls):
1348 (ControlsVisibilitySupport):
1349 * Modules/modern-media-controls/media/status-support.js:
1350 (StatusSupport.prototype.syncControl):
1352 * Modules/modern-media-controls/media/time-labels-support.js:
1353 (TimeLabelsSupport.prototype.syncControl):
1354 (TimeLabelsSupport):
1356 2017-02-17 Anders Carlsson <andersca@apple.com>
1358 Begin overhauling the pasteboard implementation
1359 https://bugs.webkit.org/show_bug.cgi?id=168525
1361 Reviewed by Tim Horton.
1363 Add a new PasteboardWriterData object. This object will hold data that is going
1364 to be written to the pasteboard at some point. Currently it only supports plain text.
1366 Also add a Mac-only PasteboardWriter class which can convert a PasteboardWriterDataObject
1367 into an object that conforms to NSPasteboardWriting.
1369 The basic idea is that instead of doing a bunch of pasteboard operations,
1370 we'll just package all the pasteboard data up into an object and ship it over to WebKit.
1372 This code is currently unused but will be adopted by a new drag implementation (in an upcoming patch).
1374 * WebCore.xcodeproj/project.pbxproj:
1375 * platform/PasteboardWriterData.cpp: Added.
1376 (WebCore::PasteboardWriterData::PasteboardWriterData):
1377 (WebCore::PasteboardWriterData::~PasteboardWriterData):
1378 (WebCore::PasteboardWriterData::isEmpty):
1379 (WebCore::PasteboardWriterData::setPlainText):
1380 * platform/PasteboardWriterData.h: Added.
1381 * platform/mac/PasteboardWriter.h: Added.
1382 * platform/mac/PasteboardWriter.mm: Added.
1383 (WebCore::createPasteboardWriting):
1384 * platform/spi/mac/NSPasteboardSPI.h: Added.
1386 2017-02-17 Per Arne Vollan <pvollan@apple.com>
1388 Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text.
1389 https://bugs.webkit.org/show_bug.cgi?id=168044
1390 rdar://problem/30165746
1392 Reviewed by Simon Fraser.
1394 This patch moves these styles out of svg, and sets the properties on video cues.
1396 Tests: fast/css/parsing-paint-order.html
1397 fast/css/parsing-stroke-linecap.html
1398 fast/css/parsing-stroke-linejoin.html
1399 fast/css/parsing-stroke-width.html
1401 * css/CSSComputedStyleDeclaration.cpp:
1402 (WebCore::paintOrder):
1403 (WebCore::ComputedStyleExtractor::propertyValue):
1404 * css/CSSProperties.json:
1405 * css/SVGCSSComputedStyleDeclaration.cpp:
1406 (WebCore::ComputedStyleExtractor::svgPropertyValue):
1407 (WebCore::paintOrder): Deleted.
1408 * css/StyleResolver.cpp:
1409 (WebCore::StyleResolver::isValidCueStyleProperty):
1410 * page/CaptionUserPreferencesMediaAF.cpp:
1411 (WebCore::CaptionUserPreferencesMediaAF::cssPropertyWithTextEdgeColor):
1412 * rendering/style/RenderStyle.cpp:
1413 (WebCore::RenderStyle::diff):
1414 (WebCore::RenderStyle::paintTypesForPaintOrder):
1415 * rendering/style/RenderStyle.h:
1416 (WebCore::RenderStyle::setPaintOrder):
1417 (WebCore::RenderStyle::paintOrder):
1418 (WebCore::RenderStyle::initialPaintOrder):
1419 (WebCore::RenderStyle::setCapStyle):
1420 (WebCore::RenderStyle::capStyle):
1421 (WebCore::RenderStyle::initialCapStyle):
1422 (WebCore::RenderStyle::setJoinStyle):
1423 (WebCore::RenderStyle::joinStyle):
1424 (WebCore::RenderStyle::initialJoinStyle):
1425 (WebCore::RenderStyle::strokeWidth):
1426 (WebCore::RenderStyle::setStrokeWidth):
1427 (WebCore::RenderStyle::hasVisibleStroke):
1428 (WebCore::RenderStyle::setStrokeOpacity):
1429 * rendering/style/SVGRenderStyle.cpp:
1430 (WebCore::SVGRenderStyle::diff):
1431 (WebCore::SVGRenderStyle::paintTypesForPaintOrder): Deleted.
1432 * rendering/style/SVGRenderStyle.h:
1433 (WebCore::SVGRenderStyle::initialBufferedRendering):
1434 (WebCore::SVGRenderStyle::initialFillRule):
1435 (WebCore::SVGRenderStyle::initialMaskType):
1436 (WebCore::SVGRenderStyle::setBufferedRendering):
1437 (WebCore::SVGRenderStyle::setFillRule):
1438 (WebCore::SVGRenderStyle::setMaskType):
1439 (WebCore::SVGRenderStyle::bufferedRendering):
1440 (WebCore::SVGRenderStyle::fillRule):
1441 (WebCore::SVGRenderStyle::strokeMiterLimit):
1442 (WebCore::SVGRenderStyle::maskType):
1443 (WebCore::SVGRenderStyle::hasStroke):
1444 (WebCore::SVGRenderStyle::setBitDefaults):
1445 (WebCore::SVGRenderStyle::InheritedFlags::operator==):
1446 (WebCore::SVGRenderStyle::initialCapStyle): Deleted.
1447 (WebCore::SVGRenderStyle::initialJoinStyle): Deleted.
1448 (WebCore::SVGRenderStyle::initialPaintOrder): Deleted.
1449 (WebCore::SVGRenderStyle::setCapStyle): Deleted.
1450 (WebCore::SVGRenderStyle::setJoinStyle): Deleted.
1451 (WebCore::SVGRenderStyle::setPaintOrder): Deleted.
1452 (WebCore::SVGRenderStyle::capStyle): Deleted.
1453 (WebCore::SVGRenderStyle::joinStyle): Deleted.
1454 (WebCore::SVGRenderStyle::strokeWidth): Deleted.
1455 (WebCore::SVGRenderStyle::paintOrder): Deleted.
1456 (WebCore::SVGRenderStyle::hasVisibleStroke): Deleted.
1457 (WebCore::SVGRenderStyle::setStrokeWidth): Deleted.
1458 * rendering/style/SVGRenderStyleDefs.cpp:
1459 (WebCore::StyleStrokeData::StyleStrokeData):
1460 (WebCore::StyleStrokeData::operator==):
1461 * rendering/style/SVGRenderStyleDefs.h:
1462 * rendering/style/StyleRareInheritedData.cpp:
1463 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1464 (WebCore::StyleRareInheritedData::operator==):
1465 * rendering/style/StyleRareInheritedData.h:
1466 * rendering/svg/RenderSVGEllipse.cpp:
1467 (WebCore::RenderSVGEllipse::strokeShape):
1468 * rendering/svg/RenderSVGPath.cpp:
1469 (WebCore::RenderSVGPath::strokeShape):
1470 (WebCore::RenderSVGPath::shapeDependentStrokeContains):
1471 (WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath):
1472 (WebCore::RenderSVGPath::zeroLengthLinecapPath):
1473 * rendering/svg/RenderSVGRect.cpp:
1474 (WebCore::RenderSVGRect::strokeShape):
1475 * rendering/svg/RenderSVGShape.cpp:
1476 (WebCore::RenderSVGShape::strokeShape):
1477 (WebCore::RenderSVGShape::fillStrokeMarkers):
1478 (WebCore::RenderSVGShape::strokeWidth):
1479 (WebCore::RenderSVGShape::hasSmoothStroke):
1480 * rendering/svg/RenderSVGText.cpp:
1481 (WebCore::RenderSVGText::strokeBoundingBox):
1482 * rendering/svg/SVGInlineTextBox.cpp:
1483 (WebCore::SVGInlineTextBox::paint):
1484 (WebCore::SVGInlineTextBox::paintDecoration):
1485 * rendering/svg/SVGRenderSupport.cpp:
1486 (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
1487 * rendering/svg/SVGRenderTreeAsText.cpp:
1488 (WebCore::writeStyle):
1490 2017-02-17 Carlos Garcia Campos <cgarcia@igalia.com>
1492 [SOUP] Handle Settings::allowsAnySSLCertificate() in SSL sockets
1493 https://bugs.webkit.org/show_bug.cgi?id=168521
1495 Reviewed by Michael Catanzaro.
1497 When Settings::allowsAnySSLCertificate() is enabled, connect to accept-certificate signal of the GTlsConnection
1498 to always accept the certificates.
1500 Fixes: http/tests/websocket/tests/hybi/simple-wss.html
1502 * platform/network/soup/SocketStreamHandleImplSoup.cpp:
1503 (WebCore::wssConnectionAcceptCertificateCallback):
1504 (WebCore::wssSocketClientEventCallback):
1505 (WebCore::SocketStreamHandleImpl::create):
1507 2017-02-17 Simon Fraser <simon.fraser@apple.com>
1509 Fixed elements bounce when rubber-banding at the bottom of the page
1510 https://bugs.webkit.org/show_bug.cgi?id=168493
1511 rdar://problem/30567713
1513 Reviewed by Tim Horton.
1515 FrameView::visibleDocumentRect() was computing a bad visible rect when bottom-rubber-banding,
1516 by adding rubberBandBottom which is negative, rather than subtracting.
1518 Log some more scrolling stuff.
1520 Ironically, the existing test didn't test stick-to-viewport fixed position because
1521 backgroundShouldExtendBeyondPage() is off by default in WTR, so clone it to a test
1522 that sets this, to test both behaviors.
1524 This also revealed that dynamic changes to backgroundShouldExtendBeyondPage() need
1525 to be propagated to the scrolling tree, which is fixed in AsyncScrollingCoordinator::frameViewLayoutUpdated().
1527 Test: fast/visual-viewport/rubberbanding-viewport-rects-extended-background.html
1529 * page/FrameView.cpp:
1530 (WebCore::FrameView::updateLayoutViewport):
1531 (WebCore::FrameView::visibleDocumentRect):
1532 * page/scrolling/AsyncScrollingCoordinator.cpp:
1533 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1534 * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1535 (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
1536 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
1537 (WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition):
1538 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1539 (WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
1540 (WebCore::ScrollingCoordinatorMac::commitTreeState):
1542 2017-02-17 Simon Fraser <simon.fraser@apple.com>
1544 REGRESSION (209396): Apple Pay buttons do not render
1545 https://bugs.webkit.org/show_bug.cgi?id=168523
1546 rdar://problem/30451563
1548 Reviewed by Geoffrey Garen.
1550 The new CSS parser mistakenly converted -apple-pay-button values to
1551 -webkit-pay-button, breaking -webkit-appearance: -apple-pay-button.
1553 Fix by excluding "-apple-pay" prefixed values from the conversion.
1555 Test: fast/css/appearance-apple-pay-button.html
1557 * css/parser/CSSPropertyParser.cpp:
1558 (WebCore::isAppleLegacyCssValueKeyword):
1560 2017-02-17 Commit Queue <commit-queue@webkit.org>
1562 Unreviewed, rolling out r212463.
1563 https://bugs.webkit.org/show_bug.cgi?id=168526
1565 Some crashes with GuardMalloc (Requested by anttik on
1570 "Execute pending scripts asynchronously after stylesheet loads
1572 https://bugs.webkit.org/show_bug.cgi?id=168367
1573 http://trac.webkit.org/changeset/212463
1575 2017-02-16 Brent Fulgham <bfulgham@apple.com>
1577 RenderView needs to be updated when FrameView changes
1578 https://bugs.webkit.org/show_bug.cgi?id=168481
1579 <rdar://problem/30339638>
1581 Reviewed by Andreas Kling.
1583 The state of the Document's RenderView can get out of sync with the Frame's FrameView.
1584 We need a notification mechanism so that modifications to the Frame's view are properly
1585 relayed to Document so that it can have a correct RenderView.
1588 (WebCore::Document::didBecomeCurrentDocumentInView): Create an updated render tree (if
1589 one does not already exist).
1590 (WebCore::Document::destroyRenderTree): Remove an incorrect ASSERT. We may enter this
1591 code when the Frame uses 'setView(nullptr)', which happens during certain updates.
1594 (WebCore::Frame::setView): Destroy the old render tree (if present) before switching to
1595 the new view. Then notify the document that it is now the current document in the new view.
1597 2017-02-17 Enrique Ocaña González <eocanha@igalia.com>
1599 [GStreamer] Fast replay on video hide/unhide on platforms with limited video buffer pools
1600 https://bugs.webkit.org/show_bug.cgi?id=168505
1602 Reviewed by Žan Doberšek.
1604 The WebKit code isn't consuming the video samples when the video layer is hidden,
1605 so the buffers aren't being returned to the pool and starve the decoder when the
1606 buffer pool runs out of buffers (on platforms using a buffer pool and a custom
1607 allocator, such as OMX on the Raspberry Pi 2). When the video layer is restored,
1608 the pipeline tries to catch up and the user sees the video "going fast forward".
1610 The added code "consumes" (removes and unrefs) the buffer in that case. However,
1611 the sample isn't completely removed because it still holds important info (eg:
1612 caps) needed for the proper operation of the video element.
1614 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1615 (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
1617 2017-02-17 Carlos Garcia Campos <cgarcia@igalia.com>
1619 [SOUP] Stop removing the fragment identifier from resource requests
1620 https://bugs.webkit.org/show_bug.cgi?id=168509
1622 Reviewed by Sergio Villar Senin.
1624 I don't know why, but have always removed the fragment identifier from the URL when creating the SoupURI that
1625 is passed to libsoup. Maybe it was a bug in a very old version of libsoup, but it doesn't look necessary anymore
1626 and it's causing several layout test failures.
1628 Fixes: http/tests/svg/svg-use-external.html
1629 imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-same-origin-with-hash.html
1630 imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-same-origin-with-hash.html
1632 * platform/network/soup/ResourceRequestSoup.cpp:
1633 (WebCore::ResourceRequest::createSoupURI): Do not remove the fragment identifier from the URL.
1635 2017-02-16 Yusuke Suzuki <utatane.tea@gmail.com>
1637 [JSC] Drop PassRefPtr from ArrayBuffer
1638 https://bugs.webkit.org/show_bug.cgi?id=168455
1640 Reviewed by Geoffrey Garen.
1642 * bindings/js/SerializedScriptValue.cpp:
1643 (WebCore::CloneDeserializer::readArrayBufferView):
1645 (WebCore::FontFace::create):
1646 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1647 (WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
1648 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1649 (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
1650 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
1651 (WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
1652 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1653 (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
1655 2017-02-16 Simon Fraser <simon.fraser@apple.com>
1657 REGRESSION(r212439): Web Inspector Toolbar / Window appears broken
1658 https://bugs.webkit.org/show_bug.cgi?id=168494
1660 Reviewed by Joseph Pecoraro.
1662 Missed one conversion from acceleratesDrawing to drawsAsynchronously, which
1663 caused non-Whippet GrpahicsContext shadow drawing to happen unexpectedly.
1665 * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
1666 (-[WebTiledBackingLayer drawsAsynchronously]):
1667 (-[WebTiledBackingLayer acceleratesDrawing]): Deleted.
1669 2017-02-16 Chris Dumez <cdumez@apple.com>
1671 <input>.labels is empty if type changes from text->hidden->checkbox
1672 https://bugs.webkit.org/show_bug.cgi?id=168358
1674 Reviewed by Ryosuke Niwa.
1676 We were invalidating LabelsNodeLists on 'for' attribute change.
1677 We now also invalidate them of 'type' attribute change since
1678 HTMLInputElements whose type is 'hidden' do not support labels.
1680 No new tests, updated existing test.
1683 * dom/LiveNodeList.h:
1684 (WebCore::shouldInvalidateTypeOnAttributeChange):
1685 * html/LabelsNodeList.cpp:
1686 (WebCore::LabelsNodeList::LabelsNodeList):
1688 2017-02-16 Michael Catanzaro <mcatanzaro@igalia.com>
1690 Remove even more EFL from WebCore
1691 https://bugs.webkit.org/show_bug.cgi?id=168485
1693 Reviewed by Alex Christensen.
1695 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1696 (webkitAccessibleGetAttributes):
1698 * css/StyleRule.cpp:
1699 (WebCore::StyleRuleBase::copy):
1700 * platform/ContextMenuItem.h:
1701 * platform/graphics/OpenGLESShims.h:
1702 * platform/graphics/PlatformDisplay.cpp:
1703 (WebCore::PlatformDisplay::createPlatformDisplay):
1704 * platform/graphics/PlatformDisplay.h:
1705 * platform/graphics/cairo/ImageBufferCairo.cpp:
1706 * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1707 (WebCore::Font::platformInit):
1708 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1709 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1710 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1711 (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
1712 * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
1713 * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
1714 * platform/network/soup/ResourceErrorSoup.cpp:
1715 (WebCore::ResourceError::timeoutError):
1716 * platform/network/soup/SoupNetworkSession.cpp:
1717 (WebCore::SoupNetworkSession::setProxySettingsFromEnvironment): Deleted.
1718 * platform/network/soup/SoupNetworkSession.h:
1720 2017-02-16 Daniel Bates <dabates@apple.com>
1722 Remove Chromium-specific code to call FrameLoaderClient::redirectDataToPlugin(nullptr)
1723 https://bugs.webkit.org/show_bug.cgi?id=168417
1724 <rdar://problem/30541748>
1726 Reviewed by Brent Fulgham.
1728 Remove Chromium-specific code that was added in r125500 to call FrameLoaderClient::redirectDataToPlugin(nullptr)
1729 in PluginDocument::detachFromPluginElement(). Calling redirectDataToPlugin() with nullptr was used by the
1730 Chromium port to signify that the plugin document was being destroyed so that they could tear down their
1731 plugin widget. And PluginDocument::detachFromPluginElement() is the only place that calls redirectDataToPlugin()
1732 passing nullptr. No other port made use of this machinery and the Chromium port has long since been removed
1733 from the Open Source WebKit Project. We should remove this code.
1735 * html/PluginDocument.cpp:
1736 (WebCore::PluginDocumentParser::appendBytes): Pass the plugin widget by reference.
1737 (WebCore::PluginDocument::detachFromPluginElement): Remove call to FrameLoaderClient::redirectDataToPlugin().
1738 This call was only used by the Chromium port as means to be notified when the plugin document was being
1739 destroyed. No other port made use of this notification or needed such a notification.
1740 * loader/EmptyClients.cpp: Change argument of redirectDataToPlugin() from Widget* to Widget& to convey
1741 that this function always takes a valid Widget. Also remove unnecessary argument name as the data type
1742 of the argument and the name of the function sufficiently describes the purpose of the argument.
1743 * loader/FrameLoaderClient.h: Ditto.
1745 2017-02-16 Myles C. Maxfield <mmaxfield@apple.com>
1747 font-weight in @font-face can cause a font to be downloaded even when it's not used
1748 https://bugs.webkit.org/show_bug.cgi?id=168114
1749 <rdar://problem/30301317>
1751 Reviewed by Darin Adler.
1753 There were two problems with our font loading code.
1755 When we are in the middle of a download, we will use a special interstitial font,
1756 and this special font has a flag set which will cause it to be invisible when it is
1757 drawn. However, when we start using this font during the load, we give it a
1758 unicode-range of U+0-0 which means that it will never be used, and fallback will
1759 happen to other weights immediately.
1761 The second problem with the font loading code is that this interstital font is just
1762 Times. Times doesn't support every character, which means that if we are trying
1763 to render some exotic character, we fall back to other weights. The solution here
1764 is to use LastResort as the interstitial font, because it supports all characters.
1765 Because its metrics are reasonable and we don't ever actually paint this
1766 interstitial font, this choice is no worse than Times.
1768 Tests: fast/text/font-style-download.html
1769 fast/text/font-weight-download-2.html
1770 fast/text/font-weight-download.html
1771 fast/text/font-weight-fallback.html
1773 * css/CSSFontFace.cpp:
1774 (WebCore::CSSFontFace::font):
1775 * css/CSSSegmentedFontFace.cpp:
1776 (WebCore::appendFont):
1777 (WebCore::CSSSegmentedFontFace::fontRanges):
1778 (WebCore::appendFontWithInvalidUnicodeRangeIfLoading): Deleted.
1779 * platform/graphics/Font.h:
1780 (WebCore::Font::widthForGlyph):
1781 * platform/graphics/FontCache.h:
1782 * platform/graphics/freetype/FontCacheFreeType.cpp:
1783 (WebCore::FontCache::lastResortFallbackFontForEveryCharacter):
1784 * platform/graphics/mac/FontCacheMac.mm:
1785 (WebCore::FontCache::lastResortFallbackFontForEveryCharacter):
1786 * platform/graphics/win/FontCacheWin.cpp:
1787 (WebCore::FontCache::lastResortFallbackFontForEveryCharacter):
1789 2017-02-16 Alex Christensen <achristensen@webkit.org>
1791 Remove EFL-specific files in Source.
1793 Rubber-stamped by Anders Carlsson.
1795 * editing/efl: Removed.
1796 * page/efl: Removed.
1797 * platform/audio/efl: Removed.
1798 * platform/efl: Removed.
1799 * platform/efl/DefaultTheme: Removed.
1800 * platform/efl/DefaultTheme/widget: Removed.
1801 * platform/efl/DefaultTheme/widget/button: Removed.
1802 * platform/efl/DefaultTheme/widget/check: Removed.
1803 * platform/efl/DefaultTheme/widget/combo: Removed.
1804 * platform/efl/DefaultTheme/widget/entry: Removed.
1805 * platform/efl/DefaultTheme/widget/progressbar: Removed.
1806 * platform/efl/DefaultTheme/widget/radio: Removed.
1807 * platform/efl/DefaultTheme/widget/scrollbar: Removed.
1808 * platform/efl/DefaultTheme/widget/search: Removed.
1809 * platform/efl/DefaultTheme/widget/search/cancel: Removed.
1810 * platform/efl/DefaultTheme/widget/search/decoration: Removed.
1811 * platform/efl/DefaultTheme/widget/search/field: Removed.
1812 * platform/efl/DefaultTheme/widget/slider: Removed.
1813 * platform/efl/DefaultTheme/widget/spinner: Removed.
1814 * platform/gamepad/efl: Removed.
1815 * platform/graphics/efl: Removed.
1816 * platform/graphics/surfaces/efl: Removed.
1817 * platform/network/efl: Removed.
1819 2017-02-16 Simon Fraser <simon.fraser@apple.com>
1821 Add WebUSB to features.json as a "Not Considering".
1825 2017-02-16 Alex Christensen <achristensen@webkit.org>
1827 Remove old URL parser
1828 https://bugs.webkit.org/show_bug.cgi?id=168483
1830 Reviewed by Tim Horton.
1833 (WebCore::isSchemeFirstChar):
1834 (WebCore::isSchemeChar):
1835 (WebCore::URL::URL):
1836 (WebCore::URL::setProtocol):
1837 (WebCore::URL::setHost):
1838 (WebCore::URL::removePort):
1839 (WebCore::URL::setPort):
1840 (WebCore::URL::setHostAndPort):
1841 (WebCore::URL::setUser):
1842 (WebCore::URL::setPass):
1843 (WebCore::URL::setFragmentIdentifier):
1844 (WebCore::URL::setQuery):
1845 (WebCore::URL::setPath):
1846 (WebCore::URL::serialize):
1847 (WebCore::isUserInfoChar): Deleted.
1848 (WebCore::isHostnameChar): Deleted.
1849 (WebCore::isIPv6Char): Deleted.
1850 (WebCore::isPathSegmentEndChar): Deleted.
1851 (WebCore::appendASCII): Deleted.
1852 (WebCore::findFirstOf): Deleted.
1853 (WebCore::checkEncodedString): Deleted.
1854 (WebCore::URL::init): Deleted.
1855 (WebCore::appendEscapingBadChars): Deleted.
1856 (WebCore::escapeAndAppendNonHierarchicalPart): Deleted.
1857 (WebCore::copyPathRemovingDots): Deleted.
1858 (WebCore::hasSlashDotOrDotDot): Deleted.
1859 (WebCore::URL::parse): Deleted.
1860 (WebCore::cannotBeABaseURL): Deleted.
1861 (WebCore::isDefaultPortForScheme): Deleted.
1862 (WebCore::hostPortIsEmptyButCredentialsArePresent): Deleted.
1863 (WebCore::isNonFileHierarchicalScheme): Deleted.
1864 (WebCore::isCanonicalHostnameLowercaseForScheme): Deleted.
1865 (WebCore::findHostnamesInMailToURL): Deleted.
1866 (WebCore::findHostnameInHierarchicalURL): Deleted.
1867 (WebCore::encodeHostnames): Deleted.
1868 (WebCore::encodeRelativeString): Deleted.
1869 (WebCore::substituteBackslashes): Deleted.
1870 * platform/URLParser.cpp:
1871 (WebCore::URLParser::URLParser):
1872 (WebCore::URLParser::setEnabled): Deleted.
1873 (WebCore::URLParser::enabled): Deleted.
1874 * platform/URLParser.h:
1875 * platform/cf/URLCF.cpp:
1876 (WebCore::URL::URL):
1877 * platform/mac/URLMac.mm:
1878 (WebCore::URL::URL):
1880 2017-02-16 Anders Carlsson <andersca@apple.com>
1884 * page/gtk/EventHandlerGtk.cpp:
1885 (WebCore::EventHandler::createDraggingDataTransfer):
1886 * page/win/EventHandlerWin.cpp:
1887 (WebCore::EventHandler::createDraggingDataTransfer):
1889 2017-02-16 Anders Carlsson <andersca@apple.com>
1891 Remove EFL from WebCore
1892 https://bugs.webkit.org/show_bug.cgi?id=168477
1894 Reviewed by Brian Burg.
1896 * accessibility/AccessibilityList.cpp:
1897 (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
1898 * accessibility/AccessibilityNodeObject.cpp:
1899 (WebCore::AccessibilityNodeObject::canSetValueAttribute):
1900 * accessibility/AccessibilityObject.cpp:
1901 (WebCore::AccessibilityObject::AccessibilityObject):
1902 (WebCore::AccessibilityObject::textIteratorBehaviorForTextRange):
1903 * accessibility/AccessibilityObject.h:
1904 * accessibility/AccessibilityRenderObject.cpp:
1905 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1906 * accessibility/AccessibilityTableColumn.cpp:
1907 (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
1908 * accessibility/AccessibilityTableHeaderContainer.cpp:
1909 (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
1910 * crypto/CryptoKey.cpp:
1911 * crypto/keys/CryptoKeyRSA.h:
1913 (WebCore::Document::implicitClose):
1914 * editing/Editor.cpp:
1915 (WebCore::Editor::performCutOrCopy):
1916 (WebCore::Editor::copyImage):
1918 * editing/FrameSelection.h:
1919 * html/HTMLCanvasElement.cpp:
1920 (WebCore::requiresAcceleratedCompositingForWebGL):
1921 * inspector/InspectorFrontendHost.cpp:
1922 (WebCore::InspectorFrontendHost::port):
1923 * loader/HistoryController.cpp:
1924 (WebCore::HistoryController::restoreScrollPositionAndViewState):
1925 * loader/icon/IconDatabase.cpp:
1926 (WebCore::IconDatabase::performURLImport):
1927 * page/ContextMenuController.cpp:
1928 (WebCore::ContextMenuController::contextMenuItemSelected):
1929 (WebCore::ContextMenuController::populate):
1930 (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1931 * page/DragController.cpp:
1932 (WebCore::DragController::startDrag):
1933 * page/EventHandler.cpp:
1934 (WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
1935 * page/FrameView.cpp:
1936 (WebCore::FrameView::layout):
1937 * platform/ContextMenuItem.h:
1938 * platform/Cursor.h:
1939 * platform/DragData.h:
1940 * platform/DragImage.h:
1941 * platform/FileSystem.h:
1942 * platform/LocalizedStrings.h:
1943 * platform/MIMETypeRegistry.cpp:
1944 (WebCore::initializeSupportedImageMIMETypesForEncoding):
1945 * platform/NotImplemented.h:
1946 * platform/Pasteboard.h:
1947 * platform/PlatformKeyboardEvent.h:
1948 * platform/PlatformMouseEvent.h:
1949 * platform/PlatformSpeechSynthesizer.h:
1950 * platform/PlatformWheelEvent.h:
1951 * platform/Widget.h:
1952 * platform/graphics/ANGLEWebKitBridge.h:
1953 * platform/graphics/BitmapImage.h:
1954 * platform/graphics/GraphicsContext3D.h:
1955 * platform/graphics/Icon.h:
1956 * platform/graphics/Image.h:
1957 (WebCore::Image::getEvasObject): Deleted.
1958 * platform/graphics/IntPoint.h:
1959 * platform/graphics/IntRect.h:
1960 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1961 (WebCore::Extensions3DOpenGL::createVertexArrayOES):
1962 (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
1963 (WebCore::Extensions3DOpenGL::isVertexArrayOES):
1964 (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
1965 (WebCore::Extensions3DOpenGL::supportsExtension):
1966 * platform/graphics/opengl/Extensions3DOpenGL.h:
1967 * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1968 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1969 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1970 (WebCore::GraphicsContext3D::createForCurrentGLContext):
1971 (WebCore::GraphicsContext3D::reshape):
1972 (WebCore::GraphicsContext3D::createVertexArray):
1973 (WebCore::GraphicsContext3D::deleteVertexArray):
1974 (WebCore::GraphicsContext3D::isVertexArray):
1975 (WebCore::GraphicsContext3D::bindVertexArray):
1976 * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
1977 * platform/network/NetworkStateNotifier.h:
1978 * platform/posix/FileSystemPOSIX.cpp:
1979 * rendering/RenderLayerCompositor.cpp:
1980 (WebCore::RenderLayerCompositor::ensureRootLayer):
1981 * rendering/RenderText.cpp:
1982 (WebCore::RenderText::previousOffsetForBackwardDeletion):
1983 * xml/XSLStyleSheetLibxslt.cpp:
1984 * xml/XSLTExtensions.cpp:
1985 * xml/XSLTProcessorLibxslt.cpp:
1986 * xml/XSLTUnicodeSort.cpp:
1988 2017-02-16 Zalan Bujtas <zalan@apple.com>
1990 Simple line layout: Add forced line layout info to coverage print.
1991 https://bugs.webkit.org/show_bug.cgi?id=168470
1993 Reviewed by Simon Fraser.
1995 This is about potential vs. actual coverage:
1997 Simple line layout potential coverage: 65.05%
1998 Simple line layout actual coverage: 46.60%
1999 Forced line layout blocks: 4 content length: 57(18.45%)
2003 * rendering/SimpleLineLayout.cpp:
2004 (WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
2006 2017-02-16 Anders Carlsson <andersca@apple.com>
2008 Rename DataTransfer functions to indicate whether they are for dragging or dropping
2009 https://bugs.webkit.org/show_bug.cgi?id=168478
2011 Reviewed by Tim Horton.
2013 * dom/DataTransfer.cpp:
2014 (WebCore::DataTransfer::createForDrag):
2015 (WebCore::DataTransfer::createForDrop):
2016 (WebCore::DataTransfer::createForDragAndDrop): Deleted.
2017 * dom/DataTransfer.h:
2018 * page/DragController.cpp:
2019 (WebCore::DragController::dragExited):
2020 (WebCore::DragController::performDragOperation):
2021 (WebCore::DragController::tryDHTMLDrag):
2022 * page/mac/EventHandlerMac.mm:
2023 (WebCore::EventHandler::createDraggingDataTransfer):
2025 2017-02-16 Anders Carlsson <andersca@apple.com>
2027 Rename EventHandler::freeDataTransfer to invalidateDataTransfer
2028 https://bugs.webkit.org/show_bug.cgi?id=168472
2030 Reviewed by Tim Horton.
2032 The code doesn't necessarily free the data transfer object, so rename the member function
2033 to reflect that. Also, get rid of a goto.
2035 * page/EventHandler.cpp:
2036 (WebCore::EventHandler::invalidateDataTransfer):
2037 (WebCore::EventHandler::dragSourceEndedAt):
2038 (WebCore::EventHandler::handleDrag):
2039 (WebCore::EventHandler::freeDataTransfer): Deleted.
2040 * page/EventHandler.h:
2042 2017-02-16 Alex Christensen <achristensen@webkit.org>
2044 Special URLs without a host are invalid
2045 https://bugs.webkit.org/show_bug.cgi?id=168461
2047 Reviewed by Tim Horton.
2049 http://? should be invalid. This matches Chrome and the spec and the intent of my implementation
2050 of URLParser which already fails with urls like http:// and this was just an oversight.
2051 Covered by newly passing web platform tests. Updated API tests.
2053 * platform/URLParser.cpp:
2054 (WebCore::URLParser::parse):
2056 2017-02-16 Zalan Bujtas <zalan@apple.com>
2058 Simple line layout: Add support for pagination.
2059 https://bugs.webkit.org/show_bug.cgi?id=168355
2060 <rdar://problem/30119769>
2062 Reviewed by David Hyatt.
2064 This patch adds basic support for paginated content including widows and orphans.
2066 This is based on the normal line layout pagination logic. However there are 2 major
2067 advantages here (and they allow us to have a much simpler logic):
2068 1. all the lines are positioned by the time we start paginating them and
2069 2. lines always have uniform heights.
2071 This is not enabled yet.
2073 * rendering/RenderBlockFlow.h:
2074 * rendering/SimpleLineLayout.cpp:
2075 (WebCore::SimpleLineLayout::computeLineTopAndBottomWithOverflow):
2076 (WebCore::SimpleLineLayout::computeLineBreakIndex):
2077 (WebCore::SimpleLineLayout::setPageBreakForLine):
2078 (WebCore::SimpleLineLayout::computeOffsetAfterLineBreak):
2079 (WebCore::SimpleLineLayout::updateMinimumPageHeight):
2080 (WebCore::SimpleLineLayout::adjustLinePositionsForPagination):
2081 (WebCore::SimpleLineLayout::create):
2082 (WebCore::SimpleLineLayout::Layout::create):
2083 (WebCore::SimpleLineLayout::Layout::Layout):
2084 * rendering/SimpleLineLayout.h:
2085 (WebCore::SimpleLineLayout::Layout::isPaginated):
2086 (WebCore::SimpleLineLayout::Layout::struts):
2087 * rendering/SimpleLineLayoutFunctions.h:
2088 (WebCore::SimpleLineLayout::computeFlowHeight):
2089 * rendering/SimpleLineLayoutResolver.h:
2090 (WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition):
2092 2017-02-11 Filip Pizlo <fpizlo@apple.com>
2094 The collector thread should only start when the mutator doesn't have heap access
2095 https://bugs.webkit.org/show_bug.cgi?id=167737
2097 Reviewed by Keith Miller.
2099 Added new tests in JSTests and LayoutTests.
2101 The WebCore changes involve:
2103 - Refactoring around new header discipline.
2105 - Adding crazy GC APIs to window.internals to enable us to test the GC's runloop discipline.
2107 * ForwardingHeaders/heap/GCFinalizationCallback.h: Added.
2108 * ForwardingHeaders/heap/IncrementalSweeper.h: Added.
2109 * ForwardingHeaders/heap/MachineStackMarker.h: Added.
2110 * ForwardingHeaders/heap/RunningScope.h: Added.
2111 * bindings/js/CommonVM.cpp:
2112 * testing/Internals.cpp:
2113 (WebCore::Internals::parserMetaData):
2114 (WebCore::Internals::isReadableStreamDisturbed):
2115 (WebCore::Internals::isGCRunning):
2116 (WebCore::Internals::addGCFinalizationCallback):
2117 (WebCore::Internals::stopSweeping):
2118 (WebCore::Internals::startSweeping):
2119 * testing/Internals.h:
2120 * testing/Internals.idl:
2122 2017-02-16 Jiewen Tan <jiewen_tan@apple.com>
2124 [WebCrypto] remove toJSValueFromJsonWebKey from custom SubtleCrypto binding codes
2125 https://bugs.webkit.org/show_bug.cgi?id=167026
2127 Reviewed by Chris Dumez.
2129 Covered by existing tests.
2131 * bindings/js/JSSubtleCryptoCustom.cpp:
2132 (WebCore::jsSubtleCryptoFunctionExportKeyPromise):
2133 (WebCore::jsSubtleCryptoFunctionWrapKeyPromise):
2134 (WebCore::toJSValueFromJsonWebKey): Deleted.
2135 * crypto/JsonWebKey.h:
2136 * crypto/JsonWebKey.idl:
2137 * crypto/RsaOtherPrimesInfo.idl:
2138 Change std::optional<String> to String in order to use toJS<IDLDictionary<JsonWebKey>>.
2139 * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2140 (WebCore::CryptoAlgorithmAES_CBC::importKey):
2141 * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
2142 (WebCore::CryptoAlgorithmAES_KW::importKey):
2143 * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2144 (WebCore::CryptoAlgorithmHMAC::importKey):
2145 * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
2146 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
2147 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
2148 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
2149 * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
2150 (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
2151 * crypto/keys/CryptoKeyAES.cpp:
2152 (WebCore::CryptoKeyAES::importJwk):
2153 Only check if key_ops contains all of the specified usages when key_ops field of jwk is present,
2154 as per the specification: https://www.w3.org/TR/WebCryptoAPI/#aes-cbc-operations
2155 * crypto/keys/CryptoKeyAES.h:
2156 * crypto/keys/CryptoKeyHMAC.cpp:
2157 (WebCore::CryptoKeyHMAC::importJwk):
2158 * crypto/keys/CryptoKeyHMAC.h:
2159 * crypto/keys/CryptoKeyRSA.cpp:
2160 (WebCore::CryptoKeyRSA::importJwk):
2161 Accommodate the change from std::optional<String> to String.
2162 * crypto/mac/CryptoKeyRSAMac.cpp:
2163 (WebCore::CryptoKeyRSA::create):
2164 Add a null check for p.
2166 2017-02-16 Antti Koivisto <antti@apple.com>
2168 Execute pending scripts asynchronously after stylesheet loads complete
2169 https://bugs.webkit.org/show_bug.cgi?id=168367
2170 rdar://problem/30561379
2172 Reviewed by Andreas Kling.
2174 The current synchronous execution is fragile and creates various problems.
2176 * css/StyleSheetContents.cpp:
2177 (WebCore::StyleSheetContents::checkLoaded):
2178 * dom/ContainerNode.cpp:
2179 (WebCore::ContainerNode::takeAllChildrenFrom):
2180 (WebCore::ContainerNode::notifyChildInserted):
2181 (WebCore::ContainerNode::removeChild):
2182 (WebCore::ContainerNode::parserRemoveChild):
2183 (WebCore::ContainerNode::removeChildren):
2185 Remove various places where we would trigger delayed synchronous execution.
2188 (WebCore::Document::Document):
2189 (WebCore::Document::recalcStyle):
2191 Trigger scroll to anchor at the end of style resolution instead of when style sheet load completes.
2193 (WebCore::Document::didRemoveAllPendingStylesheet):
2195 Call asynchronous script execution function.
2198 (WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet): Deleted.
2199 (WebCore::Document::notifyRemovePendingSheetIfNeeded): Deleted.
2200 * dom/ScriptableDocumentParser.cpp:
2201 (WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
2202 (WebCore::ScriptableDocumentParser::executeScriptsWaitingForStylesheetsSoon):
2203 (WebCore::ScriptableDocumentParser::scriptsWaitingForStylesheetsExecutionTimerFired):
2205 Add a timer for executing pending scripts.
2207 (WebCore::ScriptableDocumentParser::detach):
2208 * dom/ScriptableDocumentParser.h:
2209 (WebCore::ScriptableDocumentParser::executeScriptsWaitingForStylesheets):
2210 * html/HTMLLinkElement.cpp:
2211 (WebCore::HTMLLinkElement::removedFrom):
2212 (WebCore::HTMLLinkElement::removePendingSheet):
2213 * html/HTMLLinkElement.h:
2214 * html/parser/HTMLDocumentParser.cpp:
2215 (WebCore::HTMLDocumentParser::detach):
2216 * loader/DocumentLoader.cpp:
2217 (WebCore::DocumentLoader::isLoadingInAPISense):
2219 Stay in loading state if we have a pending script. This matches existing behavior.
2221 * style/StyleScope.cpp:
2222 (WebCore::Style::Scope::removePendingSheet):
2223 * style/StyleScope.h:
2225 2017-02-16 Anders Carlsson <andersca@apple.com>
2227 Set the DHTML drag image in the DHTML type check
2228 https://bugs.webkit.org/show_bug.cgi?id=168451
2230 Reviewed by Wenson Hsieh.
2232 * page/DragController.cpp:
2233 (WebCore::DragController::startDrag):
2235 2017-02-16 Anders Carlsson <andersca@apple.com>
2237 Begin removing EFL code from WebCore.
2239 Rubber-stamped by Alex Christensen.
2241 * PlatformEfl.cmake: Removed.
2242 * editing/efl/EditorEfl.cpp: Removed.
2243 * page/efl/DragControllerEfl.cpp: Removed.
2244 * page/efl/EventHandlerEfl.cpp: Removed.
2245 * platform/audio/efl/AudioBusEfl.cpp: Removed.
2246 * platform/efl/CursorEfl.cpp: Removed.
2247 * platform/efl/DefaultTheme/CMakeLists.txt: Removed.
2248 * platform/efl/DefaultTheme/default.edc: Removed.
2249 * platform/efl/DefaultTheme/widget/button/button.edc: Removed.
2250 * platform/efl/DefaultTheme/widget/button/img_button_focus.png: Removed.
2251 * platform/efl/DefaultTheme/widget/button/img_button_hover.png: Removed.
2252 * platform/efl/DefaultTheme/widget/button/img_button_normal.png: Removed.
2253 * platform/efl/DefaultTheme/widget/button/img_button_press.png: Removed.
2254 * platform/efl/DefaultTheme/widget/check/check.edc: Removed.
2255 * platform/efl/DefaultTheme/widget/check/img_check_bg_disabled.png: Removed.
2256 * platform/efl/DefaultTheme/widget/check/img_check_bg_enabled.png: Removed.
2257 * platform/efl/DefaultTheme/widget/check/img_check_off.png: Removed.
2258 * platform/efl/DefaultTheme/widget/check/img_check_off_focus.png: Removed.
2259 * platform/efl/DefaultTheme/widget/check/img_check_off_hover.png: Removed.
2260 * platform/efl/DefaultTheme/widget/check/img_check_on.png: Removed.
2261 * platform/efl/DefaultTheme/widget/check/img_check_on_focus.png: Removed.
2262 * platform/efl/DefaultTheme/widget/check/img_check_on_hover.png: Removed.
2263 * platform/efl/DefaultTheme/widget/combo/combo.edc: Removed.
2264 * platform/efl/DefaultTheme/widget/combo/combo_focus.png: Removed.
2265 * platform/efl/DefaultTheme/widget/combo/combo_focus_button.png: Removed.
2266 * platform/efl/DefaultTheme/widget/combo/combo_focus_button_transparent.png: Removed.
2267 * platform/efl/DefaultTheme/widget/combo/combo_focus_transparent.png: Removed.
2268 * platform/efl/DefaultTheme/widget/combo/combo_hover.png: Removed.
2269 * platform/efl/DefaultTheme/widget/combo/combo_hover_button.png: Removed.
2270 * platform/efl/DefaultTheme/widget/combo/combo_hover_button_transparent.png: Removed.
2271 * platform/efl/DefaultTheme/widget/combo/combo_hover_transparent.png: Removed.
2272 * platform/efl/DefaultTheme/widget/combo/combo_normal.png: Removed.
2273 * platform/efl/DefaultTheme/widget/combo/combo_normal_button.png: Removed.
2274 * platform/efl/DefaultTheme/widget/combo/combo_normal_button_transparent.png: Removed.
2275 * platform/efl/DefaultTheme/widget/combo/combo_normal_transparent.png: Removed.
2276 * platform/efl/DefaultTheme/widget/combo/combo_press.png: Removed.
2277 * platform/efl/DefaultTheme/widget/combo/combo_press_button.png: Removed.
2278 * platform/efl/DefaultTheme/widget/combo/combo_press_button_transparent.png: Removed.
2279 * platform/efl/DefaultTheme/widget/combo/combo_press_transparent.png: Removed.
2280 * platform/efl/DefaultTheme/widget/combo/icon.png: Removed.
2281 * platform/efl/DefaultTheme/widget/entry/entry.edc: Removed.
2282 * platform/efl/DefaultTheme/widget/entry/img_focused.png: Removed.
2283 * platform/efl/DefaultTheme/widget/entry/img_hovered.png: Removed.
2284 * platform/efl/DefaultTheme/widget/entry/img_normal.png: Removed.
2285 * platform/efl/DefaultTheme/widget/progressbar/bt_base.png: Removed.
2286 * platform/efl/DefaultTheme/widget/progressbar/progressbar.edc: Removed.
2287 * platform/efl/DefaultTheme/widget/progressbar/shelf_inset.png: Removed.
2288 * platform/efl/DefaultTheme/widget/radio/img_radio_bg_disabled.png: Removed.
2289 * platform/efl/DefaultTheme/widget/radio/img_radio_bg_enabled.png: Removed.
2290 * platform/efl/DefaultTheme/widget/radio/img_radio_off.png: Removed.
2291 * platform/efl/DefaultTheme/widget/radio/img_radio_off_focus.png: Removed.
2292 * platform/efl/DefaultTheme/widget/radio/img_radio_off_hover.png: Removed.
2293 * platform/efl/DefaultTheme/widget/radio/img_radio_on.png: Removed.
2294 * platform/efl/DefaultTheme/widget/radio/img_radio_on_focus.png: Removed.
2295 * platform/efl/DefaultTheme/widget/radio/img_radio_on_hover.png: Removed.
2296 * platform/efl/DefaultTheme/widget/radio/radio.edc: Removed.
2297 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc: Removed.
2298 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_horizontal.png: Removed.
2299 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_vertical.png: Removed.
2300 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_horizontal.png: Removed.
2301 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_vertical.png: Removed.
2302 * platform/efl/DefaultTheme/widget/search/cancel/cancel_normal_button.png: Removed.
2303 * platform/efl/DefaultTheme/widget/search/cancel/cancel_normal_button2.png: Removed.
2304 * platform/efl/DefaultTheme/widget/search/cancel/search_cancel.edc: Removed.
2305 * platform/efl/DefaultTheme/widget/search/decoration/decoration_normal_button.png: Removed.
2306 * platform/efl/DefaultTheme/widget/search/decoration/search_decoration.edc: Removed.
2307 * platform/efl/DefaultTheme/widget/search/field/field_focused.png: Removed.
2308 * platform/efl/DefaultTheme/widget/search/field/field_hovered.png: Removed.
2309 * platform/efl/DefaultTheme/widget/search/field/field_normal.png: Removed.
2310 * platform/efl/DefaultTheme/widget/search/field/search_field.edc: Removed.
2311 * platform/efl/DefaultTheme/widget/slider/slider.edc: Removed.
2312 * platform/efl/DefaultTheme/widget/slider/slider_fill_h.png: Removed.
2313 * platform/efl/DefaultTheme/widget/slider/slider_fill_v.png: Removed.
2314 * platform/efl/DefaultTheme/widget/slider/slider_h.png: Removed.
2315 * platform/efl/DefaultTheme/widget/slider/slider_thumb_h.png: Removed.
2316 * platform/efl/DefaultTheme/widget/slider/slider_thumb_press_h.png: Removed.
2317 * platform/efl/DefaultTheme/widget/slider/slider_thumb_press_v.png: Removed.
2318 * platform/efl/DefaultTheme/widget/slider/slider_thumb_v.png: Removed.
2319 * platform/efl/DefaultTheme/widget/slider/slider_v.png: Removed.
2320 * platform/efl/DefaultTheme/widget/spinner/sp_bg.png: Removed.
2321 * platform/efl/DefaultTheme/widget/spinner/sp_down_default.png: Removed.
2322 * platform/efl/DefaultTheme/widget/spinner/sp_down_hover.png: Removed.
2323 * platform/efl/DefaultTheme/widget/spinner/sp_down_pressed.png: Removed.
2324 * platform/efl/DefaultTheme/widget/spinner/sp_up_default.png: Removed.
2325 * platform/efl/DefaultTheme/widget/spinner/sp_up_hover.png: Removed.
2326 * platform/efl/DefaultTheme/widget/spinner/sp_up_pressed.png: Removed.
2327 * platform/efl/DefaultTheme/widget/spinner/spinner.edc: Removed.
2328 * platform/efl/DragDataEfl.cpp: Removed.
2329 * platform/efl/DragImageEfl.cpp: Removed.
2330 * platform/efl/EflInspectorUtilities.cpp: Removed.
2331 * platform/efl/EflInspectorUtilities.h: Removed.
2332 * platform/efl/EflKeyboardUtilities.cpp: Removed.
2333 * platform/efl/EflKeyboardUtilities.h: Removed.
2334 * platform/efl/EflScreenUtilities.cpp: Removed.
2335 * platform/efl/EflScreenUtilities.h: Removed.
2336 * platform/efl/ErrorsEfl.cpp: Removed.
2337 * platform/efl/ErrorsEfl.h: Removed.
2338 * platform/efl/EventLoopEfl.cpp: Removed.
2339 * platform/efl/FileSystemEfl.cpp: Removed.
2340 * platform/efl/LocalizedStringsEfl.cpp: Removed.
2341 * platform/efl/MIMETypeRegistryEfl.cpp: Removed.
2342 * platform/efl/MainThreadSharedTimerEfl.cpp: Removed.
2343 * platform/efl/PasteboardEfl.cpp: Removed.
2344 * platform/efl/PlatformKeyboardEventEfl.cpp: Removed.
2345 * platform/efl/PlatformMouseEventEfl.cpp: Removed.
2346 * platform/efl/PlatformScreenEfl.cpp: Removed.
2347 * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: Removed.
2348 * platform/efl/PlatformSpeechSynthesisProviderEfl.h: Removed.
2349 * platform/efl/PlatformSpeechSynthesizerEfl.cpp: Removed.
2350 * platform/efl/PlatformWheelEventEfl.cpp: Removed.
2351 * platform/efl/ScrollbarThemeEfl.cpp: Removed.
2352 * platform/efl/ScrollbarThemeEfl.h: Removed.
2353 * platform/efl/SoundEfl.cpp: Removed.
2354 * platform/efl/TemporaryLinkStubs.cpp: Removed.
2355 * platform/efl/UserAgentEfl.cpp: Removed.
2356 * platform/efl/WidgetEfl.cpp: Removed.
2357 * platform/gamepad/efl/GamepadsEfl.cpp: Removed.
2358 * platform/graphics/efl/CairoUtilitiesEfl.cpp: Removed.
2359 * platform/graphics/efl/CairoUtilitiesEfl.h: Removed.
2360 * platform/graphics/efl/EvasGLContext.cpp: Removed.
2361 * platform/graphics/efl/EvasGLContext.h: Removed.
2362 * platform/graphics/efl/EvasGLSurface.cpp: Removed.
2363 * platform/graphics/efl/EvasGLSurface.h: Removed.
2364 * platform/graphics/efl/GraphicsContext3DEfl.cpp: Removed.
2365 * platform/graphics/efl/GraphicsContext3DPrivate.cpp: Removed.
2366 * platform/graphics/efl/GraphicsContext3DPrivate.h: Removed.
2367 * platform/graphics/efl/IconEfl.cpp: Removed.
2368 * platform/graphics/efl/ImageBufferEfl.cpp: Removed.
2369 * platform/graphics/efl/ImageEfl.cpp: Removed.
2370 * platform/graphics/efl/IntPointEfl.cpp: Removed.
2371 * platform/graphics/efl/IntRectEfl.cpp: Removed.
2372 * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: Removed.
2373 * platform/network/efl/NetworkStateNotifierEfl.cpp: Removed.
2374 * rendering/RenderThemeEfl.cpp: Removed.
2375 * rendering/RenderThemeEfl.h: Removed.
2377 2017-02-16 Joseph Pecoraro <pecoraro@apple.com>
2379 [Resource Timing] Support Resource Timing in Workers
2380 https://bugs.webkit.org/show_bug.cgi?id=168086
2381 <rdar://problem/30430117>
2383 Reviewed by Alex Christensen.
2385 Worker's load resources through the Document that loaded them. However,
2386 their PerformanceResourceTiming entries should be added to the Performance
2387 object inside the Worker context, not the Document's context.
2389 This change adds an InitiatorContext to ResourceLoadOptions so that loaders
2390 can determine if the load was initiated by the Document or a Worker. This
2391 allows loaders to then know if the ResourceTiming data they collect should
2392 be added to the Document's Performance object or forwarded on to the Worker's.
2394 This adds a new ThreadableLoaderClient method intended only for the purpose
2395 of adding the ResourceTiming information to the Worker's Performance object.
2396 Unlike other ThreadableLoaderClient methods that are bridged and forwarded
2397 on to a client inside the worker (e.g. XMLHttpRequest or FetchLoader) this
2398 method never needs to be handled by clients and can be uniformly handled by
2399 the WorkerThreadableLoader itself.
2401 We also add a new ResourceTiming object that encapsulates all of the data
2402 ultimately needed for a PerformanceResourceTimingEntry object. This allows
2403 for all of the information to be gathered while loading on the Document
2404 before serializing across to the Worker. That includes the Timing-Allow-Origin
2405 check which uses the SecurityOrigin of the Worker.
2407 This also modernizes and addresses issues in the Resource Timing implementation.
2408 Better handling cases like loading from the Cache, Synchronous Loads, and
2409 improving initiatorType information.
2411 Tests: imported/w3c/web-platform-tests/resource-timing/rt-cors.html
2412 imported/w3c/web-platform-tests/resource-timing/rt-cors.worker.html
2413 imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-css.html
2414 imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-element.html
2415 imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-fetch.html
2416 imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-media.html
2417 imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-other.html
2418 imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-script-module.html
2419 imported/w3c/web-platform-tests/resource-timing/rt-initiatorType-xmlhttprequest.html
2420 imported/w3c/web-platform-tests/resource-timing/rt-initiatorType.worker.html
2421 imported/w3c/web-platform-tests/resource-timing/rt-performance-extensions.html
2422 imported/w3c/web-platform-tests/resource-timing/rt-performance-extensions.worker.html
2423 imported/w3c/web-platform-tests/resource-timing/rt-resource-errors.html
2424 imported/w3c/web-platform-tests/resource-timing/rt-resource-ignored.html
2425 imported/w3c/web-platform-tests/resource-timing/rt-resources-per-frame.html
2426 imported/w3c/web-platform-tests/resource-timing/rt-resources-per-worker.html
2427 imported/w3c/web-platform-tests/resource-timing/rt-serialization.html
2428 imported/w3c/web-platform-tests/resource-timing/rt-shared-resource-in-frames.html
2429 imported/w3c/web-platform-tests/resource-timing/rt-shared-resource-in-workers.html
2430 performance-api/resource-timing-apis.html
2433 * WebCore.xcodeproj/project.pbxproj:
2436 * platform/network/NetworkLoadTiming.h:
2437 (WebCore::NetworkLoadTiming::reset): Deleted.
2438 We no longer need to reset.
2440 * loader/ResourceTiming.cpp: Added.
2441 (WebCore::passesTimingAllowCheck):
2442 (WebCore::ResourceTiming::fromCache):
2443 (WebCore::ResourceTiming::fromLoad):
2444 (WebCore::ResourceTiming::fromSynchronousLoad):
2445 (WebCore::ResourceTiming::ResourceTiming):
2446 (WebCore::ResourceTiming::isolatedCopy):
2447 * loader/ResourceTiming.h: Added.
2448 (WebCore::ResourceTiming::url):
2449 (WebCore::ResourceTiming::initiator):
2450 (WebCore::ResourceTiming::loadTiming):
2451 (WebCore::ResourceTiming::networkLoadTiming):
2452 (WebCore::ResourceTiming::allowTimingDetails):
2453 (WebCore::ResourceTiming::overrideInitiatorName):
2454 (WebCore::ResourceTiming::ResourceTiming):
2455 Class that encapsulates all of the data needed for a PerformanceResourceTiming entry.
2456 There are three static constructors indicating the different ways this object can
2457 be constructed and the different data available at the time of construction.
2459 * loader/ResourceLoaderOptions.h:
2460 Add the new InitiatorContext, default to Document.
2462 * loader/ThreadableLoaderClient.h:
2463 (WebCore::ThreadableLoaderClient::didFinishTiming):
2464 New client method only used by WorkerThreadableLoader.
2466 * loader/WorkerThreadableLoader.h:
2467 * loader/WorkerThreadableLoader.cpp:
2468 (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2469 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishTiming):
2470 All loads initiated in a WorkerThreadableLoader get identified as InitiatorContext::Worker.
2471 Add timing information to the Performance object when received. No need to inform clients.
2473 * loader/DocumentThreadableLoader.h:
2474 * loader/DocumentThreadableLoader.cpp:
2475 (WebCore::DocumentThreadableLoader::finishedTimingForWorkerLoad):
2476 (WebCore::DocumentThreadableLoader::loadRequest):
2477 Provide APIs to pass timing data on to a WorkerThreadableLoader.
2478 Create ResourceTiming data for synchronous loads.
2480 * loader/LoadTiming.h:
2481 * loader/LoadTiming.cpp:
2482 (WebCore::LoadTiming::isolatedCopy):
2483 Add isolatedCopy to allow this data to be passed across to a Worker.
2485 * loader/ResourceTimingInformation.h:
2486 * loader/ResourceTimingInformation.cpp:
2487 (WebCore::ResourceTimingInformation::shouldAddResourceTiming):
2488 (WebCore::ResourceTimingInformation::addResourceTiming):
2489 (WebCore::ResourceTimingInformation::storeResourceTimingInitiatorInformation):
2490 Refactor to remove unused / unnecessary bits. Extract out some helpful code.
2491 Changed this to match when Blink decides when to add or ignore entries, however
2492 this may change over time.
2494 * loader/SubresourceLoader.cpp:
2495 (WebCore::SubresourceLoader::didFinishLoading):
2496 (WebCore::SubresourceLoader::notifyDone):
2497 (WebCore::SubresourceLoader::reportResourceTiming):
2498 * loader/SubresourceLoader.h:
2499 * loader/cache/CachedRawResource.cpp:
2500 (WebCore::CachedRawResource::finishedTimingForWorkerLoad):
2501 * loader/cache/CachedRawResource.h:
2502 * loader/cache/CachedRawResourceClient.h:
2503 (WebCore::CachedRawResourceClient::finishedTimingForWorkerLoad):
2504 Plumbing to report timing information to Worker if this resource was loaded for a Worker.
2506 * loader/cache/CachedResource.cpp:
2507 (WebCore::CachedResource::CachedResource):
2508 * loader/cache/CachedResource.h:
2509 (WebCore::CachedResource::initiatorName):
2510 Store the initiator name on the CachedResource like other data added to the original
2511 CachedResourceRequest. This is a bit of a hack but follows an existing pattern, and
2512 cleans up other hacks that worked around this later on.
2514 * loader/cache/CachedResourceLoader.h:
2515 * loader/cache/CachedResourceLoader.cpp:
2516 (WebCore::CachedResourceLoader::requestResource):
2517 (WebCore::CachedResourceLoader::revalidateResource):
2518 (WebCore::CachedResourceLoader::loadResource):
2519 Simply the creation of a ResourceTiming object for cache hits.
2520 Report timing information to Worker if this resource was loaded for a Worker.
2522 (WebCore::CachedResourceLoader::loadDone):
2523 Eliminate this redundant point attempting to add a ResourceTiming entry.
2525 * loader/cache/CachedResourceRequest.cpp:
2526 (WebCore::CachedResourceRequest::initiatorName):
2527 Update to match the spec. The fallback is "other".
2529 * page/Performance.h:
2530 * page/Performance.cpp:
2531 (WebCore::Performance::setResourceTimingBufferSize):
2532 (WebCore::Performance::addResourceTiming):
2533 Update to support PerformanceObservers.
2534 Update to match spec (event should bubble).
2536 * page/PerformanceResourceTiming.h:
2537 * page/PerformanceResourceTiming.cpp:
2538 (WebCore::PerformanceResourceTiming::create):
2539 (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
2540 (WebCore::PerformanceResourceTiming::fetchStart):
2541 (WebCore::PerformanceResourceTiming::domainLookupStart):
2542 (WebCore::PerformanceResourceTiming::domainLookupEnd):
2543 (WebCore::PerformanceResourceTiming::connectStart):
2544 (WebCore::PerformanceResourceTiming::connectEnd):
2545 (WebCore::PerformanceResourceTiming::secureConnectionStart):
2546 (WebCore::PerformanceResourceTiming::requestStart):
2547 (WebCore::PerformanceResourceTiming::responseStart):
2548 (WebCore::PerformanceResourceTiming::responseEnd):
2549 (WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp):
2550 Construct with a ResourceTiming object containing all the data we need for the entry.
2551 Update to match spec for what is required, should fallback, should be zero, etc.
2553 (WebCore::passesTimingAllowCheck): Deleted.
2554 Extracted this to ResourceTiming creation time in the loading context,
2555 since this can't be determined on the Worker context without also having
2556 all of the header information from each resource response.
2558 * page/PerformanceResourceTiming.idl:
2561 2017-02-16 Yusuke Suzuki <utatane.tea@gmail.com>
2563 [JSC] Drop PassRefPtr in inspector/
2564 https://bugs.webkit.org/show_bug.cgi?id=168420
2566 Reviewed by Alex Christensen.
2568 Use Ref<Inspector::ScriptArguments> and Ref<ScriptCallStack> as much as possible.
2569 It drops some unnecessary null checks.
2571 * bindings/scripts/CodeGeneratorJS.pm:
2573 * bindings/scripts/test/JS/JSTestObj.cpp:
2574 (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStackCaller):
2575 * dom/ScriptExecutionContext.cpp:
2576 (WebCore::ScriptExecutionContext::PendingException::PendingException):
2577 * inspector/InspectorInstrumentation.cpp:
2578 (WebCore::InspectorInstrumentation::consoleCountImpl):
2579 (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
2580 (WebCore::InspectorInstrumentation::consoleTimeStampImpl):
2581 * inspector/InspectorInstrumentation.h:
2582 (WebCore::InspectorInstrumentation::consoleCount):
2583 (WebCore::InspectorInstrumentation::stopConsoleTiming):
2584 (WebCore::InspectorInstrumentation::consoleTimeStamp):
2585 * inspector/InspectorNetworkAgent.cpp:
2586 (WebCore::InspectorNetworkAgent::buildInitiatorObject):
2587 * inspector/TimelineRecordFactory.cpp:
2588 (WebCore::TimelineRecordFactory::createGenericRecord):
2589 * inspector/WebInjectedScriptManager.cpp:
2590 (WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
2591 * inspector/WebInjectedScriptManager.h:
2592 * page/DOMWindow.cpp:
2593 (WebCore::DOMWindow::postMessageTimerFired):
2594 We dispatch appropriate addMessage function according to whether
2595 `timer.stackTrace()` is nullptr.
2597 * page/PageConsoleClient.cpp:
2598 (WebCore::PageConsoleClient::addMessage):
2599 (WebCore::PageConsoleClient::messageWithTypeAndLevel):
2600 (WebCore::PageConsoleClient::count):
2601 (WebCore::PageConsoleClient::timeEnd):
2602 (WebCore::PageConsoleClient::timeStamp):
2603 * page/PageConsoleClient.h:
2604 * workers/WorkerConsoleClient.cpp:
2605 (WebCore::WorkerConsoleClient::messageWithTypeAndLevel):
2606 (WebCore::WorkerConsoleClient::count):
2607 (WebCore::WorkerConsoleClient::timeEnd):
2608 (WebCore::WorkerConsoleClient::timeStamp):
2609 * workers/WorkerConsoleClient.h:
2610 * workers/WorkerGlobalScope.cpp:
2611 (WebCore::WorkerGlobalScope::addMessage):
2613 2017-02-16 Chris Fleizach <cfleizach@apple.com>
2615 AX: Make form validation accessible on iOS
2616 https://bugs.webkit.org/show_bug.cgi?id=168400
2618 Reviewed by Chris Dumez.
2620 Hide the popover content of form validation from accessibility (since its not interactable)
2621 and instead announce the message.
2623 * platform/ios/ValidationBubbleIOS.mm:
2624 (WebCore::ValidationBubble::show):
2626 2017-02-16 Simon Fraser <simon.fraser@apple.com>
2628 Clean up use of some CALayer-related SPI
2629 https://bugs.webkit.org/show_bug.cgi?id=168401
2631 Reviewed by Tim Horton.
2633 Use -setDrawsAsynchronously: rather than the old -setAcceleratesDrawing: SPI.
2635 Remove CATiledLayer-related stuff from QuartzCoreSPI.h, since we don't use it any more.
2637 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2638 (PlatformCALayerCocoa::acceleratesDrawing):
2639 (PlatformCALayerCocoa::setAcceleratesDrawing):
2640 * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
2641 (-[WebTiledBackingLayer setDrawsAsynchronously:]): This override passes the state
2642 onto the TileController.
2643 (-[WebTiledBackingLayer setAcceleratesDrawing:]): Deleted.
2644 * platform/ios/LegacyTileGridTile.mm:
2645 (WebCore::LegacyTileGridTile::LegacyTileGridTile):
2646 * platform/spi/cocoa/QuartzCoreSPI.h:
2648 2017-02-16 Yusuke Suzuki <utatane.tea@gmail.com>
2650 Web Inspector: allow import() inside the inspector
2651 https://bugs.webkit.org/show_bug.cgi?id=167457
2653 Reviewed by Ryosuke Niwa.
2655 When evaluating `import("...")`, we need the caller's context to resolve
2656 the module specifier correctly. For example, if `import("./cocoa.js")` is
2657 evaluated in the script "drinks/hot.js", this module name is resolved to
2658 "drinks/cocoa.js". If the same import operator is evaluated in the script
2659 "menu/all.js", the module specifier becomes "menu/cocoa.js".
2661 Previously we reject the import operator if the caller does not have such
2662 a context. These context is SourceOrigin and its ScriptFetcher. While they
2663 are offered in the script tag and other code evaluations, the inspector
2664 console does not offer that. These class are offered in the WebCore side
2665 and we should not touch these classes in the JSC's inspector code.
2667 Now we relax the above restriction. If the above caller information is not
2668 offered, we fallback to the default one. In the web page, we use the page's
2669 URL as the caller's source origin. This allows us to evaluate the import
2670 operator in the inspector console.
2672 And as of r167698, the console recognizes `await import("...")` form. We use
2673 this to test this `import()` in the console functionality.
2675 Test: inspector/controller/runtime-controller-import.html
2677 * bindings/js/ScriptModuleLoader.cpp:
2678 (WebCore::ScriptModuleLoader::importModule):
2680 2017-02-16 Miguel Gomez <magomez@igalia.com>
2682 [GTK] scroll with transparent background not repainted after scrollY >= 32768
2683 https://bugs.webkit.org/show_bug.cgi?id=154283
2685 Reviewed by Carlos Garcia Campos.
2687 Due to a limitation of the pixman backend, which uses 16 bits to hold signed integers, cairo is
2688 not able to draw anything when using transformation matrices with values bigger than 32768. When
2689 drawing patterns into large pages, the matrices values can overflow those 16 bits, so cairo doesn't
2690 draw anything in, which causes the reported transparent backgrounds.
2692 The patch modifies the transformation matrices both from the current context and the pattern we
2693 are painting, to avoid them to hold values that cannot stored in 16 bits.
2695 There's still the possibility that this happens, but it would require using a pattern with a size
2698 Based on a previous patch by Gwang Yoon Hwang <yoon@igalia.com>.
2700 Test: fast/backgrounds/background-repeat-long-scroll.html
2702 * platform/graphics/cairo/CairoUtilities.cpp:
2703 (WebCore::drawPatternToCairoContext):
2705 2017-02-16 Carlos Garcia Campos <cgarcia@igalia.com>
2707 [GTK] Images are never read from the clipboard
2708 https://bugs.webkit.org/show_bug.cgi?id=168419
2710 Reviewed by Sergio Villar Senin.
2712 We write images in the clipboard, but we don't read them.
2714 Fixes: editing/pasteboard/paste-image-using-image-data.html
2716 * editing/Editor.cpp:
2717 (WebCore::Editor::createFragmentForImageAndURL): Moved from EditorMac.mm since it's cross-platform code.
2719 * editing/gtk/EditorGtk.cpp:
2720 (WebCore::createFragmentFromPasteboardData): Check if there's an image in the selection, and use
2721 Editor::createFragmentForImageAndURL in that case.
2722 * editing/mac/EditorMac.mm:
2723 (WebCore::Editor::createFragmentForImageAndURL): Deleted.
2724 * platform/gtk/PasteboardHelper.cpp:
2725 (WebCore::PasteboardHelper::getClipboardContents): Check also if there's an image in the clipboard.
2727 2017-02-15 Jer Noble <jer.noble@apple.com>
2729 REGRESSION (r212311): NULL-dereference in HTMLMediaElement::prepareToPlay()
2730 https://bugs.webkit.org/show_bug.cgi?id=168404
2731 <rdar://problem/30547188>
2733 Reviewed by Brian Weinstein.
2735 Prior to r212311, m_player was always guaranteed to be initialized when calling
2736 prepareToPlay(). r212311 began calling prepareToPlay() on a subsequent run-loop iteration
2737 after creating m_player. So now check whether m_player is NULL before calling methods on it.
2739 * html/HTMLMediaElement.cpp:
2740 (WebCore::HTMLMediaElement::prepareToPlay):
2742 2017-02-15 Eric Carlson <eric.carlson@apple.com>
2744 [MediaStream] delete CaptureDeviceInfo struct
2745 https://bugs.webkit.org/show_bug.cgi?id=168395
2747 The CaptureDeviceInfo struct and CaptureDevice class were almost identical, so
2748 add an "enabled" field to the later, delete the former, and switch all uses of
2749 CaptureDeviceInfo to CaptureDevice.
2751 Do some minor drive-by cleanup of AVCaptureDeviceManager::refreshCaptureDevices
2752 and CaptureDeviceManager::captureDeviceFromDeviceID.
2754 Reviewed by Sam Weinig.
2756 No new tests, no behavior change.
2758 * Modules/mediastream/MediaDevicesRequest.cpp:
2759 (WebCore::MediaDevicesRequest::start): SourceKind -> DeviceType
2760 * platform/mediastream/CaptureDevice.h:
2761 (WebCore::CaptureDevice::CaptureDevice):
2762 (WebCore::CaptureDevice::type): Renamed from kind.
2763 (WebCore::CaptureDevice::setType):
2764 (WebCore::CaptureDevice::enabled): Added.
2765 (WebCore::CaptureDevice::setEnabled):
2766 (WebCore::CaptureDevice::kind): Deleted.
2767 (WebCore::CaptureDevice::setKind): Deleted.
2769 * platform/mediastream/CaptureDeviceManager.cpp:
2770 (CaptureDeviceManager::getSourcesInfo):
2771 (CaptureDeviceManager::captureDeviceFromDeviceID): Don't call sourceWithUID.
2772 (CaptureDeviceManager::bestSourcesForTypeAndConstraints):
2773 (CaptureDeviceManager::sourceWithUID):
2774 * platform/mediastream/CaptureDeviceManager.h:
2775 (WebCore::CaptureDeviceManager::refreshCaptureDevices):
2776 (WebCore::CaptureDeviceManager::refreshCaptureDeviceList): Deleted.
2778 * platform/mediastream/mac/AVCaptureDeviceManager.h:
2779 * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2780 (WebCore::AVCaptureDeviceManager::captureDevices):
2781 (WebCore::deviceIsAvailable):
2782 (WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
2783 (WebCore::AVCaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints):
2784 (WebCore::AVCaptureDeviceManager::deviceConnected):
2785 (WebCore::AVCaptureDeviceManager::deviceDisconnected):
2786 (WebCore::AVCaptureDeviceManager::captureDeviceList): Deleted.
2787 (WebCore::shouldConsiderDeviceInDeviceList): Deleted.
2788 (WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList): Deleted.
2789 * platform/mock/MockRealtimeMediaSource.cpp:
2790 (WebCore::MockRealtimeMediaSource::audioDeviceInfo):
2791 (WebCore::MockRealtimeMediaSource::videoDeviceInfo):
2793 2017-02-15 Sam Weinig <sam@webkit.org>
2795 [WebIDL] Remove custom conversion from FontFace code by using a Variant
2796 https://bugs.webkit.org/show_bug.cgi?id=168384
2798 Reviewed by Alex Christensen.
2800 Match the font face spec and use a union rather than any in the FontFace constructor.
2802 Test: Added additional cases to fast/text/font-face-javascript.html.
2805 (WebCore::FontFace::create):
2809 2017-02-15 Jer Noble <jer.noble@apple.com>
2811 Disabled Media Sources should render black/silence
2812 https://bugs.webkit.org/show_bug.cgi?id=168281
2814 Reviewed by Eric Carlson.
2816 Test: webrtc/video-disabled-black.html
2818 Pass the enabled flag setting down from the MediaStreamTrackPrivate to its underlying
2819 source, including RealtimeMediaSource and RealtimeOutgoingAudio/VideoSource. When either
2820 enabled is cleared or muted is set, generate empty (black or silent) media, as opposed to
2821 pausing media or (worse) continuing to send generated media.
2823 * platform/mediastream/MediaStreamTrackPrivate.cpp:
2824 (WebCore::MediaStreamTrackPrivate::setEnabled):
2825 (WebCore::MediaStreamTrackPrivate::sourceEnabledChanged):
2826 * platform/mediastream/MediaStreamTrackPrivate.h:
2827 * platform/mediastream/RealtimeMediaSource.cpp:
2828 (WebCore::RealtimeMediaSource::setEnabled):
2829 * platform/mediastream/RealtimeMediaSource.h:
2830 (WebCore::RealtimeMediaSource::enabled):
2831 * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
2832 * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
2833 (WebCore::MockRealtimeAudioSourceMac::render):
2834 * platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
2835 (WebCore::RealtimeOutgoingAudioSource::sourceMutedChanged):
2836 (WebCore::RealtimeOutgoingAudioSource::sourceEnabledChanged):
2837 (WebCore::RealtimeOutgoingAudioSource::pullAudioData):
2838 * platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
2839 * platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:
2840 (WebCore::RealtimeOutgoingVideoSource::sourceMutedChanged):
2841 (WebCore::RealtimeOutgoingVideoSource::sourceEnabledChanged):
2842 (WebCore::RealtimeOutgoingVideoSource::videoSampleAvailable):
2843 * platform/mediastream/mac/RealtimeOutgoingVideoSource.h:
2844 * platform/mock/MockRealtimeVideoSource.cpp:
2845 (WebCore::MockRealtimeVideoSource::generateFrame):
2847 2017-02-15 Wenson Hsieh <wenson_hsieh@apple.com>
2849 Editing history scripts should not add the contenteditable attribute or override key events
2850 https://bugs.webkit.org/show_bug.cgi?id=168389
2851 <rdar://problem/30529945>
2853 Reviewed by Dan Bernstein.
2855 Clients that hook into editing history tracking should handle setting the contenteditable attribute on the body
2856 rather than have the script add it to the body. Additionally, this script should NOT be overriding any keydown
2857 events. These were initially added for compatibility with a test harness early on, and should have been removed
2860 * Scripts/DumpEditingHistory.js:
2862 2017-02-15 Jer Noble <jer.noble@apple.com>
2864 Pass "RequiresCustomURLLoading" in AVURLAsset options dictionary
2865 https://bugs.webkit.org/show_bug.cgi?id=168381
2867 Reviewed by Eric Carlson.
2869 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2870 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
2872 2017-02-15 Anders Carlsson <andersca@apple.com>
2876 * page/DragController.cpp:
2877 (WebCore::DragController::doSystemDrag):
2879 2017-02-15 Anders Carlsson <andersca@apple.com>
2881 Modernize DragClient::startDrag somewhat
2882 https://bugs.webkit.org/show_bug.cgi?id=168379
2884 Reviewed by Tim Horton.
2886 Change DragClient::startDrag to take a DragImage instead of a DragImageRef, and to pass along the source action
2887 instead of whether it's a link or not.
2889 * loader/EmptyClients.cpp:
2890 * page/DragClient.h:
2891 * page/DragController.cpp:
2892 (WebCore::DragController::startDrag):
2893 (WebCore::DragController::doImageDrag):
2894 (WebCore::DragController::doSystemDrag):
2895 * page/DragController.h:
2897 2017-02-15 Chris Dumez <cdumez@apple.com>
2899 Expose Symbol.toPrimitive / valueOf on Location instances
2900 https://bugs.webkit.org/show_bug.cgi?id=168295
2902 Reviewed by Geoffrey Garen, Keith Miller and Mark Lam.
2904 Expose Symbol.toPrimitive / valueOf on Location instances as per:
2905 - https://html.spec.whatwg.org/#the-location-interface
2907 Firefox and Chrome already comply with the specification.
2909 Tests: fast/dom/location-valueOf-after-object-prototype-update.html
2910 fast/dom/location-valueOf-after-object-prototype-update2.html
2911 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-symbol-toprimitive.html
2912 imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-valueof.html
2914 * bindings/scripts/CodeGeneratorJS.pm:
2915 (GenerateImplementation):
2917 2017-02-15 Aakash Jain <aakash_jain@apple.com>
2919 Remove WebIOSEvent interface
2920 https://bugs.webkit.org/show_bug.cgi?id=168368
2922 Reviewed by Tim Horton.
2924 * platform/ios/WebEvent.h: Removed WebIOSEvent.
2926 2017-02-15 Chris Dumez <cdumez@apple.com>
2928 [iOS] Form Validation Bubble should be sensitive to Dynamic Type
2929 https://bugs.webkit.org/show_bug.cgi?id=168291
2930 <rdar://problem/30508593>
2932 Reviewed by Tim Horton.
2934 Update ValidationBubble implementation on iOS to stop obeying the
2935 minimum font size setting, given that this setting is not exposed
2936 on iOS. Instead, we now rely on
2937 [UIFont preferredFontForTextStyle:UIFontTextStyleCallout], which
2938 will give us a font whose size obeys Dynamic Type [1] setting on iOS.
2940 [1] https://developer.apple.com/ios/human-interface-guidelines/visual-design/typography/
2942 No new tests, no easily testable.
2944 * platform/ios/ValidationBubbleIOS.mm:
2945 (WebCore::ValidationBubble::ValidationBubble):
2947 2017-02-15 Yusuke Suzuki <utatane.tea@gmail.com>
2949 [JSC] Drop PassRefPtr
2950 https://bugs.webkit.org/show_bug.cgi?id=168320
2952 Reviewed by Saam Barati.
2954 * bindings/js/ScriptSourceCode.h:
2955 (WebCore::ScriptSourceCode::ScriptSourceCode):
2956 Use Ref and pass it to SourceCode.
2958 * replay/ReplayController.cpp:
2959 (WebCore::ReplayController::frameNavigated):
2962 2017-02-15 Xabier Rodriguez Calvar <calvaris@igalia.com>
2964 [GStreamer][MSE][EME] Handle protection event also at decryptor level
2965 https://bugs.webkit.org/show_bug.cgi?id=168316
2967 Reviewed by Žan Doberšek.
2969 So far in MSE pipeline we were handling the encryption events
2970 only when they arrived at the demuxer but this won't work in any
2971 kind of key renegotiation as the event will never arrive. Now we
2972 connect to the element messages, check for the drm id and send it
2973 to the private player for processing.
2975 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2976 (WebCore::appendPipelineElementMessageCallback):
2977 (WebCore::AppendPipeline::AppendPipeline):
2978 (WebCore::AppendPipeline::handleElementMessage):
2979 * platform/graphics/gstreamer/mse/AppendPipeline.h:
2981 2017-02-15 Zan Dobersek <zdobersek@igalia.com>
2983 [EME] MediaKeys::setServerCertificate() must resolve with 'false' when certificates aren't supported
2984 https://bugs.webkit.org/show_bug.cgi?id=168362
2986 Reviewed by Xabier Rodriguez-Calvar.
2988 In MediaKeys::setServerCertificate(), when the CDM implementation
2989 doesn't support server certificates, it should resolve the promise
2990 with the 'false' value, as mandated by the specification, and not
2993 A test case in mock-MediaKeys-setServerCertificate.html is updated.
2995 * Modules/encryptedmedia/MediaKeys.cpp:
2996 (WebCore::MediaKeys::setServerCertificate):
2998 2017-02-15 Carlos Garcia Campos <cgarcia@igalia.com>
3000 REGRESSION (r206014): HTTPHeaderMap does not consistently use comma without space to separate values of header fields
3001 https://bugs.webkit.org/show_bug.cgi?id=168115
3003 Reviewed by Darin Adler.
3005 In r206014 HTTPHeaderMap::add() was updated to combine common headers with ',' instead of ", " to match the
3006 fetch specification, but the uncommon headers are still combined with ", ".
3008 * platform/network/HTTPHeaderMap.cpp:
3009 (WebCore::HTTPHeaderMap::add):
3011 2017-02-14 Ryosuke Niwa <rniwa@webkit.org>
3013 An assertion failure inside removeChildren
3014 https://bugs.webkit.org/show_bug.cgi?id=168069
3016 Reviewed by Brent Fulgham.
3018 The bug was caused by notifyRemovePendingSheet executing scripts synchronously where it shouldn't.
3020 Removed the call to notifyRemovePendingSheetIfNeeded in notifyChildNodeRemoved. Instead, invoke it
3021 in its call sites when they're safe.
3023 Test: http/tests/security/move-iframe-within-focus-handler-inside-removal.html
3025 * dom/ContainerNode.cpp:
3026 (WebCore::ContainerNode::takeAllChildrenFrom):
3027 (WebCore::ContainerNode::notifyChildInserted):
3028 (WebCore::ContainerNode::removeChild):
3029 (WebCore::ContainerNode::parserRemoveChild):
3030 (WebCore::ContainerNode::replaceAllChildren):
3031 (WebCore::ContainerNode::removeChildren):
3032 * dom/ContainerNodeAlgorithms.cpp:
3033 (WebCore::notifyChildNodeRemoved):
3035 2017-02-15 Carlos Garcia Campos <cgarcia@igalia.com>
3037 [GStreamer] Several tests are timing out after r212349
3038 https://bugs.webkit.org/show_bug.cgi?id=168359
3040 Reviewed by Žan Doberšek.
3042 This is because they are failing the cross origin check. Those tests are not using WebKitWebSrc, but
3043 GstFileSrc. I didn't consider the case of source not being a WebKitWebSrc.
3045 Fixes several timeout instroduced in r212349.
3047 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3048 (WebCore::MediaPlayerPrivateGStreamer::hasSingleSecurityOrigin): Split the source check in two. First check if
3049 it's nullptr, and return false. Then check if it's a WebKitWebSrc and return true if it isn't.
3051 2017-02-14 Brent Fulgham <bfulgham@apple.com>
3053 Revalidate URL after events that could trigger navigations
3054 https://bugs.webkit.org/show_bug.cgi?id=168071
3055 <rdar://problem/30450379>
3057 Reviewed by Ryosuke Niwa.
3059 When arbitary javascript runs during a load, we should revalidate
3060 the URLs involved to make sure they are still valid.
3062 Tests: http/tests/plugins/navigation-during-load-embed.html
3063 http/tests/plugins/navigation-during-load.html
3065 * html/HTMLEmbedElement.cpp:
3066 (WebCore::HTMLEmbedElement::updateWidget): Confirm we are still allowed to
3067 load the URL after executing JS callbacks.
3068 * html/HTMLFrameElementBase.cpp:
3069 (WebCore::HTMLFrameElementBase::isURLAllowed): Split existing function into
3070 existing protected method, and a new public method that checks a passed URL
3072 * html/HTMLFrameElementBase.h:
3073 * html/HTMLFrameOwnerElement.h:
3074 (WebCore::HTMLFrameOwnerElement::isURLAllowed):
3075 * html/HTMLObjectElement.cpp:
3076 (WebCore::HTMLObjectElement::updateWidget): Confirm we are still allowed to
3077 load the URL after executing JS callbacks.
3078 * loader/SubframeLoader.cpp:
3079 (WebCore::SubframeLoader::requestFrame): Ditto.
3081 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3083 [GStreamer] Implement MediaPlayerPrivate::hasSingleSecurityOrigin()
3084 https://bugs.webkit.org/show_bug.cgi?id=168322
3086 Reviewed by Žan Doberšek.
3088 It currently returns true unconditionally. Add resolved-location property to WebKitWebSourceGStreamer to track
3089 the resolved url returned by the server and use that from MediaPlayerPrivate to check if there was a cross
3092 Fixes: http/tests/security/canvas-remote-read-remote-video-redirect.html
3094 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3095 (WebCore::MediaPlayerPrivateGStreamer::hasSingleSecurityOrigin):
3096 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3097 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3098 (webKitWebSrcFinalize):
3099 (webKitWebSrcGetProperty):
3100 (webKitWebSrcStart):
3101 (webKitWebSrcQueryWithParent):
3102 (webKitWebSrcGetUri):
3103 (webKitWebSrcSetUri):
3104 (StreamingClient::handleResponseReceived):
3105 (ResourceHandleStreamingClient::wasBlocked):
3106 (ResourceHandleStreamingClient::cannotShowURL):
3108 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3110 Unreviewed, rolling out r211967.
3112 Caused rendering issues in HiDPI
3116 "[GTK] scroll with transparent background not repainted after
3118 https://bugs.webkit.org/show_bug.cgi?id=154283
3119 http://trac.webkit.org/changeset/211967
3121 2017-02-14 Carlos Garcia Campos <cgarcia@igalia.com>
3123 [GTK] Update cookie manager API to properly work with ephemeral sessions
3124 https://bugs.webkit.org/show_bug.cgi?id=168230
3126 Reviewed by Michael Catanzaro.
3128 Add implementation for deleteAllCookiesModifiedSince. Note that this only works when the timespan is 0, we need
3129 new libsoup API to support removing recently modified cookies.
3131 * platform/network/soup/CookieJarSoup.cpp:
3132 (WebCore::deleteAllCookiesModifiedSince):
3134 2017-02-14 Joseph Pecoraro <pecoraro@apple.com>
3136 [WebIDL] Improve serializer = { inherit }
3137 https://bugs.webkit.org/show_bug.cgi?id=168293
3139 Reviewed by Youenn Fablet.
3141 * bindings/scripts/CodeGeneratorJS.pm:
3143 Expose a serialize() method on the interface.
3145 (GenerateSerializerFunction):
3146 (GenerateSerializerAttributesForInterface): Deleted.
3147 Subclasses that have `serializer = { inherit }` can use
3148 their parent's serialize() method to get the initial object.
3149 We can now collapse everything back into a single function
3150 because we only generate code for our own attributes.
3152 * bindings/scripts/test/JS/JSTestNode.cpp:
3153 (WebCore::JSTestNode::serialize):
3154 (WebCore::jsTestNodePrototypeFunctionToJSONCaller):
3155 * bindings/scripts/test/JS/JSTestNode.h:
3156 * bindings/scripts/test/JS/JSTestObj.cpp:
3157 (WebCore::JSTestObj::serialize):
3158 (WebCore::jsTestObjPrototypeFunctionToJSONCaller):
3159 * bindings/scripts/test/JS/JSTestObj.h:
3160 * bindings/scripts/test/JS/JSTestSerialization.cpp:
3161 (WebCore::JSTestSerialization::serialize):
3162 (WebCore::jsTestSerializationPrototypeFunctionToJSONCaller):
3163 * bindings/scripts/test/JS/JSTestSerialization.h:
3164 * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
3165 (WebCore::JSTestSerializationInherit::serialize):
3166 (WebCore::jsTestSerializationInheritPrototypeFunctionToJSONCaller):
3167 * bindings/scripts/test/JS/JSTestSerializationInherit.h:
3168 * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
3169 (WebCore::JSTestSerializationInheritFinal::serialize):
3170 (WebCore::jsTestSerializationInheritFinalPrototypeFunctionToJSONCaller):
3171 * bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
3174 2017-02-14 Aakash Jain <aakash_jain@apple.com>
3176 Move methods from WebCoreThread.h to WebCoreThreadInternal.h
3177 https://bugs.webkit.org/show_bug.cgi?id=168326
3179 Reviewed by Alexey Proskuryakov.
3181 * platform/ios/wak/WebCoreThread.h: Move methods WebThreadRunLoop and WebThreadCurrentContext to WebCoreThreadInternal.h
3182 * platform/ios/wak/WebCoreThreadInternal.h: Ditto.
3183 * platform/ios/wak/WebCoreThreadRun.cpp: Removed WebCoreThread.h as it is already included by WebCoreThreadInternal.h
3184 * platform/ios/wak/WKGraphics.mm: Included WebCoreThreadInternal.h, it subsequently includes WebCoreThread.h
3185 * inspector/InspectorTimelineAgent.cpp: Ditto.
3186 * page/mac/PageMac.mm: Ditto.
3187 * platform/cf/MainThreadSharedTimerCF.cpp: Ditto.
3188 * platform/cocoa/MemoryPressureHandlerCocoa.mm: Ditto.
3189 * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp: Ditto.
3190 * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: Ditto.
3191 * bindings/js/CommonVM.cpp: included WebCoreThreadInternal.h
3193 2017-02-14 Wenson Hsieh <wenson_hsieh@apple.com>
3195 [WK2] Support data interaction on links
3196 https://bugs.webkit.org/show_bug.cgi?id=168331
3197 <rdar://problem/30200837>
3199 Reviewed by Tim Horton.
3201 Adds support for data interaction on links at the WebCore layer, refactoring some drag-and-drop code on the Mac
3202 along the way. Also adds two new TestWebKitAPI unit tests in DataInteractionTests.mm: LinkToInput and
3203 BackgroundImageLinkToInput (see Tools/ChangeLog for more information).
3205 * page/DragController.cpp:
3206 (WebCore::DragController::startDrag):
3207 (WebCore::DragController::doImageDrag):
3208 (WebCore::DragController::doSystemDrag):
3210 Introduce platformAdjustDragImageForDeviceScaleFactor, and special-case drag images for links to anchor at the
3213 * platform/DragImage.cpp:
3214 (WebCore::platformAdjustDragImageForDeviceScaleFactor):
3216 Scale the drag image up by the device scale factor. In WebDragClient, we scale the image back down to the
3217 original size. It seems the reason we do this extra dance is because the image sizing heuristic in between
3218 assumes that the image dimensions are for a non-retina device, but this work should really not be necessary if
3219 we tweak the heuristic to account for deviceScaleFactor. We should address this in a separate patch.
3221 * platform/DragImage.h:
3222 * platform/graphics/Path.h:
3224 2017-02-14 Basuke Suzuki <Basuke.Suzuki@am.sony.com>
3226 [CURL] ResourceError created with error information should have default type Type::General
3227 https://bugs.webkit.org/show_bug.cgi?id=168345
3229 Reviewed by Alex Christensen.
3231 ResourceError has separate implementaion for each platform
3232 so that the interface should be same.
3233 On CURL port, the constructor with error information has
3234 different default value on `type` parameter. It is Type::Null but other implementaitons have Type::General.
3235 This causes some ResourceError is created inconsistent.
3237 * platform/network/curl/ResourceError.h:
3238 (WebCore::ResourceError::ResourceError):
3240 2017-02-14 Youenn Fablet <youennf@gmail.com>
3242 [WebRTC] Add support for libwebrtc negotiation needed event
3243 https://bugs.webkit.org/show_bug.cgi?id=168267
3245 Reviewed by Eric Carlson.
3247 Test: webrtc/negotiatedneeded-event-addStream.html
3249 Moving generic code (markAsNeedingNegotiation) from MediaEndpointPeerConnection to PeerConnectionBackend.
3250 This code handles the control of sending or not the negotiationneeded event.
3252 Updating mock to use markAsNeedingNegotiation when streams are changed.
3253 Updating libwebrtc backend to call markAsNeedingNegotiation when required by libwebrtc implementation.
3255 * Modules/mediastream/MediaEndpointPeerConnection.cpp:
3256 (WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):
3257 * Modules/mediastream/MediaEndpointPeerConnection.h:
3258 * Modules/mediastream/PeerConnectionBackend.cpp:
3259 (WebCore::PeerConnectionBackend::markAsNeedingNegotiation):
3260 * Modules/mediastream/PeerConnectionBackend.h:
3261 (WebCore::PeerConnectionBackend::isNegotiationNeeded):
3262 (WebCore::PeerConnectionBackend::clearNegotiationNeededState):
3263 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
3264 (WebCore::LibWebRTCMediaEndpoint::OnRenegotiationNeeded):
3265 * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
3266 * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
3267 * testing/MockLibWebRTCPeerConnection.cpp:
3268 (WebCore::MockLibWebRTCPeerConnection::AddStream):
3269 (WebCore::MockLibWebRTCPeerConnection::RemoveStream):
3271 2017-02-14 Brady Eidson <beidson@apple.com>
3273 Unreviewed followup to r212330 to fix Debug builds
3275 * loader/DocumentThreadableLoader.cpp:
3276 (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Add call to relaxAdoptionRequirement().
3278 2017-02-14 Matt Rajca <mrajca@apple.com>
3280 Website policies: iframes should respect the autoplay policy of the top-level document
3281 https://bugs.webkit.org/show_bug.cgi?id=168333
3283 Reviewed by Alex Christensen.
3285 API tests were added.
3287 * html/HTMLMediaElement.cpp:
3288 (WebCore::HTMLMediaElement::HTMLMediaElement):
3290 2017-02-14 Dean Jackson <dino@apple.com>
3292 Rename preferLowPowerWebGLRendering setting to forceWebGLUsesLowPower
3293 https://bugs.webkit.org/show_bug.cgi?id=168339
3294 <rdar://problem/30522092>
3296 Reviewed by Simon Fraser.
3298 Use a setting name that more clearly reflects what it is doing. It's not
3299 preferring to use the low-power GPU, it's forcing it.
3301 * html/canvas/WebGLRenderingContextBase.cpp:
3302 (WebCore::WebGLRenderingContextBase::create):
3305 2017-02-14 Brady Eidson <beidson@apple.com>
3307 Speculative fix for: Crash in DocumentThreadableLoader::redirectReceived.
3308 <rdar://problem/29899473> and https://bugs.webkit.org/show_bug.cgi?id=168337
3310 Reviewed by Geoffrey Garen.
3312 No new tests (Unable to find a reproduction).
3314 * loader/DocumentThreadableLoader.cpp:
3315 (WebCore::DocumentThreadableLoader::loadRequest):
3317 2017-02-14 Youenn Fablet <youenn@apple.com>
3319 [WebRTC] Remove obsolete WebRTC stats API
3320 https://bugs.webkit.org/show_bug.cgi?id=167910
3322 Reviewed by Alex Christensen.
3324 No change of behavior as removed constructs are not functional.
3325 Removing RTCStatsResponse which no longer exists and made RTCStatsReport an empty container for now.
3328 * DerivedSources.cpp:
3329 * DerivedSources.make:
3330 * Modules/mediastream/MediaEndpointPeerConnection.cpp:
3331 (WebCore::MediaEndpointPeerConnection::getStats):
3332 * Modules/mediastream/MediaEndpointPeerConnection.h:
3333 * Modules/mediastream/PeerConnectionBackend.h:
3334 * Modules/mediastream/RTCPeerConnection.cpp:
3335 (WebCore::RTCPeerConnection::getStats):
3336 * Modules/mediastream/RTCStatsReport.cpp:
3337 (WebCore::RTCStatsReport::create): Deleted.
3338 (WebCore::RTCStatsReport::RTCStatsReport): Deleted.
3339 (WebCore::RTCStatsReport::names): Deleted.
3340 (WebCore::RTCStatsReport::local): Deleted.
3341 (WebCore::RTCStatsReport::remote): Deleted.
3342 (WebCore::RTCStatsReport::addStatistic): Deleted.
3343 * Modules/mediastream/RTCStatsReport.h:
3344 (WebCore::RTCStatsReport::create):
3345 (WebCore::RTCStatsReport::timestamp): Deleted.
3346 (WebCore::RTCStatsReport::id): Deleted.
3347 (WebCore::RTCStatsReport::type): Deleted.
3348 (WebCore::RTCStatsReport::stat): Deleted.
3349 * Modules/mediastream/RTCStatsReport.idl:
3350 * Modules/mediastream/RTCStatsResponse.cpp: Removed.
3351 * Modules/mediastream/RTCStatsResponse.h: Removed.
3352 * Modules/mediastream/RTCStatsResponse.idl: Removed.
3353 * WebCore.xcodeproj/project.pbxproj:
3354 * platform/mediastream/MediaEndpoint.h:
3355 (WebCore::MediaEndpoint::getStats):
3356 * platform/mediastream/RTCStatsRequest.h: Removed.
3357 * platform/mediastream/RTCStatsResponseBase.h: Removed.
3359 2017-02-14 Karim H <karim@karhm.com>
3361 Removed unused methods of WebCore::FileStream
3362 https://bugs.webkit.org/show_bug.cgi?id=168025
3364 Reviewed by Michael Catanzaro.
3366 * fileapi/AsyncFileStream.cpp:
3367 (WebCore::AsyncFileStream::openForWrite): Deleted.
3368 (WebCore::AsyncFileStream::write): Deleted.
3369 (WebCore::AsyncFileStream::truncate): Deleted.
3370 * fileapi/AsyncFileStream.h:
3371 * platform/FileStream.cpp:
3372 (WebCore::FileStream::openForWrite): Deleted.
3373 (WebCore::FileStream::write): Deleted.
3374 (WebCore::FileStream::truncate): Deleted.
3375 * platform/FileStream.h:
3377 2017-02-14 Chris Dumez <cdumez@apple.com>
3379 HTML Form Validation bubble should take minimum font size setting into consideration
3380 https://bugs.webkit.org/show_bug.cgi?id=168271
3381 <rdar://problem/29869869>
3383 Reviewed by Simon Fraser.
3385 HTML Form Validation bubble should take minimum font size setting into consideration
3386 for better accessibility.
3388 Test: fast/forms/validation-message-minimum-font-size.html
3390 * platform/ValidationBubble.h:
3391 (WebCore::ValidationBubble::create):
3392 (WebCore::ValidationBubble::fontSize):
3393 * platform/ios/ValidationBubbleIOS.mm:
3394 (WebCore::ValidationBubble::ValidationBubble):
3395 * platform/mac/ValidationBubbleMac.mm:
3396 (WebCore::ValidationBubble::ValidationBubble):
3397 Update the ValidationBubble constructor to take in Settings. For now, there is a
3398 single setting that is the minimum font size and that is taken into account when
3399 setting the font size of the validation bubble text.
3401 2017-02-14 Eric Carlson <eric.carlson@apple.com>
3403 [MediaStream] add navigator.getUserMedia for compatibility with legacy content
3404 https://bugs.webkit.org/show_bug.cgi?id=168324
3405 <rdar://problem/30513125>
3407 Reviewed by Youenn Fablet.
3409 Tests: fast/mediastream/argument-types.html
3410 fast/mediastream/getusermedia.html
3411 fast/mediastream/webkitGetUserMedia-shadowing-then.html
3414 * DerivedSources.cpp:
3415 * DerivedSources.make:
3416 * Modules/mediastream/MediaDevices.idl:
3417 * Modules/mediastream/NavigatorUserMedia.idl: Added.
3418 * Modules/mediastream/NavigatorUserMedia.js: Added.