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