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