e8e00331aaba110cd579b4cc35736d43450f7bc7
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-12  Antoine Quint  <graouts@apple.com>
2
3         [SVG] Handle endEvent for svg animations
4         https://bugs.webkit.org/show_bug.cgi?id=121587
5
6         Reviewed by Dean Jackson.
7
8         Add support for the "endEvent" SVG event triggered when an animation completes, as
9         specified in http://www.w3.org/TR/SMIL3/smil-timing.html#q135. This event doesn't
10         bubble and can't be canceled. Added test coverage for the event through the DOM
11         Events API as well as the declarative SMIL Animation syntax.
12
13         Adapted from a Chromium patch by pavan.e@samsung.com
14         https://chromium.googlesource.com/chromium/blink/+/4d415ca0268231aa80e3552fe21bf3480a6978f8
15
16         Tests: svg/animations/end-event-declarative-expected.svg
17                svg/animations/end-event-declarative.svg
18                svg/animations/end-event-script-expected.svg
19                svg/animations/end-event-script.svg
20
21         * svg/animation/SMILTimeContainer.cpp:
22         (WebCore::SMILTimeContainer::updateAnimations):
23         * svg/animation/SVGSMILElement.cpp:
24         (WebCore::smilEndEventSender):
25         (WebCore::SVGSMILElement::~SVGSMILElement):
26         (WebCore::SVGSMILElement::progress):
27         (WebCore::SVGSMILElement::dispatchPendingEvent):
28         * svg/animation/SVGSMILElement.h:
29         (WebCore::SVGSMILElement::hasConditionsConnected):
30
31 2015-10-12  Per Arne Vollan  <peavo@outlook.com>
32
33         [Curl] Increase limit of parallel network requests.
34         https://bugs.webkit.org/show_bug.cgi?id=150035
35
36         Reviewed by Alex Christensen.
37
38         If the limit is too low, other network requests will often be blocked until
39         active requests finishes. This can affect performance in a negative way.
40
41         * platform/network/curl/ResourceHandleManager.cpp:
42
43 2015-10-12  Brady Eidson  <beidson@apple.com>
44
45         Modern IDB: Start version change transaction for connections to new database.
46         https://bugs.webkit.org/show_bug.cgi?id=150033
47
48         Reviewed by Alex Christensen.
49
50         No new tests (Covered by changes to existing tests).
51
52         * CMakeLists.txt:
53         * Modules/indexeddb/IDBDatabase.h:
54         
55         * Modules/indexeddb/client/IDBAnyImpl.cpp:
56         (WebCore::IDBClient::IDBAny::IDBAny):
57         (WebCore::IDBClient::IDBAny::~IDBAny):
58         (WebCore::IDBClient::IDBAny::idbDatabase):
59         (WebCore::IDBClient::IDBAny::domStringList):
60         (WebCore::IDBClient::IDBAny::idbCursor):
61         (WebCore::IDBClient::IDBAny::idbCursorWithValue):
62         (WebCore::IDBClient::IDBAny::idbFactory):
63         (WebCore::IDBClient::IDBAny::idbIndex):
64         (WebCore::IDBClient::IDBAny::idbObjectStore):
65         (WebCore::IDBClient::IDBAny::idbTransaction):
66         (WebCore::IDBClient::IDBAny::scriptValue):
67         (WebCore::IDBClient::IDBAny::integer):
68         (WebCore::IDBClient::IDBAny::string):
69         (WebCore::IDBClient::IDBAny::keyPath):
70         * Modules/indexeddb/client/IDBAnyImpl.h:
71         (WebCore::IDBClient::IDBAny::create):
72         
73         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
74         (WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
75         (WebCore::IDBClient::IDBConnectionToServer::registerDatabaseConnection):
76         (WebCore::IDBClient::IDBConnectionToServer::unregisterDatabaseConnection):
77         * Modules/indexeddb/client/IDBConnectionToServer.h:
78         
79         * Modules/indexeddb/client/IDBDatabaseImpl.cpp: Added.
80         (WebCore::IDBClient::IDBDatabase::create):
81         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
82         (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
83         (WebCore::IDBClient::IDBDatabase::name):
84         (WebCore::IDBClient::IDBDatabase::version):
85         (WebCore::IDBClient::IDBDatabase::objectStoreNames):
86         (WebCore::IDBClient::IDBDatabase::createObjectStore):
87         (WebCore::IDBClient::IDBDatabase::transaction):
88         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
89         (WebCore::IDBClient::IDBDatabase::close):
90         (WebCore::IDBClient::IDBDatabase::activeDOMObjectName):
91         (WebCore::IDBClient::IDBDatabase::canSuspendForPageCache):
92         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
93         * Modules/indexeddb/client/IDBDatabaseImpl.h: Added.
94         (WebCore::IDBClient::IDBDatabase::info):
95         
96         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
97         (WebCore::IDBClient::IDBOpenDBRequest::onError):
98         (WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
99         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
100         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
101         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
102         
103         * Modules/indexeddb/client/IDBRequestImpl.cpp:
104         (WebCore::IDBClient::IDBRequest::IDBRequest):
105         (WebCore::IDBClient::IDBRequest::result):
106         (WebCore::IDBClient::IDBRequest::source):
107         (WebCore::IDBClient::IDBRequest::transaction):
108         * Modules/indexeddb/client/IDBRequestImpl.h:
109         (WebCore::IDBClient::IDBRequest::connection):
110         
111         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
112         (WebCore::IDBClient::IDBTransaction::create):
113         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
114         (WebCore::IDBClient::IDBTransaction::~IDBTransaction):
115         (WebCore::IDBClient::IDBTransaction::mode):
116         (WebCore::IDBClient::IDBTransaction::db):
117         (WebCore::IDBClient::IDBTransaction::error):
118         (WebCore::IDBClient::IDBTransaction::objectStore):
119         (WebCore::IDBClient::IDBTransaction::abort):
120         (WebCore::IDBClient::IDBTransaction::activeDOMObjectName):
121         (WebCore::IDBClient::IDBTransaction::canSuspendForPageCache):
122         * Modules/indexeddb/client/IDBTransactionImpl.h:
123         (WebCore::IDBClient::IDBTransaction::info):
124         
125         * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
126         (WebCore::IDBClient::IDBVersionChangeEvent::IDBVersionChangeEvent):
127         (WebCore::IDBClient::IDBVersionChangeEvent::eventInterface):
128         * Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
129         (WebCore::IDBClient::IDBVersionChangeEvent::create):
130         
131         * Modules/indexeddb/legacy/LegacyDatabase.h:
132         
133         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
134         (WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent):
135         * Modules/indexeddb/server/IDBConnectionToClient.h:
136         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
137         
138         * Modules/indexeddb/server/IDBServer.cpp:
139         (WebCore::IDBServer::IDBServer::registerDatabaseConnection):
140         (WebCore::IDBServer::IDBServer::unregisterDatabaseConnection):
141         (WebCore::IDBServer::IDBServer::deleteDatabase):
142         * Modules/indexeddb/server/IDBServer.h:
143         
144         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
145         (WebCore::IDBServer::UniqueIDBDatabase::info):
146         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
147         (WebCore::IDBServer::UniqueIDBDatabase::hasAnyOpenConnections):
148         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
149         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
150         (WebCore::IDBServer::UniqueIDBDatabase::addOpenDatabaseConnection):
151         * Modules/indexeddb/server/UniqueIDBDatabase.h:
152         
153         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: 
154         (WebCore::IDBServer::nextDatabaseConnectionIdentifier):
155         (WebCore::IDBServer::UniqueIDBDatabaseConnection::create):
156         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
157         (WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
158         (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
159
160         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
161         (WebCore::IDBServer::UniqueIDBDatabaseConnection::identifier):
162         (WebCore::IDBServer::UniqueIDBDatabaseConnection::database):
163         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionToClient):
164         (WebCore::IDBServer::UniqueIDBDatabaseConnection::closePending):
165         
166         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
167         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::create):
168         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
169         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
170         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::databaseConnection):
171         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::info):
172         
173         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
174         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
175         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
176         (WebCore::IDBDatabaseInfo::name):
177         (WebCore::IDBDatabaseInfo::version):
178         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo): Deleted.
179         
180         * Modules/indexeddb/shared/IDBError.h:
181         
182         * Modules/indexeddb/shared/IDBRequestData.cpp:
183         (WebCore::IDBRequestData::IDBRequestData):
184         (WebCore::IDBRequestData::requestedVersion):
185         * Modules/indexeddb/shared/IDBRequestData.h:
186         
187         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
188         (WebCore::nextClientResourceNumber):
189         (WebCore::nextServerResourceNumber):
190         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
191         (WebCore::IDBResourceIdentifier::emptyValue):
192         (WebCore::IDBResourceIdentifier::deletedValue):
193         (WebCore::nextResourceNumber): Deleted.
194         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
195         
196         * Modules/indexeddb/shared/IDBResultData.cpp:
197         (WebCore::IDBResultData::IDBResultData):
198         (WebCore::IDBResultData::error):
199         (WebCore::IDBResultData::openDatabaseSuccess):
200         (WebCore::IDBResultData::openDatabaseUpgradeNeeded):
201         (WebCore::IDBResultData::databaseInfo):
202         (WebCore::IDBResultData::transactionInfo):
203         * Modules/indexeddb/shared/IDBResultData.h:
204         (WebCore::IDBResultData::type):
205         (WebCore::IDBResultData::databaseConnectionIdentifier):
206         
207         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
208         (WebCore::IDBTransactionInfo::IDBTransactionInfo):
209         (WebCore::IDBTransactionInfo::versionChange):
210         (WebCore::IDBTransactionInfo::isolatedCopy):
211         * Modules/indexeddb/shared/IDBTransactionInfo.h:
212         (WebCore::IDBTransactionInfo::identifier):
213         (WebCore::IDBTransactionInfo::mode):
214         (WebCore::IDBTransactionInfo::newVersion):
215         
216         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
217         (WebCore::InProcessIDBServer::fireVersionChangeEvent):
218         * Modules/indexeddb/shared/InProcessIDBServer.h:
219         
220         * WebCore.xcodeproj/project.pbxproj:
221         
222         * platform/CrossThreadCopier.cpp:
223         (WebCore::IDBTransactionInfo>::copy):
224         * platform/CrossThreadCopier.h:
225
226 2015-10-12  Said Abou-Hallawa  <sabouhallawa@apple.com>
227
228         REGRESSION(r184895): border-image should always slice the SVG image to nine pieces when drawing it in the container element
229         https://bugs.webkit.org/show_bug.cgi?id=149901
230         <rdar://problem/21995596>
231
232         Reviewed by Darin Adler.
233
234         The nine-pieces algorithm should be applied to the border-image regardless
235         whether the image has an intrinsic size or not. It is not guaranteed to have
236         a meaningful border-image in all the cases of non-intrinsic size images. But
237         it should work as expected in most of the cases. 
238
239         * rendering/RenderBoxModelObject.cpp:
240         * rendering/RenderBoxModelObject.h:
241         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
242         Revert the changes which were added to return whether the image has
243         intrinsic size or not.
244         
245         (WebCore::RenderBoxModelObject::calculateFillTileSize):
246         (WebCore::RenderBoxModelObject::paintNinePieceImage):
247         Size of the image is now the return value of calculateImageIntrinsicDimensions().
248         
249         * rendering/RenderListMarker.cpp:
250         (WebCore::RenderListMarker::updateContent):
251         * rendering/shapes/ShapeOutsideInfo.cpp:
252         (WebCore::ShapeOutsideInfo::createShapeForImage):
253         Size of the image is now the return value of calculateImageIntrinsicDimensions().
254         
255         * rendering/style/NinePieceImage.cpp:
256         * rendering/style/NinePieceImage.h:
257         (WebCore::NinePieceImage::paint):
258         Delete the logic for the non-intrinsic case. Both intrinsic and non-intrinsic
259         cases will be treated the same.
260
261         (WebCore::NinePieceImage::computeNineRects):
262         (WebCore::NinePieceImage::computeSideTileScale):
263         (WebCore::NinePieceImage::computeMiddleTileScale):
264         (WebCore::NinePieceImage::computeTileScales):
265         (WebCore::NinePieceImage::computeIntrinsicRects): Deleted.
266         (WebCore::NinePieceImage::computeIntrinsicSideTileScale): Deleted.
267         (WebCore::NinePieceImage::computeIntrinsicMiddleTileScale): Deleted.
268         (WebCore::NinePieceImage::computeIntrinsicTileScales): Deleted.
269         Remove *Intrinsic* from the name of the functions.
270
271         (WebCore::NinePieceImage::computeNonIntrinsicRects): Deleted.
272         (WebCore::NinePieceImage::computeNonIntrinsicTileScales): Deleted.
273         Delete the *NonIntrinsic* functions.
274
275 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
276
277         Clip-path transitions sometimes trigger endless animation timers
278         https://bugs.webkit.org/show_bug.cgi?id=150018
279
280         Reviewed by Tim Horton.
281         
282         Transitioning -webkit-clip-path could trigger endless animation
283         timers, because when CompositeAnimation::updateTransitions() calls
284         isTargetPropertyEqual(), a false negative answer triggers canceling the
285         current transition and starting a new one over and over.
286         
287         This happened because StyleRareNonInheritedData simply tested pointer
288         equality for m_clipPath and m_shapeOutside. Both of these need to do deep
289         equality testing, requiring the implementation of operator== in BasicShapes
290         classes.
291         
292         In addition, the PropertyWrappers in CSSPropertyAnimation need equals()
293         implementations that also do more than pointer equality testing.
294
295         Tests: transitions/clip-path-transitions.html
296                transitions/shape-outside-transitions.html
297
298         * page/animation/CSSPropertyAnimation.cpp:
299         (WebCore::PropertyWrapperClipPath::equals):
300         (WebCore::PropertyWrapperShape::equals):
301         * rendering/ClipPathOperation.h:
302         * rendering/style/BasicShapes.cpp:
303         (WebCore::BasicShapeCircle::operator==):
304         (WebCore::BasicShapeEllipse::operator==):
305         (WebCore::BasicShapePolygon::operator==):
306         (WebCore::BasicShapeInset::operator==):
307         * rendering/style/BasicShapes.h:
308         (WebCore::BasicShapeCenterCoordinate::operator==):
309         (WebCore::BasicShapeRadius::operator==):
310         * rendering/style/ShapeValue.cpp:
311         (WebCore::pointersOrValuesEqual):
312         (WebCore::ShapeValue::operator==):
313         * rendering/style/ShapeValue.h:
314         (WebCore::ShapeValue::operator!=):
315         (WebCore::ShapeValue::operator==): Deleted.
316         (WebCore::ShapeValue::ShapeValue): Deleted.
317         * rendering/style/StyleRareNonInheritedData.cpp:
318         (WebCore::StyleRareNonInheritedData::operator==):
319         (WebCore::StyleRareNonInheritedData::clipPathOperationsEquivalent):
320         (WebCore::StyleRareNonInheritedData::shapeOutsideDataEquivalent):
321         * rendering/style/StyleRareNonInheritedData.h:
322
323 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
324
325         Test font-variant-* and font-feature-settings on Yosemite and Mavericks
326         https://bugs.webkit.org/show_bug.cgi?id=149778
327
328         Reviewed by Simon Fraser.
329
330         We can simply call the function which enables features on Yosemite and Mavericks.
331
332         * platform/graphics/cocoa/FontCacheCoreText.cpp:
333         (WebCore::platformFontLookupWithFamily):
334         (WebCore::fontWithFamily):
335
336 2015-10-09  Anders Carlsson  <andersca@apple.com>
337
338         Don't allow plug-ins to override image types for <embed> elements
339         https://bugs.webkit.org/show_bug.cgi?id=149979
340
341         Reviewed by Tim Horton.
342
343         Stop allowing plug-ins to take over image types for <embed> elements. We already do this
344         for <object> elements, but had to make <embed> elements exempt because of webkit.org/b/49016.
345         The QuickTime plug-in hasn't supported image types since Lion, so there's no point in keeping this code around.
346
347         * html/HTMLAppletElement.cpp:
348         (WebCore::HTMLAppletElement::HTMLAppletElement):
349         * html/HTMLEmbedElement.cpp:
350         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
351         * html/HTMLObjectElement.cpp:
352         (WebCore::HTMLObjectElement::HTMLObjectElement):
353         (WebCore::HTMLObjectElement::parametersForPlugin):
354         * html/HTMLPlugInImageElement.cpp:
355         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
356         (WebCore::HTMLPlugInImageElement::isImageType):
357         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
358         * html/HTMLPlugInImageElement.h:
359         (WebCore::HTMLPlugInImageElement::shouldPreferPlugInsForImages): Deleted.
360         * loader/EmptyClients.h:
361         * loader/FrameLoaderClient.h:
362         * loader/SubframeLoader.cpp:
363         (WebCore::SubframeLoader::resourceWillUsePlugin):
364         (WebCore::SubframeLoader::requestObject):
365         (WebCore::SubframeLoader::shouldUsePlugin):
366         * loader/SubframeLoader.h:
367
368 2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
369
370         Unreviewed, fixing debug builds with Clang on Linux
371         by including the stdio.h header where it's required
372         under a debug configuration.
373
374         * page/scrolling/ScrollingStateTree.cpp:
375         (WebCore::ScrollingStateTree::ScrollingStateTree):
376         * rendering/SimpleLineLayoutFunctions.cpp:
377
378 2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
379
380         Unreviewed, followup to r190643.
381
382         Inline the std::function<> constructor wrappings around lambdas
383         into a single line, instead of spanning it across four lines.
384
385         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
386         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
387         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
388         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
389         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
390         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
391         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
392         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
393         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
394         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
395         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
396         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
397         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
398         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
399         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
400         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
401         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
402         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
403         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
404         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
405         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
406         (webkitVideoSinkRender):
407         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
408         (webKitWebSrcChangeState):
409         (webKitWebSrcNeedDataCb):
410         (webKitWebSrcEnoughDataMainCb):
411         (webKitWebSrcEnoughDataCb):
412         (webKitWebSrcSeekMainCb):
413         (webKitWebSrcSeekDataCb):
414
415 2015-10-11  Brian Burg  <bburg@apple.com>
416
417         Add missing builtins files to the Xcode projects
418         https://bugs.webkit.org/show_bug.cgi?id=150015
419
420         Reviewed by Yusuke Suzuki.
421
422         * WebCore.xcodeproj/project.pbxproj:
423
424 2015-10-11  Simon Fraser  <simon.fraser@apple.com>
425
426         Cleanup and simplification of SVG path-related classes
427         https://bugs.webkit.org/show_bug.cgi?id=150011
428
429         Reviewed by Zalan Bujtas.
430
431         Many SVG path-related subclasses were stateful, but only because code in
432         SVGPathUtilities kept global copies around for no reason. A microbenchmark
433         showed that there was no benefit to keeping global singletons of SVGPathBuilder,
434         SVGPathSegListBuilder, SVGPathByteStreamBuilder, SVGPathStringBuilder,
435         SVGPathTraversalStateBuilder, SVGPathParser and SVGPathBlender.
436         
437         Making these classes not be re-usable makes the code much simpler, allowing
438         their SVGPathSources, SVGPathConsumers, SVGPathByteStream etc. to be stored
439         by reference, and eliminating the cleanup() function which created annoying
440         ordering issues.
441         
442         Code that uses SVGPathParser and SVGPathBlender is further simplified by having
443         these classes expose only static functions, hiding any internal statefulness.
444
445         * svg/SVGPathBlender.cpp: Remove the m_progress member variable and instead
446         pass progress to the various blend functions, as we do for other blend functions.
447         Expose two only static functions. Pointers to references.
448         (WebCore::SVGPathBlender::addAnimatedPath):
449         (WebCore::SVGPathBlender::blendAnimatedPath):
450         (WebCore::SVGPathBlender::SVGPathBlender):
451         (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
452         (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
453         (WebCore::SVGPathBlender::blendMoveToSegment):
454         (WebCore::SVGPathBlender::blendLineToSegment):
455         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
456         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
457         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
458         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
459         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
460         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
461         (WebCore::SVGPathBlender::blendArcToSegment):
462         (WebCore::SVGPathBlender::cleanup): Deleted.
463         * svg/SVGPathBlender.h: Make the constructor take a ref to the destination Path,
464         which is stored by reference.
465         * svg/SVGPathBuilder.cpp:
466         (WebCore::SVGPathBuilder::SVGPathBuilder):
467         (WebCore::SVGPathBuilder::moveTo):
468         (WebCore::SVGPathBuilder::lineTo):
469         (WebCore::SVGPathBuilder::curveToCubic):
470         (WebCore::SVGPathBuilder::closePath):
471         * svg/SVGPathBuilder.h:
472         (WebCore::SVGPathBuilder::setCurrentPath): Deleted.
473         * svg/SVGPathByteStreamBuilder.cpp: References, assertions removed.
474         (WebCore::SVGPathByteStreamBuilder::SVGPathByteStreamBuilder):
475         * svg/SVGPathByteStreamBuilder.h:
476         (WebCore::SVGPathByteStreamBuilder::writeType):
477         (WebCore::SVGPathByteStreamBuilder::setCurrentByteStream): Deleted.
478         * svg/SVGPathConsumer.h:
479         * svg/SVGPathElement.cpp:
480         * svg/SVGPathParser.cpp: Expose some static helper functions for parsing
481         to byte streams and strings. References.
482         (WebCore::SVGPathParser::parse):
483         (WebCore::SVGPathParser::parseToByteStream):
484         (WebCore::SVGPathParser::parseToString):
485         (WebCore::SVGPathParser::SVGPathParser):
486         (WebCore::SVGPathParser::parseClosePathSegment):
487         (WebCore::SVGPathParser::parseMoveToSegment):
488         (WebCore::SVGPathParser::parseLineToSegment):
489         (WebCore::SVGPathParser::parseLineToHorizontalSegment):
490         (WebCore::SVGPathParser::parseLineToVerticalSegment):
491         (WebCore::SVGPathParser::parseCurveToCubicSegment):
492         (WebCore::SVGPathParser::parseCurveToCubicSmoothSegment):
493         (WebCore::SVGPathParser::parseCurveToQuadraticSegment):
494         (WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment):
495         (WebCore::SVGPathParser::parseArcToSegment):
496         (WebCore::SVGPathParser::parsePathData):
497         (WebCore::SVGPathParser::decomposeArcToCubic):
498         (WebCore::SVGPathParser::parsePathDataFromSource): Deleted.
499         (WebCore::SVGPathParser::cleanup): Deleted.
500         * svg/SVGPathParser.h:
501         (WebCore::SVGPathParser::setCurrentConsumer): Deleted.
502         (WebCore::SVGPathParser::setCurrentSource): Deleted.
503         * svg/SVGPathSegListBuilder.cpp:
504         (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
505         (WebCore::SVGPathSegListBuilder::moveTo):
506         (WebCore::SVGPathSegListBuilder::lineTo):
507         (WebCore::SVGPathSegListBuilder::lineToHorizontal):
508         (WebCore::SVGPathSegListBuilder::lineToVertical):
509         (WebCore::SVGPathSegListBuilder::curveToCubic):
510         (WebCore::SVGPathSegListBuilder::curveToCubicSmooth):
511         (WebCore::SVGPathSegListBuilder::curveToQuadratic):
512         (WebCore::SVGPathSegListBuilder::curveToQuadraticSmooth):
513         (WebCore::SVGPathSegListBuilder::arcTo):
514         (WebCore::SVGPathSegListBuilder::closePath):
515         * svg/SVGPathSegListBuilder.h:
516         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathElement): Deleted.
517         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathSegList): Deleted.
518         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathSegRole): Deleted.
519         * svg/SVGPathStringBuilder.cpp:
520         (WebCore::SVGPathStringBuilder::cleanup): Deleted.
521         * svg/SVGPathStringBuilder.h:
522         * svg/SVGPathTraversalStateBuilder.cpp:
523         (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
524         (WebCore::SVGPathTraversalStateBuilder::moveTo):
525         (WebCore::SVGPathTraversalStateBuilder::lineTo):
526         (WebCore::SVGPathTraversalStateBuilder::curveToCubic):
527         (WebCore::SVGPathTraversalStateBuilder::closePath):
528         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
529         (WebCore::SVGPathTraversalStateBuilder::totalLength):
530         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
531         (WebCore::SVGPathTraversalStateBuilder::setDesiredLength): Deleted.
532         * svg/SVGPathTraversalStateBuilder.h:
533         (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex):
534         (WebCore::SVGPathTraversalStateBuilder::setCurrentTraversalState): Deleted.
535         * svg/SVGPathUtilities.cpp: Remove globals accessors, making things on the stack
536         instead. Use SVGPathParser helper functions where possible.
537         (WebCore::buildPathFromString):
538         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
539         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
540         (WebCore::buildPathFromByteStream):
541         (WebCore::buildSVGPathSegListFromByteStream):
542         (WebCore::buildStringFromByteStream):
543         (WebCore::buildStringFromSVGPathSegList):
544         (WebCore::buildSVGPathByteStreamFromString):
545         (WebCore::buildAnimatedSVGPathByteStream):
546         (WebCore::addToSVGPathByteStream):
547         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
548         (WebCore::getTotalLengthOfSVGPathByteStream):
549         (WebCore::getPointAtLengthOfSVGPathByteStream):
550         (WebCore::buildStringFromPath):
551         (WebCore::globalSVGPathBuilder): Deleted.
552         (WebCore::globalSVGPathSegListBuilder): Deleted.
553         (WebCore::globalSVGPathByteStreamBuilder): Deleted.
554         (WebCore::globalSVGPathStringBuilder): Deleted.
555         (WebCore::globalSVGPathTraversalStateBuilder): Deleted.
556         (WebCore::globalSVGPathParser): Deleted.
557         (WebCore::globalSVGPathBlender): Deleted.
558         * svg/SVGPathUtilities.h:
559         * svg/SVGToOTFFontConversion.cpp: CFFBuilder no longer inherits from SVGPathBuilder.
560         It did nothing with the Path, re-implemented all the functions, and only made use of
561         the m_current member var, so just make it inherit from SVGPathConsumer, and have
562         its own m_current.
563         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
564
565 2015-10-10  Antti Koivisto  <antti@apple.com>
566
567         Remove InsertionPoint and ContentDistributor
568         https://bugs.webkit.org/show_bug.cgi?id=150004
569
570         Rubber-stamped by Sam Weinig.
571
572         Now that <details> is on top of the modern Shadow DOM remove the last vestiges of the V0 Shadow DOM API.
573
574         * CMakeLists.txt:
575         * WebCore.vcxproj/WebCore.vcxproj:
576         * WebCore.xcodeproj/project.pbxproj:
577         * css/SelectorChecker.cpp:
578         * css/StyleResolver.cpp:
579         * dom/ContainerNode.cpp:
580         * dom/Element.cpp:
581         (WebCore::shouldUseNodeRenderingTraversalSlowPath):
582         (WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath):
583         * dom/Node.cpp:
584         (WebCore::Node::parentOrShadowHostElement):
585         (WebCore::Node::insertedInto):
586         (WebCore::Node::insertionParentForBinding): Deleted.
587         * dom/Node.h:
588         (WebCore::Node::isCharacterDataNode):
589         (WebCore::Node::isFrameOwnerElement):
590         (WebCore::Node::isPluginElement):
591         (WebCore::Node::isImageControlsRootElement):
592         (WebCore::Node::isImageControlsButtonElement):
593         (WebCore::Node::isDocumentFragment):
594         (WebCore::Node::isShadowRoot):
595         (WebCore::Node::isInsertionPointNode): Deleted.
596         (WebCore::Node::isInsertionPoint): Deleted.
597         * dom/NodeRenderingTraversal.cpp:
598         (WebCore::NodeRenderingTraversal::traverseParent):
599         (WebCore::NodeRenderingTraversal::traverseFirstChild):
600         (WebCore::NodeRenderingTraversal::traverseLastChild):
601         (WebCore::NodeRenderingTraversal::traverseNextSibling):
602         (WebCore::NodeRenderingTraversal::traversePreviousSibling):
603         (WebCore::NodeRenderingTraversal::parentSlow):
604         (WebCore::NodeRenderingTraversal::nextInScope):
605         (WebCore::NodeRenderingTraversal::previousInScope):
606         (WebCore::NodeRenderingTraversal::parentInScope):
607         (WebCore::NodeRenderingTraversal::lastChildInScope):
608         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed): Deleted.
609         (WebCore::NodeRenderingTraversal::findFirstSiblingEnteringInsertionPoints): Deleted.
610         (WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints): Deleted.
611         (WebCore::NodeRenderingTraversal::findFirstFromDistributedNode): Deleted.
612         (WebCore::NodeRenderingTraversal::findLastSiblingEnteringInsertionPoints): Deleted.
613         (WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints): Deleted.
614         (WebCore::NodeRenderingTraversal::findLastFromDistributedNode): Deleted.
615         * dom/ShadowRoot.h:
616         (WebCore::ShadowRoot::distributor): Deleted.
617         * html/HTMLInputElement.cpp:
618         * html/HTMLSlotElement.cpp:
619         * html/HTMLSlotElement.h:
620         * html/shadow/ContentDistributor.cpp: Removed.
621         * html/shadow/ContentDistributor.h: Removed.
622         * html/shadow/InsertionPoint.cpp: Removed.
623         * html/shadow/InsertionPoint.h: Removed.
624         * page/FocusController.cpp:
625         (WebCore::FocusController::previousFocusableElement):
626         * testing/Internals.cpp:
627
628 2015-10-10  Simon Fraser  <simon.fraser@apple.com>
629
630         Use references and more const in SVGPathUtilities
631         https://bugs.webkit.org/show_bug.cgi?id=150007
632
633         Reviewed by Zalan Bujtas.
634         
635         SVGPathUtilities had lots of pointers whose non-nullness was asserted,
636         little const, and was very trigger-happy with stack allocations. Clean
637         that all up.
638
639         * svg/SVGAnimatedPath.cpp:
640         (WebCore::SVGAnimatedPathAnimator::constructFromString):
641         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
642         (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
643         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
644         * svg/SVGPathByteStream.h:
645         (WebCore::SVGPathByteStream::begin):
646         (WebCore::SVGPathByteStream::end):
647         (WebCore::SVGPathByteStream::append):
648         * svg/SVGPathByteStreamSource.cpp:
649         (WebCore::SVGPathByteStreamSource::SVGPathByteStreamSource):
650         * svg/SVGPathByteStreamSource.h:
651         * svg/SVGPathElement.cpp:
652         (WebCore::SVGPathElement::getTotalLength):
653         (WebCore::SVGPathElement::getPointAtLength):
654         (WebCore::SVGPathElement::getPathSegAtLength):
655         (WebCore::SVGPathElement::parseAttribute):
656         (WebCore::SVGPathElement::svgAttributeChanged):
657         (WebCore::SVGPathElement::pathByteStream):
658         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
659         (WebCore::SVGPathElement::pathSegListChanged):
660         (WebCore::SVGPathElement::SVGPathElement): Deleted.
661         * svg/SVGPathElement.h:
662         * svg/SVGPathUtilities.cpp:
663         (WebCore::globalSVGPathBuilder):
664         (WebCore::globalSVGPathSegListBuilder):
665         (WebCore::globalSVGPathByteStreamBuilder):
666         (WebCore::globalSVGPathStringBuilder):
667         (WebCore::globalSVGPathTraversalStateBuilder):
668         (WebCore::globalSVGPathParser):
669         (WebCore::globalSVGPathBlender):
670         (WebCore::buildPathFromString):
671         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
672         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
673         (WebCore::buildPathFromByteStream):
674         (WebCore::buildSVGPathSegListFromByteStream):
675         (WebCore::buildStringFromByteStream):
676         (WebCore::buildStringFromSVGPathSegList):
677         (WebCore::buildSVGPathByteStreamFromString):
678         (WebCore::buildAnimatedSVGPathByteStream):
679         (WebCore::addToSVGPathByteStream):
680         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
681         (WebCore::getTotalLengthOfSVGPathByteStream):
682         (WebCore::getPointAtLengthOfSVGPathByteStream):
683         (WebCore::buildStringFromPath):
684         * svg/SVGPathUtilities.h:
685         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
686         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
687
688 2015-10-10  Andreas Kling  <akling@apple.com>
689
690         Reduce pointless malloc traffic in ElementRuleCollector.
691         <https://webkit.org/b/150003>
692
693         Reviewed by Antti Koivisto.
694
695         Don't use a unique_ptr for the m_matchedRules vector in ElementRuleCollector.
696         This is one of our heaviest sources of transient allocations, with ~88000
697         malloc/free pairs on loading theverge.com.
698
699         * css/ElementRuleCollector.cpp:
700         (WebCore::ElementRuleCollector::addMatchedRule):
701         (WebCore::ElementRuleCollector::clearMatchedRules):
702         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
703         (WebCore::ElementRuleCollector::sortMatchedRules):
704         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
705         * css/ElementRuleCollector.h:
706         (WebCore::ElementRuleCollector::hasMatchedRules):
707
708 2015-10-10  Dan Bernstein  <mitz@apple.com>
709
710         [iOS] Remove unnecessary iOS version checks
711         https://bugs.webkit.org/show_bug.cgi?id=150002
712
713         Reviewed by Alexey Proskuryakov.
714
715         * loader/cache/CachedFont.cpp:
716         (WebCore::CachedFont::ensureCustomFontData):
717         * loader/cocoa/DiskCacheMonitorCocoa.h:
718         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
719         * page/mac/SettingsMac.mm:
720         (WebCore::sansSerifTraditionalHanFontFamily):
721         (WebCore::sansSerifSimplifiedHanFontFamily):
722         * platform/graphics/cocoa/FontCacheCoreText.cpp:
723         (WebCore::appendOpenTypeFeature):
724         * platform/graphics/ios/FontCacheIOS.mm:
725         (WebCore::getSystemFontFallbackForCharacters):
726         (WebCore::platformLookupFallbackFont):
727         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
728         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
729         * platform/ios/WebCoreSystemInterfaceIOS.h:
730         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
731         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
732         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
733         * platform/ios/wak/WAKWindow.mm:
734         (+[WAKWindow hasLandscapeOrientation]):
735         (-[WAKWindow hostLayer]):
736         * platform/network/cf/CookieJarCFNet.cpp:
737         (WebCore::copyCookiesForURLWithFirstPartyURL):
738         (WebCore::createCookies):
739         * platform/network/mac/CertificateInfoMac.mm:
740         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
741         * platform/spi/cf/CFNetworkSPI.h:
742         * platform/spi/cocoa/AVKitSPI.h:
743         * platform/spi/cocoa/CoreTextSPI.h:
744         * platform/spi/cocoa/NEFilterSourceSPI.h:
745         * platform/spi/cocoa/QuartzCoreSPI.h:
746         * platform/spi/cocoa/SecuritySPI.h:
747         * platform/spi/ios/LaunchServicesSPI.h:
748         * platform/spi/mac/AVFoundationSPI.h:
749         * platform/text/TextBreakIterator.cpp:
750         * platform/text/TextFlags.h:
751         * platform/text/ios/LocalizedDateCache.mm:
752         (WebCore::LocalizedDateCache::calculateMaximumWidth):
753         * platform/text/mac/LocaleMac.mm:
754         (WebCore::LocaleMac::LocaleMac):
755         * rendering/RenderThemeIOS.mm:
756         (WebCore::RenderThemeIOS::cachedSystemFontDescription):
757         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
758         * svg/SVGToOTFFontConversion.cpp:
759         (WebCore::SVGToOTFFontConverter::appendKERNTable):
760         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
761
762 2015-10-10  Antti Koivisto  <antti@apple.com>
763
764         Rewrite HTMLDetailsElement using HTMLSlotElement
765         https://bugs.webkit.org/show_bug.cgi?id=149698
766
767         Reviewed by Andreas Kling.
768
769         Use the modern Shadow DOM to implement <details> element. After this the legacy InsertionPoint and
770         related code can be removed.
771
772         Based on a patch by Ryosuke.
773
774         * dom/Element.cpp:
775         (WebCore::Element::childrenChanged):
776         * dom/EventDispatcher.cpp:
777         (WebCore::EventPath::EventPath):
778         * dom/ShadowRoot.cpp:
779         (WebCore::ShadowRoot::ShadowRoot):
780         (WebCore::ShadowRoot::~ShadowRoot):
781         (WebCore::ShadowRoot::removeAllEventListeners):
782         (WebCore::ShadowRoot::findAssignedSlot):
783         (WebCore::ShadowRoot::addSlotElementByName):
784         (WebCore::ShadowRoot::removeSlotElementByName):
785         (WebCore::ShadowRoot::invalidateSlotAssignments):
786         (WebCore::ShadowRoot::invalidateDefaultSlotAssignments):
787         (WebCore::ShadowRoot::assignedNodesForSlot):
788         * dom/ShadowRoot.h:
789         (WebCore::ShadowRoot::create):
790         (WebCore::ShadowRoot::distributor):
791         (WebCore::ShadowRoot::isOrphan):
792         * dom/SlotAssignment.cpp:
793         (WebCore::slotNameFromAttributeValue):
794
795             Rename for clarity.
796
797         (WebCore::slotNameFromSlotAttribute):
798
799             SlotAssignment can now be specialized by providing function that maps from node to slot name.
800             This is the default function that gets the name from the slot attribute.
801
802         (WebCore::SlotAssignment::SlotAssignment):
803         (WebCore::SlotAssignment::findAssignedSlot):
804
805             Use the name mapping function.
806             Ensure that the slots are assigned.
807
808         (WebCore::SlotAssignment::addSlotElementByName):
809         (WebCore::SlotAssignment::removeSlotElementByName):
810         (WebCore::SlotAssignment::assignedNodesForSlot):
811         (WebCore::SlotAssignment::invalidate):
812         (WebCore::SlotAssignment::invalidateDefaultSlot):
813         (WebCore::SlotAssignment::resolveAllSlotElements):
814         (WebCore::SlotAssignment::assignSlots):
815
816             Use the name mapping function.
817
818         (WebCore::SlotAssignment::assignToSlot):
819
820             Factor into function.
821
822         (WebCore::treatNullAsEmpty): Deleted.
823         * dom/SlotAssignment.h:
824         (WebCore::SlotAssignment::~SlotAssignment):
825         (WebCore::SlotAssignment::defaultSlotName):
826
827             Add static getter for emptyAtom for clarity.
828
829         (WebCore::SlotAssignment::SlotAssignment): Deleted.
830         * html/HTMLDetailsElement.cpp:
831         (WebCore::summarySlotName):
832         (WebCore::slotNameFunction):
833
834             Slot name function for <details>. It assigns the first <summary> child to the summary slot and others
835             to the default content slot if the element is open.
836
837         (WebCore::HTMLDetailsElement::create):
838         (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
839         (WebCore::HTMLDetailsElement::isActiveSummary):
840         (WebCore::HTMLDetailsElement::parseAttribute):
841         (WebCore::HTMLDetailsElement::toggleOpen):
842         (WebCore::summaryQuerySelector): Deleted.
843         (WebCore::DetailsContentElement::create): Deleted.
844         (WebCore::DetailsSummaryElement::create): Deleted.
845         (WebCore::HTMLDetailsElement::findMainSummary): Deleted.
846         (WebCore::HTMLDetailsElement::childShouldCreateRenderer): Deleted.
847         * html/HTMLDetailsElement.h:
848         * html/HTMLSummaryElement.cpp:
849         (WebCore::HTMLSummaryElement::create):
850         (WebCore::HTMLSummaryElement::createElementRenderer):
851         (WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
852         (WebCore::HTMLSummaryElement::detailsElement):
853         (WebCore::HTMLSummaryElement::isActiveSummary):
854         (WebCore::isClickableControl):
855         (WebCore::HTMLSummaryElement::supportsFocus):
856         (WebCore::HTMLSummaryElement::defaultEventHandler):
857         (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
858         (WebCore::SummaryContentElement::create): Deleted.
859         (WebCore::HTMLSummaryElement::childShouldCreateRenderer): Deleted.
860         (WebCore::HTMLSummaryElement::isMainSummary): Deleted.
861         * html/HTMLSummaryElement.h:
862         * html/shadow/DetailsMarkerControl.cpp:
863         (WebCore::DetailsMarkerControl::rendererIsNeeded):
864         * style/RenderTreePosition.cpp:
865         (WebCore::RenderTreePosition::computeNextSibling):
866
867             Skip the verification assert for shadow host children. Getting this right requires
868             better shadow-aware traversal code.
869
870         * style/StyleResolveTree.cpp:
871         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
872         (WebCore::Style::attachChildren):
873         (WebCore::Style::attachShadowRoot):
874         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
875         (WebCore::Style::attachSlotAssignees):
876         (WebCore::Style::attachRenderTree):
877         (WebCore::Style::detachChildren):
878         (WebCore::Style::detachShadowRoot):
879         (WebCore::Style::detachSlotAssignees):
880         (WebCore::Style::detachRenderTree):
881         (WebCore::Style::resolveChildren):
882         (WebCore::Style::resolveSlotAssignees):
883         (WebCore::Style::resolveTree):
884         (WebCore::Style::attachDistributedChildren): Deleted.
885         (WebCore::Style::detachDistributedChildren): Deleted.
886
887             Remove InsertionPoint related code paths.
888
889 2015-10-10  Andreas Kling  <akling@apple.com>
890
891         SerializedScriptValue should use a compact encoding for 8-bit strings.
892         <https://webkit.org/b/149934>
893
894         Reviewed by Antti Koivisto.
895
896         We were encoding known 8-bit strings in a 16-bit format when serializing script values.
897
898         Extend the format to support 8-bit strings. The 8-bittiness is encoded in the highest bit
899         of the string length. This is possible while supporting all older formats due to string
900         lengths >= 0x7FFFFFFF being disallowed.
901
902         This patch knocks ~1 MB off of theverge.com, where some ad or tracker or whatever likes to
903         do a ton of postMessage() business.
904
905         * bindings/js/SerializedScriptValue.cpp:
906         (WebCore::CurrentVersion): Bump the serialization format version. Also updated the grammar
907         comment to describe the new format. Artistic license applied in description of bitfield.
908
909         (WebCore::writeLittleEndianUInt16): Deleted.
910
911         (WebCore::CloneSerializer::serialize):
912         (WebCore::CloneSerializer::write):
913         (WebCore::CloneDeserializer::deserializeString):
914         (WebCore::CloneDeserializer::readString):
915         (WebCore::CloneDeserializer::readStringData): Support 8-bit strings. I kept the string
916         length limit at UINT_MAX/sizeof(UChar) since the highest bit of the length is no longer
917         available. Besides, it seems flimsy to support longer strings if they happen to have all
918         8-bit characters.
919
920 2015-10-10  Dan Bernstein  <mitz@apple.com>
921
922         [iOS] Remove project support for iOS 8
923         https://bugs.webkit.org/show_bug.cgi?id=149993
924
925         Reviewed by Alexey Proskuryakov.
926
927         * Configurations/WebCore.xcconfig:
928         * Configurations/WebCoreTestSupport.xcconfig:
929
930 2015-10-09  Zalan Bujtas  <zalan@apple.com>
931
932         Check if start and end positions are still valid after updating them through VisibleSelection.
933         https://bugs.webkit.org/show_bug.cgi?id=149982
934
935         Reviewed by Ryosuke Niwa.
936
937         This patch is required to be able to clean up anonymous tables structure.
938         In certain edge cases, start/end positions could become nullptr after various text splitting
939         operations. 
940
941         Covered by editing/execCommand/crash-137961.html
942
943         * editing/ApplyStyleCommand.cpp:
944         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
945         (WebCore::ApplyStyleCommand::applyInlineStyle):
946
947 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
948
949         Rename RenderObject::isRoot() to isDocumentElementRenderer()
950         https://bugs.webkit.org/show_bug.cgi?id=149976
951
952         Reviewed by Zalan Bujtas.
953
954         RenderObject::isRoot() was confusingly named, because it returns true for
955         the document element's renderer, not for the actual root (the RenderView).
956         In this way it mismatched RenderLayer::isRootLayer(), which returned true
957         for the RenderView's layer.
958         
959         Rename it to the more accurate isDocumentElementRenderer().
960
961         * dom/Node.cpp:
962         (WebCore::Node::renderRect):
963         * page/ios/FrameIOS.mm:
964         (WebCore::Frame::renderRectForPoint):
965         * rendering/RenderBlock.cpp:
966         (WebCore::RenderBlock::paint):
967         (WebCore::RenderBlock::isSelectionRoot):
968         (WebCore::RenderBlock::selectionGaps):
969         * rendering/RenderBlockFlow.cpp:
970         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
971         (WebCore::RenderBlockFlow::layoutBlock):
972         (WebCore::RenderBlockFlow::requiresColumns):
973         * rendering/RenderBox.cpp:
974         (WebCore::RenderBox::styleWillChange):
975         (WebCore::RenderBox::styleDidChange):
976         (WebCore::RenderBox::updateFromStyle):
977         (WebCore::RenderBox::paintBackground):
978         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
979         (WebCore::RenderBox::repaintLayerRectsForImage):
980         (WebCore::RenderBox::computeLogicalHeight):
981         (WebCore::RenderBox::computePercentageLogicalHeight):
982         (WebCore::RenderBox::createsNewFormattingContext):
983         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
984         * rendering/RenderBox.h:
985         (WebCore::RenderBox::stretchesToViewport):
986         * rendering/RenderBoxModelObject.cpp:
987         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
988         (WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates):
989         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
990         * rendering/RenderBoxModelObject.h:
991         * rendering/RenderDeprecatedFlexibleBox.cpp:
992         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
993         * rendering/RenderElement.cpp:
994         (WebCore::RenderElement::styleWillChange):
995         (WebCore::RenderElement::rendererForRootBackground):
996         (WebCore::shouldRepaintForImageAnimation):
997         * rendering/RenderElement.h:
998         * rendering/RenderFlexibleBox.cpp:
999         (WebCore::RenderFlexibleBox::layoutBlock):
1000         * rendering/RenderGrid.cpp:
1001         (WebCore::RenderGrid::layoutBlock):
1002         * rendering/RenderLayer.cpp:
1003         (WebCore::shouldSuppressPaintingLayer):
1004         (WebCore::paintForFixedRootBackground):
1005         (WebCore::RenderLayer::paintLayerContents):
1006         (WebCore::RenderLayer::calculateClipRects):
1007         * rendering/RenderLayer.h:
1008         * rendering/RenderLayerBacking.cpp:
1009         (WebCore::RenderLayerBacking::rendererBackgroundColor):
1010         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
1011         * rendering/RenderLayerModelObject.cpp:
1012         (WebCore::RenderLayerModelObject::styleDidChange):
1013         * rendering/RenderObject.cpp:
1014         (WebCore::RenderObject::repaintSlowRepaintObject):
1015         (WebCore::RenderObject::offsetParent):
1016         * rendering/RenderObject.h:
1017         (WebCore::RenderObject::isDocumentElementRenderer):
1018         (WebCore::RenderObject::isRoot): Deleted.
1019         * rendering/RenderTable.cpp:
1020         (WebCore::RenderTable::paint):
1021         * rendering/svg/RenderSVGRoot.cpp:
1022         (WebCore::RenderSVGRoot::layout):
1023         (WebCore::RenderSVGRoot::shouldApplyViewportClip):
1024         * rendering/svg/SVGRenderSupport.cpp:
1025         (WebCore::SVGRenderSupport::isOverflowHidden):
1026
1027 2015-10-09  Nan Wang  <n_wang@apple.com>
1028
1029         AX: ARIA 1.1 implement aria-colcount, aria-colindex, aria-colspan, aria-rowcount, aria-rowindex and aria-rowspan
1030         https://bugs.webkit.org/show_bug.cgi?id=148967
1031
1032         Reviewed by Chris Fleizach.
1033
1034         Added support for ARIA 1.1 table/grid related attributes. Created new attributes for mac, so
1035         VoiceOver can pick up the information and speak accordingly.
1036
1037         Test: accessibility/mac/aria-table-attributes.html
1038
1039         * accessibility/AccessibilityARIAGridCell.cpp:
1040         (WebCore::AccessibilityARIAGridCell::AccessibilityARIAGridCell):
1041         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
1042         (WebCore::AccessibilityARIAGridCell::columnIndexRange):
1043         (WebCore::AccessibilityARIAGridCell::parentRowGroup):
1044         * accessibility/AccessibilityARIAGridCell.h:
1045         * accessibility/AccessibilityObject.cpp:
1046         (WebCore::initializeRoleMap):
1047         * accessibility/AccessibilityObject.h:
1048         * accessibility/AccessibilityTable.cpp:
1049         (WebCore::AccessibilityTable::title):
1050         (WebCore::AccessibilityTable::ariaColumnCount):
1051         (WebCore::AccessibilityTable::ariaRowCount):
1052         * accessibility/AccessibilityTable.h:
1053         * accessibility/AccessibilityTableCell.cpp:
1054         (WebCore::AccessibilityTableCell::AccessibilityTableCell):
1055         (WebCore::AccessibilityTableCell::titleUIElement):
1056         (WebCore::AccessibilityTableCell::ariaColumnIndex):
1057         (WebCore::AccessibilityTableCell::ariaRowIndex):
1058         (WebCore::AccessibilityTableCell::ariaColumnSpan):
1059         (WebCore::AccessibilityTableCell::ariaRowSpan):
1060         * accessibility/AccessibilityTableCell.h:
1061         (WebCore::AccessibilityTableCell::setARIAColIndexFromRow):
1062         * accessibility/AccessibilityTableRow.cpp:
1063         (WebCore::AccessibilityTableRow::headerObject):
1064         (WebCore::AccessibilityTableRow::addChildren):
1065         (WebCore::AccessibilityTableRow::ariaColumnIndex):
1066         (WebCore::AccessibilityTableRow::ariaRowIndex):
1067         * accessibility/AccessibilityTableRow.h:
1068         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1069         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1070         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1071         * html/HTMLAttributeNames.in:
1072
1073 2015-10-09  Anders Carlsson  <andersca@apple.com>
1074
1075         Remove hack that allowed plug-ins to always take over certain image formats
1076         https://bugs.webkit.org/show_bug.cgi?id=149972
1077
1078         Reviewed by Tim Horton.
1079
1080         This hack was added 8 years ago to allow a certain plug-in to show multi-page TIFF images on uspto.gov. 
1081         We now support said TIFFs natively, and the plug-in has been discontinued so it's safe to get rid of this.
1082
1083         * loader/SubframeLoader.cpp:
1084         (WebCore::SubframeLoader::shouldUsePlugin): Deleted.
1085
1086 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1087
1088         Garbage texture data with composited table row
1089         https://bugs.webkit.org/show_bug.cgi?id=148984
1090
1091         Reviewed by Zalan Bujtas.
1092         
1093         Don't pretend to know if the layer for a table header, section or cell is
1094         opaque, since table painting is special.
1095
1096         Test: compositing/contents-opaque/table-parts.html
1097
1098         * rendering/RenderLayer.cpp:
1099         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
1100
1101 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1102
1103         Garbage pixels on enphaseenergy.com site
1104         https://bugs.webkit.org/show_bug.cgi?id=149915
1105         rdar://problem/22976184
1106
1107         Reviewed by Darin Adler.
1108         
1109         When the <html> gets a composited RenderLayer, and we ask whether its background
1110         is opaque, return false, since the document element's background propagates
1111         to the root, and is painted by the RenderView.
1112         
1113         Also improve the compositing logging to indicate when fore- and background layers
1114         are present.
1115
1116         Test: compositing/contents-opaque/negative-z-before-html.html
1117
1118         * rendering/RenderLayerBacking.cpp:
1119         (WebCore::RenderLayerBacking::updateGeometry):
1120         * rendering/RenderLayerCompositor.cpp:
1121         (WebCore::RenderLayerCompositor::logLayerInfo):
1122
1123 2015-10-09  Antoine Quint  <graouts@apple.com>
1124
1125         Dynamic background color changes do not update until a layout is forced
1126         https://bugs.webkit.org/show_bug.cgi?id=131623
1127
1128         Compute correct repaint rect for decorated RenderSVGRoots.
1129
1130         The current implementation of clippedOverflowRectForRepaint() uses the
1131         generic repaint-rect calculations in SVGRenderSupport. Those in turn make
1132         use of repaintRectInLocalCoordinates(), which for RenderSVGRoot is the
1133         union of the painted children (w/ some expansion). If there're no children,
1134         or they do not fill the entire content box, then a repaint would not
1135         repaint the correct parts.
1136         Fix by calculating the union of the border-box and the SVG content
1137         when the SVG root is decorated (has background/border/etc.)
1138
1139         Adapted from a Chromium patch by fs@opera.com
1140         https://src.chromium.org/viewvc/blink?revision=170890&view=revision
1141
1142         Reviewed by Darin Adler.
1143
1144         Tests: svg/repaint/add-background-property-on-root.html
1145                svg/repaint/add-border-property-on-root.html
1146                svg/repaint/add-outline-property-on-root.html
1147                svg/repaint/change-background-color.html
1148                svg/repaint/remove-background-property-on-root.html
1149                svg/repaint/remove-border-property-on-root.html
1150                svg/repaint/remove-outline-property-on-root.html
1151
1152         * rendering/svg/RenderSVGRoot.cpp:
1153         (WebCore::RenderSVGRoot::layout):
1154         (WebCore::RenderSVGRoot::styleDidChange):
1155         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
1156
1157 2015-10-09  Simon Fraser  <simon.fraser@apple.com>
1158
1159         [iOS WK2] Fix assertion in ViewportConfiguration::setDefaultConfiguration seen in testing
1160         https://bugs.webkit.org/show_bug.cgi?id=149959
1161
1162         Reviewed by Tim Horton.
1163
1164         When loading tests which set a flexible viewport, ViewportConfiguration::setDefaultConfiguration()
1165         is called first with testingParameters() and then with webpageParameters(). This
1166         would trigger the assertion that m_defaultConfiguration.initialScaleIsSet but
1167         the new initial scale is zero.
1168         
1169         The assertion seems wrong anyway; it's consulting m_defaultConfiguration.initialScaleIsSet
1170         but defaultConfiguration.initialScale, so fix it to test defaultConfiguration.initialScaleIsSet.
1171
1172         * page/ViewportConfiguration.cpp:
1173         (WebCore::ViewportConfiguration::setDefaultConfiguration):
1174
1175 2015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
1176
1177         Fix the !ENABLE(STREAM_API) build after r190794
1178         https://bugs.webkit.org/show_bug.cgi?id=149955
1179
1180         Reviewed by Darin Adler.
1181
1182         * bindings/js/WebCoreJSBuiltinInternals.h:
1183         (WebCore::JSBuiltinInternalFunctions::visit):
1184         (WebCore::JSBuiltinInternalFunctions::init):
1185
1186 2015-10-09  Csaba Osztrogonác  <ossy@webkit.org>
1187
1188         Fix the binding generator after r190785
1189         https://bugs.webkit.org/show_bug.cgi?id=149956
1190
1191         Reviewed by Darin Adler.
1192
1193         * bindings/scripts/CodeGeneratorJS.pm:
1194         (GenerateConstructorHelperMethods):
1195         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1196         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
1197         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1198         (WebCore::JSTestEventConstructorConstructor::getConstructData):
1199         * bindings/scripts/test/JS/JSTestInterface.cpp:
1200         (WebCore::JSTestInterfaceConstructor::getConstructData):
1201         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1202         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
1203         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1204         (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
1205         * bindings/scripts/test/JS/JSTestNode.cpp:
1206         (WebCore::JSTestNodeConstructor::getConstructData):
1207         * bindings/scripts/test/JS/JSTestObj.cpp:
1208         (WebCore::JSTestObjConstructor::getConstructData):
1209         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1210         (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
1211         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1212         (WebCore::JSTestTypedefsConstructor::getConstructData):
1213
1214 2015-10-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1215
1216         Backgrounds bleed out of natively rendered text fields
1217         https://bugs.webkit.org/show_bug.cgi?id=149843
1218         <rdar://problem/22896977>
1219
1220         Reviewed by Darin Adler.
1221
1222         When natively rendering a text field with a background on Mac, the background bleeds out
1223         of the text field's border when the graphics context is scaled (as a result of a retina
1224         display or zoom/scale effects). This is because when we render the text field in bezeled
1225         style within a certain frame, AppKit adds 1 device pixel insets on all sides of the frame,
1226         which renders a text field that is slightly smaller than the frame. To adjust for this, we
1227         inflate the paint rect.
1228
1229         Test: fast/forms/hidpi-textfield-background-bleeding.html
1230
1231         * rendering/RenderThemeMac.mm:
1232         (WebCore::RenderThemeMac::paintTextField):
1233
1234 2015-10-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1235
1236         Refactor WebCore JS builtins to prepare for automatic generation
1237         https://bugs.webkit.org/show_bug.cgi?id=149751
1238
1239         Reviewed by Darin Adler.
1240
1241         Adding annotations to JS files to know whether they should be under a compilation flag and
1242         whether they are JS internals or JS tied to WebIDL.
1243         If a file is said as JS internals, all function names should be exported automatically.
1244         Added WebCoreJSBuiltins.h to simplify handling of builtins in JSVMClientData.
1245         Added WebCoreJSInternals.h to simplify handling of builtin private function in JSDOMWindowBase.
1246         Renamed WebCoreJSClientData to JSVMClientData.
1247
1248         Covered by existing tests.
1249
1250         * CMakeLists.txt:
1251         * Modules/streams/ByteLengthQueuingStrategy.js:
1252         * Modules/streams/CountQueuingStrategy.js:
1253         * Modules/streams/ReadableStream.js:
1254         * Modules/streams/ReadableStreamController.js:
1255         * Modules/streams/ReadableStreamInternals.js:
1256         * Modules/streams/ReadableStreamReader.js:
1257         * WebCore.order:
1258         * WebCore.xcodeproj/project.pbxproj:
1259         * bindings/js/DOMWrapperWorld.cpp:
1260         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
1261         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
1262         (WebCore::normalWorld):
1263         * bindings/js/JSDOMWindowBase.cpp:
1264         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1265         (WebCore::JSDOMWindowBase::finishCreation):
1266         (WebCore::JSDOMWindowBase::visitChildren):
1267         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
1268         (WebCore::JSDOMWindowBase::destroy): Deleted.
1269         * bindings/js/JSDOMWindowBase.h:
1270         * bindings/js/ScriptController.cpp:
1271         (WebCore::ScriptController::getAllWorlds):
1272         * bindings/js/SerializedScriptValue.cpp:
1273         (WebCore::SerializedScriptValue::transferArrayBuffers):
1274         * bindings/js/WebCoreJSBuiltinInternals.h: Added.
1275         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
1276         (WebCore::JSBuiltinInternalFunctions::readableStreamInternals):
1277         (WebCore::JSBuiltinInternalFunctions::visit):
1278         (WebCore::JSBuiltinInternalFunctions::init):
1279         * bindings/js/WebCoreJSBuiltins.cpp:
1280         * bindings/js/WebCoreJSBuiltins.h: Added.
1281         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
1282         (WebCore::JSBuiltinFunctions::byteLengthQueuingStrategyBuiltins):
1283         (WebCore::JSBuiltinFunctions::countQueuingStrategyBuiltins):
1284         (WebCore::JSBuiltinFunctions::readableStreamBuiltins):
1285         (WebCore::JSBuiltinFunctions::readableStreamControllerBuiltins):
1286         (WebCore::JSBuiltinFunctions::readableStreamInternalsBuiltins):
1287         (WebCore::JSBuiltinFunctions::readableStreamReaderBuiltins):
1288         * bindings/js/WebCoreJSClientData.h:
1289         (WebCore::JSVMClientData::JSVMClientData):
1290         (WebCore::JSVMClientData::~JSVMClientData):
1291         (WebCore::JSVMClientData::builtinFunctions):
1292         (WebCore::initNormalWorldClientData):
1293         (WebCore::JSVMClientData::normalWorld): Deleted.
1294         (WebCore::JSVMClientData::getAllWorlds): Deleted.
1295
1296 2015-10-09  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1297
1298         Rationalize JSXXConstructor class definition
1299         https://bugs.webkit.org/show_bug.cgi?id=149923
1300
1301         Reviewed by Darin Adler.
1302
1303         Declaration of JSXXConstructor::construct and JSXXConstructor::getConstructData
1304         as long as JSXX is constructable from JavaScript.
1305
1306         Previously, JSXXConstructor::construct was not generated in case of CustomConstructor.
1307         It is now generated and directly calls the custom constructor function.
1308
1309         getConstructData was declared conditionally with #if in case of ConstructorConditional.
1310         The #if are now within getConstructData body.
1311
1312         Covered by binding tests.
1313
1314         * bindings/scripts/CodeGeneratorJS.pm:
1315         (GenerateConstructorDeclaration):
1316         (GenerateOverloadedConstructorDefinition):
1317         (GenerateConstructorDefinition):
1318         (GenerateConstructorHelperMethods):
1319         (GenerateConstructorDefinitions):.
1320         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1321         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::construct):
1322         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
1323         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):.
1324         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1325         (WebCore::JSTestEventConstructorConstructor::construct):
1326         (WebCore::JSTestEventConstructorConstructor::getConstructData):
1327         * bindings/scripts/test/JS/JSTestInterface.cpp:
1328         (WebCore::JSTestInterfaceConstructor::construct):
1329         (WebCore::JSTestInterfaceConstructor::getConstructData):
1330         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1331         (WebCore::JSTestJSBuiltinConstructorConstructor::construct):
1332         (WebCore::JSTestJSBuiltinConstructorConstructor::getConstructData):
1333         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1334         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
1335         (WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
1336         * bindings/scripts/test/JS/JSTestNode.cpp:
1337         (WebCore::JSTestNodeConstructor::construct):
1338         (WebCore::JSTestNodeConstructor::getConstructData):
1339         * bindings/scripts/test/JS/JSTestObj.cpp:
1340         (WebCore::JSTestObjConstructor::construct):
1341         (WebCore::JSTestObjConstructor::getConstructData):
1342         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1343         (WebCore::constructJSTestOverloadedConstructors1):
1344         (WebCore::constructJSTestOverloadedConstructors2):
1345         (WebCore::constructJSTestOverloadedConstructors3):
1346         (WebCore::constructJSTestOverloadedConstructors4):
1347         (WebCore::constructJSTestOverloadedConstructors5):
1348         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
1349         (WebCore::JSTestOverloadedConstructorsConstructor::getConstructData):
1350         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1351         (WebCore::JSTestTypedefsConstructor::construct):
1352         (WebCore::JSTestTypedefsConstructor::getConstructData):
1353
1354 2015-10-07  Sergio Villar Senin  <svillar@igalia.com>
1355
1356         [css-grid] Include freeSpace in GridSizingData struct
1357         https://bugs.webkit.org/show_bug.cgi?id=149876
1358
1359         Reviewed by Darin Adler.
1360
1361         During the layout process we keep the free space for rows and
1362         columns in two variables that are passed to a few methods
1363         along with the GridSizingData struct. Those two variables
1364         should clearly be part of GridSizingData as they're temporary
1365         values used just for the sake of the layout.
1366
1367         No new tests required as this is just a refactoring.
1368
1369         * rendering/RenderGrid.cpp:
1370         (WebCore::RenderGrid::GridSizingData::GridSizingData):
1371         (WebCore::RenderGrid::GridSizingData::freeSpaceForDirection):
1372         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1373         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1374         (WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
1375         (WebCore::RenderGrid::layoutGridItems):
1376         (WebCore::RenderGrid::populateGridPositions):
1377         (WebCore::contentDistributionOffset):
1378         (WebCore::RenderGrid::computeContentPositionAndDistributionOffset):
1379         * rendering/RenderGrid.h:
1380
1381 2015-10-08  Sergio Villar Senin  <svillar@igalia.com>
1382
1383         [css-grid] Remove unneeded calls to compute(Content)LogicalWidth(Height)
1384         https://bugs.webkit.org/show_bug.cgi?id=149926
1385
1386         Reviewed by Darin Adler.
1387
1388         In order to resolve a Length to a LayoutUnit we need to
1389         provide a maximum value so that i.e. percentages are correctly
1390         computed. That maximum value was computeLogicalWidth() for
1391         columns and computeContentLogicalHeight() for rows. We were
1392         calling it for every single track with a definite size instead
1393         of computing it once and reusing it multiple times.
1394
1395         This brings some nice performance improvements:
1396         - 2.9%  in /Layout/fixed-grid-lots-of-data
1397         - 2.95% in /Layout/fixed-grid-lots-of-stretched-data
1398
1399         No new tests required as there is no change in functionality.
1400
1401         * rendering/RenderGrid.cpp:
1402         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1403         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
1404         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
1405         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
1406         * rendering/RenderGrid.h:
1407
1408 2015-10-08  Chris Dumez  <cdumez@apple.com>
1409
1410         Unreviewed, build fix for ENABLE(MEDIA_SESSION) after r190030.
1411
1412         * dom/Document.cpp:
1413         (WebCore::Document::updateIsPlayingMedia):
1414
1415 2015-10-08  Chris Dumez  <cdumez@apple.com>
1416
1417         Unreviewed, build fixes for ENABLE(MEDIA_SESSION) after r190030.
1418
1419         * Modules/mediasession/HTMLMediaElementMediaSession.cpp:
1420         (WebCore::HTMLMediaElementMediaSession::session):
1421         * Modules/mediasession/HTMLMediaElementMediaSession.h:
1422         * Modules/mediasession/MediaSession.cpp:
1423         (WebCore::MediaSession::controls):
1424         * Modules/mediasession/MediaSession.h:
1425
1426 2015-10-08  Jiewen Tan  <jiewen_tan@apple.com>
1427
1428         Gracefully handle XMLDocumentParser being detached by mutation events.
1429         https://bugs.webkit.org/show_bug.cgi?id=149485
1430         <rdar://problem/22811489>
1431
1432         This is a merge of Blink change 200026,
1433         https://codereview.chromium.org/1267283002
1434
1435         Reviewed by Darin Adler.
1436
1437         Test: fast/parser/xhtml-dom-character-data-modified-crash.html
1438
1439         * xml/parser/XMLDocumentParser.cpp:
1440         (WebCore::XMLDocumentParser::createLeafTextNode):
1441         Renamed from enterText() to make it more descriptive. 
1442
1443         (WebCore::XMLDocumentParser::updateLeafTextNode):
1444         Renamed from exitText to firm up this stage.
1445
1446         (WebCore::XMLDocumentParser::end):
1447         Gracefully handle stopped states.
1448
1449         (WebCore::XMLDocumentParser::enterText): Deleted.
1450         (WebCore::XMLDocumentParser::exitText): Deleted.
1451
1452         * xml/parser/XMLDocumentParser.h:
1453         Rename enterText to createLeafTextNode.
1454         Rename exitText to updateLeafTextNode.
1455
1456         * xml/parser/XMLDocumentParserLibxml2.cpp:
1457         (WebCore::XMLDocumentParser::startElementNs):
1458         (WebCore::XMLDocumentParser::endElementNs):
1459         (WebCore::XMLDocumentParser::characters):
1460         (WebCore::XMLDocumentParser::processingInstruction):
1461         (WebCore::XMLDocumentParser::cdataBlock):
1462         (WebCore::XMLDocumentParser::comment):
1463         (WebCore::XMLDocumentParser::endDocument):
1464         Rename function calls and firm up updateLeafTextNode stage accordingly.
1465
1466 2015-10-08  Chris Dumez  <cdumez@apple.com>
1467
1468         data: URLs should not be preloaded
1469         https://bugs.webkit.org/show_bug.cgi?id=149829
1470
1471         Reviewed by Darin Adler.
1472
1473         Fix review comments after r190605:
1474         Use protocolIs() instead of String::startsWith().
1475
1476         * html/parser/HTMLPreloadScanner.cpp:
1477         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
1478
1479 2015-10-08  Chris Dumez  <cdumez@apple.com>
1480
1481         Revert r187626 (and r188025) as it caused a PLT regression
1482         https://bugs.webkit.org/show_bug.cgi?id=149898
1483         <rdar://problem/22657123>
1484
1485         Reviewed by Myles Maxfield.
1486
1487         * css/CSSPropertyNames.in:
1488         * css/StyleBuilderCustom.h:
1489         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
1490         * platform/graphics/Font.cpp:
1491         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
1492         (WebCore::CharacterFallbackMapKey::operator==):
1493         (WebCore::CharacterFallbackMapKeyHash::hash):
1494         (WebCore::Font::systemFallbackFontForCharacter):
1495         * platform/graphics/FontCache.h:
1496         (WebCore::FontDescriptionKey::operator==):
1497         (WebCore::FontDescriptionKey::FontDescriptionKey): Deleted.
1498         (WebCore::FontDescriptionKey::computeHash): Deleted.
1499         * platform/graphics/FontDescription.cpp:
1500         (WebCore::FontDescription::FontDescription):
1501         (WebCore::FontDescription::traitsMask): Deleted.
1502         (WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
1503         * platform/graphics/FontDescription.h:
1504         (WebCore::FontDescription::setScript):
1505         (WebCore::FontDescription::operator==):
1506         (WebCore::FontDescription::setFeatureSettings): Deleted.
1507         (WebCore::FontCascadeDescription::initialVariantAlternates): Deleted.
1508         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1509         (WebCore::FontCache::systemFallbackForCharacters):
1510         * rendering/style/RenderStyle.cpp:
1511         (WebCore::RenderStyle::changeRequiresLayout):
1512         * rendering/style/RenderStyle.h:
1513         * rendering/style/StyleRareInheritedData.cpp:
1514         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1515         (WebCore::StyleRareInheritedData::operator==):
1516         * rendering/style/StyleRareInheritedData.h:
1517         * style/StyleResolveForDocument.cpp:
1518         (WebCore::Style::resolveForDocument):
1519
1520 2015-10-08  Andreas Kling  <akling@apple.com>
1521
1522         Generated frame tree names should be kept reasonably long.
1523         <https://webkit.org/b/149874>
1524
1525         Reviewed by Darin Adler.
1526
1527         Some clumsy advertising script is going around assigning JavaScript source code
1528         to the "name" attribute of iframes. This is causing WebKit to generate way too huge
1529         names for anonymous descendants of such iframes.
1530
1531         Previously, the generated name of an anonymous subframe would be its slash-separated
1532         path from the root frame, with the "name" attribute of each ancestor between the
1533         slashes, or "<!--frame${index in parent}-->" for anonymous ancestors.
1534
1535         These ad scripts are often over 100kB in size, with multiple subframes, so we'd end
1536         up with frame names looking like this:
1537
1538         "<!--framePath //<MONSTER BLOB OF JAVASCRIPT FROM HELL>/<!--frame0--><!--frame0-->-->"
1539
1540         While this is worth fixing for the memory usage alone, we've been making it way
1541         worse by also using these paths when recording the back/forward history parts of
1542         WebKit session state.
1543
1544         This patch makes generated paths always use index-in-parent as the "directory name"
1545         for ancestors of anonymous subframes. The above example path will now instead be:
1546
1547         "<!--framePath //<!--frame0-->/<!--frame0-->/<!--frame0-->-->"
1548
1549         Test: fast/frames/long-names-in-nested-subframes.html
1550
1551         * page/FrameTree.cpp:
1552         (WebCore::FrameTree::indexInParent):
1553         (WebCore::FrameTree::uniqueChildName):
1554         * page/FrameTree.h:
1555
1556 2015-10-08  Commit Queue  <commit-queue@webkit.org>
1557
1558         Unreviewed, rolling out r190701.
1559         https://bugs.webkit.org/show_bug.cgi?id=149937
1560
1561         "It did not help, will try a full roll out instead" (Requested
1562         by cdumez on #webkit).
1563
1564         Reverted changeset:
1565
1566         "Partial revert of r187626 as it caused a PLT regression"
1567         https://bugs.webkit.org/show_bug.cgi?id=149898
1568         http://trac.webkit.org/changeset/190701
1569
1570 2015-10-08  Zalan Bujtas  <zalan@apple.com>
1571
1572         Fallback to the RenderView when repaint container is null.
1573         https://bugs.webkit.org/show_bug.cgi?id=149903
1574
1575         Reviewed by Simon Fraser.
1576
1577         Reduces code complexity at the calling sites.
1578
1579         No change in functionality.
1580
1581         * rendering/RenderObject.cpp:
1582         (WebCore::RenderObject::repaintUsingContainer):
1583         (WebCore::RenderObject::repaint):
1584         (WebCore::RenderObject::repaintRectangle):
1585
1586 2015-10-08  Jiewen Tan  <jiewen_tan@apple.com>
1587
1588         Add NULL check for renderBox::layer() on applying zoom level change
1589         https://bugs.webkit.org/show_bug.cgi?id=149302
1590         <rdar://problem/22747292>
1591
1592         Reviewed by Darin Adler.
1593
1594         Test: fast/css/zoom-on-nested-scroll-crash.html
1595
1596         This is a merge of Blink r158238:
1597         https://chromiumcodereview.appspot.com/23526081
1598
1599         * rendering/RenderBox.cpp:
1600         (WebCore::RenderBox::styleDidChange):
1601
1602 2015-10-08  Brady Eidson  <beidson@apple.com>
1603
1604         Update Inspector to only work with Legacy IDB (for now).
1605         https://bugs.webkit.org/show_bug.cgi?id=149928.
1606
1607         Reviewed by Tim Horton.
1608
1609         * Modules/indexeddb/IDBAny.h:
1610         (WebCore::IDBAny::isLegacy):
1611         
1612         * Modules/indexeddb/legacy/LegacyAny.h:
1613         * inspector/InspectorIndexedDBAgent.cpp:
1614
1615 2015-10-08  Antti Koivisto  <antti@apple.com>
1616
1617         CrashTracer: [USER] com.apple.WebKit.WebContent at …Core::SelectorChecker::checkScrollbarPseudoClass const + 217
1618         https://bugs.webkit.org/show_bug.cgi?id=149921
1619         rdar://problem/22731359
1620
1621         Reviewed by Andreas Kling.
1622
1623         Test: svg/css/use-window-inactive-crash.html
1624
1625         * css/SelectorCheckerTestFunctions.h:
1626         (WebCore::isWindowInactive):
1627
1628             Null check page.
1629
1630 2015-10-08  Michael Catanzaro  <mcatanzaro@igalia.com>
1631
1632         Format string issues in LegacyRequest.cpp
1633         https://bugs.webkit.org/show_bug.cgi?id=149866
1634
1635         Reviewed by Csaba Osztrogonác.
1636
1637         Cast enums to ints before printing them to placate GCC's -Wformat.
1638
1639         * Modules/indexeddb/legacy/LegacyRequest.cpp:
1640         (WebCore::LegacyRequest::dispatchEvent):
1641         (WebCore::LegacyRequest::enqueueEvent):
1642
1643 2015-10-08  Commit Queue  <commit-queue@webkit.org>
1644
1645         Unreviewed, rolling out r190716.
1646         https://bugs.webkit.org/show_bug.cgi?id=149924
1647
1648         broke mac build from time to time (Requested by youenn on
1649         #webkit).
1650
1651         Reverted changeset:
1652
1653         "Automate WebCore JS builtins generation and build system"
1654         https://bugs.webkit.org/show_bug.cgi?id=149751
1655         http://trac.webkit.org/changeset/190716
1656
1657 2015-10-08  Sergio Villar Senin  <svillar@igalia.com>
1658
1659         [css-grid] Percentages of indefinite sizes to be resolved as auto
1660         https://bugs.webkit.org/show_bug.cgi?id=149810
1661
1662         Reviewed by Darin Adler.
1663
1664         Specs mention that percentages in grid track sizes must be
1665         resolved as 'auto' if the grid container has an indefinite
1666         size in the corresponding axis.
1667
1668         The 'auto' keyword used to be resolved as
1669         minmax(min-content,max-content) but since r189911 it's
1670         resolved as minmax(auto,auto). Updated the implementation so
1671         we properly resolve those percentages.
1672
1673         No new tests as the behavior does not change at all. That's
1674         because 'auto' as min-track sizing function is the same as
1675         min-content (unless we have a specified value for
1676         min-{width|height}, but those cases were already handled in the
1677         code), and as a max sizing function is works as max-content.
1678
1679         * rendering/RenderGrid.cpp:
1680         (WebCore::RenderGrid::gridTrackSize):
1681
1682 2015-10-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1683
1684         Automate WebCore JS builtins generation and build system
1685         https://bugs.webkit.org/show_bug.cgi?id=149751
1686
1687         Reviewed by Darin Adler.
1688
1689         Adding annotations to JS files to know whether they should be under a compilation flag and
1690         whether they are JS internals or JS tied to WebIDL.
1691         If a file is said as JS internals, all function names are exported automatically.
1692         Added auto generation of WebCoreJSBuiltins.cpp
1693         Added auto generation of JSBuiltinFunctions class inside WebCoreJSBuiltins that takes the role of
1694         WebCoreJSClientData as wrapper for builtins.
1695         Added auto generation of WebCoreJSBuiltinInternals.h which contain a wrapper around all private functions, used by
1696         JSDOMWindowBase. The class is named JSBuiltinInternalFunctions.
1697         Renamed WebCoreJSClientData to JSVMClientData.
1698
1699         The remaining manual part for private functions is the pairing between private identifiers and
1700         the private JS functions within JSDOMWindowBase::finishCreation.
1701
1702         Covered by existing tests.
1703
1704         * CMakeLists.txt:
1705         * DerivedSources.make:
1706         * Modules/streams/ByteLengthQueuingStrategy.js:
1707         * Modules/streams/CountQueuingStrategy.js:
1708         * Modules/streams/ReadableStream.js:
1709         * Modules/streams/ReadableStreamInternals.js:
1710         * WebCore.order:
1711         * WebCore.vcxproj/WebCore.vcxproj:
1712         * WebCore.xcodeproj/project.pbxproj:
1713         * bindings/js/DOMWrapperWorld.cpp:
1714         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
1715         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
1716         (WebCore::normalWorld):
1717         * bindings/js/JSDOMWindowBase.cpp:
1718         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1719         (WebCore::JSDOMWindowBase::finishCreation):
1720         (WebCore::JSDOMWindowBase::visitChildren):
1721         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
1722         * bindings/js/JSDOMWindowBase.h:
1723         * bindings/js/ScriptController.cpp:
1724         (WebCore::ScriptController::getAllWorlds):
1725         * bindings/js/SerializedScriptValue.cpp:
1726         (WebCore::SerializedScriptValue::transferArrayBuffers):
1727         * bindings/js/WebCoreJSClientData.h:
1728         (WebCore::JSClientData::JSClientData):
1729         (WebCore::JSClientData::~JSClientData):
1730         (WebCore::JSClientData::builtinFunctions):
1731         (WebCore::initNormalWorldClientData):
1732         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Deleted.
1733         (WebCore::WebCoreJSClientData::~WebCoreJSClientData): Deleted.
1734         (WebCore::WebCoreJSClientData::readableStreamBuiltins): Deleted.
1735         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins): Deleted.
1736         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins): Deleted.
1737         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins): Deleted.
1738         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Deleted.
1739         (WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins): Deleted.
1740         * generate-js-builtins-allinone: Added.
1741         (retrieveGenerationParameters):
1742         (retrieveFilesWithParameters):
1743         (retrieveFilesWithParameters.FileInput):
1744         (writeConditional):
1745         (JSBuiltinFunctions):
1746         (Private):
1747         (JSBuiltinInternalFunctions):
1748         (copytempfile):
1749
1750 2015-10-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1751
1752         Binding generated JS constructors should use GlobalObject references
1753         https://bugs.webkit.org/show_bug.cgi?id=149872
1754
1755         Reviewed by Darin Adler.
1756
1757         Updated binding generator to generate JS DOM constructors code with JSDOMGlobalOBject references.
1758         Updated WebCore JS binding layer accordingly.
1759
1760         Covered by updated binding tests.
1761
1762         * bindings/js/DOMConstructorWithDocument.h:
1763         (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
1764         (WebCore::DOMConstructorWithDocument::finishCreation):
1765         * bindings/js/JSDOMBinding.cpp:
1766         (WebCore::getCachedDOMStructure):
1767         (WebCore::cacheDOMStructure):
1768         * bindings/js/JSDOMBinding.h:
1769         (WebCore::DOMConstructorObject::DOMConstructorObject):
1770         (WebCore::DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject):
1771         (WebCore::getDOMStructure):
1772         (WebCore::deprecatedGetDOMStructure):
1773         (WebCore::getDOMPrototype):
1774         (WebCore::createJSBuiltin):
1775         (WebCore::createWrapper):
1776         * bindings/js/JSDOMConstructor.h:
1777         (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
1778         * bindings/js/JSDOMGlobalObject.h:
1779         (WebCore::getDOMConstructor):
1780         * bindings/js/JSDOMWindowCustom.cpp:
1781         (WebCore::JSDOMWindow::image):
1782         (WebCore::JSDOMWindow::touch):
1783         (WebCore::JSDOMWindow::touchList):
1784         * bindings/js/JSDOMWrapper.h:
1785         (WebCore::JSDOMWrapper::JSDOMWrapper):
1786         (WebCore::JSDOMWrapperWithImplementation::JSDOMWrapperWithImplementation):
1787         * bindings/js/JSImageConstructor.cpp:
1788         (WebCore::JSImageConstructor::JSImageConstructor):
1789         (WebCore::JSImageConstructor::finishCreation):
1790         * bindings/js/JSImageConstructor.h:
1791         (WebCore::JSImageConstructor::create):
1792         (WebCore::JSImageConstructor::createStructure):
1793         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
1794         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject):
1795         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject):
1796         * bindings/scripts/CodeGeneratorJS.pm:
1797         (GenerateHeader):
1798         (GenerateImplementation):
1799         (GenerateCallbackImplementation):
1800         (GenerateConstructorDeclaration):
1801         (GenerateConstructorHelperMethods):
1802         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1803         (WebCore::JSTestActiveDOMObjectConstructor::create):
1804         (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
1805         (WebCore::JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor):
1806         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
1807         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
1808         (WebCore::JSTestActiveDOMObject::getConstructor):
1809         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1810         (WebCore::JSTestActiveDOMObject::create):
1811         * bindings/scripts/test/JS/JSTestCallback.cpp:
1812         (WebCore::JSTestCallbackConstructor::create):
1813         (WebCore::JSTestCallbackConstructor::createStructure):
1814         (WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
1815         (WebCore::JSTestCallback::getConstructor):
1816         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1817         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
1818         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
1819         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
1820         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
1821         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
1822         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
1823         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
1824         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::create):
1825         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1826         (WebCore::JSTestCustomNamedGetterConstructor::create):
1827         (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
1828         (WebCore::JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor):
1829         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
1830         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
1831         (WebCore::JSTestCustomNamedGetter::getConstructor):
1832         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1833         (WebCore::JSTestCustomNamedGetter::create):
1834         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1835         (WebCore::JSTestEventConstructorConstructor::create):
1836         (WebCore::JSTestEventConstructorConstructor::createStructure):
1837         (WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor):
1838         (WebCore::JSTestEventConstructorConstructor::finishCreation):
1839         (WebCore::JSTestEventConstructor::JSTestEventConstructor):
1840         (WebCore::JSTestEventConstructor::getConstructor):
1841         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1842         (WebCore::JSTestEventConstructor::create):
1843         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1844         (WebCore::JSTestEventTargetConstructor::create):
1845         (WebCore::JSTestEventTargetConstructor::createStructure):
1846         (WebCore::JSTestEventTargetConstructor::JSTestEventTargetConstructor):
1847         (WebCore::JSTestEventTargetConstructor::finishCreation):
1848         (WebCore::JSTestEventTarget::JSTestEventTarget):
1849         (WebCore::JSTestEventTarget::getConstructor):
1850         * bindings/scripts/test/JS/JSTestEventTarget.h:
1851         (WebCore::JSTestEventTarget::create):
1852         * bindings/scripts/test/JS/JSTestException.cpp:
1853         (WebCore::JSTestExceptionConstructor::create):
1854         (WebCore::JSTestExceptionConstructor::createStructure):
1855         (WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor):
1856         (WebCore::JSTestExceptionConstructor::finishCreation):
1857         (WebCore::JSTestException::JSTestException):
1858         (WebCore::JSTestException::getConstructor):
1859         * bindings/scripts/test/JS/JSTestException.h:
1860         (WebCore::JSTestException::create):
1861         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1862         (WebCore::JSTestGenerateIsReachableConstructor::create):
1863         (WebCore::JSTestGenerateIsReachableConstructor::createStructure):
1864         (WebCore::JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor):
1865         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
1866         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
1867         (WebCore::JSTestGenerateIsReachable::getConstructor):
1868         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1869         (WebCore::JSTestGenerateIsReachable::create):
1870         * bindings/scripts/test/JS/JSTestInterface.cpp:
1871         (WebCore::JSTestInterfaceConstructor::create):
1872         (WebCore::JSTestInterfaceConstructor::createStructure):
1873         (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor):
1874         (WebCore::JSTestInterfaceConstructor::finishCreation):
1875         (WebCore::JSTestInterface::JSTestInterface):
1876         (WebCore::JSTestInterface::getConstructor):
1877         * bindings/scripts/test/JS/JSTestInterface.h:
1878         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1879         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
1880         (WebCore::JSTestJSBuiltinConstructorConstructor::createStructure):
1881         (WebCore::JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor):
1882         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
1883         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
1884         (WebCore::JSTestJSBuiltinConstructor::getConstructor):
1885         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
1886         (WebCore::JSTestJSBuiltinConstructor::create):
1887         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1888         (WebCore::JSTestMediaQueryListListenerConstructor::create):
1889         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
1890         (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor):
1891         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
1892         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
1893         (WebCore::JSTestMediaQueryListListener::getConstructor):
1894         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1895         (WebCore::JSTestMediaQueryListListener::create):
1896         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1897         (WebCore::JSTestNamedConstructorConstructor::create):
1898         (WebCore::JSTestNamedConstructorConstructor::createStructure):
1899         (WebCore::JSTestNamedConstructorNamedConstructor::create):
1900         (WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
1901         (WebCore::JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor):
1902         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
1903         (WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
1904         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
1905         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
1906         (WebCore::JSTestNamedConstructor::getConstructor):
1907         (WebCore::JSTestNamedConstructor::getNamedConstructor):
1908         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1909         (WebCore::JSTestNamedConstructor::create):
1910         * bindings/scripts/test/JS/JSTestNode.cpp:
1911         (WebCore::JSTestNodeConstructor::create):
1912         (WebCore::JSTestNodeConstructor::createStructure):
1913         (WebCore::JSTestNodeConstructor::JSTestNodeConstructor):
1914         (WebCore::JSTestNodeConstructor::finishCreation):
1915         (WebCore::JSTestNode::JSTestNode):
1916         (WebCore::JSTestNode::getConstructor):
1917         * bindings/scripts/test/JS/JSTestNode.h:
1918         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1919         (WebCore::JSTestNondeterministicConstructor::create):
1920         (WebCore::JSTestNondeterministicConstructor::createStructure):
1921         (WebCore::JSTestNondeterministicConstructor::JSTestNondeterministicConstructor):
1922         (WebCore::JSTestNondeterministicConstructor::finishCreation):
1923         (WebCore::JSTestNondeterministic::JSTestNondeterministic):
1924         (WebCore::JSTestNondeterministic::getConstructor):
1925         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1926         (WebCore::JSTestNondeterministic::create):
1927         * bindings/scripts/test/JS/JSTestObj.cpp:
1928         (WebCore::JSTestObjConstructor::create):
1929         (WebCore::JSTestObjConstructor::createStructure):
1930         (WebCore::JSTestObjConstructor::JSTestObjConstructor):
1931         (WebCore::JSTestObjConstructor::finishCreation):
1932         (WebCore::JSTestObj::JSTestObj):
1933         (WebCore::JSTestObj::getConstructor):
1934         * bindings/scripts/test/JS/JSTestObj.h:
1935         (WebCore::JSTestObj::create):
1936         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1937         (WebCore::JSTestOverloadedConstructorsConstructor::create):
1938         (WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
1939         (WebCore::JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor):
1940         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
1941         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
1942         (WebCore::JSTestOverloadedConstructors::getConstructor):
1943         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1944         (WebCore::JSTestOverloadedConstructors::create):
1945         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1946         (WebCore::JSTestOverrideBuiltinsConstructor::create):
1947         (WebCore::JSTestOverrideBuiltinsConstructor::createStructure):
1948         (WebCore::JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor):
1949         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
1950         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
1951         (WebCore::JSTestOverrideBuiltins::getConstructor):
1952         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
1953         (WebCore::JSTestOverrideBuiltins::create):
1954         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1955         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
1956         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
1957         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor):
1958         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
1959         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
1960         (WebCore::JSTestSerializedScriptValueInterface::getConstructor):
1961         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1962         (WebCore::JSTestSerializedScriptValueInterface::create):
1963         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1964         (WebCore::JSTestTypedefsConstructor::create):
1965         (WebCore::JSTestTypedefsConstructor::createStructure):
1966         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
1967         (WebCore::JSTestTypedefsConstructor::finishCreation):
1968         (WebCore::JSTestTypedefs::JSTestTypedefs):
1969         (WebCore::JSTestTypedefs::getConstructor):
1970         * bindings/scripts/test/JS/JSTestTypedefs.h:
1971         (WebCore::JSTestTypedefs::create):
1972         * bindings/scripts/test/JS/JSattribute.cpp:
1973         (WebCore::JSattributeConstructor::create):
1974         (WebCore::JSattributeConstructor::createStructure):
1975         (WebCore::JSattributeConstructor::JSattributeConstructor):
1976         (WebCore::JSattributeConstructor::finishCreation):
1977         (WebCore::JSattribute::JSattribute):
1978         (WebCore::JSattribute::getConstructor):
1979         * bindings/scripts/test/JS/JSattribute.h:
1980         (WebCore::JSattribute::create):
1981         * bindings/scripts/test/JS/JSreadonly.cpp:
1982         (WebCore::JSreadonlyConstructor::create):
1983         (WebCore::JSreadonlyConstructor::createStructure):
1984         (WebCore::JSreadonlyConstructor::JSreadonlyConstructor):
1985         (WebCore::JSreadonlyConstructor::finishCreation):
1986         (WebCore::JSreadonly::JSreadonly):
1987         (WebCore::JSreadonly::getConstructor):
1988         * bindings/scripts/test/JS/JSreadonly.h:
1989         (WebCore::JSreadonly::create):
1990
1991 2015-10-08  Philippe Normand  <pnormand@igalia.com>
1992
1993         WebRTC: Add event names needed by updated RTCPeerConnection
1994         https://bugs.webkit.org/show_bug.cgi?id=149875
1995
1996         Reviewed by Eric Carlson.
1997
1998         The track event name was recently added in the WebRTC spec. The
1999         icegatheringstatechange event has been part of the spec for a while but
2000         was not registered in our DOM events.
2001
2002         * dom/EventNames.h: Add track and icegatheringstatechange even names.
2003
2004 2015-10-07  Keith Rollin  <krollin@apple.com>
2005
2006         script.text shouldn't include text from non-direct children of the script element
2007         https://bugs.webkit.org/show_bug.cgi?id=148851
2008         <rdar://problem/22587759>
2009
2010         Reviewed by Chris Dumez.
2011
2012         Don't include text from non-direct children in script.text. Per:
2013         https://html.spec.whatwg.org/multipage/scripting.html#dom-script-text
2014         Chrome and Firefox behavior match the spec.
2015
2016         Test: fast/dom/script-subtext-in-script-elements.html
2017
2018         * dom/ScriptElement.cpp:
2019         (WebCore::ScriptElement::scriptContent):
2020
2021 2015-10-07  Chris Dumez  <cdumez@apple.com>
2022
2023         Partial revert of r187626 as it caused a PLT regression
2024         https://bugs.webkit.org/show_bug.cgi?id=149898
2025
2026         Reviewed by Myles C. Maxfield.
2027
2028         Do a partial revert of r187626 as it caused a regression on PLT.
2029
2030         * platform/graphics/FontCache.h:
2031         (WebCore::FontDescriptionKey::operator==):
2032         (WebCore::FontDescriptionKey::FontDescriptionKey): Deleted.
2033         (WebCore::FontDescriptionKey::computeHash): Deleted.
2034
2035 2015-10-07  Zalan Bujtas  <zalan@apple.com>
2036
2037         RenderObject::computeRectForRepaint/computeFloatRectForRepaint should return the computed rectangle.
2038         https://bugs.webkit.org/show_bug.cgi?id=149883
2039
2040         Reviewed by Simon Fraser.
2041
2042         Reduces code complexity at the calling sites.
2043  
2044         No change in functionality.
2045
2046         * rendering/RenderBox.cpp:
2047         (WebCore::RenderBox::clippedOverflowRectForRepaint):
2048         (WebCore::RenderBox::computeRectForRepaint):
2049         * rendering/RenderBox.h:
2050         * rendering/RenderInline.cpp:
2051         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2052         (WebCore::RenderInline::computeRectForRepaint):
2053         * rendering/RenderInline.h:
2054         * rendering/RenderListMarker.cpp:
2055         (WebCore::RenderListMarker::selectionRectForRepaint):
2056         * rendering/RenderObject.cpp:
2057         (WebCore::RenderObject::repaintRectangle):
2058         (WebCore::RenderObject::computeRectForRepaint):
2059         (WebCore::RenderObject::computeFloatRectForRepaint):
2060         * rendering/RenderObject.h:
2061         (WebCore::RenderObject::computeAbsoluteRepaintRect):
2062         * rendering/RenderReplaced.cpp:
2063         (WebCore::RenderReplaced::selectionRectForRepaint):
2064         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
2065         * rendering/RenderTableCell.cpp:
2066         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
2067         (WebCore::RenderTableCell::computeRectForRepaint):
2068         * rendering/RenderTableCell.h:
2069         * rendering/RenderText.cpp:
2070         (WebCore::RenderText::collectSelectionRectsForLineBoxes):
2071         * rendering/RenderView.cpp:
2072         (WebCore::RenderView::computeRectForRepaint):
2073         * rendering/RenderView.h:
2074         * rendering/svg/RenderSVGForeignObject.cpp:
2075         (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
2076         (WebCore::RenderSVGForeignObject::computeRectForRepaint):
2077         * rendering/svg/RenderSVGForeignObject.h:
2078         * rendering/svg/RenderSVGInline.cpp:
2079         (WebCore::RenderSVGInline::computeFloatRectForRepaint):
2080         * rendering/svg/RenderSVGInline.h:
2081         * rendering/svg/RenderSVGModelObject.cpp:
2082         (WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
2083         * rendering/svg/RenderSVGModelObject.h:
2084         * rendering/svg/RenderSVGRoot.cpp:
2085         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
2086         * rendering/svg/RenderSVGRoot.h:
2087         * rendering/svg/RenderSVGText.cpp:
2088         (WebCore::RenderSVGText::computeRectForRepaint):
2089         (WebCore::RenderSVGText::computeFloatRectForRepaint):
2090         * rendering/svg/RenderSVGText.h:
2091         * rendering/svg/SVGRenderSupport.cpp:
2092         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
2093         (WebCore::SVGRenderSupport::computeFloatRectForRepaint):
2094         * rendering/svg/SVGRenderSupport.h:
2095
2096 2015-10-07  Antti Koivisto  <antti@apple.com>
2097
2098         Implement :host pseudo class
2099         https://bugs.webkit.org/show_bug.cgi?id=149440
2100         rdar://problem/22731953
2101
2102         Reviewed by Ryosuke Niwa.
2103
2104         This implements the basic non-function :host syntax.
2105
2106         * css/CSSSelector.cpp:
2107         (WebCore::CSSSelector::selectorText):
2108         * css/CSSSelector.h:
2109         * css/ElementRuleCollector.cpp:
2110         (WebCore::ElementRuleCollector::matchAuthorRules):
2111         (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
2112         (WebCore::ElementRuleCollector::matchUserRules):
2113         * css/ElementRuleCollector.h:
2114         * css/RuleSet.cpp:
2115         (WebCore::computeMatchBasedOnRuleHash):
2116         (WebCore::RuleSet::addRule):
2117         * css/RuleSet.h:
2118         (WebCore::RuleSet::cuePseudoRules):
2119         (WebCore::RuleSet::hostPseudoClassRules):
2120         (WebCore::RuleSet::focusPseudoClassRules):
2121         (WebCore::RuleSet::universalRules):
2122         * css/SelectorChecker.cpp:
2123         (WebCore::SelectorChecker::checkOne):
2124         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
2125         * cssjit/SelectorCompiler.cpp:
2126         (WebCore::SelectorCompiler::addPseudoClassType):
2127
2128 2015-10-07  Nan Wang  <n_wang@apple.com>
2129
2130         AX: ARIA 1.1 @aria-placeholder
2131         https://bugs.webkit.org/show_bug.cgi?id=148970
2132
2133         Reviewed by Chris Fleizach.
2134
2135         Added support for aria-placeholder attribute.
2136
2137         Modified accessibility/placeholder.html test.
2138
2139         * accessibility/AccessibilityObject.cpp:
2140         (WebCore::AccessibilityObject::placeholderValue):
2141         * html/HTMLAttributeNames.in:
2142
2143 2015-10-07  Commit Queue  <commit-queue@webkit.org>
2144
2145         Unreviewed, rolling out r190664.
2146         https://bugs.webkit.org/show_bug.cgi?id=149877
2147
2148         mac build is sometimes borken due to missing generated header
2149         file (Requested by youenn on #webkit).
2150
2151         Reverted changeset:
2152
2153         "Automate WebCore JS builtins generation and build system"
2154         https://bugs.webkit.org/show_bug.cgi?id=149751
2155         http://trac.webkit.org/changeset/190664
2156
2157 2015-10-06  Simon Fraser  <simon.fraser@apple.com>
2158
2159         will-change should trigger stacking context based purely on properties
2160         https://bugs.webkit.org/show_bug.cgi?id=148068
2161
2162         Reviewed by Zalan Bujtas.
2163
2164         Previously, our will-change implementation didn't trigger stacking context
2165         on an inline if the will-change property didn't apply to inlines (like 'transform').
2166         However, this doesn't agree with the CSS-WG consensus (https://lists.w3.org/Archives/Public/www-style/2015Sep/0112.html).
2167         
2168         Change behavior to have stacking context creation behavior for will-change be
2169         identical for inlines and blocks.
2170
2171         Test: fast/css/will-change/will-change-creates-stacking-context-inline.html
2172
2173         * rendering/RenderInline.cpp:
2174         (WebCore::inFlowPositionedInlineAncestor):
2175         * rendering/RenderInline.h:
2176         (WebCore::RenderInline::willChangeCreatesStackingContext):
2177         * rendering/style/WillChangeData.cpp:
2178         (WebCore::propertyCreatesStackingContext):
2179         (WebCore::WillChangeData::addFeature):
2180         (WebCore::propertyCreatesStackingContextOnBoxesOnly): Deleted.
2181         * rendering/style/WillChangeData.h:
2182         (WebCore::WillChangeData::canCreateStackingContextOnInline): Deleted.
2183
2184 2015-10-07  Javier Fernandez  <jfernandez@igalia.com>
2185
2186         [CSS Grid Layout] Modify grid item height doesn't work
2187         https://bugs.webkit.org/show_bug.cgi?id=149840
2188
2189         Reviewed by Sergio Villar Senin.
2190
2191         When computing the logical height of content-sized grid tracks we
2192         need to clear grid item's override height if it needs to be laid
2193         out again.
2194
2195         Currently we are doing so only in the case of percentage heights
2196         or when the grid track's width has changed; these situations would
2197         obviously mark grid items as needing layout.
2198
2199         However, there are other situations, like the one defined in this
2200         bug, which would imply a new layout of the grid items; hence we
2201         need to clear its override value if we want the layout logic to be
2202         computed correctly.
2203
2204         * rendering/RenderGrid.cpp:
2205         (WebCore::RenderGrid::logicalContentHeightForChild):
2206
2207 2015-10-07  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2208
2209         Automate WebCore JS builtins generation and build system
2210         https://bugs.webkit.org/show_bug.cgi?id=149751
2211
2212         Reviewed by Darin Adler.
2213
2214         Adding annotations to JS files to know whether they should be under a compilation flag and
2215         whether they are JS internals or JS tied to WebIDL.
2216         If a file is said as JS internals, all function names are exported automatically.
2217         Added auto generation of WebCoreJSBuiltins.cpp
2218         Added auto generation of JSBuiltinFunctions class inside WebCoreJSBuiltins that takes the role of
2219         WebCoreJSClientData as wrapper for builtins. Renamed WebCoreJSClientData to JSClientData.
2220         Added auto generation of PrivateWebCoreJSBuiltins that is a wrapper around all private functions, used by
2221         JSDOMWindowBase. The class is named JSBuiltinInternalFunctions.
2222
2223         The remaining manual part for private functions is the pairing between private identifiers and
2224         the private JS functions within JSDOMWindowBase::finishCreation.
2225
2226         Covered by existing tests.
2227
2228         * CMakeLists.txt:
2229         * DerivedSources.make:
2230         * Modules/streams/ByteLengthQueuingStrategy.js:
2231         * Modules/streams/CountQueuingStrategy.js:
2232         * Modules/streams/ReadableStream.js:
2233         * Modules/streams/ReadableStreamInternals.js:
2234         * WebCore.order:
2235         * WebCore.vcxproj/WebCore.vcxproj:
2236         * WebCore.xcodeproj/project.pbxproj:
2237         * bindings/js/DOMWrapperWorld.cpp:
2238         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
2239         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
2240         (WebCore::normalWorld):
2241         * bindings/js/JSDOMWindowBase.cpp:
2242         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2243         (WebCore::JSDOMWindowBase::finishCreation):
2244         (WebCore::JSDOMWindowBase::visitChildren):
2245         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
2246         * bindings/js/JSDOMWindowBase.h:
2247         * bindings/js/ScriptController.cpp:
2248         (WebCore::ScriptController::getAllWorlds):
2249         * bindings/js/SerializedScriptValue.cpp:
2250         (WebCore::SerializedScriptValue::transferArrayBuffers):
2251         * bindings/js/WebCoreJSClientData.h:
2252         (WebCore::JSClientData::JSClientData):
2253         (WebCore::JSClientData::~JSClientData):
2254         (WebCore::JSClientData::builtinFunctions):
2255         (WebCore::initNormalWorldClientData):
2256         (WebCore::WebCoreJSClientData::WebCoreJSClientData): Deleted.
2257         (WebCore::WebCoreJSClientData::~WebCoreJSClientData): Deleted.
2258         (WebCore::WebCoreJSClientData::readableStreamBuiltins): Deleted.
2259         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins): Deleted.
2260         (WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins): Deleted.
2261         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins): Deleted.
2262         (WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Deleted.
2263         (WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins): Deleted.
2264         * generate-js-builtins-allinone: Added.
2265         (retrieveGenerationParameters):
2266         (retrieveFilesWithParameters):
2267         (retrieveFilesWithParameters.FileInput):
2268         (writeConditional):
2269         (JSBuiltinFunctions):
2270         (Private):
2271         (JSBuiltinInternalFunctions):
2272         (copytempfile):
2273
2274 2015-10-05  Sergio Villar Senin  <svillar@igalia.com>
2275
2276         [css-grid] Implement grid gutters
2277         https://bugs.webkit.org/show_bug.cgi?id=149800
2278
2279         Reviewed by Darin Adler.
2280
2281         Authors can now specify the gutters between grid lines, i.e.,
2282         the space between two consecutive grid lines. This can be done
2283         using the new '-webkit-grid-column-gap 'and
2284         '-webkit-grid-row-gap' properties (or the '-webkit-grid-gap'
2285         shorthand).
2286
2287         From the track sizing algorithm POV, gutters are treated as
2288         fixed size columns. The primary consequence is that grids are
2289         enlarged (depending on the number of tracks). Gutters also
2290         affect the sizing of content-sized tracks and fr tracks as
2291         long as the grid have spanning items. Those tracks will become
2292         smaller as gutters will consume part of the item's size, so
2293         the tracks won't need to grow as much as they used to.
2294
2295         Tests: fast/css-grid-layout/grid-gutters-and-alignment.html
2296                fast/css-grid-layout/grid-gutters-and-flex-content.html
2297                fast/css-grid-layout/grid-gutters-and-tracks.html
2298                fast/css-grid-layout/grid-gutters-get-set.html
2299
2300         * css/CSSComputedStyleDeclaration.cpp:
2301         (WebCore::valueForGridTrackList):
2302         (WebCore::ComputedStyleExtractor::propertyValue):
2303         * css/CSSParser.cpp:
2304         (WebCore::isSimpleLengthPropertyID):
2305         (WebCore::CSSParser::parseValue):
2306         (WebCore::CSSParser::parseGridGapShorthand):
2307         * css/CSSParser.h:
2308         * css/CSSPropertyNames.in:
2309         * rendering/RenderGrid.cpp:
2310         (WebCore::RenderGrid::guttersSize):
2311         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
2312         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2313         (WebCore::RenderGrid::layoutGridItems):
2314         (WebCore::RenderGrid::gridAreaBreadthForChild):
2315         (WebCore::RenderGrid::populateGridPositions):
2316         (WebCore::RenderGrid::columnAxisOffsetForChild):
2317         (WebCore::RenderGrid::rowAxisOffsetForChild):
2318         * rendering/RenderGrid.h:
2319         * rendering/style/RenderStyle.h:
2320         * rendering/style/StyleGridData.cpp:
2321         (WebCore::StyleGridData::StyleGridData):
2322         * rendering/style/StyleGridData.h:
2323         (WebCore::StyleGridData::operator==):
2324
2325 2015-10-07  ChangSeok Oh  <changseok.oh@collabora.com>
2326
2327         [GTK] Progress bar is broken on recent GTK+
2328         https://bugs.webkit.org/show_bug.cgi?id=149831
2329
2330         Reviewed by Carlos Garcia Campos.
2331
2332         The gtk progress bar has been broken after bumping up to Gtk+-3.16. This is because
2333         the way of rendering progress bar changed after gtk+-3.13.7. See more
2334         https://mail.gnome.org/archives/commits-list/2014-August/msg03865.html
2335         gtk_render_activity is no longer valid to paint a progress bar on a newer gtk+.
2336         It should be done with gtk_render_background and gtk_render_frame.
2337
2338         Test: fast/dom/HTMLProgressElement/native-progress-bar.html
2339
2340         * rendering/RenderThemeGtk.cpp:
2341         (WebCore::RenderThemeGtk::paintProgressBar):
2342
2343 2015-10-06  Michael Catanzaro  <mcatanzaro@igalia.com>
2344
2345         [GTK] Add autocleanups
2346         https://bugs.webkit.org/show_bug.cgi?id=149588
2347
2348         Reviewed by Darin Adler.
2349
2350         * PlatformGTK.cmake:
2351         * bindings/scripts/gobject-generate-headers.pl:
2352
2353 2015-10-06  Zalan Bujtas  <zalan@apple.com>
2354
2355         Paint artifacts when hovering on http://jsfiddle.net/Sherbrow/T87Mn/
2356         https://bugs.webkit.org/show_bug.cgi?id=149535
2357         rdar://problem/22874920
2358
2359         Reviewed by Simon Fraser.
2360
2361         When due to some style change, a renderer's self-painting layer is getting destroyed 
2362         and the parent's overflow is no longer set to visible, we don't clean up the overflow part.
2363
2364         When a renderer has a self-painting layer, the parent stops tracking the child's 
2365         visual overflow rect. All overflow painting is delegated to the self-painting layer.
2366         However when this layer gets destroyed, no-one issues repaint to clean up
2367         the overflow bits.
2368         This patch ensures that we issue a repaint when the self-painting layer is destroyed
2369         and the triggering style change requires full repaint.
2370
2371         Test: fast/repaint/overflow-hidden-with-self-painting-child-layer.html
2372
2373         * rendering/RenderLayer.h:
2374         * rendering/RenderLayerModelObject.cpp:
2375         (WebCore::RenderLayerModelObject::styleDidChange):
2376
2377 2015-10-06  Jer Noble  <jer.noble@apple.com>
2378
2379         [Mac] REGRESSION(r173318): Seeks never complete for media loaded with QTKit.
2380         https://bugs.webkit.org/show_bug.cgi?id=149845
2381
2382         Reviewed by Darin Adler.
2383
2384         When converting from time-as-double to MediaTime, a regression was introduced
2385         when checking whether m_seekTo was set to a valid value or not. The clause
2386         `time != -1` should be translated to `time.isValid()`, not `!time.isValid()`.
2387
2388         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2389         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
2390
2391 2015-10-06  Brady Eidson  <beidson@apple.com>
2392
2393         Rename IDBRequestIdentifier to IDBResourceIdentifier.
2394         https://bugs.webkit.org/show_bug.cgi?id=149861
2395
2396         Reviewed by Alex Christensen.
2397
2398         No new tests (No change in behavior).
2399
2400         Turns out having an object representing a (connection ID + unique ID pair) is useful for more than just IDBRequests.
2401
2402         * CMakeLists.txt:
2403         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2404         (WebCore::IDBClient::IDBConnectionToServer::deleteDatabase):
2405         (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
2406         * Modules/indexeddb/client/IDBConnectionToServer.h:
2407         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2408         (WebCore::IDBClient::IDBRequest::IDBRequest):
2409         * Modules/indexeddb/client/IDBRequestImpl.h:
2410         (WebCore::IDBClient::IDBRequest::resourceIdentifier):
2411         (WebCore::IDBClient::IDBRequest::requestIdentifier): Deleted.
2412         * Modules/indexeddb/shared/IDBRequestData.h:
2413         (WebCore::IDBRequestData::requestIdentifier):
2414         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Renamed from Source/WebCore/Modules/indexeddb/shared/IDBRequestIdentifier.cpp.
2415         (WebCore::nextResourceNumber):
2416         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
2417         (WebCore::IDBResourceIdentifier::emptyValue):
2418         (WebCore::IDBResourceIdentifier::deletedValue):
2419         (WebCore::IDBResourceIdentifier::isHashTableDeletedValue):
2420         * Modules/indexeddb/shared/IDBResourceIdentifier.h: Renamed from Source/WebCore/Modules/indexeddb/shared/IDBRequestIdentifier.h.
2421         (WebCore::IDBResourceIdentifier::isEmpty):
2422         (WebCore::IDBResourceIdentifier::hash):
2423         (WebCore::IDBResourceIdentifier::operator==):
2424         (WebCore::IDBResourceIdentifier::connectionIdentifier):
2425         (WebCore::IDBResourceIdentifierHash::hash):
2426         (WebCore::IDBResourceIdentifierHash::equal):
2427         (WebCore::IDBResourceIdentifierHashTraits::emptyValue):
2428         (WebCore::IDBResourceIdentifierHashTraits::isEmptyValue):
2429         (WebCore::IDBResourceIdentifierHashTraits::constructDeletedValue):
2430         (WebCore::IDBResourceIdentifierHashTraits::isDeletedValue):
2431         * Modules/indexeddb/shared/IDBResultData.cpp:
2432         (WebCore::IDBResultData::IDBResultData):
2433         * Modules/indexeddb/shared/IDBResultData.h:
2434         (WebCore::IDBResultData::requestIdentifier):
2435         * WebCore.xcodeproj/project.pbxproj:
2436
2437 2015-10-06  Nan Wang  <n_wang@apple.com>
2438
2439         AX: ARIA 1.1: aria-orientation now defaults to undefined, supported on more elements, and role-specific defaults are defined.
2440         https://bugs.webkit.org/show_bug.cgi?id=132177
2441
2442         Reviewed by Chris Fleizach.
2443
2444         Added role-specific defaults and changed general default to undefined.
2445         Also added more elements to support aria-orientation on Mac.
2446
2447         Test: accessibility/mac/aria-orientation.html
2448
2449         * accessibility/AccessibilityObject.cpp:
2450         (WebCore::AccessibilityObject::orientation):
2451         (WebCore::AccessibilityObject::isDescendantOfObject):
2452         * accessibility/AccessibilityObject.h:
2453         (WebCore::AccessibilityObject::isColorWell):
2454         (WebCore::AccessibilityObject::isSplitter):
2455         (WebCore::AccessibilityObject::isToolbar):
2456         (WebCore::AccessibilityObject::isChecked):
2457         (WebCore::AccessibilityObject::isEnabled):
2458         * accessibility/AccessibilityRenderObject.cpp:
2459         (WebCore::AccessibilityRenderObject::orientation):
2460         * accessibility/AccessibilityScrollView.cpp:
2461         (WebCore::AccessibilityScrollView::scrollBar):
2462         * accessibility/AccessibilityScrollbar.cpp:
2463         (WebCore::AccessibilityScrollbar::orientation):
2464         (WebCore::AccessibilityScrollbar::isEnabled):
2465         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2466         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2467         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2468
2469 2015-10-06  Per Arne Vollan  <peavo@outlook.com>
2470
2471         [WinCairo] GStreamer compile errors.
2472         https://bugs.webkit.org/show_bug.cgi?id=149839
2473
2474         Reviewed by Alex Christensen.
2475
2476         Help MSVC to resolve ambiguous calls.
2477
2478         * platform/graphics/MediaPlayer.h:
2479         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2480         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
2481         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
2482         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
2483         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2484         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
2485         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
2486         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2487         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
2488         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
2489         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
2490         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
2491         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2492         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
2493         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
2494         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
2495         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2496         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
2497         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
2498         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
2499         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2500         (webkitVideoSinkRender):
2501         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2502         (webKitWebSrcChangeState):
2503         (webKitWebSrcNeedDataCb):
2504         (webKitWebSrcEnoughDataMainCb):
2505         (webKitWebSrcEnoughDataCb):
2506         (webKitWebSrcSeekMainCb):
2507         (webKitWebSrcSeekDataCb):
2508
2509 2015-10-06  Chris Dumez  <cdumez@apple.com>
2510
2511         Refactor TokenPreloadScanner::StartTagScanner::processAttribute()
2512         https://bugs.webkit.org/show_bug.cgi?id=149847
2513
2514         Reviewed by Antti Koivisto.
2515
2516         Refactor TokenPreloadScanner::StartTagScanner::processAttribute() to only
2517         process attributes that make sense given the current tagId. In particular,
2518         - We only process the charset parameter if the tag is a link or a script.
2519         - We only process the sizes / srcset attributes if the tag is an img.
2520
2521         * html/parser/HTMLPreloadScanner.cpp:
2522         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2523         (WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): Deleted.
2524
2525 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2526
2527         Binding generator XXConstructor::finishCreation should take references as parameters
2528         https://bugs.webkit.org/show_bug.cgi?id=149838
2529
2530         Reviewed by Darin Adler.
2531
2532         Updated the binding generator so that XXConstructor::finishCreation
2533         takes a JSDOMGlobalObject& in lieu of a JSDOMGlobalObject*.
2534
2535         Covered by rebased binding tests.
2536
2537         * bindings/scripts/CodeGeneratorJS.pm:
2538         (GenerateConstructorDeclaration):
2539         (GenerateConstructorHelperMethods):
2540         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2541         (WebCore::JSTestActiveDOMObjectConstructor::create):
2542         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2543         * bindings/scripts/test/JS/JSTestCallback.cpp:
2544         (WebCore::JSTestCallbackConstructor::create):
2545         (WebCore::JSTestCallbackConstructor::finishCreation):
2546         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2547         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
2548         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
2549         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2550         (WebCore::JSTestCustomNamedGetterConstructor::create):
2551         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2552         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2553         (WebCore::JSTestEventConstructorConstructor::create):
2554         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2555         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2556         (WebCore::JSTestEventTargetConstructor::create):
2557         (WebCore::JSTestEventTargetConstructor::finishCreation):
2558         * bindings/scripts/test/JS/JSTestException.cpp:
2559         (WebCore::JSTestExceptionConstructor::create):
2560         (WebCore::JSTestExceptionConstructor::finishCreation):
2561         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2562         (WebCore::JSTestGenerateIsReachableConstructor::create):
2563         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2564         * bindings/scripts/test/JS/JSTestInterface.cpp:
2565         (WebCore::JSTestInterfaceConstructor::create):
2566         (WebCore::JSTestInterfaceConstructor::finishCreation):
2567         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2568         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
2569         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
2570         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2571         (WebCore::JSTestMediaQueryListListenerConstructor::create):
2572         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2573         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2574         (WebCore::JSTestNamedConstructorConstructor::create):
2575         (WebCore::JSTestNamedConstructorNamedConstructor::create):
2576         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2577         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2578         * bindings/scripts/test/JS/JSTestNode.cpp:
2579         (WebCore::JSTestNodeConstructor::create):
2580         (WebCore::JSTestNodeConstructor::finishCreation):
2581         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2582         (WebCore::JSTestNondeterministicConstructor::create):
2583         (WebCore::JSTestNondeterministicConstructor::finishCreation):
2584         * bindings/scripts/test/JS/JSTestObj.cpp:
2585         (WebCore::JSTestObjConstructor::create):
2586         (WebCore::JSTestObjConstructor::finishCreation):
2587         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2588         (WebCore::JSTestOverloadedConstructorsConstructor::create):
2589         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2590         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2591         (WebCore::JSTestOverrideBuiltinsConstructor::create):
2592         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
2593         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2594         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
2595         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2596         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2597         (WebCore::JSTestTypedefsConstructor::create):
2598         (WebCore::JSTestTypedefsConstructor::finishCreation):
2599         * bindings/scripts/test/JS/JSattribute.cpp:
2600         (WebCore::JSattributeConstructor::create):
2601         (WebCore::JSattributeConstructor::finishCreation):
2602         * bindings/scripts/test/JS/JSreadonly.cpp:
2603         (WebCore::JSreadonlyConstructor::create):
2604         (WebCore::JSreadonlyConstructor::finishCreation):
2605
2606 2015-10-06  Jiewen Tan  <jiewen_tan@apple.com>
2607
2608         Fix crash in ApplyStyleCommand::applyRelativeFontStyleChange()
2609         https://bugs.webkit.org/show_bug.cgi?id=149300
2610         <rdar://problem/22747046>
2611
2612         Reviewed by Chris Dumez.
2613
2614         This is a merge of Blink r167845 and r194944:
2615         https://codereview.chromium.org/177093016
2616         https://codereview.chromium.org/1124863003
2617
2618         Test: editing/style/apply-style-crash2.html
2619               editing/style/apply-style-crash3.html
2620
2621         * editing/ApplyStyleCommand.cpp:
2622         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
2623         The issue was that we would traverse the DOM tree past the beyondEnd 
2624         under some circumstances and thus NodeTraversal::next() would return 
2625         null unexpectedly. This CL adds a check to make sure startNode != beyondEnd 
2626         before traversing to avoid the problem.
2627
2628         Besides that, this CL hardens changing font style over unknown elements.
2629         When adjusting the start node position of where to apply a font style
2630         command, check that we haven't stepped off the end.
2631
2632         This CL also adds a few more assertions to catch similar issues 
2633         more easily in the future.
2634
2635 2015-10-06  Javier Fernandez  <jfernandez@igalia.com>
2636
2637         [CSS Grid Layout] Don't need to reset auto-margins during grid items layout
2638         https://bugs.webkit.org/show_bug.cgi?id=149764
2639
2640         Reviewed by Darin Adler.
2641
2642         This patch implements a refactoring of the auto-margin alignment code for grid
2643         items so it uses start/end and before/after margin logic terms.
2644
2645         I addition, it avoids resetting the auto-margin values, which requires an extra
2646         layout, before applying the alignment logic.
2647
2648         No new tests because there is no behavior change.
2649
2650         * rendering/RenderGrid.cpp:
2651         (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Computing margins if child needs layout.
2652         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
2653         (WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded): Using start/end logical margins.
2654         (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded): Using before/after logical margins.
2655         (WebCore::RenderGrid::columnAxisOffsetForChild): Just added comment.
2656         (WebCore::RenderGrid::rowAxisOffsetForChild): Just added comment.
2657
2658 2015-10-06  Tim Horton  <timothy_horton@apple.com>
2659
2660         Tile map shows a green rect when threaded scrolling is disabled
2661         https://bugs.webkit.org/show_bug.cgi?id=149716
2662
2663         Reviewed by Darin Adler.
2664
2665         Green is supposed to indicate that we're using the fast path; if threaded
2666         scrolling is disabled, we're definitely not doing that.
2667
2668         * platform/graphics/TiledBacking.h:
2669         * platform/graphics/ca/TileController.cpp:
2670         (WebCore::TileController::TileController):
2671         * platform/graphics/ca/TileCoverageMap.cpp:
2672         (WebCore::TileCoverageMap::update):
2673         Default to the "we have no ScrollingCoordinator" purple indication;
2674         if a ScrollingCoordinator comes along it will setScrollingModeIndication
2675         and change it from this default.
2676
2677 2015-10-06  Zalan Bujtas  <zalan@apple.com>
2678
2679         Remove redundant isComposited() function and replace
2680         hasLayer() && layer()->isComposited() with RenderObject::isComposited().
2681         https://bugs.webkit.org/show_bug.cgi?id=149846
2682
2683         Reviewed by Simon Fraser.
2684
2685         No change in functionality.
2686
2687         * rendering/RenderLayerCompositor.cpp:
2688         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
2689         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
2690         * rendering/RenderObject.cpp:
2691         (WebCore::RenderObject::repaintUsingContainer):
2692         * rendering/RenderThemeMac.mm:
2693         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2694         * rendering/RenderView.cpp:
2695         (WebCore::rendererObscuresBackground):
2696         (WebCore::isComposited): Deleted.
2697         * rendering/RenderWidget.cpp:
2698         (WebCore::RenderWidget::setWidgetGeometry):
2699
2700 2015-10-06  Commit Queue  <commit-queue@webkit.org>
2701
2702         Unreviewed, rolling out r190619.
2703         https://bugs.webkit.org/show_bug.cgi?id=149849
2704
2705         borke the binding tests on iOS at least (Requested by youenn
2706         on #webkit).
2707
2708         Reverted changeset:
2709
2710         "Binding generator XXConstructor::finishCreation should take
2711         references as parameters"
2712         https://bugs.webkit.org/show_bug.cgi?id=149838
2713         http://trac.webkit.org/changeset/190619
2714
2715 2015-10-05  Wenson Hsieh  <wenson_hsieh@apple.com>
2716
2717         Slider knobs should scale when rendering while zoomed
2718         https://bugs.webkit.org/show_bug.cgi?id=149835
2719         <rdar://problem/22897080>
2720
2721         Reviewed by Darin Adler.
2722
2723         Make slider knobs follow suit with the rest of the unscaled form controls
2724         by rendering to an offscreen buffer when the page is zoomed or scaled and
2725         then rendering a scaled version of the offscreen buffer onto the page.
2726
2727         * platform/mac/ThemeMac.mm:
2728         (WebCore::drawCellOrFocusRingIntoRectWithView): Helper function for drawing
2729             cells and/or focus rings.
2730         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Refactored to
2731             handle drawing slider knobs as well.
2732         * rendering/RenderThemeMac.mm:
2733         (WebCore::RenderThemeMac::paintSliderThumb): Use scaled rendering when necessary.
2734
2735 2015-10-06  Chris Dumez  <cdumez@apple.com>
2736
2737         [Web IDL] 'length' property is wrong for variadic operations
2738         https://bugs.webkit.org/show_bug.cgi?id=149714
2739
2740         Reviewed by Darin Adler.
2741
2742         The value of the 'length' property was wrong for variadic operations:
2743         - https://heycam.github.io/webidl/#dfn-optional-argument
2744
2745         The final argument of a variadic operation is considered to be an
2746         optional argument. Therefore, we should not account for it when
2747         computing the value of the 'length' property. This patch fixes WebKit's
2748         behavior to match the specification.
2749
2750         Test: fast/dom/variadic-operations-length.html
2751
2752         * bindings/scripts/CodeGeneratorJS.pm:
2753         (GetFunctionLength):
2754         * bindings/scripts/test/JS/JSTestObj.cpp:
2755         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2756         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2757
2758 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2759
2760         Binding generator should add builtin header for JSBuiltin attributes
2761         https://bugs.webkit.org/show_bug.cgi?id=149837
2762
2763         Reviewed by Darin Adler.
2764
2765         Ensured XXBuiltins.h header is included for builtin attributes.
2766         Renamed AddIncludesForJSBuiltinMethods as AddJSBuiltinIncludesIfNeeded.
2767         Test loop is done through all functions and attributes to handle conditional correctly.
2768
2769         Covered by existing and added binding tests.
2770
2771         * bindings/scripts/CodeGeneratorJS.pm:
2772         (GenerateImplementation):
2773         (AddJSBuiltinIncludesIfNeeded):
2774         * bindings/scripts/test/JS/JSTestObj.cpp:
2775         * bindings/scripts/test/ObjC/DOMTestObj.h:
2776         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2777         * bindings/scripts/test/TestObj.idl:
2778
2779 2015-10-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2780
2781         Binding generator XXConstructor::finishCreation should take references as parameters
2782         https://bugs.webkit.org/show_bug.cgi?id=149838
2783
2784         Reviewed by Darin Adler.
2785
2786         Updated the binding generator so that XXConstructor::finishCreation
2787         takes a JSDOMGlobalObject& in lieu of a JSDOMGlobalObject*.
2788
2789         Covered by rebased binding tests.
2790
2791         * bindings/scripts/CodeGeneratorJS.pm:
2792         (GenerateConstructorDeclaration):
2793         (GenerateConstructorHelperMethods):
2794         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2795         (WebCore::JSTestActiveDOMObjectConstructor::create):
2796         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2797         * bindings/scripts/test/JS/JSTestCallback.cpp:
2798         (WebCore::JSTestCallbackConstructor::create):
2799         (WebCore::JSTestCallbackConstructor::finishCreation):
2800         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2801         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
2802         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
2803         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2804         (WebCore::JSTestCustomNamedGetterConstructor::create):
2805         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2806         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2807         (WebCore::JSTestEventConstructorConstructor::create):
2808         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2809         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2810         (WebCore::JSTestEventTargetConstructor::create):
2811         (WebCore::JSTestEventTargetConstructor::finishCreation):
2812         * bindings/scripts/test/JS/JSTestException.cpp:
2813         (WebCore::JSTestExceptionConstructor::create):
2814         (WebCore::JSTestExceptionConstructor::finishCreation):
2815         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2816         (WebCore::JSTestGenerateIsReachableConstructor::create):
2817         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2818         * bindings/scripts/test/JS/JSTestInterface.cpp:
2819         (WebCore::JSTestInterfaceConstructor::create):
2820         (WebCore::JSTestInterfaceConstructor::finishCreation):
2821         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2822         (WebCore::JSTestJSBuiltinConstructorConstructor::create):
2823         (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
2824         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2825         (WebCore::JSTestMediaQueryListListenerConstructor::create):
2826         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2827         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2828         (WebCore::JSTestNamedConstructorConstructor::create):
2829         (WebCore::JSTestNamedConstructorNamedConstructor::create):
2830         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2831         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2832         * bindings/scripts/test/JS/JSTestNode.cpp:
2833         (WebCore::JSTestNodeConstructor::create):
2834         (WebCore::JSTestNodeConstructor::finishCreation):
2835         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2836         (WebCore::JSTestNondeterministicConstructor::create):
2837         (WebCore::JSTestNondeterministicConstructor::finishCreation):
2838         * bindings/scripts/test/JS/JSTestObj.cpp:
2839         (WebCore::JSTestObjConstructor::create):
2840         (WebCore::JSTestObjConstructor::finishCreation):
2841         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2842         (WebCore::JSTestOverloadedConstructorsConstructor::create):
2843         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2844         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2845         (WebCore::JSTestOverrideBuiltinsConstructor::create):
2846         (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
2847         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2848         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
2849         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2850         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2851         (WebCore::JSTestTypedefsConstructor::create):
2852         (WebCore::JSTestTypedefsConstructor::finishCreation):
2853         * bindings/scripts/test/JS/JSattribute.cpp:
2854         (WebCore::JSattributeConstructor::create):
2855         (WebCore::JSattributeConstructor::finishCreation):
2856         * bindings/scripts/test/JS/JSreadonly.cpp:
2857         (WebCore::JSreadonlyConstructor::create):
2858         (WebCore::JSreadonlyConstructor::finishCreation):
2859
2860 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
2861
2862         [Cairo] fast/canvas/canvas-imageSmoothingFoo tests failed after r190383.
2863         https://bugs.webkit.org/show_bug.cgi?id=149752
2864
2865         Reviewed by Carlos Garcia Campos.
2866
2867         CG's low interpolation quality setting is equivalent to most other browsers default or high settings.
2868
2869         * html/canvas/CanvasRenderingContext2D.cpp:
2870         (WebCore::CanvasRenderingContext2D::State::State):
2871
2872 2015-10-06  Daniel Bates  <dbates@webkit.org>
2873
2874         Enable XSLT when building WebKit for iOS using the public iOS SDK
2875         https://bugs.webkit.org/show_bug.cgi?id=149827
2876
2877         Reviewed by Alexey Proskuryakov.
2878
2879         * Configurations/FeatureDefines.xcconfig:
2880
2881 2015-10-06  Brent Fulgham  <bfulgham@apple.com>
2882
2883         [Win] Correct positioning error introduced in r190235
2884         https://bugs.webkit.org/show_bug.cgi?id=149631
2885         <rdar://problem/22635080>
2886
2887         Reviewed by Simon Fraser.
2888
2889         Covered by existing compositing tests:
2890           css3/filters/clipping-overflow-scroll-with-pixel-moving-effect-on.html
2891           fast/layers/no-clipping-overflow-hidden-added-after-transform.html
2892           fast/layers/no-clipping-overflow-hidden-added-after-transition.html
2893           fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html
2894           transforms/2d/preserve3d-not-fixed-container.html
2895
2896         * platform/graphics/ca/TileGrid.cpp:
2897         (TileGrid::platformCALayerPaintContents): No need to do this extra flipping step
2898         on Windows.
2899         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2900         (PlatformCALayerWinInternal::displayCallback): We should always flip the
2901         coordinate system when drawing these layers on Windows.
2902         (shouldInvertBeforeDrawingContent): Deleted.
2903         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
2904         (WebTiledBackingLayerWin::displayCallback): We do not need to flip coordinates
2905         for these tiled layers; that's already accounted for in common tile drawing code.
2906
2907 2015-10-06  Emanuele Aina  <emanuele.aina@collabora.com>
2908
2909         Fix ENABLE_OPENGL=OFF builds
2910         https://bugs.webkit.org/show_bug.cgi?id=146511
2911
2912         Reviewed by Darin Adler.
2913
2914         * platform/graphics/texmap/BitmapTextureGL.h:
2915         * platform/graphics/texmap/BitmapTextureGL.cpp:
2916         * platform/graphics/texmap/TextureMapperGL.h:
2917         * platform/graphics/texmap/TextureMapperGL.cpp:
2918         * platform/graphics/texmap/TextureMapperShaderProgram.h:
2919         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
2920         Fix TEXTURE_MAPPER_GL vs. TEXTURE_MAPPER guards to make sure that
2921         ENABLE_OPENGL=OFF only disables the GL-related parts.
2922
2923 2015-10-06  Alex Christensen  <achristensen@webkit.org>
2924
2925         Fix Windows build after r190611.
2926
2927         * PlatformWin.cmake:
2928         Forward headers from contentextensions.
2929
2930 2015-10-06  Hunseop Jeong  <hs85.jeong@samsung.com>
2931
2932         Use modern for-loops in WebCore/html.
2933         https://bugs.webkit.org/show_bug.cgi?id=149662
2934
2935         Reviewed by Darin Adler.
2936
2937         No new tests because there is no behavior change.
2938
2939         * html/DOMFormData.cpp:
2940         (WebCore::DOMFormData::DOMFormData):
2941         * html/EmailInputType.cpp:
2942         (WebCore::EmailInputType::typeMismatchFor):
2943         * html/FileInputType.cpp:
2944         (WebCore::FileInputType::receiveDroppedFiles):
2945         * html/FormController.cpp:
2946         (WebCore::FormControlState::serializeTo):
2947         (WebCore::FormControlState::deserialize):
2948         (WebCore::SavedFormState::serializeTo):
2949         (WebCore::SavedFormState::getReferencedFilePaths):
2950         (WebCore::FormController::createSavedFormStateMap):
2951         (WebCore::FormController::formElementsState):
2952         (WebCore::FormController::restoreControlStateIn):
2953         (WebCore::FormController::getReferencedFilePaths):
2954         * html/HTMLAnchorElement.cpp:
2955         (WebCore::hasNonEmptyBox):
2956         * html/HTMLCanvasElement.cpp:
2957         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
2958         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
2959         (WebCore::HTMLCanvasElement::reset):
2960         (WebCore::HTMLCanvasElement::paintsIntoCanvasBuffer):
2961         * html/HTMLFieldSetElement.cpp:
2962         (WebCore::HTMLFieldSetElement::length):
2963         * html/HTMLFormControlsCollection.cpp:
2964         (WebCore::firstNamedItem):
2965         * html/HTMLFormElement.cpp:
2966         (WebCore::HTMLFormElement::~HTMLFormElement):
2967         (WebCore::HTMLFormElement::formWouldHaveSecureSubmission):
2968         (WebCore::HTMLFormElement::removedFrom):
2969         (WebCore::HTMLFormElement::length):
2970         (WebCore::HTMLFormElement::submitImplicitly):
2971         (WebCore::HTMLFormElement::validateInteractively):
2972         (WebCore::HTMLFormElement::getTextFieldValues):
2973         (WebCore::HTMLFormElement::submit):
2974         (WebCore::HTMLFormElement::reset):
2975         (WebCore::HTMLFormElement::defaultButton):
2976         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
2977         (WebCore::HTMLFormElement::removeFromPastNamesMap):
2978         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
2979         * html/HTMLInputElement.cpp:
2980         (WebCore::parseAcceptAttribute):
2981         * html/HTMLKeygenElement.cpp:
2982         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
2983         * html/HTMLMediaElement.cpp:
2984         (WebCore::HTMLMediaElement::setMediaGroup):
2985         * html/HTMLOptionElement.cpp:
2986         (WebCore::HTMLOptionElement::index):
2987         * html/HTMLSelectElement.cpp:
2988         (WebCore::HTMLSelectElement::saveLastSelection):
2989         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
2990         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
2991         (WebCore::HTMLSelectElement::selectedIndex):
2992         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
2993         (WebCore::HTMLSelectElement::saveFormControlState):
2994         (WebCore::HTMLSelectElement::restoreFormControlState):
2995         (WebCore::HTMLSelectElement::appendFormData):
2996         (WebCore::HTMLSelectElement::reset):
2997         * html/HTMLTextAreaElement.cpp:
2998         (WebCore::HTMLTextAreaElement::setDefaultValue):
2999         * html/InputType.cpp:
3000         (WebCore::populateInputTypeFactoryMap):
3001         * html/MediaController.cpp:
3002         (MediaController::duration):
3003         (MediaController::setCurrentTime):
3004         (MediaController::play):
3005         (MediaController::setPlaybackRate):
3006         (MediaController::setVolume):
3007         (MediaController::setMuted):
3008         (playbackStateWaiting):
3009         (MediaController::updateMediaElements):
3010         (MediaController::bringElementUpToSpeed):
3011         (MediaController::isBlocked):
3012         (MediaController::hasEnded):
3013         (MediaController::asyncEventTimerFired):
3014         (MediaController::clearPositionTimerFired):
3015         (MediaController::hasAudio):
3016         (MediaController::hasVideo):
3017         (MediaController::hasClosedCaptions):
3018         (MediaController::setClosedCaptionsVisible):
3019         (MediaController::supportsScanning):
3020         (MediaController::beginScrubbing):
3021         (MediaController::endScrubbing):
3022         (MediaController::canPlay):
3023         (MediaController::isLiveStream):
3024         (MediaController::hasCurrentSrc):
3025         (MediaController::returnToRealtime):
3026         * html/MediaFragmentURIParser.cpp:
3027         (WebCore::MediaFragmentURIParser::parseTimeFragment):
3028         * html/PublicURLManager.cpp:
3029         (WebCore::PublicURLManager::revoke):
3030         (WebCore::PublicURLManager::stop):
3031         * html/canvas/WebGLBuffer.cpp:
3032         (WebCore::WebGLBuffer::getCachedMaxIndex):
3033         (WebCore::WebGLBuffer::setCachedMaxIndex):
3034         (WebCore::WebGLBuffer::setTarget):
3035         * html/canvas/WebGLContextGroup.cpp:
3036         (WebCore::WebGLContextGroup::loseContextGroup):
3037         * html/canvas/WebGLDrawBuffers.cpp:
3038         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
3039         * html/canvas/WebGLFramebuffer.cpp:
3040         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
3041         (WebCore::WebGLFramebuffer::checkStatus):
3042         (WebCore::WebGLFramebuffer::deleteObjectImpl):
3043         (WebCore::WebGLFramebuffer::initializeAttachments):
3044         (WebCore::WebGLFramebuffer::drawBuffers):
3045         * html/canvas/WebGLRenderingContextBase.cpp:
3046         (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):
3047         (WebCore::WebGLRenderingContextBase::deleteTexture):
3048         * html/canvas/WebGLVertexArrayObject.cpp:
3049         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
3050         * html/canvas/WebGLVertexArrayObjectOES.cpp:
3051         (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
3052         * html/parser/AtomicHTMLToken.h:
3053         (WebCore::AtomicHTMLToken::initializeAttributes):
3054         * html/parser/HTMLConstructionSite.cpp:
3055         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3056         * html/parser/HTMLFormattingElementList.cpp:
3057         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
3058         * html/parser/HTMLPreloadScanner.cpp:
3059         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
3060         * html/parser/XSSAuditor.cpp:
3061         (WebCore::semicolonSeparatedValueContainsJavaScriptURL):
3062         * html/shadow/ContentDistributor.cpp:
3063         (WebCore::ContentDistributor::distribute):
3064         (WebCore::ContentDistributor::invalidate):
3065         * html/shadow/MediaControlElements.cpp:
3066         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
3067         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
3068         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
3069         * html/track/AudioTrackList.cpp:
3070         (AudioTrackList::getTrackById):
3071         * html/track/LoadableTextTrack.cpp:
3072         (WebCore::LoadableTextTrack::newCuesAvailable):
3073         (WebCore::LoadableTextTrack::newRegionsAvailable):
3074         * html/track/TextTrackCueList.cpp:
3075         (WebCore::TextTrackCueList::getCueById):
3076         (WebCore::TextTrackCueList::activeCues):
3077         * html/track/TextTrackList.cpp:
3078         (TextTrackList::getTrackIndexRelativeToRenderedTracks):
3079         (TextTrackList::invalidateTrackIndexesAfterTrack):
3080         * html/track/TrackListBase.cpp:
3081         (TrackListBase::isAnyTrackEnabled):
3082         * html/track/VideoTrackList.cpp:
3083         (VideoTrackList::getTrackById):
3084
3085 2015-10-06  Alex Christensen  <achristensen@webkit.org>
3086
3087         Report error when main resource is blocked by content blocker
3088         https://bugs.webkit.org/show_bug.cgi?id=149719
3089         rdar://problem/21970595
3090
3091         Reviewed by Brady Eidson.
3092
3093         Test: http/tests/contentextensions/main-resource.html
3094
3095         * English.lproj/Localizable.strings:
3096         * contentextensions/ContentExtensionActions.h:
3097         * contentextensions/ContentExtensionError.h:
3098         (WebCore::ContentExtensions::make_error_code):
3099         * contentextensions/ContentExtensionsBackend.cpp:
3100         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
3101         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
3102         Instead of nulling out the ResourceRequest, processContentExtensionRulesForLoad 
3103         now returns a status indicating whether the request should be blocked.
3104         This is needed because the DocumentLoader needs a CachedResource with an error representing the blocking
3105         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
3106         * contentextensions/ContentExtensionsBackend.h:
3107         * html/HTMLMediaElement.cpp:
3108         (WebCore::HTMLMediaElement::loadResource):
3109         * loader/DocumentLoader.cpp:
3110         (WebCore::DocumentLoader::startLoadingMainResource):
3111         Dispatch an error if the resource is blocked by a content blocker.
3112         * loader/EmptyClients.h:
3113         * loader/FrameLoader.cpp:
3114         (WebCore::FrameLoader::loadResourceSynchronously):
3115         (WebCore::FrameLoader::cancelledError):
3116         (WebCore::FrameLoader::blockedByContentBlockerError):
3117         (WebCore::FrameLoader::connectionProperties):
3118         * loader/FrameLoader.h:
3119         * loader/FrameLoaderClient.h:
3120         * loader/ResourceLoader.cpp:
3121         (WebCore::ResourceLoader::willSendRequestInternal):
3122         * loader/cache/CachedResourceLoader.cpp:
3123         (WebCore::CachedResourceLoader::requestResource):
3124         * page/UserContentController.cpp:
3125         (WebCore::UserContentController::removeAllUserContentExtensions):
3126         (WebCore::UserContentController::processContentExtensionRulesForLoad):
3127         (WebCore::UserContentController::actionsForResourceLoad):
3128         * page/UserContentController.h:
3129         * platform/efl/ErrorsEfl.cpp:
3130         (WebCore::blockedError):
3131         (WebCore::blockedByContentBlockerError):
3132         (WebCore::cannotShowURLError):
3133         * platform/efl/ErrorsEfl.h:
3134         * platform/gtk/ErrorsGtk.cpp:
3135         (WebCore::blockedError):
3136         (WebCore::blockedByContentBlockerError):
3137         (WebCore::cannotShowURLError):
3138         * platform/gtk/ErrorsGtk.h:
3139
3140 2015-10-06  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3141
3142         JSBuiltinConstructor must always add builtin header
3143         https://bugs.webkit.org/show_bug.cgi?id=149759
3144
3145         Reviewed by Darin Adler.
3146
3147         Covered by TestJSBuiltinConstructor.idl.
3148
3149         * bindings/scripts/CodeGeneratorJS.pm:
3150         (AddIncludesForJSBuiltinMethods): Forces adding the builtin header when the JSBuiltinConstructor is present.
3151         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: Expectation.
3152
3153 2015-10-05  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3154
3155         Migrate streams API to JS Builtins
3156         https://bugs.webkit.org/show_bug.cgi?id=147092
3157
3158         Reviewed by Darin Adler.
3159
3160         Moved ReadableStream implementation from C++ to JS Builtins.
3161         Created specific private constructors for ReadableStreamReader and ReadableStreamController.
3162         Added these constructors to  JSDOMWindowBase.
3163         Constructors are based on a template found in JSDOMConstructor which might serve to webidl-generated classes as well.
3164
3165         Covered by existing tests.
3166
3167         * CMakeLists.txt:
3168         * DerivedSources.make:
3169         * Modules/streams/ReadableStream.cpp: Removed.
3170         * Modules/streams/ReadableStream.h: Removed.
3171         * Modules/streams/ReadableStream.idl:
3172         * Modules/streams/ReadableStream.js:
3173         (strategy.size):
3174         (initializeReadableStream):
3175         (cancel):
3176         (getReader):
3177         (pipeTo):
3178         (tee):
3179         (locked):
3180         * Modules/streams/ReadableStreamController.h:
3181         * Modules/streams/ReadableStreamController.idl:
3182         * Modules/streams/ReadableStreamController.js: Added.
3183         (enqueue):
3184         (error):
3185         (close):
3186         (desiredSize):
3187         * Modules/streams/ReadableStreamInternals.js:
3188         (privateInitializeReadableStreamReader):
3189         (privateInitializeReadableStreamController):
3190         (isReadableStream):
3191         (isReadableStreamReader):
3192         (isReadableStreamController):
3193         (errorReadableStream):
3194         (requestReadableStreamPull):
3195         (getReadableStreamDesiredSize):
3196         (releaseReadableStreamReader):
3197         (cancelReadableStream):
3198         (finishClosingReadableStream):
3199         (closeReadableStream):
3200         (closeReadableStreamReader):
3201         (enqueueInReadableStream):
3202         (readFromReadableStreamReader):
3203         (invokeOrNoop):
3204         (promiseInvokeOrNoop):
3205         * Modules/streams/ReadableStreamReader.cpp: Removed.
3206         * Modules/streams/ReadableStreamReader.h:
3207         * Modules/streams/ReadableStreamReader.idl:
3208         * Modules/streams/ReadableStreamReader.js: Copied from Source/WebCore/Modules/streams/ReadableStream.js.
3209         (cancel):
3210         (read):
3211         (releaseLock):
3212         (closed):
3213         * WebCore.vcxproj/WebCore.vcxproj:
3214         * WebCore.vcxproj/WebCore.vcxproj.filters:
3215         * WebCore.xcodeproj/project.pbxproj:
3216         * bindings/js/JSBindingsAllInOne.cpp:
3217         * bindings/js/JSDOMConstructor.h: Added.
3218         (WebCore::JSBuiltinConstructor::create):
3219         (WebCore::JSBuiltinConstructor::createStructure):
3220         (WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
3221         (WebCore::JSBuiltinConstructor::initializeProperties):
3222         (WebCore::JSBuiltinConstructor<JSClass>::finishCreation):
3223         (WebCore::JSBuiltinConstructor<JSClass>::construct):
3224         (WebCore::JSBuiltinConstructor<JSClass>::getConstructData):
3225         * bindings/js/JSDOMWindowBase.cpp:
3226         (WebCore::JSDOMWindowBase::finishCreation):
3227         * bindings/js/JSReadableStreamControllerCustom.cpp: Removed.
3228         * bindings/js/JSReadableStreamCustom.cpp: Removed.
3229         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Added.
3230         (WebCore::constructJSReadableStreamController):
3231         (WebCore::constructJSReadableStreamReader):
3232         (WebCore::JSBuiltinConstructor<JSReadableStreamReader>::createJSObject):
3233         (WebCore::JSBuiltinConstructor<JSReadableStreamController>::createJSObject):
3234         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createInitializeFunction):
3235         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createInitializeFunction):
3236         (WebCore::createReadableStreamReaderPrivateConstructor):
3237         (WebCore::createReadableStreamControllerPrivateConstructor):
3238         * bindings/js/JSReadableStreamPrivateConstructors.h: Added.
3239         * bindings/js/JSReadableStreamReaderCustom.cpp: Removed.
3240         * bindings/js/ReadableJSStream.cpp: Removed.
3241         * bindings/js/ReadableJSStream.h: Removed.
3242         * bindings/js/WebCoreBuiltinNames.h: Added.
3243         (WebCore::WebCoreBuiltinNames::WebCoreBuiltinNames):
3244         * bindings/js/WebCoreJSBuiltins.cpp:
3245         * bindings/js/WebCoreJSClientData.h:
3246         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
3247         (WebCore::WebCoreJSClientData::builtinNames):
3248         (WebCore::WebCoreJSClientData::readableStreamControllerBuiltins):
3249         (WebCore::WebCoreJSClientData::readableStreamReaderBuiltins):
3250
3251 2015-10-05  Chris Dumez  <cdumez@apple.com>
3252
3253         data: URLs should not be preloaded
3254         https://bugs.webkit.org/show_bug.cgi?id=149829
3255
3256         Reviewed by Ryosuke Niwa.
3257
3258         Update the HTMLPreloadScanner so that data: URLs do not get preloaded.
3259         There is no need as the data is already available.
3260
3261         Test: fast/preloader/image-data-url.html
3262
3263         * html/parser/HTMLPreloadScanner.cpp:
3264         (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
3265
3266 2015-10-05  Jer Noble  <jer.noble@apple.com>
3267
3268         [iOS] REGRESSION(r190434): Media continues to play when locking screen
3269         https://bugs.webkit.org/show_bug.cgi?id=149822
3270
3271         Reviewed by Brent Fulgham.
3272
3273         In MediaSessionManagerIOS.mm, both -applicationWillEnterForeground: and
3274         -applicationDidBecomeActive: called
3275         PlatformMediaSessionManager::applicationWillEnterForeground(), leading to the
3276         PlatformMediaSession's m_interruptionCount becoming increasingly unbalanced.
3277
3278         Rename PlatformMediaSessionManager::applicationWillEnterForeground() to
3279         applicationDidEnterForeground() to more correctly reflect when this notification will be
3280         called. Add a new method, MediaSessionManagerIOS::applicationWillEnterForeground(bool),
3281         whose paramater is whether the screen was locked. This allows the beginInterruption() and
3282         endInterruption() methods to be correctly balanced.
3283
3284         Drive-by fix: remove the unimplemented declarations for application{will,did}Enter{Fore,Back}ground()
3285         from PlatformMediaSession.h.
3286
3287         * platform/audio/PlatformMediaSession.h:
3288         * platform/audio/PlatformMediaSessionManager.cpp:
3289         (WebCore::PlatformMediaSessionManager::applicationDidEnterForeground):
3290         (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground): Deleted.
3291         * platform/audio/PlatformMediaSessionManager.h:
3292         * platform/audio/ios/MediaSessionManagerIOS.h:
3293         * platform/audio/ios/MediaSessionManagerIOS.mm:
3294         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
3295         (WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
3296         (-[WebMediaSessionHelper applicationWillEnterForeground:]):
3297         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
3298         * testing/Internals.cpp:
3299         (WebCore::Internals::applicationDidEnterForeground):
3300         (WebCore::Internals::applicationWillEnterForeground): Deleted.
3301         * testing/Internals.h:
3302         * testing/Internals.idl:
3303
3304 2015-10-05  Alex Christensen  <achristensen@webkit.org>
3305
3306         Invalid CSS Selector for Content Blockers invalidates others
3307         https://bugs.webkit.org/show_bug.cgi?id=148446
3308         rdar://problem/22918235
3309
3310         Reviewed by Benjamin Poulain.
3311
3312         Test: http/tests/contentextensions/invalid-selector.html
3313
3314         * contentextensions/ContentExtensionParser.cpp:
3315         (WebCore::ContentExtensions::loadTrigger):
3316         (WebCore::ContentExtensions::isValidSelector):
3317         (WebCore::ContentExtensions::loadAction):
3318         (WebCore::ContentExtensions::loadRule):
3319         Add a check to see if a selector is valid before adding it.
3320
3321 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
3322
3323         CSSGradientValue should check whether gradientLength is zero or not.
3324         https://bugs.webkit.org/show_bug.cgi?id=149373
3325         <rdar://problem/22771418>
3326
3327         Reviewed by Darin Adler.
3328
3329         This is a merge of Blink r158220,
3330         https://chromiumcodereview.appspot.com/24350008
3331
3332         Test: fast/gradients/css3-repeating-radial-gradients-crash.html
3333
3334         * css/CSSGradientValue.cpp:
3335         (WebCore::CSSGradientValue::addStops):
3336         Check whether gradientLength > 0 before using it as denominator.
3337
3338 2015-10-05  Dean Jackson  <dino@apple.com>
3339
3340         EXT_texture_filter_anisotropic extension exposed with WEBKIT_ prefix
3341         https://bugs.webkit.org/show_bug.cgi?id=149765
3342         <rdar://problem/22983722>
3343
3344         Reviewed by Beth Dakin.
3345
3346         We can now remove the WEBKIT_ prefix from this extension.
3347
3348         Test: fast/canvas/webgl/unprefixed-anisotropic-extension.html
3349
3350         * html/canvas/WebGL2RenderingContext.cpp: Support the prefixed and unprefixed form.
3351         (WebCore::WebGL2RenderingContext::getExtension):
3352         * html/canvas/WebGLRenderingContext.cpp:
3353         (WebCore::WebGLRenderingContext::getExtension):
3354         (WebCore::WebGLRenderingContext::getSupportedExtensions):
3355
3356 2015-10-05  Dean Jackson  <dino@apple.com>
3357
3358         Reference cycles during SVG dependency invalidation
3359         https://bugs.webkit.org/show_bug.cgi?id=149824
3360         <rdar://problem/22771412>
3361
3362         Reviewed by Tim Horton.
3363
3364         Detect any reference cycles as we are invalidating.
3365
3366         This is mostly a merge of the following Blink commit:
3367         https://chromium.googlesource.com/chromium/blink/+/a4bc83453bda89823b672877dc02247652a02d51
3368
3369         Test: svg/custom/reference-cycle.svg
3370
3371         * rendering/svg/RenderSVGResource.cpp:
3372         (WebCore::removeFromCacheAndInvalidateDependencies): Keep around a hash
3373         table of dependencies, so that we can detect if an element is already
3374         present before marking it.
3375
3376 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
3377
3378         Fix null pointer dereference in WebSocket::connect()        
3379         https://bugs.webkit.org/show_bug.cgi?id=149311
3380         <rdar://problem/22748858>
3381
3382         Reviewed by Chris Dumez.
3383
3384         This is a merge of Blink r187441,
3385         https://codereview.chromium.org/785933005
3386
3387         Test: http/tests/websocket/construct-in-detached-frame.html
3388
3389         * Modules/websockets/WebSocket.cpp:
3390         (WebCore::WebSocket::connect):
3391         Call function implemented below instead of duplicating the code.
3392         * page/ContentSecurityPolicy.cpp:
3393         (WebCore::ContentSecurityPolicy::shouldBypassMainWorldContentSecurityPolicy):
3394         * page/ContentSecurityPolicy.h:
3395         Factor the logic to check shouldBypassMainWorldContentSecurityPolicy into 
3396         a function in this class. Check Frame pointers are not null before getting 
3397         shouldBypassMainWorldContentSecurityPolicy via those pointers.
3398         * page/EventSource.cpp:
3399         (WebCore::EventSource::create):
3400         This got fixed as a bonus.
3401         * xml/XMLHttpRequest.cpp:
3402         (WebCore::XMLHttpRequest::open):
3403         This got fixed as a bonus too.
3404
3405 2015-10-05  Beth Dakin  <bdakin@apple.com>
3406
3407         WebCore::IOSurface should ask the IOSurface for the pixel format instead of 
3408         caching it
3409         https://bugs.webkit.org/show_bug.cgi?id=149820
3410         -and corresponding-
3411         rdar://problem/22976230
3412
3413         Reviewed by Tim Horton.
3414
3415         Also there is no reason to make YUV be iOS only, so this patch removes those 
3416         PLATFORM checks.
3417
3418         * platform/graphics/cocoa/IOSurface.h:
3419         * platform/graphics/cocoa/IOSurface.mm:
3420         (IOSurface::IOSurface):
3421         (IOSurface::format):
3422         * platform/spi/cocoa/IOSurfaceSPI.h:
3423
3424 2015-10-02  Ryosuke Niwa  <rniwa@webkit.org>
3425
3426         ShadowRoot with leading or trailing white space cause a crash
3427         https://bugs.webkit.org/show_bug.cgi?id=149782
3428
3429         Reviewed by Chris Dumez.
3430
3431         Fixed the crash by adding a null pointer check since a TextNode that appears as a direct child
3432         of a ShadowRoot doesn't have a parent element.
3433
3434         Test: fast/shadow-dom/shadow-root-with-child-whitespace-text-crash.html
3435
3436         * style/RenderTreePosition.cpp:
3437         (WebCore::RenderTreePosition::previousSiblingRenderer):
3438
3439 2015-10-05  Beth Dakin  <bdakin@apple.com>
3440
3441         Build fix. 
3442
3443         * platform/spi/cocoa/IOSurfaceSPI.h:
3444
3445 2015-10-05  Beth Dakin  <bdakin@apple.com>
3446
3447         Unreviewed build fix.
3448
3449         * platform/spi/cocoa/IOSurfaceSPI.h:
3450
3451 2015-10-05  Brady Eidson  <beidson@apple.com>
3452
3453         Modernize IDBRequest::ReadyState into an enum class.
3454         https://bugs.webkit.org/show_bug.cgi?id=149817
3455
3456         Reviewed by Alex Christensen.
3457
3458         No new tests (Refactor, no behavior change).
3459
3460         * Modules/indexeddb/IDBRequest.h:
3461         
3462         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp:
3463         (WebCore::LegacyOpenDBRequest::shouldEnqueueEvent):
3464         
3465         * Modules/indexeddb/legacy/LegacyRequest.cpp:
3466         (WebCore::LegacyRequest::LegacyRequest):
3467         (WebCore::LegacyRequest::result):
3468         (WebCore::LegacyRequest::error):
3469         (WebCore::LegacyRequest::errorCode):
3470         (WebCore::LegacyRequest::readyState):
3471         (WebCore::LegacyRequest::markEarlyDeath):
3472         (WebCore::LegacyRequest::abort):
3473         (WebCore::LegacyRequest::setCursorDetails):
3474         (WebCore::LegacyRequest::setPendingCursor):
3475         (WebCore::LegacyRequest::setResultCursor):
3476         (WebCore::LegacyRequest::finishCursor):
3477         (WebCore::LegacyRequest::shouldEnqueueEvent):
3478         (WebCore::LegacyRequest::stop):
3479         (WebCore::LegacyRequest::dispatchEvent):
3480         (WebCore::LegacyRequest::transactionDidFinishAndDispatch):
3481         (WebCore::LegacyRequest::enqueueEvent):
3482         * Modules/indexeddb/legacy/LegacyRequest.h:
3483
3484 2015-10-05  Jiewen Tan  <jiewen_tan@apple.com>
3485
3486         Cleaning up after revision 190339
3487         https://bugs.webkit.org/show_bug.cgi?id=149732
3488
3489         Reviewed by Myles C. Maxfield.
3490
3491         * xml/XSLStyleSheet.h:
3492         * xml/XSLStyleSheetLibxslt.cpp:
3493         (WebCore::XSLStyleSheet::compileStyleSheet):
3494
3495 2015-10-05  Beth Dakin  <bdakin@apple.com>
3496
3497         Errant space!!
3498         * platform/graphics/cocoa/IOSurface.mm:
3499         (IOSurface::releaseGraphicsContext):
3500         (IOSurface::convertToFormat):
3501
3502 2015-10-05  Beth Dakin  <bdakin@apple.com>
3503
3504         Compress snapshots on iOS
3505         https://bugs.webkit.org/show_bug.cgi?id=149814
3506         -and corresponding-
3507         rdar://problem/22976230
3508
3509         Reviewed by Simon Fraser.
3510
3511         Though the default is still RGBA, it is now possible to create an IOSurface 
3512         that uses the YUV422 pixel format.
3513         * platform/graphics/cocoa/IOSurface.h:
3514         * platform/graphics/cocoa/IOSurface.mm:
3515         (IOSurface::surfaceFromPool):
3516         (IOSurface::create):
3517         (IOSurface::createFromImage):
3518         (IOSurface::IOSurface):
3519         (IOSurface::releaseGraphicsContext):
3520
3521         In order to have a YUV IOSurface, we actually have to create an RGBA surface 
3522         first and then convert it to YUV, so this class method will handle that.
3523         (IOSurface::convertToFormat):
3524
3525         Necessary SPI.
3526         * platform/spi/cocoa/IOSurfaceSPI.h:
3527
3528 2015-10-05  Zalan Bujtas  <zalan@apple.com>
3529
3530         Mark the line dirty when RenderQuote's text changes.
3531         https://bugs.webkit.org/show_bug.cgi?id=149784
3532         rdar://problem/22558169
3533
3534         Reviewed by Antti Koivisto.
3535
3536         When quotation mark changes ( " -> ' or empty string), we
3537         need to mark the line dirty to ensure its content gets laid out properly.
3538
3539         Test: fast/inline/quotation-text-changes-dynamically.html
3540
3541         * rendering/RenderQuote.cpp:
3542         (WebCore::quoteTextRenderer):
3543         (WebCore::RenderQuote::updateText):
3544         (WebCore::fragmentChild): Deleted.
3545
3546 2015-10-03  Filip Pizlo  <fpizlo@apple.com>
3547
3548         Allow an object's marking state to track The Three Colors
3549         https://bugs.webkit.org/show_bug.cgi?id=149654
3550
3551         Reviewed by Geoffrey Garen.
3552
3553         No new tests because no new behavior.
3554
3555         * bindings/scripts/CodeGeneratorJS.pm:
3556         (GenerateImplementation):
3557
3558 2015-10-05  Katlyn Graff  <kgraff@apple.com>
3559
3560         Update setImageSmoothingQuality for additional reviews.
3561         https://bugs.webkit.org/show_bug.cgi?id=149541
3562
3563         Reviewed by Chris Dumez.
3564
3565         * html/canvas/CanvasRenderingContext2D.cpp:
3566         (WebCore::CanvasRenderingContext2D::setImageSmoothingQuality):
3567
3568 2015-10-05  Andreas Kling  <akling@apple.com>
3569
3570         Remove unused HistoryItem::targetItem()
3571         <https://webkit.org/b/149803>
3572
3573         Reviewed by Anders Carlsson.
3574
3575         This is ancient code with no remaining clients since 2010 (r53650)
3576
3577         * history/HistoryItem.cpp:
3578         (WebCore::HistoryItem::findTargetItem): Deleted.
3579         (WebCore::HistoryItem::targetItem): Deleted.
3580         * history/HistoryItem.h:
3581
3582 2015-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
3583
3584         Unprefix -webkit-font-feature-settings
3585         https://bugs.webkit.org/show_bug.cgi?id=149722
3586
3587         Reviewed by Sam Weinig.
3588
3589         * css/CSSComputedStyleDeclaration.cpp:
3590         (WebCore::ComputedStyleExtractor::propertyValue):
3591         * css/CSSParser.cpp:
3592         (WebCore::CSSParser::parseValue):
3593         (WebCore::CSSParser::parseFontFeatureSettings):
3594         * css/CSSPropertyNames.in:
3595         * css/CSSValueKeywords.in:
3596         * css/StyleBuilderCustom.h:
3597         (WebCore::StyleBuilderCustom::applyInitialFontFeatureSettings):
3598         (WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings):
3599         (WebCore::StyleBuilderCustom::applyInitialWebkitFontFeatureSettings): Deleted.
3600         (WebCore::StyleBuilderCustom::applyInheritWebkitFontFeatureSettings): Deleted.
3601
3602 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
3603
3604         [GStreamer] Replace uses of std::bind() with lambdas
3605         https://bugs.webkit.org/show_bug.cgi?id=149802
3606
3607         Reviewed by Carlos Garcia Campos.
3608
3609         Instead of std::bind(), use C++ lambdas to create std::function<>
3610         wrappers in GStreamer-related class implementations.
3611
3612         Ref-counted classes are protected by capturing a RefPtr object.
3613         GstObject-derived objects are protected by capturing a GRefPtr object.
3614         Necessary specializations for WebKitVideoSink and WebKitWebSrc are added.
3615
3616         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3617         (WebCore::AudioFileReader::createBus):
3618         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
3619         (WTF::adoptGRef):
3620         (WTF::refGPtr<WebKitVideoSink>):
3621         (WTF::derefGPtr<WebKitVideoSink>):
3622         (WTF::refGPtr<WebKitWebSrc>):
3623         (WTF::derefGPtr<WebKitWebSrc>):
3624         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
3625         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
3626         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
3627         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
3628         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3629         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
3630         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
3631         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
3632         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
3633         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3634         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
3635         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
3636         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3637         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
3638         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
3639         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3640         (webkitVideoSinkRender):
3641         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3642         (webKitWebSrcChangeState):
3643         (webKitWebSrcNeedDataCb):
3644         (webKitWebSrcEnoughDataCb):
3645         (webKitWebSrcSeekDataCb):
3646
3647 2015-10-05  Andreas Kling  <akling@apple.com>
3648
3649         Remove unused HistoryItem::parent
3650         <https://webkit.org/b/149803>
3651
3652         Reviewed by Anders Carlsson.
3653
3654         Remove the effectively-unused "parent" field from HistoryItem.
3655         This also allows us to get rid of a HistoryItem constructor.
3656
3657         * history/HistoryItem.cpp:
3658         (WebCore::HistoryItem::HistoryItem): Deleted.
3659         (WebCore::HistoryItem::reset): Deleted.
3660         (WebCore::HistoryItem::parent): Deleted.
3661         (WebCore::HistoryItem::setParent): Deleted.
3662         * history/HistoryItem.h:
3663         (WebCore::HistoryItem::create): Deleted.
3664         * loader/HistoryController.cpp:
3665         (WebCore::HistoryController::initializeItem): Deleted.
3666
3667 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
3668
3669         GLContext should control ownership of context-related objects
3670         https://bugs.webkit.org/show_bug.cgi?id=149794
3671
3672         Reviewed by Martin Robinson.
3673
3674         Creation of GLContext objects can depend on various platform-specific
3675         objects like native window representations. Since these objects are
3676         used solely for the GLContext purposes, it would make sense to allow
3677         GLContext to provide an extensible way to impose ownership on these
3678         objects and control their lifetime.
3679
3680         GLContext::Data is declared with a defaulted virtual destructor.
3681         Users of these implementations can declare classes that derive from
3682         GLContext::Data and store context-related objects in instances of the
3683         derived class, and ensure that these objects are properly cleaned up
3684         when GLContext destroys the Data object.
3685
3686         The GLContext::Data object is managed through a protected
3687         std::unique_ptr<> member in the GLContext class. For now the member
3688         is only set in GLContextEGL::createWindowContext() and is destroyed
3689         during the GLContext destruction.
3690
3691         The local OffscreenContextData class in
3692         PlatformDisplayWayland::createSharingGLContext() derives from
3693         GLContext::Data and is used to store the wl_surface and
3694         EGLNativeWindowType (aka wl_egl_window) objects for offscreen
3695         GLContexts under the Wayland platform that are used for the sharing
3696         context and WebGL, effectively avoiding the leak that would further
3697         propagate problems into the compositor and the graphics library.
3698         (Such offscreen contexts are actually mimicked via a 1x1px
3699         wl_egl_window object that acts as a dummy base for the related
3700         wl_surface object).
3701
3702         * platform/graphics/GLContext.h:
3703         * platform/graphics/egl/GLContextEGL.cpp:
3704         (WebCore::GLContextEGL::createWindowContext):
3705         * platform/graphics/egl/GLContextEGL.h:
3706         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
3707         (WebCore::PlatformDisplayWayland::createSharingGLContext):
3708
3709 2015-10-05  Zan Dobersek  <zdobersek@igalia.com>
3710
3711         Make gdk.h inclusion in FontPlatformDataFreeType.cpp properly GTK-specific
3712         https://bugs.webkit.org/show_bug.cgi?id=149793
3713
3714         Reviewed by Carlos Garcia Campos.
3715
3716         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3717         Instead of including <gdk/gdk.h> header for all platforms but EFL, only
3718         include it for the GTK platform, since no other platform depends on the
3719         GDK library.
3720
3721 2015-10-03  Ricky Mondello  <rmondello@apple.com>
3722
3723         "Plug-in is blocked" message doesn't draw correctly
3724         https://bugs.webkit.org/show_bug.cgi?id=149741
3725         <rdar://problem/22920949>
3726
3727         Patch by Conrad Shultz and Ricky Mondello.
3728
3729         Reviewed by Anders Carlsson.
3730
3731         No new tests are added.
3732
3733         Add PluginData API to check whether a MIME type is supported, regardless of plug-in visibility.
3734
3735         * plugins/PluginData.cpp:
3736         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices): Adopt getMimesAndPluginIndiciesForPlugins.
3737         (WebCore::PluginData::getMimesAndPluginIndices): Added.
3738         (WebCore::PluginData::getMimesAndPluginIndiciesForPlugins): Essentially factored out of
3739             getWebVisibleMimesAndPluginIndices.
3740         (WebCore::PluginData::supportsMimeType): Added. Somewhat similar to preexisting supportsWebVisibleMimeType.
3741         * plugins/PluginData.h: Declare supportsMimeType.
3742
3743 2015-10-02  Antti Koivisto  <antti@apple.com>
3744
3745         Inserting a child to a slot assigned node doesn't trigger repaint
3746         https://bugs.webkit.org/show_bug.cgi?id=149739
3747
3748         Reviewed by Ryosuke Niwa.
3749
3750         Test: fast/shadow-dom/insert-child-to-assigned-node.html
3751
3752         * dom/Node.cpp:
3753         (WebCore::Node::derefEventTarget):
3754         (WebCore::traverseStyleParent):
3755         (WebCore::traverseFirstStyleParent):
3756         (WebCore::Node::updateAncestorsForStyleRecalc):
3757
3758             Traverse in style parent order.
3759
3760 2015-10-02  Joseph Pecoraro  <pecoraro@apple.com>
3761
3762         Unreviewed, rolling out r190520, some tests assert / crash.
3763
3764         * ForwardingHeaders/heap/HeapObserver.h: Removed.
3765         * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Removed.
3766         * WebCore.vcxproj/WebCore.vcxproj:
3767         * WebCore.vcxproj/WebCore.vcxproj.filters:
3768         * inspector/InspectorController.cpp:
3769         (WebCore::InspectorController::InspectorController): Deleted.
3770         (WebCore::InspectorController::vm): Deleted.
3771         * inspector/InspectorController.h:
3772         * inspector/WorkerInspectorController.cpp:
3773         (WebCore::WorkerInspectorController::vm): Deleted.
3774         * inspector/WorkerInspectorController.h:
3775
3776 2015-10-02  Joseph Pecoraro  <pecoraro@apple.com>
3777
3778         Web Inspector: Include Garbage Collection Event in Timeline
3779         https://bugs.webkit.org/show_bug.cgi?id=142510
3780
3781         Reviewed by Geoffrey Garen.
3782
3783         Tests: inspector/heap/garbageCollected.html
3784                inspector/heap/gc.html
3785
3786         * ForwardingHeaders/heap/HeapObserver.h: Added.
3787         * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Added.
3788         * WebCore.vcxproj/WebCore.vcxproj:
3789         * WebCore.vcxproj/WebCore.vcxproj.filters:
3790         Forwarding headers.
3791
3792         * inspector/InspectorController.cpp:
3793         (WebCore::InspectorController::InspectorController):
3794         (WebCore::InspectorController::vm):
3795         * inspector/InspectorController.h:
3796         * inspector/WorkerInspectorController.cpp:
3797         (WebCore::WorkerInspectorController::vm):
3798         * inspector/WorkerInspectorController.h:
3799         Implement InspectorEnvironment::vm and create a Heap agent for the
3800         Page inspector controller.
3801
3802 2015-10-02  Jer Noble  <jer.noble@apple.com>
3803
3804         [MSE] Browser crashes when appending invalid data to MSE source buffer
3805         https://bugs.webkit.org/show_bug.cgi?id=149689
3806
3807         Reviewed by Darin Adler.
3808
3809         Test: media/media-source/media-source-stpp-crash.html
3810
3811         Bail out early (as specced) after disconnecting the SourceBuffer from its MediaSource.
3812
3813         * Modules/mediasource/SourceBuffer.cpp:
3814         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
3815
3816 2015-10-02  Simon Fraser  <simon.fraser@apple.com>
3817
3818         ASSERTION FAILED: param >= 0 in AnimationBase::updateStateMachine()
3819         https://bugs.webkit.org/show_bug.cgi?id=149737
3820         rdar://problem/19017465
3821
3822         Reviewed by Dean Jackson.
3823
3824         CoreAnimation can give us an animation beginTime that is slightly into the future,
3825         which results in 'param' here being < 0, so relax the assertion slightly.
3826         
3827         Fixes lots of assertions running iOS WK2 layout tests.
3828
3829         * page/animation/AnimationBase.cpp:
3830         (WebCore::AnimationBase::updateStateMachine):
3831
3832 2015-10-02  Per Arne Vollan  <peavo@outlook.com>
3833
3834         [WinCairo] Fix linker warnings.
3835         https://bugs.webkit.org/show_bug.cgi?id=149754
3836
3837         Reviewed by Alex Christensen.
3838
3839         Avoid compiling these files twice, they are already included in
3840         RenderingAllInOne.cpp.
3841
3842         * PlatformWinCairo.cmake:
3843
3844 2015-10-02  Alex Christensen  <achristensen@webkit.org>
3845
3846         Reloading without content blockers doesn't apply to resource loads after the main frame finishes
3847         https://bugs.webkit.org/show_bug.cgi?id=149430
3848         rdar://problem/22742222
3849
3850         Reviewed by Geoffrey Garen.
3851
3852         Test: http/tests/contentextensions/disable-blocker.html
3853
3854         * html/HTMLMediaElement.cpp:
3855         (WebCore::HTMLMediaElement::loadResource):
3856         * loader/DocumentLoader.h:
3857         (WebCore::DocumentLoader::userContentExtensionsEnabled):
3858         (WebCore::DocumentLoader::setUserContentExtensionsEnabled):
3859         Store and use the state of whether content blockers are enabled or not on the DocumentLoader
3860         so that it stays constant for a document's entire life.  This state comes from the Page when
3861         making the DocumentLoader in WebKit2.
3862         * loader/FrameLoader.cpp:
3863         (WebCore::FrameLoader::loadResourceSynchronously):
3864         * loader/ResourceLoader.cpp:
3865         (WebCore::ResourceLoader::willSendRequestInternal):
3866         * loader/cache/CachedResourceLoader.cpp:
3867         (WebCore::CachedResourceLoader::requestResource):
3868         * page/DOMWindow.cpp:
3869         (WebCore::DOMWindow::open):
3870         * page/UserContentController.cpp:
3871         (WebCore::UserContentController::removeAllUserContentExtensions):
3872         (WebCore::UserContentController::processContentExtensionRulesForLoad):
3873         (WebCore::UserContentController::actionsForResourceLoad):
3874         * page/UserContentController.h:
3875
3876 2015-10-02  Antoine Quint  <graouts@apple.com>
3877
3878         popstate is fired at the wrong time on load
3879         https://bugs.webkit.org/show_bug.cgi?id=94265
3880
3881         Reviewed by Darin Adler.
3882
3883         Don't fire popstate event on initial document load
3884
3885         According to the specification [1], a popstate event should only be fired
3886         when the document has a "last entry" and the entry being navigated to isn't
3887         it.  A document is created without a "last entry" and gets one just after
3888         this check when it is first navigated to, so a popstate should be fired any
3889         time a document is navigated to except for the first time after it has been
3890         created.
3891
3892         Patch adapted from work by jl@opera.com on Blink [2].
3893
3894         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#traverse-the-history (step 12-14 in particular)
3895         [2] https://src.chromium.org/viewvc/blink?revision=165221&view=revision
3896
3897         * dom/Document.cpp:
3898         (WebCore::Document::implicitClose):
3899
3900 2015-10-02  Javier Fernandez  <jfernandez@igalia.com>
3901
3902         [CSS Grid Layout] Support for Content Alignment in grid layout
3903         https://bugs.webkit.org/show_bug.cgi?id=145520
3904
3905         Reviewed by Darin Adler.
3906
3907         According to CSS Box Alignment specification, Content Distribution
3908         alignment controls alignment of the box's content within the box. The
3909         alignment container is the grid container's content box. The alignment
3910         subjects are the grid tracks.
3911
3912         This patch implements Grid Layout support for Content Distribution
3913         alignment along both block/column and inline/row axis, which are handled
3914         by align-content and justify-content properties respectively.
3915
3916         This patch provides support for overflow handling, similar to what
3917         Self Alignment provides with grid items, and both <content-position>
3918         and <content-distribution> values.
3919
3920         Baseline Alignment is still missing because it requires some additional
3921         behavior to be supported on grids before considering its implementation.
3922
3923         Tests: css3/overwrite-content-alignment.html
3924                css3/overwrite-self-alignment.html
3925                fast/css-grid-layout/grid-align-content-distribution-vertical-lr.html
3926                fast/css-grid-layout/grid-align-content-distribution-vertical-rl.html
3927                fast/css-grid-layout/grid-align-content-distribution.html
3928                fast/css-grid-layout/grid-align-content-vertical-lr.html
3929                fast/css-grid-layout/grid-align-content-vertical-rl.html
3930                fast/css-grid-layout/grid-align-content.html
3931                fast/css-grid-layout/grid-content-alignment-overflow.html
3932                fast/css-grid-layout/grid-content-alignment-with-different-sized-tracks.html
3933                fast/css-grid-layout/grid-content-alignment-with-span-vertical-lr.html
3934                fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html
3935                fast/css-grid-layout/grid-content-alignment-with-span.html
3936                fast/css-grid-layout/grid-justify-content-distribution-vertical-lr.html
3937                fast/css-grid-layout/grid-justify-content-distribution-vertical-rl.html
3938                fast/css-grid-layout/grid-justify-content-distribution.html
3939                fast/css-grid-layout/grid-justify-content-vertical-lr.html
3940                fast/css-grid-layout/grid-justify-content-vertical-rl.html
3941                fast/css-grid-layout/grid-justify-content.html
3942
3943         * rendering/RenderFlexibleBox.cpp:
3944         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3945         (WebCore::RenderFlexibleBox::layoutColumnReverse):
3946         (WebCore::RenderFlexibleBox::alignFlexLines):
3947         * rendering/RenderGrid.cpp:
3948         (WebCore::ContentAlignmentData::ContentAlignmentData):
3949         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3950         (WebCore::RenderGrid::layoutGridItems):
3951         (WebCore::RenderGrid::gridAreaBreadthForChild):
3952         (WebCore::RenderGrid::populateGridPositions):
3953         (WebCore::resolveContentDistributionFallback):
3954         (WebCore::offsetToStartEdge):
3955         (WebCore::offsetToEndEdge):
3956         (WebCore::contentDistributionOffset):
3957         (WebCore::RenderGrid::computeContentPositionAndDistributionColumnOffset):
3958         (WebCore::RenderGrid::computeContentPositionAndDistributionRowOffset):
3959         (WebCore::RenderGrid::findChildLogicalPosition):
3960         (WebCore::RenderGrid::computePreferredLogicalWidths): Deleted.
3961         (WebCore::RenderGrid::autoPlacementMajorAxisDirection): Deleted.
3962         (WebCore::RenderGrid::autoPlacementMinorAxisDirection): Deleted.
3963         (WebCore::RenderGrid::cachedGridCoordinate): Deleted.
3964         (WebCore::RenderGrid::rowPositionForChild): Deleted.
3965         * rendering/RenderGrid.h:
3966         * rendering/style/RenderStyle.cpp:
3967         (WebCore::RenderStyle::resolvedAlignContentPosition):
3968         (WebCore::RenderStyle::resolvedAlignContentDistribution):
3969         (WebCore::RenderStyle::resolvedJustifyContentPosition):
3970         (WebCore::RenderStyle::resolvedJustifyContentDistribution):
3971         * rendering/style/RenderStyle.h:
3972
3973 2015-10-02  Dean Jackson  <dino@apple.com>
3974
3975         Attempted build fix.
3976
3977         * DerivedSources.make:
3978         * page/make_settings.pl:
3979         (printGetterAndSetter):
3980
3981 2015-10-01  Dean Jackson  <dino@apple.com>
3982
3983         Expose WEBGL_debug_renderer_info
3984         https://bugs.webkit.org/show_bug.cgi?id=149735
3985         <rdar://problem/18343500>
3986
3987         Reviewed by Simon Fraser.
3988
3989         Take two at landing this.
3990
3991         Enable the extension that allows content to query
3992         for the GPUs vendor and details.
3993
3994         Now that we're enabling this, there was no need for
3995         the internal setting that identified privileged situations.
3996         However, since this meant that WEBGL_debug_shaders was
3997         also exposed, I explicitly disable it since it is
3998         not yet conformant.
3999
4000         Test: fast/canvas/webgl/webgl-debug-renderer-info.html
4001         as well as the general conformance suite.
4002
4003         * html/canvas/WebGL2RenderingContext.cpp: No need to guard around allowPrivilegedExtensions().
4004         (WebCore::WebGL2RenderingContext::getExtension):
4005         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
4006         * html/canvas/WebGLRenderingContext.cpp: Ditto.
4007         (WebCore::WebGLRenderingContext::getExtension):
4008         (WebCore::WebGLRenderingContext::getSupportedExtensions):
4009         * html/canvas/WebGLRenderingContextBase.cpp:
4010         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions): Deleted.
4011         * html/canvas/WebGLRenderingContextBase.h:
4012         * page/Settings.in: Remove privilegedWebGLExtensions.
4013         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Forbid the translated shader
4014         extension while it is still buggy.
4015         (WebCore::Extensions3DOpenGL::supportsExtension):
4016
4017 2015-10-01  Csaba Osztrogonác  <ossy@webkit.org>
4018
4019         Fix the #if guard in PointerLockController.cpp
4020         https://bugs.webkit.org/show_bug.cgi?id=149705
4021
4022         Reviewed by Gyuyoung Kim.
4023
4024         * page/PointerLockController.cpp:
4025
4026 2015-10-01  Dean Jackson  <dino@apple.com>
4027
4028         Rollout r190446 for the moment. It broke the build.
4029
4030         * html/canvas/WebGL2RenderingContext.cpp:
4031         (WebCore::WebGL2RenderingContext::getExtension):
4032         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
4033         * html/canvas/WebGLRenderingContext.cpp:
4034         (WebCore::WebGLRenderingContext::getExtension):
4035         (WebCore::WebGLRenderingContext::getSupportedExtensions):
4036         * html/canvas/WebGLRenderingContextBase.cpp:
4037         (WebCore::WebGLRenderingContextBase::allowPrivilegedExtensions):
4038         * html/canvas/WebGLRenderingContextBase.h:
4039         * page/Settings.in: