REGRESSION(r185091): Crash happens on indexdb tests
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-06-04  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2
3         REGRESSION(r185091): Crash happens on indexdb tests
4         https://bugs.webkit.org/show_bug.cgi?id=145549
5
6         Reviewed by Darin Adler.
7
8         * Modules/indexeddb/IDBDatabaseError.h:
9         (WebCore::IDBDatabaseError::create): Revert Ref usage of IDBDatabaseError::create().
10
11 2015-06-04  Simon Fraser  <simon.fraser@apple.com>
12
13         Crash in EventDispatcher::dispatchEvent entering a location on Google Maps
14         https://bugs.webkit.org/show_bug.cgi?id=145677
15         rdar://problem/20698280
16
17         Reviewed by Dean Jackson.
18
19         If a transition is running on a pseudo-element, and the host element is removed
20         from the DOM just as the transition ends, and there is a transition event listener,
21         then we'd crash with a null dereference in event dispatch code.
22         
23         AnimationController tries to clean up running animations when renderers are destroyed,
24         but omitted to remove the element from two vectors that store element references.
25         Elements are only added to these vectors briefly on animation end, before firing
26         events, but failure to remove the vector entries could result in attempting
27         to fire an event on a pseudo-element with no host element.
28         
29         Also convert EventDispatcher code to be more robust to potentially null event
30         targets, since it's not clear that eventTargetRespectingTargetRules() can always
31         manage to return a non-null node.
32         
33         Hard to make a test because this is timing sensitive.
34
35         * dom/EventDispatcher.cpp:
36         (WebCore::eventTargetRespectingTargetRules):
37         (WebCore::EventDispatcher::dispatchScopedEvent):
38         (WebCore::EventDispatcher::dispatchEvent):
39         (WebCore::EventPath::EventPath):
40         * page/animation/AnimationController.cpp:
41         (WebCore::AnimationControllerPrivate::clear):
42
43 2015-06-04  Hunseop Jeong  <hs85.jeong@samsung.com>
44
45         Replace 0 with nullptr in WebCore/Page.
46         https://bugs.webkit.org/show_bug.cgi?id=145631
47
48         Reviewed by Darin Adler.
49
50         No new tests, no behavior changes.
51
52         * page/AutoscrollController.cpp:
53         (WebCore::AutoscrollController::AutoscrollController):
54         (WebCore::AutoscrollController::stopAutoscrollTimer):
55         * page/ContentSecurityPolicy.cpp:
56         (WebCore::CSPSourceList::parseSource):
57         * page/ContentSecurityPolicy.h:
58         * page/ContextMenuController.cpp:
59         (WebCore::ContextMenuController::clearContextMenu):
60         * page/DOMSelection.cpp:
61         (WebCore::DOMSelection::clearTreeScope):
62         * page/DOMWindow.cpp:
63         (WebCore::DOMWindow::resetDOMWindowProperties):
64         (WebCore::DOMWindow::localStorage):
65         (WebCore::DOMWindow::focus):
66         * page/DOMWindow.h:
67         * page/DOMWindowExtension.cpp:
68         (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
69         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
70         * page/DOMWindowProperty.cpp:
71         (WebCore::DOMWindowProperty::DOMWindowProperty):
72         (WebCore::DOMWindowProperty::~DOMWindowProperty):
73         (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
74         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
75         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
76         * page/DragController.cpp:
77         (WebCore::DragController::dragEnded):
78         (WebCore::DragController::performDragOperation):
79         (WebCore::DragController::tryDocumentDrag):
80         (WebCore::DragController::concludeEditDrag):
81         (WebCore::DragController::startDrag):
82         * page/EventHandler.cpp:
83         (WebCore::EventHandler::EventHandler):
84         (WebCore::EventHandler::resizeLayerDestroyed):
85         (WebCore::EventHandler::freeDataTransfer):
86         (WebCore::EventHandler::dragSourceEndedAt):
87         (WebCore::EventHandler::handleDrag):
88         * page/EventHandler.h:
89         * page/FocusController.cpp:
90         (WebCore::FocusController::advanceFocusInDocumentOrder):
91         * page/Frame.cpp:
92         (WebCore::Frame::~Frame):
93         (WebCore::Frame::searchForLabelsBeforeElement):
94         (WebCore::Frame::willDetachPage):
95         (WebCore::Frame::createView):
96         * page/Frame.h:
97         (WebCore::Frame::detachFromPage):
98         * page/FrameDestructionObserver.cpp:
99         (WebCore::FrameDestructionObserver::FrameDestructionObserver):
100         (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
101         (WebCore::FrameDestructionObserver::frameDestroyed):
102         * page/FrameTree.cpp:
103         (WebCore::FrameTree::~FrameTree):
104         (WebCore::FrameTree::removeChild):
105         * page/FrameTree.h:
106         (WebCore::FrameTree::FrameTree):
107         (WebCore::FrameTree::detachFromParent):
108         * page/History.cpp:
109         (WebCore::History::History):
110         * page/Page.cpp:
111         (WebCore::Page::Page):
112         (WebCore::Page::~Page):
113         (WebCore::Page::findStringMatchingRanges):
114         * page/PageGroup.cpp:
115         * page/Performance.cpp:
116         (WebCore::Performance::Performance):
117         * page/PointerLockController.cpp:
118         (WebCore::PointerLockController::didLosePointerLock):
119         (WebCore::PointerLockController::clearElement):
120         * page/SecurityOrigin.h:
121         (WebCore::SecurityOrigin::canAccessDatabase):
122         * page/Settings.cpp:
123         (WebCore::Settings::Settings):
124         * page/SpatialNavigation.cpp:
125         (WebCore::FocusCandidate::FocusCandidate):
126         * page/SpatialNavigation.h:
127         (WebCore::FocusCandidate::FocusCandidate):
128         * page/scrolling/ScrollingTreeNode.cpp:
129         (WebCore::ScrollingTreeNode::ScrollingTreeNode):
130         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
131         (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
132
133 2015-06-04  Benjamin Poulain  <bpoulain@apple.com>
134
135         Combine tiny DFAs into slightly larger ones
136         https://bugs.webkit.org/show_bug.cgi?id=145572
137
138         Reviewed by Alex Christensen.
139
140         This patch changes the ContentExtensions compiler to combine tiny DFA
141         until they reach a minimum size.
142
143         The main tool introduced here is DFAMerger. It combines 2 DFAs into
144         a single DFA that represent the union of the two machines.
145         That is done by a simple subset construction on the "name" of the nodes
146         in each DFAs.
147
148         Since we only merge 2 machines, and they are both deterministic, we know that
149         we can only be in one state of each machine, or a state in one machine without
150         equivalent in the other machine.
151         We exploit that to identify the mapping between nodes. To identify a node in
152         the new machine from nodes in the original machines, we just concatenate the node
153         IDs into a single 64 bits number. If there is no node in one of the machine, we
154         use a special tag.
155
156         The current algorithm does not have any subgraph pruning, machines grow very very
157         quickly. Because of that, we only merge very small DFAs at the moment.
158
159         Test: http/tests/contentextensions/filters-with-quantifiers-combined.html
160
161         * WebCore.xcodeproj/project.pbxproj:
162         * contentextensions/ContentExtensionCompiler.cpp:
163         (WebCore::ContentExtensions::compileRuleList):
164         * contentextensions/ContentExtensionsDebugging.h:
165         * contentextensions/DFA.cpp:
166         (WebCore::ContentExtensions::DFA::graphSize):
167         (WebCore::ContentExtensions::DFA::debugPrintDot):
168         * contentextensions/DFA.h:
169         * contentextensions/DFACombiner.cpp: Added.
170         (WebCore::ContentExtensions::DFAMerger::DFAMerger):
171         (WebCore::ContentExtensions::DFAMerger::merge):
172         (WebCore::ContentExtensions::DFAMerger::signatureForIndices):
173         (WebCore::ContentExtensions::DFAMerger::extractIndexA):
174         (WebCore::ContentExtensions::DFAMerger::extractIndexB):
175         (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
176         (WebCore::ContentExtensions::DFAMerger::setHalfSignature):
177         (WebCore::ContentExtensions::DFAMerger::populateTransitions):
178         (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions):
179         (WebCore::ContentExtensions::DFAMerger::createTransitions):
180         (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded):
181         (WebCore::ContentExtensions::DFACombiner::combineDFAs):
182         * contentextensions/DFACombiner.h: Copied from Source/WebCore/contentextensions/DFA.h.
183         (WebCore::ContentExtensions::DFACombiner::addDFA):
184
185 2015-06-04  Matt Rajca  <mrajca@apple.com>
186
187         Rename MediaSessionManager to PlatformMediaSessionManager for consistency with PlatformMediaSession.
188         https://bugs.webkit.org/show_bug.cgi?id=145648
189
190         Reviewed by Eric Carlson.
191
192         * WebCore.vcxproj/WebCore.vcxproj:
193         * WebCore.vcxproj/WebCore.vcxproj.filters:
194         * WebCore.xcodeproj/project.pbxproj:
195         * html/HTMLMediaElement.cpp:
196         * html/MediaElementSession.cpp:
197         (WebCore::MediaElementSession::effectivePreloadForElement):
198         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
199         * platform/audio/PlatformMediaSession.cpp:
200         (WebCore::PlatformMediaSession::PlatformMediaSession):
201         (WebCore::PlatformMediaSession::~PlatformMediaSession):
202         (WebCore::PlatformMediaSession::clientWillBeginPlayback):
203         (WebCore::PlatformMediaSession::clientWillPausePlayback):
204         (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
205         (WebCore::PlatformMediaSession::updateClientDataBuffering):
206         * platform/audio/PlatformMediaSessionManager.cpp: Renamed from Source/WebCore/platform/audio/MediaSessionManager.cpp.
207         (WebCore::PlatformMediaSessionManager::sharedManager):
208         (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
209         (WebCore::PlatformMediaSessionManager::resetRestrictions):
210         (WebCore::PlatformMediaSessionManager::has):
211         (WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
212         (WebCore::PlatformMediaSessionManager::count):
213         (WebCore::PlatformMediaSessionManager::beginInterruption):
214         (WebCore::PlatformMediaSessionManager::endInterruption):
215         (WebCore::PlatformMediaSessionManager::addSession):
216         (WebCore::PlatformMediaSessionManager::removeSession):
217         (WebCore::PlatformMediaSessionManager::addRestriction):
218         (WebCore::PlatformMediaSessionManager::removeRestriction):
219         (WebCore::PlatformMediaSessionManager::restrictions):
220         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
221         (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
222         (WebCore::PlatformMediaSessionManager::setCurrentSession):
223         (WebCore::PlatformMediaSessionManager::currentSession):
224         (WebCore::PlatformMediaSessionManager::sessionRestrictsInlineVideoPlayback):
225         (WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):
226         (WebCore::PlatformMediaSessionManager::applicationWillEnterBackground):
227         (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground):
228         (WebCore::PlatformMediaSessionManager::updateSessionState):
229         (WebCore::PlatformMediaSessionManager::didReceiveRemoteControlCommand):
230         (WebCore::PlatformMediaSessionManager::systemWillSleep):
231         (WebCore::PlatformMediaSessionManager::systemDidWake):
232         (WebCore::PlatformMediaSessionManager::audioOutputDeviceChanged):
233         * platform/audio/PlatformMediaSessionManager.h: Renamed from Source/WebCore/platform/audio/MediaSessionManager.h.
234         (WebCore::PlatformMediaSessionManager::~PlatformMediaSessionManager):
235         (WebCore::PlatformMediaSessionManager::configureWireLessTargetMonitoring):
236         (WebCore::PlatformMediaSessionManager::hasWirelessTargetsAvailable):
237         (WebCore::PlatformMediaSessionManager::sessions):
238         * platform/audio/mac/AudioDestinationMac.cpp:
239         * platform/audio/mac/MediaSessionManagerMac.cpp:
240         (PlatformMediaSessionManager::updateSessionState):
241         (MediaSessionManager::updateSessionState): Deleted.
242         * testing/Internals.cpp:
243
244 2015-06-04  Eric Carlson  <eric.carlson@apple.com>
245
246         [Mac] Don't show default controls after playing to wireless target, again
247         https://bugs.webkit.org/show_bug.cgi?id=145620
248         <rdar://problem/21145806>
249
250         Reviewed by Dean Jackson.
251
252         Follow up to fix two tests broken by r185207.
253
254         * Modules/mediacontrols/mediaControlsApple.js:
255         (Controller.prototype.updateControls): Always show controls when the video element
256           is the fullscreen element because custom controls aren't possible.
257
258 2015-06-04  Myles C. Maxfield  <mmaxfield@apple.com>
259
260         [Cocoa] Add ASSERT to FontPlatformData::ctFont()
261         https://bugs.webkit.org/show_bug.cgi?id=145659
262
263         Reviewed by Dean Jackson.
264
265         The new ASSERT needs to be guarded with CORETEXT_WEB_FONTS, which is defined in FontCustomPlatformData.h,
266         and is not accessible to FontPlatformData. Therefore, I've moved the definition into TextFlags.h, which
267         both files include.
268
269         No new tests because there is no behavior change.
270
271         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
272         (WebCore::FontPlatformData::ctFont): Add the ASSERT.
273         * platform/graphics/mac/FontCustomPlatformData.h: Move the CORETEXT_WEB_FONTS preprocessor
274         macro from here ...
275         * platform/text/TextFlags.h: ... to here.
276
277 2015-06-04  Commit Queue  <commit-queue@webkit.org>
278
279         Unreviewed, rolling out r185208.
280         https://bugs.webkit.org/show_bug.cgi?id=145655
281
282         platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-
283         latched-select.html (Requested by shallawa on #webkit).
284
285         Reverted changeset:
286
287         "Latching algorithm in findEnclosingOverflowScroll is broken"
288         https://bugs.webkit.org/show_bug.cgi?id=145642
289         http://trac.webkit.org/changeset/185208
290
291 2015-06-04  Myles C. Maxfield  <mmaxfield@apple.com>
292
293         [Cocoa] Remove unnecessary code from FontPlatformData::ctFont()
294         https://bugs.webkit.org/show_bug.cgi?id=145652
295
296         Hoefler Text Italic no longer has initial and final swashes by default, so there
297         is no reason to explicitly disable them.
298
299         Reviewed by Andreas Kling.
300
301         No new tests because there is no behavior change.
302
303         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
304         (WebCore::FontPlatformData::ctFont):
305         (WebCore::createFeatureSettingDictionary): Deleted.
306         (WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Deleted.
307
308 2015-06-04  Brent Fulgham  <bfulgham@apple.com>
309
310         Latching algorithm in findEnclosingOverflowScroll is broken
311         https://bugs.webkit.org/show_bug.cgi?id=145642
312         <rdar://problem/21242308>
313
314         Reviewed by Simon Fraser.
315
316         Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
317
318         * page/mac/EventHandlerMac.mm:
319         (WebCore::findEnclosingOverflowScrollForDominantDirection): Renamed from
320         'findEnclosingOverflowScroll'. Only identify element as our overflow
321         scroll element if it can be scrolled in either axis of the gesture's
322         motion.
323         (WebCore::scrolledToEdgeInDominantDirection): Renamed.
324         (WebCore::EventHandler::platformPrepareForWheelEvents): Use new function
325         name, and pass horizontal and vertical deltas.
326         (WebCore::findEnclosingOverflowScroll): Deleted.
327
328 2015-06-04  Eric Carlson  <eric.carlson@apple.com>
329
330         [Mac] Don't show default controls after playing to wireless target, again
331         https://bugs.webkit.org/show_bug.cgi?id=145620
332         <rdar://problem/21145806>
333
334         Reviewed by Dean Jackson.
335
336         * Modules/mediacontrols/mediaControlsApple.js:
337         (Controller.prototype.updateControls): Show or hide the panel as appropriate.
338         (Controller.prototype.handleWrapperMouseMove): Early return if !video.controls.
339         (Controller.prototype.addControls): Call updateControls instead of this.setNeedsTimelineMetricsUpdate
340           so all needed setup is done.
341         (Controller.prototype.resetHideControlsTimer): Only start the hide timer if playing.
342
343 2015-06-04  Chris Dumez  <cdumez@apple.com>
344
345         [WK2] Prune more resources from the MemoryCache before process suspension
346         https://bugs.webkit.org/show_bug.cgi?id=145633
347
348         Reviewed by Andreas Kling.
349
350         Prune more resources from the MemoryCache before process suspension or
351         on simulated memory warning by doing a synchronous JS garbage collection
352         and sweep *before* pruning dead resources from the memory cache.
353         Previously, we would do the garbage collection after pruning the
354         MemoryCache which meant that a lot of resources became dead after we
355         tried to prune them.
356
357         At the end a basic browsing on apple.com, we are able to remove ~17%
358         more resources from the MemoryCache on simulated memory warning with this
359         change.
360
361         Pruning as much as we can from the memory cache on critical memory
362         pressure or before process suspension is not only useful to free up
363         memory but also to make room in the vnode table as a lot of
364         CachedResources are mmmap'd from the network disk cache.
365
366         * platform/MemoryPressureHandler.cpp:
367         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
368         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
369
370         - Pass 'synchronous' argument so that we know if we need to do a
371           synchronous JS garbage collection.
372         - Move here code from in the Cocoa handler that is doing a JS garbage
373           collection as well as a sweep, and make this code cross-platform.
374           This code used to be iOS specific but I see no reason we shouldn't
375           do this on Mac.
376
377         (WebCore::MemoryPressureHandler::releaseMemory):
378         * platform/MemoryPressureHandler.h:
379
380         Use enum class arguments for critical / synchronous. The 'synchronous'
381         argument is new so that the call site can let us know if memory needs
382         to be freed synchronously (e.g. in case of imminent process suspension).
383
384         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
385         (WebCore::MemoryPressureHandler::platformReleaseMemory):
386
387         Remove iOS-specific code that was doing a JS garbage collection and
388         sweep as this code is now in the generic memory pressure handler.
389
390         (WebCore::MemoryPressureHandler::install):
391
392         On simulated memory pressure, set 'synchronous' argument to Yes so that
393         a synchronous GC is done by the generic memory pressure handler. This
394         way, we no longer need to do a sync GC after calling the memory pressure
395         handler. This avoids code duplication and makes sure the GC is done
396         before pruning the memory cache.
397
398
399 2015-06-04  Myles C. Maxfield  <mmaxfield@apple.com>
400
401         [Cocoa] Clean up m_isEmoji in FontPlatformData
402         https://bugs.webkit.org/show_bug.cgi?id=145644
403
404         Reviewed by Andreas Kling.
405
406         m_isEmoji used to be a public member variable only defined on iOS. This
407         means that, whenever it was consulted, the sites were surrounded by
408         PLATFORM(IOS) guards. A cleaner design is to use a getter and setter,
409         which on non-iOS platforms, always return false / do nothing. Then, the
410         use sites can just use these functions without having ugly guards.
411
412         No new tests because there is no behavior change.
413
414         * platform/graphics/FontPlatformData.h:
415         (WebCore::FontPlatformData::hash): Simplify isEmoji use site.
416         (WebCore::FontPlatformData::isEmoji): Getter. Returns false on Mac.
417         (WebCore::FontPlatformData::setIsEmoji): Setter. Does nothing on Mac.
418         * platform/graphics/cocoa/FontCascadeCocoa.mm:
419         (WebCore::pointAdjustedForEmoji): Simplify isEmoji use site.
420         (WebCore::FontCascade::drawGlyphs): Ditto.
421         * platform/graphics/cocoa/FontCocoa.mm:
422         (WebCore::Font::platformInit): Ditto.
423         (WebCore::canUseFastGlyphAdvanceGetter): Ditto.
424         (WebCore::isEmoji): Deleted.
425         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
426         (WebCore::FontPlatformData::platformDataInit): Simplify isEmoji use
427         site.
428         (WebCore::FontPlatformData::platformDataAssign): Ditto.
429         (WebCore::FontPlatformData::platformIsEqual): Ditto.
430         (WebCore::FontPlatformData::ctFontSize): Ditto.
431         * platform/graphics/ios/FontCacheIOS.mm:
432         (WebCore::FontCache::getSystemFontFallbackForCharacters): Ditto.
433         (WebCore::FontCache::createFontPlatformData): Ditto.
434         * platform/graphics/mac/ComplexTextController.cpp:
435         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.
436
437 2015-06-03  Brent Fulgham  <bfulgham@apple.com>
438
439         REGRESSION (r181879): Scrolling order on pages with focused iframe is broken.
440         https://bugs.webkit.org/show_bug.cgi?id=145637
441         <rdar://problem/20635581>
442
443         Reviewed by Zalan Bujtas.
444
445         Test: platform/mac-wk2/tiled-drawing/scrolling/iframe_in_iframe.html
446
447         This page revealed a bug in our RenderBox code caused by the mismatch between
448         our scrolling units, which are all integrally snapped, with our client height
449         and widths, which are not snapped at all. 
450         
451         In certain cases, the client height would have a small subpixel difference compared
452         to the scroll height, which would cause WebKit to believe it was scrollable. When
453         this happened, it would get stuck latched to this element and block scrolling events. 
454
455         * page/Frame.cpp:
456         (WebCore::Frame::scrollOverflowLayer): Use roundToInt for clientWidth and clientHeight,
457         rather than integer truncation.
458         * rendering/RenderBox.cpp:
459         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea): Need to round clientWidth
460         and clientHeight to compare with scrollWidth/scrollHeight.
461         * rendering/RenderBox.h:
462         (WebCore::RenderBox::hasScrollableOverflowX): Ditto.
463         (WebCore::RenderBox::hasScrollableOverflowY): Ditto.
464         * rendering/RenderMarquee.cpp:
465         (WebCore::RenderMarquee::computePosition): Use roundToInt for clientWidth and
466         clientHeight, rather than integer truncation.
467
468 2015-06-04  Myles C. Maxfield  <mmaxfield@apple.com>
469
470         [Cocoa] Clean up m_font inside FontPlatformData
471         https://bugs.webkit.org/show_bug.cgi?id=145634
472
473         Reviewed by Andreas Kling.
474
475         FontPlatformDatas are used as keys in a HashMap. This means that they need
476         to be able to represent a "deleted" value. Previously, this "deleted" value
477         was represented as setting the pointer value of m_font to -1, and guarding
478         all uses of m_font to make sure it wasn't -1 before dereferencing it.
479
480         This patch simplifies FontPlatformData to represent a "deleted" value using
481         a separate boolean member variable. This class is already big enough that
482         the increased space is negligable (the class already contains two CoreText
483         fonts in addition to a CoreGraphics font). Because of this simplification,
484         m_font can now be a RetainPtr, instead of being manually retained and
485         released.
486
487         There is still a long way to go before FontPlatformData is acceptably
488         clean and understandable. This patch improves one aspect of it, and more
489         improvements will eventually follow.
490
491         No new tests because there is no behavior change.
492
493         * platform/graphics/FontCache.cpp: Remove unused variable.
494         * platform/graphics/FontPlatformData.cpp:
495         (WebCore::FontPlatformData::FontPlatformData): Clean up all the PLATFORM
496         macros in favor of a single bool. Also, update to include new state.
497         (WebCore::FontPlatformData::operator=): Update to include new state.
498         * platform/graphics/FontPlatformData.h:
499         (WebCore::FontPlatformData::font): Update to account for RetainPtr.
500         (WebCore::FontPlatformData::nsFont): Ditto.
501         (WebCore::FontPlatformData::setNSFont): Ditto.
502         (WebCore::FontPlatformData::hash): Update to include new state.
503         (WebCore::FontPlatformData::operator==): Ditto.
504         (WebCore::FontPlatformData::isHashTableDeletedValue): Use new state.
505         (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
506         (WebCore::FontPlatformData::isValidCTFontRef): Deleted.
507         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
508         (WebCore::FontPlatformData::platformDataInit): No need for manual retain
509         and release.
510         (WebCore::FontPlatformData::platformDataAssign): Ditto.
511         (WebCore::FontPlatformData::platformIsEqual): Update to account for
512         RetanPtr.
513         (WebCore::FontPlatformData::setFont): No need for manual retain and
514         release.
515         (WebCore::FontPlatformData::FontPlatformData): Deleted.
516         (WebCore::FontPlatformData::~FontPlatformData): Deleted.
517         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
518         (WebCore::FontPlatformData::~FontPlatformData): m_scaledFont is always
519         valid.
520         (WebCore::FontPlatformData::platformDataAssign): Ditto.
521
522 2015-06-03  Carlos Alberto Lopez Perez  <clopez@igalia.com>
523
524         [GTK] [Wayland] Build is broken on trunk
525         https://bugs.webkit.org/show_bug.cgi?id=142879
526
527         Reviewed by Carlos Garcia Campos.
528
529         No new tests, no behavior changes.
530
531         Patch on GLContext.h picked from bug 136831 by
532         Iago Toral <itoral@igalia.com> and Zan Dobersek <zdobersek@igalia.com>
533
534         * platform/graphics/GLContext.h: Include wayland-egl.h before eglplatform.h
535         to use the Wayland platform when building for Wayland.
536         * platform/graphics/PlatformDisplay.cpp: Fix the include of GDK
537         headers for the different targets.
538         * platform/graphics/wayland/WaylandSurface.cpp: Fix build after r183731.
539         (WebCore::WaylandSurface::~WaylandSurface):
540
541 2015-06-04  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
542
543         [Streams API] Implement ReadableStreamController enqueue
544         https://bugs.webkit.org/show_bug.cgi?id=145210
545
546         Reviewed by Darin Adler.
547
548         Added possibility to enqueue any JSValue within ReadableJSStream.
549         They are stored in a Vector of strongified JSValue.
550
551         Added support for streams that contain data but are asked to close.
552         This is done through m_closeRequested boolean and splitting actual closing of the stream from changeStateToClosed().
553
554         Chunk size and backpressure mechanism is not yet implemented.
555         Neither is pulling once enqueued data is processed.
556
557         Covered by rebased tests.
558
559         * Modules/streams/ReadableStream.cpp:
560         (WebCore::ReadableStream::changeStateToClosed): Split method with newly added close().
561         (WebCore::ReadableStream::close): Does the actual closing of stream once stream has no more values.
562         (WebCore::ReadableStream::read): Close the stream when stream is emptied and close is requested.
563         (WebCore::ReadableStream::resolveReadCallback): Added to enable ReadableJSStream to resolve read callbacks immediatly at enqueue time.
564         * Modules/streams/ReadableStream.h:
565         (WebCore::ReadableStream::isErrored): Getter added for the custom binding code.
566         (WebCore::ReadableStream::isCloseRequested): Ditto.
567         * bindings/js/JSReadableStreamControllerCustom.cpp:
568         (WebCore::JSReadableStreamController::enqueue): binding code for enqueue, taking care of raising exception if readable stream cannot enqueue.
569         * bindings/js/ReadableJSStream.cpp:
570         (WebCore::ReadableJSStream::hasValue):
571         (WebCore::ReadableJSStream::read):
572         (WebCore::ReadableJSStream::enqueue):
573         * bindings/js/ReadableJSStream.h:
574
575 2015-06-04  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
576
577         [Streams API] ReadableJSStream does not need a ReadableStreamSource
578         https://bugs.webkit.org/show_bug.cgi?id=145601
579
580         Reviewed by Darin Adler.
581
582         Covered by existing tests.
583
584         * Modules/streams/ReadableStream.cpp:
585         (WebCore::ReadableStream::ReadableStream): Remoed m_source.
586         * Modules/streams/ReadableStream.h: Ditto
587         * Modules/streams/ReadableStreamSource.h: Deleted.
588         * WebCore.vcxproj/WebCore.vcxproj: Removing Modules/streams/ReadableStreamSource.h.
589         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
590         * WebCore.xcodeproj/project.pbxproj: Ditto.
591         * bindings/js/ReadableJSStream.cpp:
592         (WebCore::ReadableJSStream::globalObject):
593         (WebCore::ReadableJSStream::doStart): Equivalent of ReadableJSStream::Source::start().
594         (WebCore::ReadableJSStream::create): Updated according new constructor.
595         (WebCore::ReadableJSStream::ReadableJSStream):
596         (WebCore::startReadableStreamAsync): Deleted.
597         (WebCore::ReadableJSStream::jsController): Deleted.
598         (WebCore::ReadableJSStream::storeError): Deleted.
599         * bindings/js/ReadableJSStream.h: Added m_source member to store the JS source as a JS object.
600
601 2015-06-04  Zan Dobersek  <zdobersek@igalia.com>
602
603         Shrink the ArabicCharShapingMode enum in SVGGlyph.cpp
604         https://bugs.webkit.org/show_bug.cgi?id=145564
605
606         Reviewed by Darin Adler.
607
608         Shrink the ArabicCharShapingMode enum to just one byte.
609         This drops the size of the static s_arabicCharShapingMode
610         array of  ArabicCharShapingMode values from 888 bytes to 222.
611
612         * platform/graphics/SVGGlyph.cpp:
613         (WebCore::processArabicFormDetection):
614
615 2015-06-03  Zalan Bujtas  <zalan@apple.com>
616
617         Use borderBoxRect instead of contentBoxRect for backdrop filter.
618         https://bugs.webkit.org/show_bug.cgi?id=145606
619
620         Reviewed by Simon Fraser.
621
622         Backdrop filter should use border box rect. It also needs to take css clip into account.
623
624         Tests: css3/filters/backdrop/backdrop-filter-with-cliprect.html
625                css3/filters/backdrop/backdrop-filter-with-mask.html
626
627         * rendering/RenderLayerBacking.cpp:
628         (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
629
630 2015-06-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
631
632         MediaDevices.getUserMedia should put promises in resolve/reject state synchronously
633         https://bugs.webkit.org/show_bug.cgi?id=145308
634
635         Reviewed by Darin Adler.
636
637         Removed the calls to callToMainThread in which were resolved and rejected promises.
638         Cleaned up the code to remove unneeded callback copies.
639
640         Covered by existing tests.
641
642         * Modules/mediastream/UserMediaRequest.cpp:
643         (WebCore::UserMediaRequest::create):
644         (WebCore::UserMediaRequest::UserMediaRequest):
645         (WebCore::UserMediaRequest::didCreateStream):
646         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
647         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
648         * Modules/mediastream/UserMediaRequest.h:
649
650 2015-06-03  Simon Fraser  <simon.fraser@apple.com>
651
652         REGRESSION (r184968): missing media player buttons (control bar exists, but no buttons)
653         https://bugs.webkit.org/show_bug.cgi?id=145630
654
655         Reviewed by Zalan Bujtas.
656
657         r184968 changed the initial value of m_intersectsCoverageRect to false. However,
658         this triggered a bug with mask layers, whose value of m_intersectsCoverageRect was never
659         updated.
660
661         Fix by copying the value of m_intersectsCoverageRect from the main layer to its
662         mask layer, just as we do for m_visibleRect and m_coverageRect.
663
664         Test: compositing/visible-rect/mask-layer-coverage.html
665
666         * platform/graphics/ca/GraphicsLayerCA.cpp:
667         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
668
669 2015-06-03  Simon Fraser  <simon.fraser@apple.com>
670
671         Layer tree dumps should include mask layers
672         https://bugs.webkit.org/show_bug.cgi?id=145629
673
674         Reviewed by Zalan Bujtas.
675
676         Dumping the layer tree omitted to dump the mask layer, so fix 
677         GraphicsLayer::dumpProperties() to dump this layer.
678
679         * platform/graphics/GraphicsLayer.cpp:
680         (WebCore::GraphicsLayer::dumpProperties):
681
682 2015-06-03  Greg Hughes  <ghughes@apple.com>
683
684         AX: Expose field sets to accessibility clients
685         https://bugs.webkit.org/show_bug.cgi?id=145585
686    
687         Expose fieldsets to the accessibility API via a subrole of AXFieldset.
688
689         Reviewed by Chris Fleizach.
690
691         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
692         (-[WebAccessibilityObjectWrapper subrole]):
693
694 2015-06-03  Myles C. Maxfield  <mmaxfield@apple.com>
695
696         Remove dead code FontPlatformData::roundsGlyphAdvances()
697         https://bugs.webkit.org/show_bug.cgi?id=145628
698
699         Reviewed by Simon Fraser.
700
701         No new tests because there is no behavior change.
702
703         * WebCore.order:
704         * platform/graphics/FontPlatformData.h:
705         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
706         (WebCore::FontPlatformData::roundsGlyphAdvances): Deleted.
707
708 2015-06-03  Ryuan Choi  <ryuan.choi@navercorp.com>
709
710         [CoordinatedGraphics] Merge CoordinatedTile into Tile
711         https://bugs.webkit.org/show_bug.cgi?id=145602
712
713         Reviewed by Darin Adler.
714
715         CoordinatedTile only implements Tile since Qt and WebKit1/Efl were dropped.
716         So, there is no reason that CoordinatedTile inherits Tile interface.
717
718         No new tests, no behavior changes.
719
720         * PlatformEfl.cmake:
721         * PlatformGTK.cmake:
722         * WebCore.vcxproj/WebCore.vcxproj:
723         * WebCore.vcxproj/WebCore.vcxproj.filters:
724         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
725         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
726         * platform/graphics/texmap/coordinated/CoordinatedTile.cpp: Renamed to Tile.cpp
727         * platform/graphics/texmap/coordinated/CoordinatedTile.h: Merged into Tile.h
728         (WebCore::CoordinatedTile::coordinate): Deleted.
729         (WebCore::CoordinatedTile::rect): Deleted.
730         * platform/graphics/texmap/coordinated/Tile.cpp: Renamed from CoordinatedTile.cpp.
731         * platform/graphics/texmap/coordinated/Tile.h:
732         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
733         (WebCore::TiledBackingStore::createTiles):
734
735 2015-06-03  Matt Rajca  <mrajca@apple.com>
736
737         Add basic Media Session support to HTMLMediaElement.
738         https://bugs.webkit.org/show_bug.cgi?id=145581
739
740         Reviewed by Eric Carlson.
741
742         HTMLMediaElements now have:
743
744         - a 'kind' attribute representing the intrinsic media category
745         - a 'session' attribute representing the current media session, if any
746
747         * CMakeLists.txt: Include the new HTMLMediaElementMediaSession sources.
748         * DerivedSources.make: Include the new IDL file.
749         * Modules/mediasession/HTMLMediaElementMediaSession.cpp: Added.
750         (WebCore::HTMLMediaElementMediaSession::session):
751         * Modules/mediasession/HTMLMediaElementMediaSession.h: Added basic translation of the IDL file.
752         (WebCore::HTMLMediaElementMediaSession::kind):
753         (WebCore::HTMLMediaElementMediaSession::setKind):
754         (WebCore::HTMLMediaElementMediaSession::setSession):
755         * Modules/mediasession/HTMLMediaElementMediaSession.idl: Added from the Media Session spec.
756         * PlatformMac.cmake: Include DOMHTMLMediaElementMediaSession.cpp.
757         * WebCore.xcodeproj/project.pbxproj: Include the new HTMLMediaElementMediaSession sources.
758         * html/HTMLMediaElement.h: Added accessors for 'kind' and 'session'.
759         (WebCore::HTMLMediaElement::kind):
760         (WebCore::HTMLMediaElement::setKind):
761         (WebCore::HTMLMediaElement::session):
762         (WebCore::HTMLMediaElement::setSession):
763
764 2015-06-03  Myles C. Maxfield  <mmaxfield@apple.com>
765
766         Cleanup after r185175.
767         https://bugs.webkit.org/show_bug.cgi?id=145569
768         <rdar://problem/20671711>
769
770         Unreviewed.
771
772         No new tests because there is no behavior change.
773
774         * platform/graphics/WidthIterator.h:
775
776 2015-06-02  Myles C. Maxfield  <mmaxfield@apple.com>
777
778         SoftBank Emoji are not transformed by shaping when in a run of their own
779         https://bugs.webkit.org/show_bug.cgi?id=145569
780         <rdar://problem/20671711>
781
782         Reviewed by Dean Jackson.
783
784         Normally, we don't perform shaping on single glyphs. However, these particular codepoints
785         need to have shaping run on them, even if they are alone.
786
787         Test: fast/text/softbank-emoji.html Note that this test may fail in different locales on
788         different platforms. This patch disables the test on iOS.
789
790         * Source/WebCore/platform/graphics/WidthIterator.cpp:
791         (WebCore::applyFontTransforms): Move the length-of-1 check into shouldApplyFontTransforms()
792         (WebCore::shouldApplyFontTransforms): Return true if we have one of these emoji characters in
793         a run of its own
794         (WebCore::advanceInternal): Keep track of the previous character, and use it to call
795         shouldApplyFontTransforms. 
796         * Source/WebCore/platform/graphics/WidthIterator.h: shouldApplyFontTransforms() needs
797         some more information to perform its duties.
798
799 2015-06-03  Daniel Bates  <dabates@apple.com>
800
801         Caps lock indicator should not be shown in read-only or disabled field
802         https://bugs.webkit.org/show_bug.cgi?id=145612
803         <rdar://problem/21227454>
804
805         Reviewed by Darin Adler.
806
807         * html/TextFieldInputType.cpp:
808         (WebCore::TextFieldInputType::disabledAttributeChanged): Update caps lock indicator state.
809         (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
810         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator): Do not draw the caps lock indicator
811         when the field is read-only or disabled.
812
813 2015-06-03  Dean Jackson  <dino@apple.com>
814
815         Crash in GraphicsContext3D::getInternalFramebufferSize
816         https://bugs.webkit.org/show_bug.cgi?id=145479
817         <rdar://problem/16461048>
818
819         Reviewed by Eric Carlson.
820
821         If we are in an unitialized or lost state, don't try to access the context.
822
823         In order to test this, I added an Internal setting that always
824         forces WebGL into a pending state.
825
826         Test: fast/canvas/webgl/useWhilePending.html
827
828         * html/canvas/WebGLRenderingContextBase.cpp:
829         (WebCore::WebGLRenderingContextBase::create): Check internal settings for
830         a forced pending state.
831         (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
832         (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
833         * page/Settings.cpp: New Internal setting for forcing a pending policy.
834         (WebCore::Settings::Settings):
835         (WebCore::Settings::setForcePendingWebGLPolicy):
836         * page/Settings.h:
837         (WebCore::Settings::isForcePendingWebGLPolicy):
838         * testing/InternalSettings.cpp:
839         (WebCore::InternalSettings::Backup::Backup):
840         (WebCore::InternalSettings::Backup::restoreTo):
841         (WebCore::InternalSettings::setForcePendingWebGLPolicy):
842         * testing/InternalSettings.h:
843         * testing/InternalSettings.idl:
844
845 2015-06-03  Hunseop Jeong  <hs85.jeong@samsung.com>
846
847         Use modern for-loops in WebCore/page.
848         https://bugs.webkit.org/show_bug.cgi?id=145455
849
850         Reviewed by Darin Adler.
851
852         No new tests, no behavior changes.
853
854         * page/Chrome.cpp:
855         (WebCore::Chrome::notifyPopupOpeningObservers):
856         * page/ContentSecurityPolicy.cpp:
857         (WebCore::CSPSourceList::matches):
858         (WebCore::CSPDirectiveList::gatherReportURIs):
859         (WebCore::ContentSecurityPolicy::copyStateFrom):
860         (WebCore::isAllowedByAll):
861         (WebCore::isAllowedByAllWithState):
862         (WebCore::isAllowedByAllWithContext):
863         (WebCore::isAllowedByAllWithURL):
864         (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
865         (WebCore::ContentSecurityPolicy::allowPluginType):
866         (WebCore::ContentSecurityPolicy::reflectedXSSDisposition):
867         (WebCore::ContentSecurityPolicy::gatherReportURIs):
868         * page/ContextMenuController.cpp:
869         (WebCore::ContextMenuController::populate):
870         * page/DOMWindow.cpp:
871         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
872         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
873         (WebCore::DOMWindow::willDestroyCachedFrame):
874         (WebCore::DOMWindow::willDestroyDocumentInFrame):
875         (WebCore::DOMWindow::willDetachDocumentFromFrame):
876         (WebCore::DOMWindow::disconnectDOMWindowProperties):
877         (WebCore::DOMWindow::reconnectDOMWindowProperties):
878         (WebCore::DOMWindow::getMatchedCSSRules):
879         * page/DeviceController.cpp:
880         (WebCore::DeviceController::dispatchDeviceEvent):
881         (WebCore::DeviceController::fireDeviceEvent):
882         * page/EventHandler.cpp:
883         (WebCore::EventHandler::updateMouseEventTargetNode):
884         (WebCore::EventHandler::handleTouchEvent):
885         * page/FocusController.cpp:
886         (WebCore::FocusController::setIsVisibleAndActiveInternal):
887         * page/Frame.cpp:
888         (WebCore::Frame::orientationChanged):
889         (WebCore::Frame::injectUserScriptsForWorld):
890         * page/FrameView.cpp:
891         (WebCore::FrameView::scrollContentsFastPath):
892         (WebCore::FrameView::serviceScriptedAnimations):
893         (WebCore::FrameView::trackedRepaintRectsAsText):
894         (WebCore::FrameView::updateWidgetPositions):
895         (WebCore::FrameView::notifyWidgets):
896         * page/Page.cpp:
897         (WebCore::networkStateChanged):
898         (WebCore::Page::stringToViewMode):
899         (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
900         (WebCore::Page::refreshPlugins):
901         (WebCore::Page::lockAllOverlayScrollbarsToHidden):
902         (WebCore::Page::pluginViews):
903         (WebCore::Page::storageBlockingStateChanged):
904         (WebCore::Page::setIsVisibleInternal):
905         * page/PageGroup.cpp:
906         (WebCore::PageGroup::captionPreferencesChanged):
907         * page/PageGroupLoadDeferrer.cpp:
908         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
909         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
910         * page/PageSerializer.cpp:
911         (WebCore::PageSerializer::serializeFrame):
912         * page/Performance.cpp:
913         (WebCore::Performance::webkitGetEntriesByType):
914         (WebCore::Performance::webkitGetEntriesByName):
915         * page/PerformanceResourceTiming.cpp:
916         (WebCore::passesTimingAllowCheck):
917         * page/PerformanceUserTiming.cpp:
918         (WebCore::convertToEntrySequence):
919         * page/SecurityPolicy.cpp:
920         (WebCore::SecurityPolicy::isAccessWhiteListed):
921         * page/UserContentURLPattern.cpp:
922         (WebCore::UserContentURLPattern::matchesPatterns):
923         * page/WindowFeatures.cpp:
924         (WebCore::WindowFeatures::parseDialogFeatures):
925         * page/animation/AnimationController.cpp:
926         (WebCore::AnimationControllerPrivate::updateAnimations):
927         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
928         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
929         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
930         (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
931         * page/animation/CSSPropertyAnimation.cpp:
932         (WebCore::ShorthandPropertyWrapper::equals):
933         (WebCore::ShorthandPropertyWrapper::blend):
934         * page/scrolling/AsyncScrollingCoordinator.cpp:
935         (WebCore::setStateScrollingNodeSnapOffsetsAsFloat):
936         * page/scrolling/ScrollingCoordinator.cpp:
937         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
938         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
939
940 2015-06-03  Daniel Bates  <dabates@apple.com>
941
942         AutoFill button should not be shown in read-only or disabled field
943         https://bugs.webkit.org/show_bug.cgi?id=145579
944         <rdar://problem/21212494>
945
946         Reviewed by Darin Adler.
947
948         Fixes an issue where the AutoFill button is shown in a read-only or disabled
949         field. We should not show the AutoFill button in such cases.
950
951         Tests: fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-disabled.html
952                fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html
953                fast/forms/auto-fill-button/input-auto-fill-button.html
954                fast/forms/auto-fill-button/input-disabled-auto-fill-button.html
955                fast/forms/auto-fill-button/input-readonly-auto-fill-button.html
956                fast/forms/auto-fill-button/input-readonly-non-empty-auto-fill-button.html
957
958         * html/TextFieldInputType.cpp:
959         (WebCore::TextFieldInputType::disabledAttributeChanged): Update AutoFill button state.
960         (WebCore::TextFieldInputType::readonlyAttributeChanged): Ditto.
961         (WebCore::TextFieldInputType::shouldDrawAutoFillButton): Do not draw AutoFill button
962         when the field is disabled or read-only.
963
964 2015-06-03  Brent Fulgham  <bfulgham@apple.com>
965
966         REGRESSION: (r181879): Scrolling in select/option region in iFrame scrolls both select and iframe
967         https://bugs.webkit.org/show_bug.cgi?id=145574
968         <rdar://problem/20966828>
969
970         Reviewed by Simon Fraser.
971
972         Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html
973
974         When the scroll gesture is started when the latched scrollable container is not at the limit of its
975         scroll region, we are NOT supposed to propagate the scroll event to the enclosing region. However,
976         we were doing two things wrong:
977         (1) When we recognized we were latching, we were using the right wheel event target, but not using
978             the latched scrollable container.
979         (2) Likewise, we were not using latched ScrollableArea when handling wheel events.
980
981         Instead, we were using the current scrollable container and ScrollableArea under the mouse pointer,
982         which could be different from the point we started latching as the content scrolled.
983         
984         The fix was to properly track the scrollable container and scrollable area during latching.
985
986         I attempted to store the latched ScrollableArea in the latchingState object, like we already do for the
987         scrollable container, but found that this did not work properly. I think the life cycle of the
988         ScrollableArea may not match the scrollable container, and since they are not reference counted I
989         simply retrieve the ScrollableArea when needed.
990
991         * page/mac/EventHandlerMac.mm:
992         (WebCore::scrollableAreaForContainerNode): Helper function to return the correct ScrollableArea
993         for the two types of RenderBox elements.
994         (WebCore::latchedToFrameOrBody): Helper predicate to identify Frame and Body elements.
995         (WebCore::EventHandler::platformPrepareForWheelEvents): Use the correct ScrollableArea for the given
996         ContainerNode. When latching, make sure to use the ScrollableArea that is related to the latched scrollable
997         container, not the area currently underneath the mouse pointer.
998
999 2015-06-03  Brady Eidson  <beidson@apple.com>
1000
1001         REGRESSION (r183498): Certain types of frame loads in iframes with <base target="_blank"> can open urls in new window/tabs
1002         https://bugs.webkit.org/show_bug.cgi?id=145580
1003
1004         Reviewed by Mark Lam.
1005
1006         Tests: fast/loader/fragment-navigation-base-blank.html
1007                fast/loader/iframe-meta-refresh-base-blank.html
1008                fast/loader/iframe-set-location-base-blank.html
1009                fast/loader/refresh-iframe-base-blank.html
1010
1011         Before 183498, callers of FrameLoader::changeLocation() got automatically assigned a frame name of "_self".
1012         After 183498, many remained without a frame name.
1013         
1014         Later on, FrameLoader applies the <base> target as their frame name if they don't already have one. 
1015         
1016         When the <base> target is "_blank", that causes a new window/tab.
1017         
1018         Restoring "_self" to these call sites fixes this.
1019
1020         * inspector/InspectorFrontendClientLocal.cpp:
1021         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1022         
1023         * inspector/InspectorPageAgent.cpp:
1024         (WebCore::InspectorPageAgent::navigate):
1025         
1026         * loader/FrameLoadRequest.h:
1027         (WebCore::FrameLoadRequest::FrameLoadRequest):
1028         
1029         * loader/NavigationScheduler.cpp:
1030         (WebCore::NavigationScheduler::scheduleLocationChange):
1031         
1032         * page/DOMWindow.cpp:
1033         (WebCore::DOMWindow::createWindow):
1034
1035 2015-06-03  Alexey Proskuryakov  <ap@apple.com>
1036
1037         More iOS build fixing.
1038
1039         * platform/spi/mac/AVFoundationSPI.h:
1040
1041 2015-06-03  Zalan Bujtas  <zalan@apple.com>
1042
1043         Subpixel rendering: Composited layer with subpixel gap does not get painted properly when its position changes.
1044         https://bugs.webkit.org/show_bug.cgi?id=145587
1045
1046         Reviewed by Simon Fraser.
1047
1048         The composited layer always snaps to an enclosing device pixel (floors) while the renderer rounds.
1049         At certain positions (for example 0.5px on a 1x display), a gap is formed between the layer(0px) and its renderer(1px).
1050         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
1051         in order to get the renderering right.
1052
1053         Test: compositing/child-layer-with-subpixel-gap-needs-repaint-when-parent-moves.html
1054
1055         * rendering/RenderLayerBacking.cpp:
1056         (WebCore::RenderLayerBacking::updateAfterLayout):
1057         (WebCore::devicePixelFractionGapFromRendererChanged):
1058         (WebCore::RenderLayerBacking::updateGeometry):
1059         * rendering/RenderLayerBacking.h:
1060
1061 2015-06-03  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1062
1063         [Streams API] ReadableStreamReader::closed() should be called once by binding code
1064         https://bugs.webkit.org/show_bug.cgi?id=145551
1065
1066         Reviewed by Darin Adler.
1067
1068         Covered by existing tests.
1069
1070         * bindings/js/JSReadableStreamReaderCustom.cpp:
1071         (WebCore::JSReadableStreamReader::closed): Calling ReadableStreamReader::closed only at creation of the promise.
1072
1073 2015-06-02  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1074
1075         [EFL][GTK] Fix build error since r185137
1076         https://bugs.webkit.org/show_bug.cgi?id=145596
1077
1078         Unreviewed, fix build break on EFL and GTK port.
1079
1080         * dom/Text.cpp:
1081         (WebCore::Text::formatForDebugger): Use strncpy() instead of strlcpy().
1082
1083 2015-06-02  Sergio Villar Senin  <svillar@igalia.com>
1084
1085         [CSS Grid Layout] Switch from parenthesis to brackets for grid line names
1086         https://bugs.webkit.org/show_bug.cgi?id=144996
1087
1088         Reviewed by Darin Adler.
1089
1090         Grid line names are now enclosed by brackets instead of parentheses
1091         as mentioned in the latest version of the spec. Appartently the CSS
1092         code is now more readable and avoids issues with tools like SASS.
1093
1094         * css/CSSGrammar.y.in:
1095         * css/CSSGridLineNamesValue.cpp:
1096         (WebCore::CSSGridLineNamesValue::customCSSText):
1097
1098 2015-06-02  Alexey Proskuryakov  <ap@apple.com>
1099
1100         iOS build fix
1101
1102         * platform/spi/mac/AVFoundationSPI.h:
1103
1104 2015-06-02  Commit Queue  <commit-queue@webkit.org>
1105
1106         Unreviewed, rolling out r185128 and r185132.
1107         https://bugs.webkit.org/show_bug.cgi?id=145597
1108
1109         The new test hits a bad assertion (Requested by ap on
1110         #webkit).
1111
1112         Reverted changesets:
1113
1114         "Crash in GraphicsContext3D::getInternalFramebufferSize"
1115         https://bugs.webkit.org/show_bug.cgi?id=145479
1116         http://trac.webkit.org/changeset/185128
1117
1118         "Skip webgl/useWhilePending.html on WebKit 1."
1119         http://trac.webkit.org/changeset/185132
1120
1121 2015-06-02  Ryuan Choi  <ryuan.choi@navercorp.com>
1122
1123         [CoordinatedGraphics] Refactor TiledBackingStoreClient
1124         https://bugs.webkit.org/show_bug.cgi?id=145577
1125
1126         Reviewed by Gyuyoung Kim.
1127
1128         This patch removes and simplifies unnecessary virtual methods of TiledBackingStoreClient.
1129
1130         No new tests, no behavior changes.
1131
1132         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1133         (WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers): Renamed from tiledBackingStorePaintEnd.
1134         (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintBegin): Deleted.
1135         (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd): Deleted.
1136         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreBackgroundColor):
1137         Deleted because tiledBackingStoreBackgroundColor() is not used anywhere.
1138         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1139         * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
1140         (WebCore::CoordinatedTile::updateBackBuffer):
1141         Simplified not to call unnecessary methods. In addition, used modern for loop.
1142         (WebCore::CoordinatedTile::swapBackBufferToFront): Deleted.
1143         * platform/graphics/texmap/coordinated/CoordinatedTile.h:
1144         * platform/graphics/texmap/coordinated/Tile.h:
1145         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
1146         (WebCore::TiledBackingStore::updateTileBuffers):
1147         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
1148
1149 2015-06-02  Doug Russell  <d_russell@apple.com>
1150
1151         AX: debugging attributes for text markers
1152         https://bugs.webkit.org/show_bug.cgi?id=145283
1153
1154         Reviewed by Chris Fleizach.
1155
1156         AXTextMarkerDebugDescription: returns the result of
1157         VisiblePosition::formatForDebugger() for the visible position that a text marker
1158         represents.
1159         AXTextMarkerNodeDebugDescription: calls Node::showNode() and
1160         Node::showNodePathForThis() for the visible position that a text marker
1161         represents.
1162         AXTextMarkerNodeTreeDebugDescription: calls Node::showTreeForThis() for the
1163         visible position that a text marker represents.
1164         AXTextMarkerRangeDebugDescription: returns the result of
1165         formatForDebugger(VisiblePositionRange) for the visible position range that a text
1166         marker range represents.
1167
1168         This is debug only tooling. Tests would be flakey and not very helpful.
1169
1170         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1171         (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarker:]):
1172         (-[WebAccessibilityObjectWrapper debugDescriptionForTextMarkerRange:]):
1173         (-[WebAccessibilityObjectWrapper showNodeForTextMarker:]):
1174         (-[WebAccessibilityObjectWrapper showNodeTreeForTextMarker:]):
1175         (formatForDebugger):
1176         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1177         * dom/Text.cpp:
1178         (WebCore::Text::formatForDebugger):
1179
1180 2015-06-02  Matt Rajca  <mrajca@apple.com>
1181
1182         MediaSessions should keep track of their current state.
1183         https://bugs.webkit.org/show_bug.cgi?id=145575
1184
1185         Reviewed by Alex Christensen.
1186
1187         * Modules/mediasession/MediaSession.h: Per the Media Session spec, the state can be 'Idle', 'Active', or
1188           'Interrupted'. Sessions are created in an 'Idle' state.
1189
1190 2015-06-02  Jon Lee  <jonlee@apple.com>
1191
1192         Build fix when building with internal SDKs
1193         https://bugs.webkit.org/show_bug.cgi?id=145576
1194         rdar://problem/21089476
1195
1196         Reviewed by Alexey Proskuryakov.
1197
1198         * platform/spi/mac/AVFoundationSPI.h: Include the right header.
1199
1200 2015-06-02  Dean Jackson  <dino@apple.com>
1201
1202         No need to guard the sizes attribute against PICTURE_SIZES in preload scanner.
1203         https://bugs.webkit.org/show_bug.cgi?id=145573
1204         <rdar://problem/21210038>
1205
1206         Reviewed by Myles Maxfield.
1207
1208         The PICTURE_SIZES feature flag doesn't need to be used to
1209         guard preloading of the sizes attribute.
1210
1211         * html/parser/HTMLPreloadScanner.cpp:
1212         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Deleted.
1213         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.
1214
1215 2015-06-02  Anders Carlsson  <andersca@apple.com>
1216
1217         Use UUIDs for WebSQL database filenames instead of a sequential number
1218         https://bugs.webkit.org/show_bug.cgi?id=145571
1219
1220         Reviewed by Dan Bernstein.
1221
1222         This is a first step towards getting rid of the iOS specific code path where we truncate
1223         database files instead of deleting them (in order to avoid file corruption).
1224
1225         * Modules/webdatabase/DatabaseTracker.cpp:
1226         (WebCore::generateDatabaseFileName):
1227         (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
1228         * platform/sql/SQLiteFileSystem.cpp:
1229         (WebCore::SQLiteFileSystem::getFileNameForNewDatabase): Deleted.
1230         * platform/sql/SQLiteFileSystem.h:
1231
1232 2015-06-02  Dean Jackson  <dino@apple.com>
1233
1234         Crash in GraphicsContext3D::getInternalFramebufferSize
1235         https://bugs.webkit.org/show_bug.cgi?id=145479
1236         <rdar://problem/16461048>
1237
1238         Reviewed by Eric Carlson.
1239
1240         If we are in an unitialized or lost state, don't try to access the context.
1241
1242         In order to test this, I added an Internal setting that always
1243         forces WebGL into a pending state.
1244
1245         Test: fast/canvas/webgl/useWhilePending.html
1246
1247         * html/canvas/WebGLRenderingContextBase.cpp:
1248         (WebCore::WebGLRenderingContextBase::create): Check internal settings for
1249         a forced pending state.
1250         (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
1251         (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
1252         * page/Settings.cpp: New Internal setting for forcing a pending policy.
1253         (WebCore::Settings::Settings):
1254         (WebCore::Settings::setForcePendingWebGLPolicy):
1255         * page/Settings.h:
1256         (WebCore::Settings::isForcePendingWebGLPolicy):
1257         * testing/InternalSettings.cpp:
1258         (WebCore::InternalSettings::Backup::Backup):
1259         (WebCore::InternalSettings::Backup::restoreTo):
1260         (WebCore::InternalSettings::setForcePendingWebGLPolicy):
1261         * testing/InternalSettings.h:
1262         * testing/InternalSettings.idl:
1263
1264 2015-06-02  Matt Rajca  <mrajca@apple.com>
1265
1266         Added a stub implementation of MediaSession, part of the Media Session spec.
1267         https://bugs.webkit.org/show_bug.cgi?id=145530
1268
1269         Reviewed by Eric Carlson.
1270
1271         * CMakeLists.txt: Added new MediaSession sources.
1272         * DerivedSources.make:
1273         * Modules/mediasession/MediaSession.cpp: Added stub implementation.
1274         (WebCore::MediaSession::MediaSession): Per the Media Session spec, a Media Remote Controls object should only be
1275           set for 'content' sessions; it is null otherwise.
1276         (WebCore::MediaSession::~MediaSession):
1277         (WebCore::MediaSession::controls):
1278         (WebCore::MediaSession::releaseSession):
1279         * Modules/mediasession/MediaSession.h: Added basic translation of IDL file.
1280         * Modules/mediasession/MediaSession.idl: Added from the Media Session spec.
1281         * WebCore.xcodeproj/project.pbxproj: Added new MediaSession sources.
1282
1283 2015-06-02  Zalan Bujtas  <zalan@apple.com>
1284
1285         Backdrop filter is pulling in content from behind the window.
1286         https://bugs.webkit.org/show_bug.cgi?id=145561
1287         rdar://problem/20909309
1288
1289         Reviewed by Simon Fraser.
1290
1291         This patch ensures that the backdrop filter layer is positioned and sized properly.
1292
1293         The backdrop filter layer should take its size and position from its renderer and not
1294         directly from the composited layer.
1295         In certain cases the composited layer's size is expanded to cover items like box shadow or an absolute positioned descendant.
1296         In such cases, we ended up applying the backdrop filter to those areas as well.
1297
1298         Tests: css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html
1299                css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html
1300
1301         * platform/graphics/GraphicsLayer.h:
1302         (WebCore::GraphicsLayer::setBackdropFiltersRect):
1303         (WebCore::GraphicsLayer::backdropFiltersRect):
1304         * platform/graphics/ca/GraphicsLayerCA.cpp:
1305         (WebCore::GraphicsLayerCA::setBackdropFiltersRect):
1306         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1307         (WebCore::GraphicsLayerCA::updateBackdropFilters):
1308         (WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
1309         (WebCore::GraphicsLayerCA::updateContentsRects):
1310         (WebCore::GraphicsLayerCA::updateGeometry): Deleted.
1311         * platform/graphics/ca/GraphicsLayerCA.h:
1312         * rendering/RenderLayerBacking.cpp:
1313         (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
1314         (WebCore::RenderLayerBacking::updateGeometry):
1315         * rendering/RenderLayerBacking.h:
1316
1317 2015-06-02  Eric Carlson  <eric.carlson@apple.com>
1318
1319         [Mac] occasional crash in Document::playbackTargetAvailabilityDidChange
1320         https://bugs.webkit.org/show_bug.cgi?id=145559
1321
1322         Reviewed by Darin Adler.
1323
1324         No new tests, covered by existing tests.
1325
1326         * html/HTMLMediaElement.cpp:
1327         (WebCore::HTMLMediaElement::registerWithDocument): Pass document to m_mediaSession->registerWithDocument.
1328         (WebCore::HTMLMediaElement::unregisterWithDocument): Pass document to m_mediaSession->unRegisterWithDocument.
1329         (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Ditto.
1330         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.
1331
1332         * html/MediaElementSession.cpp:
1333         (WebCore::MediaElementSession::registerWithDocument): Take a document.
1334         (WebCore::MediaElementSession::unregisterWithDocument): Ditto.
1335         * html/MediaElementSession.h:
1336
1337 2015-06-02  Chris Dumez  <cdumez@apple.com>
1338
1339         Calling FrameView::viewportContentsChanged() after style recalcs is too expensive
1340         https://bugs.webkit.org/show_bug.cgi?id=145554
1341         <rdar://problem/21189478>
1342
1343         Reviewed by Darin Adler and Simon Fraser.
1344
1345         Only call FrameView::viewportContentsChanged() after a style recalc if
1346         composited layers have been updated (and there is no pending layout).
1347
1348         We already viewportContentsChanged() after layout so we only need to
1349         call viewportContentsChanged() after a style recalc if it did not cause
1350         a layout but may have caused an element to become visible. In
1351         particular, this can happen in the case of composited animations (e.g.
1352         using -webkit-transform to move an element inside the viewport).
1353         Therefore, we now only call viewportContentsChanged() after a style
1354         recalc if it caused composited layers to be updated. This avoids a lot
1355         of unnecessary calls to viewportContentsChanged(), which is expensive.
1356
1357         No new tests, already covered by:
1358         fast/images/animated-gif-webkit-transform.html
1359
1360         * dom/Document.cpp:
1361         (WebCore::Document::recalcStyle):
1362         * page/FrameView.cpp:
1363         (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
1364         * page/FrameView.h:
1365         * rendering/RenderLayerCompositor.cpp:
1366         (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
1367         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1368         * rendering/RenderLayerCompositor.h:
1369
1370 2015-06-02  Myles C. Maxfield  <mmaxfield@apple.com>
1371
1372         Remove use of CTFontSetRenderingParameters()
1373         https://bugs.webkit.org/show_bug.cgi?id=145560
1374
1375         Reviewed by Simon Fraser.
1376
1377         Instead, always use CTFontSetRenderingStyle().
1378
1379         No new tests because there is no behavior change.
1380
1381         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1382         (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
1383         (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
1384
1385 2015-06-02  Anders Carlsson  <andersca@apple.com>
1386
1387         Move WKFontAntialiasingStateSaver to its own file
1388         https://bugs.webkit.org/show_bug.cgi?id=145557
1389         rdar://problem/21134776
1390
1391         Reviewed by Dan Bernstein.
1392
1393         Also rename it to FontAntialiasingStateSaver. Also, change it to use the CoreGraphicsSPI.h header for its
1394         CGFontAntialiasingStyle definition instead of using an explicit typedef.
1395
1396         * WebCore.xcodeproj/project.pbxproj:
1397         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1398         (PlatformCALayer::drawLayerContents):
1399         * platform/graphics/ios/FontAntialiasingStateSaver.h: Copied from Source/WebCore/platform/ios/wak/WKGraphics.h.
1400         (WebCore::FontAntialiasingStateSaver::FontAntialiasingStateSaver):
1401         (WebCore::FontAntialiasingStateSaver::setup):
1402         (WebCore::FontAntialiasingStateSaver::restore):
1403         * platform/ios/LegacyTileCache.mm:
1404         (WebCore::LegacyTileCache::drawWindowContent):
1405         * platform/ios/wak/WKGraphics.h:
1406         (WKFontAntialiasingStateSaver::WKFontAntialiasingStateSaver): Deleted.
1407         * platform/ios/wak/WKGraphics.mm:
1408         (WKFontAntialiasingStateSaver::setup): Deleted.
1409         (WKFontAntialiasingStateSaver::restore): Deleted.
1410
1411 2015-06-02  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1412
1413         [Streams API] Implement ReadableStreamReader read method in closed and errored state
1414         https://bugs.webkit.org/show_bug.cgi?id=144790
1415
1416         Reviewed by Darin Adler.
1417
1418         Reader delegates read() promise handling to its stream except if reader is no longer locking the stream and stream is readable.
1419         Storing of reader read() promise callbacks as a Vector in ReadableStream.
1420         Added resolution/rejection of read() promises in case of errored/closed streams.
1421
1422         Test: streams/readable-stream-reader-read.html
1423
1424         * ForwardingHeaders/runtime/IteratorOperations.h: Added.
1425         * Modules/streams/ReadableStream.cpp:
1426         (WebCore::ReadableStream::cleanCallbacks): Clean the read requests.
1427         (WebCore::ReadableStream::changeStateToClosed): Run success callbacks with undefined for read requests.
1428         (WebCore::ReadableStream::changeStateToErrored): Run failure callbacks with the errors for read requests.
1429         (WebCore::ReadableStream::closed): Parameter name changed.
1430         (WebCore::ReadableStream::read): Added. Succeeds with empty when closed, fails with error when errored, reads a
1431         value if there is one and pushes the callbacks to the queue otherwise.
1432         * Modules/streams/ReadableStream.h:
1433         (WebCore::ReadableStream::ReadCallbacks::ReadCallbacks): Struct containing success and failure callbacks.
1434         * Modules/streams/ReadableStreamReader.cpp:
1435         (WebCore::ReadableStreamReader::closed): Parameter name changed.
1436         (WebCore::ReadableStreamReader::read): Invoke success with empty if we streams if we don't have the right reader
1437         and call the stream otherwise to read.
1438         * Modules/streams/ReadableStreamReader.h:
1439         * bindings/js/JSReadableStreamReaderCustom.cpp:
1440         (WebCore::JSReadableStreamReader::read): Create the callback lambdas and invoke read. Failure rejects the
1441         promise and success creates the result from the read value.
1442         * bindings/js/ReadableJSStream.cpp:
1443         (WebCore::ReadableJSStream::hasValue):
1444         (WebCore::ReadableJSStream::read): Not implemented yet.
1445         * bindings/js/ReadableJSStream.h:
1446
1447 2015-06-01  Myles C. Maxfield  <mmaxfield@apple.com>
1448
1449         [Cocoa] FontPlatformData's equality check should always use reference URLs
1450         https://bugs.webkit.org/show_bug.cgi?id=144168
1451
1452         Reviewed by Tim Horton.
1453
1454         <rdar://problem/18985642> is not fixed, so we need to continue using the older
1455         objectForEqualityCheck().
1456
1457         No new tests because there is no behavior change.
1458
1459         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1460         (WebCore::FontPlatformData::objectForEqualityCheck):
1461
1462 2015-06-02  Andy Estes  <aestes@apple.com>
1463
1464         [Mac] REGRESSION (r175941): Max.app crashes when adding a sound file to a patch due to removing cursor resources from WebCore.framework
1465         https://bugs.webkit.org/show_bug.cgi?id=145555
1466
1467         Reviewed by Darin Adler.
1468
1469         Re-added the cursor resources used by Max.app and ran sort-Xcode-project-file.
1470
1471         * Resources/copyCursor.png: Added.
1472         * Resources/moveCursor.png: Added.
1473         * Resources/northEastSouthWestResizeCursor.png: Added.
1474         * Resources/northSouthResizeCursor.png: Added.
1475         * Resources/northWestSouthEastResizeCursor.png: Added.
1476         * WebCore.xcodeproj/project.pbxproj:
1477
1478 2015-06-02  Brady Eidson  <beidson@apple.com>
1479
1480         WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
1481         rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
1482
1483         Reviewed by Alex Christensen.
1484
1485         Tests: loader/navigation-policy/should-open-external-urls/main-frame-click.html
1486                loader/navigation-policy/should-open-external-urls/main-frame-navigated-programatically-by-subframe.html
1487                loader/navigation-policy/should-open-external-urls/main-frame-with-flag-progamatic.html
1488                loader/navigation-policy/should-open-external-urls/main-frame-without-flag-programatic.html
1489                loader/navigation-policy/should-open-external-urls/subframe-click-target-self.html
1490                loader/navigation-policy/should-open-external-urls/subframe-click-target-top.html
1491                loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html
1492                loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html
1493                loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html
1494                loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag.html
1495                loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag-from-subframe.html
1496                loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag.html
1497                loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag-from-subframe.html
1498                loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag.html
1499                loader/navigation-policy/should-open-external-urls/window-open-with-flag-from-subframe.html
1500                loader/navigation-policy/should-open-external-urls/window-open-with-flag.html
1501                loader/navigation-policy/should-open-external-urls/window-open-without-flag-from-subframe.html
1502                loader/navigation-policy/should-open-external-urls/window-open-without-flag.html
1503
1504         The "should open external URLs" flag is only for main frames.
1505         It doesn't enforce any sort of policy internal to WebKit, but rather is for notifications to the policy delegate.
1506         
1507         It is set from one of two places:
1508         1 - A main frame is navigated by any frame as the result of a user gesture.
1509         2 - WebKit2 API explicitly states the flag is true.
1510         
1511         The flag value propagates when:
1512         1 - When a main frame document is navigated to a new main frame document.
1513         2 - When a new window is opened from a page whose main frame had the flag set.
1514         3 - When a new window is opened as the result of a user gesture.
1515         
1516         The flag resets to false when:
1517         1 - A subframe navigates a main frame without a user gesture.
1518         
1519         This patch is large, but does little more than the following:
1520         1 - Adds a ShouldOpenExternalURLs flag to both FrameLoadRequest and NavigationAction.
1521         2 - Makes sure anybody who creates either of those objects sets a sensible for that flag.
1522         3 - When FrameLoader creates a new DocumentLoader, it sets its flag based on whether or not the load is in a main frame,
1523             whether or not the load is from a user gesture, and based on the initiator's value of the flag. 
1524             
1525         * dom/Document.cpp:
1526         (WebCore::Document::processHttpEquiv):
1527         (WebCore::Document::shouldOpenExternalURLsPolicyToPropagate):
1528         * dom/Document.h:
1529         
1530         * html/HTMLAnchorElement.cpp:
1531         (WebCore::HTMLAnchorElement::handleClick):
1532         
1533         * html/HTMLLinkElement.cpp:
1534         (WebCore::HTMLLinkElement::handleClick):
1535         
1536         * html/parser/XSSAuditorDelegate.cpp:
1537         (WebCore::XSSAuditorDelegate::didBlockScript):
1538         
1539         * inspector/InspectorFrontendClientLocal.cpp:
1540         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1541         
1542         * inspector/InspectorPageAgent.cpp:
1543         (WebCore::InspectorPageAgent::navigate):
1544         
1545         * loader/DocumentLoader.cpp:
1546         (WebCore::DocumentLoader::setTriggeringAction):
1547         (WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate):
1548         * loader/DocumentLoader.h:
1549         (WebCore::DocumentLoader::shouldOpenExternalURLsPolicy): Deleted.
1550         
1551         * loader/FrameLoadRequest.cpp:
1552         (WebCore::FrameLoadRequest::FrameLoadRequest):
1553         * loader/FrameLoadRequest.h:
1554         (WebCore::FrameLoadRequest::FrameLoadRequest):
1555         
1556         * loader/FrameLoader.cpp:
1557         (WebCore::FrameLoader::urlSelected):
1558         (WebCore::FrameLoader::receivedFirstData):
1559         (WebCore::FrameLoader::loadURLIntoChildFrame):
1560         (WebCore::FrameLoader::loadURL):
1561         (WebCore::FrameLoader::load):
1562         (WebCore::FrameLoader::loadWithNavigationAction):
1563         (WebCore::FrameLoader::reloadWithOverrideEncoding):
1564         (WebCore::FrameLoader::reload):
1565         (WebCore::FrameLoader::loadPostRequest):
1566         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1567         (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
1568         * loader/FrameLoader.h:
1569         
1570         * loader/NavigationAction.cpp:
1571         (WebCore::NavigationAction::NavigationAction):
1572         (WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy):
1573         * loader/NavigationAction.h:
1574         (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy): Deleted.
1575         
1576         * loader/NavigationScheduler.cpp:
1577         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
1578         (WebCore::ScheduledRedirect::ScheduledRedirect):
1579         (WebCore::ScheduledLocationChange::ScheduledLocationChange):
1580         (WebCore::ScheduledRefresh::ScheduledRefresh):
1581         (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
1582         (WebCore::NavigationScheduler::scheduleRedirect):
1583         (WebCore::NavigationScheduler::scheduleLocationChange):
1584         (WebCore::NavigationScheduler::scheduleRefresh):
1585         * loader/NavigationScheduler.h:
1586         
1587         * loader/PolicyChecker.cpp:
1588         (WebCore::PolicyChecker::checkNavigationPolicy):
1589         
1590         * loader/SubframeLoader.cpp:
1591         (WebCore::SubframeLoader::loadOrRedirectSubframe):
1592         
1593         * loader/appcache/ApplicationCacheGroup.cpp:
1594         (WebCore::ApplicationCacheGroup::selectCache):
1595         
1596         * page/ContextMenuController.cpp:
1597         (WebCore::openNewWindow):
1598         (WebCore::ContextMenuController::contextMenuItemSelected):
1599         
1600         * page/DOMWindow.cpp:
1601         (WebCore::DOMWindow::setLocation):
1602         (WebCore::DOMWindow::createWindow):
1603         (WebCore::DOMWindow::open):
1604         
1605         * page/DragController.cpp:
1606         (WebCore::DragController::performDragOperation):
1607         
1608         * page/Location.cpp:
1609         (WebCore::Location::reload):
1610         
1611         * replay/ReplayInputDispatchMethods.cpp:
1612         (WebCore::InitialNavigation::dispatch):
1613         
1614         * svg/SVGAElement.cpp:
1615         (WebCore::SVGAElement::defaultEventHandler):
1616
1617 2015-06-02  Yusuke Suzuki  <utatane.tea@gmail.com>
1618
1619         Heap-use-after-free read of size 4 in JavaScriptCore: WTF::StringImpl::isSymbol() (StringImpl.h:496)
1620         https://bugs.webkit.org/show_bug.cgi?id=145532
1621
1622         Reviewed by Geoffrey Garen.
1623
1624         Hold the ownership of AtomicStringImpl*.
1625
1626         * bindings/scripts/CodeGeneratorJS.pm:
1627         (GenerateParametersCheck):
1628         * dom/TreeScope.cpp:
1629         (WebCore::TreeScope::getElementById):
1630
1631 2015-06-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1632
1633         SharedBuffer::copy should return a Ref<SharedBuffer>
1634         https://bugs.webkit.org/show_bug.cgi?id=145499
1635
1636         Reviewed by Andreas Kling.
1637
1638         Changing SharedBuffer::copy to return a Ref<> and adapting some code accordingly.
1639
1640         Covered by existing tests.
1641
1642         * loader/SubresourceLoader.cpp:
1643         (WebCore::SubresourceLoader::didReceiveResponse):
1644         * loader/appcache/ApplicationCacheResource.cpp:
1645         (WebCore::ApplicationCacheResource::deliver):
1646         * platform/SharedBuffer.cpp:
1647         (WebCore::SharedBuffer::copy):
1648         * platform/SharedBuffer.h:
1649
1650 2015-06-01  Hunseop Jeong  <hs85.jeong@samsung.com>
1651
1652         Use modern for-loops in WebCore/Modules - 1
1653         https://bugs.webkit.org/show_bug.cgi?id=145507
1654
1655         Reviewed by Darin Adler.
1656
1657         No new tests, no behavior changes.
1658
1659         * Modules/battery/BatteryController.cpp:
1660         (WebCore::BatteryController::~BatteryController):
1661         (WebCore::BatteryController::updateBatteryStatus):
1662         (WebCore::BatteryController::didChangeBatteryStatus):
1663         * Modules/encryptedmedia/CDM.cpp:
1664         (WebCore::CDMFactoryForKeySystem):
1665         * Modules/encryptedmedia/MediaKeys.cpp:
1666         (WebCore::MediaKeys::~MediaKeys):
1667         * Modules/geolocation/Geolocation.cpp:
1668         (WebCore::Geolocation::resumeTimerFired):
1669         (WebCore::Geolocation::resetAllGeolocationPermission):
1670         (WebCore::Geolocation::makeCachedPositionCallbacks):
1671         (WebCore::Geolocation::sendError):
1672         (WebCore::Geolocation::sendPosition):
1673         (WebCore::Geolocation::stopTimer):
1674         (WebCore::Geolocation::cancelRequests):
1675         (WebCore::Geolocation::extractNotifiersWithCachedPosition):
1676         (WebCore::Geolocation::copyToSet):
1677         (WebCore::Geolocation::handlePendingPermissionNotifiers):
1678         * Modules/geolocation/GeolocationController.cpp:
1679         (WebCore::GeolocationController::positionChanged):
1680         (WebCore::GeolocationController::errorOccurred):
1681         * Modules/indexeddb/IDBDatabase.cpp:
1682         (WebCore::IDBDatabase::objectStoreNames):
1683         (WebCore::IDBDatabase::transaction):
1684         (WebCore::IDBDatabase::forceClose):
1685         (WebCore::IDBDatabase::closeConnection):
1686         (WebCore::IDBDatabase::findObjectStoreId):
1687         * Modules/indexeddb/IDBDatabaseBackend.cpp:
1688         (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
1689         (WebCore::IDBDatabaseBackend::deleteDatabase):
1690         (WebCore::IDBDatabaseBackend::close):
1691         * Modules/indexeddb/IDBDatabaseMetadata.cpp:
1692         (WebCore::IDBDatabaseMetadata::isolatedCopy):
1693         (WebCore::IDBObjectStoreMetadata::isolatedCopy):
1694         * Modules/indexeddb/IDBKey.cpp:
1695         (WebCore::IDBKey::isValid):
1696         * Modules/indexeddb/IDBKey.h:
1697         (WebCore::IDBKey::createMultiEntryArray):
1698         (WebCore::IDBKey::createArray):
1699         * Modules/indexeddb/IDBKeyPath.cpp:
1700         (WebCore::IDBKeyPath::IDBKeyPath):
1701         (WebCore::IDBKeyPath::isValid):
1702         (WebCore::IDBKeyPath::isolatedCopy):
1703         * Modules/indexeddb/IDBObjectStore.cpp:
1704         (WebCore::IDBObjectStore::indexNames):
1705         (WebCore::IDBObjectStore::put):
1706         Rename the two 'i's to 'keyData' and 'indexKeyData'.
1707         (WebCore::IDBObjectStore::index):
1708         (WebCore::IDBObjectStore::findIndexId):
1709         * Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
1710         (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions):
1711         * Modules/indexeddb/IDBRequest.cpp:
1712         (WebCore::IDBRequest::abort):
1713         * Modules/indexeddb/IDBTransaction.cpp:
1714         (WebCore::IDBTransaction::closeOpenCursors):
1715         (WebCore::IDBTransaction::onAbort):
1716         (WebCore::IDBTransaction::dispatchEvent):
1717         * Modules/indexeddb/IDBTransactionBackend.cpp:
1718         (WebCore::IDBTransactionBackend::create):
1719         (WebCore::IDBTransactionBackend::closeOpenCursors):
1720         * Modules/mediasource/MediaSource.cpp:
1721         (WebCore::MediaSource::onReadyStateChange):
1722         * Modules/mediastream/MediaConstraintsImpl.cpp:
1723         (WebCore::MediaConstraintsImpl::initialize):
1724         (WebCore::MediaConstraintsImpl::getMandatoryConstraints):
1725         (WebCore::MediaConstraintsImpl::getOptionalConstraintValue):
1726         * Modules/mediastream/MediaStream.cpp:
1727         (WebCore::MediaStream::create):
1728         (WebCore::MediaStream::cloneMediaStreamTrackVector):
1729         (WebCore::MediaStream::addTrack):
1730         (WebCore::MediaStream::removeTrack):
1731         (WebCore::MediaStream::haveTrackWithSource):
1732         (WebCore::MediaStream::getTrackById):
1733         (WebCore::MediaStream::getTracks):
1734         (WebCore::MediaStream::trackDidEnd):
1735         (WebCore::MediaStream::scheduledEventTimerFired):
1736         * Modules/mediastream/MediaStreamCapabilities.cpp:
1737         (WebCore::MediaStreamCapabilities::sourceType):
1738         (WebCore::MediaStreamCapabilities::sourceId):
1739         (WebCore::MediaStreamCapabilities::facingMode):
1740         * Modules/mediastream/MediaStreamTrack.cpp:
1741         (WebCore::MediaStreamTrack::trackDidEnd):
1742         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
1743         (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
1744
1745 2015-06-01  Myles C. Maxfield  <mmaxfield@apple.com>
1746
1747         [SVG -> OTF Converter] Remove unnecessary hacks
1748         https://bugs.webkit.org/show_bug.cgi?id=145088
1749
1750         Reviewed by Simon Fraser.
1751
1752         Not needed anymore.
1753
1754         Test: svg/text/offset-square-svg-font.html
1755
1756         * svg/SVGToOTFFontConversion.cpp:
1757         (WebCore::SVGToOTFFontConverter::appendKERNTable):
1758         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
1759
1760 2015-06-01  Andreas Kling  <akling@apple.com>
1761
1762         CSS animations in filling-forwards state shouldn't force compositing.
1763         <https://webkit.org/b/145389>
1764         <rdar://problem/17923642>
1765
1766         Reviewed by Simon Fraser.
1767
1768         Stop checking if a CSS animation is filling forwards when computing
1769         compositing requirements.
1770
1771         This prevents finished animations from pinning elements in composited
1772         state, and frees up a bunch of IOSurface memory on some content.
1773
1774         * page/animation/AnimationBase.h:
1775         (WebCore::AnimationBase::isAnimatingProperty): Deleted.
1776         * rendering/RenderLayerBacking.cpp:
1777         (WebCore::RenderLayerBacking::updateGeometry):
1778         * rendering/RenderLayerCompositor.cpp:
1779         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1780
1781 2015-06-01  Myles C. Maxfield  <mmaxfield@apple.com>
1782
1783         Out of bounds read in WebCore::ComplexTextController::adjustGlyphsAndAdvances
1784         https://bugs.webkit.org/show_bug.cgi?id=145537
1785         <rdar://problem/20959267>
1786
1787         Reviewed by Darin Adler.
1788
1789         U16_IS_SURROGATE_LEAD(ch) assumes U16_IS_SURROGATE(ch). In this case, that isn't true.
1790
1791         Test: fast/text/crash-complex-text-surrogate.html
1792
1793         * platform/graphics/mac/ComplexTextController.cpp:
1794         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1795
1796 2015-05-30  Zalan Bujtas  <zalan@apple.com>
1797
1798         REGRESSION (179771): zooming on facebook images covers image
1799         https://bugs.webkit.org/show_bug.cgi?id=145485
1800
1801         Reviewed by Simon Fraser.
1802
1803         Scaling an infinite rect should always produce an infinite rect.
1804         (Based on Simon Fraser's patch)
1805
1806         Test: compositing/layer-creation/zoomed-clip-intersection.html
1807
1808         * platform/graphics/LayoutRect.cpp:
1809         (WebCore::LayoutRect::scale):
1810
1811 2015-06-01  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1812
1813         Purge PassRefPtr in WebCore/Modules - 3
1814         https://bugs.webkit.org/show_bug.cgi?id=145508
1815
1816         Reviewed by Darin Adler.
1817
1818         As a step to purge PassRefPtr, this patch removes PassRefPtr, then use Ref or RefPtr.
1819
1820         * Modules/indexeddb/IDBCursor.cpp:
1821         (WebCore::IDBCursor::create):
1822         * Modules/indexeddb/IDBCursor.h:
1823         * Modules/indexeddb/IDBCursorBackend.h:
1824         (WebCore::IDBCursorBackend::create):
1825         * Modules/indexeddb/IDBCursorBackendOperations.h:
1826         (WebCore::CursorIterationOperation::create):
1827         (WebCore::CursorAdvanceOperation::create):
1828         * Modules/indexeddb/IDBDatabase.cpp:
1829         (WebCore::IDBDatabase::create):
1830         * Modules/indexeddb/IDBDatabase.h:
1831         * Modules/indexeddb/IDBDatabaseBackend.cpp:
1832         (WebCore::IDBDatabaseBackend::create):
1833         * Modules/indexeddb/IDBDatabaseBackend.h:
1834         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
1835         (WebCore::IDBDatabaseCallbacksImpl::create):
1836         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
1837         * Modules/indexeddb/IDBDatabaseError.h:
1838         (WebCore::IDBDatabaseError::create):
1839         * Modules/indexeddb/IDBIndex.h:
1840         (WebCore::IDBIndex::create):
1841         * Modules/indexeddb/IDBKey.h:
1842         (WebCore::IDBKey::createInvalid):
1843         (WebCore::IDBKey::createNumber):
1844         (WebCore::IDBKey::createString):
1845         (WebCore::IDBKey::createDate):
1846         (WebCore::IDBKey::createArray):
1847         * Modules/indexeddb/IDBKeyRange.cpp:
1848         (WebCore::IDBKeyRange::create):
1849         * Modules/indexeddb/IDBKeyRange.h:
1850         (WebCore::IDBKeyRange::create):
1851         * Modules/indexeddb/IDBObjectStore.cpp:
1852         * Modules/indexeddb/IDBObjectStore.h:
1853         (WebCore::IDBObjectStore::create):
1854         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1855         (WebCore::IDBOpenDBRequest::create):
1856         * Modules/indexeddb/IDBOpenDBRequest.h:
1857         * Modules/indexeddb/IDBRecordIdentifier.h:
1858         (WebCore::IDBRecordIdentifier::create):
1859         * Modules/indexeddb/IDBRequest.cpp:
1860         (WebCore::IDBRequest::create):
1861         (WebCore::IDBRequest::getResultCursor):
1862         * Modules/indexeddb/IDBRequest.h:
1863         * Modules/indexeddb/IDBTransaction.cpp:
1864         (WebCore::IDBTransaction::create):
1865         * Modules/indexeddb/IDBTransaction.h:
1866         * Modules/indexeddb/IDBTransactionBackend.cpp:
1867         (WebCore::IDBTransactionBackend::create):
1868         * Modules/indexeddb/IDBTransactionBackend.h:
1869         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1870         (WebCore::CreateObjectStoreOperation::create):
1871         (WebCore::DeleteObjectStoreOperation::create):
1872         (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
1873         (WebCore::CreateObjectStoreAbortOperation::create):
1874         (WebCore::DeleteObjectStoreAbortOperation::create):
1875         (WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
1876         (WebCore::CreateIndexOperation::create):
1877         (WebCore::CreateIndexAbortOperation::create):
1878         (WebCore::DeleteIndexOperation::create):
1879         (WebCore::DeleteIndexAbortOperation::create):
1880         (WebCore::GetOperation::create):
1881         (WebCore::PutOperation::create):
1882         (WebCore::SetIndexesReadyOperation::create):
1883         (WebCore::OpenCursorOperation::create):
1884         (WebCore::CountOperation::create):
1885         (WebCore::DeleteRangeOperation::create):
1886         (WebCore::ClearObjectStoreOperation::create):
1887         * Modules/mediasource/VideoPlaybackQuality.cpp:
1888         (WebCore::VideoPlaybackQuality::create):
1889         * Modules/mediasource/VideoPlaybackQuality.h:
1890         * Modules/mediastream/MediaConstraintsImpl.cpp:
1891         (WebCore::MediaConstraintsImpl::create):
1892         * Modules/mediastream/MediaConstraintsImpl.h:
1893         * Modules/mediastream/MediaStream.cpp:
1894         (WebCore::MediaStream::create):
1895         * Modules/mediastream/MediaStream.h:
1896         * Modules/mediastream/RTCDTMFSender.cpp:
1897         (WebCore::RTCDTMFSender::create):
1898         * Modules/mediastream/RTCDTMFSender.h:
1899         * Modules/mediastream/RTCOfferAnswerOptions.cpp:
1900         (WebCore::RTCOfferAnswerOptions::create):
1901         (WebCore::RTCOfferOptions::create):
1902         * Modules/mediastream/RTCOfferAnswerOptions.h:
1903         * Modules/mediastream/RTCPeerConnection.cpp:
1904         (WebCore::RTCPeerConnection::parseConfiguration):
1905         (WebCore::RTCPeerConnection::create):
1906         * Modules/mediastream/RTCPeerConnection.h:
1907         * Modules/webaudio/AudioContext.cpp:
1908         (WebCore::AudioContext::create):
1909         * Modules/webdatabase/AbstractDatabaseServer.h:
1910         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
1911         (WebCore::DOMWindowWebDatabase::openDatabase):
1912         * Modules/webdatabase/DOMWindowWebDatabase.h:
1913         * Modules/webdatabase/DatabaseManager.cpp:
1914         (WebCore::DatabaseManager::existingDatabaseContextFor):
1915         (WebCore::DatabaseManager::databaseContextFor):
1916         (WebCore::DatabaseManager::openDatabase):
1917         * Modules/webdatabase/DatabaseManager.h:
1918         * Modules/webdatabase/DatabaseServer.cpp:
1919         (WebCore::DatabaseServer::openDatabase):
1920         (WebCore::DatabaseServer::createDatabase):
1921         * Modules/webdatabase/DatabaseServer.h:
1922
1923 2015-06-01  Daniel Bates  <dabates@apple.com>
1924
1925         Notify client that we began editing when text field is focused
1926         https://bugs.webkit.org/show_bug.cgi?id=145439
1927         <rdar://problem/21142108>
1928
1929         Reviewed by Anders Carlsson.
1930
1931         Inform the editor client that we began editing when a text field is focused either
1932         by being explicitly focused (programmatically or by user interaction) or implicitly
1933         focused when the window became active.
1934
1935         Currently we only notify the editor client that we began editing a text field when
1936         when a person actually changes the value of the field. And we always notify the
1937         client that we ended editing when a text field is defocused regardless of whether
1938         we executed a began editing callback. Moreover we notify a client that we
1939         ended editing when the field is defocused (either explicitly or implicitly when the
1940         window becomes inactive). Instead we should always notify the client that we began
1941         editing when the field is focused so that this callback is symmetric with the end
1942         editing callback.
1943
1944         * html/SearchInputType.cpp:
1945         (WebCore::SearchInputType::didSetValueByUserEdit): Remove parameter for ValueChangeState,
1946         which was used to determine whether we should notify the client that we began editing, because
1947         we we will notify the client that editing began when the text field is focused as opposed to
1948         when the value of text field first changes.
1949         * html/SearchInputType.h: Ditto.
1950         * html/TextFieldInputType.cpp:
1951         (WebCore::TextFieldInputType::forwardEvent): Notify the client that we began editing when
1952         the text field is focused.
1953         (WebCore::TextFieldInputType::subtreeHasChanged): Update call site of didSetValueByUserEdit()
1954         following the removal of its parameter.
1955         (WebCore::TextFieldInputType::didSetValueByUserEdit): Ditto.
1956         * html/TextFieldInputType.h:
1957
1958 2015-06-01  Anders Carlsson  <andersca@apple.com>
1959
1960         WAKScrollView.h cannot be imported standalone
1961         https://bugs.webkit.org/show_bug.cgi?id=145529
1962
1963         Reviewed by Dan Bernstein.
1964
1965         * page/mac/WebCoreFrameView.h:
1966         Remove the __cplusplus #ifdefs since WebCoreFrameView.h is only used by Objective-C++ code.
1967         (The different non-C++ method declarations were wrong anyway!)
1968
1969         * platform/ScrollTypes.h:
1970         Remove the #ifdef __cplusplus surrounding the code, add header includes to make the file self-contained,
1971         and reformat the enum definitions.
1972
1973 2015-06-01  Alex Christensen  <achristensen@webkit.org>
1974
1975         [Content Extensions] resource-type and load-type should be independent.
1976         https://bugs.webkit.org/show_bug.cgi?id=145528
1977         rdar://problem/21190765
1978
1979         Reviewed by Benjamin Poulain.
1980
1981         Covered by existing tests and a new API test.
1982         
1983         Right now we use the same uint16_t to store all the load-type and resource-type flags,
1984         then we just do a bitwise and to check both at the same time. This results in a trigger
1985         with load-type and resource-type firing if either condition is met, not both conditions.
1986         A trigger with both resource-type and load-type conditions should only fire if both conditions are met.
1987
1988         * contentextensions/DFABytecodeInterpreter.cpp:
1989         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
1990         Check and correctly handle rules with both resource-type and load-type flags.
1991         * loader/ResourceLoadInfo.h:
1992         Add masks to separate flags from resource-type and load-type.
1993
1994 2015-06-01  Alex Christensen  <achristensen@webkit.org>
1995
1996         [Content Extensions] Reduce DFA memory usage.
1997         https://bugs.webkit.org/show_bug.cgi?id=145526
1998
1999         Reviewed by Benjamin Poulain.
2000
2001         * contentextensions/DFA.cpp:
2002         (WebCore::ContentExtensions::DFA::memoryUsed):
2003         (WebCore::ContentExtensions::DFANode::transitions):
2004         (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination):
2005         (WebCore::ContentExtensions::DFANode::changeFallbackTransition):
2006         (WebCore::ContentExtensions::DFANode::addFallbackTransition):
2007         (WebCore::ContentExtensions::DFANode::containsTransition):
2008         (WebCore::ContentExtensions::DFANode::kill):
2009         * contentextensions/DFA.h:
2010         * contentextensions/DFAMinimizer.cpp:
2011         (WebCore::ContentExtensions::DFAMinimizer::minimize):
2012         * contentextensions/NFAToDFA.cpp:
2013         (WebCore::ContentExtensions::NFAToDFA::convert):
2014         Use separate Vectors for the transition characters and destinations to avoid wasting memory to padding a std::pair.
2015
2016 2015-06-01  Matt Rajca  <mrajca@apple.com>
2017
2018         Implemented the `eventTargetInterface` and `scriptExecutionContext` methods required by EventTarget, as well as
2019         some required infrastructure.
2020         https://bugs.webkit.org/show_bug.cgi?id=145523
2021
2022         Reviewed by Eric Carlson.
2023
2024         * Modules/mediasession/MediaRemoteControls.cpp:
2025         (WebCore::MediaRemoteControls::MediaRemoteControls): Initialize all instance variables.
2026         * Modules/mediasession/MediaRemoteControls.h: MediaRemoteControl's constructor now takes a script execution
2027           context, which we provide to EventTarget. The required eventTargetInterface method has also been implemented.
2028         (WebCore::MediaRemoteControls::create):
2029         * Modules/mediasession/MediaRemoteControls.idl: Indicate MediaRemoteControls now takes a constructor that is
2030           passed in a script execution context. To prevent build errors, event handlers have been removed until they are
2031           implemented.
2032         * WebCore.xcodeproj/project.pbxproj: We should be building the derived JSMediaRemoteControls class with WebCore.
2033         * dom/EventTargetFactory.in: Ensure a MediaRemoteControlsEventTargetInterfaceType is generated.
2034
2035 2015-06-01  Benjamin Poulain  <bpoulain@apple.com>
2036
2037         [CSS JIT] Fail to compile when we are out of executable memory
2038         https://bugs.webkit.org/show_bug.cgi?id=145483
2039         rdar://problem/21166612
2040
2041         Reviewed by Andreas Kling.
2042
2043         We should use a soft failure when the Linker fails to allocate
2044         executable memory for the CSS JIT. We will just fallback to slow
2045         code when that happen, better slow CSS than crashing.
2046
2047         Credit to Chris for finding this problem.
2048
2049         * cssjit/SelectorCompiler.cpp:
2050         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
2051
2052 2015-06-01  Chris Dumez  <cdumez@apple.com>
2053
2054         ASSERT(revalidatingResource.inCache()) in MemoryCache when reloading tumblr.com
2055         https://bugs.webkit.org/show_bug.cgi?id=145518
2056         <rdar://problem/21168573>
2057
2058         Reviewed by Darin Adler.
2059
2060         There was an assertion in MemoryCache::revalidationSucceeded() making
2061         sure that the resource that was revalidated is still in the memory
2062         cache. However, nothing prevents this resource from being pruned while
2063         it is being revalidated. We do make sure that the resource in question
2064         cannot be destroyed though (see CachedResource::canDelete()).
2065
2066         This patch gets rid of this assertion as it is incorrect. Also, the
2067         fact that the resource is no longer in the memory cache is not an
2068         issue. We are merely going to call MemoryCache::remove() to remove
2069         it from the memory cache before re-adding it and updating its
2070         HTTP response. The call to MemoryCache::remove() will simply be a
2071         no-op in this case and we will not have any problem adding the
2072         resource back to the memory cache because the resource is kept alive.
2073
2074         Test: http/tests/cache/memory-cache-pruning-during-revalidation.html
2075
2076         * loader/cache/MemoryCache.cpp:
2077         (WebCore::MemoryCache::revalidationSucceeded): Deleted.
2078
2079 2015-06-01  Matt Rajca  <mrajca@apple.com>
2080
2081         Add stub implementation of MediaRemoteControls, part of the Media Session spec.
2082         https://bugs.webkit.org/show_bug.cgi?id=145462
2083
2084         Reviewed by Eric Carlson.
2085
2086         * CMakeLists.txt: Added IDL file as well as the corresponding implementation file.
2087         * DerivedSources.make: Included the new IDL file.
2088         * Modules/mediasession/MediaRemoteControls.cpp: Added an empty implementation file.
2089         (MediaRemoteControls::~MediaRemoteControls):
2090         * Modules/mediasession/MediaRemoteControls.h: Added a stubbed header file with accessors for the four attributes declared in the IDL file.
2091         (WebCore::MediaRemoteControls::previousTrackEnabled):
2092         (WebCore::MediaRemoteControls::setPreviousTrackEnabled):
2093         (WebCore::MediaRemoteControls::nextTrackEnabled):
2094         (WebCore::MediaRemoteControls::setNextTrackEnabled):
2095         (WebCore::MediaRemoteControls::seekForwardEnabled):
2096         (WebCore::MediaRemoteControls::setSeekForwardEnabled):
2097         (WebCore::MediaRemoteControls::seekBackwardEnabled):
2098         (WebCore::MediaRemoteControls::setSeekBackwardEnabled):
2099         * Modules/mediasession/MediaRemoteControls.idl: Added from the Media Session spec.
2100         * WebCore.xcodeproj/project.pbxproj: Included the new IDL file and MediaRemoteControls.cpp/.h sources.
2101
2102 2015-06-01  Sergio Villar Senin  <svillar@igalia.com>
2103
2104         [CSS Grid Layout] Simplify the interface of GridResolvedPosition
2105         https://bugs.webkit.org/show_bug.cgi?id=139077
2106
2107         Reviewed by Darin Adler.
2108
2109         The interface of GridResolvedPosition is full of static methods
2110         that are used only internally, we should not expose them.
2111
2112         Apart from that resolveGridPositionsFromStyle() do always return
2113         a valid GridSpan from now on meaning that the caller has to ensure
2114         that the resolution does not require running the auto-placement
2115         algorithm. A new class called GridUnresolvedSpan was added for
2116         that purpose.
2117
2118         No new tests as this is a refactoring.
2119
2120         * rendering/RenderGrid.cpp:
2121         (WebCore::RenderGrid::placeItemsOnGrid):
2122         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
2123         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
2124         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2125         * rendering/style/GridPosition.h:
2126         * rendering/style/GridResolvedPosition.cpp:
2127         (WebCore::gridLinesForSide):
2128         (WebCore::implicitNamedGridLineForSide):
2129         (WebCore::isNonExistentNamedLineOrArea):
2130         (WebCore::GridUnresolvedSpan::requiresAutoPlacement):
2131         (WebCore::GridUnresolvedSpan::adjustGridPositionsFromStyle):
2132         (WebCore::adjustGridPositionForRowEndColumnEndSide):
2133         (WebCore::adjustGridPositionForSide):
2134         (WebCore::resolveNamedGridLinePositionFromStyle):
2135         (WebCore::firstNamedGridLineBeforePosition):
2136         (WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
2137         (WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
2138         (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
2139         (WebCore::resolveGridPositionAgainstOppositePosition):
2140         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
2141         (WebCore::resolveGridPositionFromStyle):
2142         (WebCore::GridResolvedPosition::GridResolvedPosition):
2143         (WebCore::GridResolvedPosition::unresolvedSpanFromStyle):
2144         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
2145         (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Deleted.
2146         (WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle): Deleted.
2147         (WebCore::GridResolvedPosition::resolveGridPositionFromStyle): Deleted.
2148         (WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition): Deleted.
2149         (WebCore::GridResolvedPosition::resolveNamedGridLinePositionAgainstOppositePosition): Deleted.
2150         (WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Deleted.
2151         (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Deleted.
2152         * rendering/style/GridResolvedPosition.h:
2153         (WebCore::GridUnresolvedSpan::GridUnresolvedSpan): New class.
2154         (WebCore::GridUnresolvedSpan::initialPosition):
2155         (WebCore::GridUnresolvedSpan::finalPosition):
2156         (WebCore::GridUnresolvedSpan::initialPositionSide):
2157         (WebCore::GridUnresolvedSpan::finalPositionSide):
2158         (WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide): Deleted.
2159         (WebCore::GridResolvedPosition::adjustGridPositionForSide): Deleted.
2160         (WebCore::GridResolvedPosition::GridResolvedPosition): Deleted.
2161
2162 2015-06-01  Csaba Osztrogon√°c  <ossy@webkit.org>
2163
2164         Fix the !ENABLE(VIDEO_TRACK) build after r184799
2165         https://bugs.webkit.org/show_bug.cgi?id=145510
2166
2167         Reviewed by Eric Carlson.
2168
2169         * testing/Internals.cpp:
2170         (WebCore::Internals::userPreferredAudioCharacteristics):
2171         (WebCore::Internals::setUserPreferredAudioCharacteristic):
2172
2173 2015-06-01  Csaba Osztrogon√°c  <ossy@webkit.org>
2174
2175         Fix logical-not-parentheses warning in CachedScript.cpp
2176         https://bugs.webkit.org/show_bug.cgi?id=145254
2177
2178         Reviewed by Sam Weinig.
2179
2180         * loader/cache/CachedScript.cpp:
2181         (WebCore::CachedScript::mimeTypeAllowedByNosniff): "!X==Y" should be "X!=Y" here.
2182
2183 2015-05-31  Dan Bernstein  <mitz@apple.com>
2184
2185         Remove Panther support
2186         https://bugs.webkit.org/show_bug.cgi?id=145506
2187
2188         Reviewed by Sam Weinig.
2189
2190         * platform/ios/wak/WAKAppKitStubs.h: Don't check for pre-Tiger SDKs.
2191
2192 2015-05-31  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2193
2194         Remove unused variable kZoomTicks.
2195         https://bugs.webkit.org/show_bug.cgi?id=145504
2196
2197         Reviewed by Sam Weinig.
2198
2199         No new tests, no behavior changes.
2200
2201         * platform/ScrollAnimatorNone.cpp:
2202
2203 2015-05-31  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2204
2205         Async XMLHttpRequest should get access to AppCache resources stored as flat files
2206         https://bugs.webkit.org/show_bug.cgi?id=138506
2207
2208         Reviewed by Darin Adler.
2209
2210         This patch reads flat file data when DocumentLoader substituteResource delivery timer is fired.
2211         Refactoring to remove ApplicationCacheHost/DocumentLoader friend link.
2212         Added ResourceLoader::deliverResponseAndData helper function, taking a SharedBuffer as input to remove an unneeded copy for flat files (no change for other files). 
2213
2214         Test: http/tests/appcache/simple-video-async.html
2215
2216         * loader/DocumentLoader.cpp:
2217         (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
2218         (WebCore::DocumentLoader::scheduleArchiveLoad):
2219         (WebCore::DocumentLoader::scheduleSubstituteResourceLoad): Helper function to remove ApplicationCacheHost friend link.
2220         * loader/DocumentLoader.h:
2221         * loader/ResourceLoader.cpp:
2222         (WebCore::ResourceLoader::deliverResponseAndData): Helper function, code mostly moved from DocumentLoader::substituteResourceDeliveryTimerFired.
2223         * loader/ResourceLoader.h:
2224         * loader/SubstituteResource.h:
2225         (WebCore::SubstituteResource::deliver): Introduced to be overriden by ApplicationCacheResource to take care of flat file case.
2226         * loader/appcache/ApplicationCacheHost.cpp:
2227         (WebCore::ApplicationCacheHost::maybeLoadResource):
2228         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
2229         * loader/appcache/ApplicationCacheResource.cpp:
2230         (WebCore::ApplicationCacheResource::deliver): Use SharedBuffer::createWithContentsOfFile to load data stored in flat file.
2231         * loader/appcache/ApplicationCacheResource.h:
2232
2233 2015-05-31  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2234
2235         [Streams API] Implement ReadableStreamController constructor
2236         https://bugs.webkit.org/show_bug.cgi?id=143752
2237
2238         Reviewed by Darin Adler.
2239
2240         Covered by rebased test and expectation.
2241
2242         * Modules/streams/ReadableStreamController.idl: Adding CustomConstructor.
2243         * bindings/js/JSReadableStreamControllerCustom.cpp:
2244         (WebCore::constructJSReadableStreamController): Throws an exception whenever called.
2245
2246 2015-05-30  Brady Eidson  <beidson@apple.com>
2247
2248         Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
2249         https://bugs.webkit.org/show_bug.cgi?id=145495
2250
2251         Reviewed by Alexey Proskuryakov.
2252
2253         No new tests (No change in behavior).
2254
2255         In most cases ownership of the Event is not actually being transferred, and these functions are all rarely called anyways.
2256         
2257         * html/HTMLLinkElement.cpp:
2258         (WebCore::HTMLLinkElement::handleClick):
2259         
2260         * loader/FrameLoader.cpp:
2261         (WebCore::FrameLoader::urlSelected):
2262         (WebCore::FrameLoader::loadFrameRequest):
2263         (WebCore::FrameLoader::loadURL):
2264         (WebCore::FrameLoader::loadPostRequest):
2265         * loader/FrameLoader.h:
2266
2267 2015-05-30  Andreas Kling  <akling@apple.com>
2268
2269         [iOS] Tiling coverage sometimes inflated by outdated scale factor.
2270         <https://webkit.org/b/145494>
2271         <rdar://problem/20989389>
2272
2273         Reviewed by Benjamin Poulain.
2274
2275         Have GraphicsLayerCA plumb the current contents scale through to TileController::adjustCoverageRect()
2276         instead of TileController getting it from TileGrid.
2277
2278         This avoids a situation where adjustCoverageRect() could cause temporarily oversized tiling coverage
2279         if called while TileGrid's content scale is outdated, and we're neither zooming or pinching, following
2280         a pinch zoom that increased the scale factor.
2281
2282         Specifically, if all the velocity data is zero, we pad the coverage rect by a horizontal and vertical
2283         margin computed like so:
2284
2285             margin = defaultTileSize / tileGrid.scale
2286
2287         If the actual scale is 5, but the TileGrid's outdated scale is e.g 0.8, you'll get a much larger
2288         margin than you really wanted. Then the whole thing gets scaled up by 5x later on, and we explode
2289         in a fiery feast of IOSurface allocations.
2290
2291         * platform/graphics/TiledBacking.h:
2292         * platform/graphics/ca/GraphicsLayerCA.cpp:
2293         (WebCore::GraphicsLayerCA::adjustCoverageRect):
2294         * platform/graphics/ca/TileController.cpp:
2295         (WebCore::TileController::computeTileCoverageRect):
2296         * platform/graphics/ca/TileController.h:
2297
2298 2015-05-30  Brady Eidson  <beidson@apple.com>
2299
2300         Fix Windows tests broken by r185007.
2301         https://bugs.webkit.org/show_bug.cgi?id=145472
2302
2303         Unreviewed. Discussed with Alexey Proskuryakov.
2304
2305         No new tests (Fixing the four broken ones should suffice).
2306
2307         The bug was that evaluating arguments in a method/constructor call has no guaranteed sequencing.
2308         
2309         Clang seems to always do LTR, allowing the PassRefPtr to be evaluated as a bool in the call to
2310         navigationType() before it is "consumed" by the PassRefPtr argument.
2311         
2312         In Visual Studio the PassRefPtr consumption happened before the bool evaluation, meaning `false`
2313         was always passed in to navigationType(), breaking the four tests.
2314         
2315         The fix? Using PassRefPtr here was silly in the first place.
2316         No ownership is being transferred.
2317         Raw pointers it is.
2318         
2319         * loader/FrameLoader.cpp:
2320         (WebCore::FrameLoader::loadURL):
2321         (WebCore::FrameLoader::loadPostRequest):
2322         * loader/NavigationAction.cpp:
2323
2324         (WebCore::NavigationAction::NavigationAction):
2325         * loader/NavigationAction.h: Nobody is actually transferring ownership of these Events.
2326           Raw pointers will work just fine, thanks.
2327
2328 2015-05-29  Joseph Pecoraro  <pecoraro@apple.com>
2329
2330         Unreviewed bindings test rebaseline after r185023.
2331
2332         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2333         (WebCore::isObservable): Deleted.
2334         (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots): Deleted.
2335
2336 2015-05-29  Andreas Kling  <akling@apple.com>
2337
2338         [iOS] Reduce tiling coverage when doing a pure pinch zoom with no panning.
2339         <https://webkit.org/b/145481>
2340         <rdar://problem/20989389>
2341
2342         Reviewed by Benjamin Poulain.
2343
2344         When we're zooming in with a pinch gesture but not panning the page
2345         at the same time, make the coverage rect be the visible rect.
2346
2347         This reduces memory pressure during zooming, especially on slower
2348         devices that struggle to keep up with the current viewport.
2349
2350         * platform/graphics/ca/TileController.cpp:
2351         (WebCore::TileController::computeTileCoverageRect):
2352
2353 2015-05-29  Keith Miller  <keith_miller@apple.com>
2354
2355         WeakMap reference w/ DOM element as key does not survive long enough.
2356         https://bugs.webkit.org/show_bug.cgi?id=137651
2357
2358         Reviewed by Geoffrey Garen.
2359
2360         Remove isObservable functions as an "unobservable wrappers"
2361         optimization is invalid with WeakMaps. Performance testing
2362         will be done after the code is commited. If major
2363         performance issues occur the patch will be rolled out.
2364
2365         Test: js/dom/weakmap-gc-unobservable-dom-nodes.html
2366
2367         * bindings/js/JSNodeCustom.cpp:
2368         (WebCore::isReachableFromDOM):
2369         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
2370         (WebCore::JSNode::insertBefore):
2371         (WebCore::isObservable): Deleted.
2372         * bindings/scripts/CodeGeneratorJS.pm:
2373         (GenerateImplementation):
2374
2375 2015-05-29  Anders Carlsson  <andersca@apple.com>
2376
2377         Get rid of WAKViewPrivate.h
2378         https://bugs.webkit.org/show_bug.cgi?id=145482
2379         rdar://problem/21162149
2380
2381         Reviewed by Dan Bernstein.
2382
2383         Merge WAKViewPrivate.h into WAKViewInternal.h and move the NSView sizing enum
2384         to WAKView.h since that was the only thing WebKit used (indirectly) from WAKViewPrivate.h.
2385
2386         * WebCore.xcodeproj/project.pbxproj:
2387         * platform/WAKViewInternal.h:
2388         (WAKViewForWKViewRef):
2389         * platform/ios/ScrollViewIOS.mm:
2390         * platform/ios/wak/WAKResponder.m:
2391         * platform/ios/wak/WAKView.h:
2392         * platform/ios/wak/WAKView.mm:
2393         * platform/ios/wak/WAKViewPrivate.h: Removed.
2394         (WAKViewForWKViewRef): Deleted.
2395         * platform/ios/wak/WAKWindow.mm:
2396         * platform/ios/wak/WKView.h:
2397         * platform/ios/wak/WKView.mm:
2398
2399 2015-05-29  Daniel Bates  <dabates@apple.com>
2400
2401         Clean up logic for updating caps lock indicator state
2402         https://bugs.webkit.org/show_bug.cgi?id=145329
2403
2404         Reviewed by Sam Weinig.
2405
2406         Remove logic to explicitly update the state of the caps lock indicator, which was used
2407         when the caps logic indicator was implemented as part of RenderTextControl. Currently,
2408         the caps logic indicator is implemented as part of a shadow DOM and we have existing
2409         logic to forward DOM focus and blur events to it so that it may update its state.
2410
2411         No change in behavior.
2412
2413         * editing/FrameSelection.cpp:
2414         (WebCore::FrameSelection::focusedOrActiveStateChanged): Deleted.
2415         * editing/FrameSelection.h:
2416         * page/EventHandler.cpp:
2417         (WebCore::EventHandler::keyEvent): Inline the code from EventHandler::capsLockStateMayHaveChanged()
2418         into this function because it is the only caller of EventHandler::capsLockStateMayHaveChanged() after
2419         we removed the call site in FrameSelection::focusedOrActiveStateChanged().
2420         (WebCore::EventHandler::capsLockStateMayHaveChanged): Deleted.
2421         * page/EventHandler.h:
2422
2423 2015-05-29  Zalan Bujtas  <zalan@apple.com>
2424
2425         Text disappears shortly after page load on Nexus 7 site.
2426         https://bugs.webkit.org/show_bug.cgi?id=145467
2427         rdar://problem/18327239
2428
2429         Reviewed by Simon Fraser.
2430
2431         This patch ensures that overlap testing for composited layers works properly when the sibling
2432         layer gets composited through its child.
2433
2434         When a layer gets composited through its child content, the recursive overlap testing should build up the
2435         overlapmap stack so that sibling content is intersected both against the child and its parent bounds.
2436
2437         Tests: compositing/sibling-layer-does-not-get-composited-overflow-hidden-case.html
2438                compositing/sibling-layer-does-not-get-composited-transform-case.html
2439
2440         * rendering/RenderLayerCompositor.cpp:
2441         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
2442         (WebCore::RenderLayerCompositor::OverlapMap::contains): Deleted.
2443
2444 2015-05-29  Brady Eidson  <beidson@apple.com>
2445
2446         Review feedback followup for r185003.
2447         https://bugs.webkit.org/show_bug.cgi?id=145463
2448
2449         Reviewed by Darin Adler.
2450
2451         * platform/sql/SQLiteDatabase.cpp:
2452         (WebCore::SQLiteDatabase::overrideUnauthorizedFunctions): `static const` one thing, c++-style cast another.
2453
2454 2015-05-29  Chris Dumez  <cdumez@apple.com>
2455
2456         WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
2457         https://bugs.webkit.org/show_bug.cgi?id=145422
2458         <rdar://problem/20613631>
2459
2460         Reviewed by Brady Eidson.
2461
2462         We sometimes crash when destroying a PageCache CachedFrame because its
2463         DocumentLoader is still loading. This should never happen as we are not
2464         supposed to let pages are still have pending loads into the PageCache.
2465
2466         However, we were using DocumentLoader::isLoadingInAPISense() as check
2467         in PageCache::canCachePageContainingThisFrame() which is not exactly
2468         what we want. isLoadingInAPISense() no longer considers subresource
2469         loads once the frame as loaded. This means if the JS triggers a new
2470         load in a subframe after it has been loaded, then isLoadingInAPISense()
2471         will return false, despite the pending load.
2472
2473         This patch replaces the isLoadingInAPISense() check with isLoading()
2474         as this will consider all pending loads, even after the frame is
2475         loaded.
2476
2477         In most cases, using isLoadingInAPISense() was not an issue because
2478         we call DocumentLoader::stopLoading() in all subframes before starting
2479         a provisional load. However, nothing seems to prevent JS from
2480         triggering a new load after that and before the new load gets committed
2481         (which is when we save the page into PageCache).
2482
2483         No new test as we don't have a reliable reproduction case and the
2484         issue is timing related.
2485
2486         * history/PageCache.cpp:
2487         (WebCore::logCanCacheFrameDecision):
2488         (WebCore::PageCache::canCachePageContainingThisFrame):
2489         * page/DiagnosticLoggingKeys.cpp:
2490         (WebCore::DiagnosticLoggingKeys::isLoading):
2491         (WebCore::DiagnosticLoggingKeys::loadingAPISenseKey): Deleted.
2492         * page/DiagnosticLoggingKeys.h:
2493
2494 2015-05-29  Chris Dumez  <cdumez@apple.com>
2495
2496         Consider throttling DOM timers in iframes outside the viewport
2497         https://bugs.webkit.org/show_bug.cgi?id=145465
2498         <rdar://problem/20768957>
2499
2500         Reviewed by Darin Adler.
2501
2502         Throttle DOM timers in iframes that are outside the viewport to decrease
2503         CPU usage, improve performance and reduce power use.
2504
2505         The approach is similar to what we already did for requestAnimationFrame
2506         in r183998.
2507
2508         We already has support for throttling DOM timers at:
2509         - Page level: for backgound pages
2510         - DOM timer level: for timers changing the style of an element outside
2511           the viewport or drawing on a canvas outside the viewport.
2512
2513         This patch adds support for throttling DOM timers at Document level so
2514         we can throttle all timers inside a specific iframe / Document. It relies
2515         on the same timerAlignmentInterval that is used for throttling at Page
2516         level with tweaks so that different Documents inside the same Page can
2517         have a different timerAlignmentInterval.
2518
2519         Test: fast/dom/timer-throttling-subframe.html
2520
2521         * dom/Document.cpp:
2522         (WebCore::Document::setTimerThrottlingEnabled):
2523         (WebCore::Document::timerAlignmentInterval):
2524         * dom/Document.h:
2525         (WebCore::Document::isTimerThrottlingEnabled):
2526         * page/DOMTimer.cpp:
2527         (WebCore::DOMTimer::alignedFireTime):
2528         The previous code was not throttling the timer if its fireTime was in
2529         the past. This was causing some aggressive timers on mashable.com to
2530         not be throttled so I got rid of this behavior. I don't see any reason
2531         why we would not throttle a timer simply because it is supposed to have
2532         fired already.
2533
2534         * page/FrameView.cpp:
2535         (WebCore::FrameView::viewportContentsChanged):
2536         (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
2537         * page/FrameView.h:
2538
2539         * testing/Internals.cpp:
2540         (WebCore::Internals::areTimersThrottled):
2541         * testing/Internals.h:
2542         * testing/Internals.idl:
2543         Add API to facilitate layout testing of this functionality.
2544
2545 2015-05-29  Brady Eidson  <beidson@apple.com>
2546
2547         NavigationAction constructor cleanup.
2548         https://bugs.webkit.org/show_bug.cgi?id=145472
2549
2550         Reviewed by Alex Christensen.
2551
2552         No new tests (Refactor, no change in behavior).
2553
2554         * loader/NavigationAction.cpp:
2555         (WebCore::NavigationAction::NavigationAction): Delegate many of the various constructors
2556           to a single full-featured constructor.
2557         * loader/NavigationAction.h:
2558
2559 2015-05-29  Matt Rajca  <mrajca@apple.com>
2560
2561         Rename MediaSession and MediaSessionClient to PlatformMediaSession and PlatformMediaSessionClient so we can use MediaSession for the formal implementation of the Media Session spec.
2562         https://bugs.webkit.org/show_bug.cgi?id=145447
2563
2564         Reviewed by Eric Carlson.
2565
2566         * Modules/webaudio/AudioContext.cpp:
2567         (WebCore::AudioContext::AudioContext):
2568         (WebCore::AudioContext::suspendPlayback):
2569         * Modules/webaudio/AudioContext.h:
2570         * WebCore.vcxproj/WebCore.vcxproj:
2571         * WebCore.vcxproj/WebCore.vcxproj.filters:
2572         * WebCore.xcodeproj/project.pbxproj:
2573         * html/HTMLAudioElement.h:
2574         * html/HTMLMediaElement.cpp:
2575         (WebCore::HTMLMediaElement::pausedForUserInteraction):
2576         (WebCore::HTMLMediaElement::mediaType):
2577         (WebCore::HTMLMediaElement::presentationType):
2578         (WebCore::HTMLMediaElement::displayType):
2579         (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand):
2580         * html/HTMLMediaElement.h:
2581         * html/HTMLMediaSession.cpp:
2582         (WebCore::HTMLMediaSession::HTMLMediaSession):
2583         (WebCore::HTMLMediaSession::requiresFullscreenForVideoPlayback):
2584         * html/HTMLMediaSession.h:
2585         * html/HTMLVideoElement.h:
2586         * platform/RemoteCommandListener.h:
2587         * platform/audio/MediaSessionManager.cpp:
2588         (WebCore::MediaSessionManager::resetRestrictions):
2589         (WebCore::MediaSessionManager::has):
2590         (WebCore::MediaSessionManager::activeAudioSessionRequired):
2591         (WebCore::MediaSessionManager::count):
2592         (WebCore::MediaSessionManager::beginInterruption):
2593         (WebCore::MediaSessionManager::endInterruption):
2594         (WebCore::MediaSessionManager::addSession):
2595         (WebCore::MediaSessionManager::removeSession):
2596         (WebCore::MediaSessionManager::addRestriction):
2597         (WebCore::MediaSessionManager::removeRestriction):
2598         (WebCore::MediaSessionManager::restrictions):
2599         (WebCore::MediaSessionManager::sessionWillBeginPlayback):
2600         (WebCore::MediaSessionManager::sessionWillEndPlayback):
2601         (WebCore::MediaSessionManager::setCurrentSession):
2602         (WebCore::MediaSessionManager::currentSession):
2603         (WebCore::MediaSessionManager::sessionRestrictsInlineVideoPlayback):
2604         (WebCore::MediaSessionManager::sessionCanLoadMedia):
2605         (WebCore::MediaSessionManager::applicationWillEnterBackground):
2606         (WebCore::MediaSessionManager::applicationWillEnterForeground):
2607         (WebCore::MediaSessionManager::didReceiveRemoteControlCommand):
2608         (WebCore::MediaSessionManager::systemWillSleep):
2609         (WebCore::MediaSessionManager::systemDidWake):
2610         * platform/audio/MediaSessionManager.h:
2611         (WebCore::MediaSessionManager::sessions):
2612         * platform/audio/PlatformMediaSession.cpp: Renamed from Source/WebCore/platform/audio/MediaSession.cpp.
2613         (WebCore::stateName):
2614         (WebCore::PlatformMediaSession::create):
2615         (WebCore::PlatformMediaSession::PlatformMediaSession):
2616         (WebCore::PlatformMediaSession::~PlatformMediaSession):
2617         (WebCore::PlatformMediaSession::setState):
2618         (WebCore::PlatformMediaSession::beginInterruption):
2619         (WebCore::PlatformMediaSession::endInterruption):
2620         (WebCore::PlatformMediaSession::clientWillBeginPlayback):
2621         (WebCore::PlatformMediaSession::clientWillPausePlayback):
2622         (WebCore::PlatformMediaSession::pauseSession):
2623         (WebCore::PlatformMediaSession::mediaType):
2624         (WebCore::PlatformMediaSession::presentationType):
2625         (WebCore::PlatformMediaSession::title):
2626         (WebCore::PlatformMediaSession::duration):
2627         (WebCore::PlatformMediaSession::currentTime):
2628         (WebCore::PlatformMediaSession::canReceiveRemoteControlCommands):
2629         (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand):
2630         (WebCore::PlatformMediaSession::visibilityChanged):
2631         (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
2632         (WebCore::PlatformMediaSession::updateClientDataBuffering):
2633         (WebCore::PlatformMediaSession::isHidden):
2634         (WebCore::PlatformMediaSession::displayType):
2635         (WebCore::PlatformMediaSessionClient::mediaSessionTitle):
2636         (WebCore::PlatformMediaSessionClient::mediaSessionDuration):
2637         (WebCore::PlatformMediaSessionClient::mediaSessionCurrentTime):
2638         * platform/audio/PlatformMediaSession.h: Renamed from Source/WebCore/platform/audio/MediaSession.h.
2639         (WebCore::PlatformMediaSession::state):
2640         (WebCore::PlatformMediaSession::canPlayToWirelessPlaybackTarget):
2641         (WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTarget):
2642         (WebCore::PlatformMediaSession::requiresPlaybackTargetRouteMonitoring):
2643         (WebCore::PlatformMediaSession::client):
2644         (WebCore::PlatformMediaSessionClient::PlatformMediaSessionClient):
2645         (WebCore::PlatformMediaSessionClient::displayType):
2646         (WebCore::PlatformMediaSessionClient::setShouldBufferData):
2647         (WebCore::PlatformMediaSessionClient::elementIsHidden):
2648         (WebCore::PlatformMediaSessionClient::wirelessRoutesAvailableDidChange):
2649         (WebCore::PlatformMediaSessionClient::setWirelessPlaybackTarget):
2650         (WebCore::PlatformMediaSessionClient::canPlayToWirelessPlaybackTarget):
2651         (WebCore::PlatformMediaSessionClient::isPlayingToWirelessPlaybackTarget):
2652         (WebCore::PlatformMediaSessionClient::setShouldPlayToPlaybackTarget):
2653         (WebCore::PlatformMediaSessionClient::~PlatformMediaSessionClient):
2654         * platform/audio/ios/MediaSessionManagerIOS.h:
2655         * platform/audio/ios/MediaSessionManagerIOS.mm:
2656         (WebCore::MediaSessionManageriOS::resetRestrictions):
2657         (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback):
2658         (WebCore::MediaSessionManageriOS::sessionWillEndPlayback):
2659         (WebCore::MediaSessionManageriOS::updateNowPlayingInfo):
2660         (WebCore::MediaSessionManageriOS::sessionCanLoadMedia):
2661         (-[WebMediaSessionHelper interruption:]):
2662         * platform/audio/mac/MediaSessionManagerMac.cpp:
2663         (MediaSessionManager::updateSessionState):
2664         * platform/graphics/MediaPlayer.cpp:
2665         (WebCore::MediaPlayer::handlePlaybackCommand):
2666         * platform/graphics/MediaPlayer.h:
2667         (WebCore::MediaPlayerClient::mediaPlayerHandlePlaybackCommand):
2668         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2669         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
2670         * platform/ios/RemoteCommandListenerIOS.mm:
2671         (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS):
2672         * testing/Internals.cpp:
2673         (WebCore::Internals::beginMediaSessionInterruption):
2674         (WebCore::Internals::endMediaSessionInterruption):
2675         (WebCore::Internals::setMediaSessionRestrictions):
2676         (WebCore::Internals::postRemoteControlCommand):
2677
2678 2015-05-29  Alex Christensen  <achristensen@webkit.org>
2679
2680         [Content Extensions] Decrease maxNFASize
2681         https://bugs.webkit.org/show_bug.cgi?id=145461
2682
2683         Reviewed by Gavin Barraclough.
2684
2685         * contentextensions/ContentExtensionCompiler.cpp:
2686         (WebCore::ContentExtensions::compileRuleList):
2687         Decrease maxNFASize based on analysis of memory usage and compiling and interpreting time.
2688
2689 2015-05-29  Brady Eidson  <beidson@apple.com>
2690
2691         WebSQL default functions can bypass authorizer.
2692         <rdar://problem/21048994> and https://bugs.webkit.org/show_bug.cgi?id=145463
2693
2694         Reviewed by Sam Weinig and Alexey Proskuryakov.
2695
2696         No new tests yet.
2697
2698         * platform/sql/SQLiteDatabase.cpp:
2699         (WebCore::unauthorizedSQLFunction): Function to install into SQLite to override some built-in functions.
2700         (WebCore::SQLiteDatabase::open):
2701         (WebCore::SQLiteDatabase::overrideUnauthorizedFunctions): Install function overrides for functions that
2702            take arbitrary input that are also meant to be disabled by virtue of them not being whitelisted.
2703         * platform/sql/SQLiteDatabase.h:
2704
2705 2015-05-29  Roger Fong  <roger_fong@apple.com>
2706
2707         Unreviewed. Shift fullscreen controls down 20px.
2708         <rdar://problem/21161523>
2709
2710         * Modules/mediacontrols/mediaControlsApple.css:
2711         (video:-webkit-full-screen::-webkit-media-controls-panel):
2712         Fullscreen control panel is too high and overlaps with caption menu.
2713         Shift it down 20px.
2714
2715 2015-05-28  Simon Fraser  <simon.fraser@apple.com>
2716
2717         Some assertion failures in compositing code after r183820
2718         https://bugs.webkit.org/show_bug.cgi?id=144630
2719
2720         Reviewed by Alexey Proskuryakov.
2721
2722         Reinstate the assertion commented out in r183843. Fixed by having blending no longer
2723         escape the media elements, which was fixed via bug 145420.
2724
2725         * rendering/RenderLayerCompositor.cpp:
2726         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2727
2728 2015-05-29  Hunseop Jeong  <hs85.jeong@samsung.com>
2729
2730         Use modern for-loops in WebCore/plugins, storage, style, testing and workers.
2731         https://bugs.webkit.org/show_bug.cgi?id=145425
2732
2733         Reviewed by Darin Adler.
2734
2735         No new tests, no behavior changes.
2736
2737         * plugins/DOMMimeTypeArray.cpp:
2738         (WebCore::DOMMimeTypeArray::canGetItemsForName):
2739         * plugins/DOMPlugin.cpp:
2740         (WebCore::DOMPlugin::canGetItemsForName):
2741         * plugins/DOMPluginArray.cpp:
2742         (WebCore::DOMPluginArray::canGetItemsForName):
2743         * plugins/PluginData.cpp:
2744         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
2745         * plugins/PluginMainThreadScheduler.cpp:
2746         (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin):
2747         (WebCore::PluginMainThreadScheduler::dispatchCalls):
2748         * storage/StorageEventDispatcher.cpp:
2749         (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
2750         (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
2751         (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
2752         * storage/StorageMap.cpp:
2753         (WebCore::StorageMap::importItems):
2754         * style/StyleResolveTree.cpp:
2755         (WebCore::Style::pseudoStyleCacheIsInvalid):
2756         * testing/Internals.cpp:
2757         (WebCore::Internals::nodesFromRect):
2758         * workers/Worker.cpp:
2759         (WebCore::networkStateChanged):
2760         * workers/WorkerGlobalScope.cpp:
2761         (WebCore::WorkerGlobalScope::importScripts):
2762
2763 2015-05-29  Alex Christensen  <achristensen@webkit.org>
2764
2765         Unreviewed build fix when using content extensions debugging.
2766
2767         * contentextensions/ContentExtensionCompiler.cpp:
2768         (WebCore::ContentExtensions::compileRuleList):
2769         Update variable name.
2770
2771 2015-05-29  Brady Eidson  <beidson@apple.com>
2772
2773         Typo followup to r184987
2774
2775         Unreviewed.
2776
2777         * loader/FrameLoader.cpp:
2778         (WebCore::FrameLoader::loadURLIntoChildFrame): Misplaced brace.
2779
2780 2015-05-29  Brady Eidson  <beidson@apple.com>
2781
2782         Small FrameLoader refactoring.
2783         https://bugs.webkit.org/show_bug.cgi?id=145459
2784
2785         Reviewed by Alex Christensen.
2786
2787         No new tests (No behavior change).
2788
2789         * loader/FrameLoader.cpp:
2790         (WebCore::FrameLoader::loadURLIntoChildFrame):
2791         (WebCore::FrameLoader::loadFrameRequest):
2792         (WebCore::FrameLoader::loadURL):
2793         (WebCore::FrameLoader::loadPostRequest):
2794         * loader/FrameLoader.h:
2795
2796 2015-05-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2797
2798         MediaDevices.getUserMedia should reject promise instead of throwing exceptions
2799         https://bugs.webkit.org/show_bug.cgi?id=145282
2800
2801         Reviewed by Darin Adler.
2802
2803         Ensuring at the custom binding level that all potential errors are used to reject promise.
2804         Cleaned up the wrappers by removing unneeded RefPtr.
2805
2806         Covered by modified test.
2807
2808         * Modules/mediastream/MediaDevices.cpp:
2809         (WebCore::MediaDevices::getUserMedia):
2810         * Modules/mediastream/MediaDevices.h:
2811         * Modules/mediastream/UserMediaRequest.cpp:
2812         (WebCore::UserMediaRequest::create):
2813         * bindings/js/JSMediaDevicesCustom.cpp:
2814         (WebCore::JSMediaDevices::getUserMedia):
2815
2816 2015-05-28  Hunseop Jeong  <hs85.jeong@samsung.com>
2817
2818         Replaced 0 with nullptr in WebCore/accessibility.
2819         https://bugs.webkit.org/show_bug.cgi?id=145309
2820
2821         Reviewed by Chris Fleizach.
2822
2823         No new tests, no behavior change.
2824
2825         * accessibility/AccessibilityRenderObject.cpp:
2826         (WebCore::AccessibilityRenderObject::mathPrescripts):
2827         (WebCore::AccessibilityRenderObject::mathPostscripts):
2828         * accessibility/AccessibilityScrollView.cpp:
2829         (WebCore::AccessibilityScrollView::scrollBar):
2830         * accessibility/atk/AXObjectCacheAtk.cpp:
2831         (WebCore::notifyChildrenSelectionChange):
2832         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
2833         (webkitAccessibleHyperlinkInit):
2834         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
2835         (webkitAccessibleDocumentGetAttributes):
2836         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2837         (getAttributeSetForAccessibilityObject):
2838         (attributeSetDifference):
2839         * accessibility/atk/WebKitAccessibleUtil.h:
2840         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2841         (webkitAccessibleRefChild):
2842         (webkitAccessibleGetAttributes):
2843         (webkitAccessibleGetObjectLocale):
2844         (getInterfaceMaskFromObject):
2845         (objectFocusedAndCaretOffsetUnignored):
2846         (cacheAndReturnAtkProperty):
2847
2848 2015-05-28  Zalan Bujtas  <zalan@apple.com>
2849
2850         Subpixel rendering: Pixel crack in text selection of simple text in <textarea>.
2851         https://bugs.webkit.org/show_bug.cgi?id=145393
2852         rdar://problem/19918941
2853
2854         Reviewed by Darin Adler.
2855
2856         Float to LayoutUnit conversion is lossy. To ensure that selection
2857         painting always lines up (snaps) properly, the calculated width needs to
2858         be adjusted by ceiling the float to the next LayoutUnit value.
2859
2860         Test: fast/text/hidpi-text-selection-gap-between-words.html
2861
2862         * platform/graphics/FontCascade.cpp:
2863         (WebCore::FontCascade::adjustSelectionRectForSimpleText):
2864         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2865         (WebCore::FontCascade::adjustSelectionRectForComplexText):
2866
2867 2015-05-28  Andreas Kling  <akling@apple.com>
2868
2869         GraphicsLayerCA should start out with m_intersectsCoverageRect=false
2870         <https://webkit.org/b/145443>
2871         <rdar://problem/19685798>
2872
2873         Reviewed by Simon Fraser.
2874
2875         Since the coverage rect of a newly-constructed GraphicsLayerCA is always empty,
2876         there's no way that the layer's own bounding box can intersect with it.
2877         Hence the m_intersectsCoverageRect flag should be false after construction.
2878
2879         This fixes an issue where compositing layers in subframes would be marked as
2880         non-volatile, despite being far outside the viewport and coverage rect.
2881
2882         Test: compositing/visible-rect/iframe-with-layers-outside-viewport.html
2883
2884         * platform/graphics/ca/GraphicsLayerCA.cpp:
2885         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2886
2887 2015-05-28  Commit Queue  <commit-queue@webkit.org>
2888
2889         Unreviewed, rolling out r184796 and r184832.
2890         https://bugs.webkit.org/show_bug.cgi?id=145449
2891
2892         2% performance regression (Requested by litherum on #webkit).
2893
2894         Reverted changesets:
2895
2896         "[Cocoa] Use CTFontDrawGlyphs() instead of
2897         CGContextShowGlyphsWithAdvances()/CGContextShowGlyphsAtPositions()"
2898         https://bugs.webkit.org/show_bug.cgi?id=145234
2899         http://trac.webkit.org/changeset/184796
2900
2901         "Cleanup after r184796"
2902         https://bugs.webkit.org/show_bug.cgi?id=145333
2903         http://trac.webkit.org/changeset/184832
2904
2905 2015-05-28  Matt Rajca  <mrajca@apple.com>
2906
2907         Rename HTMLMediaSession to MediaElementSession to reserve "media session" for the Media Session API.
2908         https://bugs.webkit.org/show_bug.cgi?id=145440
2909
2910         Reviewed by Eric Carlson.
2911
2912         * CMakeLists.txt:
2913         * WebCore.vcxproj/WebCore.vcxproj:
2914         * WebCore.vcxproj/WebCore.vcxproj.filters:
2915         * WebCore.xcodeproj/project.pbxproj:
2916         * html/HTMLMediaElement.cpp:
2917         (WebCore::HTMLMediaElement::HTMLMediaElement):
2918         (WebCore::HTMLMediaElement::loadInternal):
2919         (WebCore::HTMLMediaElement::loadResource):
2920         (WebCore::HTMLMediaElement::suspend):
2921         (WebCore::HTMLMediaElement::resume):
2922         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
2923         (WebCore::HTMLMediaElement::mediaState):
2924         * html/HTMLMediaElement.h:
2925         (WebCore::HTMLMediaElement::mediaSession):
2926         * html/MediaElementSession.cpp: Renamed from Source/WebCore/html/HTMLMediaSession.cpp.
2927         (WebCore::restrictionName):
2928         (WebCore::MediaElementSession::MediaElementSession):
2929         (WebCore::MediaElementSession::registerWithDocument):
2930         (WebCore::MediaElementSession::unregisterWithDocument):
2931         (WebCore::MediaElementSession::addBehaviorRestriction):
2932         (WebCore::MediaElementSession::removeBehaviorRestriction):
2933         (WebCore::MediaElementSession::playbackPermitted):
2934         (WebCore::MediaElementSession::dataLoadingPermitted):
2935         (WebCore::MediaElementSession::fullscreenPermitted):
2936         (WebCore::MediaElementSession::pageAllowsDataLoading):
2937         (WebCore::MediaElementSession::pageAllowsPlaybackAfterResuming):
2938         (WebCore::MediaElementSession::showPlaybackTargetPicker):
2939         (WebCore::MediaElementSession::hasWirelessPlaybackTargets):
2940         (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled):
2941         (WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
2942         (WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
2943         (WebCore::MediaElementSession::setPlaybackTarget):
2944         (WebCore::MediaElementSession::targetAvailabilityChangedTimerFired):
2945         (WebCore::MediaElementSession::externalOutputDeviceAvailableDidChange):
2946         (WebCore::MediaElementSession::canPlayToWirelessPlaybackTarget):
2947         (WebCore::MediaElementSession::isPlayingToWirelessPlaybackTarget):
2948         (WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):
2949         (WebCore::MediaElementSession::mediaStateDidChange):
2950         (WebCore::MediaElementSession::effectivePreloadForElement):
2951         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
2952         (WebCore::MediaElementSession::mediaEngineUpdated):
2953         (WebCore::MediaElementSession::allowsAlternateFullscreen):
2954         (WebCore::MediaElementSession::maximumMediaSourceBufferSize):
2955         * html/MediaElementSession.h: Renamed from Source/WebCore/html/HTMLMediaSession.h.
2956         * testing/Internals.cpp:
2957         (WebCore::Internals::setMediaElementRestrictions):
2958         (WebCore::Internals::setAudioContextRestrictions):
2959
2960 2015-05-28  Myles C. Maxfield  <mmaxfield@apple.com>
2961
2962         Crash under ICU with ASAN during editing/selection/move-by-word-visually-crash-test-5.html
2963         https://bugs.webkit.org/show_bug.cgi?id=145429
2964         <rdar://problem/20992218>
2965
2966         Reviewed by Alexey Proskuryakov.
2967
2968         WebKit uses some strings which contain the lower 8-bits of UTF-16 (thereby saving space). However,
2969         ICU doesn't understand this encoding. When we want to use ICU functions with strings in this encoding,
2970         we create a UTextProvider which converts our encoded strings to UTF-16 for ICU, one chunk at a time.
2971         This object contains a vtable which we populate to perform the conversion.
2972
2973         The WebKit function which actually returns the UTF-16 chunks has two relevant arguments: an index into
2974         the encoded string which ICU is requesting, and a direction from that index which ICU is interested
2975         in. This function populates a "chunk" which is characterized by a pointer to a buffer, the length of
2976         the populated data in the buffer, and an offset into the chunk which represents the index that the
2977         requested character was put into.
2978
2979         When ICU requests data going backward, we fill in the chunk accordingly, with the requested character
2980         all the way at the end. We then set the offset equal to the length of the buffer. However, this length
2981         value is stale from the previous time the function ran. Therefore, ICU was reading the wrong index in
2982         the chunk when expecting the requested character.
2983
2984         Covered by editing/selection/move-by-word-visually-crash-test-5.html.
2985
2986         * platform/text/icu/UTextProviderLatin1.cpp:
2987         (WebCore::uTextLatin1Access):
2988
2989 2015-05-28  Eric Carlson  <eric.carlson@apple.com>
2990
2991         [iOS] Fix controls bug caused by r184794
2992         https://bugs.webkit.org/show_bug.cgi?id=145445
2993
2994         Reviewed by Dean Jackson.
2995
2996         * Modules/mediacontrols/mediaControlsiOS.js:
2997         (ControllerIOS.prototype.showControls): Check video.controls instead of trying to call
2998         showInlinePlaybackPlaceholderOnly, which doesn't exist.
2999
3000 2015-05-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
3001
3002         Code clean up for extracting information from the mix of WritingMode and TextDirection
3003         https://bugs.webkit.org/show_bug.cgi?id=143399
3004
3005         Reviewed by Darin Adler.
3006         
3007         There should be eight TextFlows. A TextFlow consists of two directions.
3008         The first one controls the inline growing direction and the second one
3009         controls the block growing direction. We are going to use the cardinal
3010         directions to define these combinations.
3011
3012         We need to extract the following information easily from the TextFlow
3013
3014         -- isTextFlowReversed() // RTL
3015         -- isTextFlowFlipped()  // the opposite direction to normal
3016         -- isTextFlowVertical() // The line grows vertically
3017         
3018         Mixing WritingMode and TextDirection into TextFlow and choosing their values
3019         carefully to ease implementing the above functions can make things clearer.
3020
3021         * Modules/notifications/Notification.h:
3022         * platform/graphics/TextRun.h:
3023         * platform/ios/SelectionRect.h:
3024         * platform/text/BidiResolver.h:
3025         * platform/text/StringWithDirection.h:
3026         * platform/text/TextFlags.h:
3027         (WebCore::isLeftToRightDirection): Deleted.
3028         enum TextDirection is moved from TextFlags.h to WritingMode.h. So include
3029         WritingMode.h instead of including TextFlags.h.
3030         
3031         * css/CSSProperty.cpp:
3032         (WebCore::resolveToPhysicalProperty): Instead of handling the eight possible
3033         cases of the text flows one by one, we can map from a LogicalSide to a
3034         PhysicalSide using the TextFlow value.
3035         
3036         * platform/LengthBox.h:
3037         (WebCore::BoxExtent::before):
3038         (WebCore::BoxExtent::after):
3039         (WebCore::BoxExtent::start):
3040         (WebCore::BoxExtent::end):
3041         Use mapLogicalSideToPhysicalSide() to convert from a LogicalSide to a PhysicalSide.
3042         
3043         * platform/text/WritingMode.h:
3044         (WebCore::isLeftToRightDirection): Usually the default enum is defined
3045         first. And usually the default value is equal to zero. Since LTR is the
3046         default for the text direction, it should be defined before RTL.
3047         
3048         (WebCore::makeTextFlow): Returns a TextFlow given a WritingMode and a
3049         TextDirection.
3050         
3051         (WebCore::isReversedTextFlow): Returns true if the text direction is RTL.
3052         
3053         (WebCore::isFlippedTextFlow):
3054         (WebCore::isFlippedWritingMode): Returns true if the block growing direction
3055         is in the opposite direction of normal.
3056         
3057         (WebCore::isVerticalTextFlow):
3058         (WebCore::isVerticalWritingMode): Returns true if the line grows vertically.
3059                
3060         (WebCore::isHorizontalWritingMode):
3061         (WebCore::isFlippedLinesWritingMode): Use isVerticalWritingMode() and 
3062         isFlippedWritingMode() to answer these questions.
3063         
3064         (WebCore::isHorizontalPhysicalSide): 
3065         (WebCore::mirrorPhysicalSide): top <-> bottom and left <-> right conversion.
3066         (WebCore::rotatePhysicalSide): top <-> left and right <-> bottom conversion.
3067         
3068         (WebCore::mapLogicalSideToPhysicalSide): Maps a LogicalSide to a PhysicalSide
3069         using either the TextFlow or the WritingMode.
3070         
3071         (WebCore::isFlippedBlocksWritingMode): Deleted.
3072         * rendering/RenderMultiColumnSet.cpp:
3073         (WebCore::RenderMultiColumnSet::collectLayerFragments):
3074         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
3075         * rendering/shapes/Shape.cpp:
3076         (WebCore::physicalRectToLogical):
3077         (WebCore::physicalPointToLogical):
3078         * rendering/style/RenderStyle.h:
3079         Rename isFlippedBlocksWritingMode() to be isFlippedWritingMode() so we can
3080         be consistent with other WritingMode query functions.
3081
3082 2015-05-28  Matt Rajca  <mrajca@apple.com>
3083
3084         Add ENABLE_MEDIA_SESSION feature flag (which is off by default).
3085         https://bugs.webkit.org/show_bug.cgi?id=145415
3086
3087         Reviewed by Eric Carlson.
3088
3089         * Configurations/FeatureDefines.xcconfig:
3090
3091 2015-05-28  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3092
3093         [Streams API] ReadableStreamReader should not be exposed
3094         https://bugs.webkit.org/show_bug.cgi?id=143564
3095
3096         Reviewed by Darin Adler.
3097
3098         Covered by rebased tests.
3099
3100         * Modules/streams/ReadableStreamReader.idl: Adding NoInterfaceObject to ReadableStreamReader.idl.
3101
3102 2015-05-28  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3103
3104         [CMake] Improve detection and usage of GL/GLES/EGL libraries.
3105         https://bugs.webkit.org/show_bug.cgi?id=145408
3106
3107         Reviewed by Carlos Garcia Campos.
3108
3109         No new tests, no behavior changes.
3110
3111         * CMakeLists.txt: Ensure that we include the libraries and includes
3112         for the GL/GLESv2/EGL libraries before including the ANGLE directories.
3113         Define also any CFLAG that the system GL/GLESv2/EGL libraries may need.
3114         * PlatformEfl.cmake: Remove some includes that are now unneeded,
3115         because we are including now the EGL libraries on CMakeLists.txt
3116         * PlatformGTK.cmake: Remove unneeded include (We are including the EGL
3117         libraries now on CMakeLists.txt)
3118
3119 2015-05-28  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3120
3121         Binding generator should support interfaces with CustomConstructor and NoInterfaceObject
3122         https://bugs.webkit.org/show_bug.cgi?id=145016
3123
3124         Reviewed by Darin Adler.
3125
3126         Updated code generator to generate the necessary declarations (constructor property in the prototype, the constructor class).
3127         In the case of CustomConstructor with NoInterfaceObject, the implementation of the constructor property related JS function is changed as follow:
3128         It creates a constructor object and shadows the constructor property JS function with this object.
3129         This ensures that only one constructor object is created per prototype.
3130         The constructor is not exposed as it is not added to the global object constructor map.
3131
3132         NoInterfaceObject is asking to not make the interface visible, which is contradictory with having a visible constructor of the interface.
3133         The case for having NoInterfaceObject and CustomConstructor is the following:
3134         We do not want to expose the interface but we still want to have a constructor property on the prototype of objects implementing the interface.
3135         One such case is https://streams.spec.whatwg.org/#globals
3136
3137         Added TestCustomConstructorWithNoInterfaceObject.idl to check that case.
3138
3139         * bindings/scripts/CodeGeneratorJS.pm:
3140         (GenerateHeader):
3141         (GenerateAttributesHashTable):
3142         (GenerateImplementation):
3143         (HasConstructorProperty):
3144         * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.cpp: Added.
3145         (WebKit::kit):
3146         (WebKit::core):
3147         (WebKit::wrapTestCustomConstructorWithNoInterfaceObject):
3148         (webkit_dom_test_custom_constructor_with_no_interface_object_finalize):
3149         (webkit_dom_test_custom_constructor_with_no_interface_object_constructor):
3150         (webkit_dom_test_custom_constructor_with_no_interface_object_class_init):
3151         (webkit_dom_test_custom_constructor_with_no_interface_object_init):
3152         * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.h: Added.
3153         * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObjectPrivate.h: Added.
3154         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Added.
3155         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::create):
3156         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure):
3157         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::JSTestCustomConstructorWithNoInterfaceObjectPrototype):
3158         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
3159         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
3160         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
3161         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
3162         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
3163         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
3164         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
3165         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype):
3166         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype):
3167         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::destroy):
3168         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject):
3169         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
3170         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getConstructor):
3171         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::isReachableFromOpaqueRoots):
3172         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
3173         (WebCore::toJS):
3174         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
3175         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Added.
3176         (WebCore::wrapperOwner):
3177         (WebCore::toJS):
3178         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.h: Added.
3179         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm: Added.
3180         (-[DOMTestCustomConstructorWithNoInterfaceObject dealloc]):
3181         (-[DOMTestCustomConstructorWithNoInterfaceObject finalize]):
3182         (core):
3183         (kit):
3184         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObjectInternal.h: Added.
3185         * bindings/scripts/test/TestCustomConstructor.idl: Added.
3186
3187 2015-05-19  Jon Honeycutt  <jhoneycutt@apple.com>
3188
3189         [iOS] When viewing an MJPEG stream as the main resource, only the first
3190         frame paints
3191
3192         <https://bugs.webkit.org/show_bug.cgi?id=145185>
3193         <rdar://problem/20124694>
3194
3195         This bug is caused by state not being restored between successive loads
3196         of multipart/x-mixed-replace content. Each part of the stream is not
3197         treated as a wholly new load, so if state is cleared as part of the
3198         previous page being destroyed, it may not be restored when loading
3199         the next stream part.
3200
3201         On WK1, tile cache updates are disabled in FrameView::clear(), which is
3202         called as the previous page is destroyed, but were not being
3203         reenabled when loading new replacement content from the stream.
3204
3205         On WK2, the exposed content rect was being reset to an empty rect as
3206         the previous page was destroyed, but it was not being reset by loading
3207         replacement content.
3208
3209         To fix these issues, I added two WebFrameLoaderClient callbacks;
3210         willReplaceMultipartContent() and didReplaceMultipartContent(). These
3211         are used to save and restore state between successive loads.
3212
3213         Reviewed by Darin Adler.
3214
3215         * loader/DocumentLoader.cpp:
3216         Call the new client callbacks.
3217         (WebCore::DocumentLoader::commitLoad):
3218         If replacing content in a multipart/x-mixed-replace stream, call the
3219         WebFrameLoaderClient's didReplaceMultipartContent().
3220
3221         (WebCore::DocumentLoader::setupForReplace):
3222         Call the WebFrameLoaderClient's willReplaceMultipartContent().
3223
3224         * loader/EmptyClients.h:
3225
3226         * loader/FrameLoaderClient.h:
3227
3228         * page/FrameView.cpp:
3229         (WebCore::FrameView::didReplaceMultipartContent):
3230         Re-enable tile cache updates that were disabled in FrameView::clear().
3231         This fixes the issue for WK1.
3232
3233         * page/FrameView.h:
3234         Declare an exported function, didReplaceMultipartContent(), that WebKit
3235         can call.
3236
3237 2015-05-27  Brady Eidson  <beidson@apple.com>
3238
3239         Remove unused ResourceRequest "user initiated" flag.
3240         https://bugs.webkit.org/show_bug.cgi?id=145428
3241
3242         Reviewed by Alexey Proskuryakov.
3243
3244         No new tests (No change in behavior).
3245
3246         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3247         * platform/mac/WebCoreSystemInterface.mm:
3248
3249         * platform/network/ResourceRequestBase.h:
3250         (WebCore::ResourceRequestBase::initiatedByUserGesture): Deleted.
3251         (WebCore::ResourceRequestBase::setInitiatedByUserGesture): Deleted.
3252         (WebCore::ResourceRequestBase::encodeWithoutPlatformData): Deleted.
3253         (WebCore::ResourceRequestBase::decodeWithoutPlatformData): Deleted.
3254
3255         * platform/network/cf/ResourceRequestCFNet.cpp:
3256         (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
3257         (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
3258
3259         * platform/network/cocoa/ResourceRequestCocoa.mm:
3260         (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
3261         (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
3262
3263 2015-05-27  Brady Eidson  <beidson@apple.com>
3264
3265         Add a "should open urls externally" flag to DocumentLoader.
3266         rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145417
3267
3268         Reviewed by Geoff Garen.
3269
3270         No new tests (No change in behavior, testable at API level with a followup patch)
3271
3272         * loader/DocumentLoader.cpp:
3273         (WebCore::DocumentLoader::setTriggeringAction): Apply the current flag value to the 
3274           new NavigationAction so it can be used later.
3275         * loader/DocumentLoader.h:
3276         (WebCore::DocumentLoader::setShouldOpenExternalURLsPolicy):
3277         (WebCore::DocumentLoader::shouldOpenExternalURLsPolicy):
3278         (WebCore::DocumentLoader::setTriggeringAction): Deleted.
3279
3280         FrameLoadRequest should hold the new flag to pass into FrameLoader machinery:
3281         * loader/FrameLoadRequest.h:
3282         (WebCore::FrameLoadRequest::setShouldOpenExternalURLsPolicy):
3283         (WebCore::FrameLoadRequest::shouldOpenExternalURLsPolicy):
3284
3285         * loader/FrameLoader.cpp:
3286         (WebCore::FrameLoader::load): Set the flag on the newly created DocumentLoader but
3287           only if it is for the main frame.
3288
3289         * loader/FrameLoaderTypes.h: Add a new enum for the flag.
3290
3291         Navigation action should hold the new flag to pass to the policy delegate:
3292         * loader/NavigationAction.cpp:
3293         (WebCore::NavigationAction::NavigationAction):
3294         * loader/NavigationAction.h:
3295         (WebCore::NavigationAction::shouldOpenExternalURLsPolicy):
3296         (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy):
3297
3298         * loader/PolicyChecker.cpp:
3299         (WebCore::PolicyChecker::checkNavigationPolicy): Include the flag from the DocumentLoader
3300           in the NavigationAction.
3301
3302 2015-05-27  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3303
3304         Purge PassRefPtr in WebCore/Modules - 2
3305         https://bugs.webkit.org/show_bug.cgi?id=145304
3306
3307         Reviewed by Darin Adler.
3308
3309         As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.
3310
3311         No new tests, no behavior changes
3312
3313         * Modules/mediasource/SourceBufferList.h:
3314         * Modules/mediastream/AllAudioCapabilities.h:
3315         (WebCore::AllAudioCapabilities::create):
3316         * Modules/mediastream/AllVideoCapabilities.h:
3317         (WebCore::AllVideoCapabilities::create):
3318         * Modules/mediastream/CapabilityRange.cpp:
3319         (WebCore::CapabilityRange::create):
3320         * Modules/mediastream/CapabilityRange.h:
3321         * Modules/mediastream/MediaSourceStates.cpp:
3322         (WebCore::MediaSourceStates::create):
3323         * Modules/mediastream/MediaStream.cpp:
3324         (WebCore::MediaStream::create):
3325         * Modules/mediastream/MediaStreamTrack.cpp:
3326         (WebCore::MediaStreamTrack::create):
3327         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
3328         (WebCore::MediaStreamTrackSourcesRequest::create):
3329         * Modules/mediastream/MediaTrackConstraint.cpp:
3330         (WebCore::MediaTrackConstraint::create):
3331         * Modules/mediastream/MediaTrackConstraint.h:
3332         * Modules/mediastream/RTCConfiguration.h:
3333         (WebCore::RTCConfiguration::create):
3334         * Modules/mediastream/RTCIceServer.h:
3335         (WebCore::RTCIceServer::create):
3336         * Modules/mediastream/RTCSessionDescription.cpp:
3337         (WebCore::RTCSessionDescription::create):
3338         * Modules/mediastream/RTCSessionDescription.h:
3339         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
3340         (WebCore::RTCSessionDescriptionRequestImpl::create):
3341         * Modules/mediastream/RTCStatsReport.cpp:
3342         (WebCore::RTCStatsReport::create):
3343         * Modules/mediastream/RTCStatsReport.h:
3344         * Modules/mediastream/RTCStatsRequestImpl.cpp:
3345         (WebCore::RTCStatsRequestImpl::create):
3346         * Modules/mediastream/RTCStatsRequestImpl.h:
3347         * Modules/mediastream/RTCStatsResponse.cpp:
3348         (WebCore::RTCStatsResponse::create):
3349         * Modules/mediastream/RTCStatsResponse.h:
3350         * Modules/mediastream/RTCVoidRequestImpl.cpp:
3351         (WebCore::RTCVoidRequestImpl::create):
3352         * Modules/mediastream/RTCVoidRequestImpl.h:
3353         * Modules/mediastream/SourceInfo.cpp:
3354         (WebCore::SourceInfo::create):
3355         * Modules/mediastream/SourceInfo.h:
3356         * Modules/mediastream/UserMediaRequest.cpp:
3357         (WebCore::UserMediaRequest::create):
3358         * Modules/mediastream/UserMediaRequest.h:
3359         * Modules/quota/StorageInfo.h:
3360         (WebCore::StorageInfo::create):
3361         * Modules/quota/StorageQuota.h:
3362         (WebCore::StorageQuota::create):
3363         * Modules/speech/SpeechSynthesis.cpp:
3364         (WebCore::SpeechSynthesis::create):
3365         * Modules/speech/SpeechSynthesis.h:
3366         * Modules/speech/SpeechSynthesisUtterance.cpp:
3367         (WebCore::SpeechSynthesisUtterance::create):
3368         * Modules/speech/SpeechSynthesisUtterance.h:
3369         * Modules/speech/SpeechSynthesisVoice.cpp:
3370         (WebCore::SpeechSynthesisVoice::create):
3371         * Modules/speech/SpeechSynthesisVoice.h:
3372         * Modules/webaudio/ChannelMergerNode.cpp:
3373         (WebCore::ChannelMergerNode::create):
3374         * Modules/webaudio/ChannelMergerNode.h:
3375         * Modules/webaudio/ChannelSplitterNode.cpp:
3376         (WebCore::ChannelSplitterNode::create):
3377         * Modules/webaudio/ChannelSplitterNode.h:
3378         * Modules/webaudio/DefaultAudioDestinationNode.h:
3379         (WebCore::DefaultAudioDestinationNode::create):
3380         * Modules/webaudio/GainNode.h:
3381         (WebCore::GainNode::create):
3382         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3383         (WebCore::MediaElementAudioSourceNode::create):
3384         * Modules/webaudio/MediaElementAudioSourceNode.h:
3385         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
3386         (WebCore::MediaStreamAudioDestinationNode::create):
3387         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
3388         * Modules/webaudio/MediaStreamAudioSource.cpp:
3389         (WebCore::MediaStreamAudioSource::create):
3390         * Modules/webaudio/MediaStreamAudioSource.h:
3391         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
3392         (WebCore::MediaStreamAudioSourceNode::create):
3393         * Modules/webaudio/MediaStreamAudioSourceNode.h:
3394         * Modules/webaudio/OscillatorNode.cpp:
3395         (WebCore::OscillatorNode::setType):
3396         * Modules/webaudio/PannerNode.h:
3397         (WebCore::PannerNode::create):
3398         * Modules/webaudio/PeriodicWave.cpp:
3399         (WebCore::PeriodicWave::create):
3400         (WebCore::PeriodicWave::createSine):
3401         (WebCore::PeriodicWave::createSquare):
3402         (WebCore::PeriodicWave::createSawtooth):
3403         (WebCore::PeriodicWave::createTriangle):
3404         * Modules/webaudio/PeriodicWave.h:
3405         * Modules/webaudio/ScriptProcessorNode.cpp:
3406         (WebCore::ScriptProcessorNode::create):
3407         * Modules/webaudio/ScriptProcessorNode.h:
3408         * Modules/webaudio/WaveShaperNode.h:
3409         (WebCore::WaveShaperNode::create):
3410
3411 2015-05-27  Simon Fraser  <simon.fraser@apple.com>
3412
3413         REGRESSION (r183820): webkit.org/blog/ background painting issue on reload, when the page contains videos