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