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