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