1 2015-06-09 Youenn Fablet <youenn.fablet@crf.canon.fr>
3 DeferredWrapper should clear its JS strong references once its promise is resolved/rejected
4 https://bugs.webkit.org/show_bug.cgi?id=145753
6 Reviewed by Darin Adler.
8 Clear strong references at the end of DeferredWrapper::resolve and DeferredWrapper::reject.
9 Added assertions to check that resolve or reject is called only once.
11 Removed DeferredWrapper constructor that creates internally its promise.
12 Reason is DeferredWrapper can be resolved synchronously and promise
13 will be lost when returning it at the end of the binding promise function.
14 Updated all custom bindings accordingly.
16 Covered by existing tests.
18 * bindings/js/JSAudioContextCustom.cpp:
19 (WebCore::JSAudioContext::suspend): Updated DeferredWrapper constructor to properly return the promise.
20 (WebCore::JSAudioContext::resume): Ditto.
21 (WebCore::JSAudioContext::close): Ditto.
22 * bindings/js/JSDOMPromise.cpp:
23 (WebCore::DeferredWrapper::resolve): Cleared strong references after promise resolution.
24 (WebCore::DeferredWrapper::reject): Cleared strong references after promise rejection.
25 * bindings/js/JSDOMPromise.h:
26 (WebCore::DeferredWrapper::resolve): Added ASSERT to check promise is not yet rejected/resolved.
27 (WebCore::DeferredWrapper::reject): Ditto.
28 (WebCore::DeferredWrapper::reject<ExceptionCode>): Ditto.
29 (WebCore::DeferredWrapper::resolve<String>): Ditto.
30 (WebCore::DeferredWrapper::resolve<bool>): Ditto.
31 (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Ditto.
33 (WebCore::DeferredWrapper::reject<String>): Ditto.
34 * bindings/js/JSMediaDevicesCustom.cpp:
35 (WebCore::JSMediaDevices::getUserMedia): Updated DeferredWrapper constructor to properly return the promise.
36 * bindings/js/JSReadableStreamReaderCustom.cpp:
37 (WebCore::JSReadableStreamReader::read): Ditto.
38 (WebCore::JSReadableStreamReader::closed): Ditto.
39 * bindings/js/JSSubtleCryptoCustom.cpp:
40 (WebCore::JSSubtleCrypto::encrypt): Ditto.
41 (WebCore::JSSubtleCrypto::decrypt): Ditto.
42 (WebCore::JSSubtleCrypto::sign): Ditto.
43 (WebCore::JSSubtleCrypto::verify): Ditto.
44 (WebCore::JSSubtleCrypto::digest): Ditto.
45 (WebCore::JSSubtleCrypto::generateKey): Ditto.
46 (WebCore::JSSubtleCrypto::importKey): Ditto.
47 (WebCore::JSSubtleCrypto::exportKey): Ditto.
48 (WebCore::JSSubtleCrypto::wrapKey): Ditto.
49 (WebCore::JSSubtleCrypto::unwrapKey): Ditto.
51 2015-06-09 Zalan Bujtas <zalan@apple.com>
53 Protect FrameView from being destroyed in Document::recalcStyle()
54 https://bugs.webkit.org/show_bug.cgi?id=143033
55 rdar://problem/20326871
57 Reviewed by Andreas Kling.
59 This patch ensures that FrameView stays valid in Document::recalcStyle().
60 It follows the defensive pattern we use to deal with the refcounted FrameView (see EventDispatcher::dispatchEvent)
62 When the iframe destroys itself in the onBeforeLoad callback (as the result of
63 PostResolutionCallbackDisabler -> HTMLObjectElement::updateWidget -> guardedDispatchBeforeLoadEvent),
64 we detach the frame and release the FrameView. However Document::recalcStyle() expects
65 the FrameView to stay valid.
67 Covered by fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html.
70 (WebCore::Document::recalcStyle):
72 2015-06-09 Daegyu Lee <daegyu.lee@navercorp.com>
74 3D-transformed video does not display on platforms without accelerated video rendering
75 https://bugs.webkit.org/show_bug.cgi?id=144782
77 Reviewed by Simon Fraser.
79 Video element does not get GraphicsLayer when MediaPlayerPrivate::supportsAcceleratedRendering() returns false
80 which means not using accelerated video decoding.
81 Although the video element gets GraphicsLayer by changing the CSS style of video element by javascript,
82 there is no way to set GraphicsLayer::setDrawsContent(true) for updating the video content.
83 As a result, after changing the CSS style, the video content does not show.
84 To avoid missing setDrawsContent(true), add conditions(!supportsAcceleratedRendering() && m_requiresOwnBackingStore).
86 Test: media/video-transformed-by-javascript.html
87 media/video-transformed-by-javascript-expected.html
89 * rendering/RenderLayerBacking.cpp:
90 (WebCore::RenderLayerBacking::containsPaintedContent):
92 2015-06-09 Ryosuke Niwa <rniwa@webkit.org>
94 REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight for text
95 https://bugs.webkit.org/show_bug.cgi?id=145830
97 Reviewed by Darin Adler.
99 The bug was caused by setSelection not updating RenderView when there is a style recalc scheduled
100 that doesn't trigger a layout. Fixed the bug by explicitly updating the selection in
101 Document::recalcStyle in that case.
103 Test: editing/selection/update-selection-by-style-change.html
106 (WebCore::Document::recalcStyle):
107 * editing/FrameSelection.cpp:
108 (WebCore::FrameSelection::updateAppearanceAfterLayout): Renamed from didLayout.
109 * editing/FrameSelection.h:
110 * page/FrameView.cpp:
111 (WebCore::FrameView::performPostLayoutTasks):
113 2015-06-09 Dean Jackson <dino@apple.com>
115 MediaControls: Reenable resize of controls on pinch zoom
116 https://bugs.webkit.org/show_bug.cgi?id=145824
117 <rdar://problem/21212778>
119 Reviewed by Darin Adler.
121 Reinstate the code that updated the scaling of the
122 controls in response to changes in page scale.
123 This time around we have to change both the controls
124 panel, and its blurry background.
126 * Modules/mediacontrols/mediaControlsApple.js:
127 (Controller.prototype.set pageScaleFactor): Deleted a comment.
128 * Modules/mediacontrols/mediaControlsiOS.css:
129 (video::-webkit-media-controls-panel-background): Set the background to pin
130 to the bottom of its view.
131 * Modules/mediacontrols/mediaControlsiOS.js:
132 (ControllerIOS.prototype.get pageScaleFactor): Basic getter, copied from mediaControlsApple.
133 (ControllerIOS.prototype.set pageScaleFactor): The setter that reacts to the page scale
134 and applies an inverse scaling on the control panel using a transform, and adjusts the
135 height on the background similarly.
137 2015-06-09 Andreas Kling <akling@apple.com>
139 GraphicsContext state stack wasting lots of memory when empty.
140 <https://webkit.org/b/145817>
142 Reviewed by Geoffrey Garen.
144 Give the GraphicsContextState stack an inline capacity of 1, and make sure
145 to free any heap-allocated backing store when the stack goes empty.
147 The 1 is because HTMLCanvasElement keeps one "save" on the underlying
148 GraphicsContext at all times, and this prevents those canvases from always
149 sitting on an empty stack with 16 capacity.
151 This saves ~520 kB on cnet.com video pages.
153 * platform/graphics/GraphicsContext.cpp:
154 (WebCore::GraphicsContext::restore):
155 * platform/graphics/GraphicsContext.h:
157 2015-06-09 Said Abou-Hallawa <sabouhallawa@apple.com>
159 SVG Fragment is not rendered if it is the css background image of an HTML element
160 https://bugs.webkit.org/show_bug.cgi?id=91790
162 Reviewed by Darin Adler.
164 To show an SVG fragment, the SVGImage has to scrollToFragment() using
165 the resource url. The changes http://trac.webkit.org/changeset/164804
166 and http://trac.webkit.org/changeset/164983 set the url of SVGImage to
167 to be used later in SVGImage::draw(). The problem is the SVGImage url
168 is only set when it is the src of an <img> tag. We did not do the same
169 thing when the SVGImage is the css background image of an HTML element.
171 The fix is to set the url of the SVGImage always when it's created by
172 the CachedImage. The CachedImage must have a valid url when the SVGImage
175 Test: svg/css/svg-resource-fragment-identifier-background.html
177 * loader/cache/CachedImage.cpp:
178 (WebCore::CachedImage::load):
179 (WebCore::CachedImage::checkShouldPaintBrokenImage):
180 Replace the calls resourceRequest().url() and m_resourceRequest.url() by
181 calling url() since they are all the same.
183 (WebCore::CachedImage::createImage): Pass the resource url to SVGImage
184 and change ImageObserver& by ImageObserver*, since null is not legal.
186 * svg/graphics/SVGImage.cpp:
187 (WebCore::SVGImage::SVGImage):
188 * svg/graphics/SVGImage.h: Add a url parameter to SVGImage constructor.
190 * svg/graphics/SVGImageCache.cpp:
191 (WebCore::SVGImageCache::findImageForRenderer): Add a new helper function.
193 (WebCore::SVGImageCache::imageSizeForRenderer):
194 (WebCore::SVGImageCache::imageForRenderer): Code clean up.
196 * svg/graphics/SVGImageCache.h: Make imageForRenderer() const.
198 * svg/graphics/SVGImageForContainer.cpp: Remove unneeded header file.
200 2015-06-09 Matt Rajca <mrajca@apple.com>
202 Add support for toggling playback in MediaSessions and MediaSessionManagers.
203 https://bugs.webkit.org/show_bug.cgi?id=145822
205 Reviewed by Eric Carlson.
207 * Modules/mediasession/MediaSession.cpp: Toggle playback of all active media elements.
208 (WebCore::MediaSession::togglePlayback):
209 * Modules/mediasession/MediaSession.h:
210 * Modules/mediasession/MediaSessionManager.cpp: Toggle playback of all media sessions as described in the
212 (WebCore::MediaSessionManager::togglePlayback):
213 * Modules/mediasession/MediaSessionManager.h:
215 2015-06-09 Darin Adler <darin@apple.com>
217 Takes two delete key presses to delete pasted emoji up-pointing index finger with skin tone
218 https://bugs.webkit.org/show_bug.cgi?id=145823
220 Reviewed by Anders Carlsson.
222 Tests: editing/deleting/delete-emoji.html
224 * rendering/RenderText.cpp:
225 (WebCore::isHangulLVT): Use constants instead of macros. Also changed to take a UChar since
226 the Hangul processing can work on UTF-16 code unit at a time and doesn't have to handle
228 (WebCore::isMark): Use U_GC_M_MASK instead of writing the algorithm out another way.
229 (WebCore::isInArmenianToLimbuRange): Added.
230 (WebCore::RenderText::previousOffsetForBackwardDeletion): Refactored for clarity and to use
231 the U16_PREV macro instead of doing what it does in a sloppier way. Added code to allow a
232 variation selector before an emoji modifier to fix the bug. Changed Hangul logic to work a
233 code unit at a time, since it can, to use an enum class, and to use constants rather than
234 all capital macros. Also changed the "dumb" case to use a more appropriate ICU macro.
236 2015-06-09 Said Abou-Hallawa <sabouhallawa@apple.com>
238 feComposite filter does not clip the paint rect to its effect rect when the operator is 'in' or 'atop'
239 https://bugs.webkit.org/show_bug.cgi?id=137856
241 Reviewed by Darin Adler.
243 There was bug in calculating the absolutePaintRect of the feComposite filter
244 when the operator is equal to 'in' or 'atop'. The absolutePaintRect was set
245 to the absolutePaintRect of the background FilterEffect which is correct.
246 What was missing is clipping this rectangle to the maxEffectRect of the
247 filter which we do for other operators.
249 Tests: svg/filters/feComposite-background-rect-control-operators.svg
251 * platform/graphics/IntRect.h:
252 (WebCore::operator-=):
253 (WebCore::operator-): Add new operators to IntRect.
255 * platform/graphics/filters/FEComposite.cpp:
256 (WebCore::FEComposite::determineAbsolutePaintRect): Make sure the filter
257 absolutePaintRect is clipped to maxEffectRect for all operators.
259 (WebCore::FEComposite::platformApplySoftware): Code clean-up.
261 * platform/graphics/filters/FilterEffect.cpp:
262 (WebCore::FilterEffect::determineAbsolutePaintRect): Move the clipping
263 part to a separate function.
265 (WebCore::FilterEffect::clipAbsolutePaintRect): Clip the absolutePaintRect
266 to the maxEffectRect of the filter.
268 * platform/graphics/filters/FilterEffect.h:
270 2015-06-09 Matt Rajca <mrajca@apple.com>
272 Implement MediaSessionManager to keep track of all MediaSessions.
273 https://bugs.webkit.org/show_bug.cgi?id=145806
275 Reviewed by Eric Carlson.
277 * Modules/mediasession/MediaSession.cpp:
278 (WebCore::MediaSession::MediaSession): Add ourselves to the MediaSessionManager upon construction.
279 (WebCore::MediaSession::~MediaSession): Remove ourselves from the MediaSessionManager before destruction.
280 * Modules/mediasession/MediaSessionManager.cpp: Added to keep track of all living MediaSessions.
281 (WebCore::MediaSessionManager::singleton):
282 (WebCore::MediaSessionManager::addMediaSession):
283 (WebCore::MediaSessionManager::removeMediaSession):
284 * Modules/mediasession/MediaSessionManager.h: Added.
285 * WebCore.xcodeproj/project.pbxproj: Added new MediaSessionManager sources.
287 2015-06-09 Ryuan Choi <ryuan.choi@navercorp.com>
289 [CoordinatedGraphics] Remove RefCounted from Tile
290 https://bugs.webkit.org/show_bug.cgi?id=145788
292 Reviewed by Darin Adler.
294 Since r185140, Tile does not need to be RefCounted.
296 No new tests, no behavior changes.
298 * platform/graphics/texmap/coordinated/Tile.cpp:
299 (WebCore::Tile::create): Deleted.
300 * platform/graphics/texmap/coordinated/Tile.h:
301 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
302 (WebCore::TiledBackingStore::invalidate):
303 (WebCore::TiledBackingStore::updateTileBuffers): Simplifies not to use unnecessary Vector.
304 (WebCore::TiledBackingStore::coverageRatio):
305 (WebCore::TiledBackingStore::createTiles):
306 (WebCore::TiledBackingStore::resizeEdgeTiles):
307 (WebCore::TiledBackingStore::setKeepRect):
308 (WebCore::TiledBackingStore::tileAt): Deleted one line wrapper.
309 (WebCore::TiledBackingStore::setTile): Ditto.
310 (WebCore::TiledBackingStore::removeTile): Ditto.
311 * platform/graphics/texmap/coordinated/TiledBackingStore.h:
313 2015-06-09 Chris Dumez <cdumez@apple.com>
315 Allow one sync GC per gcTimer interval on critical memory pressure warning
316 https://bugs.webkit.org/show_bug.cgi?id=145773
318 Reviewed by Geoffrey Garen.
320 * bindings/js/GCController.cpp:
321 (WebCore::GCController::garbageCollectNowIfNotDoneRecently):
323 Add new GCController::garbageCollectNowIfNotDoneRecently() API that
324 allows one synchronous GC per full GC timer interval. If called more
325 than once per interval, it becomes equivalent to garbageCollectSoon()
326 and merely accelerates the next collection.
328 * bindings/js/GCController.h:
329 * platform/MemoryPressureHandler.cpp:
330 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
332 Call the new GCController::garbageCollectNowIfNotDoneRecently() on
333 critical memory pressure instead of garbageCollectionSoon() to try
334 as do a synchronous GC if one wasn't already done recently.
335 Also drop call to fullSweep() as GCController::garbageCollectNow*()
336 already do a sweep after the collection.
338 2015-06-09 Darin Adler <darin@apple.com>
341 JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
342 https://bugs.webkit.org/show_bug.cgi?id=145811
344 There was one unusual case in the bindings generator that was depending on this.
346 * bindings/js/JSDOMBinding.h:
347 (WebCore::argumentOrNull): Deleted.
348 * bindings/scripts/CodeGeneratorJS.pm:
349 (GenerateParametersCheck): Stop using argumentOrNull.
350 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Updated.
351 * bindings/scripts/test/JS/JSTestObj.cpp: Updated.
353 2015-06-09 Darin Adler <darin@apple.com>
355 JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
356 https://bugs.webkit.org/show_bug.cgi?id=145811
358 Reviewed by Antti Koivisto.
360 At some point, someone who didn't understand JSValue very well added checks for
361 isEmpty (and the function isEmpty itself) in JavaScript bindings. But the engine
362 never would pass an empty JSValue to a binding; that's used only inside the
363 engine itself. I think this was done by some Google V8 experts a while back, so
364 it's not entirely surprising they didn't understand this. But we don't want to
365 keep all that unneeded code.
367 * bindings/js/JSAudioTrackCustom.cpp:
368 (WebCore::JSAudioTrack::setKind): Removed the isEmpty clause here. I presume this
369 was copied and pasted from script-generated bindings. While I was at it, I used a
370 slightly more efficient code path that avoids doing a ref/deref on the string by
371 using auto&. That's trickier to do correctly for functions with more than one
372 argument, so I didn't do it in the bindings generator yet.
373 (WebCore::JSAudioTrack::setLanguage): Ditto.
374 * bindings/js/JSTextTrackCustom.cpp:
375 (WebCore::JSTextTrack::setKind): Ditto.
376 (WebCore::JSTextTrack::setLanguage): Ditto.
377 * bindings/js/JSVideoTrackCustom.cpp:
378 (WebCore::JSVideoTrack::setKind): Ditto.
379 (WebCore::JSVideoTrack::setLanguage): Ditto.
381 * bindings/scripts/CodeGeneratorJS.pm:
382 (GenerateImplementation): Use "=" syntax instead of constructor style syntax for
383 the argument processing. I think this is more readable.
384 (GenerateParametersCheck): For the enum code path, did the more efficient auto&
385 idiom to avoid ref/deref on a string. For the toExistingAtomicString path,
386 restructured so we don't have to check the flag indicating that something is atomic.
387 Later we could also avoid the ref/deref; added a FIXME about that.
388 (GetNativeType): Use String, not const String, for local variables. Sure, the
389 string is const, but so is every other local variable type we use! No need to be
391 (JSValueToNative): Removed the uneeded calls to isEmpty. Since the call sites no
392 longer use construction syntax, used initializer syntax style for a couple classes
393 that are constructed with multiple arguments.
395 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated.
396 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
397 * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
398 * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
399 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
400 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
401 * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
402 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
403 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
404 * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
406 2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
408 Fix unused private field warning in GraphicsLayerUpdater.h
409 https://bugs.webkit.org/show_bug.cgi?id=145757
411 Reviewed by Darin Adler.
413 * platform/graphics/GraphicsLayerUpdater.cpp:
414 (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
415 * platform/graphics/GraphicsLayerUpdater.h:
417 2015-06-09 Yusuke Suzuki <utatane.tea@gmail.com>
419 Crash when passing Symbol to NPAPI plugin objects
420 https://bugs.webkit.org/show_bug.cgi?id=145798
422 Reviewed by Darin Adler.
424 Test: plugins/npruntime/script-object-with-symbols.html
426 For C bridge APIs, we add guards for symbols.
427 This is the same to the existing guards in Objective-C APIs.
429 * bridge/c/c_class.cpp:
430 (JSC::Bindings::CClass::methodNamed):
431 (JSC::Bindings::CClass::fieldNamed):
432 * bridge/objc/objc_class.mm:
433 (JSC::Bindings::ObjcClass::methodNamed):
434 (JSC::Bindings::ObjcClass::fieldNamed):
435 (JSC::Bindings::ObjcClass::fallbackObject):
437 2015-06-09 Csaba Osztrogonác <ossy@webkit.org>
439 [cmake] Fix the style issues in cmake project files
440 https://bugs.webkit.org/show_bug.cgi?id=145755
442 Reviewed by Darin Adler.
449 * PlatformWinCairo.cmake:
451 2015-06-09 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
453 [Streams API] ReadableJSStream should handle JS source getters that throw
454 https://bugs.webkit.org/show_bug.cgi?id=145600
456 Reviewed by Darin Adler.
458 Checking whether there is an exception when trying to access to a source method.
459 If so, rethrowing it in case of "start".
461 Refactoring of code to prepare pulling, cancelling and additional parameter handling in ReadableStream construtor.
463 Fixed the case of ReadableStream constructor called with an undefined parameter.
465 Covered by rebased test expectation.
467 * bindings/js/JSReadableStreamCustom.cpp:
468 (WebCore::constructJSReadableStream): Refactoring to group all parameter check and exception handling in ReadableJSStream::create.
469 * bindings/js/ReadableJSStream.cpp:
470 (WebCore::getPropertyFromObject):
471 (WebCore::callFunction):
472 (WebCore::ReadableJSStream::invoke): Added method to be used also for pulling and cancelling.
473 (WebCore::ReadableJSStream::doStart):
474 (WebCore::ReadableJSStream::create):
475 * bindings/js/ReadableJSStream.h:
477 2015-06-08 Dan Bernstein <mitz@apple.com>
479 Made MicroTask.h a project header.
481 Rubber-stamped by Anders Carlsson.
483 * WebCore.xcodeproj/project.pbxproj: Demoted MicroTask.h from Public to Project. WebCore
484 doesn’t have public headers, and this header isn’t used by WebKit.
486 2015-06-08 Gyuyoung Kim <gyuyoung.kim@webkit.org>
488 Purge PassRefPtr in JavaScriptCore
489 https://bugs.webkit.org/show_bug.cgi?id=145750
491 Reviewed by Darin Adler.
493 As a step to purge PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.
495 No new tests, no behavior changes.
497 * bindings/js/JSDOMWindowBase.cpp:
498 (WebCore::JSDOMWindowBase::commonVM):
500 2015-06-08 Zalan Bujtas <zalan@apple.com>
502 Subpixel rendering: Clip-path does not work properly on subpixel positions.
503 https://bugs.webkit.org/show_bug.cgi?id=145749
504 rdar://problem/20824305
506 Reviewed by Simon Fraser.
508 This patch ensures that clip-path is device pixel snapped both for composited and
509 non-composited content.
511 Tests: compositing/masks/compositing-clip-path-on-subpixel-position.html
512 fast/masking/clip-path-on-subpixel-position.html
514 * rendering/RenderLayer.cpp:
515 (WebCore::RenderLayer::setupClipPath):
516 * rendering/RenderLayerBacking.cpp:
517 (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
519 2015-06-08 Chris Dumez <cdumez@apple.com>
521 Access GCController instance via GCController::singleton() instead of a free function
522 https://bugs.webkit.org/show_bug.cgi?id=145776
524 Reviewed by Darin Adler.
526 Access GCController instance via GCController::singleton() instead of a
527 free function as per coding style and for consistency with other
528 singleton classes in the codebase.
530 * bindings/js/GCController.cpp:
531 (WebCore::GCController::singleton):
532 (WebCore::gcController): Deleted.
533 * bindings/js/GCController.h:
534 * bindings/js/JSDOMWindowShell.cpp:
535 (WebCore::JSDOMWindowShell::setWindow):
536 * bindings/js/ScriptCachedFrameData.cpp:
537 (WebCore::ScriptCachedFrameData::clear):
538 * bindings/js/ScriptController.cpp:
539 (WebCore::collectGarbageAfterWindowShellDestruction):
540 * platform/MemoryPressureHandler.cpp:
541 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
543 2015-06-08 Daniel Bates <dabates@apple.com>
545 Mouse release on AutoFill button activates it; should only activate on click
546 https://bugs.webkit.org/show_bug.cgi?id=145774
547 <rdar://problem/21069245>
549 Reviewed by Ryosuke Niwa.
551 Fixes an issue where a click event was dispatched to a shadow tree node regardless of whether
552 both the mouse press and mouse release were targeted at it. In particular, releasing the mouse
553 on the AutoFill button activates it regardless of whether the mouse was pressed on it.
555 Currently we always dispatch a click event to a node n where the mouse was released when n is
556 in a shadow tree regardless of whether the mouse was pressed on n. Instead we should only
557 dispatch a click event to n if the mouse was pressed and released on n. If n is a shadow tree
558 descendant, the mouse was released on n, and n never received a mouse press then we should
559 dispatch the click event at the shadow host element of n to preserve the illusion to web
560 developers that the shadow host element is a single element.
562 Test: fast/forms/auto-fill-button/mouse-down-input-mouse-release-auto-fill-button.html
564 * page/EventHandler.cpp:
565 (WebCore::targetNodeForClickEvent): Added; returns the target node for the DOM click event.
566 (WebCore::EventHandler::handleMouseReleaseEvent): Modified to use dispatch the DOM click event
567 at the node returned by targetNodeForClickEvent().
568 (WebCore::mouseIsReleasedOnPressedElement): Deleted.
570 2015-06-08 Chris Dumez <cdumez@apple.com>
572 WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
573 https://bugs.webkit.org/show_bug.cgi?id=145748
574 <rdar://problem/21226577>
576 Reviewed by Brady Eidson.
578 We would sometimes crash when pruning the PageCache because it was
579 possible for frames to still be loading while in the PageCache and
580 we would try to stop the load when the CachedFrame is destroyed. This
581 code path was not supposed to be exercised as we were not supposed to
582 have pages still loading inside the PageCache.
584 r185017 made sure we don't insert into the PageCache pages that are
585 still loading. However, nothing was preventing content from starting
586 new loads in their 'pagehide' event handlers, *after* the decision
587 to put the page in the PageCache was made.
589 This patch prevents content from starting loads from a 'pagehide'
590 event handler so that we can no longer have content that is loading
591 inside the PageCache. 'ping' image loads still go through though as
592 these are specially handled and use PingLoaders.
594 Tests: http/tests/navigation/image-load-in-pagehide-handler.html
595 http/tests/navigation/subframe-pagehide-handler-starts-load.html
596 http/tests/navigation/subframe-pagehide-handler-starts-load2.html
598 * loader/FrameLoader.cpp:
599 (WebCore::FrameLoader::FrameLoader):
600 (WebCore::FrameLoader::stopLoading):
601 (WebCore::FrameLoader::loadURL):
602 (WebCore::FrameLoader::loadWithDocumentLoader):
603 (WebCore::FrameLoader::stopAllLoaders):
604 (WebCore::FrameLoader::handleBeforeUnloadEvent):
605 * loader/FrameLoader.h:
606 (WebCore::FrameLoader::pageDismissalEventBeingDispatched):
607 (WebCore::FrameLoader::PageDismissalEventType::PageDismissalEventType):
608 (WebCore::FrameLoader::PageDismissalEventType::operator Page::DismissalType):
610 Add wrapper class for m_pageDismissalEventBeingDispatched member type.
611 The wrapper takes care of updating the m_dismissalEventBeingDispatched
612 member on the Page every time the member on FrameLoader is updated. We
613 now cache this information on the Page so that clients can cheaply
614 query if a dismissal event is being dispatched in any of the Page's
615 frame, without having to traverse the frame tree.
617 * loader/ImageLoader.cpp:
618 (WebCore::pageIsBeingDismissed):
620 * loader/cache/CachedResource.cpp:
621 (WebCore::CachedResource::load):
623 Abort the load early if we are currently dispatching a 'pagehide'
624 event. We don't allow new loads at such point because we've already
625 made the decision to add the Page to the PageCache.
627 * loader/cache/CachedResourceLoader.cpp:
628 (WebCore::CachedResourceLoader::requestImage):
631 (WebCore::Chrome::runModal): Deleted.
632 (WebCore::Chrome::setToolbarsVisible): Deleted.
633 (WebCore::Chrome::toolbarsVisible): Deleted.
634 (WebCore::Chrome::runJavaScriptConfirm): Deleted.
635 (WebCore::Chrome::runJavaScriptPrompt): Deleted.
636 (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
638 * page/ChromeClient.h:
639 * page/DOMWindow.cpp:
640 (WebCore::DOMWindow::canShowModalDialogNow):
642 Drop ChromeClient::shouldRunModalDialogDuringPageDismissal() and code
643 using it as it is unused and I did not think it was worth updating
647 (WebCore::Page::dismissalEventBeingDispatched):
648 (WebCore::Page::setDismissalEventBeingDispatched):
650 Add a m_dismissalEventBeingDispatched member to the Page so that we can
651 easily query if a dismissal event is being dispatched in any of the
652 frames, without having to traverse the frame tree. I suspect more call
653 sites of FrameLoader::pageDismissalEventBeingDispatched() may actually
654 want this but I did not make such change in this patch. It is important
655 to check all the frames and not simply the current one because a frame's
656 pagehide event handler may trigger a load in another frame.
658 2015-06-08 Hunseop Jeong <hs85.jeong@samsung.com>
660 Replaced 0 with nullptr in WebCore/Modules.
661 https://bugs.webkit.org/show_bug.cgi?id=145758
663 Reviewed by Darin Adler.
665 No new tests, no behavior changes.
667 * Modules/battery/BatteryManager.cpp:
668 (WebCore::BatteryManager::BatteryManager):
669 * Modules/encryptedmedia/CDM.cpp:
671 * Modules/encryptedmedia/MediaKeys.cpp:
672 (WebCore::MediaKeys::MediaKeys):
673 (WebCore::MediaKeys::~MediaKeys):
674 * Modules/indexeddb/IDBCursor.h:
675 (WebCore::IDBCursor::continueFunction):
676 * Modules/indexeddb/IDBCursorBackendOperations.cpp:
677 (WebCore::CursorAdvanceOperation::perform):
678 (WebCore::CursorIterationOperation::perform):
679 * Modules/indexeddb/IDBDatabase.cpp:
680 (WebCore::IDBDatabase::transactionFinished):
681 * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
682 (WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl):
683 * Modules/indexeddb/IDBEventDispatcher.cpp:
684 (WebCore::IDBEventDispatcher::dispatch):
685 * Modules/indexeddb/IDBIndex.h:
686 (WebCore::IDBIndex::openCursor):
687 (WebCore::IDBIndex::count):
688 (WebCore::IDBIndex::openKeyCursor):
689 * Modules/indexeddb/IDBObjectStore.cpp:
690 (WebCore::IDBObjectStore::add):
691 (WebCore::IDBObjectStore::put):
692 (WebCore::IDBObjectStore::index):
693 (WebCore::IDBObjectStore::openCursor):
694 * Modules/indexeddb/IDBObjectStore.h:
695 (WebCore::IDBObjectStore::count):
696 * Modules/indexeddb/IDBOpenDBRequest.cpp:
697 (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
698 (WebCore::IDBOpenDBRequest::onSuccess):
699 * Modules/indexeddb/IDBRequest.cpp:
700 (WebCore::IDBRequest::IDBRequest):
701 * Modules/indexeddb/IDBTransaction.cpp:
702 (WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished):
703 * Modules/indexeddb/IDBTransactionBackend.cpp:
704 (WebCore::IDBTransactionBackend::commit):
705 * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
706 (WebCore::OpenCursorOperation::perform):
707 * Modules/indieui/UIRequestEvent.cpp:
708 (WebCore::UIRequestEventInit::UIRequestEventInit):
709 (WebCore::UIRequestEvent::UIRequestEvent):
710 * Modules/mediasource/MediaSource.cpp:
711 (WebCore::MediaSource::MediaSource):
712 (WebCore::MediaSource::setReadyState):
713 (WebCore::MediaSource::removeSourceBuffer):
714 * Modules/mediasource/SourceBuffer.cpp:
715 (WebCore::SourceBuffer::~SourceBuffer):
716 (WebCore::SourceBuffer::removedFromMediaSource):
717 * Modules/mediastream/MediaStream.cpp:
718 (WebCore::MediaStream::~MediaStream):
719 * Modules/mediastream/MediaStreamEvent.cpp:
720 (WebCore::MediaStreamEventInit::MediaStreamEventInit):
721 * Modules/mediastream/MediaStreamTrackEvent.cpp:
722 (WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit):
723 * Modules/mediastream/RTCDataChannel.cpp:
724 (WebCore::RTCDataChannel::stop):
725 * Modules/mediastream/UserMediaRequest.cpp:
726 (WebCore::UserMediaRequest::contextDestroyed):
727 * Modules/notifications/Notification.cpp:
728 (WebCore::Notification::Notification):
729 * Modules/notifications/Notification.h:
730 * Modules/speech/SpeechSynthesis.cpp:
731 (WebCore::SpeechSynthesis::SpeechSynthesis):
732 (WebCore::SpeechSynthesis::setPlatformSynthesizer):
733 (WebCore::SpeechSynthesis::cancel):
734 (WebCore::SpeechSynthesis::handleSpeakingCompleted):
735 * Modules/speech/SpeechSynthesisUtterance.cpp:
736 (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
737 * Modules/webaudio/AudioBufferSourceNode.cpp:
738 (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
739 (WebCore::AudioBufferSourceNode::clearPannerNode):
740 * Modules/webaudio/AudioContext.cpp:
741 (WebCore::AudioContext::createMediaStreamSource):
742 * Modules/webaudio/MediaElementAudioSourceNode.cpp:
743 (WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode):
744 * Modules/webaudio/OscillatorNode.cpp:
745 (WebCore::OscillatorNode::setType):
746 (WebCore::OscillatorNode::process):
747 * Modules/webdatabase/DatabaseManager.cpp:
748 (WebCore::DatabaseManager::DatabaseManager):
749 * Modules/webdatabase/DatabaseThread.cpp:
750 (WebCore::DatabaseThread::DatabaseThread):
751 (WebCore::DatabaseThread::databaseThread):
752 * Modules/webdatabase/DatabaseThread.h:
753 * Modules/webdatabase/DatabaseTracker.cpp:
754 (WebCore::DatabaseTracker::DatabaseTracker):
755 * Modules/webdatabase/SQLCallbackWrapper.h:
756 (WebCore::SQLCallbackWrapper::clear):
757 (WebCore::SQLCallbackWrapper::unwrap):
758 * Modules/webdatabase/SQLStatementBackend.cpp:
759 (WebCore::SQLStatementBackend::clearFailureDueToQuota):
760 * Modules/webdatabase/SQLTransaction.cpp:
761 (WebCore::SQLTransaction::deliverTransactionErrorCallback):
762 * Modules/webdatabase/SQLTransactionBackend.cpp:
763 (WebCore::SQLTransactionBackend::doCleanup):
764 (WebCore::SQLTransactionBackend::getNextStatement):
765 * Modules/webdatabase/SQLTransactionCoordinator.cpp:
766 (WebCore::SQLTransactionCoordinator::releaseLock):
767 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
768 (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
769 (WebCore::ThreadableWebSocketChannelClientWrapper::clearPeer):
770 (WebCore::ThreadableWebSocketChannelClientWrapper::clearClient):
771 * Modules/websockets/WebSocket.cpp:
772 (WebCore::WebSocket::stop):
773 * Modules/websockets/WebSocketChannel.cpp:
774 (WebCore::WebSocketChannel::disconnect):
775 (WebCore::WebSocketChannel::didCloseSocketStream):
776 * Modules/websockets/WebSocketFrame.h:
777 * Modules/websockets/WebSocketHandshake.cpp:
778 (WebCore::WebSocketHandshake::clearScriptExecutionContext):
779 (WebCore::WebSocketHandshake::readStatusLine):
780 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
781 (WebCore::WorkerThreadableWebSocketChannel::Peer::disconnect):
782 (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
783 (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
785 2015-06-08 Chris Fleizach <cfleizach@apple.com>
787 AX: improve list heuristics (presentational use versus actual lists)
788 https://bugs.webkit.org/show_bug.cgi?id=134187
790 Unreviewed. Rolling this change out temporarily.
792 * accessibility/AccessibilityList.cpp:
793 (WebCore::AccessibilityList::isDescriptionList):
794 (WebCore::AccessibilityList::determineAccessibilityRole):
795 (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): Deleted.
796 * accessibility/AccessibilityList.h:
798 2015-06-08 Eric Carlson <eric.carlson@apple.com>
800 [Mac] Enable AVFoundation by default when QTKit is disabled by default
801 https://bugs.webkit.org/show_bug.cgi?id=145760
803 Reviewed by Alexey Proskuryakov.
805 No new tests, this change makes existing tests pass.
807 Settings::gAVFoundationEnabled defaults to true.
810 (WebCore::invalidateAfterGenericFamilyChange):
812 2015-06-08 Ryosuke Niwa <rniwa@webkit.org>
814 Explicitly dismiss correction panel when user types a new character
815 https://bugs.webkit.org/show_bug.cgi?id=145732
816 <rdar://problem/19596892>
818 Reviewed by Darin Adler.
820 Explicitly dismiss the correction panel when the user types a new character.
821 This patch shouldn't change any behavior we're currently relying on AppKit to do the same.
823 Manually ran tests in ManualTests/autocorrection.
825 * editing/AlternativeTextController.cpp:
826 (WebCore::AlternativeTextController::respondToAppliedEditing):
828 2015-06-08 Javier Fernandez <jfernandez@igalia.com>
830 [CSS Grid Layout] Setting height on a grid item doesn't have any effect
831 https://bugs.webkit.org/show_bug.cgi?id=145604
833 Reviewed by Sergio Villar Senin.
835 Box Alignment spec states that stretch is only possible when height is
836 'auto' and no 'auto' margins are used.
838 It might be the case that style changes so that stretching is not allowed,
839 hence we need to detect it and clear the override height the stretching
840 algorithm previously set. The new layout triggered by the style change
841 will then set grid item's height according to the new style rules.
843 Test: fast/css-grid-layout/grid-item-should-not-be-stretched-when-height-or-margin-change.html
845 * rendering/RenderGrid.cpp:
846 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
848 2015-06-08 Brady Eidson <beidson@apple.com>
850 Completely remove all IDB properties/constructors when it is disabled at runtime.
851 rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034
853 Reviewed by Geoffrey Garen.
855 Test: storage/indexeddb/properties-disabled-at-runtime.html
857 - Make constructors all runtime enabled.
858 - Remove autogeneration of the window.(webkit)indexedDB accessors.
859 - Add manual overrides for the (webkit)indexedDB accessors at runtime.
861 * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
862 * Modules/indexeddb/IDBAny.idl:
863 * Modules/indexeddb/IDBCursor.idl:
864 * Modules/indexeddb/IDBCursorWithValue.idl:
865 * Modules/indexeddb/IDBDatabase.idl:
866 * Modules/indexeddb/IDBFactory.idl:
867 * Modules/indexeddb/IDBIndex.idl:
868 * Modules/indexeddb/IDBKeyRange.idl:
869 * Modules/indexeddb/IDBObjectStore.idl:
870 * Modules/indexeddb/IDBOpenDBRequest.idl:
871 * Modules/indexeddb/IDBRequest.idl:
872 * Modules/indexeddb/IDBTransaction.idl:
873 * Modules/indexeddb/IDBVersionChangeEvent.idl:
874 * page/DOMWindow.idl:
876 * bindings/js/JSDOMWindowCustom.cpp:
877 (WebCore::jsDOMWindowIndexedDB):
878 (WebCore::JSDOMWindow::getOwnPropertySlot):
880 2015-06-08 Michael Catanzaro <mcatanzaro@igalia.com>
882 [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
883 https://bugs.webkit.org/show_bug.cgi?id=145542
885 Reviewed by Alexey Proskuryakov.
887 No new tests, because it's hard to test whether a DNS request has been sent. We could do
888 this by adding new API to modify the GProxyResolver and GResolver used by the SoupSession in
889 the network process, but even if such API were desirable, it would be a big job. Tests
890 should not be allowed to dictate our public API.
892 * platform/network/DNSResolveQueue.cpp:
893 (WebCore::DNSResolveQueue::add): Do not check whether the system is using a proxy, since
894 this can't be determined for all ports here.
895 (WebCore::DNSResolveQueue::timerFired): Do not check whether the system is using a proxy,
896 since this can't be determined for all ports here.
897 (WebCore::DNSResolveQueue::DNSResolveQueue): Remove member variables and member functions
898 that are only needed by the CF backend. Rename platformResolve to
899 platformMaybeResolveHost.
900 (WebCore::DNSResolveQueue::isUsingProxy): Moved to DNSCFNet.cpp.
901 * platform/network/DNSResolveQueue.h: Remove member variables that are only needed by the
903 * platform/network/cf/DNSCFNet.cpp:
904 (WebCore::proxyIsEnabledInSystemPreferences): Renamed from
905 platformProxyIsEnabledInSystemPreferences.
906 (WebCore::isUsingProxy): Moved from DNSResolveQueue.cpp. The member variables removed from
907 DNSResolveQueue are not static here. This is safe since it's a singleton.
908 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
909 Bail early from here if a proxy is configured.
910 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Renamed to
911 proxyIsEnabledInSystemPreferences.
912 (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
913 * platform/network/soup/DNSSoup.cpp:
914 (WebCore::gotProxySettingsCallback): Added. Call soup_session_prefetch_dns from here only
915 if a proxy would not be used to resolve the host.
916 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
917 Look up proxy settings using g_proxy_resolver_lookup_async rather than calling
918 soup_session_prefetch_dns directly.
919 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
920 (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
922 2015-06-08 Hunseop Jeong <hs85.jeong@samsung.com>
924 Use modern for-loops in WebCore/Modules - 2
925 https://bugs.webkit.org/show_bug.cgi?id=145541
927 Reviewed by Darin Adler.
929 No new tests, no behavior changes.
931 * Modules/mediastream/RTCConfiguration.h:
932 (WebCore::RTCConfiguration::iceServers):
933 * Modules/mediastream/RTCDTMFSender.cpp:
934 (WebCore::RTCDTMFSender::scheduledEventTimerFired):
935 * Modules/mediastream/RTCDataChannel.cpp:
936 (WebCore::RTCDataChannel::scheduledEventTimerFired):
937 * Modules/mediastream/RTCPeerConnection.cpp:
938 (WebCore::processIceServer):
939 (WebCore::RTCPeerConnection::~RTCPeerConnection):
940 (WebCore::RTCPeerConnection::getStreamById):
941 (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
942 (WebCore::RTCPeerConnection::stop):
943 (WebCore::RTCPeerConnection::scheduledEventTimerFired):
944 * Modules/mediastream/RTCStatsReport.cpp:
945 (WebCore::RTCStatsReport::names):
946 * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
947 (WebCore::initProtocolHandlerWhitelist):
948 * Modules/speech/SpeechSynthesis.cpp:
949 (WebCore::SpeechSynthesis::getVoices):
950 * Modules/webaudio/AudioBuffer.cpp:
951 (WebCore::AudioBuffer::memoryCost):
952 * Modules/webaudio/AudioContext.cpp:
953 (WebCore::AudioContext::createMediaStreamSource):
954 (WebCore::AudioContext::derefFinishedSourceNodes):
955 (WebCore::AudioContext::derefUnfinishedSourceNodes):
956 (WebCore::AudioContext::handleDeferredFinishDerefs):
957 (WebCore::AudioContext::handleDirtyAudioSummingJunctions):
958 (WebCore::AudioContext::handleDirtyAudioNodeOutputs):
959 (WebCore::AudioContext::updateAutomaticPullNodes):
960 (WebCore::AudioContext::processAutomaticPullNodes):
961 * Modules/webaudio/AudioNode.cpp:
962 (WebCore::AudioNode::updateChannelsForInputs):
963 (WebCore::AudioNode::checkNumberOfChannelsForInput):
964 (WebCore::AudioNode::pullInputs):
965 (WebCore::AudioNode::inputsAreSilent):
966 (WebCore::AudioNode::silenceOutputs):
967 (WebCore::AudioNode::unsilenceOutputs):
968 (WebCore::AudioNode::enableOutputsIfNecessary):
969 (WebCore::AudioNode::disableOutputsIfNecessary):
970 (WebCore::AudioNode::finishDeref):
971 * Modules/webaudio/AudioNodeInput.cpp:
972 (WebCore::AudioNodeInput::numberOfChannels):
973 (WebCore::AudioNodeInput::sumAllConnections):
974 * Modules/webaudio/AudioNodeOutput.cpp:
975 (WebCore::AudioNodeOutput::propagateChannelCount):
976 (WebCore::AudioNodeOutput::disable):
977 (WebCore::AudioNodeOutput::enable):
978 * Modules/webaudio/AudioParam.cpp:
979 (WebCore::AudioParam::calculateFinalValues):
980 * Modules/webaudio/AudioParamTimeline.cpp:
981 (WebCore::AudioParamTimeline::insertEvent):
982 * Modules/webaudio/AudioSummingJunction.cpp:
983 (WebCore::AudioSummingJunction::updateRenderingState):
984 * Modules/webaudio/MediaStreamAudioSource.cpp:
985 (WebCore::MediaStreamAudioSource::setAudioFormat):
986 (WebCore::MediaStreamAudioSource::consumeAudio):
987 * Modules/webaudio/WaveShaperProcessor.cpp:
988 (WebCore::WaveShaperProcessor::setOversample):
989 * Modules/webdatabase/DatabaseThread.cpp:
990 (WebCore::DatabaseThread::handlePausedQueue):
991 (WebCore::DatabaseThread::databaseThread):
992 * Modules/webdatabase/DatabaseTracker.cpp:
993 (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
994 (WebCore::DatabaseTracker::databaseNamesForOrigin):
995 (WebCore::DatabaseTracker::getOpenDatabases):
996 (WebCore::DatabaseTracker::usageForOrigin):
997 (WebCore::DatabaseTracker::deleteAllDatabases):
998 (WebCore::DatabaseTracker::deleteOrigin):
999 (WebCore::DatabaseTracker::deleteDatabaseFile):
1000 (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
1001 (WebCore::DatabaseTracker::setDatabasesPaused):
1002 * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1003 (WebCore::SQLTransactionCoordinator::shutdown):
1004 * Modules/websockets/WebSocket.cpp:
1005 (WebCore::WebSocket::connect):
1006 * Modules/websockets/WebSocketExtensionDispatcher.cpp:
1007 (WebCore::WebSocketExtensionDispatcher::addProcessor):
1008 (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
1009 (WebCore::WebSocketExtensionDispatcher::processHeaderValue):
1010 * Modules/websockets/WebSocketHandshake.cpp:
1011 (WebCore::WebSocketHandshake::clientHandshakeMessage):
1013 2015-06-07 Darin Adler <darin@apple.com>
1015 REGRESSION (r181720): Unnecessary layout triggered any time animated GIF advances to a new frame
1016 https://bugs.webkit.org/show_bug.cgi?id=145733
1018 Reviewed by Andreas Kling.
1020 Test: fast/images/animated-gif-no-layout.html
1022 * rendering/RenderImage.cpp:
1023 (WebCore::RenderImage::styleDidChange): Correctly pass ImageSizeChangeNone in cases
1024 where we don't need to report a change in intrinsic size that happened outside the
1025 repaintOrMarkForLayout function.
1026 (WebCore::RenderImage::repaintOrMarkForLayout): Move work that should only be done
1027 when size changed inside the if statement.
1029 * testing/Internals.cpp:
1030 (WebCore::Internals::layoutCount): Added.
1031 * testing/Internals.h: Added layoutCount.
1032 * testing/Internals.idl: Ditto.
1034 2015-06-07 Michael Catanzaro <mcatanzaro@igalia.com>
1036 Fix strncpy use in WebCore::Text::formatForDebugger
1037 https://bugs.webkit.org/show_bug.cgi?id=145608
1039 Reviewed by Darin Adler.
1041 r185137 replaced a call to strncpy with a call to strlcpy, which broke the build on Linux
1042 since strlcpy does not exist there. r185148 reverted this to use strncpy again, but got the
1043 size argument off by one, "introducing" a buffer overrun. But this code has always been
1044 wrong, since it used strncpy without ensuring that the buffer is null-terminated after the
1045 call to strncpy. Fix this as well.
1048 (WebCore::Text::formatForDebugger):
1050 2015-06-07 Antti Koivisto <antti@apple.com>
1052 CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::subresourceCachePolicy const + 11
1053 https://bugs.webkit.org/show_bug.cgi?id=145736
1054 rdar://problem/21246971
1056 Reviewed by David Kilzer.
1060 * html/HTMLLinkElement.cpp:
1061 (WebCore::HTMLLinkElement::setCSSStyleSheet):
1063 Null check frame. It may be null during frame teardown.
1065 2015-06-06 Anders Carlsson <andersca@apple.com>
1067 Remove support from getting plug-in information from Carbon resources
1068 https://bugs.webkit.org/show_bug.cgi?id=145730
1070 Reviewed by Dan Bernstein.
1072 Remove a now unused function.
1074 * platform/mac/WebCoreNSStringExtras.h:
1075 * platform/mac/WebCoreNSStringExtras.mm:
1076 (stringEncodingForResource): Deleted.
1078 2015-06-06 Commit Queue <commit-queue@webkit.org>
1080 Unreviewed, rolling out r185284.
1081 https://bugs.webkit.org/show_bug.cgi?id=145723
1083 it needs some discussion before landing (Requested by dino on
1088 "[iOS] Don't force compositing layers for no-op 3D transforms
1089 on low-memory devices."
1090 https://bugs.webkit.org/show_bug.cgi?id=145719
1091 http://trac.webkit.org/changeset/185284
1093 2015-06-06 Ryosuke Niwa <rniwa@webkit.org>
1095 Typing is slow in Gmail on iPads
1096 https://bugs.webkit.org/show_bug.cgi?id=145686
1098 Reviewed by Enrica Casucci.
1100 The bug was caused by nextCandidate and nextVisuallyDistinctCandidate traversing through each character
1101 in a text node without a renderer. Skip any node that doesn't have a renderer in both of those functions
1102 and corresponding previous* functions.
1104 It's fine to skip unrendered nodes in PositionIterator because only other clients of PositionIterator
1105 are Position::upstream and Position::downstream and they don't care about un-rendered nodes either.
1107 * dom/PositionIterator.cpp:
1108 (WebCore::PositionIterator::increment):
1109 (WebCore::PositionIterator::decrement):
1110 * editing/htmlediting.cpp:
1111 (WebCore::nextVisuallyDistinctCandidate):
1112 (WebCore::previousVisuallyDistinctCandidate):
1114 2015-06-06 Mark Lam <mark.lam@apple.com>
1116 Returned Exception* values need to be initialized to nullptr when no exceptions are thrown.
1117 https://bugs.webkit.org/show_bug.cgi?id=145720
1119 Reviewed by Dan Bernstein.
1121 No new tests because this issue is already covered by the existing inspector-protocol tests.
1123 * bindings/js/WorkerScriptController.cpp:
1124 (WebCore::WorkerScriptController::evaluate):
1126 2015-06-05 Andreas Kling <akling@apple.com>
1128 [iOS] Don't force compositing layers for no-op 3D transforms on low-memory devices.
1129 <https://webkit.org/b/145719>
1130 <rdar://problem/19973042>
1132 Reviewed by Geoffrey Garen.
1134 We put elements with 3D identity transforms onto compositing layers because
1135 we anticipate that they will somehow animate in the future.
1137 This can get extremely expensive, especially on low-memory devices.
1138 This patch makes WebKit stop handing out compositing layers for this kinda thing:
1140 -webkit-transform: translate3d(0,0,0)
1142 ..on devices with 512MB or less. This dramatically improves stability on some
1145 * rendering/RenderLayerCompositor.cpp:
1146 (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
1148 2015-06-05 Matt Baker <mattbaker@apple.com>
1150 Web Inspector: "Other" time in the framerate table is often negative
1151 https://bugs.webkit.org/show_bug.cgi?id=145712
1153 Reviewed by Timothy Hatcher.
1155 The Inspector frontend flattens the timeline event tree it receives from the backend, which can contain nested
1156 paint records. The nested records represent a single paint event, but were being interpreted as two separate
1157 events for purposes of calculating total layout time. This caused the calculated "other" time to be less than
1158 it should be (and in some cases negative).
1160 * inspector/InspectorTimelineAgent.cpp:
1161 (WebCore::InspectorTimelineAgent::addRecordToTimeline):
1162 Paint records are no longer nested, we simply drop the child paint event.
1164 2015-06-05 Chris Dumez <cdumez@apple.com>
1166 Unreviewed, speculative Windows build fix after r185273.
1168 * platform/VNodeTracker.h:
1170 2015-06-05 Chris Dumez <cdumez@apple.com>
1172 [WK2][iOS] Limit the number of vnodes used by the WebContent processes
1173 https://bugs.webkit.org/show_bug.cgi?id=145672
1174 <rdar://problem/21126637>
1176 Reviewed by Antti Koivisto.
1178 Limit the number of vnodes used by the WebContent processes to reduce
1179 the chance of getting killed due to the system running out of vnodes.
1180 We sometimes see the WebContent process use up to 50% of the system's
1181 vnode limit on some tests on iOS, which seems excessive. Most vnodes
1182 are due to CachedResources which are mmap'd from the WebKit disk cache
1183 and kept alive due to caches such as the Memory Cache / PageCache.
1185 This patch adds tracking for the number of SharedBuffer objects that are
1186 backed by a CFDataRef as this should track most of the vnodes used by
1187 the process. The WebContent process registers a vnode pressure handler
1188 upon initialization (likely it already does for memory pressure
1189 handling). This handler gets called when the process uses over 15% of
1190 of system's vnode limit and the "critical" flag is set if it uses over
1191 20% of the system limit. The vnode pressure handler currently calls the
1192 memory pressure handler as freeing our caches (especially PageCache,
1193 MemoryCache) and doing a JS GC frees up vnodes.
1195 On iPhone 6 Plus, the system limit is at 3000, which would lead to the
1196 following limits being used:
1197 soft: 450 / hard: 600
1199 However, on older hardware, the system limit can be as low as 2000,
1200 which would lead to the following limits being used:
1201 soft: 300 / hard: 400
1203 vnode tracking is currently only enabled on iOS because system vnode
1204 limits are usually much higher on Mac (e.g. 473695 on Mac Pro, 9984
1205 on a 2011 MacBook Air) and we normally don't get killed.
1207 * WebCore.xcodeproj/project.pbxproj:
1209 Add new files to the XCode project.
1211 * platform/SharedBuffer.h:
1213 Add a VNodeTracker::Token member next to the CFDataRef member that we
1214 initialize if the SharedBuffer is constructed from a CFDataRef.
1216 * platform/VNodeTracker.cpp: Added.
1217 (WebCore::VNodeTracker::singleton):
1218 (WebCore::VNodeTracker::VNodeTracker):
1219 (WebCore::VNodeTracker::checkPressureState):
1220 (WebCore::VNodeTracker::pressureWarningTimerFired):
1221 (WebCore::VNodeTracker::nextPressureWarningInterval):
1222 (WebCore::VNodeTracker::platformInitialize):
1223 * platform/VNodeTracker.h: Added.
1224 (WebCore::VNodeTracker::setPressureHandler):
1226 Add a new VNodeTracker singleton to keep track the number of vnodes
1227 used by the process since the system does not issue warnings before
1228 reaching its vnode limit. Call sites should request Tokens for
1229 every vnode they use for tracking purposes. Each process can then
1230 set a vnode pressure handler function that will be called when the
1231 process is over the designated limits.
1233 * platform/cf/SharedBufferCF.cpp:
1234 (WebCore::SharedBuffer::SharedBuffer):
1236 Take a VNodeToken from the VNodeTracker when constructing the
1237 SharedBuffer from a CFDataRef as these usually use mmap.
1239 * platform/cocoa/VNodeTrackerCocoa.cpp: Added.
1240 (WebCore::VNodeTracker::platformInitialize):
1242 Get the system's vnode limit and uses 15% of that value as soft
1243 limit for the process and 20% of that value as hard limit.
1245 2015-06-05 Dean Jackson <dino@apple.com>
1247 Lingering checkbox animations when rapidly switching between views on WK1
1248 https://bugs.webkit.org/show_bug.cgi?id=145715
1249 <rdar://problem/17381121>
1251 Reviewed by Simon Fraser.
1253 On WK1, the NSView we use for NSButtonCells is parented in the ScrollView.
1254 Our checkbox and radiobutton animations cause AppKit to create a CALayer which
1255 is parented into that view. As we render the animations, we see the CALayer getting
1258 The fix was to use an unparented layer on WK1 when drawing these controls, the same
1259 way WK2 does. This technique may apply to all controls, but restricting it
1260 to just the buttons at the moment is less risky.
1262 This only happens during the swap between a checked and non-checked state,
1263 and we have no way to test it :(
1265 * platform/mac/ThemeMac.h: New optional parameter to ensuredView.
1266 * platform/mac/ThemeMac.mm:
1267 (WebCore::paintToggleButton): If we're on Yosemite or highter, use an unparented view.
1268 (WebCore::ThemeMac::ensuredView): Return either a parented or unparented view.
1270 2015-06-05 Matt Rajca <mrajca@apple.com>
1272 MediaSessions should keep track of their participating media elements.
1273 https://bugs.webkit.org/show_bug.cgi?id=145703
1275 Reviewed by Eric Carlson.
1277 * Modules/mediasession/MediaSession.cpp:
1278 (WebCore::MediaSession::addMediaElement): Add the given media element to the media session.
1279 (WebCore::MediaSession::removeMediaElement): Remove the given media element from the media session.
1280 (WebCore::MediaSession::activeParticipatingElements): Dynamically build a vector of actively-playing media
1282 * Modules/mediasession/MediaSession.h:
1283 * html/HTMLMediaElement.cpp:
1284 (WebCore::HTMLMediaElement::~HTMLMediaElement): Ensure the element is removed from its media session.
1285 (WebCore::HTMLMediaElement::setSession): Update sessions' references to their media elements.
1287 2015-06-05 Chris Dumez <cdumez@apple.com>
1289 Regression(r176212): Broke app switching on iCloud.com
1290 https://bugs.webkit.org/show_bug.cgi?id=145708
1291 <rdar://problem/21235277>
1293 Reviewed by Simon Fraser.
1295 Roll out r176212 and follow-up fixes for now, to fix iCloud.com.
1296 We can reconsider later how to do this in a safer way.
1298 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1299 (WebCore::JSCSSStyleDeclaration::putDelegate): Deleted.
1300 (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Deleted.
1303 * dom/ElementRareData.cpp:
1304 * dom/ElementRareData.h:
1305 (WebCore::ElementRareData::ElementRareData):
1306 (WebCore::ElementRareData::~ElementRareData): Deleted.
1308 (WebCore::Node::materializeRareData):
1309 * html/HTMLCanvasElement.cpp:
1310 (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged): Deleted.
1311 * page/DOMTimer.cpp:
1312 (WebCore::DOMTimerFireState::scriptMadeNonUserObservableChanges): Deleted.
1313 (WebCore::DOMTimerFireState::scriptMadeUserObservableChanges): Deleted.
1314 (WebCore::NestedTimersMap::instanceForContext): Deleted.
1315 (WebCore::DOMTimer::install): Deleted.
1316 (WebCore::DOMTimer::fired): Deleted.
1317 (WebCore::DOMTimer::alignedFireTime): Deleted.
1318 (WebCore::DOMTimer::activeDOMObjectName): Deleted.
1320 * page/FrameView.cpp:
1321 (WebCore::FrameView::reset): Deleted.
1322 (WebCore::FrameView::viewportContentsChanged): Deleted.
1323 (WebCore::FrameView::autoSizeIfEnabled): Deleted.
1326 2015-06-05 Myles C. Maxfield <mmaxfield@apple.com>
1328 [iOS] Emoji overlap preceeding lines
1329 https://bugs.webkit.org/show_bug.cgi?id=145678
1330 <rdar://problem/10684914>
1332 Reviewed by Enrica Casucci.
1334 In WebKit, we first lay out lines, and then we lay out text inside those lines. Text is vertically centered in
1335 its containing line. If the author has not specified a particular line-height, the height of a line comes from
1336 the font metrics for the primary font of the line.
1338 In iOS, we were specifically hardcoding the line height metric of Apple Color Emoji to be 0. This means that,
1339 if Apple Color Emoji is the primary font for a line, and an explicit line-height was not specified, the lines
1340 are laid out with 0 height. Then, when we vertically center the text inside the line, the top half of the text
1341 overlaps the preceeding line.
1343 I'm not sure exactly why were were hardcoding this value to 0, as it is surely wrong. I'm going to ask Enrica
1344 to review this patch; hopefully she knows the answer.
1346 Test: fast/text/emoji.html
1348 * platform/graphics/cocoa/FontCocoa.mm:
1349 (WebCore::Font::platformInit):
1351 2015-06-05 Alex Christensen <achristensen@webkit.org>
1353 [Web Timing] Use new SPI to enable data collection.
1354 https://bugs.webkit.org/show_bug.cgi?id=145650
1355 rdar://problem/21203358
1357 Reviewed by Chris Dumez.
1359 * platform/network/cf/ResourceHandleCFNet.cpp:
1360 (WebCore::ResourceHandle::createCFURLConnection):
1361 Gather web timing data on iOS.
1362 * platform/network/mac/ResourceHandleMac.mm:
1363 (WebCore::ResourceHandle::createNSURLConnection):
1364 (WebCore::ResourceHandle::setCollectsTimingData):
1365 Gather web timing data on Mac.
1367 2015-06-05 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1369 [Streams API] ReadableStream should store callbacks as a Deque
1370 https://bugs.webkit.org/show_bug.cgi?id=145641
1372 Reviewed by Darin Adler.
1374 Covered by existing tests.
1376 * Modules/streams/ReadableStream.cpp:
1377 (WebCore::ReadableStream::resolveReadCallback): Use of Deque.takeFirst
1378 * Modules/streams/ReadableStream.h: Using Deque in lieu of Vector for storing callbacks.
1380 2015-06-05 Mark Lam <mark.lam@apple.com>
1382 finally blocks should not set the exception stack trace when re-throwing the exception.
1383 https://bugs.webkit.org/show_bug.cgi?id=145525
1385 Reviewed by Geoffrey Garen.
1387 Update to use the new JSC::Exception object.
1389 Test: inspector/debugger/break-on-exceptions.html
1391 * ForwardingHeaders/runtime/Exception.h: Added.
1392 * bindings/js/JSCallbackData.cpp:
1393 (WebCore::JSCallbackData::invokeCallback):
1394 * bindings/js/JSCustomXPathNSResolver.cpp:
1395 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1396 * bindings/js/JSDOMBinding.cpp:
1398 (WebCore::reportException):
1399 (WebCore::reportCurrentException):
1400 * bindings/js/JSDOMBinding.h:
1401 * bindings/js/JSErrorHandler.cpp:
1402 (WebCore::JSErrorHandler::handleEvent):
1403 * bindings/js/JSEventListener.cpp:
1404 (WebCore::JSEventListener::handleEvent):
1405 * bindings/js/JSMainThreadExecState.cpp:
1406 (WebCore::JSMainThreadExecState::didLeaveScriptContext):
1407 (WebCore::functionCallHandlerFromAnyThread):
1408 (WebCore::evaluateHandlerFromAnyThread):
1409 * bindings/js/JSMainThreadExecState.h:
1410 (WebCore::JSMainThreadExecState::currentState):
1411 (WebCore::JSMainThreadExecState::call):
1412 (WebCore::JSMainThreadExecState::evaluate):
1413 (WebCore::JSMainThreadExecState::runTask):
1415 * bindings/js/JSMediaDevicesCustom.cpp:
1416 (WebCore::JSMediaDevices::getUserMedia):
1417 - Fixed a bug where the exception was not cleared before entering the VM to
1420 * bindings/js/JSMutationCallback.cpp:
1421 (WebCore::JSMutationCallback::call):
1422 * bindings/js/ReadableJSStream.cpp:
1423 (WebCore::getPropertyFromObject):
1424 (WebCore::callFunction):
1425 (WebCore::ReadableJSStream::Source::start):
1426 * bindings/js/ScheduledAction.cpp:
1427 (WebCore::ScheduledAction::executeFunctionInContext):
1428 * bindings/js/ScriptController.cpp:
1429 (WebCore::ScriptController::evaluateInWorld):
1430 * bindings/js/SerializedScriptValue.cpp:
1431 (WebCore::SerializedScriptValue::create):
1432 (WebCore::SerializedScriptValue::deserialize):
1433 * bindings/js/WorkerScriptController.cpp:
1434 (WebCore::WorkerScriptController::evaluate):
1435 (WebCore::WorkerScriptController::setException):
1436 (WebCore::WorkerScriptController::scheduleExecutionTermination):
1437 * bindings/js/WorkerScriptController.h:
1438 (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
1439 * bindings/js/WorkerScriptDebugServer.cpp:
1440 (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
1441 (WebCore::WorkerScriptDebugServer::reportException):
1442 * bindings/js/WorkerScriptDebugServer.h:
1443 * bindings/objc/WebScriptObject.mm:
1444 (WebCore::createJSWrapper):
1445 (WebCore::addExceptionToConsole):
1446 (-[WebScriptObject callWebScriptMethod:withArguments:]):
1447 (-[WebScriptObject evaluateWebScript:]):
1448 - Changed to call a version of JSMainThreadExecState::evaluate() that provides
1449 a stub returnedException because evaluateWebScript: doesn't need the exception.
1451 * inspector/PageScriptDebugServer.cpp:
1452 (WebCore::PageScriptDebugServer::isContentScript):
1453 (WebCore::PageScriptDebugServer::reportException):
1454 * inspector/PageScriptDebugServer.h:
1455 * workers/WorkerGlobalScope.cpp:
1456 (WebCore::WorkerGlobalScope::importScripts):
1458 2015-06-05 Eric Carlson <eric.carlson@apple.com>
1460 Layout tests fullscreen/video-controls-drag.html and media/video-fullscreeen-only-controls.html
1462 https://bugs.webkit.org/show_bug.cgi?id=145675
1464 Reviewed by Dean Jackson.
1466 No new tests, changes covered by existing tests.
1468 * Modules/mediacontrols/mediaControlsApple.js:
1469 (Controller.prototype.updateControls): Use shouldHaveControls() to test if controls should
1471 (Controller.prototype.handleWrapperMouseMove): Don't return early when in fullscreen.
1472 (Controller.prototype.updateFullscreenButtons): Drive-by fix: always show the (exit) fullscreen
1473 button when in fullscreen.
1476 2015-06-04 David Hyatt <hyatt@apple.com>
1478 Underlines too close in vertical Chinese text.
1479 https://bugs.webkit.org/show_bug.cgi?id=145651
1480 <rdar://problem/11105920>
1482 Reviewed by Simon Fraser.
1484 Added fast/text/decorations-vertical-underline.html
1486 * style/InlineTextBoxStyle.cpp:
1487 (WebCore::computeUnderlineOffset):
1488 Make sure the to map text-underline-position: auto to under when a line has an ideographic baseline.
1490 2015-06-05 Carlos Alberto Lopez Perez <clopez@igalia.com>
1492 [GTK] [Wayland] The MiniBrowser crashes inside Weston.
1493 https://bugs.webkit.org/show_bug.cgi?id=145645
1495 Reviewed by Žan Doberšek.
1497 No new tests, no behavior changes.
1499 The issue was caused because we were not properly initializing the
1500 Wayland display, and we were returning a nullptr in PlatformDisplayWayland::create(),
1501 therefore a crash was happening on WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1136
1502 <http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp?rev=185245#L1136>
1504 * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1505 (WebCore::PlatformDisplayWayland::create): When connecting to the Wayland
1506 server socket we should use the default value (NULL). This allows the value
1507 to be overwritten at run-time by the environment variables WAYLAND_DISPLAY or
1508 WAYLAND_SOCKET that the Wayland compositor should define. Also add a couple
1509 of warnings to get information about what is going wrong when we fail to
1510 initialize the display instead of just crashing without giving more information.
1511 * platform/graphics/wayland/PlatformDisplayWayland.h:
1512 (WebCore::PlatformDisplayWayland::isInitialized): Not longer check for m_webkitgtk
1513 to signal that the display is ready because the UIProcess embedded Wayland
1514 subcompositer is still not implemented. Added a FIXME note about it.
1516 2015-06-05 Dean Jackson <dino@apple.com>
1518 [Mac] Popup focus is cut off
1519 https://bugs.webkit.org/show_bug.cgi?id=145688
1520 <rdar://problem/18313375>
1522 Reviewed by Brent Fulgham.
1524 Yosemite increased the width of focus rings, causing
1525 some ugly clipping on Yosemite. The solution was to
1526 not set a clip (which was code introduced for Leopard).
1528 Test: fast/forms/select-element-focus-ring.html
1530 * rendering/RenderThemeMac.mm:
1531 (WebCore::RenderThemeMac::paintMenuList): Don't clip on Yosemite.
1533 2015-06-05 Manuel Rego Casasnovas <rego@igalia.com>
1535 [CSS Grid Layout] Support dots sequences in grid-template-areas
1536 https://bugs.webkit.org/show_bug.cgi?id=145693
1538 Reviewed by Sergio Villar Senin.
1540 The CSS WG agreed to consider a sequence of "." characters a single null
1541 cell token for grid-template-areas. That way authors can match the
1542 number of dots to the width of the column.
1544 For more information see:
1545 https://lists.w3.org/Archives/Public/www-style/2015May/0175.html
1547 Added new test cases to check the new behavior.
1549 * css/CSSParser.cpp:
1550 (WebCore::containsOnlyDots): New helper function to check that the grid
1551 area name is composed by only dots.
1552 (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
1553 function to look for unnamed areas.
1555 2015-06-04 Joonghun Park <jh718.park@samsung.com>
1557 Purge PassRefPtr create() factory functions in WebCore/css
1558 https://bugs.webkit.org/show_bug.cgi?id=144905
1560 Reviewed by Darin Adler.
1562 Return Ref instead of PassRefPtr in create() factory functions in css,
1563 because the factory can't return null.
1565 No new tests, no new behaviours.
1567 * css/BasicShapeFunctions.cpp:
1568 (WebCore::valueForCenterCoordinate):
1569 (WebCore::basicShapeRadiusToCSSValue):
1570 (WebCore::valueForBasicShape):
1571 * css/BasicShapeFunctions.h:
1572 * css/CSSBasicShapes.h:
1573 * css/CSSCalculationValue.cpp:
1574 (WebCore::createCSS):
1575 (WebCore::CSSCalcValue::create):
1576 * css/CSSCalculationValue.h:
1577 * css/CSSCharsetRule.h:
1578 * css/CSSComputedStyleDeclaration.cpp:
1579 (WebCore::valueForNinePieceImageSlice):
1580 (WebCore::valueForNinePieceImageQuad):
1581 (WebCore::zoomAdjustedPixelValue):
1582 (WebCore::zoomAdjustedNumberValue):
1583 (WebCore::zoomAdjustedPixelValueForLength):
1584 (WebCore::valueForReflection):
1585 (WebCore::createPositionListForLayer):
1586 (WebCore::positionOffsetValue):
1587 (WebCore::percentageOrZoomAdjustedValue):
1588 (WebCore::autoOrZoomAdjustedValue):
1589 (WebCore::getBorderRadiusCornerValues):
1590 (WebCore::getBorderRadiusCornerValue):
1591 (WebCore::getBorderRadiusShorthandValue):
1592 (WebCore::matrixTransformValue):
1593 (WebCore::computedTransform):
1594 (WebCore::adjustLengthForZoom):
1595 (WebCore::ComputedStyleExtractor::valueForShadow):
1596 (WebCore::ComputedStyleExtractor::valueForFilter):
1597 (WebCore::specifiedValueForGridTrackBreadth):
1598 (WebCore::specifiedValueForGridTrackSize):
1599 (WebCore::valueForGridTrackList):
1600 (WebCore::scrollSnapDestination):
1601 (WebCore::scrollSnapPoints):
1602 (WebCore::scrollSnapCoordinates):
1603 (WebCore::createAnimationTriggerValue):
1604 (WebCore::getAnimationTriggerValue):
1605 (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
1606 (WebCore::fillSizeToCSSValue):
1607 (WebCore::lineHeightFromStyle):
1608 (WebCore::fontSizeFromStyle):
1609 (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
1610 (WebCore::shapePropertyValue):
1611 (WebCore::ComputedStyleExtractor::propertyValue):
1612 * css/CSSComputedStyleDeclaration.h:
1613 * css/CSSFontFace.h:
1614 (WebCore::CSSFontFace::create):
1615 * css/CSSFontFaceLoadEvent.h:
1616 * css/CSSFontFaceRule.h:
1617 * css/CSSGrammar.y.in:
1618 * css/CSSGridLineNamesValue.cpp:
1619 (WebCore::CSSGridLineNamesValue::cloneForCSSOM):
1620 * css/CSSGridLineNamesValue.h:
1621 (WebCore::CSSGridLineNamesValue::create):
1622 * css/CSSImportRule.h:
1623 * css/CSSKeyframeRule.h:
1624 (WebCore::StyleKeyframe::create):
1625 * css/CSSKeyframesRule.h:
1626 * css/CSSMediaRule.h:
1627 * css/CSSPageRule.h:
1628 * css/CSSParser.cpp:
1629 (WebCore::CSSParser::parseGridLineNames):
1630 (WebCore::CSSParser::parseDashboardRegions):
1631 (WebCore::CSSParser::parseClipShape):
1632 (WebCore::CSSParser::parseBasicShape):
1633 (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
1634 (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
1636 (WebCore::CSSParser::ValueWithCalculation::calculation):
1637 * css/CSSPrimitiveValue.cpp:
1638 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1639 (WebCore::CSSPrimitiveValue::init):
1640 (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1641 * css/CSSPrimitiveValue.h:
1642 (WebCore::CSSPrimitiveValue::create):
1643 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1644 * css/CSSPropertySourceData.h:
1645 (WebCore::CSSStyleSourceData::create):
1646 (WebCore::CSSRuleSourceData::create):
1647 (WebCore::CSSRuleSourceData::createUnknown):
1648 * css/CSSRuleList.h:
1649 * css/CSSSegmentedFontFace.h:
1650 (WebCore::CSSSegmentedFontFace::create):
1651 * css/CSSSelector.cpp:
1652 (WebCore::CSSSelector::createRareData):
1653 * css/CSSSelector.h:
1654 (WebCore::CSSSelector::RareData::create):
1655 * css/CSSStyleRule.h:
1656 * css/CSSSupportsRule.h:
1657 * css/CSSValuePool.h:
1658 (WebCore::CSSValuePool::createValue):
1659 * css/FontLoader.cpp:
1660 (WebCore::LoadFontCallback::create):
1661 * css/LengthRepeat.h:
1662 (WebCore::LengthRepeat::create):
1663 (WebCore::LengthRepeat::cloneForCSSOM):
1665 (WebCore::MediaQuerySet::create):
1666 (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
1667 (WebCore::MediaList::create):
1668 * css/MediaQueryList.cpp:
1669 (WebCore::MediaQueryList::create):
1670 * css/MediaQueryList.h:
1671 * css/MediaQueryMatcher.h:
1672 (WebCore::MediaQueryMatcher::create):
1674 (WebCore::Pair::create):
1676 (WebCore::Rect::create):
1677 (WebCore::Rect::cloneForCSSOM):
1678 (WebCore::Quad::create):
1679 (WebCore::Quad::cloneForCSSOM):
1680 * css/SVGCSSComputedStyleDeclaration.cpp:
1681 (WebCore::paintOrder):
1682 (WebCore::ComputedStyleExtractor::svgPropertyValue):
1684 (WebCore::StyleMedia::create):
1685 * css/StyleResolver.cpp:
1686 (WebCore::StyleResolver::keyframeStylesForAnimation):
1687 * css/StyleSheetList.h:
1688 (WebCore::StyleSheetList::create):
1689 * css/ViewportStyleResolver.h:
1690 (WebCore::ViewportStyleResolver::create):
1691 * css/WebKitCSSMatrix.h:
1692 * css/WebKitCSSRegionRule.h:
1693 * css/WebKitCSSViewportRule.h:
1694 * page/animation/CSSPropertyAnimation.cpp:
1695 (WebCore::blendFilter):
1696 * rendering/style/RenderStyle.h:
1697 (WebCore::adjustFloatForAbsoluteZoom):
1698 * rendering/style/StyleInheritedData.h:
1700 2015-06-04 Benjamin Poulain <bpoulain@apple.com>
1702 The last 2 merged DFAs are not minimized by DFACombiner
1704 * contentextensions/DFACombiner.cpp:
1705 (WebCore::ContentExtensions::DFACombiner::combineDFAs):
1706 I introduced a bug when I made minimization conditional: the last merge
1707 does not minimize if we do not reach the minimum size.
1709 2015-06-04 Brent Fulgham <bfulgham@apple.com>
1711 Latching algorithm in findEnclosingOverflowScroll is broken
1712 https://bugs.webkit.org/show_bug.cgi?id=145642
1713 <rdar://problem/21242308>
1715 Reviewed by Simon Fraser.
1717 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
1719 * page/mac/EventHandlerMac.mm:
1720 (WebCore::scrollableAreaForBox): Added helper function.
1721 (WebCore::findEnclosingScrollableContainer): Renamed from findEnclosingOverflowScroll.
1722 Only identify something as our scroll element if it can be scrolled in either
1723 axis of the gesture's motion.
1724 (WebCore::scrollableAreaForContainerNode): Use new helper function.
1725 (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
1726 name, and pass horizontal and vertical deltas.
1727 (WebCore::findEnclosingOverflowScroll): Deleted.
1729 2015-06-04 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1731 REGRESSION(r185091): Crash happens on indexdb tests
1732 https://bugs.webkit.org/show_bug.cgi?id=145549
1734 Reviewed by Darin Adler.
1736 * Modules/indexeddb/IDBDatabaseError.h:
1737 (WebCore::IDBDatabaseError::create): Revert Ref usage of IDBDatabaseError::create().
1739 2015-06-04 Simon Fraser <simon.fraser@apple.com>
1741 Crash in EventDispatcher::dispatchEvent entering a location on Google Maps
1742 https://bugs.webkit.org/show_bug.cgi?id=145677
1743 rdar://problem/20698280
1745 Reviewed by Dean Jackson.
1747 If a transition is running on a pseudo-element, and the host element is removed
1748 from the DOM just as the transition ends, and there is a transition event listener,
1749 then we'd crash with a null dereference in event dispatch code.
1751 AnimationController tries to clean up running animations when renderers are destroyed,
1752 but omitted to remove the element from two vectors that store element references.
1753 Elements are only added to these vectors briefly on animation end, before firing
1754 events, but failure to remove the vector entries could result in attempting
1755 to fire an event on a pseudo-element with no host element.
1757 Also convert EventDispatcher code to be more robust to potentially null event
1758 targets, since it's not clear that eventTargetRespectingTargetRules() can always
1759 manage to return a non-null node.
1761 Hard to make a test because this is timing sensitive.
1763 * dom/EventDispatcher.cpp:
1764 (WebCore::eventTargetRespectingTargetRules):
1765 (WebCore::EventDispatcher::dispatchScopedEvent):
1766 (WebCore::EventDispatcher::dispatchEvent):
1767 (WebCore::EventPath::EventPath):
1768 * page/animation/AnimationController.cpp:
1769 (WebCore::AnimationControllerPrivate::clear):
1771 2015-06-04 Hunseop Jeong <hs85.jeong@samsung.com>
1773 Replace 0 with nullptr in WebCore/Page.
1774 https://bugs.webkit.org/show_bug.cgi?id=145631
1776 Reviewed by Darin Adler.
1778 No new tests, no behavior changes.
1780 * page/AutoscrollController.cpp:
1781 (WebCore::AutoscrollController::AutoscrollController):
1782 (WebCore::AutoscrollController::stopAutoscrollTimer):
1783 * page/ContentSecurityPolicy.cpp:
1784 (WebCore::CSPSourceList::parseSource):
1785 * page/ContentSecurityPolicy.h:
1786 * page/ContextMenuController.cpp:
1787 (WebCore::ContextMenuController::clearContextMenu):
1788 * page/DOMSelection.cpp:
1789 (WebCore::DOMSelection::clearTreeScope):
1790 * page/DOMWindow.cpp:
1791 (WebCore::DOMWindow::resetDOMWindowProperties):
1792 (WebCore::DOMWindow::localStorage):
1793 (WebCore::DOMWindow::focus):
1795 * page/DOMWindowExtension.cpp:
1796 (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
1797 (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
1798 * page/DOMWindowProperty.cpp:
1799 (WebCore::DOMWindowProperty::DOMWindowProperty):
1800 (WebCore::DOMWindowProperty::~DOMWindowProperty):
1801 (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
1802 (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
1803 (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
1804 * page/DragController.cpp:
1805 (WebCore::DragController::dragEnded):
1806 (WebCore::DragController::performDragOperation):
1807 (WebCore::DragController::tryDocumentDrag):
1808 (WebCore::DragController::concludeEditDrag):
1809 (WebCore::DragController::startDrag):
1810 * page/EventHandler.cpp:
1811 (WebCore::EventHandler::EventHandler):
1812 (WebCore::EventHandler::resizeLayerDestroyed):
1813 (WebCore::EventHandler::freeDataTransfer):
1814 (WebCore::EventHandler::dragSourceEndedAt):
1815 (WebCore::EventHandler::handleDrag):
1816 * page/EventHandler.h:
1817 * page/FocusController.cpp:
1818 (WebCore::FocusController::advanceFocusInDocumentOrder):
1820 (WebCore::Frame::~Frame):
1821 (WebCore::Frame::searchForLabelsBeforeElement):
1822 (WebCore::Frame::willDetachPage):
1823 (WebCore::Frame::createView):
1825 (WebCore::Frame::detachFromPage):
1826 * page/FrameDestructionObserver.cpp:
1827 (WebCore::FrameDestructionObserver::FrameDestructionObserver):
1828 (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
1829 (WebCore::FrameDestructionObserver::frameDestroyed):
1830 * page/FrameTree.cpp:
1831 (WebCore::FrameTree::~FrameTree):
1832 (WebCore::FrameTree::removeChild):
1834 (WebCore::FrameTree::FrameTree):
1835 (WebCore::FrameTree::detachFromParent):
1837 (WebCore::History::History):
1839 (WebCore::Page::Page):
1840 (WebCore::Page::~Page):
1841 (WebCore::Page::findStringMatchingRanges):
1842 * page/PageGroup.cpp:
1843 * page/Performance.cpp:
1844 (WebCore::Performance::Performance):
1845 * page/PointerLockController.cpp:
1846 (WebCore::PointerLockController::didLosePointerLock):
1847 (WebCore::PointerLockController::clearElement):
1848 * page/SecurityOrigin.h:
1849 (WebCore::SecurityOrigin::canAccessDatabase):
1850 * page/Settings.cpp:
1851 (WebCore::Settings::Settings):
1852 * page/SpatialNavigation.cpp:
1853 (WebCore::FocusCandidate::FocusCandidate):
1854 * page/SpatialNavigation.h:
1855 (WebCore::FocusCandidate::FocusCandidate):
1856 * page/scrolling/ScrollingTreeNode.cpp:
1857 (WebCore::ScrollingTreeNode::ScrollingTreeNode):
1858 * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
1859 (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
1861 2015-06-04 Benjamin Poulain <bpoulain@apple.com>
1863 Combine tiny DFAs into slightly larger ones
1864 https://bugs.webkit.org/show_bug.cgi?id=145572
1866 Reviewed by Alex Christensen.
1868 This patch changes the ContentExtensions compiler to combine tiny DFA
1869 until they reach a minimum size.
1871 The main tool introduced here is DFAMerger. It combines 2 DFAs into
1872 a single DFA that represent the union of the two machines.
1873 That is done by a simple subset construction on the "name" of the nodes
1876 Since we only merge 2 machines, and they are both deterministic, we know that
1877 we can only be in one state of each machine, or a state in one machine without
1878 equivalent in the other machine.
1879 We exploit that to identify the mapping between nodes. To identify a node in
1880 the new machine from nodes in the original machines, we just concatenate the node
1881 IDs into a single 64 bits number. If there is no node in one of the machine, we
1884 The current algorithm does not have any subgraph pruning, machines grow very very
1885 quickly. Because of that, we only merge very small DFAs at the moment.
1887 Test: http/tests/contentextensions/filters-with-quantifiers-combined.html
1889 * WebCore.xcodeproj/project.pbxproj:
1890 * contentextensions/ContentExtensionCompiler.cpp:
1891 (WebCore::ContentExtensions::compileRuleList):
1892 * contentextensions/ContentExtensionsDebugging.h:
1893 * contentextensions/DFA.cpp:
1894 (WebCore::ContentExtensions::DFA::graphSize):
1895 (WebCore::ContentExtensions::DFA::debugPrintDot):
1896 * contentextensions/DFA.h:
1897 * contentextensions/DFACombiner.cpp: Added.
1898 (WebCore::ContentExtensions::DFAMerger::DFAMerger):
1899 (WebCore::ContentExtensions::DFAMerger::merge):
1900 (WebCore::ContentExtensions::DFAMerger::signatureForIndices):
1901 (WebCore::ContentExtensions::DFAMerger::extractIndexA):
1902 (WebCore::ContentExtensions::DFAMerger::extractIndexB):
1903 (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
1904 (WebCore::ContentExtensions::DFAMerger::setHalfSignature):
1905 (WebCore::ContentExtensions::DFAMerger::populateTransitions):
1906 (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions):
1907 (WebCore::ContentExtensions::DFAMerger::createTransitions):
1908 (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded):
1909 (WebCore::ContentExtensions::DFACombiner::combineDFAs):
1910 * contentextensions/DFACombiner.h: Copied from Source/WebCore/contentextensions/DFA.h.
1911 (WebCore::ContentExtensions::DFACombiner::addDFA):
1913 2015-06-04 Matt Rajca <mrajca@apple.com>
1915 Rename MediaSessionManager to PlatformMediaSessionManager for consistency with PlatformMediaSession.
1916 https://bugs.webkit.org/show_bug.cgi?id=145648
1918 Reviewed by Eric Carlson.
1920 * WebCore.vcxproj/WebCore.vcxproj:
1921 * WebCore.vcxproj/WebCore.vcxproj.filters:
1922 * WebCore.xcodeproj/project.pbxproj:
1923 * html/HTMLMediaElement.cpp:
1924 * html/MediaElementSession.cpp:
1925 (WebCore::MediaElementSession::effectivePreloadForElement):
1926 (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
1927 * platform/audio/PlatformMediaSession.cpp:
1928 (WebCore::PlatformMediaSession::PlatformMediaSession):
1929 (WebCore::PlatformMediaSession::~PlatformMediaSession):
1930 (WebCore::PlatformMediaSession::clientWillBeginPlayback):
1931 (WebCore::PlatformMediaSession::clientWillPausePlayback):
1932 (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
1933 (WebCore::PlatformMediaSession::updateClientDataBuffering):
1934 * platform/audio/PlatformMediaSessionManager.cpp: Renamed from Source/WebCore/platform/audio/MediaSessionManager.cpp.
1935 (WebCore::PlatformMediaSessionManager::sharedManager):
1936 (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
1937 (WebCore::PlatformMediaSessionManager::resetRestrictions):
1938 (WebCore::PlatformMediaSessionManager::has):
1939 (WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
1940 (WebCore::PlatformMediaSessionManager::count):
1941 (WebCore::PlatformMediaSessionManager::beginInterruption):
1942 (WebCore::PlatformMediaSessionManager::endInterruption):
1943 (WebCore::PlatformMediaSessionManager::addSession):
1944 (WebCore::PlatformMediaSessionManager::removeSession):
1945 (WebCore::PlatformMediaSessionManager::addRestriction):
1946 (WebCore::PlatformMediaSessionManager::removeRestriction):
1947 (WebCore::PlatformMediaSessionManager::restrictions):
1948 (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
1949 (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
1950 (WebCore::PlatformMediaSessionManager::setCurrentSession):
1951 (WebCore::PlatformMediaSessionManager::currentSession):
1952 (WebCore::PlatformMediaSessionManager::sessionRestrictsInlineVideoPlayback):
1953 (WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):
1954 (WebCore::PlatformMediaSessionManager::applicationWillEnterBackground):
1955 (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground):
1956 (WebCore::PlatformMediaSessionManager::updateSessionState):
1957 (WebCore::PlatformMediaSessionManager::didReceiveRemoteControlCommand):
1958 (WebCore::PlatformMediaSessionManager::systemWillSleep):
1959 (WebCore::PlatformMediaSessionManager::systemDidWake):
1960 (WebCore::PlatformMediaSessionManager::audioOutputDeviceChanged):
1961 * platform/audio/PlatformMediaSessionManager.h: Renamed from Source/WebCore/platform/audio/MediaSessionManager.h.
1962 (WebCore::PlatformMediaSessionManager::~PlatformMediaSessionManager):
1963 (WebCore::PlatformMediaSessionManager::configureWireLessTargetMonitoring):
1964 (WebCore::PlatformMediaSessionManager::hasWirelessTargetsAvailable):
1965 (WebCore::PlatformMediaSessionManager::sessions):
1966 * platform/audio/mac/AudioDestinationMac.cpp:
1967 * platform/audio/mac/MediaSessionManagerMac.cpp:
1968 (PlatformMediaSessionManager::updateSessionState):
1969 (MediaSessionManager::updateSessionState): Deleted.
1970 * testing/Internals.cpp:
1972 2015-06-04 Eric Carlson <eric.carlson@apple.com>
1974 [Mac] Don't show default controls after playing to wireless target, again
1975 https://bugs.webkit.org/show_bug.cgi?id=145620
1976 <rdar://problem/21145806>
1978 Reviewed by Dean Jackson.
1980 Follow up to fix two tests broken by r185207.
1982 * Modules/mediacontrols/mediaControlsApple.js:
1983 (Controller.prototype.updateControls): Always show controls when the video element
1984 is the fullscreen element because custom controls aren't possible.
1986 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
1988 [Cocoa] Add ASSERT to FontPlatformData::ctFont()
1989 https://bugs.webkit.org/show_bug.cgi?id=145659
1991 Reviewed by Dean Jackson.
1993 The new ASSERT needs to be guarded with CORETEXT_WEB_FONTS, which is defined in FontCustomPlatformData.h,
1994 and is not accessible to FontPlatformData. Therefore, I've moved the definition into TextFlags.h, which
1997 No new tests because there is no behavior change.
1999 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2000 (WebCore::FontPlatformData::ctFont): Add the ASSERT.
2001 * platform/graphics/mac/FontCustomPlatformData.h: Move the CORETEXT_WEB_FONTS preprocessor
2003 * platform/text/TextFlags.h: ... to here.
2005 2015-06-04 Commit Queue <commit-queue@webkit.org>
2007 Unreviewed, rolling out r185208.
2008 https://bugs.webkit.org/show_bug.cgi?id=145655
2010 platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-
2011 latched-select.html (Requested by shallawa on #webkit).
2015 "Latching algorithm in findEnclosingOverflowScroll is broken"
2016 https://bugs.webkit.org/show_bug.cgi?id=145642
2017 http://trac.webkit.org/changeset/185208
2019 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2021 [Cocoa] Remove unnecessary code from FontPlatformData::ctFont()
2022 https://bugs.webkit.org/show_bug.cgi?id=145652
2024 Hoefler Text Italic no longer has initial and final swashes by default, so there
2025 is no reason to explicitly disable them.
2027 Reviewed by Andreas Kling.
2029 No new tests because there is no behavior change.
2031 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2032 (WebCore::FontPlatformData::ctFont):
2033 (WebCore::createFeatureSettingDictionary): Deleted.
2034 (WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Deleted.
2036 2015-06-04 Brent Fulgham <bfulgham@apple.com>
2038 Latching algorithm in findEnclosingOverflowScroll is broken
2039 https://bugs.webkit.org/show_bug.cgi?id=145642
2040 <rdar://problem/21242308>
2042 Reviewed by Simon Fraser.
2044 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
2046 * page/mac/EventHandlerMac.mm:
2047 (WebCore::findEnclosingOverflowScrollForDominantDirection): Renamed from
2048 'findEnclosingOverflowScroll'. Only identify element as our overflow
2049 scroll element if it can be scrolled in either axis of the gesture's
2051 (WebCore::scrolledToEdgeInDominantDirection): Renamed.
2052 (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
2053 name, and pass horizontal and vertical deltas.
2054 (WebCore::findEnclosingOverflowScroll): Deleted.
2056 2015-06-04 Eric Carlson <eric.carlson@apple.com>
2058 [Mac] Don't show default controls after playing to wireless target, again
2059 https://bugs.webkit.org/show_bug.cgi?id=145620
2060 <rdar://problem/21145806>
2062 Reviewed by Dean Jackson.
2064 * Modules/mediacontrols/mediaControlsApple.js:
2065 (Controller.prototype.updateControls): Show or hide the panel as appropriate.
2066 (Controller.prototype.handleWrapperMouseMove): Early return if !video.controls.
2067 (Controller.prototype.addControls): Call updateControls instead of this.setNeedsTimelineMetricsUpdate
2068 so all needed setup is done.
2069 (Controller.prototype.resetHideControlsTimer): Only start the hide timer if playing.
2071 2015-06-04 Chris Dumez <cdumez@apple.com>
2073 [WK2] Prune more resources from the MemoryCache before process suspension
2074 https://bugs.webkit.org/show_bug.cgi?id=145633
2076 Reviewed by Andreas Kling.
2078 Prune more resources from the MemoryCache before process suspension or
2079 on simulated memory warning by doing a synchronous JS garbage collection
2080 and sweep *before* pruning dead resources from the memory cache.
2081 Previously, we would do the garbage collection after pruning the
2082 MemoryCache which meant that a lot of resources became dead after we
2083 tried to prune them.
2085 At the end a basic browsing on apple.com, we are able to remove ~17%
2086 more resources from the MemoryCache on simulated memory warning with this
2089 Pruning as much as we can from the memory cache on critical memory
2090 pressure or before process suspension is not only useful to free up
2091 memory but also to make room in the vnode table as a lot of
2092 CachedResources are mmmap'd from the network disk cache.
2094 * platform/MemoryPressureHandler.cpp:
2095 (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2096 (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2098 - Pass 'synchronous' argument so that we know if we need to do a
2099 synchronous JS garbage collection.
2100 - Move here code from in the Cocoa handler that is doing a JS garbage
2101 collection as well as a sweep, and make this code cross-platform.
2102 This code used to be iOS specific but I see no reason we shouldn't
2105 (WebCore::MemoryPressureHandler::releaseMemory):
2106 * platform/MemoryPressureHandler.h:
2108 Use enum class arguments for critical / synchronous. The 'synchronous'
2109 argument is new so that the call site can let us know if memory needs
2110 to be freed synchronously (e.g. in case of imminent process suspension).
2112 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2113 (WebCore::MemoryPressureHandler::platformReleaseMemory):
2115 Remove iOS-specific code that was doing a JS garbage collection and
2116 sweep as this code is now in the generic memory pressure handler.
2118 (WebCore::MemoryPressureHandler::install):
2120 On simulated memory pressure, set 'synchronous' argument to Yes so that
2121 a synchronous GC is done by the generic memory pressure handler. This
2122 way, we no longer need to do a sync GC after calling the memory pressure
2123 handler. This avoids code duplication and makes sure the GC is done
2124 before pruning the memory cache.
2127 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2129 [Cocoa] Clean up m_isEmoji in FontPlatformData
2130 https://bugs.webkit.org/show_bug.cgi?id=145644
2132 Reviewed by Andreas Kling.
2134 m_isEmoji used to be a public member variable only defined on iOS. This
2135 means that, whenever it was consulted, the sites were surrounded by
2136 PLATFORM(IOS) guards. A cleaner design is to use a getter and setter,
2137 which on non-iOS platforms, always return false / do nothing. Then, the
2138 use sites can just use these functions without having ugly guards.
2140 No new tests because there is no behavior change.
2142 * platform/graphics/FontPlatformData.h:
2143 (WebCore::FontPlatformData::hash): Simplify isEmoji use site.
2144 (WebCore::FontPlatformData::isEmoji): Getter. Returns false on Mac.
2145 (WebCore::FontPlatformData::setIsEmoji): Setter. Does nothing on Mac.
2146 * platform/graphics/cocoa/FontCascadeCocoa.mm:
2147 (WebCore::pointAdjustedForEmoji): Simplify isEmoji use site.
2148 (WebCore::FontCascade::drawGlyphs): Ditto.
2149 * platform/graphics/cocoa/FontCocoa.mm:
2150 (WebCore::Font::platformInit): Ditto.
2151 (WebCore::canUseFastGlyphAdvanceGetter): Ditto.
2152 (WebCore::isEmoji): Deleted.
2153 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2154 (WebCore::FontPlatformData::platformDataInit): Simplify isEmoji use
2156 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2157 (WebCore::FontPlatformData::platformIsEqual): Ditto.
2158 (WebCore::FontPlatformData::ctFontSize): Ditto.
2159 * platform/graphics/ios/FontCacheIOS.mm:
2160 (WebCore::FontCache::getSystemFontFallbackForCharacters): Ditto.
2161 (WebCore::FontCache::createFontPlatformData): Ditto.
2162 * platform/graphics/mac/ComplexTextController.cpp:
2163 (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.
2165 2015-06-03 Brent Fulgham <bfulgham@apple.com>
2167 REGRESSION (r181879): Scrolling order on pages with focused iframe is broken.
2168 https://bugs.webkit.org/show_bug.cgi?id=145637
2169 <rdar://problem/20635581>
2171 Reviewed by Zalan Bujtas.
2173 Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
2175 This page revealed a bug in our RenderBox code caused by the mismatch between
2176 our scrolling units, which are all integrally snapped, with our client height
2177 and widths, which are not snapped at all.
2179 In certain cases, the client height would have a small subpixel difference compared
2180 to the scroll height, which would cause WebKit to believe it was scrollable. When
2181 this happened, it would get stuck latched to this element and block scrolling events.
2184 (WebCore::Frame::scrollOverflowLayer): Use roundToInt for clientWidth and clientHeight,
2185 rather than integer truncation.
2186 * rendering/RenderBox.cpp:
2187 (WebCore::RenderBox::canBeScrolledAndHasScrollableArea): Need to round clientWidth
2188 and clientHeight to compare with scrollWidth/scrollHeight.
2189 * rendering/RenderBox.h:
2190 (WebCore::RenderBox::hasScrollableOverflowX): Ditto.
2191 (WebCore::RenderBox::hasScrollableOverflowY): Ditto.
2192 * rendering/RenderMarquee.cpp:
2193 (WebCore::RenderMarquee::computePosition): Use roundToInt for clientWidth and
2194 clientHeight, rather than integer truncation.
2196 2015-06-04 Myles C. Maxfield <mmaxfield@apple.com>
2198 [Cocoa] Clean up m_font inside FontPlatformData
2199 https://bugs.webkit.org/show_bug.cgi?id=145634
2201 Reviewed by Andreas Kling.
2203 FontPlatformDatas are used as keys in a HashMap. This means that they need
2204 to be able to represent a "deleted" value. Previously, this "deleted" value
2205 was represented as setting the pointer value of m_font to -1, and guarding
2206 all uses of m_font to make sure it wasn't -1 before dereferencing it.
2208 This patch simplifies FontPlatformData to represent a "deleted" value using
2209 a separate boolean member variable. This class is already big enough that
2210 the increased space is negligable (the class already contains two CoreText
2211 fonts in addition to a CoreGraphics font). Because of this simplification,
2212 m_font can now be a RetainPtr, instead of being manually retained and
2215 There is still a long way to go before FontPlatformData is acceptably
2216 clean and understandable. This patch improves one aspect of it, and more
2217 improvements will eventually follow.
2219 No new tests because there is no behavior change.
2221 * platform/graphics/FontCache.cpp: Remove unused variable.
2222 * platform/graphics/FontPlatformData.cpp:
2223 (WebCore::FontPlatformData::FontPlatformData): Clean up all the PLATFORM
2224 macros in favor of a single bool. Also, update to include new state.
2225 (WebCore::FontPlatformData::operator=): Update to include new state.
2226 * platform/graphics/FontPlatformData.h:
2227 (WebCore::FontPlatformData::font): Update to account for RetainPtr.
2228 (WebCore::FontPlatformData::nsFont): Ditto.
2229 (WebCore::FontPlatformData::setNSFont): Ditto.
2230 (WebCore::FontPlatformData::hash): Update to include new state.
2231 (WebCore::FontPlatformData::operator==): Ditto.
2232 (WebCore::FontPlatformData::isHashTableDeletedValue): Use new state.
2233 (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
2234 (WebCore::FontPlatformData::isValidCTFontRef): Deleted.
2235 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2236 (WebCore::FontPlatformData::platformDataInit): No need for manual retain
2238 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2239 (WebCore::FontPlatformData::platformIsEqual): Update to account for
2241 (WebCore::FontPlatformData::setFont): No need for manual retain and
2243 (WebCore::FontPlatformData::FontPlatformData): Deleted.
2244 (WebCore::FontPlatformData::~FontPlatformData): Deleted.
2245 * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2246 (WebCore::FontPlatformData::~FontPlatformData): m_scaledFont is always
2248 (WebCore::FontPlatformData::platformDataAssign): Ditto.
2250 2015-06-03 Carlos Alberto Lopez Perez <clopez@igalia.com>
2252 [GTK] [Wayland] Build is broken on trunk
2253 https://bugs.webkit.org/show_bug.cgi?id=142879
2255 Reviewed by Carlos Garcia Campos.
2257 No new tests, no behavior changes.
2259 Patch on GLContext.h picked from bug 136831 by
2260 Iago Toral <itoral@igalia.com> and Zan Dobersek <zdobersek@igalia.com>
2262 * platform/graphics/GLContext.h: Include wayland-egl.h before eglplatform.h
2263 to use the Wayland platform when building for Wayland.
2264 * platform/graphics/PlatformDisplay.cpp: Fix the include of GDK
2265 headers for the different targets.
2266 * platform/graphics/wayland/WaylandSurface.cpp: Fix build after r183731.
2267 (WebCore::WaylandSurface::~WaylandSurface):
2269 2015-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2271 [Streams API] Implement ReadableStreamController enqueue
2272 https://bugs.webkit.org/show_bug.cgi?id=145210
2274 Reviewed by Darin Adler.
2276 Added possibility to enqueue any JSValue within ReadableJSStream.
2277 They are stored in a Vector of strongified JSValue.
2279 Added support for streams that contain data but are asked to close.
2280 This is done through m_closeRequested boolean and splitting actual closing of the stream from changeStateToClosed().
2282 Chunk size and backpressure mechanism is not yet implemented.
2283 Neither is pulling once enqueued data is processed.
2285 Covered by rebased tests.
2287 * Modules/streams/ReadableStream.cpp:
2288 (WebCore::ReadableStream::changeStateToClosed): Split method with newly added close().
2289 (WebCore::ReadableStream::close): Does the actual closing of stream once stream has no more values.
2290 (WebCore::ReadableStream::read): Close the stream when stream is emptied and close is requested.
2291 (WebCore::ReadableStream::resolveReadCallback): Added to enable ReadableJSStream to resolve read callbacks immediatly at enqueue time.
2292 * Modules/streams/ReadableStream.h:
2293 (WebCore::ReadableStream::isErrored): Getter added for the custom binding code.
2294 (WebCore::ReadableStream::isCloseRequested): Ditto.
2295 * bindings/js/JSReadableStreamControllerCustom.cpp:
2296 (WebCore::JSReadableStreamController::enqueue): binding code for enqueue, taking care of raising exception if readable stream cannot enqueue.
2297 * bindings/js/ReadableJSStream.cpp:
2298 (WebCore::ReadableJSStream::hasValue):
2299 (WebCore::ReadableJSStream::read):
2300 (WebCore::ReadableJSStream::enqueue):
2301 * bindings/js/ReadableJSStream.h:
2303 2015-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2305 [Streams API] ReadableJSStream does not need a ReadableStreamSource
2306 https://bugs.webkit.org/show_bug.cgi?id=145601
2308 Reviewed by Darin Adler.
2310 Covered by existing tests.
2312 * Modules/streams/ReadableStream.cpp:
2313 (WebCore::ReadableStream::ReadableStream): Remoed m_source.
2314 * Modules/streams/ReadableStream.h: Ditto
2315 * Modules/streams/ReadableStreamSource.h: Deleted.
2316 * WebCore.vcxproj/WebCore.vcxproj: Removing Modules/streams/ReadableStreamSource.h.
2317 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2318 * WebCore.xcodeproj/project.pbxproj: Ditto.
2319 * bindings/js/ReadableJSStream.cpp:
2320 (WebCore::ReadableJSStream::globalObject):
2321 (WebCore::ReadableJSStream::doStart): Equivalent of ReadableJSStream::Source::start().
2322 (WebCore::ReadableJSStream::create): Updated according new constructor.
2323 (WebCore::ReadableJSStream::ReadableJSStream):
2324 (WebCore::startReadableStreamAsync): Deleted.
2325 (WebCore::ReadableJSStream::jsController): Deleted.
2326 (WebCore::ReadableJSStream::storeError): Deleted.
2327 * bindings/js/ReadableJSStream.h: Added m_source member to store the JS source as a JS object.
2329 2015-06-04 Zan Dobersek <zdobersek@igalia.com>
2331 Shrink the ArabicCharShapingMode enum in SVGGlyph.cpp
2332 https://bugs.webkit.org/show_bug.cgi?id=145564
2334 Reviewed by Darin Adler.
2336 Shrink the ArabicCharShapingMode enum to just one byte.
2337 This drops the size of the static s_arabicCharShapingMode
2338 array of ArabicCharShapingMode values from 888 bytes to 222.
2340 * platform/graphics/SVGGlyph.cpp:
2341 (WebCore::processArabicFormDetection):
2343 2015-06-03 Zalan Bujtas <zalan@apple.com>
2345 Use borderBoxRect instead of contentBoxRect for backdrop filter.
2346 https://bugs.webkit.org/show_bug.cgi?id=145606
2348 Reviewed by Simon Fraser.
2350 Backdrop filter should use border box rect. It also needs to take css clip into account.
2352 Tests: css3/filters/backdrop/backdrop-filter-with-cliprect.html
2353 css3/filters/backdrop/backdrop-filter-with-mask.html
2355 * rendering/RenderLayerBacking.cpp:
2356 (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
2358 2015-06-03 Youenn Fablet <youenn.fablet@crf.canon.fr>
2360 MediaDevices.getUserMedia should put promises in resolve/reject state synchronously
2361 https://bugs.webkit.org/show_bug.cgi?id=145308
2363 Reviewed by Darin Adler.
2365 Removed the calls to callToMainThread in which were resolved and rejected promises.
2366 Cleaned up the code to remove unneeded callback copies.
2368 Covered by existing tests.
2370 * Modules/mediastream/UserMediaRequest.cpp:
2371 (WebCore::UserMediaRequest::create):
2372 (WebCore::UserMediaRequest::UserMediaRequest):
2373 (WebCore::UserMediaRequest::didCreateStream):
2374 (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
2375 (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
2376 * Modules/mediastream/UserMediaRequest.h:
2378 2015-06-03 Simon Fraser <simon.fraser@apple.com>
2380 REGRESSION (r184968): missing media player buttons (control bar exists, but no buttons)
2381 https://bugs.webkit.org/show_bug.cgi?id=145630
2383 Reviewed by Zalan Bujtas.
2385 r184968 changed the initial value of m_intersectsCoverageRect to false. However,
2386 this triggered a bug with mask layers, whose value of m_intersectsCoverageRect was never
2389 Fix by copying the value of m_intersectsCoverageRect from the main layer to its
2390 mask layer, just as we do for m_visibleRect and m_coverageRect.
2392 Test: compositing/visible-rect/mask-layer-coverage.html
2394 * platform/graphics/ca/GraphicsLayerCA.cpp:
2395 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2397 2015-06-03 Simon Fraser <simon.fraser@apple.com>
2399 Layer tree dumps should include mask layers
2400 https://bugs.webkit.org/show_bug.cgi?id=145629
2402 Reviewed by Zalan Bujtas.
2404 Dumping the layer tree omitted to dump the mask layer, so fix
2405 GraphicsLayer::dumpProperties() to dump this layer.
2407 * platform/graphics/GraphicsLayer.cpp:
2408 (WebCore::GraphicsLayer::dumpProperties):
2410 2015-06-03 Greg Hughes <ghughes@apple.com>
2412 AX: Expose field sets to accessibility clients
2413 https://bugs.webkit.org/show_bug.cgi?id=145585
2415 Expose fieldsets to the accessibility API via a subrole of AXFieldset.
2417 Reviewed by Chris Fleizach.
2419 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2420 (-[WebAccessibilityObjectWrapper subrole]):
2422 2015-06-03 Myles C. Maxfield <mmaxfield@apple.com>
2424 Remove dead code FontPlatformData::roundsGlyphAdvances()
2425 https://bugs.webkit.org/show_bug.cgi?id=145628
2427 Reviewed by Simon Fraser.
2429 No new tests because there is no behavior change.
2432 * platform/graphics/FontPlatformData.h:
2433 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2434 (WebCore::FontPlatformData::roundsGlyphAdvances): Deleted.
2436 2015-06-03 Ryuan Choi <ryuan.choi@navercorp.com>
2438 [CoordinatedGraphics] Merge CoordinatedTile into Tile
2439 https://bugs.webkit.org/show_bug.cgi?id=145602
2441 Reviewed by Darin Adler.
2443 CoordinatedTile only implements Tile since Qt and WebKit1/Efl were dropped.
2444 So, there is no reason that CoordinatedTile inherits Tile interface.
2446 No new tests, no behavior changes.
2448 * PlatformEfl.cmake:
2449 * PlatformGTK.cmake:
2450 * WebCore.vcxproj/WebCore.vcxproj:
2451 * WebCore.vcxproj/WebCore.vcxproj.filters:
2452 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2453 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2454 * platform/graphics/texmap/coordinated/CoordinatedTile.cpp: Renamed to Tile.cpp
2455 * platform/graphics/texmap/coordinated/CoordinatedTile.h: Merged into Tile.h
2456 (WebCore::CoordinatedTile::coordinate): Deleted.
2457 (WebCore::CoordinatedTile::rect): Deleted.
2458 * platform/graphics/texmap/coordinated/Tile.cpp: Renamed from CoordinatedTile.cpp.
2459 * platform/graphics/texmap/coordinated/Tile.h:
2460 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
2461 (WebCore::TiledBackingStore::createTiles):
2463 2015-06-03 Matt Rajca <mrajca@apple.com>
2465 Add basic Media Session support to HTMLMediaElement.
2466 https://bugs.webkit.org/show_bug.cgi?id=145581
2468 Reviewed by Eric Carlson.
2470 HTMLMediaElements now have:
2472 - a 'kind' attribute representing the intrinsic media category
2473 - a 'session' attribute representing the current media session, if any
2475 * CMakeLists.txt: Include the new HTMLMediaElementMediaSession sources.
2476 * DerivedSources.make: Include the new IDL file.
2477 * Modules/mediasession/HTMLMediaElementMediaSession.cpp: Added.
2478 (WebCore::HTMLMediaElementMediaSession::session):
2479 * Modules/mediasession/HTMLMediaElementMediaSession.h: Added basic translation of the IDL file.
2480 (WebCore::HTMLMediaElementMediaSession::kind):
2481 (WebCore::HTMLMediaElementMediaSession::setKind):
2482 (WebCore::HTMLMediaElementMediaSession::setSession):
2483 * Modules/mediasession/HTMLMediaElementMediaSession.idl: Added from the Media Session spec.
2484 * PlatformMac.cmake: Include DOMHTMLMediaElementMediaSession.cpp.
2485 * WebCore.xcodeproj/project.pbxproj: Include the new HTMLMediaElementMediaSession sources.
2486 * html/HTMLMediaElement.h: Added accessors for 'kind' and 'session'.
2487 (WebCore::HTMLMediaElement::kind):
2488 (WebCore::HTMLMediaElement::setKind):
2489 (WebCore::HTMLMediaElement::session):
2490 (WebCore::HTMLMediaElement::setSession):
2492 2015-06-03 Myles C. Maxfield <mmaxfield@apple.com>
2494 Cleanup after r185175.
2495 https://bugs.webkit.org/show_bug.cgi?id=145569
2496 <rdar://problem/20671711>
2500 No new tests because there is no behavior change.
2502 * platform/graphics/WidthIterator.h:
2504 2015-06-02 Myles C. Maxfield <mmaxfield@apple.com>
2506 SoftBank Emoji are not transformed by shaping when in a run of their own
2507 https://bugs.webkit.org/show_bug.cgi?id=145569
2508 <rdar://problem/20671711>
2510 Reviewed by Dean Jackson.
2512 Normally, we don't perform shaping on single glyphs. However, these particular codepoints
2513 need to have shaping run on them, even if they are alone.
2515 Test: fast/text/softbank-emoji.html Note that this test may fail in different locales on
2516 different platforms. This patch disables the test on iOS.
2518 * Source/WebCore/platform/graphics/WidthIterator.cpp:
2519 (WebCore::applyFontTransforms): Move the length-of-1 check into shouldApplyFontTransforms()
2520 (WebCore::shouldApplyFontTransforms): Return true if we have one of these emoji characters in
2522 (WebCore::advanceInternal): Keep track of the previous character, and use it to call
2523 shouldApplyFontTransforms.
2524 * Source/WebCore/platform/graphics/WidthIterator.h: shouldApplyFontTransforms() needs
2525 some more information to perform its duties.
2527 2015-06-03 Daniel Bates <dabates@apple.com>
2529 Caps lock indicator should not be shown in read-only or disabled field
2530 https://bugs.webkit.org/show_bug.cgi?id=145612
2531 <rdar://problem/21227454>
2533 Reviewed by Darin Adler.
2535 * html/TextFieldInputType.cpp:
2536 (WebCore::TextFieldInputType::disabledAttributeChanged): Update caps lock indicator state.
2537 (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
2538 (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator): Do not draw the caps lock indicator
2539 when the field is read-only or disabled.
2541 2015-06-03 Dean Jackson <dino@apple.com>
2543 Crash in GraphicsContext3D::getInternalFramebufferSize
2544 https://bugs.webkit.org/show_bug.cgi?id=145479
2545 <rdar://problem/16461048>
2547 Reviewed by Eric Carlson.
2549 If we are in an unitialized or lost state, don't try to access the context.
2551 In order to test this, I added an Internal setting that always
2552 forces WebGL into a pending state.
2554 Test: fast/canvas/webgl/useWhilePending.html
2556 * html/canvas/WebGLRenderingContextBase.cpp:
2557 (WebCore::WebGLRenderingContextBase::create): Check internal settings for
2558 a forced pending state.
2559 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
2560 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
2561 * page/Settings.cpp: New Internal setting for forcing a pending policy.
2562 (WebCore::Settings::Settings):
2563 (WebCore::Settings::setForcePendingWebGLPolicy):
2565 (WebCore::Settings::isForcePendingWebGLPolicy):
2566 * testing/InternalSettings.cpp:
2567 (WebCore::InternalSettings::Backup::Backup):
2568 (WebCore::InternalSettings::Backup::restoreTo):
2569 (WebCore::InternalSettings::setForcePendingWebGLPolicy):
2570 * testing/InternalSettings.h:
2571 * testing/InternalSettings.idl:
2573 2015-06-03 Hunseop Jeong <hs85.jeong@samsung.com>
2575 Use modern for-loops in WebCore/page.
2576 https://bugs.webkit.org/show_bug.cgi?id=145455
2578 Reviewed by Darin Adler.
2580 No new tests, no behavior changes.
2583 (WebCore::Chrome::notifyPopupOpeningObservers):
2584 * page/ContentSecurityPolicy.cpp:
2585 (WebCore::CSPSourceList::matches):
2586 (WebCore::CSPDirectiveList::gatherReportURIs):
2587 (WebCore::ContentSecurityPolicy::copyStateFrom):
2588 (WebCore::isAllowedByAll):
2589 (WebCore::isAllowedByAllWithState):
2590 (WebCore::isAllowedByAllWithContext):
2591 (WebCore::isAllowedByAllWithURL):
2592 (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
2593 (WebCore::ContentSecurityPolicy::allowPluginType):
2594 (WebCore::ContentSecurityPolicy::reflectedXSSDisposition):
2595 (WebCore::ContentSecurityPolicy::gatherReportURIs):
2596 * page/ContextMenuController.cpp:
2597 (WebCore::ContextMenuController::populate):
2598 * page/DOMWindow.cpp:
2599 (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
2600 (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
2601 (WebCore::DOMWindow::willDestroyCachedFrame):
2602 (WebCore::DOMWindow::willDestroyDocumentInFrame):
2603 (WebCore::DOMWindow::willDetachDocumentFromFrame):
2604 (WebCore::DOMWindow::disconnectDOMWindowProperties):
2605 (WebCore::DOMWindow::reconnectDOMWindowProperties):
2606 (WebCore::DOMWindow::getMatchedCSSRules):
2607 * page/DeviceController.cpp:
2608 (WebCore::DeviceController::dispatchDeviceEvent):
2609 (WebCore::DeviceController::fireDeviceEvent):
2610 * page/EventHandler.cpp:
2611 (WebCore::EventHandler::updateMouseEventTargetNode):
2612 (WebCore::EventHandler::handleTouchEvent):
2613 * page/FocusController.cpp:
2614 (WebCore::FocusController::setIsVisibleAndActiveInternal):
2616 (WebCore::Frame::orientationChanged):
2617 (WebCore::Frame::injectUserScriptsForWorld):
2618 * page/FrameView.cpp:
2619 (WebCore::FrameView::scrollContentsFastPath):
2620 (WebCore::FrameView::serviceScriptedAnimations):
2621 (WebCore::FrameView::trackedRepaintRectsAsText):
2622 (WebCore::FrameView::updateWidgetPositions):
2623 (WebCore::FrameView::notifyWidgets):
2625 (WebCore::networkStateChanged):
2626 (WebCore::Page::stringToViewMode):
2627 (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
2628 (WebCore::Page::refreshPlugins):
2629 (WebCore::Page::lockAllOverlayScrollbarsToHidden):
2630 (WebCore::Page::pluginViews):
2631 (WebCore::Page::storageBlockingStateChanged):
2632 (WebCore::Page::setIsVisibleInternal):
2633 * page/PageGroup.cpp:
2634 (WebCore::PageGroup::captionPreferencesChanged):
2635 * page/PageGroupLoadDeferrer.cpp:
2636 (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2637 (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2638 * page/PageSerializer.cpp:
2639 (WebCore::PageSerializer::serializeFrame):
2640 * page/Performance.cpp:
2641 (WebCore::Performance::webkitGetEntriesByType):
2642 (WebCore::Performance::webkitGetEntriesByName):
2643 * page/PerformanceResourceTiming.cpp:
2644 (WebCore::passesTimingAllowCheck):
2645 * page/PerformanceUserTiming.cpp:
2646 (WebCore::convertToEntrySequence):
2647 * page/SecurityPolicy.cpp:
2648 (WebCore::SecurityPolicy::isAccessWhiteListed):
2649 * page/UserContentURLPattern.cpp:
2650 (WebCore::UserContentURLPattern::matchesPatterns):
2651 * page/WindowFeatures.cpp:
2652 (WebCore::WindowFeatures::parseDialogFeatures):
2653 * page/animation/AnimationController.cpp:
2654 (WebCore::AnimationControllerPrivate::updateAnimations):
2655 (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
2656 (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
2657 (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
2658 (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
2659 * page/animation/CSSPropertyAnimation.cpp:
2660 (WebCore::ShorthandPropertyWrapper::equals):
2661 (WebCore::ShorthandPropertyWrapper::blend):
2662 * page/scrolling/AsyncScrollingCoordinator.cpp:
2663 (WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
2664 * page/scrolling/ScrollingCoordinator.cpp:
2665 (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
2666 (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
2668 2015-06-03 Daniel Bates <dabates@apple.com>
2670 AutoFill button should not be shown in read-only or disabled field
2671 https://bugs.webkit.org/show_bug.cgi?id=145579
2672 <rdar://problem/21212494>
2674 Reviewed by Darin Adler.
2676 Fixes an issue where the AutoFill button is shown in a read-only or disabled
2677 field. We should not show the AutoFill button in such cases.
2679 Tests: fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html
2680 fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html
2681 fast/forms/auto-fill-button/input-auto-fill-button.html
2682 fast/forms/auto-fill-button/input-disabled-auto-fill-button.html
2683 fast/forms/auto-fill-button/input-readonly-auto-fill-button.html
2684 fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html
2686 * html/TextFieldInputType.cpp:
2687 (WebCore::TextFieldInputType::disabledAttributeChanged): Update AutoFill button state.
2688 (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
2689 (WebCore::TextFieldInputType::shouldDrawAutoFillButton): Do not draw AutoFill button
2690 when the field is disabled or read-only.
2692 2015-06-03 Brent Fulgham <bfulgham@apple.com>
2694 REGRESSION: (r181879): Scrolling in select/option region in iFrame scrolls both select and iframe
2695 https://bugs.webkit.org/show_bug.cgi?id=145574
2696 <rdar://problem/20966828>
2698 Reviewed by Simon Fraser.
2700 Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html
2702 When the scroll gesture is started when the latched scrollable container is not at the limit of its
2703 scroll region, we are NOT supposed to propagate the scroll event to the enclosing region. However,
2704 we were doing two things wrong:
2705 (1) When we recognized we were latching, we were using the right wheel event target, but not using
2706 the latched scrollable container.
2707 (2) Likewise, we were not using latched ScrollableArea when handling wheel events.
2709 Instead, we were using the current scrollable container and ScrollableArea under the mouse pointer,
2710 which could be different from the point we started latching as the content scrolled.
2712 The fix was to properly track the scrollable container and scrollable area during latching.
2714 I attempted to store the latched ScrollableArea in the latchingState object, like we already do for the
2715 scrollable container, but found that this did not work properly. I think the life cycle of the
2716 ScrollableArea may not match the scrollable container, and since they are not reference counted I
2717 simply retrieve the ScrollableArea when needed.
2719 * page/mac/EventHandlerMac.mm:
2720 (WebCore::scrollableAreaForContainerNode): Helper function to return the correct ScrollableArea
2721 for the two types of RenderBox elements.
2722 (WebCore::latchedToFrameOrBody): Helper predicate to identify Frame and Body elements.
2723 (WebCore::EventHandler::platformPrepareForWheelEvents): Use the correct ScrollableArea for the given
2724 ContainerNode. When latching, make sure to use the ScrollableArea that is related to the latched scrollable
2725 container, not the area currently underneath the mouse pointer.
2727 2015-06-03 Brady Eidson <beidson@apple.com>
2729 REGRESSION (r183498): Certain types of frame loads in iframes with <base target="_blank"> can open urls in new window/tabs
2730 https://bugs.webkit.org/show_bug.cgi?id=145580
2732 Reviewed by Mark Lam.
2734 Tests: fast/loader/fragment-navigation-base-blank.html
2735 fast/loader/iframe-meta-refresh-base-blank.html
2736 fast/loader/iframe-set-location-base-blank.html
2737 fast/loader/refresh-iframe-base-blank.html
2739 Before 183498, callers of FrameLoader::changeLocation() got automatically assigned a frame name of "_self".
2740 After 183498, many remained without a frame name.
2742 Later on, FrameLoader applies the <base> target as their frame name if they don't already have one.
2744 When the <base> target is "_blank", that causes a new window/tab.
2746 Restoring "_self" to these call sites fixes this.
2748 * inspector/InspectorFrontendClientLocal.cpp:
2749 (WebCore::InspectorFrontendClientLocal::openInNewTab):
2751 * inspector/InspectorPageAgent.cpp:
2752 (WebCore::InspectorPageAgent::navigate):
2754 * loader/FrameLoadRequest.h:
2755 (WebCore::FrameLoadRequest::FrameLoadRequest):
2757 * loader/NavigationScheduler.cpp:
2758 (WebCore::NavigationScheduler::scheduleLocationChange):
2760 * page/DOMWindow.cpp:
2761 (WebCore::DOMWindow::createWindow):
2763 2015-06-03 Alexey Proskuryakov <ap@apple.com>
2765 More iOS build fixing.
2767 * platform/spi/mac/AVFoundationSPI.h:
2769 2015-06-03 Zalan Bujtas <zalan@apple.com>
2771 Subpixel rendering: Composited layer with subpixel gap does not get painted properly when its position changes.
2772 https://bugs.webkit.org/show_bug.cgi?id=145587
2774 Reviewed by Simon Fraser.
2776 The composited layer always snaps to an enclosing device pixel (floors) while the renderer rounds.
2777 At certain positions (for example 0.5px on a 1x display), a gap is formed between the layer(0px) and its renderer(1px).
2778 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
2779 in order to get the renderering right.
2781 Test: compositing/child-layer-with-subpixel-gap-needs-repaint-when-parent-moves.html
2783 * rendering/RenderLayerBacking.cpp:
2784 (WebCore::RenderLayerBacking::updateAfterLayout):
2785 (WebCore::devicePixelFractionGapFromRendererChanged):
2786 (WebCore::RenderLayerBacking::updateGeometry):
2787 * rendering/RenderLayerBacking.h:
2789 2015-06-03 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2791 [Streams API] ReadableStreamReader::closed() should be called once by binding code
2792 https://bugs.webkit.org/show_bug.cgi?id=145551
2794 Reviewed by Darin Adler.
2796 Covered by existing tests.
2798 * bindings/js/JSReadableStreamReaderCustom.cpp:
2799 (WebCore::JSReadableStreamReader::closed): Calling ReadableStreamReader::closed only at creation of the promise.
2801 2015-06-02 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2803 [EFL][GTK] Fix build error since r185137
2804 https://bugs.webkit.org/show_bug.cgi?id=145596
2806 Unreviewed, fix build break on EFL and GTK port.
2809 (WebCore::Text::formatForDebugger): Use strncpy() instead of strlcpy().
2811 2015-06-02 Sergio Villar Senin <svillar@igalia.com>
2813 [CSS Grid Layout] Switch from parenthesis to brackets for grid line names
2814 https://bugs.webkit.org/show_bug.cgi?id=144996
2816 Reviewed by Darin Adler.
2818 Grid line names are now enclosed by brackets instead of parentheses
2819 as mentioned in the latest version of the spec. Appartently the CSS
2820 code is now more readable and avoids issues with tools like SASS.
2822 * css/CSSGrammar.y.in:
2823 * css/CSSGridLineNamesValue.cpp:
2824 (WebCore::CSSGridLineNamesValue::customCSSText):
2826 2015-06-02 Alexey Proskuryakov <ap@apple.com>
2830 * platform/spi/mac/AVFoundationSPI.h:
2832 2015-06-02 Commit Queue <commit-queue@webkit.org>
2834 Unreviewed, rolling out r185128 and r185132.
2835 https://bugs.webkit.org/show_bug.cgi?id=145597
2837 The new test hits a bad assertion (Requested by ap on
2840 Reverted changesets:
2842 "Crash in GraphicsContext3D::getInternalFramebufferSize"
2843 https://bugs.webkit.org/show_bug.cgi?id=145479
2844 http://trac.webkit.org/changeset/185128
2846 "Skip webgl/useWhilePending.html on WebKit 1."
2847 http://trac.webkit.org/changeset/185132
2849 2015-06-02 Ryuan Choi <ryuan.choi@navercorp.com>
2851 [CoordinatedGraphics] Refactor TiledBackingStoreClient
2852 https://bugs.webkit.org/show_bug.cgi?id=145577
2854 Reviewed by Gyuyoung Kim.
2856 This patch removes and simplifies unnecessary virtual methods of TiledBackingStoreClient.
2858 No new tests, no behavior changes.
2860 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2861 (WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers): Renamed from tiledBackingStorePaintEnd.
2862 (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintBegin): Deleted.
2863 (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd): Deleted.
2864 (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreBackgroundColor):
2865 Deleted because tiledBackingStoreBackgroundColor() is not used anywhere.
2866 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2867 * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
2868 (WebCore::CoordinatedTile::updateBackBuffer):
2869 Simplified not to call unnecessary methods. In addition, used modern for loop.
2870 (WebCore::CoordinatedTile::swapBackBufferToFront): Deleted.
2871 * platform/graphics/texmap/coordinated/CoordinatedTile.h:
2872 * platform/graphics/texmap/coordinated/Tile.h:
2873 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
2874 (WebCore::TiledBackingStore::updateTileBuffers):
2875 * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
2877 2015-06-02 Doug Russell <d_russell@apple.com>
2879 AX: debugging attributes for text markers
2880 https://bugs.webkit.org/show_bug.cgi?id=145283
2882 Reviewed by Chris Fleizach.
2884 AXTextMarkerDebugDescription: returns the result of
2885 VisiblePosition::formatForDebugger() for the visible position that a text marker
2887 AXTextMarkerNodeDebugDescription: calls Node::showNode() and
2888 Node::showNodePathForThis() for the visible position that a text marker
2890 AXTextMarkerNodeTreeDebugDescription: calls Node::showTreeForThis() for the
2891 visible position that a text marker represents.
2892 AXTextMarkerRangeDebugDescription: returns the result of
2893 formatForDebugger(VisiblePositionRange) for the visible position range that a text
2894 marker range represents.
2896 This is debug only tooling. Tests would be flakey and not very helpful.
2898 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2899 (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarker:]):
2900 (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarkerRange:]):
2901 (-[WebAccessibilityObjectWrapper showNodeForTextMarker:]):
2902 (-[WebAccessibilityObjectWrapper showNodeTreeForTextMarker:]):
2903 (formatForDebugger):
2904 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2906 (WebCore::Text::formatForDebugger):
2908 2015-06-02 Matt Rajca <mrajca@apple.com>
2910 MediaSessions should keep track of their current state.
2911 https://bugs.webkit.org/show_bug.cgi?id=145575
2913 Reviewed by Alex Christensen.
2915 * Modules/mediasession/MediaSession.h: Per the Media Session spec, the state can be 'Idle', 'Active', or
2916 'Interrupted'. Sessions are created in an 'Idle' state.
2918 2015-06-02 Jon Lee <jonlee@apple.com>
2920 Build fix when building with internal SDKs
2921 https://bugs.webkit.org/show_bug.cgi?id=145576
2922 rdar://problem/21089476
2924 Reviewed by Alexey Proskuryakov.
2926 * platform/spi/mac/AVFoundationSPI.h: Include the right header.
2928 2015-06-02 Dean Jackson <dino@apple.com>
2930 No need to guard the sizes attribute against PICTURE_SIZES in preload scanner.
2931 https://bugs.webkit.org/show_bug.cgi?id=145573
2932 <rdar://problem/21210038>
2934 Reviewed by Myles Maxfield.
2936 The PICTURE_SIZES feature flag doesn't need to be used to
2937 guard preloading of the sizes attribute.
2939 * html/parser/HTMLPreloadScanner.cpp:
2940 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Deleted.
2941 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.
2943 2015-06-02 Anders Carlsson <andersca@apple.com>
2945 Use UUIDs for WebSQL database filenames instead of a sequential number
2946 https://bugs.webkit.org/show_bug.cgi?id=145571
2948 Reviewed by Dan Bernstein.
2950 This is a first step towards getting rid of the iOS specific code path where we truncate
2951 database files instead of deleting them (in order to avoid file corruption).
2953 * Modules/webdatabase/DatabaseTracker.cpp:
2954 (WebCore::generateDatabaseFileName):
2955 (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
2956 * platform/sql/SQLiteFileSystem.cpp:
2957 (WebCore::SQLiteFileSystem::getFileNameForNewDatabase): Deleted.
2958 * platform/sql/SQLiteFileSystem.h:
2960 2015-06-02 Dean Jackson <dino@apple.com>
2962 Crash in GraphicsContext3D::getInternalFramebufferSize
2963 https://bugs.webkit.org/show_bug.cgi?id=145479
2964 <rdar://problem/16461048>
2966 Reviewed by Eric Carlson.
2968 If we are in an unitialized or lost state, don't try to access the context.
2970 In order to test this, I added an Internal setting that always
2971 forces WebGL into a pending state.
2973 Test: fast/canvas/webgl/useWhilePending.html
2975 * html/canvas/WebGLRenderingContextBase.cpp:
2976 (WebCore::WebGLRenderingContextBase::create): Check internal settings for
2977 a forced pending state.
2978 (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
2979 (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
2980 * page/Settings.cpp: New Internal setting for forcing a pending policy.
2981 (WebCore::Settings::Settings):
2982 (WebCore::Settings::setForcePendingWebGLPolicy):
2984 (WebCore::Settings::isForcePendingWebGLPolicy):
2985 * testing/InternalSettings.cpp:
2986 (WebCore::InternalSettings::Backup::Backup):
2987 (WebCore::InternalSettings::Backup::restoreTo):
2988 (WebCore::InternalSettings::setForcePendingWebGLPolicy):
2989 * testing/InternalSettings.h:
2990 * testing/InternalSettings.idl:
2992 2015-06-02 Matt Rajca <mrajca@apple.com>
2994 Added a stub implementation of MediaSession, part of the Media Session spec.
2995 https://bugs.webkit.org/show_bug.cgi?id=145530
2997 Reviewed by Eric Carlson.
2999 * CMakeLists.txt: Added new MediaSession sources.
3000 * DerivedSources.make:
3001 * Modules/mediasession/MediaSession.cpp: Added stub implementation.
3002 (WebCore::MediaSession::MediaSession): Per the Media Session spec, a Media Remote Controls object should only be
3003 set for 'content' sessions; it is null otherwise.
3004 (WebCore::MediaSession::~MediaSession):
3005 (WebCore::MediaSession::controls):
3006 (WebCore::MediaSession::releaseSession):
3007 * Modules/mediasession/MediaSession.h: Added basic translation of IDL file.
3008 * Modules/mediasession/MediaSession.idl: Added from the Media Session spec.
3009 * WebCore.xcodeproj/project.pbxproj: Added new MediaSession sources.
3011 2015-06-02 Zalan Bujtas <zalan@apple.com>
3013 Backdrop filter is pulling in content from behind the window.
3014 https://bugs.webkit.org/show_bug.cgi?id=145561
3015 rdar://problem/20909309
3017 Reviewed by Simon Fraser.
3019 This patch ensures that the backdrop filter layer is positioned and sized properly.
3021 The backdrop filter layer should take its size and position from its renderer and not
3022 directly from the composited layer.
3023 In certain cases the composited layer's size is expanded to cover items like box shadow or an absolute positioned descendant.
3024 In such cases, we ended up applying the backdrop filter to those areas as well.
3026 Tests: css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html
3027 css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html
3029 * platform/graphics/GraphicsLayer.h:
3030 (WebCore::GraphicsLayer::setBackdropFiltersRect):
3031 (WebCore::GraphicsLayer::backdropFiltersRect):
3032 * platform/graphics/ca/GraphicsLayerCA.cpp:
3033 (WebCore::GraphicsLayerCA::setBackdropFiltersRect):
3034 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3035 (WebCore::GraphicsLayerCA::updateBackdropFilters):
3036 (WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
3037 (WebCore::GraphicsLayerCA::updateContentsRects):
3038 (WebCore::GraphicsLayerCA::updateGeometry): Deleted.
3039 * platform/graphics/ca/GraphicsLayerCA.h:
3040 * rendering/RenderLayerBacking.cpp:
3041 (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
3042 (WebCore::RenderLayerBacking::updateGeometry):
3043 * rendering/RenderLayerBacking.h:
3045 2015-06-02 Eric Carlson <eric.carlson@apple.com>
3047 [Mac] occasional crash in Document::playbackTargetAvailabilityDidChange
3048 https://bugs.webkit.org/show_bug.cgi?id=145559
3050 Reviewed by Darin Adler.
3052 No new tests, covered by existing tests.
3054 * html/HTMLMediaElement.cpp:
3055 (WebCore::HTMLMediaElement::registerWithDocument): Pass document to m_mediaSession->registerWithDocument.
3056 (WebCore::HTMLMediaElement::unregisterWithDocument): Pass document to m_mediaSession->unRegisterWithDocument.
3057 (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Ditto.
3058 (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.
3060 * html/MediaElementSession.cpp:
3061 (WebCore::MediaElementSession::registerWithDocument): Take a document.
3062 (WebCore::MediaElementSession::unregisterWithDocument): Ditto.
3063 * html/MediaElementSession.h:
3065 2015-06-02 Chris Dumez <cdumez@apple.com>
3067 Calling FrameView::viewportContentsChanged() after style recalcs is too expensive
3068 https://bugs.webkit.org/show_bug.cgi?id=145554
3069 <rdar://problem/21189478>
3071 Reviewed by Darin Adler and Simon Fraser.
3073 Only call FrameView::viewportContentsChanged() after a style recalc if
3074 composited layers have been updated (and there is no pending layout).
3076 We already viewportContentsChanged() after layout so we only need to
3077 call viewportContentsChanged() after a style recalc if it did not cause
3078 a layout but may have caused an element to become visible. In
3079 particular, this can happen in the case of composited animations (e.g.
3080 using -webkit-transform to move an element inside the viewport).
3081 Therefore, we now only call viewportContentsChanged() after a style
3082 recalc if it caused composited layers to be updated. This avoids a lot
3083 of unnecessary calls to viewportContentsChanged(), which is expensive.
3085 No new tests, already covered by:
3086 fast/images/animated-gif-webkit-transform.html
3089 (WebCore::Document::recalcStyle):
3090 * page/FrameView.cpp:
3091 (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
3093 * rendering/RenderLayerCompositor.cpp:
3094 (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
3095 (WebCore::RenderLayerCompositor::updateCompositingLayers):
3096 * rendering/RenderLayerCompositor.h:
3098 2015-06-02 Myles C. Maxfield <mmaxfield@apple.com>
3100 Remove use of CTFontSetRenderingParameters()
3101 https://bugs.webkit.org/show_bug.cgi?id=145560
3103 Reviewed by Simon Fraser.
3105 Instead, always use CTFontSetRenderingStyle().
3107 No new tests because there is no behavior change.
3109 * platform/graphics/cocoa/FontCascadeCocoa.mm:
3110 (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
3111 (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
3113 2015-06-02 Anders Carlsson <andersca@apple.com>
3115 Move WKFontAntialiasingStateSaver to its own file
3116 https://bugs.webkit.org/show_bug.cgi?id=145557
3117 rdar://problem/21134776
3119 Reviewed by Dan Bernstein.
3121 Also rename it to FontAntialiasingStateSaver. Also, change it to use the CoreGraphicsSPI.h header for its
3122 CGFontAntialiasingStyle definition instead of using an explicit typedef.
3124 * WebCore.xcodeproj/project.pbxproj:
3125 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3126 (PlatformCALayer::drawLayerContents):
3127 * platform/graphics/ios/FontAntialiasingStateSaver.h: Copied from Source/WebCore/platform/ios/wak/WKGraphics.h.
3128 (WebCore::FontAntialiasingStateSaver::FontAntialiasingStateSaver):
3129 (WebCore::FontAntialiasingStateSaver::setup):
3130 (WebCore::FontAntialiasingStateSaver::restore):
3131 * platform/ios/LegacyTileCache.mm:
3132 (WebCore::LegacyTileCache::drawWindowContent):
3133 * platform/ios/wak/WKGraphics.h:
3134 (WKFontAntialiasingStateSaver::WKFontAntialiasingStateSaver): Deleted.
3135 * platform/ios/wak/WKGraphics.mm:
3136 (WKFontAntialiasingStateSaver::setup): Deleted.
3137 (WKFontAntialiasingStateSaver::restore): Deleted.
3139 2015-06-02 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3141 [Streams API] Implement ReadableStreamReader read method in closed and errored state
3142 https://bugs.webkit.org/show_bug.cgi?id=144790
3144 Reviewed by Darin Adler.
3146 Reader delegates read() promise handling to its stream except if reader is no longer locking the stream and stream is readable.
3147 Storing of reader read() promise callbacks as a Vector in ReadableStream.
3148 Added resolution/rejection of read() promises in case of errored/closed streams.
3150 Test: streams/readable-stream-reader-read.html
3152 * ForwardingHeaders/runtime/IteratorOperations.h: Added.
3153 * Modules/streams/ReadableStream.cpp:
3154 (WebCore::ReadableStream::cleanCallbacks): Clean the read requests.
3155 (WebCore::ReadableStream::changeStateToClosed): Run success callbacks with undefined for read requests.
3156 (WebCore::ReadableStream::changeStateToErrored): Run failure callbacks with the errors for read requests.
3157 (WebCore::ReadableStream::closed): Parameter name changed.
3158 (WebCore::ReadableStream::read): Added. Succeeds with empty when closed, fails with error when errored, reads a
3159 value if there is one and pushes the callbacks to the queue otherwise.
3160 * Modules/streams/ReadableStream.h:
3161 (WebCore::ReadableStream::ReadCallbacks::ReadCallbacks): Struct containing success and failure callbacks.
3162 * Modules/streams/ReadableStreamReader.cpp:
3163 (WebCore::ReadableStreamReader::closed): Parameter name changed.
3164 (WebCore::ReadableStreamReader::read): Invoke success with empty if we streams if we don't have the right reader
3165 and call the stream otherwise to read.
3166 * Modules/streams/ReadableStreamReader.h:
3167 * bindings/js/JSReadableStreamReaderCustom.cpp:
3168 (WebCore::JSReadableStreamReader::read): Create the callback lambdas and invoke read. Failure rejects the
3169 promise and success creates the result from the read value.
3170 * bindings/js/ReadableJSStream.cpp:
3171 (WebCore::ReadableJSStream::hasValue):
3172 (WebCore::ReadableJSStream::read): Not implemented yet.
3173 * bindings/js/ReadableJSStream.h:
3175 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
3177 [Cocoa] FontPlatformData's equality check should always use reference URLs
3178 https://bugs.webkit.org/show_bug.cgi?id=144168
3180 Reviewed by Tim Horton.
3182 <rdar://problem/18985642> is not fixed, so we need to continue using the older
3183 objectForEqualityCheck().
3185 No new tests because there is no behavior change.
3187 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3188 (WebCore::FontPlatformData::objectForEqualityCheck):
3190 2015-06-02 Andy Estes <aestes@apple.com>
3192 [Mac] REGRESSION (r175941): Max.app crashes when adding a sound file to a patch due to removing cursor resources from WebCore.framework
3193 https://bugs.webkit.org/show_bug.cgi?id=145555
3195 Reviewed by Darin Adler.
3197 Re-added the cursor resources used by Max.app and ran sort-Xcode-project-file.
3199 * Resources/copyCursor.png: Added.
3200 * Resources/moveCursor.png: Added.
3201 * Resources/northEastSouthWestResizeCursor.png: Added.
3202 * Resources/northSouthResizeCursor.png: Added.
3203 * Resources/northWestSouthEastResizeCursor.png: Added.
3204 * WebCore.xcodeproj/project.pbxproj:
3206 2015-06-02 Brady Eidson <beidson@apple.com>
3208 WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
3209 rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
3211 Reviewed by Alex Christensen.
3213 Tests: loader/navigation-policy/should-open-external-urls/main-frame-click.html
3214 loader/navigation-policy/should-open-external-urls/main-frame-navigated-programatically-by-subframe.html
3215 loader/navigation-policy/should-open-external-urls/main-frame-with-flag-progamatic.html
3216 loader/navigation-policy/should-open-external-urls/main-frame-without-flag-programatic.html
3217 loader/navigation-policy/should-open-external-urls/subframe-click-target-self.html
3218 loader/navigation-policy/should-open-external-urls/subframe-click-target-top.html
3219 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html
3220 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html
3221 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html
3222 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag.html
3223 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag-from-subframe.html
3224 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag.html
3225 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag-from-subframe.html
3226 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag.html
3227 loader/navigation-policy/should-open-external-urls/window-open-with-flag-from-subframe.html
3228 loader/navigation-policy/should-open-external-urls/window-open-with-flag.html
3229 loader/navigation-policy/should-open-external-urls/window-open-without-flag-from-subframe.html
3230 loader/navigation-policy/should-open-external-urls/window-open-without-flag.html
3232 The "should open external URLs" flag is only for main frames.
3233 It doesn't enforce any sort of policy internal to WebKit, but rather is for notifications to the policy delegate.
3235 It is set from one of two places:
3236 1 - A main frame is navigated by any frame as the result of a user gesture.
3237 2 - WebKit2 API explicitly states the flag is true.
3239 The flag value propagates when:
3240 1 - When a main frame document is navigated to a new main frame document.
3241 2 - When a new window is opened from a page whose main frame had the flag set.
3242 3 - When a new window is opened as the result of a user gesture.
3244 The flag resets to false when:
3245 1 - A subframe navigates a main frame without a user gesture.
3247 This patch is large, but does little more than the following:
3248 1 - Adds a ShouldOpenExternalURLs flag to both FrameLoadRequest and NavigationAction.
3249 2 - Makes sure anybody who creates either of those objects sets a sensible for that flag.
3250 3 - When FrameLoader creates a new DocumentLoader, it sets its flag based on whether or not the load is in a main frame,
3251 whether or not the load is from a user gesture, and based on the initiator's value of the flag.
3254 (WebCore::Document::processHttpEquiv):
3255 (WebCore::Document::shouldOpenExternalURLsPolicyToPropagate):
3258 * html/HTMLAnchorElement.cpp:
3259 (WebCore::HTMLAnchorElement::handleClick):
3261 * html/HTMLLinkElement.cpp:
3262 (WebCore::HTMLLinkElement::handleClick):
3264 * html/parser/XSSAuditorDelegate.cpp:
3265 (WebCore::XSSAuditorDelegate::didBlockScript):
3267 * inspector/InspectorFrontendClientLocal.cpp:
3268 (WebCore::InspectorFrontendClientLocal::openInNewTab):
3270 * inspector/InspectorPageAgent.cpp:
3271 (WebCore::InspectorPageAgent::navigate):
3273 * loader/DocumentLoader.cpp:
3274 (WebCore::DocumentLoader::setTriggeringAction):
3275 (WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate):
3276 * loader/DocumentLoader.h:
3277 (WebCore::DocumentLoader::shouldOpenExternalURLsPolicy): Deleted.
3279 * loader/FrameLoadRequest.cpp:
3280 (WebCore::FrameLoadRequest::FrameLoadRequest):
3281 * loader/FrameLoadRequest.h:
3282 (WebCore::FrameLoadRequest::FrameLoadRequest):
3284 * loader/FrameLoader.cpp:
3285 (WebCore::FrameLoader::urlSelected):
3286 (WebCore::FrameLoader::receivedFirstData):
3287 (WebCore::FrameLoader::loadURLIntoChildFrame):
3288 (WebCore::FrameLoader::loadURL):
3289 (WebCore::FrameLoader::load):
3290 (WebCore::FrameLoader::loadWithNavigationAction):
3291 (WebCore::FrameLoader::reloadWithOverrideEncoding):
3292 (WebCore::FrameLoader::reload):
3293 (WebCore::FrameLoader::loadPostRequest):
3294 (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3295 (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
3296 * loader/FrameLoader.h:
3298 * loader/NavigationAction.cpp:
3299 (WebCore::NavigationAction::NavigationAction):
3300 (WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy):
3301 * loader/NavigationAction.h:
3302 (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy): Deleted.
3304 * loader/NavigationScheduler.cpp:
3305 (WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
3306 (WebCore::ScheduledRedirect::ScheduledRedirect):
3307 (WebCore::ScheduledLocationChange::ScheduledLocationChange):
3308 (WebCore::ScheduledRefresh::ScheduledRefresh):
3309 (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
3310 (WebCore::NavigationScheduler::scheduleRedirect):
3311 (WebCore::NavigationScheduler::scheduleLocationChange):
3312 (WebCore::NavigationScheduler::scheduleRefresh):
3313 * loader/NavigationScheduler.h:
3315 * loader/PolicyChecker.cpp:
3316 (WebCore::PolicyChecker::checkNavigationPolicy):
3318 * loader/SubframeLoader.cpp:
3319 (WebCore::SubframeLoader::loadOrRedirectSubframe):
3321 * loader/appcache/ApplicationCacheGroup.cpp:
3322 (WebCore::ApplicationCacheGroup::selectCache):
3324 * page/ContextMenuController.cpp:
3325 (WebCore::openNewWindow):
3326 (WebCore::ContextMenuController::contextMenuItemSelected):
3328 * page/DOMWindow.cpp:
3329 (WebCore::DOMWindow::setLocation):
3330 (WebCore::DOMWindow::createWindow):
3331 (WebCore::DOMWindow::open):
3333 * page/DragController.cpp:
3334 (WebCore::DragController::performDragOperation):
3336 * page/Location.cpp:
3337 (WebCore::Location::reload):
3339 * replay/ReplayInputDispatchMethods.cpp:
3340 (WebCore::InitialNavigation::dispatch):
3342 * svg/SVGAElement.cpp:
3343 (WebCore::SVGAElement::defaultEventHandler):
3345 2015-06-02 Yusuke Suzuki <utatane.tea@gmail.com>
3347 Heap-use-after-free read of size 4 in JavaScriptCore: WTF::StringImpl::isSymbol() (StringImpl.h:496)
3348 https://bugs.webkit.org/show_bug.cgi?id=145532
3350 Reviewed by Geoffrey Garen.
3352 Hold the ownership of AtomicStringImpl*.
3354 * bindings/scripts/CodeGeneratorJS.pm:
3355 (GenerateParametersCheck):
3356 * dom/TreeScope.cpp:
3357 (WebCore::TreeScope::getElementById):
3359 2015-06-02 Youenn Fablet <youenn.fablet@crf.canon.fr>
3361 SharedBuffer::copy should return a Ref<SharedBuffer>
3362 https://bugs.webkit.org/show_bug.cgi?id=145499
3364 Reviewed by Andreas Kling.
3366 Changing SharedBuffer::copy to return a Ref<> and adapting some code accordingly.
3368 Covered by existing tests.
3370 * loader/SubresourceLoader.cpp:
3371 (WebCore::SubresourceLoader::didReceiveResponse):
3372 * loader/appcache/ApplicationCacheResource.cpp:
3373 (WebCore::ApplicationCacheResource::deliver):
3374 * platform/SharedBuffer.cpp:
3375 (WebCore::SharedBuffer::copy):
3376 * platform/SharedBuffer.h:
3378 2015-06-01 Hunseop Jeong <hs85.jeong@samsung.com>
3380 Use modern for-loops in WebCore/Modules - 1
3381 https://bugs.webkit.org/show_bug.cgi?id=145507
3383 Reviewed by Darin Adler.
3385 No new tests, no behavior changes.
3387 * Modules/battery/BatteryController.cpp:
3388 (WebCore::BatteryController::~BatteryController):
3389 (WebCore::BatteryController::updateBatteryStatus):
3390 (WebCore::BatteryController::didChangeBatteryStatus):
3391 * Modules/encryptedmedia/CDM.cpp:
3392 (WebCore::CDMFactoryForKeySystem):
3393 * Modules/encryptedmedia/MediaKeys.cpp:
3394 (WebCore::MediaKeys::~MediaKeys):
3395 * Modules/geolocation/Geolocation.cpp:
3396 (WebCore::Geolocation::resumeTimerFired):
3397 (WebCore::Geolocation::resetAllGeolocationPermission):
3398 (WebCore::Geolocation::makeCachedPositionCallbacks):
3399 (WebCore::Geolocation::sendError):
3400 (WebCore::Geolocation::sendPosition):
3401 (WebCore::Geolocation::stopTimer):
3402 (WebCore::Geolocation::cancelRequests):
3403 (WebCore::Geolocation::extractNotifiersWithCachedPosition):
3404 (WebCore::Geolocation::copyToSet):
3405 (WebCore::Geolocation::handlePendingPermissionNotifiers):
3406 * Modules/geolocation/GeolocationController.cpp:
3407 (WebCore::GeolocationController::positionChanged):
3408 (WebCore::GeolocationController::errorOccurred):
3409 * Modules/indexeddb/IDBDatabase.cpp:
3410 (WebCore::IDBDatabase::objectStoreNames):
3411 (WebCore::IDBDatabase::transaction):
3412 (WebCore::IDBDatabase::forceClose):
3413 (WebCore::IDBDatabase::closeConnection):
3414 (WebCore::IDBDatabase::findObjectStoreId):
3415 * Modules/indexeddb/IDBDatabaseBackend.cpp:
3416 (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
3417 (WebCore::IDBDatabaseBackend::deleteDatabase):
3418 (WebCore::IDBDatabaseBackend::close):
3419 * Modules/indexeddb/IDBDatabaseMetadata.cpp:
3420 (WebCore::IDBDatabaseMetadata::isolatedCopy):
3421 (WebCore::IDBObjectStoreMetadata::isolatedCopy):
3422 * Modules/indexeddb/IDBKey.cpp:
3423 (WebCore::IDBKey::isValid):
3424 * Modules/indexeddb/IDBKey.h:
3425 (WebCore::IDBKey::createMultiEntryArray):
3426 (WebCore::IDBKey::createArray):
3427 * Modules/indexeddb/IDBKeyPath.cpp:
3428 (WebCore::IDBKeyPath::IDBKeyPath):
3429 (WebCore::IDBKeyPath::isValid):
3430 (WebCore::IDBKeyPath::isolatedCopy):
3431 * Modules/indexeddb/IDBObjectStore.cpp:
3432 (WebCore::IDBObjectStore::indexNames):
3433 (WebCore::IDBObjectStore::put):
3434 Rename the two 'i's to 'keyData' and 'indexKeyData'.
3435 (WebCore::IDBObjectStore::index):
3436 (WebCore::IDBObjectStore::findIndexId):
3437 * Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
3438 (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions):
3439 * Modules/indexeddb/IDBRequest.cpp:
3440 (WebCore::IDBRequest::abort):
3441 * Modules/indexeddb/IDBTransaction.cpp:
3442 (WebCore::IDBTransaction::closeOpenCursors):
3443 (WebCore::IDBTransaction::onAbort):
3444 (WebCore::IDBTransaction::dispatchEvent):
3445 * Modules/indexeddb/IDBTransactionBackend.cpp:
3446 (WebCore::IDBTransactionBackend::create):
3447 (WebCore::IDBTransactionBackend::closeOpenCursors):
3448 * Modules/mediasource/MediaSource.cpp:
3449 (WebCore::MediaSource::onReadyStateChange):
3450 * Modules/mediastream/MediaConstraintsImpl.cpp:
3451 (WebCore::MediaConstraintsImpl::initialize):
3452 (WebCore::MediaConstraintsImpl::getMandatoryConstraints):
3453 (WebCore::MediaConstraintsImpl::getOptionalConstraintValue):
3454 * Modules/mediastream/MediaStream.cpp:
3455 (WebCore::MediaStream::create):
3456 (WebCore::MediaStream::cloneMediaStreamTrackVector):
3457 (WebCore::MediaStream::addTrack):
3458 (WebCore::MediaStream::removeTrack):
3459 (WebCore::MediaStream::haveTrackWithSource):
3460 (WebCore::MediaStream::getTrackById):
3461 (WebCore::MediaStream::getTracks):
3462 (WebCore::MediaStream::trackDidEnd):
3463 (WebCore::MediaStream::scheduledEventTimerFired):
3464 * Modules/mediastream/MediaStreamCapabilities.cpp:
3465 (WebCore::MediaStreamCapabilities::sourceType):
3466 (WebCore::MediaStreamCapabilities::sourceId):
3467 (WebCore::MediaStreamCapabilities::facingMode):
3468 * Modules/mediastream/MediaStreamTrack.cpp:
3469 (WebCore::MediaStreamTrack::trackDidEnd):
3470 * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
3471 (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
3473 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
3475 [SVG -> OTF Converter] Remove unnecessary hacks
3476 https://bugs.webkit.org/show_bug.cgi?id=145088
3478 Reviewed by Simon Fraser.
3482 Test: svg/text/offset-square-svg-font.html
3484 * svg/SVGToOTFFontConversion.cpp:
3485 (WebCore::SVGToOTFFontConverter::appendKERNTable):
3486 (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
3488 2015-06-01 Andreas Kling <akling@apple.com>
3490 CSS animations in filling-forwards state shouldn't force compositing.
3491 <https://webkit.org/b/145389>
3492 <rdar://problem/17923642>
3494 Reviewed by Simon Fraser.
3496 Stop checking if a CSS animation is filling forwards when computing
3497 compositing requirements.
3499 This prevents finished animations from pinning elements in composited
3500 state, and frees up a bunch of IOSurface memory on some content.
3502 * page/animation/AnimationBase.h:
3503 (WebCore::AnimationBase::isAnimatingProperty): Deleted.
3504 * rendering/RenderLayerBacking.cpp:
3505 (WebCore::RenderLayerBacking::updateGeometry):
3506 * rendering/RenderLayerCompositor.cpp:
3507 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
3509 2015-06-01 Myles C. Maxfield <mmaxfield@apple.com>
3511 Out of bounds read in WebCore::ComplexTextController::adjustGlyphsAndAdvances
3512 https://bugs.webkit.org/show_bug.cgi?id=145537
3513 <rdar://problem/20959267>
3515 Reviewed by Darin Adler.
3517 U16_IS_SURROGATE_LEAD(ch) assumes U16_IS_SURROGATE(ch). In this case, that isn't true.
3519 Test: fast/text/crash-complex-text-surrogate.html
3521 * platform/graphics/mac/ComplexTextController.cpp:
3522 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
3524 2015-05-30 Zalan Bujtas <zalan@apple.com>
3526 REGRESSION (179771): zooming on facebook images covers image
3527 https://bugs.webkit.org/show_bug.cgi?id=145485
3529 Reviewed by Simon Fraser.
3531 Scaling an infinite rect should always produce an infinite rect.
3532 (Based on Simon Fraser's patch)
3534 Test: compositing/layer-creation/zoomed-clip-intersection.html
3536 * platform/graphics/LayoutRect.cpp:
3537 (WebCore::LayoutRect::scale):
3539 2015-06-01 Gyuyoung Kim <gyuyoung.kim@webkit.org>
3541 Purge PassRefPtr in WebCore/Modules - 3
3542 https://bugs.webkit.org/show_bug.cgi?id=145508
3544 Reviewed by Darin Adler.
3546 As a step to purge PassRefPtr, this patch removes PassRefPtr, then use Ref or RefPtr.
3548 * Modules/indexeddb/IDBCursor.cpp:
3549 (WebCore::IDBCursor::create):
3550 * Modules/indexeddb/IDBCursor.h:
3551 * Modules/indexeddb/IDBCursorBackend.h:
3552 (WebCore::IDBCursorBackend::create):
3553 * Modules/indexeddb/IDBCursorBackendOperations.h:
3554 (WebCore::CursorIterationOperation::create):
3555 (WebCore::CursorAdvanceOperation::create):
3556 * Modules/indexeddb/IDBDatabase.cpp:
3557 (WebCore::IDBDatabase::create):
3558 * Modules/indexeddb/IDBDatabase.h:
3559 * Modules/indexeddb/IDBDatabaseBackend.cpp:
3560 (WebCore::IDBDatabaseBackend::create):
3561 * Modules/indexeddb/IDBDatabaseBackend.h:
3562 * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
3563 (WebCore::IDBDatabaseCallbacksImpl::create):
3564 * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
3565 * Modules/indexeddb/IDBDatabaseError.h:
3566 (WebCore::IDBDatabaseError::create):
3567 * Modules/indexeddb/IDBIndex.h:
3568 (WebCore::IDBIndex::create):
3569 * Modules/indexeddb/IDBKey.h:
3570 (WebCore::IDBKey::createInvalid):
3571 (WebCore::IDBKey::createNumber):
3572 (WebCore::IDBKey::createString):
3573 (WebCore::IDBKey::createDate):
3574 (WebCore::IDBKey::createArray):
3575 * Modules/indexeddb/IDBKeyRange.cpp:
3576 (WebCore::IDBKeyRange::create):
3577 * Modules/indexeddb/IDBKeyRange.h:
3578 (WebCore::IDBKeyRange::create):
3579 * Modules/indexeddb/IDBObjectStore.cpp:
3580 * Modules/indexeddb/IDBObjectStore.h:
3581 (WebCore::IDBObjectStore::create):
3582 * Modules/indexeddb/IDBOpenDBRequest.cpp:
3583 (WebCore::IDBOpenDBRequest::create):
3584 * Modules/indexeddb/IDBOpenDBRequest.h:
3585 * Modules/indexeddb/IDBRecordIdentifier.h:
3586 (WebCore::IDBRecordIdentifier::create):
3587 * Modules/indexeddb/IDBRequest.cpp:
3588 (WebCore::IDBRequest::create):
3589 (WebCore::IDBRequest::getResultCursor):
3590 * Modules/indexeddb/IDBRequest.h:
3591 * Modules/indexeddb/IDBTransaction.cpp:
3592 (WebCore::IDBTransaction::create):
3593 * Modules/indexeddb/IDBTransaction.h:
3594 * Modules/indexeddb/IDBTransactionBackend.cpp:
3595 (WebCore::IDBTransactionBackend::create):
3596 * Modules/indexeddb/IDBTransactionBackend.h:
3597 * Modules/indexeddb/IDBTransactionBackendOperations.h:
3598 (WebCore::CreateObjectStoreOperation::create):
3599 (WebCore::DeleteObjectStoreOperation::create):
3600 (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
3601 (WebCore::CreateObjectStoreAbortOperation::create):
3602 (WebCore::DeleteObjectStoreAbortOperation::create):
3603 (WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
3604 (WebCore::CreateIndexOperation::create):
3605 (WebCore::CreateIndexAbortOperation::create):
3606 (WebCore::DeleteIndexOperation::create):
3607 (WebCore::DeleteIndexAbortOperation::create):
3608 (WebCore::GetOperation::create):
3609 (WebCore::PutOperation::create):
3610 (WebCore::SetIndexesReadyOperation::create):
3611 (WebCore::OpenCursorOperation::create):
3612 (WebCore::CountOperation::create):
3613 (WebCore::DeleteRangeOperation::create):
3614 (WebCore::ClearObjectStoreOperation::create):
3615 * Modules/mediasource/VideoPlaybackQuality.cpp:
3616 (WebCore::VideoPlaybackQuality::create):
3617 * Modules/mediasource/VideoPlaybackQuality.h:
3618 * Modules/mediastream/MediaConstraintsImpl.cpp:
3619 (WebCore::MediaConstraintsImpl::create):
3620 * Modules/mediastream/MediaConstraintsImpl.h:
3621 * Modules/mediastream/MediaStream.cpp:
3622 (WebCore::MediaStream::create):
3623 * Modules/mediastream/MediaStream.h:
3624 * Modules/mediastream/RTCDTMFSender.cpp:
3625 (WebCore::RTCDTMFSender::create):
3626 * Modules/mediastream/RTCDTMFSender.h:
3627 * Modules/mediastream/RTCOfferAnswerOptions.cpp:
3628 (WebCore::RTCOfferAnswerOptions::create):
3629 (WebCore::RTCOfferOptions::create):
3630 * Modules/mediastream/RTCOfferAnswerOptions.h:
3631 * Modules/mediastream/RTCPeerConnection.cpp:
3632 (WebCore::RTCPeerConnection::parseConfiguration):
3633 (WebCore::RTCPeerConnection::create):
3634 * Modules/mediastream/RTCPeerConnection.h:
3635 * Modules/webaudio/AudioContext.cpp:
3636 (WebCore::AudioContext::create):
3637 * Modules/webdatabase/AbstractDatabaseServer.h:
3638 * Modules/webdatabase/DOMWindowWebDatabase.cpp:
3639 (WebCore::DOMWindowWebDatabase::openDatabase):
3640 * Modules/webdatabase/DOMWindowWebDatabase.h:
3641 * Modules/webdatabase/DatabaseManager.cpp:
3642 (WebCore::DatabaseManager::existingDatabaseContextFor):
3643 (WebCore::DatabaseManager::databaseContextFor):
3644 (WebCore::DatabaseManager::openDatabase):
3645 * Modules/webdatabase/DatabaseManager.h:
3646 * Modules/webdatabase/DatabaseServer.cpp:
3647 (WebCore::DatabaseServer::openDatabase):
3648 (WebCore::DatabaseServer::createDatabase):
3649 * Modules/webdatabase/DatabaseServer.h:
3651 2015-06-01 Daniel Bates <dabates@apple.com>
3653 Notify client that we began editing when text field is focused
3654 https://bugs.webkit.org/show_bug.cgi?id=145439
3655 <rdar://problem/21142108>
3657 Reviewed by Anders Carlsson.
3659 Inform the editor client that we began editing when a text field is focused either
3660 by being explicitly focused (programmatically or by user interaction) or implicitly
3661 focused when the window became active.
3663 Currently we only notify the editor client that we began editing a text field when
3664 when a person actually changes the value of the field. And we always notify the
3665 client that we ended editing when a text field is defocused regardless of whether
3666 we executed a began editing callback. Moreover we notify a client that we
3667 ended editing when the field is defocused (either explicitly or implicitly when the
3668 window becomes inactive). Instead we should always notify the client that we began
3669 editing when the field is focused so that this callback is symmetric with the end
3672 * html/SearchInputType.cpp:
3673 (WebCore::SearchInputType::didSetValueByUserEdit): Remove parameter for ValueChangeState,
3674 which was used to determine whether we should notify the client that we began editing, because
3675 we we will notify the client that editing began when the text field is focused as opposed to
3676 when the value of text field first changes.
3677 * html/SearchInputType.h: Ditto.
3678 * html/TextFieldInputType.cpp:
3679 (WebCore::TextFieldInputType::forwardEvent): Notify the client that we began editing when
3680 the text field is focused.
3681 (WebCore::TextFieldInputType::subtreeHasChanged): Update call site of didSetValueByUserEdit()
3682 following the removal of its parameter.
3683 (WebCore::TextFieldInputType::didSetValueByUserEdit): Ditto.
3684 * html/TextFieldInputType.h:
3686 2015-06-01 Anders Carlsson <andersca@apple.com>
3688 WAKScrollView.h cannot be imported standalone
3689 https://bugs.webkit.org/show_bug.cgi?id=145529
3691 Reviewed by Dan Bernstein.
3693 * page/mac/WebCoreFrameView.h:
3694 Remove the __cplusplus #ifdefs since WebCoreFrameView.h is only used by Objective-C++ code.
3695 (The different non-C++ method declarations were wrong anyway!)
3697 * platform/ScrollTypes.h:
3698 Remove the #ifdef __cplusplus surrounding the code, add header includes to make the file self-contained,
3699 and reformat the enum definitions.
3701 2015-06-01 Alex Christensen <achristensen@webkit.org>
3703 [Content Extensions] resource-type and load-type should be independent.
3704 https://bugs.webkit.org/show_bug.cgi?id=145528
3705 rdar://problem/21190765
3707 Reviewed by Benjamin Poulain.
3709 Covered by existing tests and a new API test.
3711 Right now we use the same uint16_t to store all the load-type and resource-type flags,
3712 then we just do a bitwise and to check both at the same time. This results in a trigger
3713 with load-type and resource-type firing if either condition is met, not both conditions.
3714 A trigger with both resource-type and load-type conditions should only fire if both conditions are met.
3716 * contentextensions/DFABytecodeInterpreter.cpp:
3717 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
3718 Check and correctly handle rules with both resource-type and load-type flags.
3719 * loader/ResourceLoadInfo.h:
3720 Add masks to separate flags from resource-type and load-type.
3722 2015-06-01 Alex Christensen <achristensen@webkit.org>
3724 [Content Extensions] Reduce DFA memory usage.
3725 https://bugs.webkit.org/show_bug.cgi?id=145526
3727 Reviewed by Benjamin Poulain.
3729 * contentextensions/DFA.cpp:
3730 (WebCore::ContentExtensions::DFA::memoryUsed):
3731 (WebCore::ContentExtensions::DFANode::transitions):
3732 (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination):
3733 (WebCore::ContentExtensions::DFANode::changeFallbackTransition):
3734 (WebCore::ContentExtensions::DFANode::addFallbackTransition):
3735 (WebCore::ContentExtensions::DFANode::containsTransition):
3736 (WebCore::ContentExtensions::DFANode::kill):
3737 * contentextensions/DFA.h:
3738 * contentextensions/DFAMinimizer.cpp:
3739 (WebCore::ContentExtensions::DFAMinimizer::minimize):
3740 * contentextensions/NFAToDFA.cpp:
3741 (WebCore::ContentExtensions::NFAToDFA::convert):
3742 Use separate Vectors for the transition characters and destinations to avoid wasting memory to padding a std::pair.
3744 2015-06-01 Matt Rajca <mrajca@apple.com>
3746 Implemented the `eventTargetInterface` and `scriptExecutionContext` methods required by EventTarget, as well as
3747 some required infrastructure.
3748 https://bugs.webkit.org/show_bug.cgi?id=145523
3750 Reviewed by Eric Carlson.
3752 * Modules/mediasession/MediaRemoteControls.cpp:
3753 (WebCore::MediaRemoteControls::MediaRemoteControls): Initialize all instance variables.
3754 * Modules/mediasession/MediaRemoteControls.h: MediaRemoteControl's constructor now takes a script execution
3755 context, which we provide to EventTarget. The required eventTargetInterface method has also been implemented.
3756 (WebCore::MediaRemoteControls::create):
3757 * Modules/mediasession/MediaRemoteControls.idl: Indicate MediaRemoteControls now takes a constructor that is
3758 passed in a script execution context. To prevent build errors, event handlers have been removed until they are
3760 * WebCore.xcodeproj/project.pbxproj: We should be building the derived JSMediaRemoteControls class with WebCore.
3761 * dom/EventTargetFactory.in: Ensure a MediaRemoteControlsEventTargetInterfaceType is generated.
3763 2015-06-01 Benjamin Poulain <bpoulain@apple.com>
3765 [CSS JIT] Fail to compile when we are out of executable memory
3766 https://bugs.webkit.org/show_bug.cgi?id=145483
3767 rdar://problem/21166612
3769 Reviewed by Andreas Kling.
3771 We should use a soft failure when the Linker fails to allocate
3772 executable memory for the CSS JIT. We will just fallback to slow
3773 code when that happen, better slow CSS than crashing.
3775 Credit to Chris for finding this problem.
3777 * cssjit/SelectorCompiler.cpp:
3778 (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
3780 2015-06-01 Chris Dumez <cdumez@apple.com>
3782 ASSERT(revalidatingResource.inCache()) in MemoryCache when reloading tumblr.com
3783 https://bugs.webkit.org/show_bug.cgi?id=145518
3784 <rdar://problem/21168573>
3786 Reviewed by Darin Adler.
3788 There was an assertion in MemoryCache::revalidationSucceeded() making
3789 sure that the resource that was revalidated is still in the memory
3790 cache. However, nothing prevents this resource from being pruned while
3791 it is being revalidated. We do make sure that the resource in question
3792 cannot be destroyed though (see CachedResource::canDelete()).
3794 This patch gets rid of this assertion as it is incorrect. Also, the
3795 fact that the resource is no longer in the memory cache is not an
3796 issue. We are merely going to call MemoryCache::remove() to remove
3797 it from the memory cache before re-adding it and updating its
3798 HTTP response. The call to MemoryCache::remove() will simply be a
3799 no-op in this case and we will not have any problem adding the
3800 resource back to the memory cache because the resource is kept alive.
3802 Test: http/tests/cache/memory-cache-pruning-during-revalidation.html
3804 * loader/cache/MemoryCache.cpp:
3805 (WebCore::MemoryCache::revalidationSucceeded): Deleted.
3807 2015-06-01 Matt Rajca <mrajca@apple.com>
3809 Add stub implementation of MediaRemoteControls, part of the Media Session spec.
3810 https://bugs.webkit.org/show_bug.cgi?id=145462
3812 Reviewed by Eric Carlson.
3814 * CMakeLists.txt: Added IDL file as well as the corresponding implementation file.
3815 * DerivedSources.make: Included the new IDL file.
3816 * Modules/mediasession/MediaRemoteControls.cpp: Added an empty implementation file.
3817 (MediaRemoteControls::~MediaRemoteControls):
3818 * Modules/mediasession/MediaRemoteControls.h: Added a stubbed header file with accessors for the four attributes declared in the IDL file.
3819 (WebCore::MediaRemoteControls::previousTrackEnabled):
3820 (WebCore::MediaRemoteControls::setPreviousTrackEnabled):
3821 (WebCore::MediaRemoteControls::nextTrackEnabled):
3822 (WebCore::MediaRemoteControls::setNextTrackEnabled):
3823 (WebCore::MediaRemoteControls::seekForwardEnabled):
3824 (WebCore::MediaRemoteControls::setSeekForwardEnabled):
3825 (WebCore::MediaRemoteControls::seekBackwardEnabled):
3826 (WebCore::MediaRemoteControls::setSeekBackwardEnabled):
3827 * Modules/mediasession/MediaRemoteControls.idl: Added from the Media Session spec.
3828 * WebCore.xcodeproj/project.pbxproj: Included the new IDL file and MediaRemoteControls.cpp/.h sources.
3830 2015-06-01 Sergio Villar Senin <svillar@igalia.com>
3832 [CSS Grid Layout] Simplify the interface of GridResolvedPosition
3833 https://bugs.webkit.org/show_bug.cgi?id=139077
3835 Reviewed by Darin Adler.
3837 The interface of GridResolvedPosition is full of static methods
3838 that are used only internally, we should not expose them.
3840 Apart from that resolveGridPositionsFromStyle() do always return
3841 a valid GridSpan from now on meaning that the caller has to ensure
3842 that the resolution does not require running the auto-placement
3843 algorithm. A new class called GridUnresolvedSpan was added for
3846 No new tests as this is a refactoring.
3848 * rendering/RenderGrid.cpp:
3849 (WebCore::RenderGrid::placeItemsOnGrid):
3850 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
3851 (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
3852 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
3853 * rendering/style/GridPosition.h:
3854 * rendering/style/GridResolvedPosition.cpp:
3855 (WebCore::gridLinesForSide):
3856 (WebCore::implicitNamedGridLineForSide):
3857 (WebCore::isNonExistentNamedLineOrArea):
3858 (WebCore::GridUnresolvedSpan::requiresAutoPlacement):
3859 (WebCore::GridUnresolvedSpan::adjustGridPositionsFromStyle):
3860 (WebCore::adjustGridPositionForRowEndColumnEndSide):
3861 (WebCore::adjustGridPositionForSide):
3862 (WebCore::resolveNamedGridLinePositionFromStyle):
3863 (WebCore::firstNamedGridLineBeforePosition):
3864 (WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
3865 (WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
3866 (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
3867 (WebCore::resolveGridPositionAgainstOppositePosition):
3868 (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
3869 (WebCore::resolveGridPositionFromStyle):
3870 (WebCore::GridResolvedPosition::GridResolvedPosition):
3871 (WebCore::GridResolvedPosition::unresolvedSpanFromStyle):
3872 (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
3873 (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Deleted.
3874 (WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle): Deleted.
3875 (WebCore::GridResolvedPosition::resolveGridPositionFromStyle): Deleted.
3876 (WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition): Deleted.
3877 (WebCore::GridResolvedPosition::resolveNamedGridLinePositionAgainstOppositePosition): Deleted.
3878 (WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Deleted.
3879 (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Deleted.
3880 * rendering/style/GridResolvedPosition.h:
3881 (WebCore::GridUnresolvedSpan::GridUnresolvedSpan): New class.
3882 (WebCore::GridUnresolvedSpan::initialPosition):
3883 (WebCore::GridUnresolvedSpan::finalPosition):
3884 (WebCore::GridUnresolvedSpan::initialPositionSide):
3885 (WebCore::GridUnresolvedSpan::finalPositionSide):
3886 (WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide): Deleted.
3887 (WebCore::GridResolvedPosition::adjustGridPositionForSide): Deleted.
3888 (WebCore::GridResolvedPosition::GridResolvedPosition): Deleted.
3890 2015-06-01 Csaba Osztrogonác <ossy@webkit.org>
3892 Fix the !ENABLE(VIDEO_TRACK) build after r184799
3893 https://bugs.webkit.org/show_bug.cgi?id=145510
3895 Reviewed by Eric Carlson.
3897 * testing/Internals.cpp:
3898 (WebCore::Internals::userPreferredAudioCharacteristics):
3899 (WebCore::Internals::setUserPreferredAudioCharacteristic):
3901 2015-06-01 Csaba Osztrogonác <ossy@webkit.org>
3903 Fix logical-not-parentheses warning in CachedScript.cpp
3904 https://bugs.webkit.org/show_bug.cgi?id=145254
3906 Reviewed by Sam Weinig.
3908 * loader/cache/CachedScript.cpp:
3909 (WebCore::CachedScript::mimeTypeAllowedByNosniff): "!X==Y" should be "X!=Y" here.
3911 2015-05-31 Dan Bernstein <mitz@apple.com>
3913 Remove Panther support
3914 https://bugs.webkit.org/show_bug.cgi?id=145506
3916 Reviewed by Sam Weinig.
3918 * platform/ios/wak/WAKAppKitStubs.h: Don't check for pre-Tiger SDKs.
3920 2015-05-31 Carlos Alberto Lopez Perez <clopez@igalia.com>
3922 Remove unused variable kZoomTicks.
3923 https://bugs.webkit.org/show_bug.cgi?id=145504
3925 Reviewed by Sam Weinig.
3927 No new tests, no behavior changes.
3929 * platform/ScrollAnimatorNone.cpp:
3931 2015-05-31 Youenn Fablet <youenn.fablet@crf.canon.fr>
3933 Async XMLHttpRequest should get access to AppCache resources stored as flat files
3934 https://bugs.webkit.org/show_bug.cgi?id=138506
3936 Reviewed by Darin Adler.
3938 This patch reads flat file data when DocumentLoader substituteResource delivery timer is fired.
3939 Refactoring to remove ApplicationCacheHost/DocumentLoader friend link.
3940 Added ResourceLoader::deliverResponseAndData helper function, taking a SharedBuffer as input to remove an unneeded copy for flat files (no change for other files).
3942 Test: http/tests/appcache/simple-video-async.html
3944 * loader/DocumentLoader.cpp:
3945 (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
3946 (WebCore::DocumentLoader::scheduleArchiveLoad):
3947 (WebCore::DocumentLoader::scheduleSubstituteResourceLoad): Helper function to remove ApplicationCacheHost friend link.
3948 * loader/DocumentLoader.h:
3949 * loader/ResourceLoader.cpp:
3950 (WebCore::ResourceLoader::deliverResponseAndData): Helper function, code mostly moved from DocumentLoader::substituteResourceDeliveryTimerFired.
3951 * loader/ResourceLoader.h:
3952 * loader/SubstituteResource.h:
3953 (WebCore::SubstituteResource::deliver): Introduced to be overriden by ApplicationCacheResource to take care of flat file case.
3954 * loader/appcache/ApplicationCacheHost.cpp:
3955 (WebCore::ApplicationCacheHost::maybeLoadResource):
3956 (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
3957 * loader/appcache/ApplicationCacheResource.cpp:
3958 (WebCore::ApplicationCacheResource::deliver): Use SharedBuffer::createWithContentsOfFile to load data stored in flat file.
3959 * loader/appcache/ApplicationCacheResource.h:
3961 2015-05-31 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3963 [Streams API] Implement ReadableStreamController constructor
3964 https://bugs.webkit.org/show_bug.cgi?id=143752
3966 Reviewed by Darin Adler.
3968 Covered by rebased test and expectation.
3970 * Modules/streams/ReadableStreamController.idl: Adding CustomConstructor.
3971 * bindings/js/JSReadableStreamControllerCustom.cpp:
3972 (WebCore::constructJSReadableStreamController): Throws an exception whenever called.
3974 2015-05-30 Brady Eidson <beidson@apple.com>
3976 Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
3977 https://bugs.webkit.org/show_bug.cgi?id=145495
3979 Reviewed by Alexey Proskuryakov.
3981 No new tests (No change in behavior).
3983 In most cases ownership of the Event is not actually being transferred, and these functions are all rarely called anyways.
3985 * html/HTMLLinkElement.cpp:
3986 (WebCore::HTMLLinkElement::handleClick):