[Mac][cmake] One more attempt to try to fix the build after r197633.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-03-18  Csaba Osztrogonác  <ossy@webkit.org>
2
3         [Mac][cmake] One more attempt to try to fix the build after r197633.
4
5         * PlatformMac.cmake:
6
7 2016-03-18  Csaba Osztrogonác  <ossy@webkit.org>
8
9         [Mac][cmake] One more attempt to try to fix the build after r197633.
10
11         * PlatformMac.cmake:
12
13 2016-03-18  Csaba Osztrogonác  <ossy@webkit.org>
14
15         [Mac][cmake] One more attempt to try to fix the build after r197633.
16
17         * PlatformMac.cmake: Revert r198398, which was incorrect.
18
19 2016-03-18  Csaba Osztrogonác  <ossy@webkit.org>
20
21         [Mac][cmake] Last attempt to try to fix the build after r197633.
22
23         * PlatformMac.cmake:
24
25 2016-03-18  Manuel Rego Casasnovas  <rego@igalia.com>
26
27         [css-grid] Rename GridSpan properties
28         https://bugs.webkit.org/show_bug.cgi?id=155636
29
30         Reviewed by Sergio Villar Senin.
31
32         GridSpan was using old names initialResolvedPosition and
33         finalResolvedPosition.
34         This patch rename them to startLine and endLine.
35
36         Some reasons for this refactoring:
37         - "position" is a vague term not defined in the spec.
38         - GridSpan is currently storing grid lines. A grid "line" is defined
39           in the spec: https://drafts.csswg.org/css-grid/#grid-line-concept
40         - The spec uses the concepts "start" and "end" lines too.
41
42         No new tests, no change of behavior.
43
44         * css/CSSGridTemplateAreasValue.cpp:
45         (WebCore::stringForPosition):
46         * css/CSSParser.cpp:
47         (WebCore::CSSParser::parseGridTemplateAreasRow):
48         * css/StyleBuilderConverter.h:
49         (WebCore::StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea):
50         * rendering/RenderGrid.cpp:
51         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
52         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
53         (WebCore::RenderGrid::insertItemIntoGrid):
54         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
55         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
56         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
57         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
58         (WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
59         (WebCore::RenderGrid::columnAxisOffsetForChild):
60         (WebCore::RenderGrid::rowAxisOffsetForChild):
61         * rendering/style/GridArea.h:
62         (WebCore::GridSpan::untranslatedDefiniteGridSpan):
63         (WebCore::GridSpan::translatedDefiniteGridSpan):
64         (WebCore::GridSpan::operator==):
65         (WebCore::GridSpan::integerSpan):
66         (WebCore::GridSpan::untranslatedStartLine):
67         (WebCore::GridSpan::untranslatedEndLine):
68         (WebCore::GridSpan::startLine):
69         (WebCore::GridSpan::endLine):
70         (WebCore::GridSpan::begin):
71         (WebCore::GridSpan::end):
72         (WebCore::GridSpan::translate):
73         (WebCore::GridSpan::GridSpan):
74         (WebCore::GridSpan::untranslatedResolvedInitialPosition): Deleted.
75         (WebCore::GridSpan::untranslatedResolvedFinalPosition): Deleted.
76         (WebCore::GridSpan::resolvedInitialPosition): Deleted.
77         (WebCore::GridSpan::resolvedFinalPosition): Deleted.
78         * rendering/style/GridPositionsResolver.cpp:
79         (WebCore::definiteGridSpanWithNamedLineSpanAgainstOpposite):
80         (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
81         (WebCore::resolveGridPositionAgainstOppositePosition):
82         (WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
83
84 2016-03-18  Csaba Osztrogonác  <ossy@webkit.org>
85
86         [Mac][cmake] One more unreviewed speculative buildfix after r197633. Just for fun.
87
88         * PlatformMac.cmake:
89
90 2016-03-18  Csaba Osztrogonác  <ossy@webkit.org>
91
92         [Mac][cmake] Unreviewed speculative buildfix after r197633. Just for fun.
93
94         * PlatformMac.cmake:
95
96 2016-03-18  Youenn Fablet  <youenn.fablet@crf.canon.fr>
97
98         crossorigin element resource loading should check HTTP redirection
99         https://bugs.webkit.org/show_bug.cgi?id=130578
100
101         Reviewed by Daniel Bates and Brent Fulgham.
102
103         Moved part of DocumentThreadableLoader redirection cross origin control code
104         into functions in CrossOriginAccessControl.cpp. Added cross origin control for
105         redirections in SubResourceLoader when policy is set to PotentiallyCrossOriginEnabled 
106         using CrossOriginAccessControl.cpp new functions. Added a new test that checks that 
107         cross-origin redirections are checked against CORS.
108
109         Test: http/tests/security/shape-image-cors-redirect.html
110
111         * loader/CrossOriginAccessControl.cpp:
112         (WebCore::isValidCrossOriginRedirectionURL): Returns true if the redirected URL is a valid URL for cross-origin requests.
113         (WebCore::cleanRedirectedRequestForAccessControl): Removes all headers added by the network backend that may cause the response CORS validation to fail.
114         * loader/CrossOriginAccessControl.h: Added above function prototypes.
115         * loader/DocumentThreadableLoader.cpp:
116         (WebCore::DocumentThreadableLoader::redirectReceived): Used new CORS redirection methods of CrossOriginAccessControl.cpp.
117         * loader/SubresourceLoader.cpp:
118         (WebCore::SubresourceLoader::init): Initialize the SecurityOrigin to be used for loading the resource.
119         (WebCore::SubresourceLoader::willSendRequest): Added cross-origin redirection response check.
120         (WebCore::SubresourceLoader::checkCrossOriginAccessControl): Checks CORS and update request if needed. Returns true if control checks passed.
121         * loader/SubresourceLoader.h: Added checkCrossOriginAccessControl declaration and m_origin declaration.
122
123 2016-03-18  Darin Adler  <darin@apple.com>
124
125         Disable Caches in Safari's Develop menu does not disable caches.
126         https://bugs.webkit.org/show_bug.cgi?id=64483
127
128         Reviewed by Antti Koivisto.
129
130         Add a new setting, ResourceCachingDisabled, for use in future versions of Safari.
131
132         * history/PageCache.cpp:
133         (WebCore::canCachePage): Check resourceCachingDisabled and return false.
134         (WebCore::PageCache::take): Check resourceCachingDisabled, and return null.
135         (WebCore::PageCache::get): Ditto.
136
137         * loader/FrameLoader.cpp:
138         (WebCore::FrameLoader::subresourceCachePolicy): Check resourceCachingDisabled, and
139         request a reload.
140         (WebCore::FrameLoader::addExtraFieldsToRequest): Check resourceCachingDisabled, and
141         set the cache policy to trigger a reload.
142         * loader/cache/CachedResourceLoader.cpp:
143         (WebCore::CachedResourceLoader::cachePolicy): Check resourceCachingDisabled, and
144         request a reload.
145
146         * page/Settings.in: Added resourceCachingDisabled.
147
148 2016-03-18  Csaba Osztrogonác  <ossy@webkit.org>
149
150         [Mac][cmake] Unreviewed speculative buildfix. Just for fun.
151
152         * loader/EmptyClients.cpp:
153
154 2016-03-17  Antti Koivisto  <antti@apple.com>
155
156         Data URL DecodeTask may get deleted outside main thread
157         https://bugs.webkit.org/show_bug.cgi?id=155584
158         rdar://problem/24492104
159
160         Reviewed by Darin Adler.
161
162         This is unsafe as it owns strings and other types that are only safe to delete in the main thread.
163
164         There is a race between deref in dispatch() and deref in timerFired(). If the timer fires before dispatch()
165         exits the implicit deref will trigger deletion of DecodingResultDispatcher in the dispatching thread.
166
167         (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
168
169             Fix by clearing m_decodeTask when the timer fires.
170
171 2016-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
172
173         REGRESSION(r195661): [GTK] very slow scrolling
174         https://bugs.webkit.org/show_bug.cgi?id=155334
175
176         Reviewed by Michael Catanzaro.
177
178         We need to also restore the PerAxisData visible length when it's
179         reset because of a non animated scroll. To prevent making the same
180         mistake in the future, the current position and visible lengths
181         members are now required to construct PerAxisData. This also
182         simplifies the code and ensures that when the ScrollAnimatorSmooth
183         is created, it's updated to the current position.
184
185         * platform/ScrollAnimationSmooth.cpp:
186         (WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
187         Initialize PerAxisData members.
188         (WebCore::ScrollAnimationSmooth::setCurrentPosition): Pass the
189         current position and visible length as parameters to the
190         PerAxisData constructor.
191         (WebCore::ScrollAnimationSmooth::animateScroll): Ditto.
192         * platform/ScrollAnimationSmooth.h: Add a PerAxisData constructor
193         that receives current position and visible length and disallow to
194         use the default constructor.
195         * platform/ScrollAnimatorSmooth.cpp:
196         (WebCore::ScrollAnimatorSmooth::ScrollAnimatorSmooth): Pass the
197         current position to the ScrollAnimationSmooth constructor.
198         * platform/gtk/ScrollAnimatorGtk.cpp:
199         (WebCore::ScrollAnimatorGtk::ensureSmoothScrollingAnimation): Ditto.
200
201 2016-03-17  Chris Fleizach  <cfleizach@apple.com>
202
203         AX: WEB: VoiceOver does not announce some WAI-ARIA document structures
204         https://bugs.webkit.org/show_bug.cgi?id=155603
205         <rdar://problem/25227385>
206
207         Reviewed by Darin Adler.
208
209         Expose more ARIA landmark type roles on iOS for accessibility.
210
211         Updated test: accessibility/ios-simulator/landmark-type.html
212
213         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
214         (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
215         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
216         * platform/LocalizedStrings.cpp:
217         (WebCore::searchMenuClearRecentSearchesText):
218         (WebCore::AXWebAreaText):
219         (WebCore::AXListItemActionVerb):
220         (WebCore::AXAutoFillCredentialsLabel):
221         * platform/LocalizedStrings.h:
222
223 2016-03-17  Daniel Bates  <dabates@apple.com>
224
225         Cleanup: Remove the need to pass reporting status to ContentSecurityPolicy functions
226         https://bugs.webkit.org/show_bug.cgi?id=155623
227
228         Reviewed by Andy Estes and Alex Christensen.
229
230         ScriptController::initScript() is the only function that passes ContentSecurityPolicy::ReportingStatus::SuppressReport
231         following the removal of the SecurityPolicy script interface in <http://trac.webkit.org/changeset/197142>. It
232         passes this reporting status to prevent sending a violation report when determining whether the CSP policy allows
233         use of the JavaScript eval()/operator eval so that it enable or disable this capability as appropriate. We
234         should teach ScriptController::initScript() to delegate the responsibility of enabling/disabling this capability
235         to the ContentSecurityPolicy. Then we can remove the need to expose ContentSecurityPolicy::ReportingStatus as
236         part of the ContentSecurityPolicy interface.
237
238         No functionality changed. So, no new tests.
239
240         * bindings/js/ScriptController.cpp:
241         (WebCore::ScriptController::createWindowShell): Return a reference to a JSDOMWindowShell object
242         instead of a pointer as the pointer is always non-null.
243         (WebCore::ScriptController::initScript): Updated as needed now that ScriptController::createWindowShell()
244         returns a reference. Moved logic to enable/disable JavaScript eval() and operator eval from here into
245         ContentSecurityPolicy::didCreateWindowShell() and make use of this member function.
246         * bindings/js/ScriptController.h:
247         * page/csp/ContentSecurityPolicy.cpp:
248         (WebCore::ContentSecurityPolicy::didCreateWindowShell): Added. Moved logic from to enable/disable JavaScript
249         eval() and operator eval from ScriptController::initScript() to here.
250         (WebCore::ContentSecurityPolicy::didReceiveHeader): Substitute ContentSecurityPolicyDirectiveList::ReportingStatus::SuppressReport
251         for ContentSecurityPolicy::ReportingStatus::SuppressReport as the enum has moved from class ContentSecurityPolicy
252         to ContentSecurityPolicyDirectiveList. Fix minor code style nit; substitute nullptr for 0 in the first argument
253         to ContentSecurityPolicyDirectiveList::allowEval().
254         (WebCore::isAllowedByAllWithFrame): Substitute ContentSecurityPolicyDirectiveList::ReportingStatus::SuppressReport
255         for ContentSecurityPolicy::ReportingStatus::SuppressReport as the enum has moved from class ContentSecurityPolicy
256         to ContentSecurityPolicyDirectiveList.
257         (WebCore::isAllowedByAll): Substitute ContentSecurityPolicyDirectiveList::ReportingStatus::SuppressReport
258         for ContentSecurityPolicy::ReportingStatus::SuppressReport as the enum has moved from class ContentSecurityPolicy
259         to ContentSecurityPolicyDirectiveList. Also make this function static so that it has internal linkage.
260         (WebCore::isAllowedByAllWithState): Ditto.
261         (WebCore::isAllowedByAllWithContext): Ditto.
262         (WebCore::isAllowedByAllWithHashFromContent): Ditto.
263         (WebCore::isAllowedByAllWithURL): Ditto.
264         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): Remove argument reportingStatus and always pass
265         ContentSecurityPolicyDirectiveList::ReportingStatus::SendReport to the directive list member function. In a
266         subsequent patch we will remove the need to pass the reporting status to the directive list member function.
267         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): Ditto.
268         (WebCore::ContentSecurityPolicy::allowInlineScript): Ditto.
269         (WebCore::ContentSecurityPolicy::allowInlineStyle): Ditto.
270         (WebCore::ContentSecurityPolicy::allowEval): Ditto.
271         (WebCore::ContentSecurityPolicy::allowFrameAncestors): Ditto.
272         (WebCore::ContentSecurityPolicy::allowPluginType): Ditto.
273         (WebCore::ContentSecurityPolicy::allowScriptFromSource): Ditto.
274         (WebCore::ContentSecurityPolicy::allowObjectFromSource): Ditto.
275         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Ditto.
276         (WebCore::ContentSecurityPolicy::allowChildContextFromSource): Ditto.
277         (WebCore::ContentSecurityPolicy::allowImageFromSource): Ditto.
278         (WebCore::ContentSecurityPolicy::allowStyleFromSource): Ditto.
279         (WebCore::ContentSecurityPolicy::allowFontFromSource): Ditto.
280         (WebCore::ContentSecurityPolicy::allowMediaFromSource): Ditto.
281         (WebCore::ContentSecurityPolicy::allowConnectToSource): Ditto.
282         (WebCore::ContentSecurityPolicy::allowFormAction): Ditto.
283         (WebCore::ContentSecurityPolicy::allowBaseURI): Ditto.
284         (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage): Deleted.
285         * page/csp/ContentSecurityPolicy.h:
286         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
287         (WebCore::ContentSecurityPolicyDirectiveList::allowJavaScriptURLs): Substitute ReportingStatus for
288         ContentSecurityPolicy::ReportingStatus as the enum has moved from class ContentSecurityPolicy to this class.
289         (WebCore::ContentSecurityPolicyDirectiveList::allowInlineEventHandlers): Ditto.
290         (WebCore::ContentSecurityPolicyDirectiveList::allowInlineScript): Ditto.
291         (WebCore::ContentSecurityPolicyDirectiveList::allowInlineStyle): Ditto.
292         (WebCore::ContentSecurityPolicyDirectiveList::allowEval): Ditto.
293         (WebCore::ContentSecurityPolicyDirectiveList::allowPluginType): Ditto.
294         (WebCore::ContentSecurityPolicyDirectiveList::allowScriptFromSource): Ditto.
295         (WebCore::ContentSecurityPolicyDirectiveList::allowObjectFromSource): Ditto.
296         (WebCore::ContentSecurityPolicyDirectiveList::allowChildContextFromSource): Ditto.
297         (WebCore::ContentSecurityPolicyDirectiveList::allowChildFrameFromSource): Ditto.
298         (WebCore::ContentSecurityPolicyDirectiveList::allowImageFromSource): Ditto.
299         (WebCore::ContentSecurityPolicyDirectiveList::allowStyleFromSource): Ditto.
300         (WebCore::ContentSecurityPolicyDirectiveList::allowFontFromSource): Ditto.
301         (WebCore::ContentSecurityPolicyDirectiveList::allowMediaFromSource): Ditto.
302         (WebCore::ContentSecurityPolicyDirectiveList::allowConnectToSource): Ditto.
303         (WebCore::ContentSecurityPolicyDirectiveList::allowFormAction): Ditto.
304         (WebCore::ContentSecurityPolicyDirectiveList::allowBaseURI): Ditto.
305         (WebCore::ContentSecurityPolicyDirectiveList::allowFrameAncestors): Ditto.
306         * page/csp/ContentSecurityPolicyDirectiveList.h:
307
308 2016-03-17  Brent Fulgham  <bfulgham@apple.com>
309
310         [XSS Auditor] Off by one in XSSAuditor::canonicalizedSnippetForJavaScript()
311         https://bugs.webkit.org/show_bug.cgi?id=155624
312         <rdar://problem/25219962>
313
314         Unreviewed merge from Blink (patch by Tom Sepez <tsepez@chromium.org>):
315         <https://src.chromium.org/viewvc/blink?revision=201803&view=revision>
316
317         Test: http/tests/security/xssAuditor/script-tag-with-trailing-script-and-urlencode.html
318
319         * html/parser/XSSAuditor.cpp:
320         (WebCore::XSSAuditor::canonicalizedSnippetForJavaScript): Correct off-by-one error.
321
322 2016-03-17  Zalan Bujtas  <zalan@apple.com>
323
324         Images in feed on ebay.com jiggle when one is hovered
325         https://bugs.webkit.org/show_bug.cgi?id=155608
326         <rdar://problem/25160681>
327
328         The content offset in compositing layer = subpixel gap between the graphics layer and the layer bounds + layer bounds top left.
329
330         Reviewed by Simon Fraser.
331
332         Test: compositing/hidpi-viewport-clipping-on-composited-content.html
333
334         * rendering/RenderLayerBacking.cpp:
335         (WebCore::RenderLayerBacking::updateGeometry):
336         (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
337         * rendering/RenderLayerBacking.h:
338
339 2016-03-17  Zalan Bujtas  <zalan@apple.com>
340
341         Don't initiate a style recall while drawing text 
342         https://bugs.webkit.org/show_bug.cgi?id=155618
343
344         Reviewed by Simon Fraser.
345
346         This patch ensures that we don't initiate a style recalc while in the middle of text drawing.
347
348         Test: fast/canvas/crash-while-resizing-canvas.html
349
350         * html/canvas/CanvasRenderingContext2D.cpp:
351         (WebCore::CanvasRenderingContext2D::drawTextInternal):
352
353 2016-03-17  Commit Queue  <commit-queue@webkit.org>
354
355         Unreviewed, rolling out r198335.
356         https://bugs.webkit.org/show_bug.cgi?id=155617
357
358         This change caused existing LayoutTests to crash
359         intermittently (Requested by ryan|afk on #webkit).
360
361         Reverted changeset:
362
363         "DataURLDecoder::DecodingResultDispatcher may get deleted
364         outside main thread"
365         https://bugs.webkit.org/show_bug.cgi?id=155584
366         http://trac.webkit.org/changeset/198335
367
368 2016-03-17  Eric Carlson  <eric.carlson@apple.com>
369
370         Improve some metadata tests
371         https://bugs.webkit.org/show_bug.cgi?id=155616
372
373         Reviewed by Saam Barati.
374
375         * html/track/DataCue.cpp:
376         (WebCore::DataCue::DataCue):
377         (WebCore::DataCue::setData):
378
379 2016-03-17  Myles C. Maxfield  <mmaxfield@apple.com>
380
381         [RTL Scrollbars] Position: absolute divs are covered by vertical scrollbar
382         https://bugs.webkit.org/show_bug.cgi?id=155531
383
384         Reviewed by Darin Adler.
385
386         This patch updates ScrollView::documentScrollPositionRelativeToViewOrigin(), which is
387         a helper function primarily used by WebCore::ScrollView::viewToContents() and
388         WebCore::ScrollView::contentsToView().
389
390         Tests: fast/scrolling/rtl-scrollbars-elementFromPoint-static.html
391                fast/scrolling/rtl-scrollbars-elementFromPoint.html
392                fast/scrolling/rtl-scrollbars-iframe-offset.html
393                fast/scrolling/rtl-scrollbars-iframe-position-absolute.html
394                fast/scrolling/rtl-scrollbars-iframe-scrolled.html
395                fast/scrolling/rtl-scrollbars-iframe.html
396                fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html
397                fast/scrolling/rtl-scrollbars-overflow-position-absolute.html
398                fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled.html
399                fast/scrolling/rtl-scrollbars-position-absolute.html
400                fast/scrolling/rtl-scrollbars-position-fixed.html
401                fast/scrolling/rtl-scrollbars-text-selection-scrolled.html
402                fast/scrolling/rtl-scrollbars-text-selection.html
403
404         * platform/ScrollView.cpp:
405         (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
406
407 2016-03-17  Filip Pizlo  <fpizlo@apple.com>
408
409         Replace all of the various non-working and non-compiling sampling profiler hacks with a single super hack
410         https://bugs.webkit.org/show_bug.cgi?id=155561
411
412         Reviewed by Saam Barati.
413
414         No new tests because no new behavior.
415
416         * platform/audio/ios/MediaSessionManagerIOS.mm:
417         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
418
419 2016-03-17  Brent Fulgham  <bfulgham@apple.com>
420
421         Some media tests are flaky.
422         https://bugs.webkit.org/show_bug.cgi?id=155614
423
424         Reviewed by Eric Carlson.
425
426         * html/track/TextTrack.cpp:
427         (WebCore::TextTrack::~TextTrack):
428
429 2016-03-17  Brady Eidson  <beidson@apple.com>
430
431         Don't try to restore deleted MemoryIndexes if their owning object store is not restored.
432         https://bugs.webkit.org/show_bug.cgi?id=155068
433
434         Reviewed by Alex Christensen.
435
436         Test: storage/indexeddb/modern/deleteindex-4-private.html
437
438         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
439         (WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
440
441 2016-03-17  Doug Russell  <d_russell@apple.com>
442
443         AX: attributes to retrieve focusable and editable ancestors
444         https://bugs.webkit.org/show_bug.cgi?id=155554
445
446         Reviewed by Chris Fleizach.
447
448         Add attributes to help give context to focus changes:
449         AXFocusableAncestor - nearest accessibility ancestor that returns true for
450         canSetFocusAttribute().
451         AXEditableAncestor - nearest accessibility ancestor that returns true for
452         isTextControl().
453         AXHighestEditableAncestor - highest element in accessibility that returns true
454         for isTextControl().
455
456         Test: accessibility/mac/ancestor-attributes.html
457
458         * accessibility/AccessibilityNodeObject.cpp:
459         * accessibility/AccessibilityObject.cpp:
460         (WebCore::AccessibilityObject::focusableAncestor):
461         (WebCore::AccessibilityObject::editableAncestor):
462         (WebCore::AccessibilityObject::highestEditableAncestor):
463         * accessibility/AccessibilityObject.h:
464         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
465         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
466         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
467
468 2016-03-17  Sam Weinig  <sam@webkit.org>
469
470         Implement document.queryCommandSupported("copy")
471         https://bugs.webkit.org/show_bug.cgi?id=155548
472         <rdar://problem/25195295>
473
474         Reviewed by Enrica Casucci.
475
476         - document.queryCommandSupported("copy") and document.queryCommandSupported("cut") need
477           to return true if the ClipboardAccessPolicy is either Allow or RequiresUserGesture.
478           But, document.queryCommandEnabled("copy") and document.queryCommandEnabled("cut")
479           should still return false when there is no user gesture. I also had to maintain a weird
480           quirk that copy and cut should be allowed to execute, and thus fire the oncopy and oncut
481           events, even when disabled, if coming from a "MenuOrKeyBinding" source. To do this, I
482           upgraded the allowExecutionWhenDisabled bit to a function taking a source, and return true
483           only when the correct source is specified.
484
485         * editing/Editor.h:
486         * editing/EditorCommand.cpp:
487         (WebCore::defaultValueForSupportedCopyCut):
488         (WebCore::allowCopyCutFromDOM):
489         (WebCore::enabledCopy):
490         (WebCore::enabledCut):
491         (WebCore::allowExecutionWhenDisabled):
492         (WebCore::doNotAllowExecutionWhenDisabled):
493         (WebCore::allowExecutionWhenDisabledCopyCut):
494         (WebCore::Editor::Command::execute):
495         (WebCore::Editor::Command::allowExecutionWhenDisabled):
496
497 2016-03-17  Antti Koivisto  <antti@apple.com>
498
499         DataURLDecoder::DecodingResultDispatcher may get deleted outside main thread
500         https://bugs.webkit.org/show_bug.cgi?id=155584
501         rdar://problem/24492104
502
503         Reviewed by Chris Dumez.
504
505         This is unsafe as it owns strings and other types that are only safe to delete in the main thread.
506
507         * platform/network/DataURLDecoder.cpp:
508         (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
509
510             The problem is that this was a refcounted type. This created a race. If the timer fired before dispatch()
511             was exited the implicit deref here would trigger the deletion in the dispatching thread.
512
513             Fix by getting rid of the unnecessary refcounting. Timer firing will now delete the instance explicitly.
514
515         (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
516         (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
517
518 2016-03-17  Commit Queue  <commit-queue@webkit.org>
519
520         Unreviewed, rolling out r198201.
521         https://bugs.webkit.org/show_bug.cgi?id=155585
522
523         That was not the proper solution (Requested by KaL on
524         #webkit).
525
526         Reverted changeset:
527
528         "REGRESSION (r197724): [GTK] Web Inspector: Images being
529         blocked by CSP 2.0"
530         https://bugs.webkit.org/show_bug.cgi?id=155432
531         http://trac.webkit.org/changeset/198201
532
533 2016-03-16  Chris Fleizach  <cfleizach@apple.com>
534
535         AX: Implement AutoFill Available attribute for a text field
536         https://bugs.webkit.org/show_bug.cgi?id=155567
537
538         Reviewed by Darin Adler.
539
540         Expose the auto fill buttons to the AX hierarchy.
541         Add an attribute for the textfield to inform when the auto fill button is available.
542
543         Test: accessibility/auto-fill-types.html
544
545         * English.lproj/Localizable.strings:
546         * accessibility/AccessibilityObject.cpp:
547         (WebCore::AccessibilityObject::element):
548         (WebCore::AccessibilityObject::isValueAutofillAvailable):
549         (WebCore::AccessibilityObject::isValueAutofilled):
550         * accessibility/AccessibilityObject.h:
551         (WebCore::AccessibilityObject::passwordFieldValue):
552         * accessibility/AccessibilityRenderObject.cpp:
553         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
554         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
555         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
556         * html/TextFieldInputType.cpp:
557         (WebCore::limitLength):
558         (WebCore::autoFillButtonTypeToAccessibilityLabel):
559         (WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
560         (WebCore::TextFieldInputType::createAutoFillButton):
561         (WebCore::TextFieldInputType::updateAutoFillButton):
562         * platform/LocalizedStrings.cpp:
563         (WebCore::AXListItemActionVerb):
564         (WebCore::AXAutoFillCredentialsLabel):
565         (WebCore::AXAutoFillContactsLabel):
566         (WebCore::AXARIAContentGroupText):
567         * platform/LocalizedStrings.h:
568
569 2016-03-17  Csaba Osztrogonác  <ossy@webkit.org>
570
571         [Mac][cmake] Unreviewed speculative buildfix after r198179. Just for fun.
572
573         * PlatformMac.cmake:
574
575 2016-03-17  Youenn Fablet  <youenn.fablet@crf.canon.fr>
576
577         [Fetch API] response-consume.html is crashing on Mac WK1 Debug builds
578         https://bugs.webkit.org/show_bug.cgi?id=155490
579
580         Reviewed by Darin Adler.
581
582         Covered by existing tests.
583
584         Ensured to lock state before calling JSC:JSONParse.
585         Adding fulfillPromiseWithJSON routine to handle it.
586         Applied it to FetchBody.
587
588         * Modules/fetch/FetchBody.cpp:
589         (WebCore::FetchBody::json):
590         (WebCore::FetchBody::loadedAsText):
591         (WebCore::FetchBody::resolveAsJSON): Deleted.
592         * Modules/fetch/FetchBody.h:
593         * Modules/fetch/FetchBodyOwner.cpp:
594         (WebCore::FetchBodyOwner::loadedBlobAsText):
595         * bindings/js/JSDOMPromise.cpp:
596         (WebCore::parseAsJSON):
597         (WebCore::fulfillPromiseWithJSON):
598         * bindings/js/JSDOMPromise.h:
599
600 2016-03-17  Adam Bergkvist  <adam.bergkvist@ericsson.com>
601
602         WebRTC: Update RTCIceCandidate
603         https://bugs.webkit.org/show_bug.cgi?id=155535
604
605         Reviewed by Eric Carlson.
606
607         Update the RTCIceCandidate constructor procedure to match the WebRTC 1.0 specification [1].
608         In short: The "candidate" init dictionary member is required. At least one of the dictionary
609         members "sdpMid" and "sdpMLine" needs to be present; the corresponding attribute of the
610         other, is initialized to null.
611
612         [1] https://w3c.github.io/webrtc-pc/archives/20160215/webrtc.html
613
614         Tests: Updated fast/mediastream/RTCIceCandidate.htm
615
616         * Modules/mediastream/RTCIceCandidate.cpp:
617         (WebCore::RTCIceCandidate::create):
618         (WebCore::RTCIceCandidate::RTCIceCandidate):
619         * Modules/mediastream/RTCIceCandidate.h:
620         (WebCore::RTCIceCandidate::sdpMLineIndex):
621         (WebCore::RTCIceCandidate::setSdpMLineIndex):
622         * Modules/mediastream/RTCIceCandidate.idl:
623         * bindings/js/JSRTCIceCandidateCustom.cpp:
624         (WebCore::JSRTCIceCandidate::sdpMid):
625         (WebCore::JSRTCIceCandidate::sdpMLineIndex):
626
627 2016-03-16  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
628
629         SVG tear offs should return a const reference if possible
630         https://bugs.webkit.org/show_bug.cgi?id=153214
631
632         Reviewed by Alex Christensen.
633
634         A smaller change than expected because the returned reference is being copied into a value in additional locations that baseVal and animVal are used.
635
636         No new tests as there is no change in behaviour.
637
638         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
639         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
640         (WebCore::SVGAnimatedStaticPropertyTearOff::baseVal):
641         (WebCore::SVGAnimatedStaticPropertyTearOff::animVal):
642
643 2016-03-16  Chris Dumez  <cdumez@apple.com>
644
645         Unreviewed, partial roll out of r197254.
646         <rdar://problem/25078552>
647
648         It caused a ~1.1% PLT regression on iOS.
649
650         * loader/FrameLoader.cpp:
651         (WebCore::FrameLoader::commitProvisionalLoad): Deleted.
652
653 2016-03-16  Enrica Casucci  <enrica@apple.com>
654
655         Recognize mailto and tel url as data detector links.
656         https://bugs.webkit.org/show_bug.cgi?id=155569
657         rdar://problem/24836185
658
659         Reviewed by Sam Weinig.
660
661         When we check if the element is a data detector link,
662         we should return true also for URLs with mailto: and tel: scheme.
663
664         * editing/cocoa/DataDetection.mm:
665         (WebCore::DataDetection::isDataDetectorLink):
666
667 2016-03-16  Zalan Bujtas  <zalan@apple.com>
668
669         Subpixel rendering: Directly composited image layers need pixelsnapping.
670         https://bugs.webkit.org/show_bug.cgi?id=155558
671
672         Reviewed by Simon Fraser.
673
674         In order to match non-composited image size/position, we need to pixelsnap both the contents and the clipping
675         layer bounds for directly composited images.
676
677         Test: fast/images/hidpi-directly-composited-image-on-subpixel-position.html
678
679         * rendering/RenderLayerBacking.cpp:
680         (WebCore::RenderLayerBacking::resetContentsRect):
681         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
682         (WebCore::RenderLayerBacking::updateImageContents):
683
684 2016-03-16  Beth Dakin  <bdakin@apple.com>
685
686         Provide NSSpellChecker spellChecking methods with the current insertion point
687         https://bugs.webkit.org/show_bug.cgi?id=155532
688         -and corresponding-
689         rdar://problem/24066952
690
691         Reviewed by Simon Fraser.
692
693         Pass the Frame’s selection to a handful of spelling checking methods that 
694         call into WebKit/WebKit2 to ultimately call into NSSpellChecker.
695         * accessibility/AccessibilityObject.cpp:
696         (WebCore::AccessibilityObject::hasMisspelling):
697         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
698         (AXAttributeStringSetSpelling):
699         * editing/AlternativeTextController.cpp:
700         (WebCore::AlternativeTextController::timerFired):
701         * editing/Editor.cpp:
702         (WebCore::Editor::guessesForMisspelledWord):
703         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
704         * editing/SpellChecker.cpp:
705         (WebCore::SpellChecker::invokeRequest):
706         (WebCore::SpellChecker::enqueueRequest):
707         * editing/TextCheckingHelper.cpp:
708         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
709         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
710         (WebCore::TextCheckingHelper::unifiedTextCheckerEnabled):
711         (WebCore::checkTextOfParagraph):
712         * editing/TextCheckingHelper.h:
713         * loader/EmptyClients.cpp:
714         (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
715         (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
716         * loader/EmptyClients.h:
717         * platform/text/TextCheckerClient.h:
718         (WebCore::TextCheckerClient::~TextCheckerClient):
719
720         The key needed to include the insertion point.
721         * platform/spi/mac/NSSpellCheckerSPI.h:
722
723 2016-03-16  Alex Christensen  <achristensen@webkit.org>
724
725         Fix assertion failure on drive.google.com after r196052
726         https://bugs.webkit.org/show_bug.cgi?id=155562
727
728         Reviewed by Jer Noble.
729
730         * rendering/RenderGeometryMap.cpp:
731         (WebCore::RenderGeometryMap::mapToContainer):
732         Change float equality check to areEssentiallyEqual.
733         This assertion was failing because rendererMappedResult was (944.335693, 232.047409)
734         but result was (944.335693, 232.047394).  They differ by (0, 0.000015).
735
736 2016-03-16  Nan Wang  <n_wang@apple.com>
737
738         AX: Expose aria-current status to children
739         https://bugs.webkit.org/show_bug.cgi?id=155469
740
741         Reviewed by Chris Fleizach.
742
743         Added aria-current to the global ARIA attributes list.
744
745         Test: accessibility/aria-current-global-attribute.html
746
747         * accessibility/AccessibilityObject.cpp:
748         (WebCore::AccessibilityObject::supportsARIAAttributes):
749
750 2016-03-16  Tim Horton  <timothy_horton@apple.com>
751
752         [mac] Printing test snapshots are upside-down after r198242
753         https://bugs.webkit.org/show_bug.cgi?id=155543
754
755         Reviewed by Simon Fraser.
756
757         * page/PrintContext.cpp:
758         (WebCore::PrintContext::spoolAllPagesWithBoundaries):
759         Stop PLATFORM(COCOA)-conditionally flipping here. Just paint.
760         This function is only used by the test runners so this doesn't have a
761         huge impact on anything else.
762
763 2016-03-16  Daniel Bates  <dabates@apple.com>
764
765         Update WebKit Feature Status page to include the status of Content Security Policy Level 2 and Level 3
766
767         * features.json:
768
769 2016-03-16  Daniel Bates  <dabates@apple.com>
770
771         <video> and <audio> elements do not obey Content Security Policy on redirect
772         https://bugs.webkit.org/show_bug.cgi?id=155509
773         <rdar://problem/10234844>
774
775         Reviewed by Alex Christensen.
776
777         Fixes an issue where the Content Security Policy of the page was not enforced
778         on redirects when loading a media subresource via an HTML video or HTML audio
779         element.
780
781         Tests: http/tests/security/contentSecurityPolicy/audio-redirect-allowed.html
782                http/tests/security/contentSecurityPolicy/audio-redirect-blocked.html
783                http/tests/security/contentSecurityPolicy/font-redirect-allowed.html
784                http/tests/security/contentSecurityPolicy/font-redirect-blocked.html
785                http/tests/security/contentSecurityPolicy/image-redirect-allowed.html
786                http/tests/security/contentSecurityPolicy/image-redirect-blocked.html
787                http/tests/security/contentSecurityPolicy/script-redirect-allowed.html
788                http/tests/security/contentSecurityPolicy/script-redirect-blocked.html
789                http/tests/security/contentSecurityPolicy/stylesheet-redirect-allowed.html
790                http/tests/security/contentSecurityPolicy/stylesheet-redirect-blocked.html
791                http/tests/security/contentSecurityPolicy/svg-font-redirect-allowed.html
792                http/tests/security/contentSecurityPolicy/svg-font-redirect-blocked.html
793                http/tests/security/contentSecurityPolicy/svg-image-redirect-allowed.html
794                http/tests/security/contentSecurityPolicy/svg-image-redirect-blocked.html
795                http/tests/security/contentSecurityPolicy/track-redirect-allowed.html
796                http/tests/security/contentSecurityPolicy/track-redirect-blocked.html
797                http/tests/security/contentSecurityPolicy/video-redirect-allowed.html
798                http/tests/security/contentSecurityPolicy/video-redirect-blocked.html
799                http/tests/security/contentSecurityPolicy/xsl-redirect-allowed.html
800                http/tests/security/contentSecurityPolicy/xsl-redirect-blocked.html
801
802         * inspector/InspectorPageAgent.cpp:
803         (WebCore::InspectorPageAgent::cachedResourceContent): Treat media resources as raw resources just as we do currently.
804         (WebCore::InspectorPageAgent::cachedResourceType): Ditto.
805         * loader/MediaResourceLoader.cpp:
806         (WebCore::MediaResourceLoader::requestResource): Modified to use CachedResourceLoader::requestMedia() instead
807         of CachedResourceLoader::requestRawResource() so that we can differentiate between a media resource and a raw
808         resource in CachedResourceLoader. Added FIXME comment to skip checking the Content Security Policy for loads
809         initiated by an element in a user agent shadow tree. See <https://bugs.webkit.org/show_bug.cgi?id=155505> for
810         more details.
811         * loader/ResourceLoadInfo.cpp:
812         (WebCore::toResourceType): Treat media resources as raw resources just as we do currently. Also, add cases for
813         CachedResource::LinkPrefetch and CachedResource::LinkSubresource (when ENABLE(LINK_PREFETCH) is enabled) and
814         remove the default statement to force a compile-time error when a new CachedResource enumerator is added and
815         the switch block in this function is not updated.
816         * loader/SubresourceLoader.cpp:
817         (WebCore::logResourceLoaded): Ditto.
818         * loader/cache/CachedRawResource.cpp:
819         (WebCore::CachedRawResource::CachedRawResource): Substitute CachedResource::isMainOrMediaOrRawResource() for
820         CachedResource::isMainOrRawResource() as the latter was renamed to the former.
821         * loader/cache/CachedRawResource.h:
822         (isType): Ditto.
823         * loader/cache/CachedResource.cpp:
824         (WebCore::defaultPriorityForResourceType): Use priority ResourceLoadPriority::Medium for media resources just as
825         we do currently.
826         * loader/cache/CachedResource.h:
827         (WebCore::CachedResource::isMainOrMediaOrRawResource): Formerly named isMainOrRawResource. Returns true if the type
828         of this resource is a main resource, media resource, or raw resource.
829         (WebCore::CachedResource::isMainOrRawResource): Deleted.
830         * loader/cache/CachedResourceLoader.cpp:
831         (WebCore::createResource): Treat media resources as raw resources just as we do currently.
832         (WebCore::CachedResourceLoader::requestMedia): Added.
833         (WebCore::contentTypeFromResourceType): Consider media resources as MixedContentChecker::ContentType::Active
834         just as we do currently.
835         (WebCore::CachedResourceLoader::checkInsecureContent): Apply the mixed content policy to media resources
836         just as we do currently.
837         (WebCore::CachedResourceLoader::canRequest): Apply the Same Origin Policy to media resources just as we
838         do currently. Query the Content Security Policy of the page to determine if the media resource can be
839         requested.
840         (WebCore::CachedResourceLoader::determineRevalidationPolicy): Substitute CachedResource::isMainOrMediaOrRawResource()
841         for CachedResource::isMainOrRawResource() as the latter was renamed to the former.
842         * loader/cache/CachedResourceLoader.h:
843         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
844         (WebCore::WebCoreAVFResourceLoader::startLoading): Modified to use CachedResourceLoader::requestMedia() instead
845         of CachedResourceLoader::requestRawResource() so that we can differentiate between a media resource and a raw
846         resource in CachedResourceLoader. Added FIXME comment to skip checking the Content Security Policy for loads
847         initiated by an element in a user agent shadow tree. See <https://bugs.webkit.org/show_bug.cgi?id=155505> for
848         more details. Additionally, simplified code that determined whether to request the media resource or error out
849         by coalescing two conditional expressions into one conditional on whether we have a loader and substituted
850         nullptr for 0.
851
852 2016-03-16  Chris Dumez  <cdumez@apple.com>
853
854         Unreviewed, rolling out r198235, r198240, r198241, and
855         r198252.
856
857         Causing crashes on ARM
858
859         Reverted changesets:
860
861         "Remove compile time define for SEPARATED_HEAP"
862         https://bugs.webkit.org/show_bug.cgi?id=155508
863         http://trac.webkit.org/changeset/198235
864
865         "Gardening: build fix after r198235."
866         http://trac.webkit.org/changeset/198240
867
868         "Build fix."
869         http://trac.webkit.org/changeset/198241
870
871         "Rename performJITMemcpy to something more inline with our
872         normal webkit function names"
873         https://bugs.webkit.org/show_bug.cgi?id=155525
874         http://trac.webkit.org/changeset/198252
875
876 2016-03-16  Jiewen Tan  <jiewen_tan@apple.com>
877
878         URL Parsing should signal failure for illegal IDN
879         https://bugs.webkit.org/show_bug.cgi?id=154945
880         <rdar://problem/8014795>
881
882         Reviewed by Brent Fulgham.
883
884         WebCore::URL will now invalidate URLs with illegal IDN. And functions inside WebCoreNSURLExtras.h
885         that deal with IDN mapping will now return nil to signal error.
886
887         Test: fast/url/invalid-idn.html
888
889         * platform/URL.cpp:
890         (WebCore::isSchemeFirstChar):
891         (WebCore::URL::init):
892         (WebCore::appendEncodedHostname):
893         (WebCore::encodeHostnames):
894         (WebCore::encodeRelativeString):
895         * platform/mac/WebCoreNSURLExtras.h:
896         * platform/mac/WebCoreNSURLExtras.mm:
897         (WebCore::mapHostNameWithRange):
898         (WebCore::hostNameNeedsDecodingWithRange):
899         (WebCore::hostNameNeedsEncodingWithRange):
900         (WebCore::decodeHostNameWithRange):
901         (WebCore::encodeHostNameWithRange):
902         (WebCore::decodeHostName):
903         (WebCore::encodeHostName):
904         (WebCore::collectRangesThatNeedMapping):
905         (WebCore::mapHostNames):
906         (WebCore::URLWithData):
907         (WebCore::dataWithUserTypedString):
908         (WebCore::URLWithUserTypedString):
909         (WebCore::URLWithUserTypedStringDeprecated):
910         (WebCore::userVisibleString):
911
912 2016-03-16  Antti Koivisto  <antti@apple.com>
913
914         Don't invalidate style unnecessarily when setting inline style cssText
915         https://bugs.webkit.org/show_bug.cgi?id=155541
916         rdar://problem/23318893
917
918         Reviewed by Simon Fraser.
919
920         We currently invalidate style when cssText is set whether the style declaration changed or not.
921
922         Based on a patch by Simon.
923
924         Test: fast/css/style-invalidation-inline-csstext.html
925
926         * css/PropertySetCSSStyleDeclaration.cpp:
927         (WebCore::PropertySetCSSStyleDeclaration::cssText):
928         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
929
930             Invalidate only if the parsed style changed.
931
932         * css/StyleProperties.cpp:
933         (WebCore::MutableStyleProperties::parseDeclaration):
934
935             Compare the original and new style after parsing, return result.
936
937         * css/StyleProperties.h:
938
939 2016-03-16  Carlos Garcia Campos  <cgarcia@igalia.com>
940
941         REGRESSION(r195661): [GTK] very slow scrolling
942         https://bugs.webkit.org/show_bug.cgi?id=155334
943
944         Reviewed by Sergio Villar Senin.
945
946         Fix smooth scrolling behaviour change after r195661.
947
948         * platform/ScrollAnimationSmooth.cpp:
949         (WebCore::getAnimationParametersForGranularity): Fix a typo,
950         animationTime for pixel granularity should be 11 * tickTime.
951         (WebCore::ScrollAnimationSmooth::animateScroll): Previous code
952         reset all the data except the visibleLenght, so keep it in the
953         PerAxisData after the reset.
954
955 2016-03-16  Commit Queue  <commit-queue@webkit.org>
956
957         Unreviewed, rolling out r196803.
958         https://bugs.webkit.org/show_bug.cgi?id=155534
959
960         Introduced several rendering issues in popular websites
961         (Requested by KaL on #webkit).
962
963         Reverted changeset:
964
965         "[GTK] Limit the number of tiles according to the visible
966         area"
967         https://bugs.webkit.org/show_bug.cgi?id=126122
968         http://trac.webkit.org/changeset/196803
969
970 2016-03-15  Zalan Bujtas  <zalan@apple.com>
971
972         Remove overflow: -webkit-marquee
973         https://bugs.webkit.org/show_bug.cgi?id=155517
974         <rdar://problem/25028481>
975
976         Reviewed by Simon Fraser.
977
978         This patch is based on Blink patch from jchaffraix@chromium.org (https://src.chromium.org/viewvc/blink?revision=151756&view=revision)
979
980         * css/CSSParser.cpp:
981         (WebCore::isValidKeywordPropertyAndValue):
982         * css/CSSPrimitiveValueMappings.h:
983         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
984         (WebCore::CSSPrimitiveValue::operator EOverflow): Deleted.
985         * css/CSSValueKeywords.in:
986         * css/StyleResolver.cpp:
987         (WebCore::StyleResolver::adjustRenderStyle):
988         * css/html.css:
989         (marquee): Deleted.
990         * rendering/RenderBox.cpp:
991         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
992         * rendering/RenderLayer.cpp:
993         (WebCore::RenderLayer::scrollTo):
994         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
995         (WebCore::RenderLayer::calculateClipRects):
996         * rendering/RenderLayer.h:
997         * rendering/RenderMarquee.h:
998         * rendering/style/RenderStyleConstants.h:
999
1000 2016-03-15  Joanmarie Diggs  <jdiggs@igalia.com>
1001
1002         AX: Expose pointers to SVG elements referenced by aria-labelledby
1003         https://bugs.webkit.org/show_bug.cgi?id=155481
1004
1005         Reviewed by Chris Fleizach.
1006
1007         Expose elements referenced by aria-labelledby via ATK_RELATION_LABELLED_BY.
1008         Stop calling the supportsARIA* methods before getting the elements referred
1009         to by the associated ARIA property in the accessible wrapper for ATK and
1010         the inspector: Getting the elements will be just as fast when there are no
1011         such elements, and faster when there are.
1012
1013         Modified the w3c-svg-name-calculation.html test to include AXTitleUIElement
1014         in its output.
1015
1016         * accessibility/AccessibilityObject.cpp:
1017         (WebCore::AccessibilityObject::supportsARIAAttributes):
1018         (WebCore::AccessibilityObject::ariaElementsFromAttribute): Added.
1019         (WebCore::AccessibilityObject::ariaControlsElements): Added.
1020         (WebCore::AccessibilityObject::ariaDescribedByElements): Added.
1021         (WebCore::AccessibilityObject::ariaFlowToElements): Added.
1022         (WebCore::AccessibilityObject::ariaLabelledByElements): Added.
1023         (WebCore::AccessibilityObject::ariaOwnsElements): Added.
1024         * accessibility/AccessibilityObject.h:
1025         (WebCore::AccessibilityObject::ariaOwnsElements): No longer virtual.
1026         (WebCore::AccessibilityObject::supportsARIAFlowTo): Deleted.
1027         (WebCore::AccessibilityObject::ariaFlowToElements): No longer virtual.
1028         (WebCore::AccessibilityObject::supportsARIADescribedBy): Deleted.
1029         (WebCore::AccessibilityObject::ariaDescribedByElements): No longer virtual.
1030         (WebCore::AccessibilityObject::supportsARIAControls): Deleted.
1031         (WebCore::AccessibilityObject::ariaControlsElements): No longer virtual.
1032         * accessibility/AccessibilityRenderObject.cpp:
1033         (WebCore::AccessibilityRenderObject::ariaElementsFromAttribute): Moved to AccessibilityObject.
1034         (WebCore::AccessibilityRenderObject::supportsARIAFlowTo): Deleted.
1035         (WebCore::AccessibilityRenderObject::ariaFlowToElements): Moved to AccessibilityObject.
1036         (WebCore::AccessibilityRenderObject::supportsARIADescribedBy): Deleted.
1037         (WebCore::AccessibilityRenderObject::ariaDescribedByElements): Moved to AccessibilityObject.
1038         (WebCore::AccessibilityRenderObject::supportsARIAControls): Deleted.
1039         (WebCore::AccessibilityRenderObject::ariaControlsElements): Moved to AccessibilityObject.
1040         (WebCore::AccessibilityRenderObject::ariaOwnsElements): Moved to AccessibilityObject.
1041         * accessibility/AccessibilityRenderObject.h:
1042         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1043         (setAtkRelationSetFromCoreObject):
1044         * inspector/InspectorDOMAgent.cpp:
1045         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1046
1047 2016-03-15  Simon Fraser  <simon.fraser@apple.com>
1048
1049         Occasional crash under GraphicsContext::platformContext when dragging Google maps
1050         https://bugs.webkit.org/show_bug.cgi?id=155521
1051         rdar://problem/24357307
1052
1053         Reviewed by Tim Horton.
1054
1055         It's possible for createDragImageForSelection() to return a null image, if the bounds
1056         of the selection are an empty rect. That would cause a crash under convertImageToBitmap()
1057         because a zero-sized ShareableBitmap will return a null GraphicsContext.
1058         
1059         To avoid this, early return from DragController::startDrag() if the dragImage is null.
1060         
1061         I wasn't able to come up with a test for this.
1062
1063         * page/DragController.cpp:
1064         (WebCore::DragController::startDrag):
1065
1066 2016-03-15  Tim Horton  <timothy_horton@apple.com>
1067
1068         iOS <attachment> element should allow customization of action text color
1069         https://bugs.webkit.org/show_bug.cgi?id=155513
1070         <rdar://problem/24805991>
1071
1072         Reviewed by Simon Fraser.
1073
1074         Test: fast/attachment/attachment-action.html
1075
1076         * css/html.css:
1077         (attachment):
1078         On iOS (the only place it is used), <attachment> color should default to system blue.
1079
1080         * rendering/RenderThemeIOS.mm:
1081         (WebCore::attachmentActionColor):
1082         (WebCore::AttachmentInfo::AttachmentInfo):
1083         Make use of the <attachment>'s CSS color for the action text.
1084         This is a little weird because there are multiple bits of text in an
1085         <attachment>, but only the action text ever changes color.
1086
1087 2016-03-15  Zalan Bujtas  <zalan@apple.com>
1088
1089         Delay HTMLFormControlElement::focus() call until after layout is finished.
1090         https://bugs.webkit.org/show_bug.cgi?id=155503
1091         <rdar://problem/24046635>
1092
1093         Reviewed by Simon Fraser.
1094
1095         Calling focus on a form element can trigger arbitrary JS code which could interfere with
1096         the ongoing layout. 
1097         This patch delays HTMLFormControlElement::focus() call until after layout is finished.
1098         If we are currently not in the middle of a layout, HTMLFormControlElement::focus() is delayed until
1099         after style resolution is done. 
1100
1101         Covered by LayoutTests/fast/dom/adopt-node-crash-2.html
1102
1103         * accessibility/AccessibilityObject.cpp:
1104         (WebCore::AccessibilityObject::updateBackingStore):
1105         * dom/Document.cpp:
1106         (WebCore::Document::updateStyleIfNeeded):
1107         (WebCore::Document::updateLayout):
1108         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1109         * html/HTMLEmbedElement.cpp:
1110         (WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin):
1111         * html/HTMLFormControlElement.cpp:
1112         (WebCore::HTMLFormControlElement::didAttachRenderers):
1113         * page/FrameView.cpp:
1114         (WebCore::FrameView::layout):
1115         (WebCore::FrameView::queuePostLayoutCallback):
1116         (WebCore::FrameView::flushPostLayoutTasksQueue):
1117         (WebCore::FrameView::performPostLayoutTasks):
1118         (WebCore::FrameView::sendResizeEventIfNeeded):
1119         * page/FrameView.h:
1120         * rendering/RenderBox.cpp:
1121         (WebCore::RenderBox::imageChanged):
1122         * rendering/RenderLayer.cpp:
1123         (WebCore::RenderLayer::scrollTo):
1124
1125 2016-03-15  Oliver Hunt  <oliver@apple.com>
1126
1127         Remove compile time define for SEPARATED_HEAP
1128         https://bugs.webkit.org/show_bug.cgi?id=155508
1129
1130         Reviewed by Mark Lam.
1131
1132         Remove the feature define.
1133
1134         * Configurations/FeatureDefines.xcconfig:
1135
1136 2016-03-15  Chris Dumez  <cdumez@apple.com>
1137
1138         Restore pre-r197244 behavior on Mac
1139         https://bugs.webkit.org/show_bug.cgi?id=155507
1140         <rdar://problem/25174132>
1141
1142         Reviewed by Gavin Barraclough.
1143
1144         <http://trac.webkit.org/changeset/197244> changed the session restore
1145         behavior to disallow stale content on all platforms except iOS.
1146         We would also like to maintain the behavior on Mac for performance
1147         reasons and consistency between iOS and Mac.
1148
1149         * loader/FrameLoader.cpp:
1150         (WebCore::FrameLoader::loadDifferentDocumentItem):
1151
1152 2016-03-15  Tim Horton  <timothy_horton@apple.com>
1153
1154         <attachment> on iOS isn't quite vertically centered
1155         https://bugs.webkit.org/show_bug.cgi?id=155502
1156         <rdar://problem/24805991>
1157
1158         Reviewed by Beth Dakin.
1159
1160         No new tests; there are existing tests that will be enabled shortly.
1161
1162         * rendering/RenderThemeIOS.mm:
1163         (WebCore::AttachmentInfo::AttachmentInfo):
1164         We were overcounting the total height of the attachment content by one margin, because each item
1165         would add in its margin, including the last one. Remove one margin.
1166
1167 2016-03-15  Chris Fleizach  <cfleizach@apple.com>
1168
1169         AX: certain elements not included in accessibility tree
1170         https://bugs.webkit.org/show_bug.cgi?id=155480
1171
1172         Reviewed by Beth Dakin.
1173
1174         This test case exposed a hole in the nextSibling logic where you can get into a state where we skip content.
1175         The fix is to check if an inline element continuation has no sibling, to fall back on to the parent case to see if that has a sibling.
1176
1177         Test: accessibility/double-nested-inline-element-missing-from-tree.html
1178
1179         * accessibility/AccessibilityRenderObject.cpp:
1180         (WebCore::AccessibilityRenderObject::nextSibling):
1181
1182 2016-03-15  Chris Dumez  <cdumez@apple.com>
1183
1184         Unreviewed, rolling out r198203.
1185
1186         Favorites view is no longer loading on iOS
1187
1188         Reverted changeset:
1189
1190         "URL Parsing should signal failure for illegal IDN"
1191         https://bugs.webkit.org/show_bug.cgi?id=154945
1192         http://trac.webkit.org/changeset/198203
1193
1194 2016-03-15  Tim Horton  <timothy_horton@apple.com>
1195
1196         <attachment> on iOS should use short and emphasized fonts
1197         https://bugs.webkit.org/show_bug.cgi?id=155485
1198         <rdar://problem/24805991>
1199
1200         Reviewed by Simon Fraser.
1201
1202         No new tests; there are existing tests that will be enabled shortly.
1203
1204         * rendering/RenderThemeIOS.mm:
1205         (WebCore::attachmentActionFont):
1206         (WebCore::attachmentTitleFont):
1207         (WebCore::attachmentSubtitleFont):
1208         (WebCore::AttachmentInfo::buildTitleLines):
1209         (WebCore::AttachmentInfo::buildSingleLine):
1210         (WebCore::AttachmentInfo::AttachmentInfo):
1211         No need for UIFonts, we can use CoreText, and that allows us to ask for the
1212         correct Short and Emphasized variants that we need.
1213
1214 2016-03-15  Antti Koivisto  <antti@apple.com>
1215
1216         REGRESSION (196383): Class change invalidation does not handle :not correctly
1217         https://bugs.webkit.org/show_bug.cgi?id=155493
1218         <rdar://problem/24846762>
1219
1220         Reviewed by Andreas Kling.
1221
1222         We fail to invalidate bar style in
1223
1224             :not(.foo) bar { }
1225
1226         when class foo is added or removed.
1227
1228         There is a logic error in the invalidation code. It assumes that class addition can only make new selectors match
1229         and removal make them not match. This is not true when :not is present.
1230
1231         * style/AttributeChangeInvalidation.h:
1232         (WebCore::Style::AttributeChangeInvalidation::AttributeChangeInvalidation):
1233         * style/ClassChangeInvalidation.cpp:
1234         (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
1235
1236             Invalidate style and collect full set of rules that may affect descendant style.
1237
1238         (WebCore::Style::ClassChangeInvalidation::invalidateDescendantStyle):
1239
1240             Invalidate with this set both before and after committing the changes.
1241
1242         (WebCore::Style::ClassChangeInvalidation::computeClassChange): Deleted.
1243         * style/ClassChangeInvalidation.h:
1244         (WebCore::Style::ClassChangeInvalidation::ClassChangeInvalidation):
1245         (WebCore::Style::ClassChangeInvalidation::~ClassChangeInvalidation):
1246
1247 2016-03-14  Jer Noble  <jer.noble@apple.com>
1248
1249         Video elements with autoplay do not begin playing when scrolling into view if InvisibleAutoplayNotPermitted is set.
1250         https://bugs.webkit.org/show_bug.cgi?id=155468
1251
1252         Reviewed by Eric Carlson.
1253
1254         Test: media/video-restricted-invisible-autoplay-allowed-when-visible.html
1255
1256         A few bugs came together to cause this behavior. We were not telling the media session that we were going to begin
1257         the autoplaying state, we were not restoring the correct state when the interruption ended, and we were not checking
1258         to see if we could actually play correctly when the interruption ended.
1259
1260         * html/HTMLMediaElement.cpp:
1261         (WebCore::HTMLMediaElement::prepareForLoad):
1262         (WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay):
1263         (WebCore::HTMLMediaElement::setReadyState):
1264         (WebCore::HTMLMediaElement::resumeAutoplaying):
1265         (WebCore::HTMLMediaElement::updateShouldPlay):
1266         (WebCore::elementCanTransitionFromAutoplayToPlay): Deleted.
1267         * html/HTMLMediaElement.h:
1268         * platform/audio/PlatformMediaSession.cpp:
1269         (WebCore::PlatformMediaSession::endInterruption):
1270
1271 2016-03-15  Manuel Rego Casasnovas  <rego@igalia.com>
1272
1273         [css-grid] Rename GridCoordinate to GridArea
1274         https://bugs.webkit.org/show_bug.cgi?id=155489
1275
1276         Reviewed by Sergio Villar Senin.
1277
1278         As the comment in GridCoordinate states,
1279         it actually represents a grid area as it stores
1280         the initial and final positions in both axis (columns and rows).
1281
1282         Someone can think about a grid coordinate just like a single cell.
1283         However this class was representing an area of several cells.
1284
1285         On top of that the "grid area" concept is defined in the spec:
1286         https://drafts.csswg.org/css-grid/#grid-area-concept
1287
1288         No new tests, no change of behavior.
1289
1290         * WebCore.xcodeproj/project.pbxproj:
1291         * css/CSSGridTemplateAreasValue.cpp:
1292         (WebCore::stringForPosition):
1293         * css/CSSGridTemplateAreasValue.h:
1294         * css/CSSParser.cpp:
1295         (WebCore::CSSParser::parseGridTemplateAreasRow):
1296         * css/CSSParser.h:
1297         * rendering/RenderGrid.cpp:
1298         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
1299         (WebCore::RenderGrid::insertItemIntoGrid):
1300         (WebCore::RenderGrid::placeItemsOnGrid):
1301         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
1302         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
1303         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
1304         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
1305         (WebCore::RenderGrid::clearGrid):
1306         (WebCore::RenderGrid::cachedGridArea):
1307         (WebCore::RenderGrid::cachedGridSpan):
1308         * rendering/RenderGrid.h:
1309         * rendering/style/GridArea.h: Renamed from Source/WebCore/rendering/style/GridCoordinate.h.
1310         (WebCore::GridSpan::untranslatedDefiniteGridSpan):
1311         (WebCore::GridSpan::translatedDefiniteGridSpan):
1312         (WebCore::GridSpan::indefiniteGridSpan):
1313         (WebCore::GridSpan::operator==):
1314         (WebCore::GridSpan::integerSpan):
1315         (WebCore::GridSpan::untranslatedResolvedInitialPosition):
1316         (WebCore::GridSpan::untranslatedResolvedFinalPosition):
1317         (WebCore::GridSpan::resolvedInitialPosition):
1318         (WebCore::GridSpan::resolvedFinalPosition):
1319         (WebCore::GridSpan::GridSpanIterator::GridSpanIterator):
1320         (WebCore::GridSpan::GridSpanIterator::operator unsigned&):
1321         (WebCore::GridSpan::GridSpanIterator::operator*):
1322         (WebCore::GridSpan::begin):
1323         (WebCore::GridSpan::end):
1324         (WebCore::GridSpan::isTranslatedDefinite):
1325         (WebCore::GridSpan::isIndefinite):
1326         (WebCore::GridSpan::translate):
1327         (WebCore::GridSpan::GridSpan):
1328         (WebCore::GridArea::GridArea):
1329         (WebCore::GridArea::operator==):
1330         (WebCore::GridArea::operator!=):
1331         * rendering/style/GridPositionsResolver.cpp:
1332         * rendering/style/StyleGridData.h:
1333
1334 2016-03-15  Joonghun Park  <jh718.park@samsung.com>
1335
1336         [GTK] Remove duplicate HashMap traversal and unneeded reference count churn in DataObjectGtk::forClipboard
1337         https://bugs.webkit.org/show_bug.cgi?id=155470
1338
1339         Reviewed by Carlos Garcia Campos.
1340
1341         No new tests, no new behaviours.
1342
1343         * platform/gtk/DataObjectGtk.cpp:
1344         (WebCore::DataObjectGtk::forClipboard):
1345
1346 2016-03-15  Manuel Rego Casasnovas  <rego@igalia.com>
1347
1348         [css-grid] Rename GridResolvedPosition to GridPositionsResolver
1349         https://bugs.webkit.org/show_bug.cgi?id=155486
1350
1351         Reviewed by Sergio Villar Senin.
1352
1353         GridResolvedPosition is not storing a position (track or line) anymore.
1354         Currently it's just a class wrapping the methods to resolve
1355         grid positions from style.
1356         Renamed the class to avoid confusions.
1357
1358         No new tests, no change of behavior.
1359
1360         * CMakeLists.txt:
1361         * WebCore.xcodeproj/project.pbxproj:
1362         * rendering/RenderGrid.cpp:
1363         (WebCore::RenderGrid::placeItemsOnGrid):
1364         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
1365         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
1366         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
1367         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
1368         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
1369         * rendering/RenderGrid.h:
1370         * rendering/style/GridCoordinate.h:
1371         * rendering/style/GridPositionsResolver.cpp: Renamed from Source/WebCore/rendering/style/GridResolvedPosition.cpp.
1372         (WebCore::isColumnSide):
1373         (WebCore::isStartSide):
1374         (WebCore::initialPositionSide):
1375         (WebCore::finalPositionSide):
1376         (WebCore::gridLinesForSide):
1377         (WebCore::implicitNamedGridLineForSide):
1378         (WebCore::GridPositionsResolver::isNonExistentNamedLineOrArea):
1379         (WebCore::adjustGridPositionsFromStyle):
1380         (WebCore::GridPositionsResolver::explicitGridColumnCount):
1381         (WebCore::GridPositionsResolver::explicitGridRowCount):
1382         (WebCore::explicitGridSizeForSide):
1383         (WebCore::lookAheadForNamedGridLine):
1384         (WebCore::lookBackForNamedGridLine):
1385         (WebCore::resolveNamedGridLinePositionFromStyle):
1386         (WebCore::definiteGridSpanWithNamedLineSpanAgainstOpposite):
1387         (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
1388         (WebCore::resolveGridPositionAgainstOppositePosition):
1389         (WebCore::GridPositionsResolver::spanSizeForAutoPlacedItem):
1390         (WebCore::resolveGridPositionFromStyle):
1391         (WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
1392         * rendering/style/GridPositionsResolver.h: Renamed from Source/WebCore/rendering/style/GridResolvedPosition.h.
1393         * rendering/style/StyleAllInOne.cpp:
1394
1395 2016-03-15  Miguel Gomez  <magomez@igalia.com>
1396
1397         Leak: Accelerated ImageBufferCairo doesn't destroy the used textures
1398         https://bugs.webkit.org/show_bug.cgi?id=155431
1399
1400         Reviewed by Žan Doberšek.
1401
1402         When using the Cairo backend, add a destructor to ImageBufferData and use it to destroy the
1403         textures created if the buffer is being accelerated.
1404
1405         No new tests, already covered by existing ones.
1406
1407         * platform/graphics/cairo/ImageBufferCairo.cpp:
1408         (WebCore::ImageBufferData::ImageBufferData):
1409         Store the renderingMode flag.
1410         (WebCore::ImageBufferData::~ImageBufferData):
1411         Destroy gl resources if renderingMode is accelerated.
1412         (WebCore::ImageBuffer::ImageBuffer):
1413         Pass renderingMode to the data class and use it fro checks instead of the function parameter.
1414         * platform/graphics/cairo/ImageBufferDataCairo.h:
1415         Add destructor and a renderingMode flag.
1416
1417 2016-03-15  Jiewen Tan  <jiewen_tan@apple.com>
1418
1419         URL Parsing should signal failure for illegal IDN
1420         https://bugs.webkit.org/show_bug.cgi?id=154945
1421         <rdar://problem/8014795>
1422
1423         Reviewed by Brent Fulgham.
1424
1425         WebCore::URL will now invalidate URLs with illegal IDN. And functions inside WebCoreNSURLExtras.h
1426         that deal with IDN mapping will now return nil to signal error.
1427
1428         Test: fast/url/invalid-idn.html
1429
1430         * platform/URL.cpp:
1431         (WebCore::isSchemeFirstChar):
1432         (WebCore::URL::init):
1433         (WebCore::appendEncodedHostname):
1434         (WebCore::encodeHostnames):
1435         (WebCore::encodeRelativeString):
1436         * platform/mac/WebCoreNSURLExtras.h:
1437         * platform/mac/WebCoreNSURLExtras.mm:
1438         (WebCore::mapHostNameWithRange):
1439         (WebCore::hostNameNeedsDecodingWithRange):
1440         (WebCore::hostNameNeedsEncodingWithRange):
1441         (WebCore::decodeHostNameWithRange):
1442         (WebCore::encodeHostNameWithRange):
1443         (WebCore::decodeHostName):
1444         (WebCore::encodeHostName):
1445         (WebCore::collectRangesThatNeedMapping):
1446         (WebCore::mapHostNames):
1447         (WebCore::URLWithData):
1448         (WebCore::dataWithUserTypedString):
1449         (WebCore::URLWithUserTypedString):
1450         (WebCore::URLWithUserTypedStringDeprecated):
1451         (WebCore::userVisibleString):
1452
1453 2016-03-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1454
1455         REGRESSION (r197724): [GTK] Web Inspector: Images being blocked by CSP 2.0
1456         https://bugs.webkit.org/show_bug.cgi?id=155432
1457
1458         Reviewed by Darin Adler.
1459
1460         The GTK+ port Web Inspector uses GResources for all internal
1461         resources (images, fonts, scripts, etc.) that are now blocked by
1462         the CSP. GResouces are like data URLs in practice, so we should
1463         always allow them.
1464
1465         * page/csp/ContentSecurityPolicySourceList.cpp:
1466         (WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar):
1467
1468 2016-03-14  Alex Christensen  <achristensen@webkit.org>
1469
1470         Fix WinCairo build after r198195.
1471
1472         * platform/network/NetworkingContext.h:
1473         curl networking now uses NetworkingContext::storageSession.  That's everybody!
1474
1475 2016-03-14  Per Arne Vollan  <peavo@outlook.com>
1476
1477         [WinCairo] Compile fix.
1478         https://bugs.webkit.org/show_bug.cgi?id=155463
1479
1480         Reviewed by Alex Christensen.
1481
1482         Get the NetworkStorageSession object from the document in the same way as other platforms do.
1483
1484         * loader/CookieJar.cpp:
1485         (WebCore::storageSession):
1486
1487 2016-03-14  Tim Horton  <timothy_horton@apple.com>
1488
1489         <attachment> on iOS should paint its progress indicator instead of a green square
1490         https://bugs.webkit.org/show_bug.cgi?id=155482
1491         <rdar://problem/24805991>
1492
1493         Reviewed by Simon Fraser.
1494
1495         No new tests; there are existing tests that will be enabled shortly.
1496
1497         * rendering/RenderThemeIOS.mm:
1498         (WebCore::getAttachmentProgress):
1499         Clamp progress to 0-1.
1500
1501         (WebCore::paintAttachmentProgress):
1502         Paint a pie.
1503
1504 2016-03-14  Chris Dumez  <cdumez@apple.com>
1505
1506         Unreviewed, rolling out r197981.
1507
1508         Caused a massive PLT regression on Mac.
1509
1510         Reverted changeset:
1511
1512         "Font antialiasing (smoothing) changes when elements are
1513         rendered into compositing layers"
1514         https://bugs.webkit.org/show_bug.cgi?id=23364
1515         http://trac.webkit.org/changeset/197981
1516
1517 2016-03-14  Chris Dumez  <cdumez@apple.com>
1518
1519         Unreviewed, rolling out r198145.
1520
1521         This attempt to disable the feature did not fix the PLT
1522         regression
1523
1524         Reverted changeset:
1525
1526         "Regression(r197981): Huge regression on Mac PLT"
1527         https://bugs.webkit.org/show_bug.cgi?id=155443
1528         http://trac.webkit.org/changeset/198145
1529
1530 2016-03-14  Sam Weinig  <sam@webkit.org>
1531
1532         Remove errant space.
1533
1534         * page/UserContentController.cpp:
1535
1536 2016-03-14  Sam Weinig  <sam@webkit.org>
1537
1538         Fix the windows build.
1539
1540         * page/UserContentController.cpp:
1541
1542 2016-03-14  Sam Weinig  <sam@webkit.org>
1543
1544         Add a baseURL parameter to _WKUserStyleSheet
1545         https://bugs.webkit.org/show_bug.cgi?id=155219
1546
1547         Reviewed by Tim Horton.
1548
1549         - Moves to a model for user content where instead of each page having a WebCore::UserContentController
1550           object, we have an abstract WebCore::UserContentProvider interface that can be implemented at the WebKit
1551           level. For now, legacy WebKit continues to use the old UserContentController, which implements 
1552           WebCore::UserContentProvider, and WebKit2 implements its own implementation so it can store additional
1553           state.
1554
1555         * WebCore.xcodeproj/project.pbxproj:
1556         Add new files.
1557
1558         * dom/ExtensionStyleSheets.cpp:
1559         (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache):
1560         Switch to using forEachUserStyleSheet on the UserContentProvider.
1561
1562         * html/HTMLMediaElement.cpp:
1563         (WebCore::HTMLMediaElement::loadResource):
1564         Remove null check now that we always have a UserContentProvider.
1565
1566         * loader/EmptyClients.cpp:
1567         (WebCore::fillWithEmptyClients):
1568         * loader/EmptyClients.h:
1569         Add new EmptyClients.
1570
1571         * loader/FrameLoader.cpp:
1572         (WebCore::FrameLoader::loadResourceSynchronously):
1573         Remove null check now that we always have a UserContentProvider.
1574
1575         * loader/PingLoader.cpp:
1576         (WebCore::processContentExtensionRulesForLoad):
1577         Remove null check now that we always have a UserContentProvider.
1578
1579         * loader/ResourceLoader.cpp:
1580         (WebCore::ResourceLoader::willSendRequestInternal):
1581         Remove null check now that we always have a UserContentProvider.
1582
1583         * loader/cache/CachedResourceLoader.cpp:
1584         (WebCore::CachedResourceLoader::requestResource):
1585         Remove null check now that we always have a UserContentProvider.
1586
1587         * page/DOMWindow.cpp:
1588         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
1589         Remove null checks now that we always have a UserContentProvider, and userMessageHandlerDescriptors
1590         returns a reference.
1591
1592         (WebCore::DOMWindow::open):
1593         Remove null check now that we always have a UserContentProvider.
1594
1595         * page/Frame.cpp:
1596         (WebCore::Frame::injectUserScripts):
1597         Simplify by lifting document check out of the main loop and using forEachUserScript.
1598
1599         * page/Page.cpp:
1600         (WebCore::Page::Page):
1601         (WebCore::Page::~Page):
1602         (WebCore::Page::userContentProvider):
1603         (WebCore::Page::setUserContentProvider):
1604         (WebCore::Page::setUserContentController): Deleted.
1605         * page/Page.h:
1606         (WebCore::Page::userContentController): Deleted.
1607         * page/PageConfiguration.h:
1608         Store the UserContentProvider in a Ref, and require PageConfigurations to provide one. This
1609         removes a bunch of null checks and simplifies the code.
1610
1611         * page/UserContentController.cpp:
1612         (WebCore::UserContentController::~UserContentController):
1613         (WebCore::UserContentController::forEachUserScript):
1614         (WebCore::UserContentController::forEachUserStyleSheet):
1615         (WebCore::UserContentController::addUserScript):
1616         (WebCore::UserContentController::removeUserScript):
1617         (WebCore::UserContentController::removeUserScripts):
1618         (WebCore::UserContentController::addUserStyleSheet):
1619         (WebCore::UserContentController::removeUserStyleSheet):
1620         (WebCore::UserContentController::removeUserStyleSheets):
1621         (WebCore::UserContentController::addUserMessageHandlerDescriptor):
1622         (WebCore::UserContentController::removeUserMessageHandlerDescriptor):
1623         (WebCore::UserContentController::addUserContentExtension):
1624         (WebCore::UserContentController::removeUserContentExtension):
1625         (WebCore::UserContentController::removeAllUserContentExtensions):
1626         (WebCore::UserContentController::removeAllUserContent):
1627         (WebCore::UserContentController::addPage): Deleted.
1628         (WebCore::UserContentController::removePage): Deleted.
1629         (WebCore::contentExtensionsEnabled): Deleted.
1630         (WebCore::UserContentController::processContentExtensionRulesForLoad): Deleted.
1631         (WebCore::UserContentController::actionsForResourceLoad): Deleted.
1632         * page/UserContentController.h:
1633         (WebCore::UserContentController::userScripts): Deleted.
1634         (WebCore::UserContentController::userStyleSheets): Deleted.
1635         (WebCore::UserContentController::userMessageHandlerDescriptors): Deleted.
1636         Add inheritance from UserContentProvider and simplify things by removing unique_ptrs
1637         that were holding the member variables. There is usually only one UserContentController
1638         so having these in unique_ptrs doesn't make much sense.
1639         
1640         * page/UserContentProvider.cpp: Added.
1641         (WebCore::UserContentProvider::UserContentProvider):
1642         (WebCore::UserContentProvider::~UserContentProvider):
1643         (WebCore::UserContentProvider::addPage):
1644         (WebCore::UserContentProvider::removePage):
1645         (WebCore::UserContentProvider::invalidateInjectedStyleSheetCacheInAllFramesInAllPages):
1646         (WebCore::contentExtensionsEnabled):
1647         (WebCore::UserContentProvider::processContentExtensionRulesForLoad):
1648         (WebCore::UserContentProvider::actionsForResourceLoad):
1649         * page/UserContentProvider.h: Added.
1650         Add abstract class for providing user content and add some helpers on it.
1651
1652         * page/UserMessageHandlerDescriptor.h:
1653         (WebCore::UserMessageHandlerDescriptor::create):
1654         (WebCore::UserMessageHandlerDescriptor::client):
1655         (WebCore::UserMessageHandlerDescriptor::invalidateClient):
1656         * page/UserMessageHandlersNamespace.cpp:
1657         (WebCore::UserMessageHandlersNamespace::handler):
1658         Simplify now that userContentProvider() and userMessageHandlerDescriptors() are references.
1659
1660 2016-03-14  Enrica Casucci  <enrica@apple.com>
1661
1662         iOS: RTFD format is not available in the pasteboard after copy/cut.
1663         https://bugs.webkit.org/show_bug.cgi?id=155477
1664         rdar://problem/23500600
1665
1666         Reviewed by Tim Horton.
1667
1668         WebKit is using UTTypeRTFD instead of UTTypeFlatRTFD that is the
1669         proper RTFD format for pastedboard. I also discovered that, when
1670         we create the NSTextAttachment in the NSAttributedString we produce
1671         from the DOM range, we are not generating a file name with the
1672         appropriate extension for the MIME type. The iOS specific implementation
1673         of the MIMETypeRegistry functions were empty.
1674         There is no need to have a differentiation between OS X and iOS, so
1675         we now have only one file called MIMETypeRegistryCocoa.mm.
1676
1677         * WebCore.xcodeproj/project.pbxproj:
1678         * platform/cocoa/MIMETypeRegistryCocoa.mm: Added.
1679         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
1680         (WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
1681         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
1682         (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
1683         * platform/ios/MIMETypeRegistryIOS.mm: Removed.
1684         * platform/ios/PasteboardIOS.mm:
1685         (WebCore::Pasteboard::read):
1686         (WebCore::Pasteboard::supportedPasteboardTypes):
1687         (WebCore::Pasteboard::hasData):
1688         * platform/ios/PlatformPasteboardIOS.mm:
1689         (WebCore::PlatformPasteboard::write):
1690         * platform/mac/MIMETypeRegistryMac.mm: Removed.
1691
1692 2016-03-14  Daniel Bates  <dabates@apple.com>
1693
1694         Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements
1695         https://bugs.webkit.org/show_bug.cgi?id=155466
1696         <rdar://problem/25152480>
1697
1698         Reviewed by Joseph Pecoraro and Timothy Hatcher.
1699
1700         For convenience, display the SHA-256 Content Security Policy (CSP) hash in the node details
1701         sidebar for the selected HTML script element or HTML style element. A CSP script hash is
1702         only applicable to inline JavaScript scripts. Therefore, we will display a hash for HTML
1703         script elements only if they do not have a src attribute.
1704
1705         Tests: inspector/dom/csp-big5-hash.html
1706                inspector/dom/csp-hash.html
1707
1708         * inspector/InspectorDOMAgent.cpp:
1709         (WebCore::computeContentSecurityPolicySHA256Hash): Added.
1710         (WebCore::InspectorDOMAgent::buildObjectForNode): For an applicable HTML script- or style-
1711         element, pass the computed SHA-256 CSP hash to the Inspector front end.
1712
1713 2016-03-14  Joonghun Park  <jh718.park@samsung.com>
1714
1715         Purge PassRefPtr from ArrayBuffer, ArchiveResource, Pasteboard, LegacyWebArchive and DataObjectGtk
1716         https://bugs.webkit.org/show_bug.cgi?id=150497
1717
1718         Reviewed by Darin Adler.
1719
1720         No new tests, no new behaviours.
1721
1722         * Modules/indexeddb/IDBGetResult.h:
1723         (WebCore::IDBGetResult::IDBGetResult):
1724         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1725         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
1726         * Modules/mediastream/RTCDataChannel.cpp:
1727         (WebCore::RTCDataChannel::didReceiveRawData):
1728         * dom/MessageEvent.cpp:
1729         (WebCore::MessageEvent::MessageEvent):
1730         * dom/MessageEvent.h:
1731         * editing/Editor.cpp:
1732         (WebCore::Editor::selectedRange):
1733         * editing/Editor.h:
1734         * editing/FrameSelection.h:
1735         (WebCore::FrameSelection::toNormalizedRange):
1736         * editing/VisiblePosition.cpp:
1737         (WebCore::makeRange):
1738         * editing/VisiblePosition.h:
1739         * editing/VisibleSelection.cpp:
1740         (WebCore::VisibleSelection::toNormalizedRange):
1741         * editing/VisibleSelection.h:
1742         * editing/VisibleUnits.cpp:
1743         (WebCore::enclosingTextUnitOfGranularity):
1744         (WebCore::wordRangeFromPosition):
1745         (WebCore::rangeExpandedByCharactersInDirectionAtWordBoundary):
1746         (WebCore::rangeExpandedAroundPositionByCharacters):
1747         * editing/VisibleUnits.h:
1748         * editing/cocoa/HTMLConverter.mm:
1749         (HTMLConverter::_addAttachmentForElement):
1750         (fileWrapperForURL):
1751         * editing/efl/EditorEfl.cpp:
1752         (WebCore::Editor::webContentFromPasteboard):
1753         * editing/gtk/EditorGtk.cpp:
1754         (WebCore::createFragmentFromPasteboardData):
1755         (WebCore::Editor::webContentFromPasteboard):
1756         * editing/ios/EditorIOS.mm:
1757         (WebCore::dataInRTFDFormat):
1758         (WebCore::dataInRTFFormat):
1759         (WebCore::Editor::selectionInWebArchiveFormat):
1760         (WebCore::Editor::WebContentReader::addFragment):
1761         (WebCore::Editor::WebContentReader::readWebArchive):
1762         (WebCore::Editor::WebContentReader::readRTFD):
1763         (WebCore::Editor::WebContentReader::readRTF):
1764         (WebCore::Editor::WebContentReader::readImage):
1765         (WebCore::Editor::WebContentReader::readURL):
1766         (WebCore::Editor::webContentFromPasteboard):
1767         (WebCore::Editor::pasteWithPasteboard):
1768         (WebCore::Editor::createFragmentAndAddResources):
1769         (WebCore::Editor::createFragmentForImageResourceAndAddResource):
1770         * editing/mac/EditorMac.mm:
1771         (WebCore::Editor::selectionInWebArchiveFormat):
1772         (WebCore::Editor::adjustedSelectionRange):
1773         (WebCore::dataInRTFDFormat):
1774         (WebCore::dataInRTFFormat):
1775         (WebCore::Editor::dataSelectionForPasteboard):
1776         (WebCore::Editor::WebContentReader::readWebArchive):
1777         (WebCore::Editor::WebContentReader::readRTFD):
1778         (WebCore::Editor::WebContentReader::readRTF):
1779         (WebCore::Editor::WebContentReader::readImage):
1780         (WebCore::Editor::WebContentReader::readURL):
1781         (WebCore::Editor::webContentFromPasteboard):
1782         (WebCore::Editor::createFragmentForImageResourceAndAddResource):
1783         (WebCore::Editor::createFragmentAndAddResources):
1784         * editing/win/EditorWin.cpp:
1785         (WebCore::createFragmentFromPlatformData):
1786         (WebCore::Editor::webContentFromPasteboard):
1787         * inspector/InspectorPageAgent.cpp:
1788         (WebCore::InspectorPageAgent::archive):
1789         * loader/DocumentLoader.cpp:
1790         (WebCore::DocumentLoader::mainResourceData):
1791         (WebCore::DocumentLoader::maybeCreateArchive):
1792         (WebCore::DocumentLoader::addArchiveResource):
1793         (WebCore::DocumentLoader::mainResource):
1794         * loader/DocumentLoader.h:
1795         * loader/FrameLoader.cpp:
1796         (WebCore::FrameLoader::loadArchive):
1797         * loader/SubstituteData.h:
1798         (WebCore::SubstituteData::SubstituteData):
1799         (WebCore::SubstituteData::isValid):
1800         * loader/SubstituteResource.h:
1801         (WebCore::SubstituteResource::data):
1802         (WebCore::SubstituteResource::SubstituteResource):
1803         * loader/appcache/ApplicationCacheGroup.cpp:
1804         (WebCore::ApplicationCacheGroup::didReceiveResponse):
1805         (WebCore::ApplicationCacheGroup::didReceiveData):
1806         (WebCore::ApplicationCacheGroup::didFail):
1807         (WebCore::ApplicationCacheGroup::didReceiveManifestData):
1808         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
1809         * loader/appcache/ApplicationCacheHost.cpp:
1810         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
1811         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
1812         (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
1813         * loader/appcache/ApplicationCacheResource.cpp:
1814         (WebCore::ApplicationCacheResource::ApplicationCacheResource):
1815         (WebCore::ApplicationCacheResource::deliver):
1816         (WebCore::ApplicationCacheResource::estimatedSizeInStorage):
1817         * loader/appcache/ApplicationCacheResource.h:
1818         (WebCore::ApplicationCacheResource::create):
1819         * loader/appcache/ApplicationCacheStorage.cpp:
1820         (WebCore::ApplicationCacheStorage::store):
1821         (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):
1822         * loader/appcache/ApplicationCacheStorage.h:
1823         * loader/archive/ArchiveFactory.cpp:
1824         (WebCore::archiveFactoryCreate):
1825         (WebCore::ArchiveFactory::create):
1826         * loader/archive/ArchiveFactory.h:
1827         * loader/archive/ArchiveResource.cpp:
1828         (WebCore::ArchiveResource::ArchiveResource):
1829         (WebCore::ArchiveResource::create):
1830         * loader/archive/ArchiveResource.h:
1831         * loader/archive/ArchiveResourceCollection.cpp:
1832         (WebCore::ArchiveResourceCollection::addResource):
1833         * loader/archive/ArchiveResourceCollection.h:
1834         * loader/archive/cf/LegacyWebArchive.cpp:
1835         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
1836         (WebCore::LegacyWebArchive::createResource):
1837         (WebCore::LegacyWebArchive::create):
1838         (WebCore::LegacyWebArchive::createFromSelection):
1839         * loader/archive/cf/LegacyWebArchive.h:
1840         * loader/archive/mhtml/MHTMLArchive.cpp:
1841         (WebCore::MHTMLArchive::create):
1842         * loader/archive/mhtml/MHTMLArchive.h:
1843         * loader/archive/mhtml/MHTMLParser.cpp:
1844         (WebCore::MHTMLParser::parseArchive):
1845         (WebCore::MHTMLParser::parseArchiveWithHeader):
1846         (WebCore::MHTMLParser::parseNextPart):
1847         * loader/archive/mhtml/MHTMLParser.h:
1848         * loader/cache/CachedImage.cpp:
1849         (WebCore::CachedImage::didAddClient):
1850         * loader/icon/IconDatabase.cpp:
1851         (WebCore::loadDefaultIconRecord):
1852         * loader/icon/IconRecord.cpp:
1853         (WebCore::IconRecord::setImageData):
1854         * loader/icon/IconRecord.h:
1855         * platform/Pasteboard.h:
1856         * platform/PasteboardStrategy.h:
1857         * platform/PlatformPasteboard.h:
1858         * platform/SharedBuffer.cpp:
1859         (WebCore::SharedBuffer::createArrayBuffer):
1860         (WebCore::utf8Buffer):
1861         * platform/SharedBuffer.h:
1862         (WebCore::SharedBuffer::create):
1863         * platform/cf/SharedBufferCF.cpp:
1864         (WebCore::SharedBuffer::wrapCFData):
1865         * platform/cocoa/NetworkExtensionContentFilter.mm:
1866         (WebCore::NetworkExtensionContentFilter::replacementData):
1867         * platform/cocoa/ParentalControlsContentFilter.mm:
1868         (WebCore::ParentalControlsContentFilter::replacementData):
1869         * platform/graphics/Image.cpp:
1870         (WebCore::Image::setData):
1871         * platform/graphics/Image.h:
1872         * platform/gtk/DataObjectGtk.cpp:
1873         (WebCore::DataObjectGtk::forClipboard):
1874         * platform/gtk/DataObjectGtk.h:
1875         (WebCore::DataObjectGtk::create):
1876         * platform/gtk/PasteboardGtk.cpp:
1877         (WebCore::Pasteboard::Pasteboard):
1878         (WebCore::Pasteboard::dataObject):
1879         * platform/ios/PasteboardIOS.mm:
1880         (WebCore::Pasteboard::read):
1881         * platform/ios/PlatformPasteboardIOS.mm:
1882         (WebCore::PlatformPasteboard::bufferForType):
1883         (WebCore::PlatformPasteboard::readBuffer):
1884         * platform/mac/PasteboardMac.mm:
1885         (WebCore::writeFileWrapperAsRTFDAttachment):
1886         (WebCore::Pasteboard::read):
1887         * platform/mac/PlatformPasteboardMac.mm:
1888         (WebCore::PlatformPasteboard::bufferForType):
1889         * platform/mac/SharedBufferMac.mm:
1890         (WebCore::SharedBuffer::wrapNSData):
1891         (WebCore::SharedBuffer::createFromReadingFile):
1892         * platform/network/MIMEHeader.cpp:
1893         (WebCore::retrieveKeyValuePairs):
1894         (WebCore::MIMEHeader::parseHeader):
1895         * platform/network/MIMEHeader.h:
1896         * platform/soup/SharedBufferSoup.cpp:
1897         (WebCore::SharedBuffer::wrapSoupBuffer):
1898         * platform/win/ClipboardUtilitiesWin.cpp:
1899         (WebCore::fragmentFromFilenames):
1900         (WebCore::fragmentFromCFHTML):
1901         (WebCore::fragmentFromHTML):
1902         * platform/win/ClipboardUtilitiesWin.h:
1903         * platform/win/PasteboardWin.cpp:
1904         (WebCore::Pasteboard::documentFragment):
1905
1906 2016-03-14  Oliver Hunt  <oliver@apple.com>
1907
1908         Temporarily disable the separated heap.
1909         https://bugs.webkit.org/show_bug.cgi?id=155472
1910
1911         Reviewed by Geoffrey Garen.
1912
1913         Temporarily disable this.
1914
1915         * Configurations/FeatureDefines.xcconfig:
1916
1917 2016-03-10  Antonio Gomes  <tonikitoo@webkit.org>
1918
1919         Selecting with shift+drag results in unexpected drag-n-drop
1920         https://bugs.webkit.org/show_bug.cgi?id=155314
1921
1922         Reviewed by Darin Adler.
1923
1924         Test: editing/selection/shift-drag-selection-no-drag-n-drop.html
1925
1926         Whenever user tries to extend an existing text selection by dragging the mouse
1927         (left button hold) with shift key pressed, WebKit enters drag-n-drop mode.
1928         This behavior does not match common editing behavior out there, including other
1929         browsers' (Firefox, Opera/Presto and IE).
1930
1931         Patch changes WebKit so that whenever one extends a selection with mouse
1932         and shift key pressed off of a #text node, it does not enter drag-n-drop mode.
1933
1934         Additionally, patch also adds some further tests to ensure that when
1935         selection is extended off of either a link or an image, drag-n-drop does
1936         get triggered, no matter if shift key is pressed.
1937
1938         * page/EventHandler.cpp:
1939         (WebCore::EventHandler::handleMousePressEvent):
1940
1941 2016-03-14  Brent Fulgham  <bfulgham@apple.com>
1942
1943         REGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
1944         https://bugs.webkit.org/show_bug.cgi?id=155453
1945         <rdar://problem/24879447>
1946
1947         Reviewed by Daniel Bates.
1948
1949         Tested by fast/mediastream/enumerating-crash.html.
1950
1951         * Modules/mediastream/MediaDevicesRequest.cpp:
1952         (WebCore::MediaDevicesRequest::didCompletePermissionCheck): Prevent UserMediaPermissionCheck object from being
1953         destroyed before the method completes.
1954
1955 2016-03-14  Simon Fraser  <simon.fraser@apple.com>
1956
1957         Fix crash when reloading a page using requestAnimationFrame on iOS
1958         https://bugs.webkit.org/show_bug.cgi?id=155465
1959         rdar://problem/25100202
1960
1961         Reviewed by Tim Horton.
1962
1963         On iOS, it's possible for all clients for a DisplayRefreshMonitor
1964         to be unregistered, but still get a subsequent displayDidRefresh() for that monitor.
1965         In this case, we would remove(notFound) which release-asserts.
1966         
1967         Fix by just checking for notFound.
1968         
1969         Unable to test because requestAnimationFrame doesn't work in the simulator.
1970
1971         * platform/graphics/DisplayRefreshMonitorManager.cpp:
1972         (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
1973
1974 2016-03-14  Per Arne Vollan  <peavo@outlook.com>
1975
1976         [WinCairo][MediaFoundation] Implement float versions of MediaPlayer methods.
1977         https://bugs.webkit.org/show_bug.cgi?id=155357
1978
1979         Reviewed by Brent Fulgham.
1980
1981         It is better to implement the float versions of some of the MediaPlayer methods,
1982         since the default implementation of the double versions is to call the float version.
1983         Also added override keyword to overridden methods.
1984
1985         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1986         (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
1987         (WebCore::MediaPlayerPrivateMediaFoundation::seek):
1988         (WebCore::MediaPlayerPrivateMediaFoundation::setRate):
1989         (WebCore::MediaPlayerPrivateMediaFoundation::duration):
1990         (WebCore::MediaPlayerPrivateMediaFoundation::currentTime):
1991         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble): Deleted.
1992         (WebCore::MediaPlayerPrivateMediaFoundation::setRateDouble): Deleted.
1993         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble): Deleted.
1994         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1995
1996 2016-03-14  Tim Horton  <timothy_horton@apple.com>
1997
1998         Revert r194125 and r194186: We're going to fix this a different way.
1999
2000         * page/EventHandler.cpp:
2001         (WebCore::EventHandler::clear):
2002         * page/EventHandler.h:
2003
2004 2016-03-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2005
2006         [Fetch API] FetchLoader should check for empty bodies
2007         https://bugs.webkit.org/show_bug.cgi?id=155440
2008
2009         Reviewed by Darin Adler.
2010
2011         Covered by added tests.
2012
2013         * Modules/fetch/FetchLoader.cpp:
2014         (WebCore::FetchLoader::didFinishLoading): returning empty array buffer/empty string if no data received during loading.
2015
2016 2016-03-14  Chris Dumez  <cdumez@apple.com>
2017
2018         Regression(r197981): Huge regression on Mac PLT
2019         https://bugs.webkit.org/show_bug.cgi?id=155443
2020         <rdar://problem/25113391>
2021
2022         Reviewed by Gavin Barraclough.
2023
2024         We have experience a huge regression on Mac PLT after r197981, so
2025         disable the feature until the performance issue is resolved.
2026
2027         * platform/graphics/ca/GraphicsLayerCA.cpp:
2028         (WebCore::GraphicsLayer::supportsSmoothedLayerText):
2029
2030 2016-03-14  Chris Vienneau  <chris.vno@outlook.com>
2031
2032         PingHandle delete's itself but pointer is still used by handleDataURL
2033         https://bugs.webkit.org/show_bug.cgi?id=154752
2034         <rdar://problem/24872347>
2035
2036         Reviewed by Alex Christensen.
2037
2038         When a PingHandle is destroyed, we should tell its client so that the client can clear the pointer it
2039         holds to the element to avoid accidentally attempting to use deallocated memory.
2040
2041         The ResourceHandle's client member may be null after "didReceiveResponse" is called. We should confirm
2042         the client is still valid after these calls.
2043
2044         * platform/network/DataURL.cpp:
2045         (WebCore::handleDataURL): Check the client pointer before using it.
2046         * platform/network/PingHandle.h:
2047         (WebCore::PingHandle::~PingHandle): Notify the client we are being destroyed.
2048         * platform/platform/network/ResourceHandle.h:
2049
2050 2016-03-14  Zalan Bujtas  <zalan@apple.com>
2051
2052         Negative outline offset could break curved outline-style: auto
2053         https://bugs.webkit.org/show_bug.cgi?id=155416
2054
2055         Reviewed by Tim Horton.
2056
2057         When radius becomes negative the rounded rect could end up being un-renderable -> no rounded corners at all.
2058
2059         Test: fast/inline/hidpi-outline-auto-negative-offset-with-border-radius.html
2060
2061         * platform/graphics/PathUtilities.cpp:
2062         (WebCore::adjustedtRadiiForHuggingCurve):
2063
2064 2016-03-14  Zalan Bujtas  <zalan@apple.com>
2065
2066         [Outline: auto] Fractional radius value could result in non-renderable rounded border.
2067         https://bugs.webkit.org/show_bug.cgi?id=155420
2068
2069         Reviewed by Tim Horton.
2070
2071         RoundedRect::pixelSnappedRoundedRectForPainting ensures that the rounded rect is always renderable.
2072
2073         Test: fast/inline/hidpi-outline-auto-with-fractional-radius.html
2074
2075         * platform/graphics/PathUtilities.cpp:
2076         (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
2077         * platform/graphics/PathUtilities.h:
2078         * rendering/RenderElement.cpp:
2079         (WebCore::RenderElement::paintFocusRing):
2080
2081 2016-03-14  Zalan Bujtas  <zalan@apple.com>
2082
2083         Outline: auto has sharp corners with single line contenteditable.
2084         https://bugs.webkit.org/show_bug.cgi?id=155418
2085
2086         Reviewed by Tim Horton.
2087
2088         Multiple rectangles assumed multiline content and it broke bottomLeft and bottomRight corner check.
2089         This patch adds fast path for polygons with 4 corners.
2090
2091         Test: fast/inline/hidpi-outline-auto-with-one-focusring-rect.html
2092
2093         * platform/graphics/PathUtilities.cpp:
2094         (WebCore::cornerType):
2095         (WebCore::cornerTypeForMultiline):
2096         (WebCore::rectFromPolygon):
2097         (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
2098
2099 2016-03-14  Joanmarie Diggs  <jdiggs@igalia.com>
2100
2101         [AX] SVG element with child desc not exposed
2102         https://bugs.webkit.org/show_bug.cgi?id=155374
2103
2104         Reviewed by Darin Adler.
2105
2106         Covered by the accessibility/w3c-svg-roles.html test, which was updated.
2107
2108         AccessibilitySVGRoot is now a subclass of AccessibilitySVGElement, which
2109         exposes SVG elements with a child desc element as per the specification.
2110         Also made existing protected methods private.
2111
2112         * accessibility/AccessibilitySVGElement.h:
2113         * accessibility/AccessibilitySVGRoot.cpp:
2114         (WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
2115         (WebCore::AccessibilitySVGRoot::parentObject):
2116         * accessibility/AccessibilitySVGRoot.h:
2117
2118 2016-03-14  Alexey Proskuryakov  <ap@apple.com>
2119
2120         Build fix.
2121
2122         * Modules/fetch/FetchBodyOwner.cpp:
2123         (WebCore::FetchBodyOwner::loadedBlobAsText):
2124
2125 2016-03-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2126
2127         [Fetch API] Implement data resolution for blob stored in Body
2128         https://bugs.webkit.org/show_bug.cgi?id=155359
2129
2130         Reviewed by Darin Adler.
2131
2132         Introducing FetchLoader as a wrapper around ThreadableLoader to load resources.
2133         FetchLoader can retrieve data as text or array buffer. It only supports blob currently.
2134
2135         Introducing FetchLoaderClient interface and FetchBodyOwner::BlobLoader as specifc blob loader client.
2136
2137         Covered by existing rebased tests.
2138
2139         * CMakeLists.txt:
2140         * Modules/fetch/FetchBody.cpp:
2141         (WebCore::FetchBody::loadingType):
2142         (WebCore::FetchBody::loadedAsArrayBuffer):
2143         (WebCore::FetchBody::loadedAsText):
2144         * Modules/fetch/FetchBody.h:
2145         * Modules/fetch/FetchBodyOwner.cpp: Added.
2146         (WebCore::FetchBodyOwner::FetchBodyOwner):
2147         (WebCore::FetchBodyOwner::loadBlob):
2148         (WebCore::FetchBodyOwner::finishBlobLoading):
2149         (WebCore::FetchBodyOwner::blobLoadingFailed):
2150         (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
2151         * Modules/fetch/FetchBodyOwner.h:
2152         (WebCore::FetchBodyOwner::loadedBlobAsText):
2153         (WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer):
2154         (WebCore::FetchBodyOwner::blobLoadingSucceeded):
2155         * Modules/fetch/FetchLoader.cpp: Added.
2156         (WebCore::FetchLoader::start):
2157         (WebCore::FetchLoader::FetchLoader):
2158         (WebCore::FetchLoader::stop):
2159         (WebCore::FetchLoader::didReceiveResponse):
2160         (WebCore::FetchLoader::didReceiveData):
2161         (WebCore::FetchLoader::didFinishLoading):
2162         (WebCore::FetchLoader::didFail):
2163         * Modules/fetch/FetchLoader.h: Added.
2164         * Modules/fetch/FetchLoaderClient.h: Added.
2165         (WebCore::FetchLoaderClient::~FetchLoaderClient):
2166         (WebCore::FetchLoaderClient::didReceiveResponse):
2167         (WebCore::FetchLoaderClient::didFinishLoadingAsText):
2168         (WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer):
2169         * WebCore.xcodeproj/project.pbxproj:
2170
2171 2016-03-14  Frederic Wang  <fwang@igalia.com>
2172
2173         Make MathML colspan/rowspan consistent with HTML table cells.
2174         https://bugs.webkit.org/show_bug.cgi?id=150253
2175
2176         Reviewed by Martin Robinson.
2177
2178         Test: mathml/rowspan-crash.xhtml
2179
2180         We make MathMLElement::colSpan and MathMLElement::rowSpan consistent with the corresponding functions in HTMLTableCellElement.cpp.
2181         These functions now return unsigned integers, use the same parsing functions and set a maximum for rowspan.
2182         This latter change fixes crash/timeout with large values of rowspan.
2183
2184         * mathml/MathMLElement.cpp: Include HTMLParserIdioms to use limitToOnlyHTMLNonNegative.
2185         (WebCore::MathMLElement::colSpan): Use unsigned integer and limitToOnlyHTMLNonNegative.
2186         (WebCore::MathMLElement::rowSpan): ditto. We also use the same maximum limit as HTMLTableCellElement.
2187         * mathml/MathMLElement.h: Make colSpan and rowSpan return unsigned integers.
2188
2189 2016-03-14  Tomas Popela  <tpopela@redhat.com>
2190
2191         Enable GSS-Negotiate support in libsoup
2192         https://bugs.webkit.org/show_bug.cgi?id=155354
2193
2194         Reviewed by Carlos Garcia Campos.
2195
2196         Enable the SOUP_TYPE_AUTH_NEGOTIATE feature if libsoup was compiled
2197         with the GSS-Negotiate support.
2198
2199         * platform/network/soup/SoupNetworkSession.cpp:
2200         (WebCore::SoupNetworkSession::SoupNetworkSession):
2201
2202 2016-03-14  Ryosuke Niwa  <rniwa@webkit.org>
2203
2204         Add slotchange event
2205         https://bugs.webkit.org/show_bug.cgi?id=155424
2206         <rdar://problem/24997534>
2207
2208         Reviewed by Antti Koivisto.
2209
2210         Added `slotchange` event as discussed on https://github.com/w3c/webcomponents/issues/288.
2211
2212         While the exact semantics of it could still evolve over time, this patch implements as
2213         an asynchronous event that fires on a slot element whenever its distributed nodes change
2214         (flattened assigned nodes):
2215         http://w3c.github.io/webcomponents/spec/shadow/#dfn-distributed-nodes
2216
2217         Since inserting or removing an element from a shadow host could needs to enqueue this event
2218         on the right slot element, this patch moves the invalidation point of element removals and
2219         insertions from Element::childrenChanged to Element::insertedInto and Element::removedFrom.
2220         Text nodes are still invalidated at Element::childrenChanged for performance reasons
2221         since it could only appear within a default slot element.
2222
2223         Because this more fine-grained invalidation needs to be overridden by HTMLDetailsElement,
2224         we now subclass SlotAssignment in HTMLDetailsElement instead of passing in a std::function.
2225
2226         Test: fast/shadow-dom/slotchange-event.html
2227
2228         * dom/Document.cpp:
2229         (WebCore::Document::enqueueSlotchangeEvent): Added.
2230         * dom/Document.h:
2231         * dom/Element.cpp:
2232         (WebCore::Element::attributeChanged): Call hostChildElementDidChangeSlotAttr.
2233         (WebCore::Element::insertedInto): Call hostChildElementDidChange.
2234         (WebCore::Element::removedFrom): Ditto.
2235         (WebCore::Element::childrenChanged): Don't invalidate the slots on ElementInserted and
2236         ElementRemoved since they're now done in Element::insertedInto and Element::removedFrom.
2237         * dom/Event.cpp:
2238         (WebCore::Event::scoped): slotchange event is scoped.
2239         * dom/EventNames.h: Added eventNames().slotchange.
2240         * dom/ShadowRoot.cpp:
2241         (WebCore::ShadowRoot::invalidateSlotAssignments): Deleted.
2242         (WebCore::ShadowRoot::invalidateDefaultSlotAssignments): Deleted.
2243         * dom/ShadowRoot.h:
2244         (ShadowRoot): Added more fine-grained invalidators, mirroring changes to SlotAssignment.
2245         * dom/SlotAssignment.cpp:
2246         (WebCore::SlotAssignment::SlotAssignment): Removed a variant that takes SlotNameFunction
2247         since HTMLDetailsElement now subclasses SlotAssignment.
2248         (WebCore::SlotAssignment::~SlotAssignment): Added now that the class is virtual.
2249         (WebCore::recursivelyFireSlotChangeEvent): Added.
2250         (WebCore::SlotAssignment::didChangeSlot): Added. Invalidates the style tree only if there
2251         is a corresponding slot element, and fires slotchange event. When the slot element we found
2252         in this shadow tree is assigned to a slot element inside an inner shadow tree, recursively
2253         fire slotchange event on each such inner slots.
2254         (WebCore::SlotAssignment::hostChildElementDidChange): Added. Update the matching slot when
2255         an element is inserted or removed under a shadow host.
2256         (WebCore::SlotAssignment::assignedNodesForSlot): Removed the superfluous early exit to an
2257         release assert since addSlotElementByName should always create a SlotInfo for each element.
2258         (WebCore::SlotAssignment::slotNameForHostChild): Added. This is the equivalent of old
2259         m_slotNameFunction which DetailsSlotAssignment overrides.
2260         (WebCore::SlotAssignment::invalidateDefaultSlot): Deleted.
2261         (WebCore::SlotAssignment::findFirstSlotElement): Added an assertion. slotInfo.element must
2262         be nullptr if elementCount is 0, and elementCount must be 0 if slotInfo.element is nullptr
2263         after calling resolveAllSlotElements, which traverses the entire shadow tree to find all
2264         slot elements.
2265         (WebCore::SlotAssignment::assignSlots):
2266         * dom/SlotAssignment.h: Implemented inline functions of ShadowRoot here to avoid including
2267         SlotAssignment.h in ShadowRoot.h. Not inlining them results in extra function calls for all
2268         builtin elements with shadow root without slot elements, which impacts performance.
2269         (WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost): Added.
2270         (WebCore::ShadowRoot::didChangeDefaultSlot): Added.
2271         (WebCore::ShadowRoot::hostChildElementDidChange): Added.
2272         (WebCore::ShadowRoot::hostChildElementDidChangeSlotAttribute): Added.
2273         (WebCore::ShadowRoot::innerSlotDidChange):
2274         * html/HTMLDetailsElement.cpp:
2275         (WebCore::DetailsSlotAssignment): Added. Subclasses SlotAssignment to override
2276         hostChildElementDidChange and slotNameForHostChild.
2277         (WebCore::DetailsSlotAssignment::hostChildElementDidChange): Added. We don't check if this
2278         is the first summary element since we don't know the answer when this function is called
2279         inside Element::removedFrom.
2280         (WebCore::DetailsSlotAssignment::slotNameForHostChild): Renamed from slotNameFunction. Also
2281         removed the code to return nullAtom when details element is not open as that messes up new
2282         fine-grained invalidation. Insert/remove the slot element in parseAttribute instead.
2283         (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot): Don't insert the slot element for
2284         the summary since the details element is not open now.
2285         (WebCore::HTMLDetailsElement::parseAttribute): Remove and insert the slot element for the
2286         summary here instead of changing the behavior of slotNameForHostChild.
2287         * html/HTMLDetailsElement.h:
2288         * html/HTMLSlotElement.cpp:
2289         (WebCore::HTMLSlotElement::enqueueSlotChangeEvent): Added. Enqueues a new slotchange event
2290         if we haven't done so for this element yet.
2291         (WebCore::HTMLSlotElement::dispatchEvent): Added. Clear m_hasEnqueuedSlotChangeEvent when
2292         dispatching a slotchange event so that a subsequent call to enqueueSlotChangeEvent would
2293         enqueue a new event. Note scripts call EventTarget::dispatchEventForBindings instead.
2294         * html/HTMLSlotElement.h:
2295
2296 2016-03-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2297
2298         Introduce CallWith=Document in binding generator
2299         https://bugs.webkit.org/show_bug.cgi?id=155358
2300
2301         Reviewed by Darin Adler.
2302
2303         Covered by existing tests and binding test.
2304
2305         * Modules/notifications/Notification.cpp:
2306         (WebCore::Notification::permission): Taking a Document& instead of ScriptExecutionContext&.
2307         (WebCore::Notification::requestPermission): Ditto.
2308         * Modules/notifications/Notification.h:
2309         * Modules/notifications/Notification.idl: Using CallWith=Document.
2310         * bindings/scripts/CodeGeneratorJS.pm: Adding support for CallWith=Document and changed name from scriptContext to context.
2311         (GenerateCallWith):
2312         (GenerateConstructorDefinition):
2313         * bindings/scripts/IDLAttributes.txt: Adding support for CallWith=Document.
2314         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2315         (webkit_dom_test_obj_with_document_argument):
2316         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2317         * bindings/scripts/test/JS/JSTestInterface.cpp:
2318         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
2319         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2320         * bindings/scripts/test/JS/JSTestObj.cpp:
2321         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
2322         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
2323         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
2324         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2325         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
2326         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
2327         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
2328         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
2329         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2330         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
2331         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
2332         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
2333         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
2334         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
2335         (WebCore::jsTestObjPrototypeFunctionWithDocumentArgument):
2336         * bindings/scripts/test/ObjC/DOMTestObj.h:
2337         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2338         (-[DOMTestObj withDocumentArgument]):
2339         * bindings/scripts/test/TestObj.idl: Adding binding test.
2340         * page/DOMWindow.cpp:
2341         (WebCore::DOMWindow::focus): Taking a Document& instead of ScriptExecutionContext&.
2342         (WebCore::DOMWindow::close): Ditto.
2343         * page/DOMWindow.h:
2344         * page/DOMWindow.idl:
2345         * page/History.cpp:
2346         (WebCore::History::back): Ditto.
2347         (WebCore::History::forward): Ditto.
2348         (WebCore::History::go): Ditto.
2349         * page/History.h:
2350         * page/History.idl:
2351         * testing/Internals.cpp:
2352         (WebCore::InspectorStubFrontend::closeWindow): Calling DOMWindow::close() directly.
2353
2354 2016-03-13  Joseph Pecoraro  <pecoraro@apple.com>
2355
2356         Remove ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX) guards
2357         https://bugs.webkit.org/show_bug.cgi?id=155417
2358
2359         Reviewed by Yusuke Suzuki.
2360
2361         * Configurations/FeatureDefines.xcconfig:
2362
2363 2016-03-13  Sam Weinig  <sam@webkit.org>
2364
2365         Implement unprivileged execCommand("copy") and execCommand("cut")
2366         <rdar://problem/24354406>
2367         https://bugs.webkit.org/show_bug.cgi?id=146336
2368
2369         Reviewed by Dean Jackson.
2370
2371         Test: editing/execCommand/clipboard-access-with-user-gesture.html
2372
2373         * WebCore.xcodeproj/project.pbxproj:
2374         Add new files.
2375
2376         * editing/ClipboardAccessPolicy.h:
2377         Added.
2378
2379         * editing/EditorCommand.cpp:
2380         (WebCore::defaultValueForSupportedCopyCut):
2381         (WebCore::supportedCopyCut):
2382         Match other browsers and allow the copy and cut commands
2383         to be executed when there is a user gesture.
2384
2385         * page/Settings.h:
2386         Add include of ClipboardAccessPolicy.h.
2387
2388         * page/Settings.in:
2389         Add new setting for ClipboardAccessPolicy
2390
2391 2016-03-13  Ryosuke Niwa  <rniwa@webkit.org>
2392
2393         REGRESSION (r190840): crash inside details element's slotNameFunction
2394         https://bugs.webkit.org/show_bug.cgi?id=155388
2395
2396         Reviewed by Antti Koivisto.
2397
2398         The bug was caused by HTMLDetailsElement::isActiveSummary calling findAssignedSlot with a summary element
2399         inside the shadow tree of the detials element. Fixed it by existing early when the summary element passed
2400         to isActiveSummary is not a direct child of the details element.
2401
2402         Test: fast/html/details-summary-tabindex-crash.html
2403
2404         * dom/ShadowRoot.cpp:
2405         (WebCore::ShadowRoot::findAssignedSlot): Added an assertion for regression testing.
2406         * dom/SlotAssignment.cpp:
2407         (WebCore::SlotAssignment::findAssignedSlot): Removed the superfluous call to assignSlots added in r190840.
2408         There is no need to update the slot assignments here (entires in m_slots are added or removed by
2409         addSlotElementByName or removeSlotElementByName and assignSlots only updates assignedNodes in each SlotInfo
2410         which is never used in this function or findFirstSlotElement.
2411         * html/HTMLDetailsElement.cpp:
2412         (WebCore::HTMLDetailsElement::isActiveSummary): Fixed the bug.
2413
2414 2016-03-13  Antti Koivisto  <antti@apple.com>
2415
2416         ComposedTreeIterator fails to traverse slots if root is shadow host
2417         https://bugs.webkit.org/show_bug.cgi?id=155407
2418
2419         Reviewed by Darin Adler.
2420
2421         Test: fast/shadow-dom/composed-tree-shadow-subtree.html
2422
2423         * dom/ComposedTreeIterator.cpp:
2424         (WebCore::ComposedTreeIterator::ComposedTreeIterator):
2425
2426             Traversal functions assume m_contextStack is deeper than 1 before they need to enter slot traversal code paths.
2427             Call initializeContextStack in case of shadow host which does the right thing.
2428
2429         (WebCore::ComposedTreeIterator::traverseSiblingInSlot):
2430         (WebCore::composedTreeAsText):
2431
2432             Add option to include pointers as debugging aid.
2433
2434         * dom/ComposedTreeIterator.h:
2435         (WebCore::composedTreeChildren):
2436
2437 2016-03-12  Sam Weinig  <sam@webkit.org>
2438
2439         WebKit can easily crash below NetworkSession::dataTaskForIdentifier() with NSURLSession enabled
2440         <rdar://problem/25129946>
2441         https://bugs.webkit.org/show_bug.cgi?id=155401
2442
2443         Reviewed by Alex Christensen.
2444
2445         Add a SessionID as a member of NetworkStorageSession. This allows us to avoid having HashMaps
2446         to map between the two types.
2447
2448         * platform/network/NetworkStorageSession.h:
2449         (WebCore::NetworkStorageSession::sessionID):
2450         (WebCore::NetworkStorageSession::credentialStorage):
2451         (WebCore::NetworkStorageSession::platformSession):
2452         * platform/network/NetworkStorageSessionStub.cpp:
2453         (WebCore::NetworkStorageSession::NetworkStorageSession):
2454         (WebCore::NetworkStorageSession::context):
2455         (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
2456         (WebCore::defaultSession):
2457         (WebCore::NetworkStorageSession::defaultStorageSession):
2458         (WebCore::NetworkStorageSession::switchToNewTestingSession):
2459         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2460         (WebCore::NetworkStorageSession::NetworkStorageSession):
2461         (WebCore::NetworkStorageSession::switchToNewTestingSession):
2462         (WebCore::NetworkStorageSession::defaultStorageSession):
2463         (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
2464         * platform/network/soup/NetworkStorageSessionSoup.cpp:
2465         (WebCore::NetworkStorageSession::NetworkStorageSession):
2466         (WebCore::NetworkStorageSession::defaultStorageSession):
2467         (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
2468         (WebCore::NetworkStorageSession::switchToNewTestingSession):
2469         (WebCore::NetworkStorageSession::soupNetworkSession):
2470
2471 2016-03-13  Jon Lee  <jonlee@apple.com>
2472
2473         getUserMedia requests from the main frame should be treated the same as requests from an iframe with the same origin
2474         https://bugs.webkit.org/show_bug.cgi?id=155405
2475         <rdar://problem/25131007>
2476
2477         Reviewed by Eric Carlson.
2478
2479         When gUM is called from the main frame, or from a subframe with the same origin, the
2480         top level document origin should be the same.
2481
2482         * Modules/mediastream/UserMediaRequest.cpp:
2483         (WebCore::UserMediaRequest::userMediaDocumentOrigin): Reverse the logic so that it is similar
2484         to topLevelDocumentOrigin.
2485         (WebCore::UserMediaRequest::topLevelDocumentOrigin): Return the top origin always.
2486
2487 2016-03-13  David Kilzer  <ddkilzer@apple.com>
2488
2489         REGRESSION (r198079): Windows build broke because of "%PRId64" format specifier
2490
2491         * platform/network/ParsedContentRange.cpp: Add #include
2492         <wtf/StdLibExtras.h> and remove local definition of "PRId64".
2493
2494 2016-03-13  Joonghun Park  <jh718.park@samsung.com>
2495
2496         [EFL] Fix debug build error since r197690. Unreviewed.
2497         https://bugs.webkit.org/show_bug.cgi?id=155408
2498
2499         Unreviewed. Change %lld to %PRId instead to correct the error below.
2500         error: format ‘%lld’ expects argument of type ‘long long int’,
2501         but argument 5 has type ‘std::chrono::duration<long int, std::ratio<1l, 1000l> >::rep
2502         {aka long int}’ [-Werror=format=]
2503
2504         * page/DOMTimer.cpp:
2505         (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
2506
2507 2016-03-12  Myles C. Maxfield  <mmaxfield@apple.com>
2508
2509         [Cocoa] Remove typedef from NSScrollerImp to ScrollbarPainter
2510         https://bugs.webkit.org/show_bug.cgi?id=155379
2511
2512         Reviewed by Beth Dakin.
2513
2514         There's no reason to not call them what they are.
2515
2516         No new tests because there is no behavior change.
2517
2518         * page/scrolling/AsyncScrollingCoordinator.cpp:
2519         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2520         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2521         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
2522         (WebCore::ScrollingStateFrameScrollingNode::setScrollerImpsFromScrollbars):
2523         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars): Deleted.
2524         * page/scrolling/ScrollingStateFrameScrollingNode.h:
2525         * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
2526         (WebCore::ScrollingStateFrameScrollingNode::setScrollerImpsFromScrollbars):
2527         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars): Deleted.
2528         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2529         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2530         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
2531         (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac):
2532         (WebCore::ScrollingTreeFrameScrollingNodeMac::releaseReferencesToScrollerImpsOnTheMainThread):
2533         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
2534         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
2535         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
2536         (WebCore::ScrollingTreeFrameScrollingNodeMac::releaseReferencesToScrollbarPaintersOnTheMainThread): Deleted.
2537         * platform/ScrollbarThemeComposite.h:
2538         * platform/mac/ScrollAnimatorMac.h:
2539         * platform/mac/ScrollAnimatorMac.mm:
2540         (scrollbarPainterForScrollbar):
2541         (-[WebScrollerImpDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
2542         (-[WebScrollerImpDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2543         (-[WebScrollerImpDelegate scrollerImp:animateTrackAlphaTo:duration:]):
2544         (-[WebScrollerImpDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
2545         (-[WebScrollerImpDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
2546         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2547         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2548         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
2549         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
2550         (WebCore::ScrollAnimatorMac::mouseIsDownInScrollbar):
2551         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2552         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
2553         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2554         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2555         (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
2556         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
2557         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
2558         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
2559         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
2560         (WebCore::ScrollAnimatorMac::cancelAnimations):
2561         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2562         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
2563         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]): Deleted.
2564         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): Deleted.
2565         (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): Deleted.
2566         (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]): Deleted.
2567         (-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]): Deleted.
2568         * platform/mac/ScrollbarThemeMac.h:
2569         * platform/mac/ScrollbarThemeMac.mm:
2570         (WebCore::scrollbarMap):
2571         (+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
2572         (WebCore::ScrollbarThemeMac::registerScrollbar):
2573         (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
2574         (WebCore::ScrollbarThemeMac::painterForScrollbar):
2575         (WebCore::ScrollbarThemeMac::scrollbarThickness):
2576         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
2577         (WebCore::ScrollbarThemeMac::hasThumb):
2578         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
2579         (WebCore::scrollbarPainterPaint):
2580
2581 2016-03-12  Dean Jackson  <dino@apple.com>
2582
2583         REGRESSION (r188647): Teamtreehouse website sidebar buttons are not rendered
2584         https://bugs.webkit.org/show_bug.cgi?id=155400
2585         <rdar://problem/24818602>
2586
2587         Reviewed by Anders Carlsson.
2588
2589         When we unprefixed CSS filters we accidentally
2590         stopped SVG elements that use the CSS filter shorthands
2591         from rendering. We still don't actually support
2592         the shorthands in this case, but we should render
2593         the element without the filter.
2594
2595         Tests: css3/filters/filters-on-svg-element.html
2596                css3/filters/filters-on-svg-root.html
2597
2598         * rendering/style/RenderStyle.cpp:
2599         (WebCore::RenderStyle::hasReferenceFilterOnly): Add
2600         this new function that tells us if we have the
2601         style of filter that we can handle in SVG content.
2602         * rendering/style/RenderStyle.h:
2603         * rendering/svg/SVGRenderingContext.cpp:
2604         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2605         We can mark an element as ready to render if it
2606         has a shorthand filter.
2607
2608 2016-03-12  Myles C. Maxfield  <mmaxfield@apple.com>
2609
2610         Delete dead SVG Font code
2611         https://bugs.webkit.org/show_bug.cgi?id=154718
2612
2613         Reviewed by Antti Koivisto.
2614
2615         All the ports have adopted the SVG -> OTF Font Converter, so there will never
2616         be an instantiation of a font backed by a DOM subtree. We can remove all the
2617         infrastructure used to support that.
2618
2619         No new tests because there is no behavior change.
2620
2621         * CMakeLists.txt:
2622         * Configurations/FeatureDefines.xcconfig:
2623         * WebCore.order:
2624         * WebCore.xcodeproj/project.pbxproj:
2625         * css/CSSFontFaceSource.cpp:
2626         (WebCore::CSSFontFaceSource::CSSFontFaceSource): Deleted.
2627         (WebCore::CSSFontFaceSource::font): Deleted.
2628         * css/CSSFontFaceSource.h:
2629         * loader/cache/CachedFont.cpp:
2630         * loader/cache/CachedSVGFont.cpp:
2631         (WebCore::CachedSVGFont::createFont): Deleted.
2632         (WebCore::CachedSVGFont::ensureCustomFontData): Deleted.
2633         * loader/cache/CachedSVGFont.h:
2634         * platform/graphics/Font.cpp:
2635         (WebCore::Font::Font):
2636         (WebCore::fillGlyphPage):
2637         (WebCore::Font::description): Deleted.
2638         (WebCore::Font::createScaledFont): Deleted.
2639         (WebCore::Font::applyTransforms): Deleted.
2640         * platform/graphics/Font.h:
2641         (WebCore::Font::widthForGlyph):
2642         (WebCore::Font::SVGData::~SVGData): Deleted.
2643         (WebCore::Font::create): Deleted.
2644         (WebCore::Font::svgData): Deleted.
2645         (WebCore::Font::isSVGFont): Deleted.
2646         * platform/graphics/win/FontWin.cpp:
2647         * platform/graphics/FontCascade.cpp:
2648         (WebCore::FontCascade::drawText):
2649         (WebCore::FontCascade::drawEmphasisMarks):
2650         (WebCore::FontCascade::glyphDataForCharacter):
2651         (WebCore::FontCascade::adjustSelectionRectForText):
2652         (WebCore::FontCascade::offsetForPosition):
2653         (WebCore::FontCascade::drawEmphasisMarksForSimpleText):
2654         (WebCore::FontCascade::drawGlyphBuffer):
2655         (WebCore::isDrawnWithSVGFont): Deleted.
2656         (WebCore::FontCascade::width): Deleted.
2657         (WebCore::FontCascade::codePath): Deleted.
2658         * platform/graphics/FontCascade.h:
2659         * platform/graphics/GraphicsContext.h:
2660         * platform/graphics/SVGGlyph.cpp: Removed.
2661         (WebCore::processArabicFormDetection): Deleted.
2662         (WebCore::charactersWithArabicForm): Deleted.
2663         (WebCore::isCompatibleArabicForm): Deleted.
2664         (WebCore::isCompatibleGlyph): Deleted.
2665         * platform/graphics/SVGGlyph.h: Removed.
2666         (WebCore::SVGGlyph::SVGGlyph): Deleted.
2667         (WebCore::SVGGlyph::inheritedValue): Deleted.
2668         (WebCore::SVGGlyph::operator==): Deleted.
2669         * platform/graphics/TextRun.cpp:
2670         * platform/graphics/TextRun.h:
2671         (WebCore::TextRun::RenderingContext::~RenderingContext): Deleted.
2672         (WebCore::TextRun::renderingContext): Deleted.
2673         (WebCore::TextRun::setRenderingContext): Deleted.
2674         * platform/graphics/WidthIterator.cpp:
2675         (WebCore::WidthIterator::applyFontTransforms):
2676         (WebCore::WidthIterator::advanceInternal):
2677         (WebCore::WidthIterator::glyphDataForCharacter): Deleted.
2678         * platform/graphics/WidthIterator.h:
2679         (WebCore::WidthIterator::lastGlyphName): Deleted.
2680         (WebCore::WidthIterator::setLastGlyphName): Deleted.
2681         (WebCore::WidthIterator::arabicForms): Deleted.
2682         * platform/graphics/cairo/FontCairo.cpp:
2683         (WebCore::CairoGlyphToPathTranslator::advance):
2684         (WebCore::FontCascade::dashesForIntersectionsWithRect):
2685         (WebCore::CairoGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
2686         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2687         (WebCore::MacGlyphToPathTranslator::advance):
2688         (WebCore::FontCascade::dashesForIntersectionsWithRect):
2689         (WebCore::FontCascade::primaryFontIsSystemFont):
2690         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
2691         (WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
2692         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2693         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Deleted.
2694         * platform/graphics/mac/ComplexTextController.cpp:
2695         (WebCore::TextLayout::isNeeded):
2696         (WebCore::TextLayout::TextLayout):
2697         (WebCore::TextLayout::constructTextRun):
2698         * rendering/EllipsisBox.cpp:
2699         (WebCore::EllipsisBox::paint):
2700         (WebCore::EllipsisBox::selectionRect):
2701         (WebCore::EllipsisBox::paintSelection):
2702         * rendering/InlineTextBox.cpp:
2703         (WebCore::InlineTextBox::localSelectionRect):
2704         (WebCore::InlineTextBox::paint):
2705         (WebCore::InlineTextBox::paintSelection):
2706         (WebCore::InlineTextBox::paintCompositionBackground):
2707         (WebCore::InlineTextBox::paintDocumentMarker):
2708         (WebCore::InlineTextBox::paintTextMatchMarker):
2709         (WebCore::InlineTextBox::offsetForPosition):
2710         (WebCore::InlineTextBox::positionForOffset):
2711         (WebCore::InlineTextBox::constructTextRun):
2712         * rendering/InlineTextBox.h:
2713         * rendering/RenderBlock.cpp:
2714         (WebCore::RenderBlock::constructTextRun):
2715         * rendering/RenderBlock.h:
2716         * rendering/RenderBlockFlow.cpp:
2717         (WebCore::stripTrailingSpace):
2718         * rendering/RenderBlockLineLayout.cpp:
2719         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
2720         * rendering/RenderDeprecatedFlexibleBox.cpp:
2721         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2722         * rendering/RenderFileUploadControl.cpp:
2723         (WebCore::RenderFileUploadControl::paintObject):
2724         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
2725         * rendering/RenderImage.cpp:
2726         (WebCore::RenderImage::setImageSizeForAltText):
2727         (WebCore::RenderImage::paintReplaced):
2728         * rendering/RenderListBox.cpp:
2729         (WebCore::RenderListBox::updateFromElement):
2730         * rendering/RenderListMarker.cpp:
2731         (WebCore::RenderListMarker::paint):
2732         (WebCore::RenderListMarker::computePreferredLogicalWidths):
2733         (WebCore::RenderListMarker::getRelativeMarkerRect):
2734         * rendering/RenderMenuList.cpp:
2735         (RenderMenuList::updateOptionsWidth):
2736         * rendering/RenderText.cpp:
2737         (WebCore::RenderText::widthFromCache):
2738         (WebCore::RenderText::trimmedPrefWidths):
2739         (WebCore::hyphenWidth):
2740         (WebCore::maxWordFragmentWidth):
2741         (WebCore::RenderText::computePreferredLogicalWidths):
2742         (WebCore::RenderText::width):
2743         * rendering/RenderTextControl.cpp:
2744         (WebCore::RenderTextControl::getAverageCharWidth):
2745         * rendering/RenderThemeIOS.mm:
2746         (WebCore::RenderThemeMeasureTextClient::RenderThemeMeasureTextClient):
2747         (WebCore::adjustInputElementButtonStyle):
2748         * rendering/SimpleLineLayout.cpp:
2749         (WebCore::SimpleLineLayout::canUseForFontAndText): Deleted.
2750         * rendering/line/BreakingContext.h:
2751         (WebCore::WordTrailingSpace::WordTrailingSpace):
2752         (WebCore::WordTrailingSpace::width):
2753         (WebCore::measureHyphenWidth):
2754         (WebCore::textWidth):
2755         (WebCore::tryHyphenating):
2756         (WebCore::BreakingContext::handleText):
2757         * rendering/svg/RenderSVGAllInOne.cpp:
2758         * rendering/svg/RenderSVGText.cpp:
2759         * rendering/svg/SVGInlineTextBox.cpp:
2760         (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
2761         (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
2762         (WebCore::SVGInlineTextBox::paintTextWithShadows):
2763         (WebCore::SVGInlineTextBox::constructTextRun): Deleted.
2764         * rendering/svg/SVGInlineTextBox.h:
2765         * rendering/svg/SVGTextLayoutEngine.cpp:
2766         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
2767         * rendering/svg/SVGTextLayoutEngineSpacing.cpp:
2768         (WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning): Deleted.
2769         * rendering/svg/SVGTextLayoutEngineSpacing.h:
2770         * rendering/svg/SVGTextMetrics.cpp:
2771         (WebCore::SVGTextMetrics::SVGTextMetrics):
2772         (WebCore::SVGTextMetrics::constructTextRun): Deleted.
2773         * rendering/svg/SVGTextMetrics.h:
2774         * rendering/svg/SVGTextMetricsBuilder.cpp:
2775         (WebCore::SVGTextMetricsBuilder::advanceSimpleText):
2776         * rendering/svg/SVGTextRunRenderingContext.cpp: Removed.
2777         (WebCore::svgFontAndFontFaceElementForFontData): Deleted.
2778         (WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont): Deleted.
2779         (WebCore::SVGTextRunRenderingContext::applySVGKerning): Deleted.
2780         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator): Deleted.
2781         (WebCore::SVGGlyphToPathTranslator::transform): Deleted.
2782         (WebCore::SVGGlyphToPathTranslator::path): Deleted.
2783         (WebCore::SVGGlyphToPathTranslator::extents): Deleted.
2784         (WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
2785         (WebCore::SVGGlyphToPathTranslator::advance): Deleted.
2786         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator): Deleted.
2787         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Deleted.
2788         (WebCore::missingGlyphForFont): Deleted.
2789         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Deleted.
2790         * rendering/svg/SVGTextRunRenderingContext.h: Removed.
2791         * svg/SVGAllInOne.cpp:
2792         * svg/SVGFontData.cpp: Removed.
2793         (WebCore::SVGFontData::SVGFontData): Deleted.
2794         (WebCore::SVGFontData::initializeFont): Deleted.
2795         (WebCore::SVGFontData::widthForSVGGlyph): Deleted.
2796         (WebCore::SVGFontData::applySVGGlyphSelection): Deleted.
2797         (WebCore::SVGFontData::fillSVGGlyphPage): Deleted.
2798         (WebCore::SVGFontData::fillBMPGlyphs): Deleted.
2799         (WebCore::SVGFontData::fillNonBMPGlyphs): Deleted.
2800         (WebCore::computeNormalizedSpaces): Deleted.
2801         (WebCore::createStringWithMirroredCharacters): Deleted.
2802         * svg/SVGFontData.h: Removed.
2803         (WebCore::SVGFontData::~SVGFontData): Deleted.
2804         (WebCore::SVGFontData::svgFontFaceElement): Deleted.
2805         (WebCore::SVGFontData::horizontalOriginX): Deleted.
2806         (WebCore::SVGFontData::horizontalOriginY): Deleted.
2807         (WebCore::SVGFontData::horizontalAdvanceX): Deleted.
2808         (WebCore::SVGFontData::verticalOriginX): Deleted.
2809         (WebCore::SVGFontData::verticalOriginY): Deleted.
2810         (WebCore::SVGFontData::verticalAdvanceY): Deleted.
2811         * svg/SVGFontElement.cpp:
2812         (WebCore::SVGFontElement::SVGFontElement): Deleted.
2813         (WebCore::SVGFontElement::invalidateGlyphCache): Deleted.
2814         (WebCore::SVGFontElement::firstMissingGlyphElement): Deleted.
2815         (WebCore::SVGFontElement::registerLigaturesInGlyphCache): Deleted.
2816         (WebCore::SVGFontElement::ensureGlyphCache): Deleted.
2817         (WebCore::SVGKerningMap::clear): Deleted.
2818         (WebCore::SVGKerningMap::insert): Deleted.
2819         (WebCore::stringMatchesUnicodeRange): Deleted.
2820         (WebCore::stringMatchesGlyphName): Deleted.
2821         (WebCore::stringMatchesUnicodeName): Deleted.
2822         (WebCore::matches): Deleted.
2823         (WebCore::kerningForPairOfStringsAndGlyphs): Deleted.
2824         (WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs): Deleted.
2825         (WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs): Deleted.
2826         (WebCore::SVGFontElement::collectGlyphsForString): Deleted.
2827         (WebCore::SVGFontElement::collectGlyphsForGlyphName): Deleted.
2828         (WebCore::SVGFontElement::svgGlyphForGlyph): Deleted.
2829         (WebCore::SVGFontElement::missingGlyph): Deleted.
2830         * svg/SVGFontElement.h:
2831         (WebCore::SVGKerning::SVGKerning): Deleted.
2832         (WebCore::SVGKerningMap::isEmpty): Deleted.
2833         * svg/SVGGlyphElement.cpp:
2834         (WebCore::SVGGlyphElement::invalidateGlyphCache): Deleted.
2835         (WebCore::SVGGlyphElement::parseAttribute): Deleted.
2836         (WebCore::SVGGlyphElement::insertedInto): Deleted.
2837         (WebCore::SVGGlyphElement::removedFrom): Deleted.
2838         (WebCore::parseArabicForm): Deleted.
2839         (WebCore::parseOrientation): Deleted.
2840         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes): Deleted.
2841         (WebCore::parseSVGGlyphAttribute): Deleted.
2842         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier): Deleted.
2843         (WebCore::SVGGlyphElement::buildGlyphIdentifier): Deleted.
2844         * svg/SVGGlyphElement.h:
2845         * svg/SVGGlyphMap.h: Removed.
2846         (WebCore::GlyphMapNode::GlyphMapNode): Deleted.
2847         (WebCore::GlyphMapNode::create): Deleted.
2848         (WebCore::SVGGlyphMap::SVGGlyphMap): Deleted.
2849         (WebCore::SVGGlyphMap::addGlyph): Deleted.
2850         (WebCore::SVGGlyphMap::appendToGlyphTable): Deleted.
2851         (WebCore::SVGGlyphMap::compareGlyphPriority): Deleted.
2852         (WebCore::SVGGlyphMap::collectGlyphsForString): Deleted.
2853         (WebCore::SVGGlyphMap::clear): Deleted.
2854         (WebCore::SVGGlyphMap::svgGlyphForGlyph): Deleted.
2855         (WebCore::SVGGlyphMap::glyphIdentifierForGlyphName): Deleted.
2856         * svg/SVGHKernElement.cpp:
2857         (WebCore::SVGHKernElement::insertedInto): Deleted.
2858         (WebCore::SVGHKernElement::removedFrom): Deleted.
2859         * svg/SVGHKernElement.h:
2860         * svg/SVGToOTFFontConversion.cpp:
2861         * svg/SVGToOTFFontConversion.h:
2862         * svg/SVGVKernElement.cpp:
2863         (WebCore::SVGVKernElement::insertedInto): Deleted.
2864         (WebCore::SVGVKernElement::removedFrom): Deleted.
2865         * svg/SVGVKernElement.h:
2866
2867 2016-03-12  Myles C. Maxfield  <mmaxfield@apple.com>
2868
2869         [OS X] Scrollbars of overflow:scroll divs should appear on the left on RTL systems
2870         https://bugs.webkit.org/show_bug.cgi?id=155385
2871
2872         Reviewed by Simon Fraser.
2873
2874         There is already some existing setup for RTL scrollbars. This patch hooks up this
2875         existing support to the OS X triggering mechanism introduced in r197956. It also
2876         fixes up the existing support to function even when the direction of the
2877         RTL-scrollbar div is LTR (this means the contents of the div must be pushed
2878         over by the width of the scrollbar).
2879
2880         Tests: fast/scrolling/rtl-scrollbars-overflow-contents.html
2881                fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html
2882                fast/scrolling/rtl-scrollbars-overflow-padding.html
2883                fast/scrolling/rtl-scrollbars-overflow-simple.html
2884                fast/scrolling/rtl-scrollbars-overflow.html
2885
2886         * rendering/RenderBlock.cpp:
2887         (WebCore::RenderBlock::addOverflowFromPositionedObjects):
2888         (WebCore::RenderBlock::logicalLeftOffsetForContent):
2889         (WebCore::RenderBlock::logicalRightOffsetForContent):
2890         * rendering/RenderBlockFlow.cpp:
2891         (WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):
2892         * rendering/RenderBox.cpp:
2893         (WebCore::RenderBox::overflowClipRect):
2894         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2895         * rendering/RenderLayer.cpp:
2896         (WebCore::RenderLayer::computeScrollDimensions):
2897         * rendering/style/RenderStyle.cpp:
2898         (WebCore::RenderStyle::shouldPlaceBlockDirectionScrollbarOnLogicalLeft):
2899         * rendering/style/RenderStyle.h:
2900
2901 2016-03-12  Zalan Bujtas  <zalan@apple.com>
2902
2903         [Forms: focus] focus rings around text fields do not follow contour (border-radius)
2904         https://bugs.webkit.org/show_bug.cgi?id=154099
2905         rdar://problem/9988429
2906
2907         Reviewed by Tim Horton.
2908
2909         This patch enables outline-style: auto to follow the curve of border-radius.
2910         When both border-radius and outline-style: auto are set, the native focusring painting will take the border-radius values
2911         into account. This is only for outline-style: auto, other non-auto outline styles paint as if there
2912         was no border-radius set.
2913         It supports both single and multiline content with joint rectangles.
2914         However in case of disjoint rectangles, we fallback to the non-radius drawing.
2915
2916         Tests: fast/inline/hidpi-outline-auto-with-border-radius-horizontal-ltr.html
2917                fast/inline/hidpi-outline-auto-with-border-radius-horizontal-rtl.html
2918                fast/inline/hidpi-outline-auto-with-border-radius-vertical-ltr.html
2919                fast/inline/hidpi-outline-auto-with-border-radius-vertical-rtl.html
2920
2921         * platform/graphics/GraphicsContext.h:
2922         * platform/graphics/Path.cpp:
2923         (WebCore::Path::addBeziersForRoundedRect):
2924         * platform/graphics/Path.h:
2925         (WebCore::Path::circleControlPoint):
2926         * platform/graphics/PathUtilities.cpp:
2927         (WebCore::polygonsForRect):
2928         (WebCore::PathUtilities::pathsWithShrinkWrappedRects):
2929         (WebCore::startAndEndPointsForCorner):
2930         (WebCore::cornerType):
2931         (WebCore::controlPointsForBezierCurve):
2932         (WebCore::adjustedtRadiiForHuggingCurve):
2933         (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
2934         * platform/graphics/PathUtilities.h:
2935         * platform/graphics/mac/GraphicsContextMac.mm:
2936         (WebCore::GraphicsContext::drawFocusRing):
2937         * rendering/RenderElement.cpp:
2938         (WebCore::RenderElement::paintFocusRing):
2939
2940 2016-03-11  Ryosuke Niwa  <rniwa@webkit.org>
2941
2942         Add Event.deepPath() and Event.scoped
2943         https://bugs.webkit.org/show_bug.cgi?id=153538
2944         <rdar://problem/24363836>
2945
2946         Reviewed by Darin Adler.
2947
2948         Added the support for deepPath(), scoped, and relatedTargetScoped on Event.prototype for shadow DOM:
2949         http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event-interface
2950         and updated the EventPath class to respect scoped and relatedTargetScoped flags as specified at:
2951         http://w3c.github.io/webcomponents/spec/shadow/#get-the-parent
2952
2953         Tests: fast/shadow-dom/Extensions-to-Event-Interface.html
2954                fast/shadow-dom/trusted-event-scoped-flags.html
2955
2956         * bindings/scripts/CodeGeneratorJS.pm:
2957         (GenerateConstructorDefinition): Added the support for Conditional for InitializedByEventConstructor.
2958         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
2959         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
2960         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2961         * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
2962         * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
2963         * bindings/scripts/test/TestEventConstructor.idl: Added a test case for using InitializedByEventConstructor
2964         with Conditional.
2965         * dom/Event.cpp:
2966         (WebCore::Event::Event): Initialize m_scoped and m_relatedTargetScoped from EventInit dictionary.
2967         (WebCore::Event::scoped): Added. Implements http://w3c.github.io/webcomponents/spec/shadow/#scoped-flag
2968         (WebCore::Event::deepPath): Added.
2969         * dom/Event.h:
2970         (WebCore::Event::relatedTargetScoped): Added. Overridden by FocusEvent and MouseEvent to implement
2971         http://w3c.github.io/webcomponents/spec/shadow/#relatedtargetscoped-flag
2972         (WebCore::Event::setEventPath): Added.
2973         (WebCore::Event::clearEventPath): Added.
2974         * dom/Event.idl: Added scoped, relatedTargetScoped, and deepPath() conditionally enabled for shadow DOM.
2975         * dom/EventContext.h:
2976         (WebCore::EventContext::currentTarget):
2977         * dom/EventDispatcher.cpp:
2978         (WebCore::EventDispatcher::dispatchEvent): Set the event path while the event is being dispatched.
2979         * dom/EventPath.cpp:
2980         (WebCore::shouldEventCrossShadowBoundary): Check event.scoped flag instead of hard-coding a list of events here
2981         which has been moved to Event::scoped. See above.
2982         (WebCore::EventPath::setRelatedTarget): Check m_event.relatedTargetScoped() instead of hard-coding a list of
2983         events here. relatedTargetScoped is overridden by FocusEvent and MouseEvent.
2984         (WebCore::EventPath::hasEventListeners): Fixed the misleading variable name.
2985         (WebCore::isUnclosedNodeOf): Added. Implements http://w3c.github.io/webcomponents/spec/shadow/#dfn-unclosed-node
2986         (WebCore::EventPath::computePathDisclosedToTarget): Added. Implements the algorithm to filter event targets:
2987         http://w3c.github.io/webcomponents/spec/shadow/#widl-Event-deepPath-sequence-EventTarget
2988         * dom/EventPath.h:
2989         * dom/FocusEvent.cpp:
2990         (WebCore::FocusEvent::relatedTargetScoped): Returns true when this is a trusted event per:
2991         http://w3c.github.io/webcomponents/spec/shadow/#relatedtargetscoped-flag
2992         * dom/FocusEvent.h:
2993         * dom/MouseEvent.cpp:
2994         (WebCore::MouseEvent::relatedTargetScoped): Ditto.
2995         * dom/MouseEvent.h:
2996
2997 2016-03-11  John Wilander  <wilander@apple.com>
2998
2999         Move prevalent resource classifier from WebCore to WebKit.
3000         https://bugs.webkit.org/show_bug.cgi?id=155242
3001         <rdar://problem/24913272>
3002
3003         Reviewed by Andy Estes.
3004
3005         No new tests since we have yet to decide how to set up tests for prevalent resources.
3006
3007         * loader/ResourceLoadObserver.cpp:
3008         (WebCore::ResourceLoadObserver::logFrameNavigation):
3009         (WebCore::ResourceLoadObserver::logSubresourceLoading):
3010             - Removed calls to old classifier in WebCore.
3011         * loader/ResourceLoadStatistics.cpp:
3012         (WebCore::encodeHashCountedSet):
3013         (WebCore::ResourceLoadStatistics::checkAndSetAsPrevalentResourceIfNecessary): Deleted.
3014         (WebCore::ResourceLoadStatistics::hasPrevalentResourceCharacteristics): Deleted.
3015         * loader/ResourceLoadStatistics.h:
3016             - Deleted old classification functions.
3017         * loader/ResourceLoadStatisticsStore.cpp:
3018         (WebCore::ResourceLoadStatisticsStore::create):
3019         (WebCore::ResourceLoadStatisticsStore::fireDataModificationHandler):
3020         (WebCore::ResourceLoadStatisticsStore::hasEnoughDataForStatisticsProcessing):
3021             - New function to allow for checks before calls to processStatistics.
3022         (WebCore::ResourceLoadStatisticsStore::processStatistics):
3023             - New function that receives a lamda and executes it on every entry in its statistics map.
3024         * loader/ResourceLoadStatisticsStore.h:
3025
3026 2016-03-11  Jiewen Tan  <jiewen_tan@apple.com>
3027
3028         WebKit should not be redirected to an invalid URL
3029         https://bugs.webkit.org/show_bug.cgi?id=155263
3030         <rdar://problem/22820172>
3031
3032         Reviewed by Brent Fulgham.
3033
3034         Test: http/tests/navigation/redirect-to-invalid-url.html
3035
3036         * loader/SubresourceLoader.cpp:
3037         (WebCore::SubresourceLoader::willSendRequestInternal):
3038
3039 2016-03-10  Maksim Kisilev <mkisilev@yandex-team.ru>
3040
3041         Fix typo in StyleTreeResolver.cpp
3042         https://bugs.webkit.org/show_bug.cgi?id=139946
3043
3044         Reviewed by Andy Estes.
3045
3046         The constructor for CheckForVisibilityChangeOnRecalcStyle was improperly comparing the
3047         result of WKContentChange() (which is not a function) to WKContentVisibilityChange. I
3048         believe the above cast would implicitly resolve to WKContentNoChange in all cases,
3049         whether a visibility change had been observed or not.
3050         
3051         This patch corrects this problem. I would expect that this might affect some content
3052         visibility change behavior, but I'm not sure what the appropriate test case would be
3053         since this was apparently found through code inspection.
3054
3055         * style/StyleTreeResolver.cpp:
3056         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle):
3057
3058 2016-03-11  Chris Dumez  <cdumez@apple.com>
3059
3060         iOS-sim debug: WebCoreNSURLSessionTest.BasicOperation and WebCoreNSURLSessionTest.InvalidateEmpty asserting
3061         https://bugs.webkit.org/show_bug.cgi?id=155256
3062
3063         Reviewed by Alexey Proskuryakov.
3064
3065         r197628 consolidated the runtime application checking code for iOS and
3066         Mac. However, while the new code works fine for WebKit2, it is unsafe
3067         on WebKit1 / iOS and hits assertion in debug. The reason is that
3068         applicationBundleIdentifier() for getting called from several threads
3069         (WebThread, UIThread).
3070
3071         To address the problem, this patch renames applicationBundleIdentifier()
3072         to applicationBundleIdentifierOverride() and only initializes the
3073         override upon WebProcess and Network process initialization. We therefore
3074         do not initialize the override in WebKit1 or in the WebKit2 UIProcess.
3075         When the override is not set, we fall back to using the main bundle
3076         identifier (which does the right thing for WebKit1 / WebKit2 UIProcess)
3077         but without caching it to avoid thread safety issues.
3078
3079         No new tests, already covered by API tests currently crashing.
3080
3081         * platform/RuntimeApplicationChecks.mm:
3082         (WebCore::applicationBundleIdentifierOverride):
3083         - Renamed applicationBundleIdentifier() to applicationBundleIdentifierOverride()
3084           and only initialize upon initialization of the WebProcess or the Network
3085           process.
3086         - In debug, set a flag to indicate that the override was already queried.
3087
3088         (WebCore::applicationBundleIdentifier):
3089         New utility function that is returns the application bundle override if it is
3090         set and fallback to calling [[NSBundle mainBundle] bundleIdentifier] otherwise.
3091
3092         (WebCore::setApplicationBundleIdentifier):
3093         Add assertions to make sure that:
3094         1. This is always called from the main thread.
3095         2. The application bundle identifier has not been queried *before* getting
3096            overriden as this would indicate a bug in our code and we would have wrongly
3097            returned the main bundle identifier in such case.
3098
3099         (WebCore::MacApplication::isAppleMail):
3100         (WebCore::MacApplication::isIBooks):
3101         (WebCore::MacApplication::isITunes):
3102         (WebCore::MacApplication::isMicrosoftMessenger):
3103         (WebCore::MacApplication::isAdobeInstaller):
3104         (WebCore::MacApplication::isMicrosoftOutlook):
3105         (WebCore::MacApplication::isQuickenEssentials):
3106         (WebCore::MacApplication::isAperture):
3107         (WebCore::MacApplication::isVersions):
3108         (WebCore::MacApplication::isHRBlock):
3109         (WebCore::MacApplication::isHipChat):
3110         (WebCore::IOSApplication::isMobileSafari):
3111         (WebCore::IOSApplication::isDumpRenderTree):
3112         (WebCore::IOSApplication::isMobileStore):
3113         (WebCore::IOSApplication::isFacebook):
3114         (WebCore::IOSApplication::isDaijisenDictionary):
3115         (WebCore::IOSApplication::isNASAHD):
3116         (WebCore::IOSApplication::isTheEconomistOnIphone):
3117         (WebCore::IOSApplication::isWebProcess):
3118         (WebCore::IOSApplication::isIBooks):
3119         Drop assertions making sure the cached flag is correct. We now have
3120         an assertion to detect this earlier in setApplicationBundleIdentifier().
3121
3122 2016-03-10  Jer Noble  <jer.noble@apple.com>
3123
3124         Web Audio becomes distorted after sample rate changes
3125         https://bugs.webkit.org/show_bug.cgi?id=154538
3126         <rdar://problem/24771292>
3127
3128         Reviewed by Darin Adler.
3129
3130         When the underlying audio hardware sample rate changes, the AudioUnit render callback will begin asking
3131         for fewer or more frames. For example, when the sample rate goes from 44.1kHz to 48kHz, it will ask for
3132         118 samples instead of 128. (And vice-versa, 140 samples instead of 128.) But the Web Audio engine can only
3133         really handle requests in multiples of 128 samples. In the case where there are requests for < 128 samples,
3134         actually render 128, but save off the unrequested samples in a separate bus. Then fill that bus during the
3135         next request.
3136
3137         * platform/audio/AudioBus.cpp:
3138         (WebCore::AudioBus::copyFromRange): Added utility method.
3139         * platform/audio/AudioBus.h:
3140         * platform/audio/ios/AudioDestinationIOS.cpp:
3141         (WebCore::AudioDestinationIOS::AudioDestinationIOS): Create a "spare" bus.
3142         (WebCore::assignAudioBuffersToBus): Moved from inside render.
3143         (WebCore::AudioDestinationIOS::render): Save off extra samples to the "spare" bus.
3144         * platform/audio/ios/AudioDestinationIOS.h:
3145
3146 2016-03-11  Yusuke Suzuki  <utatane.tea@gmail.com>
3147
3148         Unreviewed build fix after r198023.
3149         https://bugs.webkit.org/show_bug.cgi?id=155024
3150
3151         Reviewed by Geoffrey Garen.
3152
3153         Update binding test results.
3154
3155         * bindings/scripts/test/JS/JSTestObj.cpp:
3156         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3157         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3158         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
3159         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3160         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3161
3162 2016-03-11  Ryan Haddad  <ryanhaddad@apple.com>
3163
3164         Unreviewed, rolling out r197984.
3165
3166         This change caused an existing LayoutTest to fail
3167
3168         Reverted changeset:
3169
3170         "WebKit should not be redirected to an invalid URL"
3171         https://bugs.webkit.org/show_bug.cgi?id=155263
3172         http://trac.webkit.org/changeset/197984
3173
3174 2016-03-11  Yusuke Suzuki  <utatane.tea@gmail.com>
3175
3176         [ES6] Implement Reflect.set without receiver support
3177         https://bugs.webkit.org/show_bug.cgi?id=155024
3178
3179         Reviewed by Geoffrey Garen.
3180
3181         CustomSetter returns boolean value that indicates the result of [[Set]].
3182         According to this change, this patch modifies the CodeGeneratorJS and test results.
3183
3184         Currently, DOM elements' [[Set]] return true when the setter is found.
3185         This is good for the first step.
3186
3187         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3188         (WebCore::JSCSSStyleDeclaration::putDelegate):
3189         * bindings/js/JSDOMBinding.cpp:
3190         (WebCore::throwSetterTypeError):
3191         * bindings/js/JSDOMBinding.h:
3192         * bindings/js/JSDOMStringMapCustom.cpp:
3193         (WebCore::JSDOMStringMap::putDelegate):
3194         * bindings/js/JSDOMWindowBase.cpp:
3195         (WebCore::JSDOMWindowBase::updateDocument):
3196         * bindings/js/JSDOMWindowCustom.cpp:
3197         (WebCore::JSDOMWindow::put):
3198         (WebCore::JSDOMWindow::putByIndex):
3199         * bindings/js/JSHTMLAppletElementCustom.cpp:
3200         (WebCore::JSHTMLAppletElement::putDelegate):
3201         * bindings/js/JSHTMLEmbedElementCustom.cpp:
3202         (WebCore::JSHTMLEmbedElement::putDelegate):
3203         * bindings/js/JSHTMLObjectElementCustom.cpp:
3204         (WebCore::JSHTMLObjectElement::putDelegate):
3205         * bindings/js/JSLocationCustom.cpp:
3206         (WebCore::JSLocation::putDelegate):
3207         (WebCore::JSLocationPrototype::putDelegate):
3208         * bindings/js/JSPluginElementFunctions.cpp:
3209         (WebCore::pluginElementCustomPut):
3210         * bindings/js/JSPluginElementFunctions.h:
3211         * bindings/js/JSStorageCustom.cpp:
3212         (WebCore::JSStorage::putDelegate):
3213         * bindings/scripts/CodeGeneratorJS.pm:
3214         (GenerateHeader):
3215         (GenerateImplementation):
3216         (GeneratePrototypeDeclaration):
3217         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3218         (WebCore::setJSTestActiveDOMObjectConstructor):
3219         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
3220         (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):
3221         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3222         (WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor):
3223         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3224         (WebCore::setJSTestCustomNamedGetterConstructor):
3225         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3226         (WebCore::setJSTestEventConstructorConstructor):
3227         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3228         (WebCore::setJSTestEventTargetConstructor):
3229         * bindings/scripts/test/JS/JSTestException.cpp:
3230         (WebCore::setJSTestExceptionConstructor):
3231         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3232         (WebCore::setJSTestGenerateIsReachableConstructor):
3233         * bindings/scripts/test/JS/JSTestInterface.cpp:
3234         (WebCore::setJSTestInterfaceConstructor):
3235         (WebCore::JSTestInterface::put):
3236         (WebCore::JSTestInterface::putByIndex):
3237         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
3238         (WebCore::setJSTestInterfaceImplementsStr2):
3239         (WebCore::setJSTestInterfaceImplementsStr3):
3240         (WebCore::setJSTestInterfaceImplementsNode):
3241         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3242         (WebCore::setJSTestInterfaceSupplementalStr2):
3243         (WebCore::setJSTestInterfaceSupplementalStr3):
3244         (WebCore::setJSTestInterfaceSupplementalNode):
3245         * bindings/scripts/test/JS/JSTestInterface.h:
3246         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3247         (WebCore::setJSTestJSBuiltinConstructorConstructor):
3248         (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
3249         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3250         (WebCore::setJSTestMediaQueryListListenerConstructor):
3251         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3252         (WebCore::setJSTestNamedConstructorConstructor):
3253         * bindings/scripts/test/JS/JSTestNode.cpp:
3254         (WebCore::setJSTestNodeConstructor):
3255         (WebCore::setJSTestNodeName):
3256         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3257         (WebCore::setJSTestNondeterministicConstructor):
3258         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
3259         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
3260         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
3261         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
3262         * bindings/scripts/test/JS/JSTestObj.cpp:
3263         (WebCore::setJSTestObjConstructor):
3264         (WebCore::setJSTestObjConstructorStaticStringAttr):
3265         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
3266         (WebCore::setJSTestObjEnumAttr):
3267         (WebCore::setJSTestObjByteAttr):
3268         (WebCore::setJSTestObjOctetAttr):
3269         (WebCore::setJSTestObjShortAttr):
3270         (WebCore::setJSTestObjUnsignedShortAttr):
3271         (WebCore::setJSTestObjLongAttr):
3272         (WebCore::setJSTestObjLongLongAttr):
3273         (WebCore::setJSTestObjUnsignedLongLongAttr):
3274         (WebCore::setJSTestObjStringAttr):
3275         (WebCore::setJSTestObjTestObjAttr):
3276         (WebCore::setJSTestObjLenientTestObjAttr):
3277         (WebCore::setJSTestObjStringAttrTreatingNullAsEmptyString):
3278         (WebCore::setJSTestObjXMLObjAttr):
3279         (WebCore::setJSTestObjCreate):
3280         (WebCore::setJSTestObjReflectedStringAttr):
3281         (WebCore::setJSTestObjReflectedIntegralAttr):
3282         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
3283         (WebCore::setJSTestObjReflectedBooleanAttr):
3284         (WebCore::setJSTestObjReflectedURLAttr):
3285         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
3286         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
3287         (WebCore::setJSTestObjReflectedCustomURLAttr):
3288         (WebCore::setJSTestObjTypedArrayAttr):
3289         (WebCore::setJSTestObjAttrWithGetterException):
3290         (WebCore::setJSTestObjAttrWithGetterExceptionWithMessage):
3291         (WebCore::setJSTestObjAttrWithSetterException):
3292         (WebCore::setJSTestObjAttrWithSetterExceptionWithMessage):
3293         (WebCore::setJSTestObjStringAttrWithGetterException):
3294         (WebCore::setJSTestObjStringAttrWithSetterException):
3295         (WebCore::setJSTestObjStrictTypeCheckingAttribute):
3296         (WebCore::setJSTestObjCustomAttr):
3297         (WebCore::setJSTestObjOnfoo):
3298         (WebCore::setJSTestObjWithScriptStateAttribute):
3299         (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttribute):
3300         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3301         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
3302         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3303         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
3304         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3305         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3306         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
3307         (WebCore::setJSTestObjConditionalAttr1):
3308         (WebCore::setJSTestObjConditionalAttr2):
3309         (WebCore::setJSTestObjConditionalAttr3):
3310         (WebCore::setJSTestObjConditionalAttr4Constructor):
3311         (WebCore::setJSTestObjConditionalAttr5Constructor):
3312         (WebCore::setJSTestObjConditionalAttr6Constructor):
3313         (WebCore::setJSTestObjAnyAttribute):
3314         (WebCore::setJSTestObjMutablePoint):
3315         (WebCore::setJSTestObjImmutablePoint):
3316         (WebCore::setJSTestObjStrawberry):
3317         (WebCore::setJSTestObjStrictFloat):
3318         (WebCore::setJSTestObjId):
3319         (WebCore::setJSTestObjReplaceableAttribute):
3320         (WebCore::setJSTestObjNullableLongSettableAttribute):
3321         (WebCore::setJSTestObjNullableStringSettableAttribute):
3322         (WebCore::setJSTestObjNullableStringValue):
3323         (WebCore::setJSTestObjAttributeWithReservedEnumType):
3324         (WebCore::setJSTestObjPutForwardsAttribute):
3325         (WebCore::setJSTestObjPutForwardsNullableAttribute):
3326         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3327         (WebCore::setJSTestOverloadedConstructorsConstructor):
3328         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3329         (WebCore::setJSTestOverrideBuiltinsConstructor):
3330         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3331         (WebCore::setJSTestSerializedScriptValueInterfaceConstructor):
3332         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
3333         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
3334         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3335         (WebCore::setJSTestTypedefsConstructor):
3336         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
3337         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
3338         (WebCore::setJSTestTypedefsAttrWithGetterException):
3339         (WebCore::setJSTestTypedefsAttrWithSetterException):
3340         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
3341         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
3342         * bindings/scripts/test/JS/JSattribute.cpp:
3343         (WebCore::setJSattributeConstructor):
3344         * bindings/scripts/test/JS/JSreadonly.cpp:
3345         (WebCore::setJSreadonlyConstructor):
3346         * bridge/c/c_runtime.cpp:
3347         (JSC::Bindings::CField::setValueToInstance):
3348         * bridge/c/c_runtime.h:
3349         * bridge/jsc/BridgeJSC.h:
3350         (JSC::Bindings::Instance::put):
3351         * bridge/objc/objc_runtime.h:
3352         * bridge/objc/objc_runtime.mm:
3353         (JSC::Bindings::ObjcField::setValueToInstance):
3354         (JSC::Bindings::ObjcArray::setValueAt):
3355         (JSC::Bindings::ObjcFallbackObjectImp::put):
3356         * bridge/runtime_array.cpp:
3357         (JSC::RuntimeArray::put):
3358         (JSC::RuntimeArray::putByIndex):
3359         * bridge/runtime_array.h:
3360         * bridge/runtime_object.cpp:
3361         (JSC::Bindings::RuntimeObject::put):
3362         * bridge/runtime_object.h:
3363
3364 2016-03-11  David Kilzer  <ddkilzer@apple.com>
3365
3366         REGRESSION (r197956): WebContent process crashes on launch due to unrecognized selector
3367         <http://webkit.org/b/155356>
3368
3369         Reviewed by Alexey Proskuryakov.
3370
3371         * platform/mac/ScrollableAreaMac.mm:
3372         (WebCore::ScrollableArea::systemLanguageIsRTL): Add
3373         -respondsToSelector: check.
3374
3375 2016-03-11  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3376
3377         WTF should have a similar function as equalLettersIgnoringASCIICase to match beginning of strings
3378         https://bugs.webkit.org/show_bug.cgi?id=153419
3379
3380         Reviewed by Darin Adler.
3381
3382         Covered by added unint tests.
3383
3384         * Modules/fetch/FetchHeaders.cpp:
3385         (WebCore::isForbiddenHeaderName): Using startsWithLettersIgnoringASCIICase.
3386
3387 2016-03-11  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3388
3389         [Fetch API] Use DeferredWrapper directly in FetchBody promise handling
3390         https://bugs.webkit.org/show_bug.cgi?id=155291
3391
3392         Reviewed by Darin Adler.
3393
3394         Moved from typed DOMPromise to DeferredWrapper as there can only be one promise resolved.
3395         Started preparing the handling of blobs translation to other resolved types.
3396
3397         Fixed the case of empty body, in which case promises should resolve with empty objects (strings, buffers...) and not null.
3398
3399         Added Consumer structure to handle asynchronous resolution/rejection of promises.
3400         Added preliminary API to resolve promises based on data stored as a Blob.
3401         FetchBodyOwner will be responsible to do/stop blob loading.
3402
3403         Tests: imported/w3c/web-platform-tests/fetch/api/request/request-consume-empty.html
3404                imported/w3c/web-platform-tests/fetch/api/response/response-consume-empty.html
3405
3406         * Modules/fetch/FetchBody.cpp:
3407         (WebCore::FetchBody::processIfEmptyOrDisturbed): Fixed empty body case.
3408         (WebCore::FetchBody::arrayBuffer):
3409         (WebCore::FetchBody::blob):
3410         (WebCore::FetchBody::json):
3411         (WebCore::FetchBody::text):
3412         (WebCore::FetchBody::consume):
3413         (WebCore::FetchBody::consumeText):
3414         (WebCore::FetchBody::loadingType):
3415         (WebCore::FetchBody::consumeBlob):
3416         (WebCore::FetchBody::resolveAsJSON):
3417         (WebCore::FetchBody::loadingFailed):