1 2015-06-10 Matt Rajca <mrajca@apple.com>
3 Explicitly keep track of active HTMLMediaElements in MediaSessions.
4 https://bugs.webkit.org/show_bug.cgi?id=145829
6 Reviewed by Eric Carlson.
8 * Modules/mediasession/MediaSession.cpp: Add support for keeping track of active media elements.
9 (WebCore::MediaSession::addActiveMediaElement):
10 * Modules/mediasession/MediaSession.h:
11 * html/HTMLMediaElement.cpp:
12 (WebCore::HTMLMediaElement::playInternal): If the paused attribute is true and the readyState attribute has the
13 value HAVE_FUTURE_DATA or HAVE_ENOUGH_DATA, the media element becomes an active participating element of the
16 2015-06-10 Chris Dumez <cdumez@apple.com>
18 Drop unused argument for Node::didNotifySubtreeInsertions()
19 https://bugs.webkit.org/show_bug.cgi?id=145845
21 Reviewed by Andreas Kling.
23 * dom/ContainerNodeAlgorithms.h:
24 (WebCore::ChildNodeInsertionNotifier::notify):
26 (WebCore::Node::didNotifySubtreeInsertions):
27 * html/HTMLFrameElementBase.cpp:
28 (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions):
29 * html/HTMLFrameElementBase.h:
30 * svg/SVGFEImageElement.cpp:
31 (WebCore::SVGFEImageElement::didNotifySubtreeInsertions):
32 * svg/SVGFEImageElement.h:
33 * svg/SVGMPathElement.cpp:
34 (WebCore::SVGMPathElement::didNotifySubtreeInsertions):
35 * svg/SVGMPathElement.h:
36 * svg/SVGTRefElement.cpp:
37 (WebCore::SVGTRefElement::didNotifySubtreeInsertions):
38 * svg/SVGTRefElement.h:
39 * svg/SVGTextPathElement.cpp:
40 (WebCore::SVGTextPathElement::didNotifySubtreeInsertions):
41 * svg/SVGTextPathElement.h:
42 * svg/animation/SVGSMILElement.cpp:
43 (WebCore::SVGSMILElement::didNotifySubtreeInsertions):
44 * svg/animation/SVGSMILElement.h:
46 2015-06-10 KwangHyuk Kim <hyuki.kim@samsung.com>
48 [EFL] Jpeg image export implementation for Canvas.
49 https://bugs.webkit.org/show_bug.cgi?id=145457
51 Reviewed by Gyuyoung Kim.
53 Add implementation of jpeg image export on Webkit EFL by using JPEGImageEncoder.
55 No new tests, fast/canvas/toDataURL-supportedTypes.html can be reused.
58 * platform/MIMETypeRegistry.cpp:
59 (WebCore::initializeSupportedImageMIMETypesForEncoding):
60 * platform/graphics/cairo/ImageBufferCairo.cpp:
61 * platform/graphics/efl/ImageBufferEfl.cpp: Added.
62 (WebCore::writeFunction):
63 (WebCore::encodeImage):
64 (WebCore::ImageBuffer::toDataURL):
65 * platform/image-encoders/JPEGImageEncoder.cpp:
66 (WebCore::compressRGBABigEndianToJPEG):
68 2015-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
70 [GTK] Move KeyBindingTranslator from platform to WebKit2 layer
71 https://bugs.webkit.org/show_bug.cgi?id=145840
73 Reviewed by Martin Robinson.
75 It's currently used only by WebKit2 in the UI process and it's
76 another file built twice because of the GTK2 plugin process.
80 2015-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
82 [GTK] Get rid of GetEditorCommandsForKeyEvent sync message
83 https://bugs.webkit.org/show_bug.cgi?id=145598
85 Reviewed by Žan Doberšek.
87 * platform/PlatformKeyboardEvent.h:
88 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
89 (WebCore::PlatformKeyboardEvent::commands):
90 * platform/gtk/KeyBindingTranslator.cpp: Use a single list of
91 custom key bindings. We don't need to distinguish between key down and
92 key press commands, since the web editor client already does that
93 when executing the commands.
94 (WebCore::KeyBindingTranslator::commandsForKeyEvent): This is
95 getEditorCommandsForKeyEvent() renamed as commandsForKeyEvent(),
96 since it now returns the list of commands to simplify the
97 code. Also simplify the custom key bindings handling, by using the
98 global list instead of moving it to a HashMap.
99 (WebCore::KeyBindingTranslator::getEditorCommandsForKeyEvent): Deleted.
100 * platform/gtk/KeyBindingTranslator.h:
102 2015-06-10 Per Arne Vollan <peavo@outlook.com>
104 [WinCairo] Crash on exit when terminating egl
105 https://bugs.webkit.org/show_bug.cgi?id=145832
107 Reviewed by Carlos Garcia Campos.
109 Avoid terminating egl on exit for WinCairo.
111 * platform/graphics/PlatformDisplay.cpp:
112 (WebCore::PlatformDisplay::~PlatformDisplay):
114 2015-06-10 Youenn Fablet <youenn.fablet@crf.canon.fr>
116 Refactor AudioContext implementation to enable automatic binding generation of promise-based methods
117 https://bugs.webkit.org/show_bug.cgi?id=145223
119 Reviewed by Darin Adler.
121 Introducing DOMPromise as a typed wrapper above DeferredWrapper.
122 This DOMPromise allows constraining Promise resolution/rejection to a single resolution type and rejection type.
123 This might be useful for typed callback usage of promise based APIs, like getUserMedia() or ReadableStreamReader.read().
125 Applying DOMPromise to AudioContext close, suspend and resume.
126 Changed binding code to represent what could be automatically generated by binding generator.
127 Fixing unneeded copies of std::function callbacks.
129 Disabling DOMPromise copy constructors to lower chances that resolution/rejection is done twice on the same object.
131 Covered by existing tests.
133 * Modules/webaudio/AudioContext.cpp:
134 (WebCore::AudioContext::addReaction):
135 (WebCore::AudioContext::setState):
136 (WebCore::AudioContext::suspend):
137 (WebCore::AudioContext::resume):
138 (WebCore::AudioContext::close):
139 * Modules/webaudio/AudioContext.h:
140 * bindings/js/JSAudioContextCustom.cpp:
141 (WebCore::JSAudioContext::suspend):
142 (WebCore::JSAudioContext::resume):
143 (WebCore::JSAudioContext::close):
144 * bindings/js/JSDOMPromise.cpp:
145 (WebCore::DeferredWrapper::callFunction):
146 * bindings/js/JSDOMPromise.h:
147 (WebCore::DeferredWrapper::resolve):
148 (WebCore::DeferredWrapper::reject):
149 (WebCore::DOMPromise::DOMPromise):
150 (WebCore::DOMPromise::resolve):
151 (WebCore::DOMPromise::reject):
153 2015-06-10 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
155 [Streams API] Implement pulling of a source by a ReadableStream
156 https://bugs.webkit.org/show_bug.cgi?id=145262
158 Reviewed by Darin Adler
160 Introduced abstract ReadableStream::doPull() which is overriden in ReadableJSStream.
161 Added support to call the "pull" JS callback in ReadableJSStream::doPull().
162 Added calls to pull as requested by the spec (when resolving a read callback, at start time...).
164 Fixed issue in ReadableStreamReader::read() (use of successCallback(JSValue()) in lieu of endCallback())
166 Covered by rebased tests.
168 * Modules/streams/ReadableStream.cpp:
169 (WebCore::ReadableStream::start): calling pull() once start.
170 (WebCore::ReadableStream::pull): calling doPull() if readableStream states requires to.
171 (WebCore::ReadableStream::read): calling pull() after resolving a read callback.
172 * Modules/streams/ReadableStream.h:
173 * Modules/streams/ReadableStreamReader.cpp:
174 (WebCore::ReadableStreamReader::read): fixed JSValue() bug.
175 * bindings/js/ReadableJSStream.cpp:
176 (WebCore::ReadableJSStream::doPull): calling of JS callback.
177 (WebCore::ReadableJSStream::storeException): catches exception and store them.
178 (WebCore::ReadableJSStream::storeError): refactoring for checkForException.
179 (WebCore::ReadableJSStream::enqueue):
180 * bindings/js/ReadableJSStream.h:
182 2015-06-09 Youenn Fablet <youenn.fablet@crf.canon.fr>
184 DeferredWrapper should clear its JS strong references once its promise is resolved/rejected
185 https://bugs.webkit.org/show_bug.cgi?id=145753
187 Reviewed by Darin Adler.
189 Clear strong references at the end of DeferredWrapper::resolve and DeferredWrapper::reject.
190 Added assertions to check that resolve or reject is called only once.
192 Removed DeferredWrapper constructor that creates internally its promise.
193 Reason is DeferredWrapper can be resolved synchronously and promise
194 will be lost when returning it at the end of the binding promise function.
195 Updated all custom bindings accordingly.
197 Covered by existing tests.
199 * bindings/js/JSAudioContextCustom.cpp:
200 (WebCore::JSAudioContext::suspend): Updated DeferredWrapper constructor to properly return the promise.
201 (WebCore::JSAudioContext::resume): Ditto.
202 (WebCore::JSAudioContext::close): Ditto.
203 * bindings/js/JSDOMPromise.cpp:
204 (WebCore::DeferredWrapper::resolve): Cleared strong references after promise resolution.
205 (WebCore::DeferredWrapper::reject): Cleared strong references after promise rejection.
206 * bindings/js/JSDOMPromise.h:
207 (WebCore::DeferredWrapper::resolve): Added ASSERT to check promise is not yet rejected/resolved.
208 (WebCore::DeferredWrapper::reject): Ditto.
209 (WebCore::DeferredWrapper::reject<ExceptionCode>): Ditto.
210 (WebCore::DeferredWrapper::resolve<String>): Ditto.
211 (WebCore::DeferredWrapper::resolve<bool>): Ditto.
212 (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Ditto.
214 (WebCore::DeferredWrapper::reject<String>): Ditto.
215 * bindings/js/JSMediaDevicesCustom.cpp:
216 (WebCore::JSMediaDevices::getUserMedia): Updated DeferredWrapper constructor to properly return the promise.
217 * bindings/js/JSReadableStreamReaderCustom.cpp:
218 (WebCore::JSReadableStreamReader::read): Ditto.
219 (WebCore::JSReadableStreamReader::closed): Ditto.
220 * bindings/js/JSSubtleCryptoCustom.cpp:
221 (WebCore::JSSubtleCrypto::encrypt): Ditto.
222 (WebCore::JSSubtleCrypto::decrypt): Ditto.
223 (WebCore::JSSubtleCrypto::sign): Ditto.
224 (WebCore::JSSubtleCrypto::verify): Ditto.
225 (WebCore::JSSubtleCrypto::digest): Ditto.
226 (WebCore::JSSubtleCrypto::generateKey): Ditto.
227 (WebCore::JSSubtleCrypto::importKey): Ditto.
228 (WebCore::JSSubtleCrypto::exportKey): Ditto.
229 (WebCore::JSSubtleCrypto::wrapKey): Ditto.
230 (WebCore::JSSubtleCrypto::unwrapKey): Ditto.
232 2015-06-09 Zalan Bujtas <zalan@apple.com>
234 Protect FrameView from being destroyed in Document::recalcStyle()
235 https://bugs.webkit.org/show_bug.cgi?id=143033
236 rdar://problem/20326871
238 Reviewed by Andreas Kling.
240 This patch ensures that FrameView stays valid in Document::recalcStyle().
241 It follows the defensive pattern we use to deal with the refcounted FrameView (see EventDispatcher::dispatchEvent)
243 When the iframe destroys itself in the onBeforeLoad callback (as the result of
244 PostResolutionCallbackDisabler -> HTMLObjectElement::updateWidget -> guardedDispatchBeforeLoadEvent),
245 we detach the frame and release the FrameView. However Document::recalcStyle() expects
246 the FrameView to stay valid.
248 Covered by fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html.
251 (WebCore::Document::recalcStyle):
253 2015-06-09 Daegyu Lee <daegyu.lee@navercorp.com>
255 3D-transformed video does not display on platforms without accelerated video rendering
256 https://bugs.webkit.org/show_bug.cgi?id=144782
258 Reviewed by Simon Fraser.
260 Video element does not get GraphicsLayer when MediaPlayerPrivate::supportsAcceleratedRendering() returns false
261 which means not using accelerated video decoding.
262 Although the video element gets GraphicsLayer by changing the CSS style of video element by javascript,
263 there is no way to set GraphicsLayer::setDrawsContent(true) for updating the video content.
264 As a result, after changing the CSS style, the video content does not show.
265 To avoid missing setDrawsContent(true), add conditions(!supportsAcceleratedRendering() && m_requiresOwnBackingStore).
267 Test: media/video-transformed-by-javascript.html
268 media/video-transformed-by-javascript-expected.html
270 * rendering/RenderLayerBacking.cpp:
271 (WebCore::RenderLayerBacking::containsPaintedContent):
273 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
275 REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight for text
276 https://bugs.webkit.org/show_bug.cgi?id=145830
278 Reviewed by Darin Adler.
280 The bug was caused by setSelection not updating RenderView when there is a style recalc scheduled
281 that doesn't trigger a layout. Fixed the bug by explicitly updating the selection in
282 Document::recalcStyle in that case.
284 Test: editing/selection/update-selection-by-style-change.html
287 (WebCore::Document::recalcStyle):
288 * editing/FrameSelection.cpp:
289 (WebCore::FrameSelection::updateAppearanceAfterLayout): Renamed from didLayout.
290 * editing/FrameSelection.h:
291 * page/FrameView.cpp:
292 (WebCore::FrameView::performPostLayoutTasks):
294 2015-06-09 Dean Jackson <dino@apple.com>
296 MediaControls: Reenable resize of controls on pinch zoom
297 https://bugs.webkit.org/show_bug.cgi?id=145824
298 <rdar://problem/21212778>
300 Reviewed by Darin Adler.
302 Reinstate the code that updated the scaling of the
303 controls in response to changes in page scale.
304 This time around we have to change both the controls
305 panel, and its blurry background.
307 * Modules/mediacontrols/mediaControlsApple.js:
308 (Controller.prototype.set pageScaleFactor): Deleted a comment.
309 * Modules/mediacontrols/mediaControlsiOS.css:
310 (video::-webkit-media-controls-panel-background): Set the background to pin
311 to the bottom of its view.
312 * Modules/mediacontrols/mediaControlsiOS.js:
313 (ControllerIOS.prototype.get pageScaleFactor): Basic getter, copied from mediaControlsApple.
314 (ControllerIOS.prototype.set pageScaleFactor): The setter that reacts to the page scale
315 and applies an inverse scaling on the control panel using a transform, and adjusts the
316 height on the background similarly.
318 2015-06-09 Andreas Kling <akling@apple.com>
320 GraphicsContext state stack wasting lots of memory when empty.
321 <https://webkit.org/b/145817>
323 Reviewed by Geoffrey Garen.
325 Give the GraphicsContextState stack an inline capacity of 1, and make sure
326 to free any heap-allocated backing store when the stack goes empty.
328 The 1 is because HTMLCanvasElement keeps one "save" on the underlying
329 GraphicsContext at all times, and this prevents those canvases from always
330 sitting on an empty stack with 16 capacity.
332 This saves ~520 kB on cnet.com video pages.
334 * platform/graphics/GraphicsContext.cpp:
335 (WebCore::GraphicsContext::restore):
336 * platform/graphics/GraphicsContext.h:
338 2015-06-09 Said Abou-Hallawa <sabouhallawa@apple.com>
340 SVG Fragment is not rendered if it is the css background image of an HTML element
341 https://bugs.webkit.org/show_bug.cgi?id=91790
343 Reviewed by Darin Adler.
345 To show an SVG fragment, the SVGImage has to scrollToFragment() using
346 the resource url. The changes http://trac.webkit.org/changeset/164804
347 and http://trac.webkit.org/changeset/164983 set the url of SVGImage to
348 to be used later in SVGImage::draw(). The problem is the SVGImage url
349 is only set when it is the src of an <img> tag. We did not do the same
350 thing when the SVGImage is the css background image of an HTML element.
352 The fix is to set the url of the SVGImage always when it's created by
353 the CachedImage. The CachedImage must have a valid url when the SVGImage
356 Test: svg/css/svg-resource-fragment-identifier-background.html
358 * loader/cache/CachedImage.cpp:
359 (WebCore::CachedImage::load):
360 (WebCore::CachedImage::checkShouldPaintBrokenImage):
361 Replace the calls resourceRequest().url() and m_resourceRequest.url() by
362 calling url() since they are all the same.
364 (WebCore::CachedImage::createImage): Pass the resource url to SVGImage
365 and change ImageObserver& by ImageObserver*, since null is not legal.
367 * svg/graphics/SVGImage.cpp:
368 (WebCore::SVGImage::SVGImage):
369 * svg/graphics/SVGImage.h: Add a url parameter to SVGImage constructor.
371 * svg/graphics/SVGImageCache.cpp:
372 (WebCore::SVGImageCache::findImageForRenderer): Add a new helper function.
374 (WebCore::SVGImageCache::imageSizeForRenderer):
375 (WebCore::SVGImageCache::imageForRenderer): Code clean up.
377 * svg/graphics/SVGImageCache.h: Make imageForRenderer() const.
379 * svg/graphics/SVGImageForContainer.cpp: Remove unneeded header file.
381 2015-06-09 Matt Rajca <mrajca@apple.com>
383 Add support for toggling playback in MediaSessions and MediaSessionManagers.
384 https://bugs.webkit.org/show_bug.cgi?id=145822
386 Reviewed by Eric Carlson.
388 * Modules/mediasession/MediaSession.cpp: Toggle playback of all active media elements.
389 (WebCore::MediaSession::togglePlayback):
390 * Modules/mediasession/MediaSession.h:
391 * Modules/mediasession/MediaSessionManager.cpp: Toggle playback of all media sessions as described in the
393 (WebCore::MediaSessionManager::togglePlayback):
394 * Modules/mediasession/MediaSessionManager.h:
396 2015-06-09 Darin Adler <darin@apple.com>
398 Takes two delete key presses to delete pasted emoji up-pointing index finger with skin tone
399 https://bugs.webkit.org/show_bug.cgi?id=145823
401 Reviewed by Anders Carlsson.
403 Tests: editing/deleting/delete-emoji.html
405 * rendering/RenderText.cpp:
406 (WebCore::isHangulLVT): Use constants instead of macros. Also changed to take a UChar since
407 the Hangul processing can work on UTF-16 code unit at a time and doesn't have to handle
409 (WebCore::isMark): Use U_GC_M_MASK instead of writing the algorithm out another way.
410 (WebCore::isInArmenianToLimbuRange): Added.
411 (WebCore::RenderText::previousOffsetForBackwardDeletion): Refactored for clarity and to use
412 the U16_PREV macro instead of doing what it does in a sloppier way. Added code to allow a
413 variation selector before an emoji modifier to fix the bug. Changed Hangul logic to work a
414 code unit at a time, since it can, to use an enum class, and to use constants rather than
415 all capital macros. Also changed the "dumb" case to use a more appropriate ICU macro.
417 2015-06-09 Said Abou-Hallawa <sabouhallawa@apple.com>
419 feComposite filter does not clip the paint rect to its effect rect when the operator is 'in' or 'atop'
420 https://bugs.webkit.org/show_bug.cgi?id=137856
422 Reviewed by Darin Adler.
424 There was bug in calculating the absolutePaintRect of the feComposite filter
425 when the operator is equal to 'in' or 'atop'. The absolutePaintRect was set
426 to the absolutePaintRect of the background FilterEffect which is correct.
427 What was missing is clipping this rectangle to the maxEffectRect of the
428 filter which we do for other operators.
430 Tests: svg/filters/feComposite-background-rect-control-operators.svg
432 * platform/graphics/IntRect.h:
433 (WebCore::operator-=):
434 (WebCore::operator-): Add new operators to IntRect.
436 * platform/graphics/filters/FEComposite.cpp:
437 (WebCore::FEComposite::determineAbsolutePaintRect): Make sure the filter
438 absolutePaintRect is clipped to maxEffectRect for all operators.
440 (WebCore::FEComposite::platformApplySoftware): Code clean-up.
442 * platform/graphics/filters/FilterEffect.cpp:
443 (WebCore::FilterEffect::determineAbsolutePaintRect): Move the clipping
444 part to a separate function.
446 (WebCore::FilterEffect::clipAbsolutePaintRect): Clip the absolutePaintRect
447 to the maxEffectRect of the filter.
449 * platform/graphics/filters/FilterEffect.h:
451 2015-06-09 Matt Rajca <mrajca@apple.com>
453 Implement MediaSessionManager to keep track of all MediaSessions.
454 https://bugs.webkit.org/show_bug.cgi?id=145806
456 Reviewed by Eric Carlson.
458 * Modules/mediasession/MediaSession.cpp:
459 (WebCore::MediaSession::MediaSession): Add ourselves to the MediaSessionManager upon construction.
460 (WebCore::MediaSession::~MediaSession): Remove ourselves from the MediaSessionManager before destruction.
461 * Modules/mediasession/MediaSessionManager.cpp: Added to keep track of all living MediaSessions.
462 (WebCore::MediaSessionManager::singleton):
463 (WebCore::MediaSessionManager::addMediaSession):
464 (WebCore::MediaSessionManager::removeMediaSession):
465 * Modules/mediasession/MediaSessionManager.h: Added.
466 * WebCore.xcodeproj/project.pbxproj: Added new MediaSessionManager sources.
468 2015-06-09 Ryuan Choi <ryuan.choi@navercorp.com>
470 [CoordinatedGraphics] Remove RefCounted from Tile
471 https://bugs.webkit.org/show_bug.cgi?id=145788
473 Reviewed by Darin Adler.
475 Since r185140, Tile does not need to be RefCounted.
477 No new tests, no behavior changes.
479 * platform/graphics/texmap/coordinated/Tile.cpp:
480 (WebCore::Tile::create): Deleted.
481 * platform/graphics/texmap/coordinated/Tile.h:
482 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
483 (WebCore::TiledBackingStore::invalidate):
484 (WebCore::TiledBackingStore::updateTileBuffers): Simplifies not to use unnecessary Vector.
485 (WebCore::TiledBackingStore::coverageRatio):
486 (WebCore::TiledBackingStore::createTiles):
487 (WebCore::TiledBackingStore::resizeEdgeTiles):
488 (WebCore::TiledBackingStore::setKeepRect):
489 (WebCore::TiledBackingStore::tileAt): Deleted one line wrapper.
490 (WebCore::TiledBackingStore::setTile): Ditto.
491 (WebCore::TiledBackingStore::removeTile): Ditto.
492 * platform/graphics/texmap/coordinated/TiledBackingStore.h:
494 2015-06-09 Chris Dumez <cdumez@apple.com>
496 Allow one sync GC per gcTimer interval on critical memory pressure warning
497 https://bugs.webkit.org/show_bug.cgi?id=145773
499 Reviewed by Geoffrey Garen.
501 * bindings/js/GCController.cpp:
502 (WebCore::GCController::garbageCollectNowIfNotDoneRecently):
504 Add new GCController::garbageCollectNowIfNotDoneRecently() API that
505 allows one synchronous GC per full GC timer interval. If called more
506 than once per interval, it becomes equivalent to garbageCollectSoon()
507 and merely accelerates the next collection.
509 * bindings/js/GCController.h:
510 * platform/MemoryPressureHandler.cpp:
511 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
513 Call the new GCController::garbageCollectNowIfNotDoneRecently() on
514 critical memory pressure instead of garbageCollectionSoon() to try
515 as do a synchronous GC if one wasn't already done recently.
516 Also drop call to fullSweep() as GCController::garbageCollectNow*()
517 already do a sweep after the collection.
519 2015-06-09 Darin Adler <darin@apple.com>
522 JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
523 https://bugs.webkit.org/show_bug.cgi?id=145811
525 There was one unusual case in the bindings generator that was depending on this.
527 * bindings/js/JSDOMBinding.h:
528 (WebCore::argumentOrNull): Deleted.
529 * bindings/scripts/CodeGeneratorJS.pm:
530 (GenerateParametersCheck): Stop using argumentOrNull.
531 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Updated.
532 * bindings/scripts/test/JS/JSTestObj.cpp: Updated.
534 2015-06-09 Darin Adler <darin@apple.com>
536 JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
537 https://bugs.webkit.org/show_bug.cgi?id=145811
539 Reviewed by Antti Koivisto.
541 At some point, someone who didn't understand JSValue very well added checks for
542 isEmpty (and the function isEmpty itself) in JavaScript bindings. But the engine
543 never would pass an empty JSValue to a binding; that's used only inside the
544 engine itself. I think this was done by some Google V8 experts a while back, so
545 it's not entirely surprising they didn't understand this. But we don't want to
546 keep all that unneeded code.
548 * bindings/js/JSAudioTrackCustom.cpp:
549 (WebCore::JSAudioTrack::setKind): Removed the isEmpty clause here. I presume this
550 was copied and pasted from script-generated bindings. While I was at it, I used a
551 slightly more efficient code path that avoids doing a ref/deref on the string by
552 using auto&. That's trickier to do correctly for functions with more than one
553 argument, so I didn't do it in the bindings generator yet.
554 (WebCore::JSAudioTrack::setLanguage): Ditto.
555 * bindings/js/JSTextTrackCustom.cpp:
556 (WebCore::JSTextTrack::setKind): Ditto.
557 (WebCore::JSTextTrack::setLanguage): Ditto.
558 * bindings/js/JSVideoTrackCustom.cpp:
559 (WebCore::JSVideoTrack::setKind): Ditto.
560 (WebCore::JSVideoTrack::setLanguage): Ditto.
562 * bindings/scripts/CodeGeneratorJS.pm:
563 (GenerateImplementation): Use "=" syntax instead of constructor style syntax for
564 the argument processing. I think this is more readable.
565 (GenerateParametersCheck): For the enum code path, did the more efficient auto&
566 idiom to avoid ref/deref on a string. For the toExistingAtomicString path,
567 restructured so we don't have to check the flag indicating that something is atomic.
568 Later we could also avoid the ref/deref; added a FIXME about that.
569 (GetNativeType): Use String, not const String, for local variables. Sure, the
570 string is const, but so is every other local variable type we use! No need to be
572 (JSValueToNative): Removed the uneeded calls to isEmpty. Since the call sites no
573 longer use construction syntax, used initializer syntax style for a couple classes
574 that are constructed with multiple arguments.
576 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated.
577 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
578 * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
579 * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
580 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
581 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
582 * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
583 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
584 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
585 * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
587 2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
589 Fix unused private field warning in GraphicsLayerUpdater.h
590 https://bugs.webkit.org/show_bug.cgi?id=145757
592 Reviewed by Darin Adler.
594 * platform/graphics/GraphicsLayerUpdater.cpp:
595 (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
596 * platform/graphics/GraphicsLayerUpdater.h:
598 2015-06-09 Yusuke Suzuki <utatane.tea@gmail.com>
600 Crash when passing Symbol to NPAPI plugin objects
601 https://bugs.webkit.org/show_bug.cgi?id=145798
603 Reviewed by Darin Adler.
605 Test: plugins/npruntime/script-object-with-symbols.html
607 For C bridge APIs, we add guards for symbols.
608 This is the same to the existing guards in Objective-C APIs.
610 * bridge/c/c_class.cpp:
611 (JSC::Bindings::CClass::methodNamed):
612 (JSC::Bindings::CClass::fieldNamed):
613 * bridge/objc/objc_class.mm:
614 (JSC::Bindings::ObjcClass::methodNamed):
615 (JSC::Bindings::ObjcClass::fieldNamed):
616 (JSC::Bindings::ObjcClass::fallbackObject):
618 2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
620 [cmake] Fix the style issues in cmake project files
621 https://bugs.webkit.org/show_bug.cgi?id=145755
623 Reviewed by Darin Adler.
630 * PlatformWinCairo.cmake:
632 2015-06-09 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
634 [Streams API] ReadableJSStream should handle JS source getters that throw
635 https://bugs.webkit.org/show_bug.cgi?id=145600
637 Reviewed by Darin Adler.
639 Checking whether there is an exception when trying to access to a source method.
640 If so, rethrowing it in case of "start".
642 Refactoring of code to prepare pulling, cancelling and additional parameter handling in ReadableStream construtor.
644 Fixed the case of ReadableStream constructor called with an undefined parameter.
646 Covered by rebased test expectation.
648 * bindings/js/JSReadableStreamCustom.cpp:
649 (WebCore::constructJSReadableStream): Refactoring to group all parameter check and exception handling in ReadableJSStream::create.
650 * bindings/js/ReadableJSStream.cpp:
651 (WebCore::getPropertyFromObject):
652 (WebCore::callFunction):
653 (WebCore::ReadableJSStream::invoke): Added method to be used also for pulling and cancelling.
654 (WebCore::ReadableJSStream::doStart):
655 (WebCore::ReadableJSStream::create):
656 * bindings/js/ReadableJSStream.h:
658 2015-06-08 Dan Bernstein <mitz@apple.com>
660 Made MicroTask.h a project header.
662 Rubber-stamped by Anders Carlsson.
664 * WebCore.xcodeproj/project.pbxproj: Demoted MicroTask.h from Public to Project. WebCore
665 doesn’t have public headers, and this header isn’t used by WebKit.
667 2015-06-08 Gyuyoung Kim <gyuyoung.kim@webkit.org>
669 Purge PassRefPtr in JavaScriptCore
670 https://bugs.webkit.org/show_bug.cgi?id=145750
672 Reviewed by Darin Adler.
674 As a step to purge PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.
676 No new tests, no behavior changes.
678 * bindings/js/JSDOMWindowBase.cpp:
679 (WebCore::JSDOMWindowBase::commonVM):
681 2015-06-08 Zalan Bujtas <zalan@apple.com>
683 Subpixel rendering: Clip-path does not work properly on subpixel positions.
684 https://bugs.webkit.org/show_bug.cgi?id=145749
685 rdar://problem/20824305
687 Reviewed by Simon Fraser.
689 This patch ensures that clip-path is device pixel snapped both for composited and
690 non-composited content.
692 Tests: compositing/masks/compositing-clip-path-on-subpixel-position.html
693 fast/masking/clip-path-on-subpixel-position.html
695 * rendering/RenderLayer.cpp:
696 (WebCore::RenderLayer::setupClipPath):
697 * rendering/RenderLayerBacking.cpp:
698 (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
700 2015-06-08 Chris Dumez <cdumez@apple.com>
702 Access GCController instance via GCController::singleton() instead of a free function
703 https://bugs.webkit.org/show_bug.cgi?id=145776
705 Reviewed by Darin Adler.
707 Access GCController instance via GCController::singleton() instead of a
708 free function as per coding style and for consistency with other
709 singleton classes in the codebase.
711 * bindings/js/GCController.cpp:
712 (WebCore::GCController::singleton):
713 (WebCore::gcController): Deleted.
714 * bindings/js/GCController.h:
715 * bindings/js/JSDOMWindowShell.cpp:
716 (WebCore::JSDOMWindowShell::setWindow):
717 * bindings/js/ScriptCachedFrameData.cpp:
718 (WebCore::ScriptCachedFrameData::clear):
719 * bindings/js/ScriptController.cpp:
720 (WebCore::collectGarbageAfterWindowShellDestruction):
721 * platform/MemoryPressureHandler.cpp:
722 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
724 2015-06-08 Daniel Bates <dabates@apple.com>
726 Mouse release on AutoFill button activates it; should only activate on click
727 https://bugs.webkit.org/show_bug.cgi?id=145774
728 <rdar://problem/21069245>
730 Reviewed by Ryosuke Niwa.
732 Fixes an issue where a click event was dispatched to a shadow tree node regardless of whether
733 both the mouse press and mouse release were targeted at it. In particular, releasing the mouse
734 on the AutoFill button activates it regardless of whether the mouse was pressed on it.
736 Currently we always dispatch a click event to a node n where the mouse was released when n is
737 in a shadow tree regardless of whether the mouse was pressed on n. Instead we should only
738 dispatch a click event to n if the mouse was pressed and released on n. If n is a shadow tree
739 descendant, the mouse was released on n, and n never received a mouse press then we should
740 dispatch the click event at the shadow host element of n to preserve the illusion to web
741 developers that the shadow host element is a single element.
743 Test: fast/forms/auto-fill-button/mouse-down-input-mouse-release-auto-fill-button.html
745 * page/EventHandler.cpp:
746 (WebCore::targetNodeForClickEvent): Added; returns the target node for the DOM click event.
747 (WebCore::EventHandler::handleMouseReleaseEvent): Modified to use dispatch the DOM click event
748 at the node returned by targetNodeForClickEvent().
749 (WebCore::mouseIsReleasedOnPressedElement): Deleted.
751 2015-06-08 Chris Dumez <cdumez@apple.com>
753 WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
754 https://bugs.webkit.org/show_bug.cgi?id=145748
755 <rdar://problem/21226577>
757 Reviewed by Brady Eidson.
759 We would sometimes crash when pruning the PageCache because it was
760 possible for frames to still be loading while in the PageCache and
761 we would try to stop the load when the CachedFrame is destroyed. This
762 code path was not supposed to be exercised as we were not supposed to
763 have pages still loading inside the PageCache.
765 r185017 made sure we don't insert into the PageCache pages that are
766 still loading. However, nothing was preventing content from starting
767 new loads in their 'pagehide' event handlers, *after* the decision
768 to put the page in the PageCache was made.
770 This patch prevents content from starting loads from a 'pagehide'
771 event handler so that we can no longer have content that is loading
772 inside the PageCache. 'ping' image loads still go through though as
773 these are specially handled and use PingLoaders.
775 Tests: http/tests/navigation/image-load-in-pagehide-handler.html
776 http/tests/navigation/subframe-pagehide-handler-starts-load.html
777 http/tests/navigation/subframe-pagehide-handler-starts-load2.html
779 * loader/FrameLoader.cpp:
780 (WebCore::FrameLoader::FrameLoader):
781 (WebCore::FrameLoader::stopLoading):
782 (WebCore::FrameLoader::loadURL):
783 (WebCore::FrameLoader::loadWithDocumentLoader):
784 (WebCore::FrameLoader::stopAllLoaders):
785 (WebCore::FrameLoader::handleBeforeUnloadEvent):
786 * loader/FrameLoader.h:
787 (WebCore::FrameLoader::pageDismissalEventBeingDispatched):
788 (WebCore::FrameLoader::PageDismissalEventType::PageDismissalEventType):
789 (WebCore::FrameLoader::PageDismissalEventType::operator Page::DismissalType):
791 Add wrapper class for m_pageDismissalEventBeingDispatched member type.
792 The wrapper takes care of updating the m_dismissalEventBeingDispatched
793 member on the Page every time the member on FrameLoader is updated. We
794 now cache this information on the Page so that clients can cheaply
795 query if a dismissal event is being dispatched in any of the Page's
796 frame, without having to traverse the frame tree.
798 * loader/ImageLoader.cpp:
799 (WebCore::pageIsBeingDismissed):
801 * loader/cache/CachedResource.cpp:
802 (WebCore::CachedResource::load):
804 Abort the load early if we are currently dispatching a 'pagehide'
805 event. We don't allow new loads at such point because we've already
806 made the decision to add the Page to the PageCache.
808 * loader/cache/CachedResourceLoader.cpp:
809 (WebCore::CachedResourceLoader::requestImage):
812 (WebCore::Chrome::runModal): Deleted.
813 (WebCore::Chrome::setToolbarsVisible): Deleted.
814 (WebCore::Chrome::toolbarsVisible): Deleted.
815 (WebCore::Chrome::runJavaScriptConfirm): Deleted.
816 (WebCore::Chrome::runJavaScriptPrompt): Deleted.
817 (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
819 * page/ChromeClient.h:
820 * page/DOMWindow.cpp:
821 (WebCore::DOMWindow::canShowModalDialogNow):
823 Drop ChromeClient::shouldRunModalDialogDuringPageDismissal() and code
824 using it as it is unused and I did not think it was worth updating
828 (WebCore::Page::dismissalEventBeingDispatched):
829 (WebCore::Page::setDismissalEventBeingDispatched):
831 Add a m_dismissalEventBeingDispatched member to the Page so that we can
832 easily query if a dismissal event is being dispatched in any of the
833 frames, without having to traverse the frame tree. I suspect more call
834 sites of FrameLoader::pageDismissalEventBeingDispatched() may actually
835 want this but I did not make such change in this patch. It is important
836 to check all the frames and not simply the current one because a frame's
837 pagehide event handler may trigger a load in another frame.
839 2015-06-08 Hunseop Jeong <hs85.jeong@samsung.com>
841 Replaced 0 with nullptr in WebCore/Modules.
842 https://bugs.webkit.org/show_bug.cgi?id=145758
844 Reviewed by Darin Adler.
846 No new tests, no behavior changes.
848 * Modules/battery/BatteryManager.cpp:
849 (WebCore::BatteryManager::BatteryManager):
850 * Modules/encryptedmedia/CDM.cpp:
852 * Modules/encryptedmedia/MediaKeys.cpp:
853 (WebCore::MediaKeys::MediaKeys):
854 (WebCore::MediaKeys::~MediaKeys):
855 * Modules/indexeddb/IDBCursor.h:
856 (WebCore::IDBCursor::continueFunction):
857 * Modules/indexeddb/IDBCursorBackendOperations.cpp:
858 (WebCore::CursorAdvanceOperation::perform):
859 (WebCore::CursorIterationOperation::perform):
860 * Modules/indexeddb/IDBDatabase.cpp:
861 (WebCore::IDBDatabase::transactionFinished):
862 * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
863 (WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl):
864 * Modules/indexeddb/IDBEventDispatcher.cpp:
865 (WebCore::IDBEventDispatcher::dispatch):
866 * Modules/indexeddb/IDBIndex.h:
867 (WebCore::IDBIndex::openCursor):
868 (WebCore::IDBIndex::count):
869 (WebCore::IDBIndex::openKeyCursor):
870 * Modules/indexeddb/IDBObjectStore.cpp:
871 (WebCore::IDBObjectStore::add):
872 (WebCore::IDBObjectStore::put):
873 (WebCore::IDBObjectStore::index):
874 (WebCore::IDBObjectStore::openCursor):
875 * Modules/indexeddb/IDBObjectStore.h:
876 (WebCore::IDBObjectStore::count):
877 * Modules/indexeddb/IDBOpenDBRequest.cpp:
878 (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
879 (WebCore::IDBOpenDBRequest::onSuccess):
880 * Modules/indexeddb/IDBRequest.cpp:
881 (WebCore::IDBRequest::IDBRequest):
882 * Modules/indexeddb/IDBTransaction.cpp:
883 (WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished):
884 * Modules/indexeddb/IDBTransactionBackend.cpp:
885 (WebCore::IDBTransactionBackend::commit):
886 * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
887 (WebCore::OpenCursorOperation::perform):
888 * Modules/indieui/UIRequestEvent.cpp:
889 (WebCore::UIRequestEventInit::UIRequestEventInit):
890 (WebCore::UIRequestEvent::UIRequestEvent):
891 * Modules/mediasource/MediaSource.cpp:
892 (WebCore::MediaSource::MediaSource):
893 (WebCore::MediaSource::setReadyState):
894 (WebCore::MediaSource::removeSourceBuffer):
895 * Modules/mediasource/SourceBuffer.cpp:
896 (WebCore::SourceBuffer::~SourceBuffer):
897 (WebCore::SourceBuffer::removedFromMediaSource):
898 * Modules/mediastream/MediaStream.cpp:
899 (WebCore::MediaStream::~MediaStream):
900 * Modules/mediastream/MediaStreamEvent.cpp:
901 (WebCore::MediaStreamEventInit::MediaStreamEventInit):
902 * Modules/mediastream/MediaStreamTrackEvent.cpp:
903 (WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit):
904 * Modules/mediastream/RTCDataChannel.cpp:
905 (WebCore::RTCDataChannel::stop):
906 * Modules/mediastream/UserMediaRequest.cpp:
907 (WebCore::UserMediaRequest::contextDestroyed):
908 * Modules/notifications/Notification.cpp:
909 (WebCore::Notification::Notification):
910 * Modules/notifications/Notification.h:
911 * Modules/speech/SpeechSynthesis.cpp:
912 (WebCore::SpeechSynthesis::SpeechSynthesis):
913 (WebCore::SpeechSynthesis::setPlatformSynthesizer):
914 (WebCore::SpeechSynthesis::cancel):
915 (WebCore::SpeechSynthesis::handleSpeakingCompleted):
916 * Modules/speech/SpeechSynthesisUtterance.cpp:
917 (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
918 * Modules/webaudio/AudioBufferSourceNode.cpp:
919 (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
920 (WebCore::AudioBufferSourceNode::clearPannerNode):
921 * Modules/webaudio/AudioContext.cpp:
922 (WebCore::AudioContext::createMediaStreamSource):
923 * Modules/webaudio/MediaElementAudioSourceNode.cpp:
924 (WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode):
925 * Modules/webaudio/OscillatorNode.cpp:
926 (WebCore::OscillatorNode::setType):
927 (WebCore::OscillatorNode::process):
928 * Modules/webdatabase/DatabaseManager.cpp:
929 (WebCore::DatabaseManager::DatabaseManager):
930 * Modules/webdatabase/DatabaseThread.cpp:
931 (WebCore::DatabaseThread::DatabaseThread):
932 (WebCore::DatabaseThread::databaseThread):
933 * Modules/webdatabase/DatabaseThread.h:
934 * Modules/webdatabase/DatabaseTracker.cpp:
935 (WebCore::DatabaseTracker::DatabaseTracker):
936 * Modules/webdatabase/SQLCallbackWrapper.h:
937 (WebCore::SQLCallbackWrapper::clear):
938 (WebCore::SQLCallbackWrapper::unwrap):
939 * Modules/webdatabase/SQLStatementBackend.cpp:
940 (WebCore::SQLStatementBackend::clearFailureDueToQuota):
941 * Modules/webdatabase/SQLTransaction.cpp:
942 (WebCore::SQLTransaction::deliverTransactionErrorCallback):
943 * Modules/webdatabase/SQLTransactionBackend.cpp:
944 (WebCore::SQLTransactionBackend::doCleanup):
945 (WebCore::SQLTransactionBackend::getNextStatement):
946 * Modules/webdatabase/SQLTransactionCoordinator.cpp:
947 (WebCore::SQLTransactionCoordinator::releaseLock):
948 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
949 (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
950 (WebCore::ThreadableWebSocketChannelClientWrapper::clearPeer):
951 (WebCore::ThreadableWebSocketChannelClientWrapper::clearClient):
952 * Modules/websockets/WebSocket.cpp:
953 (WebCore::WebSocket::stop):
954 * Modules/websockets/WebSocketChannel.cpp:
955 (WebCore::WebSocketChannel::disconnect):
956 (WebCore::WebSocketChannel::didCloseSocketStream):
957 * Modules/websockets/WebSocketFrame.h:
958 * Modules/websockets/WebSocketHandshake.cpp:
959 (WebCore::WebSocketHandshake::clearScriptExecutionContext):
960 (WebCore::WebSocketHandshake::readStatusLine):
961 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
962 (WebCore::WorkerThreadableWebSocketChannel::Peer::disconnect):
963 (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
964 (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
966 2015-06-08 Chris Fleizach <cfleizach@apple.com>
968 AX: improve list heuristics (presentational use versus actual lists)
969 https://bugs.webkit.org/show_bug.cgi?id=134187
971 Unreviewed. Rolling this change out temporarily.
973 * accessibility/AccessibilityList.cpp:
974 (WebCore::AccessibilityList::isDescriptionList):
975 (WebCore::AccessibilityList::determineAccessibilityRole):
976 (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): Deleted.
977 * accessibility/AccessibilityList.h:
979 2015-06-08 Eric Carlson <eric.carlson@apple.com>
981 [Mac] Enable AVFoundation by default when QTKit is disabled by default
982 https://bugs.webkit.org/show_bug.cgi?id=145760
984 Reviewed by Alexey Proskuryakov.
986 No new tests, this change makes existing tests pass.
988 Settings::gAVFoundationEnabled defaults to true.
991 (WebCore::invalidateAfterGenericFamilyChange):
993 2015-06-08 Ryosuke Niwa <rniwa@webkit.org>
995 Explicitly dismiss correction panel when user types a new character
996 https://bugs.webkit.org/show_bug.cgi?id=145732
997 <rdar://problem/19596892>
999 Reviewed by Darin Adler.
1001 Explicitly dismiss the correction panel when the user types a new character.
1002 This patch shouldn't change any behavior we're currently relying on AppKit to do the same.
1004 Manually ran tests in ManualTests/autocorrection.
1006 * editing/AlternativeTextController.cpp:
1007 (WebCore::AlternativeTextController::respondToAppliedEditing):
1009 2015-06-08 Javier Fernandez <jfernandez@igalia.com>
1011 [CSS Grid Layout] Setting height on a grid item doesn't have any effect
1012 https://bugs.webkit.org/show_bug.cgi?id=145604
1014 Reviewed by Sergio Villar Senin.
1016 Box Alignment spec states that stretch is only possible when height is
1017 'auto' and no 'auto' margins are used.
1019 It might be the case that style changes so that stretching is not allowed,
1020 hence we need to detect it and clear the override height the stretching
1021 algorithm previously set. The new layout triggered by the style change
1022 will then set grid item's height according to the new style rules.
1024 Test: fast/css-grid-layout/grid-item-should-not-be-stretched-when-height-or-margin-change.html
1026 * rendering/RenderGrid.cpp:
1027 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1029 2015-06-08 Brady Eidson <beidson@apple.com>
1031 Completely remove all IDB properties/constructors when it is disabled at runtime.
1032 rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034
1034 Reviewed by Geoffrey Garen.
1036 Test: storage/indexeddb/properties-disabled-at-runtime.html
1038 - Make constructors all runtime enabled.
1039 - Remove autogeneration of the window.(webkit)indexedDB accessors.
1040 - Add manual overrides for the (webkit)indexedDB accessors at runtime.
1042 * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
1043 * Modules/indexeddb/IDBAny.idl:
1044 * Modules/indexeddb/IDBCursor.idl:
1045 * Modules/indexeddb/IDBCursorWithValue.idl:
1046 * Modules/indexeddb/IDBDatabase.idl:
1047 * Modules/indexeddb/IDBFactory.idl:
1048 * Modules/indexeddb/IDBIndex.idl:
1049 * Modules/indexeddb/IDBKeyRange.idl:
1050 * Modules/indexeddb/IDBObjectStore.idl:
1051 * Modules/indexeddb/IDBOpenDBRequest.idl:
1052 * Modules/indexeddb/IDBRequest.idl:
1053 * Modules/indexeddb/IDBTransaction.idl:
1054 * Modules/indexeddb/IDBVersionChangeEvent.idl:
1055 * page/DOMWindow.idl:
1057 * bindings/js/JSDOMWindowCustom.cpp:
1058 (WebCore::jsDOMWindowIndexedDB):
1059 (WebCore::JSDOMWindow::getOwnPropertySlot):
1061 2015-06-08 Michael Catanzaro <mcatanzaro@igalia.com>
1063 [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
1064 https://bugs.webkit.org/show_bug.cgi?id=145542
1066 Reviewed by Alexey Proskuryakov.
1068 No new tests, because it's hard to test whether a DNS request has been sent. We could do
1069 this by adding new API to modify the GProxyResolver and GResolver used by the SoupSession in
1070 the network process, but even if such API were desirable, it would be a big job. Tests
1071 should not be allowed to dictate our public API.
1073 * platform/network/DNSResolveQueue.cpp:
1074 (WebCore::DNSResolveQueue::add): Do not check whether the system is using a proxy, since
1075 this can't be determined for all ports here.
1076 (WebCore::DNSResolveQueue::timerFired): Do not check whether the system is using a proxy,
1077 since this can't be determined for all ports here.
1078 (WebCore::DNSResolveQueue::DNSResolveQueue): Remove member variables and member functions
1079 that are only needed by the CF backend. Rename platformResolve to
1080 platformMaybeResolveHost.
1081 (WebCore::DNSResolveQueue::isUsingProxy): Moved to DNSCFNet.cpp.
1082 * platform/network/DNSResolveQueue.h: Remove member variables that are only needed by the
1084 * platform/network/cf/DNSCFNet.cpp:
1085 (WebCore::proxyIsEnabledInSystemPreferences): Renamed from
1086 platformProxyIsEnabledInSystemPreferences.
1087 (WebCore::isUsingProxy): Moved from DNSResolveQueue.cpp. The member variables removed from
1088 DNSResolveQueue are not static here. This is safe since it's a singleton.
1089 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
1090 Bail early from here if a proxy is configured.
1091 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Renamed to
1092 proxyIsEnabledInSystemPreferences.
1093 (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
1094 * platform/network/soup/DNSSoup.cpp:
1095 (WebCore::gotProxySettingsCallback): Added. Call soup_session_prefetch_dns from here only
1096 if a proxy would not be used to resolve the host.
1097 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
1098 Look up proxy settings using g_proxy_resolver_lookup_async rather than calling
1099 soup_session_prefetch_dns directly.
1100 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
1101 (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
1103 2015-06-08 Hunseop Jeong <hs85.jeong@samsung.com>
1105 Use modern for-loops in WebCore/Modules - 2
1106 https://bugs.webkit.org/show_bug.cgi?id=145541
1108 Reviewed by Darin Adler.
1110 No new tests, no behavior changes.
1112 * Modules/mediastream/RTCConfiguration.h:
1113 (WebCore::RTCConfiguration::iceServers):
1114 * Modules/mediastream/RTCDTMFSender.cpp:
1115 (WebCore::RTCDTMFSender::scheduledEventTimerFired):
1116 * Modules/mediastream/RTCDataChannel.cpp:
1117 (WebCore::RTCDataChannel::scheduledEventTimerFired):
1118 * Modules/mediastream/RTCPeerConnection.cpp:
1119 (WebCore::processIceServer):
1120 (WebCore::RTCPeerConnection::~RTCPeerConnection):
1121 (WebCore::RTCPeerConnection::getStreamById):
1122 (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
1123 (WebCore::RTCPeerConnection::stop):
1124 (WebCore::RTCPeerConnection::scheduledEventTimerFired):
1125 * Modules/mediastream/RTCStatsReport.cpp:
1126 (WebCore::RTCStatsReport::names):
1127 * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1128 (WebCore::initProtocolHandlerWhitelist):
1129 * Modules/speech/SpeechSynthesis.cpp:
1130 (WebCore::SpeechSynthesis::getVoices):
1131 * Modules/webaudio/AudioBuffer.cpp:
1132 (WebCore::AudioBuffer::memoryCost):
1133 * Modules/webaudio/AudioContext.cpp:
1134 (WebCore::AudioContext::createMediaStreamSource):
1135 (WebCore::AudioContext::derefFinishedSourceNodes):
1136 (WebCore::AudioContext::derefUnfinishedSourceNodes):
1137 (WebCore::AudioContext::handleDeferredFinishDerefs):
1138 (WebCore::AudioContext::handleDirtyAudioSummingJunctions):
1139 (WebCore::AudioContext::handleDirtyAudioNodeOutputs):
1140 (WebCore::AudioContext::updateAutomaticPullNodes):
1141 (WebCore::AudioContext::processAutomaticPullNodes):
1142 * Modules/webaudio/AudioNode.cpp:
1143 (WebCore::AudioNode::updateChannelsForInputs):
1144 (WebCore::AudioNode::checkNumberOfChannelsForInput):
1145 (WebCore::AudioNode::pullInputs):
1146 (WebCore::AudioNode::inputsAreSilent):
1147 (WebCore::AudioNode::silenceOutputs):
1148 (WebCore::AudioNode::unsilenceOutputs):
1149 (WebCore::AudioNode::enableOutputsIfNecessary):
1150 (WebCore::AudioNode::disableOutputsIfNecessary):
1151 (WebCore::AudioNode::finishDeref):
1152 * Modules/webaudio/AudioNodeInput.cpp:
1153 (WebCore::AudioNodeInput::numberOfChannels):
1154 (WebCore::AudioNodeInput::sumAllConnections):
1155 * Modules/webaudio/AudioNodeOutput.cpp:
1156 (WebCore::AudioNodeOutput::propagateChannelCount):
1157 (WebCore::AudioNodeOutput::disable):
1158 (WebCore::AudioNodeOutput::enable):
1159 * Modules/webaudio/AudioParam.cpp:
1160 (WebCore::AudioParam::calculateFinalValues):
1161 * Modules/webaudio/AudioParamTimeline.cpp:
1162 (WebCore::AudioParamTimeline::insertEvent):
1163 * Modules/webaudio/AudioSummingJunction.cpp:
1164 (WebCore::AudioSummingJunction::updateRenderingState):
1165 * Modules/webaudio/MediaStreamAudioSource.cpp:
1166 (WebCore::MediaStreamAudioSource::setAudioFormat):
1167 (WebCore::MediaStreamAudioSource::consumeAudio):
1168 * Modules/webaudio/WaveShaperProcessor.cpp:
1169 (WebCore::WaveShaperProcessor::setOversample):
1170 * Modules/webdatabase/DatabaseThread.cpp:
1171 (WebCore::DatabaseThread::handlePausedQueue):
1172 (WebCore::DatabaseThread::databaseThread):
1173 * Modules/webdatabase/DatabaseTracker.cpp:
1174 (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
1175 (WebCore::DatabaseTracker::databaseNamesForOrigin):
1176 (WebCore::DatabaseTracker::getOpenDatabases):
1177 (WebCore::DatabaseTracker::usageForOrigin):
1178 (WebCore::DatabaseTracker::deleteAllDatabases):
1179 (WebCore::DatabaseTracker::deleteOrigin):
1180 (WebCore::DatabaseTracker::deleteDatabaseFile):
1181 (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
1182 (WebCore::DatabaseTracker::setDatabasesPaused):
1183 * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1184 (WebCore::SQLTransactionCoordinator::shutdown):
1185 * Modules/websockets/WebSocket.cpp:
1186 (WebCore::WebSocket::connect):
1187 * Modules/websockets/WebSocketExtensionDispatcher.cpp:
1188 (WebCore::WebSocketExtensionDispatcher::addProcessor):
1189 (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
1190 (WebCore::WebSocketExtensionDispatcher::processHeaderValue):
1191 * Modules/websockets/WebSocketHandshake.cpp:
1192 (WebCore::WebSocketHandshake::clientHandshakeMessage):
1194 2015-06-07 Darin Adler <darin@apple.com>
1196 REGRESSION (r181720): Unnecessary layout triggered any time animated GIF advances to a new frame
1197 https://bugs.webkit.org/show_bug.cgi?id=145733
1199 Reviewed by Andreas Kling.
1201 Test: fast/images/animated-gif-no-layout.html
1203 * rendering/RenderImage.cpp:
1204 (WebCore::RenderImage::styleDidChange): Correctly pass ImageSizeChangeNone in cases
1205 where we don't need to report a change in intrinsic size that happened outside the
1206 repaintOrMarkForLayout function.
1207 (WebCore::RenderImage::repaintOrMarkForLayout): Move work that should only be done
1208 when size changed inside the if statement.
1210 * testing/Internals.cpp:
1211 (WebCore::Internals::layoutCount): Added.
1212 * testing/Internals.h: Added layoutCount.
1213 * testing/Internals.idl: Ditto.
1215 2015-06-07 Michael Catanzaro <mcatanzaro@igalia.com>
1217 Fix strncpy use in WebCore::Text::formatForDebugger
1218 https://bugs.webkit.org/show_bug.cgi?id=145608
1220 Reviewed by Darin Adler.
1222 r185137 replaced a call to strncpy with a call to strlcpy, which broke the build on Linux
1223 since strlcpy does not exist there. r185148 reverted this to use strncpy again, but got the
1224 size argument off by one, "introducing" a buffer overrun. But this code has always been
1225 wrong, since it used strncpy without ensuring that the buffer is null-terminated after the
1226 call to strncpy. Fix this as well.
1229 (WebCore::Text::formatForDebugger):
1231 2015-06-07 Antti Koivisto <antti@apple.com>
1233 CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::subresourceCachePolicy const + 11
1234 https://bugs.webkit.org/show_bug.cgi?id=145736
1235 rdar://problem/21246971
1237 Reviewed by David Kilzer.
1241 * html/HTMLLinkElement.cpp:
1242 (WebCore::HTMLLinkElement::setCSSStyleSheet):
1244 Null check frame. It may be null during frame teardown.
1246 2015-06-06 Anders Carlsson <andersca@apple.com>
1248 Remove support from getting plug-in information from Carbon resources
1249 https://bugs.webkit.org/show_bug.cgi?id=145730
1251 Reviewed by Dan Bernstein.
1253 Remove a now unused function.
1255 * platform/mac/WebCoreNSStringExtras.h:
1256 * platform/mac/WebCoreNSStringExtras.mm:
1257 (stringEncodingForResource): Deleted.
1259 2015-06-06 Commit Queue <commit-queue@webkit.org>
1261 Unreviewed, rolling out r185284.
1262 https://bugs.webkit.org/show_bug.cgi?id=145723
1264 it needs some discussion before landing (Requested by dino on
1269 "[iOS] Don't force compositing layers for no-op 3D transforms
1270 on low-memory devices."
1271 https://bugs.webkit.org/show_bug.cgi?id=145719
1272 http://trac.webkit.org/changeset/185284
1274 2015-06-06 Ryosuke Niwa <rniwa@webkit.org>
1276 Typing is slow in Gmail on iPads
1277 https://bugs.webkit.org/show_bug.cgi?id=145686
1279 Reviewed by Enrica Casucci.
1281 The bug was caused by nextCandidate and nextVisuallyDistinctCandidate traversing through each character
1282 in a text node without a renderer. Skip any node that doesn't have a renderer in both of those functions
1283 and corresponding previous* functions.
1285 It's fine to skip unrendered nodes in PositionIterator because only other clients of PositionIterator
1286 are Position::upstream and Position::downstream and they don't care about un-rendered nodes either.
1288 * dom/PositionIterator.cpp:
1289 (WebCore::PositionIterator::increment):
1290 (WebCore::PositionIterator::decrement):
1291 * editing/htmlediting.cpp:
1292 (WebCore::nextVisuallyDistinctCandidate):
1293 (WebCore::previousVisuallyDistinctCandidate):
1295 2015-06-06 Mark Lam <mark.lam@apple.com>
1297 Returned Exception* values need to be initialized to nullptr when no exceptions are thrown.
1298 https://bugs.webkit.org/show_bug.cgi?id=145720
1300 Reviewed by Dan Bernstein.
1302 No new tests because this issue is already covered by the existing inspector-protocol tests.
1304 * bindings/js/WorkerScriptController.cpp:
1305 (WebCore::WorkerScriptController::evaluate):
1307 2015-06-05 Andreas Kling <akling@apple.com>
1309 [iOS] Don't force compositing layers for no-op 3D transforms on low-memory devices.
1310 <https://webkit.org/b/145719>
1311 <rdar://problem/19973042>
1313 Reviewed by Geoffrey Garen.
1315 We put elements with 3D identity transforms onto compositing layers because
1316 we anticipate that they will somehow animate in the future.
1318 This can get extremely expensive, especially on low-memory devices.
1319 This patch makes WebKit stop handing out compositing layers for this kinda thing:
1321 -webkit-transform: translate3d(0,0,0)
1323 ..on devices with 512MB or less. This dramatically improves stability on some
1326 * rendering/RenderLayerCompositor.cpp:
1327 (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
1329 2015-06-05 Matt Baker <mattbaker@apple.com>
1331 Web Inspector: "Other" time in the framerate table is often negative
1332 https://bugs.webkit.org/show_bug.cgi?id=145712
1334 Reviewed by Timothy Hatcher.
1336 The Inspector frontend flattens the timeline event tree it receives from the backend, which can contain nested
1337 paint records. The nested records represent a single paint event, but were being interpreted as two separate
1338 events for purposes of calculating total layout time. This caused the calculated "other" time to be less than
1339 it should be (and in some cases negative).
1341 * inspector/InspectorTimelineAgent.cpp:
1342 (WebCore::InspectorTimelineAgent::addRecordToTimeline):
1343 Paint records are no longer nested, we simply drop the child paint event.
1345 2015-06-05 Chris Dumez <cdumez@apple.com>
1347 Unreviewed, speculative Windows build fix after r185273.
1349 * platform/VNodeTracker.h:
1351 2015-06-05 Chris Dumez <cdumez@apple.com>
1353 [WK2][iOS] Limit the number of vnodes used by the WebContent processes
1354 https://bugs.webkit.org/show_bug.cgi?id=145672
1355 <rdar://problem/21126637>
1357 Reviewed by Antti Koivisto.
1359 Limit the number of vnodes used by the WebContent processes to reduce
1360 the chance of getting killed due to the system running out of vnodes.
1361 We sometimes see the WebContent process use up to 50% of the system's
1362 vnode limit on some tests on iOS, which seems excessive. Most vnodes
1363 are due to CachedResources which are mmap'd from the WebKit disk cache
1364 and kept alive due to caches such as the Memory Cache / PageCache.
1366 This patch adds tracking for the number of SharedBuffer objects that are
1367 backed by a CFDataRef as this should track most of the vnodes used by
1368 the process. The WebContent process registers a vnode pressure handler
1369 upon initialization (likely it already does for memory pressure
1370 handling). This handler gets called when the process uses over 15% of
1371 of system's vnode limit and the "critical" flag is set if it uses over
1372 20% of the system limit. The vnode pressure handler currently calls the
1373 memory pressure handler as freeing our caches (especially PageCache,
1374 MemoryCache) and doing a JS GC frees up vnodes.
1376 On iPhone 6 Plus, the system limit is at 3000, which would lead to the
1377 following limits being used:
1378 soft: 450 / hard: 600
1380 However, on older hardware, the system limit can be as low as 2000,
1381 which would lead to the following limits being used:
1382 soft: 300 / hard: 400
1384 vnode tracking is currently only enabled on iOS because system vnode
1385 limits are usually much higher on Mac (e.g. 473695 on Mac Pro, 9984
1386 on a 2011 MacBook Air) and we normally don't get killed.
1388 * WebCore.xcodeproj/project.pbxproj:
1390 Add new files to the XCode project.
1392 * platform/SharedBuffer.h:
1394 Add a VNodeTracker::Token member next to the CFDataRef member that we
1395 initialize if the SharedBuffer is constructed from a CFDataRef.
1397 * platform/VNodeTracker.cpp: Added.
1398 (WebCore::VNodeTracker::singleton):
1399 (WebCore::VNodeTracker::VNodeTracker):
1400 (WebCore::VNodeTracker::checkPressureState):
1401 (WebCore::VNodeTracker::pressureWarningTimerFired):
1402 (WebCore::VNodeTracker::nextPressureWarningInterval):
1403 (WebCore::VNodeTracker::platformInitialize):
1404 * platform/VNodeTracker.h: Added.
1405 (WebCore::VNodeTracker::setPressureHandler):
1407 Add a new VNodeTracker singleton to keep track the number of vnodes
1408 used by the process since the system does not issue warnings before
1409 reaching its vnode limit. Call sites should request Tokens for
1410 every vnode they use for tracking purposes. Each process can then
1411 set a vnode pressure handler function that will be called when the
1412 process is over the designated limits.
1414 * platform/cf/SharedBufferCF.cpp:
1415 (WebCore::SharedBuffer::SharedBuffer):
1417 Take a VNodeToken from the VNodeTracker when constructing the
1418 SharedBuffer from a CFDataRef as these usually use mmap.
1420 * platform/cocoa/VNodeTrackerCocoa.cpp: Added.
1421 (WebCore::VNodeTracker::platformInitialize):
1423 Get the system's vnode limit and uses 15% of that value as soft
1424 limit for the process and 20% of that value as hard limit.
1426 2015-06-05 Dean Jackson <dino@apple.com>
1428 Lingering checkbox animations when rapidly switching between views on WK1
1429 https://bugs.webkit.org/show_bug.cgi?id=145715
1430 <rdar://problem/17381121>
1432 Reviewed by Simon Fraser.
1434 On WK1, the NSView we use for NSButtonCells is parented in the ScrollView.
1435 Our checkbox and radiobutton animations cause AppKit to create a CALayer which
1436 is parented into that view. As we render the animations, we see the CALayer getting
1439 The fix was to use an unparented layer on WK1 when drawing these controls, the same
1440 way WK2 does. This technique may apply to all controls, but restricting it
1441 to just the buttons at the moment is less risky.
1443 This only happens during the swap between a checked and non-checked state,
1444 and we have no way to test it :(
1446 * platform/mac/ThemeMac.h: New optional parameter to ensuredView.
1447 * platform/mac/ThemeMac.mm:
1448 (WebCore::paintToggleButton): If we're on Yosemite or highter, use an unparented view.
1449 (WebCore::ThemeMac::ensuredView): Return either a parented or unparented view.
1451 2015-06-05 Matt Rajca <mrajca@apple.com>
1453 MediaSessions should keep track of their participating media elements.
1454 https://bugs.webkit.org/show_bug.cgi?id=145703
1456 Reviewed by Eric Carlson.
1458 * Modules/mediasession/MediaSession.cpp:
1459 (WebCore::MediaSession::addMediaElement): Add the given media element to the media session.
1460 (WebCore::MediaSession::removeMediaElement): Remove the given media element from the media session.
1461 (WebCore::MediaSession::activeParticipatingElements): Dynamically build a vector of actively-playing media
1463 * Modules/mediasession/MediaSession.h:
1464 * html/HTMLMediaElement.cpp:
1465 (WebCore::HTMLMediaElement::~HTMLMediaElement): Ensure the element is removed from its media session.
1466 (WebCore::HTMLMediaElement::setSession): Update sessions' references to their media elements.
1468 2015-06-05 Chris Dumez <cdumez@apple.com>
1470 Regression(r176212): Broke app switching on iCloud.com
1471 https://bugs.webkit.org/show_bug.cgi?id=145708
1472 <rdar://problem/21235277>
1474 Reviewed by Simon Fraser.
1476 Roll out r176212 and follow-up fixes for now, to fix iCloud.com.
1477 We can reconsider later how to do this in a safer way.
1479 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1480 (WebCore::JSCSSStyleDeclaration::putDelegate): Deleted.
1481 (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Deleted.
1484 * dom/ElementRareData.cpp:
1485 * dom/ElementRareData.h:
1486 (WebCore::ElementRareData::ElementRareData):
1487 (WebCore::ElementRareData::~ElementRareData): Deleted.
1489 (WebCore::Node::materializeRareData):
1490 * html/HTMLCanvasElement.cpp:
1491 (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged): Deleted.
1492 * page/DOMTimer.cpp:
1493 (WebCore::DOMTimerFireState::scriptMadeNonUserObservableChanges): Deleted.
1494 (WebCore::DOMTimerFireState::scriptMadeUserObservableChanges): Deleted.
1495 (WebCore::NestedTimersMap::instanceForContext): Deleted.
1496 (WebCore::DOMTimer::install): Deleted.
1497 (WebCore::DOMTimer::fired): Deleted.
1498 (WebCore::DOMTimer::alignedFireTime): Deleted.
1499 (WebCore::DOMTimer::activeDOMObjectName): Deleted.
1501 * page/FrameView.cpp:
1502 (WebCore::FrameView::reset): Deleted.
1503 (WebCore::FrameView::viewportContentsChanged): Deleted.
1504 (WebCore::FrameView::autoSizeIfEnabled): Deleted.
1507 2015-06-05 Myles C. Maxfield <mmaxfield@apple.com>
1509 [iOS] Emoji overlap preceeding lines
1510 https://bugs.webkit.org/show_bug.cgi?id=145678
1511 <rdar://problem/10684914>
1513 Reviewed by Enrica Casucci.
1515 In WebKit, we first lay out lines, and then we lay out text inside those lines. Text is vertically centered in
1516 its containing line. If the author has not specified a particular line-height, the height of a line comes from
1517 the font metrics for the primary font of the line.
1519 In iOS, we were specifically hardcoding the line height metric of Apple Color Emoji to be 0. This means that,
1520 if Apple Color Emoji is the primary font for a line, and an explicit line-height was not specified, the lines
1521 are laid out with 0 height. Then, when we vertically center the text inside the line, the top half of the text
1522 overlaps the preceeding line.
1524 I'm not sure exactly why were were hardcoding this value to 0, as it is surely wrong. I'm going to ask Enrica
1525 to review this patch; hopefully she knows the answer.
1527 Test: fast/text/emoji.html
1529 * platform/graphics/cocoa/FontCocoa.mm:
1530 (WebCore::Font::platformInit):
1532 2015-06-05 Alex Christensen <achristensen@webkit.org>
1534 [Web Timing] Use new SPI to enable data collection.
1535 https://bugs.webkit.org/show_bug.cgi?id=145650
1536 rdar://problem/21203358
1538 Reviewed by Chris Dumez.
1540 * platform/network/cf/ResourceHandleCFNet.cpp:
1541 (WebCore::ResourceHandle::createCFURLConnection):
1542 Gather web timing data on iOS.
1543 * platform/network/mac/ResourceHandleMac.mm:
1544 (WebCore::ResourceHandle::createNSURLConnection):
1545 (WebCore::ResourceHandle::setCollectsTimingData):
1546 Gather web timing data on Mac.
1548 2015-06-05 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1550 [Streams API] ReadableStream should store callbacks as a Deque
1551 https://bugs.webkit.org/show_bug.cgi?id=145641
1553 Reviewed by Darin Adler.
1555 Covered by existing tests.
1557 * Modules/streams/ReadableStream.cpp:
1558 (WebCore::ReadableStream::resolveReadCallback): Use of Deque.takeFirst
1559 * Modules/streams/ReadableStream.h: Using Deque in lieu of Vector for storing callbacks.
1561 2015-06-05 Mark Lam <mark.lam@apple.com>
1563 finally blocks should not set the exception stack trace when re-throwing the exception.
1564 https://bugs.webkit.org/show_bug.cgi?id=145525
1566 Reviewed by Geoffrey Garen.
1568 Update to use the new JSC::Exception object.
1570 Test: inspector/debugger/break-on-exceptions.html
1572 * ForwardingHeaders/runtime/Exception.h: Added.
1573 * bindings/js/JSCallbackData.cpp:
1574 (WebCore::JSCallbackData::invokeCallback):
1575 * bindings/js/JSCustomXPathNSResolver.cpp:
1576 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1577 * bindings/js/JSDOMBinding.cpp:
1579 (WebCore::reportException):
1580 (WebCore::reportCurrentException):
1581 * bindings/js/JSDOMBinding.h:
1582 * bindings/js/JSErrorHandler.cpp:
1583 (WebCore::JSErrorHandler::handleEvent):
1584 * bindings/js/JSEventListener.cpp:
1585 (WebCore::JSEventListener::handleEvent):
1586 * bindings/js/JSMainThreadExecState.cpp:
1587 (WebCore::JSMainThreadExecState::didLeaveScriptContext):
1588 (WebCore::functionCallHandlerFromAnyThread):
1589 (WebCore::evaluateHandlerFromAnyThread):
1590 * bindings/js/JSMainThreadExecState.h:
1591 (WebCore::JSMainThreadExecState::currentState):
1592 (WebCore::JSMainThreadExecState::call):
1593 (WebCore::JSMainThreadExecState::evaluate):
1594 (WebCore::JSMainThreadExecState::runTask):
1596 * bindings/js/JSMediaDevicesCustom.cpp:
1597 (WebCore::JSMediaDevices::getUserMedia):
1598 - Fixed a bug where the exception was not cleared before entering the VM to
1601 * bindings/js/JSMutationCallback.cpp:
1602 (WebCore::JSMutationCallback::call):
1603 * bindings/js/ReadableJSStream.cpp:
1604 (WebCore::getPropertyFromObject):
1605 (WebCore::callFunction):
1606 (WebCore::ReadableJSStream::Source::start):
1607 * bindings/js/ScheduledAction.cpp:
1608 (WebCore::ScheduledAction::executeFunctionInContext):
1609 * bindings/js/ScriptController.cpp:
1610 (WebCore::ScriptController::evaluateInWorld):
1611 * bindings/js/SerializedScriptValue.cpp:
1612 (WebCore::SerializedScriptValue::create):
1613 (WebCore::SerializedScriptValue::deserialize):
1614 * bindings/js/WorkerScriptController.cpp:
1615 (WebCore::WorkerScriptController::evaluate):
1616 (WebCore::WorkerScriptController::setException):
1617 (WebCore::WorkerScriptController::scheduleExecutionTermination):
1618 * bindings/js/WorkerScriptController.h:
1619 (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
1620 * bindings/js/WorkerScriptDebugServer.cpp:
1621 (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
1622 (WebCore::WorkerScriptDebugServer::reportException):
1623 * bindings/js/WorkerScriptDebugServer.h:
1624 * bindings/objc/WebScriptObject.mm:
1625 (WebCore::createJSWrapper):
1626 (WebCore::addExceptionToConsole):
1627 (-[WebScriptObject callWebScriptMethod:withArguments:]):
1628 (-[WebScriptObject evaluateWebScript:]):
1629 - Changed to call a version of JSMainThreadExecState::evaluate() that provides
1630 a stub returnedException because evaluateWebScript: doesn't need the exception.
1632 * inspector/PageScriptDebugServer.cpp:
1633 (WebCore::PageScriptDebugServer::isContentScript):
1634 (WebCore::PageScriptDebugServer::reportException):
1635 * inspector/PageScriptDebugServer.h:
1636 * workers/WorkerGlobalScope.cpp:
1637 (WebCore::WorkerGlobalScope::importScripts):
1639 2015-06-05 Eric Carlson <eric.carlson@apple.com>
1641 Layout tests fullscreen/video-controls-drag.html and media/video-fullscreeen-only-controls.html
1643 https://bugs.webkit.org/show_bug.cgi?id=145675
1645 Reviewed by Dean Jackson.
1647 No new tests, changes covered by existing tests.
1649 * Modules/mediacontrols/mediaControlsApple.js:
1650 (Controller.prototype.updateControls): Use shouldHaveControls() to test if controls should
1652 (Controller.prototype.handleWrapperMouseMove): Don't return early when in fullscreen.
1653 (Controller.prototype.updateFullscreenButtons): Drive-by fix: always show the (exit) fullscreen
1654 button when in fullscreen.
1657 2015-06-04 David Hyatt <hyatt@apple.com>
1659 Underlines too close in vertical Chinese text.
1660 https://bugs.webkit.org/show_bug.cgi?id=145651
1661 <rdar://problem/11105920>
1663 Reviewed by Simon Fraser.
1665 Added fast/text/decorations-vertical-underline.html
1667 * style/InlineTextBoxStyle.cpp:
1668 (WebCore::computeUnderlineOffset):
1669 Make sure the to map text-underline-position: auto to under when a line has an ideographic baseline.
1671 2015-06-05 Carlos Alberto Lopez Perez <clopez@igalia.com>
1673 [GTK] [Wayland] The MiniBrowser crashes inside Weston.
1674 https://bugs.webkit.org/show_bug.cgi?id=145645
1676 Reviewed by Žan Doberšek.
1678 No new tests, no behavior changes.
1680 The issue was caused because we were not properly initializing the
1681 Wayland display, and we were returning a nullptr in PlatformDisplayWayland::create(),
1682 therefore a crash was happening on WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1136
1683 <http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp?rev=185245#L1136>
1685 * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1686 (WebCore::PlatformDisplayWayland::create): When connecting to the Wayland
1687 server socket we should use the default value (NULL). This allows the value
1688 to be overwritten at run-time by the environment variables WAYLAND_DISPLAY or
1689 WAYLAND_SOCKET that the Wayland compositor should define. Also add a couple
1690 of warnings to get information about what is going wrong when we fail to
1691 initialize the display instead of just crashing without giving more information.
1692 * platform/graphics/wayland/PlatformDisplayWayland.h:
1693 (WebCore::PlatformDisplayWayland::isInitialized): Not longer check for m_webkitgtk
1694 to signal that the display is ready because the UIProcess embedded Wayland
1695 subcompositer is still not implemented. Added a FIXME note about it.
1697 2015-06-05 Dean Jackson <dino@apple.com>
1699 [Mac] Popup focus is cut off
1700 https://bugs.webkit.org/show_bug.cgi?id=145688
1701 <rdar://problem/18313375>
1703 Reviewed by Brent Fulgham.
1705 Yosemite increased the width of focus rings, causing
1706 some ugly clipping on Yosemite. The solution was to
1707 not set a clip (which was code introduced for Leopard).
1709 Test: fast/forms/select-element-focus-ring.html
1711 * rendering/RenderThemeMac.mm:
1712 (WebCore::RenderThemeMac::paintMenuList): Don't clip on Yosemite.
1714 2015-06-05 Manuel Rego Casasnovas <rego@igalia.com>
1716 [CSS Grid Layout] Support dots sequences in grid-template-areas
1717 https://bugs.webkit.org/show_bug.cgi?id=145693
1719 Reviewed by Sergio Villar Senin.
1721 The CSS WG agreed to consider a sequence of "." characters a single null
1722 cell token for grid-template-areas. That way authors can match the
1723 number of dots to the width of the column.
1725 For more information see:
1726 https://lists.w3.org/Archives/Public/www-style/2015May/0175.html
1728 Added new test cases to check the new behavior.
1730 * css/CSSParser.cpp:
1731 (WebCore::containsOnlyDots): New helper function to check that the grid
1732 area name is composed by only dots.
1733 (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
1734 function to look for unnamed areas.
1736 2015-06-04 Joonghun Park <jh718.park@samsung.com>
1738 Purge PassRefPtr create() factory functions in WebCore/css
1739 https://bugs.webkit.org/show_bug.cgi?id=144905
1741 Reviewed by Darin Adler.
1743 Return Ref instead of PassRefPtr in create() factory functions in css,
1744 because the factory can't return null.
1746 No new tests, no new behaviours.
1748 * css/BasicShapeFunctions.cpp:
1749 (WebCore::valueForCenterCoordinate):
1750 (WebCore::basicShapeRadiusToCSSValue):
1751 (WebCore::valueForBasicShape):
1752 * css/BasicShapeFunctions.h:
1753 * css/CSSBasicShapes.h:
1754 * css/CSSCalculationValue.cpp:
1755 (WebCore::createCSS):
1756 (WebCore::CSSCalcValue::create):
1757 * css/CSSCalculationValue.h:
1758 * css/CSSCharsetRule.h:
1759 * css/CSSComputedStyleDeclaration.cpp:
1760 (WebCore::valueForNinePieceImageSlice):
1761 (WebCore::valueForNinePieceImageQuad):
1762 (WebCore::zoomAdjustedPixelValue):
1763 (WebCore::zoomAdjustedNumberValue):
1764 (WebCore::zoomAdjustedPixelValueForLength):
1765 (WebCore::valueForReflection):
1766 (WebCore::createPositionListForLayer):
1767 (WebCore::positionOffsetValue):
1768 (WebCore::percentageOrZoomAdjustedValue):
1769 (WebCore::autoOrZoomAdjustedValue):
1770 (WebCore::getBorderRadiusCornerValues):
1771 (WebCore::getBorderRadiusCornerValue):
1772 (WebCore::getBorderRadiusShorthandValue):
1773 (WebCore::matrixTransformValue):
1774 (WebCore::computedTransform):
1775 (WebCore::adjustLengthForZoom):
1776 (WebCore::ComputedStyleExtractor::valueForShadow):
1777 (WebCore::ComputedStyleExtractor::valueForFilter):
1778 (WebCore::specifiedValueForGridTrackBreadth):
1779 (WebCore::specifiedValueForGridTrackSize):
1780 (WebCore::valueForGridTrackList):
1781 (WebCore::scrollSnapDestination):
1782 (WebCore::scrollSnapPoints):
1783 (WebCore::scrollSnapCoordinates):
1784 (WebCore::createAnimationTriggerValue):
1785 (WebCore::getAnimationTriggerValue):
1786 (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
1787 (WebCore::fillSizeToCSSValue):
1788 (WebCore::lineHeightFromStyle):
1789 (WebCore::fontSizeFromStyle):
1790 (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
1791 (WebCore::shapePropertyValue):
1792 (WebCore::ComputedStyleExtractor::propertyValue):
1793 * css/CSSComputedStyleDeclaration.h:
1794 * css/CSSFontFace.h:
1795 (WebCore::CSSFontFace::create):
1796 * css/CSSFontFaceLoadEvent.h:
1797 * css/CSSFontFaceRule.h:
1798 * css/CSSGrammar.y.in:
1799 * css/CSSGridLineNamesValue.cpp:
1800 (WebCore::CSSGridLineNamesValue::cloneForCSSOM):
1801 * css/CSSGridLineNamesValue.h:
1802 (WebCore::CSSGridLineNamesValue::create):
1803 * css/CSSImportRule.h:
1804 * css/CSSKeyframeRule.h:
1805 (WebCore::StyleKeyframe::create):
1806 * css/CSSKeyframesRule.h:
1807 * css/CSSMediaRule.h:
1808 * css/CSSPageRule.h:
1809 * css/CSSParser.cpp:
1810 (WebCore::CSSParser::parseGridLineNames):
1811 (WebCore::CSSParser::parseDashboardRegions):
1812 (WebCore::CSSParser::parseClipShape):
1813 (WebCore::CSSParser::parseBasicShape):
1814 (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
1815 (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
1817 (WebCore::CSSParser::ValueWithCalculation::calculation):
1818 * css/CSSPrimitiveValue.cpp:
1819 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1820 (WebCore::CSSPrimitiveValue::init):
1821 (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1822 * css/CSSPrimitiveValue.h:
1823 (WebCore::CSSPrimitiveValue::create):
1824 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1825 * css/CSSPropertySourceData.h:
1826 (WebCore::CSSStyleSourceData::create):
1827 (WebCore::CSSRuleSourceData::create):
1828 (WebCore::CSSRuleSourceData::createUnknown):
1829 * css/CSSRuleList.h:
1830 * css/CSSSegmentedFontFace.h:
1831 (WebCore::CSSSegmentedFontFace::create):
1832 * css/CSSSelector.cpp:
1833 (WebCore::CSSSelector::createRareData):
1834 * css/CSSSelector.h:
1835 (WebCore::CSSSelector::RareData::create):
1836 * css/CSSStyleRule.h:
1837 * css/CSSSupportsRule.h:
1838 * css/CSSValuePool.h:
1839 (WebCore::CSSValuePool::createValue):
1840 * css/FontLoader.cpp:
1841 (WebCore::LoadFontCallback::create):
1842 * css/LengthRepeat.h:
1843 (WebCore::LengthRepeat::create):
1844 (WebCore::LengthRepeat::cloneForCSSOM):
1846 (WebCore::MediaQuerySet::create):
1847 (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
1848 (WebCore::MediaList::create):
1849 * css/MediaQueryList.cpp:
1850 (WebCore::MediaQueryList::create):
1851 * css/MediaQueryList.h:
1852 * css/MediaQueryMatcher.h:
1853 (WebCore::MediaQueryMatcher::create):
1855 (WebCore::Pair::create):
1857 (WebCore::Rect::create):
1858 (WebCore::Rect::cloneForCSSOM):
1859 (WebCore::Quad::create):
1860 (WebCore::Quad::cloneForCSSOM):
1861 * css/SVGCSSComputedStyleDeclaration.cpp:
1862 (WebCore::paintOrder):
1863 (WebCore::ComputedStyleExtractor::svgPropertyValue):
1865 (WebCore::StyleMedia::create):
1866 * css/StyleResolver.cpp:
1867 (WebCore::StyleResolver::keyframeStylesForAnimation):
1868 * css/StyleSheetList.h:
1869 (WebCore::StyleSheetList::create):
1870 * css/ViewportStyleResolver.h:
1871 (WebCore::ViewportStyleResolver::create):
1872 * css/WebKitCSSMatrix.h:
1873 * css/WebKitCSSRegionRule.h:
1874 * css/WebKitCSSViewportRule.h:
1875 * page/animation/CSSPropertyAnimation.cpp:
1876 (WebCore::blendFilter):
1877 * rendering/style/RenderStyle.h:
1878 (WebCore::adjustFloatForAbsoluteZoom):
1879 * rendering/style/StyleInheritedData.h:
1881 2015-06-04 Benjamin Poulain <bpoulain@apple.com>
1883 The last 2 merged DFAs are not minimized by DFACombiner
1885 * contentextensions/DFACombiner.cpp:
1886 (WebCore::ContentExtensions::DFACombiner::combineDFAs):
1887 I introduced a bug when I made minimization conditional: the last merge
1888 does not minimize if we do not reach the minimum size.
1890 2015-06-04 Brent Fulgham <bfulgham@apple.com>
1892 Latching algorithm in findEnclosingOverflowScroll is broken
1893 https://bugs.webkit.org/show_bug.cgi?id=145642
1894 <rdar://problem/21242308>
1896 Reviewed by Simon Fraser.
1898 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
1900 * page/mac/EventHandlerMac.mm:
1901 (WebCore::scrollableAreaForBox): Added helper function.
1902 (WebCore::findEnclosingScrollableContainer): Renamed from findEnclosingOverflowScroll.
1903 Only identify something as our scroll element if it can be scrolled in either
1904 axis of the gesture's motion.
1905 (WebCore::scrollableAreaForContainerNode): Use new helper function.
1906 (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
1907 name, and pass horizontal and vertical deltas.
1908 (WebCore::findEnclosingOverflowScroll): Deleted.
1910 2015-06-04 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1912 REGRESSION(r185091): Crash happens on indexdb tests
1913 https://bugs.webkit.org/show_bug.cgi?id=145549
1915 Reviewed by Darin Adler.
1917 * Modules/indexeddb/IDBDatabaseError.h:
1918 (WebCore::IDBDatabaseError::create): Revert Ref usage of IDBDatabaseError::create().
1920 2015-06-04 Simon Fraser <simon.fraser@apple.com>
1922 Crash in EventDispatcher::dispatchEvent entering a location on Google Maps
1923 https://bugs.webkit.org/show_bug.cgi?id=145677
1924 rdar://problem/20698280
1926 Reviewed by Dean Jackson.
1928 If a transition is running on a pseudo-element, and the host element is removed
1929 from the DOM just as the transition ends, and there is a transition event listener,
1930 then we'd crash with a null dereference in event dispatch code.
1932 AnimationController tries to clean up running animations when renderers are destroyed,
1933 but omitted to remove the element from two vectors that store element references.
1934 Elements are only added to these vectors briefly on animation end, before firing
1935 events, but failure to remove the vector entries could result in attempting
1936 to fire an event on a pseudo-element with no host element.
1938 Also convert EventDispatcher code to be more robust to potentially null event
1939 targets, since it's not clear that eventTargetRespectingTargetRules() can always
1940 manage to return a non-null node.
1942 Hard to make a test because this is timing sensitive.
1944 * dom/EventDispatcher.cpp:
1945 (WebCore::eventTargetRespectingTargetRules):
1946 (WebCore::EventDispatcher::dispatchScopedEvent):
1947 (WebCore::EventDispatcher::dispatchEvent):
1948 (WebCore::EventPath::EventPath):
1949 * page/animation/AnimationController.cpp:
1950 (WebCore::AnimationControllerPrivate::clear):
1952 2015-06-04 Hunseop Jeong <hs85.jeong@samsung.com>
1954 Replace 0 with nullptr in WebCore/Page.
1955 https://bugs.webkit.org/show_bug.cgi?id=145631
1957 Reviewed by Darin Adler.
1959 No new tests, no behavior changes.
1961 * page/AutoscrollController.cpp:
1962 (WebCore::AutoscrollController::AutoscrollController):
1963 (WebCore::AutoscrollController::stopAutoscrollTimer):
1964 * page/ContentSecurityPolicy.cpp:
1965 (WebCore::CSPSourceList::parseSource):
1966 * page/ContentSecurityPolicy.h:
1967 * page/ContextMenuController.cpp:
1968 (WebCore::ContextMenuController::clearContextMenu):
1969 * page/DOMSelection.cpp:
1970 (WebCore::DOMSelection::clearTreeScope):
1971 * page/DOMWindow.cpp:
1972 (WebCore::DOMWindow::resetDOMWindowProperties):
1973 (WebCore::DOMWindow::localStorage):
1974 (WebCore::DOMWindow::focus):
1976 * page/DOMWindowExtension.cpp:
1977 (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
1978 (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
1979 * page/DOMWindowProperty.cpp:
1980 (WebCore::DOMWindowProperty::DOMWindowProperty):
1981 (WebCore::DOMWindowProperty::~DOMWindowProperty):
1982 (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
1983 (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
1984 (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
1985 * page/DragController.cpp:
1986 (WebCore::DragController::dragEnded):
1987 (WebCore::DragController::performDragOperation):
1988 (WebCore::DragController::tryDocumentDrag):
1989 (WebCore::DragController::concludeEditDrag):
1990 (WebCore::DragController::startDrag):
1991 * page/EventHandler.cpp:
1992 (WebCore::EventHandler::EventHandler):
1993 (WebCore::EventHandler::resizeLayerDestroyed):
1994 (WebCore::EventHandler::freeDataTransfer):
1995 (WebCore::EventHandler::dragSourceEndedAt):
1996 (WebCore::EventHandler::handleDrag):
1997 * page/EventHandler.h:
1998 * page/FocusController.cpp:
1999 (WebCore::FocusController::advanceFocusInDocumentOrder):
2001 (WebCore::Frame::~Frame):
2002 (WebCore::Frame::searchForLabelsBeforeElement):
2003 (WebCore::Frame::willDetachPage):
2004 (WebCore::Frame::createView):
2006 (WebCore::Frame::detachFromPage):
2007 * page/FrameDestructionObserver.cpp:
2008 (WebCore::FrameDestructionObserver::FrameDestructionObserver):
2009 (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
2010 (WebCore::FrameDestructionObserver::frameDestroyed):
2011 * page/FrameTree.cpp:
2012 (WebCore::FrameTree::~FrameTree):
2013 (WebCore::FrameTree::removeChild):
2015 (WebCore::FrameTree::FrameTree):
2016 (WebCore::FrameTree::detachFromParent):
2018 (WebCore::History::History):
2020 (WebCore::Page::Page):
2021 (WebCore::Page::~Page):
2022 (WebCore::Page::findStringMatchingRanges):
2023 * page/PageGroup.cpp:
2024 * page/Performance.cpp:
2025 (WebCore::Performance::Performance):
2026 * page/PointerLockController.cpp:
2027 (WebCore::PointerLockController::didLosePointerLock):
2028 (WebCore::PointerLockController::clearElement):
2029 * page/SecurityOrigin.h:
2030 (WebCore::SecurityOrigin::canAccessDatabase):
2031 * page/Settings.cpp:
2032 (WebCore::Settings::Settings):
2033 * page/SpatialNavigation.cpp:
2034 (WebCore::FocusCandidate::FocusCandidate):
2035 * page/SpatialNavigation.h:
2036 (WebCore::FocusCandidate::FocusCandidate):
2037 * page/scrolling/ScrollingTreeNode.cpp:
2038 (WebCore::ScrollingTreeNode::ScrollingTreeNode):
2039 * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
2040 (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
2042 2015-06-04 Benjamin Poulain <bpoulain@apple.com>
2044 Combine tiny DFAs into slightly larger ones
2045 https://bugs.webkit.org/show_bug.cgi?id=145572
2047 Reviewed by Alex Christensen.
2049 This patch changes the ContentExtensions compiler to combine tiny DFA
2050 until they reach a minimum size.
2052 The main tool introduced here is DFAMerger. It combines 2 DFAs into
2053 a single DFA that represent the union of the two machines.
2054 That is done by a simple subset construction on the "name" of the nodes
2057 Since we only merge 2 machines, and they are both deterministic, we know that
2058 we can only be in one state of each machine, or a state in one machine without
2059 equivalent in the other machine.
2060 We exploit that to identify the mapping between nodes. To identify a node in
2061 the new machine from nodes in the original machines, we just concatenate the node
2062 IDs into a single 64 bits number. If there is no node in one of the machine, we
2065 The current algorithm does not have any subgraph pruning, machines grow very very
2066 quickly. Because of that, we only merge very small DFAs at the moment.
2068 Test: http/tests/contentextensions/filters-with-quantifiers-combined.html
2070 * WebCore.xcodeproj/project.pbxproj:
2071 * contentextensions/ContentExtensionCompiler.cpp:
2072 (WebCore::ContentExtensions::compileRuleList):
2073 * contentextensions/ContentExtensionsDebugging.h:
2074 * contentextensions/DFA.cpp:
2075 (WebCore::ContentExtensions::DFA::graphSize):
2076 (WebCore::ContentExtensions::DFA::debugPrintDot):
2077 * contentextensions/DFA.h:
2078 * contentextensions/DFACombiner.cpp: Added.
2079 (WebCore::ContentExtensions::DFAMerger::DFAMerger):
2080 (WebCore::ContentExtensions::DFAMerger::merge):
2081 (WebCore::ContentExtensions::DFAMerger::signatureForIndices):
2082 (WebCore::ContentExtensions::DFAMerger::extractIndexA):
2083 (WebCore::ContentExtensions::DFAMerger::extractIndexB):
2084 (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
2085 (WebCore::ContentExtensions::DFAMerger::setHalfSignature):
2086 (WebCore::ContentExtensions::DFAMerger::populateTransitions):
2087 (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions):
2088 (WebCore::ContentExtensions::DFAMerger::createTransitions):
2089 (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded):
2090 (WebCore::ContentExtensions::DFACombiner::combineDFAs):
2091 * contentextensions/DFACombiner.h: Copied from Source/WebCore/contentextensions/DFA.h.
2092 (WebCore::ContentExtensions::DFACombiner::addDFA):
2094 2015-06-04 Matt Rajca <mrajca@apple.com>
2096 Rename MediaSessionManager to PlatformMediaSessionManager for consistency with PlatformMediaSession.
2097 https://bugs.webkit.org/show_bug.cgi?id=145648
2099 Reviewed by Eric Carlson.
2101 * WebCore.vcxproj/WebCore.vcxproj:
2102 * WebCore.vcxproj/WebCore.vcxproj.filters:
2103 * WebCore.xcodeproj/project.pbxproj:
2104 * html/HTMLMediaElement.cpp:
2105 * html/MediaElementSession.cpp:
2106 (WebCore::MediaElementSession::effectivePreloadForElement):
2107 (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
2108 * platform/audio/PlatformMediaSession.cpp:
2109 (WebCore::PlatformMediaSession::PlatformMediaSession):
2110 (WebCore::PlatformMediaSession::~PlatformMediaSession):
2111 (WebCore::PlatformMediaSession::clientWillBeginPlayback):
2112 (WebCore::PlatformMediaSession::clientWillPausePlayback):
2113 (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
2114 (WebCore::PlatformMediaSession::updateClientDataBuffering):
2115 * platform/audio/PlatformMediaSessionManager.cpp: Renamed from Source/WebCore/platform/audio/MediaSessionManager.cpp.
2116 (WebCore::PlatformMediaSessionManager::sharedManager):
2117 (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
2118 (WebCore::PlatformMediaSessionManager::resetRestrictions):
2119 (WebCore::PlatformMediaSessionManager::has):
2120 (WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
2121 (WebCore::PlatformMediaSessionManager::count):
2122 (WebCore::PlatformMediaSessionManager::beginInterruption):
2123 (WebCore::PlatformMediaSessionManager::endInterruption):
2124 (WebCore::PlatformMediaSessionManager::addSession):
2125 (WebCore::PlatformMediaSessionManager::removeSession):
2126 (WebCore::PlatformMediaSessionManager::addRestriction):
2127 (WebCore::PlatformMediaSessionManager::removeRestriction):
2128 (WebCore::PlatformMediaSessionManager::restrictions):
2129 (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
2130 (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
2131 (WebCore::PlatformMediaSessionManager::setCurrentSession):
2132 (WebCore::PlatformMediaSessionManager::currentSession):
2133 (WebCore::PlatformMediaSessionManager::sessionRestrictsInlineVideoPlayback):
2134 (WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):
2135 (WebCore::PlatformMediaSessionManager::applicationWillEnterBackground):
2136 (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground):
2137 (WebCore::PlatformMediaSessionManager::updateSessionState):
2138 (WebCore::PlatformMediaSessionManager::didReceiveRemoteControlCommand):
2139 (WebCore::PlatformMediaSessionManager::systemWillSleep):
2140 (WebCore::PlatformMediaSessionManager::systemDidWake):
2141 (WebCore::PlatformMediaSessionManager::audioOutputDeviceChanged):
2142 * platform/audio/PlatformMediaSessionManager.h: Renamed from Source/WebCore/platform/audio/MediaSessionManager.h.
2143 (WebCore::PlatformMediaSessionManager::~PlatformMediaSessionManager):
2144 (WebCore::PlatformMediaSessionManager::configureWireLessTargetMonitoring):
2145 (WebCore::PlatformMediaSessionManager::hasWirelessTargetsAvailable):
2146 (WebCore::PlatformMediaSessionManager::sessions):
2147 * platform/audio/mac/AudioDestinationMac.cpp:
2148 * platform/audio/mac/MediaSessionManagerMac.cpp:
2149 (PlatformMediaSessionManager::updateSessionState):
2150 (MediaSessionManager::updateSessionState): Deleted.
2151 * testing/Internals.cpp:
2153 2015-06-04 Eric Carlson <eric.carlson@apple.com>
2155 [Mac] Don't show default controls after playing to wireless target, again
2156 https://bugs.webkit.org/show_bug.cgi?id=145620
2157 <rdar://problem/21145806>
2159 Reviewed by Dean Jackson.
2161 Follow up to fix two tests broken by r185207.
2163 * Modules/mediacontrols/mediaControlsApple.js:
2164 (Controller.prototype.updateControls): Always show controls when the video element
2165 is the fullscreen element because custom controls aren't possible.
2167 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2169 [Cocoa] Add ASSERT to FontPlatformData::ctFont()
2170 https://bugs.webkit.org/show_bug.cgi?id=145659
2172 Reviewed by Dean Jackson.
2174 The new ASSERT needs to be guarded with CORETEXT_WEB_FONTS, which is defined in FontCustomPlatformData.h,
2175 and is not accessible to FontPlatformData. Therefore, I've moved the definition into TextFlags.h, which
2178 No new tests because there is no behavior change.
2180 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2181 (WebCore::FontPlatformData::ctFont): Add the ASSERT.
2182 * platform/graphics/mac/FontCustomPlatformData.h: Move the CORETEXT_WEB_FONTS preprocessor
2184 * platform/text/TextFlags.h: ... to here.
2186 2015-06-04 Commit Queue <commit-queue@webkit.org>
2188 Unreviewed, rolling out r185208.
2189 https://bugs.webkit.org/show_bug.cgi?id=145655
2191 platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-
2192 latched-select.html (Requested by shallawa on #webkit).
2196 "Latching algorithm in findEnclosingOverflowScroll is broken"
2197 https://bugs.webkit.org/show_bug.cgi?id=145642
2198 http://trac.webkit.org/changeset/185208
2200 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2202 [Cocoa] Remove unnecessary code from FontPlatformData::ctFont()
2203 https://bugs.webkit.org/show_bug.cgi?id=145652
2205 Hoefler Text Italic no longer has initial and final swashes by default, so there
2206 is no reason to explicitly disable them.
2208 Reviewed by Andreas Kling.
2210 No new tests because there is no behavior change.
2212 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2213 (WebCore::FontPlatformData::ctFont):
2214 (WebCore::createFeatureSettingDictionary): Deleted.
2215 (WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Deleted.
2217 2015-06-04 Brent Fulgham <bfulgham@apple.com>
2219 Latching algorithm in findEnclosingOverflowScroll is broken
2220 https://bugs.webkit.org/show_bug.cgi?id=145642
2221 <rdar://problem/21242308>
2223 Reviewed by Simon Fraser.
2225 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
2227 * page/mac/EventHandlerMac.mm:
2228 (WebCore::findEnclosingOverflowScrollForDominantDirection): Renamed from
2229 'findEnclosingOverflowScroll'. Only identify element as our overflow
2230 scroll element if it can be scrolled in either axis of the gesture's
2232 (WebCore::scrolledToEdgeInDominantDirection): Renamed.
2233 (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
2234 name, and pass horizontal and vertical deltas.
2235 (WebCore::findEnclosingOverflowScroll): Deleted.
2237 2015-06-04 Eric Carlson <eric.carlson@apple.com>
2239 [Mac] Don't show default controls after playing to wireless target, again
2240 https://bugs.webkit.org/show_bug.cgi?id=145620
2241 <rdar://problem/21145806>
2243 Reviewed by Dean Jackson.
2245 * Modules/mediacontrols/mediaControlsApple.js:
2246 (Controller.prototype.updateControls): Show or hide the panel as appropriate.
2247 (Controller.prototype.handleWrapperMouseMove): Early return if !video.controls.
2248 (Controller.prototype.addControls): Call updateControls instead of this.setNeedsTimelineMetricsUpdate
2249 so all needed setup is done.
2250 (Controller.prototype.resetHideControlsTimer): Only start the hide timer if playing.
2252 2015-06-04 Chris Dumez <cdumez@apple.com>
2254 [WK2] Prune more resources from the MemoryCache before process suspension
2255 https://bugs.webkit.org/show_bug.cgi?id=145633
2257 Reviewed by Andreas Kling.
2259 Prune more resources from the MemoryCache before process suspension or
2260 on simulated memory warning by doing a synchronous JS garbage collection
2261 and sweep *before* pruning dead resources from the memory cache.
2262 Previously, we would do the garbage collection after pruning the
2263 MemoryCache which meant that a lot of resources became dead after we
2264 tried to prune them.
2266 At the end a basic browsing on apple.com, we are able to remove ~17%
2267 more resources from the MemoryCache on simulated memory warning with this
2270 Pruning as much as we can from the memory cache on critical memory
2271 pressure or before process suspension is not only useful to free up
2272 memory but also to make room in the vnode table as a lot of
2273 CachedResources are mmmap'd from the network disk cache.
2275 * platform/MemoryPressureHandler.cpp:
2276 (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2277 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2279 - Pass 'synchronous' argument so that we know if we need to do a
2280 synchronous JS garbage collection.
2281 - Move here code from in the Cocoa handler that is doing a JS garbage
2282 collection as well as a sweep, and make this code cross-platform.
2283 This code used to be iOS specific but I see no reason we shouldn't
2286 (WebCore::MemoryPressureHandler::releaseMemory):
2287 * platform/MemoryPressureHandler.h:
2289 Use enum class arguments for critical / synchronous. The 'synchronous'
2290 argument is new so that the call site can let us know if memory needs
2291 to be freed synchronously (e.g. in case of imminent process suspension).
2293 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2294 (WebCore::MemoryPressureHandler::platformReleaseMemory):
2296 Remove iOS-specific code that was doing a JS garbage collection and
2297 sweep as this code is now in the generic memory pressure handler.
2299 (WebCore::MemoryPressureHandler::install):
2301 On simulated memory pressure, set 'synchronous' argument to Yes so that
2302 a synchronous GC is done by the generic memory pressure handler. This
2303 way, we no longer need to do a sync GC after calling the memory pressure
2304 handler. This avoids code duplication and makes sure the GC is done
2305 before pruning the memory cache.
2308 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2310 [Cocoa] Clean up m_isEmoji in FontPlatformData
2311 https://bugs.webkit.org/show_bug.cgi?id=145644
2313 Reviewed by Andreas Kling.
2315 m_isEmoji used to be a public member variable only defined on iOS. This
2316 means that, whenever it was consulted, the sites were surrounded by
2317 PLATFORM(IOS) guards. A cleaner design is to use a getter and setter,
2318 which on non-iOS platforms, always return false / do nothing. Then, the
2319 use sites can just use these functions without having ugly guards.
2321 No new tests because there is no behavior change.
2323 * platform/graphics/FontPlatformData.h:
2324 (WebCore::FontPlatformData::hash): Simplify isEmoji use site.
2325 (WebCore::FontPlatformData::isEmoji): Getter. Returns false on Mac.
2326 (WebCore::FontPlatformData::setIsEmoji): Setter. Does nothing on Mac.
2327 * platform/graphics/cocoa/FontCascadeCocoa.mm:
2328 (WebCore::pointAdjustedForEmoji): Simplify isEmoji use site.
2329 (WebCore::FontCascade::drawGlyphs): Ditto.
2330 * platform/graphics/cocoa/FontCocoa.mm:
2331 (WebCore::Font::platformInit): Ditto.
2332 (WebCore::canUseFastGlyphAdvanceGetter): Ditto.
2333 (WebCore::isEmoji): Deleted.
2334 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2335 (WebCore::FontPlatformData::platformDataInit): Simplify isEmoji use
2337 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2338 (WebCore::FontPlatformData::platformIsEqual): Ditto.
2339 (WebCore::FontPlatformData::ctFontSize): Ditto.
2340 * platform/graphics/ios/FontCacheIOS.mm:
2341 (WebCore::FontCache::getSystemFontFallbackForCharacters): Ditto.
2342 (WebCore::FontCache::createFontPlatformData): Ditto.
2343 * platform/graphics/mac/ComplexTextController.cpp:
2344 (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.
2346 2015-06-03 Brent Fulgham <bfulgham@apple.com>
2348 REGRESSION (r181879): Scrolling order on pages with focused iframe is broken.
2349 https://bugs.webkit.org/show_bug.cgi?id=145637
2350 <rdar://problem/20635581>
2352 Reviewed by Zalan Bujtas.
2354 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
2356 This page revealed a bug in our RenderBox code caused by the mismatch between
2357 our scrolling units, which are all integrally snapped, with our client height
2358 and widths, which are not snapped at all.
2360 In certain cases, the client height would have a small subpixel difference compared
2361 to the scroll height, which would cause WebKit to believe it was scrollable. When
2362 this happened, it would get stuck latched to this element and block scrolling events.
2365 (WebCore::Frame::scrollOverflowLayer): Use roundToInt for clientWidth and clientHeight,
2366 rather than integer truncation.
2367 * rendering/RenderBox.cpp:
2368 (WebCore::RenderBox::canBeScrolledAndHasScrollableArea): Need to round clientWidth
2369 and clientHeight to compare with scrollWidth/scrollHeight.
2370 * rendering/RenderBox.h:
2371 (WebCore::RenderBox::hasScrollableOverflowX): Ditto.
2372 (WebCore::RenderBox::hasScrollableOverflowY): Ditto.
2373 * rendering/RenderMarquee.cpp:
2374 (WebCore::RenderMarquee::computePosition): Use roundToInt for clientWidth and
2375 clientHeight, rather than integer truncation.
2377 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2379 [Cocoa] Clean up m_font inside FontPlatformData
2380 https://bugs.webkit.org/show_bug.cgi?id=145634
2382 Reviewed by Andreas Kling.
2384 FontPlatformDatas are used as keys in a HashMap. This means that they need
2385 to be able to represent a "deleted" value. Previously, this "deleted" value
2386 was represented as setting the pointer value of m_font to -1, and guarding
2387 all uses of m_font to make sure it wasn't -1 before dereferencing it.
2389 This patch simplifies FontPlatformData to represent a "deleted" value using
2390 a separate boolean member variable. This class is already big enough that
2391 the increased space is negligable (the class already contains two CoreText
2392 fonts in addition to a CoreGraphics font). Because of this simplification,
2393 m_font can now be a RetainPtr, instead of being manually retained and
2396 There is still a long way to go before FontPlatformData is acceptably
2397 clean and understandable. This patch improves one aspect of it, and more
2398 improvements will eventually follow.
2400 No new tests because there is no behavior change.
2402 * platform/graphics/FontCache.cpp: Remove unused variable.
2403 * platform/graphics/FontPlatformData.cpp:
2404 (WebCore::FontPlatformData::FontPlatformData): Clean up all the PLATFORM
2405 macros in favor of a single bool. Also, update to include new state.
2406 (WebCore::FontPlatformData::operator=): Update to include new state.
2407 * platform/graphics/FontPlatformData.h:
2408 (WebCore::FontPlatformData::font): Update to account for RetainPtr.
2409 (WebCore::FontPlatformData::nsFont): Ditto.
2410 (WebCore::FontPlatformData::setNSFont): Ditto.
2411 (WebCore::FontPlatformData::hash): Update to include new state.
2412 (WebCore::FontPlatformData::operator==): Ditto.
2413 (WebCore::FontPlatformData::isHashTableDeletedValue): Use new state.
2414 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
2415 (WebCore::FontPlatformData::isValidCTFontRef): Deleted.
2416 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2417 (WebCore::FontPlatformData::platformDataInit): No need for manual retain
2419 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2420 (WebCore::FontPlatformData::platformIsEqual): Update to account for
2422 (WebCore::FontPlatformData::setFont): No need for manual retain and
2424 (WebCore::FontPlatformData::FontPlatformData): Deleted.
2425 (WebCore::FontPlatformData::~FontPlatformData): Deleted.
2426 * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2427 (WebCore::FontPlatformData::~FontPlatformData): m_scaledFont is always
2429 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2431 2015-06-03 Carlos Alberto Lopez Perez <clopez@igalia.com>
2433 [GTK] [Wayland] Build is broken on trunk
2434 https://bugs.webkit.org/show_bug.cgi?id=142879
2436 Reviewed by Carlos Garcia Campos.
2438 No new tests, no behavior changes.
2440 Patch on GLContext.h picked from bug 136831 by
2441 Iago Toral <itoral@igalia.com> and Zan Dobersek <zdobersek@igalia.com>
2443 * platform/graphics/GLContext.h: Include wayland-egl.h before eglplatform.h
2444 to use the Wayland platform when building for Wayland.
2445 * platform/graphics/PlatformDisplay.cpp: Fix the include of GDK
2446 headers for the different targets.
2447 * platform/graphics/wayland/WaylandSurface.cpp: Fix build after r183731.
2448 (WebCore::WaylandSurface::~WaylandSurface):
2450 2015-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2452 [Streams API] Implement ReadableStreamController enqueue
2453 https://bugs.webkit.org/show_bug.cgi?id=145210
2455 Reviewed by Darin Adler.
2457 Added possibility to enqueue any JSValue within ReadableJSStream.
2458 They are stored in a Vector of strongified JSValue.
2460 Added support for streams that contain data but are asked to close.
2461 This is done through m_closeRequested boolean and splitting actual closing of the stream from changeStateToClosed().
2463 Chunk size and backpressure mechanism is not yet implemented.
2464 Neither is pulling once enqueued data is processed.
2466 Covered by rebased tests.
2468 * Modules/streams/ReadableStream.cpp:
2469 (WebCore::ReadableStream::changeStateToClosed): Split method with newly added close().
2470 (WebCore::ReadableStream::close): Does the actual closing of stream once stream has no more values.
2471 (WebCore::ReadableStream::read): Close the stream when stream is emptied and close is requested.
2472 (WebCore::ReadableStream::resolveReadCallback): Added to enable ReadableJSStream to resolve read callbacks immediatly at enqueue time.
2473 * Modules/streams/ReadableStream.h:
2474 (WebCore::ReadableStream::isErrored): Getter added for the custom binding code.
2475 (WebCore::ReadableStream::isCloseRequested): Ditto.
2476 * bindings/js/JSReadableStreamControllerCustom.cpp:
2477 (WebCore::JSReadableStreamController::enqueue): binding code for enqueue, taking care of raising exception if readable stream cannot enqueue.
2478 * bindings/js/ReadableJSStream.cpp:
2479 (WebCore::ReadableJSStream::hasValue):
2480 (WebCore::ReadableJSStream::read):
2481 (WebCore::ReadableJSStream::enqueue):
2482 * bindings/js/ReadableJSStream.h:
2484 2015-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2486 [Streams API] ReadableJSStream does not need a ReadableStreamSource
2487 https://bugs.webkit.org/show_bug.cgi?id=145601
2489 Reviewed by Darin Adler.
2491 Covered by existing tests.
2493 * Modules/streams/ReadableStream.cpp:
2494 (WebCore::ReadableStream::ReadableStream): Remoed m_source.
2495 * Modules/streams/ReadableStream.h: Ditto
2496 * Modules/streams/ReadableStreamSource.h: Deleted.
2497 * WebCore.vcxproj/WebCore.vcxproj: Removing Modules/streams/ReadableStreamSource.h.
2498 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2499 * WebCore.xcodeproj/project.pbxproj: Ditto.
2500 * bindings/js/ReadableJSStream.cpp:
2501 (WebCore::ReadableJSStream::globalObject):
2502 (WebCore::ReadableJSStream::doStart): Equivalent of ReadableJSStream::Source::start().
2503 (WebCore::ReadableJSStream::create): Updated according new constructor.
2504 (WebCore::ReadableJSStream::ReadableJSStream):
2505 (WebCore::startReadableStreamAsync): Deleted.
2506 (WebCore::ReadableJSStream::jsController): Deleted.
2507 (WebCore::ReadableJSStream::storeError): Deleted.
2508 * bindings/js/ReadableJSStream.h: Added m_source member to store the JS source as a JS object.
2510 2015-06-04 Zan Dobersek <zdobersek@igalia.com>
2512 Shrink the ArabicCharShapingMode enum in SVGGlyph.cpp
2513 https://bugs.webkit.org/show_bug.cgi?id=145564
2515 Reviewed by Darin Adler.
2517 Shrink the ArabicCharShapingMode enum to just one byte.
2518 This drops the size of the static s_arabicCharShapingMode
2519 array of ArabicCharShapingMode values from 888 bytes to 222.
2521 * platform/graphics/SVGGlyph.cpp:
2522 (WebCore::processArabicFormDetection):
2524 2015-06-03 Zalan Bujtas <zalan@apple.com>
2526 Use borderBoxRect instead of contentBoxRect for backdrop filter.
2527 https://bugs.webkit.org/show_bug.cgi?id=145606
2529 Reviewed by Simon Fraser.
2531 Backdrop filter should use border box rect. It also needs to take css clip into account.
2533 Tests: css3/filters/backdrop/backdrop-filter-with-cliprect.html
2534 css3/filters/backdrop/backdrop-filter-with-mask.html
2536 * rendering/RenderLayerBacking.cpp:
2537 (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
2539 2015-06-03 Youenn Fablet <youenn.fablet@crf.canon.fr>
2541 MediaDevices.getUserMedia should put promises in resolve/reject state synchronously
2542 https://bugs.webkit.org/show_bug.cgi?id=145308
2544 Reviewed by Darin Adler.
2546 Removed the calls to callToMainThread in which were resolved and rejected promises.
2547 Cleaned up the code to remove unneeded callback copies.
2549 Covered by existing tests.
2551 * Modules/mediastream/UserMediaRequest.cpp:
2552 (WebCore::UserMediaRequest::create):
2553 (WebCore::UserMediaRequest::UserMediaRequest):
2554 (WebCore::UserMediaRequest::didCreateStream):
2555 (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
2556 (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
2557 * Modules/mediastream/UserMediaRequest.h:
2559 2015-06-03 Simon Fraser <simon.fraser@apple.com>
2561 REGRESSION (r184968): missing media player buttons (control bar exists, but no buttons)
2562 https://bugs.webkit.org/show_bug.cgi?id=145630
2564 Reviewed by Zalan Bujtas.
2566 r184968 changed the initial value of m_intersectsCoverageRect to false. However,
2567 this triggered a bug with mask layers, whose value of m_intersectsCoverageRect was never
2570 Fix by copying the value of m_intersectsCoverageRect from the main layer to its
2571 mask layer, just as we do for m_visibleRect and m_coverageRect.
2573 Test: compositing/visible-rect/mask-layer-coverage.html
2575 * platform/graphics/ca/GraphicsLayerCA.cpp:
2576 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2578 2015-06-03 Simon Fraser <simon.fraser@apple.com>
2580 Layer tree dumps should include mask layers
2581 https://bugs.webkit.org/show_bug.cgi?id=145629
2583 Reviewed by Zalan Bujtas.
2585 Dumping the layer tree omitted to dump the mask layer, so fix
2586 GraphicsLayer::dumpProperties() to dump this layer.
2588 * platform/graphics/GraphicsLayer.cpp:
2589 (WebCore::GraphicsLayer::dumpProperties):
2591 2015-06-03 Greg Hughes <ghughes@apple.com>
2593 AX: Expose field sets to accessibility clients
2594 https://bugs.webkit.org/show_bug.cgi?id=145585
2596 Expose fieldsets to the accessibility API via a subrole of AXFieldset.
2598 Reviewed by Chris Fleizach.
2600 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2601 (-[WebAccessibilityObjectWrapper subrole]):
2603 2015-06-03 Myles C. Maxfield <mmaxfield@apple.com>
2605 Remove dead code FontPlatformData::roundsGlyphAdvances()
2606 https://bugs.webkit.org/show_bug.cgi?id=145628
2608 Reviewed by Simon Fraser.
2610 No new tests because there is no behavior change.
2613 * platform/graphics/FontPlatformData.h:
2614 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2615 (WebCore::FontPlatformData::roundsGlyphAdvances): Deleted.
2617 2015-06-03 Ryuan Choi <ryuan.choi@navercorp.com>
2619 [CoordinatedGraphics] Merge CoordinatedTile into Tile
2620 https://bugs.webkit.org/show_bug.cgi?id=145602
2622 Reviewed by Darin Adler.
2624 CoordinatedTile only implements Tile since Qt and WebKit1/Efl were dropped.
2625 So, there is no reason that CoordinatedTile inherits Tile interface.
2627 No new tests, no behavior changes.
2629 * PlatformEfl.cmake:
2630 * PlatformGTK.cmake:
2631 * WebCore.vcxproj/WebCore.vcxproj:
2632 * WebCore.vcxproj/WebCore.vcxproj.filters:
2633 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2634 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2635 * platform/graphics/texmap/coordinated/CoordinatedTile.cpp: Renamed to Tile.cpp
2636 * platform/graphics/texmap/coordinated/CoordinatedTile.h: Merged into Tile.h
2637 (WebCore::CoordinatedTile::coordinate): Deleted.
2638 (WebCore::CoordinatedTile::rect): Deleted.
2639 * platform/graphics/texmap/coordinated/Tile.cpp: Renamed from CoordinatedTile.cpp.
2640 * platform/graphics/texmap/coordinated/Tile.h:
2641 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
2642 (WebCore::TiledBackingStore::createTiles):
2644 2015-06-03 Matt Rajca <mrajca@apple.com>
2646 Add basic Media Session support to HTMLMediaElement.
2647 https://bugs.webkit.org/show_bug.cgi?id=145581
2649 Reviewed by Eric Carlson.
2651 HTMLMediaElements now have:
2653 - a 'kind' attribute representing the intrinsic media category
2654 - a 'session' attribute representing the current media session, if any
2656 * CMakeLists.txt: Include the new HTMLMediaElementMediaSession sources.
2657 * DerivedSources.make: Include the new IDL file.
2658 * Modules/mediasession/HTMLMediaElementMediaSession.cpp: Added.
2659 (WebCore::HTMLMediaElementMediaSession::session):
2660 * Modules/mediasession/HTMLMediaElementMediaSession.h: Added basic translation of the IDL file.
2661 (WebCore::HTMLMediaElementMediaSession::kind):
2662 (WebCore::HTMLMediaElementMediaSession::setKind):
2663 (WebCore::HTMLMediaElementMediaSession::setSession):
2664 * Modules/mediasession/HTMLMediaElementMediaSession.idl: Added from the Media Session spec.
2665 * PlatformMac.cmake: Include DOMHTMLMediaElementMediaSession.cpp.
2666 * WebCore.xcodeproj/project.pbxproj: Include the new HTMLMediaElementMediaSession sources.
2667 * html/HTMLMediaElement.h: Added accessors for 'kind' and 'session'.
2668 (WebCore::HTMLMediaElement::kind):
2669 (WebCore::HTMLMediaElement::setKind):
2670 (WebCore::HTMLMediaElement::session):
2671 (WebCore::HTMLMediaElement::setSession):
2673 2015-06-03 Myles C. Maxfield <mmaxfield@apple.com>
2675 Cleanup after r185175.
2676 https://bugs.webkit.org/show_bug.cgi?id=145569
2677 <rdar://problem/20671711>
2681 No new tests because there is no behavior change.
2683 * platform/graphics/WidthIterator.h:
2685 2015-06-02 Myles C. Maxfield <mmaxfield@apple.com>
2687 SoftBank Emoji are not transformed by shaping when in a run of their own
2688 https://bugs.webkit.org/show_bug.cgi?id=145569
2689 <rdar://problem/20671711>
2691 Reviewed by Dean Jackson.
2693 Normally, we don't perform shaping on single glyphs. However, these particular codepoints
2694 need to have shaping run on them, even if they are alone.
2696 Test: fast/text/softbank-emoji.html Note that this test may fail in different locales on
2697 different platforms. This patch disables the test on iOS.
2699 * Source/WebCore/platform/graphics/WidthIterator.cpp:
2700 (WebCore::applyFontTransforms): Move the length-of-1 check into shouldApplyFontTransforms()
2701 (WebCore::shouldApplyFontTransforms): Return true if we have one of these emoji characters in
2703 (WebCore::advanceInternal): Keep track of the previous character, and use it to call
2704 shouldApplyFontTransforms.
2705 * Source/WebCore/platform/graphics/WidthIterator.h: shouldApplyFontTransforms() needs
2706 some more information to perform its duties.
2708 2015-06-03 Daniel Bates <dabates@apple.com>
2710 Caps lock indicator should not be shown in read-only or disabled field
2711 https://bugs.webkit.org/show_bug.cgi?id=145612
2712 <rdar://problem/21227454>
2714 Reviewed by Darin Adler.
2716 * html/TextFieldInputType.cpp:
2717 (WebCore::TextFieldInputType::disabledAttributeChanged): Update caps lock indicator state.
2718 (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
2719 (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator): Do not draw the caps lock indicator
2720 when the field is read-only or disabled.
2722 2015-06-03 Dean Jackson <dino@apple.com>
2724 Crash in GraphicsContext3D::getInternalFramebufferSize
2725 https://bugs.webkit.org/show_bug.cgi?id=145479
2726 <rdar://problem/16461048>
2728 Reviewed by Eric Carlson.
2730 If we are in an unitialized or lost state, don't try to access the context.
2732 In order to test this, I added an Internal setting that always
2733 forces WebGL into a pending state.
2735 Test: fast/canvas/webgl/useWhilePending.html
2737 * html/canvas/WebGLRenderingContextBase.cpp:
2738 (WebCore::WebGLRenderingContextBase::create): Check internal settings for
2739 a forced pending state.
2740 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
2741 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
2742 * page/Settings.cpp: New Internal setting for forcing a pending policy.
2743 (WebCore::Settings::Settings):
2744 (WebCore::Settings::setForcePendingWebGLPolicy):
2746 (WebCore::Settings::isForcePendingWebGLPolicy):
2747 * testing/InternalSettings.cpp:
2748 (WebCore::InternalSettings::Backup::Backup):
2749 (WebCore::InternalSettings::Backup::restoreTo):
2750 (WebCore::InternalSettings::setForcePendingWebGLPolicy):
2751 * testing/InternalSettings.h:
2752 * testing/InternalSettings.idl:
2754 2015-06-03 Hunseop Jeong <hs85.jeong@samsung.com>
2756 Use modern for-loops in WebCore/page.
2757 https://bugs.webkit.org/show_bug.cgi?id=145455
2759 Reviewed by Darin Adler.
2761 No new tests, no behavior changes.
2764 (WebCore::Chrome::notifyPopupOpeningObservers):
2765 * page/ContentSecurityPolicy.cpp:
2766 (WebCore::CSPSourceList::matches):
2767 (WebCore::CSPDirectiveList::gatherReportURIs):
2768 (WebCore::ContentSecurityPolicy::copyStateFrom):
2769 (WebCore::isAllowedByAll):
2770 (WebCore::isAllowedByAllWithState):
2771 (WebCore::isAllowedByAllWithContext):
2772 (WebCore::isAllowedByAllWithURL):
2773 (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
2774 (WebCore::ContentSecurityPolicy::allowPluginType):
2775 (WebCore::ContentSecurityPolicy::reflectedXSSDisposition):
2776 (WebCore::ContentSecurityPolicy::gatherReportURIs):
2777 * page/ContextMenuController.cpp:
2778 (WebCore::ContextMenuController::populate):
2779 * page/DOMWindow.cpp:
2780 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
2781 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
2782 (WebCore::DOMWindow::willDestroyCachedFrame):
2783 (WebCore::DOMWindow::willDestroyDocumentInFrame):
2784 (WebCore::DOMWindow::willDetachDocumentFromFrame):
2785 (WebCore::DOMWindow::disconnectDOMWindowProperties):
2786 (WebCore::DOMWindow::reconnectDOMWindowProperties):
2787 (WebCore::DOMWindow::getMatchedCSSRules):
2788 * page/DeviceController.cpp:
2789 (WebCore::DeviceController::dispatchDeviceEvent):
2790 (WebCore::DeviceController::fireDeviceEvent):
2791 * page/EventHandler.cpp:
2792 (WebCore::EventHandler::updateMouseEventTargetNode):
2793 (WebCore::EventHandler::handleTouchEvent):
2794 * page/FocusController.cpp:
2795 (WebCore::FocusController::setIsVisibleAndActiveInternal):
2797 (WebCore::Frame::orientationChanged):
2798 (WebCore::Frame::injectUserScriptsForWorld):
2799 * page/FrameView.cpp:
2800 (WebCore::FrameView::scrollContentsFastPath):
2801 (WebCore::FrameView::serviceScriptedAnimations):
2802 (WebCore::FrameView::trackedRepaintRectsAsText):
2803 (WebCore::FrameView::updateWidgetPositions):
2804 (WebCore::FrameView::notifyWidgets):
2806 (WebCore::networkStateChanged):
2807 (WebCore::Page::stringToViewMode):
2808 (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
2809 (WebCore::Page::refreshPlugins):
2810 (WebCore::Page::lockAllOverlayScrollbarsToHidden):
2811 (WebCore::Page::pluginViews):
2812 (WebCore::Page::storageBlockingStateChanged):
2813 (WebCore::Page::setIsVisibleInternal):
2814 * page/PageGroup.cpp:
2815 (WebCore::PageGroup::captionPreferencesChanged):
2816 * page/PageGroupLoadDeferrer.cpp:
2817 (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2818 (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2819 * page/PageSerializer.cpp:
2820 (WebCore::PageSerializer::serializeFrame):
2821 * page/Performance.cpp:
2822 (WebCore::Performance::webkitGetEntriesByType):
2823 (WebCore::Performance::webkitGetEntriesByName):
2824 * page/PerformanceResourceTiming.cpp:
2825 (WebCore::passesTimingAllowCheck):
2826 * page/PerformanceUserTiming.cpp:
2827 (WebCore::convertToEntrySequence):
2828 * page/SecurityPolicy.cpp:
2829 (WebCore::SecurityPolicy::isAccessWhiteListed):
2830 * page/UserContentURLPattern.cpp:
2831 (WebCore::UserContentURLPattern::matchesPatterns):
2832 * page/WindowFeatures.cpp:
2833 (WebCore::WindowFeatures::parseDialogFeatures):
2834 * page/animation/AnimationController.cpp:
2835 (WebCore::AnimationControllerPrivate::updateAnimations):
2836 (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
2837 (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
2838 (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
2839 (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
2840 * page/animation/CSSPropertyAnimation.cpp:
2841 (WebCore::ShorthandPropertyWrapper::equals):
2842 (WebCore::ShorthandPropertyWrapper::blend):
2843 * page/scrolling/AsyncScrollingCoordinator.cpp:
2844 (WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
2845 * page/scrolling/ScrollingCoordinator.cpp:
2846 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
2847 (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
2849 2015-06-03 Daniel Bates <dabates@apple.com>
2851 AutoFill button should not be shown in read-only or disabled field
2852 https://bugs.webkit.org/show_bug.cgi?id=145579
2853 <rdar://problem/21212494>
2855 Reviewed by Darin Adler.
2857 Fixes an issue where the AutoFill button is shown in a read-only or disabled
2858 field. We should not show the AutoFill button in such cases.
2860 Tests: fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html
2861 fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html
2862 fast/forms/auto-fill-button/input-auto-fill-button.html
2863 fast/forms/auto-fill-button/input-disabled-auto-fill-button.html
2864 fast/forms/auto-fill-button/input-readonly-auto-fill-button.html
2865 fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html
2867 * html/TextFieldInputType.cpp:
2868 (WebCore::TextFieldInputType::disabledAttributeChanged): Update AutoFill button state.
2869 (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
2870 (WebCore::TextFieldInputType::shouldDrawAutoFillButton): Do not draw AutoFill button
2871 when the field is disabled or read-only.
2873 2015-06-03 Brent Fulgham <bfulgham@apple.com>
2875 REGRESSION: (r181879): Scrolling in select/option region in iFrame scrolls both select and iframe
2876 https://bugs.webkit.org/show_bug.cgi?id=145574
2877 <rdar://problem/20966828>
2879 Reviewed by Simon Fraser.
2881 Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html
2883 When the scroll gesture is started when the latched scrollable container is not at the limit of its
2884 scroll region, we are NOT supposed to propagate the scroll event to the enclosing region. However,
2885 we were doing two things wrong:
2886 (1) When we recognized we were latching, we were using the right wheel event target, but not using
2887 the latched scrollable container.
2888 (2) Likewise, we were not using latched ScrollableArea when handling wheel events.
2890 Instead, we were using the current scrollable container and ScrollableArea under the mouse pointer,
2891 which could be different from the point we started latching as the content scrolled.
2893 The fix was to properly track the scrollable container and scrollable area during latching.
2895 I attempted to store the latched ScrollableArea in the latchingState object, like we already do for the
2896 scrollable container, but found that this did not work properly. I think the life cycle of the
2897 ScrollableArea may not match the scrollable container, and since they are not reference counted I
2898 simply retrieve the ScrollableArea when needed.
2900 * page/mac/EventHandlerMac.mm:
2901 (WebCore::scrollableAreaForContainerNode): Helper function to return the correct ScrollableArea
2902 for the two types of RenderBox elements.
2903 (WebCore::latchedToFrameOrBody): Helper predicate to identify Frame and Body elements.
2904 (WebCore::EventHandler::platformPrepareForWheelEvents): Use the correct ScrollableArea for the given
2905 ContainerNode. When latching, make sure to use the ScrollableArea that is related to the latched scrollable
2906 container, not the area currently underneath the mouse pointer.
2908 2015-06-03 Brady Eidson <beidson@apple.com>
2910 REGRESSION (r183498): Certain types of frame loads in iframes with <base target="_blank"> can open urls in new window/tabs
2911 https://bugs.webkit.org/show_bug.cgi?id=145580
2913 Reviewed by Mark Lam.
2915 Tests: fast/loader/fragment-navigation-base-blank.html
2916 fast/loader/iframe-meta-refresh-base-blank.html
2917 fast/loader/iframe-set-location-base-blank.html
2918 fast/loader/refresh-iframe-base-blank.html
2920 Before 183498, callers of FrameLoader::changeLocation() got automatically assigned a frame name of "_self".
2921 After 183498, many remained without a frame name.
2923 Later on, FrameLoader applies the <base> target as their frame name if they don't already have one.
2925 When the <base> target is "_blank", that causes a new window/tab.
2927 Restoring "_self" to these call sites fixes this.
2929 * inspector/InspectorFrontendClientLocal.cpp:
2930 (WebCore::InspectorFrontendClientLocal::openInNewTab):
2932 * inspector/InspectorPageAgent.cpp:
2933 (WebCore::InspectorPageAgent::navigate):
2935 * loader/FrameLoadRequest.h:
2936 (WebCore::FrameLoadRequest::FrameLoadRequest):
2938 * loader/NavigationScheduler.cpp:
2939 (WebCore::NavigationScheduler::scheduleLocationChange):
2941 * page/DOMWindow.cpp:
2942 (WebCore::DOMWindow::createWindow):
2944 2015-06-03 Alexey Proskuryakov <ap@apple.com>
2946 More iOS build fixing.
2948 * platform/spi/mac/AVFoundationSPI.h:
2950 2015-06-03 Zalan Bujtas <zalan@apple.com>
2952 Subpixel rendering: Composited layer with subpixel gap does not get painted properly when its position changes.
2953 https://bugs.webkit.org/show_bug.cgi?id=145587
2955 Reviewed by Simon Fraser.
2957 The composited layer always snaps to an enclosing device pixel (floors) while the renderer rounds.
2958 At certain positions (for example 0.5px on a 1x display), a gap is formed between the layer(0px) and its renderer(1px).
2959 In such cases, when the the renderer moves to a position (1.1px) where the gap is closed, we need to issue repaint on the layer
2960 in order to get the renderering right.
2962 Test: compositing/child-layer-with-subpixel-gap-needs-repaint-when-parent-moves.html
2964 * rendering/RenderLayerBacking.cpp:
2965 (WebCore::RenderLayerBacking::updateAfterLayout):
2966 (WebCore::devicePixelFractionGapFromRendererChanged):
2967 (WebCore::RenderLayerBacking::updateGeometry):
2968 * rendering/RenderLayerBacking.h:
2970 2015-06-03 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2972 [Streams API] ReadableStreamReader::closed() should be called once by binding code
2973 https://bugs.webkit.org/show_bug.cgi?id=145551
2975 Reviewed by Darin Adler.
2977 Covered by existing tests.
2979 * bindings/js/JSReadableStreamReaderCustom.cpp:
2980 (WebCore::JSReadableStreamReader::closed): Calling ReadableStreamReader::closed only at creation of the promise.
2982 2015-06-02 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2984 [EFL][GTK] Fix build error since r185137
2985 https://bugs.webkit.org/show_bug.cgi?id=145596
2987 Unreviewed, fix build break on EFL and GTK port.
2990 (WebCore::Text::formatForDebugger): Use strncpy() instead of strlcpy().
2992 2015-06-02 Sergio Villar Senin <svillar@igalia.com>
2994 [CSS Grid Layout] Switch from parenthesis to brackets for grid line names
2995 https://bugs.webkit.org/show_bug.cgi?id=144996
2997 Reviewed by Darin Adler.
2999 Grid line names are now enclosed by brackets instead of parentheses
3000 as mentioned in the latest version of the spec. Appartently the CSS
3001 code is now more readable and avoids issues with tools like SASS.
3003 * css/CSSGrammar.y.in:
3004 * css/CSSGridLineNamesValue.cpp:
3005 (WebCore::CSSGridLineNamesValue::customCSSText):
3007 2015-06-02 Alexey Proskuryakov <ap@apple.com>
3011 * platform/spi/mac/AVFoundationSPI.h:
3013 2015-06-02 Commit Queue <commit-queue@webkit.org>
3015 Unreviewed, rolling out r185128 and r185132.
3016 https://bugs.webkit.org/show_bug.cgi?id=145597
3018 The new test hits a bad assertion (Requested by ap on
3021 Reverted changesets:
3023 "Crash in GraphicsContext3D::getInternalFramebufferSize"
3024 https://bugs.webkit.org/show_bug.cgi?id=145479
3025 http://trac.webkit.org/changeset/185128
3027 "Skip webgl/useWhilePending.html on WebKit 1."
3028 http://trac.webkit.org/changeset/185132
3030 2015-06-02 Ryuan Choi <ryuan.choi@navercorp.com>
3032 [CoordinatedGraphics] Refactor TiledBackingStoreClient
3033 https://bugs.webkit.org/show_bug.cgi?id=145577
3035 Reviewed by Gyuyoung Kim.
3037 This patch removes and simplifies unnecessary virtual methods of TiledBackingStoreClient.
3039 No new tests, no behavior changes.
3041 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3042 (WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers): Renamed from tiledBackingStorePaintEnd.
3043 (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintBegin): Deleted.
3044 (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd): Deleted.
3045 (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreBackgroundColor):
3046 Deleted because tiledBackingStoreBackgroundColor() is not used anywhere.
3047 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3048 * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
3049 (WebCore::CoordinatedTile::updateBackBuffer):
3050 Simplified not to call unnecessary methods. In addition, used modern for loop.
3051 (WebCore::CoordinatedTile::swapBackBufferToFront): Deleted.
3052 * platform/graphics/texmap/coordinated/CoordinatedTile.h:
3053 * platform/graphics/texmap/coordinated/Tile.h:
3054 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
3055 (WebCore::TiledBackingStore::updateTileBuffers):
3056 * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
3058 2015-06-02 Doug Russell <d_russell@apple.com>
3060 AX: debugging attributes for text markers
3061 https://bugs.webkit.org/show_bug.cgi?id=145283
3063 Reviewed by Chris Fleizach.
3065 AXTextMarkerDebugDescription: returns the result of
3066 VisiblePosition::formatForDebugger() for the visible position that a text marker
3068 AXTextMarkerNodeDebugDescription: calls Node::showNode() and
3069 Node::showNodePathForThis() for the visible position that a text marker
3071 AXTextMarkerNodeTreeDebugDescription: calls Node::showTreeForThis() for the
3072 visible position that a text marker represents.
3073 AXTextMarkerRangeDebugDescription: returns the result of
3074 formatForDebugger(VisiblePositionRange) for the visible position range that a text
3075 marker range represents.
3077 This is debug only tooling. Tests would be flakey and not very helpful.
3079 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3080 (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarker:]):
3081 (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarkerRange:]):
3082 (-[WebAccessibilityObjectWrapper showNodeForTextMarker:]):
3083 (-[WebAccessibilityObjectWrapper showNodeTreeForTextMarker:]):
3084 (formatForDebugger):
3085 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3087 (WebCore::Text::formatForDebugger):
3089 2015-06-02 Matt Rajca <mrajca@apple.com>
3091 MediaSessions should keep track of their current state.
3092 https://bugs.webkit.org/show_bug.cgi?id=145575
3094 Reviewed by Alex Christensen.
3096 * Modules/mediasession/MediaSession.h: Per the Media Session spec, the state can be 'Idle', 'Active', or
3097 'Interrupted'. Sessions are created in an 'Idle' state.
3099 2015-06-02 Jon Lee <jonlee@apple.com>
3101 Build fix when building with internal SDKs
3102 https://bugs.webkit.org/show_bug.cgi?id=145576
3103 rdar://problem/21089476
3105 Reviewed by Alexey Proskuryakov.
3107 * platform/spi/mac/AVFoundationSPI.h: Include the right header.
3109 2015-06-02 Dean Jackson <dino@apple.com>
3111 No need to guard the sizes attribute against PICTURE_SIZES in preload scanner.
3112 https://bugs.webkit.org/show_bug.cgi?id=145573
3113 <rdar://problem/21210038>
3115 Reviewed by Myles Maxfield.
3117 The PICTURE_SIZES feature flag doesn't need to be used to
3118 guard preloading of the sizes attribute.
3120 * html/parser/HTMLPreloadScanner.cpp:
3121 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Deleted.
3122 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.
3124 2015-06-02 Anders Carlsson <andersca@apple.com>
3126 Use UUIDs for WebSQL database filenames instead of a sequential number
3127 https://bugs.webkit.org/show_bug.cgi?id=145571
3129 Reviewed by Dan Bernstein.
3131 This is a first step towards getting rid of the iOS specific code path where we truncate
3132 database files instead of deleting them (in order to avoid file corruption).
3134 * Modules/webdatabase/DatabaseTracker.cpp:
3135 (WebCore::generateDatabaseFileName):
3136 (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
3137 * platform/sql/SQLiteFileSystem.cpp:
3138 (WebCore::SQLiteFileSystem::getFileNameForNewDatabase): Deleted.
3139 * platform/sql/SQLiteFileSystem.h:
3141 2015-06-02 Dean Jackson <dino@apple.com>
3143 Crash in GraphicsContext3D::getInternalFramebufferSize
3144 https://bugs.webkit.org/show_bug.cgi?id=145479
3145 <rdar://problem/16461048>
3147 Reviewed by Eric Carlson.
3149 If we are in an unitialized or lost state, don't try to access the context.
3151 In order to test this, I added an Internal setting that always
3152 forces WebGL into a pending state.
3154 Test: fast/canvas/webgl/useWhilePending.html
3156 * html/canvas/WebGLRenderingContextBase.cpp:
3157 (WebCore::WebGLRenderingContextBase::create): Check internal settings for
3158 a forced pending state.
3159 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
3160 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
3161 * page/Settings.cpp: New Internal setting for forcing a pending policy.
3162 (WebCore::Settings::Settings):
3163 (WebCore::Settings::setForcePendingWebGLPolicy):
3165 (WebCore::Settings::isForcePendingWebGLPolicy):
3166 * testing/InternalSettings.cpp:
3167 (WebCore::InternalSettings::Backup::Backup):
3168 (WebCore::InternalSettings::Backup::restoreTo):
3169 (WebCore::InternalSettings::setForcePendingWebGLPolicy):
3170 * testing/InternalSettings.h:
3171 * testing/InternalSettings.idl:
3173 2015-06-02 Matt Rajca <mrajca@apple.com>
3175 Added a stub implementation of MediaSession, part of the Media Session spec.
3176 https://bugs.webkit.org/show_bug.cgi?id=145530
3178 Reviewed by Eric Carlson.
3180 * CMakeLists.txt: Added new MediaSession sources.
3181 * DerivedSources.make:
3182 * Modules/mediasession/MediaSession.cpp: Added stub implementation.
3183 (WebCore::MediaSession::MediaSession): Per the Media Session spec, a Media Remote Controls object should only be
3184 set for 'content' sessions; it is null otherwise.
3185 (WebCore::MediaSession::~MediaSession):
3186 (WebCore::MediaSession::controls):
3187 (WebCore::MediaSession::releaseSession):
3188 * Modules/mediasession/MediaSession.h: Added basic translation of IDL file.
3189 * Modules/mediasession/MediaSession.idl: Added from the Media Session spec.
3190 * WebCore.xcodeproj/project.pbxproj: Added new MediaSession sources.
3192 2015-06-02 Zalan Bujtas <zalan@apple.com>
3194 Backdrop filter is pulling in content from behind the window.
3195 https://bugs.webkit.org/show_bug.cgi?id=145561
3196 rdar://problem/20909309
3198 Reviewed by Simon Fraser.
3200 This patch ensures that the backdrop filter layer is positioned and sized properly.
3202 The backdrop filter layer should take its size and position from its renderer and not
3203 directly from the composited layer.
3204 In certain cases the composited layer's size is expanded to cover items like box shadow or an absolute positioned descendant.
3205 In such cases, we ended up applying the backdrop filter to those areas as well.
3207 Tests: css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html
3208 css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html
3210 * platform/graphics/GraphicsLayer.h:
3211 (WebCore::GraphicsLayer::setBackdropFiltersRect):
3212 (WebCore::GraphicsLayer::backdropFiltersRect):
3213 * platform/graphics/ca/GraphicsLayerCA.cpp:
3214 (WebCore::GraphicsLayerCA::setBackdropFiltersRect):
3215 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3216 (WebCore::GraphicsLayerCA::updateBackdropFilters):
3217 (WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
3218 (WebCore::GraphicsLayerCA::updateContentsRects):
3219 (WebCore::GraphicsLayerCA::updateGeometry): Deleted.
3220 * platform/graphics/ca/GraphicsLayerCA.h:
3221 * rendering/RenderLayerBacking.cpp:
3222 (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
3223 (WebCore::RenderLayerBacking::updateGeometry):
3224 * rendering/RenderLayerBacking.h:
3226 2015-06-02 Eric Carlson <eric.carlson@apple.com>
3228 [Mac] occasional crash in Document::playbackTargetAvailabilityDidChange
3229 https://bugs.webkit.org/show_bug.cgi?id=145559
3231 Reviewed by Darin Adler.
3233 No new tests, covered by existing tests.
3235 * html/HTMLMediaElement.cpp:
3236 (WebCore::HTMLMediaElement::registerWithDocument): Pass document to m_mediaSession->registerWithDocument.
3237 (WebCore::HTMLMediaElement::unregisterWithDocument): Pass document to m_mediaSession->unRegisterWithDocument.
3238 (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Ditto.
3239 (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.
3241 * html/MediaElementSession.cpp:
3242 (WebCore::MediaElementSession::registerWithDocument): Take a document.
3243 (WebCore::MediaElementSession::unregisterWithDocument): Ditto.
3244 * html/MediaElementSession.h:
3246 2015-06-02 Chris Dumez <cdumez@apple.com>
3248 Calling FrameView::viewportContentsChanged() after style recalcs is too expensive
3249 https://bugs.webkit.org/show_bug.cgi?id=145554
3250 <rdar://problem/21189478>
3252 Reviewed by Darin Adler and Simon Fraser.
3254 Only call FrameView::viewportContentsChanged() after a style recalc if
3255 composited layers have been updated (and there is no pending layout).
3257 We already viewportContentsChanged() after layout so we only need to
3258 call viewportContentsChanged() after a style recalc if it did not cause
3259 a layout but may have caused an element to become visible. In
3260 particular, this can happen in the case of composited animations (e.g.
3261 using -webkit-transform to move an element inside the viewport).
3262 Therefore, we now only call viewportContentsChanged() after a style
3263 recalc if it caused composited layers to be updated. This avoids a lot
3264 of unnecessary calls to viewportContentsChanged(), which is expensive.
3266 No new tests, already covered by:
3267 fast/images/animated-gif-webkit-transform.html
3270 (WebCore::Document::recalcStyle):
3271 * page/FrameView.cpp:
3272 (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
3274 * rendering/RenderLayerCompositor.cpp:
3275 (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
3276 (WebCore::RenderLayerCompositor::updateCompositingLayers):
3277 * rendering/RenderLayerCompositor.h:
3279 2015-06-02 Myles C. Maxfield <mmaxfield@apple.com>
3281 Remove use of CTFontSetRenderingParameters()
3282 https://bugs.webkit.org/show_bug.cgi?id=145560
3284 Reviewed by Simon Fraser.
3286 Instead, always use CTFontSetRenderingStyle().
3288 No new tests because there is no behavior change.
3290 * platform/graphics/cocoa/FontCascadeCocoa.mm:
3291 (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
3292 (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
3294 2015-06-02 Anders Carlsson <andersca@apple.com>
3296 Move WKFontAntialiasingStateSaver to its own file
3297 https://bugs.webkit.org/show_bug.cgi?id=145557
3298 rdar://problem/21134776
3300 Reviewed by Dan Bernstein.
3302 Also rename it to FontAntialiasingStateSaver. Also, change it to use the CoreGraphicsSPI.h header for its
3303 CGFontAntialiasingStyle definition instead of using an explicit typedef.
3305 * WebCore.xcodeproj/project.pbxproj:
3306 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3307 (PlatformCALayer::drawLayerContents):
3308 * platform/graphics/ios/FontAntialiasingStateSaver.h: Copied from Source/WebCore/platform/ios/wak/WKGraphics.h.
3309 (WebCore::FontAntialiasingStateSaver::FontAntialiasingStateSaver):
3310 (WebCore::FontAntialiasingStateSaver::setup):
3311 (WebCore::FontAntialiasingStateSaver::restore):
3312 * platform/ios/LegacyTileCache.mm:
3313 (WebCore::LegacyTileCache::drawWindowContent):
3314 * platform/ios/wak/WKGraphics.h:
3315 (WKFontAntialiasingStateSaver::WKFontAntialiasingStateSaver): Deleted.
3316 * platform/ios/wak/WKGraphics.mm:
3317 (WKFontAntialiasingStateSaver::setup): Deleted.
3318 (WKFontAntialiasingStateSaver::restore): Deleted.
3320 2015-06-02 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3322 [Streams API] Implement ReadableStreamReader read method in closed and errored state
3323 https://bugs.webkit.org/show_bug.cgi?id=144790
3325 Reviewed by Darin Adler.
3327 Reader delegates read() promise handling to its stream except if reader is no longer locking the stream and stream is readable.
3328 Storing of reader read() promise callbacks as a Vector in ReadableStream.
3329 Added resolution/rejection of read() promises in case of errored/closed streams.
3331 Test: streams/readable-stream-reader-read.html
3333 * ForwardingHeaders/runtime/IteratorOperations.h: Added.
3334 * Modules/streams/ReadableStream.cpp:
3335 (WebCore::ReadableStream::cleanCallbacks): Clean the read requests.
3336 (WebCore::ReadableStream::changeStateToClosed): Run success callbacks with undefined for read requests.
3337 (WebCore::ReadableStream::changeStateToErrored): Run failure callbacks with the errors for read requests.
3338 (WebCore::ReadableStream::closed): Parameter name changed.
3339 (WebCore::ReadableStream::read): Added. Succeeds with empty when closed, fails with error when errored, reads a
3340 value if there is one and pushes the callbacks to the queue otherwise.
3341 * Modules/streams/ReadableStream.h:
3342 (WebCore::ReadableStream::ReadCallbacks::ReadCallbacks): Struct containing success and failure callbacks.
3343 * Modules/streams/ReadableStreamReader.cpp:
3344 (WebCore::ReadableStreamReader::closed): Parameter name changed.
3345 (WebCore::ReadableStreamReader::read): Invoke success with empty if we streams if we don't have the right reader
3346 and call the stream otherwise to read.
3347 * Modules/streams/ReadableStreamReader.h:
3348 * bindings/js/JSReadableStreamReaderCustom.cpp:
3349 (WebCore::JSReadableStreamReader::read): Create the callback lambdas and invoke read. Failure rejects the
3350 promise and success creates the result from the read value.
3351 * bindings/js/ReadableJSStream.cpp:
3352 (WebCore::ReadableJSStream::hasValue):
3353 (WebCore::ReadableJSStream::read): Not implemented yet.
3354 * bindings/js/ReadableJSStream.h:
3356 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
3358 [Cocoa] FontPlatformData's equality check should always use reference URLs
3359 https://bugs.webkit.org/show_bug.cgi?id=144168
3361 Reviewed by Tim Horton.
3363 <rdar://problem/18985642> is not fixed, so we need to continue using the older
3364 objectForEqualityCheck().
3366 No new tests because there is no behavior change.
3368 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3369 (WebCore::FontPlatformData::objectForEqualityCheck):
3371 2015-06-02 Andy Estes <aestes@apple.com>
3373 [Mac] REGRESSION (r175941): Max.app crashes when adding a sound file to a patch due to removing cursor resources from WebCore.framework
3374 https://bugs.webkit.org/show_bug.cgi?id=145555
3376 Reviewed by Darin Adler.
3378 Re-added the cursor resources used by Max.app and ran sort-Xcode-project-file.
3380 * Resources/copyCursor.png: Added.
3381 * Resources/moveCursor.png: Added.
3382 * Resources/northEastSouthWestResizeCursor.png: Added.
3383 * Resources/northSouthResizeCursor.png: Added.
3384 * Resources/northWestSouthEastResizeCursor.png: Added.
3385 * WebCore.xcodeproj/project.pbxproj:
3387 2015-06-02 Brady Eidson <beidson@apple.com>
3389 WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
3390 rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
3392 Reviewed by Alex Christensen.
3394 Tests: loader/navigation-policy/should-open-external-urls/main-frame-click.html
3395 loader/navigation-policy/should-open-external-urls/main-frame-navigated-programatically-by-subframe.html
3396 loader/navigation-policy/should-open-external-urls/main-frame-with-flag-progamatic.html
3397 loader/navigation-policy/should-open-external-urls/main-frame-without-flag-programatic.html
3398 loader/navigation-policy/should-open-external-urls/subframe-click-target-self.html
3399 loader/navigation-policy/should-open-external-urls/subframe-click-target-top.html
3400 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html
3401 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html
3402 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html
3403 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag.html
3404 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag-from-subframe.html
3405 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag.html
3406 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag-from-subframe.html
3407 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag.html
3408 loader/navigation-policy/should-open-external-urls/window-open-with-flag-from-subframe.html
3409 loader/navigation-policy/should-open-external-urls/window-open-with-flag.html
3410 loader/navigation-policy/should-open-external-urls/window-open-without-flag-from-subframe.html
3411 loader/navigation-policy/should-open-external-urls/window-open-without-flag.html