ff104b84c524c7b296b9ce6928e1d3f826b00f12
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-13  Alex Christensen  <achristensen@webkit.org>
2
3         [Win] Unreviewed build fix after r188388.
4
5         * bindings/js/JSWebGLRenderingContextCustom.cpp:
6         * dom/EventFactory.h:
7         * rendering/RenderThemeWin.cpp:
8         Strange things happen when you change including headers.  This fixed my local build.
9
10 2015-08-13  Geoffrey Garen  <ggaren@apple.com>
11
12         Standardize on the phrase "delete code"
13         https://bugs.webkit.org/show_bug.cgi?id=147984
14
15         Reviewed by Mark Lam.
16
17         Use "delete" when we talk about throwing away code, as opposed to
18         "invalidate" or "discard".
19
20         * bindings/js/GCController.cpp:
21         (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
22         (WebCore::GCController::deleteAllCode):
23         (WebCore::GCController::discardAllCompiledCode): Deleted.
24         * bindings/js/GCController.h:
25         * platform/MemoryPressureHandler.cpp:
26         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
27
28 2015-08-13  Eric Carlson  <eric.carlson@apple.com>
29
30         Don't short circuit seeking
31         https://bugs.webkit.org/show_bug.cgi?id=147892
32
33         Reviewed by Jer Noble.
34
35         Test: media/video-seek-to-current-time.html
36
37         * html/HTMLMediaElement.cpp:
38         (WebCore::HTMLMediaElement::prepareForLoad): Call clearSeeking.
39         (WebCore::HTMLMediaElement::fastSeek): Add logging.
40         (WebCore::HTMLMediaElement::seekWithTolerance): Add logging. Set m_pendingSeekType.
41         (WebCore::HTMLMediaElement::seekTask):  Call clearSeeking. Don't short circuit a
42           if the current or pending seek is a fast seek. Set m_seeking to true immediately
43           before calling media engine as it may have been cleared before the seek task
44           queue ran.
45         (WebCore::HTMLMediaElement::clearSeeking): New.
46         * html/HTMLMediaElement.h:
47         * html/HTMLMediaElementEnums.h:
48
49         * platform/GenericTaskQueue.h:
50         (WebCore::GenericTaskQueue::enqueueTask): Clear m_pendingTasks.
51
52         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
53         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Don't return early
54           when asked to seek to the current time.
55         (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration): Remove some 
56           extremely noisy logging.
57
58         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
59         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Add logging.
60
61 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
62
63         FilterOperation.h should not include FilterEffect.h
64         https://bugs.webkit.org/show_bug.cgi?id=147970
65
66         Reviewed by Daniel Bates.
67
68         FilterEffect.h pulls in lots of JSC goop via runtime/Uint8ClampedArray.h,
69         so move its include to FilterOperation.cpp.
70         
71         Causes include bloat because FilterOperation.h is pulled in via RenderStyle.h.
72
73         * platform/graphics/filters/FilterOperation.cpp:
74         (WebCore::ReferenceFilterOperation::setFilterEffect):
75         * platform/graphics/filters/FilterOperation.h:
76         (WebCore::ReferenceFilterOperation::setFilterEffect): Deleted.
77
78 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
79
80         ScriptExecutionContext.h pulls in all the JSC headers
81         https://bugs.webkit.org/show_bug.cgi?id=147969
82
83         Reviewed by Alexey Proskuryakov.
84
85         ScriptExecutionContext.h included ScheduledAction.h, which pulled in all the
86         JSC headers via JSDOMBinding.h. There was no need for this #include, so remove
87         it and fix the fallout.
88
89         * Modules/webdatabase/DatabaseTracker.cpp:
90         * Modules/webdatabase/SQLTransaction.h:
91         * bindings/js/JSWebGLRenderingContextCustom.cpp:
92         * contentextensions/ContentExtensionStyleSheet.cpp:
93         * dom/ScriptExecutionContext.h:
94         * html/FTPDirectoryDocument.cpp:
95         * html/canvas/WebGLRenderingContext.cpp:
96         * html/parser/HTMLTreeBuilder.h:
97
98 2015-08-12  Anders Carlsson  <andersca@apple.com>
99
100         Use WTF::Optional in WindowFeatures
101         https://bugs.webkit.org/show_bug.cgi?id=147956
102
103         Reviewed by Sam Weinig.
104
105         * loader/FrameLoader.cpp:
106         (WebCore::createWindow):
107         * page/WindowFeatures.cpp:
108         (WebCore::WindowFeatures::WindowFeatures):
109         (WebCore::WindowFeatures::setWindowFeature):
110         (WebCore::WindowFeatures::boolFeature):
111         (WebCore::WindowFeatures::floatFeature):
112         (WebCore::WindowFeatures::parseDialogFeatures):
113         * page/WindowFeatures.h:
114         (WebCore::WindowFeatures::WindowFeatures):
115
116 2015-08-13  Matthew Daiter  <mdaiter@apple.com>
117
118         UserMediaRequest should supply IDs of devices selected by user
119         https://bugs.webkit.org/show_bug.cgi?id=147263
120         <rdar://problem/21983345>
121
122         Reviewed by Jer Noble.
123
124         * Modules/mediastream/UserMediaRequest.cpp:
125         (WebCore::UserMediaRequest::userMediaAccessGranted):
126         * Modules/mediastream/UserMediaRequest.h:
127         * platform/mock/UserMediaClientMock.h:
128
129 2015-08-12  Carlos Garcia Campos  <cgarcia@igalia.com>
130
131         [Cairo] Improve image quality when using newer versions of cairo/pixman
132         https://bugs.webkit.org/show_bug.cgi?id=147826
133
134         Reviewed by Martin Robinson.
135
136         Since cairo 1.14 the image filters changed a bit:
137
138          - CAIRO_FILTER_GOOD uses a box filter when downscaling if the
139            scale factor is less than 0.75, otherwise it uses a filter
140            equivalent to CAIRO_FILTER_BILINEAR.
141          - CAIRO_FILTER_BEST uses always a Catmull-Rom filter.
142
143         We are currently using CAIRO_FILTER_BILINEAR for medium, high and
144         default interpolation levels. We could use CAIRO_FILTER_GOOD for
145         medium and default, and CAIRO_FILTER_BEST for high. This will not
146         have any effect in previous versions of cairo because before 1.14
147         CAIRO_FILTER_GOOD, CAIRO_FILTER_BILINEAR and CAIRO_FILTER_BEST had
148         the same implementation in pixman.
149
150         * platform/graphics/cairo/PlatformContextCairo.cpp:
151         (WebCore::PlatformContextCairo::drawSurfaceToContext):
152
153 2015-08-12  Myles C. Maxfield  <mmaxfield@apple.com>
154
155         [Cocoa] [CJK-configured device] System font has vertical punctuation
156         https://bugs.webkit.org/show_bug.cgi?id=147964
157         <rdar://problem/22256660>
158
159         Reviewed by Dean Jackson.
160
161         GlyphPage::fill() has multiple code paths to accomplish its goal. It uses the shouldUseCoreText() helper
162         function to determine which one of the paths should be taken. However, not all of the code paths in
163         GlyphPage::fill() are able of handling all situations. Indeed, the CoreText code paths in GlyphPage::fill()
164         are only able to handle the situations which shouldUseCoreText() returns true for. This happens in the
165         following cases:
166
167         1. If the font is a composite font
168         2. If the font is used for text-combine
169         3. If the font has vertical glyphs
170
171         In r187693, I added one more case to this list: If the font is the system font. However, I failed to add
172         the necessary support to GlyphPage::fill() for this case. Becasue of this, we just happened to fall into
173         the case of vertical fonts (just by coincidence), which causes us to use
174         CTFontGetVerticalGlyphsForCharacters() instead of CTFontGetGlyphsForCharacters().
175
176         The solution is to adopt the same behavior we were using before r187693. Back then, we were using
177         CGFontGetGlyphsForUnichars(), which always returned horizontal glyphs. We should simply adopt this same
178         behavior, except in the Core Text case. Therefore, this patch is just a simple check to see if we are
179         using the system font when determining which Core Text function to use.
180
181         Test: fast/text/system-font-punctuation.html
182
183         * platform/graphics/FontDescription.h:
184         (WebCore::FontDescription::setWidthVariant):
185         * platform/graphics/FontPlatformData.h:
186         (WebCore::FontPlatformData::isForTextCombine):
187         * platform/graphics/mac/GlyphPageMac.cpp:
188         (WebCore::shouldUseCoreText):
189         (WebCore::GlyphPage::fill):
190         * rendering/RenderCombineText.cpp:
191         (WebCore::RenderCombineText::combineText):
192
193 2015-08-12  Jinyoung Hur  <hur.ims@navercorp.com>
194
195         [WinCairo] Turn on WOFF font
196         https://bugs.webkit.org/show_bug.cgi?id=147878
197
198         WOFF is already usable in Windows Cairo. Just turn it on.
199
200         Reviewed by Myles C. Maxfield.
201
202         Test: fast\css\font-face-woff.html
203
204         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
205         (WebCore::FontCustomPlatformData::supportsFormat):
206
207 2015-08-12  Brent Fulgham  <bfulgham@apple.com>
208
209         Move RenderBox-specific Scroll Snap code from RenderElement to RenderBox
210         https://bugs.webkit.org/show_bug.cgi?id=147963
211
212         Reviewed by Simon Fraser.
213
214         No new tests: No change in functionality.
215
216         * rendering/RenderBox.cpp:
217         (WebCore::RenderBox::styleWillChange): Remove RenderBox-specific code.
218         (WebCore::RenderBox::willBeRemovedFromTree): Ditto.
219         * rendering/RenderBox.h:
220         * rendering/RenderElement.cpp:
221         (WebCore::RenderElement::styleWillChange): Move code from RenderElement to
222         handle Scroll Snap Points.
223         (WebCore::RenderElement::willBeRemovedFromTree): Added new override to handle
224         scroll-snap point logic.
225
226 2015-08-12  Antti Koivisto  <antti@apple.com>
227
228         CachedResource leak in validation code
229         https://bugs.webkit.org/show_bug.cgi?id=147941
230
231         Reviewed by Chris Dumez.
232
233         While adding test coverage I discovered a way to hit ASSERT(!resource->m_proxyResource) in CachedResource::setResourceToRevalidate.
234         I think this ends up leaking a resource too.
235
236         Test: http/tests/cache/recursive-validation.html
237
238         * loader/cache/CachedRawResource.cpp:
239         (WebCore::CachedRawResource::didAddClient):
240
241             Tighten the condition.
242
243         * loader/cache/CachedResource.cpp:
244         (WebCore::CachedResource::setResourceToRevalidate):
245         (WebCore::CachedResource::clearResourceToRevalidate):
246
247             Replace workaround for this bug with an assert.
248
249         * loader/cache/CachedResource.h:
250         (WebCore::CachedResource::validationInProgress):
251         (WebCore::CachedResource::validationCompleting):
252         (WebCore::CachedResource::didSendData):
253         * loader/cache/CachedResourceLoader.cpp:
254         (WebCore::CachedResourceLoader::revalidateResource):
255         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
256
257             Fix the bug by using (instead of revalidating) resource that we are just finishing revalidating.
258             This can happen when a succesful revalidation synchronously triggers another load for the same resource.
259
260 2015-08-12  Matthew Daiter  <mdaiter@apple.com>
261
262         Need to add stubs to enumerateDevices
263         https://bugs.webkit.org/show_bug.cgi?id=147903
264
265         Reviewed by Eric Carlson.
266
267         * Modules/mediastream/MediaDevices.cpp:
268         (WebCore::MediaDevices::enumerateDevices):
269         * Modules/mediastream/MediaDevices.h:
270         * Modules/mediastream/UserMediaRequest.cpp:
271         (WebCore::UserMediaRequest::enumerateDevices):
272         * Modules/mediastream/UserMediaRequest.h:
273
274 2015-08-12  Matt Rajca  <mrajca@apple.com>
275
276         Fixed the Release build when MEDIA_SESSION is enabled.
277
278         * testing/Internals.cpp:
279         (WebCore::interruptingCategoryFromString):
280
281 2015-08-07  Matt Rajca  <mrajca@apple.com>
282
283         Media Session: notify the UI process when media controls are enabled/disabled
284         https://bugs.webkit.org/show_bug.cgi?id=147802
285
286         Reviewed by Eric Carlson.
287
288         * Modules/mediasession/MediaRemoteControls.cpp:
289         (WebCore::MediaRemoteControls::MediaRemoteControls): Keep track of the parent session.
290         (WebCore::MediaRemoteControls::~MediaRemoteControls): Removed unnecessary line.
291         (WebCore::MediaRemoteControls::setPreviousTrackEnabled): Tell the session a control was enabled/disabled.
292         (WebCore::MediaRemoteControls::setNextTrackEnabled): Tell the session a control was enabled/disabled.
293         * Modules/mediasession/MediaRemoteControls.h:
294         (WebCore::MediaRemoteControls::create):
295         (WebCore::MediaRemoteControls::setPreviousTrackEnabled): Moved to implementation file.
296         (WebCore::MediaRemoteControls::setNextTrackEnabled): Moved to implementation file.
297         * Modules/mediasession/MediaSession.cpp:
298         (WebCore::MediaSession::MediaSession): Keep track of the remote controls' parent session.
299         (WebCore::MediaSession::controlIsEnabledDidChange): Propagate the new media state to the UI process.
300         * Modules/mediasession/MediaSession.h:
301         * dom/Document.cpp:
302         (WebCore::Document::updateIsPlayingMedia): Include whether we can skip to the previous/next track.
303         * page/MediaProducer.h:
304
305 2015-08-12  Alex Christensen  <achristensen@webkit.org>
306
307         Fix Debug CMake builds on Windows
308         https://bugs.webkit.org/show_bug.cgi?id=147940
309
310         Reviewed by Chris Dumez.
311
312         * PlatformWin.cmake:
313         Copy localized strings to the WebKit.resources directory.
314
315 2015-08-12  Alex Christensen  <achristensen@webkit.org>
316
317         Unreviewed build fix after r188339.
318
319         * bindings/js/GCController.cpp:
320         (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
321         (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
322         (WebCore::GCController::releaseExecutableMemory): Deleted.
323         * bindings/js/GCController.h:
324         Commit WebCore part of patch.
325
326 2015-08-12  Brent Fulgham  <bfulgham@apple.com>
327
328         REGRESSION(r185606): ASSERT in WebCore::RenderElement::styleWillChange
329         https://bugs.webkit.org/show_bug.cgi?id=147596
330         <rdar://problem/21963355>
331
332         Reviewed by Jon Honeycutt.
333
334         Only add (or remove) a RenderElement from the container of RenderBoxes with
335         scroll snap coordinates if the element actually is a RenderBox.
336
337         Tested by css3/scroll-snap/improper-snap-points-crash.html.
338
339         * rendering/RenderElement.cpp:
340         (WebCore::RenderElement::styleWillChange):
341         (WebCore::RenderElement::willBeRemovedFromTree):
342
343 2015-08-12  Devin Rousso  <drousso@apple.com>
344
345         Web Inspector: Implement selector highlighting for iOS
346         https://bugs.webkit.org/show_bug.cgi?id=147919
347
348         Reviewed by Timothy Hatcher.
349
350         * inspector/InspectorOverlay.cpp:
351         (WebCore::InspectorOverlay::getHighlight):
352         If the current highlight is a nodeList, generate highlights for each node in the list and
353         return the concatenated value of those highlights.
354
355 2015-08-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
356
357         Remove promise attribute specific handling from binding generator
358         https://bugs.webkit.org/show_bug.cgi?id=147828
359
360         Reviewed by Darin Adler.
361
362         Reverting http://trac.webkit.org/changeset/184643, as CachedAttribute is used instead.
363
364         * bindings/scripts/CodeGeneratorJS.pm:
365         (GenerateHeader): Deleted.
366         * bindings/scripts/test/JS/JSTestObj.cpp:
367         (WebCore::jsTestObjConstructor): Deleted.
368         (WebCore::setJSTestObjConstructorStaticStringAttr): Deleted.
369         * bindings/scripts/test/JS/JSTestObj.h:
370         * bindings/scripts/test/ObjC/DOMTestObj.h:
371         * bindings/scripts/test/ObjC/DOMTestObj.mm:
372         (-[DOMTestObj voidMethod]): Deleted.
373         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]): Deleted.
374         * bindings/scripts/test/TestObj.idl:
375
376 2015-08-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
377
378         XHR.setRequestHeader should remove trailing and leading whitespaces from the header value
379         https://bugs.webkit.org/show_bug.cgi?id=147445
380
381         Reviewed by Darin Adler.
382
383         Covered by added and modifed tests.
384
385         * platform/network/HTTPParsers.h:
386         (WebCore::isHTTPSpace):
387         (WebCore::stripLeadingAndTrailingHTTPSpaces):
388         * xml/XMLHttpRequest.cpp:
389         (WebCore::XMLHttpRequest::setRequestHeader): strip trailing and leading whitespace before testing for header value validity and storing.
390
391 2015-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
392
393         NetworkProcess: DNS prefetch happens in the Web Process
394         https://bugs.webkit.org/show_bug.cgi?id=147824
395
396         Reviewed by Alexey Proskuryakov.
397
398         Use FrameLoaderClient to do the DNS prefetch.
399
400         * html/HTMLAnchorElement.cpp:
401         (WebCore::HTMLAnchorElement::parseAttribute):
402         * loader/FrameLoaderClient.h:
403         * loader/LinkLoader.cpp:
404         (WebCore::LinkLoader::loadLink):
405         * page/Chrome.cpp:
406         (WebCore::Chrome::mouseDidMoveOverElement):
407
408 2015-08-11  Mark Lam  <mark.lam@apple.com>
409
410         Implementation JavaScript watchdog using WTF::WorkQueue.
411         https://bugs.webkit.org/show_bug.cgi?id=147107
412
413         Reviewed by Geoffrey Garen.
414
415         No new tests because we're not introducing any behavior change to WebCore here.
416         We're only #include'ing Watchdog.h directly instead of going through VM.h.
417
418         * ForwardingHeaders/runtime/Watchdog.h: Added.
419         * PlatformEfl.cmake:
420         * WebCore.vcxproj/WebCore.vcxproj:
421         * WebCore.vcxproj/WebCore.vcxproj.filters:
422         * bindings/js/JSEventListener.cpp:
423         * bindings/js/WorkerScriptController.cpp:
424
425 2015-08-11  Simon Fraser  <simon.fraser@apple.com>
426
427         [iOS WK2] ASSERT(!m_properties.backingStore || owner()) sometimes on zooming
428         https://bugs.webkit.org/show_bug.cgi?id=147854
429
430         Reviewed by Tim Horton.
431
432         When destroying a TileGrid, the container layer remains alive by virtue of being
433         in the layer tree, and it and its tiles get visited during layer tree transaction
434         building but we assert because we've cleared the owner on the tile layers.
435
436         The real bug is that TileController doesn't tell GraphicsLayerCA when the custom
437         sublayers change. Make this possible via a new PlatformCALayerClient function,
438         and make TileController use this when rearranging its tile grids.
439
440         * platform/graphics/ca/GraphicsLayerCA.cpp:
441         (WebCore::GraphicsLayerCA::platformCALayerCustomSublayersChanged):
442         (WebCore::GraphicsLayerCA::updateContentsScale): No need to explicitly set
443         the ChildrenChanged flag now.
444         * platform/graphics/ca/GraphicsLayerCA.h:
445         * platform/graphics/ca/PlatformCALayerClient.h:
446         (WebCore::PlatformCALayerClient::platformCALayerCustomSublayersChanged):
447         (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay):
448         * platform/graphics/ca/TileController.cpp:
449         (WebCore::TileController::setNeedsDisplay):
450         (WebCore::TileController::setContentsScale):
451         (WebCore::TileController::setZoomedOutContentsScale):
452         (WebCore::TileController::revalidateTiles):
453         (WebCore::TileController::clearZoomedOutTileGrid):
454         (WebCore::TileController::tileGridsChanged):
455         (WebCore::TileController::tileRevalidationTimerFired):
456         * platform/graphics/ca/TileController.h:
457         * platform/graphics/ca/TileGrid.h: Default param.
458
459 2015-08-11  Zalan Bujtas  <zalan@apple.com>
460
461         Disconnect LayoutStateDisabler logic and RenderView pointer.
462         https://bugs.webkit.org/show_bug.cgi?id=147906
463
464         Reviewed by Simon Fraser.
465
466         LayoutStateDisabler should disable layout state unconditionally.
467         The only place where it was actually conditional was the subtree layout branch.
468         Create a dedicated SubtreeLayoutStateMaintainer to manage the subtree layout case.
469
470         No change in behaviour.
471
472         * page/FrameView.cpp:
473         (WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
474         (WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
475         (WebCore::FrameView::layout):
476         * rendering/RenderBlock.cpp:
477         (WebCore::RenderBlock::updateFirstLetterStyle):
478         (WebCore::RenderBlock::updateFirstLetter):
479         * rendering/RenderBlockFlow.cpp:
480         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
481         * rendering/RenderFlowThread.cpp:
482         (WebCore::RenderFlowThread::repaintRectangleInRegions):
483         * rendering/RenderListBox.cpp:
484         (WebCore::RenderListBox::layout):
485         * rendering/RenderListItem.cpp:
486         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
487         * rendering/RenderMediaControlElements.cpp:
488         (WebCore::RenderMediaVolumeSliderContainer::layout):
489         (WebCore::RenderMediaControlTimelineContainer::layout):
490         (WebCore::RenderTextTrackContainerElement::layout):
491         * rendering/RenderMultiColumnFlowThread.cpp:
492         (WebCore::RenderMultiColumnFlowThread::populate):
493         (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
494         * rendering/RenderView.h:
495         (WebCore::LayoutStateDisabler::LayoutStateDisabler):
496         (WebCore::LayoutStateDisabler::~LayoutStateDisabler):
497         * rendering/svg/RenderSVGRoot.cpp:
498         (WebCore::RenderSVGRoot::layout):
499
500 2015-08-11  Simon Fraser  <simon.fraser@apple.com>
501
502         Fix ViewportConfiguration dumping.
503         
504         ViewportConfiguration::dump() was dumping parameters.width as parameters.initialScale.
505
506         * page/ViewportConfiguration.cpp:
507         (WebCore::ViewportConfigurationTextStream::operator<<):
508
509 2015-08-11  Myles C. Maxfield  <mmaxfield@apple.com>
510
511         [font-features] Map OpenType feature tags to TrueType feature selectors
512         https://bugs.webkit.org/show_bug.cgi?id=147819
513
514         Reviewed by Dean Jackson.
515
516         Allow uses of font-feature-settings even on TrueType fonts.
517
518         Test: css3/font-feature-settings-preinstalled-fonts.html
519
520         * platform/graphics/cocoa/FontCacheCoreText.cpp:
521         (WebCore::appendRawTrueTypeFeature):
522         (WebCore::appendTrueTypeFeature):
523
524 2015-08-11  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
525
526         Reduce use of PassRefPtr in WebCore/css
527         https://bugs.webkit.org/show_bug.cgi?id=147821
528
529         Reviewed by Daniel Bates.
530
531         Use RefPtr when returning nullptr or RefPtr, if not, use Ref.
532
533         * css/CSSBasicShapes.cpp:
534         (WebCore::buildSerializablePositionOffset):
535         (WebCore::CSSBasicShapeCircle::cssText):
536         (WebCore::CSSBasicShapeEllipse::cssText):
537         * css/CSSBasicShapes.h:
538         * css/CSSCalculationValue.cpp:
539         (WebCore::determineCategory):
540         (WebCore::CSSCalcExpressionNodeParser::parseCalc):
541         (WebCore::createBlendHalf):
542         (WebCore::createCSS):
543         * css/CSSCanvasValue.cpp:
544         (WebCore::CSSCanvasValue::image):
545         * css/CSSCanvasValue.h:
546         * css/CSSComputedStyleDeclaration.cpp:
547         (WebCore::positionOffsetValue):
548         (WebCore::ComputedStyleExtractor::currentColorOrValidColor):
549         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
550         (WebCore::counterToCSSValue):
551         (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
552         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
553         (WebCore::computeRenderStyleForProperty):
554         (WebCore::valueForItemPositionWithOverflowAlignment):
555         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
556         (WebCore::ComputedStyleExtractor::propertyValue):
557         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
558         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
559         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
560         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValueInternal):
561         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
562         * css/CSSComputedStyleDeclaration.h:
563         * css/CSSCrossfadeValue.cpp:
564         (WebCore::CSSCrossfadeValue::image):
565         (WebCore::CSSCrossfadeValue::blend):
566         * css/CSSCrossfadeValue.h:
567         * css/CSSFilterImageValue.cpp:
568         (WebCore::CSSFilterImageValue::image):
569         * css/CSSFilterImageValue.h:
570         * css/CSSGradientValue.cpp:
571         (WebCore::CSSGradientValue::image):
572         (WebCore::CSSGradientValue::gradientWithStylesResolved):
573         (WebCore::CSSLinearGradientValue::createGradient):
574         (WebCore::CSSRadialGradientValue::createGradient):
575         * css/CSSGradientValue.h:
576         * css/CSSImageSetValue.cpp:
577         (WebCore::CSSImageSetValue::cloneForCSSOM):
578         * css/CSSImageSetValue.h:
579         * css/CSSImageValue.cpp:
580         (WebCore::CSSImageValue::cloneForCSSOM):
581         * css/CSSImageValue.h:
582         * css/CSSParser.cpp:
583         (WebCore::CSSParser::parseRule):
584         (WebCore::CSSParser::parseKeyframeRule):
585         (WebCore::CSSParser::parseFontFaceValue):
586         (WebCore::CSSParser::parseValidPrimitive):
587         (WebCore::CSSParser::parseContentDistributionOverflowPosition):
588         (WebCore::CSSParser::parseAttr):
589         (WebCore::CSSParser::parseBackgroundColor):
590         (WebCore::CSSParser::parsePositionX):
591         (WebCore::CSSParser::parsePositionY):
592         (WebCore::CSSParser::parseFillPositionComponent):
593         (WebCore::CSSParser::parseFillSize):
594         (WebCore::CSSParser::parseAnimationDelay):
595         (WebCore::CSSParser::parseAnimationDirection):
596         (WebCore::CSSParser::parseAnimationDuration):
597         (WebCore::CSSParser::parseAnimationFillMode):
598         (WebCore::CSSParser::parseAnimationIterationCount):
599         (WebCore::CSSParser::parseAnimationName):
600         (WebCore::CSSParser::parseAnimationPlayState):
601         (WebCore::CSSParser::parseAnimationTrigger):
602         (WebCore::CSSParser::parseAnimationProperty):
603         (WebCore::CSSParser::parseAnimationTimingFunction):
604         (WebCore::CSSParser::parseGridPosition):
605         (WebCore::gridMissingGridPositionValue):
606         (WebCore::CSSParser::parseGridTrackList):
607         (WebCore::CSSParser::parseGridTrackSize):
608         (WebCore::CSSParser::parseGridBreadth):
609         (WebCore::CSSParser::parseGridAutoFlow):
610         (WebCore::CSSParser::parseGridTemplateAreas):
611         (WebCore::CSSParser::parseCounterContent):
612         (WebCore::CSSParser::parseInsetRoundedCorners):
613         (WebCore::CSSParser::parseBasicShapeInset):
614         (WebCore::CSSParser::parseShapeRadius):
615         (WebCore::CSSParser::parseBasicShapeCircle):
616         (WebCore::CSSParser::parseBasicShapeEllipse):
617         (WebCore::CSSParser::parseBasicShapePolygon):
618         (WebCore::CSSParser::parseBasicShapeAndOrBox):
619         (WebCore::CSSParser::parseShapeProperty):
620         (WebCore::CSSParser::parseClipPath):
621         (WebCore::CSSParser::parseBasicShape):
622         (WebCore::CSSParser::parseFontFamily):
623         (WebCore::CSSParser::parseColor):
624         (WebCore::CSSParser::parseShadow):
625         (WebCore::CSSParser::parseImageResolution):
626         (WebCore::CSSParser::parseImageSet):
627         (WebCore::CSSParser::parseTransform):
628         (WebCore::CSSParser::parseTransformValue):
629         (WebCore::CSSParser::parseBuiltinFilterArguments):
630         (WebCore::CSSParser::parseTextIndent):
631         (WebCore::CSSParser::createImportRule):
632         (WebCore::CSSParser::createMediaRule):
633         (WebCore::CSSParser::createEmptyMediaRule):
634         (WebCore::CSSParser::createSupportsRule):
635         (WebCore::CSSParser::popSupportsRuleData):
636         (WebCore::CSSParser::createKeyframesRule):
637         (WebCore::CSSParser::createStyleRule):
638         (WebCore::CSSParser::createFontFaceRule):
639         (WebCore::CSSParser::createPageRule):
640         (WebCore::CSSParser::createRegionRule):
641         (WebCore::CSSParser::createKeyframe):
642         * css/CSSParser.h:
643         * css/CSSPrimitiveValue.cpp:
644         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
645         * css/CSSPrimitiveValue.h:
646         * css/CSSStyleDeclaration.h:
647         * css/CSSStyleSheet.cpp:
648         (WebCore::CSSStyleSheet::rules):
649         (WebCore::CSSStyleSheet::cssRules):
650         * css/CSSStyleSheet.h:
651         * css/CSSToStyleMap.cpp:
652         (WebCore::CSSToStyleMap::styleImage):
653         * css/CSSToStyleMap.h:
654         * css/CSSValue.cpp:
655         (WebCore::CSSValue::cloneForCSSOM):
656         * css/CSSValue.h:
657         * css/CSSValueList.cpp:
658         (WebCore::CSSValueList::cloneForCSSOM):
659         * css/CSSValueList.h:
660         * css/MediaList.h:
661         (WebCore::MediaQuerySet::copy):
662         * css/MediaQueryMatcher.cpp:
663         (WebCore::MediaQueryMatcher::matchMedia):
664         * css/MediaQueryMatcher.h:
665         * css/PropertySetCSSStyleDeclaration.cpp:
666         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
667         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
668         * css/PropertySetCSSStyleDeclaration.h:
669         * css/RGBColor.cpp:
670         (WebCore::RGBColor::red):
671         (WebCore::RGBColor::green):
672         (WebCore::RGBColor::blue):
673         (WebCore::RGBColor::alpha):
674         * css/RGBColor.h:
675         * css/SVGCSSComputedStyleDeclaration.cpp:
676         (WebCore::glyphOrientationToCSSPrimitiveValue):
677         (WebCore::strokeDashArrayToCSSValueList):
678         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
679         (WebCore::ComputedStyleExtractor::svgPropertyValue):
680         * css/SVGCSSParser.cpp:
681         (WebCore::CSSParser::parseSVGStrokeDasharray):
682         (WebCore::CSSParser::parseSVGPaint):
683         (WebCore::CSSParser::parseSVGColor):
684         (WebCore::CSSParser::parsePaintOrder):
685         * css/WebKitCSSFilterValue.cpp:
686         (WebCore::WebKitCSSFilterValue::cloneForCSSOM):
687         * css/WebKitCSSFilterValue.h:
688         * css/WebKitCSSMatrix.cpp:
689         (WebCore::WebKitCSSMatrix::multiply):
690         (WebCore::WebKitCSSMatrix::inverse):
691         (WebCore::WebKitCSSMatrix::translate):
692         (WebCore::WebKitCSSMatrix::scale):
693         (WebCore::WebKitCSSMatrix::rotate):
694         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
695         (WebCore::WebKitCSSMatrix::skewX):
696         (WebCore::WebKitCSSMatrix::skewY):
697         * css/WebKitCSSMatrix.h:
698         * css/WebKitCSSTransformValue.cpp:
699         (WebCore::WebKitCSSTransformValue::cloneForCSSOM):
700         * css/WebKitCSSTransformValue.h:
701
702 2015-08-11  Sam Weinig  <sam@webkit.org>
703
704         Move CountQueuingStrategy and related to files to their correct place in the Xcode project
705         https://bugs.webkit.org/show_bug.cgi?id=147901
706
707         Reviewed by Anders Carlsson.
708
709         * WebCore.xcodeproj/project.pbxproj:
710
711 2015-08-11  Zalan Bujtas  <zalan@apple.com>
712
713         Use more references in FrameView.
714         https://bugs.webkit.org/show_bug.cgi?id=147899
715
716         Reviewed by Simon Fraser.
717
718         No change in functionality.
719
720         * page/FrameView.cpp:
721         (WebCore::FrameView::flushCompositingStateForThisFrame):
722         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
723         (WebCore::FrameView::addSlowRepaintObject):
724         (WebCore::FrameView::scrollElementToRect):
725         * page/FrameView.h:
726         * rendering/RenderObject.cpp:
727         (WebCore::RenderObject::willBeDestroyed):
728         * rendering/RenderScrollbarPart.cpp:
729         (WebCore::RenderScrollbarPart::imageChanged):
730         * testing/Internals.cpp:
731         (WebCore::Internals::scrollElementToRect):
732
733 2015-08-11  Zalan Bujtas  <zalan@apple.com>
734
735         Invalid FrameView::m_viewportRenderer after layout is finished.
736         https://bugs.webkit.org/show_bug.cgi?id=147848
737         rdar://problem/22205197
738
739         Reviewed by Simon Fraser.
740
741         We cache the current viewport renderer (FrameView::m_viewportRenderer) right before layout.
742         It gets dereferenced later when layout is finished to update the overflow status.
743         If the viewport renderer gets destroyed during layout, we end up with a dangling pointer.
744         This patch replaces the pointer caching with type caching (none, body, document).
745
746         Unable to construct a test case.
747
748 2015-08-11  Brent Fulgham  <bfulgham@apple.com>
749
750         [Win] Switch Windows build to Visual Studio 2015
751         https://bugs.webkit.org/show_bug.cgi?id=147887
752         <rdar://problem/22235098>
753
754         Reviewed by Alex Christensen.
755
756         Update Visual Studio project file settings to use the current Visual
757         Studio and compiler. Continue targeting binaries to run on our minimum
758         supported configuration of Windows 7.
759
760         No change in behavior, so no new tests.
761
762         * WebCore.vcxproj/WebCore.vcxproj:
763         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
764         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
765
766 2015-08-11  Said Abou-Hallawa  <sabouhallawa@apple.com>
767
768         feMorphology is not rendered correctly on Retina display
769         https://bugs.webkit.org/show_bug.cgi?id=147589
770
771         Reviewed by Dean Jackson.
772
773         The result ImageBuffer of any FilterEffect is already scaled up for 2x
774         display. The FEMorphology needs to fix its painting data dimension and
775         radius by multiplying them by the filter scale factor.
776  
777         Test: fast/hidpi/filters-morphology.html
778
779         * platform/graphics/filters/FEMorphology.cpp:
780         (WebCore::FEMorphology::platformApplySoftware):
781
782 2015-08-11  Myles C. Maxfield  <mmaxfield@apple.com>
783
784         [iOS] Arabic letter Yeh is drawn in LastResort
785         https://bugs.webkit.org/show_bug.cgi?id=147862
786         <rdar://problem/22202935>
787
788         Reviewed by Darin Adler.
789
790         In order to perform font fallback, we must know which fonts support which characters. We
791         perform this check by asking each font to map a sequence of codepoints to glyphs, and
792         any glyphs which end up with a 0 value are unsupported by the font.
793
794         One of the mechanisms that we use to do this is to combine the code points into a string,
795         and tell Core Text to lay out the string. However, this is fundamentally a different
796         operation than the one we are trying to perform. Strings combine adjacent codepoints into
797         grapheme clusters, and CoreText operates on these. However, we are trying to gain
798         information regarding codepoints, not grapheme clusters.
799
800         Instead of taking this string-based approach, we should try harder to use Core Text
801         functions which operate on ordered collections of characters, rather than strings. In
802         particular, CTFontGetGlyphsForCharacters() and CTFontGetVerticalGlyphsForCharacters()
803         have the behavior we want where any unmapped characters end up with a 0 value glyph.
804
805         Previously, we were only using the result of those functions if they were successfully
806         able to map their entire input. However, given the fact that we can degrade gracefully
807         in the case of a partial mapping, we shouldn't need to bail completely to the
808         string-based approach should a partial mapping occur.
809
810         At some point we should delete the string-based approach entirely. However, this path
811         is still explicitly used for composite fonts. Fixing that use case is out of scope
812         for this patch.
813
814         Test: fast/text/arabic-glyph-cache-fill-combine.html
815
816         * platform/graphics/mac/GlyphPageMac.cpp:
817         (WebCore::GlyphPage::fill):
818
819 2015-08-11  Chris Dumez  <cdumez@apple.com>
820
821         The 'length' property on interface objects should be configurable
822         https://bugs.webkit.org/show_bug.cgi?id=147858
823
824         Reviewed by Daniel Bates.
825
826         Make the 'length' property configurable on interface objects to comply
827         with the Web IDL specification [1] and to align our behavior with
828         Firefox 38 and Chrome 44.
829
830         This behavior is also covered by the following W3C test suite:
831         http://w3c-test.org/dom/interfaces.html
832
833         [1] http://heycam.github.io/webidl/#es-interface-call (17 July 2015)
834
835         Test: fast/dom/length-property-configurable.html
836
837         * bindings/scripts/CodeGeneratorJS.pm:
838         (GenerateConstructorHelperMethods):
839         Make the 'length' property configurable on interface objects.
840
841         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
842         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
843         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
844         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
845         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
846         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
847         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
848         (WebCore::JSTestEventConstructorConstructor::finishCreation):
849         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
850         (WebCore::JSTestEventTargetConstructor::finishCreation):
851         * bindings/scripts/test/JS/JSTestException.cpp:
852         (WebCore::JSTestExceptionConstructor::finishCreation):
853         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
854         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
855         * bindings/scripts/test/JS/JSTestInterface.cpp:
856         (WebCore::JSTestInterfaceConstructor::finishCreation):
857         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
858         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
859         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
860         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
861         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
862         * bindings/scripts/test/JS/JSTestNode.cpp:
863         (WebCore::JSTestNodeConstructor::finishCreation):
864         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
865         (WebCore::JSTestNondeterministicConstructor::finishCreation):
866         * bindings/scripts/test/JS/JSTestObj.cpp:
867         (WebCore::JSTestObjConstructor::finishCreation):
868         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
869         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
870         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
871         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
872         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
873         (WebCore::JSTestTypedefsConstructor::finishCreation):
874         * bindings/scripts/test/JS/JSattribute.cpp:
875         (WebCore::JSattributeConstructor::finishCreation):
876         * bindings/scripts/test/JS/JSreadonly.cpp:
877         (WebCore::JSreadonlyConstructor::finishCreation):
878         Rebaseline bindings tests.
879
880 2015-08-11  Per Arne Vollan  <peavo@outlook.com>
881
882         [Win] Popup menus have incorrect placement when device scale factor != 1.
883         https://bugs.webkit.org/show_bug.cgi?id=147880
884
885         Reviewed by Brent Fulgham.
886
887         We need to take the device scaling factor into account when calculating
888         the position and size of the popup menu.
889
890         * platform/win/PopupMenuWin.cpp:
891         (WebCore::PopupMenuWin::calculatePositionAndSize):
892
893 2015-08-11  Chris Dumez  <cdumez@apple.com>
894
895         [WebIDL] All interface objects must have a property named "name"
896         https://bugs.webkit.org/show_bug.cgi?id=147865
897
898         Reviewed by Darin Adler.
899
900         As per the Web IDL specification, all interface objects must have a
901         property named "name" with attributes
902         { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }
903         whose value is the identifier of the corresponding interface:
904         http://heycam.github.io/webidl/#es-interface-call
905         http://heycam.github.io/webidl/#named-constructors
906
907         Previously, our interface objects had no such property, this patch
908         addresses the problem.
909
910         Both Firefox 38 and Chrome 44 comply with the Web IDL specification
911         here.
912
913         Test: fast/dom/interface-name-property.html
914
915         * bindings/scripts/CodeGeneratorJS.pm:
916         (GenerateConstructorHelperMethods):
917
918         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
919         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
920         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
921         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
922         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
923         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
924         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
925         (WebCore::JSTestEventConstructorConstructor::finishCreation):
926         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
927         (WebCore::JSTestEventTargetConstructor::finishCreation):
928         * bindings/scripts/test/JS/JSTestException.cpp:
929         (WebCore::JSTestExceptionConstructor::finishCreation):
930         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
931         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
932         * bindings/scripts/test/JS/JSTestInterface.cpp:
933         (WebCore::JSTestInterfaceConstructor::finishCreation):
934         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
935         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
936         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
937         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
938         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
939         * bindings/scripts/test/JS/JSTestNode.cpp:
940         (WebCore::JSTestNodeConstructor::finishCreation):
941         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
942         (WebCore::JSTestNondeterministicConstructor::finishCreation):
943         * bindings/scripts/test/JS/JSTestObj.cpp:
944         (WebCore::JSTestObjConstructor::finishCreation):
945         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
946         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
947         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
948         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
949         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
950         (WebCore::JSTestTypedefsConstructor::finishCreation):
951         * bindings/scripts/test/JS/JSattribute.cpp:
952         (WebCore::JSattributeConstructor::finishCreation):
953         * bindings/scripts/test/JS/JSreadonly.cpp:
954         (WebCore::JSreadonlyConstructor::finishCreation):
955         Rebaseline bindings tests.
956
957 2015-08-11  Ting-Wei Lan  <lantw44@gmail.com>
958
959         Fix debug build when optimization is enabled
960         https://bugs.webkit.org/show_bug.cgi?id=147816
961
962         Reviewed by Alexey Proskuryakov.
963
964         No new tests because this is only a build fix.
965
966         * editing/InsertNodeBeforeCommand.cpp:
967
968 2015-08-11  Chris Dumez  <cdumez@apple.com>
969
970         Unreviewed, rebaseline bindings tests after r188252.
971
972         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
973         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
974         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
975         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
976         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
977         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
978         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
979         (WebCore::JSTestEventConstructorConstructor::finishCreation):
980         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
981         (WebCore::JSTestEventTargetConstructor::finishCreation):
982         * bindings/scripts/test/JS/JSTestException.cpp:
983         (WebCore::JSTestExceptionConstructor::finishCreation):
984         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
985         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
986         * bindings/scripts/test/JS/JSTestInterface.cpp:
987         (WebCore::JSTestInterfaceConstructor::finishCreation):
988         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
989         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
990         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
991         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
992         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
993         * bindings/scripts/test/JS/JSTestNode.cpp:
994         (WebCore::JSTestNodeConstructor::finishCreation):
995         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
996         (WebCore::JSTestNondeterministicConstructor::finishCreation):
997         * bindings/scripts/test/JS/JSTestObj.cpp:
998         (WebCore::JSTestObjConstructor::finishCreation):
999         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1000         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
1001         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1002         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
1003         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1004         (WebCore::JSTestTypedefsConstructor::finishCreation):
1005         * bindings/scripts/test/JS/JSattribute.cpp:
1006         (WebCore::JSattributeConstructor::finishCreation):
1007         * bindings/scripts/test/JS/JSreadonly.cpp:
1008         (WebCore::JSreadonlyConstructor::finishCreation):
1009
1010 2015-08-10  Chris Dumez  <cdumez@apple.com>
1011
1012         The 'prototype' property on interface objects should not be enumerable
1013         https://bugs.webkit.org/show_bug.cgi?id=147861
1014
1015         Reviewed by Darin Adler.
1016
1017         1. Make the 'prototype' property not enumerable on interface object to
1018            comply with the Web IDL specification [1] and to align our behavior
1019            with Firefox 38 and Chrome 44.
1020
1021         2. Also update the 'prototype' property on named constructors to have the
1022            following attributes:
1023            { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }
1024
1025            Previously, all these were true in WebKit. The new behavior complies
1026            with the Web IDL specification [2] and aligns our behavior with
1027            Firefox 38. On Chrome 44, the attributes are as follows:
1028            { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: false }
1029
1030         This behavior is also covered by the following W3C test suite:
1031         http://w3c-test.org/dom/interfaces.html
1032
1033         [1] http://heycam.github.io/webidl/#interface-object
1034         [2] http://heycam.github.io/webidl/#named-constructors
1035
1036         Test: fast/dom/prototype-property-not-enumerable.html
1037
1038         * bindings/scripts/CodeGeneratorJS.pm:
1039         (GenerateConstructorHelperMethods):
1040
1041 2015-08-10  Alex Christensen  <achristensen@webkit.org>
1042
1043         Build fix after r188239.
1044
1045         * PlatformWinCairo.cmake:
1046         MediaPlayerPrivateMediaFoundation is needed on WinCairo with video properly enabled.
1047
1048 2015-08-10  Myles C. Maxfield  <mmaxfield@apple.com>
1049
1050         Post-review fixup after r188195
1051         https://bugs.webkit.org/show_bug.cgi?id=147806
1052
1053         Unreviewed.
1054
1055         Covered by fast/text/crash-obscure-text.html.
1056
1057         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1058         (WebCore::FontPlatformData::objectForEqualityCheck):
1059
1060 2015-08-10  Alex Christensen  <achristensen@webkit.org>
1061
1062         Build TestWebKitAPI with CMake on Windows
1063         https://bugs.webkit.org/show_bug.cgi?id=147851
1064
1065         Reviewed by Chris Dumez.
1066
1067         * PlatformWin.cmake:
1068         Remove RenderThemeWin.cpp which is included in RenderingAllInOne.cpp.
1069         * WebCorePrefix.h:
1070         Include cmakeconfig.h before wtf/Platform.h like we do in JavaScriptCore's config.h to avoid warnings and redefining ENABLE_*  macros.
1071
1072 2015-08-10  Matthew Daiter  <mdaiter@apple.com>
1073
1074         HTMLMediaElement needs way to find MediaDeviceInfo
1075         https://bugs.webkit.org/show_bug.cgi?id=147842
1076
1077         Reviewed by Jer Noble.
1078
1079         * html/HTMLMediaElement.cpp:
1080         (WebCore::HTMLMediaElement::mediaPlayerMediaDeviceIdentifierStorageDirectory):
1081         * html/HTMLMediaElement.h:
1082         * page/Settings.h:
1083         (WebCore::Settings::setMediaDeviceIdentifierStorageDirectory):
1084         (WebCore::Settings::mediaDeviceIdentifierStorageDirectory):
1085         * platform/graphics/MediaPlayer.h:
1086         (WebCore::MediaPlayerClient::mediaPlayerMediaDeviceIdentifierStorageDirectory):
1087
1088 2015-08-10  Chris Dumez  <cdumez@apple.com>
1089
1090         Simplify code for making Page-cacheability decision
1091         https://bugs.webkit.org/show_bug.cgi?id=147829
1092
1093         Reviewed by Antti Koivisto.
1094
1095         Simplify code for making Page-cacheability decision by merging logging
1096         code and decision making code. Having the same checks in two places was
1097         redundant and error-prone as we needed to keep them in sync.
1098
1099         Also get rid of failure reason enum values as those have not been used
1100         in a while.
1101
1102         * history/PageCache.cpp:
1103         (WebCore::canCacheFrame):
1104         (WebCore::canCachePage):
1105         (WebCore::PageCache::canCache):
1106         (WebCore::logPageCacheFailureDiagnosticMessage): Deleted.
1107         (WebCore::PageCache::singleton): Deleted.
1108         (WebCore::PageCache::setMaxSize): Deleted.
1109         (WebCore::PageCache::frameCount): Deleted.
1110         (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
1111         (WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.
1112         (WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Deleted.
1113         (WebCore::PageCache::markPagesForContentsSizeChanged): Deleted.
1114         (WebCore::PageCache::markPagesForCaptionPreferencesChanged): Deleted.
1115         (WebCore::pruningReasonToDiagnosticLoggingKey): Deleted.
1116         * page/DiagnosticLoggingKeys.cpp:
1117         (WebCore::DiagnosticLoggingKeys::isDisabledKey):
1118         (WebCore::DiagnosticLoggingKeys::redirectKey):
1119         (WebCore::DiagnosticLoggingKeys::replaceKey):
1120         (WebCore::DiagnosticLoggingKeys::sourceKey):
1121         (WebCore::DiagnosticLoggingKeys::underMemoryPressureKey):
1122         (WebCore::DiagnosticLoggingKeys::reloadFromOriginKey): Deleted.
1123         * page/DiagnosticLoggingKeys.h:
1124
1125 2015-08-10  Devin Rousso  <drousso@apple.com>
1126
1127         Web Inspector: [iOS] Allow inspector to retrieve a list of system fonts
1128         https://bugs.webkit.org/show_bug.cgi?id=147033
1129
1130         Reviewed by Joseph Pecoraro.
1131
1132         Implement systemFontFamilies for iOS.
1133
1134         * platform/graphics/ios/FontCacheIOS.mm:
1135         (WebCore::FontCache::systemFontFamilies):
1136
1137 2015-08-10  Devin Rousso  <drousso@apple.com>
1138
1139         Web Inspector: Invalid selectors can be applied to the stylesheet
1140         https://bugs.webkit.org/show_bug.cgi?id=147230
1141
1142         Reviewed by Timothy Hatcher.
1143
1144         * inspector/InspectorStyleSheet.cpp:
1145         (WebCore::isValidSelectorListString):
1146         (WebCore::InspectorStyleSheet::setRuleSelector):
1147         Now checks to see that the supplied selector is valid before trying to commit it to the rule.
1148         (WebCore::InspectorStyleSheet::addRule):
1149         (WebCore::checkStyleRuleSelector): Deleted.
1150
1151 2015-08-10  James Craig  <jcraig@apple.com>
1152
1153         AX: Address follow-up comments in bug 145684
1154         https://bugs.webkit.org/show_bug.cgi?id=147817
1155
1156         Reviewed by Dean Jackson.
1157
1158         Minor cleanup and style updates requested by Dean.
1159         Updated Existing Test Expectations.
1160
1161         * Modules/mediacontrols/mediaControlsApple.css:
1162         (video::-webkit-media-show-controls):
1163         * Modules/mediacontrols/mediaControlsiOS.css:
1164         (video::-webkit-media-show-controls):
1165
1166 2015-08-07  Antti Koivisto  <antti@apple.com>
1167
1168         Expand network cache tests to cover memory cache behavior
1169         https://bugs.webkit.org/show_bug.cgi?id=147783
1170
1171         Reviewed by Alexey Proskuryakov.
1172
1173         To support testing, include memory cache as a possible source type to XHR responses.
1174
1175         * loader/ResourceLoader.cpp:
1176         (WebCore::logResourceResponseSource):
1177         * loader/cache/CachedRawResource.cpp:
1178         (WebCore::CachedRawResource::didAddClient):
1179         * loader/cache/CachedResource.h:
1180         (WebCore::CachedResource::revalidationInProgress):
1181         * platform/network/ResourceResponseBase.h:
1182         * testing/Internals.cpp:
1183         (WebCore::Internals::xhrResponseSource):
1184
1185 2015-08-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1186
1187         Compile warning (-Wsign-compare) on 32-bits at WebCore/platform/FileSystem.cpp
1188         https://bugs.webkit.org/show_bug.cgi?id=146414
1189
1190         Reviewed by Darin Adler.
1191
1192         No behavioral changes.
1193
1194         * platform/FileSystem.cpp:
1195         (WebCore::MappedFileData::MappedFileData): Making use of convertSafely.
1196         * platform/posix/SharedBufferPOSIX.cpp:
1197         (WebCore::SharedBuffer::createFromReadingFile): Making use of convertSafely.
1198
1199 2015-08-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1200
1201         [Streams API] ReadableStreamReader closed promise should use CachedAttribute
1202         https://bugs.webkit.org/show_bug.cgi?id=147487
1203
1204         Reviewed by Darin Adler.
1205
1206         Covered by existing tests.
1207
1208         * Modules/streams/ReadableStreamReader.idl: Made closed a CachedAttribute.
1209         * bindings/js/JSReadableStreamReaderCustom.cpp:
1210         (WebCore::JSReadableStreamReader::closed): Updated according CachedAttribute specific field.
1211
1212 2015-08-09  Hunseop Jeong  <hs85.jeong@samsung.com>
1213
1214         [EFL] Use the non-overlay scrollbar
1215         https://bugs.webkit.org/show_bug.cgi?id=147725
1216
1217         Reviewed by Gyuyoung Kim.
1218
1219         No new tests because there is no behavior change.
1220
1221         * platform/efl/ScrollbarThemeEfl.cpp:
1222         (WebCore::ScrollbarThemeEfl::usesOverlayScrollbars):
1223         Changed the condition of the 'usesOverlayScrollbars' to use the
1224         setting value.
1225         * platform/efl/ScrollbarThemeEfl.h:
1226
1227 2015-08-09  Chris Dumez  <cdumez@apple.com>
1228
1229         Page cache doesn't work for pages actively using Geolocation
1230         https://bugs.webkit.org/show_bug.cgi?id=147785
1231         <rdar://problem/11147901>
1232
1233         Reviewed by Darin Adler.
1234
1235         Allow pages actively using Geolocation into the PageCache.
1236
1237         Tests: fast/history/page-cache-geolocation-active-oneshot.html
1238                fast/history/page-cache-geolocation-active-watcher.html
1239
1240         * Modules/geolocation/Geolocation.cpp:
1241         (WebCore::Geolocation::canSuspendForPageCache):
1242         (WebCore::Geolocation::suspend): Deleted.
1243         * history/PageCache.cpp:
1244
1245 2015-08-09  Nan Wang  <n_wang@apple.com>
1246
1247         AX: CSS table display styles can cause malformed, inaccessible AXTables to be exposed to the AX tree
1248         https://bugs.webkit.org/show_bug.cgi?id=136415
1249         <rdar://problem/22026625>
1250
1251         Reviewed by Chris Fleizach.
1252
1253         Applying CSS display styles to tables can end up inserting anonymous RenderTableRows, which is not handled well by the 
1254         accessibility code, which treats these as the actual rows. We can address this by diving deeper into anonymous nodes 
1255         and finding the real rows and cells we want. In addition, another thing also causing malformed tables is that "grid" 
1256         roles are being exposed as AXGrid instead of AXTable.
1257
1258         Test: accessibility/mac/malformed-table.html
1259
1260         * accessibility/AccessibilityARIAGrid.cpp:
1261         (WebCore::AccessibilityARIAGrid::addRowDescendant):
1262         * accessibility/AccessibilityTable.cpp:
1263         (WebCore::AccessibilityTable::addChildren):
1264         (WebCore::AccessibilityTable::addTableCellChild):
1265         (WebCore::AccessibilityTable::addChildrenFromSection):
1266         * accessibility/AccessibilityTable.h:
1267         * accessibility/AccessibilityTableCell.cpp:
1268         (WebCore::AccessibilityTableCell::parentTable):
1269         (WebCore::AccessibilityTableCell::rowIndexRange):
1270         * accessibility/AccessibilityTableRow.cpp:
1271         (WebCore::AccessibilityTableRow::parentTable):
1272         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1273         (createAccessibilityRoleMap):
1274
1275 2015-08-08  Darin Adler  <darin@apple.com>
1276
1277         Remove -webkit-color-correction CSS property
1278         https://bugs.webkit.org/show_bug.cgi?id=147812
1279
1280         Reviewed by Maciej Stachowiak.
1281
1282         Covered by existing tests.
1283
1284         I am doing some general cleanup of handling of color spaces in WebKit.
1285         This removes the obsolete web-visible property that allowed clients to
1286         get color correction on older Apple platforms where we chose not to do
1287         it all the time for performance reasons. Currently, it has no effect on
1288         any supported platform.
1289
1290         Now that this property is removed, a website can detect that it's not
1291         there if it uses getComputedStyle, but I don't expect this to have
1292         significant compatibility fallout. It's harmless to continue using the
1293         property in legacy content or websites that have not been updated, since
1294         unknown property names are ignored and it had no effect before anyway.
1295
1296         * css/CSSComputedStyleDeclaration.cpp: Removed
1297         CSSPropertyWebkitColorCorrection from the list of computed properties.
1298         (WebCore::ComputedStyleExtractor::propertyValue): Removed the
1299         CSSPropertyWebkitColorCorrection case.
1300
1301         * css/CSSParser.cpp:
1302         (WebCore::isValidKeywordPropertyAndValue): Removed the
1303         CSSPropertyWebkitColorCorrection case.
1304         (WebCore::isKeywordPropertyID): Ditto.
1305         (WebCore::CSSParser::parseValue): Ditto.
1306
1307         * css/CSSPrimitiveValueMappings.h:
1308         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted the overload
1309         of this that converts a ColorSpace to a CSSPrimitiveValue.
1310         (WebCore::CSSPrimitiveValue::operator ColorSpace): Deleted.
1311
1312         * css/CSSPropertyNames.in: Removed -webkit-color-correction.
1313
1314         * css/CSSValueKeywords.in: Removed the -webkit-color-correction section,
1315         which contained sRGB.
1316
1317         * css/SVGCSSValueKeywords.in: Uncommented sRGB now that it's not shared
1318         with -webkit-color-correction.
1319
1320         * rendering/style/RenderStyle.h: Removed setColorSpace and initialColorSpace.
1321         Kept colorSpace around for now, but it simply returns ColorSpaceSRGB.
1322         This prevents us from needing to touch every single call site that passes
1323         the color space in to functions in the platform graphics abstraction.
1324         We'll touch most of those call sites when we change Color to include the
1325         color space and eventually we can delete this.
1326
1327         * rendering/style/StyleRareInheritedData.cpp: Deleted colorSpace.
1328         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted
1329         code to initialize colorSpace and to copy colorSpace.
1330         (WebCore::StyleRareInheritedData::operator==): Deleted code to compare
1331         colorSpace.
1332
1333 2015-08-09  Eric Carlson  <eric.carlson@apple.com>
1334
1335         [Mac] Always require ExternalDeviceAutoPlayCandidate flag to AirPlay automatically
1336         https://bugs.webkit.org/show_bug.cgi?id=147801
1337
1338         Reviewed by Dean Jackson.
1339
1340         Test: http/tests/media/video-media-document-disposition-download.html
1341
1342         * Modules/mediasession/WebMediaSessionManager.cpp:
1343         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Don't tell the last element
1344           to begin playing to the target unless the ExternalDeviceAutoPlayCandidate flag is set and 
1345           it is not currently playing.
1346
1347 2015-08-09  Myles C. Maxfield  <mmaxfield@apple.com>
1348
1349         Crash in ComplexTextController when laying out obscure text
1350         https://bugs.webkit.org/show_bug.cgi?id=147806
1351         <rdar://problem/22102378>
1352
1353         Reviewed by Darin Adler.
1354
1355         CTFontDescriptorCopyAttribute(fontDescriptor.get(), kCTFontReferenceURLAttribute) can return nullptr.
1356
1357         Test: fast/text/crash-obscure-text.html
1358
1359         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1360         (WebCore::safeCFEqual):
1361         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
1362
1363 2015-08-08  Dean Jackson  <dino@apple.com>
1364
1365         Remove the webkit prefix from CanvasRenderingContext2D imageSmoothingEnabled
1366         https://bugs.webkit.org/show_bug.cgi?id=147803
1367         <rdar://problem/22200553>
1368
1369         Reviewed by Sam Weinig.
1370
1371         Rename webkitImageSmoothingEnabled to imageSmoothingEnabled.
1372
1373         Updated existing tests, and made sure that the prefixed version is
1374         identical to the standard version.
1375
1376         * html/canvas/CanvasRenderingContext2D.cpp:
1377         (WebCore::CanvasRenderingContext2D::imageSmoothingEnabled): Renamed from webkitImageSmoothingEnabled.
1378         (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled): Renamed from setWebkitImageSmoothingEnabled.
1379         (WebCore::CanvasRenderingContext2D::webkitImageSmoothingEnabled): Deleted.
1380         (WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled): Deleted.
1381         * html/canvas/CanvasRenderingContext2D.h: Rename the methods.
1382         * html/canvas/CanvasRenderingContext2D.idl: Add the non-prefixed form, and mark is as the
1383         implementation of the prefixed form.
1384
1385 2015-08-09  Andreas Kling  <akling@apple.com>
1386
1387         Ref-ify some functions that always succeed in constructing Documents.
1388         <https://webkit.org/b/147552>
1389
1390         Reviewed by Sam Weinig.
1391
1392         Update some functions involved in the construction of new Document objects
1393         to codify that they always construct objects.
1394
1395         Bonus: DOMImplementation::createCSSStyleSheet().
1396
1397         * dom/DOMImplementation.cpp:
1398         (WebCore::DOMImplementation::createCSSStyleSheet):
1399         (WebCore::DOMImplementation::createHTMLDocument):
1400         (WebCore::DOMImplementation::createDocument):
1401         * dom/DOMImplementation.h:
1402         * loader/DocumentWriter.cpp:
1403         (WebCore::DocumentWriter::createDocument):
1404         (WebCore::DocumentWriter::begin):
1405         * loader/DocumentWriter.h:
1406         * xml/DOMParser.cpp:
1407         (WebCore::DOMParser::parseFromString):
1408         * xml/DOMParser.h:
1409         * xml/XSLTProcessor.cpp:
1410         (WebCore::XSLTProcessor::createDocumentFromSource):
1411         * xml/XSLTProcessor.h:
1412
1413 2015-08-08  Commit Queue  <commit-queue@webkit.org>
1414
1415         Unreviewed, rolling out r179871.
1416         https://bugs.webkit.org/show_bug.cgi?id=147810
1417
1418         Breaks product images on http://www.apple.com/shop/buy-
1419         mac/macbook (Requested by smfr on #webkit).
1420
1421         Reverted changeset:
1422
1423         "Render: properly update body's background image"
1424         https://bugs.webkit.org/show_bug.cgi?id=140183
1425         http://trac.webkit.org/changeset/179871
1426
1427 2015-08-07  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1428
1429         Reduce uses of PassRefPtr in bindings
1430         https://bugs.webkit.org/show_bug.cgi?id=147781
1431
1432         Reviewed by Chris Dumez.
1433
1434         Use RefPtr when function can return null or an instance. If not, Ref is used.
1435
1436         * bindings/gobject/GObjectNodeFilterCondition.h:
1437         * bindings/gobject/GObjectXPathNSResolver.h:
1438         * bindings/gobject/WebKitDOMNodeFilter.cpp:
1439         (WebKit::core):
1440         * bindings/gobject/WebKitDOMNodeFilterPrivate.h:
1441         * bindings/gobject/WebKitDOMXPathNSResolver.cpp:
1442         (WebKit::core):
1443         * bindings/gobject/WebKitDOMXPathNSResolverPrivate.h:
1444         * bindings/js/CallbackFunction.h:
1445         (WebCore::createFunctionOnlyCallback):
1446         * bindings/js/Dictionary.h:
1447         (WebCore::Dictionary::getEventListener):
1448         * bindings/js/IDBBindingUtilities.cpp:
1449         (WebCore::createIDBKeyFromValue):
1450         (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
1451         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
1452         (WebCore::scriptValueToIDBKey):
1453         * bindings/js/IDBBindingUtilities.h:
1454         * bindings/js/JSDOMBinding.h:
1455         (WebCore::toInt8Array):
1456         (WebCore::toInt16Array):
1457         (WebCore::toInt32Array):
1458         (WebCore::toUint8Array):
1459         (WebCore::toUint8ClampedArray):
1460         (WebCore::toUint16Array):
1461         (WebCore::toUint32Array):
1462         (WebCore::toFloat32Array):
1463         (WebCore::toFloat64Array):
1464         * bindings/js/JSDOMStringListCustom.cpp:
1465         (WebCore::JSDOMStringList::toWrapped):
1466         * bindings/js/JSDeviceMotionEventCustom.cpp:
1467         (WebCore::readAccelerationArgument):
1468         (WebCore::readRotationRateArgument):
1469         * bindings/js/JSErrorHandler.h:
1470         (WebCore::createJSErrorHandler):
1471         * bindings/js/JSGeolocationCustom.cpp:
1472         (WebCore::createPositionOptions):
1473         * bindings/js/JSNodeCustom.cpp:
1474         * bindings/js/JSNodeFilterCustom.cpp:
1475         (WebCore::JSNodeFilter::toWrapped):
1476         * bindings/js/ScriptController.cpp:
1477         (WebCore::ScriptController::createWorld):
1478         (WebCore::ScriptController::createRootObject):
1479         (WebCore::ScriptController::createScriptInstanceForWidget):
1480         * bindings/js/ScriptController.h:
1481         * bindings/js/ScriptControllerMac.mm:
1482         (WebCore::ScriptController::createScriptInstanceForWidget):
1483         * bindings/js/SerializedScriptValue.cpp:
1484         (WebCore::SerializedScriptValue::create):
1485         * bindings/js/SerializedScriptValue.h:
1486         * bindings/objc/DOMUIKitExtensions.mm:
1487         (-[DOMNode rangeOfContainingParagraph]):
1488         * bindings/objc/ObjCNodeFilterCondition.h:
1489         * bindings/scripts/CodeGeneratorJS.pm:
1490         (GenerateHeader):
1491
1492 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
1493
1494         [OS X] Remove dead code from FontCache::createFontPlatformData()
1495         https://bugs.webkit.org/show_bug.cgi?id=147804
1496
1497         Reviewed by Zalan Bujtas.
1498
1499         CTFontCreateForCSS() always returns the best font.
1500
1501         No new tests because there is no behavior change.
1502
1503         * platform/graphics/mac/FontCacheMac.mm:
1504         (WebCore::fontWithFamily):
1505
1506 2015-08-07  Zalan Bujtas  <zalan@apple.com>
1507
1508         Move painting functions from RenderObject to RenderElement.
1509         https://bugs.webkit.org/show_bug.cgi?id=147764
1510
1511         Reviewed by Simon Fraser.
1512
1513         Ideally they should live in RenderBoxModelObject, but the current SVG architecture makes is difficult
1514         to move them there.
1515
1516         No change in functionality.
1517
1518         * platform/graphics/FloatRect.h:
1519         (WebCore::FloatRect::FloatRect):
1520         * rendering/RenderBoxModelObject.cpp:
1521         (WebCore::RenderBoxModelObject::paintOneBorderSide):
1522         * rendering/RenderElement.cpp:
1523         (WebCore::RenderElement::drawLineForBoxSide):
1524         (WebCore::RenderElement::paintFocusRing):
1525         (WebCore::RenderElement::paintOutline):
1526         * rendering/RenderElement.h:
1527         * rendering/RenderInline.cpp:
1528         (WebCore::RenderInline::paintOutline):
1529         (WebCore::RenderInline::paintOutlineForLine):
1530         * rendering/RenderMultiColumnSet.cpp:
1531         (WebCore::RenderMultiColumnSet::paintColumnRules):
1532         * rendering/RenderObject.cpp:
1533         (WebCore::RenderObject::drawLineForBoxSide): Deleted.
1534         (WebCore::RenderObject::paintFocusRing): Deleted.
1535         (WebCore::RenderObject::paintOutline): Deleted.
1536         * rendering/RenderObject.h:
1537         * rendering/RenderTableCell.cpp:
1538         (WebCore::RenderTableCell::paintCollapsedBorders):
1539         * rendering/RenderTableSection.cpp:
1540         (WebCore::RenderTableSection::paintRowGroupBorder):
1541         * rendering/RenderTheme.h:
1542         (WebCore::RenderTheme::paintMenuListButtonDecorations):
1543         * rendering/RenderThemeIOS.h:
1544         * rendering/RenderThemeIOS.mm:
1545         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
1546         * rendering/RenderThemeMac.h:
1547         * rendering/RenderThemeMac.mm:
1548         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
1549
1550 2015-08-07  James Craig  <jcraig@apple.com>
1551
1552         REGRESSION(r184722) AX: WebKit video playback toolbar removed from DOM; no longer accessible to VoiceOver
1553         https://bugs.webkit.org/show_bug.cgi?id=145684
1554
1555         Reviewed by Dean Jackson.
1556
1557         Updated Apple Video controls to add an invisible but focusable button that allows VoiceOver 
1558         users (and when unblocked, keyboard users) to re-display the video controls.
1559
1560         Test: media/video-controls-show-on-kb-or-ax-event.html
1561
1562         * English.lproj/mediaControlsLocalizedStrings.js:
1563         * Modules/mediacontrols/mediaControlsApple.css:
1564         (audio::-webkit-media-show-controls):
1565         (video::-webkit-media-show-controls):
1566         * Modules/mediacontrols/mediaControlsApple.js:
1567         (Controller.prototype.createControls):
1568         (Controller.prototype.handleFullscreenChange):
1569         (Controller.prototype.handleShowControlsClick):
1570         (Controller.prototype.handleWrapperMouseMove):
1571         (Controller.prototype.updateForShowingControls):
1572         (Controller.prototype.showControls):
1573         (Controller.prototype.hideControls):
1574         (Controller.prototype.setNeedsUpdateForDisplayedWidth):
1575         * Modules/mediacontrols/mediaControlsiOS.css:
1576         (audio::-webkit-media-show-controls):
1577         (video::-webkit-media-show-controls):
1578
1579 2015-08-07  Alex Christensen  <achristensen@webkit.org>
1580
1581         Build more testing binaries with CMake on Windows
1582         https://bugs.webkit.org/show_bug.cgi?id=147799
1583
1584         Reviewed by Brent Fulgham.
1585
1586         * CMakeLists.txt:
1587         MockCDM.cpp needs to be part of WebCoreTestSupport, not WebCore.
1588         * PlatformWin.cmake:
1589         Added files needed for AppleWin port.
1590
1591 2015-08-07  Anders Carlsson  <andersca@apple.com>
1592
1593         Being moving away from using SQLTransactionStateMachine in SQLTransactionBackend
1594         https://bugs.webkit.org/show_bug.cgi?id=147798
1595
1596         Reviewed by Geoffrey Garen.
1597
1598         This is the first step towards getting rid of the state machine so we can ultimately merge SQLTransactionBackend
1599         into SQLTransaction.
1600
1601         Instead of having the state machine run our functions, just run them ourselves where we can. For states that need
1602         to be handled in the frontend, call SQLTransaction::requestTransitToState explicitly.
1603
1604         * Modules/webdatabase/SQLTransactionBackend.cpp:
1605         (WebCore::SQLTransactionBackend::stateFunctionFor):
1606         (WebCore::SQLTransactionBackend::lockAcquired):
1607         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
1608         (WebCore::SQLTransactionBackend::runStatements):
1609         (WebCore::SQLTransactionBackend::runCurrentStatement):
1610         (WebCore::SQLTransactionBackend::handleCurrentStatementError):
1611         (WebCore::SQLTransactionBackend::handleTransactionError):
1612         (WebCore::SQLTransactionBackend::postflightAndCommit):
1613         (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState): Deleted.
1614         (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError): Deleted.
1615         (WebCore::SQLTransactionBackend::nextStateForTransactionError): Deleted.
1616         (WebCore::SQLTransactionBackend::sendToFrontendState): Deleted.
1617         * Modules/webdatabase/SQLTransactionBackend.h:
1618
1619 2015-08-07  Filip Pizlo  <fpizlo@apple.com>
1620
1621         Lightweight locks should be adaptive
1622         https://bugs.webkit.org/show_bug.cgi?id=147545
1623
1624         Reviewed by Geoffrey Garen.
1625
1626         * bindings/objc/WebScriptObject.mm:
1627         (WebCore::getJSWrapper):
1628         (WebCore::addJSWrapper):
1629         (WebCore::removeJSWrapper):
1630         (WebCore::removeJSWrapperIfRetainCountOne):
1631         * platform/audio/mac/CARingBuffer.cpp:
1632         (WebCore::CARingBuffer::setCurrentFrameBounds):
1633         (WebCore::CARingBuffer::getCurrentFrameBounds):
1634         * platform/audio/mac/CARingBuffer.h:
1635         * platform/ios/wak/WAKWindow.mm:
1636         (-[WAKWindow setExposedScrollViewRect:]):
1637         (-[WAKWindow exposedScrollViewRect]):
1638
1639 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
1640
1641         Post-review comments on r188146
1642         https://bugs.webkit.org/show_bug.cgi?id=147793
1643
1644         Reviewed by Daniel Bates.
1645
1646         No new tests because there is no behavior change.
1647
1648         * platform/graphics/FontCache.h:
1649         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1650         (WebCore::appendTrueTypeFeature):
1651         (WebCore::appendOpenTypeFeature):
1652         (WebCore::applyFontFeatureSettings):
1653         * platform/graphics/ios/FontCacheIOS.mm:
1654         (WebCore::FontCache::getSystemFontFallbackForCharacters):
1655         (WebCore::FontCache::createFontPlatformData):
1656         * platform/graphics/mac/FontCacheMac.mm:
1657         (WebCore::fontWithFamily):
1658         (WebCore::FontCache::systemFallbackForCharacters):
1659         * platform/graphics/mac/FontCustomPlatformData.cpp:
1660         (WebCore::FontCustomPlatformData::fontPlatformData):
1661         * rendering/RenderThemeIOS.mm:
1662         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
1663
1664 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
1665
1666         [Cocoa] Font fallback is not language-sensitive
1667         https://bugs.webkit.org/show_bug.cgi?id=147390
1668
1669         Reviewed by Dean Jackson.
1670
1671         We need to make our font fallback code sensitive to locale.
1672
1673         This patch rolls r187729 back in. However, only particular versions of iOS and OS X are
1674         performant enough to enable this language-sensitivity.
1675
1676         This patch also applies to iOS.
1677
1678         Test: fast/text/fallback-language-han.html
1679
1680         * platform/graphics/mac/FontCacheMac.mm:
1681         (WebCore::lookupCTFont):
1682         (WebCore::FontCache::systemFallbackForCharacters):
1683         * platform/graphics/mac/FontCacheIOS.mm:
1684         (WebCore::FontCache::systemFallbackForCharacters):
1685
1686 2015-08-07  Zalan Bujtas  <zalan@apple.com>
1687
1688         RenderTheme::volumeSliderOffsetFromMuteButton should take const& RenderBox.
1689         https://bugs.webkit.org/show_bug.cgi?id=147731
1690
1691         Reviewed by Simon Fraser.
1692
1693         No change in functionality.
1694
1695         * rendering/RenderMediaControlElements.cpp:
1696         (WebCore::RenderMediaVolumeSliderContainer::layout):
1697         * rendering/RenderMediaControls.cpp:
1698         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton): Deleted.
1699         * rendering/RenderMediaControls.h:
1700         * rendering/RenderTheme.cpp:
1701         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
1702         * rendering/RenderTheme.h:
1703
1704 2015-08-07  Zalan Bujtas  <zalan@apple.com>
1705
1706         Replace RenderObject::isRooted() logic with isDescendantOf().
1707         https://bugs.webkit.org/show_bug.cgi?id=147788
1708
1709         Reviewed by Simon Fraser.
1710
1711         And some related cleanups.
1712
1713         No change in functionality.
1714
1715         * page/FrameView.cpp:
1716         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1717         (WebCore::FrameView::extendedBackgroundRectForPainting):
1718         * rendering/RenderBox.cpp:
1719         (WebCore::RenderBox::paintRootBoxFillLayers):
1720         * rendering/RenderElement.cpp:
1721         (WebCore::shouldRepaintForImageAnimation):
1722         * rendering/RenderObject.cpp:
1723         (WebCore::RenderObject::isDescendantOf):
1724         (WebCore::scheduleRelayoutForSubtree):
1725         (WebCore::RenderObject::repaint):
1726         (WebCore::RenderObject::repaintRectangle):
1727         (WebCore::RenderObject::repaintSlowRepaintObject):
1728         (WebCore::RenderObject::isRooted):
1729         * rendering/RenderObject.h:
1730         * rendering/RenderView.cpp:
1731         (WebCore::RenderView::unextendedBackgroundRect):
1732         (WebCore::RenderView::backgroundRect):
1733         * rendering/RenderView.h:
1734
1735 2015-08-07  Zalan Bujtas  <zalan@apple.com>
1736
1737         Subtree layout code should use RenderElement.
1738         https://bugs.webkit.org/show_bug.cgi?id=147694
1739
1740         Reviewed by Simon Fraser.
1741
1742         Subtree layout will never begin at a RenderText, so tighten up
1743         the code to operate on RenderElements instead of RenderObjects.
1744         (This patch is based on webkit.org/b/126878)
1745
1746         No change in functionality.
1747
1748         * inspector/InspectorTimelineAgent.cpp:
1749         (WebCore::InspectorTimelineAgent::willLayout):
1750         * page/FrameView.cpp:
1751         (WebCore::FrameView::FrameView): Deleted.
1752         (WebCore::FrameView::layoutRoot): Deleted.
1753         * page/FrameView.h:
1754         * rendering/RenderBox.cpp:
1755         (WebCore::RenderBox::computeLogicalWidthInRegion):
1756         * rendering/RenderElement.cpp:
1757         (WebCore::RenderElement::clearLayoutRootIfNeeded):
1758         (WebCore::RenderElement::willBeDestroyed):
1759         * rendering/RenderElement.h:
1760         * rendering/RenderObject.cpp:
1761         (WebCore::RenderObject::clearLayoutRootIfNeeded): Deleted.
1762         (WebCore::RenderObject::willBeDestroyed): Deleted.
1763         * rendering/RenderObject.h:
1764
1765 2015-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1766
1767         Temporarily allow programmatic input assistance for adding Gmail account
1768         https://bugs.webkit.org/show_bug.cgi?id=147792
1769
1770         Reviewed by Enrica Casucci.
1771         <rdar://problem/22126518>
1772
1773         Temporary fix for keyboard input sliding out and immediately back in upon user interaction
1774         in the Gmail 2-factor authentication page.
1775
1776         * platform/RuntimeApplicationChecksIOS.h:
1777         * platform/RuntimeApplicationChecksIOS.mm:
1778         (WebCore::applicationIsGmailAddAccountOnIOS): Added bundle ID for Gmail settings.
1779
1780 2015-08-07  Andy Estes  <aestes@apple.com>
1781
1782         Crash when following a Google search link to Twitter with Limit Adult Content enabled
1783         https://bugs.webkit.org/show_bug.cgi?id=147651
1784
1785         Reviewed by Brady Eidson.
1786
1787         When a loaded CachedRawResource gets a new client, it synthesizes the callbacks that the new client would have
1788         received while the resource was loading. Unlike a real network load, it synthesizes these callbacks in a single
1789         run loop iteration. When DocumentLoader receives a redirect, and finds substitute data in the app cache for the
1790         redirect URL, it schedules a timer that removes DocumentLoader as a client of the CachedRawResource then
1791         synthesizes its own set of CachedRawResourceClient callbacks. But since CachedRawResource has already delivered
1792         client callbacks before the app cache timer fires, DocumentLoader unexpectedly ends up getting two sets of
1793         client callbacks and badness ensues.
1794
1795         The fix is to let CachedRawResource detect if a redirect will trigger the client to load substitute data. If so,
1796         stop delivering client callbacks.
1797
1798         Layout test to follow.
1799
1800         * loader/DocumentLoader.cpp:
1801         (WebCore::DocumentLoader::syntheticRedirectReceived): If there is valid substitute data, do not continue.
1802         * loader/DocumentLoader.h:
1803         * loader/cache/CachedRawResource.cpp: Returned early if syntheticRedirectReceived() said not to continue.
1804         (WebCore::CachedRawResource::didAddClient):
1805         * loader/cache/CachedRawResourceClient.h:
1806         (WebCore::CachedRawResourceClient::syntheticRedirectReceived):
1807
1808 2015-08-06  Dean Jackson  <dino@apple.com>
1809
1810         Shadows don't draw on fillText when using a gradient fill
1811         https://bugs.webkit.org/show_bug.cgi?id=147758
1812         <rdar://problem/20860912>
1813
1814         Reviewed by Myles Maxfield.
1815
1816         Since we use a mask to render a pattern or gradient
1817         into text, any shadow was being clipped out. Change
1818         this to draw the shadow before the mask + fill operation,
1819         using a technique similar to text-shadow.
1820
1821         Test: fast/canvas/gradient-text-with-shadow.html
1822
1823         * html/canvas/CanvasRenderingContext2D.cpp:
1824         (WebCore::CanvasRenderingContext2D::drawTextInternal): Get the current shadow
1825         style, paint the text with a transformed shadow offset so that we only
1826         see the shadow and not the text, then combine with the existing pattern/gradient
1827         fill.
1828
1829 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
1830
1831         Implement font-feature-settings
1832         https://bugs.webkit.org/show_bug.cgi?id=147722
1833
1834         Reviewed by Simon Fraser.
1835
1836         Fonts with features are simply modeled as new font objects. Font
1837         feature information is contained within FontDescription, and our
1838         caches are correctly sensitive to this information. Therefore,
1839         we just need to make our font lookup code honor the request to
1840         use certain features.
1841
1842         This patch creates a file, FontCacheCoreText.cpp, which will be the
1843         new home of all shared OS X / iOS FontCache code. Over time, I will
1844         be moving more and more source into this file, until there is
1845         nothing left of FontCacheMac.mm and FontCacheIOS.mm. For now, the
1846         only function in this file is the code which applies font features.
1847
1848         Test: css3/font-feature-settings-preinstalled-fonts.html
1849
1850         * WebCore.xcodeproj/project.pbxproj: Add FontCacheCoreText.cpp.
1851         * platform/graphics/FontCache.h:
1852         * platform/graphics/cocoa/FontCacheCoreText.cpp: Added.
1853         (WebCore::appendTrueTypeFeature): What the name says.
1854         (WebCore::appendOpenTypeFeature): Ditto.
1855         (WebCore::applyFontFeatureSettings): Ditto.
1856         * platform/graphics/ios/FontCacheIOS.mm:
1857         (WebCore::FontCache::getSystemFontFallbackForCharacters): Call
1858         applyFontFeatureSettings().
1859         (WebCore::FontCache::createFontPlatformData): Ditto.
1860         * platform/graphics/mac/FontCacheMac.mm:
1861         (WebCore::fontWithFamily): Ditto.
1862         (WebCore::FontCache::systemFallbackForCharacters): Ditto.
1863         (WebCore::FontCache::createFontPlatformData): Ditto.
1864         * platform/graphics/mac/FontCustomPlatformData.cpp:
1865         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
1866         * rendering/RenderThemeIOS.mm:
1867         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
1868         Ditto.
1869
1870 2015-08-07  Commit Queue  <commit-queue@webkit.org>
1871
1872         Unreviewed, rolling out r187907.
1873         https://bugs.webkit.org/show_bug.cgi?id=147789
1874
1875         taking a different approach to the fix (Requested by estes on
1876         #webkit).
1877
1878         Reverted changeset:
1879
1880         "Crash when following a Google search link to Twitter with
1881         Limit Adult Content enabled."
1882         https://bugs.webkit.org/show_bug.cgi?id=147651
1883         http://trac.webkit.org/changeset/187907
1884
1885 2015-08-07  Alex Christensen  <achristensen@webkit.org>
1886
1887         Fix WinCairo build after r188130.
1888
1889         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1890         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1891         (WebCore::FontCustomPlatformData::fontPlatformData):
1892         I forgot the parameter name.
1893
1894 2015-08-07  Alex Christensen  <achristensen@webkit.org>
1895
1896         Fix WinCairo build after r188130.
1897
1898         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1899         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1900         (WebCore::FontCustomPlatformData::fontPlatformData):
1901         Update fontPlatformData parameters.
1902
1903 2015-08-07  Daniel Bates  <dabates@apple.com>
1904
1905         Attempt to fix the Windows build after <http://trac.webkit.org/changeset/188130>
1906         (https://bugs.webkit.org/show_bug.cgi?id=147775)
1907
1908         Include header FontDescription.h.
1909
1910         * platform/graphics/win/FontCustomPlatformData.cpp:
1911         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1912
1913 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
1914
1915         Allow FontCustomPlatformData to consult with FontDescription
1916         https://bugs.webkit.org/show_bug.cgi?id=147775
1917
1918         Reviewed by Zalan Bujtas.
1919
1920         In order to implement font-feature-settings, web fonts need to be
1921         able to consult with the set of active font features. Rather than
1922         add yet another argument to all the functions in this flow, this
1923         patch passes around a reference to the FontDescription itself instead
1924         of copies of constituent members of it.
1925
1926         No new tests because there is no behavior change.
1927
1928         * css/CSSFontFaceSource.cpp:
1929         (WebCore::CSSFontFaceSource::font):
1930         * loader/cache/CachedFont.cpp:
1931         (WebCore::CachedFont::createFont):
1932         (WebCore::CachedFont::platformDataFromCustomData):
1933         * loader/cache/CachedFont.h:
1934         * loader/cache/CachedSVGFont.cpp:
1935         (WebCore::CachedSVGFont::platformDataFromCustomData):
1936         * loader/cache/CachedSVGFont.h:
1937         * platform/graphics/cairo/FontCustomPlatformData.h:
1938         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1939         (WebCore::FontCustomPlatformData::fontPlatformData):
1940         * platform/graphics/freetype/FontPlatformData.h:
1941         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1942         (WebCore::FontPlatformData::FontPlatformData):
1943         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1944         (WebCore::Font::platformCreateScaledFont):
1945         * platform/graphics/mac/FontCustomPlatformData.cpp:
1946         (WebCore::FontCustomPlatformData::fontPlatformData):
1947         * platform/graphics/mac/FontCustomPlatformData.h:
1948         * platform/graphics/win/FontCustomPlatformData.cpp:
1949         (WebCore::FontCustomPlatformData::fontPlatformData):
1950         * platform/graphics/win/FontCustomPlatformData.h:
1951
1952 2015-08-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1953
1954         [Streams API] Create CountQueuingStrategy object as per spec
1955         https://bugs.webkit.org/show_bug.cgi?id=146594
1956
1957         Reviewed by Geoffrey Garen.
1958
1959         CountQueuingStrategy is a class part of the Streams API that can be found at
1960         https://streams.spec.whatwg.org/#cqs-class. We had it as js at the tests but the spec says we have to provide it
1961         natively. The class is implemented in this patch by creating its corresponding IDL with the size method using
1962         the [CustomBinding] attribute, that does not create any bindings against the object allowing us full control to
1963         do what the spec requires (just returning 1 without any cast check). The constructor sets the highWaterMark
1964         property taking it from the argument.
1965
1966         Covered by current tests
1967         (LayoutTests/streams/reference-implementation/count-queuing-strategy.html and
1968         LayoutTests/streams/reference-implementation/brand-checks.html).
1969
1970         * CMakeLists.txt:
1971         * DerivedSources.cpp:
1972         * DerivedSources.make:
1973         * PlatformMac.cmake:
1974         * WebCore.vcxproj/WebCore.vcxproj:
1975         * WebCore.vcxproj/WebCore.vcxproj.filters:
1976         * WebCore.xcodeproj/project.pbxproj:
1977         * bindings/js/JSBindingsAllInOne.cpp: Build infrastructure.
1978         * Modules/streams/CountQueuingStrategy.h: Added.
1979         (WebCore::CountQueuingStrategy::~CountQueuingStrategy): Created empty.
1980         (WebCore::CountQueuingStrategy::size): Returns 1.
1981         * Modules/streams/CountQueuingStrategy.idl: Added.
1982         * bindings/js/JSCountQueuingStrategyCustom.cpp: Added.
1983         (WebCore::jsCountQueuingStrategyPrototypeFunctionSize): Calls WebCore::CountQueuingStrategy::size.
1984         (WebCore::constructJSCountQueuingStrategy): Constructs the strategy, copies the highWaterMark from the argument
1985         and returns it.
1986         * bindings/js/JSDOMBinding.h:
1987         (WebCore::getPropertyFromObject): Moved from ReadableJSStream.cpp.
1988         (WebCore::setPropertyToObject): Added to create a property into an object.
1989         * bindings/js/ReadableJSStream.cpp:
1990         (WebCore::getPropertyFromObject): Deleted.
1991
1992 2015-08-07  Brady Eidson  <beidson@apple.com>
1993
1994         Move concrete KeyedDecoder/Encoder implementations to WebCore.
1995         https://bugs.webkit.org/show_bug.cgi?id=147757.
1996
1997         Rubberstamped by Andy Estes.
1998
1999         * PlatformEfl.cmake:
2000         * PlatformGTK.cmake:
2001         * WebCore.xcodeproj/project.pbxproj:
2002
2003         * platform/KeyedCoding.h:
2004         (WebCore::KeyedDecoder::KeyedDecoder): Static constructor to be implemented per-platform.
2005         (WebCore::KeyedEncoder::KeyedEncoder): Ditto.
2006
2007         * platform/cf/KeyedDecoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.cpp.
2008         (WebCore::KeyedDecoder::decoder):
2009         (WebCore::KeyedDecoderCF::KeyedDecoderCF):
2010         (WebCore::KeyedDecoderCF::~KeyedDecoderCF):
2011         (WebCore::KeyedDecoderCF::decodeBytes):
2012         (WebCore::KeyedDecoderCF::decodeBool):
2013         (WebCore::KeyedDecoderCF::decodeUInt32):
2014         (WebCore::KeyedDecoderCF::decodeInt32):
2015         (WebCore::KeyedDecoderCF::decodeInt64):
2016         (WebCore::KeyedDecoderCF::decodeFloat):
2017         (WebCore::KeyedDecoderCF::decodeDouble):
2018         (WebCore::KeyedDecoderCF::decodeString):
2019         (WebCore::KeyedDecoderCF::beginObject):
2020         (WebCore::KeyedDecoderCF::endObject):
2021         (WebCore::KeyedDecoderCF::beginArray):
2022         (WebCore::KeyedDecoderCF::beginArrayElement):
2023         (WebCore::KeyedDecoderCF::endArrayElement):
2024         (WebCore::KeyedDecoderCF::endArray):
2025         * platform/cf/KeyedDecoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.h.
2026         
2027         * platform/cf/KeyedEncoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.cpp.
2028         (WebCore::KeyedEncoder::encoder):
2029         (WebCore::createDictionary):
2030         (WebCore::KeyedEncoderCF::KeyedEncoderCF):
2031         (WebCore::KeyedEncoderCF::~KeyedEncoderCF):
2032         (WebCore::KeyedEncoderCF::encodeBytes):
2033         (WebCore::KeyedEncoderCF::encodeBool):
2034         (WebCore::KeyedEncoderCF::encodeUInt32):
2035         (WebCore::KeyedEncoderCF::encodeInt32):
2036         (WebCore::KeyedEncoderCF::encodeInt64):
2037         (WebCore::KeyedEncoderCF::encodeFloat):
2038         (WebCore::KeyedEncoderCF::encodeDouble):
2039         (WebCore::KeyedEncoderCF::encodeString):
2040         (WebCore::KeyedEncoderCF::beginObject):
2041         (WebCore::KeyedEncoderCF::endObject):
2042         (WebCore::KeyedEncoderCF::beginArray):
2043         (WebCore::KeyedEncoderCF::beginArrayElement):
2044         (WebCore::KeyedEncoderCF::endArrayElement):
2045         (WebCore::KeyedEncoderCF::endArray):
2046         (WebCore::KeyedEncoderCF::finishEncoding):
2047         * platform/cf/KeyedEncoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.h.
2048         
2049         * platform/glib/KeyedDecoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.cpp.
2050         (WebCore::KeyedDecoder::decoder):
2051         (WebCore::KeyedDecoderGlib::KeyedDecoderGlib):
2052         (WebCore::KeyedDecoderGlib::~KeyedDecoderGlib):
2053         (WebCore::KeyedDecoderGlib::dictionaryFromGVariant):
2054         (WebCore::KeyedDecoderGlib::decodeBytes):
2055         (WebCore::KeyedDecoderGlib::decodeSimpleValue):
2056         (WebCore::KeyedDecoderGlib::decodeBool):
2057         (WebCore::KeyedDecoderGlib::decodeUInt32):
2058         (WebCore::KeyedDecoderGlib::decodeInt32):
2059         (WebCore::KeyedDecoderGlib::decodeInt64):
2060         (WebCore::KeyedDecoderGlib::decodeFloat):
2061         (WebCore::KeyedDecoderGlib::decodeDouble):
2062         (WebCore::KeyedDecoderGlib::decodeString):
2063         (WebCore::KeyedDecoderGlib::beginObject):
2064         (WebCore::KeyedDecoderGlib::endObject):
2065         (WebCore::KeyedDecoderGlib::beginArray):
2066         (WebCore::KeyedDecoderGlib::beginArrayElement):
2067         (WebCore::KeyedDecoderGlib::endArrayElement):
2068         (WebCore::KeyedDecoderGlib::endArray):
2069         * platform/glib/KeyedDecoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.h.
2070         
2071         * platform/glib/KeyedEncoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.cpp.
2072         (WebCore::KeyedEncoder::encoder):
2073         (WebCore::KeyedEncoderGlib::KeyedEncoderGlib):
2074         (WebCore::KeyedEncoderGlib::~KeyedEncoderGlib):
2075         (WebCore::KeyedEncoderGlib::encodeBytes):
2076         (WebCore::KeyedEncoderGlib::encodeBool):
2077         (WebCore::KeyedEncoderGlib::encodeUInt32):
2078         (WebCore::KeyedEncoderGlib::encodeInt32):
2079         (WebCore::KeyedEncoderGlib::encodeInt64):
2080         (WebCore::KeyedEncoderGlib::encodeFloat):
2081         (WebCore::KeyedEncoderGlib::encodeDouble):
2082         (WebCore::KeyedEncoderGlib::encodeString):
2083         (WebCore::KeyedEncoderGlib::beginObject):
2084         (WebCore::KeyedEncoderGlib::endObject):
2085         (WebCore::KeyedEncoderGlib::beginArray):
2086         (WebCore::KeyedEncoderGlib::beginArrayElement):
2087         (WebCore::KeyedEncoderGlib::endArrayElement):
2088         (WebCore::KeyedEncoderGlib::endArray):
2089         (WebCore::KeyedEncoderGlib::finishEncoding):
2090         * platform/glib/KeyedEncoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.h.
2091
2092 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2093
2094         [GStreamer] Do not automatically show PackageKit codec installation notifications
2095         https://bugs.webkit.org/show_bug.cgi?id=135973
2096
2097         Reviewed by Philippe Normand.
2098
2099         Add description parameter to requestInstallMissingPlugins() that
2100         will be used by the API layer.
2101
2102         * html/HTMLMediaElement.cpp:
2103         (WebCore::HTMLMediaElement::requestInstallMissingPlugins):
2104         * html/HTMLMediaElement.h:
2105         * page/ChromeClient.h:
2106         * platform/graphics/MediaPlayer.h:
2107         (WebCore::MediaPlayerClient::requestInstallMissingPlugins):
2108         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2109         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2110
2111 2015-08-07  Doug Russell  <d_russell@apple.com>
2112
2113         AX: Bug 147737 is causing test failures in Mavericks WK1
2114         https://bugs.webkit.org/show_bug.cgi?id=147763
2115
2116         Restrict change made in 147737 to ElCapitan+ because it is causing tests
2117         to fail in Mavericks.
2118
2119         Reviewed by Chris Fleizach.
2120
2121         Fixes failing tests.
2122
2123         * accessibility/AXObjectCache.cpp:
2124         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
2125
2126 2015-08-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2127
2128         Create [CustomBinding] extended IDL attribute
2129         https://bugs.webkit.org/show_bug.cgi?id=146593
2130
2131         Reviewed by Geoffrey Garen.
2132
2133         Added the [CustomBinding] IDL extended attribute. The idea is that when using this attribute, bindings generate
2134         only the signature of the JS functions and we have to implement all the access in the Custom.cpp files, meaning
2135         accessing the implementations at our wish.
2136
2137         Added customBindingMethod, customBindingMethodWithArgs to the generator tests.
2138
2139         * bindings/scripts/CodeGeneratorGObject.pm:
2140         (SkipFunction): Skipped [CustomBinding] methods.
2141         * bindings/scripts/CodeGeneratorJS.pm:
2142         (GenerateHeader): Consider CustomBinding as ForwardDeclareInHeader.
2143         (GenerateImplementation): Avoid printing both header and implementation of the function.
2144         * bindings/scripts/CodeGeneratorObjC.pm:
2145         (SkipFunction): Skipped [CustomBinding] methods.
2146         * bindings/scripts/IDLAttributes.txt: Added [CustomBinding] IDL extended attribute.
2147         * bindings/scripts/test/JS/JSTestObj.cpp:
2148         * bindings/scripts/test/TestObj.idl: Added customBindingMethod, customBindingMethodWithArgs and their
2149         expectations.
2150
2151 2015-08-06  Zan Dobersek  <zdobersek@igalia.com>
2152
2153         Source/WebCore/crypto code should pass std::function<> objects through rvalue references
2154         https://bugs.webkit.org/show_bug.cgi?id=147332
2155
2156         Reviewed by Anders Carlsson.
2157
2158         Pass the std::function<> callbacks through CryptoAlgorithm methods via
2159         rvlaue references. This avoids generation of unnecessary move and copy
2160         constructors for std::function<> objects that are being handled.
2161
2162         * crypto/CryptoAlgorithm.cpp:
2163         (WebCore::CryptoAlgorithm::encrypt):
2164         (WebCore::CryptoAlgorithm::decrypt):
2165         (WebCore::CryptoAlgorithm::sign):
2166         (WebCore::CryptoAlgorithm::verify):
2167         (WebCore::CryptoAlgorithm::digest):
2168         (WebCore::CryptoAlgorithm::generateKey):
2169         (WebCore::CryptoAlgorithm::deriveKey):
2170         (WebCore::CryptoAlgorithm::deriveBits):
2171         (WebCore::CryptoAlgorithm::importKey):
2172         (WebCore::CryptoAlgorithm::encryptForWrapKey):
2173         (WebCore::CryptoAlgorithm::decryptForUnwrapKey):
2174         * crypto/CryptoAlgorithm.h:
2175         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2176         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
2177         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
2178         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
2179         (WebCore::CryptoAlgorithmAES_CBC::importKey):
2180         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
2181         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
2182         (WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey):
2183         (WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey):
2184         (WebCore::CryptoAlgorithmAES_KW::generateKey):
2185         (WebCore::CryptoAlgorithmAES_KW::importKey):
2186         * crypto/algorithms/CryptoAlgorithmAES_KW.h:
2187         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2188         (WebCore::CryptoAlgorithmHMAC::sign):
2189         (WebCore::CryptoAlgorithmHMAC::verify):
2190         (WebCore::CryptoAlgorithmHMAC::generateKey):
2191         (WebCore::CryptoAlgorithmHMAC::importKey):
2192         * crypto/algorithms/CryptoAlgorithmHMAC.h:
2193         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
2194         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
2195         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
2196         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
2197         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
2198         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
2199         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
2200         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
2201         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
2202         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
2203         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
2204         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
2205         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
2206         (WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
2207         (WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
2208         (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
2209         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
2210         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
2211         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
2212         (WebCore::CryptoAlgorithmSHA1::digest):
2213         * crypto/algorithms/CryptoAlgorithmSHA1.h:
2214         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
2215         (WebCore::CryptoAlgorithmSHA224::digest):
2216         * crypto/algorithms/CryptoAlgorithmSHA224.h:
2217         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
2218         (WebCore::CryptoAlgorithmSHA256::digest):
2219         * crypto/algorithms/CryptoAlgorithmSHA256.h:
2220         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
2221         (WebCore::CryptoAlgorithmSHA384::digest):
2222         * crypto/algorithms/CryptoAlgorithmSHA384.h:
2223         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
2224         (WebCore::CryptoAlgorithmSHA512::digest):
2225         * crypto/algorithms/CryptoAlgorithmSHA512.h:
2226         * crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:
2227         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
2228         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
2229         * crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:
2230         (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
2231         (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
2232         * crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:
2233         (WebCore::CryptoAlgorithmHMAC::platformSign):
2234         (WebCore::CryptoAlgorithmHMAC::platformVerify):
2235         * crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:
2236         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
2237         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
2238         * crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:
2239         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
2240         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
2241         * crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:
2242         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
2243         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
2244         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
2245         (WebCore::transformAES_CBC):
2246         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
2247         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
2248         * crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
2249         (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
2250         (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
2251         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
2252         (WebCore::CryptoAlgorithmHMAC::platformSign):
2253         (WebCore::CryptoAlgorithmHMAC::platformVerify):
2254         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
2255         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
2256         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
2257         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
2258         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
2259         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
2260         * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
2261         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
2262         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
2263
2264 2015-08-06  Alex Christensen  <achristensen@webkit.org>
2265
2266         Fix GTK clean build after r187997
2267         https://bugs.webkit.org/show_bug.cgi?id=147723
2268
2269         Reviewed by Gyuyoung Kim.
2270
2271         * CMakeLists.txt:
2272         r187997 made it so WebCoreTestSupport does not link with WebCore, which is necessary to get DumpRenderTree to link.
2273         It also made it so WebCoreTestSupport is no longer dependent on WebCore, which causes it to build at the same time.
2274         This caused problems because WebCoreTestSupport uses headers that are generated for WebCore, such as WebKitFontFamilyNames.h.
2275         Adding a dependency makes it so that WebCoreTestSupport waits until WebCore is done compiling before compiling,
2276         which is what it used to do, but it does not cause linking problems with DumpRenderTree.
2277
2278 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
2279
2280         CSSSegmentedFontFace::fontRanges() does not handle duplicate fonts correctly
2281         https://bugs.webkit.org/show_bug.cgi?id=147765
2282
2283         Reviewed by Filip Pizlo.
2284
2285         CSSSegmentedFontFace::fontRanges() was trying to hash on FontDescriptors by
2286         picking a few specific pieces of data out of the FontDescriptor, computing
2287         a hash on it, and using that unsigned as a key in a HashMap. This has two
2288         problems: it doesn't handle equality correctly, as hash collisions cannot
2289         depend on an equality operator to dedup, and it doesn't hash on all the
2290         members of a FontDescription.
2291
2292         Instead, this HashMap should use FontDescriptionKey, which represents a
2293         FontDescription, and is designed exactly for the purpose of being used as a
2294         key in a HashMap.
2295
2296         No new tests because there is no behavior change (because a problem occurs
2297         when two different FontDescriptions hash to the same value, which is rare).
2298
2299         * css/CSSSegmentedFontFace.cpp:
2300         (WebCore::CSSSegmentedFontFace::fontRanges):
2301         * css/CSSSegmentedFontFace.h:
2302         * platform/graphics/FontCache.h:
2303         (WebCore::FontDescriptionKeyHash::hash):
2304         (WebCore::FontDescriptionKeyHash::equal):
2305
2306 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
2307
2308         [iOS] Remove dead code from FontCache::createFontPlatformData()
2309         https://bugs.webkit.org/show_bug.cgi?id=147762
2310
2311         Reviewed by Andy Estes.
2312
2313         No new tests because there is no behavior change.
2314
2315         * platform/graphics/ios/FontCacheIOS.mm:
2316         (WebCore::FontCache::createFontPlatformData): Deleted.
2317
2318 2015-08-06  Alex Christensen  <achristensen@webkit.org>
2319
2320         Revert part of my "build fix" in r188101.
2321
2322         * CMakeLists.txt:
2323         MockCDM was already conditionally added to WebCore_SOURCES, and that change causes dependency cycles when bug 147723 is fixed.
2324
2325 2015-08-06  Alex Christensen  <achristensen@webkit.org>
2326
2327         [Win] CMake build fix after r188098.
2328
2329         * CMakeLists.txt:
2330         MockCDM is necessary for testing if ENCRYPTED_MEDIA_V2 is enabled.
2331
2332 2015-08-06  Alex Christensen  <achristensen@webkit.org>
2333
2334         [Win] Enable all Windows features in CMake
2335         https://bugs.webkit.org/show_bug.cgi?id=147744
2336
2337         Reviewed by Tim Horton.
2338
2339         * PlatformWin.cmake:
2340         Add a file needed for enabling video.
2341
2342 2015-08-06  Anders Carlsson  <andersca@apple.com>
2343
2344         Rename SQLStatementBackend to SQLStatement
2345         https://bugs.webkit.org/show_bug.cgi?id=147755
2346
2347         Reviewed by Geoffrey Garen.
2348
2349         * CMakeLists.txt:
2350         * Modules/webdatabase/SQLStatement.h: Renamed from Source/WebCore/Modules/webdatabase/SQLStatementBackend.h.
2351         (WebCore::SQLStatement::hasStatementCallback):
2352         (WebCore::SQLStatement::hasStatementErrorCallback):
2353         * Modules/webdatabase/SQLStatementBackend.cpp: Removed.
2354         (WebCore::SQLStatementBackend::SQLStatementBackend): Deleted.
2355         (WebCore::SQLStatementBackend::~SQLStatementBackend): Deleted.
2356         (WebCore::SQLStatementBackend::sqlError): Deleted.
2357         (WebCore::SQLStatementBackend::sqlResultSet): Deleted.
2358         (WebCore::SQLStatementBackend::execute): Deleted.
2359         (WebCore::SQLStatementBackend::performCallback): Deleted.
2360         (WebCore::SQLStatementBackend::setDatabaseDeletedError): Deleted.
2361         (WebCore::SQLStatementBackend::setVersionMismatchedError): Deleted.
2362         (WebCore::SQLStatementBackend::setFailureDueToQuota): Deleted.
2363         (WebCore::SQLStatementBackend::clearFailureDueToQuota): Deleted.
2364         (WebCore::SQLStatementBackend::lastExecutionFailedDueToQuota): Deleted.
2365         * Modules/webdatabase/SQLStatementBackend.h:
2366         (WebCore::SQLStatementBackend::hasStatementCallback): Deleted.
2367         (WebCore::SQLStatementBackend::hasStatementErrorCallback): Deleted.
2368         * Modules/webdatabase/SQLTransaction.cpp:
2369         (WebCore::SQLTransaction::deliverStatementCallback):
2370         (WebCore::SQLTransaction::executeSQL):
2371         * Modules/webdatabase/SQLTransactionBackend.cpp:
2372         (WebCore::SQLTransactionBackend::currentStatement):
2373         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
2374         (WebCore::SQLTransactionBackend::executeSQL):
2375         * Modules/webdatabase/SQLTransactionBackend.h:
2376         * WebCore.vcxproj/WebCore.vcxproj:
2377         * WebCore.vcxproj/WebCore.vcxproj.filters:
2378         * WebCore.xcodeproj/project.pbxproj:
2379
2380 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
2381
2382         Make FontDescriptionKey sensitive to FontFeatureSettings
2383         https://bugs.webkit.org/show_bug.cgi?id=147751
2384
2385         Reviewed by Anders Carlsson.
2386
2387         Just like how FontDescription hashes should be sensitive to locale, they should
2388         also be sensitive to font features.
2389
2390         This patch also fixes operator== for FontDescriptionKey, which was previously
2391         comparing hashes for equality instead of the underlying data. Comparing hashes
2392         for equality is useless inside hashmaps.
2393
2394         This is in preparation for implementing font-feature-settings.
2395
2396         No new tests because there is no behavior change.
2397
2398         * platform/graphics/FontCache.cpp:
2399         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
2400         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
2401         (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Deleted.
2402         * platform/graphics/FontCache.h:
2403         (WebCore::FontDescriptionKey::FontDescriptionKey):
2404         (WebCore::FontDescriptionKey::operator==):
2405         (WebCore::FontDescriptionKey::operator!=):
2406         (WebCore::FontDescriptionKey::isHashTableDeletedValue):
2407         (WebCore::FontDescriptionKey::computeHash):
2408         * platform/graphics/FontFeatureSettings.cpp:
2409         (WebCore::FontFeature::hash):
2410         (WebCore::FontFeatureSettings::hash):
2411         * platform/graphics/FontFeatureSettings.h:
2412
2413 2015-08-06  Anders Carlsson  <andersca@apple.com>
2414
2415         Merge SQLStatement into SQLStatementBackend
2416         https://bugs.webkit.org/show_bug.cgi?id=147754
2417
2418         Reviewed by Geoffrey Garen.
2419
2420         * CMakeLists.txt:
2421         * Modules/webdatabase/Database.h:
2422         * Modules/webdatabase/SQLStatement.cpp: Removed.
2423         (WebCore::SQLStatement::SQLStatement): Deleted.
2424         (WebCore::SQLStatement::setBackend): Deleted.
2425         (WebCore::SQLStatement::hasCallback): Deleted.
2426         (WebCore::SQLStatement::hasErrorCallback): Deleted.
2427         (WebCore::SQLStatement::performCallback): Deleted.
2428         * Modules/webdatabase/SQLStatement.h: Removed.
2429         * Modules/webdatabase/SQLStatementBackend.cpp:
2430         (WebCore::SQLStatementBackend::SQLStatementBackend):
2431         (WebCore::SQLStatementBackend::performCallback):
2432         (WebCore::SQLStatementBackend::frontend): Deleted.
2433         * Modules/webdatabase/SQLStatementBackend.h:
2434         (WebCore::SQLStatementBackend::hasStatementCallback):
2435         (WebCore::SQLStatementBackend::hasStatementErrorCallback):
2436         * Modules/webdatabase/SQLTransaction.cpp:
2437         (WebCore::SQLTransaction::deliverStatementCallback):
2438         (WebCore::SQLTransaction::executeSQL):
2439         * Modules/webdatabase/SQLTransaction.h:
2440         * Modules/webdatabase/SQLTransactionBackend.cpp:
2441         (WebCore::SQLTransactionBackend::currentStatement):
2442         (WebCore::SQLTransactionBackend::executeSQL):
2443         * Modules/webdatabase/SQLTransactionBackend.h:
2444         * WebCore.vcxproj/WebCore.vcxproj:
2445         * WebCore.vcxproj/WebCore.vcxproj.filters:
2446         * WebCore.xcodeproj/project.pbxproj:
2447         * bindings/js/JSSQLTransactionCustom.cpp:
2448
2449 2015-08-06  Chris Dumez  <cdumez@apple.com>
2450
2451         Toggle GPS state based on page visibility to save battery
2452         https://bugs.webkit.org/show_bug.cgi?id=147685
2453
2454         Reviewed by Benjamin Poulain.
2455
2456         Toggle GPS state based on page visibility to save battery. Previously,
2457         if the site you were viewing was watching your position and you
2458         switched tab, the GPS would stay on. This was bad for battery life.
2459
2460         Tests: fast/dom/Geolocation/startUpdatingOnlyWhenPageVisible.html
2461                fast/dom/Geolocation/stopUpdatingForHiddenPage.html
2462
2463         * Modules/geolocation/GeolocationController.cpp:
2464         (WebCore::GeolocationController::addObserver):
2465         (WebCore::GeolocationController::viewStateDidChange):
2466
2467 2015-08-06  Anders Carlsson  <andersca@apple.com>
2468
2469         SQLStatementBackend doesn't need to be refcounted
2470         https://bugs.webkit.org/show_bug.cgi?id=147748
2471
2472         Reviewed by Geoffrey Garen.
2473
2474         There's no shared ownership of SQLStatementBackend so we can just use std::unique_ptr.
2475
2476         * Modules/webdatabase/SQLStatementBackend.cpp:
2477         (WebCore::SQLStatementBackend::create): Deleted.
2478         * Modules/webdatabase/SQLStatementBackend.h:
2479         * Modules/webdatabase/SQLTransactionBackend.cpp:
2480         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
2481         (WebCore::SQLTransactionBackend::executeSQL):
2482         * Modules/webdatabase/SQLTransactionBackend.h:
2483
2484 2015-08-06  Eric Carlson  <eric.carlson@apple.com>
2485
2486         Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
2487         https://bugs.webkit.org/show_bug.cgi?id=147734
2488         rdar://problem/22028179
2489
2490         Reviewed by Andy Estes.
2491
2492         Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
2493
2494         * dom/Document.cpp:
2495         (WebCore::Document::initSecurityContext): Use applyContentDispositionAttachmentSandbox
2496           instead of setting sandbox flags directly.
2497         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Don't special
2498           case MediaDocument.
2499         (WebCore::Document::applyContentDispositionAttachmentSandbox): Apply sandbox flags
2500           according to document type.
2501         * dom/Document.h:
2502
2503 2015-08-06  Anders Carlsson  <andersca@apple.com>
2504
2505         Get rid of DatabaseBackendBase
2506         https://bugs.webkit.org/show_bug.cgi?id=147733
2507
2508         Reviewed by Geoffrey Garen.
2509
2510         * CMakeLists.txt:
2511         * Modules/webdatabase/Database.cpp:
2512         (WebCore::Database::Database):
2513         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
2514         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
2515         * Modules/webdatabase/Database.h:
2516         * Modules/webdatabase/DatabaseBackendBase.cpp: Removed.
2517         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
2518         (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
2519         * Modules/webdatabase/DatabaseBackendBase.h: Removed.
2520         * Modules/webdatabase/DatabaseManager.cpp:
2521         * Modules/webdatabase/DatabaseManager.h:
2522         * Modules/webdatabase/DatabaseTracker.cpp:
2523         * WebCore.vcxproj/WebCore.vcxproj:
2524         * WebCore.vcxproj/WebCore.vcxproj.filters:
2525         * WebCore.xcodeproj/project.pbxproj:
2526
2527 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
2528
2529         Add comment to CSSParserString
2530         https://bugs.webkit.org/show_bug.cgi?id=147724
2531
2532         Reviewed by Dean Jackson.
2533
2534         No new tests because there is no behavior change.
2535
2536         * css/CSSParserValues.h:
2537
2538 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
2539
2540         Font feature settings comparisons are order-dependent and case-dependent
2541         https://bugs.webkit.org/show_bug.cgi?id=147719
2542
2543         Reviewed by Benjamin Poulain.
2544
2545         We should make our settings vector order-independent and case-independent.
2546
2547         Test: css3/font-feature-settings-parsing.html
2548
2549         * css/CSSParser.cpp:
2550         (WebCore::CSSParser::parseFontFeatureTag):
2551         * css/StyleBuilderConverter.h:
2552         (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
2553         * platform/graphics/FontFeatureSettings.cpp:
2554         (WebCore::FontFeature::FontFeature):
2555         (WebCore::FontFeature::operator==):
2556         (WebCore::FontFeatureSettings::FontFeatureSettings):
2557         * platform/graphics/FontFeatureSettings.h:
2558         (WebCore::FontFeature::FontFeature):
2559         (WebCore::FontFeature::operator==):
2560         (WebCore::FontFeature::operator<):
2561         (WebCore::FontFeatureSettings::insert):
2562         (WebCore::FontFeatureSettings::FontFeatureSettings):
2563         (WebCore::FontFeatureSettings::append): Deleted.
2564
2565 2015-08-06  Doug Russell  <d_russell@apple.com>
2566
2567         AX: AXLoadComplete that comes before AX API access won't fire
2568         https://bugs.webkit.org/show_bug.cgi?id=147737
2569
2570         Reviewed by Chris Fleizach.
2571
2572         Treat setEnhancedUserInterfaceAccessibility() as AX API access and if true,
2573         enableAccessibility().
2574
2575         Test: accessibility/mac/loaded-notification.html
2576
2577         * accessibility/AXObjectCache.cpp:
2578         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
2579
2580 2015-08-06  Eric Carlson  <eric.carlson@apple.com>
2581
2582         Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
2583         https://bugs.webkit.org/show_bug.cgi?id=147734
2584         rdar://problem/22028179
2585
2586         Reviewed by Dean Jackson.
2587
2588         Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
2589
2590         * dom/Document.cpp:
2591         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Return
2592           early if the Document is a MediaDocument.
2593
2594 2015-08-06  Matt Rajca  <mrajca@apple.com>
2595
2596         Media Session: remove media elements from the ID <-> element map on destruction
2597         https://bugs.webkit.org/show_bug.cgi?id=147707
2598
2599         Reviewed by Eric Carlson.
2600
2601         * html/HTMLMediaElement.cpp:
2602         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2603
2604 2015-08-06  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2605
2606         [CoordinatedGraphics] Remove unused functions in Coordinated TiledBackingStore
2607         https://bugs.webkit.org/show_bug.cgi?id=147621
2608
2609         Reviewed by Csaba Osztrogon√°c.
2610
2611         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Remove setTileSize() and tileSize().
2612         (WebCore::TiledBackingStore::setTileSize):
2613
2614 2015-08-06  Anders Carlsson  <andersca@apple.com>
2615
2616         Move the last remnants of DatabaseBackendBase to Database
2617         https://bugs.webkit.org/show_bug.cgi?id=147730
2618
2619         Reviewed by Tim Horton.
2620
2621         * Modules/webdatabase/Database.cpp:
2622         (WebCore::Database::Database):
2623         (WebCore::Database::performOpenAndVerify):
2624         * Modules/webdatabase/Database.h:
2625         * Modules/webdatabase/DatabaseBackendBase.cpp:
2626         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
2627         * Modules/webdatabase/DatabaseBackendBase.h:
2628         (WebCore::DatabaseBackendBase::databaseContext): Deleted.
2629         (WebCore::DatabaseBackendBase::setFrontend): Deleted.
2630
2631 2015-08-06  Alex Christensen  <achristensen@webkit.org>
2632
2633         Fix build without ENABLE(VIDEO) after r188030.
2634
2635         * dom/Document.h:
2636         * html/HTMLMediaElement.cpp:
2637         * html/HTMLMediaElement.h:
2638         Move definition of HTMLMediaElementInvalidID to Document.h so it can be used outside of ENABLE(VIDEO) macros.
2639
2640 2015-08-04  Matt Rajca  <mrajca@apple.com>
2641
2642         Media Session: push paused state to the media session focus manager instead of polling
2643         https://bugs.webkit.org/show_bug.cgi?id=147633
2644
2645         Reviewed by Simon Fraser.
2646
2647         * dom/Document.cpp:
2648         (WebCore::Document::updateIsPlayingMedia): If a valid source element ID is passed in, set the 'IsSourcePlaying'
2649          flag accordingly.
2650         * dom/Document.h:
2651         * html/HTMLMediaElement.cpp:
2652         (WebCore::HTMLMediaElement::elementWithID):
2653         (WebCore::HTMLMediaElement::setMuted): Pass along the element ID.
2654         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
2655         (WebCore::HTMLMediaElement::setPlaying): Ditto.
2656         * html/HTMLMediaElement.h:
2657         * page/ChromeClient.h:
2658         * page/MediaProducer.h:
2659         * page/Page.cpp:
2660         (WebCore::Page::updateIsPlayingMedia): Pass along the source element ID.
2661         (WebCore::Page::isMediaElementPaused): Deleted. We now push media playback state changes instead of polling.
2662         * page/Page.h:
2663
2664 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
2665
2666         CharacterFallbackMapKey should be locale-specific
2667         https://bugs.webkit.org/show_bug.cgi?id=147532
2668
2669         Reviewed by Dean Jackson.
2670
2671         This is in preparation for locale-specific font fallback.
2672
2673         No new tests because there is no behavior change.
2674
2675         * platform/graphics/Font.cpp:
2676         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
2677         (WebCore::CharacterFallbackMapKey::operator==):
2678         (WebCore::CharacterFallbackMapKeyHash::hash):
2679         (WebCore::Font::systemFallbackFontForCharacter):
2680
2681 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
2682
2683         Expand CharacterFallbackMapKey to a struct
2684         https://bugs.webkit.org/show_bug.cgi?id=147530
2685
2686         Reviewed by Dean Jackson.
2687
2688         This is in prepraration for making this struct locale-specific.
2689
2690         No new tests because there is no behavior change.
2691
2692         * platform/graphics/Font.cpp:
2693         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
2694         (WebCore::CharacterFallbackMapKey::isHashTableDeletedValue):
2695         (WebCore::CharacterFallbackMapKey::operator==):
2696         (WebCore::CharacterFallbackMapKeyHash::hash):
2697         (WebCore::CharacterFallbackMapKeyHash::equal):
2698         (WebCore::Font::systemFallbackFontForCharacter):
2699
2700 2015-08-05  Chris Dumez  <cdumez@apple.com>
2701
2702         Crash when removing children of a MathMLSelectElement
2703         https://bugs.webkit.org/show_bug.cgi?id=147704
2704         <rdar://problem/21940321>
2705
2706         Reviewed by Ryosuke Niwa.
2707
2708         When MathMLSelectElement::childrenChanged() is called after its
2709         children have been removed, MathMLSelectElement calls
2710         updateSelectedChild() which accesses m_selectedChild. However,
2711         in this case, m_selectedChild is the previously selected child
2712         and it may be destroyed as this point if it was removed. To avoid
2713         this problem, MathMLSelectElement now keep a strong ref to the
2714         currently selected element.
2715
2716         Test: mathml/maction-removeChild.html
2717
2718         * mathml/MathMLSelectElement.h:
2719
2720 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
2721
2722         Migrate FontCascade.cpp to NeverDestroyed
2723         https://bugs.webkit.org/show_bug.cgi?id=147533
2724
2725         Reviewed by Simon Fraser.
2726
2727         No new tests because there is no behavior change.
2728
2729         * platform/graphics/FontCascade.cpp:
2730         (WebCore::fontCascadeCache):
2731
2732 2015-08-05  Tim Horton  <timothy_horton@apple.com>
2733
2734         Try to fix the build
2735
2736         * Modules/webdatabase/Database.cpp:
2737         (WebCore::Database::performOpenAndVerify):
2738         * Modules/webdatabase/Database.h:
2739
2740 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
2741
2742         Delete duplicate forward-declaration
2743         https://bugs.webkit.org/show_bug.cgi?id=147701
2744
2745         Reviewed by Simon Fraser.
2746
2747         No new tests because there is no behavior change.
2748
2749         * platform/spi/cocoa/CoreTextSPI.h:
2750
2751 2015-08-05  Anders Carlsson  <andersca@apple.com>
2752
2753         Move the last DatabaseBackendBase functions over to Database
2754         https://bugs.webkit.org/show_bug.cgi?id=147706
2755
2756         Reviewed by Tim Horton.
2757
2758         * Modules/webdatabase/Database.cpp:
2759         (WebCore::Database::~Database):
2760         (WebCore::Database::setExpectedVersion):
2761         (WebCore::Database::getActualVersionForTransaction):
2762         (WebCore::Database::version):
2763         (WebCore::Database::stringIdentifier):
2764         (WebCore::Database::displayName):
2765         (WebCore::Database::estimatedSize):
2766         (WebCore::Database::fileName):
2767         (WebCore::Database::details):
2768         (WebCore::Database::maximumSize):
2769         (WebCore::Database::databaseDebugName):
2770         * Modules/webdatabase/Database.h:
2771         * Modules/webdatabase/DatabaseBackendBase.cpp:
2772         (WebCore::DatabaseBackendBase::databaseDebugName): Deleted.
2773         (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
2774         (WebCore::DatabaseBackendBase::version): Deleted.
2775         (WebCore::DatabaseBackendBase::securityOrigin): Deleted.
2776         (WebCore::DatabaseBackendBase::stringIdentifier): Deleted.
2777         (WebCore::DatabaseBackendBase::displayName): Deleted.
2778         (WebCore::DatabaseBackendBase::estimatedSize): Deleted.
2779         (WebCore::DatabaseBackendBase::fileName): Deleted.
2780         (WebCore::DatabaseBackendBase::details): Deleted.
2781         (WebCore::DatabaseBackendBase::setExpectedVersion): Deleted.
2782         (WebCore::DatabaseBackendBase::getActualVersionForTransaction): Deleted.
2783         (WebCore::DatabaseBackendBase::maximumSize): Deleted.
2784         * Modules/webdatabase/DatabaseBackendBase.h:
2785         (WebCore::DatabaseBackendBase::opened): Deleted.
2786         (WebCore::DatabaseBackendBase::isNew): Deleted.
2787         (WebCore::DatabaseBackendBase::sqliteDatabase): Deleted.
2788         (WebCore::DatabaseBackendBase::expectedVersion): Deleted.
2789         * Modules/webdatabase/SQLTransactionClient.cpp:
2790         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
2791         (WebCore::SQLTransactionClient::didExceedQuota):
2792         * Modules/webdatabase/SQLTransactionClient.h:
2793
2794 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
2795
2796         Unreviewed, roll out http://trac.webkit.org/changeset/187972.
2797
2798         * Modules/webaudio/AsyncAudioDecoder.cpp:
2799         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
2800         (WebCore::AsyncAudioDecoder::runLoop):
2801         * Modules/webaudio/AsyncAudioDecoder.h:
2802         * Modules/webaudio/AudioContext.h:
2803         * Modules/webaudio/MediaStreamAudioSource.cpp:
2804         (WebCore::MediaStreamAudioSource::addAudioConsumer):
2805         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
2806         (WebCore::MediaStreamAudioSource::setAudioFormat):
2807         (WebCore::MediaStreamAudioSource::consumeAudio):
2808         * Modules/webaudio/MediaStreamAudioSource.h:
2809         * Modules/webdatabase/Database.cpp:
2810         (WebCore::Database::close):
2811         (WebCore::Database::runTransaction):
2812         (WebCore::Database::inProgressTransactionCompleted):
2813         (WebCore::Database::hasPendingTransaction):
2814         * Modules/webdatabase/DatabaseTask.h:
2815         * Modules/webdatabase/DatabaseThread.cpp:
2816         (WebCore::DatabaseThread::start):
2817         (WebCore::DatabaseThread::databaseThread):
2818         * Modules/webdatabase/DatabaseThread.h:
2819         * Modules/webdatabase/DatabaseTracker.cpp:
2820         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
2821         (WebCore::DatabaseTracker::canEstablishDatabase):
2822         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
2823         (WebCore::DatabaseTracker::hasEntryForOrigin):
2824         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2825         (WebCore::DatabaseTracker::closeAllDatabases):
2826         (WebCore::DatabaseTracker::fullPathForDatabase):
2827         (WebCore::DatabaseTracker::origins):
2828         (WebCore::DatabaseTracker::databaseNamesForOrigin):
2829         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
2830         (WebCore::DatabaseTracker::setDatabaseDetails):
2831         (WebCore::DatabaseTracker::doneCreatingDatabase):
2832         (WebCore::DatabaseTracker::addOpenDatabase):
2833         (WebCore::DatabaseTracker::removeOpenDatabase):
2834         (WebCore::DatabaseTracker::getOpenDatabases):
2835         (WebCore::DatabaseTracker::originLockFor):
2836         (WebCore::DatabaseTracker::quotaForOrigin):
2837         (WebCore::DatabaseTracker::setQuota):
2838         (WebCore::DatabaseTracker::deleteOrigin):
2839         (WebCore::DatabaseTracker::deleteDatabase):
2840         (WebCore::DatabaseTracker::deleteDatabaseFile):
2841         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
2842         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
2843         (WebCore::DatabaseTracker::openDatabaseMutex):
2844         (WebCore::DatabaseTracker::setClient):
2845         (WebCore::notificationMutex):
2846         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
2847         (WebCore::DatabaseTracker::notifyDatabasesChanged):
2848         * Modules/webdatabase/DatabaseTracker.h:
2849         * Modules/webdatabase/OriginLock.h:
2850         * Modules/webdatabase/SQLCallbackWrapper.h:
2851         (WebCore::SQLCallbackWrapper::clear):
2852         (WebCore::SQLCallbackWrapper::unwrap):
2853         (WebCore::SQLCallbackWrapper::hasCallback):
2854         * Modules/webdatabase/SQLTransactionBackend.cpp:
2855         (WebCore::SQLTransactionBackend::doCleanup):
2856         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
2857         (WebCore::SQLTransactionBackend::getNextStatement):
2858         * Modules/webdatabase/SQLTransactionBackend.h:
2859         * bindings/js/WorkerScriptController.cpp:
2860         (WebCore::WorkerScriptController::scheduleExecutionTermination):
2861         (WebCore::WorkerScriptController::isExecutionTerminating):
2862         * bindings/js/WorkerScriptController.h:
2863         * dom/default/PlatformMessagePortChannel.cpp:
2864         (WebCore::MessagePortChannel::postMessageToRemote):
2865         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
2866         (WebCore::MessagePortChannel::isConnectedTo):
2867         (WebCore::MessagePortChannel::hasPendingActivity):
2868         (WebCore::MessagePortChannel::locallyEntangledPort):
2869         (WebCore::PlatformMessagePortChannel::setRemotePort):
2870         (WebCore::PlatformMessagePortChannel::entangledChannel):
2871         (WebCore::PlatformMessagePortChannel::closeInternal):
2872         * dom/default/PlatformMessagePortChannel.h:
2873         * loader/icon/IconDatabase.cpp:
2874         (WebCore::IconDatabase::removeAllIcons):
2875         (WebCore::IconDatabase::synchronousIconForPageURL):
2876         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
2877         (WebCore::IconDatabase::synchronousIconURLForPageURL):
2878         (WebCore::IconDatabase::retainIconForPageURL):
2879         (WebCore::IconDatabase::performRetainIconForPageURL):
2880         (WebCore::IconDatabase::releaseIconForPageURL):
2881         (WebCore::IconDatabase::performReleaseIconForPageURL):
2882         (WebCore::IconDatabase::setIconDataForIconURL):
2883         (WebCore::IconDatabase::setIconURLForPageURL):
2884         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
2885         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
2886         (WebCore::IconDatabase::pageURLMappingCount):
2887         (WebCore::IconDatabase::retainedPageURLCount):
2888         (WebCore::IconDatabase::iconRecordCount):
2889         (WebCore::IconDatabase::iconRecordCountWithData):
2890         (WebCore::IconDatabase::wakeSyncThread):
2891         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
2892         (WebCore::IconDatabase::databasePath):
2893         (WebCore::IconDatabase::getOrCreatePageURLRecord):
2894         (WebCore::IconDatabase::iconDatabaseSyncThread):
2895         (WebCore::IconDatabase::performOpenInitialization):
2896         (WebCore::IconDatabase::performURLImport):
2897         (WebCore::IconDatabase::syncThreadMainLoop):
2898         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
2899         (WebCore::IconDatabase::readFromDatabase):
2900         (WebCore::IconDatabase::writeToDatabase):
2901         (WebCore::IconDatabase::pruneUnretainedIcons):
2902         (WebCore::IconDatabase::cleanupSyncThread):
2903         * loader/icon/IconDatabase.h:
2904         * page/scrolling/ScrollingTree.cpp:
2905         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
2906         (WebCore::ScrollingTree::commitNewTreeState):
2907         (WebCore::ScrollingTree::setMainFramePinState):
2908         (WebCore::ScrollingTree::mainFrameScrollPosition):
2909         (WebCore::ScrollingTree::setMainFrameScrollPosition):
2910         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
2911         (WebCore::ScrollingTree::isRubberBandInProgress):
2912         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
2913         (WebCore::ScrollingTree::isScrollSnapInProgress):
2914         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
2915         (WebCore::ScrollingTree::setCanRubberBandState):
2916         (WebCore::ScrollingTree::rubberBandsAtLeft):
2917         (WebCore::ScrollingTree::rubberBandsAtRight):
2918         (WebCore::ScrollingTree::rubberBandsAtBottom):
2919         (WebCore::ScrollingTree::rubberBandsAtTop):
2920         (WebCore::ScrollingTree::setScrollPinningBehavior):
2921         (WebCore::ScrollingTree::scrollPinningBehavior):
2922         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
2923         (WebCore::ScrollingTree::latchedNode):
2924         (WebCore::ScrollingTree::setLatchedNode):
2925         (WebCore::ScrollingTree::clearLatchedNode):
2926         * page/scrolling/ScrollingTree.h:
2927         * platform/MemoryPressureHandler.h:
2928         * platform/audio/HRTFDatabaseLoader.cpp:
2929         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
2930         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
2931         * platform/audio/HRTFDatabaseLoader.h:
2932         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2933         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
2934         (WebCore::MemoryPressureHandler::clearMemoryPressure):
2935         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
2936         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
2937         * platform/graphics/DisplayRefreshMonitor.cpp:
2938         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
2939         * platform/graphics/DisplayRefreshMonitor.h:
2940         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
2941         (WebCore::DisplayRefreshMonitor::mutex):
2942         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2943         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
2944         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
2945         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
2946         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2947         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2948         (WebCore::AVFWrapper::callbackContext):
2949         (WebCore::AVFWrapper::~AVFWrapper):
2950         (WebCore::AVFWrapper::mapLock):
2951         (WebCore::AVFWrapper::addToMap):
2952         (WebCore::AVFWrapper::removeFromMap):
2953         (WebCore::AVFWrapper::periodicTimeObserverCallback):
2954         (WebCore::AVFWrapper::processNotification):
2955         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
2956         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
2957         (WebCore::AVFWrapper::seekCompletedCallback):
2958         (WebCore::AVFWrapper::processCue):
2959         (WebCore::AVFWrapper::legibleOutputCallback):
2960         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
2961         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
2962         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2963         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
2964         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
2965         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2966         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2967         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
2968         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
2969         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
2970         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
2971         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
2972         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
2973         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2974         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
2975         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
2976         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
2977         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
2978         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
2979         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2980         * platform/ios/LegacyTileCache.h:
2981         * platform/ios/LegacyTileCache.mm:
2982         (WebCore::LegacyTileCache::setTilesOpaque):
2983         (WebCore::LegacyTileCache::doLayoutTiles):
2984         (WebCore::LegacyTileCache::setCurrentScale):
2985         (WebCore::LegacyTileCache::commitScaleChange):
2986         (WebCore::LegacyTileCache::layoutTilesNow):
2987         (WebCore::LegacyTileCache::layoutTilesNowForRect):
2988         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
2989         (WebCore::LegacyTileCache::removeAllTiles):
2990         (WebCore::LegacyTileCache::removeForegroundTiles):
2991         (WebCore::LegacyTileCache::setContentReplacementImage):
2992         (WebCore::LegacyTileCache::contentReplacementImage):
2993         (WebCore::LegacyTileCache::tileCreationTimerFired):
2994         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
2995         (WebCore::LegacyTileCache::updateTilingMode):
2996         (WebCore::LegacyTileCache::setTilingMode):
2997         (WebCore::LegacyTileCache::doPendingRepaints):
2998         (WebCore::LegacyTileCache::flushSavedDisplayRects):
2999         (WebCore::LegacyTileCache::prepareToDraw):
3000         * platform/ios/LegacyTileLayerPool.h:
3001         * platform/ios/LegacyTileLayerPool.mm:
3002         (WebCore::LegacyTileLayerPool::addLayer):
3003         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
3004         (WebCore::LegacyTileLayerPool::setCapacity):
3005         (WebCore::LegacyTileLayerPool::prune):
3006         (WebCore::LegacyTileLayerPool::drain):
3007         * platform/network/curl/CurlDownload.cpp:
3008         (WebCore::CurlDownloadManager::add):
3009         (WebCore::CurlDownloadManager::remove):
3010         (WebCore::CurlDownloadManager::getActiveDownloadCount):
3011         (WebCore::CurlDownloadManager::getPendingDownloadCount):
3012         (WebCore::CurlDownloadManager::stopThreadIfIdle):
3013         (WebCore::CurlDownloadManager::updateHandleList):
3014         (WebCore::CurlDownload::~CurlDownload):
3015         (WebCore::CurlDownload::init):
3016         (WebCore::CurlDownload::getTempPath):
3017         (WebCore::CurlDownload::getUrl):
3018         (WebCore::CurlDownload::getResponse):
3019         (WebCore::CurlDownload::closeFile):
3020         (WebCore::CurlDownload::didReceiveHeader):
3021         (WebCore::CurlDownload::didReceiveData):
3022         (WebCore::CurlDownload::didFail):
3023         * platform/network/curl/CurlDownload.h:
3024         * platform/network/curl/ResourceHandleManager.cpp:
3025         (WebCore::cookieJarPath):
3026         (WebCore::sharedResourceMutex):
3027         (WebCore::curl_lock_callback):
3028         (WebCore::curl_unlock_callback):
3029         * platform/network/ios/QuickLook.mm:
3030         (WebCore::QLDirectoryAttributes):
3031         (qlPreviewConverterDictionaryMutex):
3032         (WebCore::addQLPreviewConverterWithFileForURL):
3033         (WebCore::qlPreviewConverterUTIForURL):
3034         (WebCore::removeQLPreviewConverterForURL):
3035         (WebCore::safeQLURLForDocumentURLAndResourceURL):
3036         * platform/sql/SQLiteDatabase.cpp:
3037         (WebCore::SQLiteDatabase::close):
3038         (WebCore::SQLiteDatabase::maximumSize):
3039         (WebCore::SQLiteDatabase::setMaximumSize):
3040         (WebCore::SQLiteDatabase::pageSize):
3041         (WebCore::SQLiteDatabase::freeSpaceSize):
3042         (WebCore::SQLiteDatabase::totalSize):
3043         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
3044         (WebCore::SQLiteDatabase::setAuthorizer):
3045         * platform/sql/SQLiteDatabase.h:
3046         (WebCore::SQLiteDatabase::databaseMutex):
3047         * platform/sql/SQLiteStatement.cpp:
3048         (WebCore::SQLiteStatement::prepare):
3049         (WebCore::SQLiteStatement::step):
3050         * workers/WorkerThread.cpp:
3051         (WebCore::WorkerThread::start):
3052         (WebCore::WorkerThread::workerThread):
3053         (WebCore::WorkerThread::stop):
3054         * workers/WorkerThread.h:
3055
3056 2015-08-05  Anders Carlsson  <andersca@apple.com>
3057
3058         Move more functions from DatabaseBackendBase to Database
3059         https://bugs.webkit.org/show_bug.cgi?id=147705
3060
3061         Reviewed by Tim Horton.
3062
3063         * Modules/webdatabase/Database.cpp:
3064         (WebCore::guidMutex):
3065         (WebCore::guidToVersionMap):
3066         (WebCore::updateGuidVersionMap):
3067         (WebCore::guidToDatabaseMap):
3068         (WebCore::guidForOriginAndName):
3069         (WebCore::Database::Database):
3070         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
3071         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
3072         (WebCore::DoneCreatingDatabaseOnExitCaller::setOpenSucceeded):
3073         (WebCore::Database::performOpenAndVerify):
3074         (WebCore::Database::closeDatabase):
3075         (WebCore::Database::getCachedVersion):
3076         (WebCore::Database::setCachedVersion):
3077         * Modules/webdatabase/Database.h:
3078         * Modules/webdatabase/DatabaseBackendBase.cpp:
3079         (WebCore::DatabaseBackendBase::version):
3080         (WebCore::formatErrorMessage): Deleted.
3081         (WebCore::guidMutex): Deleted.
3082         (WebCore::guidToVersionMap): Deleted.
3083         (WebCore::updateGuidVersionMap): Deleted.
3084         (WebCore::guidToDatabaseMap): Deleted.
3085         (WebCore::guidForOriginAndName): Deleted.
3086         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
3087         (WebCore::DatabaseBackendBase::closeDatabase): Deleted.
3088         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller): Deleted.
3089         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller): Deleted.
3090         (WebCore::DoneCreatingDatabaseOnExitCaller::setOpenSucceeded): Deleted.
3091         (WebCore::DatabaseBackendBase::performOpenAndVerify): Deleted.
3092         (WebCore::DatabaseBackendBase::getCachedVersion): Deleted.
3093         (WebCore::DatabaseBackendBase::setCachedVersion): Deleted.
3094         * Modules/webdatabase/DatabaseBackendBase.h:
3095
3096 2015-08-05  Anders Carlsson  <andersca@apple.com>
3097
3098         Move more functions from DatabaseBackendBase to Database
3099         https://bugs.webkit.org/show_bug.cgi?id=147703
3100
3101         Reviewed by Tim Horton.
3102
3103         * Modules/webdatabase/Database.cpp:
3104         (WebCore::fullyQualifiedInfoTableName):
3105         (WebCore::setTextValueInDatabase):
3106         (WebCore::retrieveTextResultFromDatabase):
3107         (WebCore::Database::getVersionFromDatabase):
3108         (WebCore::Database::setVersionInDatabase):
3109         (WebCore::Database::performGetTableNames):
3110         * Modules/webdatabase/Database.h:
3111         * Modules/webdatabase/DatabaseBackendBase.cpp:
3112         (WebCore::DatabaseBackendBase::performOpenAndVerify):
3113         (WebCore::DatabaseBackendBase::getActualVersionForTransaction):
3114         (WebCore::DatabaseBackendBase::databaseInfoTableName): Deleted.
3115         (WebCore::fullyQualifiedInfoTableName): Deleted.
3116         (WebCore::retrieveTextResultFromDatabase): Deleted.
3117         (WebCore::setTextValueInDatabase): Deleted.
3118         (WebCore::DatabaseBackendBase::getVersionFromDatabase): Deleted.
3119         (WebCore::DatabaseBackendBase::setVersionInDatabase): Deleted.
3120         * Modules/webdatabase/DatabaseBackendBase.h:
3121
3122 2015-08-05  Alex Christensen  <achristensen@webkit.org>
3123
3124         Build DumpRenderTree with CMake.
3125         https://bugs.webkit.org/show_bug.cgi?id=147519
3126
3127         Reviewed by Brent Fulgham.
3128
3129         * CMakeLists.txt:
3130         WebCoreTestSupport is a static library and should not be linked with WebCore.
3131
3132 2015-08-05  Anders Carlsson  <andersca@apple.com>
3133
3134         Move some more DatabaseBackendBase functions to Database
3135         https://bugs.webkit.org/show_bug.cgi?id=147702
3136
3137         Reviewed by Tim Horton.
3138
3139         * Modules/webdatabase/Database.cpp:
3140         (WebCore::formatErrorMessage):
3141         (WebCore::Database::disableAuthorizer):
3142         (WebCore::Database::enableAuthorizer):
3143         (WebCore::Database::setAuthorizerPermissions):
3144         (WebCore::Database::lastActionChangedDatabase):
3145         (WebCore::Database::lastActionWasInsert):
3146         (WebCore::Database::resetDeletes):
3147         (WebCore::Database::hadDeletes):
3148         (WebCore::Database::resetAuthorizer):
3149         (WebCore::Database::incrementalVacuumIfNeeded):
3150         * Modules/webdatabase/Database.h:
3151         * Modules/webdatabase/DatabaseBackendBase.cpp:
3152         (WebCore::DatabaseBackendBase::disableAuthorizer): Deleted.
3153         (WebCore::DatabaseBackendBase::enableAuthorizer): Deleted.
3154         (WebCore::DatabaseBackendBase::setAuthorizerPermissions): Deleted.
3155         (WebCore::DatabaseBackendBase::lastActionChangedDatabase): Deleted.
3156         (WebCore::DatabaseBackendBase::lastActionWasInsert): Deleted.
3157         (WebCore::DatabaseBackendBase::resetDeletes): Deleted.
3158         (WebCore::DatabaseBackendBase::hadDeletes): Deleted.
3159         (WebCore::DatabaseBackendBase::resetAuthorizer): Deleted.
3160         (WebCore::DatabaseBackendBase::incrementalVacuumIfNeeded): Deleted.
3161         * Modules/webdatabase/DatabaseBackendBase.h:
3162
3163 2015-08-05  Zalan Bujtas  <zalan@apple.com>
3164
3165         [Frame flattening] Return early when child RenderView is not available.
3166         https://bugs.webkit.org/show_bug.cgi?id=147697
3167
3168         Reviewed by Simon Fraser.
3169
3170         No change in functionality.
3171
3172         * rendering/RenderFrameBase.cpp:
3173         (WebCore::RenderFrameBase::peformLayoutWithFlattening):
3174
3175 2015-08-05  Anders Carlsson  <andersca@apple.com>
3176
3177         Remove more dead database code
3178         https://bugs.webkit.org/show_bug.cgi?id=147698
3179
3180         Reviewed by Tim Horton.
3181
3182         * Modules/webdatabase/DatabaseBackendBase.cpp:
3183         (WebCore::DatabaseBackendBase::interrupt): Deleted.
3184         (WebCore::DatabaseBackendBase::isInterrupted): Deleted.
3185         * Modules/webdatabase/DatabaseBackendBase.h:
3186         * Modules/webdatabase/SQLStatementBackend.cpp:
3187         (WebCore::SQLStatementBackend::execute):
3188         * Modules/webdatabase/SQLTransaction.cpp:
3189         (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
3190         * Modules/webdatabase/SQLTransactionBackend.cpp:
3191         (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
3192         * platform/sql/SQLiteDatabase.cpp:
3193         (WebCore::SQLiteDatabase::setFullsync):
3194         (WebCore::SQLiteDatabase::SQLiteDatabase): Deleted.
3195         (WebCore::SQLiteDatabase::interrupt): Deleted.
3196         (WebCore::SQLiteDatabase::isInterrupted): Deleted.
3197         * platform/sql/SQLiteDatabase.h:
3198         * platform/sql/SQLiteStatement.cpp:
3199         (WebCore::SQLiteStatement::prepare): Deleted.
3200         (WebCore::SQLiteStatement::step): Deleted.
3201
3202 2015-08-05  Anders Carlsson  <andersca@apple.com>
3203
3204         Fix build.
3205
3206         * platform/cf/CoreMediaSoftLink.cpp:
3207         * platform/cf/CoreMediaSoftLink.h:
3208
3209 2015-08-05  Anders Carlsson  <andersca@apple.com>
3210
3211         Fix build.
3212
3213         * platform/graphics/mac/FontCacheMac.mm:
3214         (WebCore::lookupCTFont):
3215
3216 2015-08-05  Anders Carlsson  <andersca@apple.com>
3217
3218         Change openDatabase to return a Database instead of a DatabaseBackendBase
3219         https://bugs.webkit.org/show_bug.cgi?id=147691
3220
3221         Reviewed by Tim Horton.
3222
3223         * Modules/webdatabase/AbstractDatabaseServer.h:
3224         * Modules/webdatabase/Database.cpp:
3225         (WebCore::Database::create): Deleted.
3226         * Modules/webdatabase/Database.h:
3227         * Modules/webdatabase/DatabaseManager.cpp:
3228         (WebCore::DatabaseManager::openDatabaseBackend):
3229         (WebCore::DatabaseManager::openDatabase):
3230         * Modules/webdatabase/DatabaseManager.h:
3231         * Modules/webdatabase/DatabaseServer.cpp:
3232         (WebCore::DatabaseServer::openDatabase):
3233         (WebCore::DatabaseServer::createDatabase):
3234         * Modules/webdatabase/DatabaseServer.h:
3235
3236 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
3237
3238         [OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike:forString:withRange:inLanguage]
3239         https://bugs.webkit.org/show_bug.cgi?id=147483
3240
3241         Reviewed by Dean Jackson.
3242
3243         [NSFont findFontLike:forString:withRange:inLanguage] doesn't properly handle its last argument. In
3244         addition, we want to be moving away from NSFont in the first place and on to Core Text. This new
3245         CoreText function correctly handles its language argument, which is required for language-specific
3246         font fallback.
3247
3248         This patch rolls r187707 back in which was rolled out in r187802 due to test flakiness. This patch
3249         fixes the flakiness.
3250
3251         No new tests because there is no behavior change.
3252
3253         * platform/graphics/FontCache.cpp:
3254         (WebCore::FontCache::purgeInactiveFontData):
3255         * platform/graphics/FontCache.h:
3256         (WebCore::FontCache::platformPurgeInactiveFontData):
3257         * platform/graphics/mac/FontCacheMac.mm:
3258         (WebCore::fallbackDedupSet):
3259         (WebCore::FontCache::platformPurgeInactiveFontData):
3260         (WebCore::lookupCTFont):
3261         (WebCore::FontCache::systemFallbackForCharacters):
3262         * platform/spi/cocoa/CoreTextSPI.h:
3263         * platform/spi/mac/NSFontSPI.h:
3264
3265 2015-08-05  Anders Carlsson  <andersca@apple.com>
3266
3267         Get rid of DatabaseBackend as another step towards merging Database and DatabaseBackendBase
3268         https://bugs.webkit.org/show_bug.cgi?id=147687
3269
3270         Reviewed by Tim Horton.
3271
3272         * CMakeLists.txt:
3273         * Modules/webdatabase/ChangeVersionWrapper.cpp:
3274         (WebCore::ChangeVersionWrapper::performPreflight):
3275         (WebCore::ChangeVersionWrapper::performPostflight):
3276         * Modules/webdatabase/Database.cpp:
3277         (WebCore::Database::Database):
3278         (WebCore::Database::close):
3279         (WebCore::Database::from): Deleted.
3280         (WebCore::Database::backend): Deleted.
3281         * Modules/webdatabase/Database.h:
3282         * Modules/webdatabase/DatabaseBackend.cpp: Removed.
3283         (WebCore::DatabaseBackend::DatabaseBackend): Deleted.
3284         * Modules/webdatabase/DatabaseBackend.h: Removed.
3285         * Modules/webdatabase/DatabaseManager.cpp:
3286         * Modules/webdatabase/DatabaseServer.cpp:
3287         * Modules/webdatabase/DatabaseTask.cpp:
3288         (WebCore::DatabaseTask::DatabaseTask):
3289         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
3290         (WebCore::DatabaseOpenTask::doPerformTask):
3291         (WebCore::DatabaseOpenTask::debugTaskName):
3292         (WebCore::DatabaseCloseTask::DatabaseCloseTask):
3293         (WebCore::DatabaseCloseTask::doPerformTask):
3294         (WebCore::DatabaseCloseTask::debugTaskName):
3295         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
3296         (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
3297         (WebCore::DatabaseTransactionTask::doPerformTask):
3298         (WebCore::DatabaseTransactionTask::debugTaskName):
3299         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
3300         (WebCore::DatabaseTableNamesTask::doPerformTask):
3301         (WebCore::DatabaseTableNamesTask::debugTaskName):
3302         (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask): Deleted.
3303         (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask): Deleted.
3304         (WebCore::DatabaseBackend::DatabaseOpenTask::debugTaskName): Deleted.
3305         (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask): Deleted.
3306         (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask): Deleted.
3307         (WebCore::DatabaseBackend::DatabaseCloseTask::debugTaskName): Deleted.
3308         (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask): Deleted.
3309         (WebCore::DatabaseBackend::DatabaseTransactionTask::~DatabaseTransactionTask): Deleted.
3310         (WebCore::DatabaseBackend::DatabaseTransactionTask::doPerformTask): Deleted.
3311         (WebCore::DatabaseBackend::DatabaseTransactionTask::debugTaskName): Deleted.
3312         (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask): Deleted.
3313         (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask): Deleted.
3314         (WebCore::DatabaseBackend::DatabaseTableNamesTask::debugTaskName): Deleted.
3315         * Modules/webdatabase/DatabaseTask.h:
3316         (WebCore::DatabaseTask::database):
3317         * Modules/webdatabase/SQLStatementBackend.cpp:
3318         (WebCore::SQLStatementBackend::execute):
3319         * Modules/webdatabase/SQLStatementBackend.h:
3320         * Modules/webdatabase/SQLTransactionBackend.cpp:
3321         (WebCore::SQLTransactionBackend::executeSQL):
3322         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
3323         * WebCore.vcxproj/WebCore.vcxproj:
3324         * WebCore.vcxproj/WebCore.vcxproj.filters:
3325         * WebCore.xcodeproj/project.pbxproj:
3326
3327 2015-08-04  Filip Pizlo  <fpizlo@apple.com>
3328
3329         Rename Mutex to DeprecatedMutex
3330         https://bugs.webkit.org/show_bug.cgi?id=147675
3331
3332         Reviewed by Geoffrey Garen.
3333
3334         No new tests because this is just a renaming.
3335
3336         * Modules/webaudio/AsyncAudioDecoder.cpp:
3337         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
3338         (WebCore::AsyncAudioDecoder::runLoop):
3339         * Modules/webaudio/AsyncAudioDecoder.h:
3340         * Modules/webaudio/AudioContext.h:
3341         * Modules/webaudio/MediaStreamAudioSource.cpp:
3342         (WebCore::MediaStreamAudioSource::addAudioConsumer):
3343         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
3344         (WebCore::MediaStreamAudioSource::setAudioFormat):
3345         (WebCore::MediaStreamAudioSource::consumeAudio):
3346         * Modules/webaudio/MediaStreamAudioSource.h:
3347         * Modules/webdatabase/Database.cpp:
3348         (WebCore::Database::close):
3349         (WebCore::Database::runTransaction):
3350         (WebCore::Database::inProgressTransactionCompleted):
3351         (WebCore::Database::hasPendingTransaction):
3352         * Modules/webdatabase/DatabaseBackend.h:
3353         * Modules/webdatabase/DatabaseBackendBase.cpp:
3354         (WebCore::DatabaseBackendBase::performOpenAndVerify):
3355         (WebCore::DatabaseBackendBase::isInterrupted):
3356         * Modules/webdatabase/DatabaseContext.cpp:
3357         (WebCore::DatabaseContext::databaseThread):
3358         (WebCore::DatabaseContext::setPaused):
3359         * Modules/webdatabase/DatabaseContext.h:
3360         * Modules/webdatabase/DatabaseTask.h:
3361         * Modules/webdatabase/DatabaseThread.cpp:
3362         (WebCore::DatabaseThread::start):
3363         (WebCore::DatabaseThread::setPaused):
3364         (WebCore::DatabaseThread::handlePausedQueue):
3365         (WebCore::DatabaseThread::databaseThread):
3366         * Modules/webdatabase/DatabaseThread.h:
3367         * Modules/webdatabase/DatabaseTracker.cpp:
3368         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
3369         (WebCore::DatabaseTracker::canEstablishDatabase):
3370         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
3371         (WebCore::DatabaseTracker::hasEntryForOrigin):
3372         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
3373         (WebCore::DatabaseTracker::closeAllDatabases):
3374         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
3375         (WebCore::DatabaseTracker::fullPathForDatabase):
3376         (WebCore::DatabaseTracker::origins):
3377         (WebCore::DatabaseTracker::databaseNamesForOrigin):
3378         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
3379         (WebCore::DatabaseTracker::setDatabaseDetails):
3380         (WebCore::DatabaseTracker::doneCreatingDatabase):
3381         (WebCore::DatabaseTracker::addOpenDatabase):
3382         (WebCore::DatabaseTracker::removeOpenDatabase):
3383         (WebCore::DatabaseTracker::getOpenDatabases):
3384         (WebCore::DatabaseTracker::originLockFor):
3385         (WebCore::DatabaseTracker::quotaForOrigin):
3386         (WebCore::DatabaseTracker::setQuota):
3387         (WebCore::DatabaseTracker::deleteOrigin):
3388         (WebCore::DatabaseTracker::deleteDatabase):
3389         (WebCore::DatabaseTracker::deleteDatabaseFile):
3390         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
3391         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
3392         (WebCore::DatabaseTracker::openDatabaseMutex):
3393         (WebCore::DatabaseTracker::setDatabasesPaused):
3394         (WebCore::DatabaseTracker::setClient):
3395         (WebCore::notificationMutex):
3396         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
3397         (WebCore::DatabaseTracker::notifyDatabasesChanged):
3398         * Modules/webdatabase/DatabaseTracker.h:
3399         * Modules/webdatabase/OriginLock.h:
3400         * Modules/webdatabase/SQLCallbackWrapper.h:
3401         (WebCore::SQLCallbackWrapper::clear):
3402         (WebCore::SQLCallbackWrapper::unwrap):
3403         (WebCore::SQLCallbackWrapper::hasCallback):
3404         * Modules/webdatabase/SQLTransactionBackend.cpp:
3405         (WebCore::SQLTransactionBackend::doCleanup):
3406         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
3407         (WebCore::SQLTransactionBackend::getNextStatement):
3408         * Modules/webdatabase/SQLTransactionBackend.h:
3409         * bindings/js/WorkerScriptController.cpp:
3410         (WebCore::WorkerScriptController::scheduleExecutionTermination):
3411         (WebCore::WorkerScriptController::isExecutionTerminating):
3412         * bindings/js/WorkerScriptController.h:
3413         * dom/default/PlatformMessagePortChannel.cpp:
3414         (WebCore::MessagePortChannel::postMessageToRemote):
3415         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
3416         (WebCore::MessagePortChannel::isConnectedTo):
3417         (WebCore::MessagePortChannel::hasPendingActivity):
3418         (WebCore::MessagePortChannel::locallyEntangledPort):
3419         (WebCore::PlatformMessagePortChannel::setRemotePort):
3420         (WebCore::PlatformMessagePortChannel::entangledChannel):
3421         (WebCore::PlatformMessagePortChannel::closeInternal):
3422         * dom/default/PlatformMessagePortChannel.h:
3423         * loader/icon/IconDatabase.cpp:
3424         (WebCore::IconDatabase::removeAllIcons):
3425         (WebCore::IconDatabase::synchronousIconForPageURL):
3426         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
3427         (WebCore::IconDatabase::synchronousIconURLForPageURL):
3428         (WebCore::IconDatabase::retainIconForPageURL):
3429         (WebCore::IconDatabase::performRetainIconForPageURL):
3430         (WebCore::IconDatabase::releaseIconForPageURL):
3431         (WebCore::IconDatabase::performReleaseIconForPageURL):
3432         (WebCore::IconDatabase::setIconDataForIconURL):
3433         (WebCore::IconDatabase::setIconURLForPageURL):
3434         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
3435         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
3436         (WebCore::IconDatabase::pageURLMappingCount):
3437         (WebCore::IconDatabase::retainedPageURLCount):
3438         (WebCore::IconDatabase::iconRecordCount):
3439         (WebCore::IconDatabase::iconRecordCountWithData):
3440         (WebCore::IconDatabase::wakeSyncThread):
3441         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
3442         (WebCore::IconDatabase::databasePath):
3443         (WebCore::IconDatabase::getOrCreatePageURLRecord):
3444         (WebCore::IconDatabase::iconDatabaseSyncThread):
3445         (WebCore::IconDatabase::performOpenInitialization):
3446         (WebCore::IconDatabase::performURLImport):
3447         (WebCore::IconDatabase::syncThreadMainLoop):
3448         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
3449         (WebCore::IconDatabase::readFromDatabase):
3450         (WebCore::IconDatabase::writeToDatabase):
3451         (WebCore::IconDatabase::pruneUnretainedIcons):
3452         (WebCore::IconDatabase::cleanupSyncThread):
3453         * loader/icon/IconDatabase.h:
3454         * page/scrolling/ScrollingTree.cpp:
3455         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
3456         (WebCore::ScrollingTree::commitNewTreeState):
3457         (WebCore::ScrollingTree::setMainFramePinState):
3458         (WebCore::ScrollingTree::mainFrameScrollPosition):
3459         (WebCore::ScrollingTree::setMainFrameScrollPosition):
3460         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
3461         (WebCore::ScrollingTree::isRubberBandInProgress):
3462         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
3463         (WebCore::ScrollingTree::isScrollSnapInProgress):
3464         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
3465         (WebCore::ScrollingTree::setCanRubberBandState):
3466         (WebCore::ScrollingTree::rubberBandsAtLeft):
3467         (WebCore::ScrollingTree::rubberBandsAtRight):
3468         (WebCore::ScrollingTree::rubberBandsAtBottom):
3469         (WebCore::ScrollingTree::rubberBandsAtTop):
3470         (WebCore::ScrollingTree::setScrollPinningBehavior):
3471         (WebCore::ScrollingTree::scrollPinningBehavior):
3472         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
3473         (WebCore::ScrollingTree::latchedNode):
3474         (WebCore::ScrollingTree::setLatchedNode):
3475         (WebCore::ScrollingTree::clearLatchedNode):
3476         * page/scrolling/ScrollingTree.h:
3477         * platform/MemoryPressureHandler.h:
3478         * platform/audio/HRTFDatabaseLoader.cpp:
3479         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
3480         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
3481         * platform/audio/HRTFDatabaseLoader.h:
3482         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3483         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
3484         (WebCore::MemoryPressureHandler::clearMemoryPressure):
3485         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
3486         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
3487         * platform/graphics/DisplayRefreshMonitor.cpp:
3488         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
3489         * platform/graphics/DisplayRefreshMonitor.h:
3490         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
3491         (WebCore::DisplayRefreshMonitor::mutex):
3492         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3493         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
3494         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
3495         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
3496         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3497         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3498         (WebCore::AVFWrapper::callbackContext):
3499         (WebCore::AVFWrapper::~AVFWrapper):
3500         (WebCore::AVFWrapper::mapLock):
3501         (WebCore::AVFWrapper::addToMap):
3502         (WebCore::AVFWrapper::removeFromMap):
3503         (WebCore::AVFWrapper::periodicTimeObserverCallback):
3504         (WebCore::AVFWrapper::processNotification):
3505         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
3506         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
3507         (WebCore::AVFWrapper::seekCompletedCallback):
3508         (WebCore::AVFWrapper::processCue):
3509         (WebCore::AVFWrapper::legibleOutputCallback):
3510         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
3511         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
3512         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
3513         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
3514         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
3515         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
3516         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3517         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
3518         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
3519         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
3520         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
3521         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
3522         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
3523         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3524         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
3525         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
3526         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
3527         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
3528         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
3529         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3530         * platform/ios/LegacyTileCache.h:
3531         * platform/ios/LegacyTileCache.mm:
3532         (WebCore::LegacyTileCache::setTilesOpaque):
3533         (WebCore::LegacyTileCache::doLayoutTiles):
3534         (WebCore::LegacyTileCache::setCurrentScale):
3535         (WebCore::LegacyTileCache::commitScaleChange):
3536         (WebCore::LegacyTileCache::layoutTilesNow):
3537         (WebCore::LegacyTileCache::layoutTilesNowForRect):
3538         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
3539         (WebCore::LegacyTileCache::removeAllTiles):
3540         (WebCore::LegacyTileCache::removeForegroundTiles):
3541         (WebCore::LegacyTileCache::setContentReplacementImage):
3542         (WebCore::LegacyTileCache::contentReplacementImage):
3543         (WebCore::LegacyTileCache::tileCreationTimerFired):
3544         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
3545         (WebCore::LegacyTileCache::updateTilingMode):
3546         (WebCore::LegacyTileCache::setTilingMode):
3547         (WebCore::LegacyTileCache::doPendingRepaints):
3548         (WebCore::LegacyTileCache::flushSavedDisplayRects):
3549         (WebCore::LegacyTileCache::prepareToDraw):
3550         * platform/ios/LegacyTileLayerPool.h:
3551         * platform/ios/LegacyTileLayerPool.mm:
3552         (WebCore::LegacyTileLayerPool::addLayer):
3553         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
3554         (WebCore::LegacyTileLayerPool::setCapacity):
3555         (WebCore::LegacyTileLayerPool::prune):
3556         (WebCore::LegacyTileLayerPool::drain):
3557         * platform/network/curl/CurlDownload.cpp:
3558         (WebCore::CurlDownloadManager::add):
3559         (WebCore::CurlDownloadManager::remove):
3560         (WebCore::CurlDownloadManager::getActiveDownloadCount):
3561         (WebCore::CurlDownloadManager::getPendingDownloadCount):
3562         (WebCore::CurlDownloadManager::stopThreadIfIdle):
3563         (WebCore::CurlDownloadManager::updateHandleList):
3564         (WebCore::CurlDownload::~CurlDownload):
3565         (WebCore::CurlDownload::init):
3566         (WebCore::CurlDownload::getTempPath):
3567         (WebCore::CurlDownload::getUrl):
3568         (WebCore::CurlDownload::getResponse):
3569         (WebCore::CurlDownload::closeFile):
3570         (WebCore::CurlDownload::didReceiveHeader):
3571         (WebCore::CurlDownload::didReceiveData):
3572         (WebCore::CurlDownload::didFail):
3573         * platform/network/curl/CurlDownload.h:
3574         * platform/network/curl/ResourceHandleManager.cpp:
3575         (WebCore::cookieJarPath):
3576         (WebCore::sharedResourceMutex):
3577         (WebCore::curl_lock_callback):
3578         (WebCore::curl_unlock_callback):
3579         * platform/network/ios/QuickLook.mm:
3580         (WebCore::QLDirectoryAttributes):
3581         (qlPreviewConverterDictionaryMutex):
3582         (WebCore::addQLPreviewConverterWithFileForURL):
3583         (WebCore::qlPreviewConverterUTIForURL):
3584         (WebCore::removeQLPreviewConverterForURL):
3585         (WebCore::safeQLURLForDocumentURLAndResourceURL):
3586         * platform/sql/SQLiteDatabase.cpp:
3587         (WebCore::SQLiteDatabase::close):
3588         (WebCore::SQLiteDatabase::interrupt):
3589         (WebCore::SQLiteDatabase::maximumSize):
3590         (WebCore::SQLiteDatabase::setMaximumSize):
3591         (WebCore::SQLiteDatabase::pageSize):
3592         (WebCore::SQLiteDatabase::freeSpaceSize):
3593         (WebCore::SQLiteDatabase::totalSize):
3594         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
3595         (WebCore::SQLiteDatabase::setAuthorizer):
3596         * platform/sql/SQLiteDatabase.h:
3597         (WebCore::SQLiteDatabase::databaseMutex):
3598         * platform/sql/SQLiteStatement.cpp:
3599         (WebCore::SQLiteStatement::prepare):
3600         (WebCore::SQLiteStatement::step):
3601         * workers/WorkerThread.cpp:
3602         (WebCore::WorkerThread::start):
3603         (WebCore::WorkerThread::workerThread):
3604         (WebCore::WorkerThread::stop):
3605         * workers/WorkerThread.h:
3606
3607 2015-08-05  Matthew Daiter  <mdaiter@apple.com>
3608
3609         Adding in MediaPrivateMediaStreamEngine to default compile
3610         https://bugs.webkit.org/show_bug.cgi?id=146790
3611         <rdar://problem/21747289>
3612
3613         Reviewed by Eric Carlson.
3614
3615         * WebCore.xcodeproj/project.pbxproj:
3616         * platform/mediastream/MediaStreamPrivate.h:
3617         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
3618
3619 2015-08-05  Matthew Daiter  <mdaiter@apple.com>
3620
3621         Remove m_synchronizer from MediaPlayerPrivateMediaStream
3622         https://bugs.webkit.org/show_bug.cgi?id=147637
3623
3624         Reviewed by Eric Carlson.
3625
3626         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
3627         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3628         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal): Deleted.
3629
3630 2015-08-05  Wenson Hsieh  <wenson_hsieh@apple.com>
3631
3632         Build fix after 187961
3633
3634         * platform/mac/ThemeMac.mm:
3635         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
3636
3637 2015-08-05  Daniel Bates  <dabates@apple.com>
3638
3639         REGRESSION (r185111): Clicking phone numbers doesn't prompt to call sometimes
3640         https://bugs.webkit.org/show_bug.cgi?id=147678
3641         <rdar://problem/21827815>
3642
3643         Reviewed by Brady Eidson.
3644
3645         Fixes an issue where a non-user-initiated navigation of the main frame to a phone link (tel URL)
3646         may be ignored. The navigation is ignored if the page was reloaded as a result of a web content
3647         process crash, its lifetime exceeded the back-forward cache expiration interval, or a person
3648         quits and opens Safari again, among other scenarios.
3649
3650         * history/HistoryItem.cpp:
3651         (WebCore::HistoryItem::setShouldOpenExternalURLsPolicy): Added.
3652         (WebCore::HistoryItem::shouldOpenExternalURLsPolicy): Added.
3653         * history/HistoryItem.h:
3654         * loader/FrameLoader.cpp:
3655         (WebCore::FrameLoader::loadDifferentDocumentItem): Apply the "should open external URLs" policy
3656         from the history item, if applicable. Also, be more explicit when instantiating a NavigationAction
3657         so as to help make it straightforward to reduce the number of NavigationAction constructors we have
3658         in the future.
3659         * loader/HistoryController.cpp:
3660         (WebCore::HistoryController::saveDocumentState): Save the "should open external URLs" policy to
3661         the history item.
3662         (WebCore::HistoryController::restoreDocumentState): Apply the "should open external URLs" policy
3663         from the history item to the document loader.
3664         (WebCore::HistoryController::initializeItem): Update the "should open external URLs" policy of
3665         the history item to reflect the policy of the document loader associated with the current frame.
3666
3667 2015-08-04  Wenson Hsieh  <wenson_hsieh@apple.com>
3668
3669         Checkboxes and radio buttons should scale when zooming or pinching to zoom
3670         https://bugs.webkit.org/show_bug.cgi?id=147405
3671
3672         Reviewed by Dean Jackson.
3673
3674         Refactors paintButton and paintToggleButton to use a temporary buffer when rendering
3675         if the controls are zoomed. This affects checkboxes, radio buttons, and normal (push)
3676         buttons.
3677
3678         * platform/mac/ThemeMac.h:
3679         * platform/mac/ThemeMac.mm:
3680         (WebCore::paintToggleButton): Refactored to use drawCellOrFocusRingWithViewIntoContext.
3681         (WebCore::paintButton): Refactored to use drawCellOrFocusRingWithViewIntoContext.
3682         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Draws a given button cell
3683             and/or its focus ring into the given context, optionally using an offscreen buffer.
3684             This is a static function in ThemeMac so it can be accessed later on by
3685             RenderThemeMac when painting search fields that scale with zoom.
3686         (WebCore::ThemeMac::paint):
3687         (WebCore::buttonFocusRectOutlineWidth): Deleted. Made this value into a const float.
3688
3689 2015-08-04  Doug Russell  <d_russell@apple.com>
3690
3691         AX: tree item children returned from ranged getter are different from full array of children
3692         https://bugs.webkit.org/show_bug.cgi?id=147660
3693
3694         Reviewed by Chris Fleizach.
3695
3696         Add an isTreeItem() check in ranged element getter so that it matches the logic in 
3697         the getter for the full children array. This prevents returning a row as a child
3698         when only the rows contents should be returned. This prevents navigation issues on
3699         websites without aria outlines.
3700
3701         Test: accessibility/mac/aria-tree-item-children.html
3702
3703         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3704         (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
3705
3706 2015-08-04  Anders Carlsson  <andersca@apple.com>
3707
3708         CTTE the database task code
3709         https://bugs.webkit.org/show_bug.cgi?id=147673
3710
3711         Reviewed by Andreas Kling.
3712
3713         * Modules/webdatabase/Database.cpp:
3714         (WebCore::Database::openAndVerifyVersion):
3715         (WebCore::Database::markAsDeletedAndClose):
3716         (WebCore::Database::tableNames):
3717         * Modules/webdatabase/DatabaseTask.cpp:
3718         (WebCore::DatabaseTask::DatabaseTask):
3719         (WebCore::DatabaseTask::performTask):
3720         (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask):
3721         (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask):
3722         (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask):
3723         (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask):
3724         (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask):
3725         (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask):
3726         (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask):
3727         * Modules/webdatabase/DatabaseTask.h:
3728         (WebCore::DatabaseTask::database):
3729         * Modules/webdatabase/DatabaseThread.cpp:
3730         (WebCore::SameDatabasePredicate::operator()):
3731
3732 2015-08-04  Brent Fulgham  <bfulgham@apple.com>
3733
3734         REGRESSION (r173784): [Mac] Correct latching error for non-scrollable iframe nested inside scrollable div.
3735         https://bugs.webkit.org/show_bug.cgi?id=147668
3736         <rdar://problem/21870332>
3737
3738         Reviewed by Simon Fraser.
3739
3740         Test: platform/mac/fast/scrolling/scroll-div-with-nested-nonscrollable-iframe.html
3741
3742         When we are wrapping up processing of the wheel event for a given frame, if the current latching context
3743         does NOT apply to the current frame (e.g., because it's latched to an enclosing frame) we should not pass
3744         wheel events directly to the latched elements scrollable container. Instead, we should just give the current
3745         frame an opportunity to perform any custom wheel event handling and return, so that the enclosing (latched)
3746         frame can do the rest of its event handling.
3747         
3748         If we don't do this, we incorrectly ask the enclosing frame to process the event, then return claiming that
3749         we handled the event, preventing the enclosing frame from doing its part of the processing.
3750
3751         * page/mac/EventHandlerMac.mm:
3752         (WebCore::EventHandler::platformCompleteWheelEvent):
3753
3754 2015-08-04  Alex Christensen  <achristensen@webkit.org>
3755
3756         Soft link libGLESv2 and libEGL on Windows again
3757         https://bugs.webkit.org/show_bug.cgi?id=147671
3758
3759         Reviewed by Dean Jackson.
3760
3761         * platform/graphics/PlatformDisplay.cpp:
3762         (WebCore::PlatformDisplay::initializeEGLDisplay):
3763         Fail gracefully if libEGL is not found.
3764
3765 2015-08-04  Anders Carlsson  <andersca@apple.com>
3766
3767         Remove another unused database function
3768         https://bugs.webkit.org/show_bug.cgi?id=147670
3769
3770         Reviewed by Daniel Bates.
3771
3772         This was used back when we had WebSQL support in workers, we can safely remove all these functions now.
3773
3774         * Modules/webdatabase/AbstractDatabaseServer.h:
3775         * Modules/webdatabase/DatabaseManager.cpp:
3776         (WebCore::DatabaseManager::interruptAllDatabasesForContext): Deleted.
3777         * Modules/webdatabase/DatabaseManager.h:
3778         * Modules/webdatabase/DatabaseServer.cpp:
3779         (WebCore::DatabaseServer::interruptAllDatabasesForContext): Deleted.
3780         * Modules/webdatabase/DatabaseServer.h:
3781         * Modules/webdatabase/DatabaseTracker.cpp:
3782         (WebCore::DatabaseTracker::interruptAllDatabasesForContext): Deleted.
3783         * Modules/webdatabase/DatabaseTracker.h:
3784
3785 2015-08-04  Anders Carlsson  <andersca@apple.com>
3786
3787         Remove database thread pause code
3788         https://bugs.webkit.org/show_bug.cgi?id=147669
3789
3790         Reviewed by Daniel Bates.
3791
3792         We now grab power assertions while running SQLite transactions, 
3793         and this code isn't used at all with modern WebKit so let's just get rid of it.
3794
3795         * Modules/webdatabase/DatabaseContext.cpp:
3796         (WebCore::DatabaseContext::DatabaseContext): Deleted.
3797         (WebCore::DatabaseContext::databaseThread): Deleted.
3798         (WebCore::DatabaseContext::setPaused): Deleted.
3799         * Modules/webdatabase/DatabaseContext.h:
3800         * Modules/webdatabase/DatabaseTask.cpp:
3801         (WebCore::Database::DatabaseTransactionTask::shouldPerformWhilePaused): Deleted.
3802         * Modules/webdatabase/DatabaseTask.h:
3803         * Modules/webdatabase/DatabaseThread.cpp:
3804         (WebCore::DatabaseThread::DatabaseThread): Deleted.
3805         (WebCore::DatabaseThread::requestTermination): Deleted.
3806         (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask): Deleted.
3807         (WebCore::DatabaseUnpauseTask::shouldPerformWhilePaused): Deleted.
3808         (WebCore::DatabaseUnpauseTask::doPerformTask): Deleted.
3809         (WebCore::DatabaseUnpauseTask::debugTaskName): Deleted.
3810         (WebCore::DatabaseThread::setPaused): Deleted.
3811         (WebCore::DatabaseThread::handlePausedQueue): Deleted.
3812         (WebCore::DatabaseThread::databaseThread): Deleted.
3813         * Modules/webdatabase/DatabaseThread.h:
3814         * Modules/webdatabase/DatabaseTracker.cpp:
3815         (WebCore::DatabaseTracker::setDatabasesPaused): Deleted.
3816         * Modules/webdatabase/DatabaseTracker.h:
3817
3818 2015-08-04  Chris Dumez  <cdumez@apple.com>
3819
3820         Subframes with no current HistoryItem should not prevent page-caching
3821         https://bugs.webkit.org/show_bug.cgi?id=147649
3822         <rdar://problem/21614832>
3823
3824         Reviewed by Andreas Kling.
3825
3826         Subframes with no current HistoryItem should not prevent page-caching.
3827         We need one for the main frame as this is the key in the PageCache.
3828         However, there is no reason to require one for subframes.
3829
3830         This is a common reason for page-caching failures nowadays.
3831
3832         Frames do no have a current HistoryItem until something has been loaded in them.
3833
3834         Test: http/tests/navigation/page-cache-iframe-no-current-historyItem.html
3835
3836         * history/PageCache.cpp:
3837         (WebCore::logCanCacheFrameDecision):
3838         (WebCore::PageCache::canCachePageContainingThisFrame):
3839
3840 2015-08-04  Brent Fulgham  <bfulgham@apple.com>
3841
3842         [Win] Build fix after r187908
3843
3844         * platform/win/WindowsTouch.h: If WINVER is set properly, we
3845         don't need these definitions.
3846
3847 2015-08-04  Anders Carlsson  <andersca@apple.com>
3848
3849         Remove an unused Database function
3850         https://bugs.webkit.org/show_bug.cgi?id=147661
3851
3852         Reviewed by Simon Fraser.
3853
3854         * Modules/webdatabase/Database.cpp:
3855         (WebCore::Database::closeImmediately): Deleted.
3856         * Modules/webdatabase/Database.h:
3857
3858 2015-08-04  Brady Eidson  <beidson@apple.com>
3859
3860         Crash when following a Google search link to Twitter with Limit Adult Content enabled.
3861         <rdar://problem/22123707> and https://bugs.webkit.org/show_bug.cgi?id=147651
3862
3863         Reviewed by Sam Weinig.
3864
3865         No new tests (Doesn't occur in a tested config).
3866
3867         For now, we'll skip the application cache for main resource loads if parental controls are enabled.
3868
3869         * loader/DocumentLoader.cpp:
3870         (WebCore::DocumentLoader::willSendRequest):
3871         (WebCore::DocumentLoader::startLoadingMainResource):
3872
3873 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
3874
3875         Added buffer to AVMediaCaptureSource
3876         https://bugs.webkit.org/show_bug.cgi?id=147454
3877         <rdar://problem/22079502>
3878
3879         Reviewed by Jer Noble.
3880
3881         * platform/mediastream/mac/AVMediaCaptureSource.h:
3882         (WebCore::AVMediaCaptureSource::buffer):
3883         (WebCore::AVMediaCaptureSource::setBuffer):
3884         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3885         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
3886
3887 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
3888
3889         Needless assignment of usingDot
3890         https://bugs.webkit.org/show_bug.cgi?id=147514
3891
3892         Reviewed by Eric Carlson.
3893
3894         * platform/graphics/mac/GraphicsContextMac.mm:
3895         (WebCore::GraphicsContext::drawLineForDocumentMarker): Deleted.
3896
3897 2015-08-04  Chris Dumez  <cdumez@apple.com>
3898
3899         shouldParseTelephoneNumbersInNode() does not need to check for Comment nodes
3900         https://bugs.webkit.org/show_bug.cgi?id=147630
3901
3902         Reviewed by Sam Weinig.
3903
3904         shouldParseTelephoneNumbersInNode() does not need to check for Comment
3905         nodes. We already know the input is a ContainerNode and a Comment is
3906         NOT a ContainerNode. Also, we were already doing a isElementNode()
3907         check before calling disallowTelephoneNumberParsing().
3908
3909         I also updated the function to use a for loop for clarity and dropped
3910         the isElementNode() check as calling hasTagName() / isLink() on a
3911         ContainerNode is as fast all calling it on an Element nowadays.
3912
3913         * html/parser/HTMLTreeBuilder.cpp:
3914         (WebCore::disallowTelephoneNumberParsing):
3915         (WebCore::shouldParseTelephoneNumbersInNode):
3916
3917 2015-08-04  Eric Carlson  <eric.carlson@apple.com>
3918
3919         [Mac] Do not require a video track for AirPlay
3920         https://bugs.webkit.org/show_bug.cgi?id=147647
3921
3922         Reviewed by Jer Noble.
3923
3924         * Modules/mediacontrols/mediaControlsApple.js:
3925         (Controller.prototype.handleReadyStateChange): Call updateWirelessTargetAvailable().
3926         (Controller.prototype.updateHasVideo): Don't call updateWirelessTargetAvailable().
3927         (Controller.prototype.updateWirelessTargetAvailable): Don't require video.
3928
3929         * html/HTMLMediaElement.cpp:
3930         (WebCore::HTMLMediaElement::setReadyState): Call updateMediaState when we reach HAVE_METADATA.
3931         (WebCore::HTMLMediaElement::mediaState): Don't require video, only that the file can play.
3932
3933         * html/MediaElementSession.cpp:
3934         (WebCore::MediaElementSession::showPlaybackTargetPicker): Check readyState instead of hasVideo.
3935
3936 2015-08-04  Anders Carlsson  <andersca@apple.com>
3937
3938         Get rid of ReasonForCallingAllowPlugins since it's not used anywhere
3939         https://bugs.webkit.org/show_bug.cgi?id=147648
3940
3941         Reviewed by Andreas Kling.
3942
3943         * dom/DOMImplementation.cpp:
3944         (WebCore::DOMImplementation::createDocument):
3945         * html/HTMLElement.cpp:
3946         (WebCore::HTMLElement::rendererIsNeeded):
3947         * html/parser/HTMLParserOptions.cpp:
3948         (WebCore::HTMLParserOptions::HTMLParserOptions):
3949         * loader/FrameLoaderTypes.h:
3950         * loader/SubframeLoader.cpp:
3951         (WebCore::SubframeLoader::requestPlugin):
3952         (WebCore::SubframeLoader::createJavaAppletWidget):
3953         (WebCore::SubframeLoader::allowPlugins):
3954         * loader/SubframeLoader.h:
3955         * plugins/DOMMimeType.cpp:
3956         (WebCore::DOMMimeType::enabledPlugin):
3957
3958 2015-08-04  Alex Christensen  <achristensen@webkit.org>
3959
3960         Fix debug CMake build on Windows after r187818.
3961
3962         * PlatformWin.cmake:
3963         Debug *AllInOne.cpp object files in WebCore require /bigobj to compile successfully.
3964
3965 2015-08-04  Alexey Proskuryakov  <ap@apple.com>
3966
3967         Implement NPAPI redirect handling
3968         https://bugs.webkit.org/show_bug.cgi?id=138675
3969         rdar://problem/15779101
3970
3971         Patch by Jeffrey Pfau, updated and tweaked by me.
3972
3973         Reviewed by Anders Carlsson.
3974
3975         Test: http/tests/plugins/get-url-redirect-notify.html
3976
3977         * loader/NetscapePlugInStreamLoader.cpp:
3978         (WebCore::NetscapePlugInStreamLoader::init):
3979         (WebCore::NetscapePlugInStreamLoader::willSendRequest):
3980         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
3981         * loader/NetscapePlugInStreamLoader.h:
3982         * loader/ResourceLoader.cpp:
3983         (WebCore::ResourceLoader::init):
3984         (WebCore::ResourceLoader::isSubresourceLoader):
3985         (WebCore::ResourceLoader::willSendRequestInternal):
3986         (WebCore::ResourceLoader::willSendRequest):
3987         (WebCore::ResourceLoader::didSendData):
3988         * loader/ResourceLoader.h:
3989         * loader/SubresourceLoader.cpp:
3990         (WebCore::SubresourceLoader::isSubresourceLoader):
3991         (WebCore::SubresourceLoader::willSendRequestInternal):
3992         (WebCore::SubresourceLoader::willSendRequest): Deleted.
3993         * loader/SubresourceLoader.h:
3994         * plugins/npapi.h:
3995         * plugins/npfunctions.h:
3996
3997 2015-08-04  Zalan Bujtas  <zalan@apple.com>
3998
3999         RenderTheme::paint() should take RenderBox instead of RenderObject.
4000         https://bugs.webkit.org/show_bug.cgi?id=147638
4001
4002         Reviewed by Andreas Kling.
4003
4004         No change in functionality.
4005
4006         * rendering/RenderTheme.cpp:
4007         (WebCore::RenderTheme::paint):
4008         (WebCore::RenderTheme::updateControlStatesForRenderer): ->RenderBox too.
4009         (WebCore::RenderTheme::isActive): Remove redundant code.
4010         * rendering/RenderTheme.h:
4011
4012 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
4013
4014         Render to GraphicsContext MediaPlayerPrivateMediaStreamAVFObjC
4015         https://bugs.webkit.org/show_bug.cgi?id=147643
4016
4017         Reviewed by Eric Carlson.
4018
4019         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
4020         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paint):
4021
4022 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
4023
4024         Added ability to create images from buffers for MediaStream paint methods
4025         https://bugs.webkit.org/show_bug.cgi?id=147642
4026
4027         Reviewed by Eric Carlson.
4028
4029         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
4030         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
4031         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createImageFromSampleBuffer):
4032
4033 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
4034
4035         Add image variable rendered by paint methods for MediaStream
4036         https://bugs.webkit.org/show_bug.cgi?id=147645
4037
4038         Reviewed by Eric Carlson.
4039
4040         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
4041
4042 2015-08-04  Zalan Bujtas  <zalan@apple.com>
4043
4044         RenderTheme::baselinePosition() should take RenderBox instead of RenderObject.
4045         https://bugs.webkit.org/show_bug.cgi?id=147632
4046
4047         Reviewed by Andreas Kling.
4048
4049         It eliminates some redundant type checking and casting.
4050
4051         No change in functionality.
4052
4053         * platform/efl/RenderThemeEfl.cpp:
4054         (WebCore::RenderThemeEfl::baselinePosition):
4055         * platform/efl/RenderThemeEfl.h:
4056         * rendering/RenderTheme.cpp:
4057         (WebCore::RenderTheme::baselinePosition):
4058         * rendering/RenderTheme.h:
4059         * rendering/RenderThemeGtk.cpp:
4060         (WebCore::RenderThemeGtk::baselinePosition):
4061         * rendering/RenderThemeGtk.h:
4062         * rendering/RenderThemeIOS.h:
4063         * rendering/RenderThemeIOS.mm:
4064         (WebCore::RenderThemeIOS::baselinePosition):
4065         * rendering/RenderThemeSafari.cpp:
4066         (WebCore::RenderThemeSafari::baselinePosition):
4067         * rendering/RenderThemeSafari.h:
4068
4069 2015-08-04  Alex Christensen  <achristensen@webkit.org>
4070
4071         Enable WebGL on Windows CMake build.
4072         https://bugs.webkit.org/show_bug.cgi?id=143311
4073
4074         Reviewed by Csaba Osztrogon√°c.