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