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