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