1 2015-06-10 Chris Dumez <cdumez@apple.com>
3 Drop unused argument for Node::didNotifySubtreeInsertions()
4 https://bugs.webkit.org/show_bug.cgi?id=145845
6 Reviewed by Andreas Kling.
8 * dom/ContainerNodeAlgorithms.h:
9 (WebCore::ChildNodeInsertionNotifier::notify):
11 (WebCore::Node::didNotifySubtreeInsertions):
12 * html/HTMLFrameElementBase.cpp:
13 (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions):
14 * html/HTMLFrameElementBase.h:
15 * svg/SVGFEImageElement.cpp:
16 (WebCore::SVGFEImageElement::didNotifySubtreeInsertions):
17 * svg/SVGFEImageElement.h:
18 * svg/SVGMPathElement.cpp:
19 (WebCore::SVGMPathElement::didNotifySubtreeInsertions):
20 * svg/SVGMPathElement.h:
21 * svg/SVGTRefElement.cpp:
22 (WebCore::SVGTRefElement::didNotifySubtreeInsertions):
23 * svg/SVGTRefElement.h:
24 * svg/SVGTextPathElement.cpp:
25 (WebCore::SVGTextPathElement::didNotifySubtreeInsertions):
26 * svg/SVGTextPathElement.h:
27 * svg/animation/SVGSMILElement.cpp:
28 (WebCore::SVGSMILElement::didNotifySubtreeInsertions):
29 * svg/animation/SVGSMILElement.h:
31 2015-06-10 KwangHyuk Kim <hyuki.kim@samsung.com>
33 [EFL] Jpeg image export implementation for Canvas.
34 https://bugs.webkit.org/show_bug.cgi?id=145457
36 Reviewed by Gyuyoung Kim.
38 Add implementation of jpeg image export on Webkit EFL by using JPEGImageEncoder.
40 No new tests, fast/canvas/toDataURL-supportedTypes.html can be reused.
43 * platform/MIMETypeRegistry.cpp:
44 (WebCore::initializeSupportedImageMIMETypesForEncoding):
45 * platform/graphics/cairo/ImageBufferCairo.cpp:
46 * platform/graphics/efl/ImageBufferEfl.cpp: Added.
47 (WebCore::writeFunction):
48 (WebCore::encodeImage):
49 (WebCore::ImageBuffer::toDataURL):
50 * platform/image-encoders/JPEGImageEncoder.cpp:
51 (WebCore::compressRGBABigEndianToJPEG):
53 2015-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
55 [GTK] Move KeyBindingTranslator from platform to WebKit2 layer
56 https://bugs.webkit.org/show_bug.cgi?id=145840
58 Reviewed by Martin Robinson.
60 It's currently used only by WebKit2 in the UI process and it's
61 another file built twice because of the GTK2 plugin process.
65 2015-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
67 [GTK] Get rid of GetEditorCommandsForKeyEvent sync message
68 https://bugs.webkit.org/show_bug.cgi?id=145598
70 Reviewed by Žan Doberšek.
72 * platform/PlatformKeyboardEvent.h:
73 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
74 (WebCore::PlatformKeyboardEvent::commands):
75 * platform/gtk/KeyBindingTranslator.cpp: Use a single list of
76 custom key bindings. We don't need to distinguish between key down and
77 key press commands, since the web editor client already does that
78 when executing the commands.
79 (WebCore::KeyBindingTranslator::commandsForKeyEvent): This is
80 getEditorCommandsForKeyEvent() renamed as commandsForKeyEvent(),
81 since it now returns the list of commands to simplify the
82 code. Also simplify the custom key bindings handling, by using the
83 global list instead of moving it to a HashMap.
84 (WebCore::KeyBindingTranslator::getEditorCommandsForKeyEvent): Deleted.
85 * platform/gtk/KeyBindingTranslator.h:
87 2015-06-10 Per Arne Vollan <peavo@outlook.com>
89 [WinCairo] Crash on exit when terminating egl
90 https://bugs.webkit.org/show_bug.cgi?id=145832
92 Reviewed by Carlos Garcia Campos.
94 Avoid terminating egl on exit for WinCairo.
96 * platform/graphics/PlatformDisplay.cpp:
97 (WebCore::PlatformDisplay::~PlatformDisplay):
99 2015-06-10 Youenn Fablet <youenn.fablet@crf.canon.fr>
101 Refactor AudioContext implementation to enable automatic binding generation of promise-based methods
102 https://bugs.webkit.org/show_bug.cgi?id=145223
104 Reviewed by Darin Adler.
106 Introducing DOMPromise as a typed wrapper above DeferredWrapper.
107 This DOMPromise allows constraining Promise resolution/rejection to a single resolution type and rejection type.
108 This might be useful for typed callback usage of promise based APIs, like getUserMedia() or ReadableStreamReader.read().
110 Applying DOMPromise to AudioContext close, suspend and resume.
111 Changed binding code to represent what could be automatically generated by binding generator.
112 Fixing unneeded copies of std::function callbacks.
114 Disabling DOMPromise copy constructors to lower chances that resolution/rejection is done twice on the same object.
116 Covered by existing tests.
118 * Modules/webaudio/AudioContext.cpp:
119 (WebCore::AudioContext::addReaction):
120 (WebCore::AudioContext::setState):
121 (WebCore::AudioContext::suspend):
122 (WebCore::AudioContext::resume):
123 (WebCore::AudioContext::close):
124 * Modules/webaudio/AudioContext.h:
125 * bindings/js/JSAudioContextCustom.cpp:
126 (WebCore::JSAudioContext::suspend):
127 (WebCore::JSAudioContext::resume):
128 (WebCore::JSAudioContext::close):
129 * bindings/js/JSDOMPromise.cpp:
130 (WebCore::DeferredWrapper::callFunction):
131 * bindings/js/JSDOMPromise.h:
132 (WebCore::DeferredWrapper::resolve):
133 (WebCore::DeferredWrapper::reject):
134 (WebCore::DOMPromise::DOMPromise):
135 (WebCore::DOMPromise::resolve):
136 (WebCore::DOMPromise::reject):
138 2015-06-10 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
140 [Streams API] Implement pulling of a source by a ReadableStream
141 https://bugs.webkit.org/show_bug.cgi?id=145262
143 Reviewed by Darin Adler
145 Introduced abstract ReadableStream::doPull() which is overriden in ReadableJSStream.
146 Added support to call the "pull" JS callback in ReadableJSStream::doPull().
147 Added calls to pull as requested by the spec (when resolving a read callback, at start time...).
149 Fixed issue in ReadableStreamReader::read() (use of successCallback(JSValue()) in lieu of endCallback())
151 Covered by rebased tests.
153 * Modules/streams/ReadableStream.cpp:
154 (WebCore::ReadableStream::start): calling pull() once start.
155 (WebCore::ReadableStream::pull): calling doPull() if readableStream states requires to.
156 (WebCore::ReadableStream::read): calling pull() after resolving a read callback.
157 * Modules/streams/ReadableStream.h:
158 * Modules/streams/ReadableStreamReader.cpp:
159 (WebCore::ReadableStreamReader::read): fixed JSValue() bug.
160 * bindings/js/ReadableJSStream.cpp:
161 (WebCore::ReadableJSStream::doPull): calling of JS callback.
162 (WebCore::ReadableJSStream::storeException): catches exception and store them.
163 (WebCore::ReadableJSStream::storeError): refactoring for checkForException.
164 (WebCore::ReadableJSStream::enqueue):
165 * bindings/js/ReadableJSStream.h:
167 2015-06-09 Youenn Fablet <youenn.fablet@crf.canon.fr>
169 DeferredWrapper should clear its JS strong references once its promise is resolved/rejected
170 https://bugs.webkit.org/show_bug.cgi?id=145753
172 Reviewed by Darin Adler.
174 Clear strong references at the end of DeferredWrapper::resolve and DeferredWrapper::reject.
175 Added assertions to check that resolve or reject is called only once.
177 Removed DeferredWrapper constructor that creates internally its promise.
178 Reason is DeferredWrapper can be resolved synchronously and promise
179 will be lost when returning it at the end of the binding promise function.
180 Updated all custom bindings accordingly.
182 Covered by existing tests.
184 * bindings/js/JSAudioContextCustom.cpp:
185 (WebCore::JSAudioContext::suspend): Updated DeferredWrapper constructor to properly return the promise.
186 (WebCore::JSAudioContext::resume): Ditto.
187 (WebCore::JSAudioContext::close): Ditto.
188 * bindings/js/JSDOMPromise.cpp:
189 (WebCore::DeferredWrapper::resolve): Cleared strong references after promise resolution.
190 (WebCore::DeferredWrapper::reject): Cleared strong references after promise rejection.
191 * bindings/js/JSDOMPromise.h:
192 (WebCore::DeferredWrapper::resolve): Added ASSERT to check promise is not yet rejected/resolved.
193 (WebCore::DeferredWrapper::reject): Ditto.
194 (WebCore::DeferredWrapper::reject<ExceptionCode>): Ditto.
195 (WebCore::DeferredWrapper::resolve<String>): Ditto.
196 (WebCore::DeferredWrapper::resolve<bool>): Ditto.
197 (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Ditto.
199 (WebCore::DeferredWrapper::reject<String>): Ditto.
200 * bindings/js/JSMediaDevicesCustom.cpp:
201 (WebCore::JSMediaDevices::getUserMedia): Updated DeferredWrapper constructor to properly return the promise.
202 * bindings/js/JSReadableStreamReaderCustom.cpp:
203 (WebCore::JSReadableStreamReader::read): Ditto.
204 (WebCore::JSReadableStreamReader::closed): Ditto.
205 * bindings/js/JSSubtleCryptoCustom.cpp:
206 (WebCore::JSSubtleCrypto::encrypt): Ditto.
207 (WebCore::JSSubtleCrypto::decrypt): Ditto.
208 (WebCore::JSSubtleCrypto::sign): Ditto.
209 (WebCore::JSSubtleCrypto::verify): Ditto.
210 (WebCore::JSSubtleCrypto::digest): Ditto.
211 (WebCore::JSSubtleCrypto::generateKey): Ditto.
212 (WebCore::JSSubtleCrypto::importKey): Ditto.
213 (WebCore::JSSubtleCrypto::exportKey): Ditto.
214 (WebCore::JSSubtleCrypto::wrapKey): Ditto.
215 (WebCore::JSSubtleCrypto::unwrapKey): Ditto.
217 2015-06-09 Zalan Bujtas <zalan@apple.com>
219 Protect FrameView from being destroyed in Document::recalcStyle()
220 https://bugs.webkit.org/show_bug.cgi?id=143033
221 rdar://problem/20326871
223 Reviewed by Andreas Kling.
225 This patch ensures that FrameView stays valid in Document::recalcStyle().
226 It follows the defensive pattern we use to deal with the refcounted FrameView (see EventDispatcher::dispatchEvent)
228 When the iframe destroys itself in the onBeforeLoad callback (as the result of
229 PostResolutionCallbackDisabler -> HTMLObjectElement::updateWidget -> guardedDispatchBeforeLoadEvent),
230 we detach the frame and release the FrameView. However Document::recalcStyle() expects
231 the FrameView to stay valid.
233 Covered by fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html.
236 (WebCore::Document::recalcStyle):
238 2015-06-09 Daegyu Lee <daegyu.lee@navercorp.com>
240 3D-transformed video does not display on platforms without accelerated video rendering
241 https://bugs.webkit.org/show_bug.cgi?id=144782
243 Reviewed by Simon Fraser.
245 Video element does not get GraphicsLayer when MediaPlayerPrivate::supportsAcceleratedRendering() returns false
246 which means not using accelerated video decoding.
247 Although the video element gets GraphicsLayer by changing the CSS style of video element by javascript,
248 there is no way to set GraphicsLayer::setDrawsContent(true) for updating the video content.
249 As a result, after changing the CSS style, the video content does not show.
250 To avoid missing setDrawsContent(true), add conditions(!supportsAcceleratedRendering() && m_requiresOwnBackingStore).
252 Test: media/video-transformed-by-javascript.html
253 media/video-transformed-by-javascript-expected.html
255 * rendering/RenderLayerBacking.cpp:
256 (WebCore::RenderLayerBacking::containsPaintedContent):
258 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
260 REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight for text
261 https://bugs.webkit.org/show_bug.cgi?id=145830
263 Reviewed by Darin Adler.
265 The bug was caused by setSelection not updating RenderView when there is a style recalc scheduled
266 that doesn't trigger a layout. Fixed the bug by explicitly updating the selection in
267 Document::recalcStyle in that case.
269 Test: editing/selection/update-selection-by-style-change.html
272 (WebCore::Document::recalcStyle):
273 * editing/FrameSelection.cpp:
274 (WebCore::FrameSelection::updateAppearanceAfterLayout): Renamed from didLayout.
275 * editing/FrameSelection.h:
276 * page/FrameView.cpp:
277 (WebCore::FrameView::performPostLayoutTasks):
279 2015-06-09 Dean Jackson <dino@apple.com>
281 MediaControls: Reenable resize of controls on pinch zoom
282 https://bugs.webkit.org/show_bug.cgi?id=145824
283 <rdar://problem/21212778>
285 Reviewed by Darin Adler.
287 Reinstate the code that updated the scaling of the
288 controls in response to changes in page scale.
289 This time around we have to change both the controls
290 panel, and its blurry background.
292 * Modules/mediacontrols/mediaControlsApple.js:
293 (Controller.prototype.set pageScaleFactor): Deleted a comment.
294 * Modules/mediacontrols/mediaControlsiOS.css:
295 (video::-webkit-media-controls-panel-background): Set the background to pin
296 to the bottom of its view.
297 * Modules/mediacontrols/mediaControlsiOS.js:
298 (ControllerIOS.prototype.get pageScaleFactor): Basic getter, copied from mediaControlsApple.
299 (ControllerIOS.prototype.set pageScaleFactor): The setter that reacts to the page scale
300 and applies an inverse scaling on the control panel using a transform, and adjusts the
301 height on the background similarly.
303 2015-06-09 Andreas Kling <akling@apple.com>
305 GraphicsContext state stack wasting lots of memory when empty.
306 <https://webkit.org/b/145817>
308 Reviewed by Geoffrey Garen.
310 Give the GraphicsContextState stack an inline capacity of 1, and make sure
311 to free any heap-allocated backing store when the stack goes empty.
313 The 1 is because HTMLCanvasElement keeps one "save" on the underlying
314 GraphicsContext at all times, and this prevents those canvases from always
315 sitting on an empty stack with 16 capacity.
317 This saves ~520 kB on cnet.com video pages.
319 * platform/graphics/GraphicsContext.cpp:
320 (WebCore::GraphicsContext::restore):
321 * platform/graphics/GraphicsContext.h:
323 2015-06-09 Said Abou-Hallawa <sabouhallawa@apple.com>
325 SVG Fragment is not rendered if it is the css background image of an HTML element
326 https://bugs.webkit.org/show_bug.cgi?id=91790
328 Reviewed by Darin Adler.
330 To show an SVG fragment, the SVGImage has to scrollToFragment() using
331 the resource url. The changes http://trac.webkit.org/changeset/164804
332 and http://trac.webkit.org/changeset/164983 set the url of SVGImage to
333 to be used later in SVGImage::draw(). The problem is the SVGImage url
334 is only set when it is the src of an <img> tag. We did not do the same
335 thing when the SVGImage is the css background image of an HTML element.
337 The fix is to set the url of the SVGImage always when it's created by
338 the CachedImage. The CachedImage must have a valid url when the SVGImage
341 Test: svg/css/svg-resource-fragment-identifier-background.html
343 * loader/cache/CachedImage.cpp:
344 (WebCore::CachedImage::load):
345 (WebCore::CachedImage::checkShouldPaintBrokenImage):
346 Replace the calls resourceRequest().url() and m_resourceRequest.url() by
347 calling url() since they are all the same.
349 (WebCore::CachedImage::createImage): Pass the resource url to SVGImage
350 and change ImageObserver& by ImageObserver*, since null is not legal.
352 * svg/graphics/SVGImage.cpp:
353 (WebCore::SVGImage::SVGImage):
354 * svg/graphics/SVGImage.h: Add a url parameter to SVGImage constructor.
356 * svg/graphics/SVGImageCache.cpp:
357 (WebCore::SVGImageCache::findImageForRenderer): Add a new helper function.
359 (WebCore::SVGImageCache::imageSizeForRenderer):
360 (WebCore::SVGImageCache::imageForRenderer): Code clean up.
362 * svg/graphics/SVGImageCache.h: Make imageForRenderer() const.
364 * svg/graphics/SVGImageForContainer.cpp: Remove unneeded header file.
366 2015-06-09 Matt Rajca <mrajca@apple.com>
368 Add support for toggling playback in MediaSessions and MediaSessionManagers.
369 https://bugs.webkit.org/show_bug.cgi?id=145822
371 Reviewed by Eric Carlson.
373 * Modules/mediasession/MediaSession.cpp: Toggle playback of all active media elements.
374 (WebCore::MediaSession::togglePlayback):
375 * Modules/mediasession/MediaSession.h:
376 * Modules/mediasession/MediaSessionManager.cpp: Toggle playback of all media sessions as described in the
378 (WebCore::MediaSessionManager::togglePlayback):
379 * Modules/mediasession/MediaSessionManager.h:
381 2015-06-09 Darin Adler <darin@apple.com>
383 Takes two delete key presses to delete pasted emoji up-pointing index finger with skin tone
384 https://bugs.webkit.org/show_bug.cgi?id=145823
386 Reviewed by Anders Carlsson.
388 Tests: editing/deleting/delete-emoji.html
390 * rendering/RenderText.cpp:
391 (WebCore::isHangulLVT): Use constants instead of macros. Also changed to take a UChar since
392 the Hangul processing can work on UTF-16 code unit at a time and doesn't have to handle
394 (WebCore::isMark): Use U_GC_M_MASK instead of writing the algorithm out another way.
395 (WebCore::isInArmenianToLimbuRange): Added.
396 (WebCore::RenderText::previousOffsetForBackwardDeletion): Refactored for clarity and to use
397 the U16_PREV macro instead of doing what it does in a sloppier way. Added code to allow a
398 variation selector before an emoji modifier to fix the bug. Changed Hangul logic to work a
399 code unit at a time, since it can, to use an enum class, and to use constants rather than
400 all capital macros. Also changed the "dumb" case to use a more appropriate ICU macro.
402 2015-06-09 Said Abou-Hallawa <sabouhallawa@apple.com>
404 feComposite filter does not clip the paint rect to its effect rect when the operator is 'in' or 'atop'
405 https://bugs.webkit.org/show_bug.cgi?id=137856
407 Reviewed by Darin Adler.
409 There was bug in calculating the absolutePaintRect of the feComposite filter
410 when the operator is equal to 'in' or 'atop'. The absolutePaintRect was set
411 to the absolutePaintRect of the background FilterEffect which is correct.
412 What was missing is clipping this rectangle to the maxEffectRect of the
413 filter which we do for other operators.
415 Tests: svg/filters/feComposite-background-rect-control-operators.svg
417 * platform/graphics/IntRect.h:
418 (WebCore::operator-=):
419 (WebCore::operator-): Add new operators to IntRect.
421 * platform/graphics/filters/FEComposite.cpp:
422 (WebCore::FEComposite::determineAbsolutePaintRect): Make sure the filter
423 absolutePaintRect is clipped to maxEffectRect for all operators.
425 (WebCore::FEComposite::platformApplySoftware): Code clean-up.
427 * platform/graphics/filters/FilterEffect.cpp:
428 (WebCore::FilterEffect::determineAbsolutePaintRect): Move the clipping
429 part to a separate function.
431 (WebCore::FilterEffect::clipAbsolutePaintRect): Clip the absolutePaintRect
432 to the maxEffectRect of the filter.
434 * platform/graphics/filters/FilterEffect.h:
436 2015-06-09 Matt Rajca <mrajca@apple.com>
438 Implement MediaSessionManager to keep track of all MediaSessions.
439 https://bugs.webkit.org/show_bug.cgi?id=145806
441 Reviewed by Eric Carlson.
443 * Modules/mediasession/MediaSession.cpp:
444 (WebCore::MediaSession::MediaSession): Add ourselves to the MediaSessionManager upon construction.
445 (WebCore::MediaSession::~MediaSession): Remove ourselves from the MediaSessionManager before destruction.
446 * Modules/mediasession/MediaSessionManager.cpp: Added to keep track of all living MediaSessions.
447 (WebCore::MediaSessionManager::singleton):
448 (WebCore::MediaSessionManager::addMediaSession):
449 (WebCore::MediaSessionManager::removeMediaSession):
450 * Modules/mediasession/MediaSessionManager.h: Added.
451 * WebCore.xcodeproj/project.pbxproj: Added new MediaSessionManager sources.
453 2015-06-09 Ryuan Choi <ryuan.choi@navercorp.com>
455 [CoordinatedGraphics] Remove RefCounted from Tile
456 https://bugs.webkit.org/show_bug.cgi?id=145788
458 Reviewed by Darin Adler.
460 Since r185140, Tile does not need to be RefCounted.
462 No new tests, no behavior changes.
464 * platform/graphics/texmap/coordinated/Tile.cpp:
465 (WebCore::Tile::create): Deleted.
466 * platform/graphics/texmap/coordinated/Tile.h:
467 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
468 (WebCore::TiledBackingStore::invalidate):
469 (WebCore::TiledBackingStore::updateTileBuffers): Simplifies not to use unnecessary Vector.
470 (WebCore::TiledBackingStore::coverageRatio):
471 (WebCore::TiledBackingStore::createTiles):
472 (WebCore::TiledBackingStore::resizeEdgeTiles):
473 (WebCore::TiledBackingStore::setKeepRect):
474 (WebCore::TiledBackingStore::tileAt): Deleted one line wrapper.
475 (WebCore::TiledBackingStore::setTile): Ditto.
476 (WebCore::TiledBackingStore::removeTile): Ditto.
477 * platform/graphics/texmap/coordinated/TiledBackingStore.h:
479 2015-06-09 Chris Dumez <cdumez@apple.com>
481 Allow one sync GC per gcTimer interval on critical memory pressure warning
482 https://bugs.webkit.org/show_bug.cgi?id=145773
484 Reviewed by Geoffrey Garen.
486 * bindings/js/GCController.cpp:
487 (WebCore::GCController::garbageCollectNowIfNotDoneRecently):
489 Add new GCController::garbageCollectNowIfNotDoneRecently() API that
490 allows one synchronous GC per full GC timer interval. If called more
491 than once per interval, it becomes equivalent to garbageCollectSoon()
492 and merely accelerates the next collection.
494 * bindings/js/GCController.h:
495 * platform/MemoryPressureHandler.cpp:
496 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
498 Call the new GCController::garbageCollectNowIfNotDoneRecently() on
499 critical memory pressure instead of garbageCollectionSoon() to try
500 as do a synchronous GC if one wasn't already done recently.
501 Also drop call to fullSweep() as GCController::garbageCollectNow*()
502 already do a sweep after the collection.
504 2015-06-09 Darin Adler <darin@apple.com>
507 JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
508 https://bugs.webkit.org/show_bug.cgi?id=145811
510 There was one unusual case in the bindings generator that was depending on this.
512 * bindings/js/JSDOMBinding.h:
513 (WebCore::argumentOrNull): Deleted.
514 * bindings/scripts/CodeGeneratorJS.pm:
515 (GenerateParametersCheck): Stop using argumentOrNull.
516 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Updated.
517 * bindings/scripts/test/JS/JSTestObj.cpp: Updated.
519 2015-06-09 Darin Adler <darin@apple.com>
521 JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
522 https://bugs.webkit.org/show_bug.cgi?id=145811
524 Reviewed by Antti Koivisto.
526 At some point, someone who didn't understand JSValue very well added checks for
527 isEmpty (and the function isEmpty itself) in JavaScript bindings. But the engine
528 never would pass an empty JSValue to a binding; that's used only inside the
529 engine itself. I think this was done by some Google V8 experts a while back, so
530 it's not entirely surprising they didn't understand this. But we don't want to
531 keep all that unneeded code.
533 * bindings/js/JSAudioTrackCustom.cpp:
534 (WebCore::JSAudioTrack::setKind): Removed the isEmpty clause here. I presume this
535 was copied and pasted from script-generated bindings. While I was at it, I used a
536 slightly more efficient code path that avoids doing a ref/deref on the string by
537 using auto&. That's trickier to do correctly for functions with more than one
538 argument, so I didn't do it in the bindings generator yet.
539 (WebCore::JSAudioTrack::setLanguage): Ditto.
540 * bindings/js/JSTextTrackCustom.cpp:
541 (WebCore::JSTextTrack::setKind): Ditto.
542 (WebCore::JSTextTrack::setLanguage): Ditto.
543 * bindings/js/JSVideoTrackCustom.cpp:
544 (WebCore::JSVideoTrack::setKind): Ditto.
545 (WebCore::JSVideoTrack::setLanguage): Ditto.
547 * bindings/scripts/CodeGeneratorJS.pm:
548 (GenerateImplementation): Use "=" syntax instead of constructor style syntax for
549 the argument processing. I think this is more readable.
550 (GenerateParametersCheck): For the enum code path, did the more efficient auto&
551 idiom to avoid ref/deref on a string. For the toExistingAtomicString path,
552 restructured so we don't have to check the flag indicating that something is atomic.
553 Later we could also avoid the ref/deref; added a FIXME about that.
554 (GetNativeType): Use String, not const String, for local variables. Sure, the
555 string is const, but so is every other local variable type we use! No need to be
557 (JSValueToNative): Removed the uneeded calls to isEmpty. Since the call sites no
558 longer use construction syntax, used initializer syntax style for a couple classes
559 that are constructed with multiple arguments.
561 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated.
562 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
563 * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
564 * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
565 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
566 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
567 * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
568 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
569 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
570 * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
572 2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
574 Fix unused private field warning in GraphicsLayerUpdater.h
575 https://bugs.webkit.org/show_bug.cgi?id=145757
577 Reviewed by Darin Adler.
579 * platform/graphics/GraphicsLayerUpdater.cpp:
580 (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
581 * platform/graphics/GraphicsLayerUpdater.h:
583 2015-06-09 Yusuke Suzuki <utatane.tea@gmail.com>
585 Crash when passing Symbol to NPAPI plugin objects
586 https://bugs.webkit.org/show_bug.cgi?id=145798
588 Reviewed by Darin Adler.
590 Test: plugins/npruntime/script-object-with-symbols.html
592 For C bridge APIs, we add guards for symbols.
593 This is the same to the existing guards in Objective-C APIs.
595 * bridge/c/c_class.cpp:
596 (JSC::Bindings::CClass::methodNamed):
597 (JSC::Bindings::CClass::fieldNamed):
598 * bridge/objc/objc_class.mm:
599 (JSC::Bindings::ObjcClass::methodNamed):
600 (JSC::Bindings::ObjcClass::fieldNamed):
601 (JSC::Bindings::ObjcClass::fallbackObject):
603 2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
605 [cmake] Fix the style issues in cmake project files
606 https://bugs.webkit.org/show_bug.cgi?id=145755
608 Reviewed by Darin Adler.
615 * PlatformWinCairo.cmake:
617 2015-06-09 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
619 [Streams API] ReadableJSStream should handle JS source getters that throw
620 https://bugs.webkit.org/show_bug.cgi?id=145600
622 Reviewed by Darin Adler.
624 Checking whether there is an exception when trying to access to a source method.
625 If so, rethrowing it in case of "start".
627 Refactoring of code to prepare pulling, cancelling and additional parameter handling in ReadableStream construtor.
629 Fixed the case of ReadableStream constructor called with an undefined parameter.
631 Covered by rebased test expectation.
633 * bindings/js/JSReadableStreamCustom.cpp:
634 (WebCore::constructJSReadableStream): Refactoring to group all parameter check and exception handling in ReadableJSStream::create.
635 * bindings/js/ReadableJSStream.cpp:
636 (WebCore::getPropertyFromObject):
637 (WebCore::callFunction):
638 (WebCore::ReadableJSStream::invoke): Added method to be used also for pulling and cancelling.
639 (WebCore::ReadableJSStream::doStart):
640 (WebCore::ReadableJSStream::create):
641 * bindings/js/ReadableJSStream.h:
643 2015-06-08 Dan Bernstein <mitz@apple.com>
645 Made MicroTask.h a project header.
647 Rubber-stamped by Anders Carlsson.
649 * WebCore.xcodeproj/project.pbxproj: Demoted MicroTask.h from Public to Project. WebCore
650 doesn’t have public headers, and this header isn’t used by WebKit.
652 2015-06-08 Gyuyoung Kim <gyuyoung.kim@webkit.org>
654 Purge PassRefPtr in JavaScriptCore
655 https://bugs.webkit.org/show_bug.cgi?id=145750
657 Reviewed by Darin Adler.
659 As a step to purge PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.
661 No new tests, no behavior changes.
663 * bindings/js/JSDOMWindowBase.cpp:
664 (WebCore::JSDOMWindowBase::commonVM):
666 2015-06-08 Zalan Bujtas <zalan@apple.com>
668 Subpixel rendering: Clip-path does not work properly on subpixel positions.
669 https://bugs.webkit.org/show_bug.cgi?id=145749
670 rdar://problem/20824305
672 Reviewed by Simon Fraser.
674 This patch ensures that clip-path is device pixel snapped both for composited and
675 non-composited content.
677 Tests: compositing/masks/compositing-clip-path-on-subpixel-position.html
678 fast/masking/clip-path-on-subpixel-position.html
680 * rendering/RenderLayer.cpp:
681 (WebCore::RenderLayer::setupClipPath):
682 * rendering/RenderLayerBacking.cpp:
683 (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
685 2015-06-08 Chris Dumez <cdumez@apple.com>
687 Access GCController instance via GCController::singleton() instead of a free function
688 https://bugs.webkit.org/show_bug.cgi?id=145776
690 Reviewed by Darin Adler.
692 Access GCController instance via GCController::singleton() instead of a
693 free function as per coding style and for consistency with other
694 singleton classes in the codebase.
696 * bindings/js/GCController.cpp:
697 (WebCore::GCController::singleton):
698 (WebCore::gcController): Deleted.
699 * bindings/js/GCController.h:
700 * bindings/js/JSDOMWindowShell.cpp:
701 (WebCore::JSDOMWindowShell::setWindow):
702 * bindings/js/ScriptCachedFrameData.cpp:
703 (WebCore::ScriptCachedFrameData::clear):
704 * bindings/js/ScriptController.cpp:
705 (WebCore::collectGarbageAfterWindowShellDestruction):
706 * platform/MemoryPressureHandler.cpp:
707 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
709 2015-06-08 Daniel Bates <dabates@apple.com>
711 Mouse release on AutoFill button activates it; should only activate on click
712 https://bugs.webkit.org/show_bug.cgi?id=145774
713 <rdar://problem/21069245>
715 Reviewed by Ryosuke Niwa.
717 Fixes an issue where a click event was dispatched to a shadow tree node regardless of whether
718 both the mouse press and mouse release were targeted at it. In particular, releasing the mouse
719 on the AutoFill button activates it regardless of whether the mouse was pressed on it.
721 Currently we always dispatch a click event to a node n where the mouse was released when n is
722 in a shadow tree regardless of whether the mouse was pressed on n. Instead we should only
723 dispatch a click event to n if the mouse was pressed and released on n. If n is a shadow tree
724 descendant, the mouse was released on n, and n never received a mouse press then we should
725 dispatch the click event at the shadow host element of n to preserve the illusion to web
726 developers that the shadow host element is a single element.
728 Test: fast/forms/auto-fill-button/mouse-down-input-mouse-release-auto-fill-button.html
730 * page/EventHandler.cpp:
731 (WebCore::targetNodeForClickEvent): Added; returns the target node for the DOM click event.
732 (WebCore::EventHandler::handleMouseReleaseEvent): Modified to use dispatch the DOM click event
733 at the node returned by targetNodeForClickEvent().
734 (WebCore::mouseIsReleasedOnPressedElement): Deleted.
736 2015-06-08 Chris Dumez <cdumez@apple.com>
738 WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
739 https://bugs.webkit.org/show_bug.cgi?id=145748
740 <rdar://problem/21226577>
742 Reviewed by Brady Eidson.
744 We would sometimes crash when pruning the PageCache because it was
745 possible for frames to still be loading while in the PageCache and
746 we would try to stop the load when the CachedFrame is destroyed. This
747 code path was not supposed to be exercised as we were not supposed to
748 have pages still loading inside the PageCache.
750 r185017 made sure we don't insert into the PageCache pages that are
751 still loading. However, nothing was preventing content from starting
752 new loads in their 'pagehide' event handlers, *after* the decision
753 to put the page in the PageCache was made.
755 This patch prevents content from starting loads from a 'pagehide'
756 event handler so that we can no longer have content that is loading
757 inside the PageCache. 'ping' image loads still go through though as
758 these are specially handled and use PingLoaders.
760 Tests: http/tests/navigation/image-load-in-pagehide-handler.html
761 http/tests/navigation/subframe-pagehide-handler-starts-load.html
762 http/tests/navigation/subframe-pagehide-handler-starts-load2.html
764 * loader/FrameLoader.cpp:
765 (WebCore::FrameLoader::FrameLoader):
766 (WebCore::FrameLoader::stopLoading):
767 (WebCore::FrameLoader::loadURL):
768 (WebCore::FrameLoader::loadWithDocumentLoader):
769 (WebCore::FrameLoader::stopAllLoaders):
770 (WebCore::FrameLoader::handleBeforeUnloadEvent):
771 * loader/FrameLoader.h:
772 (WebCore::FrameLoader::pageDismissalEventBeingDispatched):
773 (WebCore::FrameLoader::PageDismissalEventType::PageDismissalEventType):
774 (WebCore::FrameLoader::PageDismissalEventType::operator Page::DismissalType):
776 Add wrapper class for m_pageDismissalEventBeingDispatched member type.
777 The wrapper takes care of updating the m_dismissalEventBeingDispatched
778 member on the Page every time the member on FrameLoader is updated. We
779 now cache this information on the Page so that clients can cheaply
780 query if a dismissal event is being dispatched in any of the Page's
781 frame, without having to traverse the frame tree.
783 * loader/ImageLoader.cpp:
784 (WebCore::pageIsBeingDismissed):
786 * loader/cache/CachedResource.cpp:
787 (WebCore::CachedResource::load):
789 Abort the load early if we are currently dispatching a 'pagehide'
790 event. We don't allow new loads at such point because we've already
791 made the decision to add the Page to the PageCache.
793 * loader/cache/CachedResourceLoader.cpp:
794 (WebCore::CachedResourceLoader::requestImage):
797 (WebCore::Chrome::runModal): Deleted.
798 (WebCore::Chrome::setToolbarsVisible): Deleted.
799 (WebCore::Chrome::toolbarsVisible): Deleted.
800 (WebCore::Chrome::runJavaScriptConfirm): Deleted.
801 (WebCore::Chrome::runJavaScriptPrompt): Deleted.
802 (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
804 * page/ChromeClient.h:
805 * page/DOMWindow.cpp:
806 (WebCore::DOMWindow::canShowModalDialogNow):
808 Drop ChromeClient::shouldRunModalDialogDuringPageDismissal() and code
809 using it as it is unused and I did not think it was worth updating
813 (WebCore::Page::dismissalEventBeingDispatched):
814 (WebCore::Page::setDismissalEventBeingDispatched):
816 Add a m_dismissalEventBeingDispatched member to the Page so that we can
817 easily query if a dismissal event is being dispatched in any of the
818 frames, without having to traverse the frame tree. I suspect more call
819 sites of FrameLoader::pageDismissalEventBeingDispatched() may actually
820 want this but I did not make such change in this patch. It is important
821 to check all the frames and not simply the current one because a frame's
822 pagehide event handler may trigger a load in another frame.
824 2015-06-08 Hunseop Jeong <hs85.jeong@samsung.com>
826 Replaced 0 with nullptr in WebCore/Modules.
827 https://bugs.webkit.org/show_bug.cgi?id=145758
829 Reviewed by Darin Adler.
831 No new tests, no behavior changes.
833 * Modules/battery/BatteryManager.cpp:
834 (WebCore::BatteryManager::BatteryManager):
835 * Modules/encryptedmedia/CDM.cpp:
837 * Modules/encryptedmedia/MediaKeys.cpp:
838 (WebCore::MediaKeys::MediaKeys):
839 (WebCore::MediaKeys::~MediaKeys):
840 * Modules/indexeddb/IDBCursor.h:
841 (WebCore::IDBCursor::continueFunction):
842 * Modules/indexeddb/IDBCursorBackendOperations.cpp:
843 (WebCore::CursorAdvanceOperation::perform):
844 (WebCore::CursorIterationOperation::perform):
845 * Modules/indexeddb/IDBDatabase.cpp:
846 (WebCore::IDBDatabase::transactionFinished):
847 * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
848 (WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl):
849 * Modules/indexeddb/IDBEventDispatcher.cpp:
850 (WebCore::IDBEventDispatcher::dispatch):
851 * Modules/indexeddb/IDBIndex.h:
852 (WebCore::IDBIndex::openCursor):
853 (WebCore::IDBIndex::count):
854 (WebCore::IDBIndex::openKeyCursor):
855 * Modules/indexeddb/IDBObjectStore.cpp:
856 (WebCore::IDBObjectStore::add):
857 (WebCore::IDBObjectStore::put):
858 (WebCore::IDBObjectStore::index):
859 (WebCore::IDBObjectStore::openCursor):
860 * Modules/indexeddb/IDBObjectStore.h:
861 (WebCore::IDBObjectStore::count):
862 * Modules/indexeddb/IDBOpenDBRequest.cpp:
863 (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
864 (WebCore::IDBOpenDBRequest::onSuccess):
865 * Modules/indexeddb/IDBRequest.cpp:
866 (WebCore::IDBRequest::IDBRequest):
867 * Modules/indexeddb/IDBTransaction.cpp:
868 (WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished):
869 * Modules/indexeddb/IDBTransactionBackend.cpp:
870 (WebCore::IDBTransactionBackend::commit):
871 * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
872 (WebCore::OpenCursorOperation::perform):
873 * Modules/indieui/UIRequestEvent.cpp:
874 (WebCore::UIRequestEventInit::UIRequestEventInit):
875 (WebCore::UIRequestEvent::UIRequestEvent):
876 * Modules/mediasource/MediaSource.cpp:
877 (WebCore::MediaSource::MediaSource):
878 (WebCore::MediaSource::setReadyState):
879 (WebCore::MediaSource::removeSourceBuffer):
880 * Modules/mediasource/SourceBuffer.cpp:
881 (WebCore::SourceBuffer::~SourceBuffer):
882 (WebCore::SourceBuffer::removedFromMediaSource):
883 * Modules/mediastream/MediaStream.cpp:
884 (WebCore::MediaStream::~MediaStream):
885 * Modules/mediastream/MediaStreamEvent.cpp:
886 (WebCore::MediaStreamEventInit::MediaStreamEventInit):
887 * Modules/mediastream/MediaStreamTrackEvent.cpp:
888 (WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit):
889 * Modules/mediastream/RTCDataChannel.cpp:
890 (WebCore::RTCDataChannel::stop):
891 * Modules/mediastream/UserMediaRequest.cpp:
892 (WebCore::UserMediaRequest::contextDestroyed):
893 * Modules/notifications/Notification.cpp:
894 (WebCore::Notification::Notification):
895 * Modules/notifications/Notification.h:
896 * Modules/speech/SpeechSynthesis.cpp:
897 (WebCore::SpeechSynthesis::SpeechSynthesis):
898 (WebCore::SpeechSynthesis::setPlatformSynthesizer):
899 (WebCore::SpeechSynthesis::cancel):
900 (WebCore::SpeechSynthesis::handleSpeakingCompleted):
901 * Modules/speech/SpeechSynthesisUtterance.cpp:
902 (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
903 * Modules/webaudio/AudioBufferSourceNode.cpp:
904 (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
905 (WebCore::AudioBufferSourceNode::clearPannerNode):
906 * Modules/webaudio/AudioContext.cpp:
907 (WebCore::AudioContext::createMediaStreamSource):
908 * Modules/webaudio/MediaElementAudioSourceNode.cpp:
909 (WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode):
910 * Modules/webaudio/OscillatorNode.cpp:
911 (WebCore::OscillatorNode::setType):
912 (WebCore::OscillatorNode::process):
913 * Modules/webdatabase/DatabaseManager.cpp:
914 (WebCore::DatabaseManager::DatabaseManager):
915 * Modules/webdatabase/DatabaseThread.cpp:
916 (WebCore::DatabaseThread::DatabaseThread):
917 (WebCore::DatabaseThread::databaseThread):
918 * Modules/webdatabase/DatabaseThread.h:
919 * Modules/webdatabase/DatabaseTracker.cpp:
920 (WebCore::DatabaseTracker::DatabaseTracker):
921 * Modules/webdatabase/SQLCallbackWrapper.h:
922 (WebCore::SQLCallbackWrapper::clear):
923 (WebCore::SQLCallbackWrapper::unwrap):
924 * Modules/webdatabase/SQLStatementBackend.cpp:
925 (WebCore::SQLStatementBackend::clearFailureDueToQuota):
926 * Modules/webdatabase/SQLTransaction.cpp:
927 (WebCore::SQLTransaction::deliverTransactionErrorCallback):
928 * Modules/webdatabase/SQLTransactionBackend.cpp:
929 (WebCore::SQLTransactionBackend::doCleanup):
930 (WebCore::SQLTransactionBackend::getNextStatement):
931 * Modules/webdatabase/SQLTransactionCoordinator.cpp:
932 (WebCore::SQLTransactionCoordinator::releaseLock):
933 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
934 (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
935 (WebCore::ThreadableWebSocketChannelClientWrapper::clearPeer):
936 (WebCore::ThreadableWebSocketChannelClientWrapper::clearClient):
937 * Modules/websockets/WebSocket.cpp:
938 (WebCore::WebSocket::stop):
939 * Modules/websockets/WebSocketChannel.cpp:
940 (WebCore::WebSocketChannel::disconnect):
941 (WebCore::WebSocketChannel::didCloseSocketStream):
942 * Modules/websockets/WebSocketFrame.h:
943 * Modules/websockets/WebSocketHandshake.cpp:
944 (WebCore::WebSocketHandshake::clearScriptExecutionContext):
945 (WebCore::WebSocketHandshake::readStatusLine):
946 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
947 (WebCore::WorkerThreadableWebSocketChannel::Peer::disconnect):
948 (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
949 (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
951 2015-06-08 Chris Fleizach <cfleizach@apple.com>
953 AX: improve list heuristics (presentational use versus actual lists)
954 https://bugs.webkit.org/show_bug.cgi?id=134187
956 Unreviewed. Rolling this change out temporarily.
958 * accessibility/AccessibilityList.cpp:
959 (WebCore::AccessibilityList::isDescriptionList):
960 (WebCore::AccessibilityList::determineAccessibilityRole):
961 (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): Deleted.
962 * accessibility/AccessibilityList.h:
964 2015-06-08 Eric Carlson <eric.carlson@apple.com>
966 [Mac] Enable AVFoundation by default when QTKit is disabled by default
967 https://bugs.webkit.org/show_bug.cgi?id=145760
969 Reviewed by Alexey Proskuryakov.
971 No new tests, this change makes existing tests pass.
973 Settings::gAVFoundationEnabled defaults to true.
976 (WebCore::invalidateAfterGenericFamilyChange):
978 2015-06-08 Ryosuke Niwa <rniwa@webkit.org>
980 Explicitly dismiss correction panel when user types a new character
981 https://bugs.webkit.org/show_bug.cgi?id=145732
982 <rdar://problem/19596892>
984 Reviewed by Darin Adler.
986 Explicitly dismiss the correction panel when the user types a new character.
987 This patch shouldn't change any behavior we're currently relying on AppKit to do the same.
989 Manually ran tests in ManualTests/autocorrection.
991 * editing/AlternativeTextController.cpp:
992 (WebCore::AlternativeTextController::respondToAppliedEditing):
994 2015-06-08 Javier Fernandez <jfernandez@igalia.com>
996 [CSS Grid Layout] Setting height on a grid item doesn't have any effect
997 https://bugs.webkit.org/show_bug.cgi?id=145604
999 Reviewed by Sergio Villar Senin.
1001 Box Alignment spec states that stretch is only possible when height is
1002 'auto' and no 'auto' margins are used.
1004 It might be the case that style changes so that stretching is not allowed,
1005 hence we need to detect it and clear the override height the stretching
1006 algorithm previously set. The new layout triggered by the style change
1007 will then set grid item's height according to the new style rules.
1009 Test: fast/css-grid-layout/grid-item-should-not-be-stretched-when-height-or-margin-change.html
1011 * rendering/RenderGrid.cpp:
1012 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1014 2015-06-08 Brady Eidson <beidson@apple.com>
1016 Completely remove all IDB properties/constructors when it is disabled at runtime.
1017 rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034
1019 Reviewed by Geoffrey Garen.
1021 Test: storage/indexeddb/properties-disabled-at-runtime.html
1023 - Make constructors all runtime enabled.
1024 - Remove autogeneration of the window.(webkit)indexedDB accessors.
1025 - Add manual overrides for the (webkit)indexedDB accessors at runtime.
1027 * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
1028 * Modules/indexeddb/IDBAny.idl:
1029 * Modules/indexeddb/IDBCursor.idl:
1030 * Modules/indexeddb/IDBCursorWithValue.idl:
1031 * Modules/indexeddb/IDBDatabase.idl:
1032 * Modules/indexeddb/IDBFactory.idl:
1033 * Modules/indexeddb/IDBIndex.idl:
1034 * Modules/indexeddb/IDBKeyRange.idl:
1035 * Modules/indexeddb/IDBObjectStore.idl:
1036 * Modules/indexeddb/IDBOpenDBRequest.idl:
1037 * Modules/indexeddb/IDBRequest.idl:
1038 * Modules/indexeddb/IDBTransaction.idl:
1039 * Modules/indexeddb/IDBVersionChangeEvent.idl:
1040 * page/DOMWindow.idl:
1042 * bindings/js/JSDOMWindowCustom.cpp:
1043 (WebCore::jsDOMWindowIndexedDB):
1044 (WebCore::JSDOMWindow::getOwnPropertySlot):
1046 2015-06-08 Michael Catanzaro <mcatanzaro@igalia.com>
1048 [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
1049 https://bugs.webkit.org/show_bug.cgi?id=145542
1051 Reviewed by Alexey Proskuryakov.
1053 No new tests, because it's hard to test whether a DNS request has been sent. We could do
1054 this by adding new API to modify the GProxyResolver and GResolver used by the SoupSession in
1055 the network process, but even if such API were desirable, it would be a big job. Tests
1056 should not be allowed to dictate our public API.
1058 * platform/network/DNSResolveQueue.cpp:
1059 (WebCore::DNSResolveQueue::add): Do not check whether the system is using a proxy, since
1060 this can't be determined for all ports here.
1061 (WebCore::DNSResolveQueue::timerFired): Do not check whether the system is using a proxy,
1062 since this can't be determined for all ports here.
1063 (WebCore::DNSResolveQueue::DNSResolveQueue): Remove member variables and member functions
1064 that are only needed by the CF backend. Rename platformResolve to
1065 platformMaybeResolveHost.
1066 (WebCore::DNSResolveQueue::isUsingProxy): Moved to DNSCFNet.cpp.
1067 * platform/network/DNSResolveQueue.h: Remove member variables that are only needed by the
1069 * platform/network/cf/DNSCFNet.cpp:
1070 (WebCore::proxyIsEnabledInSystemPreferences): Renamed from
1071 platformProxyIsEnabledInSystemPreferences.
1072 (WebCore::isUsingProxy): Moved from DNSResolveQueue.cpp. The member variables removed from
1073 DNSResolveQueue are not static here. This is safe since it's a singleton.
1074 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
1075 Bail early from here if a proxy is configured.
1076 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Renamed to
1077 proxyIsEnabledInSystemPreferences.
1078 (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
1079 * platform/network/soup/DNSSoup.cpp:
1080 (WebCore::gotProxySettingsCallback): Added. Call soup_session_prefetch_dns from here only
1081 if a proxy would not be used to resolve the host.
1082 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
1083 Look up proxy settings using g_proxy_resolver_lookup_async rather than calling
1084 soup_session_prefetch_dns directly.
1085 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
1086 (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
1088 2015-06-08 Hunseop Jeong <hs85.jeong@samsung.com>
1090 Use modern for-loops in WebCore/Modules - 2
1091 https://bugs.webkit.org/show_bug.cgi?id=145541
1093 Reviewed by Darin Adler.
1095 No new tests, no behavior changes.
1097 * Modules/mediastream/RTCConfiguration.h:
1098 (WebCore::RTCConfiguration::iceServers):
1099 * Modules/mediastream/RTCDTMFSender.cpp:
1100 (WebCore::RTCDTMFSender::scheduledEventTimerFired):
1101 * Modules/mediastream/RTCDataChannel.cpp:
1102 (WebCore::RTCDataChannel::scheduledEventTimerFired):
1103 * Modules/mediastream/RTCPeerConnection.cpp:
1104 (WebCore::processIceServer):
1105 (WebCore::RTCPeerConnection::~RTCPeerConnection):
1106 (WebCore::RTCPeerConnection::getStreamById):
1107 (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
1108 (WebCore::RTCPeerConnection::stop):
1109 (WebCore::RTCPeerConnection::scheduledEventTimerFired):
1110 * Modules/mediastream/RTCStatsReport.cpp:
1111 (WebCore::RTCStatsReport::names):
1112 * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1113 (WebCore::initProtocolHandlerWhitelist):
1114 * Modules/speech/SpeechSynthesis.cpp:
1115 (WebCore::SpeechSynthesis::getVoices):
1116 * Modules/webaudio/AudioBuffer.cpp:
1117 (WebCore::AudioBuffer::memoryCost):
1118 * Modules/webaudio/AudioContext.cpp:
1119 (WebCore::AudioContext::createMediaStreamSource):
1120 (WebCore::AudioContext::derefFinishedSourceNodes):
1121 (WebCore::AudioContext::derefUnfinishedSourceNodes):
1122 (WebCore::AudioContext::handleDeferredFinishDerefs):
1123 (WebCore::AudioContext::handleDirtyAudioSummingJunctions):
1124 (WebCore::AudioContext::handleDirtyAudioNodeOutputs):
1125 (WebCore::AudioContext::updateAutomaticPullNodes):
1126 (WebCore::AudioContext::processAutomaticPullNodes):
1127 * Modules/webaudio/AudioNode.cpp:
1128 (WebCore::AudioNode::updateChannelsForInputs):
1129 (WebCore::AudioNode::checkNumberOfChannelsForInput):
1130 (WebCore::AudioNode::pullInputs):
1131 (WebCore::AudioNode::inputsAreSilent):
1132 (WebCore::AudioNode::silenceOutputs):
1133 (WebCore::AudioNode::unsilenceOutputs):
1134 (WebCore::AudioNode::enableOutputsIfNecessary):
1135 (WebCore::AudioNode::disableOutputsIfNecessary):
1136 (WebCore::AudioNode::finishDeref):
1137 * Modules/webaudio/AudioNodeInput.cpp:
1138 (WebCore::AudioNodeInput::numberOfChannels):
1139 (WebCore::AudioNodeInput::sumAllConnections):
1140 * Modules/webaudio/AudioNodeOutput.cpp:
1141 (WebCore::AudioNodeOutput::propagateChannelCount):
1142 (WebCore::AudioNodeOutput::disable):
1143 (WebCore::AudioNodeOutput::enable):
1144 * Modules/webaudio/AudioParam.cpp:
1145 (WebCore::AudioParam::calculateFinalValues):
1146 * Modules/webaudio/AudioParamTimeline.cpp:
1147 (WebCore::AudioParamTimeline::insertEvent):
1148 * Modules/webaudio/AudioSummingJunction.cpp:
1149 (WebCore::AudioSummingJunction::updateRenderingState):
1150 * Modules/webaudio/MediaStreamAudioSource.cpp:
1151 (WebCore::MediaStreamAudioSource::setAudioFormat):
1152 (WebCore::MediaStreamAudioSource::consumeAudio):
1153 * Modules/webaudio/WaveShaperProcessor.cpp:
1154 (WebCore::WaveShaperProcessor::setOversample):
1155 * Modules/webdatabase/DatabaseThread.cpp:
1156 (WebCore::DatabaseThread::handlePausedQueue):
1157 (WebCore::DatabaseThread::databaseThread):
1158 * Modules/webdatabase/DatabaseTracker.cpp:
1159 (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
1160 (WebCore::DatabaseTracker::databaseNamesForOrigin):
1161 (WebCore::DatabaseTracker::getOpenDatabases):
1162 (WebCore::DatabaseTracker::usageForOrigin):
1163 (WebCore::DatabaseTracker::deleteAllDatabases):
1164 (WebCore::DatabaseTracker::deleteOrigin):
1165 (WebCore::DatabaseTracker::deleteDatabaseFile):
1166 (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
1167 (WebCore::DatabaseTracker::setDatabasesPaused):
1168 * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1169 (WebCore::SQLTransactionCoordinator::shutdown):
1170 * Modules/websockets/WebSocket.cpp:
1171 (WebCore::WebSocket::connect):
1172 * Modules/websockets/WebSocketExtensionDispatcher.cpp:
1173 (WebCore::WebSocketExtensionDispatcher::addProcessor):
1174 (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
1175 (WebCore::WebSocketExtensionDispatcher::processHeaderValue):
1176 * Modules/websockets/WebSocketHandshake.cpp:
1177 (WebCore::WebSocketHandshake::clientHandshakeMessage):
1179 2015-06-07 Darin Adler <darin@apple.com>
1181 REGRESSION (r181720): Unnecessary layout triggered any time animated GIF advances to a new frame
1182 https://bugs.webkit.org/show_bug.cgi?id=145733
1184 Reviewed by Andreas Kling.
1186 Test: fast/images/animated-gif-no-layout.html
1188 * rendering/RenderImage.cpp:
1189 (WebCore::RenderImage::styleDidChange): Correctly pass ImageSizeChangeNone in cases
1190 where we don't need to report a change in intrinsic size that happened outside the
1191 repaintOrMarkForLayout function.
1192 (WebCore::RenderImage::repaintOrMarkForLayout): Move work that should only be done
1193 when size changed inside the if statement.
1195 * testing/Internals.cpp:
1196 (WebCore::Internals::layoutCount): Added.
1197 * testing/Internals.h: Added layoutCount.
1198 * testing/Internals.idl: Ditto.
1200 2015-06-07 Michael Catanzaro <mcatanzaro@igalia.com>
1202 Fix strncpy use in WebCore::Text::formatForDebugger
1203 https://bugs.webkit.org/show_bug.cgi?id=145608
1205 Reviewed by Darin Adler.
1207 r185137 replaced a call to strncpy with a call to strlcpy, which broke the build on Linux
1208 since strlcpy does not exist there. r185148 reverted this to use strncpy again, but got the
1209 size argument off by one, "introducing" a buffer overrun. But this code has always been
1210 wrong, since it used strncpy without ensuring that the buffer is null-terminated after the
1211 call to strncpy. Fix this as well.
1214 (WebCore::Text::formatForDebugger):
1216 2015-06-07 Antti Koivisto <antti@apple.com>
1218 CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::subresourceCachePolicy const + 11
1219 https://bugs.webkit.org/show_bug.cgi?id=145736
1220 rdar://problem/21246971
1222 Reviewed by David Kilzer.
1226 * html/HTMLLinkElement.cpp:
1227 (WebCore::HTMLLinkElement::setCSSStyleSheet):
1229 Null check frame. It may be null during frame teardown.
1231 2015-06-06 Anders Carlsson <andersca@apple.com>
1233 Remove support from getting plug-in information from Carbon resources
1234 https://bugs.webkit.org/show_bug.cgi?id=145730
1236 Reviewed by Dan Bernstein.
1238 Remove a now unused function.
1240 * platform/mac/WebCoreNSStringExtras.h:
1241 * platform/mac/WebCoreNSStringExtras.mm:
1242 (stringEncodingForResource): Deleted.
1244 2015-06-06 Commit Queue <commit-queue@webkit.org>
1246 Unreviewed, rolling out r185284.
1247 https://bugs.webkit.org/show_bug.cgi?id=145723
1249 it needs some discussion before landing (Requested by dino on
1254 "[iOS] Don't force compositing layers for no-op 3D transforms
1255 on low-memory devices."
1256 https://bugs.webkit.org/show_bug.cgi?id=145719
1257 http://trac.webkit.org/changeset/185284
1259 2015-06-06 Ryosuke Niwa <rniwa@webkit.org>
1261 Typing is slow in Gmail on iPads
1262 https://bugs.webkit.org/show_bug.cgi?id=145686
1264 Reviewed by Enrica Casucci.
1266 The bug was caused by nextCandidate and nextVisuallyDistinctCandidate traversing through each character
1267 in a text node without a renderer. Skip any node that doesn't have a renderer in both of those functions
1268 and corresponding previous* functions.
1270 It's fine to skip unrendered nodes in PositionIterator because only other clients of PositionIterator
1271 are Position::upstream and Position::downstream and they don't care about un-rendered nodes either.
1273 * dom/PositionIterator.cpp:
1274 (WebCore::PositionIterator::increment):
1275 (WebCore::PositionIterator::decrement):
1276 * editing/htmlediting.cpp:
1277 (WebCore::nextVisuallyDistinctCandidate):
1278 (WebCore::previousVisuallyDistinctCandidate):
1280 2015-06-06 Mark Lam <mark.lam@apple.com>
1282 Returned Exception* values need to be initialized to nullptr when no exceptions are thrown.
1283 https://bugs.webkit.org/show_bug.cgi?id=145720
1285 Reviewed by Dan Bernstein.
1287 No new tests because this issue is already covered by the existing inspector-protocol tests.
1289 * bindings/js/WorkerScriptController.cpp:
1290 (WebCore::WorkerScriptController::evaluate):
1292 2015-06-05 Andreas Kling <akling@apple.com>
1294 [iOS] Don't force compositing layers for no-op 3D transforms on low-memory devices.
1295 <https://webkit.org/b/145719>
1296 <rdar://problem/19973042>
1298 Reviewed by Geoffrey Garen.
1300 We put elements with 3D identity transforms onto compositing layers because
1301 we anticipate that they will somehow animate in the future.
1303 This can get extremely expensive, especially on low-memory devices.
1304 This patch makes WebKit stop handing out compositing layers for this kinda thing:
1306 -webkit-transform: translate3d(0,0,0)
1308 ..on devices with 512MB or less. This dramatically improves stability on some
1311 * rendering/RenderLayerCompositor.cpp:
1312 (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
1314 2015-06-05 Matt Baker <mattbaker@apple.com>
1316 Web Inspector: "Other" time in the framerate table is often negative
1317 https://bugs.webkit.org/show_bug.cgi?id=145712
1319 Reviewed by Timothy Hatcher.
1321 The Inspector frontend flattens the timeline event tree it receives from the backend, which can contain nested
1322 paint records. The nested records represent a single paint event, but were being interpreted as two separate
1323 events for purposes of calculating total layout time. This caused the calculated "other" time to be less than
1324 it should be (and in some cases negative).
1326 * inspector/InspectorTimelineAgent.cpp:
1327 (WebCore::InspectorTimelineAgent::addRecordToTimeline):
1328 Paint records are no longer nested, we simply drop the child paint event.
1330 2015-06-05 Chris Dumez <cdumez@apple.com>
1332 Unreviewed, speculative Windows build fix after r185273.
1334 * platform/VNodeTracker.h:
1336 2015-06-05 Chris Dumez <cdumez@apple.com>
1338 [WK2][iOS] Limit the number of vnodes used by the WebContent processes
1339 https://bugs.webkit.org/show_bug.cgi?id=145672
1340 <rdar://problem/21126637>
1342 Reviewed by Antti Koivisto.
1344 Limit the number of vnodes used by the WebContent processes to reduce
1345 the chance of getting killed due to the system running out of vnodes.
1346 We sometimes see the WebContent process use up to 50% of the system's
1347 vnode limit on some tests on iOS, which seems excessive. Most vnodes
1348 are due to CachedResources which are mmap'd from the WebKit disk cache
1349 and kept alive due to caches such as the Memory Cache / PageCache.
1351 This patch adds tracking for the number of SharedBuffer objects that are
1352 backed by a CFDataRef as this should track most of the vnodes used by
1353 the process. The WebContent process registers a vnode pressure handler
1354 upon initialization (likely it already does for memory pressure
1355 handling). This handler gets called when the process uses over 15% of
1356 of system's vnode limit and the "critical" flag is set if it uses over
1357 20% of the system limit. The vnode pressure handler currently calls the
1358 memory pressure handler as freeing our caches (especially PageCache,
1359 MemoryCache) and doing a JS GC frees up vnodes.
1361 On iPhone 6 Plus, the system limit is at 3000, which would lead to the
1362 following limits being used:
1363 soft: 450 / hard: 600
1365 However, on older hardware, the system limit can be as low as 2000,
1366 which would lead to the following limits being used:
1367 soft: 300 / hard: 400
1369 vnode tracking is currently only enabled on iOS because system vnode
1370 limits are usually much higher on Mac (e.g. 473695 on Mac Pro, 9984
1371 on a 2011 MacBook Air) and we normally don't get killed.
1373 * WebCore.xcodeproj/project.pbxproj:
1375 Add new files to the XCode project.
1377 * platform/SharedBuffer.h:
1379 Add a VNodeTracker::Token member next to the CFDataRef member that we
1380 initialize if the SharedBuffer is constructed from a CFDataRef.
1382 * platform/VNodeTracker.cpp: Added.
1383 (WebCore::VNodeTracker::singleton):
1384 (WebCore::VNodeTracker::VNodeTracker):
1385 (WebCore::VNodeTracker::checkPressureState):
1386 (WebCore::VNodeTracker::pressureWarningTimerFired):
1387 (WebCore::VNodeTracker::nextPressureWarningInterval):
1388 (WebCore::VNodeTracker::platformInitialize):
1389 * platform/VNodeTracker.h: Added.
1390 (WebCore::VNodeTracker::setPressureHandler):
1392 Add a new VNodeTracker singleton to keep track the number of vnodes
1393 used by the process since the system does not issue warnings before
1394 reaching its vnode limit. Call sites should request Tokens for
1395 every vnode they use for tracking purposes. Each process can then
1396 set a vnode pressure handler function that will be called when the
1397 process is over the designated limits.
1399 * platform/cf/SharedBufferCF.cpp:
1400 (WebCore::SharedBuffer::SharedBuffer):
1402 Take a VNodeToken from the VNodeTracker when constructing the
1403 SharedBuffer from a CFDataRef as these usually use mmap.
1405 * platform/cocoa/VNodeTrackerCocoa.cpp: Added.
1406 (WebCore::VNodeTracker::platformInitialize):
1408 Get the system's vnode limit and uses 15% of that value as soft
1409 limit for the process and 20% of that value as hard limit.
1411 2015-06-05 Dean Jackson <dino@apple.com>
1413 Lingering checkbox animations when rapidly switching between views on WK1
1414 https://bugs.webkit.org/show_bug.cgi?id=145715
1415 <rdar://problem/17381121>
1417 Reviewed by Simon Fraser.
1419 On WK1, the NSView we use for NSButtonCells is parented in the ScrollView.
1420 Our checkbox and radiobutton animations cause AppKit to create a CALayer which
1421 is parented into that view. As we render the animations, we see the CALayer getting
1424 The fix was to use an unparented layer on WK1 when drawing these controls, the same
1425 way WK2 does. This technique may apply to all controls, but restricting it
1426 to just the buttons at the moment is less risky.
1428 This only happens during the swap between a checked and non-checked state,
1429 and we have no way to test it :(
1431 * platform/mac/ThemeMac.h: New optional parameter to ensuredView.
1432 * platform/mac/ThemeMac.mm:
1433 (WebCore::paintToggleButton): If we're on Yosemite or highter, use an unparented view.
1434 (WebCore::ThemeMac::ensuredView): Return either a parented or unparented view.
1436 2015-06-05 Matt Rajca <mrajca@apple.com>
1438 MediaSessions should keep track of their participating media elements.
1439 https://bugs.webkit.org/show_bug.cgi?id=145703
1441 Reviewed by Eric Carlson.
1443 * Modules/mediasession/MediaSession.cpp:
1444 (WebCore::MediaSession::addMediaElement): Add the given media element to the media session.
1445 (WebCore::MediaSession::removeMediaElement): Remove the given media element from the media session.
1446 (WebCore::MediaSession::activeParticipatingElements): Dynamically build a vector of actively-playing media
1448 * Modules/mediasession/MediaSession.h:
1449 * html/HTMLMediaElement.cpp:
1450 (WebCore::HTMLMediaElement::~HTMLMediaElement): Ensure the element is removed from its media session.
1451 (WebCore::HTMLMediaElement::setSession): Update sessions' references to their media elements.
1453 2015-06-05 Chris Dumez <cdumez@apple.com>
1455 Regression(r176212): Broke app switching on iCloud.com
1456 https://bugs.webkit.org/show_bug.cgi?id=145708
1457 <rdar://problem/21235277>
1459 Reviewed by Simon Fraser.
1461 Roll out r176212 and follow-up fixes for now, to fix iCloud.com.
1462 We can reconsider later how to do this in a safer way.
1464 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1465 (WebCore::JSCSSStyleDeclaration::putDelegate): Deleted.
1466 (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Deleted.
1469 * dom/ElementRareData.cpp:
1470 * dom/ElementRareData.h:
1471 (WebCore::ElementRareData::ElementRareData):
1472 (WebCore::ElementRareData::~ElementRareData): Deleted.
1474 (WebCore::Node::materializeRareData):
1475 * html/HTMLCanvasElement.cpp:
1476 (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged): Deleted.
1477 * page/DOMTimer.cpp:
1478 (WebCore::DOMTimerFireState::scriptMadeNonUserObservableChanges): Deleted.
1479 (WebCore::DOMTimerFireState::scriptMadeUserObservableChanges): Deleted.
1480 (WebCore::NestedTimersMap::instanceForContext): Deleted.
1481 (WebCore::DOMTimer::install): Deleted.
1482 (WebCore::DOMTimer::fired): Deleted.
1483 (WebCore::DOMTimer::alignedFireTime): Deleted.
1484 (WebCore::DOMTimer::activeDOMObjectName): Deleted.
1486 * page/FrameView.cpp:
1487 (WebCore::FrameView::reset): Deleted.
1488 (WebCore::FrameView::viewportContentsChanged): Deleted.
1489 (WebCore::FrameView::autoSizeIfEnabled): Deleted.
1492 2015-06-05 Myles C. Maxfield <mmaxfield@apple.com>
1494 [iOS] Emoji overlap preceeding lines
1495 https://bugs.webkit.org/show_bug.cgi?id=145678
1496 <rdar://problem/10684914>
1498 Reviewed by Enrica Casucci.
1500 In WebKit, we first lay out lines, and then we lay out text inside those lines. Text is vertically centered in
1501 its containing line. If the author has not specified a particular line-height, the height of a line comes from
1502 the font metrics for the primary font of the line.
1504 In iOS, we were specifically hardcoding the line height metric of Apple Color Emoji to be 0. This means that,
1505 if Apple Color Emoji is the primary font for a line, and an explicit line-height was not specified, the lines
1506 are laid out with 0 height. Then, when we vertically center the text inside the line, the top half of the text
1507 overlaps the preceeding line.
1509 I'm not sure exactly why were were hardcoding this value to 0, as it is surely wrong. I'm going to ask Enrica
1510 to review this patch; hopefully she knows the answer.
1512 Test: fast/text/emoji.html
1514 * platform/graphics/cocoa/FontCocoa.mm:
1515 (WebCore::Font::platformInit):
1517 2015-06-05 Alex Christensen <achristensen@webkit.org>
1519 [Web Timing] Use new SPI to enable data collection.
1520 https://bugs.webkit.org/show_bug.cgi?id=145650
1521 rdar://problem/21203358
1523 Reviewed by Chris Dumez.
1525 * platform/network/cf/ResourceHandleCFNet.cpp:
1526 (WebCore::ResourceHandle::createCFURLConnection):
1527 Gather web timing data on iOS.
1528 * platform/network/mac/ResourceHandleMac.mm:
1529 (WebCore::ResourceHandle::createNSURLConnection):
1530 (WebCore::ResourceHandle::setCollectsTimingData):
1531 Gather web timing data on Mac.
1533 2015-06-05 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1535 [Streams API] ReadableStream should store callbacks as a Deque
1536 https://bugs.webkit.org/show_bug.cgi?id=145641
1538 Reviewed by Darin Adler.
1540 Covered by existing tests.
1542 * Modules/streams/ReadableStream.cpp:
1543 (WebCore::ReadableStream::resolveReadCallback): Use of Deque.takeFirst
1544 * Modules/streams/ReadableStream.h: Using Deque in lieu of Vector for storing callbacks.
1546 2015-06-05 Mark Lam <mark.lam@apple.com>
1548 finally blocks should not set the exception stack trace when re-throwing the exception.
1549 https://bugs.webkit.org/show_bug.cgi?id=145525
1551 Reviewed by Geoffrey Garen.
1553 Update to use the new JSC::Exception object.
1555 Test: inspector/debugger/break-on-exceptions.html
1557 * ForwardingHeaders/runtime/Exception.h: Added.
1558 * bindings/js/JSCallbackData.cpp:
1559 (WebCore::JSCallbackData::invokeCallback):
1560 * bindings/js/JSCustomXPathNSResolver.cpp:
1561 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1562 * bindings/js/JSDOMBinding.cpp:
1564 (WebCore::reportException):
1565 (WebCore::reportCurrentException):
1566 * bindings/js/JSDOMBinding.h:
1567 * bindings/js/JSErrorHandler.cpp:
1568 (WebCore::JSErrorHandler::handleEvent):
1569 * bindings/js/JSEventListener.cpp:
1570 (WebCore::JSEventListener::handleEvent):
1571 * bindings/js/JSMainThreadExecState.cpp:
1572 (WebCore::JSMainThreadExecState::didLeaveScriptContext):
1573 (WebCore::functionCallHandlerFromAnyThread):
1574 (WebCore::evaluateHandlerFromAnyThread):
1575 * bindings/js/JSMainThreadExecState.h:
1576 (WebCore::JSMainThreadExecState::currentState):
1577 (WebCore::JSMainThreadExecState::call):
1578 (WebCore::JSMainThreadExecState::evaluate):
1579 (WebCore::JSMainThreadExecState::runTask):
1581 * bindings/js/JSMediaDevicesCustom.cpp:
1582 (WebCore::JSMediaDevices::getUserMedia):
1583 - Fixed a bug where the exception was not cleared before entering the VM to
1586 * bindings/js/JSMutationCallback.cpp:
1587 (WebCore::JSMutationCallback::call):
1588 * bindings/js/ReadableJSStream.cpp:
1589 (WebCore::getPropertyFromObject):
1590 (WebCore::callFunction):
1591 (WebCore::ReadableJSStream::Source::start):
1592 * bindings/js/ScheduledAction.cpp:
1593 (WebCore::ScheduledAction::executeFunctionInContext):
1594 * bindings/js/ScriptController.cpp:
1595 (WebCore::ScriptController::evaluateInWorld):
1596 * bindings/js/SerializedScriptValue.cpp:
1597 (WebCore::SerializedScriptValue::create):
1598 (WebCore::SerializedScriptValue::deserialize):
1599 * bindings/js/WorkerScriptController.cpp:
1600 (WebCore::WorkerScriptController::evaluate):
1601 (WebCore::WorkerScriptController::setException):
1602 (WebCore::WorkerScriptController::scheduleExecutionTermination):
1603 * bindings/js/WorkerScriptController.h:
1604 (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
1605 * bindings/js/WorkerScriptDebugServer.cpp:
1606 (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
1607 (WebCore::WorkerScriptDebugServer::reportException):
1608 * bindings/js/WorkerScriptDebugServer.h:
1609 * bindings/objc/WebScriptObject.mm:
1610 (WebCore::createJSWrapper):
1611 (WebCore::addExceptionToConsole):
1612 (-[WebScriptObject callWebScriptMethod:withArguments:]):
1613 (-[WebScriptObject evaluateWebScript:]):
1614 - Changed to call a version of JSMainThreadExecState::evaluate() that provides
1615 a stub returnedException because evaluateWebScript: doesn't need the exception.
1617 * inspector/PageScriptDebugServer.cpp:
1618 (WebCore::PageScriptDebugServer::isContentScript):
1619 (WebCore::PageScriptDebugServer::reportException):
1620 * inspector/PageScriptDebugServer.h:
1621 * workers/WorkerGlobalScope.cpp:
1622 (WebCore::WorkerGlobalScope::importScripts):
1624 2015-06-05 Eric Carlson <eric.carlson@apple.com>
1626 Layout tests fullscreen/video-controls-drag.html and media/video-fullscreeen-only-controls.html
1628 https://bugs.webkit.org/show_bug.cgi?id=145675
1630 Reviewed by Dean Jackson.
1632 No new tests, changes covered by existing tests.
1634 * Modules/mediacontrols/mediaControlsApple.js:
1635 (Controller.prototype.updateControls): Use shouldHaveControls() to test if controls should
1637 (Controller.prototype.handleWrapperMouseMove): Don't return early when in fullscreen.
1638 (Controller.prototype.updateFullscreenButtons): Drive-by fix: always show the (exit) fullscreen
1639 button when in fullscreen.
1642 2015-06-04 David Hyatt <hyatt@apple.com>
1644 Underlines too close in vertical Chinese text.
1645 https://bugs.webkit.org/show_bug.cgi?id=145651
1646 <rdar://problem/11105920>
1648 Reviewed by Simon Fraser.
1650 Added fast/text/decorations-vertical-underline.html
1652 * style/InlineTextBoxStyle.cpp:
1653 (WebCore::computeUnderlineOffset):
1654 Make sure the to map text-underline-position: auto to under when a line has an ideographic baseline.
1656 2015-06-05 Carlos Alberto Lopez Perez <clopez@igalia.com>
1658 [GTK] [Wayland] The MiniBrowser crashes inside Weston.
1659 https://bugs.webkit.org/show_bug.cgi?id=145645
1661 Reviewed by Žan Doberšek.
1663 No new tests, no behavior changes.
1665 The issue was caused because we were not properly initializing the
1666 Wayland display, and we were returning a nullptr in PlatformDisplayWayland::create(),
1667 therefore a crash was happening on WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1136
1668 <http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp?rev=185245#L1136>
1670 * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1671 (WebCore::PlatformDisplayWayland::create): When connecting to the Wayland
1672 server socket we should use the default value (NULL). This allows the value
1673 to be overwritten at run-time by the environment variables WAYLAND_DISPLAY or
1674 WAYLAND_SOCKET that the Wayland compositor should define. Also add a couple
1675 of warnings to get information about what is going wrong when we fail to
1676 initialize the display instead of just crashing without giving more information.
1677 * platform/graphics/wayland/PlatformDisplayWayland.h:
1678 (WebCore::PlatformDisplayWayland::isInitialized): Not longer check for m_webkitgtk
1679 to signal that the display is ready because the UIProcess embedded Wayland
1680 subcompositer is still not implemented. Added a FIXME note about it.
1682 2015-06-05 Dean Jackson <dino@apple.com>
1684 [Mac] Popup focus is cut off
1685 https://bugs.webkit.org/show_bug.cgi?id=145688
1686 <rdar://problem/18313375>
1688 Reviewed by Brent Fulgham.
1690 Yosemite increased the width of focus rings, causing
1691 some ugly clipping on Yosemite. The solution was to
1692 not set a clip (which was code introduced for Leopard).
1694 Test: fast/forms/select-element-focus-ring.html
1696 * rendering/RenderThemeMac.mm:
1697 (WebCore::RenderThemeMac::paintMenuList): Don't clip on Yosemite.
1699 2015-06-05 Manuel Rego Casasnovas <rego@igalia.com>
1701 [CSS Grid Layout] Support dots sequences in grid-template-areas
1702 https://bugs.webkit.org/show_bug.cgi?id=145693
1704 Reviewed by Sergio Villar Senin.
1706 The CSS WG agreed to consider a sequence of "." characters a single null
1707 cell token for grid-template-areas. That way authors can match the
1708 number of dots to the width of the column.
1710 For more information see:
1711 https://lists.w3.org/Archives/Public/www-style/2015May/0175.html
1713 Added new test cases to check the new behavior.
1715 * css/CSSParser.cpp:
1716 (WebCore::containsOnlyDots): New helper function to check that the grid
1717 area name is composed by only dots.
1718 (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
1719 function to look for unnamed areas.
1721 2015-06-04 Joonghun Park <jh718.park@samsung.com>
1723 Purge PassRefPtr create() factory functions in WebCore/css
1724 https://bugs.webkit.org/show_bug.cgi?id=144905
1726 Reviewed by Darin Adler.
1728 Return Ref instead of PassRefPtr in create() factory functions in css,
1729 because the factory can't return null.
1731 No new tests, no new behaviours.
1733 * css/BasicShapeFunctions.cpp:
1734 (WebCore::valueForCenterCoordinate):
1735 (WebCore::basicShapeRadiusToCSSValue):
1736 (WebCore::valueForBasicShape):
1737 * css/BasicShapeFunctions.h:
1738 * css/CSSBasicShapes.h:
1739 * css/CSSCalculationValue.cpp:
1740 (WebCore::createCSS):
1741 (WebCore::CSSCalcValue::create):
1742 * css/CSSCalculationValue.h:
1743 * css/CSSCharsetRule.h:
1744 * css/CSSComputedStyleDeclaration.cpp:
1745 (WebCore::valueForNinePieceImageSlice):
1746 (WebCore::valueForNinePieceImageQuad):
1747 (WebCore::zoomAdjustedPixelValue):
1748 (WebCore::zoomAdjustedNumberValue):
1749 (WebCore::zoomAdjustedPixelValueForLength):
1750 (WebCore::valueForReflection):
1751 (WebCore::createPositionListForLayer):
1752 (WebCore::positionOffsetValue):
1753 (WebCore::percentageOrZoomAdjustedValue):
1754 (WebCore::autoOrZoomAdjustedValue):
1755 (WebCore::getBorderRadiusCornerValues):
1756 (WebCore::getBorderRadiusCornerValue):
1757 (WebCore::getBorderRadiusShorthandValue):
1758 (WebCore::matrixTransformValue):
1759 (WebCore::computedTransform):
1760 (WebCore::adjustLengthForZoom):
1761 (WebCore::ComputedStyleExtractor::valueForShadow):
1762 (WebCore::ComputedStyleExtractor::valueForFilter):
1763 (WebCore::specifiedValueForGridTrackBreadth):
1764 (WebCore::specifiedValueForGridTrackSize):
1765 (WebCore::valueForGridTrackList):
1766 (WebCore::scrollSnapDestination):
1767 (WebCore::scrollSnapPoints):
1768 (WebCore::scrollSnapCoordinates):
1769 (WebCore::createAnimationTriggerValue):
1770 (WebCore::getAnimationTriggerValue):
1771 (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
1772 (WebCore::fillSizeToCSSValue):
1773 (WebCore::lineHeightFromStyle):
1774 (WebCore::fontSizeFromStyle):
1775 (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
1776 (WebCore::shapePropertyValue):
1777 (WebCore::ComputedStyleExtractor::propertyValue):
1778 * css/CSSComputedStyleDeclaration.h:
1779 * css/CSSFontFace.h:
1780 (WebCore::CSSFontFace::create):
1781 * css/CSSFontFaceLoadEvent.h:
1782 * css/CSSFontFaceRule.h:
1783 * css/CSSGrammar.y.in:
1784 * css/CSSGridLineNamesValue.cpp:
1785 (WebCore::CSSGridLineNamesValue::cloneForCSSOM):
1786 * css/CSSGridLineNamesValue.h:
1787 (WebCore::CSSGridLineNamesValue::create):
1788 * css/CSSImportRule.h:
1789 * css/CSSKeyframeRule.h:
1790 (WebCore::StyleKeyframe::create):
1791 * css/CSSKeyframesRule.h:
1792 * css/CSSMediaRule.h:
1793 * css/CSSPageRule.h:
1794 * css/CSSParser.cpp:
1795 (WebCore::CSSParser::parseGridLineNames):
1796 (WebCore::CSSParser::parseDashboardRegions):
1797 (WebCore::CSSParser::parseClipShape):
1798 (WebCore::CSSParser::parseBasicShape):
1799 (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
1800 (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
1802 (WebCore::CSSParser::ValueWithCalculation::calculation):
1803 * css/CSSPrimitiveValue.cpp:
1804 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1805 (WebCore::CSSPrimitiveValue::init):
1806 (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1807 * css/CSSPrimitiveValue.h:
1808 (WebCore::CSSPrimitiveValue::create):
1809 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1810 * css/CSSPropertySourceData.h:
1811 (WebCore::CSSStyleSourceData::create):
1812 (WebCore::CSSRuleSourceData::create):
1813 (WebCore::CSSRuleSourceData::createUnknown):
1814 * css/CSSRuleList.h:
1815 * css/CSSSegmentedFontFace.h:
1816 (WebCore::CSSSegmentedFontFace::create):
1817 * css/CSSSelector.cpp:
1818 (WebCore::CSSSelector::createRareData):
1819 * css/CSSSelector.h:
1820 (WebCore::CSSSelector::RareData::create):
1821 * css/CSSStyleRule.h:
1822 * css/CSSSupportsRule.h:
1823 * css/CSSValuePool.h:
1824 (WebCore::CSSValuePool::createValue):
1825 * css/FontLoader.cpp:
1826 (WebCore::LoadFontCallback::create):
1827 * css/LengthRepeat.h:
1828 (WebCore::LengthRepeat::create):
1829 (WebCore::LengthRepeat::cloneForCSSOM):
1831 (WebCore::MediaQuerySet::create):
1832 (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
1833 (WebCore::MediaList::create):
1834 * css/MediaQueryList.cpp:
1835 (WebCore::MediaQueryList::create):
1836 * css/MediaQueryList.h:
1837 * css/MediaQueryMatcher.h:
1838 (WebCore::MediaQueryMatcher::create):
1840 (WebCore::Pair::create):
1842 (WebCore::Rect::create):
1843 (WebCore::Rect::cloneForCSSOM):
1844 (WebCore::Quad::create):
1845 (WebCore::Quad::cloneForCSSOM):
1846 * css/SVGCSSComputedStyleDeclaration.cpp:
1847 (WebCore::paintOrder):
1848 (WebCore::ComputedStyleExtractor::svgPropertyValue):
1850 (WebCore::StyleMedia::create):
1851 * css/StyleResolver.cpp:
1852 (WebCore::StyleResolver::keyframeStylesForAnimation):
1853 * css/StyleSheetList.h:
1854 (WebCore::StyleSheetList::create):
1855 * css/ViewportStyleResolver.h:
1856 (WebCore::ViewportStyleResolver::create):
1857 * css/WebKitCSSMatrix.h:
1858 * css/WebKitCSSRegionRule.h:
1859 * css/WebKitCSSViewportRule.h:
1860 * page/animation/CSSPropertyAnimation.cpp:
1861 (WebCore::blendFilter):
1862 * rendering/style/RenderStyle.h:
1863 (WebCore::adjustFloatForAbsoluteZoom):
1864 * rendering/style/StyleInheritedData.h:
1866 2015-06-04 Benjamin Poulain <bpoulain@apple.com>
1868 The last 2 merged DFAs are not minimized by DFACombiner
1870 * contentextensions/DFACombiner.cpp:
1871 (WebCore::ContentExtensions::DFACombiner::combineDFAs):
1872 I introduced a bug when I made minimization conditional: the last merge
1873 does not minimize if we do not reach the minimum size.
1875 2015-06-04 Brent Fulgham <bfulgham@apple.com>
1877 Latching algorithm in findEnclosingOverflowScroll is broken
1878 https://bugs.webkit.org/show_bug.cgi?id=145642
1879 <rdar://problem/21242308>
1881 Reviewed by Simon Fraser.
1883 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
1885 * page/mac/EventHandlerMac.mm:
1886 (WebCore::scrollableAreaForBox): Added helper function.
1887 (WebCore::findEnclosingScrollableContainer): Renamed from findEnclosingOverflowScroll.
1888 Only identify something as our scroll element if it can be scrolled in either
1889 axis of the gesture's motion.
1890 (WebCore::scrollableAreaForContainerNode): Use new helper function.
1891 (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
1892 name, and pass horizontal and vertical deltas.
1893 (WebCore::findEnclosingOverflowScroll): Deleted.
1895 2015-06-04 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1897 REGRESSION(r185091): Crash happens on indexdb tests
1898 https://bugs.webkit.org/show_bug.cgi?id=145549
1900 Reviewed by Darin Adler.
1902 * Modules/indexeddb/IDBDatabaseError.h:
1903 (WebCore::IDBDatabaseError::create): Revert Ref usage of IDBDatabaseError::create().
1905 2015-06-04 Simon Fraser <simon.fraser@apple.com>
1907 Crash in EventDispatcher::dispatchEvent entering a location on Google Maps
1908 https://bugs.webkit.org/show_bug.cgi?id=145677
1909 rdar://problem/20698280
1911 Reviewed by Dean Jackson.
1913 If a transition is running on a pseudo-element, and the host element is removed
1914 from the DOM just as the transition ends, and there is a transition event listener,
1915 then we'd crash with a null dereference in event dispatch code.
1917 AnimationController tries to clean up running animations when renderers are destroyed,
1918 but omitted to remove the element from two vectors that store element references.
1919 Elements are only added to these vectors briefly on animation end, before firing
1920 events, but failure to remove the vector entries could result in attempting
1921 to fire an event on a pseudo-element with no host element.
1923 Also convert EventDispatcher code to be more robust to potentially null event
1924 targets, since it's not clear that eventTargetRespectingTargetRules() can always
1925 manage to return a non-null node.
1927 Hard to make a test because this is timing sensitive.
1929 * dom/EventDispatcher.cpp:
1930 (WebCore::eventTargetRespectingTargetRules):
1931 (WebCore::EventDispatcher::dispatchScopedEvent):
1932 (WebCore::EventDispatcher::dispatchEvent):
1933 (WebCore::EventPath::EventPath):
1934 * page/animation/AnimationController.cpp:
1935 (WebCore::AnimationControllerPrivate::clear):
1937 2015-06-04 Hunseop Jeong <hs85.jeong@samsung.com>
1939 Replace 0 with nullptr in WebCore/Page.
1940 https://bugs.webkit.org/show_bug.cgi?id=145631
1942 Reviewed by Darin Adler.
1944 No new tests, no behavior changes.
1946 * page/AutoscrollController.cpp:
1947 (WebCore::AutoscrollController::AutoscrollController):
1948 (WebCore::AutoscrollController::stopAutoscrollTimer):
1949 * page/ContentSecurityPolicy.cpp:
1950 (WebCore::CSPSourceList::parseSource):
1951 * page/ContentSecurityPolicy.h:
1952 * page/ContextMenuController.cpp:
1953 (WebCore::ContextMenuController::clearContextMenu):
1954 * page/DOMSelection.cpp:
1955 (WebCore::DOMSelection::clearTreeScope):
1956 * page/DOMWindow.cpp:
1957 (WebCore::DOMWindow::resetDOMWindowProperties):
1958 (WebCore::DOMWindow::localStorage):
1959 (WebCore::DOMWindow::focus):
1961 * page/DOMWindowExtension.cpp:
1962 (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
1963 (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
1964 * page/DOMWindowProperty.cpp:
1965 (WebCore::DOMWindowProperty::DOMWindowProperty):
1966 (WebCore::DOMWindowProperty::~DOMWindowProperty):
1967 (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
1968 (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
1969 (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
1970 * page/DragController.cpp:
1971 (WebCore::DragController::dragEnded):
1972 (WebCore::DragController::performDragOperation):
1973 (WebCore::DragController::tryDocumentDrag):
1974 (WebCore::DragController::concludeEditDrag):
1975 (WebCore::DragController::startDrag):
1976 * page/EventHandler.cpp:
1977 (WebCore::EventHandler::EventHandler):
1978 (WebCore::EventHandler::resizeLayerDestroyed):
1979 (WebCore::EventHandler::freeDataTransfer):
1980 (WebCore::EventHandler::dragSourceEndedAt):
1981 (WebCore::EventHandler::handleDrag):
1982 * page/EventHandler.h:
1983 * page/FocusController.cpp:
1984 (WebCore::FocusController::advanceFocusInDocumentOrder):
1986 (WebCore::Frame::~Frame):
1987 (WebCore::Frame::searchForLabelsBeforeElement):
1988 (WebCore::Frame::willDetachPage):
1989 (WebCore::Frame::createView):
1991 (WebCore::Frame::detachFromPage):
1992 * page/FrameDestructionObserver.cpp:
1993 (WebCore::FrameDestructionObserver::FrameDestructionObserver):
1994 (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
1995 (WebCore::FrameDestructionObserver::frameDestroyed):
1996 * page/FrameTree.cpp:
1997 (WebCore::FrameTree::~FrameTree):
1998 (WebCore::FrameTree::removeChild):
2000 (WebCore::FrameTree::FrameTree):
2001 (WebCore::FrameTree::detachFromParent):
2003 (WebCore::History::History):
2005 (WebCore::Page::Page):
2006 (WebCore::Page::~Page):
2007 (WebCore::Page::findStringMatchingRanges):
2008 * page/PageGroup.cpp:
2009 * page/Performance.cpp:
2010 (WebCore::Performance::Performance):
2011 * page/PointerLockController.cpp:
2012 (WebCore::PointerLockController::didLosePointerLock):
2013 (WebCore::PointerLockController::clearElement):
2014 * page/SecurityOrigin.h:
2015 (WebCore::SecurityOrigin::canAccessDatabase):
2016 * page/Settings.cpp:
2017 (WebCore::Settings::Settings):
2018 * page/SpatialNavigation.cpp:
2019 (WebCore::FocusCandidate::FocusCandidate):
2020 * page/SpatialNavigation.h:
2021 (WebCore::FocusCandidate::FocusCandidate):
2022 * page/scrolling/ScrollingTreeNode.cpp:
2023 (WebCore::ScrollingTreeNode::ScrollingTreeNode):
2024 * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
2025 (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
2027 2015-06-04 Benjamin Poulain <bpoulain@apple.com>
2029 Combine tiny DFAs into slightly larger ones
2030 https://bugs.webkit.org/show_bug.cgi?id=145572
2032 Reviewed by Alex Christensen.
2034 This patch changes the ContentExtensions compiler to combine tiny DFA
2035 until they reach a minimum size.
2037 The main tool introduced here is DFAMerger. It combines 2 DFAs into
2038 a single DFA that represent the union of the two machines.
2039 That is done by a simple subset construction on the "name" of the nodes
2042 Since we only merge 2 machines, and they are both deterministic, we know that
2043 we can only be in one state of each machine, or a state in one machine without
2044 equivalent in the other machine.
2045 We exploit that to identify the mapping between nodes. To identify a node in
2046 the new machine from nodes in the original machines, we just concatenate the node
2047 IDs into a single 64 bits number. If there is no node in one of the machine, we
2050 The current algorithm does not have any subgraph pruning, machines grow very very
2051 quickly. Because of that, we only merge very small DFAs at the moment.
2053 Test: http/tests/contentextensions/filters-with-quantifiers-combined.html
2055 * WebCore.xcodeproj/project.pbxproj:
2056 * contentextensions/ContentExtensionCompiler.cpp:
2057 (WebCore::ContentExtensions::compileRuleList):
2058 * contentextensions/ContentExtensionsDebugging.h:
2059 * contentextensions/DFA.cpp:
2060 (WebCore::ContentExtensions::DFA::graphSize):
2061 (WebCore::ContentExtensions::DFA::debugPrintDot):
2062 * contentextensions/DFA.h:
2063 * contentextensions/DFACombiner.cpp: Added.
2064 (WebCore::ContentExtensions::DFAMerger::DFAMerger):
2065 (WebCore::ContentExtensions::DFAMerger::merge):
2066 (WebCore::ContentExtensions::DFAMerger::signatureForIndices):
2067 (WebCore::ContentExtensions::DFAMerger::extractIndexA):
2068 (WebCore::ContentExtensions::DFAMerger::extractIndexB):
2069 (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
2070 (WebCore::ContentExtensions::DFAMerger::setHalfSignature):
2071 (WebCore::ContentExtensions::DFAMerger::populateTransitions):
2072 (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions):
2073 (WebCore::ContentExtensions::DFAMerger::createTransitions):
2074 (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded):
2075 (WebCore::ContentExtensions::DFACombiner::combineDFAs):
2076 * contentextensions/DFACombiner.h: Copied from Source/WebCore/contentextensions/DFA.h.
2077 (WebCore::ContentExtensions::DFACombiner::addDFA):
2079 2015-06-04 Matt Rajca <mrajca@apple.com>
2081 Rename MediaSessionManager to PlatformMediaSessionManager for consistency with PlatformMediaSession.
2082 https://bugs.webkit.org/show_bug.cgi?id=145648
2084 Reviewed by Eric Carlson.
2086 * WebCore.vcxproj/WebCore.vcxproj:
2087 * WebCore.vcxproj/WebCore.vcxproj.filters:
2088 * WebCore.xcodeproj/project.pbxproj:
2089 * html/HTMLMediaElement.cpp:
2090 * html/MediaElementSession.cpp:
2091 (WebCore::MediaElementSession::effectivePreloadForElement):
2092 (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
2093 * platform/audio/PlatformMediaSession.cpp:
2094 (WebCore::PlatformMediaSession::PlatformMediaSession):
2095 (WebCore::PlatformMediaSession::~PlatformMediaSession):
2096 (WebCore::PlatformMediaSession::clientWillBeginPlayback):
2097 (WebCore::PlatformMediaSession::clientWillPausePlayback):
2098 (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
2099 (WebCore::PlatformMediaSession::updateClientDataBuffering):
2100 * platform/audio/PlatformMediaSessionManager.cpp: Renamed from Source/WebCore/platform/audio/MediaSessionManager.cpp.
2101 (WebCore::PlatformMediaSessionManager::sharedManager):
2102 (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
2103 (WebCore::PlatformMediaSessionManager::resetRestrictions):
2104 (WebCore::PlatformMediaSessionManager::has):
2105 (WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
2106 (WebCore::PlatformMediaSessionManager::count):
2107 (WebCore::PlatformMediaSessionManager::beginInterruption):
2108 (WebCore::PlatformMediaSessionManager::endInterruption):
2109 (WebCore::PlatformMediaSessionManager::addSession):
2110 (WebCore::PlatformMediaSessionManager::removeSession):
2111 (WebCore::PlatformMediaSessionManager::addRestriction):
2112 (WebCore::PlatformMediaSessionManager::removeRestriction):
2113 (WebCore::PlatformMediaSessionManager::restrictions):
2114 (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
2115 (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
2116 (WebCore::PlatformMediaSessionManager::setCurrentSession):
2117 (WebCore::PlatformMediaSessionManager::currentSession):
2118 (WebCore::PlatformMediaSessionManager::sessionRestrictsInlineVideoPlayback):
2119 (WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):
2120 (WebCore::PlatformMediaSessionManager::applicationWillEnterBackground):
2121 (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground):
2122 (WebCore::PlatformMediaSessionManager::updateSessionState):
2123 (WebCore::PlatformMediaSessionManager::didReceiveRemoteControlCommand):
2124 (WebCore::PlatformMediaSessionManager::systemWillSleep):
2125 (WebCore::PlatformMediaSessionManager::systemDidWake):
2126 (WebCore::PlatformMediaSessionManager::audioOutputDeviceChanged):
2127 * platform/audio/PlatformMediaSessionManager.h: Renamed from Source/WebCore/platform/audio/MediaSessionManager.h.
2128 (WebCore::PlatformMediaSessionManager::~PlatformMediaSessionManager):
2129 (WebCore::PlatformMediaSessionManager::configureWireLessTargetMonitoring):
2130 (WebCore::PlatformMediaSessionManager::hasWirelessTargetsAvailable):
2131 (WebCore::PlatformMediaSessionManager::sessions):
2132 * platform/audio/mac/AudioDestinationMac.cpp:
2133 * platform/audio/mac/MediaSessionManagerMac.cpp:
2134 (PlatformMediaSessionManager::updateSessionState):
2135 (MediaSessionManager::updateSessionState): Deleted.
2136 * testing/Internals.cpp:
2138 2015-06-04 Eric Carlson <eric.carlson@apple.com>
2140 [Mac] Don't show default controls after playing to wireless target, again
2141 https://bugs.webkit.org/show_bug.cgi?id=145620
2142 <rdar://problem/21145806>
2144 Reviewed by Dean Jackson.
2146 Follow up to fix two tests broken by r185207.
2148 * Modules/mediacontrols/mediaControlsApple.js:
2149 (Controller.prototype.updateControls): Always show controls when the video element
2150 is the fullscreen element because custom controls aren't possible.
2152 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2154 [Cocoa] Add ASSERT to FontPlatformData::ctFont()
2155 https://bugs.webkit.org/show_bug.cgi?id=145659
2157 Reviewed by Dean Jackson.
2159 The new ASSERT needs to be guarded with CORETEXT_WEB_FONTS, which is defined in FontCustomPlatformData.h,
2160 and is not accessible to FontPlatformData. Therefore, I've moved the definition into TextFlags.h, which
2163 No new tests because there is no behavior change.
2165 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2166 (WebCore::FontPlatformData::ctFont): Add the ASSERT.
2167 * platform/graphics/mac/FontCustomPlatformData.h: Move the CORETEXT_WEB_FONTS preprocessor
2169 * platform/text/TextFlags.h: ... to here.
2171 2015-06-04 Commit Queue <commit-queue@webkit.org>
2173 Unreviewed, rolling out r185208.
2174 https://bugs.webkit.org/show_bug.cgi?id=145655
2176 platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-
2177 latched-select.html (Requested by shallawa on #webkit).
2181 "Latching algorithm in findEnclosingOverflowScroll is broken"
2182 https://bugs.webkit.org/show_bug.cgi?id=145642
2183 http://trac.webkit.org/changeset/185208
2185 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2187 [Cocoa] Remove unnecessary code from FontPlatformData::ctFont()
2188 https://bugs.webkit.org/show_bug.cgi?id=145652
2190 Hoefler Text Italic no longer has initial and final swashes by default, so there
2191 is no reason to explicitly disable them.
2193 Reviewed by Andreas Kling.
2195 No new tests because there is no behavior change.
2197 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2198 (WebCore::FontPlatformData::ctFont):
2199 (WebCore::createFeatureSettingDictionary): Deleted.
2200 (WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Deleted.
2202 2015-06-04 Brent Fulgham <bfulgham@apple.com>
2204 Latching algorithm in findEnclosingOverflowScroll is broken
2205 https://bugs.webkit.org/show_bug.cgi?id=145642
2206 <rdar://problem/21242308>
2208 Reviewed by Simon Fraser.
2210 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
2212 * page/mac/EventHandlerMac.mm:
2213 (WebCore::findEnclosingOverflowScrollForDominantDirection): Renamed from
2214 'findEnclosingOverflowScroll'. Only identify element as our overflow
2215 scroll element if it can be scrolled in either axis of the gesture's
2217 (WebCore::scrolledToEdgeInDominantDirection): Renamed.
2218 (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
2219 name, and pass horizontal and vertical deltas.
2220 (WebCore::findEnclosingOverflowScroll): Deleted.
2222 2015-06-04 Eric Carlson <eric.carlson@apple.com>
2224 [Mac] Don't show default controls after playing to wireless target, again
2225 https://bugs.webkit.org/show_bug.cgi?id=145620
2226 <rdar://problem/21145806>
2228 Reviewed by Dean Jackson.
2230 * Modules/mediacontrols/mediaControlsApple.js:
2231 (Controller.prototype.updateControls): Show or hide the panel as appropriate.
2232 (Controller.prototype.handleWrapperMouseMove): Early return if !video.controls.
2233 (Controller.prototype.addControls): Call updateControls instead of this.setNeedsTimelineMetricsUpdate
2234 so all needed setup is done.
2235 (Controller.prototype.resetHideControlsTimer): Only start the hide timer if playing.
2237 2015-06-04 Chris Dumez <cdumez@apple.com>
2239 [WK2] Prune more resources from the MemoryCache before process suspension
2240 https://bugs.webkit.org/show_bug.cgi?id=145633
2242 Reviewed by Andreas Kling.
2244 Prune more resources from the MemoryCache before process suspension or
2245 on simulated memory warning by doing a synchronous JS garbage collection
2246 and sweep *before* pruning dead resources from the memory cache.
2247 Previously, we would do the garbage collection after pruning the
2248 MemoryCache which meant that a lot of resources became dead after we
2249 tried to prune them.
2251 At the end a basic browsing on apple.com, we are able to remove ~17%
2252 more resources from the MemoryCache on simulated memory warning with this
2255 Pruning as much as we can from the memory cache on critical memory
2256 pressure or before process suspension is not only useful to free up
2257 memory but also to make room in the vnode table as a lot of
2258 CachedResources are mmmap'd from the network disk cache.
2260 * platform/MemoryPressureHandler.cpp:
2261 (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2262 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2264 - Pass 'synchronous' argument so that we know if we need to do a
2265 synchronous JS garbage collection.
2266 - Move here code from in the Cocoa handler that is doing a JS garbage
2267 collection as well as a sweep, and make this code cross-platform.
2268 This code used to be iOS specific but I see no reason we shouldn't
2271 (WebCore::MemoryPressureHandler::releaseMemory):
2272 * platform/MemoryPressureHandler.h:
2274 Use enum class arguments for critical / synchronous. The 'synchronous'
2275 argument is new so that the call site can let us know if memory needs
2276 to be freed synchronously (e.g. in case of imminent process suspension).
2278 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2279 (WebCore::MemoryPressureHandler::platformReleaseMemory):
2281 Remove iOS-specific code that was doing a JS garbage collection and
2282 sweep as this code is now in the generic memory pressure handler.
2284 (WebCore::MemoryPressureHandler::install):
2286 On simulated memory pressure, set 'synchronous' argument to Yes so that
2287 a synchronous GC is done by the generic memory pressure handler. This
2288 way, we no longer need to do a sync GC after calling the memory pressure
2289 handler. This avoids code duplication and makes sure the GC is done
2290 before pruning the memory cache.
2293 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2295 [Cocoa] Clean up m_isEmoji in FontPlatformData
2296 https://bugs.webkit.org/show_bug.cgi?id=145644
2298 Reviewed by Andreas Kling.
2300 m_isEmoji used to be a public member variable only defined on iOS. This
2301 means that, whenever it was consulted, the sites were surrounded by
2302 PLATFORM(IOS) guards. A cleaner design is to use a getter and setter,
2303 which on non-iOS platforms, always return false / do nothing. Then, the
2304 use sites can just use these functions without having ugly guards.
2306 No new tests because there is no behavior change.
2308 * platform/graphics/FontPlatformData.h:
2309 (WebCore::FontPlatformData::hash): Simplify isEmoji use site.
2310 (WebCore::FontPlatformData::isEmoji): Getter. Returns false on Mac.
2311 (WebCore::FontPlatformData::setIsEmoji): Setter. Does nothing on Mac.
2312 * platform/graphics/cocoa/FontCascadeCocoa.mm:
2313 (WebCore::pointAdjustedForEmoji): Simplify isEmoji use site.
2314 (WebCore::FontCascade::drawGlyphs): Ditto.
2315 * platform/graphics/cocoa/FontCocoa.mm:
2316 (WebCore::Font::platformInit): Ditto.
2317 (WebCore::canUseFastGlyphAdvanceGetter): Ditto.
2318 (WebCore::isEmoji): Deleted.
2319 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2320 (WebCore::FontPlatformData::platformDataInit): Simplify isEmoji use
2322 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2323 (WebCore::FontPlatformData::platformIsEqual): Ditto.
2324 (WebCore::FontPlatformData::ctFontSize): Ditto.
2325 * platform/graphics/ios/FontCacheIOS.mm:
2326 (WebCore::FontCache::getSystemFontFallbackForCharacters): Ditto.
2327 (WebCore::FontCache::createFontPlatformData): Ditto.
2328 * platform/graphics/mac/ComplexTextController.cpp:
2329 (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.
2331 2015-06-03 Brent Fulgham <bfulgham@apple.com>
2333 REGRESSION (r181879): Scrolling order on pages with focused iframe is broken.
2334 https://bugs.webkit.org/show_bug.cgi?id=145637
2335 <rdar://problem/20635581>
2337 Reviewed by Zalan Bujtas.
2339 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
2341 This page revealed a bug in our RenderBox code caused by the mismatch between
2342 our scrolling units, which are all integrally snapped, with our client height
2343 and widths, which are not snapped at all.
2345 In certain cases, the client height would have a small subpixel difference compared
2346 to the scroll height, which would cause WebKit to believe it was scrollable. When
2347 this happened, it would get stuck latched to this element and block scrolling events.
2350 (WebCore::Frame::scrollOverflowLayer): Use roundToInt for clientWidth and clientHeight,
2351 rather than integer truncation.
2352 * rendering/RenderBox.cpp:
2353 (WebCore::RenderBox::canBeScrolledAndHasScrollableArea): Need to round clientWidth
2354 and clientHeight to compare with scrollWidth/scrollHeight.
2355 * rendering/RenderBox.h:
2356 (WebCore::RenderBox::hasScrollableOverflowX): Ditto.
2357 (WebCore::RenderBox::hasScrollableOverflowY): Ditto.
2358 * rendering/RenderMarquee.cpp:
2359 (WebCore::RenderMarquee::computePosition): Use roundToInt for clientWidth and
2360 clientHeight, rather than integer truncation.
2362 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2364 [Cocoa] Clean up m_font inside FontPlatformData
2365 https://bugs.webkit.org/show_bug.cgi?id=145634
2367 Reviewed by Andreas Kling.
2369 FontPlatformDatas are used as keys in a HashMap. This means that they need
2370 to be able to represent a "deleted" value. Previously, this "deleted" value
2371 was represented as setting the pointer value of m_font to -1, and guarding
2372 all uses of m_font to make sure it wasn't -1 before dereferencing it.
2374 This patch simplifies FontPlatformData to represent a "deleted" value using
2375 a separate boolean member variable. This class is already big enough that
2376 the increased space is negligable (the class already contains two CoreText
2377 fonts in addition to a CoreGraphics font). Because of this simplification,
2378 m_font can now be a RetainPtr, instead of being manually retained and
2381 There is still a long way to go before FontPlatformData is acceptably
2382 clean and understandable. This patch improves one aspect of it, and more
2383 improvements will eventually follow.
2385 No new tests because there is no behavior change.
2387 * platform/graphics/FontCache.cpp: Remove unused variable.
2388 * platform/graphics/FontPlatformData.cpp:
2389 (WebCore::FontPlatformData::FontPlatformData): Clean up all the PLATFORM
2390 macros in favor of a single bool. Also, update to include new state.
2391 (WebCore::FontPlatformData::operator=): Update to include new state.
2392 * platform/graphics/FontPlatformData.h:
2393 (WebCore::FontPlatformData::font): Update to account for RetainPtr.
2394 (WebCore::FontPlatformData::nsFont): Ditto.
2395 (WebCore::FontPlatformData::setNSFont): Ditto.
2396 (WebCore::FontPlatformData::hash): Update to include new state.
2397 (WebCore::FontPlatformData::operator==): Ditto.
2398 (WebCore::FontPlatformData::isHashTableDeletedValue): Use new state.
2399 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
2400 (WebCore::FontPlatformData::isValidCTFontRef): Deleted.
2401 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2402 (WebCore::FontPlatformData::platformDataInit): No need for manual retain
2404 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2405 (WebCore::FontPlatformData::platformIsEqual): Update to account for
2407 (WebCore::FontPlatformData::setFont): No need for manual retain and
2409 (WebCore::FontPlatformData::FontPlatformData): Deleted.
2410 (WebCore::FontPlatformData::~FontPlatformData): Deleted.
2411 * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2412 (WebCore::FontPlatformData::~FontPlatformData): m_scaledFont is always
2414 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2416 2015-06-03 Carlos Alberto Lopez Perez <clopez@igalia.com>
2418 [GTK] [Wayland] Build is broken on trunk
2419 https://bugs.webkit.org/show_bug.cgi?id=142879
2421 Reviewed by Carlos Garcia Campos.
2423 No new tests, no behavior changes.
2425 Patch on GLContext.h picked from bug 136831 by
2426 Iago Toral <itoral@igalia.com> and Zan Dobersek <zdobersek@igalia.com>
2428 * platform/graphics/GLContext.h: Include wayland-egl.h before eglplatform.h
2429 to use the Wayland platform when building for Wayland.
2430 * platform/graphics/PlatformDisplay.cpp: Fix the include of GDK
2431 headers for the different targets.
2432 * platform/graphics/wayland/WaylandSurface.cpp: Fix build after r183731.
2433 (WebCore::WaylandSurface::~WaylandSurface):
2435 2015-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2437 [Streams API] Implement ReadableStreamController enqueue
2438 https://bugs.webkit.org/show_bug.cgi?id=145210
2440 Reviewed by Darin Adler.
2442 Added possibility to enqueue any JSValue within ReadableJSStream.
2443 They are stored in a Vector of strongified JSValue.
2445 Added support for streams that contain data but are asked to close.
2446 This is done through m_closeRequested boolean and splitting actual closing of the stream from changeStateToClosed().
2448 Chunk size and backpressure mechanism is not yet implemented.
2449 Neither is pulling once enqueued data is processed.
2451 Covered by rebased tests.
2453 * Modules/streams/ReadableStream.cpp:
2454 (WebCore::ReadableStream::changeStateToClosed): Split method with newly added close().
2455 (WebCore::ReadableStream::close): Does the actual closing of stream once stream has no more values.
2456 (WebCore::ReadableStream::read): Close the stream when stream is emptied and close is requested.
2457 (WebCore::ReadableStream::resolveReadCallback): Added to enable ReadableJSStream to resolve read callbacks immediatly at enqueue time.
2458 * Modules/streams/ReadableStream.h:
2459 (WebCore::ReadableStream::isErrored): Getter added for the custom binding code.
2460 (WebCore::ReadableStream::isCloseRequested): Ditto.
2461 * bindings/js/JSReadableStreamControllerCustom.cpp:
2462 (WebCore::JSReadableStreamController::enqueue): binding code for enqueue, taking care of raising exception if readable stream cannot enqueue.
2463 * bindings/js/ReadableJSStream.cpp:
2464 (WebCore::ReadableJSStream::hasValue):
2465 (WebCore::ReadableJSStream::read):
2466 (WebCore::ReadableJSStream::enqueue):
2467 * bindings/js/ReadableJSStream.h:
2469 2015-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2471 [Streams API] ReadableJSStream does not need a ReadableStreamSource
2472 https://bugs.webkit.org/show_bug.cgi?id=145601
2474 Reviewed by Darin Adler.
2476 Covered by existing tests.
2478 * Modules/streams/ReadableStream.cpp:
2479 (WebCore::ReadableStream::ReadableStream): Remoed m_source.
2480 * Modules/streams/ReadableStream.h: Ditto
2481 * Modules/streams/ReadableStreamSource.h: Deleted.
2482 * WebCore.vcxproj/WebCore.vcxproj: Removing Modules/streams/ReadableStreamSource.h.
2483 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2484 * WebCore.xcodeproj/project.pbxproj: Ditto.
2485 * bindings/js/ReadableJSStream.cpp:
2486 (WebCore::ReadableJSStream::globalObject):
2487 (WebCore::ReadableJSStream::doStart): Equivalent of ReadableJSStream::Source::start().
2488 (WebCore::ReadableJSStream::create): Updated according new constructor.
2489 (WebCore::ReadableJSStream::ReadableJSStream):
2490 (WebCore::startReadableStreamAsync): Deleted.
2491 (WebCore::ReadableJSStream::jsController): Deleted.
2492 (WebCore::ReadableJSStream::storeError): Deleted.
2493 * bindings/js/ReadableJSStream.h: Added m_source member to store the JS source as a JS object.
2495 2015-06-04 Zan Dobersek <zdobersek@igalia.com>
2497 Shrink the ArabicCharShapingMode enum in SVGGlyph.cpp
2498 https://bugs.webkit.org/show_bug.cgi?id=145564
2500 Reviewed by Darin Adler.
2502 Shrink the ArabicCharShapingMode enum to just one byte.
2503 This drops the size of the static s_arabicCharShapingMode
2504 array of ArabicCharShapingMode values from 888 bytes to 222.
2506 * platform/graphics/SVGGlyph.cpp:
2507 (WebCore::processArabicFormDetection):
2509 2015-06-03 Zalan Bujtas <zalan@apple.com>
2511 Use borderBoxRect instead of contentBoxRect for backdrop filter.
2512 https://bugs.webkit.org/show_bug.cgi?id=145606
2514 Reviewed by Simon Fraser.
2516 Backdrop filter should use border box rect. It also needs to take css clip into account.
2518 Tests: css3/filters/backdrop/backdrop-filter-with-cliprect.html
2519 css3/filters/backdrop/backdrop-filter-with-mask.html
2521 * rendering/RenderLayerBacking.cpp:
2522 (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
2524 2015-06-03 Youenn Fablet <youenn.fablet@crf.canon.fr>
2526 MediaDevices.getUserMedia should put promises in resolve/reject state synchronously
2527 https://bugs.webkit.org/show_bug.cgi?id=145308
2529 Reviewed by Darin Adler.
2531 Removed the calls to callToMainThread in which were resolved and rejected promises.
2532 Cleaned up the code to remove unneeded callback copies.
2534 Covered by existing tests.
2536 * Modules/mediastream/UserMediaRequest.cpp:
2537 (WebCore::UserMediaRequest::create):
2538 (WebCore::UserMediaRequest::UserMediaRequest):
2539 (WebCore::UserMediaRequest::didCreateStream):
2540 (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
2541 (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
2542 * Modules/mediastream/UserMediaRequest.h:
2544 2015-06-03 Simon Fraser <simon.fraser@apple.com>
2546 REGRESSION (r184968): missing media player buttons (control bar exists, but no buttons)
2547 https://bugs.webkit.org/show_bug.cgi?id=145630
2549 Reviewed by Zalan Bujtas.
2551 r184968 changed the initial value of m_intersectsCoverageRect to false. However,
2552 this triggered a bug with mask layers, whose value of m_intersectsCoverageRect was never
2555 Fix by copying the value of m_intersectsCoverageRect from the main layer to its
2556 mask layer, just as we do for m_visibleRect and m_coverageRect.
2558 Test: compositing/visible-rect/mask-layer-coverage.html
2560 * platform/graphics/ca/GraphicsLayerCA.cpp:
2561 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2563 2015-06-03 Simon Fraser <simon.fraser@apple.com>
2565 Layer tree dumps should include mask layers
2566 https://bugs.webkit.org/show_bug.cgi?id=145629
2568 Reviewed by Zalan Bujtas.
2570 Dumping the layer tree omitted to dump the mask layer, so fix
2571 GraphicsLayer::dumpProperties() to dump this layer.
2573 * platform/graphics/GraphicsLayer.cpp:
2574 (WebCore::GraphicsLayer::dumpProperties):
2576 2015-06-03 Greg Hughes <ghughes@apple.com>
2578 AX: Expose field sets to accessibility clients
2579 https://bugs.webkit.org/show_bug.cgi?id=145585
2581 Expose fieldsets to the accessibility API via a subrole of AXFieldset.
2583 Reviewed by Chris Fleizach.
2585 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2586 (-[WebAccessibilityObjectWrapper subrole]):
2588 2015-06-03 Myles C. Maxfield <mmaxfield@apple.com>
2590 Remove dead code FontPlatformData::roundsGlyphAdvances()
2591 https://bugs.webkit.org/show_bug.cgi?id=145628
2593 Reviewed by Simon Fraser.
2595 No new tests because there is no behavior change.
2598 * platform/graphics/FontPlatformData.h:
2599 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2600 (WebCore::FontPlatformData::roundsGlyphAdvances): Deleted.
2602 2015-06-03 Ryuan Choi <ryuan.choi@navercorp.com>
2604 [CoordinatedGraphics] Merge CoordinatedTile into Tile
2605 https://bugs.webkit.org/show_bug.cgi?id=145602
2607 Reviewed by Darin Adler.
2609 CoordinatedTile only implements Tile since Qt and WebKit1/Efl were dropped.
2610 So, there is no reason that CoordinatedTile inherits Tile interface.
2612 No new tests, no behavior changes.
2614 * PlatformEfl.cmake:
2615 * PlatformGTK.cmake:
2616 * WebCore.vcxproj/WebCore.vcxproj:
2617 * WebCore.vcxproj/WebCore.vcxproj.filters:
2618 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2619 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2620 * platform/graphics/texmap/coordinated/CoordinatedTile.cpp: Renamed to Tile.cpp
2621 * platform/graphics/texmap/coordinated/CoordinatedTile.h: Merged into Tile.h
2622 (WebCore::CoordinatedTile::coordinate): Deleted.
2623 (WebCore::CoordinatedTile::rect): Deleted.
2624 * platform/graphics/texmap/coordinated/Tile.cpp: Renamed from CoordinatedTile.cpp.
2625 * platform/graphics/texmap/coordinated/Tile.h:
2626 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
2627 (WebCore::TiledBackingStore::createTiles):
2629 2015-06-03 Matt Rajca <mrajca@apple.com>
2631 Add basic Media Session support to HTMLMediaElement.
2632 https://bugs.webkit.org/show_bug.cgi?id=145581
2634 Reviewed by Eric Carlson.
2636 HTMLMediaElements now have:
2638 - a 'kind' attribute representing the intrinsic media category
2639 - a 'session' attribute representing the current media session, if any
2641 * CMakeLists.txt: Include the new HTMLMediaElementMediaSession sources.
2642 * DerivedSources.make: Include the new IDL file.
2643 * Modules/mediasession/HTMLMediaElementMediaSession.cpp: Added.
2644 (WebCore::HTMLMediaElementMediaSession::session):
2645 * Modules/mediasession/HTMLMediaElementMediaSession.h: Added basic translation of the IDL file.
2646 (WebCore::HTMLMediaElementMediaSession::kind):
2647 (WebCore::HTMLMediaElementMediaSession::setKind):
2648 (WebCore::HTMLMediaElementMediaSession::setSession):
2649 * Modules/mediasession/HTMLMediaElementMediaSession.idl: Added from the Media Session spec.
2650 * PlatformMac.cmake: Include DOMHTMLMediaElementMediaSession.cpp.
2651 * WebCore.xcodeproj/project.pbxproj: Include the new HTMLMediaElementMediaSession sources.
2652 * html/HTMLMediaElement.h: Added accessors for 'kind' and 'session'.
2653 (WebCore::HTMLMediaElement::kind):
2654 (WebCore::HTMLMediaElement::setKind):
2655 (WebCore::HTMLMediaElement::session):
2656 (WebCore::HTMLMediaElement::setSession):
2658 2015-06-03 Myles C. Maxfield <mmaxfield@apple.com>
2660 Cleanup after r185175.
2661 https://bugs.webkit.org/show_bug.cgi?id=145569
2662 <rdar://problem/20671711>
2666 No new tests because there is no behavior change.
2668 * platform/graphics/WidthIterator.h:
2670 2015-06-02 Myles C. Maxfield <mmaxfield@apple.com>
2672 SoftBank Emoji are not transformed by shaping when in a run of their own
2673 https://bugs.webkit.org/show_bug.cgi?id=145569
2674 <rdar://problem/20671711>
2676 Reviewed by Dean Jackson.
2678 Normally, we don't perform shaping on single glyphs. However, these particular codepoints
2679 need to have shaping run on them, even if they are alone.
2681 Test: fast/text/softbank-emoji.html Note that this test may fail in different locales on
2682 different platforms. This patch disables the test on iOS.
2684 * Source/WebCore/platform/graphics/WidthIterator.cpp:
2685 (WebCore::applyFontTransforms): Move the length-of-1 check into shouldApplyFontTransforms()
2686 (WebCore::shouldApplyFontTransforms): Return true if we have one of these emoji characters in
2688 (WebCore::advanceInternal): Keep track of the previous character, and use it to call
2689 shouldApplyFontTransforms.
2690 * Source/WebCore/platform/graphics/WidthIterator.h: shouldApplyFontTransforms() needs
2691 some more information to perform its duties.
2693 2015-06-03 Daniel Bates <dabates@apple.com>
2695 Caps lock indicator should not be shown in read-only or disabled field
2696 https://bugs.webkit.org/show_bug.cgi?id=145612
2697 <rdar://problem/21227454>
2699 Reviewed by Darin Adler.
2701 * html/TextFieldInputType.cpp:
2702 (WebCore::TextFieldInputType::disabledAttributeChanged): Update caps lock indicator state.
2703 (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
2704 (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator): Do not draw the caps lock indicator
2705 when the field is read-only or disabled.
2707 2015-06-03 Dean Jackson <dino@apple.com>
2709 Crash in GraphicsContext3D::getInternalFramebufferSize
2710 https://bugs.webkit.org/show_bug.cgi?id=145479
2711 <rdar://problem/16461048>
2713 Reviewed by Eric Carlson.
2715 If we are in an unitialized or lost state, don't try to access the context.
2717 In order to test this, I added an Internal setting that always
2718 forces WebGL into a pending state.
2720 Test: fast/canvas/webgl/useWhilePending.html
2722 * html/canvas/WebGLRenderingContextBase.cpp:
2723 (WebCore::WebGLRenderingContextBase::create): Check internal settings for
2724 a forced pending state.
2725 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
2726 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
2727 * page/Settings.cpp: New Internal setting for forcing a pending policy.
2728 (WebCore::Settings::Settings):
2729 (WebCore::Settings::setForcePendingWebGLPolicy):
2731 (WebCore::Settings::isForcePendingWebGLPolicy):
2732 * testing/InternalSettings.cpp:
2733 (WebCore::InternalSettings::Backup::Backup):
2734 (WebCore::InternalSettings::Backup::restoreTo):
2735 (WebCore::InternalSettings::setForcePendingWebGLPolicy):
2736 * testing/InternalSettings.h:
2737 * testing/InternalSettings.idl:
2739 2015-06-03 Hunseop Jeong <hs85.jeong@samsung.com>
2741 Use modern for-loops in WebCore/page.
2742 https://bugs.webkit.org/show_bug.cgi?id=145455
2744 Reviewed by Darin Adler.
2746 No new tests, no behavior changes.
2749 (WebCore::Chrome::notifyPopupOpeningObservers):
2750 * page/ContentSecurityPolicy.cpp:
2751 (WebCore::CSPSourceList::matches):
2752 (WebCore::CSPDirectiveList::gatherReportURIs):
2753 (WebCore::ContentSecurityPolicy::copyStateFrom):
2754 (WebCore::isAllowedByAll):
2755 (WebCore::isAllowedByAllWithState):
2756 (WebCore::isAllowedByAllWithContext):
2757 (WebCore::isAllowedByAllWithURL):
2758 (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
2759 (WebCore::ContentSecurityPolicy::allowPluginType):
2760 (WebCore::ContentSecurityPolicy::reflectedXSSDisposition):
2761 (WebCore::ContentSecurityPolicy::gatherReportURIs):
2762 * page/ContextMenuController.cpp:
2763 (WebCore::ContextMenuController::populate):
2764 * page/DOMWindow.cpp:
2765 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
2766 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
2767 (WebCore::DOMWindow::willDestroyCachedFrame):
2768 (WebCore::DOMWindow::willDestroyDocumentInFrame):
2769 (WebCore::DOMWindow::willDetachDocumentFromFrame):
2770 (WebCore::DOMWindow::disconnectDOMWindowProperties):
2771 (WebCore::DOMWindow::reconnectDOMWindowProperties):
2772 (WebCore::DOMWindow::getMatchedCSSRules):
2773 * page/DeviceController.cpp:
2774 (WebCore::DeviceController::dispatchDeviceEvent):
2775 (WebCore::DeviceController::fireDeviceEvent):
2776 * page/EventHandler.cpp:
2777 (WebCore::EventHandler::updateMouseEventTargetNode):
2778 (WebCore::EventHandler::handleTouchEvent):
2779 * page/FocusController.cpp:
2780 (WebCore::FocusController::setIsVisibleAndActiveInternal):
2782 (WebCore::Frame::orientationChanged):
2783 (WebCore::Frame::injectUserScriptsForWorld):
2784 * page/FrameView.cpp:
2785 (WebCore::FrameView::scrollContentsFastPath):
2786 (WebCore::FrameView::serviceScriptedAnimations):
2787 (WebCore::FrameView::trackedRepaintRectsAsText):
2788 (WebCore::FrameView::updateWidgetPositions):
2789 (WebCore::FrameView::notifyWidgets):
2791 (WebCore::networkStateChanged):
2792 (WebCore::Page::stringToViewMode):
2793 (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
2794 (WebCore::Page::refreshPlugins):
2795 (WebCore::Page::lockAllOverlayScrollbarsToHidden):
2796 (WebCore::Page::pluginViews):
2797 (WebCore::Page::storageBlockingStateChanged):
2798 (WebCore::Page::setIsVisibleInternal):
2799 * page/PageGroup.cpp:
2800 (WebCore::PageGroup::captionPreferencesChanged):
2801 * page/PageGroupLoadDeferrer.cpp:
2802 (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2803 (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2804 * page/PageSerializer.cpp:
2805 (WebCore::PageSerializer::serializeFrame):
2806 * page/Performance.cpp:
2807 (WebCore::Performance::webkitGetEntriesByType):
2808 (WebCore::Performance::webkitGetEntriesByName):
2809 * page/PerformanceResourceTiming.cpp:
2810 (WebCore::passesTimingAllowCheck):
2811 * page/PerformanceUserTiming.cpp:
2812 (WebCore::convertToEntrySequence):
2813 * page/SecurityPolicy.cpp:
2814 (WebCore::SecurityPolicy::isAccessWhiteListed):
2815 * page/UserContentURLPattern.cpp:
2816 (WebCore::UserContentURLPattern::matchesPatterns):
2817 * page/WindowFeatures.cpp:
2818 (WebCore::WindowFeatures::parseDialogFeatures):
2819 * page/animation/AnimationController.cpp:
2820 (WebCore::AnimationControllerPrivate::updateAnimations):
2821 (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
2822 (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
2823 (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
2824 (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
2825 * page/animation/CSSPropertyAnimation.cpp:
2826 (WebCore::ShorthandPropertyWrapper::equals):
2827 (WebCore::ShorthandPropertyWrapper::blend):
2828 * page/scrolling/AsyncScrollingCoordinator.cpp:
2829 (WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
2830 * page/scrolling/ScrollingCoordinator.cpp:
2831 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
2832 (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
2834 2015-06-03 Daniel Bates <dabates@apple.com>
2836 AutoFill button should not be shown in read-only or disabled field
2837 https://bugs.webkit.org/show_bug.cgi?id=145579
2838 <rdar://problem/21212494>
2840 Reviewed by Darin Adler.
2842 Fixes an issue where the AutoFill button is shown in a read-only or disabled
2843 field. We should not show the AutoFill button in such cases.
2845 Tests: fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html
2846 fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html
2847 fast/forms/auto-fill-button/input-auto-fill-button.html
2848 fast/forms/auto-fill-button/input-disabled-auto-fill-button.html
2849 fast/forms/auto-fill-button/input-readonly-auto-fill-button.html
2850 fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html
2852 * html/TextFieldInputType.cpp:
2853 (WebCore::TextFieldInputType::disabledAttributeChanged): Update AutoFill button state.
2854 (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
2855 (WebCore::TextFieldInputType::shouldDrawAutoFillButton): Do not draw AutoFill button
2856 when the field is disabled or read-only.
2858 2015-06-03 Brent Fulgham <bfulgham@apple.com>
2860 REGRESSION: (r181879): Scrolling in select/option region in iFrame scrolls both select and iframe
2861 https://bugs.webkit.org/show_bug.cgi?id=145574
2862 <rdar://problem/20966828>
2864 Reviewed by Simon Fraser.
2866 Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html
2868 When the scroll gesture is started when the latched scrollable container is not at the limit of its
2869 scroll region, we are NOT supposed to propagate the scroll event to the enclosing region. However,
2870 we were doing two things wrong:
2871 (1) When we recognized we were latching, we were using the right wheel event target, but not using
2872 the latched scrollable container.
2873 (2) Likewise, we were not using latched ScrollableArea when handling wheel events.
2875 Instead, we were using the current scrollable container and ScrollableArea under the mouse pointer,
2876 which could be different from the point we started latching as the content scrolled.
2878 The fix was to properly track the scrollable container and scrollable area during latching.
2880 I attempted to store the latched ScrollableArea in the latchingState object, like we already do for the
2881 scrollable container, but found that this did not work properly. I think the life cycle of the
2882 ScrollableArea may not match the scrollable container, and since they are not reference counted I
2883 simply retrieve the ScrollableArea when needed.
2885 * page/mac/EventHandlerMac.mm:
2886 (WebCore::scrollableAreaForContainerNode): Helper function to return the correct ScrollableArea
2887 for the two types of RenderBox elements.
2888 (WebCore::latchedToFrameOrBody): Helper predicate to identify Frame and Body elements.
2889 (WebCore::EventHandler::platformPrepareForWheelEvents): Use the correct ScrollableArea for the given
2890 ContainerNode. When latching, make sure to use the ScrollableArea that is related to the latched scrollable
2891 container, not the area currently underneath the mouse pointer.
2893 2015-06-03 Brady Eidson <beidson@apple.com>
2895 REGRESSION (r183498): Certain types of frame loads in iframes with <base target="_blank"> can open urls in new window/tabs
2896 https://bugs.webkit.org/show_bug.cgi?id=145580
2898 Reviewed by Mark Lam.
2900 Tests: fast/loader/fragment-navigation-base-blank.html
2901 fast/loader/iframe-meta-refresh-base-blank.html
2902 fast/loader/iframe-set-location-base-blank.html
2903 fast/loader/refresh-iframe-base-blank.html
2905 Before 183498, callers of FrameLoader::changeLocation() got automatically assigned a frame name of "_self".
2906 After 183498, many remained without a frame name.
2908 Later on, FrameLoader applies the <base> target as their frame name if they don't already have one.
2910 When the <base> target is "_blank", that causes a new window/tab.
2912 Restoring "_self" to these call sites fixes this.
2914 * inspector/InspectorFrontendClientLocal.cpp:
2915 (WebCore::InspectorFrontendClientLocal::openInNewTab):
2917 * inspector/InspectorPageAgent.cpp:
2918 (WebCore::InspectorPageAgent::navigate):
2920 * loader/FrameLoadRequest.h:
2921 (WebCore::FrameLoadRequest::FrameLoadRequest):
2923 * loader/NavigationScheduler.cpp:
2924 (WebCore::NavigationScheduler::scheduleLocationChange):
2926 * page/DOMWindow.cpp:
2927 (WebCore::DOMWindow::createWindow):
2929 2015-06-03 Alexey Proskuryakov <ap@apple.com>
2931 More iOS build fixing.
2933 * platform/spi/mac/AVFoundationSPI.h:
2935 2015-06-03 Zalan Bujtas <zalan@apple.com>
2937 Subpixel rendering: Composited layer with subpixel gap does not get painted properly when its position changes.
2938 https://bugs.webkit.org/show_bug.cgi?id=145587
2940 Reviewed by Simon Fraser.
2942 The composited layer always snaps to an enclosing device pixel (floors) while the renderer rounds.
2943 At certain positions (for example 0.5px on a 1x display), a gap is formed between the layer(0px) and its renderer(1px).
2944 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
2945 in order to get the renderering right.
2947 Test: compositing/child-layer-with-subpixel-gap-needs-repaint-when-parent-moves.html
2949 * rendering/RenderLayerBacking.cpp:
2950 (WebCore::RenderLayerBacking::updateAfterLayout):
2951 (WebCore::devicePixelFractionGapFromRendererChanged):
2952 (WebCore::RenderLayerBacking::updateGeometry):
2953 * rendering/RenderLayerBacking.h:
2955 2015-06-03 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2957 [Streams API] ReadableStreamReader::closed() should be called once by binding code
2958 https://bugs.webkit.org/show_bug.cgi?id=145551
2960 Reviewed by Darin Adler.
2962 Covered by existing tests.
2964 * bindings/js/JSReadableStreamReaderCustom.cpp:
2965 (WebCore::JSReadableStreamReader::closed): Calling ReadableStreamReader::closed only at creation of the promise.
2967 2015-06-02 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2969 [EFL][GTK] Fix build error since r185137
2970 https://bugs.webkit.org/show_bug.cgi?id=145596
2972 Unreviewed, fix build break on EFL and GTK port.
2975 (WebCore::Text::formatForDebugger): Use strncpy() instead of strlcpy().
2977 2015-06-02 Sergio Villar Senin <svillar@igalia.com>
2979 [CSS Grid Layout] Switch from parenthesis to brackets for grid line names
2980 https://bugs.webkit.org/show_bug.cgi?id=144996
2982 Reviewed by Darin Adler.
2984 Grid line names are now enclosed by brackets instead of parentheses
2985 as mentioned in the latest version of the spec. Appartently the CSS
2986 code is now more readable and avoids issues with tools like SASS.
2988 * css/CSSGrammar.y.in:
2989 * css/CSSGridLineNamesValue.cpp:
2990 (WebCore::CSSGridLineNamesValue::customCSSText):
2992 2015-06-02 Alexey Proskuryakov <ap@apple.com>
2996 * platform/spi/mac/AVFoundationSPI.h:
2998 2015-06-02 Commit Queue <commit-queue@webkit.org>
3000 Unreviewed, rolling out r185128 and r185132.
3001 https://bugs.webkit.org/show_bug.cgi?id=145597
3003 The new test hits a bad assertion (Requested by ap on
3006 Reverted changesets:
3008 "Crash in GraphicsContext3D::getInternalFramebufferSize"
3009 https://bugs.webkit.org/show_bug.cgi?id=145479
3010 http://trac.webkit.org/changeset/185128
3012 "Skip webgl/useWhilePending.html on WebKit 1."
3013 http://trac.webkit.org/changeset/185132
3015 2015-06-02 Ryuan Choi <ryuan.choi@navercorp.com>
3017 [CoordinatedGraphics] Refactor TiledBackingStoreClient
3018 https://bugs.webkit.org/show_bug.cgi?id=145577
3020 Reviewed by Gyuyoung Kim.
3022 This patch removes and simplifies unnecessary virtual methods of TiledBackingStoreClient.
3024 No new tests, no behavior changes.
3026 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3027 (WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers): Renamed from tiledBackingStorePaintEnd.
3028 (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintBegin): Deleted.
3029 (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd): Deleted.
3030 (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreBackgroundColor):
3031 Deleted because tiledBackingStoreBackgroundColor() is not used anywhere.
3032 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3033 * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
3034 (WebCore::CoordinatedTile::updateBackBuffer):
3035 Simplified not to call unnecessary methods. In addition, used modern for loop.
3036 (WebCore::CoordinatedTile::swapBackBufferToFront): Deleted.
3037 * platform/graphics/texmap/coordinated/CoordinatedTile.h:
3038 * platform/graphics/texmap/coordinated/Tile.h:
3039 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
3040 (WebCore::TiledBackingStore::updateTileBuffers):
3041 * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
3043 2015-06-02 Doug Russell <d_russell@apple.com>
3045 AX: debugging attributes for text markers
3046 https://bugs.webkit.org/show_bug.cgi?id=145283
3048 Reviewed by Chris Fleizach.
3050 AXTextMarkerDebugDescription: returns the result of
3051 VisiblePosition::formatForDebugger() for the visible position that a text marker
3053 AXTextMarkerNodeDebugDescription: calls Node::showNode() and
3054 Node::showNodePathForThis() for the visible position that a text marker
3056 AXTextMarkerNodeTreeDebugDescription: calls Node::showTreeForThis() for the
3057 visible position that a text marker represents.
3058 AXTextMarkerRangeDebugDescription: returns the result of
3059 formatForDebugger(VisiblePositionRange) for the visible position range that a text
3060 marker range represents.
3062 This is debug only tooling. Tests would be flakey and not very helpful.
3064 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3065 (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarker:]):
3066 (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarkerRange:]):
3067 (-[WebAccessibilityObjectWrapper showNodeForTextMarker:]):
3068 (-[WebAccessibilityObjectWrapper showNodeTreeForTextMarker:]):
3069 (formatForDebugger):
3070 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3072 (WebCore::Text::formatForDebugger):
3074 2015-06-02 Matt Rajca <mrajca@apple.com>
3076 MediaSessions should keep track of their current state.
3077 https://bugs.webkit.org/show_bug.cgi?id=145575
3079 Reviewed by Alex Christensen.
3081 * Modules/mediasession/MediaSession.h: Per the Media Session spec, the state can be 'Idle', 'Active', or
3082 'Interrupted'. Sessions are created in an 'Idle' state.
3084 2015-06-02 Jon Lee <jonlee@apple.com>
3086 Build fix when building with internal SDKs
3087 https://bugs.webkit.org/show_bug.cgi?id=145576
3088 rdar://problem/21089476
3090 Reviewed by Alexey Proskuryakov.
3092 * platform/spi/mac/AVFoundationSPI.h: Include the right header.
3094 2015-06-02 Dean Jackson <dino@apple.com>
3096 No need to guard the sizes attribute against PICTURE_SIZES in preload scanner.
3097 https://bugs.webkit.org/show_bug.cgi?id=145573
3098 <rdar://problem/21210038>
3100 Reviewed by Myles Maxfield.
3102 The PICTURE_SIZES feature flag doesn't need to be used to
3103 guard preloading of the sizes attribute.
3105 * html/parser/HTMLPreloadScanner.cpp:
3106 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Deleted.
3107 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.
3109 2015-06-02 Anders Carlsson <andersca@apple.com>
3111 Use UUIDs for WebSQL database filenames instead of a sequential number
3112 https://bugs.webkit.org/show_bug.cgi?id=145571
3114 Reviewed by Dan Bernstein.
3116 This is a first step towards getting rid of the iOS specific code path where we truncate
3117 database files instead of deleting them (in order to avoid file corruption).
3119 * Modules/webdatabase/DatabaseTracker.cpp:
3120 (WebCore::generateDatabaseFileName):
3121 (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
3122 * platform/sql/SQLiteFileSystem.cpp:
3123 (WebCore::SQLiteFileSystem::getFileNameForNewDatabase): Deleted.
3124 * platform/sql/SQLiteFileSystem.h:
3126 2015-06-02 Dean Jackson <dino@apple.com>
3128 Crash in GraphicsContext3D::getInternalFramebufferSize
3129 https://bugs.webkit.org/show_bug.cgi?id=145479
3130 <rdar://problem/16461048>
3132 Reviewed by Eric Carlson.
3134 If we are in an unitialized or lost state, don't try to access the context.
3136 In order to test this, I added an Internal setting that always
3137 forces WebGL into a pending state.
3139 Test: fast/canvas/webgl/useWhilePending.html
3141 * html/canvas/WebGLRenderingContextBase.cpp:
3142 (WebCore::WebGLRenderingContextBase::create): Check internal settings for
3143 a forced pending state.
3144 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
3145 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
3146 * page/Settings.cpp: New Internal setting for forcing a pending policy.
3147 (WebCore::Settings::Settings):
3148 (WebCore::Settings::setForcePendingWebGLPolicy):
3150 (WebCore::Settings::isForcePendingWebGLPolicy):
3151 * testing/InternalSettings.cpp:
3152 (WebCore::InternalSettings::Backup::Backup):
3153 (WebCore::InternalSettings::Backup::restoreTo):
3154 (WebCore::InternalSettings::setForcePendingWebGLPolicy):
3155 * testing/InternalSettings.h:
3156 * testing/InternalSettings.idl:
3158 2015-06-02 Matt Rajca <mrajca@apple.com>
3160 Added a stub implementation of MediaSession, part of the Media Session spec.
3161 https://bugs.webkit.org/show_bug.cgi?id=145530
3163 Reviewed by Eric Carlson.
3165 * CMakeLists.txt: Added new MediaSession sources.
3166 * DerivedSources.make:
3167 * Modules/mediasession/MediaSession.cpp: Added stub implementation.
3168 (WebCore::MediaSession::MediaSession): Per the Media Session spec, a Media Remote Controls object should only be
3169 set for 'content' sessions; it is null otherwise.
3170 (WebCore::MediaSession::~MediaSession):
3171 (WebCore::MediaSession::controls):
3172 (WebCore::MediaSession::releaseSession):
3173 * Modules/mediasession/MediaSession.h: Added basic translation of IDL file.
3174 * Modules/mediasession/MediaSession.idl: Added from the Media Session spec.
3175 * WebCore.xcodeproj/project.pbxproj: Added new MediaSession sources.
3177 2015-06-02 Zalan Bujtas <zalan@apple.com>
3179 Backdrop filter is pulling in content from behind the window.
3180 https://bugs.webkit.org/show_bug.cgi?id=145561
3181 rdar://problem/20909309
3183 Reviewed by Simon Fraser.
3185 This patch ensures that the backdrop filter layer is positioned and sized properly.
3187 The backdrop filter layer should take its size and position from its renderer and not
3188 directly from the composited layer.
3189 In certain cases the composited layer's size is expanded to cover items like box shadow or an absolute positioned descendant.
3190 In such cases, we ended up applying the backdrop filter to those areas as well.
3192 Tests: css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html
3193 css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html
3195 * platform/graphics/GraphicsLayer.h:
3196 (WebCore::GraphicsLayer::setBackdropFiltersRect):
3197 (WebCore::GraphicsLayer::backdropFiltersRect):
3198 * platform/graphics/ca/GraphicsLayerCA.cpp:
3199 (WebCore::GraphicsLayerCA::setBackdropFiltersRect):
3200 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3201 (WebCore::GraphicsLayerCA::updateBackdropFilters):
3202 (WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
3203 (WebCore::GraphicsLayerCA::updateContentsRects):
3204 (WebCore::GraphicsLayerCA::updateGeometry): Deleted.
3205 * platform/graphics/ca/GraphicsLayerCA.h:
3206 * rendering/RenderLayerBacking.cpp:
3207 (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
3208 (WebCore::RenderLayerBacking::updateGeometry):
3209 * rendering/RenderLayerBacking.h:
3211 2015-06-02 Eric Carlson <eric.carlson@apple.com>
3213 [Mac] occasional crash in Document::playbackTargetAvailabilityDidChange
3214 https://bugs.webkit.org/show_bug.cgi?id=145559
3216 Reviewed by Darin Adler.
3218 No new tests, covered by existing tests.
3220 * html/HTMLMediaElement.cpp:
3221 (WebCore::HTMLMediaElement::registerWithDocument): Pass document to m_mediaSession->registerWithDocument.
3222 (WebCore::HTMLMediaElement::unregisterWithDocument): Pass document to m_mediaSession->unRegisterWithDocument.
3223 (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Ditto.
3224 (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.
3226 * html/MediaElementSession.cpp:
3227 (WebCore::MediaElementSession::registerWithDocument): Take a document.
3228 (WebCore::MediaElementSession::unregisterWithDocument): Ditto.
3229 * html/MediaElementSession.h:
3231 2015-06-02 Chris Dumez <cdumez@apple.com>
3233 Calling FrameView::viewportContentsChanged() after style recalcs is too expensive
3234 https://bugs.webkit.org/show_bug.cgi?id=145554
3235 <rdar://problem/21189478>
3237 Reviewed by Darin Adler and Simon Fraser.
3239 Only call FrameView::viewportContentsChanged() after a style recalc if
3240 composited layers have been updated (and there is no pending layout).
3242 We already viewportContentsChanged() after layout so we only need to
3243 call viewportContentsChanged() after a style recalc if it did not cause
3244 a layout but may have caused an element to become visible. In
3245 particular, this can happen in the case of composited animations (e.g.
3246 using -webkit-transform to move an element inside the viewport).
3247 Therefore, we now only call viewportContentsChanged() after a style
3248 recalc if it caused composited layers to be updated. This avoids a lot
3249 of unnecessary calls to viewportContentsChanged(), which is expensive.
3251 No new tests, already covered by:
3252 fast/images/animated-gif-webkit-transform.html
3255 (WebCore::Document::recalcStyle):
3256 * page/FrameView.cpp:
3257 (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
3259 * rendering/RenderLayerCompositor.cpp:
3260 (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
3261 (WebCore::RenderLayerCompositor::updateCompositingLayers):
3262 * rendering/RenderLayerCompositor.h:
3264 2015-06-02 Myles C. Maxfield <mmaxfield@apple.com>
3266 Remove use of CTFontSetRenderingParameters()
3267 https://bugs.webkit.org/show_bug.cgi?id=145560
3269 Reviewed by Simon Fraser.
3271 Instead, always use CTFontSetRenderingStyle().
3273 No new tests because there is no behavior change.
3275 * platform/graphics/cocoa/FontCascadeCocoa.mm:
3276 (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
3277 (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
3279 2015-06-02 Anders Carlsson <andersca@apple.com>
3281 Move WKFontAntialiasingStateSaver to its own file
3282 https://bugs.webkit.org/show_bug.cgi?id=145557
3283 rdar://problem/21134776
3285 Reviewed by Dan Bernstein.
3287 Also rename it to FontAntialiasingStateSaver. Also, change it to use the CoreGraphicsSPI.h header for its
3288 CGFontAntialiasingStyle definition instead of using an explicit typedef.
3290 * WebCore.xcodeproj/project.pbxproj:
3291 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3292 (PlatformCALayer::drawLayerContents):
3293 * platform/graphics/ios/FontAntialiasingStateSaver.h: Copied from Source/WebCore/platform/ios/wak/WKGraphics.h.
3294 (WebCore::FontAntialiasingStateSaver::FontAntialiasingStateSaver):
3295 (WebCore::FontAntialiasingStateSaver::setup):
3296 (WebCore::FontAntialiasingStateSaver::restore):
3297 * platform/ios/LegacyTileCache.mm:
3298 (WebCore::LegacyTileCache::drawWindowContent):
3299 * platform/ios/wak/WKGraphics.h:
3300 (WKFontAntialiasingStateSaver::WKFontAntialiasingStateSaver): Deleted.
3301 * platform/ios/wak/WKGraphics.mm:
3302 (WKFontAntialiasingStateSaver::setup): Deleted.
3303 (WKFontAntialiasingStateSaver::restore): Deleted.
3305 2015-06-02 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3307 [Streams API] Implement ReadableStreamReader read method in closed and errored state
3308 https://bugs.webkit.org/show_bug.cgi?id=144790
3310 Reviewed by Darin Adler.
3312 Reader delegates read() promise handling to its stream except if reader is no longer locking the stream and stream is readable.
3313 Storing of reader read() promise callbacks as a Vector in ReadableStream.
3314 Added resolution/rejection of read() promises in case of errored/closed streams.
3316 Test: streams/readable-stream-reader-read.html
3318 * ForwardingHeaders/runtime/IteratorOperations.h: Added.
3319 * Modules/streams/ReadableStream.cpp:
3320 (WebCore::ReadableStream::cleanCallbacks): Clean the read requests.
3321 (WebCore::ReadableStream::changeStateToClosed): Run success callbacks with undefined for read requests.
3322 (WebCore::ReadableStream::changeStateToErrored): Run failure callbacks with the errors for read requests.
3323 (WebCore::ReadableStream::closed): Parameter name changed.
3324 (WebCore::ReadableStream::read): Added. Succeeds with empty when closed, fails with error when errored, reads a
3325 value if there is one and pushes the callbacks to the queue otherwise.
3326 * Modules/streams/ReadableStream.h:
3327 (WebCore::ReadableStream::ReadCallbacks::ReadCallbacks): Struct containing success and failure callbacks.
3328 * Modules/streams/ReadableStreamReader.cpp:
3329 (WebCore::ReadableStreamReader::closed): Parameter name changed.
3330 (WebCore::ReadableStreamReader::read): Invoke success with empty if we streams if we don't have the right reader
3331 and call the stream otherwise to read.
3332 * Modules/streams/ReadableStreamReader.h:
3333 * bindings/js/JSReadableStreamReaderCustom.cpp:
3334 (WebCore::JSReadableStreamReader::read): Create the callback lambdas and invoke read. Failure rejects the
3335 promise and success creates the result from the read value.
3336 * bindings/js/ReadableJSStream.cpp:
3337 (WebCore::ReadableJSStream::hasValue):
3338 (WebCore::ReadableJSStream::read): Not implemented yet.
3339 * bindings/js/ReadableJSStream.h:
3341 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
3343 [Cocoa] FontPlatformData's equality check should always use reference URLs
3344 https://bugs.webkit.org/show_bug.cgi?id=144168
3346 Reviewed by Tim Horton.
3348 <rdar://problem/18985642> is not fixed, so we need to continue using the older
3349 objectForEqualityCheck().
3351 No new tests because there is no behavior change.
3353 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3354 (WebCore::FontPlatformData::objectForEqualityCheck):
3356 2015-06-02 Andy Estes <aestes@apple.com>
3358 [Mac] REGRESSION (r175941): Max.app crashes when adding a sound file to a patch due to removing cursor resources from WebCore.framework
3359 https://bugs.webkit.org/show_bug.cgi?id=145555
3361 Reviewed by Darin Adler.
3363 Re-added the cursor resources used by Max.app and ran sort-Xcode-project-file.
3365 * Resources/copyCursor.png: Added.
3366 * Resources/moveCursor.png: Added.
3367 * Resources/northEastSouthWestResizeCursor.png: Added.
3368 * Resources/northSouthResizeCursor.png: Added.
3369 * Resources/northWestSouthEastResizeCursor.png: Added.
3370 * WebCore.xcodeproj/project.pbxproj:
3372 2015-06-02 Brady Eidson <beidson@apple.com>
3374 WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
3375 rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
3377 Reviewed by Alex Christensen.
3379 Tests: loader/navigation-policy/should-open-external-urls/main-frame-click.html
3380 loader/navigation-policy/should-open-external-urls/main-frame-navigated-programatically-by-subframe.html
3381 loader/navigation-policy/should-open-external-urls/main-frame-with-flag-progamatic.html
3382 loader/navigation-policy/should-open-external-urls/main-frame-without-flag-programatic.html
3383 loader/navigation-policy/should-open-external-urls/subframe-click-target-self.html
3384 loader/navigation-policy/should-open-external-urls/subframe-click-target-top.html
3385 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html
3386 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html
3387 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html
3388 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag.html
3389 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag-from-subframe.html
3390 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag.html
3391 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag-from-subframe.html
3392 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag.html
3393 loader/navigation-policy/should-open-external-urls/window-open-with-flag-from-subframe.html
3394 loader/navigation-policy/should-open-external-urls/window-open-with-flag.html
3395 loader/navigation-policy/should-open-external-urls/window-open-without-flag-from-subframe.html
3396 loader/navigation-policy/should-open-external-urls/window-open-without-flag.html
3398 The "should open external URLs" flag is only for main frames.
3399 It doesn't enforce any sort of policy internal to WebKit, but rather is for notifications to the policy delegate.
3401 It is set from one of two places:
3402 1 - A main frame is navigated by any frame as the result of a user gesture.
3403 2 - WebKit2 API explicitly states the flag is true.
3405 The flag value propagates when:
3406 1 - When a main frame document is navigated to a new main frame document.
3407 2 - When a new window is opened from a page whose main frame had the flag set.
3408 3 - When a new window is opened as the result of a user gesture.
3410 The flag resets to false when:
3411 1 - A subframe navigates a main frame without a user gesture.
3413 This patch is large, but does little more than the following:
3414 1 - Adds a ShouldOpenExternalURLs flag to both FrameLoadRequest and NavigationAction.
3415 2 - Makes sure anybody who creates either of those objects sets a sensible for that flag.
3416 3 - When FrameLoader creates a new DocumentLoader, it sets its flag based on whether or not the load is in a main frame,
3417 whether or not the load is from a user gesture, and based on the initiator's value of the flag.
3420 (WebCore::Document::processHttpEquiv):
3421 (WebCore::Document::shouldOpenExternalURLsPolicyToPropagate):
3424 * html/HTMLAnchorElement.cpp:
3425 (WebCore::HTMLAnchorElement::handleClick):
3427 * html/HTMLLinkElement.cpp:
3428 (WebCore::HTMLLinkElement::handleClick):
3430 * html/parser/XSSAuditorDelegate.cpp:
3431 (WebCore::XSSAuditorDelegate::didBlockScript):
3433 * inspector/InspectorFrontendClientLocal.cpp:
3434 (WebCore::InspectorFrontendClientLocal::openInNewTab):
3436 * inspector/InspectorPageAgent.cpp:
3437 (WebCore::InspectorPageAgent::navigate):
3439 * loader/DocumentLoader.cpp:
3440 (WebCore::DocumentLoader::setTriggeringAction):
3441 (WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate):
3442 * loader/DocumentLoader.h:
3443 (WebCore::DocumentLoader::shouldOpenExternalURLsPolicy): Deleted.
3445 * loader/FrameLoadRequest.cpp:
3446 (WebCore::FrameLoadRequest::FrameLoadRequest):
3447 * loader/FrameLoadRequest.h:
3448 (WebCore::FrameLoadRequest::FrameLoadRequest):
3450 * loader/FrameLoader.cpp:
3451 (WebCore::FrameLoader::urlSelected):
3452 (WebCore::FrameLoader::receivedFirstData):
3453 (WebCore::FrameLoader::loadURLIntoChildFrame):
3454 (WebCore::FrameLoader::loadURL):
3455 (WebCore::FrameLoader::load):
3456 (WebCore::FrameLoader::loadWithNavigationAction):
3457 (WebCore::FrameLoader::reloadWithOverrideEncoding):
3458 (WebCore::FrameLoader::reload):
3459 (WebCore::FrameLoader::loadPostRequest):
3460 (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3461 (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
3462 * loader/FrameLoader.h:
3464 * loader/NavigationAction.cpp:
3465 (WebCore::NavigationAction::NavigationAction):
3466 (WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy):
3467 * loader/NavigationAction.h:
3468 (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy): Deleted.
3470 * loader/NavigationScheduler.cpp:
3471 (WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
3472 (WebCore::ScheduledRedirect::ScheduledRedirect):
3473 (WebCore::ScheduledLocationChange::ScheduledLocationChange):
3474 (WebCore::ScheduledRefresh::ScheduledRefresh):
3475 (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
3476 (WebCore::NavigationScheduler::scheduleRedirect):
3477 (WebCore::NavigationScheduler::scheduleLocationChange):
3478 (WebCore::NavigationScheduler::scheduleRefresh):
3479 * loader/NavigationScheduler.h:
3481 * loader/PolicyChecker.cpp:
3482 (WebCore::PolicyChecker::checkNavigationPolicy):
3484 * loader/SubframeLoader.cpp:
3485 (WebCore::SubframeLoader::loadOrRedirectSubframe):
3487 * loader/appcache/ApplicationCacheGroup.cpp:
3488 (WebCore::ApplicationCacheGroup::selectCache):
3490 * page/ContextMenuController.cpp:
3491 (WebCore::openNewWindow):
3492 (WebCore::ContextMenuController::contextMenuItemSelected):
3494 * page/DOMWindow.cpp:
3495 (WebCore::DOMWindow::setLocation):
3496 (WebCore::DOMWindow::createWindow):
3497 (WebCore::DOMWindow::open):
3499 * page/DragController.cpp:
3500 (WebCore::DragController::performDragOperation):
3502 * page/Location.cpp:
3503 (WebCore::Location::reload):
3505 * replay/ReplayInputDispatchMethods.cpp:
3506 (WebCore::InitialNavigation::dispatch):
3508 * svg/SVGAElement.cpp:
3509 (WebCore::SVGAElement::defaultEventHandler):
3511 2015-06-02 Yusuke Suzuki <utatane.tea@gmail.com>
3513 Heap-use-after-free read of size 4 in JavaScriptCore: WTF::StringImpl::isSymbol() (StringImpl.h:496)
3514 https://bugs.webkit.org/show_bug.cgi?id=145532
3516 Reviewed by Geoffrey Garen.
3518 Hold the ownership of AtomicStringImpl*.
3520 * bindings/scripts/CodeGeneratorJS.pm:
3521 (GenerateParametersCheck):
3522 * dom/TreeScope.cpp:
3523 (WebCore::TreeScope::getElementById):
3525 2015-06-02 Youenn Fablet <youenn.fablet@crf.canon.fr>
3527 SharedBuffer::copy should return a Ref<SharedBuffer>
3528 https://bugs.webkit.org/show_bug.cgi?id=145499
3530 Reviewed by Andreas Kling.
3532 Changing SharedBuffer::copy to return a Ref<> and adapting some code accordingly.
3534 Covered by existing tests.
3536 * loader/SubresourceLoader.cpp:
3537 (WebCore::SubresourceLoader::didReceiveResponse):
3538 * loader/appcache/ApplicationCacheResource.cpp:
3539 (WebCore::ApplicationCacheResource::deliver):
3540 * platform/SharedBuffer.cpp:
3541 (WebCore::SharedBuffer::copy):
3542 * platform/SharedBuffer.h:
3544 2015-06-01 Hunseop Jeong <hs85.jeong@samsung.com>
3546 Use modern for-loops in WebCore/Modules - 1
3547 https://bugs.webkit.org/show_bug.cgi?id=145507
3549 Reviewed by Darin Adler.
3551 No new tests, no behavior changes.
3553 * Modules/battery/BatteryController.cpp:
3554 (WebCore::BatteryController::~BatteryController):
3555 (WebCore::BatteryController::updateBatteryStatus):
3556 (WebCore::BatteryController::didChangeBatteryStatus):
3557 * Modules/encryptedmedia/CDM.cpp:
3558 (WebCore::CDMFactoryForKeySystem):
3559 * Modules/encryptedmedia/MediaKeys.cpp:
3560 (WebCore::MediaKeys::~MediaKeys):
3561 * Modules/geolocation/Geolocation.cpp:
3562 (WebCore::Geolocation::resumeTimerFired):
3563 (WebCore::Geolocation::resetAllGeolocationPermission):
3564 (WebCore::Geolocation::makeCachedPositionCallbacks):
3565 (WebCore::Geolocation::sendError):
3566 (WebCore::Geolocation::sendPosition):
3567 (WebCore::Geolocation::stopTimer):
3568 (WebCore::Geolocation::cancelRequests):
3569 (WebCore::Geolocation::extractNotifiersWithCachedPosition):
3570 (WebCore::Geolocation::copyToSet):
3571 (WebCore::Geolocation::handlePendingPermissionNotifiers):
3572 * Modules/geolocation/GeolocationController.cpp:
3573 (WebCore::GeolocationController::positionChanged):
3574 (WebCore::GeolocationController::errorOccurred):
3575 * Modules/indexeddb/IDBDatabase.cpp:
3576 (WebCore::IDBDatabase::objectStoreNames):
3577 (WebCore::IDBDatabase::transaction):
3578 (WebCore::IDBDatabase::forceClose):
3579 (WebCore::IDBDatabase::closeConnection):
3580 (WebCore::IDBDatabase::findObjectStoreId):
3581 * Modules/indexeddb/IDBDatabaseBackend.cpp:
3582 (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
3583 (WebCore::IDBDatabaseBackend::deleteDatabase):
3584 (WebCore::IDBDatabaseBackend::close):
3585 * Modules/indexeddb/IDBDatabaseMetadata.cpp:
3586 (WebCore::IDBDatabaseMetadata::isolatedCopy):
3587 (WebCore::IDBObjectStoreMetadata::isolatedCopy):
3588 * Modules/indexeddb/IDBKey.cpp:
3589 (WebCore::IDBKey::isValid):
3590 * Modules/indexeddb/IDBKey.h:
3591 (WebCore::IDBKey::createMultiEntryArray):
3592 (WebCore::IDBKey::createArray):
3593 * Modules/indexeddb/IDBKeyPath.cpp:
3594 (WebCore::IDBKeyPath::IDBKeyPath):
3595 (WebCore::IDBKeyPath::isValid):
3596 (WebCore::IDBKeyPath::isolatedCopy):
3597 * Modules/indexeddb/IDBObjectStore.cpp:
3598 (WebCore::IDBObjectStore::indexNames):
3599 (WebCore::IDBObjectStore::put):
3600 Rename the two 'i's to 'keyData' and 'indexKeyData'.
3601 (WebCore::IDBObjectStore::index):
3602 (WebCore::IDBObjectStore::findIndexId):
3603 * Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
3604 (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions):
3605 * Modules/indexeddb/IDBRequest.cpp:
3606 (WebCore::IDBRequest::abort):
3607 * Modules/indexeddb/IDBTransaction.cpp:
3608 (WebCore::IDBTransaction::closeOpenCursors):
3609 (WebCore::IDBTransaction::onAbort):
3610 (WebCore::IDBTransaction::dispatchEvent):
3611 * Modules/indexeddb/IDBTransactionBackend.cpp:
3612 (WebCore::IDBTransactionBackend::create):
3613 (WebCore::IDBTransactionBackend::closeOpenCursors):
3614 * Modules/mediasource/MediaSource.cpp:
3615 (WebCore::MediaSource::onReadyStateChange):
3616 * Modules/mediastream/MediaConstraintsImpl.cpp:
3617 (WebCore::MediaConstraintsImpl::initialize):
3618 (WebCore::MediaConstraintsImpl::getMandatoryConstraints):
3619 (WebCore::MediaConstraintsImpl::getOptionalConstraintValue):
3620 * Modules/mediastream/MediaStream.cpp:
3621 (WebCore::MediaStream::create):
3622 (WebCore::MediaStream::cloneMediaStreamTrackVector):
3623 (WebCore::MediaStream::addTrack):
3624 (WebCore::MediaStream::removeTrack):
3625 (WebCore::MediaStream::haveTrackWithSource):
3626 (WebCore::MediaStream::getTrackById):
3627 (WebCore::MediaStream::getTracks):
3628 (WebCore::MediaStream::trackDidEnd):
3629 (WebCore::MediaStream::scheduledEventTimerFired):
3630 * Modules/mediastream/MediaStreamCapabilities.cpp:
3631 (WebCore::MediaStreamCapabilities::sourceType):
3632 (WebCore::MediaStreamCapabilities::sourceId):
3633 (WebCore::MediaStreamCapabilities::facingMode):
3634 * Modules/mediastream/MediaStreamTrack.cpp:
3635 (WebCore::MediaStreamTrack::trackDidEnd):
3636 * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
3637 (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
3639 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
3641 [SVG -> OTF Converter] Remove unnecessary hacks
3642 https://bugs.webkit.org/show_bug.cgi?id=145088
3644 Reviewed by Simon Fraser.
3648 Test: svg/text/offset-square-svg-font.html
3650 * svg/SVGToOTFFontConversion.cpp:
3651 (WebCore::SVGToOTFFontConverter::appendKERNTable):
3652 (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
3654 2015-06-01 Andreas Kling <akling@apple.com>
3656 CSS animations in filling-forwards state shouldn't force compositing.
3657 <https://webkit.org/b/145389>
3658 <rdar://problem/17923642>
3660 Reviewed by Simon Fraser.
3662 Stop checking if a CSS animation is filling forwards when computing
3663 compositing requirements.
3665 This prevents finished animations from pinning elements in composited
3666 state, and frees up a bunch of IOSurface memory on some content.
3668 * page/animation/AnimationBase.h:
3669 (WebCore::AnimationBase::isAnimatingProperty): Deleted.
3670 * rendering/RenderLayerBacking.cpp:
3671 (WebCore::RenderLayerBacking::updateGeometry):
3672 * rendering/RenderLayerCompositor.cpp:
3673 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
3675 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
3677 Out of bounds read in WebCore::ComplexTextController::adjustGlyphsAndAdvances
3678 https://bugs.webkit.org/show_bug.cgi?id=145537
3679 <rdar://problem/20959267>
3681 Reviewed by Darin Adler.
3683 U16_IS_SURROGATE_LEAD(ch) assumes U16_IS_SURROGATE(ch). In this case, that isn't true.
3685 Test: fast/text/crash-complex-text-surrogate.html
3687 * platform/graphics/mac/ComplexTextController.cpp:
3688 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
3690 2015-05-30 Zalan Bujtas <zalan@apple.com>
3692 REGRESSION (179771): zooming on facebook images covers image
3693 https://bugs.webkit.org/show_bug.cgi?id=145485
3695 Reviewed by Simon Fraser.
3697 Scaling an infinite rect should always produce an infinite rect.
3698 (Based on Simon Fraser's patch)
3700 Test: compositing/layer-creation/zoomed-clip-intersection.html
3702 * platform/graphics/LayoutRect.cpp:
3703 (WebCore::LayoutRect::scale):
3705 2015-06-01 Gyuyoung Kim <gyuyoung.kim@webkit.org>
3707 Purge PassRefPtr in WebCore/Modules - 3
3708 https://bugs.webkit.org/show_bug.cgi?id=145508
3710 Reviewed by Darin Adler.
3712 As a step to purge PassRefPtr, this patch removes PassRefPtr, then use Ref or RefPtr.
3714 * Modules/indexeddb/IDBCursor.cpp:
3715 (WebCore::IDBCursor::create):
3716 * Modules/indexeddb/IDBCursor.h:
3717 * Modules/indexeddb/IDBCursorBackend.h:
3718 (WebCore::IDBCursorBackend::create):
3719 * Modules/indexeddb/IDBCursorBackendOperations.h:
3720 (WebCore::CursorIterationOperation::create):
3721 (WebCore::CursorAdvanceOperation::create):
3722 * Modules/indexeddb/IDBDatabase.cpp:
3723 (WebCore::IDBDatabase::create):
3724 * Modules/indexeddb/IDBDatabase.h:
3725 * Modules/indexeddb/IDBDatabaseBackend.cpp:
3726 (WebCore::IDBDatabaseBackend::create):
3727 * Modules/indexeddb/IDBDatabaseBackend.h:
3728 * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
3729 (WebCore::IDBDatabaseCallbacksImpl::create):
3730 * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
3731 * Modules/indexeddb/IDBDatabaseError.h:
3732 (WebCore::IDBDatabaseError::create):
3733 * Modules/indexeddb/IDBIndex.h:
3734 (WebCore::IDBIndex::create):
3735 * Modules/indexeddb/IDBKey.h:
3736 (WebCore::IDBKey::createInvalid):
3737 (WebCore::IDBKey::createNumber):
3738 (WebCore::IDBKey::createString):
3739 (WebCore::IDBKey::createDate):
3740 (WebCore::IDBKey::createArray):
3741 * Modules/indexeddb/IDBKeyRange.cpp:
3742 (WebCore::IDBKeyRange::create):
3743 * Modules/indexeddb/IDBKeyRange.h:
3744 (WebCore::IDBKeyRange::create):
3745 * Modules/indexeddb/IDBObjectStore.cpp:
3746 * Modules/indexeddb/IDBObjectStore.h:
3747 (WebCore::IDBObjectStore::create):
3748 * Modules/indexeddb/IDBOpenDBRequest.cpp:
3749 (WebCore::IDBOpenDBRequest::create):
3750 * Modules/indexeddb/IDBOpenDBRequest.h:
3751 * Modules/indexeddb/IDBRecordIdentifier.h:
3752 (WebCore::IDBRecordIdentifier::create):
3753 * Modules/indexeddb/IDBRequest.cpp:
3754 (WebCore::IDBRequest::create):
3755 (WebCore::IDBRequest::getResultCursor):
3756 * Modules/indexeddb/IDBRequest.h:
3757 * Modules/indexeddb/IDBTransaction.cpp:
3758 (WebCore::IDBTransaction::create):
3759 * Modules/indexeddb/IDBTransaction.h:
3760 * Modules/indexeddb/IDBTransactionBackend.cpp:
3761 (WebCore::IDBTransactionBackend::create):
3762 * Modules/indexeddb/IDBTransactionBackend.h:
3763 * Modules/indexeddb/IDBTransactionBackendOperations.h:
3764 (WebCore::CreateObjectStoreOperation::create):
3765 (WebCore::DeleteObjectStoreOperation::create):
3766 (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
3767 (WebCore::CreateObjectStoreAbortOperation::create):
3768 (WebCore::DeleteObjectStoreAbortOperation::create):
3769 (WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
3770 (WebCore::CreateIndexOperation::create):
3771 (WebCore::CreateIndexAbortOperation::create):
3772 (WebCore::DeleteIndexOperation::create):
3773 (WebCore::DeleteIndexAbortOperation::create):
3774 (WebCore::GetOperation::create):
3775 (WebCore::PutOperation::create):
3776 (WebCore::SetIndexesReadyOperation::create):
3777 (WebCore::OpenCursorOperation::create):
3778 (WebCore::CountOperation::create):
3779 (WebCore::DeleteRangeOperation::create):
3780 (WebCore::ClearObjectStoreOperation::create):
3781 * Modules/mediasource/VideoPlaybackQuality.cpp:
3782 (WebCore::VideoPlaybackQuality::create):
3783 * Modules/mediasource/VideoPlaybackQuality.h:
3784 * Modules/mediastream/MediaConstraintsImpl.cpp:
3785 (WebCore::MediaConstraintsImpl::create):
3786 * Modules/mediastream/MediaConstraintsImpl.h:
3787 * Modules/mediastream/MediaStream.cpp:
3788 (WebCore::MediaStream::create):
3789 * Modules/mediastream/MediaStream.h:
3790 * Modules/mediastream/RTCDTMFSender.cpp:
3791 (WebCore::RTCDTMFSender::create):
3792 * Modules/mediastream/RTCDTMFSender.h:
3793 * Modules/mediastream/RTCOfferAnswerOptions.cpp:
3794 (WebCore::RTCOfferAnswerOptions::create):
3795 (WebCore::RTCOfferOptions::create):
3796 * Modules/mediastream/RTCOfferAnswerOptions.h:
3797 * Modules/mediastream/RTCPeerConnection.cpp:
3798 (WebCore::RTCPeerConnection::parseConfiguration):
3799 (WebCore::RTCPeerConnection::create):
3800 * Modules/mediastream/RTCPeerConnection.h:
3801 * Modules/webaudio/AudioContext.cpp:
3802 (WebCore::AudioContext::create):
3803 * Modules/webdatabase/AbstractDatabaseServer.h:
3804 * Modules/webdatabase/DOMWindowWebDatabase.cpp:
3805 (WebCore::DOMWindowWebDatabase::openDatabase):
3806 * Modules/webdatabase/DOMWindowWebDatabase.h:
3807 * Modules/webdatabase/DatabaseManager.cpp:
3808 (WebCore::DatabaseManager::existingDatabaseContextFor):
3809 (WebCore::DatabaseManager::databaseContextFor):
3810 (WebCore::DatabaseManager::openDatabase):
3811 * Modules/webdatabase/DatabaseManager.h:
3812 * Modules/webdatabase/DatabaseServer.cpp:
3813 (WebCore::DatabaseServer::openDatabase):
3814 (WebCore::DatabaseServer::createDatabase):
3815 * Modules/webdatabase/DatabaseServer.h:
3817 2015-06-01 Daniel Bates <dabates@apple.com>
3819 Notify client that we began editing when text field is focused
3820 https://bugs.webkit.org/show_bug.cgi?id=145439
3821 <rdar://problem/21142108>
3823 Reviewed by Anders Carlsson.
3825 Inform the editor client that we began editing when a text field is focused either
3826 by being explicitly focused (programmatically or by user interaction) or implicitly
3827 focused when the window became active.
3829 Currently we only notify the editor client that we began editing a text field when
3830 when a person actually changes the value of the field. And we always notify the
3831 client that we ended editing when a text field is defocused regardless of whether
3832 we executed a began editing callback. Moreover we notify a client that we
3833 ended editing when the field is defocused (either explicitly or implicitly when the
3834 window becomes inactive). Instead we should always notify the client that we began
3835 editing when the field is focused so that this callback is symmetric with the end
3838 * html/SearchInputType.cpp:
3839 (WebCore::SearchInputType::didSetValueByUserEdit): Remove parameter for ValueChangeState,
3840 which was used to determine whether we should notify the client that we began editing, because
3841 we we will notify the client that editing began when the text field is focused as opposed to
3842 when the value of text field first changes.
3843 * html/SearchInputType.h: Ditto.
3844 * html/TextFieldInputType.cpp:
3845 (WebCore::TextFieldInputType::forwardEvent): Notify the client that we began editing when
3846 the text field is focused.
3847 (WebCore::TextFieldInputType::subtreeHasChanged): Update call site of didSetValueByUserEdit()
3848 following the removal of its parameter.
3849 (WebCore::TextFieldInputType::didSetValueByUserEdit): Ditto.
3850 * html/TextFieldInputType.h:
3852 2015-06-01 Anders Carlsson <andersca@apple.com>
3854 WAKScrollView.h cannot be imported standalone
3855 https://bugs.webkit.org/show_bug.cgi?id=145529
3857 Reviewed by Dan Bernstein.
3859 * page/mac/WebCoreFrameView.h:
3860 Remove the __cplusplus #ifdefs since WebCoreFrameView.h is only used by Objective-C++ code.
3861 (The different non-C++ method declarations were wrong anyway!)
3863 * platform/ScrollTypes.h:
3864 Remove the #ifdef __cplusplus surrounding the code, add header includes to make the file self-contained,
3865 and reformat the enum definitions.
3867 2015-06-01 Alex Christensen <achristensen@webkit.org>
3869 [Content Extensions] resource-type and load-type should be independent.
3870 https://bugs.webkit.org/show_bug.cgi?id=145528
3871 rdar://problem/21190765
3873 Reviewed by Benjamin Poulain.
3875 Covered by existing tests and a new API test.
3877 Right now we use the same uint16_t to store all the load-type and resource-type flags,
3878 then we just do a bitwise and to check both at the same time. This results in a trigger
3879 with load-type and resource-type firing if either condition is met, not both conditions.
3880 A trigger with both resource-type and load-type conditions should only fire if both conditions are met.
3882 * contentextensions/DFABytecodeInterpreter.cpp:
3883 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
3884 Check and correctly handle rules with both resource-type and load-type flags.
3885 * loader/ResourceLoadInfo.h:
3886 Add masks to separate flags from resource-type and load-type.
3888 2015-06-01 Alex Christensen <achristensen@webkit.org>
3890 [Content Extensions] Reduce DFA memory usage.
3891 https://bugs.webkit.org/show_bug.cgi?id=145526
3893 Reviewed by Benjamin Poulain.
3895 * contentextensions/DFA.cpp:
3896 (WebCore::ContentExtensions::DFA::memoryUsed):
3897 (WebCore::ContentExtensions::DFANode::transitions):
3898 (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination):
3899 (WebCore::ContentExtensions::DFANode::changeFallbackTransition):
3900 (WebCore::ContentExtensions::DFANode::addFallbackTransition):
3901 (WebCore::ContentExtensions::DFANode::containsTransition):
3902 (WebCore::ContentExtensions::DFANode::kill):
3903 * contentextensions/DFA.h:
3904 * contentextensions/DFAMinimizer.cpp:
3905 (WebCore::ContentExtensions::DFAMinimizer::minimize):
3906 * contentextensions/NFAToDFA.cpp:
3907 (WebCore::ContentExtensions::NFAToDFA::convert):
3908 Use separate Vectors for the transition characters and destinations to avoid wasting memory to padding a std::pair.
3910 2015-06-01 Matt Rajca <mrajca@apple.com>
3912 Implemented the `eventTargetInterface` and `scriptExecutionContext` methods required by EventTarget, as well as
3913 some required infrastructure.
3914 https://bugs.webkit.org/show_bug.cgi?id=145523
3916 Reviewed by Eric Carlson.
3918 * Modules/mediasession/MediaRemoteControls.cpp:
3919 (WebCore::MediaRemoteControls::MediaRemoteControls): Initialize all instance variables.
3920 * Modules/mediasession/MediaRemoteControls.h: MediaRemoteControl's constructor now takes a script execution
3921 context, which we provide to EventTarget. The required eventTargetInterface method has also been implemented.
3922 (WebCore::MediaRemoteControls::create):
3923 * Modules/mediasession/MediaRemoteControls.idl: Indicate MediaRemoteControls now takes a constructor that is
3924 passed in a script execution context. To prevent build errors, event handlers have been removed until they are
3926 * WebCore.xcodeproj/project.pbxproj: We should be building the derived JSMediaRemoteControls class with WebCore.
3927 * dom/EventTargetFactory.in: Ensure a MediaRemoteControlsEventTargetInterfaceType is generated.
3929 2015-06-01 Benjamin Poulain <bpoulain@apple.com>
3931 [CSS JIT] Fail to compile when we are out of executable memory
3932 https://bugs.webkit.org/show_bug.cgi?id=145483
3933 rdar://problem/21166612
3935 Reviewed by Andreas Kling.
3937 We should use a soft failure when the Linker fails to allocate
3938 executable memory for the CSS JIT. We will just fallback to slow
3939 code when that happen, better slow CSS than crashing.
3941 Credit to Chris for finding this problem.
3943 * cssjit/SelectorCompiler.cpp:
3944 (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
3946 2015-06-01 Chris Dumez <cdumez@apple.com>
3948 ASSERT(revalidatingResource.inCache()) in MemoryCache when reloading tumblr.com
3949 https://bugs.webkit.org/show_bug.cgi?id=145518
3950 <rdar://problem/21168573>
3952 Reviewed by Darin Adler.
3954 There was an assertion in MemoryCache::revalidationSucceeded() making
3955 sure that the resource that was revalidated is still in the memory
3956 cache. However, nothing prevents this resource from being pruned while
3957 it is being revalidated. We do make sure that the resource in question
3958 cannot be destroyed though (see CachedResource::canDelete()).
3960 This patch gets rid of this assertion as it is incorrect. Also, the
3961 fact that the resource is no longer in the memory cache is not an
3962 issue. We are merely going to call MemoryCache::remove() to remove
3963 it from the memory cache before re-adding it and updating its
3964 HTTP response. The call to MemoryCache::remove() will simply be a
3965 no-op in this case and we will not have any problem adding the
3966 resource back to the memory cache because the resource is kept alive.
3968 Test: http/tests/cache/memory-cache-pruning-during-revalidation.html
3970 * loader/cache/MemoryCache.cpp:
3971 (WebCore::MemoryCache::revalidationSucceeded): Deleted.
3973 2015-06-01 Matt Rajca <mrajca@apple.com>
3975 Add stub implementation of MediaRemoteControls, part of the Media Session spec.
3976 https://bugs.webkit.org/show_bug.cgi?id=145462
3978 Reviewed by Eric Carlson.
3980 * CMakeLists.txt: Added IDL file as well as the corresponding implementation file.
3981 * DerivedSources.make: Included the new IDL file.
3982 * Modules/mediasession/MediaRemoteControls.cpp: Added an empty implementation file.
3983 (MediaRemoteControls::~MediaRemoteControls):
3984 * Modules/mediasession/MediaRemoteControls.h: Added a stubbed header file with accessors for the four attributes declared in the IDL file.
3985 (WebCore::MediaRemoteControls::previousTrackEnabled):
3986 (WebCore::MediaRemoteControls::setPreviousTrackEnabled):
3987 (WebCore::MediaRemoteControls::nextTrackEnabled):
3988 (WebCore::MediaRemoteControls::setNextTrackEnabled):
3989 (WebCore::MediaRemoteControls::seekForwardEnabled):