[Win] Warning fixes.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-08-26  Per Arne Vollan  <pvollan@apple.com>
2
3         [Win] Warning fixes.
4         https://bugs.webkit.org/show_bug.cgi?id=161077
5
6         Reviewed by Brent Fulgham.
7
8         * css/CSSGrammar.y.includes:
9         * css/RuleFeature.cpp:
10         (WebCore::makeAttributeSelectorKey):
11         * editing/TextIterator.cpp:
12         (WebCore::SearchBuffer::SearchBuffer):
13         * html/HTMLElement.cpp:
14         (WebCore::HTMLElement::textToFragment):
15         * html/MediaElementSession.h:
16         * platform/URL.cpp:
17         * platform/graphics/ca/GraphicsLayerCA.cpp:
18         * platform/network/HTTPParsers.cpp:
19         (WebCore::parseHTTPHeader):
20         * rendering/InlineIterator.h:
21         (WebCore::InlineIterator::clear):
22         * rendering/RenderDeprecatedFlexibleBox.cpp:
23         (WebCore::FlexBoxIterator::reset):
24         * rendering/RenderText.cpp:
25         (WebCore::RenderText::secureText):
26         * rendering/mathml/RenderMathMLToken.cpp:
27         (WebCore::mathVariant):
28         * style/InlineTextBoxStyle.cpp:
29         (WebCore::visualOverflowForDecorations):
30         * xml/XPathGrammar.y:
31
32 2016-08-26  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
33
34         Make custom constructors consistent with generated bindings code
35         https://bugs.webkit.org/show_bug.cgi?id=159550
36
37         Reviewed by Youenn Fablet.
38
39         Add assertion to check DOMConstructorObject* passed in ExecState is not null.
40         Rename throwConstructorDocumentUnavailableError to throwConstructorScriptExecutionContextUnavailableError since
41         ScriptExecutionContext is not necessarily a Document.
42         Modify error message in case of argument error to be consistent with generated binding code: replace calls to
43         throwVMError with calls to throwConstructorScriptExecutionContextUnavailableError and throwArgumentTypeError.
44
45         No new test required. Modify tests and tests expectations to align with new error messages.
46
47         * bindings/js/JSAudioContextCustom.cpp:
48         (WebCore::constructJSAudioContext):
49         * bindings/js/JSBlobCustom.cpp:
50         (WebCore::constructJSBlob):
51         * bindings/js/JSDOMBinding.cpp:
52         (WebCore::throwConstructorScriptExecutionContextUnavailableError):
53         * bindings/js/JSDOMBinding.h:
54         * bindings/js/JSDOMConstructor.h:
55         (WebCore::JSBuiltinConstructor<JSClass>::callConstructor):
56         * bindings/js/JSDOMFormDataCustom.cpp:
57         (WebCore::constructJSDOMFormData):
58         * bindings/js/JSDataCueCustom.cpp:
59         (WebCore::constructJSDataCue):
60         * bindings/js/JSFileCustom.cpp:
61         (WebCore::constructJSFile):
62         * bindings/js/JSHTMLElementCustom.cpp:
63         (WebCore::constructJSHTMLElement):
64         * bindings/js/JSMediaSessionCustom.cpp:
65         (WebCore::constructJSMediaSession):
66         * bindings/js/JSMutationObserverCustom.cpp:
67         (WebCore::constructJSMutationObserver):
68         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
69         (WebCore::constructJSReadableStreamDefaultReader):
70         * bindings/js/JSWorkerCustom.cpp:
71         (WebCore::constructJSWorker):
72         * bindings/scripts/CodeGeneratorJS.pm:
73         (GenerateCallbackImplementation):
74         (NativeToJSValue):
75         (GenerateHashTableValueArray):
76         (GenerateConstructorDefinition):
77         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
78         (WebCore::JSTestEventConstructorConstructor::construct):
79         * bindings/scripts/test/JS/JSTestInterface.cpp:
80         (WebCore::JSTestInterfaceConstructor::construct):
81         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
82         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
83         * bindings/scripts/test/JS/JSTestNode.cpp:
84         (WebCore::JSTestNodeConstructor::construct):
85         * bindings/scripts/test/JS/JSTestObj.cpp:
86         (WebCore::JSTestObjConstructor::construct):
87         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
88         (WebCore::constructJSTestOverloadedConstructors1):
89         (WebCore::constructJSTestOverloadedConstructors2):
90         (WebCore::constructJSTestOverloadedConstructors3):
91         (WebCore::constructJSTestOverloadedConstructors4):
92         (WebCore::constructJSTestOverloadedConstructors5):
93         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
94         (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
95         (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
96         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
97         (WebCore::JSTestTypedefsConstructor::construct):
98
99 2016-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
100
101         Unreviewed. Fix GTK+ build after r204986 and r204996.
102
103         * page/DOMWindow.idl:
104
105 2016-08-25  Wenson Hsieh  <wenson_hsieh@apple.com>
106
107         Dragging against the end of the inline media scrubber causes the media scrubber to hide
108         https://bugs.webkit.org/show_bug.cgi?id=161207
109
110         Reviewed by Eric Carlson.
111
112         Previously, we would re-enable behavior restrictions when firing an ended event. However, if the ended event is
113         caused by the user seeking to the end of the video, the media controls would be taken away from under the user.
114         To prevent this, we don't add the relevant behavior restrictions upon media ended if media was seeking before
115         firing the event.
116
117         Tweaked an existing WebKit API test to cover this change.
118
119         * html/HTMLMediaElement.cpp:
120         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
121         (WebCore::HTMLMediaElement::addBehaviorRestrictionsOnEndIfNecessary):
122         * html/HTMLMediaElement.h:
123         * html/MediaElementSession.cpp:
124         (WebCore::MediaElementSession::canControlControlsManager):
125
126 2016-08-25  Andreas Kling  <akling@apple.com>
127
128         REGRESSION: RELEASE_ASSERT in ResourceUsageThread::platformThreadBody when ASan is enabled
129         <https://webkit.org/b/161203>
130         <rdar://problem/28011251>
131
132         Reviewed by Joseph Pecoraro.
133
134         * page/cocoa/ResourceUsageThreadCocoa.mm:
135         (WebCore::ResourceUsageThread::platformThreadBody): Remove overly optimistic assertions about
136         "GC owned" memory never being higher than total malloc memory usage. This accounting is not
137         really exact and pretending otherwise will just lead to crashes.
138
139         * html/HTMLCanvasElement.cpp:
140         (WebCore::HTMLCanvasElement::externalMemoryCost): Hook up HTMLCanvasElement to the ImageBuffer
141         helper for reporting external memory cost. This makes accounting slightly more correct.
142
143 2016-08-25  Chris Dumez  <cdumez@apple.com>
144
145         Regression(r203623): Breaks App Store application
146         https://bugs.webkit.org/show_bug.cgi?id=161206
147         <rdar://problem/28015060>
148
149         Reviewed by Ryosuke Niwa.
150
151         Add quirks for the App Store application so that we log an error message
152         when passing a Document node to Window.getComputedStyle() instead of
153         throwing an exception.
154
155         * page/DOMWindow.cpp:
156         (WebCore::DOMWindow::getComputedStyle):
157         * page/DOMWindow.h:
158         * page/DOMWindow.idl:
159         * platform/RuntimeApplicationChecks.h:
160         * platform/RuntimeApplicationChecks.mm:
161         (WebCore::MacApplication::isAppStore):
162
163 2016-08-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
164
165         REGRESSION (r203378): [iOS] The PDF image is rendered stretched if a sub image of it is cached first
166         https://bugs.webkit.org/show_bug.cgi?id=160617
167
168         Reviewed by Tim Horton.
169
170         When caching only a sub-image of the PDF ensure the source rectangle starts
171         at the top-left of the cached sub-image rectangle. When drawing the cached 
172         sub-image to the destination context ensure the destination rectangle is the
173         sub-image rectangle so no stretching or shrinking happens.
174
175         Test: fast/images/cached-clipped-pdf.html
176
177         * page/Settings.cpp:
178         (WebCore::Settings::Settings):
179         (WebCore::Settings::setCachedPDFImageEnabled): Deleted.
180         * page/Settings.h:
181         (WebCore::Settings::isCachedPDFImageEnabled): Deleted.
182         * page/Settings.in:
183         Change the boolean setting CachedPDFImageEnabled to be enum property and
184         rename it PDFImageCachingPolicy. Allow the "PDFImageCachingBelowMemoryLimit"
185         option to be available on a;; platforms. The "PDFImageCachingClipBoundsOnly"
186         option is added for testing purpose. If forces recaching the PDF with each
187         draw and it sets the cached image rectangle to the clipping rectangle.
188         
189         * platform/graphics/cg/PDFDocumentImage.cpp:
190         (WebCore::PDFDocumentImage::setPdfImageCachingPolicy): Take an enum instead of boolean.
191         (WebCore::cachedImageRect): 
192         (WebCore::PDFDocumentImage::decodedSizeChanged): Enable PDFImageCachingBelowMemoryLimit
193         on all platforms.
194         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): Fix the source rectangle
195         when caching a sub-image of the PDF.
196         (WebCore::PDFDocumentImage::draw): Fix the destination rectangle when drawing
197         a sub-image to the destination context.
198         (WebCore::PDFDocumentImage::setCachedPDFImageEnabled): Deleted.
199         * platform/graphics/cg/PDFDocumentImage.h:
200         
201         * rendering/RenderImage.cpp:
202         (WebCore::RenderImage::paintIntoRect):
203         
204         * testing/InternalSettings.cpp:
205         (WebCore::InternalSettings::Backup::Backup):
206         (WebCore::InternalSettings::Backup::restoreTo):
207         (WebCore::InternalSettings::setPDFImageCachingPolicy):
208         (WebCore::InternalSettings::setCachedPDFImageEnabled): Deleted.
209         * testing/InternalSettings.h:
210         * testing/InternalSettings.idl:
211         Change the internal setting CachedPDFImageEnabled to PDFImageCachingPolicy.
212
213 2016-08-25  Zalan Bujtas  <zalan@apple.com>
214
215         Infinite recursion crash in WebCore::RenderBlockFlow::layoutBlock
216         https://bugs.webkit.org/show_bug.cgi?id=139474
217         <rdar://problem/27705190>
218
219         Reviewed by David Hyatt.
220
221         We should just give up trying to avoid widow when the page is too small to break line.
222
223         Test: fast/multicol/assert-on-small-page-height-with-widow.html
224
225         * rendering/RenderBlockFlow.cpp:
226         (WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidowIfNeeded):
227         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
228         * rendering/RenderBlockFlow.h:
229
230 2016-08-24  Sam Weinig  <sam@webkit.org>
231
232         Add the ability to override the implementation name of IDL enums and dictionaries
233         https://bugs.webkit.org/show_bug.cgi?id=161185
234
235         Reviewed by Anders Carlsson.
236
237         * bindings/scripts/CodeGenerator.pm:
238         (ProcessDocument):
239         Build a dictionary of IDL name -> implementation name overrides
240         for enums and dictionaries up front based on ImplementedAs extended
241         attribute.
242
243         (HasEnumImplementationNameOverride):
244         (GetEnumImplementationNameOverride):
245         (HasDictionaryImplementationNameOverride):
246         (GetDictionaryImplementationNameOverride):
247         Expose predicate and getter for name overrides.
248
249         * bindings/scripts/CodeGeneratorJS.pm:
250         (GetEnumerationClassName):
251         (GetDictionaryClassName):
252         Use the override names as necessary.
253
254         * bindings/scripts/test/TestObj.idl:
255         Add tests for enums and dictionaries with ImplementedAs extended
256         attributes.
257
258 2016-08-25  Johan K. Jensen  <johan_jensen@apple.com>
259
260         Don't store networkLoadTiming in the disk cache
261         https://bugs.webkit.org/show_bug.cgi?id=161161
262
263         Reviewed by Antti Koivisto.
264
265         No functionality changed. So, no new tests.
266
267         * platform/network/ResourceResponseBase.h:
268         (WebCore::ResourceResponseBase::encode):
269         (WebCore::ResourceResponseBase::decode):
270
271 2016-08-25  Johan K. Jensen  <johan_jensen@apple.com>
272
273         Update the Resource Timing implementation
274         https://bugs.webkit.org/show_bug.cgi?id=161068
275
276         Reviewed by Alex Christensen.
277
278         Tests: imported/w3c/web-platform-tests/resource-timing/resource-timing.html
279                imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html
280
281         Update the Resource Timing implementation for better compatibility with the Resource Timing API spec.
282         Use LoadTiming for general timing information about a resources load timeline.
283         Mark timestamps for newly loaded resources as well as cached resources.
284
285         * loader/DocumentLoader.cpp:
286         (WebCore::DocumentLoader::startLoadingMainResource):
287         StartTime and fetchStart should be equal initially.
288
289         * loader/LoadTiming.cpp:
290         (WebCore::LoadTiming::LoadTiming): Moved member initialization out. Removed constructor.
291         * loader/LoadTiming.h:
292         (WebCore::LoadTiming::markStartTimeAndFetchStart):
293         Mark startTime and fetchStart simultaneously.
294
295         * loader/ResourceLoader.cpp:
296         (WebCore::ResourceLoader::init):
297         Mark the start time of resources.
298
299         * loader/ResourceLoader.h:
300         (WebCore::ResourceLoader::loadTiming):
301         Add LoadTiming info to handle a resources load timing.
302
303         * loader/ResourceTimingInformation.cpp:
304         (WebCore::ResourceTimingInformation::addResourceTiming):
305         * loader/ResourceTimingInformation.h:
306         Only pass in the URL from the ResourceRequest.
307         Pass LoadTiming instead of timestamps.
308
309         * loader/SubresourceLoader.cpp:
310         (WebCore::SubresourceLoader::willSendRequestInternal):
311         Mark redirects.
312
313         (WebCore::SubresourceLoader::didFinishLoading):
314         Mark the responseEnd timestamp.
315         Add the ResourceEntry to the timeline before notifyDone is called.
316
317         * loader/cache/CachedResourceLoader.cpp:
318         (WebCore::CachedResourceLoader::requestResource):
319         (WebCore::CachedResourceLoader::revalidateResource):
320         (WebCore::CachedResourceLoader::loadDone):
321         Mark timestamps for cached resources and use them instead of a cached LoadTiming.
322
323         * loader/cache/CachedResourceLoader.h:
324         (WebCore::CachedResourceLoader::resourceTimingInformation):
325         Add ResourceTimingInformation getter so SubresourceLoader.cpp can add entries before callbacks.
326
327         * page/Performance.cpp:
328         (WebCore::Performance::addResourceTiming):
329         * page/Performance.h:
330         Update signature: URLs and LoadTiming instead of timestamps.
331
332         * page/PerformanceResourceTiming.cpp:
333         (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
334         (WebCore::PerformanceResourceTiming::redirectStart):
335         (WebCore::PerformanceResourceTiming::redirectEnd):
336         (WebCore::PerformanceResourceTiming::fetchStart):
337         (WebCore::PerformanceResourceTiming::domainLookupStart):
338         (WebCore::PerformanceResourceTiming::domainLookupEnd):
339         (WebCore::PerformanceResourceTiming::connectStart):
340         (WebCore::PerformanceResourceTiming::connectEnd):
341         (WebCore::PerformanceResourceTiming::requestStart):
342         (WebCore::PerformanceResourceTiming::responseStart):
343         (WebCore::PerformanceResourceTiming::responseEnd):
344         (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
345         * page/PerformanceResourceTiming.h:
346         Update signatures and properties to use LoadTiming.
347         Use LoadTiming’s redirectStart/End, fetchStart, responseStart/End.
348         Make sure dns and connection timestamps are in increasing order, even when cached.
349
350         * page/PerformanceResourceTiming.idl:
351         Add responseStart.
352
353 2016-08-24  Anders Carlsson  <andersca@apple.com>
354
355         Simplify createMouseEvent in DragController
356         https://bugs.webkit.org/show_bug.cgi?id=161168
357
358         Reviewed by Dan Bernstein.
359
360         * page/DragController.cpp:
361         (WebCore::createMouseEvent):
362         * platform/DragData.cpp:
363         (WebCore::DragData::modifierKeyState): Deleted.
364         * platform/DragData.h:
365
366 2016-08-25  Chris Dumez  <cdumez@apple.com>
367
368         DOMTokenList.value should be a stringifier attribute
369         https://bugs.webkit.org/show_bug.cgi?id=161195
370
371         Reviewed by Darin Adler.
372
373         DOMTokenList.value should be a stringifier attribute:
374         - https://dom.spec.whatwg.org/#domtokenlist
375
376         No new tests, this change is not observable from the Web.
377
378         * html/DOMTokenList.h:
379         (WebCore::DOMTokenList::toString): Deleted.
380         * html/DOMTokenList.idl:
381         * html/HTMLLinkElement.cpp:
382         (WebCore::HTMLLinkElement::iconSizes): Deleted.
383         * html/HTMLLinkElement.h:
384
385 2016-08-25  Csaba Osztrogonác  <ossy@webkit.org>
386
387         [Mac][cmake] Unreviewed speculative buildfix after r204852, just for fun.
388
389         * PlatformMac.cmake:
390
391 2016-08-24  Frederic Wang  <fwang@igalia.com>
392
393         Do not store layout parameters on the RenderMathMLRoot class
394         https://bugs.webkit.org/show_bug.cgi?id=161132
395
396         Reviewed by Darin Adler.
397
398         Storing layout parameters on the RenderMathMLRoot class is not really needed since reading
399         the parameters from the MATH table is not too expensive and updateStyle() is currently always
400         called in layoutBlock() and computePreferredLogicalWidths(). Most of these parameters are
401         actually only used in layoutBlock(). We separate horizontal and vertical parameters since
402         the latter are not needed for preferred width calculations. This removes the need for calling
403         an updateStyle functions and may also fix update issues when zooming in or out.
404
405         No new tests, already covered by existing tests.
406
407         * rendering/mathml/MathMLStyle.cpp:
408         (WebCore::MathMLStyle::updateStyleIfNeeded): No need to update layout parameters for the
409         RenderMathMLRoot class.
410         * rendering/mathml/RenderMathMLRoot.cpp:
411         (WebCore::RenderMathMLRoot::styleDidChange): No need to update layout parameters.
412         (WebCore::RenderMathMLRoot::horizontalParameters): Move code from updateStyle to retrieve the
413         horizontal parameters.
414         (WebCore::RenderMathMLRoot::verticalParameters): Ditto for vertical parameters.
415         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths): Call horizontalParameters() to
416         get the kernings of the index instead of calling updateStyle().
417         (WebCore::RenderMathMLRoot::layoutBlock): Call horizontalParameters() and
418         verticalParameters() to get the layout parameters instead of calling updateStyle().
419         (WebCore::RenderMathMLRoot::paint): Call horizontalParameters() and verticalParameters()
420         to get the layout parameters.
421         (WebCore::RenderMathMLRoot::updateFromElement): Deleted. No need to call updateStyle().
422         (WebCore::RenderMathMLRoot::updateStyle): Deleted.
423         * rendering/mathml/RenderMathMLRoot.h: Do not override updateFromElement(). Replace some
424         layout parameters stored on the class with struct and helper functions to manipulate them.
425
426 2016-08-24  Chris Dumez  <cdumez@apple.com>
427
428         WorkerLocation.prototype.toString() should be enumerable
429         https://bugs.webkit.org/show_bug.cgi?id=161183
430
431         Reviewed by Ryosuke Niwa.
432
433         WorkerLocation.prototype.toString() should be enumerable:
434         - https://html.spec.whatwg.org/#workerlocation
435         - http://heycam.github.io/webidl/#es-stringifier
436
437         No new tests, updated existing test.
438
439         * workers/WorkerLocation.h:
440         (WebCore::WorkerLocation::toString): Deleted.
441         * workers/WorkerLocation.idl:
442         Also use USVString string type instead of DOMString to match the
443         specification. There is no behavior change because those attributes
444         are readonly.
445
446 2016-08-24  Chris Dumez  <cdumez@apple.com>
447
448         Location.toString() should be enumerable
449         https://bugs.webkit.org/show_bug.cgi?id=161179
450
451         Reviewed by Geoffrey Garen.
452
453         Location.toString() should be enumerable as per:
454         - https://html.spec.whatwg.org/#location
455         - http://heycam.github.io/webidl/#es-stringifier
456
457         This patch stops hard-coding the toString() operation on the Location
458         interface and makes the 'href' attribute a stringifier attribute instead,
459         as per the specification. The generated toString() has the same behavior
460         as it used to but it is now enumerable, as it should.
461
462         No new tests, updated existing test.
463
464         * bindings/js/JSLocationCustom.cpp:
465         (WebCore::JSLocation::toStringFunction): Deleted.
466         * page/Location.idl:
467
468 2016-08-24  Joseph Pecoraro  <pecoraro@apple.com>
469
470         Implement `CSS.escape` as per CSSOM
471         https://bugs.webkit.org/show_bug.cgi?id=126337
472
473         Reviewed by Dean Jackson.
474
475         Test: css3/escape-dom-api.html
476
477         * css/CSSOMUtils.cpp:
478         (WebCore::serializeIdentifier):
479         Update serialization to match the latest version of the spec:
480         <https://drafts.csswg.org/cssom/#serialize-an-identifier>
481         New handling for 0x0, 0x7f, just "-", and "--" is now allowed.
482
483         * css/DOMCSSNamespace.cpp:
484         (WebCore::DOMCSSNamespace::escape):
485         * css/DOMCSSNamespace.h:
486         * css/DOMCSSNamespace.idl:
487         New CSS.escape method.
488
489 2016-08-24  Zalan Bujtas  <zalan@apple.com>
490
491         ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
492         https://bugs.webkit.org/show_bug.cgi?id=155700
493         <rdar://problem/27720727>
494
495         Reviewed by David Hyatt.
496
497         RenderBox::m_minPreferredLogicalWidth/m_maxPreferredLogicalWidth don't need special initial value since
498         preferredLogicalWidthsDirty flag guards them. -1 as initial value can cause problems for renderers that don't
499         override RenderBox::computePreferredLogicalWidths().    
500
501         Test: fast/ruby/assert-when-content-size-is-negative.html
502
503         * rendering/RenderBox.cpp:
504         (WebCore::RenderBox::RenderBox):
505         (WebCore::RenderBox::dirtyLineBoxes):
506         (WebCore::RenderBox::deleteLineBoxWrapper):
507         * rendering/RenderBox.h:
508
509 2016-08-24  Alex Christensen  <achristensen@webkit.org>
510
511         Import w3c URL tests
512         https://bugs.webkit.org/show_bug.cgi?id=161177
513
514         Reviewed by Tim Horton.
515
516         Tests: imported/w3c/web-platform-tests/url/a-element-xhtml.xhtml
517                imported/w3c/web-platform-tests/url/a-element.html
518                imported/w3c/web-platform-tests/url/historical.html
519                imported/w3c/web-platform-tests/url/interfaces.html
520                imported/w3c/web-platform-tests/url/url-constructor.html
521                imported/w3c/web-platform-tests/url/url-domainToUnicode.html
522                imported/w3c/web-platform-tests/url/url-setters.html
523                imported/w3c/web-platform-tests/url/urlsearchparams-append.html
524                imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html
525                imported/w3c/web-platform-tests/url/urlsearchparams-delete.html
526                imported/w3c/web-platform-tests/url/urlsearchparams-get.html
527                imported/w3c/web-platform-tests/url/urlsearchparams-getall.html
528                imported/w3c/web-platform-tests/url/urlsearchparams-has.html
529                imported/w3c/web-platform-tests/url/urlsearchparams-set.html
530                imported/w3c/web-platform-tests/url/urlsearchparams-stringifier.html
531
532         * platform/URL.cpp:
533         (WebCore::URL::setQuery):
534
535 2016-08-24  Ryan Haddad  <ryanhaddad@apple.com>
536
537         Rebaseline bindings tests after r204923.
538
539         Unreviewed test gardening.
540
541         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
542         (WebCore::jsTestActiveDOMObjectExcitingAttr):
543         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
544
545 2016-08-24  Jonathan Bedard  <jbedard@apple.com>
546
547         FocusController multiple dereferenced NULL pointers
548         https://bugs.webkit.org/show_bug.cgi?id=160808
549
550         Reviewed by Darin Adler.
551
552         No new tests needed, fix does not change functionality.
553
554         This change fixes a number of NULL pointer dereferences which occur in FocusController.
555
556         * page/FocusController.cpp:
557         (WebCore::isFocusableElementOrScopeOwner): Changed KeyboardEvent reference to pointer.
558         (WebCore::isNonFocusableScopeOwner): Ditto.
559         (WebCore::isFocusableScopeOwner): Ditto.
560         (WebCore::shadowAdjustedTabIndex): Ditto.
561
562         (WebCore::FocusController::findFocusableElementAcrossFocusScope): Pass pointer instead of reference to KeyboardEvent.
563         (WebCore::FocusController::nextFocusableElementWithinScope): Ditto.
564         (WebCore::FocusController::previousFocusableElementWithinScope): Ditto.
565         (WebCore::FocusController::findElementWithExactTabIndex): Ditto.
566         (WebCore::nextElementWithGreaterTabIndex): Ditto.
567         (WebCore::previousElementWithLowerTabIndex): Ditto.
568         (WebCore::FocusController::nextFocusableElementOrScopeOwner): Ditto.
569         (WebCore::FocusController::previousFocusableElementOrScopeOwner): Ditto.
570         (WebCore::relinquishesEditingFocus): Ditto.
571
572 2016-08-24  Nan Wang  <n_wang@apple.com>
573
574         AX: VoiceOver on iOS ignores aria-checked on menuitemradio and menuitemcheckbox
575         https://bugs.webkit.org/show_bug.cgi?id=161118
576
577         Reviewed by Chris Fleizach.
578
579         Added checkboxOrRadioValue and toggle trait to menuitemradio and menuitemcheckbox.
580
581         Test: accessibility/ios-simulator/menuitem-checked.html
582
583         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
584         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
585         (-[WebAccessibilityObjectWrapper accessibilityValue]):
586
587 2016-08-24  Chris Dumez  <cdumez@apple.com>
588
589         Assertion hit: ASSERT(!m_parserScheduler) in ~HTMLDocumentParser()
590         https://bugs.webkit.org/show_bug.cgi?id=161083
591         <rdar://problem/27986937>
592
593         Reviewed by Darin Adler.
594
595         Call cancelParsing() right before re-creating the new parser in
596         Document::implicitOpen(). We would previously call removeChildren()
597         in between which is was an issue because it can cause JS to be
598         executed and therefore the parser to be re-created after we have
599         cancelled parsing.
600
601         No new tests, unskipped html/browsers/browsing-the-web/unloading-documents/004.html
602         which was consistently crashing.
603
604         * dom/Document.cpp:
605         (WebCore::Document::implicitOpen):
606
607 2016-08-24  Eric Carlson  <eric.carlson@apple.com>
608
609         [MediaStream] Add support for OverConstrained Error
610         https://bugs.webkit.org/show_bug.cgi?id=160790
611         <rdar://problem/27815715>
612
613         Reviewed by Jer Noble.
614
615         Existing tests updated.
616
617         * DerivedSources.make:
618         * Modules/mediastream/OverconstrainedError.h: Added.
619         (WebCore::OverconstrainedError::create):
620         (WebCore::OverconstrainedError::constraint):
621         (WebCore::OverconstrainedError::message):
622         (WebCore::OverconstrainedError::OverconstrainedError):
623         * Modules/mediastream/OverconstrainedError.idl: Added.
624         * WebCore.xcodeproj/project.pbxproj:
625
626 2016-08-24  Anders Carlsson  <andersca@apple.com>
627
628         Build the platform name dynamically for the phony WebKitLegacy framework
629         https://bugs.webkit.org/show_bug.cgi?id=161163
630
631         Reviewed by Dan Bernstein.
632
633         * Configurations/WebKitLegacyStub.iOS.tbd:
634         * WebCore.xcodeproj/project.pbxproj:
635
636 2016-08-24  Chris Dumez  <cdumez@apple.com>
637
638         It should not be possible to access Location attributes cross origin
639         https://bugs.webkit.org/show_bug.cgi?id=161125
640         <rdar://problem/27982472>
641
642         Reviewed by Brent Fulgham.
643
644         It should not be possible to access Location attributes cross origin:
645         - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
646
647         We allow access to replace() as per the specification and consistently
648         with Firefox. The specification seems to indicate we should allow access
649         to 'href' but Firefox does not and we previously did not so I am not
650         allowing it in this patch.
651
652         Test: http/tests/security/location-cross-origin.html
653
654         * bindings/scripts/CodeGeneratorJS.pm:
655         (GenerateImplementation):
656         * page/Location.idl:
657
658 2016-08-24  Joseph Pecoraro  <pecoraro@apple.com>
659
660         Add User Timing to the feature status page
661         https://bugs.webkit.org/show_bug.cgi?id=161154
662
663         Reviewed by Darin Adler.
664
665         * features.json:
666
667 2016-08-24  Andreas Kling  <akling@apple.com>
668
669         Leaks bot hits an assertion in ResourceUsageThread::platformThreadBody
670         <https://webkit.org/b/160534>
671
672         Reviewed by Joseph Pecoraro.
673
674         Use the correct malloc bucket when bmalloc is disabled (which is the case on leaks bots.)
675
676         * page/cocoa/ResourceUsageThreadCocoa.mm:
677         (WebCore::ResourceUsageThread::platformThreadBody):
678
679 2016-08-24  Filip Pizlo  <fpizlo@apple.com>
680
681         Unreviewed, roll out r204901, r204897, r204866, r204856, r204854.
682
683         * ForwardingHeaders/heap/HeapInlines.h: Removed.
684         * ForwardingHeaders/interpreter/Interpreter.h: Added.
685         * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Removed.
686         * Modules/indexeddb/IDBCursorWithValue.cpp:
687         * Modules/indexeddb/client/TransactionOperation.cpp:
688         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
689         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
690         * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp:
691         * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp:
692         * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp:
693         * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp:
694         * bindings/js/JSClientRectCustom.cpp:
695         * bindings/js/JSDOMBinding.cpp:
696         * bindings/js/JSDOMBinding.h:
697         * bindings/js/JSDeviceMotionEventCustom.cpp:
698         * bindings/js/JSDeviceOrientationEventCustom.cpp:
699         * bindings/js/JSErrorEventCustom.cpp:
700         * bindings/js/JSIDBCursorWithValueCustom.cpp:
701         * bindings/js/JSIDBIndexCustom.cpp:
702         * bindings/js/JSPopStateEventCustom.cpp:
703         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
704         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
705         * bindings/js/WorkerScriptController.cpp:
706         * contentextensions/ContentExtensionParser.cpp:
707         * dom/ErrorEvent.cpp:
708         * html/HTMLCanvasElement.cpp:
709         * html/MediaDocument.cpp:
710         * inspector/CommandLineAPIModule.cpp:
711         * loader/EmptyClients.cpp:
712         * page/CaptionUserPreferences.cpp:
713         * page/Frame.cpp:
714         * page/PageGroup.cpp:
715         * page/UserContentController.cpp:
716         * platform/mock/mediasource/MockBox.cpp:
717         * testing/GCObservation.cpp:
718
719 2016-08-24  Zalan Bujtas  <zalan@apple.com>
720
721         ASSERTION FAILED: childrenInline() in WebCore::RenderBlockFlow::hasLines
722         https://bugs.webkit.org/show_bug.cgi?id=139396
723         <rdar://problem/27704339>
724
725         Reviewed by David Hyatt.
726
727         RenderBlockFlow::hasLines() should be able to handle the block-children case.
728
729         Test: fast/ruby/assert-with-block-rt-child-and-emphasis.html
730
731         * rendering/RenderBlock.h:
732         (WebCore::RenderBlock::hasLines): Deleted.
733         * rendering/RenderBlockFlow.cpp:
734         (WebCore::RenderBlockFlow::hasLines):
735         * rendering/RenderBlockFlow.h:
736
737 2016-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
738
739         Unreviewed. Fix GObject DOM bindings API break after r204624 and r204648.
740
741         prefix, namespaceURI and localName attributes were moved from Node to Attr/Element in r204624 and prefix was
742         also made readonly in r204648.
743
744         * bindings/gobject/WebKitDOMDeprecated.cpp:
745         (webkit_dom_node_get_namespace_uri):
746         (webkit_dom_node_get_prefix):
747         (webkit_dom_node_set_prefix):
748         (webkit_dom_node_get_local_name):
749         * bindings/gobject/WebKitDOMDeprecated.h:
750         * bindings/gobject/WebKitDOMDeprecated.symbols:
751         * bindings/gobject/webkitdom.symbols:
752
753 2016-08-23  Simon Fraser  <simon.fraser@apple.com>
754
755         Add some logging for WKSelectionDrawingInfo
756         https://bugs.webkit.org/show_bug.cgi?id=161055
757
758         Reviewed by Tim Horton.
759
760         Add TextStream dumping for SelectionRect.
761
762         * platform/ios/SelectionRect.cpp:
763         (WebCore::operator<<):
764         * platform/ios/SelectionRect.h:
765
766 2016-08-23  Frederic Wang  <fwang@igalia.com>
767
768         More consistent header inclusions in the MathML module
769         https://bugs.webkit.org/show_bug.cgi?id=161080
770
771         Reviewed by Darin Adler.
772
773         We adjust header inclusion in the MathML module so that:
774         - implementation file's own header is outside the #if ENABLE(MATHML)
775         - There is always a blank line after the #if ENABLE(MATHML)
776
777         No new tests, behavior is unchanged.
778
779         * mathml/MathMLAnnotationElement.cpp:
780         * mathml/MathMLAnnotationElement.h:
781         * mathml/MathMLElement.cpp:
782         * mathml/MathMLFractionElement.cpp:
783         * mathml/MathMLFractionElement.h:
784         * mathml/MathMLMathElement.cpp:
785         * mathml/MathMLMathElement.h:
786         * mathml/MathMLMencloseElement.cpp:
787         * mathml/MathMLMencloseElement.h:
788         * mathml/MathMLOperatorDictionary.cpp:
789         * mathml/MathMLOperatorElement.cpp:
790         * mathml/MathMLOperatorElement.h:
791         * mathml/MathMLPaddedElement.cpp:
792         * mathml/MathMLPaddedElement.h:
793         * mathml/MathMLPresentationElement.cpp:
794         * mathml/MathMLPresentationElement.h:
795         * mathml/MathMLRowElement.cpp:
796         * mathml/MathMLRowElement.h:
797         * mathml/MathMLScriptsElement.cpp:
798         * mathml/MathMLScriptsElement.h:
799         * mathml/MathMLSelectElement.h:
800         * mathml/MathMLSpaceElement.cpp:
801         * mathml/MathMLSpaceElement.h:
802         * mathml/MathMLTokenElement.cpp:
803         * mathml/MathMLUnderOverElement.cpp:
804         * mathml/MathMLUnderOverElement.h:
805         * rendering/mathml/MathMLStyle.cpp:
806         * rendering/mathml/MathOperator.cpp:
807         * rendering/mathml/MathOperator.h:
808         * rendering/mathml/RenderMathMLBlock.cpp:
809         * rendering/mathml/RenderMathMLFenced.cpp:
810         * rendering/mathml/RenderMathMLFencedOperator.cpp:
811         * rendering/mathml/RenderMathMLFraction.cpp:
812         * rendering/mathml/RenderMathMLMath.cpp:
813         * rendering/mathml/RenderMathMLMenclose.cpp:
814         * rendering/mathml/RenderMathMLMenclose.h:
815         * rendering/mathml/RenderMathMLOperator.cpp:
816         * rendering/mathml/RenderMathMLRoot.cpp:
817         * rendering/mathml/RenderMathMLRow.cpp:
818         * rendering/mathml/RenderMathMLScripts.cpp:
819         * rendering/mathml/RenderMathMLUnderOver.cpp:
820
821 2016-08-23  Zalan Bujtas  <zalan@apple.com>
822
823         ASSERTION FAILED: !view().layoutStateEnabled() || style().styleType() == FIRST_LETTER in WebCore::RenderInline::clippedOverflowRectForRepaint
824         https://bugs.webkit.org/show_bug.cgi?id=155363
825         <rdar://problem/27720434>
826
827         Reviewed by David Hyatt.
828
829         Loosen ASSERT to include calls when the inline has a self painting layer. It's valid to end up here during layout when
830         the layer's composite state changes.
831
832         Test: fast/layers/assert-on-self-painting-inline-with-scrolling.html
833
834         * rendering/RenderInline.cpp:
835         (WebCore::RenderInline::clippedOverflowRectForRepaint):
836
837 2016-08-23  Anders Carlsson  <andersca@apple.com>
838
839         Create a phony WebKitLegacy framework that the WebCoreTestSupport dylib can find
840         https://bugs.webkit.org/show_bug.cgi?id=161123
841
842         Reviewed by Dan Bernstein.
843
844         * Configurations/WebCore.xcconfig:
845         Use the WebKitLegacy.tbd file from the phony framework.
846
847         * Configurations/WebCoreTestSupport.xcconfig:
848         Look for WebKitLegacy.framework in the phony framework path.
849
850         * WebCore.xcodeproj/project.pbxproj:
851         Add a new phase that creates a phony WebKitLegacy framework.
852
853 2016-08-23  Chris Dumez  <cdumez@apple.com>
854
855         Add support for CanvasRenderingContext2D.resetTransform()
856         https://bugs.webkit.org/show_bug.cgi?id=161089
857
858         Reviewed by Simon Fraser.
859
860         Add support for CanvasRenderingContext2D.resetTransform():
861         - https://html.spec.whatwg.org/#dom-context-2d-resettransform
862
863         Firefox and Chrome already support this.
864
865         Tests:
866         imported/blink/fast/canvas/canvas-resetTransform.html
867         imported/w3c/web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001.html
868
869         * html/canvas/CanvasRenderingContext2D.cpp:
870         (WebCore::CanvasRenderingContext2D::setTransform):
871         (WebCore::CanvasRenderingContext2D::resetTransform):
872         * html/canvas/CanvasRenderingContext2D.h:
873         * html/canvas/CanvasRenderingContext2D.idl:
874
875 2016-08-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
876
877         REGRESSION: SVG clip-path doesn't work on root <svg>
878         https://bugs.webkit.org/show_bug.cgi?id=129180
879
880         Reviewed by Tim Horton.
881
882         Build the resources cache for the RenderSVGRoot element when it's been
883         inserted in the render tree. Remove the resources cache before removing
884         the RenderSVGRoot from the render tree. No worries for the child <svg>
885         elements since their renderers are of type RenderSVGViewportContainer.
886
887         Tests: svg/clip-path/clip-path-on-svg-003.svg
888                svg/clip-path/clip-path-on-svg-004.svg
889
890         * rendering/svg/RenderSVGRoot.cpp:
891         (WebCore::RenderSVGRoot::insertedIntoTree):
892         (WebCore::RenderSVGRoot::willBeRemovedFromTree):
893         * rendering/svg/RenderSVGRoot.h:
894         These changes are very similar to what we do for adding and removing the
895         child SVG elements in RenderSVGRoot::addChild() and removeChild().
896
897 2016-08-23  Chris Dumez  <cdumez@apple.com>
898
899         HTMLAreaElement should have a stringifier
900         https://bugs.webkit.org/show_bug.cgi?id=161105
901
902         Reviewed by Geoffrey Garen.
903
904         HTMLAreaElement should have a stringifier:
905         - https://html.spec.whatwg.org/multipage/embedded-content.html#htmlareaelement
906         - https://html.spec.whatwg.org/multipage/semantics.html#htmlhyperlinkelementutils
907         - http://heycam.github.io/webidl/#idl-stringifiers
908         - http://heycam.github.io/webidl/#es-stringifier
909
910         Chrome and Firefox already support this.
911
912         This patch does the following:
913         - Add support for stringifier on attributes to our bindings generator.
914         - Add stringifier to the HTMLHyperlinkElementUtils.href attribute as
915           per the specification
916         - Drops the explicit toString on HTMLAnchorElement as HTMLAnchorElement
917           implements HTMLHyperlinkElementUtils.
918
919         Test: fast/dom/toString_attributes.html
920
921         * bindings/scripts/CodeGeneratorJS.pm:
922         (GenerateInterface):
923         (AddStringifierOperationIfNeeded):
924         * bindings/scripts/IDLParser.pm:
925         (parseAttributeOrOperationOrIterator):
926         * html/HTMLAnchorElement.cpp:
927         (WebCore::HTMLAnchorElement::toString): Deleted.
928         * html/HTMLAnchorElement.h:
929         * html/HTMLAnchorElement.idl:
930         * html/HTMLHyperlinkElementUtils.idl:
931
932 2016-08-23  Alex Christensen  <achristensen@webkit.org>
933
934         Fix clean Windows build.
935
936         * PlatformWin.cmake:
937         Add another forwarding headers directory.
938
939 2016-08-23  Zalan Bujtas  <zalan@apple.com>
940
941         ASSERTION FAILED: hasOverflowingCell == this->hasOverflowingCell() in WebCore::RenderTableSection::computeOverflowFromCells
942         https://bugs.webkit.org/show_bug.cgi?id=155702
943         <rdar://problem/27720731>
944
945         Reviewed by David Hyatt.
946
947         The simplified layout path for table/section should also clear the slow path flag for visual overflow (since it recomputes
948         the overflow for the descendant cells). 
949
950         Test: fast/table/assert-when-visual-overflow-is-cleared.html
951
952         * rendering/RenderTableSection.cpp:
953         (WebCore::RenderTableSection::layout):
954
955 2016-08-23  Myles C. Maxfield  <mmaxfield@apple.com>
956
957         [Cocoa] Reduce uses of CGFonts
958         https://bugs.webkit.org/show_bug.cgi?id=160896
959
960         Reviewed by Darin Adler.
961
962         There are a few places where we unnecessarily use CGFonts instead of
963         CTFonts. We have had an ongoing effort throughout the past few years
964         of elliminating all of our uses of CGFonts, and this patch moves us
965         in that direction.
966
967         Most of the changes in this patch are straightforward (e.g.
968         CGFontGetUnitsPerEm() -> CTFontGetUnitsPerEm()). However, there is
969         one notable change: from CGContextShowGlyphsWithAdvances() to
970         CTFontDrawGlyphs(). This migration does not cause a performance
971         regression.
972
973         No new tests because there is no behavior change.
974
975         * WebCore.xcodeproj/project.pbxproj: Delete unnecessary
976         FontServicesIOS files.
977         * platform/graphics/FontMetrics.h:
978         (WebCore::FontMetrics::xHeight): Migrate to Optional<float>
979         (WebCore::FontMetrics::setXHeight):
980         (WebCore::FontMetrics::hasXHeight):
981         (WebCore::FontMetrics::hasCapHeight): Ditto.
982         (WebCore::FontMetrics::floatCapHeight):
983         (WebCore::FontMetrics::setCapHeight):
984         (WebCore::FontMetrics::capHeight):
985         (WebCore::FontMetrics::setZeroWidth): No one ever used the
986         m_hasZeroWidth variable, so this patch removes it.
987         (WebCore::FontMetrics::reset):
988         (WebCore::FontMetrics::FontMetrics): Deleted.
989         (WebCore::FontMetrics::setHasXHeight): Deleted. No one ever calls
990         this, so this patch removes it.
991         (WebCore::FontMetrics::hasZeroWidth): Deleted.
992         (WebCore::FontMetrics::setHasZeroWidth): Deleted.
993         * platform/graphics/cocoa/FontCascadeCocoa.mm:
994         (WebCore::TextMatrixRestorer::TextMatrixRestorer): Rather than leaving
995         the text matrix stale after using it, this class cleans it up after us.
996         This means that the text matrix doesn't have to be reset in other places
997         which draw text.
998         (WebCore::TextMatrixRestorer::~TextMatrixRestorer):
999         (WebCore::TextMatrixRestorer::savedMatrix):
1000         (WebCore::showGlyphsWithAdvances): Migrate from
1001         CGContextShowGlyphsWithAdvances() to CTFontDrawGlyphs()
1002         (WebCore::FontCascade::drawGlyphs): See above comment about the text
1003         matrix.
1004         (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
1005         (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
1006         * platform/graphics/cocoa/FontCocoa.mm:
1007         (WebCore::shouldUseAdjustment): Taken from FontServicesIOS.
1008         (WebCore::Font::platformInit): Migrate from CG to CT for some direct
1009         replacement API calls.
1010         (WebCore::Font::platformCharWidthInit): Ditto.
1011         (WebCore::Font::determinePitch): Ditto.
1012         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1013         (WebCore::FontPlatformData::openTypeTable): Ditto.
1014         (WebCore::FontPlatformData::description): Ditto.
1015         * platform/graphics/ios/FontServicesIOS.h: Removed. No longer needed
1016         after migrating from CGContextShowGlyphsWithAdvances() to
1017         CTFontDrawGlyphs().
1018         (WebCore::FontServicesIOS::ascent): Deleted.
1019         (WebCore::FontServicesIOS::descent): Deleted.
1020         (WebCore::FontServicesIOS::lineGap): Deleted.
1021         (WebCore::FontServicesIOS::lineSpacing): Deleted.
1022         (WebCore::FontServicesIOS::xHeight): Deleted.
1023         (WebCore::FontServicesIOS::capHeight): Deleted.
1024         (WebCore::FontServicesIOS::unitsPerEm): Deleted.
1025         * platform/graphics/ios/FontServicesIOS.mm: Removed. Moved into
1026         Font::platformInit().
1027         (WebCore::shouldUseAdjustment): Deleted.
1028         (WebCore::isCourier): Deleted.
1029         (WebCore::FontServicesIOS::FontServicesIOS): Deleted.
1030         * platform/graphics/opentype/OpenTypeCG.cpp:
1031         (WebCore::OpenType::tryGetTypoMetrics): Migrate from CG to CT for some
1032         direct replacement API calls.
1033         * platform/graphics/opentype/OpenTypeCG.h: Ditto.
1034         * platform/graphics/win/FontCGWin.cpp:
1035         (WebCore::FontCascade::drawGlyphs): Restore the text matrix.
1036         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1037         (WebCore::Font::platformWidthForGlyph): Deleted.
1038         * platform/spi/cg/CoreGraphicsSPI.h:
1039         * platform/spi/cocoa/CoreTextSPI.h:
1040         * rendering/RenderThemeIOS.mm:
1041         (WebCore::paintAttachmentText): Deleted.
1042         * rendering/RenderThemeMac.mm:
1043         (WebCore::paintAttachmentTitle): Deleted.
1044         (WebCore::paintAttachmentSubtitle): Deleted.
1045
1046 2016-08-23  Alex Christensen  <achristensen@webkit.org>
1047
1048         Fix CMake build after r204852.
1049
1050         * CMakeLists.txt:
1051         There were some non-ASCII characters here causing problems.
1052
1053 2016-08-22  Filip Pizlo  <fpizlo@apple.com>
1054
1055         Butterflies should be allocated in Auxiliary MarkedSpace instead of CopiedSpace and we should rewrite as much of the GC as needed to make this not a regression
1056         https://bugs.webkit.org/show_bug.cgi?id=160125
1057
1058         Reviewed by Geoffrey Garen.
1059
1060         No new tests because no new WebCore behavior.
1061         
1062         Just rewiring #includes.
1063
1064         * ForwardingHeaders/heap/HeapInlines.h: Added.
1065         * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Added.
1066         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1067         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1068         * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp:
1069         * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp:
1070         * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp:
1071         * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp:
1072         * bindings/js/JSClientRectCustom.cpp:
1073         * bindings/js/JSDOMBinding.h:
1074         * bindings/js/JSDOMStringListCustom.cpp:
1075         * bindings/js/JSErrorEventCustom.cpp:
1076         * bindings/js/JSPopStateEventCustom.cpp:
1077         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1078         * contentextensions/ContentExtensionParser.cpp:
1079         * dom/ErrorEvent.cpp:
1080         * inspector/CommandLineAPIModule.cpp:
1081         * testing/GCObservation.cpp:
1082         (WebCore::GCObservation::GCObservation):
1083
1084 2016-08-23  Brady Eidson  <beidson@apple.com>
1085
1086         WK2 Gamepad layout test support.
1087         https://bugs.webkit.org/show_bug.cgi?id=134671
1088
1089         Reviewed by Alex Christensen.
1090
1091         No new tests (Covered by changes to existing tests).
1092
1093         Add a MockGamepadProvider and expose it in WebCoreTestSupport.
1094         
1095         * CMakeLists.txt:
1096         * WebCore.xcodeproj/project.pbxproj:
1097
1098         * Modules/gamepad/Gamepad.cpp:
1099         (WebCore::Gamepad::Gamepad):
1100
1101         * bindings/generic/RuntimeEnabledFeatures.cpp:
1102         (WebCore::RuntimeEnabledFeatures::reset): Deleted. Gamepads should either always be enabled during tests
1103           (As in Mac WK2), or never enabled (As in all other platforms).
1104         * bindings/generic/RuntimeEnabledFeatures.h:
1105
1106         * platform/gamepad/GamepadProvider.h:
1107         (WebCore::GamepadProvider::isMockGamepadProvider):
1108
1109         * testing/MockGamepad.cpp: Copied from Source/WebKit2/Shared/Gamepad/GamepadData.cpp.
1110         (WebCore::MockGamepad::MockGamepad):
1111         (WebCore::MockGamepad::updateDetails):
1112         (WebCore::MockGamepad::setAxisValue):
1113         (WebCore::MockGamepad::setButtonValue):
1114         * testing/MockGamepad.h: Copied from Source/WebKit2/UIProcess/Gamepad/UIGamepad.h.
1115
1116         * testing/MockGamepadProvider.cpp: Added.
1117         (WebCore::MockGamepadProvider::singleton):
1118         (WebCore::MockGamepadProvider::MockGamepadProvider):
1119         (WebCore::MockGamepadProvider::startMonitoringGamepads):
1120         (WebCore::MockGamepadProvider::stopMonitoringGamepads):
1121         (WebCore::MockGamepadProvider::setMockGamepadDetails):
1122         (WebCore::MockGamepadProvider::connectMockGamepad):
1123         (WebCore::MockGamepadProvider::disconnectMockGamepad):
1124         (WebCore::MockGamepadProvider::setMockGamepadAxisValue):
1125         (WebCore::MockGamepadProvider::setMockGamepadButtonValue):
1126         (WebCore::MockGamepadProvider::gamepadInputActivity):
1127
1128         * testing/MockGamepadProvider.h: Copied from Source/WebKit2/WebProcess/Gamepad/WebGamepadProvider.h.
1129         (WebCore::MockGamepadProvider::~MockGamepadProvider):
1130
1131         * testing/js/WebCoreTestSupport.cpp:
1132         (WebCoreTestSupport::installMockGamepadProvider):
1133         (WebCoreTestSupport::connectMockGamepad):
1134         (WebCoreTestSupport::disconnectMockGamepad):
1135         (WebCoreTestSupport::setMockGamepadDetails):
1136         (WebCoreTestSupport::setMockGamepadAxisValue):
1137         (WebCoreTestSupport::setMockGamepadButtonValue):
1138         * testing/js/WebCoreTestSupport.h:
1139
1140 2016-08-23  Dave Hyatt  <hyatt@apple.com>
1141
1142         Add pref for enabling new CSS parsing and move parser files into subdirectory.
1143         https://bugs.webkit.org/show_bug.cgi?id=161095
1144
1145         Reviewed by Sam Weinig.
1146
1147         * CMakeLists.txt:
1148         * WebCore.xcodeproj/project.pbxproj:
1149         * css/CSSParser.cpp: Removed.
1150         * css/CSSParser.h: Removed.
1151         * css/CSSParserMode.h: Removed.
1152         * css/CSSParserValues.cpp: Removed.
1153         * css/CSSParserValues.h: Removed.
1154         * css/SVGCSSParser.cpp: Removed.
1155         * css/parser: Added.
1156         * css/parser/CSSParser.cpp: Copied from css/CSSParser.cpp.
1157         * css/parser/CSSParser.h: Copied from css/CSSParser.h.
1158         * css/parser/CSSParserMode.h: Copied from css/CSSParserMode.h.
1159         * css/parser/CSSParserValues.cpp: Copied from css/CSSParserValues.cpp.
1160         * css/parser/CSSParserValues.h: Copied from css/CSSParserValues.h.
1161         * css/parser/SVGCSSParser.cpp: Copied from css/SVGCSSParser.cpp.
1162         * page/Settings.in:
1163
1164 2016-08-23  Eric Carlson  <eric.carlson@apple.com>
1165
1166         [MediaStream] Templatize MediaConstraint
1167         https://bugs.webkit.org/show_bug.cgi?id=161092
1168
1169         Reviewed by Jer Noble.
1170
1171         No new tests, no functional change.
1172
1173         * platform/mediastream/MediaConstraints.cpp:
1174         (WebCore::BooleanConstraint::getExact):
1175         (WebCore::BooleanConstraint::getIdeal):
1176         (WebCore::MediaConstraint::getMin): Deleted.
1177         (WebCore::MediaConstraint::getMax): Deleted.
1178         (WebCore::MediaConstraint::getExact): Deleted.
1179         (WebCore::MediaConstraint::getIdeal): Deleted.
1180         (WebCore::IntConstraint::create): Deleted.
1181         (WebCore::IntConstraint::setMin): Deleted.
1182         (WebCore::IntConstraint::setMax): Deleted.
1183         (WebCore::IntConstraint::setExact): Deleted.
1184         (WebCore::IntConstraint::setIdeal): Deleted.
1185         (WebCore::IntConstraint::getMin): Deleted.
1186         (WebCore::IntConstraint::getMax): Deleted.
1187         (WebCore::IntConstraint::getExact): Deleted.
1188         (WebCore::IntConstraint::getIdeal): Deleted.
1189         (WebCore::DoubleConstraint::create): Deleted.
1190         (WebCore::DoubleConstraint::setMin): Deleted.
1191         (WebCore::DoubleConstraint::setMax): Deleted.
1192         (WebCore::DoubleConstraint::setExact): Deleted.
1193         (WebCore::DoubleConstraint::setIdeal): Deleted.
1194         (WebCore::DoubleConstraint::getMin): Deleted.
1195         (WebCore::DoubleConstraint::getMax): Deleted.
1196         (WebCore::DoubleConstraint::getExact): Deleted.
1197         (WebCore::DoubleConstraint::getIdeal): Deleted.
1198         (WebCore::BooleanConstraint::create): Deleted.
1199         (WebCore::BooleanConstraint::setExact): Deleted.
1200         (WebCore::BooleanConstraint::setIdeal): Deleted.
1201         (WebCore::StringConstraint::create): Deleted.
1202         * platform/mediastream/MediaConstraints.h:
1203         (WebCore::MediaConstraint::getMin):
1204         (WebCore::MediaConstraint::getMax):
1205         (WebCore::MediaConstraint::getExact):
1206         (WebCore::MediaConstraint::getIdeal):
1207         (WebCore::NumericConstraint::setMin):
1208         (WebCore::NumericConstraint::setMax):
1209         (WebCore::NumericConstraint::setExact):
1210         (WebCore::NumericConstraint::setIdeal):
1211         (WebCore::NumericConstraint::setHasMin): Deleted.
1212         (WebCore::NumericConstraint::setHasMax): Deleted.
1213         (WebCore::NumericConstraint::setHasExact): Deleted.
1214         (WebCore::NumericConstraint::setHasIdeal): Deleted.
1215         (WebCore::NumericConstraint::hasMin): Deleted.
1216         (WebCore::NumericConstraint::hasMax): Deleted.
1217         (WebCore::NumericConstraint::hasExact): Deleted.
1218         (WebCore::NumericConstraint::hasIdeal): Deleted.
1219
1220 2016-08-23  Anders Carlsson  <andersca@apple.com>
1221
1222         Add a workaround for iOS Frameworks that expect DOM bindings to be in WebCore
1223         https://bugs.webkit.org/show_bug.cgi?id=161093
1224
1225         Reviewed by Dan Bernstein.
1226
1227         Create a text-based stub library that looks enough like WebKitLegacy that we can trick the linker
1228         into creating a LC_REEXPORT_DYLIB load command in WebCore.
1229
1230         * Configurations/WebCore.xcconfig:
1231         Link against this WebKitLegacyStub tbd file on iOS 9.0, 9.3 and 10.0.
1232
1233         * Configurations/WebKitLegacyStub.iOS.tbd:
1234         Add new tbd file.
1235
1236         * WebCore.xcodeproj/project.pbxproj:
1237         Add new files.
1238
1239 2016-08-23  Chris Dumez  <cdumez@apple.com>
1240
1241         CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
1242         https://bugs.webkit.org/show_bug.cgi?id=161054
1243
1244         Reviewed by Ryosuke Niwa.
1245
1246         CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
1247         as per:
1248         - https://html.spec.whatwg.org/multipage/scripting.html#canvasrenderingcontext2d
1249
1250         Firefox and Chrome agree with the specification.
1251
1252         No new tests, rebaselined existing test.
1253
1254         * CMakeLists.txt:
1255         * DerivedSources.cpp:
1256         * DerivedSources.make:
1257         * WebCore.xcodeproj/project.pbxproj:
1258         * bindings/js/JSBindingsAllInOne.cpp:
1259         * bindings/js/JSCanvasRenderingContext.h: Renamed from Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp.
1260         (WebCore::toJS):
1261         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1262         (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
1263         (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
1264         * bindings/js/JSDocumentCustom.cpp:
1265         (WebCore::JSDocument::getCSSCanvasContext):
1266         (WebCore::JSDocument::createTouchList): Deleted.
1267         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1268         * bindings/scripts/CodeGeneratorJS.pm:
1269         (GenerateImplementation):
1270         * dom/Document.idl:
1271         * html/canvas/CanvasRenderingContext.idl: Removed.
1272         * html/canvas/CanvasRenderingContext2D.idl:
1273         * html/canvas/WebGL2RenderingContext.idl:
1274         * html/canvas/WebGLRenderingContext.idl:
1275         * html/canvas/WebGLRenderingContextBase.idl:
1276
1277 2016-08-03  Frederic Wang  <fwang@igalia.com>
1278
1279         Share and improve extraction of character for operator and token elements
1280         https://bugs.webkit.org/show_bug.cgi?id=160462
1281
1282         Reviewed by Darin Adler.
1283
1284         No new tests, already covered by existing tests.
1285
1286         * mathml/MathMLElement.cpp:
1287         (WebCore::MathMLElement::stripLeadingAndTrailingWhitespace): Make this a protected member of
1288         MathMLElement so that it can be used in MathMLTokenElement.
1289         (WebCore::skipLeadingAndTrailingWhitespace): Deleted.
1290         * mathml/MathMLElement.h: Declare stripLeadingAndTrailingWhitespace.
1291         * mathml/MathMLOperatorElement.cpp:
1292         (WebCore::MathMLOperatorElement::parseOperatorChar): Use convertToSingleCodePoint to extract
1293         a code point more efficiently. For now, we continue to only handle BMP characters.
1294         * mathml/MathMLTokenElement.cpp:
1295         (WebCore::MathMLTokenElement::convertToSingleCodePoint): Helper function to try and convert a
1296         string to a single code point after having removed leading and trailing space.
1297         * mathml/MathMLTokenElement.h: Declare convertToSingleCodePoint.
1298         * rendering/mathml/RenderMathMLToken.cpp:
1299         (WebCore::RenderMathMLToken::updateMathVariantGlyph): Use convertToSingleCodePoint to extract
1300         a code point more efficiently.
1301
1302 2016-08-23  Frederic Wang  <fwang@igalia.com>
1303
1304         Rename MathMLInlineContainerElement to MathMLPresentationElement
1305         https://bugs.webkit.org/show_bug.cgi?id=161053
1306
1307         Reviewed by Manuel Rego Casasnovas.
1308
1309         MathMLInlineContainerElement sounds a bad name for something that is now going to produce
1310         RenderMathMLBlocks. MathML has two kinds of markup (presentation MathML and content MathML).
1311         We only implement presentation MathML and most of the MathML elements are currently
1312         implemented as MathMLInlineContainerElement. Hence we rename MathMLInlineContainerElement
1313         to MathMLPresentationElement and will move more code from MathMLElement into that new class
1314         in follow-up bugs. Also, other elements in the MathML namespace could be handled by a
1315         separate MathMLUnknownElement class for consistency with SVG and HTML classes.
1316
1317         No new tests, behavior is unchanged.
1318
1319         * CMakeLists.txt: Rename MathMLInlineContainerElement to MathMLPresentationElement.
1320         * WebCore.xcodeproj/project.pbxproj: Ditto.
1321         * mathml/MathMLAllInOne.cpp: Ditto.
1322         * mathml/MathMLFractionElement.cpp: Ditto.
1323         * mathml/MathMLFractionElement.h: Ditto.
1324         * mathml/MathMLPresentationElement.cpp: Ditto.
1325         * mathml/MathMLPresentationElement.h: Ditto.
1326         * mathml/MathMLRowElement.cpp: Ditto.
1327         * mathml/MathMLRowElement.h: Ditto.
1328         * mathml/MathMLScriptsElement.cpp: Ditto.
1329         * mathml/MathMLScriptsElement.h: Ditto.
1330         * mathml/mathtags.in: Ditto.
1331         * rendering/mathml/RenderMathMLFraction.h: Remove useless include.
1332
1333 2016-08-23  Youenn Fablet  <youenn@apple.com>
1334
1335         Implement redirect support post CORS-preflight
1336         https://bugs.webkit.org/show_bug.cgi?id=159056
1337
1338         Reviewed by Alex Christensen.
1339
1340         Tests: imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-preflight-worker.html
1341                imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-preflight.html
1342         Covered also by rebased tests.
1343
1344         Enabling to follow cross-origin redirections for not-simple requests, through preflight checks.
1345         Making sure that same-origin redirections to cross-origin resources use preflight if they are not simple.
1346
1347         * loader/DocumentThreadableLoader.cpp:
1348         (WebCore::DocumentThreadableLoader::redirectReceived):
1349
1350 2016-08-23  Frederic Wang  <fred.wang@free.fr>
1351
1352         Introduce a MathMLRowElement class for mrow-like elements
1353         https://bugs.webkit.org/show_bug.cgi?id=161050
1354
1355         Reviewed by Darin Adler.
1356
1357         We introduce a MathMLRowElement class for elements creating RenderMathMLRow renderers.
1358         We also force constructors of the corresponding renderer classes to accept MathMLRowElement.
1359         It's not clear whether semantics-xml really needs to create RenderMathMLRow but for now
1360         we make MathMLAnnotationElement inherits from MathMLRowElement to preserve that behavior.
1361
1362         No new tests, behavior is unchanged.
1363
1364         * CMakeLists.txt: Add MathMLRowElement files.
1365         * WebCore.xcodeproj/project.pbxproj: Ditto.
1366         * mathml/MathMLAllInOne.cpp: Ditto.
1367         * mathml/MathMLInlineContainerElement.cpp: Remove unused headers.
1368         (WebCore::MathMLInlineContainerElement::createElementRenderer): Handle some mrow-like
1369         elements in the MathMLRowElement class.
1370         (WebCore::MathMLInlineContainerElement::acceptsDisplayStyleAttribute): Ditto.
1371         (WebCore::MathMLInlineContainerElement::childrenChanged): Deleted. We only need to calculate
1372         the form for operators inside a MathMLRowElement.
1373         (WebCore::MathMLInlineContainerElement::acceptsMathVariantAttribute): Deleted. mstyle is
1374         handled in the MathMLRowElement class.
1375         * mathml/MathMLInlineContainerElement.h: Update function declarations.
1376         * mathml/MathMLMathElement.cpp: Make this class inherits from MathMLRowElement.
1377         * mathml/MathMLMathElement.h: Ditto.
1378         * mathml/MathMLPaddedElement.cpp: Ditto.
1379         * mathml/MathMLPaddedElement.h: Ditto.
1380         * mathml/MathMLSelectElement.cpp: Ditto.
1381         * mathml/MathMLSelectElement.h: Ditto.
1382         * mathml/MathMLAnnotationElement.cpp: Ditto.
1383         * mathml/MathMLAnnotationElement.h: Ditto.
1384         * mathml/MathMLRowElement.cpp: New class for mrow-like element.
1385         (WebCore::MathMLRowElement::MathMLRowElement):
1386         (WebCore::MathMLRowElement::create):
1387         (WebCore::MathMLRowElement::childrenChanged): Move code from MathMLInlineContainerElement.
1388         (WebCore::MathMLRowElement::createElementRenderer): Ditto.
1389         (WebCore::MathMLRowElement::acceptsDisplayStyleAttribute): Ditto.
1390         (WebCore::MathMLRowElement::acceptsMathVariantAttribute): Ditto.
1391         * mathml/MathMLRowElement.h:
1392         * mathml/mathtags.in: Map tags creating RenderMathMLRow renderers to MathMLRowElement.
1393         * rendering/mathml/RenderMathMLFenced.cpp: Force the constructor to take MathMLRowElement.
1394         * rendering/mathml/RenderMathMLFenced.h: Ditto.
1395         * rendering/mathml/RenderMathMLMath.cpp: Ditto.
1396         * rendering/mathml/RenderMathMLMath.h: Ditto.
1397         * rendering/mathml/RenderMathMLMenclose.cpp: Force the constructor to take MathMLMencloseElement.
1398         * rendering/mathml/RenderMathMLMenclose.h: Ditto.
1399         * rendering/mathml/RenderMathMLRoot.cpp: Force the constructor to take MathMLRowElement.
1400         * rendering/mathml/RenderMathMLRoot.h: Ditto.
1401         * rendering/mathml/RenderMathMLRow.cpp: Ditto and add an helper function element() to
1402         retrieve the MathMLRowElement.
1403         * rendering/mathml/RenderMathMLRow.h: Ditto.
1404
1405 2016-08-22  Chris Dumez  <cdumez@apple.com>
1406
1407         Drop TextTrackCue's constructor as per the latest specification
1408         https://bugs.webkit.org/show_bug.cgi?id=161061
1409
1410         Reviewed by Alex Christensen.
1411
1412         Drop TextTrackCue's constructor as per the latest specification:
1413         - https://html.spec.whatwg.org/#texttrackcue
1414
1415         Firefox and Chrome do not have this constructor. Web Authors
1416         are supposed to use the VTTCue constructor instead.
1417
1418         No new tests, rebaselined existing tests.
1419
1420         * html/track/TextTrackCue.cpp:
1421         (WebCore::TextTrackCue::TextTrackCue): Deleted.
1422         * html/track/TextTrackCue.h:
1423         (WebCore::TextTrackCue::cueShadowPseudoId): Deleted.
1424         * html/track/TextTrackCue.idl:
1425
1426 2016-08-22  Chris Dumez  <cdumez@apple.com>
1427
1428         Unreviewed, rolling out r204745.
1429
1430         Broke the Windows build
1431
1432         Reverted changeset:
1433
1434         "CanvasRenderingContext2D should not have a
1435         CanvasRenderingContext parent interface"
1436         https://bugs.webkit.org/show_bug.cgi?id=161054
1437         http://trac.webkit.org/changeset/204745
1438
1439 2016-08-22  Chris Dumez  <cdumez@apple.com>
1440
1441         CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
1442         https://bugs.webkit.org/show_bug.cgi?id=161054
1443
1444         Reviewed by Ryosuke Niwa.
1445
1446         CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
1447         as per:
1448         - https://html.spec.whatwg.org/multipage/scripting.html#canvasrenderingcontext2d
1449
1450         Firefox and Chrome agree with the specification.
1451
1452         No new tests, rebaselined existing test.
1453
1454         * CMakeLists.txt:
1455         * DerivedSources.cpp:
1456         * DerivedSources.make:
1457         * WebCore.xcodeproj/project.pbxproj:
1458         * bindings/js/JSBindingsAllInOne.cpp:
1459         * bindings/js/JSCanvasRenderingContext.h: Renamed from Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp.
1460         (WebCore::toJS):
1461         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1462         (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
1463         (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
1464         * bindings/js/JSDocumentCustom.cpp:
1465         (WebCore::JSDocument::getCSSCanvasContext):
1466         (WebCore::JSDocument::createTouchList): Deleted.
1467         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1468         * bindings/scripts/CodeGeneratorJS.pm:
1469         (GenerateImplementation):
1470         * dom/Document.idl:
1471         * html/canvas/CanvasRenderingContext.idl: Removed.
1472         * html/canvas/CanvasRenderingContext2D.idl:
1473         * html/canvas/WebGL2RenderingContext.idl:
1474         * html/canvas/WebGLRenderingContext.idl:
1475         * html/canvas/WebGLRenderingContextBase.idl:
1476
1477 2016-08-22  Johan K. Jensen  <johan_jensen@apple.com>
1478
1479         Make NetworkLoadTiming use double for higher precision in Resource Timing
1480         https://bugs.webkit.org/show_bug.cgi?id=161051
1481
1482         Reviewed by Alex Christensen.
1483
1484         Test: http/tests/misc/resource-timing-resolution.html
1485
1486         * page/Performance.h:
1487         * page/Performance.cpp:
1488         (WebCore::Performance::now):
1489         (WebCore::Performance::reduceTimeResolution):
1490         Add new function to reduce time resolution.
1491
1492         * page/PerformanceResourceTiming.cpp:
1493         (WebCore::monotonicTimeToDocumentMilliseconds):
1494         (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
1495         Only use the reduced timing resolution for full timestamps and deltas.
1496
1497         (WebCore::PerformanceResourceTiming::connectStart): Use doubles.
1498         * page/PerformanceResourceTiming.h: Use doubles.
1499         * page/PerformanceTiming.cpp: Use doubles.
1500         (WebCore::toIntegerMilliseconds): Use doubles.
1501         (WebCore::PerformanceTiming::connectStart): Use doubles.
1502         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart): Use doubles.
1503         * page/PerformanceTiming.h: Use doubles.
1504         * platform/network/NetworkLoadTiming.h: Use doubles.
1505         * platform/network/curl/ResourceHandleManager.cpp: Use doubles.
1506         (WebCore::milisecondsSinceRequest): Use doubles.
1507         (WebCore::calculateWebTimingInformations): Use doubles.
1508         * platform/network/soup/ResourceHandleSoup.cpp: Use doubles.
1509         (WebCore::milisecondsSinceRequest): Use doubles.
1510         (WebCore::networkEventCallback): Use doubles.
1511
1512 2016-08-22  Alex Christensen  <achristensen@webkit.org>
1513
1514         Fix Mac CMake build after r204717.
1515
1516         * PlatformMac.cmake:
1517
1518 2016-08-22  Javier Fernandez  <jfernandez@igalia.com>
1519
1520         [css-grid] Stretch alignment doesn't work for orthogonal flows
1521         https://bugs.webkit.org/show_bug.cgi?id=160076
1522
1523         Reviewed by Darin Adler.
1524
1525         After implementing orthogonal flow support for track sizing and basic
1526         alignment logic, we can now implement stretching logic in orthogonal
1527         scenarios, which was not allowed so far.
1528
1529         Thanks to the recent changes which made the grid layout code more
1530         independent to the grid container's and its children's flow, the
1531         implementation of the stretching logic can be done in a clearer way.
1532
1533         This patch implements the missing logic and performs some refactoring
1534         so it became flow direction independent.
1535
1536         Test: fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html
1537
1538         * rendering/RenderGrid.cpp:
1539         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1540
1541
1542 2016-08-19  Brent Fulgham  <bfulgham@apple.com>
1543
1544         Invalid resource load statistics iterator when redirecting
1545         https://bugs.webkit.org/show_bug.cgi?id=161021
1546         <rdar://problem/27856875>
1547
1548         Reviewed by Dean Jackson.
1549
1550         If a load is the result of a redirect, an additional entry is added to the HashSet
1551         containing the visited domains. This invalidates any existing iterators, so we
1552         need to get a new iterator for further updates.
1553
1554         No change in functionality.
1555
1556         * loader/ResourceLoadObserver.cpp:
1557         (WebCore::ResourceLoadObserver::logSubresourceLoading):
1558
1559 2016-08-22  Ryosuke Niwa  <rniwa@webkit.org>
1560
1561         Rename CustomElementsRegistry to CustomElementRegistry
1562         https://bugs.webkit.org/show_bug.cgi?id=161028
1563
1564         Reviewed by Darin Adler.
1565
1566         Renamed CustomElementsRegistry to CustomElementRegistry per https://github.com/w3c/webcomponents/issues/548.
1567
1568         Also hide window.customElements and CustomElementRegistry interface behind a runtime enabled.
1569
1570         * CMakeLists.txt:
1571         * DerivedSources.cpp:
1572         * DerivedSources.make:
1573         * WebCore.xcodeproj/project.pbxproj:
1574         * bindings/js/JSCustomElementRegistryCustom.cpp: Renamed from JSCustomElementsRegistryCustom.cpp.
1575         (WebCore::getCustomElementCallback):
1576         (WebCore::JSCustomElementRegistry::define):
1577         * bindings/js/JSHTMLElementCustom.cpp:
1578         (WebCore::constructJSHTMLElement):
1579         * dom/CustomElementReactionQueue.cpp:
1580         (WebCore::findInterfaceForCustomElement):
1581         * dom/CustomElementRegistry.cpp: Renamed from CustomElementsRegistry.cpp.
1582         (WebCore::CustomElementRegistry::create):
1583         (WebCore::CustomElementRegistry::CustomElementRegistry):
1584         (WebCore::CustomElementRegistry::~CustomElementRegistry):
1585         (WebCore::CustomElementRegistry::addElementDefinition):
1586         (WebCore::CustomElementRegistry::addUpgradeCandidate):
1587         (WebCore::CustomElementRegistry::findInterface):
1588         (WebCore::CustomElementRegistry::containsConstructor):
1589         * dom/CustomElementRegistry.h: Renamed from CustomElementsRegistry.h.
1590         * dom/CustomElementRegistry.idl: Renamed from CustomElementsRegistry.idl.
1591         * dom/Document.cpp:
1592         (WebCore::createUpgradeCandidateElement):
1593         (WebCore::createHTMLElementWithNameValidation):
1594         (WebCore::createFallbackHTMLElement):
1595         * dom/Element.cpp:
1596         * html/parser/HTMLConstructionSite.cpp:
1597         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
1598         * page/DOMWindow.cpp:
1599         (WebCore::DOMWindow::ensureCustomElementRegistry):
1600         * page/DOMWindow.h:
1601         * page/DOMWindow.idl:
1602
1603 2016-08-22  Chris Dumez  <cdumez@apple.com>
1604
1605         Add support for GlobalEventHandlers.oncuechange attribute
1606         https://bugs.webkit.org/show_bug.cgi?id=161046
1607
1608         Reviewed by Alex Christensen.
1609
1610         Add support for GlobalEventHandlers.oncuechange attribute:
1611         - https://html.spec.whatwg.org/#handler-oncuechange
1612
1613         Test: fast/media/window-oncuechange.html
1614
1615         * dom/GlobalEventHandlers.idl:
1616
1617 2016-08-22  Alex Christensen  <achristensen@webkit.org>
1618
1619         Fix bindings tests after r204717.
1620
1621         * bindings/scripts/CodeGeneratorJS.pm:
1622         (GenerateHeader):
1623         There was an extra space.
1624
1625 2016-08-22  Alex Christensen  <achristensen@webkit.org>
1626
1627         Mostly fix Mac CMake build after r204717.
1628
1629         * PlatformMac.cmake:
1630
1631 2016-08-22  Antti Koivisto  <antti@apple.com>
1632
1633         Can't style descendants in shadow tree using the :host pseudo class
1634         https://bugs.webkit.org/show_bug.cgi?id=160754
1635
1636         Reviewed by Darin Adler.
1637
1638         "The :host pseudo-class, when evaluated in the context of a shadow tree, matches the shadow tree’s shadow host."
1639
1640         Currently :host() works for styling the host element itself (:host(.foo) { ... }). It should also be usable
1641         for styling elements in the shadow tree:
1642
1643             :host(.foo) div { ... }
1644
1645         Test: fast/shadow-dom/css-scoping-host-descendant.html
1646
1647         * css/SelectorChecker.cpp:
1648         (WebCore::SelectorChecker::matchHostPseudoClass):
1649         (WebCore::localContextForParent):
1650
1651             Move to shadow host if we are matching :host and are at the root of the shadow tree.
1652             Set didMoveToShadowHost bit in the context.
1653
1654         (WebCore::SelectorChecker::matchRecursively):
1655         (WebCore::SelectorChecker::checkOne):
1656
1657             Call the existing matchHostPseudoClass to do :host matching if didMoveToShadowHost bit has been set.
1658
1659         * cssjit/SelectorCompiler.cpp:
1660         (WebCore::SelectorCompiler::addPseudoClassType):
1661
1662             Disallow :host in the compiler (cases where it would match didn't reach the compiler before).
1663
1664 2016-08-22  Frederic Wang  <fwang@igalia.com>
1665
1666         Use memoize pattern for the menclose notation attribute
1667         https://bugs.webkit.org/show_bug.cgi?id=160461
1668
1669         Reviewed by Darin Adler.
1670
1671         Currently, MathMLMencloseElement::parseAttribute parse the "notation" attribute each time it
1672         is changed. We change this to use the memoize pattern as done for other MathML attributes:
1673         We store m_notationFlags in an Optional<uint16_t> where Optnull means that the
1674         attribute is dirty and must be parsed again.
1675
1676         No new tests, already covered by existing tests.
1677
1678         * mathml/MathMLMencloseElement.cpp:
1679         (WebCore::MathMLMencloseElement::parseNotationAttribute): Move parsing of the "notation"
1680         attribute from parseAttribute into this separate helper function.
1681         (WebCore::MathMLMencloseElement::hasNotation): This now check whether the attribute and
1682         dirty and parse it if necessary.
1683         (WebCore::MathMLMencloseElement::parseAttribute): Just make the attribute dirty rather than
1684         parsing it immediately.
1685         * mathml/MathMLMencloseElement.h: hasNotation is no longer const as it may update the
1686         m_notationsFlags. We declare parseNotationAttribute(). Finally, we wrap m_notationFlags
1687         in an Optional<uint16_t> and make addNotation extract the value.
1688
1689 2016-08-22  Daniel Bates  <dabates@apple.com>
1690
1691         [iOS] <a ping> and <area ping> tests time out
1692         https://bugs.webkit.org/show_bug.cgi?id=156857
1693
1694         Reviewed by Simon Fraser.
1695
1696         Export HTMLAreaElement::imageElement() so that we can make use of it in WebKit2.
1697
1698         * html/HTMLAreaElement.h:
1699
1700 2016-08-22  Darin Adler  <darin@apple.com>
1701
1702         [Cocoa] Move Objective-C DOM bindings from WebCore to legacy WebKit
1703         https://bugs.webkit.org/show_bug.cgi?id=160654
1704
1705         Reviewed by Alex Christensen.
1706
1707         * DerivedSources.cpp: Removed ExceptionCodeDescription.h from the list here.
1708         It will be included by the .cpp files as appropriate and should not be included
1709         without including config.h first.
1710
1711         * WebCore.xcodeproj/project.pbxproj: Removed the Objective-C DOM source files.
1712         Added private exports of various headers that are now used directly or indirectly
1713         by legacy WebKit to implement the bindings. Moved WebScriptObject.* files from
1714         bindings/objc to bridge/objc. Moved WebKitAvailability.h into platform/cocoa; it
1715         can be moved to WebKit of we move the Objective-C bridge there too. Also ran
1716         sort-Xcode-project-file.
1717
1718         * bindings/js/JSDOMBinding.cpp:
1719         (WebCore::valueToUSVString): Fixed a comment typo.
1720
1721         * bindings/js/JSDOMWindowShell.cpp:
1722         (WebCore::JSDOMWindowShell::toWrapped): Added.
1723         * bindings/js/JSDOMWindowShell.h: Added a toWrapped function for use by the
1724         Objective-C bindings.
1725
1726         * bindings/js/JSMainThreadExecState.h: Exported symbols needed by the Objective-C bindings.
1727         * bindings/js/JSNamedNodeMapCustom.cpp: Updated includes since NamedNodeMap.h no longer
1728         includes Attr.h.
1729
1730         * bindings/js/ScriptController.h: Exported symbols needed by the Objective-C bindings.
1731
1732         * bindings/js/ScriptControllerMac.mm:
1733         (WebCore::ScriptController::windowScriptObject): Removed code that asserted the type of the
1734         object; this assertion can't be done in WebCore any more and is not critical to keep.
1735         (WebCore::ScriptController::disconnectPlatformScriptObjects): Use the new
1736         disconnectWindowWrapper function to call up to the Objective-C bindings code in WebKit.
1737
1738         * bindings/objc/*: Moved all these files to WebKit/mac/DOM, except for a few that were moved
1739         to bridge/objc.
1740
1741         * bindings/scripts/CodeGeneratorJS.pm:
1742         (GenerateHeader): Added support for the new ExportToWrappedFunction attribute so
1743         classes that need to can export what is needed by WebKit.
1744
1745         * bindings/scripts/IDLAttributes.txt: Added ExportToWrappedFunction.
1746
1747         * bridge/objc/WebScriptObject.h: Moved from bindings/objc.
1748         * bridge/objc/WebScriptObject.mm: Moved from bindings/objc.
1749         (WebCore::initializeDOMWrapperHooks): Added. Used by WebKit to add the hooks needed so that
1750         WebScriptObject can integrate with the DOM bindings.
1751         (WebCore::disconnectWindowWrapper): Added.
1752         (+[WebScriptObject scriptObjectForJSObject:originRootObject:rootObject:]): Added code that
1753         uses createDOMWrapperFunction to set up wrappers that are found or created by WebKit.
1754         * bridge/objc/WebScriptObjectPrivate.h: Moved from bindings/objc.
1755
1756         * css/CSSFontFaceRule.h: Exported symbols needed by the Objective-C bindings.
1757         * css/CSSGroupingRule.h: Ditto.
1758         * css/CSSImportRule.h: Ditto.
1759         * css/CSSMediaRule.h: Ditto.
1760         * css/CSSPageRule.h: Ditto.
1761         * css/CSSPrimitiveValue.h: Ditto.
1762         * css/CSSRule.h: Ditto.
1763         * css/CSSRule.idl: Ditto.
1764         * css/CSSRuleList.idl: Ditto.
1765         * css/CSSStyleRule.h: Ditto.
1766         * css/CSSStyleSheet.h: Ditto.
1767         * css/CSSValue.h: Ditto.
1768         * css/CSSValue.idl: Ditto.
1769         * css/Counter.idl: Ditto.
1770         * css/MediaList.h: Ditto.
1771         * css/MediaList.idl: Ditto.
1772         * css/MediaQueryEvaluator.h: Ditto.
1773         * css/RGBColor.h: Ditto.
1774         * css/RGBColor.idl: Ditto.
1775         * css/Rect.idl: Ditto.
1776         * css/StyleSheet.idl: Ditto.
1777         * css/StyleSheetList.h: Ditto.
1778         * css/StyleSheetList.idl: Ditto.
1779         * dom/Attr.h: Ditto.
1780         * dom/CharacterData.h: Ditto.
1781         * dom/CollectionIndexCache.h: Ditto.
1782         * dom/ContainerNode.h: Ditto.
1783         * dom/DOMImplementation.cpp: Ditto.
1784         * dom/DOMImplementation.h: Ditto.
1785         * dom/DOMImplementation.idl: Ditto.
1786         * dom/Document.h: Ditto.
1787         * dom/DocumentFragment.h: Ditto.
1788         * dom/Element.h: Ditto.
1789         * dom/Event.h: Ditto.
1790         * dom/Event.idl: Ditto.
1791         * dom/EventTarget.h: Ditto.
1792         * dom/KeyboardEvent.h: Ditto.
1793         * dom/LifecycleCallbackQueue.h: Ditto.
1794         * dom/MouseEvent.h: Ditto.
1795         * dom/MouseRelatedEvent.h: Ditto.
1796         * dom/MutationEvent.h: Ditto.
1797         * dom/NamedNodeMap.h: Ditto.
1798         * dom/NamedNodeMap.idl: Ditto.
1799         * dom/NativeNodeFilter.h: Ditto.
1800         * dom/Node.h: Ditto.
1801         * dom/NodeIterator.h: Ditto.
1802         * dom/NodeIterator.idl: Ditto.
1803         * dom/NodeList.idl: Ditto.
1804         * dom/NodeTraversal.h: Ditto.
1805         * dom/OverflowEvent.h: Ditto.
1806         * dom/QualifiedName.h: Ditto.
1807         * dom/Range.h: Ditto.
1808         * dom/ScriptElement.h: Ditto.
1809         * dom/Text.h: Ditto.
1810         * dom/TextEvent.h: Ditto.
1811         * dom/TreeScope.h: Ditto.
1812         * dom/TreeWalker.h: Ditto.
1813         * dom/TreeWalker.idl: Ditto.
1814         * dom/UIEvent.h: Ditto.
1815         * dom/WheelEvent.h: Ditto.
1816         * dom/make_dom_exceptions.pl: Ditto.
1817         * editing/EditingStyle.h: Ditto.
1818         * editing/FrameSelection.h: Ditto.
1819
1820         * editing/ios/EditorIOS.mm: Removed unneeded include of Objective-C DOM header.
1821         * editing/mac/EditorMac.mm: Ditto.
1822
1823         * fileapi/Blob.h: Exported symbols needed by the Objective-C bindings.
1824         * fileapi/File.h: Ditto.
1825         * fileapi/FileList.h: Ditto.
1826         * html/DOMTokenList.h: Ditto.
1827         * html/HTMLAnchorElement.h: Ditto.
1828         * html/HTMLAreaElement.h: Ditto.
1829         * html/HTMLBaseElement.h: Ditto.
1830         * html/HTMLButtonElement.h: Ditto.
1831         * html/HTMLCanvasElement.h: Ditto.
1832         * html/HTMLCollection.h: Ditto.
1833         * html/HTMLCollection.idl: Ditto.
1834         * html/HTMLDocument.h: Ditto.
1835         * html/HTMLElement.h: Ditto.
1836         * html/HTMLFormControlElement.h: Ditto.
1837         * html/HTMLFormElement.h: Ditto.
1838         * html/HTMLFrameElementBase.h: Ditto.
1839         * html/HTMLFrameOwnerElement.h: Ditto.
1840         * html/HTMLImageElement.h: Ditto.
1841         * html/HTMLInputElement.h: Ditto.
1842
1843         * html/HTMLLabelElement.cpp:
1844         (WebCore::HTMLLabelElement::setActive): Tweaked types a bit.
1845         (WebCore::HTMLLabelElement::setHovered): Ditto.
1846         (WebCore::HTMLLabelElement::defaultEventHandler): Ditto.
1847         (WebCore::HTMLLabelElement::willRespondToMouseClickEvents): Ditto.
1848         (WebCore::HTMLLabelElement::focus): Ditto.
1849         (WebCore::HTMLLabelElement::accessKeyAction): Ditto.
1850
1851         * html/HTMLLabelElement.h: Exported symbols needed by the Objective-C bindings.
1852         * html/HTMLLinkElement.h: Ditto.
1853         * html/HTMLMapElement.h: Ditto.
1854         * html/HTMLMarqueeElement.h: Ditto.
1855         * html/HTMLMediaElement.h: Ditto.
1856         * html/HTMLOListElement.h: Ditto.
1857         * html/HTMLOptionElement.h: Ditto.
1858         * html/HTMLOptionsCollection.h: Ditto.
1859         * html/HTMLOptionsCollection.idl: Ditto.
1860         * html/HTMLScriptElement.h: Ditto.
1861         * html/HTMLSelectElement.h: Ditto.
1862         * html/HTMLStyleElement.h: Ditto.
1863         * html/HTMLTableCellElement.h: Ditto.
1864         * html/HTMLTableColElement.h: Ditto.
1865         * html/HTMLTableElement.h: Ditto.
1866         * html/HTMLTableRowElement.h: Ditto.
1867         * html/HTMLTableSectionElement.h: Ditto.
1868         * html/HTMLTextAreaElement.h: Ditto.
1869         * html/HTMLTextFormControlElement.h: Ditto.
1870         * html/HTMLTitleElement.h: Ditto.
1871         * html/HTMLVideoElement.h: Ditto.
1872         * html/LabelableElement.h: Ditto.
1873
1874         * loader/EmptyClients.h: Updated documentFragmentFromDelegate, which was
1875         returning a newly created document fragment with a raw pointer. This works
1876         because the implementation internally uses Objective-C and autorelease, but
1877         is too fragile to rely on for the future.
1878
1879         * page/DOMWindow.h: Exported symbols needed by the Objective-C bindings.
1880
1881         * page/EditorClient.h: Updated document fragment functions.
1882
1883         * page/Frame.h: Removed indexCountOfWordPrecedingSelection, already unused.
1884         Removed innerLineHeight and styleAtSelectionStart, formerly used by legacy WebKit,
1885         which used Objective-C DOM objects in their interfaces.
1886
1887         * page/ios/FrameIOS.mm:
1888         (WebCore::Frame::indexCountOfWordPrecedingSelection): Deleted.
1889         (WebCore::Frame::innerLineHeight): Deleted.
1890         (WebCore::Frame::styleAtSelectionStart): Deleted.
1891
1892         * platform/DragImage.h: Exported symbols needed by the Objective-C bindings.
1893         * platform/ScrollView.h: Ditto.
1894         * platform/URL.h: Ditto.
1895
1896         * platform/cocoa/WebKitAvailability.h: Moved from bindings/objc.
1897
1898         * platform/cocoa/WebPlaybackSessionModelMediaElement.mm: Removed unneeded includes
1899         of Objective-C DOM headers.
1900         * platform/cocoa/WebVideoFullscreenModelVideoElement.mm: Ditto.
1901         * platform/ios/PasteboardIOS.mm: Ditto.
1902
1903         * platform/ios/wak/WebCoreThread.mm:
1904         (StartWebThread): Took out the call to WebCoreObjCDeallocOnWebThread for DOMObject.
1905         This class is now defined in legacy WebKit, so we do the code there there along
1906         with the other WebKit classes.
1907
1908         * platform/ios/wak/WebCoreThreadSafe.h: Removed the unwise additional definition of
1909         WebScriptObject and DOMObject in this file. Really this entire file needs to go.
1910
1911         * platform/text/TextEncoding.h: Exported symbols needed by the Objective-C bindings.
1912         * rendering/HitTestResult.h: Ditto.
1913         * rendering/RenderLayer.h: Ditto.
1914         * rendering/RenderObject.h: Ditto.
1915
1916         * rendering/RenderThemeGtk.cpp: Rewrote code that was unnecessarily using
1917         NamedNodeMap and Attr nodes just to get the value of an attribute.
1918
1919         * rendering/style/RenderStyle.h: Exported symbols needed by the Objective-C bindings.
1920
1921         * xml/XMLHttpRequest.cpp: Added include needed now that XMLDocument.h is not
1922         included by DOMImplementation.h.
1923
1924         * xml/XPathExpression.h: Exported symbols needed by the Objective-C bindings.
1925         * xml/XPathExpression.idl: Ditto.
1926         * xml/XPathNSResolver.h: Ditto.
1927
1928         * xml/XPathResult.cpp:
1929         (WebCore::XPathResult::snapshotLength): Use unsigned instead of unsigned long.
1930         (WebCore::XPathResult::snapshotItem): Ditto.
1931         * xml/XPathResult.h: Exported symbols needed by the Objective-C bindings. Also
1932         updated types as above.
1933         * xml/XPathResult.idl: Ditto.
1934
1935 2016-08-22  Frederic Wang  <fwang@igalia.com>
1936
1937         Rename MathMLTextElement to MathMLTokenElement
1938         https://bugs.webkit.org/show_bug.cgi?id=160542
1939
1940         Reviewed by Darin Adler.
1941
1942         No new tests, behavior is unchanged.
1943
1944         * CMakeLists.txt: Rename MathMLTextElement to MathMLTokenElement.
1945         * WebCore.xcodeproj/project.pbxproj: Ditto.
1946         * mathml/MathMLAllInOne.cpp: Ditto.
1947         * mathml/MathMLOperatorElement.cpp: Ditto.
1948         * mathml/MathMLOperatorElement.h: Ditto.
1949         * mathml/MathMLTokenElement.cpp: Ditto. Also remove dead code in childShouldCreateRenderer
1950         to handle the case of mspace since that element uses its own class and forbids child creation
1951         in RenderMathMLSpace::isChildAllowed.
1952         * mathml/MathMLTokenElement.h: Rename MathMLTextElement to MathMLTokenElement.
1953         * mathml/mathtags.in: Ditto.
1954         * rendering/mathml/RenderMathMLToken.cpp: Move inclusion of MathMLTokenElement.h and
1955         implementation of element() here.
1956         * rendering/mathml/RenderMathMLToken.h: Do not implement element() in the header so that
1957         we only need need to predeclare MathMLTokenElement instead of including its header.
1958
1959 2016-08-21  Alex Christensen  <achristensen@webkit.org>
1960
1961         Use Document& instead of Document* when getting cookies
1962         https://bugs.webkit.org/show_bug.cgi?id=161011
1963
1964         Reviewed by Darin Adler.
1965
1966         No change in behavior.
1967
1968         * Modules/websockets/WebSocketChannel.cpp:
1969         (WebCore::WebSocketChannel::processBuffer):
1970         * Modules/websockets/WebSocketHandshake.cpp:
1971         (WebCore::WebSocketHandshake::clientHandshakeMessage):
1972         (WebCore::WebSocketHandshake::clientHandshakeRequest):
1973         * dom/Document.cpp:
1974         (WebCore::Document::cookie):
1975         (WebCore::Document::setCookie):
1976         (WebCore::Document::referrer):
1977         * inspector/InspectorPageAgent.cpp:
1978         (WebCore::InspectorPageAgent::getCookies):
1979         (WebCore::InspectorPageAgent::deleteCookie):
1980         (WebCore::InspectorPageAgent::getResourceTree):
1981         * loader/CookieJar.cpp:
1982         (WebCore::networkingContext):
1983         (WebCore::storageSession):
1984         (WebCore::cookies):
1985         (WebCore::setCookies):
1986         (WebCore::cookiesEnabled):
1987         (WebCore::cookieRequestHeaderFieldValue):
1988         (WebCore::getRawCookies):
1989         (WebCore::deleteCookie):
1990         (WebCore::addCookie):
1991         * loader/CookieJar.h:
1992         * page/Navigator.cpp:
1993         (WebCore::Navigator::cookieEnabled):
1994         (WebCore::Navigator::javaEnabled):
1995
1996 2016-08-21  Alex Christensen  <achristensen@webkit.org>
1997
1998         URLParser should parse IPv4 addresses
1999         https://bugs.webkit.org/show_bug.cgi?id=161023
2000
2001         Reviewed by Darin Adler.
2002
2003         Covered by new API tests because URLParser isn't used anywhere in WebCore yet.
2004
2005         * platform/URLParser.cpp:
2006         (WebCore::URLParser::authorityEndReached):
2007         (WebCore::serializeIPv4):
2008         (WebCore::parseIPv4Number):
2009         (WebCore::pow256):
2010         (WebCore::parseIPv4Host):
2011         (WebCore::parseIPv6Host):
2012         (WebCore::URLParser::hostEndReached):
2013
2014 2016-08-21  Sam Weinig  <sam@webkit.org>
2015
2016         Remove a few custom bindings
2017         https://bugs.webkit.org/show_bug.cgi?id=161039
2018
2019         Reviewed by Darin Adler.
2020
2021         Remove custom bindings for CanvasRenderingContext2D's webkitLineDash attribute and commit function.
2022
2023         * WebCore.xcodeproj/project.pbxproj:
2024         Sort files.
2025
2026         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2027         (WebCore::JSCanvasRenderingContext2D::commit): Deleted.
2028         (WebCore::JSCanvasRenderingContext2D::webkitLineDash): Deleted.
2029         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash): Deleted.
2030         * html/canvas/CanvasRenderingContext2D.cpp:
2031         (WebCore::CanvasRenderingContext2D::webkitLineDashOffset): Deleted.
2032         (WebCore::CanvasRenderingContext2D::setWebkitLineDashOffset): Deleted.
2033         * html/canvas/CanvasRenderingContext2D.h:
2034         * html/canvas/CanvasRenderingContext2D.idl:
2035
2036 2016-08-21  Youenn Fablet  <youenn@apple.com>
2037
2038         cross-origin requests redirected fail or drop author requested headers
2039         https://bugs.webkit.org/show_bug.cgi?id=112471
2040
2041         Reviewed by Alex Christensen.
2042
2043         Test: http/tests/xmlhttprequest/redirections-and-user-headers.html
2044
2045         Storing original headers in DocumentThreadableLoader.
2046         In case of cross-origin redirection in CORS mode, set the new request headers to the original headers.
2047         Add a special handling to Authorization header that should not be used when it is already removed by the network layer.
2048
2049         * loader/DocumentThreadableLoader.cpp:
2050         (WebCore::DocumentThreadableLoader::redirectReceived):
2051         (WebCore::DocumentThreadableLoader::loadRequest):
2052         * loader/DocumentThreadableLoader.h:
2053
2054 2016-08-21  Frederic Wang  <fwang@igalia.com>
2055
2056         Introduce a MathMLAnnotationElement class for the annotation/annotation-xml elements
2057         https://bugs.webkit.org/show_bug.cgi?id=160540
2058
2059         Reviewed by Darin Adler.
2060
2061         The <annotation> element can only contain text whereas the <annotation-xml> element can
2062         contain some elements as described in the HTML5 RelaxNG schema. For this reason, they have
2063         been implemented in the separate MathMLTextElement and MathMLInlineContainerElement
2064         respectively. However, they are actually closer to each other than to token elements or
2065         presentation containers. In particular they support very different attributes and are
2066         considered by the <semantics> tag. Hence we move their implementations in a new
2067         MathMLAnnotation class.
2068
2069         No new tests, already covered by existing tests.
2070
2071         * CMakeLists.txt: Add MathMLAnnotationElement.
2072         * mathml/MathMLAllInOne.cpp: Ditto.
2073         * WebCore.xcodeproj/project.pbxproj: Ditto.
2074         * mathml/MathMLAnnotationElement.cpp: Added.
2075         (WebCore::MathMLAnnotationElement::MathMLAnnotationElement): ASSERT that this class is only
2076         for annotation and annotation-xml.
2077         (WebCore::MathMLAnnotationElement::create):
2078         (WebCore::MathMLAnnotationElement::createElementRenderer): Move implementation from
2079         MathMLTextElement and MathMLInlineContainerElement.
2080         (WebCore::MathMLAnnotationElement::childShouldCreateRenderer): Move implementation from
2081         MathMLTextElement and MathMLElement.
2082         (WebCore::MathMLAnnotationElement::attributeChanged): Move implementation from MathMLElement.
2083         * mathml/MathMLAnnotationElement.h: Override isSemanticAnnotation and isPresentationMathML
2084         to return true.
2085         * mathml/MathMLElement.cpp:
2086         (WebCore::MathMLElement::childShouldCreateRenderer): Move the annotation-xml case into
2087         MathMLAnnotationElement.
2088         (WebCore::MathMLElement::attributeChanged): Deleted. This was only used for semantic
2089         annotations and so the code is moved into MathMLAnnotationElement.
2090         * mathml/MathMLElement.h:
2091         (WebCore::MathMLElement::isMathMLToken): Return false and let derived class override this.
2092         (WebCore::MathMLElement::isSemanticAnnotation): Ditto.
2093         (WebCore::MathMLElement::updateSelectedChild): Make this public so that is can be used
2094         by MathMLAnnotationElement::attributeChanged.
2095         * mathml/MathMLInlineContainerElement.cpp:
2096         (WebCore::MathMLInlineContainerElement::createElementRenderer): The annotation-xml case is
2097         now handled in MathMLAnnotationElement.
2098         * mathml/MathMLTextElement.cpp:
2099         (WebCore::MathMLTextElement::createElementRenderer): The annotation case is handled is now
2100         handled in  MathMLAnnotationElement.
2101         (WebCore::MathMLTextElement::childShouldCreateRenderer): Ditto.
2102         * mathml/MathMLTextElement.h: Override isToken to return true.
2103         * mathml/mathtags.in: Map annotation and annotation-xml to MathMLAnnotationElement.
2104
2105 2016-08-21  Michael Catanzaro  <mcatanzaro@igalia.com>
2106
2107         [GTK] Clean up CursorGtk.cpp
2108         https://bugs.webkit.org/show_bug.cgi?id=157794
2109
2110         Reviewed by Darin Adler.
2111
2112         We use GdkCursorType extensively in CursorGtk.cpp, but GTK+ does not support this anymore
2113         and they're only sure to work under X11. Instead, use supported CSS cursor names. This
2114         follows the grand tradition of replacing constants with hardcoded string values, but such
2115         is the new best practice in GTK+ world.
2116
2117         Also, we have a bunch of custom cursors copied from Firefox. Each of these cursors is
2118         nowadays guaranteed to be provided by GTK+, so we don't need any of these anymore.
2119
2120         * platform/gtk/CursorGtk.cpp:
2121         (WebCore::createNamedCursor):
2122         (WebCore::Cursor::ensurePlatformCursor):
2123         * platform/gtk/CursorGtk.h: Removed.
2124
2125 2016-08-20  Sam Weinig  <sam@webkit.org>
2126
2127         Fix the build.
2128
2129         * dom/UIEvent.h:
2130
2131 2016-08-20  Darin Adler  <darin@apple.com>
2132
2133         Removed Objective-C specific attributes from IDL, made conditionals more consistent
2134         https://bugs.webkit.org/show_bug.cgi?id=160900
2135
2136         Reviewed by Sam Weinig.
2137
2138         Removed all Objective-C-specific attributes from all the various IDL files where
2139         they were used. Except, oops, Sam already did that, and so everything just merged!
2140         Now that Objective-C is gone, made all the conditionals be based on LANGUAGE_GOBJECT
2141         specifically. Later we should cut these down because many were not actually needed
2142         for the GObject bindings, actually only for Objective-C. Also made the style of
2143         conditional consistent. Also re-sorted attributes in alphabetical order in many cases
2144         and made formatting more consistent without fancy indentation. Also removed old comments
2145         that tried to document where various operations and attributes were defined; it's not
2146         helpful to track "this was part of DOM level 2" at this point. Also fixed a variety of
2147         types to explicitly state the values are nullable in cases where the generated code
2148         is currently not affected by that; mostly read-only attribute types.
2149
2150         * Modules/mediasession/HTMLMediaElementMediaSession.idl:
2151         * Modules/mediastream/HTMLMediaElementMediaStream.idl:
2152         * animation/AnimationTimeline.idl:
2153         * animation/DocumentAnimation.idl:
2154         * bindings/scripts/IDLAttributes.txt:
2155         * css/CSSMediaRule.idl:
2156         * css/CSSPrimitiveValue.idl:
2157         * css/CSSRule.idl:
2158         * css/CSSStyleDeclaration.idl:
2159         * css/CSSStyleSheet.idl:
2160         * css/CSSValue.idl:
2161         * css/RGBColor.idl:
2162         * css/StyleSheet.idl:
2163         * dom/CharacterData.idl:
2164         * dom/DOMCoreException.idl:
2165         * dom/DOMImplementation.idl:
2166         * dom/Document.idl:
2167         * dom/DocumentType.idl:
2168         * dom/Element.idl:
2169         * dom/Event.idl:
2170         * dom/EventListener.idl:
2171         * dom/EventTarget.idl:
2172         * dom/KeyboardEvent.idl:
2173         * dom/MessageEvent.idl:
2174         * dom/MessagePort.idl:
2175         * dom/MouseEvent.idl:
2176         * dom/MutationEvent.idl:
2177         * dom/NamedNodeMap.idl:
2178         * dom/Node.idl:
2179         * dom/NodeFilter.idl:
2180         * dom/NonElementParentNode.idl:
2181         * dom/Range.idl:
2182         * dom/Slotable.idl:
2183         * dom/UIEvent.idl:
2184         * dom/WheelEvent.idl:
2185         * fileapi/FileException.idl:
2186         * html/DOMTokenList.idl:
2187         * html/HTMLAnchorElement.idl:
2188         * html/HTMLAppletElement.idl:
2189         * html/HTMLCollection.idl:
2190         * html/HTMLDocument.idl:
2191         * html/HTMLElement.idl:
2192         * html/HTMLEmbedElement.idl:
2193         * html/HTMLFormElement.idl:
2194         * html/HTMLInputElement.idl:
2195         * html/HTMLMediaElement.idl:
2196         * html/HTMLOptionElement.idl:
2197         * html/HTMLOptionsCollection.idl:
2198         * html/HTMLSelectElement.idl:
2199         * html/HTMLTableColElement.idl:
2200         * html/HTMLVideoElement.idl:
2201         * html/ImageData.idl:
2202         * html/URLUtils.idl:
2203         * html/track/TextTrack.idl:
2204         * page/AbstractView.idl:
2205         * page/DOMSelection.idl:
2206         * page/DOMWindow.idl:
2207         * page/Location.idl:
2208         * svg/SVGDocument.idl:
2209         * svg/SVGElement.idl:
2210         * svg/SVGException.idl:
2211         * svg/SVGExternalResourcesRequired.idl:
2212         * svg/SVGFilterPrimitiveStandardAttributes.idl:
2213         * svg/SVGFitToViewBox.idl:
2214         * svg/SVGPathSeg.idl:
2215         * svg/SVGTests.idl:
2216         * svg/SVGURIReference.idl:
2217         * svg/SVGZoomAndPan.idl:
2218         * workers/DedicatedWorkerGlobalScope.idl:
2219         * workers/Worker.idl:
2220         * workers/WorkerGlobalScope.idl:
2221         * xml/XPathException.idl:
2222         * xml/XPathExpression.idl:
2223         * xml/XPathNSResolver.idl:
2224         See above for summary of changes.
2225
2226 2016-08-20  Sam Weinig  <sam@webkit.org>
2227
2228         Remove Objective-C specific extended attributes from the bindings
2229         https://bugs.webkit.org/show_bug.cgi?id=161034
2230
2231         Reviewed by Dan Bernstein.
2232
2233         - Removes ObjCPolymorphic, ObjCProtocol, ObjCLegacyUnnamedParameters and ObjCExplicitAtomicString
2234           extended attributes.
2235
2236         * animation/AnimationTimeline.idl:
2237         * css/CSSMediaRule.idl:
2238         * css/CSSPrimitiveValue.idl:
2239         * css/CSSRule.idl:
2240         * css/CSSStyleDeclaration.idl:
2241         * css/CSSStyleSheet.idl:
2242         * css/CSSValue.idl:
2243         * css/StyleSheet.idl:
2244         * dom/CharacterData.idl:
2245         * dom/DOMImplementation.idl:
2246         * dom/Document.idl:
2247         * dom/Element.idl:
2248         * dom/Event.idl:
2249         * dom/EventListener.idl:
2250         * dom/EventTarget.idl:
2251         * dom/MouseEvent.idl:
2252         * dom/MutationEvent.idl:
2253         * dom/NamedNodeMap.idl:
2254         * dom/Node.idl:
2255         * dom/NodeFilter.idl:
2256         * dom/NonElementParentNode.idl:
2257         * dom/Range.idl:
2258         * dom/UIEvent.idl:
2259         * html/HTMLCollection.idl:
2260         * html/HTMLSelectElement.idl:
2261         * svg/SVGExternalResourcesRequired.idl:
2262         * svg/SVGFilterPrimitiveStandardAttributes.idl:
2263         * svg/SVGFitToViewBox.idl:
2264         * svg/SVGPathSeg.idl:
2265         * svg/SVGTests.idl:
2266         * svg/SVGURIReference.idl:
2267         * svg/SVGZoomAndPan.idl:
2268         * xml/XPathExpression.idl:
2269         * xml/XPathNSResolver.idl:
2270
2271 2016-08-20  Sam Weinig  <sam@webkit.org>
2272
2273         Roll out r204683.
2274
2275 2016-08-20  Sam Weinig  <sam@webkit.org>
2276
2277         Remove Objective-C specific extended attributes / features from the bindings
2278         https://bugs.webkit.org/show_bug.cgi?id=161034
2279
2280         Reviewed by Dan Bernstein.
2281
2282         - Removes ObjCPolymorphic, ObjCProtocol, ObjCLegacyUnnamedParameters and ObjCExplicitAtomicString
2283           extended attributes.
2284         - Remove support for multiple inheritance from the IDLParser.
2285
2286         * bindings/scripts/CodeGenerator.pm:
2287         * bindings/scripts/IDLParser.pm:
2288         * animation/AnimationTimeline.idl:
2289         * css/CSSMediaRule.idl:
2290         * css/CSSPrimitiveValue.idl:
2291         * css/CSSRule.idl:
2292         * css/CSSStyleDeclaration.idl:
2293         * css/CSSStyleSheet.idl:
2294         * css/CSSValue.idl:
2295         * css/StyleSheet.idl:
2296         * dom/CharacterData.idl:
2297         * dom/DOMImplementation.idl:
2298         * dom/Document.idl:
2299         * dom/Element.idl:
2300         * dom/Event.idl:
2301         * dom/EventListener.idl:
2302         * dom/EventTarget.idl:
2303         * dom/MouseEvent.idl:
2304         * dom/MutationEvent.idl:
2305         * dom/NamedNodeMap.idl:
2306         * dom/Node.idl:
2307         * dom/NodeFilter.idl:
2308         * dom/NonElementParentNode.idl:
2309         * dom/Range.idl:
2310         * dom/UIEvent.idl:
2311         * html/HTMLCollection.idl:
2312         * html/HTMLSelectElement.idl:
2313         * svg/SVGExternalResourcesRequired.idl:
2314         * svg/SVGFilterPrimitiveStandardAttributes.idl:
2315         * svg/SVGFitToViewBox.idl:
2316         * svg/SVGPathSeg.idl:
2317         * svg/SVGTests.idl:
2318         * svg/SVGURIReference.idl:
2319         * svg/SVGZoomAndPan.idl:
2320         * xml/XPathExpression.idl:
2321         * xml/XPathNSResolver.idl:
2322
2323 2016-08-20  Sam Weinig  <sam@webkit.org>
2324
2325         Stop pretending that AbstractView is a thing, it's not
2326         https://bugs.webkit.org/show_bug.cgi?id=161032
2327
2328         Reviewed by Dan Bernstein.
2329
2330         Remove AbstractView.idl, the AbstractView typedef of DOMWindow, and
2331         all special casing of the name AbstractView in the JS code generator.
2332
2333         No change in behavior.
2334
2335         * DerivedSources.make:
2336         * Modules/indieui/UIRequestEvent.cpp:
2337         (WebCore::UIRequestEvent::createForBindings):
2338         (WebCore::UIRequestEvent::create):
2339         (WebCore::UIRequestEvent::UIRequestEvent):
2340         * Modules/indieui/UIRequestEvent.h:
2341         (WebCore::UIRequestEvent::receiver):
2342         * WebCore.xcodeproj/project.pbxproj:
2343         * bindings/scripts/CodeGeneratorGObject.pm:
2344         * bindings/scripts/CodeGeneratorJS.pm:
2345         (ShouldGenerateToJSDeclaration):
2346         (GetImplClassName):
2347         * dom/CompositionEvent.cpp:
2348         (WebCore::CompositionEvent::CompositionEvent):
2349         (WebCore::CompositionEvent::~CompositionEvent):
2350         (WebCore::CompositionEvent::initCompositionEvent):
2351         * dom/CompositionEvent.h:
2352         * dom/FocusEvent.cpp:
2353         (WebCore::FocusEvent::isFocusEvent):
2354         (WebCore::FocusEvent::FocusEvent):
2355         * dom/FocusEvent.h:
2356         * dom/KeyboardEvent.cpp:
2357         (WebCore::KeyboardEvent::KeyboardEvent):
2358         (WebCore::KeyboardEvent::~KeyboardEvent):
2359         (WebCore::KeyboardEvent::initKeyboardEvent):
2360         * dom/KeyboardEvent.h:
2361         * dom/MouseEvent.cpp:
2362         (WebCore::MouseEvent::createForBindings):
2363         (WebCore::MouseEvent::create):
2364         (WebCore::MouseEvent::MouseEvent):
2365         (WebCore::MouseEvent::~MouseEvent):
2366         (WebCore::MouseEvent::initMouseEvent):
2367         * dom/MouseEvent.h:
2368         * dom/MouseRelatedEvent.cpp:
2369         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
2370         (WebCore::contentsScrollOffset):
2371         * dom/MouseRelatedEvent.h:
2372         * dom/SimulatedClick.cpp:
2373         * dom/TextEvent.cpp:
2374         (WebCore::TextEvent::createForBindings):
2375         (WebCore::TextEvent::create):
2376         (WebCore::TextEvent::createForPlainTextPaste):
2377         (WebCore::TextEvent::createForFragmentPaste):
2378         (WebCore::TextEvent::createForDrop):
2379         (WebCore::TextEvent::createForDictation):
2380         (WebCore::TextEvent::TextEvent):
2381         (WebCore::TextEvent::~TextEvent):
2382         (WebCore::TextEvent::initTextEvent):
2383         * dom/TextEvent.h:
2384         * dom/TouchEvent.h:
2385         * dom/UIEvent.cpp:
2386         (WebCore::UIEvent::UIEvent):
2387         (WebCore::UIEvent::~UIEvent):
2388         (WebCore::UIEvent::initUIEvent):
2389         * dom/UIEvent.h:
2390         (WebCore::UIEvent::create):
2391         (WebCore::UIEvent::createForBindings):
2392         (WebCore::UIEvent::view):
2393         (WebCore::UIEvent::detail):
2394         * dom/UIEventWithKeyState.h:
2395         (WebCore::UIEventWithKeyState::UIEventWithKeyState):
2396         * dom/WheelEvent.cpp:
2397         (WebCore::WheelEvent::WheelEvent):
2398         (WebCore::WheelEvent::initWheelEvent):
2399         (WebCore::WheelEvent::initWebKitWheelEvent):
2400         * dom/WheelEvent.h:
2401         * page/AbstractView.idl: Removed.
2402
2403 2016-08-19  Sam Weinig  <sam@webkit.org>
2404
2405         Location.ancestorOrigins should return a FrozenArray<USVString>
2406         https://bugs.webkit.org/show_bug.cgi?id=161018
2407
2408         Reviewed by Ryosuke Niwa and Chris Dumez.
2409
2410         Updated tests: fast/dom/Window/Location/ancestor-origins.html
2411                        fast/dom/indexed-getters-returning-string.html
2412
2413         * Modules/indexeddb/IDBDatabase.cpp:
2414         (WebCore::IDBDatabase::createObjectStore):
2415         (WebCore::IDBDatabase::transaction):
2416         (WebCore::IDBDatabase::deleteObjectStore):
2417         * Modules/indexeddb/IDBDatabase.h:
2418         Remove unused ScriptExecutionContext parameter.
2419
2420         * Modules/indexeddb/IDBDatabase.idl:
2421         There is no need for a custom implementation anymore.
2422
2423         * CMakeLists.txt:
2424         * WebCore.xcodeproj/project.pbxproj:
2425         Remove JSDOMStringListCustom.cpp, which is no longer needed.
2426
2427         * bindings/js/JSDOMBinding.cpp:
2428         (WebCore::jsArray): Deleted.
2429         Remove overload of jsArray that took a DOMStringList.
2430
2431         * bindings/js/JSDOMBinding.h:
2432         (WebCore::jsFrozenArray):
2433         Add jsFrozenArray which returns an JSArray which has had the moral 
2434         equivalent of Object.freeze() called on it. This follows 
2435         http://heycam.github.io/webidl/#es-frozen-array.
2436
2437         * bindings/js/JSDOMStringListCustom.cpp:
2438         Removed.
2439
2440         * bindings/js/JSIDBDatabaseCustom.cpp:
2441         (WebCore::JSIDBDatabase::transaction): Deleted.
2442         Remove no longer necessary custom implementation of transaction.
2443
2444         * bindings/scripts/CodeGenerator.pm:
2445         (IsRefPtrType):
2446         (IsSVGAnimatedType):
2447         (IsSequenceType):
2448         (GetSequenceType):
2449         (IsFrozenArrayType):
2450         (GetFrozenArrayInnerType):
2451         * bindings/scripts/CodeGeneratorJS.pm:
2452         (AreTypesDistinguishableForOverloadResolution):
2453         (GenerateOverloadedFunctionOrConstructor):
2454         (GetNativeType):
2455         (GetNativeVectorInnerType):
2456         (GetNativeTypeForCallbacks):
2457         (JSValueToNative):
2458         (NativeToJSValue):
2459         * bindings/scripts/IDLParser.pm:
2460         (parseNonAnyType):
2461         Add support for FrozenArray, closely matching the sequence code.
2462
2463         * bindings/scripts/test/JS/JSTestCallback.cpp:
2464         * bindings/scripts/test/JS/JSTestCallback.h:
2465         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
2466         * bindings/scripts/test/JS/JSTestCallbackFunction.h:
2467         * bindings/scripts/test/JS/JSTestObj.cpp:
2468         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2469         Updated bindings test results.
2470
2471         * dom/DOMStringList.idl:
2472         Remove JSCustomToNativeObject, which is no longer needed.
2473
2474         * inspector/InspectorIndexedDBAgent.cpp:
2475         Update calls to IDBDatabase::transaction.
2476
2477         * page/Location.cpp:
2478         (WebCore::Location::ancestorOrigins):
2479         * page/Location.h:
2480         Change ancestorOrigins to return a Vector<String> rather than
2481         a DOMStringList.
2482
2483         * page/Location.idl:
2484         Change ancestorOrigins to return a FrozenArray<USVString>, matching
2485         the HTML5 spec.
2486
2487 2016-08-19  Chris Dumez  <cdumez@apple.com>
2488
2489         Mark CanvasPath operations' parameters as mandatory when they should be
2490         https://bugs.webkit.org/show_bug.cgi?id=161014
2491
2492         Reviewed by Sam Weinig.
2493
2494         Mark CanvasPath operations as mandatory when they should be:
2495         - https://html.spec.whatwg.org/multipage/scripting.html#canvaspath
2496
2497         This patch moves the CanvasPath methods from CanvasRenderingContext2D
2498         and Path2D to a new CanvasPath interface, to avoid duplication and
2499         match the specification.
2500
2501         The parameters were correctly marked as mandatory in WebKit on
2502         CanvasRenderingContext2D but not on Path2D.
2503
2504         Those parameters are correctly marked as mandatory in Chrome and Firefox.
2505
2506         No new tests, rebaselined existing test.
2507
2508         * CMakeLists.txt:
2509         * DerivedSources.make:
2510         * WebCore.xcodeproj/project.pbxproj:
2511         * html/canvas/CanvasPath.cpp: Renamed from Source/WebCore/html/canvas/CanvasPathMethods.cpp.
2512         (WebCore::CanvasPath::closePath):
2513         (WebCore::CanvasPath::moveTo):
2514         (WebCore::CanvasPath::lineTo):
2515         (WebCore::CanvasPath::quadraticCurveTo):
2516         (WebCore::CanvasPath::bezierCurveTo):
2517         (WebCore::CanvasPath::arcTo):
2518         (WebCore::normalizeAngles):
2519         (WebCore::CanvasPath::arc):
2520         (WebCore::CanvasPath::ellipse):
2521         (WebCore::CanvasPath::rect):
2522         * html/canvas/CanvasPath.h: Renamed from Source/WebCore/html/canvas/CanvasPathMethods.h.
2523         (WebCore::CanvasPath::~CanvasPath):
2524         (WebCore::CanvasPath::CanvasPath):
2525         (WebCore::CanvasPath::hasInvertibleTransform):
2526         * html/canvas/CanvasPath.idl: Added.
2527         * html/canvas/CanvasRenderingContext2D.h:
2528         * html/canvas/CanvasRenderingContext2D.idl:
2529         * html/canvas/DOMPath.h:
2530         * html/canvas/DOMPath.idl:
2531
2532 2016-08-19  Zalan Bujtas  <zalan@apple.com>
2533
2534         RenderObject::containingBlock() cleanup.
2535         https://bugs.webkit.org/show_bug.cgi?id=161013
2536
2537         Reviewed by Simon Fraser.
2538
2539         Move ::containingBlockForAbsolutePosition and ::containingBlockForFixedPosition
2540         to RenderElement after tightening containingBlock() callsites.
2541
2542         No change in functionality.
2543
2544         * dom/Element.cpp:
2545         (WebCore::layoutOverflowRectContainsAllDescendants):
2546         * rendering/RenderElement.cpp:
2547         (WebCore::RenderElement::containingBlockForFixedPosition):
2548         (WebCore::RenderElement::containingBlockForAbsolutePosition):
2549         * rendering/RenderElement.h:
2550         * rendering/RenderInline.cpp:
2551         (WebCore::RenderInline::styleWillChange):
2552         * rendering/RenderObject.cpp:
2553         (WebCore::RenderObject::containingBlock):
2554         (WebCore::RenderObject::containingBlockForFixedPosition): Deleted.
2555         (WebCore::RenderObject::containingBlockForAbsolutePosition): Deleted.
2556         * rendering/RenderObject.h:
2557
2558 2016-08-19  Dean Jackson  <dino@apple.com>
2559
2560         Implement preferLowPowerToHighPerformance for WebGL
2561         https://bugs.webkit.org/show_bug.cgi?id=161017
2562         <rdar://problem/26819135>
2563
2564         Reviewed by Myles Maxfield.
2565
2566         Implement preferLowPowerToHighPerformance on macOS by
2567         passing the correct CGL attribute when creating the
2568         pixel format.
2569
2570         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2571         (WebCore::get3DContextAttributes):
2572         * platform/graphics/mac/GraphicsContext3DMac.mm:
2573         (WebCore::setPixelFormat):
2574         (WebCore::GraphicsContext3D::GraphicsContext3D):
2575
2576 2016-08-19  Joseph Pecoraro  <pecoraro@apple.com>
2577
2578         Remove empty files and empty namespace blocks
2579         https://bugs.webkit.org/show_bug.cgi?id=160990
2580
2581         Reviewed by Alex Christensen.
2582
2583         * CMakeLists.txt:
2584         * WebCore.xcodeproj/project.pbxproj:
2585         * dom/DOMAllInOne.cpp:
2586         * dom/MessagePortChannel.cpp: Removed.
2587         * page/DatabaseProvider.h:
2588         * platform/mock/mediasource/MockTracks.cpp: Removed.
2589
2590 2016-08-19  Myles C. Maxfield  <mmaxfield@apple.com>
2591
2592         Addressing post-review comments after r204592
2593         https://bugs.webkit.org/show_bug.cgi?id=160895
2594
2595         Unreviewed.
2596
2597         No new tests because there is no behavior change.
2598
2599         * page/cocoa/ResourceUsageOverlayCocoa.mm:
2600         (WebCore::showText):
2601         * platform/graphics/ca/PlatformCALayer.cpp:
2602         (WebCore::PlatformCALayer::drawTextAtPoint):
2603         * platform/ios/LegacyTileCache.mm:
2604         (WebCore::LegacyTileCache::drawLayer):
2605
2606 2016-08-19  Ryan Haddad  <ryanhaddad@apple.com>
2607
2608         Attempt to fix the Windows build after r204652.
2609
2610         Unreviewed build fix.
2611
2612         * dom/DOMAllInOne.cpp:
2613
2614 2016-08-19  Myles C. Maxfield  <mmaxfield@apple.com>
2615
2616         Migrate from ints to unsigneds in a few more places in rendering code
2617         https://bugs.webkit.org/show_bug.cgi?id=161006
2618
2619         Reviewed by Alex Christensen.
2620
2621         No new tests because there is no behavior change.
2622
2623         * platform/graphics/GraphicsContext.cpp:
2624         (WebCore::GraphicsContext::drawBidiText):
2625         * platform/mock/MockRealtimeVideoSource.cpp:
2626         (WebCore::MockRealtimeVideoSource::drawText):
2627         * platform/text/BidiResolver.h:
2628         (WebCore::BidiCharacterRun::BidiCharacterRun):
2629         (WebCore::BidiCharacterRun::start):
2630         (WebCore::BidiCharacterRun::stop):
2631         * rendering/BidiRun.cpp:
2632         (WebCore::BidiRun::BidiRun):
2633         * rendering/BidiRun.h:
2634         * rendering/RenderBlockLineLayout.cpp:
2635         (WebCore::setLogicalWidthForTextRun):
2636         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2637         (WebCore::findFirstTrailingSpace):
2638         (WebCore::RenderBlockFlow::handleTrailingSpaces):
2639         * rendering/line/BreakingContext.h:
2640
2641 2016-08-19  Myles C. Maxfield  <mmaxfield@apple.com>
2642
2643         Migrate RenderText::stringView() to unsigneds
2644         https://bugs.webkit.org/show_bug.cgi?id=161005
2645
2646         Reviewed by Alex Christensen.
2647
2648         No new tests because there is no behavior change.
2649
2650         * rendering/RenderBlockLineLayout.cpp:
2651         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2652         * rendering/RenderText.cpp:
2653         (WebCore::RenderText::stringView):
2654         * rendering/RenderText.h:
2655
2656 2016-08-18  Ryosuke Niwa  <rniwa@webkit.org>
2657
2658         Rename LifecycleCallback to CustomElementReaction
2659         https://bugs.webkit.org/show_bug.cgi?id=160991
2660
2661         Reviewed by Chris Dumez.
2662
2663         Renamed LifecycleCallbackQueue and CustomElementLifecycleProcessingStack
2664         to CustomElementReactionQueue and CustomElementReactionStack per the latest spec:
2665         https://html.spec.whatwg.org/#custom-element-reactions
2666
2667         No new tests since this is just a rename of classes which are not exposed to the Web.
2668
2669         * CMakeLists.txt:
2670         * WebCore.xcodeproj/project.pbxproj:
2671
2672         * bindings/js/JSCustomElementsRegistryCustom.cpp:
2673         (WebCore::getCallback): Renamed from getLifecycleCallback.
2674         (WebCore::JSCustomElementsRegistry::define):
2675         (WebCore::getLifecycleCallback): Deleted.
2676
2677         * bindings/js/JSMainThreadExecState.h:
2678         (WebCore::JSMainThreadNullState):
2679
2680         * bindings/scripts/CodeGeneratorJS.pm:
2681         (GenerateImplementation):
2682
2683         * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined.
2684         * bindings/scripts/test/TestObj.idl:
2685
2686         * dom/CustomElementReactionQueue.cpp: Moved from Source/WebCore/dom/LifecycleCallbackQueue.cpp.
2687         (WebCore::CustomElementReactionQueueItem::CustomElementReactionQueueItem):
2688         (WebCore::CustomElementReactionQueue::CustomElementReactionQueue):
2689         (WebCore::CustomElementReactionQueue::~CustomElementReactionQueue):
2690         (WebCore::CustomElementReactionQueue::enqueueElementUpgrade):
2691         (WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded):
2692         (WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded):
2693         (WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded):
2694         (WebCore::CustomElementReactionQueue::invokeAll):
2695         (WebCore::CustomElementReactionStack::ensureCurrentQueue):
2696         (WebCore::CustomElementReactionStack::processQueue):
2697
2698         * dom/CustomElementReactionQueue.h: Moved from Source/WebCore/dom/LifecycleCallbackQueue.h.
2699         (WebCore::CustomElementReactionStack::CustomElementReactionStack):
2700         (WebCore::CustomElementReactionStack::~CustomElementReactionStack):
2701         (WebCore::CustomElementReactionStack::hasCurrentProcessingStack):
2702
2703         * dom/Document.cpp:
2704         (WebCore::createFallbackHTMLElement):
2705
2706         * dom/Element.cpp:
2707         (WebCore::Element::attributeChanged):
2708         (WebCore::Element::insertedInto):
2709         (WebCore::Element::removedFrom):
2710
2711 2016-08-19  Chris Dumez  <cdumez@apple.com>
2712
2713         Attr.prefix / Element.prefix attribute should be readonly
2714         https://bugs.webkit.org/show_bug.cgi?id=160998
2715
2716         Reviewed by Daniel Bates.
2717
2718         Attr.prefix / Element.prefix attribute should be readonly:
2719         - https://dom.spec.whatwg.org/#element
2720         - https://dom.spec.whatwg.org/#attr
2721
2722         Firefox and Chrome agree with the specification.
2723
2724         No new tests, rebaselined existing test.
2725
2726         * dom/Attr.idl:
2727         * dom/Element.idl:
2728
2729 2016-08-19  Chris Dumez  <cdumez@apple.com>
2730
2731         <command> should be an HTMLUnknownElement and <basefont> should be an HTMLElement
2732         https://bugs.webkit.org/show_bug.cgi?id=161004
2733
2734         Reviewed by Daniel Bates.
2735
2736         <command> should be an HTMLUnknownElement and <basefont> should be an HTMLElement as per:
2737         - https://html.spec.whatwg.org/multipage/dom.html#elements-in-the-dom:element-interface
2738
2739         <basefont> is already an HTMLElement in Firefox and Chrome. <command> is an
2740         HTMLUnknownElement in Firefox but an HTMLElement in Chrome.
2741
2742         No new tests, rebaselined existing test.
2743
2744         * html/HTMLTagNames.in:
2745
2746 2016-08-19  Nan Wang  <n_wang@apple.com>
2747
2748         AX: iOS, Wrong axLabel on static text if heading has multiple children
2749         https://bugs.webkit.org/show_bug.cgi?id=160981
2750
2751         Reviewed by Chris Fleizach.
2752
2753         Headings are using textUnderElement to compute the accessibilityLabel on iOS, so normally it's
2754         the concatenation of all the children's accessibilityLabel. Therefore, we shouldn't use accessibilityLabel
2755         to check for user defined text on headings. Instead, baseAccessibilityDescription will return the 
2756         alternate text we want.
2757
2758         Changes are covered in the modified test.
2759
2760         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2761         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
2762
2763 2016-08-19  Johan K. Jensen  <johan_jensen@apple.com>
2764
2765         Resource Timing: Make PerformanceEntryList a sequence as per spec
2766         https://bugs.webkit.org/show_bug.cgi?id=160963
2767
2768         Reviewed by Alex Christensen.
2769
2770         Change PerformanceEntryList to be a sequence of PerformanceEntry instead of an object.
2771
2772         Test: http/tests/performance/performance-resource-timing-entries-iterable.html
2773
2774         * CMakeLists.txt:
2775         * DerivedSources.cpp:
2776         * DerivedSources.make:
2777         * PlatformGTK.cmake:
2778         * WebCore.xcodeproj/project.pbxproj:
2779         * bindings/scripts/CodeGeneratorGObject.pm:
2780         Remove references to {JS,}PerformanceEntryList.{cpp,h,idl}.
2781
2782         * page/Performance.cpp:
2783         (WebCore::Performance::getEntries):
2784         (WebCore::Performance::getEntriesByType):
2785         (WebCore::Performance::getEntriesByName):
2786         * page/Performance.h:
2787         Methods now operate on a Vector of PerformanceEntry.
2788
2789         * page/Performance.idl:
2790         Typedef PerformanceEntryList as a sequence of PerformanceEntry.
2791
2792         * page/PerformanceEntryList.cpp: Removed.
2793         (WebCore::PerformanceEntryList::PerformanceEntryList): Deleted.
2794         (WebCore::PerformanceEntryList::~PerformanceEntryList): Deleted.
2795         (WebCore::PerformanceEntryList::length): Deleted.
2796         (WebCore::PerformanceEntryList::item): Deleted.
2797         (WebCore::PerformanceEntryList::append): Deleted.
2798         (WebCore::PerformanceEntryList::appendAll): Deleted.
2799         (WebCore::PerformanceEntryList::sort): Deleted.
2800         * page/PerformanceEntryList.h: Removed.
2801         (WebCore::PerformanceEntryList::create): Deleted.
2802         * page/PerformanceEntryList.idl: Removed.
2803
2804 2016-08-19  Eric Carlson  <eric.carlson@apple.com>
2805
2806         [Mac] fix PiP context menu typos
2807         https://bugs.webkit.org/show_bug.cgi?id=160999
2808         <rdar://problem/27885070>
2809
2810         Reviewed by Jer Noble.
2811
2812         * English.lproj/Localizable.strings: "Picture-in-Picture" -> "Picture in Picture".
2813
2814         * platform/LocalizedStrings.cpp:
2815         (WebCore::contextMenuItemTagEnterVideoEnhancedFullscreen): Ditto.
2816         (WebCore::contextMenuItemTagExitVideoEnhancedFullscreen): Ditto.
2817
2818 2016-08-16  Simon Fraser  <simon.fraser@apple.com>
2819
2820         Rename didLayout(LayoutMilestones) to didReachLayoutMilestone(), and related WK2 functions
2821         https://bugs.webkit.org/show_bug.cgi?id=160923
2822
2823         Reviewed by Tim Horton.
2824
2825         didLayout(LayoutMilestones) -> didReachLayoutMilestone(LayoutMilestones)
2826         dispatchDidLayout(LayoutMilestones) -> dispatchDidReachLayoutMilestone(LayoutMilestones)
2827
2828         * dom/Document.cpp:
2829         (WebCore::Document::setVisualUpdatesAllowed):
2830         * loader/EmptyClients.h:
2831         * loader/FrameLoader.cpp:
2832         (WebCore::FrameLoader::didReachLayoutMilestone):
2833         (WebCore::FrameLoader::didLayout): Deleted.
2834         * loader/FrameLoader.h:
2835         * loader/FrameLoaderClient.h:
2836         * page/FrameView.cpp:
2837         (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
2838         (WebCore::FrameView::firePaintRelatedMilestonesIfNeeded):
2839         * page/LayoutMilestones.h: Formatting
2840         * page/Page.cpp:
2841         (WebCore::Page::addRelevantRepaintedObject):
2842
2843 2016-08-19  Chris Dumez  <cdumez@apple.com>
2844
2845         DumpRenderTree crashed in com.apple.WebCore: WebCore::DOMWindow::resetDOMWindowProperties + 607
2846         https://bugs.webkit.org/show_bug.cgi?id=160983
2847         <rdar://problem/26768524>
2848
2849         Reviewed by Brent Fulgham.
2850
2851         Update DOMWindow::frameDestroyed() to ref the window object as the crash
2852         traces seem to indicate it can get destroyed during the execution of this
2853         method. Also update the code in the ~Frame destructor to not iterate over
2854         the list of FrameDestructionObservers because observers remove themselves
2855         from the list when they get destroyed.
2856
2857         No new tests, do not know how to reproduce.
2858
2859         * page/DOMWindow.cpp:
2860         (WebCore::DOMWindow::frameDestroyed):
2861         * page/Frame.cpp:
2862         (WebCore::Frame::~Frame):
2863
2864 2016-08-19  Chris Dumez  <cdumez@apple.com>
2865
2866         WebKit should unset event propagation flags after dispatch
2867         https://bugs.webkit.org/show_bug.cgi?id=160853
2868
2869         Reviewed by Ryosuke Niwa.
2870
2871         WebKit should unset event propagation flags after dispatch to reflect
2872         the latest DOM specification:
2873         - https://github.com/whatwg/dom/commit/806d4aab584f6fc38c21f8e088b51b8ba3e27e20
2874
2875         No new tests, rebaselined existing tests.
2876
2877         * dom/Event.h:
2878         (WebCore::Event::resetPropagationFlags):
2879         * dom/EventDispatcher.cpp:
2880         (WebCore::EventDispatcher::dispatchEvent):
2881         * dom/EventTarget.cpp:
2882         (WebCore::EventTarget::dispatchEvent):
2883
2884 2016-08-18  Daniel Bates  <dabates@apple.com>
2885
2886         Ld warns of non-existent PrivateFrameworks directory when building WebKit with the public iOS 9.3 SDK
2887         https://bugs.webkit.org/show_bug.cgi?id=160979
2888
2889         Rubber-stamped by Simon Fraser.
2890
2891         Only add the SDK PrivateFrameworks directory to the FRAMEWORK_SEARCH_PATH when building for
2892         iOS Simulator, building with an iOS SDK that does not support text-based stubs, or building
2893         an Apple-internal build.
2894
2895         * Configurations/Base.xcconfig: Define WK_TARGET_IOS_VERSION_MAJOR.
2896         * Configurations/WebCore.xcconfig:
2897
2898 2016-08-18  Sam Weinig  <sam@webkit.org>
2899
2900         Re-landing:
2901
2902         Support WebIDL unions (Part 1)
2903         https://bugs.webkit.org/show_bug.cgi?id=160769
2904
2905         Reviewed by Chris Dumez.
2906
2907         This is the first part of an effort to add support for union types
2908         in our code generators. This change:
2909         - Adds a domType struct to hold the parsed type information. For now, we only
2910           use it temporarily while parsing, and don't expose it to the code generators,
2911           but that will change in a later patch.
2912         - Remove support for scoped identifiers for types. They are not supported by WebIDL.
2913         - Make debugging the parser easier by providing backtraces when asserting.
2914
2915         There should be no observable changes.
2916
2917         * bindings/scripts/IDLParser.pm:
2918
2919 2016-08-18  Chris Dumez  <cdumez@apple.com>
2920
2921         Move prefix / namespaceURI / localName attributes from Node to Attr / Element
2922         https://bugs.webkit.org/show_bug.cgi?id=160988
2923
2924         Reviewed by Ryosuke Niwa.
2925
2926         Move prefix / namespaceURI / localName attributes from Node to Attr / Element
2927         as per the latest DOM specification:
2928         - https://dom.spec.whatwg.org/#element
2929         - https://dom.spec.whatwg.org/#attr
2930
2931         Firefox and Chrome match the specification.
2932
2933         No new tests, rebaselined existing tests.
2934
2935         * dom/Attr.h:
2936         * dom/Attr.idl:
2937         * dom/Element.h:
2938         * dom/Element.idl:
2939         * dom/Node.idl:
2940
2941 2016-08-18  Jonathan Bedard  <jbedard@apple.com>
2942
2943         Binding NULL pointer to reference in WebCore::RenderObject
2944         https://bugs.webkit.org/show_bug.cgi?id=160830
2945
2946         Reviewed by Myles C. Maxfield.
2947
2948         No new tests needed, existing functionality not changed.
2949
2950         Fixes a dereferenced NULL pointer bound to a reference through a minor re-factor.
2951
2952         * rendering/InlineIterator.h:
2953         (WebCore::InlineIterator::clear): Explicit clear occurs, instead of a call to moveTo.
2954         (WebCore::InlineIterator::moveToStartOf): Swapped pointer for reference.
2955         (WebCore::InlineIterator::moveTo): Swapped pointer for reference.
2956         (WebCore::InlineIterator::increment): Explicitly call clear for clarity.
2957         * rendering/line/BreakingContext.h:
2958         (WebCore::BreakingContext::commitLineBreakClear): Commit a line break and clear the iterator.
2959         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth): Swapped pointer for reference.
2960         (WebCore::BreakingContext::InlineIteratorHistory::moveTo): Swapped pointer for reference.
2961         (WebCore::BreakingContext::increment): Explicitly call clear for clarity.
2962         (WebCore::BreakingContext::handleBR): Swapped pointer for passed reference.
2963         (WebCore::BreakingContext::handleReplaced): Explicitly call clear for clarity.
2964         (WebCore::tryHyphenating): Swapped pointer for passed reference.
2965         (WebCore::BreakingContext::handleText): Replaced all render object passing with references.  Note that the caller explicitly checks if m_current.renderer() exists before calling this function.
2966         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): Explicitly call clear for clarity.
2967         (WebCore::BreakingContext::handleEndOfLine): Explicitly call clear for clarity.
2968
2969 2016-08-18  Ryosuke Niwa  <rniwa@webkit.org>
2970
2971         Windows build fix after r204611. Use the fully qualified name to avoid the ambiguity in VC++.
2972
2973         * bindings/js/JSCustomElementInterface.cpp:
2974         (WebCore::JSCustomElementInterface::invokeCallback):
2975         * bindings/js/JSCustomElementInterface.h:
2976         (WebCore::JSCustomElementInterface::invokeCallback):
2977
2978 2016-08-18  Dean Jackson  <dino@apple.com>
2979
2980         Support passing preferLowPowerToHighPerformance and failIfMajorPerformanceCaveat
2981         https://bugs.webkit.org/show_bug.cgi?id=160982
2982         <rdar://problem/27915946>
2983
2984         Reviewed by Simon Fraser.
2985
2986         Update WebGLContextAttributes to be compliant with the specification,
2987         by adding preferLowPowerToHighPerformance and failIfMajorPerformanceCaveat.
2988         They are not implemented yet, so asking the created context what
2989         values it used should give the default.
2990
2991         Test: fast/canvas/webgl/context-creation-attributes.html
2992
2993         * html/canvas/WebGLContextAttributes.cpp:
2994         (WebCore::WebGLContextAttributes::preferLowPowerToHighPerformance):
2995         (WebCore::WebGLContextAttributes::setPreferLowPowerToHighPerformance):
2996         (WebCore::WebGLContextAttributes::failIfMajorPerformanceCaveat):
2997         (WebCore::WebGLContextAttributes::setFailIfMajorPerformanceCaveat):
2998         * html/canvas/WebGLContextAttributes.h:
2999         * html/canvas/WebGLContextAttributes.idl:
3000         * html/canvas/WebGLRenderingContextBase.cpp:
3001         (WebCore::WebGLRenderingContextBase::create): Deleted.
3002         * platform/graphics/GraphicsContext3D.h:
3003         (WebCore::GraphicsContext3D::Attributes::Attributes): Deleted.
3004
3005 2016-08-18  Anders Carlsson  <andersca@apple.com>
3006
3007         Move an NPAPI-only function from WebCore to WebKit
3008         https://bugs.webkit.org/show_bug.cgi?id=160967
3009
3010         Reviewed by Sam Weinig.
3011
3012         * WebCore.xcodeproj/project.pbxproj:
3013         * bindings/js/ScriptController.cpp:
3014         (WebCore::ScriptController::createScriptObjectForPluginElement): Deleted.
3015         * bindings/js/ScriptController.h:
3016         * bridge/NP_jsobject.h:
3017
3018 2016-08-18  Ryosuke Niwa  <rniwa@webkit.org>
3019
3020         Binding test fix after r204611.
3021
3022         * bindings/scripts/test/TestObj.idl:
3023
3024 2016-08-18  Chris Dumez  <cdumez@apple.com>
3025
3026         Unreviewed, nit fix after r204605 reported by Darin.
3027
3028         * platform/text/TextCodecICU.cpp:
3029
3030 2016-08-17  Ryosuke Niwa  <rniwa@webkit.org>
3031
3032         Add basic support for connected and disconnected callbacks
3033         https://bugs.webkit.org/show_bug.cgi?id=160950
3034
3035         Reviewed by Chris Dumez.
3036
3037         Added the basic support for custom elements' connectedCallback and disconnectedCallback. These callbacks
3038         are enqueued by inserting and removing a node as spec'ed by https://dom.spec.whatwg.org/#concept-node-insert
3039         and https://dom.spec.whatwg.org/#concept-node-remove
3040
3041         For now, we only support callbacks on appendChild and removeChild to limit the amount of code changes and
3042         tests that need to be included in this patch.
3043
3044         This patch also renames InvokesCustomElementLifecycleCallbacks IDL attribute to CEReactions to match
3045         the latest specification: https://html.spec.whatwg.org/multipage/scripting.html#cereactions
3046
3047         Tests: fast/custom-elements/connected-callbacks.html
3048                fast/custom-elements/disconnected-callbacks.html
3049
3050         * bindings/js/JSCustomElementInterface.cpp:
3051         (WebCore::JSCustomElementInterface::invokeCallback): Extracted from invokeAttributeChangedCallback.
3052         (WebCore::JSCustomElementInterface::setConnectedCallback): Added.
3053         (WebCore::JSCustomElementInterface::invokeConnectedCallback): Added.
3054         (WebCore::JSCustomElementInterface::setDisconnectedCallback): Added.
3055         (WebCore::JSCustomElementInterface::invokeDisconnectedCallback): Added.
3056         (WebCore::JSCustomElementInterface::setAttributeChangedCallback):
3057         (WebCore::JSCustomElementInterface::invokeAttributeChangedCallback): Renamed from attributeChanged.
3058         * bindings/js/JSCustomElementInterface.h: Added m_connectedCallback and m_disconnectedCallback as instance
3059         variables. Also removed the superfluous mutable qualifier from m_constructor m_attributeChangedCallback.
3060         * bindings/js/JSCustomElementsRegistryCustom.cpp:
3061         (WebCore::JSCustomElementsRegistry::define): Store connectedCallback and disconnectedCallback.
3062         * bindings/scripts/CodeGeneratorJS.pm:
3063         (GenerateImplementation):
3064         * bindings/scripts/IDLAttributes.txt:
3065         * dom/CustomElementsRegistry.idl:
3066         * dom/Element.cpp:
3067         (WebCore::Element::insertedInto): Call enqueueConnectedCallbackIfNeeded.
3068         (WebCore::Element::removedFrom): Call enqueueDisconnectedCallbackIfNeeded.
3069         * dom/Element.idl:
3070         * dom/LifecycleCallbackQueue.cpp:
3071         (WebCore::LifecycleQueueItem::invoke): Added calls to invokeConnectedCallback and invokeDisconnectedCallback.
3072         (WebCore::findInterfaceForCustomElement): Extracted from enqueueAttributeChangedCallbackIfNeeded.
3073         (WebCore::LifecycleCallbackQueue::enqueueConnectedCallbackIfNeeded): Added.
3074         (WebCore::LifecycleCallbackQueue::enqueueDisconnectedCallbackIfNeeded): Added.
3075         (WebCore::LifecycleCallbackQueue::enqueueAttributeChangedCallbackIfNeeded):
3076         (WebCore::CustomElementLifecycleProcessingStack::ensureCurrentQueue):
3077         * dom/LifecycleCallbackQueue.h:
3078         * dom/Node.idl:
3079
3080 2016-08-18  Beth Dakin  <bdakin@apple.com>
3081
3082         Update the accessibility titles for list insertion
3083         https://bugs.webkit.org/show_bug.cgi?id=160972
3084         -and corresponding-
3085         rdar://problem/27750446
3086
3087         Reviewed by Chris Fleizach.
3088
3089         Update accessibility titles based on feedback.
3090         * English.lproj/Localizable.strings:
3091         * platform/LocalizedStrings.cpp:
3092         (WebCore::insertListTypeNone):
3093         (WebCore::insertListTypeBulleted):
3094         (WebCore::insertListTypeBulletedAccessibilityTitle):
3095         (WebCore::insertListTypeNumbered):
3096         (WebCore::insertListTypeNumberedAccessibilityTitle):
3097         (WebCore::insertListTypeNoneAccessibilityTitle): Deleted.
3098         * platform/LocalizedStrings.h:
3099
3100 2016-08-18  Chris Dumez  <cdumez@apple.com>
3101
3102         Align our encoding labels with the encoding specification
3103         https://bugs.webkit.org/show_bug.cgi?id=160931
3104
3105         Reviewed by Darin Adler.
3106
3107         Align our encoding labels with the encoding specification:
3108         - https://encoding.spec.whatwg.org/#names-and-labels
3109
3110         This also aligns with Firefox and Chrome.
3111
3112         No new tests, rebaselined existing test.
3113
3114         * platform/text/TextCodecICU.cpp:
3115         (WebCore::TextCodecICU::registerEncodingNames):
3116         * platform/text/TextCodecLatin1.cpp:
3117         (WebCore::TextCodecLatin1::registerEncodingNames):
3118         (WebCore::newStreamingTextDecoderWindowsLatin1): Deleted.
3119         (WebCore::TextCodecLatin1::registerCodecs): Deleted.
3120         * platform/text/TextCodecUTF8.cpp:
3121         (WebCore::TextCodecUTF8::registerEncodingNames):
3122
3123 2016-08-18  Andy Estes  <aestes@apple.com>
3124
3125         [Cocoa] Add SPI to WKProcessPool for enabling cookie storage partitioning
3126         https://bugs.webkit.org/show_bug.cgi?id=160964
3127
3128         Reviewed by Brent Fulgham.
3129
3130         * page/Settings.cpp:
3131         (WebCore::Settings::setCookieStoragePartitioningEnabled): Deleted.
3132         * page/Settings.h:
3133         (WebCore::Settings::cookieStoragePartitioningEnabled): Deleted.
3134         * platform/network/NetworkStorageSession.h:
3135         * platform/network/cf/NetworkStorageSessionCFNet.cpp: Defined cookieStoragePartitioningEnabled.
3136         (WebCore::NetworkStorageSession::setCookieStoragePartitioningEnabled): Set cookieStoragePartitioningEnabled.
3137         (WebCore::cookieStoragePartition): Used cookieStoragePartitioningEnabled instead of Settings::cookieStoragePartitioningEnabled().
3138
3139 2016-08-18  Eric Carlson  <eric.carlson@apple.com>
3140
3141         AX: Audio Description tracks are not labeled correctly, causing user confusion
3142         https://bugs.webkit.org/show_bug.cgi?id=160652
3143         <rdar://problem/27742208>
3144
3145         Reviewed by Antoine Quint.
3146
3147         * http/tests/media/hls/hls-accessiblity-describes-video-menu-expected.txt: Added.
3148         * http/tests/media/hls/hls-accessiblity-describes-video-menu.html: Added.
3149
3150         * media/trackmenu-test.js:
3151         (clickCCButton): Fail immediately if "video" is null or not a media element. Make failure 
3152         logging more descriptive.
3153
3154         * platform/gtk/TestExpectations: Skip new test.
3155
3156         * platform/ios-simulator/media/video-controls-captions-trackmenu-expected.txt: Updated for
3157         clickCCButton error message change.
3158         * platform/ios-simulator/media/video-controls-captions-trackmenu-hide-on-click-expected.txt: Ditto.
3159         * platform/ios-simulator/media/video-controls-captions-trackmenu-localized-expected.txt: Ditto.
3160         * platform/ios-simulator/media/video-controls-captions-trackmenu-sorted-expected.txt: Ditto.
3161
3162 2016-08-18  Alex Christensen  <achristensen@webkit.org>
3163
3164         Fix WinCairo build after r204592.
3165
3166         * PlatformAppleWin.cmake:
3167         * PlatformWin.cmake:
3168
3169 2016-08-18  Eric Carlson  <eric.carlson@apple.com>
3170
3171         [MediaStream] cleanup MediaConstraints
3172         https://bugs.webkit.org/show_bug.cgi?id=160957
3173
3174         Reviewed by Antoine Quint.
3175
3176         No new tests, no behavior change.
3177
3178         * Modules/mediastream/CaptureDeviceManager.cpp:
3179         (CaptureDeviceManager::sessionSupportsConstraint): Use MediaConstraint::type
3180
3181         * bindings/js/JSMediaDevicesCustom.cpp:
3182         (WebCore::initializeStringConstraintWithList): MediaConstraint::create now takes the constraint
3183         type, not name.
3184         (WebCore::createStringConstraint): Ditto.
3185         (WebCore::createBooleanConstraint): Ditto.
3186         (WebCore::createDoubleConstraint): Ditto.
3187         (WebCore::createIntConstraint): Ditto.
3188         (WebCore::parseMediaTrackConstraintSetForKey): Pass constraint type.
3189
3190         * platform/mediastream/MediaConstraints.cpp:
3191         (WebCore::MediaConstraint::create): MediaConstraint constructor now takes the constraint.
3192         (WebCore::IntConstraint::create): Take type, not name.
3193         (WebCore::IntConstraint::setMin): Ditto.
3194         (WebCore::DoubleConstraint::create): Ditto.
3195         (WebCore::BooleanConstraint::create): Ditto.
3196         (WebCore::StringConstraint::create): Ditto.
3197         * platform/mediastream/MediaConstraints.h:
3198
3199         * platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp:
3200         (WebCore::RealtimeMediaSourceSupportedConstraints::nameForConstraint): Make static.
3201         (WebCore::RealtimeMediaSourceSupportedConstraints::constraintFromName): Ditto.
3202         * platform/mediastream/RealtimeMediaSourceSupportedConstraints.h:
3203
3204         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3205         (WebCore::AVCaptureDeviceManager::sessionSupportsConstraint): Use MediaConstraint::type
3206
3207         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3208         (WebCore::AVVideoCaptureSource::applyConstraints): nameForConstraint is a static method. Add
3209         error logging.
3210
3211         * platform/mock/MediaConstraintsMock.cpp:
3212         (WebCore::isSatisfiable): Use constraint type.
3213
3214 2016-08-18  Rawinder Singh  <rawinder.singh-webkit@cisra.canon.com.au>
3215
3216         [web-animations] Add Animatable, AnimationEffect, KeyframeEffect and Animation interface
3217         https://bugs.webkit.org/show_bug.cgi?id=156096
3218
3219         Reviewed by Dean Jackson.
3220
3221         Adds:
3222         - Animatable interface and implementation of getAnimations in Element.
3223         - Interface and implementation for Document getAnimations method.
3224         - AnimationEffect interface and class stub.
3225         - KeyframeEffect interface and constructor implementation.
3226         - 'Animation' interface, constructor and query methods for effect and timeline.
3227         - Remove runtime condition on Web animation interfaces (compile time flag is specified).
3228
3229         Test: webanimations/Document.html
3230
3231         * CMakeLists.txt:
3232         * DerivedSources.make:
3233         * PlatformGTK.cmake:
3234         * WebCore.xcodeproj/project.pbxproj:
3235         * animation/Animatable.idl: Copied from Source/WebCore/animation/AnimationTimeline.idl.
3236         * animation/AnimationEffect.cpp: Copied from Source/WebCore/animation/AnimationTimeline.cpp.
3237         (WebCore::AnimationEffect::AnimationEffect):
3238         (WebCore::AnimationEffect::~AnimationEffect):
3239         (WebCore::AnimationEffect::setAnimation):
3240         (WebCore::AnimationEffect::isCurrent):
3241         (WebCore::AnimationEffect::isInEffect):
3242         * animation/AnimationEffect.h: Copied from Source/WebCore/animation/DocumentTimeline.cpp.
3243         * animation/AnimationEffect.idl: Copied from Source/WebCore/animation/DocumentAnimation.idl.
3244         * animation/AnimationTimeline.cpp:
3245         (WebCore::AnimationTimeline::destroy):
3246         (WebCore::AnimationTimeline::attachAnimation):
3247         (WebCore::AnimationTimeline::detachAnimation):
3248         * animation/AnimationTimeline.h:
3249         * animation/AnimationTimeline.idl:
3250         * animation/DocumentAnimation.cpp:
3251         (WebCore::DocumentAnimation::timeline):
3252         (WebCore::DocumentAnimation::getAnimations):
3253         (WebCore::DocumentAnimation::addAnimation):
3254         (WebCore::DocumentAnimation::removeAnimation):
3255         * animation/DocumentAnimation.h:
3256         (WebCore::DocumentAnimation::getAnimations):
3257         * animation/DocumentAnimation.idl:
3258         * animation/DocumentTimeline.cpp:
3259         (WebCore::DocumentTimeline::create):
3260         (WebCore::DocumentTimeline::DocumentTimeline):
3261         (WebCore::DocumentTimeline::attach):
3262         (WebCore::DocumentTimeline::detach):
3263         * animation/DocumentTimeline.h:
3264         * animation/DocumentTimeline.idl:
3265         * animation/KeyframeEffect.cpp: Copied from Source/WebCore/animation/DocumentTimeline.cpp.
3266         (WebCore::KeyframeEffect::create):
3267         (WebCore::KeyframeEffect::KeyframeEffect):
3268         (WebCore::KeyframeEffect::~KeyframeEffect):
3269         * animation/KeyframeEffect.h: Copied from Source/WebCore/animation/DocumentTimeline.h.
3270         * animation/KeyframeEffect.idl: Copied from Source/WebCore/animation/DocumentTimeline.idl.
3271         * animation/WebAnimation.cpp: Copied from Source/WebCore/animation/DocumentAnimation.cpp.
3272         (WebCore::WebAnimation::create):
3273         (WebCore::WebAnimation::WebAnimation):
3274         (WebCore::WebAnimation::~WebAnimation):
3275         * animation/WebAnimation.h: Copied from Source/WebCore/animation/DocumentAnimation.h.
3276         * animation/WebAnimation.idl: Copied from Source/WebCore/animation/DocumentTimeline.idl.
3277         * bindings/scripts/CodeGeneratorGObject.pm:
3278         * dom/Element.cpp:
3279         (WebCore::Element::getAnimations):
3280         * dom/Element.h:
3281         * dom/Element.idl:
3282
3283 2016-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
3284
3285         [Cocoa] Migrate off of deprecated CoreGraphics API CGContextSelectFont() and CGContextShowTextAtPoint()
3286         https://bugs.webkit.org/show_bug.cgi?id=160895
3287
3288         Reviewed by Dean Jackson.
3289
3290         Migrate to CTLineDraw() instead.
3291
3292         This patch also adds support for linking to the existing CoreText framework on Windows.
3293
3294         No new tests because there is no behavior change.
3295
3296         * PlatformWin.cmake:
3297         * page/cocoa/ResourceUsageOverlayCocoa.mm:
3298         (WebCore::showText):
3299         * platform/graphics/ca/PlatformCALayer.cpp:
3300         (WebCore::PlatformCALayer::drawTextAtPoint):
3301         * platform/ios/LegacyTileCache.mm:
3302         (WebCore::LegacyTileCache::drawLayer):
3303         * platform/spi/win/CoreTextSPIWin.cpp: Added.
3304         * platform/spi/win/CoreTextSPIWin.h: Added.
3305
3306 2016-08-17  Benjamin Poulain  <benjamin@webkit.org>
3307
3308         [CSS] The parser should not get rid of empty namespace specification in front of element name selectors
3309         https://bugs.webkit.org/show_bug.cgi?id=160936
3310
3311         Reviewed by Chris Dumez.
3312
3313         There are two places where you can specify an empty namespace
3314         in selectors:
3315             - Element name (e.g. "|name")
3316             - Attribute name (e.g. "[|name]")
3317         In the first case, if we have an empty namespace, the selector
3318         should match that.
3319         In the second case, the default namespace of attribute is already
3320         empty so it is just the same as "[name]".
3321
3322         Our code was just discarding any empty namespace. This is fine
3323         for attributes but for names that is transforming "|name" into "name"
3324         which is invalid.
3325
3326         This patch updates those cases to differentiate:
3327         - Null prefix -> There was no namespace specified.
3328         - Empty prefix -> There was a namespace prefix and it is empty.
3329
3330         Test: fast/selectors/empty-namespace-with-element-selector.html
3331
3332         * css/CSSGrammar.y.in:
3333         * css/CSSParser.cpp:
3334         (WebCore::CSSParser::determineNameInNamespace):
3335         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
3336         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
3337         * css/CSSParser.h:
3338         * css/CSSSelector.cpp:
3339         (WebCore::CSSSelector::selectorText):
3340         * css/CSSSelectorList.cpp:
3341         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
3342         * css/StyleSheetContents.cpp:
3343         (WebCore::StyleSheetContents::determineNamespace): Deleted.
3344
3345 2016-08-17  Chris Dumez  <cdumez@apple.com>
3346
3347         [Web IDL] Add support for dictionary members of dictionary types
3348         https://bugs.webkit.org/show_bug.cgi?id=160902
3349
3350         Reviewed by Sam Weinig.
3351
3352         Add support for dictionary members of dictionary types.
3353
3354         No new tests, updated bindings tests.
3355
3356         * bindings/scripts/CodeGeneratorJS.pm:
3357         (GenerateDictionaryImplementationContent):
3358         * bindings/scripts/test/JS/JSTestObj.cpp:
3359         (WebCore::convertDictionary<TestObj::Dictionary>):
3360         (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
3361         * bindings/scripts/test/TestObj.idl:
3362
3363 2016-08-17  Anders Carlsson  <andersca@apple.com>
3364
3365         Add support for additional networks
3366         https://bugs.webkit.org/show_bug.cgi?id=160951
3367         rdar://problem/27807479
3368
3369         Reviewed by Sam Weinig.
3370
3371         * Modules/applepay/ApplePaySession.cpp:
3372         (WebCore::createSupportedNetworks):
3373         (WebCore::createPaymentRequest):
3374         (WebCore::ApplePaySession::create):
3375         * Modules/applepay/PaymentRequest.cpp:
3376         (WebCore::isAdditionalValidSupportedNetwork):
3377         (WebCore::PaymentRequest::isValidSupportedNetwork):
3378         * Modules/applepay/PaymentRequest.h:
3379         (WebCore::PaymentRequest::supportedNetworks):
3380         (WebCore::PaymentRequest::setSupportedNetworks):
3381         * Modules/applepay/PaymentRequestValidator.cpp:
3382         (WebCore::PaymentRequestValidator::validateSupportedNetworks):
3383         * Modules/applepay/PaymentRequestValidator.h:
3384
3385 2016-08-17  Anders Carlsson  <andersca@apple.com>
3386
3387         Remove a couple of unused WKSI function pointers
3388         https://bugs.webkit.org/show_bug.cgi?id=160946
3389
3390         Reviewed by Dan Bernstein.
3391
3392         * platform/mac/WebCoreSystemInterface.h:
3393         * platform/mac/WebCoreSystemInterface.mm:
3394
3395 2016-08-17  Anders Carlsson  <andersca@apple.com>
3396
3397         Move WKSignedPublicKeyAndChallengeString into WebCore and make it proper C++
3398         https://bugs.webkit.org/show_bug.cgi?id=160945
3399
3400         Reviewed by Dan Bernstein.
3401
3402         * platform/mac/SSLKeyGeneratorMac.mm:
3403         (WebCore::getSubjectPublicKey):
3404         (WebCore::signPublicKeyAndChallenge):
3405         (WebCore::signedPublicKeyAndChallengeString):
3406
3407 2016-08-17  Antti Koivisto  <antti@apple.com>
3408
3409         Remove CSS_IMAGE_SET feature define
3410         https://bugs.webkit.org/show_bug.cgi?id=160944
3411
3412         Reviewed by Dean Jackson.
3413
3414         This seems to be enabled everywhere already (except Mac cmake build which it keep breaking).
3415
3416         * css/CSSCursorImageValue.cpp:
3417         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
3418         (WebCore::CSSCursorImageValue::cachedImage):
3419         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
3420         * css/CSSImageSetValue.cpp:
3421         (WebCore::CSSImageSetValue::cloneForCSSOM):
3422         * css/CSSImageSetValue.h:
3423         * css/CSSParser.cpp:
3424         (WebCore::CSSParser::parseVariableDependentValue):
3425         (WebCore::isImageSetFunctionValue):
3426         (WebCore::CSSParser::parseValue):
3427         (WebCore::CSSParser::parseContent):
3428         (WebCore::CSSParser::parseFillImage):
3429         (WebCore::CSSParser::parseBorderImage):
3430         (WebCore::CSSParser::parseImageResolution):
3431         (WebCore::CSSParser::parseImageSet):
3432         * css/CSSParser.h:
3433         * css/CSSToStyleMap.cpp:
3434         (WebCore::CSSToStyleMap::mapNinePieceImage):
3435         * css/CSSValue.cpp:
3436         (WebCore::CSSValue::traverseSubresources):
3437         (WebCore::CSSValue::equals):
3438         (WebCore::CSSValue::cssText):
3439         (WebCore::CSSValue::destroy):
3440         (WebCore::CSSValue::cloneForCSSOM):
3441         * css/CSSValue.h:
3442         (WebCore::CSSValue::isImageGeneratorValue):
3443         (WebCore::CSSValue::isGradientValue):
3444         (WebCore::CSSValue::isNamedImageValue):
3445         (WebCore::CSSValue::isImageSetValue):
3446         (WebCore::CSSValue::isImageValue):
3447         (WebCore::CSSValue::isInheritedValue):
3448         * css/StyleBuilderConverter.h:
3449         (WebCore::isImageShape):
3450         * css/StyleBuilderCustom.h:
3451         (WebCore::StyleBuilderCustom::applyValueContent):
3452         * css/StyleResolver.cpp:
3453         (WebCore::StyleResolver::styleImage):
3454         (WebCore::StyleResolver::generatedOrPendingFromValue):
3455         (WebCore::StyleResolver::setOrPendingFromValue):
3456         (WebCore::StyleResolver::cursorOrPendingFromValue):
3457         * css/StyleResolver.h:
3458         (WebCore::StyleResolver::applyPropertyToRegularStyle):
3459         * css/makeprop.pl:
3460         (generateFillLayerPropertyValueSetter):
3461         * rendering/style/StyleCachedImage.cpp:
3462         (WebCore::StyleCachedImage::cssValue):
3463         * rendering/style/StylePendingImage.h:
3464         * style/StylePendingResources.cpp:
3465         (WebCore::Style::loadPendingImage):
3466
3467 2016-08-17  Antti Koivisto  <antti@apple.com>
3468
3469         Try to fix CMake build.
3470
3471         * rendering/style/StyleCachedImage.cpp:
3472         (WebCore::StyleCachedImage::cssValue):
3473
3474 2016-08-17  Chris Fleizach  <cfleizach@apple.com>
3475
3476         AX: Support abbreviations in iOS
3477         https://bugs.webkit.org/show_bug.cgi?id=160907
3478
3479         Reviewed by Joanmarie Diggs.
3480
3481         Expose the expandedTextValue attribute for iOS, so that VoiceOver can speak abbreviations correctly.
3482
3483         Test: accessibility/ios-simulator/abbreviation.html
3484
3485         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3486         (-[WebAccessibilityObjectWrapper textMarkersForRange:]):
34