1817b9badbbf2ce312a5cb48b625ee6f60dbf019
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-22  Brady Eidson  <beidson@apple.com>
2
3         Modern IDB: Basic createObjectStore implementation.
4         https://bugs.webkit.org/show_bug.cgi?id=150455
5
6         Reviewed by Alex Christensen.
7
8         Tests: storage/indexeddb/modern/createobjectstore-basic.html
9                storage/indexeddb/modern/createobjectstore-failures.html
10
11         * CMakeLists.txt:
12         * WebCore.xcodeproj/project.pbxproj:
13
14         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
15         (WebCore::IDBClient::IDBConnectionToServer::createObjectStore):
16         (WebCore::IDBClient::IDBConnectionToServer::didCreateObjectStore):
17         * Modules/indexeddb/client/IDBConnectionToServer.h:
18         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
19         
20         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
21         (WebCore::IDBClient::IDBDatabase::objectStoreNames):
22         (WebCore::IDBClient::IDBDatabase::createObjectStore):
23         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
24         * Modules/indexeddb/client/IDBDatabaseImpl.h:
25         (WebCore::IDBClient::IDBDatabase::serverConnection):
26         
27         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp: Added.
28         (WebCore::IDBClient::IDBObjectStore::create):
29         (WebCore::IDBClient::IDBObjectStore::IDBObjectStore):
30         (WebCore::IDBClient::IDBObjectStore::~IDBObjectStore):
31         (WebCore::IDBClient::IDBObjectStore::id):
32         (WebCore::IDBClient::IDBObjectStore::name):
33         (WebCore::IDBClient::IDBObjectStore::keyPathAny):
34         (WebCore::IDBClient::IDBObjectStore::keyPath):
35         (WebCore::IDBClient::IDBObjectStore::indexNames):
36         (WebCore::IDBClient::IDBObjectStore::transaction):
37         (WebCore::IDBClient::IDBObjectStore::autoIncrement):
38         (WebCore::IDBClient::IDBObjectStore::add):
39         (WebCore::IDBClient::IDBObjectStore::put):
40         (WebCore::IDBClient::IDBObjectStore::openCursor):
41         (WebCore::IDBClient::IDBObjectStore::get):
42         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
43         (WebCore::IDBClient::IDBObjectStore::clear):
44         (WebCore::IDBClient::IDBObjectStore::createIndex):
45         (WebCore::IDBClient::IDBObjectStore::index):
46         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
47         (WebCore::IDBClient::IDBObjectStore::count):
48         * Modules/indexeddb/client/IDBObjectStoreImpl.h: Added.
49
50         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
51         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
52
53         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
54         (WebCore::IDBClient::IDBTransaction::serverConnection):
55         (WebCore::IDBClient::IDBTransaction::objectStore):
56         (WebCore::IDBClient::IDBTransaction::scheduleOperation):
57         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
58         (WebCore::IDBClient::IDBTransaction::finishAbortOrCommit):
59         (WebCore::IDBClient::IDBTransaction::didAbort):
60         (WebCore::IDBClient::IDBTransaction::didCommit):
61         (WebCore::IDBClient::IDBTransaction::createObjectStore):
62         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
63         (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer):
64         * Modules/indexeddb/client/IDBTransactionImpl.h:
65         (WebCore::IDBClient::IDBTransaction::originalDatabaseInfo):
66         (WebCore::IDBClient::IDBTransaction::isVersionChange):
67         
68         * Modules/indexeddb/client/TransactionOperation.h: Added.
69         (WebCore::IDBClient::TransactionOperation::perform):
70         (WebCore::IDBClient::TransactionOperation::completed):
71         (WebCore::IDBClient::TransactionOperation::identifier):
72         (WebCore::IDBClient::TransactionOperation::transactionIdentifier):
73         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
74         (WebCore::IDBClient::createTransactionOperation):
75         
76         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
77         (WebCore::IDBServer::IDBConnectionToClient::didCreateObjectStore):
78         * Modules/indexeddb/server/IDBConnectionToClient.h:
79         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
80         
81         * Modules/indexeddb/server/IDBServer.cpp:
82         (WebCore::IDBServer::IDBServer::createObjectStore):
83         * Modules/indexeddb/server/IDBServer.h:
84         
85         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
86         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
87         (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
88         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateObjectStore):
89         (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction):
90         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
91         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction): Deleted.
92         * Modules/indexeddb/server/UniqueIDBDatabase.h:
93         
94         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
95         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateObjectStore):
96         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
97         
98         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
99         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::isVersionChange):
100         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createObjectStore):
101         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
102         
103         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
104         (WebCore::IDBDatabaseInfo::hasObjectStore):
105         (WebCore::IDBDatabaseInfo::createNewObjectStore):
106         (WebCore::IDBDatabaseInfo::addExistingObjectStore):
107         (WebCore::IDBDatabaseInfo::objectStoreNames):
108         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
109         
110         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp: Copied from Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp.
111         (WebCore::IDBObjectStoreInfo::IDBObjectStoreInfo):
112         (WebCore::IDBObjectStoreInfo::isolatedCopy):
113         * Modules/indexeddb/shared/IDBObjectStoreInfo.h: Copied from Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h.
114         (WebCore::IDBObjectStoreInfo::identifier):
115         (WebCore::IDBObjectStoreInfo::name):
116         (WebCore::IDBObjectStoreInfo::keyPath):
117         (WebCore::IDBObjectStoreInfo::autoIncrement):
118
119         * Modules/indexeddb/shared/IDBRequestData.cpp:
120         (WebCore::IDBRequestData::IDBRequestData):
121         (WebCore::IDBRequestData::requestIdentifier):
122         (WebCore::IDBRequestData::transactionIdentifier):
123         * Modules/indexeddb/shared/IDBRequestData.h:
124         (WebCore::IDBRequestData::databaseIdentifier):
125         (WebCore::IDBRequestData::requestIdentifier): Deleted.
126
127         * Modules/indexeddb/shared/IDBResultData.cpp:
128         (WebCore::IDBResultData::IDBResultData):
129         (WebCore::IDBResultData::createObjectStoreSuccess):
130         * Modules/indexeddb/shared/IDBResultData.h:
131
132         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
133         (WebCore::InProcessIDBServer::didCreateObjectStore):
134         (WebCore::InProcessIDBServer::createObjectStore):
135         * Modules/indexeddb/shared/InProcessIDBServer.h:
136
137         * platform/CrossThreadCopier.cpp:
138         (WebCore::IDBObjectStoreInfo>::copy):
139         * platform/CrossThreadCopier.h:
140
141 2015-10-22  Alex Christensen  <achristensen@webkit.org>
142
143         Initial NSURLSession WebResourceLoader implementation
144         https://bugs.webkit.org/show_bug.cgi?id=150355
145
146         Reviewed by Antti Koivisto.
147
148         * platform/network/cf/AuthenticationChallenge.h:
149         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Export constructor for use in WebKit2.
150
151 2015-10-22  Frederic Wang  <fred.wang@free.fr>
152
153         [Mac] Add support for the USE_TYPO_METRICS flag
154         https://bugs.webkit.org/show_bug.cgi?id=150394
155
156         Reviewed by Myles C. Maxfield.
157
158         Make the Cocoa backend use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
159
160         No new tests because this is already tested by fonts/use-typo-metrics-1.html
161
162         * platform/graphics/cocoa/FontCocoa.mm:
163         (WebCore::fontHasMathTable): Add a function to verify whether a font has a MATH table.
164         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that is the case.
165
166 2015-10-22  Wenson Hsieh  <wenson_hsieh@apple.com>
167
168         Implement touch-action: manipulation; for iOS
169         https://bugs.webkit.org/show_bug.cgi?id=149854
170         <rdar://problem/23017145>
171
172         Reviewed by Benjamin Poulain.
173
174         Implements the manipulation value for the CSS property touch-action. Adds support for
175         parsing the touch-action property and two of its values: auto and manipulation.
176
177         Tests: css3/touch-action/touch-action-computed-style.html
178                css3/touch-action/touch-action-manipulation-fast-clicks.html
179                css3/touch-action/touch-action-parsing.html
180
181         * css/CSSComputedStyleDeclaration.cpp:
182         (WebCore::ComputedStyleExtractor::propertyValue):
183         * css/CSSParser.cpp:
184         (WebCore::isValidKeywordPropertyAndValue):
185         (WebCore::isKeywordPropertyID):
186         (WebCore::CSSParser::parseValue):
187         * css/CSSPrimitiveValueMappings.h:
188         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
189         (WebCore::CSSPrimitiveValue::operator TouchAction):
190         * css/CSSPropertyNames.in:
191         * css/CSSValueKeywords.in:
192         * dom/Element.cpp:
193         (WebCore::Element::allowsDoubleTapGesture): Here, we determine whether an element that resulted from
194             hit-testing a touch should allow double-tap gestures. To do this, we walk up the element's parents,
195             stopping when we detect an element that disallows double tap gestures by having a touch-action other
196             than auto or by hitting the root node.
197         * dom/Element.h:
198         * dom/Node.h:
199         (WebCore::Node::allowsDoubleTapGesture):
200         * rendering/style/RenderStyle.h:
201         * rendering/style/RenderStyleConstants.h:
202         * rendering/style/StyleRareNonInheritedData.cpp:
203         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
204         (WebCore::StyleRareNonInheritedData::operator==):
205         * rendering/style/StyleRareNonInheritedData.h:
206
207 2015-10-22  Ryosuke Niwa  <rniwa@webkit.org>
208
209         REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
210         https://bugs.webkit.org/show_bug.cgi?id=150428
211
212         Reviewed by Antti Koivisto.
213
214         The bug was caused by updateFocusAppearance in WebPage::restoreSelectionInFocusedEditableElement
215         revealing the focused element which was added in r181972. Fixed the bug by adding an option to
216         suppress this behavior here.
217
218         * dom/Document.cpp:
219         (WebCore::Document::Document):
220         (WebCore::Document::updateFocusAppearanceSoon):
221         * dom/Document.h:
222         * dom/Element.cpp:
223         (WebCore::Element::focus):
224         (WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
225         (WebCore::Element::updateFocusAppearance):
226         * dom/Element.h:
227         * history/CachedPage.cpp:
228         (WebCore::CachedPage::restore):
229         * html/HTMLAreaElement.cpp:
230         (WebCore::HTMLAreaElement::updateFocusAppearance):
231         * html/HTMLAreaElement.h:
232         * html/HTMLInputElement.cpp:
233         (WebCore::HTMLInputElement::updateFocusAppearance):
234         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
235         (WebCore::HTMLInputElement::didAttachRenderers):
236         * html/HTMLInputElement.h:
237         * html/HTMLTextAreaElement.cpp:
238         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
239         * html/HTMLTextAreaElement.h:
240
241 2015-10-22  Joonghun Park  <jh718.park@samsung.com>
242
243         [EFL] Fix build break since r191439
244         https://bugs.webkit.org/show_bug.cgi?id=150441
245
246         Reviewed by Csaba Osztrogonác.
247
248         No new tests, no new behaviours.
249
250         * platform/Logging.cpp:
251         (WebCore::registerNotifyCallback):
252
253 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
254
255         Unreviewed. Fix GTK+ build after r191423.
256
257         Deprecate removed class WebKitDOMHTMLBaseFontElement.
258
259         * PlatformGTK.cmake:
260         * bindings/gobject/WebKitDOMDeprecated.cpp:
261         (webkit_dom_html_base_font_element_init):
262         (webkit_dom_html_base_font_element_class_init):
263         (webkit_dom_html_base_font_element_get_color):
264         (webkit_dom_html_base_font_element_set_color):
265         (webkit_dom_html_base_font_element_get_face):
266         (webkit_dom_html_base_font_element_set_face):
267         (webkit_dom_html_base_font_element_get_size):
268         (webkit_dom_html_base_font_element_set_size):
269         * bindings/gobject/WebKitDOMDeprecated.h:
270         * bindings/gobject/WebKitDOMDeprecated.symbols:
271         * bindings/gobject/WebKitDOMHTMLPrivate.cpp:
272         * html/HTMLBaseFontElement.h:
273         * html/HTMLBaseFontElement.idl:
274
275 2015-10-22  Xabier Rodriguez Calvar  <calvaris@igalia.com>
276
277         [Streams API] Add writable stream attributes
278         https://bugs.webkit.org/show_bug.cgi?id=150389
279
280         Reviewed by Darin Adler.
281
282         This patch adds the three writable stream attributes, which are closed, ready and state. They are implemented
283         according to the spec.
284
285         Current test set suffices, expectations were adjusted accordingly.
286
287         * Modules/streams/WritableStream.js:
288         (initializeWritableStream): Style fix.
289         (closed):
290         (ready):
291         (state): Implemented according to the spec.
292         * Modules/streams/WritableStreamInternals.js:
293         (isWritableStream): Implemented according to the spec.
294
295 2015-10-22  Frederic Wang  <fred.wang@free.fr>
296
297         Rollout r190440 for the moment. It broke the build.
298
299         * platform/graphics/cocoa/FontCocoa.mm:
300         (WebCore::Font::platformInit): Deleted.
301
302 2015-10-22  Frederic Wang  <fred.wang@free.fr>
303
304         Unreviewed compilation fix on Mac.
305
306         * platform/graphics/cocoa/FontCocoa.mm:
307         (WebCore::Font::platformInit): Use a pointer for the third argument of CFArrayContainsValue.
308
309 2015-10-21  Frederic Wang  <fred.wang@free.fr>
310
311         Unreviewed compilation fix on Mac.
312
313         * platform/graphics/cocoa/FontCocoa.mm:
314         (WebCore::Font::platformInit): Add missing font argument.
315
316 2015-10-21  Frederic Wang  <fred.wang@free.fr>
317
318         [Mac] Add support for the USE_TYPO_METRICS flag
319         https://bugs.webkit.org/show_bug.cgi?id=150394
320
321         Reviewed by Myles C. Maxfield.
322
323         Make the Cocoa backend use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
324
325         No new tests because this is already tested by fonts/use-typo-metrics-1.html
326
327         * platform/graphics/cocoa/FontCocoa.mm:
328         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that is the case.
329
330 2015-10-21  Zalan Bujtas  <zalan@apple.com>
331
332         Print out the render tree from command line.
333         https://bugs.webkit.org/show_bug.cgi?id=150416
334
335         Use system-wide notification server (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/notify_register_dispatch.3.html)
336         to print out the render tree for the live documents.
337
338         Usage: notifyutil -p com.apple.WebKit.showRenderTree
339
340         Reviewed by Simon Fraser.
341
342         No change in functionality.
343
344         * platform/Logging.cpp:
345         (WebCore::registerNotifyCallback):
346         * platform/Logging.h:
347         * rendering/RenderObject.cpp:
348         (WebCore::RenderObject::RenderObject):
349         (WebCore::printRenderTreeForLiveDocuments):
350
351 2015-10-21  Alex Christensen  <achristensen@webkit.org>
352
353         Fix CMake clean build after r191423.
354
355         * CMakeLists.txt:
356         HTMLBaseFontElement.idl no longer generates any JavaScript bindings.
357
358 2015-10-21  Brian Burg  <bburg@apple.com>
359
360         Unreviewed, CMake build fix after r191433.
361
362         * CMakeLists.txt: add WritableStreamInternals.js to WebCore_BUILTINS_SOURCES.
363
364 2015-10-21  Brian Burg  <bburg@apple.com>
365
366         Restructure generate-js-bindings script to be modular and testable
367         https://bugs.webkit.org/show_bug.cgi?id=149929
368
369         Reviewed by Alex Christensen.
370
371         * CMakeLists.txt:
372
373             Define JavaScriptCore_SCRIPTS_DIR explicitly so the add_custom_command and
374             shared file lists are identical between JavaScriptCore and WebCore.
375
376             The output files additionally depend on all builtin generator script files.
377
378         * DerivedSources.make:
379
380             Use JavaScriptCore_SCRIPTS_DIR so that the rule for code generation and
381             shared file lists are identical between JavaScriptCore and WebCore.
382
383             The output files additionally depend on all builtin generator script files.
384
385         * WebCore.xcodeproj/project.pbxproj:
386
387             Define JavaScriptCore_SCRIPTS_DIR before calling DerivedSources.make.
388             This will eventually be merged with the other similar script paths.
389
390         * bindings/js/JSDOMWindowBase.cpp:
391         (WebCore::JSDOMWindowBase::finishCreation):
392
393             Update the generated builtin macro names.
394
395         * generate-js-builtins: Removed.
396
397 2015-10-21  Alex Christensen  <achristensen@webkit.org>
398
399         Recommit r191428.
400
401         I don't think it was supposed to be reverted in r191429, and it really does fix the build.
402
403         * loader/EmptyClients.h:
404         (WebCore::EmptyContextMenuClient::~EmptyContextMenuClient):
405         Remove customizeMenu again.
406
407 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
408
409         [EFL][GTK][WK2] Fix build break since r191402, r191401
410         https://bugs.webkit.org/show_bug.cgi?id=150432
411
412         Unreviewed EFL and GTK build fix.
413
414         * loader/EmptyClients.h:
415
416 2015-10-21  Alex Christensen  <achristensen@webkit.org>
417
418         Build fix after r191422.
419
420         * page/ContextMenuClient.h:
421         (WebCore::ContextMenuClient::~ContextMenuClient):
422         Completely remove customizeMenu.
423
424 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
425
426         Remove unnecessary default quota setting in DatabaseContext::databaseExceededQuota
427         https://bugs.webkit.org/show_bug.cgi?id=150356
428
429         Reviewed by Darin Adler.
430
431         All ports have supported DatabaseContext::databaseExceededQuota(). Thus we don't need to
432         keep a test code to extend database quota anymore.
433
434         * Modules/webdatabase/DatabaseContext.cpp:
435         (WebCore::DatabaseContext::databaseExceededQuota): Deleted.
436
437 2015-10-21  Chris Dumez  <cdumez@apple.com>
438
439         Un-expose obsolete HTMLBaseFontElement
440         https://bugs.webkit.org/show_bug.cgi?id=150397
441
442         Reviewed by Anders Carlsson.
443
444         Un-expose obsolete HTMLBaseFontElement:
445         - https://html.spec.whatwg.org/multipage/obsolete.html#non-conforming-features
446
447         This means that we no longer expose HTMLBaseFontElement on the global
448         Window object. Firefox and Chrome do not expose it either.
449
450         Also, document.createElement("basefont") now returns an HTMLUnknownElement
451         as per the specification. Firefox and Chrome return a generic HTMLElement
452         instead but I don't think this is a big compatibility risk.
453
454         No new tests, already covered by existing tests.
455
456         * html/HTMLBaseFontElement.cpp:
457         (WebCore::HTMLBaseFontElement::HTMLBaseFontElement):
458         * html/HTMLBaseFontElement.h:
459         * html/HTMLBaseFontElement.idl:
460         * html/HTMLTagNames.in:
461
462 2015-10-21  Anders Carlsson  <andersca@apple.com>
463
464         Get rid of WebContextMenuClient::customizeMenu, it's no longer used
465         https://bugs.webkit.org/show_bug.cgi?id=150427
466
467         Reviewed by Tim Horton.
468         * loader/EmptyClients.cpp:
469         (WebCore::EmptyContextMenuClient::customizeMenu): Deleted.
470         * loader/EmptyClients.h:
471         * page/ContextMenuController.cpp:
472         (WebCore::ContextMenuController::showContextMenu):
473
474 2015-10-21  Anders Carlsson  <andersca@apple.com>
475
476         Remove dead MHTML code
477         https://bugs.webkit.org/show_bug.cgi?id=150426
478
479         Reviewed by Tim Horton.
480
481         * loader/archive/mhtml/MHTMLArchive.cpp:
482         (WebCore::MHTMLArchive::generateMHTMLData):
483         (WebCore::MHTMLArchive::generateMHTMLDataUsingBinaryEncoding): Deleted.
484         * loader/archive/mhtml/MHTMLArchive.h:
485
486 2015-10-21  Dean Jackson  <dino@apple.com>
487
488         Null dereference loading Blink layout test svg/filters/display-none-filter-primitive.html
489         https://bugs.webkit.org/show_bug.cgi?id=150212
490         <rdar://problem/23137376>
491
492         Reviewed by Brent Fulgham.
493
494         Handle the case where a filter element doesn't have a renderer. Inspired by the Blink
495         commit:
496         https://chromium.googlesource.com/chromium/src.git/+/fb79f7fc46552d45127acd2959a23662ad8f271e
497
498         Test: svg/filters/display-none-filter-primitive.html
499
500         * rendering/svg/RenderSVGResourceFilter.cpp:
501         (WebCore::RenderSVGResourceFilter::buildPrimitives):
502         * svg/graphics/filters/SVGFilterBuilder.cpp:
503         (WebCore::SVGFilterBuilder::appendEffectToEffectReferences):
504
505 2015-10-21  Brady Eidson  <beidson@apple.com>
506
507         Modern IDB: Add basic transaction aborting.
508         https://bugs.webkit.org/show_bug.cgi?id=150148
509
510         Reviewed by Alex Christensen.
511
512         Tests: storage/indexeddb/modern/double-abort.html
513                storage/indexeddb/modern/versionchange-abort-then-reopen.html
514
515         * CMakeLists.txt:
516         * WebCore.xcodeproj/project.pbxproj:
517         
518         * Modules/indexeddb/IndexedDB.h:
519         
520         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
521         (WebCore::IDBClient::IDBConnectionToServer::abortTransaction):
522         (WebCore::IDBClient::IDBConnectionToServer::didAbortTransaction):
523         * Modules/indexeddb/client/IDBConnectionToServer.h:
524         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
525         
526         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
527         (WebCore::IDBClient::IDBDatabase::abortTransaction):
528         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
529         * Modules/indexeddb/client/IDBDatabaseImpl.h:
530         
531         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
532         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
533         (WebCore::IDBClient::IDBTransaction::abort):
534         (WebCore::IDBClient::IDBTransaction::isFinishedOrFinishing):
535         (WebCore::IDBClient::IDBTransaction::activationTimerFired):
536         (WebCore::IDBClient::IDBTransaction::didAbort):
537         * Modules/indexeddb/client/IDBTransactionImpl.h:
538         
539         * Modules/indexeddb/server/IDBBackingStore.h:
540         
541         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
542         (WebCore::IDBServer::IDBConnectionToClient::didAbortTransaction):
543         * Modules/indexeddb/server/IDBConnectionToClient.h:
544         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
545         
546         * Modules/indexeddb/server/IDBServer.cpp:
547         (WebCore::IDBServer::IDBServer::abortTransaction):
548         * Modules/indexeddb/server/IDBServer.h:
549         
550         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
551         (WebCore::IDBServer::MemoryBackingStoreTransaction::create):
552         (WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction):
553         (WebCore::IDBServer::MemoryBackingStoreTransaction::~MemoryBackingStoreTransaction):
554         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
555         (WebCore::IDBServer::MemoryBackingStoreTransaction::commit):
556         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
557         (WebCore::IDBServer::MemoryBackingStoreTransaction::isVersionChange):
558         
559         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
560         (WebCore::IDBServer::MemoryIDBBackingStore::setDatabaseInfo):
561         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
562         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
563         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
564         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
565
566         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
567         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
568         (WebCore::IDBServer::UniqueIDBDatabase::beginTransactionInBackingStore):
569         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
570         (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
571         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
572         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
573         (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction):
574         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
575         * Modules/indexeddb/server/UniqueIDBDatabase.h:
576         
577         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
578         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
579         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
580         
581         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
582         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
583         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::originalDatabaseInfo):
584         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
585         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
586         
587         * Modules/indexeddb/shared/IDBError.cpp:
588         (WebCore::idbErrorName):
589         (WebCore::idbErrorDescription):
590         * Modules/indexeddb/shared/IDBError.h:
591
592         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
593         (WebCore::InProcessIDBServer::didAbortTransaction):
594         (WebCore::InProcessIDBServer::abortTransaction):
595         * Modules/indexeddb/shared/InProcessIDBServer.h:
596
597 2015-10-21  Chris Dumez  <cdumez@apple.com>
598
599         bgsound should use HTMLUnknownElement interface
600         https://bugs.webkit.org/show_bug.cgi?id=148857
601         <rdar://problem/22589036>
602
603         Reviewed by Sam Weinig.
604
605         The blink, bgsound, isindex, multicol, nextid, and spacer elements must
606         use the HTMLUnknownElement interface, as per the HTML specification:
607         https://html.spec.whatwg.org/multipage/obsolete.html#other-elements,-attributes-and-apis
608
609         WebKit was using HTMLUnknownElement for all of them except bgsound.
610         This patch fixes the issue and aligns our behavior with Chrome and
611         Firefox.
612
613         No new tests, already covered by existing tests.
614
615         * html/HTMLTagNames.in:
616
617 2015-10-21  Antoine Quint  <graouts@apple.com>
618
619         Support for the SVG `onend` attribute
620         https://bugs.webkit.org/show_bug.cgi?id=150393
621
622         Reviewed by Dean Jackson.
623
624         Add support for the SVG `onend` attribute to SVG timing and animation elements, which allow the definition
625         of a JS event listener declaratively for the SVG `endEvent` event.
626
627         Tests: svg/animations/end-event-attribute-expected.svg
628                svg/animations/end-event-attribute.svg
629                svg/animations/end-event-syncbase-expected.svg
630                svg/animations/end-event-syncbase.svg
631
632         * dom/EventNames.h:
633         * svg/animation/SVGSMILElement.cpp:
634         (WebCore::SVGSMILElement::parseAttribute):
635         * svg/svgattrs.in:
636
637 2015-10-21  Nan Wang  <n_wang@apple.com>
638
639         AX: Expose table size and cell indexes on iOS
640         https://bugs.webkit.org/show_bug.cgi?id=150366
641
642         Add support to expose table row/column count and cell indexes on iOS.
643
644         Reviewed by Chris Fleizach.
645
646         Test: accessibility/aria-table-attributes.html
647
648         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
649         (-[WebAccessibilityObjectWrapper tableParent]):
650         (-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]):
651         (-[WebAccessibilityObjectWrapper accessibilityRowCount]):
652         (-[WebAccessibilityObjectWrapper accessibilityColumnCount]):
653         (-[WebAccessibilityObjectWrapper accessibilityARIARowCount]):
654         (-[WebAccessibilityObjectWrapper accessibilityARIAColumnCount]):
655         (-[WebAccessibilityObjectWrapper accessibilityARIARowIndex]):
656         (-[WebAccessibilityObjectWrapper accessibilityARIAColumnIndex]):
657         (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
658
659 2015-10-21  Chris Dumez  <cdumez@apple.com>
660
661         HTMLIFrameElement.sandbox should be a DOMSettableTokenList
662         https://bugs.webkit.org/show_bug.cgi?id=150377
663
664         Reviewed by Ryosuke Niwa.
665
666         HTMLIFrameElement.sandbox should be a DOMSettableTokenList as per the
667         HTML specification:
668         - https://html.spec.whatwg.org/multipage/embedded-content.html#htmliframeelement
669
670         Chrome and Firefox match the specification but Safari/WebKit was uding
671         a DOMString.
672
673         Test: fast/frames/sandbox-attribute.html
674
675         * html/HTMLIFrameElement.cpp:
676         (WebCore::HTMLIFrameElement::sandbox):
677         (WebCore::HTMLIFrameElement::parseAttribute):
678         * html/HTMLIFrameElement.h:
679         * html/HTMLIFrameElement.idl:
680
681 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
682
683         ASSERTION FAILED: markFontData in FontCascade::emphasisMarkHeight
684         https://bugs.webkit.org/show_bug.cgi?id=150171
685
686         Reviewed by Myles C. Maxfield.
687
688         It happens with several tests like fast/ruby/text-emphasis.html in
689         the GTK Debug bot. The tests seem to pass in Release and the rendering
690         looks correct as well removing the assert. The thing is that
691         for some reason we can get an empty GlyphData from
692         FontCascade::getEmphasisMarkGlyphData() when it ends up falling
693         back to system (FontCascadeFonts::glyphDataForSystemFallback).
694
695         * platform/graphics/FontCascade.cpp:
696         (WebCore::FontCascade::getEmphasisMarkGlyphData): Return
697         Optional<GlyphData> instead of returning a boolean and an out
698         parameter. If we get an invalid GlyphData, Nullopt is
699         returned. Also use a SurrogatePairAwareTextIterator to handle
700         surrogate pairs.
701         (WebCore::FontCascade::emphasisMarkAscent):
702         (WebCore::FontCascade::emphasisMarkDescent):
703         (WebCore::FontCascade::emphasisMarkHeight):
704         (WebCore::FontCascade::drawEmphasisMarks):
705         * platform/graphics/FontCascade.h:
706         * platform/graphics/GlyphPage.h:
707         (WebCore::GlyphData::isValid): Return whether the GlyphData is valid.
708
709 2015-10-20  Sergio Villar Senin  <svillar@igalia.com>
710
711         [css-grid] Fix availableLogicalSpace computation with non-zero baseSize flex tracks
712         https://bugs.webkit.org/show_bug.cgi?id=150359
713
714         Reviewed by Zalan Bujtas.
715
716         The availableLogicalSpace computation was incorrect whenever
717         the flex tracks had a non-zero baseSize before the 1fr unit
718         size resolution. That happened because when assigning the new
719         baseSize to the flex track, we were unconditionally
720         subtracting the whole baseSize to the
721         availableLogicalSpace. That's correct if the track is a "pure"
722         flex track, i.e. 2fr, but if the track had a non-zero baseSize
723         (like minmax(10px, 1fr)) then both the new and the old base
724         sizes were incorrectly used to compute the
725         availableLogicalSpace.
726
727         We can test the amount of remaining freeSpace by using content
728         distribution to align and item place on a non-zero baseSize
729         flex track. The content distribution will be accurate if and
730         only if the availableLogicalSpace computation is correct.
731
732         Test: fast/css-grid-layout/flex-content-distribution.html
733
734         * rendering/RenderGrid.cpp:
735         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
736
737 2015-10-21  Xabier Rodriguez Calvar  <calvaris@igalia.com>
738
739         [Streams API] Construct a writable stream
740         https://bugs.webkit.org/show_bug.cgi?id=150360
741
742         Reviewed by Darin Adler.
743
744         This patch initializes a writable stream according to the spec. To do it we need two internal functions, which
745         are syncWritableStreamStateWithQueue and errorWritableStream, which are also implemented as a quite direct
746         translation from the spec.
747
748         Current test set suffices, expectations are updated accordingly.
749
750         * CMakeLists.txt:
751         * DerivedSources.make:
752         * WebCore.xcodeproj/project.pbxproj:
753         * bindings/js/JSDOMWindowBase.cpp:
754         * bindings/js/WebCoreBuiltinNames.h:
755         * bindings/js/WebCoreJSBuiltinInternals.h:
756         * bindings/js/WebCoreJSBuiltins.cpp:
757         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
758         * Modules/streams/WritableStream.js:
759         (initializeWritableStream): Function that acts as constructor of WritableStream.
760         * Modules/streams/WritableStreamInternals.js:
761         (syncWritableStreamStateWithQueue):
762         (errorWritableStream): As per spec.
763
764 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
765
766         NetworkProcess: DNS prefetch happens in the Web Process
767         https://bugs.webkit.org/show_bug.cgi?id=147824
768
769         Reviewed by Chris Dumez.
770
771         Use FrameLoaderClient to do the DNS prefetch.
772
773         * html/HTMLAnchorElement.cpp:
774         (WebCore::HTMLAnchorElement::parseAttribute):
775         * loader/EmptyClients.h:
776         * loader/FrameLoaderClient.h:
777         * loader/LinkLoader.cpp:
778         (WebCore::LinkLoader::loadLink):
779         * page/Chrome.cpp:
780         (WebCore::Chrome::mouseDidMoveOverElement):
781
782 2015-10-21  Frederic Wang  <fred.wang@free.fr>
783
784         [FreeType] Add support for the USE_TYPO_METRICS flag
785         https://bugs.webkit.org/show_bug.cgi?id=150340
786
787         Reviewed by Martin Robinson.
788
789         Test: fonts/use-typo-metrics-1.html
790
791         Make the FreeType backend use the typo metrics when the OS/2 USE_TYPO_METRICS flag is set.
792         Similar work should be done for other backends, see bug 131839.
793
794         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
795         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that's the case.
796
797 2015-10-20  Hunseop Jeong  <hs85.jeong@samsung.com>
798
799         Replace 0 and NULL with nullptr in WebCore/loader.
800         https://bugs.webkit.org/show_bug.cgi?id=149657
801
802         Reviewed by Darin Adler.
803
804         No new tests because there is no behavior change.
805
806         * loader/CookieJar.cpp:
807         (WebCore::networkingContext):
808         * loader/DocumentLoader.cpp:
809         (WebCore::DocumentLoader::DocumentLoader):
810         (WebCore::DocumentLoader::frameLoader):
811         (WebCore::DocumentLoader::popArchiveForSubframe):
812         (WebCore::DocumentLoader::clearArchiveResources):
813         (WebCore::DocumentLoader::clearMainResource):
814         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
815         * loader/DocumentThreadableLoader.cpp:
816         (WebCore::DocumentThreadableLoader::cancel):
817         (WebCore::DocumentThreadableLoader::setDefersLoading):
818         (WebCore::DocumentThreadableLoader::clearResource):
819         * loader/EmptyClients.cpp:
820         (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
821         (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
822         * loader/EmptyClients.h:
823         * loader/FTPDirectoryParser.cpp:
824         (WebCore::parseOneFTPLine):
825         * loader/FTPDirectoryParser.h:
826         (WebCore::ListResult::clear):
827         * loader/FormSubmission.cpp:
828         (WebCore::FormSubmission::create):
829         * loader/FrameLoader.cpp:
830         (WebCore::FrameLoader::clear):
831         (WebCore::FrameLoader::stopAllLoaders):
832         (WebCore::FrameLoader::clearProvisionalLoad):
833         (WebCore::FrameLoader::transitionToCommitted):
834         (WebCore::FrameLoader::closeAndRemoveChild):
835         (WebCore::FrameLoader::detachFromParent):
836         (WebCore::FrameLoader::detachViewsAndDocumentLoader):
837         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
838         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
839         * loader/FrameLoader.h:
840         (WebCore::FrameLoader::stateMachine):
841         * loader/FrameNetworkingContext.h:
842         (WebCore::FrameNetworkingContext::invalidate):
843         * loader/HistoryController.cpp:
844         (WebCore::HistoryController::replaceState):
845         * loader/ImageLoader.cpp:
846         (WebCore::ImageLoader::ImageLoader):
847         (WebCore::ImageLoader::updateFromElement):
848         * loader/NetscapePlugInStreamLoader.cpp:
849         (WebCore::NetscapePlugInStreamLoader::releaseResources):
850         * loader/ResourceLoadNotifier.h:
851         * loader/ResourceLoadScheduler.cpp:
852         (WebCore::resourceLoadScheduler):
853         * loader/SubresourceLoader.cpp:
854         (WebCore::SubresourceLoader::releaseResources):
855         * loader/TextResourceDecoder.cpp:
856         (WebCore::TextResourceDecoder::TextResourceDecoder):
857         * loader/ThreadableLoaderClientWrapper.h:
858         (WebCore::ThreadableLoaderClientWrapper::clearClient):
859         (WebCore::ThreadableLoaderClientWrapper::done):
860         * loader/appcache/ApplicationCache.cpp:
861         (WebCore::fallbackURLLongerThan):
862         (WebCore::ApplicationCache::ApplicationCache):
863         (WebCore::ApplicationCache::resourceForRequest):
864         * loader/appcache/ApplicationCache.h:
865         (WebCore::ApplicationCache::fallbackURLs):
866         * loader/appcache/ApplicationCacheGroup.cpp:
867         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
868         (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
869         (WebCore::ApplicationCacheGroup::selectCache):
870         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
871         (WebCore::ApplicationCacheGroup::failedLoadingMainResource):
872         (WebCore::ApplicationCacheGroup::manifestNotFound):
873         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
874         * loader/appcache/ApplicationCacheHost.cpp:
875         (WebCore::ApplicationCacheHost::ApplicationCacheHost):
876         (WebCore::ApplicationCacheHost::setApplicationCache):
877         * loader/appcache/ApplicationCacheHost.h:
878         (WebCore::ApplicationCacheHost::candidateApplicationCacheGroup):
879         * loader/appcache/ApplicationCacheStorage.cpp:
880         (WebCore::StorageIDJournal::Record::Record):
881         (WebCore::StorageIDJournal::Record::restore):
882         (WebCore::ApplicationCacheStorage::loadCacheGroup):
883         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
884         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
885         (WebCore::ApplicationCacheStorage::cacheGroupDestroyed):
886         (WebCore::ApplicationCacheStorage::loadCache):
887         * loader/appcache/DOMApplicationCache.cpp:
888         (WebCore::DOMApplicationCache::disconnectFrameForPageCache):
889         (WebCore::DOMApplicationCache::willDestroyGlobalObjectInFrame):
890         (WebCore::DOMApplicationCache::applicationCacheHost):
891         (WebCore::DOMApplicationCache::scriptExecutionContext):
892         (WebCore::DOMApplicationCache::toEventType):
893         * loader/archive/ArchiveFactory.cpp:
894         (WebCore::ArchiveFactory::create):
895         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
896         * loader/archive/ArchiveResourceCollection.cpp:
897         (WebCore::ArchiveResourceCollection::archiveResourceForURL):
898         * loader/archive/cf/LegacyWebArchive.cpp:
899         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
900         (WebCore::LegacyWebArchive::createResource):
901         (WebCore::LegacyWebArchive::create):
902         (WebCore::LegacyWebArchive::rawDataRepresentation):
903         * loader/archive/cf/LegacyWebArchiveMac.mm:
904         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
905         * loader/archive/mhtml/MHTMLArchive.cpp:
906         (WebCore::MHTMLArchive::create):
907         (WebCore::MHTMLArchive::generateMHTMLData):
908         * loader/archive/mhtml/MHTMLParser.cpp:
909         (WebCore::MHTMLParser::parseArchiveWithHeader):
910         (WebCore::MHTMLParser::parseNextPart):
911         * loader/cache/CachedImage.cpp:
912         (WebCore::CachedImage::CachedImage):
913         * loader/cache/CachedImageClient.h:
914         (WebCore::CachedImageClient::imageChanged):
915         (WebCore::CachedImageClient::newImageAnimationFrameAvailable):
916         * loader/cache/CachedRawResource.cpp:
917         (WebCore::CachedRawResource::calculateIncrementalDataChunk):
918         * loader/cache/CachedRawResourceClient.h:
919         (WebCore::CachedRawResourceClient::dataReceived):
920         (WebCore::CachedRawResourceClient::redirectReceived):
921         (WebCore::CachedRawResourceClient::getOrCreateReadBuffer):
922         * loader/cache/CachedResource.cpp:
923         (WebCore::CachedResource::CachedResource):
924         (WebCore::CachedResource::clearResourceToRevalidate):
925         * loader/cache/CachedResourceClientWalker.h:
926         (WebCore::CachedResourceClientWalker::next):
927         * loader/cache/CachedResourceHandle.cpp:
928         (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
929         * loader/cache/CachedResourceLoader.cpp:
930         (WebCore::createResource):
931         (WebCore::CachedResourceLoader::CachedResourceLoader):
932         (WebCore::CachedResourceLoader::~CachedResourceLoader):
933         (WebCore::CachedResourceLoader::canRequest): Return value is bool.
934         (WebCore::CachedResourceLoader::requestResource):
935         * loader/cache/CachedResourceLoader.h:
936         (WebCore::CachedResourceLoader::document):
937         (WebCore::CachedResourceLoader::setDocument):
938         (WebCore::CachedResourceLoader::clearDocumentLoader):
939         * loader/cache/CachedSVGDocumentReference.cpp:
940         (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
941         * loader/cf/ResourceLoaderCFNet.cpp:
942         (WebCore::ResourceLoader::shouldCacheResponse): Return value is bool.
943         * loader/icon/IconDatabase.cpp:
944         (WebCore::IconDatabase::synchronousIconForPageURL):
945         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
946         (WebCore::IconDatabase::setIconDataForIconURL):
947         (WebCore::IconDatabase::getOrCreatePageURLRecord):
948         (WebCore::IconDatabase::cleanupSyncThread):
949         * loader/icon/IconDatabaseBase.cpp:
950         (WebCore::IconDatabaseBase::open):
951         (WebCore::iconDatabase):
952         * loader/icon/IconDatabaseBase.h:
953         (WebCore::EnumCallback::performCallback):
954         (WebCore::EnumCallback::invalidate):
955         (WebCore::ObjectCallback::performCallback):
956         (WebCore::ObjectCallback::invalidate):
957         * loader/icon/PageURLRecord.cpp:
958         (WebCore::PageURLRecord::~PageURLRecord):
959         (WebCore::PageURLRecord::setIconRecord):
960         * loader/mac/ResourceLoaderMac.mm:
961         (WebCore::ResourceLoader::willCacheResponse):
962         * loader/soup/CachedRawResourceSoup.cpp:
963         (WebCore::CachedRawResource::getOrCreateReadBuffer):
964
965 2015-10-20  Chris Dumez  <cdumez@apple.com>
966
967         Unreviewed, GTK API test fix after r191351.
968
969         Reverted API change for GTK bindings.
970
971         * html/HTMLOptionsCollection.idl:
972         * html/HTMLSelectElement.idl:
973
974 2015-10-20  Chris Dumez  <cdumez@apple.com>
975
976         Unreviewed, Another GTK build fix after r191351.
977
978         * html/HTMLCollection.idl:
979
980 2015-10-20  Chris Dumez  <cdumez@apple.com>
981
982         Unreviewed, Another GTK build fix after r191351.
983
984         * html/HTMLFieldSetElement.cpp:
985         (WebCore::HTMLFieldSetElement::elementsForNativeBindings):
986         (WebCore::HTMLFieldSetElement::elementsForObjC): Deleted.
987         * html/HTMLFieldSetElement.h:
988         * html/HTMLFieldSetElement.idl:
989
990 2015-10-20  Chris Fleizach  <cfleizach@apple.com>
991
992         AX: CrashTracer: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AccessibilityTable::tableElement const + 116
993         https://bugs.webkit.org/show_bug.cgi?id=150349
994
995         Reviewed by Brent Fulgham.
996
997         The crash point for this bug says that the parentElement of the firstBody is garbage when it's accessed. 
998         Unfortunately, I could not reproduce this in-situ or with a test. 
999         So my speculative solution is to recalculate those body elements to ensure that they're valid before we access.
1000
1001         * accessibility/AccessibilityTable.cpp:
1002         (WebCore::AccessibilityTable::tableElement):
1003         (WebCore::AccessibilityTable::isDataTable):
1004
1005 2015-10-20  Chris Dumez  <cdumez@apple.com>
1006
1007         Unreviewed, GTK build fix after r191351.
1008
1009         * html/HTMLFormElement.cpp:
1010         (WebCore::HTMLFormElement::elementsForNativeBindings):
1011         (WebCore::HTMLFormElement::elementsForObjC): Deleted.
1012         * html/HTMLFormElement.h:
1013         * html/HTMLFormElement.idl:
1014
1015 2015-10-20  Simon Fraser  <simon.fraser@apple.com>
1016
1017         Add basic TextStream output for Images
1018         https://bugs.webkit.org/show_bug.cgi?id=150350
1019
1020         Reviewed by Darin Adler.
1021
1022         Add a TextStream output operator for Image, and virtual dump() member functions
1023         that the various image types override to dump their own data.
1024         
1025         Add isFoo() functions for each image type (surprising that these didn't already
1026         exist) so we can print the image type.
1027         
1028         Make isAnimated() const, and isBitmapImage() private.
1029
1030         * platform/graphics/BitmapImage.cpp:
1031         (WebCore::BitmapImage::dump):
1032         * platform/graphics/BitmapImage.h:
1033         * platform/graphics/CrossfadeGeneratedImage.cpp:
1034         (WebCore::CrossfadeGeneratedImage::dump):
1035         * platform/graphics/CrossfadeGeneratedImage.h:
1036         * platform/graphics/GeneratedImage.cpp:
1037         * platform/graphics/GeneratedImage.h:
1038         * platform/graphics/GradientImage.cpp:
1039         (WebCore::GradientImage::dump):
1040         * platform/graphics/GradientImage.h:
1041         * platform/graphics/Image.cpp:
1042         (WebCore::Image::dump):
1043         (WebCore::operator<<):
1044         * platform/graphics/Image.h:
1045         (WebCore::Image::isGeneratedImage):
1046         (WebCore::Image::isCrossfadeGeneratedImage):
1047         (WebCore::Image::isNamedImageGeneratedImage):
1048         (WebCore::Image::isGradientImage):
1049         (WebCore::Image::isSVGImage):
1050         (WebCore::Image::isAnimated):
1051         * platform/graphics/NamedImageGeneratedImage.cpp:
1052         (WebCore::NamedImageGeneratedImage::dump):
1053         * platform/graphics/NamedImageGeneratedImage.h:
1054         * platform/graphics/cg/PDFDocumentImage.cpp:
1055         (WebCore::PDFDocumentImage::dump):
1056         * platform/graphics/cg/PDFDocumentImage.h:
1057         * svg/graphics/SVGImage.cpp:
1058         (WebCore::SVGImage::dump):
1059         * svg/graphics/SVGImage.h:
1060
1061 2015-10-20  Chris Dumez  <cdumez@apple.com>
1062
1063         Use tighter typing for collections / node lists' item() / namedItem() methods
1064         https://bugs.webkit.org/show_bug.cgi?id=150347
1065
1066         Reviewed by Darin Adler.
1067
1068         Use tighter typing for collections / node lists' item() / namedItem() methods.
1069
1070         * accessibility/AccessibilityRenderObject.cpp:
1071         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1072         * dom/LiveNodeList.h:
1073         * dom/StaticNodeList.cpp:
1074         (WebCore::StaticElementList::item):
1075         * dom/StaticNodeList.h:
1076         * html/CachedHTMLCollection.h:
1077         * html/HTMLAllCollection.idl:
1078         * html/HTMLCollection.idl:
1079         * html/HTMLFieldSetElement.cpp:
1080         (WebCore::HTMLFieldSetElement::elements):
1081         (WebCore::HTMLFieldSetElement::elementsForObjC):
1082         * html/HTMLFieldSetElement.h:
1083         * html/HTMLFieldSetElement.idl:
1084         * html/HTMLFormControlsCollection.cpp:
1085         (WebCore::HTMLFormControlsCollection::customElementAfter):
1086         * html/HTMLFormControlsCollection.h:
1087         * html/HTMLFormControlsCollection.idl:
1088         * html/HTMLFormElement.cpp:
1089         (WebCore::HTMLFormElement::item):
1090         (WebCore::HTMLFormElement::elements):
1091         (WebCore::HTMLFormElement::elementsForObjC):
1092         * html/HTMLFormElement.h:
1093         * html/HTMLFormElement.idl:
1094         * html/HTMLOptionsCollection.cpp:
1095         (WebCore::HTMLOptionsCollection::add):
1096         * html/HTMLOptionsCollection.h:
1097         * html/HTMLOptionsCollection.idl:
1098         * html/HTMLSelectElement.cpp:
1099         (WebCore::HTMLSelectElement::namedItem):
1100         (WebCore::HTMLSelectElement::item):
1101         (WebCore::HTMLSelectElement::setOption):
1102         * html/HTMLSelectElement.idl:
1103         * html/HTMLTableRowElement.cpp:
1104         (WebCore::HTMLTableRowElement::deleteCell):
1105         * html/HTMLTableSectionElement.cpp:
1106         (WebCore::HTMLTableSectionElement::deleteRow):
1107         * html/RadioNodeList.cpp:
1108         (WebCore::toRadioButtonInputElement):
1109         (WebCore::RadioNodeList::value):
1110         (WebCore::RadioNodeList::setValue):
1111         * html/RadioNodeList.h:
1112         * html/RadioNodeList.idl:
1113
1114 2015-10-20  Chris Dumez  <cdumez@apple.com>
1115
1116         Only HTML spaces should be stripped from a <script>'s 'for' / 'event' attributes
1117         https://bugs.webkit.org/show_bug.cgi?id=150335
1118
1119         Reviewed by Darin Adler.
1120
1121         Only HTML spaces should be stripped from a <script>'s 'for' / 'event' attributes:
1122         https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script (step 12.3)
1123         https://html.spec.whatwg.org/multipage/infrastructure.html#space-character
1124
1125         Previously, we were uding the wrong stripping function and we were stripping
1126         some non-HTML spaces.
1127
1128         Test: fast/dom/script-for-event-spaces.html
1129
1130         * dom/ScriptElement.cpp:
1131         (WebCore::ScriptElement::isScriptForEventSupported):
1132
1133 2015-10-20  Csaba Osztrogonác  <ossy@webkit.org>
1134
1135         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r191128
1136         https://bugs.webkit.org/show_bug.cgi?id=150321
1137
1138         Reviewed by Darin Adler.
1139
1140         * css/CSSGrammar.y.in: Typo fix.
1141
1142 2015-10-20  Tim Horton  <timothy_horton@apple.com>
1143
1144         Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
1145
1146         * Configurations/FeatureDefines.xcconfig:
1147
1148 2015-10-13  Sergio Villar Senin  <svillar@igalia.com>
1149
1150         ASSERTION FAILED: computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize) in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
1151         https://bugs.webkit.org/show_bug.cgi?id=149459
1152
1153         Reviewed by Darin Adler.
1154
1155         This was regressed after 189567 where min-height|width:auto
1156         support was added to flex items. The merge from Blink changes
1157         was not correctly done for assertions. In particular we were
1158         asserting if the resolved main size was not strictly greater
1159         than 0, but 0 is actually a valid value.
1160
1161         Test: fast/flexbox/crash-resolved-main-size-zero.html
1162
1163         * rendering/RenderFlexibleBox.cpp:
1164         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1165
1166 2015-10-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1167
1168         [Streams API] Rework some readable stream internals that can be common to writable streams
1169         https://bugs.webkit.org/show_bug.cgi?id=150133
1170
1171         Reviewed by Darin Adler.
1172
1173         There are some things in ReadableStream internals that be be used also for Writable Streams so it was necessary
1174         to move some functions and refactor some code that can be shared by both implementations.
1175
1176         Queue was written with the functions declared at the implementation and keeping the improvement of having the
1177         total size calculated instead of having to transverse the whole array.
1178
1179         The strategy is kept as an object and a common method is used to validate it as per spec.
1180
1181         Promises are reworked to keep in an internal slot inside the promise object the resolve and reject
1182         functions. For convinience three functions were written, one to create the promise (and keep internally the
1183         resolve and reject functions), one to resolve and another to reject. Promises can still be created with
1184         Promise.resolve or reject as the resolve and rejectStreamsPromise functions operate under the assumption that
1185         the internal slots might not exist.
1186
1187         invokeOrNoop and promiseInvokeOrNoop were moved to the common code as they will be also used by WritableStream.
1188
1189         Current test set suffices.
1190
1191         * CMakeLists.txt:
1192         * DerivedSources.make:
1193         * WebCore.xcodeproj/project.pbxproj:
1194         * bindings/js/JSDOMWindowBase.cpp:
1195         * bindings/js/WebCoreJSBuiltinInternals.h:
1196         * bindings/js/WebCoreJSBuiltins.cpp:
1197         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
1198         * Modules/streams/ReadableStream.js:
1199         (initializeReadableStream): Reworked queue and strategy.
1200         * Modules/streams/ReadableStreamInternals.js:
1201         (privateInitializeReadableStreamReader):
1202         (errorReadableStream):
1203         (getReadableStreamDesiredSize):
1204         (cancelReadableStream):
1205         (closeReadableStream):
1206         (closeReadableStreamReader):
1207         (enqueueInReadableStream):
1208         (readFromReadableStreamReader): Reworked queue, strategy and promises.
1209         (invokeOrNoop): Deleted.
1210         (promiseInvokeOrNoop): Deleted.
1211         * Modules/streams/StreamInternals.js: Added.
1212         (invokeOrNoop):
1213         (promiseInvokeOrNoop): Moved from ReadableStreamInternals.js.
1214         (validateAndNormalizeQueuingStrategy):
1215         (createNewStreamsPromise):
1216         (resolveStreamsPromise):
1217         (rejectStreamsPromise):
1218         (newQueue):
1219         (dequeueValue):
1220         (enqueueValueWithSize): Added according to the spec.
1221         * bindings/js/WebCoreBuiltinNames.h: Updated private names according to the new slots.
1222
1223 2015-10-20  Yoav Weiss  <yoav@yoav.ws>
1224
1225         Rename the PICTURE_SIZES flag to CURRENTSRC
1226         https://bugs.webkit.org/show_bug.cgi?id=150275
1227
1228         Reviewed by Dean Jackson.
1229
1230         No new tests, since there is no functional change.
1231
1232         * Configurations/FeatureDefines.xcconfig:
1233         * html/HTMLImageElement.cpp:
1234         * html/HTMLImageElement.h:
1235         * html/HTMLImageElement.idl:
1236
1237 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1238
1239         ASSERTION FAILED: m_state == Initialized in SubresourceLoader::didReceiveResponse()
1240         https://bugs.webkit.org/show_bug.cgi?id=150327
1241
1242         Reviewed by Antti Koivisto.
1243
1244         This is how it happens:
1245
1246         1. print() is called while the document is still loading, so
1247            m_shouldPrintWhenFinishedLoading is set to true
1248         2. DataURLDecoder::decode() finishes in the work queue thread,
1249            the completion handler is scheduled in the main thread
1250         3. The load is cancelled
1251           3.1. SubresourceLoader::willCancel sets m_state = Finishing
1252           3.2. DOMWindow::finishedLoading() is called, and since
1253                m_shouldPrintWhenFinishedLoading is true, it does the print.
1254           3.3. Cancellation finishes and ResourceLoader::releaseResources()
1255                is called that sets m_reachedTerminalState = true
1256
1257         So, between 3.1 and 3.3, the state is Finishing, but
1258         m_reachedTerminalState is false. What happens, in the GTK+ port at
1259         least, is that the nested main loop used to make print()
1260         synchronous, processes the DataURLDecoder::decode() completion
1261         handler that was pending. The completion handler returns early if
1262         m_reachedTerminalState is true, but it's not yet in this
1263         particular case. So, it ends up calling didReceiveResponse,
1264         because the decode didn't fail, when the subresource loader state
1265         is Finishing.
1266
1267         I think there are two things here. One is that we shouldn't start
1268         a print that was waiting for the load to finish when it
1269         failed. That would fix the problem. But it's probably a good idea
1270         to also check for cancellation in the DataURLDecoder::decode()
1271         completion handler.
1272
1273         Fixes printing/print-close-crash.html in GTK+ Debug.
1274
1275         * loader/ResourceLoader.cpp:
1276         (WebCore::ResourceLoader::loadDataURL): Return early from
1277         DataURLDecoder::decode() completion handler if the load was cancelled.
1278         * page/DOMWindow.cpp:
1279         (WebCore::DOMWindow::finishedLoading): Do not start a print that
1280         was witing for the load to finish when it failed.
1281
1282 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
1283
1284         FontCascade::typesettingFeatures() is not privy to font-variant-* nor font-feature-settings
1285         https://bugs.webkit.org/show_bug.cgi?id=149775
1286
1287         Reviewed by Darin Adler.
1288
1289         This patch has two pieces:
1290
1291         We used to have a boolean, enableLigatures, which affected how we perform shaping in both our
1292         simple and complex text codepaths. However, in this brave new world of font-feature-settings
1293         and font-variant-*, there are many properties which may affect shaping (and multiple kinds
1294         of ligatures). This patch renames this boolean to requiresShaping, and teaches it about all
1295         the various properties which affect text shaping.
1296
1297         Similarly, one of the places which used this enableLigatures boolean was to tell CoreText
1298         if it should disable ligatures. However, we now have much finer-grained control over
1299         ligatures during font creation. This patch moves the responsibility of dictating which
1300         font features should be enabled entirely to the Font. Therefore, getCFStringAttributes()
1301         doesn't know anything about ligatures anymore; the logic inside font creation is used
1302         instead.
1303
1304         An added benefit of moving all the font feature logic to one place is that we can implement
1305         the feature resolution algorithm described in the CSS3 fonts spec. This patch adds a test to
1306         makes sure that text-rendering, font-feature-settings, and font-variant-* play together
1307         nicely.
1308
1309         Test: fast/text/multiple-feature-properties.html
1310
1311         * platform/graphics/Font.cpp:
1312         (WebCore::Font::applyTransforms):
1313         * platform/graphics/Font.h:
1314         * platform/graphics/FontCascade.cpp:
1315         (WebCore::FontCascade::FontCascade):
1316         (WebCore::FontCascade::operator=):
1317         (WebCore::FontCascade::update):
1318         (WebCore::FontCascade::drawText):
1319         (WebCore::FontCascade::drawEmphasisMarks):
1320         (WebCore::FontCascade::width):
1321         (WebCore::FontCascade::adjustSelectionRectForText):
1322         (WebCore::FontCascade::offsetForPosition):
1323         (WebCore::FontCascade::codePath):
1324         (WebCore::FontCascade::floatWidthForSimpleText):
1325         * platform/graphics/FontCascade.h:
1326         (WebCore::FontCascade::requiresShaping):
1327         (WebCore::FontCascade::computeRequiresShaping):
1328         (WebCore::FontCascade::enableLigatures): Deleted.
1329         (WebCore::FontCascade::computeEnableLigatures): Deleted.
1330         * platform/graphics/WidthIterator.cpp:
1331         (WebCore::WidthIterator::WidthIterator):
1332         (WebCore::WidthIterator::applyFontTransforms):
1333         * platform/graphics/WidthIterator.h:
1334         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1335         (WebCore::preparePlatformFont):
1336         * platform/graphics/cocoa/FontCocoa.mm:
1337         (WebCore::Font::canRenderCombiningCharacterSequence):
1338         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1339         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
1340         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
1341         (WebCore::Font::getCFStringAttributes):
1342         * svg/SVGFontData.h:
1343
1344 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
1345
1346         Shadow GraphicsContext's ImageInterpolationQuality inside GraphicsContextState
1347         https://bugs.webkit.org/show_bug.cgi?id=150306
1348
1349         Reviewed by Simon Fraser.
1350
1351         When getting the ImageInterpolationQuality, there is no need to round-trip through
1352         the platform's graphics context. This patch migrates this piece of state to the
1353         existing idiom of having a setter in GraphicsContext.cpp which sets the relevent
1354         state in GraphicsContextState and then calls into a platform-specific setter.
1355
1356         No new tests because there is no behavior change.
1357
1358         * platform/graphics/GraphicsContext.cpp:
1359         (WebCore::GraphicsContext::setImageInterpolationQuality):
1360         * platform/graphics/GraphicsContext.h:
1361         (WebCore::GraphicsContext::imageInterpolationQuality):
1362         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1363         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
1364         (WebCore::GraphicsContext::setImageInterpolationQuality): Deleted.
1365         (WebCore::GraphicsContext::imageInterpolationQuality): Deleted.
1366         * platform/graphics/cg/GraphicsContextCG.cpp:
1367         (WebCore::convertInterpolationQuality):
1368         (WebCore::GraphicsContext::platformInit):
1369         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
1370         (WebCore::GraphicsContext::setImageInterpolationQuality): Deleted.
1371         (WebCore::GraphicsContext::imageInterpolationQuality): Deleted.
1372
1373 2015-10-19  Chris Dumez  <cdumez@apple.com>
1374
1375         Drop unnecessary Node::toInputElement() virtual function
1376         https://bugs.webkit.org/show_bug.cgi?id=150341
1377
1378         Reviewed by Darin Adler.
1379
1380         Drop unnecessary Node::toInputElement() virtual function and use the
1381         usual is<HTMLInputElement>() / downcast< HTMLInputElement >() instead.
1382
1383 2015-10-19  Commit Queue  <commit-queue@webkit.org>
1384
1385         Unreviewed, rolling out r191324.
1386         https://bugs.webkit.org/show_bug.cgi?id=150352
1387
1388         Shadowing CTM's state is not necessary (Requested by litherum
1389         on #webkit).
1390
1391         Reverted changeset:
1392
1393         "Host GraphicsContext's CTM inside GraphicsContextState"
1394         https://bugs.webkit.org/show_bug.cgi?id=150146
1395         http://trac.webkit.org/changeset/191324
1396
1397 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
1398
1399         Host GraphicsContext's CTM inside GraphicsContextState
1400         https://bugs.webkit.org/show_bug.cgi?id=150146
1401
1402         There are 6 operations which interact with CTMs:
1403         - Get
1404         - Set
1405         - Concatenate
1406         - Scale
1407         - Rotate
1408         - Translate
1409
1410         This patch modifies all these operations so that these operations shadow the
1411         platform's CTM inside GraphicsContextState. This way, we don't have to consult
1412         with the underlying graphics context in order to know the current CTM.
1413
1414         There are currently many places in the Core Graphics ports where we will change
1415         the platform's CTM out from under the GraphicsContext. This patch migrates
1416         those users to going through GraphicsContext, thereby preserving the integrity
1417         of the shadowed state.
1418
1419         No new tests because there is no behavior change.
1420
1421         * platform/graphics/GraphicsContext.cpp: Setters deletate to platform calls.
1422         The getter can just consult with the shadowed state.
1423         (WebCore::GraphicsContext::concatCTM):
1424         (WebCore::GraphicsContext::scale):
1425         (WebCore::GraphicsContext::rotate):
1426         (WebCore::GraphicsContext::translate):
1427         (WebCore::GraphicsContext::setCTM):
1428         (WebCore::GraphicsContext::getCTM):
1429         (WebCore::GraphicsContext::beginTransparencyLayer):
1430         (WebCore::GraphicsContext::applyDeviceScaleFactor):
1431         * platform/graphics/GraphicsContext.h:
1432         (WebCore::GraphicsContext::scale):
1433         (WebCore::GraphicsContext::checkCTMInvariants): Make sure the shadowed state
1434         matches the platform graphics context's state.
1435         * platform/graphics/Image.h:
1436         (WebCore::Image::nativeImageForCurrentFrame):
1437         * platform/graphics/cairo/GraphicsContextCairo.cpp: Renaming functions.
1438         (WebCore::GraphicsContext::resetPlatformCTM):
1439         (WebCore::GraphicsContext::getPlatformCTM):
1440         (WebCore::GraphicsContext::translatePlatformCTM):
1441         (WebCore::GraphicsContext::concatPlatformCTM):
1442         (WebCore::GraphicsContext::setPlatformCTM):
1443         (WebCore::GraphicsContext::rotatePlatformCTM):
1444         (WebCore::GraphicsContext::scalePlatformCTM):
1445         (WebCore::GraphicsContext::getCTM): Deleted.
1446         (WebCore::GraphicsContext::translate): Deleted.
1447         (WebCore::GraphicsContext::concatCTM): Deleted.
1448         (WebCore::GraphicsContext::setCTM): Deleted.
1449         (WebCore::GraphicsContext::rotate): Deleted.
1450         (WebCore::GraphicsContext::scale): Deleted.
1451         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1452         Renaming functions.
1453         (WebCore::GraphicsContextPlatformPrivate::save):
1454         (WebCore::GraphicsContextPlatformPrivate::restore):
1455         (WebCore::GraphicsContextPlatformPrivate::flush):
1456         (WebCore::GraphicsContextPlatformPrivate::clip):
1457         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
1458         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
1459         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
1460         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
1461         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
1462         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
1463         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
1464         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
1465         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
1466         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
1467         * platform/graphics/cg/GraphicsContextCG.cpp: Renaming functions. Also,
1468         migrate CTM setters to go through GraphicsContext.
1469         (WebCore::GraphicsContext::resetPlatformCTM):
1470         (WebCore::GraphicsContext::platformInit):
1471         (WebCore::GraphicsContext::drawNativeImage):
1472         (WebCore::GraphicsContext::drawPattern):
1473         (WebCore::GraphicsContext::fillPath):
1474         (WebCore::GraphicsContext::scalePlatformCTM):
1475         (WebCore::GraphicsContext::rotatePlatformCTM):
1476         (WebCore::GraphicsContext::translatePlatformCTM):
1477         (WebCore::GraphicsContext::concatPlatformCTM):
1478         (WebCore::GraphicsContext::setPlatformCTM):
1479         (WebCore::GraphicsContext::getPlatformCTM):
1480         (WebCore::GraphicsContext::scale): Deleted.
1481         (WebCore::GraphicsContext::rotate): Deleted.
1482         (WebCore::GraphicsContext::translate): Deleted.
1483         (WebCore::GraphicsContext::concatCTM): Deleted.
1484         (WebCore::GraphicsContext::setCTM): Deleted.
1485         (WebCore::GraphicsContext::getCTM): Deleted.
1486         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
1487         (WebCore::GraphicsContextPlatformPrivate::save):
1488         (WebCore::GraphicsContextPlatformPrivate::restore):
1489         (WebCore::GraphicsContextPlatformPrivate::flush):
1490         (WebCore::GraphicsContextPlatformPrivate::clip):
1491         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
1492         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
1493         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
1494         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
1495         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
1496         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
1497         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
1498         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
1499         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
1500         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
1501         * platform/graphics/transforms/AffineTransform.h:
1502         (WebCore::AffineTransform::isEssentiallyEqualTo): Equality comparison on floats
1503         is not a good idea. Instead, this function is more valuable. (However, note that
1504         it is expected for values in a CTM to hold values close to 0, which means that
1505         this function might erroneously return false (similar to operator=()).
1506         * platform/graphics/win/GraphicsContextWin.cpp:
1507         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
1508         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
1509         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
1510         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
1511         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
1512         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
1513         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
1514         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
1515         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
1516         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
1517         * platform/mac/DragImageMac.mm:
1518         (WebCore::drawAtPoint):
1519         * platform/spi/cg/CoreGraphicsSPI.h:
1520
1521 2015-10-19  Tim Horton  <timothy_horton@apple.com>
1522
1523         Remove unused support for long presses from WebKit
1524         https://bugs.webkit.org/show_bug.cgi?id=150345
1525
1526         Reviewed by Beth Dakin.
1527
1528         * page/Chrome.cpp:
1529         (WebCore::Chrome::didBeginTrackingPotentialLongMousePress): Deleted.
1530         (WebCore::Chrome::didRecognizeLongMousePress): Deleted.
1531         (WebCore::Chrome::didCancelTrackingPotentialLongMousePress): Deleted.
1532         * page/Chrome.h:
1533         * page/ChromeClient.h:
1534         * page/EventHandler.cpp:
1535         (WebCore::EventHandler::EventHandler): Deleted.
1536         (WebCore::EventHandler::clear): Deleted.
1537         (WebCore::EventHandler::handleMousePressEvent): Deleted.
1538         (WebCore::EventHandler::eventMayStartDrag): Deleted.
1539         (WebCore::EventHandler::handleMouseReleaseEvent): Deleted.
1540         (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Deleted.
1541         (WebCore::EventHandler::recognizeLongMousePress): Deleted.
1542         (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Deleted.
1543         (WebCore::EventHandler::clearLongMousePressState): Deleted.
1544         (WebCore::EventHandler::handleLongMousePressMouseMovedEvent): Deleted.
1545         (WebCore::EventHandler::handleMouseMoveEvent): Deleted.
1546         (WebCore::EventHandler::handleDrag): Deleted.
1547         * page/EventHandler.h:
1548         * page/Settings.in:
1549
1550 2015-10-19  Tim Horton  <timothy_horton@apple.com>
1551
1552         WKView being inside WKWebView leads to weird API issues
1553         https://bugs.webkit.org/show_bug.cgi?id=150174
1554
1555         Reviewed by Darin Adler.
1556
1557         No new tests, just moving code around.
1558
1559         * WebCore.xcodeproj/project.pbxproj:
1560         * platform/spi/mac/NSWindowSPI.h: Added.
1561
1562 2015-10-19  Simon Fraser  <simon.fraser@apple.com>
1563
1564         Restore an assertion to the way it was before r191310, which was correct.
1565
1566         * platform/graphics/GraphicsTypes.cpp:
1567         (WebCore::compositeOperatorName):
1568
1569 2015-10-19  Beth Dakin  <bdakin@apple.com>
1570
1571         Build fix.
1572
1573         * dom/EventNames.in:
1574         * dom/make_event_factory.pl:
1575         (generateImplementation):
1576
1577 2015-10-19  Csaba Osztrogonác  <ossy@webkit.org>
1578
1579         Fix the binding generator after r191176
1580         https://bugs.webkit.org/show_bug.cgi?id=150320
1581
1582         Reviewed by Darin Adler.
1583
1584         * bindings/scripts/CodeGeneratorJS.pm:
1585         (GenerateConstructorHelperMethods):
1586         * bindings/scripts/test/JS/JSTestInterface.cpp:
1587         (WebCore::JSTestInterfaceConstructor::getConstructData):
1588
1589 2015-10-19  Commit Queue  <commit-queue@webkit.org>
1590
1591         Unreviewed, rolling out r191307.
1592         https://bugs.webkit.org/show_bug.cgi?id=150338
1593
1594         broke lots of API tests, need time to figure out whats up
1595         (Requested by thorton on #webkit).
1596
1597         Reverted changeset:
1598
1599         "WKView being inside WKWebView leads to weird API issues"
1600         https://bugs.webkit.org/show_bug.cgi?id=150174
1601         http://trac.webkit.org/changeset/191307
1602
1603 2015-10-19  Commit Queue  <commit-queue@webkit.org>
1604
1605         Unreviewed, rolling out r191295, r191297, and r191301.
1606         https://bugs.webkit.org/show_bug.cgi?id=150337
1607
1608         ASSERTs in 5 tests (Requested by litherum on #webkit).
1609
1610         Reverted changesets:
1611
1612         "Host GraphicsContext's CTM inside GraphicsContextState"
1613         https://bugs.webkit.org/show_bug.cgi?id=150146
1614         http://trac.webkit.org/changeset/191295
1615
1616         "[iOS] Build fix after r191295"
1617         http://trac.webkit.org/changeset/191297
1618
1619         "Unreviewed build fix after r191295."
1620         http://trac.webkit.org/changeset/191301
1621
1622 2015-10-16  Brian Burg  <bburg@apple.com>
1623
1624         Unify handling of JavaScriptCore scripts that are used in WebCore
1625         https://bugs.webkit.org/show_bug.cgi?id=150245
1626
1627         Reviewed by Alex Christensen.
1628
1629         Use the new JavaScriptCore_SCRIPTS_DIR variable.
1630
1631         * CMakeLists.txt:
1632         * DerivedSources.make:
1633         * WebCore.xcodeproj/project.pbxproj:
1634
1635             No need to export other variables like InspectorScripts anymore.
1636
1637 2015-10-19  Simon Fraser  <simon.fraser@apple.com>
1638
1639         Add TextStream formatters for FillLayer and all it entails
1640         https://bugs.webkit.org/show_bug.cgi?id=150312
1641
1642         Reviewed by Tim Horton.
1643
1644         Add TextStream output formatters for FillLayer, and all the enum
1645         types used by it.
1646         
1647         Drive-by fixes for CompositeOperator and BlendMode string conversions.
1648         compositeOperatorNames was missing the "difference" string, and compositeOperatorName()
1649         would do an OOB memory access if blendOp was zero.
1650
1651         * CMakeLists.txt:
1652         * WebCore.xcodeproj/project.pbxproj:
1653         * platform/Length.cpp:
1654         (WebCore::operator<<):
1655         * platform/Length.h:
1656         * platform/LengthSize.cpp: Added.
1657         (WebCore::operator<<):
1658         * platform/LengthSize.h:
1659         * platform/text/TextStream.h:
1660         * rendering/style/FillLayer.cpp:
1661         (WebCore::operator<<):
1662         * rendering/style/FillLayer.h:
1663         * rendering/style/RenderStyleConstants.cpp: Added.
1664         (WebCore::operator<<):
1665         * rendering/style/RenderStyleConstants.h:
1666
1667 2015-10-19  Tim Horton  <timothy_horton@apple.com>
1668
1669         WKView being inside WKWebView leads to weird API issues
1670         https://bugs.webkit.org/show_bug.cgi?id=150174
1671
1672         Reviewed by Darin Adler.
1673
1674         No new tests, just moving code around.
1675
1676         * WebCore.xcodeproj/project.pbxproj:
1677         * platform/spi/mac/NSWindowSPI.h: Added.
1678
1679 2015-10-19  Tim Horton  <timothy_horton@apple.com>
1680
1681         Try to fix the iOS build
1682
1683         * Configurations/FeatureDefines.xcconfig:
1684
1685 2015-10-19  Alex Christensen  <achristensen@webkit.org>
1686
1687         Unreviewed build fix after r191295.
1688
1689         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1690         (WebCore::GraphicsContext::translatePlatformCTM):
1691         (WebCore::GraphicsContext::setPlatformFillColor):
1692         (WebCore::GraphicsContext::concatPlatformCTM):
1693         (WebCore::GraphicsContext::setPlatformCTM):
1694         (WebCore::GraphicsContext::setPlatformShadow):
1695         (WebCore::GraphicsContext::rotatePlatformCTM):
1696         (WebCore::GraphicsContext::scalePlatformCTM):
1697         (WebCore::GraphicsContext::clipOut):
1698         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1699         (WebCore::GraphicsContextPlatformPrivate::save):
1700         (WebCore::GraphicsContextPlatformPrivate::restore):
1701         (WebCore::GraphicsContextPlatformPrivate::flush):
1702         (WebCore::GraphicsContextPlatformPrivate::clip):
1703         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
1704         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
1705         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
1706         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
1707         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
1708         (WebCore::GraphicsContextPlatformPrivate::syncContext):
1709         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
1710         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
1711         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
1712         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
1713         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
1714
1715 2015-10-19  Tim Horton  <timothy_horton@apple.com>
1716
1717         Add magnify and rotate gesture event support for Mac
1718         https://bugs.webkit.org/show_bug.cgi?id=150179
1719         <rdar://problem/8036240>
1720
1721         Reviewed by Darin Adler.
1722
1723         No new tests.
1724
1725         * Configurations/FeatureDefines.xcconfig:
1726         New feature flag.
1727
1728         * Configurations/WebCore.xcconfig:
1729         Don't exclude generated gesture sources; they are already #ifdef-guarded.
1730
1731         * DerivedSources.make:
1732         Add GestureEvent.idl for ENABLE_MAC_GESTURE_EVENTS too.
1733
1734         * WebCore.xcodeproj/project.pbxproj:
1735         Add GestureEvents.cpp.
1736
1737         * bindings/objc/DOMEvents.mm:
1738         (kitClass):
1739         Support DOMGestureEvent on Mac if the new flag is enabled.
1740
1741         * dom/mac/GestureEvents.cpp: Added.
1742         * page/mac/EventHandlerMac.mm:
1743
1744         * page/EventHandler.cpp:
1745         (WebCore::EventHandler::clear):
1746         * page/EventHandler.h:
1747         Enable some gesture-related code on Mac if the new flag is enabled.
1748
1749         * platform/PlatformEvent.h:
1750
1751 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
1752
1753         [iOS] Build fix after r191295
1754
1755         Unreviewed.
1756
1757         * platform/graphics/cg/GraphicsContextCG.cpp:
1758         (WebCore::GraphicsContext::resetPlatformCTM):
1759
1760 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
1761
1762         Host GraphicsContext's CTM inside GraphicsContextState
1763         https://bugs.webkit.org/show_bug.cgi?id=150146
1764
1765         Reviewed by Simon Fraser.
1766
1767         There are 6 operations which interact with CTMs:
1768         - Get
1769         - Set
1770         - Concatenate
1771         - Scale
1772         - Rotate
1773         - Translate
1774
1775         This patch modifies all these operations so that these operations shadow the
1776         platform's CTM inside GraphicsContextState. This way, we don't have to consult
1777         with the underlying graphics context in order to know the current CTM.
1778
1779         There are currently many places in the Core Graphics ports where we will change
1780         the platform's CTM out from under the GraphicsContext. This patch migrates
1781         those users to going through GraphicsContext, thereby preserving the integrity
1782         of the shadowed state.
1783
1784         No new tests because there is no behavior change.
1785
1786         * platform/graphics/GraphicsContext.cpp: Setters deletate to platform calls.
1787         The getter can just consult with the shadowed state.
1788         (WebCore::GraphicsContext::concatCTM):
1789         (WebCore::GraphicsContext::scale):
1790         (WebCore::GraphicsContext::rotate):
1791         (WebCore::GraphicsContext::translate):
1792         (WebCore::GraphicsContext::setCTM):
1793         (WebCore::GraphicsContext::getCTM):
1794         (WebCore::GraphicsContext::beginTransparencyLayer):
1795         (WebCore::GraphicsContext::applyDeviceScaleFactor):
1796         * platform/graphics/GraphicsContext.h:
1797         (WebCore::GraphicsContext::scale):
1798         (WebCore::GraphicsContext::checkCTMInvariants): Make sure the shadowed state
1799         matches the platform graphics context's state.
1800         * platform/graphics/cairo/GraphicsContextCairo.cpp: Renaming functions.
1801         (WebCore::GraphicsContext::resetPlatformCTM):
1802         (WebCore::GraphicsContext::getPlatformCTM):
1803         (WebCore::GraphicsContext::translatePlatformCTM):
1804         (WebCore::GraphicsContext::concatPlatformCTM):
1805         (WebCore::GraphicsContext::setPlatformCTM):
1806         (WebCore::GraphicsContext::rotatePlatformCTM):
1807         (WebCore::GraphicsContext::scalePlatformCTM):
1808         (WebCore::GraphicsContext::getCTM): Deleted.
1809         (WebCore::GraphicsContext::translate): Deleted.
1810         (WebCore::GraphicsContext::concatCTM): Deleted.
1811         (WebCore::GraphicsContext::setCTM): Deleted.
1812         (WebCore::GraphicsContext::rotate): Deleted.
1813         (WebCore::GraphicsContext::scale): Deleted.
1814         * platform/graphics/cg/GraphicsContextCG.cpp: Renaming functions. Also,
1815         migrate CTM setters to go through GraphicsContext.
1816         (WebCore::GraphicsContext::resetPlatformCTM):
1817         (WebCore::GraphicsContext::platformInit):
1818         (WebCore::GraphicsContext::drawNativeImage):
1819         (WebCore::drawPatternCallback):
1820         (WebCore::GraphicsContext::drawPattern):
1821         (WebCore::GraphicsContext::fillPath):
1822         (WebCore::GraphicsContext::strokePath):
1823         (WebCore::GraphicsContext::fillRect):
1824         (WebCore::GraphicsContext::strokeRect):
1825         (WebCore::GraphicsContext::scalePlatformCTM):
1826         (WebCore::GraphicsContext::rotatePlatformCTM):
1827         (WebCore::GraphicsContext::translatePlatformCTM):
1828         (WebCore::GraphicsContext::concatPlatformCTM):
1829         (WebCore::GraphicsContext::setPlatformCTM):
1830         (WebCore::GraphicsContext::getPlatformCTM):
1831         (WebCore::GraphicsContext::scale): Deleted.
1832         (WebCore::GraphicsContext::rotate): Deleted.
1833         (WebCore::GraphicsContext::translate): Deleted.
1834         (WebCore::GraphicsContext::concatCTM): Deleted.
1835         (WebCore::GraphicsContext::setCTM): Deleted.
1836         (WebCore::GraphicsContext::getCTM): Deleted.
1837         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
1838         (WebCore::GraphicsContextPlatformPrivate::save):
1839         (WebCore::GraphicsContextPlatformPrivate::restore):
1840         (WebCore::GraphicsContextPlatformPrivate::flush):
1841         (WebCore::GraphicsContextPlatformPrivate::clip):
1842         (WebCore::GraphicsContextPlatformPrivate::scale):
1843         (WebCore::GraphicsContextPlatformPrivate::rotate):
1844         (WebCore::GraphicsContextPlatformPrivate::translate):
1845         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
1846         (WebCore::GraphicsContextPlatformPrivate::setCTM):
1847         * platform/graphics/transforms/AffineTransform.h:
1848         (WebCore::AffineTransform::isEssentiallyEqualTo): Equality comparison on floats
1849         is not a good idea. Instead, this function is more valuable. (However, note that
1850         it is expected for values in a CTM to hold values close to 0, which means that
1851         this function might erroneously return false (similar to operator=()).
1852         * platform/graphics/win/GraphicsContextWin.cpp:
1853         (WebCore::GraphicsContextPlatformPrivate::scale):
1854         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
1855         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
1856         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
1857         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
1858         * platform/mac/DragImageMac.mm:
1859         (WebCore::drawAtPoint):
1860
1861 2015-10-19  Chris Dumez  <cdumez@apple.com>
1862
1863         Null dereference loading Blink layout test fast/forms/color/input-color-onchange-event.html
1864         https://bugs.webkit.org/show_bug.cgi?id=150192
1865         <rdar://problem/23135050>
1866
1867         Reviewed by Darin Adler.
1868
1869         Calling internals.selectColorInColorChooser() with a non-Element would
1870         cause a null dereference. This is because in such case, the implementation
1871         method is passed a null pointer and we would fail to null-check it. This
1872         patch now does the null-check.
1873
1874         No new tests, existing test was updated.
1875
1876         * testing/Internals.cpp:
1877         (WebCore::Internals::selectColorInColorChooser):
1878
1879 2015-10-19  Csaba Osztrogonác  <ossy@webkit.org>
1880
1881         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r190840
1882         https://bugs.webkit.org/show_bug.cgi?id=150322
1883
1884         Reviewed by Ryosuke Niwa.
1885
1886         * html/HTMLDetailsElement.cpp:
1887
1888 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1889
1890         Binding generator should generate names for JSBuiltins partial interface methods using ImplementedBy value
1891         https://bugs.webkit.org/show_bug.cgi?id=150163
1892
1893         Reviewed by Darin Adler.
1894
1895         Covered by updated binding tests.
1896
1897         Updating generation of JS built-in function/attribute name to use the ImplementedBy value of the interface if any.
1898         This allows splitting JS built-ins just like is done for IDLs.
1899         Updated accordingly the JS Builtin header include.
1900
1901         * bindings/scripts/CodeGeneratorJS.pm:
1902         (GetAttributeGetterName): Updated to pass function object and not only function name.
1903         (GetAttributeSetterName): Ditto.
1904         (GetFunctionName): Removed unneeded code plus updated to pass function object and not only function name.
1905         (GenerateConstructorHelperMethods): Making direct use of GetJSBuiltinFunctionNameFromString since there is no function object for the constructor.
1906         (GetJSBuiltinFunctionName): Updated to take into accound ImplementedBy value if any.
1907         (GetJSBuiltinFunctionNameFromString):
1908         (GetJSBuiltinScopeName): Returns either the interface name or its ImplementedBy value.
1909         (AddJSBuiltinIncludesIfNeeded): Updating name of the header in case of partial interface.
1910         * bindings/scripts/test/JS/JSTestInterface.cpp:
1911         * bindings/scripts/test/ObjC/DOMTestInterface.h:
1912         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
1913         (-[DOMTestInterface builtinAttribute]):
1914         (-[DOMTestInterface setBuiltinAttribute:]):
1915         (-[DOMTestInterface builtinFunction]):
1916         * bindings/scripts/test/TestSupplemental.idl: Added JSBuiltin attribute and function.
1917
1918 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1919
1920         Binding generator should allow generating private JS functions
1921         https://bugs.webkit.org/show_bug.cgi?id=150167
1922
1923         Reviewed by Darin Adler.
1924
1925         Introducing the "Private" keyword for that purpose.
1926         Applying it to MediaDevices.getUserMedia which can be used directly or through navigator.webkitGetUserMedia
1927         which could be implemented as JS builtin based on it.
1928
1929         "Private" functions are added to the prototype with a corresponding private symbol.
1930         This symbol must be defined in bindings/js/WebCoreBuiltinNames.h.
1931
1932         Adding a getUserMediaFromJS function visible from builtins script.
1933         Implementing MediaDevices.getUserMedia as a JS builtin based on it.
1934
1935         Adding binding generator test.
1936
1937         * CMakeLists.txt: Adding MediaDevices.js.
1938         * DerivedSources.make: Ditto.
1939         * Modules/mediastream/MediaDevices.h:
1940         (WebCore::MediaDevices::getUserMediaFromJS):
1941         * Modules/mediastream/MediaDevices.idl: Marking getUserMediaFromJS private and getUserMedia JSBuiltin.
1942         * Modules/mediastream/MediaDevices.js: Added.
1943         (getUserMedia):
1944         * bindings/js/WebCoreBuiltinNames.h:
1945         * bindings/js/WebCoreJSBuiltins.cpp:
1946         * bindings/js/WebCoreJSBuiltins.h:
1947         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
1948         (WebCore::JSBuiltinFunctions::mediaDevicesBuiltins):
1949         * bindings/scripts/CodeGeneratorGObject.pm: Skipping generation of Private functions.
1950         (SkipFunction):
1951         * bindings/scripts/CodeGeneratorJS.pm:
1952         (GenerateImplementation): Disabling addition of private function in table and adding private member field to the prototype.
1953         * bindings/scripts/CodeGeneratorObjC.pm: Skipping generation of Private functions.
1954         (SkipFunction):
1955         * bindings/scripts/IDLAttributes.txt: Adding Private keyword.
1956         * bindings/scripts/test/JS/JSTestObj.cpp: Adding Private keyword test.
1957         (WebCore::JSTestObjPrototype::finishCreation):
1958         (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
1959         * bindings/scripts/test/TestObj.idl:
1960
1961 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1962
1963         [Streams API] Implement ReadableStream tee
1964         https://bugs.webkit.org/show_bug.cgi?id=146315
1965
1966         Reviewed by Darin Adler.
1967
1968         Covered by rebased test.
1969
1970         * Modules/streams/ReadableStream.js:
1971         (tee): Removing not implemented exception throwing.
1972         * Modules/streams/ReadableStreamInternals.js:
1973         (teeReadableStream): Implementing as per spec.
1974         (teeReadableStreamPullFunction): Ditto.
1975         (teeReadableStreamBranch2CancelFunction): Ditto.
1976
1977 2015-10-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1978
1979         [Streams API] Add skeleton for initial WritableStream support
1980         https://bugs.webkit.org/show_bug.cgi?id=149951
1981
1982         Reviewed by Darin Adler.
1983
1984         This basically adds an empty WritableStream object without initializing the object. It also adds all empty
1985         methods by raising an exception.
1986
1987         The reason why the object is not fully initialized is that it requires some other support and some refactorings
1988         to share more code with ReadableStream and we will make in following patches.
1989
1990         Tests are covered by current set and their expectations are properly updated.
1991
1992         * CMakeLists.txt:
1993         * DerivedSources.cpp:
1994         * DerivedSources.make:
1995         * WebCore.vcxproj/WebCore.vcxproj:
1996         * WebCore.vcxproj/WebCore.vcxproj.filters:
1997         * WebCore.xcodeproj/project.pbxproj:
1998         * bindings/js/WebCoreJSBuiltins.cpp:
1999         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
2000         * Modules/streams/WritableStream.idl: Added all methods and attributes.
2001         * Modules/streams/WritableStream.js:
2002         (initializeWritableStream):
2003         (abort):
2004         (close):
2005         (write):
2006         (closed):
2007         (ready):
2008         (state): Added all by throwing an EvalError.
2009
2010 2015-10-18  Chris Dumez  <cdumez@apple.com>
2011
2012         Script element with an empty for or event attributes should not execute
2013         https://bugs.webkit.org/show_bug.cgi?id=148855
2014         <rdar://problem/22588156>
2015
2016         Reviewed by Darin Adler.
2017
2018         A script element with an empty for or event attributes should not execute
2019         as per:
2020         https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script (step 12)
2021
2022         Our implementation had a bug where it would not correctly differentiate
2023         an empty attribute from a missing one. This patch fixes this.
2024
2025         No new tests, already covered by existing test.
2026
2027         * dom/ScriptElement.cpp:
2028         (WebCore::ScriptElement::isScriptForEventSupported):
2029
2030 2015-10-18  Chris Dumez  <cdumez@apple.com>
2031
2032         WebKit must support all JavaScript MIME types in HTML5 spec
2033         https://bugs.webkit.org/show_bug.cgi?id=148854
2034         <rdar://problem/22588195>
2035
2036         Reviewed by Darin Adler.
2037
2038         WebKit did not execute certain EcmaScript MIME types although the HTML
2039         specification says all user agents should support those:
2040         https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type
2041
2042         In particular, the following MIME types are now recognized as valid and
2043         executed: "application/x-ecmascript", "text/javascript1.0",
2044         "text/javascript1.4", "text/javascript1.5", "text/x-javascript",
2045         "text/x-ecmascript".
2046
2047         The new behavior is consistent with Firefox.
2048
2049         No new tests, already covered by existing test.
2050
2051         * platform/MIMETypeRegistry.cpp:
2052         (WebCore::initializeSupportedJavaScriptMIMETypes):
2053
2054 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
2055
2056         [Win] Fix the Windows builds.
2057         https://bugs.webkit.org/show_bug.cgi?id=150300
2058
2059         Reviewed by Darin Adler.
2060
2061         Add missing files to WebCore.vcxproj.
2062         Add missing #includes to CSSAllInOne.cpp and HTMLElementsAllInOne.cpp.
2063
2064         No new tests, no behavior change.
2065
2066         * WebCore.vcxproj/WebCore.vcxproj:
2067         * WebCore.vcxproj/WebCore.vcxproj.filters:
2068         * css/CSSAllInOne.cpp:
2069         * html/HTMLElementsAllInOne.cpp:
2070
2071 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
2072
2073         Fix the builds with ENABLE_CONTENT_EXTENSIONS=OFF.
2074         https://bugs.webkit.org/show_bug.cgi?id=150302
2075
2076         Reviewed by Darin Adler.
2077
2078         Add missing #if ENABLE(CONTENT_EXTENSIONS).
2079
2080         No new tests, no behavior change.
2081
2082         * page/UserContentController.h:
2083
2084 2015-10-18  Joonghun Park  <jh718.park@samsung.com>
2085
2086         [EFL] Fix debug build break since r191198
2087         https://bugs.webkit.org/show_bug.cgi?id=150277
2088
2089         Reviewed by Darin Adler.
2090
2091         No new tests, no new behaviours.
2092
2093         Use the correct %"PRIu64" for uint64_t,
2094         instead of %llu.
2095
2096         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2097         (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent):
2098         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2099         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
2100         * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp:
2101         (WebCore::IDBDatabaseBackend::processPendingOpenCalls):
2102         (WebCore::IDBDatabaseBackend::openConnectionInternal):
2103         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2104         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
2105
2106 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
2107
2108         Fix the builds with ENABLE_INDEX_DATABASE=OFF.
2109         https://bugs.webkit.org/show_bug.cgi?id=150301
2110
2111         Reviewed by Darin Adler.
2112
2113         Add missing #if ENABLE(INDEXED_DATABASE).
2114
2115         No new tests, no behavior change.
2116
2117         * page/Page.cpp:
2118
2119 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
2120
2121         [Cocoa] [Win] Remove unused code from GraphicsContext
2122         https://bugs.webkit.org/show_bug.cgi?id=150304
2123
2124         Reviewed by Darin Adler.
2125
2126         No new tests because there is no behavior change.
2127
2128         * platform/graphics/GraphicsContext.h:
2129         * platform/graphics/cg/GraphicsContextCG.cpp:
2130         (WebCore::GraphicsContext::setAllowsFontSmoothing): Deleted.
2131
2132 2015-10-18  Antti Koivisto  <antti@apple.com>
2133
2134         Computed style should work correctly with slotted elements that have display:none
2135         https://bugs.webkit.org/show_bug.cgi?id=150237
2136
2137         Reviewed by Andreas Kling..
2138
2139         If an element has display:none we don't normally retain or even compute its style (as it is not rendered).
2140         If getComputedStyle is invoked for such element we resolve the style (along with any ancestors) and cache
2141         it separately to rare data. This path needs to work with slotted elements in shadow trees.
2142
2143         This patch also make computedStyle() iterative rather than recursive.
2144
2145         Test: fast/shadow-dom/computed-style-display-none.html
2146
2147         * dom/Document.cpp:
2148         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
2149
2150             Pass in the parent style instead of invoking computedStyle() recursively.
2151
2152         * dom/Document.h:
2153         * dom/Element.cpp:
2154         (WebCore::beforeOrAfterPseudoElement):
2155         (WebCore::Element::existingComputedStyle):
2156         (WebCore::Element::resolveComputedStyle):
2157
2158             Iterative resolve function that uses composed tree iterator.
2159
2160         (WebCore::Element::computedStyle):
2161
2162             Factor into helpers.
2163
2164         * dom/Element.h:
2165         * dom/Node.cpp:
2166         (WebCore::Node::computedStyle):
2167
2168             Use the composed tree iterator.
2169
2170         * html/HTMLSelectElement.cpp:
2171         (WebCore::HTMLSelectElement::selectOption):
2172
2173             Call updateValidity() before calling renderer->updateFromElement(). Calling updateFromElement()
2174             may end up in Element::computedStyle() which can asserts if validity is not up to date.
2175
2176 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
2177
2178         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
2179         https://bugs.webkit.org/show_bug.cgi?id=150287
2180
2181         Reviewed by Simon Fraser.
2182
2183         This user default is currently on by default. Therefore, by setting the user default,
2184         users can only disable kerning / ligatures (rather than enable it).
2185
2186         There are a few reasons why we should stop honoring it:
2187
2188         1. In the brave new world of font-feature-settings and font-variant-ligatures, there
2189         are many different kinds of ligatures which may be enabled at will. The simplistic
2190         statement of "turn on ligatures" no longer has any meaning.
2191
2192         2. If a user wants to disable kerning / ligatures, he/she can do it with a user
2193         stylesheet.
2194
2195         3. The default isn't able to be tested with DumpRenderTree or WebKitTestRunner.
2196
2197         4. I have never heard of anyone actually using this user default.
2198
2199         * platform/graphics/FontCascade.cpp:
2200         (WebCore::FontCascade::setDefaultKerning): Deleted.
2201         (WebCore::FontCascade::setDefaultLigatures): Deleted.
2202         * platform/graphics/FontCascade.h:
2203         (WebCore::FontCascade::advancedTextRenderingMode):
2204
2205 2015-10-18  Commit Queue  <commit-queue@webkit.org>
2206
2207         Unreviewed, rolling out r191250 and r191253.
2208         https://bugs.webkit.org/show_bug.cgi?id=150296
2209
2210         Broke all the tests on Windows (Requested by ap on #webkit).
2211
2212         Reverted changesets:
2213
2214         "Stop honoring the user default
2215         "WebKitKerningAndLigaturesEnabledByDefault""
2216         https://bugs.webkit.org/show_bug.cgi?id=150287
2217         http://trac.webkit.org/changeset/191250
2218
2219         "Build fix after r191250"
2220         http://trac.webkit.org/changeset/191253
2221
2222 2015-10-17  David Hyatt  <hyatt@apple.com>
2223
2224         Implement the CSS4 'revert' keyword.
2225         https://bugs.webkit.org/show_bug.cgi?id=149702
2226
2227         Reviewed by Simon Fraser.
2228
2229         Added new tests in fast/css and fast/css/variables.
2230
2231         * CMakeLists.txt:
2232         * WebCore.xcodeproj/project.pbxproj:
2233         Add CSSRevertValue to the project and makefiles.
2234
2235         * css/CSSParser.cpp:
2236         (WebCore::parseKeywordValue):
2237         Make sure to handle "revert" in the keyword parsing path (along with inherit/initial/unset).
2238
2239         (WebCore::CSSParser::parseValue):
2240         (WebCore::CSSParser::parseCustomPropertyDeclaration):
2241         At the parser level, "revert" is just like inherit/initial/unset and gets its own special
2242         singleton value, CSSRevertValue.
2243
2244         * css/CSSRevertValue.cpp: Added.
2245         (WebCore::CSSRevertValue::customCSSText):
2246         * css/CSSRevertValue.h: Added.
2247         (WebCore::CSSRevertValue::create):
2248         (WebCore::CSSRevertValue::equals):
2249         (WebCore::CSSRevertValue::CSSRevertValue):
2250         This value is identical to the inherit/initial/unset values, i.e., its own special value
2251         that can be used to indicate a revert when doing style resolution.
2252
2253         * css/CSSValue.cpp:
2254         (WebCore::CSSValue::cssValueType):
2255         (WebCore::CSSValue::equals):
2256         (WebCore::CSSValue::cssText):
2257         (WebCore::CSSValue::destroy):
2258         * css/CSSValue.h:
2259         (WebCore::CSSValue::isInheritedValue):
2260         (WebCore::CSSValue::isInitialValue):
2261         (WebCore::CSSValue::isUnsetValue):
2262         (WebCore::CSSValue::isRevertValue):
2263         Add the RevertClass to CSSValue and make sure it is handled in all the appropriate methods.
2264
2265         * css/CSSValueKeywords.in:
2266         Add the "revert" keyword to the list of allowed CSS keywords.
2267
2268         * css/CSSValuePool.cpp:
2269         (WebCore::CSSValuePool::CSSValuePool):
2270         * css/CSSValuePool.h:
2271         (WebCore::CSSValuePool::createRevertValue):
2272         Add support for a CSSRevertValue singleton, just like inherit/unset/initial.
2273
2274         * css/FontLoader.cpp:
2275         (WebCore::FontLoader::resolveFontStyle):
2276         Add "unset" and "revert" as special keywords to be ignored. This code seems to be turned off,
2277         but patching it anyway.
2278
2279         * css/SelectorChecker.h:
2280         Add a MatchDefault value of 0 to the LinkMatchMask. This enables it to be used as an index
2281         to the correct value in Property (in the style resolution code).
2282
2283         * css/StyleResolver.cpp:
2284         (WebCore::StyleResolver::State::initForStyleResolve):
2285         Delete any lingering old CascadedProperty rollbacks for UA/user rules.
2286
2287         (WebCore::StyleResolver::styleForKeyframe):
2288         (WebCore::StyleResolver::styleForPage):
2289         (WebCore::StyleResolver::applyMatchedProperties):
2290         Pass along the MatchResult as an additional parameter, since we need it to lazily compute
2291         the cascade rollbacks if the "revert" keyword is encountered.
2292
2293         (WebCore::StyleResolver::cascadedPropertiesForRollback):
2294         This method will lazily create and return a new CascadedProperties pointer that is cached
2295         in the StyleResolver's state. This will contain only UA rules (for user reverts) and UA/user
2296         rules (for author reverts). These will only be computed at most once for a given element
2297         when doing a reversion, and they will be computed lazily, i.e., only if a revert is
2298         requested.
2299
2300         (WebCore::StyleResolver::applyProperty):
2301         Pass along the LinkMatchMask and the MatchResult to applyProperty. This way we know specifically
2302         which link type we were computing if we have to revert (so that we roll back and look at the
2303         same index in the reverted version). The MatchResult is passed along because it is needed
2304         to build the CascadedProperties rollbacks.
2305
2306         The basic idea is that if a revert is encountered, the level that the rule came from is
2307         checked. If it is UA level, just treat as "unset." If it is author or user level, get
2308         the correct CascadedProperties rollback and repeat the applyProperty using the property
2309         found in the rollback. If the property is not present in the cascade rollback, then the
2310         revert becomes an unset.
2311
2312         (WebCore::StyleResolver::CascadedProperties::hasCustomProperty):
2313         (WebCore::StyleResolver::CascadedProperties::customProperty):
2314         Helpers used by applyProperty to check on custom properties, since they can revert too
2315         just like a regular property can.
2316
2317         (WebCore::StyleResolver::CascadedProperties::setPropertyInternal):
2318         (WebCore::StyleResolver::CascadedProperties::set):
2319         (WebCore::StyleResolver::CascadedProperties::setDeferred):
2320         Passing along the CascadeLevel (UA, User, Author) so that it can be stored in the Property.
2321         This way when we do property application, we always know where the rule came from so
2322         that the reversion can be handled properly.
2323
2324         (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
2325         (WebCore::cascadeLevelForIndex):
2326         (WebCore::StyleResolver::CascadedProperties::addMatches):
2327         When style properties are added, also figure out the CascadeLevel and pass it along to be
2328         stored in the Property. We use the MatchResult's ranges to know where a property comes from.
2329
2330         (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties):
2331         (WebCore::StyleResolver::CascadedProperties::Property::apply):
2332         (WebCore::StyleResolver::applyCascadedProperties):
2333         Pass along the MatchResult so we know how to build the rollback.
2334
2335         * css/StyleResolver.h:
2336         (WebCore::StyleResolver::State::cascadeLevel):
2337         (WebCore::StyleResolver::State::setCascadeLevel):
2338         (WebCore::StyleResolver::State::authorRollback):
2339         (WebCore::StyleResolver::State::userRollback):
2340         (WebCore::StyleResolver::State::setAuthorRollback):
2341         (WebCore::StyleResolver::State::setUserRollback):
2342         (WebCore::StyleResolver::state):
2343         (WebCore::StyleResolver::cascadeLevel):
2344         (WebCore::StyleResolver::setCascadeLevel):
2345         Move CascadedProperties into the header. Add CascadeLevel to Property. Add the level and
2346         rollbacks to the resolver's state.
2347
2348 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
2349
2350         Delete FontPlatformData::allowsLigatures()
2351         https://bugs.webkit.org/show_bug.cgi?id=150286
2352
2353         Reviewed by Dan Bernstein.
2354
2355         This function is only used to force ligatures on for complex fonts (where "complex"
2356         means "does not support the letter 'a'"). However, ligatures are turned on for all
2357         fonts by default, which means that this function is unnecessary.
2358
2359         Required ligatures, such as those which make these complex scripts legible, are always
2360         enabled, no matter what.
2361
2362         Test: fast/text/required-ligatures.html
2363
2364         * platform/graphics/FontPlatformData.h:
2365         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2366         (WebCore::FontPlatformData::allowsLigatures): Deleted.
2367         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
2368         (WebCore::Font::getCFStringAttributes):
2369
2370 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
2371
2372         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
2373         https://bugs.webkit.org/show_bug.cgi?id=150287
2374
2375         Reviewed by Simon Fraser.
2376
2377         This user default is currently on by default. Therefore, by setting the user default,
2378         users can only disable kerning / ligatures (rather than enable it).
2379
2380         There are a few reasons why we should stop honoring it:
2381
2382         1. In the brave new world of font-feature-settings and font-variant-ligatures, there
2383         are many different kinds of ligatures which may be enabled at will. The simplistic
2384         statement of "turn on ligatures" no longer has any meaning.
2385
2386         2. If a user wants to disable kerning / ligatures, he/she can do it with a user
2387         stylesheet.
2388
2389         3. The default isn't able to be tested with DumpRenderTree or WebKitTestRunner.
2390
2391         4. I have never heard of anyone actually using this user default.
2392
2393         * platform/graphics/FontCascade.cpp:
2394         (WebCore::FontCascade::setDefaultKerning): Deleted.
2395         (WebCore::FontCascade::setDefaultLigatures): Deleted.
2396         * platform/graphics/FontCascade.h:
2397         (WebCore::FontCascade::advancedTextRenderingMode):
2398
2399 2015-10-17  Dan Bernstein  <mitz@apple.com>
2400
2401         [Cocoa] Stop using WKAXRegisterRemoteApp
2402         https://bugs.webkit.org/show_bug.cgi?id=150283
2403
2404         Reviewed by Alexey Proskuryakov.
2405
2406         * platform/spi/ios/GraphicsServicesSPI.h: Added declaration of GSSystemRootDirectory.
2407
2408 2015-10-17  Chris Dumez  <cdumez@apple.com>
2409
2410         td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
2411         https://bugs.webkit.org/show_bug.cgi?id=148859
2412         <rdar://problem/22588664>
2413
2414         Reviewed by Ryosuke Niwa.
2415
2416         td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
2417         as per the latest HTML specification:
2418         https://html.spec.whatwg.org/multipage/tables.html#htmltabledatacellelement
2419         https://html.spec.whatwg.org/multipage/tables.html#htmltableheadercellelement
2420
2421         This patch aligns our behavior with the specification and IE. Firefox and Chrome do not
2422         seem to expose HTMLTableDataCellElement / HTMLTableHeaderCellElement at this time.
2423
2424         The compatibility risk is low, given that the API stays the same and those new
2425         interfaces inherit the pre-existing HTMLTableCellElement interface.
2426
2427         No new tests, already covered by existing tests.
2428
2429         * CMakeLists.txt:
2430         * DerivedSources.cpp:
2431         * DerivedSources.make:
2432         * WebCore.vcxproj/WebCore.vcxproj:
2433         * WebCore.vcxproj/WebCore.vcxproj.filters:
2434         * WebCore.xcodeproj/project.pbxproj:
2435         * html/HTMLTableCellElement.cpp:
2436         (WebCore::HTMLTableCellElement::HTMLTableCellElement):
2437         (WebCore::HTMLTableCellElement::colSpan): Deleted.
2438         * html/HTMLTableCellElement.h:
2439         * html/HTMLTableCellElement.idl:
2440         * html/HTMLTableDataCellElement.h: Added.
2441         * html/HTMLTableDataCellElement.idl: Added.
2442         * html/HTMLTableHeaderCellElement.h: Added.
2443         * html/HTMLTableHeaderCellElement.idl: Added.
2444         * html/HTMLTableRowElement.cpp:
2445         (WebCore::HTMLTableRowElement::insertCell):
2446         * html/HTMLTagNames.in:
2447
2448 2015-10-17  Zalan Bujtas  <zalan@apple.com>
2449
2450         RenderBlockFlow::xPositionForFloatIncludingMargin/yPositionForFloatIncludingMargin/flipFloatForWritingModeForChild
2451         should all take FloatingObject reference.
2452         https://bugs.webkit.org/show_bug.cgi?id=150267
2453
2454         Reviewed by Simon Fraser.
2455
2456         No change in behaviour.
2457
2458         * rendering/RenderBlockFlow.cpp:
2459         (WebCore::RenderBlockFlow::addOverflowFromFloats):
2460         (WebCore::RenderBlockFlow::paintFloats):
2461         (WebCore::RenderBlockFlow::clipOutFloatingObjects):
2462         (WebCore::RenderBlockFlow::addOverhangingFloats):
2463         (WebCore::RenderBlockFlow::flipFloatForWritingModeForChild):
2464         (WebCore::RenderBlockFlow::hitTestFloats):
2465         (WebCore::RenderBlockFlow::adjustForBorderFit):
2466         * rendering/RenderBlockFlow.h:
2467         (WebCore::RenderBlockFlow::xPositionForFloatIncludingMargin):
2468         (WebCore::RenderBlockFlow::yPositionForFloatIncludingMargin):
2469
2470 2015-10-17  Simon Fraser  <simon.fraser@apple.com>
2471
2472         Sort the project file.
2473
2474         * WebCore.xcodeproj/project.pbxproj:
2475
2476 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
2477
2478         Enhance TextStream for logging, remove subclasses, log more things
2479         https://bugs.webkit.org/show_bug.cgi?id=150269
2480
2481         Reviewed by Zalan Bujtas.
2482
2483         Remove the various TextStream subclasses that only existed to support indenting,
2484         and output additional types. Add output for more WebCore and WebKit2 types, and
2485         just use TextStream everywhere.
2486         
2487         TextStream is enhance to support grouping (open paren and intent), with a 
2488         stack-based class to open/end a group.
2489         
2490         Remove some SVG-specific duplicate output functions.
2491         
2492         Outdent namespace contents of GraphicsTypes.h.
2493         
2494         * CMakeLists.txt:
2495         * WebCore.xcodeproj/project.pbxproj:
2496         * dom/ViewportArguments.cpp:
2497         (WebCore::operator<<):
2498         * dom/ViewportArguments.h:
2499         * page/ViewportConfiguration.cpp:
2500         (WebCore::operator<<):
2501         (WebCore::ViewportConfiguration::description):
2502         (WebCore::ViewportConfigurationTextStream::ViewportConfigurationTextStream): Deleted.
2503         (WebCore::ViewportConfigurationTextStream::increaseIndent): Deleted.
2504         (WebCore::ViewportConfigurationTextStream::decreaseIndent): Deleted.
2505         (WebCore::dumpProperty): Deleted.
2506         (WebCore::ViewportConfigurationTextStream::writeIndent): Deleted.
2507         (WebCore::ViewportConfigurationTextStream::operator<<): Deleted.
2508         * page/ViewportConfiguration.h:
2509         * page/scrolling/ScrollingConstraints.cpp:
2510         (WebCore::operator<<):
2511         * page/scrolling/ScrollingConstraints.h:
2512         * page/scrolling/ScrollingCoordinator.cpp:
2513         (WebCore::operator<<):
2514         * page/scrolling/ScrollingCoordinator.h:
2515         * platform/animation/TimingFunction.cpp: Added.
2516         (WebCore::operator<<):
2517         * platform/animation/TimingFunction.h:
2518         * platform/graphics/Color.cpp:
2519         (WebCore::operator<<):
2520         * platform/graphics/Color.h:
2521         * platform/graphics/FloatPoint3D.cpp:
2522         (WebCore::operator<<):
2523         * platform/graphics/FloatPoint3D.h:
2524         * platform/graphics/FloatRoundedRect.cpp:
2525         (WebCore::operator<<):
2526         * platform/graphics/FloatRoundedRect.h:
2527         * platform/graphics/GraphicsLayer.cpp:
2528         (WebCore::operator<<):
2529         * platform/graphics/GraphicsLayer.h:
2530         * platform/graphics/GraphicsTypes.cpp:
2531         (WebCore::operator<<):
2532         * platform/graphics/GraphicsTypes.h:
2533         * platform/graphics/ca/PlatformCAAnimation.cpp: Added.
2534         (WebCore::operator<<):
2535         * platform/graphics/ca/PlatformCAAnimation.h:
2536         * platform/graphics/ca/PlatformCALayer.cpp:
2537         (WebCore::operator<<):
2538         * platform/graphics/ca/PlatformCALayer.h:
2539         * platform/graphics/filters/FilterOperation.cpp:
2540         (WebCore::operator<<):
2541         * platform/graphics/filters/FilterOperation.h:
2542         * platform/graphics/filters/FilterOperations.cpp:
2543         (WebCore::operator<<):
2544         * platform/graphics/filters/FilterOperations.h:
2545         * platform/graphics/filters/PointLightSource.cpp:
2546         (WebCore::operator<<): Deleted.
2547         * platform/graphics/filters/SpotLightSource.cpp:
2548         (WebCore::operator<<): Deleted.
2549         * platform/graphics/transforms/AffineTransform.cpp:
2550         (WebCore::operator<<):
2551         * platform/graphics/transforms/AffineTransform.h:
2552         * platform/graphics/transforms/TransformationMatrix.cpp:
2553         (WebCore::operator<<):
2554         * platform/graphics/transforms/TransformationMatrix.h:
2555         * platform/text/TextStream.cpp:
2556         (WebCore::TextStream::startGroup):
2557         (WebCore::TextStream::endGroup):
2558         (WebCore::TextStream::nextLine):
2559         (WebCore::TextStream::writeIndent):
2560         * platform/text/TextStream.h:
2561         (WebCore::TextStream::operator<<):
2562         (WebCore::TextStream::dumpProperty):
2563         (WebCore::TextStream::increaseIndent):
2564         (WebCore::TextStream::decreaseIndent):
2565         (WebCore::TextStream::GroupScope::GroupScope):
2566         (WebCore::TextStream::GroupScope::~GroupScope):
2567         * rendering/svg/SVGRenderTreeAsText.cpp:
2568         (WebCore::operator<<): Deleted.
2569         * rendering/svg/SVGRenderTreeAsText.h:
2570
2571 2015-10-17  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2572
2573         Finalize bug 149952 patch
2574         https://bugs.webkit.org/show_bug.cgi?id=150238
2575
2576         Reviewed by Darin Adler.
2577
2578         No change in behavior.
2579
2580         * bindings/js/JSDOMConstructor.h:
2581         (WebCore::JSDOMConstructor<JSClass>::finishCreation): Marked as inline.
2582         (WebCore::JSDOMConstructor<JSClass>::getConstructData): Marked as inline.
2583
2584 2015-10-16  Zalan Bujtas  <zalan@apple.com>
2585
2586         RenderBlockFlow::*logical*ForFloat should take FloatingObject reference.
2587         https://bugs.webkit.org/show_bug.cgi?id=150266
2588
2589         Reviewed by Simon Fraser.
2590
2591         No change in behaviour.
2592
2593         * rendering/FloatingObjects.cpp:
2594         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
2595         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
2596         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
2597         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatTypeValue>::heightRemaining):
2598         (WebCore::ComputeFloatOffsetAdapter<FloatTypeValue>::collectIfNeeded):
2599         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
2600         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
2601         * rendering/RenderBlockFlow.cpp:
2602         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
2603         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
2604         (WebCore::RenderBlockFlow::insertFloatingObject):
2605         (WebCore::RenderBlockFlow::removeFloatingObject):
2606         (WebCore::RenderBlockFlow::removeFloatingObjectsBelow):
2607         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
2608         (WebCore::RenderBlockFlow::positionNewFloats):
2609         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
2610         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
2611         (WebCore::RenderBlockFlow::addOverhangingFloats):
2612         (WebCore::RenderBlockFlow::hasOverhangingFloat):
2613         (WebCore::RenderBlockFlow::addIntrudingFloats):
2614         * rendering/RenderBlockFlow.h:
2615         (WebCore::RenderBlockFlow::logicalTopForFloat):
2616         (WebCore::RenderBlockFlow::logicalBottomForFloat):
2617         (WebCore::RenderBlockFlow::logicalLeftForFloat):
2618         (WebCore::RenderBlockFlow::logicalRightForFloat):
2619         (WebCore::RenderBlockFlow::logicalWidthForFloat):
2620         (WebCore::RenderBlockFlow::logicalHeightForFloat):
2621         (WebCore::RenderBlockFlow::setLogicalTopForFloat):
2622         (WebCore::RenderBlockFlow::setLogicalLeftForFloat):
2623         (WebCore::RenderBlockFlow::setLogicalHeightForFloat):
2624         (WebCore::RenderBlockFlow::setLogicalWidthForFloat):
2625         (WebCore::RenderBlockFlow::logicalSizeForFloat): Deleted.
2626         * rendering/RenderBlockLineLayout.cpp:
2627         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
2628         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
2629         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
2630         * rendering/RenderBox.cpp:
2631         (WebCore::RenderBox::addOverflowFromChild):
2632         * rendering/RenderBox.h:
2633         (WebCore::RenderBox::addOverflowFromChild):
2634         * rendering/line/BreakingContext.h:
2635         (WebCore::BreakingContext::handleFloat):
2636         * rendering/line/LineWidth.cpp:
2637         (WebCore::newFloatShrinksLine):
2638         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2639         * rendering/shapes/ShapeOutsideInfo.cpp:
2640         (WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine):
2641
2642 2015-10-16  Jiewen Tan  <jiewen_tan@apple.com>
2643
2644         Avoid to insert TAB before HTML element.
2645         https://bugs.webkit.org/show_bug.cgi?id=149295
2646         <rdar://problem/22746706>
2647
2648         Reviewed by Ryosuke Niwa.
2649
2650         This is a merge of Blink r175047:
2651         https://codereview.chromium.org/306583005
2652
2653         This patch avoids InsertTextCommand::insertTab before HTML element because
2654         we can't set Text node as document element.
2655
2656         Test: editing/execCommand/insert-tab-to-html-element-crash.html
2657
2658         * editing/InsertTextCommand.cpp:
2659         (WebCore::InsertTextCommand::insertTab):
2660
2661 2015-10-16  Commit Queue  <commit-queue@webkit.org>
2662
2663         Unreviewed, rolling out r191204.
2664         https://bugs.webkit.org/show_bug.cgi?id=150263
2665
2666         This change is causing existing tests to fail (Requested by
2667         ryanhaddad on #webkit).
2668
2669         Reverted changeset:
2670
2671         "Computed style should work correctly with slotted elements
2672         that have display:none"
2673         https://bugs.webkit.org/show_bug.cgi?id=150237
2674         http://trac.webkit.org/changeset/191204
2675
2676 2015-10-16  Alex Christensen  <achristensen@webkit.org>
2677
2678         Disabled content blockers should not block any loads
2679         https://bugs.webkit.org/show_bug.cgi?id=150261
2680
2681         Reviewed by Brady Eidson.
2682
2683         This fix was tested manually by reloading without content blockers
2684         on websites with iframes and content blockers that block the contents of the iframes.
2685
2686         * page/UserContentController.cpp:
2687         (WebCore::UserContentController::removeAllUserContentExtensions):
2688         (WebCore::contentExtensionsEnabled):
2689         (WebCore::UserContentController::processContentExtensionRulesForLoad):
2690         (WebCore::UserContentController::actionsForResourceLoad):
2691         Check the DocumentLoader of the main frame when checking if content extensions are disabled,
2692         because that is the DocumentLoader that has the flag from reloading without content blockers.
2693
2694 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
2695
2696         Make TextStream the canonical way to log classes in WebCore
2697         https://bugs.webkit.org/show_bug.cgi?id=150256
2698
2699         Reviewed by Sam Weinig.
2700
2701         We vacillated between PrintStream and TextStream as being the canonical way
2702         to stringify WebCore data structures. This patch solidifies TextStream
2703         as the solution, since it has convenient stream syntax, and is what we
2704         use for render tree dumps.
2705
2706         Remove TextStream member functions that output non-simple structs
2707         (sizes, points and rects), replacing them with free operator<< functions
2708         in the .cpp file for the relevant class. Formatting is currently consistent
2709         with RenderTreeAsText output, to avoid breaking tests.
2710
2711         Remove custom FloatRect outputting in SVG and RemoteLayerTreeTransaction.
2712
2713         * CMakeLists.txt:
2714         * WebCore.xcodeproj/project.pbxproj:
2715         * platform/graphics/FloatPoint.cpp:
2716         (WebCore::operator<<):
2717         (WebCore::FloatPoint::dump): Deleted.
2718         * platform/graphics/FloatPoint.h:
2719         * platform/graphics/FloatRect.cpp:
2720         (WebCore::operator<<):
2721         (WebCore::FloatRect::dump): Deleted.
2722         * platform/graphics/FloatRect.h:
2723         * platform/graphics/FloatSize.cpp:
2724         (WebCore::FloatSize::FloatSize):
2725         (WebCore::operator<<):
2726         (WebCore::FloatSize::dump): Deleted.
2727         * platform/graphics/FloatSize.h:
2728         * platform/graphics/IntPoint.cpp:
2729         (WebCore::operator<<):
2730         (WebCore::IntPoint::dump): Deleted.
2731         * platform/graphics/IntPoint.h:
2732         * platform/graphics/IntRect.cpp:
2733         (WebCore::operator<<):
2734         (WebCore::IntRect::dump): Deleted.
2735         * platform/graphics/IntRect.h:
2736         * platform/graphics/IntSize.cpp:
2737         (WebCore::operator<<):
2738         (WebCore::IntSize::dump): Deleted.
2739         * platform/graphics/IntSize.h:
2740         * platform/graphics/LayoutPoint.cpp: Copied from Source/WebCore/platform/graphics/IntPoint.cpp.
2741         (WebCore::operator<<):
2742         * platform/graphics/LayoutPoint.h:
2743         * platform/graphics/LayoutRect.cpp:
2744         (WebCore::operator<<):
2745         * platform/graphics/LayoutRect.h:
2746         * platform/graphics/LayoutSize.cpp: Copied from Source/WebCore/platform/graphics/IntPoint.cpp.
2747         (WebCore::operator<<):
2748         * platform/graphics/LayoutSize.h:
2749         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2750         (WebCore::MediaSampleAVFObjC::dump):
2751         * platform/text/TextStream.cpp:
2752         (WebCore::TextStream::operator<<):
2753         * platform/text/TextStream.h:
2754         * rendering/svg/SVGRenderTreeAsText.cpp:
2755         (WebCore::operator<<): Deleted.
2756
2757 2015-10-16  Brent Fulgham  <bfulgham@apple.com>
2758
2759         Hide all plugin names except Flash, Java, and QuickTime
2760         https://bugs.webkit.org/show_bug.cgi?id=149014
2761
2762         Reviewed by Darin Adler.
2763
2764         Revise plugin interface so that sites cannot iterate over all plugins to obtain
2765         a list of installed plugins for fingerprinting purposes. Sites need to ask for
2766         specific plugins by name, rather than iterating and comparing to avoid making
2767         this information accessible for fingerprinting purposes.
2768
2769         * plugins/DOMPluginArray.cpp:
2770         (WebCore::DOMPluginArray::length): Only return length of the plugins we are
2771         allowing to be seen.
2772         (WebCore::DOMPluginArray::item): Only iterate through the plugins we are
2773         allowing to be seen.
2774         * plugins/PluginData.cpp:
2775         (WebCore::PluginData::publiclyVisiblePlugins): Added.
2776         * plugins/PluginData.h:
2777
2778 2015-10-16  Brady Eidson  <beidson@apple.com>
2779
2780         "enum class" some IDB enums.
2781         https://bugs.webkit.org/show_bug.cgi?id=150246
2782
2783         Reviewed by Alex Christensen.
2784
2785         No new tests (No change in behavior).
2786
2787         * Modules/indexeddb/IDBKeyPath.cpp:
2788         (WebCore::IDBIsValidKeyPath):
2789         (WebCore::IDBParseKeyPath):
2790         (WebCore::IDBKeyPath::IDBKeyPath):
2791         (WebCore::IDBKeyPath::isValid):
2792         (WebCore::IDBKeyPath::operator==):
2793         (WebCore::IDBKeyPath::encode):
2794         (WebCore::IDBKeyPath::decode):
2795         * Modules/indexeddb/IDBKeyPath.h:
2796         (WebCore::IDBKeyPath::IDBKeyPath):
2797         (WebCore::IDBKeyPath::type):
2798         (WebCore::IDBKeyPath::array):
2799         (WebCore::IDBKeyPath::string):
2800         (WebCore::IDBKeyPath::isNull):
2801         (WebCore::IDBKeyPath::encode):
2802         (WebCore::IDBKeyPath::decode):
2803         * Modules/indexeddb/IndexedDB.h:
2804         * Modules/indexeddb/legacy/LegacyDatabase.cpp:
2805         (WebCore::LegacyDatabase::createObjectStore):
2806         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
2807         (WebCore::LegacyObjectStore::createIndex):
2808         * bindings/js/IDBBindingUtilities.cpp:
2809         (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
2810         (WebCore::injectIDBKeyIntoScriptValue):
2811         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
2812         (WebCore::canInjectIDBKeyIntoScriptValue):
2813         * bindings/js/JSIDBAnyCustom.cpp:
2814         (WebCore::toJS):
2815         * inspector/InspectorIndexedDBAgent.cpp:
2816
2817 2015-10-16  Anders Carlsson  <andersca@apple.com>
2818
2819         Add indexeddb/shared to the include paths.
2820
2821         * WebCore.vcxproj/WebCoreIncludeCommon.props:
2822
2823 2015-10-16  Antti Koivisto  <antti@apple.com>
2824
2825         Computed style should work correctly with slotted elements that have display:none
2826         https://bugs.webkit.org/show_bug.cgi?id=150237
2827
2828         Reviewed by Andreas Kling.
2829
2830         If an element has display:none we don't normally retain or even compute its style (as it is not rendered).
2831         If getComputedStyle is invoked for such element we resolve the style (along with any ancestors) and cache
2832         it separately to rare data. This path needs to work with slotted elements in shadow trees.
2833
2834         This patch also make computedStyle() iterative rather than recursive.
2835
2836         Test: fast/shadow-dom/computed-style-display-none.html
2837
2838         * dom/Document.cpp:
2839         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
2840
2841             Pass in the parent style instead of invoking computedStyle() recursively.
2842
2843         * dom/Document.h:
2844         * dom/Element.cpp:
2845         (WebCore::beforeOrAfterPseudoElement):
2846         (WebCore::Element::existingComputedStyle):
2847         (WebCore::Element::resolveComputedStyle):
2848
2849             Iterative resolve function that uses composed tree iterator.
2850
2851         (WebCore::Element::computedStyle):
2852
2853             Factor into helpers.
2854
2855         * dom/Element.h:
2856         * dom/Node.cpp:
2857         (WebCore::Node::computedStyle):
2858
2859             Use the composed tree iterator.
2860
2861 2015-10-16  David Hyatt  <hyatt@apple.com>
2862
2863         ASSERT in imported/blink/fast/block/float/overhanging-float-crashes-when-sibling-becomes-formatting-context.html
2864         https://bugs.webkit.org/show_bug.cgi?id=150249
2865
2866         Reviewed by Myles Maxfield.
2867
2868         Covered by existing tests.
2869
2870         * css/CSSValue.cpp:
2871         (WebCore::CSSValue::equals):
2872         Make sure the "unset" value has an equals implementation.
2873
2874 2015-10-16  Brady Eidson  <beidson@apple.com>
2875
2876         Modern IDB: Handle versionchange events.
2877         https://bugs.webkit.org/show_bug.cgi?id=150149
2878
2879         Reviewed by Alex Christensen.
2880
2881         Test: storage/indexeddb/modern/versionchange-event.html
2882         
2883         - IDBVersionChangeEvents are now dispatched to open connections when a
2884           version upgrade request comes in.
2885         - Once all of those open connections have closed, the version upgrade 
2886           request is handled.
2887
2888         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2889         (WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
2890         (WebCore::IDBClient::IDBConnectionToServer::registerDatabaseConnection):
2891         (WebCore::IDBClient::IDBConnectionToServer::unregisterDatabaseConnection):
2892         * Modules/indexeddb/client/IDBConnectionToServer.h:
2893
2894         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2895         (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent):
2896         * Modules/indexeddb/client/IDBDatabaseImpl.h:
2897
2898         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2899         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
2900         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
2901         (WebCore::IDBServer::UniqueIDBDatabase::invokeTransactionScheduler):
2902         (WebCore::IDBServer::UniqueIDBDatabase::transactionSchedulingTimerFired):
2903         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2904
2905 2015-10-16  Zalan Bujtas  <zalan@apple.com>
2906
2907         First line box in paragraph using initial-letter overflows.
2908         https://bugs.webkit.org/show_bug.cgi?id=147977
2909         <rdar://problem/22901553>
2910
2911         Reviewed by David Hyatt.
2912
2913         When initial-letter float is present, we should shrink the first
2914         line even if it's not intersected with the block's current height.
2915         This is because of the sunken behaviour of initial-letter. 
2916
2917         Test: fast/css-generated-content/initial-letter-first-line-wrapping.html
2918
2919         * rendering/RenderBlockFlow.h:
2920         * rendering/RenderBlockLineLayout.cpp:
2921         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
2922         * rendering/line/BreakingContext.h:
2923         (WebCore::BreakingContext::handleFloat):
2924         * rendering/line/LineBreaker.cpp:
2925         (WebCore::LineBreaker::skipLeadingWhitespace):
2926         * rendering/line/LineBreaker.h:
2927         (WebCore::LineBreaker::positionNewFloatOnLine):
2928         * rendering/line/LineWidth.cpp:
2929         (WebCore::newFloatShrinksLine):
2930         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2931         * rendering/line/LineWidth.h:
2932
2933 2015-10-16  Keith Rollin  <krollin@apple.com>
2934
2935         The value sanitization algorithm for input[type=url] should strip whitespaces
2936         https://bugs.webkit.org/show_bug.cgi?id=148864
2937         rdar://problem/22589358
2938
2939         Reviewed by Chris Dumez.
2940
2941         Follow the sanitization algorithm specified in:
2942         https://html.spec.whatwg.org/multipage/forms.html#url-state-(type=url)
2943
2944         Chrome also has the same issue with url.html. Firefox passes.  All
2945         three browsers have multiple issues with type-change-state.html, with
2946         each browser having a different set of failures. Addressing this in
2947         WebKit is another issue outside the scope of bz=148864. For now, I'm
2948         updating that test to capture current WebKit behavior.
2949
2950         No new tests (covered by existing tests):
2951         - web-platform-tests/html/semantics/forms/the-input-element/type-change-state.html
2952         - web-platform-tests/html/semantics/forms/the-input-element/url.html
2953
2954         * html/TextFieldInputType.h:
2955         * html/URLInputType.cpp:
2956         (WebCore::URLInputType::sanitizeValue):
2957         * html/URLInputType.h:
2958
2959 2015-10-16  Antti Koivisto  <antti@apple.com>
2960
2961         Remove NodeRenderingTraversal
2962         https://bugs.webkit.org/show_bug.cgi?id=150226
2963
2964         Reviewed by Chris Dumez.
2965
2966         It has been reduced to an implementation detail of FocusController. Move the remaining
2967         functions there as they have no general utility (and are wrong for focus navigation too).
2968
2969         * CMakeLists.txt:
2970         * WebCore.xcodeproj/project.pbxproj:
2971         * dom/DOMAllInOne.cpp:
2972         * dom/NodeRenderingTraversal.cpp: Removed.
2973         * dom/NodeRenderingTraversal.h: Removed.
2974         * page/FocusController.cpp:
2975         (WebCore::firstChildInScope):
2976         (WebCore::lastChildInScope):
2977         (WebCore::parentInScope):
2978         (WebCore::nextInScope):
2979         (WebCore::previousInScope):
2980         (WebCore::FocusNavigationScope::FocusNavigationScope):
2981         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
2982         (WebCore::FocusController::findElementWithExactTabIndex):
2983         (WebCore::nextElementWithGreaterTabIndex):
2984         (WebCore::previousElementWithLowerTabIndex):
2985         (WebCore::FocusController::nextFocusableElement):
2986         (WebCore::FocusController::previousFocusableElement):
2987
2988 2015-10-16  David Hyatt  <hyatt@apple.com>
2989
2990         Build fix. "all" keyword introduction exposed a typo bug in the grid-area property definition.
2991
2992         * css/CSSPropertyNames.in:
2993
2994 2015-10-16  Tim Horton  <timothy_horton@apple.com>
2995
2996         Hook up autolayout intrinsic sizing for WKWebView
2997         https://bugs.webkit.org/show_bug.cgi?id=150219
2998         <rdar://problem/20016905>
2999
3000         Reviewed by Simon Fraser.
3001
3002         New API test: WebKit2.AutoLayoutIntegration.
3003
3004         * page/FrameView.cpp:
3005         (WebCore::FrameView::autoSizeIfEnabled):
3006         When autosizing a document in which the body expands to the size of 
3007         the view (a feature of quirks mode), the first (width-determining)
3008         autosizing will resize the view to the document height (which is at 
3009         least the body height), and the second time around, the height will
3010         not decrease (because it was expanded to the size of the view).
3011
3012         Instead, the first time around, we should use the computed width,
3013         but shrink the height back down to the minimum, and then expand
3014         only as much as needed to fit the content.
3015
3016 2015-10-16  Brady Eidson  <beidson@apple.com>
3017
3018         Modern IDB: Support IDBDatabase.close().
3019         https://bugs.webkit.org/show_bug.cgi?id=150150
3020
3021         Reviewed by Alex Christensen.
3022
3023         No new tests (Covered by changes to storage/indexeddb/modern/opendatabase-versions.html).
3024
3025         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3026         (WebCore::IDBClient::IDBConnectionToServer::databaseConnectionClosed):
3027         * Modules/indexeddb/client/IDBConnectionToServer.h:
3028         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
3029
3030         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3031         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
3032         (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
3033         (WebCore::IDBClient::IDBDatabase::close):
3034         (WebCore::IDBClient::IDBDatabase::maybeCloseInServer):
3035         (WebCore::IDBClient::IDBDatabase::commitTransaction):
3036         * Modules/indexeddb/client/IDBDatabaseImpl.h:
3037         (WebCore::IDBClient::IDBDatabase::databaseConnectionIdentifier):
3038
3039         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3040         (WebCore::IDBClient::IDBRequest::result):
3041
3042         * Modules/indexeddb/server/IDBServer.cpp:
3043         (WebCore::IDBServer::IDBServer::databaseConnectionClosed):
3044         * Modules/indexeddb/server/IDBServer.h:
3045
3046         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3047         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
3048         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Deleted.
3049         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3050
3051         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3052         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
3053         (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
3054         (WebCore::IDBServer::UniqueIDBDatabaseConnection::hasNonFinishedTransactions):
3055         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
3056         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
3057
3058         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3059         (WebCore::InProcessIDBServer::databaseConnectionClosed):
3060         * Modules/indexeddb/shared/InProcessIDBServer.h:
3061
3062 2015-10-16  Chris Dumez  <cdumez@apple.com>
3063
3064         HTMLPreloadScanner should preload iframes
3065         https://bugs.webkit.org/show_bug.cgi?id=150097
3066         <rdar://problem/23094475>
3067
3068         Reviewed by Antti Koivisto.
3069
3070         HTMLPreloadScanner should preload iframes to decrease page load time.
3071
3072         Tests:
3073         - fast/preloader/frame-src.html
3074         - http/tests/loading/preload-no-store-frame-src.html
3075
3076         * html/parser/HTMLPreloadScanner.cpp:
3077         (WebCore::TokenPreloadScanner::tagIdFor):
3078         (WebCore::TokenPreloadScanner::initiatorFor):
3079         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
3080         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
3081         (WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
3082         (WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): Deleted.
3083         (WebCore::TokenPreloadScanner::StartTagScanner::charset): Deleted.
3084         * html/parser/HTMLPreloadScanner.h:
3085
3086 2015-10-16  David Hyatt  <hyatt@apple.com>
3087
3088         Implement the "all" CSS property.
3089         https://bugs.webkit.org/show_bug.cgi?id=116966
3090
3091         Reviewed by Zalan Bujtas.
3092
3093         Added new tests in fast/css.
3094
3095         * css/CSSComputedStyleDeclaration.cpp:
3096         (WebCore::ComputedStyleExtractor::propertyValue):
3097         Don't support "all" from computed style for now.
3098
3099         * css/CSSParser.cpp:
3100         (WebCore::CSSParser::parseValue):
3101         Make sure to bail after checking inherit/unset/initial for all, since you can't actually
3102         accept longhand values in the shorthand declarations.
3103
3104         (WebCore::CSSParser::parseAnimationProperty):
3105         "all" for animations is a special value and should not be confused with the property. It
3106         animates everything and does not omit unicode-bidi/direction the way the "all" property does.
3107
3108         * css/CSSPropertyNames.in:
3109         Add the "all" property to the list and use a special keyword in the Longhands value, "all",
3110         that makeprop.pl will look for. This way we don't have to dump every single CSS property
3111         into the Longhands expression, since that would be nuts.
3112
3113         * css/StyleProperties.cpp:
3114         (WebCore::StyleProperties::getPropertyValue):
3115         Look for a common value across all properties supported by "all". That way you can get
3116         back inherit/initial/unset from it.
3117
3118         * css/makeprop.pl:
3119         Make the perl script look for "all" in the longhand list, and if it sees it, put every
3120         single CSS property into the list for the all shorthand.
3121
3122 2015-10-16  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3123
3124         Binding generator should use templated JSXXConstructor
3125         https://bugs.webkit.org/show_bug.cgi?id=149952
3126
3127         Reviewed by Darin Adler.
3128
3129         Adding constructor templates:
3130         - JSDOMConstructor: usual JS constructors
3131         - JSDOMNamedConstructor: for named constructors
3132         - JSDOMConstructorNotConstructable: for objects that cannot be constructed directly from JS.
3133
3134         Binding generator is using these 3 templates and is generating specializations for construct, initializeProperties and s_info.
3135         These templates may also be used for private or custom constructors as examplified by JSImageConstructor
3136         and JSReadableStream reader and controller private constructors.
3137
3138         Updated binding generator to use those templates.
3139         Updated JSImageConstructor.cpp to use JSDOMNamedConstructor.
3140         Updated default template implementation of JSBuiltinConstructor::createObject.
3141         Updated generated helper routines of binding generator to fit with the templates.
3142
3143         A further patch should remove DOMConstructorWithDocument and DOMConstructorJSBuiltinObject. 
3144
3145         Covered by binding tests.
3146
3147         * bindings/js/JSDOMConstructor.h:
3148         (WebCore::JSDOMConstructorNotConstructable::create):
3149         (WebCore::JSDOMConstructorNotConstructable::createStructure):
3150         (WebCore::JSDOMConstructorNotConstructable::JSDOMConstructorNotConstructable):
3151         (WebCore::JSDOMConstructorNotConstructable::initializeProperties):
3152         (WebCore::JSDOMConstructorNotConstructable<JSClass>::finishCreation):
3153         (WebCore::JSDOMConstructor::create):
3154         (WebCore::JSDOMConstructor::createStructure):
3155         (WebCore::JSDOMConstructor::JSDOMConstructor):
3156         (WebCore::JSDOMConstructor::initializeProperties):
3157         (WebCore::JSDOMConstructor<JSClass>::finishCreation):
3158         (WebCore::JSDOMConstructor<JSClass>::getConstructData):
3159         (WebCore::JSDOMNamedConstructor::create):
3160         (WebCore::JSDOMNamedConstructor::createStructure):
3161         (WebCore::JSDOMNamedConstructor::JSDOMNamedConstructor):
3162         (WebCore::JSDOMNamedConstructor::initializeProperties):
3163         (WebCore::JSDOMNamedConstructor<JSClass>::finishCreation):
3164         (WebCore::JSDOMNamedConstructor<JSClass>::getConstructData):
3165         * bindings/js/JSDOMWindowCustom.cpp:
3166         (WebCore::JSDOMWindow::image):
3167         * bindings/js/JSImageConstructor.cpp:
3168         (WebCore::JSImageConstructor::initializeProperties):
3169         (WebCore::JSImageConstructor::construct):
3170         (WebCore::createImageConstructor):
3171         * bindings/js/JSImageConstructor.h:
3172         * bindings/scripts/CodeGeneratorJS.pm:
3173         (GetConstructorTemplateClassName):
3174         (GenerateConstructorDeclaration):
3175         (GenerateOverloadedConstructorDefinition):
3176         (GenerateConstructorDefinition):
3177         (GenerateConstructorHelperMethods):
3178         (GenerateImplementation): Deleted.
3179         (GenerateConstructorDefinitions): Deleted.
3180         (HasCustomSetter): Deleted.
3181         (HasCustomMethod): Deleted.
3182         (NeedsConstructorProperty): Deleted.
3183         (ComputeFunctionSpecial): Deleted.
3184         (AddJSBuiltinIncludesIfNeeded): Deleted.
3185         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3186         (WebCore::JSTestActiveDOMObjectConstructor::initializeProperties):
3187         (WebCore::JSTestActiveDOMObjectPrototype::finishCreation): Deleted.
3188         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject): Deleted.
3189         * bindings/scripts/test/JS/JSTestCallback.cpp:
3190         (WebCore::JSTestCallbackConstructor::initializeProperties):
3191         (WebCore::JSTestCallback::callbackWithNoParam): Deleted.
3192         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3193         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::construct):
3194         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties):
3195         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation): Deleted.
3196         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject): Deleted.
3197         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype): Deleted.
3198         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype): Deleted.
3199         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::destroy): Deleted.
3200         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3201         (WebCore::JSTestCustomNamedGetterConstructor::initializeProperties):
3202         (WebCore::JSTestCustomNamedGetterPrototype::finishCreation): Deleted.
3203         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter): Deleted.
3204         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3205         (WebCore::JSTestEventConstructorConstructor::construct):
3206         (WebCore::JSTestEventConstructorConstructor::initializeProperties):
3207         (WebCore::JSTestEventConstructorPrototype::finishCreation): Deleted.
3208         (WebCore::JSTestEventConstructor::JSTestEventConstructor): Deleted.
3209         (WebCore::JSTestEventConstructor::getPrototype): Deleted.
3210         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3211         (WebCore::JSTestEventTargetConstructor::initializeProperties):
3212         (WebCore::JSTestEventTargetPrototype::finishCreation): Deleted.
3213         * bindings/scripts/test/JS/JSTestException.cpp:
3214         (WebCore::JSTestExceptionConstructor::initializeProperties):
3215         (WebCore::JSTestExceptionPrototype::finishCreation): Deleted.
3216         (WebCore::JSTestException::JSTestException): Deleted.
3217         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3218         (WebCore::JSTestGenerateIsReachableConstructor::initializeProperties):
3219         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation): Deleted.
3220         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable): Deleted.
3221         * bindings/scripts/test/JS/JSTestInterface.cpp:
3222         (WebCore::JSTestInterfaceConstructor::construct):
3223         (WebCore::JSTestInterfaceConstructor::initializeProperties):
3224         (WebCore::JSTestInterfaceConstructor::getConstructData):
3225         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3226         (WebCore::JSTestJSBuiltinConstructorConstructor::createJSObject):
3227         (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties):
3228         (WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation): Deleted.
3229         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor): Deleted.
3230         (WebCore::JSTestJSBuiltinConstructor::createPrototype): Deleted.
3231         (WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.
3232         (WebCore::JSTestJSBuiltinConstructor::destroy): Deleted.
3233         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3234         (WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties):
3235         (WebCore::JSTestMediaQueryListListenerPrototype::finishCreation): Deleted.
3236         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): Deleted.
3237         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3238         (WebCore::JSTestNamedConstructorConstructor::initializeProperties):
3239         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
3240         (WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties):
3241         (WebCore::JSTestNamedConstructorPrototype::finishCreation): Deleted.
3242         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor): Deleted.
3243         (WebCore::jsTestNamedConstructorConstructor): Deleted.
3244         (WebCore::JSTestNamedConstructor::getConstructor): Deleted.
3245         (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots): Deleted.
3246         * bindings/scripts/test/JS/JSTestNode.cpp:
3247         (WebCore::JSTestNodeConstructor::construct):
3248         (WebCore::JSTestNodeConstructor::initializeProperties):
3249         (WebCore::JSTestNodePrototype::finishCreation): Deleted.
3250         (WebCore::JSTestNode::JSTestNode): Deleted.
3251         (WebCore::JSTestNode::getPrototype): Deleted.
3252         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3253         (WebCore::JSTestNondeterministicConstructor::initializeProperties):
3254         (WebCore::JSTestNondeterministicPrototype::finishCreation): Deleted.
3255         * bindings/scripts/test/JS/JSTestObj.cpp:
3256         (WebCore::JSTestObjConstructor::construct):
3257         (WebCore::JSTestObjConstructor::initializeProperties):
3258         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3259         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
3260         (WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties):
3261         (WebCore::constructJSTestOverloadedConstructors1): Deleted.
3262         (WebCore::constructJSTestOverloadedConstructors2): Deleted.
3263         (WebCore::JSTestOverloadedConstructorsPrototype::finishCreation): Deleted.
3264         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors): Deleted.
3265         (WebCore::JSTestOverloadedConstructors::createPrototype): Deleted.
3266         (WebCore::JSTestOverloadedConstructors::getPrototype): Deleted.
3267         (WebCore::JSTestOverloadedConstructors::destroy): Deleted.
3268         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3269         (WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties):
3270         (WebCore::JSTestOverrideBuiltinsPrototype::finishCreation): Deleted.
3271         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins): Deleted.
3272         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3273         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties):
3274         (WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation): Deleted.
3275         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3276         (WebCore::JSTestTypedefsConstructor::construct):
3277         (WebCore::JSTestTypedefsConstructor::initializeProperties):
3278         (WebCore::JSTestTypedefsPrototype::finishCreation): Deleted.
3279         * bindings/scripts/test/JS/JSattribute.cpp:
3280         (WebCore::JSattributeConstructor::initializeProperties):
3281         (WebCore::JSattributePrototype::finishCreation): Deleted.
3282         (WebCore::JSattribute::JSattribute): Deleted.
3283         * bindings/scripts/test/JS/JSreadonly.cpp:
3284         (WebCore::JSreadonlyConstructor::initializeProperties):
3285         (WebCore::JSreadonlyPrototype::finishCreation): Deleted.
3286         (WebCore::JSreadonly::JSreadonly): Deleted.
3287
3288 2015-10-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3289
3290         [GStreamer] ASSERTION FAILED: !m_adoptionIsRequired in MediaSourceGStreamer::addSourceBuffer
3291         https://bugs.webkit.org/show_bug.cgi?id=150229
3292
3293         Reviewed by Philippe Normand.
3294
3295         This happens in the debug bot in all media source tests that run
3296         that code. The problem is that we are creating a RefPtr without
3297         adopting the reference.
3298
3299         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
3300         (WebCore::MediaSourceGStreamer::addSourceBuffer): Use
3301         SourceBufferPrivateGStreamer::create().
3302         * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp:
3303         (WebCore::SourceBufferPrivateGStreamer::create): Added to make
3304         sure you can't create a SourceBufferPrivateGStreamer without
3305         adopting the reference.
3306         (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
3307         Takes a reference to the client instead of a PassRefPtr.
3308         * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h:
3309
3310 2015-10-15  Roopesh Chander  <roop@roopc.net>
3311
3312         [Content Extensions] Content blocking rules are not consulted for pings
3313         https://bugs.webkit.org/show_bug.cgi?id=149873
3314
3315         Reviewed by Alex Christensen.
3316
3317         This patch makes requests sent through the PingLoader
3318         respect content blocking rules. Specifically, the following
3319         are now subject to content blocking rules:
3320  
3321          1. <a ping> pings
3322          2. Images loaded in unload / beforeunload / pagehide handlers
3323          3. X-XSS-Protection / CSP violation reports
3324
3325         Tests: http/tests/contentextensions/block-cookies-in-csp-report.html
3326                http/tests/contentextensions/block-cookies-in-image-load-in-onunload.html
3327                http/tests/contentextensions/block-cookies-in-ping.html
3328                http/tests/contentextensions/block-csp-report.html
3329                http/tests/contentextensions/block-image-load-in-onunload.html
3330                http/tests/contentextensions/block-ping.html
3331                http/tests/contentextensions/hide-on-csp-report.html
3332
3333         * loader/PingLoader.cpp:
3334         (WebCore::processContentExtensionRulesForLoad):
3335         (WebCore::PingLoader::loadImage):
3336         (WebCore::PingLoader::sendPing):
3337         (WebCore::PingLoader::sendViolationReport):
3338
3339 2015-10-14  Joseph Pecoraro  <pecoraro@apple.com>
3340
3341         Web Inspector: Include Garbage Collection Event in Timeline
3342         https://bugs.webkit.org/show_bug.cgi?id=142510
3343
3344         Reviewed by Geoffrey Garen and Brian Burg.
3345
3346         Tests: inspector/heap/garbageCollected.html
3347                inspector/heap/gc.html
3348
3349         * ForwardingHeaders/heap/HeapObserver.h: Added.
3350         * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Added.
3351         * WebCore.vcxproj/WebCore.vcxproj:
3352         * WebCore.vcxproj/WebCore.vcxproj.filters:
3353         Forwarding headers.
3354
3355         * inspector/InspectorController.cpp:
3356         (WebCore::InspectorController::InspectorController):
3357         (WebCore::InspectorController::vm):
3358         * inspector/InspectorController.h:
3359         * inspector/WorkerInspectorController.cpp:
3360         (WebCore::WorkerInspectorController::vm):
3361         * inspector/WorkerInspectorController.h:
3362         Implement InspectorEnvironment::vm and create a Heap agent for the
3363         Page inspector controller.
3364
3365 2015-10-15  Commit Queue  <commit-queue@webkit.org>
3366
3367         Unreviewed, rolling out r191156.
3368         https://bugs.webkit.org/show_bug.cgi?id=150215
3369
3370         Introduced crashing test (Requested by bradee-oh on #webkit).
3371
3372         Reverted changeset:
3373
3374         "Modern IDB: Support IDBDatabase.close()."
3375         https://bugs.webkit.org/show_bug.cgi?id=150150
3376         http://trac.webkit.org/changeset/191156
3377
3378 2015-10-15  Brady Eidson  <beidson@apple.com>
3379
3380         Modern IDB: Support IDBDatabase.close().
3381         https://bugs.webkit.org/show_bug.cgi?id=150150
3382
3383         Reviewed by Alex Christensen.
3384
3385         No new tests (Covered by changes to storage/indexeddb/modern/opendatabase-versions.html).
3386
3387         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3388         (WebCore::IDBClient::IDBConnectionToServer::databaseConnectionClosed):
3389         * Modules/indexeddb/client/IDBConnectionToServer.h:
3390         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
3391
3392         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3393         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
3394         (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
3395         (WebCore::IDBClient::IDBDatabase::close):
3396         (WebCore::IDBClient::IDBDatabase::maybeCloseInServer):
3397         (WebCore::IDBClient::IDBDatabase::commitTransaction):
3398         * Modules/indexeddb/client/IDBDatabaseImpl.h:
3399         (WebCore::IDBClient::IDBDatabase::databaseConnectionIdentifier):
3400
3401         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3402         (WebCore::IDBClient::IDBRequest::result):
3403
3404         * Modules/indexeddb/server/IDBServer.cpp:
3405         (WebCore::IDBServer::IDBServer::databaseConnectionClosed):
3406         * Modules/indexeddb/server/IDBServer.h:
3407
3408         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3409         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
3410         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Deleted.
3411         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3412
3413         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3414         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
3415         (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
3416         (WebCore::IDBServer::UniqueIDBDatabaseConnection::hasNonFinishedTransactions):
3417         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
3418         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
3419
3420         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3421         (WebCore::InProcessIDBServer::databaseConnectionClosed):
3422         * Modules/indexeddb/shared/InProcessIDBServer.h:
3423
3424 2015-10-15  David Hyatt  <hyatt@apple.com>
3425
3426         Patch parseKeywordValue to accept "unset" so that it goes down the faster parsing path.
3427         https://bugs.webkit.org/show_bug.cgi?id=150213
3428
3429         Reviewed by Dean Jackson.
3430
3431         No new tests as correctness doesn't change (just speed).
3432
3433         * css/CSSParser.cpp:
3434         (WebCore::parseKeywordValue):
3435
3436 2015-10-15  David Hyatt  <hyatt@apple.com>
3437
3438         Add support for the CSS 'unset' keyword.
3439         https://bugs.webkit.org/show_bug.cgi?id=148614
3440
3441         Reviewed by Dean Jackson.
3442
3443         Added new test in fast/css, and existing variables tests also use unset in several tests.
3444
3445         * WebCore.xcodeproj/project.pbxproj:
3446         Add CSSUnsetValue.cpp to the project.
3447
3448         * bindings/objc/DOMCSS.mm:
3449         (kitClass):
3450         Make sure UNSET is handled in the switch.
3451
3452         * css/CSSParser.cpp:
3453         (WebCore::parseKeywordValue):
3454         (WebCore::CSSParser::parseValue):
3455         (WebCore::CSSParser::parseCustomPropertyDeclaration):
3456         Add cases to create a CSSUnsetValue properly.
3457
3458         * css/CSSToStyleMap.cpp:
3459         (WebCore::CSSToStyleMap::styleImage):
3460         (WebCore::CSSToStyleMap::mapFillAttachment):
3461         (WebCore::CSSToStyleMap::mapFillClip):
3462         (WebCore::CSSToStyleMap::mapFillComposite):
3463         (WebCore::CSSToStyleMap::mapFillBlendMode):
3464         (WebCore::CSSToStyleMap::mapFillOrigin):
3465         (WebCore::CSSToStyleMap::mapFillImage):
3466         (WebCore::CSSToStyleMap::mapFillRepeatX):
3467         (WebCore::CSSToStyleMap::mapFillRepeatY):
3468         (WebCore::convertToLengthSize):
3469         (WebCore::CSSToStyleMap::mapFillSize):
3470         (WebCore::CSSToStyleMap::mapFillXPosition):
3471         (WebCore::CSSToStyleMap::mapFillYPosition):
3472         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
3473         (WebCore::CSSToStyleMap::mapAnimationDelay):
3474         (WebCore::CSSToStyleMap::mapAnimationDirection):
3475         (WebCore::CSSToStyleMap::mapAnimationDuration):
3476         (WebCore::CSSToStyleMap::mapAnimationFillMode):
3477         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
3478         (WebCore::CSSToStyleMap::mapAnimationName):
3479         (WebCore::CSSToStyleMap::mapAnimationPlayState):
3480         (WebCore::CSSToStyleMap::mapAnimationProperty):
3481         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
3482         (WebCore::CSSToStyleMap::mapAnimationTrigger):
3483         The background and animation functions need to check for unset and be able to map it properly to initial. This is done
3484         with a new treatAsInitial method on CSSValue that can take the property ID and check for both initial
3485         or unset on a non-inherited property.
3486
3487         * css/CSSUnsetValue.cpp: Added.
3488         (WebCore::CSSUnsetValue::customCSSText):
3489         * css/CSSUnsetValue.h: Added.
3490         (WebCore::CSSUnsetValue::create):
3491         (WebCore::CSSUnsetValue::equals):
3492         (WebCore::CSSUnsetValue::CSSUnsetValue):
3493         This new value looks exactly like CSSInheritedValue and CSSInitialValue.
3494
3495         * css/CSSValue.cpp:
3496         (WebCore::CSSValue::cssValueType):
3497         (WebCore::CSSValue::cssText):
3498         (WebCore::CSSValue::destroy):
3499         (WebCore::CSSValue::isInvalidCustomPropertyValue):
3500         (WebCore::CSSValue::treatAsInheritedValue):
3501         (WebCore::CSSValue::treatAsInitialValue):
3502         * css/CSSValue.h:
3503         (WebCore::CSSValue::isUnsetValue):
3504         Add isUnsetValue and the UnsetClass. Add support for treatAsInheritedValue and treatAsInitialValue to have
3505         a way to query for initial/inherit or the matching unset type.
3506
3507         * css/CSSValueKeywords.in:
3508         Add the unset keyword.
3509
3510         * css/CSSValuePool.cpp:
3511         (WebCore::CSSValuePool::CSSValuePool):
3512         * css/CSSValuePool.h:
3513         (WebCore::CSSValuePool::createUnsetValue):
3514         Have a singleton model for unset just like we do for inherit/initial.
3515
3516         * css/StyleResolver.cpp:
3517         (WebCore::StyleResolver::applyProperty):
3518         Handle unset correctly. It maps to inherit for inherited properties and initial for non-inherited ones.
3519
3520 2015-10-15  Myles C. Maxfield  <mmaxfield@apple.com>
3521
3522         Migrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
3523         https://bugs.webkit.org/show_bug.cgi?id=150155
3524
3525         Reviewed by Tim Horton.
3526
3527         No new tests because there is no behavior change.
3528
3529         * platform/graphics/cg/GraphicsContextCG.cpp:
3530         (WebCore::GraphicsContext::drawPattern):
3531         (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
3532         * platform/graphics/cg/ImageBufferCG.cpp:
3533         (WebCore::ImageBuffer::putByteArray):
3534         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3535         * platform/mac/WebCoreSystemInterface.h:
3536         * platform/mac/WebCoreSystemInterface.mm:
3537
3538 2015-10-15  Dan Bernstein  <mitz@apple.com>
3539
3540         Fixed the build.
3541
3542         * platform/network/mac/ResourceHandleMac.mm:
3543
3544 2015-10-15  Dan Bernstein  <mitz@apple.com>
3545
3546         [Cocoa] Stop using WKSetNSURLConnectionDefersCallbacks
3547         https://bugs.webkit.org/show_bug.cgi?id=150189
3548
3549         Reviewed by Anders Carlsson.
3550
3551         * platform/ios/WebCoreSystemInterfaceIOS.mm: Removed definition.
3552         * platform/mac/WebCoreSystemInterface.h: Removed declaration.
3553         * platform/mac/WebCoreSystemInterface.mm: Removed definition.
3554
3555         * platform/network/mac/ResourceHandleMac.mm:
3556         (WebCore::ResourceHandle::start): Changed to use -[NSURLConnection setDefersLoading:].
3557         (WebCore::ResourceHandle::platformSetDefersLoading): Ditto.
3558
3559         * platform/spi/cocoa/NSURLConnectionSPI.h: Added declaration of
3560           -[NSURLConnection setDefersLoading:].
3561
3562 2015-10-15  Dean Jackson  <dino@apple.com>
3563
3564         CSSKeyframesRule::appendRule is deprecated, but is actually the spec
3565         https://bugs.webkit.org/show_bug.cgi?id=150113
3566
3567         Reviewed by Simon Fraser.
3568
3569         I stupidly deprecated the wrong function in
3570         http://trac.webkit.org/changeset/174469
3571
3572         * css/CSSKeyframesRule.cpp:
3573         (WebCore::CSSKeyframesRule::insertRule): Swap the code between these two.
3574         (WebCore::CSSKeyframesRule::appendRule):
3575
3576 2015-10-14  David Hyatt  <hyatt@apple.com>
3577
3578         Implement CSS Variables.
3579         https://bugs.webkit.org/show_bug.cgi?id=19660
3580
3581         Reviewed by Dean Jackson.
3582
3583         Added new tests in fast/css/custom-properties and fast/css/variables.
3584
3585         * CMakeLists.txt:
3586         * WebCore.xcodeproj/project.pbxproj:
3587         Add CSSVariableValue.cpp and CSSVariableDependentValue.cpp to builds.
3588
3589         * css/CSSCalculationValue.cpp:
3590         (WebCore::hasDoubleValue):
3591         Handle the new CSS_PARSER_WHITESPACE value.
3592
3593         * css/CSSComputedStyleDeclaration.cpp:
3594         (WebCore::ComputedStyleExtractor::customPropertyValue):
3595         Patched to make sure style is updated so that dynamic changes to custom properties are reflected
3596         immediately when querying values.
3597
3598         (WebCore::CSSComputedStyleDeclaration::length):
3599         (WebCore::CSSComputedStyleDeclaration::item):
3600         The custom properties table is a reference and not a pointer now.
3601
3602         * css/CSSCustomPropertyValue.h:
3603         (WebCore::CSSCustomPropertyValue::create):
3604         (WebCore::CSSCustomPropertyValue::createInvalid):
3605         (WebCore::CSSCustomPropertyValue::customCSSText):
3606         (WebCore::CSSCustomPropertyValue::equals):
3607         (WebCore::CSSCustomPropertyValue::isInvalid):
3608         (WebCore::CSSCustomPropertyValue::containsVariables):
3609         (WebCore::CSSCustomPropertyValue::value):
3610         (WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
3611         The CSSCustomPropertyValue represents a custom property/value pair in the back end. It holds on
3612         to both the property name and a CSSValueList that has the original parser terms. This class also
3613         doubles as the invalid-at-compute-time value for custom properties when they contain cycles, etc.
3614
3615         * css/CSSFunctionValue.cpp:
3616         (WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):
3617          * css/CSSFunctionValue.h:
3618         (WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):
3619         Hands back a CSSParserValue for a function with variables replaced with their real values (or fallback).
3620
3621         * css/CSSGrammar.y.in:
3622         Many changes to support the var() syntax and to handle error conditions and cases.
3623
3624         * css/CSSParser.cpp:
3625         (WebCore::filterProperties):
3626         Null check the value here. Shouldn't happen, but being paranoid.
3627
3628         (WebCore::CSSParser::parseVariableDependentValue):
3629         This function converts a CSSValueList back into a CSSParserValueList and then passes
3630         it off to the parser. If the result parses, successfully, then the parsed CSSValue is handed back.
3631
3632         (WebCore::CSSParser::parseValue):
3633         Detect when a property value contains variables and simply make a CSSVariableDependentValue to hold
3634         a copy of the parser value list (as a CSSValueList). We defer parsing the list until compute-time
3635         when we know the values of the variables to use.
3636
3637         (WebCore::CSSParser::parseCustomPropertyDeclaration):
3638         Add support for inherit, initial and variable references in custom properties.
3639
3640         (WebCore::CSSParser::detectFunctionTypeToken):
3641         Add support for detection of the "var" token.
3642
3643         (WebCore::CSSParser::realLex):
3644         Fix the parsing of custom properties to allow "--" and to allow them to start with digits, e.g., "--0".
3645
3646         * css/CSSParser.h:
3647         Add parseVariableDependentValue function for handling variable substitution and subsequent parsing
3648         of the resolved parser value list.
3649
3650         * css/CSSParserValues.cpp:
3651         (WebCore::CSSParserValueList::containsVariables):
3652         Get rid of the toString() function (no longer needed) and replace it with containsVariables(). This
3653         check is used to figure out if a parser value list has variables and thus needs to defer parsing
3654         until later.
3655
3656         (WebCore::CSSParserValue::createCSSValue):
3657         Add support for the creation of values for variables, CSSVariableValues.
3658
3659         (WebCore::CSSParserValueList::toString): Deleted.
3660         No longer needed.
3661
3662         * css/CSSParserValues.h:
3663         Add CSSParserVariable as a new kind of parser value. This represents a var() that is encountered
3664         during parsing. It is similar to a function except it has to hold both the reference (custom property name)
3665         and fallback arguments.
3666
3667         * css/CSSPrimitiveValue.cpp:
3668         (WebCore::isValidCSSUnitTypeForDoubleConversion):
3669         (WebCore::CSSPrimitiveValue::cleanup):
3670         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
3671         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
3672         (WebCore::CSSPrimitiveValue::equals):
3673         Add support for CSS_PARSER_WHITESPACE as a way of preserving whitespace as a parsed item (variables can
3674         be only whitespace, and this has to be retained).
3675
3676         (WebCore::CSSPrimitiveValue::buildParserValue):
3677         Conversion from a CSSPrimitiveValue back into a parser value is handled by this function.
3678
3679         * css/CSSPrimitiveValue.h:
3680         (WebCore::CSSPrimitiveValue::isParserOperator):
3681         (WebCore::CSSPrimitiveValue::parserOperator):
3682         Add ability to get parser operator info. Add the buildParserValue declaration.
3683
3684         * css/CSSValue.cpp:
3685         (WebCore::CSSValue::equals):
3686         (WebCore::CSSValue::cssText):
3687         (WebCore::CSSValue::destroy):
3688         (WebCore::CSSValue::cloneForCSSOM):
3689         (WebCore::CSSValue::isInvalidCustomPropertyValue):
3690         * css/CSSValue.h:
3691         Add support for variable values and variable dependent values.
3692
3693         * css/CSSValueList.cpp:
3694         (WebCore::CSSValueList::customCSSText):
3695         Improve serialization to not output extra spaces when a comma operator is a value.
3696
3697         (WebCore::CSSValueList::containsVariables):
3698         Whether or not a CSSVariableValue can be found somewhere within the list (or its descendants).
3699
3700         (WebCore::CSSValueList::checkVariablesForCycles):
3701         Called to check variables for cycles.
3702
3703         (WebCore::CSSValueList::buildParserValueSubstitutingVariables):
3704         (WebCore::CSSValueList::buildParserValueListSubstitutingVariables):
3705         Functions that handle converting the value list to a parser value list while making
3706         variable substitutions along the way.
3707
3708         * css/CSSValueList.h:
3709         Add the new buildParserXXX functions.
3710
3711         * css/CSSVariableDependentValue.cpp: Added.
3712         (WebCore::CSSVariableDependentValue::checkVariablesForCycles):
3713         * css/CSSVariableDependentValue.h: Added.
3714         (WebCore::CSSVariableDependentValue::create):
3715         (WebCore::CSSVariableDependentValue::customCSSText):
3716         (WebCore::CSSVariableDependentValue::equals):
3717         (WebCore::CSSVariableDependentValue::propertyID):
3718         (WebCore::CSSVariableDependentValue::valueList):
3719         (WebCore::CSSVariableDependentValue::CSSVariableDependentValue):
3720         This value represents a list of terms that have not had variables substituted yet. The list
3721         is held by the value so that it can be converted back into a parser value list once the
3722         variable values are known.
3723
3724         * css/CSSVariableValue.cpp: Added.
3725         (WebCore::CSSVariableValue::CSSVariableValue):
3726         (WebCore::CSSVariableValue::customCSSText):
3727         (WebCore::CSSVariableValue::equals):
3728         (WebCore::CSSVariableValue::buildParserValueListSubstitutingVariables):
3729         * css/CSSVariableValue.h: Added.
3730         (WebCore::CSSVariableValue::create):
3731         (WebCore::CSSVariableValue::name):
3732         (WebCore::CSSVariableValue::fallbackArguments):
3733         This value represents a var() itself. It knows how to do the substitution of the variable
3734         value and to apply fallback if that value is not present.
3735
3736         * css/StyleProperties.cpp:
3737         (WebCore::StyleProperties::getPropertyValue):
3738         (WebCore::StyleProperties::borderSpacingValue):
3739         (WebCore::StyleProperties::getLayeredShorthandValue):
3740         (WebCore::StyleProperties::getShorthandValue):
3741         (WebCore::StyleProperties::getCommonValue):
3742         (WebCore::StyleProperties::getPropertyCSSValue):
3743         (WebCore::StyleProperties::getPropertyCSSValueInternal):
3744         (WebCore::StyleProperties::asText):
3745         (WebCore::StyleProperties::copyPropertiesInSet):
3746         * css/StyleProperties.h:
3747         Patched to factor property fetching into an internal method so that variables can work with shorthands
3748         in the CSS OM.
3749
3750         * css/StyleResolver.cpp:
3751         (WebCore::StyleResolver::applyProperty):
3752         Resolve variable values at compute time. If they fail to resolve, use inherit or initial as the
3753         value (depending on whether the property inherits by default).
3754
3755         (WebCore::StyleResolver::resolvedVariableValue):
3756         Helper function that calls parseVariableDependentValue and gets the resolved result.
3757
3758         (WebCore::StyleResolver::applyCascadedProperties):
3759         After custom properties have been collected, we check for cycles and perform variable substitutions.
3760         This way we get all the variables replaced before we inherit down the style tree.
3761
3762         * css/StyleResolver.h:
3763         Add resolvedVariableValue declaration.
3764
3765         * css/makeprop.pl:
3766         Make sure custom properties are inherited by default.
3767
3768         * rendering/style/RenderStyle.cpp:
3769         (WebCore::RenderStyle::checkVariablesInCustomProperties):
3770         This function handles updating variables with cycles to be invalid in the RenderStyle. It then also
3771         handles the replacement of variables found in custom properties with resolved values. All custom
3772         properties are either invalid or are real non-variable-dependent value lists after this function
3773         completes.
3774
3775         * rendering/style/RenderStyle.h:
3776         Add checkVariablesInCustomProperties declaration.
3777
3778         * rendering/style/StyleCustomPropertyData.h:
3779         (WebCore::StyleCustomPropertyData::create):
3780         (WebCore::StyleCustomPropertyData::copy):
3781         (WebCore::StyleCustomPropertyData::operator==):
3782         (WebCore::StyleCustomPropertyData::operator!=):
3783         (WebCore::StyleCustomPropertyData::setCustomPropertyValue):
3784         (WebCore::StyleCustomPropertyData::getCustomPropertyValue):
3785         (WebCore::StyleCustomPropertyData::values):
3786         (WebCore::StyleCustomPropertyData::hasCustomProperty):
3787         (WebCore::StyleCustomPropertyData::containsVariables):
3788         (WebCore::StyleCustomPropertyData::setContainsVariables):
3789         (WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
3790         Miscellaneous cleanup, and the addition of whether or not the properties still contain variable
3791         dependent values that need to be resolved.
3792
3793 2015-10-15  Csaba Osztrogonác  <ossy@webkit.org>
3794
3795         Fix the !(ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)) build after r191112
3796         https://bugs.webkit.org/show_bug.cgi?id=150175
3797
3798         Reviewed by Antti Koivisto.
3799
3800         * dom/ComposedTreeAncestorIterator.h:
3801         (WebCore::ComposedTreeAncestorIterator::traverseParent):
3802         * dom/ComposedTreeIterator.cpp:
3803         (WebCore::ComposedTreeIterator::initializeShadowStack):
3804         * dom/Element.cpp:
3805         (WebCore::Element::childrenChanged):
3806
3807 2015-10-15  Csaba Osztrogonác  <ossy@webkit.org>
3808
3809         Get rid of the only once used isIntegerArray function
3810         https://bugs.webkit.org/show_bug.cgi?id=150170
3811
3812         Reviewed by Geoffrey Garen.
3813
3814         * page/Crypto.cpp:
3815         (WebCore::Crypto::getRandomValues):
3816
3817 2015-10-15  Tim Horton  <timothy_horton@apple.com>
3818
3819         Try to fix the iOS build.
3820
3821         * page/EventHandler.h:
3822
3823 2015-10-15  Zalan Bujtas  <zalan@apple.com>
3824
3825         Anonymous table objects: Collapse anonymous table rows.
3826         https://bugs.webkit.org/show_bug.cgi?id=150154
3827
3828         Reviewed by David Hyatt.
3829
3830         Merge anonymous table rows when they are not needed anymore.
3831         Generated table rows can be collapsed into one when there's no
3832         non-generated sibling table row left in the tree.
3833
3834         Import W3C CSS2.1 anonymous table tests.
3835
3836         * rendering/RenderObject.cpp:
3837         (WebCore::collapseAnonymousTableRowsIfNeeded):
3838         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
3839
3840 2015-10-15  Simon Fraser  <simon.fraser@apple.com>
3841
3842         Un-indent contents of the WebCore namespace
3843         in GraphicsContext.h. No code changes.
3844
3845         * platform/graphics/GraphicsContext.h:
3846
3847 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
3848
3849         Move ImageBuffer:clip() into GraphicsContextCG
3850         https://bugs.webkit.org/show_bug.cgi?id=150140
3851
3852         Reviewed by Zalan Bujtas.
3853
3854         Move the guts of CG's ImageBuffer:clip() into GraphicsContextCG.
3855
3856         * platform/graphics/GraphicsContext.h:
3857         * platform/graphics/cg/GraphicsContextCG.cpp:
3858         (WebCore::GraphicsContext::clipToNativeImage):
3859         * platform/graphics/cg/ImageBufferCG.cpp:
3860         (WebCore::ImageBuffer::clip):
3861
3862 2015-10-14  Brady Eidson  <beidson@apple.com>
3863
3864         Modern IDB: Add basic transaction committing.
3865         https://bugs.webkit.org/show_bug.cgi?id=150147
3866
3867         Reviewed by Alex Christensen.
3868
3869         Test: storage/indexeddb/modern/opendatabase-versions.html
3870
3871         * Modules/indexeddb/IDBTransaction.h:
3872
3873         * Modules/indexeddb/IndexedDB.h:
3874
3875         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3876         (WebCore::IDBClient::IDBConnectionToServer::commitTransaction):
3877         (WebCore::IDBClient::IDBConnectionToServer::didCommitTransaction):
3878         * Modules/indexeddb/client/IDBConnectionToServer.h:
3879         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
3880
3881         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3882         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
3883         (WebCore::IDBClient::IDBDatabase::commitTransaction):
3884         (WebCore::IDBClient::IDBDatabase::didCommitTransaction):
3885         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
3886         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
3887         * Modules/indexeddb/client/IDBDatabaseImpl.h:
3888
3889         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
3890         (WebCore::IDBClient::IDBFactory::open):
3891
3892         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
3893         (WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
3894         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
3895
3896         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3897         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
3898         (WebCore::IDBClient::IDBTransaction::db):
3899         (WebCore::IDBClient::IDBTransaction::hasPendingActivity):
3900         (WebCore::IDBClient::IDBTransaction::isActive):
3901         (WebCore::IDBClient::IDBTransaction::scheduleOperationTimer):
3902         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
3903         (WebCore::IDBClient::IDBTransaction::commit):
3904         (WebCore::IDBClient::IDBTransaction::didCommit):
3905         (WebCore::IDBClient::IDBTransaction::fireOnComplete):
3906         (WebCore::IDBClient::IDBTransaction::fireOnAbort):
3907         (WebCore::IDBClient::IDBTransaction::enqueueEvent):
3908         (WebCore::IDBClient::IDBTransaction::dispatchEvent):
3909         * Modules/indexeddb/client/IDBTransactionImpl.h:
3910         (WebCore::IDBClient::IDBTransaction::database):
3911         
3912         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
3913         (WebCore::LegacyTransaction::db):
3914         * Modules/indexeddb/legacy/LegacyTransaction.h:
3915         
3916         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
3917         (WebCore::IDBServer::IDBConnectionToClient::didCommitTransaction):
3918         * Modules/indexeddb/server/IDBConnectionToClient.h:
3919         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3920         
3921         * Modules/indexeddb/server/IDBServer.cpp:
3922         (WebCore::IDBServer::IDBServer::registerTransaction):
3923         (WebCore::IDBServer::IDBServer::unregisterTransaction):
3924         (WebCore::IDBServer::IDBServer::commitTransaction):
3925         * Modules/indexeddb/server/IDBServer.h:
3926         
3927         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3928         (WebCore::IDBServer::generateUniqueCallbackIdentifier):
3929         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
3930         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
3931         (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
3932         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
3933         (WebCore::IDBServer::UniqueIDBDatabase::performErrorCallback):
3934         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction): Deleted.
3935         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3936         (WebCore::IDBServer::UniqueIDBDatabase::server):
3937         
3938         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3939         (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
3940         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction):
3941         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
3942         
3943         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3944         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
3945         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
3946         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
3947         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
3948         
3949         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
3950         (WebCore::IDBDatabaseInfo::setVersion):
3951         
3952         * Modules/indexeddb/shared/IDBError.cpp:
3953         (WebCore::IDBError::isolatedCopy):
3954         * Modules/indexeddb/shared/IDBError.h:
3955
3956         * Modules/indexeddb/shared/IDBRequestData.h:
3957
3958         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
3959         (WebCore::IDBResourceIdentifier::isolatedCopy):
3960         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
3961
3962         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3963         (WebCore::InProcessIDBServer::didCommitTransaction):
3964         (WebCore::InProcessIDBServer::commitTransaction):
3965         * Modules/indexeddb/shared/InProcessIDBServer.h:
3966
3967         * WebCore.xcodeproj/project.pbxproj:
3968
3969         * platform/CrossThreadCopier.cpp:
3970         (WebCore::IDBResourceIdentifier>::copy):
3971         (WebCore::IDBError>::copy):
3972         * platform/CrossThreadCopier.h:
3973
3974 2015-10-15  Daniel Bates  <dabates@apple.com>
3975
3976         [iOS] DOM click event may not be dispatched when page has :active style and <input type="search">
3977         https://bugs.webkit.org/show_bug.cgi?id=144451
3978         <rdar://problem/23099482>
3979
3980         Reviewed by Simon Fraser.
3981
3982         Fixes an issue where a DOM click event is not dispatched to an element in a subframe on a page
3983         that has a <input type="search"> and defines a CSS :active pseudo-class for the HTML body element.
3984
3985         On iOS we only dispatch a DOM click event if the content does not change as part
3986         of dispatching a DOM mousemove event at the tapped element. In particular, we do not
3987         dispatch a DOM click event if there is a visibility change to some element on the page
3988         as part of dispatching a mousemove event at the tapped element. For a web page
3989         that specifies CSS :active pseudo-class and contains a search field, applying/unapplying
3990         this pseudo-class as part of dispatching a DOM mousemove event may cause the
3991         visibility of the search field cancel button to change; => a DOM click event will not
3992         be dispatched to the tapped element.
3993
3994         Tests: fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html
3995                fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html
3996                fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html
3997                fast/forms/search/search-cancel-in-formerly-invisible-element.html
3998                fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html
3999                fast/forms/search/search-cancel-toggle-visibility-initially-visible.html
4000
4001         * rendering/RenderSearchField.cpp:
4002         (WebCore::RenderSearchField::updateCancelButtonVisibility): Write logic for determining
4003         whether the visibility of the cancel button changed in terms of m_isCancelButtonVisible
4004         instead of querying for the current style data as the latter is overwritten on a full
4005         style recalculation.
4006         (WebCore::RenderSearchField::RenderSearchField): Deleted.
4007         (WebCore::RenderSearchField::visibilityForCancelButton): Deleted.
4008         * rendering/RenderSearchField.h: Define instance variable m_isCancelButtonVisible to
4009         store the visibility state of the cancel button.
4010
4011 2015-10-15  Antti Koivisto  <antti@apple.com>
4012
4013         Implement iterator for traversing composed ancestors
4014         https://bugs.webkit.org/show_bug.cgi?id=150162
4015
4016         Reviewed by Andreas Kling.
4017
4018         The existing general purpose ComposedTreeIterator can traverse parent chain but not efficiently
4019         (since it builds stack). Add a separate stackless iterator for ancestor chain traversal.
4020
4021         * WebCore.xcodeproj/project.pbxproj:
4022         * dom/ComposedTreeAncestorIterator.h: Added.
4023         (WebCore::ComposedTreeAncestorIterator::operator*):
4024         (WebCore::ComposedTreeAncestorIterator::operator->):
4025         (WebCore::ComposedTreeAncestorIterator::operator==):
4026         (WebCore::ComposedTreeAncestorIterator::operator!=):
4027         (WebCore::ComposedTreeAncestorIterator::operator++):
4028         (WebCore::ComposedTreeAncestorIterator::get):
4029         (WebCore::ComposedTreeAncestorIterator::ComposedTreeAncestorIterator):
4030         (WebCore::ComposedTreeAncestorIterator::traverseParent):
4031         (WebCore::ComposedTreeAncestorAdapter::ComposedTreeAncestorAdapter):
4032         (WebCore::ComposedTreeAncestorAdapter::begin):
4033         (WebCore::ComposedTreeAncestorAdapter::end):
4034         (WebCore::ComposedTreeAncestorAdapter::first):
4035         (WebCore::composedTreeAncestors):
4036         * dom/ComposedTreeIterator.h:
4037         * dom/ContainerNode.h:
4038         (WebCore::Node::highestAncestor):
4039         (WebCore::Node::isTreeScope):
4040         (WebCore::Node::needsNodeRenderingTraversalSlowPath): Deleted.
4041
4042             With NodeRenderingTraversal::parent removed this bit is no longer used.
4043
4044         * dom/Element.cpp:
4045         (WebCore::Element::shadowRoot):
4046         (WebCore::Element::addShadowRoot):
4047         (WebCore::shouldUseNodeRenderingTraversalSlowPath): Deleted.
4048         (WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath): Deleted.
4049         * dom/Element.h:
4050         (WebCore::Element::didAddUserAgentShadowRoot):
4051         (WebCore::Element::alwaysCreateUserAgentShadowRoot):
4052         * dom/Node.cpp:
4053         (WebCore::Node::derefEventTarget):
4054         (WebCore::Node::updateAncestorsForStyleRecalc):
4055         (WebCore::traverseStyleParent): Deleted.
4056         (WebCore::traverseFirstStyleParent): Deleted.
4057
4058             Switch to iterator&nbs