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