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