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