1 2015-06-10 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3 [Streams API] Implement pulling of a source by a ReadableStream
4 https://bugs.webkit.org/show_bug.cgi?id=145262
6 Reviewed by Darin Adler
8 Introduced abstract ReadableStream::doPull() which is overriden in ReadableJSStream.
9 Added support to call the "pull" JS callback in ReadableJSStream::doPull().
10 Added calls to pull as requested by the spec (when resolving a read callback, at start time...).
12 Fixed issue in ReadableStreamReader::read() (use of successCallback(JSValue()) in lieu of endCallback())
14 Covered by rebased tests.
16 * Modules/streams/ReadableStream.cpp:
17 (WebCore::ReadableStream::start): calling pull() once start.
18 (WebCore::ReadableStream::pull): calling doPull() if readableStream states requires to.
19 (WebCore::ReadableStream::read): calling pull() after resolving a read callback.
20 * Modules/streams/ReadableStream.h:
21 * Modules/streams/ReadableStreamReader.cpp:
22 (WebCore::ReadableStreamReader::read): fixed JSValue() bug.
23 * bindings/js/ReadableJSStream.cpp:
24 (WebCore::ReadableJSStream::doPull): calling of JS callback.
25 (WebCore::ReadableJSStream::storeException): catches exception and store them.
26 (WebCore::ReadableJSStream::storeError): refactoring for checkForException.
27 (WebCore::ReadableJSStream::enqueue):
28 * bindings/js/ReadableJSStream.h:
30 2015-06-09 Youenn Fablet <youenn.fablet@crf.canon.fr>
32 DeferredWrapper should clear its JS strong references once its promise is resolved/rejected
33 https://bugs.webkit.org/show_bug.cgi?id=145753
35 Reviewed by Darin Adler.
37 Clear strong references at the end of DeferredWrapper::resolve and DeferredWrapper::reject.
38 Added assertions to check that resolve or reject is called only once.
40 Removed DeferredWrapper constructor that creates internally its promise.
41 Reason is DeferredWrapper can be resolved synchronously and promise
42 will be lost when returning it at the end of the binding promise function.
43 Updated all custom bindings accordingly.
45 Covered by existing tests.
47 * bindings/js/JSAudioContextCustom.cpp:
48 (WebCore::JSAudioContext::suspend): Updated DeferredWrapper constructor to properly return the promise.
49 (WebCore::JSAudioContext::resume): Ditto.
50 (WebCore::JSAudioContext::close): Ditto.
51 * bindings/js/JSDOMPromise.cpp:
52 (WebCore::DeferredWrapper::resolve): Cleared strong references after promise resolution.
53 (WebCore::DeferredWrapper::reject): Cleared strong references after promise rejection.
54 * bindings/js/JSDOMPromise.h:
55 (WebCore::DeferredWrapper::resolve): Added ASSERT to check promise is not yet rejected/resolved.
56 (WebCore::DeferredWrapper::reject): Ditto.
57 (WebCore::DeferredWrapper::reject<ExceptionCode>): Ditto.
58 (WebCore::DeferredWrapper::resolve<String>): Ditto.
59 (WebCore::DeferredWrapper::resolve<bool>): Ditto.
60 (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Ditto.
62 (WebCore::DeferredWrapper::reject<String>): Ditto.
63 * bindings/js/JSMediaDevicesCustom.cpp:
64 (WebCore::JSMediaDevices::getUserMedia): Updated DeferredWrapper constructor to properly return the promise.
65 * bindings/js/JSReadableStreamReaderCustom.cpp:
66 (WebCore::JSReadableStreamReader::read): Ditto.
67 (WebCore::JSReadableStreamReader::closed): Ditto.
68 * bindings/js/JSSubtleCryptoCustom.cpp:
69 (WebCore::JSSubtleCrypto::encrypt): Ditto.
70 (WebCore::JSSubtleCrypto::decrypt): Ditto.
71 (WebCore::JSSubtleCrypto::sign): Ditto.
72 (WebCore::JSSubtleCrypto::verify): Ditto.
73 (WebCore::JSSubtleCrypto::digest): Ditto.
74 (WebCore::JSSubtleCrypto::generateKey): Ditto.
75 (WebCore::JSSubtleCrypto::importKey): Ditto.
76 (WebCore::JSSubtleCrypto::exportKey): Ditto.
77 (WebCore::JSSubtleCrypto::wrapKey): Ditto.
78 (WebCore::JSSubtleCrypto::unwrapKey): Ditto.
80 2015-06-09 Zalan Bujtas <zalan@apple.com>
82 Protect FrameView from being destroyed in Document::recalcStyle()
83 https://bugs.webkit.org/show_bug.cgi?id=143033
84 rdar://problem/20326871
86 Reviewed by Andreas Kling.
88 This patch ensures that FrameView stays valid in Document::recalcStyle().
89 It follows the defensive pattern we use to deal with the refcounted FrameView (see EventDispatcher::dispatchEvent)
91 When the iframe destroys itself in the onBeforeLoad callback (as the result of
92 PostResolutionCallbackDisabler -> HTMLObjectElement::updateWidget -> guardedDispatchBeforeLoadEvent),
93 we detach the frame and release the FrameView. However Document::recalcStyle() expects
94 the FrameView to stay valid.
96 Covered by fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html.
99 (WebCore::Document::recalcStyle):
101 2015-06-09 Daegyu Lee <daegyu.lee@navercorp.com>
103 3D-transformed video does not display on platforms without accelerated video rendering
104 https://bugs.webkit.org/show_bug.cgi?id=144782
106 Reviewed by Simon Fraser.
108 Video element does not get GraphicsLayer when MediaPlayerPrivate::supportsAcceleratedRendering() returns false
109 which means not using accelerated video decoding.
110 Although the video element gets GraphicsLayer by changing the CSS style of video element by javascript,
111 there is no way to set GraphicsLayer::setDrawsContent(true) for updating the video content.
112 As a result, after changing the CSS style, the video content does not show.
113 To avoid missing setDrawsContent(true), add conditions(!supportsAcceleratedRendering() && m_requiresOwnBackingStore).
115 Test: media/video-transformed-by-javascript.html
116 media/video-transformed-by-javascript-expected.html
118 * rendering/RenderLayerBacking.cpp:
119 (WebCore::RenderLayerBacking::containsPaintedContent):
121 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
123 REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight for text
124 https://bugs.webkit.org/show_bug.cgi?id=145830
126 Reviewed by Darin Adler.
128 The bug was caused by setSelection not updating RenderView when there is a style recalc scheduled
129 that doesn't trigger a layout. Fixed the bug by explicitly updating the selection in
130 Document::recalcStyle in that case.
132 Test: editing/selection/update-selection-by-style-change.html
135 (WebCore::Document::recalcStyle):
136 * editing/FrameSelection.cpp:
137 (WebCore::FrameSelection::updateAppearanceAfterLayout): Renamed from didLayout.
138 * editing/FrameSelection.h:
139 * page/FrameView.cpp:
140 (WebCore::FrameView::performPostLayoutTasks):
142 2015-06-09 Dean Jackson <dino@apple.com>
144 MediaControls: Reenable resize of controls on pinch zoom
145 https://bugs.webkit.org/show_bug.cgi?id=145824
146 <rdar://problem/21212778>
148 Reviewed by Darin Adler.
150 Reinstate the code that updated the scaling of the
151 controls in response to changes in page scale.
152 This time around we have to change both the controls
153 panel, and its blurry background.
155 * Modules/mediacontrols/mediaControlsApple.js:
156 (Controller.prototype.set pageScaleFactor): Deleted a comment.
157 * Modules/mediacontrols/mediaControlsiOS.css:
158 (video::-webkit-media-controls-panel-background): Set the background to pin
159 to the bottom of its view.
160 * Modules/mediacontrols/mediaControlsiOS.js:
161 (ControllerIOS.prototype.get pageScaleFactor): Basic getter, copied from mediaControlsApple.
162 (ControllerIOS.prototype.set pageScaleFactor): The setter that reacts to the page scale
163 and applies an inverse scaling on the control panel using a transform, and adjusts the
164 height on the background similarly.
166 2015-06-09 Andreas Kling <akling@apple.com>
168 GraphicsContext state stack wasting lots of memory when empty.
169 <https://webkit.org/b/145817>
171 Reviewed by Geoffrey Garen.
173 Give the GraphicsContextState stack an inline capacity of 1, and make sure
174 to free any heap-allocated backing store when the stack goes empty.
176 The 1 is because HTMLCanvasElement keeps one "save" on the underlying
177 GraphicsContext at all times, and this prevents those canvases from always
178 sitting on an empty stack with 16 capacity.
180 This saves ~520 kB on cnet.com video pages.
182 * platform/graphics/GraphicsContext.cpp:
183 (WebCore::GraphicsContext::restore):
184 * platform/graphics/GraphicsContext.h:
186 2015-06-09 Said Abou-Hallawa <sabouhallawa@apple.com>
188 SVG Fragment is not rendered if it is the css background image of an HTML element
189 https://bugs.webkit.org/show_bug.cgi?id=91790
191 Reviewed by Darin Adler.
193 To show an SVG fragment, the SVGImage has to scrollToFragment() using
194 the resource url. The changes http://trac.webkit.org/changeset/164804
195 and http://trac.webkit.org/changeset/164983 set the url of SVGImage to
196 to be used later in SVGImage::draw(). The problem is the SVGImage url
197 is only set when it is the src of an <img> tag. We did not do the same
198 thing when the SVGImage is the css background image of an HTML element.
200 The fix is to set the url of the SVGImage always when it's created by
201 the CachedImage. The CachedImage must have a valid url when the SVGImage
204 Test: svg/css/svg-resource-fragment-identifier-background.html
206 * loader/cache/CachedImage.cpp:
207 (WebCore::CachedImage::load):
208 (WebCore::CachedImage::checkShouldPaintBrokenImage):
209 Replace the calls resourceRequest().url() and m_resourceRequest.url() by
210 calling url() since they are all the same.
212 (WebCore::CachedImage::createImage): Pass the resource url to SVGImage
213 and change ImageObserver& by ImageObserver*, since null is not legal.
215 * svg/graphics/SVGImage.cpp:
216 (WebCore::SVGImage::SVGImage):
217 * svg/graphics/SVGImage.h: Add a url parameter to SVGImage constructor.
219 * svg/graphics/SVGImageCache.cpp:
220 (WebCore::SVGImageCache::findImageForRenderer): Add a new helper function.
222 (WebCore::SVGImageCache::imageSizeForRenderer):
223 (WebCore::SVGImageCache::imageForRenderer): Code clean up.
225 * svg/graphics/SVGImageCache.h: Make imageForRenderer() const.
227 * svg/graphics/SVGImageForContainer.cpp: Remove unneeded header file.
229 2015-06-09 Matt Rajca <mrajca@apple.com>
231 Add support for toggling playback in MediaSessions and MediaSessionManagers.
232 https://bugs.webkit.org/show_bug.cgi?id=145822
234 Reviewed by Eric Carlson.
236 * Modules/mediasession/MediaSession.cpp: Toggle playback of all active media elements.
237 (WebCore::MediaSession::togglePlayback):
238 * Modules/mediasession/MediaSession.h:
239 * Modules/mediasession/MediaSessionManager.cpp: Toggle playback of all media sessions as described in the
241 (WebCore::MediaSessionManager::togglePlayback):
242 * Modules/mediasession/MediaSessionManager.h:
244 2015-06-09 Darin Adler <darin@apple.com>
246 Takes two delete key presses to delete pasted emoji up-pointing index finger with skin tone
247 https://bugs.webkit.org/show_bug.cgi?id=145823
249 Reviewed by Anders Carlsson.
251 Tests: editing/deleting/delete-emoji.html
253 * rendering/RenderText.cpp:
254 (WebCore::isHangulLVT): Use constants instead of macros. Also changed to take a UChar since
255 the Hangul processing can work on UTF-16 code unit at a time and doesn't have to handle
257 (WebCore::isMark): Use U_GC_M_MASK instead of writing the algorithm out another way.
258 (WebCore::isInArmenianToLimbuRange): Added.
259 (WebCore::RenderText::previousOffsetForBackwardDeletion): Refactored for clarity and to use
260 the U16_PREV macro instead of doing what it does in a sloppier way. Added code to allow a
261 variation selector before an emoji modifier to fix the bug. Changed Hangul logic to work a
262 code unit at a time, since it can, to use an enum class, and to use constants rather than
263 all capital macros. Also changed the "dumb" case to use a more appropriate ICU macro.
265 2015-06-09 Said Abou-Hallawa <sabouhallawa@apple.com>
267 feComposite filter does not clip the paint rect to its effect rect when the operator is 'in' or 'atop'
268 https://bugs.webkit.org/show_bug.cgi?id=137856
270 Reviewed by Darin Adler.
272 There was bug in calculating the absolutePaintRect of the feComposite filter
273 when the operator is equal to 'in' or 'atop'. The absolutePaintRect was set
274 to the absolutePaintRect of the background FilterEffect which is correct.
275 What was missing is clipping this rectangle to the maxEffectRect of the
276 filter which we do for other operators.
278 Tests: svg/filters/feComposite-background-rect-control-operators.svg
280 * platform/graphics/IntRect.h:
281 (WebCore::operator-=):
282 (WebCore::operator-): Add new operators to IntRect.
284 * platform/graphics/filters/FEComposite.cpp:
285 (WebCore::FEComposite::determineAbsolutePaintRect): Make sure the filter
286 absolutePaintRect is clipped to maxEffectRect for all operators.
288 (WebCore::FEComposite::platformApplySoftware): Code clean-up.
290 * platform/graphics/filters/FilterEffect.cpp:
291 (WebCore::FilterEffect::determineAbsolutePaintRect): Move the clipping
292 part to a separate function.
294 (WebCore::FilterEffect::clipAbsolutePaintRect): Clip the absolutePaintRect
295 to the maxEffectRect of the filter.
297 * platform/graphics/filters/FilterEffect.h:
299 2015-06-09 Matt Rajca <mrajca@apple.com>
301 Implement MediaSessionManager to keep track of all MediaSessions.
302 https://bugs.webkit.org/show_bug.cgi?id=145806
304 Reviewed by Eric Carlson.
306 * Modules/mediasession/MediaSession.cpp:
307 (WebCore::MediaSession::MediaSession): Add ourselves to the MediaSessionManager upon construction.
308 (WebCore::MediaSession::~MediaSession): Remove ourselves from the MediaSessionManager before destruction.
309 * Modules/mediasession/MediaSessionManager.cpp: Added to keep track of all living MediaSessions.
310 (WebCore::MediaSessionManager::singleton):
311 (WebCore::MediaSessionManager::addMediaSession):
312 (WebCore::MediaSessionManager::removeMediaSession):
313 * Modules/mediasession/MediaSessionManager.h: Added.
314 * WebCore.xcodeproj/project.pbxproj: Added new MediaSessionManager sources.
316 2015-06-09 Ryuan Choi <ryuan.choi@navercorp.com>
318 [CoordinatedGraphics] Remove RefCounted from Tile
319 https://bugs.webkit.org/show_bug.cgi?id=145788
321 Reviewed by Darin Adler.
323 Since r185140, Tile does not need to be RefCounted.
325 No new tests, no behavior changes.
327 * platform/graphics/texmap/coordinated/Tile.cpp:
328 (WebCore::Tile::create): Deleted.
329 * platform/graphics/texmap/coordinated/Tile.h:
330 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
331 (WebCore::TiledBackingStore::invalidate):
332 (WebCore::TiledBackingStore::updateTileBuffers): Simplifies not to use unnecessary Vector.
333 (WebCore::TiledBackingStore::coverageRatio):
334 (WebCore::TiledBackingStore::createTiles):
335 (WebCore::TiledBackingStore::resizeEdgeTiles):
336 (WebCore::TiledBackingStore::setKeepRect):
337 (WebCore::TiledBackingStore::tileAt): Deleted one line wrapper.
338 (WebCore::TiledBackingStore::setTile): Ditto.
339 (WebCore::TiledBackingStore::removeTile): Ditto.
340 * platform/graphics/texmap/coordinated/TiledBackingStore.h:
342 2015-06-09 Chris Dumez <cdumez@apple.com>
344 Allow one sync GC per gcTimer interval on critical memory pressure warning
345 https://bugs.webkit.org/show_bug.cgi?id=145773
347 Reviewed by Geoffrey Garen.
349 * bindings/js/GCController.cpp:
350 (WebCore::GCController::garbageCollectNowIfNotDoneRecently):
352 Add new GCController::garbageCollectNowIfNotDoneRecently() API that
353 allows one synchronous GC per full GC timer interval. If called more
354 than once per interval, it becomes equivalent to garbageCollectSoon()
355 and merely accelerates the next collection.
357 * bindings/js/GCController.h:
358 * platform/MemoryPressureHandler.cpp:
359 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
361 Call the new GCController::garbageCollectNowIfNotDoneRecently() on
362 critical memory pressure instead of garbageCollectionSoon() to try
363 as do a synchronous GC if one wasn't already done recently.
364 Also drop call to fullSweep() as GCController::garbageCollectNow*()
365 already do a sweep after the collection.
367 2015-06-09 Darin Adler <darin@apple.com>
370 JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
371 https://bugs.webkit.org/show_bug.cgi?id=145811
373 There was one unusual case in the bindings generator that was depending on this.
375 * bindings/js/JSDOMBinding.h:
376 (WebCore::argumentOrNull): Deleted.
377 * bindings/scripts/CodeGeneratorJS.pm:
378 (GenerateParametersCheck): Stop using argumentOrNull.
379 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Updated.
380 * bindings/scripts/test/JS/JSTestObj.cpp: Updated.
382 2015-06-09 Darin Adler <darin@apple.com>
384 JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
385 https://bugs.webkit.org/show_bug.cgi?id=145811
387 Reviewed by Antti Koivisto.
389 At some point, someone who didn't understand JSValue very well added checks for
390 isEmpty (and the function isEmpty itself) in JavaScript bindings. But the engine
391 never would pass an empty JSValue to a binding; that's used only inside the
392 engine itself. I think this was done by some Google V8 experts a while back, so
393 it's not entirely surprising they didn't understand this. But we don't want to
394 keep all that unneeded code.
396 * bindings/js/JSAudioTrackCustom.cpp:
397 (WebCore::JSAudioTrack::setKind): Removed the isEmpty clause here. I presume this
398 was copied and pasted from script-generated bindings. While I was at it, I used a
399 slightly more efficient code path that avoids doing a ref/deref on the string by
400 using auto&. That's trickier to do correctly for functions with more than one
401 argument, so I didn't do it in the bindings generator yet.
402 (WebCore::JSAudioTrack::setLanguage): Ditto.
403 * bindings/js/JSTextTrackCustom.cpp:
404 (WebCore::JSTextTrack::setKind): Ditto.
405 (WebCore::JSTextTrack::setLanguage): Ditto.
406 * bindings/js/JSVideoTrackCustom.cpp:
407 (WebCore::JSVideoTrack::setKind): Ditto.
408 (WebCore::JSVideoTrack::setLanguage): Ditto.
410 * bindings/scripts/CodeGeneratorJS.pm:
411 (GenerateImplementation): Use "=" syntax instead of constructor style syntax for
412 the argument processing. I think this is more readable.
413 (GenerateParametersCheck): For the enum code path, did the more efficient auto&
414 idiom to avoid ref/deref on a string. For the toExistingAtomicString path,
415 restructured so we don't have to check the flag indicating that something is atomic.
416 Later we could also avoid the ref/deref; added a FIXME about that.
417 (GetNativeType): Use String, not const String, for local variables. Sure, the
418 string is const, but so is every other local variable type we use! No need to be
420 (JSValueToNative): Removed the uneeded calls to isEmpty. Since the call sites no
421 longer use construction syntax, used initializer syntax style for a couple classes
422 that are constructed with multiple arguments.
424 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated.
425 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
426 * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
427 * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
428 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
429 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
430 * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
431 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
432 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
433 * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
435 2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
437 Fix unused private field warning in GraphicsLayerUpdater.h
438 https://bugs.webkit.org/show_bug.cgi?id=145757
440 Reviewed by Darin Adler.
442 * platform/graphics/GraphicsLayerUpdater.cpp:
443 (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
444 * platform/graphics/GraphicsLayerUpdater.h:
446 2015-06-09 Yusuke Suzuki <utatane.tea@gmail.com>
448 Crash when passing Symbol to NPAPI plugin objects
449 https://bugs.webkit.org/show_bug.cgi?id=145798
451 Reviewed by Darin Adler.
453 Test: plugins/npruntime/script-object-with-symbols.html
455 For C bridge APIs, we add guards for symbols.
456 This is the same to the existing guards in Objective-C APIs.
458 * bridge/c/c_class.cpp:
459 (JSC::Bindings::CClass::methodNamed):
460 (JSC::Bindings::CClass::fieldNamed):
461 * bridge/objc/objc_class.mm:
462 (JSC::Bindings::ObjcClass::methodNamed):
463 (JSC::Bindings::ObjcClass::fieldNamed):
464 (JSC::Bindings::ObjcClass::fallbackObject):
466 2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
468 [cmake] Fix the style issues in cmake project files
469 https://bugs.webkit.org/show_bug.cgi?id=145755
471 Reviewed by Darin Adler.
478 * PlatformWinCairo.cmake:
480 2015-06-09 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
482 [Streams API] ReadableJSStream should handle JS source getters that throw
483 https://bugs.webkit.org/show_bug.cgi?id=145600
485 Reviewed by Darin Adler.
487 Checking whether there is an exception when trying to access to a source method.
488 If so, rethrowing it in case of "start".
490 Refactoring of code to prepare pulling, cancelling and additional parameter handling in ReadableStream construtor.
492 Fixed the case of ReadableStream constructor called with an undefined parameter.
494 Covered by rebased test expectation.
496 * bindings/js/JSReadableStreamCustom.cpp:
497 (WebCore::constructJSReadableStream): Refactoring to group all parameter check and exception handling in ReadableJSStream::create.
498 * bindings/js/ReadableJSStream.cpp:
499 (WebCore::getPropertyFromObject):
500 (WebCore::callFunction):
501 (WebCore::ReadableJSStream::invoke): Added method to be used also for pulling and cancelling.
502 (WebCore::ReadableJSStream::doStart):
503 (WebCore::ReadableJSStream::create):
504 * bindings/js/ReadableJSStream.h:
506 2015-06-08 Dan Bernstein <mitz@apple.com>
508 Made MicroTask.h a project header.
510 Rubber-stamped by Anders Carlsson.
512 * WebCore.xcodeproj/project.pbxproj: Demoted MicroTask.h from Public to Project. WebCore
513 doesn’t have public headers, and this header isn’t used by WebKit.
515 2015-06-08 Gyuyoung Kim <gyuyoung.kim@webkit.org>
517 Purge PassRefPtr in JavaScriptCore
518 https://bugs.webkit.org/show_bug.cgi?id=145750
520 Reviewed by Darin Adler.
522 As a step to purge PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.
524 No new tests, no behavior changes.
526 * bindings/js/JSDOMWindowBase.cpp:
527 (WebCore::JSDOMWindowBase::commonVM):
529 2015-06-08 Zalan Bujtas <zalan@apple.com>
531 Subpixel rendering: Clip-path does not work properly on subpixel positions.
532 https://bugs.webkit.org/show_bug.cgi?id=145749
533 rdar://problem/20824305
535 Reviewed by Simon Fraser.
537 This patch ensures that clip-path is device pixel snapped both for composited and
538 non-composited content.
540 Tests: compositing/masks/compositing-clip-path-on-subpixel-position.html
541 fast/masking/clip-path-on-subpixel-position.html
543 * rendering/RenderLayer.cpp:
544 (WebCore::RenderLayer::setupClipPath):
545 * rendering/RenderLayerBacking.cpp:
546 (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
548 2015-06-08 Chris Dumez <cdumez@apple.com>
550 Access GCController instance via GCController::singleton() instead of a free function
551 https://bugs.webkit.org/show_bug.cgi?id=145776
553 Reviewed by Darin Adler.
555 Access GCController instance via GCController::singleton() instead of a
556 free function as per coding style and for consistency with other
557 singleton classes in the codebase.
559 * bindings/js/GCController.cpp:
560 (WebCore::GCController::singleton):
561 (WebCore::gcController): Deleted.
562 * bindings/js/GCController.h:
563 * bindings/js/JSDOMWindowShell.cpp:
564 (WebCore::JSDOMWindowShell::setWindow):
565 * bindings/js/ScriptCachedFrameData.cpp:
566 (WebCore::ScriptCachedFrameData::clear):
567 * bindings/js/ScriptController.cpp:
568 (WebCore::collectGarbageAfterWindowShellDestruction):
569 * platform/MemoryPressureHandler.cpp:
570 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
572 2015-06-08 Daniel Bates <dabates@apple.com>
574 Mouse release on AutoFill button activates it; should only activate on click
575 https://bugs.webkit.org/show_bug.cgi?id=145774
576 <rdar://problem/21069245>
578 Reviewed by Ryosuke Niwa.
580 Fixes an issue where a click event was dispatched to a shadow tree node regardless of whether
581 both the mouse press and mouse release were targeted at it. In particular, releasing the mouse
582 on the AutoFill button activates it regardless of whether the mouse was pressed on it.
584 Currently we always dispatch a click event to a node n where the mouse was released when n is
585 in a shadow tree regardless of whether the mouse was pressed on n. Instead we should only
586 dispatch a click event to n if the mouse was pressed and released on n. If n is a shadow tree
587 descendant, the mouse was released on n, and n never received a mouse press then we should
588 dispatch the click event at the shadow host element of n to preserve the illusion to web
589 developers that the shadow host element is a single element.
591 Test: fast/forms/auto-fill-button/mouse-down-input-mouse-release-auto-fill-button.html
593 * page/EventHandler.cpp:
594 (WebCore::targetNodeForClickEvent): Added; returns the target node for the DOM click event.
595 (WebCore::EventHandler::handleMouseReleaseEvent): Modified to use dispatch the DOM click event
596 at the node returned by targetNodeForClickEvent().
597 (WebCore::mouseIsReleasedOnPressedElement): Deleted.
599 2015-06-08 Chris Dumez <cdumez@apple.com>
601 WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
602 https://bugs.webkit.org/show_bug.cgi?id=145748
603 <rdar://problem/21226577>
605 Reviewed by Brady Eidson.
607 We would sometimes crash when pruning the PageCache because it was
608 possible for frames to still be loading while in the PageCache and
609 we would try to stop the load when the CachedFrame is destroyed. This
610 code path was not supposed to be exercised as we were not supposed to
611 have pages still loading inside the PageCache.
613 r185017 made sure we don't insert into the PageCache pages that are
614 still loading. However, nothing was preventing content from starting
615 new loads in their 'pagehide' event handlers, *after* the decision
616 to put the page in the PageCache was made.
618 This patch prevents content from starting loads from a 'pagehide'
619 event handler so that we can no longer have content that is loading
620 inside the PageCache. 'ping' image loads still go through though as
621 these are specially handled and use PingLoaders.
623 Tests: http/tests/navigation/image-load-in-pagehide-handler.html
624 http/tests/navigation/subframe-pagehide-handler-starts-load.html
625 http/tests/navigation/subframe-pagehide-handler-starts-load2.html
627 * loader/FrameLoader.cpp:
628 (WebCore::FrameLoader::FrameLoader):
629 (WebCore::FrameLoader::stopLoading):
630 (WebCore::FrameLoader::loadURL):
631 (WebCore::FrameLoader::loadWithDocumentLoader):
632 (WebCore::FrameLoader::stopAllLoaders):
633 (WebCore::FrameLoader::handleBeforeUnloadEvent):
634 * loader/FrameLoader.h:
635 (WebCore::FrameLoader::pageDismissalEventBeingDispatched):
636 (WebCore::FrameLoader::PageDismissalEventType::PageDismissalEventType):
637 (WebCore::FrameLoader::PageDismissalEventType::operator Page::DismissalType):
639 Add wrapper class for m_pageDismissalEventBeingDispatched member type.
640 The wrapper takes care of updating the m_dismissalEventBeingDispatched
641 member on the Page every time the member on FrameLoader is updated. We
642 now cache this information on the Page so that clients can cheaply
643 query if a dismissal event is being dispatched in any of the Page's
644 frame, without having to traverse the frame tree.
646 * loader/ImageLoader.cpp:
647 (WebCore::pageIsBeingDismissed):
649 * loader/cache/CachedResource.cpp:
650 (WebCore::CachedResource::load):
652 Abort the load early if we are currently dispatching a 'pagehide'
653 event. We don't allow new loads at such point because we've already
654 made the decision to add the Page to the PageCache.
656 * loader/cache/CachedResourceLoader.cpp:
657 (WebCore::CachedResourceLoader::requestImage):
660 (WebCore::Chrome::runModal): Deleted.
661 (WebCore::Chrome::setToolbarsVisible): Deleted.
662 (WebCore::Chrome::toolbarsVisible): Deleted.
663 (WebCore::Chrome::runJavaScriptConfirm): Deleted.
664 (WebCore::Chrome::runJavaScriptPrompt): Deleted.
665 (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
667 * page/ChromeClient.h:
668 * page/DOMWindow.cpp:
669 (WebCore::DOMWindow::canShowModalDialogNow):
671 Drop ChromeClient::shouldRunModalDialogDuringPageDismissal() and code
672 using it as it is unused and I did not think it was worth updating
676 (WebCore::Page::dismissalEventBeingDispatched):
677 (WebCore::Page::setDismissalEventBeingDispatched):
679 Add a m_dismissalEventBeingDispatched member to the Page so that we can
680 easily query if a dismissal event is being dispatched in any of the
681 frames, without having to traverse the frame tree. I suspect more call
682 sites of FrameLoader::pageDismissalEventBeingDispatched() may actually
683 want this but I did not make such change in this patch. It is important
684 to check all the frames and not simply the current one because a frame's
685 pagehide event handler may trigger a load in another frame.
687 2015-06-08 Hunseop Jeong <hs85.jeong@samsung.com>
689 Replaced 0 with nullptr in WebCore/Modules.
690 https://bugs.webkit.org/show_bug.cgi?id=145758
692 Reviewed by Darin Adler.
694 No new tests, no behavior changes.
696 * Modules/battery/BatteryManager.cpp:
697 (WebCore::BatteryManager::BatteryManager):
698 * Modules/encryptedmedia/CDM.cpp:
700 * Modules/encryptedmedia/MediaKeys.cpp:
701 (WebCore::MediaKeys::MediaKeys):
702 (WebCore::MediaKeys::~MediaKeys):
703 * Modules/indexeddb/IDBCursor.h:
704 (WebCore::IDBCursor::continueFunction):
705 * Modules/indexeddb/IDBCursorBackendOperations.cpp:
706 (WebCore::CursorAdvanceOperation::perform):
707 (WebCore::CursorIterationOperation::perform):
708 * Modules/indexeddb/IDBDatabase.cpp:
709 (WebCore::IDBDatabase::transactionFinished):
710 * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
711 (WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl):
712 * Modules/indexeddb/IDBEventDispatcher.cpp:
713 (WebCore::IDBEventDispatcher::dispatch):
714 * Modules/indexeddb/IDBIndex.h:
715 (WebCore::IDBIndex::openCursor):
716 (WebCore::IDBIndex::count):
717 (WebCore::IDBIndex::openKeyCursor):
718 * Modules/indexeddb/IDBObjectStore.cpp:
719 (WebCore::IDBObjectStore::add):
720 (WebCore::IDBObjectStore::put):
721 (WebCore::IDBObjectStore::index):
722 (WebCore::IDBObjectStore::openCursor):
723 * Modules/indexeddb/IDBObjectStore.h:
724 (WebCore::IDBObjectStore::count):
725 * Modules/indexeddb/IDBOpenDBRequest.cpp:
726 (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
727 (WebCore::IDBOpenDBRequest::onSuccess):
728 * Modules/indexeddb/IDBRequest.cpp:
729 (WebCore::IDBRequest::IDBRequest):
730 * Modules/indexeddb/IDBTransaction.cpp:
731 (WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished):
732 * Modules/indexeddb/IDBTransactionBackend.cpp:
733 (WebCore::IDBTransactionBackend::commit):
734 * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
735 (WebCore::OpenCursorOperation::perform):
736 * Modules/indieui/UIRequestEvent.cpp:
737 (WebCore::UIRequestEventInit::UIRequestEventInit):
738 (WebCore::UIRequestEvent::UIRequestEvent):
739 * Modules/mediasource/MediaSource.cpp:
740 (WebCore::MediaSource::MediaSource):
741 (WebCore::MediaSource::setReadyState):
742 (WebCore::MediaSource::removeSourceBuffer):
743 * Modules/mediasource/SourceBuffer.cpp:
744 (WebCore::SourceBuffer::~SourceBuffer):
745 (WebCore::SourceBuffer::removedFromMediaSource):
746 * Modules/mediastream/MediaStream.cpp:
747 (WebCore::MediaStream::~MediaStream):
748 * Modules/mediastream/MediaStreamEvent.cpp:
749 (WebCore::MediaStreamEventInit::MediaStreamEventInit):
750 * Modules/mediastream/MediaStreamTrackEvent.cpp:
751 (WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit):
752 * Modules/mediastream/RTCDataChannel.cpp:
753 (WebCore::RTCDataChannel::stop):
754 * Modules/mediastream/UserMediaRequest.cpp:
755 (WebCore::UserMediaRequest::contextDestroyed):
756 * Modules/notifications/Notification.cpp:
757 (WebCore::Notification::Notification):
758 * Modules/notifications/Notification.h:
759 * Modules/speech/SpeechSynthesis.cpp:
760 (WebCore::SpeechSynthesis::SpeechSynthesis):
761 (WebCore::SpeechSynthesis::setPlatformSynthesizer):
762 (WebCore::SpeechSynthesis::cancel):
763 (WebCore::SpeechSynthesis::handleSpeakingCompleted):
764 * Modules/speech/SpeechSynthesisUtterance.cpp:
765 (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
766 * Modules/webaudio/AudioBufferSourceNode.cpp:
767 (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
768 (WebCore::AudioBufferSourceNode::clearPannerNode):
769 * Modules/webaudio/AudioContext.cpp:
770 (WebCore::AudioContext::createMediaStreamSource):
771 * Modules/webaudio/MediaElementAudioSourceNode.cpp:
772 (WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode):
773 * Modules/webaudio/OscillatorNode.cpp:
774 (WebCore::OscillatorNode::setType):
775 (WebCore::OscillatorNode::process):
776 * Modules/webdatabase/DatabaseManager.cpp:
777 (WebCore::DatabaseManager::DatabaseManager):
778 * Modules/webdatabase/DatabaseThread.cpp:
779 (WebCore::DatabaseThread::DatabaseThread):
780 (WebCore::DatabaseThread::databaseThread):
781 * Modules/webdatabase/DatabaseThread.h:
782 * Modules/webdatabase/DatabaseTracker.cpp:
783 (WebCore::DatabaseTracker::DatabaseTracker):
784 * Modules/webdatabase/SQLCallbackWrapper.h:
785 (WebCore::SQLCallbackWrapper::clear):
786 (WebCore::SQLCallbackWrapper::unwrap):
787 * Modules/webdatabase/SQLStatementBackend.cpp:
788 (WebCore::SQLStatementBackend::clearFailureDueToQuota):
789 * Modules/webdatabase/SQLTransaction.cpp:
790 (WebCore::SQLTransaction::deliverTransactionErrorCallback):
791 * Modules/webdatabase/SQLTransactionBackend.cpp:
792 (WebCore::SQLTransactionBackend::doCleanup):
793 (WebCore::SQLTransactionBackend::getNextStatement):
794 * Modules/webdatabase/SQLTransactionCoordinator.cpp:
795 (WebCore::SQLTransactionCoordinator::releaseLock):
796 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
797 (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
798 (WebCore::ThreadableWebSocketChannelClientWrapper::clearPeer):
799 (WebCore::ThreadableWebSocketChannelClientWrapper::clearClient):
800 * Modules/websockets/WebSocket.cpp:
801 (WebCore::WebSocket::stop):
802 * Modules/websockets/WebSocketChannel.cpp:
803 (WebCore::WebSocketChannel::disconnect):
804 (WebCore::WebSocketChannel::didCloseSocketStream):
805 * Modules/websockets/WebSocketFrame.h:
806 * Modules/websockets/WebSocketHandshake.cpp:
807 (WebCore::WebSocketHandshake::clearScriptExecutionContext):
808 (WebCore::WebSocketHandshake::readStatusLine):
809 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
810 (WebCore::WorkerThreadableWebSocketChannel::Peer::disconnect):
811 (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
812 (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
814 2015-06-08 Chris Fleizach <cfleizach@apple.com>
816 AX: improve list heuristics (presentational use versus actual lists)
817 ​https://bugs.webkit.org/show_bug.cgi?id=134187
819 Unreviewed. Rolling this change out temporarily.
821 * accessibility/AccessibilityList.cpp:
822 (WebCore::AccessibilityList::isDescriptionList):
823 (WebCore::AccessibilityList::determineAccessibilityRole):
824 (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): Deleted.
825 * accessibility/AccessibilityList.h:
827 2015-06-08 Eric Carlson <eric.carlson@apple.com>
829 [Mac] Enable AVFoundation by default when QTKit is disabled by default
830 https://bugs.webkit.org/show_bug.cgi?id=145760
832 Reviewed by Alexey Proskuryakov.
834 No new tests, this change makes existing tests pass.
836 Settings::gAVFoundationEnabled defaults to true.
839 (WebCore::invalidateAfterGenericFamilyChange):
841 2015-06-08 Ryosuke Niwa <rniwa@webkit.org>
843 Explicitly dismiss correction panel when user types a new character
844 https://bugs.webkit.org/show_bug.cgi?id=145732
845 <rdar://problem/19596892>
847 Reviewed by Darin Adler.
849 Explicitly dismiss the correction panel when the user types a new character.
850 This patch shouldn't change any behavior we're currently relying on AppKit to do the same.
852 Manually ran tests in ManualTests/autocorrection.
854 * editing/AlternativeTextController.cpp:
855 (WebCore::AlternativeTextController::respondToAppliedEditing):
857 2015-06-08 Javier Fernandez <jfernandez@igalia.com>
859 [CSS Grid Layout] Setting height on a grid item doesn't have any effect
860 https://bugs.webkit.org/show_bug.cgi?id=145604
862 Reviewed by Sergio Villar Senin.
864 Box Alignment spec states that stretch is only possible when height is
865 'auto' and no 'auto' margins are used.
867 It might be the case that style changes so that stretching is not allowed,
868 hence we need to detect it and clear the override height the stretching
869 algorithm previously set. The new layout triggered by the style change
870 will then set grid item's height according to the new style rules.
872 Test: fast/css-grid-layout/grid-item-should-not-be-stretched-when-height-or-margin-change.html
874 * rendering/RenderGrid.cpp:
875 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
877 2015-06-08 Brady Eidson <beidson@apple.com>
879 Completely remove all IDB properties/constructors when it is disabled at runtime.
880 rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034
882 Reviewed by Geoffrey Garen.
884 Test: storage/indexeddb/properties-disabled-at-runtime.html
886 - Make constructors all runtime enabled.
887 - Remove autogeneration of the window.(webkit)indexedDB accessors.
888 - Add manual overrides for the (webkit)indexedDB accessors at runtime.
890 * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
891 * Modules/indexeddb/IDBAny.idl:
892 * Modules/indexeddb/IDBCursor.idl:
893 * Modules/indexeddb/IDBCursorWithValue.idl:
894 * Modules/indexeddb/IDBDatabase.idl:
895 * Modules/indexeddb/IDBFactory.idl:
896 * Modules/indexeddb/IDBIndex.idl:
897 * Modules/indexeddb/IDBKeyRange.idl:
898 * Modules/indexeddb/IDBObjectStore.idl:
899 * Modules/indexeddb/IDBOpenDBRequest.idl:
900 * Modules/indexeddb/IDBRequest.idl:
901 * Modules/indexeddb/IDBTransaction.idl:
902 * Modules/indexeddb/IDBVersionChangeEvent.idl:
903 * page/DOMWindow.idl:
905 * bindings/js/JSDOMWindowCustom.cpp:
906 (WebCore::jsDOMWindowIndexedDB):
907 (WebCore::JSDOMWindow::getOwnPropertySlot):
909 2015-06-08 Michael Catanzaro <mcatanzaro@igalia.com>
911 [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
912 https://bugs.webkit.org/show_bug.cgi?id=145542
914 Reviewed by Alexey Proskuryakov.
916 No new tests, because it's hard to test whether a DNS request has been sent. We could do
917 this by adding new API to modify the GProxyResolver and GResolver used by the SoupSession in
918 the network process, but even if such API were desirable, it would be a big job. Tests
919 should not be allowed to dictate our public API.
921 * platform/network/DNSResolveQueue.cpp:
922 (WebCore::DNSResolveQueue::add): Do not check whether the system is using a proxy, since
923 this can't be determined for all ports here.
924 (WebCore::DNSResolveQueue::timerFired): Do not check whether the system is using a proxy,
925 since this can't be determined for all ports here.
926 (WebCore::DNSResolveQueue::DNSResolveQueue): Remove member variables and member functions
927 that are only needed by the CF backend. Rename platformResolve to
928 platformMaybeResolveHost.
929 (WebCore::DNSResolveQueue::isUsingProxy): Moved to DNSCFNet.cpp.
930 * platform/network/DNSResolveQueue.h: Remove member variables that are only needed by the
932 * platform/network/cf/DNSCFNet.cpp:
933 (WebCore::proxyIsEnabledInSystemPreferences): Renamed from
934 platformProxyIsEnabledInSystemPreferences.
935 (WebCore::isUsingProxy): Moved from DNSResolveQueue.cpp. The member variables removed from
936 DNSResolveQueue are not static here. This is safe since it's a singleton.
937 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
938 Bail early from here if a proxy is configured.
939 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Renamed to
940 proxyIsEnabledInSystemPreferences.
941 (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
942 * platform/network/soup/DNSSoup.cpp:
943 (WebCore::gotProxySettingsCallback): Added. Call soup_session_prefetch_dns from here only
944 if a proxy would not be used to resolve the host.
945 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
946 Look up proxy settings using g_proxy_resolver_lookup_async rather than calling
947 soup_session_prefetch_dns directly.
948 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
949 (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
951 2015-06-08 Hunseop Jeong <hs85.jeong@samsung.com>
953 Use modern for-loops in WebCore/Modules - 2
954 https://bugs.webkit.org/show_bug.cgi?id=145541
956 Reviewed by Darin Adler.
958 No new tests, no behavior changes.
960 * Modules/mediastream/RTCConfiguration.h:
961 (WebCore::RTCConfiguration::iceServers):
962 * Modules/mediastream/RTCDTMFSender.cpp:
963 (WebCore::RTCDTMFSender::scheduledEventTimerFired):
964 * Modules/mediastream/RTCDataChannel.cpp:
965 (WebCore::RTCDataChannel::scheduledEventTimerFired):
966 * Modules/mediastream/RTCPeerConnection.cpp:
967 (WebCore::processIceServer):
968 (WebCore::RTCPeerConnection::~RTCPeerConnection):
969 (WebCore::RTCPeerConnection::getStreamById):
970 (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
971 (WebCore::RTCPeerConnection::stop):
972 (WebCore::RTCPeerConnection::scheduledEventTimerFired):
973 * Modules/mediastream/RTCStatsReport.cpp:
974 (WebCore::RTCStatsReport::names):
975 * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
976 (WebCore::initProtocolHandlerWhitelist):
977 * Modules/speech/SpeechSynthesis.cpp:
978 (WebCore::SpeechSynthesis::getVoices):
979 * Modules/webaudio/AudioBuffer.cpp:
980 (WebCore::AudioBuffer::memoryCost):
981 * Modules/webaudio/AudioContext.cpp:
982 (WebCore::AudioContext::createMediaStreamSource):
983 (WebCore::AudioContext::derefFinishedSourceNodes):
984 (WebCore::AudioContext::derefUnfinishedSourceNodes):
985 (WebCore::AudioContext::handleDeferredFinishDerefs):
986 (WebCore::AudioContext::handleDirtyAudioSummingJunctions):
987 (WebCore::AudioContext::handleDirtyAudioNodeOutputs):
988 (WebCore::AudioContext::updateAutomaticPullNodes):
989 (WebCore::AudioContext::processAutomaticPullNodes):
990 * Modules/webaudio/AudioNode.cpp:
991 (WebCore::AudioNode::updateChannelsForInputs):
992 (WebCore::AudioNode::checkNumberOfChannelsForInput):
993 (WebCore::AudioNode::pullInputs):
994 (WebCore::AudioNode::inputsAreSilent):
995 (WebCore::AudioNode::silenceOutputs):
996 (WebCore::AudioNode::unsilenceOutputs):
997 (WebCore::AudioNode::enableOutputsIfNecessary):
998 (WebCore::AudioNode::disableOutputsIfNecessary):
999 (WebCore::AudioNode::finishDeref):
1000 * Modules/webaudio/AudioNodeInput.cpp:
1001 (WebCore::AudioNodeInput::numberOfChannels):
1002 (WebCore::AudioNodeInput::sumAllConnections):
1003 * Modules/webaudio/AudioNodeOutput.cpp:
1004 (WebCore::AudioNodeOutput::propagateChannelCount):
1005 (WebCore::AudioNodeOutput::disable):
1006 (WebCore::AudioNodeOutput::enable):
1007 * Modules/webaudio/AudioParam.cpp:
1008 (WebCore::AudioParam::calculateFinalValues):
1009 * Modules/webaudio/AudioParamTimeline.cpp:
1010 (WebCore::AudioParamTimeline::insertEvent):
1011 * Modules/webaudio/AudioSummingJunction.cpp:
1012 (WebCore::AudioSummingJunction::updateRenderingState):
1013 * Modules/webaudio/MediaStreamAudioSource.cpp:
1014 (WebCore::MediaStreamAudioSource::setAudioFormat):
1015 (WebCore::MediaStreamAudioSource::consumeAudio):
1016 * Modules/webaudio/WaveShaperProcessor.cpp:
1017 (WebCore::WaveShaperProcessor::setOversample):
1018 * Modules/webdatabase/DatabaseThread.cpp:
1019 (WebCore::DatabaseThread::handlePausedQueue):
1020 (WebCore::DatabaseThread::databaseThread):
1021 * Modules/webdatabase/DatabaseTracker.cpp:
1022 (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
1023 (WebCore::DatabaseTracker::databaseNamesForOrigin):
1024 (WebCore::DatabaseTracker::getOpenDatabases):
1025 (WebCore::DatabaseTracker::usageForOrigin):
1026 (WebCore::DatabaseTracker::deleteAllDatabases):
1027 (WebCore::DatabaseTracker::deleteOrigin):
1028 (WebCore::DatabaseTracker::deleteDatabaseFile):
1029 (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
1030 (WebCore::DatabaseTracker::setDatabasesPaused):
1031 * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1032 (WebCore::SQLTransactionCoordinator::shutdown):
1033 * Modules/websockets/WebSocket.cpp:
1034 (WebCore::WebSocket::connect):
1035 * Modules/websockets/WebSocketExtensionDispatcher.cpp:
1036 (WebCore::WebSocketExtensionDispatcher::addProcessor):
1037 (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
1038 (WebCore::WebSocketExtensionDispatcher::processHeaderValue):
1039 * Modules/websockets/WebSocketHandshake.cpp:
1040 (WebCore::WebSocketHandshake::clientHandshakeMessage):
1042 2015-06-07 Darin Adler <darin@apple.com>
1044 REGRESSION (r181720): Unnecessary layout triggered any time animated GIF advances to a new frame
1045 https://bugs.webkit.org/show_bug.cgi?id=145733
1047 Reviewed by Andreas Kling.
1049 Test: fast/images/animated-gif-no-layout.html
1051 * rendering/RenderImage.cpp:
1052 (WebCore::RenderImage::styleDidChange): Correctly pass ImageSizeChangeNone in cases
1053 where we don't need to report a change in intrinsic size that happened outside the
1054 repaintOrMarkForLayout function.
1055 (WebCore::RenderImage::repaintOrMarkForLayout): Move work that should only be done
1056 when size changed inside the if statement.
1058 * testing/Internals.cpp:
1059 (WebCore::Internals::layoutCount): Added.
1060 * testing/Internals.h: Added layoutCount.
1061 * testing/Internals.idl: Ditto.
1063 2015-06-07 Michael Catanzaro <mcatanzaro@igalia.com>
1065 Fix strncpy use in WebCore::Text::formatForDebugger
1066 https://bugs.webkit.org/show_bug.cgi?id=145608
1068 Reviewed by Darin Adler.
1070 r185137 replaced a call to strncpy with a call to strlcpy, which broke the build on Linux
1071 since strlcpy does not exist there. r185148 reverted this to use strncpy again, but got the
1072 size argument off by one, "introducing" a buffer overrun. But this code has always been
1073 wrong, since it used strncpy without ensuring that the buffer is null-terminated after the
1074 call to strncpy. Fix this as well.
1077 (WebCore::Text::formatForDebugger):
1079 2015-06-07 Antti Koivisto <antti@apple.com>
1081 CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::subresourceCachePolicy const + 11
1082 https://bugs.webkit.org/show_bug.cgi?id=145736
1083 rdar://problem/21246971
1085 Reviewed by David Kilzer.
1089 * html/HTMLLinkElement.cpp:
1090 (WebCore::HTMLLinkElement::setCSSStyleSheet):
1092 Null check frame. It may be null during frame teardown.
1094 2015-06-06 Anders Carlsson <andersca@apple.com>
1096 Remove support from getting plug-in information from Carbon resources
1097 https://bugs.webkit.org/show_bug.cgi?id=145730
1099 Reviewed by Dan Bernstein.
1101 Remove a now unused function.
1103 * platform/mac/WebCoreNSStringExtras.h:
1104 * platform/mac/WebCoreNSStringExtras.mm:
1105 (stringEncodingForResource): Deleted.
1107 2015-06-06 Commit Queue <commit-queue@webkit.org>
1109 Unreviewed, rolling out r185284.
1110 https://bugs.webkit.org/show_bug.cgi?id=145723
1112 it needs some discussion before landing (Requested by dino on
1117 "[iOS] Don't force compositing layers for no-op 3D transforms
1118 on low-memory devices."
1119 https://bugs.webkit.org/show_bug.cgi?id=145719
1120 http://trac.webkit.org/changeset/185284
1122 2015-06-06 Ryosuke Niwa <rniwa@webkit.org>
1124 Typing is slow in Gmail on iPads
1125 https://bugs.webkit.org/show_bug.cgi?id=145686
1127 Reviewed by Enrica Casucci.
1129 The bug was caused by nextCandidate and nextVisuallyDistinctCandidate traversing through each character
1130 in a text node without a renderer. Skip any node that doesn't have a renderer in both of those functions
1131 and corresponding previous* functions.
1133 It's fine to skip unrendered nodes in PositionIterator because only other clients of PositionIterator
1134 are Position::upstream and Position::downstream and they don't care about un-rendered nodes either.
1136 * dom/PositionIterator.cpp:
1137 (WebCore::PositionIterator::increment):
1138 (WebCore::PositionIterator::decrement):
1139 * editing/htmlediting.cpp:
1140 (WebCore::nextVisuallyDistinctCandidate):
1141 (WebCore::previousVisuallyDistinctCandidate):
1143 2015-06-06 Mark Lam <mark.lam@apple.com>
1145 Returned Exception* values need to be initialized to nullptr when no exceptions are thrown.
1146 https://bugs.webkit.org/show_bug.cgi?id=145720
1148 Reviewed by Dan Bernstein.
1150 No new tests because this issue is already covered by the existing inspector-protocol tests.
1152 * bindings/js/WorkerScriptController.cpp:
1153 (WebCore::WorkerScriptController::evaluate):
1155 2015-06-05 Andreas Kling <akling@apple.com>
1157 [iOS] Don't force compositing layers for no-op 3D transforms on low-memory devices.
1158 <https://webkit.org/b/145719>
1159 <rdar://problem/19973042>
1161 Reviewed by Geoffrey Garen.
1163 We put elements with 3D identity transforms onto compositing layers because
1164 we anticipate that they will somehow animate in the future.
1166 This can get extremely expensive, especially on low-memory devices.
1167 This patch makes WebKit stop handing out compositing layers for this kinda thing:
1169 -webkit-transform: translate3d(0,0,0)
1171 ..on devices with 512MB or less. This dramatically improves stability on some
1174 * rendering/RenderLayerCompositor.cpp:
1175 (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
1177 2015-06-05 Matt Baker <mattbaker@apple.com>
1179 Web Inspector: "Other" time in the framerate table is often negative
1180 https://bugs.webkit.org/show_bug.cgi?id=145712
1182 Reviewed by Timothy Hatcher.
1184 The Inspector frontend flattens the timeline event tree it receives from the backend, which can contain nested
1185 paint records. The nested records represent a single paint event, but were being interpreted as two separate
1186 events for purposes of calculating total layout time. This caused the calculated "other" time to be less than
1187 it should be (and in some cases negative).
1189 * inspector/InspectorTimelineAgent.cpp:
1190 (WebCore::InspectorTimelineAgent::addRecordToTimeline):
1191 Paint records are no longer nested, we simply drop the child paint event.
1193 2015-06-05 Chris Dumez <cdumez@apple.com>
1195 Unreviewed, speculative Windows build fix after r185273.
1197 * platform/VNodeTracker.h:
1199 2015-06-05 Chris Dumez <cdumez@apple.com>
1201 [WK2][iOS] Limit the number of vnodes used by the WebContent processes
1202 https://bugs.webkit.org/show_bug.cgi?id=145672
1203 <rdar://problem/21126637>
1205 Reviewed by Antti Koivisto.
1207 Limit the number of vnodes used by the WebContent processes to reduce
1208 the chance of getting killed due to the system running out of vnodes.
1209 We sometimes see the WebContent process use up to 50% of the system's
1210 vnode limit on some tests on iOS, which seems excessive. Most vnodes
1211 are due to CachedResources which are mmap'd from the WebKit disk cache
1212 and kept alive due to caches such as the Memory Cache / PageCache.
1214 This patch adds tracking for the number of SharedBuffer objects that are
1215 backed by a CFDataRef as this should track most of the vnodes used by
1216 the process. The WebContent process registers a vnode pressure handler
1217 upon initialization (likely it already does for memory pressure
1218 handling). This handler gets called when the process uses over 15% of
1219 of system's vnode limit and the "critical" flag is set if it uses over
1220 20% of the system limit. The vnode pressure handler currently calls the
1221 memory pressure handler as freeing our caches (especially PageCache,
1222 MemoryCache) and doing a JS GC frees up vnodes.
1224 On iPhone 6 Plus, the system limit is at 3000, which would lead to the
1225 following limits being used:
1226 soft: 450 / hard: 600
1228 However, on older hardware, the system limit can be as low as 2000,
1229 which would lead to the following limits being used:
1230 soft: 300 / hard: 400
1232 vnode tracking is currently only enabled on iOS because system vnode
1233 limits are usually much higher on Mac (e.g. 473695 on Mac Pro, 9984
1234 on a 2011 MacBook Air) and we normally don't get killed.
1236 * WebCore.xcodeproj/project.pbxproj:
1238 Add new files to the XCode project.
1240 * platform/SharedBuffer.h:
1242 Add a VNodeTracker::Token member next to the CFDataRef member that we
1243 initialize if the SharedBuffer is constructed from a CFDataRef.
1245 * platform/VNodeTracker.cpp: Added.
1246 (WebCore::VNodeTracker::singleton):
1247 (WebCore::VNodeTracker::VNodeTracker):
1248 (WebCore::VNodeTracker::checkPressureState):
1249 (WebCore::VNodeTracker::pressureWarningTimerFired):
1250 (WebCore::VNodeTracker::nextPressureWarningInterval):
1251 (WebCore::VNodeTracker::platformInitialize):
1252 * platform/VNodeTracker.h: Added.
1253 (WebCore::VNodeTracker::setPressureHandler):
1255 Add a new VNodeTracker singleton to keep track the number of vnodes
1256 used by the process since the system does not issue warnings before
1257 reaching its vnode limit. Call sites should request Tokens for
1258 every vnode they use for tracking purposes. Each process can then
1259 set a vnode pressure handler function that will be called when the
1260 process is over the designated limits.
1262 * platform/cf/SharedBufferCF.cpp:
1263 (WebCore::SharedBuffer::SharedBuffer):
1265 Take a VNodeToken from the VNodeTracker when constructing the
1266 SharedBuffer from a CFDataRef as these usually use mmap.
1268 * platform/cocoa/VNodeTrackerCocoa.cpp: Added.
1269 (WebCore::VNodeTracker::platformInitialize):
1271 Get the system's vnode limit and uses 15% of that value as soft
1272 limit for the process and 20% of that value as hard limit.
1274 2015-06-05 Dean Jackson <dino@apple.com>
1276 Lingering checkbox animations when rapidly switching between views on WK1
1277 https://bugs.webkit.org/show_bug.cgi?id=145715
1278 <rdar://problem/17381121>
1280 Reviewed by Simon Fraser.
1282 On WK1, the NSView we use for NSButtonCells is parented in the ScrollView.
1283 Our checkbox and radiobutton animations cause AppKit to create a CALayer which
1284 is parented into that view. As we render the animations, we see the CALayer getting
1287 The fix was to use an unparented layer on WK1 when drawing these controls, the same
1288 way WK2 does. This technique may apply to all controls, but restricting it
1289 to just the buttons at the moment is less risky.
1291 This only happens during the swap between a checked and non-checked state,
1292 and we have no way to test it :(
1294 * platform/mac/ThemeMac.h: New optional parameter to ensuredView.
1295 * platform/mac/ThemeMac.mm:
1296 (WebCore::paintToggleButton): If we're on Yosemite or highter, use an unparented view.
1297 (WebCore::ThemeMac::ensuredView): Return either a parented or unparented view.
1299 2015-06-05 Matt Rajca <mrajca@apple.com>
1301 MediaSessions should keep track of their participating media elements.
1302 https://bugs.webkit.org/show_bug.cgi?id=145703
1304 Reviewed by Eric Carlson.
1306 * Modules/mediasession/MediaSession.cpp:
1307 (WebCore::MediaSession::addMediaElement): Add the given media element to the media session.
1308 (WebCore::MediaSession::removeMediaElement): Remove the given media element from the media session.
1309 (WebCore::MediaSession::activeParticipatingElements): Dynamically build a vector of actively-playing media
1311 * Modules/mediasession/MediaSession.h:
1312 * html/HTMLMediaElement.cpp:
1313 (WebCore::HTMLMediaElement::~HTMLMediaElement): Ensure the element is removed from its media session.
1314 (WebCore::HTMLMediaElement::setSession): Update sessions' references to their media elements.
1316 2015-06-05 Chris Dumez <cdumez@apple.com>
1318 Regression(r176212): Broke app switching on iCloud.com
1319 https://bugs.webkit.org/show_bug.cgi?id=145708
1320 <rdar://problem/21235277>
1322 Reviewed by Simon Fraser.
1324 Roll out r176212 and follow-up fixes for now, to fix iCloud.com.
1325 We can reconsider later how to do this in a safer way.
1327 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1328 (WebCore::JSCSSStyleDeclaration::putDelegate): Deleted.
1329 (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Deleted.
1332 * dom/ElementRareData.cpp:
1333 * dom/ElementRareData.h:
1334 (WebCore::ElementRareData::ElementRareData):
1335 (WebCore::ElementRareData::~ElementRareData): Deleted.
1337 (WebCore::Node::materializeRareData):
1338 * html/HTMLCanvasElement.cpp:
1339 (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged): Deleted.
1340 * page/DOMTimer.cpp:
1341 (WebCore::DOMTimerFireState::scriptMadeNonUserObservableChanges): Deleted.
1342 (WebCore::DOMTimerFireState::scriptMadeUserObservableChanges): Deleted.
1343 (WebCore::NestedTimersMap::instanceForContext): Deleted.
1344 (WebCore::DOMTimer::install): Deleted.
1345 (WebCore::DOMTimer::fired): Deleted.
1346 (WebCore::DOMTimer::alignedFireTime): Deleted.
1347 (WebCore::DOMTimer::activeDOMObjectName): Deleted.
1349 * page/FrameView.cpp:
1350 (WebCore::FrameView::reset): Deleted.
1351 (WebCore::FrameView::viewportContentsChanged): Deleted.
1352 (WebCore::FrameView::autoSizeIfEnabled): Deleted.
1355 2015-06-05 Myles C. Maxfield <mmaxfield@apple.com>
1357 [iOS] Emoji overlap preceeding lines
1358 https://bugs.webkit.org/show_bug.cgi?id=145678
1359 <rdar://problem/10684914>
1361 Reviewed by Enrica Casucci.
1363 In WebKit, we first lay out lines, and then we lay out text inside those lines. Text is vertically centered in
1364 its containing line. If the author has not specified a particular line-height, the height of a line comes from
1365 the font metrics for the primary font of the line.
1367 In iOS, we were specifically hardcoding the line height metric of Apple Color Emoji to be 0. This means that,
1368 if Apple Color Emoji is the primary font for a line, and an explicit line-height was not specified, the lines
1369 are laid out with 0 height. Then, when we vertically center the text inside the line, the top half of the text
1370 overlaps the preceeding line.
1372 I'm not sure exactly why were were hardcoding this value to 0, as it is surely wrong. I'm going to ask Enrica
1373 to review this patch; hopefully she knows the answer.
1375 Test: fast/text/emoji.html
1377 * platform/graphics/cocoa/FontCocoa.mm:
1378 (WebCore::Font::platformInit):
1380 2015-06-05 Alex Christensen <achristensen@webkit.org>
1382 [Web Timing] Use new SPI to enable data collection.
1383 https://bugs.webkit.org/show_bug.cgi?id=145650
1384 rdar://problem/21203358
1386 Reviewed by Chris Dumez.
1388 * platform/network/cf/ResourceHandleCFNet.cpp:
1389 (WebCore::ResourceHandle::createCFURLConnection):
1390 Gather web timing data on iOS.
1391 * platform/network/mac/ResourceHandleMac.mm:
1392 (WebCore::ResourceHandle::createNSURLConnection):
1393 (WebCore::ResourceHandle::setCollectsTimingData):
1394 Gather web timing data on Mac.
1396 2015-06-05 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1398 [Streams API] ReadableStream should store callbacks as a Deque
1399 https://bugs.webkit.org/show_bug.cgi?id=145641
1401 Reviewed by Darin Adler.
1403 Covered by existing tests.
1405 * Modules/streams/ReadableStream.cpp:
1406 (WebCore::ReadableStream::resolveReadCallback): Use of Deque.takeFirst
1407 * Modules/streams/ReadableStream.h: Using Deque in lieu of Vector for storing callbacks.
1409 2015-06-05 Mark Lam <mark.lam@apple.com>
1411 finally blocks should not set the exception stack trace when re-throwing the exception.
1412 https://bugs.webkit.org/show_bug.cgi?id=145525
1414 Reviewed by Geoffrey Garen.
1416 Update to use the new JSC::Exception object.
1418 Test: inspector/debugger/break-on-exceptions.html
1420 * ForwardingHeaders/runtime/Exception.h: Added.
1421 * bindings/js/JSCallbackData.cpp:
1422 (WebCore::JSCallbackData::invokeCallback):
1423 * bindings/js/JSCustomXPathNSResolver.cpp:
1424 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1425 * bindings/js/JSDOMBinding.cpp:
1427 (WebCore::reportException):
1428 (WebCore::reportCurrentException):
1429 * bindings/js/JSDOMBinding.h:
1430 * bindings/js/JSErrorHandler.cpp:
1431 (WebCore::JSErrorHandler::handleEvent):
1432 * bindings/js/JSEventListener.cpp:
1433 (WebCore::JSEventListener::handleEvent):
1434 * bindings/js/JSMainThreadExecState.cpp:
1435 (WebCore::JSMainThreadExecState::didLeaveScriptContext):
1436 (WebCore::functionCallHandlerFromAnyThread):
1437 (WebCore::evaluateHandlerFromAnyThread):
1438 * bindings/js/JSMainThreadExecState.h:
1439 (WebCore::JSMainThreadExecState::currentState):
1440 (WebCore::JSMainThreadExecState::call):
1441 (WebCore::JSMainThreadExecState::evaluate):
1442 (WebCore::JSMainThreadExecState::runTask):
1444 * bindings/js/JSMediaDevicesCustom.cpp:
1445 (WebCore::JSMediaDevices::getUserMedia):
1446 - Fixed a bug where the exception was not cleared before entering the VM to
1449 * bindings/js/JSMutationCallback.cpp:
1450 (WebCore::JSMutationCallback::call):
1451 * bindings/js/ReadableJSStream.cpp:
1452 (WebCore::getPropertyFromObject):
1453 (WebCore::callFunction):
1454 (WebCore::ReadableJSStream::Source::start):
1455 * bindings/js/ScheduledAction.cpp:
1456 (WebCore::ScheduledAction::executeFunctionInContext):
1457 * bindings/js/ScriptController.cpp:
1458 (WebCore::ScriptController::evaluateInWorld):
1459 * bindings/js/SerializedScriptValue.cpp:
1460 (WebCore::SerializedScriptValue::create):
1461 (WebCore::SerializedScriptValue::deserialize):
1462 * bindings/js/WorkerScriptController.cpp:
1463 (WebCore::WorkerScriptController::evaluate):
1464 (WebCore::WorkerScriptController::setException):
1465 (WebCore::WorkerScriptController::scheduleExecutionTermination):
1466 * bindings/js/WorkerScriptController.h:
1467 (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
1468 * bindings/js/WorkerScriptDebugServer.cpp:
1469 (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
1470 (WebCore::WorkerScriptDebugServer::reportException):
1471 * bindings/js/WorkerScriptDebugServer.h:
1472 * bindings/objc/WebScriptObject.mm:
1473 (WebCore::createJSWrapper):
1474 (WebCore::addExceptionToConsole):
1475 (-[WebScriptObject callWebScriptMethod:withArguments:]):
1476 (-[WebScriptObject evaluateWebScript:]):
1477 - Changed to call a version of JSMainThreadExecState::evaluate() that provides
1478 a stub returnedException because evaluateWebScript: doesn't need the exception.
1480 * inspector/PageScriptDebugServer.cpp:
1481 (WebCore::PageScriptDebugServer::isContentScript):
1482 (WebCore::PageScriptDebugServer::reportException):
1483 * inspector/PageScriptDebugServer.h:
1484 * workers/WorkerGlobalScope.cpp:
1485 (WebCore::WorkerGlobalScope::importScripts):
1487 2015-06-05 Eric Carlson <eric.carlson@apple.com>
1489 Layout tests fullscreen/video-controls-drag.html and media/video-fullscreeen-only-controls.html
1491 https://bugs.webkit.org/show_bug.cgi?id=145675
1493 Reviewed by Dean Jackson.
1495 No new tests, changes covered by existing tests.
1497 * Modules/mediacontrols/mediaControlsApple.js:
1498 (Controller.prototype.updateControls): Use shouldHaveControls() to test if controls should
1500 (Controller.prototype.handleWrapperMouseMove): Don't return early when in fullscreen.
1501 (Controller.prototype.updateFullscreenButtons): Drive-by fix: always show the (exit) fullscreen
1502 button when in fullscreen.
1505 2015-06-04 David Hyatt <hyatt@apple.com>
1507 Underlines too close in vertical Chinese text.
1508 https://bugs.webkit.org/show_bug.cgi?id=145651
1509 <rdar://problem/11105920>
1511 Reviewed by Simon Fraser.
1513 Added fast/text/decorations-vertical-underline.html
1515 * style/InlineTextBoxStyle.cpp:
1516 (WebCore::computeUnderlineOffset):
1517 Make sure the to map text-underline-position: auto to under when a line has an ideographic baseline.
1519 2015-06-05 Carlos Alberto Lopez Perez <clopez@igalia.com>
1521 [GTK] [Wayland] The MiniBrowser crashes inside Weston.
1522 https://bugs.webkit.org/show_bug.cgi?id=145645
1524 Reviewed by Žan Doberšek.
1526 No new tests, no behavior changes.
1528 The issue was caused because we were not properly initializing the
1529 Wayland display, and we were returning a nullptr in PlatformDisplayWayland::create(),
1530 therefore a crash was happening on WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1136
1531 <http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp?rev=185245#L1136>
1533 * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1534 (WebCore::PlatformDisplayWayland::create): When connecting to the Wayland
1535 server socket we should use the default value (NULL). This allows the value
1536 to be overwritten at run-time by the environment variables WAYLAND_DISPLAY or
1537 WAYLAND_SOCKET that the Wayland compositor should define. Also add a couple
1538 of warnings to get information about what is going wrong when we fail to
1539 initialize the display instead of just crashing without giving more information.
1540 * platform/graphics/wayland/PlatformDisplayWayland.h:
1541 (WebCore::PlatformDisplayWayland::isInitialized): Not longer check for m_webkitgtk
1542 to signal that the display is ready because the UIProcess embedded Wayland
1543 subcompositer is still not implemented. Added a FIXME note about it.
1545 2015-06-05 Dean Jackson <dino@apple.com>
1547 [Mac] Popup focus is cut off
1548 https://bugs.webkit.org/show_bug.cgi?id=145688
1549 <rdar://problem/18313375>
1551 Reviewed by Brent Fulgham.
1553 Yosemite increased the width of focus rings, causing
1554 some ugly clipping on Yosemite. The solution was to
1555 not set a clip (which was code introduced for Leopard).
1557 Test: fast/forms/select-element-focus-ring.html
1559 * rendering/RenderThemeMac.mm:
1560 (WebCore::RenderThemeMac::paintMenuList): Don't clip on Yosemite.
1562 2015-06-05 Manuel Rego Casasnovas <rego@igalia.com>
1564 [CSS Grid Layout] Support dots sequences in grid-template-areas
1565 https://bugs.webkit.org/show_bug.cgi?id=145693
1567 Reviewed by Sergio Villar Senin.
1569 The CSS WG agreed to consider a sequence of "." characters a single null
1570 cell token for grid-template-areas. That way authors can match the
1571 number of dots to the width of the column.
1573 For more information see:
1574 https://lists.w3.org/Archives/Public/www-style/2015May/0175.html
1576 Added new test cases to check the new behavior.
1578 * css/CSSParser.cpp:
1579 (WebCore::containsOnlyDots): New helper function to check that the grid
1580 area name is composed by only dots.
1581 (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
1582 function to look for unnamed areas.
1584 2015-06-04 Joonghun Park <jh718.park@samsung.com>
1586 Purge PassRefPtr create() factory functions in WebCore/css
1587 https://bugs.webkit.org/show_bug.cgi?id=144905
1589 Reviewed by Darin Adler.
1591 Return Ref instead of PassRefPtr in create() factory functions in css,
1592 because the factory can't return null.
1594 No new tests, no new behaviours.
1596 * css/BasicShapeFunctions.cpp:
1597 (WebCore::valueForCenterCoordinate):
1598 (WebCore::basicShapeRadiusToCSSValue):
1599 (WebCore::valueForBasicShape):
1600 * css/BasicShapeFunctions.h:
1601 * css/CSSBasicShapes.h:
1602 * css/CSSCalculationValue.cpp:
1603 (WebCore::createCSS):
1604 (WebCore::CSSCalcValue::create):
1605 * css/CSSCalculationValue.h:
1606 * css/CSSCharsetRule.h:
1607 * css/CSSComputedStyleDeclaration.cpp:
1608 (WebCore::valueForNinePieceImageSlice):
1609 (WebCore::valueForNinePieceImageQuad):
1610 (WebCore::zoomAdjustedPixelValue):
1611 (WebCore::zoomAdjustedNumberValue):
1612 (WebCore::zoomAdjustedPixelValueForLength):
1613 (WebCore::valueForReflection):
1614 (WebCore::createPositionListForLayer):
1615 (WebCore::positionOffsetValue):
1616 (WebCore::percentageOrZoomAdjustedValue):
1617 (WebCore::autoOrZoomAdjustedValue):
1618 (WebCore::getBorderRadiusCornerValues):
1619 (WebCore::getBorderRadiusCornerValue):
1620 (WebCore::getBorderRadiusShorthandValue):
1621 (WebCore::matrixTransformValue):
1622 (WebCore::computedTransform):
1623 (WebCore::adjustLengthForZoom):
1624 (WebCore::ComputedStyleExtractor::valueForShadow):
1625 (WebCore::ComputedStyleExtractor::valueForFilter):
1626 (WebCore::specifiedValueForGridTrackBreadth):
1627 (WebCore::specifiedValueForGridTrackSize):
1628 (WebCore::valueForGridTrackList):
1629 (WebCore::scrollSnapDestination):
1630 (WebCore::scrollSnapPoints):
1631 (WebCore::scrollSnapCoordinates):
1632 (WebCore::createAnimationTriggerValue):
1633 (WebCore::getAnimationTriggerValue):
1634 (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
1635 (WebCore::fillSizeToCSSValue):
1636 (WebCore::lineHeightFromStyle):
1637 (WebCore::fontSizeFromStyle):
1638 (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
1639 (WebCore::shapePropertyValue):
1640 (WebCore::ComputedStyleExtractor::propertyValue):
1641 * css/CSSComputedStyleDeclaration.h:
1642 * css/CSSFontFace.h:
1643 (WebCore::CSSFontFace::create):
1644 * css/CSSFontFaceLoadEvent.h:
1645 * css/CSSFontFaceRule.h:
1646 * css/CSSGrammar.y.in:
1647 * css/CSSGridLineNamesValue.cpp:
1648 (WebCore::CSSGridLineNamesValue::cloneForCSSOM):
1649 * css/CSSGridLineNamesValue.h:
1650 (WebCore::CSSGridLineNamesValue::create):
1651 * css/CSSImportRule.h:
1652 * css/CSSKeyframeRule.h:
1653 (WebCore::StyleKeyframe::create):
1654 * css/CSSKeyframesRule.h:
1655 * css/CSSMediaRule.h:
1656 * css/CSSPageRule.h:
1657 * css/CSSParser.cpp:
1658 (WebCore::CSSParser::parseGridLineNames):
1659 (WebCore::CSSParser::parseDashboardRegions):
1660 (WebCore::CSSParser::parseClipShape):
1661 (WebCore::CSSParser::parseBasicShape):
1662 (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
1663 (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
1665 (WebCore::CSSParser::ValueWithCalculation::calculation):
1666 * css/CSSPrimitiveValue.cpp:
1667 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1668 (WebCore::CSSPrimitiveValue::init):
1669 (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1670 * css/CSSPrimitiveValue.h:
1671 (WebCore::CSSPrimitiveValue::create):
1672 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1673 * css/CSSPropertySourceData.h:
1674 (WebCore::CSSStyleSourceData::create):
1675 (WebCore::CSSRuleSourceData::create):
1676 (WebCore::CSSRuleSourceData::createUnknown):
1677 * css/CSSRuleList.h:
1678 * css/CSSSegmentedFontFace.h:
1679 (WebCore::CSSSegmentedFontFace::create):
1680 * css/CSSSelector.cpp:
1681 (WebCore::CSSSelector::createRareData):
1682 * css/CSSSelector.h:
1683 (WebCore::CSSSelector::RareData::create):
1684 * css/CSSStyleRule.h:
1685 * css/CSSSupportsRule.h:
1686 * css/CSSValuePool.h:
1687 (WebCore::CSSValuePool::createValue):
1688 * css/FontLoader.cpp:
1689 (WebCore::LoadFontCallback::create):
1690 * css/LengthRepeat.h:
1691 (WebCore::LengthRepeat::create):
1692 (WebCore::LengthRepeat::cloneForCSSOM):
1694 (WebCore::MediaQuerySet::create):
1695 (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
1696 (WebCore::MediaList::create):
1697 * css/MediaQueryList.cpp:
1698 (WebCore::MediaQueryList::create):
1699 * css/MediaQueryList.h:
1700 * css/MediaQueryMatcher.h:
1701 (WebCore::MediaQueryMatcher::create):
1703 (WebCore::Pair::create):
1705 (WebCore::Rect::create):
1706 (WebCore::Rect::cloneForCSSOM):
1707 (WebCore::Quad::create):
1708 (WebCore::Quad::cloneForCSSOM):
1709 * css/SVGCSSComputedStyleDeclaration.cpp:
1710 (WebCore::paintOrder):
1711 (WebCore::ComputedStyleExtractor::svgPropertyValue):
1713 (WebCore::StyleMedia::create):
1714 * css/StyleResolver.cpp:
1715 (WebCore::StyleResolver::keyframeStylesForAnimation):
1716 * css/StyleSheetList.h:
1717 (WebCore::StyleSheetList::create):
1718 * css/ViewportStyleResolver.h:
1719 (WebCore::ViewportStyleResolver::create):
1720 * css/WebKitCSSMatrix.h:
1721 * css/WebKitCSSRegionRule.h:
1722 * css/WebKitCSSViewportRule.h:
1723 * page/animation/CSSPropertyAnimation.cpp:
1724 (WebCore::blendFilter):
1725 * rendering/style/RenderStyle.h:
1726 (WebCore::adjustFloatForAbsoluteZoom):
1727 * rendering/style/StyleInheritedData.h:
1729 2015-06-04 Benjamin Poulain <bpoulain@apple.com>
1731 The last 2 merged DFAs are not minimized by DFACombiner
1733 * contentextensions/DFACombiner.cpp:
1734 (WebCore::ContentExtensions::DFACombiner::combineDFAs):
1735 I introduced a bug when I made minimization conditional: the last merge
1736 does not minimize if we do not reach the minimum size.
1738 2015-06-04 Brent Fulgham <bfulgham@apple.com>
1740 Latching algorithm in findEnclosingOverflowScroll is broken
1741 https://bugs.webkit.org/show_bug.cgi?id=145642
1742 <rdar://problem/21242308>
1744 Reviewed by Simon Fraser.
1746 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
1748 * page/mac/EventHandlerMac.mm:
1749 (WebCore::scrollableAreaForBox): Added helper function.
1750 (WebCore::findEnclosingScrollableContainer): Renamed from findEnclosingOverflowScroll.
1751 Only identify something as our scroll element if it can be scrolled in either
1752 axis of the gesture's motion.
1753 (WebCore::scrollableAreaForContainerNode): Use new helper function.
1754 (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
1755 name, and pass horizontal and vertical deltas.
1756 (WebCore::findEnclosingOverflowScroll): Deleted.
1758 2015-06-04 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1760 REGRESSION(r185091): Crash happens on indexdb tests
1761 https://bugs.webkit.org/show_bug.cgi?id=145549
1763 Reviewed by Darin Adler.
1765 * Modules/indexeddb/IDBDatabaseError.h:
1766 (WebCore::IDBDatabaseError::create): Revert Ref usage of IDBDatabaseError::create().
1768 2015-06-04 Simon Fraser <simon.fraser@apple.com>
1770 Crash in EventDispatcher::dispatchEvent entering a location on Google Maps
1771 https://bugs.webkit.org/show_bug.cgi?id=145677
1772 rdar://problem/20698280
1774 Reviewed by Dean Jackson.
1776 If a transition is running on a pseudo-element, and the host element is removed
1777 from the DOM just as the transition ends, and there is a transition event listener,
1778 then we'd crash with a null dereference in event dispatch code.
1780 AnimationController tries to clean up running animations when renderers are destroyed,
1781 but omitted to remove the element from two vectors that store element references.
1782 Elements are only added to these vectors briefly on animation end, before firing
1783 events, but failure to remove the vector entries could result in attempting
1784 to fire an event on a pseudo-element with no host element.
1786 Also convert EventDispatcher code to be more robust to potentially null event
1787 targets, since it's not clear that eventTargetRespectingTargetRules() can always
1788 manage to return a non-null node.
1790 Hard to make a test because this is timing sensitive.
1792 * dom/EventDispatcher.cpp:
1793 (WebCore::eventTargetRespectingTargetRules):
1794 (WebCore::EventDispatcher::dispatchScopedEvent):
1795 (WebCore::EventDispatcher::dispatchEvent):
1796 (WebCore::EventPath::EventPath):
1797 * page/animation/AnimationController.cpp:
1798 (WebCore::AnimationControllerPrivate::clear):
1800 2015-06-04 Hunseop Jeong <hs85.jeong@samsung.com>
1802 Replace 0 with nullptr in WebCore/Page.
1803 https://bugs.webkit.org/show_bug.cgi?id=145631
1805 Reviewed by Darin Adler.
1807 No new tests, no behavior changes.
1809 * page/AutoscrollController.cpp:
1810 (WebCore::AutoscrollController::AutoscrollController):
1811 (WebCore::AutoscrollController::stopAutoscrollTimer):
1812 * page/ContentSecurityPolicy.cpp:
1813 (WebCore::CSPSourceList::parseSource):
1814 * page/ContentSecurityPolicy.h:
1815 * page/ContextMenuController.cpp:
1816 (WebCore::ContextMenuController::clearContextMenu):
1817 * page/DOMSelection.cpp:
1818 (WebCore::DOMSelection::clearTreeScope):
1819 * page/DOMWindow.cpp:
1820 (WebCore::DOMWindow::resetDOMWindowProperties):
1821 (WebCore::DOMWindow::localStorage):
1822 (WebCore::DOMWindow::focus):
1824 * page/DOMWindowExtension.cpp:
1825 (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
1826 (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
1827 * page/DOMWindowProperty.cpp:
1828 (WebCore::DOMWindowProperty::DOMWindowProperty):
1829 (WebCore::DOMWindowProperty::~DOMWindowProperty):
1830 (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
1831 (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
1832 (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
1833 * page/DragController.cpp:
1834 (WebCore::DragController::dragEnded):
1835 (WebCore::DragController::performDragOperation):
1836 (WebCore::DragController::tryDocumentDrag):
1837 (WebCore::DragController::concludeEditDrag):
1838 (WebCore::DragController::startDrag):
1839 * page/EventHandler.cpp:
1840 (WebCore::EventHandler::EventHandler):
1841 (WebCore::EventHandler::resizeLayerDestroyed):
1842 (WebCore::EventHandler::freeDataTransfer):
1843 (WebCore::EventHandler::dragSourceEndedAt):
1844 (WebCore::EventHandler::handleDrag):
1845 * page/EventHandler.h:
1846 * page/FocusController.cpp:
1847 (WebCore::FocusController::advanceFocusInDocumentOrder):
1849 (WebCore::Frame::~Frame):
1850 (WebCore::Frame::searchForLabelsBeforeElement):
1851 (WebCore::Frame::willDetachPage):
1852 (WebCore::Frame::createView):
1854 (WebCore::Frame::detachFromPage):
1855 * page/FrameDestructionObserver.cpp:
1856 (WebCore::FrameDestructionObserver::FrameDestructionObserver):
1857 (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
1858 (WebCore::FrameDestructionObserver::frameDestroyed):
1859 * page/FrameTree.cpp:
1860 (WebCore::FrameTree::~FrameTree):
1861 (WebCore::FrameTree::removeChild):
1863 (WebCore::FrameTree::FrameTree):
1864 (WebCore::FrameTree::detachFromParent):
1866 (WebCore::History::History):
1868 (WebCore::Page::Page):
1869 (WebCore::Page::~Page):
1870 (WebCore::Page::findStringMatchingRanges):
1871 * page/PageGroup.cpp:
1872 * page/Performance.cpp:
1873 (WebCore::Performance::Performance):
1874 * page/PointerLockController.cpp:
1875 (WebCore::PointerLockController::didLosePointerLock):
1876 (WebCore::PointerLockController::clearElement):
1877 * page/SecurityOrigin.h:
1878 (WebCore::SecurityOrigin::canAccessDatabase):
1879 * page/Settings.cpp:
1880 (WebCore::Settings::Settings):
1881 * page/SpatialNavigation.cpp:
1882 (WebCore::FocusCandidate::FocusCandidate):
1883 * page/SpatialNavigation.h:
1884 (WebCore::FocusCandidate::FocusCandidate):
1885 * page/scrolling/ScrollingTreeNode.cpp:
1886 (WebCore::ScrollingTreeNode::ScrollingTreeNode):
1887 * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
1888 (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
1890 2015-06-04 Benjamin Poulain <bpoulain@apple.com>
1892 Combine tiny DFAs into slightly larger ones
1893 https://bugs.webkit.org/show_bug.cgi?id=145572
1895 Reviewed by Alex Christensen.
1897 This patch changes the ContentExtensions compiler to combine tiny DFA
1898 until they reach a minimum size.
1900 The main tool introduced here is DFAMerger. It combines 2 DFAs into
1901 a single DFA that represent the union of the two machines.
1902 That is done by a simple subset construction on the "name" of the nodes
1905 Since we only merge 2 machines, and they are both deterministic, we know that
1906 we can only be in one state of each machine, or a state in one machine without
1907 equivalent in the other machine.
1908 We exploit that to identify the mapping between nodes. To identify a node in
1909 the new machine from nodes in the original machines, we just concatenate the node
1910 IDs into a single 64 bits number. If there is no node in one of the machine, we
1913 The current algorithm does not have any subgraph pruning, machines grow very very
1914 quickly. Because of that, we only merge very small DFAs at the moment.
1916 Test: http/tests/contentextensions/filters-with-quantifiers-combined.html
1918 * WebCore.xcodeproj/project.pbxproj:
1919 * contentextensions/ContentExtensionCompiler.cpp:
1920 (WebCore::ContentExtensions::compileRuleList):
1921 * contentextensions/ContentExtensionsDebugging.h:
1922 * contentextensions/DFA.cpp:
1923 (WebCore::ContentExtensions::DFA::graphSize):
1924 (WebCore::ContentExtensions::DFA::debugPrintDot):
1925 * contentextensions/DFA.h:
1926 * contentextensions/DFACombiner.cpp: Added.
1927 (WebCore::ContentExtensions::DFAMerger::DFAMerger):
1928 (WebCore::ContentExtensions::DFAMerger::merge):
1929 (WebCore::ContentExtensions::DFAMerger::signatureForIndices):
1930 (WebCore::ContentExtensions::DFAMerger::extractIndexA):
1931 (WebCore::ContentExtensions::DFAMerger::extractIndexB):
1932 (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
1933 (WebCore::ContentExtensions::DFAMerger::setHalfSignature):
1934 (WebCore::ContentExtensions::DFAMerger::populateTransitions):
1935 (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions):
1936 (WebCore::ContentExtensions::DFAMerger::createTransitions):
1937 (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded):
1938 (WebCore::ContentExtensions::DFACombiner::combineDFAs):
1939 * contentextensions/DFACombiner.h: Copied from Source/WebCore/contentextensions/DFA.h.
1940 (WebCore::ContentExtensions::DFACombiner::addDFA):
1942 2015-06-04 Matt Rajca <mrajca@apple.com>
1944 Rename MediaSessionManager to PlatformMediaSessionManager for consistency with PlatformMediaSession.
1945 https://bugs.webkit.org/show_bug.cgi?id=145648
1947 Reviewed by Eric Carlson.
1949 * WebCore.vcxproj/WebCore.vcxproj:
1950 * WebCore.vcxproj/WebCore.vcxproj.filters:
1951 * WebCore.xcodeproj/project.pbxproj:
1952 * html/HTMLMediaElement.cpp:
1953 * html/MediaElementSession.cpp:
1954 (WebCore::MediaElementSession::effectivePreloadForElement):
1955 (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
1956 * platform/audio/PlatformMediaSession.cpp:
1957 (WebCore::PlatformMediaSession::PlatformMediaSession):
1958 (WebCore::PlatformMediaSession::~PlatformMediaSession):
1959 (WebCore::PlatformMediaSession::clientWillBeginPlayback):
1960 (WebCore::PlatformMediaSession::clientWillPausePlayback):
1961 (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
1962 (WebCore::PlatformMediaSession::updateClientDataBuffering):
1963 * platform/audio/PlatformMediaSessionManager.cpp: Renamed from Source/WebCore/platform/audio/MediaSessionManager.cpp.
1964 (WebCore::PlatformMediaSessionManager::sharedManager):
1965 (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
1966 (WebCore::PlatformMediaSessionManager::resetRestrictions):
1967 (WebCore::PlatformMediaSessionManager::has):
1968 (WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
1969 (WebCore::PlatformMediaSessionManager::count):
1970 (WebCore::PlatformMediaSessionManager::beginInterruption):
1971 (WebCore::PlatformMediaSessionManager::endInterruption):
1972 (WebCore::PlatformMediaSessionManager::addSession):
1973 (WebCore::PlatformMediaSessionManager::removeSession):
1974 (WebCore::PlatformMediaSessionManager::addRestriction):
1975 (WebCore::PlatformMediaSessionManager::removeRestriction):
1976 (WebCore::PlatformMediaSessionManager::restrictions):
1977 (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
1978 (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
1979 (WebCore::PlatformMediaSessionManager::setCurrentSession):
1980 (WebCore::PlatformMediaSessionManager::currentSession):
1981 (WebCore::PlatformMediaSessionManager::sessionRestrictsInlineVideoPlayback):
1982 (WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):
1983 (WebCore::PlatformMediaSessionManager::applicationWillEnterBackground):
1984 (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground):
1985 (WebCore::PlatformMediaSessionManager::updateSessionState):
1986 (WebCore::PlatformMediaSessionManager::didReceiveRemoteControlCommand):
1987 (WebCore::PlatformMediaSessionManager::systemWillSleep):
1988 (WebCore::PlatformMediaSessionManager::systemDidWake):
1989 (WebCore::PlatformMediaSessionManager::audioOutputDeviceChanged):
1990 * platform/audio/PlatformMediaSessionManager.h: Renamed from Source/WebCore/platform/audio/MediaSessionManager.h.
1991 (WebCore::PlatformMediaSessionManager::~PlatformMediaSessionManager):
1992 (WebCore::PlatformMediaSessionManager::configureWireLessTargetMonitoring):
1993 (WebCore::PlatformMediaSessionManager::hasWirelessTargetsAvailable):
1994 (WebCore::PlatformMediaSessionManager::sessions):
1995 * platform/audio/mac/AudioDestinationMac.cpp:
1996 * platform/audio/mac/MediaSessionManagerMac.cpp:
1997 (PlatformMediaSessionManager::updateSessionState):
1998 (MediaSessionManager::updateSessionState): Deleted.
1999 * testing/Internals.cpp:
2001 2015-06-04 Eric Carlson <eric.carlson@apple.com>
2003 [Mac] Don't show default controls after playing to wireless target, again
2004 https://bugs.webkit.org/show_bug.cgi?id=145620
2005 <rdar://problem/21145806>
2007 Reviewed by Dean Jackson.
2009 Follow up to fix two tests broken by r185207.
2011 * Modules/mediacontrols/mediaControlsApple.js:
2012 (Controller.prototype.updateControls): Always show controls when the video element
2013 is the fullscreen element because custom controls aren't possible.
2015 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2017 [Cocoa] Add ASSERT to FontPlatformData::ctFont()
2018 https://bugs.webkit.org/show_bug.cgi?id=145659
2020 Reviewed by Dean Jackson.
2022 The new ASSERT needs to be guarded with CORETEXT_WEB_FONTS, which is defined in FontCustomPlatformData.h,
2023 and is not accessible to FontPlatformData. Therefore, I've moved the definition into TextFlags.h, which
2026 No new tests because there is no behavior change.
2028 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2029 (WebCore::FontPlatformData::ctFont): Add the ASSERT.
2030 * platform/graphics/mac/FontCustomPlatformData.h: Move the CORETEXT_WEB_FONTS preprocessor
2032 * platform/text/TextFlags.h: ... to here.
2034 2015-06-04 Commit Queue <commit-queue@webkit.org>
2036 Unreviewed, rolling out r185208.
2037 https://bugs.webkit.org/show_bug.cgi?id=145655
2039 platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-
2040 latched-select.html (Requested by shallawa on #webkit).
2044 "Latching algorithm in findEnclosingOverflowScroll is broken"
2045 https://bugs.webkit.org/show_bug.cgi?id=145642
2046 http://trac.webkit.org/changeset/185208
2048 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2050 [Cocoa] Remove unnecessary code from FontPlatformData::ctFont()
2051 https://bugs.webkit.org/show_bug.cgi?id=145652
2053 Hoefler Text Italic no longer has initial and final swashes by default, so there
2054 is no reason to explicitly disable them.
2056 Reviewed by Andreas Kling.
2058 No new tests because there is no behavior change.
2060 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2061 (WebCore::FontPlatformData::ctFont):
2062 (WebCore::createFeatureSettingDictionary): Deleted.
2063 (WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Deleted.
2065 2015-06-04 Brent Fulgham <bfulgham@apple.com>
2067 Latching algorithm in findEnclosingOverflowScroll is broken
2068 https://bugs.webkit.org/show_bug.cgi?id=145642
2069 <rdar://problem/21242308>
2071 Reviewed by Simon Fraser.
2073 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
2075 * page/mac/EventHandlerMac.mm:
2076 (WebCore::findEnclosingOverflowScrollForDominantDirection): Renamed from
2077 'findEnclosingOverflowScroll'. Only identify element as our overflow
2078 scroll element if it can be scrolled in either axis of the gesture's
2080 (WebCore::scrolledToEdgeInDominantDirection): Renamed.
2081 (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
2082 name, and pass horizontal and vertical deltas.
2083 (WebCore::findEnclosingOverflowScroll): Deleted.
2085 2015-06-04 Eric Carlson <eric.carlson@apple.com>
2087 [Mac] Don't show default controls after playing to wireless target, again
2088 https://bugs.webkit.org/show_bug.cgi?id=145620
2089 <rdar://problem/21145806>
2091 Reviewed by Dean Jackson.
2093 * Modules/mediacontrols/mediaControlsApple.js:
2094 (Controller.prototype.updateControls): Show or hide the panel as appropriate.
2095 (Controller.prototype.handleWrapperMouseMove): Early return if !video.controls.
2096 (Controller.prototype.addControls): Call updateControls instead of this.setNeedsTimelineMetricsUpdate
2097 so all needed setup is done.
2098 (Controller.prototype.resetHideControlsTimer): Only start the hide timer if playing.
2100 2015-06-04 Chris Dumez <cdumez@apple.com>
2102 [WK2] Prune more resources from the MemoryCache before process suspension
2103 https://bugs.webkit.org/show_bug.cgi?id=145633
2105 Reviewed by Andreas Kling.
2107 Prune more resources from the MemoryCache before process suspension or
2108 on simulated memory warning by doing a synchronous JS garbage collection
2109 and sweep *before* pruning dead resources from the memory cache.
2110 Previously, we would do the garbage collection after pruning the
2111 MemoryCache which meant that a lot of resources became dead after we
2112 tried to prune them.
2114 At the end a basic browsing on apple.com, we are able to remove ~17%
2115 more resources from the MemoryCache on simulated memory warning with this
2118 Pruning as much as we can from the memory cache on critical memory
2119 pressure or before process suspension is not only useful to free up
2120 memory but also to make room in the vnode table as a lot of
2121 CachedResources are mmmap'd from the network disk cache.
2123 * platform/MemoryPressureHandler.cpp:
2124 (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2125 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2127 - Pass 'synchronous' argument so that we know if we need to do a
2128 synchronous JS garbage collection.
2129 - Move here code from in the Cocoa handler that is doing a JS garbage
2130 collection as well as a sweep, and make this code cross-platform.
2131 This code used to be iOS specific but I see no reason we shouldn't
2134 (WebCore::MemoryPressureHandler::releaseMemory):
2135 * platform/MemoryPressureHandler.h:
2137 Use enum class arguments for critical / synchronous. The 'synchronous'
2138 argument is new so that the call site can let us know if memory needs
2139 to be freed synchronously (e.g. in case of imminent process suspension).
2141 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2142 (WebCore::MemoryPressureHandler::platformReleaseMemory):
2144 Remove iOS-specific code that was doing a JS garbage collection and
2145 sweep as this code is now in the generic memory pressure handler.
2147 (WebCore::MemoryPressureHandler::install):
2149 On simulated memory pressure, set 'synchronous' argument to Yes so that
2150 a synchronous GC is done by the generic memory pressure handler. This
2151 way, we no longer need to do a sync GC after calling the memory pressure
2152 handler. This avoids code duplication and makes sure the GC is done
2153 before pruning the memory cache.
2156 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2158 [Cocoa] Clean up m_isEmoji in FontPlatformData
2159 https://bugs.webkit.org/show_bug.cgi?id=145644
2161 Reviewed by Andreas Kling.
2163 m_isEmoji used to be a public member variable only defined on iOS. This
2164 means that, whenever it was consulted, the sites were surrounded by
2165 PLATFORM(IOS) guards. A cleaner design is to use a getter and setter,
2166 which on non-iOS platforms, always return false / do nothing. Then, the
2167 use sites can just use these functions without having ugly guards.
2169 No new tests because there is no behavior change.
2171 * platform/graphics/FontPlatformData.h:
2172 (WebCore::FontPlatformData::hash): Simplify isEmoji use site.
2173 (WebCore::FontPlatformData::isEmoji): Getter. Returns false on Mac.
2174 (WebCore::FontPlatformData::setIsEmoji): Setter. Does nothing on Mac.
2175 * platform/graphics/cocoa/FontCascadeCocoa.mm:
2176 (WebCore::pointAdjustedForEmoji): Simplify isEmoji use site.
2177 (WebCore::FontCascade::drawGlyphs): Ditto.
2178 * platform/graphics/cocoa/FontCocoa.mm:
2179 (WebCore::Font::platformInit): Ditto.
2180 (WebCore::canUseFastGlyphAdvanceGetter): Ditto.
2181 (WebCore::isEmoji): Deleted.
2182 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2183 (WebCore::FontPlatformData::platformDataInit): Simplify isEmoji use
2185 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2186 (WebCore::FontPlatformData::platformIsEqual): Ditto.
2187 (WebCore::FontPlatformData::ctFontSize): Ditto.
2188 * platform/graphics/ios/FontCacheIOS.mm:
2189 (WebCore::FontCache::getSystemFontFallbackForCharacters): Ditto.
2190 (WebCore::FontCache::createFontPlatformData): Ditto.
2191 * platform/graphics/mac/ComplexTextController.cpp:
2192 (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.
2194 2015-06-03 Brent Fulgham <bfulgham@apple.com>
2196 REGRESSION (r181879): Scrolling order on pages with focused iframe is broken.
2197 https://bugs.webkit.org/show_bug.cgi?id=145637
2198 <rdar://problem/20635581>
2200 Reviewed by Zalan Bujtas.
2202 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
2204 This page revealed a bug in our RenderBox code caused by the mismatch between
2205 our scrolling units, which are all integrally snapped, with our client height
2206 and widths, which are not snapped at all.
2208 In certain cases, the client height would have a small subpixel difference compared
2209 to the scroll height, which would cause WebKit to believe it was scrollable. When
2210 this happened, it would get stuck latched to this element and block scrolling events.
2213 (WebCore::Frame::scrollOverflowLayer): Use roundToInt for clientWidth and clientHeight,
2214 rather than integer truncation.
2215 * rendering/RenderBox.cpp:
2216 (WebCore::RenderBox::canBeScrolledAndHasScrollableArea): Need to round clientWidth
2217 and clientHeight to compare with scrollWidth/scrollHeight.
2218 * rendering/RenderBox.h:
2219 (WebCore::RenderBox::hasScrollableOverflowX): Ditto.
2220 (WebCore::RenderBox::hasScrollableOverflowY): Ditto.
2221 * rendering/RenderMarquee.cpp:
2222 (WebCore::RenderMarquee::computePosition): Use roundToInt for clientWidth and
2223 clientHeight, rather than integer truncation.
2225 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2227 [Cocoa] Clean up m_font inside FontPlatformData
2228 https://bugs.webkit.org/show_bug.cgi?id=145634
2230 Reviewed by Andreas Kling.
2232 FontPlatformDatas are used as keys in a HashMap. This means that they need
2233 to be able to represent a "deleted" value. Previously, this "deleted" value
2234 was represented as setting the pointer value of m_font to -1, and guarding
2235 all uses of m_font to make sure it wasn't -1 before dereferencing it.
2237 This patch simplifies FontPlatformData to represent a "deleted" value using
2238 a separate boolean member variable. This class is already big enough that
2239 the increased space is negligable (the class already contains two CoreText
2240 fonts in addition to a CoreGraphics font). Because of this simplification,
2241 m_font can now be a RetainPtr, instead of being manually retained and
2244 There is still a long way to go before FontPlatformData is acceptably
2245 clean and understandable. This patch improves one aspect of it, and more
2246 improvements will eventually follow.
2248 No new tests because there is no behavior change.
2250 * platform/graphics/FontCache.cpp: Remove unused variable.
2251 * platform/graphics/FontPlatformData.cpp:
2252 (WebCore::FontPlatformData::FontPlatformData): Clean up all the PLATFORM
2253 macros in favor of a single bool. Also, update to include new state.
2254 (WebCore::FontPlatformData::operator=): Update to include new state.
2255 * platform/graphics/FontPlatformData.h:
2256 (WebCore::FontPlatformData::font): Update to account for RetainPtr.
2257 (WebCore::FontPlatformData::nsFont): Ditto.
2258 (WebCore::FontPlatformData::setNSFont): Ditto.
2259 (WebCore::FontPlatformData::hash): Update to include new state.
2260 (WebCore::FontPlatformData::operator==): Ditto.
2261 (WebCore::FontPlatformData::isHashTableDeletedValue): Use new state.
2262 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
2263 (WebCore::FontPlatformData::isValidCTFontRef): Deleted.
2264 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2265 (WebCore::FontPlatformData::platformDataInit): No need for manual retain
2267 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2268 (WebCore::FontPlatformData::platformIsEqual): Update to account for
2270 (WebCore::FontPlatformData::setFont): No need for manual retain and
2272 (WebCore::FontPlatformData::FontPlatformData): Deleted.
2273 (WebCore::FontPlatformData::~FontPlatformData): Deleted.
2274 * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2275 (WebCore::FontPlatformData::~FontPlatformData): m_scaledFont is always
2277 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2279 2015-06-03 Carlos Alberto Lopez Perez <clopez@igalia.com>
2281 [GTK] [Wayland] Build is broken on trunk
2282 https://bugs.webkit.org/show_bug.cgi?id=142879
2284 Reviewed by Carlos Garcia Campos.
2286 No new tests, no behavior changes.
2288 Patch on GLContext.h picked from bug 136831 by
2289 Iago Toral <itoral@igalia.com> and Zan Dobersek <zdobersek@igalia.com>
2291 * platform/graphics/GLContext.h: Include wayland-egl.h before eglplatform.h
2292 to use the Wayland platform when building for Wayland.
2293 * platform/graphics/PlatformDisplay.cpp: Fix the include of GDK
2294 headers for the different targets.
2295 * platform/graphics/wayland/WaylandSurface.cpp: Fix build after r183731.
2296 (WebCore::WaylandSurface::~WaylandSurface):
2298 2015-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2300 [Streams API] Implement ReadableStreamController enqueue
2301 https://bugs.webkit.org/show_bug.cgi?id=145210
2303 Reviewed by Darin Adler.
2305 Added possibility to enqueue any JSValue within ReadableJSStream.
2306 They are stored in a Vector of strongified JSValue.
2308 Added support for streams that contain data but are asked to close.
2309 This is done through m_closeRequested boolean and splitting actual closing of the stream from changeStateToClosed().
2311 Chunk size and backpressure mechanism is not yet implemented.
2312 Neither is pulling once enqueued data is processed.
2314 Covered by rebased tests.
2316 * Modules/streams/ReadableStream.cpp:
2317 (WebCore::ReadableStream::changeStateToClosed): Split method with newly added close().
2318 (WebCore::ReadableStream::close): Does the actual closing of stream once stream has no more values.
2319 (WebCore::ReadableStream::read): Close the stream when stream is emptied and close is requested.
2320 (WebCore::ReadableStream::resolveReadCallback): Added to enable ReadableJSStream to resolve read callbacks immediatly at enqueue time.
2321 * Modules/streams/ReadableStream.h:
2322 (WebCore::ReadableStream::isErrored): Getter added for the custom binding code.
2323 (WebCore::ReadableStream::isCloseRequested): Ditto.
2324 * bindings/js/JSReadableStreamControllerCustom.cpp:
2325 (WebCore::JSReadableStreamController::enqueue): binding code for enqueue, taking care of raising exception if readable stream cannot enqueue.
2326 * bindings/js/ReadableJSStream.cpp:
2327 (WebCore::ReadableJSStream::hasValue):
2328 (WebCore::ReadableJSStream::read):
2329 (WebCore::ReadableJSStream::enqueue):
2330 * bindings/js/ReadableJSStream.h:
2332 2015-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2334 [Streams API] ReadableJSStream does not need a ReadableStreamSource
2335 https://bugs.webkit.org/show_bug.cgi?id=145601
2337 Reviewed by Darin Adler.
2339 Covered by existing tests.
2341 * Modules/streams/ReadableStream.cpp:
2342 (WebCore::ReadableStream::ReadableStream): Remoed m_source.
2343 * Modules/streams/ReadableStream.h: Ditto
2344 * Modules/streams/ReadableStreamSource.h: Deleted.
2345 * WebCore.vcxproj/WebCore.vcxproj: Removing Modules/streams/ReadableStreamSource.h.
2346 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2347 * WebCore.xcodeproj/project.pbxproj: Ditto.
2348 * bindings/js/ReadableJSStream.cpp:
2349 (WebCore::ReadableJSStream::globalObject):
2350 (WebCore::ReadableJSStream::doStart): Equivalent of ReadableJSStream::Source::start().
2351 (WebCore::ReadableJSStream::create): Updated according new constructor.
2352 (WebCore::ReadableJSStream::ReadableJSStream):
2353 (WebCore::startReadableStreamAsync): Deleted.
2354 (WebCore::ReadableJSStream::jsController): Deleted.
2355 (WebCore::ReadableJSStream::storeError): Deleted.
2356 * bindings/js/ReadableJSStream.h: Added m_source member to store the JS source as a JS object.
2358 2015-06-04 Zan Dobersek <zdobersek@igalia.com>
2360 Shrink the ArabicCharShapingMode enum in SVGGlyph.cpp
2361 https://bugs.webkit.org/show_bug.cgi?id=145564
2363 Reviewed by Darin Adler.
2365 Shrink the ArabicCharShapingMode enum to just one byte.
2366 This drops the size of the static s_arabicCharShapingMode
2367 array of ArabicCharShapingMode values from 888 bytes to 222.
2369 * platform/graphics/SVGGlyph.cpp:
2370 (WebCore::processArabicFormDetection):
2372 2015-06-03 Zalan Bujtas <zalan@apple.com>
2374 Use borderBoxRect instead of contentBoxRect for backdrop filter.
2375 https://bugs.webkit.org/show_bug.cgi?id=145606
2377 Reviewed by Simon Fraser.
2379 Backdrop filter should use border box rect. It also needs to take css clip into account.
2381 Tests: css3/filters/backdrop/backdrop-filter-with-cliprect.html
2382 css3/filters/backdrop/backdrop-filter-with-mask.html
2384 * rendering/RenderLayerBacking.cpp:
2385 (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
2387 2015-06-03 Youenn Fablet <youenn.fablet@crf.canon.fr>
2389 MediaDevices.getUserMedia should put promises in resolve/reject state synchronously
2390 https://bugs.webkit.org/show_bug.cgi?id=145308
2392 Reviewed by Darin Adler.
2394 Removed the calls to callToMainThread in which were resolved and rejected promises.
2395 Cleaned up the code to remove unneeded callback copies.
2397 Covered by existing tests.
2399 * Modules/mediastream/UserMediaRequest.cpp:
2400 (WebCore::UserMediaRequest::create):
2401 (WebCore::UserMediaRequest::UserMediaRequest):
2402 (WebCore::UserMediaRequest::didCreateStream):
2403 (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
2404 (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
2405 * Modules/mediastream/UserMediaRequest.h:
2407 2015-06-03 Simon Fraser <simon.fraser@apple.com>
2409 REGRESSION (r184968): missing media player buttons (control bar exists, but no buttons)
2410 https://bugs.webkit.org/show_bug.cgi?id=145630
2412 Reviewed by Zalan Bujtas.
2414 r184968 changed the initial value of m_intersectsCoverageRect to false. However,
2415 this triggered a bug with mask layers, whose value of m_intersectsCoverageRect was never
2418 Fix by copying the value of m_intersectsCoverageRect from the main layer to its
2419 mask layer, just as we do for m_visibleRect and m_coverageRect.
2421 Test: compositing/visible-rect/mask-layer-coverage.html
2423 * platform/graphics/ca/GraphicsLayerCA.cpp:
2424 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2426 2015-06-03 Simon Fraser <simon.fraser@apple.com>
2428 Layer tree dumps should include mask layers
2429 https://bugs.webkit.org/show_bug.cgi?id=145629
2431 Reviewed by Zalan Bujtas.
2433 Dumping the layer tree omitted to dump the mask layer, so fix
2434 GraphicsLayer::dumpProperties() to dump this layer.
2436 * platform/graphics/GraphicsLayer.cpp:
2437 (WebCore::GraphicsLayer::dumpProperties):
2439 2015-06-03 Greg Hughes <ghughes@apple.com>
2441 AX: Expose field sets to accessibility clients
2442 https://bugs.webkit.org/show_bug.cgi?id=145585
2444 Expose fieldsets to the accessibility API via a subrole of AXFieldset.
2446 Reviewed by Chris Fleizach.
2448 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2449 (-[WebAccessibilityObjectWrapper subrole]):
2451 2015-06-03 Myles C. Maxfield <mmaxfield@apple.com>
2453 Remove dead code FontPlatformData::roundsGlyphAdvances()
2454 https://bugs.webkit.org/show_bug.cgi?id=145628
2456 Reviewed by Simon Fraser.
2458 No new tests because there is no behavior change.
2461 * platform/graphics/FontPlatformData.h:
2462 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2463 (WebCore::FontPlatformData::roundsGlyphAdvances): Deleted.
2465 2015-06-03 Ryuan Choi <ryuan.choi@navercorp.com>
2467 [CoordinatedGraphics] Merge CoordinatedTile into Tile
2468 https://bugs.webkit.org/show_bug.cgi?id=145602
2470 Reviewed by Darin Adler.
2472 CoordinatedTile only implements Tile since Qt and WebKit1/Efl were dropped.
2473 So, there is no reason that CoordinatedTile inherits Tile interface.
2475 No new tests, no behavior changes.
2477 * PlatformEfl.cmake:
2478 * PlatformGTK.cmake:
2479 * WebCore.vcxproj/WebCore.vcxproj:
2480 * WebCore.vcxproj/WebCore.vcxproj.filters:
2481 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2482 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2483 * platform/graphics/texmap/coordinated/CoordinatedTile.cpp: Renamed to Tile.cpp
2484 * platform/graphics/texmap/coordinated/CoordinatedTile.h: Merged into Tile.h
2485 (WebCore::CoordinatedTile::coordinate): Deleted.
2486 (WebCore::CoordinatedTile::rect): Deleted.
2487 * platform/graphics/texmap/coordinated/Tile.cpp: Renamed from CoordinatedTile.cpp.
2488 * platform/graphics/texmap/coordinated/Tile.h:
2489 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
2490 (WebCore::TiledBackingStore::createTiles):
2492 2015-06-03 Matt Rajca <mrajca@apple.com>
2494 Add basic Media Session support to HTMLMediaElement.
2495 https://bugs.webkit.org/show_bug.cgi?id=145581
2497 Reviewed by Eric Carlson.
2499 HTMLMediaElements now have:
2501 - a 'kind' attribute representing the intrinsic media category
2502 - a 'session' attribute representing the current media session, if any
2504 * CMakeLists.txt: Include the new HTMLMediaElementMediaSession sources.
2505 * DerivedSources.make: Include the new IDL file.
2506 * Modules/mediasession/HTMLMediaElementMediaSession.cpp: Added.
2507 (WebCore::HTMLMediaElementMediaSession::session):
2508 * Modules/mediasession/HTMLMediaElementMediaSession.h: Added basic translation of the IDL file.
2509 (WebCore::HTMLMediaElementMediaSession::kind):
2510 (WebCore::HTMLMediaElementMediaSession::setKind):
2511 (WebCore::HTMLMediaElementMediaSession::setSession):
2512 * Modules/mediasession/HTMLMediaElementMediaSession.idl: Added from the Media Session spec.
2513 * PlatformMac.cmake: Include DOMHTMLMediaElementMediaSession.cpp.
2514 * WebCore.xcodeproj/project.pbxproj: Include the new HTMLMediaElementMediaSession sources.
2515 * html/HTMLMediaElement.h: Added accessors for 'kind' and 'session'.
2516 (WebCore::HTMLMediaElement::kind):
2517 (WebCore::HTMLMediaElement::setKind):
2518 (WebCore::HTMLMediaElement::session):
2519 (WebCore::HTMLMediaElement::setSession):
2521 2015-06-03 Myles C. Maxfield <mmaxfield@apple.com>
2523 Cleanup after r185175.
2524 https://bugs.webkit.org/show_bug.cgi?id=145569
2525 <rdar://problem/20671711>
2529 No new tests because there is no behavior change.
2531 * platform/graphics/WidthIterator.h:
2533 2015-06-02 Myles C. Maxfield <mmaxfield@apple.com>
2535 SoftBank Emoji are not transformed by shaping when in a run of their own
2536 https://bugs.webkit.org/show_bug.cgi?id=145569
2537 <rdar://problem/20671711>
2539 Reviewed by Dean Jackson.
2541 Normally, we don't perform shaping on single glyphs. However, these particular codepoints
2542 need to have shaping run on them, even if they are alone.
2544 Test: fast/text/softbank-emoji.html Note that this test may fail in different locales on
2545 different platforms. This patch disables the test on iOS.
2547 * Source/WebCore/platform/graphics/WidthIterator.cpp:
2548 (WebCore::applyFontTransforms): Move the length-of-1 check into shouldApplyFontTransforms()
2549 (WebCore::shouldApplyFontTransforms): Return true if we have one of these emoji characters in
2551 (WebCore::advanceInternal): Keep track of the previous character, and use it to call
2552 shouldApplyFontTransforms.
2553 * Source/WebCore/platform/graphics/WidthIterator.h: shouldApplyFontTransforms() needs
2554 some more information to perform its duties.
2556 2015-06-03 Daniel Bates <dabates@apple.com>
2558 Caps lock indicator should not be shown in read-only or disabled field
2559 https://bugs.webkit.org/show_bug.cgi?id=145612
2560 <rdar://problem/21227454>
2562 Reviewed by Darin Adler.
2564 * html/TextFieldInputType.cpp:
2565 (WebCore::TextFieldInputType::disabledAttributeChanged): Update caps lock indicator state.
2566 (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
2567 (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator): Do not draw the caps lock indicator
2568 when the field is read-only or disabled.
2570 2015-06-03 Dean Jackson <dino@apple.com>
2572 Crash in GraphicsContext3D::getInternalFramebufferSize
2573 https://bugs.webkit.org/show_bug.cgi?id=145479
2574 <rdar://problem/16461048>
2576 Reviewed by Eric Carlson.
2578 If we are in an unitialized or lost state, don't try to access the context.
2580 In order to test this, I added an Internal setting that always
2581 forces WebGL into a pending state.
2583 Test: fast/canvas/webgl/useWhilePending.html
2585 * html/canvas/WebGLRenderingContextBase.cpp:
2586 (WebCore::WebGLRenderingContextBase::create): Check internal settings for
2587 a forced pending state.
2588 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
2589 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
2590 * page/Settings.cpp: New Internal setting for forcing a pending policy.
2591 (WebCore::Settings::Settings):
2592 (WebCore::Settings::setForcePendingWebGLPolicy):
2594 (WebCore::Settings::isForcePendingWebGLPolicy):
2595 * testing/InternalSettings.cpp:
2596 (WebCore::InternalSettings::Backup::Backup):
2597 (WebCore::InternalSettings::Backup::restoreTo):
2598 (WebCore::InternalSettings::setForcePendingWebGLPolicy):
2599 * testing/InternalSettings.h:
2600 * testing/InternalSettings.idl:
2602 2015-06-03 Hunseop Jeong <hs85.jeong@samsung.com>
2604 Use modern for-loops in WebCore/page.
2605 https://bugs.webkit.org/show_bug.cgi?id=145455
2607 Reviewed by Darin Adler.
2609 No new tests, no behavior changes.
2612 (WebCore::Chrome::notifyPopupOpeningObservers):
2613 * page/ContentSecurityPolicy.cpp:
2614 (WebCore::CSPSourceList::matches):
2615 (WebCore::CSPDirectiveList::gatherReportURIs):
2616 (WebCore::ContentSecurityPolicy::copyStateFrom):
2617 (WebCore::isAllowedByAll):
2618 (WebCore::isAllowedByAllWithState):
2619 (WebCore::isAllowedByAllWithContext):
2620 (WebCore::isAllowedByAllWithURL):
2621 (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
2622 (WebCore::ContentSecurityPolicy::allowPluginType):
2623 (WebCore::ContentSecurityPolicy::reflectedXSSDisposition):
2624 (WebCore::ContentSecurityPolicy::gatherReportURIs):
2625 * page/ContextMenuController.cpp:
2626 (WebCore::ContextMenuController::populate):
2627 * page/DOMWindow.cpp:
2628 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
2629 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
2630 (WebCore::DOMWindow::willDestroyCachedFrame):
2631 (WebCore::DOMWindow::willDestroyDocumentInFrame):
2632 (WebCore::DOMWindow::willDetachDocumentFromFrame):
2633 (WebCore::DOMWindow::disconnectDOMWindowProperties):
2634 (WebCore::DOMWindow::reconnectDOMWindowProperties):
2635 (WebCore::DOMWindow::getMatchedCSSRules):
2636 * page/DeviceController.cpp:
2637 (WebCore::DeviceController::dispatchDeviceEvent):
2638 (WebCore::DeviceController::fireDeviceEvent):
2639 * page/EventHandler.cpp:
2640 (WebCore::EventHandler::updateMouseEventTargetNode):
2641 (WebCore::EventHandler::handleTouchEvent):
2642 * page/FocusController.cpp:
2643 (WebCore::FocusController::setIsVisibleAndActiveInternal):
2645 (WebCore::Frame::orientationChanged):
2646 (WebCore::Frame::injectUserScriptsForWorld):
2647 * page/FrameView.cpp:
2648 (WebCore::FrameView::scrollContentsFastPath):
2649 (WebCore::FrameView::serviceScriptedAnimations):
2650 (WebCore::FrameView::trackedRepaintRectsAsText):
2651 (WebCore::FrameView::updateWidgetPositions):
2652 (WebCore::FrameView::notifyWidgets):
2654 (WebCore::networkStateChanged):
2655 (WebCore::Page::stringToViewMode):
2656 (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
2657 (WebCore::Page::refreshPlugins):
2658 (WebCore::Page::lockAllOverlayScrollbarsToHidden):
2659 (WebCore::Page::pluginViews):
2660 (WebCore::Page::storageBlockingStateChanged):
2661 (WebCore::Page::setIsVisibleInternal):
2662 * page/PageGroup.cpp:
2663 (WebCore::PageGroup::captionPreferencesChanged):
2664 * page/PageGroupLoadDeferrer.cpp:
2665 (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2666 (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2667 * page/PageSerializer.cpp:
2668 (WebCore::PageSerializer::serializeFrame):
2669 * page/Performance.cpp:
2670 (WebCore::Performance::webkitGetEntriesByType):
2671 (WebCore::Performance::webkitGetEntriesByName):
2672 * page/PerformanceResourceTiming.cpp:
2673 (WebCore::passesTimingAllowCheck):
2674 * page/PerformanceUserTiming.cpp:
2675 (WebCore::convertToEntrySequence):
2676 * page/SecurityPolicy.cpp:
2677 (WebCore::SecurityPolicy::isAccessWhiteListed):
2678 * page/UserContentURLPattern.cpp:
2679 (WebCore::UserContentURLPattern::matchesPatterns):
2680 * page/WindowFeatures.cpp:
2681 (WebCore::WindowFeatures::parseDialogFeatures):
2682 * page/animation/AnimationController.cpp:
2683 (WebCore::AnimationControllerPrivate::updateAnimations):
2684 (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
2685 (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
2686 (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
2687 (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
2688 * page/animation/CSSPropertyAnimation.cpp:
2689 (WebCore::ShorthandPropertyWrapper::equals):
2690 (WebCore::ShorthandPropertyWrapper::blend):
2691 * page/scrolling/AsyncScrollingCoordinator.cpp:
2692 (WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
2693 * page/scrolling/ScrollingCoordinator.cpp:
2694 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
2695 (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
2697 2015-06-03 Daniel Bates <dabates@apple.com>
2699 AutoFill button should not be shown in read-only or disabled field
2700 https://bugs.webkit.org/show_bug.cgi?id=145579
2701 <rdar://problem/21212494>
2703 Reviewed by Darin Adler.
2705 Fixes an issue where the AutoFill button is shown in a read-only or disabled
2706 field. We should not show the AutoFill button in such cases.
2708 Tests: fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html
2709 fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html
2710 fast/forms/auto-fill-button/input-auto-fill-button.html
2711 fast/forms/auto-fill-button/input-disabled-auto-fill-button.html
2712 fast/forms/auto-fill-button/input-readonly-auto-fill-button.html
2713 fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html
2715 * html/TextFieldInputType.cpp:
2716 (WebCore::TextFieldInputType::disabledAttributeChanged): Update AutoFill button state.
2717 (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
2718 (WebCore::TextFieldInputType::shouldDrawAutoFillButton): Do not draw AutoFill button
2719 when the field is disabled or read-only.
2721 2015-06-03 Brent Fulgham <bfulgham@apple.com>
2723 REGRESSION: (r181879): Scrolling in select/option region in iFrame scrolls both select and iframe
2724 https://bugs.webkit.org/show_bug.cgi?id=145574
2725 <rdar://problem/20966828>
2727 Reviewed by Simon Fraser.
2729 Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html
2731 When the scroll gesture is started when the latched scrollable container is not at the limit of its
2732 scroll region, we are NOT supposed to propagate the scroll event to the enclosing region. However,
2733 we were doing two things wrong:
2734 (1) When we recognized we were latching, we were using the right wheel event target, but not using
2735 the latched scrollable container.
2736 (2) Likewise, we were not using latched ScrollableArea when handling wheel events.
2738 Instead, we were using the current scrollable container and ScrollableArea under the mouse pointer,
2739 which could be different from the point we started latching as the content scrolled.
2741 The fix was to properly track the scrollable container and scrollable area during latching.
2743 I attempted to store the latched ScrollableArea in the latchingState object, like we already do for the
2744 scrollable container, but found that this did not work properly. I think the life cycle of the
2745 ScrollableArea may not match the scrollable container, and since they are not reference counted I
2746 simply retrieve the ScrollableArea when needed.
2748 * page/mac/EventHandlerMac.mm:
2749 (WebCore::scrollableAreaForContainerNode): Helper function to return the correct ScrollableArea
2750 for the two types of RenderBox elements.
2751 (WebCore::latchedToFrameOrBody): Helper predicate to identify Frame and Body elements.
2752 (WebCore::EventHandler::platformPrepareForWheelEvents): Use the correct ScrollableArea for the given
2753 ContainerNode. When latching, make sure to use the ScrollableArea that is related to the latched scrollable
2754 container, not the area currently underneath the mouse pointer.
2756 2015-06-03 Brady Eidson <beidson@apple.com>
2758 REGRESSION (r183498): Certain types of frame loads in iframes with <base target="_blank"> can open urls in new window/tabs
2759 https://bugs.webkit.org/show_bug.cgi?id=145580
2761 Reviewed by Mark Lam.
2763 Tests: fast/loader/fragment-navigation-base-blank.html
2764 fast/loader/iframe-meta-refresh-base-blank.html
2765 fast/loader/iframe-set-location-base-blank.html
2766 fast/loader/refresh-iframe-base-blank.html
2768 Before 183498, callers of FrameLoader::changeLocation() got automatically assigned a frame name of "_self".
2769 After 183498, many remained without a frame name.
2771 Later on, FrameLoader applies the <base> target as their frame name if they don't already have one.
2773 When the <base> target is "_blank", that causes a new window/tab.
2775 Restoring "_self" to these call sites fixes this.
2777 * inspector/InspectorFrontendClientLocal.cpp:
2778 (WebCore::InspectorFrontendClientLocal::openInNewTab):
2780 * inspector/InspectorPageAgent.cpp:
2781 (WebCore::InspectorPageAgent::navigate):
2783 * loader/FrameLoadRequest.h:
2784 (WebCore::FrameLoadRequest::FrameLoadRequest):
2786 * loader/NavigationScheduler.cpp:
2787 (WebCore::NavigationScheduler::scheduleLocationChange):
2789 * page/DOMWindow.cpp:
2790 (WebCore::DOMWindow::createWindow):
2792 2015-06-03 Alexey Proskuryakov <ap@apple.com>
2794 More iOS build fixing.
2796 * platform/spi/mac/AVFoundationSPI.h:
2798 2015-06-03 Zalan Bujtas <zalan@apple.com>
2800 Subpixel rendering: Composited layer with subpixel gap does not get painted properly when its position changes.
2801 https://bugs.webkit.org/show_bug.cgi?id=145587
2803 Reviewed by Simon Fraser.
2805 The composited layer always snaps to an enclosing device pixel (floors) while the renderer rounds.
2806 At certain positions (for example 0.5px on a 1x display), a gap is formed between the layer(0px) and its renderer(1px).
2807 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
2808 in order to get the renderering right.
2810 Test: compositing/child-layer-with-subpixel-gap-needs-repaint-when-parent-moves.html
2812 * rendering/RenderLayerBacking.cpp:
2813 (WebCore::RenderLayerBacking::updateAfterLayout):
2814 (WebCore::devicePixelFractionGapFromRendererChanged):
2815 (WebCore::RenderLayerBacking::updateGeometry):
2816 * rendering/RenderLayerBacking.h:
2818 2015-06-03 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2820 [Streams API] ReadableStreamReader::closed() should be called once by binding code
2821 https://bugs.webkit.org/show_bug.cgi?id=145551
2823 Reviewed by Darin Adler.
2825 Covered by existing tests.
2827 * bindings/js/JSReadableStreamReaderCustom.cpp:
2828 (WebCore::JSReadableStreamReader::closed): Calling ReadableStreamReader::closed only at creation of the promise.
2830 2015-06-02 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2832 [EFL][GTK] Fix build error since r185137
2833 https://bugs.webkit.org/show_bug.cgi?id=145596
2835 Unreviewed, fix build break on EFL and GTK port.
2838 (WebCore::Text::formatForDebugger): Use strncpy() instead of strlcpy().
2840 2015-06-02 Sergio Villar Senin <svillar@igalia.com>
2842 [CSS Grid Layout] Switch from parenthesis to brackets for grid line names
2843 https://bugs.webkit.org/show_bug.cgi?id=144996
2845 Reviewed by Darin Adler.
2847 Grid line names are now enclosed by brackets instead of parentheses
2848 as mentioned in the latest version of the spec. Appartently the CSS
2849 code is now more readable and avoids issues with tools like SASS.
2851 * css/CSSGrammar.y.in:
2852 * css/CSSGridLineNamesValue.cpp:
2853 (WebCore::CSSGridLineNamesValue::customCSSText):
2855 2015-06-02 Alexey Proskuryakov <ap@apple.com>
2859 * platform/spi/mac/AVFoundationSPI.h:
2861 2015-06-02 Commit Queue <commit-queue@webkit.org>
2863 Unreviewed, rolling out r185128 and r185132.
2864 https://bugs.webkit.org/show_bug.cgi?id=145597
2866 The new test hits a bad assertion (Requested by ap on
2869 Reverted changesets:
2871 "Crash in GraphicsContext3D::getInternalFramebufferSize"
2872 https://bugs.webkit.org/show_bug.cgi?id=145479
2873 http://trac.webkit.org/changeset/185128
2875 "Skip webgl/useWhilePending.html on WebKit 1."
2876 http://trac.webkit.org/changeset/185132
2878 2015-06-02 Ryuan Choi <ryuan.choi@navercorp.com>
2880 [CoordinatedGraphics] Refactor TiledBackingStoreClient
2881 https://bugs.webkit.org/show_bug.cgi?id=145577
2883 Reviewed by Gyuyoung Kim.
2885 This patch removes and simplifies unnecessary virtual methods of TiledBackingStoreClient.
2887 No new tests, no behavior changes.
2889 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2890 (WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers): Renamed from tiledBackingStorePaintEnd.
2891 (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintBegin): Deleted.
2892 (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd): Deleted.
2893 (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreBackgroundColor):
2894 Deleted because tiledBackingStoreBackgroundColor() is not used anywhere.
2895 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2896 * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
2897 (WebCore::CoordinatedTile::updateBackBuffer):
2898 Simplified not to call unnecessary methods. In addition, used modern for loop.
2899 (WebCore::CoordinatedTile::swapBackBufferToFront): Deleted.
2900 * platform/graphics/texmap/coordinated/CoordinatedTile.h:
2901 * platform/graphics/texmap/coordinated/Tile.h:
2902 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
2903 (WebCore::TiledBackingStore::updateTileBuffers):
2904 * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
2906 2015-06-02 Doug Russell <d_russell@apple.com>
2908 AX: debugging attributes for text markers
2909 https://bugs.webkit.org/show_bug.cgi?id=145283
2911 Reviewed by Chris Fleizach.
2913 AXTextMarkerDebugDescription: returns the result of
2914 VisiblePosition::formatForDebugger() for the visible position that a text marker
2916 AXTextMarkerNodeDebugDescription: calls Node::showNode() and
2917 Node::showNodePathForThis() for the visible position that a text marker
2919 AXTextMarkerNodeTreeDebugDescription: calls Node::showTreeForThis() for the
2920 visible position that a text marker represents.
2921 AXTextMarkerRangeDebugDescription: returns the result of
2922 formatForDebugger(VisiblePositionRange) for the visible position range that a text
2923 marker range represents.
2925 This is debug only tooling. Tests would be flakey and not very helpful.
2927 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2928 (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarker:]):
2929 (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarkerRange:]):
2930 (-[WebAccessibilityObjectWrapper showNodeForTextMarker:]):
2931 (-[WebAccessibilityObjectWrapper showNodeTreeForTextMarker:]):
2932 (formatForDebugger):
2933 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2935 (WebCore::Text::formatForDebugger):
2937 2015-06-02 Matt Rajca <mrajca@apple.com>
2939 MediaSessions should keep track of their current state.
2940 https://bugs.webkit.org/show_bug.cgi?id=145575
2942 Reviewed by Alex Christensen.
2944 * Modules/mediasession/MediaSession.h: Per the Media Session spec, the state can be 'Idle', 'Active', or
2945 'Interrupted'. Sessions are created in an 'Idle' state.
2947 2015-06-02 Jon Lee <jonlee@apple.com>
2949 Build fix when building with internal SDKs
2950 https://bugs.webkit.org/show_bug.cgi?id=145576
2951 rdar://problem/21089476
2953 Reviewed by Alexey Proskuryakov.
2955 * platform/spi/mac/AVFoundationSPI.h: Include the right header.
2957 2015-06-02 Dean Jackson <dino@apple.com>
2959 No need to guard the sizes attribute against PICTURE_SIZES in preload scanner.
2960 https://bugs.webkit.org/show_bug.cgi?id=145573
2961 <rdar://problem/21210038>
2963 Reviewed by Myles Maxfield.
2965 The PICTURE_SIZES feature flag doesn't need to be used to
2966 guard preloading of the sizes attribute.
2968 * html/parser/HTMLPreloadScanner.cpp:
2969 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Deleted.
2970 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.
2972 2015-06-02 Anders Carlsson <andersca@apple.com>
2974 Use UUIDs for WebSQL database filenames instead of a sequential number
2975 https://bugs.webkit.org/show_bug.cgi?id=145571
2977 Reviewed by Dan Bernstein.
2979 This is a first step towards getting rid of the iOS specific code path where we truncate
2980 database files instead of deleting them (in order to avoid file corruption).
2982 * Modules/webdatabase/DatabaseTracker.cpp:
2983 (WebCore::generateDatabaseFileName):
2984 (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
2985 * platform/sql/SQLiteFileSystem.cpp:
2986 (WebCore::SQLiteFileSystem::getFileNameForNewDatabase): Deleted.
2987 * platform/sql/SQLiteFileSystem.h:
2989 2015-06-02 Dean Jackson <dino@apple.com>
2991 Crash in GraphicsContext3D::getInternalFramebufferSize
2992 https://bugs.webkit.org/show_bug.cgi?id=145479
2993 <rdar://problem/16461048>
2995 Reviewed by Eric Carlson.
2997 If we are in an unitialized or lost state, don't try to access the context.
2999 In order to test this, I added an Internal setting that always
3000 forces WebGL into a pending state.
3002 Test: fast/canvas/webgl/useWhilePending.html
3004 * html/canvas/WebGLRenderingContextBase.cpp:
3005 (WebCore::WebGLRenderingContextBase::create): Check internal settings for
3006 a forced pending state.
3007 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
3008 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
3009 * page/Settings.cpp: New Internal setting for forcing a pending policy.
3010 (WebCore::Settings::Settings):
3011 (WebCore::Settings::setForcePendingWebGLPolicy):
3013 (WebCore::Settings::isForcePendingWebGLPolicy):
3014 * testing/InternalSettings.cpp:
3015 (WebCore::InternalSettings::Backup::Backup):
3016 (WebCore::InternalSettings::Backup::restoreTo):
3017 (WebCore::InternalSettings::setForcePendingWebGLPolicy):
3018 * testing/InternalSettings.h:
3019 * testing/InternalSettings.idl:
3021 2015-06-02 Matt Rajca <mrajca@apple.com>
3023 Added a stub implementation of MediaSession, part of the Media Session spec.
3024 https://bugs.webkit.org/show_bug.cgi?id=145530
3026 Reviewed by Eric Carlson.
3028 * CMakeLists.txt: Added new MediaSession sources.
3029 * DerivedSources.make:
3030 * Modules/mediasession/MediaSession.cpp: Added stub implementation.
3031 (WebCore::MediaSession::MediaSession): Per the Media Session spec, a Media Remote Controls object should only be
3032 set for 'content' sessions; it is null otherwise.
3033 (WebCore::MediaSession::~MediaSession):
3034 (WebCore::MediaSession::controls):
3035 (WebCore::MediaSession::releaseSession):
3036 * Modules/mediasession/MediaSession.h: Added basic translation of IDL file.
3037 * Modules/mediasession/MediaSession.idl: Added from the Media Session spec.
3038 * WebCore.xcodeproj/project.pbxproj: Added new MediaSession sources.
3040 2015-06-02 Zalan Bujtas <zalan@apple.com>
3042 Backdrop filter is pulling in content from behind the window.
3043 https://bugs.webkit.org/show_bug.cgi?id=145561
3044 rdar://problem/20909309
3046 Reviewed by Simon Fraser.
3048 This patch ensures that the backdrop filter layer is positioned and sized properly.
3050 The backdrop filter layer should take its size and position from its renderer and not
3051 directly from the composited layer.
3052 In certain cases the composited layer's size is expanded to cover items like box shadow or an absolute positioned descendant.
3053 In such cases, we ended up applying the backdrop filter to those areas as well.
3055 Tests: css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html
3056 css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html
3058 * platform/graphics/GraphicsLayer.h:
3059 (WebCore::GraphicsLayer::setBackdropFiltersRect):
3060 (WebCore::GraphicsLayer::backdropFiltersRect):
3061 * platform/graphics/ca/GraphicsLayerCA.cpp:
3062 (WebCore::GraphicsLayerCA::setBackdropFiltersRect):
3063 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3064 (WebCore::GraphicsLayerCA::updateBackdropFilters):
3065 (WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
3066 (WebCore::GraphicsLayerCA::updateContentsRects):
3067 (WebCore::GraphicsLayerCA::updateGeometry): Deleted.
3068 * platform/graphics/ca/GraphicsLayerCA.h:
3069 * rendering/RenderLayerBacking.cpp:
3070 (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
3071 (WebCore::RenderLayerBacking::updateGeometry):
3072 * rendering/RenderLayerBacking.h:
3074 2015-06-02 Eric Carlson <eric.carlson@apple.com>
3076 [Mac] occasional crash in Document::playbackTargetAvailabilityDidChange
3077 https://bugs.webkit.org/show_bug.cgi?id=145559
3079 Reviewed by Darin Adler.
3081 No new tests, covered by existing tests.
3083 * html/HTMLMediaElement.cpp:
3084 (WebCore::HTMLMediaElement::registerWithDocument): Pass document to m_mediaSession->registerWithDocument.
3085 (WebCore::HTMLMediaElement::unregisterWithDocument): Pass document to m_mediaSession->unRegisterWithDocument.
3086 (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Ditto.
3087 (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.
3089 * html/MediaElementSession.cpp:
3090 (WebCore::MediaElementSession::registerWithDocument): Take a document.
3091 (WebCore::MediaElementSession::unregisterWithDocument): Ditto.
3092 * html/MediaElementSession.h:
3094 2015-06-02 Chris Dumez <cdumez@apple.com>
3096 Calling FrameView::viewportContentsChanged() after style recalcs is too expensive
3097 https://bugs.webkit.org/show_bug.cgi?id=145554
3098 <rdar://problem/21189478>
3100 Reviewed by Darin Adler and Simon Fraser.
3102 Only call FrameView::viewportContentsChanged() after a style recalc if
3103 composited layers have been updated (and there is no pending layout).
3105 We already viewportContentsChanged() after layout so we only need to
3106 call viewportContentsChanged() after a style recalc if it did not cause
3107 a layout but may have caused an element to become visible. In
3108 particular, this can happen in the case of composited animations (e.g.
3109 using -webkit-transform to move an element inside the viewport).
3110 Therefore, we now only call viewportContentsChanged() after a style
3111 recalc if it caused composited layers to be updated. This avoids a lot
3112 of unnecessary calls to viewportContentsChanged(), which is expensive.
3114 No new tests, already covered by:
3115 fast/images/animated-gif-webkit-transform.html
3118 (WebCore::Document::recalcStyle):
3119 * page/FrameView.cpp:
3120 (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
3122 * rendering/RenderLayerCompositor.cpp:
3123 (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
3124 (WebCore::RenderLayerCompositor::updateCompositingLayers):
3125 * rendering/RenderLayerCompositor.h:
3127 2015-06-02 Myles C. Maxfield <mmaxfield@apple.com>
3129 Remove use of CTFontSetRenderingParameters()
3130 https://bugs.webkit.org/show_bug.cgi?id=145560
3132 Reviewed by Simon Fraser.
3134 Instead, always use CTFontSetRenderingStyle().
3136 No new tests because there is no behavior change.
3138 * platform/graphics/cocoa/FontCascadeCocoa.mm:
3139 (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
3140 (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
3142 2015-06-02 Anders Carlsson <andersca@apple.com>
3144 Move WKFontAntialiasingStateSaver to its own file
3145 https://bugs.webkit.org/show_bug.cgi?id=145557
3146 rdar://problem/21134776
3148 Reviewed by Dan Bernstein.
3150 Also rename it to FontAntialiasingStateSaver. Also, change it to use the CoreGraphicsSPI.h header for its
3151 CGFontAntialiasingStyle definition instead of using an explicit typedef.
3153 * WebCore.xcodeproj/project.pbxproj:
3154 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3155 (PlatformCALayer::drawLayerContents):
3156 * platform/graphics/ios/FontAntialiasingStateSaver.h: Copied from Source/WebCore/platform/ios/wak/WKGraphics.h.
3157 (WebCore::FontAntialiasingStateSaver::FontAntialiasingStateSaver):
3158 (WebCore::FontAntialiasingStateSaver::setup):
3159 (WebCore::FontAntialiasingStateSaver::restore):
3160 * platform/ios/LegacyTileCache.mm:
3161 (WebCore::LegacyTileCache::drawWindowContent):
3162 * platform/ios/wak/WKGraphics.h:
3163 (WKFontAntialiasingStateSaver::WKFontAntialiasingStateSaver): Deleted.
3164 * platform/ios/wak/WKGraphics.mm:
3165 (WKFontAntialiasingStateSaver::setup): Deleted.
3166 (WKFontAntialiasingStateSaver::restore): Deleted.
3168 2015-06-02 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3170 [Streams API] Implement ReadableStreamReader read method in closed and errored state
3171 https://bugs.webkit.org/show_bug.cgi?id=144790
3173 Reviewed by Darin Adler.
3175 Reader delegates read() promise handling to its stream except if reader is no longer locking the stream and stream is readable.
3176 Storing of reader read() promise callbacks as a Vector in ReadableStream.
3177 Added resolution/rejection of read() promises in case of errored/closed streams.
3179 Test: streams/readable-stream-reader-read.html
3181 * ForwardingHeaders/runtime/IteratorOperations.h: Added.
3182 * Modules/streams/ReadableStream.cpp:
3183 (WebCore::ReadableStream::cleanCallbacks): Clean the read requests.
3184 (WebCore::ReadableStream::changeStateToClosed): Run success callbacks with undefined for read requests.
3185 (WebCore::ReadableStream::changeStateToErrored): Run failure callbacks with the errors for read requests.
3186 (WebCore::ReadableStream::closed): Parameter name changed.
3187 (WebCore::ReadableStream::read): Added. Succeeds with empty when closed, fails with error when errored, reads a
3188 value if there is one and pushes the callbacks to the queue otherwise.
3189 * Modules/streams/ReadableStream.h:
3190 (WebCore::ReadableStream::ReadCallbacks::ReadCallbacks): Struct containing success and failure callbacks.
3191 * Modules/streams/ReadableStreamReader.cpp:
3192 (WebCore::ReadableStreamReader::closed): Parameter name changed.
3193 (WebCore::ReadableStreamReader::read): Invoke success with empty if we streams if we don't have the right reader
3194 and call the stream otherwise to read.
3195 * Modules/streams/ReadableStreamReader.h:
3196 * bindings/js/JSReadableStreamReaderCustom.cpp:
3197 (WebCore::JSReadableStreamReader::read): Create the callback lambdas and invoke read. Failure rejects the
3198 promise and success creates the result from the read value.
3199 * bindings/js/ReadableJSStream.cpp:
3200 (WebCore::ReadableJSStream::hasValue):
3201 (WebCore::ReadableJSStream::read): Not implemented yet.
3202 * bindings/js/ReadableJSStream.h:
3204 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
3206 [Cocoa] FontPlatformData's equality check should always use reference URLs
3207 https://bugs.webkit.org/show_bug.cgi?id=144168
3209 Reviewed by Tim Horton.
3211 <rdar://problem/18985642> is not fixed, so we need to continue using the older
3212 objectForEqualityCheck().
3214 No new tests because there is no behavior change.
3216 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3217 (WebCore::FontPlatformData::objectForEqualityCheck):
3219 2015-06-02 Andy Estes <aestes@apple.com>
3221 [Mac] REGRESSION (r175941): Max.app crashes when adding a sound file to a patch due to removing cursor resources from WebCore.framework
3222 https://bugs.webkit.org/show_bug.cgi?id=145555
3224 Reviewed by Darin Adler.
3226 Re-added the cursor resources used by Max.app and ran sort-Xcode-project-file.
3228 * Resources/copyCursor.png: Added.
3229 * Resources/moveCursor.png: Added.
3230 * Resources/northEastSouthWestResizeCursor.png: Added.
3231 * Resources/northSouthResizeCursor.png: Added.
3232 * Resources/northWestSouthEastResizeCursor.png: Added.
3233 * WebCore.xcodeproj/project.pbxproj:
3235 2015-06-02 Brady Eidson <beidson@apple.com>
3237 WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
3238 rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
3240 Reviewed by Alex Christensen.
3242 Tests: loader/navigation-policy/should-open-external-urls/main-frame-click.html
3243 loader/navigation-policy/should-open-external-urls/main-frame-navigated-programatically-by-subframe.html
3244 loader/navigation-policy/should-open-external-urls/main-frame-with-flag-progamatic.html
3245 loader/navigation-policy/should-open-external-urls/main-frame-without-flag-programatic.html
3246 loader/navigation-policy/should-open-external-urls/subframe-click-target-self.html
3247 loader/navigation-policy/should-open-external-urls/subframe-click-target-top.html
3248 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html
3249 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html
3250 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html
3251 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag.html
3252 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag-from-subframe.html
3253 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag.html
3254 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag-from-subframe.html
3255 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag.html
3256 loader/navigation-policy/should-open-external-urls/window-open-with-flag-from-subframe.html
3257 loader/navigation-policy/should-open-external-urls/window-open-with-flag.html
3258 loader/navigation-policy/should-open-external-urls/window-open-without-flag-from-subframe.html
3259 loader/navigation-policy/should-open-external-urls/window-open-without-flag.html
3261 The "should open external URLs" flag is only for main frames.
3262 It doesn't enforce any sort of policy internal to WebKit, but rather is for notifications to the policy delegate.
3264 It is set from one of two places:
3265 1 - A main frame is navigated by any frame as the result of a user gesture.
3266 2 - WebKit2 API explicitly states the flag is true.
3268 The flag value propagates when:
3269 1 - When a main frame document is navigated to a new main frame document.
3270 2 - When a new window is opened from a page whose main frame had the flag set.
3271 3 - When a new window is opened as the result of a user gesture.
3273 The flag resets to false when:
3274 1 - A subframe navigates a main frame without a user gesture.
3276 This patch is large, but does little more than the following:
3277 1 - Adds a ShouldOpenExternalURLs flag to both FrameLoadRequest and NavigationAction.
3278 2 - Makes sure anybody who creates either of those objects sets a sensible for that flag.
3279 3 - When FrameLoader creates a new DocumentLoader, it sets its flag based on whether or not the load is in a main frame,
3280 whether or not the load is from a user gesture, and based on the initiator's value of the flag.
3283 (WebCore::Document::processHttpEquiv):
3284 (WebCore::Document::shouldOpenExternalURLsPolicyToPropagate):
3287 * html/HTMLAnchorElement.cpp:
3288 (WebCore::HTMLAnchorElement::handleClick):
3290 * html/HTMLLinkElement.cpp:
3291 (WebCore::HTMLLinkElement::handleClick):
3293 * html/parser/XSSAuditorDelegate.cpp:
3294 (WebCore::XSSAuditorDelegate::didBlockScript):
3296 * inspector/InspectorFrontendClientLocal.cpp:
3297 (WebCore::InspectorFrontendClientLocal::openInNewTab):
3299 * inspector/InspectorPageAgent.cpp:
3300 (WebCore::InspectorPageAgent::navigate):
3302 * loader/DocumentLoader.cpp:
3303 (WebCore::DocumentLoader::setTriggeringAction):
3304 (WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate):
3305 * loader/DocumentLoader.h:
3306 (WebCore::DocumentLoader::shouldOpenExternalURLsPolicy): Deleted.
3308 * loader/FrameLoadRequest.cpp:
3309 (WebCore::FrameLoadRequest::FrameLoadRequest):
3310 * loader/FrameLoadRequest.h:
3311 (WebCore::FrameLoadRequest::FrameLoadRequest):
3313 * loader/FrameLoader.cpp:
3314 (WebCore::FrameLoader::urlSelected):
3315 (WebCore::FrameLoader::receivedFirstData):
3316 (WebCore::FrameLoader::loadURLIntoChildFrame):
3317 (WebCore::FrameLoader::loadURL):
3318 (WebCore::FrameLoader::load):
3319 (WebCore::FrameLoader::loadWithNavigationAction):
3320 (WebCore::FrameLoader::reloadWithOverrideEncoding):
3321 (WebCore::FrameLoader::reload):
3322 (WebCore::FrameLoader::loadPostRequest):
3323 (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3324 (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
3325 * loader/FrameLoader.h:
3327 * loader/NavigationAction.cpp:
3328 (WebCore::NavigationAction::NavigationAction):
3329 (WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy):
3330 * loader/NavigationAction.h:
3331 (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy): Deleted.
3333 * loader/NavigationScheduler.cpp:
3334 (WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
3335 (WebCore::ScheduledRedirect::ScheduledRedirect):
3336 (WebCore::ScheduledLocationChange::ScheduledLocationChange):
3337 (WebCore::ScheduledRefresh::ScheduledRefresh):
3338 (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
3339 (WebCore::NavigationScheduler::scheduleRedirect):
3340 (WebCore::NavigationScheduler::scheduleLocationChange):
3341 (WebCore::NavigationScheduler::scheduleRefresh):
3342 * loader/NavigationScheduler.h:
3344 * loader/PolicyChecker.cpp:
3345 (WebCore::PolicyChecker::checkNavigationPolicy):
3347 * loader/SubframeLoader.cpp:
3348 (WebCore::SubframeLoader::loadOrRedirectSubframe):
3350 * loader/appcache/ApplicationCacheGroup.cpp:
3351 (WebCore::ApplicationCacheGroup::selectCache):
3353 * page/ContextMenuController.cpp:
3354 (WebCore::openNewWindow):
3355 (WebCore::ContextMenuController::contextMenuItemSelected):
3357 * page/DOMWindow.cpp:
3358 (WebCore::DOMWindow::setLocation):
3359 (WebCore::DOMWindow::createWindow):
3360 (WebCore::DOMWindow::open):
3362 * page/DragController.cpp:
3363 (WebCore::DragController::performDragOperation):
3365 * page/Location.cpp:
3366 (WebCore::Location::reload):
3368 * replay/ReplayInputDispatchMethods.cpp:
3369 (WebCore::InitialNavigation::dispatch):
3371 * svg/SVGAElement.cpp:
3372 (WebCore::SVGAElement::defaultEventHandler):
3374 2015-06-02 Yusuke Suzuki <utatane.tea@gmail.com>
3376 Heap-use-after-free read of size 4 in JavaScriptCore: WTF::StringImpl::isSymbol() (StringImpl.h:496)
3377 https://bugs.webkit.org/show_bug.cgi?id=145532
3379 Reviewed by Geoffrey Garen.
3381 Hold the ownership of AtomicStringImpl*.
3383 * bindings/scripts/CodeGeneratorJS.pm:
3384 (GenerateParametersCheck):
3385 * dom/TreeScope.cpp:
3386 (WebCore::TreeScope::getElementById):
3388 2015-06-02 Youenn Fablet <youenn.fablet@crf.canon.fr>
3390 SharedBuffer::copy should return a Ref<SharedBuffer>
3391 https://bugs.webkit.org/show_bug.cgi?id=145499
3393 Reviewed by Andreas Kling.
3395 Changing SharedBuffer::copy to return a Ref<> and adapting some code accordingly.
3397 Covered by existing tests.
3399 * loader/SubresourceLoader.cpp:
3400 (WebCore::SubresourceLoader::didReceiveResponse):
3401 * loader/appcache/ApplicationCacheResource.cpp:
3402 (WebCore::ApplicationCacheResource::deliver):
3403 * platform/SharedBuffer.cpp:
3404 (WebCore::SharedBuffer::copy):
3405 * platform/SharedBuffer.h:
3407 2015-06-01 Hunseop Jeong <hs85.jeong@samsung.com>
3409 Use modern for-loops in WebCore/Modules - 1