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