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