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