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