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