Object.getOwnPropertyNames() does not return named properties
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-09-28  Chris Dumez  <cdumez@apple.com>
2
3         Object.getOwnPropertyNames() does not return named properties
4         https://bugs.webkit.org/show_bug.cgi?id=149562
5         <rdar://problem/22879779>
6
7         Reviewed by Darin Adler.
8
9         Previously, Object.getOwnPropertyNames() did not return named properties
10         for interfaces with named property getters. This patch adds support for
11         this in the JS bindings generator and uses it for HTMLCollection only
12         for now. Other interfaces will be taken care of independently.
13
14         Note that currently, even though the named properties are returned by
15         Object.getOwnPropertyNames(), these properties are still not enumerated.
16         This is because these are always unenumerable for existing DOM interfaces:
17         - https://dom.spec.whatwg.org/#interface-htmlcollection
18         - https://dom.spec.whatwg.org/#namednodemap
19
20         In the future, we may need to extend support if some interfaces require
21         those to be enumerable.
22
23         Test: fast/dom/htmlcollection-getownpropertynames.html
24
25         * Modules/mediastream/RTCStatsResponse.cpp:
26         (WebCore::WebCore::RTCStatsResponse::supportedPropertyNames):
27         * Modules/mediastream/RTCStatsResponse.h:
28         * bindings/scripts/CodeGeneratorJS.pm:
29         (GenerateHeader):
30         (GenerateImplementation):
31         * css/StyleSheetList.cpp:
32         (WebCore::StyleSheetList::supportedPropertyNames):
33         * css/StyleSheetList.h:
34         * dom/DOMNamedFlowCollection.cpp:
35         (WebCore::DOMNamedFlowCollection::supportedPropertyNames):
36         * dom/DOMNamedFlowCollection.h:
37         * dom/NamedNodeMap.cpp:
38         (WebCore::NamedNodeMap::supportedPropertyNames):
39         * dom/NamedNodeMap.h:
40         * html/HTMLCollection.cpp:
41         (WebCore::HTMLCollection::supportedPropertyNames):
42         * html/HTMLCollection.h:
43         (WebCore::CollectionNamedElementCache::propertyNames):
44         (WebCore::CollectionNamedElementCache::appendToIdCache):
45         (WebCore::CollectionNamedElementCache::appendToNameCache):
46         (WebCore::CollectionNamedElementCache::memoryCost):
47         (WebCore::CollectionNamedElementCache::append):
48         * plugins/DOMMimeTypeArray.cpp:
49         (WebCore::DOMMimeTypeArray::supportedPropertyNames):
50         * plugins/DOMMimeTypeArray.h:
51         * plugins/DOMPlugin.cpp:
52         (WebCore::DOMPlugin::supportedPropertyNames):
53         * plugins/DOMPlugin.h:
54         * plugins/DOMPluginArray.cpp:
55         (WebCore::DOMPluginArray::supportedPropertyNames):
56         * plugins/DOMPluginArray.h:
57
58 2015-09-28  Per Arne Vollan  <peavo@outlook.com>
59
60         [Curl] Deadlock when downloading.
61         https://bugs.webkit.org/show_bug.cgi?id=149596
62
63         Reviewed by Alex Christensen.
64
65         Avoid grabbing the same lock twice.
66
67         * platform/network/curl/CurlDownload.cpp:
68         (WebCore::CurlDownload::init):
69         (WebCore::CurlDownload::addHeaders):
70
71 2015-09-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
72
73         An SVG inherits the container size of the previously drawn HTMLImageElement when drawing it on a canvas
74         https://bugs.webkit.org/show_bug.cgi?id=148845
75
76         Reviewed by Darin Adler.
77
78         When drawing an SVG image on a canvas we need to make sure that the container
79         size of the SVG is set to the image source size. If we do not do that, the
80         previous container size will be used as the size of the image. When drawing
81         it as HTMLImageElement, the renderer calls SVGImage::drawForContainer() which
82         calls setContainerSize() and then calls draw(). This call ensures that the
83         size is set correctly for cached images. But when drawing the SVGImage on
84         CanvasRenderingContext2D, the SVGImage::draw() is called directly because
85         it calls it through the base class method Image::draw().
86         
87         If the image.isSVGImage(), CanvasRenderingContext2D::drawImage() has to call
88         SVGImage::setContainerSize() before calling Image::draw().
89
90         Test: svg/as-image/svg-cached-draw-canvas.html
91
92         * html/canvas/CanvasRenderingContext2D.cpp:
93         (WebCore::CanvasRenderingContext2D::drawImage):
94         Call SVGImage::setContainerSize() before calling Image::draw().
95
96 2015-09-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
97
98         Rename all the variables and parameters of type HTMLImageElement in CanvasRenderingContext2D.cpp from 'image' to 'imageElement'
99
100         Reviewed by Darin Adler.
101
102         This does not change functionality in this file. It is a preparation for
103         the fix of the https://bugs.webkit.org/show_bug.cgi?id=148845.
104
105         * html/canvas/CanvasRenderingContext2D.cpp:
106         (WebCore::size):
107         (WebCore::normalizeRect):
108         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
109         (WebCore::CanvasRenderingContext2D::setAlpha):
110         (WebCore::CanvasRenderingContext2D::createRadialGradient):
111         (WebCore::CanvasRenderingContext2D::createPattern):
112         (WebCore::CanvasRenderingContext2D::drawImage):
113
114 2015-09-27  Yusuke Suzuki  <utatane.tea@gmail.com>
115
116         [ES6] Implement ES6 Module loader hook stubs in WebCore
117         https://bugs.webkit.org/show_bug.cgi?id=149574
118
119         Reviewed by Ryosuke Niwa.
120
121         In this patch, we implement the loader hooks in the WebCore side.
122         Since the fetcher and actual evaluation code are separated from
123         this patch, they become empty.
124
125         Here, WebCore implements 3 loader hooks.
126
127         1. resolve hook
128
129             Takes the module name and resolve it to the unique module key.
130             In WebCore, we use URL as a module key.
131             And for the inlined module tag (e.g. <script type="module">import ...</script>),
132             we use the ES6 symbol as a module key.
133             In WebCore, we take the module name like "./hello.js" and resolve it by using
134             the URL of the importer module.
135             This functionality is implemented in this patch.
136
137         2. fetch hook
138
139             Fetches the resource specified by the module key. In WebCore, the module key is
140             URL. We use CachedResource loading system to load the resource of the modules.
141             The actual code of the fetch hook will be implemented in the subsequent patch.
142
143         3. evaluate hook
144
145             This is additional hook to instrument the module's execution for the inspector.
146             The actual code of the evaluate hook will be implemented in the subsequent patch.
147
148         In addition to that, we added required JSC forward headers for the module loader
149         implementation.
150
151         * CMakeLists.txt:
152         * ForwardingHeaders/runtime/JSInternalPromise.h: Added.
153         * ForwardingHeaders/runtime/JSInternalPromiseDeferred.h: Added.
154         * ForwardingHeaders/runtime/JSModuleRecord.h: Added.
155         * ForwardingHeaders/runtime/Symbol.h: Added.
156         * WebCore.vcxproj/WebCore.vcxproj:
157         * WebCore.vcxproj/WebCore.vcxproj.filters:
158         * WebCore.xcodeproj/project.pbxproj:
159         * bindings/js/JSBindingsAllInOne.cpp:
160         * bindings/js/JSDOMWindowBase.cpp:
161         (WebCore::JSDOMWindowBase::moduleLoaderResolve):
162         (WebCore::JSDOMWindowBase::moduleLoaderFetch):
163         (WebCore::JSDOMWindowBase::moduleLoaderEvaluate):
164         * bindings/js/JSDOMWindowBase.h:
165         * bindings/js/JSModuleLoader.cpp: Added.
166         (WebCore::JSModuleLoader::JSModuleLoader):
167         (WebCore::JSModuleLoader::resolve):
168         (WebCore::JSModuleLoader::fetch):
169         (WebCore::JSModuleLoader::evaluate):
170         * bindings/js/JSModuleLoader.h: Added.
171         (WebCore::JSModuleLoader::document):
172         * dom/Document.cpp:
173         (WebCore::Document::Document):
174         (WebCore::Document::~Document):
175         * dom/Document.h:
176         (WebCore::Document::moduleLoader):
177
178 2015-09-26  Hunseop Jeong  <hs85.jeong@samsung.com>
179
180         Use modern for-loops in WebCore/inspector.
181         https://bugs.webkit.org/show_bug.cgi?id=149579
182
183         Reviewed by Darin Adler.
184
185         No new tests because there is no behavior change.
186
187         * inspector/DOMPatchSupport.cpp:
188         (WebCore::DOMPatchSupport::diff):
189         (WebCore::DOMPatchSupport::innerPatchChildren):
190         (WebCore::DOMPatchSupport::removeChildAndMoveToNew):
191         (WebCore::DOMPatchSupport::markNodeAsUsed):
192         * inspector/InspectorCSSAgent.cpp:
193         (WebCore::computePseudoClassMask):
194         (WebCore::ChangeRegionOversetTask::timerFired):
195         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
196         (WebCore::InspectorCSSAgent::resetPseudoStates):
197         * inspector/InspectorDOMAgent.cpp:
198         (WebCore::RevalidateStyleAttributeTask::timerFired):
199         (WebCore::InspectorDOMAgent::releaseBackendNodeIds):
200         (WebCore::InspectorDOMAgent::getEventListenersForNode):
201         (WebCore::InspectorDOMAgent::getEventListeners):
202         (WebCore::InspectorDOMAgent::performSearch):
203         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
204         * inspector/InspectorDOMDebuggerAgent.cpp:
205         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
206         * inspector/InspectorDatabaseAgent.cpp:
207         (WebCore::InspectorDatabaseAgent::enable):
208         (WebCore::InspectorDatabaseAgent::disable):
209         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
210         (WebCore::InspectorDatabaseAgent::databaseId):
211         (WebCore::InspectorDatabaseAgent::findByFileName):
212         * inspector/InspectorFrontendClientLocal.cpp:
213         (WebCore::InspectorFrontendClientLocal::frontendLoaded):
214         * inspector/InspectorFrontendHost.cpp:
215         * inspector/InspectorIndexedDBAgent.cpp:
216         * inspector/InspectorOverlay.cpp:
217         (WebCore::buildRendererHighlight):
218         (WebCore::buildObjectForHighlight):
219         * inspector/InspectorPageAgent.cpp:
220         (WebCore::InspectorPageAgent::getCookies):
221         * inspector/InspectorReplayAgent.cpp:
222         (WebCore::buildInspectorObjectForSession):
223         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
224         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
225         * inspector/InspectorResourceAgent.cpp:
226         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
227         (WebCore::InspectorResourceAgent::willRecalculateStyle):
228         * inspector/InspectorStyleSheet.cpp:
229         (flattenSourceData):
230         (WebCore::InspectorStyle::buildArrayForComputedStyle):
231         (WebCore::InspectorStyle::populateAllProperties):
232         (WebCore::selectorsFromSource):
233         (WebCore::InspectorStyleSheet::ruleIndexByStyle):
234         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
235         * inspector/InspectorWorkerAgent.cpp:
236         (WebCore::InspectorWorkerAgent::createWorkerFrontendChannelsForExistingWorkers):
237         (WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
238         * inspector/NetworkResourcesData.cpp:
239         (WebCore::NetworkResourcesData::removeCachedResource):
240         (WebCore::NetworkResourcesData::clear):
241         * inspector/PageRuntimeAgent.cpp:
242         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
243         * inspector/PageScriptDebugServer.cpp:
244         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
245         * inspector/WebConsoleAgent.cpp:
246         (WebCore::WebConsoleAgent::frameWindowDiscarded):
247         * inspector/WebInjectedScriptManager.cpp:
248         (WebCore::WebInjectedScriptManager::discardInjectedScriptsFor):
249
250 2015-09-25  Eric Carlson  <eric.carlson@apple.com>
251
252         Clean up user media request internal API
253         https://bugs.webkit.org/show_bug.cgi?id=149527
254
255         Reviewed by Tim Horton.
256
257         No new tests, no functional change.
258
259         * Modules/mediastream/UserMediaRequest.cpp:
260         (WebCore::UserMediaRequest::constraintsValidated): Use track persistent ID to create vectors
261           as that is what the platform code needs to map to a capture device.
262         (WebCore::UserMediaRequest::userMediaAccessGranted): m_chosenXXDeviceUID -> m_XXDeviceUIDAllowed.
263           Use the device IDs to create the MediaStream. Switch audio/video parameter order.
264         (WebCore::UserMediaRequest::didCreateStream): Don't assume constraints are valid.
265         * Modules/mediastream/UserMediaRequest.h:
266         (WebCore::UserMediaRequest::videoDeviceUIDs):
267         (WebCore::UserMediaRequest::audioDeviceUIDs):
268         (WebCore::UserMediaRequest::allowedVideoDeviceUID):
269         (WebCore::UserMediaRequest::allowedAudioDeviceUID):
270         (WebCore::UserMediaRequest::requiresAudio): Deleted.
271         (WebCore::UserMediaRequest::requiresVideo): Deleted.
272         (WebCore::UserMediaRequest::firstVideoDeviceUID): Deleted.
273         (WebCore::UserMediaRequest::firstAudioDeviceUID): Deleted.
274
275         * platform/mediastream/mac/AVMediaCaptureSource.mm:
276         (WebCore::AVMediaCaptureSource::AVMediaCaptureSource): Call setPersistentId.
277
278 2015-09-25  Antti Koivisto  <antti@apple.com>
279
280         Implement scoped styling for shadow DOM
281         https://bugs.webkit.org/show_bug.cgi?id=149230
282
283         Reviewed by Ryosuke Niwa.
284
285         Test: fast/shadow-dom/css-scoping-shadow-with-rules-no-style-leak.html
286
287         * css/ElementRuleCollector.cpp:
288         (WebCore::ElementRuleCollector::collectMatchingRules):
289
290             Only use special path here for user agent shadow trees.
291
292         * dom/AuthorStyleSheets.cpp:
293         (WebCore::AuthorStyleSheets::AuthorStyleSheets):
294         (WebCore::AuthorStyleSheets::removePendingSheet):
295         (WebCore::AuthorStyleSheets::updateActiveStyleSheets):
296
297             Basic support for ShadowRoot scoped stylesheets.
298
299         * dom/AuthorStyleSheets.h:
300         (WebCore::AuthorStyleSheets::activeStyleSheets):
301         * dom/InlineStyleSheetOwner.cpp:
302         (WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
303         (WebCore::authorStyleSheetsForElement):
304         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
305         (WebCore::InlineStyleSheetOwner::removedFromDocument):
306         (WebCore::InlineStyleSheetOwner::clearDocumentData):
307         (WebCore::InlineStyleSheetOwner::childrenChanged):
308         (WebCore::InlineStyleSheetOwner::createSheet):
309         (WebCore::InlineStyleSheetOwner::isLoading):
310         (WebCore::InlineStyleSheetOwner::sheetLoaded):
311         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
312
313             Basic support for ShadowRoot scoped inline stylesheets.
314
315         * dom/InlineStyleSheetOwner.h:
316         (WebCore::InlineStyleSheetOwner::sheet):
317         * dom/ShadowRoot.cpp:
318         (WebCore::ShadowRoot::styleResolver):
319
320             Create and initialize ShadowRoot scoped style resolver.
321
322         (WebCore::ShadowRoot::resetStyleResolver):
323         (WebCore::ShadowRoot::authorStyleSheets):
324
325             Collection of author stylesheets in the shadow tree.
326
327         (WebCore::ShadowRoot::updateStyle):
328
329             Trigger style recalc when stylesheets change.
330
331         (WebCore::ShadowRoot::cloneNode):
332         * dom/ShadowRoot.h:
333         (WebCore::ShadowRoot::resetStyleInheritance):
334         * html/HTMLStyleElement.h:
335         * svg/SVGStyleElement.h:
336
337 2015-09-25  Alex Christensen  <achristensen@webkit.org>
338
339         Clean up CMake build on Mac
340         https://bugs.webkit.org/show_bug.cgi?id=149573
341
342         Reviewed by Chris Dumez.
343
344         * CMakeLists.txt:
345         * PlatformEfl.cmake:
346         * PlatformGTK.cmake:
347         * PlatformMac.cmake:
348         * platform/graphics/DisplayRefreshMonitor.cpp:
349
350 2015-09-25  Tim Horton  <timothy_horton@apple.com>
351
352         Scrolling a overflow: scroll region makes find overlay holes stick to the edge of the region
353         https://bugs.webkit.org/show_bug.cgi?id=149572
354         <rdar://problem/13093602>
355
356         Reviewed by Simon Fraser.
357
358         Test: fast/text/mark-matches-overflow-clip.html
359
360         * rendering/InlineTextBox.cpp:
361         (WebCore::InlineTextBox::paintTextMatchMarker):
362         Clip the rendered marker rect to the overflow rect.
363
364         * testing/Internals.cpp:
365         (WebCore::Internals::dumpMarkerRectsForNode):
366         * testing/Internals.h:
367         * testing/Internals.idl:
368         Add a internals function to dump the rendered rects for a marker.
369
370 2015-09-25  Alex Christensen  <achristensen@webkit.org>
371
372         [Win] Switch to CMake
373         https://bugs.webkit.org/show_bug.cgi?id=148111
374
375         Reviewed by Brent Fulgham.
376
377         * WebCore.vcxproj/WebCore.proj:
378
379 2015-09-25  Beth Dakin  <bdakin@apple.com>
380
381         Clicking on a data detected item inside a form control always pops up a map 
382         on force touch trackpad
383         https://bugs.webkit.org/show_bug.cgi?id=149559
384         -and corresponding-
385         rdar://problem/22826796
386
387         Reviewed by Tim Horton.
388
389         The real bug here appears to be a bug in Lookup, but we can work around it. 
390         For normal text, we call directly into Data Detectors for map results, and 
391         that works fine. For text within form controls, we did not properly extract 
392         the text for DD, so we sent it to Lookup instead, and Lookup has this bug 
393         where they will pop open the map right away. If we properly extract the text 
394         for form controls, then we can work around this bug.
395
396         * editing/mac/DataDetection.mm:
397         (WebCore::detectItemAtPositionWithRange):
398         (WebCore::DataDetection::detectItemAroundHitTestResult):
399
400 2015-09-25  Brady Eidson  <beidson@apple.com>
401
402         PassRefPtr<> to RefPtr<> conversion in legacy IndexedDB code.
403         https://bugs.webkit.org/show_bug.cgi?id=149558
404
405         Reviewed by Beth Dakin.
406
407         No new tests (No behavior change.)
408         
409         This patch does not attempt to completely remove all PassRefPtr usage inside legacy IDB.
410
411         It just switches over all PassRefPtr usage at the top level IDB interfaces that 
412         modern IDB is implementing.
413
414         The rest of the usage inside the legacy implementation can be dealt with later via `git rm`.
415
416         * Modules/indexeddb/IDBAny.h:
417         * Modules/indexeddb/IDBCursor.h:
418         * Modules/indexeddb/IDBDatabase.h:
419         * Modules/indexeddb/IDBDatabaseError.h:
420         * Modules/indexeddb/IDBFactory.h:
421         * Modules/indexeddb/IDBIndex.h:
422         * Modules/indexeddb/IDBObjectStore.h:
423         * Modules/indexeddb/IDBRequest.h:
424         * Modules/indexeddb/IDBTransaction.h:
425         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
426         (WebCore::IDBClient::IDBFactory::getDatabaseNames):
427         (WebCore::IDBClient::IDBFactory::open):
428         (WebCore::IDBClient::IDBFactory::deleteDatabase):
429         * Modules/indexeddb/client/IDBFactoryImpl.h:
430         * Modules/indexeddb/client/IDBRequestImpl.cpp:
431         (WebCore::IDBClient::IDBRequest::result):
432         (WebCore::IDBClient::IDBRequest::error):
433         (WebCore::IDBClient::IDBRequest::source):
434         (WebCore::IDBClient::IDBRequest::transaction):
435         * Modules/indexeddb/client/IDBRequestImpl.h:
436         * Modules/indexeddb/legacy/LegacyAny.cpp:
437         (WebCore::LegacyAny::createInvalid):
438         (WebCore::LegacyAny::createNull):
439         (WebCore::LegacyAny::createString):
440         (WebCore::LegacyAny::domStringList):
441         (WebCore::LegacyAny::idbCursor):
442         (WebCore::LegacyAny::idbCursorWithValue):
443         (WebCore::LegacyAny::idbDatabase):
444         (WebCore::LegacyAny::idbFactory):
445         (WebCore::LegacyAny::idbIndex):
446         (WebCore::LegacyAny::idbObjectStore):
447         (WebCore::LegacyAny::idbTransaction):
448         (WebCore::LegacyAny::LegacyAny):
449         * Modules/indexeddb/legacy/LegacyAny.h:
450         (WebCore::LegacyAny::create):
451         * Modules/indexeddb/legacy/LegacyCursor.cpp:
452         (WebCore::LegacyCursor::update):
453         (WebCore::LegacyCursor::deleteFunction):
454         * Modules/indexeddb/legacy/LegacyCursor.h:
455         * Modules/indexeddb/legacy/LegacyDatabase.cpp:
456         (WebCore::LegacyDatabase::objectStoreNames):
457         (WebCore::LegacyDatabase::createObjectStore):
458         (WebCore::LegacyDatabase::transaction):
459         * Modules/indexeddb/legacy/LegacyDatabase.h:
460         * Modules/indexeddb/legacy/LegacyFactory.cpp:
461         (WebCore::LegacyFactory::getDatabaseNames):
462         (WebCore::LegacyFactory::open):
463         (WebCore::LegacyFactory::deleteDatabase):
464         * Modules/indexeddb/legacy/LegacyFactory.h:
465         * Modules/indexeddb/legacy/LegacyIndex.cpp:
466         (WebCore::LegacyIndex::openCursor):
467         (WebCore::LegacyIndex::count):
468         (WebCore::LegacyIndex::openKeyCursor):
469         (WebCore::LegacyIndex::get):
470         (WebCore::LegacyIndex::getKey):
471         * Modules/indexeddb/legacy/LegacyIndex.h:
472         (WebCore::LegacyIndex::legacyObjectStore):
473         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
474         (WebCore::LegacyObjectStore::indexNames):
475         (WebCore::LegacyObjectStore::get):
476         (WebCore::LegacyObjectStore::add):
477         (WebCore::LegacyObjectStore::put):
478         (WebCore::LegacyObjectStore::deleteFunction):
479         (WebCore::LegacyObjectStore::clear):
480         (WebCore::LegacyObjectStore::createIndex):
481         (WebCore::LegacyObjectStore::index):
482         (WebCore::LegacyObjectStore::openCursor):
483         (WebCore::LegacyObjectStore::count):
484         * Modules/indexeddb/legacy/LegacyObjectStore.h:
485         (WebCore::LegacyObjectStore::keyPathAny):
486         (WebCore::LegacyObjectStore::transaction):
487         (WebCore::LegacyObjectStore::createIndex):
488         (WebCore::LegacyObjectStore::count):
489         * Modules/indexeddb/legacy/LegacyRequest.cpp:
490         (WebCore::LegacyRequest::result):
491         (WebCore::LegacyRequest::error):
492         (WebCore::LegacyRequest::source):
493         (WebCore::LegacyRequest::transaction):
494         (WebCore::LegacyRequest::onSuccess):
495         * Modules/indexeddb/legacy/LegacyRequest.h:
496         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
497         (WebCore::LegacyTransaction::objectStore):
498         * Modules/indexeddb/legacy/LegacyTransaction.h:
499         * inspector/InspectorIndexedDBAgent.cpp:
500
501 2015-09-25  Per Arne Vollan  <peavo@outlook.com>
502
503         [WinCairo] Incorrect position for windowless plugins.
504         https://bugs.webkit.org/show_bug.cgi?id=149524
505
506         Reviewed by Alex Christensen.
507
508         Added method to get graphics context HDC.
509
510         * platform/graphics/GraphicsContext.h:
511         * platform/graphics/win/GraphicsContextWin.cpp:
512         (WebCore::GraphicsContext::getWindowsContext):
513         (WebCore::GraphicsContext::hdc):
514         (WebCore::GraphicsContextPlatformPrivate::save):
515
516 2015-09-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
517
518         Fix the broken !ENABLE(STREAM_API) build
519         https://bugs.webkit.org/show_bug.cgi?id=149525
520
521         Reviewed by Darin Adler.
522
523         Removed some #ifdef ENABLE(STREAMS_API) to make build work when STREAMS_API is off.
524         This is a temporary fix.
525
526         * bindings/js/WebCoreJSClientData.h:
527         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
528         (WebCore::initNormalWorldClientData):
529
530 2015-09-25  Chris Dumez  <cdumez@apple.com>
531
532         Unreviewed, nit fix after r190229.
533
534         * dom/Range.cpp:
535         (WebCore::Range::insertNode):
536
537 2015-09-25  Commit Queue  <commit-queue@webkit.org>
538
539         Unreviewed, rolling out r190232 and r190236.
540         https://bugs.webkit.org/show_bug.cgi?id=149555
541
542         "It did not help" (Requested by cdumez on #webkit).
543
544         Reverted changesets:
545
546         "Unreviewed, roll out r187615 as it seems to have caused a ~1%
547         PLT regression."
548         http://trac.webkit.org/changeset/190232
549
550         "This started failing after this rollout:"
551         http://trac.webkit.org/changeset/190236
552
553 2015-09-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
554
555         Remove the need for DOMClass in case of JSBuiltinConstructor WebIDL
556         https://bugs.webkit.org/show_bug.cgi?id=149522
557
558         Reviewed by Darin Adler.
559
560         Adding generation of the dummy DOM class for JSBuiltinConstructor interfaces.
561         This is applied to CountQueuingStrategy.
562
563         Covered by existing tests of CountQueuingStrategy.
564
565         * Modules/streams/CountQueuingStrategy.h: Removed.
566         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
567         * WebCore.xcodeproj/project.pbxproj: Ditto.
568         * bindings/scripts/CodeGeneratorJS.pm:
569         (GenerateHeader): Removal of DOM class header include and generation of dummy class.
570         (GenerateImplementation): Removal of DOM class header include.
571         (UseDummyDOMClass): Helper routine.
572         (GenerateDummyDOMClassForJSBuiltin): Ditto.
573
574 2015-09-24  Brent Fulgham  <bfulgham@apple.com>
575
576         [Win] Support composited content in WebView render-to-context methods
577         https://bugs.webkit.org/show_bug.cgi?id=149516
578         <rdar://problem/22635080>
579
580         Reviewed by Simon Fraser.
581
582         Extend the CACFLayerTreeHost implementation to render into a passed
583         device context when requested. When no context is provided (the default
584         case) paint as normal.
585
586         Will be tested by existing compositing tests in a future bug. DumpRenderTree
587         has to be extended to do this painting properly.
588
589         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
590         (WebCore::CACFLayerTreeHost::paint): Accept an optional HDC argument, and
591         pass it to the render method.
592         * platform/graphics/ca/win/CACFLayerTreeHost.h:
593         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Add missing SOFT_LINK
594         command for the WKCACFViewDrawIntoDC.
595         (WebCore::WKCACFViewLayerTreeHost::paint): Accept optional HDC argument and
596         pass it to the parent class.
597         (WebCore::WKCACFViewLayerTreeHost::render): Accept new optional HDC argument.
598         If provided, call WKCACFViewDrawIntoDC. Otherwise, call WKCACFVIewDraw.
599         (WebCore::WKCACFViewLayerTreeHost::setShouldInvertColors):
600         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
601
602 2015-09-24  Chris Dumez  <cdumez@apple.com>
603
604         Drop [NotDeletable] from QuickTimePluginReplacement.postEvent()
605         https://bugs.webkit.org/show_bug.cgi?id=149547
606
607         Reviewed by Eric Carlson.
608
609         Drop [NotDeletable] from QuickTimePluginReplacement.postEvent(). It does
610         not appear to be needed and this is the last user of this non-standard
611         IDL attribute. This patch also drops support for this IDL attribute.
612
613         * Modules/plugins/QuickTimePluginReplacement.idl:
614         * bindings/scripts/CodeGeneratorJS.pm:
615         (ComputeFunctionSpecial):
616         * bindings/scripts/IDLAttributes.txt:
617
618 2015-09-24  Chris Dumez  <cdumez@apple.com>
619
620         Node.replaceChild() does not behave according to the specification
621         https://bugs.webkit.org/show_bug.cgi?id=149546
622         <rdar://problem/22571887>
623
624         Reviewed by Ryosuke Niwa.
625
626         Node.replaceChild() does not behave according to the specification. In
627         particular, when replacing |child| with |node| we are supposed to remove
628         |node| from its parent *before* removing |child| from its parent:
629         - https://dom.spec.whatwg.org/#concept-node-replace (Steps 10 & 11)
630
631         This patch reverses the order as per the specification. Our new behavior
632         matches Firefox's behavior. Note that this patch also remove an
633         optimization when replacing a child with its next sibling. This
634         optimization was observable from JS. It seems likely this case is not
635         common enough for it to be an issue. However, we can revisit if we see
636         it regresses things.
637
638         This leads to incorrect Mutation Records being queued in some cases.
639
640         No new tests, already covered by existing test.
641
642         * dom/ContainerNode.cpp:
643         (WebCore::ContainerNode::replaceChild):
644
645 2015-09-24  Chris Dumez  <cdumez@apple.com>
646
647         Unreviewed, roll out r187615 as it seems to have caused a ~1% PLT regression.
648         <rdar://problem/22657123>
649
650         * platform/graphics/FontCache.h:
651         (WebCore::FontDescriptionKey::makeFlagsKey):
652         * platform/graphics/FontCascade.cpp:
653         (WebCore::operator==):
654         (WebCore::makeFontSelectorFlags):
655         (WebCore::makeFontCascadeCacheKey):
656         (WebCore::computeFontCascadeCacheHash):
657
658 2015-09-24  David Hyatt  <hyatt@apple.com>
659
660         Keep the already-parsed list of terms in custom property values so that we don't have to re-parse them
661         later when doing variable resolution.
662         https://bugs.webkit.org/show_bug.cgi?id=149544
663
664         Reviewed by Dean Jackson.
665
666         * css/CSSComputedStyleDeclaration.cpp:
667         (WebCore::ComputedStyleExtractor::customPropertyValue):
668         (WebCore::ComputedStyleExtractor::customPropertyText):
669         Add a helper for getting the raw text. More closely parallels how non-custom properties work with the
670         extractor.
671
672         (WebCore::ComputedStyleExtractor::propertyValue):
673         Change propertyValue to use customPropertyText.
674
675         (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
676         Don't copy CSS custom properties into the style declaration. This is just used for things like editing, so
677         we didn't need to be putting the custom properties into this set.
678
679         (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
680         Patched to go straight to the serialized string value.
681
682         (WebCore::ComputedStyleExtractor::customPropertyValue): Deleted.
683         Replaced by customPropertyText.
684
685         * css/CSSComputedStyleDeclaration.h:
686         Rename customPropertyValue to customPropertyText and make it just return a String.
687
688         * css/CSSCustomPropertyValue.h:
689         (WebCore::CSSCustomPropertyValue::create):
690         (WebCore::CSSCustomPropertyValue::customCSSText):
691         (WebCore::CSSCustomPropertyValue::name):
692         (WebCore::CSSCustomPropertyValue::equals):
693         (WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
694         (WebCore::CSSCustomPropertyValue::value): Deleted.
695         Changed to hold both a CSSParserValueList, which it adopts from the CSSParser, and a string value that
696         is constructed lazily only if the value is serialized. Now the problematic serialization code will only
697         run if someone uses the CSS OM to trigger a serialization (this should be a rare occurrence, so perf
698         improves with this change).
699
700         * css/CSSGrammar.y.in:
701         Change parsing of custom properties to be identical to regular properties. This refactoring allows
702         us to simply invoke the parser from style declarations as well and makes everything behave more
703         similarly to normal property parsing.
704
705         * css/CSSParser.cpp:
706         (WebCore::CSSParser::parseValue):
707         (WebCore::CSSParser::parseCustomPropertyValue):
708         (WebCore::CSSParser::parseCustomPropertyDeclaration):
709         (WebCore::CSSParser::addCustomPropertyDeclaration): Deleted.
710         * css/CSSParser.h:
711         (WebCore::CSSParser::setCustomPropertyName):
712         We now have a method for parsing custom properties that can be invoked from style declarations. The
713         parser list is now adopted by the CSSCustomPropertyValue.
714
715         * css/CSSParserValues.cpp:
716         (WebCore::CSSParserValueList::toString):
717         Build the string serialization code right into CSSParserValueList.
718
719         * css/CSSParserValues.h:
720         Add a toString() method for serialization.
721
722         * css/StyleProperties.cpp:
723         (WebCore::MutableStyleProperties::setProperty):
724         (WebCore::MutableStyleProperties::setCustomProperty):
725         Changed to use the new CSSParser functions. This makes the code behave almost identically to regular
726         property parsing.
727
728         * css/StyleResolver.cpp:
729         (WebCore::StyleResolver::applyProperty):
730         * rendering/style/RenderStyle.h:
731         * rendering/style/StyleCustomPropertyData.h:
732         Change the mapping on RenderStyle to store the custom CSS values. This way we can get to the original
733         parser lists for each variable when it comes time to do variable resolution.
734
735 2015-09-24  Chris Dumez  <cdumez@apple.com>
736
737         Rewrite Range::insertNode() as per the latest DOM specification
738         https://bugs.webkit.org/show_bug.cgi?id=149528
739
740         Reviewed by Ryosuke Niwa.
741
742         Rewrite Range::insertNode() as per the latest DOM specification:
743         - https://dom.spec.whatwg.org/#concept-range-insert
744
745         Our previous implementation seemed outdated as we were failing a lot of
746         W3C tests that Firefox is passing.
747
748         No new tests, already covered by existing tests.
749
750         * dom/ContainerNode.cpp:
751         (WebCore::ContainerNode::ensurePreInsertionValidity):
752         (WebCore::checkPreReplacementValidity):
753         (WebCore::ContainerNode::insertBefore):
754         (WebCore::ContainerNode::replaceChild):
755         (WebCore::ContainerNode::appendChild):
756         * dom/ContainerNode.h:
757         * dom/Range.cpp:
758         (WebCore::Range::insertNode):
759         (WebCore::Range::surroundContents):
760         (WebCore::Range::toString): Deleted.
761         (WebCore::Range::toHTML): Deleted.
762         (WebCore::Range::text): Deleted.
763         (WebCore::Range::createContextualFragment): Deleted.
764         (WebCore::Range::detach): Deleted.
765         (WebCore::Range::absoluteBoundingBox): Deleted.
766         * dom/Range.h:
767
768 2015-09-24  Brent Fulgham  <bfulgham@apple.com>
769
770         [Win] Unreviewed build failure.
771
772         * bindings/js/WebCoreJSClientData.h: Make sure Streams API headers
773         are only included if the feature is on.
774
775 2015-09-24  Ryosuke Niwa  <rniwa@webkit.org>
776
777         Make event dispatching respect slotting
778         https://bugs.webkit.org/show_bug.cgi?id=149243
779
780         Reviewed by Antti Koivisto.
781
782         There are primarily two cases to consider: getting out of a shadow root to its host,
783         and moving into a slot from an assigned node.
784
785         When getting out of a shadow root, either the event originated in its shadow tree
786         including its nodes' shadow trees (1) or it moved into this shadow tree via a slot (2).
787         In (1), event.target should be set to the shadow host. In (2), it should be set to the
788         first node in the event path that belongs to the same tree as the shadow host. In order
789         to find such a node in O(1), we use a stack of event targets in each (shadow) tree. We
790         push event.target of the current tree whenever we move up to a slot from an assigned node
791         and pop it out of the stack when we move out of the shadow tree.
792
793         A follow up patch is needed to update the code to resolve related targets.
794
795         Tests: fast/shadow-dom/event-inside-shadow-tree.html
796                fast/shadow-dom/event-inside-slotted-node.html
797
798         * dom/EventDispatcher.cpp:
799         (WebCore::EventPath::EventPath):
800
801 2015-09-24  Chris Dumez  <cdumez@apple.com>
802
803         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum
804         https://bugs.webkit.org/show_bug.cgi?id=149532
805
806         Reviewed by Ryosuke Niwa.
807
808         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum as there is currently
809         no way to construct such Node in WebKit. This avoid having to handle this
810         Node type everywhere.
811
812         * bindings/gobject/WebKitDOMPrivate.cpp:
813         (WebKit::wrap): Deleted.
814         * bindings/objc/DOM.mm:
815         (kitClass): Deleted.
816         * dom/Document.cpp:
817         (WebCore::Document::importNode):
818         (WebCore::Document::adoptNode): Deleted.
819         (WebCore::Document::childTypeAllowed): Deleted.
820         (WebCore::Document::canAcceptChild): Deleted.
821         * dom/Node.cpp:
822         (WebCore::Node::dumpStatistics): Deleted.
823         (WebCore::Node::textContent): Deleted.
824         (WebCore::Node::ancestorElement): Deleted.
825         * dom/Node.h:
826         * dom/Range.cpp:
827         (WebCore::Range::checkNodeWOffset):
828         (WebCore::lengthOfContentsInNode): Deleted.
829         (WebCore::Range::processContentsBetweenOffsets): Deleted.
830         (WebCore::Range::surroundContents): Deleted.
831         * editing/MarkupAccumulator.cpp:
832         (WebCore::MarkupAccumulator::appendStartMarkup): Deleted.
833         * xml/XPathFunctions.cpp:
834         (WebCore::XPath::expandedNameLocalPart): Deleted.
835         * xml/XPathStep.cpp:
836         (WebCore::XPath::Step::nodesInAxis):
837         (WebCore::XPath::primaryNodeType): Deleted.
838         * xml/XPathUtil.cpp:
839         (WebCore::XPath::stringValue): Deleted.
840         (WebCore::XPath::isValidContextNode): Deleted.
841
842 2015-09-24  David Hyatt  <hyatt@apple.com>
843
844         Add support for CSS Custom Properties (in preparation for implementing CSS Variables).
845         https://bugs.webkit.org/show_bug.cgi?id=130397
846
847         Reviewed by Antti Koivisto.
848
849         Added new tests in fast/css/custom-properties.
850
851         * WebCore.xcodeproj/project.pbxproj:
852         Add new header files to the project (CSSCustomPropertyValue and StyleCustomPropertyData).
853
854         * css/CSSComputedStyleDeclaration.cpp:
855         (WebCore::ComputedStyleExtractor::customPropertyValue):
856         (WebCore::ComputedStyleExtractor::propertyValue):
857         If a custom property value is queried (i.e., it starts with "--"), then we use our
858         customPropertyValue lookup to go to the RenderStyle and fetch the appropriate custom property
859         value from the StyleCustomPropertyData.
860
861         (WebCore::CSSComputedStyleDeclaration::length):
862         (WebCore::CSSComputedStyleDeclaration::item):
863         Patched to include custom properties in the returned array. They appear at the end of the array
864         after the built-in properties.
865
866         (WebCore::ComputedStyleExtractor::propertyMatches):
867         Patched to check custom properties.
868
869         (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
870         Make sure the custom properties get copied into the StyleDeclaration.
871
872         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
873         (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
874         Patched to call customPropertyValue for custom properties.
875
876         * css/CSSComputedStyleDeclaration.h:
877         Add customPropertyValue() to ComputedStyleExtractor.
878
879         * css/CSSCustomPropertyValue.h: Added.
880         (WebCore::CSSCustomPropertyValue::create):
881         (WebCore::CSSCustomPropertyValue::equals):
882         (WebCore::CSSCustomPropertyValue::customCSSText):
883         (WebCore::CSSCustomPropertyValue::name):
884         (WebCore::CSSCustomPropertyValue::value):
885         (WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
886         Custom properties are parsed as a property with an ID of CSSPropertyCustom and a CSSCustomPropertyValue
887         that holds both the name and the value of the property. Ultimately we might want to just ditch property IDs in
888         favor of AtomicStrings for all properties, and then the need to special case custom properties would go
889         away. For now, though, this is the way we work custom properties into the existing system.
890
891         * css/CSSGrammar.y.in:
892         Add a production for recognizing custom properties and storing them using a property ID of CSSPropertyCustom
893         and a CSSCustomPropertyValue that has the name/value pair.
894
895         * css/CSSParser.cpp:
896         (WebCore::filterProperties):
897         Patched to track seen custom properties and to handle them correctly.
898
899         (WebCore::CSSParser::createStyleProperties):
900         Pass in a seenCustomProperties table to ensure we bail when encountering the same custom property twice.
901
902         (WebCore::CSSParser::addCustomPropertyDeclaration):
903         Called from the grammar production to create the CSSCustomPropertyValue.
904
905         (WebCore::isCustomPropertyIdentifier):
906         Recognize the -- custom property during lexing.
907
908         (WebCore::CSSParser::parseIdentifier):
909         Patched to return a CUSTOM_PROPERTY token when a custom property is identified.
910
911          * css/CSSParser.h:
912         (WebCore::isCustomPropertyName):
913         Add a helper function for asking if a property name is custom.
914
915         * css/CSSValue.cpp:
916         (WebCore::CSSValue::equals):
917         (WebCore::CSSValue::cssText):
918         (WebCore::CSSValue::destroy):
919         * css/CSSValue.h:
920         Patched to add support for CSSCustomPropertyValue.
921
922         * css/PropertySetCSSStyleDeclaration.cpp:
923         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
924         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
925         (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
926         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
927         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
928         Add code for handling custom properties in the CSS OM.
929
930         * css/StyleProperties.cpp:
931         (WebCore::StyleProperties::getPropertyValue):
932         (WebCore::StyleProperties::getCustomPropertyValue):
933         (WebCore::StyleProperties::getPropertyCSSValue):
934         (WebCore::StyleProperties::getCustomPropertyCSSValue):
935         (WebCore::MutableStyleProperties::removeProperty):
936         (WebCore::MutableStyleProperties::removeCustomProperty):
937         (WebCore::StyleProperties::propertyIsImportant):
938         (WebCore::StyleProperties::customPropertyIsImportant):
939         (WebCore::MutableStyleProperties::setProperty):
940         (WebCore::MutableStyleProperties::setCustomProperty):
941         (WebCore::MutableStyleProperties::addParsedProperty):
942         (WebCore::MutableStyleProperties::findPropertyIndex):
943         (WebCore::ImmutableStyleProperties::findCustomPropertyIndex):
944         (WebCore::MutableStyleProperties::findCustomPropertyIndex):
945         (WebCore::MutableStyleProperties::findCSSPropertyWithID):
946         (WebCore::MutableStyleProperties::findCustomCSSPropertyWithName):
947         (WebCore::StyleProperties::propertyMatches):
948         (WebCore::StyleProperties::PropertyReference::cssName):
949         * css/StyleProperties.h:
950         (WebCore::StyleProperties::findCustomPropertyIndex):
951         Patched to support handling custom properties in the CSS OM. We have to create equivalent methods that operate
952         on AtomicString propertyNames instead of on property IDs.
953
954         * css/StyleResolver.cpp:
955         (WebCore::StyleResolver::CascadedProperties::customProperties):
956         (WebCore::StyleResolver::styleForKeyframe):
957         (WebCore::StyleResolver::styleForPage):
958         (WebCore::StyleResolver::applyMatchedProperties):
959         (WebCore::StyleResolver::applyProperty):
960         (WebCore::StyleResolver::CascadedProperties::set):
961         (WebCore::StyleResolver::applyCascadedProperties):
962         The resolver has to hold a HashMap from AtomicStrings to Properties. It matches identically to how built-in
963         properties work except that an extensible table (HashMap) is used to hold the property data.
964
965         * css/makeprop.pl:
966         Patched to include the special CSSPropertyCustom value of 1 (just after the CSSPropertyInvalid id value but before the first
967         built-in property value).
968
969         * inspector/InspectorStyleSheet.cpp:
970         (WebCore::InspectorStyle::getText):
971         (WebCore::lowercasePropertyName):
972         (WebCore::InspectorStyle::populateAllProperties):
973         Patch inspector to not lowercase CSS custom property names, since they are case-sensitive.
974
975         * rendering/style/RenderStyle.h:
976         * rendering/style/StyleCustomPropertyData.h: Added.
977         (WebCore::StyleCustomPropertyData::create):
978         (WebCore::StyleCustomPropertyData::copy):
979         (WebCore::StyleCustomPropertyData::operator==):
980         (WebCore::StyleCustomPropertyData::operator!=):
981         (WebCore::StyleCustomPropertyData::setCustomPropertyValue):
982         (WebCore::StyleCustomPropertyData::getCustomPropertyValue):
983         (WebCore::StyleCustomPropertyData::hasCustomProperty):
984         (WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
985         * rendering/style/StyleRareInheritedData.cpp:
986         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
987         (WebCore::StyleRareInheritedData::operator==):
988         * rendering/style/StyleRareInheritedData.h:
989         The front end storage in the RenderStyle for custom properties. For now, custom properties are always inherited, so the
990         data is in StyleRareInheritedData.
991
992 2015-09-24  Chris Dumez  <cdumez@apple.com>
993
994         Optimize Range's lengthOfContentsInNode() for DocumentType Nodes
995         https://bugs.webkit.org/show_bug.cgi?id=149529
996
997         Reviewed by Darin Adler.
998
999         Optimize Range's lengthOfContentsInNode() for DocumentType Nodes:
1000         - https://dom.spec.whatwg.org/#concept-node-length
1001
1002         We currently call Node::countChildNodes() unnecessarily on DocumentType
1003         Nodes instead of simply returning 0.
1004
1005         * dom/Range.cpp:
1006         (WebCore::lengthOfContentsInNode):
1007         (WebCore::Range::processContents):
1008
1009 2015-09-24  ChangSeok Oh  <changseok.oh@collabora.com>
1010
1011         Unreviewed, fix typo errors in a comment ("passed" -> "Passed", "Overwise" -> "Otherwise")
1012
1013         * css/mediaControlsGtk.css:
1014
1015 2015-09-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1016
1017         Reduce almost uses of PassRefPtr in Webcore/testing
1018         https://bugs.webkit.org/show_bug.cgi?id=149449
1019
1020         Reviewed by Darin Adler.
1021
1022         This patch removes all uses of PassRefPtr except for Internals::serializeObject() and Internals::deserializeObject().
1023         It will be removed by upcoming patch.
1024
1025         * Modules/encryptedmedia/CDMSessionClearKey.cpp:
1026         (WebCore::CDMSessionClearKey::generateKeyRequest):
1027         * Modules/encryptedmedia/CDMSessionClearKey.h:
1028         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1029         (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
1030         * platform/graphics/CDMSession.h:
1031         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
1032         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest):
1033         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
1034         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
1035         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
1036         (WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
1037         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1038         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
1039         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
1040         * testing/InternalSettings.h:
1041         (WebCore::InternalSettings::create):
1042         * testing/Internals.cpp:
1043         (WebCore::Internals::create):
1044         (WebCore::Internals::computedStyleIncludingVisitedInfo):
1045         (WebCore::Internals::markerRangeForNode):
1046         (WebCore::Internals::rangeFromLocationAndLength):
1047         (WebCore::Internals::subrange):
1048         (WebCore::Internals::nodesFromRect):
1049         (WebCore::Internals::mallocStatistics):
1050         (WebCore::Internals::typeConversions):
1051         (WebCore::Internals::memoryInfo):
1052         (WebCore::Internals::serializeObject):
1053         (WebCore::Internals::deserializeBuffer):
1054         (WebCore::Internals::createTimeRanges):
1055         * testing/Internals.h:
1056         * testing/MallocStatistics.h:
1057         (WebCore::MallocStatistics::create):
1058         * testing/MemoryInfo.h:
1059         (WebCore::MemoryInfo::create):
1060         * testing/MockCDM.cpp:
1061         (WebCore::MockCDMSession::generateKeyRequest):
1062         * testing/TypeConversions.h:
1063         (WebCore::TypeConversions::create):
1064
1065 2015-09-24  Ryosuke Niwa  <rniwa@webkit.org>
1066
1067         Ran sort-Xcode-project-file.
1068
1069         * WebCore.xcodeproj/project.pbxproj:
1070
1071 2015-09-24  ChangSeok Oh  <changseok.oh@collabora.com>
1072
1073         [GTK] playbutton in media controls is not changed when it is clicked.
1074         https://bugs.webkit.org/show_bug.cgi?id=149113
1075
1076         Reviewed by Philippe Normand.
1077
1078         When the play button in media controls is clicked, a 'paused' class is added or removed
1079         for the element to update its appearance. Although Document::recalcStyle is triggered
1080         by that class attribute change, the play button is not changed since there is
1081         no difference in styles whether having the 'paused' class or not. Gtk port
1082         does not define the -webkit-media-controls-play-button.paused. To fix this,
1083         -webkit-media-controls-play-button.paused is newly defined with a dummy style,
1084         "position: relative;", which should not change the play button appearance,
1085         but be clearly different in style.
1086
1087         Test: media/media-controls-play-button-updates.html
1088
1089         * css/mediaControlsGtk.css:
1090         (video::-webkit-media-controls-play-button.paused):
1091
1092 2015-09-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1093
1094         Unreviewed. Fix GObject DOM API breaks after r190120.
1095
1096         EntityReference has been removed from the DOM spec. Generate an
1097         empy GObject implementation to keep API and ABI
1098         compatibility. also add a deprecated impementation for the methods
1099         using WebKitEntityReference.
1100
1101         * PlatformGTK.cmake: Do not generate bindings for EntityReference.idl.
1102         * bindings/gobject/WebKitDOMDeprecated.cpp:
1103         (webkit_dom_entity_reference_init):
1104         (webkit_dom_entity_reference_class_init):
1105         (webkit_dom_node_iterator_get_expand_entity_references):
1106         (webkit_dom_tree_walker_get_expand_entity_references):
1107         (webkit_dom_document_create_entity_reference):
1108         * bindings/gobject/WebKitDOMDeprecated.h:
1109         * bindings/gobject/WebKitDOMDeprecated.symbols:
1110         * bindings/scripts/CodeGeneratorGObject.pm:
1111         (SkipFunction): Remove FIXME.
1112         * dom/Document.idl: Do not generate createEntityReference for GObject.
1113         * dom/EntityReference.idl: Do not generate empty files for GObject.
1114
1115 2015-09-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1116
1117         [Streams API] Add support for JS builtins constructor
1118         https://bugs.webkit.org/show_bug.cgi?id=149497
1119
1120         Reviewed by Darin Adler.
1121
1122         Covered by existing tests.
1123
1124         Making CountQueuingStrategy fully JS built-in implemented.
1125         Adding support for calling a JS builtin initialization function just after creating the JSXX object.
1126         This JS function must be named initializeXX and be in XX.Js file.
1127         The JSBuiltinConstructor keyword is added to the binding generator.
1128
1129         * CMakeLists.txt: Adding CountQueuingStrategy.js, removing JSCountQueuingStrategyCustom.cpp.
1130         * DerivedSources.cpp: Ditto.
1131         * DerivedSources.make: Ditto.
1132         * Modules/streams/CountQueuingStrategy.h: Making CountQueuingStrategy a dummy class.
1133         (WebCore::CountQueuingStrategy::create):
1134         (WebCore::CountQueuingStrategy::~CountQueuingStrategy):
1135         (WebCore::CountQueuingStrategy::CountQueuingStrategy):
1136         * Modules/streams/CountQueuingStrategy.idl:
1137         * Modules/streams/CountQueuingStrategy.js: Added.
1138         (size):
1139         (initializeCountQueuingStrategy):
1140         * WebCore.vcxproj/WebCore.vcxproj: Removing JSCountQueuingStrategyCustom.cpp.
1141         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1142         * WebCore.xcodeproj/project.pbxproj: Ditto.
1143         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
1144         * bindings/js/JSCountQueuingStrategyCustom.cpp: Removed.
1145         * bindings/js/JSDOMBinding.cpp: Adding support for DOMConstructorJSBuiltinObject.
1146         (WebCore::callInitializeFunction):
1147         (WebCore::DOMConstructorJSBuiltinObject::visitChildren):
1148         * bindings/js/JSDOMBinding.h: Diitto.
1149         (WebCore::createFromJSBuiltin):
1150         (WebCore::DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject):
1151         * bindings/js/WebCoreJSClientData.h: Adding support for CQS builtins functions.
1152         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
1153         (WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins):
1154         * bindings/scripts/CodeGeneratorJS.pm:
1155         (GetJSBuiltinFunctionName):
1156         (GetFunctionName):
1157         (InstanceNeedsVisitChildren): Generating visitChildren method in case of JSBuiltinConstructor.
1158         (GetParentConstructorClassName): Refactoring to make JSXXConstructor derive from DOMConstructorJSBuiltinObject in case of JSBuiltinConstructor.
1159         (GenerateConstructorDeclaration): Ditto.
1160         (GenerateConstructorDefinition): Generate specific constructor in case of JSBuiltinConstructor.
1161         (GenerateConstructorHelperMethods): Refactoring to use Base class.
1162         (IsConstructable): Ditto.
1163         (ConstructorHasProperties): Deleted.
1164         * bindings/scripts/IDLAttributes.txt: Adding JSBuiltinConstructor.
1165         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1166         (WebCore::JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor):
1167         * bindings/scripts/test/JS/JSTestCallback.cpp:
1168         (WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
1169         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1170         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
1171         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1172         (WebCore::JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor):
1173         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1174         (WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor):
1175         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1176         (WebCore::JSTestEventTargetConstructor::JSTestEventTargetConstructor):
1177         * bindings/scripts/test/JS/JSTestException.cpp:
1178         (WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor):
1179         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1180         (WebCore::JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor):
1181         * bindings/scripts/test/JS/JSTestInterface.cpp:
1182         (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor):
1183         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1184         (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor):
1185         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1186         (WebCore::JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor):
1187         (WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
1188         * bindings/scripts/test/JS/JSTestNode.cpp:
1189         (WebCore::JSTestNodeConstructor::JSTestNodeConstructor):
1190         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1191         (WebCore::JSTestNondeterministicConstructor::JSTestNondeterministicConstructor):
1192         * bindings/scripts/test/JS/JSTestObj.cpp:
1193         (WebCore::JSTestObjConstructor::JSTestObjConstructor):
1194         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1195         (WebCore::JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor):
1196         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1197         (WebCore::JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor):
1198         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1199         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor):
1200         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1201         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
1202         * bindings/scripts/test/JS/JSattribute.cpp:
1203         (WebCore::JSattributeConstructor::JSattributeConstructor):
1204         * bindings/scripts/test/JS/JSreadonly.cpp:
1205         (WebCore::JSreadonlyConstructor::JSreadonlyConstructor):
1206
1207 2015-09-23  Chris Dumez  <cdumez@apple.com>
1208
1209         Simplify / Optimize Range::selectNode()
1210         https://bugs.webkit.org/show_bug.cgi?id=149515
1211
1212         Reviewed by Ryosuke Niwa.
1213
1214         Simplify / Optimize Range::selectNode():
1215         1. Do a null-check on refNode->parentNode() instead of checking the
1216            nodeType(), which is virtual. Attr, DocumentFragment and Document
1217            Nodes do not have a parent and thus are covered by this check.
1218            Also, setStartBefore() / setEndAfter() were already doing a null
1219            check on the parent.
1220         2. Call lower-level setStart() / setEnd() directly, instead of using
1221            setStartBefore() / setEndAfter() as intermediary. As a result:
1222            2.a. We avoid doing a redundant null checks on refNode and its parent
1223                 (inside those intermediate functions)
1224            2.b. We only call refNode->computeNodeIndex() once instead of twice
1225                 (in each of those intermediate functions). computeNodeIndex()
1226                 is not a trivial getter as its needs to traverse all the
1227                 previous siblings.
1228
1229         The implementation now matches exactly the text of the DOM specification
1230         as well:
1231         https://dom.spec.whatwg.org/#concept-range-select
1232
1233         No new layout tests, no web-exposed behavior intended.
1234
1235         * dom/Range.cpp:
1236         (WebCore::Range::selectNode):
1237
1238 2015-09-23  Myles C. Maxfield  <mmaxfield@apple.com>
1239
1240         [Cocoa] [Font Features] Implement font-variant-*
1241         https://bugs.webkit.org/show_bug.cgi?id=148413
1242
1243         Reviewed by Darin Adler.
1244
1245         This patch is the first pass of implementing of the font-variant-* properties. Specifically,
1246         these properties are:
1247         font-variant-ligatures
1248         font-variant-position
1249         font-variant-caps
1250         font-variant-numeric
1251         font-variant-alternates
1252         font-variant-east-asian
1253
1254         These new properties are held inside FontDescription as bit fields. At font creation time,
1255         we consult with the FontDescription to figure out which variants are specified. We then
1256         convert those variants to font features, and resolve these font features with the additional
1257         features specified by font-feature-settings (as the spec requires). This patch also makes
1258         our caches sensitive to these new properties of FontDescription so we don't look up cached,
1259         stale fonts.
1260
1261         The implementation has some caveats, however. They are listed here:
1262         1. These new properties need to interact correctly with @font-face declarations. In
1263         particular, only certain properties of the FontDescription should be considered when
1264         detecting if a @font-face declaration applies to a particular element. This discrimination
1265         does not happen correctly. In addition, any feature-specific CSS properties inside the
1266         @font-face declaration need to be consulted at a particular point during the feature
1267         resolve. This does not currently occur.
1268         2. One of the properties, font-variant-alternates, has a few values which require custom
1269         CSS functions, which makes modeling the properties as bit fields tricky. These extra values
1270         need to be implemented. This patch implements all the values which do not require extra CSS
1271         features.
1272         3. These new properties have a shorthand, font-variant, which is designed to be backward-
1273         compatible with CSS 2.1's concept of font-variant. In particular, CSS 2.1 allows you to use
1274         "normal" and "small-caps" with font-variant. Both of these values are values of the new
1275         property font-variant-caps. However, our existing implementation of small-caps does not
1276         use font features when they exist; instead, it simply draws text at a smaller font size and
1277         uses (effectively) text-transform to force capital letters. This implementation needs to be
1278         unified with the new font-variant-caps property so that we can expand font-variant to be
1279         a shorthand for the new properties.
1280         4. font-variant-position and font-variant-caps should provide appropriate synthesis if no
1281         matching font-feature exists.
1282         5. FontCascade::typesettingFeatures() is now no-longer accurate. Fixing this would be large
1283         enough to warrant its own patch.
1284         6. These properties are not tested with TrueType fonts.
1285
1286         Tests: css3/font-variant-all-webfont.html
1287                css3/font-variant-parsing.html
1288
1289         * css/CSSComputedStyleDeclaration.cpp: Reconstruct StyleProperties from a RenderStyle.
1290         (WebCore::appendLigaturesValue):
1291         (WebCore::fontVariantLigaturesPropertyValue):
1292         (WebCore::fontVariantPositionPropertyValue):
1293         (WebCore::fontVariantCapsPropertyValue):
1294         (WebCore::fontVariantNumericPropertyValue):
1295         (WebCore::fontVariantAlternatesPropertyValue):
1296         (WebCore::fontVariantEastAsianPropertyValue):
1297         (WebCore::ComputedStyleExtractor::propertyValue):
1298         * css/CSSFontFeatureValue.cpp: Update to FontFeatureTag instead of WTF::String.
1299         (WebCore::CSSFontFeatureValue::CSSFontFeatureValue):
1300         (WebCore::CSSFontFeatureValue::customCSSText):
1301         * css/CSSFontFeatureValue.h: Ditto.
1302         (WebCore::CSSFontFeatureValue::create):
1303         (WebCore::CSSFontFeatureValue::tag):
1304         * css/CSSParser.cpp: Parse the new properties according to the CSS3 fonts spec.
1305         (WebCore::isValidKeywordPropertyAndValue):
1306         (WebCore::isKeywordPropertyID):
1307         (WebCore::CSSParser::parseValue):
1308         (WebCore::CSSParser::parseFontFeatureTag):
1309         (WebCore::CSSParser::parseFontVariantLigatures):
1310         (WebCore::CSSParser::parseFontVariantNumeric):
1311         (WebCore::CSSParser::parseFontVariantEastAsian):
1312         * css/CSSParser.h:
1313         * css/CSSPrimitiveValueMappings.h: For the three properties which are simple keyword value
1314         properties, implement casting operators to automatically convert between RenderStyle
1315         objects and CSS property objects.
1316         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1317         (WebCore::CSSPrimitiveValue::operator FontVariantPosition):
1318         (WebCore::CSSPrimitiveValue::operator FontVariantCaps):
1319         (WebCore::CSSPrimitiveValue::operator FontVariantAlternates):
1320         * css/CSSPropertyNames.in: New properties.
1321         * css/CSSValueKeywords.in: New values.
1322         * css/StyleBuilderConverter.h:
1323         (WebCore::StyleBuilderConverter::convertFontFeatureSettings): Update to not use
1324         RefPtrs.
1325         * css/StyleBuilderCustom.h: Properties which are not simple keyword value properties are
1326         decomposed into multiple members of FontDescription. These properties exist to convert
1327         between these aggregate members and the CSS properties.
1328         (WebCore::StyleBuilderCustom::applyInheritFontVariantLigatures):
1329         (WebCore::StyleBuilderCustom::applyInitialFontVariantLigatures):
1330         (WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
1331         (WebCore::StyleBuilderCustom::applyInheritFontVariantNumeric):
1332         (WebCore::StyleBuilderCustom::applyInitialFontVariantNumeric):
1333         (WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
1334         (WebCore::StyleBuilderCustom::applyInheritFontVariantEastAsian):
1335         (WebCore::StyleBuilderCustom::applyInitialFontVariantEastAsian):
1336         (WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
1337         (WebCore::StyleBuilderCustom::applyInitialWebkitFontVariantLigatures): Deleted.
1338         (WebCore::StyleBuilderCustom::applyInheritWebkitFontVariantLigatures): Deleted.
1339         (WebCore::StyleBuilderCustom::applyValueWebkitFontVariantLigatures): Deleted.
1340         * editing/cocoa/HTMLConverter.mm:
1341         (HTMLConverter::computedAttributesForElement): Unprefix font-variant-ligatures.
1342         * platform/graphics/FontCache.h: Update cache to be sensitive to new state in
1343         FontDescription.
1344         (WebCore::FontDescriptionKey::FontDescriptionKey):
1345         (WebCore::FontDescriptionKey::operator==):
1346         (WebCore::FontDescriptionKey::computeHash):
1347         (WebCore::FontDescriptionKey::makeFlagsKey):
1348         (WebCore::FontDescriptionKey::makeFlagKey): Deleted.
1349         * platform/graphics/FontCascade.cpp:
1350         (WebCore::FontCascade::codePath): These new variants should trigger the complex text
1351         codepath.
1352         * platform/graphics/FontCascade.h:
1353         (WebCore::FontCascade::computeTypesettingFeatures): Update to use new state enum.
1354         * platform/graphics/FontDescription.cpp: Add state to hold new property values.
1355         (WebCore::FontDescription::FontDescription):
1356         (WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
1357         * platform/graphics/FontDescription.h: Add state to hold new property values.
1358         (WebCore::FontDescription::featureSettings):
1359         (WebCore::FontDescription::variantCommonLigatures):
1360         (WebCore::FontDescription::variantDiscretionaryLigatures):
1361         (WebCore::FontDescription::variantHistoricalLigatures):
1362         (WebCore::FontDescription::variantContextualAlternates):
1363         (WebCore::FontDescription::variantPosition):
1364         (WebCore::FontDescription::variantCaps):
1365         (WebCore::FontDescription::variantNumericFigure):
1366         (WebCore::FontDescription::variantNumericSpacing):
1367         (WebCore::FontDescription::variantNumericFraction):
1368         (WebCore::FontDescription::variantNumericOrdinal):
1369         (WebCore::FontDescription::variantNumericSlashedZero):
1370         (WebCore::FontDescription::variantAlternates):
1371         (WebCore::FontDescription::variantEastAsianVariant):
1372         (WebCore::FontDescription::variantEastAsianWidth):
1373         (WebCore::FontDescription::variantEastAsianRuby):
1374         (WebCore::FontDescription::variantSettings):
1375         (WebCore::FontDescription::setFeatureSettings):
1376         (WebCore::FontDescription::setVariantCommonLigatures):
1377         (WebCore::FontDescription::setVariantDiscretionaryLigatures):
1378         (WebCore::FontDescription::setVariantHistoricalLigatures):
1379         (WebCore::FontDescription::setVariantContextualAlternates):
1380         (WebCore::FontDescription::setVariantPosition):
1381         (WebCore::FontDescription::setVariantCaps):
1382         (WebCore::FontDescription::setVariantNumericFigure):
1383         (WebCore::FontDescription::setVariantNumericSpacing):
1384         (WebCore::FontDescription::setVariantNumericFraction):
1385         (WebCore::FontDescription::setVariantNumericOrdinal):
1386         (WebCore::FontDescription::setVariantNumericSlashedZero):
1387         (WebCore::FontDescription::setVariantAlternates):
1388         (WebCore::FontDescription::setVariantEastAsianVariant):
1389         (WebCore::FontDescription::setVariantEastAsianWidth):
1390         (WebCore::FontDescription::setVariantEastAsianRuby):
1391         (WebCore::FontDescription::operator==):
1392         (WebCore::FontCascadeDescription::initialVariantPosition):
1393         (WebCore::FontCascadeDescription::initialVariantCaps):
1394         (WebCore::FontCascadeDescription::initialVariantAlternates):
1395         (WebCore::FontCascadeDescription::commonLigaturesState): Deleted.
1396         (WebCore::FontCascadeDescription::discretionaryLigaturesState): Deleted.
1397         (WebCore::FontCascadeDescription::historicalLigaturesState): Deleted.
1398         (WebCore::FontCascadeDescription::setCommonLigaturesState): Deleted.
1399         (WebCore::FontCascadeDescription::setDiscretionaryLigaturesState): Deleted.
1400         (WebCore::FontCascadeDescription::setHistoricalLigaturesState): Deleted.
1401         (WebCore::FontCascadeDescription::operator==): Deleted.
1402         * platform/graphics/FontFeatureSettings.cpp: Update to use FontFeatureTag instead of
1403         WTF::String.
1404         (WebCore::FontFeature::FontFeature):
1405         (WebCore::FontFeature::operator==):
1406         (WebCore::FontFeature::operator<):
1407         (WebCore::FontFeatureSettings::hash):
1408         (WebCore::FontFeatureSettings::create): Deleted.
1409         * platform/graphics/FontFeatureSettings.h: Update to use FontFeatureTag instead of
1410         WTF::String.
1411         (WebCore::fontFeatureTag):
1412         (WebCore::FontFeatureTagHash::hash):
1413         (WebCore::FontFeatureTagHash::equal):
1414         (WebCore::FontFeatureTagHashTraits::constructDeletedValue):
1415         (WebCore::FontFeatureTagHashTraits::isDeletedValue):
1416         (WebCore::FontFeature::tag):
1417         (WebCore::FontFeatureSettings::operator==):
1418         (WebCore::FontFeatureSettings::begin):
1419         (WebCore::FontFeatureSettings::end):
1420         (WebCore::FontFeatureSettings::FontFeatureSettings): Deleted.
1421         * platform/graphics/cocoa/FontCacheCoreText.cpp: Ditto. Also, when computing font
1422         features, consult with the state inside FontDescription.
1423         (WebCore::tagEquals):
1424         (WebCore::appendTrueTypeFeature):
1425         (WebCore::appendOpenTypeFeature):
1426         (WebCore::computeFeatureSettingsFromVariants):
1427         (WebCore::preparePlatformFont):
1428         (WebCore::platformFontLookupWithFamily):
1429         (WebCore::fontWithFamily):
1430         (WebCore::FontCache::createFontPlatformData):
1431         (WebCore::FontCache::systemFallbackForCharacters):
1432         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: Update to use references instead of
1433         pointers.
1434         (WebCore::HarfBuzzShaper::setFontFeatures):
1435         * platform/graphics/mac/FontCacheMac.mm:
1436         (WebCore::platformFontWithFamily): Ditto.
1437         * platform/graphics/mac/FontCustomPlatformData.cpp:
1438         (WebCore::FontCustomPlatformData::fontPlatformData): Be sensitive to new state inside FontDescription.
1439         * platform/text/TextFlags.h:
1440         (WebCore::FontVariantSettings::isAllNormal): New state enums.
1441         * rendering/RenderThemeIOS.mm:
1442         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription): Be sensitive to new state inside
1443         FontDescription.
1444         * rendering/line/BreakingContext.h:
1445
1446 2015-09-23  Chris Dumez  <cdumez@apple.com>
1447
1448         Unreviewed, roll out r190085 as it seems to cause crashes in JSC
1449         <rdar://problem/22825602>
1450
1451         * bindings/scripts/CodeGeneratorJS.pm:
1452         (GenerateAttributesHashTable):
1453         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1454         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1455         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1456         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1457         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1458         * bindings/scripts/test/JS/JSTestException.cpp:
1459         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1460         * bindings/scripts/test/JS/JSTestInterface.cpp:
1461         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1462         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1463         * bindings/scripts/test/JS/JSTestNode.cpp:
1464         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1465         * bindings/scripts/test/JS/JSTestObj.cpp:
1466         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1467         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1468         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1469         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1470         * bindings/scripts/test/JS/JSattribute.cpp:
1471         * bindings/scripts/test/JS/JSreadonly.cpp:
1472
1473 2015-09-23  Chris Dumez  <cdumez@apple.com>
1474
1475         HTMLOutputElement.htmlFor should be settable
1476         https://bugs.webkit.org/show_bug.cgi?id=149418
1477
1478         Reviewed by Ryosuke Niwa.
1479
1480         HTMLOutputElement.htmlFor should be settable as per the latest HTML
1481         specification:
1482         - https://html.spec.whatwg.org/multipage/forms.html#the-output-element
1483
1484         It is supposed to call DOMSettableTokenList.setValue() with the input
1485         String. This patch adds support for this by adding [PutForwards=value]
1486         IDL extended attribute.
1487
1488         This aligns our behavior with the specification, Firefox and Chrome.
1489
1490         No new tests, already covered by existing test.
1491
1492         * html/AttributeDOMTokenList.cpp:
1493         (WebCore::AttributeDOMTokenList::AttributeDOMTokenList):
1494         (WebCore::AttributeDOMTokenList::attributeValueChanged):
1495         * html/AttributeDOMTokenList.h:
1496         - Have AttributeDOMTokenList subclass DOMSettableTokenList instead of
1497         DOMTokenList so that it can be used in places where the IDL expects
1498         us to return a DOMSettableTokenList (e.g. HTMLOutputElement.htmlFor).
1499         - Mark AttributeDOMTokenList as fast allocated.
1500
1501         * html/DOMSettableTokenList.cpp:
1502         (WebCore::DOMSettableTokenList::setValue):
1503         * html/DOMSettableTokenList.h:
1504         - Move setValue() from DOMTokenList to DOMSettableTokenList
1505           as it is only needed by DOMSettableTokenList.
1506         - Get rid of the factory function as all call sites are using
1507           AttributeDOMTokenList now.
1508         - Stop inheriting RefCounted as AttributeDOMTokenList handles its
1509           own refcounting.
1510
1511         * html/DOMTokenList.cpp:
1512         (WebCore::DOMTokenList::setValueInternal):
1513         * html/DOMTokenList.h:
1514         Rename setValue() to setValueInternal() as this version does not
1515         update the associated attribute value, only the tokens.
1516
1517         * html/HTMLLinkElement.cpp:
1518         * html/HTMLLinkElement.h:
1519         - Have HTMLLinkElement.sizes use an AttributeDOMTokenList instead of
1520           a DOMSettableTokenList as there is an associated attribute. The
1521           previous code had a bug has setting HTMLLinkElement.sizes would not
1522           update the associated 'sizes' attribute. Switching to using
1523           AttributeDOMTokenList fixes this and a new layout test has been added
1524           to cover this.
1525         - Create the AttributeDOMTokenList lazily to avoid updating it every
1526           time the sizes attribute changes until it is actually accessed.
1527
1528         * html/HTMLOutputElement.cpp:
1529         * html/HTMLOutputElement.h:
1530         - Have HTMLLinkElement.htmlFor use an AttributeDOMTokenList instead of
1531           a DOMSettableTokenList as there is an associated attribute.
1532         - Create the AttributeDOMTokenList lazily to avoid updating it every
1533           time the sizes attribute changes until it is actually accessed.
1534
1535         * html/HTMLOutputElement.idl:
1536         Add [PutForwards=value] on the htmlFor attribute, as per the
1537         HTML specification.
1538
1539 2015-09-23  Chris Dumez  <cdumez@apple.com>
1540
1541         TreeWalker.previousSibling()  / nextSibling() does not behave according to the specification
1542         https://bugs.webkit.org/show_bug.cgi?id=149493
1543
1544         Reviewed by Darin Adler.
1545
1546         TreeWalker.previousSibling()  / nextSibling() does not behave according
1547         to the specification:
1548         - https://dom.spec.whatwg.org/#dom-treewalker-nextsibling
1549         - https://dom.spec.whatwg.org/#dom-treewalker-previoussibling
1550         - https://dom.spec.whatwg.org/#concept-traverse-siblings
1551
1552         In particular, the previous code would fail to update 'node' variable
1553         in the case acceptNode() returned FILTER_REJECT. This patch fixes this
1554         and refactors the function to match more closely the text of the spec
1555         and avoid code duplication.
1556
1557         No new tests, already covered by existing test.
1558
1559         * dom/TreeWalker.cpp:
1560         (WebCore::TreeWalker::traverseSiblings):
1561         (WebCore::TreeWalker::previousSibling):
1562         (WebCore::TreeWalker::nextSibling):
1563         (WebCore::TreeWalker::previousNode): Deleted.
1564         * dom/TreeWalker.h:
1565
1566 2015-09-23  Alex Christensen  <achristensen@webkit.org>
1567
1568         Fix CMake build.
1569
1570         * CMakeLists.txt:
1571         Use {} instead of () for CMake variables.
1572
1573 2015-09-23  Tim Horton  <timothy_horton@apple.com>
1574
1575         Try to fix the CMake build.
1576
1577         * CMakeLists.txt:
1578
1579 2015-09-23  Tim Horton  <timothy_horton@apple.com>
1580
1581         Hopefully fix the production build.
1582
1583         * DerivedSources.make:
1584         * WebCore.vcxproj/build-generated-files.pl:
1585         * WebCore.xcodeproj/project.pbxproj:
1586         * generate-js-builtins:
1587         * make-generated-sources.sh:
1588
1589 2015-09-23  Ryosuke Niwa  <rniwa@webkit.org>
1590
1591         Mac production build fix attempt after r190155.
1592
1593         * WebCore.xcodeproj/project.pbxproj:
1594
1595 2015-09-23  Chris Dumez  <cdumez@apple.com>
1596
1597         Avoid unnecessary ancestor traversal in Range::selectNodeContents()
1598         https://bugs.webkit.org/show_bug.cgi?id=149491
1599
1600         Reviewed by Andreas Kling.
1601
1602         Avoid unnecessary ancestor traversal in Range::selectNodeContents().
1603         A DocumentType Node cannot have children, therefore, there is no need
1604         to check if ancestors are docTypes. We now simply check if the current
1605         node is a DocumentType Node, as per the specification:
1606         - https://dom.spec.whatwg.org/#dom-range-selectnodecontents (step 1)
1607
1608         * dom/Range.cpp:
1609         (WebCore::Range::selectNodeContents):
1610
1611 2015-09-23  Chris Dumez  <cdumez@apple.com>
1612
1613         Range's setStartBefore() / setStartAfter() / setEndBefore() / setEndAfter() do not match the specification
1614         https://bugs.webkit.org/show_bug.cgi?id=149490
1615
1616         Reviewed by Andreas Kling.
1617
1618         Range's setStartBefore() / setStartAfter() / setEndBefore() / setEndAfter()
1619         behavior do not match the DOM specification:
1620         - https://dom.spec.whatwg.org/#dom-range-setstartbefore
1621         - https://dom.spec.whatwg.org/#dom-range-setstartafter
1622         - https://dom.spec.whatwg.org/#dom-range-setendbefore
1623         - https://dom.spec.whatwg.org/#dom-range-setendafter
1624
1625         In particular, instead of step 2:
1626         "If parent is null, throw an InvalidNodeTypeError exception."
1627
1628         Our implementation was doing more checks and throwing exceptions in cases
1629         that the specification does not say we should. We were calling
1630         checkNodeBA() which had restrictions on both the node type and its
1631         root type. This is now replaced by a simple null check on the parent,
1632         as per the specification.
1633
1634         Firefox's behavior matches the specification.
1635
1636         No new tests, already covered by existing tests.
1637
1638         * dom/Range.cpp:
1639         (WebCore::Range::setStartAfter):
1640         (WebCore::Range::setEndBefore):
1641         (WebCore::Range::setEndAfter):
1642         (WebCore::Range::setStartBefore):
1643         (WebCore::Range::cloneRange): Deleted.
1644         (WebCore::Range::selectNode): Deleted.
1645         (WebCore::Range::selectNodeContents): Deleted.
1646         (WebCore::Range::absoluteTextRects): Deleted.
1647         * dom/Range.h:
1648
1649 2015-09-23  Commit Queue  <commit-queue@webkit.org>
1650
1651         Unreviewed, rolling out r190168.
1652         https://bugs.webkit.org/show_bug.cgi?id=149502
1653
1654         it broke debug builds. (Requested by zalan on #webkit).
1655
1656         Reverted changeset:
1657
1658         "HTMLOutputElement.htmlFor should be settable"
1659         https://bugs.webkit.org/show_bug.cgi?id=149418
1660         http://trac.webkit.org/changeset/190168
1661
1662 2015-09-23  Commit Queue  <commit-queue@webkit.org>
1663
1664         Unreviewed, rolling out r190160.
1665         https://bugs.webkit.org/show_bug.cgi?id=149501
1666
1667         media/media-controls-play-button-updates.html fails on
1668         Yosemite and EFL (Requested by zalan on #webkit).
1669
1670         Reverted changeset:
1671
1672         "[GTK] playbutton in media controls is not changed when it is
1673         clicked."
1674         https://bugs.webkit.org/show_bug.cgi?id=149113
1675         http://trac.webkit.org/changeset/190160
1676
1677 2015-09-23  Antti Koivisto  <antti@apple.com>
1678
1679         Try to fix build.
1680
1681         * css/DocumentRuleSets.h:
1682         * inspector/InspectorInstrumentation.h:
1683
1684 2015-09-23  Antti Koivisto  <antti@apple.com>
1685
1686         Fix sorting
1687
1688         * dom/DOMAllInOne.cpp:
1689
1690 2015-09-22  Antti Koivisto  <antti@apple.com>
1691
1692         Split author style code out from DocumentStyleSheetCollection
1693         https://bugs.webkit.org/show_bug.cgi?id=149446
1694
1695         Reviewed by Andreas Kling.
1696
1697         Shadow trees may have their own author style. Factor the related code out so we can use
1698         it outside the document context.
1699
1700         DocumentStyleSheetCollection is replaced by two classes:
1701
1702         AuthorStyleSheets - author stylesheets and mutation optimization code
1703         ExtensionStyleSheets - user stylesheets, injected author stylesheets, content extension stylesheets
1704
1705         * WebCore.xcodeproj/project.pbxproj:
1706         * contentextensions/ContentExtensionsBackend.cpp:
1707         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
1708         * css/CSSStyleSheet.cpp:
1709         (WebCore::CSSStyleSheet::didMutateRules):
1710         * css/DocumentRuleSets.cpp:
1711         (WebCore::DocumentRuleSets::~DocumentRuleSets):
1712         (WebCore::DocumentRuleSets::initUserStyle):
1713         * css/DocumentRuleSets.h:
1714         (WebCore::DocumentRuleSets::sibling):
1715         (WebCore::DocumentRuleSets::uncommonAttribute):
1716         * css/InspectorCSSOMWrappers.cpp:
1717         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheets):
1718         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
1719         (WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection): Deleted.
1720         * css/InspectorCSSOMWrappers.h:
1721         * css/StyleResolver.cpp:
1722         (WebCore::StyleResolver::StyleResolver):
1723         (WebCore::StyleResolver::appendAuthorStyleSheets):
1724         * css/StyleSheetList.cpp:
1725         (WebCore::StyleSheetList::styleSheets):
1726         (WebCore::StyleSheetList::detachFromDocument):
1727         (WebCore::StyleSheetList::length):
1728         * dom/AuthorStyleSheets.cpp: Added.
1729         (WebCore::AuthorStyleSheets::AuthorStyleSheets):
1730         (WebCore::AuthorStyleSheets::combineCSSFeatureFlags):
1731         (WebCore::AuthorStyleSheets::resetCSSFeatureFlags):
1732         (WebCore::AuthorStyleSheets::addAuthorSheet):
1733         (WebCore::AuthorStyleSheets::removePendingSheet):
1734         (WebCore::AuthorStyleSheets::addStyleSheetCandidateNode):
1735         (WebCore::AuthorStyleSheets::removeStyleSheetCandidateNode):
1736         (WebCore::AuthorStyleSheets::collectActiveStyleSheets):
1737         (WebCore::AuthorStyleSheets::analyzeStyleSheetChange):
1738         (WebCore::filterEnabledNonemptyCSSStyleSheets):
1739         (WebCore::AuthorStyleSheets::updateActiveStyleSheets):
1740         (WebCore::AuthorStyleSheets::activeStyleSheetsForInspector):
1741         (WebCore::AuthorStyleSheets::activeStyleSheetsContains):
1742         (WebCore::AuthorStyleSheets::detachFromDocument):
1743         * dom/AuthorStyleSheets.h: Added.
1744         (WebCore::AuthorStyleSheets::activeStyleSheets):
1745         (WebCore::AuthorStyleSheets::styleSheets):
1746         (WebCore::AuthorStyleSheets::styleSheetsForStyleSheetList):
1747         (WebCore::AuthorStyleSheets::pendingUpdateType):
1748         (WebCore::AuthorStyleSheets::setPendingUpdateType):
1749         (WebCore::AuthorStyleSheets::flushPendingUpdates):
1750         (WebCore::AuthorStyleSheets::preferredStylesheetSetName):
1751         (WebCore::AuthorStyleSheets::selectedStylesheetSetName):
1752         (WebCore::AuthorStyleSheets::setPreferredStylesheetSetName):
1753         (WebCore::AuthorStyleSheets::setSelectedStylesheetSetName):
1754         (WebCore::AuthorStyleSheets::addPendingSheet):
1755         (WebCore::AuthorStyleSheets::hasPendingSheets):
1756         (WebCore::AuthorStyleSheets::usesFirstLineRules):
1757         (WebCore::AuthorStyleSheets::usesFirstLetterRules):
1758         (WebCore::AuthorStyleSheets::usesRemUnits):
1759         (WebCore::AuthorStyleSheets::setUsesRemUnit):
1760         (WebCore::AuthorStyleSheets::usesStyleBasedEditability):
1761         (WebCore::AuthorStyleSheets::setUsesStyleBasedEditability):
1762         * dom/Document.cpp:
1763         (WebCore::Document::Document):
1764         (WebCore::Document::~Document):
1765         (WebCore::Document::setCompatibilityMode):
1766         (WebCore::Document::recalcStyle):
1767         (WebCore::Document::createStyleResolver):
1768         (WebCore::Document::fontsNeedUpdate):
1769         (WebCore::Document::usesStyleBasedEditability):
1770         (WebCore::Document::processHttpEquiv):
1771         (WebCore::Document::preferredStylesheetSet):
1772         (WebCore::Document::selectedStylesheetSet):
1773         (WebCore::Document::setSelectedStylesheetSet):
1774         (WebCore::Document::scheduleOptimizedStyleSheetUpdate):
1775         (WebCore::Document::styleResolverChanged):
1776         (WebCore::Document::haveStylesheetsLoaded):
1777         (WebCore::Document::getCachedLocale):
1778         * dom/Document.h:
1779         (WebCore::Document::authorStyleSheets):
1780         (WebCore::Document::extensionStyleSheets):
1781         (WebCore::Document::gotoAnchorNeededAfterStylesheetsLoad):
1782         (WebCore::Document::setGotoAnchorNeededAfterStylesheetsLoad):
1783         (WebCore::Document::styleSheetCollection): Deleted.
1784         * dom/DocumentStyleSheetCollection.cpp: Removed.
1785         * dom/DocumentStyleSheetCollection.h: Removed.
1786         * dom/ExtensionStyleSheets.cpp: Copied from Source/WebCore/dom/DocumentStyleSheetCollection.cpp.
1787         (WebCore::ExtensionStyleSheets::ExtensionStyleSheets):
1788         (WebCore::ExtensionStyleSheets::pageUserSheet):
1789         (WebCore::ExtensionStyleSheets::clearPageUserSheet):
1790         (WebCore::ExtensionStyleSheets::updatePageUserSheet):
1791         (WebCore::ExtensionStyleSheets::injectedUserStyleSheets):
1792         (WebCore::ExtensionStyleSheets::injectedAuthorStyleSheets):
1793         (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache):
1794         (WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache):
1795         (WebCore::ExtensionStyleSheets::addUserSheet):
1796         (WebCore::ExtensionStyleSheets::addDisplayNoneSelector):
1797         (WebCore::ExtensionStyleSheets::maybeAddContentExtensionSheet):
1798         (WebCore::ExtensionStyleSheets::styleResolverChangedTimerFired):
1799         (WebCore::ExtensionStyleSheets::detachFromDocument):
1800         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection): Deleted.
1801         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags): Deleted.
1802         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags): Deleted.
1803         (WebCore::DocumentStyleSheetCollection::pageUserSheet): Deleted.
1804         (WebCore::DocumentStyleSheetCollection::clearPageUserSheet): Deleted.
1805         (WebCore::DocumentStyleSheetCollection::updatePageUserSheet): Deleted.
1806         (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets): Deleted.
1807         (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets): Deleted.
1808         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache): Deleted.
1809         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache): Deleted.
1810         (WebCore::DocumentStyleSheetCollection::addAuthorSheet): Deleted.
1811         (WebCore::DocumentStyleSheetCollection::addUserSheet): Deleted.
1812         (WebCore::DocumentStyleSheetCollection::addDisplayNoneSelector): Deleted.
1813         (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet): Deleted.
1814         (WebCore::DocumentStyleSheetCollection::styleResolverChangedTimerFired): Deleted.
1815         (WebCore::DocumentStyleSheetCollection::removePendingSheet): Deleted.
1816         (WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode): Deleted.
1817         (WebCore::DocumentStyleSheetCollection::removeStyleSheetCandidateNode): Deleted.
1818         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets): Deleted.
1819         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange): Deleted.
1820         (WebCore::filterEnabledNonemptyCSSStyleSheets): Deleted.
1821         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Deleted.
1822         (WebCore::DocumentStyleSheetCollection::activeStyleSheetsForInspector): Deleted.
1823         (WebCore::DocumentStyleSheetCollection::activeStyleSheetsContains): Deleted.
1824         (WebCore::DocumentStyleSheetCollection::detachFromDocument): Deleted.
1825         * dom/ExtensionStyleSheets.h: Copied from Source/WebCore/dom/DocumentStyleSheetCollection.h.
1826         (WebCore::ExtensionStyleSheets::documentUserStyleSheets):
1827         (WebCore::DocumentStyleSheetCollection::styleSheetsForStyleSheetList): Deleted.
1828         (WebCore::DocumentStyleSheetCollection::activeAuthorStyleSheets): Deleted.
1829         (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets): Deleted.
1830         (WebCore::DocumentStyleSheetCollection::documentAuthorStyleSheets): Deleted.
1831         (WebCore::DocumentStyleSheetCollection::pendingUpdateType): Deleted.
1832         (WebCore::DocumentStyleSheetCollection::setPendingUpdateType): Deleted.
1833         (WebCore::DocumentStyleSheetCollection::flushPendingUpdates): Deleted.
1834         (WebCore::DocumentStyleSheetCollection::preferredStylesheetSetName): Deleted.
1835         (WebCore::DocumentStyleSheetCollection::selectedStylesheetSetName): Deleted.
1836         (WebCore::DocumentStyleSheetCollection::setPreferredStylesheetSetName): Deleted.
1837         (WebCore::DocumentStyleSheetCollection::setSelectedStylesheetSetName): Deleted.
1838         (WebCore::DocumentStyleSheetCollection::addPendingSheet): Deleted.
1839         (WebCore::DocumentStyleSheetCollection::hasPendingSheets): Deleted.
1840         (WebCore::DocumentStyleSheetCollection::usesFirstLineRules): Deleted.
1841         (WebCore::DocumentStyleSheetCollection::usesFirstLetterRules): Deleted.
1842         (WebCore::DocumentStyleSheetCollection::usesRemUnits): Deleted.
1843         (WebCore::DocumentStyleSheetCollection::setUsesRemUnit): Deleted.
1844         (WebCore::DocumentStyleSheetCollection::usesStyleBasedEditability): Deleted.
1845         (WebCore::DocumentStyleSheetCollection::setUsesStyleBasedEditability): Deleted.
1846         * dom/InlineStyleSheetOwner.cpp:
1847         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
1848         (WebCore::InlineStyleSheetOwner::removedFromDocument):
1849         (WebCore::InlineStyleSheetOwner::clearDocumentData):
1850         (WebCore::InlineStyleSheetOwner::childrenChanged):
1851         (WebCore::InlineStyleSheetOwner::createSheet):
1852         (WebCore::InlineStyleSheetOwner::sheetLoaded):
1853         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
1854         * dom/ProcessingInstruction.cpp:
1855         (WebCore::ProcessingInstruction::~ProcessingInstruction):
1856         (WebCore::ProcessingInstruction::nodeName):
1857         (WebCore::ProcessingInstruction::checkStyleSheet):
1858         (WebCore::ProcessingInstruction::sheetLoaded):
1859         (WebCore::ProcessingInstruction::insertedInto):
1860         (WebCore::ProcessingInstruction::removedFrom):
1861         * html/HTMLLinkElement.cpp:
1862         (WebCore::HTMLLinkElement::~HTMLLinkElement):
1863         (WebCore::HTMLLinkElement::insertedInto):
1864         (WebCore::HTMLLinkElement::removedFrom):
1865         (WebCore::HTMLLinkElement::addPendingSheet):
1866         (WebCore::HTMLLinkElement::removePendingSheet):
1867         * html/HTMLQuoteElement.cpp:
1868         * inspector/InspectorCSSAgent.cpp:
1869         (WebCore::InspectorCSSAgent::collectAllDocumentStyleSheets):
1870         (WebCore::InspectorCSSAgent::buildObjectForRule):
1871         * loader/DocumentLoader.cpp:
1872         (WebCore::DocumentLoader::commitData):
1873         * page/Page.cpp:
1874         (WebCore::Page::userStyleSheetLocationChanged):
1875         (WebCore::Page::setUserContentController):
1876         * page/PageGroup.cpp:
1877         * page/UserContentController.cpp:
1878         (WebCore::UserContentController::invalidateInjectedStyleSheetCacheInAllFrames):
1879         * rendering/RenderBlock.cpp:
1880         (WebCore::RenderBlock::lineHeight):
1881         (WebCore::RenderBlock::getFirstLetter):
1882         * rendering/RenderElement.cpp:
1883         (WebCore::RenderElement::uncachedFirstLineStyle):
1884         (WebCore::RenderElement::cachedFirstLineStyle):
1885         * rendering/RenderElement.h:
1886         (WebCore::RenderElement::firstLineStyle):
1887         (WebCore::RenderElement::setAncestorLineBoxDirty):
1888         * rendering/RenderInline.cpp:
1889         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
1890         (WebCore::RenderInline::lineHeight):
1891         * rendering/RenderLineBreak.cpp:
1892         (WebCore::RenderLineBreak::lineHeight):
1893         * rendering/RootInlineBox.cpp:
1894         (WebCore::RootInlineBox::verticalPositionForBox):
1895         * style/StyleResolveTree.cpp:
1896         (WebCore::Style::resolveLocal):
1897
1898 2015-09-23  Chris Dumez  <cdumez@apple.com>
1899
1900         HTMLOutputElement.htmlFor should be settable
1901         https://bugs.webkit.org/show_bug.cgi?id=149418
1902
1903         Reviewed by Ryosuke Niwa.
1904
1905         HTMLOutputElement.htmlFor should be settable as per the latest HTML
1906         specification:
1907         - https://html.spec.whatwg.org/multipage/forms.html#the-output-element
1908
1909         It is supposed to call DOMSettableTokenList.setValue() with the input
1910         String. This patch adds support for this by adding [PutForwards=value]
1911         IDL extended attribute.
1912
1913         This aligns our behavior with the specification, Firefox and Chrome.
1914
1915         No new tests, already covered by existing test.
1916
1917         * html/AttributeDOMTokenList.cpp:
1918         (WebCore::AttributeDOMTokenList::AttributeDOMTokenList):
1919         (WebCore::AttributeDOMTokenList::attributeValueChanged):
1920         * html/AttributeDOMTokenList.h:
1921         - Have AttributeDOMTokenList subclass DOMSettableTokenList instead of
1922         DOMTokenList so that it can be used in places where the IDL expects
1923         us to return a DOMSettableTokenList (e.g. HTMLOutputElement.htmlFor).
1924         - Mark AttributeDOMTokenList as fast allocated.
1925
1926         * html/DOMSettableTokenList.cpp:
1927         (WebCore::DOMSettableTokenList::setValue):
1928         * html/DOMSettableTokenList.h:
1929         - Move setValue() from DOMTokenList to DOMSettableTokenList
1930           as it is only needed by DOMSettableTokenList.
1931         - Get rid of the factory function as all call sites are using
1932           AttributeDOMTokenList now.
1933         - Stop inheriting RefCounted as AttributeDOMTokenList handles its
1934           own refcounting.
1935
1936         * html/DOMTokenList.cpp:
1937         (WebCore::DOMTokenList::setValueInternal):
1938         * html/DOMTokenList.h:
1939         Rename setValue() to setValueInternal() as this version does not
1940         update the associated attribute value, only the tokens.
1941
1942         * html/HTMLLinkElement.cpp:
1943         * html/HTMLLinkElement.h:
1944         - Have HTMLLinkElement.sizes use an AttributeDOMTokenList instead of
1945           a DOMSettableTokenList as there is an associated attribute. The
1946           previous code had a bug has setting HTMLLinkElement.sizes would not
1947           update the associated 'sizes' attribute. Switching to using
1948           AttributeDOMTokenList fixes this and a new layout test has been added
1949           to cover this.
1950         - Create the AttributeDOMTokenList lazily to avoid updating it every
1951           time the sizes attribute changes until it is actually accessed.
1952
1953         * html/HTMLOutputElement.cpp:
1954         * html/HTMLOutputElement.h:
1955         - Have HTMLLinkElement.htmlFor use an AttributeDOMTokenList instead of
1956           a DOMSettableTokenList as there is an associated attribute.
1957         - Create the AttributeDOMTokenList lazily to avoid updating it every
1958           time the sizes attribute changes until it is actually accessed.
1959
1960         * html/HTMLOutputElement.idl:
1961         Add [PutForwards=value] on the htmlFor attribute, as per the
1962         HTML specification.
1963
1964 2015-09-23  ChangSeok Oh  <changseok.oh@collabora.com>
1965
1966         [GTK] playbutton in media controls is not changed when it is clicked.
1967         https://bugs.webkit.org/show_bug.cgi?id=149113
1968
1969         Reviewed by Philippe Normand.
1970
1971         When the play button in media controls is clicked, a 'paused' class is added or removed
1972         for the element to update its appearance. Although Document::recalcStyle is triggered
1973         by that class attribute change, the play button is not changed since there is
1974         no difference in styles whether having the 'paused' class or not. Gtk port
1975         does not define the -webkit-media-controls-play-button.paused. To fix this,
1976         -webkit-media-controls-play-button.paused is newly defined with a dummy style,
1977         "position: relative;", which should not change the play button appearance,
1978         but be clearly different in style.
1979
1980         Test: media/media-controls-play-button-updates.html
1981
1982         * css/mediaControlsGtk.css:
1983         (video::-webkit-media-controls-play-button.paused):
1984
1985 2015-09-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1986
1987         [Streams API] Implement ReadableStream pipeThrough
1988         https://bugs.webkit.org/show_bug.cgi?id=147556
1989
1990         Reviewed by Darin Adler.
1991
1992         Adding initial support for JS builtins within WebCore.
1993         This patch allows implementing IDL interface methods in JS, by using the new JSBuiltin keyword.
1994         (No support yet for private identifiers, constructors or accessors).
1995         Integration of the built-in executables and names is implemented within WebCoreJSClientData.
1996         Two files are generated for each JS builtin file:
1997         - builtin h/cpp files similar to JSCBuiltins.cpp/.h, generated through WebCore/generate-js-builtins from JavaScriptCore/generate-js-builtins)
1998         - A builtin wrapper file mimicking BuiltinExecutables (generated from WebCore/generate-js-builtins)
1999         Contrary to JSC, each js file is generating its own cpp/h file.
2000         This allows including those files within the JSXX.cpp/.h files generated from the IDL where compilation guard may take effect.
2001
2002         Disabled GObject binding for JSBuiltin methods.
2003
2004         Test: streams/readable-stream-pipeThrough.html
2005
2006         * CMakeLists.txt: Triggering generate-js-builtins for JS files.
2007         * DerivedSources.make: Ditto.
2008         * ForwardingHeaders/builtins/BuiltinUtils.h: Added.
2009         * ForwardingHeaders/bytecode/UnlinkedFunctionExecutable.h: Added.
2010         * ForwardingHeaders/runtime/ConstructAbility.h: Added.
2011         * Modules/streams/ReadableStream.idl: Marking pipeThrough as JS builtin
2012         * Modules/streams/ReadableStream.js: Added.
2013         (pipeThrough):
2014         * bindings/js/JSReadableStreamCustom.cpp:
2015         * bindings/js/WebCoreJSClientData.h: Adding ReadableStreamBuiltinsWrapper to store ReadableStream builtin executable
2016         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
2017         (WebCore::WebCoreJSClientData::readableStreamBuiltins):
2018         (WebCore::initNormalWorldClientData):
2019         * bindings/scripts/CodeGeneratorGObject.pm: Disabled GObject binding for JSBuiltin methods.
2020         * bindings/scripts/CodeGeneratorJS.pm: Adding support for JSBuiltin keyword.
2021         (GetFunctionName):
2022         (GenerateHeader):
2023         (GenerateImplementation):
2024         (GenerateHashTableValueArray):
2025         (ComputeFunctionSpecial):
2026         (UseJSBuiltins):
2027         * bindings/scripts/IDLAttributes.txt: Adding JSBuiltin.
2028         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2029         (webkit_dom_test_obj_js_builtin_method):
2030         (webkit_dom_test_obj_js_builtin_method_with_args):
2031         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2032         * bindings/scripts/test/JS/JSTestObj.cpp:
2033         * bindings/scripts/test/JS/JSTestObj.h:
2034         * bindings/scripts/test/ObjC/DOMTestObj.h:
2035         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2036         (-[DOMTestObj jsBuiltinMethod]):
2037         (-[DOMTestObj jsBuiltinMethodWithArgs:strArg:objArg:]):
2038         * bindings/scripts/test/TestObj.idl:
2039         * generate-js-builtins: Added.
2040
2041 2015-09-22  Ryosuke Niwa  <rniwa@webkit.org>
2042
2043         Event fired on a detached node does not bubble up
2044         https://bugs.webkit.org/show_bug.cgi?id=149488
2045
2046         Reviewed by Antti Koivisto.
2047
2048         The bug was caused by an explicit check inside EventPath to match an old Firefox behavior (see r19897).
2049         Since Firefox's behavior has changed to match DOM4: https://dom.spec.whatwg.org/#concept-event-dispatch
2050
2051         Fixed the bug by removing the check. The new behavior matches DO4 and behaviors of Firefox and Chrome.
2052
2053         Test: fast/events/event-propagation-in-detached-tree.html
2054
2055         * dom/EventDispatcher.cpp:
2056         (WebCore::EventPath::EventPath):
2057
2058 2015-09-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2059
2060         Add a file of pointer-lock to cmake ports
2061         https://bugs.webkit.org/show_bug.cgi?id=149453
2062
2063         Reviewed by Csaba Osztrogonác.
2064
2065         Some cmake ports will be able to enable POINTER_LOCK. To support it,
2066         this patch adds PointerLockController.cpp, and fix a build break in WK2.
2067
2068         * CMakeLists.txt:
2069
2070 2015-09-22  Chris Dumez  <cdumez@apple.com>
2071
2072         Drop unnecessary ancestor traversal in Range::selectNode()
2073         https://bugs.webkit.org/show_bug.cgi?id=149482
2074
2075         Reviewed by Ryosuke Niwa.
2076
2077         Drop unnecessary ancestor traversal in Range::selectNode(). It traversed
2078         the ancestors to throw a INVALID_NODE_TYPE_ERR if one of them was a
2079         DocumentType Node. However, it is impossible for a DocumentType Node to
2080         have children.
2081
2082         * dom/Range.cpp:
2083         (WebCore::Range::selectNode):
2084
2085 2015-09-22  Brian Weinstein  <bweinstein@apple.com>
2086
2087         Error message in ContentExtensionError.cpp shouldn't have two spaces between sentences.
2088         https://bugs.webkit.org/show_bug.cgi?id=149479
2089
2090         Reviewed by Andy Estes.
2091
2092         * contentextensions/ContentExtensionError.cpp:
2093         (WebCore::ContentExtensions::contentExtensionErrorCategory):
2094
2095 2015-09-22  Chris Dumez  <cdumez@apple.com>
2096
2097         Range.surroundContents() should check for partially contained non-Text nodes first
2098         https://bugs.webkit.org/show_bug.cgi?id=149476
2099
2100         Reviewed by Darin Adler.
2101
2102         Range.surroundContents() should check for partially contained non-Text
2103         nodes first, before checking the type of the newParent parameter:
2104         - https://dom.spec.whatwg.org/#dom-range-surroundcontents (step 1 and 2)
2105
2106         Firefox and Chrome follow the specification.
2107
2108         No new tests, already covered by existing test.
2109
2110         * dom/Range.cpp:
2111         (WebCore::Range::surroundContents):
2112
2113 2015-09-22  Commit Queue  <commit-queue@webkit.org>
2114
2115         Unreviewed, rolling out r190134.
2116         https://bugs.webkit.org/show_bug.cgi?id=149481
2117
2118         "Seems to cause crashes during garbage collection" (Requested
2119         by cdumez on #webkit).
2120
2121         Reverted changeset:
2122
2123         "HTMLOutputElement.htmlFor should be settable"
2124         https://bugs.webkit.org/show_bug.cgi?id=149418
2125         http://trac.webkit.org/changeset/190134
2126
2127 2015-09-22  Chris Dumez  <cdumez@apple.com>
2128
2129         Range.intersectsNode() does not behave according to the specification when start / end are equal
2130         https://bugs.webkit.org/show_bug.cgi?id=148774
2131         <rdar://problem/22571418>
2132
2133         Reviewed by Darin Adler.
2134
2135         Range.intersectsNode() does not behave according to the specification
2136         when start / end are equal:
2137         https://dom.spec.whatwg.org/#dom-range-intersectsnode
2138
2139         The specification says:
2140         "If (parent, offset) is before end and (parent, offset + 1) is after
2141         start, return true."
2142
2143         However, the way we were detecting "is before end" and "is after start"
2144         was flawed in the case where start / end were equal. This is because when
2145         comparePoint() return 0, then it means that the node/offset is not only
2146         equal to start but also equal to end. As such, it is not "after start"
2147         / "before end".
2148
2149         No new tests, already covered by existing.
2150
2151         * dom/Range.cpp:
2152         (WebCore::Range::intersectsNode):
2153         (WebCore::highestAncestorUnderCommonRoot): Deleted.
2154
2155 2015-09-22  Chris Dumez  <cdumez@apple.com>
2156
2157         HTMLOutputElement.htmlFor should be settable
2158         https://bugs.webkit.org/show_bug.cgi?id=149418
2159
2160         Reviewed by Darin Adler.
2161
2162         HTMLOutputElement.htmlFor should be settable as per the latest HTML
2163         specification:
2164         - https://html.spec.whatwg.org/multipage/forms.html#the-output-element
2165
2166         It is supposed to call DOMSettableTokenList.setValue() with the input
2167         String. This patch adds support for this by adding [PutForwards=value]
2168         IDL extended attribute.
2169
2170         This aligns our behavior with the specification, Firefox and Chrome.
2171
2172         No new tests, already covered by existing test.
2173
2174         * accessibility/AccessibilityObject.cpp:
2175         (WebCore::AccessibilityObject::classList):
2176         * dom/Element.cpp:
2177         (WebCore::Element::classList):
2178         * dom/ElementRareData.h:
2179         (WebCore::ElementRareData::setClassList):
2180         * html/AttributeDOMTokenList.h:
2181         * html/DOMSettableTokenList.h:
2182         * html/HTMLAnchorElement.cpp:
2183         (WebCore::HTMLAnchorElement::relList):
2184         * html/HTMLAnchorElement.h:
2185         * html/HTMLLinkElement.cpp:
2186         (WebCore::HTMLLinkElement::relList):
2187         * html/HTMLLinkElement.h:
2188         * html/HTMLOutputElement.cpp:
2189         (WebCore::HTMLOutputElement::HTMLOutputElement):
2190         (WebCore::HTMLOutputElement::parseAttribute):
2191         (WebCore::HTMLOutputElement::childrenChanged): Deleted.
2192         * html/HTMLOutputElement.h:
2193         * html/HTMLOutputElement.idl:
2194
2195 2015-09-22  Filip Pizlo  <fpizlo@apple.com>
2196
2197         Get rid of ENABLE(GGC)
2198         https://bugs.webkit.org/show_bug.cgi?id=149472
2199
2200         Reviewed by Mark Hahnenberg and Mark Lam.
2201
2202         No new tests because no new behavior.
2203
2204         * bindings/js/JSDOMWindowBase.cpp:
2205         (WebCore::JSDOMWindowBase::commonVM):
2206
2207 2015-09-22  Tim Horton  <timothy_horton@apple.com>
2208
2209         Make it more obvious when using an unaccelerated image buffer, and fix a few callers who do
2210         https://bugs.webkit.org/show_bug.cgi?id=149428
2211
2212         Reviewed by Simon Fraser and Darin Adler.
2213
2214         * platform/graphics/ImageBuffer.cpp:
2215         (WebCore::ImageBuffer::createCompatibleBuffer):
2216         * platform/graphics/ImageBuffer.h:
2217         (WebCore::ImageBuffer::create):
2218         Make the RenderingMode parameter to ImageBuffer::create non-optional.
2219
2220         * platform/graphics/GraphicsContext.h:
2221         (WebCore::GraphicsContext::renderingMode):
2222         * platform/graphics/GraphicsTypes.h:
2223         Add renderingMode() getter so that every caller doesn't need to do the conversion to RenderingMode.
2224
2225         * css/CSSFilterImageValue.cpp:
2226         (WebCore::CSSFilterImageValue::image):
2227         * html/canvas/WebGLRenderingContextBase.cpp:
2228         (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
2229         * rendering/shapes/Shape.cpp:
2230         (WebCore::Shape::createRasterShape):
2231         * html/shadow/MediaControlElements.cpp:
2232         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
2233         * platform/graphics/cg/ImageBufferCG.cpp:
2234         (WebCore::ImageBuffer::putByteArray):
2235         These five callers create unconditionally unaccelerated ImageBuffers which
2236         should probably instead respect the acceleration bit from the context
2237         that the ImageBuffer will eventually be painted into. Bugs have been filed.
2238
2239         * html/HTMLCanvasElement.cpp:
2240         (WebCore::HTMLCanvasElement::createImageBuffer):
2241         * html/canvas/CanvasRenderingContext2D.cpp:
2242         (WebCore::CanvasRenderingContext2D::createCompositingBuffer):
2243         * platform/graphics/CrossfadeGeneratedImage.cpp:
2244         (WebCore::CrossfadeGeneratedImage::drawPattern):
2245         Adjust the argument order and remove defaults which are passed explicitly.
2246
2247         * page/FrameSnapshotting.cpp:
2248         (WebCore::snapshotFrameRect):
2249         Snapshots are (currently) meant to be taken without accelerated drawing.
2250         Make this explicit.
2251
2252         * platform/graphics/BitmapImage.cpp:
2253         (WebCore::BitmapImage::drawPattern):
2254         Make use of createCompatibleBuffer. This caller was previously creating
2255         an unconditionally unaccelerated context!
2256
2257         * platform/graphics/NamedImageGeneratedImage.cpp:
2258         (WebCore::NamedImageGeneratedImage::drawPattern):
2259         Remove a comment.
2260
2261         * platform/graphics/ShadowBlur.cpp:
2262         (WebCore::ScratchBuffer::getScratchBuffer):
2263         ShadowBlur is only used with unaccelerated contexts, so it's OK to hardcode Unaccelerated here.
2264
2265         * platform/graphics/filters/FilterEffect.cpp:
2266         (WebCore::FilterEffect::asImageBuffer):
2267         (WebCore::FilterEffect::createImageBufferResult):
2268         Flip the order of the arguments.
2269
2270         (WebCore::FilterEffect::openCLImageToImageBuffer):
2271         This caller was previously creating an unaccelerated buffer; instead, match the destination buffer.
2272
2273         * rendering/FilterEffectRenderer.cpp:
2274         (WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded):
2275         Adjust the argument order and remove defaults which are passed explicitly.
2276
2277         * rendering/RenderLayer.cpp:
2278         (WebCore::RenderLayer::calculateClipRects):
2279         Get rid of the unneeded renderingMode local, and factor out retrieval of Frame.
2280
2281         * rendering/svg/RenderSVGResourceClipper.cpp:
2282         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
2283         * rendering/svg/RenderSVGResourceMasker.cpp:
2284         (WebCore::RenderSVGResourceMasker::applyResource):
2285         These two callers are unconditionally creating unaccelerated buffers,
2286         and changing this to match the destination context seems to actually
2287         break things. This needs further investigation.
2288
2289         * rendering/svg/RenderSVGResourceGradient.cpp:
2290         (WebCore::createMaskAndSwapContextForTextGradient):
2291         This caller was previously creating an unaccelerated buffer; instead, match the destination buffer.
2292
2293         * rendering/svg/RenderSVGResourcePattern.cpp:
2294         (WebCore::RenderSVGResourcePattern::buildPattern):
2295         Make use of renderingMode().
2296
2297         * rendering/svg/SVGRenderingContext.cpp:
2298         (WebCore::SVGRenderingContext::createImageBuffer):
2299         Adjust the argument order.
2300
2301         * svg/graphics/SVGImage.cpp:
2302         (WebCore::SVGImage::nativeImageForCurrentFrame):
2303
2304 2015-09-22  Chris Dumez  <cdumez@apple.com>
2305
2306         XMLHttpRequest properties should be on the prototype
2307         https://bugs.webkit.org/show_bug.cgi?id=149465
2308
2309         Reviewed by Darin Adler.
2310
2311         Move most XMLHttpRequest properties to the prototype, as per the Web IDL
2312         specification. This should be web-compatible now that properties on the
2313         prototype are configurable after r190104.
2314
2315         The 'response' / 'responseText' properties are still incorrectly on the
2316         instance because they are currently using a [CustomGetter] in our IDL
2317         and the bindings generator currently does not move such properties to
2318         the prototype.
2319
2320         Test:
2321         fast/xmlhttprequest/xmlhttprequest-properties-prototype.html
2322         js/dom/xhr-prototype-define-property.html
2323
2324         * bindings/scripts/CodeGeneratorJS.pm:
2325         (InterfaceRequiresAttributesOnInstanceForCompatibility): Deleted.
2326
2327 2015-09-22  Chris Dumez  <cdumez@apple.com>
2328
2329         Drop support for legacy EntityReference DOM Node type
2330         https://bugs.webkit.org/show_bug.cgi?id=149348
2331
2332         Reviewed by Darin Adler.
2333
2334         Drop support for legacy EntityReference DOM Node type.
2335
2336         EntityReference has been dropped from the DOM specification:
2337         - https://dom.spec.whatwg.org/#dom-core-changes
2338
2339         EntityReference is not supported in Firefox:
2340         - https://developer.mozilla.org/en-US/docs/Web/API/EntityReference
2341         - https://developer.mozilla.org/en-US/docs/Web/API/NodeIterator.expandEntityReferences
2342         - https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker.expandEntityReferences
2343
2344         Chrome dropped support for EntityReference a while back (May 2013):
2345         - EntityReference: https://code.google.com/p/chromium/issues/detail?id=226628
2346         - NodeFilter / TreeWalker.expandEntityReferences:
2347           - https://groups.google.com/a/chromium.org/d/msg/blink-dev/-ZO3eja4maA/86T13XJwQpUJ
2348           - https://src.chromium.org/viewvc/blink?view=rev&revision=185771
2349
2350         IE also dropped support for EntityReference Nodes:
2351         https://msdn.microsoft.com/library/ff974819(v=vs.85).aspx (Remarks section)
2352
2353         No new tests, already covered by existing test.
2354
2355         * DerivedSources.cpp:
2356         * WebCore.vcxproj/WebCore.vcxproj:
2357         * WebCore.vcxproj/WebCore.vcxproj.filters:
2358         * WebCore.xcodeproj/project.pbxproj:
2359         * bindings/gobject/WebKitDOMPrivate.cpp:
2360         (WebKit::wrap): Deleted.
2361         * bindings/js/JSNodeCustom.cpp:
2362         (WebCore::createWrapperInline): Deleted.
2363         * bindings/objc/DOM.mm:
2364         (kitClass): Deleted.
2365         * bindings/scripts/CodeGeneratorGObject.pm:
2366         (SkipFunction): Skip webkit_dom_document_create_entity_reference until Carlos fixes it.
2367         * dom/Attr.cpp:
2368         (WebCore::Attr::childTypeAllowed):
2369         (WebCore::Attr::childrenChanged): Deleted.
2370         * dom/Attr.h:
2371         * dom/ContainerNode.cpp:
2372         (WebCore::checkAcceptChild): Deleted.
2373         (WebCore::checkAcceptChildGuaranteedNodeTypes): Deleted.
2374         (WebCore::ContainerNode::removeChild): Deleted.
2375         * dom/Document.cpp:
2376         (WebCore::Document::createEntityReference):
2377         (WebCore::Document::createNodeIterator):
2378         (WebCore::Document::createTreeWalker):
2379         (WebCore::Document::createEditingTextNode): Deleted.
2380         (WebCore::Document::importNode): Deleted.
2381         (WebCore::Document::adoptNode): Deleted.
2382         (WebCore::Document::scheduleForcedStyleRecalc): Deleted.
2383         (WebCore::Document::scheduleStyleRecalc): Deleted.
2384         (WebCore::Document::childTypeAllowed): Deleted.
2385         (WebCore::Document::canAcceptChild): Deleted.
2386         * dom/Document.h:
2387         * dom/Document.idl:
2388         * dom/DocumentFragment.cpp:
2389         (WebCore::DocumentFragment::childTypeAllowed): Deleted.
2390         * dom/Element.cpp:
2391         (WebCore::Element::childTypeAllowed): Deleted.
2392         * dom/EntityReference.cpp:
2393         (WebCore::EntityReference::EntityReference):
2394         * dom/EntityReference.h:
2395         * dom/EntityReference.idl:
2396         * dom/Node.cpp:
2397         (WebCore::Node::setNodeValue):
2398         (WebCore::Node::dumpStatistics): Deleted.
2399         (WebCore::Node::childNodes): Deleted.
2400         (WebCore::Node::lastDescendant): Deleted.
2401         (WebCore::Node::isDescendantOf): Deleted.
2402         (WebCore::Node::textContent): Deleted.
2403         (WebCore::Node::ancestorElement): Deleted.
2404         (WebCore::hashPointer): Deleted.
2405         * dom/Node.h:
2406         (WebCore::Node::isDocumentTypeNode): Deleted.
2407         * dom/NodeIterator.cpp:
2408         (WebCore::NodeIterator::NodeIterator):
2409         * dom/NodeIterator.h:
2410         (WebCore::NodeIterator::create):
2411         * dom/NodeIterator.idl:
2412         * dom/Range.cpp:
2413         (WebCore::Range::checkDeleteExtract):
2414         (WebCore::lengthOfContentsInNode): Deleted.
2415         (WebCore::Range::processContentsBetweenOffsets): Deleted.
2416         (WebCore::Range::insertNode): Deleted.
2417         (WebCore::Range::checkNodeWOffset): Deleted.
2418         (WebCore::Range::checkNodeBA): Deleted.
2419         (WebCore::Range::cloneRange): Deleted.
2420         (WebCore::Range::selectNode): Deleted.
2421         (WebCore::Range::selectNodeContents): Deleted.
2422         (WebCore::Range::surroundContents): Deleted.
2423         (WebCore::Range::shadowRoot): Deleted.
2424         (WebCore::Range::pastLastNode): Deleted.
2425         (WebCore::Range::absoluteBoundingBox): Deleted.
2426         (WebCore::Range::absoluteTextRects): Deleted.
2427         * dom/Range.h:
2428         * dom/ShadowRoot.cpp:
2429         (WebCore::ShadowRoot::childTypeAllowed): Deleted.
2430         * dom/Traversal.cpp:
2431         (WebCore::NodeIteratorBase::NodeIteratorBase):
2432         (WebCore::NodeIteratorBase::acceptNode): Deleted.
2433         * dom/Traversal.h:
2434         (WebCore::NodeIteratorBase::expandEntityReferences):
2435         * dom/TreeWalker.cpp:
2436         (WebCore::TreeWalker::TreeWalker):
2437         * dom/TreeWalker.h:
2438         (WebCore::TreeWalker::create):
2439         * dom/TreeWalker.idl:
2440         * editing/MarkupAccumulator.cpp:
2441         (WebCore::MarkupAccumulator::appendStartMarkup): Deleted.
2442         * xml/XPathUtil.cpp:
2443         (WebCore::XPath::isValidContextNode): Deleted.
2444
2445 2015-09-22  Eric Carlson  <eric.carlson@apple.com>
2446
2447         Unreviewed 32-bit Yosemite build fix.
2448
2449         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
2450         (WebCore::WebAudioSourceProviderAVFObjC::provideInput):
2451
2452 2015-09-22  Eric Carlson  <eric.carlson@apple.com>
2453
2454         [MediaStream Mac] implement WebAudioSourceProvider
2455         https://bugs.webkit.org/show_bug.cgi?id=149419
2456
2457         Reviewed by Darin Adler.
2458
2459         * Modules/mediastream/MediaStreamTrack.cpp:
2460         (WebCore::MediaStreamTrack::audioSourceProvider): New.
2461         * Modules/mediastream/MediaStreamTrack.h:
2462
2463         * Modules/webaudio/AudioContext.cpp:
2464         (WebCore::AudioContext::createMediaStreamSource): Rewrite.
2465
2466         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2467         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): We know the Vector
2468           size, so reserve capacity.
2469
2470         * Modules/webaudio/MediaStreamAudioSource.cpp:
2471         (WebCore::MediaStreamAudioSource::audioSourceProvider): Add.
2472         * Modules/webaudio/MediaStreamAudioSource.h:
2473         (WebCore::MediaStreamAudioSource::~MediaStreamAudioSource):
2474         (WebCore::MediaStreamAudioSource::deviceId):
2475         (WebCore::MediaStreamAudioSource::setDeviceId):
2476         (WebCore::MediaStreamAudioSource::useIDForTrackID): Deleted.
2477
2478         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
2479         (WebCore::MediaStreamAudioSourceNode::create): Context and track can't be null so take references.
2480         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode): Ditto.
2481         (WebCore::MediaStreamAudioSourceNode::~MediaStreamAudioSourceNode): Clear provider client.
2482         (WebCore::MediaStreamAudioSourceNode::setFormat): Create a resampler when necessary.
2483         (WebCore::MediaStreamAudioSourceNode::process): Process.
2484         (WebCore::MediaStreamAudioSourceNode::reset): Deleted.
2485         * Modules/webaudio/MediaStreamAudioSourceNode.h:
2486         (WebCore::MediaStreamAudioSourceNode::mediaStream):
2487         (WebCore::MediaStreamAudioSourceNode::audioSourceProvider): Deleted.
2488
2489         * WebCore.xcodeproj/project.pbxproj: Add WebAudioSourceProviderAVFObjC.cpp/h.
2490
2491         * platform/mediastream/MediaStreamTrackPrivate.cpp:
2492         (WebCore::MediaStreamTrackPrivate::audioSourceProvider): New, passthrough to source.
2493         * platform/mediastream/MediaStreamTrackPrivate.h:
2494         * platform/mediastream/RealtimeMediaSource.h:
2495         (WebCore::RealtimeMediaSource::audioSourceProvider):
2496
2497         * platform/mediastream/mac/AVAudioCaptureSource.h:
2498         * platform/mediastream/mac/AVAudioCaptureSource.mm:
2499         (WebCore::AVAudioCaptureSource::audioSourceProvider): New.
2500         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2501         * platform/mediastream/mac/AVMediaCaptureSource.h:
2502         * platform/mediastream/mac/AVMediaCaptureSource.mm:
2503         (WebCore::AVMediaCaptureSource::audioSourceProvider): Assert, this shouldn't be reachable.
2504
2505         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h: Added.
2506         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm: Added.
2507         (WebCore::WebAudioSourceProviderAVFObjC::create):
2508         (WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
2509         (WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
2510         (WebCore::WebAudioSourceProviderAVFObjC::startProducingData):
2511         (WebCore::WebAudioSourceProviderAVFObjC::stopProducingData):
2512         (WebCore::WebAudioSourceProviderAVFObjC::provideInput):
2513         (WebCore::WebAudioSourceProviderAVFObjC::setClient):
2514         (WebCore::operator==):
2515         (WebCore::operator!=):
2516         (WebCore::WebAudioSourceProviderAVFObjC::prepare):
2517         (WebCore::WebAudioSourceProviderAVFObjC::unprepare):
2518         (WebCore::WebAudioSourceProviderAVFObjC::process):
2519
2520 2015-09-22  sangdeug.kim  <sangdeug.kim@samsung.com>
2521
2522         CurrentTime on mediaController is set as 0 when playback is completed.
2523         https://bugs.webkit.org/show_bug.cgi?id=149154
2524
2525         Reviewed by Eric Carlson.
2526
2527         Test : media/media-controller-time-clamp.html
2528
2529         * html/MediaController.cpp:
2530         (MediaController::setCurrentTime):
2531         (MediaController::updatePlaybackState):
2532         * html/MediaController.h:
2533
2534 2015-09-22  Commit Queue  <commit-queue@webkit.org>
2535
2536         Unreviewed, rolling out r189616.
2537         https://bugs.webkit.org/show_bug.cgi?id=149456
2538
2539         suspected cause of multiple regressions (Requested by kling on
2540         #webkit).
2541
2542         Reverted changeset:
2543
2544         "[JSC] Weak should only accept cell pointees."
2545         https://bugs.webkit.org/show_bug.cgi?id=148955
2546         http://trac.webkit.org/changeset/189616
2547
2548 2015-09-22  Csaba Osztrogonác  <ossy@webkit.org>
2549
2550         Fix the all-in-one build with GCC
2551         https://bugs.webkit.org/show_bug.cgi?id=148428
2552
2553         Reviewed by Darin Adler.
2554
2555         Removed Source/WebCore/inspector/InspectorIndexedDBAgent.cpp from the all-in-one build.
2556
2557         * WebCore.vcxproj/WebCore.vcxproj:
2558         * inspector/InspectorAllInOne.cpp:
2559
2560 2015-09-22  Csaba Osztrogonác  <ossy@webkit.org>
2561
2562         Fix warnings in IDLParser.pm
2563         https://bugs.webkit.org/show_bug.cgi?id=149406
2564
2565         Reviewed by Alex Christensen.
2566
2567         * bindings/scripts/IDLParser.pm:
2568         (typeHasNullableSuffix):
2569         (typeRemoveNullableSuffix):
2570
2571 2015-09-22  Ryosuke Niwa  <rniwa@webkit.org>
2572
2573         invalidateSlotAssignments should trigger style recalc
2574         https://bugs.webkit.org/show_bug.cgi?id=149447
2575
2576         Reviewed by Antti Koivisto.
2577
2578         Invalidate the render tree of a shadow host when a new child is inserted, an existing child is removed,
2579         or slot attribute of a child is modified.
2580
2581         No new tests. Covered by existing tests added in r190101.
2582
2583         * dom/Element.cpp:
2584         (WebCore::Element::childrenChanged): Call invalidateSlotAssignments or invalidateDefaultSlotAssignments
2585         depending on the types of children being inserted or removed since text nodes can only be assigned into
2586         a default slot.
2587         * dom/ShadowRoot.cpp:
2588         (WebCore::ShadowRoot::invalidateSlotAssignments):
2589         (WebCore::ShadowRoot::invalidateDefaultSlotAssignments): Added.
2590         * dom/ShadowRoot.h:
2591         * dom/SlotAssignment.cpp:
2592         (WebCore::SlotAssignment::invalidate): Reconstruct the render tree for the whole host. We can optimize
2593         in the future by only invalidating active slot elements instead.
2594         (WebCore::SlotAssignment::invalidateDefaultSlot): Added.
2595         * dom/SlotAssignment.h:
2596
2597 2015-09-21  Chris Dumez  <cdumez@apple.com>
2598
2599         time element should use HTMLTimeElement interface
2600         https://bugs.webkit.org/show_bug.cgi?id=148840
2601         <rdar://problem/22586690>
2602
2603         Reviewed by Ryosuke Niwa.
2604
2605         Time element should be an instance of HTMLTimeElement instead of generic
2606         HTMLElement:
2607         https://html.spec.whatwg.org/multipage/semantics.html#the-time-element
2608
2609         Firefox exposes HTMLTimeElement. This patch aligns our behavior with
2610         the specification and Firefox.
2611
2612         No new tests, already covered by existing test.
2613
2614         * CMakeLists.txt:
2615         * DerivedSources.cpp:
2616         * DerivedSources.make:
2617         * WebCore.vcxproj/WebCore.vcxproj:
2618         * WebCore.vcxproj/WebCore.vcxproj.filters:
2619         * WebCore.xcodeproj/project.pbxproj:
2620         * html/HTMLElementsAllInOne.cpp:
2621         * html/HTMLTagNames.in:
2622         * html/HTMLTimeElement.cpp: Added.
2623         (WebCore::HTMLTimeElement::create):
2624         (WebCore::HTMLTimeElement::HTMLTimeElement):
2625         * html/HTMLTimeElement.h: Added.
2626         * html/HTMLTimeElement.idl: Added.
2627
2628 2015-09-21  Chris Dumez  <cdumez@apple.com>
2629
2630         DOM attributes on prototypes should be configurable
2631         https://bugs.webkit.org/show_bug.cgi?id=134364
2632
2633         Reviewed by Sam Weinig.
2634
2635         DOM attributes on prototypes should be configurable as per the Web IDL
2636         specification:
2637         https://heycam.github.io/webidl/#es-attributes
2638
2639         This patch aligns our behavior with the specification and Firefox.
2640
2641         Test: fast/dom/attributes-configurable.html
2642
2643         * bindings/scripts/CodeGeneratorJS.pm:
2644         (GenerateAttributesHashTable):
2645
2646 2015-09-21  Filip Pizlo  <fpizlo@apple.com>
2647
2648         Always use the compiler's CAS implementation and get rid of ENABLE(COMPARE_AND_SWAP)
2649         https://bugs.webkit.org/show_bug.cgi?id=149438
2650
2651         Reviewed by Mark Lam.
2652
2653         No new tests because no new behavior.
2654
2655         * platform/text/TextBreakIterator.cpp:
2656         (WebCore::compareAndSwapNonSharedCharacterBreakIterator):
2657         (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator):
2658
2659 2015-09-21  Timothy Horton  <timothy_horton@apple.com>
2660
2661         Allow DataDetectors to pre-filter telephone number menu items
2662         https://bugs.webkit.org/show_bug.cgi?id=149444
2663         <rdar://problem/19286320>
2664
2665         Reviewed by Sam Weinig.
2666
2667         * platform/spi/mac/DataDetectorsSPI.h:
2668         Add some SPI.
2669
2670 2015-09-21  Chris Dumez  <cdumez@apple.com>
2671
2672         Update HTMLTableRowElement.rowIndex to behave according to the specification
2673         https://bugs.webkit.org/show_bug.cgi?id=148842
2674         <rdar://problem/22586914>
2675
2676         Reviewed by Darin Adler.
2677
2678         Update HTMLTableRowElement.rowIndex to behave according to the
2679         specification:
2680         https://html.spec.whatwg.org/multipage/tables.html#dom-tr-rowindex
2681
2682         In particular, rowIndex no longer returns -1 for <tr> elements that are
2683         direct children of the table Element. Also,<tr> Elements in all <thead> /
2684         <tfoot> children of the table Element now get a rowIndex, as per the
2685         specification:
2686         - https://html.spec.whatwg.org/multipage/tables.html#dom-table-rows
2687
2688         Previously, only <tr> elements in the first <thead> and the first <tbody>
2689         children of the table would get a rowIndex.
2690
2691         Also, we now abort early and return -1 if the row is a grand-child of a
2692         table element but its direct parent is not a <thead> / <tbody> / <tfoot>.
2693         This avoid unnecessary traversal and matches the specification.
2694
2695         The code is refactored a bit to leverage HTMLTableElement.rows(), as
2696         per the specification:
2697         "return the index of the tr element in that table element's rows collection"
2698
2699         Previously, we would duplicate the table traversal logic. This
2700         simplifies the code and fixes a bug as the traversal logic was slightly
2701         different here and in HTMLTableRowsCollection. Because of this, only
2702         <tr> elements in the first <thead> / <tfoot> would get a rowIndex.
2703         Performance should be similar.
2704
2705         No new tests, already covered by existing test.
2706
2707         * html/HTMLTableRowElement.cpp:
2708         (WebCore::HTMLTableRowElement::rowIndex):
2709         (WebCore::HTMLTableRowElement::sectionRowIndex): Deleted.
2710         (WebCore::HTMLTableRowElement::insertCell): Deleted.
2711
2712 2015-09-21  Ryosuke Niwa  <rniwa@webkit.org>
2713
2714         Fix release builds with security assertion after r190007.
2715
2716         * dom/DocumentOrderedMap.cpp:
2717         * dom/DocumentOrderedMap.h:
2718
2719 2015-09-21  Gwang Yoon Hwang  <yoon@igalia.com>
2720
2721         [Threaded Compositor] Modified to use reference of GraphicsContext instead of pointer
2722         https://bugs.webkit.org/show_bug.cgi?id=149399
2723
2724         Reviewed by Darin Adler.
2725
2726         This fixes build failure after r189144
2727
2728         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2729         (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaint):
2730         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2731         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
2732         * platform/graphics/texmap/coordinated/CoordinatedSurface.h:
2733         * platform/graphics/texmap/coordinated/Tile.cpp:
2734         (WebCore::Tile::paintToSurfaceContext):
2735         * platform/graphics/texmap/coordinated/Tile.h:
2736         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
2737         * platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
2738
2739 2015-09-21  Ryosuke Niwa  <rniwa@webkit.org>
2740
2741         The binding for getDistributedNodes unnecessarily makes a vector of nodes
2742         https://bugs.webkit.org/show_bug.cgi?id=149434
2743
2744         Reviewed by Darin Adler.
2745
2746         Added a jsArray for const Vector<T*>* so that we can generate the binding code for getDistributedNodes()
2747         without having to create Vector<RefPtr<Node>> out of Vector<Node*>*.
2748
2749         * bindings/js/JSDOMBinding.h:
2750         (WebCore::jsArray): Added.
2751         * html/HTMLSlotElement.cpp:
2752         (WebCore::HTMLSlotElement::assignedNodes):
2753         (WebCore::HTMLSlotElement::getDistributedNodes): Deleted.
2754         * html/HTMLSlotElement.h:
2755         * html/HTMLSlotElement.idl:
2756
2757 2015-09-21  Brent Fulgham  <bfulgham@apple.com>
2758
2759         [Win] Show tiled drawing debug overlay on Windows
2760         https://bugs.webkit.org/show_bug.cgi?id=149426
2761
2762         Reviewed by Dean Jackson.
2763
2764         No new tests: No change in behavior.
2765
2766         * platform/graphics/ca/PlatformCALayer.cpp:
2767         (WebCore::PlatformCALayer::drawRepaintIndicator): Revise signature to accept
2768         a scale value and a font size.
2769         (WebCore::PlatformCALayer::drawTextAtPoint): Revise signature for new arguments.
2770         * platform/graphics/ca/PlatformCALayer.h:
2771         * platform/graphics/ca/TileGrid.cpp:
2772         (WebCore::TileGrid::drawTileMapContents): Removing scaling and text drawing code,
2773         and call common CALayer drawing routine.
2774         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2775         (WebCore::CACFLayerTreeHost::create): Switch to nullptr.
2776         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost): Switch to C++14 initializers.
2777         (WebCore::CACFLayerTreeHost::setPage): Added.
2778         (WebCore::CACFLayerTreeHost::rootLayer): Update debug info layer if requested by settings.
2779         (WebCore::CACFLayerTreeHost::layerTreeDidChange): Ditto.
2780         (WebCore::CACFLayerTreeHost::mainFrameTiledBacking): Added.
2781         (WebCore::CACFLayerTreeHost::updateDbugInfoLayer): Added.
2782         * platform/graphics/ca/win/CACFLayerTreeHost.h:
2783         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2784         (WebCore::PlatformCALayerWin::drawTextAtPoint): Revised signature for new arguments. Use
2785         argument for font size (rather than hard-coded '18'). Adjust font size by passed scale value.
2786         * platform/graphics/ca/win/PlatformCALayerWin.h:
2787
2788 2015-09-21  Chris Dumez  <cdumez@apple.com>
2789
2790         [JS Bindings] prototype.constructor should be writable
2791         https://bugs.webkit.org/show_bug.cgi?id=149412
2792         <rdar://problem/22545096>
2793
2794         Reviewed by Geoffrey Garen.
2795
2796         prototype.constructor should have the following properties:
2797         { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
2798
2799         as per the Web IDL specification:
2800         https://heycam.github.io/webidl/#interface-prototype-object
2801
2802         In WebKit, it is currently not writable. It is writable in Firefox.
2803
2804         Test: fast/events/event-prototype-constructor-properties.html
2805
2806         * bindings/scripts/CodeGeneratorJS.pm:
2807         (GenerateAttributesHashTable):
2808         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2809         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2810         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2811         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2812         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2813         * bindings/scripts/test/JS/JSTestException.cpp:
2814         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2815         * bindings/scripts/test/JS/JSTestInterface.cpp:
2816         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2817         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2818         * bindings/scripts/test/JS/JSTestNode.cpp:
2819         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2820         * bindings/scripts/test/JS/JSTestObj.cpp:
2821         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2822         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2823         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2824         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2825         * bindings/scripts/test/JS/JSattribute.cpp:
2826         * bindings/scripts/test/JS/JSreadonly.cpp:
2827
2828 2015-09-21  Antti Koivisto  <antti@apple.com>
2829
2830         HTMLSlotElement should render its assigned nodes
2831         https://bugs.webkit.org/show_bug.cgi?id=149242
2832
2833         Reviewed by Ryosuke Niwa.
2834
2835         Support rendering the assigned nodes under HTMLSlotElement.
2836
2837         * dom/SlotAssignment.cpp:
2838         (WebCore::SlotAssignment::assignSlots):
2839
2840             Move the empty slot finding to the loop as the hash table may mutate.
2841
2842         * html/HTMLSlotElement.cpp:
2843         (WebCore::HTMLSlotElement::attributeChanged):
2844         (WebCore::HTMLSlotElement::assignedNodes):
2845         (WebCore::HTMLSlotElement::getDistributedNodes):
2846         * html/HTMLSlotElement.h:
2847         * style/StyleResolveTree.cpp:
2848         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
2849         (WebCore::Style::attachSlot):
2850         (WebCore::Style::attachRenderTree):
2851         (WebCore::Style::detachChildren):
2852         (WebCore::Style::detachShadowRoot):
2853         (WebCore::Style::detachSlot):
2854         (WebCore::Style::detachRenderTree):
2855         (WebCore::Style::resolveChildren):
2856         (WebCore::Style::resolveSlot):
2857         (WebCore::Style::resolveTree):
2858
2859 2015-09-21  Tim Horton  <timothy_horton@apple.com>
2860
2861         svg/custom/hidpi-masking-clipping.svg fails with accelerated drawing on
2862         https://bugs.webkit.org/show_bug.cgi?id=149413
2863         <rdar://problem/22787058>
2864
2865         Reviewed by Dean Jackson.
2866
2867         No new tests, this is covered by existing tests.
2868
2869         * rendering/svg/RenderSVGResourcePattern.cpp:
2870         (WebCore::RenderSVGResourcePattern::buildPattern):
2871         (WebCore::RenderSVGResourcePattern::applyResource):
2872         (WebCore::RenderSVGResourcePattern::createTileImage):
2873         * rendering/svg/RenderSVGResourcePattern.h:
2874         Make pattern images respect the accelerated bit of the parent GraphicsContext.
2875
2876 2015-09-21  Chris Dumez  <cdumez@apple.com>
2877
2878         DOMTokenList.add() / remove() should run the update steps even if tokens were not modified
2879         https://bugs.webkit.org/show_bug.cgi?id=148780
2880         <rdar://problem/22571794>
2881
2882         Reviewed by Ryosuke Niwa.
2883
2884         DOMTokenList.add() / remove() should run the update steps even if tokens
2885         were not modified, as per the DOM specification:
2886         - https://dom.spec.whatwg.org/#dom-domtokenlist-add
2887         - https://dom.spec.whatwg.org/#dom-domtokenlist-remove
2888
2889         The update steps are specified at:
2890         - https://dom.spec.whatwg.org/#concept-DTL-update
2891
2892         This will have several side effects if the DOMTokenList has an associated
2893         attribute. It will overwrite the attribute value which will:
2894         1. Generate a Mutation event.
2895         2. Possibly change the attribute value as the new value is the "ordered
2896            set serializer for tokens". So it will get rid of extra spaces and
2897            duplicates in the attribute value.
2898
2899         Firefox already behaves according to the specification.
2900
2901         No new tests, already covered by existing tests.
2902
2903         * html/DOMTokenList.cpp:
2904         (WebCore::DOMTokenList::addInternal):
2905         (WebCore::DOMTokenList::removeInternal):
2906         (WebCore::DOMTokenList::remove): Deleted.
2907
2908 2015-09-21  Eric Carlson  <eric.carlson@apple.com>
2909
2910         [MediaStream] Clean up MediaStream private interfaces
2911         https://bugs.webkit.org/show_bug.cgi?id=149381
2912
2913         Reviewed by Jer Noble.
2914
2915         No new tests, no functional change.
2916
2917         * Modules/mediastream/MediaStream.cpp:
2918         (WebCore::MediaStream::create):
2919         (WebCore::MediaStream::MediaStream):
2920         (WebCore::MediaStream::clone):
2921         (WebCore::MediaStream::getTrackById):
2922         (WebCore::MediaStream::getAudioTracks):
2923         (WebCore::MediaStream::getVideoTracks):
2924         (WebCore::MediaStream::getTracks):
2925         (WebCore::MediaStream::activeStatusChanged):
2926         (WebCore::MediaStream::didAddTrack):
2927         (WebCore::MediaStream::didRemoveTrack):
2928         (WebCore::MediaStream::registry):
2929         (WebCore::MediaStream::trackVectorForType):
2930         (WebCore::MediaStream::didAddTrackToPrivate): Deleted.
2931         (WebCore::MediaStream::didRemoveTrackFromPrivate): Deleted.
2932         * Modules/mediastream/MediaStream.h:
2933
2934         * Modules/mediastream/MediaStreamRegistry.cpp:
2935         (WebCore::MediaStreamRegistry::lookup):
2936         (WebCore::MediaStreamRegistry::MediaStreamRegistry):
2937         * Modules/mediastream/MediaStreamRegistry.h:
2938
2939         * Modules/mediastream/MediaStreamTrack.cpp:
2940         (WebCore::MediaStreamTrack::MediaStreamTrack):
2941         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2942         (WebCore::MediaStreamTrack::kind):
2943         (WebCore::MediaStreamTrack::removeObserver):
2944         (WebCore::MediaStreamTrack::trackEnded):
2945         (WebCore::MediaStreamTrack::trackMutedChanged):
2946         (WebCore::MediaStreamTrack::trackStatesChanged):
2947         (WebCore::MediaStreamTrack::configureTrackRendering):
2948         * Modules/mediastream/MediaStreamTrack.h:
2949
2950         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2951         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsType):
2952         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load):
2953
2954         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.h:
2955         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.mm:
2956         (WebCore::MediaStreamPrivateAVFObjC::create):
2957         (WebCore::MediaStreamPrivateAVFObjC::MediaStreamPrivateAVFObjC):
2958
2959         * platform/mediastream/MediaStreamPrivate.cpp:
2960         (WebCore::MediaStreamPrivate::create):
2961         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
2962         (WebCore::MediaStreamPrivate::~MediaStreamPrivate):
2963         (WebCore::MediaStreamPrivate::tracks):
2964         (WebCore::MediaStreamPrivate::addTrack):
2965         (WebCore::MediaStreamPrivate::removeTrack):
2966         * platform/mediastream/MediaStreamPrivate.h:
2967         (WebCore::MediaStreamPrivateClient::~MediaStreamPrivateClient):
2968         (WebCore::MediaStreamPrivate::id):
2969         (WebCore::MediaStreamPrivate::active):
2970         (WebCore::MediaStreamPrivate::MediaStreamPrivate): Deleted.
2971         (WebCore::MediaStreamPrivate::~MediaStreamPrivate): Deleted.
2972
2973         * platform/mediastream/MediaStreamTrackPrivate.cpp:
2974         (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
2975         (WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
2976         (WebCore::MediaStreamTrackPrivate::addObserver):
2977         (WebCore::MediaStreamTrackPrivate::removeObserver):
2978         (WebCore::MediaStreamTrackPrivate::label):
2979         (WebCore::MediaStreamTrackPrivate::endTrack):
2980         (WebCore::MediaStreamTrackPrivate::sourceStopped):
2981         (WebCore::MediaStreamTrackPrivate::sourceMutedChanged):
2982         (WebCore::MediaStreamTrackPrivate::sourceStatesChanged):
2983         (WebCore::MediaStreamTrackPrivate::preventSourceFromStopping):
2984         * platform/mediastream/MediaStreamTrackPrivate.h:
2985         (WebCore::MediaStreamTrackPrivate::Observer::~Observer):
2986         (WebCore::MediaStreamTrackPrivate::ended):
2987         (WebCore::MediaStreamTrackPrivate::startProducingData):
2988         (WebCore::MediaStreamTrackPrivate::stopProducingData):
2989         (WebCore::MediaStreamTrackPrivate::setMuted):
2990         (WebCore::MediaStreamTrackPrivateClient::~MediaStreamTrackPrivateClient): Deleted.
2991         (WebCore::MediaStreamTrackPrivate::setClient): Deleted.
2992         (WebCore::MediaStreamTrackPrivate::client): Deleted.
2993
2994         * platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
2995         (WebCore::TrackSourceInfo::create):
2996         (WebCore::TrackSourceInfo::id):
2997         (WebCore::TrackSourceInfo::label):
2998         (WebCore::TrackSourceInfo::groupId):
2999         (WebCore::TrackSourceInfo::kind):
3000         (WebCore::TrackSourceInfo::TrackSourceInfo):
3001         (WebCore::TrackSourceInfo::deviceId): Deleted.
3002
3003         * platform/mediastream/RealtimeMediaSource.cpp:
3004         (WebCore::RealtimeMediaSource::RealtimeMediaSource):
3005         (WebCore::RealtimeMediaSource::reset):
3006         (WebCore::RealtimeMediaSource::setMuted):
3007         (WebCore::RealtimeMediaSource::statesDidChanged):
3008         (WebCore::RealtimeMediaSource::readonly):
3009         * platform/mediastream/RealtimeMediaSource.h:
3010         (WebCore::RealtimeMediaSource::id):
3011         (WebCore::RealtimeMediaSource::persistentId):
3012         (WebCore::RealtimeMediaSource::setPersistentId):
3013         (WebCore::RealtimeMediaSource::type):
3014         (WebCore::RealtimeMediaSource::stopped):
3015         * platform/mediastream/RealtimeMediaSourceCenter.h:
3016         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3017         (WebCore::AVCaptureDeviceManager::getSourcesInfo):
3018
3019         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
3020         (WebCore::RealtimeMediaSourceCenterMac::~RealtimeMediaSourceCenterMac):
3021         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
3022         (WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
3023         (WebCore::RealtimeMediaSourceCenterMac::getMediaStreamTrackSources):
3024         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
3025
3026         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
3027         (WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
3028         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
3029         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
3030
3031         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
3032         (WebCore::MockRealtimeMediaSourceCenter::registerMockRealtimeMediaSourceCenter):
3033         (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
3034         (WebCore::MockRealtimeMediaSourceCenter::createMediaStream):
3035         (WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources):
3036         * platform/mock/MockRealtimeMediaSourceCenter.h:
3037
3038 2015-09-21  Csaba Osztrogonác  <ossy@webkit.org>
3039
3040         Fix the !ENABLE(TEMPLATE_ELEMENT) build after r189945
3041         https://bugs.webkit.org/show_bug.cgi?id=149400
3042
3043         Reviewed by Darin Adler.
3044
3045         * xml/parser/XMLDocumentParserLibxml2.cpp:
3046         (WebCore::XMLDocumentParser::startElementNs):
3047
3048 2015-09-21  Chris Dumez  <cdumez@apple.com>
3049
3050         Range.cloneContents() / extractContents should throw a HierarchyRequestError when encountering a doctype
3051         https://bugs.webkit.org/show_bug.cgi?id=148770
3052         <rdar://problem/22570898>
3053
3054         Reviewed by Ryosuke Niwa.
3055
3056         Range.cloneContents() and Range.extractContents() should throw a
3057         HierarchyRequestError when encountering a doctype:
3058         - https://dom.spec.whatwg.org/#concept-range-clone (step 12)
3059         - https://dom.spec.whatwg.org/#concept-range-extract (step 12)
3060
3061         However, Range.deleteContents() should not:
3062         - https://dom.spec.whatwg.org/#dom-range-deletecontents
3063
3064         WebKit was not throwing in the Range.cloneContents() case. This
3065         aligns updates our behavior to match the specification and
3066         Firefox.
3067
3068         Tests: fast/dom/Range/clone-contents-document-type.html
3069                fast/dom/Range/delete-contents-document-type.html
3070                fast/dom/Range/extract-contents-document-type.html
3071
3072         * dom/Range.cpp:
3073         (WebCore::Range::processContentsBetweenOffsets):
3074
3075 2015-09-21  Tim Horton  <timothy_horton@apple.com>
3076
3077         UserMediaClientMock leaks every test run
3078         https://bugs.webkit.org/show_bug.cgi?id=149358
3079
3080         Reviewed by Eric Carlson.
3081
3082         * Modules/mediastream/UserMediaController.cpp:
3083         (WebCore::provideUserMediaTo):
3084         Make provideUserMediaTo operate unconditionally, just like all of the
3085         other similar functions, reverting r165733.
3086
3087         * Modules/mediastream/UserMediaController.h:
3088         * testing/Internals.cpp:
3089         (WebCore::Internals::Internals):
3090         Remove the existing UserMediaController supplement before installing a new one.
3091         This way, we're replacing it with the one Internals is trying to install,
3092         instead of leaking UserMediaClientMocks.
3093
3094 2015-09-21  Alex Christensen  <achristensen@webkit.org>
3095
3096         Generate WebCoreHeaderDetection.h with CMake on Windows
3097         https://bugs.webkit.org/show_bug.cgi?id=135861
3098
3099         Reviewed by Brent Fulgham.
3100
3101         This fixes many of the failing media tests.
3102
3103         * AVFoundationSupport.py:
3104         (lookFor):
3105         (fileContains):
3106         Use a command line parameter for the WebKitLibraries directory 
3107         to not require the WEBKIT_LIBRARIES environment variable with the CMake build.
3108         * DerivedSources.make:
3109         Pass WEBKIT_LIBRARIES as a command line parameter.
3110         * PlatformAppleWin.cmake:
3111         Added missing sources for video.
3112         * PlatformWin.cmake:
3113         Generate WebCoreHeaderDetection.h correctly and copy the media controls sources to WebKit.resources.
3114
3115 2015-09-21  ChangSeok Oh  <changseok.oh@collabora.com>
3116
3117         [GTK] media controls does not show up when playing video finishes.
3118         https://bugs.webkit.org/show_bug.cgi?id=149112
3119
3120         Reviewed by Philippe Normand.
3121
3122         GTK port does not show controls after playing video. This behavior is different
3123         from what Mac port does. They do show controls when playing video finishes.
3124         At least, we should update the timeline before showing it up not to show incorrect numbers
3125         when reappearing.
3126
3127         Test: media/media-controls-timeline-updates-after-playing.html
3128
3129         * Modules/mediacontrols/mediaControlsBase.js:
3130         (Controller.prototype.setPlaying):
3131         (Controller.prototype.showControls):
3132
3133 2015-09-21  ChangSeok Oh  <changseok.oh@collabora.com>
3134
3135         [GTK] timeline is not updated after few seconds when mouse hovers on controls
3136         https://bugs.webkit.org/show_bug.cgi?id=149111
3137
3138         Reviewed by Philippe Normand.
3139
3140         Timeline is not updated if controlsAreHidden is true. The problem here is that
3141         the function does not mean actually 'hidden' since it only checkes 'show' and 'hidden'
3142         class existences. The panel's visibility are not only controlled by the two classes,
3143         but also by video::-webkit-media-controls-panel:hover. The panel could be visible
3144         by setting the pseudo hover class. So we need to check if panel is hovered as well in controlsAreHidden().
3145
3146         Test: media/media-controls-timeline-updates-when-hovered.html
3147
3148         * Modules/mediacontrols/mediaControlsBase.js:
3149         (Controller.prototype.controlsAreHidden):
3150
3151 2015-09-21  Michael Catanzaro  <mcatanzaro@igalia.com>
3152
3153         [GTK] REGRESSION(188031): ASSERTION FAILED: menu
3154         https://bugs.webkit.org/show_bug.cgi?id=149379
3155
3156         Reviewed by Carlos Garcia Campos.
3157
3158         Remove assert that no longer makes sense.
3159
3160         * platform/gtk/ContextMenuGtk.cpp:
3161         (WebCore::ContextMenu::setPlatformDescription): Deleted.
3162
3163 2015-09-20  Chris Dumez  <cdumez@apple.com>
3164
3165         Unreviewed attempt to fix GTK build after r190030.
3166
3167         * bindings/gobject/WebKitDOMCustom.cpp:
3168         (webkit_dom_html_link_element_set_sizes):
3169
3170 2015-09-20  Chris Dumez  <cdumez@apple.com>
3171
3172         Unreviewed, another GTK build fix after r190017.
3173
3174         * bindings/scripts/CodeGeneratorGObject.pm:
3175         (IsPropertyWriteable):
3176         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3177         (webkit_dom_test_obj_class_init):
3178         (webkit_dom_test_obj_set_property): Deleted.
3179
3180 2015-09-20  Chris Dumez  <cdumez@apple.com>
3181
3182         Unreviewed attempt to fix the GTK build after r190017.
3183
3184         * bindings/scripts/CodeGeneratorGObject.pm:
3185         (SkipFunction):
3186
3187 2015-09-20  Chris Dumez  <cdumez@apple.com>
3188
3189         Pass JSC::ExecState to the custom bindings by reference
3190         https://bugs.webkit.org/show_bug.cgi?id=149393
3191
3192         Reviewed by Sam Weinig.
3193
3194         Pass JSC::ExecState to the custom bindings by reference instead of by
3195         pointer as it is expected to be non-null.
3196
3197 2015-09-20  Chris Dumez  <cdumez@apple.com>
3198
3199         Regression(r190023): fast/dom/navigation-with-sideeffects-crash.html is crashing
3200         https://bugs.webkit.org/show_bug.cgi?id=149392
3201
3202         Reviewed by Alexey Proskuryakov.
3203
3204         In the generated code for [PutForwards=xxx], make sure the forwarded
3205         implementation object is ref'd before calling toString() as toString()
3206         can be overridden by JS and cause the object to get deref'd / destroyed.
3207
3208         No new tests, already covered by existing test.
3209
3210         * bindings/scripts/CodeGeneratorJS.pm:
3211         (GenerateImplementation):
3212         * bindings/scripts/test/JS/JSTestObj.cpp:
3213         (WebCore::setJSTestObjPutForwardsAttribute):
3214         (WebCore::setJSTestObjPutForwardsNullableAttribute):
3215
3216 2015-09-19  Chris Dumez  <cdumez@apple.com>
3217
3218         Get rid of custom bindings for HTMLLinkElement.sizes setter
3219         https://bugs.webkit.org/show_bug.cgi?id=149382
3220
3221         Reviewed by Sam Weinig.
3222
3223         Get rid of custom bindings for HTMLLinkElement.sizes setter by leveraging
3224         the new [PutForwards=xxx] Web IDL extended attribute, as per the HTML
3225         specification:
3226         - https://html.spec.whatwg.org/#htmllinkelement
3227
3228         Also add FIXME comments in our IDL for various attributes that should be
3229         using [PutForwards=xxx] according to the HTML specification but are not
3230         currently. Those were not updated in this patch because it will subtly
3231         change their web-exposed behavior.
3232
3233         No new tests, no intended web-exposed behavior change. However, one side
3234         effect of the change is that the attribtue has moved to the prototype.
3235         Our bindings generator was keeping this attribute on the instance because
3236         it has a custom setter.
3237         Bindings tests coverage was extended.
3238
3239         * CMakeLists.txt:
3240         * WebCore.vcxproj/WebCore.vcxproj:
3241         * WebCore.vcxproj/WebCore.vcxproj.filters:
3242         * WebCore.xcodeproj/project.pbxproj:
3243         * bindings/js/JSBindingsAllInOne.cpp:
3244         * bindings/js/JSHTMLLinkElementCustom.cpp: Removed.
3245         Drop custom bindings for HTMLLinkElement.sizes setter.
3246
3247         * bindings/scripts/CodeGeneratorJS.pm:
3248         (GenerateImplementation):
3249         - Stop passing an extra isNull argument to getters of nullable attributes
3250           that have a wrapper type. These can return a null pointer so there is
3251           no need for an extra argument.
3252         - When [PutForwards=xxx] is used, only do the null-check on the attribute
3253           getter if the attribute is marked as nullable. If the attribute is not
3254           marked as nullable, the implementation is expected to return a C++
3255           reference, otherwise a raw pointer. This was needed because
3256           HTMLLinkElement::sizes() returns a reference as it can never return
3257           null.
3258
3259         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3260         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3261         * bindings/scripts/test/JS/JSTestObj.cpp:
3262         * bindings/scripts/test/ObjC/DOMTestObj.h:
3263         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3264         * bindings/scripts/test/TestObj.idl:
3265         Add bindings tests coverage for using [PutForwards=xxx] on a
3266         nullable attribute.
3267
3268         * dom/Document.idl:
3269         Mark Document.location as nullable as per the specification. The
3270         implementation returns a raw pointer and can return null. The
3271         bindings generator expects a raw pointer and will do a null check
3272         on it.
3273
3274         * html/HTMLAnchorElement.idl:
3275         * html/HTMLAreaElement.idl:
3276         * html/HTMLElement.idl:
3277         * html/HTMLIFrameElement.idl:
3278         * html/HTMLOutputElement.idl:
3279         * html/HTMLTableCellElement.idl:
3280         Add FIXME comments for attributes that are supposed to use
3281         [PutForwards=xxx] as per the HTML specification but currently don't.
3282
3283         * html/HTMLLinkElement.idl:
3284         Use [PutForwards=value] for the 'sizes' attribute, as per the
3285         specification and stop using a custom setter.
3286
3287 2015-09-20  Chris Dumez  <cdumez@apple.com>
3288
3289         [CallWith=ScriptState] should pass ExecState to the implementation by reference
3290         https://bugs.webkit.org/show_bug.cgi?id=149378
3291
3292         Reviewed by Sam Weinig.
3293
3294         [CallWith=ScriptState] should pass ExecState to the implementation by
3295         reference instead of pointer, as it is expected to be non-null.
3296
3297         Also rename the ExecState variables from 'exec' to 'state' in the
3298         bindings as this is the preferred naming convention.
3299
3300         * Modules/indexeddb/IDBCursor.h:
3301         * Modules/indexeddb/IDBObjectStore.h:
3302         * Modules/indexeddb/legacy/LegacyCursor.cpp:
3303         (WebCore::LegacyCursor::update):
3304         * Modules/indexeddb/legacy/LegacyCursor.h:
3305         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
3306         (WebCore::LegacyObjectStore::add):
3307         (WebCore::LegacyObjectStore::put):
3308         * Modules/indexeddb/legacy/LegacyObjectStore.h:
3309         * Modules/mediastream/CapabilityRange.cpp:
3310         (WebCore::scriptValue):
3311         (WebCore::CapabilityRange::min):
3312         (WebCore::CapabilityRange::max):
3313         * Modules/mediastream/CapabilityRange.h:
3314         * Modules/streams/ReadableStreamController.h:
3315         (WebCore::ReadableStreamController::error):
3316         (WebCore::ReadableStreamController::enqueue):
3317         * bindings/scripts/CodeGeneratorJS.pm:
3318         (GenerateEventListenerCall):
3319         (GenerateGetOwnPropertySlotBody):
3320         (GenerateHeader):
3321         (GenerateOverloadedFunction):
3322         (GetIndexedGetterExpression):
3323         (GenerateImplementation):
3324         (GenerateFunctionCastedThis):
3325         (GenerateCallWith):
3326         (GenerateArgumentsCountCheck):
3327         (GenerateParametersCheck):
3328         (GenerateReturnParameters):
3329         (GenerateCallbackHeader):
3330         (GenerateCallbackImplementation):
3331         (GenerateImplementationFunctionCall):
3332         (JSValueToNative):
3333         (NativeToJSValue):
3334         (GenerateOverloadedConstructorDefinition):
3335         (GenerateConstructorDefinition):
3336
3337 2015-09-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3338
3339         Remove XHR_TIMEOUT compilation guard
3340         https://bugs.webkit.org/show_bug.cgi?id=149260
3341
3342         Reviewed by Benjamin Poulain.
3343
3344         Covered by existing tests.
3345
3346         * Configurations/FeatureDefines.xcconfig:
3347         * xml/XMLHttpRequest.cpp:
3348         (WebCore::XMLHttpRequest::XMLHttpRequest):
3349         (WebCore::XMLHttpRequest::didFail):
3350         (WebCore::XMLHttpRequest::didReachTimeout):
3351         (WebCore::XMLHttpRequest::setTimeout):
3352         (WebCore::XMLHttpRequest::setResponseType):
3353         (WebCore::XMLHttpRequest::open):
3354         (WebCore::XMLHttpRequest::createRequest):
3355         (WebCore::XMLHttpRequest::internalAbort):
3356         (WebCore::XMLHttpRequest::didFailRedirectCheck):
3357         (WebCore::XMLHttpRequest::didSendData):
3358         (WebCore::XMLHttpRequest::suspend):
3359         * xml/XMLHttpRequest.h:
3360         * xml/XMLHttpRequest.idl:
3361
3362 2015-09-20  Tim Horton  <timothy_horton@apple.com>
3363
3364         Add two missing files to the Xcode project
3365
3366         * WebCore.xcodeproj/project.pbxproj:
3367         These are imported by files that are built for Mac, but missing from the project.
3368
3369 2015-09-19  Chris Dumez  <cdumez@apple.com>
3370
3371         [Web IDL] Add support for [PutForwards=XXX] IDL extended attribute
3372         https://bugs.webkit.org/show_bug.cgi?id=149376
3373
3374         Reviewed by Darin Adler.
3375
3376         [Web IDL] Add support for [PutForwards=XXX] IDL extended attribute:
3377         https://heycam.github.io/webidl/#PutForwards
3378
3379         As an initial proof of concept, use it for Document.location as per the
3380         HTML specification, instead of using custom bindings:
3381         https://html.spec.whatwg.org/multipage/dom.html#the-document-object
3382
3383         More attributes can be ported later.
3384
3385         No new tests, no web-exposed behavior change intended. Bindings tests
3386         coverage was added.
3387
3388         * bindings/js/JSDocumentCustom.cpp:
3389         Drop custom bindings for the location attribute setter.
3390
3391         * bindings/scripts/CodeGenerator.pm:
3392         (GetAttributeFromInterface):
3393         Add convenience function that returned an attribute from another
3394         interface. This is used by [PutForwards] to retrieve the forwarded
3395         attribute.
3396
3397         * bindings/scripts/CodeGeneratorJS.pm:
3398         (IsReadonly):
3399         (GenerateImplementation):
3400         * bindings/scripts/IDLAttributes.txt:
3401         Add support for [PutForwards=XXX] IDL extended attribute.
3402
3403         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
3404         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
3405         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3406         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3407         * bindings/scripts/test/JS/JSTestNode.cpp:
3408         * bindings/scripts/test/JS/JSTestObj.cpp:
3409         * bindings/scripts/test/ObjC/DOMTestNode.h:
3410         * bindings/scripts/test/ObjC/DOMTestNode.mm:
3411         * bindings/scripts/test/ObjC/DOMTestObj.h:
3412         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3413         Add binding tests coverage for [PutForwards=XXX] IDL extended
3414         attribute.
3415
3416         * dom/Document.idl:
3417         Use [PutForwards=href] for Document.location attribute, as per the HTML
3418         specification and stop using custom bindings for the setter. Also mark
3419         the attribute as readonly as all attributes using [PutForwards] must be
3420         marked as readonly as per the Web IDL specification.
3421
3422 2015-09-19  Chris Dumez  <cdumez@apple.com>
3423
3424         [WebIDL] Specify default parameter values where it is useful
3425         https://bugs.webkit.org/show_bug.cgi?id=149331
3426         <rdar://problem/22545600>
3427
3428         Reviewed by Darin Adler.
3429
3430         Specify default parameter values where it is useful in our IDL, that is
3431         to say where undefined would be converted to something else than the
3432         default value otherwise. This patch focuses on the HTML API.
3433
3434         This patch also adds support for default values&n