Reduce size of internal windows build output
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-03-01  Alex Christensen  <achristensen@webkit.org>
2
3         Reduce size of internal windows build output
4         https://bugs.webkit.org/show_bug.cgi?id=154763
5
6         Reviewed by Brent Fulgham.
7
8         * WebCore.vcxproj/WebCore.proj:
9
10 2016-03-01  Andreas Kling  <akling@apple.com>
11
12         REGRESSION (r154616): Accelerated drawing is off during the initial load
13         <https://webkit.org/b/123812>
14
15         Reviewed by Tim Horton.
16
17         Robustify the hey-the-Settings-changed callbacks in Page to handle document-less frames.
18         This is needed because now Settings are changed even before the main Frame has a Document.
19
20         * page/Page.cpp:
21         (WebCore::networkStateChanged):
22         (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
23         (WebCore::Page::takeAnyMediaCanStartListener):
24         (WebCore::Page::setMediaVolume):
25         (WebCore::Page::setPageScaleFactor):
26         (WebCore::Page::invalidateStylesForAllLinks):
27         (WebCore::Page::invalidateStylesForLink):
28         (WebCore::Page::dnsPrefetchingStateChanged):
29         (WebCore::Page::storageBlockingStateChanged):
30         (WebCore::Page::setMuted):
31         (WebCore::Page::captionPreferencesChanged):
32         (WebCore::Page::setSessionID):
33         (WebCore::Page::setPlaybackTarget):
34         (WebCore::Page::playbackTargetAvailabilityDidChange):
35         (WebCore::Page::setShouldPlayToPlaybackTarget):
36         * page/Settings.cpp:
37         (WebCore::setImageLoadingSettings):
38
39 2016-03-01  Commit Queue  <commit-queue@webkit.org>
40
41         Unreviewed, rolling out r197056.
42         https://bugs.webkit.org/show_bug.cgi?id=154870
43
44         broke win ews (Requested by alexchristensen on #webkit).
45
46         Reverted changeset:
47
48         "[cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK."
49         https://bugs.webkit.org/show_bug.cgi?id=154651
50         http://trac.webkit.org/changeset/197056
51
52 2016-03-01  Brady Eidson  <beidson@apple.com>
53
54         Modern IDB: Possible crash deallocating IDBDatabaseInfo/IDBObjectStoreInfo/IDBIndexInfo.
55         https://bugs.webkit.org/show_bug.cgi?id=154860
56
57         Reviewed by Alex Christensen.
58
59         Covered by existing tests.
60
61         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
62         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
63         (WebCore::IDBDatabaseInfo::isolatedCopy):
64         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
65
66         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
67         (WebCore::IDBTransactionInfo::isolatedCopy): If there's an IDBDatabaseInfo to copy,  that
68           copy needs to be isolated.
69
70 2016-03-01  Tim Horton  <timothy_horton@apple.com>
71
72         Expose MediaElement and VideoElement to the Objective-C DOM bindings
73         https://bugs.webkit.org/show_bug.cgi?id=154830
74
75         Reviewed by Sam Weinig.
76
77         * Modules/mediasession/HTMLMediaElementMediaSession.idl:
78         * Modules/mediastream/HTMLMediaElementMediaStream.idl:
79         * html/HTMLMediaElement.idl:
80         * html/HTMLVideoElement.idl:
81         Avoid Objective-C bindings for various extraneous bits, like MediaSource and MediaSession,
82         to avoid exposing way more than we need to.
83
84         * WebCore.xcodeproj/project.pbxproj:
85         Add a bunch of Derived Sources.
86
87 2016-03-01  Antti Koivisto  <antti@apple.com>
88
89         Text control shadow element style shouldn't depend on renderers
90         https://bugs.webkit.org/show_bug.cgi?id=154855
91
92         Reviewed by Andreas Kling.
93
94         Currently the code for computing style for text control shadow elements lives in render tree.
95         Style is the input for building a render tree and should be computable without having one.
96
97         Fix by moving virtual createInnerTextStyle() from RenderTextControl hierarchy to the DOM side
98         HTMLTextFormControlElement hierarchy.
99
100         * dom/Element.cpp:
101         (WebCore::Element::didDetachRenderers):
102         (WebCore::Element::customStyleForRenderer):
103
104             Also pass shadow host style as it is needed for text controls.
105
106         * dom/Element.h:
107         * dom/PseudoElement.cpp:
108         (WebCore::PseudoElement::clearHostElement):
109         (WebCore::PseudoElement::customStyleForRenderer):
110         * dom/PseudoElement.h:
111         * html/HTMLInputElement.cpp:
112         (WebCore::HTMLInputElement::setRangeText):
113         (WebCore::HTMLInputElement::createInnerTextStyle):
114         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
115         * html/HTMLInputElement.h:
116         * html/HTMLTextAreaElement.cpp:
117         (WebCore::HTMLTextAreaElement::willRespondToMouseClickEvents):
118         (WebCore::HTMLTextAreaElement::createInnerTextStyle):
119         * html/HTMLTextAreaElement.h:
120         * html/HTMLTextFormControlElement.cpp:
121         (WebCore::HTMLTextFormControlElement::directionForFormData):
122         (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle):
123         * html/HTMLTextFormControlElement.h:
124         (WebCore::HTMLTextFormControlElement::cachedSelectionDirection):
125         * html/shadow/TextControlInnerElements.cpp:
126         (WebCore::TextControlInnerElement::create):
127         (WebCore::TextControlInnerElement::customStyleForRenderer):
128         (WebCore::TextControlInnerTextElement::renderer):
129         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
130         * html/shadow/TextControlInnerElements.h:
131         * rendering/RenderTextControl.cpp:
132         (WebCore::RenderTextControl::styleDidChange):
133         (WebCore::RenderTextControl::textBlockLogicalHeight):
134         (WebCore::RenderTextControl::adjustInnerTextStyle): Deleted.
135         * rendering/RenderTextControl.h:
136         * rendering/RenderTextControlMultiLine.cpp:
137         (WebCore::RenderTextControlMultiLine::baselinePosition):
138         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
139         (WebCore::RenderTextControlMultiLine::createInnerTextStyle): Deleted.
140
141             createInnerTextStyle moves to HTMLTextAreaElement::createInnerTextStyle
142
143         * rendering/RenderTextControlMultiLine.h:
144         * rendering/RenderTextControlSingleLine.cpp:
145         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
146
147             Remove m_desiredInnerTextLogicalHeight cache. It doesn't work, it is never valid when hit.
148
149         (WebCore::RenderTextControlSingleLine::layout):
150         (WebCore::RenderTextControlSingleLine::styleDidChange):
151         (WebCore::RenderTextControlSingleLine::computeControlLogicalHeight):
152         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
153         (WebCore::RenderTextControlSingleLine::createInnerTextStyle): Deleted.
154         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): Deleted.
155
156             - createInnerTextStyle moves to HTMLInputElement::createInnerTextStyle
157             - createInnerBlockStyle moves to TextControlInnerElement::customStyleForRenderer
158
159         * rendering/RenderTextControlSingleLine.h:
160         (WebCore::RenderTextControlSingleLine::centerContainerIfNeeded):
161         (WebCore::RenderTextControlSingleLine::containerElement):
162         * style/StyleTreeResolver.cpp:
163         (WebCore::Style::TreeResolver::styleForElement):
164         * svg/SVGElement.cpp:
165         (WebCore::SVGElement::synchronizeSystemLanguage):
166         (WebCore::SVGElement::customStyleForRenderer):
167         * svg/SVGElement.h:
168
169 2016-03-01  Manuel Rego Casasnovas  <rego@igalia.com>
170
171         [css-grid] Get rid of GridResolvedPosition
172         https://bugs.webkit.org/show_bug.cgi?id=154818
173
174         Reviewed by Darin Adler.
175
176         GridResolvedPosition was a small class just wrapping a unsigned.
177         In the future it should actually wrap an integer,
178         as we want to support implicit tracks before the explicit grid.
179
180         The class itself is not providing any benefit,
181         so we can get rid of it and store directly 2 unsigned in GridSpan.
182
183         This will make simpler future changes related to this task.
184
185         We keep the class just as a utility for the methods
186         that deal with the positions resolution.
187         But it should be renamed in a follow-up patch.
188
189         No new tests, no change of behavior.
190
191         * css/CSSGridTemplateAreasValue.cpp:
192         (WebCore::stringForPosition):
193         * css/CSSParser.cpp:
194         (WebCore::CSSParser::parseGridTemplateAreasRow):
195         * css/StyleBuilderConverter.h:
196         (WebCore::StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea):
197         * rendering/RenderGrid.cpp:
198         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
199         (WebCore::RenderGrid::findFlexFactorUnitSize):
200         (WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
201         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
202         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
203         (WebCore::RenderGrid::insertItemIntoGrid):
204         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
205         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
206         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
207         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
208         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
209         (WebCore::RenderGrid::gridAreaBreadthForChild):
210         (WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
211         (WebCore::RenderGrid::columnAxisOffsetForChild):
212         (WebCore::RenderGrid::rowAxisOffsetForChild):
213         * rendering/style/GridCoordinate.h:
214         (WebCore::GridSpan::definiteGridSpan):
215         (WebCore::GridSpan::integerSpan):
216         (WebCore::GridSpan::resolvedInitialPosition):
217         (WebCore::GridSpan::resolvedFinalPosition):
218         (WebCore::GridSpan::GridSpanIterator::GridSpanIterator):
219         (WebCore::GridSpan::GridSpanIterator::operator*):
220         (WebCore::GridSpan::GridSpanIterator::operator++):
221         (WebCore::GridSpan::GridSpanIterator::operator!=):
222         (WebCore::GridSpan::begin):
223         (WebCore::GridSpan::end):
224         (WebCore::GridSpan::GridSpan):
225         * rendering/style/GridResolvedPosition.cpp:
226         (WebCore::resolveNamedGridLinePositionFromStyle):
227         (WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
228         (WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
229         (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
230         (WebCore::resolveGridPositionAgainstOppositePosition):
231         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
232         (WebCore::resolveGridPositionFromStyle):
233         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
234         * rendering/style/GridResolvedPosition.h:
235         (WebCore::GridResolvedPosition::GridResolvedPosition): Deleted.
236         (WebCore::GridResolvedPosition::operator*): Deleted.
237         (WebCore::GridResolvedPosition::operator++): Deleted.
238         (WebCore::GridResolvedPosition::operator==): Deleted.
239         (WebCore::GridResolvedPosition::operator!=): Deleted.
240         (WebCore::GridResolvedPosition::operator<): Deleted.
241         (WebCore::GridResolvedPosition::operator>): Deleted.
242         (WebCore::GridResolvedPosition::operator<=): Deleted.
243         (WebCore::GridResolvedPosition::operator>=): Deleted.
244         (WebCore::GridResolvedPosition::toInt): Deleted.
245         (WebCore::GridResolvedPosition::next): Deleted.
246         (WebCore::GridResolvedPosition::prev): Deleted.
247
248 2016-03-01  Andreas Kling  <akling@apple.com>
249
250         MemoryCache::forEachResource() should guard resources across function invocation.
251         <https://webkit.org/b/154846>
252
253         Reviewed by Antti Koivisto.
254
255         It occurred to me that we should protect the CachedResources from being
256         deleted while invoking the custom function here, lest we create a giant footgun.
257
258         * loader/cache/MemoryCache.cpp:
259         (WebCore::MemoryCache::forEachResource):
260
261 2016-03-01  Csaba Osztrogonác  <ossy@webkit.org>
262
263         [Mac][cmake] One more unreviewed speculative buildfix after r197375. Just for fun.
264
265         * PlatformMac.cmake:
266
267 2016-03-01  Csaba Osztrogonác  <ossy@webkit.org>
268
269         [Mac][cmake] Unreviewed speculative buildfix after r197375. Just for fun.
270
271         * PlatformMac.cmake:
272
273 2016-03-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
274
275         [Fetch API] Support Request and Response blob() when body data is a blob
276         https://bugs.webkit.org/show_bug.cgi?id=154820
277
278         Reviewed by Darin Adler.
279
280         Adding support for returning the same Blob that is stored in Body in case JS blob() is called.
281         Adding support for Blob creation when data is stored as text.
282         Updated JSDOMBinding and JSDOMPromise to return a JS ArrayBuffer for Vector<char> as well as Vector<unsigned char>.
283
284         Covered by added tests.
285
286         * Modules/fetch/FetchBody.cpp:
287         (WebCore::FetchBody::arrayBuffer):
288         (WebCore::FetchBody::blob):
289         (WebCore::FetchBody::extractFromText):
290         * Modules/fetch/FetchBody.h:
291         * bindings/js/JSDOMBinding.h:
292         (WebCore::toJS):
293         * bindings/js/JSDOMPromise.h:
294         (WebCore::DeferredWrapper::resolve): Deleted.
295
296 2016-02-29  Chris Dumez  <cdumez@apple.com>
297
298         Have parseHTMLInteger() / parseHTMLNonNegativeInteger() use WTF::Optional
299         https://bugs.webkit.org/show_bug.cgi?id=154845
300
301         Reviewed by Ryosuke Niwa.
302
303         Have parseHTMLInteger() / parseHTMLNonNegativeInteger() use
304         WTF::Optional.
305
306         * dom/Element.cpp:
307         (WebCore::Element::getIntegralAttribute):
308         (WebCore::Element::getUnsignedIntegralAttribute):
309         (WebCore::Element::setUnsignedIntegralAttribute): Deleted.
310         * html/HTMLElement.cpp:
311         (WebCore::HTMLElement::parseBorderWidthAttribute):
312         (WebCore::HTMLElement::parseAttribute):
313         * html/HTMLInputElement.cpp:
314         (WebCore::HTMLInputElement::parseMaxLengthAttribute):
315         * html/HTMLInputElement.h:
316         * html/HTMLOListElement.cpp:
317         (WebCore::HTMLOListElement::parseAttribute):
318         * html/HTMLTextAreaElement.cpp:
319         (WebCore::HTMLTextAreaElement::maxLength):
320         * html/ImageInputType.cpp:
321         (WebCore::ImageInputType::height):
322         (WebCore::ImageInputType::width):
323         * html/parser/HTMLParserIdioms.cpp:
324         (WebCore::parseHTMLIntegerInternal):
325         (WebCore::parseHTMLInteger):
326         (WebCore::parseHTMLNonNegativeInteger):
327         * html/parser/HTMLParserIdioms.h:
328         (WebCore::limitToOnlyHTMLNonNegativeNumbersGreaterThanZero):
329         (WebCore::limitToOnlyHTMLNonNegative):
330         * svg/SVGElement.cpp:
331         (WebCore::SVGElement::parseAttribute):
332
333 2016-02-29  Zan Dobersek  <zdobersek@igalia.com>
334
335         TextureMapperGL: simplify TransformationMatrix copies in draw(), beginClip()
336         https://bugs.webkit.org/show_bug.cgi?id=154791
337
338         Reviewed by Carlos Garcia Campos.
339
340         In both functions, the passed-in model-view matrix is first copied, multiplied
341         against a rect-to-rect TransformationMatrix, and then assigned into a local
342         TransformationMatrix variable, which causes another copy due to the multiply()
343         function returning a reference to the modified object.
344
345         To avoid the last copy, first copy the model-view matrix into a local variable,
346         and multiply the rect-to-rect TransformationMatrix into the new object afterwards.
347
348         * platform/graphics/texmap/TextureMapperGL.cpp:
349         (WebCore::TextureMapperGL::draw):
350         (WebCore::TextureMapperGL::beginClip):
351
352 2016-02-29  Zan Dobersek  <zdobersek@igalia.com>
353
354         ImageBufferCairo should support OpenGL ES 2 configurations
355         https://bugs.webkit.org/show_bug.cgi?id=154790
356
357         Reviewed by Carlos Garcia Campos.
358
359         When building with OpenGL ES 2 and with accelerated 2D canvas support,
360         the GLES2 header should be included instead of the OpenGLShims.h header.
361
362         The glTexParameterf() calls targeting GL_TEXTURE_WRAP_S and
363         GL_TEXTURE_WRAP_T parameters should use the GL_CLAMP_TO_EDGE value.
364         GL_CLAMP isn't available in OpenGL ES 2 and was dropped in OpenGL 3.
365
366         * platform/graphics/cairo/ImageBufferCairo.cpp:
367         (WebCore::ImageBufferData::createCairoGLSurface):
368
369 2016-02-29  Zan Dobersek  <zdobersek@igalia.com>
370
371         TextureMapperGL: beginPainting() should handle the PaintingMirrored value in PaintFlags
372         https://bugs.webkit.org/show_bug.cgi?id=154789
373
374         Reviewed by Carlos Garcia Campos.
375
376         * platform/graphics/texmap/TextureMapperGL.cpp:
377         (WebCore::TextureMapperGL::beginPainting): The ClipStack should be reset with
378         a Y-axis mode that corresponds to the presence of the PaintingMirrored value in
379         the passed-in PaintFlags argument. If present, the default Y-axis mode should be
380         used, and the inverted Y-axis otherwise.
381
382 2016-02-29  Zan Dobersek  <zdobersek@igalia.com>
383
384         CoordinatedGraphicsLayer should override the inherited TextureMapperPlatformLayer::Client methods
385         https://bugs.webkit.org/show_bug.cgi?id=154788
386
387         Reviewed by Carlos Garcia Campos.
388
389         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
390         Add the override specifiers for the two methods that are inherited
391         from the TextureMapperPlatformLayer::Client interface.
392
393 2016-02-29  Simon Fraser  <simon.fraser@apple.com>
394
395         Remove the experimental feature of antialiased font dilation
396         https://bugs.webkit.org/show_bug.cgi?id=154843
397
398         Reviewed by Zalan Bujtas.
399         
400         Remove the "antialiased font dilation" code path, and related prefs.
401
402         * page/Settings.cpp:
403         (WebCore::Settings::Settings): Deleted.
404         (WebCore::Settings::setAntialiasedFontDilationEnabled): Deleted.
405         * page/Settings.h:
406         (WebCore::Settings::antialiasedFontDilationEnabled): Deleted.
407         * platform/graphics/FontCascade.cpp:
408         (WebCore::FontCascade::setAntialiasedFontDilationEnabled): Deleted.
409         (WebCore::FontCascade::antialiasedFontDilationEnabled): Deleted.
410         * platform/graphics/FontCascade.h:
411         * platform/graphics/GraphicsContext.cpp:
412         (WebCore::GraphicsContextStateChange::changesFromState): Deleted.
413         (WebCore::GraphicsContextStateChange::accumulate): Deleted.
414         (WebCore::GraphicsContextStateChange::apply): Deleted.
415         (WebCore::GraphicsContextStateChange::dump): Deleted.
416         (WebCore::GraphicsContext::setAntialiasedFontDilationEnabled): Deleted.
417         * platform/graphics/GraphicsContext.h:
418         (WebCore::GraphicsContextState::GraphicsContextState): Deleted.
419         (WebCore::GraphicsContext::antialiasedFontDilationEnabled): Deleted.
420         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
421         (PlatformCALayer::drawLayerContents): Deleted.
422         * platform/graphics/cocoa/FontCascadeCocoa.mm:
423         (WebCore::dilationSizeForTextColor): Deleted.
424         (WebCore::FontCascade::drawGlyphs): Deleted.
425         * platform/graphics/displaylists/DisplayList.cpp:
426         (WebCore::DisplayList::DisplayList::shouldDumpForFlags): Deleted.
427
428 2016-02-29  Jer Noble  <jer.noble@apple.com>
429
430         Refactor CoreVideo API access into their own classes so code can be re-used.
431         https://bugs.webkit.org/show_bug.cgi?id=154544
432
433         Reviewed by Eric Carlson.
434
435         In order for common CoreVideo code paths to be re-used in other classes, pull those paths
436         out of MediaPlayerPrivateAVFoundationObjC and into re-usable clasess.
437
438         * WebCore.xcodeproj/project.pbxproj:
439         * platform/cf/CoreMediaSoftLink.cpp:
440         * platform/cf/CoreMediaSoftLink.h:
441         * platform/cocoa/CoreVideoSoftLink.cpp: Added.
442         * platform/cocoa/CoreVideoSoftLink.h: Added.
443         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
444         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
445         (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):
446         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
447         (WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture):
448         (WebCore::CVPixelBufferGetBytePointerCallback): Deleted.
449         (WebCore::CVPixelBufferReleaseBytePointerCallback): Deleted.
450         (WebCore::CVPixelBufferReleaseInfoCallback): Deleted.
451         (WebCore::createImageFromPixelBuffer): Deleted.
452         (WebCore::enumToStringMap): Deleted.
453         * platform/graphics/cv/PixelBufferConformerCV.cpp: Added.
454         (WebCore::PixelBufferConformerCV::PixelBufferConformerCV):
455         (WebCore::CVPixelBufferGetBytePointerCallback):
456         (WebCore::CVPixelBufferReleaseBytePointerCallback):
457         (WebCore::CVPixelBufferReleaseInfoCallback):
458         (WebCore::PixelBufferConformerCV::createImageFromPixelBuffer):
459         * platform/graphics/cv/PixelBufferConformerCV.h: Added.
460         * platform/graphics/cv/TextureCacheCV.h: Added.
461         (WebCore::TextureCacheCV::context):
462         * platform/graphics/cv/TextureCacheCV.mm: Added.
463         (WebCore::TextureCacheCV::create):
464         (WebCore::TextureCacheCV::TextureCacheCV):
465         (WebCore::TextureCacheCV::textureFromImage):
466         * platform/graphics/cv/VideoTextureCopierCV.cpp: Added.
467         (WebCore::VideoTextureCopierCV::VideoTextureCopierCV):
468         (WebCore::VideoTextureCopierCV::~VideoTextureCopierCV):
469         (WebCore::enumToStringMap):
470         (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):
471         * platform/graphics/cv/VideoTextureCopierCV.h: Added.
472         (WebCore::VideoTextureCopierCV::context):
473         * platform/mediastream/mac/AVVideoCaptureSource.mm: Move SOFT_LINK declarations into CoreVideoSoftLink.h/cpp.
474
475 2016-02-29  Chris Dumez  <cdumez@apple.com>
476
477         Use WTF::Optional for HTMLOListElement::m_start
478         https://bugs.webkit.org/show_bug.cgi?id=154824
479
480         Reviewed by Andreas Kling.
481
482         Use WTF::Optional for HTMLOListElement::m_start.
483
484         * html/HTMLOListElement.cpp:
485         (WebCore::HTMLOListElement::parseAttribute):
486         * html/HTMLOListElement.h:
487
488 2016-02-29  Gavin Barraclough  <barraclough@apple.com>
489
490         RefCounter<T>::Event -> RefCounterEvent
491         https://bugs.webkit.org/show_bug.cgi?id=154767
492
493         Reviewed by Darin Adler.
494
495         RefCounter<T>::Event is kinda verbose to use, and there is no need for this
496         to be specific to a particular typeof RefCounter. Move the enum class up to
497         the top level & rename to RefCounterEvent.
498
499         * page/PageThrottler.cpp:
500         (WebCore::PageThrottler::PageThrottler):
501         (WebCore::m_audiblePluginHysteresis):
502         (WebCore::m_mediaActivityCounter):
503         (WebCore::m_pageLoadActivityCounter):
504         * platform/VNodeTracker.cpp:
505         (WebCore::VNodeTracker::singleton):
506         (WebCore::VNodeTracker::VNodeTracker):
507         (WebCore::m_lastWarningTime):
508
509 2016-02-29  Chris Dumez  <cdumez@apple.com>
510
511         Use HTML parsing rules for textarea.maxLength
512         https://bugs.webkit.org/show_bug.cgi?id=154805
513
514         Reviewed by Andreas Kling.
515
516         Use HTML parsing rules for textarea.maxLength:
517         - https://html.spec.whatwg.org/multipage/forms.html#dom-textarea-maxlength
518         - https://html.spec.whatwg.org/multipage/infrastructure.html#limited-to-only-non-negative-numbers
519
520         No new tests, already covered by existing test.
521
522         * html/HTMLTextAreaElement.cpp:
523         (WebCore::HTMLTextAreaElement::maxLength):
524
525 2016-02-29  Chris Dumez  <cdumez@apple.com>
526
527         Align td.rowSpan / td.colSpan with the specification
528         https://bugs.webkit.org/show_bug.cgi?id=154803
529
530         Reviewed by Darin Adler.
531
532         Align td.rowSpan / td.colSpan with the specification:
533         - https://html.spec.whatwg.org/multipage/tables.html#htmltablecellelement
534         - https://html.spec.whatwg.org/multipage/tables.html#dom-tdth-colspan
535         - https://html.spec.whatwg.org/multipage/tables.html#dom-tdth-rowspan
536
537         In particular, the following changes were made:
538         - Change type from 'long' to 'unsigned long'.
539         - Use HTML rules for parsing unsigned integers:
540           - https://html.spec.whatwg.org/multipage/infrastructure.html#rules-for-parsing-non-negative-integers
541         - Use 1 as default value when the input value is out of range instead
542           of 0 when setting.
543         - rowspan is still clamped to [1, 8190] internally but we now expose the
544           unclamped value to JS as this is an internal restriction. The same is
545           done for a colSpan value of 0, we expose 0 to the Web but clamp to 1
546           internally.
547
548         No new tests, already covered by existing test.
549
550         * html/HTMLTableCellElement.cpp:
551         (WebCore::HTMLTableCellElement::colSpan):
552         (WebCore::HTMLTableCellElement::rowSpan):
553         (WebCore::HTMLTableCellElement::rowSpanForBindings):
554         (WebCore::HTMLTableCellElement::setColSpan):
555         (WebCore::HTMLTableCellElement::setRowSpanForBindings):
556         (WebCore::HTMLTableCellElement::axis): Deleted.
557         (WebCore::HTMLTableCellElement::headers): Deleted.
558         * html/HTMLTableCellElement.h:
559         * html/HTMLTableCellElement.idl:
560
561 2016-02-29  Chris Dumez  <cdumez@apple.com>
562
563         [Web IDL] Add support for [TreatNullAs=EmptyString] and use it
564         https://bugs.webkit.org/show_bug.cgi?id=154654
565
566         Reviewed by Darin Adler.
567
568         Add support for [TreatNullAs=EmptyString] standard Web IDL extended
569         attribute:
570         - http://heycam.github.io/webidl/#TreatNullAs
571
572         This replaces the WebKit-specific [TreatNullAs=NullString] IDL
573         extended attribute. Instead of passing a null String() to the
574         implementation, emptyString() is passed.
575
576         This patch does not cause any web-exposed behavior change. For
577         case where switching from NullString to EmptyString would change
578         the behavior (or require changes to the implementation), the old
579         IDL attribute was kept. However, it was renamed to
580         [TreatNullAs=LegacyNullString] to discourage its use in new code.
581         Eventually, this legacy IDL attribute should go away entirely.
582
583         [TreatNullAs=EmptyString] should only be used when it is present
584         in the corresponding specification. Note that there are a lot of
585         places where we use [TreatNullAs=EmptyString] in our IDL where it
586         does not match the specification. I have added FIXME comments for
587         those so we can clean them up later.
588
589         No new tests, no web-exposed behavior change.
590
591         * Modules/mediastream/RTCPeerConnection.idl:
592         No behavior change because this is not implemented.
593
594         * bindings/js/JSDOMBinding.cpp:
595         (WebCore::valueToStringTreatingNullAsEmptyString):
596         * bindings/js/JSDOMBinding.h:
597         Add new function to convert a JSValue into a String while treating
598         null as the empty string.
599
600         * bindings/scripts/CodeGeneratorJS.pm:
601         (JSValueToNative):
602         * bindings/scripts/IDLAttributes.txt:
603         - Add support for [TreatNullAs=EmptyString].
604         - Rename NullString to LegacyNullString to discourage its use.
605
606         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
607         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
608         * bindings/scripts/test/JS/JSTestObj.cpp:
609         * bindings/scripts/test/ObjC/DOMTestObj.h:
610         * bindings/scripts/test/ObjC/DOMTestObj.mm:
611         * bindings/scripts/test/TestObj.idl:
612         Add bindings tests coverage for [TreatNullAs=EmptyString].
613
614         * css/CSSStyleDeclaration.idl:
615         * dom/CharacterData.idl:
616         * dom/DOMImplementation.idl:
617         * dom/Document.idl:
618         * dom/Element.idl:
619         * dom/ShadowRoot.idl:
620         * html/HTMLOutputElement.idl:
621         * html/HTMLScriptElement.idl:
622         * html/URLUtils.idl:
623         * svg/SVGAngle.idl:
624         * svg/SVGLength.idl:
625         Use [TreatNullAs=EmptyString] instead of [TreatNullAs=NullString].
626         There is not behavior change because the implementation does
627         not distinguish the null string from the empty string.
628
629         * html/HTMLBaseElement.idl:
630         * html/HTMLButtonElement.idl:
631         * html/HTMLFormElement.idl:
632         * html/HTMLMediaElement.idl:
633         * html/HTMLSelectElement.idl:
634         * svg/SVGElement.idl:
635         * svg/SVGScriptElement.idl:
636         Rename [TreatNullAs=NullString] to [TreatNullAs=LegacyNullString],
637         no behavior change.
638
639         * html/HTMLDocument.idl:
640         - dir and *Color: Rename [TreatNullAs=NullString] to
641           [TreatNullAs=LegacyNullString].
642         - designMode: Drop [TreatNullAs=NullString] as per the specification:
643           - https://html.spec.whatwg.org/multipage/dom.html#the-document-object
644           null now gets converted to "null" instead of the null String but this
645           does not change behavior because the implementation only recognizes
646           "on" / "off" / others. So we still end up using inherit mode when
647           set to null.
648
649         * html/HTMLElement.idl:
650         - Use [TreatNullAs=EmptyString] instead of [TreatNullAs=NullString] for
651           innerText / outerText. Does not change behavior because the
652           implementation does not distinguishes.
653         - Drop [TreatNullAs=NullString] from contentEditable to match the spec:
654           - https://html.spec.whatwg.org/multipage/interaction.html#elementcontenteditable
655           This does not change behavior because the implementation will the a SyntaxError
656           wether a null String or the string "null" is passed.
657
658         * html/HTMLFrameElement.idl:
659         Drop [TreatNullAs=NullString] from location attribute. This does not
660         change behavior because the attribute is using a custom setter.
661
662         * html/HTMLInputElement.idl:
663         - formEnctype / formMethod / autocapitalize: Rename [TreatNullAs=NullString] to
664           [TreatNullAs=LegacyNullString].
665         - value: Rename [TreatNullAs=NullString] to Rename [TreatNullAs=EmptyString], which
666           does not change behavior because the implementation does not distinguish. Also
667           drop the extended attribute for non-JS bindings as it has no impact.
668
669         * html/HTMLMediaElement.cpp:
670         (WebCore::HTMLMediaElement::setMediaGroup):
671         Drop redundant group.isNull() check as group.isEmpty() already checks for null.
672
673         * html/HTMLScriptElement.cpp:
674         (WebCore::HTMLScriptElement::setText):
675         Drop useless .impl() call as we have a String and the method requires a String
676         as input.
677
678         * html/HTMLTextAreaElement.cpp:
679         (WebCore::HTMLTextAreaElement::setValueCommon):
680         Use emptyString() instead of "" as it is slightly more efficient.
681
682         * html/HTMLTextAreaElement.idl:
683         - value: Use [TreatNullAs=EmptyString] instead of [TreatNullAs=NullString]. No
684           behavior change because the implementation does not distinguish.
685         - autocapitalize: Rename [TreatNullAs=NullString] to [TreatNullAs=LegacyNullString].
686
687         * html/canvas/CanvasRenderingContext2D.idl:
688         - globalCompositeOperation / repetitionType: Use [TreatNullAs=EmptyString] instead of
689           [TreatNullAs=NullString]. No behavior change because the implementation does not
690           distinguish.
691         - lineCap / lineJoin: Drop the [TreatNullAs=NullString] to match the spec:
692           - https://html.spec.whatwg.org/multipage/scripting.html#canvaspathdrawingstyles
693           There is no behavior change because those are string enumerations and the value
694           is not recognized either way (String() or String("null")).
695         - shadowColor: Drop the [TreatNullAs=NullString] to match the spec:
696           - https://html.spec.whatwg.org/multipage/scripting.html#canvasshadowstyles
697           No behavior change because this is not a valid color either way.
698
699 2016-02-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
700
701         Refactor FetchBody constructors
702         https://bugs.webkit.org/show_bug.cgi?id=154721
703
704         Reviewed by Sam Weinig and Darin Adler.
705
706         Covered by existing tests.
707
708         * Modules/fetch/FetchBody.cpp:
709         (WebCore::FetchBody::extract): Renamed from "fromJSValue"
710         (WebCore::FetchBody::extractFromBody): Renamed from "fromRequestBody" and making use of move constructor.
711         * Modules/fetch/FetchBody.h:
712         (WebCore::FetchBody::FetchBody): Making default constructor public and removing empty static method.
713         * Modules/fetch/FetchRequest.cpp:
714         (WebCore::buildBody):
715         * Modules/fetch/FetchResponse.cpp:
716         (WebCore::FetchResponse::error):
717         (WebCore::FetchResponse::redirect):
718         (WebCore::FetchResponse::initializeWith):
719         * Modules/fetch/FetchResponse.h:
720         (WebCore::FetchResponse::create):
721
722 2016-02-28  Antti Koivisto  <antti@apple.com>
723
724         ::slotted doesn't work in nested shadow trees
725         https://bugs.webkit.org/show_bug.cgi?id=154765
726         <rdar://problem/24870995>
727
728         Reviewed by Ryosuke Niwa.
729
730         See https://github.com/w3c/webcomponents/issues/331#issuecomment-189191593
731
732         Test: fast/shadow-dom/css-scoping-shadow-slotted-nested.html
733
734         * css/ElementRuleCollector.cpp:
735         (WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
736
737         Collect ::slotted rules from all the nested shadow trees instead of just the host's.
738
739 2016-02-28  Chris Dumez  <cdumez@apple.com>
740
741         Parse HTMLOLElement.start as per the HTML spec
742         https://bugs.webkit.org/show_bug.cgi?id=154802
743
744         Reviewed by Andreas Kling.
745
746         Parse HTMLOLElement.start as per the HTML spec:
747         - https://html.spec.whatwg.org/multipage/semantics.html#dom-ol-start
748         - https://html.spec.whatwg.org/multipage/infrastructure.html#rules-for-parsing-integers
749
750         No new tests, already covered by existing test.
751
752         * html/HTMLOListElement.cpp:
753         (WebCore::HTMLOListElement::parseAttribute):
754
755 2016-02-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
756
757         Reduce uses of PassRefPtr in indexeddb
758         https://bugs.webkit.org/show_bug.cgi?id=154273
759
760         Reviewed by Darin Adler.
761
762         No new tests, no behavior changes.
763
764         * Modules/indexeddb/IDBDatabaseError.h:
765         (WebCore::IDBDatabaseError::create):
766         * Modules/indexeddb/IDBKeyData.cpp:
767         (WebCore::IDBKeyData::maybeCreateIDBKey):
768         * Modules/indexeddb/IDBKeyData.h:
769         * Modules/indexeddb/IDBKeyRange.cpp:
770         (WebCore::IDBKeyRange::create):
771         (WebCore::IDBKeyRange::IDBKeyRange):
772         (WebCore::IDBKeyRange::only):
773         (WebCore::IDBKeyRange::lowerBound):
774         (WebCore::IDBKeyRange::upperBound):
775         (WebCore::IDBKeyRange::bound):
776         * Modules/indexeddb/IDBKeyRange.h:
777         (WebCore::IDBKeyRange::create):
778         (WebCore::IDBKeyRange::lower):
779         (WebCore::IDBKeyRange::upper):
780         (WebCore::IDBKeyRange::lowerBound):
781         (WebCore::IDBKeyRange::upperBound):
782         (WebCore::IDBKeyRange::bound):
783         * Modules/indexeddb/IDBKeyRangeData.cpp:
784         (WebCore::IDBKeyRangeData::maybeCreateIDBKeyRange):
785         * Modules/indexeddb/IDBKeyRangeData.h:
786         * Modules/indexeddb/IDBServerConnection.h:
787         * Modules/indexeddb/legacy/IDBCallbacks.h:
788         * Modules/indexeddb/legacy/IDBCursorBackend.cpp:
789         (WebCore::IDBCursorBackend::continueFunction):
790         * Modules/indexeddb/legacy/IDBCursorBackend.h:
791         * Modules/indexeddb/legacy/IDBCursorBackendOperations.h:
792         (WebCore::CursorIterationOperation::create):
793         (WebCore::CursorIterationOperation::CursorIterationOperation):
794         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
795         (WebCore::GetOperation::perform):
796         (WebCore::PutOperation::perform):
797         * Modules/indexeddb/legacy/LegacyCursor.cpp:
798         (WebCore::LegacyCursor::continueFunction):
799         * Modules/indexeddb/legacy/LegacyCursor.h:
800         * Modules/indexeddb/legacy/LegacyFactory.h:
801         (WebCore::LegacyFactory::create):
802         * Modules/indexeddb/legacy/LegacyRequest.cpp:
803         (WebCore::LegacyRequest::onSuccess):
804         * Modules/indexeddb/legacy/LegacyRequest.h:
805         * inspector/InspectorIndexedDBAgent.cpp:
806
807 2016-02-28  Tim Horton  <timothy_horton@apple.com>
808
809         Switch to application/vnd.apple.folder for <attachment> folder special-case
810         https://bugs.webkit.org/show_bug.cgi?id=154786
811         <rdar://problem/24416632>
812
813         Reviewed by Anders Carlsson.
814
815         No new tests, adjusted an existing test to cover this.
816
817         * rendering/RenderThemeMac.mm:
818         (WebCore::iconForAttachment):
819         Add a second folder MIME type.
820
821 2016-02-28  Tim Horton  <timothy_horton@apple.com>
822
823         Variables can resolve to the wrong value when elements differ in nothing but inherited variable value
824         https://bugs.webkit.org/show_bug.cgi?id=154785
825
826         Reviewed by Antti Koivisto.
827
828         Test: fast/css/variables/avoid-matched-property-cache.html
829
830         * css/StyleResolver.cpp:
831         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
832         Disable the matched property cache when a value is variable-dependent, because
833         they can resolve to inherited values, and the matched property cache could
834         end up copying the wrong value from another similarly-styled element.
835
836 2016-02-28  Konstantin Tokarev  <annulen@yandex.ru>
837
838         SVGToOTFFontConversion.cpp does not compile with libstdc++ 4.8
839         https://bugs.webkit.org/show_bug.cgi?id=154794
840
841         Reviewed by Michael Catanzaro.
842
843         No new tests needed.
844
845         * svg/SVGToOTFFontConversion.cpp:
846         (WebCore::SVGToOTFFontConverter::appendLigatureSubtable): Added const
847         qualifiers.
848
849 2016-02-27  Chris Dumez  <cdumez@apple.com>
850
851         Prevent cross-origin access to Location.assign() / Location.reload()
852         https://bugs.webkit.org/show_bug.cgi?id=154779
853
854         Reviewed by Darin Adler.
855
856         Prevent cross-origin access to Location.assign() / Location.reload()
857         to match the latest specification:
858         - https://html.spec.whatwg.org/multipage/browsers.html#crossoriginproperties-(-o-)
859
860         Firefox and Chrome already prevent this but WebKit allowed it.
861
862         No new tests, already covered by existing tests.
863
864         * bindings/js/JSLocationCustom.cpp:
865         (WebCore::JSLocation::getOwnPropertySlotDelegate):
866         (WebCore::JSLocation::putDelegate): Deleted.
867
868 2016-02-27  Andy VanWagoner  <thetalecrafter@gmail.com>
869
870         Intl.Collator uses POSIX locale (detected by js/intl-collator.html on iOS Simulator)
871         https://bugs.webkit.org/show_bug.cgi?id=152448
872
873         Reviewed by Darin Adler.
874
875         Pass defaultLanguage from Language.h to the globalObjectMethodTable to
876         ensure Intl objects can be initialized with the correct default locale.
877
878         * bindings/js/JSDOMWindowBase.cpp:
879         * bindings/js/JSWorkerGlobalScopeBase.cpp:
880
881 2016-02-27  Chris Dumez  <cdumez@apple.com>
882
883         Align HTMLMarqueeElement.scrollAmount / scrollDelay with the specification
884         https://bugs.webkit.org/show_bug.cgi?id=154781
885
886         Reviewed by Darin Adler.
887
888         Align HTMLMarqueeElement.scrollAmount / scrollDelay with the
889         specification:
890         - https://www.w3.org/TR/html5/obsolete.html#the-marquee-element-0
891
892         In particular:
893         - The attributes should have unsigned long type
894         - We should not throw for negative values
895         - Values should be in the range [0, 2147483647] as per:
896         - https://html.spec.whatwg.org/multipage/infrastructure.html#reflect
897
898         No new tests, already covered by existing tests.
899
900         * html/HTMLMarqueeElement.cpp:
901         (WebCore::HTMLMarqueeElement::scrollAmount):
902         (WebCore::HTMLMarqueeElement::setScrollAmount):
903         (WebCore::HTMLMarqueeElement::scrollDelay):
904         (WebCore::HTMLMarqueeElement::setScrollDelay):
905         (WebCore::HTMLMarqueeElement::loop): Deleted.
906         * html/HTMLMarqueeElement.h:
907         * html/HTMLMarqueeElement.idl:
908
909 2016-02-27  Commit Queue  <commit-queue@webkit.org>
910
911         Unreviewed, rolling out r197204, r197207, r197211, r197217,
912         r197218, and r197219.
913         https://bugs.webkit.org/show_bug.cgi?id=154780
914
915         Caused crashes in WebVideoFullscreenManagerProxy (Requested by
916         ap on #webkit).
917
918         Reverted changesets:
919
920         "Add support for playbackControlsManager"
921         https://bugs.webkit.org/show_bug.cgi?id=154742
922         http://trac.webkit.org/changeset/197204
923
924         "Attempted build fix."
925         http://trac.webkit.org/changeset/197207
926
927         "Attempted build fix."
928         http://trac.webkit.org/changeset/197211
929
930         "Attempted 32-bit build fix."
931         http://trac.webkit.org/changeset/197217
932
933         "Another 32-bit build fix."
934         http://trac.webkit.org/changeset/197218
935
936         "32-bit!!!"
937         http://trac.webkit.org/changeset/197219
938
939 2016-02-27  Chris Dumez  <cdumez@apple.com>
940
941         Optimize parseHTMLInteger()
942         https://bugs.webkit.org/show_bug.cgi?id=154772
943
944         Reviewed by Ryosuke Niwa.
945
946         Optimize parseHTMLInteger() a bit now that it is used a lot more and
947         that it has decent API test coverage. In particular, we now:
948         - Avoid using a StringBuilder for the digits.
949         - Get rid of a is8Bit() branch.
950         - Only traverse the input string once.
951
952         * html/parser/HTMLParserIdioms.cpp:
953         (WebCore::parseHTMLIntegerInternal):
954         (WebCore::parseHTMLInteger):
955         (WebCore::parseHTMLNonNegativeInteger): Deleted.
956
957 2016-02-27  Andreas Kling  <akling@apple.com>
958
959         [iOS] Discard decoded image data on top-level navigation.
960         <https://webkit.org/b/154776>
961
962         Reviewed by Anders Carlsson.
963
964         Add a mechanism that destroys decoded data for all CachedImages and invoke it
965         when performing a top-level navigation on iOS.
966
967         This substantially reduces the ImageIO contribution to our peak memory footprint.
968
969         It would be even better if we could mark these images volatile during the transition
970         but we currently don't have framework support for such machinations.
971
972         * loader/FrameLoader.cpp:
973         (WebCore::FrameLoader::commitProvisionalLoad):
974         * loader/cache/MemoryCache.cpp:
975         (WebCore::MemoryCache::forEachResource):
976         (WebCore::MemoryCache::destroyDecodedDataForAllImages):
977         * loader/cache/MemoryCache.h:
978
979 2016-02-26  Carlos Garcia Campos  <cgarcia@igalia.com>
980
981         Network cache: old pages returned by disk cache on history navigation after session is restored
982         https://bugs.webkit.org/show_bug.cgi?id=153230
983
984         Reviewed by Chris Dumez.
985
986         Add a flag to HistoryItem to mark them as restored from session
987         and use it from the FrameLoader to not change the policy request
988         when navigating to a history item that was restored from session,
989         except for iOS port.
990
991         * history/HistoryItem.h:
992         (WebCore::HistoryItem::setWasRestoredFromSession):
993         (WebCore::HistoryItem::wasRestoredFromSession):
994         * loader/FrameLoader.cpp:
995         (WebCore::FrameLoader::loadDifferentDocumentItem):
996
997 2016-02-26  Michael Catanzaro  <mcatanzaro@igalia.com>
998
999         Remove unused private field from WEBPImageDecoder
1000
1001         Unreviewed.
1002
1003         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1004         (WebCore::WEBPImageDecoder::WEBPImageDecoder):
1005         * platform/image-decoders/webp/WEBPImageDecoder.h:
1006
1007 2016-02-26  Chris Dumez  <cdumez@apple.com>
1008
1009         Fix the behavior of reflecting IDL attributes of type unsigned long
1010         https://bugs.webkit.org/show_bug.cgi?id=154771
1011
1012         Reviewed by Ryosuke Niwa.
1013
1014         Fix the behavior of reflecting IDL attributes of type unsigned long to
1015         align with the specification:
1016         - https://html.spec.whatwg.org/multipage/infrastructure.html#reflecting-content-attributes-in-idl-attributes
1017         - https://html.spec.whatwg.org/multipage/infrastructure.html#rules-for-parsing-non-negative-integers
1018
1019         Firefox and Chrome already follow the specification.
1020
1021         There were several issues with our implementation, which are all
1022         addressed in this patch:
1023         - Upon getting, the value returned must be in the range 0 to 2147483647.
1024           Otherwise, we must return the default value (0 unless specified
1025           otherwise). We previously returned values in the range 0 to 4294967295
1026           instead.
1027         - Upon setting, we must set the content attribute to the default value
1028           (0 unless specified otherwise) if the input value is not in the range
1029           0 to 2147483647. We previously allowed values in the range 0 to
1030           4294967295 instead.
1031         - "-0" was not recognized as a valid unsigned integer
1032
1033         Test: fast/dom/reflect-unsigned-long.html
1034
1035         * dom/Element.cpp:
1036         (WebCore::Element::setUnsignedIntegralAttribute):
1037         Update setUnsignedIntegralAttribute() to limit the input value in the
1038         0 to 2147483647 range, as per the HTML specification. This method is
1039         called by the bindings implementation of reflecting attributes setters.
1040
1041         * html/parser/HTMLParserIdioms.cpp:
1042         (WebCore::parseHTMLNonNegativeInteger):
1043         Update parseHTMLNonNegativeInteger() to call parseHTMLInteger() instead
1044         of duplicating most of its code and fail if the value returned is
1045         negative. This matches the algorithm in the specification:
1046         - https://html.spec.whatwg.org/multipage/infrastructure.html#rules-for-parsing-non-negative-integers
1047
1048         This has 2 behavior changes:
1049         1. "-0" is now correctly parsed as 0.
1050         2. The returned values are in the range 0 to 2147483647.
1051
1052         * html/parser/HTMLParserIdioms.h:
1053         (WebCore::limitToOnlyHTMLNonNegativeNumbersGreaterThanZero):
1054         (WebCore::limitToOnlyHTMLNonNegative):
1055         Drop the checks for "<= 2147483647" and replace with an assertion
1056         now that parseHTMLNonNegativeInteger() already returned values in
1057         the right range.
1058
1059 2016-02-26  Zalan Bujtas  <zalan@apple.com>
1060
1061         REGRESSION (188611): Search field Cancel button should not overlap search text on extensions page.
1062         https://bugs.webkit.org/show_bug.cgi?id=154692
1063         <rdar://problem/22840453>
1064
1065         Reviewed by Brent Fulgham.
1066
1067         Adjust the cancel button position using the actual size of the cancel button.
1068
1069         When the input box and the font height trigger different cancel button sizes, we need to readjust
1070         the rectangle returned by cancelButtonRectForBounds.
1071         This fixes both the mispositioned cancel button and the squared off icon when the input field is zoomed all the way in.
1072
1073         Covered by existing tests.
1074
1075         * rendering/RenderThemeMac.mm:
1076         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1077         (WebCore::RenderThemeMac::cancelButtonSizes): Update button size.
1078
1079 2016-02-26  Brady Eidson  <beidson@apple.com>
1080
1081         Modern IDB: New database versions are never committed to SQLite.
1082         <rdar://problem/24860952> and https://bugs.webkit.org/show_bug.cgi?id=154741
1083         
1084         Modern IDB: If a database handle is not open, files are not actually deleted from disk
1085         https://bugs.webkit.org/show_bug.cgi?id=154756
1086
1087         Reviewed by Alex Christensen.
1088
1089         Tested by API test "IndexedDBPersistence"
1090
1091         * Modules/indexeddb/server/IDBServer.cpp:
1092         (WebCore::IDBServer::IDBServer::deleteDatabase): If there's not an open handle to the database, create one.
1093
1094         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1095         (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction): If a version change transaction, actually
1096           set the new version on disk.
1097         
1098         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1099         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
1100         (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore): If there is no open backing store, create one.
1101           This is necessary to both read the current database version, and to actually delete the file on disk.
1102         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): If necessary, manufacture a "most recently
1103           deleted database info" from the version returned by deleteBackingStore.
1104         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1105
1106 2016-02-26  Chris Dumez  <cdumez@apple.com>
1107
1108         Add API test coverage for parseHTMLInteger / parseHTMLNonNegativeInteger
1109         https://bugs.webkit.org/show_bug.cgi?id=154714
1110
1111         Reviewed by Darin Adler.
1112
1113         Export a couple more symbols for API testing.
1114
1115         * html/parser/HTMLParserIdioms.h:
1116
1117 2016-02-26  Beth Dakin  <bdakin@apple.com>
1118
1119         32-bit!!!
1120
1121         * platform/mac/WebVideoFullscreenInterfaceMac.mm:
1122         (-[WebPlaybackControlsManager initWithWebVideoFullscreenInterfaceMac:]):
1123
1124 2016-02-26  Beth Dakin  <bdakin@apple.com>
1125
1126         Another 32-bit build fix.
1127
1128         * platform/spi/cocoa/AVKitSPI.h:
1129
1130 2016-02-26  Beth Dakin  <bdakin@apple.com>
1131
1132         Attempted 32-bit build fix.
1133
1134         * platform/mac/WebVideoFullscreenInterfaceMac.mm:
1135         (-[WebPlaybackControlsManager initWithWebVideoFullscreenInterfaceMac:]):
1136
1137 2016-02-26  Commit Queue  <commit-queue@webkit.org>
1138
1139         Unreviewed, rolling out r197160.
1140         https://bugs.webkit.org/show_bug.cgi?id=154757
1141
1142         This change causes editing/mac/attributed-string/font-
1143         size.html to fail on El Capitan WK1 (Requested by ryanhaddad
1144         on #webkit).
1145
1146         Reverted changeset:
1147
1148         "Font size computed style is innaccurate"
1149         https://bugs.webkit.org/show_bug.cgi?id=154705
1150         http://trac.webkit.org/changeset/197160
1151
1152 2016-02-26  Gavin Barraclough  <barraclough@apple.com>
1153
1154         Page TimerAlignmentIntervalIncrease mechanism should have upper limit
1155         https://bugs.webkit.org/show_bug.cgi?id=154744
1156
1157         Reviewed by Geoff Garen.
1158
1159         There would be diminishing returns from throttling timers in background pages infinitely.
1160         Add a heuristic to limit appropriately.
1161
1162         Keep track of the current limit, and make the increase time take this into account.
1163
1164         * page/Page.cpp:
1165         (WebCore::Page::setTimerThrottlingEnabled):
1166             - When timer throttling is disabled visit all timers to resume.
1167         (WebCore::Page::setTimerAlignmentIntervalIncreaseLimit):
1168             - Track the maximum alignment interval, and call setDOMTimerAlignmentInterval
1169               to ensure m_timerAlignmentInterval is updated in accordance with the new limit.
1170         (WebCore::Page::setDOMTimerAlignmentInterval):
1171             - When the timer alignemnt interval changes update the increase timer.
1172         (WebCore::Page::timerAlignmentIntervalIncreaseTimerFired):
1173             - Apply limit.
1174         * page/Page.h:
1175         (WebCore::Page::timerThrottlingEnabled):
1176             - Accessor for readability.
1177
1178 2016-02-26  Beth Dakin  <bdakin@apple.com>
1179
1180         Attempted build fix.
1181
1182         * platform/spi/cocoa/AVKitSPI.h:
1183
1184 2016-02-26  Beth Dakin  <bdakin@apple.com>
1185
1186         Add support for playbackControlsManager
1187         https://bugs.webkit.org/show_bug.cgi?id=154742
1188         -and corresponding-
1189         rdar://problem/23833753
1190
1191         Reviewed by Jer Noble.
1192
1193         Make AVKitSPI.h private so that it can be used from other projects.
1194         * WebCore.xcodeproj/project.pbxproj:
1195
1196         Right now, set up a controls manager for a video when it starts playing. In 
1197         the future, this is something that should be handled by the 
1198         PlatformMediaSessionManager since we only want a controls for the 
1199         currentSession.
1200         * html/HTMLMediaElement.cpp:
1201         (WebCore::HTMLMediaElement::playInternal):
1202
1203         New function setUpVideoControlsManager.
1204         * page/ChromeClient.h:
1205
1206         Make these CoreMedia functions available on Mac and iOS instead of just iOS.
1207         * platform/cf/CoreMediaSoftLink.cpp:
1208         * platform/cf/CoreMediaSoftLink.h:
1209
1210         This patch fleshes out an implementation for a bunch of these interface 
1211         functions since they need to communicate to the playbackControlsManager. This 
1212         is also where the playbackControlsManager lives.
1213         * platform/mac/WebVideoFullscreenInterfaceMac.h:
1214
1215         Define an interface and implementation for WebPlaybackControlsManager.
1216         * platform/mac/WebVideoFullscreenInterfaceMac.mm:
1217         (-[WebPlaybackControlsManager initWithWebVideoFullscreenInterfaceMac:]):
1218         (-[WebPlaybackControlsManager isSeeking]):
1219         (-[WebPlaybackControlsManager seekToTime:toleranceBefore:toleranceAfter:]):
1220         (-[WebPlaybackControlsManager audioMediaSelectionOptions]):
1221         (-[WebPlaybackControlsManager currentAudioMediaSelectionOption]):
1222         (-[WebPlaybackControlsManager setCurrentAudioMediaSelectionOption:]):
1223         (-[WebPlaybackControlsManager legibleMediaSelectionOptions]):
1224         (-[WebPlaybackControlsManager currentLegibleMediaSelectionOption]):
1225         (-[WebPlaybackControlsManager setCurrentLegibleMediaSelectionOption:]):
1226         (-[WebPlaybackControlsManager cancelThumbnailAndAudioAmplitudeSampleGeneration]):
1227
1228         Relay this information to the playbackControlsManager.
1229         (WebCore::WebVideoFullscreenInterfaceMac::setDuration):
1230         (WebCore::WebVideoFullscreenInterfaceMac::setCurrentTime):
1231         (WebCore::WebVideoFullscreenInterfaceMac::setRate):
1232         (WebCore::WebVideoFullscreenInterfaceMac::setSeekableRanges):
1233         (WebCore::WebVideoFullscreenInterfaceMac::ensureControlsManager):
1234         (WebCore::WebVideoFullscreenInterfaceMac::playBackControlsManager):
1235         (WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
1236
1237         New SPI needed.
1238         * platform/spi/cocoa/AVKitSPI.h:
1239         * platform/spi/mac/AVFoundationSPI.h:
1240
1241 2016-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
1242
1243         <g> wrapping <symbol> causes display of hidden <symbol>
1244         https://bugs.webkit.org/show_bug.cgi?id=154576
1245
1246         Reviewed by Darin Adler.
1247         
1248         The SVGSymbolElement is allowed in the shadow tree of an SVGUseElement
1249         only if it subtree root element. Any descendant SVGSymbolElement should
1250         be removed from the subtree because it is a hidden container. If the cloned
1251         subtree includes an SVGUseElement which references an SVGSymbolElement,
1252         the same rule will be applied to the descendant SVGUseElement. The goal
1253         is to remove all the descendant SVGSymbolElements from the cloned target
1254         because these SVGSymbolElements will be expanded to SVGSVGElements and
1255         hence become visible.
1256
1257         * svg/SVGUseElement.cpp:
1258         (WebCore::disassociateAndRemoveClones): A helper function which removes
1259         cloned SVGElements and their subtrees from their parents and disassociate
1260         them from their originals.
1261         
1262         (WebCore::removeDisallowedElementsFromSubtree): Use disassociateAndRemoveClones().
1263         
1264         (WebCore::removeSymbolElementsFromSubtree): Removes all the descendant
1265         SVGSymbolElements from the cloned subtree. It does not remove the root
1266         element itself if it is an SVGSymbolElement because this one will be
1267         expanded to an SVGSVGElement which is exactly what we need.
1268         
1269         (WebCore::SVGUseElement::cloneTarget): Call removeSymbolElementsFromSubtree()
1270         to remove the descendant SVGSymbolElements from the cloned subtree before
1271         appending it to the container shadow root.
1272
1273 2016-02-26  Olivier Blin  <olivier.blin@softathome.com>
1274
1275         Initialize LocaleICU data members in header
1276         https://bugs.webkit.org/show_bug.cgi?id=154731
1277
1278         Reviewed by Michael Catanzaro.
1279
1280         LocaleICU data members should be initialized in the header, to
1281         avoid conditional initialization lines in the constructor, as
1282         suggested by Darin in bug 154484.
1283
1284         * platform/text/LocaleICU.cpp:
1285         (WebCore::LocaleICU::LocaleICU): Deleted.
1286         * platform/text/LocaleICU.h:
1287
1288 2016-02-26  Brady Eidson  <beidson@apple.com>
1289
1290         Modern IDB: Using existing database info from SQLite backing store is busted.
1291         <rdar://problem/24848143> and https://bugs.webkit.org/show_bug.cgi?id=154735
1292
1293         Reviewed by Alex Christensen.
1294
1295         No new tests.
1296         
1297         Reproducing the bug requires having a known database on disk *before* launching the DatabaseProcess to
1298         read in the existing IDBDatabaseInfo.
1299         
1300         Our automated infrastructure currently has no way of testing this.
1301
1302         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1303         (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
1304         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1305         (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): Do the optional migrate on
1306           the IndexRecords table here; *every* time we open a SQLite backing store.
1307         (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo): Deleted.
1308         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
1309         (WebCore::IDBDatabaseInfo::isolatedCopy): Copy the entire object, not just name/version.
1310
1311 2016-02-25  Gavin Barraclough  <barraclough@apple.com>
1312
1313         RefCounter value changed callback should be called on all changes (not just zero edge).
1314         https://bugs.webkit.org/show_bug.cgi?id=154699
1315
1316         Reviewed by Anders Carlsson.
1317
1318         RefCounter currently only triggers a callback when the count goes from zero
1319         to non-zero and vice-versa. Change that, to be useful to more clients.
1320
1321         * page/PageThrottler.cpp:
1322         (WebCore::PageThrottler::PageThrottler):
1323             - Updated for change in RefCounter callback siganture.
1324         * platform/VNodeTracker.cpp:
1325         (WebCore::VNodeTracker::VNodeTracker):
1326             - Can now use RefCounter callback to trigger checkPressureState().
1327         (WebCore::VNodeTracker::pressureWarningTimerFired):
1328             - RefCounter count is now a size_t (%d -> %ul).
1329         * platform/VNodeTracker.h:
1330             - simplified VNodeTracker::token() [no longer needs to call checkPressureState()].
1331
1332 2016-02-26  Andreas Kling  <akling@apple.com>
1333
1334         Remove unused CFNetwork disk cache mmap optimization in WebKit2.
1335         <https://webkit.org/b/154727>
1336
1337         Reviewed by Darin Adler.
1338
1339         Remove some now-unused SPI.
1340
1341         * platform/spi/cf/CFNetworkSPI.h:
1342
1343 2016-02-26  Commit Queue  <commit-queue@webkit.org>
1344
1345         Unreviewed, rolling out r197167.
1346         https://bugs.webkit.org/show_bug.cgi?id=154730
1347
1348         This change broke the Mac build (Requested by ryanhaddad on
1349         #webkit).
1350
1351         Reverted changeset:
1352
1353         "REGRESSION (188611): Search field Cancel button should not
1354         overlap search text on extensions page."
1355         https://bugs.webkit.org/show_bug.cgi?id=154692
1356         http://trac.webkit.org/changeset/197167
1357
1358 2016-02-26  Martin Robinson  <mrobinson@igalia.com>
1359
1360         Remove libqcms support
1361         https://bugs.webkit.org/show_bug.cgi?id=154707
1362
1363         Reviewed by Žan Doberšek.
1364
1365         No new tests. This change simply removes dead code.
1366
1367         * platform/image-decoders/ImageDecoder.h: Remove QCMS support.
1368         (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Deleted.
1369         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Remove QCMS support.
1370         (WebCore::JPEGImageReader::JPEGImageReader): Deleted.
1371         (WebCore::JPEGImageReader::close): Deleted.
1372         (WebCore::JPEGImageReader::decode): Deleted.
1373         (WebCore::JPEGImageReader::colorTransform): Deleted.
1374         (WebCore::JPEGImageReader::createColorTransform): Deleted.
1375         (WebCore::JPEGImageDecoder::outputScanlines): Deleted.
1376         * platform/image-decoders/png/PNGImageDecoder.cpp: Remove QCMS support.
1377         (WebCore::PNGImageReader::PNGImageReader): Deleted.
1378         (WebCore::PNGImageReader::close): Deleted.
1379         (WebCore::PNGImageReader::rowBuffer): Deleted.
1380         (WebCore::PNGImageReader::createRowBuffer): Deleted.
1381         (WebCore::PNGImageReader::colorTransform): Deleted.
1382         (WebCore::PNGImageReader::createColorTransform): Deleted.
1383         (WebCore::PNGImageDecoder::headerAvailable): Deleted.
1384         (WebCore::PNGImageDecoder::rowAvailable): Deleted.
1385         (WebCore::PNGImageDecoder::frameComplete): Deleted.
1386         * platform/image-decoders/webp/WEBPImageDecoder.cpp: Remove QCMS support.
1387         (WebCore::WEBPImageDecoder::decode): Remove QCMS support.
1388         (WebCore::WEBPImageDecoder::WEBPImageDecoder): Deleted.
1389         (WebCore::WEBPImageDecoder::clear): Deleted.
1390         (WebCore::WEBPImageDecoder::createColorTransform): Deleted.
1391         (WebCore::WEBPImageDecoder::readColorProfile): Deleted.
1392         (WebCore::WEBPImageDecoder::applyColorProfile): Deleted.
1393         * platform/image-decoders/webp/WEBPImageDecoder.h: Remove QCMS support.
1394         (WebCore::WEBPImageDecoder::colorTransform): Deleted.
1395
1396 2016-02-26  Zalan Bujtas  <zalan@apple.com>
1397
1398         RenderTheme::controlSize* methods should take const RenderStyle&.
1399         https://bugs.webkit.org/show_bug.cgi?id=154708
1400
1401         Reviewed by Darin Adler.
1402
1403         No change in functionality.
1404
1405         * rendering/RenderTheme.h:
1406         (WebCore::RenderTheme::minimumMenuListSize):
1407         (WebCore::RenderTheme::popupInternalPaddingLeft):
1408         (WebCore::RenderTheme::popupInternalPaddingRight):
1409         (WebCore::RenderTheme::popupInternalPaddingTop):
1410         (WebCore::RenderTheme::popupInternalPaddingBottom):
1411         * rendering/RenderThemeMac.h:
1412         * rendering/RenderThemeMac.mm:
1413         (WebCore::RenderThemeMac::controlSizeForFont):
1414         (WebCore::RenderThemeMac::sizeForFont):
1415         (WebCore::RenderThemeMac::sizeForSystemFont):
1416         (WebCore::RenderThemeMac::controlSizeForSystemFont):
1417         (WebCore::RenderThemeMac::minimumProgressBarHeight):
1418         (WebCore::RenderThemeMac::popupInternalPaddingLeft):
1419         (WebCore::RenderThemeMac::popupInternalPaddingRight):
1420         (WebCore::RenderThemeMac::popupInternalPaddingTop):
1421         (WebCore::RenderThemeMac::popupInternalPaddingBottom):
1422         (WebCore::RenderThemeMac::minimumMenuListSize):
1423
1424 2016-02-26  Zalan Bujtas  <zalan@apple.com>
1425
1426         REGRESSION (188611): Search field Cancel button should not overlap search text on extensions page.
1427         https://bugs.webkit.org/show_bug.cgi?id=154692
1428         <rdar://problem/22840453>
1429
1430         Reviewed by Brent Fulgham.
1431
1432         Adjust the cancel button position using the actual size of the cancel button.
1433
1434         When the input box and the font height trigger different cancel button sizes, we need to readjust
1435         the rectangle returned by cancelButtonRectForBounds.
1436         This fixes both the mispositioned cancel button and the squared off icon when the input field is zoomed all the way in.
1437
1438         Covered by existing tests.
1439
1440         * rendering/RenderThemeMac.mm:
1441         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1442         (WebCore::RenderThemeMac::cancelButtonSizes): Update button size.
1443
1444 2016-02-25  Antti Koivisto  <antti@apple.com>
1445
1446         Implement ::slotted pseudo element
1447         https://bugs.webkit.org/show_bug.cgi?id=149441
1448         <rdar://problem/22731987>
1449
1450         Reviewed by Andreas Kling.
1451
1452         Based on latest in https://github.com/w3c/webcomponents/issues/331
1453
1454         * css/CSSGrammar.y.in:
1455
1456             Parse ::slotted.
1457
1458         * css/CSSParser.cpp:
1459         (WebCore::CSSParser::detectFunctionTypeToken):
1460         * css/CSSParserValues.cpp:
1461         (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
1462         (WebCore::CSSParserSelector::parsePseudoElementSlottedFunctionSelector):
1463
1464             Tokenize ::slotted.
1465
1466         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
1467         * css/CSSParserValues.h:
1468         * css/CSSSelector.cpp:
1469         (WebCore::CSSSelector::pseudoId):
1470         * css/CSSSelector.h:
1471         * css/ElementRuleCollector.cpp:
1472         (WebCore::ElementRuleCollector::matchAuthorRules):
1473         (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
1474         (WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
1475
1476             Match ::slotted selector.
1477
1478         (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
1479
1480             Collect ::slotted rules that may apply to an element in a slot.
1481
1482         (WebCore::ElementRuleCollector::matchUserRules):
1483         (WebCore::ElementRuleCollector::matchUARules):
1484         (WebCore::findSlottedPseudoElementSelector):
1485         (WebCore::ElementRuleCollector::ruleMatches):
1486         * css/ElementRuleCollector.h:
1487         * css/RuleSet.cpp:
1488         (WebCore::RuleSet::addRule):
1489
1490             Collect ::slotted rules.
1491
1492         (WebCore::RuleSet::shrinkToFit):
1493         * css/RuleSet.h:
1494         (WebCore::RuleSet::hostPseudoClassRules):
1495         (WebCore::RuleSet::slottedPseudoElementRules):
1496         (WebCore::RuleSet::focusPseudoClassRules):
1497         (WebCore::RuleSet::universalRules):
1498         * css/SelectorChecker.cpp:
1499         (WebCore::SelectorChecker::checkOne):
1500         * style/StyleSharingResolver.cpp:
1501         (WebCore::Style::SharingResolver::resolve):
1502
1503             Disable style sharing for children of shadow host. They may be affected by the shadow tree style
1504             which is not considered in style sharing checks.
1505
1506 2016-02-25  Myles C. Maxfield  <mmaxfield@apple.com>
1507
1508         Font size computed style is innaccurate
1509         https://bugs.webkit.org/show_bug.cgi?id=154705
1510         <rdar://problem/23474068>
1511
1512         Reviewed by Timothy Hatcher.
1513
1514         Safari rounds the font size value reported to getComputedStyle(). Neither Firefox
1515         nor Chrome do this.
1516
1517         Covered by existing tests.
1518
1519         * css/CSSComputedStyleDeclaration.cpp:
1520         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
1521         (WebCore::fontSizeFromStyle):
1522
1523 2016-02-25  Chris Dumez  <cdumez@apple.com>
1524
1525         [Web IDL] Mark DOMString parameters as nullable when they should be
1526         https://bugs.webkit.org/show_bug.cgi?id=154666
1527
1528         Reviewed by Darin Adler.
1529
1530         Mark DOMString parameters as nullable when they should be. We previously
1531         emulated nullable DOMString attributes by using:
1532         [TreatNullAs=NullString, TreatUndefinedAs=NullString]
1533         However, this was non-standard and very verbose. Also, developers would
1534         sometimes forget the [TreatUndefinedAs=NullString] part and the behavior
1535         would end up being wrong for undefined.
1536
1537         After this clean up, the non-standard [TreatUndefinedAs=NullString] is
1538         no longer used so this patch drops support for it. Only
1539         [TreatNullAs=NullString] remains and this one will be renamed to
1540         [TreatNullAs=EmptyString] via Bug 154654 to match Web IDL standard.
1541
1542         Tests: fast/dom/Element/getElementsByTagNameNS-nullable.html
1543                fast/dom/Node/nullable-parameters.html
1544                fast/events/storageevent-initStorageEvent-nullable.html
1545
1546         * Modules/mediastream/RTCPeerConnection.idl:
1547         Drop [TreatUndefinedAs=NullString] from createDataChannel()'s first
1548         parameter instead of marking it as nullable. This matches the
1549         specification:
1550         - http://w3c.github.io/webrtc-pc/#rtcpeerconnection-interface-extensions-1
1551         This means there is a slight behavior change when undefined is passed, it
1552         now becomes the string "undefined" instead of a null String.
1553
1554         * bindings/scripts/CodeGeneratorJS.pm:
1555         (JSValueToNative):
1556         Drop handling of [TreatUndefinedAs=] as it is no longer used.
1557
1558         * bindings/scripts/IDLAttributes.txt:
1559         Drop support for [TreatUndefinedAs=] as it is no longer used.
1560
1561         * bindings/scripts/test/TestObj.idl:
1562
1563         * dom/DOMImplementation.idl:
1564         Make a few parameters nullable and drop [TreatNullAs=NullString,
1565         TreatUndefinedAs=NullString]. There is no web-exposed behavior
1566         change.
1567
1568         * dom/Document.idl:
1569         - Make a few parameters nullable and drop [TreatNullAs=NullString,
1570           TreatUndefinedAs=NullString]. There is no web-exposed behavior
1571           change from this.
1572         - Drop these attributes from ObjC-specific bindings as they only
1573           matter to JS bindings.
1574         - The namespaceURI parameter to getElementsByTagNameNS() is now marked
1575           as nullable even though it only treated null as a null String, not
1576           undefined. This was a bug and did not match the specification:
1577           https://dom.spec.whatwg.org/#document
1578
1579         * dom/Element.idl:
1580         - Make a few parameters nullable and drop [TreatNullAs=NullString,
1581           TreatUndefinedAs=NullString]. There is no web-exposed behavior
1582           change from this.
1583         - Drop these attributes from ObjC-specific bindings as they only
1584           matter to JS bindings.
1585         - The namespaceURI parameter to getElementsByTagNameNS() is now marked
1586           as nullable even though it only treated null as a null String, not
1587           undefined. This was a bug and did not match the specification:
1588           https://dom.spec.whatwg.org/#interface-element
1589
1590         * dom/NamedNodeMap.idl:
1591         Make a few parameters nullable and drop [TreatNullAs=NullString,
1592         TreatUndefinedAs=NullString]. There is no web-exposed behavior
1593         change from this.
1594
1595         * dom/Node.idl:
1596         - Drop these attributes from isSupported() as this is not exposed
1597           to JS (only native bindings) and these attributes only matter to
1598           JS bindings.
1599         - Make the first parameter to lookupPrefix() / isDefaultNamespace()
1600           and lookupNamespaceURI() nullable. Previously, we treated null
1601           as a null string but not undefined. There is therefore a slight
1602           behavior change but this matches the specification:
1603           https://dom.spec.whatwg.org/#node
1604
1605         * fileapi/Blob.idl:
1606         * html/HTMLButtonElement.idl:
1607         * html/HTMLCanvasElement.idl:
1608         * html/HTMLFieldSetElement.idl:
1609         * html/HTMLInputElement.idl:
1610         * html/HTMLKeygenElement.idl:
1611         * html/HTMLMediaElement.idl:
1612         * html/HTMLObjectElement.idl:
1613         * html/HTMLOutputElement.idl:
1614         * html/HTMLSelectElement.idl:
1615         * html/HTMLTextAreaElement.idl:
1616         * page/DOMWindow.idl:
1617         Make a few parameters nullable and drop [TreatNullAs=NullString,
1618         TreatUndefinedAs=NullString]. There is no web-exposed behavior
1619         change from this.
1620
1621         * storage/StorageEvent.idl:
1622         Mark oldValueArg / newValueArg parameters to initStorageEvent()
1623         as nullable. Previously, we only treated null as a null string,
1624         not undefined. This is therefore a slight behavior change but
1625         it matches the specification:
1626         https://www.w3.org/TR/webstorage/#storageeventinit
1627
1628 2016-02-25  David Kilzer  <ddkilzer@apple.com>
1629
1630         REGRESSION (r196744): NetworkExtension.framework and NEFilterSource class are not available on Recovery partition
1631         <http://webkit.org/b/154703>
1632
1633         Reviewed by Andy Estes.
1634
1635         * platform/cocoa/NetworkExtensionContentFilter.mm: Make
1636         soft-linking of NetworkExtension.framework and NEFilterSource
1637         class optional since they are not available on the Recovery
1638         partition.  Note that NetworkExtensionContentFilter::enabled()
1639         does not need to change since it already had the correct
1640         behavior when getNEFilterSourceClass() returned nullptr.
1641
1642 2016-02-25  Ada Chan  <adachan@apple.com>
1643
1644         Update the definition of ENABLE_VIDEO_PRESENTATION_MODE for Mac platform
1645         https://bugs.webkit.org/show_bug.cgi?id=154702
1646
1647         Reviewed by Dan Bernstein.
1648
1649         * Configurations/FeatureDefines.xcconfig:
1650
1651 2016-02-25  David Kilzer  <ddkilzer@apple.com>
1652
1653         Change ASSERT to RELEASE_ASSERT in SOFT_LINK_CLASS() macro
1654
1655         Follow-up fix noted by Andy Estes for:
1656
1657             [Cocoa] Always check the return value of dlopen() and dlsym() in Release builds
1658             <http://webkit.org/b/154364>
1659
1660         * platform/mac/SoftLinking.h:
1661         (SOFT_LINK_CLASS): Change ASSERT to RELEASE_ASSERT to check the
1662         return value of objc_getClass().  This matches what we do for
1663         SOFT_LINK_CLASS_FOR_SOURCE().
1664
1665 2016-02-25  Daniel Bates  <dabates@apple.com>
1666
1667         CSP: Remove SecurityPolicy script interface
1668         https://bugs.webkit.org/show_bug.cgi?id=154694
1669         <rdar://problem/24846482>
1670
1671         Reviewed by Andy Estes.
1672
1673         Remove the Content Security Policy script interface, SecurityPolicy. This interface was only
1674         enabled when building with ENABLE(CSP_NEXT) (disabled by default).
1675
1676         For completeness, the SecurityPolicy interface was removed from the Content Security Policy 1.1 spec.
1677         in <https://github.com/w3c/webappsec/commit/18882953ce2d8afca25f685557fef0e0471b2c9a> (12/26/2013).
1678
1679         * CMakeLists.txt: Remove files to DOMSecurityPolicy.{cpp, idl}.
1680         * DerivedSources.cpp: Remove file JSDOMSecurityPolicy.cpp.
1681         * DerivedSources.make: Remove file DOMSecurityPolicy.idl.
1682         * PlatformGTK.cmake: Ditto.
1683         * PlatformMac.cmake: Ditto.
1684         * WebCore.xcodeproj/project.pbxproj: Remove files DOMSecurityPolicy files.
1685         * bindings/scripts/CodeGeneratorGObject.pm: Remove reference to DOMSecurityPolicy.
1686         * dom/Document.cpp:
1687         (WebCore::Document::securityPolicy): Deleted.
1688         * dom/Document.h:
1689         * dom/Document.idl: Remove attribute securityPolicy.
1690         * page/DOMSecurityPolicy.cpp: Removed.
1691         * page/DOMSecurityPolicy.h: Removed.
1692         * page/DOMSecurityPolicy.idl: Removed.
1693
1694 2016-02-25  Andreas Kling  <akling@apple.com>
1695
1696         Don't clear the weak JSString cache on memory pressure.
1697         <https://webkit.org/b/154693>
1698
1699         Reviewed by Antti Koivisto.
1700
1701         This was stupid. The cache is a WeakGCMap, so all the JSStrings pointed to are
1702         still alive anyway. This way we keep the ability to deduplicate common strings.
1703
1704         * platform/MemoryPressureHandler.cpp:
1705         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory): Deleted.
1706
1707 2016-02-25  Chris Dumez  <cdumez@apple.com>
1708
1709         Drop [TreatReturnedNullStringAs=Undefined] WebKit-specific IDL attribute
1710         https://bugs.webkit.org/show_bug.cgi?id=154662
1711
1712         Reviewed by Darin Adler.
1713
1714         Drop [TreatReturnedNullStringAs=Undefined] WebKit-specific IDL attribute.
1715         This has no standard equivalent and all uses in WebKit are either useless
1716         or wrong.
1717
1718         Test: fast/frames/detached-frame-document-defaultCharset.html
1719
1720         * bindings/scripts/CodeGeneratorJS.pm:
1721         (NativeToJSValue): Deleted.
1722         * bindings/scripts/IDLAttributes.txt:
1723         Drop support for [TreatReturnedNullStringAs=X] entirely.
1724
1725         * dom/Document.cpp:
1726         (WebCore::Document::defaultCharset):
1727         Fall back to return "UTF-8" instead of the null string, similarly to
1728         what is done in for Document.characterSet. Note that this attribute
1729         is non-standard and is an IE extension. Firefox never supported it
1730         and Chrome dropped it last year.
1731
1732         * dom/Document.idl:
1733         - Drop extended attribute for Document.defaultCharset as the
1734           implementation has been updated to never return a null String.
1735         - Drop extended attribute for Document.readyState. It was useless
1736           because the implementation could never return a null String.
1737
1738         * xml/XMLHttpRequest.cpp:
1739         (WebCore::XMLHttpRequest::getAllResponseHeaders):
1740         Update implementation to return emptyString() instead of "" in case
1741         of error.
1742
1743         * xml/XMLHttpRequest.idl:
1744         Drop extended attribute from XMLHttpRequest.getAllResponseHeaders().
1745         It was useless because the implementation could never return a
1746         null String.
1747
1748         * xml/XSLTProcessor.idl:
1749         Drop extended attribute from XSLTProcessor.getParameter(). The
1750         operation is already marked as [Custom] so the extended attribute
1751         had no effect.
1752
1753 2016-02-25  Gavin Barraclough  <barraclough@apple.com>
1754
1755         Should template RefCounter instead of RefCounter::Token
1756         https://bugs.webkit.org/show_bug.cgi?id=154691
1757
1758         Reviewed by Anders Carlsson.
1759
1760         Mechanical update per RefCounter interface change.
1761
1762         * page/PageThrottler.cpp:
1763         (WebCore::PageThrottler::mediaActivityToken):
1764         (WebCore::PageThrottler::pageLoadActivityToken):
1765         (WebCore::PageThrottler::setActivityFlag):
1766         * page/PageThrottler.h:
1767         * platform/VNodeTracker.h:
1768
1769 2016-02-25  Brady Eidson  <beidson@apple.com>
1770
1771         Remove LegacyIDB.
1772         https://bugs.webkit.org/show_bug.cgi?id=150854
1773
1774         Reviewed by Alex Christensen.
1775
1776         No new tests (No change in behavior).
1777
1778         * CMakeLists.txt:
1779         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
1780         (WebCore::DOMWindowIndexedDatabase::indexedDB):
1781         * Modules/indexeddb/IDBDatabaseMetadata.cpp: Removed.
1782         * Modules/indexeddb/IDBDatabaseMetadata.h: Removed.
1783         * Modules/indexeddb/IDBFactory.h:
1784         * Modules/indexeddb/IDBIndex.h:
1785         * Modules/indexeddb/IDBIndexMetadata.h: Removed.
1786         * Modules/indexeddb/IDBObjectStoreMetadata.h: Removed.
1787         * Modules/indexeddb/IDBOperation.h: Removed.
1788         * Modules/indexeddb/IDBServerConnection.h: Removed.
1789         * Modules/indexeddb/IDBTransaction.h:
1790         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
1791         (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
1792         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
1793         * Modules/indexeddb/legacy/IDBCallbacks.h: Removed.
1794         * Modules/indexeddb/legacy/IDBCursorBackend.cpp: Removed.
1795         * Modules/indexeddb/legacy/IDBCursorBackend.h: Removed.
1796         * Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp: Removed.
1797         * Modules/indexeddb/legacy/IDBCursorBackendOperations.h: Removed.
1798         * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp: Removed.
1799         * Modules/indexeddb/legacy/IDBDatabaseBackend.h: Removed.
1800         * Modules/indexeddb/legacy/IDBDatabaseCallbacks.h: Removed.
1801         * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp: Removed.
1802         * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h: Removed.
1803         * Modules/indexeddb/legacy/IDBFactoryBackendInterface.h: Removed.
1804         * Modules/indexeddb/legacy/IDBPendingDeleteCall.h: Removed.
1805         * Modules/indexeddb/legacy/IDBPendingOpenCall.h: Removed.
1806         * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp: Removed.
1807         * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h: Removed.
1808         * Modules/indexeddb/legacy/IDBTransactionBackend.cpp: Removed.
1809         * Modules/indexeddb/legacy/IDBTransactionBackend.h: Removed.
1810         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp: Removed.
1811         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.h: Removed.
1812         * Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp: Removed.
1813         * Modules/indexeddb/legacy/IDBTransactionCoordinator.h: Removed.
1814         * Modules/indexeddb/legacy/LegacyAny.cpp: Removed.
1815         * Modules/indexeddb/legacy/LegacyAny.h: Removed.
1816         * Modules/indexeddb/legacy/LegacyCursor.cpp: Removed.
1817         * Modules/indexeddb/legacy/LegacyCursor.h: Removed.
1818         * Modules/indexeddb/legacy/LegacyCursorWithValue.cpp: Removed.
1819         * Modules/indexeddb/legacy/LegacyCursorWithValue.h: Removed.
1820         * Modules/indexeddb/legacy/LegacyDatabase.cpp: Removed.
1821         * Modules/indexeddb/legacy/LegacyDatabase.h: Removed.
1822         * Modules/indexeddb/legacy/LegacyFactory.cpp: Removed.
1823         * Modules/indexeddb/legacy/LegacyFactory.h: Removed.
1824         * Modules/indexeddb/legacy/LegacyIndex.cpp: Removed.
1825         * Modules/indexeddb/legacy/LegacyIndex.h: Removed.
1826         * Modules/indexeddb/legacy/LegacyObjectStore.cpp: Removed.
1827         * Modules/indexeddb/legacy/LegacyObjectStore.h: Removed.
1828         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp: Removed.
1829         * Modules/indexeddb/legacy/LegacyOpenDBRequest.h: Removed.
1830         * Modules/indexeddb/legacy/LegacyRequest.cpp: Removed.
1831         * Modules/indexeddb/legacy/LegacyRequest.h: Removed.
1832         * Modules/indexeddb/legacy/LegacyTransaction.cpp: Removed.
1833         * Modules/indexeddb/legacy/LegacyTransaction.h: Removed.
1834         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp: Removed.
1835         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Removed.
1836         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1837         (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
1838         (WebCore::IDBServer::SQLiteIDBCursor::establishStatement):
1839         (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
1840         * Modules/indexeddb/server/SQLiteIDBCursor.h:
1841         * Modules/indexeddb/shared/IDBIndexInfo.h:
1842         * WebCore.xcodeproj/project.pbxproj:
1843         * bindings/js/IDBBindingUtilities.cpp:
1844         (WebCore::generateIndexKeysForValue): Deleted.
1845         * bindings/js/IDBBindingUtilities.h:
1846         * bindings/js/JSMainThreadExecState.cpp:
1847         (WebCore::JSMainThreadExecState::didLeaveScriptContext): Deleted.
1848         * inspector/InspectorIndexedDBAgent.cpp:
1849         * loader/EmptyClients.cpp:
1850         * page/DatabaseProvider.cpp:
1851         (WebCore::DatabaseProvider::idbFactoryBackend): Deleted.
1852         * page/DatabaseProvider.h:
1853         * platform/CrossThreadCopier.cpp:
1854         (WebCore::IDBDatabaseMetadata>::copy): Deleted.
1855         (WebCore::IDBIndexMetadata>::copy): Deleted.
1856         (WebCore::IDBObjectStoreMetadata>::copy): Deleted.
1857         * platform/CrossThreadCopier.h:
1858
1859 2016-02-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
1860
1861         REGRESSION (r196268): Many assertion failures and crashes on SVG path animation tests when JS garbage collection happens quickly
1862         https://bugs.webkit.org/show_bug.cgi?id=154331
1863
1864         Reviewed by Darin Adler.
1865
1866         This is not an actual regression. The bug did exist before r196268 but
1867         the whole document was leaking once an SVGAnimatedProperty was created
1868         so there was no way to produce this bug. After fixing the leak, one crash
1869         and one assert got uncovered. Both of them happen because of the fact:
1870         "if an SVGAnimatedProperty is not referenced it will be deleted."
1871
1872         * svg/SVGPathElement.cpp:
1873         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
1874         The code in this function was assuming that the wrapper will be created
1875         only once which happens when SVGAnimatedProperty::lookupOrCreateWrapper()
1876         is called. Before making this single call, lookupOrCreateDWrapper() was
1877         building an initial SVGPathSegList from byte stream. But now
1878         SVGAnimatedProperty::lookupWrapper() can return false even after creating
1879         the SVGAnimatedProperty because it was deleted later. Calling
1880         buildSVGPathSegListFromByteStream() more than once was causing
1881         SVGAnimatedListPropertyTearOff::animationStarted() to fire the assertion
1882         ASSERT(m_values.size() == m_wrappers.size()) because the path segments were
1883         appended twice to m_values which is in fact SVGPathElement::m_pathSegList.value.
1884         The fix is to build the initial SVGPathSegList only once which should happen
1885         when m_pathSegList.value.isEmpty().
1886         
1887         (WebCore::SVGPathElement::animatedPropertyWillBeDeleted):
1888         * svg/SVGPathElement.h:
1889         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
1890         (WebCore::SVGAnimatedPathSegListPropertyTearOff::~SVGAnimatedPathSegListPropertyTearOff):
1891         SVGPathElement is assuming the following equivalence relation:
1892         m_pathSegList.shouldSynchronize ~ SVGAnimatedProperty_is_created_and_not_null.
1893         SVGPathElement::animatedPathSegList() and animatedNormalizedPathSegList()
1894         set m_pathSegList.shouldSynchronize to true when SVGAnimatedProperty is
1895         created but nothing sets m_pathSegList.shouldSynchronize back to false.
1896         This was not a problem when the SVGAnimatedProperty was leaking but after
1897         ensuring it is deleted when it is not referenced this equivalence relation
1898         becomes untrue sometimes. This caused SVGPathElement::svgAttributeChanged()
1899         to crash when we check m_pathSegList.shouldSynchronize and if it is true we
1900         assume that SVGAnimatedProperty::lookupWrapper() will return a non-null pointer
1901         and therefore we deference this pointer and call SVGAnimatedProperty::isAnimating().
1902         To fix this crash we need to set m_pathSegList.shouldSynchronize back to false
1903         when the associated SVGAnimatedProperty is deleted.
1904
1905 2016-02-25  Brady Eidson  <beidson@apple.com>
1906
1907         Modern IDB: WebKit 2 IPC layer.
1908         https://bugs.webkit.org/show_bug.cgi?id=153808
1909
1910         Reviewed by Alex Christensen.
1911
1912         No new tests (Covered by over 1,000 existing tests).
1913
1914         * Modules/indexeddb/IDBKeyData.h:
1915         (WebCore::IDBKeyData::encode): It's okay to encode Min and Max.
1916         (WebCore::IDBKeyData::decode): It's okay to decode Min and Max.
1917
1918 2016-02-25  Daniel Bates  <dabates@apple.com>
1919
1920         CSP: Make SecurityPolicyViolationEvent more closely conform to CSP spec and enable it by default
1921         https://bugs.webkit.org/show_bug.cgi?id=154522
1922         <rdar://problem/24762078>
1923
1924         Reviewed by Brent Fulgham.
1925
1926         Include attributes statusCode and columnNumber in a dispatched SecurityPolicyViolationEvent and
1927         as part of the SecurityPolicyViolationEventInit dictionary as per section Violation DOM Events
1928         of the Content Security Policy Level 3 spec., <https://w3c.github.io/webappsec-csp/> (24 February 2016).
1929         Additionally, enable dispatching of this event when a Content Security Policy violation occurs regardless
1930         of whether ENABLE(CSP_NEXT) is enabled.
1931
1932         Test: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-https.html
1933
1934         * WebCore.xcodeproj/project.pbxproj: Add files JSSecurityPolicyViolationEvent.{cpp, h}.
1935         * dom/EventNames.in: Enable support for SecurityPolicyViolationEvent unconditionally.
1936         * dom/SecurityPolicyViolationEvent.h: Remove ENABLE(CSP_NEXT)-guard so that we compile this
1937         code unconditionally. Modified SecurityPolicyViolationEventInit and SecurityPolicyViolationEvent
1938         to support attributes statusCode and columnNumebr.
1939         * dom/SecurityPolicyViolationEvent.idl: Add attributes statusCode and columnNumber.
1940         * page/csp/ContentSecurityPolicy.cpp:
1941         (WebCore::ContentSecurityPolicy::reportViolation): Modified to both dispatch a SecurityPolicyViolationEvent
1942         and send a violation report (if applicable).
1943
1944 2016-02-25  Eric Carlson  <eric.carlson@apple.com>
1945
1946         [MediaStream] MediaDeviceInfo deviceId and groupId must be unique to the page's origin
1947         https://bugs.webkit.org/show_bug.cgi?id=153163
1948         <rdar://problem/24334526>
1949
1950         Reviewed by Tim Horton.
1951
1952         Tests: http/tests/media/media-stream/enumerate-devices-source-id-persistent.html
1953                http/tests/media/media-stream/enumerate-devices-source-id.html
1954
1955         * Modules/mediastream/MediaDevicesRequest.cpp:
1956         (WebCore::MediaDevicesRequest::start): Don't check document.hasHadActiveMediaStreamTrack, do it
1957           in didCompleteTrackSourceInfoRequest where we need the information.
1958         (WebCore::MediaDevicesRequest::didCompletePermissionCheck): Renamed from didCompleteCheck, save
1959           device ID hash string.
1960         (WebCore::hashString): Hash a string with SHA1.
1961         (WebCore::MediaDevicesRequest::hashID): Hash and ID.
1962         (WebCore::MediaDevicesRequest::didCompleteTrackSourceInfoRequest): Hash deviceId and groupId.
1963         (WebCore::MediaDevicesRequest::didCompleteCheck): Deleted.
1964         (WebCore::MediaDevicesRequest::getTrackSources): Deleted.
1965         (WebCore::MediaDevicesRequest::didCompleteRequest): Deleted.
1966         * Modules/mediastream/MediaDevicesRequest.h:
1967
1968         * Modules/mediastream/UserMediaPermissionCheck.cpp:
1969         (WebCore::UserMediaPermissionCheck::userMediaDocumentOrigin): Renamed from securityOrigin.
1970         (WebCore::UserMediaPermissionCheck::topLevelDocumentOrigin): New, return the top level document origin.
1971         (WebCore::UserMediaPermissionCheck::setUserMediaAccessInfo): Renamed from setHasPersistentPermission.
1972         (WebCore::UserMediaPermissionCheck::securityOrigin): Deleted.
1973         (WebCore::UserMediaPermissionCheck::setHasPersistentPermission): Deleted.
1974         * Modules/mediastream/UserMediaPermissionCheck.h:
1975
1976         * Modules/mediastream/UserMediaRequest.cpp:
1977         (WebCore::UserMediaRequest::userMediaDocumentOrigin): Renamed from securityOrigin.
1978         (WebCore::UserMediaRequest::topLevelDocumentOrigin): New, return the top level document origin.
1979         (WebCore::UserMediaRequest::securityOrigin): Deleted.
1980         * Modules/mediastream/UserMediaRequest.h:
1981         (WebCore::UserMediaRequest::requiresAudio): Deleted, unused.
1982         (WebCore::UserMediaRequest::requiresVideo): Ditto.
1983
1984         * html/HTMLMediaElement.cpp:
1985         (WebCore::HTMLMediaElement::mediaPlayerMediaDeviceIdentifierStorageDirectory): Deleted, unused.
1986         * html/HTMLMediaElement.h:
1987
1988         * platform/graphics/MediaPlayer.h:
1989         (WebCore::MediaPlayerClient::mediaPlayerMediaDeviceIdentifierStorageDirectory): Deleted.
1990
1991         * platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
1992         (WebCore::MediaStreamTrackSourcesRequestClient::didCompleteTrackSourceInfoRequest): Renamed from didCompleteRequest.
1993
1994         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
1995         (WebCore::RealtimeMediaSourceCenterMac::getMediaStreamTrackSources): Ditto.
1996
1997         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
1998         (WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources): Ditto.
1999
2000 2016-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2001
2002         [GTK] Tearing when entering AC mode
2003         https://bugs.webkit.org/show_bug.cgi?id=150955
2004
2005         Reviewed by Michael Catanzaro.
2006
2007         * platform/gtk/GtkUtilities.cpp:
2008         (WebCore::widgetIsOnscreenToplevelWindow): Allow passing nullptr.
2009
2010 2016-02-24  Chris Dumez  <cdumez@apple.com>
2011
2012         Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute
2013         https://bugs.webkit.org/show_bug.cgi?id=154659
2014
2015         Reviewed by Sam Weinig.
2016
2017         Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute and
2018         use nullable DOMString types instead:
2019         http://heycam.github.io/webidl/#idl-nullable-type
2020
2021         This is the standard way of doing things. We already had support
2022         in the bindings generator for nullable DOMString attributes so
2023         we now just leverage this support. However, our IDL parser did
2024         not correctly parse nullable DOMString return values for operations.
2025         This patch fixes this.
2026
2027         This patch also drops [TreatNullAs=NullString] and
2028         [TreatUndefinedAs=NullString] for writable DOMString attributes that
2029         are now marked as nullable because they are implied.
2030
2031         * Modules/fetch/FetchHeaders.idl:
2032         * Modules/indexeddb/IDBObjectStore.idl:
2033         * Modules/mediasource/DOMURLMediaSource.idl:
2034         * Modules/mediastream/DOMURLMediaStream.idl:
2035         * Modules/websockets/WebSocket.idl:
2036         * bindings/scripts/CodeGeneratorJS.pm:
2037         (NativeToJSValue): Deleted.
2038         * bindings/scripts/IDLAttributes.txt:
2039         * bindings/scripts/IDLParser.pm:
2040         (parseAttributeOrOperationRest):
2041         (parseOperationOrIterator):
2042         (parseSpecialOperation):
2043         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2044         (webkit_dom_test_obj_nullable_string_method):
2045         (webkit_dom_test_obj_nullable_string_special_method):
2046         (webkit_dom_test_obj_conditional_method3): Deleted.
2047         (webkit_dom_test_obj_convert1): Deleted.
2048         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2049         * bindings/scripts/test/JS/JSTestObj.cpp:
2050         (WebCore::JSTestObj::getOwnPropertySlot):
2051         (WebCore::JSTestObj::getOwnPropertySlotByIndex):
2052         (WebCore::JSTestObj::getOwnPropertyNames):
2053         (WebCore::jsTestObjPrototypeFunctionNullableStringMethod):
2054         (WebCore::jsTestObjConstructorFunctionNullableStringStaticMethod):
2055         (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
2056         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence): Deleted.
2057         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2): Deleted.
2058         * bindings/scripts/test/JS/JSTestObj.h:
2059         * bindings/scripts/test/ObjC/DOMTestObj.h:
2060         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2061         (-[DOMTestObj nullableStringMethod]):
2062         (-[DOMTestObj nullableStringStaticMethod]):
2063         (-[DOMTestObj nullableStringSpecialMethod:]):
2064         (-[DOMTestObj overloadedMethod1:]): Deleted.
2065         (-[DOMTestObj getSVGDocument]): Deleted.
2066         * bindings/scripts/test/TestObj.idl:
2067         * css/CSSCharsetRule.idl:
2068         * css/CSSImportRule.idl:
2069         * css/CSSKeyframesRule.idl:
2070         * css/CSSPageRule.idl:
2071         * css/CSSRule.idl:
2072         * css/CSSStyleDeclaration.idl:
2073         * css/CSSStyleRule.idl:
2074         * css/CSSValue.idl:
2075         * css/MediaList.idl:
2076         * css/StyleSheet.idl:
2077         * dom/Attr.idl:
2078         * dom/CharacterData.idl:
2079         * dom/DOMStringList.idl:
2080         * dom/Document.idl:
2081         * dom/DocumentType.idl:
2082         * dom/Element.idl:
2083         * dom/Entity.idl:
2084         * dom/MutationRecord.idl:
2085         * dom/Node.idl:
2086         * dom/ProcessingInstruction.idl:
2087         * html/DOMSettableTokenList.idl:
2088         * html/DOMTokenList.idl:
2089         * html/DOMURL.idl:
2090         * html/canvas/WebGLDebugShaders.idl:
2091         * html/canvas/WebGLRenderingContextBase.idl:
2092         * page/DOMWindow.idl:
2093         * storage/Storage.idl:
2094         * storage/StorageEvent.idl:
2095         * xml/XMLHttpRequest.idl:
2096         * xml/XPathNSResolver.idl:
2097
2098 2016-02-24  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
2099
2100         [web-animations] Add AnimationTimeline, DocumentTimeline and add extensions to Document interface
2101         https://bugs.webkit.org/show_bug.cgi?id=151688
2102
2103         Reviewed by Dean Jackson.
2104
2105         - Adds DocumentTimeline interface and class implementation
2106         - Implements the DocumentAnimation extension to the Document Interface that contains a default DocumentTimeline
2107         - Add AnimationTimeline interface stub (i.e. without getAnimations and currentTime)
2108         - Adds AnimationTimeline class implementation for AnimationTimeline interface stub
2109         - Adds Javascript bindings for the above classes and interfaces
2110         - Enables the WEB_ANIMATIONS compiler switch
2111
2112         No tests yet.  Tests will be added as class functionality is added incrementally.
2113
2114         * CMakeLists.txt:
2115         * Configurations/FeatureDefines.xcconfig:
2116         * DerivedSources.make:
2117         * PlatformGTK.cmake:
2118         * WebCore.vcxproj/WebCore.vcxproj:
2119         * WebCore.vcxproj/WebCore.vcxproj.filters:
2120         * WebCore.vcxproj/WebCoreIncludeCommon.props:
2121         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2122         * WebCore.xcodeproj/project.pbxproj:
2123         * animation/AnimationTimeline.cpp: Added.
2124         (WebCore::AnimationTimeline::AnimationTimeline):
2125         (WebCore::AnimationTimeline::~AnimationTimeline):
2126         (WebCore::AnimationTimeline::destroy):
2127         * animation/AnimationTimeline.h: Added.
2128         (WebCore::AnimationTimeline::deref):
2129         (WebCore::AnimationTimeline::isDocumentTimeline):
2130         (WebCore::AnimationTimeline::classType):
2131         * animation/AnimationTimeline.idl: Added.
2132         * animation/DocumentAnimation.cpp: Added.
2133         (WebCore::DocumentAnimation::DocumentAnimation):
2134         (WebCore::DocumentAnimation::~DocumentAnimation):
2135         (WebCore::DocumentAnimation::timeline):
2136         (WebCore::DocumentAnimation::supplementName):
2137         (WebCore::DocumentAnimation::from):
2138         * animation/DocumentAnimation.h: Added.
2139         * animation/DocumentAnimation.idl: Added.
2140         * animation/DocumentTimeline.cpp: Added.
2141         (WebCore::DocumentTimeline::create):
2142         (WebCore::DocumentTimeline::DocumentTimeline):
2143         (WebCore::DocumentTimeline::~DocumentTimeline):
2144         * animation/DocumentTimeline.h: Added.
2145         * animation/DocumentTimeline.idl: Added.
2146         * bindings/js/JSAnimationTimelineCustom.cpp: Added.
2147         (WebCore::toJS):
2148         * bindings/js/JSBindingsAllInOne.cpp:
2149         * bindings/scripts/CodeGeneratorGObject.pm:
2150         * dom/Document.h:
2151
2152 2016-02-24  Brady Eidson  <beidson@apple.com>
2153
2154         Modern IDB: Some w3c objectstore tests crash under GuardMalloc.
2155         https://bugs.webkit.org/show_bug.cgi?id=154460
2156
2157         Reviewed by Alex Christensen.
2158
2159         No new tests (Covered by existing tests).
2160
2161         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2162         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
2163         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
2164         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):  Don't delete the UniqueIDBDatabase yet 
2165           if there are still any connections pending close.
2166         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
2167         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
2168         (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted): It's possible that with this
2169           transaction completing, and a connection finished its close process, that the UniqueIDBDatabase is
2170           now ready to be deleted.
2171
2172         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2173         (WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback):
2174         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
2175
2176         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2177         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abortWithoutCallback):
2178
2179 2016-02-24  Konstantin Tokarev  <annulen@yandex.ru>
2180
2181         [cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
2182         https://bugs.webkit.org/show_bug.cgi?id=154651
2183
2184         Reviewed by Alex Christensen.
2185
2186         No new tests needed.
2187
2188         * CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.
2189
2190 2016-02-24  Ryosuke Niwa  <rniwa@webkit.org>
2191
2192         Use more references in FocusNavigationScope
2193         https://bugs.webkit.org/show_bug.cgi?id=154637
2194
2195         Reviewed by Chris Dumez.
2196
2197         Use references in various functions of FocusNavigationScope as well as m_treeScope.
2198
2199         * page/FocusController.cpp:
2200         (WebCore::FocusNavigationScope::FocusNavigationScope): Takes TreeScope& instead of TreeScope*.
2201         (WebCore::FocusNavigationScope::rootNode): Returns ContainerNode& instead of ContainerNode*.
2202         (WebCore::FocusNavigationScope::owner):
2203         (WebCore::FocusNavigationScope::scopeOf): Takes Node& instead of Node*. Renamed from focusNavigationScopeOf.
2204         (WebCore::FocusNavigationScope::scopeOwnedByShadowHost): Ditto. Renamed from focusNavigationScopeOwnedByShadowHost.
2205         (WebCore::FocusNavigationScope::scopeOwnedByIFrame): Ditto. Renamed from focusNavigationScopeOwnedByIFrame.
2206         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
2207         (WebCore::FocusController::advanceFocusInDocumentOrder):
2208         (WebCore::FocusController::findFocusableElementAcrossFocusScope): Define currentScope inside the loop now that
2209         the copy constructor of FocusNavigationScope no longer exists (since m_treeScope is a reference).
2210         (WebCore::FocusController::findFocusableElementRecursively):
2211         (WebCore::nextElementWithGreaterTabIndex):
2212         (WebCore::FocusController::nextFocusableElement):
2213         (WebCore::FocusController::previousFocusableElement):
2214
2215 2016-02-24  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2216
2217         WebRTC: Add MediaEndpoint interface (WebRTC backend abstraction)
2218         https://bugs.webkit.org/show_bug.cgi?id=150165
2219
2220         Reviewed by Eric Carlson.
2221
2222         Add the MediaEndpoint interface along with its companion objects.
2223
2224         MediaEndpoint interface: A WebRTC platform abstraction that is used to
2225         configure how the the WebRTC backend sends and receives. It also abstracts
2226         ICE functionality such as generating local candidates and doing
2227         checking on remote candidates. The RTCPeerConnection API, and other API
2228         objects such as RTCRtpSender/Receiver, live above MediaEndpoint.
2229
2230         MediaEndpointConfiguration: A settings object used to configure a
2231         MediaEndpoint with, for example, ICE helper servers and other polices.
2232         A MediaEndpointConfiguration is used to initialize a MediaEndpoint, but
2233         can also be used to update settings.
2234
2235         MediaEndpointSessionConfiguration: An object that describes how the
2236         MediaEndpoint should send and receive. Contains PeerMediaDescription,
2237         MediaPayload and IceCandidate objects.
2238
2239         Tests: The MediaEndpoint platform interface has no implementations yet.
2240
2241         * CMakeLists.txt:
2242         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
2243         (WebCore::MediaEndpointPeerConnection::gotDtlsFingerprint):
2244         (WebCore::MediaEndpointPeerConnection::gotIceCandidate):
2245         (WebCore::MediaEndpointPeerConnection::doneGatheringCandidates):
2246         (WebCore::MediaEndpointPeerConnection::gotRemoteSource):
2247         * Modules/mediastream/MediaEndpointPeerConnection.h:
2248         * WebCore.xcodeproj/project.pbxproj:
2249         * platform/mediastream/IceCandidate.h: Added.
2250         (WebCore::IceCandidate::create):
2251         (WebCore::IceCandidate::~IceCandidate):
2252         (WebCore::IceCandidate::type):
2253         (WebCore::IceCandidate::setType):
2254         (WebCore::IceCandidate::foundation):
2255         (WebCore::IceCandidate::setFoundation):
2256         (WebCore::IceCandidate::componentId):
2257         (WebCore::IceCandidate::setComponentId):
2258         (WebCore::IceCandidate::transport):
2259         (WebCore::IceCandidate::setTransport):
2260         (WebCore::IceCandidate::priority):
2261         (WebCore::IceCandidate::setPriority):
2262         (WebCore::IceCandidate::address):
2263         (WebCore::IceCandidate::setAddress):
2264         (WebCore::IceCandidate::port):
2265         (WebCore::IceCandidate::setPort):
2266         (WebCore::IceCandidate::tcpType):
2267         (WebCore::IceCandidate::setTcpType):
2268         (WebCore::IceCandidate::relatedAddress):
2269         (WebCore::IceCandidate::setRelatedAddress):
2270         (WebCore::IceCandidate::relatedPort):
2271         (WebCore::IceCandidate::setRelatedPort):
2272         (WebCore::IceCandidate::clone):
2273         (WebCore::IceCandidate::IceCandidate):
2274         * platform/mediastream/MediaEndpoint.cpp: Added.
2275         (WebCore::createMediaEndpoint):
2276         * platform/mediastream/MediaEndpoint.h: Added.
2277         (WebCore::MediaEndpointClient::~MediaEndpointClient):
2278         (WebCore::MediaEndpoint::~MediaEndpoint):
2279         * platform/mediastream/MediaEndpointConfiguration.cpp: Added.
2280         (WebCore::IceServerInfo::IceServerInfo):
2281         (WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
2282         * platform/mediastream/MediaEndpointConfiguration.h: Added.
2283         (WebCore::IceServerInfo::create):
2284         (WebCore::IceServerInfo::~IceServerInfo):
2285         (WebCore::IceServerInfo::urls):
2286         (WebCore::IceServerInfo::credential):
2287         (WebCore::IceServerInfo::username):
2288         (WebCore::MediaEndpointConfiguration::create):
2289         (WebCore::MediaEndpointConfiguration::iceServers):
2290         (WebCore::MediaEndpointConfiguration::iceTransportPolicy):
2291         (WebCore::MediaEndpointConfiguration::bundlePolicy):
2292         * platform/mediastream/MediaEndpointSessionConfiguration.h: Added.
2293         (WebCore::MediaEndpointSessionConfiguration::create):
2294         (WebCore::MediaEndpointSessionConfiguration::~MediaEndpointSessionConfiguration):
2295         (WebCore::MediaEndpointSessionConfiguration::sessionId):
2296         (WebCore::MediaEndpointSessionConfiguration::setSessionId):
2297         (WebCore::MediaEndpointSessionConfiguration::sessionVersion):
2298         (WebCore::MediaEndpointSessionConfiguration::setSessionVersion):
2299         (WebCore::MediaEndpointSessionConfiguration::mediaDescriptions):
2300         (WebCore::MediaEndpointSessionConfiguration::addMediaDescription):
2301         (WebCore::MediaEndpointSessionConfiguration::clone):
2302         (WebCore::MediaEndpointSessionConfiguration::MediaEndpointSessionConfiguration):
2303         * platform/mediastream/MediaPayload.h: Added.
2304         (WebCore::MediaPayload::create):
2305         (WebCore::MediaPayload::~MediaPayload):
2306         (WebCore::MediaPayload::type):
2307         (WebCore::MediaPayload::setType):
2308         (WebCore::MediaPayload::encodingName):
2309         (WebCore::MediaPayload::setEncodingName):
2310         (WebCore::MediaPayload::clockRate):
2311         (WebCore::MediaPayload::setClockRate):
2312         (WebCore::MediaPayload::channels):
2313         (WebCore::MediaPayload::setChannels):
2314         (WebCore::MediaPayload::ccmfir):
2315         (WebCore::MediaPayload::setCcmfir):
2316         (WebCore::MediaPayload::nackpli):
2317         (WebCore::MediaPayload::setNackpli):
2318         (WebCore::MediaPayload::nack):
2319         (WebCore::MediaPayload::setNack):
2320         (WebCore::MediaPayload::parameters):
2321         (WebCore::MediaPayload::addParameter):
2322         (WebCore::MediaPayload::clone):
2323         (WebCore::MediaPayload::MediaPayload):
2324         * platform/mediastream/PeerMediaDescription.h: Added.
2325         (WebCore::PeerMediaDescription::create):
2326         (WebCore::PeerMediaDescription::~PeerMediaDescription):
2327         (WebCore::PeerMediaDescription::type):
2328         (WebCore::PeerMediaDescription::setType):
2329         (WebCore::PeerMediaDescription::port):
2330         (WebCore::PeerMediaDescription::setPort):
2331         (WebCore::PeerMediaDescription::address):
2332         (WebCore::PeerMediaDescription::setAddress):
2333         (WebCore::PeerMediaDescription::mode):
2334         (WebCore::PeerMediaDescription::setMode):
2335         (WebCore::PeerMediaDescription::payloads):
2336         (WebCore::PeerMediaDescription::addPayload):
2337         (WebCore::PeerMediaDescription::setPayloads):
2338         (WebCore::PeerMediaDescription::rtcpMux):
2339         (WebCore::PeerMediaDescription::setRtcpMux):
2340         (WebCore::PeerMediaDescription::rtcpAddress):
2341         (WebCore::PeerMediaDescription::setRtcpAddress):
2342         (WebCore::PeerMediaDescription::rtcpPort):
2343         (WebCore::PeerMediaDescription::setRtcpPort):
2344         (WebCore::PeerMediaDescription::mediaStreamId):
2345         (WebCore::PeerMediaDescription::setMediaStreamId):
2346         (WebCore::PeerMediaDescription::mediaStreamTrackId):
2347         (WebCore::PeerMediaDescription::setMediaStreamTrackId):
2348         (WebCore::PeerMediaDescription::dtlsSetup):
2349         (WebCore::PeerMediaDescription::setDtlsSetup):
2350         (WebCore::PeerMediaDescription::dtlsFingerprintHashFunction):
2351         (WebCore::PeerMediaDescription::setDtlsFingerprintHashFunction):
2352         (WebCore::PeerMediaDescription::dtlsFingerprint):
2353         (WebCore::PeerMediaDescription::setDtlsFingerprint):
2354         (WebCore::PeerMediaDescription::cname):
2355         (WebCore::PeerMediaDescription::setCname):
2356         (WebCore::PeerMediaDescription::ssrcs):
2357         (WebCore::PeerMediaDescription::addSsrc):
2358         (WebCore::PeerMediaDescription::clearSsrcs):
2359         (WebCore::PeerMediaDescription::iceUfrag):
2360         (WebCore::PeerMediaDescription::setIceUfrag):
2361         (WebCore::PeerMediaDescription::icePassword):
2362         (WebCore::PeerMediaDescription::setIcePassword):
2363         (WebCore::PeerMediaDescription::iceCandidates):
2364         (WebCore::PeerMediaDescription::addIceCandidate):
2365         (WebCore::PeerMediaDescription::source):
2366         (WebCore::PeerMediaDescription::setSource):
2367         (WebCore::PeerMediaDescription::clone):
2368         (WebCore::PeerMediaDescription::PeerMediaDescription):
2369
2370 2016-02-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2371
2372         [Fetch API] Implement Fetch API Response
2373         https://bugs.webkit.org/show_bug.cgi?id=154536
2374
2375         Reviewed by Alex Christensen.
2376
2377         Tests: imported/w3c/web-platform-tests/fetch/api/response/response-clone.html
2378                imported/w3c/web-platform-tests/fetch/api/response/response-consume.html
2379                imported/w3c/web-platform-tests/fetch/api/response/response-error.html
2380                imported/w3c/web-platform-tests/fetch/api/response/response-idl.html
2381                imported/w3c/web-platform-tests/fetch/api/response/response-init-001.html
2382                imported/w3c/web-platform-tests/fetch/api/response/response-init-002.html
2383                imported/w3c/web-platform-tests/fetch/api/response/response-static-error.html
2384                imported/w3c/web-platform-tests/fetch/api/response/response-static-redirect.html
2385
2386         Adding Fetch Response as FetchResponse class.
2387         Constructor uses a built-in to pre-process the parameters.
2388         Support of body as ReadableStream is missing.
2389
2390         * CMakeLists.txt:
2391         * DerivedSources.make:
2392         * Modules/fetch/FetchBody.h:
2393         (WebCore::FetchBody::empty):
2394         * Modules/fetch/FetchResponse.cpp: Added.
2395         (WebCore::JSFetchResponse::body):
2396         (WebCore::isRedirectStatus):
2397         (WebCore::isNullBodyStatus):
2398         (WebCore::FetchResponse::error):
2399         (WebCore::FetchResponse::redirect):
2400         (WebCore::FetchResponse::initializeWith):
2401         (WebCore::FetchResponse::FetchResponse):
2402         (WebCore::FetchResponse::clone):
2403         (WebCore::FetchResponse::type):
2404         * Modules/fetch/FetchResponse.h: Added.
2405         (WebCore::FetchResponse::create):
2406         (WebCore::FetchResponse::redirect):
2407         (WebCore::FetchResponse::url):
2408         (WebCore::FetchResponse::redirected):
2409         (WebCore::FetchResponse::status):
2410         (WebCore::FetchResponse::ok):
2411         (WebCore::FetchResponse::statusText):
2412         (WebCore::FetchResponse::headers):
2413         (WebCore::FetchResponse::isDisturbed):
2414         (WebCore::FetchResponse::arrayBuffer):
2415         (WebCore::FetchResponse::formData):
2416         (WebCore::FetchResponse::blob):
2417         (WebCore::FetchResponse::json):
2418         (WebCore::FetchResponse::text):
2419         * Modules/fetch/FetchResponse.idl: Added.
2420         * Modules/fetch/FetchResponse.js: Added.
2421         (initializeFetchResponse):
2422         * WebCore.xcodeproj/project.pbxproj:
2423         * bindings/js/WebCoreJSBuiltins.cpp:
2424         * bindings/js/WebCoreJSBuiltins.h:
2425         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
2426         (WebCore::JSBuiltinFunctions::fetchResponseBuiltins):
2427
2428 2016-02-24  Ryosuke Niwa  <rniwa@webkit.org>
2429
2430         A function named canTakeNextToken executing blocking scripts is misleading
2431         https://bugs.webkit.org/show_bug.cgi?id=154636
2432
2433         Reviewed by Darin Adler.
2434
2435         Merged canTakeNextToken into pumpTokenizer and extracted pumpTokenizerLoop out of pumpTokenizer.
2436
2437         Inlined m_parserChunkSize in HTMLParserScheduler into checkForYieldBeforeToken, and removed needsYield
2438         from PumpSession in favor of making checkForYieldBeforeToken and checkForYieldBeforeScript return a bool.
2439
2440         No new tests since this is a pure refactoring.
2441
2442         * html/parser/HTMLDocumentParser.cpp:
2443         (WebCore::HTMLDocumentParser::canTakeNextToken): Deleted.
2444         (WebCore::HTMLDocumentParser::pumpTokenizerLoop): Extracted from pumpTokenizer. We don't have to check
2445         isStopped() at the beginning since pumpTokenizer asserts that. Return true when session.needsYield would
2446         have been set to true in the old code and return false elsewhere (for stopping or incomplete token).
2447         (WebCore::HTMLDocumentParser::pumpTokenizer):
2448         * html/parser/HTMLDocumentParser.h:
2449         * html/parser/HTMLParserScheduler.cpp:
2450         (WebCore::PumpSession::PumpSession):
2451         (WebCore::HTMLParserScheduler::HTMLParserScheduler):
2452         (WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript): Renamed from checkForYieldBeforeScript.
2453         * html/parser/HTMLParserScheduler.h:
2454         (WebCore::HTMLParserScheduler::shouldYieldBeforeToken): Renamed from checkForYieldBeforeToken.
2455         (WebCore::HTMLParserScheduler::isScheduledForResume):
2456         (WebCore::HTMLParserScheduler::checkForYield): Extracted from checkForYieldBeforeToken. Reset
2457         processedTokens to 1 instead of setting it to 0 here and incrementing it later as done in the old code.
2458
2459 2016-02-24  Daniel Bates  <dabates@apple.com>
2460
2461         CSP: Enable plugin-types directive by default
2462         https://bugs.webkit.org/show_bug.cgi?id=154420
2463         <rdar://problem/24730322>
2464
2465         Reviewed by Brent Fulgham.
2466
2467         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
2468         (WebCore::isExperimentalDirectiveName): Move plugin-types from the directives considered
2469         experimental to...
2470         (WebCore::isCSPDirectiveName): ...the list of standard directives.
2471         (WebCore::ContentSecurityPolicyDirectiveList::addDirective): Move logic to parse the plugin-types
2472         directive outside the ENABLE(CSP_NEXT) macro guarded section/experimental feature runtime flag.
2473
2474 2016-02-24  Ryan Haddad  <ryanhaddad@apple.com>
2475
2476         Speculative fix for ios build.
2477
2478         Unreviewed build fix.
2479
2480         * bindings/objc/DOM.mm:
2481         (-[DOMNode nextFocusNode]):
2482         (-[DOMNode previousFocusNode]):
2483
2484 2016-02-24  Zalan Bujtas  <zalan@apple.com>
2485
2486         Background of an absolutely positioned inline element inside text-indented parent is positioned statically.
2487         https://bugs.webkit.org/show_bug.cgi?id=154019
2488
2489         Reviewed by Simon Fraser.
2490
2491         This patch ensures that statically positioned out-of-flow renderers are also text-aligned
2492         even when none of the renderers on the first line generate a linebox (so we end up with no bidi runs at all).
2493         The fix is to pass IndentTextOrNot information to startAlignedOffsetForLine through updateStaticInlinePositionForChild
2494         so that we can compute the left position for this statically positioned out of flow renderer.
2495
2496         Test: fast/css3-text/css3-text-indent/text-indent-with-absolute-pos-child.html
2497
2498         * rendering/RenderBlockFlow.cpp:
2499         (WebCore::RenderBlockFlow::adjustPositionedBlock):
2500         (WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
2501         * rendering/RenderBlockFlow.h:
2502         * rendering/RenderBlockLineLayout.cpp:
2503         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
2504         (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
2505         * rendering/line/LineBreaker.cpp:
2506         (WebCore::LineBreaker::skipTrailingWhitespace):
2507         (WebCore::LineBreaker::skipLeadingWhitespace):
2508         * rendering/line/LineInlineHeaders.h: webkit.org/b/154628 fixes the bool vs IndentTextOrNot issue.
2509         (WebCore::setStaticPositions):
2510
2511 2016-02-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2512
2513         Remove IteratorKey and IteratorValue declarations from JSXX class declarations.
2514         https://bugs.webkit.org/show_bug.cgi?id=154577
2515
2516         Reviewed by Myles C. Maxfield.
2517
2518         No change of behavior.
2519
2520         * bindings/scripts/CodeGeneratorJS.pm:
2521         (GenerateHeader): Deleted declaration of IteratorKey and IteratorValue.
2522         * bindings/scripts/test/JS/JSTestObj.h:
2523         (WebCore::JSTestObj::createStructure): Rebasing of binding test expectation.
2524
2525 2016-02-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2526
2527         [Fetch API] Refactor FetchHeaders initialization with iterators
2528         https://bugs.webkit.org/show_bug.cgi?id=154537
2529
2530         Reviewed by Darin Adler.
2531
2532         Covered by existing tests.
2533
2534         * Modules/fetch/FetchHeaders.cpp:
2535         (WebCore::initializeWith): Deleted.
2536         * Modules/fetch/FetchHeaders.h: Removed FetchHeaders::initializeWith.
2537         * Modules/fetch/FetchHeaders.idl: Ditto.
2538         * Modules/fetch/FetchHeaders.js:
2539         (initializeFetchHeaders): Making use of iterators to fill headers.
2540
2541 2016-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2542
2543         Unreviewed. Fix GObject DOM bindings API break after r196998.
2544
2545         webkit_dom_node_clone_node can now raise exceptions, so rename it
2546         as webkit_dom_node_clone_node_with_error and deprecate the old one
2547         that calls the new one ignoring the error.
2548
2549         * bindings/gobject/WebKitDOMDeprecated.cpp:
2550         (webkit_dom_node_clone_node):
2551         * bindings/gobject/WebKitDOMDeprecated.h:
2552         * bindings/gobject/WebKitDOMDeprecated.symbols:
2553         * bindings/gobject/webkitdom.symbols:
2554         * bindings/scripts/CodeGeneratorGObject.pm:
2555         (FunctionUsedToNotRaiseException):
2556         (GenerateFunction):
2557
2558 2016-02-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2559
2560         REGRESSION(r195949): [GTK] Test /webkit2/WebKitWebView/insert/link is failing since r195949
2561         https://bugs.webkit.org/show_bug.cgi?id=153747
2562
2563         Reviewed by Michael Catanzaro.
2564
2565         Do not return early when reaching a boundary if there's a range
2566         selection. In that case, the selection will be cleared and
2567         accessibility will be notified.
2568
2569         Test: editing/selection/move-to-line-boundary-clear-selection.html
2570
2571         * editing/FrameSelection.cpp:
2572         (WebCore::FrameSelection::modify):
2573
2574 2016-02-24  Alejandro G. Castro  <alex@igalia.com>
2575
2576         [Gstreamer] Mediaplayer should observe the tracks and not the source
2577         https://bugs.webkit.org/show_bug.cgi?id=154582
2578
2579         Reviewed by Philippe Normand.
2580
2581         We have to observe the track objects that define the
2582         mediastream. Replace the source attributes with the new tracks and
2583         use them properly in the class.
2584
2585         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
2586         (WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
2587         Make sure we are not observing anymore the tracks after
2588         destruction.
2589         (WebCore::MediaPlayerPrivateGStreamerOwr::hasVideo): Used the track
2590         instead of the source.
2591         (WebCore::MediaPlayerPrivateGStreamerOwr::hasAudio): Ditto.
2592         (WebCore::MediaPlayerPrivateGStreamerOwr::currentTime): Ditto.
2593         (WebCore::MediaPlayerPrivateGStreamerOwr::internalLoad): Ditto.
2594         (WebCore::MediaPlayerPrivateGStreamerOwr::stop): Ditto.
2595         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): Added, new
2596         track observer API, make sure we disable the ended tracks.
2597         (WebCore::MediaPlayerPrivateGStreamerOwr::trackMutedChanged):
2598         Added, new track observer API.
2599         (WebCore::MediaPlayerPrivateGStreamerOwr::trackSettingsChanged):
2600         Added, new track observer API.
2601         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
2602         Added, new track observer API.
2603         (WebCore::MediaPlayerPrivateGStreamerOwr::sourceStopped): Deleted,
2604         source observer API.
2605         (WebCore::MediaPlayerPrivateGStreamerOwr::sourceMutedChanged):
2606         Deleted, source observer API.
2607         (WebCore::MediaPlayerPrivateGStreamerOwr::sourceSettingsChanged):
2608         Deleted, source observer API.
2609         (WebCore::MediaPlayerPrivateGStreamerOwr::preventSourceFromStopping):
2610         Deleted, source observer API.
2611         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
2612         Replaced the attributes representing the source with the tracks
2613         and added the new track observer functions.
2614
2615 2016-02-23  Sergio Villar Senin  <svillar@igalia.com>
2616
2617         [css-grid] Swap the order of columns/rows in grid-gap shorthand
2618         https://bugs.webkit.org/show_bug.cgi?id=154584
2619
2620         The latest editor's draft have just changed the order. Now it
2621         should be <grid-row-gap> <grid-column-gap>?.
2622
2623         Reviewed by Darin Adler.
2624
2625         * css/CSSParser.cpp:
2626         (WebCore::CSSParser::parseGridGapShorthand):
2627         * css/CSSPropertyNames.in:
2628
2629 2016-02-24  Ryosuke Niwa  <rniwa@webkit.org>
2630
2631         Move FocusNavigationScope into FocusController.cpp
2632         https://bugs.webkit.org/show_bug.cgi?id=154630
2633
2634         Reviewed by Darin Adler.
2635
2636         Moved FocusNavigationScope from FocusController.h to FocusController.cpp.
2637
2638         * bindings/objc/DOM.mm:
2639         (-[DOMNode nextFocusNode]):
2640         (-[DOMNode previousFocusNode]):
2641         * page/FocusController.cpp:
2642         (WebCore::parentInScope):
2643         (WebCore::FocusNavigationScope::firstChildInScope): Moved into FocusNavigationScope.
2644         (WebCore::FocusNavigationScope::lastChildInScope): Ditto.
2645         (WebCore::FocusNavigationScope::nextInScope): Ditto.
2646         (WebCore::FocusNavigationScope::previousInScope): Ditto.
2647         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
2648         (WebCore::FocusController::findFocusableElementRecursively):
2649         (WebCore::FocusController::findFocusableElement):
2650         (WebCore::nextElementWithGreaterTabIndex):
2651         (WebCore::previousElementWithLowerTabIndex):
2652         (WebCore::FocusController::nextFocusableElement): Added a variant for DOM.mm and WebPageIOS.mm.
2653         (WebCore::FocusController::previousFocusableElement): Ditto.
2654         (WebCore::FocusController::nextFocusableElement):
2655         (WebCore::FocusController::previousFocusableElement): Use if instead of for loop for clarity.
2656         * page/FocusController.h:
2657
2658 2016-02-24  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2659
2660         WebRTC: RTCPeerConnection: Sort out responsibilities of close() and stop()
2661         https://bugs.webkit.org/show_bug.cgi?id=154581
2662
2663         Reviewed by Eric Carlson.
2664
2665         Let RTCPeerConnection::close() contain all teardown logic be called by stop().
2666         close() is also responisble for stopping the PeerConnectionBackend and stopping
2667         all RTCRtpSender objects.
2668
2669         Test coverage:
2670         fast/mediastream/RTCRtpSender-replaceTrack.html (updated)
2671         fast/mediastream/RTCPeerConnection-closed-state.html
2672
2673         * Modules/mediastream/RTCPeerConnection.cpp:
2674         (WebCore::RTCPeerConnection::close):
2675         (WebCore::RTCPeerConnection::stop):
2676         (WebCore::RTCPeerConnection::RTCPeerConnection): Deleted.
2677         * Modules/mediastream/RTCPeerConnection.h:
2678
2679 2016-02-24  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2680
2681         WebRTC: Add addReceiver() function to PeerConnectionBackendClient interface
2682         https://bugs.webkit.org/show_bug.cgi?id=154583
2683
2684         Reviewed by Eric Carlson.
2685
2686         The addRecevier() notifies the PeerConnectionBackendClient that a new RTCRtpReceiver,
2687         representing an MediaStreamTrack received from a remote peer, is added.
2688
2689         * Modules/mediastream/PeerConnectionBackend.h:
2690         * Modules/mediastream/RTCPeerConnection.cpp:
2691         (WebCore::RTCPeerConnection::addReceiver):
2692         * Modules/mediastream/RTCPeerConnection.h:
2693
2694 2016-02-23  Olivier Blin  <olivier.blin@softathome.com>
2695
2696         Support building LocaleICU with light ICU (UCONFIG_NO_FORMATTING)
2697         https://bugs.webkit.org/show_bug.cgi?id=154484
2698
2699         Reviewed by Darin Adler.
2700
2701         In this mode, this makes LocaleICU with UCONFIG_NO_FORMATTING
2702         essentially the same as LocaleNone, but allows to keep using ICU for
2703         other features.
2704
2705         * platform/text/LocaleICU.cpp:
2706         (WebCore::LocaleICU::LocaleICU):
2707         (WebCore::LocaleICU::~LocaleICU):
2708         (WebCore::LocaleICU::initializeLocaleData):
2709         * platform/text/LocaleICU.h:
2710
2711 2016-02-23  Myles C. Maxfield  <mmaxfield@apple.com>
2712
2713         Remove dead FontLoader code
2714         https://bugs.webkit.org/show_bug.cgi?id=154625
2715
2716         Reviewed by Darin Adler.
2717
2718         This code has been replaced by FontFaceSet.
2719
2720         No new tests because there is no behavior change.
2721
2722         * CMakeLists.txt:
2723         * DerivedSources.cpp:
2724         * DerivedSources.make:
2725         * WebCore.vcxproj/WebCore.vcxproj:
2726         * WebCore.vcxproj/WebCore.vcxproj.filters:
2727         * WebCore.xcodeproj/project.pbxproj:
2728         * css/CSSAllInOne.cpp:
2729         * css/FontLoader.cpp: Removed.
2730         (WebCore::LoadFontCallback::create): Deleted.
2731         (WebCore::LoadFontCallback::createFromParams): Deleted.
2732         (WebCore::LoadFontCallback::~LoadFontCallback): Deleted.
2733         (WebCore::LoadFontCallback::familyCount): Deleted.
2734         (WebCore::LoadFontCallback::LoadFontCallback): Deleted.
2735         (WebCore::LoadFontCallback::notifyLoaded): Deleted.
2736         (WebCore::LoadFontCallback::notifyError): Deleted.
2737         (WebCore::FontLoader::loadFontDone): Deleted.
2738         (WebCore::FontLoader::FontLoader): Deleted.
2739         (WebCore::FontLoader::~FontLoader): Deleted.
2740         (WebCore::FontLoader::eventTargetData): Deleted.
2741         (WebCore::FontLoader::ensureEventTargetData): Deleted.
2742         (WebCore::FontLoader::eventTargetInterface): Deleted.
2743         (WebCore::FontLoader::scriptExecutionContext): Deleted.
2744         (WebCore::FontLoader::didLayout): Deleted.
2745         (WebCore::FontLoader::activeDOMObjectName): Deleted.
2746         (WebCore::FontLoader::canSuspendForDocumentSuspension): Deleted.
2747         (WebCore::FontLoader::scheduleEvent): Deleted.
2748         (WebCore::FontLoader::firePendingEvents): Deleted.
2749         (WebCore::FontLoader::beginFontLoading): Deleted.
2750         (WebCore::FontLoader::fontLoaded): Deleted.
2751         (WebCore::FontLoader::loadError): Deleted.
2752         (WebCore::FontLoader::notifyWhenFontsReady): Deleted.
2753         (WebCore::FontLoader::loadingDone): Deleted.
2754         (WebCore::FontLoader::loadFont): Deleted.
2755         (WebCore::FontLoader::checkFont): Deleted.
2756         (WebCore::applyPropertyToCurrentStyle): Deleted.
2757         (WebCore::FontLoader::resolveFontStyle): Deleted.
2758         * css/FontLoader.h: Removed.
2759         * css/FontLoader.idl: Removed.
2760         * page/FrameView.cpp:
2761
2762 2016-02-23  Per Arne Vollan  <peavo@outlook.com>
2763
2764         [WinCairo][MediaFoundation] Implement methods to set volume.
2765         https://bugs.webkit.org/show_bug.cgi?id=154580
2766
2767         Reviewed by Alex Christensen.
2768
2769         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2770         (WebCore::MediaPlayerPrivateMediaFoundation::paused):
2771         (WebCore::MediaPlayerPrivateMediaFoundation::setVolume):
2772         (WebCore::MediaPlayerPrivateMediaFoundation::supportsMuting):
2773         (WebCore::MediaPlayerPrivateMediaFoundation::setMuted):
2774         (WebCore::MediaPlayerPrivateMediaFoundation::networkState):
2775         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2776
2777 2016-02-23  Chris Dumez  <cdumez@apple.com>
2778
2779         [Reflected] IDL attributes of integer types should use HTML rules for parsing integers
2780         https://bugs.webkit.org/show_bug.cgi?id=154573
2781
2782         Reviewed by Darin Adler.
2783
2784         [Reflected] IDL attributes of integer types should use HTML rules for
2785         parsing integers:
2786         - https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes
2787
2788         Those rules are defined here:
2789         - https://html.spec.whatwg.org/#rules-for-parsing-integers
2790         - https://html.spec.whatwg.org/#rules-for-parsing-non-negative-integers
2791
2792         We already had an implementation for parsing HTML integers but our reflected
2793         attributes currently use WTFString::toInt() / toUint() instead.
2794
2795         No new tests, already covered by existing tests.
2796
2797         * dom/Element.cpp:
2798         (WebCore::Element::getIntegralAttribute):
2799         This method used by the bindings only, for reflected IDL attributed of
2800         type 'long'. Now call parseHTMLInteger() instead of String::toInt() to
2801         parse the content attribute as per the HTML specification.
2802
2803         (WebCore::Element::getUnsignedIntegralAttribute):
2804         This method used by the bindings only, for reflected IDL attributed of
2805         type 'unsigned long'. Now call parseHTMLNonNegativeInteger() instead of
2806         String::toUInt() to parse the content attribute as per the HTML
2807         specification.
2808
2809         * html/parser/HTMLParserIdioms.cpp:
2810         (WebCore::parseHTMLIntegerInternal):
2811         Fix a bug in our implementation of parseHTMLIntegerInternal() that
2812         would cause the string "−2147483648" to be parsed as 0. It should
2813         be parsed as −2147483648, which is in the valid range as per:
2814         http://heycam.github.io/webidl/#idl-long
2815
2816 2016-02-23  Chris Dumez  <cdumez@apple.com>
2817
2818         Align our implementation of Range.createContextualFragment with the specification
2819         https://bugs.webkit.org/show_bug.cgi?id=154627
2820
2821         Reviewed by Ryosuke Niwa.
2822
2823         Align our implementation of Range.createContextualFragment with the
2824         specification:
2825         - https://w3c.github.io/DOM-Parsing/#widl-Range-createContextualFragment-DocumentFragment-DOMString-fragment
2826
2827         In particular, if the Range's start node is a Document / DocumentFragment,
2828         we now create a new HTMLBodyElement and use it as context element, instead
2829         of throwing an exception.
2830
2831         This also aligns our behavior with Firefox and Chrome.
2832
2833         Tests: imported/blink/fast/dom/Range/create-contextual-fragment-from-bodyless-document-range.html
2834                imported/blink/fast/dom/Range/create-contextual-fragment-from-detached-text-node-range.html
2835                imported/blink/fast/dom/Range/create-contextual-fragment-from-document-fragment-range.html
2836                imported/blink/fast/dom/Range/create-contextual-fragment-from-document-range.html
2837                imported/blink/fast/dom/Range/create-contextual-fragment-from-xhtml-document-range.xhtml
2838                imported/blink/fast/dom/Range/create-contextual-fragment-script-not-ran.html
2839                imported/blink/fast/dom/Range/create-contextual-fragment-script-unmark-already-started.html
2840
2841         * dom/Range.cpp:
2842         (WebCore::Range::createContextualFragment):
2843
2844 2016-02-23  Dan Bernstein  <mitz@apple.com>
2845
2846         [Xcode] Linker errors display mangled names, but no longer should
2847         https://bugs.webkit.org/show_bug.cgi?id=154632
2848
2849         Reviewed by Sam Weinig.
2850
2851         * Configurations/Base.xcconfig: Stop setting LINKER_DISPLAYS_MANGLED_NAMES to YES.
2852
2853 2016-02-23  Dean Jackson  <dino@apple.com>
2854
2855         [WebGL] iOS doesn't respect the alpha:false context creation attribute
2856         https://bugs.webkit.org/show_bug.cgi?id=154617
2857         <rdar://problem/13417023>
2858
2859         Reviewed by Sam Weinig.
2860
2861         On iOS we were not respecting the alpha:false context creation
2862         attribute, which meant you always got output that could
2863         have an alpha channel.
2864
2865         The good news is that now we're setting the opaque flag on
2866         the CALayer, there should be a performance improvement when
2867         compositing WebGL into the page.
2868
2869         Test: fast/canvas/webgl/context-attributes-alpha.html
2870
2871         * platform/graphics/mac/GraphicsContext3DMac.mm:
2872         (WebCore::GraphicsContext3D::GraphicsContext3D): Don't tell the layer
2873         to be transparent.
2874         (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): Do it
2875         here instead, but based on the value of the alpha attribute.
2876
2877 2016-02-23  Daniel Bates  <dabates@apple.com>
2878
2879         CSP: Enable base-uri directive by default
2880         https://bugs.webkit.org/show_bug.cgi?id=154521
2881         <rdar://problem/24762032>
2882
2883         Reviewed by Brent Fulgham.
2884
2885         Tests: http/tests/security/contentSecurityPolicy/1.1/base-uri-default-ignored.html
2886                http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-base-uri-deny.html
2887
2888         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
2889         (WebCore::isExperimentalDirectiveName): Move base-uri from the directives considered
2890         experimental to...
2891         (WebCore::isCSPDirectiveName): ...the list of standard directives.
2892         (WebCore::ContentSecurityPolicyDirectiveList::addDirective): Move logic to parse the base-uri
2893         directive outside the ENABLE(CSP_NEXT) macro guarded section/experimental feature runtime flag.
2894
2895 2016-02-23  Gavin Barraclough  <barraclough@apple.com>
2896
2897         Remove HIDDEN_PAGE_DOM_TIMER_THROTTLING feature define
2898         https://bugs.webkit.org/show_bug.cgi?id=112323
2899
2900         Reviewed by Chris Dumez.
2901
2902         This feature is controlled by a runtime switch, and defaults off.
2903
2904         * Configurations/FeatureDefines.xcconfig:
2905         * page/Page.cpp:
2906         (WebCore::Page::setTimerThrottlingEnabled):
2907         * page/Settings.cpp:
2908         (WebCore::Settings::Settings):
2909         (WebCore::Settings::shouldRespectPriorityInCSSAttributeSetters):
2910         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
2911         (WebCore::Settings::setHiddenPageDOMTimerThrottlingAutoIncreases):
2912         * page/Settings.h:
2913         (WebCore::Settings::layoutInterval):
2914         (WebCore::Settings::hiddenPageDOMTimerThrottlingEnabled):
2915         (WebCore::Settings::hiddenPageDOMTimerThrottlingAutoIncreases):
2916
2917 2016-02-23  Gavin Barraclough  <barraclough@apple.com>
2918
2919         Add a mechanism to automatically ramp up timer alignment.
2920         https://bugs.webkit.org/show_bug.cgi?id=154578
2921
2922         Reviewed by Antti Koivisto & Chris Dumez.
2923
2924         Allow timer alignment duration to be proportional to the time the page
2925         has been hidden. This implementation does so by scaling up the throttle
2926         in exponential steps, spaced exponentially far apart.
2927
2928         * page/Page.cpp:
2929         (WebCore::Page::Page):
2930             - initialize timer.
2931         (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged):
2932             - if setting are changed fully disable/reenable to ensure new setting are read.
2933         (WebCore::Page::setTimerThrottlingEnabled):
2934             - enebled bool flag converted to an Optional<double>, tracking time throttling
2935               is enabled.
2936         (WebCore::Page::setDOMTimerAlignmentInterval):
2937             - when new mechanism is enabled schedule a timer to step up alignment.
2938         (WebCore::Page::timerAlignmentIntervalIncreaseTimerFired):
2939             - when timer fires increase alignment.
2940         * page/Page.h:
2941             - added new member.
2942         * page/Settings.cpp:
2943         (WebCore::Settings::Settings):
2944             - initialize new member.
2945         (WebCore::Settings::setHiddenPageDOMTimerThrottlingAutoIncreaseLimit):
2946             - added, update new setting. Setting to zero disabled. A non-zero value is a
2947               duration in seconds for timer throttling to ramp up to.
2948         * page/Settings.h:
2949         (WebCore::Settings::hiddenPageDOMTimerThrottlingAutoIncreases):
2950             - read as boolean whether throttle increasing is enabled.
2951         (WebCore::Settings::hiddenPageDOMTimerThrottlingAutoIncreaseLimit):
2952             - read throttle increasing limit.
2953
2954 2016-02-22  Ada Chan  <adachan@apple.com>
2955
2956         Refactor script that updates fullscreen buttons.
2957         https://bugs.webkit.org/show_bug.cgi?id=154562
2958
2959         Reviewed by Dean Jackson.
2960
2961         Also expose extra property and element in getCurrentControlsStatus() for future testing.
2962
2963         * Modules/mediacontrols/mediaControlsApple.js:
2964         (Controller.prototype.updatePictureInPictureButton):
2965         (Controller.prototype.updateFullscreenButtons):
2966
2967 2016-02-22  Ryosuke Niwa  <rniwa@webkit.org>
2968
2969         Calling importNode on shadow root causes a crash
2970         https://bugs.webkit.org/show_bug.cgi?id=154570
2971
2972         Reviewed by Anders Carlsson.
2973
2974         The bug was caused by a missing check in cloneNode. Added cloneNodeForBindings to explicitly throw
2975         an NotSupportedError when it's called on a shadow root. We don't clone shadow root when deep-cloning
2976         the tree so we don't have to check that condition.
2977
2978         The behavior of cloneNode is specified at:
2979         http://w3c.github.io/webcomponents/spec/shadow/#the-shadowroot-interface
2980         (it current says we should throw DATA_CLONE_ERR but I have an spec bug filed at
2981         https://github.com/w3c/webcomponents/issues/393)
2982
2983         The behavior of importNode and adoptNode are specified in DOM4 specification:
2984         https://dom.spec.whatwg.org/#dom-document-importnode
2985         https://dom.spec.whatwg.org/#dom-document-adoptnode
2986
2987         Tests: fast/shadow-dom/Document-prototype-adoptNode.html
2988                fast/shadow-dom/Document-prototype-importNode.html
2989                fast/shadow-dom/Node-prototype-cloneNode.html
2990
2991         * dom/Document.cpp:
2992         (WebCore::Document::importNode): Throw NotSupportedError when importing a shadow root.
2993         * dom/Node.cpp:
2994         (WebCore::Node::cloneNodeForBindings): Added.
2995         * dom/Node.h:
2996         * dom/Node.idl: Use cloneNodeForBindings here.
2997
2998 2016-02-23  Daniel Bates  <dabates@apple.com>
2999
3000         REGRESSION (r196892): No longer emit error message when CSP form-action directive is used as a source expression
3001         https://bugs.webkit.org/show_bug.cgi?id=154555
3002         <rdar://problem/24776777>
3003
3004         Reviewed by Andy Estes.
3005
3006         Fixes an issue where an error message is not emitted when directive form-action is used as a
3007         source expression. Prior to <http://trac.webkit.org/changeset/196892>, when directive form-action
3008         was used as a source expression a console error message would be emitted with the form:
3009
3010             The Content Security Policy directive 'script-src' contains 'form-action' as a source expression.
3011             Did you mean 'script-src ...; form-action...' (note the semicolon)?
3012
3013         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
3014         (WebCore::isCSPDirectiveName): Return true if the specified directive name is "form-action".
3015
3016 2016-02-23  Simon Fraser  <simon.fraser@apple.com>
3017
3018         Lay the groundwork for more constness in StyleResolver-related code
3019         https://bugs.webkit.org/show_bug.cgi?id=154598
3020
3021         Reviewed by Antti Koivisto.
3022
3023         Make some of the leaf functions that are used by the style resolver take 
3024         const CSSValues, and use 'auto' more to automatically get const stack variables
3025         when appropriate.
3026
3027         * css/CSSBorderImageSliceValue.h:
3028         (WebCore::CSSBorderImageSliceValue::slices):
3029         * css/CSSPrimitiveValue.h:
3030         (WebCore::CSSPrimitiveValue::isQuirkValue):
3031         * css/FontVariantBuilder.cpp:
3032         (WebCore::extractFontVariantLigatures):
3033         (WebCore::extractFontVariantNumeric):
3034         (WebCore::extractFontVariantEastAsian):
3035         * css/FontVariantBuilder.h:
3036         * css/StyleBuilderConverter.h:
3037         (WebCore::StyleBuilderConverter::convertReflection):
3038         (WebCore::StyleBuilderConverter::convertGridAutoFlow):
3039         * css/StyleBuilderCustom.h:
3040         (WebCore::StyleBuilderCustom::applyValueSize):
3041         (WebCore::StyleBuilderCustom::applyValueStroke):
3042         * css/StyleResolver.cpp:
3043         (WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement):
3044         (WebCore::StyleResolver::colorFromPrimitiveValue):
3045         (WebCore::StyleResolver::createFilterOperations):
3046         * css/StyleResolver.h:
3047         * css/TransformFunctions.cpp:
3048         (WebCore::transformsForValue):
3049         * css/TransformFunctions.h:
3050         * rendering/style/StylePendingImage.h:
3051         * svg/SVGLength.cpp:
3052         (WebCore::SVGLength::fromCSSPrimitiveValue):
3053         * svg/SVGLength.h:
3054
3055 2016-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
3056
3057         [css-grid] Avoid duplicated calls to resolution code
3058         https://bugs.webkit.org/show_bug.cgi?id=154336
3059
3060         Reviewed by Sergio Villar Senin.
3061
3062         We were calling GridResolvedPosition::resolveGridPositionsFromStyle()
3063         several times per item.
3064
3065         We can store the GridCoordinates in
3066         RenderGrid::populateExplicitGridAndOrderIterator()
3067         and reuse them in the placement code.
3068         Once RenderGrid::placeItemsOnGrid() is over,
3069         all the items will have a definite position in both axis.
3070
3071         No new tests, no change of behavior.
3072
3073         * rendering/RenderGrid.cpp:
3074         (WebCore::RenderGrid::insertItemIntoGrid):
3075         (WebCore::RenderGrid::placeItemsOnGrid):
3076         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
3077         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
3078         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
3079         (WebCore::RenderGrid::cachedGridCoordinate):
3080         (WebCore::RenderGrid::cachedGridSpan):
3081         * rendering/RenderGrid.h:
3082
3083 2016-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
3084
3085         [css-grid] Rows track sizes are optional in grid-template shorthand
3086         https://bugs.webkit.org/show_bug.cgi?id=154586
3087
3088         Reviewed by Sergio Villar Senin.
3089
3090         You can omit the size of the rows in grid-template shorthand,
3091         even if you specify a named grid line for the end of the row,
3092         due to a change in the spec back in 2014:
3093         https://github.com/w3c/csswg-drafts/commit/9f660c4183c73c1f5279c46904dc6cb314f76194
3094
3095         Before if you want to specify a named grid line,
3096         you need to set the row size.
3097
3098         Update parsing, so it nows accepts things like:
3099             grid-template: 100px / "a" [bottom];
3100
3101         * css/CSSParser.cpp:
3102         (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns):
3103         (WebCore::CSSParser::parseGridTemplateShorthand):
3104
3105 2016-02-23  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
3106
3107         [SVG] Update SVG source to return string literals as ASCIILiteral and add test cases for case sensitivity
3108         https://bugs.webkit.org/show_bug.cgi?id=154373
3109
3110         Reviewed by Youenn Fablet.
3111
3112         Update SVGAnimatedEnumeration toString method to return ASCIILiteral for string literals and add test cases for
3113         case-sensitivity for these elements.
3114
3115         Test: svg/dom/SVGAnimatedEnumeration-case-sensitive.html
3116
3117         * svg/SVGComponentTransferFunctionElement.h:
3118         (WebCore::SVGPropertyTraits<ComponentTransferType>::toString):
3119         * svg/SVGFEBlendElement.h:
3120         (WebCore::SVGPropertyTraits<BlendMode>::toString):
3121         * svg/SVGFEColorMatrixElement.h:
3122         (WebCore::SVGPropertyTraits<ColorMatrixType>::toString):
3123         * svg/SVGFECompositeElement.h:
3124         (WebCore::SVGPropertyTraits<CompositeOperationType>::toString):
3125         * svg/SVGFEConvolveMatrixElement.h:
3126         (WebCore::SVGPropertyTraits<EdgeModeType>::toString):
3127         * svg/SVGFEDisplacementMapElement.h:
3128         (WebCore::SVGPropertyTraits<ChannelSelectorType>::toString):
3129         * svg/SVGFEMorphologyElement.h:
3130         (WebCore::SVGPropertyTraits<MorphologyOperatorType>::toString):
3131         * svg/SVGFETurbulenceElement.h:
3132         (WebCore::SVGPropertyTraits<SVGStitchOptions>::toString):
3133         (WebCore::SVGPropertyTraits<TurbulenceType>::toString):
3134         * svg/SVGGradientElement.h:
3135         (WebCore::SVGPropertyTraits<SVGSpreadMethodType>::toString):
3136         * svg/SVGMarkerElement.h:
3137         (WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::toString):
3138         * svg/SVGTextContentElement.h:
3139         (WebCore::SVGPropertyTraits<SVGLengthAdjustType>::toString):
3140         * svg/SVGTextPathElement.h:
3141         (WebCore::SVGPropertyTraits<SVGTextPathMethodType>::toString):
3142         (WebCore::SVGPropertyTraits<SVGTextPathSpacingType>::toString):
3143         * svg/SVGUnitTypes.h:
3144         (WebCore::SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::toString):
3145
3146 2016-02-23  Csaba Osztrogonác  <ossy@webkit.org>
3147
3148         [Mac][cmake] Unreviewed speculative buildfix after r196779. Just for fun.
3149
3150         * PlatformMac.cmake:
3151
3152 2016-02-23  Antti Koivisto  <antti@apple.com>
3153
3154         Remove tab suspension code
3155         https://bugs.webkit.org/show_bug.cgi?id=154585
3156
3157         Reviewed by Andreas Kling.
3158
3159         It causes too many problems.
3160
3161         * page/Page.cpp:
3162         (WebCore::networkStateChanged):
3163         (WebCore::Page::Page):
3164         (WebCore::Page::setPageActivityState):
3165         (WebCore::Page::setIsVisible):
3166         (WebCore::Page::setIsVisibleInternal):
3167         (WebCore::Page::setIsPrerender):
3168         (WebCore::Page::setResourceUsageOverlayVisible):
3169         (WebCore::Page::canTabSuspend): Deleted.
3170         (WebCore::Page::setIsTabSuspended): Deleted.
3171         (WebCore::Page::setTabSuspensionEnabled): Deleted.
3172         (WebCore::Page::updateTabSuspensionState): Deleted.
3173         (WebCore::Page::tabSuspensionTimerFired): Deleted.
3174         * page/Page.h:
3175         (WebCore::Page::setEditable):
3176         (WebCore::Page::isEditable):
3177         (WebCore::Page::setShowAllPlugins):
3178
3179 2016-02-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3180
3181         Refactor DOM Iterator next signature
3182         https://bugs.webkit.org/show_bug.cgi?id=154531
3183
3184         Reviewed by Myles C. Maxfield.
3185
3186         Covered by existing tests.
3187
3188         * Modules/fetch/FetchHeaders.cpp:
3189         (WebCore::FetchHeaders::Iterator::next): Using Optional<KeyValuePair> to return iterator value.
3190         * Modules/fetch/FetchHeaders.h:
3191         * bindings/js/JSKeyValueIterator.h: Using Optional<KeyValuePair> as returned iterator value.
3192         (WebCore::keyValueIteratorForEach):
3193         (WebCore::JSKeyValueIterator<JSWrapper>::next):
3194         * css/FontFaceSet.cpp:
3195         (WebCore::FontFaceSet::Iterator::next): Using Optional<KeyValuePair> to return iterator value.
3196         * css/FontFaceSet.h:
3197
3198 2016-02-22  Gavin Barraclough  <barraclough@apple.com>
3199
3200         Some timer alignment cleanup.
3201         https://bugs.webkit.org/show_bug.cgi?id=154559
3202
3203         Reviewed by Chris Dumez.
3204
3205         Document shouldn't override Page's timer alignment policy with a lower alignment,
3206         and m_domTimerAlignmentInterval isn't really a Settings, it's just the current state
3207         for the page.
3208
3209         * dom/Document.cpp:
3210         (WebCore::Document::timerAlignmentInterval):
3211             - take the max of the possible intervals.
3212         * page/Page.cpp:
3213         (WebCore::Page::Page):
3214         (WebCore::Page::setTimerThrottlingEnabled):
3215         (WebCore::Page::setDOMTimerAlignmentInterval):
3216             - moved here from Settings.
3217         * page/Page.h:
3218         (WebCore::Page::domTimerAlignmentInterval):
3219             - moved here from Settings.
3220         * page/Settings.cpp:
3221         (WebCore::Settings::setDOMTimerAlignmentInterval): Deleted.
3222             - moved to Page.
3223         * page/Settings.h:
3224         (WebCore::Settings::domTimerAlignmentInterval): Deleted.
3225             - moved to Page.
3226
3227 2016-02-22  Myles C. Maxfield  <mmaxfield@apple.com>
3228
3229         Font features specified in @font-face blocks don't apply to local() families
3230         https://bugs.webkit.org/show_bug.cgi?id=154554
3231
3232         Reviewed by Dean Jackson.
3233
3234         The correct variables just need to be wired up. In addition, our caches need to be sensitive
3235         to the new data.
3236
3237         Test: css3/font-feature-font-face-local.html
3238
3239         * css/CSSFontFaceSource.cpp:
3240         (WebCore::CSSFontFaceSource::font):
3241         * platform/graphics/FontCache.cpp:
3242         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
3243         (WebCore::FontPlatformDataCacheKey::operator==):
3244         (WebCore::FontPlatformDataCacheKeyHash::hash):
3245         (WebCore::FontCache::getCachedFontPlatformData):
3246         (WebCore::FontCache::fontForFamily):
3247         * platform/graphics/FontCache.h:
3248         * platform/graphics/FontFeatureSettings.h:
3249         (WebCore::FontFeature::operator!=):
3250         (WebCore::FontFeatureSettings::operator!=):
3251         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3252         (WebCore::fontWithFamily):
3253         (WebCore::FontCache::createFontPlatformData):
3254         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3255         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
3256         * platform/graphics/mac/FontCacheMac.mm:
3257         (WebCore::FontCache::lastResortFallbackFont):
3258         * platform/text/TextFlags.h:
3259         (WebCore::FontVariantSettings::operator==):
3260         (WebCore::FontVariantSettings::operator!=):
3261         (WebCore::FontVariantSettings::uniqueValue):
3262
3263 2016-02-22  Daniel Bates  <dabates@apple.com>
3264
3265         REGRESSION (r196892): Crash in DocumentLoader::startLoadingMainResource()
3266         https://bugs.webkit.org/show_bug.cgi?id=154563
3267         <rdar://problem/24780678>
3268
3269         Reviewed by Alexey Proskuryakov.
3270
3271         Fixes an issue where the provisional loader may be deallocated when starting
3272         a load. One example where this can occur is when cancelling the provisional load
3273         as part of a form submission because the Content Security Policy of the page
3274         blocks the submission (it violates the directive form-action).
3275
3276         This crash is covered by the test http/tests/security/contentSecurityPolicy/1.1/form-action-src-blocked.html.
3277
3278         * loader/DocumentLoader.cpp:
3279         (WebCore::DocumentLoader::startLoadingMainResource): Take a ref before calling
3280         DocumentLoader::willSendRequest().
3281
3282 2016-02-16  Ada Chan  <adachan@apple.com>
3283
3284         Implement basic functionality in WebVideoFullscreenInterfaceMac.
3285         https://bugs.webkit.org/show_bug.cgi?id=153241
3286
3287         Reviewed by Beth Dakin.
3288
3289         * platform/cocoa/WebVideoFullscreenInterface.h:
3290         * platform/mac/WebVideoFullscreenInterfaceMac.h:
3291         * platform/mac/WebVideoFullscreenInterfaceMac.mm:
3292         (WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
3293         (WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
3294         (WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen):
3295         (WebCore::WebVideoFullscreenInterfaceMac::cleanupFullscreen):
3296         (WebCore::WebVideoFullscreenInterfaceMac::invalidate):
3297         (WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):
3298
3299 2016-02-22  Chris Dumez  <cdumez@apple.com>
3300
3301         REGRESSION (r196563): Images not loading on https://klim.co.nz/blog/paypal-sans-design-information/
3302         https://bugs.webkit.org/show_bug.cgi?id=154547
3303         <rdar://problem/24772167>
3304
3305         Reviewed by Gavin Barraclough.
3306
3307         The Website was doing the following:
3308         $ var e = window.addEventListener;
3309         $ e("eventname", handler)
3310
3311         In such case, the jsEventTargetPrototypeFunctionDispatchEvent() bindings
3312         implementation was caused with a thisValue which is a JSLexicalEnvironment
3313         and the implementation did not know how to convert it into a global object.
3314         The previous implementation on JSDOMWindow used to handle tis correctly
3315         because it was always calling JSValue::toThis() on the thisValue before
3316         trying to cast it to a JSDOMWindow, and JSLexicalEnvironment::toThis()
3317         gets the globalThisValue. This patch updates the EventTarget bindings
3318         code to call always call toThis() on the thisValue before trying to
3319         cast it. This should correctly deal with JSLexicalEnvironment and be a
3320         no-op in usual cases.
3321
3322         No new tests, extended existing test.
3323
3324         * bindings/scripts/CodeGeneratorJS.pm:
3325         (GenerateFunctionCastedThis):
3326
3327 2016-02-22  Simon Fraser  <simon.fraser@apple.com>
3328
3329         Repeated background images have the wrong position when using bottom/right-relative background-position
3330         https://bugs.webkit.org/show_bug.cgi?id=154478
3331
3332         Reviewed by Dave Hyatt.
3333
3334         Fix RenderBoxModelObject::calculateBackgroundImageGeometry() to use the right position when
3335         painting repeated background images when right/bottom edges are used.
3336
3337         Also rename BackgroundEdgeOrigin to Edge
3338
3339         Test: fast/images/background-position.html
3340
3341         * css/CSSPrimitiveValueMappings.h:
3342         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3343         (WebCore::CSSPrimitiveValue::operator Edge):
3344         (WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin): Deleted.
3345         * rendering/RenderBoxModelObject.cpp:
3346         (WebCore::resolveEdgeRelativeLength):
3347         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3348         * rendering/style/FillLayer.cpp:
3349         (WebCore::FillLayer::FillLayer):
3350         * rendering/style/FillLayer.h:
3351         (WebCore::FillLayer::backgroundXOrigin):
3352         (WebCore::FillLayer::backgroundYOrigin):
3353         (WebCore::FillLayer::setBackgroundXOrigin):
3354         (WebCore::FillLayer::setBackgroundYOrigin):
3355         * rendering/style/RenderStyleConstants.cpp:
3356         (WebCore::operator<<):
3357         * rendering/style/RenderStyleConstants.h:
3358
3359 2016-02-22  Commit Queue  <commit-queue@webkit.org>
3360
3361         Unreviewed, rolling out r196935.
3362         https://bugs.webkit.org/show_bug.cgi?id=154557
3363
3364         This change causes timeouts and crashes in LayoutTests
3365         (Requested by ryanhaddad on #webkit).
3366
3367         Reverted changeset:
3368
3369         "Enable AVFoundationNSURLSessionEnabled by default"
3370         https://bugs.webkit.org/show_bug.cgi?id=154469
3371         http://trac.webkit.org/changeset/196935
3372
3373 2016-02-22  Myles C. Maxfield  <mmaxfield@apple.com>
3374
3375         [Font Loading] Split CSSFontSelector into a FontFaceSet implementation and the rest of the class
3376         https://bugs.webkit.org/show_bug.cgi?id=153347
3377
3378         Reviewed by Antti Koivisto.
3379
3380         This patch implements the document.fonts Javascript object. It does so by briding the
3381         already-existing FontFaceSet Javascript object with the CSSFontSelector WebCore object.
3382         CSSFontSelector used to hold internal objects for each @font-face object in the
3383         Document. These objects have been moved into CSSFontFaceSet, so CSSFontSelector simply
3384         just owns an instance of a CSSFontFaceSet.
3385
3386         The lifetime of the FontFace and FontFaceSet objects is a little interesting: because
3387         all the ownership references are inside the WebCore CSSFontFace{,Set} objects, the
3388         higher-level Javascript FontFace{,Set} objects are held through a WeakPtr. This means
3389         that if all the references to these higher-level objects go away, and you re-query the
3390         document for its FontFace objects, you may get a new object (albeit with the same
3391         state as a previous object). However, this won't occur if there are any references to
3392         the old object, which means it is almost not observable.
3393
3394         This patch doesn't implement the relationship between the CSSOM and the FontFace
3395         objects. Changing one should result in a change in the other, but that will be
3396         implemented in a forthcoming patch.
3397
3398         This patch also doesn't alter the lifetime of the CSSFontSelector, which means that all
3399         the Document's fonts may be destroyed and recreated from CSS. There are a few things
3400         which can trigger this. A subsequent patch will make the CSSFontSelector outlive the
3401         Document.
3402
3403         This patch does implement (and test) the ability to add a new FontFace to the Document
3404         to cause a relayout, as well as changing properties of existing FontFace objects already
3405         in the Document to cause a relayout.
3406
3407         Test: fast/text/font-face-set-document.html
3408
3409         * Modules/fetch/FetchHeaders.cpp:
3410         (WebCore::FetchHeaders::Iterator::next): Pass an extra argument.
3411         * Modules/fetch/FetchHeaders.h:
3412         * bindings/js/JSKeyValueIterator.h: The ExecState is necessary to build an external
3413         wrapper from an existing CSSFontFace object.
3414         (WebCore::JSKeyValueIterator<JSWrapper>::next):
3415         * css/CSSFontFace.cpp:
3416         (WebCore::CSSFontFace::appendSources): Moved from CSSFontSelector.
3417         (WebCore::CSSFontFace::CSSFontFace):
3418         (WebCore::CSSFontFace::notifyClientsOfFontPropertyChange):
3419         (WebCore::CSSFontFace::setFamilies):
3420         (WebCore::CSSFontFace::calculateStyle): Shared code between CSSFontFaceSet and
3421         CSSFontFace.
3422         (WebCore::CSSFontFace::setStyle): Update to use calculateStyle().
3423         (WebCore::CSSFontFace::calculateWeight): Ditto.
3424         (WebCore::CSSFontFace::setWeight): Update to use caculateWeight().
3425         (WebCore::CSSFontFace::setUnicodeRange): Notify clients.
3426         (WebCore::CSSFontFace::setVariantLigatures): Ditto.
3427         (WebCore::CSSFontFace::setVariantPosition): Ditto.
3428         (WebCore::CSSFontFace::setVariantCaps): Ditto.
3429         (WebCore::CSSFontFace::setVariantNumeric): Ditto.
3430         (WebCore::CSSFontFace::setVariantAlternates): Ditto.
3431         (WebCore::CSSFontFace::setVariantEastAsian): Ditto.
3432         (WebCore::CSSFontFace::setFeatureSettings): Ditto.
3433         (WebCore::CSSFontFace::removeClient):
3434         (WebCore::CSSFontFace::wrapper): Build a new wrapper if one doesn't already
3435         exist. Note that this requires an ExecState to create a promise.
3436         (WebCore::CSSFontFace::setStatus):