Scrolling iframe inside scrollable div does not work with trackpad
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-11-06  Wenson Hsieh  <wenson_hsieh@apple.com>
2
3         Scrolling iframe inside scrollable div does not work with trackpad
4         https://bugs.webkit.org/show_bug.cgi?id=150168
5         <rdar://problem/23143931>
6
7         Reviewed by Brent Fulgham.
8
9         When scrolling in an iframe nested under an overflow scrolling region, EventHandler::platformPrepareForWheelEvents
10         fails to compute the correct scrollableArea, using the overflow div's scrollable area instead of the iframe's view.
11         This causes the latching algorithm to bail out of handling the wheel event. To avoid this, we special-case the
12         decision to compute the scrollableArea from the scrollableContainer if we are attempting to scroll in an iframe.
13
14         Test: fast/scrolling/latching/scroll-iframe-in-overflow.html
15
16         * page/mac/EventHandlerMac.mm:
17         (WebCore::EventHandler::platformPrepareForWheelEvents):
18
19 2015-11-06  Brady Eidson  <beidson@apple.com>
20
21         Modern IDB: Make the result data for a "get" request be an IDBGetResult.
22         https://bugs.webkit.org/show_bug.cgi?id=150985
23
24         Reviewed by Alex Christensen.
25
26         No new tests (Refactor, no change in behavior).
27
28         * Modules/indexeddb/IDBGetResult.h:
29         (WebCore::IDBGetResult::IDBGetResult):
30         (WebCore::IDBGetResult::dataFromBuffer):
31         (WebCore::IDBGetResult::isolatedCopy):
32         
33         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
34         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
35         
36         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
37         (WebCore::GetOperation::perform):
38         
39         * Modules/indexeddb/server/IDBBackingStore.h:
40         
41         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
42         (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
43         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
44         
45         * Modules/indexeddb/server/MemoryIndex.cpp:
46         (WebCore::IDBServer::MemoryIndex::valueForKeyRange):
47         * Modules/indexeddb/server/MemoryIndex.h:
48         
49         * Modules/indexeddb/server/MemoryObjectStore.cpp:
50         (WebCore::IDBServer::MemoryObjectStore::indexValueForKeyRange):
51         * Modules/indexeddb/server/MemoryObjectStore.h:
52         
53         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
54         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
55         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
56         (WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord):
57         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetRecord):
58         (WebCore::IDBServer::UniqueIDBDatabase::performGetResultCallback):
59         (WebCore::IDBServer::UniqueIDBDatabase::performValueDataCallback): Deleted.
60         * Modules/indexeddb/server/UniqueIDBDatabase.h:
61         
62         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
63         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
64         
65         * Modules/indexeddb/shared/IDBResultData.cpp:
66         (WebCore::IDBResultData::IDBResultData):
67         (WebCore::IDBResultData::getRecordSuccess):
68         (WebCore::IDBResultData::getResult):
69         * Modules/indexeddb/shared/IDBResultData.h:
70         (WebCore::IDBResultData::resultData): Deleted.
71
72 2015-11-06  Chris Dumez  <cdumez@apple.com>
73
74         Remove unused HTMLFormControlsCollection::namedItem()
75         https://bugs.webkit.org/show_bug.cgi?id=150975
76
77         Reviewed by Andreas Kling.
78
79         Remove unused HTMLFormControlsCollection::namedItem().
80         JSHTMLFormControlsCollection::namedItem() calls namedItems() on the
81         implementation object, not namedItem() because it returns a
82         RadioNodeList when there are several matches.
83
84         * html/HTMLFormControlsCollection.cpp:
85         (WebCore::firstNamedItem): Deleted.
86         (WebCore::HTMLFormControlsCollection::namedItem): Deleted.
87         * html/HTMLFormControlsCollection.h:
88
89 2015-11-06  Myles C. Maxfield  <mmaxfield@apple.com>
90
91         REGRESSION(r182286): Tatechuyoko following ruby is drawn too far to the right
92         https://bugs.webkit.org/show_bug.cgi?id=150923
93
94         Reviewed by Zalan Bujtas.
95
96         Ever since r182286, expansion opportunities in justified ruby were moved to their neighboring
97         elements (thereby forbidding trailing nor leading expansions inside ruby). However, when the
98         neighboring element is tatechuyoko, we will erroneously honor the expansion opportunity inside
99         the tatechuyoko, thereby moving it horizontally.
100
101         Tatechuyoko should never have expansion opportunities inside it.
102
103         Test: fast/text/ruby-justify-tatechuyoko.html
104
105         * rendering/RenderBlockLineLayout.cpp:
106         (WebCore::expansionBehaviorForInlineTextBox):
107
108 2015-11-06  Mario Sanchez Prada  <mario@endlessm.com>
109
110         Layout Test accessibility/win/linked-elements.html is crashing on win debug
111         https://bugs.webkit.org/show_bug.cgi?id=150944
112
113         Reviewed by Chris Fleizach.
114
115         Be more precise ASSERTing on textUnderElement, only checking that the render
116         tree is stable before using TextIteraror when in 'IncludeAllChildren' mode.
117
118         * accessibility/AccessibilityRenderObject.cpp:
119         (WebCore::AccessibilityRenderObject::textUnderElement):
120
121 2015-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
122
123         [GStreamer] Use MainThreadNotifier to send notifications to main thread in WebKitWebSourceGStreamer
124         https://bugs.webkit.org/show_bug.cgi?id=150890
125
126         Reviewed by Žan Doberšek.
127
128         Instead of the GThreadSafeMainLoopSources.
129
130         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
131         (webKitWebSrcStop):
132         (webKitWebSrcChangeState):
133         (webKitWebSrcNeedData):
134         (webKitWebSrcEnoughData):
135         (webKitWebSrcSeek):
136         (StreamingClient::handleResponseReceived):
137         (StreamingClient::handleDataReceived):
138         (StreamingClient::handleNotifyFinished):
139         (webKitWebSrcFinalize): Deleted.
140         (webKitWebSrcSetProperty): Deleted.
141         (webKitWebSrcGetProperty): Deleted.
142         (webKitWebSrcSetExtraHeader): Deleted.
143         (webKitWebSrcStart): Deleted.
144         (webKitWebSrcGetProtocols): Deleted.
145         (webKitWebSrcGetUri): Deleted.
146         (webKitWebSrcSetUri): Deleted.
147         (webKitWebSrcUriHandlerInit): Deleted.
148
149 2015-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
150
151         [GStreamer] Use MainThreadNotifier to send notifications to main thread in TrackPrivateGStreamer
152         https://bugs.webkit.org/show_bug.cgi?id=150889
153
154         Reviewed by Žan Doberšek.
155
156         Instead of the GThreadSafeMainLoopSources.
157
158         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
159         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
160         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
161         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
162         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
163         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
164         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
165         (WebCore::TrackPrivateBaseGStreamer::disconnect):
166         (WebCore::TrackPrivateBaseGStreamer::activeChangedCallback):
167         (WebCore::TrackPrivateBaseGStreamer::tagsChangedCallback):
168         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
169         (WebCore::TrackPrivateBaseGStreamer::~TrackPrivateBaseGStreamer): Deleted.
170         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged): Deleted.
171         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
172
173 2015-11-06  Csaba Osztrogonác  <ossy@webkit.org>
174
175         Suppress deprecated-declarations warning in WebCore/platform/URL.cpp
176         https://bugs.webkit.org/show_bug.cgi?id=150803
177
178         Reviewed by Alexey Proskuryakov.
179
180         * platform/URL.cpp:
181         (WebCore::appendEncodedHostname):
182
183 2015-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
184
185         [GStreamer] Do not use GThreadSafeMainLoopSource to send notifications to the main thread in MediaPlayerPrivateGStreamer
186         https://bugs.webkit.org/show_bug.cgi?id=150888
187
188         Reviewed by Žan Doberšek.
189
190         Analyzing how the main loop sources were used in GST code I've
191         noticed that in most of the cases they are used to send
192         notifications to the main thread. The way it works in those cases
193         is that some state is updated in whatever thread and we notify the
194         main thread to use the new state. There's no data passed to the
195         main thread, they are just notifications. I've also noticed that
196         we are not doing this exactly as expected in several of those
197         cases. GThreadSafeMainLoopSource cancels the current source when a
198         new one is scheduled, and that was done this way because previous
199         code in GST using GSources directly did it that way. But that's
200         not what we want, if there's a notification pending, since the
201         state is updated, we can just wait for it to happen instead of
202         cancelling and scheduling a new one. I've also noticed that in
203         most of the cases where we schedule notifications to the main
204         thread, we can be already in the main thread, so we could avoid
205         the schedule entirely.
206         We can use RunLoop::dispatch() to send notifications to the main
207         thread, but there's no way to cancel those tasks. This patch adds
208         a new helper class MainThreadNotifier that uses an enum of flags to
209         handle different kind of notifications. It uses
210         RunLoop::dispatch() to send notifications to the main thread, but
211         only if there isn't one pending for the given type.
212         This patch also makes signal callbacks static members to be able
213         to make the private methods actually private.
214
215         * platform/graphics/gstreamer/MainThreadNotifier.h: Added.
216         (WebCore::MainThreadNotifier::MainThreadNotifier):
217         (WebCore::MainThreadNotifier::notify):
218         (WebCore::MainThreadNotifier::cancelPendingNotifications):
219         (WebCore::MainThreadNotifier::addPendingNotification):
220         (WebCore::MainThreadNotifier::removePendingNotification):
221         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
222         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamPropertiesCallback):
223         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
224         (WebCore::MediaPlayerPrivateGStreamer::videoChangedCallback):
225         (WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback):
226         (WebCore::MediaPlayerPrivateGStreamer::audioChangedCallback):
227         (WebCore::MediaPlayerPrivateGStreamer::textChangedCallback):
228         (WebCore::MediaPlayerPrivateGStreamer::newTextSampleCallback):
229         (WebCore::MediaPlayerPrivateGStreamer::sourceChangedCallback):
230         (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
231         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
232         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties): Deleted.
233         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): Deleted.
234         (WebCore::initializeGStreamerAndRegisterWebKitElements): Deleted.
235         (WebCore::MediaPlayerPrivateGStreamer::load): Deleted.
236         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Deleted.
237         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Deleted.
238         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Deleted.
239         (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData): Deleted.
240         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
241         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
242         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
243         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChangedCallback):
244         (WebCore::MediaPlayerPrivateGStreamerBase::muteChangedCallback):
245         (WebCore::MediaPlayerPrivateGStreamerBase::repaintCallback):
246         (WebCore::MediaPlayerPrivateGStreamerBase::drawCallback):
247         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
248         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
249         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): Deleted.
250         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline): Deleted.
251         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): Deleted.
252         (WebCore::MediaPlayerPrivateGStreamerBase::muted): Deleted.
253         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Deleted.
254         (WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount): Deleted.
255         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
256         (WebCore::MediaPlayerPrivateGStreamerBase::setVisible): Deleted.
257
258 2015-11-06  Yoav Weiss  <yoav@yoav.ws>
259
260         Expose HTMLImageElement sizes attribute in IDL
261         https://bugs.webkit.org/show_bug.cgi?id=150230
262
263         Reviewed by Darin Adler.
264
265         No new tests, but fixed test expectations for exposed interfaces.
266
267         * html/HTMLImageElement.idl: Make sure that `sizes` is exposed as an IDL attribute, to ensure proper feature detection of sizes support.
268
269 2015-11-05  Carlos Garcia Campos  <cgarcia@igalia.com>
270
271         [GStreamer] Use RunLoop::Timer instead of GMainLoopSource in video sink
272         https://bugs.webkit.org/show_bug.cgi?id=150807
273
274         Reviewed by Žan Doberšek.
275
276         Since we always wait until the sample is actually rendered we
277         don't really need either a thread safe main loop source, nor
278         cancelling if already requested and other things GMainLoopSource does.
279         This adds a helper class VideoRenderRequestScheduler to use the
280         RunLoop::Timer. All the logic to syncronize between threads has
281         been moved to this helper class too.
282
283         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
284         (VideoRenderRequestScheduler::VideoRenderRequestScheduler):
285         (VideoRenderRequestScheduler::start):
286         (VideoRenderRequestScheduler::stop):
287         (VideoRenderRequestScheduler::requestRender):
288         (VideoRenderRequestScheduler::isUnlocked):
289         (VideoRenderRequestScheduler::render):
290         (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate):
291         (webkitVideoSinkRepaintRequested):
292         (webkitVideoSinkRender):
293         (webkitVideoSinkUnlock):
294         (webkitVideoSinkUnlockStop):
295         (webkitVideoSinkStop):
296         (webkitVideoSinkStart):
297         (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Deleted.
298         (webkitVideoSinkTimeoutCallback): Deleted.
299         (unlockSampleMutex): Deleted.
300
301 2015-11-05  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
302
303         Add runtime and compile time flags for enabling Web Animations API and model.
304         https://bugs.webkit.org/show_bug.cgi?id=150914
305
306         Reviewed by Benjamin Poulain.
307
308         Add ENABLE_WEB_ANIMATIONS compile time flag, runtime flag webAnimationsEnabled and Expose WK2 preference for runtime flag.
309
310         * Configurations/FeatureDefines.xcconfig:
311         * bindings/generic/RuntimeEnabledFeatures.cpp:
312         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
313         * bindings/generic/RuntimeEnabledFeatures.h:
314         (WebCore::RuntimeEnabledFeatures::setWebAnimationsEnabled):
315         (WebCore::RuntimeEnabledFeatures::webAnimationsEnabled):
316
317 2015-11-05  Commit Queue  <commit-queue@webkit.org>
318
319         Unreviewed, rolling out r192089.
320         https://bugs.webkit.org/show_bug.cgi?id=150966
321
322         This change broke an existing layout test on Yosemite and
323         Mavericks (Requested by ryanhaddad on #webkit).
324
325         Reverted changeset:
326
327         "Preview on apple.com/contact with all text selected shows a
328         map"
329         https://bugs.webkit.org/show_bug.cgi?id=150963
330         http://trac.webkit.org/changeset/192089
331
332 2015-11-05  Tim Horton  <timothy_horton@apple.com>
333
334         Preview on apple.com/contact with all text selected shows a map
335         https://bugs.webkit.org/show_bug.cgi?id=150963
336         <rdar://problem/23421750>
337
338         Reviewed by Beth Dakin.
339
340         * editing/mac/DictionaryLookup.h:
341         * editing/mac/DictionaryLookup.mm:
342         (WebCore::DictionaryLookup::rangeForSelection):
343         If the range that Lookup decides to use doesn't intersect the hit point,
344         just ignore Lookup.
345
346         (WebCore::DictionaryLookup::rangeAtHitTestResult):
347         If the selection-based Lookup fails to find a usable result, fall back
348         to looking around the hit point.
349
350 2015-11-05  Brady Eidson  <beidson@apple.com>
351
352         Modern IDB: Implement IDBIndex get/getKey/count requests.
353         https://bugs.webkit.org/show_bug.cgi?id=150910
354
355         Reviewed by Alex Christensen.
356
357         Tests: storage/indexeddb/modern/index-get-count-basic.html
358                storage/indexeddb/modern/index-get-count-failures.html
359
360         * Modules/indexeddb/IndexedDB.h:
361
362         * Modules/indexeddb/client/IDBAnyImpl.cpp:
363         (WebCore::IDBClient::IDBAny::IDBAny):
364         (WebCore::IDBClient::IDBAny::modernIDBIndex):
365         * Modules/indexeddb/client/IDBAnyImpl.h:
366         (WebCore::IDBClient::IDBAny::create):
367         (WebCore::IDBClient::IDBAny::createUndefined):
368
369         * Modules/indexeddb/client/IDBIndexImpl.cpp:
370         (WebCore::IDBClient::IDBIndex::count):
371         (WebCore::IDBClient::IDBIndex::doCount):
372         (WebCore::IDBClient::IDBIndex::get):
373         (WebCore::IDBClient::IDBIndex::doGet):
374         (WebCore::IDBClient::IDBIndex::getKey):
375         (WebCore::IDBClient::IDBIndex::doGetKey):
376         * Modules/indexeddb/client/IDBIndexImpl.h:
377         (WebCore::IDBClient::IDBIndex::info):
378         
379         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
380         (WebCore::IDBClient::IDBObjectStore::isDeleted):
381         (WebCore::IDBClient::IDBObjectStore::modernTransaction):
382         
383         * Modules/indexeddb/client/IDBRequestImpl.cpp:
384         (WebCore::IDBClient::IDBRequest::createCount):
385         (WebCore::IDBClient::IDBRequest::createGet):
386         (WebCore::IDBClient::IDBRequest::IDBRequest):
387         (WebCore::IDBClient::IDBRequest::sourceObjectStoreIdentifier):
388         (WebCore::IDBClient::IDBRequest::sourceIndexIdentifier):
389         (WebCore::IDBClient::IDBRequest::requestedIndexRecordType):
390         (WebCore::IDBClient::IDBRequest::setResultToUndefined):
391         * Modules/indexeddb/client/IDBRequestImpl.h:
392         
393         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
394         (WebCore::IDBClient::IDBTransaction::requestGetValue):
395         (WebCore::IDBClient::IDBTransaction::requestGetKey):
396         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
397         (WebCore::IDBClient::IDBTransaction::requestCount):
398         * Modules/indexeddb/client/IDBTransactionImpl.h:
399         
400         * Modules/indexeddb/client/TransactionOperation.cpp:
401         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
402         * Modules/indexeddb/client/TransactionOperation.h:
403         (WebCore::IDBClient::TransactionOperation::indexIdentifier):
404         (WebCore::IDBClient::TransactionOperation::indexRecordType):
405         
406         * Modules/indexeddb/server/IDBBackingStore.h:
407         
408         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
409         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
410         (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
411         (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
412         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
413         
414         * Modules/indexeddb/server/MemoryIndex.cpp:
415         (WebCore::IDBServer::MemoryIndex::valueForKeyRange):
416         (WebCore::IDBServer::MemoryIndex::countForKeyRange):
417         * Modules/indexeddb/server/MemoryIndex.h:
418         
419         * Modules/indexeddb/server/MemoryObjectStore.cpp:
420         (WebCore::IDBServer::MemoryObjectStore::createIndex):
421         (WebCore::IDBServer::MemoryObjectStore::countForKeyRange):
422         (WebCore::IDBServer::MemoryObjectStore::indexValueForKeyRange):
423         * Modules/indexeddb/server/MemoryObjectStore.h:
424         
425         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
426         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
427         (WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord):
428         (WebCore::IDBServer::UniqueIDBDatabase::getCount):
429         (WebCore::IDBServer::UniqueIDBDatabase::performGetCount):
430         (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord): Deleted.
431         * Modules/indexeddb/server/UniqueIDBDatabase.h:
432         
433         * Modules/indexeddb/shared/IDBRequestData.cpp:
434         (WebCore::IDBRequestData::IDBRequestData):
435         (WebCore::IDBRequestData::objectStoreIdentifier):
436         (WebCore::IDBRequestData::indexIdentifier):
437         (WebCore::IDBRequestData::indexRecordType):
438         * Modules/indexeddb/shared/IDBRequestData.h:
439
440 2015-11-05  Zhuo Li  <zachli@apple.com>
441
442         Rename the variable to avoid conflict between the variable and the parameter.
443         https://bugs.webkit.org/show_bug.cgi?id=150019.
444
445         Reviewed by Dan Bernstein.
446
447         * platform/cocoa/SearchPopupMenuCocoa.mm:
448         (WebCore::typeCheckedRecentSearchesRemovingRecentSearchesAddedAfterDate): Rename `date`
449         to `dateAdded` so that it does not have the same name as the parameter passed in.
450
451 2015-11-05  Joseph Pecoraro  <pecoraro@apple.com>
452
453         Web Inspector: Clean up InjectedScript uses
454         https://bugs.webkit.org/show_bug.cgi?id=150921
455
456         Reviewed by Timothy Hatcher.
457
458         * inspector/CommandLineAPIModule.cpp:
459         (WebCore::CommandLineAPIModule::injectIfNeeded):
460         (WebCore::CommandLineAPIModule::CommandLineAPIModule):
461         * inspector/CommandLineAPIModule.h:
462         * inspector/WebInjectedScriptManager.cpp:
463         (WebCore::WebInjectedScriptManager::didCreateInjectedScript):
464         * inspector/WebInjectedScriptManager.h:
465
466 2015-11-05  Joseph Pecoraro  <pecoraro@apple.com>
467
468         Web Inspector: Put ScriptDebugServer into InspectorEnvironment and cleanup duplicate references
469         https://bugs.webkit.org/show_bug.cgi?id=150869
470
471         Reviewed by Brian Burg.
472
473         Refactoring covered by existing tests.
474
475         * WebCore.xcodeproj/project.pbxproj:
476         Privately export PageScriptDebuggerAgent.h due to InspectorController.h needing it.
477
478         * inspector/InspectorController.h:
479         * inspector/InspectorController.cpp:
480         (WebCore::InspectorController::InspectorController):
481         (WebCore::InspectorController::scriptDebugServer):
482         Own the PageScriptDebugServer.
483
484         * inspector/WorkerInspectorController.h:
485         * inspector/WorkerInspectorController.cpp:
486         (WebCore::WorkerInspectorController::WorkerInspectorController):
487         (WebCore::WorkerInspectorController::scriptDebugServer):
488         Own the WorkerScriptDebugServer.
489
490         (WebCore::WorkerInspectorController::vm):
491         Use the VM accessed through the worker global object.
492
493         * inspector/InspectorWebAgentBase.h:
494         (WebCore::InspectorAgentBase::InspectorAgentBase):
495         Given Web agents a m_environment convenience to access the InspectorEnvironment.
496
497         * inspector/InspectorNetworkAgent.cpp:
498         (WebCore::InspectorNetworkAgent::timestamp):
499         * inspector/InspectorPageAgent.cpp:
500         (WebCore::InspectorPageAgent::timestamp):
501         (WebCore::InspectorPageAgent::enable):
502         (WebCore::InspectorPageAgent::frameStartedLoading):
503         * inspector/InspectorTimelineAgent.cpp:
504         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
505         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
506         (WebCore::InspectorTimelineAgent::internalStart):
507         (WebCore::InspectorTimelineAgent::internalStop):
508         (WebCore::InspectorTimelineAgent::timestamp):
509         (WebCore::InspectorTimelineAgent::startFromConsole):
510         (WebCore::InspectorTimelineAgent::willCallFunction):
511         (WebCore::InspectorTimelineAgent::willEvaluateScript):
512         (WebCore::InspectorTimelineAgent::setPageScriptDebugServer): Deleted.
513         * inspector/InspectorTimelineAgent.h:
514         Use the InspectorEnvironment for VM / ScriptDebugServer.
515
516         * inspector/PageDebuggerAgent.cpp:
517         (WebCore::PageDebuggerAgent::PageDebuggerAgent): Deleted.
518         (WebCore::PageDebuggerAgent::scriptDebugServer): Deleted.
519         * inspector/PageDebuggerAgent.h:
520         * inspector/PageRuntimeAgent.cpp:
521         (WebCore::PageRuntimeAgent::globalVM): Deleted.
522         * inspector/PageRuntimeAgent.h:
523         * inspector/WorkerDebuggerAgent.h:
524         * inspector/WorkerRuntimeAgent.cpp:
525         (WebCore::WorkerRuntimeAgent::globalVM): Deleted.
526         * inspector/WorkerRuntimeAgent.h:
527         * inspector/WorkerDebuggerAgent.cpp:
528         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent): Deleted.
529         (WebCore::WorkerDebuggerAgent::scriptDebugServer): Deleted.
530         Remove now unnecessary subclass code.
531
532         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
533         One more special case for accessing Worker properties from the ScriptDebugServer.
534
535 2015-11-05  Xabier Rodriguez Calvar  <calvaris@igalia.com>
536
537         [Streams API] Shield implementation from user mangling Promise.reject and resolve methods
538         https://bugs.webkit.org/show_bug.cgi?id=150895
539
540         Reviewed by Youenn Fablet.
541
542         Replace all calls to @Promise.resolve and @Promise.reject with their internal slot counterparts. This way we
543         ensure that if the user replaces those constructor methods, our implementation still works.
544
545         Test: streams/streams-promises.html.
546
547         * Modules/streams/ReadableStream.js:
548         (initializeReadableStream):
549         (cancel):
550         * Modules/streams/ReadableStreamInternals.js:
551         (privateInitializeReadableStreamReader):
552         (cancelReadableStream):
553         (readFromReadableStreamReader):
554         * Modules/streams/ReadableStreamReader.js:
555         (cancel):
556         (read):
557         (closed):
558         * Modules/streams/StreamInternals.js:
559         (promiseInvokeOrNoop):
560         (promiseInvokeOrFallbackOrNoop):
561         * Modules/streams/WritableStream.js:
562         (initializeWritableStream):
563         (abort):
564         (close):
565         (write):
566         (closed):
567         (ready):
568
569 2015-11-05  Andreas Kling  <akling@apple.com>
570
571         Give ResourceUsageOverlay a stacked chart for dirty memory per category.
572         <https://webkit.org/b/150905>
573
574         Reviewed by Antti Koivisto.
575
576         Refactored the data gathering to operate on "memory categories", a memory category is at
577         the top level a VM tag, e.g the VM tag for our bmalloc allocator. It can in turn have
578         sub-categories, e.g one for the GC heap, which allocates all of its blocks through bmalloc
579         and thus end up in the same tag.
580
581         Each category also has a hard-coded color, which is used consistently in labels and charts.
582
583         Also went back to drawing everything with CGContext directly instead of GraphicsContext
584         since the latter is not thread safe.
585
586         * page/ResourceUsageOverlay.h:
587         * page/cocoa/ResourceUsageOverlayCocoa.mm:
588         (-[WebOverlayLayer drawInContext:]):
589         (WebCore::RingBuffer::last):
590         (WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
591         (WebCore::ResourceUsageData::ResourceUsageData):
592         (WebCore::showText):
593         (WebCore::drawGraphLabel):
594         (WebCore::drawCpuHistory):
595         (WebCore::drawGCHistory):
596         (WebCore::drawMemHistory):
597         (WebCore::drawSlice):
598         (WebCore::drawMemoryPie):
599         (WebCore::ResourceUsageOverlay::platformDraw):
600         (WebCore::categoryForVMTag):
601         (WebCore::runSamplerThread):
602         (WebCore::drawPlate): Deleted.
603         (WebCore::fontCascade): Deleted.
604         (WebCore::ResourceUsageOverlay::draw): Deleted.
605
606 2015-11-05  Simon Fraser  <simon.fraser@apple.com>
607
608         Having page overlays causes iframe to get composited
609         https://bugs.webkit.org/show_bug.cgi?id=150920
610
611         Reviewed by Tim Horton.
612         
613         When deciding whether to enable compositing for a subframe, don't consult the
614         main frame's overlay count. Only do that for the main frame.
615
616         (WebCore::RenderLayerCompositor::updateCompositingLayers):
617
618 2015-11-05  Manuel Rego Casasnovas  <rego@igalia.com>
619
620         [css-grid] Support positioned grid children
621         https://bugs.webkit.org/show_bug.cgi?id=150837
622
623         Reviewed by Darin Adler.
624
625         According to the spec positioned grid children have
626         a special behavior described at:
627         https://drafts.csswg.org/css-grid/#abspos
628
629         The idea is that for positioned children the containing block will
630         correspond to the padding edges of the grid container, unless the
631         grid placement properties are defined.
632         This not only affects to positioned grid items (direct children) but
633         also to any descendant where the containing block is the grid container.
634
635         In order to manage this special behavior, the patch is overriding
636         RenderBlock::layoutPositionedObject() to calculate the position and size
637         depending on the grid-placement properties.
638
639         RenderBox class has some changes to calculate the containing block width
640         and height for positioned objects (using the override value). And also
641         to compute their static position.
642
643         Finally, the positioned items are not taken into account in all the
644         different grid methods, in order that they do not interfere the layout
645         of the grid as stated in the spec.
646
647         Tests: fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html
648                fast/css-grid-layout/absolute-positioning-grid-container-parent.html
649                fast/css-grid-layout/grid-positioned-items-background.html
650                fast/css-grid-layout/grid-positioned-items-implicit-grid-line.html
651                fast/css-grid-layout/grid-positioned-items-implicit-grid.html
652                fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line.html
653                fast/css-grid-layout/grid-sizing-positioned-items.html
654                fast/css-grid-layout/positioned-grid-items-should-not-create-implicit-tracks.html
655                fast/css-grid-layout/positioned-grid-items-should-not-take-up-space.html
656
657         * rendering/OrderIterator.cpp:
658         (WebCore::OrderIterator::next): Fix method to avoid issues if no items
659         are added to the iterator.
660         * rendering/RenderBlock.h: Mark layoutPositionedObject() as virtual.
661         * rendering/RenderBox.cpp: Add new maps for inline/block extra offsets.
662         (WebCore::RenderBox::~RenderBox): Clear the new maps.
663         (WebCore::RenderBox::extraInlineOffset): Extra offset that we need to
664         apply to positioned grid children due to the grid placement properties.
665         (WebCore::RenderBox::extraBlockOffset): Ditto.
666         (WebCore::RenderBox::setExtraInlineOffset):
667         (WebCore::RenderBox::setExtraBlockOffset):
668         (WebCore::RenderBox::clearExtraInlineAndBlockOffests):
669         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Use the
670         override containing block if any.
671         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): Ditto.
672         (WebCore::RenderBox::computePositionedLogicalWidth): Add the extra
673         offset if it's a positioned element.
674         (WebCore::RenderBox::computePositionedLogicalHeight): Ditto.
675         * rendering/RenderBox.h:
676         (WebCore::RenderBox::scrollbarLogicalWidth): Add utility method.
677         * rendering/RenderGrid.cpp:
678         (WebCore::RenderGrid::layoutBlock): Clear grid after layout positioned
679         objects instead of at the end of layoutGridItems().
680         (WebCore::RenderGrid::placeItemsOnGrid): Ignore positioned items.
681         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ditto.
682         (WebCore::RenderGrid::layoutGridItems): Ditto.
683         (WebCore::RenderGrid::prepareChildForPositionedLayout): Set static
684         position for positioned items.
685         (WebCore::RenderGrid::layoutPositionedObject): Calculate position and
686         size for positioned children.
687         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild): Calculate
688         extra offset and breadth for positioned children.
689         * rendering/RenderGrid.h:
690         * rendering/style/GridResolvedPosition.cpp:
691         (WebCore::GridResolvedPosition::isNonExistentNamedLineOrArea): Make it a
692         public static method.
693         (WebCore::GridUnresolvedSpan::adjustGridPositionsFromStyle): Fix calls
694         to isNonExistentNamedLineOrArea().
695         (WebCore::resolveGridPositionFromStyle): Ditto.
696         * rendering/style/GridResolvedPosition.h: Make
697         isNonExistentNamedLineOrArea() public.
698
699 2015-11-04  Jiewen Tan  <jiewen_tan@apple.com>
700
701         Null dereference loading Blink layout test editing/execCommand/delete-hidden-crash.html
702         https://bugs.webkit.org/show_bug.cgi?id=149289
703         <rdar://problem/22746352>
704
705         Reviewed by Enrica Casucci.
706
707         This is a merge of Blink r176497:
708         https://codereview.chromium.org/340713003
709
710         It ensures the start & end positions in DeleteSelectionCommand::initializePositionData
711         are editable.
712
713         Test: editing/execCommand/delete-hidden-crash.html
714
715         * editing/DeleteSelectionCommand.cpp:
716         (WebCore::DeleteSelectionCommand::initializePositionData):
717         * editing/Editor.cpp:
718         (WebCore::Editor::advanceToNextMisspelling):
719         * editing/htmlediting.cpp:
720         (WebCore::firstEditablePositionAfterPositionInRoot):
721         (WebCore::lastEditablePositionBeforePositionInRoot):
722         These two functions don't make any sense to return VisiblePosition. Change them
723         to return Position instead. Since there is a viable conversion from Position to
724         VisiblePosition. It should not change the behavior of any other components depending
725         on it.
726         * editing/htmlediting.h:
727
728 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
729
730         Ruby base ending in tatechuyoko forces a line break before the tatechuyoko
731         https://bugs.webkit.org/show_bug.cgi?id=150883
732
733         Reviewed by Darin Adler.
734
735         Asking the width of a 0-length tatechuyoko should return 0.
736
737         Test: fast/text/ruby-tatechuyoko.html
738
739         * rendering/RenderCombineText.cpp:
740         (WebCore::RenderCombineText::width):
741
742 2015-11-04  Tim Horton  <timothy_horton@apple.com>
743
744         Update the name of a Mail class that we hardcode
745         https://bugs.webkit.org/show_bug.cgi?id=150879
746         <rdar://problem/23384627>
747
748         Reviewed by Alexey Proskuryakov.
749
750         * editing/cocoa/HTMLConverter.mm:
751         (_WebMessageDocumentClass):
752
753 2015-11-04  Eric Carlson  <eric.carlson@apple.com>
754
755         [MediaStream] A RealtimeMediaSource should begin producing data automatically
756         https://bugs.webkit.org/show_bug.cgi?id=150851
757         rdar://problem/23380636
758
759         A RealtimeMediaSource should be producing data unless it is muted, which is not under the 
760         control of the application, so a local source should begin producing data as soon as it
761         is added to a stream. Remove "producing data" and "enabled" observer callbacks because 
762         they don't provide anything that the "muted" callback already provides.
763         
764         Reviewed by Jer Noble.
765
766         * Modules/mediastream/MediaStreamTrack.cpp:
767         (WebCore::MediaStreamTrack::trackProducingDataChanged): Deleted.
768         * Modules/mediastream/MediaStreamTrack.h:
769
770         * Modules/mediastream/UserMediaRequest.cpp:
771         (WebCore::UserMediaRequest::didCreateStream): Tell sources to begin producing data.
772
773         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
774         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Don't call stream->startProducingData,
775           it isn't necessary.
776         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setReadyState): Call characteristicsChanged 
777           when the readyState changes.
778
779         * platform/mediastream/MediaStreamPrivate.cpp:
780         (WebCore::MediaStreamPrivate::trackProducingDataChanged): Deleted.
781         * platform/mediastream/MediaStreamPrivate.h:
782
783         * platform/mediastream/MediaStreamTrackPrivate.cpp:
784         (WebCore::MediaStreamTrackPrivate::sourceProducingDataChanged): Deleted.
785         (WebCore::MediaStreamTrackPrivate::sourceEnabledChanged): Deleted.
786         * platform/mediastream/MediaStreamTrackPrivate.h:
787
788         * platform/mediastream/RealtimeMediaSource.cpp:
789         (WebCore::RealtimeMediaSource::isProducingDataDidChange): Deleted.
790         (WebCore::RealtimeMediaSource::setEnabled): Deleted.
791         * platform/mediastream/RealtimeMediaSource.h:
792
793         * platform/mediastream/mac/AVAudioCaptureSource.mm:
794         (WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection): !enabled() -> muted().
795
796         * platform/mediastream/mac/AVMediaCaptureSource.mm:
797         (WebCore::AVMediaCaptureSource::captureSessionIsRunningDidChange): Don't call isProducingDataDidChange..
798
799         * platform/mediastream/mac/AVVideoCaptureSource.mm:
800         (WebCore::AVVideoCaptureSource::processNewFrame): !enabled() -> muted().
801
802 2015-11-04  Jer Noble  <jer.noble@apple.com>
803
804         [iOS] <video> elements without audio tracks should not interrupt music
805         https://bugs.webkit.org/show_bug.cgi?id=149888
806
807         Reviewed by Eric Carlson.
808
809         Tests: TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm
810
811         Only set the AVAudioSession category to "playback" when the video element in question has an
812         audio track.
813
814         Add a new PlatformMediaSessionClient method called canProduceAudio(), overridden in HTMLMediaElement
815         and AudioContext, which is checked when updating the AudioSession category in 
816         PlatformMediaSessionManager::updateSessionState().
817
818         * Modules/webaudio/AudioContext.h:
819         * html/HTMLMediaElement.cpp:
820         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
821         * html/HTMLMediaElement.h:
822         * platform/audio/PlatformMediaSession.cpp:
823         (WebCore::PlatformMediaSession::activeAudioSessionRequired):
824         (WebCore::PlatformMediaSession::setCanProduceAudio):
825         * platform/audio/PlatformMediaSession.h:
826         (WebCore::PlatformMediaSession::canProduceAudio):
827         * platform/audio/PlatformMediaSessionManager.cpp:
828         (WebCore::PlatformMediaSessionManager::canProduceAudio):
829         (WebCore::PlatformMediaSessionManager::sessionCanProduceAudioChanged):
830         (WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
831         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
832         * platform/audio/PlatformMediaSessionManager.h:
833         * platform/audio/mac/MediaSessionManagerMac.cpp:
834         (PlatformMediaSessionManager::updateSessionState):
835
836 2015-11-03  Dean Jackson  <dino@apple.com>
837
838         Accept 8 and 4 value hex colors (#RRGGBBAA)
839         https://bugs.webkit.org/show_bug.cgi?id=150853
840         <rdar://problem/23380930>
841
842         Reviewed by Simon Fraser.
843
844         CSS Color Level 4 allows #RGBA and #RRGGBBAA values
845         for colors.
846
847         Test: fast/css/hex-colors.html
848
849         * platform/graphics/Color.cpp:
850         (WebCore::parseHexColorInternal): Update the color parsing for
851         the new syntax.
852
853 2015-11-04  Mario Sanchez Prada  <mario@webkit.org>
854
855         [AX] WebProcess from WebKitGtk+ 2.10.0 compiled in Debug mode hits ASSERT on textUnderElement
856         https://bugs.webkit.org/show_bug.cgi?id=150670
857
858         Reviewed by Chris Fleizach.
859
860         Move the ASSERTs stating that the render tree is stable before using the
861         TextIterator to their right place, in AccessibilityRenderObject, so that
862         we don't crash in debug builds in cases when this condition is irrelevant.
863
864         Test: accessibility/gtk/list-item-with-pseudo-element-crash.html
865
866         * accessibility/AccessibilityNodeObject.cpp:
867         (WebCore::AccessibilityNodeObject::textUnderElement): Removed ASSERTs.
868         * accessibility/AccessibilityRenderObject.cpp:
869         (WebCore::AccessibilityRenderObject::textUnderElement): Added ASSERTs, but
870         only before calling plainText and using the right document for the node.
871
872 2015-11-04  Xabier Rodriguez Calvar  <calvaris@igalia.com>
873
874         [Streams API] Shield streams against user replacing the Promise constructor
875         https://bugs.webkit.org/show_bug.cgi?id=150887
876
877         Reviewed by Youenn Fablet.
878
879         With this rework, we shield the Streams implementation against the user doing something like "Promise =
880         function() { /* do garbage */ };".
881
882         Test: streams/streams-promises.html.
883
884         * Modules/streams/ReadableStream.js:
885         (initializeReadableStream):
886         (cancel):
887         * Modules/streams/ReadableStreamInternals.js:
888         (privateInitializeReadableStreamReader):
889         (cancelReadableStream):
890         (readFromReadableStreamReader):
891         * Modules/streams/ReadableStreamReader.js:
892         (cancel):
893         (read):
894         (closed):
895         * Modules/streams/StreamInternals.js:
896         (promiseInvokeOrNoop):
897         (promiseInvokeOrFallbackOrNoop):
898         * Modules/streams/WritableStream.js:
899         (initializeWritableStream):
900         (abort):
901         (close):
902         (write):
903         (closed):
904         (ready):
905         * Modules/streams/WritableStreamInternals.js:
906         (syncWritableStreamStateWithQueue):
907
908 2015-11-04  Antoine Quint  <graouts@apple.com>
909
910         SVG: hit testing region for <text> elements is incorrect
911         https://bugs.webkit.org/show_bug.cgi?id=150838
912
913         Reviewed by Dean Jackson.
914
915         Hit testing for SVG <text> elements was using the same code as hit testing
916         for CSS-rendered elements. However, in SVG, text elements should only hit
917         test based on their character cells, not the rectangular bounds of the
918         element, see section 16.6 of the SVG 1.1 specification:
919         
920         http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty
921         
922         So we now hit test each SVGTextFragment of each SVGInlineTextBox
923         that is a child of an SVGRootInlineBox to correctly find whether the
924         provided HitTestLocation is contained within a character cell. 
925
926         Tests: svg/hittest/text-dominant-baseline-hanging.svg
927                svg/hittest/text-multiple-dx-values.svg
928                svg/hittest/text-with-multiple-tspans.svg
929                svg/hittest/text-with-text-node-and-content-elements.svg
930                svg/hittest/text-with-text-node-only.svg
931                svg/hittest/text-with-text-path.svg
932
933         * rendering/RootInlineBox.h:
934         Remove the final keyword since nodeAtPoint() may now be subclassed as
935         implemented in SVGRootInlineBox.
936  
937         * rendering/svg/SVGInlineTextBox.cpp:
938         (WebCore::SVGInlineTextBox::nodeAtPoint):
939         Iterate over the SVGTextFragments to look for a fragment containing the
940         provided HitTestLocation.
941  
942         * rendering/svg/SVGRootInlineBox.cpp:
943         (WebCore::SVGRootInlineBox::nodeAtPoint):
944         * rendering/svg/SVGRootInlineBox.h:
945         Override RootInlineBox::nodeAtPoint() to delegate hit testing to the
946         children inline boxes.
947
948 2015-11-04  Carlos Garcia Campos  <cgarcia@igalia.com>
949
950         [GStreamer] Use RunLoop::Timer for ready state timer in MediaPlayerPrivateGStreamer
951         https://bugs.webkit.org/show_bug.cgi?id=150836
952
953         Reviewed by Philippe Normand.
954
955         We don't really need a GThreadSafeMainLoopSource for this simple timer.
956
957         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
958         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
959         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
960         (WebCore::MediaPlayerPrivateGStreamer::readyTimerFired):
961         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
962         (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
963         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
964
965 2015-11-04  Frederic Wang  <fred.wang@free.fr>
966
967         Add support for the USE_TYPO_METRICS flag on iOS
968         https://bugs.webkit.org/show_bug.cgi?id=131839
969
970         Reviewed by Darin Adler.
971
972         Make the iOS Font service use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
973         The code shared by iOS, OS X and AppleWin is moved into a separate OpenTypeCG module.
974
975         No new tests because this is already tested by fonts/use-typo-metrics-1.html
976
977         * PlatformAppleWin.cmake: Add OpenTypeCG files.
978         * PlatformMac.cmake: ditto.
979         * WebCore.vcxproj/WebCore.vcxproj: ditto.
980         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
981         * WebCore.xcodeproj/project.pbxproj: ditto.
982         * platform/graphics/cocoa/FontCocoa.mm:
983         (WebCore::Font::platformInit): Use functions from OpenTypeCG.
984         (WebCore::fontHasMathTable): Deleted.
985         * platform/graphics/ios/FontServicesIOS.mm:
986         (WebCore::FontServicesIOS::FontServicesIOS): Use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
987         * platform/graphics/opentype/OpenTypeCG.h: Added.
988         * platform/graphics/opentype/OpenTypeCG.cpp: Added.
989         (WebCore::OpenType::fontHasMathTable): Move this code from FontCocoa.mm.
990         (WebCore::OpenType::readShortFromTable): Inline function to read a 16-bit big endian integer from the OS/2 table and to cast it into a short integer.
991         (WebCore::OpenType::tryGetTypoMetrics): Move this code from FontCocoa.mm.
992         * platform/graphics/opentype/OpenTypeTypes.h: Add missing Glyph.h header needed by TableWithCoverage::getCoverageIndex.
993         * platform/graphics/win/SimpleFontDataCGWin.cpp:
994         (WebCore::Font::platformInit): Use functions from OpenTypeCG.
995
996 2015-11-04  Chris Dumez  <cdumez@apple.com>
997
998         Regression(r191652): Colloquy doesn’t render any chat content
999         https://bugs.webkit.org/show_bug.cgi?id=150861
1000         <rdar://problem/23381007>
1001
1002         Reviewed by Antti Koivisto.
1003
1004         Do a partial revert of r191652 as this web-exposed behavior change
1005         broke Colloquy app. This only reverts the code change, the tests
1006         are left as is so that they don't rely of the frame ID setting the
1007         Window name.
1008
1009         * html/HTMLFrameElementBase.cpp:
1010         (WebCore::HTMLFrameElementBase::parseAttribute):
1011         (WebCore::HTMLFrameElementBase::setNameAndOpenURL):
1012
1013 2015-11-03  Brady Eidson  <beidson@apple.com>
1014
1015         Modern IDB: Fill out IDBIndex, create MemoryIndex in backing store.
1016         https://bugs.webkit.org/show_bug.cgi?id=150868
1017
1018         Reviewed by Alex Christensen.
1019
1020         Tests: storage/indexeddb/modern/create-index-failures.html
1021                storage/indexeddb/modern/get-index-failures.html
1022                storage/indexeddb/modern/idbindex-properties-basic.html
1023
1024         Note: The MemoryIndex in the backing store doesn't actually do anything yet.
1025         
1026         That's coming next.
1027     
1028         * CMakeLists.txt:
1029         * WebCore.xcodeproj/project.pbxproj:
1030
1031         * Modules/indexeddb/IDBIndex.h:
1032
1033         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1034         (WebCore::IDBClient::IDBConnectionToServer::createIndex):
1035         (WebCore::IDBClient::IDBConnectionToServer::didCreateIndex):
1036         * Modules/indexeddb/client/IDBConnectionToServer.h:
1037         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1038
1039         * Modules/indexeddb/client/IDBCursorWithValueImpl.h:
1040
1041         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1042         (WebCore::IDBClient::IDBDatabase::didCreateIndexInfo):
1043         * Modules/indexeddb/client/IDBDatabaseImpl.h:
1044
1045         * Modules/indexeddb/client/IDBIndexImpl.cpp:
1046         (WebCore::IDBClient::IDBIndex::create):
1047         (WebCore::IDBClient::IDBIndex::IDBIndex):
1048         (WebCore::IDBClient::IDBIndex::objectStore):
1049         (WebCore::IDBClient::IDBIndex::keyPathAny):
1050         (WebCore::IDBClient::IDBIndex::openCursor):
1051         (WebCore::IDBClient::IDBIndex::count):
1052         (WebCore::IDBClient::IDBIndex::openKeyCursor):
1053         (WebCore::IDBClient::IDBIndex::get):
1054         (WebCore::IDBClient::IDBIndex::getKey):
1055         * Modules/indexeddb/client/IDBIndexImpl.h:
1056
1057         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1058         (WebCore::IDBClient::IDBObjectStore::createIndex):
1059         (WebCore::IDBClient::IDBObjectStore::index):
1060         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
1061
1062         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1063         (WebCore::IDBClient::IDBTransaction::createObjectStore):
1064         (WebCore::IDBClient::IDBTransaction::createIndex):
1065         (WebCore::IDBClient::IDBTransaction::createIndexOnServer):
1066         (WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
1067         * Modules/indexeddb/client/IDBTransactionImpl.h:
1068
1069         * Modules/indexeddb/legacy/LegacyIndex.h:
1070
1071         * Modules/indexeddb/server/IDBBackingStore.h:
1072
1073         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1074         (WebCore::IDBServer::IDBConnectionToClient::didCreateIndex):
1075         * Modules/indexeddb/server/IDBConnectionToClient.h:
1076         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1077
1078         * Modules/indexeddb/server/IDBServer.cpp:
1079         (WebCore::IDBServer::IDBServer::createIndex):
1080         * Modules/indexeddb/server/IDBServer.h:
1081
1082         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
1083         (WebCore::IDBServer::MemoryBackingStoreTransaction::addNewIndex):
1084         (WebCore::IDBServer::MemoryBackingStoreTransaction::addExistingIndex):
1085         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
1086
1087         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1088         (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
1089         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1090
1091         * Modules/indexeddb/server/MemoryIndex.cpp: Added.
1092         (WebCore::IDBServer::MemoryIndex::create):
1093         (WebCore::IDBServer::MemoryIndex::MemoryIndex):
1094         (WebCore::IDBServer::MemoryIndex::~MemoryIndex):
1095         * Modules/indexeddb/server/MemoryIndex.h: Added.
1096         (WebCore::IDBServer::MemoryIndex::info):
1097
1098         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1099         (WebCore::IDBServer::MemoryObjectStore::createIndex):
1100         (WebCore::IDBServer::MemoryObjectStore::registerIndex):
1101         (WebCore::IDBServer::MemoryObjectStore::unregisterIndex):
1102         * Modules/indexeddb/server/MemoryObjectStore.h:
1103
1104         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1105         (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
1106         (WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
1107         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateIndex):
1108         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1109
1110         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
1111         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateIndex):
1112         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
1113
1114         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1115         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createIndex):
1116         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1117
1118         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
1119         (WebCore::IDBDatabaseInfo::getInfoForExistingObjectStore):
1120         (WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
1121         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
1122
1123         * Modules/indexeddb/shared/IDBIndexInfo.cpp:
1124         (WebCore::IDBIndexInfo::IDBIndexInfo):
1125         (WebCore::IDBIndexInfo::isolatedCopy):
1126         * Modules/indexeddb/shared/IDBIndexInfo.h:
1127         (WebCore::IDBIndexInfo::identifier):
1128         (WebCore::IDBIndexInfo::objectStoreIdentifier):
1129
1130         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
1131         (WebCore::IDBObjectStoreInfo::createNewIndex):
1132         (WebCore::IDBObjectStoreInfo::addExistingIndex):
1133         (WebCore::IDBObjectStoreInfo::hasIndex):
1134         (WebCore::IDBObjectStoreInfo::infoForExistingIndex):
1135         (WebCore::IDBObjectStoreInfo::isolatedCopy):
1136         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
1137
1138         * Modules/indexeddb/shared/IDBResultData.cpp:
1139         (WebCore::IDBResultData::createIndexSuccess):
1140         * Modules/indexeddb/shared/IDBResultData.h:
1141
1142         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1143         (WebCore::InProcessIDBServer::didCreateIndex):
1144         (WebCore::InProcessIDBServer::createIndex):
1145         * Modules/indexeddb/shared/InProcessIDBServer.h:
1146
1147         * bindings/js/JSIDBObjectStoreCustom.cpp:
1148         (WebCore::JSIDBObjectStore::createIndex):
1149
1150         * platform/CrossThreadCopier.cpp:
1151         (WebCore::IDBIndexInfo>::copy):
1152         * platform/CrossThreadCopier.h:
1153
1154 2015-11-03  Andy Estes  <aestes@apple.com>
1155
1156         [Cocoa] Only query for kMGQDeviceName on iOS
1157         https://bugs.webkit.org/show_bug.cgi?id=150858
1158
1159         Reviewed by Brent Fulgham.
1160
1161         * platform/ios/Device.cpp:
1162         (WebCore::deviceName): On non-iOS platorms, just return "iPhone" as the device name.
1163
1164 2015-11-03  Geoffrey Garen  <ggaren@apple.com>
1165
1166         Provide a way to turn off const in WebKit2.
1167
1168         Reviewed by Sam Weinig.
1169
1170         * bindings/js/JSDOMWindowBase.cpp:
1171         (WebCore::JSDOMWindowBase::commonVM):
1172         * page/Settings.h:
1173         (WebCore::Settings::shouldUseHighResolutionTimers):
1174         (WebCore::Settings::shouldRewriteConstAsVar):
1175         (WebCore::Settings::setShouldRewriteConstAsVar):
1176         (WebCore::Settings::backgroundShouldExtendBeyondPage):
1177
1178 2015-11-03  Joseph Pecoraro  <pecoraro@apple.com>
1179
1180         Web Inspector: Remove duplication among ScriptDebugServer subclasses
1181         https://bugs.webkit.org/show_bug.cgi?id=150860
1182
1183         Reviewed by Timothy Hatcher.
1184
1185         Refactoring covered by existing tests.
1186
1187         * bindings/js/WorkerScriptDebugServer.cpp:
1188         (WebCore::WorkerScriptDebugServer::attachDebugger):
1189         (WebCore::WorkerScriptDebugServer::detachDebugger):
1190         (WebCore::WorkerScriptDebugServer::addListener): Deleted.
1191         (WebCore::WorkerScriptDebugServer::removeListener): Deleted.
1192         * bindings/js/WorkerScriptDebugServer.h:
1193         * inspector/PageDebuggerAgent.cpp:
1194         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer): Deleted.
1195         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer): Deleted.
1196         * inspector/PageDebuggerAgent.h:
1197         * inspector/PageScriptDebugServer.cpp:
1198         (WebCore::PageScriptDebugServer::attachDebugger):
1199         (WebCore::PageScriptDebugServer::detachDebugger):
1200         (WebCore::PageScriptDebugServer::addListener): Deleted.
1201         (WebCore::PageScriptDebugServer::removeListener): Deleted.
1202         * inspector/PageScriptDebugServer.h:
1203         * inspector/WorkerDebuggerAgent.cpp:
1204         (WebCore::WorkerDebuggerAgent::startListeningScriptDebugServer): Deleted.
1205         (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer): Deleted.
1206         * inspector/WorkerDebuggerAgent.h:
1207
1208 2015-11-03  Jiewen Tan  <jiewen_tan@apple.com>
1209
1210         Null dereference loading Blink layout test scrollbars/custom-scrollbar-appearance-property.html
1211         https://bugs.webkit.org/show_bug.cgi?id=149312
1212         <rdar://problem/22748910>
1213
1214         Reviewed by Darin Adler.
1215
1216         This is a merge from Blink r167503:
1217         https://codereview.chromium.org/173433002
1218
1219         Test: scrollbars/custom-scrollbar-appearance-property.html
1220
1221         * rendering/RenderThemeMac.mm:
1222         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1223         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
1224
1225 2015-11-03  Andreas Kling  <akling@apple.com>
1226
1227         ResourceUsageOverlay should show GC-owned malloc memory.
1228         <https://webkit.org/b/150846>
1229
1230         Reviewed by Anders Carlsson.
1231
1232         Add a memory category for GC-owned malloc memory. This carves a significant chunk off of
1233         the gigantic "bmalloc" mystery slice.
1234
1235         * page/ResourceUsageOverlay.h:
1236         * page/cocoa/ResourceUsageOverlayCocoa.mm:
1237         (WebCore::drawMemoryPie):
1238         (WebCore::ResourceUsageOverlay::draw):
1239         (WebCore::runSamplerThread):
1240
1241 2015-11-03  Saam barati  <sbarati@apple.com>
1242
1243         Rewrite "const" as "var" for iTunes/iBooks on the Mac
1244         https://bugs.webkit.org/show_bug.cgi?id=150852
1245
1246         Reviewed by Geoffrey Garen.
1247
1248         * bindings/js/JSDOMWindowBase.cpp:
1249         (WebCore::JSDOMWindowBase::commonVM):
1250
1251 2015-10-30  Jon Honeycutt  <jhoneycutt@apple.com>
1252
1253         Implement support for the autocomplete attribute
1254         https://bugs.webkit.org/show_bug.cgi?id=150731
1255         rdar://problem/21078968
1256
1257         The autocomplete attribute is defined by
1258         https://html.spec.whatwg.org/multipage/forms.html#autofill.
1259
1260         Reviewed by Brent Fulgham.
1261
1262         Test: fast/forms/autocomplete-tokens.html
1263
1264         * html/HTMLFormControlElement.cpp:
1265         (WebCore::isContactToken):
1266         Return true if this is a contact token.
1267         (WebCore::categoryForAutofillFieldToken):
1268         Adds all of the autofill field tokens to a map, and returns the
1269         category for a given token.
1270         (WebCore::maxTokensForAutofillFieldCategory):
1271         Return the maximum number of tokens an autofill category supports.
1272         (WebCore::HTMLFormControlElement::parseAutocompleteAttribute):
1273         Implement the processing model defined in
1274         https://html.spec.whatwg.org/multipage/forms.html#processing-model-3
1275         with respect to the IDL-exposed autofill value.
1276         (WebCore::HTMLFormControlElement::setAutocomplete):
1277         Set the autocomplete attribute to the given string.
1278
1279         * html/HTMLFormControlElement.h:
1280         Declare setAutocomplete() and autocomplete().
1281
1282         * html/HTMLInputElement.idl:
1283         Remove the Reflect attribute. We now have custom processing for getting
1284         this attribute.
1285
1286         * html/HTMLSelectElement.idl:
1287         Declare the autocomplete attribute.
1288
1289         * html/HTMLTextAreaElement.idl:
1290         Ditto.
1291
1292 2015-11-03  Brady Eidson  <beidson@apple.com>
1293
1294         Modern IDB: Land empty IDBCursor/Index IDL implementations.
1295         https://bugs.webkit.org/show_bug.cgi?id=150839
1296
1297         Reviewed by Alex Christensen.
1298
1299         No new tests (No change in behavior).
1300
1301         * CMakeLists.txt:
1302         * WebCore.xcodeproj/project.pbxproj:
1303
1304         * Modules/indexeddb/IDBIndex.h:
1305         
1306         * Modules/indexeddb/client/IDBCursorImpl.cpp: Added.
1307         (WebCore::IDBClient::IDBCursor::~IDBCursor):
1308         (WebCore::IDBClient::IDBCursor::direction):
1309         (WebCore::IDBClient::IDBCursor::key):
1310         (WebCore::IDBClient::IDBCursor::primaryKey):
1311         (WebCore::IDBClient::IDBCursor::value):
1312         (WebCore::IDBClient::IDBCursor::source):
1313         (WebCore::IDBClient::IDBCursor::update):
1314         (WebCore::IDBClient::IDBCursor::advance):
1315         (WebCore::IDBClient::IDBCursor::continueFunction):
1316         (WebCore::IDBClient::IDBCursor::deleteFunction):
1317         * Modules/indexeddb/client/IDBCursorImpl.h: Added.
1318         
1319         * Modules/indexeddb/client/IDBCursorWithValueImpl.cpp: Added.
1320         * Modules/indexeddb/client/IDBCursorWithValueImpl.h: Added.
1321         
1322         * Modules/indexeddb/client/IDBIndexImpl.cpp: Added.
1323         (WebCore::IDBClient::IDBIndex::~IDBIndex):
1324         (WebCore::IDBClient::IDBIndex::name):
1325         (WebCore::IDBClient::IDBIndex::objectStore):
1326         (WebCore::IDBClient::IDBIndex::keyPathAny):
1327         (WebCore::IDBClient::IDBIndex::keyPath):
1328         (WebCore::IDBClient::IDBIndex::unique):
1329         (WebCore::IDBClient::IDBIndex::multiEntry):
1330         (WebCore::IDBClient::IDBIndex::openCursor):
1331         (WebCore::IDBClient::IDBIndex::count):
1332         (WebCore::IDBClient::IDBIndex::openKeyCursor):
1333         (WebCore::IDBClient::IDBIndex::get):
1334         (WebCore::IDBClient::IDBIndex::getKey):
1335         * Modules/indexeddb/client/IDBIndexImpl.h: Copied from Source/WebCore/Modules/indexeddb/IDBIndex.h.
1336         
1337         * Modules/indexeddb/legacy/LegacyIndex.h:
1338         (WebCore::LegacyIndex::id):
1339         
1340         * Modules/indexeddb/shared/IDBIndexInfo.cpp: Added.
1341         * Modules/indexeddb/shared/IDBIndexInfo.h: Added.
1342         (WebCore::IDBIndexInfo::name):
1343         (WebCore::IDBIndexInfo::keyPath):
1344         (WebCore::IDBIndexInfo::unique):
1345         (WebCore::IDBIndexInfo::multiEntry):
1346
1347 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
1348
1349         Addressing post-review comments on r191934.
1350
1351         Unreviewed.
1352
1353         * platform/graphics/mac/FontCustomPlatformData.cpp:
1354         (WebCore::FontCustomPlatformData::supportsFormat):
1355
1356 2015-11-03  Joseph Pecoraro  <pecoraro@apple.com>
1357
1358         Web Inspector: Move ScriptDebugServer::Task to WorkerScriptDebugServer where it is actually used
1359         https://bugs.webkit.org/show_bug.cgi?id=150847
1360
1361         Reviewed by Timothy Hatcher.
1362
1363         * bindings/js/WorkerScriptDebugServer.cpp:
1364         (WebCore::WorkerScriptDebugServer::interruptAndRunTask):
1365         * bindings/js/WorkerScriptDebugServer.h:
1366         * inspector/WorkerDebuggerAgent.cpp:
1367
1368 2015-11-03  Tim Horton  <timothy_horton@apple.com>
1369
1370         Fix the build.
1371
1372         * platform/Widget.h:
1373         (WebCore::Widget::boundsRect):
1374         (WebCore::Widget::resize):
1375
1376 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
1377
1378         font-variant-* properties in @font-face declarations should be honored
1379         https://bugs.webkit.org/show_bug.cgi?id=149771
1380
1381         Reviewed by Simon Fraser.
1382
1383         According to the CSS Fonts Level 3 spec, web authors are allowed to put
1384         font-feature-settings / font-variant-* inside @font-face blocks. These
1385         properties are supposed to be applied at a specific time during the
1386         font selection algorithm.
1387
1388         This patch gives a FontFeatureSettings object and a FontVariantSettings
1389         object to CSSFontFace, and moves common parsing logic from
1390         StyleBuilderCustom to a shared location. Then, once the two properties
1391         are parsed from the @font-face block, the relevant data structures are
1392         passed down into the font selection algorithm. This algorithm then
1393         consults with these values at the correct time (inside
1394         preparePlatformFont()).
1395
1396         Tests: css3/font-feature-settings-font-face-rendering.html
1397                css3/font-variant-font-face-all.html
1398                css3/font-variant-font-face-override.html
1399
1400         * WebCore.xcodeproj/project.pbxproj: Add a header for the common
1401         location of parsing font-variant-ligatures, font-variant-numeric,
1402         and font-variant-east-asian.
1403         * css/CSSFontFace.cpp:
1404         (WebCore::CSSFontFace::font): Pass the relevant data structures
1405         into the font selection algorithm.
1406         * css/CSSFontFace.h: Add FontFeatureSettings and FontVariantSettings
1407         member variables.
1408         (WebCore::CSSFontFace::insertFeature):
1409         (WebCore::CSSFontFace::setVariantCommonLigatures):
1410         (WebCore::CSSFontFace::setVariantDiscretionaryLigatures):
1411         (WebCore::CSSFontFace::setVariantHistoricalLigatures):
1412         (WebCore::CSSFontFace::setVariantContextualAlternates):
1413         (WebCore::CSSFontFace::setVariantPosition):
1414         (WebCore::CSSFontFace::setVariantCaps):
1415         (WebCore::CSSFontFace::setVariantNumericFigure):
1416         (WebCore::CSSFontFace::setVariantNumericSpacing):
1417         (WebCore::CSSFontFace::setVariantNumericFraction):
1418         (WebCore::CSSFontFace::setVariantNumericOrdinal):
1419         (WebCore::CSSFontFace::setVariantNumericSlashedZero):
1420         (WebCore::CSSFontFace::setVariantAlternates):
1421         (WebCore::CSSFontFace::setVariantEastAsianVariant):
1422         (WebCore::CSSFontFace::setVariantEastAsianWidth):
1423         (WebCore::CSSFontFace::setVariantEastAsianRuby):
1424         * css/CSSFontFaceSource.cpp:
1425         (WebCore::CSSFontFaceSource::font): Pass the relevant data
1426         structures into the font selection algorithm.
1427         * css/CSSFontFaceSource.h: Ditto.
1428         * css/CSSFontSelector.cpp:
1429         (WebCore::CSSFontSelector::addFontFaceRule): Call the shared
1430         parsing logic to populate the FontFeatureSettings and
1431         FontVariantSettings members.
1432         * css/FontVariantBuilder.h: Added. Destination for shared parsing
1433         logic.
1434         (WebCore::applyValueFontVariantLigatures):
1435         (WebCore::applyValueFontVariantNumeric):
1436         (WebCore::applyValueFontVariantEastAsian):
1437         * css/StyleBuilderCustom.h: Source for shared parsing logic.
1438         (WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
1439         (WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
1440         (WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
1441         * loader/cache/CachedFont.cpp: Pass the relevant data structures
1442         into the font selection algorithm.
1443         (WebCore::CachedFont::createFont):
1444         (WebCore::CachedFont::platformDataFromCustomData):
1445         * loader/cache/CachedFont.h: Ditto.
1446         * loader/cache/CachedSVGFont.cpp: Ditto.
1447         (WebCore::CachedSVGFont::createFont):
1448         (WebCore::CachedSVGFont::platformDataFromCustomData):
1449         * loader/cache/CachedSVGFont.h: Ditto.
1450         * platform/graphics/FontCache.h: Ditto.
1451         * platform/graphics/FontCascade.cpp:
1452         (WebCore::FontCascade::codePath): Adjust comment.
1453         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1454         (WebCore::preparePlatformFont): Consult with the newly parsed values.
1455         (WebCore::fontWithFamily): Pass the relevant data structures into the
1456         font selection algorithm.
1457         (WebCore::FontCache::systemFallbackForCharacters): Ditto.
1458         * platform/graphics/mac/FontCustomPlatformData.cpp:
1459         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
1460         * platform/graphics/mac/FontCustomPlatformData.h: Ditto.
1461
1462 2015-11-03  Joseph Pecoraro  <pecoraro@apple.com>
1463
1464         Web Inspector: Handle or Remove ParseHTML Timeline Event Records
1465         https://bugs.webkit.org/show_bug.cgi?id=150689
1466
1467         Reviewed by Timothy Hatcher.
1468
1469         Remove ParseHTML nesting recordings. We were not using them
1470         and for most pages their self-time is very small in comparison
1471         to other events. We may consider adding it back later for
1472         UI purposes but for now the frontend doesn't use the records
1473         so lets remove it.
1474
1475         * html/parser/HTMLDocumentParser.cpp:
1476         (WebCore::HTMLDocumentParser::pumpTokenizer): Deleted.
1477         * inspector/InspectorInstrumentation.cpp:
1478         (WebCore::InspectorInstrumentation::willWriteHTMLImpl): Deleted.
1479         (WebCore::InspectorInstrumentation::didWriteHTMLImpl): Deleted.
1480         * inspector/InspectorInstrumentation.h:
1481         (WebCore::InspectorInstrumentation::willWriteHTML): Deleted.
1482         (WebCore::InspectorInstrumentation::didWriteHTML): Deleted.
1483         * inspector/InspectorTimelineAgent.cpp:
1484         (WebCore::InspectorTimelineAgent::willWriteHTML): Deleted.
1485         (WebCore::InspectorTimelineAgent::didWriteHTML): Deleted.
1486         (WebCore::toProtocol): Deleted.
1487         * inspector/InspectorTimelineAgent.h:
1488         * inspector/TimelineRecordFactory.cpp:
1489         (WebCore::TimelineRecordFactory::createParseHTMLData): Deleted.
1490         * inspector/TimelineRecordFactory.h:
1491
1492 2015-11-03  Keith Rollin  <krollin@apple.com>
1493
1494         HTMLOptionElement.text should never return the value of label
1495         https://bugs.webkit.org/show_bug.cgi?id=148862
1496         rdar://problem/22589226
1497
1498         Reviewed by Darin Adler.
1499
1500         According to the HTML spec, `option` elements should have the
1501         following behavior:
1502
1503             - the `text` property should return text contents of element
1504             - the `label` property should return value of label attribute if
1505               it exists, else return text property
1506             - the UI should display label property
1507
1508         12 years ago, in order to be compatibile with browsers of the time, we
1509         diverged from this behavior: the text property behaved like the label
1510         property, and the text property was used for display. This resulted in
1511         our UI incidentally conforming to the spec, but also in the text
1512         property *not* conforming to the spec. See <rdar://problem/3532519>
1513         for discussion on this change.
1514
1515         The behavior of the browsers we were conforming to has changed. In
1516         particular, the text property in Firefox now conforms to the spec
1517         instead of behaving as we did. Therefore, it's less important to
1518         retain our old behavior for the sake of compatibility. This check-in
1519         brings us into conformance with the spec. The result is that the UI
1520         stays the same, but the text property will return different values than
1521         it used to if the option element has a label attribute that used to
1522         hide it.
1523
1524         Updated tests:
1525         - fast/dom/HTMLOptionElement/option-text.html:
1526         - fast/forms/HTMLOptionElement_label01.html:
1527         - fast/forms/HTMLOptionElement_label02.html:
1528         - fast/forms/HTMLOptionElement_label03.html:
1529         - fast/forms/HTMLOptionElement_label04.html:
1530         - fast/forms/HTMLOptionElement_label05.html:
1531         - fast/forms/HTMLOptionElement_label06.html:
1532         - fast/forms/HTMLOptionElement_label07.html:
1533         - fast/forms/option-value-and-label.html:
1534
1535         * accessibility/AccessibilityListBoxOption.cpp:
1536         (WebCore::AccessibilityListBoxOption::stringValue):
1537         * accessibility/AccessibilityMenuListOption.cpp:
1538         (WebCore::AccessibilityMenuListOption::stringValue):
1539         * html/HTMLOptionElement.cpp:
1540         (WebCore::HTMLOptionElement::text):
1541         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
1542
1543 2015-11-03  Andreas Kling  <akling@apple.com>
1544
1545         ResourceUsageOverlay should draw itself using WebCore::GraphicsContext.
1546         <https://webkit.org/b/150841>
1547
1548         Reviewed by Antti Koivisto.
1549
1550         Use WebCore text drawing primitives instead of poking at the CGContext directly.
1551         And stop using deprecated CoreGraphics APIs, too.
1552
1553         * page/cocoa/ResourceUsageOverlayCocoa.mm:
1554         (WebCore::drawCpuHistory):
1555         (WebCore::drawGCHistory):
1556
1557             Adjust for unflipped Y axis.
1558
1559         (WebCore::fontCascade):
1560         (WebCore::showText):
1561
1562             Draw using WebCore text drawing primitives.
1563
1564         (WebCore::ResourceUsageOverlay::draw):
1565
1566             Remove CGContext calls and stop flipping the Y axis.
1567
1568 2015-11-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1569
1570         [Streams API] Vended promise capabilities should not need @resolve/@reject fields
1571         https://bugs.webkit.org/show_bug.cgi?id=150835
1572
1573         Reviewed by Darin Adler.
1574
1575         No change in behavior, covered by existing tests.
1576
1577         * Modules/streams/ReadableStreamInternals.js:
1578         (privateInitializeReadableStreamReader): Removed @resolve/@reject fields from resolved/rejected @closedPromiseCapability.
1579         * Modules/streams/WritableStream.js:
1580         (initializeWritableStream): Removed @resolve/@reject fields from resolved readyPromiseCapability.
1581         * Modules/streams/WritableStreamInternals.js:
1582         (syncWritableStreamStateWithQueue): Updated code to be closer to spec and removing the need to resolve an already resolved promise.
1583
1584 2015-11-03  Hunseop Jeong  <hs85.jeong@samsung.com>
1585
1586         Replace 0 and NULL with nullptr in WebCore/dom.
1587         https://bugs.webkit.org/show_bug.cgi?id=150788
1588
1589         Reviewed by Darin Adler.
1590
1591         No new tests because there is no behavior change.
1592
1593         * dom/Attr.cpp:
1594         (WebCore::Attr::Attr):
1595         (WebCore::Attr::detachFromElementWithValue):
1596         (WebCore::Attr::attachToElement):
1597         * dom/Attr.h:
1598         * dom/CheckedRadioButtons.cpp:
1599         (WebCore::RadioButtonGroup::updateCheckedState):
1600         (WebCore::CheckedRadioButtons::checkedButtonForGroup):
1601         (WebCore::CheckedRadioButtons::isInRequiredGroup):
1602         * dom/ChildListMutationScope.cpp:
1603         (WebCore::ChildListMutationAccumulator::enqueueMutationRecord):
1604         * dom/ContainerNode.cpp:
1605         (WebCore::ContainerNode::removeBetween):
1606         * dom/ContainerNode.h:
1607         (WebCore::ContainerNode::ContainerNode):
1608         * dom/ContainerNodeAlgorithms.cpp:
1609         (WebCore::notifyNodeRemovedFromDocument):
1610         * dom/Document.h:
1611         (WebCore::Document::wellFormed):
1612         (WebCore::Document::scriptRunner):
1613         (WebCore::Document::moduleLoader):
1614         (WebCore::Document::currentScript):
1615         (WebCore::Document::webkitFullscreenElement):
1616         * dom/DocumentOrderedMap.h:
1617         (WebCore::DocumentOrderedMap::MapEntry::MapEntry):
1618         * dom/DocumentParser.cpp:
1619         (WebCore::DocumentParser::detach):
1620         (WebCore::DocumentParser::suspendScheduledTasks):
1621         * dom/Element.cpp:
1622         (WebCore::Element::setAttributeInternal):
1623         (WebCore::Element::shadowRoot):
1624         (WebCore::Element::blur):
1625         (WebCore::Element::beforePseudoElement):
1626         (WebCore::Element::afterPseudoElement):
1627         (WebCore::Element::setBeforePseudoElement):
1628         * dom/Event.cpp:
1629         (WebCore::Event::Event):
1630         * dom/Event.h:
1631         (WebCore::Event::legacyReturnValue):
1632         (WebCore::Event::setLegacyReturnValue):
1633         (WebCore::Event::clipboardData):
1634         * dom/EventContext.cpp:
1635         (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):
1636         * dom/EventDispatcher.cpp:
1637         (WebCore::EventPath::lastContextIfExists):
1638         (WebCore::EventDispatcher::dispatchEvent):
1639         * dom/EventListenerMap.cpp:
1640         (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
1641         (WebCore::EventListenerIterator::EventListenerIterator):
1642         * dom/EventListenerMap.h:
1643         * dom/EventTarget.cpp:
1644         (WebCore::EventTarget::fireEventListeners):
1645         * dom/FocusEvent.cpp:
1646         (WebCore::FocusEventInit::FocusEventInit):
1647         * dom/GenericEventQueue.cpp:
1648         (WebCore::GenericEventQueue::enqueueEvent):
1649         * dom/IdTargetObserverRegistry.h:
1650         (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
1651         (WebCore::IdTargetObserverRegistry::notifyObservers):
1652         * dom/IgnoreDestructiveWriteCountIncrementer.h:
1653         (WebCore::IgnoreDestructiveWriteCountIncrementer::IgnoreDestructiveWriteCountIncrementer):
1654         * dom/MessageEvent.cpp:
1655         (WebCore::MessageEvent::MessageEvent):
1656         * dom/MessageEvent.h:
1657         * dom/MessagePort.cpp:
1658         (WebCore::MessagePort::contextDestroyed):
1659         (WebCore::MessagePort::dispatchMessages):
1660         (WebCore::MessagePort::locallyEntangledPort):
1661         (WebCore::MessagePort::disentanglePorts):
1662         * dom/MouseEvent.cpp:
1663         (WebCore::MouseEventInit::MouseEventInit):
1664         (WebCore::MouseEvent::cloneFor):
1665         * dom/MouseEvent.h:
1666         (WebCore::MouseEvent::dataTransfer):
1667         * dom/MouseRelatedEvent.cpp:
1668         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1669         (WebCore::MouseRelatedEvent::computeRelativePosition):
1670         * dom/MutationEvent.h:
1671         * dom/Node.cpp:
1672         (WebCore::Node::nodeLists):
1673         (WebCore::Node::clearNodeLists):
1674         (WebCore::Node::nonShadowBoundaryParentNode):
1675         (WebCore::Node::parentOrShadowHostElement):
1676         * dom/Node.h:
1677         * dom/NodeRareData.h:
1678         (WebCore::NodeListsNodeData::removeCachedCollection):
1679         (WebCore::NodeListsNodeData::isEmpty):
1680         * dom/PendingScript.cpp:
1681         (WebCore::PendingScript::releaseElementAndClear):
1682         * dom/PopStateEvent.cpp:
1683         (WebCore::PopStateEvent::PopStateEvent):
1684         * dom/Position.h:
1685         (WebCore::Position::deprecatedNode):
1686         (WebCore::Position::document):
1687         (WebCore::Position::rootEditableElement):
1688         * dom/PositionIterator.cpp:
1689         (WebCore::PositionIterator::decrement):
1690         * dom/PositionIterator.h:
1691         (WebCore::PositionIterator::PositionIterator):
1692         * dom/ProcessingInstruction.cpp:
1693         (WebCore::ProcessingInstruction::ProcessingInstruction):
1694         (WebCore::ProcessingInstruction::checkStyleSheet):
1695         (WebCore::ProcessingInstruction::parseStyleSheet):
1696         * dom/ProcessingInstruction.h:
1697         * dom/RangeBoundaryPoint.h:
1698         (WebCore::RangeBoundaryPoint::RangeBoundaryPoint):
1699         * dom/ScriptElement.cpp:
1700         (WebCore::ScriptElement::ScriptElement):
1701         (WebCore::ScriptElement::stopLoadRequest):
1702         (WebCore::ScriptElement::notifyFinished):
1703         (WebCore::ScriptElement::ignoresLoadRequest):
1704         * dom/ScriptedAnimationController.h:
1705         (WebCore::ScriptedAnimationController::create):
1706         (WebCore::ScriptedAnimationController::clearDocumentPointer):
1707         * dom/StyledElement.cpp:
1708         (WebCore::PresentationAttributeCacheKey::PresentationAttributeCacheKey):
1709         (WebCore::StyledElement::addSubresourceAttributeURLs):
1710         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
1711         * dom/StyledElement.h:
1712         (WebCore::StyledElement::additionalPresentationAttributeStyle):
1713         (WebCore::StyledElement::inlineStyle):
1714         * dom/TemplateContentDocumentFragment.h:
1715         * dom/TextEvent.cpp:
1716         (WebCore::TextEvent::TextEvent):
1717         * dom/UIEvent.cpp:
1718         (WebCore::UIEventInit::UIEventInit):
1719         * dom/UserTypingGestureIndicator.cpp:
1720         (WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
1721         (WebCore::UserTypingGestureIndicator::~UserTypingGestureIndicator):
1722         * dom/ViewportArguments.cpp:
1723         (WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable):
1724         (WebCore::numericPrefix):
1725         * dom/default/PlatformMessagePortChannel.cpp:
1726         (WebCore::MessagePortChannel::disentangle):
1727         (WebCore::MessagePortChannel::postMessageToRemote):
1728         (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
1729         * dom/default/PlatformMessagePortChannel.h:
1730
1731 2015-11-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1732
1733         Tapping *below* some <input>s can focus them in Mobile Safari
1734         https://bugs.webkit.org/show_bug.cgi?id=146244
1735         <rdar://problem/21509310>
1736
1737         Reviewed by Darin Adler.
1738
1739         Removes iOS-specific logic in positionForPointRespectingEditingBoundaries that was causing us to focus inputs by
1740         tapping on the document element. We believe this logic, which causes VisiblePosition finding to recurse from a non-
1741         editable element to an editable child, is not necessary to focus editable elements underneath non-editable elements,
1742         since hit-testing will already have selected the contentEditable element prior to searching for a suitable
1743         VisiblePosition. Further investigation shows that this logic was added to fix <rdar://problem/5545799>, in which the
1744         first character in a Notes document could not be selected. However, I have not been able to reproduce this bug after
1745         removing this logic.
1746
1747         As a result of this change, we can also enable a WK1 test, editing/selection/click-outside-editable-div.html, that
1748         had also been marked as failing due to positionForPointRespectingEditingBoundaries recursing into a contentEditable
1749         div.
1750
1751         Test: fast/events/ios/clicking-document-should-not-trigger-focus.html
1752
1753         * rendering/RenderBlock.cpp:
1754         (WebCore::positionForPointRespectingEditingBoundaries): Deleted.
1755
1756 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
1757
1758         Update to match text-orientation spec
1759         https://bugs.webkit.org/show_bug.cgi?id=150765
1760
1761         Reviewed by Darin Adler.
1762
1763         The CSS spec has removed the "sideways-right" value of text-orientation in favor
1764         of "sideways." This patch makes the parser treat "sideways-right" the same as
1765         "sideways."
1766
1767         Test: fast/text/orientation-sideways-right.html
1768
1769         * css/CSSPrimitiveValueMappings.h:
1770         (WebCore::CSSPrimitiveValue::operator TextOrientation):
1771         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
1772         * rendering/style/RenderStyle.cpp:
1773         (WebCore::RenderStyle::fontAndGlyphOrientation): Deleted.
1774         * rendering/style/RenderStyleConstants.h:
1775
1776 2015-11-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1777
1778         [Streams API] Rework promises to use @newPromiseCapability
1779         https://bugs.webkit.org/show_bug.cgi?id=150627
1780
1781         Reviewed by Youenn Fablet.
1782
1783         We are removing the stream promises functions in favor of @newPromiseCapabity which basically provides the same
1784         functionality (keeping the resolve and reject functions without external slots). Slots and variables were
1785         renamed as *PromiseCapability to show that they no longer hold just a promise, but a promise capability.
1786
1787         Internal rework, no new tests needed.
1788
1789         * Modules/streams/ReadableStreamInternals.js:
1790         (privateInitializeReadableStreamReader.this.closedPromiseCapability.resolve):
1791         (privateInitializeReadableStreamReader.this.closedPromiseCapability.reject):
1792         (privateInitializeReadableStreamReader):
1793         (teeReadableStream):
1794         (teeReadableStreamBranch2CancelFunction):
1795         (errorReadableStream):
1796         (closeReadableStreamReader):
1797         (enqueueInReadableStream):
1798         (readFromReadableStreamReader):
1799         * Modules/streams/ReadableStreamReader.js:
1800         (closed):
1801         * Modules/streams/StreamInternals.js:
1802         (createNewStreamsPromise): Deleted.
1803         (resolveStreamsPromise): Deleted.
1804         (rejectStreamsPromise): Deleted.
1805         * Modules/streams/WritableStream.js:
1806         (this.readyPromiseCapability.resolve):
1807         (this.readyPromiseCapability.reject):
1808         (initializeWritableStream):
1809         (close):
1810         (write):
1811         (closed):
1812         (ready):
1813         * Modules/streams/WritableStreamInternals.js:
1814         (syncWritableStreamStateWithQueue):
1815         (errorWritableStream):
1816         * bindings/js/WebCoreBuiltinNames.h:
1817
1818 2015-11-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1819
1820         Move webkitGetUserMedia to JS Builtin
1821         https://bugs.webkit.org/show_bug.cgi?id=149499
1822
1823         Reviewed by Darin Adler.
1824
1825         Implemented webkitGetUserMedia as a JSBuiltin wrapper around navigator.mediaDevices.getUserMedia.
1826
1827         Removed cpp based version.
1828
1829         The js builting implementation checks for argument but does not raise exception when the request is not supported.
1830         The error callback is called instead, in an asynchronous fashion.
1831         The js builtin implementation does not check first that it is called on navigator, contrary to the cpp implementation.
1832         This is done afterwards when calling navigator.MediaDevices.@getUserMedia.
1833
1834         Covered by existing and modified tests.
1835
1836         * CMakeLists.txt: Adding NavigatorUserMedia.js as built-in JS file.
1837         * DerivedSources.make: Ditto.
1838         * Modules/mediastream/NavigatorUserMedia.idl: Making webkitGetUserMedia JSBuiltin
1839         * Modules/mediastream/NavigatorUserMedia.js:
1840         (webkitGetUserMedia):
1841         * Modules/mediastream/NavigatorUserMediaErrorCallback.h: Removed.
1842         * Modules/mediastream/NavigatorUserMediaErrorCallback.idl: Removed.
1843         * Modules/mediastream/NavigatorUserMediaSuccessCallback.h: Removed.
1844         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl: Removed.
1845         * Modules/mediastream/UserMediaRequest.cpp:
1846         * Modules/mediastream/UserMediaRequest.h:
1847         * WebCore.xcodeproj/project.pbxproj:
1848         * bindings/js/JSDOMWindowBase.cpp:
1849         (WebCore::JSDOMWindowBase::finishCreation): Style modifications.
1850         * bindings/js/JSNavigatorCustom.cpp: Removed.
1851         * bindings/js/WebCoreJSBuiltins.cpp: Adding support for NavigatorUserMedia.js built-in JS file.
1852         * bindings/js/WebCoreJSBuiltins.h: Ditto.
1853         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
1854         (WebCore::JSBuiltinFunctions::navigatorUserMediaBuiltins):
1855
1856 2015-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1857
1858         [GStreamer] Use GstBus sync message handler and schedule tasks to the main thread with RunLoop::dispatch
1859         https://bugs.webkit.org/show_bug.cgi?id=150800
1860
1861         Reviewed by Philippe Normand.
1862
1863         This way we would avoid all the GScource + polling mechanism that
1864         GST uses internally to handle messages asynchronously in the main thread.
1865
1866         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
1867         (WTF::adoptGRef):
1868         (WTF::refGPtr<GstMessage>):
1869         (WTF::derefGPtr<GstMessage>):
1870         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
1871         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1872         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1873         Initialize the WeakPtr factory.
1874         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1875         reset the GstBus sync handler.
1876         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Make it void.
1877         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Add a
1878         GstBus sync message handler and schedule the messages to the main
1879         thread with RunLoop::main().dispatch().
1880         (WebCore::mediaPlayerPrivateMessageCallback): Deleted.
1881         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1882         (WebCore::MediaPlayerPrivateGStreamer::createWeakPtr): Create a WeakPtr.
1883         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1884         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
1885         Handle the need context message that needs to be handled in the
1886         caller thread.
1887         (WebCore::mediaPlayerPrivateNeedContextMessageCallback): Deleted.
1888         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1889         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline): Do not
1890         connect to sync-message signal, handleSyncMessage() will be called
1891         to handled messages synchronously.
1892         (WebCore::MediaPlayerPrivateGStreamerBase::handleNeedContextMessage): Deleted.
1893         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1894
1895 2015-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1896
1897         [GStreamer] Cleanup the iradio properties
1898         https://bugs.webkit.org/show_bug.cgi?id=148522
1899
1900         Reviewed by Philippe Normand.
1901
1902         Remove unused icecast code.
1903
1904         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1905         (StreamingClient::handleResponseReceived):
1906         (webKitWebSrcGetProperty): Deleted.
1907         (webKitWebSrcStop): Deleted.
1908
1909 2015-11-02  Keith Rollin  <krollin@apple.com>
1910
1911         input[type=number] does not increment/decrement integers with trailing decimal characters
1912         https://bugs.webkit.org/show_bug.cgi?id=148867
1913         rdar://problem/22589693
1914
1915         Reviewed by Chris Dumez.
1916
1917         Support input[type=number].value attributes of the form "###." (that
1918         is, leading digits with a decimal but no trailing digits). This form
1919         was supported in the setting of the attribute, but not when changing
1920         it through stepUp/Down.
1921
1922         Testing turned up similarly incorrect processing of -.###, so
1923         addressed that, too.
1924
1925         Test: fast/forms/range/input-appearance-range-decimals.html
1926
1927         Updated the following tests:
1928         - fast/forms/number/number-stepup-stepdown-from-renderer.html
1929         - fast/forms/number/number-stepup-stepdown.html
1930         - fast/forms/range/range-stepup-stepdown-from-renderer.html
1931         - fast/forms/range/range-stepup-stepdown.html
1932
1933         * html/InputType.cpp:
1934         (WebCore::InputType::stepUpFromRenderer):
1935         * platform/Decimal.cpp:
1936         (WebCore::Decimal::fromString):
1937
1938 2015-11-02  Jiewen Tan  <jiewen_tan@apple.com>
1939
1940         Null dereference loading Blink layout test fast/css/background-repeat-null-y-crash.html
1941         https://bugs.webkit.org/show_bug.cgi?id=150211
1942         <rdar://problem/23137321>
1943
1944         Reviewed by Alex Christensen.
1945
1946         This is a merge of Blink r188842:
1947         https://codereview.chromium.org/846933002
1948
1949         By setting the backgroundRepeatY property to null it can
1950         happen that accessing that CSS value returns a null pointer.
1951         In that case simply bail out early.
1952
1953         Test: fast/css/background-repeat-null-y-crash.html
1954
1955         * css/StyleProperties.cpp:
1956         (WebCore::StyleProperties::getLayeredShorthandValue):
1957
1958 2015-11-02  Myles C. Maxfield  <mmaxfield@apple.com>
1959
1960         [Vertical Writing Mode] Rename "vertical-right" CSS value to match spec
1961         https://bugs.webkit.org/show_bug.cgi?id=150766
1962
1963         Reviewed by Darin Adler.
1964
1965         The spec has changed the initial value of text-orientation from "vertical-right"
1966         to "mixed." This patch follows this movement, but also keeps the existing
1967         property working (the parser will treat both values the same).
1968
1969         Test: fast/text/vertical-mixed.html
1970
1971         * css/CSSParser.cpp:
1972         (WebCore::CSSParser::parseValue):
1973         * css/CSSPrimitiveValueMappings.h:
1974         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1975         (WebCore::CSSPrimitiveValue::operator TextOrientation):
1976         * css/CSSValueKeywords.in:
1977         * css/StyleResolver.cpp:
1978         (WebCore::checkForOrientationChange):
1979         * platform/graphics/FontCascadeFonts.cpp:
1980         (WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
1981         * platform/graphics/FontDescription.cpp:
1982         (WebCore::FontDescription::FontDescription):
1983         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1984         (WebCore::FontCascade::fontForCombiningCharacterSequence):
1985         * platform/text/TextFlags.h:
1986         * rendering/style/RenderStyle.cpp:
1987         (WebCore::RenderStyle::getFontAndGlyphOrientation):
1988         * rendering/style/RenderStyle.h:
1989         * rendering/style/RenderStyleConstants.h:
1990         * rendering/style/StyleRareInheritedData.cpp:
1991         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1992         * style/StyleResolveForDocument.cpp:
1993         (WebCore::Style::resolveForDocument):
1994
1995 2015-11-02  Myles C. Maxfield  <mmaxfield@apple.com>
1996
1997         [Cocoa] Support WOFF2
1998         https://bugs.webkit.org/show_bug.cgi?id=150830
1999
2000         Reviewed by Zalan Bujtas.
2001
2002         On platforms which support it, WebKit only needs to recognize WOFF2.
2003
2004         Test: fast/text/woff2.html
2005
2006         * platform/graphics/mac/FontCustomPlatformData.cpp:
2007         (WebCore::FontCustomPlatformData::supportsFormat):
2008
2009 2015-11-02  Nan Wang  <n_wang@apple.com>
2010
2011         AX: Add support for ARIA 1.1 attribute 'aria-modal' for dialog and alertdialog
2012         https://bugs.webkit.org/show_bug.cgi?id=138566
2013
2014         Reviewed by Chris Fleizach.
2015
2016         Added support for aria-modal attribute on dialog/alertdialog roles.
2017         When modal dialog is displayed, all other contents will be unaccessible.
2018
2019         Tests: accessibility/aria-modal-multiple-dialogs.html
2020                accessibility/aria-modal.html
2021
2022         * accessibility/AXObjectCache.cpp:
2023         (WebCore::AXObjectCache::AXObjectCache):
2024         (WebCore::AXObjectCache::~AXObjectCache):
2025         (WebCore::AXObjectCache::findAriaModalNodes):
2026         (WebCore::AXObjectCache::updateCurrentAriaModalNode):
2027         (WebCore::AXObjectCache::isNodeVisible):
2028         (WebCore::AXObjectCache::ariaModalNode):
2029         (WebCore::AXObjectCache::focusedImageMapUIElement):
2030         (WebCore::AXObjectCache::remove):
2031         (WebCore::AXObjectCache::handleAttributeChanged):
2032         (WebCore::AXObjectCache::handleAriaModalChange):
2033         (WebCore::AXObjectCache::labelChanged):
2034         * accessibility/AXObjectCache.h:
2035         (WebCore::AXObjectCache::handleActiveDescendantChanged):
2036         (WebCore::AXObjectCache::handleAriaExpandedChange):
2037         (WebCore::AXObjectCache::handleAriaRoleChanged):
2038         (WebCore::AXObjectCache::handleAriaModalChange):
2039         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
2040         (WebCore::AXObjectCache::handleScrollbarUpdate):
2041         (WebCore::AXObjectCache::handleAttributeChanged):
2042         * accessibility/AccessibilityObject.cpp:
2043         (WebCore::AccessibilityObject::ariaCurrentState):
2044         (WebCore::AccessibilityObject::isAriaModalDescendant):
2045         (WebCore::AccessibilityObject::ignoredFromARIAModalPresence):
2046         (WebCore::AccessibilityObject::hasTagName):
2047         (WebCore::AccessibilityObject::defaultObjectInclusion):
2048         * accessibility/AccessibilityObject.h:
2049         * html/HTMLAttributeNames.in:
2050
2051 2015-11-02  Brady Eidson  <beidson@apple.com>
2052
2053         Modern IDB: IBDObjectStore.delete() support.
2054         https://bugs.webkit.org/show_bug.cgi?id=150784
2055
2056         Reviewed by Alex Christensen.
2057
2058         Tests: storage/indexeddb/modern/idbobjectstore-delete-1.html
2059                storage/indexeddb/modern/idbobjectstore-delete-2.html
2060                storage/indexeddb/modern/idbobjectstore-delete-failures.html
2061
2062         * Modules/indexeddb/IDBKeyRangeData.cpp:
2063         (WebCore::IDBKeyRangeData::isValid):
2064         * Modules/indexeddb/IDBKeyRangeData.h:
2065         
2066         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2067         (WebCore::IDBClient::IDBConnectionToServer::deleteRecord):
2068         (WebCore::IDBClient::IDBConnectionToServer::didDeleteRecord):
2069         * Modules/indexeddb/client/IDBConnectionToServer.h:
2070         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2071         
2072         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2073         (WebCore::IDBClient::IDBObjectStore::get):
2074         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
2075         
2076         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2077         (WebCore::IDBClient::IDBTransaction::requestDeleteRecord):
2078         (WebCore::IDBClient::IDBTransaction::deleteRecordOnServer):
2079         (WebCore::IDBClient::IDBTransaction::didDeleteRecordOnServer):
2080         * Modules/indexeddb/client/IDBTransactionImpl.h:
2081         
2082         * Modules/indexeddb/server/IDBBackingStore.h:
2083         
2084         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2085         (WebCore::IDBServer::IDBConnectionToClient::didDeleteRecord):
2086         * Modules/indexeddb/server/IDBConnectionToClient.h:
2087         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2088         
2089         * Modules/indexeddb/server/IDBServer.cpp:
2090         (WebCore::IDBServer::IDBServer::deleteRecord):
2091         * Modules/indexeddb/server/IDBServer.h:
2092         
2093         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2094         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
2095         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRecord): Deleted.
2096         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2097         
2098         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2099         (WebCore::IDBServer::MemoryObjectStore::deleteRange):
2100         * Modules/indexeddb/server/MemoryObjectStore.h:
2101         
2102         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2103         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2104         (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
2105         (WebCore::IDBServer::UniqueIDBDatabase::performDeleteRecord):
2106         (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteRecord):
2107         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2108         
2109         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2110         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
2111         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
2112         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2113         
2114         * Modules/indexeddb/shared/IDBResultData.cpp:
2115         (WebCore::IDBResultData::deleteRecordSuccess):
2116         * Modules/indexeddb/shared/IDBResultData.h:
2117         
2118         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2119         (WebCore::InProcessIDBServer::didDeleteRecord):
2120         (WebCore::InProcessIDBServer::deleteRecord):
2121         * Modules/indexeddb/shared/InProcessIDBServer.h:
2122
2123 2015-11-02  Andy Estes  <aestes@apple.com>
2124
2125         Fix the iOS build again.
2126
2127         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: supportsPictureInPicture() needs to be declared even when
2128         AVKit is disabled.
2129
2130 2015-11-02  Tim Horton  <timothy_horton@apple.com>
2131
2132         PDFPlugin should take advantage of threaded scrolling
2133         https://bugs.webkit.org/show_bug.cgi?id=150037
2134
2135         Reviewed by Anders Carlsson.
2136
2137         * page/PageOverlay.cpp:
2138         (WebCore::PageOverlay::PageOverlay):
2139         (WebCore::PageOverlay::setNeedsDisplay):
2140         Don't reset the overlay layer's opacity if we're not animating,
2141         because it's possible the client wants to manage it.
2142
2143         * page/PageOverlayController.cpp:
2144         (WebCore::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
2145         Let the overlay itself determine whether it needes synchronous scrolling,
2146         and let PageOverlay clients override the default.
2147
2148         * platform/Widget.h:
2149         (WebCore::Widget::boundsRect):
2150         Export a few useful things.
2151
2152 2015-11-02  Chris Dumez  <cdumez@apple.com>
2153
2154         Regression(r191673): Crash in RunLoopTimer::schedule()
2155         https://bugs.webkit.org/show_bug.cgi?id=150816
2156         <rdar://problem/23335285>
2157
2158         Reviewed by Anders Carlsson.
2159
2160         The crash was happening when the RunLoopTimer would fire during the
2161         call to RunLoopTimer::schedule(), which can happen because we are
2162         calling schedule() from a background thread. In such case, the
2163         timerFired() callback execution would cause |this| to get destroyed.
2164
2165         To avoid this issue, DecodingResultDispatcher is now ref-counted. The
2166         object is ref'd while calling startTimer() so that the object cannot go
2167         away during the execution of this method. Also, we explicitly ref the
2168         object when starting the timer to keep the object alive until the
2169         RunLoopTimer has fired, at which point we explicitely de-ref.
2170
2171         This should handle correctly the cases where the RunLoopTimer fires
2172         during AND after the execution of startTimer().
2173
2174         * platform/network/DataURLDecoder.cpp:
2175         (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
2176         (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
2177         (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
2178
2179 2015-11-02  Andy Estes  <aestes@apple.com>
2180
2181         [Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
2182         https://bugs.webkit.org/show_bug.cgi?id=150819
2183
2184         Reviewed by Dan Bernstein.
2185
2186         This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
2187
2188         * Configurations/Base.xcconfig:
2189
2190 2015-11-02  Brent Fulgham  <bfulgham@apple.com>
2191
2192         [Win] MiniBrowser unable to use WebInspector
2193         https://bugs.webkit.org/show_bug.cgi?id=150810
2194         <rdar://problem/23358514>
2195
2196         Reviewed by Timothy Hatcher.
2197
2198         The CMakeList rule for creating the InjectedScriptSource.min.js was improperly including
2199         the quote characters in the text prepended to InjectedScriptSource.min.js. This caused a
2200         parsing error in the JS file.
2201         
2202         The solution was to switch from using "COMMAND echo" to use the more cross-platform
2203         compatible command "COMMAND ${CMAKE_COMMAND} -E echo ...", which handles the string
2204         escaping properly on all platforms.
2205
2206         * CMakeLists.txt: Switch the 'echo' command syntax to be more cross-platform.
2207
2208 2015-11-02  Zalan Bujtas  <zalan@apple.com>
2209
2210         hasOverflowClip() does not necessarily mean valid layer().
2211         https://bugs.webkit.org/show_bug.cgi?id=150814
2212
2213         Reviewed by Simon Fraser.
2214
2215         Certain RenderLayerModelObject derived classes simply return false for ::requiresLayer(), which means
2216         that we end up not creating a layer for the overflow clipped content.   
2217
2218         No change in functionality.
2219
2220         * rendering/RenderBlock.cpp:
2221         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
2222         (WebCore::RenderBlock::paint):
2223         * rendering/RenderBox.cpp:
2224         (WebCore::RenderBox::styleDidChange):
2225         (WebCore::RenderBox::scrollWidth):
2226         (WebCore::RenderBox::scrollHeight):
2227         (WebCore::RenderBox::scrollLeft):
2228         (WebCore::RenderBox::scrollTop):
2229         (WebCore::RenderBox::setScrollLeft):
2230         (WebCore::RenderBox::setScrollTop):
2231         (WebCore::RenderBox::includeVerticalScrollbarSize):
2232         (WebCore::RenderBox::includeHorizontalScrollbarSize):
2233         (WebCore::RenderBox::intrinsicScrollbarLogicalWidth):
2234         (WebCore::RenderBox::usesCompositedScrolling):
2235
2236 2015-11-02  Alex Christensen  <achristensen@webkit.org>
2237
2238         Fix Mac CMake build after r191904.
2239
2240         * PlatformMac.cmake:
2241         Move SettingsMac.mm to SettingsCocoa.mm.
2242
2243 2015-11-02  Eric Carlson  <eric.carlson@apple.com>
2244
2245         Add HTMLMediaElement behavior and attribute value restrictions for MediaStream
2246         https://bugs.webkit.org/show_bug.cgi?id=146853
2247
2248         Reviewed by Jer Noble.
2249
2250         * Modules/mediastream/MediaStream.cpp:
2251         (WebCore::MediaStream::scheduleActiveStateChange): Do nothing if the active state hasn't changed.
2252         (WebCore::MediaStream::activityEventTimerFired): Remove FIXME.
2253
2254         * Modules/mediastream/MediaStreamTrack.cpp:
2255         (WebCore::MediaStreamTrack::stopProducingData): Add comments. Notify observers that the track ended.
2256         (WebCore::MediaStreamTrack::trackEnded): Don't dispatch events after having been stopped.
2257         (WebCore::MediaStreamTrack::trackMutedChanged): Ditto.
2258
2259         * html/HTMLMediaElement.cpp:
2260         (WebCore::HTMLMediaElement::defaultPlaybackRate): Always return 1 when using a MediaStream.
2261         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Do nothing when using a MediaStream.
2262         (WebCore::HTMLMediaElement::playbackRate): Always return 1 when using a MediaStream.
2263         (WebCore::HTMLMediaElement::setPlaybackRate): Do nothing when using a MediaStream.
2264         (WebCore::HTMLMediaElement::ended): Ask the media engine when using a MediaStream.
2265         (WebCore::HTMLMediaElement::preload): Always return "none" when using a MediaStream.
2266         (WebCore::HTMLMediaElement::setPreload): Do nothing when using a MediaStream.
2267         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Avoid unnecessary comparisons when the duration
2268           is not definite. Send ended event when MediaStream says stream has ended.
2269
2270         * platform/graphics/MediaPlayer.cpp:
2271         (WebCore::MediaPlayer::ended): New, passthrough to engine.
2272         * platform/graphics/MediaPlayer.h:
2273         * platform/graphics/MediaPlayerPrivate.h:
2274
2275         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
2276         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2277         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Set m_ended from stream.
2278         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad): Pause the stream if necessary.
2279         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Return early if ended or already playing.
2280         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Return early if ended or already paused.
2281         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Cleanup. Try to grab a paused
2282           image if the stream isn't active.
2283         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateReadyState): New.
2284         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Call updateReadyState.
2285         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged): Ditto.
2286
2287         * platform/mediastream/MediaStreamPrivate.cpp:
2288         (WebCore::MediaStreamPrivate::trackEnabledChanged): Call updateActiveState so the state will
2289           be updated if necessary.
2290
2291         * platform/mediastream/RealtimeMediaSource.cpp:
2292         (WebCore::RealtimeMediaSource::stop): Don't call reset, there is no need to tear everything down.
2293
2294 2015-10-31  Andy Estes  <aestes@apple.com>
2295
2296         Replace iOS-only WebKitSystemInterface calls with SPI
2297         https://bugs.webkit.org/show_bug.cgi?id=150763
2298
2299         Reviewed by Darin Adler.
2300
2301         * WebCore.xcodeproj/project.pbxproj:
2302         * config.h: Removed WEBCORE_NAVIGATOR_PLATFORM and WEBCORE_NAVIGATOR_VENDOR.
2303         * css/MediaQueryEvaluator.cpp:
2304         (WebCore::isRunningOnIPhoneOrIPod): Used deviceClass() instead of iosDeviceClass().
2305         * html/HTMLMediaElement.cpp:
2306         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2307         * html/HTMLObjectElement.cpp:
2308         (WebCore::shouldNotPerformURLAdjustment): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
2309         * html/HTMLVideoElement.cpp:
2310         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2311         * page/NavigatorBase.cpp:
2312         * page/Settings.h:
2313         * page/ViewportConfiguration.cpp:
2314         (WebCore::ViewportConfiguration::textDocumentParameters): Used screenSize() instead of wkGetScreenSize().
2315         * page/ios/UserAgentIOS.mm:
2316         (WebCore::isClassic): Added to return -[UIApplication _isClassic].
2317         (WebCore::osNameForUserAgent): Upstreamed the implementation of WKGetOSNameForUserAgent() from WebKitSystemInterface.
2318         (WebCore::deviceName): Ditto for wkGetDeviceName().
2319         (WebCore::standardUserAgentWithApplicationName): Called deviceName() and osNameForUserAgent().
2320         * page/mac/SettingsCocoa.mm: Renamed from Source/WebCore/page/mac/SettingsMac.mm.
2321         (WebCore::Settings::defaultMinimumZoomFontSize): Upstreamed the implementation of WKGetMinimumZoomFontSize() from WebKitSystemInterface.
2322         * platform/PlatformScreen.h:
2323         * platform/ios/Device.cpp: Added functions that answer queries about the iOS device from MobileGestalt.
2324         (WebCore::deviceClass):
2325         (WebCore::deviceName):
2326         (WebCore::deviceHasIPadCapability):
2327         * platform/ios/Device.h:
2328         * platform/ios/PlatformScreenIOS.mm:
2329         (WebCore::screenPPIFactor): Used MGGetSInt32Answer() and MGGetFloat32Answer() instead of mobileGestaltFloatValue().
2330         (WebCore::screenSize): Upstreamed the implementation of WKGetScreenSize() from WebKitSystemInterface.
2331         (WebCore::availableScreenSize): Ditto for WKGetAvailableScreenSize().
2332         (WebCore::screenScaleFactor): Ditto for WKGetScreenScaleFactor() and WKGetScaleFactorForScreen().
2333         (WebCore::mobileGestaltFloatValue): Deleted.
2334         * platform/ios/WebCoreSystemInterfaceIOS.h: Removed.
2335         (iosExecutableWasLinkedOnOrAfterVersion): Deleted.
2336         (iosDeviceClass): Deleted.
2337         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2338         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2339         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2340         (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2341         (WebCore::supportsPictureInPicture): Upstreamed the implementation of WKIsOptimizedFullscreenSupported() from WebKitSystemInterface.
2342         * platform/ios/wak/WAKWindow.mm:
2343         (-[WAKWindow initWithLayer:]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
2344         (-[WAKWindow initWithFrame:]): Ditto.
2345         * platform/ios/wak/WKGraphics.mm:
2346         (WKGraphicsCreateImageFromBundleWithName): Ditto.
2347         (WKDrawPatternBitmap): Ditto.
2348         * platform/mac/WebCoreSystemInterface.h:
2349         * platform/spi/cocoa/DynamicLinkerSPI.h: Defined additional DYLD_IOS_VERSION macros.
2350         * platform/spi/ios/MobileGestaltSPI.h: Defined additional MobileGestalt queries, enum MGDeviceClass, MGGetSInt32Answer, and MGGetFloat32Answer.
2351         * platform/spi/ios/UIKitSPI.h: Copied from Source/WebCore/platform/spi/ios/UIColorSPI.h, and added SPI declarations for UIApplication and UIScreen.
2352         * rendering/RenderThemeIOS.mm: Included UIKitSPI.h instead of UIColorSPI.h, and removed unnecessary forward declarations for the iOS public SDK build.
2353
2354 2015-11-02  Commit Queue  <commit-queue@webkit.org>
2355
2356         Unreviewed, rolling out r191902.
2357         https://bugs.webkit.org/show_bug.cgi?id=150811
2358
2359         This change broke iOS builders (Requested by ryanhaddad on
2360         #webkit).
2361
2362         Reverted changeset:
2363
2364         "Replace iOS-only WebKitSystemInterface calls with SPI"
2365         https://bugs.webkit.org/show_bug.cgi?id=150763
2366         http://trac.webkit.org/changeset/191902
2367
2368 2015-10-31  Andy Estes  <aestes@apple.com>
2369
2370         Replace iOS-only WebKitSystemInterface calls with SPI
2371         https://bugs.webkit.org/show_bug.cgi?id=150763
2372
2373         Reviewed by Darin Adler.
2374
2375         * WebCore.xcodeproj/project.pbxproj:
2376         * config.h: Removed WEBCORE_NAVIGATOR_PLATFORM and WEBCORE_NAVIGATOR_VENDOR.
2377         * css/MediaQueryEvaluator.cpp:
2378         (WebCore::isRunningOnIPhoneOrIPod): Used deviceClass() instead of iosDeviceClass().
2379         * html/HTMLMediaElement.cpp:
2380         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2381         * html/HTMLObjectElement.cpp:
2382         (WebCore::shouldNotPerformURLAdjustment): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
2383         * html/HTMLVideoElement.cpp:
2384         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2385         * page/NavigatorBase.cpp:
2386         * page/Settings.h:
2387         * page/ViewportConfiguration.cpp:
2388         (WebCore::ViewportConfiguration::textDocumentParameters): Used screenSize() instead of wkGetScreenSize().
2389         * page/ios/UserAgentIOS.mm:
2390         (WebCore::isClassic): Added to return -[UIApplication _isClassic].
2391         (WebCore::osNameForUserAgent): Upstreamed the implementation of WKGetOSNameForUserAgent() from WebKitSystemInterface.
2392         (WebCore::deviceName): Ditto for wkGetDeviceName().
2393         (WebCore::standardUserAgentWithApplicationName): Called deviceName() and osNameForUserAgent().
2394         * page/mac/SettingsCocoa.mm: Renamed from Source/WebCore/page/mac/SettingsMac.mm.
2395         (WebCore::Settings::defaultMinimumZoomFontSize): Upstreamed the implementation of WKGetMinimumZoomFontSize() from WebKitSystemInterface.
2396         * platform/PlatformScreen.h:
2397         * platform/ios/Device.cpp: Added functions that answer queries about the iOS device from MobileGestalt.
2398         (WebCore::deviceClass):
2399         (WebCore::deviceName):
2400         (WebCore::deviceHasIPadCapability):
2401         * platform/ios/Device.h:
2402         * platform/ios/PlatformScreenIOS.mm:
2403         (WebCore::screenPPIFactor): Used MGGetSInt32Answer() and MGGetFloat32Answer() instead of mobileGestaltFloatValue().
2404         (WebCore::screenSize): Upstreamed the implementation of WKGetScreenSize() from WebKitSystemInterface.
2405         (WebCore::availableScreenSize): Ditto for WKGetAvailableScreenSize().
2406         (WebCore::screenScaleFactor): Ditto for WKGetScreenScaleFactor() and WKGetScaleFactorForScreen().
2407         (WebCore::mobileGestaltFloatValue): Deleted.
2408         * platform/ios/WebCoreSystemInterfaceIOS.h: Removed.
2409         (iosExecutableWasLinkedOnOrAfterVersion): Deleted.
2410         (iosDeviceClass): Deleted.
2411         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2412         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2413         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2414         (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
2415         (WebCore::supportsPictureInPicture): Upstreamed the implementation of WKIsOptimizedFullscreenSupported() from WebKitSystemInterface.
2416         * platform/ios/wak/WAKWindow.mm:
2417         (-[WAKWindow initWithLayer:]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
2418         (-[WAKWindow initWithFrame:]): Ditto.
2419         * platform/ios/wak/WKGraphics.mm:
2420         (WKGraphicsCreateImageFromBundleWithName): Ditto.
2421         (WKDrawPatternBitmap): Ditto.
2422         * platform/mac/WebCoreSystemInterface.h:
2423         * platform/spi/cocoa/DynamicLinkerSPI.h: Defined additional DYLD_IOS_VERSION macros.
2424         * platform/spi/ios/MobileGestaltSPI.h: Defined additional MobileGestalt queries, enum MGDeviceClass, MGGetSInt32Answer, and MGGetFloat32Answer.
2425         * platform/spi/ios/UIKitSPI.h: Copied from Source/WebCore/platform/spi/ios/UIColorSPI.h, and added SPI declarations for UIApplication and UIScreen.
2426         * rendering/RenderThemeIOS.mm:
2427
2428 2015-11-02  Frederic Wang  <fred.wang@free.fr>
2429
2430         [Win] Add support for the USE_TYPO_METRICS flag
2431         https://bugs.webkit.org/show_bug.cgi?id=150451
2432
2433         Reviewed by Darin Adler.
2434
2435         Make the Windows backend use the typo metrics when the OS/2 USE_TYPO_METRICS flag is set.
2436
2437         No new tests because this is already tested by fonts/use-typo-metrics-1.html
2438
2439         * platform/graphics/win/SimpleFontDataCGWin.cpp:
2440         (WebCore::Font::platformInit):
2441         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
2442         (WebCore::Font::platformInit):
2443         * platform/graphics/win/SimpleFontDataWin.cpp:
2444         (WebCore::Font::initGDIFont):
2445
2446 2015-11-02  Hyunduk Kim  <hyunduk.kim@samsung.com>
2447
2448         Enable MediaSource::isTypeSupported() to handle the upper-cased MIME type & Codec
2449         https://bugs.webkit.org/show_bug.cgi?id=150436
2450
2451         Reviewed by Darin Adler.
2452
2453         Got the new test case from
2454         https://github.com/w3c/web-platform-tests/blob/master/media-source/mediasource-is-type-supported.html 
2455         Tests: http\tests\media\media-source\mediasource-is-type-supported.html
2456
2457         * Modules/mediasource/MediaSource.cpp:
2458         (WebCore::MediaSource::isTypeSupported):
2459
2460 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2461
2462         Rename JSDOMWrapper.impl to JSDOMWrapper.wrapped
2463         https://bugs.webkit.org/show_bug.cgi?id=150613
2464
2465         Reviewed by Darin Adler.
2466
2467         Renaming impl to wrapped in classes and binding generated classes.
2468         No change in behavior.
2469
2470         * Modules/plugins/QuickTimePluginReplacement.mm:
2471         (WebCore::JSQuickTimePluginReplacement::timedMetaData):
2472         (WebCore::JSQuickTimePluginReplacement::accessLog):
2473         (WebCore::JSQuickTimePluginReplacement::errorLog):
2474         * bindings/js/JSAttrCustom.cpp:
2475         (WebCore::JSAttr::visitAdditionalChildren):
2476         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
2477         (WebCore::JSAudioBufferSourceNode::setBuffer):
2478         * bindings/js/JSAudioTrackCustom.cpp:
2479         (WebCore::JSAudioTrack::visitAdditionalChildren):
2480         (WebCore::JSAudioTrack::setKind):
2481         (WebCore::JSAudioTrack::setLanguage):
2482         * bindings/js/JSAudioTrackListCustom.cpp:
2483         (WebCore::JSAudioTrackList::visitAdditionalChildren):
2484         * bindings/js/JSBiquadFilterNodeCustom.cpp:
2485         (WebCore::JSBiquadFilterNode::setType):
2486         * bindings/js/JSCSSRuleCustom.cpp:
2487         (WebCore::JSCSSRule::visitAdditionalChildren):
2488         * bindings/js/JSCSSRuleListCustom.cpp:
2489         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
2490         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2491         (WebCore::JSCSSStyleDeclaration::visitAdditionalChildren):
2492         (WebCore::getPropertyValueFallback):
2493         (WebCore::cssPropertyGetterPixelOrPosPrefix):
2494         (WebCore::cssPropertyGetter):
2495         (WebCore::JSCSSStyleDeclaration::putDelegate):
2496         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
2497         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
2498         * bindings/js/JSCSSValueCustom.cpp:
2499         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
2500         (WebCore::JSCSSValueOwner::finalize):
2501         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2502         (WebCore::toHTMLCanvasStyle):
2503         (WebCore::JSCanvasRenderingContext2D::strokeStyle):
2504         (WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
2505         (WebCore::JSCanvasRenderingContext2D::fillStyle):
2506         (WebCore::JSCanvasRenderingContext2D::setFillStyle):
2507         (WebCore::JSCanvasRenderingContext2D::webkitLineDash):
2508         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
2509         * bindings/js/JSCanvasRenderingContextCustom.cpp:
2510         (WebCore::JSCanvasRenderingContext::visitAdditionalChildren):
2511         * bindings/js/JSCharacterDataCustom.cpp:
2512         (WebCore::JSCharacterData::before):
2513         (WebCore::JSCharacterData::after):
2514         (WebCore::JSCharacterData::replaceWith):
2515         * bindings/js/JSCommandLineAPIHostCustom.cpp:
2516         (WebCore::JSCommandLineAPIHost::inspectedObject):
2517         (WebCore::JSCommandLineAPIHost::getEventListeners):
2518         (WebCore::JSCommandLineAPIHost::inspect):
2519         (WebCore::JSCommandLineAPIHost::databaseId):
2520         (WebCore::JSCommandLineAPIHost::storageId):
2521         * bindings/js/JSCryptoCustom.cpp:
2522         (WebCore::JSCrypto::getRandomValues):
2523         * bindings/js/JSCryptoKeyCustom.cpp:
2524         (WebCore::JSCryptoKey::algorithm):
2525         * bindings/js/JSCryptoKeyPairCustom.cpp:
2526         (WebCore::JSCryptoKeyPair::visitAdditionalChildren):
2527         * bindings/js/JSCustomEventCustom.cpp:
2528         (WebCore::JSCustomEvent::detail):
2529         * bindings/js/JSCustomXPathNSResolver.cpp:
2530         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2531         * bindings/js/JSDOMBinding.cpp:
2532         (WebCore::reportException):
2533         (WebCore::activeDOMWindow):
2534         (WebCore::firstDOMWindow):
2535         * bindings/js/JSDOMFormDataCustom.cpp:
2536         (WebCore::toHTMLFormElementOrNull):
2537         (WebCore::JSDOMFormData::append):
2538         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
2539         (WebCore::JSDOMMimeTypeArray::nameGetter):
2540         * bindings/js/JSDOMNamedFlowCollectionCustom.cpp:
2541         (WebCore::JSDOMNamedFlowCollection::nameGetter):
2542         * bindings/js/JSDOMPluginArrayCustom.cpp:
2543         (WebCore::JSDOMPluginArray::nameGetter):
2544         * bindings/js/JSDOMPluginCustom.cpp:
2545         (WebCore::JSDOMPlugin::nameGetter):
2546         * bindings/js/JSDOMStringListCustom.cpp:
2547         (WebCore::JSDOMStringList::toWrapped):
2548         * bindings/js/JSDOMStringMapCustom.cpp:
2549         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
2550         (WebCore::JSDOMStringMap::getOwnPropertyNames):
2551         (WebCore::JSDOMStringMap::deleteProperty):
2552         (WebCore::JSDOMStringMap::putDelegate):
2553         * bindings/js/JSDOMTokenListCustom.cpp:
2554         (WebCore::JSDOMTokenList::toggle):
2555         * bindings/js/JSDOMWindowBase.cpp:
2556         (WebCore::shouldAllowAccessFrom):
2557         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2558         (WebCore::JSDOMWindowBase::updateDocument):
2559         (WebCore::JSDOMWindowBase::scriptExecutionContext):
2560         (WebCore::JSDOMWindowBase::printErrorMessage):
2561         (WebCore::JSDOMWindowBase::supportsProfiling):
2562         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
2563         (WebCore::JSDOMWindowBase::shouldInterruptScript):
2564         (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
2565         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
2566         (WebCore::JSDOMWindowBase::moduleLoaderResolve):
2567         (WebCore::JSDOMWindowBase::moduleLoaderFetch):
2568         (WebCore::JSDOMWindowBase::moduleLoaderEvaluate):
2569         * bindings/js/JSDOMWindowBase.h:
2570         * bindings/js/JSDOMWindowCustom.cpp:
2571         (WebCore::JSDOMWindow::visitAdditionalChildren):
2572         (WebCore::childFrameGetter):
2573         (WebCore::namedItemGetter):
2574         (WebCore::jsDOMWindowWebKit):
2575         (WebCore::jsDOMWindowIndexedDB):
2576         (WebCore::JSDOMWindow::getOwnPropertySlot):
2577         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2578         (WebCore::JSDOMWindow::put):
2579         (WebCore::JSDOMWindow::putByIndex):
2580         (WebCore::JSDOMWindow::deleteProperty):
2581         (WebCore::JSDOMWindow::deletePropertyByIndex):
2582         (WebCore::JSDOMWindow::getEnumerableLength):
2583         (WebCore::JSDOMWindow::getStructurePropertyNames):
2584         (WebCore::JSDOMWindow::getGenericPropertyNames):
2585         (WebCore::JSDOMWindow::getPropertyNames):
2586         (WebCore::JSDOMWindow::getOwnPropertyNames):
2587         (WebCore::JSDOMWindow::defineOwnProperty):
2588         (WebCore::JSDOMWindow::setLocation):
2589         (WebCore::JSDOMWindow::open):
2590         (WebCore::JSDOMWindow::showModalDialog):
2591         (WebCore::JSDOMWindow::postMessage):
2592         (WebCore::JSDOMWindow::setTimeout):
2593         (WebCore::JSDOMWindow::setInterval):
2594         (WebCore::JSDOMWindow::addEventListener):
2595         (WebCore::JSDOMWindow::removeEventListener):
2596         (WebCore::JSDOMWindow::toWrapped):
2597         * bindings/js/JSDOMWindowShell.cpp:
2598         (WebCore::JSDOMWindowShell::setWindow):
2599         (WebCore::JSDOMWindowShell::wrapped):
2600         * bindings/js/JSDOMWindowShell.h:
2601         * bindings/js/JSDOMWrapper.h:
2602         (WebCore::JSDOMWrapper::wrapped):
2603         (WebCore::JSDOMWrapper::JSDOMWrapper):
2604         * bindings/js/JSDataCueCustom.cpp:
2605         (WebCore::JSDataCue::value):
2606         (WebCore::JSDataCue::setValue):
2607         * bindings/js/JSDataTransferCustom.cpp:
2608         (WebCore::JSDataTransfer::types):
2609         * bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp:
2610         (WebCore::JSDedicatedWorkerGlobalScope::postMessage):
2611         * bindings/js/JSDeviceMotionEventCustom.cpp:
2612         (WebCore::JSDeviceMotionEvent::acceleration):
2613         (WebCore::JSDeviceMotionEvent::accelerationIncludingGravity):
2614         (WebCore::JSDeviceMotionEvent::rotationRate):
2615         (WebCore::JSDeviceMotionEvent::interval):
2616         (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
2617         * bindings/js/JSDeviceOrientationEventCustom.cpp:
2618         (WebCore::JSDeviceOrientationEvent::alpha):
2619         (WebCore::JSDeviceOrientationEvent::beta):
2620         (WebCore::JSDeviceOrientationEvent::gamma):
2621         (WebCore::JSDeviceOrientationEvent::webkitCompassHeading):
2622         (WebCore::JSDeviceOrientationEvent::webkitCompassAccuracy):
2623         (WebCore::JSDeviceOrientationEvent::absolute):
2624         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
2625         * bindings/js/JSDocumentCustom.cpp:
2626         (WebCore::JSDocument::prepend):
2627         (WebCore::JSDocument::append):
2628         * bindings/js/JSDocumentFragmentCustom.cpp:
2629         (WebCore::JSDocumentFragment::prepend):
2630         (WebCore::JSDocumentFragment::append):
2631         * bindings/js/JSDocumentTypeCustom.cpp:
2632         (WebCore::JSDocumentType::before):
2633         (WebCore::JSDocumentType::after):
2634         (WebCore::JSDocumentType::replaceWith):
2635         * bindings/js/JSElementCustom.cpp:
2636         (WebCore::JSElement::before):
2637         (WebCore::JSElement::after):
2638         (WebCore::JSElement::replaceWith):
2639         (WebCore::JSElement::prepend):
2640         (WebCore::JSElement::append):
2641         * bindings/js/JSEventCustom.cpp:
2642         (WebCore::JSEvent::clipboardData):
2643         * bindings/js/JSEventListener.cpp:
2644         (WebCore::JSEventListener::handleEvent):
2645         * bindings/js/JSEventTargetCustom.cpp:
2646         * bindings/js/JSFileReaderCustom.cpp:
2647         (WebCore::JSFileReader::result):
2648         * bindings/js/JSGeolocationCustom.cpp:
2649         (WebCore::JSGeolocation::getCurrentPosition):
2650         (WebCore::JSGeolocation::watchPosition):
2651         * bindings/js/JSHTMLAllCollectionCustom.cpp:
2652         (WebCore::namedItems):
2653         (WebCore::callHTMLAllCollection):
2654         (WebCore::JSHTMLAllCollection::item):
2655         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2656         (WebCore::JSHTMLCanvasElement::getContext):
2657         (WebCore::JSHTMLCanvasElement::probablySupportsContext):
2658         (WebCore::JSHTMLCanvasElement::toDataURL):
2659         * bindings/js/JSHTMLCollectionCustom.cpp:
2660         (WebCore::JSHTMLCollection::nameGetter):
2661         * bindings/js/JSHTMLDocumentCustom.cpp:
2662         (WebCore::JSHTMLDocument::nameGetter):
2663         (WebCore::JSHTMLDocument::all):
2664         (WebCore::findCallingDocument):
2665         (WebCore::JSHTMLDocument::open):
2666         (WebCore::documentWrite):
2667         * bindings/js/JSHTMLElementCustom.cpp:
2668         (WebCore::JSHTMLElement::pushEventHandlerScope):
2669         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
2670         (WebCore::namedItems):
2671         * bindings/js/JSHTMLFormElementCustom.cpp:
2672         (WebCore::JSHTMLFormElement::nameGetter):
2673         * bindings/js/JSHTMLFrameElementCustom.cpp:
2674         (WebCore::JSHTMLFrameElement::setLocation):
2675         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
2676         (WebCore::JSHTMLFrameSetElement::nameGetter):
2677         * bindings/js/JSHTMLInputElementCustom.cpp:
2678         (WebCore::JSHTMLInputElement::selectionStart):
2679         (WebCore::JSHTMLInputElement::setSelectionStart):
2680         (WebCore::JSHTMLInputElement::selectionEnd):
2681         (WebCore::JSHTMLInputElement::setSelectionEnd):
2682         (WebCore::JSHTMLInputElement::selectionDirection):
2683         (WebCore::JSHTMLInputElement::setSelectionDirection):
2684         (WebCore::JSHTMLInputElement::setSelectionRange):
2685         * bindings/js/JSHTMLMediaElementCustom.cpp:
2686         (WebCore::JSHTMLMediaElement::setController):
2687         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2688         (WebCore::JSHTMLOptionsCollection::nameGetter):
2689         (WebCore::JSHTMLOptionsCollection::setLength):
2690         (WebCore::JSHTMLOptionsCollection::indexSetter):
2691         (WebCore::JSHTMLOptionsCollection::remove):
2692         * bindings/js/JSHTMLSelectElementCustom.cpp:
2693         (WebCore::JSHTMLSelectElement::remove):
2694         (WebCore::JSHTMLSelectElement::indexSetter):
2695         * bindings/js/JSHTMLTemplateElementCustom.cpp:
2696         (WebCore::JSHTMLTemplateElement::content):
2697         * bindings/js/JSHistoryCustom.cpp:
2698         (WebCore::JSHistory::getOwnPropertySlotDelegate):
2699         (WebCore::JSHistory::putDelegate):
2700         (WebCore::JSHistory::deleteProperty):
2701         (WebCore::JSHistory::deletePropertyByIndex):
2702         (WebCore::JSHistory::getOwnPropertyNames):
2703         (WebCore::JSHistory::state):
2704         (WebCore::JSHistory::pushState):
2705         (WebCore::JSHistory::replaceState):
2706         * bindings/js/JSIDBDatabaseCustom.cpp:
2707         (WebCore::JSIDBDatabase::createObjectStore):
2708         * bindings/js/JSIDBObjectStoreCustom.cpp:
2709         (WebCore::JSIDBObjectStore::createIndex):
2710         * bindings/js/JSInspectorFrontendHostCustom.cpp:
2711         (WebCore::JSInspectorFrontendHost::showContextMenu):
2712         * bindings/js/JSLocationCustom.cpp:
2713         (WebCore::JSLocation::getOwnPropertySlotDelegate):
2714         (WebCore::JSLocation::putDelegate):
2715         (WebCore::JSLocation::deleteProperty):
2716         (WebCore::JSLocation::deletePropertyByIndex):
2717         (WebCore::JSLocation::getOwnPropertyNames):
2718         (WebCore::JSLocation::toStringFunction):
2719         * bindings/js/JSMediaSourceStatesCustom.cpp:
2720         (WebCore::JSMediaSourceStates::width):
2721         (WebCore::JSMediaSourceStates::height):
2722         (WebCore::JSMediaSourceStates::frameRate):
2723         (WebCore::JSMediaSourceStates::aspectRatio):
2724         (WebCore::JSMediaSourceStates::facingMode):
2725         (WebCore::JSMediaSourceStates::volume):
2726         * bindings/js/JSMessageChannelCustom.cpp:
2727         (WebCore::JSMessageChannel::visitAdditionalChildren):
2728         * bindings/js/JSMessageEventCustom.cpp:
2729         (WebCore::JSMessageEvent::data):
2730         (WebCore::handleInitMessageEvent):
2731         * bindings/js/JSMessagePortCustom.cpp:
2732         (WebCore::JSMessagePort::visitAdditionalChildren):
2733         (WebCore::JSMessagePort::postMessage):
2734         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
2735         (WebCore::JSMockContentFilterSettings::decisionPoint):
2736         (WebCore::JSMockContentFilterSettings::setDecisionPoint):
2737         (WebCore::JSMockContentFilterSettings::decision):
2738         (WebCore::JSMockContentFilterSettings::setDecision):
2739         (WebCore::JSMockContentFilterSettings::unblockRequestDecision):
2740         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision):
2741         * bindings/js/JSMutationObserverCustom.cpp:
2742         (WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
2743         * bindings/js/JSNamedNodeMapCustom.cpp:
2744         (WebCore::JSNamedNodeMap::nameGetter):
2745         * bindings/js/JSNavigatorCustom.cpp:
2746         (WebCore::JSNavigator::webkitGetUserMedia):
2747         * bindings/js/JSNodeCustom.cpp:
2748         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
2749         (WebCore::JSNode::insertBefore):
2750         (WebCore::JSNode::replaceChild):
2751         (WebCore::JSNode::removeChild):
2752         (WebCore::JSNode::appendChild):
2753         (WebCore::JSNode::visitAdditionalChildren):
2754         * bindings/js/JSNodeIteratorCustom.cpp:
2755         (WebCore::JSNodeIterator::visitAdditionalChildren):
2756         * bindings/js/JSNodeListCustom.cpp:
2757         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
2758         * bindings/js/JSNodeOrString.cpp:
2759         (WebCore::toNodeOrStringVector):
2760         * bindings/js/JSOscillatorNodeCustom.cpp:
2761         (WebCore::JSOscillatorNode::setType):
2762         * bindings/js/JSPannerNodeCustom.cpp:
2763         (WebCore::JSPannerNode::setPanningModel):
2764         (WebCore::JSPannerNode::setDistanceModel):
2765         * bindings/js/JSPluginElementFunctions.cpp:
2766         (WebCore::pluginScriptObjectFromPluginViewBase):
2767         (WebCore::pluginScriptObject):
2768         (WebCore::pluginElementGetCallData):
2769         * bindings/js/JSPopStateEventCustom.cpp:
2770         (WebCore::JSPopStateEvent::state):
2771         * bindings/js/JSRTCStatsResponseCustom.cpp:
2772         (WebCore::JSRTCStatsResponse::nameGetter):
2773         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2774         (WebCore::JSSQLResultSetRowList::item):
2775         * bindings/js/JSSQLTransactionCustom.cpp:
2776         (WebCore::JSSQLTransaction::executeSql):
2777         * bindings/js/JSSVGLengthCustom.cpp:
2778         (WebCore::JSSVGLength::value):
2779         (WebCore::JSSVGLength::setValue):
2780         (WebCore::JSSVGLength::convertToSpecifiedUnits):
2781         * bindings/js/JSStorageCustom.cpp:
2782         (WebCore::JSStorage::nameGetter):
2783         (WebCore::JSStorage::deleteProperty):
2784         (WebCore::JSStorage::getOwnPropertyNames):
2785         (WebCore::JSStorage::putDelegate):
2786         * bindings/js/JSStyleSheetCustom.cpp:
2787         (WebCore::JSStyleSheet::visitAdditionalChildren):
2788         * bindings/js/JSStyleSheetListCustom.cpp:
2789         (WebCore::JSStyleSheetList::nameGetter):
2790         * bindings/js/JSSubtleCryptoCustom.cpp:
2791         (WebCore::JSSubtleCrypto::encrypt):
2792         (WebCore::JSSubtleCrypto::decrypt):
2793         (WebCore::JSSubtleCrypto::sign):
2794         (WebCore::JSSubtleCrypto::verify):
2795         (WebCore::JSSubtleCrypto::wrapKey):
2796         (WebCore::JSSubtleCrypto::unwrapKey):
2797         * bindings/js/JSTextTrackCueCustom.cpp:
2798         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
2799         (WebCore::JSTextTrackCue::visitAdditionalChildren):
2800         * bindings/js/JSTextTrackCustom.cpp:
2801         (WebCore::JSTextTrack::visitAdditionalChildren):
2802         (WebCore::JSTextTrack::setKind):
2803         (WebCore::JSTextTrack::setLanguage):
2804         * bindings/js/JSTextTrackListCustom.cpp:
2805         (WebCore::JSTextTrackList::visitAdditionalChildren):
2806         * bindings/js/JSTrackCustom.cpp:
2807         (WebCore::toTrack):
2808         * bindings/js/JSTrackEventCustom.cpp:
2809         (WebCore::JSTrackEvent::track):
2810         * bindings/js/JSTreeWalkerCustom.cpp:
2811         (WebCore::JSTreeWalker::visitAdditionalChildren):
2812         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
2813         (WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
2814         * bindings/js/JSVideoTrackCustom.cpp:
2815         (WebCore::JSVideoTrack::visitAdditionalChildren):
2816         (WebCore::JSVideoTrack::setKind):
2817         (WebCore::JSVideoTrack::setLanguage):
2818         * bindings/js/JSVideoTrackListCustom.cpp:
2819         (WebCore::JSVideoTrackList::visitAdditionalChildren):
2820         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
2821         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
2822         (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
2823         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
2824         (WebCore::getObjectParameter):
2825         (WebCore::JSWebGLRenderingContextBase::visitAdditionalChildren):
2826         (WebCore::JSWebGLRenderingContextBase::getAttachedShaders):
2827         (WebCore::JSWebGLRenderingContextBase::getExtension):
2828         (WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter):
2829         (WebCore::JSWebGLRenderingContextBase::getParameter):
2830         (WebCore::JSWebGLRenderingContextBase::getProgramParameter):
2831         (WebCore::JSWebGLRenderingContextBase::getShaderParameter):
2832         (WebCore::JSWebGLRenderingContextBase::getSupportedExtensions):
2833         (WebCore::JSWebGLRenderingContextBase::getUniform):
2834         (WebCore::JSWebGLRenderingContextBase::uniform1fv):
2835         (WebCore::JSWebGLRenderingContextBase::uniform1iv):
2836         (WebCore::JSWebGLRenderingContextBase::uniform2fv):
2837         (WebCore::JSWebGLRenderingContextBase::uniform2iv):
2838         (WebCore::JSWebGLRenderingContextBase::uniform3fv):
2839         (WebCore::JSWebGLRenderingContextBase::uniform3iv):
2840         (WebCore::JSWebGLRenderingContextBase::uniform4fv):
2841         (WebCore::JSWebGLRenderingContextBase::uniform4iv):
2842         (WebCore::JSWebGLRenderingContextBase::uniformMatrix2fv):
2843         (WebCore::JSWebGLRenderingContextBase::uniformMatrix3fv):
2844         (WebCore::JSWebGLRenderingContextBase::uniformMatrix4fv):
2845         (WebCore::JSWebGLRenderingContextBase::vertexAttrib1fv):
2846         (WebCore::JSWebGLRenderingContextBase::vertexAttrib2fv):
2847         (WebCore::JSWebGLRenderingContextBase::vertexAttrib3fv):
2848         (WebCore::JSWebGLRenderingContextBase::vertexAttrib4fv):
2849         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2850         (WebCore::JSWebGLRenderingContext::visitAdditionalChildren):
2851         * bindings/js/JSWorkerCustom.cpp:
2852         (WebCore::JSWorker::postMessage):
2853         (WebCore::constructJSWorker):
2854         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2855         (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
2856         (WebCore::JSWorkerGlobalScopeBase::scriptExecutionContext):
2857         * bindings/js/JSWorkerGlobalScopeBase.h:
2858         (WebCore::JSWorkerGlobalScopeBase::wrapped):
2859         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
2860         (WebCore::JSWorkerGlobalScope::visitAdditionalChildren):
2861         (WebCore::JSWorkerGlobalScope::importScripts):
2862         (WebCore::JSWorkerGlobalScope::setTimeout):
2863         (WebCore::JSWorkerGlobalScope::setInterval):
2864         * bindings/js/JSXMLHttpRequestCustom.cpp:
2865         (WebCore::JSXMLHttpRequest::visitAdditionalChildren):
2866         (WebCore::JSXMLHttpRequest::open):
2867         (WebCore::JSXMLHttpRequest::send):
2868         (WebCore::JSXMLHttpRequest::responseText):
2869         (WebCore::JSXMLHttpRequest::response):
2870         * bindings/js/JSXPathResultCustom.cpp:
2871         (WebCore::JSXPathResult::visitAdditionalChildren):
2872         * bindings/js/JSXSLTProcessorCustom.cpp:
2873         (WebCore::JSXSLTProcessor::setParameter):
2874         (WebCore::JSXSLTProcessor::getParameter):
2875         (WebCore::JSXSLTProcessor::removeParameter):
2876         * bindings/js/ScheduledAction.cpp:
2877         (WebCore::ScheduledAction::execute):
2878         * bindings/js/ScriptCachedFrameData.cpp:
2879         (WebCore::ScriptCachedFrameData::restore):
2880         * bindings/js/ScriptController.cpp:
2881         (WebCore::ScriptController::clearWindowShell):
2882         (WebCore::ScriptController::collectIsolatedContexts):
2883         * bindings/js/ScriptState.cpp:
2884         (WebCore::domWindowFromExecState):
2885         * bindings/objc/DOM.mm:
2886         (+[DOMNode _nodeFromJSWrapper:]):
2887         * bindings/objc/DOMUtility.mm:
2888         (JSC::createDOMWrapper):
2889         * bindings/objc/WebScriptObject.mm:
2890         (-[WebScriptObject _isSafeScript]):
2891         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
2892         * bindings/scripts/CodeGeneratorJS.pm:
2893         (GenerateGetOwnPropertySlotBody):
2894         (GenerateHeader):
2895         (GetIndexedGetterExpression):
2896         (GenerateImplementation):
2897         (NativeToJSValue):
2898         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2899         (WebCore::jsTestActiveDOMObjectExcitingAttr):
2900         (WebCore::jsTestActiveDOMObjectConstructor):
2901         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
2902         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
2903         (WebCore::JSTestActiveDOMObjectOwner::finalize):
2904         (WebCore::JSTestActiveDOMObject::toWrapped):
2905         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2906         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
2907         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
2908         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2909         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
2910         (WebCore::JSTestCustomNamedGetterOwner::finalize):
2911         (WebCore::JSTestCustomNamedGetter::toWrapped):
2912         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2913         (WebCore::jsTestEventConstructorAttr1):
2914         (WebCore::jsTestEventConstructorAttr2):
2915         (WebCore::JSTestEventConstructorOwner::finalize):
2916         (WebCore::JSTestEventConstructor::toWrapped):
2917         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2918         (WebCore::JSTestEventTarget::getOwnPropertySlot):
2919         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
2920         (WebCore::JSTestEventTarget::getOwnPropertyNames):
2921         (WebCore::jsTestEventTargetPrototypeFunctionItem):
2922         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
2923         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
2924         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
2925         (WebCore::JSTestEventTarget::visitChildren):
2926         (WebCore::JSTestEventTargetOwner::isReachableFromOpaqueRoots):
2927         (WebCore::JSTestEventTargetOwner::finalize):
2928         (WebCore::JSTestEventTarget::toWrapped):
2929         * bindings/scripts/test/JS/JSTestException.cpp:
2930         (WebCore::jsTestExceptionName):
2931         (WebCore::JSTestExceptionOwner::finalize):
2932         (WebCore::JSTestException::toWrapped):
2933         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2934         (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots):
2935         (WebCore::JSTestGenerateIsReachableOwner::finalize):
2936         (WebCore::JSTestGenerateIsReachable::toWrapped):
2937         * bindings/scripts/test/JS/JSTestInterface.cpp:
2938         (WebCore::jsTestInterfaceImplementsStr1):
2939         (WebCore::jsTestInterfaceImplementsStr2):
2940         (WebCore::jsTestInterfaceImplementsNode):
2941         (WebCore::jsTestInterfaceSupplementalStr1):
2942         (WebCore::jsTestInterfaceSupplementalStr2):
2943         (WebCore::jsTestInterfaceSupplementalNode):
2944         (WebCore::setJSTestInterfaceImplementsStr2):
2945         (WebCore::setJSTestInterfaceImplementsNode):
2946         (WebCore::setJSTestInterfaceSupplementalStr2):
2947         (WebCore::setJSTestInterfaceSupplementalNode):
2948         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
2949         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
2950         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
2951         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2952         (WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots):
2953         (WebCore::JSTestInterfaceOwner::finalize):
2954         (WebCore::JSTestInterface::toWrapped):
2955         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2956         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
2957         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
2958         (WebCore::JSTestMediaQueryListListener::toWrapped):
2959         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2960         (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots):
2961         (WebCore::JSTestNamedConstructorOwner::finalize):
2962         (WebCore::JSTestNamedConstructor::toWrapped):
2963         * bindings/scripts/test/JS/JSTestNode.cpp:
2964         (WebCore::jsTestNodeName):
2965         (WebCore::setJSTestNodeName):
2966         (WebCore::JSTestNode::visitChildren):
2967         * bindings/scripts/test/JS/JSTestNode.h:
2968         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2969         (WebCore::jsTestNondeterministicNondeterministicReadonlyAttr):
2970         (WebCore::jsTestNondeterministicNondeterministicWriteableAttr):
2971         (WebCore::jsTestNondeterministicNondeterministicExceptionAttr):
2972         (WebCore::jsTestNondeterministicNondeterministicGetterExceptionAttr):
2973         (WebCore::jsTestNondeterministicNondeterministicSetterExceptionAttr):
2974         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
2975         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
2976         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
2977         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
2978         (WebCore::jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction):
2979         (WebCore::JSTestNondeterministicOwner::finalize):
2980         (WebCore::JSTestNondeterministic::toWrapped):
2981         * bindings/scripts/test/JS/JSTestObj.cpp:
2982         (WebCore::jsTestObjReadOnlyLongAttr):
2983         (WebCore::jsTestObjReadOnlyStringAttr):
2984         (WebCore::jsTestObjReadOnlyTestObjAttr):
2985         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
2986         (WebCore::jsTestObjEnumAttr):
2987         (WebCore::jsTestObjByteAttr):
2988         (WebCore::jsTestObjOctetAttr):
2989         (WebCore::jsTestObjShortAttr):
2990         (WebCore::jsTestObjUnsignedShortAttr):
2991         (WebCore::jsTestObjLongAttr):
2992         (WebCore::jsTestObjLongLongAttr):
2993         (WebCore::jsTestObjUnsignedLongLongAttr):
2994         (WebCore::jsTestObjStringAttr):
2995         (WebCore::jsTestObjTestObjAttr):
2996         (WebCore::jsTestObjXMLObjAttr):
2997         (WebCore::jsTestObjCreate):
2998         (WebCore::jsTestObjReflectedStringAttr):
2999         (WebCore::jsTestObjReflectedIntegralAttr):
3000         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
3001         (WebCore::jsTestObjReflectedBooleanAttr):
3002         (WebCore::jsTestObjReflectedURLAttr):
3003         (WebCore::jsTestObjReflectedCustomIntegralAttr):
3004         (WebCore::jsTestObjReflectedCustomBooleanAttr):
3005         (WebCore::jsTestObjReflectedCustomURLAttr):
3006         (WebCore::jsTestObjTypedArrayAttr):
3007         (WebCore::jsTestObjAttrWithGetterException):
3008         (WebCore::jsTestObjAttrWithSetterException):
3009         (WebCore::jsTestObjStringAttrWithGetterException):
3010         (WebCore::jsTestObjStringAttrWithSetterException):
3011         (WebCore::jsTestObjStrictTypeCheckingAttribute):
3012         (WebCore::jsTestObjOnfoo):
3013         (WebCore::jsTestObjWithScriptStateAttribute):
3014         (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute):
3015         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
3016         (WebCore::jsTestObjWithScriptStateAttributeRaises):
3017         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
3018         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
3019         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3020         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3021         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
3022         (WebCore::jsTestObjConditionalAttr1):
3023         (WebCore::jsTestObjConditionalAttr2):
3024         (WebCore::jsTestObjConditionalAttr3):
3025         (WebCore::jsTestObjCachedAttribute1):
3026         (WebCore::jsTestObjCachedAttribute2):
3027         (WebCore::jsTestObjAnyAttribute):
3028         (WebCore::jsTestObjContentDocument):
3029         (WebCore::jsTestObjMutablePoint):
3030         (WebCore::jsTestObjImmutablePoint):
3031         (WebCore::jsTestObjStrawberry):
3032         (WebCore::jsTestObjStrictFloat):
3033         (WebCore::jsTestObjDescription):
3034         (WebCore::jsTestObjId):
3035         (WebCore::jsTestObjHash):
3036         (WebCore::jsTestObjReplaceableAttribute):
3037         (WebCore::jsTestObjNullableDoubleAttribute):
3038         (WebCore::jsTestObjNullableLongAttribute):
3039         (WebCore::jsTestObjNullableBooleanAttribute):
3040         (WebCore::jsTestObjNullableStringAttribute):
3041         (WebCore::jsTestObjNullableLongSettableAttribute):
3042         (WebCore::jsTestObjNullableStringValue):
3043         (WebCore::jsTestObjAttribute):
3044         (WebCore::jsTestObjAttributeWithReservedEnumType):
3045         (WebCore::jsTestObjPutForwardsAttribute):
3046         (WebCore::jsTestObjPutForwardsNullableAttribute):
3047         (WebCore::setJSTestObjEnumAttr):
3048         (WebCore::setJSTestObjByteAttr):
3049         (WebCore::setJSTestObjOctetAttr):
3050         (WebCore::setJSTestObjShortAttr):
3051         (WebCore::setJSTestObjUnsignedShortAttr):
3052         (WebCore::setJSTestObjLongAttr):
3053         (WebCore::setJSTestObjLongLongAttr):
3054         (WebCore::setJSTestObjUnsignedLongLongAttr):
3055         (WebCore::setJSTestObjStringAttr):
3056         (WebCore::setJSTestObjTestObjAttr):
3057         (WebCore::setJSTestObjXMLObjAttr):
3058         (WebCore::setJSTestObjCreate):
3059         (WebCore::setJSTestObjReflectedStringAttr):
3060         (WebCore::setJSTestObjReflectedIntegralAttr):
3061         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
3062         (WebCore::setJSTestObjReflectedBooleanAttr):
3063         (WebCore::setJSTestObjReflectedURLAttr):
3064         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
3065         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
3066         (WebCore::setJSTestObjReflectedCustomURLAttr):
3067         (WebCore::setJSTestObjTypedArrayAttr):
3068         (WebCore::setJSTestObjAttrWithGetterException):
3069         (WebCore::setJSTestObjAttrWithSetterException):
3070         (WebCore::setJSTestObjStringAttrWithGetterException):
3071         (WebCore::setJSTestObjStringAttrWithSetterException):
3072         (WebCore::setJSTestObjStrictTypeCheckingAttribute):
3073         (WebCore::setJSTestObjOnfoo):
3074         (WebCore::setJSTestObjWithScriptStateAttribute):
3075         (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttribute):
3076         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3077         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
3078         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3079         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
3080         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3081         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3082         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
3083         (WebCore::setJSTestObjConditionalAttr1):
3084         (WebCore::setJSTestObjConditionalAttr2):
3085         (WebCore::setJSTestObjConditionalAttr3):
3086         (WebCore::setJSTestObjAnyAttribute):
3087         (WebCore::setJSTestObjMutablePoint):
3088         (WebCore::setJSTestObjImmutablePoint):
3089         (WebCore::setJSTestObjStrawberry):
3090         (WebCore::setJSTestObjStrictFloat):
3091         (WebCore::setJSTestObjId):
3092         (WebCore::setJSTestObjNullableLongSettableAttribute):
3093         (WebCore::setJSTestObjNullableStringValue):
3094         (WebCore::setJSTestObjAttributeWithReservedEnumType):
3095         (WebCore::setJSTestObjPutForwardsAttribute):
3096         (WebCore::setJSTestObjPutForwardsNullableAttribute):
3097         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
3098         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
3099         (WebCore::jsTestObjPrototypeFunctionByteMethod):
3100         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
3101         (WebCore::jsTestObjPrototypeFunctionOctetMethod):
3102         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
3103         (WebCore::jsTestObjPrototypeFunctionLongMethod):
3104         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
3105         (WebCore::jsTestObjPrototypeFunctionObjMethod):
3106         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
3107         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
3108         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
3109         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
3110         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
3111         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
3112         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
3113         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
3114         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
3115         (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
3116         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
3117         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
3118         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
3119         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
3120         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
3121         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
3122         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
3123         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
3124         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
3125         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
3126         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
3127         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
3128         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue):
3129         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
3130         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
3131         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
3132         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue):
3133         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
3134         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
3135         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
3136         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
3137         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
3138         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
3139         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
3140         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
3141         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
3142         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
3143         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
3144         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
3145         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
3146         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
3147         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
3148         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
3149         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
3150         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
3151         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
3152         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
3153         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
3154         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
3155         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
3156         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
3157         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
3158         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
3159         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
3160         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
3161         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
3162         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
3163         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2):
3164         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
3165         (WebCore::jsTestObjPrototypeFunctionConvert1):
3166         (WebCore::jsTestObjPrototypeFunctionConvert2):
3167         (WebCore::jsTestObjPrototypeFunctionConvert4):
3168         (WebCore::jsTestObjPrototypeFunctionConvert5):
3169         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
3170         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
3171         (WebCore::jsTestObjPrototypeFunctionOrange):
3172         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
3173         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
3174         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
3175         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
3176         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
3177         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
3178         (WebCore::jsTestObjPrototypeFunctionAny):
3179         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
3180         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
3181         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
3182         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
3183         (WebCore::JSTestObjOwner::finalize):
3184         (WebCore::JSTestObj::toWrapped):
3185         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3186         (WebCore::JSTestOverloadedConstructorsOwner::finalize):
3187         (WebCore::JSTestOverloadedConstructors::toWrapped):
3188         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3189         (WebCore::JSTestOverrideBuiltins::getOwnPropertyNames):
3190         (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
3191         (WebCore::JSTestOverrideBuiltinsOwner::finalize):
3192         (WebCore::JSTestOverrideBuiltins::toWrapped):
3193         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3194         (WebCore::jsTestSerializedScriptValueInterfaceValue):
3195         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
3196         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
3197         (WebCore::jsTestSerializedScriptValueInterfacePorts):
3198         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
3199         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
3200         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
3201         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
3202         (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
3203         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3204         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
3205         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
3206         (WebCore::jsTestTypedefsAttrWithGetterException):
3207         (WebCore::jsTestTypedefsAttrWithSetterException):
3208         (WebCore::jsTestTypedefsStringAttrWithGetterException):
3209         (WebCore::jsTestTypedefsStringAttrWithSetterException):
3210         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
3211         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
3212         (WebCore::setJSTestTypedefsAttrWithGetterException):
3213         (WebCore::setJSTestTypedefsAttrWithSetterException):
3214         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
3215         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
3216         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
3217         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
3218         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
3219         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
3220         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
3221         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
3222         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
3223         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
3224         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
3225         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
3226         (WebCore::JSTestTypedefsOwner::finalize):
3227         (WebCore::JSTestTypedefs::toWrapped):
3228         * bindings/scripts/test/JS/JSattribute.cpp:
3229         (WebCore::jsattributeReadonly):
3230         (WebCore::JSattributeOwner::finalize):
3231         (WebCore::JSattribute::toWrapped):
3232         * bindings/scripts/test/JS/JSreadonly.cpp:
3233         (WebCore::JSreadonlyOwner::finalize):
3234         (WebCore::JSreadonly::toWrapped):
3235         * bridge/runtime_method.cpp:
3236         (JSC::callRuntimeMethod):
3237         * inspector/InspectorController.cpp:
3238         (WebCore::InspectorController::canAccessInspectedScriptState):
3239
3240 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3241
3242         IDL functions and attributes should be JSBuiltin by default if interface is marked as JSBuiltinConstructor
3243         https://bugs.webkit.org/show_bug.cgi?id=150438
3244
3245         Reviewed by Darin Adler.
3246
3247         Binding generator is now deducing that function/attribute is JSBuiltin if the interface is marked as JSBuiltin.
3248         One exception is custom setters, getters or functions which remain C++ handled.
3249         Updated streams API IDLs accordingly.
3250
3251         Binding generator knows whether class needs a DOM class by checking whether the interface is marked as JSBuiltin.
3252         Binding generator knows that class uses a JS built-in constructor if marked as JSBuiltin+Constructor.
3253         In particular, JSBuiltIn+CustomConstructor means that a DOM class is not needed and constructor is not JS built-in.
3254
3255         Applied JSBuiltin+CustomConstructor to ReadableStreamReader and ReadableStreamController.
3256         Removing ReadableStreamReader and ReadableStreamController classes.
3257
3258         Removed unneeded "Default" keyword for cancel function in WebIDL.
3259
3260         Added a binding test case.
3261         No change in behavior.
3262
3263         * Modules/streams/ByteLengthQueuingStrategy.idl: Marking interface as JSBuiltin and Constructable.
3264         * Modules/streams/CountQueuingStrategy.idl: Ditto.
3265         * Modules/streams/ReadableStream.idl: Ditto.
3266         * Modules/streams/ReadableStreamController.h: Removed.
3267         * Modules/streams/ReadableStreamController.idl: Marking interface as JSBuiltin and Constructable.
3268         * Modules/streams/ReadableStreamReader.h: Removed.
3269         * Modules/streams/ReadableStreamReader.idl: Marking interface as JSBuiltin and Constructable.
3270         * Modules/streams/WritableStream.idl: Ditto.
3271         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
3272         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject): Updated according new constructor.
3273         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject): Ditto.
3274         * bindings/scripts/CodeGeneratorJS.pm:
3275         (NeedsImplementationClass):
3276         (GetAttributeGetterName):
3277         (GetAttributeSetterName):
3278         (GetFunctionName):
3279         (InstanceNeedsVisitChildren):
3280         (GenerateHeader):
3281         (GenerateAttributesHashTable):
3282         (GenerateImplementation):
3283         (GetConstructorTemplateClassName):
3284         (GenerateConstructorDefinition):
3285         (GenerateConstructorHelperMethods):
3286         (IsConstructable):
3287         (ComputeFunctionSpecial):
3288         (IsJSBuiltin):
3289         (IsJSBuiltinConstructor):
3290         (AddJSBuiltinIncludesIfNeeded):
3291         (GetJSBuiltinFunctionName): Deleted.
3292         (GetJSBuiltinFunctionNameFromString): Deleted.
3293         (GetJSBuiltinScopeName): Deleted.
3294         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp:
3295         (webkit_dom_test_js_builtin_constructor_set_property):
3296         (webkit_dom_test_js_builtin_constructor_get_property):
3297         (webkit_dom_test_js_builtin_constructor_class_init):
3298         (webkit_dom_test_js_builtin_constructor_test_function):
3299         (webkit_dom_test_js_builtin_constructor_get_test_attribute):
3300         (webkit_dom_test_js_builtin_constructor_set_test_attribute):
3301         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h:
3302         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3303         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
3304         (WebCore::JSTestJSBuiltinConstructor::getOwnPropertySlot):
3305         (WebCore::jsTestJSBuiltinConstructorTestAttribute):
3306         (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
3307         (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
3308         (WebCore::setJSTestJSBuiltinConstructorTestAttribute):
3309         (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
3310         (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestFunction):
3311         (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction):
3312         (WebCore::JSTestJSBuiltinConstructorOwner::isReachableFromOpaqueRoots):
3313         (WebCore::JSTestJSBuiltinConstructorOwner::finalize):
3314         (WebCore::toJSNewlyCreated):
3315         (WebCore::toJS):
3316         (WebCore::JSTestJSBuiltinConstructor::toWrapped):
3317         (WebCore::JSTestJSBuiltinConstructorPrototype::createStructure): Deleted.
3318         (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties): Deleted.
3319         (WebCore::JSTestJSBuiltinConstructor::createPrototype): Deleted.
3320         (WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.
3321         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
3322         (WebCore::JSTestJSBuiltinConstructor::create):
3323         (WebCore::JSTestJSBuiltinConstructor::finishCreation):
3324         (WebCore::wrapperOwner):
3325         (WebCore::toJS):
3326         (WebCore::JSTestJSBuiltinConstructor::createStructure): Deleted.
3327         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h:
3328         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm:
3329         (-[DOMTestJSBuiltinConstructor testAttribute]):
3330         (-[DOMTestJSBuiltinConstructor setTestAttribute:]):
3331         (-[DOMTestJSBuiltinConstructor testAttributeCustom]):
3332         (-[DOMTestJSBuiltinConstructor testAttributeRWCustom]):
3333         (-[DOMTestJSBuiltinConstructor setTestAttributeRWCustom:]):
3334         (-[DOMTestJSBuiltinConstructor testFunction]):
3335         (-[DOMTestJSBuiltinConstructor testCustomFunction]):
3336         * bindings/scripts/test/TestJSBuiltinConstructor.idl:
3337
3338 2015-10-29  Sergio Villar Senin  <svillar@igalia.com>
3339
3340         [CSS Grid Layout] min-content row does not always shrink
3341         https://bugs.webkit.org/show_bug.cgi?id=144581
3342
3343         Reviewed by Zalan Bujtas.
3344
3345         Grid items height must be recomputed whenever the grid tracks
3346         change if the items had been previously stretched. In those
3347         cases we have to clear the override height and layout the item
3348         with the new row size.
3349
3350         Tests: fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html
3351                fast/css-grid-layout/relayout-indefinite-heights.html
3352
3353         * rendering/RenderGrid.cpp:
3354         (WebCore::RenderGrid::logicalContentHeightForChild):
3355
3356 2015-11-01  Brady Eidson  <beidson@apple.com>
3357
3358         Modern IDB: IBDObjectStore.count() support.
3359         https://bugs.webkit.org/show_bug.cgi?id=150785
3360
3361         Reviewed by Darin Adler.
3362
3363         Tests: storage/indexeddb/modern/idbobjectstore-count-1.html
3364                storage/indexeddb/modern/idbobjectstore-count-failures.html
3365
3366         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3367         (WebCore::IDBClient::IDBConnectionToServer::getCount):
3368         (WebCore::IDBClient::IDBConnectionToServer::didGetCount):
3369         * Modules/indexeddb/client/IDBConnectionToServer.h:
3370         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
3371         
3372         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3373         (WebCore::IDBClient::IDBObjectStore::count):
3374         (WebCore::IDBClient::IDBObjectStore::doCount):
3375         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
3376         
3377         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3378         (WebCore::IDBClient::IDBRequest::setResult):
3379         * Modules/indexeddb/client/IDBRequestImpl.h:
3380         
3381         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3382         (WebCore::IDBClient::IDBTransaction::requestCount):
3383         (WebCore::IDBClient::IDBTransaction::getCountOnServer):
3384         (WebCore::IDBClient::IDBTransaction::didGetCountOnServer):
3385         * Modules/indexeddb/client/IDBTransactionImpl.h:
3386         
3387         * Modules/indexeddb/server/IDBBackingStore.h:
3388         
3389         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
3390         (WebCore::IDBServer::IDBConnectionToClient::didGetCount):
3391         * Modules/indexeddb/server/IDBConnectionToClient.h:
3392         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3393         
3394         * Modules/indexeddb/server/IDBServer.cpp:
3395         (WebCore::IDBServer::IDBServer::getCount):
3396         * Modules/indexeddb/server/IDBServer.h:
3397         
3398         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3399         (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
3400         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
3401         
3402         * Modules/indexeddb/server/MemoryObjectStore.cpp:
3403         (WebCore::IDBServer::MemoryObjectStore::countForKeyRange):
3404         (WebCore::IDBServer::MemoryObjectStore::valueForKeyRange):
3405         (WebCore::IDBServer::MemoryObjectStore::lowestKeyWithRecordInRange):
3406         * Modules/indexeddb/server/MemoryObjectStore.h:
3407         
3408         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3409         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
3410         (WebCore::IDBServer::UniqueIDBDatabase::getCount):
3411         (WebCore::IDBServer::UniqueIDBDatabase::performGetCount):
3412         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetCount):
3413         (WebCore::IDBServer::UniqueIDBDatabase::performCountCallback):
3414 &n