76a924826f3934654ca211c2d848c52bb0d2d442
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-28  Brian Burg  <bburg@apple.com>
2
3         Builtins generator should emit ENABLE(FEATURE) guards based on @conditional annotation
4         https://bugs.webkit.org/show_bug.cgi?id=150536
5
6         Reviewed by Yusuke Suzuki.
7
8         Replace @optional=FEATURE with @conditional=ENABLE(FEATURE) in builtins files.
9
10         * Modules/streams/ByteLengthQueuingStrategy.js:
11         * Modules/streams/CountQueuingStrategy.js:
12         * Modules/streams/ReadableStream.js:
13         * Modules/streams/ReadableStreamController.js:
14         * Modules/streams/ReadableStreamInternals.js:
15         * Modules/streams/ReadableStreamReader.js:
16         * Modules/streams/StreamInternals.js:
17         * Modules/streams/WritableStream.js:
18         * Modules/streams/WritableStreamInternals.js:
19
20 2015-10-28  Zalan Bujtas  <zalan@apple.com>
21
22         Should never be reached failure in WebCore::backgroundRectForBox
23         https://bugs.webkit.org/show_bug.cgi?id=150232
24
25         Reviewed by Simon Fraser.
26
27         We should never end up with simple container for composited layer when background-clip: text is present.
28         (not even when the box has no decoration to paint)
29
30         Test: fast/backgrounds/background-clip-text-with-simple-container.html
31
32         * rendering/RenderLayerBacking.cpp:
33         (WebCore::RenderLayerBacking::paintsBoxDecorations):
34         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
35         (WebCore::backgroundRectForBox):
36
37 2015-10-28  Chris Dumez  <cdumez@apple.com>
38
39         Use RunLoopTimer in DataURLDecoder to avoid issues related to runloops
40         https://bugs.webkit.org/show_bug.cgi?id=150609
41         <rdar://problem/22702894>
42
43         Reviewed by Antti Koivisto.
44
45         Use RunLoopTimer in DataURLDecoder to avoid issues related to RunLoops.
46         In particular, the callOnMainThread() call could fail to dispatch the
47         decoding result to the main thread if the client-side would spin its own
48         RunLoop.
49
50         This is similar to the approach used in DocumentLoader for
51         DocumentLoaderTimer.
52
53         No new tests, verified through manual testing.
54
55         * WebCore.xcodeproj/project.pbxproj:
56         * loader/ResourceLoader.cpp:
57         (WebCore::ResourceLoader::loadDataURL):
58         * page/Page.cpp:
59         (WebCore::Page::Page):
60         * page/Page.h:
61         * page/mac/PageMac.mm: Renamed from Source/WebCore/page/mac/PageMac.cpp.
62         (WebCore::Page::platformInitialize):
63         (WebCore::Page::addSchedulePair):
64         (WebCore::Page::removeSchedulePair):
65         * platform/network/DataURLDecoder.cpp:
66         (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
67         (WebCore::DataURLDecoder::DecodingResultDispatcher::DecodingResultDispatcher):
68         (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
69         (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
70         (WebCore::DataURLDecoder::createDecodeTask):
71         (WebCore::DataURLDecoder::decode):
72         * platform/network/DataURLDecoder.h:
73
74 2015-10-28  Brady Eidson  <beidson@apple.com>
75
76         Modern IDB: Implement most readonly attributes of IDBObjectStore.
77         https://bugs.webkit.org/show_bug.cgi?id=150617
78
79         Reviewed by Alex Christensen.
80
81         Test: storage/indexeddb/modern/objectstore-attributes.html
82
83         * Modules/indexeddb/IDBObjectStore.h:
84
85         * Modules/indexeddb/client/IDBAnyImpl.cpp:
86         (WebCore::IDBClient::IDBAny::IDBAny):
87         * Modules/indexeddb/client/IDBAnyImpl.h:
88         (WebCore::IDBClient::IDBAny::create):
89
90         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
91         (WebCore::IDBClient::IDBObjectStore::name):
92         (WebCore::IDBClient::IDBObjectStore::keyPathAny):
93         (WebCore::IDBClient::IDBObjectStore::keyPath):
94         (WebCore::IDBClient::IDBObjectStore::transaction):
95         (WebCore::IDBClient::IDBObjectStore::id): Deleted.
96         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
97
98         * Modules/indexeddb/legacy/LegacyObjectStore.h:
99         (WebCore::LegacyObjectStore::transaction):
100
101 2015-10-28  Hunseop Jeong  <hs85.jeong@samsung.com>
102
103         Replace 0 and NULL with nullptr in WebCore/editing.
104         https://bugs.webkit.org/show_bug.cgi?id=150555
105
106         Reviewed by Darin Adler.
107
108         No new tests because there is no behavior change.
109
110         * editing/ApplyStyleCommand.cpp:
111         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
112         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
113         (WebCore::ApplyStyleCommand::applyInlineStyle):
114         * editing/ApplyStyleCommand.h:
115         (WebCore::ApplyStyleCommand::shouldRemoveInlineStyleFromElement):
116         * editing/CompositeEditCommand.cpp:
117         (WebCore::CompositeEditCommand::applyCommandToComposite):
118         (WebCore::CompositeEditCommand::deleteInsignificantText):
119         * editing/DeleteSelectionCommand.cpp:
120         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
121         (WebCore::DeleteSelectionCommand::initializeStartEnd):
122         * editing/EditCommand.cpp:
123         (WebCore::EditCommand::EditCommand):
124         * editing/EditCommand.h:
125         * editing/EditingStyle.cpp:
126         (WebCore::HTMLElementEquivalent::HTMLElementEquivalent):
127         * editing/EditingStyle.h:
128         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
129         * editing/Editor.h:
130         * editing/EditorCommand.cpp:
131         (WebCore::Editor::commandIsSupportedFromMenuOrKeyBinding):
132         (WebCore::Editor::Command::Command):
133         * editing/FrameSelection.cpp:
134         (WebCore::DragCaretController::setCaretPosition):
135         (WebCore::FrameSelection::directionOfSelection):
136         * editing/MarkupAccumulator.cpp:
137         (WebCore::MarkupAccumulator::entityMaskForText):
138         * editing/MarkupAccumulator.h:
139         * editing/RenderedPosition.cpp:
140         (WebCore::rendererFromPosition):
141         (WebCore::RenderedPosition::RenderedPosition):
142         * editing/RenderedPosition.h:
143         (WebCore::RenderedPosition::operator==):
144         (WebCore::RenderedPosition::uncachedInlineBox):
145         (WebCore::RenderedPosition::RenderedPosition):
146         * editing/ReplaceSelectionCommand.cpp:
147         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
148         * editing/SetNodeAttributeCommand.cpp:
149         (WebCore::SetNodeAttributeCommand::doUnapply):
150         * editing/SmartReplaceCF.cpp:
151         (WebCore::getSmartSet):
152         * editing/SpellChecker.cpp:
153         (WebCore::SpellCheckRequest::SpellCheckRequest):
154         (WebCore::SpellCheckRequest::didSucceed):
155         (WebCore::SpellCheckRequest::didCancel):
156         (WebCore::SpellCheckRequest::setCheckerAndSequence):
157         (WebCore::SpellCheckRequest::requesterDestroyed):
158         (WebCore::SpellChecker::SpellChecker):
159         * editing/SpellChecker.h:
160         * editing/VisiblePosition.cpp:
161         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
162         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
163         (WebCore::VisiblePosition::localCaretRect):
164         (WebCore::enclosingBlockFlowElement):
165         * editing/VisibleUnits.cpp:
166         (WebCore::CachedLogicallyOrderedLeafBoxes::CachedLogicallyOrderedLeafBoxes):
167         (WebCore::CachedLogicallyOrderedLeafBoxes::previousTextOrLineBreakBox):
168         (WebCore::visualWordPosition):
169         (WebCore::previousLinePosition):
170         (WebCore::nextLinePosition):
171         * editing/htmlediting.cpp:
172         (WebCore::highestEnclosingNodeOfType):
173         (WebCore::highestNodeToRemoveInPruning):
174         * editing/htmlediting.h:
175         (WebCore::firstPositionInOrBeforeNode):
176         * editing/ios/EditorIOS.mm:
177         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
178         (WebCore::Editor::fontForSelection):
179         * editing/mac/AlternativeTextUIController.mm:
180         (WebCore::AlternativeTextUIController::AlernativeTextContextController::alternativesForContext):
181         * editing/mac/EditorMac.mm:
182         (WebCore::Editor::fontForSelection):
183         * editing/markup.cpp:
184         * editing/markup.h:
185
186 2015-10-28  Xabier Rodriguez Calvar  <calvaris@igalia.com>
187
188         [Streams API] Add write method to writable stream
189         https://bugs.webkit.org/show_bug.cgi?id=150589
190
191         Reviewed by Darin Adler.
192
193         Write method implemented on writable streams according to the spec.
194
195         Current test set suffices. Expectations are updated accordingly.
196
197         * Modules/streams/WritableStream.js:
198         (write):
199
200 2015-10-27  Hunseop Jeong  <hs85.jeong@samsung.com>
201
202         [Cairo] Incorrect dashed and dotted border painting after r177686.
203         https://bugs.webkit.org/show_bug.cgi?id=141967
204
205         Reviewed by Gyuyoung Kim.
206
207         Fix the incorrect dashed/dotted border painting in cairo.
208
209         * platform/graphics/cairo/GraphicsContextCairo.cpp:
210         (WebCore::GraphicsContext::drawLine):
211         (WebCore::calculateStrokePatternOffset): Deleted.
212         (WebCore::drawLineOnCairoContext): Deleted.
213
214 2015-10-27  Chris Dumez  <cdumez@apple.com>
215
216         id of iframe incorrectly sets window name
217         https://bugs.webkit.org/show_bug.cgi?id=150565
218
219         Reviewed by Darin Adler.
220
221         As per the specification, the iframe's contentWindow name should be an
222         empty string if the frame's name attribute is unset:
223         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-name
224
225         Instead, WebKit was using the iframe's id as window name if the name
226         was unset.
227
228         Firefox, IE and Chrome behave according to the specification.
229
230         This is a merge of the following Blink commit:
231         https://src.chromium.org/viewvc/blink?revision=169803&view=revision
232
233         Test: fast/frames/iframe-no-name.html
234
235         * html/HTMLFrameElementBase.cpp:
236         (WebCore::HTMLFrameElementBase::parseAttribute):
237         (WebCore::HTMLFrameElementBase::insertedInto): Deleted.
238
239 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
240
241         Web Inspector: Remove Timeline MarkDOMContent and MarkLoad, data is already available
242         https://bugs.webkit.org/show_bug.cgi?id=150615
243
244         Reviewed by Timothy Hatcher.
245
246         The timestamp only event data is already available from `Page.domContentEventFired`
247         and `Page.loadEventFired` events. We can drop the Timeline specific events in
248         favor of these which have existed for a very long time (before iOS 7).
249
250         * inspector/InspectorInstrumentation.cpp:
251         (WebCore::InspectorInstrumentation::loadEventFiredImpl):
252         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): Deleted.
253         * inspector/InspectorTimelineAgent.cpp:
254         (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent): Deleted.
255         (WebCore::InspectorTimelineAgent::didMarkLoadEvent): Deleted.
256         (WebCore::toProtocol): Deleted.
257         * inspector/InspectorTimelineAgent.h:
258         * inspector/TimelineRecordFactory.cpp:
259         (WebCore::TimelineRecordFactory::createMarkData): Deleted.
260         * inspector/TimelineRecordFactory.h:
261
262 2015-10-27  Jiewen Tan  <jiewen_tan@apple.com>
263
264         Null dereference loading Blink layout test editing/execCommand/format-block-uneditable-crash.html
265         https://bugs.webkit.org/show_bug.cgi?id=150207
266         <rdar://problem/23137066>
267
268         Reviewed by Enrica Casucci.
269
270         This is a merge of Blink r200238:
271         https://codereview.chromium.org/1280263002
272
273         Test: editing/execCommand/format-block-uneditable-crash.html
274
275         * editing/ApplyBlockElementCommand.cpp:
276         (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
277         splitTextNode() will return early if the given text node is not editable. Hence, check
278         its editablity before calling the method.
279
280 2015-10-27  Brady Eidson  <beidson@apple.com>
281
282         Modern IDB: IDBTransaction.objectStore() support.
283         https://bugs.webkit.org/show_bug.cgi?id=150607
284
285         Reviewed by Alex Christensen.
286
287         Tests: storage/indexeddb/modern/aborted-put.html
288                storage/indexeddb/modern/idbtransaction-objectstore-failures.html
289
290         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
291         (WebCore::IDBClient::IDBObjectStore::put):
292         
293         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
294         (WebCore::IDBClient::IDBTransaction::objectStore):
295         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
296         * Modules/indexeddb/client/IDBTransactionImpl.h:
297         
298         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
299         (WebCore::IDBServer::MemoryBackingStoreTransaction::addExistingObjectStore):
300         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
301         
302         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
303         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
304         
305         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
306         (WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
307         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
308         
309         * Modules/indexeddb/shared/IDBTransactionInfo.h:
310         (WebCore::IDBTransactionInfo::objectStores):
311
312 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
313
314         Web Inspector: Remove unused / duplicated XHR timeline instrumentation
315         https://bugs.webkit.org/show_bug.cgi?id=150605
316
317         Reviewed by Timothy Hatcher.
318
319         These records are just duplicates of "EventDispatch" records for XHR
320         load and readystatechange events. Due to the nesting, the XHR records
321         were themselves never getting looked at, and their data (URL / readyState)
322         not shown in the frontend.
323
324         * inspector/InspectorInstrumentation.cpp:
325         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEventImpl): Deleted.
326         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEventImpl): Deleted.
327         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEventImpl): Deleted.
328         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEventImpl): Deleted.
329         * inspector/InspectorInstrumentation.h:
330         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent): Deleted.
331         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent): Deleted.
332         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent): Deleted.
333         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent): Deleted.
334         * inspector/InspectorTimelineAgent.cpp:
335         (WebCore::InspectorTimelineAgent::willDispatchXHRReadyStateChangeEvent): Deleted.
336         (WebCore::InspectorTimelineAgent::didDispatchXHRReadyStateChangeEvent): Deleted.
337         (WebCore::InspectorTimelineAgent::willDispatchXHRLoadEvent): Deleted.
338         (WebCore::InspectorTimelineAgent::didDispatchXHRLoadEvent): Deleted.
339         (WebCore::toProtocol): Deleted.
340         * inspector/InspectorTimelineAgent.h:
341         * inspector/TimelineRecordFactory.cpp:
342         (WebCore::TimelineRecordFactory::createXHRReadyStateChangeData): Deleted.
343         (WebCore::TimelineRecordFactory::createXHRLoadData): Deleted.
344         * inspector/TimelineRecordFactory.h:
345         * xml/XMLHttpRequest.cpp:
346         (WebCore::XMLHttpRequest::callReadyStateChangeListener): Deleted.
347
348 2015-10-27  Joseph Pecoraro  <pecoraro@apple.com>
349
350         Web Inspector: Do not send RenderingFrame TimelineRecords that have no children
351         https://bugs.webkit.org/show_bug.cgi?id=150600
352
353         Reviewed by Timothy Hatcher.
354
355         * inspector/InspectorTimelineAgent.cpp:
356         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
357         The frontend already filters out empty RenderingFrame records
358         (in TimelineManager.prototype._processRecord). Filter them out
359         on the backend to reduce protocol traffic / noise.
360
361 2015-10-27  Alex Christensen  <achristensen@webkit.org>
362
363         Cancel navigation policy checks like we do content policy checks.
364         https://bugs.webkit.org/show_bug.cgi?id=150582
365         rdar://problem/22077579
366
367         Reviewed by Brent Fulgham.
368
369         This was verified manually and I'll write a layout test for it soon.
370
371         * loader/DocumentLoader.cpp:
372         (WebCore::DocumentLoader::DocumentLoader):
373         (WebCore::DocumentLoader::~DocumentLoader):
374         (WebCore::DocumentLoader::willSendRequest):
375         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
376         (WebCore::DocumentLoader::cancelPolicyCheckIfNeeded):
377         * loader/DocumentLoader.h:
378         Add a bool to keep track of whether we are waiting for navigation policy checks, like we do with content policy checks.
379         Without this check, sometimes callbacks are made to DocumentLoaders that do not exist any more because they do not get
380         cancelled by cancelPolicyCheckIfNeeded when detaching from the frame.
381
382 2015-10-27  Brady Eidson  <beidson@apple.com>
383
384         Modern IDB: Support IDBObjectStore.put/get support.
385         https://bugs.webkit.org/show_bug.cgi?id=150468
386
387         Reviewed by Alex Christensen.
388
389         Tests: storage/indexeddb/modern/basic-put.html
390                storage/indexeddb/modern/keypath-basic.html
391
392         * CMakeLists.txt:
393         * WebCore.xcodeproj/project.pbxproj:
394
395         * Modules/indexeddb/IDBKeyData.cpp:
396         (WebCore::IDBKeyData::deletedValue):
397         (WebCore::IDBKeyData::operator<):
398         (WebCore::IDBKeyData::operator==):
399         * Modules/indexeddb/IDBKeyData.h:
400         (WebCore::IDBKeyData::isValid):
401         (WebCore::IDBKeyData::operator!=):
402         (WebCore::IDBKeyData::hash):
403         (WebCore::IDBKeyData::isDeletedValue):
404         (WebCore::IDBKeyDataHash::hash):
405         (WebCore::IDBKeyDataHash::equal):
406         (WebCore::IDBKeyDataHashTraits::constructDeletedValue):
407         (WebCore::IDBKeyDataHashTraits::isDeletedValue):
408         (WebCore::IDBKeyDataHashTraits::emptyValue):
409         (WebCore::IDBKeyDataHashTraits::isEmptyValue):
410
411         * Modules/indexeddb/IndexedDB.h:
412
413         * Modules/indexeddb/client/IDBAnyImpl.cpp:
414         (WebCore::IDBClient::IDBAny::IDBAny):
415         (WebCore::IDBClient::IDBAny::modernIDBObjectStore):
416         * Modules/indexeddb/client/IDBAnyImpl.h:
417         (WebCore::IDBClient::IDBAny::create):
418
419         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
420         (WebCore::IDBClient::IDBConnectionToServer::createObjectStore):
421         (WebCore::IDBClient::IDBConnectionToServer::didCreateObjectStore):
422         (WebCore::IDBClient::IDBConnectionToServer::putOrAdd):
423         (WebCore::IDBClient::IDBConnectionToServer::didPutOrAdd):
424         (WebCore::IDBClient::IDBConnectionToServer::getRecord):
425         (WebCore::IDBClient::IDBConnectionToServer::didGetRecord):
426         (WebCore::IDBClient::IDBConnectionToServer::saveOperation):
427         (WebCore::IDBClient::IDBConnectionToServer::completeOperation):
428         * Modules/indexeddb/client/IDBConnectionToServer.h:
429         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
430
431         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
432         (WebCore::IDBClient::IDBObjectStore::autoIncrement):
433         (WebCore::IDBClient::IDBObjectStore::put):
434         (WebCore::IDBClient::IDBObjectStore::get):
435         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
436         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
437         (WebCore::IDBClient::IDBObjectStore::info):
438
439         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
440         (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest): Deleted.
441
442         * Modules/indexeddb/client/IDBRequestImpl.cpp:
443         (WebCore::IDBClient::IDBRequest::create):
444         (WebCore::IDBClient::IDBRequest::IDBRequest):
445         (WebCore::IDBClient::IDBRequest::sourceObjectStoreIdentifier):
446         (WebCore::IDBClient::IDBRequest::hasPendingActivity):
447         (WebCore::IDBClient::IDBRequest::dispatchEvent):
448         (WebCore::IDBClient::IDBRequest::setResult):
449         (WebCore::IDBClient::IDBRequest::setResultToStructuredClone):
450         (WebCore::IDBClient::IDBRequest::requestCompleted):
451         (WebCore::IDBClient::IDBRequest::onError):
452         (WebCore::IDBClient::IDBRequest::onSuccess):
453         * Modules/indexeddb/client/IDBRequestImpl.h:
454
455         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
456         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
457         (WebCore::IDBClient::IDBTransaction::hasPendingActivity):
458         (WebCore::IDBClient::IDBTransaction::isActive):
459         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
460         (WebCore::IDBClient::IDBTransaction::commit):
461         (WebCore::IDBClient::IDBTransaction::didAbort):
462         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
463         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
464         (WebCore::IDBClient::IDBTransaction::getRecordOnServer):
465         (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
466         (WebCore::IDBClient::IDBTransaction::requestPutOrAdd):
467         (WebCore::IDBClient::IDBTransaction::putOrAddOnServer):
468         (WebCore::IDBClient::IDBTransaction::didPutOrAddOnServer):
469         (WebCore::IDBClient::IDBTransaction::activate):
470         (WebCore::IDBClient::IDBTransaction::deactivate):
471         * Modules/indexeddb/client/IDBTransactionImpl.h:
472         (WebCore::IDBClient::IDBTransaction::isReadOnly):
473         (WebCore::IDBClient::TransactionActivator::TransactionActivator):
474         (WebCore::IDBClient::TransactionActivator::~TransactionActivator):
475
476         * Modules/indexeddb/client/TransactionOperation.cpp: 
477         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
478         * Modules/indexeddb/client/TransactionOperation.h:
479         (WebCore::IDBClient::TransactionOperation::objectStoreIdentifier):
480         (WebCore::IDBClient::TransactionOperation::transaction):
481         (WebCore::IDBClient::createTransactionOperation):
482
483         * Modules/indexeddb/server/IDBBackingStore.h:
484         
485         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
486         (WebCore::IDBServer::IDBConnectionToClient::didPutOrAdd):
487         (WebCore::IDBServer::IDBConnectionToClient::didGetRecord):
488         * Modules/indexeddb/server/IDBConnectionToClient.h:
489         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
490
491         * Modules/indexeddb/server/IDBServer.cpp:
492         (WebCore::IDBServer::IDBServer::putOrAdd):
493         (WebCore::IDBServer::IDBServer::getRecord):
494         * Modules/indexeddb/server/IDBServer.h:
495
496         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
497         (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
498         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
499         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
500
501         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
502         (WebCore::IDBServer::MemoryIDBBackingStore::keyExistsInObjectStore):
503         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRecord):
504         (WebCore::IDBServer::MemoryIDBBackingStore::putRecord):
505         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
506         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
507
508         * Modules/indexeddb/server/MemoryObjectStore.cpp:
509         (WebCore::IDBServer::MemoryObjectStore::containsRecord):
510         (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
511         (WebCore::IDBServer::MemoryObjectStore::putRecord):
512         (WebCore::IDBServer::MemoryObjectStore::valueForKey):
513         * Modules/indexeddb/server/MemoryObjectStore.h:
514
515         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
516         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
517         (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
518         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
519         (WebCore::IDBServer::UniqueIDBDatabase::didPerformPutOrAdd):
520         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
521         (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
522         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetRecord):
523         (WebCore::IDBServer::UniqueIDBDatabase::performKeyDataCallback):
524         (WebCore::IDBServer::UniqueIDBDatabase::performValueDataCallback):
525         * Modules/indexeddb/server/UniqueIDBDatabase.h:
526
527         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
528         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::isReadOnly):
529         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
530         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
531         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
532
533         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
534         (WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
535         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
536
537         * Modules/indexeddb/shared/IDBError.cpp:
538         (WebCore::idbErrorName):
539         (WebCore::idbErrorDescription):
540         * Modules/indexeddb/shared/IDBError.h:
541
542         * Modules/indexeddb/shared/IDBRequestData.cpp:
543         (WebCore::IDBRequestData::IDBRequestData):
544         (WebCore::IDBRequestData::serverConnectionIdentifier):
545         (WebCore::IDBRequestData::objectStoreIdentifier):
546         * Modules/indexeddb/shared/IDBRequestData.h:
547
548         * Modules/indexeddb/shared/IDBResultData.cpp:
549         (WebCore::IDBResultData::IDBResultData):
550         (WebCore::IDBResultData::putOrAddSuccess):
551         (WebCore::IDBResultData::getRecordSuccess):
552         * Modules/indexeddb/shared/IDBResultData.h:
553         (WebCore::IDBResultData::resultKey):
554         (WebCore::IDBResultData::resultData):
555
556         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
557         (WebCore::InProcessIDBServer::didPutOrAdd):
558         (WebCore::InProcessIDBServer::didGetRecord):
559         (WebCore::InProcessIDBServer::putOrAdd):
560         (WebCore::InProcessIDBServer::getRecord):
561         * Modules/indexeddb/shared/InProcessIDBServer.h:
562
563         * bindings/js/IDBBindingUtilities.cpp:
564         (WebCore::idbKeyToJSValue):
565         (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath):
566         (WebCore::canInjectIDBKeyIntoScriptValue):
567         (WebCore::deserializeIDBValueData):
568         (WebCore::scriptValueToIDBKey):
569         (WebCore::idbKeyDataToScriptValue):
570         * bindings/js/IDBBindingUtilities.h:
571
572         * platform/CrossThreadCopier.cpp:
573         (WebCore::ThreadSafeDataBuffer>::copy):
574         * platform/CrossThreadCopier.h:
575
576         * platform/ThreadSafeDataBuffer.h: Added.
577         (WebCore::ThreadSafeDataBufferImpl::ThreadSafeDataBufferImpl):
578         (WebCore::ThreadSafeDataBuffer::adoptVector):
579         (WebCore::ThreadSafeDataBuffer::copyVector):
580         (WebCore::ThreadSafeDataBuffer::ThreadSafeDataBuffer):
581         (WebCore::ThreadSafeDataBuffer::data):
582
583 2015-10-27  Tim Horton  <timothy_horton@apple.com>
584
585         WKView being inside WKWebView leads to weird API issues
586         https://bugs.webkit.org/show_bug.cgi?id=150174
587
588         Reviewed by Anders Carlsson.
589
590         * platform/spi/cg/CoreGraphicsSPI.h:
591
592 2015-10-27  Zhuo Li  <zachli@apple.com>
593
594         Add WebKit API to clear data type Search Field Recent Searches.
595         https://bugs.webkit.org/show_bug.cgi?id=150019.
596
597         Reviewed by Anders Carlsson.
598
599         * platform/cocoa/SearchPopupMenuCocoa.h: Add a function to remove recent searches based on
600         time.
601         * platform/cocoa/SearchPopupMenuCocoa.mm:
602         (WebCore::typeCheckedRecentSearchesArray): Return nil if the recent searches array is
603         corrupted, otherwise return the array.
604         (WebCore::typeCheckedDateInRecentSearch): Return nil if the date in recent search is
605         corrupted, otherwise return the date.
606         (WebCore::typeCheckedRecentSearchesRemovingRecentSearchesAddedAfterDate): Return nil if the recent searches plist is
607         corrupted, otherwise return the recent searches plist.
608         (WebCore::writeEmptyRecentSearchesPlist): Replace the existing recent searches plist if there is
609         any with a clean one.
610         (WebCore::loadRecentSearches): Use -typeCheckedRecentSearchesArray and -typeCheckedDateInRecentSearch.
611         (WebCore::removeRecentlyModifiedRecentSearches):
612         When the time passed in is equivalent to [NSDate distantPast], clear all recent searches in
613         the Recent Searches plist. Otherwise, we only clear the recent searches that were created
614         after or at the time that is passed in as the parameter. If all recent searches associated
615         with an autosave name were created after or at the time that is passed in as the parameter,
616         remove this autosave name key and all of its values in the plist. If all recent searches
617         associated with every autosave name in the plist were created after or at the time that is
618         passed in as the parameter, clear all recent searches in the Recent Searches plist.
619
620         Also, we clear all recent searches in the Recent Searches plist when we find the plist is
621         corrupted.
622
623 2015-10-27  Keith Rollin  <krollin@apple.com>
624
625         Do not sanitize user input for input[type=url]
626         https://bugs.webkit.org/show_bug.cgi?id=150346
627         <rdar://problem/23243240>
628
629         Reviewed by Darin Adler.
630
631         Do not sanitize user input in text-based input fields that support
632         the Selection API, in order to not break JavaScript code that expects
633         element.value to match what's on the screen.
634
635         Test: fast/forms/input-user-input-sanitization.html
636
637         * html/TextFieldInputType.cpp:
638         (WebCore::TextFieldInputType::subtreeHasChanged):
639
640 2015-10-20  Zalan Bujtas  <zalan@apple.com>
641
642         Subpixel layout: Convert RenderTable* and AutoTableLayout to use LayoutUnit.
643         https://bugs.webkit.org/show_bug.cgi?id=149366
644
645         Reviewed by David Hyatt.
646
647         This patch enables non-integral cell space distribution for both
648         auto and fixed table layout.
649         Due to the tight layout, float is used to calculate each cell's dimension/position and
650         we convert them to LayoutUnits while said values are set on the renderer.
651         Due to the (lack of) LayoutUnit precision, a fudge factor is applied on table cell's minimum width.   
652
653         Collapsed table borders are still integral based, tracked here: webkit.org/b/150383
654
655         Covered by existing tests.
656
657         (WebCore::RenderTableSection::firstLineBaseline): Baseline is still integral (same as normal line layout)
658         * rendering/RenderTreeAsText.cpp: flooring produces the least amount of rebaseline diff (still over 1200 tests). It doesn't really matter which direction we round
659         as long as it is consistent.
660         (WebCore::writeTextRun):
661         (WebCore::writeSimpleLine):
662         * platform/graphics/LayoutRect.h:
663         (WebCore::LayoutRect::LayoutRect):
664         * rendering/AutoTableLayout.cpp:
665         (WebCore::AutoTableLayout::recalcColumn):
666         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
667         (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
668         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
669         (WebCore::AutoTableLayout::layout):
670         * rendering/AutoTableLayout.h:
671         * rendering/FixedTableLayout.cpp:
672         (WebCore::FixedTableLayout::calcWidthArray):
673         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
674         (WebCore::FixedTableLayout::layout):
675         * rendering/FixedTableLayout.h:
676         * rendering/RenderBlock.cpp:
677         (WebCore::RenderBlock::computePreferredLogicalWidths):
678         * rendering/RenderTable.cpp:
679         (WebCore::RenderTable::updateLogicalWidth):
680         (WebCore::RenderTable::distributeExtraLogicalHeight):
681         (WebCore::RenderTable::layout):
682         (WebCore::RenderTable::addOverflowFromChildren):
683         (WebCore::RenderTable::computePreferredLogicalWidths):
684         (WebCore::RenderTable::offsetWidthForColumn):
685         (WebCore::RenderTable::calcBorderStart):
686         (WebCore::RenderTable::calcBorderEnd):
687         (WebCore::RenderTable::outerBorderBefore):
688         (WebCore::RenderTable::outerBorderAfter):
689         (WebCore::RenderTable::outerBorderStart):
690         (WebCore::RenderTable::outerBorderEnd):
691         * rendering/RenderTable.h:
692         (WebCore::RenderTable::hBorderSpacing):
693         (WebCore::RenderTable::vBorderSpacing):
694         (WebCore::RenderTable::outerBorderLeft):
695         (WebCore::RenderTable::outerBorderRight):
696         (WebCore::RenderTable::outerBorderTop):
697         (WebCore::RenderTable::outerBorderBottom):
698         (WebCore::RenderTable::columnPositions):
699         (WebCore::RenderTable::setColumnPosition):
700         * rendering/RenderTableCell.cpp:
701         (WebCore::RenderTableCell::logicalWidthFromColumns):
702         (WebCore::RenderTableCell::computeIntrinsicPadding):
703         (WebCore::RenderTableCell::setCellLogicalWidth):
704         (WebCore::RenderTableCell::layout):
705         (WebCore::RenderTableCell::paddingTop):
706         (WebCore::RenderTableCell::paddingBottom):
707         (WebCore::RenderTableCell::paddingLeft):
708         (WebCore::RenderTableCell::paddingRight):
709         (WebCore::RenderTableCell::paddingBefore):
710         (WebCore::RenderTableCell::paddingAfter):
711         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
712         (WebCore::RenderTableCell::borderLeft):
713         (WebCore::RenderTableCell::borderRight):
714         (WebCore::RenderTableCell::borderTop):
715         (WebCore::RenderTableCell::borderBottom):
716         (WebCore::RenderTableCell::borderStart):
717         (WebCore::RenderTableCell::borderEnd):
718         (WebCore::RenderTableCell::borderBefore):
719         (WebCore::RenderTableCell::borderAfter):
720         (WebCore::RenderTableCell::borderHalfLeft):
721         (WebCore::RenderTableCell::borderHalfRight):
722         (WebCore::RenderTableCell::borderHalfTop):
723         (WebCore::RenderTableCell::borderHalfBottom):
724         (WebCore::RenderTableCell::borderHalfStart):
725         (WebCore::RenderTableCell::borderHalfEnd):
726         (WebCore::RenderTableCell::borderHalfBefore):
727         (WebCore::RenderTableCell::borderHalfAfter):
728         (WebCore::CollapsedBorders::addBorder):
729         (WebCore::RenderTableCell::paintCollapsedBorders):
730         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
731         (WebCore::RenderTableCell::paintBoxDecorations):
732         (WebCore::RenderTableCell::paintMask):
733         * rendering/RenderTableCell.h:
734         (WebCore::RenderTableCell::logicalHeightForRowSizing):
735         * rendering/RenderTableSection.cpp:
736         (WebCore::RenderTableSection::calcRowLogicalHeight):
737         (WebCore::RenderTableSection::layout):
738         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
739         (WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows):
740         (WebCore::RenderTableSection::distributeRemainingExtraLogicalHeight):
741         (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):
742         (WebCore::RenderTableSection::layoutRows):
743         (WebCore::RenderTableSection::calcOuterBorderBefore):
744         (WebCore::RenderTableSection::calcOuterBorderAfter):
745         (WebCore::RenderTableSection::calcOuterBorderStart):
746         (WebCore::RenderTableSection::calcOuterBorderEnd):
747         (WebCore::RenderTableSection::logicalRectForWritingModeAndDirection):
748         (WebCore::RenderTableSection::dirtiedColumns):
749         (WebCore::RenderTableSection::spannedColumns):
750         (WebCore::RenderTableSection::offsetLeftForRowGroupBorder):
751         (WebCore::RenderTableSection::offsetTopForRowGroupBorder):
752         (WebCore::RenderTableSection::verticalRowGroupBorderHeight):
753         (WebCore::RenderTableSection::horizontalRowGroupBorderWidth):
754         (WebCore::RenderTableSection::paintRowGroupBorderIfRequired):
755         (WebCore::RenderTableSection::setLogicalPositionForCell):
756         * rendering/RenderTableSection.h:
757         (WebCore::RenderTableSection::outerBorderLeft):
758         (WebCore::RenderTableSection::outerBorderRight):
759         (WebCore::RenderTableSection::outerBorderTop):
760         (WebCore::RenderTableSection::outerBorderBottom):
761         * rendering/style/CollapsedBorderValue.h:
762         (WebCore::CollapsedBorderValue::CollapsedBorderValue):
763         (WebCore::CollapsedBorderValue::width):
764
765 2015-10-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
766
767         [Streams API] Add close method to writable stream
768         https://bugs.webkit.org/show_bug.cgi?id=150560
769
770         Reviewed by Darin Adler.
771
772         Added the close method which requires three additional writable stream internal functions plus a queuing
773         function to retrieve a value from the queue according to the spec.
774
775         Current test set suffices. Expectations were updated accordingly.
776
777         * Modules/streams/StreamInternals.js:
778         (peekQueueValue):
779         * Modules/streams/WritableStream.js:
780         (close):
781         * Modules/streams/WritableStreamInternals.js:
782         (callOrScheduleWritableStreamAdvanceQueue):
783         (writableStreamAdvanceQueue):
784         (closeWritableStream): Added as per spec.
785
786 2015-10-26  Brady Eidson  <beidson@apple.com>
787
788         Make IDBKeyData from a struct to a class.
789         https://bugs.webkit.org/show_bug.cgi?id=150576
790
791         Reviewed by Alex Christensen.
792
793         No new tests (No change in behavior).
794
795         * Modules/indexeddb/IDBKeyData.cpp:
796         (WebCore::IDBKeyData::IDBKeyData):
797         (WebCore::IDBKeyData::maybeCreateIDBKey):
798         (WebCore::IDBKeyData::isolatedCopy):
799         (WebCore::IDBKeyData::encode):
800         (WebCore::IDBKeyData::decode):
801         (WebCore::IDBKeyData::compare):
802         (WebCore::IDBKeyData::loggingString):
803         (WebCore::IDBKeyData::setArrayValue):
804         (WebCore::IDBKeyData::setStringValue):
805         (WebCore::IDBKeyData::setDateValue):
806         (WebCore::IDBKeyData::setNumberValue):
807         * Modules/indexeddb/IDBKeyData.h:
808         (WebCore::IDBKeyData::IDBKeyData):
809         (WebCore::IDBKeyData::minimum):
810         (WebCore::IDBKeyData::maximum):
811         (WebCore::IDBKeyData::isNull):
812         (WebCore::IDBKeyData::type):
813         (WebCore::IDBKeyData::encode):
814         (WebCore::IDBKeyData::decode):
815         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
816         (WebCore::GetOperation::perform):
817         * bindings/js/IDBBindingUtilities.h:
818         * platform/CrossThreadCopier.h:
819
820 2015-10-26  Philip Chimento  <philip.chimento@gmail.com>
821
822         [GTK] [Stable] Build GL texture mapper only if USE_TEXTURE_MAPPER_GL
823         https://bugs.webkit.org/show_bug.cgi?id=148606
824
825         Unreviewed, build-only change.
826
827         No new tests, build-only change.
828
829         * PlatformGTK.cmake: Remove sources requiring GL from list of
830         sources that are built when USE_TEXTURE_MAPPER is true, and add a
831         separate condition within the USE_TEXTURE_MAPPER condition to
832         build those sources when USE_TEXTURE_MAPPER_GL is true.
833
834 2015-10-26  Simon Fraser  <simon.fraser@apple.com>
835
836         Remove redundant GraphicsContext::clip(const Path&, WindRule)
837         https://bugs.webkit.org/show_bug.cgi?id=150584
838
839         Reviewed by Tim Horton.
840
841         GraphicsContext had both clipPath(const Path&, WindRule) and clip(const Path&, WindRule),
842         which were mostly the same other than GraphicsContext::clipPath() not clipping if the path
843         was empty (added, I think by mistake, in r72926), and not calling m_data->clip().
844
845         Make clipPath() be the winner, and have it behave like clip() with empty paths, and call m_data->clip().
846
847         * platform/graphics/GraphicsContext.cpp:
848         (WebCore::GraphicsContext::clipRoundedRect):
849         * platform/graphics/GraphicsContext.h:
850         * platform/graphics/cairo/GraphicsContextCairo.cpp:
851         (WebCore::GraphicsContext::clipPath):
852         (WebCore::GraphicsContext::clip): Deleted.
853         * platform/graphics/cg/GraphicsContextCG.cpp:
854         (WebCore::GraphicsContext::clipPath):
855         (WebCore::GraphicsContext::canvasClip):
856         (WebCore::GraphicsContext::clip): Deleted.
857         * rendering/RenderBoxModelObject.cpp:
858         (WebCore::RenderBoxModelObject::paintBoxShadow): Making a path, calling addRoundedRect() and then clipping
859         to the path is the same as context.clipRoundedRect().
860         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
861         (WebCore::RenderMathMLRadicalOperator::paint):
862
863 2015-10-26  Zalan Bujtas  <zalan@apple.com>
864
865         Floating box is misplaced after content change.
866         https://bugs.webkit.org/show_bug.cgi?id=150271
867
868         Reviewed by David Hyatt.
869
870         Collapse anonymous block when as the result of a sibling removal only floating siblings are left.
871
872         Test: fast/block/collapse-anon-block-with-float-siblings-only.html
873
874         * rendering/RenderBlock.cpp:
875         (WebCore::canCollapseAnonymousBlock):
876         (WebCore::canMergeContiguousAnonymousBlocks):
877         (WebCore::RenderBlock::collapseAnonymousBoxChild):
878         (WebCore::RenderBlock::removeChild):
879         (WebCore::canMergeAnonymousBlock): Deleted.
880         * rendering/RenderBlock.h:
881         * rendering/RenderElement.cpp:
882         (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary):
883
884 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
885
886         Null dereference loading Blink layout test editing/execCommand/crash-replacing-list-by-list.html
887         https://bugs.webkit.org/show_bug.cgi?id=149288
888         <rdar://problem/22746310>
889
890         Reviewed by Chris Dumez.
891
892         This is a merge of Blink r170821:
893         https://codereview.chromium.org/220233013
894
895         Test: editing/execCommand/crash-replacing-list-by-list.html
896
897         * editing/ReplaceSelectionCommand.cpp:
898         (WebCore::ReplaceSelectionCommand::insertAsListItems):
899
900 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
901
902         Null dereference loading Blink layout test editing/execCommand/insert-image-changing-visibility-crash.html
903         https://bugs.webkit.org/show_bug.cgi?id=150208
904         <rdar://problem/23137109>
905
906         Reviewed by Chris Dumez.
907
908         This is a merge from Blink r168502:
909         https://codereview.chromium.org/183893018
910
911         Test: editing/execCommand/insert-image-changing-visibility-crash.html
912
913         * editing/ReplaceSelectionCommand.cpp:
914         (WebCore::ReplaceSelectionCommand::doApply):
915         We should check again the visibility of the inserted position again since
916         the replacement might change the visibility.
917
918 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
919
920         Null dereference loading Blink layout test editing/execCommand/insert-ordered-list-crash.html
921         https://bugs.webkit.org/show_bug.cgi?id=150209
922         <rdar://problem/23137198>
923
924         Reviewed by Chris Dumez.
925
926         This is a merge from Blink r168006:
927         https://codereview.chromium.org/181283002
928
929         Test: editing/execCommand/insert-ordered-list-crash.html
930
931         * editing/InsertListCommand.cpp:
932         (WebCore::InsertListCommand::doApply):
933         setEndingSelection() might change endingSelection(), we should check again.
934
935 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
936
937         Null dereference loading Blink layout test editing/execCommand/insert-html-to-document-element-crash.html
938         https://bugs.webkit.org/show_bug.cgi?id=149294
939         <rdar://problem/22746657>
940
941         Reviewed by Darin Adler.
942
943         This is a merge of Blink r175019:
944         https://codereview.chromium.org/300143012
945
946         Test: editing/execCommand/insert-html-to-document-element-crash.html
947
948         * editing/ReplaceSelectionCommand.cpp:
949         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
950         check nullable value |element->parentNode()| before using it.
951
952 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
953
954         Null dereference loading Blink layout test editing/execCommand/indent-nested-blockquotes-crash.html
955         https://bugs.webkit.org/show_bug.cgi?id=149291
956         <rdar://problem/22746473>
957
958         Reviewed by Darin Adler.
959
960         This is a merge of Blink r172967:
961         https://codereview.chromium.org/251723003
962
963         Test: editing/execCommand/indent-nested-blockquotes-crash.html
964
965         * editing/CompositeEditCommand.cpp:
966         (WebCore::CompositeEditCommand::insertNodeAfter):
967
968 2015-10-26  Brady Eidson  <beidson@apple.com>
969
970         Modern IDB: Backing store objectStores (plumbing for b/150468).
971         https://bugs.webkit.org/show_bug.cgi?id=150543
972
973         Reviewed by Alex Christensen.
974
975         No new tests (No change in behavior, plumbing for future testability)
976
977         * CMakeLists.txt:
978         * WebCore.xcodeproj/project.pbxproj:
979
980         * Modules/indexeddb/server/IDBBackingStore.h:
981
982         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
983         (WebCore::IDBServer::MemoryBackingStoreTransaction::addNewObjectStore):
984         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
985         (WebCore::IDBServer::MemoryBackingStoreTransaction::commit):
986         (WebCore::IDBServer::MemoryBackingStoreTransaction::finish):
987         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
988         (WebCore::IDBServer::MemoryBackingStoreTransaction::isWriting):
989
990         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
991         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
992         (WebCore::IDBServer::MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort):
993         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
994
995         * Modules/indexeddb/server/MemoryObjectStore.cpp:
996         (WebCore::IDBServer::MemoryObjectStore::create):
997         (WebCore::IDBServer::MemoryObjectStore::MemoryObjectStore):
998         (WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):
999         (WebCore::IDBServer::MemoryObjectStore::writeTransactionStarted):
1000         (WebCore::IDBServer::MemoryObjectStore::writeTransactionFinished):
1001         * Modules/indexeddb/server/MemoryObjectStore.h:
1002         (WebCore::IDBServer::MemoryObjectStore::info):
1003
1004         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1005         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
1006
1007         * Modules/indexeddb/shared/IDBError.cpp:
1008         (WebCore::idbErrorName):
1009         (WebCore::idbErrorDescription):
1010         * Modules/indexeddb/shared/IDBError.h:
1011
1012 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
1013
1014         Null dereference loading Blink layout test editing/execCommand/indent-inline-box-crash.html
1015         https://bugs.webkit.org/show_bug.cgi?id=149290
1016         <rdar://problem/22746435>
1017
1018         Reviewed by Alex Christensen.
1019
1020         This is a merge of Blink r174952:
1021         https://codereview.chromium.org/297203004
1022
1023         Test: editing/execCommand/indent-inline-box-crash.html
1024
1025         * editing/IndentOutdentCommand.cpp:
1026         (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
1027
1028 2015-10-26  Jiewen Tan  <jiewen_tan@apple.com>
1029
1030         Null dereference loading Blink layout test editing/execCommand/indent-no-visible-contents-crash.html
1031         https://bugs.webkit.org/show_bug.cgi?id=149292
1032         <rdar://problem/22746530>
1033
1034         Reviewed by Alex Christensen.
1035
1036         This is a merge of Blink r176735:
1037         https://codereview.chromium.org/349143002
1038
1039         Test: editing/execCommand/indent-no-visible-contents-crash.html
1040
1041         * editing/CompositeEditCommand.cpp:
1042         (WebCore::CompositeEditCommand::moveParagraphWithClones):
1043         Sometimes callers of this method will pass null startOfParagraphToMove || endOfParagraphToMove,
1044         hence check them before proceeding.
1045
1046 2015-10-26  Anders Carlsson  <andersca@apple.com>
1047
1048         Remove dead context menu code
1049         https://bugs.webkit.org/show_bug.cgi?id=150567
1050
1051         Reviewed by Tim Horton.
1052
1053         * loader/EmptyClients.h:
1054         * page/ContextMenuClient.h:
1055         * page/ContextMenuController.cpp:
1056         (WebCore::ContextMenuController::showContextMenu): Deleted.
1057
1058 2015-10-26  Simon Fraser  <simon.fraser@apple.com>
1059
1060         Implement 'round' and 'space' values for border-image
1061         https://bugs.webkit.org/show_bug.cgi?id=14185
1062
1063         Reviewed by Tim Horton.
1064         
1065         Add support for "round" and "space" values for border-image-repeat.
1066         Following "stretch" and "repeat", the code is added to Image::drawTiled().
1067         
1068         For "round", we compute an integral number of copies of the image that fit,
1069         and then adjust the tile scale.
1070         
1071         For "space", we also compute an integral number N of copies that will fit,
1072         and then divide the remaining space amongst N+1 gaps, adjusting the tiling
1073         phase so that with an even number of images, a gap is centered.
1074
1075         Tests: fast/borders/border-image-round.html
1076                fast/borders/border-image-space.html
1077
1078         * platform/graphics/Image.cpp:
1079         (WebCore::Image::drawTiled):
1080         * platform/graphics/cg/GraphicsContextCG.cpp:
1081         (WebCore::GraphicsContext::drawPattern):
1082
1083 2015-10-26  Simon Fraser  <simon.fraser@apple.com>
1084
1085         Incorrect repeated background-size behavior in keyframes
1086         https://bugs.webkit.org/show_bug.cgi?id=150309
1087
1088         Reviewed by Zalan Bujtas.
1089         
1090         After computing the style for a keyframe, we failed to propagate unset
1091         fill-layer properties to all layers, which caused incorrect behavior when
1092         there were multiple background images, but only one value on a background
1093         property in the keyframes.
1094         
1095         Fix by calling adjustRenderStyle() on keyframe styles, which invokes
1096         style.adjustBackgroundLayers() which fixes the bug.
1097
1098         Test: animations/multiple-backgrounds.html
1099
1100         * css/StyleResolver.cpp:
1101         (WebCore::StyleResolver::styleForKeyframe):
1102
1103 2015-10-26  Chris Dumez  <cdumez@apple.com>
1104
1105         Indexing an object with an integer that is not a supported property index should not call the named property getter
1106         https://bugs.webkit.org/show_bug.cgi?id=148871
1107         <rdar://problem/22589952>
1108
1109         Reviewed by Darin Adler.
1110
1111         Indexing an object with an integer that is not a supported property
1112         index should not call the named property getter, as per the Web IDL
1113         specification:
1114         https://heycam.github.io/webidl/#idl-indexed-properties (Note in blue)
1115
1116         Firefox and Chrome both already behave according to the specification
1117         here so this patch aligns our behavior with other browsers as well.
1118
1119         No new tests, already covered by existing test.
1120
1121         * bindings/scripts/CodeGeneratorJS.pm:
1122         (GenerateGetOwnPropertySlotBody):
1123         (GenerateImplementation):
1124         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1125         (WebCore::JSTestEventTarget::getOwnPropertySlot):
1126         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex): Deleted.
1127         (WebCore::jsTestEventTargetConstructor): Deleted.
1128
1129 2015-10-26  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1130
1131         [Streams API] Implement abort method on writable streams
1132         https://bugs.webkit.org/show_bug.cgi?id=150444
1133
1134         Reviewed by Darin Adler.
1135
1136         Abort method on writable streams implemented according to the spec.
1137
1138         Current test set suffices. Expectations are updated accordingly.
1139
1140         * Modules/streams/StreamInternals.js:
1141         (promiseInvokeOrFallbackOrNoop): Implemented according to the spec.
1142         * Modules/streams/WritableStream.js:
1143         (abort): Implemented according to the spec.
1144
1145 2015-10-25  Hunseop Jeong  <hs85.jeong@samsung.com>
1146
1147         Use modern for-loops in WebCore/editing.
1148         https://bugs.webkit.org/show_bug.cgi?id=150354
1149
1150         Reviewed by Darin Adler.
1151
1152         No new tests because there is no behavior change.
1153
1154         * editing/AlternativeTextController.cpp:
1155         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1156         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
1157         (WebCore::AlternativeTextController::rootViewRectForRange):
1158         (WebCore::AlternativeTextController::markCorrection):
1159         * editing/ApplyStyleCommand.cpp:
1160         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1161         (WebCore::dummySpanAncestorForNode):
1162         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
1163         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
1164         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
1165         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
1166         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
1167         (WebCore::ApplyStyleCommand::joinChildTextNodes):
1168         * editing/CompositeEditCommand.cpp:
1169         (WebCore::EditCommandComposition::reapply):
1170         (WebCore::EditCommandComposition::getNodesInCommand):
1171         (WebCore::CompositeEditCommand::removeChildrenInRange):
1172         (WebCore::CompositeEditCommand::removeNode):
1173         (WebCore::copyMarkers):
1174         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1175         (WebCore::CompositeEditCommand::deleteInsignificantText):
1176         * editing/DictationCommand.cpp:
1177         (WebCore::DictationMarkerSupplier::addMarkersToTextNode):
1178         (WebCore::DictationCommand::collectDictationAlternativesInRange):
1179         * editing/EditingStyle.cpp:
1180         (WebCore::isEditingProperty):
1181         (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
1182         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
1183         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
1184         (WebCore::styleFromMatchedRulesForElement):
1185         (WebCore::diffTextDecorations):
1186         * editing/Editor.cpp:
1187         (WebCore::Editor::setComposition):
1188         (WebCore::Editor::markAndReplaceFor):
1189         * editing/EditorCommand.cpp:
1190         (WebCore::createCommandMap):
1191         * editing/MarkupAccumulator.cpp:
1192         (WebCore::MarkupAccumulator::totalLength):
1193         * editing/MergeIdenticalElementsCommand.cpp:
1194         (WebCore::MergeIdenticalElementsCommand::doApply):
1195         (WebCore::MergeIdenticalElementsCommand::doUnapply):
1196         * editing/ReplaceSelectionCommand.cpp:
1197         (WebCore::ReplacementFragment::removeUnrenderedNodes):
1198         (WebCore::ReplacementFragment::removeInterchangeNodes):
1199         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1200         (WebCore::removeHeadContents):
1201         * editing/SpellChecker.cpp:
1202         (WebCore::SpellChecker::~SpellChecker):
1203         (WebCore::SpellChecker::client):
1204         (WebCore::SpellChecker::enqueueRequest):
1205         * editing/SplitElementCommand.cpp:
1206         (WebCore::SplitElementCommand::executeApply):
1207         (WebCore::SplitElementCommand::doApply):
1208         (WebCore::SplitElementCommand::doUnapply):
1209         * editing/TextCheckingHelper.cpp:
1210         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
1211         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
1212         * editing/WrapContentsInDummySpanCommand.cpp:
1213         (WebCore::WrapContentsInDummySpanCommand::executeApply):
1214         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
1215         * editing/ios/EditorIOS.mm:
1216         (WebCore::Editor::createFragmentAndAddResources):
1217         * editing/mac/EditorMac.mm:
1218         (WebCore::Editor::WebContentReader::readFilenames):
1219         (WebCore::Editor::createFragmentAndAddResources):
1220         * editing/markup.cpp:
1221         (WebCore::completeURLs):
1222
1223 2015-10-25  Simon Fraser  <simon.fraser@apple.com>
1224
1225         Support bezier paths in clip-path property
1226         https://bugs.webkit.org/show_bug.cgi?id=149996
1227
1228         Reviewed by Darin Adler.
1229         
1230         Support path() in the -webkit-clip-path property, as specified in
1231         https://drafts.csswg.org/css-shapes-2/#supported-basic-shapes
1232         
1233         Added BasicShapePath and CSSBasicShapePath, which both represent the path
1234         as a SVGPathByteStream and wind rule.
1235         
1236         Make BasicShape::canBlend() a virtual function, and implement it on each subclass.
1237         Make various BasicShape subclass function overrides private, other than windRule()
1238         wich is called on derived classes in a few places.
1239         
1240         Add SVGPathBlender::canBlendPaths() which returns true if the given paths can be
1241         interpolated. Uses the same logic as blendAnimatedPath(), without doing any interpolation.
1242         
1243         RenderElement::createsGroup() is fixed to have clip-path trigger a group,
1244         which fixes rendering of clip-path with a descendant compositing layer.
1245
1246         Tests: compositing/masks/clip-path-composited-descendent.html
1247                css3/masking/clip-path-with-path.html
1248                transitions/clip-path-path-transitions.html
1249
1250         * css/BasicShapeFunctions.cpp:
1251         (WebCore::valueForBasicShape):
1252         (WebCore::basicShapeForValue):
1253         * css/CSSBasicShapes.cpp:
1254         (WebCore::CSSBasicShapePath::CSSBasicShapePath):
1255         (WebCore::CSSBasicShapePath::pathData):
1256         (WebCore::buildPathString):
1257         (WebCore::CSSBasicShapePath::cssText):
1258         (WebCore::CSSBasicShapePath::equals):
1259         * css/CSSBasicShapes.h:
1260         * css/CSSParser.cpp:
1261         (WebCore::CSSParser::parseBasicShapePath):
1262         (WebCore::CSSParser::parseBasicShape):
1263         * css/CSSParser.h:
1264         * rendering/RenderElement.h:
1265         (WebCore::RenderElement::createsGroup):
1266         * rendering/style/BasicShapes.cpp:
1267         (WebCore::BasicShapeCircle::canBlend):
1268         (WebCore::BasicShapeEllipse::canBlend):
1269         (WebCore::BasicShapePolygon::canBlend):
1270         (WebCore::BasicShapePath::BasicShapePath):
1271         (WebCore::BasicShapePath::path):
1272         (WebCore::BasicShapePath::operator==):
1273         (WebCore::BasicShapePath::canBlend):
1274         (WebCore::BasicShapePath::blend):
1275         (WebCore::BasicShapeInset::canBlend):
1276         (WebCore::BasicShape::canBlend): Deleted.
1277         * rendering/style/BasicShapes.h:
1278         * svg/SVGPathBlender.cpp:
1279         (WebCore::SVGPathBlender::addAnimatedPath):
1280         (WebCore::SVGPathBlender::blendAnimatedPath):
1281         (WebCore::SVGPathBlender::canBlendPaths):
1282         (WebCore::SVGPathBlender::SVGPathBlender):
1283         (WebCore::SVGPathBlender::blendMoveToSegment):
1284         (WebCore::SVGPathBlender::blendLineToSegment):
1285         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
1286         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
1287         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
1288         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
1289         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
1290         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
1291         (WebCore::SVGPathBlender::blendArcToSegment):
1292         * svg/SVGPathBlender.h:
1293         * svg/SVGPathByteStream.h:
1294         (WebCore::SVGPathByteStream::operator==):
1295         * svg/SVGPathUtilities.cpp:
1296         (WebCore::canBlendSVGPathByteStreams):
1297         * svg/SVGPathUtilities.h:
1298
1299 2015-10-25  Gwang Yoon Hwang  <yoon@igalia.com>
1300
1301         [TexMap] Fix a misused flag for GstGL
1302         https://bugs.webkit.org/show_bug.cgi?id=150545
1303
1304         Reviewed by Žan Doberšek.
1305
1306         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1307         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
1308         We should pass TextureMapperGL::Flags to the TextureMapperGL::drawTexture instead of
1309         BitmapTexture::Flags.
1310
1311 2015-10-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1312
1313         Use ImplementedAs for MediaDevices.getUserMediaFromJS
1314         https://bugs.webkit.org/show_bug.cgi?id=150439
1315
1316         Reviewed by Darin Adler.
1317
1318         No change in behavior.
1319
1320         * Modules/mediastream/MediaDevices.h: Removing getUserMediaFromJS C++ function.
1321         * Modules/mediastream/MediaDevices.idl: Marking getUserMediaFromJS as ImplementedAS=getUserMedia
1322
1323 2015-10-24  Gwang Yoon Hwang  <yoon@igalia.com>
1324
1325         Remove setApplyDeviceScaleFactorInCompositor
1326         https://bugs.webkit.org/show_bug.cgi?id=150538
1327
1328         Reviewed by Tim Horton.
1329
1330         It was used to support the device scale factor for chromium port and blackberry
1331         port. But it was removed quite a while ago.
1332
1333         * page/Settings.in:
1334         applyDeviceScaleFactorInCompositor: Deleted
1335         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1336         (WebCore::CompositingCoordinator::CompositingCoordinator): Remove uses
1337         of applyDeviceScaleFactorInCompositor.
1338
1339 2015-10-24  Tim Horton  <timothy_horton@apple.com>
1340
1341         Expose more information about the exception in WKErrorJavaScriptExceptionOccurred errors
1342         https://bugs.webkit.org/show_bug.cgi?id=150525
1343
1344         Reviewed by Darin Adler.
1345
1346         Adjusted API test to cover this: WKWebView.EvaluateJavaScriptErrorCases.
1347
1348         * bindings/js/JSDOMBinding.cpp:
1349         (WebCore::reportException):
1350         * bindings/js/JSDOMBinding.h:
1351         Fill in the given struct with computed exception data if it was given.
1352
1353         * bindings/js/ScriptController.cpp:
1354         (WebCore::ScriptController::evaluateInWorld):
1355         (WebCore::ScriptController::evaluate):
1356         (WebCore::ScriptController::executeScript):
1357         * bindings/js/ScriptController.h:
1358         Plumb aforementioned struct through ScriptController.
1359
1360 2015-10-24  Gwang Yoon Hwang  <yoon@igalia.com>
1361
1362         [TexMap] Clean up BitmapTexture and BitmapTextureGL.
1363         https://bugs.webkit.org/show_bug.cgi?id=143298
1364
1365         Reviewed by Žan Doberšek.
1366
1367         No new tests, this is just a refactor.
1368
1369         * platform/graphics/texmap/BitmapTexture.h:
1370         (WebCore::BitmapTexture::canReuseWith): Deleted.
1371         Reuseability of a BitmapTexture is only decided by its size.
1372         We can use size() instead of this method.
1373
1374         * platform/graphics/texmap/BitmapTextureGL.h:
1375         (WebCore::driverSupportsExternalTextureBGRA): Deleted.
1376         We do not have to check a suitable texture format in every
1377         update/reset. It is enough to store the formats in construction time
1378         and reuse them.
1379
1380 2015-10-24  Simon Fraser  <simon.fraser@apple.com>
1381
1382         REGRESSION (r187121): Delayed instantaneous animations not honouring ' forwards' fill-mode
1383         https://bugs.webkit.org/show_bug.cgi?id=150326
1384
1385         Reviewed by Darin Adler.
1386         
1387         With a zero-duration, delayed fill-forwards animation, we'd end up trying
1388         to interpolate between the last and first keyframes, and picking the first
1389         because AnimationBase::progress() had a special case for zero duration. Removing
1390         this check fixes the bug.
1391
1392         Test: animations/fill-mode-forwards-zero-duration.html
1393
1394         * page/animation/AnimationBase.cpp:
1395         (WebCore::AnimationBase::progress):
1396
1397 2015-10-23  Chris Dumez  <cdumez@apple.com>
1398
1399         RadioNodeList should be exposed on Window
1400         https://bugs.webkit.org/show_bug.cgi?id=148869
1401         <rdar://problem/22589828>
1402
1403         Reviewed by Ryosuke Niwa.
1404
1405         RadioNodeList should be exposed on on the global Window object, as per
1406         the HTML specification:
1407         https://html.spec.whatwg.org/multipage/infrastructure.html#radionodelist
1408
1409         This patch addresses the issue, and aligns our behavior with Firefox
1410         and Chrome.
1411
1412         No new tests, already covered by existing tests.
1413
1414         * html/RadioNodeList.idl:
1415
1416 2015-10-23  Joseph Pecoraro  <pecoraro@apple.com>
1417
1418         Web Inspector: Remove unused ScrollLayer Timeline EventType
1419         https://bugs.webkit.org/show_bug.cgi?id=150518
1420
1421         Reviewed by Timothy Hatcher.
1422
1423         * inspector/InspectorInstrumentation.cpp:
1424         (WebCore::InspectorInstrumentation::willScrollLayerImpl): Deleted.
1425         (WebCore::InspectorInstrumentation::didScrollLayerImpl): Deleted.
1426         * inspector/InspectorInstrumentation.h:
1427         (WebCore::InspectorInstrumentation::willScrollLayer): Deleted.
1428         (WebCore::InspectorInstrumentation::didScrollLayer): Deleted.
1429         * inspector/InspectorTimelineAgent.cpp:
1430         (WebCore::InspectorTimelineAgent::willScroll): Deleted.
1431         (WebCore::InspectorTimelineAgent::didScroll): Deleted.
1432         * inspector/InspectorTimelineAgent.h:
1433         * rendering/RenderLayer.cpp:
1434         (WebCore::RenderLayer::scrollTo): Deleted.
1435
1436 2015-10-23  Joseph Pecoraro  <pecoraro@apple.com>
1437
1438         Web Inspector: Clean up InspectorInstrumentation includes
1439         https://bugs.webkit.org/show_bug.cgi?id=150523
1440
1441         Reviewed by Timothy Hatcher.
1442
1443         * Modules/webdatabase/DatabaseManager.cpp:
1444         * WebCore.vcxproj/WebCore.vcxproj:
1445         * WebCore.vcxproj/WebCore.vcxproj.filters:
1446         * WebCore.xcodeproj/project.pbxproj:
1447         * css/MediaQueryEvaluator.cpp:
1448         * dom/EventDispatcher.cpp:
1449         * dom/ExtensionStyleSheets.cpp:
1450         * inspector/InspectorController.h:
1451         * inspector/InspectorDOMDebuggerAgent.cpp:
1452         * inspector/InspectorDatabaseInstrumentation.h: Removed.
1453         * inspector/InspectorInstrumentation.h:
1454         (WebCore::InspectorInstrumentation::didOpenDatabase):
1455         * inspector/InspectorPageAgent.cpp:
1456         * inspector/InspectorTimelineAgent.cpp:
1457         (WebCore::toProtocol): Deleted.
1458         * loader/ResourceLoadScheduler.cpp:
1459         * loader/mac/ResourceLoaderMac.mm:
1460         * page/Screen.cpp:
1461         * rendering/TextAutosizer.cpp:
1462         * testing/Internals.cpp:
1463         (WebCore::Internals::consoleMessageArgumentCounts): Deleted.
1464         * testing/Internals.h:
1465         * testing/Internals.idl:
1466         * workers/AbstractWorker.cpp:
1467
1468 2015-10-23  Simon Fraser  <simon.fraser@apple.com>
1469
1470         Avoid SVG-induced layouts inside Element::absoluteEventBounds()
1471         https://bugs.webkit.org/show_bug.cgi?id=150516
1472
1473         Reviewed by Zalan Bujtas.
1474
1475         Speculative fix for a crash under RenderObject::localToContainerQuad() when
1476         computing the wheel event handler region, which uses Element::absoluteEventHandlerBounds().
1477         Element::absoluteEventBounds() was calling SVGElement::getBoundingBox() in a way
1478         that could trigger a layout.
1479
1480         * dom/Element.cpp:
1481         (WebCore::Element::absoluteEventBounds):
1482
1483 2015-10-23  Alex Christensen  <achristensen@webkit.org>
1484
1485         Progress towards CMake on Mac
1486         https://bugs.webkit.org/show_bug.cgi?id=150517
1487
1488         Reviewed by Tim Horton.
1489
1490         * PlatformMac.cmake:
1491
1492 2015-10-23  Per Arne Vollan  <peavo@outlook.com>
1493
1494         [WinCairo] Improve test results for fast layouttests.
1495         https://bugs.webkit.org/show_bug.cgi?id=150464
1496
1497         Reviewed by Alex Christensen.
1498
1499         Disable the Mac ascent hack for WinCairo.
1500
1501         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1502         (WebCore::Font::platformInit):
1503
1504 2015-10-23  Simon Fraser  <simon.fraser@apple.com>
1505
1506         REGRESSION (r187121): Multiple-keyframe animations not honouring ' forwards' fill-mode
1507         https://bugs.webkit.org/show_bug.cgi?id=150328
1508
1509         Reviewed by Dean Jackson.
1510         
1511         AnimationBase::getElapsedTime() for a finished animation would return 1 (a progress),
1512         rather than a time value as the caller expects. Fix it to return the total duration
1513         if the animation has finished. This fixes the bug.
1514         
1515         Change CompositeAnimation::pauseAnimationAtTime() to be more permissive, allowing
1516         testing of filling-forwards animations with the pause API.
1517
1518         Test: animations/fill-forwards-end-state.html
1519
1520         * page/animation/AnimationBase.cpp:
1521         (WebCore::AnimationBase::getElapsedTime):
1522         * page/animation/CompositeAnimation.cpp:
1523         (WebCore::CompositeAnimation::pauseAnimationAtTime):
1524
1525 2015-10-23  Chris Dumez  <cdumez@apple.com>
1526
1527         A label element not in a document should not label an element in a document
1528         https://bugs.webkit.org/show_bug.cgi?id=148863
1529         <rdar://problem/22589300>
1530
1531         Reviewed by Ryosuke Niwa.
1532
1533         As per the HTML specification, a label element's 'for' attribute may be
1534         specified to indicate a form control with which the caption is to be
1535         associated. If the attribute is specified, the attribute's value must
1536         be the ID of a labelable element in the same Document as the label
1537         element:
1538         https://html.spec.whatwg.org/multipage/forms.html#attr-label-for
1539
1540         However, our code was failing to check if the label element was actually
1541         in the document before calling document.getElementById(). In such case,
1542         we would potentially return a labelable Element that is not in the same
1543         document as the label Element. This patch fixes the problem.
1544
1545         The new behavior is consistent with Firefox.
1546
1547         No new tests, already covered by existing test.
1548
1549         * html/HTMLLabelElement.cpp:
1550         (WebCore::HTMLLabelElement::control):
1551
1552 2015-10-23  Antoine Quint  <graouts@apple.com>
1553
1554         Support for SVG `beginEvent` event and `onbegin` attribute
1555         https://bugs.webkit.org/show_bug.cgi?id=150442
1556
1557         Reviewed by Dean Jackson.
1558
1559         Add support for the SVG `beginEvent` event, which is fired as an SVG timing element enters its active interval.
1560         Also add support for the SVG `onbegin` attribute which allows the definition of a JS event listener declaratively
1561         for the SVG `beginEvent` event.
1562
1563         Tests: svg/animations/begin-event-attribute.svg
1564                svg/animations/begin-event-script.svg
1565                svg/animations/begin-event-syncbase.svg
1566
1567         * dom/EventNames.h:
1568         * svg/animation/SVGSMILElement.cpp:
1569         (WebCore::smilBeginEventSender):
1570         (WebCore::smilEndEventSender):
1571         (WebCore::SVGSMILElement::~SVGSMILElement):
1572         (WebCore::SVGSMILElement::parseAttribute):
1573         (WebCore::SVGSMILElement::progress):
1574         (WebCore::SVGSMILElement::dispatchPendingEvent):
1575         * svg/svgattrs.in:
1576
1577 2015-10-23  Hyemi Shin  <hyemi.sin@samsung.com>
1578
1579         ConvolverNode.buffer must have same sample-rate as the AudioContext 
1580         https://bugs.webkit.org/show_bug.cgi?id=150385 
1581
1582         Reviewed by Chris Dumez.
1583
1584         ConvolverNode.buffer must be of the same sample-rate as the AudioContext
1585         or an NOT_SUPPORTED_ERR exception MUST be thrown.
1586
1587         Test : webaudio/convolver-setBuffer-different-samplerate.html
1588
1589         * Modules/webaudio/ConvolverNode.cpp:
1590         (WebCore::ConvolverNode::setBuffer):
1591         * Modules/webaudio/ConvolverNode.h:
1592         * Modules/webaudio/ConvolverNode.idl:
1593
1594 2015-10-22  Myles C. Maxfield  <mmaxfield@apple.com>
1595
1596         [OS X] Migrate GraphicsContext::drawLineForDocumentMarker() away from LocalCurrentGraphicsContext
1597         https://bugs.webkit.org/show_bug.cgi?id=150483
1598
1599         Reviewed by Simon Fraser.
1600
1601         LocalCurrentGraphicsContext is an ugly hack to work around the problem that many NS* functions
1602         operate on the current context rather than a context passed as an argument. This patch
1603         migrates from NSRectFillUsingOperation() which has this behavior to CGContextDrawTiledImage()
1604         which performs the same operation but with a passed-in CGContextRef. An added benefit is that
1605         we don't have to mess around with pattern-based NSColors. 
1606
1607         No new tests because there is no behavior change.
1608
1609         * platform/graphics/mac/GraphicsContextMac.mm:
1610         (WebCore::findImage):
1611         (WebCore::GraphicsContext::updateDocumentMarkerResources):
1612         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1613         (WebCore::makePatternColor): Deleted.
1614
1615 2015-10-22  Sam Weinig  <sam@webkit.org>
1616
1617         Navigations on the same host (but with different schemes and ports) should not trigger universal links
1618         <rdar://problem/22811325>
1619         https://bugs.webkit.org/show_bug.cgi?id=150481
1620
1621         Reviewed by Dan Bernstein.
1622
1623         Add new helper which efficiently compares the hosts of two URLs.
1624
1625         * platform/URL.cpp:
1626         (WebCore::hostsAreEqual):
1627         * platform/URL.h:
1628
1629 2015-10-22  Joseph Pecoraro  <pecoraro@apple.com>
1630
1631         Web Inspector: Remove unused Timeline GCEvent Record type
1632         https://bugs.webkit.org/show_bug.cgi?id=150477
1633
1634         Reviewed by Timothy Hatcher.
1635
1636         This event is dispatched through the Heap domain, not Timelines.
1637
1638         * inspector/TimelineRecordFactory.cpp:
1639         (WebCore::TimelineRecordFactory::createGCEventData): Deleted.
1640         * inspector/TimelineRecordFactory.h:
1641
1642 2015-10-22  Gordon Sheridan  <gordon_sheridan@apple.com>
1643
1644         Fix build for clang-700.0.59.5 by replacing deprecated calls to convert points between screen and window coordinates for Mac.
1645         https://bugs.webkit.org/show_bug.cgi?id=150379
1646
1647         Reviewed by Andy Estes.
1648
1649         Provide WAKWindow versions of the non-deprecated methods for converting an NSRect between
1650         window and screen coordinates, which replace the deprecated methods that operated on an NSPoint.
1651
1652         * platform/ios/wak/WAKWindow.h:
1653         * platform/ios/wak/WAKWindow.mm:
1654         (-[WAKWindow convertRectToScreen:]): Added.
1655         (-[WAKWindow convertRectFromScreen:]): Added.
1656
1657 2015-10-22  Alex Christensen  <achristensen@webkit.org>
1658
1659         Fix Mac CMake build after r191433.
1660
1661         * PlatformMac.cmake:
1662         Use CMakeLists.txt to generate UserAgentScripts.h and cpp.
1663
1664 2015-10-22  Daniel Bates  <dabates@apple.com>
1665
1666         Unreviewed, rolling out r191113.
1667
1668         Rollout r144451 since it regressed the visibility of the
1669         search cancel button when a search field is empty or showing
1670         placeholder text. Further investigation is needed.
1671
1672         Reverted changeset:
1673
1674         "[iOS] DOM click event may not be dispatched when page has
1675         :active style and <input type="search">"
1676         https://bugs.webkit.org/show_bug.cgi?id=144451
1677         http://trac.webkit.org/changeset/191113
1678
1679 2015-10-22  Simon Fraser  <simon.fraser@apple.com>
1680
1681         Add ways to log to log channels via a functional syntax, and via a TextStream
1682         https://bugs.webkit.org/show_bug.cgi?id=150472
1683  
1684         Reviewed by Tim Horton.
1685  
1686         Make it possible to write to a WTFLogChannel with a std::function that returns
1687         a const char*, and with stream syntax.
1688  
1689         Enhance TextStream to allow it to generate single-line output.
1690
1691         * platform/Logging.cpp:
1692         (WebCore::logFunctionResult):
1693         * platform/Logging.h:
1694         * platform/text/TextStream.cpp:
1695         (WebCore::TextStream::startGroup):
1696         (WebCore::TextStream::endGroup):
1697         (WebCore::TextStream::nextLine):
1698         (WebCore::TextStream::writeIndent):
1699         * platform/text/TextStream.h:
1700         (WebCore::TextStream::TextStream):
1701
1702 2015-10-22  Alex Christensen  <achristensen@webkit.org>
1703
1704         Progress towards CMake on Mac
1705         https://bugs.webkit.org/show_bug.cgi?id=150466
1706
1707         Reviewed by Chris Dumez.
1708
1709         * PlatformMac.cmake:
1710         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
1711         (WebCore::createAndStoreMasterKey):
1712         * page/mac/WheelEventDeltaFilterMac.mm:
1713         * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
1714
1715 2015-10-22  Myles C. Maxfield  <mmaxfield@apple.com>
1716
1717         [Cocoa] Migrate WKSetPatternPhaseInUserSpace() and WKGetUserToBaseCTM() from WKSI
1718         https://bugs.webkit.org/show_bug.cgi?id=150460
1719
1720         Reviewed by Tim Horton.
1721
1722         No reason to use WKSI for these calls.
1723
1724         No new tests because there is no behavior change.
1725
1726         * platform/graphics/cg/GraphicsContextCG.cpp:
1727         (WebCore::GraphicsContext::applyStrokePattern):
1728         (WebCore::GraphicsContext::applyFillPattern):
1729         (WebCore::GraphicsContext::setPlatformShadow):
1730         * platform/graphics/cg/GraphicsContextCG.h:
1731         (WebCore::getUserToBaseCTM):
1732         * platform/graphics/cg/ImageBufferCG.cpp:
1733         (WebCore::ImageBuffer::putByteArray):
1734         * platform/graphics/mac/GraphicsContextMac.mm:
1735         (WebCore::setPatternPhaseInUserSpace):
1736         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1737         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1738         * platform/mac/WebCoreSystemInterface.h:
1739         * platform/mac/WebCoreSystemInterface.mm:
1740
1741 2015-10-22  Brady Eidson  <beidson@apple.com>
1742
1743         Modern IDB: Basic createObjectStore implementation.
1744         https://bugs.webkit.org/show_bug.cgi?id=150455
1745
1746         Reviewed by Alex Christensen.
1747
1748         Tests: storage/indexeddb/modern/createobjectstore-basic.html
1749                storage/indexeddb/modern/createobjectstore-failures.html
1750
1751         * CMakeLists.txt:
1752         * WebCore.xcodeproj/project.pbxproj:
1753
1754         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1755         (WebCore::IDBClient::IDBConnectionToServer::createObjectStore):
1756         (WebCore::IDBClient::IDBConnectionToServer::didCreateObjectStore):
1757         * Modules/indexeddb/client/IDBConnectionToServer.h:
1758         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1759         
1760         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1761         (WebCore::IDBClient::IDBDatabase::objectStoreNames):
1762         (WebCore::IDBClient::IDBDatabase::createObjectStore):
1763         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
1764         * Modules/indexeddb/client/IDBDatabaseImpl.h:
1765         (WebCore::IDBClient::IDBDatabase::serverConnection):
1766         
1767         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp: Added.
1768         (WebCore::IDBClient::IDBObjectStore::create):
1769         (WebCore::IDBClient::IDBObjectStore::IDBObjectStore):
1770         (WebCore::IDBClient::IDBObjectStore::~IDBObjectStore):
1771         (WebCore::IDBClient::IDBObjectStore::id):
1772         (WebCore::IDBClient::IDBObjectStore::name):
1773         (WebCore::IDBClient::IDBObjectStore::keyPathAny):
1774         (WebCore::IDBClient::IDBObjectStore::keyPath):
1775         (WebCore::IDBClient::IDBObjectStore::indexNames):
1776         (WebCore::IDBClient::IDBObjectStore::transaction):
1777         (WebCore::IDBClient::IDBObjectStore::autoIncrement):
1778         (WebCore::IDBClient::IDBObjectStore::add):
1779         (WebCore::IDBClient::IDBObjectStore::put):
1780         (WebCore::IDBClient::IDBObjectStore::openCursor):
1781         (WebCore::IDBClient::IDBObjectStore::get):
1782         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
1783         (WebCore::IDBClient::IDBObjectStore::clear):
1784         (WebCore::IDBClient::IDBObjectStore::createIndex):
1785         (WebCore::IDBClient::IDBObjectStore::index):
1786         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
1787         (WebCore::IDBClient::IDBObjectStore::count):
1788         * Modules/indexeddb/client/IDBObjectStoreImpl.h: Added.
1789
1790         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
1791         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
1792
1793         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1794         (WebCore::IDBClient::IDBTransaction::serverConnection):
1795         (WebCore::IDBClient::IDBTransaction::objectStore):
1796         (WebCore::IDBClient::IDBTransaction::scheduleOperation):
1797         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
1798         (WebCore::IDBClient::IDBTransaction::finishAbortOrCommit):
1799         (WebCore::IDBClient::IDBTransaction::didAbort):
1800         (WebCore::IDBClient::IDBTransaction::didCommit):
1801         (WebCore::IDBClient::IDBTransaction::createObjectStore):
1802         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer):
1803         (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer):
1804         * Modules/indexeddb/client/IDBTransactionImpl.h:
1805         (WebCore::IDBClient::IDBTransaction::originalDatabaseInfo):
1806         (WebCore::IDBClient::IDBTransaction::isVersionChange):
1807         
1808         * Modules/indexeddb/client/TransactionOperation.h: Added.
1809         (WebCore::IDBClient::TransactionOperation::perform):
1810         (WebCore::IDBClient::TransactionOperation::completed):
1811         (WebCore::IDBClient::TransactionOperation::identifier):
1812         (WebCore::IDBClient::TransactionOperation::transactionIdentifier):
1813         (WebCore::IDBClient::TransactionOperation::TransactionOperation):
1814         (WebCore::IDBClient::createTransactionOperation):
1815         
1816         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1817         (WebCore::IDBServer::IDBConnectionToClient::didCreateObjectStore):
1818         * Modules/indexeddb/server/IDBConnectionToClient.h:
1819         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1820         
1821         * Modules/indexeddb/server/IDBServer.cpp:
1822         (WebCore::IDBServer::IDBServer::createObjectStore):
1823         * Modules/indexeddb/server/IDBServer.h:
1824         
1825         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1826         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
1827         (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
1828         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateObjectStore):
1829         (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction):
1830         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
1831         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction): Deleted.
1832         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1833         
1834         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
1835         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateObjectStore):
1836         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
1837         
1838         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1839         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::isVersionChange):
1840         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createObjectStore):
1841         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1842         
1843         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
1844         (WebCore::IDBDatabaseInfo::hasObjectStore):
1845         (WebCore::IDBDatabaseInfo::createNewObjectStore):
1846         (WebCore::IDBDatabaseInfo::addExistingObjectStore):
1847         (WebCore::IDBDatabaseInfo::objectStoreNames):
1848         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
1849         
1850         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp: Copied from Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp.
1851         (WebCore::IDBObjectStoreInfo::IDBObjectStoreInfo):
1852         (WebCore::IDBObjectStoreInfo::isolatedCopy):
1853         * Modules/indexeddb/shared/IDBObjectStoreInfo.h: Copied from Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h.
1854         (WebCore::IDBObjectStoreInfo::identifier):
1855         (WebCore::IDBObjectStoreInfo::name):
1856         (WebCore::IDBObjectStoreInfo::keyPath):
1857         (WebCore::IDBObjectStoreInfo::autoIncrement):
1858
1859         * Modules/indexeddb/shared/IDBRequestData.cpp:
1860         (WebCore::IDBRequestData::IDBRequestData):
1861         (WebCore::IDBRequestData::requestIdentifier):
1862         (WebCore::IDBRequestData::transactionIdentifier):
1863         * Modules/indexeddb/shared/IDBRequestData.h:
1864         (WebCore::IDBRequestData::databaseIdentifier):
1865         (WebCore::IDBRequestData::requestIdentifier): Deleted.
1866
1867         * Modules/indexeddb/shared/IDBResultData.cpp:
1868         (WebCore::IDBResultData::IDBResultData):
1869         (WebCore::IDBResultData::createObjectStoreSuccess):
1870         * Modules/indexeddb/shared/IDBResultData.h:
1871
1872         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1873         (WebCore::InProcessIDBServer::didCreateObjectStore):
1874         (WebCore::InProcessIDBServer::createObjectStore):
1875         * Modules/indexeddb/shared/InProcessIDBServer.h:
1876
1877         * platform/CrossThreadCopier.cpp:
1878         (WebCore::IDBObjectStoreInfo>::copy):
1879         * platform/CrossThreadCopier.h:
1880
1881 2015-10-22  Alex Christensen  <achristensen@webkit.org>
1882
1883         Initial NSURLSession WebResourceLoader implementation
1884         https://bugs.webkit.org/show_bug.cgi?id=150355
1885
1886         Reviewed by Antti Koivisto.
1887
1888         * platform/network/cf/AuthenticationChallenge.h:
1889         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Export constructor for use in WebKit2.
1890
1891 2015-10-22  Frederic Wang  <fred.wang@free.fr>
1892
1893         [Mac] Add support for the USE_TYPO_METRICS flag
1894         https://bugs.webkit.org/show_bug.cgi?id=150394
1895
1896         Reviewed by Myles C. Maxfield.
1897
1898         Make the Cocoa backend use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
1899
1900         No new tests because this is already tested by fonts/use-typo-metrics-1.html
1901
1902         * platform/graphics/cocoa/FontCocoa.mm:
1903         (WebCore::fontHasMathTable): Add a function to verify whether a font has a MATH table.
1904         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that is the case.
1905
1906 2015-10-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1907
1908         Implement touch-action: manipulation; for iOS
1909         https://bugs.webkit.org/show_bug.cgi?id=149854
1910         <rdar://problem/23017145>
1911
1912         Reviewed by Benjamin Poulain.
1913
1914         Implements the manipulation value for the CSS property touch-action. Adds support for
1915         parsing the touch-action property and two of its values: auto and manipulation.
1916
1917         Tests: css3/touch-action/touch-action-computed-style.html
1918                css3/touch-action/touch-action-manipulation-fast-clicks.html
1919                css3/touch-action/touch-action-parsing.html
1920
1921         * css/CSSComputedStyleDeclaration.cpp:
1922         (WebCore::ComputedStyleExtractor::propertyValue):
1923         * css/CSSParser.cpp:
1924         (WebCore::isValidKeywordPropertyAndValue):
1925         (WebCore::isKeywordPropertyID):
1926         (WebCore::CSSParser::parseValue):
1927         * css/CSSPrimitiveValueMappings.h:
1928         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1929         (WebCore::CSSPrimitiveValue::operator TouchAction):
1930         * css/CSSPropertyNames.in:
1931         * css/CSSValueKeywords.in:
1932         * dom/Element.cpp:
1933         (WebCore::Element::allowsDoubleTapGesture): Here, we determine whether an element that resulted from
1934             hit-testing a touch should allow double-tap gestures. To do this, we walk up the element's parents,
1935             stopping when we detect an element that disallows double tap gestures by having a touch-action other
1936             than auto or by hitting the root node.
1937         * dom/Element.h:
1938         * dom/Node.h:
1939         (WebCore::Node::allowsDoubleTapGesture):
1940         * rendering/style/RenderStyle.h:
1941         * rendering/style/RenderStyleConstants.h:
1942         * rendering/style/StyleRareNonInheritedData.cpp:
1943         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1944         (WebCore::StyleRareNonInheritedData::operator==):
1945         * rendering/style/StyleRareNonInheritedData.h:
1946
1947 2015-10-22  Ryosuke Niwa  <rniwa@webkit.org>
1948
1949         REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
1950         https://bugs.webkit.org/show_bug.cgi?id=150428
1951
1952         Reviewed by Antti Koivisto.
1953
1954         The bug was caused by updateFocusAppearance in WebPage::restoreSelectionInFocusedEditableElement
1955         revealing the focused element which was added in r181972. Fixed the bug by adding an option to
1956         suppress this behavior here.
1957
1958         * dom/Document.cpp:
1959         (WebCore::Document::Document):
1960         (WebCore::Document::updateFocusAppearanceSoon):
1961         * dom/Document.h:
1962         * dom/Element.cpp:
1963         (WebCore::Element::focus):
1964         (WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
1965         (WebCore::Element::updateFocusAppearance):
1966         * dom/Element.h:
1967         * history/CachedPage.cpp:
1968         (WebCore::CachedPage::restore):
1969         * html/HTMLAreaElement.cpp:
1970         (WebCore::HTMLAreaElement::updateFocusAppearance):
1971         * html/HTMLAreaElement.h:
1972         * html/HTMLInputElement.cpp:
1973         (WebCore::HTMLInputElement::updateFocusAppearance):
1974         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
1975         (WebCore::HTMLInputElement::didAttachRenderers):
1976         * html/HTMLInputElement.h:
1977         * html/HTMLTextAreaElement.cpp:
1978         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
1979         * html/HTMLTextAreaElement.h:
1980
1981 2015-10-22  Joonghun Park  <jh718.park@samsung.com>
1982
1983         [EFL] Fix build break since r191439
1984         https://bugs.webkit.org/show_bug.cgi?id=150441
1985
1986         Reviewed by Csaba Osztrogonác.
1987
1988         No new tests, no new behaviours.
1989
1990         * platform/Logging.cpp:
1991         (WebCore::registerNotifyCallback):
1992
1993 2015-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1994
1995         Unreviewed. Fix GTK+ build after r191423.
1996
1997         Deprecate removed class WebKitDOMHTMLBaseFontElement.
1998
1999         * PlatformGTK.cmake:
2000         * bindings/gobject/WebKitDOMDeprecated.cpp:
2001         (webkit_dom_html_base_font_element_init):
2002         (webkit_dom_html_base_font_element_class_init):
2003         (webkit_dom_html_base_font_element_get_color):
2004         (webkit_dom_html_base_font_element_set_color):
2005         (webkit_dom_html_base_font_element_get_face):
2006         (webkit_dom_html_base_font_element_set_face):
2007         (webkit_dom_html_base_font_element_get_size):
2008         (webkit_dom_html_base_font_element_set_size):
2009         * bindings/gobject/WebKitDOMDeprecated.h:
2010         * bindings/gobject/WebKitDOMDeprecated.symbols:
2011         * bindings/gobject/WebKitDOMHTMLPrivate.cpp:
2012         * html/HTMLBaseFontElement.h:
2013         * html/HTMLBaseFontElement.idl:
2014
2015 2015-10-22  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2016
2017         [Streams API] Add writable stream attributes
2018         https://bugs.webkit.org/show_bug.cgi?id=150389
2019
2020         Reviewed by Darin Adler.
2021
2022         This patch adds the three writable stream attributes, which are closed, ready and state. They are implemented
2023         according to the spec.
2024
2025         Current test set suffices, expectations were adjusted accordingly.
2026
2027         * Modules/streams/WritableStream.js:
2028         (initializeWritableStream): Style fix.
2029         (closed):
2030         (ready):
2031         (state): Implemented according to the spec.
2032         * Modules/streams/WritableStreamInternals.js:
2033         (isWritableStream): Implemented according to the spec.
2034
2035 2015-10-22  Frederic Wang  <fred.wang@free.fr>
2036
2037         Rollout r190440 for the moment. It broke the build.
2038
2039         * platform/graphics/cocoa/FontCocoa.mm:
2040         (WebCore::Font::platformInit): Deleted.
2041
2042 2015-10-22  Frederic Wang  <fred.wang@free.fr>
2043
2044         Unreviewed compilation fix on Mac.
2045
2046         * platform/graphics/cocoa/FontCocoa.mm:
2047         (WebCore::Font::platformInit): Use a pointer for the third argument of CFArrayContainsValue.
2048
2049 2015-10-21  Frederic Wang  <fred.wang@free.fr>
2050
2051         Unreviewed compilation fix on Mac.
2052
2053         * platform/graphics/cocoa/FontCocoa.mm:
2054         (WebCore::Font::platformInit): Add missing font argument.
2055
2056 2015-10-21  Frederic Wang  <fred.wang@free.fr>
2057
2058         [Mac] Add support for the USE_TYPO_METRICS flag
2059         https://bugs.webkit.org/show_bug.cgi?id=150394
2060
2061         Reviewed by Myles C. Maxfield.
2062
2063         Make the Cocoa backend use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
2064
2065         No new tests because this is already tested by fonts/use-typo-metrics-1.html
2066
2067         * platform/graphics/cocoa/FontCocoa.mm:
2068         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that is the case.
2069
2070 2015-10-21  Zalan Bujtas  <zalan@apple.com>
2071
2072         Print out the render tree from command line.
2073         https://bugs.webkit.org/show_bug.cgi?id=150416
2074
2075         Use system-wide notification server (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/notify_register_dispatch.3.html)
2076         to print out the render tree for the live documents.
2077
2078         Usage: notifyutil -p com.apple.WebKit.showRenderTree
2079
2080         Reviewed by Simon Fraser.
2081
2082         No change in functionality.
2083
2084         * platform/Logging.cpp:
2085         (WebCore::registerNotifyCallback):
2086         * platform/Logging.h:
2087         * rendering/RenderObject.cpp:
2088         (WebCore::RenderObject::RenderObject):
2089         (WebCore::printRenderTreeForLiveDocuments):
2090
2091 2015-10-21  Alex Christensen  <achristensen@webkit.org>
2092
2093         Fix CMake clean build after r191423.
2094
2095         * CMakeLists.txt:
2096         HTMLBaseFontElement.idl no longer generates any JavaScript bindings.
2097
2098 2015-10-21  Brian Burg  <bburg@apple.com>
2099
2100         Unreviewed, CMake build fix after r191433.
2101
2102         * CMakeLists.txt: add WritableStreamInternals.js to WebCore_BUILTINS_SOURCES.
2103
2104 2015-10-21  Brian Burg  <bburg@apple.com>
2105
2106         Restructure generate-js-bindings script to be modular and testable
2107         https://bugs.webkit.org/show_bug.cgi?id=149929
2108
2109         Reviewed by Alex Christensen.
2110
2111         * CMakeLists.txt:
2112
2113             Define JavaScriptCore_SCRIPTS_DIR explicitly so the add_custom_command and
2114             shared file lists are identical between JavaScriptCore and WebCore.
2115
2116             The output files additionally depend on all builtin generator script files.
2117
2118         * DerivedSources.make:
2119
2120             Use JavaScriptCore_SCRIPTS_DIR so that the rule for code generation and
2121             shared file lists are identical between JavaScriptCore and WebCore.
2122
2123             The output files additionally depend on all builtin generator script files.
2124
2125         * WebCore.xcodeproj/project.pbxproj:
2126
2127             Define JavaScriptCore_SCRIPTS_DIR before calling DerivedSources.make.
2128             This will eventually be merged with the other similar script paths.
2129
2130         * bindings/js/JSDOMWindowBase.cpp:
2131         (WebCore::JSDOMWindowBase::finishCreation):
2132
2133             Update the generated builtin macro names.
2134
2135         * generate-js-builtins: Removed.
2136
2137 2015-10-21  Alex Christensen  <achristensen@webkit.org>
2138
2139         Recommit r191428.
2140
2141         I don't think it was supposed to be reverted in r191429, and it really does fix the build.
2142
2143         * loader/EmptyClients.h:
2144         (WebCore::EmptyContextMenuClient::~EmptyContextMenuClient):
2145         Remove customizeMenu again.
2146
2147 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2148
2149         [EFL][GTK][WK2] Fix build break since r191402, r191401
2150         https://bugs.webkit.org/show_bug.cgi?id=150432
2151
2152         Unreviewed EFL and GTK build fix.
2153
2154         * loader/EmptyClients.h:
2155
2156 2015-10-21  Alex Christensen  <achristensen@webkit.org>
2157
2158         Build fix after r191422.
2159
2160         * page/ContextMenuClient.h:
2161         (WebCore::ContextMenuClient::~ContextMenuClient):
2162         Completely remove customizeMenu.
2163
2164 2015-10-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2165
2166         Remove unnecessary default quota setting in DatabaseContext::databaseExceededQuota
2167         https://bugs.webkit.org/show_bug.cgi?id=150356
2168
2169         Reviewed by Darin Adler.
2170
2171         All ports have supported DatabaseContext::databaseExceededQuota(). Thus we don't need to
2172         keep a test code to extend database quota anymore.
2173
2174         * Modules/webdatabase/DatabaseContext.cpp:
2175         (WebCore::DatabaseContext::databaseExceededQuota): Deleted.
2176
2177 2015-10-21  Chris Dumez  <cdumez@apple.com>
2178
2179         Un-expose obsolete HTMLBaseFontElement
2180         https://bugs.webkit.org/show_bug.cgi?id=150397
2181
2182         Reviewed by Anders Carlsson.
2183
2184         Un-expose obsolete HTMLBaseFontElement:
2185         - https://html.spec.whatwg.org/multipage/obsolete.html#non-conforming-features
2186
2187         This means that we no longer expose HTMLBaseFontElement on the global
2188         Window object. Firefox and Chrome do not expose it either.
2189
2190         Also, document.createElement("basefont") now returns an HTMLUnknownElement
2191         as per the specification. Firefox and Chrome return a generic HTMLElement
2192         instead but I don't think this is a big compatibility risk.
2193
2194         No new tests, already covered by existing tests.
2195
2196         * html/HTMLBaseFontElement.cpp:
2197         (WebCore::HTMLBaseFontElement::HTMLBaseFontElement):
2198         * html/HTMLBaseFontElement.h:
2199         * html/HTMLBaseFontElement.idl:
2200         * html/HTMLTagNames.in:
2201
2202 2015-10-21  Anders Carlsson  <andersca@apple.com>
2203
2204         Get rid of WebContextMenuClient::customizeMenu, it's no longer used
2205         https://bugs.webkit.org/show_bug.cgi?id=150427
2206
2207         Reviewed by Tim Horton.
2208         * loader/EmptyClients.cpp:
2209         (WebCore::EmptyContextMenuClient::customizeMenu): Deleted.
2210         * loader/EmptyClients.h:
2211         * page/ContextMenuController.cpp:
2212         (WebCore::ContextMenuController::showContextMenu):
2213
2214 2015-10-21  Anders Carlsson  <andersca@apple.com>
2215
2216         Remove dead MHTML code
2217         https://bugs.webkit.org/show_bug.cgi?id=150426
2218
2219         Reviewed by Tim Horton.
2220
2221         * loader/archive/mhtml/MHTMLArchive.cpp:
2222         (WebCore::MHTMLArchive::generateMHTMLData):
2223         (WebCore::MHTMLArchive::generateMHTMLDataUsingBinaryEncoding): Deleted.
2224         * loader/archive/mhtml/MHTMLArchive.h:
2225
2226 2015-10-21  Dean Jackson  <dino@apple.com>
2227
2228         Null dereference loading Blink layout test svg/filters/display-none-filter-primitive.html
2229         https://bugs.webkit.org/show_bug.cgi?id=150212
2230         <rdar://problem/23137376>
2231
2232         Reviewed by Brent Fulgham.
2233
2234         Handle the case where a filter element doesn't have a renderer. Inspired by the Blink
2235         commit:
2236         https://chromium.googlesource.com/chromium/src.git/+/fb79f7fc46552d45127acd2959a23662ad8f271e
2237
2238         Test: svg/filters/display-none-filter-primitive.html
2239
2240         * rendering/svg/RenderSVGResourceFilter.cpp:
2241         (WebCore::RenderSVGResourceFilter::buildPrimitives):
2242         * svg/graphics/filters/SVGFilterBuilder.cpp:
2243         (WebCore::SVGFilterBuilder::appendEffectToEffectReferences):
2244
2245 2015-10-21  Brady Eidson  <beidson@apple.com>
2246
2247         Modern IDB: Add basic transaction aborting.
2248         https://bugs.webkit.org/show_bug.cgi?id=150148
2249
2250         Reviewed by Alex Christensen.
2251
2252         Tests: storage/indexeddb/modern/double-abort.html
2253                storage/indexeddb/modern/versionchange-abort-then-reopen.html
2254
2255         * CMakeLists.txt:
2256         * WebCore.xcodeproj/project.pbxproj:
2257         
2258         * Modules/indexeddb/IndexedDB.h:
2259         
2260         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2261         (WebCore::IDBClient::IDBConnectionToServer::abortTransaction):
2262         (WebCore::IDBClient::IDBConnectionToServer::didAbortTransaction):
2263         * Modules/indexeddb/client/IDBConnectionToServer.h:
2264         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2265         
2266         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2267         (WebCore::IDBClient::IDBDatabase::abortTransaction):
2268         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
2269         * Modules/indexeddb/client/IDBDatabaseImpl.h:
2270         
2271         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2272         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
2273         (WebCore::IDBClient::IDBTransaction::abort):
2274         (WebCore::IDBClient::IDBTransaction::isFinishedOrFinishing):
2275         (WebCore::IDBClient::IDBTransaction::activationTimerFired):
2276         (WebCore::IDBClient::IDBTransaction::didAbort):
2277         * Modules/indexeddb/client/IDBTransactionImpl.h:
2278         
2279         * Modules/indexeddb/server/IDBBackingStore.h:
2280         
2281         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2282         (WebCore::IDBServer::IDBConnectionToClient::didAbortTransaction):
2283         * Modules/indexeddb/server/IDBConnectionToClient.h:
2284         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2285         
2286         * Modules/indexeddb/server/IDBServer.cpp:
2287         (WebCore::IDBServer::IDBServer::abortTransaction):
2288         * Modules/indexeddb/server/IDBServer.h:
2289         
2290         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2291         (WebCore::IDBServer::MemoryBackingStoreTransaction::create):
2292         (WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction):
2293         (WebCore::IDBServer::MemoryBackingStoreTransaction::~MemoryBackingStoreTransaction):
2294         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
2295         (WebCore::IDBServer::MemoryBackingStoreTransaction::commit):
2296         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
2297         (WebCore::IDBServer::MemoryBackingStoreTransaction::isVersionChange):
2298         
2299         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2300         (WebCore::IDBServer::MemoryIDBBackingStore::setDatabaseInfo):
2301         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
2302         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
2303         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
2304         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2305
2306         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2307         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
2308         (WebCore::IDBServer::UniqueIDBDatabase::beginTransactionInBackingStore):
2309         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
2310         (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
2311         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
2312         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
2313         (WebCore::IDBServer::UniqueIDBDatabase::performAbortTransaction):
2314         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
2315         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2316         
2317         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2318         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
2319         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
2320         
2321         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2322         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
2323         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::originalDatabaseInfo):
2324         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
2325         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2326         
2327         * Modules/indexeddb/shared/IDBError.cpp:
2328         (WebCore::idbErrorName):
2329         (WebCore::idbErrorDescription):
2330         * Modules/indexeddb/shared/IDBError.h:
2331
2332         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2333         (WebCore::InProcessIDBServer::didAbortTransaction):
2334         (WebCore::InProcessIDBServer::abortTransaction):
2335         * Modules/indexeddb/shared/InProcessIDBServer.h:
2336
2337 2015-10-21  Chris Dumez  <cdumez@apple.com>
2338
2339         bgsound should use HTMLUnknownElement interface
2340         https://bugs.webkit.org/show_bug.cgi?id=148857
2341         <rdar://problem/22589036>
2342
2343         Reviewed by Sam Weinig.
2344
2345         The blink, bgsound, isindex, multicol, nextid, and spacer elements must
2346         use the HTMLUnknownElement interface, as per the HTML specification:
2347         https://html.spec.whatwg.org/multipage/obsolete.html#other-elements,-attributes-and-apis
2348
2349         WebKit was using HTMLUnknownElement for all of them except bgsound.
2350         This patch fixes the issue and aligns our behavior with Chrome and
2351         Firefox.
2352
2353         No new tests, already covered by existing tests.
2354
2355         * html/HTMLTagNames.in:
2356
2357 2015-10-21  Antoine Quint  <graouts@apple.com>
2358
2359         Support for the SVG `onend` attribute
2360         https://bugs.webkit.org/show_bug.cgi?id=150393
2361
2362         Reviewed by Dean Jackson.
2363
2364         Add support for the SVG `onend` attribute to SVG timing and animation elements, which allow the definition
2365         of a JS event listener declaratively for the SVG `endEvent` event.
2366
2367         Tests: svg/animations/end-event-attribute-expected.svg
2368                svg/animations/end-event-attribute.svg
2369                svg/animations/end-event-syncbase-expected.svg
2370                svg/animations/end-event-syncbase.svg
2371
2372         * dom/EventNames.h:
2373         * svg/animation/SVGSMILElement.cpp:
2374         (WebCore::SVGSMILElement::parseAttribute):
2375         * svg/svgattrs.in:
2376
2377 2015-10-21  Nan Wang  <n_wang@apple.com>
2378
2379         AX: Expose table size and cell indexes on iOS
2380         https://bugs.webkit.org/show_bug.cgi?id=150366
2381
2382         Add support to expose table row/column count and cell indexes on iOS.
2383
2384         Reviewed by Chris Fleizach.
2385
2386         Test: accessibility/aria-table-attributes.html
2387
2388         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2389         (-[WebAccessibilityObjectWrapper tableParent]):
2390         (-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]):
2391         (-[WebAccessibilityObjectWrapper accessibilityRowCount]):
2392         (-[WebAccessibilityObjectWrapper accessibilityColumnCount]):
2393         (-[WebAccessibilityObjectWrapper accessibilityARIARowCount]):
2394         (-[WebAccessibilityObjectWrapper accessibilityARIAColumnCount]):
2395         (-[WebAccessibilityObjectWrapper accessibilityARIARowIndex]):
2396         (-[WebAccessibilityObjectWrapper accessibilityARIAColumnIndex]):
2397         (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
2398
2399 2015-10-21  Chris Dumez  <cdumez@apple.com>
2400
2401         HTMLIFrameElement.sandbox should be a DOMSettableTokenList
2402         https://bugs.webkit.org/show_bug.cgi?id=150377
2403
2404         Reviewed by Ryosuke Niwa.
2405
2406         HTMLIFrameElement.sandbox should be a DOMSettableTokenList as per the
2407         HTML specification:
2408         - https://html.spec.whatwg.org/multipage/embedded-content.html#htmliframeelement
2409
2410         Chrome and Firefox match the specification but Safari/WebKit was uding
2411         a DOMString.
2412
2413         Test: fast/frames/sandbox-attribute.html
2414
2415         * html/HTMLIFrameElement.cpp:
2416         (WebCore::HTMLIFrameElement::sandbox):
2417         (WebCore::HTMLIFrameElement::parseAttribute):
2418         * html/HTMLIFrameElement.h:
2419         * html/HTMLIFrameElement.idl:
2420
2421 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2422
2423         ASSERTION FAILED: markFontData in FontCascade::emphasisMarkHeight
2424         https://bugs.webkit.org/show_bug.cgi?id=150171
2425
2426         Reviewed by Myles C. Maxfield.
2427
2428         It happens with several tests like fast/ruby/text-emphasis.html in
2429         the GTK Debug bot. The tests seem to pass in Release and the rendering
2430         looks correct as well removing the assert. The thing is that
2431         for some reason we can get an empty GlyphData from
2432         FontCascade::getEmphasisMarkGlyphData() when it ends up falling
2433         back to system (FontCascadeFonts::glyphDataForSystemFallback).
2434
2435         * platform/graphics/FontCascade.cpp:
2436         (WebCore::FontCascade::getEmphasisMarkGlyphData): Return
2437         Optional<GlyphData> instead of returning a boolean and an out
2438         parameter. If we get an invalid GlyphData, Nullopt is
2439         returned. Also use a SurrogatePairAwareTextIterator to handle
2440         surrogate pairs.
2441         (WebCore::FontCascade::emphasisMarkAscent):
2442         (WebCore::FontCascade::emphasisMarkDescent):
2443         (WebCore::FontCascade::emphasisMarkHeight):
2444         (WebCore::FontCascade::drawEmphasisMarks):
2445         * platform/graphics/FontCascade.h:
2446         * platform/graphics/GlyphPage.h:
2447         (WebCore::GlyphData::isValid): Return whether the GlyphData is valid.
2448
2449 2015-10-20  Sergio Villar Senin  <svillar@igalia.com>
2450
2451         [css-grid] Fix availableLogicalSpace computation with non-zero baseSize flex tracks
2452         https://bugs.webkit.org/show_bug.cgi?id=150359
2453
2454         Reviewed by Zalan Bujtas.
2455
2456         The availableLogicalSpace computation was incorrect whenever
2457         the flex tracks had a non-zero baseSize before the 1fr unit
2458         size resolution. That happened because when assigning the new
2459         baseSize to the flex track, we were unconditionally
2460         subtracting the whole baseSize to the
2461         availableLogicalSpace. That's correct if the track is a "pure"
2462         flex track, i.e. 2fr, but if the track had a non-zero baseSize
2463         (like minmax(10px, 1fr)) then both the new and the old base
2464         sizes were incorrectly used to compute the
2465         availableLogicalSpace.
2466
2467         We can test the amount of remaining freeSpace by using content
2468         distribution to align and item place on a non-zero baseSize
2469         flex track. The content distribution will be accurate if and
2470         only if the availableLogicalSpace computation is correct.
2471
2472         Test: fast/css-grid-layout/flex-content-distribution.html
2473
2474         * rendering/RenderGrid.cpp:
2475         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2476
2477 2015-10-21  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2478
2479         [Streams API] Construct a writable stream
2480         https://bugs.webkit.org/show_bug.cgi?id=150360
2481
2482         Reviewed by Darin Adler.
2483
2484         This patch initializes a writable stream according to the spec. To do it we need two internal functions, which
2485         are syncWritableStreamStateWithQueue and errorWritableStream, which are also implemented as a quite direct
2486         translation from the spec.
2487
2488         Current test set suffices, expectations are updated accordingly.
2489
2490         * CMakeLists.txt:
2491         * DerivedSources.make:
2492         * WebCore.xcodeproj/project.pbxproj:
2493         * bindings/js/JSDOMWindowBase.cpp:
2494         * bindings/js/WebCoreBuiltinNames.h:
2495         * bindings/js/WebCoreJSBuiltinInternals.h:
2496         * bindings/js/WebCoreJSBuiltins.cpp:
2497         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
2498         * Modules/streams/WritableStream.js:
2499         (initializeWritableStream): Function that acts as constructor of WritableStream.
2500         * Modules/streams/WritableStreamInternals.js:
2501         (syncWritableStreamStateWithQueue):
2502         (errorWritableStream): As per spec.
2503
2504 2015-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2505
2506         NetworkProcess: DNS prefetch happens in the Web Process
2507         https://bugs.webkit.org/show_bug.cgi?id=147824
2508
2509         Reviewed by Chris Dumez.
2510
2511         Use FrameLoaderClient to do the DNS prefetch.
2512
2513         * html/HTMLAnchorElement.cpp:
2514         (WebCore::HTMLAnchorElement::parseAttribute):
2515         * loader/EmptyClients.h:
2516         * loader/FrameLoaderClient.h:
2517         * loader/LinkLoader.cpp:
2518         (WebCore::LinkLoader::loadLink):
2519         * page/Chrome.cpp:
2520         (WebCore::Chrome::mouseDidMoveOverElement):
2521
2522 2015-10-21  Frederic Wang  <fred.wang@free.fr>
2523
2524         [FreeType] Add support for the USE_TYPO_METRICS flag
2525         https://bugs.webkit.org/show_bug.cgi?id=150340
2526
2527         Reviewed by Martin Robinson.
2528
2529         Test: fonts/use-typo-metrics-1.html
2530
2531         Make the FreeType backend use the typo metrics when the OS/2 USE_TYPO_METRICS flag is set.
2532         Similar work should be done for other backends, see bug 131839.
2533
2534         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2535         (WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that's the case.
2536
2537 2015-10-20  Hunseop Jeong  <hs85.jeong@samsung.com>
2538
2539         Replace 0 and NULL with nullptr in WebCore/loader.
2540         https://bugs.webkit.org/show_bug.cgi?id=149657
2541
2542         Reviewed by Darin Adler.
2543
2544         No new tests because there is no behavior change.
2545
2546         * loader/CookieJar.cpp:
2547         (WebCore::networkingContext):
2548         * loader/DocumentLoader.cpp:
2549         (WebCore::DocumentLoader::DocumentLoader):
2550         (WebCore::DocumentLoader::frameLoader):
2551         (WebCore::DocumentLoader::popArchiveForSubframe):
2552         (WebCore::DocumentLoader::clearArchiveResources):
2553         (WebCore::DocumentLoader::clearMainResource):
2554         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
2555         * loader/DocumentThreadableLoader.cpp:
2556         (WebCore::DocumentThreadableLoader::cancel):
2557         (WebCore::DocumentThreadableLoader::setDefersLoading):
2558         (WebCore::DocumentThreadableLoader::clearResource):
2559         * loader/EmptyClients.cpp:
2560         (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
2561         (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
2562         * loader/EmptyClients.h:
2563         * loader/FTPDirectoryParser.cpp:
2564         (WebCore::parseOneFTPLine):
2565         * loader/FTPDirectoryParser.h:
2566         (WebCore::ListResult::clear):
2567         * loader/FormSubmission.cpp:
2568         (WebCore::FormSubmission::create):
2569         * loader/FrameLoader.cpp:
2570         (WebCore::FrameLoader::clear):
2571         (WebCore::FrameLoader::stopAllLoaders):
2572         (WebCore::FrameLoader::clearProvisionalLoad):
2573         (WebCore::FrameLoader::transitionToCommitted):
2574         (WebCore::FrameLoader::closeAndRemoveChild):
2575         (WebCore::FrameLoader::detachFromParent):
2576         (WebCore::FrameLoader::detachViewsAndDocumentLoader):
2577         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
2578         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2579         * loader/FrameLoader.h:
2580         (WebCore::FrameLoader::stateMachine):
2581         * loader/FrameNetworkingContext.h:
2582         (WebCore::FrameNetworkingContext::invalidate):
2583         * loader/HistoryController.cpp:
2584         (WebCore::HistoryController::replaceState):
2585         * loader/ImageLoader.cpp:
2586         (WebCore::ImageLoader::ImageLoader):
2587         (WebCore::ImageLoader::updateFromElement):
2588         * loader/NetscapePlugInStreamLoader.cpp:
2589         (WebCore::NetscapePlugInStreamLoader::releaseResources):
2590         * loader/ResourceLoadNotifier.h:
2591         * loader/ResourceLoadScheduler.cpp:
2592         (WebCore::resourceLoadScheduler):
2593         * loader/SubresourceLoader.cpp:
2594         (WebCore::SubresourceLoader::releaseResources):
2595         * loader/TextResourceDecoder.cpp:
2596         (WebCore::TextResourceDecoder::TextResourceDecoder):
2597         * loader/ThreadableLoaderClientWrapper.h:
2598         (WebCore::ThreadableLoaderClientWrapper::clearClient):
2599         (WebCore::ThreadableLoaderClientWrapper::done):
2600         * loader/appcache/ApplicationCache.cpp:
2601         (WebCore::fallbackURLLongerThan):
2602         (WebCore::ApplicationCache::ApplicationCache):
2603         (WebCore::ApplicationCache::resourceForRequest):
2604         * loader/appcache/ApplicationCache.h:
2605         (WebCore::ApplicationCache::fallbackURLs):
2606         * loader/appcache/ApplicationCacheGroup.cpp:
2607         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
2608         (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
2609         (WebCore::ApplicationCacheGroup::selectCache):
2610         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
2611         (WebCore::ApplicationCacheGroup::failedLoadingMainResource):
2612         (WebCore::ApplicationCacheGroup::manifestNotFound):
2613         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
2614         * loader/appcache/ApplicationCacheHost.cpp:
2615         (WebCore::ApplicationCacheHost::ApplicationCacheHost):
2616         (WebCore::ApplicationCacheHost::setApplicationCache):
2617         * loader/appcache/ApplicationCacheHost.h:
2618         (WebCore::ApplicationCacheHost::candidateApplicationCacheGroup):
2619         * loader/appcache/ApplicationCacheStorage.cpp:
2620         (WebCore::StorageIDJournal::Record::Record):
2621         (WebCore::StorageIDJournal::Record::restore):
2622         (WebCore::ApplicationCacheStorage::loadCacheGroup):
2623         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
2624         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
2625         (WebCore::ApplicationCacheStorage::cacheGroupDestroyed):
2626         (WebCore::ApplicationCacheStorage::loadCache):
2627         * loader/appcache/DOMApplicationCache.cpp:
2628         (WebCore::DOMApplicationCache::disconnectFrameForPageCache):
2629         (WebCore::DOMApplicationCache::willDestroyGlobalObjectInFrame):
2630         (WebCore::DOMApplicationCache::applicationCacheHost):
2631         (WebCore::DOMApplicationCache::scriptExecutionContext):
2632         (WebCore::DOMApplicationCache::toEventType):
2633         * loader/archive/ArchiveFactory.cpp:
2634         (WebCore::ArchiveFactory::create):
2635         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
2636         * loader/archive/ArchiveResourceCollection.cpp:
2637         (WebCore::ArchiveResourceCollection::archiveResourceForURL):
2638         * loader/archive/cf/LegacyWebArchive.cpp:
2639         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
2640         (WebCore::LegacyWebArchive::createResource):
2641         (WebCore::LegacyWebArchive::create):
2642         (WebCore::LegacyWebArchive::rawDataRepresentation):
2643         * loader/archive/cf/LegacyWebArchiveMac.mm:
2644         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
2645         * loader/archive/mhtml/MHTMLArchive.cpp:
2646         (WebCore::MHTMLArchive::create):
2647         (WebCore::MHTMLArchive::generateMHTMLData):
2648         * loader/archive/mhtml/MHTMLParser.cpp:
2649         (WebCore::MHTMLParser::parseArchiveWithHeader):
2650         (WebCore::MHTMLParser::parseNextPart):
2651         * loader/cache/CachedImage.cpp:
2652         (WebCore::CachedImage::CachedImage):
2653         * loader/cache/CachedImageClient.h:
2654         (WebCore::CachedImageClient::imageChanged):
2655         (WebCore::CachedImageClient::newImageAnimationFrameAvailable):
2656         * loader/cache/CachedRawResource.cpp:
2657         (WebCore::CachedRawResource::calculateIncrementalDataChunk):
2658         * loader/cache/CachedRawResourceClient.h:
2659         (WebCore::CachedRawResourceClient::dataReceived):
2660         (WebCore::CachedRawResourceClient::redirectReceived):
2661         (WebCore::CachedRawResourceClient::getOrCreateReadBuffer):
2662         * loader/cache/CachedResource.cpp:
2663         (WebCore::CachedResource::CachedResource):
2664         (WebCore::CachedResource::clearResourceToRevalidate):
2665         * loader/cache/CachedResourceClientWalker.h:
2666         (WebCore::CachedResourceClientWalker::next):
2667         * loader/cache/CachedResourceHandle.cpp:
2668         (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
2669         * loader/cache/CachedResourceLoader.cpp:
2670         (WebCore::createResource):
2671         (WebCore::CachedResourceLoader::CachedResourceLoader):
2672         (WebCore::CachedResourceLoader::~CachedResourceLoader):
2673         (WebCore::CachedResourceLoader::canRequest): Return value is bool.
2674         (WebCore::CachedResourceLoader::requestResource):
2675         * loader/cache/CachedResourceLoader.h:
2676         (WebCore::CachedResourceLoader::document):
2677         (WebCore::CachedResourceLoader::setDocument):
2678         (WebCore::CachedResourceLoader::clearDocumentLoader):
2679         * loader/cache/CachedSVGDocumentReference.cpp:
2680         (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
2681         * loader/cf/ResourceLoaderCFNet.cpp:
2682         (WebCore::ResourceLoader::shouldCacheResponse): Return value is bool.
2683         * loader/icon/IconDatabase.cpp:
2684         (WebCore::IconDatabase::synchronousIconForPageURL):
2685         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
2686         (WebCore::IconDatabase::setIconDataForIconURL):
2687         (WebCore::IconDatabase::getOrCreatePageURLRecord):
2688         (WebCore::IconDatabase::cleanupSyncThread):
2689         * loader/icon/IconDatabaseBase.cpp:
2690         (WebCore::IconDatabaseBase::open):
2691         (WebCore::iconDatabase):
2692         * loader/icon/IconDatabaseBase.h:
2693         (WebCore::EnumCallback::performCallback):
2694         (WebCore::EnumCallback::invalidate):
2695         (WebCore::ObjectCallback::performCallback):
2696         (WebCore::ObjectCallback::invalidate):
2697         * loader/icon/PageURLRecord.cpp:
2698         (WebCore::PageURLRecord::~PageURLRecord):
2699         (WebCore::PageURLRecord::setIconRecord):
2700         * loader/mac/ResourceLoaderMac.mm:
2701         (WebCore::ResourceLoader::willCacheResponse):
2702         * loader/soup/CachedRawResourceSoup.cpp:
2703         (WebCore::CachedRawResource::getOrCreateReadBuffer):
2704
2705 2015-10-20  Chris Dumez  <cdumez@apple.com>
2706
2707         Unreviewed, GTK API test fix after r191351.
2708
2709         Reverted API change for GTK bindings.
2710
2711         * html/HTMLOptionsCollection.idl:
2712         * html/HTMLSelectElement.idl:
2713
2714 2015-10-20  Chris Dumez  <cdumez@apple.com>
2715
2716         Unreviewed, Another GTK build fix after r191351.
2717
2718         * html/HTMLCollection.idl:
2719
2720 2015-10-20  Chris Dumez  <cdumez@apple.com>
2721
2722         Unreviewed, Another GTK build fix after r191351.
2723
2724         * html/HTMLFieldSetElement.cpp:
2725         (WebCore::HTMLFieldSetElement::elementsForNativeBindings):
2726         (WebCore::HTMLFieldSetElement::elementsForObjC): Deleted.
2727         * html/HTMLFieldSetElement.h:
2728         * html/HTMLFieldSetElement.idl:
2729
2730 2015-10-20  Chris Fleizach  <cfleizach@apple.com>
2731
2732         AX: CrashTracer: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AccessibilityTable::tableElement const + 116
2733         https://bugs.webkit.org/show_bug.cgi?id=150349
2734
2735         Reviewed by Brent Fulgham.
2736
2737         The crash point for this bug says that the parentElement of the firstBody is garbage when it's accessed. 
2738         Unfortunately, I could not reproduce this in-situ or with a test. 
2739         So my speculative solution is to recalculate those body elements to ensure that they're valid before we access.
2740
2741         * accessibility/AccessibilityTable.cpp:
2742         (WebCore::AccessibilityTable::tableElement):
2743         (WebCore::AccessibilityTable::isDataTable):
2744
2745 2015-10-20  Chris Dumez  <cdumez@apple.com>
2746
2747         Unreviewed, GTK build fix after r191351.
2748
2749         * html/HTMLFormElement.cpp:
2750         (WebCore::HTMLFormElement::elementsForNativeBindings):
2751         (WebCore::HTMLFormElement::elementsForObjC): Deleted.
2752         * html/HTMLFormElement.h:
2753         * html/HTMLFormElement.idl:
2754
2755 2015-10-20  Simon Fraser  <simon.fraser@apple.com>
2756
2757         Add basic TextStream output for Images
2758         https://bugs.webkit.org/show_bug.cgi?id=150350
2759
2760         Reviewed by Darin Adler.
2761
2762         Add a TextStream output operator for Image, and virtual dump() member functions
2763         that the various image types override to dump their own data.
2764         
2765         Add isFoo() functions for each image type (surprising that these didn't already
2766         exist) so we can print the image type.
2767         
2768         Make isAnimated() const, and isBitmapImage() private.
2769
2770         * platform/graphics/BitmapImage.cpp:
2771         (WebCore::BitmapImage::dump):
2772         * platform/graphics/BitmapImage.h:
2773         * platform/graphics/CrossfadeGeneratedImage.cpp:
2774         (WebCore::CrossfadeGeneratedImage::dump):
2775         * platform/graphics/CrossfadeGeneratedImage.h:
2776         * platform/graphics/GeneratedImage.cpp:
2777         * platform/graphics/GeneratedImage.h:
2778         * platform/graphics/GradientImage.cpp:
2779         (WebCore::GradientImage::dump):
2780         * platform/graphics/GradientImage.h:
2781         * platform/graphics/Image.cpp:
2782         (WebCore::Image::dump):
2783         (WebCore::operator<<):
2784         * platform/graphics/Image.h:
2785         (WebCore::Image::isGeneratedImage):
2786         (WebCore::Image::isCrossfadeGeneratedImage):
2787         (WebCore::Image::isNamedImageGeneratedImage):
2788         (WebCore::Image::isGradientImage):
2789         (WebCore::Image::isSVGImage):
2790         (WebCore::Image::isAnimated):
2791         * platform/graphics/NamedImageGeneratedImage.cpp:
2792         (WebCore::NamedImageGeneratedImage::dump):
2793         * platform/graphics/NamedImageGeneratedImage.h:
2794         * platform/graphics/cg/PDFDocumentImage.cpp:
2795         (WebCore::PDFDocumentImage::dump):
2796         * platform/graphics/cg/PDFDocumentImage.h:
2797         * svg/graphics/SVGImage.cpp:
2798         (WebCore::SVGImage::dump):
2799         * svg/graphics/SVGImage.h:
2800
2801 2015-10-20  Chris Dumez  <cdumez@apple.com>
2802
2803         Use tighter typing for collections / node lists' item() / namedItem() methods
2804         https://bugs.webkit.org/show_bug.cgi?id=150347
2805
2806         Reviewed by Darin Adler.
2807
2808         Use tighter typing for collections / node lists' item() / namedItem() methods.
2809
2810         * accessibility/AccessibilityRenderObject.cpp:
2811         (WebCore::AccessibilityRenderObject::getDocumentLinks):
2812         * dom/LiveNodeList.h:
2813         * dom/StaticNodeList.cpp:
2814         (WebCore::StaticElementList::item):
2815         * dom/StaticNodeList.h:
2816         * html/CachedHTMLCollection.h:
2817         * html/HTMLAllCollection.idl:
2818         * html/HTMLCollection.idl:
2819         * html/HTMLFieldSetElement.cpp:
2820         (WebCore::HTMLFieldSetElement::elements):
2821         (WebCore::HTMLFieldSetElement::elementsForObjC):
2822         * html/HTMLFieldSetElement.h:
2823         * html/HTMLFieldSetElement.idl:
2824         * html/HTMLFormControlsCollection.cpp:
2825         (WebCore::HTMLFormControlsCollection::customElementAfter):
2826         * html/HTMLFormControlsCollection.h:
2827         * html/HTMLFormControlsCollection.idl:
2828         * html/HTMLFormElement.cpp:
2829         (WebCore::HTMLFormElement::item):
2830         (WebCore::HTMLFormElement::elements):
2831         (WebCore::HTMLFormElement::elementsForObjC):
2832         * html/HTMLFormElement.h:
2833         * html/HTMLFormElement.idl:
2834         * html/HTMLOptionsCollection.cpp:
2835         (WebCore::HTMLOptionsCollection::add):
2836         * html/HTMLOptionsCollection.h:
2837         * html/HTMLOptionsCollection.idl:
2838         * html/HTMLSelectElement.cpp:
2839         (WebCore::HTMLSelectElement::namedItem):
2840         (WebCore::HTMLSelectElement::item):
2841         (WebCore::HTMLSelectElement::setOption):
2842         * html/HTMLSelectElement.idl:
2843         * html/HTMLTableRowElement.cpp:
2844         (WebCore::HTMLTableRowElement::deleteCell):
2845         * html/HTMLTableSectionElement.cpp:
2846         (WebCore::HTMLTableSectionElement::deleteRow):
2847         * html/RadioNodeList.cpp:
2848         (WebCore::toRadioButtonInputElement):
2849         (WebCore::RadioNodeList::value):
2850         (WebCore::RadioNodeList::setValue):
2851         * html/RadioNodeList.h:
2852         * html/RadioNodeList.idl:
2853
2854 2015-10-20  Chris Dumez  <cdumez@apple.com>
2855
2856         Only HTML spaces should be stripped from a <script>'s 'for' / 'event' attributes
2857         https://bugs.webkit.org/show_bug.cgi?id=150335
2858
2859         Reviewed by Darin Adler.
2860
2861         Only HTML spaces should be stripped from a <script>'s 'for' / 'event' attributes:
2862         https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script (step 12.3)
2863         https://html.spec.whatwg.org/multipage/infrastructure.html#space-character
2864
2865         Previously, we were uding the wrong stripping function and we were stripping
2866         some non-HTML spaces.
2867
2868         Test: fast/dom/script-for-event-spaces.html
2869
2870         * dom/ScriptElement.cpp:
2871         (WebCore::ScriptElement::isScriptForEventSupported):
2872
2873 2015-10-20  Csaba Osztrogonác  <ossy@webkit.org>
2874
2875         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r191128
2876         https://bugs.webkit.org/show_bug.cgi?id=150321
2877
2878         Reviewed by Darin Adler.
2879
2880         * css/CSSGrammar.y.in: Typo fix.
2881
2882 2015-10-20  Tim Horton  <timothy_horton@apple.com>
2883
2884         Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
2885
2886         * Configurations/FeatureDefines.xcconfig:
2887
2888 2015-10-13  Sergio Villar Senin  <svillar@igalia.com>
2889
2890         ASSERTION FAILED: computeMainAxisExtentForChild(child, MainOrPreferredSize, mainSize) in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
2891         https://bugs.webkit.org/show_bug.cgi?id=149459
2892
2893         Reviewed by Darin Adler.
2894
2895         This was regressed after 189567 where min-height|width:auto
2896         support was added to flex items. The merge from Blink changes
2897         was not correctly done for assertions. In particular we were
2898         asserting if the resolved main size was not strictly greater
2899         than 0, but 0 is actually a valid value.
2900
2901         Test: fast/flexbox/crash-resolved-main-size-zero.html
2902
2903         * rendering/RenderFlexibleBox.cpp:
2904         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2905
2906 2015-10-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2907
2908         [Streams API] Rework some readable stream internals that can be common to writable streams
2909         https://bugs.webkit.org/show_bug.cgi?id=150133
2910
2911         Reviewed by Darin Adler.
2912
2913         There are some things in ReadableStream internals that be be used also for Writable Streams so it was necessary
2914         to move some functions and refactor some code that can be shared by both implementations.
2915
2916         Queue was written with the functions declared at the implementation and keeping the improvement of having the
2917         total size calculated instead of having to transverse the whole array.
2918
2919         The strategy is kept as an object and a common method is used to validate it as per spec.
2920
2921         Promises are reworked to keep in an internal slot inside the promise object the resolve and reject
2922         functions. For convinience three functions were written, one to create the promise (and keep internally the
2923         resolve and reject functions), one to resolve and another to reject. Promises can still be created with
2924         Promise.resolve or reject as the resolve and rejectStreamsPromise functions operate under the assumption that
2925         the internal slots might not exist.
2926
2927         invokeOrNoop and promiseInvokeOrNoop were moved to the common code as they will be also used by WritableStream.
2928
2929         Current test set suffices.
2930
2931         * CMakeLists.txt:
2932         * DerivedSources.make:
2933         * WebCore.xcodeproj/project.pbxproj:
2934         * bindings/js/JSDOMWindowBase.cpp:
2935         * bindings/js/WebCoreJSBuiltinInternals.h:
2936         * bindings/js/WebCoreJSBuiltins.cpp:
2937         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
2938         * Modules/streams/ReadableStream.js:
2939         (initializeReadableStream): Reworked queue and strategy.
2940         * Modules/streams/ReadableStreamInternals.js:
2941         (privateInitializeReadableStreamReader):
2942         (errorReadableStream):
2943         (getReadableStreamDesiredSize):
2944         (cancelReadableStream):
2945         (closeReadableStream):
2946         (closeReadableStreamReader):
2947         (enqueueInReadableStream):
2948         (readFromReadableStreamReader): Reworked queue, strategy and promises.
2949         (invokeOrNoop): Deleted.
2950         (promiseInvokeOrNoop): Deleted.
2951         * Modules/streams/StreamInternals.js: Added.
2952         (invokeOrNoop):
2953         (promiseInvokeOrNoop): Moved from ReadableStreamInternals.js.
2954         (validateAndNormalizeQueuingStrategy):
2955         (createNewStreamsPromise):
2956         (resolveStreamsPromise):
2957         (rejectStreamsPromise):
2958         (newQueue):
2959         (dequeueValue):
2960         (enqueueValueWithSize): Added according to the spec.
2961         * bindings/js/WebCoreBuiltinNames.h: Updated private names according to the new slots.
2962
2963 2015-10-20  Yoav Weiss  <yoav@yoav.ws>
2964
2965         Rename the PICTURE_SIZES flag to CURRENTSRC
2966         https://bugs.webkit.org/show_bug.cgi?id=150275
2967
2968         Reviewed by Dean Jackson.
2969
2970         No new tests, since there is no functional change.
2971
2972         * Configurations/FeatureDefines.xcconfig:
2973         * html/HTMLImageElement.cpp:
2974         * html/HTMLImageElement.h:
2975         * html/HTMLImageElement.idl:
2976
2977 2015-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2978
2979         ASSERTION FAILED: m_state == Initialized in SubresourceLoader::didReceiveResponse()
2980         https://bugs.webkit.org/show_bug.cgi?id=150327
2981
2982         Reviewed by Antti Koivisto.
2983
2984         This is how it happens:
2985
2986         1. print() is called while the document is still loading, so
2987            m_shouldPrintWhenFinishedLoading is set to true
2988         2. DataURLDecoder::decode() finishes in the work queue thread,
2989            the completion handler is scheduled in the main thread
2990         3. The load is cancelled
2991           3.1. SubresourceLoader::willCancel sets m_state = Finishing
2992           3.2. DOMWindow::finishedLoading() is called, and since
2993                m_shouldPrintWhenFinishedLoading is true, it does the print.
2994           3.3. Cancellation finishes and ResourceLoader::releaseResources()
2995                is called that sets m_reachedTerminalState = true
2996
2997         So, between 3.1 and 3.3, the state is Finishing, but
2998         m_reachedTerminalState is false. What happens, in the GTK+ port at
2999         least, is that the nested main loop used to make print()
3000         synchronous, processes the DataURLDecoder::decode() completion
3001         handler that was pending. The completion handler returns early if
3002         m_reachedTerminalState is true, but it's not yet in this
3003         particular case. So, it ends up calling didReceiveResponse,
3004         because the decode didn't fail, when the subresource loader state
3005         is Finishing.
3006
3007         I think there are two things here. One is that we shouldn't start
3008         a print that was waiting for the load to finish when it
3009         failed. That would fix the problem. But it's probably a good idea
3010         to also check for cancellation in the DataURLDecoder::decode()
3011         completion handler.
3012
3013         Fixes printing/print-close-crash.html in GTK+ Debug.
3014
3015         * loader/ResourceLoader.cpp:
3016         (WebCore::ResourceLoader::loadDataURL): Return early from
3017         DataURLDecoder::decode() completion handler if the load was cancelled.
3018         * page/DOMWindow.cpp:
3019         (WebCore::DOMWindow::finishedLoading): Do not start a print that
3020         was witing for the load to finish when it failed.
3021
3022 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3023
3024         FontCascade::typesettingFeatures() is not privy to font-variant-* nor font-feature-settings
3025         https://bugs.webkit.org/show_bug.cgi?id=149775
3026
3027         Reviewed by Darin Adler.
3028
3029         This patch has two pieces:
3030
3031         We used to have a boolean, enableLigatures, which affected how we perform shaping in both our
3032         simple and complex text codepaths. However, in this brave new world of font-feature-settings
3033         and font-variant-*, there are many properties which may affect shaping (and multiple kinds
3034         of ligatures). This patch renames this boolean to requiresShaping, and teaches it about all
3035         the various properties which affect text shaping.
3036
3037         Similarly, one of the places which used this enableLigatures boolean was to tell CoreText
3038         if it should disable ligatures. However, we now have much finer-grained control over
3039         ligatures during font creation. This patch moves the responsibility of dictating which
3040         font features should be enabled entirely to the Font. Therefore, getCFStringAttributes()
3041         doesn't know anything about ligatures anymore; the logic inside font creation is used
3042         instead.
3043
3044         An added benefit of moving all the font feature logic to one place is that we can implement
3045         the feature resolution algorithm described in the CSS3 fonts spec. This patch adds a test to
3046         makes sure that text-rendering, font-feature-settings, and font-variant-* play together
3047         nicely.
3048
3049         Test: fast/text/multiple-feature-properties.html
3050
3051         * platform/graphics/Font.cpp:
3052         (WebCore::Font::applyTransforms):
3053         * platform/graphics/Font.h:
3054         * platform/graphics/FontCascade.cpp:
3055         (WebCore::FontCascade::FontCascade):
3056         (WebCore::FontCascade::operator=):
3057         (WebCore::FontCascade::update):
3058         (WebCore::FontCascade::drawText):
3059         (WebCore::FontCascade::drawEmphasisMarks):
3060         (WebCore::FontCascade::width):
3061         (WebCore::FontCascade::adjustSelectionRectForText):
3062         (WebCore::FontCascade::offsetForPosition):
3063         (WebCore::FontCascade::codePath):
3064         (WebCore::FontCascade::floatWidthForSimpleText):
3065         * platform/graphics/FontCascade.h:
3066         (WebCore::FontCascade::requiresShaping):
3067         (WebCore::FontCascade::computeRequiresShaping):
3068         (WebCore::FontCascade::enableLigatures): Deleted.
3069         (WebCore::FontCascade::computeEnableLigatures): Deleted.
3070         * platform/graphics/WidthIterator.cpp:
3071         (WebCore::WidthIterator::WidthIterator):
3072         (WebCore::WidthIterator::applyFontTransforms):
3073         * platform/graphics/WidthIterator.h:
3074         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3075         (WebCore::preparePlatformFont):
3076         * platform/graphics/cocoa/FontCocoa.mm:
3077         (WebCore::Font::canRenderCombiningCharacterSequence):
3078         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3079         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
3080         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
3081         (WebCore::Font::getCFStringAttributes):
3082         * svg/SVGFontData.h:
3083
3084 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3085
3086         Shadow GraphicsContext's ImageInterpolationQuality inside GraphicsContextState
3087         https://bugs.webkit.org/show_bug.cgi?id=150306
3088
3089         Reviewed by Simon Fraser.
3090
3091         When getting the ImageInterpolationQuality, there is no need to round-trip through
3092         the platform's graphics context. This patch migrates this piece of state to the
3093         existing idiom of having a setter in GraphicsContext.cpp which sets the relevent
3094         state in GraphicsContextState and then calls into a platform-specific setter.
3095
3096         No new tests because there is no behavior change.
3097
3098         * platform/graphics/GraphicsContext.cpp:
3099         (WebCore::GraphicsContext::setImageInterpolationQuality):
3100         * platform/graphics/GraphicsContext.h:
3101         (WebCore::GraphicsContext::imageInterpolationQuality):
3102         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3103         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
3104         (WebCore::GraphicsContext::setImageInterpolationQuality): Deleted.
3105         (WebCore::GraphicsContext::imageInterpolationQuality): Deleted.
3106         * platform/graphics/cg/GraphicsContextCG.cpp:
3107         (WebCore::convertInterpolationQuality):
3108         (WebCore::GraphicsContext::platformInit):
3109         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
3110         (WebCore::GraphicsContext::setImageInterpolationQuality): Deleted.
3111         (WebCore::GraphicsContext::imageInterpolationQuality): Deleted.
3112
3113 2015-10-19  Chris Dumez  <cdumez@apple.com>
3114
3115         Drop unnecessary Node::toInputElement() virtual function
3116         https://bugs.webkit.org/show_bug.cgi?id=150341
3117
3118         Reviewed by Darin Adler.
3119
3120         Drop unnecessary Node::toInputElement() virtual function and use the
3121         usual is<HTMLInputElement>() / downcast< HTMLInputElement >() instead.
3122
3123 2015-10-19  Commit Queue  <commit-queue@webkit.org>
3124
3125         Unreviewed, rolling out r191324.
3126         https://bugs.webkit.org/show_bug.cgi?id=150352
3127
3128         Shadowing CTM's state is not necessary (Requested by litherum
3129         on #webkit).
3130
3131         Reverted changeset:
3132
3133         "Host GraphicsContext's CTM inside GraphicsContextState"
3134         https://bugs.webkit.org/show_bug.cgi?id=150146
3135         http://trac.webkit.org/changeset/191324
3136
3137 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3138
3139         Host GraphicsContext's CTM inside GraphicsContextState
3140         https://bugs.webkit.org/show_bug.cgi?id=150146
3141
3142         There are 6 operations which interact with CTMs:
3143         - Get
3144         - Set
3145         - Concatenate
3146         - Scale
3147         - Rotate
3148         - Translate
3149
3150         This patch modifies all these operations so that these operations shadow the
3151         platform's CTM inside GraphicsContextState. This way, we don't have to consult
3152         with the underlying graphics context in order to know the current CTM.
3153
3154         There are currently many places in the Core Graphics ports where we will change
3155         the platform's CTM out from under the GraphicsContext. This patch migrates
3156         those users to going through GraphicsContext, thereby preserving the integrity
3157         of the shadowed state.
3158
3159         No new tests because there is no behavior change.
3160
3161         * platform/graphics/GraphicsContext.cpp: Setters deletate to platform calls.
3162         The getter can just consult with the shadowed state.
3163         (WebCore::GraphicsContext::concatCTM):
3164         (WebCore::GraphicsContext::scale):
3165         (WebCore::GraphicsContext::rotate):
3166         (WebCore::GraphicsContext::translate):
3167         (WebCore::GraphicsContext::setCTM):
3168         (WebCore::GraphicsContext::getCTM):
3169         (WebCore::GraphicsContext::beginTransparencyLayer):
3170         (WebCore::GraphicsContext::applyDeviceScaleFactor):
3171         * platform/graphics/GraphicsContext.h:
3172         (WebCore::GraphicsContext::scale):
3173         (WebCore::GraphicsContext::checkCTMInvariants): Make sure the shadowed state
3174         matches the platform graphics context's state.
3175         * platform/graphics/Image.h:
3176         (WebCore::Image::nativeImageForCurrentFrame):
3177         * platform/graphics/cairo/GraphicsContextCairo.cpp: Renaming functions.
3178         (WebCore::GraphicsContext::resetPlatformCTM):
3179         (WebCore::GraphicsContext::getPlatformCTM):
3180         (WebCore::GraphicsContext::translatePlatformCTM):
3181         (WebCore::GraphicsContext::concatPlatformCTM):
3182         (WebCore::GraphicsContext::setPlatformCTM):
3183         (WebCore::GraphicsContext::rotatePlatformCTM):
3184         (WebCore::GraphicsContext::scalePlatformCTM):
3185         (WebCore::GraphicsContext::getCTM): Deleted.
3186         (WebCore::GraphicsContext::translate): Deleted.
3187         (WebCore::GraphicsContext::concatCTM): Deleted.
3188         (WebCore::GraphicsContext::setCTM): Deleted.
3189         (WebCore::GraphicsContext::rotate): Deleted.
3190         (WebCore::GraphicsContext::scale): Deleted.
3191         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3192         Renaming functions.
3193         (WebCore::GraphicsContextPlatformPrivate::save):
3194         (WebCore::GraphicsContextPlatformPrivate::restore):
3195         (WebCore::GraphicsContextPlatformPrivate::flush):
3196         (WebCore::GraphicsContextPlatformPrivate::clip):
3197         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
3198         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
3199         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
3200         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
3201         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
3202         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
3203         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
3204         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
3205         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
3206         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
3207         * platform/graphics/cg/GraphicsContextCG.cpp: Renaming functions. Also,
3208         migrate CTM setters to go through GraphicsContext.
3209         (WebCore::GraphicsContext::resetPlatformCTM):
3210         (WebCore::GraphicsContext::platformInit):
3211         (WebCore::GraphicsContext::drawNativeImage):
3212         (WebCore::GraphicsContext::drawPattern):
3213         (WebCore::GraphicsContext::fillPath):
3214         (WebCore::GraphicsContext::scalePlatformCTM):
3215         (WebCore::GraphicsContext::rotatePlatformCTM):
3216         (WebCore::GraphicsContext::translatePlatformCTM):
3217         (WebCore::GraphicsContext::concatPlatformCTM):
3218         (WebCore::GraphicsContext::setPlatformCTM):
3219         (WebCore::GraphicsContext::getPlatformCTM):
3220         (WebCore::GraphicsContext::scale): Deleted.
3221         (WebCore::GraphicsContext::rotate): Deleted.
3222         (WebCore::GraphicsContext::translate): Deleted.
3223         (WebCore::GraphicsContext::concatCTM): Deleted.
3224         (WebCore::GraphicsContext::setCTM): Deleted.
3225         (WebCore::GraphicsContext::getCTM): Deleted.
3226         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
3227         (WebCore::GraphicsContextPlatformPrivate::save):
3228         (WebCore::GraphicsContextPlatformPrivate::restore):
3229         (WebCore::GraphicsContextPlatformPrivate::flush):
3230         (WebCore::GraphicsContextPlatformPrivate::clip):
3231         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
3232         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
3233         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
3234         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
3235         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
3236         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
3237         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
3238         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
3239         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
3240         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
3241         * platform/graphics/transforms/AffineTransform.h:
3242         (WebCore::AffineTransform::isEssentiallyEqualTo): Equality comparison on floats
3243         is not a good idea. Instead, this function is more valuable. (However, note that
3244         it is expected for values in a CTM to hold values close to 0, which means that
3245         this function might erroneously return false (similar to operator=()).
3246         * platform/graphics/win/GraphicsContextWin.cpp:
3247         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
3248         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
3249         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
3250         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
3251         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
3252         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
3253         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
3254         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
3255         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
3256         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
3257         * platform/mac/DragImageMac.mm:
3258         (WebCore::drawAtPoint):
3259         * platform/spi/cg/CoreGraphicsSPI.h:
3260
3261 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3262
3263         Remove unused support for long presses from WebKit
3264         https://bugs.webkit.org/show_bug.cgi?id=150345
3265
3266         Reviewed by Beth Dakin.
3267
3268         * page/Chrome.cpp:
3269         (WebCore::Chrome::didBeginTrackingPotentialLongMousePress): Deleted.
3270         (WebCore::Chrome::didRecognizeLongMousePress): Deleted.
3271         (WebCore::Chrome::didCancelTrackingPotentialLongMousePress): Deleted.
3272         * page/Chrome.h:
3273         * page/ChromeClient.h:
3274         * page/EventHandler.cpp:
3275         (WebCore::EventHandler::EventHandler): Deleted.
3276         (WebCore::EventHandler::clear): Deleted.
3277         (WebCore::EventHandler::handleMousePressEvent): Deleted.
3278         (WebCore::EventHandler::eventMayStartDrag): Deleted.
3279         (WebCore::EventHandler::handleMouseReleaseEvent): Deleted.
3280         (WebCore::EventHandler::beginTrackingPotentialLongMousePress): Deleted.
3281         (WebCore::EventHandler::recognizeLongMousePress): Deleted.
3282         (WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Deleted.
3283         (WebCore::EventHandler::clearLongMousePressState): Deleted.
3284         (WebCore::EventHandler::handleLongMousePressMouseMovedEvent): Deleted.
3285         (WebCore::EventHandler::handleMouseMoveEvent): Deleted.
3286         (WebCore::EventHandler::handleDrag): Deleted.
3287         * page/EventHandler.h:
3288         * page/Settings.in:
3289
3290 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3291
3292         WKView being inside WKWebView leads to weird API issues
3293         https://bugs.webkit.org/show_bug.cgi?id=150174
3294
3295         Reviewed by Darin Adler.
3296
3297         No new tests, just moving code around.
3298
3299         * WebCore.xcodeproj/project.pbxproj:
3300         * platform/spi/mac/NSWindowSPI.h: Added.
3301
3302 2015-10-19  Simon Fraser  <simon.fraser@apple.com>
3303
3304         Restore an assertion to the way it was before r191310, which was correct.
3305
3306         * platform/graphics/GraphicsTypes.cpp:
3307         (WebCore::compositeOperatorName):
3308
3309 2015-10-19  Beth Dakin  <bdakin@apple.com>
3310
3311         Build fix.
3312
3313         * dom/EventNames.in:
3314         * dom/make_event_factory.pl:
3315         (generateImplementation):
3316
3317 2015-10-19  Csaba Osztrogonác  <ossy@webkit.org>
3318
3319         Fix the binding generator after r191176
3320         https://bugs.webkit.org/show_bug.cgi?id=150320
3321
3322         Reviewed by Darin Adler.
3323
3324         * bindings/scripts/CodeGeneratorJS.pm:
3325         (GenerateConstructorHelperMethods):
3326         * bindings/scripts/test/JS/JSTestInterface.cpp:
3327         (WebCore::JSTestInterfaceConstructor::getConstructData):
3328
3329 2015-10-19  Commit Queue  <commit-queue@webkit.org>
3330
3331         Unreviewed, rolling out r191307.
3332         https://bugs.webkit.org/show_bug.cgi?id=150338
3333
3334         broke lots of API tests, need time to figure out whats up
3335         (Requested by thorton on #webkit).
3336
3337         Reverted changeset:
3338
3339         "WKView being inside WKWebView leads to weird API issues"
3340         https://bugs.webkit.org/show_bug.cgi?id=150174
3341         http://trac.webkit.org/changeset/191307
3342
3343 2015-10-19  Commit Queue  <commit-queue@webkit.org>
3344
3345         Unreviewed, rolling out r191295, r191297, and r191301.
3346         https://bugs.webkit.org/show_bug.cgi?id=150337
3347
3348         ASSERTs in 5 tests (Requested by litherum on #webkit).
3349
3350         Reverted changesets:
3351
3352         "Host GraphicsContext's CTM inside GraphicsContextState"
3353         https://bugs.webkit.org/show_bug.cgi?id=150146
3354         http://trac.webkit.org/changeset/191295
3355
3356         "[iOS] Build fix after r191295"
3357         http://trac.webkit.org/changeset/191297
3358
3359         "Unreviewed build fix after r191295."
3360         http://trac.webkit.org/changeset/191301
3361
3362 2015-10-16  Brian Burg  <bburg@apple.com>
3363
3364         Unify handling of JavaScriptCore scripts that are used in WebCore
3365         https://bugs.webkit.org/show_bug.cgi?id=150245
3366
3367         Reviewed by Alex Christensen.
3368
3369         Use the new JavaScriptCore_SCRIPTS_DIR variable.
3370
3371         * CMakeLists.txt:
3372         * DerivedSources.make:
3373         * WebCore.xcodeproj/project.pbxproj:
3374
3375             No need to export other variables like InspectorScripts anymore.
3376
3377 2015-10-19  Simon Fraser  <simon.fraser@apple.com>
3378
3379         Add TextStream formatters for FillLayer and all it entails
3380         https://bugs.webkit.org/show_bug.cgi?id=150312
3381
3382         Reviewed by Tim Horton.
3383
3384         Add TextStream output formatters for FillLayer, and all the enum
3385         types used by it.
3386         
3387         Drive-by fixes for CompositeOperator and BlendMode string conversions.
3388         compositeOperatorNames was missing the "difference" string, and compositeOperatorName()
3389         would do an OOB memory access if blendOp was zero.
3390
3391         * CMakeLists.txt:
3392         * WebCore.xcodeproj/project.pbxproj:
3393         * platform/Length.cpp:
3394         (WebCore::operator<<):
3395         * platform/Length.h:
3396         * platform/LengthSize.cpp: Added.
3397         (WebCore::operator<<):
3398         * platform/LengthSize.h:
3399         * platform/text/TextStream.h:
3400         * rendering/style/FillLayer.cpp:
3401         (WebCore::operator<<):
3402         * rendering/style/FillLayer.h:
3403         * rendering/style/RenderStyleConstants.cpp: Added.
3404         (WebCore::operator<<):
3405         * rendering/style/RenderStyleConstants.h:
3406
3407 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3408
3409         WKView being inside WKWebView leads to weird API issues
3410         https://bugs.webkit.org/show_bug.cgi?id=150174
3411
3412         Reviewed by Darin Adler.
3413
3414         No new tests, just moving code around.
3415
3416         * WebCore.xcodeproj/project.pbxproj:
3417         * platform/spi/mac/NSWindowSPI.h: Added.
3418
3419 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3420
3421         Try to fix the iOS build
3422
3423         * Configurations/FeatureDefines.xcconfig:
3424
3425 2015-10-19  Alex Christensen  <achristensen@webkit.org>
3426
3427         Unreviewed build fix after r191295.
3428
3429         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3430         (WebCore::GraphicsContext::translatePlatformCTM):
3431         (WebCore::GraphicsContext::setPlatformFillColor):
3432         (WebCore::GraphicsContext::concatPlatformCTM):
3433         (WebCore::GraphicsContext::setPlatformCTM):
3434         (WebCore::GraphicsContext::setPlatformShadow):
3435         (WebCore::GraphicsContext::rotatePlatformCTM):
3436         (WebCore::GraphicsContext::scalePlatformCTM):
3437         (WebCore::GraphicsContext::clipOut):
3438         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3439         (WebCore::GraphicsContextPlatformPrivate::save):
3440         (WebCore::GraphicsContextPlatformPrivate::restore):
3441         (WebCore::GraphicsContextPlatformPrivate::flush):
3442         (WebCore::GraphicsContextPlatformPrivate::clip):
3443         (WebCore::GraphicsContextPlatformPrivate::scalePlatformCTM):
3444         (WebCore::GraphicsContextPlatformPrivate::rotatePlatformCTM):
3445         (WebCore::GraphicsContextPlatformPrivate::translatePlatformCTM):
3446         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
3447         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
3448         (WebCore::GraphicsContextPlatformPrivate::syncContext):
3449         (WebCore::GraphicsContextPlatformPrivate::scale): Deleted.
3450         (WebCore::GraphicsContextPlatformPrivate::rotate): Deleted.
3451         (WebCore::GraphicsContextPlatformPrivate::translate): Deleted.
3452         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
3453         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
3454
3455 2015-10-19  Tim Horton  <timothy_horton@apple.com>
3456
3457         Add magnify and rotate gesture event support for Mac
3458         https://bugs.webkit.org/show_bug.cgi?id=150179
3459         <rdar://problem/8036240>
3460
3461         Reviewed by Darin Adler.
3462
3463         No new tests.
3464
3465         * Configurations/FeatureDefines.xcconfig:
3466         New feature flag.
3467
3468         * Configurations/WebCore.xcconfig:
3469         Don't exclude generated gesture sources; they are already #ifdef-guarded.
3470
3471         * DerivedSources.make:
3472         Add GestureEvent.idl for ENABLE_MAC_GESTURE_EVENTS too.
3473
3474         * WebCore.xcodeproj/project.pbxproj:
3475         Add GestureEvents.cpp.
3476
3477         * bindings/objc/DOMEvents.mm:
3478         (kitClass):
3479         Support DOMGestureEvent on Mac if the new flag is enabled.
3480
3481         * dom/mac/GestureEvents.cpp: Added.
3482         * page/mac/EventHandlerMac.mm:
3483
3484         * page/EventHandler.cpp:
3485         (WebCore::EventHandler::clear):
3486         * page/EventHandler.h:
3487         Enable some gesture-related code on Mac if the new flag is enabled.
3488
3489         * platform/PlatformEvent.h:
3490
3491 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3492
3493         [iOS] Build fix after r191295
3494
3495         Unreviewed.
3496
3497         * platform/graphics/cg/GraphicsContextCG.cpp:
3498         (WebCore::GraphicsContext::resetPlatformCTM):
3499
3500 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3501
3502         Host GraphicsContext's CTM inside GraphicsContextState
3503         https://bugs.webkit.org/show_bug.cgi?id=150146
3504
3505         Reviewed by Simon Fraser.
3506
3507         There are 6 operations which interact with CTMs:
3508         - Get
3509         - Set
3510         - Concatenate
3511         - Scale
3512         - Rotate
3513         - Translate
3514
3515         This patch modifies all these operations so that these operations shadow the
3516         platform's CTM inside GraphicsContextState. This way, we don't have to consult
3517         with the underlying graphics context in order to know the current CTM.
3518
3519         There are currently many places in the Core Graphics ports where we will change
3520         the platform's CTM out from under the GraphicsContext. This patch migrates
3521         those users to going through GraphicsContext, thereby preserving the integrity
3522         of the shadowed state.
3523
3524         No new tests because there is no behavior change.
3525
3526         * platform/graphics/GraphicsContext.cpp: Setters deletate to platform calls.
3527         The getter can just consult with the shadowed state.
3528         (WebCore::GraphicsContext::concatCTM):
3529         (WebCore::GraphicsContext::scale):
3530         (WebCore::GraphicsContext::rotate):
3531         (WebCore::GraphicsContext::translate):
3532         (WebCore::GraphicsContext::setCTM):
3533         (WebCore::GraphicsContext::getCTM):
3534         (WebCore::GraphicsContext::beginTransparencyLayer):
3535         (WebCore::GraphicsContext::applyDeviceScaleFactor):
3536         * platform/graphics/GraphicsContext.h:
3537         (WebCore::GraphicsContext::scale):
3538         (WebCore::GraphicsContext::checkCTMInvariants): Make sure the shadowed state
3539         matches the platform graphics context's state.
3540         * platform/graphics/cairo/GraphicsContextCairo.cpp: Renaming functions.
3541         (WebCore::GraphicsContext::resetPlatformCTM):
3542         (WebCore::GraphicsContext::getPlatformCTM):
3543         (WebCore::GraphicsContext::translatePlatformCTM):
3544         (WebCore::GraphicsContext::concatPlatformCTM):
3545         (WebCore::GraphicsContext::setPlatformCTM):
3546         (WebCore::GraphicsContext::rotatePlatformCTM):
3547         (WebCore::GraphicsContext::scalePlatformCTM):
3548         (WebCore::GraphicsContext::getCTM): Deleted.
3549         (WebCore::GraphicsContext::translate): Deleted.
3550         (WebCore::GraphicsContext::concatCTM): Deleted.
3551         (WebCore::GraphicsContext::setCTM): Deleted.
3552         (WebCore::GraphicsContext::rotate): Deleted.
3553         (WebCore::GraphicsContext::scale): Deleted.
3554         * platform/graphics/cg/GraphicsContextCG.cpp: Renaming functions. Also,
3555         migrate CTM setters to go through GraphicsContext.
3556         (WebCore::GraphicsContext::resetPlatformCTM):
3557         (WebCore::GraphicsContext::platformInit):
3558         (WebCore::GraphicsContext::drawNativeImage):
3559         (WebCore::drawPatternCallback):
3560         (WebCore::GraphicsContext::drawPattern):
3561         (WebCore::GraphicsContext::fillPath):
3562         (WebCore::GraphicsContext::strokePath):
3563         (WebCore::GraphicsContext::fillRect):
3564         (WebCore::GraphicsContext::strokeRect):
3565         (WebCore::GraphicsContext::scalePlatformCTM):
3566         (WebCore::GraphicsContext::rotatePlatformCTM):
3567         (WebCore::GraphicsContext::translatePlatformCTM):
3568         (WebCore::GraphicsContext::concatPlatformCTM):
3569         (WebCore::GraphicsContext::setPlatformCTM):
3570         (WebCore::GraphicsContext::getPlatformCTM):
3571         (WebCore::GraphicsContext::scale): Deleted.
3572         (WebCore::GraphicsContext::rotate): Deleted.
3573         (WebCore::GraphicsContext::translate): Deleted.
3574         (WebCore::GraphicsContext::concatCTM): Deleted.
3575         (WebCore::GraphicsContext::setCTM): Deleted.
3576         (WebCore::GraphicsContext::getCTM): Deleted.
3577         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
3578         (WebCore::GraphicsContextPlatformPrivate::save):
3579         (WebCore::GraphicsContextPlatformPrivate::restore):
3580         (WebCore::GraphicsContextPlatformPrivate::flush):
3581         (WebCore::GraphicsContextPlatformPrivate::clip):
3582         (WebCore::GraphicsContextPlatformPrivate::scale):
3583         (WebCore::GraphicsContextPlatformPrivate::rotate):
3584         (WebCore::GraphicsContextPlatformPrivate::translate):
3585         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
3586         (WebCore::GraphicsContextPlatformPrivate::setCTM):
3587         * platform/graphics/transforms/AffineTransform.h:
3588         (WebCore::AffineTransform::isEssentiallyEqualTo): Equality comparison on floats
3589         is not a good idea. Instead, this function is more valuable. (However, note that
3590         it is expected for values in a CTM to hold values close to 0, which means that
3591         this function might erroneously return false (similar to operator=()).
3592         * platform/graphics/win/GraphicsContextWin.cpp:
3593         (WebCore::GraphicsContextPlatformPrivate::scale):
3594         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
3595         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
3596         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
3597         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
3598         * platform/mac/DragImageMac.mm:
3599         (WebCore::drawAtPoint):
3600
3601 2015-10-19  Chris Dumez  <cdumez@apple.com>
3602
3603         Null dereference loading Blink layout test fast/forms/color/input-color-onchange-event.html
3604         https://bugs.webkit.org/show_bug.cgi?id=150192
3605         <rdar://problem/23135050>
3606
3607         Reviewed by Darin Adler.
3608
3609         Calling internals.selectColorInColorChooser() with a non-Element would
3610         cause a null dereference. This is because in such case, the implementation
3611         method is passed a null pointer and we would fail to null-check it. This
3612         patch now does the null-check.
3613
3614         No new tests, existing test was updated.
3615
3616         * testing/Internals.cpp:
3617         (WebCore::Internals::selectColorInColorChooser):
3618
3619 2015-10-19  Csaba Osztrogonác  <ossy@webkit.org>
3620
3621         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r190840
3622         https://bugs.webkit.org/show_bug.cgi?id=150322
3623
3624         Reviewed by Ryosuke Niwa.
3625
3626         * html/HTMLDetailsElement.cpp:
3627
3628 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3629
3630         Binding generator should generate names for JSBuiltins partial interface methods using ImplementedBy value
3631         https://bugs.webkit.org/show_bug.cgi?id=150163
3632
3633         Reviewed by Darin Adler.
3634
3635         Covered by updated binding tests.
3636
3637         Updating generation of JS built-in function/attribute name to use the ImplementedBy value of the interface if any.
3638         This allows splitting JS built-ins just like is done for IDLs.
3639         Updated accordingly the JS Builtin header include.
3640
3641         * bindings/scripts/CodeGeneratorJS.pm:
3642         (GetAttributeGetterName): Updated to pass function object and not only function name.
3643         (GetAttributeSetterName): Ditto.
3644         (GetFunctionName): Removed unneeded code plus updated to pass function object and not only function name.
3645         (GenerateConstructorHelperMethods): Making direct use of GetJSBuiltinFunctionNameFromString since there is no function object for the constructor.
3646         (GetJSBuiltinFunctionName): Updated to take into accound ImplementedBy value if any.
3647         (GetJSBuiltinFunctionNameFromString):
3648         (GetJSBuiltinScopeName): Returns either the interface name or its ImplementedBy value.
3649         (AddJSBuiltinIncludesIfNeeded): Updating name of the header in case of partial interface.
3650         * bindings/scripts/test/JS/JSTestInterface.cpp:
3651         * bindings/scripts/test/ObjC/DOMTestInterface.h:
3652         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
3653         (-[DOMTestInterface builtinAttribute]):
3654         (-[DOMTestInterface setBuiltinAttribute:]):
3655         (-[DOMTestInterface builtinFunction]):
3656         * bindings/scripts/test/TestSupplemental.idl: Added JSBuiltin attribute and function.
3657
3658 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3659
3660         Binding generator should allow generating private JS functions
3661         https://bugs.webkit.org/show_bug.cgi?id=150167
3662
3663         Reviewed by Darin Adler.
3664
3665         Introducing the "Private" keyword for that purpose.
3666         Applying it to MediaDevices.getUserMedia which can be used directly or through navigator.webkitGetUserMedia
3667         which could be implemented as JS builtin based on it.
3668
3669         "Private" functions are added to the prototype with a corresponding private symbol.
3670         This symbol must be defined in bindings/js/WebCoreBuiltinNames.h.
3671
3672         Adding a getUserMediaFromJS function visible from builtins script.
3673         Implementing MediaDevices.getUserMedia as a JS builtin based on it.
3674
3675         Adding binding generator test.
3676
3677         * CMakeLists.txt: Adding MediaDevices.js.
3678         * DerivedSources.make: Ditto.
3679         * Modules/mediastream/MediaDevices.h:
3680         (WebCore::MediaDevices::getUserMediaFromJS):
3681         * Modules/mediastream/MediaDevices.idl: Marking getUserMediaFromJS private and getUserMedia JSBuiltin.
3682         * Modules/mediastream/MediaDevices.js: Added.
3683         (getUserMedia):
3684         * bindings/js/WebCoreBuiltinNames.h:
3685         * bindings/js/WebCoreJSBuiltins.cpp:
3686         * bindings/js/WebCoreJSBuiltins.h:
3687         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
3688         (WebCore::JSBuiltinFunctions::mediaDevicesBuiltins):
3689         * bindings/scripts/CodeGeneratorGObject.pm: Skipping generation of Private functions.
3690         (SkipFunction):
3691         * bindings/scripts/CodeGeneratorJS.pm:
3692         (GenerateImplementation): Disabling addition of private function in table and adding private member field to the prototype.
3693         * bindings/scripts/CodeGeneratorObjC.pm: Skipping generation of Private functions.
3694         (SkipFunction):
3695         * bindings/scripts/IDLAttributes.txt: Adding Private keyword.
3696         * bindings/scripts/test/JS/JSTestObj.cpp: Adding Private keyword test.
3697         (WebCore::JSTestObjPrototype::finishCreation):
3698         (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
3699         * bindings/scripts/test/TestObj.idl:
3700
3701 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3702
3703         [Streams API] Implement ReadableStream tee
3704         https://bugs.webkit.org/show_bug.cgi?id=146315
3705
3706         Reviewed by Darin Adler.
3707
3708         Covered by rebased test.
3709
3710         * Modules/streams/ReadableStream.js:
3711         (tee): Removing not implemented exception throwing.
3712         * Modules/streams/ReadableStreamInternals.js:
3713         (teeReadableStream): Implementing as per spec.
3714         (teeReadableStreamPullFunction): Ditto.
3715         (teeReadableStreamBranch2CancelFunction): Ditto.
3716
3717 2015-10-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3718
3719         [Streams API] Add skeleton for initial WritableStream support
3720         https://bugs.webkit.org/show_bug.cgi?id=149951
3721
3722         Reviewed by Darin Adler.
3723
3724         This basically adds an empty WritableStream object without initializing the object. It also adds all empty
3725         methods by raising an exception.
3726
3727         The reason why the object is not fully initialized is that it requires some other support and some refactorings
3728         to share more code with ReadableStream and we will make in following patches.
3729
3730         Tests are covered by current set and their expectations are properly updated.
3731
3732         * CMakeLists.txt:
3733         * DerivedSources.cpp:
3734         * DerivedSources.make:
3735         * WebCore.vcxproj/WebCore.vcxproj:
3736         * WebCore.vcxproj/WebCore.vcxproj.filters:
3737         * WebCore.xcodeproj/project.pbxproj:
3738         * bindings/js/WebCoreJSBuiltins.cpp:
3739         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
3740         * Modules/streams/WritableStream.idl: Added all methods and attributes.
3741         * Modules/streams/WritableStream.js:
3742         (initializeWritableStream):
3743         (abort):
3744         (close):
3745         (write):
3746         (closed):
3747         (ready):
3748         (state): Added all by throwing an EvalError.
3749
3750 2015-10-18  Chris Dumez  <cdumez@apple.com>
3751
3752         Script element with an empty for or event attributes should not execute
3753         https://bugs.webkit.org/show_bug.cgi?id=148855
3754         <rdar://problem/22588156>
3755
3756         Reviewed by Darin Adler.
3757
3758         A script element with an empty for or event attributes should not execute
3759         as per:
3760         https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script (step 12)
3761
3762         Our implementation had a bug where it would not correctly differentiate
3763         an empty attribute from a missing one. This patch fixes this.
3764
3765         No new tests, already covered by existing test.
3766
3767         * dom/ScriptElement.cpp:
3768         (WebCore::ScriptElement::isScriptForEventSupported):
3769
3770 2015-10-18  Chris Dumez  <cdumez@apple.com>
3771
3772         WebKit must support all JavaScript MIME types in HTML5 spec
3773         https://bugs.webkit.org/show_bug.cgi?id=148854
3774         <rdar://problem/22588195>
3775
3776         Reviewed by Darin Adler.
3777
3778         WebKit did not execute certain EcmaScript MIME types although the HTML
3779         specification says all user agents should support those:
3780         https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type
3781
3782         In particular, the following MIME types are now recognized as valid and
3783         executed: "application/x-ecmascript", "text/javascript1.0",
3784         "text/javascript1.4", "text/javascript1.5", "text/x-javascript",
3785         "text/x-ecmascript".
3786
3787         The new behavior is consistent with Firefox.
3788
3789         No new tests, already covered by existing test.
3790
3791         * platform/MIMETypeRegistry.cpp:
3792         (WebCore::initializeSupportedJavaScriptMIMETypes):
3793
3794 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
3795
3796         [Win] Fix the Windows builds.
3797         https://bugs.webkit.org/show_bug.cgi?id=150300
3798
3799         Reviewed by Darin Adler.
3800
3801         Add missing files to WebCore.vcxproj.
3802         Add missing #includes to CSSAllInOne.cpp and HTMLElementsAllInOne.cpp.
3803
3804         No new tests, no behavior change.
3805
3806         * WebCore.vcxproj/WebCore.vcxproj:
3807         * WebCore.vcxproj/WebCore.vcxproj.filters:
3808         * css/CSSAllInOne.cpp:
3809         * html/HTMLElementsAllInOne.cpp:
3810
3811 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
3812
3813         Fix the builds with ENABLE_CONTENT_EXTENSIONS=OFF.
3814         https://bugs.webkit.org/show_bug.cgi?id=150302
3815
3816         Reviewed by Darin Adler.
3817
3818         Add missing #if ENABLE(CONTENT_EXTENSIONS).
3819
3820         No new tests, no behavior change.
3821
3822         * page/UserContentController.h:
3823
3824 2015-10-18  Joonghun Park  <jh718.park@samsung.com>
3825
3826         [EFL] Fix debug build break since r191198
3827         https://bugs.webkit.org/show_bug.cgi?id=150277
3828
3829         Reviewed by Darin Adler.
3830
3831         No new tests, no new behaviours.
3832
3833         Use the correct %"PRIu64" for uint64_t,
3834         instead of %llu.
3835
3836         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3837         (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent):
3838         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
3839         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
3840         * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp:
3841         (WebCore::IDBDatabaseBackend::processPendingOpenCalls):
3842         (WebCore::IDBDatabaseBackend::openConnectionInternal):
3843         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3844         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
3845
3846 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
3847
3848         Fix the builds with ENABLE_INDEX_DATABASE=OFF.
3849         https://bugs.webkit.org/show_bug.cgi?id=150301
3850
3851         Reviewed by Darin Adler.
3852
3853         Add missing #if ENABLE(INDEXED_DATABASE).
3854
3855         No new tests, no behavior change.
3856
3857         * page/Page.cpp:
3858
3859 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
3860
3861         [Cocoa] [Win] Remove unused code from GraphicsContext
3862         https://bugs.webkit.org/show_bug.cgi?id=150304
3863
3864         Reviewed by Darin Adler.
3865
3866         No new tests because there is no behavior change.
3867
3868         * platform/graphics/GraphicsContext.h:
3869         * platform/graphics/cg/GraphicsContextCG.cpp:
3870         (WebCore::GraphicsContext::setAllowsFontSmoothing): Deleted.
3871
3872 2015-10-18  Antti Koivisto  <antti@apple.com>
3873
3874         Computed style should work correctly with slotted elements that have display:none
3875         https://bugs.webkit.org/show_bug.cgi?id=150237
3876
3877         Reviewed by Andreas Kling..
3878
3879         If an element has display:none we don't normally retain or even compute its style (as it is not rendered).
3880         If getComputedStyle is invoked for such element we resolve the style (along with any ancestors) and cache
3881         it separately to rare data. This path needs to work with slotted elements in shadow trees.
3882
3883         This patch also make computedStyle() iterative rather than recursive.
3884
3885         Test: fast/shadow-dom/computed-style-display-none.html
3886
3887         * dom/Document.cpp:
3888         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
3889
3890             Pass in the parent style instead of invoking computedStyle() recursively.
3891
3892         * dom/Document.h:
3893         * dom/Element.cpp:
3894         (WebCore::beforeOrAfterPseudoElement):
3895         (WebCore::Element::existingComputedStyle):
3896         (WebCore::Element::resolveComputedStyle):
3897
3898             Iterative resolve function that uses composed tree iterator.
3899
3900         (WebCore::Element::computedStyle):
3901
3902             Factor into helpers.
3903
3904         * dom/Element.h:
3905         * dom/Node.cpp:
3906         (WebCore::Node::computedStyle):
3907
3908             Use the composed tree iterator.
3909
3910         * html/HTMLSelectElement.cpp:
3911         (WebCore::HTMLSelectElement::selectOption):
3912
3913             Call updateValidity() before calling renderer->updateFromElement(). Calling updateFromElement()
3914             may end up in Element::computedStyle() which can asserts if validity is not up to date.
3915
3916 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
3917
3918         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
3919         https://bugs.webkit.org/show_bug.cgi?id=150287
3920
3921         Reviewed by Simon Fraser.
3922
3923         This user default is currently on by default. Therefore, by setting the user default,
3924         users can only disable kerning / ligatures (rather than enable it).
3925
3926         There are a few reasons why we should stop honoring it:
3927
3928         1. In the brave new world of font-feature-settings and font-variant-ligatures, there
3929         are many different kinds of ligatures which may be enabled at will. The simplistic
3930         statement of "turn on ligatures" no longer has any meaning.
3931
3932         2. If a user wants to disable kerning / ligatures, he/she can do it with a user
3933         stylesheet.
3934
3935         3. The default isn't able to be tested with DumpRenderTree or WebKitTestRunner.
3936
3937         4. I have never heard of anyone actually using this user default.
3938
3939         * platform/graphics/FontCascade.cpp:
3940         (WebCore::FontCascade::setDefaultKerning): Deleted.
3941         (WebCore::FontCascade::setDefaultLigatures): Deleted.
3942         * platform/graphics/FontCascade.h:
3943         (WebCore::FontCascade::advancedTextRenderingMode):
3944
3945 2015-10-18  Commit Queue  <commit-queue@webkit.org>
3946
3947         Unreviewed, rolling out r191250 and r191253.
3948         https://bugs.webkit.org/show_bug.cgi?id=150296
3949
3950         Broke all the tests on Windows (Requested by ap on #webkit).
3951
3952         Reverted changesets:
3953
3954         "Stop honoring the user default
3955         "WebKitKerningAndLigaturesEnabledByDefault""
3956         https://bugs.webkit.org/show_bug.cgi?id=150287
3957         http://trac.webkit.org/changeset/191250
3958
3959         "Build fix after r191250"
3960         http://trac.webkit.org/changeset/191253
3961
3962 2015-10-17  David Hyatt  <hyatt@apple.com>
3963
3964         Implement the CSS4 'revert' keyword.
3965         https://bugs.webkit.org/show_bug.cgi?id=149702
3966
3967         Reviewed by Simon Fraser.
3968
3969         Added new tests in fast/css and fast/css/variables.
3970
3971         * CMakeLists.txt:
3972         * WebCore.xcodeproj/project.pbxproj:
3973         Add CSSRevertValue to the project and makefiles.
3974
3975         * css/CSSParser.cpp:
3976         (WebCore::parseKeywordValue):
3977         Make sure to handle "revert" in the keyword parsing path (along with inherit/initial/unset).
3978
3979         (WebCore::CSSParser::parseValue):
3980         (WebCore::CSSParser::parseCustomPropertyDeclaration):
3981         At the parser level, "revert" is just like inherit/initial/unset and gets its own special
3982         singleton value, CSSRevertValue.
3983
3984         * css/CSSRevertValue.cpp: Added.
3985         (WebCore::CSSRevertValue::customCSSText):
3986         * css/CSSRevertValue.h: Added.
3987         (WebCore::CSSRevertValue::create):
3988         (WebCore::CSSRevertValue::equals):
3989         (WebCore::CSSRevertValue::CSSRevertValue):
3990         This value is identical to the inherit/initial/unset values, i.e., its own special value
3991         that can be used to indicate a revert when doing style resolution.
3992
3993         * css/CSSValue.cpp:
3994         (WebCore::CSSValue::cssValueType):
3995         (WebCore::CSSValue::equals):
3996         (WebCore::CSSValue::cssText):
3997         (WebCore::CSSValue::destroy):
3998         * css/CSSValue.h:
3999         (WebCore::CSSValue::isInheritedValue):
4000         (WebCore::CSSValue::isInitialValue):
4001         (WebCore::CSSValue::isUnsetValue):
4002         (WebCore::CSSValue::isRevertValue):
4003         Add the RevertClass to CSSValue and make sure it is handled in all the appropriate methods.
4004
4005         * css/CSSValueKeywords.in:
4006         Add the "revert" keyword to the list of allowed CSS keywords.
4007
4008         * css/CSSValuePool.cpp:
4009         (WebCore::CSSValuePool::CSSValuePool):
4010         * css/CSSValuePool.h:
4011         (WebCore::CSSValuePool::createRevertValue):
4012         Add support for a CSSRevertValue singleton, just like inherit/unset/initial.
4013
4014         * css/FontLoader.cpp:
4015         (WebCore::FontLoader::resolveFontStyle):
4016         Add "unset" and "revert" as special keywords to be ignored. This code seems to be turned off,
4017         but patching it anyway.
4018
4019         * css/SelectorChecker.h:
4020         Add a MatchDefault value of 0 to the LinkMatchMask. This enables it to be used as an index
4021         to the correct value in Property (in the style resolution code).
4022
4023         * css/StyleResolver.cpp:
4024         (WebCore::StyleResolver::State::initForStyleResolve):
4025         Delete any lingering old CascadedProperty rollbacks for UA/user rules.
4026
4027         (WebCore::StyleResolver::styleForKeyframe):
4028         (WebCore::StyleResolver::styleForPage):
4029         (WebCore::StyleResolver::applyMatchedProperties):
4030         Pass along the MatchResult as an additional parameter, since we need it to lazily compute
4031         the cascade rollbacks if the "revert" keyword is encountered.
4032
4033         (WebCore::StyleResolver::cascadedPropertiesForRollback):
4034         This method will lazily create and return a new CascadedProperties pointer that is cached
4035         in the StyleResolver's state. This will contain only UA rules (for user reverts) and UA/user
4036         rules (for author reverts). These will only be computed at most once for a given element
4037         when doing a reversion, and they will be computed lazily, i.e., only if a revert is
4038         requested.
4039
4040         (WebCore::StyleResolver::applyProperty):
4041         Pass along the LinkMatchMask and the MatchResult to applyProperty. This way we know specifically
4042         which link type we were computing if we have to revert (so that we roll back and look at the
4043         same index in the reverted version). The MatchResult is passed along because it is needed
4044         to build the CascadedProperties rollbacks.
4045
4046         The basic idea is that if a revert is encountered, the level that the rule came from is
4047         checked. If it is UA level, just treat as "unset." If it is author or user level, get
4048         the correct CascadedProperties rollback and repeat the applyProperty using the property
4049         found in the rollback. If the property is not present in the cascade rollback, then the
4050         revert becomes an unset.
4051
4052         (WebCore::StyleResolver::CascadedProperties::hasCustomProperty):
4053         (WebCore::StyleResolver::CascadedProperties::customProperty):
4054         Helpers used by applyProperty to check on custom properties, since they can revert too
4055         just like a regular property can.
4056
4057         (WebCore::StyleResolver::CascadedProperties::setPropertyInternal):
4058         (WebCore::StyleResolver::CascadedProperties::set):
4059         (WebCore::StyleResolver::CascadedProperties::setDeferred):
4060         Passing along the CascadeLevel (UA, User, Author) so that it can be stored in the Property.
4061         This way when we do property application, we always know where the rule came from so
4062         that the reversion can be handled properly.
4063
4064         (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
4065         (WebCore::cascadeLevelForIndex):
4066         (WebCore::StyleResolver::CascadedProperties::addMatches):
4067         When style properties are added, also figure out the CascadeLevel and pass it along to be
4068         stored in the Property. We use the MatchResult's ranges to know where a property comes from.
4069
4070         (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties):
4071         (WebCore::StyleResolver::CascadedProperties::Property::apply):
4072         (WebCore::StyleResolver::applyCascadedProperties):
4073         Pass along the MatchResult so we know how to build the rollback.
4074
4075         * css/StyleResolver.h:
4076         (WebCore::StyleResolver::State::cascadeLevel):
4077         (WebCore::StyleResolver::State::setCascadeLevel):
4078         (WebCore::StyleResolver::State::authorRollback):
4079         (WebCore::StyleResolver::State::userRollback):
4080         (WebCore::StyleResolver::State::setAuthorRollback):
4081         (WebCore::StyleResolver::State::setUserRollback):
4082         (WebCore::StyleResolver::state):
4083         (WebCore::StyleResolver::cascadeLevel):
4084         (WebCore::StyleResolver::setCascadeLevel):
4085         Move CascadedProperties into the header. Add CascadeLevel to Property. Add the level and
4086         rollbacks to the resolver's state.
4087
4088 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
4089
4090