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