Unreviewed, rolling out r187812.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-04  Jeremy Jones  <jeremyj@apple.com>
2
3         Implement isPictureInPictureInterrupted.
4         https://bugs.webkit.org/show_bug.cgi?id=147620
5
6         Reviewed by Eric Carlson.
7
8         Implement isPictureInPictureInterrupted so setting the property to true pauses playback.
9         This allows PiP to pause when the device is locked while the app is suspended.
10
11         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
12         (-[WebAVPlayerController init]):
13         (-[WebAVPlayerController isPictureInPictureInterrupted]):
14         (-[WebAVPlayerController setPictureInPictureInterrupted:]):
15
16 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
17
18         Introduce COMPILER(GCC_OR_CLANG) guard and make COMPILER(GCC) true only for GCC
19         https://bugs.webkit.org/show_bug.cgi?id=146833
20
21         Reviewed by Alexey Proskuryakov.
22
23         * platform/graphics/cpu/arm/filters/FELightingNEON.cpp:
24         * platform/graphics/cpu/arm/filters/FELightingNEON.h:
25         * platform/graphics/filters/FELighting.cpp:
26         (WebCore::FELighting::platformApply):
27         * platform/network/efl/NetworkStateNotifierEfl.cpp:
28         (WebCore::NetworkStateNotifier::readSocketCallback):
29
30 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
31
32         [CMake] Add an option to build AllInOne files
33         https://bugs.webkit.org/show_bug.cgi?id=102647
34
35         Reviewed by Alex Christensen.
36
37         * CMakeLists.txt:
38
39 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
40
41         Fix the all-in-one build on Linux after r187659
42         https://bugs.webkit.org/show_bug.cgi?id=147557
43
44         Reviewed by Alex Christensen.
45
46         Removed MediaFeatureNames.cpp from the all-in-one build, because it caused build failures on Linux.
47         Additionally removed css/MediaAllInOne.cpp since it is unused.
48
49         * WebCore.vcxproj/WebCore.vcxproj:
50         * WebCore.vcxproj/WebCore.vcxproj.filters:
51         * css/CSSAllInOne.cpp:
52         * css/MediaAllInOne.cpp: Removed.
53
54 2015-08-03  Benjamin Poulain  <bpoulain@apple.com>
55
56         Returns inconsistent types for el.style.property and el.style.getPropertyValue('color')
57         https://bugs.webkit.org/show_bug.cgi?id=147549
58
59         Reviewed by Andreas Kling.
60
61         Kudos to Greg Whitworth for finding this bug.
62
63         Test: fast/css/getPropertyValue-returns-empty-on-missing-property.html
64
65         * css/CSSStyleDeclaration.idl:
66         Our definition was wrong.
67         Current spec: http://www.w3.org/TR/cssom/#dom-cssstyledeclaration-getpropertyvalue
68         Current draft: https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertyvalue
69         Gecko and EdgeHTML follow the spec.
70
71 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
72
73         Fix crashing Mavericks test
74
75         Unreviewed.
76
77         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
78         (WebCore::FontPlatformData::registeredFont):
79
80 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
81
82         Unreviewed post-review feedback on r187797
83
84         The correct terminology is "registered" instead of "activated."
85
86         No new tests because there is no behavior change.
87
88         * platform/graphics/FontPlatformData.h:
89         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
90         (WebCore::FontPlatformData::registeredFont):
91         (WebCore::FontPlatformData::activatedFont): Deleted.
92
93 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
94
95         Clean up casts between NSFont*s and CTFontRefs
96         https://bugs.webkit.org/show_bug.cgi?id=147618
97
98         Reviewed by Mitz Pettel.
99
100         For toll free bridged types, it makes more sense to do a C-style cast, than jump
101         through hoops for older compilers.
102
103         No new tests because there is no behavior change.
104
105         * platform/graphics/FontPlatformData.h:
106         (WebCore::FontPlatformData::nsFont):
107         (WebCore::FontPlatformData::hash):
108
109 2015-08-03  Commit Queue  <commit-queue@webkit.org>
110
111         Unreviewed, rolling out r187707, r187709, r187724, and
112         r187728.
113         https://bugs.webkit.org/show_bug.cgi?id=147617
114
115         fast/text/international/arabic-justify.html is flakey
116         (Requested by litherum on #webkit).
117
118         Reverted changesets:
119
120         "[OS X] Migrate to CTFontCreateForCharactersWithLanguage from
121         [NSFont findFontLike:forString:withRange:inLanguage]"
122         https://bugs.webkit.org/show_bug.cgi?id=147483
123         http://trac.webkit.org/changeset/187707
124
125         "Fix the build"
126         http://trac.webkit.org/changeset/187709
127
128         "Expand CharacterFallbackMapKey to a struct"
129         https://bugs.webkit.org/show_bug.cgi?id=147530
130         http://trac.webkit.org/changeset/187724
131
132         "CharacterFallbackMapKey should be locale-specific"
133         https://bugs.webkit.org/show_bug.cgi?id=147532
134         http://trac.webkit.org/changeset/187728
135
136 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
137
138         REGRESSION(r184899): Crash when focusing an input element styled with a web font
139         https://bugs.webkit.org/show_bug.cgi?id=147616
140         <rdar://problem/21838271>
141
142         Reviewed by Dean Jackson.
143
144         NSFontManager can't handle web fonts. We used to pass null to NSFontManager in this case,
145         but r184899 changed that.
146
147         Test: fast/text/input-webfont-focus.html
148
149         * platform/graphics/FontPlatformData.h:
150         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
151         (WebCore::FontPlatformData::activatedFont):
152
153 2015-08-03  Brent Fulgham  <bfulgham@apple.com>
154
155         [Win] Unreviewed build fix.
156
157         It turns out that the IFEQ command (at least on Cygwin) does not
158         understand Wildcards for OS types. Consequently, we should not use
159         Windows* in makefiles. Luckily, we only need Windows_NT anymore.
160
161         * DerivedSources.make: Change Windows* -> Windows_NT to correct build.
162
163 2015-08-03  Tim Horton  <timothy_horton@apple.com>
164
165         REGRESSION (r186916): TextIndicators for multiline link previews are unreadable/offset/blank
166         https://bugs.webkit.org/show_bug.cgi?id=147615
167         <rdar://problem/22116575>
168
169         Reviewed by Dean Jackson.
170
171         * page/mac/TextIndicatorWindow.mm:
172         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
173         No need to offset by the difference between the text bounding rect and the selection bounding rect,
174         because the snapshot is now (after r186916) taken of exactly the text bounding rect.
175
176 2015-08-03  Matt Rajca  <mrajca@apple.com>
177
178         Media Session: let UI clients query whether a media element is paused
179         https://bugs.webkit.org/show_bug.cgi?id=147588
180
181         Reviewed by Tim Horton.
182
183         * page/Page.cpp:
184         (WebCore::Page::isMediaElementPaused): Determine if the media element with the given ID is paused.
185         * page/Page.h:
186
187 2015-08-03  Eric Carlson  <eric.carlson@apple.com>
188
189         [Mac] Always require user gesture to begin playing to AppleTV automatically
190         https://bugs.webkit.org/show_bug.cgi?id=147591
191
192         Reviewed by Jer Noble.
193
194         * html/HTMLMediaElement.cpp:
195         (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate 
196           flag until the user has explicitly triggered playback.
197
198 2015-08-03  Dean Jackson  <dino@apple.com>
199
200         Inline video controls overlap each other while playing video in slideover mode
201         https://bugs.webkit.org/show_bug.cgi?id=147535
202         <rdar://problem/22026864>
203
204         Reviewed by Eric Carlson.
205
206         Now that the resizing code is in the shared controller, we need to
207         make sure to hide the timeline scrubber in iOS when the controls
208         get too small. This involved adding the dropped class to the timeline,
209         and rules for hiding to the CSS.
210
211         Meanwhile, when the page scale factor is less than one, we use the CSS zoom property
212         and don't need to factor in the page scale factor when calculating
213         the size.
214
215         * Modules/mediacontrols/mediaControlsApple.js:
216         (Controller.prototype.updateLayoutForDisplayedWidth): Don't use pageScaleFactor.
217         * Modules/mediacontrols/mediaControlsiOS.css:
218         (audio::-webkit-media-controls-panel .dropped): Add display none for this rule.
219
220 2015-08-03  Anders Carlsson  <andersca@apple.com>
221
222         Safari is failing to remove SQLite Databases via Remove All Website Data
223         https://bugs.webkit.org/show_bug.cgi?id=147584
224         rdar://problem/22095006
225
226         Reviewed by Brady Eidson.
227
228         If we end up deleting every single database for an origin, make sure to also delete the origin.
229
230         * Modules/webdatabase/DatabaseTracker.cpp:
231         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
232
233 2015-08-03  Zalan Bujtas  <zalan@apple.com>
234
235         Move "starting from root" frame flattening logging to the correct place.
236         https://bugs.webkit.org/show_bug.cgi?id=147571
237
238         Reviewed by Simon Fraser.
239
240         * page/FrameView.cpp:
241         (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
242         (WebCore::FrameView::layout): Deleted.
243
244 2015-08-03  Commit Queue  <commit-queue@webkit.org>
245
246         Unreviewed, rolling out r187729.
247         https://bugs.webkit.org/show_bug.cgi?id=147575
248
249         10% performance hit (Requested by litherum on #webkit).
250
251         Reverted changeset:
252
253         "[OS X] Font fallback is not language-sensitive"
254         https://bugs.webkit.org/show_bug.cgi?id=147390
255         http://trac.webkit.org/changeset/187729
256
257 2015-08-03  Zalan Bujtas  <zalan@apple.com>
258
259         ChildWidgetState::ChildWidgetIs* naming is redundant.
260         https://bugs.webkit.org/show_bug.cgi?id=147565
261
262         Reviewed by Simon Fraser.
263
264         Since strongly typed enum requires to write out 'ChildWidgetState::ChildWidgetIsDestroyed',
265         the enumerator list names can be shortened.
266
267         No change in behaviour.
268
269         * rendering/RenderFrameBase.cpp:
270         (WebCore::RenderFrameBase::peformLayoutWithFlattening):
271         * rendering/RenderWidget.cpp:
272         (WebCore::RenderWidget::updateWidgetPosition):
273         * rendering/RenderWidget.h:
274
275 2015-08-03  Zalan Bujtas  <zalan@apple.com>
276
277         Pass ControlStates& to RenderTheme methods instead of ControlStates*
278         https://bugs.webkit.org/show_bug.cgi?id=147521
279
280         Reviewed by Andreas Kling.
281
282         No change in functionality.
283
284         * platform/Theme.h:
285         (WebCore::Theme::selectionColor):
286         (WebCore::Theme::paint):
287         (WebCore::Theme::inflateControlPaintRect):
288         * platform/mac/ThemeMac.h:
289         * platform/mac/ThemeMac.mm:
290         (WebCore::updateStates):
291         (WebCore::convertControlStatesToThemeDrawState):
292         (WebCore::configureToggleButton):
293         (WebCore::sharedRadioCell):
294         (WebCore::sharedCheckboxCell):
295         (WebCore::paintToggleButton):
296         (WebCore::setUpButtonCell):
297         (WebCore::button):
298         (WebCore::paintButton):
299         (WebCore::paintStepper):
300         (WebCore::ThemeMac::ensuredView):
301         (WebCore::ThemeMac::inflateControlPaintRect):
302         (WebCore::ThemeMac::paint):
303         * rendering/RenderBox.cpp:
304         (WebCore::RenderBox::paintBoxDecorations):
305         * rendering/RenderTheme.cpp:
306         (WebCore::RenderTheme::paint):
307         (WebCore::RenderTheme::adjustRepaintRect):
308         (WebCore::RenderTheme::updateControlStatesForRenderer):
309         * rendering/RenderTheme.h:
310         * rendering/RenderThemeMac.mm:
311         (WebCore::RenderThemeMac::documentViewFor):
312
313 2015-08-03  Brady Eidson  <beidson@apple.com>
314
315         Crash when signing into twitter calling WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&).
316         <rdar://problem/22098457> and https://bugs.webkit.org/show_bug.cgi?id=147560
317
318         Reviewed by Alexey Proskuryakov.
319
320         * loader/DocumentLoader.cpp:
321         (WebCore::DocumentLoader::willSendRequest): Only grab identifierForLoadWithoutResourceLoader() if there's no ResourceLoader.
322
323 2015-08-03  Zalan Bujtas  <zalan@apple.com>
324
325         themePainted in RenderBox::paintBoxDecorations() is confusing.
326         https://bugs.webkit.org/show_bug.cgi?id=147492
327
328         Reviewed by Andreas Kling.
329
330         What themePainted is supposed to indicate is whether the theme requires additional border and background painting.
331         Rename it to borderOrBackgroundPaintingIsNeeded.
332
333         No change in behaviour.
334
335         * rendering/RenderBox.cpp:
336         (WebCore::RenderBox::paintBoxDecorations):
337
338 2015-08-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
339
340         [EFL] http/tests/media/media-stream/disconnected-frame-already.html is crashing after r185903
341         https://bugs.webkit.org/show_bug.cgi?id=146834
342
343         Reviewed by Eric Carlson.
344
345         r185903 went to far in removing some tests, in particular whether the current process is related to a frame.
346         Readded that check.
347         Refactored the code to remove the need for NavigatorUserMedia class.
348
349         Covered by existing tests.
350
351         * CMakeLists.txt: Removed NavigatorUserMedia.cpp.
352         * Modules/mediastream/NavigatorUserMedia.cpp: Removed.
353         * Modules/mediastream/NavigatorUserMedia.h: Removed.
354         * WebCore.xcodeproj/project.pbxproj: Ditto.
355         * bindings/js/JSNavigatorCustom.cpp:
356         (WebCore::JSNavigator::webkitGetUserMedia): Inlined NavigatorUserMeia::webkitGetUserMedia.
357
358 2015-08-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
359
360         JSXMLHttpRequest::visitAdditionalChildren does not need to explicitly mark m_response
361         https://bugs.webkit.org/show_bug.cgi?id=147488
362
363         Reviewed by Andreas Kling.
364
365         Covered by existing tests.
366
367         * bindings/js/JSXMLHttpRequestCustom.cpp:
368         (WebCore::JSXMLHttpRequest::visitAdditionalChildren): Removed m_response marking.
369
370 2015-08-01  Chris Fleizach  <cfleizach@apple.com>
371
372         AX: On some complex sites, iOS instantly crashes once VoiceOver is turned on
373         https://bugs.webkit.org/show_bug.cgi?id=147529
374
375         Reviewed by Dan Bernstein.
376
377         Sometimes after focusing on a node, it seems like the entire document is destroyed.
378         Accessibility the axObjectCache returns nullptr and we crash.
379
380         Despite my best efforts, I couldn't make a layout test that reproduced this. It's possible
381         the entire document needs to be destroyed and replaced with something.
382
383         * accessibility/AccessibilityRenderObject.cpp:
384         (WebCore::AccessibilityRenderObject::setFocused):
385
386 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
387
388         [OS X] Font fallback is not language-sensitive
389         https://bugs.webkit.org/show_bug.cgi?id=147390
390
391         Reviewed by Dean Jackson.
392
393         We need to make our font fallback code sensitive to locale.
394
395         Test: fast/text/fallback-language-han.html
396
397         * platform/graphics/mac/FontCacheMac.mm:
398         (WebCore::lookupCTFont):
399         (WebCore::FontCache::systemFallbackForCharacters):
400
401 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
402
403         CharacterFallbackMapKey should be locale-specific
404         https://bugs.webkit.org/show_bug.cgi?id=147532
405
406         Reviewed by Dean Jackson.
407
408         This is in preparation for locale-specific font fallback.
409
410         No new tests because there is no behavior change.
411
412         * platform/graphics/Font.cpp:
413         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
414         (WebCore::CharacterFallbackMapKey::operator==):
415         (WebCore::CharacterFallbackMapKeyHash::hash):
416         (WebCore::Font::systemFallbackFontForCharacter):
417
418 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
419
420         Expand CharacterFallbackMapKey to a struct
421         https://bugs.webkit.org/show_bug.cgi?id=147530
422
423         Reviewed by Dean Jackson.
424
425         This is in prepraration for making this struct locale-specific.
426
427         No new tests because there is no behavior change.
428
429         * platform/graphics/Font.cpp:
430         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
431         (WebCore::CharacterFallbackMapKey::isHashTableDeletedValue):
432         (WebCore::CharacterFallbackMapKey::operator==):
433         (WebCore::CharacterFallbackMapKeyHash::hash):
434         (WebCore::CharacterFallbackMapKeyHash::equal):
435         (WebCore::Font::systemFallbackFontForCharacter):
436
437 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
438
439         Fix the build after r187721
440
441         Unreviewed.
442
443         * bindings/js/JSDOMBinding.h:
444         (WebCore::createWrapper):
445
446 2015-08-01  Alex Christensen  <achristensen@webkit.org>
447
448         Fix compile errors with VS2015
449         https://bugs.webkit.org/show_bug.cgi?id=147526
450
451         Reviewed by Myles Maxfield.
452
453         * bindings/js/JSDOMBinding.h:
454         (WebCore::createWrapper):
455         Explicitly call the Ref constructor to avoid unresolved symbols with VS2015.
456         Otherwise, VS2015 tries to use CSSPrimitiveValue::operator<Ref<CSSPrimitiveValue> > which doesn't exist.
457
458 2015-07-27  Matt Rajca  <mrajca@apple.com>
459
460         Media Session: inform the UI process when the focused Content media element changes
461         https://bugs.webkit.org/show_bug.cgi?id=147323
462
463         Reviewed by Tim Horton.
464
465         * html/HTMLMediaElement.cpp:
466         (WebCore::HTMLMediaElement::playInternal): Eventually tell the UI process that the focused Content media element changed.
467         * page/ChromeClient.h:
468
469 2015-07-27  Matt Rajca  <mrajca@apple.com>
470
471         Media Session: give media elements unique IDs
472         https://bugs.webkit.org/show_bug.cgi?id=147322
473
474         Reviewed by Eric Carlson.
475
476         * html/HTMLMediaElement.cpp:
477         (WebCore::elementIDsToElements): Create a global map of element IDs to elements.
478         (WebCore::HTMLMediaElement::elementWithID): Retrieve the element with the given ID.
479         (WebCore::HTMLMediaElement::HTMLMediaElement): Give the element a unique ID.
480         (WebCore::HTMLMediaElement::playInternal): Removed whitespace.
481         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
482         * html/HTMLMediaElement.h:
483         (WebCore::HTMLMediaElement::elementID):
484
485 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
486
487         Fix the build
488
489         Unreviewed.
490
491         * platform/graphics/mac/FontCacheMac.mm:
492         (WebCore::lookupCTFont):
493
494 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
495
496         [OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike:forString:withRange:inLanguage]
497         https://bugs.webkit.org/show_bug.cgi?id=147483
498
499         Reviewed by Dean Jackson.
500
501         [NSFont findFontLike:forString:withRange:inLanguage] doesn't properly handle its last argument. In
502         addition, we want to be moving away from NSFont in the first place and on to Core Text. This new
503         CoreText function correctly handles its language argument, which is required for language-specific
504         font fallback.
505
506         No new tests because there is no behavior change.
507
508         * platform/graphics/FontCache.cpp:
509         (WebCore::FontCache::purgeInactiveFontData):
510         * platform/graphics/FontCache.h:
511         (WebCore::FontCache::platformPurgeInactiveFontData):
512         * platform/graphics/mac/FontCacheMac.mm:
513         (WebCore::fallbackDedupSet):
514         (WebCore::FontCache::platformPurgeInactiveFontData):
515         (WebCore::lookupCTFont):
516         (WebCore::FontCache::systemFallbackForCharacters):
517         * platform/spi/cocoa/CoreTextSPI.h:
518         * platform/spi/mac/NSFontSPI.h:
519
520 2015-07-31  Chris Dumez  <cdumez@apple.com>
521
522         Drop dummy Timer callbacks
523         https://bugs.webkit.org/show_bug.cgi?id=147516
524
525         Reviewed by Alexey Proskuryakov.
526
527         Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
528         do nothing else beside calling a particular method. In such case, we
529         can use the called method as Timer callback instead.
530
531         * css/FontLoader.cpp:
532         (WebCore::FontLoader::FontLoader):
533         * css/FontLoader.h:
534         * dom/Document.cpp:
535         (WebCore::Document::Document):
536         (WebCore::Document::styleRecalcTimerFired): Deleted.
537         (WebCore::Document::domCookieCacheExpiryTimerFired): Deleted.
538         * dom/Document.h:
539         * html/MediaController.cpp:
540         (MediaController::MediaController):
541         (MediaController::timeupdateTimerFired): Deleted.
542         * html/MediaController.h:
543         * loader/cache/CachedResource.cpp:
544         (WebCore::CachedResource::CachedResource):
545         * loader/cache/CachedResourceLoader.cpp:
546         (WebCore::CachedResourceLoader::CachedResourceLoader):
547         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): Deleted.
548         * loader/cache/CachedResourceLoader.h:
549         * loader/cache/MemoryCache.cpp:
550         (WebCore::MemoryCache::MemoryCache):
551         (WebCore::MemoryCache::pruneTimerFired): Deleted.
552         * loader/cache/MemoryCache.h:
553         * page/EventSource.cpp:
554         (WebCore::EventSource::EventSource):
555         (WebCore::EventSource::connectTimerFired): Deleted.
556         * page/EventSource.h:
557         * page/FrameView.cpp:
558         (WebCore::FrameView::FrameView):
559         (WebCore::FrameView::delayedScrollEventTimerFired): Deleted.
560         (WebCore::FrameView::postLayoutTimerFired): Deleted.
561         * page/FrameView.h:
562         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
563         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
564         (WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
565         (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired): Deleted.
566         * page/scrolling/mac/ScrollingCoordinatorMac.h:
567         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
568         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
569         (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired): Deleted.
570         * platform/graphics/FontCache.cpp:
571         (WebCore::FontCache::FontCache):
572         (WebCore::FontCache::purgeTimerFired): Deleted.
573         * platform/graphics/FontCache.h:
574         * platform/graphics/ShadowBlur.cpp:
575         (WebCore::ScratchBuffer::ScratchBuffer):
576         (WebCore::ScratchBuffer::timerFired): Deleted.
577         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
578         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
579         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
580         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Deleted.
581
582 2015-07-31  Matthew Daiter  <mdaiter@apple.com>
583
584         Removed pointSize from _addMarkersToList
585         https://bugs.webkit.org/show_bug.cgi?id=147515
586
587         Reviewed by Eric Carlson.
588
589         * editing/cocoa/HTMLConverter.mm:
590         (HTMLConverter::_addMarkersToList): Deleted.
591
592 2015-07-31  Alex Christensen  <achristensen@webkit.org>
593
594         Prepare for VS2015
595         https://bugs.webkit.org/show_bug.cgi?id=146579
596
597         Reviewed by Jon Honeycutt.
598
599         * WebCore.vcxproj/build-generated-files.pl:
600         Find a correct preprocessor when using VS2015.
601
602 2015-07-31  Eric Carlson  <eric.carlson@apple.com>
603
604         [iOS] use a media-specific user gesture check
605         https://bugs.webkit.org/show_bug.cgi?id=147509
606
607         Reviewed by Tim Horton.
608
609         Change an enum name added in r187688.
610
611         * dom/UserGestureIndicator.cpp:
612         (WebCore::isDefinite): DefinitelyProcessingMediaUserGesture -> DefinitelyProcessingPotentialUserGesture
613         (WebCore::UserGestureIndicator::processingUserGestureForMedia): Ditto.
614         * dom/UserGestureIndicator.h: Ditto.
615
616 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
617
618         [Cocoa] Latin quotes are used with the system font on Chinese devices
619         https://bugs.webkit.org/show_bug.cgi?id=147504
620
621         Reviewed by Dean Jackson.
622
623         The system font has some fancy logic regarding character selection which requires
624         using Core Text for glyph selection.
625
626         No new tests because tests can't change the system language of the device.
627
628         * platform/graphics/mac/GlyphPageMac.cpp:
629         (WebCore::shouldUseCoreText):
630
631 2015-07-31  Chris Dumez  <cdumez@apple.com>
632
633         Coalesce authentication credential requests
634         https://bugs.webkit.org/show_bug.cgi?id=128006
635         <rdar://problem/16839069>
636
637         Reviewed by Alexey Proskuryakov.
638
639         Export symbol for ProtectionSpace::compare() so it can be called from
640         WebKit2.
641
642         * platform/network/ProtectionSpaceBase.h:
643
644 2015-07-31  Eric Carlson  <eric.carlson@apple.com>
645
646         [iOS] use a media-specific user gesture check
647         https://bugs.webkit.org/show_bug.cgi?id=147509
648
649         Reviewed by Jer Noble.
650
651         * bindings/js/ScriptController.cpp:
652         (WebCore::ScriptController::processingUserGestureForMedia): New.
653         * bindings/js/ScriptController.h:
654
655         * dom/UserGestureIndicator.cpp:
656         (WebCore::isDefinite): Allow DefinitelyProcessingMediaUserGesture.
657         (WebCore::UserGestureIndicator::processingUserGestureForMedia): New.
658         * dom/UserGestureIndicator.h:
659
660         * html/HTMLMediaElement.cpp:
661         (WebCore::HTMLMediaElement::load): Use ScriptController::processingUserGestureForMedia instead of 
662           ScriptController::processingUserGesture
663         (WebCore::HTMLMediaElement::play): Ditto.
664
665 2015-07-31  Andreas Kling  <akling@apple.com>
666
667         Crashes under HTMLMediaElement::updateActiveTextTrackCues() when destroying CachedPage.
668         <https://webkit.org/b/147506>
669         <rdar://problem/21939014>
670
671         Reviewed by Chris Dumez.
672
673         Don't mess with the media element's text tracks below its ActiveDOMObject::stop()
674         implementation, since that may cause DOM mutations.
675
676         I don't have a repro or a test for this, but plenty of crash logs to indicate that
677         we're getting ourselves into trouble by modifying the DOM during CachedPage teardown.
678
679         * html/HTMLMediaElement.cpp:
680         (WebCore::HTMLMediaElement::configureTextTrackDisplay):
681
682 2015-07-31  Tim Horton  <timothy_horton@apple.com>
683
684         [iOS] DOMNode preview snapshot rects are wrong for user-select: none links
685         https://bugs.webkit.org/show_bug.cgi?id=147513
686         <rdar://problem/22083354>
687
688         Reviewed by Simon Fraser.
689
690         * bindings/objc/DOM.mm:
691         (-[DOMNode getPreviewSnapshotImage:andRects:]):
692         Use the same code as WebKit2 to compute the fallback rect (if TextIndicator fails),
693         asking the RenderObject (or RenderImage) for its bounding box instead of using the
694         (often wrong) Range bounding rect.
695
696         Make sure to use the fallback rect *any* time TextIndicator fails (before
697         we would return no rects at all if TextIndicator::createWithRange returned null,
698         and the fallback rect if it returned with an empty image).
699
700         Inverse-page-scale the margin, to match the appearance in WebKit2.
701
702 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
703
704         [SVG -> OTF Converter] Crash when converting Arabic fonts
705         https://bugs.webkit.org/show_bug.cgi?id=147510
706
707         Reviewed by Anders Carlsson.
708
709         SVGToOTFFontConverter::compareCodepointsLexicographically() wasn't transitive.
710
711         Test: fast/text/arabic-duplicate-glyph-font.html
712
713         * svg/SVGToOTFFontConversion.cpp:
714         (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically):
715
716 2015-07-31  Jeremy Jones  <jeremyj@apple.com>
717
718         Rename AVPlayerLayerView to _AVPlayerLayerView.
719         https://bugs.webkit.org/show_bug.cgi?id=147399
720
721         Reviewed by Eric Carlson.
722
723         Change class name AVPlayerLayerView to match change in AVKit SPI. 
724         This prevents conflicts with 3rd party apps.
725
726         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
727         (WebAVPlayerLayerView_dealloc):
728         (getWebAVPlayerLayerViewClass):
729         * platform/spi/cocoa/AVKitSPI.h:
730
731 2015-07-31  Chris Dumez  <cdumez@apple.com>
732
733         ImageBufferDataCG should not add IOSurfaces to the pool
734         https://bugs.webkit.org/show_bug.cgi?id=147494
735
736         Reviewed by Tim Horton.
737
738         ImageBufferDataCG should not add IOSurfaces to the pool as it is not
739         safe. IOSurfaceIsInUse() does not return accurate result for those
740         surfaces.
741
742         This is a partial revert of r181301.
743
744         * platform/graphics/cg/ImageBufferDataCG.cpp:
745         (WebCore::ImageBufferData::~ImageBufferData): Deleted.
746         * platform/graphics/cg/ImageBufferDataCG.h:
747
748 2015-07-31  Jer Noble  <jer.noble@apple.com>
749
750          CRASH at WebCore::TaskDispatcher<WebCore::ScriptExecutionContext>::postTask + 38
751          https://bugs.webkit.org/show_bug.cgi?id=147485
752
753          Rubber-stamped by Joseph Pecoraro.
754
755          Follow-up test crash fix: call superclass's contextDestroyed() which allows the
756          m_scriptExecutionContext variable to be cleared.
757
758          * html/HTMLMediaElement.cpp:
759          (WebCore::HTMLMediaElement::contextDestroyed):
760
761 2015-07-31  Joseph Pecoraro  <pecoraro@apple.com>
762
763         Only generate "themeWin*" UserAgentStyleSheet constants for Windows builds
764         https://bugs.webkit.org/show_bug.cgi?id=147378
765
766         Reviewed by Alex Christensen.
767
768         * DerivedSources.make:
769         Only include windows user agent style sheets for Windows OSes.
770
771 2015-07-31  Alex Christensen  <achristensen@webkit.org>
772
773         Prepare for debug CMake builds on Windows.
774         https://bugs.webkit.org/show_bug.cgi?id=147484
775
776         Reviewed by Tim Horton.
777
778         In order to get debug builds to link on Windows with CMake, we will need to use AllInOnes.
779         This patch includes more files in the AllInOnes and removes some duplicate code.
780
781         * WebCore.vcxproj/WebCore.vcxproj:
782         * bindings/js/JSBindingsAllInOne.cpp:
783         * css/CSSAllInOne.cpp:
784         Many files were added to the AllInOne files.  They should not be included in the Visual Studio solutions.
785         * css/CSSCalculationValue.cpp:
786         (WebCore::CSSCalcValue::create):
787         Use CSSParserString::equalIgnoringCase to avoid ambiguous calls to overloaded functions.
788         * css/StyleResolver.cpp:
789         (WebCore::StyleResolver::pseudoStyleRulesForElement):
790         (WebCore::shouldApplyPropertyInParseOrder):
791         (WebCore::convertToFloatLength): Deleted.
792         * css/TransformFunctions.cpp:
793         (WebCore::transformOperationType):
794         (WebCore::convertToFloatLength):
795         * css/TransformFunctions.h:
796         Removed duplicate convertToFloatLength function.
797         * html/HTMLElementsAllInOne.cpp:
798         * rendering/FlowThreadController.cpp:
799         (WebCore::FlowThreadController::updateNamedFlowsLayerListsIfNeeded):
800         (WebCore::compareZIndexFlowThreadController): Renamed from compareZIndex to prevent naming conflicts.
801         (WebCore::FlowThreadController::collectFixedPositionedLayers):
802         (WebCore::compareZIndex): Deleted.
803         * rendering/RenderLayer.cpp:
804         (WebCore::RenderLayer::shouldRepaintAfterLayout):
805         (WebCore::compositedWithOwnBackingStore):
806         * rendering/RenderLayer.h:
807         * rendering/RenderLayerBacking.cpp:
808         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
809         (WebCore::descendantLayerPaintsIntoAncestor):
810         (WebCore::RenderLayerBacking::paintIntoLayer):
811         (WebCore::RenderLayerBacking::paintContents):
812         (WebCore::compositedWithOwnBackingStore): Deleted.
813         Removed duplicate compositedWithOwnBackingStore.
814         (WebCore::paintScrollbar): Deleted duplicate function.
815         * rendering/RenderLayerCompositor.cpp:
816         (WebCore::RenderLayerCompositor::requiresScrollLayer):
817         (WebCore::paintScrollbar):
818         * rendering/RenderLayerCompositor.h:
819         * rendering/RenderingAllInOne.cpp:
820
821 2015-07-31  Jer Noble  <jer.noble@apple.com>
822
823         CRASH at WebCore::TaskDispatcher<WebCore::ScriptExecutionContext>::postTask + 38
824         https://bugs.webkit.org/show_bug.cgi?id=147485
825
826         Reviewed by Eric Carlson.
827
828         CrashLogs indicate a use-after-free of the ScriptExecutionContext (i.e., Document) used by
829         the GenericTaskQueue objects owned by HTMLMediaElement. When the ScriptExecutionContext
830         notifies its ActiveDOMObjects that it is about to be destroyed, close() the
831         GenericTaskQueues so that they can no longer accept new tasks.
832
833         Previously, enqueueing a task on a closed GenericTaskQueue ASSERTed in debug builds, but
834         silently succeeded in release builds. Calling enqueueTask() on a  closed GenericTaskQueue is
835         now a no-op.
836
837         * html/HTMLMediaElement.cpp:
838         (WebCore::HTMLMediaElement::contextDestroyed):
839         * html/HTMLMediaElement.h:
840         * platform/GenericTaskQueue.h:
841         (WebCore::GenericTaskQueue::enqueueTask):
842
843 2015-07-31  Zan Dobersek  <zdobersek@igalia.com>
844
845         [GTK] Have DataObjectGtk::unknownTypes() return a reference to the HashMap object
846         https://bugs.webkit.org/show_bug.cgi?id=147401
847
848         Reviewed by Carlos Garcia Campos.
849
850         Don't copy the DataObjectGtk::m_unknownTypes HashMap on every retrieval through
851         DataObjectGtk::unknownTypes(). The range-based for-loops that iterate over the
852         map in PasteboardGtk.cpp and PasteboardHelper.cpp are also cleaned up.
853
854         * platform/gtk/DataObjectGtk.cpp:
855         (WebCore::DataObjectGtk::unknownTypes):
856         * platform/gtk/DataObjectGtk.h:
857         * platform/gtk/PasteboardGtk.cpp:
858         (WebCore::Pasteboard::writePasteboard):
859         (WebCore::Pasteboard::types):
860         * platform/gtk/PasteboardHelper.cpp:
861         (WebCore::PasteboardHelper::fillSelectionData):
862
863 2015-07-30  Zalan Bujtas  <zalan@apple.com>
864
865         RenderTheme::paintBorderOnly and paintDecorations should take RenderBox instead of RenderObject.
866         https://bugs.webkit.org/show_bug.cgi?id=147470
867
868         Reviewed by Simon Fraser.
869
870         Tighten the code so that RenderTheme paint functions take RenderBox instead of RenderObject.
871
872         No change in functionality.
873
874         * rendering/RenderTheme.cpp:
875         (WebCore::RenderTheme::paintBorderOnly):
876         (WebCore::RenderTheme::paintDecorations):
877         * rendering/RenderTheme.h:
878
879 2015-07-30  Andreas Kling  <akling@apple.com>
880
881         [CF] Web process continually eating memory on simple, shared Google Docs spreadsheet.
882         <https://webkit.org/b/147403>
883         <rdar://problem/18835799>
884
885         Reviewed by Geoffrey Garen.
886
887         Make sure we service the CFRunLoop on worker threads, since ports using CoreFoundation
888         will be scheduling garbage collections and heap sweeps using CFRunLoop timers.
889
890         This fix is a stopgap. Long term we need a better design for integrating GC tasks with
891         with the web worker run loop.
892
893         * workers/WorkerRunLoop.cpp:
894         (WebCore::WorkerRunLoop::runInMode): Instead of sleeping forever, calculate a better
895         wakeup deadline by asking the CFRunLoop when its next timer will fire. Then, when a
896         timeout occurs, call CFRunLoopRunInMode (with seconds=0) to service pending timers.
897
898 2015-07-30  Myles C. Maxfield  <mmaxfield@apple.com>
899
900         Move locale information into FontDescription
901         https://bugs.webkit.org/show_bug.cgi?id=147457
902
903         Reviewed by Andreas Kling.
904
905         Currently, the "lang" attribute on a node sets locale information in RenderStyle.
906         Font selection is sensitive to this locale information, and occurs deep within
907         platform/ code, far away from RenderStyle. Because every RenderStyle owns a
908         FontDescription, and font selection can consult with FontDescriptions, it makes
909         sense to move the variable from RenderStyle to FontDescription, and provide
910         convenience methods on RenderStyle which inspect its FontDescription for locale
911         information.
912
913         This patch is in preparation for correctly obeying locale information when
914         performing font fallback.
915
916         No new tests because there is no behavior change.
917
918         * css/CSSPropertyNames.in:
919         * css/StyleBuilderCustom.h:
920         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
921         * platform/graphics/FontCache.h:
922         (WebCore::FontDescriptionKey::FontDescriptionKey):
923         (WebCore::FontDescriptionKey::operator==):
924         * platform/graphics/FontCascade.cpp:
925         * platform/graphics/FontDescription.cpp:
926         (WebCore::FontDescription::FontDescription):
927         (WebCore::FontDescription::setLocale):
928         * platform/graphics/FontDescription.h:
929         (WebCore::FontDescription::locale):
930         (WebCore::FontDescription::initialLocale):
931         (WebCore::FontDescription::operator==):
932         (WebCore::FontDescription::FontDescription): Deleted.
933         (WebCore::FontDescription::setScript): Deleted.
934         * platform/text/LocaleToScriptMappingDefault.cpp:
935         (WebCore::localeToScriptCodeForFontSelection):
936         * rendering/style/RenderStyle.cpp:
937         (WebCore::RenderStyle::changeRequiresLayout): Deleted.
938         * rendering/style/RenderStyle.h:
939         * rendering/style/StyleRareInheritedData.cpp:
940         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted.
941         (WebCore::StyleRareInheritedData::operator==): Deleted.
942         * rendering/style/StyleRareInheritedData.h:
943         * style/StyleResolveForDocument.cpp:
944         (WebCore::Style::resolveForDocument):
945
946 2015-07-30  Anders Carlsson  <andersca@apple.com>
947
948         Remove stray printf.
949         
950         * loader/SubframeLoader.cpp:
951         (WebCore::SubframeLoader::requestObject):
952
953 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
954
955         Make Path::apply() take a function reference
956         https://bugs.webkit.org/show_bug.cgi?id=147472
957
958         Reviewed by Anders Carlsson.
959
960         Path::apply() should take a const reference to a std::function.
961
962         * platform/graphics/Path.h:
963         * platform/graphics/cairo/PathCairo.cpp:
964         * platform/graphics/cg/PathCG.cpp:
965         (WebCore::CGPathApplierToPathApplier):
966         (WebCore::Path::apply):
967
968 2015-07-30  Anders Carlsson  <andersca@apple.com>
969
970         Assertion failure when a plug-in loads a resource that redirects somewhere
971         https://bugs.webkit.org/show_bug.cgi?id=147469
972
973         Reviewed by Alexey Proskuryakov.
974
975         Test: http/tests/plugins/get-url-redirect.html
976
977         r186597 moved the call to addPlugInStreamLoader to willSendRequest. This is wrong since
978         willSendRequest can be invoked more than once.
979         
980         Fix this by making the initialization phase of NetscapePlugInStreamLoader be more like
981         SubresourceLoader where we only call addPlugInStreamLoader once we've successfully initialized
982         the loader, and only call removePlugInStreamLoader if we've called addPlugInStreamLoader.
983
984         Also change addPlugInStreamLoader and removePlugInStreamLoader to take references.
985
986         * loader/DocumentLoader.cpp:
987         (WebCore::DocumentLoader::addPlugInStreamLoader):
988         (WebCore::DocumentLoader::removePlugInStreamLoader):
989         * loader/DocumentLoader.h:
990         * loader/NetscapePlugInStreamLoader.cpp:
991         (WebCore::NetscapePlugInStreamLoader::create):
992         (WebCore::NetscapePlugInStreamLoader::init):
993         (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
994         (WebCore::NetscapePlugInStreamLoader::didFail):
995         (WebCore::NetscapePlugInStreamLoader::didCancel):
996         (WebCore::NetscapePlugInStreamLoader::notifyDone):
997         * loader/NetscapePlugInStreamLoader.h:
998         * loader/ResourceLoader.cpp:
999         (WebCore::ResourceLoader::willSendRequest): Deleted.
1000         * loader/ResourceLoader.h:
1001         (WebCore::ResourceLoader::isPlugInStreamLoader): Deleted.
1002         * loader/SubframeLoader.cpp:
1003         (WebCore::SubframeLoader::requestObject):
1004
1005 2015-07-30  Jer Noble  <jer.noble@apple.com>
1006
1007         [iOS] Pressing 'done' in fullscreen video sometimes does nothing; stuck in fullscreen
1008         https://bugs.webkit.org/show_bug.cgi?id=147367
1009
1010         Reviewed by Eric Carlson.
1011
1012         During the request to exit fullscreen, the video element's m_videoFullscreenMode variable
1013         is set, but no exitFullscreen() request is sent up to the UIProcess. Previous threading
1014         issues have been discovered and fixed, but may have been re-introduced (or never fully
1015         fixed in the first place). To solve the bad behavior this threading issue creates, add
1016         a watchdog timer, similar to the one used in the desktop fullscreen controller, to ensure
1017         that if an exit fullscreen request is not acted upon, the UIProcess forcibly exits fullscreen
1018         anyway.
1019
1020         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1021         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1022         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): Initialize the timer.
1023         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Cancel the timer.
1024         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Set the timer.
1025         (WebVideoFullscreenInterfaceAVKit::watchdogTimerFired): Forcibly exit fullscreen mode.
1026
1027 2015-07-30  Myles C. Maxfield  <mmaxfield@apple.com>
1028
1029         Clean up makeFontCascadeCacheKey()
1030         https://bugs.webkit.org/show_bug.cgi?id=147430
1031
1032         Reviewed by Benjamin Poulain.
1033
1034         FontDescriptionKey is designed to encapsulate all the cacheable properties of a FontDescription.
1035         However, a higher-level cache, FontCascadeCacheKey, was taking some values from FontDescriptions.
1036         The fact that there wasn't a bug before is just a happy coincidence. This patch moves those bits
1037         from the higher-level cache and puts them into FontDescriptionKey where they belong.
1038
1039         No new tests because there is no behavior change.
1040
1041         * platform/graphics/FontCache.h:
1042         (WebCore::FontDescriptionKey::makeFlagKey):
1043         * platform/graphics/FontCascade.cpp:
1044         (WebCore::operator==):
1045         (WebCore::makeFontSelectorFlags): Deleted.
1046         (WebCore::makeFontCascadeCacheKey): Deleted.
1047         (WebCore::computeFontCascadeCacheHash): Deleted.
1048
1049 2015-07-18  Matt Rajca  <mrajca@apple.com>
1050
1051         [Mac] Media Session: add support for more telephony interruptions
1052         https://bugs.webkit.org/show_bug.cgi?id=147079
1053
1054         Reviewed by Eric Carlson.
1055
1056         * platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm:
1057         (WebCore::callDidEndRinging): End 'Transient' interruptions.
1058         (WebCore::callDidConnect): Forward this event to media sessions as a 'Content' interruption.
1059         (WebCore::MediaSessionInterruptionProviderMac::beginListeningForInterruptions): Register observers for new
1060          notification types.
1061         (WebCore::MediaSessionInterruptionProviderMac::stopListeningForInterruptions): Unregister all observers.
1062
1063 2015-07-29  Dean Jackson  <dino@apple.com>
1064
1065         Don't use (Details) when exposing SPI
1066         https://bugs.webkit.org/show_bug.cgi?id=147426
1067         <rdar://problem/22062407>
1068
1069         Reviewed by Dan Bernstein.
1070
1071         If we are declaring the interface without any implementation,
1072         we should use class extensions.
1073
1074         Added three new SPI.h files for NSButtonCell, NSURLConnection and
1075         NSURLRequest.
1076
1077         * WebCore.xcodeproj/project.pbxproj:
1078         * platform/mac/ScrollViewMac.mm:
1079         * platform/mac/ThemeMac.mm:
1080         * platform/network/mac/ResourceHandleMac.mm:
1081         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1082         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1083         * platform/spi/cf/CFNetworkSPI.h:
1084         * platform/spi/cocoa/AVKitSPI.h:
1085         * platform/spi/cocoa/CFNSURLConnectionSPI.h:
1086         * platform/spi/cocoa/NSButtonCellSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSColorSPI.h.
1087         * platform/spi/cocoa/NSCalendarDateSPI.h:
1088         * platform/spi/cocoa/NSColorSPI.h:
1089         * platform/spi/cocoa/NSFileManagerSPI.h:
1090         * platform/spi/cocoa/NSStringSPI.h:
1091         * platform/spi/cocoa/NSURLConnectionSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSStringSPI.h.
1092         * platform/spi/cocoa/NSURLDownloadSPI.h:
1093         * platform/spi/cocoa/NSURLRequestSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSStringSPI.h.
1094         * platform/spi/cocoa/QuartzCoreSPI.h:
1095         * platform/spi/cocoa/WebFilterEvaluatorSPI.h:
1096         * platform/spi/ios/CoreUISPI.h:
1097         * platform/spi/ios/LaunchServicesSPI.h:
1098         * platform/spi/ios/MediaPlayerSPI.h:
1099         * platform/spi/ios/QuickLookSPI.h:
1100         * platform/spi/ios/UIColorSPI.h:
1101         * platform/spi/mac/QuickLookMacSPI.h:
1102         * rendering/RenderThemeMac.mm:
1103
1104 2015-07-30  Alex Christensen  <achristensen@webkit.org>
1105
1106         Remove LegacyCACFLayerTreeHost
1107         https://bugs.webkit.org/show_bug.cgi?id=147388
1108
1109         Reviewed by Geoffrey Garen.
1110
1111         * WebCore.vcxproj/WebCore.vcxproj:
1112         * WebCore.vcxproj/WebCore.vcxproj.filters:
1113         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1114         (WebCore::CACFLayerTreeHost::create):
1115         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp: Removed.
1116         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Removed.
1117
1118 2015-07-30  Alex Christensen  <achristensen@webkit.org>
1119
1120         Fix Windows build after r187587.
1121
1122         * loader/SubresourceLoader.h:
1123         * loader/cache/CachedResource.h:
1124         * platform/graphics/Font.h:
1125         (WebCore::Font::DerivedFontData::DerivedFontData):
1126         * rendering/RenderLayerFilterInfo.h:
1127         Visual Studio doesn't like making std::unique_ptrs of private nested classes.
1128         It tries to make a std::default_delete with the private class as a template parameter.
1129
1130 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
1131
1132         Convert Path applier to use std::function
1133         https://bugs.webkit.org/show_bug.cgi?id=147368
1134
1135         Reviewed by Sam Weinig.
1136
1137         Use std::function for Path::apply().
1138
1139         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1140         (convertPathToScreenSpaceFunction):
1141         (-[WebAccessibilityObjectWrapperBase convertPathToScreenSpace:]):
1142         (ConvertPathToScreenSpaceFunction): Deleted.
1143         * inspector/InspectorOverlay.cpp:
1144         (WebCore::appendPathSegment):
1145         (WebCore::buildObjectForShapeOutside):
1146         * platform/graphics/Path.cpp:
1147         (WebCore::Path::length):
1148         (WebCore::Path::traversalStateAtLength):
1149         (WebCore::pathLengthApplierFunction): Deleted.
1150         * platform/graphics/Path.h:
1151         * platform/graphics/cairo/FontCairo.cpp:
1152         (WebCore::findPathIntersections):
1153         (WebCore::FontCascade::dashesForIntersectionsWithRect):
1154         * platform/graphics/cairo/PathCairo.cpp:
1155         (WebCore::Path::apply):
1156         * platform/graphics/cg/PathCG.cpp:
1157         (WebCore::CGPathApplierToPathApplier):
1158         (WebCore::Path::apply):
1159         * rendering/svg/RenderSVGPath.cpp:
1160         (WebCore::RenderSVGPath::updateZeroLengthSubpaths):
1161         * rendering/svg/RenderSVGShape.cpp:
1162         (WebCore::RenderSVGShape::processMarkerPositions):
1163         * rendering/svg/SVGMarkerData.h:
1164         (WebCore::SVGMarkerData::updateFromPathElement):
1165         * rendering/svg/SVGSubpathData.h:
1166         (WebCore::SVGSubpathData::updateFromPathElement):
1167         (WebCore::SVGSubpathData::SVGSubpathData): Deleted.
1168         * svg/SVGPathUtilities.cpp:
1169         (WebCore::pathIteratorForBuildingString):
1170         (WebCore::buildStringFromPath):
1171
1172 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
1173
1174         Selecting in an iframe can cause main page scrolling
1175         https://bugs.webkit.org/show_bug.cgi?id=147431
1176         rdar://problem/19244589
1177
1178         Reviewed by Zalan Bujtas.
1179         
1180         The RenderLayer auatoscroll code walks up the RenderLayer hierarchy, crossing
1181         frame boundaries. However, as it crosses into an ancestor frame it failed to
1182         map the target rect into the coordinate space of the new frame, which caused
1183         us to scroll to an incorrect location in that parent frame.
1184
1185         Test: fast/events/autoscroll-in-iframe.html
1186
1187         * rendering/RenderLayer.cpp:
1188         (WebCore::parentLayerCrossFrame): Make the layer a reference, and pass in
1189         an optional rect. When crossing frame boundaries, map the rect from the
1190         contents of the child frame to the contents of the parent frame.
1191         (WebCore::RenderLayer::enclosingScrollableLayer): Pass optional rect.
1192         (WebCore::RenderLayer::scrollRectToVisible):
1193         (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
1194         * rendering/RenderLayer.h:
1195
1196 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
1197
1198         Improve the history logging output
1199         https://bugs.webkit.org/show_bug.cgi?id=147429
1200
1201         Reviewed by Alexey Proskuryakov.
1202
1203         Improve the History log channel output to show which frame is navigating,
1204         print the addresses of the HistoryController and Frame, and print URLs
1205         for everything.
1206         
1207         Remove the BackForward log channel which had just one calling location,
1208         and log for pushState/replaceState.
1209
1210         * loader/HistoryController.cpp:
1211         (WebCore::HistoryController::updateForBackForwardNavigation):
1212         (WebCore::HistoryController::updateForReload):
1213         (WebCore::HistoryController::updateForStandardLoad):
1214         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
1215         (WebCore::HistoryController::updateForClientRedirect):
1216         (WebCore::HistoryController::updateForCommit):
1217         (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
1218         (WebCore::HistoryController::pushState):
1219         (WebCore::HistoryController::replaceState):
1220         * platform/Logging.h:
1221
1222 2015-07-29  Matt Rajca  <mrajca@apple.com>
1223
1224         Media Session: add infrastructure for testing media control events
1225         https://bugs.webkit.org/show_bug.cgi?id=147412
1226
1227         Reviewed by Eric Carlson.
1228
1229         * Modules/mediasession/MediaSessionManager.h:
1230         * testing/Internals.cpp:
1231         (WebCore::Internals::sendMediaControlEvent): Let tests simulate media control events.
1232         * testing/Internals.h:
1233         * testing/Internals.idl:
1234
1235 2015-07-30  Chris Dumez  <cdumez@apple.com>
1236
1237         Mark more classes as fast allocated
1238         https://bugs.webkit.org/show_bug.cgi?id=147440
1239
1240         Reviewed by Sam Weinig.
1241
1242         Mark more classes as fast allocated for performance. We heap-allocate
1243         objects of those types throughout the code base.
1244
1245         * editing/Editor.h:
1246         * history/CachedFrame.h:
1247         * history/CachedPage.h:
1248         * html/parser/HTMLResourcePreloader.h:
1249         * loader/PolicyChecker.h:
1250         * loader/SubresourceLoader.h:
1251         * loader/cache/CachedResource.h:
1252         * page/animation/AnimationController.h:
1253         * page/scrolling/ScrollingConstraints.h:
1254         * page/scrolling/ScrollingStateTree.h:
1255         * platform/graphics/Font.h:
1256         * platform/graphics/GraphicsLayerUpdater.h:
1257         * rendering/FilterEffectRenderer.h:
1258         * rendering/ImageQualityController.h:
1259         * rendering/RenderLayerFilterInfo.h:
1260         * rendering/SimpleLineLayoutResolver.h:
1261         * rendering/shapes/RasterShape.h:
1262         * rendering/shapes/Shape.h:
1263
1264 2015-07-30  Michael Catanzaro  <mcatanzaro@igalia.com>
1265
1266         [GTK] Crashes when SoupSession is destroyed in exit handler
1267         https://bugs.webkit.org/show_bug.cgi?id=145347
1268
1269         Reviewed by Carlos Garcia Campos.
1270
1271         Leak the default SoupSession with NeverDestroyed to avoid races at program exit.
1272
1273         * platform/network/soup/SoupNetworkSession.cpp:
1274         (WebCore::SoupNetworkSession::defaultSession):
1275         * platform/network/soup/SoupNetworkSession.h:
1276
1277 2015-07-30  Alex Christensen  <achristensen@webkit.org>
1278
1279         Build AppleWin port with CMake
1280         https://bugs.webkit.org/show_bug.cgi?id=147385
1281
1282         Reviewed by Martin Robinson.
1283
1284         * CMakeLists.txt:
1285         Add makesafeseh.asm to 32-bit build.  It needs to be after the ADD_PRECOMPILED_HEADER macro
1286         because CMake can only set COMPILE_FLAGS once with set_source_files_properties, and we want 
1287         to use that to add /safeseh instead of a precompiled header (which wouldn't be used anyway in assembly).
1288         * PlatformAppleWin.cmake:
1289         * PlatformWin.cmake:
1290         * PlatformWinCairo.cmake:
1291         Added missing source files and libraries.
1292
1293 2015-07-30  Alex Christensen  <achristensen@webkit.org>
1294
1295         [Win] Unreviewed build fix after r187582.
1296
1297         * accessibility/AccessibilityAllInOne.cpp:
1298         Include new files.
1299
1300 2015-07-30  Michael Catanzaro  <mcatanzaro@igalia.com>
1301
1302         Web Inspector: [Freetype] Allow inspector to retrieve a list of system fonts
1303         https://bugs.webkit.org/show_bug.cgi?id=147018
1304
1305         Reviewed by Carlos Garcia Campos.
1306
1307         No new tests; unskipped inspector/css/get-system-fonts.html
1308
1309         * platform/graphics/freetype/FontCacheFreeType.cpp:
1310         (WebCore::patternToFamilies): Added.
1311         (WebCore::FontCache::systemFontFamilies): Implemented.
1312         (WebCore::strongAliasesForFamily): Split some code off to patternToFamilies.
1313
1314 2015-07-30  Nan Wang  <n_wang@apple.com>
1315
1316         AX: VoiceOver unable to access content in malformed trees
1317         https://bugs.webkit.org/show_bug.cgi?id=147295
1318         <rdar://problem/14862892>
1319
1320         Reviewed by Chris Fleizach.
1321
1322         VoiceOver is skipping the content of malformed trees. This fixes the problem
1323         by having the tree check if it has valid children (treeitems) and makes treeitems
1324         check if they are inside trees.
1325
1326         Test: platform/mac/accessibility/malformed-tree.html
1327
1328         * CMakeLists.txt:
1329         * WebCore.vcxproj/WebCore.vcxproj:
1330         * WebCore.vcxproj/WebCore.vcxproj.filters:
1331         * WebCore.xcodeproj/project.pbxproj:
1332         * accessibility/AXObjectCache.cpp:
1333         (WebCore::createFromRenderer):
1334         * accessibility/AccessibilityObject.h:
1335         (WebCore::AccessibilityObject::addChildren):
1336         (WebCore::AccessibilityObject::addChild):
1337         (WebCore::AccessibilityObject::insertChild):
1338         (WebCore::AccessibilityObject::shouldIgnoreAttributeRole):
1339         (WebCore::AccessibilityObject::canHaveChildren):
1340         (WebCore::AccessibilityObject::hasChildren):
1341         * accessibility/AccessibilityRenderObject.cpp:
1342         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1343         * accessibility/AccessibilityTree.cpp: Added.
1344         (WebCore::AccessibilityTree::AccessibilityTree):
1345         (WebCore::AccessibilityTree::~AccessibilityTree):
1346         (WebCore::AccessibilityTree::create):
1347         (WebCore::AccessibilityTree::computeAccessibilityIsIgnored):
1348         (WebCore::AccessibilityTree::determineAccessibilityRole):
1349         (WebCore::AccessibilityTree::isTreeValid):
1350         * accessibility/AccessibilityTree.h: Added.
1351         * accessibility/AccessibilityTreeItem.cpp: Added.
1352         (WebCore::AccessibilityTreeItem::AccessibilityTreeItem):
1353         (WebCore::AccessibilityTreeItem::~AccessibilityTreeItem):
1354         (WebCore::AccessibilityTreeItem::create):
1355         (WebCore::AccessibilityTreeItem::determineAccessibilityRole):
1356         * accessibility/AccessibilityTreeItem.h: Added.
1357
1358 2015-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1359
1360         [GTK] Paste data is removed from clipboard when closing browser tab
1361         https://bugs.webkit.org/show_bug.cgi?id=144549
1362
1363         Reviewed by Martin Robinson.
1364
1365         GTK+ stores all clipboards in gtk_main or gtk_application_shutdown
1366         when the main loop finishes. We don't use gtk_main() in the web
1367         process, so we need to do the same and store all clipboards on
1368         process shutdown.
1369
1370         * platform/gtk/PasteboardGtk.cpp:
1371         (WebCore::Pasteboard::Pasteboard): Register the GtkClipboard.
1372         * platform/gtk/PasteboardHelper.cpp:
1373         (WebCore::PasteboardHelper::singleton): Make it destructible.
1374         (WebCore::PasteboardHelper::~PasteboardHelper): Call
1375         gtk_clipboard_store for every registered GtkClipboard.
1376         (WebCore::PasteboardHelper::registerClipboard): Save the given
1377         GtkClipboard.
1378         * platform/gtk/PasteboardHelper.h:
1379
1380 2015-07-29  Andy VanWagoner  <thetalecrafter@gmail.com>
1381
1382         Implement basic types for ECMAScript Internationalization API
1383         https://bugs.webkit.org/show_bug.cgi?id=146926
1384
1385         Reviewed by Benjamin Poulain.
1386
1387         * Configurations/FeatureDefines.xcconfig: Enabled INTL.
1388
1389 2015-07-29  Chris Dumez  <cdumez@apple.com>
1390
1391         Make TextLayout fast allocated
1392         https://bugs.webkit.org/show_bug.cgi?id=147428
1393
1394         Reviewed by Simon Fraser.
1395
1396         Make TextLayout fast allocated as it is allocated frequently and on the
1397         heap.
1398
1399         * platform/graphics/mac/ComplexTextController.cpp:
1400
1401 2015-07-29  Myles C. Maxfield  <mmaxfield@apple.com>
1402
1403         Fix iOS build
1404
1405         Unreviewed.
1406
1407         * platform/graphics/FontCascade.cpp:
1408         (WebCore::FontCascade::FontCascade): Deleted.
1409         * platform/graphics/FontCascade.h:
1410
1411 2015-07-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1412
1413         [EFL][CoordinatedGraphics] fixed position banner is moved when enabling delegateScrolling
1414         https://bugs.webkit.org/show_bug.cgi?id=146959
1415
1416         Reviewed by Simon Fraser.
1417
1418         Don't update fixed visible content area in ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate
1419         because PageViewportController and WebView on CoordinatedGraphics also update the visible content area according
1420         to the scrolling. So this problem has been caused by duplicated fixed visible rect update.
1421
1422         EFL WTR doesn't work with fixed layout and delegatesScrolling yet. So no test for this issue.
1423
1424         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
1425         (WebCore::ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate): Deleted.
1426
1427 2015-07-29  Myles C. Maxfield  <mmaxfield@apple.com>
1428
1429         Use rvalue references in FontCascade
1430         https://bugs.webkit.org/show_bug.cgi?id=147427
1431
1432         Reviewed by Simon Fraser.
1433
1434         No new tests because there is no behavior change.
1435
1436         * css/CSSFontSelector.cpp:
1437         (WebCore::CSSFontSelector::resolvesFamilyFor):
1438         * platform/graphics/FontCascade.cpp:
1439         (WebCore::FontCascade::FontCascade):
1440         (WebCore::retrieveOrAddCachedFonts):
1441         (WebCore::FontCascade::update):
1442         * platform/graphics/FontCascade.h:
1443         * platform/graphics/FontCascadeFonts.cpp:
1444         (WebCore::FontCascadeFonts::FontCascadeFonts):
1445         * platform/graphics/FontCascadeFonts.h:
1446         (WebCore::FontCascadeFonts::create):
1447
1448 2015-07-29  Myles C. Maxfield  <mmaxfield@apple.com>
1449
1450         Rename FontDescriptionFontDataCacheKey to FontDescriptionKey
1451         https://bugs.webkit.org/show_bug.cgi?id=147424
1452
1453         Reviewed by Simon Fraser.
1454
1455         This struct holds information about a FontDescription.
1456
1457         No new tests because there is no behavior change.
1458
1459         * css/CSSSegmentedFontFace.cpp:
1460         (WebCore::CSSSegmentedFontFace::fontRanges):
1461         * platform/graphics/FontCache.cpp:
1462         (WebCore::FontPlatformDataCacheKeyHash::hash):
1463         (WebCore::computeHash): Deleted.
1464         * platform/graphics/FontCache.h:
1465         (WebCore::FontDescriptionKey::FontDescriptionKey):
1466         (WebCore::FontDescriptionKey::operator==):
1467         (WebCore::FontDescriptionKey::operator!=):
1468         (WebCore::FontDescriptionKey::computeHash):
1469         (WebCore::FontDescriptionFontDataCacheKey::FontDescriptionFontDataCacheKey): Deleted.
1470         (WebCore::FontDescriptionFontDataCacheKey::operator==): Deleted.
1471         (WebCore::FontDescriptionFontDataCacheKey::operator!=): Deleted.
1472         (WebCore::FontDescriptionFontDataCacheKey::computeHash): Deleted.
1473         * platform/graphics/FontCascade.cpp:
1474         (WebCore::operator==):
1475         (WebCore::makeFontCascadeCacheKey):
1476         (WebCore::computeFontCascadeCacheHash):
1477
1478 2015-07-29  Zalan Bujtas  <zalan@apple.com>
1479
1480         Remove the spanner placeholder from m_spannerMap when the placeholder object
1481         gets transferred to a descendant flow.
1482         https://bugs.webkit.org/show_bug.cgi?id=147380
1483         rdar://problem/21981078
1484
1485         Reviewed by David Hyatt.
1486
1487         Before r180328, the spanner placeholder was removed from m_spannerMap through
1488         RenderMultiColumnFlowThread::removeFlowChildInfo() by calling flowThreadRelativeWillBeRemoved()
1489         when the placeholder renderer got transferred to the descendant flow.
1490         Now we just remove it from the map when the renderer is being detached.
1491
1492         Test: fast/multicol/newmulticol/spanner-crash-with-embedded-columns.html
1493
1494         * rendering/RenderMultiColumnFlowThread.cpp:
1495         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
1496
1497 2015-07-29  Brady Eidson  <beidson@apple.com>
1498
1499         Review feedback followup to: Crash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
1500         https://bugs.webkit.org/show_bug.cgi?id=147418
1501         
1502         * loader/DocumentLoader.cpp:
1503         (WebCore::DocumentLoader::cancelPolicyCheckIfNeeded):
1504
1505 2015-07-29  Brady Eidson  <beidson@apple.com>
1506
1507         RELEASE_ASSERT followup to: Crash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
1508         https://bugs.webkit.org/show_bug.cgi?id=147418
1509
1510         Reviewed by Chris Dumez.
1511         
1512         * loader/DocumentLoader.cpp:
1513         (WebCore::DocumentLoader::cancelPolicyCheckIfNeeded): RELEASE_ASSERT we have a FrameLoader here.
1514           We want to know if we ever get here without one.
1515
1516 2015-07-29  Brady Eidson  <beidson@apple.com>
1517
1518         Crash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
1519         <rdar://problem/21412186> and https://bugs.webkit.org/show_bug.cgi?id=147418
1520
1521         Reviewed by Chris Dumez.
1522
1523         No new tests (No known reproducibility)
1524
1525         * loader/DocumentLoader.cpp:
1526         (WebCore::DocumentLoader::responseReceived): When setting to m_waitingForContentPolicy true, make sure we have a FrameLoader.
1527         (WebCore::DocumentLoader::detachFromFrame): Always explicitly call cancelPolicyCheckIfNeeded().
1528         (WebCore::DocumentLoader::cancelPolicyCheckIfNeeded): Cancel the policy check if there is one.
1529         (WebCore::DocumentLoader::cancelMainResourceLoad): Use cancelPolicyCheckIfNeeded().
1530         * loader/DocumentLoader.h:
1531
1532 2015-07-29  Brady Eidson  <beidson@apple.com>
1533
1534         Crash calling webSocket.close() from onError handler for blocked web socket.
1535         <rdar://problem/21771620> and https://bugs.webkit.org/show_bug.cgi?id=147411
1536
1537         Reviewed by Tim Horton.
1538
1539         Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
1540                http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html
1541
1542         This was introduced with http://trac.webkit.org/changeset/185848
1543
1544         * Modules/websockets/WebSocket.cpp:
1545         (WebCore::WebSocket::connect): When blocked because of mixedContent, call dispatchOrQueueErrorEvent().
1546         (WebCore::WebSocket::didReceiveMessageError): Use dispatchOrQueueErrorEvent() instead.
1547         (WebCore::WebSocket::dispatchOrQueueErrorEvent): Dispatch the error event, but don't dispatch one twice!
1548         * Modules/websockets/WebSocket.h:
1549
1550         * Modules/websockets/WebSocketChannel.cpp:
1551         (WebCore::WebSocketChannel::fail): Null-check m_handshake before creating a console message from it.
1552
1553 2015-07-29  Michael Catanzaro  <mcatanzaro@igalia.com>
1554
1555         Clean up RefPtrCairo.cpp
1556         https://bugs.webkit.org/show_bug.cgi?id=147384
1557
1558         Reviewed by Martin Robinson.
1559
1560         Tests for null/non-null should all be done without equality comparisons.
1561
1562         * platform/graphics/cairo/RefPtrCairo.cpp:
1563         (WTF::refIfNotNull):
1564         (WTF::derefIfNotNull):
1565
1566 2015-07-29  Dean Jackson  <dino@apple.com>
1567
1568         Remove dispatch_apply_f and instead use vImage more directly
1569         https://bugs.webkit.org/show_bug.cgi?id=147391
1570         <rdar://problem/21893047>
1571
1572         Fix the iOS builds.
1573
1574         * platform/graphics/cg/ImageBufferDataCG.cpp:
1575         (WebCore::unpremultiplyBufferData):
1576         (WebCore::premultiplyBufferData):
1577
1578 2015-07-29  Chris Dumez  <cdumez@apple.com>
1579
1580         Avoid unnecessarily constructing PlatformMediaSessionManager on Document destruction
1581         https://bugs.webkit.org/show_bug.cgi?id=147398
1582
1583         Reviewed by Jer Noble.
1584
1585         Only call PlatformMediaSessionManager::stopAllMediaPlaybackForProcess() in
1586         destructors if an PlatformMediaSessionManager instance already exists, to
1587         avoid constructing one unecessarily at that point.
1588
1589         * dom/Document.cpp:
1590         (WebCore::Document::~Document):
1591         * platform/audio/PlatformMediaSessionManager.cpp:
1592         (WebCore::PlatformMediaSessionManager::sharedManager):
1593         (WebCore::PlatformMediaSessionManager::sharedManagerIfExists):
1594         * platform/audio/PlatformMediaSessionManager.h:
1595         * platform/audio/ios/MediaSessionManagerIOS.mm:
1596         (WebCore::PlatformMediaSessionManager::sharedManager):
1597         (WebCore::PlatformMediaSessionManager::sharedManagerIfExists):
1598
1599 2015-07-28  Simon Fraser  <simon.fraser@apple.com>
1600
1601         Fix debug builds.
1602
1603         * platform/graphics/cg/ImageBufferDataCG.cpp:
1604         (WebCore::premultiplyBufferData):
1605         (WebCore::unpremultiplyBufferData):
1606
1607 2015-07-28  Simon Fraser  <simon.fraser@apple.com>
1608
1609         Animations sometimes fail to start
1610         https://bugs.webkit.org/show_bug.cgi?id=147394
1611         rdar://problem/21852603
1612
1613         Reviewed by Dean Jackson.
1614
1615         When an accelerated animation or transition was started at the same time as
1616         a non-accelerated one, and then the node for the former was removed, we could
1617         never kick off the non-accelerated animation.
1618         
1619         AnimationControllerPrivate has logic to synchronize the two types of animation
1620         when they start in the same animation update, which involves setting the
1621         m_waitingForAsyncStartNotification flag, and waiting for a notifyAnimationStarted()
1622         to come in from the graphics system.
1623         
1624         However, it failed to handle the case where the accelerated animation was removed
1625         before the callback was received, which left the m_waitingForAsyncStartNotification flag
1626         set to true, preventing the non-accelerated animation from running.
1627         
1628         Test: animations/remove-syncing-animation.html
1629
1630         * page/animation/AnimationBase.h:
1631         (WebCore::AnimationBase::isAccelerated): Make this public.
1632         * page/animation/AnimationController.cpp:
1633         (WebCore::AnimationControllerPrivate::clear): Add logging.
1634         (WebCore::AnimationControllerPrivate::receivedStartTimeResponse): Add logging.
1635         (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Add logging.
1636         After removing animations from the maps, check to see if we expect any of the
1637         remaining animations are waiting for a notifyAnimationStarted(). If not, clear
1638         the m_waitingForAsyncStartNotification flag.
1639         (WebCore::AnimationController::notifyAnimationStarted): Log the renderer.
1640         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Remove unneeded
1641         initializations of HashMaps.
1642         * page/animation/CompositeAnimation.cpp:
1643         (WebCore::CompositeAnimation::updateTransitions): Log renderers.
1644         (WebCore::CompositeAnimation::updateKeyframeAnimations): Ditto.
1645
1646 2015-07-28  Dean Jackson  <dino@apple.com>
1647
1648         Remove dispatch_apply_f and instead use vImage more directly
1649         https://bugs.webkit.org/show_bug.cgi?id=147391
1650         <rdar://problem/21893047>
1651
1652         Reviewed by Simon Fraser.
1653
1654         Use vImage unmultiplication and premultiplication functions on the
1655         entire ImageBufferData object, rather than getting and setting data on an
1656         line by line using dispatch_apply.
1657
1658         We were seeing some crashes in vImage with the smaller buffer sizes, and
1659         hopefully this will either fix the problem, or give us a better
1660         stack trace to diagnose.
1661
1662         I also did a drive-by change of "dst" to "dest". It was inconsistent throughout
1663         the file.
1664
1665         Convered by the tests in fast/canvas and imported/w3c/canvas
1666
1667         * platform/graphics/cg/ImageBufferDataCG.cpp: Remove the ScanlineData structure. It is
1668         no longer needed.
1669         (WebCore::premultiplyBufferData): New function that calls vImagePremultiplyData_RGBA8888.
1670         (WebCore::unpremultiplyBufferData): New function that calls vImageUnpremultiplyData_RGBA8888.
1671         (WebCore::affineWarpBufferData): Extracting some common code into a function.
1672         (WebCore::ImageBufferData::getData): Use the two new functions as appropriate. Move
1673         some of the code around now that more is shared between the different #if branches.
1674         (WebCore::ImageBufferData::putData):
1675         (WebCore::convertScanline): Deleted.
1676         (WebCore::unpremultitplyScanline): Deleted.
1677         (WebCore::premultitplyScanline): Deleted.
1678
1679 2015-07-28  Alexey Proskuryakov  <ap@apple.com>
1680
1681         Clean up usesAsyncCallbacks handling in ResourceHandle
1682         https://bugs.webkit.org/show_bug.cgi?id=147342
1683
1684         Reviewed by Darin Adler.
1685
1686         Store "usesAsyncCallbacks" bit in ResourceHandle, because it's not accessible
1687         via client once the client is zeroed out.
1688
1689         Changed ResourceHandle::setClient into ResourceHandle::clearClient, because it's
1690         only ever used to zero out the client pointer, and it doesn't support changing it.
1691
1692         * loader/ResourceLoader.cpp:
1693         (WebCore::ResourceLoader::releaseResources):
1694         * loader/appcache/ApplicationCacheGroup.cpp:
1695         (WebCore::ApplicationCacheGroup::stopLoading):
1696         * platform/network/BlobResourceHandle.cpp:
1697         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
1698         (WebCore::BlobResourceHandle::notifyResponseOnError):
1699         * platform/network/ResourceHandle.cpp:
1700         (WebCore::ResourceHandle::client):
1701         (WebCore::ResourceHandle::clearClient):
1702         (WebCore::ResourceHandle::setDefersLoading):
1703         (WebCore::ResourceHandle::usesAsyncCallbacks):
1704         (WebCore::ResourceHandle::setClient): Deleted.
1705         * platform/network/ResourceHandle.h:
1706         * platform/network/ResourceHandleInternal.h:
1707         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1708         * platform/network/cf/ResourceHandleCFNet.cpp:
1709         (WebCore::ResourceHandle::createCFURLConnection):
1710         (WebCore::ResourceHandle::willSendRequest):
1711         (WebCore::ResourceHandle::shouldUseCredentialStorage):
1712         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
1713         * platform/network/mac/ResourceHandleMac.mm:
1714         (WebCore::ResourceHandle::start):
1715         (WebCore::ResourceHandle::makeDelegate):
1716         (WebCore::ResourceHandle::willSendRequest):
1717         (WebCore::ResourceHandle::continueWillSendRequest):
1718         (WebCore::ResourceHandle::continueDidReceiveResponse):
1719         (WebCore::ResourceHandle::shouldUseCredentialStorage):
1720         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
1721         (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
1722         (WebCore::ResourceHandle::continueWillCacheResponse):
1723
1724 2015-07-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1725
1726         Minor cleanups in FontCacheFreeType.cpp
1727         https://bugs.webkit.org/show_bug.cgi?id=147392
1728
1729         Reviewed by Martin Robinson.
1730
1731         Mark several functions as static (file-scope), use more nullptr, and use more smart
1732         pointers. No behavior changes.
1733
1734         * platform/graphics/freetype/FcUniquePtr.h:
1735         (WebCore::FcPtrDeleter<FcCharSet>::operator()):
1736         * platform/graphics/freetype/FontCacheFreeType.cpp:
1737         (WebCore::createFontConfigPatternForCharacters):
1738         (WebCore::findBestFontGivenFallbacks):
1739         (WebCore::FontCache::systemFallbackForCharacters):
1740         (WebCore::fontWeightToFontconfigWeight):
1741         (WebCore::FontCache::createFontPlatformData):
1742
1743 2015-07-28  Yusuke Suzuki  <utatane.tea@gmail.com>
1744
1745         [ES6] Add ENABLE_ES6_MODULES compile time flag with the default value "false"
1746         https://bugs.webkit.org/show_bug.cgi?id=147350
1747
1748         Reviewed by Sam Weinig.
1749
1750         * Configurations/FeatureDefines.xcconfig:
1751
1752 2015-07-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1753
1754         [Freetype] Always allow font matching for strong aliases
1755         https://bugs.webkit.org/show_bug.cgi?id=147057
1756
1757         Reviewed by Martin Robinson.
1758
1759         Tests: platform/gtk/fonts/font-family-fallback-ignores-weak-aliases.html
1760                platform/gtk/fonts/font-family-fallback-respects-strong-aliases.html
1761
1762         Treat fonts that are strongly-aliased to each other as if they were identical for the
1763         purposes of CSS font fallback. This improves the layout of many web pages by allowing
1764         fontconfig to replace fonts with metric-compatible equivalents (e.g. Arial -> Liberation
1765         Sans) instead of rejecting the metric-compatible font as unsuitable.
1766
1767         * platform/graphics/cairo/RefPtrCairo.cpp:
1768         (WTF::refIfNotNull):
1769         (WTF::derefIfNotNull):
1770         * platform/graphics/cairo/RefPtrCairo.h:
1771         * platform/graphics/freetype/FcUniquePtr.h: Added.
1772         (WebCore::FcPtrDeleter<FcFontSet>::operator()):
1773         (WebCore::FcPtrDeleter<FcLangSet>::operator()):
1774         (WebCore::FcPtrDeleter<FcObjectSet>::operator()):
1775         * platform/graphics/freetype/FontCacheFreeType.cpp:
1776         (WebCore::strengthOfFirstAlias):
1777         (WebCore::strongAliasesForFamily):
1778         (WebCore::areStronglyAliased):
1779         (WebCore::FontCache::createFontPlatformData):
1780
1781 2015-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
1782
1783         [iOS] Crash when encountering characters whose natural font is one we can't look up
1784         https://bugs.webkit.org/show_bug.cgi?id=147377
1785         <rdar://problem/22022011>
1786
1787         Reviewed by Simon Fraser.
1788
1789         These characters hit the complex text code path, where CoreText picks fonts
1790         to use for each character. We then try to map these CoreText fonts back to
1791         our own Font objects, and we assume (on iOS) that our own font search will
1792         always return something.
1793
1794         On OS X, we do not have such an assumption, and we handle the case where it
1795         does not hold. This method works on iOS as well, so the solution is to just
1796         perform it on both OSes.
1797
1798         Test: fast/text/crash-complex-unknown-font.html
1799
1800         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1801         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
1802
1803 2015-07-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
1804
1805         [iOS] REGRESSION(r168075): Fullscreen web video doesn't pause on screen lock
1806         https://bugs.webkit.org/show_bug.cgi?id=147269
1807
1808         Reviewed by Andreas Kling.
1809
1810         Media elements should pause when the application is going to EnterBackground
1811         under lock regardless whether it is in full screen or not.
1812
1813         * platform/audio/PlatformMediaSession.h:
1814         * platform/audio/PlatformMediaSession.cpp:
1815         (WebCore::PlatformMediaSession::doInterruption): This code was moved from 
1816         beginInterruption().
1817                 
1818         (WebCore::PlatformMediaSession::shouldDoInterruption): Move the condition 
1819         which allows the media session interruption to a separate function.
1820         
1821         (WebCore::PlatformMediaSession::beginInterruption): Call the functions
1822         shouldDoInterruption() and doInterruption().
1823         
1824         (WebCore::PlatformMediaSession::forceInterruption): This function will
1825         be called from PlatformMediaSessionManager::applicationDidEnterBackground()
1826         to override the decision which is made by PlatformMediaSession::beginInterruption()
1827         if the application isSuspendedUnderLock.
1828         
1829         * platform/audio/PlatformMediaSessionManager.h:
1830         * platform/audio/PlatformMediaSessionManager.cpp:
1831         (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground):
1832         [UIApp isSuspendedUnderLock] is only valid when it is called when the
1833         UIApplicationDidEnterBackgroundNotification is received. We need to force
1834         interrupting the media sessions if the application isSuspendedUnderLock
1835         and UIApplicationWillResignActiveNotification was ignored because of PiP.
1836
1837         * platform/audio/ios/MediaSessionManagerIOS.h:
1838         * platform/audio/ios/MediaSessionManagerIOS.mm:
1839         (-[WebMediaSessionHelper initWithCallback:]):
1840         (-[WebMediaSessionHelper applicationDidEnterBackground:]): Listen to 
1841         UIApplicationDidEnterBackgroundNotification and make a call on the web
1842         thread to PlatformMediaSessionManager::applicationDidEnterBackground() 
1843         and pass the isSuspendedUnderLock flag which is queried on the UIProcess.
1844
1845 2015-07-28  Tim Horton  <timothy_horton@apple.com>
1846
1847         [iOS] Creating a TextIndicator causes the view to scroll to the current selection
1848         https://bugs.webkit.org/show_bug.cgi?id=147379
1849         <rdar://problem/22038421>
1850
1851         Reviewed by Beth Dakin.
1852
1853         * editing/Editor.cpp:
1854         (WebCore::Editor::setIgnoreCompositionSelectionChange):
1855         * editing/Editor.h:
1856         Add a flag so that setIgnoreCompositionSelectionChange(false) can still
1857         not force-reveal the current selection.
1858
1859         This is useful for e.g. TextIndicator, who saves the selection, changes it,
1860         and then restores it, but doesn't want to scroll to the saved/restored selection.
1861
1862         * page/TextIndicator.cpp:
1863         (WebCore::TextIndicator::createWithRange):
1864         Make use of the above flag.
1865
1866 2015-07-28  Eric Carlson  <eric.carlson@apple.com>
1867
1868         [iOS] Set AirPlay discovery mode to disabled when page is hidden
1869         https://bugs.webkit.org/show_bug.cgi?id=147369
1870
1871         Reviewed by Jer Noble.
1872
1873         * html/MediaElementSession.cpp:
1874         (WebCore::MediaElementSession::requiresPlaybackTargetRouteMonitoring): Return false when
1875           the client is not visible.
1876         * html/MediaElementSession.h:
1877
1878         * platform/audio/PlatformMediaSession.cpp:
1879         (WebCore::PlatformMediaSession::clientDataBufferingTimerFired): Call configureWireLessTargetMonitoring.
1880
1881 2015-07-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
1882
1883         Crash happens when calling removeEventListener for an SVG element which has an instance inside a <defs> element of shadow tree
1884         https://bugs.webkit.org/show_bug.cgi?id=147290
1885
1886         Reviewed by Daniel Bates.
1887
1888         When the shadow tree is built for a <use> element, all the SVG elements
1889         are allowed to be cloned in the shadow tree but later some of the elements
1890         are disallowed and removed. Make sure, when disallowing an element in the
1891         shadow tree, to reset the correspondingElement relationship between all
1892         the disallowed descendant SVG elements and all their original elements.
1893         
1894         Test: svg/custom/remove-event-listener-shadow-disallowed-element.svg
1895
1896         *svg/SVGElement.cpp:
1897         (WebCore::SVGElement::setCorrespondingElement)
1898         * svg/SVGUseElement.cpp:
1899         (WebCore::removeDisallowedElementsFromSubtree):
1900
1901 2015-07-28  Chris Dumez  <cdumez@apple.com>
1902
1903         Unreviewed, follow-up nit fix after r187489.
1904
1905         Fix forward declarations ordering.
1906
1907         * css/StyleSheetContents.h:
1908
1909 2015-07-27  David Hyatt  <hyatt@apple.com>
1910
1911         ASSERTION FAILED: !currBox->needsLayout() loading bing maps (and apple.com/music and nytimes)
1912         https://bugs.webkit.org/show_bug.cgi?id=93891
1913
1914         Reviewed by Simon Fraser.
1915
1916         Added new tests in fast/dynamic.
1917
1918         Change tracking of positioned objects to always insert objects that need a layout in the
1919         end of the ListHashMap for RenderViews. This ensures that dependencies between nested
1920         positioned objects that both need a layout by the RenderView are resolved in the correct order.
1921
1922         Don't cache the end object when walking the ListHashMap to do layouts of positioned objects,
1923         since that list is getting updated dynamically as earlier objects can mark and insert new
1924         objects into the list during their layouts.
1925
1926         * rendering/RenderBlock.cpp:
1927         (WebCore::RenderBlock::layoutPositionedObject):
1928         (WebCore::RenderBlock::layoutPositionedObjects):
1929         (WebCore::RenderBlock::insertIntoTrackedRendererMaps):
1930         (WebCore::RenderBlock::insertPositionedObject):
1931         (WebCore::RenderBlock::removePositionedObject):
1932         * rendering/RenderBlock.h:
1933
1934 2015-07-28  Simon Fraser  <simon.fraser@apple.com>
1935
1936         Fix builds using PathCairo.
1937
1938         * platform/graphics/cairo/PathCairo.cpp:
1939         (WebCore::Path::apply):
1940
1941 2015-07-28  Joseph Pecoraro  <pecoraro@apple.com>
1942
1943         Web Inspector: Show Pseudo Elements in DOM Tree
1944         https://bugs.webkit.org/show_bug.cgi?id=139612
1945
1946         Reviewed by Timothy Hatcher.
1947
1948         Tests: inspector/css/pseudo-element-matches-for-pseudo-element-node.html
1949                inspector/dom/pseudo-element-dynamic.html
1950                inspector/dom/pseudo-element-static.html
1951
1952         Much of this patch was modelled after the Blink implementation of
1953         pseudo element inspection.
1954
1955         * dom/PseudoElement.h:
1956         * dom/PseudoElement.cpp:
1957         (WebCore::PseudoElement::~PseudoElement):
1958         (WebCore::PseudoElement::clearHostElement):
1959         Since InspectorDOMAgent may hold a reference to this PseudoElement we
1960         can't report it as destroyed in the destructor, as that wouldn't be
1961         reached if the inspector holds a reference. Move this to when the
1962         psuedo element is disconnected, which is immediately before destruction.
1963
1964         * inspector/InspectorCSSAgent.h:
1965         * inspector/InspectorCSSAgent.cpp:
1966         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1967         When computing styles for a pseudo element, compute styles from the
1968         host element for just the pseudo element's pseudo type. Likewise
1969         only include matched results, not inherited or others.
1970
1971         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1972         Add the pseudo type to the checker context to try and detect exactly
1973         which selector in a list of selectors matched the pseudo element.
1974
1975         * inspector/InspectorDOMAgent.h:
1976         * inspector/InspectorDOMAgent.cpp:
1977         (WebCore::InspectorDOMAgent::unbind):
1978         When unbinding an element, also unbind any pseudo element children
1979         it may have had and bound.
1980
1981         (WebCore::InspectorDOMAgent::assertEditableNode):
1982         (WebCore::InspectorDOMAgent::assertEditableElement):
1983         (WebCore::InspectorDOMAgent::removeNode):
1984         Improve grammar in error message. Don't allow editing pseudo elements.
1985
1986         (WebCore::pseudoElementType):
1987         (WebCore::InspectorDOMAgent::buildObjectForNode):
1988         (WebCore::InspectorDOMAgent::buildArrayForPseudoElements):
1989         If a node is a pseudo element include its pseudoType.
1990         If a node has pseudo element children include them.
1991
1992         (WebCore::InspectorDOMAgent::pseudoElementCreated):
1993         (WebCore::InspectorDOMAgent::pseudoElementDestroyed):
1994         When pseudo elements are dynamically created or destroyed
1995         push pseudo element nodes to the frontend if needed.
1996
1997         * inspector/InspectorInstrumentation.cpp:
1998         (WebCore::InspectorInstrumentation::pseudoElementCreatedImpl):
1999         (WebCore::InspectorInstrumentation::pseudoElementDestroyedImpl):
2000         * inspector/InspectorInstrumentation.h:
2001         (WebCore::InspectorInstrumentation::pseudoElementCreated):
2002         (WebCore::InspectorInstrumentation::pseudoElementDestroyed):
2003         (WebCore::InspectorInstrumentation::layerTreeDidChange):
2004         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
2005         Plumbing for pseudo element created/destroyed events.
2006
2007         * style/StyleResolveTree.cpp:
2008         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
2009         This is the only place a pseudo element is created, inform the inspector.
2010
2011         * inspector/InspectorOverlay.cpp:
2012         (WebCore::buildObjectForElementData):
2013         Update the element data for the node highlight label to include the
2014         host element's selector and the pseudo element selector.
2015
2016 2015-07-28  Tim Horton  <timothy_horton@apple.com>
2017
2018         Remove some more bits of WebTiledLayer
2019         https://bugs.webkit.org/show_bug.cgi?id=147356
2020
2021         Reviewed by Simon Fraser.
2022
2023         * platform/graphics/ca/PlatformCALayer.h:
2024         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2025         (PlatformCALayerCocoa::setContentsScale): Deleted.
2026         (PlatformCALayer::setTileSize): Deleted.
2027
2028 2015-07-28  Simon Fraser  <simon.fraser@apple.com>
2029
2030         Change markContainingBlocksForLayout() to take an enum, rather than a bool
2031         https://bugs.webkit.org/show_bug.cgi?id=147345
2032
2033         Reviewed by Daniel Bates.
2034         
2035         Change markContainingBlocksForLayout to take an enum class for the scheduleRelayout
2036         argument, for better code readability.
2037
2038         * page/FrameView.cpp:
2039         (WebCore::FrameView::layout):
2040         (WebCore::FrameView::scheduleRelayout):
2041         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2042         * rendering/RenderObject.cpp:
2043         (WebCore::RenderObject::markContainingBlocksForLayout):
2044         * rendering/RenderObject.h:
2045
2046 2015-07-27  Simon Fraser  <simon.fraser@apple.com>
2047
2048         PathApplierFunction should take a reference to a PathElement
2049         https://bugs.webkit.org/show_bug.cgi?id=147337
2050
2051         Reviewed by Dan Bates.
2052
2053         Convert PathApplierFunction to take a const PathElement&, since it can never be null.
2054
2055         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2056         (ConvertPathToScreenSpaceFunction):
2057         * inspector/InspectorOverlay.cpp:
2058         (WebCore::appendPathSegment):
2059         * platform/graphics/Path.cpp:
2060         (WebCore::pathLengthApplierFunction):
2061         * platform/graphics/Path.h:
2062         * platform/graphics/PathTraversalState.h:
2063         (WebCore::PathTraversalState::processPathElement):
2064         * platform/graphics/cg/PathCG.cpp:
2065         (WebCore::CGPathApplierToPathApplier):
2066         * rendering/svg/SVGMarkerData.h:
2067         (WebCore::SVGMarkerData::updateFromPathElement):
2068         (WebCore::SVGMarkerData::updateMarkerDataForPathElement):
2069         * rendering/svg/SVGSubpathData.h:
2070         (WebCore::SVGSubpathData::updateFromPathElement):
2071         * svg/SVGPathUtilities.cpp:
2072         (WebCore::pathIteratorForBuildingString):
2073
2074 2015-07-28  Jer Noble  <jer.noble@apple.com>
2075
2076         [iOS] Notify fullscreen controller in UIProcess whether external playback is allowed
2077         https://bugs.webkit.org/show_bug.cgi?id=147343
2078
2079         Reviewed by Brady Eidson.
2080
2081         Pass the value of the MediaElementSession's wirelessVideoPlaybackDisabled() property up through WebKit2 to
2082         WebVideoFullscreenControllerAVKit.
2083
2084         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2085         (WebVideoFullscreenControllerContext::setWirelessVideoPlaybackDisabled): Pass to the interface on the main thread.
2086         * platform/ios/WebVideoFullscreenInterface.h:
2087         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2088         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2089         (WebVideoFullscreenInterfaceAVKit::setWirelessVideoPlaybackDisabled): Sets .allowsExternalPlayback to !disabled.
2090         (WebVideoFullscreenInterfaceAVKit::wirelessVideoPlaybackDisabled): Returns the last value set.
2091         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2092         (WebVideoFullscreenModelVideoElement::setWebVideoFullscreenInterface): Update the value of wirelessVideoPlaybackDisabled
2093             if the element is present.
2094         (WebVideoFullscreenModelVideoElement::setVideoElement): Ditto if the interface is present.
2095         (WebVideoFullscreenModelVideoElement::updateForEventName): Update the value either way.
2096
2097 2015-07-28  Brady Eidson  <beidson@apple.com>
2098
2099         Handle null CFArrayRef returning from _CFHTTPParsedCookiesWithResponseHeaderFields.
2100         <rdar://problem/21995928> and https://bugs.webkit.org/show_bug.cgi?id=147365
2101
2102         Reviewed by Alexey Proskuryakov.
2103
2104         * platform/network/cf/CookieJarCFNet.cpp:
2105         (WebCore::filterCookies): ASSERT the input is not null.
2106         (WebCore::createCookies): Always return a CFArrayRef, even if it's empty.
2107
2108 2015-07-28  Chris Dumez  <cdumez@apple.com>
2109
2110         Allow lax MIME type parsing for same-origin CSS in quirks mode.
2111         https://bugs.webkit.org/show_bug.cgi?id=147327
2112         <rdar://problem/22010303>
2113
2114         Reviewed by Zalan Bujtas.
2115
2116         The change made in r180020 is too strict for the web, and doesn't match Firefox
2117         Chrome, or IE's behavior. In particular, it does not respect the same-origin
2118         carveout that the HTML spec specifies:
2119         https://html.spec.whatwg.org/multipage/semantics.html#link-type-stylesheet
2120
2121         This patch corrects that oversight and aligns our behavior with other popular
2122         browsers.
2123
2124         This change was adapted from Blink r196678:
2125         https://src.chromium.org/viewvc/blink?revision=196678&view=revision
2126
2127         Tests: http/tests/security/cross-origin-css-in-quirks-1.html
2128                http/tests/security/cross-origin-css-in-quirks-2.html
2129                http/tests/security/cross-origin-css-in-quirks-3.html
2130                http/tests/security/cross-origin-css-in-quirks-4.html
2131                http/tests/security/cross-origin-css-in-quirks-5.html
2132                http/tests/security/cross-origin-css-in-quirks-6.html
2133                http/tests/security/cross-origin-css-in-quirks-7.html
2134                http/tests/security/cross-origin-css-in-quirks-8.html
2135                http/tests/security/same-origin-css-1.html
2136                http/tests/security/same-origin-css-2.html
2137                http/tests/security/same-origin-css-3.html
2138                http/tests/security/same-origin-css-4.html
2139                http/tests/security/same-origin-css-5.html
2140                http/tests/security/same-origin-css-6.html
2141                http/tests/security/same-origin-css-7.html
2142                http/tests/security/same-origin-css-8.html
2143                http/tests/security/same-origin-css-in-quirks.html
2144
2145         * css/StyleRuleImport.cpp:
2146         (WebCore::StyleRuleImport::setCSSStyleSheet):
2147         * css/StyleSheetContents.cpp:
2148         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
2149         * css/StyleSheetContents.h:
2150         * html/HTMLLinkElement.cpp:
2151         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2152         * loader/cache/CachedCSSStyleSheet.cpp:
2153         (WebCore::CachedCSSStyleSheet::sheetText):
2154         (WebCore::CachedCSSStyleSheet::canUseSheet):
2155         (WebCore::CachedCSSStyleSheet::checkNotify): Deleted.
2156         * loader/cache/CachedCSSStyleSheet.h:
2157
2158 2015-07-28  Alexey Proskuryakov  <ap@apple.com>
2159
2160         Rolling out r187463, because it caused memory corruption on multiple tests.
2161
2162         Original bug:
2163         Crash happens when calling removeEventListener for an SVG element which has an instance inside a <defs> element of shadow tree
2164         https://bugs.webkit.org/show_bug.cgi?id=147290
2165
2166         * svg/custom/remove-event-listener-shadow-disallowed-element-expected.txt: Removed.
2167         * svg/custom/remove-event-listener-shadow-disallowed-element.svg: Removed.
2168
2169         * svg/SVGUseElement.cpp:
2170         (WebCore::removeDisallowedElementsFromSubtree):
2171         (WebCore::associateClonesWithOriginals):
2172
2173 2015-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2174
2175         [GTK] Use fastMalloc instead of g_slice
2176         https://bugs.webkit.org/show_bug.cgi?id=147357
2177
2178         Reviewed by Sergio Villar Senin.
2179
2180         The use of g_slice is no longer encouraged by glib developers.
2181
2182         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2183         (WebCore::mapGstBuffer):
2184         (WebCore::unmapGstBuffer):
2185
2186 2015-07-27  Jon Davis  <jond@apple.com>
2187
2188         Adding Web Components to feature status page.
2189         https://bugs.webkit.org/show_bug.cgi?id=147270
2190
2191         Reviewed by Timothy Hatcher.
2192
2193         * features.json:
2194
2195 2015-07-27  Benjamin Poulain  <bpoulain@apple.com>
2196
2197         ShrinkToFit() all the DFA's vectors when we no longer need to add new nodes to it
2198         https://bugs.webkit.org/show_bug.cgi?id=147341
2199
2200         Reviewed by Geoffrey Garen.
2201
2202         Add a finalizer to the DFA to reduce the total memory needed
2203         to store it.
2204
2205         On real test lists, this cuts the peak memory usage by about 1 megabyte.
2206
2207         The NFA already had a finalizer, no need to modify that one.
2208
2209         * contentextensions/DFA.cpp:
2210         (WebCore::ContentExtensions::DFA::finalize):
2211         * contentextensions/DFA.h:
2212         * contentextensions/NFAToDFA.cpp:
2213         (WebCore::ContentExtensions::NFAToDFA::convert):
2214
2215 2015-07-27  Brady Eidson  <beidson@apple.com>
2216
2217         Crash in WebCore::DocumentLoader::willSendRequest() with ContentFilter and AppCache.
2218         <rdar://problem/21960398> and https://bugs.webkit.org/show_bug.cgi?id=147339
2219
2220         Reviewed by Alexey Proskuryakov.
2221
2222         No new tests (Not yet proven to be possible to test this).
2223
2224         * loader/DocumentLoader.cpp:
2225         (WebCore::DocumentLoader::willSendRequest): Grab the identifier from the CachedResource directly, not from the null ResourceLoader.
2226         (WebCore::DocumentLoader::continueAfterNavigationPolicy): Null check the ResourceLoader, as it can definitely be gone by this point.
2227
2228         * loader/cache/CachedResource.cpp:
2229         (WebCore::CachedResource::clearLoader): Save off the identifier for later use.
2230         * loader/cache/CachedResource.h:
2231         (WebCore::CachedResource::identifierForLoadWithoutResourceLoader): Expose the identifier that the ResourceLoader had when it went away.
2232
2233 2015-07-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
2234
2235         Crash happens when calling removeEventListener for an SVG element which has an instance inside a <defs> element of shadow tree
2236         https://bugs.webkit.org/show_bug.cgi?id=147290
2237
2238         Reviewed by Simon Fraser.
2239
2240         When the shadow tree is built for a <use> element, all the SVG elements
2241         are allowed to be cloned in the shadow tree but later some of the elements
2242         are disallowed and removed. Make sure, when disallowing an element in the
2243         shadow tree, to reset the correspondingElement relationship between all
2244         the disallowed descendant SVG elements and all their original elements.
2245         
2246         Test: svg/custom/remove-event-listener-shadow-disallowed-element.svg
2247
2248         * svg/SVGUseElement.cpp:
2249         (WebCore::removeDisallowedElementsFromSubtree):
2250
2251 2015-07-27  Simon Fraser  <simon.fraser@apple.com>
2252
2253         Rename AnimationBase::isTransformFunctionListValid()
2254         https://bugs.webkit.org/show_bug.cgi?id=147334
2255
2256         Reviewed by Sam Weinig.
2257         
2258         isTransformFunctionListValid() was a confusing name for this state. It's true
2259         when the transform function lists for an animation or transition are matched,
2260         so rename it to transformFunctionListsMatch().
2261
2262         No behavior change.
2263
2264         * page/animation/AnimationBase.h:
2265         (WebCore::AnimationBase::transformFunctionListsMatch):
2266         (WebCore::AnimationBase::isTransformFunctionListValid): Deleted.
2267         * page/animation/CSSPropertyAnimation.cpp:
2268         (WebCore::blendFunc):
2269         * page/animation/ImplicitAnimation.cpp:
2270         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
2271         (WebCore::ImplicitAnimation::validateTransformFunctionList):
2272         * page/animation/KeyframeAnimation.cpp:
2273         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2274         (WebCore::KeyframeAnimation::validateTransformFunctionList):
2275
2276 2015-07-27  Alex Christensen  <achristensen@webkit.org>
2277
2278         Progress towards building AppleWin with CMake
2279         https://bugs.webkit.org/show_bug.cgi?id=147325
2280
2281         Reviewed by Martin Robinson.
2282
2283         * PlatformAppleWin.cmake: Added.
2284         * PlatformWin.cmake:
2285         * PlatformWinCairo.cmake:
2286         Moved a lot of common directories from PlatformWinCairo to PlatformWin.
2287
2288 2015-07-27  Tim Horton  <timothy_horton@apple.com>
2289
2290         Fix the build after r187383
2291
2292         * platform/spi/cocoa/QuartzCoreSPI.h:
2293
2294 2015-07-27  Anders Carlsson  <andersca@apple.com>
2295
2296         WKWebsiteDataStore remove methods don't properly delete cookies
2297         https://bugs.webkit.org/show_bug.cgi?id=147333
2298         rdar://problem/21948230
2299
2300         Reviewed by Tim Horton.
2301
2302         If there are multiple cookies for a single domain, make sure to delete all of them
2303         and not just the first one we find.
2304         
2305         Fix this by keeping a mapping from domain to a list of cookies.
2306
2307         * platform/network/mac/CookieJarMac.mm:
2308         (WebCore::deleteCookiesForHostnames):
2309
2310 2015-07-27  Simon Fraser  <simon.fraser@apple.com>
2311
2312         Enhance Animation logging slightly
2313         https://bugs.webkit.org/show_bug.cgi?id=147324
2314
2315         Reviewed by Anders Carlsson.
2316
2317         Include the value of "param" in animation logging, because sometimes it's negative,
2318         and log state changes in a few more places.
2319
2320         * page/animation/AnimationBase.cpp:
2321         (WebCore::AnimationBase::updateStateMachine):
2322
2323 2015-07-27  Per Arne Vollan  <peavo@outlook.com>
2324
2325         [Curl] Crash in CurlDownload::didReceiveHeader when downloading file.
2326         https://bugs.webkit.org/show_bug.cgi?id=146832
2327
2328         Reviewed by Darin Adler.
2329
2330         Only call ResourceResponse::setMimeType from the main thread.
2331         Also, CurlDownload should be reference counted to make sure it
2332         still lives when a function call is invoked on the main thread
2333         from the download thread.
2334
2335         * platform/network/curl/CurlDownload.cpp:
2336         (WebCore::CurlDownloadManager::downloadThread):
2337         (WebCore::CurlDownload::CurlDownload):
2338         (WebCore::CurlDownload::start):
2339         (WebCore::CurlDownload::didReceiveHeader):
2340         (WebCore::CurlDownload::didReceiveData):
2341         * platform/network/curl/CurlDownload.h:
2342         (WebCore::CurlDownloadListener::didFail):
2343         (WebCore::CurlDownload::setListener):
2344
2345 2015-07-27  Matthew Daiter  <mdaiter@apple.com>
2346
2347         Remove duplicate vectors inside of UserMediaRequest
2348         https://bugs.webkit.org/show_bug.cgi?id=147321
2349         <rdar://problem/22011290>
2350
2351         Reviewed by Eric Carlson.
2352
2353         * Modules/mediastream/UserMediaRequest.h:
2354         (WebCore::UserMediaRequest::deviceUIDsVideo): Deleted.
2355         (WebCore::UserMediaRequest::deviceUIDsAudio): Deleted.
2356
2357 2015-07-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2358
2359         [GTK] Pass a GstInstallPluginsContext to gst_install_plugins_async
2360         https://bugs.webkit.org/show_bug.cgi?id=147103
2361
2362         Reviewed by Philippe Normand.
2363
2364         * platform/graphics/gstreamer/GUniquePtrGStreamer.h: Allow to use
2365         GUniquePtr with GstInstallPluginsContext.
2366
2367 2015-07-25  Alexey Proskuryakov  <ap@apple.com>
2368
2369         Remove an never failing check for client() in ResourceHandle::canAuthenticateAgainstProtectionSpace.
2370
2371         Requested by Brady Eidson in bug 147277.
2372
2373         * platform/network/mac/ResourceHandleMac.mm:
2374         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
2375
2376 2015-07-25  Tim Horton  <timothy_horton@apple.com>
2377
2378         Expose TextIndicator-backed snapshot and rect gathering on DOMNode
2379         https://bugs.webkit.org/show_bug.cgi?id=147298
2380         <rdar://problem/21905839>
2381
2382         Reviewed by Sam Weinig.
2383
2384         * bindings/objc/DOM.mm:
2385         (-[DOMNode getPreviewSnapshotImage:andRects:]):
2386         No need to multiply by device scale here.
2387
2388 2015-07-25  Tim Horton  <timothy_horton@apple.com>
2389
2390         Expose TextIndicator-backed snapshot and rect gathering on DOMNode
2391         https://bugs.webkit.org/show_bug.cgi?id=147298
2392         <rdar://problem/21905839>
2393
2394         * bindings/objc/DOM.mm:
2395         (-[DOMNode getPreviewSnapshotImage:andRects:]):
2396         * bindings/objc/DOMExtensions.h:
2397         * bindings/objc/DOMPrivate.h:
2398         Move this to a private header.
2399
2400 2015-07-25  Tim Horton  <timothy_horton@apple.com>
2401
2402         Expose TextIndicator-backed snapshot and rect gathering on DOMNode
2403         https://bugs.webkit.org/show_bug.cgi?id=147298
2404         <rdar://problem/21905839>
2405
2406         Reviewed by Sam Weinig.
2407
2408         * bindings/objc/DOM.mm:
2409         (-[DOMNode getPreviewSnapshotImage:andRects:]):
2410         * bindings/objc/DOMExtensions.h:
2411
2412 2015-07-25  Ryosuke Niwa  <rniwa@webkit.org>
2413
2414         Another build fix. Removed the unused argument.
2415
2416         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2417         (PlatformCALayer::setTileSize):
2418
2419 2015-07-25  Ryosuke Niwa  <rniwa@webkit.org>
2420
2421         iOS build fix after r187384.
2422
2423         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2424         (PlatformCALayer::setTileSize):
2425
2426 2015-07-25  Chris Fleizach  <cfleizach@apple.com>
2427
2428         AX: iOS: Video "start playback" playback controls not accessible
2429         https://bugs.webkit.org/show_bug.cgi?id=147285
2430
2431         Reviewed by Jer Noble.
2432
2433         The start playback control also needs the right label.
2434
2435         * Modules/mediacontrols/mediaControlsiOS.js:
2436         (ControllerIOS.prototype.createBase):
2437
2438 2015-07-24  Tim Horton  <timothy_horton@apple.com>
2439
2440         Remove a file that was accidentally added in r142320
2441
2442         * PlatformMac.cmake:
2443         * platform/mac/PlatformSpeechSynthesisMac.mm: Removed.
2444         It looks like Chris added PlatformSpeechSynthesisMac and
2445         PlatformSpeechSynthesizerMac but only meant to add the latter.
2446
2447 2015-07-24  Tim Horton  <timothy_horton@apple.com>
2448
2449         Remove a file that was supposed to be removed in r158096
2450
2451         * platform/graphics/mac/WebTiledLayer.h: Removed.
2452         * platform/graphics/mac/WebTiledLayer.mm: Removed.
2453
2454 2015-07-24  Jinwoo Song  <jinwoo7.song@samsung.com>
2455
2456         [EFL] Build fix in ProtectionSpaceBase.cpp
2457         https://bugs.webkit.org/show_bug.cgi?id=147289
2458
2459         Reviewed by Brent Fulgham.
2460
2461         Fix the build break for [-Werror=return-type] error.
2462
2463         * platform/network/ProtectionSpaceBase.cpp:
2464         (WebCore::ProtectionSpaceBase::isPasswordBased):
2465
2466 2015-07-24  Myles C. Maxfield  <mmaxfield@apple.com>
2467
2468         text-overflow: ellipsis is broken by text-align: right and padding-left
2469         https://bugs.webkit.org/show_bug.cgi?id=121902
2470
2471         Reviewed by Zalan Bujtas.
2472
2473         Right offsets (which include padding) are not the same as widths (which don't).
2474
2475         Test: fast/inline/padding-ellipsis-right.html
2476
2477         * rendering/RenderBlockLineLayout.cpp:
2478         (WebCore::updateLogicalWidthForRightAlignedBlock):
2479         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
2480
2481 2015-07-24  Dan Bernstein  <mitz@apple.com>
2482
2483         Tried to fix the iOS 9 build after r187375.
2484
2485         * platform/network/mac/CookieJarMac.mm:
2486
2487 2015-07-24  Sajid Anwar  <sajidanwar94@gmail.com>
2488
2489         [MSE] Incorrect sample timestamps when using "sequence" mode
2490         https://bugs.webkit.org/show_bug.cgi?id=147252
2491
2492         Reviewed by Jer Noble.
2493
2494         Test: media/media-source/media-source-sequence-timestamps.html
2495
2496         According to the specification, the "sequence" mode indicates that the samples in the buffer will use generated timestamps
2497         instead of the presentation/decode timestamps already present in the sample. The current implementation always adds
2498         the current timestamp offset to the samples' timestamps, as expected for "segments" mode.
2499
2500         Add a method to media samples to allow their presentation and decode timestamps to be set to specific values.
2501
2502         * Modules/mediasource/SourceBuffer.cpp:
2503         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Fix an algorithm condition to align with the specification, and
2504             correctly set the presentation and decode timestamps of samples when in "sequence" mode.
2505         * platform/MediaSample.h:
2506         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2507         (WebCore::MediaSampleAVFObjC::setTimestamps): Add a new method to set the values of a sample's presentation and decode timestamps.
2508         * platform/mock/mediasource/MockBox.h:
2509         (WebCore::MockBox::setTimestamps): Set m_presentationTimestamp and m_decodeTimestamp.
2510         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2511         (WebCore::MockMediaSample::offsetTimestampsBy): Pass to MockBox.
2512         * testing/Internals.cpp:
2513         (WebCore::Internals::setShouldGenerateTimestamps): Expose the internal `setShouldGenerateTimestamps` method of SourceBuffer.
2514         * testing/Internals.h:
2515         * testing/Internals.idl:
2516
2517 2015-07-24  Anders Carlsson  <andersca@apple.com>
2518
2519         WKWebsiteDataStore remove methods don't properly delete cookies
2520         https://bugs.webkit.org/show_bug.cgi?id=147282
2521         rdar://problem/21948230
2522
2523         Reviewed by Sam Weinig.
2524
2525         Rename deleteCookiesForHostname to deleteCookiesForHostnames and
2526         make it take a vector of hostnames instead.
2527         
2528         Also, fix the Mac implementation to not be O(n2) by putting all cookies
2529         in a dictionary keyed on the domain.
2530         
2531         Also make sure to call _saveStorage after deleting cookies.
2532         
2533         Finally, get rid of deleteCookiesForHostname from CookieJarCFNet.cpp and
2534         use the Mac implementation on iOS as well. Just stub out deleteCookiesForHostnames
2535         on Windows since nobody is calling it.
2536
2537         * platform/network/PlatformCookieJar.h:
2538         * platform/network/cf/CookieJarCFNet.cpp:
2539         (WebCore::deleteCookiesForHostnames):
2540         (WebCore::deleteCookiesForHostname): Deleted.
2541         * platform/network/mac/CookieJarMac.mm:
2542         (WebCore::deleteCookiesForHostnames):
2543         (WebCore::deleteAllCookiesModifiedSince):
2544         (WebCore::deleteCookiesForHostname): Deleted.
2545         * platform/network/soup/CookieJarSoup.cpp:
2546         (WebCore::deleteCookiesForHostnames):
2547         (WebCore::deleteCookiesForHostname): Deleted.
2548         * platform/spi/cf/CFNetworkSPI.h:
2549
2550 2015-07-24  Chris Fleizach  <cfleizach@apple.com>
2551
2552         AX: scrollable elements do not allow 3-finger swipe
2553         https://bugs.webkit.org/show_bug.cgi?id=141893
2554
2555         Reviewed by Mario Sanchez Prada.
2556
2557         To allow iOS Accessibility to perform by-page scrolling in overflow areas, we move
2558         that scrolling code into AccessibilityObject and then iterate all the possible ScrollableAreas,
2559         rather than just finding the parents that are ScrollViews. 
2560
2561         Test: platform/ios-simulator/accessibility/scroll-in-overflow-div.html
2562
2563         * accessibility/AccessibilityObject.cpp:
2564         (WebCore::AccessibilityObject::scrollAreaAndAncestor):
2565         (WebCore::AccessibilityObject::scrollPosition):
2566         (WebCore::AccessibilityObject::scrollVisibleContentRect):
2567         (WebCore::AccessibilityObject::scrollContentsSize):
2568         (WebCore::AccessibilityObject::scrollByPage):
2569         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2570         (-[WebAccessibilityObjectWrapper accessibilityScroll:]):
2571         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2572         (-[WebAccessibilityObjectWrapper _accessibilityScrollPosition]):
2573         (-[WebAccessibilityObjectWrapper _accessibilityScrollSize]):
2574         (-[WebAccessibilityObjectWrapper _accessibilityScrollVisibleRect]):
2575         (-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]):
2576
2577 2015-07-24  Brent Fulgham  <bfulgham@apple.com>
2578
2579         [Win] Connect UserScript and UserStyleSheet through WebView.
2580         https://bugs.webkit.org/show_bug.cgi?id=147279
2581         <rdar://problem/21990767>
2582
2583         Reviewed by Dean Jackson.
2584
2585         Tested by http/tests/security/contentSecurityPolicy/user-style-sheet-font-crasher.html as well
2586         as many skipped tests.
2587
2588         * DerivedSources.cpp: Conditionally compile JSSecurityPolicyViolationEvent.cpp if CSP_NEXT is enabled.
2589         * DerivedSources.make: Generate bindings for SecurityPolicyViolationEvent.idl.
2590         * WebCore.vcxproj/WebCore.vcxproj: Add missing files.
2591         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2592
2593 2015-07-24  Alexey Proskuryakov  <ap@apple.com>
2594
2595         [Cocoa] Clean up server trust handling in ResourceHandle.
2596         https://bugs.webkit.org/show_bug.cgi?id=147277
2597         rdar://problem/21394410
2598
2599         Reviewed by Brady Eidson.
2600
2601         * platform/network/ProtectionSpaceBase.h: (WebCore::ProtectionSpaceBase::isPasswordBased):
2602         * platform/network/ProtectionSpaceBase.cpp: (WebCore::ProtectionSpaceBase::isPasswordBased):
2603         Added. This is somewhat weak, as authentication schemes could change, but I couldn't find
2604         any better way.
2605
2606         * platform/network/ResourceHandle.h:
2607         * platform/network/cf/ResourceHandleCFNet.cpp:
2608         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2609         (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
2610         * platform/network/mac/ResourceHandleMac.mm:
2611         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2612         (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
2613         Factored out password handling, and made sure to not try that for server trust.
2614
2615 2015-07-24  Zalan Bujtas  <zalan@apple.com>
2616
2617         [iOS]: Inline video controls are blurry on scaled-down pages on non-retina devices.
2618         https://bugs.webkit.org/show_bug.cgi?id=147272
2619         rdar://problem/21429111
2620
2621         Reviewed by Simon Fraser.
2622
2623         Blurry inline video controls are the result of transform scaling up the content when the page
2624         is zoomed out (page scale > 1).
2625         This patch addresses the blurriness by switching to css zoom when the content is being scaled up.
2626         While transform scale is a paint time operation, css zoom triggers layout and the content is getting
2627         painted on a non-scaled graphics context.
2628
2629         * Modules/mediacontrols/mediaControlsiOS.css:
2630         (audio::-webkit-media-controls-timeline-container):
2631         * Modules/mediacontrols/mediaControlsiOS.js:
2632         (ControllerIOS.prototype.set pageScaleFactor):
2633
2634 2015-07-24  Alexey Proskuryakov  <ap@apple.com>
2635
2636         Remove WEBCORE_EXPORT from Page::allowsMediaDocumentInlinePlayback()
2637         https://bugs.webkit.org/show_bug.cgi?id=147260
2638
2639         Reviewed by Daniel Bates.
2640
2641         * page/Page.h:
2642         (WebCore::Page::allowsMediaDocumentInlinePlayback):
2643
2644 2015-07-24  Yusuke Suzuki  <utatane.tea@gmail.com>
2645
2646         Object.getOwnPropertySymbols on large list takes very long
2647         https://bugs.webkit.org/show_bug.cgi?id=146137
2648
2649         Reviewed by Mark Lam.
2650
2651         * bindings/js/Dictionary.cpp:
2652         (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
2653         (WebCore::Dictionary::getOwnPropertyNames):
2654         * bindings/js/SerializedScriptValue.cpp:
2655         (WebCore::CloneSerializer::serialize):
2656         * bridge/NP_jsobject.cpp:
2657         (_NPN_Enumerate):
2658
2659 2015-07-24  David Kilzer  <ddkilzer@apple.com>
2660
2661         REGRESSION (r187149): Build fails when CSS_SELECTORS_LEVEL4 is disabled
2662
2663         This is a follow-up fix to:
2664             [CSS Selectors Level 4] Add #ifdefs to the new '>>' descendant combinator
2665             <https://bugs.webkit.org/show_bug.cgi?id=147184>
2666
2667         * css/CSSParserValues.cpp:
2668         (WebCore::CSSParserSelector::appendTagHistory):
2669         * css/CSSParserValues.h:
2670         * css/CSSSelector.h:
2671         - Change ENABLE_CSS_SELECTORS_LEVEL4 to
2672           ENABLE(CSS_SELECTORS_LEVEL4).
2673
2674 2015-07-24  Devin Rousso  <drousso@apple.com>
2675
2676         Web Inspector: Editing non-inspector-stylesheet rule selectors fails after the first change
2677         https://bugs.webkit.org/show_bug.cgi?id=147229
2678
2679         Reviewed by Timothy Hatcher.
2680
2681         Test: inspector/css/modify-rule-selector.html
2682
2683         * inspector/InspectorStyleSheet.cpp:
2684         (WebCore::InspectorStyleSheet::setRuleSelector):
2685         Now checks to see if the stylesheet is not mutated before making the change to the
2686         rule's selector, and if so mark it as not mutated to allow future edits.
2687
2688 2015-07-24  Joseph Pecoraro  <pecoraro@apple.com>
2689
2690         CSS "content" property is missing in getComputedStyles
2691         https://bugs.webkit.org/show_bug.cgi?id=147255
2692
2693         Reviewed by Simon Fraser.
2694
2695         * css/CSSComputedStyleDeclaration.cpp:
2696
2697 2015-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2698
2699         [GStreamer] Crashes during plugin installation
2700         https://bugs.webkit.org/show_bug.cgi?id=144099
2701
2702         Reviewed by Philippe Normand.
2703
2704         Add new methods to MediaPlayerClient and ChromeClient to request
2705         the API layer to start the installer when there are missing media
2706         plugins.
2707
2708         * html/HTMLMediaElement.cpp:
2709         (WebCore::HTMLMediaElement::requestInstallMissingPlugins): Pass
2710         the request to the ChromeClient.
2711         * html/HTMLMediaElement.h:
2712         * page/ChromeClient.h:
2713         * platform/graphics/MediaPlayer.h:
2714         (WebCore::MediaPlayerClient::requestInstallMissingPlugins):
2715         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2716         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
2717         Invalidate any pending request to install missing media plugins.
2718         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): In case of
2719         missing plugins message, start a request to install them if
2720         supported by GST.
2721         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2722         (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::create):
2723         (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::MediaPlayerRequestInstallMissingPluginsCallback):
2724         (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::invalidate):
2725         (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::complete):
2726
2727 2015-07-23  Alex Christensen  <achristensen@webkit.org>
2728
2729         [Win] Unreviewed build fix after r187245.
2730
2731         * PlatformWin.cmake:
2732         Add GDIUtilities.cpp to CMake build.
2733
2734 2015-07-23  Matthew Daiter  <mdaiter@apple.com>
2735
2736         Linking WebKit2 to be able to grab media sources from a UID
2737         https://bugs.webkit.org/show_bug.cgi?id=147202
2738         <rdar://problem/21947608>
2739
2740         Reviewed by Brent Fulgham.
2741
2742         * WebCore.xcodeproj/project.pbxproj:
2743         * platform/mediastream/RealtimeMediaSourceCenter.h:
2744         * platform/mediastream/mac/AVCaptureDeviceManager.h:
2745         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2746         (WebCore::AVCaptureDeviceManager::sourceWithUID):
2747         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2748         (WebCore::RealtimeMediaSourceCenterMac::sourceWithUID):
2749         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
2750         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
2751         (WebCore::RealtimeMediaSourceCenterOwr::sourceWithUID):
2752         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
2753         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
2754         (WebCore::MockRealtimeMediaSourceCenter::sourceWithUID):
2755         * platform/mock/MockRealtimeMediaSourceCenter.h:
2756
2757 2015-07-23  Alex Christensen  <achristensen@webkit.org>
2758
2759         Remove compile and runtime flags for promises.
2760         https://bugs.webkit.org/show_bug.cgi?id=147244
2761
2762         Reviewed by Yusuke Suzuki.
2763
2764         * Configurations/FeatureDefines.xcconfig:
2765         * bindings/js/JSDOMPromise.cpp:
2766         (WebCore::rejectPromiseWithExceptionIfAny):
2767         * bindings/js/JSDOMPromise.h:
2768
2769 2015-07-23  Nan Wang  <n_wang@apple.com>
2770
2771         AX: AccessibilityNodeObject::childrenChanged() generates too many AXLiveRegionChanged notifications
2772         https://bugs.webkit.org/show_bug.cgi?id=147211
2773         <rdar://problem/19908029>
2774
2775         Reviewed by Chris Fleizach.
2776
2777         AccessibilityNodeObject::childrenChanged() can be called repeatedly, generating a live region
2778         change notification each time. Sometimes, so many happen that VoiceOver hangs. We can use a timer
2779         to make sure that we coalesce these notifications.
2780
2781         Test: platform/mac/accessibility/aria-multiple-liveregions-notification.html
2782
2783         * accessibility/AXObjectCache.cpp:
2784         (WebCore::AXComputedObjectAttributeCache::getIgnored):
2785         (WebCore::AXObjectCache::AXObjectCache):
2786         (WebCore::AXObjectCache::~AXObjectCache):
2787         (WebCore::AXObjectCache::frameLoadingEventNotification):
2788         (WebCore::AXObjectCache::postLiveRegionChangeNotification):
2789         (WebCore::AXObjectCache::liveRegionChangedNotificationPostTimerFired):
2790         (WebCore::AXObjectCache::handleScrollbarUpdate):
2791         * accessibility/AXObjectCache.h:
2792         * accessibility/AccessibilityNodeObject.cpp:
2793         (WebCore::AccessibilityNodeObject::childrenChanged):
2794
2795 2015-07-23  Timothy Horton  <timothy_horton@apple.com>
2796
2797         [iOS] Frame snapshots don't factor in page scale
2798         https://bugs.webkit.org/show_bug.cgi?id=147239
2799         <rdar://problem/21905756>
2800
2801         Reviewed by Simon Fraser.
2802
2803         * page/FrameSnapshotting.cpp:
2804         (WebCore::snapshotFrameRect):
2805         Apply page scale when determining the backing store size and setting up the context.
2806
2807         * page/TextIndicator.cpp:
2808         (WebCore::TextIndicator::createWithSelectionInFrame):
2809         Don't assume snapshotFrameRect gave us an image with scale=deviceScale, because it
2810         will factor in the pageScale too.
2811
2812         * platform/graphics/ImageBuffer.h:
2813         (WebCore::ImageBuffer::resolutionScale):
2814         Expose resolutionScale.
2815
2816         * rendering/RenderLayerCompositor.cpp:
2817         (WebCore::RenderLayerCompositor::addToOverlapMap):
2818         This has been true for a long time.
2819
2820 2015-07-23  Jon Davis  <jond@apple.com>
2821
2822         Adding Web Components to feature status page.
2823         https://bugs.webkit.org/show_bug.cgi?id=147209
2824
2825         Reviewed by Timothy Hatcher.
2826
2827         * features.json:
2828
2829 2015-07-21  Jer Noble  <jer.noble@apple.com>
2830
2831         Notify the UI delegate when a MediaDocument's natural size changes
2832         https://bugs.webkit.org/show_bug.cgi?id=147182
2833
2834         Reviewed by Simon Fraser.
2835
2836         Notify the MediaDocument that it's underlying media element has changed its natural size, either when
2837         the media engine notifies us that the size changed, or when the ready state progresses to HAVE_METADATA.
2838
2839         * html/HTMLMediaElement.cpp:
2840         (WebCore::HTMLMediaElement::setReadyState): Notify the media document.
2841         (WebCore::HTMLMediaElement::mediaPlayerSizeChanged): Ditto.
2842         * html/MediaDocument.cpp:
2843         (WebCore::MediaDocument::mediaElementNaturalSizeChanged): Pass to the chrome client.
2844         * html/MediaDocument.h:
2845         * page/ChromeClient.h:
2846
2847 2015-07-22  Simon Fraser  <simon.fraser@apple.com>
2848
2849         Layer z-ordering is incorrect when scrolling on page witih position:fixed
2850         https://bugs.webkit.org/show_bug.cgi?id=147220
2851         rdar://problem/15849697&21929247
2852
2853         Reviewed by Dean Jackson.
2854
2855         Overlap testing for compositing uses the currently laid out position of fixed
2856         elements, without taking into account the fact that async scrolling can move
2857         them around, and possibly under other non-composited elements. This manifested
2858         as position:fixed elements moving over other elements on some pages when
2859         scrolling, when they should have moved behind.
2860         
2861         Fix by expanding the overlap map entry for position:fixed elements to create
2862         an rect for the area they cover at all scroll locations, taking min and max
2863         scroll offsets into account.
2864         
2865         Also add a couple more LOG(Compositing) statements.
2866
2867         Tests: compositing/layer-creation/fixed-overlap-extent-rtl.html
2868                compositing/layer-creation/fixed-overlap-extent.html
2869
2870         * rendering/RenderLayerCompositor.cpp:
2871         (WebCore::fixedPositionOffset):
2872         (WebCore::RenderLayerCompositor::computeExtent):
2873         (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):
2874         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
2875
2876 2015-07-23  Jer Noble  <jer.noble@apple.com>
2877
2878         Relax media playback restrictions if the allowsMediaDocumentInlinePlayback property is set.
2879         https://bugs.webkit.org/show_bug.cgi?id=147234
2880
2881         Reviewed by Darin Adler.
2882
2883         * html/HTMLMediaElement.cpp:
2884         (WebCore::HTMLMediaElement::prepareForLoad): Moved restriction check into MediaElementSession.
2885         * html/MediaElementSession.cpp:
2886         (WebCore::MediaElementSession::playbackPermitted): Check if is a top-level media document and if
2887             allowsMediaDocumentInilnePlayback is set, and return early.
2888         (WebCore::MediaElementSession::effectivePreloadForElement): Ditto.
2889         (WebCore::MediaElementSession::allowsAutomaticMediaDataLoading): Ditto.
2890         * html/MediaElementSession.h:
2891
2892 2015-07-23  Matthew Daiter  <mdaiter@apple.com>
2893
2894         Bridged passing lists of devices between the UIProcess and the WebProcess
2895         https://bugs.webkit.org/show_bug.cgi?id=147056
2896         <rdar://problem/21883094>
2897
2898         Reviewed by Brent Fulgham.
2899
2900         * Modules/mediastream/UserMediaRequest.h: Added fields to store and
2901         retrieve lists of devices
2902         (WebCore::UserMediaRequest::deviceUIDsVideo):
2903         (WebCore::UserMediaRequest::deviceUIDsAudio):
2904
2905 2015-07-19  Matt Rajca  <mrajca@apple.com>
2906
2907         Media Session: add support for ducking media elements
2908         https://bugs.webkit.org/show_bug.cgi?id=147089
2909
2910         Reviewed by Eric Carlson.
2911
2912         Test: media/session/transient-interruptions.html
2913
2914         * Modules/mediasession/MediaSession.cpp:
2915         (WebCore::MediaSession::handleDuckInterruption): Duck the active media elements.
2916         (WebCore::MediaSession::handleUnduckInterruption): Unduck the active media elements.
2917         * html/HTMLMediaElement.cpp:
2918         (WebCore::HTMLMediaElement::updateVolume): Lower the volume of media elements to 25% when ducked (constant determined empirically).
2919         (WebCore::HTMLMediaElement::setShouldDuck): Call updateVolume to change the volume of the underlying media player.
2920         * html/HTMLMediaElement.h:
2921
2922 2015-07-23  Matt Rajca  <mrajca@apple.com>
2923
2924         Media Session: add infrastructure for testing ducking https://bugs.webkit.org/show_bug.cgi?id=147080
2925
2926         Reviewed by Jer Noble.
2927
2928         We need to expose a media element's underlying media player's volume to tests so we can test ducking.
2929
2930         * html/HTMLMediaElement.cpp:
2931         (WebCore::HTMLMediaElement::playerVolume):
2932         * html/HTMLMediaElement.h:
2933         * testing/Internals.cpp:
2934         (WebCore::Internals::mediaElementPlayerVolume):
2935         * testing/Internals.h:
2936         * testing/Internals.idl:
2937
2938 2015-07-21  Jer Noble  <jer.noble@apple.com>
2939
2940         [iOS] Add an explicit API to allow media documents to (temporarily) play inline
2941         https://bugs.webkit.org/show_bug.cgi?id=147181
2942
2943         Reviewed by Beth Dakin.
2944
2945         Add listeners for the new allowsMediaDocumentInlinePlayback API. When this value becomes
2946         NO, force any playing MediaDocuments to enter fullscreen mode.
2947
2948         * dom/Document.cpp:
2949         (WebCore::Document::registerForAllowsMediaDocumentInlinePlaybackChangedCallbacks): Added registration method.
2950         (WebCore::Document::unregisterForAllowsMediaDocumentInlinePlaybackChangedCallbacks): Added deregistration method.
2951         (WebCore::Document::allowsMediaDocumentInlinePlaybackChanged): Notify all listeners.
2952         * dom/Document.h:
2953         * html/HTMLMediaElement.cpp:
2954         (WebCore::HTMLMediaElement::registerWithDocument): Listen for allowsMediaDocumentInlinePlayback changes.
2955         (WebCore::HTMLMediaElement::unregisterWithDocument): Stop listening to same.
2956         (WebCore::HTMLMediaElement::allowsMediaDocumentInlinePlaybackChanged): Enter fullscreen mode if the value
2957             changes to false during playback.
2958         * html/HTMLMediaElement.h:
2959         * html/MediaElementSession.cpp:
2960         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): Early true if the override value is set.
2961         * page/Page.cpp:
2962         (WebCore::Page::setAllowsMediaDocumentInlinePlayback): Notify all documents of the changed value.
2963         * page/Page.h:
2964         (WebCore::Page::allowsMediaDocumentInlinePlayback): Simple getter.
2965
2966 2015-07-23  Devin Rousso  <drousso@apple.com>
2967
2968         Web Inspector: Add a function to CSSCompletions to get a list of supported system fonts
2969         https://bugs.webkit.org/show_bug.cgi?id=147009
2970
2971         Reviewed by Joseph Pecoraro.
2972
2973         Test: inspector/css/get-system-fonts.html
2974
2975         * inspector/InspectorCSSAgent.cpp:
2976         (WebCore::InspectorCSSAgent::getSupportedSystemFontFamilyNames):
2977         Gets the list of system fonts (implemented in each platform) and returns that list.
2978         * inspector/InspectorCSSAgent.h:
2979         * platform/graphics/FontCache.h:
2980         * platform/graphics/freetype/FontCacheFreeType.cpp:
2981         (WebCore::FontCache::systemFontFamilies):
2982         * platform/graphics/ios/FontCacheIOS.mm:
2983         (WebCore::FontCache::systemFontFamilies):
2984         * platform/graphics/mac/FontCacheMac.mm:
2985         (WebCore::FontCache::systemFontFamilies):
2986         * platform/graphics/win/FontCacheWin.cpp:
2987         (WebCore::FontCache::systemFontFamilies):
2988
2989 2015-07-23  Brent Fulgham  <bfulgham@apple.com>
2990
2991         [Win] Implement High DPI support features
2992         https://bugs.webkit.org/show_bug.cgi?id=146335
2993         <rdar://problem/21558269>
2994
2995         Reviewed by Alex Christensen.
2996
2997         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2998         (WebCore::PlatformCALayerWinInternal::drawTile): Don't translate the CGContext to the position
2999         of the CACFLayerRef; the underlying context is already in the right position.
3000         * platform/win/PlatformMouseEventWin.cpp: Update class to adjust mouse
3001         event coordinates based on scaling factor.
3002         (WebCore::deviceScaleFactor):
3003         (WebCore::positionForEvent):
3004         * platform/win/ScrollbarThemeWin.cpp:
3005         (WebCore::scrollbarThicknessInPixels):
3006         (WebCore::ScrollbarThemeWin::scrollbarThickness):
3007         (WebCore::ScrollbarThemeWin::themeChanged):
3008         * platform/win/WheelEventWin.cpp: Update class to adjust wheel event
3009         coordinates based on scaling factor.
3010         (WebCore::deviceScaleFactor):
3011         (WebCore::positionForEvent):
3012         (WebCore::globalPositionForEvent):
3013         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3014
3015 2015-07-23  Myles C. Maxfield  <mmaxfield@apple.com>
3016
3017         REGRESSION(r182236): Justified Arabic text does not expand
3018         https://bugs.webkit.org/show_bug.cgi?id=147217
3019
3020         Reviewed by Simon Fraser.
3021
3022         When I was writing r182236, I got confused between the levels of the string hierarchy in ComplexTextController.
3023         I've added a comment in the header which should make it easier to get it right.
3024
3025         Test: fast/text/international/arabic-justify.html
3026
3027         * platform/graphics/mac/ComplexTextController.cpp:
3028         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
3029         * platform/graphics/mac/ComplexTextController.h:
3030
3031 2015-07-23  Tim Horton  <timothy_horton@apple.com>
3032
3033         Fix the build for __IPHONE_OS_VERSION_MIN_REQUIRED <= 80200 || !HAVE(AVKIT)
3034
3035         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3036         (elementRectInWindow):
3037         This helper is only used in the #else block, so move it there.
3038
3039 2015-07-23  Timothy Horton  <timothy_horton@apple.com>
3040
3041         Try to fix the build
3042
3043         * platform/spi/cocoa/QuartzCoreSPI.h:
3044
3045 2015-07-22  Sukolsak Sakshuwong  <sukolsak@gmail.com>
3046
3047         Add ENABLE_WEBASSEMBLY feature flag for WebAssembly
3048         https://bugs.webkit.org/show_bug.cgi?id=147212
3049
3050         Reviewed by Filip Pizlo.
3051
3052         No new tests.
3053
3054         * Configurations/FeatureDefines.xcconfig:
3055
3056 2015-07-22  Tim Horton  <timothy_horton@apple.com>
3057
3058         Try to fix the build
3059
3060         * platform/spi/cocoa/QuartzCoreSPI.h:
3061
3062 2015-07-22  James Savage  <james.savage@apple.com>
3063
3064         Use updated CoreAnimation snapshot SPI.
3065         https://bugs.webkit.org/show_bug.cgi?id=147197
3066         <rdar://problem/21032083>
3067
3068         Reviewed by Tim Horton.
3069         Patch by James Savage.
3070
3071         * platform/spi/cocoa/QuartzCoreSPI.h:
3072
3073 2015-07-22  Joseph Pecoraro  <pecoraro@apple.com>
3074
3075         Web Inspector: Timeline should immediately start moving play head when starting a new recording
3076         https://bugs.webkit.org/show_bug.cgi?id=147210
3077
3078         Reviewed by Timothy Hatcher.
3079
3080         Test: inspector/timeline/recording-start-stop-timestamps.html
3081
3082         * inspector/InspectorTimelineAgent.cpp:
3083         (WebCore::InspectorTimelineAgent::internalStart):
3084         (WebCore::InspectorTimelineAgent::internalStop):
3085         Include the current timestamp when starting / stopping a recording.
3086
3087 2015-07-22  Wenson Hsieh  <wenson_hsieh@apple.com>
3088
3089         Coordinates-based snap offsets don't update correctly when container is scrolled
3090         https://bugs.webkit.org/show_bug.cgi?id=147215
3091
3092         Reviewed by Brent Fulgham.
3093
3094         Fixes the way we append the snap offsets of child elements with coordinates. We
3095         now consider the scroll offset of the parent scroll snapping container, so snap
3096         offset recomputations don't fail on scroll snapping containers.
3097
3098         Test: css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html
3099
3100         * page/scrolling/AxisScrollSnapOffsets.cpp:
3101         (WebCore::appendChildSnapOffsets): Fixed to consider the scroll offset of the
3102             parent container.
3103
3104 2015-07-22  Matthew Daiter  <mdaiter@apple.com>
3105
3106         Needed to add methods to get PreviewCaptureLayers from Video
3107         https://bugs.webkit.org/show_bug.cgi?id=147011
3108         <rdar://problem/21861999>
3109
3110         Reviewed by Jer Noble.
3111
3112         * platform/mediastream/mac/AVVideoCaptureSource.h: Added in preview
3113         layer to class
3114         (WebCore::AVVideoCaptureSource::previewLayer):
3115         * platform/mediastream/mac/AVVideoCaptureSource.mm: Instantiate
3116         previewLayer on load
3117         (WebCore::AVVideoCaptureSource::setupCaptureSession):
3118
3119 2015-07-22  Sungmann Cho  <sungmann.cho@navercorp.com>
3120
3121         [EFL] The "Missing Plug-in" buttons are not showing up on some flash contents
3122         https://bugs.webkit.org/show_bug.cgi?id=147191
3123
3124         Reviewed by Gyuyoung Kim.
3125
3126         Currently, WebKitEFL doesn't show the "Missing Plug-in" buttons if the plugin-related tags
3127         don't have a "type" attribute. In such a case, WebCore tries to guess the MIME type from
3128         the extensions by using MIMETypeRegistry::getMIMETypeForExtension(). For WebKitEFL,
3129         MIMETypeRegistry::getMIMETypeForExtension() goes through |extensionMap|, which is a simple
3130         array of <extension, mime type>, looking for the mime type for the given extension.
3131         But |extensionMap| in MIMETypeRegistryEfl.cpp doesn't have the information for ".swf",
3132         so WebCore fails to guess the MIME type and regard the content type as ObjectContentFrame,
3133         not ObjectContentNetscapePlugin.
3134
3135         * platform/efl/MIMETypeRegistryEfl.cpp:
3136
3137 2015-07-22  Matthew Daiter  <mdaiter@apple.com>
3138
3139         Rank sources for fitness for UIDs in bestSourcesForTypeAndConstraints
3140         https://bugs.webkit.org/show_bug.cgi?id=147206
3141         <rdar://problem/21950653>
3142
3143         Reviewed by Jer Noble.
3144
3145         * platform/mediastream/RealtimeMediaSource.cpp:
3146         (WebCore::RealtimeMediaSource::RealtimeMediaSource):
3147         * platform/mediastream/RealtimeMediaSource.h:
3148         (WebCore::RealtimeMediaSource::fitnessScore):
3149         (WebCore::RealtimeMediaSource::setFitnessScore):
3150         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3151         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):
3152
3153 2015-07-22  Dean Jackson  <dino@apple.com>
3154
3155         Video controls, though hidden, are still interactive when in PiP
3156         https://bugs.webkit.org/show_bug.cgi?id=147216
3157         <rdar://problem/21012688>
3158
3159         Reviewed by Simon Fraser.
3160
3161         Explicitly add the PiP class to the controls container so that
3162         we can hang a pointer-events: none off it.
3163
3164         * Modules/mediacontrols/mediaControlsiOS.css:
3165         (video::-webkit-media-controls-panel.picture-in-picture): Add a pointer-events: none.
3166         * Modules/mediacontrols/mediaControlsiOS.js:
3167         (ControllerIOS.prototype.handlePresentationModeChange): Add/remove a PiP class
3168         to the controls panel when necessary.
3169
3170 2015-07-22  Commit Queue  <commit-queue@webkit.org>
3171
3172         Unreviewed, rolling out r187196.
3173         https://bugs.webkit.org/show_bug.cgi?id=147213
3174
3175         broke all the iOS builds (Requested by thorton on #webkit).
3176
3177         Reverted changeset:
3178
3179         "Use updated CoreAnimation snapshot SPI."
3180         https://bugs.webkit.org/show_bug.cgi?id=147197
3181         http://trac.webkit.org/changeset/187196
3182
3183 2015-07-22  James Savage  <james.savage@apple.com>
3184
3185         Use updated CoreAnimation snapshot SPI.
3186         https://bugs.webkit.org/show_bug.cgi?id=147197
3187
3188         Reviewed by Tim Horton.
3189
3190         * platform/spi/cocoa/QuartzCoreSPI.h:
3191
3192 2015-07-22  Dean Jackson  <dino@apple.com>
3193
3194         Out of bounds in WebGLRenderingContext::simulateVertexAttrib0
3195         https://bugs.webkit.org/show_bug.cgi?id=147176
3196         <rdar://problem/21567767>
3197
3198         Reviewed by Oliver Hunt.
3199
3200         Test: fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays.html
3201
3202         Add overflow checking for the drawing calls, specifically the way
3203         they may simulate vertexAttrib0.
3204
3205         * html/canvas/WebGLRenderingContextBase.cpp:
3206         (WebCore::WebGLRenderingContextBase::validateDrawArrays): Call new validation method.
3207         (WebCore::WebGLRenderingContextBase::validateDrawElements): Ditto.
3208         (WebCore::WebGLRenderingContextBase::validateSimulatedVertexAttrib0): New method that
3209         validates the parameters used to create the simulated attribute.
3210         (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): No need to do overflow
3211         checking here now that the validation method does it for us.
3212         (WebCore::WebGLRenderingContextBase::validateVertexAttributes): Deleted.
3213         * html/canvas/WebGLRenderingContextBase.h: Add new validation method.
3214
3215 2015-07-22  Joseph Pecoraro  <pecoraro@apple.com>
3216
3217         Web Inspector: AppCache manifest 404 doesn't produce errors in console, manifest resource request always loading indicator
3218         https://bugs.webkit.org/show_bug.cgi?id=147135
3219
3220         Reviewed by Alexey Proskuryakov.
3221
3222         * loader/appcache/ApplicationCacheGroup.cpp:
3223         (WebCore::ApplicationCacheGroup::didReceiveResponse):
3224         Always pass a document loader instead of passing null for the manifest request.
3225
3226         (WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
3227         Since we will be cancelling the resource handle ourselves in didReceiveResponse
3228         before receiving the didFail resource handle delegates, we should update the
3229         inspector about this resource load failing due to a cancel.
3230
3231         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
3232         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
3233         Update the MessageSource from "Other" to "AppCache".
3234
3235 2015-07-22  Jeremy Jones  <jeremyj@apple.com>
3236
3237         Fix fullscreen and PiP video animation and sizing regressions.
3238         https://bugs.webkit.org/show_bug.cgi?id=147189
3239         <rdar://problem/21930899>
3240
3241         Reviewed by Jer Noble.
3242
3243         Fixes WK1 specific regressions introduced by r187044. Flicker when entering fullscreen,
3244         wrong animation and missing initial animation rects.
3245
3246         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3247         (elementRectInWindow): Added.
3248         (WebVideoFullscreenControllerContext::didSetupFullscreen): Clear background decreases flash.
3249         (WebVideoFullscreenControllerContext::fullscreenMayReturnToInline): Use consistent inline rect.
3250         (WebVideoFullscreenControllerContext::setVideoLayerFrame): 
3251         Clear the transform on the web thread instead of on the UI thread.
3252         (WebVideoFullscreenControllerContext::setUpFullscreen): Use consistent inline rect.
3253         (WebVideoFullscreenControllerContext::exitFullscreen): Use consistent inline rect.
3254         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
3255         (-[WebAVPlayerLayer resolveBounds]): Clear transform after setting frame.
3256
3257 2015-07-22  Jeremy Jones  <jeremyj@apple.com>
3258
3259         Adopt AVKit's AVSimplePlayerLayerView change for PiP.
3260         https://bugs.webkit.org/show_bug.cgi?id=147186
3261         <rdar://problem/21928170>
3262
3263         Reviewed by Jer Noble.
3264
3265         Adopt AVKit changes by inheriting from UIView instead of from AVPictureInPicturePlayerLayerView.
3266
3267         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3268         (WebAVPlayerLayerView_layerClass): Style.
3269         (WebAVPlayerLayerView_playerController): Style.
3270         (WebAVPlayerLayerView_videoView): Style.
3271         (getWebAVPictureInPicturePlayerLayerViewClass): Inherit from UIView.
3272
3273 2015-07-22  Beth Dakin  <bdakin@apple.com>
3274
3275         Animated images should animate in previews
3276         https://bugs.webkit.org/show_bug.cgi?id=147173
3277         -and corresponding-
3278         rdar://problem/21637698
3279
3280         Reviewed by Dan Bernstein.
3281
3282         New virtual function to indicate whether or not the image is animated.
3283         * platform/graphics/BitmapImage.h:
3284         * platform/graphics/Image.h:
3285         (WebCore::Image::isAnimated):
3286
3287 2015-07-22  Jinyoung Hur  <hur.ims@navercorp.com>
3288
3289         [WinCairo] SVG path not rendered with all-zero dasharray
3290         https://bugs.webkit.org/show_bug.cgi?id=146997
3291
3292         Reviewed by Martin Robinson.
3293
3294         All-zero dash array should not be passed to cairo_set_dash() as an argument, because it will cause an internal Cairo error.
3295         Rather call cairo_set_dash() with num_dashes=0 to disable dash line.
3296
3297         Tests: fast/canvas/canvas-lineDash.html
3298                svg/custom/zero-dasharray.html
3299
3300         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3301         (WebCore::GraphicsContext::setLineDash):
3302
3303 2015-07-22  Wenson Hsieh  <wenson_hsieh@apple.com>
3304
3305         Search fields render placeholder text improperly.
3306         https://bugs.webkit.org/show_bug.cgi?id=147192
3307         <rdar://problem/21901076>
3308
3309         Reviewed by Alexey Proskuryakov.
3310
3311         Due to changes in the way AppKit renders search inputs, we must now explicitly
3312         set the placeholder text of a search input rendered using the Mac theme to be
3313         an empty string when rendering the search input box (not including the actual
3314         placeholder text).
3315
3316         * rendering/RenderThemeMac.mm:
3317         (WebCore::RenderThemeMac::setSearchCellState): Force the placeholder text of
3318             the NSSearchFieldCell for the Mac theme to be an empty string.
3319
3320 2015-07-22  Matthew Daiter  <mdaiter@apple.com>
3321
3322         Need the ability to give only best source UIDs to UserMedia request
3323         https://bugs.webkit.org/show_bug.cgi?id=147171
3324         <rdar://problem/21931121>
3325
3326         Reviewed by Eric Carlson.
3327
3328         * Modules/mediastream/UserMediaRequest.cpp:
3329         (WebCore::UserMediaRequest::constraintsValidated):
3330         * Modules/mediastream/UserMediaRequest.h:
3331         (WebCore::UserMediaRequest::videoDeviceUIDs):
3332         (WebCore::UserMediaRequest::audioDeviceUIDs):
3333         * platform/mediastream/MediaStreamCreationClient.h:
3334         * platform/mediastream/mac/AVCaptureDeviceManager.h:
3335         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3336         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):
3337         (WebCore::AVCaptureDeviceManager::bestSourceForTypeAndConstraints): Deleted.
3338         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
3339         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
3340         (WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
3341         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
3342         (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
3343
3344 2015-07-22  Mark Dittmer  <mark.s.dittmer@gmail.com>
3345
3346         Fix toJSDOMWindow() in the case of an object that has the actual JS DOM window in its prototype chain.
3347         https://bugs.webkit.org/show_bug.cgi?id=146785
3348
3349         Reviewed by Mark Lam.
3350
3351         * bindings/js/JSDOMWindowBase.cpp: toJSDOMWindow(): Walk the prototype chain of the given JSValue until a JSDOMWindow or JSDOMWindowShell is found.
3352
3353 2015-07-22  Matthew Daiter  <mdaiter@apple.com>
3354
3355         Remove revealing getVideoTracks() and getAudioTracks()
3356         https://bugs.webkit.org/show_bug.cgi?id=147126
3357         <rdar://problem/21908723>
3358
3359         Reviewed by Eric Carlson.
3360
3361         * Modules/mediastream/MediaStream.h:
3362         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
3363         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3364         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
3365         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Modded to use
3366         tracks() instead of getVideo/AudioTracks()
3367         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): Ditto
3368         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal): Ditto
3369         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pauseInternal): Ditto
3370         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted): Ditto
3371         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::naturalSize): Ditto
3372         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasVideo): Ditto
3373         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAudio): Ditto
3374         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentMediaTime):
3375         Changed to a FIXME
3376         * platform/mediastream/MediaStreamPrivate.h:
3377
3378 2015-07-22  Matthew Daiter  <mdaiter@apple.com>
3379
3380         Ensure MediaPlayerPrivateAVFoundation doesn't load MediaStreams
3381         https://bugs.webkit.org/show_bug.cgi?id=147119
3382         <rdar://problem/21904955>
3383
3384         Reviewed by Eric Carlson.
3385
3386         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: Set
3387         networkstate to error when loading MediaStreams
3388
3389 2015-07-22  Alex Christensen  <achristensen@webkit.org>
3390
3391         Fix quirks in CMake build on Mac and Windows
3392         https://bugs.webkit.org/show_bug.cgi?id=147174
3393
3394         Reviewed by Gyuyoung Kim.
3395
3396         * PlatformMac.cmake:
3397         Removed files that don't exist any more.
3398         * platform/win/WindowsTouch.h:
3399         Only use definitions of touch structures when compiling with VS2012.
3400
3401 2015-07-22  Csaba Osztrogonác  <ossy@webkit.org>
3402
3403         Fix cast-align warning in NetworkStateNotifierEfl.cpp
3404         https://bugs.webkit.org/show_bug.cgi?id=145915
3405
3406         Reviewed by Gyuyoung Kim.
3407
3408         * platform/network/efl/NetworkStateNotifierEfl.cpp:
3409         (WebCore::NetworkStateNotifier::readSocketCallback):
3410
3411 2015-07-22  Ryuan Choi  <ryuan.choi@navercorp.com>
3412
3413         [GTK][EFL] Remove dead functions in LocalizedStrings
3414         https://bugs.webkit.org/show_bug.cgi?id=147188
3415
3416         Reviewed by Csaba Osztrogonác.
3417
3418         * platform/efl/LocalizedStringsEfl.cpp:
3419         (WebCore::contextMenuItemTagHideMediaControls):
3420         (WebCore::contextMenuitemTagHideMediaControls): Fixed typo since r152117.
3421         (WebCore::inactivePluginText): Deleted since r151530.
3422         (WebCore::textTrackClosedCaptionsText): Deleted since r141864.
3423         * platform/gtk/LocalizedStringsGtk.cpp:
3424         (WebCore::inactivePluginText): Deleted since r151530.
3425         (WebCore::textTrackClosedCaptionsText): Deleted since r141864.
3426
3427 2015-07-21  Benjamin Poulain  <bpoulain@apple.com>
3428
3429         [CSS Selectors Level 4] Add #ifdefs to the new '>>' descendant combinator
3430         https://bugs.webkit.org/show_bug.cgi?id=147184
3431
3432         Reviewed by Anders Carlsson.
3433
3434         Now that '>>>' is dead, the combinator '>>' is at risk.
3435
3436         This patch #ifdef all that code with the other experimental
3437         features from Level 4.
3438
3439         * css/CSSGrammar.y.in:
3440         * css/CSSParserValues.cpp:
3441         (WebCore::CSSParserSelector::appendTagHistory):
3442         * css/CSSParserValues.h:
3443         * css/CSSSelector.cpp:
3444         (WebCore::CSSSelector::CSSSelector):
3445         (WebCore::CSSSelector::selectorText):
3446         * css/CSSSelector.h:
3447         (WebCore::CSSSelector::CSSSelector):
3448
3449 2015-07-21  Joseph Pecoraro  <pecoraro@apple.com>
3450
3451         Web Inspector: Node highlights are wrong when the page is zoomed
3452         https://bugs.webkit.org/show_bug.cgi?id=147177
3453
3454         Reviewed by Simon Fraser.
3455
3456         * inspector/InspectorOverlay.cpp:
3457         (WebCore::InspectorOverlay::update):
3458         Remove scaling that appears to no longer be needed, it was double
3459         scaling the overlay content and misplacing it in the process.
3460
3461 2015-07-21  Dean Jackson  <dino@apple.com>
3462
3463         Default media controls use a serif font, which seems wrong
3464         https://bugs.webkit.org/show_bug.cgi?id=147179
3465         <rdar://problem/21931728>
3466
3467         Reviewed by Simon Fraser.
3468
3469         The captions menu (and other text) should use a system style,
3470         -webkit-small-control.
3471
3472         * Modules/mediacontrols/mediaControlsApple.css:
3473         (::-webkit-media-controls):
3474
3475 2015-07-21  Matthew Daiter  <mdaiter@apple.com>
3476
3477         Exposed method to query device by UID
3478         https://bugs.webkit.org/show_bug.cgi?id=147117
3479         <rdar://problem/21904678>
3480
3481         Reviewed by Eric Carlson.
3482
3483         * platform/mediastream/mac/AVCaptureDeviceManager.h: Added method to
3484         query device by UID
3485         * platform/mediastream/mac/AVCaptureDeviceManager.mm: Ditto
3486         (WebCore::AVCaptureDeviceManager::sourceWithUID): Ditto
3487
3488 2015-07-21  Benjamin Poulain  <benjamin@webkit.org>
3489
3490         [Content Extensions] Use a jump table when consecutive transitions have different targets
3491         https://bugs.webkit.org/show_bug.cgi?id=147099
3492
3493         Reviewed by Alex Christensen.
3494
3495         When handling consecutive single transitions, merge them into
3496         a jump table instead of creating many individual CheckValue.
3497
3498         From local testing on x86_64, it reduces the bytecode size by about 5%
3499         and improve the runtime by about 10%.
3500
3501         * contentextensions/DFABytecode.h:
3502         (WebCore::ContentExtensions::instructionSizeWithArguments):
3503         * contentextensions/DFABytecodeCompiler.cpp:
3504         (WebCore::ContentExtensions::DFABytecodeCompiler::extractJumpTable):
3505         (WebCore::ContentExtensions::DFABytecodeCompiler::transitions):
3506         (WebCore::ContentExtensions::DFABytecodeCompiler::checkForJumpTableMaxBytecodeSize):
3507         (WebCore::ContentExtensions::DFABytecodeCompiler::compileJumpTable):
3508         (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
3509         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
3510         (WebCore::ContentExtensions::DFABytecodeCompiler::ranges): Deleted.
3511         * contentextensions/DFABytecodeCompiler.h:
3512         * contentextensions/DFABytecodeInterpreter.cpp:
3513         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpetJumpTable):
3514         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3515         * contentextensions/DFABytecodeInterpreter.h:
3516
3517 2015-07-21  Simon Fraser