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