Exit fullscreen button in fullscreen media playback needs an accessibility string
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>
2
3         Exit fullscreen button in fullscreen media playback needs an accessibility string
4         https://bugs.webkit.org/show_bug.cgi?id=161380
5
6         Reviewed by Beth Dakin.
7
8         Adds an accessibility string for the exit fullscreen button.
9
10         * English.lproj/Localizable.strings:
11         * platform/LocalizedStrings.cpp:
12         (WebCore::exitFullScreenButtonAccessibilityTitle):
13         * platform/LocalizedStrings.h:
14
15 2016-08-30  Antti Koivisto  <antti@apple.com>
16
17         Remove StylePendingImage
18         https://bugs.webkit.org/show_bug.cgi?id=161245
19
20         Reviewed by Andreas Kling.
21
22         Instances of this confusing type are used as placeholders during style resolution.
23         We can get rid of it and make "pending" a state of StyleImage. This simplies the code and
24         will allow further improvements.
25
26         * WebCore.xcodeproj/project.pbxproj:
27         * css/CSSCrossfadeValue.cpp:
28         (WebCore::CSSCrossfadeValue::isPending):
29         (WebCore::CSSCrossfadeValue::blend):
30         * css/CSSCrossfadeValue.h:
31         * css/CSSCursorImageValue.cpp:
32         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
33         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
34
35             Save the original URL since the underlying CSSImageValue may change.
36
37         (WebCore::CSSCursorImageValue::updateCursorElement):
38         (WebCore::CSSCursorImageValue::cursorElementRemoved):
39         (WebCore::CSSCursorImageValue::cursorElementChanged):
40         (WebCore::CSSCursorImageValue::loadImage):
41         (WebCore::CSSCursorImageValue::styleImage):
42         (WebCore::CSSCursorImageValue::isSVGCursor):
43         (WebCore::CSSCursorImageValue::cachedImageURL):
44         (WebCore::CSSCursorImageValue::updateCachedImage):
45         (WebCore::CSSCursorImageValue::detachPendingImage): Deleted.
46         (WebCore::CSSCursorImageValue::cachedImage): Deleted.
47         (WebCore::CSSCursorImageValue::cachedOrPendingImage): Deleted.
48         (WebCore::CSSCursorImageValue::clearCachedImage): Deleted.
49         * css/CSSCursorImageValue.h:
50         * css/CSSFilterImageValue.cpp:
51         (WebCore::CSSFilterImageValue::isPending):
52         * css/CSSFilterImageValue.h:
53         * css/CSSImageGeneratorValue.cpp:
54         (WebCore::CSSImageGeneratorValue::isPending):
55         (WebCore::CSSImageGeneratorValue::subimageIsPending):
56         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
57         * css/CSSImageGeneratorValue.h:
58         * css/CSSImageSetValue.cpp:
59         (WebCore::CSSImageSetValue::~CSSImageSetValue):
60         (WebCore::CSSImageSetValue::loadBestFitImage):
61         (WebCore::CSSImageSetValue::styleImage):
62         (WebCore::CSSImageSetValue::traverseSubresources):
63         (WebCore::CSSImageSetValue::detachPendingImage): Deleted.
64         (WebCore::CSSImageSetValue::bestFitImage): Deleted.
65         (WebCore::CSSImageSetValue::cachedOrPendingImageSet): Deleted.
66         * css/CSSImageSetValue.h:
67         * css/CSSImageValue.cpp:
68         (WebCore::CSSImageValue::CSSImageValue):
69         (WebCore::CSSImageValue::~CSSImageValue):
70         (WebCore::CSSImageValue::isPending):
71         (WebCore::CSSImageValue::styleImage):
72         (WebCore::CSSImageValue::loadImage):
73         (WebCore::CSSImageValue::traverseSubresources):
74         (WebCore::CSSImageValue::detachPendingImage): Deleted.
75         (WebCore::CSSImageValue::cachedOrPendingImage): Deleted.
76         (WebCore::CSSImageValue::cachedImage): Deleted.
77         * css/CSSImageValue.h:
78         (WebCore::CSSImageValue::create):
79         * css/StyleResolver.cpp:
80         (WebCore::StyleResolver::cachedOrPendingFromValue):
81         (WebCore::StyleResolver::generatedOrPendingFromValue):
82         (WebCore::StyleResolver::setOrPendingFromValue):
83         (WebCore::StyleResolver::cursorOrPendingFromValue):
84         * page/PageSerializer.cpp:
85         (WebCore::PageSerializer::retrieveResourcesForProperties):
86         * page/animation/CSSPropertyAnimation.cpp:
87         (WebCore::blendFilter):
88         (WebCore::crossfadeBlend):
89         * rendering/RenderImageResourceStyleImage.cpp:
90         (WebCore::RenderImageResourceStyleImage::image):
91         * rendering/shapes/ShapeOutsideInfo.cpp:
92         (WebCore::ShapeOutsideInfo::createShapeForImage):
93         * rendering/style/StyleCachedImage.cpp:
94         (WebCore::StyleCachedImage::StyleCachedImage):
95         (WebCore::StyleCachedImage::~StyleCachedImage):
96         (WebCore::StyleCachedImage::setCachedImage):
97         (WebCore::StyleCachedImage::cssValue):
98         (WebCore::StyleCachedImage::canRender):
99         (WebCore::StyleCachedImage::isPending):
100         (WebCore::StyleCachedImage::isLoaded):
101         (WebCore::StyleCachedImage::errorOccurred):
102         (WebCore::StyleCachedImage::imageSize):
103         (WebCore::StyleCachedImage::imageHasRelativeWidth):
104         (WebCore::StyleCachedImage::imageHasRelativeHeight):
105         (WebCore::StyleCachedImage::computeIntrinsicDimensions):
106         (WebCore::StyleCachedImage::usesImageContainerSize):
107         (WebCore::StyleCachedImage::setContainerSizeForRenderer):
108         (WebCore::StyleCachedImage::addClient):
109         (WebCore::StyleCachedImage::removeClient):
110         (WebCore::StyleCachedImage::image):
111         (WebCore::StyleCachedImage::knownToBeOpaque):
112         * rendering/style/StyleCachedImage.h:
113         * rendering/style/StyleGeneratedImage.cpp:
114         (WebCore::StyleGeneratedImage::isPending):
115         * rendering/style/StyleGeneratedImage.h:
116         * rendering/style/StyleImage.h:
117         (WebCore::StyleImage::isCachedImage):
118         (WebCore::StyleImage::StyleImage):
119         (WebCore::StyleImage::canRender): Deleted.
120         (WebCore::StyleImage::isPendingImage): Deleted.
121         * rendering/style/StylePendingImage.h: Removed.
122         * style/StylePendingResources.cpp:
123         (WebCore::Style::loadPendingImage):
124         (WebCore::Style::loadPendingImages):
125
126 2016-08-30  Philippe Normand  <pnormand@igalia.com>
127
128         [GStreamer] bump required version to 1.2.3
129         https://bugs.webkit.org/show_bug.cgi?id=159667
130
131         Reviewed by Xabier Rodriguez Calvar.
132
133         GStreamer 1.0.3 was released almost 4 years ago. GStreamer 1.2.3
134         being the version shipped in the Ubuntu LTS (14.04) it
135         feels reasonable to bump our requirement. Other major
136         distributions like Debian Jessie and Fedora ship GStreamer 1.4.x
137         already.
138
139         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
140         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
141         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
142         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Deleted.
143         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
144         (webkitVideoSinkProposeAllocation): Deleted.
145         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
146         (webKitWebSrcQueryWithParent): Deleted.
147
148 2016-08-29  Alex Christensen  <achristensen@webkit.org>
149
150         Fix Windows build after r205161
151
152         * bindings/js/JSPerformanceTimingCustom.cpp:
153
154 2016-08-29  Chris Dumez  <cdumez@apple.com>
155
156         We should throw a SecurityError when denying setting a cross-origin Location property
157         https://bugs.webkit.org/show_bug.cgi?id=161368
158
159         Reviewed by Ryosuke Niwa.
160
161         We should throw a SecurityError when denying setting a cross-origin
162         Location property:
163         - https://html.spec.whatwg.org/#location-set
164         - https://html.spec.whatwg.org/#crossoriginset-(-o,-p,-v,-receiver-)
165         - https://html.spec.whatwg.org/#location-getownproperty
166
167         Firefox and Chrome already throw. We currently ignore and log an error
168         message.
169
170         No new tests, updated existing tests.
171
172         * bindings/js/JSLocationCustom.cpp:
173         (WebCore::JSLocation::putDelegate):
174
175 2016-08-29  Brent Fulgham  <bfulgham@apple.com>
176
177         Avoid holding GlyphData in MathOperator
178         https://bugs.webkit.org/show_bug.cgi?id=161256
179         <rdar://problem/28033400>
180
181         Reviewed by Myles C. Maxfield.
182
183         Do not cache GlyphData in MathOperator elements, because the fonts referenced in the
184         GlyphData may be purged during low-memory conditions. Instead, we should store either
185         the relevant CodePoint, or the fallback Glyph (for the current system font).
186
187         Added an initialization function for GlyphAssemblyData, since unions containing structs
188         do not properly call constructors, resulting in garbage font/glyph content.
189
190         No new tests. Changes are covered by existing MathML test suite.
191
192         * rendering/mathml/MathOperator.cpp:
193         (WebCore::MathOperator::GlyphAssemblyData::initialize): Added.
194         (WebCore::MathOperator::MathOperator): Initialize m_assembly/m_variant.
195         (WebCore::MathOperator::setSizeVariant): Only store the glyph, not the font.
196         (WebCore::glyphDataForCodePointOrFallbackGlyph): Added helper function.
197         (WebCore::MathOperator::setGlyphAssembly): Do not rely on stored GlyphData.
198         (WebCore::MathOperator::calculateGlyphAssemblyFallback): Remove unneeded argument. Check
199         if a fallback glyph is being used and remember for later.
200         (WebCore::MathOperator::calculateStretchyData): Do not rely on stored GlyphData.
201         (WebCore::MathOperator::fillWithVerticalExtensionGlyph): Ditto.
202         (WebCore::MathOperator::fillWithHorizontalExtensionGlyph): Ditto.
203         (WebCore::MathOperator::paintVerticalGlyphAssembly): Ditto.
204         (WebCore::MathOperator::paintHorizontalGlyphAssembly): Ditto.
205         (WebCore::MathOperator::paint): Ditto.
206         * rendering/mathml/MathOperator.h:
207         (WebCore::MathOperator::GlyphAssemblyData::hasExtension): Added.
208         (WebCore::MathOperator::GlyphAssemblyData::hasMiddle): Added.
209         (WebCore::MathOperator::MathOperator): Deleted.
210
211 2016-08-29  Dean Jackson  <dino@apple.com>
212
213         JSON.stringify returns empty when used with performance.timing.
214         https://bugs.webkit.org/show_bug.cgi?id=151813
215         <rdar://problem/28066067>
216
217         Reviewed by Sam Weinig.
218
219         While we are waiting for our bindings generator to handle
220         "serializer", add a custom toJSON function that allows
221         performance.timing to be stringified.
222
223         Test: fast/dom/webtiming-performance-timing-stringify.html
224
225         * CMakeLists.txt: New file added.
226         * WebCore.xcodeproj/project.pbxproj: New file added.
227         * bindings/js/JSPerformanceTimingCustom.cpp: Added. Implements toJSON.
228         (WebCore::JSPerformanceTiming::toJSON):
229         * page/PerformanceTiming.idl: Add toJSON().
230
231 2016-08-29  Chris Dumez  <cdumez@apple.com>
232
233         Regression(r204923): It should be possible to set 'Location.href' cross origin
234         https://bugs.webkit.org/show_bug.cgi?id=161343
235         <rdar://problem/28063361>
236
237         Reviewed by Ryosuke Niwa.
238
239         It should be possible to set 'Location.href' cross origin:
240         - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
241
242         Firefox and Chrome allow this but we throw a SecurityError.
243
244         We already allow setting crossOrigin.window.location which is equivalent.
245
246         No new tests, updated existing test.
247
248         * bindings/js/JSLocationCustom.cpp:
249         (WebCore::JSLocation::putDelegate):
250         Refactor the [Put] delegate so that it does not log a security error
251         when setting 'href' attribute, given that setting it works as expected.
252         This fixes a bug in shipping Safari where setting 'href' would work but
253         log an error message anyway.
254
255         * bindings/scripts/CodeGeneratorJS.pm:
256         (GenerateImplementation):
257         Add support for [DoNotCheckSecurityOnSetter] IDL extended attribute,
258         in addition to the already supported [DoNotCheckSecurity] and
259         [DoNotCheckSecurityOnGetter].
260
261         * page/Location.idl:
262         Use [DoNotCheckSecurityOnSetter] on 'href' attribute as it can be
263         set cross-origin. This fixes the regression introduced in r204923.
264
265 2016-08-29  Chris Dumez  <cdumez@apple.com>
266
267         We should throw a SecurityError when denying setting a cross-origin Window property
268         https://bugs.webkit.org/show_bug.cgi?id=161339
269
270         Reviewed by Geoffrey Garen.
271
272         We should throw a SecurityError when denying setting a cross-origin Window property:
273         - https://html.spec.whatwg.org/#crossoriginset-(-o,-p,-v,-receiver-)
274         - https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
275
276         e.g. crossOriginWindow.name = "" should throw.
277
278         Firefox and Chrome already throw but WebKit merely ignores the call and logs an
279         error message.
280
281         No new tests, updated existing tests.
282
283         * bindings/js/JSDOMWindowCustom.cpp:
284         (WebCore::JSDOMWindow::put):
285
286 2016-08-29  Alex Christensen  <achristensen@webkit.org>
287
288         URLParser should parse about:blank
289         https://bugs.webkit.org/show_bug.cgi?id=161324
290
291         Reviewed by Brady Eidson.
292
293         Covered by new API tests.
294
295         * platform/URLParser.cpp:
296         (WebCore::URLParser::parse):
297
298 2016-08-29  Chris Dumez  <cdumez@apple.com>
299
300         document.createEvent("popstateevent") should create a PopStateEvent
301         https://bugs.webkit.org/show_bug.cgi?id=161321
302
303         Reviewed by Darin Adler.
304
305         document.createEvent("popstateevent") should create a PopStateEvent as per:
306         - https://dom.spec.whatwg.org/#dom-document-createevent
307
308         Firefox and Chrome match the specification but WebKit throws an exception,
309         which is risky compatibility-wise.
310
311         No new tests, rebaselined existing tests.
312
313         * dom/Document.cpp:
314         (WebCore::Document::createEvent):
315         * dom/PopStateEvent.cpp:
316         (WebCore::PopStateEvent::createForBindings):
317         * dom/PopStateEvent.h:
318
319 2016-08-29  Chris Dumez  <cdumez@apple.com>
320
321         We should throw a SecurityError when denying access to cross-origin Window properties
322         https://bugs.webkit.org/show_bug.cgi?id=161316
323
324         Reviewed by Darin Adler.
325
326         We should throw a SecurityError when denying access to cross-origin Window properties:
327         - https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
328         - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
329
330         Firefox and Chrome already throw.
331
332         No new tests, updated existing tests.
333
334         * bindings/js/JSDOMWindowCustom.cpp:
335         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
336
337 2016-08-29  Youenn Fablet  <youenn@apple.com>
338
339         Image Loader should use FetchOptions::mode according its crossOrigin attribute
340         https://bugs.webkit.org/show_bug.cgi?id=161309
341
342         Reviewed by Darin Adler.
343
344         Test: http/tests/security/load-image-after-redirection.html
345
346         * loader/ImageLoader.cpp:
347         (WebCore::ImageLoader::updateFromElement): Using CachedResourceRequest::setAsPotentiallyCrossOrigin to set fetch mode.
348
349 2016-08-29  Frederic Wang  <fwang@igalia.com>
350
351         Use MathMLPresentationElement for all MathML presentation tags
352         https://bugs.webkit.org/show_bug.cgi?id=161297
353
354         Reviewed by Darin Adler.
355
356         Some tabular MathML elements as well as unsupported presentation MathML markup currently
357         create a generic MathMLElement instance. We make them instead use the
358         MathMLPresentationElement class since they are presentation MathML elements. This also
359         allows to make MathMLElement::isPresentationMathML always return false.
360
361         No new tests, already covered by existing tests.
362
363         * mathml/MathMLElement.cpp:
364         (WebCore::MathMLElement::isPresentationMathML): Deleted. Moved into the header file.
365         * mathml/MathMLElement.h:
366         (WebCore::MathMLElement::isPresentationMathML): Make this always return false now that all
367         presentation markup are handled by MathMLPresentationElement.
368         * mathml/MathMLPresentationElement.cpp:
369         (WebCore::MathMLPresentationElement::createElementRenderer): Make the fallback always call
370         MathMLElement::createElementRenderer. This preserves the behavior for the new elements
371         handled here and does not affect the old ones (table is handled above while all the others
372         are already handled in the derived class).
373         * mathml/mathtags.in: Use MathMLPresentationElement for all MathML presentation tags.
374
375 2016-08-29  Alex Christensen  <achristensen@webkit.org>
376
377         API test URLParserTest.ParserFailures failing ASSERT_NOT_REACHED
378         https://bugs.webkit.org/show_bug.cgi?id=161317
379
380         Reviewed by Brady Eidson.
381
382         Added an API test.
383
384         * platform/URLParser.cpp:
385         (WebCore::URLParser::parse):
386         Turns out, this state can be reached.
387
388 2016-08-29  Youenn Fablet  <youenn@apple.com>
389
390         [Fetch API] Response cloning should structureClone when teeing Response stream
391         https://bugs.webkit.org/show_bug.cgi?id=161147
392
393         Reviewed by Darin Adler.
394
395         Covered by updated test.
396
397         Implementing structure cloning for ArrayBuffer and ArrayBufferView objects.
398         Using this structure cloning in ReadableStream to support structureClone in the case of Fetch API.
399
400         * CMakeLists.txt: Adding StructureClone.cpp
401         * Modules/fetch/FetchResponse.js:
402         (clone): Setting structureClone to true
403         * Modules/streams/ReadableStreamInternals.js:
404         (doStructuredClone): Added to clone ArrayBuffer/ArrayBufferView chunks. Throwing exception otherwise.
405         (teeReadableStreamPullFunction): Using @doStructuredClone
406         * WebCore.xcodeproj/project.pbxproj: Adding StructureClone.cpp/.h
407         * bindings/js/JSDOMGlobalObject.cpp:
408         (WebCore::JSDOMGlobalObject::addBuiltinGlobals): Adding @ArrayBuffer and structuredCloneArrayBuffer and structuredCloneArrayBufferView private properties.
409         * bindings/js/StructuredClone.cpp: Added.
410         (WebCore::structuredCloneArrayBuffer): Cloning of ArrayBuffer as per
411         http://w3c.github.io/html/infrastructure.html#section-structuredclone step 11.
412        (WebCore::structuredCloneArrayBufferView): Cloning of ArrayBufferView as
413        perhttp://w3c.github.io/html/infrastructure.html#section-structuredclone, step 12.
414         * bindings/js/StructuredClone.h: Added.
415         * bindings/js/WebCoreBuiltinNames.h: 
416
417 2016-08-16  Carlos Garcia Campos  <cgarcia@igalia.com>
418
419         [GTK] Accelerated compositing does not work in Wayland
420         https://bugs.webkit.org/show_bug.cgi?id=115803
421
422         Reviewed by Michael Catanzaro.
423
424         The Wayland implementation in WebKit2 uses a nested display running in the UI process so that GL contexts created
425         in the web process need to be created in the nested display. We currently have a shared platform display that
426         should represent the connection to the actual display all applications connect to. This patch refactors the
427         GLContext API to ensure that GL contexts are always attached to a particular platform display. The create
428         methods receive an optional PlatformDisplay that will be used as the display of all GL operations of the created
429         GL context. The sharing GL context should also share the same display, it can't be global to the process, but to
430         the display, so it's now created on demand by the PlatformDisplay. In addition to the global shared display,
431         it's now possible to set a shared display for compositing that can be used when creating GL contexts. This makes
432         it possible to use a different display for compositing, connected to the nested display in wayland, even in non
433         wayland environments.
434         The patch also adds support for surfaceless EGL contexts that can be used for offscreen contexts. It also adds
435         support for offscreen wayland contexts, as a fallback in wayland in case surfaceless is not supported.
436         Some wayland code that is specific to the WebKit2 implementation has been moved to the WebKit2 layer.
437
438         * PlatformGTK.cmake:
439         * platform/graphics/GLContext.cpp:
440         (WebCore::initializeOpenGLShimsIfNeeded):
441         (WebCore::GLContext::createContextForWindow):
442         (WebCore::GLContext::createOffscreenContext):
443         (WebCore::GLContext::createSharingContext):
444         (WebCore::GLContext::GLContext):
445         (WebCore::GLContext::~GLContext):
446         (WebCore::GLContext::current):
447         (WebCore::activeContextList): Deleted.
448         * platform/graphics/GLContext.h:
449         (WebCore::GLContext::display):
450         * platform/graphics/GraphicsContext3DPrivate.cpp:
451         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
452         (WebCore::GraphicsContext3DPrivate::platformContext):
453         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
454         * platform/graphics/PlatformDisplay.cpp:
455         (WebCore::PlatformDisplay::createPlatformDisplay): Always use the default wayland display created by GTK+ for
456         the global shared display.
457         (WebCore::PlatformDisplay::sharedDisplayForCompositing):
458         (WebCore::PlatformDisplay::setSharedDisplayForCompositing):
459         (WebCore::PlatformDisplay::sharingGLContext):
460         (WebCore::eglDisplays): Helper HashSet to keep track of all PlatformDisplays with an EGL display intialized to
461         properly termimate them at exit.
462         (WebCore::PlatformDisplay::initializeEGLDisplay): Remove eglBindAPI() from display initialization, since it's
463         not a display initialization and it's thread specific, so it needs to be called on every thread where EGL is used.
464         (WebCore::PlatformDisplay::terminateEGLDisplay):
465         (WebCore::PlatformDisplay::eglDisplay): Deleted.
466         * platform/graphics/PlatformDisplay.h:
467         * platform/graphics/cairo/ImageBufferCairo.cpp:
468         (WebCore::ImageBufferData::~ImageBufferData):
469         (WebCore::ImageBufferData::createCompositorBuffer):
470         (WebCore::ImageBufferData::swapBuffersIfNeeded):
471         (WebCore::ImageBufferData::createCairoGLSurface):
472         (WebCore::ImageBufferData::paintToTextureMapper):
473         (WebCore::ImageBuffer::copyToPlatformTexture):
474         * platform/graphics/egl/GLContextEGL.cpp:
475         (WebCore::GLContextEGL::getEGLConfig):
476         (WebCore::GLContextEGL::createWindowContext):
477         (WebCore::GLContextEGL::createPbufferContext):
478         (WebCore::GLContextEGL::createSurfacelessContext):
479         (WebCore::GLContextEGL::createPixmapContext):
480         (WebCore::GLContextEGL::createWaylandContext):
481         (WebCore::GLContextEGL::createContext):
482         (WebCore::GLContextEGL::createSharingContext):
483         (WebCore::GLContextEGL::GLContextEGL):
484         (WebCore::GLContextEGL::~GLContextEGL):
485         (WebCore::GLContextEGL::defaultFrameBufferSize):
486         (WebCore::GLContextEGL::makeContextCurrent):
487         (WebCore::GLContextEGL::swapBuffers):
488         (WebCore::GLContextEGL::cairoDevice):
489         * platform/graphics/egl/GLContextEGL.h:
490         * platform/graphics/glx/GLContextGLX.cpp:
491         (WebCore::GLContextGLX::createWindowContext):
492         (WebCore::GLContextGLX::createPbufferContext):
493         (WebCore::GLContextGLX::createPixmapContext):
494         (WebCore::GLContextGLX::createContext):
495         (WebCore::GLContextGLX::createSharingContext):
496         (WebCore::GLContextGLX::GLContextGLX):
497         (WebCore::GLContextGLX::~GLContextGLX):
498         (WebCore::GLContextGLX::defaultFrameBufferSize):
499         (WebCore::GLContextGLX::makeContextCurrent):
500         (WebCore::GLContextGLX::swapBuffers):
501         (WebCore::GLContextGLX::cairoDevice):
502         (WebCore::GLContextGLX::waitNative): Deleted.
503         * platform/graphics/glx/GLContextGLX.h:
504         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
505         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
506         (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
507         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
508         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland):
509         (WebCore::PlatformDisplayWayland::~PlatformDisplayWayland):
510         (WebCore::PlatformDisplayWayland::initialize):
511         (WebCore::PlatformDisplayWayland::registryGlobal):
512         (WebCore::PlatformDisplayWayland::createSurface):
513         * platform/graphics/wayland/PlatformDisplayWayland.h:
514         (WebCore::PlatformDisplayWayland::native): Deleted.
515         * platform/graphics/wayland/WaylandEventSource.cpp: Removed.
516         * platform/graphics/wayland/WaylandSurface.cpp: Removed.
517         * platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml: Removed.
518         * platform/graphics/wayland/WlUniquePtr.h: Make it possible to use std::unique_ptr with Wayland objects.
519         (WebCore::WlPtrDeleter::operator()):
520
521 2016-08-29  Youenn Fablet  <youenn@apple.com>
522
523         [Fetch API] Add support for BufferSource bodies
524         https://bugs.webkit.org/show_bug.cgi?id=161087
525
526         Reviewed by Darin Adler.
527
528         Covered by updated tests.
529
530         Added support for ArrayBuffer, ArrayBufferView and FormData upload.
531         Added support for consuming ArrayBufferView.
532
533         To support FormData upload, FetchBOdy is now storing a FormData computed from the DOMFormData passed to the constructor.
534         This allows setting the content-type for FormData correctly with the boundary parameter.
535
536         * Modules/fetch/FetchBody.cpp:
537         (WebCore::FetchBody::bodyForInternalRequest): Adding support for FormData upload.
538         (WebCore::FetchBody::FetchBody): Adding ArrayBuffer and ArrayBufferView constructors.
539         (WebCore::FetchBody::extract): Extracting in case of BufferSource (i.e. ArrayBuffer or ArrayBufferView) and FormData.
540         (WebCore::FetchBody::consume): Adding support to consume ArrayBufferView.
541         (WebCore::FetchBody::consumeAsStream): Adding support to consume ArrayBufferView as a stream.
542         Cloned the ArrayBuffer before enqueuing it in  the stream.
543         (WebCore::FetchBody::consumeArrayBuffer): Cleaning m_data after being consumed.
544         (WebCore::FetchBody::consumeArrayBufferView): Adding support to consume ArrayBufferView.
545         (WebCore::FetchBody::consumeText): Cleaning m_text after being consumed.
546         (WebCore::FetchBody::consumeBlob): Ditto for m_blob.
547         (WebCore::FetchBody::bodyForInternalRequest): Adding support for ArrayBuffer and ArrayBufferView upload.
548         * Modules/fetch/FetchBody.h:
549         * Modules/fetch/FetchRequest.cpp:
550         (WebCore::FetchRequest::internalRequest): Passing ScriptExecutionContext as this is needed for FormData upload.
551         (WebCore::FetchRequest::setBody): Ditto.
552         * Modules/fetch/FetchResponse.cpp:
553         (WebCore::FetchResponse::initializeWith): Ditto.
554         (WebCore::FetchResponse::fetch): Removing FormData upload rejection check.
555
556 2016-08-26  Sergio Villar Senin  <svillar@igalia.com>
557
558         [css-grid] Do not recursively call layout during auto repeat computation
559         https://bugs.webkit.org/show_bug.cgi?id=161234
560
561         Reviewed by Manuel Rego Casasnovas.
562
563         The computation of auto repeat tracks was incorrectly recursively triggering
564         a layout in order to compute the available size. That was happening whenever
565         the width was indefinite. In such cases we should treat the width always as
566         indefinite without having to run any extra code. During the layout phase
567         we'll have the actual width available.
568
569         This fix also unveiled a few errors in one of the imported mozilla tests which were
570         incorrectly passing when they should not.
571
572         Test: fast/css-grid-layout/grid-indefinite-size-auto-repeat-crash.html
573
574         * rendering/RenderGrid.cpp:
575         (WebCore::RenderGrid::layoutBlock):
576         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
577         (WebCore::RenderGrid::computeAutoRepeatTracksCount):
578         (WebCore::RenderGrid::placeItemsOnGrid):
579         * rendering/RenderGrid.h:
580
581 2016-08-29  Youenn Fablet  <youenn@apple.com>
582
583         data:// URL behavior of XHR does not match spec
584         https://bugs.webkit.org/show_bug.cgi?id=109199
585
586         Reviewed by Darin Adler.
587
588         Covered by rebased tests.
589
590         Making data URLs same origin for XHR and fetch API.
591         This is the behavior when https://fetch.spec.whatwg.org/#same-origin-data-url-flag is set.
592         As per the specs, this flag is set for fetch API and XMLHttpRequest.
593         Introducing this flag in ThreadableLoader options, default value being false.
594         Setting flag for XHR and fetch API.
595
596         Fixing accuracy of data URL loading by setting status code and content-type HTTP header as per fetch specification.
597
598         As can be seen from the rebased tests, no constraint is put on the method used as the fetch specification is about to allow all methods for data URLs.
599
600         * Modules/fetch/FetchLoader.cpp:
601         (WebCore::FetchLoader::start): Setting same-origin-data-url-flag to true.
602         * loader/DocumentThreadableLoader.cpp:
603         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Making data URLs same origin if flag is set.
604         * loader/ResourceLoader.cpp:
605         (WebCore::ResourceLoader::loadDataURL): Setting status code and content-type header according specification.
606         * loader/ThreadableLoader.cpp:
607         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Adding same-origin-data-url-flag option.
608         * loader/ThreadableLoader.h:
609         * loader/WorkerThreadableLoader.cpp:
610         (WebCore::LoaderTaskOptions::LoaderTaskOptions): Ensuring flag is preserved when going to the main thread.
611         * platform/network/DataURLDecoder.cpp:
612         (WebCore::DataURLDecoder::parseMediaType): Setting mediaType value, used by ResourceLoader to set the content-type header.
613         * platform/network/DataURLDecoder.h:
614         * xml/XMLHttpRequest.cpp:
615         (WebCore::XMLHttpRequest::createRequest): Setting same-origin-data-url-flag to true.
616
617 2016-08-25  Frederic Wang  <fwang@igalia.com>
618
619         Add support for non-BMP operators U+1EEF0 and U+1EEF1
620         https://bugs.webkit.org/show_bug.cgi?id=153984
621
622         Reviewed by Darin Adler.
623
624         Tests: mathml/presentation/non-bmp-operators-spacing.html
625                mathml/presentation/non-bmp-operators-stretching.html
626
627         * mathml/MathMLOperatorDictionary.cpp: We move the definition of operator dictionary Entry
628         here as it is not used by external code.
629         We now also accept non-BMP operators and add entries for U+1EEF0 and U+1EEF1.
630         (WebCore::extractProperty): Helper function to convert from Entry structure to a Property
631         structure.
632         (WebCore::MathMLOperatorDictionary::search): This function now accepts a non-BMP parameter
633         and returns a Property structure.
634         (WebCore::MathMLOperatorDictionary::isVertical): This function now accepts a non-BMP parameter.
635         * mathml/MathMLOperatorDictionary.h: Replace the Entry structure with a Property structure
636         which was used by MathMLOperatorElement. Update the signatures of search and isVertical.
637         * mathml/MathMLOperatorElement.cpp:
638         (WebCore::MathMLOperatorElement::parseOperatorChar): Remove the special case that excludes
639         non-BMP operators.
640         (WebCore::MathMLOperatorElement::computeDictionaryProperty): Rename the property structure
641         to use the one moved into MathMLOperatorDictionary.h. We no longer need to convert the result
642         of the search call.
643         (WebCore::MathMLOperatorElement::dictionaryProperty): Rename the property structure.
644         * mathml/MathMLOperatorElement.h: Make OperatorChar accept non-BMP operators.
645         MathMLOperatorElement::DictionaryProperty is now moved into MathMLOperatorDictionary
646         and renamed Property.
647         * rendering/mathml/MathOperator.cpp: Accept non-BMP operators.
648         * rendering/mathml/MathOperator.h: Ditto.
649         * rendering/mathml/RenderMathMLFencedOperator.cpp:
650         (WebCore::RenderMathMLFencedOperator::updateOperatorContent):  Adjust code to use the new
651         return type of MathMLOperatorDictionary::search.
652         * rendering/mathml/RenderMathMLFencedOperator.h: Accept non-BMP operators.
653         * rendering/mathml/RenderMathMLOperator.cpp: Ditto.
654         * rendering/mathml/RenderMathMLOperator.h: Ditto.
655
656 2016-08-28  Youenn Fablet  <youenn@apple.com>
657
658         [Fetch API] Ensure response cloning works when data is loading
659         https://bugs.webkit.org/show_bug.cgi?id=161137
660
661         Reviewed by Darin Adler.
662
663         Test: http/tests/fetch/clone-after-load-is-finished.html and updated wpt test
664
665         FetchBody is only able to clone data when requested by Response in case the data is already there.
666         If data is loaded from FetchLoader, each received chunk should be given to each cloned response.
667         The simplest approach is to create a ReadableStream body for the cloned Response and use it for the teeing.
668
669         * Modules/fetch/FetchResponse.cpp:
670         (WebCore::FetchResponse::BodyLoader::didSucceed): Postpone stream closing if there is still data to enqueue in the FetchBody.
671         * Modules/fetch/FetchResponse.h:
672         * Modules/fetch/FetchResponse.idl:
673         * Modules/fetch/FetchResponse.js:
674         (clone): If response is being loaded, create a ReadableStream body so that loaded data cloning is handled by ReadableStream tee.
675         * Modules/streams/ReadableStreamInternals.js: Restrict firstReadCallback to the case of a readable ReadableStream.
676         If stream is errored or closed, FetchResponse will already have disposed of its source.
677         (readFromReadableStreamDefaultReader):
678         * bindings/js/WebCoreBuiltinNames.h:
679
680 2016-08-28  Andreas Kling  <akling@apple.com>
681
682         document.title setter can't throw.
683         <https://webkit.org/b/161302>
684
685         Reviewed by Antti Koivisto.
686
687         Remove [SetterRaisesException] from document.title and replace
688         ExceptionCode propagation with ASSERT_NO_EXCEPTION.
689
690         Setting the .textContent of a SVGTitleElement or HTMLTitleElement
691         will never fail, so there's no exception to propagate.
692
693         * dom/Document.cpp:
694         (WebCore::Document::setTitle):
695         * dom/Document.h:
696         * dom/Document.idl:
697         * html/ImageDocument.cpp:
698         (WebCore::ImageDocument::finishedParsing):
699
700 2016-08-23  Frederic Wang  <fwang@igalia.com>
701
702         MathML renderers should use struct to pass long list of LayoutUnits
703         https://bugs.webkit.org/show_bug.cgi?id=161084
704
705         Reviewed by Darin Adler.
706
707         RenderMathMLFraction, RenderMathMLMenclose, RenderMathMLScripts and RenderMathMLUnderOver
708         have helper functions to retrieve a list of LayoutUnit parameters. We gather them in a single
709         struct instead of using a long list of LayoutUnit& parameters.
710
711         No new tests, behavior is unchanged.
712
713         * rendering/mathml/RenderMathMLFraction.cpp:
714         (WebCore::RenderMathMLFraction::getFractionParameters):
715         (WebCore::RenderMathMLFraction::getStackParameters):
716         (WebCore::RenderMathMLFraction::layoutBlock):
717         * rendering/mathml/RenderMathMLFraction.h:
718         * rendering/mathml/RenderMathMLMenclose.cpp:
719         (WebCore::RenderMathMLMenclose::getSpaceAroundContent):
720         (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
721         (WebCore::RenderMathMLMenclose::layoutBlock):
722         * rendering/mathml/RenderMathMLMenclose.h:
723         * rendering/mathml/RenderMathMLScripts.cpp:
724         (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
725         (WebCore::RenderMathMLScripts::layoutBlock):
726         * rendering/mathml/RenderMathMLScripts.h:
727         * rendering/mathml/RenderMathMLUnderOver.cpp:
728         (WebCore::RenderMathMLUnderOver::getVerticalParameters):
729         (WebCore::RenderMathMLUnderOver::layoutBlock):
730         * rendering/mathml/RenderMathMLUnderOver.h:
731
732 2016-08-28  Andreas Kling  <akling@apple.com>
733
734         Clean up some .text attribute setters that don't throw.
735         <https://webkit.org/b/161292>
736
737         Reviewed by Darin Adler.
738
739         Remove [SetterRaisesException] for three .text attributes
740         and replace them with ASSERT_NO_EXCEPTION.
741
742         These setters behave like .textContent, which can't throw as
743         it's always okay to replace an Element's children with a Text.
744
745         * html/HTMLAnchorElement.cpp:
746         (WebCore::HTMLAnchorElement::setText):
747         * html/HTMLAnchorElement.h:
748         * html/HTMLAnchorElement.idl:
749         * html/HTMLOptionElement.cpp:
750         (WebCore::HTMLOptionElement::setText):
751         * html/HTMLOptionElement.h:
752         * html/HTMLOptionElement.idl:
753         * html/HTMLTitleElement.cpp:
754         (WebCore::HTMLTitleElement::setText):
755         * html/HTMLTitleElement.h:
756         * html/HTMLTitleElement.idl:
757
758 2016-08-24  Dave Hyatt  <hyatt@apple.com>
759
760         Initial landing of CSS Parser Tokenization (and files to support that). Not used yet.
761         https://bugs.webkit.org/show_bug.cgi?id=161174
762
763         This code is imported from Blink and is their CSS parser (modified to work in WebKit).
764         It is from commit e4bb90df7f2ed8a63975b5ed27a1b488cb9b146f, Mon Aug 22 2016.
765
766         Reviewed by Simon Fraser.
767
768         * CMakeLists.txt:
769         * WebCore.xcodeproj/project.pbxproj:
770         * css/CSSMarkup.cpp: Added.
771         (WebCore::isCSSTokenizerIdentifier):
772         (WebCore::serializeCharacter):
773         (WebCore::serializeCharacterAsCodePoint):
774         (WebCore::serializeIdentifier):
775         (WebCore::serializeString):
776         (WebCore::serializeURI):
777         (WebCore::serializeFontFamily):
778         * css/CSSMarkup.h: Added.
779         * css/CSSOMUtils.cpp: Removed.
780         * css/CSSOMUtils.h: Removed.
781         * css/CSSSelector.cpp:
782         * css/parser/CSSParserFastPaths.cpp: Added.
783         * css/parser/CSSParserFastPaths.h: Added.
784         * css/parser/CSSParserIdioms.h: Added.
785         (WebCore::isCSSSpace):
786         (WebCore::isNameStartCodePoint):
787         (WebCore::isNameCodePoint):
788         * css/parser/CSSParserObserver.h: Added.
789         (WebCore::CSSParserObserver::~CSSParserObserver):
790         * css/parser/CSSParserObserverWrapper.cpp: Added.
791         (WebCore::CSSParserObserverWrapper::startOffset):
792         (WebCore::CSSParserObserverWrapper::previousTokenStartOffset):
793         (WebCore::CSSParserObserverWrapper::endOffset):
794         (WebCore::CSSParserObserverWrapper::skipCommentsBefore):
795         (WebCore::CSSParserObserverWrapper::yieldCommentsBefore):
796         * css/parser/CSSParserObserverWrapper.h: Added.
797         (WebCore::CSSParserObserverWrapper::CSSParserObserverWrapper):
798         (WebCore::CSSParserObserverWrapper::observer):
799         (WebCore::CSSParserObserverWrapper::addComment):
800         (WebCore::CSSParserObserverWrapper::addToken):
801         (WebCore::CSSParserObserverWrapper::finalizeConstruction):
802         * css/parser/CSSParserToken.cpp: Added.
803         (WebCore::cssPrimitiveValueUnitFromTrie):
804         (WebCore::stringToUnitType):
805         (WebCore::CSSParserToken::CSSParserToken):
806         (WebCore::CSSParserToken::convertToDimensionWithUnit):
807         (WebCore::CSSParserToken::convertToPercentage):
808         (WebCore::CSSParserToken::delimiter):
809         (WebCore::CSSParserToken::numericSign):
810         (WebCore::CSSParserToken::numericValueType):
811         (WebCore::CSSParserToken::numericValue):
812         (WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID):
813         (WebCore::CSSParserToken::id):
814         (WebCore::CSSParserToken::functionId):
815         (WebCore::CSSParserToken::hasStringBacking):
816         (WebCore::CSSParserToken::copyWithUpdatedString):
817         (WebCore::CSSParserToken::valueDataCharRawEqual):
818         (WebCore::CSSParserToken::operator==):
819         (WebCore::CSSParserToken::serialize):
820         * css/parser/CSSParserToken.h: Added.
821         (WebCore::CSSParserToken::operator!=):
822         (WebCore::CSSParserToken::type):
823         (WebCore::CSSParserToken::value):
824         (WebCore::CSSParserToken::getHashTokenType):
825         (WebCore::CSSParserToken::getBlockType):
826         (WebCore::CSSParserToken::unitType):
827         (WebCore::CSSParserToken::unicodeRangeStart):
828         (WebCore::CSSParserToken::unicodeRangeEnd):
829         (WebCore::CSSParserToken::initValueFromStringView):
830         * css/parser/CSSParserTokenRange.cpp: Added.
831         (WebCore::CSSParserTokenRange::eofToken):
832         (WebCore::CSSParserTokenRange::makeSubRange):
833         (WebCore::CSSParserTokenRange::consumeBlock):
834         (WebCore::CSSParserTokenRange::consumeComponentValue):
835         (WebCore::CSSParserTokenRange::serialize):
836         * css/parser/CSSParserTokenRange.h: Added.
837         (WebCore::CSSParserTokenRange::CSSParserTokenRange):
838         (WebCore::CSSParserTokenRange::atEnd):
839         (WebCore::CSSParserTokenRange::end):
840         (WebCore::CSSParserTokenRange::peek):
841         (WebCore::CSSParserTokenRange::consume):
842         (WebCore::CSSParserTokenRange::consumeIncludingWhitespace):
843         (WebCore::CSSParserTokenRange::consumeWhitespace):
844         (WebCore::CSSParserTokenRange::begin):
845         * css/parser/CSSPropertyParser.cpp: Added.
846         (WebCore::hasPrefix):
847         (WebCore::cssPropertyID):
848         (WebCore::cssPropertyNameIOSAliasing):
849         (WebCore::isAppleLegacyCssValueKeyword):
850         (WebCore::cssValueKeywordID):
851         (WebCore::unresolvedCSSPropertyID):
852         * css/parser/CSSPropertyParser.h: Added.
853         (WebCore::CSSPropertyParser::inQuirksMode):
854         * css/parser/CSSPropertyParserHelpers.cpp: Added.
855         * css/parser/CSSPropertyParserHelpers.h: Added.
856         (WebCore::CSSPropertyParserHelpers::identMatches):
857         (WebCore::CSSPropertyParserHelpers::consumeIdent):
858         (WebCore::CSSPropertyParserHelpers::isCSSWideKeyword):
859         * css/parser/CSSTokenizer.cpp: Added.
860         (WebCore::CSSTokenizer::Scope::Scope):
861         (WebCore::CSSTokenizer::Scope::tokenRange):
862         (WebCore::CSSTokenizer::Scope::tokenCount):
863         (WebCore::isNewLine):
864         (WebCore::twoCharsAreValidEscape):
865         (WebCore::CSSTokenizer::CSSTokenizer):
866         (WebCore::CSSTokenizer::reconsume):
867         (WebCore::CSSTokenizer::consume):
868         (WebCore::CSSTokenizer::whiteSpace):
869         (WebCore::CSSTokenizer::blockStart):
870         (WebCore::CSSTokenizer::blockEnd):
871         (WebCore::CSSTokenizer::leftParenthesis):
872         (WebCore::CSSTokenizer::rightParenthesis):
873         (WebCore::CSSTokenizer::leftBracket):
874         (WebCore::CSSTokenizer::rightBracket):
875         (WebCore::CSSTokenizer::leftBrace):
876         (WebCore::CSSTokenizer::rightBrace):
877         (WebCore::CSSTokenizer::plusOrFullStop):
878         (WebCore::CSSTokenizer::asterisk):
879         (WebCore::CSSTokenizer::lessThan):
880         (WebCore::CSSTokenizer::comma):
881         (WebCore::CSSTokenizer::hyphenMinus):
882         (WebCore::CSSTokenizer::solidus):
883         (WebCore::CSSTokenizer::colon):
884         (WebCore::CSSTokenizer::semiColon):
885         (WebCore::CSSTokenizer::hash):
886         (WebCore::CSSTokenizer::circumflexAccent):
887         (WebCore::CSSTokenizer::dollarSign):
888         (WebCore::CSSTokenizer::verticalLine):
889         (WebCore::CSSTokenizer::tilde):
890         (WebCore::CSSTokenizer::commercialAt):
891         (WebCore::CSSTokenizer::reverseSolidus):
892         (WebCore::CSSTokenizer::asciiDigit):
893         (WebCore::CSSTokenizer::letterU):
894         (WebCore::CSSTokenizer::nameStart):
895         (WebCore::CSSTokenizer::stringStart):
896         (WebCore::CSSTokenizer::endOfFile):
897         (WebCore::CSSTokenizer::nextToken):
898         (WebCore::CSSTokenizer::consumeNumber):
899         (WebCore::CSSTokenizer::consumeNumericToken):
900         (WebCore::CSSTokenizer::consumeIdentLikeToken):
901         (WebCore::CSSTokenizer::consumeStringTokenUntil):
902         (WebCore::CSSTokenizer::consumeUnicodeRange):
903         (WebCore::isNonPrintableCodePoint):
904         (WebCore::CSSTokenizer::consumeUrlToken):
905         (WebCore::CSSTokenizer::consumeBadUrlRemnants):
906         (WebCore::CSSTokenizer::consumeSingleWhitespaceIfNext):
907         (WebCore::CSSTokenizer::consumeUntilCommentEndFound):
908         (WebCore::CSSTokenizer::consumeIfNext):
909         (WebCore::CSSTokenizer::consumeName):
910         (WebCore::CSSTokenizer::consumeEscape):
911         (WebCore::CSSTokenizer::nextTwoCharsAreValidEscape):
912         (WebCore::CSSTokenizer::nextCharsAreNumber):
913         (WebCore::CSSTokenizer::nextCharsAreIdentifier):
914         (WebCore::CSSTokenizer::registerString):
915         * css/parser/CSSTokenizer.h: Added.
916         (WebCore::CSSTokenizer::Scope::storeString):
917         * css/parser/CSSTokenizerInputStream.cpp: Added.
918         (WebCore::CSSTokenizerInputStream::CSSTokenizerInputStream):
919         (WebCore::CSSTokenizerInputStream::advanceUntilNonWhitespace):
920         (WebCore::CSSTokenizerInputStream::getDouble):
921         * css/parser/CSSTokenizerInputStream.h: Added.
922         (WebCore::CSSTokenizerInputStream::nextInputChar):
923         (WebCore::CSSTokenizerInputStream::peekWithoutReplacement):
924         (WebCore::CSSTokenizerInputStream::advance):
925         (WebCore::CSSTokenizerInputStream::pushBack):
926         (WebCore::CSSTokenizerInputStream::skipWhilePredicate):
927         (WebCore::CSSTokenizerInputStream::length):
928         (WebCore::CSSTokenizerInputStream::offset):
929         (WebCore::CSSTokenizerInputStream::rangeAt):
930         * platform/Length.h:
931
932 2016-08-28  Javier Fernandez  <jfernandez@igalia.com>
933
934         Should never be reached failure in WebCore::RenderFlexibleBox::alignChildren
935         https://bugs.webkit.org/show_bug.cgi?id=151591
936         <rdar://problem/27711829>
937
938         Reviewed by Darin Adler.
939
940         The align-self and align-items CSS properties were originally defined in the
941         Flexbible Box specification. The new CSS Box Alignment specification tries
942         to generalize them so they can be used by other layout models, as it's  the
943         case of the GridLayout spec.
944
945         Since we have implemented the Grid Layout spec behind a runtime flag, we should
946         do the same with the new syntax of these properties.
947
948         Test: css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html
949
950         * css/CSSParser.cpp:
951         (WebCore::isValidKeywordPropertyAndValue):
952         (WebCore::isKeywordPropertyID):
953         (WebCore::CSSParser::parseValue):
954         * rendering/RenderFlexibleBox.cpp:
955         (WebCore::RenderFlexibleBox::alignChildren):
956
957 2016-08-28  Frederic Wang  <fwang@igalia.com>
958
959         Improve parsing of the menclose notation attribute value
960         https://bugs.webkit.org/show_bug.cgi?id=161045
961
962         Reviewed by Darin Adler.
963
964         We improve the way the list of menclose notations is parsed to avoid allocating a vector and
965         accept any whitespace as separators.
966
967         New test cases in mathml/presentation/menclose-notation-equivalence.html
968
969         * mathml/MathMLMencloseElement.cpp: Include HTMLParserIdioms.h to use isHTMLSpace.
970         (WebCore::MathMLMencloseElement::addNotationFlags): Helper function to perform the relevant
971         addNotation calls from a notation name.
972         (WebCore::MathMLMencloseElement::parseNotationAttribute): Use only simple string operations
973         to determine the list of notations.
974         * mathml/MathMLMencloseElement.h: Declare the new helper function.
975
976 2016-08-28  Frederic Wang  <fwang@igalia.com>
977
978         Make MathMLSpaceElement and MathMLTokenElement inherit from MathMLPresentationElement
979         https://bugs.webkit.org/show_bug.cgi?id=161232
980
981         Reviewed by Darin Adler.
982
983         The mrow-like features of MathMLPresentationElement are now moved into RenderMathMLRow.
984         Hence we make MathMLSpaceElement and MathMLTokenElement inherit from the generic class
985         MathMLPresentationElement for presentation MathML elements.
986
987         No new tests, already covered by existing tests.
988
989         * mathml/MathMLSpaceElement.cpp:
990         (WebCore::MathMLSpaceElement::MathMLSpaceElement): Derive from MathMLPresentationElement.
991         (WebCore::MathMLSpaceElement::parseAttribute): Ditto.
992         * mathml/MathMLSpaceElement.h: Ditto. Override acceptsDisplayStyleAttribute as a small
993         optimization. isPresentationMathML is no longer needed.
994         * mathml/MathMLTokenElement.cpp:
995         (WebCore::MathMLTokenElement::MathMLTokenElement): Derive from MathMLPresentationElement.
996         (WebCore::MathMLTokenElement::didAttachRenderers): Ditto.
997         (WebCore::MathMLTokenElement::childrenChanged): Ditto.
998         (WebCore::MathMLTokenElement::parseAttribute): Deleted. No need to override this function
999         any more since it's already implemented in MathMLPresentationElement.
1000         * mathml/MathMLTokenElement.h: Derive from MathMLPresentationElement. Override
1001         acceptsDisplayStyleAttribute as a small optimization. isPresentationMathML is no longer
1002         needed.
1003
1004 2016-08-28  Frederic Wang  <fwang@igalia.com>
1005
1006         RenderMathMLRow::firstLineBaseline does not need to be overridden in RenderMathMLMenclose
1007         https://bugs.webkit.org/show_bug.cgi?id=161127
1008
1009         Reviewed by Darin Adler.
1010
1011         RenderMathMLRow::firstLineBaseline already provides the correct calculation of ascent for
1012         non-empty menclose elements. Empty menclose elements are not used in practice so the
1013         calculated value is irrelevant. Aligning on mrow (i.e. leaving firstLineBaseline to 0)
1014         is fine. This change allows to get rid of the m_ascent member and helps to keep good baseline
1015         alignment when the zoom level changes (bug 161126).
1016
1017         No new tests, already covered by existing tests.
1018
1019         * rendering/mathml/RenderMathMLMenclose.cpp:
1020         (WebCore::RenderMathMLMenclose::RenderMathMLMenclose): Remove initialization of m_ascent.
1021         (WebCore::RenderMathMLMenclose::layoutBlock): No need to calculate m_ascent. The height and
1022         content location can be determined without introducing local variables ascent or descent.
1023         (WebCore::RenderMathMLMenclose::firstLineBaseline): Deleted. We just use the implementation
1024         from RenderMathMLRow.
1025         * rendering/mathml/RenderMathMLMenclose.h: Delete m_ascent and do not override
1026         firstLineBaseline.
1027
1028 2016-08-28  Frederic Wang  <fwang@igalia.com>
1029
1030         More cleanup for the mpadded implementation
1031         https://bugs.webkit.org/show_bug.cgi?id=161136
1032
1033         Reviewed by Darin Adler.
1034
1035         We perform the following cleanup for the mpadded renderer class:
1036         1) We do not store the ascent on the class. This may make update more reliable and will
1037         help for general improvement of MathML ascents (bug 155879).
1038         2) We split resolveWidth/resolveAttributes into smaller functions and improve the coding
1039         style. This helps to calculate firstLineBaseline in 1).
1040         3) We do not override updateFromElement and styleDidChange to perform setNeedsLayout calls.
1041         These calls already seem unnecessary and can be removed even more safely after 1).
1042
1043         We add a test for style change. Change of attributes as well as metrics calcuation of empty
1044         and non-empty mpadded elements are already covered by other tests.
1045
1046         Test: mathml/presentation/mpadded-style-change.html
1047
1048         * rendering/mathml/RenderMathMLPadded.cpp:
1049         (WebCore::RenderMathMLPadded::voffset): New helper function to resolve voffset.
1050         (WebCore::RenderMathMLPadded::lspace): Ditto for lspace.
1051         (WebCore::RenderMathMLPadded::mpaddedWidth): Ditto for width.
1052         (WebCore::RenderMathMLPadded::mpaddedHeight): Ditto for height.
1053         (WebCore::RenderMathMLPadded::mpaddedDepth): Ditto for detph.
1054         (WebCore::RenderMathMLPadded::computePreferredLogicalWidths): Use mpaddedWidth().
1055         (WebCore::RenderMathMLPadded::layoutBlock): Use the new helper functions.
1056         (WebCore::RenderMathMLPadded::firstLineBaseline): Use voffset or mpaddedHeight for baseline
1057         calculation instead of m_padded.
1058         (WebCore::RenderMathMLPadded::resolveWidth): Deleted. Renamed mpaddedWidth.
1059         (WebCore::RenderMathMLPadded::resolveAttributes): Deleted. Split into smaller functions.
1060         (WebCore::RenderMathMLPadded::updateFromElement): Deleted. We do not need to call
1061         setNeedsLayout.
1062         (WebCore::RenderMathMLPadded::styleDidChange): Deleted. Ditto.
1063         * rendering/mathml/RenderMathMLPadded.h: Update function declaration and remove m_ascent.
1064
1065 2016-08-27  Alex Christensen  <achristensen@webkit.org>
1066
1067         URLParser should parse relative URLs
1068         https://bugs.webkit.org/show_bug.cgi?id=161282
1069
1070         Reviewed by Darin Adler.
1071
1072         Partially covered by new API tests, but once the parser is complete enough we can
1073         use the url web platform tests to more fully test this.  It's still a work in
1074         progress only used by tests.
1075
1076         * platform/URLParser.cpp:
1077         (WebCore::URLParser::urlLengthUntilPart):
1078         (WebCore::URLParser::copyURLPartsUntil):
1079         Added some helper functions to reduce redundant code.  When parsing relative URLs,
1080         we often want to copy large parts of the base URL, but the stopping point differs.
1081         (WebCore::URLParser::parse):
1082         The parser now returns a URL instead of an Optional<URL> because a URL has a m_isValid which behaves like Optional.
1083         * platform/URLParser.h:
1084         (WebCore::URLParser::parse):
1085
1086 2016-08-27  Chris Dumez  <cdumez@apple.com>
1087
1088         Update generated bindings to throw a SecurityError when denying cross-origin access to properties
1089         https://bugs.webkit.org/show_bug.cgi?id=161270
1090
1091         Reviewed by Darin Adler.
1092
1093         Update generated bindings to throw a SecurityError when denying cross-origin
1094         access to properties, as per the HTML specification:
1095         - https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
1096         - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
1097
1098         Firefox and Chrome already throw but Webkit was logging an error message and
1099         returning undefined instead.
1100
1101         No new tests, updated existing tests.
1102
1103         * bindings/js/JSDOMBinding.cpp:
1104         (WebCore::canAccessDocument):
1105         (WebCore::BindingSecurity::shouldAllowAccessToNode):
1106         * bindings/js/JSDOMBinding.h:
1107         * bindings/scripts/CodeGeneratorJS.pm:
1108         (GenerateImplementation):
1109
1110 2016-08-27  Chris Dumez  <cdumez@apple.com>
1111
1112         Follow-up fixes after r205030.
1113         https://bugs.webkit.org/show_bug.cgi?id=161216
1114
1115         Reviewed by Darin Adler.
1116
1117         * html/parser/HTMLParserIdioms.cpp:
1118         (WebCore::isHTMLSpaceOrDelimiter):
1119         (WebCore::isNumberStart):
1120         (WebCore::parseHTMLListOfOfFloatingPointNumberValues):
1121         * html/parser/HTMLParserIdioms.h:
1122
1123 2016-08-27  Rawinder Singh  <rawinder.singh-webkit@cisra.canon.com.au>
1124
1125         Add final keyword to final classes and overriden methods in WebCore/css
1126         https://bugs.webkit.org/show_bug.cgi?id=161182
1127
1128         Reviewed by Darin Adler.
1129
1130         - Mark classes in the WebCore/css directory final as appropriate.
1131         - Update WebCore/css classes so that overriden methods in final classes are marked final.
1132
1133         * css/CSSAnimationTriggerScrollValue.h:
1134         * css/CSSAspectRatioValue.h:
1135         * css/CSSBasicShapes.h:
1136         * css/CSSBorderImageSliceValue.h:
1137         * css/CSSCalculationValue.cpp:
1138         (WebCore::determineCategory):
1139         * css/CSSCalculationValue.h:
1140         * css/CSSCanvasValue.h:
1141         * css/CSSCharsetRule.h:
1142         * css/CSSComputedStyleDeclaration.h:
1143         * css/CSSContentDistributionValue.h:
1144         * css/CSSCrossfadeValue.h:
1145         * css/CSSCursorImageValue.h:
1146         * css/CSSCustomPropertyValue.h:
1147         * css/CSSFilterImageValue.h:
1148         * css/CSSFontFaceLoadEvent.h:
1149         * css/CSSFontFaceSrcValue.h:
1150         * css/CSSFontFeatureValue.h:
1151         * css/CSSFontSelector.h:
1152         * css/CSSFontValue.h:
1153         * css/CSSFunctionValue.h:
1154         * css/CSSGradientValue.h:
1155         * css/CSSGridAutoRepeatValue.h:
1156         * css/CSSGridLineNamesValue.h:
1157         * css/CSSGridTemplateAreasValue.h:
1158         * css/CSSImageSetValue.h:
1159         * css/CSSImageValue.h:
1160         * css/CSSInheritedValue.h:
1161         * css/CSSInitialValue.h:
1162         * css/CSSKeyframeRule.h:
1163         * css/CSSKeyframesRule.h:
1164         * css/CSSLineBoxContainValue.h:
1165         * css/CSSNamedImageValue.h:
1166         * css/CSSPrimitiveValue.h:
1167         * css/CSSReflectValue.h:
1168         * css/CSSRevertValue.h:
1169         * css/CSSRuleList.h:
1170         * css/CSSSegmentedFontFace.h:
1171         * css/CSSShadowValue.h:
1172         * css/CSSStyleSheet.cpp:
1173         * css/CSSStyleSheet.h:
1174         * css/CSSSupportsRule.h:
1175         * css/CSSTimingFunctionValue.h:
1176         * css/CSSUnicodeRangeValue.h:
1177         * css/CSSUnknownRule.h:
1178         * css/CSSUnsetValue.h:
1179         * css/CSSValue.cpp:
1180         * css/CSSVariableDependentValue.h:
1181         * css/CSSVariableValue.h:
1182         * css/Counter.h:
1183         * css/DOMCSSNamespace.h:
1184         * css/DashboardRegion.h:
1185         * css/LengthRepeat.h:
1186         * css/MediaList.h:
1187         * css/MediaQueryList.h:
1188         * css/MediaQueryMatcher.h:
1189         * css/Pair.h:
1190         * css/PropertySetCSSStyleDeclaration.h:
1191         * css/RGBColor.h:
1192         * css/Rect.h:
1193         * css/StyleMedia.h:
1194         * css/StyleProperties.h:
1195         * css/StyleRule.h:
1196         * css/StyleRuleImport.h:
1197         * css/StyleSheetContents.h:
1198         * css/StyleSheetList.h:
1199         * css/ViewportStyleResolver.h:
1200         * css/WebKitCSSFilterValue.h:
1201         * css/WebKitCSSRegionRule.h:
1202         * css/WebKitCSSTransformValue.h:
1203         * css/WebKitCSSViewportRule.h:
1204
1205 2016-08-27  Simon Fraser  <simon.fraser@apple.com>
1206
1207         Add more Editing logging
1208         https://bugs.webkit.org/show_bug.cgi?id=161287
1209
1210         Reviewed by Darin Adler.
1211
1212         Add logging which tracks how key events get from the UI process to the
1213         web process, and down to form fields.
1214
1215         * editing/Editor.cpp:
1216         (WebCore::Editor::handleTextEvent):
1217         (WebCore::Editor::appliedEditing):
1218         * editing/TypingCommand.cpp:
1219         (WebCore::TypingCommand::insertText):
1220         (WebCore::TypingCommand::insertTextAndNotifyAccessibility):
1221         * html/HTMLTextFormControlElement.cpp:
1222         (WebCore::HTMLTextFormControlElement::didEditInnerTextValue):
1223         * page/EventHandler.cpp:
1224         (WebCore::EventHandler::keyEvent):
1225         (WebCore::EventHandler::handleTextInputEvent):
1226
1227 2016-08-27  Sam Weinig  <sam@webkit.org>
1228
1229         Remove more custom JavaScript bindings
1230         https://bugs.webkit.org/show_bug.cgi?id=161293
1231
1232         Reviewed by Darin Adler.
1233
1234         Remove custom bindings for AudioContext, DOMFormData, MediaSession and WebKitPoint.
1235
1236         * Modules/mediasession/MediaSession.cpp:
1237         (WebCore::MediaSession::MediaSession):
1238         * Modules/mediasession/MediaSession.h:
1239         Change to take Document explicitly, since that is what it 
1240         expecting.
1241
1242         * Modules/webaudio/AudioContext.cpp:
1243         (WebCore::AudioContext::create):
1244         * Modules/webaudio/AudioContext.h:
1245         Remove unused ExceptionCode parameter.
1246
1247         * Modules/webaudio/AudioContext.idl:
1248         * html/DOMFormData.idl:
1249         * html/HTMLFormElement.idl:
1250         * page/WebKitPoint.idl:
1251         Switch to use the generated constructor.
1252
1253         * CMakeLists.txt:
1254         * WebCore.xcodeproj/project.pbxproj:
1255         * bindings/js/JSBindingsAllInOne.cpp:
1256         Remove files.
1257         
1258         * bindings/js/JSAudioContextCustom.cpp: Removed.
1259         * bindings/js/JSDOMFormDataCustom.cpp: Removed.
1260         * bindings/js/JSMediaSessionCustom.cpp: Removed.
1261         * bindings/js/JSWebKitPointCustom.cpp: Removed.
1262         Remove in favor of generated variants.
1263
1264         * bindings/js/JSHTMLInputElementCustom.h: Removed.
1265         Remove unused header.
1266
1267         * page/WebKitPoint.h:
1268         (WebCore::WebKitPoint::create):
1269         (WebCore::WebKitPoint::WebKitPoint):
1270         Move NaN replacement into the implementation and out of the bindings.
1271
1272 2016-08-27  Ryosuke Niwa  <rniwa@webkit.org>
1273
1274         Add adopted callback for custom elements
1275         https://bugs.webkit.org/show_bug.cgi?id=161284
1276
1277         Reviewed by Antti Koivisto.
1278
1279         Added the support for adoptedCallback: https://dom.spec.whatwg.org/#concept-node-adopt
1280         For now, we only support this callback on appendChild.
1281
1282         Test: fast/custom-elements/adopted-callback.html
1283
1284         * bindings/js/JSCustomElementInterface.cpp:
1285         (WebCore::JSCustomElementInterface::invokeCallback): Added JSDOMGlobalObject* as an argument to the callback so that
1286         we can invoke toJS on Document in invokeAdoptedCallback.
1287         (WebCore::JSCustomElementInterface::setAdoptedCallback): Added.
1288         (WebCore::JSCustomElementInterface::invokeAdoptedCallback): Added.
1289         (WebCore::JSCustomElementInterface::setAttributeChangedCallback):
1290         * bindings/js/JSCustomElementInterface.h:
1291         (WebCore::JSCustomElementInterface::hasConnectedCallback): Added.
1292         (WebCore::JSCustomElementInterface::hasDisconnectedCallback): Added.
1293         (WebCore::JSCustomElementInterface::hasAdoptedCallback): Added.
1294         * bindings/js/JSCustomElementRegistryCustom.cpp:
1295         (WebCore::JSCustomElementRegistry::define):
1296         * dom/CustomElementReactionQueue.cpp:
1297         (WebCore::CustomElementReactionQueueItem::CustomElementReactionQueueItem): Added a variant that takes two documents.
1298         (WebCore::CustomElementReactionQueueItem::invoke):
1299         (WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded): Fixed a bug that this function was always
1300         enqueuing a callback even when the interface didn't have connectedCallback. Also, there is no need to check
1301         the nullity of the interface since it should never be null.
1302         (WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded): Ditto.
1303         (WebCore::CustomElementReactionQueue::enqueueAdoptedCallbackIfNeeded): Added.
1304         (WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded): Assert that the interface is never
1305         null instead of exiting early.
1306         * dom/CustomElementReactionQueue.h:
1307         * dom/Element.cpp:
1308         (WebCore::Element::didMoveToNewDocument): Added a call to enqueueAdoptedCallbackIfNeeded.
1309
1310 2016-08-27  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
1311
1312         Fix the !PLATFORM(WIN) && USE(CURL) build.
1313         https://bugs.webkit.org/show_bug.cgi?id=161281
1314
1315         Reviewed by Alex Christensen.
1316
1317         * platform/network/curl/ResourceHandleCurl.cpp:
1318
1319 2016-08-27  Youenn Fablet  <youenn@apple.com>
1320
1321         [Fetch API] Opaque responses should not have any body
1322         https://bugs.webkit.org/show_bug.cgi?id=161130
1323
1324         Reviewed by Sam Weinig.
1325
1326         Covered by updated test.
1327
1328         Added a new ThreadableLoader option to receive or not opaque response body.
1329         By default, option is set to Receive.
1330         FetchLoader is setting it to DoNotReceive.
1331
1332         * Modules/fetch/FetchLoader.cpp:
1333         (WebCore::FetchLoader::start):
1334         * loader/DocumentThreadableLoader.cpp:
1335         (WebCore::DocumentThreadableLoader::didReceiveResponse): Calling didFinishLoading just after didReceiveResponse in case of Opaque responses.
1336         * loader/ThreadableLoader.cpp:
1337         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
1338         * loader/ThreadableLoader.h:
1339         * loader/WorkerThreadableLoader.cpp:
1340         (WebCore::LoaderTaskOptions::LoaderTaskOptions):
1341
1342 2016-08-27  Youenn Fablet  <youenn@apple.com>
1343
1344         [Fetch API] opaqueredirect responses should have their URL set to the original URL
1345         https://bugs.webkit.org/show_bug.cgi?id=161194
1346
1347         Reviewed by Sam Weinig.
1348
1349         Covered by updated tests.
1350
1351         * loader/DocumentThreadableLoader.cpp:
1352         (WebCore::DocumentThreadableLoader::didReceiveResponse):
1353         * loader/SubresourceLoader.cpp: Removing isNull ASSERT since we now set the response URL.
1354         (WebCore::SubresourceLoader::willSendRequestInternal): Setting opaqueredirect response URL to the original URL.
1355
1356 2016-08-27  Andreas Kling  <akling@apple.com>
1357
1358         script.text should behave like script.textContent on setting
1359         <https://webkit.org/b/148852>
1360
1361         Reviewed by Chris Dumez.
1362
1363         HTMLScriptElement.text should behave just like .textContent when setting,
1364         so just forward setText() to setTextContent().
1365
1366         Test: import/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html
1367
1368         * html/HTMLScriptElement.cpp:
1369         (WebCore::HTMLScriptElement::setText):
1370
1371 2016-08-27  Youenn Fablet  <youenn@apple.com>
1372
1373         [Fetch API] Blob type should be set from Response/Request contentType header
1374         https://bugs.webkit.org/show_bug.cgi?id=161228
1375
1376         Reviewed by Alex Christensen.
1377
1378         Covered by updated tests.
1379
1380         Renaming FetchBody::m_mimeType to m_contentType since that better relates to Content-Type header.
1381         Updated FetchRequest and FetchResponse to set m_contentType according request/response headers.
1382         Handled the case of a Request created from JS, a Response created from JS and a Response created internally to
1383         be used as resolve value in the fetch promise.
1384
1385         In case Content-Type is set but is empty, its empty value should be used for blob type.
1386         Updated contentType checks to use isNull in lieu of isEmpty.
1387
1388         * Modules/fetch/FetchBody.cpp:
1389         (WebCore::FetchBody::updateContentType): Routine to synchronize headers with m_contentType.
1390         (WebCore::FetchBody::FetchBody): Renamed m_mimeType to m_contentType.
1391         (WebCore::FetchBody::blob): Ditto.
1392         * Modules/fetch/FetchBody.h: Ditto.
1393         (WebCore::FetchBody::contentType):
1394         (WebCore::FetchBody::setMimeType): Deleted.
1395         (WebCore::FetchBody::mimeType): Deleted.
1396         * Modules/fetch/FetchRequest.cpp:
1397         (WebCore::FetchRequest::setBody): set FetchBody::m_contentType according HTTP headers.
1398         * Modules/fetch/FetchResponse.cpp:
1399         (WebCore::FetchResponse::initializeWith): Ditto.
1400         (WebCore::FetchResponse::BodyLoader::didReceiveResponse): Ditto.
1401
1402 2016-08-26  Alex Christensen  <achristensen@webkit.org>
1403
1404         Fix Windows build after r205065.
1405
1406         * Modules/webaudio/BiquadFilterNode.idl:
1407         * Modules/webaudio/PannerNode.idl:
1408         There's no WEB_AUDIO on Windows.
1409
1410 2016-08-26  Devin Rousso  <dcrousso+webkit@gmail.com>
1411
1412         REGRESSION (r203535): Web Inspector: Inspector overlay node info has disappeared
1413         https://bugs.webkit.org/show_bug.cgi?id=161264
1414
1415         Reviewed by Joseph Pecoraro.
1416
1417         No new tests.  Fixing JavaScript error in Inspector overlay.
1418
1419         * inspector/InspectorOverlay.cpp:
1420         (evaluateCommandInOverlay):
1421         (WebCore::InspectorOverlay::evaluateInOverlay):
1422         Add ASSERT to ensure that errors in the Inspector overlay will cause tests to crash.
1423
1424         * inspector/InspectorOverlayPage.js:
1425         (DOMBuilder.prototype.appendTextNode):
1426         Move textContent value to parameter of document.createTextNode.
1427
1428 2016-08-26  Sam Weinig  <sam@webkit.org>
1429
1430         Remove support for ENABLE_LEGACY_WEB_AUDIO
1431         https://bugs.webkit.org/show_bug.cgi?id=161262
1432
1433         Reviewed by Anders Carlsson.
1434
1435         * Configurations/FeatureDefines.xcconfig:
1436         Remove ENABLE_LEGACY_WEB_AUDIO.
1437
1438         * Modules/webaudio/AudioBufferSourceNode.cpp:
1439         (WebCore::AudioBufferSourceNode::noteGrainOn): Deleted.
1440         * Modules/webaudio/AudioBufferSourceNode.h:
1441         * Modules/webaudio/AudioBufferSourceNode.idl:
1442         (WebCore::AudioScheduledSourceNode::noteOn): Deleted.
1443         (WebCore::AudioScheduledSourceNode::noteOff): Deleted.
1444         * Modules/webaudio/AudioScheduledSourceNode.h:
1445         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1446         Remove the looping attribute, as well as the noteOn, noteOff, and noteGrainOn functions.
1447
1448         * Modules/webaudio/AudioContext.idl:
1449         Remove the createGainNode, createDelayNode and createJavaScriptNode functions.
1450
1451         * Modules/webaudio/AudioParam.idl:
1452         Remove the setTargetValueAtTime function.
1453
1454         * Modules/webaudio/BiquadDSPKernel.cpp:
1455         (WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
1456         * Modules/webaudio/BiquadFilterNode.cpp:
1457         (WebCore::BiquadFilterNode::type):
1458         (WebCore::BiquadFilterNode::setType):
1459         (WebCore::BiquadFilterNode::getFrequencyResponse):
1460         * Modules/webaudio/BiquadFilterNode.h:
1461         * Modules/webaudio/BiquadFilterNode.idl:
1462         * Modules/webaudio/BiquadProcessor.cpp:
1463         (WebCore::BiquadProcessor::BiquadProcessor):
1464         (WebCore::BiquadProcessor::setType):
1465         (WebCore::BiquadProcessor::getFrequencyResponse):
1466         * Modules/webaudio/BiquadProcessor.h:
1467         (WebCore::BiquadProcessor::type):
1468         * bindings/js/JSBiquadFilterNodeCustom.cpp: Removed.
1469         Rename BiquadProcessor::FilterType to BiquadFilterType and use it
1470         directly from the IDL. Remove legacy filter constants from the IDL
1471         and the need for a custom binding for the type attribute.
1472
1473         * Modules/webaudio/OscillatorNode.cpp:
1474         (WebCore::OscillatorNode::OscillatorNode):
1475         (WebCore::OscillatorNode::setType):
1476         (WebCore::OscillatorNode::setPeriodicWave):
1477         (WebCore::OscillatorNode::type): Deleted.
1478         * Modules/webaudio/OscillatorNode.h:
1479         (WebCore::OscillatorNode::type):
1480         * Modules/webaudio/OscillatorNode.idl:
1481         * Modules/webaudio/PeriodicWave.cpp:
1482         (WebCore::PeriodicWave::createSine):
1483         (WebCore::PeriodicWave::createSquare):
1484         (WebCore::PeriodicWave::createSawtooth):
1485         (WebCore::PeriodicWave::createTriangle):
1486         (WebCore::PeriodicWave::generateBasicWaveform):
1487         * Modules/webaudio/PeriodicWave.h:
1488         * bindings/js/JSOscillatorNodeCustom.cpp: Removed.
1489         Remove noteOn and noteOff functions and the type integer constants.
1490         Remove the need for a custom binding for the type attribute by renaming
1491         the type enum OscillatorNode::Type and putting the enum in the IDL.
1492
1493         * Modules/webaudio/PannerNode.cpp:
1494         (WebCore::PannerNode::PannerNode):
1495         (WebCore::PannerNode::process):
1496         (WebCore::PannerNode::setPanningModel):
1497         (WebCore::PannerNode::distanceModel):
1498         (WebCore::PannerNode::setDistanceModel):
1499         (WebCore::PannerNode::panningModel): Deleted.
1500         * Modules/webaudio/PannerNode.h:
1501         (WebCore::PannerNode::panningModel):
1502         * Modules/webaudio/PannerNode.idl:
1503         * bindings/js/JSPannerNodeCustom.cpp: Removed.
1504         * platform/audio/Distance.cpp:
1505         (WebCore::DistanceEffect::DistanceEffect):
1506         (WebCore::DistanceEffect::gain):
1507         * platform/audio/Distance.h:
1508         (WebCore::DistanceEffect::model):
1509         (WebCore::DistanceEffect::setModel):
1510         * platform/audio/EqualPowerPanner.cpp:
1511         (WebCore::EqualPowerPanner::EqualPowerPanner):
1512         * platform/audio/HRTFPanner.cpp:
1513         (WebCore::HRTFPanner::HRTFPanner):
1514         * platform/audio/Panner.cpp:
1515         (WebCore::Panner::create):
1516         * platform/audio/Panner.h:
1517         (WebCore::Panner::panningModel):
1518         (WebCore::Panner::Panner):
1519         Replace the panning model and distance model integer constants
1520         with IDL enum support, removing the need for a custom binding.
1521         Rename the supporting C++ enums to work with the bindings.
1522
1523         * bindings/js/JSAudioContextCustom.cpp:
1524         (WebCore::constructJSAudioContext):
1525         Remove deprecated way of creating an offline context.
1526
1527         * WebCore.xcodeproj/project.pbxproj:
1528         Update files.
1529
1530 2016-08-26  Johan K. Jensen  <johan_jensen@apple.com>
1531
1532         Web Inspector: Frontend should have access to Resource Timing information
1533         https://bugs.webkit.org/show_bug.cgi?id=160095
1534
1535         Reviewed by Alex Christensen.
1536
1537         Show correct information with Resource Timing information
1538         from ResourceLoader rather than DocumentLoader.
1539
1540         No new tests, frontend doesn't use the timing data yet.
1541
1542         * inspector/InspectorNetworkAgent.cpp:
1543         (WebCore::InspectorNetworkAgent::buildObjectForTiming):
1544         (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
1545         (WebCore::InspectorNetworkAgent::buildObjectForCachedResource):
1546         (WebCore::InspectorNetworkAgent::willSendRequest):
1547         (WebCore::InspectorNetworkAgent::didReceiveResponse):
1548         (WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache):
1549         (WebCore::buildObjectForTiming): Deleted.
1550         (WebCore::buildObjectForResourceResponse): Deleted.
1551         (WebCore::buildObjectForCachedResource): Deleted.
1552         Use ResourceLoader instead of DocumentLoader to get Resource Timing information.
1553         Move functions to member functions to access the executionStopWatch.
1554
1555         (WebCore::InspectorNetworkAgent::didFinishLoading):
1556         Use the load timing finishTime and convert to elapsed time for frontend.
1557
1558         * inspector/InspectorNetworkAgent.h:
1559         * loader/SubresourceLoader.cpp:
1560         (WebCore::SubresourceLoader::didFinishLoading):
1561         Pass the web process load timing on to the inspector.
1562
1563 2016-08-26  Chris Dumez  <cdumez@apple.com>
1564
1565         Unreviewed, fix Windows build after r205048.
1566
1567         * bindings/scripts/CodeGeneratorJS.pm:
1568         (getConditionalForFunctionConsideringOverloads):
1569         * bindings/scripts/test/JS/JSTestObj.cpp:
1570         (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1):
1571         (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2):
1572         (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload):
1573         * bindings/scripts/test/TestObj.idl:
1574
1575 2016-08-23  Ryosuke Niwa  <rniwa@webkit.org>
1576
1577         Adopted custom element's callbacks should continue to work
1578         https://bugs.webkit.org/show_bug.cgi?id=161065
1579
1580         Reviewed by Andreas Kling.
1581
1582         When a custom element is adopted into another document, its reaction callbacks need to continue to work.
1583         Because a different document may have its own global object, each custom element needs to remember its
1584         original global object or JSCustomElementInterface. This patch adds the latter to the element rare data.
1585
1586         Tests: fast/custom-elements/connected-callbacks.html
1587                fast/custom-elements/disconnected-callbacks.html
1588
1589         * bindings/js/JSCustomElementInterface.cpp:
1590         (WebCore::JSCustomElementInterface::constructElement):
1591         (WebCore::JSCustomElementInterface::upgradeElement):
1592         * dom/CustomElementReactionQueue.cpp:
1593         (WebCore::findInterfaceForCustomElement): Deleted.
1594         (WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded):
1595         (WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded):
1596         (WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded):
1597         * dom/Element.cpp:
1598         (WebCore::Element::insertedInto): Invoke callbacks even when the current document is not a HTML document.
1599         (WebCore::Element::removedFrom): Ditto.
1600         (WebCore::Element::setCustomElementIsResolved): Moved from Node. Add the element interface to the rare data.
1601         (WebCore::Element::customElementInterface): Added.
1602         * dom/Element.h:
1603         * dom/ElementRareData.cpp:
1604         * dom/ElementRareData.h:
1605         (WebCore::ElementRareData::customElementInterface): Added.
1606         (WebCore::ElementRareData::setCustomElementInterface): Added.
1607         * dom/Node.h:
1608         ((WebCore::Node::setCustomElementIsResolved): Deleted.
1609
1610 2016-08-26  Zalan Bujtas  <zalan@apple.com>
1611
1612         ASSERT_NOT_REACHED() is touched in WebCore::minimumValueForLength
1613         https://bugs.webkit.org/show_bug.cgi?id=125781
1614         <rdar://problem/27684457>
1615
1616         Reviewed by Simon Fraser.
1617
1618         RenderTableSection::calcRowLogicalHeight misused minimumValueForLength to fallback to 0 for non-fixed values.
1619         While this patch fixes the assertion, the table section code needs works to support calc values. See webkit.org/b/161273.   
1620
1621         Test: fast/table/assert-on-min-max-content-values.html
1622
1623         * rendering/RenderTableSection.cpp:
1624         (WebCore::RenderTableSection::calcRowLogicalHeight):
1625
1626 2016-08-26  Andreas Kling  <akling@apple.com>
1627
1628         REGRESSION (r204987): fast/canvas-composite-* tests are now flaky assertion failures
1629         <https://webkit.org/b/161259>
1630
1631         Reviewed by Joseph Pecoraro.
1632
1633         Fix a blunder where HTMLCanvasElement::memoryCost() wasn't forwarding the inquiry
1634         to ImageBuffer but HTMLCanvasElement::externalMemoryCost() was.
1635
1636         This fixes flaky "externalMemorySize() <= extraMemorySize()" assertions on debug bots.
1637
1638         * html/HTMLCanvasElement.cpp:
1639         (WebCore::HTMLCanvasElement::memoryCost):
1640
1641 2016-08-26  Andreas Kling  <akling@apple.com>
1642
1643         The :enabled/:disabled selectors should only match elements that can be disabled.
1644         <https://webkit.org/b/161255>
1645
1646         Reviewed by Chris Dumez.
1647
1648         Per the HTML spec, only the following elements can be actually disabled:
1649
1650             button, input, select, textarea, optgroup, option, menuitem, fieldset
1651
1652         Since HTMLOutputElement inherits from HTMLFormControlElement, it had some
1653         misguided ideas about being disableable. This was causing it to get matched
1654         by :enabled and :disabled selectors.
1655
1656         Test: imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/disabled.html
1657
1658         * css/SelectorChecker.cpp:
1659         (WebCore::SelectorChecker::checkOne):
1660         * cssjit/SelectorCompiler.cpp:
1661         (WebCore::SelectorCompiler::addPseudoClassType):
1662         * css/SelectorCheckerTestFunctions.h:
1663         (WebCore::matchesDisabledPseudoClass):
1664         (WebCore::matchesEnabledPseudoClass): Renamed from isEnabled/isDisabled. Now only allows
1665         :enabled and :disabled selectors to match elements that are actually disableable.
1666
1667         * html/HTMLElement.h:
1668         * html/HTMLElement.cpp:
1669         (WebCore::HTMLElement::canBeActuallyDisabled):
1670         (WebCore::HTMLElement::isActuallyDisabled): Added supporting functions for the aforementioned selectors.
1671
1672         * html/HTMLFormControlElement.cpp:
1673         (WebCore::HTMLFormControlElement::parseAttribute): Don't care about disabled state
1674         changes in elements that are not disableable in the first place.
1675
1676 2016-08-26  Chris Dumez  <cdumez@apple.com>
1677
1678         REGRESSION(r204028): Fix unused-but-set-variable warning in generated JSNavigator.cpp
1679         https://bugs.webkit.org/show_bug.cgi?id=161252
1680
1681         Reviewed by Ryosuke Niwa.
1682
1683         Improve support for [Conditional] with overloaded operations in the IDL.
1684
1685         No new tests, updated bindings tests.
1686
1687         * bindings/scripts/CodeGeneratorJS.pm:
1688         (GenerateHeader):
1689         (GeneratePropertiesHashTable):
1690         (getConditionalForFunctionConsideringOverloads):
1691         (GenerateOverloadedFunctionOrConstructor):
1692         (GenerateImplementation):
1693         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1694         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation): Deleted.
1695         * bindings/scripts/test/JS/JSTestObj.cpp:
1696         (WebCore::jsTestObjPrototypeFunctionConditionalOverload1):
1697         (WebCore::jsTestObjPrototypeFunctionConditionalOverload2):
1698         (WebCore::jsTestObjPrototypeFunctionConditionalOverload):
1699         (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation): Deleted.
1700         (WebCore::jsTestObjConstructorFunctionOverloadedMethod1): Deleted.
1701         * bindings/scripts/test/TestObj.idl:
1702
1703 2016-08-26  Beth Dakin  <bdakin@apple.com>
1704
1705         charactersAroundPosition can be wrong because it crosses editing boundaries
1706         https://bugs.webkit.org/show_bug.cgi?id=161215
1707         -and corresponding-
1708         rdar://problem/27933564
1709
1710         Reviewed by Ryosuke Niwa.
1711
1712         charactersAroundPosition() should not cross editing boundaries. This patch fixes 
1713         that by making nextCharacterBoundaryInDirection() take an 
1714         EditingBoundaryCrossingRule parameter to pass onto VisiblePosition::next() and 
1715         VisiblePosition::previous().
1716
1717         * editing/VisibleUnits.cpp:
1718         (WebCore::nextCharacterBoundaryInDirection):
1719         (WebCore::positionOfNextBoundaryOfGranularity):
1720         (WebCore::charactersAroundPosition):
1721
1722 2016-08-26  Joseph Pecoraro  <pecoraro@apple.com>
1723
1724         Web Inspector: Test and address issues in IndexedDB.requestData
1725         https://bugs.webkit.org/show_bug.cgi?id=161178
1726         <rdar://problem/28002467>
1727
1728         Reviewed by Brian Burg.
1729
1730         Test: inspector/indexeddb/requestData.html
1731
1732         * inspector/InspectorIndexedDBAgent.cpp:
1733         (idbKeyRangeFromKeyRange):
1734         Parsing was too strict. "lower" and "upper" keys are optional.
1735
1736         (WebCore::DataLoader::execute):
1737         Ensure the skip count is passed forward.
1738
1739 2016-08-25  Joseph Pecoraro  <pecoraro@apple.com>
1740
1741         Web Inspector: Provide a way to clear an IndexedDB object store
1742         https://bugs.webkit.org/show_bug.cgi?id=161167
1743         <rdar://problem/27996932>
1744
1745         Reviewed by Brian Burg.
1746
1747         Test: inspector/indexeddb/clearObjectStore.html
1748
1749         * inspector/InspectorIndexedDBAgent.cpp:
1750         Make the transaction for clearing an object store readwrite
1751         instead of readonly, and activate it.
1752
1753 2016-08-26  Chris Dumez  <cdumez@apple.com>
1754
1755         Calling crossOriginWindow.toString() should not be allowed
1756         https://bugs.webkit.org/show_bug.cgi?id=161225
1757
1758         Reviewed by Andreas Kling.
1759
1760         Calling crossOriginWindow.toString() should not be allowed:
1761         - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
1762
1763         In WebKit, we were printing a security error in the console but
1764         returning "[object Window]" anyway.
1765
1766         In Firefox and Chrome, it throws an exception.
1767
1768         No new tests, updated existing test.
1769
1770         * bindings/js/JSDOMWindowCustom.cpp:
1771         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
1772
1773 2016-08-26  Devin Rousso  <dcrousso+webkit@gmail.com>
1774
1775         Web Inspector: Some CSS selectors in the UI aren't escaped
1776         https://bugs.webkit.org/show_bug.cgi?id=151378
1777
1778         Reviewed by Joseph Pecoraro.
1779
1780         No new tests, but logic and results of existing tests updated:
1781         * inspector/dom/content-node-region-info.html:
1782         * inspector/dom/content-node-region-info-expected.txt:
1783         * inspector/dom/highlightNode-expected.txt:
1784         * inspector/dom/highlightSelector.html:
1785         * inspector/dom/highlightSelector-expected.txt:
1786
1787         * inspector/InspectorOverlay.cpp:
1788         (WebCore::buildObjectForElementData):
1789
1790         * inspector/InspectorOverlayPage.css:
1791         (.pseudo-type):
1792         (.tag-name): Deleted.
1793
1794         * inspector/InspectorOverlayPage.js:
1795         (_createElementTitle):
1796
1797 2016-08-25  Brent Fulgham  <bfulgham@apple.com>
1798
1799         Crash when getting font bounding rect
1800         https://bugs.webkit.org/show_bug.cgi?id=161202
1801         <rdar://problem/27986981>
1802
1803         Reviewed by Myles C. Maxfield.
1804
1805         We should never store GlyphData objects for later use, because they contain raw pointers to Font elements
1806         contained in caches, and those font caches get periodically purged.
1807
1808         Instead, we should hold onto the ‘key’ representing the GlyphData, and simply ask the system for the
1809         GlyphData the next time it is needed.
1810
1811         Tested by existing MathML tests under ASAN and GuardMalloc.
1812
1813         * rendering/mathml/RenderMathMLToken.cpp:
1814         (WebCore::RenderMathMLToken::RenderMathMLToken): Clean up constructors.
1815         (WebCore::RenderMathMLToken::computePreferredLogicalWidths): Use keys to get correct GlyphData when needed.
1816         (WebCore::RenderMathMLToken::updateMathVariantGlyph): Ditto.
1817         (WebCore::RenderMathMLToken::firstLineBaseline): Ditto.
1818         (WebCore::RenderMathMLToken::layoutBlock): Ditto.
1819         (WebCore::RenderMathMLToken::paint): Ditto.
1820         (WebCore::RenderMathMLToken::paintChildren): Ditto.
1821         * rendering/mathml/RenderMathMLToken.h:
1822
1823 2016-08-26  Chris Dumez  <cdumez@apple.com>
1824
1825         HTMLAreaElement's coords attributes parsing does not comply with the HTML specification
1826         https://bugs.webkit.org/show_bug.cgi?id=161216
1827
1828         Reviewed by Andreas Kling.
1829
1830         HTMLAreaElement's coords attributes parsing does not comply with the HTML specification:
1831         - https://html.spec.whatwg.org/#attr-area-coords
1832
1833         This patch aligns our parsing of this attribute with the specification and Chrome.
1834
1835         No new tests, rebaselined existing test.
1836
1837         * html/HTMLAreaElement.cpp:
1838         (WebCore::HTMLAreaElement::HTMLAreaElement):
1839         (WebCore::HTMLAreaElement::parseAttribute):
1840         (WebCore::HTMLAreaElement::getRegion):
1841         * html/HTMLAreaElement.h:
1842         * html/parser/HTMLParserIdioms.cpp:
1843         (WebCore::isHTMLSpaceOrDelimiter):
1844         (WebCore::isNumberStart):
1845         (WebCore::parseHTMLListOfOfFloatingPointNumberValuesInternal):
1846         (WebCore::parseHTMLListOfOfFloatingPointNumberValues):
1847         (WebCore::parseHTMLNonNegativeInteger): Deleted.
1848         * html/parser/HTMLParserIdioms.h:
1849
1850 2016-08-26  Csaba Osztrogonác  <ossy@webkit.org>
1851
1852         Fix the !ENABLE(WEB_SOCKETS) build
1853         https://bugs.webkit.org/show_bug.cgi?id=161251
1854
1855         Reviewed by Alex Christensen.
1856
1857         * page/SocketProvider.h:
1858
1859 2016-08-26  Csaba Osztrogonác  <ossy@webkit.org>
1860
1861         Fix the !ENABLE(WEB_TIMING) build
1862         https://bugs.webkit.org/show_bug.cgi?id=161250
1863
1864         Reviewed by Alex Christensen.
1865
1866         * loader/SubresourceLoader.cpp:
1867         (WebCore::SubresourceLoader::didFinishLoading):
1868         * loader/cache/CachedResourceLoader.h:
1869         (WebCore::CachedResourceLoader::resourceTimingInformation):
1870
1871 2016-08-26  Chris Dumez  <cdumez@apple.com>
1872
1873         Trying to access cross-origin Location properties should throw a SecurityError
1874         https://bugs.webkit.org/show_bug.cgi?id=161248
1875
1876         Reviewed by Alex Christensen.
1877
1878         Trying to access cross-origin Location properties should throw a SecurityError:
1879         - https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
1880         - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
1881
1882         Firefox and Chrome already throw. However, WebKit was logging an error message
1883         and returning undefined.
1884
1885         No new tests, updated existing tests.
1886
1887         * bindings/js/JSDOMBinding.cpp:
1888         (WebCore::throwSecurityError):
1889         * bindings/js/JSDOMBinding.h:
1890         * bindings/js/JSLocationCustom.cpp:
1891         (WebCore::JSLocation::getOwnPropertySlotDelegate):
1892
1893 2016-08-26  Per Arne Vollan  <pvollan@apple.com>
1894
1895         [Win] Warning fixes.
1896         https://bugs.webkit.org/show_bug.cgi?id=161241
1897
1898         Reviewed by Brent Fulgham.
1899
1900         MSVC warns about potential use of uninitialized variables.
1901
1902         * accessibility/AXObjectCache.cpp:
1903         * css/parser/CSSParserValues.cpp:
1904
1905 2016-08-26  Eric Carlson  <eric.carlson@apple.com>
1906
1907         [MediaStream] Add support for OverConstrainedErrorEvent
1908         https://bugs.webkit.org/show_bug.cgi?id=161199
1909         <rdar://problem/28011819>
1910
1911         Reviewed by Jer Noble.
1912
1913         Test: fast/events/constructors/overconstrained-error-event-constructor.html
1914
1915         * CMakeLists.txt:
1916         * DerivedSources.make:
1917         * Modules/mediastream/OverconstrainedErrorEvent.h: Added.
1918         (WebCore::OverconstrainedErrorEvent::~OverconstrainedErrorEvent):
1919         (WebCore::OverconstrainedErrorEvent::create):
1920         (WebCore::OverconstrainedErrorEvent::createForBindings):
1921         (WebCore::OverconstrainedErrorEvent::error):
1922         (WebCore::OverconstrainedErrorEvent::eventInterface):
1923         (WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent):
1924         * Modules/mediastream/OverconstrainedErrorEvent.idl: Added.
1925
1926         * WebCore.xcodeproj/project.pbxproj: Add new files.
1927
1928         * bindings/js/JSDictionary.cpp:
1929         (WebCore::JSDictionary::convertValue): Add OverconstrainedErrorEvent converter.
1930         * bindings/js/JSDictionary.h:
1931
1932         * dom/EventNames.in: Add OverconstrainedErrorEvent.
1933
1934 2016-08-26  Frederic Wang  <fwang@igalia.com>
1935
1936         The annotation-xml element does not need to be behave as an mrow
1937         https://bugs.webkit.org/show_bug.cgi?id=161230
1938
1939         Reviewed by Manuel Rego Casasnovas.
1940
1941         In r204779, MathMLAnnotationElement was made a MathMLRowElement just because the
1942         annotation-xml element is generating a RenderMathMLRow. This later point is actually not
1943         needed since annotation-xml is just a wrapper for foreign elements and so does not need to
1944         handle special MathML features like operator spacing or stretching. We can thus move back
1945         MathMLAnnotationElement to a generic MathMLPresentationElement and instead make the
1946         annotation-xml element generate a generic RenderMathMLBlock renderer.
1947
1948         No new tests, semantics annotations already covered by existing tests.
1949
1950         * mathml/MathMLAnnotationElement.cpp: Replace RenderMathMLRow.h with RenderMathMLBlock.h
1951         (WebCore::MathMLAnnotationElement::MathMLAnnotationElement): Inherit from
1952         MathMLPresentationElement instead of MathMLRowElement.
1953         (WebCore::MathMLAnnotationElement::createElementRenderer): Make annotation-xml create a
1954         RenderMathMLBlock instead of a RenderMathMLRow.
1955         (WebCore::MathMLAnnotationElement::attributeChanged): Inherit from MathMLPresentationElement
1956         instead of MathMLRowElement.
1957         * mathml/MathMLAnnotationElement.h: Ditto.
1958
1959 2016-08-26  Csaba Osztrogonác  <ossy@webkit.org>
1960
1961         Typo fix after r56209
1962         https://bugs.webkit.org/show_bug.cgi?id=161246
1963
1964         Reviewed by Gyuyoung Kim.
1965
1966         * page/FrameView.cpp:
1967         (WebCore::FrameView::adjustMediaTypeForPrinting):
1968
1969 2016-08-26  Per Arne Vollan  <pvollan@apple.com>
1970
1971         [Win] Warning fixes.
1972         https://bugs.webkit.org/show_bug.cgi?id=161077
1973
1974         Reviewed by Brent Fulgham.
1975
1976         * css/CSSGrammar.y.includes:
1977         * css/RuleFeature.cpp:
1978         (WebCore::makeAttributeSelectorKey):
1979         * editing/TextIterator.cpp:
1980         (WebCore::SearchBuffer::SearchBuffer):
1981         * html/HTMLElement.cpp:
1982         (WebCore::HTMLElement::textToFragment):
1983         * html/MediaElementSession.h:
1984         * platform/URL.cpp:
1985         * platform/graphics/ca/GraphicsLayerCA.cpp:
1986         * platform/network/HTTPParsers.cpp:
1987         (WebCore::parseHTTPHeader):
1988         * rendering/InlineIterator.h:
1989         (WebCore::InlineIterator::clear):
1990         * rendering/RenderDeprecatedFlexibleBox.cpp:
1991         (WebCore::FlexBoxIterator::reset):
1992         * rendering/RenderText.cpp:
1993         (WebCore::RenderText::secureText):
1994         * rendering/mathml/RenderMathMLToken.cpp:
1995         (WebCore::mathVariant):
1996         * style/InlineTextBoxStyle.cpp:
1997         (WebCore::visualOverflowForDecorations):
1998         * xml/XPathGrammar.y:
1999
2000 2016-08-26  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
2001
2002         Make custom constructors consistent with generated bindings code
2003         https://bugs.webkit.org/show_bug.cgi?id=159550
2004
2005         Reviewed by Youenn Fablet.
2006
2007         Add assertion to check DOMConstructorObject* passed in ExecState is not null.
2008         Rename throwConstructorDocumentUnavailableError to throwConstructorScriptExecutionContextUnavailableError since
2009         ScriptExecutionContext is not necessarily a Document.
2010         Modify error message in case of argument error to be consistent with generated binding code: replace calls to
2011         throwVMError with calls to throwConstructorScriptExecutionContextUnavailableError and throwArgumentTypeError.
2012
2013         No new test required. Modify tests and tests expectations to align with new error messages.
2014
2015         * bindings/js/JSAudioContextCustom.cpp:
2016         (WebCore::constructJSAudioContext):
2017         * bindings/js/JSBlobCustom.cpp:
2018         (WebCore::constructJSBlob):
2019         * bindings/js/JSDOMBinding.cpp:
2020         (WebCore::throwConstructorScriptExecutionContextUnavailableError):
2021         * bindings/js/JSDOMBinding.h:
2022         * bindings/js/JSDOMConstructor.h:
2023         (WebCore::JSBuiltinConstructor<JSClass>::callConstructor):
2024         * bindings/js/JSDOMFormDataCustom.cpp:
2025         (WebCore::constructJSDOMFormData):
2026         * bindings/js/JSDataCueCustom.cpp:
2027         (WebCore::constructJSDataCue):
2028         * bindings/js/JSFileCustom.cpp:
2029         (WebCore::constructJSFile):
2030         * bindings/js/JSHTMLElementCustom.cpp:
2031         (WebCore::constructJSHTMLElement):
2032         * bindings/js/JSMediaSessionCustom.cpp:
2033         (WebCore::constructJSMediaSession):
2034         * bindings/js/JSMutationObserverCustom.cpp:
2035         (WebCore::constructJSMutationObserver):
2036         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
2037         (WebCore::constructJSReadableStreamDefaultReader):
2038         * bindings/js/JSWorkerCustom.cpp:
2039         (WebCore::constructJSWorker):
2040         * bindings/scripts/CodeGeneratorJS.pm:
2041         (GenerateCallbackImplementation):
2042         (NativeToJSValue):
2043         (GenerateHashTableValueArray):
2044         (GenerateConstructorDefinition):
2045         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2046         (WebCore::JSTestEventConstructorConstructor::construct):
2047         * bindings/scripts/test/JS/JSTestInterface.cpp:
2048         (WebCore::JSTestInterfaceConstructor::construct):
2049         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2050         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
2051         * bindings/scripts/test/JS/JSTestNode.cpp:
2052         (WebCore::JSTestNodeConstructor::construct):
2053         * bindings/scripts/test/JS/JSTestObj.cpp:
2054         (WebCore::JSTestObjConstructor::construct):
2055         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2056         (WebCore::constructJSTestOverloadedConstructors1):
2057         (WebCore::constructJSTestOverloadedConstructors2):
2058         (WebCore::constructJSTestOverloadedConstructors3):
2059         (WebCore::constructJSTestOverloadedConstructors4):
2060         (WebCore::constructJSTestOverloadedConstructors5):
2061         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2062         (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
2063         (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
2064         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2065         (WebCore::JSTestTypedefsConstructor::construct):
2066
2067 2016-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2068
2069         Unreviewed. Fix GTK+ build after r204986 and r204996.
2070
2071         * page/DOMWindow.idl:
2072
2073 2016-08-25  Wenson Hsieh  <wenson_hsieh@apple.com>
2074
2075         Dragging against the end of the inline media scrubber causes the media scrubber to hide
2076         https://bugs.webkit.org/show_bug.cgi?id=161207
2077
2078         Reviewed by Eric Carlson.
2079
2080         Previously, we would re-enable behavior restrictions when firing an ended event. However, if the ended event is
2081         caused by the user seeking to the end of the video, the media controls would be taken away from under the user.
2082         To prevent this, we don't add the relevant behavior restrictions upon media ended if media was seeking before
2083         firing the event.
2084
2085         Tweaked an existing WebKit API test to cover this change.
2086
2087         * html/HTMLMediaElement.cpp:
2088         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2089         (WebCore::HTMLMediaElement::addBehaviorRestrictionsOnEndIfNecessary):
2090         * html/HTMLMediaElement.h:
2091         * html/MediaElementSession.cpp:
2092         (WebCore::MediaElementSession::canControlControlsManager):
2093
2094 2016-08-25  Andreas Kling  <akling@apple.com>
2095
2096         REGRESSION: RELEASE_ASSERT in ResourceUsageThread::platformThreadBody when ASan is enabled
2097         <https://webkit.org/b/161203>
2098         <rdar://problem/28011251>
2099
2100         Reviewed by Joseph Pecoraro.
2101
2102         * page/cocoa/ResourceUsageThreadCocoa.mm:
2103         (WebCore::ResourceUsageThread::platformThreadBody): Remove overly optimistic assertions about
2104         "GC owned" memory never being higher than total malloc memory usage. This accounting is not
2105         really exact and pretending otherwise will just lead to crashes.
2106
2107         * html/HTMLCanvasElement.cpp:
2108         (WebCore::HTMLCanvasElement::externalMemoryCost): Hook up HTMLCanvasElement to the ImageBuffer
2109         helper for reporting external memory cost. This makes accounting slightly more correct.
2110
2111 2016-08-25  Chris Dumez  <cdumez@apple.com>
2112
2113         Regression(r203623): Breaks App Store application
2114         https://bugs.webkit.org/show_bug.cgi?id=161206
2115         <rdar://problem/28015060>
2116
2117         Reviewed by Ryosuke Niwa.
2118
2119         Add quirks for the App Store application so that we log an error message
2120         when passing a Document node to Window.getComputedStyle() instead of
2121         throwing an exception.
2122
2123         * page/DOMWindow.cpp:
2124         (WebCore::DOMWindow::getComputedStyle):
2125         * page/DOMWindow.h:
2126         * page/DOMWindow.idl:
2127         * platform/RuntimeApplicationChecks.h:
2128         * platform/RuntimeApplicationChecks.mm:
2129         (WebCore::MacApplication::isAppStore):
2130
2131 2016-08-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
2132
2133         REGRESSION (r203378): [iOS] The PDF image is rendered stretched if a sub image of it is cached first
2134         https://bugs.webkit.org/show_bug.cgi?id=160617
2135
2136         Reviewed by Tim Horton.
2137
2138         When caching only a sub-image of the PDF ensure the source rectangle starts
2139         at the top-left of the cached sub-image rectangle. When drawing the cached 
2140         sub-image to the destination context ensure the destination rectangle is the
2141         sub-image rectangle so no stretching or shrinking happens.
2142
2143         Test: fast/images/cached-clipped-pdf.html
2144
2145         * page/Settings.cpp:
2146         (WebCore::Settings::Settings):
2147         (WebCore::Settings::setCachedPDFImageEnabled): Deleted.
2148         * page/Settings.h:
2149         (WebCore::Settings::isCachedPDFImageEnabled): Deleted.
2150         * page/Settings.in:
2151         Change the boolean setting CachedPDFImageEnabled to be enum property and
2152         rename it PDFImageCachingPolicy. Allow the "PDFImageCachingBelowMemoryLimit"
2153         option to be available on a;; platforms. The "PDFImageCachingClipBoundsOnly"
2154         option is added for testing purpose. If forces recaching the PDF with each
2155         draw and it sets the cached image rectangle to the clipping rectangle.
2156         
2157         * platform/graphics/cg/PDFDocumentImage.cpp:
2158         (WebCore::PDFDocumentImage::setPdfImageCachingPolicy): Take an enum instead of boolean.
2159         (WebCore::cachedImageRect): 
2160         (WebCore::PDFDocumentImage::decodedSizeChanged): Enable PDFImageCachingBelowMemoryLimit
2161         on all platforms.
2162         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): Fix the source rectangle
2163         when caching a sub-image of the PDF.
2164         (WebCore::PDFDocumentImage::draw): Fix the destination rectangle when drawing
2165         a sub-image to the destination context.
2166         (WebCore::PDFDocumentImage::setCachedPDFImageEnabled): Deleted.
2167         * platform/graphics/cg/PDFDocumentImage.h:
2168         
2169         * rendering/RenderImage.cpp:
2170         (WebCore::RenderImage::paintIntoRect):
2171         
2172         * testing/InternalSettings.cpp:
2173         (WebCore::InternalSettings::Backup::Backup):
2174         (WebCore::InternalSettings::Backup::restoreTo):
2175         (WebCore::InternalSettings::setPDFImageCachingPolicy):
2176         (WebCore::InternalSettings::setCachedPDFImageEnabled): Deleted.
2177         * testing/InternalSettings.h:
2178         * testing/InternalSettings.idl:
2179         Change the internal setting CachedPDFImageEnabled to PDFImageCachingPolicy.
2180
2181 2016-08-25  Zalan Bujtas  <zalan@apple.com>
2182
2183         Infinite recursion crash in WebCore::RenderBlockFlow::layoutBlock
2184         https://bugs.webkit.org/show_bug.cgi?id=139474
2185         <rdar://problem/27705190>
2186
2187         Reviewed by David Hyatt.
2188
2189         We should just give up trying to avoid widow when the page is too small to break line.
2190
2191         Test: fast/multicol/assert-on-small-page-height-with-widow.html
2192
2193         * rendering/RenderBlockFlow.cpp:
2194         (WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidowIfNeeded):
2195         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
2196         * rendering/RenderBlockFlow.h:
2197
2198 2016-08-24  Sam Weinig  <sam@webkit.org>
2199
2200         Add the ability to override the implementation name of IDL enums and dictionaries
2201         https://bugs.webkit.org/show_bug.cgi?id=161185
2202
2203         Reviewed by Anders Carlsson.
2204
2205         * bindings/scripts/CodeGenerator.pm:
2206         (ProcessDocument):
2207         Build a dictionary of IDL name -> implementation name overrides
2208         for enums and dictionaries up front based on ImplementedAs extended
2209         attribute.
2210
2211         (HasEnumImplementationNameOverride):
2212         (GetEnumImplementationNameOverride):
2213         (HasDictionaryImplementationNameOverride):
2214         (GetDictionaryImplementationNameOverride):
2215         Expose predicate and getter for name overrides.
2216
2217         * bindings/scripts/CodeGeneratorJS.pm:
2218         (GetEnumerationClassName):
2219         (GetDictionaryClassName):
2220         Use the override names as necessary.
2221
2222         * bindings/scripts/test/TestObj.idl:
2223         Add tests for enums and dictionaries with ImplementedAs extended
2224         attributes.
2225
2226 2016-08-25  Johan K. Jensen  <johan_jensen@apple.com>
2227
2228         Don't store networkLoadTiming in the disk cache
2229         https://bugs.webkit.org/show_bug.cgi?id=161161
2230
2231         Reviewed by Antti Koivisto.
2232
2233         No functionality changed. So, no new tests.
2234
2235         * platform/network/ResourceResponseBase.h:
2236         (WebCore::ResourceResponseBase::encode):
2237         (WebCore::ResourceResponseBase::decode):
2238
2239 2016-08-25  Johan K. Jensen  <johan_jensen@apple.com>
2240
2241         Update the Resource Timing implementation
2242         https://bugs.webkit.org/show_bug.cgi?id=161068
2243
2244         Reviewed by Alex Christensen.
2245
2246         Tests: imported/w3c/web-platform-tests/resource-timing/resource-timing.html
2247                imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html
2248
2249         Update the Resource Timing implementation for better compatibility with the Resource Timing API spec.
2250         Use LoadTiming for general timing information about a resources load timeline.
2251         Mark timestamps for newly loaded resources as well as cached resources.
2252
2253         * loader/DocumentLoader.cpp:
2254         (WebCore::DocumentLoader::startLoadingMainResource):
2255         StartTime and fetchStart should be equal initially.
2256
2257         * loader/LoadTiming.cpp:
2258         (WebCore::LoadTiming::LoadTiming): Moved member initialization out. Removed constructor.
2259         * loader/LoadTiming.h:
2260         (WebCore::LoadTiming::markStartTimeAndFetchStart):
2261         Mark startTime and fetchStart simultaneously.
2262
2263         * loader/ResourceLoader.cpp:
2264         (WebCore::ResourceLoader::init):
2265         Mark the start time of resources.
2266
2267         * loader/ResourceLoader.h:
2268         (WebCore::ResourceLoader::loadTiming):
2269         Add LoadTiming info to handle a resources load timing.
2270
2271         * loader/ResourceTimingInformation.cpp:
2272         (WebCore::ResourceTimingInformation::addResourceTiming):
2273         * loader/ResourceTimingInformation.h:
2274         Only pass in the URL from the ResourceRequest.
2275         Pass LoadTiming instead of timestamps.
2276
2277         * loader/SubresourceLoader.cpp:
2278         (WebCore::SubresourceLoader::willSendRequestInternal):
2279         Mark redirects.
2280
2281         (WebCore::SubresourceLoader::didFinishLoading):
2282         Mark the responseEnd timestamp.
2283         Add the ResourceEntry to the timeline before notifyDone is called.
2284
2285         * loader/cache/CachedResourceLoader.cpp:
2286         (WebCore::CachedResourceLoader::requestResource):
2287         (WebCore::CachedResourceLoader::revalidateResource):
2288         (WebCore::CachedResourceLoader::loadDone):
2289         Mark timestamps for cached resources and use them instead of a cached LoadTiming.
2290
2291         * loader/cache/CachedResourceLoader.h:
2292         (WebCore::CachedResourceLoader::resourceTimingInformation):
2293         Add ResourceTimingInformation getter so SubresourceLoader.cpp can add entries before callbacks.
2294
2295         * page/Performance.cpp:
2296         (WebCore::Performance::addResourceTiming):
2297         * page/Performance.h:
2298         Update signature: URLs and LoadTiming instead of timestamps.
2299
2300         * page/PerformanceResourceTiming.cpp:
2301         (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
2302         (WebCore::PerformanceResourceTiming::redirectStart):
2303         (WebCore::PerformanceResourceTiming::redirectEnd):
2304         (WebCore::PerformanceResourceTiming::fetchStart):
2305         (WebCore::PerformanceResourceTiming::domainLookupStart):
2306         (WebCore::PerformanceResourceTiming::domainLookupEnd):
2307         (WebCore::PerformanceResourceTiming::connectStart):
2308         (WebCore::PerformanceResourceTiming::connectEnd):
2309         (WebCore::PerformanceResourceTiming::requestStart):
2310         (WebCore::PerformanceResourceTiming::responseStart):
2311         (WebCore::PerformanceResourceTiming::responseEnd):
2312         (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
2313         * page/PerformanceResourceTiming.h:
2314         Update signatures and properties to use LoadTiming.
2315         Use LoadTiming’s redirectStart/End, fetchStart, responseStart/End.
2316         Make sure dns and connection timestamps are in increasing order, even when cached.
2317
2318         * page/PerformanceResourceTiming.idl:
2319         Add responseStart.
2320
2321 2016-08-24  Anders Carlsson  <andersca@apple.com>
2322
2323         Simplify createMouseEvent in DragController
2324         https://bugs.webkit.org/show_bug.cgi?id=161168
2325
2326         Reviewed by Dan Bernstein.
2327
2328         * page/DragController.cpp:
2329         (WebCore::createMouseEvent):
2330         * platform/DragData.cpp:
2331         (WebCore::DragData::modifierKeyState): Deleted.
2332         * platform/DragData.h:
2333
2334 2016-08-25  Chris Dumez  <cdumez@apple.com>
2335
2336         DOMTokenList.value should be a stringifier attribute
2337         https://bugs.webkit.org/show_bug.cgi?id=161195
2338
2339         Reviewed by Darin Adler.
2340
2341         DOMTokenList.value should be a stringifier attribute:
2342         - https://dom.spec.whatwg.org/#domtokenlist
2343
2344         No new tests, this change is not observable from the Web.
2345
2346         * html/DOMTokenList.h:
2347         (WebCore::DOMTokenList::toString): Deleted.
2348         * html/DOMTokenList.idl:
2349         * html/HTMLLinkElement.cpp:
2350         (WebCore::HTMLLinkElement::iconSizes): Deleted.
2351         * html/HTMLLinkElement.h:
2352
2353 2016-08-25  Csaba Osztrogonác  <ossy@webkit.org>
2354
2355         [Mac][cmake] Unreviewed speculative buildfix after r204852, just for fun.
2356
2357         * PlatformMac.cmake:
2358
2359 2016-08-24  Frederic Wang  <fwang@igalia.com>
2360
2361         Do not store layout parameters on the RenderMathMLRoot class
2362         https://bugs.webkit.org/show_bug.cgi?id=161132
2363
2364         Reviewed by Darin Adler.
2365
2366         Storing layout parameters on the RenderMathMLRoot class is not really needed since reading
2367         the parameters from the MATH table is not too expensive and updateStyle() is currently always
2368         called in layoutBlock() and computePreferredLogicalWidths(). Most of these parameters are
2369         actually only used in layoutBlock(). We separate horizontal and vertical parameters since
2370         the latter are not needed for preferred width calculations. This removes the need for calling
2371         an updateStyle functions and may also fix update issues when zooming in or out.
2372
2373         No new tests, already covered by existing tests.
2374
2375         * rendering/mathml/MathMLStyle.cpp:
2376         (WebCore::MathMLStyle::updateStyleIfNeeded): No need to update layout parameters for the
2377         RenderMathMLRoot class.
2378         * rendering/mathml/RenderMathMLRoot.cpp:
2379         (WebCore::RenderMathMLRoot::styleDidChange): No need to update layout parameters.
2380         (WebCore::RenderMathMLRoot::horizontalParameters): Move code from updateStyle to retrieve the
2381         horizontal parameters.
2382         (WebCore::RenderMathMLRoot::verticalParameters): Ditto for vertical parameters.
2383         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths): Call horizontalParameters() to
2384         get the kernings of the index instead of calling updateStyle().
2385         (WebCore::RenderMathMLRoot::layoutBlock): Call horizontalParameters() and
2386         verticalParameters() to get the layout parameters instead of calling updateStyle().
2387         (WebCore::RenderMathMLRoot::paint): Call horizontalParameters() and verticalParameters()
2388         to get the layout parameters.
2389         (WebCore::RenderMathMLRoot::updateFromElement): Deleted. No need to call updateStyle().
2390         (WebCore::RenderMathMLRoot::updateStyle): Deleted.
2391         * rendering/mathml/RenderMathMLRoot.h: Do not override updateFromElement(). Replace some
2392         layout parameters stored on the class with struct and helper functions to manipulate them.
2393
2394 2016-08-24  Chris Dumez  <cdumez@apple.com>
2395
2396         WorkerLocation.prototype.toString() should be enumerable
2397         https://bugs.webkit.org/show_bug.cgi?id=161183
2398
2399         Reviewed by Ryosuke Niwa.
2400
2401         WorkerLocation.prototype.toString() should be enumerable:
2402         - https://html.spec.whatwg.org/#workerlocation
2403         - http://heycam.github.io/webidl/#es-stringifier
2404
2405         No new tests, updated existing test.
2406
2407         * workers/WorkerLocation.h:
2408         (WebCore::WorkerLocation::toString): Deleted.
2409         * workers/WorkerLocation.idl:
2410         Also use USVString string type instead of DOMString to match the
2411         specification. There is no behavior change because those attributes
2412         are readonly.
2413
2414 2016-08-24  Chris Dumez  <cdumez@apple.com>
2415
2416         Location.toString() should be enumerable
2417         https://bugs.webkit.org/show_bug.cgi?id=161179
2418
2419         Reviewed by Geoffrey Garen.
2420
2421         Location.toString() should be enumerable as per:
2422         - https://html.spec.whatwg.org/#location
2423         - http://heycam.github.io/webidl/#es-stringifier
2424
2425         This patch stops hard-coding the toString() operation on the Location
2426         interface and makes the 'href' attribute a stringifier attribute instead,
2427         as per the specification. The generated toString() has the same behavior
2428         as it used to but it is now enumerable, as it should.
2429
2430         No new tests, updated existing test.
2431
2432         * bindings/js/JSLocationCustom.cpp:
2433         (WebCore::JSLocation::toStringFunction): Deleted.
2434         * page/Location.idl:
2435
2436 2016-08-24  Joseph Pecoraro  <pecoraro@apple.com>
2437
2438         Implement `CSS.escape` as per CSSOM
2439         https://bugs.webkit.org/show_bug.cgi?id=126337
2440
2441         Reviewed by Dean Jackson.
2442
2443         Test: css3/escape-dom-api.html
2444
2445         * css/CSSOMUtils.cpp:
2446         (WebCore::serializeIdentifier):
2447         Update serialization to match the latest version of the spec:
2448         <https://drafts.csswg.org/cssom/#serialize-an-identifier>
2449         New handling for 0x0, 0x7f, just "-", and "--" is now allowed.
2450
2451         * css/DOMCSSNamespace.cpp:
2452         (WebCore::DOMCSSNamespace::escape):
2453         * css/DOMCSSNamespace.h:
2454         * css/DOMCSSNamespace.idl:
2455         New CSS.escape method.
2456
2457 2016-08-24  Zalan Bujtas  <zalan@apple.com>
2458
2459         ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
2460         https://bugs.webkit.org/show_bug.cgi?id=155700
2461         <rdar://problem/27720727>
2462
2463         Reviewed by David Hyatt.
2464
2465         RenderBox::m_minPreferredLogicalWidth/m_maxPreferredLogicalWidth don't need special initial value since
2466         preferredLogicalWidthsDirty flag guards them. -1 as initial value can cause problems for renderers that don't
2467         override RenderBox::computePreferredLogicalWidths().    
2468
2469         Test: fast/ruby/assert-when-content-size-is-negative.html
2470
2471         * rendering/RenderBox.cpp:
2472         (WebCore::RenderBox::RenderBox):
2473         (WebCore::RenderBox::dirtyLineBoxes):
2474         (WebCore::RenderBox::deleteLineBoxWrapper):
2475         * rendering/RenderBox.h:
2476
2477 2016-08-24  Alex Christensen  <achristensen@webkit.org>
2478
2479         Import w3c URL tests
2480         https://bugs.webkit.org/show_bug.cgi?id=161177
2481
2482         Reviewed by Tim Horton.
2483
2484         Tests: imported/w3c/web-platform-tests/url/a-element-xhtml.xhtml
2485                imported/w3c/web-platform-tests/url/a-element.html
2486                imported/w3c/web-platform-tests/url/historical.html
2487                imported/w3c/web-platform-tests/url/interfaces.html
2488                imported/w3c/web-platform-tests/url/url-constructor.html
2489                imported/w3c/web-platform-tests/url/url-domainToUnicode.html
2490                imported/w3c/web-platform-tests/url/url-setters.html
2491                imported/w3c/web-platform-tests/url/urlsearchparams-append.html
2492                imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html
2493                imported/w3c/web-platform-tests/url/urlsearchparams-delete.html
2494                imported/w3c/web-platform-tests/url/urlsearchparams-get.html
2495                imported/w3c/web-platform-tests/url/urlsearchparams-getall.html
2496                imported/w3c/web-platform-tests/url/urlsearchparams-has.html
2497                imported/w3c/web-platform-tests/url/urlsearchparams-set.html
2498                imported/w3c/web-platform-tests/url/urlsearchparams-stringifier.html
2499
2500         * platform/URL.cpp:
2501         (WebCore::URL::setQuery):
2502
2503 2016-08-24  Ryan Haddad  <ryanhaddad@apple.com>
2504
2505         Rebaseline bindings tests after r204923.
2506
2507         Unreviewed test gardening.
2508
2509         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2510         (WebCore::jsTestActiveDOMObjectExcitingAttr):
2511         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
2512
2513 2016-08-24  Jonathan Bedard  <jbedard@apple.com>
2514
2515         FocusController multiple dereferenced NULL pointers
2516         https://bugs.webkit.org/show_bug.cgi?id=160808
2517
2518         Reviewed by Darin Adler.
2519
2520         No new tests needed, fix does not change functionality.
2521
2522         This change fixes a number of NULL pointer dereferences which occur in FocusController.
2523
2524         * page/FocusController.cpp:
2525         (WebCore::isFocusableElementOrScopeOwner): Changed KeyboardEvent reference to pointer.
2526         (WebCore::isNonFocusableScopeOwner): Ditto.
2527         (WebCore::isFocusableScopeOwner): Ditto.
2528         (WebCore::shadowAdjustedTabIndex): Ditto.
2529
2530         (WebCore::FocusController::findFocusableElementAcrossFocusScope): Pass pointer instead of reference to KeyboardEvent.
2531         (WebCore::FocusController::nextFocusableElementWithinScope): Ditto.
2532         (WebCore::FocusController::previousFocusableElementWithinScope): Ditto.
2533         (WebCore::FocusController::findElementWithExactTabIndex): Ditto.
2534         (WebCore::nextElementWithGreaterTabIndex): Ditto.
2535         (WebCore::previousElementWithLowerTabIndex): Ditto.
2536         (WebCore::FocusController::nextFocusableElementOrScopeOwner): Ditto.
2537         (WebCore::FocusController::previousFocusableElementOrScopeOwner): Ditto.
2538         (WebCore::relinquishesEditingFocus): Ditto.
2539
2540 2016-08-24  Nan Wang  <n_wang@apple.com>
2541
2542         AX: VoiceOver on iOS ignores aria-checked on menuitemradio and menuitemcheckbox
2543         https://bugs.webkit.org/show_bug.cgi?id=161118
2544
2545         Reviewed by Chris Fleizach.
2546
2547         Added checkboxOrRadioValue and toggle trait to menuitemradio and menuitemcheckbox.
2548
2549         Test: accessibility/ios-simulator/menuitem-checked.html
2550
2551         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2552         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2553         (-[WebAccessibilityObjectWrapper accessibilityValue]):
2554
2555 2016-08-24  Chris Dumez  <cdumez@apple.com>
2556
2557         Assertion hit: ASSERT(!m_parserScheduler) in ~HTMLDocumentParser()
2558         https://bugs.webkit.org/show_bug.cgi?id=161083
2559         <rdar://problem/27986937>
2560
2561         Reviewed by Darin Adler.
2562
2563         Call cancelParsing() right before re-creating the new parser in
2564         Document::implicitOpen(). We would previously call removeChildren()
2565         in between which is was an issue because it can cause JS to be
2566         executed and therefore the parser to be re-created after we have
2567         cancelled parsing.
2568
2569         No new tests, unskipped html/browsers/browsing-the-web/unloading-documents/004.html
2570         which was consistently crashing.
2571
2572         * dom/Document.cpp:
2573         (WebCore::Document::implicitOpen):
2574
2575 2016-08-24  Eric Carlson  <eric.carlson@apple.com>
2576
2577         [MediaStream] Add support for OverConstrained Error
2578         https://bugs.webkit.org/show_bug.cgi?id=160790
2579         <rdar://problem/27815715>
2580
2581         Reviewed by Jer Noble.
2582
2583         Existing tests updated.
2584
2585         * DerivedSources.make:
2586         * Modules/mediastream/OverconstrainedError.h: Added.
2587         (WebCore::OverconstrainedError::create):
2588         (WebCore::OverconstrainedError::constraint):
2589         (WebCore::OverconstrainedError::message):
2590         (WebCore::OverconstrainedError::OverconstrainedError):
2591         * Modules/mediastream/OverconstrainedError.idl: Added.
2592         * WebCore.xcodeproj/project.pbxproj:
2593
2594 2016-08-24  Anders Carlsson  <andersca@apple.com>
2595
2596         Build the platform name dynamically for the phony WebKitLegacy framework
2597         https://bugs.webkit.org/show_bug.cgi?id=161163
2598
2599         Reviewed by Dan Bernstein.
2600
2601         * Configurations/WebKitLegacyStub.iOS.tbd:
2602         * WebCore.xcodeproj/project.pbxproj:
2603
2604 2016-08-24  Chris Dumez  <cdumez@apple.com>
2605
2606         It should not be possible to access Location attributes cross origin
2607         https://bugs.webkit.org/show_bug.cgi?id=161125
2608         <rdar://problem/27982472>
2609
2610         Reviewed by Brent Fulgham.
2611
2612         It should not be possible to access Location attributes cross origin:
2613         - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
2614
2615         We allow access to replace() as per the specification and consistently
2616         with Firefox. The specification seems to indicate we should allow access
2617         to 'href' but Firefox does not and we previously did not so I am not
2618         allowing it in this patch.
2619
2620         Test: http/tests/security/location-cross-origin.html
2621
2622         * bindings/scripts/CodeGeneratorJS.pm:
2623         (GenerateImplementation):
2624         * page/Location.idl:
2625
2626 2016-08-24  Joseph Pecoraro  <pecoraro@apple.com>
2627
2628         Add User Timing to the feature status page
2629         https://bugs.webkit.org/show_bug.cgi?id=161154
2630
2631         Reviewed by Darin Adler.
2632
2633         * features.json:
2634
2635 2016-08-24  Andreas Kling  <akling@apple.com>
2636
2637         Leaks bot hits an assertion in ResourceUsageThread::platformThreadBody
2638         <https://webkit.org/b/160534>
2639
2640         Reviewed by Joseph Pecoraro.
2641
2642         Use the correct malloc bucket when bmalloc is disabled (which is the case on leaks bots.)
2643
2644         * page/cocoa/ResourceUsageThreadCocoa.mm:
2645         (WebCore::ResourceUsageThread::platformThreadBody):
2646
2647 2016-08-24  Filip Pizlo  <fpizlo@apple.com>
2648
2649         Unreviewed, roll out r204901, r204897, r204866, r204856, r204854.
2650
2651         * ForwardingHeaders/heap/HeapInlines.h: Removed.
2652         * ForwardingHeaders/interpreter/Interpreter.h: Added.
2653         * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Removed.
2654         * Modules/indexeddb/IDBCursorWithValue.cpp:
2655         * Modules/indexeddb/client/TransactionOperation.cpp:
2656         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2657         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2658         * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp:
2659         * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp:
2660         * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp:
2661         * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp:
2662         * bindings/js/JSClientRectCustom.cpp:
2663         * bindings/js/JSDOMBinding.cpp:
2664         * bindings/js/JSDOMBinding.h:
2665         * bindings/js/JSDeviceMotionEventCustom.cpp:
2666         * bindings/js/JSDeviceOrientationEventCustom.cpp:
2667         * bindings/js/JSErrorEventCustom.cpp:
2668         * bindings/js/JSIDBCursorWithValueCustom.cpp:
2669         * bindings/js/JSIDBIndexCustom.cpp:
2670         * bindings/js/JSPopStateEventCustom.cpp:
2671         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
2672         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
2673         * bindings/js/WorkerScriptController.cpp:
2674         * contentextensions/ContentExtensionParser.cpp:
2675         * dom/ErrorEvent.cpp:
2676         * html/HTMLCanvasElement.cpp:
2677         * html/MediaDocument.cpp:
2678         * inspector/CommandLineAPIModule.cpp:
2679         * loader/EmptyClients.cpp:
2680         * page/CaptionUserPreferences.cpp:
2681         * page/Frame.cpp:
2682         * page/PageGroup.cpp:
2683         * page/UserContentController.cpp:
2684         * platform/mock/mediasource/MockBox.cpp:
2685         * testing/GCObservation.cpp:
2686
2687 2016-08-24  Zalan Bujtas  <zalan@apple.com>
2688
2689         ASSERTION FAILED: childrenInline() in WebCore::RenderBlockFlow::hasLines
2690         https://bugs.webkit.org/show_bug.cgi?id=139396
2691         <rdar://problem/27704339>
2692
2693         Reviewed by David Hyatt.
2694
2695         RenderBlockFlow::hasLines() should be able to handle the block-children case.
2696
2697         Test: fast/ruby/assert-with-block-rt-child-and-emphasis.html
2698
2699         * rendering/RenderBlock.h:
2700         (WebCore::RenderBlock::hasLines): Deleted.
2701         * rendering/RenderBlockFlow.cpp:
2702         (WebCore::RenderBlockFlow::hasLines):
2703         * rendering/RenderBlockFlow.h:
2704
2705 2016-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2706
2707         Unreviewed. Fix GObject DOM bindings API break after r204624 and r204648.
2708
2709         prefix, namespaceURI and localName attributes were moved from Node to Attr/Element in r204624 and prefix was
2710         also made readonly in r204648.
2711
2712         * bindings/gobject/WebKitDOMDeprecated.cpp:
2713         (webkit_dom_node_get_namespace_uri):
2714         (webkit_dom_node_get_prefix):
2715         (webkit_dom_node_set_prefix):
2716         (webkit_dom_node_get_local_name):
2717         * bindings/gobject/WebKitDOMDeprecated.h:
2718         * bindings/gobject/WebKitDOMDeprecated.symbols:
2719         * bindings/gobject/webkitdom.symbols:
2720
2721 2016-08-23  Simon Fraser  <simon.fraser@apple.com>
2722
2723         Add some logging for WKSelectionDrawingInfo
2724         https://bugs.webkit.org/show_bug.cgi?id=161055
2725
2726         Reviewed by Tim Horton.
2727
2728         Add TextStream dumping for SelectionRect.
2729
2730         * platform/ios/SelectionRect.cpp:
2731         (WebCore::operator<<):
2732         * platform/ios/SelectionRect.h:
2733
2734 2016-08-23  Frederic Wang  <fwang@igalia.com>
2735
2736         More consistent header inclusions in the MathML module
2737         https://bugs.webkit.org/show_bug.cgi?id=161080
2738
2739         Reviewed by Darin Adler.
2740
2741         We adjust header inclusion in the MathML module so that:
2742         - implementation file's own header is outside the #if ENABLE(MATHML)
2743         - There is always a blank line after the #if ENABLE(MATHML)
2744
2745         No new tests, behavior is unchanged.
2746
2747         * mathml/MathMLAnnotationElement.cpp:
2748         * mathml/MathMLAnnotationElement.h:
2749         * mathml/MathMLElement.cpp:
2750         * mathml/MathMLFractionElement.cpp:
2751         * mathml/MathMLFractionElement.h:
2752         * mathml/MathMLMathElement.cpp:
2753         * mathml/MathMLMathElement.h:
2754         * mathml/MathMLMencloseElement.cpp:
2755         * mathml/MathMLMencloseElement.h:
2756         * mathml/MathMLOperatorDictionary.cpp:
2757         * mathml/MathMLOperatorElement.cpp:
2758         * mathml/MathMLOperatorElement.h:
2759         * mathml/MathMLPaddedElement.cpp:
2760         * mathml/MathMLPaddedElement.h:
2761         * mathml/MathMLPresentationElement.cpp:
2762         * mathml/MathMLPresentationElement.h:
2763         * mathml/MathMLRowElement.cpp:
2764         * mathml/MathMLRowElement.h:
2765         * mathml/MathMLScriptsElement.cpp:
2766         * mathml/MathMLScriptsElement.h:
2767         * mathml/MathMLSelectElement.h:
2768         * mathml/MathMLSpaceElement.cpp:
2769         * mathml/MathMLSpaceElement.h:
2770         * mathml/MathMLTokenElement.cpp:
2771         * mathml/MathMLUnderOverElement.cpp:
2772         * mathml/MathMLUnderOverElement.h:
2773         * rendering/mathml/MathMLStyle.cpp:
2774         * rendering/mathml/MathOperator.cpp:
2775         * rendering/mathml/MathOperator.h:
2776         * rendering/mathml/RenderMathMLBlock.cpp:
2777         * rendering/mathml/RenderMathMLFenced.cpp:
2778         * rendering/mathml/RenderMathMLFencedOperator.cpp:
2779         * rendering/mathml/RenderMathMLFraction.cpp:
2780         * rendering/mathml/RenderMathMLMath.cpp:
2781         * rendering/mathml/RenderMathMLMenclose.cpp:
2782         * rendering/mathml/RenderMathMLMenclose.h:
2783         * rendering/mathml/RenderMathMLOperator.cpp:
2784         * rendering/mathml/RenderMathMLRoot.cpp:
2785         * rendering/mathml/RenderMathMLRow.cpp:
2786         * rendering/mathml/RenderMathMLScripts.cpp:
2787         * rendering/mathml/RenderMathMLUnderOver.cpp:
2788
2789 2016-08-23  Zalan Bujtas  <zalan@apple.com>
2790
2791         ASSERTION FAILED: !view().layoutStateEnabled() || style().styleType() == FIRST_LETTER in WebCore::RenderInline::clippedOverflowRectForRepaint
2792         https://bugs.webkit.org/show_bug.cgi?id=155363
2793         <rdar://problem/27720434>
2794
2795         Reviewed by David Hyatt.
2796
2797         Loosen ASSERT to include calls when the inline has a self painting layer. It's valid to end up here during layout when
2798         the layer's composite state changes.
2799
2800         Test: fast/layers/assert-on-self-painting-inline-with-scrolling.html
2801
2802         * rendering/RenderInline.cpp:
2803         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2804
2805 2016-08-23  Anders Carlsson  <andersca@apple.com>
2806
2807         Create a phony WebKitLegacy framework that the WebCoreTestSupport dylib can find
2808         https://bugs.webkit.org/show_bug.cgi?id=161123
2809
2810         Reviewed by Dan Bernstein.
2811
2812         * Configurations/WebCore.xcconfig:
2813         Use the WebKitLegacy.tbd file from the phony framework.
2814
2815         * Configurations/WebCoreTestSupport.xcconfig:
2816         Look for WebKitLegacy.framework in the phony framework path.
2817
2818         * WebCore.xcodeproj/project.pbxproj:
2819         Add a new phase that creates a phony WebKitLegacy framework.
2820
2821 2016-08-23  Chris Dumez  <cdumez@apple.com>
2822
2823         Add support for CanvasRenderingContext2D.resetTransform()
2824         https://bugs.webkit.org/show_bug.cgi?id=161089
2825
2826         Reviewed by Simon Fraser.
2827
2828         Add support for CanvasRenderingContext2D.resetTransform():
2829         - https://html.spec.whatwg.org/#dom-context-2d-resettransform
2830
2831         Firefox and Chrome already support this.
2832
2833         Tests:
2834         imported/blink/fast/canvas/canvas-resetTransform.html
2835         imported/w3c/web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001.html
2836
2837         * html/canvas/CanvasRenderingContext2D.cpp:
2838         (WebCore::CanvasRenderingContext2D::setTransform):
2839         (WebCore::CanvasRenderingContext2D::resetTransform):
2840         * html/canvas/CanvasRenderingContext2D.h:
2841         * html/canvas/CanvasRenderingContext2D.idl:
2842
2843 2016-08-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
2844
2845         REGRESSION: SVG clip-path doesn't work on root <svg>
2846         https://bugs.webkit.org/show_bug.cgi?id=129180
2847
2848         Reviewed by Tim Horton.
2849
2850         Build the resources cache for the RenderSVGRoot element when it's been
2851         inserted in the render tree. Remove the resources cache before removing
2852         the RenderSVGRoot from the render tree. No worries for the child <svg>
2853         elements since their renderers are of type RenderSVGViewportContainer.
2854
2855         Tests: svg/clip-path/clip-path-on-svg-003.svg
2856                svg/clip-path/clip-path-on-svg-004.svg
2857
2858         * rendering/svg/RenderSVGRoot.cpp:
2859         (WebCore::RenderSVGRoot::insertedIntoTree):
2860         (WebCore::RenderSVGRoot::willBeRemovedFromTree):
2861         * rendering/svg/RenderSVGRoot.h:
2862         These changes are very similar to what we do for adding and removing the
2863         child SVG elements in RenderSVGRoot::addChild() and removeChild().
2864
2865 2016-08-23  Chris Dumez  <cdumez@apple.com>
2866
2867         HTMLAreaElement should have a stringifier
2868         https://bugs.webkit.org/show_bug.cgi?id=161105
2869
2870         Reviewed by Geoffrey Garen.
2871
2872         HTMLAreaElement should have a stringifier:
2873         - https://html.spec.whatwg.org/multipage/embedded-content.html#htmlareaelement
2874         - https://html.spec.whatwg.org/multipage/semantics.html#htmlhyperlinkelementutils
2875         - http://heycam.github.io/webidl/#idl-stringifiers
2876         - http://heycam.github.io/webidl/#es-stringifier
2877
2878         Chrome and Firefox already support this.
2879
2880         This patch does the following:
2881         - Add support for stringifier on attributes to our bindings generator.
2882         - Add stringifier to the HTMLHyperlinkElementUtils.href attribute as
2883           per the specification
2884         - Drops the explicit toString on HTMLAnchorElement as HTMLAnchorElement
2885           implements HTMLHyperlinkElementUtils.
2886
2887         Test: fast/dom/toString_attributes.html
2888
2889         * bindings/scripts/CodeGeneratorJS.pm:
2890         (GenerateInterface):
2891         (AddStringifierOperationIfNeeded):
2892         * bindings/scripts/IDLParser.pm:
2893         (parseAttributeOrOperationOrIterator):
2894         * html/HTMLAnchorElement.cpp:
2895         (WebCore::HTMLAnchorElement::toString): Deleted.
2896         * html/HTMLAnchorElement.h:
2897         * html/HTMLAnchorElement.idl:
2898         * html/HTMLHyperlinkElementUtils.idl:
2899
2900 2016-08-23  Alex Christensen  <achristensen@webkit.org>
2901
2902         Fix clean Windows build.
2903
2904         * PlatformWin.cmake:
2905         Add another forwarding headers directory.
2906
2907 2016-08-23  Zalan Bujtas  <zalan@apple.com>
2908
2909         ASSERTION FAILED: hasOverflowingCell == this->hasOverflowingCell() in WebCore::RenderTableSection::computeOverflowFromCells
2910         https://bugs.webkit.org/show_bug.cgi?id=155702
2911         <rdar://problem/27720731>
2912
2913         Reviewed by David Hyatt.
2914
2915         The simplified layout path for table/section should also clear the slow path flag for visual overflow (since it recomputes
2916         the overflow for the descendant cells). 
2917
2918         Test: fast/table/assert-when-visual-overflow-is-cleared.html
2919
2920         * rendering/RenderTableSection.cpp:
2921         (WebCore::RenderTableSection::layout):
2922
2923 2016-08-23  Myles C. Maxfield  <mmaxfield@apple.com>
2924
2925         [Cocoa] Reduce uses of CGFonts
2926         https://bugs.webkit.org/show_bug.cgi?id=160896
2927
2928         Reviewed by Darin Adler.
2929
2930         There are a few places where we unnecessarily use CGFonts instead of
2931         CTFonts. We have had an ongoing effort throughout the past few years
2932         of elliminating all of our uses of CGFonts, and this patch moves us
2933         in that direction.
2934
2935         Most of the changes in this patch are straightforward (e.g.
2936         CGFontGetUnitsPerEm() -> CTFontGetUnitsPerEm()). However, there is
2937         one notable change: from CGContextShowGlyphsWithAdvances() to
2938         CTFontDrawGlyphs(). This migration does not cause a performance
2939         regression.
2940
2941         No new tests because there is no behavior change.
2942
2943         * WebCore.xcodeproj/project.pbxproj: Delete unnecessary
2944         FontServicesIOS files.
2945         * platform/graphics/FontMetrics.h:
2946         (WebCore::FontMetrics::xHeight): Migrate to Optional<float>
2947         (WebCore::FontMetrics::setXHeight):
2948         (WebCore::FontMetrics::hasXHeight):
2949         (WebCore::FontMetrics::hasCapHeight): Ditto.
2950         (WebCore::FontMetrics::floatCapHeight):
2951         (WebCore::FontMetrics::setCapHeight):
2952         (WebCore::FontMetrics::capHeight):
2953         (WebCore::FontMetrics::setZeroWidth): No one ever used the
2954         m_hasZeroWidth variable, so this patch removes it.
2955         (WebCore::FontMetrics::reset):
2956         (WebCore::FontMetrics::FontMetrics): Deleted.
2957         (WebCore::FontMetrics::setHasXHeight): Deleted. No one ever calls
2958         this, so this patch removes it.
2959         (WebCore::FontMetrics::hasZeroWidth): Deleted.
2960         (WebCore::FontMetrics::setHasZeroWidth): Deleted.
2961         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2962         (WebCore::TextMatrixRestorer::TextMatrixRestorer): Rather than leaving
2963         the text matrix stale after using it, this class cleans it up after us.
2964         This means that the text matrix doesn't have to be reset in other places
2965         which draw text.
2966         (WebCore::TextMatrixRestorer::~TextMatrixRestorer):
2967         (WebCore::TextMatrixRestorer::savedMatrix):
2968         (WebCore::showGlyphsWithAdvances): Migrate from
2969         CGContextShowGlyphsWithAdvances() to CTFontDrawGlyphs()
2970         (WebCore::FontCascade::drawGlyphs): See above comment about the text
2971         matrix.
2972         (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
2973         (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
2974         * platform/graphics/cocoa/FontCocoa.mm:
2975         (WebCore::shouldUseAdjustment): Taken from FontServicesIOS.
2976         (WebCore::Font::platformInit): Migrate from CG to CT for some direct
2977         replacement API calls.
2978         (WebCore::Font::platformCharWidthInit): Ditto.
2979         (WebCore::Font::determinePitch): Ditto.
2980         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2981         (WebCore::FontPlatformData::openTypeTable): Ditto.
2982         (WebCore::FontPlatformData::description): Ditto.
2983         * platform/graphics/ios/FontServicesIOS.h: Removed. No longer needed
2984         after migrating from CGContextShowGlyphsWithAdvances() to
2985         CTFontDrawGlyphs().
2986         (WebCore::FontServicesIOS::ascent): Deleted.
2987         (WebCore::FontServicesIOS::descent): Deleted.
2988         (WebCore::FontServicesIOS::lineGap): Deleted.
2989         (WebCore::FontServicesIOS::lineSpacing): Deleted.
2990         (WebCore::FontServicesIOS::xHeight): Deleted.
2991         (WebCore::FontServicesIOS::capHeight): Deleted.
2992         (WebCore::FontServicesIOS::unitsPerEm): Deleted.
2993         * platform/graphics/ios/FontServicesIOS.mm: Removed. Moved into
2994         Font::platformInit().
2995         (WebCore::shouldUseAdjustment): Deleted.
2996         (WebCore::isCourier): Deleted.
2997         (WebCore::FontServicesIOS::FontServicesIOS): Deleted.
2998         * platform/graphics/opentype/OpenTypeCG.cpp:
2999         (WebCore::OpenType::tryGetTypoMetrics): Migrate from CG to CT for some
3000         direct replacement API calls.
3001         * platform/graphics/opentype/OpenTypeCG.h: Ditto.
3002         * platform/graphics/win/FontCGWin.cpp:
3003         (WebCore::FontCascade::drawGlyphs): Restore the text matrix.
3004         * platform/graphics/win/SimpleFontDataCGWin.cpp:
3005         (WebCore::Font::platformWidthForGlyph): Deleted.
3006         * platform/spi/cg/CoreGraphicsSPI.h:
3007         * platform/spi/cocoa/CoreTextSPI.h:
3008         * rendering/RenderThemeIOS.mm:
3009         (WebCore::paintAttachmentText): Deleted.
3010         * rendering/RenderThemeMac.mm:
3011         (WebCore::paintAttachmentTitle): Deleted.
3012         (WebCore::paintAttachmentSubtitle): Deleted.
3013
3014 2016-08-23  Alex Christensen  <achristensen@webkit.org>
3015
3016         Fix CMake build after r204852.
3017
3018         * CMakeLists.txt:
3019         There were some non-ASCII characters here causing problems.
3020
3021 2016-08-22  Filip Pizlo  <fpizlo@apple.com>
3022
3023         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
3024         https://bugs.webkit.org/show_bug.cgi?id=160125
3025
3026         Reviewed by Geoffrey Garen.
3027
3028         No new tests because no new WebCore behavior.
3029         
3030         Just rewiring #includes.
3031
3032         * ForwardingHeaders/heap/HeapInlines.h: Added.
3033         * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Added.
3034         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3035         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3036         * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp:
3037         * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp:
3038         * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp:
3039         * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp:
3040         * bindings/js/JSClientRectCustom.cpp:
3041         * bindings/js/JSDOMBinding.h:
3042         * bindings/js/JSDOMStringListCustom.cpp:
3043         * bindings/js/JSErrorEventCustom.cpp:
3044         * bindings/js/JSPopStateEventCustom.cpp:
3045         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
3046         * contentextensions/ContentExtensionParser.cpp:
3047         * dom/ErrorEvent.cpp:
3048         * inspector/CommandLineAPIModule.cpp:
3049         * testing/GCObservation.cpp:
3050         (WebCore::GCObservation::GCObservation):
3051
3052 2016-08-23  Brady Eidson  <beidson@apple.com>
3053
3054         WK2 Gamepad layout test support.
3055         https://bugs.webkit.org/show_bug.cgi?id=134671
3056
3057         Reviewed by Alex Christensen.
3058
3059         No new tests (Covered by changes to existing tests).
3060
3061         Add a MockGamepadProvider and expose it in WebCoreTestSupport.
3062         
3063         * CMakeLists.txt:
3064         * WebCore.xcodeproj/project.pbxproj:
3065
3066         * Modules/gamepad/Gamepad.cpp:
3067         (WebCore::Gamepad::Gamepad):
3068
3069         * bindings/generic/RuntimeEnabledFeatures.cpp:
3070         (WebCore::RuntimeEnabledFeatures::reset): Deleted. Gamepads should either always be enabled during tests
3071           (As in Mac WK2), or never enabled (As in all other platforms).
3072         * bindings/generic/RuntimeEnabledFeatures.h:
3073
3074         * platform/gamepad/GamepadProvider.h:
3075         (WebCore::GamepadProvider::isMockGamepadProvider):
3076
3077         * testing/MockGamepad.cpp: Copied from Source/WebKit2/Shared/Gamepad/GamepadData.cpp.
3078         (WebCore::MockGamepad::MockGamepad):
3079         (WebCore::MockGamepad::updateDetails):
3080         (WebCore::MockGamepad::setAxisValue):
3081         (WebCore::MockGamepad::setButtonValue):
3082         * testing/MockGamepad.h: Copied from Source/WebKit2/UIProcess/Gamepad/UIGamepad.h.
3083
3084         * testing/MockGamepadProvider.cpp: Added.
3085         (WebCore::MockGamepadProvider::singleton):
3086         (WebCore::MockGamepadProvider::MockGamepadProvider):
3087         (WebCore::MockGamepadProvider::startMonitoringGamepads):
3088         (WebCore::MockGamepadProvider::stopMonitoringGamepads):
3089         (WebCore::MockGamepadProvider::setMockGamepadDetails):
3090         (WebCore::MockGamepadProvider::connectMockGamepad):
3091         (WebCore::MockGamepadProvider::disconnectMockGamepad):
3092         (WebCore::MockGamepadProvider::setMockGamepadAxisValue):
3093         (WebCore::MockGamepadProvider::setMockGamepadButtonValue):
3094         (WebCore::MockGamepadProvider::gamepadInputActivity):
3095
3096         * testing/MockGamepadProvider.h: Copied from Source/WebKit2/WebProcess/Gamepad/WebGamepadProvider.h.
3097         (WebCore::MockGamepadProvider::~MockGamepadProvider):
3098
3099         * testing/js/WebCoreTestSupport.cpp:
3100         (WebCoreTestSupport::installMockGamepadProvider):
3101         (WebCoreTestSupport::connectMockGamepad):
3102         (WebCoreTestSupport::disconnectMockGamepad):
3103         (WebCoreTestSupport::setMockGamepadDetails):
3104         (WebCoreTestSupport::setMockGamepadAxisValue):
3105         (WebCoreTestSupport::setMockGamepadButtonValue):
3106         * testing/js/WebCoreTestSupport.h:
3107
3108 2016-08-23  Dave Hyatt  <hyatt@apple.com>
3109
3110         Add pref for enabling new CSS parsing and move parser files into subdirectory.
3111         https://bugs.webkit.org/show_bug.cgi?id=161095
3112
3113         Reviewed by Sam Weinig.
3114
3115         * CMakeLists.txt:
3116         * WebCore.xcodeproj/project.pbxproj:
3117         * css/CSSParser.cpp: Removed.
3118         * css/CSSParser.h: Removed.
3119         * css/CSSParserMode.h: Removed.
3120         * css/CSSParserValues.cpp: Removed.
3121         * css/CSSParserValues.h: Removed.
3122         * css/SVGCSSParser.cpp: Removed.
3123         * css/parser: Added.
3124         * css/parser/CSSParser.cpp: Copied from css/CSSParser.cpp.
3125         * css/parser/CSSParser.h: Copied from css/CSSParser.h.
3126         * css/parser/CSSParserMode.h: Copied from css/CSSParserMode.h.
3127         * css/parser/CSSParserValues.cpp: Copied from css/CSSParserValues.cpp.
3128         * css/parser/CSSParserValues.h: Copied from css/CSSParserValues.h.
3129         * css/parser/SVGCSSParser.cpp: Copied from css/SVGCSSParser.cpp.
3130         * page/Settings.in:
3131
3132 2016-08-23  Eric Carlson  <eric.carlson@apple.com>
3133
3134         [MediaStream] Templatize MediaConstraint
3135         https://bugs.webkit.org/show_bug.cgi?id=161092
3136
3137         Reviewed by Jer Noble.
3138
3139         No new tests, no functional change.
3140
3141         * platform/mediastream/MediaConstraints.cpp:
3142         (WebCore::BooleanConstraint::getExact):
3143         (WebCore::BooleanConstraint::getIdeal):
3144         (WebCore::MediaConstraint::getMin): Deleted.
3145         (WebCore::MediaConstraint::getMax): Deleted.
3146         (WebCore::MediaConstraint::getExact): Deleted.
3147         (WebCore::MediaConstraint::getIdeal): Deleted.
3148         (WebCore::IntConstraint::create): Deleted.
3149         (WebCore::IntConstraint::setMin): Deleted.
3150         (WebCore::IntConstraint::setMax): Deleted.
3151         (WebCore::IntConstraint::setExact): Deleted.
3152         (WebCore::IntConstraint::setIdeal): Deleted.
3153         (WebCore::IntConstraint::getMin): Deleted.
3154         (WebCore::IntConstraint::getMax): Deleted.
3155         (WebCore::IntConstraint::getExact): Deleted.
3156         (WebCore::IntConstraint::getIdeal): Deleted.
3157         (WebCore::DoubleConstraint::create): Deleted.
3158         (WebCore::DoubleConstraint::setMin): Deleted.
3159         (WebCore::DoubleConstraint::setMax): Deleted.
3160         (WebCore::DoubleConstraint::setExact): Deleted.
3161         (WebCore::DoubleConstraint::setIdeal): Deleted.
3162         (WebCore::DoubleConstraint::getMin): Deleted.
3163         (WebCore::DoubleConstraint::getMax): Deleted.
3164         (WebCore::DoubleConstraint::getExact): Deleted.
3165         (WebCore::DoubleConstraint::getIdeal): Deleted.
3166         (WebCore::BooleanConstraint::create): Deleted.
3167         (WebCore::BooleanConstraint::setExact): Deleted.
3168         (WebCore::BooleanConstraint::setIdeal): Deleted.
3169         (WebCore::StringConstraint::create): Deleted.
3170         * platform/mediastream/MediaConstraints.h:
3171         (WebCore::MediaConstraint::getMin):
3172         (WebCore::MediaConstraint::getMax):
3173         (WebCore::MediaConstraint::getExact):
3174         (WebCore::MediaConstraint::getIdeal):
3175         (WebCore::NumericConstraint::setMin):
3176         (WebCore::NumericConstraint::setMax):
3177         (WebCore::NumericConstraint::setExact):
3178         (WebCore::NumericConstraint::setIdeal):
3179         (WebCore::NumericConstraint::setHasMin): Deleted.
3180         (WebCore::NumericConstraint::setHasMax): Deleted.
3181         (WebCore::NumericConstraint::setHasExact): Deleted.
3182         (WebCore::NumericConstraint::setHasIdeal): Deleted.
3183         (WebCore::NumericConstraint::hasMin): Deleted.
3184         (WebCore::NumericConstraint::hasMax): Deleted.
3185         (WebCore::NumericConstraint::hasExact): Deleted.
3186         (WebCore::NumericConstraint::hasIdeal): Deleted.
3187
3188 2016-08-23  Anders Carlsson  <andersca@apple.com>
3189
3190         Add a workaround for iOS Frameworks that expect DOM bindings to be in WebCore
3191         https://bugs.webkit.org/show_bug.cgi?id=161093
3192
3193         Reviewed by Dan Bernstein.
3194
3195         Create a text-based stub library that looks enough like WebKitLegacy that we can trick the linker
3196         into creating a LC_REEXPORT_DYLIB load command in WebCore.
3197
3198         * Configurations/WebCore.xcconfig:
3199         Link against this WebKitLegacyStub tbd file on iOS 9.0, 9.3 and 10.0.
3200
3201         * Configurations/WebKitLegacyStub.iOS.tbd:
3202         Add new tbd file.
3203
3204         * WebCore.xcodeproj/project.pbxproj:
3205         Add new files.
3206
3207 2016-08-23  Chris Dumez  <cdumez@apple.com>
3208
3209         CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
3210         https://bugs.webkit.org/show_bug.cgi?id=161054
3211
3212         Reviewed by Ryosuke Niwa.
3213
3214         CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
3215         as per:
3216         - https://html.spec.whatwg.org/multipage/scripting.html#canvasrenderingcontext2d
3217
3218         Firefox and Chrome agree with the specification.
3219
3220         No new tests, rebaselined existing test.
3221
3222         * CMakeLists.txt:
3223         * DerivedSources.cpp:
3224         * DerivedSources.make:
3225         * WebCore.xcodeproj/project.pbxproj:
3226         * bindings/js/JSBindingsAllInOne.cpp:
3227         * bindings/js/JSCanvasRenderingContext.h: Renamed from Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp.
3228         (WebCore::toJS):
3229         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3230         (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
3231         (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
3232         * bindings/js/JSDocumentCustom.cpp:
3233         (WebCore::JSDocument::getCSSCanvasContext):
3234         (WebCore::JSDocument::createTouchList): Deleted.
3235         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3236         * bindings/scripts/CodeGeneratorJS.pm:
3237         (GenerateImplementation):
3238         * dom/Document.idl:
3239         * html/canvas/CanvasRenderingContext.idl: Removed.
3240         * html/canvas/CanvasRenderingContext2D.idl:
3241         * html/canvas/WebGL2RenderingContext.idl:
3242         * html/canvas/WebGLRenderingContext.idl:
3243         * html/canvas/WebGLRenderingContextBase.idl:
3244
3245 2016-08-03  Frederic Wang  <fwang@igalia.com>
3246
3247         Share and improve extraction of character for operator and token elements
3248         https://bugs.webkit.org/show_bug.cgi?id=160462
3249
3250         Reviewed by Darin Adler.
3251
3252         No new tests, already covered by existing tests.
3253
3254         * mathml/MathMLElement.cpp:
3255         (WebCore::MathMLElement::stripLeadingAndTrailingWhitespace): Make this a protected member of
3256         MathMLElement so that it can be used in MathMLTokenElement.
3257         (WebCore::skipLeadingAndTrailingWhitespace): Deleted.
3258         * mathml/MathMLElement.h: Declare stripLeadingAndTrailingWhitespace.
3259         * mathml/MathMLOperatorElement.cpp:
3260         (WebCore::MathMLOperatorElement::parseOperatorChar): Use convertToSingleCodePoint to extract
3261         a code point more efficiently. For now, we continue to only handle BMP characters.
3262         * mathml/MathMLTokenElement.cpp:
3263         (WebCore::MathMLTokenElement::convertToSingleCodePoint): Helper function to try and convert a
3264         string to a single code point after having removed leading and trailing space.
3265         * mathml/MathMLTokenElement.h: Declare convertToSingleCodePoint.
3266         * rendering/mathml/RenderMathMLToken.cpp:
3267         (WebCore::RenderMathMLToken::updateMathVariantGlyph): Use convertToSingleCodePoint to extract
3268         a code point more efficiently.
3269
3270 2016-08-23  Frederic Wang  <fwang@igalia.com>
3271
3272         Rename MathMLInlineContainerElement to MathMLPresentationElement
3273         https://bugs.webkit.org/show_bug.cgi?id=161053
3274
3275         Reviewed by Manuel Rego Casasnovas.
3276
3277         MathMLInlineContainerElement sounds a bad name for something that is now going to produce
3278         RenderMathMLBlocks. MathML has two kinds of markup (presentation MathML and content MathML).
3279         We only implement presentation MathML and most of the MathML elements are currently
3280         implemented as MathMLInlineContainerElement. Hence we rename MathMLInlineContainerElement
3281         to MathMLPresentationElement and will move more code from MathMLElement into that new class
3282         in follow-up bugs. Also, other elements in the MathML namespace could be handled by a
3283         separate MathMLUnknownElement class for consistency with SVG and HTML classes.
3284
3285         No new tests, behavior is unchanged.
3286
3287         * CMakeLists.txt: Rename MathMLInlineContainerElement to MathMLPresentationElement.
3288         * WebCore.xcodeproj/project.pbxproj: Ditto.
3289         * mathml/MathMLAllInOne.cpp: Ditto.
3290         * mathml/MathMLFractionElement.cpp: Ditto.
3291         * mathml/MathMLFractionElement.h: Ditto.
3292         * mathml/MathMLPresentationElement.cpp: Ditto.
3293         * mathml/MathMLPresentationElement.h: Ditto.
3294         * mathml/MathMLRowElement.cpp: Ditto.
3295         * mathml/MathMLRowElement.h: Ditto.
3296         * mathml/MathMLScriptsElement.cpp: Ditto.
3297         * mathml/MathMLScriptsElement.h: Ditto.
3298         * mathml/mathtags.in: Ditto.
3299         * rendering/mathml/RenderMathMLFraction.h: Remove useless include.
3300
3301 2016-08-23  Youenn Fablet  <youenn@apple.com>
3302
3303         Implement redirect support post CORS-preflight
3304         https://bugs.webkit.org/show_bug.cgi?id=159056
3305
3306         Reviewed by Alex Christensen.
3307
3308         Tests: imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-preflight-worker.html
3309                imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-preflight.html
3310         Covered also by rebased tests.
3311
3312         Enabling to follow cross-origin redirections for not-simple requests, through preflight checks.
3313         Making sure that same-origin redirections to cross-origin resources use preflight if they are not simple.
3314
3315         * loader/DocumentThreadableLoader.cpp:
3316         (WebCore::DocumentThreadableLoader::redirectReceived):
3317
3318 2016-08-23  Frederic Wang  <fred.wang@free.fr>
3319
3320         Introduce a MathMLRowElement class for mrow-like elements
3321         https://bugs.webkit.org/show_bug.cgi?id=161050
3322
3323         Reviewed by Darin Adler.
3324
3325         We introduce a MathMLRowElement class for elements creating RenderMathMLRow renderers.
3326         We also force constructors of the corresponding renderer classes to accept MathMLRowElement.
3327         It's not clear whether semantics-xml really needs to create RenderMathMLRow but for now
3328         we make MathMLAnnotationElement inherits from MathMLRowElement to preserve that behavior.
3329
3330         No new tests, behavior is unchanged.
3331
3332         * CMakeLists.txt: Add MathMLRowElement files.
3333         * WebCore.xcodeproj/project.pbxproj: Ditto.
3334         * mathml/MathMLAllInOne.cpp: Ditto.
3335         * mathml/MathMLInlineContainerElement.cpp: Remove unused headers.
3336         (WebCore::MathMLInlineContainerElement::createElementRenderer): Handle some mrow-like
3337         elements in the MathMLRowElement class.
3338         (WebCore::MathMLInlineContainerElement::acceptsDisplayStyleAttribute): Ditto.
3339         (WebCore::MathMLInlineContainerElement::childrenChanged): Deleted. We only need to calculate
3340         the form for operators inside a MathMLRowElement.
3341         (WebCore::MathMLInlineContainerElement::acceptsMathVariantAttribute): Deleted. mstyle is
3342         handled in the MathMLRowElement class.
3343         * mathml/MathMLInlineContainerElement.h: Update function declarations.
3344         * mathml/MathMLMathElement.cpp: Make this class inherits from MathMLRowElement.
3345         * mathml/MathMLMathElement.h: Ditto.
3346         * mathml/MathMLPaddedElement.cpp: Ditto.
3347         * mathml/MathMLPaddedElement.h: Ditto.
3348         * mathml/MathMLSelectElement.cpp: Ditto.
3349         * mathml/MathMLSelectElement.h: Ditto.
3350         * mathml/MathMLAnnotationElement.cpp: Ditto.
3351         * mathml/MathMLAnnotationElement.h: Ditto.
3352         * mathml/MathMLRowElement.cpp: New class for mrow-like element.
3353         (WebCore::MathMLRowElement::MathMLRowElement):
3354         (WebCore::MathMLRowElement::create):
3355         (WebCore::MathMLRowElement::childrenChanged): Move code from MathMLInlineContainerElement.
3356         (WebCore::MathMLRowElement::createElementRenderer): Ditto.
3357         (WebCore::MathMLRowElement::acceptsDisplayStyleAttribute): Ditto.
3358         (WebCore::MathMLRowElement::acceptsMathVariantAttribute): Ditto.
3359         * mathml/MathMLRowElement.h:
3360         * mathml/mathtags.in: Map tags creating RenderMathMLRow renderers to MathMLRowElement.
3361         * rendering/mathml/RenderMathMLFenced.cpp: Force the constructor to take MathMLRowElement.
3362         * rendering/mathml/RenderMathMLFenced.h: Ditto.
3363         * rendering/mathml/RenderMathMLMath.cpp: Ditto.
3364         * rendering/mathml/RenderMathMLMath.h: Ditto.
3365         * rendering/mathml/RenderMathMLMenclose.cpp: Force the constructor to take MathMLMencloseElement.
3366         * rendering/mathml/RenderMathMLMenclose.h: Ditto.
3367         * rendering/mathml/RenderMathMLRoot.cpp: Force the constructor to take MathMLRowElement.
3368         * rendering/mathml/RenderMathMLRoot.h: Ditto.
3369         * rendering/mathml/RenderMathMLRow.cpp: Ditto and add an helper function element() to
3370         retrieve the MathMLRowElement.
3371         * rendering/mathml/RenderMathMLRow.h: Ditto.
3372
3373 2016-08-22  Chris Dumez  <cdumez@apple.com>
3374
3375         Drop TextTrackCue's constructor as per the latest specification
3376         https://bugs.webkit.org/show_bug.cgi?id=161061
3377
3378         Reviewed by Alex Christensen.
3379
3380         Drop TextTrackCue's constructor as per the latest specification:
3381         - https://html.spec.whatwg.org/#texttrackcue
3382
3383         Firefox and Chrome do not have this constructor. Web Authors
3384         are supposed to use the VTTCue constructor instead.
3385
3386         No new tests, rebaselined existing tests.
3387
3388         * html/track/TextTrackCue.cpp:
3389         (WebCore::TextTrackCue::TextTrackCue): Deleted.
3390         * html/track/TextTrackCue.h:
3391         (WebCore::TextTrackCue::cueShadowPseudoId): Deleted.
3392         * html/track/TextTrackCue.idl:
3393
3394 2016-08-22  Chris Dumez  <cdumez@apple.com>
3395
3396         Unreviewed, rolling out r204745.
3397
3398         Broke the Windows build
3399
3400         Reverted changeset:
3401
3402         "CanvasRenderingContext2D should not have a
3403         CanvasRenderingContext parent interface"
3404         https://bugs.webkit.org/show_bug.cgi?id=161054
3405         http://trac.webkit.org/changeset/204745
3406
3407 2016-08-22  Chris Dumez  <cdumez@apple.com>
3408
3409         CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
3410         https://bugs.webkit.org/show_bug.cgi?id=161054
3411
3412         Reviewed by Ryosuke Niwa.
3413
3414         CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
3415         as per:
3416         - https://html.spec.whatwg.org/multipage/scripting.html#canvasrenderingcontext2d
3417
3418         Firefox and Chrome agree with the specification.
3419
3420         No new tests, rebaselined existing test.
3421
3422         * CMakeLists.txt:
3423         * DerivedSources.cpp:
3424         * DerivedSources.make:
3425         * WebCore.xcodeproj/project.pbxproj:
3426         * bindings/js/JSBindingsAllInOne.cpp:
3427         * bindings/js/JSCanvasRenderingContext.h: Renamed from Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp.
3428         (WebCore::toJS):
3429         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3430         (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
3431         (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
3432         * bindings/js/JSDocumentCustom.cpp:
3433         (WebCore::JSDocument::getCSSCanvasContext):
3434         (WebCore::JSDocument::createTouchList): Deleted.
3435         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3436         * bindings/scripts/CodeGeneratorJS.pm:
3437         (GenerateImplementation):
3438         * dom/Document.idl:
3439         * html/canvas/CanvasRenderingContext.idl: Removed.
3440         * html/canvas/CanvasRenderingContext2D.idl:
3441         * html/canvas/WebGL2RenderingContext.idl:
3442         * html/canvas/WebGLRenderingContext.idl:
3443         * html/canvas/WebGLRenderingContextBase.idl:
3444
3445 2016-08-22  Johan K. Jensen  <johan_jensen@apple.com>
3446
3447         Make NetworkLoadTiming use double for higher precision in Resource Timing
3448         https://bugs.webkit.org/show_bug.cgi?id=161051
3449
3450         Reviewed by Alex Christensen.
3451
3452         Test: http/tests/misc/resource-timing-resolution.html
3453
3454         * page/Performance.h: