1 2015-07-09 Chris Fleizach <cfleizach@apple.com>
3 AX: VoiceOver cannot get to any content in Yahoo Mail messages table
4 https://bugs.webkit.org/show_bug.cgi?id=146674
6 Reviewed by Darin Adler.
8 A table row could have any number of parent elements in the render tree, but for the purposes
9 of accessibility we only want to report the AXTable as the parent so that it looks like a sane
12 Test: accessibility/aria-table-with-presentational-elements.html
14 * accessibility/AccessibilityARIAGridRow.cpp:
15 (WebCore::AccessibilityARIAGridRow::disclosedByRow):
16 (WebCore::AccessibilityARIAGridRow::parentObjectUnignored):
17 (WebCore::AccessibilityARIAGridRow::parentTable):
18 * accessibility/AccessibilityARIAGridRow.h:
20 2015-07-08 Sungmann Cho <sungmann.cho@navercorp.com>
22 [GTK] The "Missing Plug-in" buttons are not showing up on some flash contents.
23 https://bugs.webkit.org/show_bug.cgi?id=146707
25 Reviewed by Martin Robinson.
27 Currently, WebKitGTK+ doesn't show the "Missing Plug-in" buttons if the plugin-related tags
28 don't have a "type" attribute. In such a case, WebCore tries to guess the MIME type from
29 the extensions by using MIMETypeRegistry::getMIMETypeForExtension(). For WebKitGTK+,
30 MIMETypeRegistry::getMIMETypeForExtension() goes through |extensionMap|, which is a simple
31 array of <extension, mime type>, looking for the mime type for the given extension.
32 But |extensionMap| in MIMETypeRegistryGtk.cpp doesn't have the information for ".swf",
33 so WebCore fails to guess the MIME type and regard the content type as ObjectContentFrame,
34 not ObjectContentNetscapePlugin.
36 * platform/gtk/MIMETypeRegistryGtk.cpp:
38 2015-07-08 Brady Eidson <beidson@apple.com>
40 Crash calling [WebView close] in didFinishLoadForFrame callback.
41 <rdar://problem/21690765> and https://bugs.webkit.org/show_bug.cgi?id=146773
43 Reviewed by David Kilzer.
45 Added API Test "WebViewCloseInsideDidFinishLoadForFrame"
47 * loader/FrameLoader.cpp:
48 (WebCore::FrameLoader::checkLoadCompleteForThisFrame): After the delegate callback,
49 don't use the local Page* variable from earlier, but instead refetch it from m_frame.
51 2015-07-08 Daniel Bates <dabates@apple.com>
53 Cleanup: Make ContentSecurityPolicy::ReportingStatus an enum class
54 https://bugs.webkit.org/show_bug.cgi?id=146670
56 Reviewed by Darin Adler.
58 Make calling the ContentSecurityPolicy::allow* functions less error prone by making
59 ContentSecurityPolicy::ReportingStatus an enum class. Among other benefits this will
60 prevent a caller from inadvertently passing an enumerator of ContentSecurityPolicy::ReportingStatus
61 as the boolean argument overridingContentSecurityPolicy, which is taken by the various
62 ContentSecurityPolicy::allow* functions, by causing a compile-time error (since an enum class
63 enumerator cannot be implicitly converted to an integral type).
65 * bindings/js/ScriptController.cpp:
66 (WebCore::ScriptController::initScript):
67 * page/ContentSecurityPolicy.cpp:
68 (WebCore::CSPDirectiveList::allowJavaScriptURLs):
69 (WebCore::CSPDirectiveList::allowInlineEventHandlers):
70 (WebCore::CSPDirectiveList::allowInlineScript):
71 (WebCore::CSPDirectiveList::allowInlineStyle):
72 (WebCore::CSPDirectiveList::allowEval):
73 (WebCore::CSPDirectiveList::allowPluginType):
74 (WebCore::CSPDirectiveList::allowScriptFromSource):
75 (WebCore::CSPDirectiveList::allowObjectFromSource):
76 (WebCore::CSPDirectiveList::allowChildFrameFromSource):
77 (WebCore::CSPDirectiveList::allowImageFromSource):
78 (WebCore::CSPDirectiveList::allowStyleFromSource):
79 (WebCore::CSPDirectiveList::allowFontFromSource):
80 (WebCore::CSPDirectiveList::allowMediaFromSource):
81 (WebCore::CSPDirectiveList::allowConnectToSource):
82 (WebCore::CSPDirectiveList::allowFormAction):
83 (WebCore::CSPDirectiveList::allowBaseURI):
84 (WebCore::ContentSecurityPolicy::didReceiveHeader):
85 (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
86 * page/ContentSecurityPolicy.h:
87 * page/DOMSecurityPolicy.cpp:
88 (WebCore::DOMSecurityPolicy::allowsEval):
90 2015-07-08 Matthew Daiter <mdaiter@apple.com>
92 Activate DOMURLMediaStream
93 https://bugs.webkit.org/show_bug.cgi?id=146764
94 <rdar://problem/21738101>
96 Reviewed by Eric Carlson.
98 * DerivedSources.make: Added DOMURLMediaStream.idl to list
99 * WebCore.xcodeproj/project.pbxproj: Added DOMURLMediaStream.cpp and
100 DOMURLMediaStream.h to compile
102 2015-07-08 Matthew Daiter <mdaiter@apple.com>
104 Make sure MediaStream uses blob protocol
105 https://bugs.webkit.org/show_bug.cgi?id=146752
106 <rdar://problem/21736057>
108 Reviewed by Eric Carlson.
110 * html/HTMLMediaElement.cpp:
111 (WebCore::HTMLMediaElement::selectNextSourceChild): Added MediaStream
114 2015-07-08 Andreas Kling <akling@apple.com>
116 Videos on apple.com don't show up when restored from page cache.
117 <https://webkit.org/b/146766>
118 <rdar://problem/21712311>
120 Reviewed by Darin Adler.
122 Break out most of HTMLMediaElement::stop() (override of ActiveDOMObject::stop(), to be clear)
123 into a stopWithoutDestroyingMediaPlayer() function that both stop() and suspend() can call.
125 Before this change, suspend() would call stop() when moving into the page cache, killing the
126 internal MediaPlayer object which caused the video to disappear from the page.
128 Test: LayoutTests/media/restore-from-page-cache.html (amended)
130 * html/HTMLMediaElement.cpp:
131 (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
132 (WebCore::HTMLMediaElement::stop):
133 (WebCore::HTMLMediaElement::suspend):
134 * html/HTMLMediaElement.h:
136 2015-07-08 Matthew Daiter <mdaiter@apple.com>
138 Make MediaStream conform to its private client like MediaSource does
139 https://bugs.webkit.org/show_bug.cgi?id=146756
140 <rdar://problem/21736457>
142 Reviewed by Brent Fulgham.
144 MediaStream should be inheriting its PrivateClient's getters and
145 setters for RefCounted, not inheriting its own.
147 * Modules/mediastream/MediaStream.h: Changed MediaStream's inherit
149 * platform/mediastream/MediaStreamPrivate.h: Changed
150 MediaStreamPrivateClient to inherit RefCounted<MediaStreamPrivateClient>
152 2015-07-08 Matthew Daiter <mdaiter@apple.com>
154 Made AVMediaCaptureSource's session accessor public
155 https://bugs.webkit.org/show_bug.cgi?id=146758
156 <rdar://problem/21736651>
158 Reviewed by Brent Fulgham.
160 * platform/mediastream/mac/AVMediaCaptureSource.h:
161 (WebCore::AVMediaCaptureSource::session): Changed to public
163 2015-07-08 Matthew Daiter <mdaiter@apple.com>
165 Make sure MediaStream engine loaded for interpreting MediaStreams
166 https://bugs.webkit.org/show_bug.cgi?id=146748
167 <rdar://problem/21735416>
169 Reviewed by Brent Fulgham.
171 Prevent the MediaSource engine from being used to process
172 MediaStreams, since they are not compatible
174 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
175 (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
176 Changed MediaStream to never be loaded
177 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
178 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
179 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
180 Changed MediaStream to never be loaded
183 2015-07-08 Benjamin Poulain <bpoulain@apple.com>
185 [Content Extensions] Fuse undistinguishable actions as much as possible
186 https://bugs.webkit.org/show_bug.cgi?id=146762
188 Reviewed by Alex Christensen.
190 Our previous code that fused actions was based on test lists that were
191 grouping similar actions in the input.
193 The input we get from developers is more distributed. It is very common to
194 have trigger flags all over the place, and "css-display-none" mixed with "block".
196 This patch refines the merging code to merge those cases as much as possible.
198 The size taken by the actions is negligible, but having different actions make
199 nodes unkillable by the Minimizer. By merging many more actions, the minimizer
200 no longer see those subtrees as distinguishable and can do a better job.
202 On a large test list, this cuts the bytecode size by 2 megabytes.
204 Tests: http/tests/contentextensions/css-display-none-after-ignore-previous-rules.html
205 http/tests/contentextensions/single-css-display-none.html
207 * contentextensions/ContentExtensionCompiler.cpp:
208 (WebCore::ContentExtensions::resolvePendingDisplayNoneActions):
209 (WebCore::ContentExtensions::serializeActions):
211 2015-07-08 Matthew Daiter <mdaiter@apple.com>
213 Cleared contentMIMETypes for MediaStreams
214 https://bugs.webkit.org/show_bug.cgi?id=146750
215 <rdar://problem/21735678>
217 Reviewed by Brent Fulgham.
219 * platform/graphics/MediaPlayer.cpp:
220 (WebCore::MediaPlayer::load): Needed to clear contentMIMETypes
222 2015-07-08 Dean Jackson <dino@apple.com>
224 Audio elements with controls force their enclosing stacking context to composite
225 https://bugs.webkit.org/show_bug.cgi?id=146751
226 <rdar://problem/21466572>
228 Reviewed by Simon Fraser.
230 There were a number of issues with audio controls, on both iOS and OS X.
232 - they used a blurry background which was not the intended design
233 - they cause the page to composite, which causes a degradation in
234 text rendering quality
235 - they inserted 20px of padding above every audio element, which
236 could break existing page designs.
238 Removing the need for compositing and blending means that the
239 colors used for control tints need to be adjusted for the non-blended
240 case. Wherever I could, I kept as much as possible in a shared
241 rule and made specific changes for audio or video.
243 The controls were also unintentionally relying on the compositing
244 to create stacking contexts and control the rendering order. Without
245 them, I needed to add some explicit stacking.
247 I also made some drive-by whitespace clean-ups.
249 * Modules/mediacontrols/mediaControlsApple.css: Remove as much compositing
250 as possible in audio controls.
252 * Modules/mediacontrols/mediaControlsApple.js:
253 (Controller.prototype.drawTimelineBackground): Use specific colors for audio.
255 * Modules/mediacontrols/mediaControlsiOS.css: Remove as much need for compositing
258 2015-07-08 Said Abou-Hallawa <sabouhallawa@apple.com>
260 Crash when appending an SVG <use> element dynamically which has animated SVG <path> element
261 https://bugs.webkit.org/show_bug.cgi?id=146690
262 <rdar://problem/20790376>
264 Reviewed by Dean Jackson.
266 Test: svg/animations/insert-animate-use-path-while-animation.svg
268 The crashing call stack shows that
269 SVGAnimatedListPropertyTearOff<SVGPathSegList>::m_animVal is null when
270 trying to access it in synchronizeWrappersIfNeeded(). This happens because
271 animationStarted() was not called for this animatedType.
273 SVGAnimateElementBase::resetAnimatedType() calls
274 SVGAnimatedPathAnimator::startAnimValAnimation() at the beginning of the
275 animation. For the target element and all its instances, this function calls
276 SVGAnimatedPathSegListPropertyTearOff::animationStarted() which calls
277 SVGAnimatedListPropertyTearOff<SVGPathSegList>::animationStarted(). This
278 last function allocates the member m_animVal when calling
279 SVGAnimatedListPropertyTearOff<SVGPathSegList>::animVal().
281 When adding a new instance of the same animating target element,
282 SVGAnimateElementBase::resetAnimatedType() just keeps calling
283 SVGAnimatedPathAnimator::animValDidChange() for all the instances of the
284 targetElement without ensuring that all of them have started their
287 The fix is to make SVGAnimatedPathAnimator::resetAnimValToBaseVal() ensure
288 that animationStarted() is called for the targetElement and all its instances.
290 * svg/SVGAnimatedPath.cpp:
291 (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Move resetting
292 the animation value and starting the animatedTypes code to a new overriding
293 function which is named resetAnimValToBaseVal().
295 (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal): Call the overriding
296 function which calls buildSVGPathByteStreamFromSVGPathSegList() as before
297 and ensure that all the animatedTypes have started their animations.
299 * svg/SVGAnimatedPath.h:
301 2015-07-08 Brady Eidson <beidson@apple.com>
303 Move PingLoaders to the NetworkingProcess.
304 <rdar://problem/18860263> and https://bugs.webkit.org/show_bug.cgi?id=146710
306 Reviewed by Tim Horton.
309 There's no current solution for communicating back to a page that a ping load has reached its target.
310 Until we have such a solution, any attempt at a layout test will be fragile at best.
312 * WebCore.xcodeproj/project.pbxproj:
314 * loader/LoaderStrategy.cpp:
315 (WebCore::LoaderStrategy::createPingHandle): Default implementation is create the PingHandle directly.
316 * loader/LoaderStrategy.h:
318 PingLoader becomes a static class for now that crafts the ResourceRequest then passes it off
319 to the LoaderStrategy:
320 * loader/PingLoader.cpp:
321 (WebCore::PingLoader::loadImage):
322 (WebCore::PingLoader::sendPing):
323 (WebCore::PingLoader::sendViolationReport):
324 (WebCore::PingLoader::startPingLoad):
325 (WebCore::PingLoader::createPingLoader): Deleted.
326 (WebCore::PingLoader::PingLoader): Deleted.
327 (WebCore::PingLoader::~PingLoader): Deleted.
328 * loader/PingLoader.h:
329 (WebCore::PingLoader::timeoutTimerFired): Deleted.
331 PingHandle does what PingLoader used to - It's a basic ResourceHandleClient that simply waits
332 for any response/completion/failure and then deletes itself.
333 * platform/network/PingHandle.h: Added.
334 (WebCore::PingHandle::PingHandle):
335 (WebCore::PingHandle::usesAsyncCallbacks):
336 (WebCore::PingHandle::timeoutTimerFired):
337 (WebCore::PingHandle::~PingHandle):
339 2015-07-08 Csaba Osztrogonác <ossy@webkit.org>
341 Add new sources to StyleAllInOne.cpp
342 https://bugs.webkit.org/show_bug.cgi?id=146584
344 Reviewed by Brent Fulgham.
346 * WebCore.vcxproj/WebCore.vcxproj:
347 * rendering/style/StyleAllInOne.cpp:
349 2015-07-08 Csaba Osztrogonác <ossy@webkit.org>
351 Add new sources to DOMAllInOne.cpp
352 https://bugs.webkit.org/show_bug.cgi?id=146587
354 Reviewed by Brent Fulgham.
356 * WebCore.vcxproj/WebCore.vcxproj:
357 * dom/DOMAllInOne.cpp:
359 2015-07-08 Csaba Osztrogonác <ossy@webkit.org>
361 Add new sources to AccessibilityAllInOne.cpp
362 https://bugs.webkit.org/show_bug.cgi?id=146582
364 Reviewed by Brent Fulgham.
366 * WebCore.vcxproj/WebCore.vcxproj:
367 * accessibility/AccessibilityAllInOne.cpp:
369 2015-07-08 Eric Carlson <eric.carlson@apple.com>
371 [Mac] Two clicks required to enable AirPlay at youtube.com
372 https://bugs.webkit.org/show_bug.cgi?id=146733
373 <rdar://problem/21556356>
375 Reviewed by Brent Fulgham.
377 * Modules/mediasession/WebMediaSessionManager.cpp:
378 (WebCore::WebMediaSessionManager::clientStateDidChange): Only log when state has changed.
379 Don't steal the route if another client is actively playing to the device.
380 (WebCore::WebMediaSessionManager::setPlaybackTarget): Set m_targetChanged.
381 (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Don't consider the
382 requestedPicker flag until after a target change.
383 * Modules/mediasession/WebMediaSessionManager.h:
385 * html/HTMLMediaElement.cpp:
386 (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Add logging.
387 (WebCore::HTMLMediaElement::setShouldPlayToPlaybackTarget): Ditto.
389 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
390 (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Always log.
392 2015-07-08 Zalan Bujtas <zalan@apple.com>
394 Do not waste window server memory for placeholder windows initiated by ThemeMac.
395 https://bugs.webkit.org/show_bug.cgi?id=146730
396 rdar://problem/20321222
398 Using defer:YES prevents us from wasting any window server resources for WebCoreThemeWindow(s).
400 Patch by Darin Adler.
401 Reviewed by Zalan Bujtas.
405 * platform/mac/ThemeMac.mm:
406 (-[WebCoreThemeView window]):
408 2015-07-08 Xabier Rodriguez Calvar <calvaris@igalia.com>
410 [GTK] Deactivate GObject bindings for static methods
411 https://bugs.webkit.org/show_bug.cgi?id=146717
413 Reviewed by Carlos Garcia Campos.
415 Static methods are currently not supported by GObject bindings so we deactivate them from the generation.
417 Current tests suffice. Expectations updated.
419 * bindings/scripts/CodeGeneratorGObject.pm:
420 (SkipFunction): Skip isStatic functions.
421 * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
422 * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
423 (webkit_dom_test_interface_implements_method4): Deleted.
424 (webkit_dom_test_interface_supplemental_method4): Deleted.
425 * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
426 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
427 (webkit_dom_test_obj_class_method): Deleted.
428 (webkit_dom_test_obj_class_method_with_optional): Deleted.
429 (webkit_dom_test_obj_overloaded_method1): Deleted.
431 2015-07-07 Benjamin Poulain <bpoulain@apple.com>
433 Remove the overflow checks from the important vectors used by the content extensions machines
434 https://bugs.webkit.org/show_bug.cgi?id=146703
436 Reviewed by Andreas Kling.
438 Most of the overflow checks cannot be eliminated by clang. Removing them
439 explicitly removes 400 ms from the compile time of a very large test list.
441 * contentextensions/ContentExtensionsDebugging.h:
442 * contentextensions/DFA.h:
443 * contentextensions/DFACombiner.cpp:
444 * contentextensions/DFAMinimizer.cpp:
445 * contentextensions/ImmutableNFA.h:
446 * contentextensions/MutableRangeList.h:
447 * contentextensions/NFAToDFA.cpp:
448 (WebCore::ContentExtensions::epsilonClosureExcludingSelf):
449 (WebCore::ContentExtensions::resolveEpsilonClosures):
450 (WebCore::ContentExtensions::extendSetWithClosure):
451 (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::convert):
452 (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::extend):
453 (WebCore::ContentExtensions::createCombinedTransition):
454 (WebCore::ContentExtensions::getOrCreateDFANode):
455 (WebCore::ContentExtensions::NFAToDFA::convert):
457 2015-07-07 Dean Jackson <dino@apple.com>
459 [iOS] MediaControls: Start Play and Can't Play buttons need to be cutout and blurred
460 https://bugs.webkit.org/show_bug.cgi?id=146226
462 Reviewed by Simon Fraser.
464 This patch takes what Said Abou-Hallawa posted in an earlier revision and
465 makes a few tweaks to workaround the bugs he's listed.
467 Replicate the iOS System blur backdrop in pure CSS, so that the large
468 start button looks more correct. Also add artwork for a failure state.
470 * Modules/mediacontrols/mediaControlsiOS.css: New style rules for the start
471 button, which now is a collection of elements rather than a <button>.
472 (video::-webkit-media-controls-start-playback-button):
473 (video::-webkit-media-controls-start-playback-background):
474 (video::-webkit-media-controls-start-playback-tint):
476 * Modules/mediacontrols/mediaControlsiOS.js:
477 (ControllerIOS.prototype.createBase): Replace the <button> with the hierarchy of
478 elements to replicate the blur. Give some of them a class attribute, so they
479 can match selectors (see the bugs Said filed in the original bugzilla).
480 (ControllerIOS.prototype.handleStartPlaybackButtonTouchStart): Toggle classes on
481 the hierarchy as needed.
482 (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Ditto.
483 (ControllerIOS.prototype.updateStatusDisplay): Ditto.
485 2015-07-07 Zalan Bujtas <zalan@apple.com>
487 Crash when parent iframe is set to display none and the child frame is mutated the same time.
488 https://bugs.webkit.org/show_bug.cgi?id=146699
489 rdar://problem/16207881
491 Reviewed by Andreas Kling.
493 When the parent iframe is set to display: none, we destroy the associated renderer (RenderIFrame).
494 However if the child frame is mutated the same time, during layout we try to access this RenderIFrame
495 to check whether it needs frame flattening.
496 This patch checks whether the parent render widget is still valid.
498 Test: fast/frames/crash-display-none-iframe-during-onbeforeload.html
500 * page/FrameView.cpp:
501 (WebCore::FrameView::isInChildFrameWithFrameFlattening): rearrange early returns.
503 2015-07-06 Matt Rajca <mrajca@apple.com>
505 Media Session: remove seek forward/backward attributes
506 https://bugs.webkit.org/show_bug.cgi?id=146645
508 Reviewed by Eric Carlson.
510 * Modules/mediasession/MediaRemoteControls.h:
511 * Modules/mediasession/MediaRemoteControls.idl:
513 2015-07-07 Brent Fulgham <bfulgham@apple.com>
515 REGRESSION (r183133-r183138): Secondary clicking in whitespace selects preceding word
516 https://bugs.webkit.org/show_bug.cgi?id=146695
517 <rdar://problem/21441466>
519 Reviewed by Tim Horton.
521 When we would currently use dictionary lookup to decide on our text selection, first check if we
522 are targeting an editable field. If we are, use the original selection behavior. Otherwise, use
523 the new "dictionary lookup" selection.
525 * page/EventHandler.cpp:
526 (WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent): Only use dictionary lookup
527 when our target node is not editable.
530 2015-07-07 Brady Eidson <beidson@apple.com>
532 Another attempt to fix CURL/Soup builds after r186476
536 * platform/network/curl/SocketStreamHandle.h:
538 * platform/network/soup/SocketStreamHandle.h:
540 2015-07-07 Brady Eidson <beidson@apple.com>
542 Attempt to fix CURL/Soup builds after r186476
546 * platform/network/curl/SocketStreamHandle.h:
547 (WebCore::SocketStreamHandle::create):
549 * platform/network/soup/SocketStreamHandle.h:
550 (WebCore::SocketStreamHandle::create):
552 2015-07-07 Brady Eidson <beidson@apple.com>
554 HTTP Auth cached after disabling private browsing/reset.
555 <rdar://problem/8293055> and https://bugs.webkit.org/show_bug.cgi?id=146654
557 Reviewed by Tim Horton.
559 Test: http/tests/security/private-browsing-http-auth.html
561 - Change most static CredentialStorage methods to be instance methods instead.
562 - Make a CredentialStorage objects be per-NetworkStorageSession.
564 * Modules/websockets/WebSocketChannel.cpp:
565 (WebCore::WebSocketChannel::WebSocketChannel):
566 (WebCore::WebSocketChannel::connect): Only start the web socket load if a networking
567 context is available.
569 * platform/network/CredentialStorage.cpp:
570 (WebCore::CredentialStorage::defaultCredentialStorage): Returns the credential storage
571 from the default NetworkStorageSession.
572 (WebCore::CredentialStorage::set):
573 (WebCore::CredentialStorage::get):
574 (WebCore::CredentialStorage::remove):
575 (WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
576 (WebCore::CredentialStorage::clearCredentials):
577 (WebCore::protectionSpaceToCredentialMap): Deleted.
578 (WebCore::originsWithCredentials): Deleted.
579 (WebCore::pathToDefaultProtectionSpaceMap): Deleted.
580 (WebCore::findDefaultProtectionSpaceForURL): Deleted.
581 (WebCore::CredentialStorage::setPrivateMode): Deleted. Was a no-op anyways.
582 * platform/network/CredentialStorage.h:
584 * platform/network/NetworkStorageSession.h:
585 (WebCore::NetworkStorageSession::credentialStorage):
587 * platform/network/cf/ResourceHandleCFNet.cpp:
588 (WebCore::ResourceHandle::createCFURLConnection):
589 (WebCore::ResourceHandle::willSendRequest):
590 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
591 (WebCore::ResourceHandle::receivedCredential):
593 * platform/network/cf/SocketStreamHandle.h:
594 (WebCore::SocketStreamHandle::create):
595 * platform/network/cf/SocketStreamHandleCFNet.cpp:
596 (WebCore::SocketStreamHandle::SocketStreamHandle):
597 (WebCore::SocketStreamHandle::getStoredCONNECTProxyCredentials):
598 (WebCore::getStoredCONNECTProxyCredentials): Deleted.
600 * platform/network/curl/ResourceHandleCurl.cpp:
601 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
602 (WebCore::ResourceHandle::receivedCredential):
603 * platform/network/curl/ResourceHandleManager.cpp:
604 (WebCore::ResourceHandleManager::applyAuthenticationToRequest):
606 * platform/network/mac/ResourceHandleMac.mm:
607 (WebCore::ResourceHandle::createNSURLConnection):
608 (WebCore::ResourceHandle::willSendRequest):
609 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
610 (WebCore::ResourceHandle::receivedCredential):
612 * platform/network/soup/ResourceHandleSoup.cpp:
613 (WebCore::applyAuthenticationToRequest):
614 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
615 (WebCore::ResourceHandle::receivedCredential):
617 2015-07-07 Zalan Bujtas <zalan@apple.com>
619 REGRESSION(169105): CSS Regions: renderer returns wrong selection root when it is inside a column flow.
620 https://bugs.webkit.org/show_bug.cgi?id=146529
621 rdar://problem/21613670
623 Reviewed by Mihnea Ovidenie and David Kilzer.
625 This patch ensures that RenderObject::selectionRoot() handles column flows properly while searching for the associated
627 When the renderer is inside a column flow and the column flow is part of a named flow, we stop
628 traversing the ancestor chain, searching for the selection root, when we reach the column flow.
629 Since the column flow is not a selection root, we mistakenly fall back to the RenderView as selection root.
630 Instead, we should check if the column is inside a named flow and return the selection root accordingly.
631 Returning the wrong selection root confuses RenderView::splitSelectionBetweenSubtrees() logic and this particular
632 RenderObject could end up in multiple selection trees.
634 Test: fast/regions/selection/crash-when-element-is-inside-column-and-the-containing-block-is-inside-flow.html
636 * rendering/RenderObject.cpp:
637 (WebCore::RenderObject::selectionRoot):
639 2015-07-07 Brent Fulgham <bfulgham@apple.com>
641 [Mac] REGRESSION (r184794): Play/Pause control doesn't update state in full screen
642 https://bugs.webkit.org/show_bug.cgi?id=146689
643 <rdar://problem/21393490>
645 Reviewed by Dean Jackson.
647 The changes in r184794 did not take full screen mode into account. This needed to be corrected.
649 * Modules/mediacontrols/mediaControlsApple.js:
650 (Controller.prototype.handlePanelTransitionEnd):
651 (Controller.prototype.setPlaying):
652 (Controller.prototype.showControls):
654 2015-07-07 Wenson Hsieh <whsieh@berkeley.edu>
656 Snap point regions containing X and Y snap points should do a better job animating
657 https://bugs.webkit.org/show_bug.cgi?id=142523
658 <rdar://problem/20100753>
660 Reviewed by Brent Fulgham.
662 Reimplemented snap point animations to use a single timer for both horizontal and
663 vertical axes to better support 2D snap scrolling. Instead of making velocity
664 dependent on progress to the snap point and handling 2D snapping with different
665 timer update functions, this implementation uses a fixed animation time to coordinate
666 the snapping animation across both axes.
668 Test: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html
670 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Refactored to use a single scroll snap timer.
671 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: See above.
672 (WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): See above.
673 (WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): See above.
674 * platform/cocoa/ScrollController.h: Refactored to use a single scroll snap timer and update function to handle
675 snapping in both axes. This entails removing the ScrollEventAxis parameter from various functions below. Also
676 removed methods that computed "snap" and "glide" offsets.
677 (WebCore::ScrollControllerClient::startScrollSnapTimer): See above.
678 (WebCore::ScrollControllerClient::stopScrollSnapTimer): See above.
679 * platform/cocoa/ScrollController.mm: See above.
680 (WebCore::ScrollController::ScrollController): Added new constants used to compute animation offsets.
681 (WebCore::ScrollController::snapRubberBandTimerFired): Added a check to prevent the rubber band timer from firing
682 alongside the scroll snap timer. This results in scroll snapping taking precedence over rubber banding when
683 scrolling against the edge of a container in the case of 2D scrolling. We didn't run into this issue before
684 because snapping wasn't working properly at the edges of a 2D scrolling container. In the future, we may want
685 to unify both snap scrolling and rubber banding timers to solve this issue.
686 (WebCore::ScrollController::isScrollSnapInProgress): Refactored to use a single scroll snap timer.
687 (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Fixed an issue where wheel deltas were being pushed
688 to the snap state incorrectly.
689 (WebCore::ScrollController::processWheelEventForScrollSnap): Fixed an issue with 2D snapping where scrolling in 2 axes
690 simultaneously would cause the vertical axis to override the horizontal axis. This is more like a sub-issue of fixing
691 2D scrolling, and is required for 2D snap animations to work properly.
692 (WebCore::ScrollController::startScrollSnapTimer): Refactored to use a single scroll snap timer.
693 (WebCore::ScrollController::stopScrollSnapTimer): See above.
694 (WebCore::ScrollController::scrollSnapTimerFired): This new method handles snap scroll updates on both axes.
695 (WebCore::ScrollController::beginScrollSnapAnimation): Refactored to account for single scroll snap timer.
696 (WebCore::ScrollController::endScrollSnapAnimation): See above.
697 (WebCore::ScrollController::initializeScrollSnapAnimationParameters): New method that initializes parameters used to
698 coordinate the animation state across horizontal and vertical axes.
699 (WebCore::ScrollController::isSnappingOnAxis): Checks whether or not a given axis is currently scroll snapping. This will
700 return true in the case of active 2D scroll snapping.
701 (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Deleted.
702 (WebCore::ScrollController::horizontalScrollSnapTimerFired): Deleted.
703 (WebCore::ScrollController::verticalScrollSnapTimerFired): Deleted.
704 (WebCore::ScrollController::scrollSnapAnimationUpdate): Deleted.
705 (WebCore::ScrollController::initializeGlideParameters): Deleted.
706 (WebCore::snapProgress): Deleted.
707 (WebCore::clampedSnapMagnitude): Deleted.
708 (WebCore::ScrollController::computeSnapDelta): Deleted.
709 (WebCore::snapGlide): Deleted.
710 (WebCore::ScrollController::computeGlideDelta): Deleted.
711 * platform/cocoa/ScrollSnapAnimatorState.h: Added a new datastructure, ScrollSnapAnimationCurveState, which tracks
712 the scroll snap animation state across both axes.
713 * platform/cocoa/ScrollSnapAnimatorState.mm: Removed fields relevant to the former "gliding" model and renamed the
714 initial wheel delta variable to reflect this.
715 (WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta): Fixed an issue where wheel deltas were being pushed
716 to the snap state incorrectly.
717 (WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow): Tiny for loop incrementor style fix.
718 (WebCore::ScrollSnapAnimatorState::isSnapping): Checks whether this state is in either snapping or gliding mode.
719 (WebCore::ScrollSnapAnimatorState::canReachTargetWithCurrentInitialScrollDelta): Checks whether the scroll velocity is
720 consistent with the initial and target offsets.
721 (WebCore::ScrollSnapAnimatorState::interpolatedOffsetAtProgress): Interpolates the offset for a given progress value.
722 (WebCore::ScrollSnapAnimationCurveState::ScrollSnapAnimationCurveState): New constants.
723 (WebCore::ScrollSnapAnimationCurveState::initializeSnapProgressCurve): Abstracts out part of the initialization process.
724 (WebCore::ScrollSnapAnimationCurveState::initializeInterpolationCoefficientsIfNecessary): Abstracts out part of the
725 initialization process.
726 (WebCore::ScrollSnapAnimationCurveState::interpolatedPositionAtProgress): Abstracts out curve interpolation.
727 (WebCore::ScrollSnapAnimationCurveState::shouldCompleteSnapAnimationImmediatelyAtTime): Added.
728 (WebCore::ScrollSnapAnimationCurveState::animationProgressAtTime): Added.
730 2015-07-07 Chris Dumez <cdumez@apple.com>
732 Unreviewed, attempt to fix iOS build.
734 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
735 (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
737 2015-07-07 Andreas Kling <akling@apple.com>
739 REGRESSION(r183706): HTMLImageElement sometimes fails to register as document named item.
740 <https://webkit.org/b/146679>
741 <rdar://problem/21613839>
743 Reviewed by Antti Koivisto.
745 After r183706, Element::hasName() no longer returns outdated information when called
746 inside a parseAttribute() override. HTMLImageElement was relying on this to check
747 if it *used* to have a name attribute before the currently parsing one was set.
749 Since parseAttribute() only shows subclasses the new attribute value, I'm adding a
750 flag to HTMLImageElement that remembers whether we had a name attribute or not.
752 Test: fast/dom/HTMLImageElement/remove-img-with-name-from-document-crash.html
754 * html/HTMLImageElement.cpp:
755 (WebCore::HTMLImageElement::parseAttribute):
756 * html/HTMLImageElement.h:
758 2015-07-07 Youenn Fablet <youenn.fablet@crf.canon.fr>
760 [Streams API] Remove ReadableStreamReader.read() custom binding
761 https://bugs.webkit.org/show_bug.cgi?id=146643
763 Reviewed by Darin Adler.
765 Moved ReadableStreamReader.read handling from callbacks to promises.
766 Introduced DOMPromiseIteratorWithCallback for that purpose: it takes resolve() to resolve a promise with a not-ending iterator value,
767 resolveEnd() to resolve a promise with a terminating iterator value and reject().
768 Added template helper routine to convert typed values to JS iterator wrapping the value.
769 Removed ReadableStreamReader.read custom binding.
771 Covered by rebased tests.
773 * Modules/streams/ReadableStream.cpp: Updated code to use DOMPromiseIteratorWithCallback API.
774 (WebCore::ReadableStream::releaseReader):
775 (WebCore::ReadableStream::changeStateToErrored):
776 (WebCore::ReadableStream::read):
777 (WebCore::ReadableStream::resolveReadCallback):
778 * Modules/streams/ReadableStream.h:
779 * Modules/streams/ReadableStreamReader.cpp:
780 (WebCore::ReadableStreamReader::read):
781 * Modules/streams/ReadableStreamReader.h:
782 * Modules/streams/ReadableStreamReader.idl: Removed custom binding.
783 * bindings/js/JSDOMBinding.h:
784 (WebCore::toJSIterator): create JS iterator from typed value.
785 (WebCore::toJSIteratorEnd): create JS end iterator.
786 * bindings/js/JSDOMPromise.cpp:
787 (WebCore::DeferredWrapper::globalObject): Added globaObject getter and removed promise getter.
788 * bindings/js/JSDOMPromise.h:
789 (WebCore::DOMPromiseIteratorWithCallback::DOMPromiseIteratorWithCallback):
790 (WebCore::Error>::resolve):
791 (WebCore::Error>::resolveEnd):
792 (WebCore::Error>::reject):
793 * bindings/js/JSReadableStreamReaderCustom.cpp: Removed custom binding.
795 2015-07-06 Zalan Bujtas <zalan@apple.com>
797 REGRESSION: Slider thumb does not render properly (image tests with <input type="range">)
798 https://bugs.webkit.org/show_bug.cgi?id=146669
799 rdar://problem/21677831
801 Reviewed by Simon Fraser.
803 Draw NSSliderCell's knob only when slider's thumb paint is requested.
805 Covered by existing tests.
807 * rendering/RenderThemeMac.mm:
808 (WebCore::RenderThemeMac::paintSliderThumb):
810 2015-07-06 Csaba Osztrogonác <ossy@webkit.org>
812 Move shouldIgnoreAttributeCase inline function to Element.h
813 https://bugs.webkit.org/show_bug.cgi?id=146588
815 Reviewed by Andreas Kling.
818 (WebCore::shouldIgnoreAttributeCase): Deleted.
820 (WebCore::shouldIgnoreAttributeCase):
821 * dom/NamedNodeMap.cpp:
822 (WebCore::shouldIgnoreAttributeCase): Deleted.
824 2015-07-06 Brent Fulgham <bfulgham@apple.com>
826 Ensure media playback is stopped during page close
827 https://bugs.webkit.org/show_bug.cgi?id=146554
828 <rdar://problem/18033944>
830 Reviewed by Brady Eidson.
832 * Modules/webaudio/AudioContext.cpp:
833 (WebCore::WebAudio::hostingDocument): Added.
834 * Modules/webaudio/AudioContext.h:
835 * html/HTMLMediaElement.h:
836 (WebCore::HTMLMediaElement::hostingDocument): Added.
838 (WebCore::Document::~Document): Call new 'stopAllMediaPlaybackForDocument' at destruction time.
839 * platform/audio/PlatformMediaSession.h:
840 Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
841 Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
842 * platform/audio/PlatformMediaSessionManager.cpp:
843 (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
844 playback on elements that match the provided document.
845 (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess): Added. Pauses playback
846 on all elements in the current process.
847 * platform/audio/PlatformMediaSessionManager.h:
849 2015-07-06 Daniel Bates <dabates@apple.com>
851 Isolated worlds should respect Content Security Policy; User Agent Shadow DOM
852 should be exempt from Content Security Policy
853 https://bugs.webkit.org/show_bug.cgi?id=144830
854 <rdar://problem/18860261>
856 Inadvertently omitted argument overrideContentSecurityPolicy in calls to ContentSecurityPolicy::allowEval()
857 that explicitly specified a report status. And the report status, which is an enum, was being implicitly
860 * bindings/js/ScriptController.cpp:
861 (WebCore::ScriptController::initScript):
862 * page/DOMSecurityPolicy.cpp:
863 (WebCore::DOMSecurityPolicy::allowsEval):
865 2015-07-06 Commit Queue <commit-queue@webkit.org>
867 Unreviewed, rolling out r186385.
868 https://bugs.webkit.org/show_bug.cgi?id=146668
870 crashes 3 webaudio tests in debug builds (Requested by
871 alexchristensen on #webkit).
875 "Ensure media playback is stopped during page close"
876 https://bugs.webkit.org/show_bug.cgi?id=146554
877 http://trac.webkit.org/changeset/186385
879 2015-07-06 Andreas Kling <akling@apple.com>
881 Crash when setting text direction via MakeTextWritingDirection* editing commands.
882 <https://webkit.org/b/146665>
883 <rdar://problem/20835477>
885 Reviewed by Ryosuke Niwa.
887 Fix two buggy clients of enclosingBlock(node) that would fail if the returned
888 element is the same as the node passed in.
890 Test: editing/style/change-text-direction-crash.html
892 * editing/ApplyStyleCommand.cpp:
893 (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
894 (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
896 2015-07-06 Simon Fraser <simon.fraser@apple.com>
898 Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494)
899 https://bugs.webkit.org/show_bug.cgi?id=146653
901 Reviewed by Dean Jackson.
903 Fixes rdar://problem/21435233.
905 r177494 caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
906 was not being maintained, so revert it.
908 This patch reverts r176798.
911 * WebCore.vcxproj/WebCore.vcxproj:
912 * WebCore.vcxproj/WebCore.vcxproj.filters:
913 * WebCore.xcodeproj/project.pbxproj:
915 (WebCore::CSSValue::cssText): Deleted.
916 (WebCore::CSSValue::destroy): Deleted.
918 (WebCore::CSSValue::isWebKitCSSResourceValue): Deleted.
919 * css/StyleBuilderConverter.h:
920 (WebCore::maskImageValueFromIterator): Deleted.
921 * css/StyleResolver.cpp:
922 (WebCore::StyleResolver::State::clear): Deleted.
923 * css/StyleResolver.h:
924 (WebCore::StyleResolver::State::maskImagesWithPendingSVGDocuments): Deleted.
925 * css/WebKitCSSResourceValue.cpp: Removed.
926 * css/WebKitCSSResourceValue.h: Removed.
927 * loader/cache/CachedResourceLoader.cpp:
928 (WebCore::CachedResourceLoader::addCachedResource): Deleted.
929 * loader/cache/CachedResourceLoader.h:
930 * loader/cache/CachedSVGDocument.cpp:
931 (WebCore::CachedSVGDocument::finishLoading):
932 (WebCore::CachedSVGDocument::CachedSVGDocument): Deleted.
933 * loader/cache/CachedSVGDocument.h:
934 * loader/cache/CachedSVGDocumentReference.cpp:
935 (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
936 (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
937 (WebCore::CachedSVGDocumentReference::load):
938 * loader/cache/CachedSVGDocumentReference.h:
939 * page/FrameView.cpp:
940 (WebCore::FrameView::containsSVGDocument): Deleted.
943 (WebCore::Page::createPageFromBuffer): Deleted.
945 * platform/ScrollView.h:
946 (WebCore::ScrollView::containsSVGDocument): Deleted.
947 * platform/graphics/MaskImageOperation.cpp: Removed.
948 * platform/graphics/MaskImageOperation.h: Removed.
949 * rendering/RenderLayer.cpp:
950 (WebCore::RenderLayer::RenderLayer): Deleted.
951 * rendering/RenderLayer.h:
952 * rendering/RenderLayerFilterInfo.cpp:
953 * rendering/RenderLayerFilterInfo.h:
954 * rendering/RenderLayerMaskImageInfo.h: Removed.
955 * rendering/style/FillLayer.cpp:
956 (WebCore::FillLayer::operator==):
957 (WebCore::FillLayer::cullEmptyLayers):
958 (WebCore::layerImagesIdentical):
959 (WebCore::FillLayer::FillLayer): Deleted.
960 (WebCore::FillLayer::operator=): Deleted.
961 (WebCore::FillLayer::hasNonEmptyMaskImage): Deleted.
962 (WebCore::FillLayer::imagesAreLoaded): Deleted.
963 * rendering/style/FillLayer.h:
964 (WebCore::FillLayer::maskImage): Deleted.
965 (WebCore::FillLayer::imageOrMaskImage): Deleted.
966 (WebCore::FillLayer::setMaskImage): Deleted.
967 (WebCore::FillLayer::clearMaskImage): Deleted.
968 (WebCore::FillLayer::hasMaskImage): Deleted.
969 * rendering/svg/RenderSVGResourceMasker.cpp:
970 (WebCore::RenderSVGResourceMasker::applyResource):
971 (WebCore::RenderSVGResourceMasker::applySVGMask): Deleted.
972 (WebCore::RenderSVGResourceMasker::drawMaskForRenderer): Deleted.
973 * rendering/svg/RenderSVGResourceMasker.h:
974 * svg/SVGMaskElement.cpp:
975 (WebCore::SVGMaskElement::createElementRenderer):
976 (WebCore::SVGMaskElement::addClientRenderLayer): Deleted.
977 (WebCore::SVGMaskElement::removeClientRenderLayer): Deleted.
978 * svg/SVGMaskElement.h:
979 * svg/SVGUseElement.cpp:
980 (WebCore::SVGUseElement::updateExternalDocument):
981 * svg/graphics/SVGImage.cpp:
982 (WebCore::SVGImage::dataChanged):
984 2015-07-06 Simon Fraser <simon.fraser@apple.com>
986 Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
987 https://bugs.webkit.org/show_bug.cgi?id=146653
989 Reviewed by Dean Jackson.
991 Fixes rdar://problem/21435233.
993 r177494 caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
994 was not being maintained, so revert it.
996 This patch reverts r177494.
998 * WebCore.xcodeproj/project.pbxproj:
999 * css/CSSComputedStyleDeclaration.cpp:
1000 (WebCore::ComputedStyleExtractor::propertyValue):
1001 * css/CSSParser.cpp:
1002 (WebCore::CSSParser::parseFillProperty):
1003 (WebCore::CSSParser::parseMaskImage): Deleted.
1005 * css/CSSPropertyNames.in:
1007 * css/StyleBuilderConverter.h:
1008 (WebCore::StyleBuilderConverter::convertMaskImageOperations): Deleted.
1009 * css/StyleResolver.cpp:
1010 (WebCore::StyleResolver::loadPendingSVGDocuments):
1011 (WebCore::StyleResolver::loadPendingImages):
1012 (WebCore::StyleResolver::adjustStyleForMaskImages): Deleted.
1013 (WebCore::StyleResolver::applyMatchedProperties): Deleted.
1014 * css/StyleResolver.h:
1015 * page/FrameView.cpp:
1016 (WebCore::FrameView::containsSVGDocument):
1018 * page/animation/CSSPropertyAnimation.cpp:
1019 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
1020 (WebCore::blendFunc): Deleted.
1021 (WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper): Deleted.
1022 (WebCore::MaskImagePropertyWrapper::equals): Deleted.
1023 * platform/ScrollView.h:
1024 (WebCore::ScrollView::containsSVGDocument):
1025 * platform/graphics/MaskImageOperation.cpp:
1026 (WebCore::MaskImageOperation::~MaskImageOperation): Deleted.
1027 (WebCore::MaskImageOperation::operator==): Deleted.
1028 * platform/graphics/MaskImageOperation.h:
1029 * rendering/RenderBox.cpp:
1030 (WebCore::RenderBox::maskClipRect):
1031 * rendering/RenderBoxModelObject.cpp:
1032 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1033 * rendering/RenderElement.cpp:
1034 (WebCore::RenderElement::updateFillImages):
1035 (WebCore::RenderElement::~RenderElement): Deleted.
1036 * rendering/RenderLayer.cpp:
1037 (WebCore::RenderLayer::~RenderLayer): Deleted.
1038 (WebCore::RenderLayer::calculateClipRects): Deleted.
1039 * rendering/RenderLayer.h:
1040 * rendering/RenderLayerMaskImageInfo.cpp: Removed.
1041 * rendering/style/FillLayer.h:
1042 (WebCore::FillLayer::image):
1043 (WebCore::FillLayer::imageOrMaskImage):
1044 * rendering/style/RenderStyle.cpp:
1045 (WebCore::RenderStyle::setMaskImage): Deleted.
1046 * rendering/style/RenderStyle.h:
1048 2015-07-06 Simon Fraser <simon.fraser@apple.com>
1050 Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
1051 https://bugs.webkit.org/show_bug.cgi?id=146653
1053 Fixes rdar://problem/21435233.
1055 This patch reverts r186180, but keeps the layout test.
1057 This feature caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
1058 was not being maintained, so revert it.
1060 * loader/cache/CachedResourceLoader.cpp:
1061 (WebCore::CachedResourceLoader::requestResource): Deleted.
1062 * loader/cache/CachedResourceRequest.h:
1063 (WebCore::CachedResourceRequest::acceptOverride): Deleted.
1064 (WebCore::CachedResourceRequest::setAcceptOverride): Deleted.
1065 * loader/cache/CachedSVGDocumentReference.cpp:
1066 (WebCore::CachedSVGDocumentReference::load): Deleted.
1067 * loader/cache/CachedSVGDocumentReference.h:
1068 (WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType): Deleted.
1069 * platform/graphics/MaskImageOperation.cpp:
1070 (WebCore::MaskImageOperation::ensureCachedSVGDocumentReference):
1071 (WebCore::MaskImageOperation::notifyFinished):
1073 2015-07-06 Daniel Bates <dabates@apple.com>
1075 Fix the Windows build following <https://trac.webkit.org/changeset/186388>
1076 (https://bugs.webkit.org/show_bug.cgi?id=144830)
1078 As we for for Mac in WebCoreAVFResourceLoader::startLoading(), instantiate ResourceLoaderOptions
1079 with ContentSecurityPolicyImposition::DoPolicyCheck.
1081 * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
1082 (WebCore::WebCoreAVCFResourceLoader::startLoading):
1084 2015-07-06 Daniel Bates <dabates@apple.com>
1086 Isolated worlds should respect Content Security Policy; User Agent Shadow DOM
1087 should be exempt from Content Security Policy
1088 https://bugs.webkit.org/show_bug.cgi?id=144830
1089 <rdar://problem/18860261>
1091 Reviewed by Geoffrey Garen.
1093 Make scripts that run in an isolated world be subject to the Content Security Policy (CSP) of the page
1094 and exempt features implemented using a user agent shadow DOM. As a side effect of this change,
1095 Safari Content Extensions will respect the CSP policy of the page when loading subresources (e.g. an image).
1097 Tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
1098 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-background.html
1099 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-cursor.html
1100 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-filter-on-image.html
1101 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-webkit-image-set.html
1102 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-embed-plugin.html
1103 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-external-script.html
1104 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-iframe.html
1105 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-after-redirect.html
1106 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image.html
1107 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-script.html
1108 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-style.html
1109 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-stylesheet.html
1110 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-plugin.html
1111 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object.html
1112 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-feimage-element.html
1113 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-font.html
1114 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-use-element.html
1115 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-track.html
1116 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
1117 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/block-loading-user-agent-image-from-non-user-agent-content.html
1118 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html
1119 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html
1120 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html
1121 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked3.html
1122 http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html
1123 http/tests/security/isolatedWorld/image-load-should-not-bypass-main-world-csp.html
1125 * Modules/websockets/WebSocket.cpp:
1126 (WebCore::WebSocket::connect): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
1127 * css/CSSCanvasValue.h:
1128 (WebCore::CSSCanvasValue::loadSubimages): Modified to take argument ResourceLoaderOptions (unused).
1129 * css/CSSCrossfadeValue.cpp:
1130 (WebCore::CSSCrossfadeValue::fixedSize): Explicitly instantiate default ResourceLoaderOptions and pass
1131 pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
1132 the cross fade is applied to an element in a user agent shadow tree.
1133 (WebCore::CSSCrossfadeValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
1135 (WebCore::CSSCrossfadeValue::image): Explicitly instantiate default ResourceLoaderOptions and pass it
1136 when requesting a cached image. Added FIXME comment to skip Content Security Policy check when the cross
1137 fade is applied to an element in a user agent shadow tree.
1138 * css/CSSCrossfadeValue.h:
1139 * css/CSSCursorImageValue.cpp:
1140 (WebCore::CSSCursorImageValue::cachedImage): Take a ResourceLoaderOptions as an argument and passes it
1142 * css/CSSCursorImageValue.h:
1143 * css/CSSFilterImageValue.cpp:
1144 (WebCore::CSSFilterImageValue::fixedSize): Explicitly instantiate default ResourceLoaderOptions and pass
1145 pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
1146 the cross fade is applied to an element in a user agent shadow tree.
1147 (WebCore::CSSFilterImageValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
1149 (WebCore::CSSFilterImageValue::loadSubimages): Explicitly instantiate default ResourceLoaderOptions and pass
1150 pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
1151 the cross fade is applied to an element in a user agent shadow tree.
1152 (WebCore::CSSFilterImageValue::image):
1153 * css/CSSFilterImageValue.h:
1154 * css/CSSFontFaceSrcValue.cpp:
1155 (WebCore::CSSFontFaceSrcValue::cachedFont): Take a boolean, isInitiatingElementInUserAgentShadowTree,
1156 so as to determine the appropriate CSP imposition. In particular, we skip the CSP check when the initiating element
1157 (e.g. SVG font-face element) is in a user agent shadow tree.
1158 * css/CSSFontFaceSrcValue.h:
1159 * css/CSSFontSelector.cpp:
1160 (WebCore::CSSFontSelector::addFontFaceRule): Take a boolean, isInitiatingElementInUserAgentShadowTree, and passes
1162 * css/CSSFontSelector.h:
1163 * css/CSSGradientValue.h:
1164 (WebCore::CSSGradientValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
1166 * css/CSSImageGeneratorValue.cpp:
1167 (WebCore::CSSImageGeneratorValue::loadSubimages): Ditto.
1168 (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto.
1169 * css/CSSImageGeneratorValue.h:
1170 * css/CSSImageSetValue.cpp:
1171 (WebCore::CSSImageSetValue::cachedImageSet): Deleted.
1172 * css/CSSImageSetValue.h:
1173 * css/CSSImageValue.cpp:
1174 (WebCore::CSSImageValue::cachedImage): Deleted.
1175 * css/CSSImageValue.h:
1177 (WebCore::RuleSet::addChildRules): Take a boolean, isInitiatingElementInUserAgentShadowTree, and passes
1179 (WebCore::RuleSet::addRulesFromSheet): Added FIXME comment to skip Content Security Policy check when
1180 when stylesheet is in a user agent shadow tree.
1182 * css/StyleResolver.cpp:
1183 (WebCore::StyleResolver::StyleResolver): Determine whether the SVG font-face element is in a user agent shadow tree
1184 and pass the appropriate value when calling CSSFontSelector::addFontFaceRule(). Also, modernized code; used C++11 range
1185 -based for-loop instead of const_iterator idiom.
1186 (WebCore::StyleResolver::loadPendingSVGDocuments): Skip CSP check when requesting subresources as a byproduct of
1187 resolving style for an element in a user agent shadow tree.
1188 (WebCore::StyleResolver::loadPendingImage): Ditto.
1189 (WebCore::StyleResolver::loadPendingShapeImage): Ditto.
1190 * css/StyleRuleImport.cpp:
1191 (WebCore::StyleRuleImport::requestStyleSheet): Added FIXME comment to skip Content Security Policy check when
1192 when stylesheet is in a user agent shadow tree.
1194 * dom/InlineStyleSheetOwner.cpp:
1195 (WebCore::InlineStyleSheetOwner::createSheet): Skip CSP check for an inline <style> that is in a user agent shadow tree.
1197 (WebCore::Node::isInUserAgentShadowTree): Added.
1199 * dom/ScriptElement.cpp:
1200 (WebCore::ScriptElement::requestScript): Skip CSP check for an external JavaScript script in a user agent shadow tree.
1201 (WebCore::ScriptElement::executeScript): Skip CSP check for an inline JavaScript script that is in a user agent shadow tree.
1202 * dom/StyledElement.cpp:
1203 (WebCore::StyledElement::styleAttributeChanged): Skip CSP check when modifying the inline style of an element in a user
1205 * html/HTMLMediaElement.cpp:
1206 (WebCore::HTMLMediaElement::isSafeToLoadURL): Skip CSP check for a <audio>, <video> in a user agent shadow tree.
1207 (WebCore::HTMLMediaElement::outOfBandTrackSources): Ditto.
1208 * html/HTMLTrackElement.cpp:
1209 (WebCore::HTMLTrackElement::canLoadURL): Ditto.
1210 * html/track/LoadableTextTrack.cpp:
1211 (WebCore::LoadableTextTrack::loadTimerFired): Determine whether the <track> is in a user agent shadow tree
1212 and pass the appropriate value when calling TextTrackLoader::load().
1213 * loader/DocumentLoader.cpp:
1214 (WebCore::DocumentLoader::startLoadingMainResource): Do CSP check when loading a resource by default.
1215 * loader/ImageLoader.cpp:
1216 (WebCore::ImageLoader::updateFromElement): Skip CSP check for an image that is in a user agent shadow tree.
1217 * loader/MediaResourceLoader.cpp:
1218 (WebCore::MediaResourceLoader::start): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
1219 This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
1220 * loader/NetscapePlugInStreamLoader.cpp:
1221 (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Added FIXME comment to skip Content Security Policy check
1222 when when associated plugin element is in a user agent shadow tree.
1223 * loader/PolicyChecker.cpp:
1224 (WebCore::PolicyChecker::checkNavigationPolicy): Skip CSP check for a <iframe> in a user agent shadow tree.
1225 * loader/ResourceLoaderOptions.h: Defined enum class ContentSecurityPolicyImposition with explicit type uint8_t so
1226 as to provide a hint to the compiler (for better packing) when it computes the memory layout for struct that
1227 contains an instance of this class.
1228 (WebCore::ResourceLoaderOptions::ResourceLoaderOptions): Added argument contentSecurityPolicyImposition.
1229 (WebCore::ResourceLoaderOptions::contentSecurityPolicyImposition): Added.
1230 (WebCore::ResourceLoaderOptions::setContentSecurityPolicyImposition): Added.
1231 * loader/SubframeLoader.cpp:
1232 (WebCore::SubframeLoader::pluginIsLoadable): Skip CSP check for a plugin element that is in a user agent shadow tree.
1233 (WebCore::SubframeLoader::createJavaAppletWidget): Skip CSP check for an applet element that is in a user agent shadow tree.
1234 * loader/TextTrackLoader.cpp:
1235 (WebCore::TextTrackLoader::load): Take a boolean, isInitiatingElementInUserAgentShadowTree, and sets the appropriate
1236 Content Security Policy imposition for the text track request.
1237 * loader/TextTrackLoader.h:
1238 * loader/cache/CachedResourceLoader.cpp:
1239 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Skip CSP check for a user-specified stylesheet.
1240 (WebCore::CachedResourceLoader::canRequest): Only check the CSP of the page if specified in the resource loader options for the request.
1241 (WebCore::CachedResourceLoader::defaultCachedResourceOptions): Add ContentSecurityPolicyImposition::DoPolicyCheck to the default
1242 resource loader options so that do check the CSP policy of the page before performing a resource request by default.
1243 * loader/cache/CachedSVGDocumentReference.cpp:
1244 (WebCore::CachedSVGDocumentReference::load): Take a ResourceLoaderOptions as an argument and passes it as appropriate.
1245 * loader/cache/CachedSVGDocumentReference.h:
1246 * loader/icon/IconLoader.cpp:
1247 (WebCore::IconLoader::startLoading): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
1248 This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
1249 * page/ContentSecurityPolicy.cpp:
1250 (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): Take an argument called overrideContentSecurityPolicy (defaults to false). When
1251 overrideContentSecurityPolicy := true, this function unconditionally returns true.
1252 (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): Ditto.
1253 (WebCore::ContentSecurityPolicy::allowInlineScript): Ditto.
1254 (WebCore::ContentSecurityPolicy::allowInlineStyle): Ditto.
1255 (WebCore::ContentSecurityPolicy::allowEval): Ditto.
1256 (WebCore::ContentSecurityPolicy::allowPluginType): Ditto.
1257 (WebCore::ContentSecurityPolicy::allowScriptFromSource): Ditto.
1258 (WebCore::ContentSecurityPolicy::allowObjectFromSource): Ditto.
1259 (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Ditto.
1260 (WebCore::ContentSecurityPolicy::allowImageFromSource): Ditto.
1261 (WebCore::ContentSecurityPolicy::allowStyleFromSource): Ditto.
1262 (WebCore::ContentSecurityPolicy::allowFontFromSource): Ditto.
1263 (WebCore::ContentSecurityPolicy::allowMediaFromSource): Ditto.
1264 (WebCore::ContentSecurityPolicy::allowConnectToSource): Ditto.
1265 (WebCore::ContentSecurityPolicy::allowFormAction): Ditto.
1266 (WebCore::ContentSecurityPolicy::allowBaseURI): Ditto.
1267 * page/ContentSecurityPolicy.h:
1268 * page/DOMSecurityPolicy.cpp:
1269 * page/EventSource.cpp:
1270 (WebCore::EventSource::create): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
1271 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1272 (WebCore::WebCoreAVFResourceLoader::startLoading): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
1273 This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
1274 * svg/SVGFEImageElement.cpp:
1275 (WebCore::SVGFEImageElement::requestImageResource): Skip CSP check for a SVG FEImage element in a user agent shadow tree.
1276 * svg/SVGFontFaceUriElement.cpp:
1277 (WebCore::SVGFontFaceUriElement::loadFont): Skip CSP check for a SVG font-face-uri element in a user agent shadow tree.
1278 * svg/SVGUseElement.cpp:
1279 (WebCore::SVGUseElement::updateExternalDocument): Skip CSP check for a SVG use element in a user agent shadow tree.
1280 * testing/Internals.cpp:
1281 (WebCore::Internals::ensureUserAgentShadowRoot): Added.
1282 * testing/Internals.h:
1283 * testing/Internals.idl: Added declaration for ensureUserAgentShadowRoot().
1284 * xml/XMLHttpRequest.cpp:
1285 (WebCore::XMLHttpRequest::open): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
1287 2015-07-06 Brent Fulgham <bfulgham@apple.com>
1289 Ensure media playback is stopped during page close
1290 https://bugs.webkit.org/show_bug.cgi?id=146554
1291 <rdar://problem/18033944>
1293 Reviewed by Brady Eidson.
1295 * Modules/webaudio/AudioContext.h:
1296 (WebCore::WebAudio::hostingDocument): Added.
1297 * html/HTMLMediaElement.h:
1298 (WebCore::HTMLMediaElement::hostingDocument): Added.
1300 (WebCore::Document::~Document): Call new 'stopAllMediaPlaybackForDocument' at destruction time.
1301 * platform/audio/PlatformMediaSession.h:
1302 Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
1303 Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
1304 * platform/audio/PlatformMediaSessionManager.cpp:
1305 (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
1306 playback on elements that match the provided document.
1307 (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess): Added. Pauses playback
1308 on all elements in the current process.
1309 * platform/audio/PlatformMediaSessionManager.h:
1311 2015-07-06 Alex Christensen <achristensen@webkit.org>
1313 [Content Extensions] Remove memory page reporting
1314 https://bugs.webkit.org/show_bug.cgi?id=146659
1316 Reviewed by Benjamin Poulain.
1318 * contentextensions/CompiledContentExtension.cpp:
1319 (WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
1320 (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
1321 * contentextensions/CompiledContentExtension.h:
1322 * contentextensions/ContentExtension.cpp:
1323 (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
1324 * contentextensions/ContentExtension.h:
1325 (WebCore::ContentExtensions::ContentExtension::compiledExtension):
1326 * contentextensions/ContentExtensionsBackend.cpp:
1327 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1328 * contentextensions/DFABytecodeInterpreter.cpp:
1329 (WebCore::ContentExtensions::getBits):
1330 (WebCore::ContentExtensions::getInstruction):
1331 (WebCore::ContentExtensions::jumpSizeInBytes):
1332 (WebCore::ContentExtensions::getJumpSize):
1333 (WebCore::ContentExtensions::getJumpDistance):
1334 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
1335 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
1336 (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
1337 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1338 * contentextensions/DFABytecodeInterpreter.h:
1339 Don't keep track of memory page usage. It wasn't even correct anyways.
1341 2015-07-06 Alex Christensen <achristensen@webkit.org>
1343 [Content Extensions] Increase maxNFASize
1344 https://bugs.webkit.org/show_bug.cgi?id=146656
1346 Reviewed by Benjamin Poulain.
1348 Because of memory improvements in r186375, r186374, and r186079,
1349 we can now increase the maximum number of NFA nodes in order to avoid
1350 long compile times of some large, complicated content blockers.
1351 This also improves the interpreting time of content blockers.
1353 * contentextensions/ContentExtensionCompiler.cpp:
1354 (WebCore::ContentExtensions::compileRuleList):
1355 Increase maxNFASize to 75000 to avoid long compile times.
1357 2015-07-06 Dean Jackson <dino@apple.com>
1359 Memory corruption in WebGLRenderingContext::simulateVertexAttrib0
1360 https://bugs.webkit.org/show_bug.cgi?id=146652
1361 <rdar://problem/21567767>
1365 * html/canvas/WebGLRenderingContextBase.cpp:
1366 (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
1368 2015-07-06 Dean Jackson <dino@apple.com>
1370 Memory corruption in WebGLRenderingContext::simulateVertexAttrib0
1371 https://bugs.webkit.org/show_bug.cgi?id=146652
1372 <rdar://problem/21567767>
1374 Reviewed by Brent Fulgham.
1376 The expression "(numVertex + 1) * 4 * sizeof(GC3Dfloat)" could potentially
1377 overflow. Make it use checked arithmetic.
1379 I couldn't make a test case that reliably exercised this.
1381 * html/canvas/WebGLRenderingContextBase.cpp:
1382 (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): Used Checked<GC3Dsizeiptr>
1383 for calculating the size of the buffer.
1385 2015-07-06 Said Abou-Hallawa <sabouhallawa@apple.com>
1387 [Mac] REGRESSION: (r181403) Enter/Exit full screen on 1x secondary display plugged into 2x Mac displays WebView as 1/4 size during transition
1388 https://bugs.webkit.org/show_bug.cgi?id=146651
1390 Reviewed by Simon Fraser.
1392 * platform/mac/WebCoreFullScreenPlaceholderView.mm: set layerContentsPlacement
1393 to NSViewLayerContentsPlacementScaleProportionallyToFit so AppKit resizes the
1394 content CALayer to fit in the WebView.
1396 2015-07-06 Benjamin Poulain <benjamin@webkit.org>
1398 Reduce the memory usage of the prefix tree
1399 https://bugs.webkit.org/show_bug.cgi?id=146615
1401 Reviewed by Sam Weinig.
1403 This patch introduces two little changes that reduces the size
1404 of the prefix tree by about 40%.
1406 First, the Terms are interned. The new class CombinedFiltersAlphabet
1407 takes care of keeping a unique version of each term for use
1408 by the CombinedURLFilters.
1410 Since each Term is fairly big but we have a small number of
1411 unique term, we significantly reduce the edge size.
1413 Second, the actions are no longer stored on each Vertex.
1414 They are now stored on the side, in a HashMap indexed by
1417 This works well because the Actions are sparse over the tree.
1418 Typically, only the leaves have actions. Internal vertices
1419 sometime get actions but that's uncommon.
1423 The next step to reduce the memory footprint would be to
1424 make PrefixTreeVertex into a custom packed structure instead
1427 Such change is very invasive and more error prone so I decided
1428 against it for this patch.
1430 * WebCore.xcodeproj/project.pbxproj:
1431 * contentextensions/CombinedFiltersAlphabet.cpp: Copied from Source/WebCore/contentextensions/CombinedURLFilters.h.
1432 (WebCore::ContentExtensions::TermCreatorTranslator::hash):
1433 (WebCore::ContentExtensions::TermCreatorTranslator::equal):
1434 (WebCore::ContentExtensions::TermCreatorTranslator::translate):
1435 (WebCore::ContentExtensions::CombinedFiltersAlphabet::interned):
1436 (WebCore::ContentExtensions::CombinedFiltersAlphabet::memoryUsed):
1437 * contentextensions/CombinedFiltersAlphabet.h: Copied from Source/WebCore/contentextensions/CombinedURLFilters.h.
1438 (WebCore::ContentExtensions::CombinedFiltersAlphabet::TermPointerHash::hash):
1439 (WebCore::ContentExtensions::CombinedFiltersAlphabet::TermPointerHash::equal):
1440 * contentextensions/CombinedURLFilters.cpp:
1441 (WebCore::ContentExtensions::recursiveMemoryUsed):
1442 (WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
1443 (WebCore::ContentExtensions::prefixTreeVertexToString):
1444 (WebCore::ContentExtensions::recursivePrint):
1445 (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
1446 (WebCore::ContentExtensions::generateNFAForSubtree):
1447 (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1448 * contentextensions/CombinedURLFilters.h:
1449 * contentextensions/ContentExtensionsDebugging.h:
1450 * contentextensions/Term.h:
1451 (WebCore::ContentExtensions::Term::isValid):
1452 (WebCore::ContentExtensions::Term::destroy):
1453 (WebCore::ContentExtensions::Term::memoryUsed):
1454 (WebCore::ContentExtensions::Term::toString): Deleted.
1455 (WebCore::ContentExtensions::TermHash::hash): Deleted.
1456 (WebCore::ContentExtensions::TermHash::equal): Deleted.
1457 (WebCore::ContentExtensions::Term::Term): Deleted.
1458 (WebCore::ContentExtensions::Term::isKnownToMatchAnyString): Deleted.
1459 (WebCore::ContentExtensions::Term::hasFixedLength): Deleted.
1460 (WebCore::ContentExtensions::Term::operator==): Deleted.
1461 (WebCore::ContentExtensions::Term::hash): Deleted.
1462 (WebCore::ContentExtensions::Term::isDeletedValue): Deleted.
1463 (WebCore::ContentExtensions::Term::isUniversalTransition): Deleted.
1464 (WebCore::ContentExtensions::Term::generateSubgraphForAtom): Deleted.
1466 2015-07-06 Benjamin Poulain <benjamin@webkit.org>
1468 [Content Extensions] Make the DFA transitions ranges instead of characters
1469 https://bugs.webkit.org/show_bug.cgi?id=146575
1471 Reviewed by Alex Christensen.
1473 This patch changes the DFA and code using the DFA to use ranges
1474 to represent the transitions between any two nodes.
1476 This patch builds on top of the tools introduced in r186079.
1478 The DFA structure is basically the same as ImmutableNFA but without
1479 any epsilon transitions.
1481 This patch introduces a transition iterator to make the DFA
1482 compatible with the existing algorithms.
1486 The DFA combiner is rebuilt on top of MutableRangeList. Combining the transitions
1487 of two nodes is one by merging the range list of each not into a common
1489 The data converter takes care of creating the signature of the combination.
1491 The code got simpler since MutableRangeList does most of the work now. It is also
1496 The minimizer is more intersting.
1498 With the current algorithm, we cannot resolve overlaps between ranges. On the other
1499 hand, the minimizer does not care about the symbol of the transitions if we are careful
1500 to partition transitions of the same symbol together.
1502 What I did was to turn the minimizer into a pure transition based one, BUT each
1503 "symbol" is actually an unbreakable range.
1505 The first step is to go over all the transitions of all the nodes and find the largest
1506 ranges such that the alphabet of interest is covered but there is not a single intersection
1507 between any two nodes (what I called "singular transitions" in the code).
1509 This can be done efficiently with MutableRangeList.
1510 A little trick there is that I also used the converter to count how many real transition
1511 overlaps any singular transition.
1513 Those singular transitions become the alphabet of our minimizer. The "symbol" of our alphabet
1514 is simply the position of the singular transition in the list.
1516 The partition of transition is created by populating each set with all the transition that
1517 overlaps the symbols.
1518 Note that since the partition is created on the fly, the Transition structure used for
1519 repartitioning only contains the source of the transitions.
1521 Once our transition parition has been carefuly created, we can completely forget about
1522 the symbols and only work with subsets.
1524 Since the singular transitions have no overlap (unlike fallback transitions), this new minimizer
1525 will find the minimial solution for well formed input.
1527 * WebCore.xcodeproj/project.pbxproj:
1528 * contentextensions/DFA.cpp:
1529 (WebCore::ContentExtensions::DFA::memoryUsed):
1530 (WebCore::ContentExtensions::printTransitions):
1531 (WebCore::ContentExtensions::DFANode::actions): Deleted.
1532 (WebCore::ContentExtensions::DFANode::transitions): Deleted.
1533 (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination): Deleted.
1534 (WebCore::ContentExtensions::DFANode::changeFallbackTransition): Deleted.
1535 (WebCore::ContentExtensions::DFANode::addFallbackTransition): Deleted.
1536 (WebCore::ContentExtensions::DFANode::containsTransition): Deleted.
1537 (WebCore::ContentExtensions::DFANode::kill): Deleted.
1538 (WebCore::ContentExtensions::DFA::debugPrintDot): Deleted.
1539 * contentextensions/DFA.h:
1540 (WebCore::ContentExtensions::DFANode::ConstRangeIterator::range):
1541 (WebCore::ContentExtensions::DFANode::ConstRangeIterator::target):
1542 (WebCore::ContentExtensions::DFANode::RangeIterator::range):
1543 (WebCore::ContentExtensions::DFANode::RangeIterator::target):
1544 (WebCore::ContentExtensions::DFANode::RangeIterator::resetTarget):
1545 * contentextensions/DFABytecodeCompiler.cpp:
1546 (WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
1547 (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
1548 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
1549 * contentextensions/DFACombiner.cpp:
1550 (WebCore::ContentExtensions::DFAMerger::TargetConverter::convert):
1551 (WebCore::ContentExtensions::DFAMerger::TargetConverter::extend):
1552 (WebCore::ContentExtensions::DFAMerger::TargetConverter::setHalfSignature):
1553 (WebCore::ContentExtensions::DFAMerger::merge):
1554 (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
1555 (WebCore::ContentExtensions::DFAMerger::setHalfSignature): Deleted.
1556 (WebCore::ContentExtensions::DFAMerger::populateTransitions): Deleted.
1557 (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions): Deleted.
1558 (WebCore::ContentExtensions::DFAMerger::createTransitions): Deleted.
1559 (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded): Deleted.
1560 * contentextensions/DFAMinimizer.cpp:
1561 (WebCore::ContentExtensions::DFAMinimizer::minimize):
1562 * contentextensions/DFANode.cpp: Added.
1563 (WebCore::ContentExtensions::DFANode::actions):
1564 (WebCore::ContentExtensions::DFANode::containsTransition):
1565 (WebCore::ContentExtensions::DFANode::kill):
1566 (WebCore::ContentExtensions::DFANode::canUseFallbackTransition):
1567 (WebCore::ContentExtensions::DFANode::bestFallbackTarget):
1568 * contentextensions/DFANode.h:
1569 (WebCore::ContentExtensions::CharRange::size):
1570 (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator*):
1571 (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator==):
1572 (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator!=):
1573 (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator++):
1574 (WebCore::ContentExtensions::DFANode::ConstRangeIterator::first):
1575 (WebCore::ContentExtensions::DFANode::ConstRangeIterator::last):
1576 (WebCore::ContentExtensions::DFANode::ConstRangeIterator::data):
1577 (WebCore::ContentExtensions::DFANode::IterableConstRange::begin):
1578 (WebCore::ContentExtensions::DFANode::IterableConstRange::end):
1579 (WebCore::ContentExtensions::DFANode::transitions):
1580 (WebCore::ContentExtensions::DFANode::RangeIterator::operator*):
1581 (WebCore::ContentExtensions::DFANode::RangeIterator::operator==):
1582 (WebCore::ContentExtensions::DFANode::RangeIterator::operator!=):
1583 (WebCore::ContentExtensions::DFANode::RangeIterator::operator++):
1584 (WebCore::ContentExtensions::DFANode::RangeIterator::first):
1585 (WebCore::ContentExtensions::DFANode::RangeIterator::last):
1586 (WebCore::ContentExtensions::DFANode::RangeIterator::data):
1587 (WebCore::ContentExtensions::DFANode::IterableRange::begin):
1588 (WebCore::ContentExtensions::DFANode::IterableRange::end):
1589 (WebCore::ContentExtensions::DFANode::hasFallbackTransition): Deleted.
1590 (WebCore::ContentExtensions::DFANode::transitionsLength): Deleted.
1591 (WebCore::ContentExtensions::DFANode::transitionsStart): Deleted.
1592 (WebCore::ContentExtensions::DFANode::resetTransitions): Deleted.
1593 (WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA): Deleted.
1594 * contentextensions/ImmutableNFA.h:
1595 (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::first):
1596 (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::last):
1597 (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data):
1598 (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::range):
1599 (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*): Deleted.
1600 (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->): Deleted.
1601 * contentextensions/ImmutableNFANodeBuilder.h:
1602 (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::first):
1603 (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::last):
1604 (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator*): Deleted.
1605 (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator->): Deleted.
1606 * contentextensions/MutableRange.h:
1607 (WebCore::ContentExtensions::MutableRange::size): Deleted.
1608 * contentextensions/MutableRangeList.h:
1609 (WebCore::ContentExtensions::MutableRangeList::ConstIterator::first):
1610 (WebCore::ContentExtensions::MutableRangeList::ConstIterator::last):
1611 (WebCore::ContentExtensions::MutableRangeList::ConstIterator::data):
1612 (WebCore::ContentExtensions::MutableRangeList::extend):
1613 (WebCore::ContentExtensions::MutableRangeList::size):
1614 (WebCore::ContentExtensions::MutableRangeList::initializeFrom):
1615 * contentextensions/NFAToDFA.cpp:
1616 (WebCore::ContentExtensions::NFAToDFA::convert):
1617 (WebCore::ContentExtensions::canUseFallbackTransition): Deleted.
1618 (WebCore::ContentExtensions::findBestFallbackTarget): Deleted.
1620 2015-07-06 Timothy Hatcher <timothy@apple.com>
1622 Fix ASSERT causing crashes in Inspector tests on the bots.
1624 * inspector/InspectorPageAgent.cpp:
1625 (WebCore::InspectorPageAgent::enable): Reset stopwatch before starting it.
1627 2015-07-06 Brady Eidson <beidson@apple.com>
1629 Remove unused "m_isPrivate" flag on NetworkStorageSession.
1630 https://bugs.webkit.org/show_bug.cgi?id=146648
1632 Reviewed by Alex Christensen.
1634 No new tests (No behavior change).
1636 * platform/network/NetworkStorageSession.h:
1637 (WebCore::NetworkStorageSession::isPrivateBrowsingSession): Deleted.
1639 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1640 (WebCore::NetworkStorageSession::NetworkStorageSession): Deleted.
1641 (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Deleted.
1643 * platform/network/soup/NetworkStorageSessionSoup.cpp:
1644 (WebCore::NetworkStorageSession::NetworkStorageSession): Deleted.
1645 (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Deleted.
1647 2015-07-04 Timothy Hatcher <timothy@apple.com>
1649 Web Inspector: Add a dedicated Network tab that is always live
1650 https://bugs.webkit.org/show_bug.cgi?id=146568
1652 Make sure the executionStopwatch is always started and never stops so resource loads
1653 always get timestamps, even when Timeline is not recording.
1655 Reviewed by Joseph Pecoraro.
1657 * inspector/InspectorPageAgent.cpp:
1658 (WebCore::InspectorPageAgent::enable): Start executionStopwatch.
1659 (WebCore::InspectorPageAgent::frameStartedLoading): Reset and start executionStopwatch.
1660 * inspector/InspectorTimelineAgent.cpp:
1661 (WebCore::InspectorTimelineAgent::internalStart): Removed executionStopwatch code.
1662 (WebCore::InspectorTimelineAgent::internalStop): Ditto.
1664 2015-07-02 Timothy Hatcher <timothy@apple.com>
1666 Update the localized strings file.
1668 * English.lproj/Localizable.strings: Updated with the script.
1670 2015-07-06 Zalan Bujtas <zalan@apple.com>
1672 Crash: LayoutState root's container is nullptr when the layout root is detached.
1673 https://bugs.webkit.org/show_bug.cgi?id=146646
1674 rdar://problem/21371544
1676 Reviewed by Simon Fraser.
1678 This is a speculative fix to ensure that when the root of the LayoutState is detached
1679 we don't try to access its container (nullptr).
1680 This is related to trac.webkit.org/r185484.
1684 * rendering/LayoutState.cpp:
1685 (WebCore::LayoutState::LayoutState):
1686 * rendering/LayoutState.h:
1687 (WebCore::LayoutState::LayoutState): Deleted.
1689 2015-07-06 Eric Carlson <eric.carlson@apple.com>
1691 [Mac] Inactive AirPlay route should automatically timeout
1692 https://bugs.webkit.org/show_bug.cgi?id=146642
1693 <rdar://problem/21602955>
1695 Automatically clear a media element's AirPlay connection after it has been paused
1696 for 60 minutes, or after 8 minutes if it played to the end before pausing.
1698 Reviewed by Brent Fulgham.
1700 * Modules/mediasession/WebMediaSessionManager.cpp:
1701 (WebCore::WebMediaSessionManager::WebMediaSessionManager): Initialize m_watchdogTimer.
1702 (WebCore::WebMediaSessionManager::clientStateDidChange): Schedule watchdog timer configuration
1703 if the client started playing or paused.
1704 (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Schedule watchdog timer configuration.
1705 (WebCore::WebMediaSessionManager::toString): Print watchdog configuration flag.
1706 (WebCore::WebMediaSessionManager::taskTimerFired): Call configureWatchdogTimer.
1707 (WebCore::WebMediaSessionManager::configureWatchdogTimer): New, start or stop watchdog timer.
1708 (WebCore::WebMediaSessionManager::watchdogTimerFired): Stop monitoring for targets, which
1710 * Modules/mediasession/WebMediaSessionManager.h:
1712 * html/HTMLMediaElement.cpp:
1713 (WebCore::HTMLMediaElement::mediaState): Set DidPlayToEnd when appropriate.
1715 * page/MediaProducer.h: Add DidPlayToEnd.
1717 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1718 (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Clear m_client, call
1719 stopMonitoringPlaybackTargets.
1720 (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Send a neutered
1721 MediaPlaybackTarget when m_outputDeviceMenuController is NULL.
1722 (WebCore::MediaPlaybackTargetPickerMac::devicePicker): Add logging.
1723 (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Clear the menu
1724 controller to cancel the route.
1726 2015-07-06 Zan Dobersek <zdobersek@igalia.com>
1728 [GTK] Fix build errors with OpenGL ES
1729 https://bugs.webkit.org/show_bug.cgi?id=146626
1731 Reviewed by Carlos Garcia Campos.
1733 * platform/graphics/ANGLEWebKitBridge.h: Include <GLES2/gl2.h>
1734 when building with OpenGL ES 2 support enabled.
1735 (WebCore::ANGLEShaderSymbol::isSampler): Don't test for
1736 OpenGL-specific GL_SAMPLER_2D_RECT_ARB value when OpenGL ES 2
1739 2015-07-06 Youenn Fablet <youenn.fablet@crf.canon.fr>
1741 [Streams API] Remove ReadableStream custom constructor
1742 https://bugs.webkit.org/show_bug.cgi?id=146547
1744 Reviewed by Darin Adler.
1746 Removed custom binding.
1747 Made use of Dictionary in lieu of JSObject to reduce readable stream constructor parameter parsing.
1748 Added support for passing ExecState to construtor within binding generator.
1750 No change in behavior.
1752 * Modules/streams/ReadableStream.cpp:
1753 (WebCore::ReadableStream::create):
1754 * Modules/streams/ReadableStream.h:
1755 (WebCore::ReadableStream::create):
1756 * Modules/streams/ReadableStream.idl:
1757 * bindings/js/JSDictionary.cpp:
1758 (WebCore::JSDictionary::convertValue):
1759 * bindings/js/JSDictionary.h:
1760 * bindings/js/JSReadableStreamCustom.cpp:
1761 * bindings/js/ReadableJSStream.cpp:
1762 (WebCore::ReadableJSStream::create):
1763 (WebCore::ReadableJSStream::ReadableJSStream):
1764 * bindings/js/ReadableJSStream.h:
1765 * bindings/scripts/CodeGeneratorJS.pm:
1766 (GenerateConstructorDefinition):
1767 * bindings/scripts/IDLAttributes.txt:
1769 2015-07-06 Youenn Fablet <youenn.fablet@crf.canon.fr>
1771 Promise-returning functions should reject promises if the callee is not of the expected type
1772 https://bugs.webkit.org/show_bug.cgi?id=146585
1774 Reviewed by Darin Adler.
1776 Updated binding generator to reject promise in case the casting of the thisValue is not working properly
1777 (i.e. the callee is not wrapping a DOM object of the expected class.
1779 Covered by rebased test and binding expectations.
1781 * bindings/js/JSDOMPromise.h:
1782 (WebCore::callPromiseFunction): Removed wrapper class parameter.
1783 * bindings/scripts/CodeGeneratorJS.pm:
1784 (GenerateImplementation):
1785 * bindings/scripts/test/JS/JSTestObj.cpp: Updated binding expectations.
1786 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
1787 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
1788 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
1789 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
1790 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
1791 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
1792 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
1793 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
1795 2015-07-05 Chris Dumez <cdumez@apple.com>
1797 [WK2] Current page's scroll position is lost when transferring sessionState from one view to another
1798 https://bugs.webkit.org/show_bug.cgi?id=146625
1799 <rdar://problem/21585268>
1801 Reviewed by Gavin Barraclough.
1803 Export HistoryController:saveScrollPositionAndViewStateToItem()
1804 so that it can be called from WebKit2.
1806 * loader/HistoryController.h:
1808 2015-07-05 Simon Fraser <simon.fraser@apple.com>
1810 REGRESSION (r180582): background-attachment: local; does not scroll the background image when scrolling the the element's contents
1811 https://bugs.webkit.org/show_bug.cgi?id=146623
1813 Reviewed by Zalan Bujtas.
1815 r180582 erroneously asserted that m_destOrigin in BackgroundImageGeometry was unused.
1816 However, it is needed to compute the correct phase when the destination rect is
1817 altered by clipping.
1819 Test: fast/backgrounds/background-attachment-local.html
1821 * rendering/RenderBoxModelObject.cpp:
1822 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1823 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1824 * rendering/RenderBoxModelObject.h:
1825 (WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
1826 (WebCore::BackgroundImageGeometry::relativePhase):
1827 * rendering/svg/RenderSVGResourceMasker.cpp:
1828 (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
1830 2015-07-05 Chris Dumez <cdumez@apple.com>
1832 [WK2] WebBackForwardListItems' pageState is not kept up-to-date
1833 https://bugs.webkit.org/show_bug.cgi?id=146614
1834 <rdar://problem/21585268>
1836 Reviewed by Gavin Barraclough.
1838 WebBackForwardListItems' pageState on UIProcess-side were not kept
1839 up-to-date when it was updated on WebContent process side. This meant
1840 that we were losing the scroll position (among other things) when
1841 transferring the session state over from one view to another.
1843 We now call notifyHistoryItemChanged(item) after saving the scroll
1844 position and the view state on the HistoryItem. As a result, the
1845 WebBackForwardListProxy will send the updated pageState to the
1848 * history/HistoryItem.cpp:
1849 (WebCore::HistoryItem::notifyChanged):
1850 * history/HistoryItem.h:
1851 * loader/HistoryController.cpp:
1852 (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
1854 2015-07-04 Chris Dumez <cdumez@apple.com>
1856 Unreviewed Windows build fix after r186279.
1858 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1859 (WebCore::AVFWrapper::destroyVideoLayer):
1860 * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1861 (WebCore::CACFLayerTreeHost::destroyRenderer):
1863 2015-07-04 Chris Dumez <cdumez@apple.com>
1865 Drop RefPtr::clear() method
1866 https://bugs.webkit.org/show_bug.cgi?id=146556
1868 Reviewed by Brady Eidson.
1870 Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
1872 2015-07-03 Dan Bernstein <mitz@apple.com>
1874 Fixed the iOS 8 build.
1876 * editing/cocoa/HTMLConverter.mm:
1878 2015-07-03 Chris Dumez <cdumez@apple.com>
1880 REGRESSION (r178097): HTMLSelectElement.add(option, undefined) prepends option to the list of options; should append to the end of the list of options
1881 https://bugs.webkit.org/show_bug.cgi?id=146566
1882 <rdar://problem/21663919>
1884 Reviewed by Ryosuke Niwa.
1886 HTMLSelectElement.add(X, undefined) is supposed to be equivalent to
1887 HTMLSelectElement.add(X) which should *append* X. The same is true
1888 for HTMLOptionsCollection.add(X, undefined).
1890 However, due to a bug in our bindings generator for overloaded
1891 operations, the actual behavior was not the expected one. The
1892 second overload would be chosen: add(X, index) and undefined would
1893 be converted as 0-index, which would *prepend* X.
1895 This patch fixes the bindings generator so that undefined is allowed
1896 for optional parameters of an overload operation, when doing the
1897 overload resolution.
1900 - fast/dom/HTMLSelectElement/add.html
1901 - fast/dom/HTMLSelectElement/options-collection-add.html
1902 - http/tests/websocket/tests/hybi/undefined-protocol.html
1904 * bindings/scripts/CodeGeneratorJS.pm:
1905 (GenerateParametersCheckExpression):
1906 Allow undefined value for optional parameters when doing the overload
1909 * bindings/scripts/test/JS/JSTestObj.cpp:
1910 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
1911 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
1912 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
1913 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter):
1914 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1915 (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
1916 * bindings/scripts/test/TestObj.idl:
1917 Add bindings tests coverage and rebaseline.
1919 2015-07-03 Dan Bernstein <mitz@apple.com>
1921 Fixed the Mavericks build after r186236.
1923 * loader/cache/CachedResource.h:
1924 (WebCore::CachedResource::url): Removed the export macro from this inline function.
1926 2015-07-03 Dan Bernstein <mitz@apple.com>
1928 Tried to fix the iOS build.
1930 * bridge/objc/objc_class.mm:
1931 (JSC::Bindings::ObjcClass::fieldNamed):
1933 2015-07-03 Dan Bernstein <mitz@apple.com>
1935 Tried to fix the iOS build.
1937 * editing/cocoa/HTMLConverter.mm:
1939 2015-07-03 Dan Bernstein <mitz@apple.com>
1941 Tried to fix the iOS build.
1943 * page/FrameView.cpp:
1944 (WebCore::FrameView::calculateExtendedBackgroundMode):
1946 2015-07-03 Dan Bernstein <mitz@apple.com>
1948 [Xcode] Update some build settings as recommended by Xcode 7
1949 https://bugs.webkit.org/show_bug.cgi?id=146597
1951 Reviewed by Sam Weinig.
1953 * Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE,
1954 GCC_WARN_UNDECLARED_SELECTOR, and GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.
1956 * WebCore.xcodeproj/project.pbxproj: Updated LastUpgradeCheck. Disabled -Wunreachable-code
1957 for two bison-generated source files. Updated for rename of WebScriptObject.h.
1959 * bindings/objc/WebScriptObject.mm:
1960 (-[WebUndefined dealloc]): Removed unreachable code and suppressed warning about not calling
1962 * bridge/objc/WebScriptObject.h: Renamed to WebScriptObjectProtocol.h to enabled inlcuding
1963 the other WebScriptObject.h.
1964 * bridge/objc/WebScriptObjectProtocol.h: Renamed from WebScriptObject.h.
1966 * bridge/objc/objc_class.mm: Updated for rename and included WebScriptObject.h because we
1967 use selectors declared in that file.
1969 * bridge/objc/objc_instance.mm: Ditto.
1970 (ObjCRuntimeMethod::create): Resolved ambiguity between JSC::JSValue and the Objective-C
1972 (ObjCRuntimeMethod::createStructure): Ditto.
1973 (ObjcInstance::invokeMethod): Ditto.
1974 (ObjcInstance::invokeObjcMethod): Ditto.
1975 (ObjcInstance::invokeDefaultMethod): Ditto.
1976 (ObjcInstance::setValueOfUndefinedField): Ditto.
1977 (ObjcInstance::getValueOfUndefinedField): Ditto.
1978 (ObjcInstance::defaultValue): Ditto.
1979 (ObjcInstance::stringValue): Ditto.
1980 (ObjcInstance::numberValue): Ditto.
1981 (ObjcInstance::booleanValue): Ditto.
1982 (ObjcInstance::valueOf): Ditto,
1984 * bridge/objc/objc_runtime.h: Moved definition of isFallbackMethod() from here to the
1986 * bridge/objc/objc_runtime.mm: Updated for rename and included WebScriptObject.h because we
1987 use selectors declared in that file.
1988 (JSC::Bindings::ObjcMethod::isFallbackMethod): Moved definition from the header to here.
1990 * bridge/objc/objc_utility.mm: Updated for rename.
1992 * cssjit/SelectorCompiler.cpp:
1993 (WebCore::SelectorCompiler::addScrollbarPseudoClassType): Removed unreachable code.
1995 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1996 Added declarations to the WebCoreMovieObserver interface.
1997 (WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks): Suppressed
1998 -Wundeclared-selector around invocation of a selector that is not declared anywhere.
2000 2015-07-03 Kyounga Ra <kyounga@alticast.com>
2002 Memory leak for a protected Element having pending events in ImageLoader.
2003 https://bugs.webkit.org/show_bug.cgi?id=146538
2005 Reviewed by Brady Eidson.
2007 If ImageLoader is destroyed before an active derefElementTimer is fired, protected element's refCount never be zero..
2009 * loader/ImageLoader.cpp:
2010 (WebCore::ImageLoader::~ImageLoader):
2011 (WebCore::ImageLoader::updateFromElement):
2012 (WebCore::ImageLoader::updateRenderer):
2013 (WebCore::ImageLoader::updatedHasPendingEvent):
2014 (WebCore::ImageLoader::timerFired):
2015 * loader/ImageLoader.h:
2017 2015-07-03 Daniel Bates <dabates@apple.com>
2019 REGRESSION (r178097): JavaScript TypeError after clicking on compose button in Yahoo Mail
2020 https://bugs.webkit.org/show_bug.cgi?id=146515
2021 <rdar://problem/21348421>
2023 Reviewed by Chris Dumez.
2025 Fixes an issue where extra arguments passed to a Web IDL overloaded function, whose implementation
2026 is generated by the bindings generator script, are not ignored as per the note in section "Interface object [[Call]] method"
2027 of the Web IDL spec, <http://www.w3.org/TR/2012/CR-WebIDL-20120419/> (19 April 2012).
2029 Currently for an overloaded function the JavaScript bindings generator script emits code to
2030 throw a TypeError when it cannot find a candidate function that takes the same number of
2031 arguments as passed by a caller. Prior to the change made in bug #139179 (r178097), the
2032 bindings code for HTMLSelectElement.add() was written by hand and ignored extra arguments
2033 that were passed to it. Following this change, the bindings code for HTMLSelectElement.add()
2034 is generated by the bindings generator script. Therefore, we throw a TypeError when Yahoo Mail
2035 calls HTMLSelectElement.add() with extra arguments because the code emitted by the bindings
2036 generator script does not ignore them.
2038 * bindings/scripts/CodeGeneratorJS.pm:
2039 (LengthOfLongestFunctionParameterList): Added. Computes the length of longest overload parameter list.
2040 (GenerateOverloadedFunction): Emit code that ignores more arguments than LengthOfLongestFunctionParameterList().
2041 (GenerateOverloadedConstructorDefinition): Ditto.
2042 * bindings/scripts/test/JS/JSTestObj.cpp:
2043 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12): Added; expected result for an overloaded
2044 function that takes a variadic number of Blob elements.
2045 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Update expected result. The added
2046 if-conditional expression for the IDL declaration overloadedMethod(Blob... blobArgs) is empty
2047 because we do not support overloading of functions with variadic arguments.
2048 (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
2049 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2050 (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5): Added; expected
2051 result for an overloaded constructors that takes a variadic number of long arguments.
2052 (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors): Update expected
2053 result. The added if-conditional expression for the IDL declaration Constructor(long... longArgs) is empty
2054 because we do not support overloading of constructors with variadic arguments.
2055 * bindings/scripts/test/TestObj.idl: Added declaration overloadedMethod(Blob...). Also fixed
2056 typo in license block text.
2057 * bindings/scripts/test/TestOverloadedConstructors.idl: Added declaration Constructor(long... longArgs).
2058 Also fixed typo in license block text.
2060 2015-07-03 Mario Sanchez Prada <mario@endlessm.com>
2062 Crash on xLarge memory allocation using bmalloc on 32bit systems
2063 https://bugs.webkit.org/show_bug.cgi?id=146440
2065 Reviewed by Gustavo Noronha Silva.
2067 Disable the gcc's -ftree-sra optimization (automatically enabled
2068 with -O1 and higher levels) for WebCore and 32bit Intel architectures,
2069 as that causes the crash in bmalloc when allocating large amounts of
2070 memory from the texture mapper's tiled backing store implementation.
2072 * CMakeLists.txt: Pass -fno-free-sra to gcc on 32bit Intel architectures.
2074 2015-07-03 Csaba Osztrogonác <ossy@webkit.org>
2076 Fix the !ENABLE(VIDEO) build after r186054
2077 https://bugs.webkit.org/show_bug.cgi?id=146592
2079 Reviewed by Eric Carlson.
2081 * platform/MemoryPressureHandler.cpp:
2082 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2084 2015-07-03 Youenn Fablet <youenn.fablet@crf.canon.fr>
2086 [Streams API] Remove ReadableStream and Reader cancel() custom binding
2087 https://bugs.webkit.org/show_bug.cgi?id=146458
2089 Reviewed by Darin Adler.
2091 Removed stream and reader cancel custom binding.
2092 Updated binding generator to correctly handle promise-based APIs with optional parameters.
2094 No behavior changes.
2096 * Modules/streams/ReadableStream.idl: Removed custom
2097 * Modules/streams/ReadableStreamReader.idl: Ditto.
2098 * bindings/js/JSReadableStreamCustom.cpp:
2099 (WebCore::JSReadableStream::cancel): Deleted.
2100 * bindings/js/JSReadableStreamReaderCustom.cpp:
2101 (WebCore::JSReadableStreamReader::cancel): Deleted.
2102 * bindings/scripts/CodeGeneratorJS.pm: Handling of promise parameter in case of optional arguments.
2103 (GenerateParametersCheck):
2104 (GenerateReturnParameters): Utility function to generate return parameters (exception and promise).
2105 * bindings/scripts/test/JS/JSTestObj.cpp:
2106 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
2107 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
2108 * bindings/scripts/test/TestObj.idl:
2111 2015-07-02 Doug Russell <d_russell@apple.com>
2113 AX: Selection change as a result of focusing an element should include that
2114 information in the intent
2115 https://bugs.webkit.org/show_bug.cgi?id=146533
2117 Reviewed by Chris Fleizach.
2119 Added focusChange flag to AXTextStateChangeIntent.
2120 Added intent support to selection logic called by Element::updateFocusAppearance().
2121 Added NSAccessibilityTextSelectionChangedFocus to mac notifications.
2123 Test: platform/mac/accessibility/selection-notification-focus-change.html
2125 * accessibility/AXObjectCache.cpp:
2126 (WebCore::AXObjectCache::postTextStateChangeNotification):
2127 * accessibility/AXTextStateChangeIntent.h:
2128 * accessibility/AccessibilityRenderObject.cpp:
2129 (WebCore::setTextSelectionIntent):
2130 (WebCore::AccessibilityRenderObject::setFocused):
2131 * accessibility/mac/AXObjectCacheMac.mm:
2132 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2134 (WebCore::Element::updateFocusAppearance):
2136 (WebCore::Element::defaultFocusTextStateChangeIntent):
2137 * editing/FrameSelection.cpp:
2138 (WebCore::FrameSelection::moveWithoutValidationTo):
2139 (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
2140 (WebCore::FrameSelection::selectAll):
2141 * editing/FrameSelection.h:
2142 * html/HTMLInputElement.cpp:
2143 (WebCore::HTMLInputElement::updateFocusAppearance):
2144 * html/HTMLTextAreaElement.cpp:
2145 (WebCore::HTMLTextAreaElement::updateFocusAppearance):
2146 * html/HTMLTextFormControlElement.cpp:
2147 (WebCore::HTMLTextFormControlElement::select):
2148 (WebCore::HTMLTextFormControlElement::setSelectionRange):
2149 (WebCore::HTMLTextFormControlElement::restoreCachedSelection):
2150 * html/HTMLTextFormControlElement.h:
2151 * page/EventHandler.cpp:
2152 (WebCore::setInitialKeyboardSelection):
2153 * page/FocusController.cpp:
2154 (WebCore::FocusController::advanceFocusInDocumentOrder):
2156 2015-07-02 Przemek Piorkowski <piorkowskiprzemyslaw@gmail.com>
2158 [EFL] test_ewk2_application_cache_manager has been failed since r185527
2159 https://bugs.webkit.org/show_bug.cgi?id=146016
2161 Reviewed by Gyuyoung Kim.
2163 In order to handle properly WebApplicationCacheManagerProxy implementation which use
2164 WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL.
2165 Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.
2167 * PlatformEfl.cmake: PublicSuffixSoup.cpp added to source files.
2169 2015-07-02 Commit Queue <commit-queue@webkit.org>
2171 Unreviewed, rolling out r186251.
2172 https://bugs.webkit.org/show_bug.cgi?id=146573
2174 caused crashes in webaudio tests (Requested by cdumez on
2179 "Ensure media playback is stopped during page close"
2180 https://bugs.webkit.org/show_bug.cgi?id=146554
2181 http://trac.webkit.org/changeset/186251
2183 2015-07-02 Brent Fulgham <bfulgham@apple.com>
2185 Ensure media playback is stopped during page close
2186 https://bugs.webkit.org/show_bug.cgi?id=146554
2187 <rdar://problem/18033944>
2189 Reviewed by Zalan Bujtas.
2191 Add new method to Page class to stop all media playback. It just uses the process
2192 MediaSessionManager singleton to inform all hosted in a particular document to stop.
2194 * Modules/webaudio/AudioContext.h:
2195 (WebCore::WebAudio::hostingDocument): Added.
2196 * html/HTMLMediaElement.h:
2197 (WebCore::HTMLMediaElement::hostingDocument): Added.
2199 (WebCore::Document::commonTeardown): Call the new PlatformMediaSessionManager::stopAllMediaPlaybackForDocument
2200 method on document cleanup.
2201 * platform/audio/PlatformMediaSession.h:
2202 Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
2203 Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
2204 * platform/audio/PlatformMediaSessionManager.cpp:
2205 (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
2206 playback on elements that match the provided document.
2207 * platform/audio/PlatformMediaSessionManager.h:
2209 2015-07-02 Dean Jackson <dino@apple.com>
2211 Tapping a video in Safari causes the video to flash gray for a quick moment
2212 https://bugs.webkit.org/show_bug.cgi?id=146570
2213 <rdar://problem/21325181>
2215 Reviewed by Brent Fulgham.
2217 On iOS, video elements should not show the tap highlight.
2222 2015-07-02 Dean Jackson <dino@apple.com>
2224 WebKit should use 80% white background for PiP indicator
2225 https://bugs.webkit.org/show_bug.cgi?id=146444
2226 <rdar://problem/21555726>
2228 Reviewed by Brent Fulgham.
2230 The designers wanted 80% white, not 80% black (r186104).
2231 I've also reverted the AirPlay background back to black.
2233 * Modules/mediacontrols/mediaControlsiOS.css:
2234 (audio::-webkit-media-controls-wireless-playback-status):
2235 (audio::-webkit-media-controls-wireless-playback-status.small):
2236 (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
2238 2015-07-02 Eric Carlson <eric.carlson@apple.com>
2240 [Mac] Clear current AirPlay source before setting another
2241 https://bugs.webkit.org/show_bug.cgi?id=145959
2243 Reviewed by Brent Fulgham.
2245 * Modules/mediasession/WebMediaSessionManager.cpp:
2246 (WebCore::WebMediaSessionManager::clientStateDidChange): Don't make a client begin playing
2247 to the target just because it has paused.
2248 (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Always select a client that
2249 requrested the picker, and never consider paused clients when choosing a client to begin
2250 playing to the targer. Call setShouldPlayToPlaybackTarget(true) after all of the other
2251 clients have been told to stop playing to the target.
2253 2015-07-02 Beth Dakin <bdakin@apple.com>
2255 Allow the UIDelegate to customize an image preview
2256 https://bugs.webkit.org/show_bug.cgi?id=146557
2258 rdar://problem/21657424
2260 Reviewed by Tim Horton.
2262 Add WEBCORE_EXPORT to use this in WK2.
2263 * loader/cache/CachedResource.h:
2264 (WebCore::CachedResource::url):
2266 2015-07-02 Brady Eidson <beidson@apple.com>
2268 Add preference to disable all http-equiv.
2269 <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
2271 Reviewed by Sam Weinig.
2273 No new tests (Covered by existing test)
2276 (WebCore::Document::processHttpEquiv):
2279 2015-07-02 Youenn Fablet <youenn.fablet@crf.canon.fr>
2281 [Streams API] Remove ReadableStreamController.enqueue() custom binding
2282 https://bugs.webkit.org/show_bug.cgi?id=146455
2284 Reviewed by Darin Adler.
2286 Made enqueue not custom. Updated error to use Default=Undefined in IDL.
2288 No change in behavior.
2290 * Modules/streams/ReadableStreamController.h:
2291 (WebCore::ReadableStreamController::error): Removed unneeded variation of error.
2292 (WebCore::ReadableStreamController::enqueue): Calling ReadableJSStream enqueue method.
2293 * Modules/streams/ReadableStreamController.idl: Updated error with Default=Undefined and made enqueue not custom.
2294 * bindings/js/JSDOMBinding.cpp:
2295 (WebCore::createDOMException): Adding support for RangeError exceptions.
2296 * bindings/js/JSReadableStreamControllerCustom.cpp:
2297 (WebCore::constructJSReadableStreamController): Deleted.
2298 * bindings/js/ReadableJSStream.cpp:
2299 (WebCore::ReadableJSStream::error): Updated to pass error value as parameter.
2300 (WebCore::ReadableJSStream::enqueue): Added exception throwing through ExceptionCode.
2301 (WebCore::ReadableJSStream::retrieveChunkSize): Ditto.
2302 * bindings/js/ReadableJSStream.h:
2303 * dom/ExceptionCode.h: Adding RangeError.
2305 2015-07-02 Brady Eidson <beidson@apple.com>
2307 [Content Extensions] Block synchronous XMLHTTPRequest.
2308 <rdar://problem/21573006> and https://bugs.webkit.org/show_bug.cgi?id=146271
2310 Reviewed by Alex Christensen.
2312 Test: http/tests/contentextensions/sync-xhr-blocked.html
2314 * loader/FrameLoader.cpp:
2315 (WebCore::FrameLoader::loadResourceSynchronously): If content blocked, set up an error, clear
2316 the response, and clear the response data.
2318 2015-07-01 Joseph Pecoraro <pecoraro@apple.com>
2320 Web Inspector: Aggregate profile call information on the backend to drastically reduce profile sizes
2321 https://bugs.webkit.org/show_bug.cgi?id=146536
2323 Reviewed by Timothy Hatcher.
2325 * inspector/TimelineRecordFactory.cpp:
2326 (WebCore::buildAggregateCallInfoInspectorObject):
2327 (WebCore::buildInspectorObject):
2328 Replace the array of Call objects with a single aggregated call info object.
2330 2015-07-01 Brent Fulgham <bfulgham@apple.com>
2332 [Win] REGRESSION (r185124) CACFLayer handling broken
2333 https://bugs.webkit.org/show_bug.cgi?id=146530
2334 <rdar://problem/21642241>
2336 Reviewed by Tim Horton.
2338 At some point in the past, the set of LayerChange flags
2339 overflowed the default MSVC enum type of 'int'. This caused
2340 Windows rendering code to not receive various update notifications.
2342 Zalan's change moved the DebugIndicatorsChanged flag into that
2343 overflow set, which made it obvious that something was wrong.
2345 The fix is to tell the compiler to use a compatible base type
2348 * platform/graphics/ca/GraphicsLayerCA.h: Prevent overflow.
2350 2015-07-01 Alex Christensen <achristensen@webkit.org>
2352 Reduce resolution of performance.now.
2353 https://bugs.webkit.org/show_bug.cgi?id=146531
2354 rdar://problem/20116796
2356 Reviewed by Simon Fraser.
2358 Test: http/tests/misc/webtiming-resolution.html
2360 * page/Performance.cpp:
2361 (WebCore::Performance::now):
2362 Floor the time returned by performance.now to the nearest 5 microseconds.
2364 2015-07-01 Eric Carlson <eric.carlson@apple.com>
2368 Reviewed by Brent Fulgham.
2370 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2371 (-[WebAVVideoLayer enterPIPModeRedirectingVideoToLayer:]): Renamed from enterOptimizedFullScreenModeRedirectingVideoToLayer.
2372 (-[WebAVVideoLayer leavePIPMode]): Renamed from leaveOptimizedFullScreenMode.
2373 (-[WebAVVideoLayer enterOptimizedFullScreenModeRedirectingVideoToLayer:]): Deleted.
2374 (-[WebAVVideoLayer leaveOptimizedFullScreenMode]): Deleted.
2376 2015-07-01 Myles C. Maxfield <mmaxfield@apple.com>
2378 [iOS] Support bold and thin italicized system fonts
2379 https://bugs.webkit.org/show_bug.cgi?id=146463
2380 <rdar://problem/20948885>
2382 Reviewed by Darin Adler.
2384 Add the italicized attribute to font descriptors.
2386 Test: fast/text/weighted-italicized-system-font.html
2388 * platform/graphics/ios/FontCacheIOS.mm:
2389 (WebCore::createCTFontWithFamilyNameAndWeight):
2390 * platform/graphics/mac/FontCacheMac.mm:
2391 (WebCore::fontWithFamilySpecialCase):
2392 (WebCore::fontWithFamily):
2393 * platform/spi/cocoa/CoreTextSPI.h:
2395 2015-07-01 Alex Christensen <achristensen@webkit.org>
2397 Fix ANGLE Windows build after r186169.
2398 https://bugs.webkit.org/show_bug.cgi?id=146532
2400 Reviewed by Brent Fulgham.
2402 * WebCore.vcxproj/WebCore.vcxproj:
2403 * WebCore.vcxproj/WebCore.vcxproj.filters:
2404 Don't compile OpenGLShims.cpp or Extensions3DOpenGL.cpp on Windows
2405 because Windows uses OpenGLES through ANGLE, not OpenGL.
2406 * platform/graphics/ANGLEWebKitBridge.h:
2407 Use OpenGLESShims.h on Windows instead of OpenGLShims.h.
2408 * platform/graphics/OpenGLESShims.h:
2409 Added needed definitions from OpenGL to compile successfully.
2410 * platform/graphics/win/GL/glext.h: Removed.
2412 2015-07-01 Dean Jackson <dino@apple.com>
2414 Disable the experimental WebGL2 implementation
2415 https://bugs.webkit.org/show_bug.cgi?id=146526
2416 <rdar://problem/21641235>
2418 Reviewed by Myles Maxfield.
2420 Add (and disable) an ENABLE_WEBGL2 flag. Also protect
2421 anything that is specific to WebGL2.
2423 Covered by running the WebGL 1.0.2 conformance suite
2424 and our LayoutTests.
2426 * Configurations/FeatureDefines.xcconfig:
2427 * bindings/js/JSCanvasRenderingContextCustom.cpp:
2429 * bindings/js/JSWebGL2RenderingContextCustom.cpp:
2430 * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
2432 * html/HTMLCanvasElement.cpp:
2433 (WebCore::HTMLCanvasElement::is3dType):
2434 * html/canvas/WebGL2RenderingContext.cpp:
2435 * html/canvas/WebGL2RenderingContext.h:
2436 * html/canvas/WebGL2RenderingContext.idl:
2437 * html/canvas/WebGLFramebuffer.cpp:
2438 (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
2439 * html/canvas/WebGLGetInfo.cpp:
2440 * html/canvas/WebGLGetInfo.h:
2441 * html/canvas/WebGLRenderingContextBase.cpp:
2442 (WebCore::WebGLRenderingContextBase::create):
2443 * html/canvas/WebGLVertexArrayObject.cpp:
2444 * html/canvas/WebGLVertexArrayObject.h:
2445 * html/canvas/WebGLVertexArrayObject.idl:
2447 2015-07-01 Chris Dumez <cdumez@apple.com>
2449 Regression(183998): Disqus comments take a very long time to load
2450 https://bugs.webkit.org/show_bug.cgi?id=146522
2451 <rdar://problem/21590601>
2453 Reviewed by Simon Fraser.
2455 Stop throttling requestAnimationFrame() in iframes that are not visible
2456 due to them being zero-sized or display:none. Those are usually utility
2457 iframes and throttling them is risky.
2459 Se still throttle requestAnimationFrame() in iframes that would be
2460 visible in theory but are currently not noticeable because they are
2461 outside the viewport.
2464 - fast/animation/request-animation-frame-throttle-subframe.html
2465 - fast/animation/request-animation-frame-throttle-subframe-display-none.html
2466 - fast/animation/request-animation-frame-throttle-subframe-zero-size.html
2468 * page/FrameView.cpp:
2469 (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
2471 2015-06-30 Ryosuke Niwa <rniwa@webkit.org>
2473 REGRESSION (r179168): Characters overlap after resizing the font on the copy-pasted Japanese text
2474 https://bugs.webkit.org/show_bug.cgi?id=146492
2476 Reviewed by Darin Adler.
2478 The bug was caused by WebKit serializing the used line-height size (e.g. 18px) in the copied content
2479 instead of string "normal" and removeStyleFromRulesAndContext failing to strip it down when text with
2480 a font that influences the line height got pasted. This is because the used value of line-height
2481 property of the context and the pasted content doesn't match when the context doesn't use the same font.
2483 Fixed the bug by not considering line-height as a list of editing properties we try to preserve. This is
2484 fine because we don't provide editing operations to directly manipulate line-height.
2486 Test: editing/pasteboard/cjk-line-height.html
2488 * editing/EditingStyle.cpp:
2489 (WebCore::editingProperties): Removed CSSPropertyLineHeight.
2491 2015-06-30 Brent Fulgham <bfulgham@apple.com>
2493 REGRESSION (r184296): View keeps scrolling upward
2494 https://bugs.webkit.org/show_bug.cgi?id=146497
2495 <rdar://problem/21524942>
2497 Reviewed by Darin Adler.
2499 Avoid improperly triggering the ScrollController wheel event handling
2500 logic when the wheel event deltaX/deltaY are zero. On certain sites,
2501 this caused a programmatic JavaScript scroll to be triggered unexpectedly,
2502 scrolling the page back to some initial state.
2504 This bug was introduced while trying to make sure scrollbars were notified
2505 when the wheel event had come to an end. Revise that change so that we still
2506 follow the right code path for non-stretchable regions. However, make sure
2507 that for zero-delta wheel events we make sure to properly handle the wheel
2510 * platform/mac/ScrollAnimatorMac.h:
2511 * platform/mac/ScrollAnimatorMac.mm:
2512 (WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent): New helper function
2513 to reduce the complexity of the logic in handleWheelEvent.
2514 (WebCore::ScrollAnimatorMac::handleWheelEvent): When wheel events should be forwarded
2515 to the parent scroll view, if the event was handled or has no change in position
2516 trigger the 'handleWheelEventPhase' logic so that scrollbars are hidden, etc.
2518 2015-06-30 Dean Jackson <dino@apple.com>
2520 Hide the inline controls when going into PiP
2521 https://bugs.webkit.org/show_bug.cgi?id=146487
2522 <rdar://problem/19881159>
2524 Reviewed by Eric Carlson.
2526 When the presentation mode is PiP, toggle a class
2527 on the container element so that we can completely
2528 hide the control toolbar. The placard should still
2531 * Modules/mediacontrols/mediaControlsiOS.css:
2532 (video::-webkit-media-controls-panel-container.picture-in-picture): Add
2533 a rule that hides the toolbar when PiP is active.
2534 * Modules/mediacontrols/mediaControlsiOS.js:
2535 (ControllerIOS.prototype.showControls):
2536 (ControllerIOS.prototype.handlePresentationModeChange): Toggle a
2537 class. Also fix a bug I noticed where exiting from PiP was
2538 not auto-hiding the controls until the user tapped.
2540 2015-07-01 Matthew Daiter <mdaiter@apple.com>
2542 Enable MEDIA_STREAM flag
2543 https://bugs.webkit.org/show_bug.cgi?id=145947
2544 <rdar://problem/21365829>
2546 Reviewed by Eric Carlson.
2548 * Configurations/FeatureDefines.xcconfig: Added MEDIA_STREAM flag
2549 * Modules/mediastream/MediaStreamTrack.h:
2550 * WebCore.xcodeproj/project.pbxproj: Changed project headers to
2552 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2553 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2554 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2555 * platform/mediastream/RealtimeMediaSource.h:
2556 * platform/mediastream/mac/AVAudioCaptureSource.mm:
2557 * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2558 (WebCore::refreshCaptureDeviceList): Deleted.
2559 * platform/mediastream/mac/AVMediaCaptureSource.mm:
2560 (WebCore::AVMediaCaptureSource::startProducingData):
2561 (WebCore::AVMediaCaptureSource::stopProducingData):
2563 2015-07-01 Brent Fulgham <bfulgham@apple.com>
2565 REGRESSION (r185016): Intermittent crash in WebCore::TextTrackList::remove
2566 https://bugs.webkit.org/show_bug.cgi?id=146493
2567 <rdar://problem/21511122>
2569 Reviewed by Eric Carlson.
2571 The m_textTracks member is frequently null checked during other operations, but
2572 was not checked during track removal. This needs to be corrected.
2574 * html/HTMLMediaElement.cpp:
2575 (WebCore::HTMLMediaElement::removeTextTrack): Check that m_textTracks is
2576 not null before using it during track removal.
2578 2015-07-01 Antti Koivisto <antti@apple.com>
2580 PNG mask images are loaded with Accept:image/svg+xml
2581 https://bugs.webkit.org/show_bug.cgi?id=146509
2582 rdar://problem/21584740
2584 Reviewed by Simon Fraser.
2586 For some strange reason MaskImageOperation code loads all mask images, including non-SVG ones
2587 using CachedSVGDocument. Resulting bad accept header may cause server to reject the request.
2589 This is far from ideal but as a quick fix we can override the accept header for mask images to
2590 allow any image type.
2592 Test: http/tests/misc/mask-image-accept.html
2594 * loader/cache/CachedResourceLoader.cpp:
2595 (WebCore::CachedResourceLoader::requestResource):
2596 * loader/cache/CachedResourceRequest.h:
2597 (WebCore::CachedResourceRequest::acceptOverride):
2598 (WebCore::CachedResourceRequest::setAcceptOverride):
2599 * loader/cache/CachedSVGDocumentReference.cpp:
2600 (WebCore::CachedSVGDocumentReference::load):
2601 * loader/cache/CachedSVGDocumentReference.h:
2602 (WebCore::CachedSVGDocumentReference::loadRequested):
2603 (WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType):
2604 (WebCore::CachedSVGDocumentReference::document):
2605 * platform/graphics/MaskImageOperation.cpp:
2606 (WebCore::MaskImageOperation::ensureCachedSVGDocumentReference):
2608 2015-07-01 Jer Noble <jer.noble@apple.com>
2610 [MSE] Failures on W3C media-source tests regarding MIME types
2611 https://bugs.webkit.org/show_bug.cgi?id=146499
2613 Reviewed by Eric Carlson.
2615 Tests: http/tests/media/media-source/SourceBuffer-abort-readyState.html
2616 http/tests/media/media-source/SourceBuffer-abort-removed.html
2617 http/tests/media/media-source/SourceBuffer-abort-updating.html
2618 http/tests/media/media-source/SourceBuffer-abort.html
2620 Multiple failures in the W3C media-source test suite due to two failures in isTypeSupported MIME type handling:
2621 - MIME types without codec strings were being rejected.
2622 - MIME types with codec strings which are rejected by the system are being reported as supported.
2624 For the first, stop rejecting MIME types with non-existent codec strings. For MIME types which do have non-empty
2625 codec strings, treat a "Maybe" response as unsupported.
2627 * Modules/mediasource/MediaSource.cpp:
2628 (WebCore::MediaSource::isTypeSupported):
2630 2015-06-30 Alex Christensen <achristensen@webkit.org>
2632 Update ANGLE to b11e2483742db884bd0af41f78f528240577356b.
2633 https://bugs.webkit.org/show_bug.cgi?id=145010
2635 Reviewed by Dean Jackson.
2638 * platform/graphics/ANGLEWebKitBridge.cpp:
2639 (WebCore::appendSymbol):
2640 (WebCore::getStructInfo):
2641 (WebCore::getSymbolInfo):
2642 (WebCore::ANGLEWebKitBridge::cleanupCompilers):
2643 (WebCore::ANGLEWebKitBridge::compileShaderSource):
2644 (WebCore::getValidationResultValue): Deleted.
2645 * platform/graphics/ANGLEWebKitBridge.h:
2646 (WebCore::ANGLEShaderSymbol::isSampler):
2647 * platform/graphics/GraphicsContext3D.h:
2648 (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo):
2649 * platform/graphics/mac/GraphicsContext3DMac.mm:
2650 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2651 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2652 (WebCore::GraphicsContext3D::checkVaryingsPacking):
2653 (WebCore::GraphicsContext3D::precisionsMatch):
2654 Update WebCore to reflect changes in ANGLE.
2656 2015-06-30 Zalan Bujtas <zalan@apple.com>
2658 Frame flattening: Hit-testing an iframe could end up destroying the associated inline tree context.
2659 https://bugs.webkit.org/show_bug.cgi?id=146447
2660 rdar://problem/20613501
2662 Reviewed by Simon Fraser.
2664 This patch ensures that the render tree associated with the document on which
2665 the hit-test is initiated does not get laid out, unless it was directly mutated prior to the hittest.
2667 Hit-test requirements:
2668 1. A clean the render tree before hit-testing gets propagated to the renderers.
2669 Document::updateLayout() ensures it by calling both updateStyleIfNeeded() and layout() not only on the current tree, but also
2670 on the ancestors if needed.
2672 2. No render tree mutation while hit-testing the renderers.
2674 When an iframe is being hit-tested, this hit-test could bubble down to the child frame's render view.
2675 In order to ensure #1, we call Document::updateLayout() on the current (subframe) document.
2676 If updateStyleIfNeeded() mutates the render tree, we mark it dirty for layout(). However frame flattening also
2677 marks the parent renderer (RenderIFrame) dirty.
2678 While calling layout() to clean the current render tree, we end up laying out the parent tree too.
2679 Laying out the parent tree could end up destroying the inline tree context from where the
2680 hittest just bubbled down. (InlineFlowBox -> RenderWidget -> RenderView).
2682 This patch protects the render tree from such unintentional inline tree mutation during hittesting.
2683 After the initial layout we set a layout disallow flag on the frame view to defer subsequent layouts.
2684 This patch only changes behavior when frame flattening is enabled, but in future we may always want to enable this.
2686 Test: fast/frames/flattening/hittest-iframe-while-style-changes-crash.html
2688 * page/FrameView.cpp:
2689 (WebCore::FrameView::layout):
2690 (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded): Deleted. -> Assertion in no longer valid.
2692 * rendering/RenderView.cpp:
2693 (WebCore::FrameFlatteningLayoutDisallower::FrameFlatteningLayoutDisallower):
2694 (WebCore::FrameFlatteningLayoutDisallower::~FrameFlatteningLayoutDisallower):
2695 (WebCore::RenderView::hitTest): Protect the render tree from subsequent layouts.
2697 2015-06-30 Andy VanWagoner <thetalecrafter@gmail.com>
2699 Implement ECMAScript Internationalization API
2700 https://bugs.webkit.org/show_bug.cgi?id=90906
2702 Reviewed by Benjamin Poulain.
2706 * Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag
2708 2015-06-30 Wenson Hsieh <whsieh@berkeley.edu>
2710 scroll-snap-points do not work very well with mechanical scroll wheel events
2711 https://bugs.webkit.org/show_bug.cgi?id=142501
2712 <rdar://problem/20093511>
2714 Reviewed by Brent Fulgham.
2716 Stateless scroll events generated by scrolling with a mechanical mouse wheel now trigger scroll
2717 snapping after a fixed delay.
2719 Test: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html
2721 * platform/cocoa/ScrollController.h: Added member to track stateless scrolling.
2722 * platform/cocoa/ScrollController.mm: Added constant for delay for stateless scroll snapping.
2723 (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Triggers timer upon stateless scroll events.
2724 (WebCore::ScrollController::horizontalScrollSnapTimerFired): Timer now handles stateless scrolling updates.
2725 (WebCore::ScrollController::verticalScrollSnapTimerFired): See above.
2726 (WebCore::ScrollController::beginScrollSnapAnimation): Handles stateless scroll snapping.
2728 2015-06-30 Simon Fraser <simon.fraser@apple.com>
2730 Try to fix Gtk and EFL builds.
2732 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2733 (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
2734 (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
2735 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2736 * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2737 (WebCore::CompositingCoordinator::flushPendingLayerChanges):
2738 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2739 (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
2740 (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
2741 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2743 2015-06-30 Simon Fraser <simon.fraser@apple.com>
2745 [iOS] Missing tiles inside position:fixed on scrolling
2746 https://bugs.webkit.org/show_bug.cgi?id=146485
2747 rdar://problem/21226861
2749 Reviewed by Tim Horton.
2751 Layer flushing adjusts the coverage rect for tiled layers, but does so at times
2752 when position:fixed layers are moved around by the scrolling tree. The computed
2753 coverage rect then doesn't reflect the layer's on-screen position, causing missing
2756 Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
2757 that state into the layer flush. When not in a stable state, flushing doesn't change
2758 the visible and coverage rects for layers that are viewport-constrained.
2760 * page/FrameView.cpp:
2761 (WebCore::FrameView::reset):
2762 * page/FrameView.h: Remove some velocity-related data members that were unused.
2763 * platform/graphics/GraphicsLayer.h:
2764 (WebCore::GraphicsLayer::flushCompositingState):
2765 (WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
2766 * platform/graphics/ca/GraphicsLayerCA.cpp:
2767 (WebCore::GraphicsLayerCA::flushCompositingState):
2768 (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
2769 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): If this is a viewport-constrained
2770 layer, and the viewport is not stable, don't touch the rects.
2771 (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2772 * platform/graphics/ca/GraphicsLayerCA.h:
2773 (WebCore::GraphicsLayerCA::CommitState::CommitState):
2774 * rendering/RenderLayerCompositor.cpp:
2775 (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2777 2015-06-30 Simon Fraser <simon.fraser@apple.com>
2779 Rename GraphicsLayer's allowsBackingStoreDetachment to isViewportConstrained
2780 https://bugs.webkit.org/show_bug.cgi?id=146483
2782 Reviewed by Tim Horton.
2784 What GraphicsLayer really needs to know is whether some other thread/process
2785 is moving its platform layers around behind its back, and this is is better
2786 expressed as "isViewportConstrained" rather than "allowsBackingStoreDetachment".
2788 The sense of the flag is flipped, and boolean logic adjusted accordingly.
2790 * platform/graphics/GraphicsLayer.h:
2791 (WebCore::GraphicsLayer::setIsViewportConstrained):
2792 (WebCore::GraphicsLayer::isViewportConstrained):
2793 (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment): Deleted.
2794 (WebCore::GraphicsLayer::allowsBackingStoreDetachment): Deleted.
2795 * platform/graphics/ca/GraphicsLayerCA.cpp:
2796 (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2797 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2798 (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2799 * platform/graphics/ca/GraphicsLayerCA.h:
2800 * rendering/RenderLayerBacking.cpp:
2801 (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole):
2803 2015-06-30 Dean Jackson <dino@apple.com>
2805 CABackdropFilter should set windowServerAware to false
2806 https://bugs.webkit.org/show_bug.cgi?id=146469
2807 <rdar://problem/21618614>
2809 Reviewed by Simon Fraser.
2811 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2812 (PlatformCALayerCocoa::PlatformCALayerCocoa): Set windowServerAware
2813 to false on Mac (it's not available on iOS).
2815 2015-06-30 Chris Dumez <cdumez@apple.com>
2818 https://bugs.webkit.org/show_bug.cgi?id=146470
2819 <rdar://problem/21349934>
2821 Unreviewed, rolling out <http://trac.webkit.org/changeset/175171>. It
2822 wasn't a huge win and Brady says it caused crash at
2823 <rdar://problem/21349934>.
2825 * platform/network/cf/ResourceRequest.h:
2826 * platform/network/cocoa/ResourceRequestCocoa.mm:
2827 (WebCore::ResourceRequest::doUpdatePlatformRequest):
2828 (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2830 2015-06-30 Matt Baker <mattbaker@apple.com>
2832 Web Inspector: Reduce rendering frames "Other" time by instrumenting compositing
2833 https://bugs.webkit.org/show_bug.cgi?id=146168
2835 Reviewed by Brian Burg.
2837 Added Inspector instrumentation for measuring CoreAnimation compositing time. We mark the start of a composite
2838 event when the LayerFlushScheduler triggers a scheduled layer flush. InspectorController now exports a function
2839 for marking the end of the composite event, which should be called during the CA transaction post-commit phase
2840 (based on platform support). Lacking platform support, the event is considered complete after CoreAnimation
2841 runloop observers have run.
2843 * inspector/InspectorController.cpp:
2844 (WebCore::InspectorController::didComposite):
2845 * inspector/InspectorController.h:
2846 New export for instrumentation in WebKit2.
2848 * inspector/InspectorInstrumentation.cpp:
2849 (WebCore::InspectorInstrumentation::willCompositeImpl):
2850 (WebCore::InspectorInstrumentation::didCompositeImpl):
2851 * inspector/InspectorInstrumentation.h:
2852 (WebCore::InspectorInstrumentation::willComposite):
2853 (WebCore::InspectorInstrumentation::didComposite):
2854 Plumbing for new instrumentation.
2856 * inspector/InspectorTimelineAgent.cpp:
2857 (WebCore::InspectorTimelineAgent::internalStart):
2858 (WebCore::InspectorTimelineAgent::internalStop):
2859 (WebCore::InspectorTimelineAgent::willComposite):
2860 (WebCore::InspectorTimelineAgent::didComposite):
2861 (WebCore::toProtocol):
2862 * inspector/InspectorTimelineAgent.h:
2863 New Composite event type and instrumentation.
2865 * page/FrameView.cpp:
2866 (WebCore::FrameView::flushCompositingStateIncludingSubframes):
2867 Hook for start of compositing.
2869 * platform/spi/cocoa/QuartzCoreSPI.h:
2870 New header include and interface declaration.
2872 2015-06-30 Beth Dakin <bdakin@apple.com>
2874 The bounds on InteractionInformationAtPosition should be more precise
2875 https://bugs.webkit.org/show_bug.cgi?id=146468
2877 rdar://problem/20739834
2879 Reviewed by Enrica Casucci and Simon Fraser.
2881 Export absoluteContentQuad().
2882 * rendering/RenderBox.h:
2884 2015-06-30 Zalan Bujtas <zalan@apple.com>
2886 Addressing post-review comments in r185756.
2888 * html/RubyTextElement.cpp:
2889 (WebCore::RubyTextElement::createElementRenderer):
2891 2015-06-30 Zalan Bujtas <zalan@apple.com>
2893 Addressing post-review comments in r185916
2895 * platform/LayoutUnit.h:
2896 (WebCore::roundToDevicePixel):
2898 2015-06-30 Matt Rajca <mrajca@apple.com>
2900 MediaSession: Use setSessionInternal to set the default media session in HTMLMediaElement's constructor
2901 https://bugs.webkit.org/show_bug.cgi?id=146465
2903 Reviewed by Eric Carlson.
2905 * html/HTMLMediaElement.cpp:
2906 (WebCore::HTMLMediaElement::HTMLMediaElement):
2908 2015-06-30 Matt Rajca <mrajca@apple.com>
2910 Media Session: implement algorithm for updating a media element's session (6.1)
2911 https://bugs.webkit.org/show_bug.cgi?id=146460
2913 Reviewed by Darin Adler.
2915 In addition to storing a pointer to the new media session, we now:
2917 - pause the media element if it is 'active' in the current media session
2918 - remove the media element from the current media session
2919 - release the current media session if there are no more active media elements
2920 - set the default media session if the new media session is null
2921 - update the 'kind' attribute to match the kind of the new media session
2923 * Modules/mediasession/MediaSession.cpp:
2924 (WebCore::MediaSession::isMediaElementActive):
2925 (WebCore::MediaSession::hasActiveMediaElements):
2926 * Modules/mediasession/MediaSession.h:
2927 * html/HTMLMediaElement.cpp:
2928 (WebCore::HTMLMediaElement::setSession):
2929 (WebCore::HTMLMediaElement::setSessionInternal):
2930 * html/HTMLMediaElement.h:
2932 2015-06-29 Anders Carlsson <andersca@apple.com>
2934 Get rid of unused WKSI functions
2935 https://bugs.webkit.org/show_bug.cgi?id=146443
2937 Reviewed by Tim Horton.
2939 * platform/graphics/cg/PathCG.cpp:
2940 (WebCore::Path::platformAddPathForRoundedRect):
2941 Just call CGPathAddRoundedRect directly.
2943 * platform/ios/WebCoreSystemInterfaceIOS.mm:
2944 * platform/mac/WebCoreSystemInterface.h:
2945 * platform/mac/WebCoreSystemInterface.mm:
2947 2015-06-30 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
2949 [Streams API] Finish pulling must always be done asynchronously as it is the expected promise behavior (according to the spec)
2950 https://bugs.webkit.org/show_bug.cgi?id=146408
2952 Reviewed by Darin Adler.
2954 Current tests cover the case already.
2956 * Modules/streams/ReadableStream.cpp:
2957 (WebCore::ReadableStream::pull): Call finishPull() in a postTask to delay it and simulate the promise
2960 2015-06-30 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
2962 [Streams API] Synced bad strategy test with reference implementation
2963 https://bugs.webkit.org/show_bug.cgi?id=146411
2965 Reviewed by Darin Adler.
2967 Current tests cover the case.
2969 * bindings/js/ReadableJSStream.cpp:
2970 (WebCore::ReadableJSStream::retrieveChunkSize): Check for negative size then running the JavaScript function.
2972 2015-06-30 Youenn Fablet <youenn.fablet@crf.canon.fr>
2974 [Streams API] Remove ReadableStream.getReader() custom binding
2975 https://bugs.webkit.org/show_bug.cgi?id=146404
2977 Reviewed by Darin Adler.
2979 Covered by existing tests.
2981 * Modules/streams/ReadableStream.cpp:
2982 (WebCore::ReadableStream::getReader): Updated to take an exception.
2983 * Modules/streams/ReadableStream.h:
2984 * Modules/streams/ReadableStream.idl: Updated to remove custom binding.
2985 * bindings/js/JSReadableStreamCustom.cpp:
2986 (WebCore::JSReadableStream::getReader): Deleted.
2987 * bindings/js/JSReadableStreamReaderCustom.cpp:
2988 (WebCore::constructJSReadableStreamReader): Updated to pass an exception to getReader.
2990 2015-06-29 Youenn Fablet <youenn.fablet@crf.canon.fr>
2992 [Streams API] ReadableStreamReader.closed should use DOMPromise
2993 https://bugs.webkit.org/show_bug.cgi?id=146406
2995 Reviewed by Darin Adler.
2997 Added storage of ClosedPromise as Optional of ReadableStream.
2998 Updated code accordingly.
3000 Covered by existing tests.
3002 * Modules/streams/ReadableStream.cpp:
3003 (WebCore::ReadableStream::clearCallbacks):
3004 (WebCore::ReadableStream::releaseReader):
3005 (WebCore::ReadableStream::changeStateToErrored):
3006 (WebCore::ReadableStream::closed):
3007 * Modules/streams/ReadableStream.h:
3008 * Modules/streams/ReadableStreamReader.cpp:
3009 (WebCore::ReadableStreamReader::closed):
3010 * Modules/streams/ReadableStreamReader.h:
3011 * bindings/js/JSReadableStreamReaderCustom.cpp:
3012 (WebCore::JSReadableStreamReader::closed):
3014 2015-06-29 Simon Fraser <simon.fraser@apple.com>
3016 [iOS WK2] WKWebViews in Facebook app start off black
3017 https://bugs.webkit.org/show_bug.cgi?id=146445
3018 rdar://problem/21600433
3020 Reviewed by Tim Horton.
3022 If -isOpaque is toggled on a WKWebView, we failed to make the page tiles non-opaque
3023 for a while. After r183775, RenderLayerCompositor::rootBackgroundTransparencyChanged() was called,
3024 but only considered the computed document background color, and not the view transparency.
3026 Fix by having rootBackgroundTransparencyChanged() simply use viewHasTransparentBackground(),
3027 which checks the FrameView transparency. Now we just need to store a transparency bool rather
3028 than the old color (we only checked its alpha anyway).
3030 * rendering/RenderLayerCompositor.cpp:
3031 (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
3033 2015-06-29 Dean Jackson <dino@apple.com>
3035 WebKit should use 80% black background for PiP indicator
3036 https://bugs.webkit.org/show_bug.cgi?id=146444
3037 <rdar://problem/21555726>
3039 Reviewed by Sam Weinig.
3041 Change the black background to a slightly less black background.
3042 This also involved making the placard artwork white, in order
3043 to keep it visible against the new grey.
3045 * Modules/mediacontrols/mediaControlsiOS.css:
3046 (audio::-webkit-media-controls-wireless-playback-status):
3047 (audio::-webkit-media-controls-wireless-playback-status.small):
3048 (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
3050 2015-06-29 Brady Eidson <beidson@apple.com>
3052 Flag sync XHRs from the network process so they can be handled appropriately.
3053 <rdar://problem/21579162> and https://bugs.webkit.org/show_bug.cgi?id=146441
3055 Reviewed by Darin Adler.
3057 * platform/network/ResourceHandleClient.h:
3058 (WebCore::ResourceHandleClient::loadingSynchronousXHR): Added so clients of asynchronous
3059 loads can signal they should be treated like synchronous loads at the platform level.
3061 * platform/network/cf/ResourceHandleCFNet.cpp:
3062 (WebCore::ResourceHandle::start): Adjust SchedulingBehavior based on the client.
3064 * platform/network/mac/ResourceHandleMac.mm:
3065 (WebCore::ResourceHandle::start): Adjust SchedulingBehavior based on the client.
3067 2015-06-29 Chris Fleizach <cfleizach@apple.com>
3069 AX: PlatformSpeechSynthesizer code doesn't catch Objective-C exceptions
3070 https://bugs.webkit.org/show_bug.cgi?id=146419
3072 Reviewed by Simon Fraser.
3074 Make sure ObjC exception resulting from calling into the platform cause problems in WebKit.
3076 * platform/ios/PlatformSpeechSynthesizerIOS.mm:
3077 (-[WebSpeechSynthesisWrapper speakUtterance:]):
3078 (-[WebSpeechSynthesisWrapper pause]):
3079 (-[WebSpeechSynthesisWrapper resume]):
3080 (-[WebSpeechSynthesisWrapper cancel]):
3081 (-[WebSpeechSynthesisWrapper speechSynthesizer:didStartSpeechUtterance:]):
3082 (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
3083 (WebCore::PlatformSpeechSynthesizer::pause):
3085 2015-06-29 Matt Rajca <mrajca@apple.com>
3087 Removing an element from a media session should also remove it from the sets of active participating elements
3088 https://bugs.webkit.org/show_bug.cgi?id=146420
3090 Reviewed by Eric Carlson.
3092 * Modules/mediasession/MediaSession.cpp:
3093 (WebCore::MediaSession::removeMediaElement):
3095 2015-06-29 Dean Jackson <dino@apple.com>
3097 Temporarily disable PICTURE_SIZES
3098 https://bugs.webkit.org/show_bug.cgi?id=146435
3099 <rdar://problem/21087013>
3101 Reviewed by Tim Horton.
3103 Temporarily disable PICTURE_SIZES because it causes problems with out
3104 of date <picture> polyfills.
3106 * Configurations/FeatureDefines.xcconfig:
3108 2015-06-29 Tim Horton <timothy_horton@apple.com>
3112 * editing/cocoa/HTMLConverter.mm:
3113 * platform/spi/cocoa/NSAttributedStringSPI.h:
3115 2015-06-29 Tim Horton <timothy_horton@apple.com>
3119 * platform/spi/cocoa/NSAttributedStringSPI.h:
3121 2015-06-29 Tim Horton <timothy_horton@apple.com>
3125 * platform/spi/cocoa/NSAttributedStringSPI.h:
3127 2015-06-27 Ryosuke Niwa <rniwa@webkit.org>
3129 Font panel doesn't get updated when bolding text via cmd+b in Mail on OS X
3130 https://bugs.webkit.org/show_bug.cgi?id=146379
3132 Reviewed by Darin Adler.
3134 The bug was caused by WebKit not updating the font panel when the typing style changes.
3135 There was also a bug that WebKit never updated font attributes on OS X.
3137 Fixed the bugs by always updating the font panel after applying style instead of only
3138 when the selection changes and setting the font attributes.
3140 I tried really had to write a WebKit API test but I couldn't get it to work so there are
3143 * WebCore.xcodeproj/project.pbxproj:
3144 * editing/Editor.cpp:
3145 (WebCore::Editor::applyStyle):
3146 (WebCore::Editor::shouldApplyStyle):
3147 (WebCore::Editor::applyParagraphStyle):
3148 (WebCore::Editor::applyStyleToSelection):
3149 (WebCore::Editor::applyParagraphStyleToSelection):
3150 (WebCore::Editor::selectionStartHasStyle):
3151 (WebCore::Editor::document):
3152 (WebCore::Editor::styleForSelectionStart): Deleted.
3154 * editing/cocoa/EditorCocoa.h: Added. Shares the declaration for NSUnderlineStyle in iOS.
3155 * editing/cocoa/EditorCocoa.mm: Added.
3156 (WebCore::Editor::styleForSelectionStart): Moved from Editor.cpp
3157 (WebCore::Editor::getTextDecorationAttributesRespectingTypingStyle): Extracted from iOS's
3158 fontAttributesForSelectionStart implementation.
3159 * editing/cocoa/HTMLConverter.mm:
3160 * editing/ios/EditorIOS.mm:
3161 (WebCore::Editor::fontAttributesForSelectionStart):
3162 * editing/mac/EditorMac.mm:
3163 (WebCore::Editor::fontAttributesForSelectionStart):
3164 * loader/EmptyClients.h:
3165 * page/EditorClient.h:
3167 2015-06-29 Matt Rajca <mrajca@apple.com>
3169 MediaSession: use a HashSet for the collection of participating elements
3170 https://bugs.webkit.org/show_bug.cgi?id=146421
3172 Reviewed by Eric Carlson.
3174 * Modules/mediasession/MediaSession.cpp:
3175 (WebCore::MediaSession::addMediaElement):
3176 (WebCore::MediaSession::removeMediaElement):
3177 * Modules/mediasession/MediaSession.h:
3179 2015-06-29 Dean Jackson <dino@apple.com>
3181 Setting to enable/disable media controls sizing on page zoom
3182 https://bugs.webkit.org/show_bug.cgi?id=146423
3183 <rdar://problem/18379634>
3185 Reviewed by Eric Carlson.
3187 Add a new setting "MediaControlsScaleWithPageZoom" that can disable
3188 the behaviour we currently implement on iOS, where the media controls
3189 attempt to remain at a fixed size independent of page zoom.
3191 * html/HTMLMediaElement.cpp:
3192 (WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Do not
3193 set this value to true if the new setting is disabled.
3194 * page/Settings.cpp:
3195 * page/Settings.in: Add the new setting.
3197 2015-06-29 Adam Bergkvist <adam.bergkvist@ericsson.com>
3199 WebRTC: Update the MediaStream API
3200 https://bugs.webkit.org/show_bug.cgi?id=146313
3202 Reviewed by Eric Carlson.
3204 Update the MediaStream API (MediaStream, MediaStreamTrack and
3205 RealtimeMediaSource) to match the Media Capture and Stream
3206 specification [1]. Notable changes:
3208 Updated event handling to synchronously update corresponding
3209 state/attributes as events are dispatched.
3211 Removed 'new' state from MediaStreamTrack. A track is either 'live' or
3212 'ended'. As a consequence 'started' event is also removed.
3214 MediaStreamTrack always has a source (disconnected source concept was
3215 removed from the spec). Therefore, more state can be kept at the source
3218 Calculate MediaStream.active internally, from the track set, instead of
3219 setting it externally.
3221 Updated RealtimeMediaSource Observer interface.
3223 Replaced MediaStream's separate audio and video track lists with a
3224 single track set (more aligned with spec).
3226 Updated MediaStream constructor to adopt instead of clone track
3227 arguments (or tracks from MediaStream argument).
3229 Removed MediaStreamTrack.getSources() and corresponding test (removed
3232 Test status: 3 added, 8 existing enabled (some updated) and 1 removed.
3234 [1] http://w3c.github.io/mediacapture-main/archives/20150523/getusermedia.html
3236 Tests: fast/mediastream/MediaStreamTrack-clone.html
3237 fast/mediastream/MediaStreamTrack-kind.html
3238 fast/mediastream/MediaStreamTrack-stop.html
3240 * Modules/mediastream/MediaStream.cpp:
3241 (WebCore::MediaStream::create):
3242 (WebCore::MediaStream::MediaStream):
3243 (WebCore::MediaStream::clone):
3244 (WebCore::MediaStream::addTrack):
3245 (WebCore::MediaStream::removeTrack):
3246 (WebCore::MediaStream::getTrackById):
3247 (WebCore::MediaStream::getAudioTracks):
3248 (WebCore::MediaStream::getVideoTracks):
3249 (WebCore::MediaStream::getTracks):
3250 (WebCore::MediaStream::contextDestroyed):
3251 (WebCore::MediaStream::trackDidEnd):
3252 (WebCore::MediaStream::activeStatusChanged):
3253 (WebCore::MediaStream::didAddTrackToPrivate):
3254 (WebCore::MediaStream::didRemoveTrackFromPrivate):
3255 (WebCore::MediaStream::internalAddTrack):
3256 (WebCore::MediaStream::internalRemoveTrack):
3257 (WebCore::MediaStream::scheduleActiveStateChange):
3258 (WebCore::MediaStream::activityEventTimerFired):
3259 (WebCore::MediaStream::trackVectorForType):
3260 (WebCore::MediaStream::~MediaStream): Deleted.
3261 (WebCore::MediaStream::registry): Deleted.
3262 (WebCore::MediaStream::addObserver): Deleted.
3263 (WebCore::MediaStream::removeObserver): Deleted.
3264 * Modules/mediastream/MediaStream.h:
3265 * Modules/mediastream/MediaStream.idl:
3266 * Modules/mediastream/MediaStreamTrack.cpp:
3267 (WebCore::MediaStreamTrack::MediaStreamTrack):
3268 (WebCore::MediaStreamTrack::~MediaStreamTrack):
3269 (WebCore::MediaStreamTrack::kind):
3270 (WebCore::MediaStreamTrack::id):
3271 (WebCore::MediaStreamTrack::label):
3272 (WebCore::MediaStreamTrack::enabled):
3273 (WebCore::MediaStreamTrack::setEnabled):
3274 (WebCore::MediaStreamTrack::muted):
3275 (WebCore::MediaStreamTrack::readonly):
3276 (WebCore::MediaStreamTrack::remote):
3277 (WebCore::MediaStreamTrack::readyState):
3278 (WebCore::MediaStreamTrack::ended):
3279 (WebCore::MediaStreamTrack::clone):
3280 (WebCore::MediaStreamTrack::stopProducingData):
3281 (WebCore::MediaStreamTrack::states):
3282 (WebCore::MediaStreamTrack::getCapabilities):
3283 (WebCore::MediaStreamTrack::applyConstraints):
3284 (WebCore::MediaStreamTrack::trackEnded):
3285 (WebCore::MediaStreamTrack::trackMutedChanged):
3286 (WebCore::MediaStreamTrack::stop):
3287 (WebCore::MediaStreamTrack::getConstraints): Deleted.
3288 (WebCore::MediaStreamTrack::addObserver): Deleted.
3289 (WebCore::MediaStreamTrack::removeObserver): Deleted.
3290 (WebCore::MediaStreamTrack::configureTrackRendering): Deleted.
3291 (WebCore::MediaStreamTrack::activeDOMObjectName): Deleted.
3292 (WebCore::MediaStreamTrack::canSuspendForPageCache): Deleted.
3293 * Modules/mediastream/MediaStreamTrack.h:
3294 * Modules/mediastream/MediaStreamTrack.idl:
3295 * Modules/mediastream/RTCPeerConnection.cpp:
3296 (WebCore::RTCPeerConnection::didRemoveRemoteStream): Deleted.
3297 * Modules/mediastream/UserMediaRequest.cpp:
3298 (WebCore::UserMediaRequest::didCreateStream):
3299 * platform/mediastream/MediaStreamPrivate.cpp:
3300 (WebCore::MediaStreamPrivate::create):
3301 (WebCore::MediaStreamPrivate::MediaStreamPrivate):
3302 (WebCore::MediaStreamPrivate::tracks):
3303 (WebCore::MediaStreamPrivate::updateActiveState):
3304 (WebCore::MediaStreamPrivate::addTrack):
3305 (WebCore::MediaStreamPrivate::removeTrack):
3306 * platform/mediastream/MediaStreamPrivate.h:
3307 (WebCore::MediaStreamPrivate::active): Deleted.
3308 * platform/mediastream/MediaStreamTrackPrivate.cpp:
3309 (WebCore::MediaStreamTrackPrivate::create):
3310 (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
3311 (WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
3312 (WebCore::MediaStreamTrackPrivate::label):
3313 (WebCore::MediaStreamTrackPrivate::setEnabled):
3314 (WebCore::MediaStreamTrackPrivate::endTrack):
3315 (WebCore::MediaStreamTrackPrivate::clone):
3316 (WebCore::MediaStreamTrackPrivate::type):
3317 (WebCore::MediaStreamTrackPrivate::applyConstraints):
3318 (WebCore::MediaStreamTrackPrivate::sourceStopped):
3319 (WebCore::MediaStreamTrackPrivate::sourceMutedChanged):
3320 (WebCore::MediaStreamTrackPrivate::preventSourceFromStopping):
3321 (WebCore::MediaStreamTrackPrivate::muted): Deleted.
3322 (WebCore::MediaStreamTrackPrivate::readonly): Deleted.
3323 (WebCore::MediaStreamTrackPrivate::remote): Deleted.
3324 (WebCore::MediaStreamTrackPrivate::constraints): Deleted.
3325 (WebCore::MediaStreamTrackPrivate::states): Deleted.
3326 (WebCore::MediaStreamTrackPrivate::capabilities): Deleted.
3327 * platform/mediastream/MediaStreamTrackPrivate.h:
3328 (WebCore::MediaStreamTrackPrivate::id):
3329 (WebCore::MediaStreamTrackPrivate::ended):
3330 (WebCore::MediaStreamTrackPrivate::enabled):
3331 (WebCore::MediaStreamTrackPrivate::setClient):
3332 (WebCore::MediaStreamTrackPrivate::source): Deleted.
3333 (WebCore::MediaStreamTrackPrivate::client): Deleted.
3334 * platform/mediastream/RealtimeMediaSource.cpp:
3335 (WebCore::RealtimeMediaSource::RealtimeMediaSource):
3336 (WebCore::RealtimeMediaSource::reset):
3337 (WebCore::RealtimeMediaSource::setMuted):
3338 (WebCore::RealtimeMediaSource::readonly):
3339 (WebCore::RealtimeMediaSource::stop):
3340 (WebCore::RealtimeMediaSource::requestStop):
3341 (WebCore::RealtimeMediaSource::addObserver): Deleted.
3342 (WebCore::RealtimeMediaSource::removeObserver): Deleted.
3343 * platform/mediastream/RealtimeMediaSource.h:
3344 (WebCore::RealtimeMediaSource::stopped):
3345 (WebCore::RealtimeMediaSource::id): Deleted.
3346 (WebCore::RealtimeMediaSource::muted): Deleted.
3347 (WebCore::RealtimeMediaSource::setReadonly): Deleted.
3348 * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
3349 (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Deleted.
3350 * platform/mock/MockRealtimeMediaSourceCenter.cpp:
3351 (WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Deleted.
3353 2015-06-29 Benjamin Poulain <benjamin@webkit.org>
3355 Make the NFA transitions range-based
3356 https://bugs.webkit.org/show_bug.cgi?id=146338
3358 Reviewed by Alex Christensen.
3360 Change the NFA to use range based transition for any kind of transition.
3361 The fallback transition is also absorbed as ranges.
3363 Previously, the NFA would only have single transitions and a fallback
3364 transition for all cases not covered by single transitions.
3366 The problem with that design was that character ranges (e.g. [a-z]) were
3367 extended as individual transitions. Something like [^a] would cover
3368 most of the alphabet with transitions.
3369 When converting the NFA to DFA, the time is proportional to the number of states
3370 multiplied by the number of transitions. With many individual transitions,
3371 the run time was an order of magnitude higher than what we want.
3373 This patch changes the NFA to only handle ranges of characters. A single transition
3374 becomes a range with the character as first and last character in the range
3375 ('a' becomes 'a' to 'a').
3376 Ranges of characters are handled direclty (e.g. [a-z] becomes a single 'a' to 'z' transition).
3378 In the context of the state machines, ranges have identifies (the target of the transitions).
3379 When two ranges collide, they have to be split such that each part retain its target
3380 except the intersection that gets the union of the targets.
3382 Handling the union of ranges efficiently is critical because we have to do
3383 it for every NFA node in any subset when building the DFA. The helper
3384 class that does that is MutableRange.
3386 The union of ranges is done efficiently because of preconditions on our list of ranges:
3387 -The ranges must be sorted.
3388 -No range in a list can intersect any other range in the same list.
3390 To merge two ranges, we can go over them in order and split them part by part.
3391 It is easy to find what goes where because they are both sorted and we can
3392 compare the characters of each to know how to move forward.
3393 The time to merge 2 range list is proportional to O(n+m) where 'n' and 'm' are