8e843e889dff5c2d2c8c6bb637459ce7e0afa133
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-19  Tim Horton  <timothy_horton@apple.com>
2
3         Add magnify and rotate gesture event support for Mac
4         https://bugs.webkit.org/show_bug.cgi?id=150179
5         <rdar://problem/8036240>
6
7         Reviewed by Darin Adler.
8
9         No new tests.
10
11         * Configurations/FeatureDefines.xcconfig:
12         New feature flag.
13
14         * Configurations/WebCore.xcconfig:
15         Don't exclude generated gesture sources; they are already #ifdef-guarded.
16
17         * DerivedSources.make:
18         Add GestureEvent.idl for ENABLE_MAC_GESTURE_EVENTS too.
19
20         * WebCore.xcodeproj/project.pbxproj:
21         Add GestureEvents.cpp.
22
23         * bindings/objc/DOMEvents.mm:
24         (kitClass):
25         Support DOMGestureEvent on Mac if the new flag is enabled.
26
27         * dom/mac/GestureEvents.cpp: Added.
28         * page/mac/EventHandlerMac.mm:
29
30         * page/EventHandler.cpp:
31         (WebCore::EventHandler::clear):
32         * page/EventHandler.h:
33         Enable some gesture-related code on Mac if the new flag is enabled.
34
35         * platform/PlatformEvent.h:
36
37 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
38
39         [iOS] Build fix after r191295
40
41         Unreviewed.
42
43         * platform/graphics/cg/GraphicsContextCG.cpp:
44         (WebCore::GraphicsContext::resetPlatformCTM):
45
46 2015-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
47
48         Host GraphicsContext's CTM inside GraphicsContextState
49         https://bugs.webkit.org/show_bug.cgi?id=150146
50
51         Reviewed by Simon Fraser.
52
53         There are 6 operations which interact with CTMs:
54         - Get
55         - Set
56         - Concatenate
57         - Scale
58         - Rotate
59         - Translate
60
61         This patch modifies all these operations so that these operations shadow the
62         platform's CTM inside GraphicsContextState. This way, we don't have to consult
63         with the underlying graphics context in order to know the current CTM.
64
65         There are currently many places in the Core Graphics ports where we will change
66         the platform's CTM out from under the GraphicsContext. This patch migrates
67         those users to going through GraphicsContext, thereby preserving the integrity
68         of the shadowed state.
69
70         No new tests because there is no behavior change.
71
72         * platform/graphics/GraphicsContext.cpp: Setters deletate to platform calls.
73         The getter can just consult with the shadowed state.
74         (WebCore::GraphicsContext::concatCTM):
75         (WebCore::GraphicsContext::scale):
76         (WebCore::GraphicsContext::rotate):
77         (WebCore::GraphicsContext::translate):
78         (WebCore::GraphicsContext::setCTM):
79         (WebCore::GraphicsContext::getCTM):
80         (WebCore::GraphicsContext::beginTransparencyLayer):
81         (WebCore::GraphicsContext::applyDeviceScaleFactor):
82         * platform/graphics/GraphicsContext.h:
83         (WebCore::GraphicsContext::scale):
84         (WebCore::GraphicsContext::checkCTMInvariants): Make sure the shadowed state
85         matches the platform graphics context's state.
86         * platform/graphics/cairo/GraphicsContextCairo.cpp: Renaming functions.
87         (WebCore::GraphicsContext::resetPlatformCTM):
88         (WebCore::GraphicsContext::getPlatformCTM):
89         (WebCore::GraphicsContext::translatePlatformCTM):
90         (WebCore::GraphicsContext::concatPlatformCTM):
91         (WebCore::GraphicsContext::setPlatformCTM):
92         (WebCore::GraphicsContext::rotatePlatformCTM):
93         (WebCore::GraphicsContext::scalePlatformCTM):
94         (WebCore::GraphicsContext::getCTM): Deleted.
95         (WebCore::GraphicsContext::translate): Deleted.
96         (WebCore::GraphicsContext::concatCTM): Deleted.
97         (WebCore::GraphicsContext::setCTM): Deleted.
98         (WebCore::GraphicsContext::rotate): Deleted.
99         (WebCore::GraphicsContext::scale): Deleted.
100         * platform/graphics/cg/GraphicsContextCG.cpp: Renaming functions. Also,
101         migrate CTM setters to go through GraphicsContext.
102         (WebCore::GraphicsContext::resetPlatformCTM):
103         (WebCore::GraphicsContext::platformInit):
104         (WebCore::GraphicsContext::drawNativeImage):
105         (WebCore::drawPatternCallback):
106         (WebCore::GraphicsContext::drawPattern):
107         (WebCore::GraphicsContext::fillPath):
108         (WebCore::GraphicsContext::strokePath):
109         (WebCore::GraphicsContext::fillRect):
110         (WebCore::GraphicsContext::strokeRect):
111         (WebCore::GraphicsContext::scalePlatformCTM):
112         (WebCore::GraphicsContext::rotatePlatformCTM):
113         (WebCore::GraphicsContext::translatePlatformCTM):
114         (WebCore::GraphicsContext::concatPlatformCTM):
115         (WebCore::GraphicsContext::setPlatformCTM):
116         (WebCore::GraphicsContext::getPlatformCTM):
117         (WebCore::GraphicsContext::scale): Deleted.
118         (WebCore::GraphicsContext::rotate): Deleted.
119         (WebCore::GraphicsContext::translate): Deleted.
120         (WebCore::GraphicsContext::concatCTM): Deleted.
121         (WebCore::GraphicsContext::setCTM): Deleted.
122         (WebCore::GraphicsContext::getCTM): Deleted.
123         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
124         (WebCore::GraphicsContextPlatformPrivate::save):
125         (WebCore::GraphicsContextPlatformPrivate::restore):
126         (WebCore::GraphicsContextPlatformPrivate::flush):
127         (WebCore::GraphicsContextPlatformPrivate::clip):
128         (WebCore::GraphicsContextPlatformPrivate::scale):
129         (WebCore::GraphicsContextPlatformPrivate::rotate):
130         (WebCore::GraphicsContextPlatformPrivate::translate):
131         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
132         (WebCore::GraphicsContextPlatformPrivate::setCTM):
133         * platform/graphics/transforms/AffineTransform.h:
134         (WebCore::AffineTransform::isEssentiallyEqualTo): Equality comparison on floats
135         is not a good idea. Instead, this function is more valuable. (However, note that
136         it is expected for values in a CTM to hold values close to 0, which means that
137         this function might erroneously return false (similar to operator=()).
138         * platform/graphics/win/GraphicsContextWin.cpp:
139         (WebCore::GraphicsContextPlatformPrivate::scale):
140         (WebCore::GraphicsContextPlatformPrivate::concatPlatformCTM):
141         (WebCore::GraphicsContextPlatformPrivate::setPlatformCTM):
142         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Deleted.
143         (WebCore::GraphicsContextPlatformPrivate::setCTM): Deleted.
144         * platform/mac/DragImageMac.mm:
145         (WebCore::drawAtPoint):
146
147 2015-10-19  Chris Dumez  <cdumez@apple.com>
148
149         Null dereference loading Blink layout test fast/forms/color/input-color-onchange-event.html
150         https://bugs.webkit.org/show_bug.cgi?id=150192
151         <rdar://problem/23135050>
152
153         Reviewed by Darin Adler.
154
155         Calling internals.selectColorInColorChooser() with a non-Element would
156         cause a null dereference. This is because in such case, the implementation
157         method is passed a null pointer and we would fail to null-check it. This
158         patch now does the null-check.
159
160         No new tests, existing test was updated.
161
162         * testing/Internals.cpp:
163         (WebCore::Internals::selectColorInColorChooser):
164
165 2015-10-19  Csaba Osztrogonác  <ossy@webkit.org>
166
167         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r190840
168         https://bugs.webkit.org/show_bug.cgi?id=150322
169
170         Reviewed by Ryosuke Niwa.
171
172         * html/HTMLDetailsElement.cpp:
173
174 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
175
176         Binding generator should generate names for JSBuiltins partial interface methods using ImplementedBy value
177         https://bugs.webkit.org/show_bug.cgi?id=150163
178
179         Reviewed by Darin Adler.
180
181         Covered by updated binding tests.
182
183         Updating generation of JS built-in function/attribute name to use the ImplementedBy value of the interface if any.
184         This allows splitting JS built-ins just like is done for IDLs.
185         Updated accordingly the JS Builtin header include.
186
187         * bindings/scripts/CodeGeneratorJS.pm:
188         (GetAttributeGetterName): Updated to pass function object and not only function name.
189         (GetAttributeSetterName): Ditto.
190         (GetFunctionName): Removed unneeded code plus updated to pass function object and not only function name.
191         (GenerateConstructorHelperMethods): Making direct use of GetJSBuiltinFunctionNameFromString since there is no function object for the constructor.
192         (GetJSBuiltinFunctionName): Updated to take into accound ImplementedBy value if any.
193         (GetJSBuiltinFunctionNameFromString):
194         (GetJSBuiltinScopeName): Returns either the interface name or its ImplementedBy value.
195         (AddJSBuiltinIncludesIfNeeded): Updating name of the header in case of partial interface.
196         * bindings/scripts/test/JS/JSTestInterface.cpp:
197         * bindings/scripts/test/ObjC/DOMTestInterface.h:
198         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
199         (-[DOMTestInterface builtinAttribute]):
200         (-[DOMTestInterface setBuiltinAttribute:]):
201         (-[DOMTestInterface builtinFunction]):
202         * bindings/scripts/test/TestSupplemental.idl: Added JSBuiltin attribute and function.
203
204 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
205
206         Binding generator should allow generating private JS functions
207         https://bugs.webkit.org/show_bug.cgi?id=150167
208
209         Reviewed by Darin Adler.
210
211         Introducing the "Private" keyword for that purpose.
212         Applying it to MediaDevices.getUserMedia which can be used directly or through navigator.webkitGetUserMedia
213         which could be implemented as JS builtin based on it.
214
215         "Private" functions are added to the prototype with a corresponding private symbol.
216         This symbol must be defined in bindings/js/WebCoreBuiltinNames.h.
217
218         Adding a getUserMediaFromJS function visible from builtins script.
219         Implementing MediaDevices.getUserMedia as a JS builtin based on it.
220
221         Adding binding generator test.
222
223         * CMakeLists.txt: Adding MediaDevices.js.
224         * DerivedSources.make: Ditto.
225         * Modules/mediastream/MediaDevices.h:
226         (WebCore::MediaDevices::getUserMediaFromJS):
227         * Modules/mediastream/MediaDevices.idl: Marking getUserMediaFromJS private and getUserMedia JSBuiltin.
228         * Modules/mediastream/MediaDevices.js: Added.
229         (getUserMedia):
230         * bindings/js/WebCoreBuiltinNames.h:
231         * bindings/js/WebCoreJSBuiltins.cpp:
232         * bindings/js/WebCoreJSBuiltins.h:
233         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
234         (WebCore::JSBuiltinFunctions::mediaDevicesBuiltins):
235         * bindings/scripts/CodeGeneratorGObject.pm: Skipping generation of Private functions.
236         (SkipFunction):
237         * bindings/scripts/CodeGeneratorJS.pm:
238         (GenerateImplementation): Disabling addition of private function in table and adding private member field to the prototype.
239         * bindings/scripts/CodeGeneratorObjC.pm: Skipping generation of Private functions.
240         (SkipFunction):
241         * bindings/scripts/IDLAttributes.txt: Adding Private keyword.
242         * bindings/scripts/test/JS/JSTestObj.cpp: Adding Private keyword test.
243         (WebCore::JSTestObjPrototype::finishCreation):
244         (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
245         * bindings/scripts/test/TestObj.idl:
246
247 2015-10-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
248
249         [Streams API] Implement ReadableStream tee
250         https://bugs.webkit.org/show_bug.cgi?id=146315
251
252         Reviewed by Darin Adler.
253
254         Covered by rebased test.
255
256         * Modules/streams/ReadableStream.js:
257         (tee): Removing not implemented exception throwing.
258         * Modules/streams/ReadableStreamInternals.js:
259         (teeReadableStream): Implementing as per spec.
260         (teeReadableStreamPullFunction): Ditto.
261         (teeReadableStreamBranch2CancelFunction): Ditto.
262
263 2015-10-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
264
265         [Streams API] Add skeleton for initial WritableStream support
266         https://bugs.webkit.org/show_bug.cgi?id=149951
267
268         Reviewed by Darin Adler.
269
270         This basically adds an empty WritableStream object without initializing the object. It also adds all empty
271         methods by raising an exception.
272
273         The reason why the object is not fully initialized is that it requires some other support and some refactorings
274         to share more code with ReadableStream and we will make in following patches.
275
276         Tests are covered by current set and their expectations are properly updated.
277
278         * CMakeLists.txt:
279         * DerivedSources.cpp:
280         * DerivedSources.make:
281         * WebCore.vcxproj/WebCore.vcxproj:
282         * WebCore.vcxproj/WebCore.vcxproj.filters:
283         * WebCore.xcodeproj/project.pbxproj:
284         * bindings/js/WebCoreJSBuiltins.cpp:
285         * bindings/js/WebCoreJSBuiltins.h: Build infrastructure.
286         * Modules/streams/WritableStream.idl: Added all methods and attributes.
287         * Modules/streams/WritableStream.js:
288         (initializeWritableStream):
289         (abort):
290         (close):
291         (write):
292         (closed):
293         (ready):
294         (state): Added all by throwing an EvalError.
295
296 2015-10-18  Chris Dumez  <cdumez@apple.com>
297
298         Script element with an empty for or event attributes should not execute
299         https://bugs.webkit.org/show_bug.cgi?id=148855
300         <rdar://problem/22588156>
301
302         Reviewed by Darin Adler.
303
304         A script element with an empty for or event attributes should not execute
305         as per:
306         https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script (step 12)
307
308         Our implementation had a bug where it would not correctly differentiate
309         an empty attribute from a missing one. This patch fixes this.
310
311         No new tests, already covered by existing test.
312
313         * dom/ScriptElement.cpp:
314         (WebCore::ScriptElement::isScriptForEventSupported):
315
316 2015-10-18  Chris Dumez  <cdumez@apple.com>
317
318         WebKit must support all JavaScript MIME types in HTML5 spec
319         https://bugs.webkit.org/show_bug.cgi?id=148854
320         <rdar://problem/22588195>
321
322         Reviewed by Darin Adler.
323
324         WebKit did not execute certain EcmaScript MIME types although the HTML
325         specification says all user agents should support those:
326         https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type
327
328         In particular, the following MIME types are now recognized as valid and
329         executed: "application/x-ecmascript", "text/javascript1.0",
330         "text/javascript1.4", "text/javascript1.5", "text/x-javascript",
331         "text/x-ecmascript".
332
333         The new behavior is consistent with Firefox.
334
335         No new tests, already covered by existing test.
336
337         * platform/MIMETypeRegistry.cpp:
338         (WebCore::initializeSupportedJavaScriptMIMETypes):
339
340 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
341
342         [Win] Fix the Windows builds.
343         https://bugs.webkit.org/show_bug.cgi?id=150300
344
345         Reviewed by Darin Adler.
346
347         Add missing files to WebCore.vcxproj.
348         Add missing #includes to CSSAllInOne.cpp and HTMLElementsAllInOne.cpp.
349
350         No new tests, no behavior change.
351
352         * WebCore.vcxproj/WebCore.vcxproj:
353         * WebCore.vcxproj/WebCore.vcxproj.filters:
354         * css/CSSAllInOne.cpp:
355         * html/HTMLElementsAllInOne.cpp:
356
357 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
358
359         Fix the builds with ENABLE_CONTENT_EXTENSIONS=OFF.
360         https://bugs.webkit.org/show_bug.cgi?id=150302
361
362         Reviewed by Darin Adler.
363
364         Add missing #if ENABLE(CONTENT_EXTENSIONS).
365
366         No new tests, no behavior change.
367
368         * page/UserContentController.h:
369
370 2015-10-18  Joonghun Park  <jh718.park@samsung.com>
371
372         [EFL] Fix debug build break since r191198
373         https://bugs.webkit.org/show_bug.cgi?id=150277
374
375         Reviewed by Darin Adler.
376
377         No new tests, no new behaviours.
378
379         Use the correct %"PRIu64" for uint64_t,
380         instead of %llu.
381
382         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
383         (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent):
384         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
385         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
386         * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp:
387         (WebCore::IDBDatabaseBackend::processPendingOpenCalls):
388         (WebCore::IDBDatabaseBackend::openConnectionInternal):
389         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
390         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
391
392 2015-10-18  Sungmann Cho  <sungmann.cho@navercorp.com>
393
394         Fix the builds with ENABLE_INDEX_DATABASE=OFF.
395         https://bugs.webkit.org/show_bug.cgi?id=150301
396
397         Reviewed by Darin Adler.
398
399         Add missing #if ENABLE(INDEXED_DATABASE).
400
401         No new tests, no behavior change.
402
403         * page/Page.cpp:
404
405 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
406
407         [Cocoa] [Win] Remove unused code from GraphicsContext
408         https://bugs.webkit.org/show_bug.cgi?id=150304
409
410         Reviewed by Darin Adler.
411
412         No new tests because there is no behavior change.
413
414         * platform/graphics/GraphicsContext.h:
415         * platform/graphics/cg/GraphicsContextCG.cpp:
416         (WebCore::GraphicsContext::setAllowsFontSmoothing): Deleted.
417
418 2015-10-18  Antti Koivisto  <antti@apple.com>
419
420         Computed style should work correctly with slotted elements that have display:none
421         https://bugs.webkit.org/show_bug.cgi?id=150237
422
423         Reviewed by Andreas Kling..
424
425         If an element has display:none we don't normally retain or even compute its style (as it is not rendered).
426         If getComputedStyle is invoked for such element we resolve the style (along with any ancestors) and cache
427         it separately to rare data. This path needs to work with slotted elements in shadow trees.
428
429         This patch also make computedStyle() iterative rather than recursive.
430
431         Test: fast/shadow-dom/computed-style-display-none.html
432
433         * dom/Document.cpp:
434         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
435
436             Pass in the parent style instead of invoking computedStyle() recursively.
437
438         * dom/Document.h:
439         * dom/Element.cpp:
440         (WebCore::beforeOrAfterPseudoElement):
441         (WebCore::Element::existingComputedStyle):
442         (WebCore::Element::resolveComputedStyle):
443
444             Iterative resolve function that uses composed tree iterator.
445
446         (WebCore::Element::computedStyle):
447
448             Factor into helpers.
449
450         * dom/Element.h:
451         * dom/Node.cpp:
452         (WebCore::Node::computedStyle):
453
454             Use the composed tree iterator.
455
456         * html/HTMLSelectElement.cpp:
457         (WebCore::HTMLSelectElement::selectOption):
458
459             Call updateValidity() before calling renderer->updateFromElement(). Calling updateFromElement()
460             may end up in Element::computedStyle() which can asserts if validity is not up to date.
461
462 2015-10-18  Myles C. Maxfield  <mmaxfield@apple.com>
463
464         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
465         https://bugs.webkit.org/show_bug.cgi?id=150287
466
467         Reviewed by Simon Fraser.
468
469         This user default is currently on by default. Therefore, by setting the user default,
470         users can only disable kerning / ligatures (rather than enable it).
471
472         There are a few reasons why we should stop honoring it:
473
474         1. In the brave new world of font-feature-settings and font-variant-ligatures, there
475         are many different kinds of ligatures which may be enabled at will. The simplistic
476         statement of "turn on ligatures" no longer has any meaning.
477
478         2. If a user wants to disable kerning / ligatures, he/she can do it with a user
479         stylesheet.
480
481         3. The default isn't able to be tested with DumpRenderTree or WebKitTestRunner.
482
483         4. I have never heard of anyone actually using this user default.
484
485         * platform/graphics/FontCascade.cpp:
486         (WebCore::FontCascade::setDefaultKerning): Deleted.
487         (WebCore::FontCascade::setDefaultLigatures): Deleted.
488         * platform/graphics/FontCascade.h:
489         (WebCore::FontCascade::advancedTextRenderingMode):
490
491 2015-10-18  Commit Queue  <commit-queue@webkit.org>
492
493         Unreviewed, rolling out r191250 and r191253.
494         https://bugs.webkit.org/show_bug.cgi?id=150296
495
496         Broke all the tests on Windows (Requested by ap on #webkit).
497
498         Reverted changesets:
499
500         "Stop honoring the user default
501         "WebKitKerningAndLigaturesEnabledByDefault""
502         https://bugs.webkit.org/show_bug.cgi?id=150287
503         http://trac.webkit.org/changeset/191250
504
505         "Build fix after r191250"
506         http://trac.webkit.org/changeset/191253
507
508 2015-10-17  David Hyatt  <hyatt@apple.com>
509
510         Implement the CSS4 'revert' keyword.
511         https://bugs.webkit.org/show_bug.cgi?id=149702
512
513         Reviewed by Simon Fraser.
514
515         Added new tests in fast/css and fast/css/variables.
516
517         * CMakeLists.txt:
518         * WebCore.xcodeproj/project.pbxproj:
519         Add CSSRevertValue to the project and makefiles.
520
521         * css/CSSParser.cpp:
522         (WebCore::parseKeywordValue):
523         Make sure to handle "revert" in the keyword parsing path (along with inherit/initial/unset).
524
525         (WebCore::CSSParser::parseValue):
526         (WebCore::CSSParser::parseCustomPropertyDeclaration):
527         At the parser level, "revert" is just like inherit/initial/unset and gets its own special
528         singleton value, CSSRevertValue.
529
530         * css/CSSRevertValue.cpp: Added.
531         (WebCore::CSSRevertValue::customCSSText):
532         * css/CSSRevertValue.h: Added.
533         (WebCore::CSSRevertValue::create):
534         (WebCore::CSSRevertValue::equals):
535         (WebCore::CSSRevertValue::CSSRevertValue):
536         This value is identical to the inherit/initial/unset values, i.e., its own special value
537         that can be used to indicate a revert when doing style resolution.
538
539         * css/CSSValue.cpp:
540         (WebCore::CSSValue::cssValueType):
541         (WebCore::CSSValue::equals):
542         (WebCore::CSSValue::cssText):
543         (WebCore::CSSValue::destroy):
544         * css/CSSValue.h:
545         (WebCore::CSSValue::isInheritedValue):
546         (WebCore::CSSValue::isInitialValue):
547         (WebCore::CSSValue::isUnsetValue):
548         (WebCore::CSSValue::isRevertValue):
549         Add the RevertClass to CSSValue and make sure it is handled in all the appropriate methods.
550
551         * css/CSSValueKeywords.in:
552         Add the "revert" keyword to the list of allowed CSS keywords.
553
554         * css/CSSValuePool.cpp:
555         (WebCore::CSSValuePool::CSSValuePool):
556         * css/CSSValuePool.h:
557         (WebCore::CSSValuePool::createRevertValue):
558         Add support for a CSSRevertValue singleton, just like inherit/unset/initial.
559
560         * css/FontLoader.cpp:
561         (WebCore::FontLoader::resolveFontStyle):
562         Add "unset" and "revert" as special keywords to be ignored. This code seems to be turned off,
563         but patching it anyway.
564
565         * css/SelectorChecker.h:
566         Add a MatchDefault value of 0 to the LinkMatchMask. This enables it to be used as an index
567         to the correct value in Property (in the style resolution code).
568
569         * css/StyleResolver.cpp:
570         (WebCore::StyleResolver::State::initForStyleResolve):
571         Delete any lingering old CascadedProperty rollbacks for UA/user rules.
572
573         (WebCore::StyleResolver::styleForKeyframe):
574         (WebCore::StyleResolver::styleForPage):
575         (WebCore::StyleResolver::applyMatchedProperties):
576         Pass along the MatchResult as an additional parameter, since we need it to lazily compute
577         the cascade rollbacks if the "revert" keyword is encountered.
578
579         (WebCore::StyleResolver::cascadedPropertiesForRollback):
580         This method will lazily create and return a new CascadedProperties pointer that is cached
581         in the StyleResolver's state. This will contain only UA rules (for user reverts) and UA/user
582         rules (for author reverts). These will only be computed at most once for a given element
583         when doing a reversion, and they will be computed lazily, i.e., only if a revert is
584         requested.
585
586         (WebCore::StyleResolver::applyProperty):
587         Pass along the LinkMatchMask and the MatchResult to applyProperty. This way we know specifically
588         which link type we were computing if we have to revert (so that we roll back and look at the
589         same index in the reverted version). The MatchResult is passed along because it is needed
590         to build the CascadedProperties rollbacks.
591
592         The basic idea is that if a revert is encountered, the level that the rule came from is
593         checked. If it is UA level, just treat as "unset." If it is author or user level, get
594         the correct CascadedProperties rollback and repeat the applyProperty using the property
595         found in the rollback. If the property is not present in the cascade rollback, then the
596         revert becomes an unset.
597
598         (WebCore::StyleResolver::CascadedProperties::hasCustomProperty):
599         (WebCore::StyleResolver::CascadedProperties::customProperty):
600         Helpers used by applyProperty to check on custom properties, since they can revert too
601         just like a regular property can.
602
603         (WebCore::StyleResolver::CascadedProperties::setPropertyInternal):
604         (WebCore::StyleResolver::CascadedProperties::set):
605         (WebCore::StyleResolver::CascadedProperties::setDeferred):
606         Passing along the CascadeLevel (UA, User, Author) so that it can be stored in the Property.
607         This way when we do property application, we always know where the rule came from so
608         that the reversion can be handled properly.
609
610         (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
611         (WebCore::cascadeLevelForIndex):
612         (WebCore::StyleResolver::CascadedProperties::addMatches):
613         When style properties are added, also figure out the CascadeLevel and pass it along to be
614         stored in the Property. We use the MatchResult's ranges to know where a property comes from.
615
616         (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties):
617         (WebCore::StyleResolver::CascadedProperties::Property::apply):
618         (WebCore::StyleResolver::applyCascadedProperties):
619         Pass along the MatchResult so we know how to build the rollback.
620
621         * css/StyleResolver.h:
622         (WebCore::StyleResolver::State::cascadeLevel):
623         (WebCore::StyleResolver::State::setCascadeLevel):
624         (WebCore::StyleResolver::State::authorRollback):
625         (WebCore::StyleResolver::State::userRollback):
626         (WebCore::StyleResolver::State::setAuthorRollback):
627         (WebCore::StyleResolver::State::setUserRollback):
628         (WebCore::StyleResolver::state):
629         (WebCore::StyleResolver::cascadeLevel):
630         (WebCore::StyleResolver::setCascadeLevel):
631         Move CascadedProperties into the header. Add CascadeLevel to Property. Add the level and
632         rollbacks to the resolver's state.
633
634 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
635
636         Delete FontPlatformData::allowsLigatures()
637         https://bugs.webkit.org/show_bug.cgi?id=150286
638
639         Reviewed by Dan Bernstein.
640
641         This function is only used to force ligatures on for complex fonts (where "complex"
642         means "does not support the letter 'a'"). However, ligatures are turned on for all
643         fonts by default, which means that this function is unnecessary.
644
645         Required ligatures, such as those which make these complex scripts legible, are always
646         enabled, no matter what.
647
648         Test: fast/text/required-ligatures.html
649
650         * platform/graphics/FontPlatformData.h:
651         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
652         (WebCore::FontPlatformData::allowsLigatures): Deleted.
653         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
654         (WebCore::Font::getCFStringAttributes):
655
656 2015-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
657
658         Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
659         https://bugs.webkit.org/show_bug.cgi?id=150287
660
661         Reviewed by Simon Fraser.
662
663         This user default is currently on by default. Therefore, by setting the user default,
664         users can only disable kerning / ligatures (rather than enable it).
665
666         There are a few reasons why we should stop honoring it:
667
668         1. In the brave new world of font-feature-settings and font-variant-ligatures, there
669         are many different kinds of ligatures which may be enabled at will. The simplistic
670         statement of "turn on ligatures" no longer has any meaning.
671
672         2. If a user wants to disable kerning / ligatures, he/she can do it with a user
673         stylesheet.
674
675         3. The default isn't able to be tested with DumpRenderTree or WebKitTestRunner.
676
677         4. I have never heard of anyone actually using this user default.
678
679         * platform/graphics/FontCascade.cpp:
680         (WebCore::FontCascade::setDefaultKerning): Deleted.
681         (WebCore::FontCascade::setDefaultLigatures): Deleted.
682         * platform/graphics/FontCascade.h:
683         (WebCore::FontCascade::advancedTextRenderingMode):
684
685 2015-10-17  Dan Bernstein  <mitz@apple.com>
686
687         [Cocoa] Stop using WKAXRegisterRemoteApp
688         https://bugs.webkit.org/show_bug.cgi?id=150283
689
690         Reviewed by Alexey Proskuryakov.
691
692         * platform/spi/ios/GraphicsServicesSPI.h: Added declaration of GSSystemRootDirectory.
693
694 2015-10-17  Chris Dumez  <cdumez@apple.com>
695
696         td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
697         https://bugs.webkit.org/show_bug.cgi?id=148859
698         <rdar://problem/22588664>
699
700         Reviewed by Ryosuke Niwa.
701
702         td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
703         as per the latest HTML specification:
704         https://html.spec.whatwg.org/multipage/tables.html#htmltabledatacellelement
705         https://html.spec.whatwg.org/multipage/tables.html#htmltableheadercellelement
706
707         This patch aligns our behavior with the specification and IE. Firefox and Chrome do not
708         seem to expose HTMLTableDataCellElement / HTMLTableHeaderCellElement at this time.
709
710         The compatibility risk is low, given that the API stays the same and those new
711         interfaces inherit the pre-existing HTMLTableCellElement interface.
712
713         No new tests, already covered by existing tests.
714
715         * CMakeLists.txt:
716         * DerivedSources.cpp:
717         * DerivedSources.make:
718         * WebCore.vcxproj/WebCore.vcxproj:
719         * WebCore.vcxproj/WebCore.vcxproj.filters:
720         * WebCore.xcodeproj/project.pbxproj:
721         * html/HTMLTableCellElement.cpp:
722         (WebCore::HTMLTableCellElement::HTMLTableCellElement):
723         (WebCore::HTMLTableCellElement::colSpan): Deleted.
724         * html/HTMLTableCellElement.h:
725         * html/HTMLTableCellElement.idl:
726         * html/HTMLTableDataCellElement.h: Added.
727         * html/HTMLTableDataCellElement.idl: Added.
728         * html/HTMLTableHeaderCellElement.h: Added.
729         * html/HTMLTableHeaderCellElement.idl: Added.
730         * html/HTMLTableRowElement.cpp:
731         (WebCore::HTMLTableRowElement::insertCell):
732         * html/HTMLTagNames.in:
733
734 2015-10-17  Zalan Bujtas  <zalan@apple.com>
735
736         RenderBlockFlow::xPositionForFloatIncludingMargin/yPositionForFloatIncludingMargin/flipFloatForWritingModeForChild
737         should all take FloatingObject reference.
738         https://bugs.webkit.org/show_bug.cgi?id=150267
739
740         Reviewed by Simon Fraser.
741
742         No change in behaviour.
743
744         * rendering/RenderBlockFlow.cpp:
745         (WebCore::RenderBlockFlow::addOverflowFromFloats):
746         (WebCore::RenderBlockFlow::paintFloats):
747         (WebCore::RenderBlockFlow::clipOutFloatingObjects):
748         (WebCore::RenderBlockFlow::addOverhangingFloats):
749         (WebCore::RenderBlockFlow::flipFloatForWritingModeForChild):
750         (WebCore::RenderBlockFlow::hitTestFloats):
751         (WebCore::RenderBlockFlow::adjustForBorderFit):
752         * rendering/RenderBlockFlow.h:
753         (WebCore::RenderBlockFlow::xPositionForFloatIncludingMargin):
754         (WebCore::RenderBlockFlow::yPositionForFloatIncludingMargin):
755
756 2015-10-17  Simon Fraser  <simon.fraser@apple.com>
757
758         Sort the project file.
759
760         * WebCore.xcodeproj/project.pbxproj:
761
762 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
763
764         Enhance TextStream for logging, remove subclasses, log more things
765         https://bugs.webkit.org/show_bug.cgi?id=150269
766
767         Reviewed by Zalan Bujtas.
768
769         Remove the various TextStream subclasses that only existed to support indenting,
770         and output additional types. Add output for more WebCore and WebKit2 types, and
771         just use TextStream everywhere.
772         
773         TextStream is enhance to support grouping (open paren and intent), with a 
774         stack-based class to open/end a group.
775         
776         Remove some SVG-specific duplicate output functions.
777         
778         Outdent namespace contents of GraphicsTypes.h.
779         
780         * CMakeLists.txt:
781         * WebCore.xcodeproj/project.pbxproj:
782         * dom/ViewportArguments.cpp:
783         (WebCore::operator<<):
784         * dom/ViewportArguments.h:
785         * page/ViewportConfiguration.cpp:
786         (WebCore::operator<<):
787         (WebCore::ViewportConfiguration::description):
788         (WebCore::ViewportConfigurationTextStream::ViewportConfigurationTextStream): Deleted.
789         (WebCore::ViewportConfigurationTextStream::increaseIndent): Deleted.
790         (WebCore::ViewportConfigurationTextStream::decreaseIndent): Deleted.
791         (WebCore::dumpProperty): Deleted.
792         (WebCore::ViewportConfigurationTextStream::writeIndent): Deleted.
793         (WebCore::ViewportConfigurationTextStream::operator<<): Deleted.
794         * page/ViewportConfiguration.h:
795         * page/scrolling/ScrollingConstraints.cpp:
796         (WebCore::operator<<):
797         * page/scrolling/ScrollingConstraints.h:
798         * page/scrolling/ScrollingCoordinator.cpp:
799         (WebCore::operator<<):
800         * page/scrolling/ScrollingCoordinator.h:
801         * platform/animation/TimingFunction.cpp: Added.
802         (WebCore::operator<<):
803         * platform/animation/TimingFunction.h:
804         * platform/graphics/Color.cpp:
805         (WebCore::operator<<):
806         * platform/graphics/Color.h:
807         * platform/graphics/FloatPoint3D.cpp:
808         (WebCore::operator<<):
809         * platform/graphics/FloatPoint3D.h:
810         * platform/graphics/FloatRoundedRect.cpp:
811         (WebCore::operator<<):
812         * platform/graphics/FloatRoundedRect.h:
813         * platform/graphics/GraphicsLayer.cpp:
814         (WebCore::operator<<):
815         * platform/graphics/GraphicsLayer.h:
816         * platform/graphics/GraphicsTypes.cpp:
817         (WebCore::operator<<):
818         * platform/graphics/GraphicsTypes.h:
819         * platform/graphics/ca/PlatformCAAnimation.cpp: Added.
820         (WebCore::operator<<):
821         * platform/graphics/ca/PlatformCAAnimation.h:
822         * platform/graphics/ca/PlatformCALayer.cpp:
823         (WebCore::operator<<):
824         * platform/graphics/ca/PlatformCALayer.h:
825         * platform/graphics/filters/FilterOperation.cpp:
826         (WebCore::operator<<):
827         * platform/graphics/filters/FilterOperation.h:
828         * platform/graphics/filters/FilterOperations.cpp:
829         (WebCore::operator<<):
830         * platform/graphics/filters/FilterOperations.h:
831         * platform/graphics/filters/PointLightSource.cpp:
832         (WebCore::operator<<): Deleted.
833         * platform/graphics/filters/SpotLightSource.cpp:
834         (WebCore::operator<<): Deleted.
835         * platform/graphics/transforms/AffineTransform.cpp:
836         (WebCore::operator<<):
837         * platform/graphics/transforms/AffineTransform.h:
838         * platform/graphics/transforms/TransformationMatrix.cpp:
839         (WebCore::operator<<):
840         * platform/graphics/transforms/TransformationMatrix.h:
841         * platform/text/TextStream.cpp:
842         (WebCore::TextStream::startGroup):
843         (WebCore::TextStream::endGroup):
844         (WebCore::TextStream::nextLine):
845         (WebCore::TextStream::writeIndent):
846         * platform/text/TextStream.h:
847         (WebCore::TextStream::operator<<):
848         (WebCore::TextStream::dumpProperty):
849         (WebCore::TextStream::increaseIndent):
850         (WebCore::TextStream::decreaseIndent):
851         (WebCore::TextStream::GroupScope::GroupScope):
852         (WebCore::TextStream::GroupScope::~GroupScope):
853         * rendering/svg/SVGRenderTreeAsText.cpp:
854         (WebCore::operator<<): Deleted.
855         * rendering/svg/SVGRenderTreeAsText.h:
856
857 2015-10-17  Youenn Fablet  <youenn.fablet@crf.canon.fr>
858
859         Finalize bug 149952 patch
860         https://bugs.webkit.org/show_bug.cgi?id=150238
861
862         Reviewed by Darin Adler.
863
864         No change in behavior.
865
866         * bindings/js/JSDOMConstructor.h:
867         (WebCore::JSDOMConstructor<JSClass>::finishCreation): Marked as inline.
868         (WebCore::JSDOMConstructor<JSClass>::getConstructData): Marked as inline.
869
870 2015-10-16  Zalan Bujtas  <zalan@apple.com>
871
872         RenderBlockFlow::*logical*ForFloat should take FloatingObject reference.
873         https://bugs.webkit.org/show_bug.cgi?id=150266
874
875         Reviewed by Simon Fraser.
876
877         No change in behaviour.
878
879         * rendering/FloatingObjects.cpp:
880         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
881         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
882         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
883         (WebCore::ComputeFloatOffsetForFloatLayoutAdapter<FloatTypeValue>::heightRemaining):
884         (WebCore::ComputeFloatOffsetAdapter<FloatTypeValue>::collectIfNeeded):
885         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
886         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
887         * rendering/RenderBlockFlow.cpp:
888         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
889         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
890         (WebCore::RenderBlockFlow::insertFloatingObject):
891         (WebCore::RenderBlockFlow::removeFloatingObject):
892         (WebCore::RenderBlockFlow::removeFloatingObjectsBelow):
893         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
894         (WebCore::RenderBlockFlow::positionNewFloats):
895         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
896         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
897         (WebCore::RenderBlockFlow::addOverhangingFloats):
898         (WebCore::RenderBlockFlow::hasOverhangingFloat):
899         (WebCore::RenderBlockFlow::addIntrudingFloats):
900         * rendering/RenderBlockFlow.h:
901         (WebCore::RenderBlockFlow::logicalTopForFloat):
902         (WebCore::RenderBlockFlow::logicalBottomForFloat):
903         (WebCore::RenderBlockFlow::logicalLeftForFloat):
904         (WebCore::RenderBlockFlow::logicalRightForFloat):
905         (WebCore::RenderBlockFlow::logicalWidthForFloat):
906         (WebCore::RenderBlockFlow::logicalHeightForFloat):
907         (WebCore::RenderBlockFlow::setLogicalTopForFloat):
908         (WebCore::RenderBlockFlow::setLogicalLeftForFloat):
909         (WebCore::RenderBlockFlow::setLogicalHeightForFloat):
910         (WebCore::RenderBlockFlow::setLogicalWidthForFloat):
911         (WebCore::RenderBlockFlow::logicalSizeForFloat): Deleted.
912         * rendering/RenderBlockLineLayout.cpp:
913         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
914         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
915         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
916         * rendering/RenderBox.cpp:
917         (WebCore::RenderBox::addOverflowFromChild):
918         * rendering/RenderBox.h:
919         (WebCore::RenderBox::addOverflowFromChild):
920         * rendering/line/BreakingContext.h:
921         (WebCore::BreakingContext::handleFloat):
922         * rendering/line/LineWidth.cpp:
923         (WebCore::newFloatShrinksLine):
924         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
925         * rendering/shapes/ShapeOutsideInfo.cpp:
926         (WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine):
927
928 2015-10-16  Jiewen Tan  <jiewen_tan@apple.com>
929
930         Avoid to insert TAB before HTML element.
931         https://bugs.webkit.org/show_bug.cgi?id=149295
932         <rdar://problem/22746706>
933
934         Reviewed by Ryosuke Niwa.
935
936         This is a merge of Blink r175047:
937         https://codereview.chromium.org/306583005
938
939         This patch avoids InsertTextCommand::insertTab before HTML element because
940         we can't set Text node as document element.
941
942         Test: editing/execCommand/insert-tab-to-html-element-crash.html
943
944         * editing/InsertTextCommand.cpp:
945         (WebCore::InsertTextCommand::insertTab):
946
947 2015-10-16  Commit Queue  <commit-queue@webkit.org>
948
949         Unreviewed, rolling out r191204.
950         https://bugs.webkit.org/show_bug.cgi?id=150263
951
952         This change is causing existing tests to fail (Requested by
953         ryanhaddad on #webkit).
954
955         Reverted changeset:
956
957         "Computed style should work correctly with slotted elements
958         that have display:none"
959         https://bugs.webkit.org/show_bug.cgi?id=150237
960         http://trac.webkit.org/changeset/191204
961
962 2015-10-16  Alex Christensen  <achristensen@webkit.org>
963
964         Disabled content blockers should not block any loads
965         https://bugs.webkit.org/show_bug.cgi?id=150261
966
967         Reviewed by Brady Eidson.
968
969         This fix was tested manually by reloading without content blockers
970         on websites with iframes and content blockers that block the contents of the iframes.
971
972         * page/UserContentController.cpp:
973         (WebCore::UserContentController::removeAllUserContentExtensions):
974         (WebCore::contentExtensionsEnabled):
975         (WebCore::UserContentController::processContentExtensionRulesForLoad):
976         (WebCore::UserContentController::actionsForResourceLoad):
977         Check the DocumentLoader of the main frame when checking if content extensions are disabled,
978         because that is the DocumentLoader that has the flag from reloading without content blockers.
979
980 2015-10-16  Simon Fraser  <simon.fraser@apple.com>
981
982         Make TextStream the canonical way to log classes in WebCore
983         https://bugs.webkit.org/show_bug.cgi?id=150256
984
985         Reviewed by Sam Weinig.
986
987         We vacillated between PrintStream and TextStream as being the canonical way
988         to stringify WebCore data structures. This patch solidifies TextStream
989         as the solution, since it has convenient stream syntax, and is what we
990         use for render tree dumps.
991
992         Remove TextStream member functions that output non-simple structs
993         (sizes, points and rects), replacing them with free operator<< functions
994         in the .cpp file for the relevant class. Formatting is currently consistent
995         with RenderTreeAsText output, to avoid breaking tests.
996
997         Remove custom FloatRect outputting in SVG and RemoteLayerTreeTransaction.
998
999         * CMakeLists.txt:
1000         * WebCore.xcodeproj/project.pbxproj:
1001         * platform/graphics/FloatPoint.cpp:
1002         (WebCore::operator<<):
1003         (WebCore::FloatPoint::dump): Deleted.
1004         * platform/graphics/FloatPoint.h:
1005         * platform/graphics/FloatRect.cpp:
1006         (WebCore::operator<<):
1007         (WebCore::FloatRect::dump): Deleted.
1008         * platform/graphics/FloatRect.h:
1009         * platform/graphics/FloatSize.cpp:
1010         (WebCore::FloatSize::FloatSize):
1011         (WebCore::operator<<):
1012         (WebCore::FloatSize::dump): Deleted.
1013         * platform/graphics/FloatSize.h:
1014         * platform/graphics/IntPoint.cpp:
1015         (WebCore::operator<<):
1016         (WebCore::IntPoint::dump): Deleted.
1017         * platform/graphics/IntPoint.h:
1018         * platform/graphics/IntRect.cpp:
1019         (WebCore::operator<<):
1020         (WebCore::IntRect::dump): Deleted.
1021         * platform/graphics/IntRect.h:
1022         * platform/graphics/IntSize.cpp:
1023         (WebCore::operator<<):
1024         (WebCore::IntSize::dump): Deleted.
1025         * platform/graphics/IntSize.h:
1026         * platform/graphics/LayoutPoint.cpp: Copied from Source/WebCore/platform/graphics/IntPoint.cpp.
1027         (WebCore::operator<<):
1028         * platform/graphics/LayoutPoint.h:
1029         * platform/graphics/LayoutRect.cpp:
1030         (WebCore::operator<<):
1031         * platform/graphics/LayoutRect.h:
1032         * platform/graphics/LayoutSize.cpp: Copied from Source/WebCore/platform/graphics/IntPoint.cpp.
1033         (WebCore::operator<<):
1034         * platform/graphics/LayoutSize.h:
1035         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1036         (WebCore::MediaSampleAVFObjC::dump):
1037         * platform/text/TextStream.cpp:
1038         (WebCore::TextStream::operator<<):
1039         * platform/text/TextStream.h:
1040         * rendering/svg/SVGRenderTreeAsText.cpp:
1041         (WebCore::operator<<): Deleted.
1042
1043 2015-10-16  Brent Fulgham  <bfulgham@apple.com>
1044
1045         Hide all plugin names except Flash, Java, and QuickTime
1046         https://bugs.webkit.org/show_bug.cgi?id=149014
1047
1048         Reviewed by Darin Adler.
1049
1050         Revise plugin interface so that sites cannot iterate over all plugins to obtain
1051         a list of installed plugins for fingerprinting purposes. Sites need to ask for
1052         specific plugins by name, rather than iterating and comparing to avoid making
1053         this information accessible for fingerprinting purposes.
1054
1055         * plugins/DOMPluginArray.cpp:
1056         (WebCore::DOMPluginArray::length): Only return length of the plugins we are
1057         allowing to be seen.
1058         (WebCore::DOMPluginArray::item): Only iterate through the plugins we are
1059         allowing to be seen.
1060         * plugins/PluginData.cpp:
1061         (WebCore::PluginData::publiclyVisiblePlugins): Added.
1062         * plugins/PluginData.h:
1063
1064 2015-10-16  Brady Eidson  <beidson@apple.com>
1065
1066         "enum class" some IDB enums.
1067         https://bugs.webkit.org/show_bug.cgi?id=150246
1068
1069         Reviewed by Alex Christensen.
1070
1071         No new tests (No change in behavior).
1072
1073         * Modules/indexeddb/IDBKeyPath.cpp:
1074         (WebCore::IDBIsValidKeyPath):
1075         (WebCore::IDBParseKeyPath):
1076         (WebCore::IDBKeyPath::IDBKeyPath):
1077         (WebCore::IDBKeyPath::isValid):
1078         (WebCore::IDBKeyPath::operator==):
1079         (WebCore::IDBKeyPath::encode):
1080         (WebCore::IDBKeyPath::decode):
1081         * Modules/indexeddb/IDBKeyPath.h:
1082         (WebCore::IDBKeyPath::IDBKeyPath):
1083         (WebCore::IDBKeyPath::type):
1084         (WebCore::IDBKeyPath::array):
1085         (WebCore::IDBKeyPath::string):
1086         (WebCore::IDBKeyPath::isNull):
1087         (WebCore::IDBKeyPath::encode):
1088         (WebCore::IDBKeyPath::decode):
1089         * Modules/indexeddb/IndexedDB.h:
1090         * Modules/indexeddb/legacy/LegacyDatabase.cpp:
1091         (WebCore::LegacyDatabase::createObjectStore):
1092         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
1093         (WebCore::LegacyObjectStore::createIndex):
1094         * bindings/js/IDBBindingUtilities.cpp:
1095         (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
1096         (WebCore::injectIDBKeyIntoScriptValue):
1097         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
1098         (WebCore::canInjectIDBKeyIntoScriptValue):
1099         * bindings/js/JSIDBAnyCustom.cpp:
1100         (WebCore::toJS):
1101         * inspector/InspectorIndexedDBAgent.cpp:
1102
1103 2015-10-16  Anders Carlsson  <andersca@apple.com>
1104
1105         Add indexeddb/shared to the include paths.
1106
1107         * WebCore.vcxproj/WebCoreIncludeCommon.props:
1108
1109 2015-10-16  Antti Koivisto  <antti@apple.com>
1110
1111         Computed style should work correctly with slotted elements that have display:none
1112         https://bugs.webkit.org/show_bug.cgi?id=150237
1113
1114         Reviewed by Andreas Kling.
1115
1116         If an element has display:none we don't normally retain or even compute its style (as it is not rendered).
1117         If getComputedStyle is invoked for such element we resolve the style (along with any ancestors) and cache
1118         it separately to rare data. This path needs to work with slotted elements in shadow trees.
1119
1120         This patch also make computedStyle() iterative rather than recursive.
1121
1122         Test: fast/shadow-dom/computed-style-display-none.html
1123
1124         * dom/Document.cpp:
1125         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
1126
1127             Pass in the parent style instead of invoking computedStyle() recursively.
1128
1129         * dom/Document.h:
1130         * dom/Element.cpp:
1131         (WebCore::beforeOrAfterPseudoElement):
1132         (WebCore::Element::existingComputedStyle):
1133         (WebCore::Element::resolveComputedStyle):
1134
1135             Iterative resolve function that uses composed tree iterator.
1136
1137         (WebCore::Element::computedStyle):
1138
1139             Factor into helpers.
1140
1141         * dom/Element.h:
1142         * dom/Node.cpp:
1143         (WebCore::Node::computedStyle):
1144
1145             Use the composed tree iterator.
1146
1147 2015-10-16  David Hyatt  <hyatt@apple.com>
1148
1149         ASSERT in imported/blink/fast/block/float/overhanging-float-crashes-when-sibling-becomes-formatting-context.html
1150         https://bugs.webkit.org/show_bug.cgi?id=150249
1151
1152         Reviewed by Myles Maxfield.
1153
1154         Covered by existing tests.
1155
1156         * css/CSSValue.cpp:
1157         (WebCore::CSSValue::equals):
1158         Make sure the "unset" value has an equals implementation.
1159
1160 2015-10-16  Brady Eidson  <beidson@apple.com>
1161
1162         Modern IDB: Handle versionchange events.
1163         https://bugs.webkit.org/show_bug.cgi?id=150149
1164
1165         Reviewed by Alex Christensen.
1166
1167         Test: storage/indexeddb/modern/versionchange-event.html
1168         
1169         - IDBVersionChangeEvents are now dispatched to open connections when a
1170           version upgrade request comes in.
1171         - Once all of those open connections have closed, the version upgrade 
1172           request is handled.
1173
1174         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1175         (WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
1176         (WebCore::IDBClient::IDBConnectionToServer::registerDatabaseConnection):
1177         (WebCore::IDBClient::IDBConnectionToServer::unregisterDatabaseConnection):
1178         * Modules/indexeddb/client/IDBConnectionToServer.h:
1179
1180         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1181         (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent):
1182         * Modules/indexeddb/client/IDBDatabaseImpl.h:
1183
1184         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1185         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
1186         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
1187         (WebCore::IDBServer::UniqueIDBDatabase::invokeTransactionScheduler):
1188         (WebCore::IDBServer::UniqueIDBDatabase::transactionSchedulingTimerFired):
1189         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1190
1191 2015-10-16  Zalan Bujtas  <zalan@apple.com>
1192
1193         First line box in paragraph using initial-letter overflows.
1194         https://bugs.webkit.org/show_bug.cgi?id=147977
1195         <rdar://problem/22901553>
1196
1197         Reviewed by David Hyatt.
1198
1199         When initial-letter float is present, we should shrink the first
1200         line even if it's not intersected with the block's current height.
1201         This is because of the sunken behaviour of initial-letter. 
1202
1203         Test: fast/css-generated-content/initial-letter-first-line-wrapping.html
1204
1205         * rendering/RenderBlockFlow.h:
1206         * rendering/RenderBlockLineLayout.cpp:
1207         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
1208         * rendering/line/BreakingContext.h:
1209         (WebCore::BreakingContext::handleFloat):
1210         * rendering/line/LineBreaker.cpp:
1211         (WebCore::LineBreaker::skipLeadingWhitespace):
1212         * rendering/line/LineBreaker.h:
1213         (WebCore::LineBreaker::positionNewFloatOnLine):
1214         * rendering/line/LineWidth.cpp:
1215         (WebCore::newFloatShrinksLine):
1216         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
1217         * rendering/line/LineWidth.h:
1218
1219 2015-10-16  Keith Rollin  <krollin@apple.com>
1220
1221         The value sanitization algorithm for input[type=url] should strip whitespaces
1222         https://bugs.webkit.org/show_bug.cgi?id=148864
1223         rdar://problem/22589358
1224
1225         Reviewed by Chris Dumez.
1226
1227         Follow the sanitization algorithm specified in:
1228         https://html.spec.whatwg.org/multipage/forms.html#url-state-(type=url)
1229
1230         Chrome also has the same issue with url.html. Firefox passes.  All
1231         three browsers have multiple issues with type-change-state.html, with
1232         each browser having a different set of failures. Addressing this in
1233         WebKit is another issue outside the scope of bz=148864. For now, I'm
1234         updating that test to capture current WebKit behavior.
1235
1236         No new tests (covered by existing tests):
1237         - web-platform-tests/html/semantics/forms/the-input-element/type-change-state.html
1238         - web-platform-tests/html/semantics/forms/the-input-element/url.html
1239
1240         * html/TextFieldInputType.h:
1241         * html/URLInputType.cpp:
1242         (WebCore::URLInputType::sanitizeValue):
1243         * html/URLInputType.h:
1244
1245 2015-10-16  Antti Koivisto  <antti@apple.com>
1246
1247         Remove NodeRenderingTraversal
1248         https://bugs.webkit.org/show_bug.cgi?id=150226
1249
1250         Reviewed by Chris Dumez.
1251
1252         It has been reduced to an implementation detail of FocusController. Move the remaining
1253         functions there as they have no general utility (and are wrong for focus navigation too).
1254
1255         * CMakeLists.txt:
1256         * WebCore.xcodeproj/project.pbxproj:
1257         * dom/DOMAllInOne.cpp:
1258         * dom/NodeRenderingTraversal.cpp: Removed.
1259         * dom/NodeRenderingTraversal.h: Removed.
1260         * page/FocusController.cpp:
1261         (WebCore::firstChildInScope):
1262         (WebCore::lastChildInScope):
1263         (WebCore::parentInScope):
1264         (WebCore::nextInScope):
1265         (WebCore::previousInScope):
1266         (WebCore::FocusNavigationScope::FocusNavigationScope):
1267         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
1268         (WebCore::FocusController::findElementWithExactTabIndex):
1269         (WebCore::nextElementWithGreaterTabIndex):
1270         (WebCore::previousElementWithLowerTabIndex):
1271         (WebCore::FocusController::nextFocusableElement):
1272         (WebCore::FocusController::previousFocusableElement):
1273
1274 2015-10-16  David Hyatt  <hyatt@apple.com>
1275
1276         Build fix. "all" keyword introduction exposed a typo bug in the grid-area property definition.
1277
1278         * css/CSSPropertyNames.in:
1279
1280 2015-10-16  Tim Horton  <timothy_horton@apple.com>
1281
1282         Hook up autolayout intrinsic sizing for WKWebView
1283         https://bugs.webkit.org/show_bug.cgi?id=150219
1284         <rdar://problem/20016905>
1285
1286         Reviewed by Simon Fraser.
1287
1288         New API test: WebKit2.AutoLayoutIntegration.
1289
1290         * page/FrameView.cpp:
1291         (WebCore::FrameView::autoSizeIfEnabled):
1292         When autosizing a document in which the body expands to the size of 
1293         the view (a feature of quirks mode), the first (width-determining)
1294         autosizing will resize the view to the document height (which is at 
1295         least the body height), and the second time around, the height will
1296         not decrease (because it was expanded to the size of the view).
1297
1298         Instead, the first time around, we should use the computed width,
1299         but shrink the height back down to the minimum, and then expand
1300         only as much as needed to fit the content.
1301
1302 2015-10-16  Brady Eidson  <beidson@apple.com>
1303
1304         Modern IDB: Support IDBDatabase.close().
1305         https://bugs.webkit.org/show_bug.cgi?id=150150
1306
1307         Reviewed by Alex Christensen.
1308
1309         No new tests (Covered by changes to storage/indexeddb/modern/opendatabase-versions.html).
1310
1311         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1312         (WebCore::IDBClient::IDBConnectionToServer::databaseConnectionClosed):
1313         * Modules/indexeddb/client/IDBConnectionToServer.h:
1314         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1315
1316         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1317         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
1318         (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
1319         (WebCore::IDBClient::IDBDatabase::close):
1320         (WebCore::IDBClient::IDBDatabase::maybeCloseInServer):
1321         (WebCore::IDBClient::IDBDatabase::commitTransaction):
1322         * Modules/indexeddb/client/IDBDatabaseImpl.h:
1323         (WebCore::IDBClient::IDBDatabase::databaseConnectionIdentifier):
1324
1325         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1326         (WebCore::IDBClient::IDBRequest::result):
1327
1328         * Modules/indexeddb/server/IDBServer.cpp:
1329         (WebCore::IDBServer::IDBServer::databaseConnectionClosed):
1330         * Modules/indexeddb/server/IDBServer.h:
1331
1332         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1333         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
1334         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Deleted.
1335         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1336
1337         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
1338         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
1339         (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
1340         (WebCore::IDBServer::UniqueIDBDatabaseConnection::hasNonFinishedTransactions):
1341         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
1342         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
1343
1344         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1345         (WebCore::InProcessIDBServer::databaseConnectionClosed):
1346         * Modules/indexeddb/shared/InProcessIDBServer.h:
1347
1348 2015-10-16  Chris Dumez  <cdumez@apple.com>
1349
1350         HTMLPreloadScanner should preload iframes
1351         https://bugs.webkit.org/show_bug.cgi?id=150097
1352         <rdar://problem/23094475>
1353
1354         Reviewed by Antti Koivisto.
1355
1356         HTMLPreloadScanner should preload iframes to decrease page load time.
1357
1358         Tests:
1359         - fast/preloader/frame-src.html
1360         - http/tests/loading/preload-no-store-frame-src.html
1361
1362         * html/parser/HTMLPreloadScanner.cpp:
1363         (WebCore::TokenPreloadScanner::tagIdFor):
1364         (WebCore::TokenPreloadScanner::initiatorFor):
1365         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
1366         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1367         (WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
1368         (WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): Deleted.
1369         (WebCore::TokenPreloadScanner::StartTagScanner::charset): Deleted.
1370         * html/parser/HTMLPreloadScanner.h:
1371
1372 2015-10-16  David Hyatt  <hyatt@apple.com>
1373
1374         Implement the "all" CSS property.
1375         https://bugs.webkit.org/show_bug.cgi?id=116966
1376
1377         Reviewed by Zalan Bujtas.
1378
1379         Added new tests in fast/css.
1380
1381         * css/CSSComputedStyleDeclaration.cpp:
1382         (WebCore::ComputedStyleExtractor::propertyValue):
1383         Don't support "all" from computed style for now.
1384
1385         * css/CSSParser.cpp:
1386         (WebCore::CSSParser::parseValue):
1387         Make sure to bail after checking inherit/unset/initial for all, since you can't actually
1388         accept longhand values in the shorthand declarations.
1389
1390         (WebCore::CSSParser::parseAnimationProperty):
1391         "all" for animations is a special value and should not be confused with the property. It
1392         animates everything and does not omit unicode-bidi/direction the way the "all" property does.
1393
1394         * css/CSSPropertyNames.in:
1395         Add the "all" property to the list and use a special keyword in the Longhands value, "all",
1396         that makeprop.pl will look for. This way we don't have to dump every single CSS property
1397         into the Longhands expression, since that would be nuts.
1398
1399         * css/StyleProperties.cpp:
1400         (WebCore::StyleProperties::getPropertyValue):
1401         Look for a common value across all properties supported by "all". That way you can get
1402         back inherit/initial/unset from it.
1403
1404         * css/makeprop.pl:
1405         Make the perl script look for "all" in the longhand list, and if it sees it, put every
1406         single CSS property into the list for the all shorthand.
1407
1408 2015-10-16  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1409
1410         Binding generator should use templated JSXXConstructor
1411         https://bugs.webkit.org/show_bug.cgi?id=149952
1412
1413         Reviewed by Darin Adler.
1414
1415         Adding constructor templates:
1416         - JSDOMConstructor: usual JS constructors
1417         - JSDOMNamedConstructor: for named constructors
1418         - JSDOMConstructorNotConstructable: for objects that cannot be constructed directly from JS.
1419
1420         Binding generator is using these 3 templates and is generating specializations for construct, initializeProperties and s_info.
1421         These templates may also be used for private or custom constructors as examplified by JSImageConstructor
1422         and JSReadableStream reader and controller private constructors.
1423
1424         Updated binding generator to use those templates.
1425         Updated JSImageConstructor.cpp to use JSDOMNamedConstructor.
1426         Updated default template implementation of JSBuiltinConstructor::createObject.
1427         Updated generated helper routines of binding generator to fit with the templates.
1428
1429         A further patch should remove DOMConstructorWithDocument and DOMConstructorJSBuiltinObject. 
1430
1431         Covered by binding tests.
1432
1433         * bindings/js/JSDOMConstructor.h:
1434         (WebCore::JSDOMConstructorNotConstructable::create):
1435         (WebCore::JSDOMConstructorNotConstructable::createStructure):
1436         (WebCore::JSDOMConstructorNotConstructable::JSDOMConstructorNotConstructable):
1437         (WebCore::JSDOMConstructorNotConstructable::initializeProperties):
1438         (WebCore::JSDOMConstructorNotConstructable<JSClass>::finishCreation):
1439         (WebCore::JSDOMConstructor::create):
1440         (WebCore::JSDOMConstructor::createStructure):
1441         (WebCore::JSDOMConstructor::JSDOMConstructor):
1442         (WebCore::JSDOMConstructor::initializeProperties):
1443         (WebCore::JSDOMConstructor<JSClass>::finishCreation):
1444         (WebCore::JSDOMConstructor<JSClass>::getConstructData):
1445         (WebCore::JSDOMNamedConstructor::create):
1446         (WebCore::JSDOMNamedConstructor::createStructure):
1447         (WebCore::JSDOMNamedConstructor::JSDOMNamedConstructor):
1448         (WebCore::JSDOMNamedConstructor::initializeProperties):
1449         (WebCore::JSDOMNamedConstructor<JSClass>::finishCreation):
1450         (WebCore::JSDOMNamedConstructor<JSClass>::getConstructData):
1451         * bindings/js/JSDOMWindowCustom.cpp:
1452         (WebCore::JSDOMWindow::image):
1453         * bindings/js/JSImageConstructor.cpp:
1454         (WebCore::JSImageConstructor::initializeProperties):
1455         (WebCore::JSImageConstructor::construct):
1456         (WebCore::createImageConstructor):
1457         * bindings/js/JSImageConstructor.h:
1458         * bindings/scripts/CodeGeneratorJS.pm:
1459         (GetConstructorTemplateClassName):
1460         (GenerateConstructorDeclaration):
1461         (GenerateOverloadedConstructorDefinition):
1462         (GenerateConstructorDefinition):
1463         (GenerateConstructorHelperMethods):
1464         (GenerateImplementation): Deleted.
1465         (GenerateConstructorDefinitions): Deleted.
1466         (HasCustomSetter): Deleted.
1467         (HasCustomMethod): Deleted.
1468         (NeedsConstructorProperty): Deleted.
1469         (ComputeFunctionSpecial): Deleted.
1470         (AddJSBuiltinIncludesIfNeeded): Deleted.
1471         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1472         (WebCore::JSTestActiveDOMObjectConstructor::initializeProperties):
1473         (WebCore::JSTestActiveDOMObjectPrototype::finishCreation): Deleted.
1474         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject): Deleted.
1475         * bindings/scripts/test/JS/JSTestCallback.cpp:
1476         (WebCore::JSTestCallbackConstructor::initializeProperties):
1477         (WebCore::JSTestCallback::callbackWithNoParam): Deleted.
1478         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1479         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::construct):
1480         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties):
1481         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation): Deleted.
1482         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject): Deleted.
1483         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype): Deleted.
1484         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype): Deleted.
1485         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::destroy): Deleted.
1486         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1487         (WebCore::JSTestCustomNamedGetterConstructor::initializeProperties):
1488         (WebCore::JSTestCustomNamedGetterPrototype::finishCreation): Deleted.
1489         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter): Deleted.
1490         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1491         (WebCore::JSTestEventConstructorConstructor::construct):
1492         (WebCore::JSTestEventConstructorConstructor::initializeProperties):
1493         (WebCore::JSTestEventConstructorPrototype::finishCreation): Deleted.
1494         (WebCore::JSTestEventConstructor::JSTestEventConstructor): Deleted.
1495         (WebCore::JSTestEventConstructor::getPrototype): Deleted.
1496         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1497         (WebCore::JSTestEventTargetConstructor::initializeProperties):
1498         (WebCore::JSTestEventTargetPrototype::finishCreation): Deleted.
1499         * bindings/scripts/test/JS/JSTestException.cpp:
1500         (WebCore::JSTestExceptionConstructor::initializeProperties):
1501         (WebCore::JSTestExceptionPrototype::finishCreation): Deleted.
1502         (WebCore::JSTestException::JSTestException): Deleted.
1503         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1504         (WebCore::JSTestGenerateIsReachableConstructor::initializeProperties):
1505         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation): Deleted.
1506         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable): Deleted.
1507         * bindings/scripts/test/JS/JSTestInterface.cpp:
1508         (WebCore::JSTestInterfaceConstructor::construct):
1509         (WebCore::JSTestInterfaceConstructor::initializeProperties):
1510         (WebCore::JSTestInterfaceConstructor::getConstructData):
1511         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1512         (WebCore::JSTestJSBuiltinConstructorConstructor::createJSObject):
1513         (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties):
1514         (WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation): Deleted.
1515         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor): Deleted.
1516         (WebCore::JSTestJSBuiltinConstructor::createPrototype): Deleted.
1517         (WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.
1518         (WebCore::JSTestJSBuiltinConstructor::destroy): Deleted.
1519         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1520         (WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties):
1521         (WebCore::JSTestMediaQueryListListenerPrototype::finishCreation): Deleted.
1522         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): Deleted.
1523         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1524         (WebCore::JSTestNamedConstructorConstructor::initializeProperties):
1525         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
1526         (WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties):
1527         (WebCore::JSTestNamedConstructorPrototype::finishCreation): Deleted.
1528         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor): Deleted.
1529         (WebCore::jsTestNamedConstructorConstructor): Deleted.
1530         (WebCore::JSTestNamedConstructor::getConstructor): Deleted.
1531         (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots): Deleted.
1532         * bindings/scripts/test/JS/JSTestNode.cpp:
1533         (WebCore::JSTestNodeConstructor::construct):
1534         (WebCore::JSTestNodeConstructor::initializeProperties):
1535         (WebCore::JSTestNodePrototype::finishCreation): Deleted.
1536         (WebCore::JSTestNode::JSTestNode): Deleted.
1537         (WebCore::JSTestNode::getPrototype): Deleted.
1538         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1539         (WebCore::JSTestNondeterministicConstructor::initializeProperties):
1540         (WebCore::JSTestNondeterministicPrototype::finishCreation): Deleted.
1541         * bindings/scripts/test/JS/JSTestObj.cpp:
1542         (WebCore::JSTestObjConstructor::construct):
1543         (WebCore::JSTestObjConstructor::initializeProperties):
1544         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1545         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
1546         (WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties):
1547         (WebCore::constructJSTestOverloadedConstructors1): Deleted.
1548         (WebCore::constructJSTestOverloadedConstructors2): Deleted.
1549         (WebCore::JSTestOverloadedConstructorsPrototype::finishCreation): Deleted.
1550         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors): Deleted.
1551         (WebCore::JSTestOverloadedConstructors::createPrototype): Deleted.
1552         (WebCore::JSTestOverloadedConstructors::getPrototype): Deleted.
1553         (WebCore::JSTestOverloadedConstructors::destroy): Deleted.
1554         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1555         (WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties):
1556         (WebCore::JSTestOverrideBuiltinsPrototype::finishCreation): Deleted.
1557         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins): Deleted.
1558         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1559         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties):
1560         (WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation): Deleted.
1561         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1562         (WebCore::JSTestTypedefsConstructor::construct):
1563         (WebCore::JSTestTypedefsConstructor::initializeProperties):
1564         (WebCore::JSTestTypedefsPrototype::finishCreation): Deleted.
1565         * bindings/scripts/test/JS/JSattribute.cpp:
1566         (WebCore::JSattributeConstructor::initializeProperties):
1567         (WebCore::JSattributePrototype::finishCreation): Deleted.
1568         (WebCore::JSattribute::JSattribute): Deleted.
1569         * bindings/scripts/test/JS/JSreadonly.cpp:
1570         (WebCore::JSreadonlyConstructor::initializeProperties):
1571         (WebCore::JSreadonlyPrototype::finishCreation): Deleted.
1572         (WebCore::JSreadonly::JSreadonly): Deleted.
1573
1574 2015-10-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1575
1576         [GStreamer] ASSERTION FAILED: !m_adoptionIsRequired in MediaSourceGStreamer::addSourceBuffer
1577         https://bugs.webkit.org/show_bug.cgi?id=150229
1578
1579         Reviewed by Philippe Normand.
1580
1581         This happens in the debug bot in all media source tests that run
1582         that code. The problem is that we are creating a RefPtr without
1583         adopting the reference.
1584
1585         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
1586         (WebCore::MediaSourceGStreamer::addSourceBuffer): Use
1587         SourceBufferPrivateGStreamer::create().
1588         * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp:
1589         (WebCore::SourceBufferPrivateGStreamer::create): Added to make
1590         sure you can't create a SourceBufferPrivateGStreamer without
1591         adopting the reference.
1592         (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
1593         Takes a reference to the client instead of a PassRefPtr.
1594         * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h:
1595
1596 2015-10-15  Roopesh Chander  <roop@roopc.net>
1597
1598         [Content Extensions] Content blocking rules are not consulted for pings
1599         https://bugs.webkit.org/show_bug.cgi?id=149873
1600
1601         Reviewed by Alex Christensen.
1602
1603         This patch makes requests sent through the PingLoader
1604         respect content blocking rules. Specifically, the following
1605         are now subject to content blocking rules:
1606  
1607          1. <a ping> pings
1608          2. Images loaded in unload / beforeunload / pagehide handlers
1609          3. X-XSS-Protection / CSP violation reports
1610
1611         Tests: http/tests/contentextensions/block-cookies-in-csp-report.html
1612                http/tests/contentextensions/block-cookies-in-image-load-in-onunload.html
1613                http/tests/contentextensions/block-cookies-in-ping.html
1614                http/tests/contentextensions/block-csp-report.html
1615                http/tests/contentextensions/block-image-load-in-onunload.html
1616                http/tests/contentextensions/block-ping.html
1617                http/tests/contentextensions/hide-on-csp-report.html
1618
1619         * loader/PingLoader.cpp:
1620         (WebCore::processContentExtensionRulesForLoad):
1621         (WebCore::PingLoader::loadImage):
1622         (WebCore::PingLoader::sendPing):
1623         (WebCore::PingLoader::sendViolationReport):
1624
1625 2015-10-14  Joseph Pecoraro  <pecoraro@apple.com>
1626
1627         Web Inspector: Include Garbage Collection Event in Timeline
1628         https://bugs.webkit.org/show_bug.cgi?id=142510
1629
1630         Reviewed by Geoffrey Garen and Brian Burg.
1631
1632         Tests: inspector/heap/garbageCollected.html
1633                inspector/heap/gc.html
1634
1635         * ForwardingHeaders/heap/HeapObserver.h: Added.
1636         * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Added.
1637         * WebCore.vcxproj/WebCore.vcxproj:
1638         * WebCore.vcxproj/WebCore.vcxproj.filters:
1639         Forwarding headers.
1640
1641         * inspector/InspectorController.cpp:
1642         (WebCore::InspectorController::InspectorController):
1643         (WebCore::InspectorController::vm):
1644         * inspector/InspectorController.h:
1645         * inspector/WorkerInspectorController.cpp:
1646         (WebCore::WorkerInspectorController::vm):
1647         * inspector/WorkerInspectorController.h:
1648         Implement InspectorEnvironment::vm and create a Heap agent for the
1649         Page inspector controller.
1650
1651 2015-10-15  Commit Queue  <commit-queue@webkit.org>
1652
1653         Unreviewed, rolling out r191156.
1654         https://bugs.webkit.org/show_bug.cgi?id=150215
1655
1656         Introduced crashing test (Requested by bradee-oh on #webkit).
1657
1658         Reverted changeset:
1659
1660         "Modern IDB: Support IDBDatabase.close()."
1661         https://bugs.webkit.org/show_bug.cgi?id=150150
1662         http://trac.webkit.org/changeset/191156
1663
1664 2015-10-15  Brady Eidson  <beidson@apple.com>
1665
1666         Modern IDB: Support IDBDatabase.close().
1667         https://bugs.webkit.org/show_bug.cgi?id=150150
1668
1669         Reviewed by Alex Christensen.
1670
1671         No new tests (Covered by changes to storage/indexeddb/modern/opendatabase-versions.html).
1672
1673         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1674         (WebCore::IDBClient::IDBConnectionToServer::databaseConnectionClosed):
1675         * Modules/indexeddb/client/IDBConnectionToServer.h:
1676         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1677
1678         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1679         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
1680         (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
1681         (WebCore::IDBClient::IDBDatabase::close):
1682         (WebCore::IDBClient::IDBDatabase::maybeCloseInServer):
1683         (WebCore::IDBClient::IDBDatabase::commitTransaction):
1684         * Modules/indexeddb/client/IDBDatabaseImpl.h:
1685         (WebCore::IDBClient::IDBDatabase::databaseConnectionIdentifier):
1686
1687         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1688         (WebCore::IDBClient::IDBRequest::result):
1689
1690         * Modules/indexeddb/server/IDBServer.cpp:
1691         (WebCore::IDBServer::IDBServer::databaseConnectionClosed):
1692         * Modules/indexeddb/server/IDBServer.h:
1693
1694         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1695         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
1696         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Deleted.
1697         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1698
1699         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
1700         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
1701         (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
1702         (WebCore::IDBServer::UniqueIDBDatabaseConnection::hasNonFinishedTransactions):
1703         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
1704         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
1705
1706         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1707         (WebCore::InProcessIDBServer::databaseConnectionClosed):
1708         * Modules/indexeddb/shared/InProcessIDBServer.h:
1709
1710 2015-10-15  David Hyatt  <hyatt@apple.com>
1711
1712         Patch parseKeywordValue to accept "unset" so that it goes down the faster parsing path.
1713         https://bugs.webkit.org/show_bug.cgi?id=150213
1714
1715         Reviewed by Dean Jackson.
1716
1717         No new tests as correctness doesn't change (just speed).
1718
1719         * css/CSSParser.cpp:
1720         (WebCore::parseKeywordValue):
1721
1722 2015-10-15  David Hyatt  <hyatt@apple.com>
1723
1724         Add support for the CSS 'unset' keyword.
1725         https://bugs.webkit.org/show_bug.cgi?id=148614
1726
1727         Reviewed by Dean Jackson.
1728
1729         Added new test in fast/css, and existing variables tests also use unset in several tests.
1730
1731         * WebCore.xcodeproj/project.pbxproj:
1732         Add CSSUnsetValue.cpp to the project.
1733
1734         * bindings/objc/DOMCSS.mm:
1735         (kitClass):
1736         Make sure UNSET is handled in the switch.
1737
1738         * css/CSSParser.cpp:
1739         (WebCore::parseKeywordValue):
1740         (WebCore::CSSParser::parseValue):
1741         (WebCore::CSSParser::parseCustomPropertyDeclaration):
1742         Add cases to create a CSSUnsetValue properly.
1743
1744         * css/CSSToStyleMap.cpp:
1745         (WebCore::CSSToStyleMap::styleImage):
1746         (WebCore::CSSToStyleMap::mapFillAttachment):
1747         (WebCore::CSSToStyleMap::mapFillClip):
1748         (WebCore::CSSToStyleMap::mapFillComposite):
1749         (WebCore::CSSToStyleMap::mapFillBlendMode):
1750         (WebCore::CSSToStyleMap::mapFillOrigin):
1751         (WebCore::CSSToStyleMap::mapFillImage):
1752         (WebCore::CSSToStyleMap::mapFillRepeatX):
1753         (WebCore::CSSToStyleMap::mapFillRepeatY):
1754         (WebCore::convertToLengthSize):
1755         (WebCore::CSSToStyleMap::mapFillSize):
1756         (WebCore::CSSToStyleMap::mapFillXPosition):
1757         (WebCore::CSSToStyleMap::mapFillYPosition):
1758         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
1759         (WebCore::CSSToStyleMap::mapAnimationDelay):
1760         (WebCore::CSSToStyleMap::mapAnimationDirection):
1761         (WebCore::CSSToStyleMap::mapAnimationDuration):
1762         (WebCore::CSSToStyleMap::mapAnimationFillMode):
1763         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
1764         (WebCore::CSSToStyleMap::mapAnimationName):
1765         (WebCore::CSSToStyleMap::mapAnimationPlayState):
1766         (WebCore::CSSToStyleMap::mapAnimationProperty):
1767         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
1768         (WebCore::CSSToStyleMap::mapAnimationTrigger):
1769         The background and animation functions need to check for unset and be able to map it properly to initial. This is done
1770         with a new treatAsInitial method on CSSValue that can take the property ID and check for both initial
1771         or unset on a non-inherited property.
1772
1773         * css/CSSUnsetValue.cpp: Added.
1774         (WebCore::CSSUnsetValue::customCSSText):
1775         * css/CSSUnsetValue.h: Added.
1776         (WebCore::CSSUnsetValue::create):
1777         (WebCore::CSSUnsetValue::equals):
1778         (WebCore::CSSUnsetValue::CSSUnsetValue):
1779         This new value looks exactly like CSSInheritedValue and CSSInitialValue.
1780
1781         * css/CSSValue.cpp:
1782         (WebCore::CSSValue::cssValueType):
1783         (WebCore::CSSValue::cssText):
1784         (WebCore::CSSValue::destroy):
1785         (WebCore::CSSValue::isInvalidCustomPropertyValue):
1786         (WebCore::CSSValue::treatAsInheritedValue):
1787         (WebCore::CSSValue::treatAsInitialValue):
1788         * css/CSSValue.h:
1789         (WebCore::CSSValue::isUnsetValue):
1790         Add isUnsetValue and the UnsetClass. Add support for treatAsInheritedValue and treatAsInitialValue to have
1791         a way to query for initial/inherit or the matching unset type.
1792
1793         * css/CSSValueKeywords.in:
1794         Add the unset keyword.
1795
1796         * css/CSSValuePool.cpp:
1797         (WebCore::CSSValuePool::CSSValuePool):
1798         * css/CSSValuePool.h:
1799         (WebCore::CSSValuePool::createUnsetValue):
1800         Have a singleton model for unset just like we do for inherit/initial.
1801
1802         * css/StyleResolver.cpp:
1803         (WebCore::StyleResolver::applyProperty):
1804         Handle unset correctly. It maps to inherit for inherited properties and initial for non-inherited ones.
1805
1806 2015-10-15  Myles C. Maxfield  <mmaxfield@apple.com>
1807
1808         Migrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
1809         https://bugs.webkit.org/show_bug.cgi?id=150155
1810
1811         Reviewed by Tim Horton.
1812
1813         No new tests because there is no behavior change.
1814
1815         * platform/graphics/cg/GraphicsContextCG.cpp:
1816         (WebCore::GraphicsContext::drawPattern):
1817         (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
1818         * platform/graphics/cg/ImageBufferCG.cpp:
1819         (WebCore::ImageBuffer::putByteArray):
1820         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1821         * platform/mac/WebCoreSystemInterface.h:
1822         * platform/mac/WebCoreSystemInterface.mm:
1823
1824 2015-10-15  Dan Bernstein  <mitz@apple.com>
1825
1826         Fixed the build.
1827
1828         * platform/network/mac/ResourceHandleMac.mm:
1829
1830 2015-10-15  Dan Bernstein  <mitz@apple.com>
1831
1832         [Cocoa] Stop using WKSetNSURLConnectionDefersCallbacks
1833         https://bugs.webkit.org/show_bug.cgi?id=150189
1834
1835         Reviewed by Anders Carlsson.
1836
1837         * platform/ios/WebCoreSystemInterfaceIOS.mm: Removed definition.
1838         * platform/mac/WebCoreSystemInterface.h: Removed declaration.
1839         * platform/mac/WebCoreSystemInterface.mm: Removed definition.
1840
1841         * platform/network/mac/ResourceHandleMac.mm:
1842         (WebCore::ResourceHandle::start): Changed to use -[NSURLConnection setDefersLoading:].
1843         (WebCore::ResourceHandle::platformSetDefersLoading): Ditto.
1844
1845         * platform/spi/cocoa/NSURLConnectionSPI.h: Added declaration of
1846           -[NSURLConnection setDefersLoading:].
1847
1848 2015-10-15  Dean Jackson  <dino@apple.com>
1849
1850         CSSKeyframesRule::appendRule is deprecated, but is actually the spec
1851         https://bugs.webkit.org/show_bug.cgi?id=150113
1852
1853         Reviewed by Simon Fraser.
1854
1855         I stupidly deprecated the wrong function in
1856         http://trac.webkit.org/changeset/174469
1857
1858         * css/CSSKeyframesRule.cpp:
1859         (WebCore::CSSKeyframesRule::insertRule): Swap the code between these two.
1860         (WebCore::CSSKeyframesRule::appendRule):
1861
1862 2015-10-14  David Hyatt  <hyatt@apple.com>
1863
1864         Implement CSS Variables.
1865         https://bugs.webkit.org/show_bug.cgi?id=19660
1866
1867         Reviewed by Dean Jackson.
1868
1869         Added new tests in fast/css/custom-properties and fast/css/variables.
1870
1871         * CMakeLists.txt:
1872         * WebCore.xcodeproj/project.pbxproj:
1873         Add CSSVariableValue.cpp and CSSVariableDependentValue.cpp to builds.
1874
1875         * css/CSSCalculationValue.cpp:
1876         (WebCore::hasDoubleValue):
1877         Handle the new CSS_PARSER_WHITESPACE value.
1878
1879         * css/CSSComputedStyleDeclaration.cpp:
1880         (WebCore::ComputedStyleExtractor::customPropertyValue):
1881         Patched to make sure style is updated so that dynamic changes to custom properties are reflected
1882         immediately when querying values.
1883
1884         (WebCore::CSSComputedStyleDeclaration::length):
1885         (WebCore::CSSComputedStyleDeclaration::item):
1886         The custom properties table is a reference and not a pointer now.
1887
1888         * css/CSSCustomPropertyValue.h:
1889         (WebCore::CSSCustomPropertyValue::create):
1890         (WebCore::CSSCustomPropertyValue::createInvalid):
1891         (WebCore::CSSCustomPropertyValue::customCSSText):
1892         (WebCore::CSSCustomPropertyValue::equals):
1893         (WebCore::CSSCustomPropertyValue::isInvalid):
1894         (WebCore::CSSCustomPropertyValue::containsVariables):
1895         (WebCore::CSSCustomPropertyValue::value):
1896         (WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
1897         The CSSCustomPropertyValue represents a custom property/value pair in the back end. It holds on
1898         to both the property name and a CSSValueList that has the original parser terms. This class also
1899         doubles as the invalid-at-compute-time value for custom properties when they contain cycles, etc.
1900
1901         * css/CSSFunctionValue.cpp:
1902         (WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):
1903          * css/CSSFunctionValue.h:
1904         (WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):
1905         Hands back a CSSParserValue for a function with variables replaced with their real values (or fallback).
1906
1907         * css/CSSGrammar.y.in:
1908         Many changes to support the var() syntax and to handle error conditions and cases.
1909
1910         * css/CSSParser.cpp:
1911         (WebCore::filterProperties):
1912         Null check the value here. Shouldn't happen, but being paranoid.
1913
1914         (WebCore::CSSParser::parseVariableDependentValue):
1915         This function converts a CSSValueList back into a CSSParserValueList and then passes
1916         it off to the parser. If the result parses, successfully, then the parsed CSSValue is handed back.
1917
1918         (WebCore::CSSParser::parseValue):
1919         Detect when a property value contains variables and simply make a CSSVariableDependentValue to hold
1920         a copy of the parser value list (as a CSSValueList). We defer parsing the list until compute-time
1921         when we know the values of the variables to use.
1922
1923         (WebCore::CSSParser::parseCustomPropertyDeclaration):
1924         Add support for inherit, initial and variable references in custom properties.
1925
1926         (WebCore::CSSParser::detectFunctionTypeToken):
1927         Add support for detection of the "var" token.
1928
1929         (WebCore::CSSParser::realLex):
1930         Fix the parsing of custom properties to allow "--" and to allow them to start with digits, e.g., "--0".
1931
1932         * css/CSSParser.h:
1933         Add parseVariableDependentValue function for handling variable substitution and subsequent parsing
1934         of the resolved parser value list.
1935
1936         * css/CSSParserValues.cpp:
1937         (WebCore::CSSParserValueList::containsVariables):
1938         Get rid of the toString() function (no longer needed) and replace it with containsVariables(). This
1939         check is used to figure out if a parser value list has variables and thus needs to defer parsing
1940         until later.
1941
1942         (WebCore::CSSParserValue::createCSSValue):
1943         Add support for the creation of values for variables, CSSVariableValues.
1944
1945         (WebCore::CSSParserValueList::toString): Deleted.
1946         No longer needed.
1947
1948         * css/CSSParserValues.h:
1949         Add CSSParserVariable as a new kind of parser value. This represents a var() that is encountered
1950         during parsing. It is similar to a function except it has to hold both the reference (custom property name)
1951         and fallback arguments.
1952
1953         * css/CSSPrimitiveValue.cpp:
1954         (WebCore::isValidCSSUnitTypeForDoubleConversion):
1955         (WebCore::CSSPrimitiveValue::cleanup):
1956         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
1957         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1958         (WebCore::CSSPrimitiveValue::equals):
1959         Add support for CSS_PARSER_WHITESPACE as a way of preserving whitespace as a parsed item (variables can
1960         be only whitespace, and this has to be retained).
1961
1962         (WebCore::CSSPrimitiveValue::buildParserValue):
1963         Conversion from a CSSPrimitiveValue back into a parser value is handled by this function.
1964
1965         * css/CSSPrimitiveValue.h:
1966         (WebCore::CSSPrimitiveValue::isParserOperator):
1967         (WebCore::CSSPrimitiveValue::parserOperator):
1968         Add ability to get parser operator info. Add the buildParserValue declaration.
1969
1970         * css/CSSValue.cpp:
1971         (WebCore::CSSValue::equals):
1972         (WebCore::CSSValue::cssText):
1973         (WebCore::CSSValue::destroy):
1974         (WebCore::CSSValue::cloneForCSSOM):
1975         (WebCore::CSSValue::isInvalidCustomPropertyValue):
1976         * css/CSSValue.h:
1977         Add support for variable values and variable dependent values.
1978
1979         * css/CSSValueList.cpp:
1980         (WebCore::CSSValueList::customCSSText):
1981         Improve serialization to not output extra spaces when a comma operator is a value.
1982
1983         (WebCore::CSSValueList::containsVariables):
1984         Whether or not a CSSVariableValue can be found somewhere within the list (or its descendants).
1985
1986         (WebCore::CSSValueList::checkVariablesForCycles):
1987         Called to check variables for cycles.
1988
1989         (WebCore::CSSValueList::buildParserValueSubstitutingVariables):
1990         (WebCore::CSSValueList::buildParserValueListSubstitutingVariables):
1991         Functions that handle converting the value list to a parser value list while making
1992         variable substitutions along the way.
1993
1994         * css/CSSValueList.h:
1995         Add the new buildParserXXX functions.
1996
1997         * css/CSSVariableDependentValue.cpp: Added.
1998         (WebCore::CSSVariableDependentValue::checkVariablesForCycles):
1999         * css/CSSVariableDependentValue.h: Added.
2000         (WebCore::CSSVariableDependentValue::create):
2001         (WebCore::CSSVariableDependentValue::customCSSText):
2002         (WebCore::CSSVariableDependentValue::equals):
2003         (WebCore::CSSVariableDependentValue::propertyID):
2004         (WebCore::CSSVariableDependentValue::valueList):
2005         (WebCore::CSSVariableDependentValue::CSSVariableDependentValue):
2006         This value represents a list of terms that have not had variables substituted yet. The list
2007         is held by the value so that it can be converted back into a parser value list once the
2008         variable values are known.
2009
2010         * css/CSSVariableValue.cpp: Added.
2011         (WebCore::CSSVariableValue::CSSVariableValue):
2012         (WebCore::CSSVariableValue::customCSSText):
2013         (WebCore::CSSVariableValue::equals):
2014         (WebCore::CSSVariableValue::buildParserValueListSubstitutingVariables):
2015         * css/CSSVariableValue.h: Added.
2016         (WebCore::CSSVariableValue::create):
2017         (WebCore::CSSVariableValue::name):
2018         (WebCore::CSSVariableValue::fallbackArguments):
2019         This value represents a var() itself. It knows how to do the substitution of the variable
2020         value and to apply fallback if that value is not present.
2021
2022         * css/StyleProperties.cpp:
2023         (WebCore::StyleProperties::getPropertyValue):
2024         (WebCore::StyleProperties::borderSpacingValue):
2025         (WebCore::StyleProperties::getLayeredShorthandValue):
2026         (WebCore::StyleProperties::getShorthandValue):
2027         (WebCore::StyleProperties::getCommonValue):
2028         (WebCore::StyleProperties::getPropertyCSSValue):
2029         (WebCore::StyleProperties::getPropertyCSSValueInternal):
2030         (WebCore::StyleProperties::asText):
2031         (WebCore::StyleProperties::copyPropertiesInSet):
2032         * css/StyleProperties.h:
2033         Patched to factor property fetching into an internal method so that variables can work with shorthands
2034         in the CSS OM.
2035
2036         * css/StyleResolver.cpp:
2037         (WebCore::StyleResolver::applyProperty):
2038         Resolve variable values at compute time. If they fail to resolve, use inherit or initial as the
2039         value (depending on whether the property inherits by default).
2040
2041         (WebCore::StyleResolver::resolvedVariableValue):
2042         Helper function that calls parseVariableDependentValue and gets the resolved result.
2043
2044         (WebCore::StyleResolver::applyCascadedProperties):
2045         After custom properties have been collected, we check for cycles and perform variable substitutions.
2046         This way we get all the variables replaced before we inherit down the style tree.
2047
2048         * css/StyleResolver.h:
2049         Add resolvedVariableValue declaration.
2050
2051         * css/makeprop.pl:
2052         Make sure custom properties are inherited by default.
2053
2054         * rendering/style/RenderStyle.cpp:
2055         (WebCore::RenderStyle::checkVariablesInCustomProperties):
2056         This function handles updating variables with cycles to be invalid in the RenderStyle. It then also
2057         handles the replacement of variables found in custom properties with resolved values. All custom
2058         properties are either invalid or are real non-variable-dependent value lists after this function
2059         completes.
2060
2061         * rendering/style/RenderStyle.h:
2062         Add checkVariablesInCustomProperties declaration.
2063
2064         * rendering/style/StyleCustomPropertyData.h:
2065         (WebCore::StyleCustomPropertyData::create):
2066         (WebCore::StyleCustomPropertyData::copy):
2067         (WebCore::StyleCustomPropertyData::operator==):
2068         (WebCore::StyleCustomPropertyData::operator!=):
2069         (WebCore::StyleCustomPropertyData::setCustomPropertyValue):
2070         (WebCore::StyleCustomPropertyData::getCustomPropertyValue):
2071         (WebCore::StyleCustomPropertyData::values):
2072         (WebCore::StyleCustomPropertyData::hasCustomProperty):
2073         (WebCore::StyleCustomPropertyData::containsVariables):
2074         (WebCore::StyleCustomPropertyData::setContainsVariables):
2075         (WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
2076         Miscellaneous cleanup, and the addition of whether or not the properties still contain variable
2077         dependent values that need to be resolved.
2078
2079 2015-10-15  Csaba Osztrogonác  <ossy@webkit.org>
2080
2081         Fix the !(ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)) build after r191112
2082         https://bugs.webkit.org/show_bug.cgi?id=150175
2083
2084         Reviewed by Antti Koivisto.
2085
2086         * dom/ComposedTreeAncestorIterator.h:
2087         (WebCore::ComposedTreeAncestorIterator::traverseParent):
2088         * dom/ComposedTreeIterator.cpp:
2089         (WebCore::ComposedTreeIterator::initializeShadowStack):
2090         * dom/Element.cpp:
2091         (WebCore::Element::childrenChanged):
2092
2093 2015-10-15  Csaba Osztrogonác  <ossy@webkit.org>
2094
2095         Get rid of the only once used isIntegerArray function
2096         https://bugs.webkit.org/show_bug.cgi?id=150170
2097
2098         Reviewed by Geoffrey Garen.
2099
2100         * page/Crypto.cpp:
2101         (WebCore::Crypto::getRandomValues):
2102
2103 2015-10-15  Tim Horton  <timothy_horton@apple.com>
2104
2105         Try to fix the iOS build.
2106
2107         * page/EventHandler.h:
2108
2109 2015-10-15  Zalan Bujtas  <zalan@apple.com>
2110
2111         Anonymous table objects: Collapse anonymous table rows.
2112         https://bugs.webkit.org/show_bug.cgi?id=150154
2113
2114         Reviewed by David Hyatt.
2115
2116         Merge anonymous table rows when they are not needed anymore.
2117         Generated table rows can be collapsed into one when there's no
2118         non-generated sibling table row left in the tree.
2119
2120         Import W3C CSS2.1 anonymous table tests.
2121
2122         * rendering/RenderObject.cpp:
2123         (WebCore::collapseAnonymousTableRowsIfNeeded):
2124         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
2125
2126 2015-10-15  Simon Fraser  <simon.fraser@apple.com>
2127
2128         Un-indent contents of the WebCore namespace
2129         in GraphicsContext.h. No code changes.
2130
2131         * platform/graphics/GraphicsContext.h:
2132
2133 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
2134
2135         Move ImageBuffer:clip() into GraphicsContextCG
2136         https://bugs.webkit.org/show_bug.cgi?id=150140
2137
2138         Reviewed by Zalan Bujtas.
2139
2140         Move the guts of CG's ImageBuffer:clip() into GraphicsContextCG.
2141
2142         * platform/graphics/GraphicsContext.h:
2143         * platform/graphics/cg/GraphicsContextCG.cpp:
2144         (WebCore::GraphicsContext::clipToNativeImage):
2145         * platform/graphics/cg/ImageBufferCG.cpp:
2146         (WebCore::ImageBuffer::clip):
2147
2148 2015-10-14  Brady Eidson  <beidson@apple.com>
2149
2150         Modern IDB: Add basic transaction committing.
2151         https://bugs.webkit.org/show_bug.cgi?id=150147
2152
2153         Reviewed by Alex Christensen.
2154
2155         Test: storage/indexeddb/modern/opendatabase-versions.html
2156
2157         * Modules/indexeddb/IDBTransaction.h:
2158
2159         * Modules/indexeddb/IndexedDB.h:
2160
2161         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2162         (WebCore::IDBClient::IDBConnectionToServer::commitTransaction):
2163         (WebCore::IDBClient::IDBConnectionToServer::didCommitTransaction):
2164         * Modules/indexeddb/client/IDBConnectionToServer.h:
2165         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2166
2167         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2168         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
2169         (WebCore::IDBClient::IDBDatabase::commitTransaction):
2170         (WebCore::IDBClient::IDBDatabase::didCommitTransaction):
2171         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
2172         (WebCore::IDBClient::IDBDatabase::didCommitOrAbortTransaction):
2173         * Modules/indexeddb/client/IDBDatabaseImpl.h:
2174
2175         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
2176         (WebCore::IDBClient::IDBFactory::open):
2177
2178         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2179         (WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
2180         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
2181
2182         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2183         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
2184         (WebCore::IDBClient::IDBTransaction::db):
2185         (WebCore::IDBClient::IDBTransaction::hasPendingActivity):
2186         (WebCore::IDBClient::IDBTransaction::isActive):
2187         (WebCore::IDBClient::IDBTransaction::scheduleOperationTimer):
2188         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
2189         (WebCore::IDBClient::IDBTransaction::commit):
2190         (WebCore::IDBClient::IDBTransaction::didCommit):
2191         (WebCore::IDBClient::IDBTransaction::fireOnComplete):
2192         (WebCore::IDBClient::IDBTransaction::fireOnAbort):
2193         (WebCore::IDBClient::IDBTransaction::enqueueEvent):
2194         (WebCore::IDBClient::IDBTransaction::dispatchEvent):
2195         * Modules/indexeddb/client/IDBTransactionImpl.h:
2196         (WebCore::IDBClient::IDBTransaction::database):
2197         
2198         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
2199         (WebCore::LegacyTransaction::db):
2200         * Modules/indexeddb/legacy/LegacyTransaction.h:
2201         
2202         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2203         (WebCore::IDBServer::IDBConnectionToClient::didCommitTransaction):
2204         * Modules/indexeddb/server/IDBConnectionToClient.h:
2205         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2206         
2207         * Modules/indexeddb/server/IDBServer.cpp:
2208         (WebCore::IDBServer::IDBServer::registerTransaction):
2209         (WebCore::IDBServer::IDBServer::unregisterTransaction):
2210         (WebCore::IDBServer::IDBServer::commitTransaction):
2211         * Modules/indexeddb/server/IDBServer.h:
2212         
2213         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2214         (WebCore::IDBServer::generateUniqueCallbackIdentifier):
2215         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
2216         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
2217         (WebCore::IDBServer::UniqueIDBDatabase::performCommitTransaction):
2218         (WebCore::IDBServer::UniqueIDBDatabase::didPerformCommitTransaction):
2219         (WebCore::IDBServer::UniqueIDBDatabase::performErrorCallback):
2220         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction): Deleted.
2221         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2222         (WebCore::IDBServer::UniqueIDBDatabase::server):
2223         
2224         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2225         (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
2226         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction):
2227         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
2228         
2229         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2230         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
2231         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):
2232         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
2233         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2234         
2235         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
2236         (WebCore::IDBDatabaseInfo::setVersion):
2237         
2238         * Modules/indexeddb/shared/IDBError.cpp:
2239         (WebCore::IDBError::isolatedCopy):
2240         * Modules/indexeddb/shared/IDBError.h:
2241
2242         * Modules/indexeddb/shared/IDBRequestData.h:
2243
2244         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
2245         (WebCore::IDBResourceIdentifier::isolatedCopy):
2246         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
2247
2248         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2249         (WebCore::InProcessIDBServer::didCommitTransaction):
2250         (WebCore::InProcessIDBServer::commitTransaction):
2251         * Modules/indexeddb/shared/InProcessIDBServer.h:
2252
2253         * WebCore.xcodeproj/project.pbxproj:
2254
2255         * platform/CrossThreadCopier.cpp:
2256         (WebCore::IDBResourceIdentifier>::copy):
2257         (WebCore::IDBError>::copy):
2258         * platform/CrossThreadCopier.h:
2259
2260 2015-10-15  Daniel Bates  <dabates@apple.com>
2261
2262         [iOS] DOM click event may not be dispatched when page has :active style and <input type="search">
2263         https://bugs.webkit.org/show_bug.cgi?id=144451
2264         <rdar://problem/23099482>
2265
2266         Reviewed by Simon Fraser.
2267
2268         Fixes an issue where a DOM click event is not dispatched to an element in a subframe on a page
2269         that has a <input type="search"> and defines a CSS :active pseudo-class for the HTML body element.
2270
2271         On iOS we only dispatch a DOM click event if the content does not change as part
2272         of dispatching a DOM mousemove event at the tapped element. In particular, we do not
2273         dispatch a DOM click event if there is a visibility change to some element on the page
2274         as part of dispatching a mousemove event at the tapped element. For a web page
2275         that specifies CSS :active pseudo-class and contains a search field, applying/unapplying
2276         this pseudo-class as part of dispatching a DOM mousemove event may cause the
2277         visibility of the search field cancel button to change; => a DOM click event will not
2278         be dispatched to the tapped element.
2279
2280         Tests: fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html
2281                fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html
2282                fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html
2283                fast/forms/search/search-cancel-in-formerly-invisible-element.html
2284                fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html
2285                fast/forms/search/search-cancel-toggle-visibility-initially-visible.html
2286
2287         * rendering/RenderSearchField.cpp:
2288         (WebCore::RenderSearchField::updateCancelButtonVisibility): Write logic for determining
2289         whether the visibility of the cancel button changed in terms of m_isCancelButtonVisible
2290         instead of querying for the current style data as the latter is overwritten on a full
2291         style recalculation.
2292         (WebCore::RenderSearchField::RenderSearchField): Deleted.
2293         (WebCore::RenderSearchField::visibilityForCancelButton): Deleted.
2294         * rendering/RenderSearchField.h: Define instance variable m_isCancelButtonVisible to
2295         store the visibility state of the cancel button.
2296
2297 2015-10-15  Antti Koivisto  <antti@apple.com>
2298
2299         Implement iterator for traversing composed ancestors
2300         https://bugs.webkit.org/show_bug.cgi?id=150162
2301
2302         Reviewed by Andreas Kling.
2303
2304         The existing general purpose ComposedTreeIterator can traverse parent chain but not efficiently
2305         (since it builds stack). Add a separate stackless iterator for ancestor chain traversal.
2306
2307         * WebCore.xcodeproj/project.pbxproj:
2308         * dom/ComposedTreeAncestorIterator.h: Added.
2309         (WebCore::ComposedTreeAncestorIterator::operator*):
2310         (WebCore::ComposedTreeAncestorIterator::operator->):
2311         (WebCore::ComposedTreeAncestorIterator::operator==):
2312         (WebCore::ComposedTreeAncestorIterator::operator!=):
2313         (WebCore::ComposedTreeAncestorIterator::operator++):
2314         (WebCore::ComposedTreeAncestorIterator::get):
2315         (WebCore::ComposedTreeAncestorIterator::ComposedTreeAncestorIterator):
2316         (WebCore::ComposedTreeAncestorIterator::traverseParent):
2317         (WebCore::ComposedTreeAncestorAdapter::ComposedTreeAncestorAdapter):
2318         (WebCore::ComposedTreeAncestorAdapter::begin):
2319         (WebCore::ComposedTreeAncestorAdapter::end):
2320         (WebCore::ComposedTreeAncestorAdapter::first):
2321         (WebCore::composedTreeAncestors):
2322         * dom/ComposedTreeIterator.h:
2323         * dom/ContainerNode.h:
2324         (WebCore::Node::highestAncestor):
2325         (WebCore::Node::isTreeScope):
2326         (WebCore::Node::needsNodeRenderingTraversalSlowPath): Deleted.
2327
2328             With NodeRenderingTraversal::parent removed this bit is no longer used.
2329
2330         * dom/Element.cpp:
2331         (WebCore::Element::shadowRoot):
2332         (WebCore::Element::addShadowRoot):
2333         (WebCore::shouldUseNodeRenderingTraversalSlowPath): Deleted.
2334         (WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath): Deleted.
2335         * dom/Element.h:
2336         (WebCore::Element::didAddUserAgentShadowRoot):
2337         (WebCore::Element::alwaysCreateUserAgentShadowRoot):
2338         * dom/Node.cpp:
2339         (WebCore::Node::derefEventTarget):
2340         (WebCore::Node::updateAncestorsForStyleRecalc):
2341         (WebCore::traverseStyleParent): Deleted.
2342         (WebCore::traverseFirstStyleParent): Deleted.
2343
2344             Switch to iterator interface.
2345
2346         * dom/Node.h:
2347         (WebCore::Node::isDocumentFragment):
2348         (WebCore::Node::isShadowRoot):
2349         (WebCore::Node::isNamedFlowContentNode):
2350         (WebCore::Node::hasCustomStyleResolveCallbacks):
2351         (WebCore::Node::setHasCustomStyleResolveCallbacks):
2352         (WebCore::Node::setTreeScope):
2353         (WebCore::Node::setStyleChange):
2354         (WebCore::Node::setNeedsNodeRenderingTraversalSlowPath): Deleted.
2355         * dom/NodeRenderingTraversal.cpp:
2356         (WebCore::NodeRenderingTraversal::traverseParent):
2357         (WebCore::NodeRenderingTraversal::traverseFirstChild):
2358         (WebCore::NodeRenderingTraversal::traverseLastChild):
2359         (WebCore::NodeRenderingTraversal::traversePreviousSibling):
2360         (WebCore::NodeRenderingTraversal::nextInScope):
2361         (WebCore::NodeRenderingTraversal::previousInScope):
2362         (WebCore::NodeRenderingTraversal::parentInScope):
2363         (WebCore::NodeRenderingTraversal::lastChildInScope):
2364         (WebCore::NodeRenderingTraversal::parentSlow): Deleted.
2365         * dom/NodeRenderingTraversal.h:
2366         (WebCore::NodeRenderingTraversal::parent): Deleted.
2367
2368             No longer used.
2369
2370         * html/HTMLSummaryElement.cpp:
2371         * rendering/RenderNamedFlowThread.cpp:
2372         (WebCore::RenderNamedFlowThread::isChildAllowed):
2373
2374             Switch to iterator interface.
2375
2376         * style/RenderTreePosition.cpp:
2377         * style/StyleResolveTree.cpp:
2378         (WebCore::Style::updateTextRendererAfterContentChange):
2379
2380             Switch to iterator interface.
2381
2382 2015-10-14  Zhuo Li  <zachli@apple.com>
2383
2384         Augment <input type=search>’s recent search history with the time each entry was added,
2385         in order to allow time-based clearing of search history.
2386         https://bugs.webkit.org/show_bug.cgi?id=148388.
2387
2388         Reviewed by Darin Adler.
2389
2390         Replace Vector<String> with Vector<RecentSearch>, where RecentSearch is a struct
2391         that consists search string and time, for recent searches in order to store additional time
2392         information.
2393
2394         * WebCore.xcodeproj/project.pbxproj: Added SearchPopupMenuCocoa.h and SearchPopupMenuCocoa.mm
2395         and sort the project file.
2396         * loader/EmptyClients.cpp:
2397         (WebCore::EmptySearchPopupMenu::saveRecentSearches):
2398         (WebCore::EmptySearchPopupMenu::loadRecentSearches):
2399         * platform/SearchPopupMenu.h:
2400         * platform/cocoa/SearchPopupMenuCocoa.h: Added methods for SeachPopupMenuMac in WebKit
2401         and WebPageProxyCocoa in WebKit2 to call.
2402         * platform/cocoa/SearchPopupMenuCocoa.mm: Added.
2403         (WebCore::searchFieldRecentSearchesStorageDirectory): Recent searches with the new structure
2404         are stored in a new location.
2405         (WebCore::searchFieldRecentSearchesPlistPath): Get the path for the plist of the recent
2406         searches entries.
2407         (WebCore::RetainPtr<NSMutableDictionary> readSearchFieldRecentSearchesPlist): Return the
2408         recent searches plist as NSMutableDictionary.
2409         (WebCore::fromNSDatetoSystemClockTime): Convert from NSDate to system_clock::time_point.
2410         (WebCore::fromSystemClockTimetoNSDate): Convert from system_clock::time_point to NSDate.
2411         (WebCore::SearchPopupMenuCocoa::saveRecentSearches): Add a dictionary where it has two pairs
2412         that the first one is the search string and the second one is the time.
2413         (WebCore::SearchPopupMenuCocoa::loadRecentSearches): We expect the recent search item in the
2414         plist to be a two-pair dictionary, and convert the dictionary to the struct RecentSearch.
2415         * platform/win/SearchPopupMenuWin.cpp:
2416         (WebCore::SearchPopupMenuWin::saveRecentSearches): Only save the RecentSearch's search
2417         string on Windows platform, which is what we used to do.
2418         (WebCore::SearchPopupMenuWin::loadRecentSearches): Since we need to construct a
2419         RecentSearch, we get the string from the app's preferences, and set the time to be
2420         std::chrono::system_clock::time_point::min().
2421         * platform/win/SearchPopupMenuWin.h:
2422         * rendering/RenderSearchField.cpp: Now that m_recentSearches are Vector<RecentSearch>,
2423         we cannot use -removeAll with a search string. Use -removeAllMatching instead to remove the
2424         item that has its member search string equal to the search string user inputs.
2425         (WebCore::RenderSearchField::addSearchResult):
2426         (WebCore::RenderSearchField::itemText):
2427
2428 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
2429
2430         Use RefPtr<Image> return type for StyleImage::image()
2431         https://bugs.webkit.org/show_bug.cgi?id=150112
2432
2433         Reviewed by Andreas Kling.
2434         
2435         Change StyleImage::image() and subclasses to return RefPtr<Image>
2436         instead of a PassRefPtr<Image>.
2437
2438         * WebCore.xcodeproj/project.pbxproj:
2439         * rendering/RenderImageResource.cpp:
2440         (WebCore::RenderImageResource::image):
2441         * rendering/RenderImageResource.h:
2442         * rendering/RenderImageResourceStyleImage.cpp:
2443         (WebCore::RenderImageResourceStyleImage::image):
2444         * rendering/RenderImageResourceStyleImage.h:
2445         * rendering/style/StyleCachedImage.cpp:
2446         (WebCore::StyleCachedImage::image):
2447         * rendering/style/StyleCachedImage.h:
2448         * rendering/style/StyleCachedImageSet.cpp:
2449         (WebCore::StyleCachedImageSet::image):
2450         * rendering/style/StyleCachedImageSet.h:
2451         * rendering/style/StyleGeneratedImage.cpp:
2452         (WebCore::StyleGeneratedImage::image):
2453         * rendering/style/StyleGeneratedImage.h:
2454         * rendering/style/StyleImage.h:
2455         * rendering/style/StylePendingImage.h:
2456
2457 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
2458
2459         Give subclasses of CSSImageGeneratorValue a consistent image() return type
2460         https://bugs.webkit.org/show_bug.cgi?id=150111
2461
2462         Reviewed by Andreas Kling.
2463         
2464         CSSImageGeneratorValue and subclasses had signatures of the non-virtual image() function
2465         with mistmatched return types; some returned RefPtr<Image>, and others PassRefPtr<Image>. Make
2466         them all the same.
2467
2468         * css/CSSImageGeneratorValue.cpp:
2469         (WebCore::CSSImageGeneratorValue::image):
2470         * css/CSSImageGeneratorValue.h:
2471         * css/CSSNamedImageValue.cpp:
2472         (WebCore::CSSNamedImageValue::image):
2473         * css/CSSNamedImageValue.h:
2474
2475 2015-10-14  Tim Horton  <timothy_horton@apple.com>
2476
2477         Move some EventHandler initialization to the header
2478         https://bugs.webkit.org/show_bug.cgi?id=150139
2479
2480         Reviewed by Andreas Kling.
2481
2482         No new tests, just cleanup.
2483
2484         * page/EventHandler.cpp:
2485         (WebCore::EventHandler::EventHandler): Deleted.
2486         * page/EventHandler.h:
2487         Also found one member which was unused, and a few that were uninitialized.
2488         It's likely the uninitialized ones didn't actually cause any trouble because
2489         they are reset in lots of places, but this seems better.
2490
2491 2015-10-14  Alex Christensen  <achristensen@webkit.org>
2492
2493         [Content Extensions] Make blocked async XHR call onerror
2494         https://bugs.webkit.org/show_bug.cgi?id=146706
2495
2496         Reviewed by Brady Eidson.
2497
2498         Test: http/tests/contentextensions/async-xhr-onerror.html
2499
2500         * xml/XMLHttpRequest.cpp:
2501         (WebCore::XMLHttpRequest::XMLHttpRequest):
2502         (WebCore::XMLHttpRequest::createRequest):
2503         (WebCore::XMLHttpRequest::networkError):
2504         (WebCore::XMLHttpRequest::networkErrorTimerFired):
2505         (WebCore::XMLHttpRequest::abortError):
2506         * xml/XMLHttpRequest.h:
2507         Make a timer that calls networkError in 0 time if a content blocker blocks the asynchronous load.
2508         It is necessary to call setPendingActivity and dropProtection (which calls unsetPendingActivity)
2509         to keep a reference to the XMLHttpRequest alive.
2510
2511 2015-10-14  Andy Estes  <aestes@apple.com>
2512
2513         [iOS] QuickLook documents loaded over https do not load their subresources
2514         https://bugs.webkit.org/show_bug.cgi?id=150145
2515         <rdar://problem/22884521>
2516
2517         Reviewed by Alexey Proskuryakov.
2518
2519         When QuickLook generates an HTML preview of a document, subresources are referenced using the x-apple-ql-id scheme,
2520         for which QuickLook installs an NSURLProtocol. If a document is loaded over https, then this scheme needs to be
2521         considered secure in order to avoid mixed content errors.
2522
2523         Test: http/tests/quicklook/secure-document-with-subresources.html
2524
2525         * platform/SchemeRegistry.cpp:
2526         (WebCore::secureSchemes): Registered QLPreviewProtocol() as a secure scheme.
2527
2528 2015-10-14  Jiewen Tan  <jiewen_tan@apple.com>
2529
2530         Postpone mutation events before invoke Editor::Command command(Document*, const String&, bool).
2531         https://bugs.webkit.org/show_bug.cgi?id=149299
2532         <rdar://problem/22746995>
2533
2534         Reviewed by Andreas Kling.
2535
2536         Test: editing/inserting/insert-with-mutation-event.html
2537
2538         This is a merge of a part of Blink r166294:
2539         https://codereview.chromium.org/141103006
2540
2541         * dom/Document.cpp:
2542         (WebCore::Document::execCommand):
2543
2544 2015-10-14  Dean Jackson  <dino@apple.com>
2545
2546         Implement CanvasRenderingContext2D::commit
2547         https://bugs.webkit.org/show_bug.cgi?id=150110
2548         <rdar://problem/23057398>
2549
2550         Reviewed by Anders Carlsson.
2551
2552         As part of getting as close as possible to the HTML5 specification,
2553         implement the commit() method on 2d canvas, even though it doesn't
2554         do anything.
2555
2556         Test: fast/canvas/commit.html
2557
2558         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2559         (WebCore::JSCanvasRenderingContext2D::commit): Intercept it here to
2560         avoid adding a method to the actual implementation.
2561         * html/canvas/CanvasRenderingContext2D.idl: Add commit.
2562
2563 2015-10-14  Alex Christensen  <achristensen@webkit.org>
2564
2565         Add SPI for reloading without content blockers
2566         https://bugs.webkit.org/show_bug.cgi?id=150058
2567         rdar://problem/22742222
2568
2569         Reviewed by Sam Weinig.
2570
2571         * loader/FrameLoader.cpp:
2572         (WebCore::FrameLoader::reloadWithOverrideEncoding):
2573         (WebCore::FrameLoader::reload):
2574         * loader/FrameLoader.h:
2575         * page/Page.h:
2576         (WebCore::Page::userContentController):
2577         (WebCore::Page::userContentExtensionsEnabled): Deleted.
2578         (WebCore::Page::setUserContentExtensionsEnabled): Deleted.
2579         * replay/UserInputBridge.cpp:
2580         (WebCore::UserInputBridge::loadRequest):
2581         (WebCore::UserInputBridge::reloadFrame):
2582         (WebCore::UserInputBridge::stopLoadingFrame):
2583         * replay/UserInputBridge.h:
2584         Pass a bool from the reloadWithoutContentBlockers call to the DocumentLoader, 
2585         which stores the state of whether the content blockers are enabled or not.
2586         Remove the state from the Page and copying the state from the Page to the DocumentLoader
2587         because that caused issues with the content blockers being re-enabled at the wrong time.
2588
2589 2015-10-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2590
2591         Rename JSDOMWrapper to JSDOMObject and JSDOMWrapperWithImplementation to JSDOMWrapper
2592         https://bugs.webkit.org/show_bug.cgi?id=150120
2593
2594         Reviewed by Sam Weinig.
2595
2596         No change in behavior.
2597
2598         * bindings/js/DOMWrapperWorld.h:
2599         * bindings/js/JSDOMBinding.h:
2600         (WebCore::DOMConstructorObject::DOMConstructorObject):
2601         (WebCore::getInlineCachedWrapper):
2602         (WebCore::setInlineCachedWrapper):
2603         (WebCore::clearInlineCachedWrapper):
2604         (WebCore::createWrapper):
2605         (WebCore::getStaticValueSlotEntryWithoutCaching<JSDOMObject>):
2606         * bindings/js/JSDOMWrapper.cpp:
2607         * bindings/js/JSDOMWrapper.h:
2608         (WebCore::JSDOMObject::JSDOMObject):
2609         (WebCore::JSDOMWrapper::~JSDOMWrapper):
2610         (WebCore::JSDOMWrapper::JSDOMWrapper):
2611         * bindings/js/JSElementCustom.cpp:
2612         (WebCore::toJSNewlyCreated):
2613         * bindings/js/JSNodeCustom.cpp:
2614         (WebCore::createWrapperInline):
2615         * bindings/js/ScriptWrappable.h:
2616         * bindings/js/ScriptWrappableInlines.h:
2617         (WebCore::ScriptWrappable::wrapper):
2618         (WebCore::ScriptWrappable::setWrapper):
2619         (WebCore::ScriptWrappable::clearWrapper):
2620         * bindings/scripts/CodeGeneratorJS.pm:
2621         (GetParentClassName):
2622         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2623         (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
2624         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2625         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2626         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
2627         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
2628         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2629         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
2630         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2631         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2632         (WebCore::JSTestEventConstructor::JSTestEventConstructor):
2633         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2634         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2635         (WebCore::JSTestEventTarget::JSTestEventTarget):
2636         * bindings/scripts/test/JS/JSTestEventTarget.h:
2637         * bindings/scripts/test/JS/JSTestException.cpp:
2638         (WebCore::JSTestException::JSTestException):
2639         * bindings/scripts/test/JS/JSTestException.h:
2640         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2641         (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
2642         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2643         * bindings/scripts/test/JS/JSTestInterface.cpp:
2644         (WebCore::JSTestInterface::JSTestInterface):
2645         * bindings/scripts/test/JS/JSTestInterface.h:
2646         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2647         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
2648         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
2649         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2650         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
2651         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2652         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2653         (WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
2654         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2655         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2656         (WebCore::JSTestNondeterministic::JSTestNondeterministic):
2657         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2658         * bindings/scripts/test/JS/JSTestObj.cpp:
2659         (WebCore::JSTestObj::JSTestObj):
2660         * bindings/scripts/test/JS/JSTestObj.h:
2661         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2662         (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
2663         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2664         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2665         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
2666         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
2667         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2668         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
2669         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2670         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2671         (WebCore::JSTestTypedefs::JSTestTypedefs):
2672         * bindings/scripts/test/JS/JSTestTypedefs.h:
2673         * bindings/scripts/test/JS/JSattribute.cpp:
2674         (WebCore::JSattribute::JSattribute):
2675         * bindings/scripts/test/JS/JSattribute.h:
2676         * bindings/scripts/test/JS/JSreadonly.cpp:
2677         (WebCore::JSreadonly::JSreadonly):
2678         * bindings/scripts/test/JS/JSreadonly.h:
2679         * dom/make_names.pl:
2680         (printWrapperFunctions):
2681         (printWrapperFactoryCppFile):
2682         (printWrapperFactoryHeaderFile):
2683
2684 2015-10-14  Simon Fraser  <simon.fraser@apple.com>
2685
2686         Change GraphicsContext image-drawing functions to take references
2687         https://bugs.webkit.org/show_bug.cgi?id=150108
2688
2689         Reviewed by Tim Horton and Sam Weinig.
2690
2691         Change GraphicsContext::drawImage(), drawTiledImage(), drawImageBuffer(), clipToImageBuffer()
2692         and isCompatibleWithBuffer() to take references, and adjust calling code, adding
2693         null-checks where necessary.
2694
2695         * css/CSSCrossfadeValue.cpp:
2696         (WebCore::CSSCrossfadeValue::image):
2697         * css/CSSFilterImageValue.cpp:
2698         (WebCore::CSSFilterImageValue::image):
2699         * html/HTMLCanvasElement.cpp:
2700         (WebCore::HTMLCanvasElement::paint):
2701         * html/canvas/CanvasRenderingContext2D.cpp:
2702         (WebCore::CanvasRenderingContext2D::drawImage):
2703         (WebCore::CanvasRenderingContext2D::compositeBuffer):
2704         (WebCore::drawImageToContext):
2705         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
2706         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2707         * html/canvas/CanvasRenderingContext2D.h:
2708         * html/canvas/WebGL2RenderingContext.cpp:
2709         (WebCore::WebGL2RenderingContext::texSubImage2D):
2710         * html/canvas/WebGLRenderingContext.cpp:
2711         (WebCore::WebGLRenderingContext::texSubImage2D):
2712         * html/canvas/WebGLRenderingContextBase.cpp:
2713         (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
2714         (WebCore::WebGLRenderingContextBase::texImage2D):
2715         * html/canvas/WebGLRenderingContextBase.h:
2716         * platform/ScrollView.cpp:
2717         (WebCore::ScrollView::paintPanScrollIcon):
2718         * platform/graphics/CrossfadeGeneratedImage.cpp:
2719         (WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
2720         (WebCore::drawCrossfadeSubimage):
2721         (WebCore::CrossfadeGeneratedImage::drawCrossfade):
2722         * platform/graphics/CrossfadeGeneratedImage.h:
2723         * platform/graphics/GradientImage.cpp:
2724         (WebCore::GradientImage::drawPattern):
2725         * platform/graphics/GraphicsContext.cpp:
2726         (WebCore::GraphicsContext::drawImage):
2727         (WebCore::GraphicsContext::drawTiledImage):
2728         (WebCore::GraphicsContext::drawImageBuffer):
2729         (WebCore::GraphicsContext::clipToImageBuffer):
2730         (WebCore::GraphicsContext::isCompatibleWithBuffer):
2731         * platform/graphics/GraphicsContext.h:
2732         * platform/graphics/ShadowBlur.cpp:
2733         (WebCore::ShadowBlur::drawShadowBuffer):
2734         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
2735         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
2736         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
2737         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2738         (WebCore::ShadowBlur::drawLayerPieces):
2739         (WebCore::ShadowBlur::endShadowLayer):
2740         * platform/graphics/cairo/ImageBufferCairo.cpp:
2741         (WebCore::ImageBuffer::draw):
2742         * platform/graphics/cg/PDFDocumentImage.cpp:
2743         (WebCore::PDFDocumentImage::draw):
2744         * platform/graphics/filters/FEBlend.cpp:
2745         (WebCore::FEBlend::platformApplySoftware):
2746         * platform/graphics/filters/FEColorMatrix.cpp:
2747         (WebCore::FEColorMatrix::platformApplySoftware):
2748         * platform/graphics/filters/FEComposite.cpp:
2749         (WebCore::FEComposite::platformApplySoftware):
2750         * platform/graphics/filters/FEDropShadow.cpp:
2751         (WebCore::FEDropShadow::platformApplySoftware):
2752         * platform/graphics/filters/FEMerge.cpp:
2753         (WebCore::FEMerge::platformApplySoftware):
2754         * platform/graphics/filters/FEOffset.cpp:
2755         (WebCore::FEOffset::platformApplySoftware):
2756         * platform/graphics/filters/FETile.cpp:
2757         (WebCore::FETile::platformApplySoftware):
2758         * platform/graphics/filters/SourceAlpha.cpp:
2759         (WebCore::SourceAlpha::platformApplySoftware):
2760         * platform/graphics/filters/SourceGraphic.cpp:
2761         (WebCore::SourceGraphic::platformApplySoftware):
2762         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2763         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2764         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
2765         (WebCore::ImageBackingSurfaceClient::ImageBackingSurfaceClient):
2766         (WebCore::CoordinatedImageBacking::update):
2767         * platform/mac/ThemeMac.mm:
2768         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
2769         * rendering/FilterEffectRenderer.cpp:
2770         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
2771         * rendering/ImageQualityController.cpp:
2772         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
2773         * rendering/ImageQualityController.h:
2774         * rendering/RenderBoxModelObject.cpp:
2775         (WebCore::RenderBoxModelObject::shouldPaintAtLowQuality):
2776         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2777         * rendering/RenderBoxModelObject.h:
2778         * rendering/RenderEmbeddedObject.cpp:
2779         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
2780         (WebCore::RenderEmbeddedObject::paintContents):
2781         * rendering/RenderEmbeddedObject.h:
2782         * rendering/RenderImage.cpp:
2783         (WebCore::RenderImage::paintReplaced):
2784         (WebCore::RenderImage::paintIntoRect):
2785         * rendering/RenderImageResourceStyleImage.cpp:
2786         (WebCore::RenderImageResourceStyleImage::shutdown):
2787         (WebCore::RenderImageResourceStyleImage::image):
2788         * rendering/RenderLayer.cpp:
2789         (WebCore::RenderLayer::drawPlatformResizerImage):
2790         * rendering/RenderListMarker.cpp:
2791         (WebCore::RenderListMarker::paint):
2792         * rendering/RenderSnapshottedPlugIn.cpp:
2793         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2794         * rendering/RenderThemeMac.mm:
2795         (WebCore::RenderThemeMac::paintProgressBar):
2796         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2797         * rendering/RenderThemeWin.cpp:
2798         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
2799         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
2800         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
2801         * rendering/shapes/Shape.cpp:
2802         (WebCore::Shape::createRasterShape):
2803         * rendering/shapes/ShapeOutsideInfo.cpp:
2804         (WebCore::ShapeOutsideInfo::createShapeForImage): Deleted.
2805         * rendering/style/NinePieceImage.cpp:
2806         (WebCore::NinePieceImage::paint):
2807         * rendering/svg/RenderSVGImage.cpp:
2808         (WebCore::RenderSVGImage::paintForeground):
2809         * rendering/svg/RenderSVGResourceFilter.cpp:
2810         (WebCore::RenderSVGResourceFilter::postApplyResource):
2811         * rendering/svg/SVGRenderingContext.cpp:
2812         (WebCore::SVGRenderingContext::clipToImageBuffer):
2813         (WebCore::SVGRenderingContext::bufferForeground):
2814         * svg/graphics/filters/SVGFEImage.cpp:
2815         (WebCore::FEImage::platformApplySoftware):
2816
2817 2015-10-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
2818
2819         REGRESSION(r53318): background-repeat: space with gradients doesn't render correctly
2820         https://bugs.webkit.org/show_bug.cgi?id=150068
2821
2822         Reviewed by Simon Fraser.
2823
2824         This is a regression of r53318 in which we were trying to make the pattern
2825         of the gradient image as small as possible: 1-pixel wide or tall. But this
2826         broke the rendering of the background image when container element has the
2827         style background-repeat: space. The reason for this is tiling the gradient
2828         image is done completely by CG. To do the tiling, we start by creating a
2829         CGPattern by calling CGPatternCreate() which takes the rect of the pattern
2830         and the step. If the width or the height of the pattern image is adjusted
2831         to be 1-pixel wide or tall, that will force CG to leave a space after every
2832         it draws the pattern image which is 1-pixel wide or tall which is wrong.
2833         
2834         The fix is to disable this optimization altogether if the container element
2835         has the style background-repeat: space.
2836
2837         Test: fast/gradients/background-image-repeat-space.html
2838
2839         * platform/graphics/Gradient.cpp:
2840         (WebCore::Gradient::adjustParametersForTiledDrawing):
2841         * platform/graphics/Gradient.h:
2842         * platform/graphics/GradientImage.cpp:
2843         (WebCore::GradientImage::drawPattern):
2844
2845 2015-10-13  Simon Fraser  <simon.fraser@apple.com>
2846
2847         Add helper funtion for checking pointer equivalency and use it
2848         https://bugs.webkit.org/show_bug.cgi?id=150022
2849
2850         Reviewed by Darin Adler.
2851
2852         A common pattern in WebCore code is to check for equivalency of two pointers,
2853         either both null, or both non-null and with equal values. This was written in
2854         several different ways in different places.
2855         
2856         Add arePointingToEqualData() to standardize this pattern.
2857
2858         This obviates the need for StyleImage::imagesEquivalent(), counterDataEquivalent()
2859         etc.
2860         
2861         Also change some comparisons of DataRef<> which checked the pointer and then the
2862         values to use DataRef<>::operator== which does the same thing. Comparisons of
2863         m_grid and m_gridItem only checked pointer equality, so this is probably a bug fix there.
2864
2865         * page/animation/CSSPropertyAnimation.cpp: if ((!a && !b) || a == b) is redundant so fix,
2866         and add checks for a and b RenderStyle* first.
2867         (WebCore::PropertyWrapperGetter::equals):
2868         (WebCore::StyleImagePropertyWrapper::equals):
2869         (WebCore::PropertyWrapperShadow::equals):
2870         (WebCore::PropertyWrapperMaybeInvalidColor::equals):
2871         (WebCore::FillLayerPropertyWrapperGetter::equals):
2872         (WebCore::FillLayerStyleImagePropertyWrapper::equals):
2873         (WebCore::FillLayersPropertyWrapper::equals):
2874         (WebCore::ShorthandPropertyWrapper::equals):
2875         (WebCore::PropertyWrapperFlex::equals):
2876         (WebCore::PropertyWrapperSVGPaint::equals):
2877         * platform/network/ResourceRequestBase.cpp:
2878         (WebCore::equalIgnoringHeaderFields):
2879         * rendering/style/FillLayer.cpp:
2880         (WebCore::FillLayer::operator==):
2881         * rendering/style/NinePieceImage.cpp:
2882         (WebCore::NinePieceImageData::operator==):
2883         * rendering/style/RenderStyle.cpp: Some nullptr cleanup.
2884         (WebCore::RenderStyle::getCachedPseudoStyle):
2885         (WebCore::RenderStyle::addCachedPseudoStyle):
2886         (WebCore::RenderStyle::changeAffectsVisualOverflow):
2887         (WebCore::RenderStyle::changeRequiresLayout):
2888         (WebCore::RenderStyle::changeRequiresLayerRepaint):
2889         (WebCore::RenderStyle::setWillChange):
2890         * rendering/style/SVGRenderStyleDefs.cpp:
2891         (WebCore::StyleShadowSVGData::operator==):
2892         * rendering/style/ShadowData.cpp:
2893         (WebCore::ShadowData::operator==):
2894         * rendering/style/StyleImage.h:
2895         (WebCore::StyleImage::imagesEquivalent): Deleted.
2896         * rendering/style/StyleRareInheritedData.cpp:
2897         (WebCore::StyleRareInheritedData::operator==):
2898         (WebCore::cursorDataEquivalent): Deleted.
2899         (WebCore::quotesDataEquivalent): Deleted.
2900         (WebCore::StyleRareInheritedData::shadowDataEquivalent): Deleted.
2901         * rendering/style/StyleRareInheritedData.h:
2902         * rendering/style/StyleRareNonInheritedData.cpp:
2903         (WebCore::StyleRareNonInheritedData::operator==):
2904         (WebCore::StyleRareNonInheritedData::counterDataEquivalent): Deleted.
2905         (WebCore::StyleRareNonInheritedData::shadowDataEquivalent): Deleted.
2906         (WebCore::StyleRareNonInheritedData::willChangeDataEquivalent): Deleted.
2907         (WebCore::StyleRareNonInheritedData::reflectionDataEquivalent): Deleted.
2908         (WebCore::StyleRareNonInheritedData::animationDataEquivalent): Deleted.
2909         (WebCore::StyleRareNonInheritedData::transitionDataEquivalent): Deleted.
2910         * rendering/style/StyleRareNonInheritedData.h:
2911
2912 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
2913
2914         Split TypesettingFeatures into kerning and ligatures bools
2915         https://bugs.webkit.org/show_bug.cgi?id=150074
2916
2917         Reviewed by Simon Fraser.
2918
2919         Our TypesettingFeatures type represents whether kerning or ligatures are enabled
2920         when laying out text. However, now that I have implemented font-feature-settings
2921         and font-variant-*, this type is wildly inadequate. There are now multiple kinds
2922         of ligatures, and many other features which are neither kerning nor ligatures.
2923         Adding tons of information to this type doesn't make sense because 1) We already
2924         have a FontVariantSettings struct which contains this information, and 2) None
2925         of the users of TypesettingFeatures care about most of these new features.
2926
2927         In this new world of font features, the font-kerning property isn't changing.
2928         Therefore, all the code which relies only on the Kerning value in
2929         TypesettingFeatures doesn't need to change. The places which rely on Ligatures,
2930         however, need to be updated to understand that there are many different kinds
2931         of ligatures.
2932
2933         Indeed, after inspection, all of the places which inspect ligatures are more
2934         interested in a high-level concept of whether or not we can trust some simple
2935         computation. Therefore, we really have two things we care about: Kerning, and
2936         this high-level concept.
2937
2938         This patch is the second step to update our view of the world to include
2939         font-feature-settings and font-variant-*. In particular, this patch simply
2940         splits TypesettingFeatures into two Booleans, one for Kerning, and one for
2941         Ligatures (which has no behavior change). Then, once they are separated, I can
2942         migrate the Ligatures Boolean to take on its new meaning.
2943
2944         This change is purely mechanical.
2945
2946         No new tests because there is no behavior change.
2947
2948         * WebCore.xcodeproj/project.pbxproj:
2949         * css/CSSPrimitiveValueMappings.h:
2950         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2951         (WebCore::CSSPrimitiveValue::operator FontCascadeDescription::Kerning):
2952         * platform/graphics/Font.cpp:
2953         (WebCore::Font::applyTransforms):
2954         * platform/graphics/Font.h:
2955         * platform/graphics/FontCascade.cpp:
2956         (WebCore::FontCascade::FontCascade):
2957         (WebCore::FontCascade::operator=):
2958         (WebCore::FontCascade::update):
2959         (WebCore::FontCascade::drawText):
2960         (WebCore::FontCascade::drawEmphasisMarks):
2961         (WebCore::FontCascade::width):
2962         (WebCore::FontCascade::adjustSelectionRectForText):
2963         (WebCore::FontCascade::offsetForPosition):
2964         (WebCore::FontCascade::setDefaultKerning):
2965         (WebCore::FontCascade::setDefaultLigatures):
2966         (WebCore::FontCascade::codePath):
2967         (WebCore::FontCascade::floatWidthForSimpleText):
2968         (WebCore::FontCascade::setDefaultTypesettingFeatures): Deleted.
2969         (WebCore::FontCascade::defaultTypesettingFeatures): Deleted.
2970         * platform/graphics/FontCascade.h:
2971         (WebCore::FontCascade::enableKerning):
2972         (WebCore::FontCascade::enableLigatures):
2973         (WebCore::FontCascade::computeEnableKerning):
2974         (WebCore::FontCascade::computeEnableLigatures):
2975         (WebCore::FontCascade::typesettingFeatures): Deleted.
2976         (WebCore::FontCascade::computeTypesettingFeatures): Deleted.
2977         * platform/graphics/FontDescription.cpp:
2978         (WebCore::FontCascadeDescription::FontCascadeDescription):
2979         * platform/graphics/FontDescription.h:
2980         (WebCore::FontCascadeDescription::setKerning):
2981         (WebCore::FontCascadeDescription::initialKerning):
2982         * platform/graphics/TypesettingFeatures.h: Removed.
2983         * platform/graphics/WidthIterator.cpp:
2984         (WebCore::WidthIterator::WidthIterator):
2985         (WebCore::WidthIterator::applyFontTransforms):
2986         (WebCore::WidthIterator::advanceInternal):
2987         * platform/graphics/WidthIterator.h:
2988         * platform/graphics/cocoa/FontCocoa.mm:
2989         (WebCore::Font::canRenderCombiningCharacterSequence):
2990         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2991         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2992         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
2993         (WebCore::Font::getCFStringAttributes):
2994         * rendering/RenderBlockLineLayout.cpp:
2995         (WebCore::setLogicalWidthForTextRun):
2996         * rendering/line/BreakingContext.h:
2997         (WebCore::WordTrailingSpace::width):
2998         * svg/SVGFontData.h:
2999
3000 2015-10-13  Zalan Bujtas  <zalan@apple.com>
3001
3002         Anonymous table objects: inline parent box requires inline-table child.
3003         https://bugs.webkit.org/show_bug.cgi?id=150090
3004
3005         Reviewed by David Hyatt.
3006
3007         According to the CSS2.1 specification, if a child needs anonymous table wrapper
3008         and the child's parent is an inline box, the generated table needs to be inline-table.
3009         (inline-block and block parents generate non-inline table) 
3010
3011         Import W3C CSS2.1 anonymous table tests.
3012
3013         * rendering/RenderElement.cpp:
3014         (WebCore::RenderElement::childRequiresTable):
3015         (WebCore::RenderElement::addChild):
3016         * rendering/RenderElement.h:
3017         * rendering/RenderInline.cpp:
3018         (WebCore::RenderInline::newChildIsInline):
3019         (WebCore::RenderInline::addChildIgnoringContinuation):
3020         (WebCore::RenderInline::addChildToContinuation):
3021         * rendering/RenderInline.h:
3022         * rendering/RenderTable.cpp:
3023         (WebCore::RenderTable::createAnonymousWithParentRenderer):
3024
3025 2015-10-13  Dean Jackson  <dino@apple.com>
3026
3027         Device motion and orientation should only be visible from the main frame's security origin
3028         https://bugs.webkit.org/show_bug.cgi?id=150072
3029         <rdar://problem/23082036>
3030
3031         Reviewed by Brent Fulgham.
3032
3033         There are reports that gyroscope and accelerometer information can
3034         be used to detect keyboard entry. One initial step to reduce the
3035         risk is to forbid device motion and orientation events from
3036         being fired in frames that are a different security origin from the main page.
3037
3038         Manual test: deviceorientation-main-frame-only.html
3039
3040         * page/DOMWindow.cpp:
3041         (WebCore::DOMWindow::isSameSecurityOriginAsMainFrame): New helper function.
3042         (WebCore::DOMWindow::addEventListener): Check if we are the main frame, or the
3043         same security origin as the main frame. If not, don't add the event
3044         listeners.
3045
3046 2015-10-12  Dean Jackson  <dino@apple.com>
3047
3048         ASSERT(m_motionManager) on emgn.com page
3049         https://bugs.webkit.org/show_bug.cgi?id=150070
3050         <rdar://problem/18383732>
3051
3052         Reviewed by Simon Fraser.
3053
3054         In the WebCoreMotionManager init method, we call
3055         into another setup method on the main thread.
3056         However, if a listener was attached before that
3057         ran, we'd ASSERT. This wasn't actually causing a bug
3058         because the main thread initialization would
3059         check the listeners once it got a chance to run.
3060
3061         The fix is to only check status when we've
3062         actually initialized.
3063
3064         * platform/ios/WebCoreMotionManager.h: New m_initialized boolean.
3065         * platform/ios/WebCoreMotionManager.mm: Check m_initialized before doing real work.
3066         (-[WebCoreMotionManager init]):
3067         (-[WebCoreMotionManager addMotionClient:]):
3068         (-[WebCoreMotionManager removeMotionClient:]):
3069         (-[WebCoreMotionManager addOrientationClient:]):
3070         (-[WebCoreMotionManager removeOrientationClient:]):
3071         (-[WebCoreMotionManager initializeOnMainThread]):
3072
3073 2015-10-13  Chris Dumez  <cdumez@apple.com>
3074
3075         Avoid useless copies in range-loops that are using 'auto'
3076         https://bugs.webkit.org/show_bug.cgi?id=150091
3077
3078         Reviewed by Sam Weinig.
3079
3080         Avoid useless copies in range-loops that are using 'auto'. Also use
3081         'auto*' instead of 'auto' when range values are pointers for clarity.
3082
3083 2015-10-13  Simon Fraser  <simon.fraser@apple.com>
3084
3085         Move Image::drawPattern for CG into GraphicsContext
3086         https://bugs.webkit.org/show_bug.cgi?id=150077
3087
3088         Reviewed by Myles C. Maxfield.
3089
3090         In order to consolidate code that calls into Core Graphics inside
3091         GraphicsContext, move the body of Image::drawPattern() into
3092         GraphicsContextCG.cpp, and do the same for Cairo.
3093
3094         * platform/graphics/GraphicsContext.h:
3095         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3096         (WebCore::GraphicsContext::drawPattern):
3097         * platform/graphics/cairo/ImageCairo.cpp:
3098         (WebCore::Image::drawPattern):
3099         * platform/graphics/cg/GraphicsContextCG.cpp:
3100         (WebCore::drawPatternCallback):
3101         (WebCore::patternReleaseCallback):
3102         (WebCore::GraphicsContext::drawPattern):
3103         * platform/graphics/cg/ImageCG.cpp:
3104         (WebCore::Image::drawPattern):
3105         (WebCore::drawPatternCallback): Deleted.
3106         (WebCore::patternReleaseCallback): Deleted.
3107
3108 2015-10-13  Myles C. Maxfield  <mmaxfield@apple.com>
3109
3110         Unprefix font-kerning
3111         https://bugs.webkit.org/show_bug.cgi?id=150080
3112
3113         Reviewed by Sam Weinig.
3114
3115         This is the last property in CSS3 Fonts which is prefixed.
3116
3117         Test: fast/text/font-kerning.html
3118
3119         * css/CSSPropertyNames.in:
3120
3121 2015-10-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
3122
3123         Add debug settings for using giant tiles (4096x4096)
3124         https://bugs.webkit.org/show_bug.cgi?id=149977
3125         <rdar://problem/23017093>
3126
3127         Reviewed by Tim Horton.
3128
3129         Instead of creating the GraphicsLayer with a fixed size 512x512, we need
3130         to read the useGiantTiles setting. If its value is true, we set the layer
3131         tileSize to 4096x4096.
3132
3133         * page/Settings.in:
3134         Define the name of the setting and its default value.
3135         
3136         * platform/graphics/GraphicsLayerClient.h:
3137         (WebCore::GraphicsLayerClient::tileSize):
3138         Define tileSize() in the base class GraphicsLayerClient. This is going to
3139         be overridden RenderLayerBacking.
3140         
3141         * platform/graphics/TiledBacking.h:
3142         (WebCore::defaultTileSize):
3143         Define the default tileSize which will depend on the useGiantTiles
3144         setting.
3145
3146         * platform/graphics/ca/GraphicsLayerCA.cpp:
3147         (WebCore::GraphicsLayerCA::platformCALayerTileSize):
3148         Implement the virtual function GraphicsLayerCA::platformCALayerTileSize().
3149         It passes the call to client GraphicsLayerClient which can be RenderLayerBacking
3150         in our case.
3151
3152         * platform/graphics/ca/GraphicsLayerCA.h:
3153         Override base class function PlatformCALayerClient::PlatformCALayerClient().
3154
3155         * platform/graphics/ca/PlatformCALayerClient.h:
3156         (WebCore::PlatformCALayerClient::platformCALayerTileSize):
3157         Define platformCALayerTileSize() in the base class PlatformCALayerClient.
3158         This is going to be overridden GraphicsLayerCA.
3159
3160         * platform/graphics/ca/TileController.cpp:
3161         (WebCore::TileController::TileController):
3162         No need for the member m_tileSize.
3163         
3164         (WebCore::TileController::computeTileCoverageRect):
3165         Use the function tileSize() instead of using the static values.
3166         
3167         (WebCore::TileController::tileSize):
3168         The tileSize will be retrieved from the owning graphics layer.
3169         
3170         * platform/graphics/ca/TileController.h:
3171         No need for the member m_tileSize. The tileSize will be retrieved from the owning graphics layer.
3172
3173         * rendering/RenderLayerBacking.cpp:
3174         (WebCore::RenderLayerBacking::setTiledBackingHasMargins):
3175         Use the function tileSize() instead of using the static values.
3176         
3177         (WebCore::RenderLayerBacking::tileSize):
3178         Override base class function GraphicsLayerClient::tileSize().
3179         
3180         * rendering/RenderLayerBacking.h:
3181         Define the concrete method RenderLayerBacking::tilSize().
3182
3183 2015-10-13  Antti Koivisto  <antti@apple.com>
3184
3185         Try to fix ENABLE(DETAILS_ELEMENT) with SHADOW_DOM disabled.
3186
3187         * dom/Element.cpp:
3188         (WebCore::Element::attributeChanged):
3189         * dom/Node.cpp:
3190         (WebCore::traverseStyleParent):
3191
3192 2015-10-13  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3193
3194         Fix license and copyrights of WebCore js binding builtin files
3195         https://bugs.webkit.org/show_bug.cgi?id=150027
3196
3197         Reviewed by Darin Adler.
3198
3199         Fixing copyright on all three files.
3200         Moving to BSD-like license as they should have been in the first place.
3201         Ordering lexicographically the builtin names in WebCoreBuiltinNames.h.
3202
3203         No change in behaviour.
3204
3205         * bindings/js/WebCoreBuiltinNames.h:
3206         * bindings/js/WebCoreJSBuiltins.cpp:
3207         * bindings/js/WebCoreJSBuiltins.h:
3208         * bindings/js/WebCoreJSBuiltinInternals.h:
3209
3210 2015-10-12  Antti Koivisto  <antti@apple.com>
3211
3212         Implement iterator for traversing composed DOM
3213         https://bugs.webkit.org/show_bug.cgi?id=149997
3214
3215         Reviewed by Ryosuke Niwa.
3216
3217         ComposedTreeIterator traverses the DOM in composed tree order. This means it enters
3218         shadow trees and follows slots created by Shadow DOM API correctly.
3219
3220         auto children = composedTreeChildren(containerNode);
3221         for (auto& composedChild : children)
3222             ...
3223
3224         auto descendants = composedTreeDescendants(containerNode);
3225         for (auto& composedDescendant : descendants)
3226             ...
3227
3228         * WebCore.xcodeproj/project.pbxproj:
3229         * dom/ComposedTreeIterator.cpp: Added.
3230         (WebCore::ComposedTreeIterator::initializeShadowStack):
3231         (WebCore::ComposedTreeIterator::traverseNextInShadowTree):
3232         (WebCore::ComposedTreeIterator::traverseNextSiblingSlot):
3233         (WebCore::ComposedTreeIterator::traversePreviousSiblingSlot):
3234         (WebCore::ComposedTreeIterator::traverseParentInShadowTree):
3235         * dom/ComposedTreeIterator.h: Added.
3236         (WebCore::ComposedTreeIterator::operator*):
3237         (WebCore::ComposedTreeIterator::operator->):
3238         (WebCore::ComposedTreeIterator::operator==):
3239         (WebCore::ComposedTreeIterator::operator!=):
3240         (WebCore::ComposedTreeIterator::ShadowContext::ShadowContext):
3241         (WebCore::ComposedTreeIterator::ComposedTreeIterator):
3242         (WebCore::ComposedTreeIterator::traverseNext):
3243         (WebCore::ComposedTreeIterator::traverseNextSibling):
3244         (WebCore::ComposedTreeIterator::traversePreviousSibling):
3245         (WebCore::ComposedTreeIterator::traverseParent):
3246         (WebCore::ComposedTreeChildAdapter::Iterator::Iterator):
3247         (WebCore::ComposedTreeChildAdapter::Iterator::operator++):
3248         (WebCore::ComposedTreeChildAdapter::Iterator::operator--):
3249         (WebCore::ComposedTreeChildAdapter::ComposedTreeChildAdapter):
3250         (WebCore::ComposedTreeChildAdapter::begin):
3251         (WebCore::ComposedTreeChildAdapter::end):
3252         (WebCore::ComposedTreeChildAdapter::at):
3253         (WebCore::composedTreeChildren):
3254         * dom/NodeRenderingTraversal.cpp:
3255         (WebCore::NodeRenderingTraversal::parentSlow):
3256         (WebCore::NodeRenderingTraversal::nextInScope):
3257         (WebCore::NodeRenderingTraversal::firstChildSlow): Deleted.
3258         (WebCore::NodeRenderingTraversal::nextSiblingSlow): Deleted.
3259         (WebCore::NodeRenderingTraversal::previousSiblingSlow): Deleted.
3260         * dom/NodeRenderingTraversal.h:
3261         (WebCore::NodeRenderingTraversal::parent):
3262         (WebCore::NodeRenderingTraversal::firstChild): Deleted.
3263         (WebCore::NodeRenderingTraversal::nextSibling): Deleted.
3264         (WebCore::NodeRenderingTraversal::previousSibling): Deleted.
3265         * style/RenderTreePosition.cpp:
3266         (WebCore::RenderTreePosition::computeNextSibling):
3267
3268             Restore the full assert.
3269
3270         (WebCore::RenderTreePosition::invalidateNextSibling):
3271         (WebCore::RenderTreePosition::previousSiblingRenderer):
3272         (WebCore::RenderTreePosition::nextSiblingRenderer):
3273
3274             Make these member functions.
3275             Use the iterator. This is fixes some bugs and allows enabling a test case.
3276
3277         * style/RenderTreePosition.h:
3278         * style/StyleResolveTree.cpp:
3279         (WebCore::Style::textRendererIsNeeded):
3280
3281 2015-10-13  ChangSeok Oh  <changseok.oh@collabora.com>
3282
3283         [GTK] Use GUniquePtr for GtkIconInfo
3284         https://bugs.webkit.org/show_bug.cgi?id=150082
3285
3286         Reviewed by Carlos Garcia Campos.
3287
3288         GtkIconInfo cab be wrapped by a smart pointer, GUniqueptr.
3289
3290         No new test required since no functionality changed.
3291
3292         * rendering/RenderThemeGtk.cpp:
3293         (WebCore::getStockSymbolicIconForWidgetType):
3294
3295 2015-10-12  Jaehun Lim  <ljaehun.lim@samsung.com>
3296
3297         Unreviewed, fix debug build warning.
3298
3299         %llu needs 'long long unsigned int'.
3300
3301         Type casting unit64_t to long long unsigned int.
3302
3303         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
3304         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
3305         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3306         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
3307
3308 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
3309
3310         Speculative Cairo build fixes after r190910.
3311
3312         * platform/graphics/cairo/ImageBufferCairo.cpp:
3313         (WebCore::ImageBuffer::drawPattern):
3314         * platform/graphics/cairo/ImageCairo.cpp:
3315         (WebCore::Image::drawPattern):
3316
3317 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
3318
3319         Fix iOS and Efl builds.
3320
3321         * platform/graphics/NamedImageGeneratedImage.cpp:
3322         (WebCore::NamedImageGeneratedImage::drawPattern):
3323
3324 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
3325
3326         Remove Image::spaceSize() and ImageBuffer::spaceSize()
3327         https://bugs.webkit.org/show_bug.cgi?id=150064
3328
3329         Reviewed by Tim Horton.
3330
3331         Image spacing when tiled should not be a property of the image; but a description
3332         of how it's drawn, like tile size. So remove spacing from Image and ImageBuffer,
3333         and pass it in as an argument.
3334
3335         * platform/graphics/BitmapImage.cpp:
3336         (WebCore::BitmapImage::drawPattern):
3337         * platform/graphics/BitmapImage.h:
3338         * platform/graphics/CrossfadeGeneratedImage.cpp:
3339         (WebCore::CrossfadeGeneratedImage::drawPattern):
3340         * platform/graphics/CrossfadeGeneratedImage.h:
3341         * platform/graphics/GeneratedImage.h:
3342         * platform/graphics/GradientImage.cpp:
3343         (WebCore::GradientImage::drawPattern):
3344         * platform/graphics/GradientImage.h:
3345         * platform/graphics/GraphicsContext.cpp:
3346         (WebCore::GraphicsContext::drawTiledImage):
3347         * platform/graphics/GraphicsContext.h:
3348         * platform/graphics/Image.cpp:
3349         (WebCore::Image::drawTiled):
3350         * platform/graphics/Image.h:
3351         (WebCore::Image::spaceSize): Deleted.
3352         (WebCore::Image::setSpaceSize): Deleted.
3353         * platform/graphics/ImageBuffer.h:
3354         (WebCore::ImageBuffer::spaceSize): Deleted.
3355         (WebCore::ImageBuffer::setSpaceSize): Deleted.
3356         * platform/graphics/NamedImageGeneratedImage.cpp:
3357         (WebCore::NamedImageGeneratedImage::drawPattern):
3358         * platform/graphics/NamedImageGeneratedImage.h:
3359         * platform/graphics/cg/ImageBufferCG.cpp:
3360         (WebCore::ImageBuffer::copyImage):
3361         (WebCore::ImageBuffer::drawPattern):
3362         * platform/graphics/cg/ImageCG.cpp:
3363         (WebCore::Image::drawPattern):
3364         * rendering/RenderBoxModelObject.cpp:
3365         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3366         * svg/graphics/SVGImage.cpp:
3367         (WebCore::SVGImage::drawPatternForContainer):
3368         * svg/graphics/SVGImage.h:
3369         * svg/graphics/SVGImageForContainer.cpp:
3370         (WebCore::SVGImageForContainer::drawPattern):
3371         * svg/graphics/SVGImageForContainer.h:
3372
3373 2015-10-12  Andreas Kling  <akling@apple.com>
3374
3375         Have TransformState::mappedSecondaryQuad() return an Optional<FloatQuad>.
3376         <https://webkit.org/b/150057>
3377
3378         Reviewed by Simon Fraser.
3379
3380         Using Optional instead of std::unique_ptr allows us to signal the absence of a
3381         secondary quad without incurring a heap allocation in cases where one is present.
3382
3383         This dodges ~132000 malloc/free pairs on loading thelocal.se
3384
3385         * platform/graphics/ca/GraphicsLayerCA.cpp:
3386         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect):
3387         * platform/graphics/transforms/TransformState.cpp:
3388         (WebCore::TransformState::mappedSecondaryQuad):
3389         * platform/graphics/transforms/TransformState.h:
3390
3391 2015-10-12  Brady Eidson  <beidson@apple.com>
3392
3393         Followup to:
3394         Modern IDB: Start version change transaction for connections to new database.
3395         https://bugs.webkit.org/show_bug.cgi?id=150033
3396
3397         Reviewed by NOBODY (Fixing existing test flakiness)
3398
3399         No new tests (Covered by existing tests)
3400
3401         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3402         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Early return if a version change transaction
3403           is already in progress.
3404
3405 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
3406
3407         [Font Features] Tiny cleanup regarding FontCascade::typesettingFeatures()
3408         https://bugs.webkit.org/show_bug.cgi?id=150051
3409
3410         Reviewed by Simon Fraser.
3411
3412         There are no typesetting features which aren't kerning nor ligatures.
3413
3414         No new tests because there is no behavior difference.
3415
3416         * platform/graphics/FontCascade.cpp:
3417         (WebCore::FontCascade::codePath):
3418         * platform/graphics/WidthIterator.h:
3419         (WebCore::WidthIterator::supportsTypesettingFeatures): Deleted.
3420
3421 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
3422
3423         Add a CGContextStateSaver and use it
3424         https://bugs.webkit.org/show_bug.cgi?id=150049
3425
3426         Reviewed by Tim Horton.
3427
3428         Add a stack-based graphics state save/restore class for CGContext,
3429         like the one we have for GraphicsContext, and use it in GraphicsContextCG.
3430         
3431         * platform/graphics/cg/GraphicsContextCG.cpp:
3432         (WebCore::GraphicsContext::drawNativeImage):
3433         (WebCore::GraphicsContext::drawLine):
3434         (WebCore::GraphicsContext::drawJoinedLines):
3435         (WebCore::GraphicsContext::fillPath):
3436         (WebCore::GraphicsContext::strokePath):
3437         (WebCore::GraphicsContext::fillRect):
3438         (WebCore::GraphicsContext::platformFillRoundedRect):
3439         (WebCore::GraphicsContext::fillRectWithRoundedHole):
3440         (WebCore::GraphicsContext::strokeRect):
3441         * platform/graphics/cg/GraphicsContextCG.h:
3442         (WebCore::CGContextStateSaver::CGContextStateSaver):
3443         (WebCore::CGContextStateSaver::~CGContextStateSaver):
3444         (WebCore::CGContextStateSaver::save):
3445         (WebCore::CGContextStateSaver::restore):
3446
3447 2015-10-12  Zalan Bujtas  <zalan@apple.com>
3448
3449         display: table-cell; bug when resizing window
3450         https://bugs.webkit.org/show_bug.cgi?id=138167
3451
3452         Reviewed by David Hyatt.
3453
3454         Clean up anonymous table wrappers all the way up to RenderTable.
3455         This patch ensures that we don't keep the generated RenderTable/RenderSection/RenderCaption/RenderRow
3456         objects around in the tree anymore when the last child is destroyed.
3457
3458         Import W3C CSS2.1 anonymous table tests.
3459
3460         * rendering/RenderObject.cpp:
3461         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
3462
3463 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
3464
3465         REGRESSION(r182192): Ligatures do not interact correctly with SHY in some fonts
3466         https://bugs.webkit.org/show_bug.cgi?id=150006
3467
3468         Reviewed by Simon Fraser.
3469
3470         When performing font transforms and we encounter kCGFontIndexInvalid, we filter it out of the
3471         GlyphBuffer. However, this filter was only interacting with part of the GlyphBuffer instead
3472         of the whole thing. This causes glyph IDs from one font to be rendered with other fonts,
3473         thereby showing garbage glyphs.
3474
3475         However, now that <rdar://problem/20230073> is fixed, we don't need to perform this filter in
3476         the first place.
3477
3478         Test: fast/text/undefined-glyph-with-ligature.html
3479
3480         * platform/graphics/GlyphBuffer.h:
3481         (WebCore::GlyphBuffer::copyItem):
3482         (WebCore::GlyphBuffer::swap):
3483         * platform/graphics/WidthIterator.cpp:
3484         (WebCore::WidthIterator::applyFontTransforms):
3485
3486 2015-10-12  Antoine Quint  <graouts@apple.com>
3487
3488         [SVG] Handle endEvent for svg animations
3489         https://bugs.webkit.org/show_bug.cgi?id=121587
3490
3491         Reviewed by Dean Jackson.
3492
3493         Add support for the "endEvent" SVG event triggered when an animation completes, as
3494         specified in http://www.w3.org/TR/SMIL3/smil-timing.html#q135. This event doesn't
3495         bubble and can't be canceled. Added test coverage for the event through the DOM
3496         Events API as well as the declarative SMIL Animation syntax.
3497
3498         Adapted from a Chromium patch by pavan.e@samsung.com
3499         https://chromium.googlesource.com/chromium/blink/+/4d415ca0268231aa80e3552fe21bf3480a6978f8
3500
3501         Tests: svg/animations/end-event-declarative-expected.svg
3502                svg/animations/end-event-declarative.svg
3503                svg/animations/end-event-script-expected.svg
3504                svg/animations/end-event-script.svg
3505
3506         * svg/animation/SMILTimeContainer.cpp:
3507         (WebCore::SMILTimeContainer::updateAnimations):
3508         * svg/animation/SVGSMILElement.cpp:
3509         (WebCore::smilEndEventSender):
3510         (WebCore::SVGSMILElement::~SVGSMILElement):
3511         (WebCore::SVGSMILElement::progress):
3512         (WebCore::SVGSMILElement::dispatchPendingEvent):
3513         * svg/animation/SVGSMILElement.h:
3514         (WebCore::SVGSMILElement::hasConditionsConnected):
3515
3516 2015-10-12  Per Arne Vollan  <peavo@outlook.com>
3517
3518         [Curl] Increase limit of parallel network requests.
3519         https://bugs.webkit.org/show_bug.cgi?id=150035
3520
3521         Reviewed by Alex Christensen.
3522
3523         If the limit is too low, other network requests will often be blocked until
3524         active requests finishes. This can affect performance in a negative way.
3525
3526         * platform/network/curl/ResourceHandleManager.cpp:
3527
3528 2015-10-12  Brady Eidson  <beidson@apple.com>
3529
3530         Modern IDB: Start version change transaction for connections to new database.
3531         https://bugs.webkit.org/show_bug.cgi?id=150033
3532
3533         Reviewed by Alex Christensen.
3534
3535         No new tests (Covered by changes to existing tests).
3536
3537         * CMakeLists.txt:
3538         * Modules/indexeddb/IDBDatabase.h:
3539         
3540         * Modules/indexeddb/client/IDBAnyImpl.cpp:
3541         (WebCore::IDBClient::IDBAny::IDBAny):
3542         (WebCore::IDBClient::IDBAny::~IDBAny):
3543         (WebCore::IDBClient::IDBAny::idbDatabase):
3544         (WebCore::IDBClient::IDBAny::domStringList):
3545         (WebCore::IDBClient::IDBAny::idbCursor):
3546         (WebCore::IDBClient::IDBAny::idbCursorWithValue):
3547         (WebCore::IDBClient::IDBAny::idbFactory):
3548         (WebCore::IDBClient::IDBAny::idbIndex):
3549         (WebCore::IDBClient::IDBAny::idbObjectStore):
3550         (WebCore::IDBClient::IDBAny::idbTransaction):
3551         (WebCore::IDBClient::IDBAny::scriptValue):
3552         (WebCore::IDBClient::IDBAny::integer):
3553         (WebCore::IDBClient::IDBAny::string):
3554         (WebCore::IDBClient::IDBAny::keyPath):
3555         * Modules/indexeddb/client/IDBAnyImpl.h:
3556         (WebCore::IDBClient::IDBAny::create):
3557         
3558         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3559         (WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
3560         (WebCore::IDBClient::IDBConnectionToServer::registerDatabaseConnection):
3561         (WebCore::IDBClient::IDBConnectionToServer::unregisterDatabaseConnection):
3562         * Modules/indexeddb/client/IDBConnectionToServer.h:
3563         
3564         * Modules/indexeddb/client/IDBDatabaseImpl.cpp: Added.
3565         (WebCore::IDBClient::IDBDatabase::create):
3566         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
3567         (WebCore::IDBClient::IDBDatabase::~IDBDatabase):
3568         (WebCore::IDBClient::IDBDatabase::name):
3569         (WebCore::IDBClient::IDBDatabase::version):
3570         (WebCore::IDBClient::IDBDatabase::objectStoreNames):
3571         (WebCore::IDBClient::IDBDatabase::createObjectStore):
3572         (WebCore::IDBClient::IDBDatabase::transaction):
3573         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
3574         (WebCore::IDBClient::IDBDatabase::close):
3575         (WebCore::IDBClient::IDBDatabase::activeDOMObjectName):
3576         (WebCore::IDBClient::IDBDatabase::canSuspendForPageCache):
3577         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
3578         * Modules/indexeddb/client/IDBDatabaseImpl.h: Added.
3579         (WebCore::IDBClient::IDBDatabase::info):
3580         
3581         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
3582         (WebCore::IDBClient::IDBOpenDBRequest::onError):
3583         (WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
3584         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
3585         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
3586         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
3587         
3588         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3589         (WebCore::IDBClient::IDBRequest::IDBRequest):
3590         (WebCore::IDBClient::IDBRequest::result):
3591         (WebCore::IDBClient::IDBRequest::source):
3592         (WebCore::IDBClient::IDBRequest::transaction):
3593         * Modules/indexeddb/client/IDBRequestImpl.h:
3594         (WebCore::IDBClient::IDBRequest::connection):
3595         
3596         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3597         (WebCore::IDBClient::IDBTransaction::create):
3598         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
3599         (WebCore::IDBClient::IDBTransaction::~IDBTransaction):
3600         (WebCore::IDBClient::IDBTransaction::mode):
3601         (WebCore::IDBClient::IDBTransaction::db):
3602         (WebCore::IDBClient::IDBTransaction::error):
3603         (WebCore::IDBClient::IDBTransaction::objectStore):
3604         (WebCore::IDBClient::IDBTransaction::abort):
3605         (WebCore::IDBClient::IDBTransaction::activeDOMObjectName):
3606         (WebCore::IDBClient::IDBTransaction::canSuspendForPageCache):
3607         * Modules/indexeddb/client/IDBTransactionImpl.h:
3608         (WebCore::IDBClient::IDBTransaction::info):
3609         
3610         * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
3611         (WebCore::IDBClient::IDBVersionChangeEvent::IDBVersionChangeEvent):
3612         (WebCore::IDBClient::IDBVersionChangeEvent::eventInterface):
3613         * Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
3614         (WebCore::IDBClient::IDBVersionChangeEvent::create):
3615         
3616         * Modules/indexeddb/legacy/LegacyDatabase.h:
3617         
3618         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
3619         (WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent):
3620         * Modules/indexeddb/server/IDBConnectionToClient.h:
3621         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3622         
3623         * Modules/indexeddb/server/IDBServer.cpp:
3624         (WebCore::IDBServer::IDBServer::registerDatabaseConnection):
3625         (WebCore::IDBServer::IDBServer::unregisterDatabaseConnection):
3626         (WebCore::IDBServer::IDBServer::deleteDatabase):
3627         * Modules/indexeddb/server/IDBServer.h:
3628         
3629         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3630         (WebCore::IDBServer::UniqueIDBDatabase::info):
3631         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
3632         (WebCore::IDBServer::UniqueIDBDatabase::hasAnyOpenConnections):
3633         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
3634         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
3635         (WebCore::IDBServer::UniqueIDBDatabase::addOpenDatabaseConnection):
3636         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3637         
3638         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp: 
3639         (WebCore::IDBServer::nextDatabaseConnectionIdentifier):
3640         (WebCore::IDBServer::UniqueIDBDatabaseConnection::create):
3641         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
3642         (WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
3643         (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
3644
3645         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
3646         (WebCore::IDBServer::UniqueIDBDatabaseConnection::identifier):
3647         (WebCore::IDBServer::UniqueIDBDatabaseConnection::database):
3648         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionToClient):
3649         (WebCore::IDBServer::UniqueIDBDatabaseConnection::closePending):
3650         
3651         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3652         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::create):
3653         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
3654         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
3655         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::databaseConnection):
3656         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::info):
3657         
3658         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
3659         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
3660         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
3661         (WebCore::IDBDatabaseInfo::name):
3662         (WebCore::IDBDatabaseInfo::version):
3663         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo): Deleted.
3664         
3665         * Modules/indexeddb/shared/IDBError.h:
3666         
3667         * Modules/indexeddb/shared/IDBRequestData.cpp:
3668         (WebCore::IDBRequestData::IDBRequestData):
3669         (WebCore::IDBRequestData::requestedVersion):
3670         * Modules/indexeddb/shared/IDBRequestData.h:
3671         
3672         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
3673         (WebCore::nextClientResourceNumber):
3674         (WebCore::nextServerResourceNumber):
3675         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
3676         (WebCore::IDBResourceIdentifier::emptyValue):
3677         (WebCore::IDBResourceIdentifier::deletedValue):
3678         (WebCore::nextResourceNumber): Deleted.
3679         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
3680         
3681         * Modules/indexeddb/shared/IDBResultData.cpp:
3682         (WebCore::IDBResultData::IDBResultData):
3683         (WebCore::IDBResultData::error):
3684         (WebCore::IDBResultData::openDatabaseSuccess):
3685         (WebCore::IDBResultData::openDatabaseUpgradeNeeded):
3686         (WebCore::IDBResultData::databaseInfo):
3687         (WebCore::IDBResultData::transactionInfo):
3688         * Modules/indexeddb/shared/IDBResultData.h:
3689         (WebCore::IDBResultData::type):
3690         (WebCore::IDBResultData::databaseConnectionIdentifier):
3691         
3692         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
3693         (WebCore::IDBTransactionInfo::IDBTransactionInfo):
3694         (WebCore::IDBTransactionInfo::versionChange):
3695         (WebCore::IDBTransactionInfo::isolatedCopy):
3696         * Modules/indexeddb/shared/IDBTransactionInfo.h:
3697         (WebCore::IDBTransactionInfo::identifier):
3698         (WebCore::IDBTransactionInfo::mode):
3699         (WebCore::IDBTransactionInfo::newVersion):
3700         
3701         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3702         (WebCore::InProcessIDBServer::fireVersionChangeEvent):
3703         * Modules/indexeddb/shared/InProcessIDBServer.h:
3704         
3705         * WebCore.xcodeproj/project.pbxproj:
3706         
3707         * platform/CrossThreadCopier.cpp:
3708         (WebCore::IDBTransactionInfo>::copy):
3709         * platform/CrossThreadCopier.h:
3710
3711 2015-10-12  Said Abou-Hallawa  <sabouhallawa@apple.com>
3712
3713         REGRESSION(r184895): border-image should always slice the SVG image to nine pieces when drawing it in the container element
3714         https://bugs.webkit.org/show_bug.cgi?id=149901
3715         <rdar://problem/21995596>
3716
3717         Reviewed by Darin Adler.
3718
3719         The nine-pieces algorithm should be applied to the border-image regardless
3720         whether the image has an intrinsic size or not. It is not guaranteed to have
3721         a meaningful border-image in all the cases of non-intrinsic size images. But
3722         it should work as expected in most of the cases. 
3723
3724         * rendering/RenderBoxModelObject.cpp:
3725         * rendering/RenderBoxModelObject.h:
3726         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
3727         Revert the changes which were added to return whether the image has
3728         intrinsic size or not.
3729         
3730         (WebCore::RenderBoxModelObject::calculateFillTileSize):
3731         (WebCore::RenderBoxModelObject::paintNinePieceImage):
3732         Size of the image is now the return value of calculateImageIntrinsicDimensions().
3733         
3734         * rendering/RenderListMarker.cpp:
3735         (WebCore::RenderListMarker::updateContent):
3736         * rendering/shapes/ShapeOutsideInfo.cpp:
3737         (WebCore::ShapeOutsideInfo::createShapeForImage):
3738         Size of the image is now the return value of calculateImageIntrinsicDimensions().
3739         
3740         * rendering/style/NinePieceImage.cpp:
3741         * rendering/style/NinePieceImage.h:
3742         (WebCore::NinePieceImage::paint):
3743         Delete the logic for the non-intrinsic case. Both intrinsic and non-intrinsic
3744         cases will be treated the same.
3745
3746         (WebCore::NinePieceImage::computeNineRects):
3747         (WebCore::NinePieceImage::computeSideTileScale):
3748         (WebCore::NinePieceImage::computeMiddleTileScale):
3749         (WebCore::NinePieceImage::computeTileScales):
3750         (WebCore::NinePieceImage::computeIntrinsicRects): Deleted.
3751         (WebCore::NinePieceImage::computeIntrinsicSideTileScale): Deleted.
3752         (WebCore::NinePieceImage::computeIntrinsicMiddleTileScale): Deleted.
3753         (WebCore::NinePieceImage::computeIntrinsicTileScales): Deleted.
3754         Remove *Intrinsic* from the name of the functions.
3755
3756         (WebCore::NinePieceImage::computeNonIntrinsicRects): Deleted.
3757         (WebCore::NinePieceImage::computeNonIntrinsicTileScales): Deleted.
3758         Delete the *NonIntrinsic* functions.
3759
3760 2015-10-12  Simon Fraser  <simon.fraser@apple.com>
3761
3762         Clip-path transitions sometimes trigger endless animation timers
3763         https://bugs.webkit.org/show_bug.cgi?id=150018
3764
3765         Reviewed by Tim Horton.
3766         
3767         Transitioning -webkit-clip-path could trigger endless animation
3768         timers, because when CompositeAnimation::updateTransitions() calls
3769         isTargetPropertyEqual(), a false negative answer triggers canceling the
3770         current transition and starting a new one over and over.
3771         
3772         This happened because StyleRareNonInheritedData simply tested pointer
3773         equality for m_clipPath and m_shapeOutside. Both of these need to do deep
3774         equality testing, requiring the implementation of operator== in BasicShapes
3775         classes.
3776         
3777         In addition, the PropertyWrappers in CSSPropertyAnimation need equals()
3778         implementations that also do more than pointer equality testing.
3779
3780         Tests: transitions/clip-path-transitions.html
3781                transitions/shape-outside-transitions.html
3782
3783         * page/animation/CSSPropertyAnimation.cpp:
3784         (WebCore::PropertyWrapperClipPath::equals):
3785         (WebCore::PropertyWrapperShape::equals):
3786         * rendering/ClipPathOperation.h:
3787         * rendering/style/BasicShapes.cpp:
3788         (WebCore::BasicShapeCircle::operator==):
3789         (WebCore::BasicShapeEllipse::operator==):
3790         (WebCore::BasicShapePolygon::operator==):
3791         (WebCore::BasicShapeInset::operator==):
3792         * rendering/style/BasicShapes.h:
3793         (WebCore::BasicShapeCenterCoordinate::operator==):
3794         (WebCore::BasicShapeRadius::operator==):
3795         * rendering/style/ShapeValue.cpp:
3796         (WebCore::pointersOrValuesEqual):
3797         (WebCore::ShapeValue::operator==):
3798         * rendering/style/ShapeValue.h:
3799         (WebCore::ShapeValue::operator!=):
3800         (WebCore::ShapeValue::operator==): Deleted.
3801         (WebCore::ShapeValue::ShapeValue): Deleted.
3802         * rendering/style/StyleRareNonInheritedData.cpp:
3803         (WebCore::StyleRareNonInheritedData::operator==):
3804         (WebCore::StyleRareNonInheritedData::clipPathOperationsEquivalent):
3805         (WebCore::StyleRareNonInheritedData::shapeOutsideDataEquivalent):
3806         * rendering/style/StyleRareNonInheritedData.h:
3807
3808 2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
3809
3810         Test font-variant-* and font-feature-settings on Yosemite and Mavericks
3811         https://bugs.webkit.org/show_bug.cgi?id=149778
3812
3813         Reviewed by Simon Fraser.
3814
3815         We can simply call the function which enables features on Yosemite and Mavericks.
3816
3817         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3818         (WebCore::platformFontLookupWithFamily):
3819         (WebCore::fontWithFamily):
3820
3821 2015-10-09  Anders Carlsson  <andersca@apple.com>
3822
3823         Don't allow plug-ins to override image types for <embed> elements
3824         https://bugs.webkit.org/show_bug.cgi?id=149979
3825
3826         Reviewed by Tim Horton.
3827
3828         Stop allowing plug-ins to take over image types for <embed> elements. We already do this
3829         for <object> elements, but had to make <embed> elements exempt because of webkit.org/b/49016.
3830         The QuickTime plug-in hasn't supported image types since Lion, so there's no point in keeping this code around.
3831
3832         * html/HTMLAppletElement.cpp:
3833         (WebCore::HTMLAppletElement::HTMLAppletElement):
3834         * html/HTMLEmbedElement.cpp:
3835         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
3836         * html/HTMLObjectElement.cpp:
3837         (WebCore::HTMLObjectElement::HTMLObjectElement):
3838         (WebCore::HTMLObjectElement::parametersForPlugin):
3839         * html/HTMLPlugInImageElement.cpp:
3840         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
3841         (WebCore::HTMLPlugInImageElement::isImageType):
3842         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
3843         * html/HTMLPlugInImageElement.h:
3844         (WebCore::HTMLPlugInImageElement::shouldPreferPlugInsForImages): Deleted.
3845         * loader/EmptyClients.h:
3846         * loader/FrameLoaderClient.h:
3847         * loader/SubframeLoader.cpp:
3848         (WebCore::SubframeLoader::resourceWillUsePlugin):
3849         (WebCore::SubframeLoader::requestObject):
3850         (WebCore::SubframeLoader::shouldUsePlugin):
3851         * loader/SubframeLoader.h:
3852
3853 2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
3854
3855         Unreviewed, fixing debug builds with Clang on Linux
3856         by including the stdio.h header where it's required
3857         under a debug configuration.
3858
3859         * page/scrolling/ScrollingStateTree.cpp:
3860         (WebCore::ScrollingStateTree::ScrollingStateTree):
3861         * rendering/SimpleLineLayoutFunctions.cpp:
3862
3863 2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
3864
3865         Unreviewed, followup to r190643.
3866
3867         Inline the std::function<> constructor wrappings around lambdas
3868         into a single line, instead of spanning it across four lines.
3869
3870         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
3871         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
3872         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
3873         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
3874         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3875         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
3876         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
3877         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
3878         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
3879         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
3880         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
3881         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
3882         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3883         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
3884         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
3885         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
3886         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3887         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
3888         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
3889         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
3890         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3891         (webkitVideoSinkRender):
3892         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3893         (webKitWebSrcChangeState):
3894         (webKitWebSrcNeedDataCb):
3895         (webKitWebSrcEnoughDataMainCb):
3896         (webKitWebSrcEnoughDataCb):
3897         (webKitWebSrcSeekMainCb):
3898         (webKitWebSrcSeekDataCb):
3899
3900 2015-10-11  Brian Burg  <bburg@apple.com>
3901
3902         Add missing builtins files to the Xcode projects
3903         https://bugs.webkit.org/show_bug.cgi?id=150015
3904
3905         Reviewed by Yusuke Suzuki.
3906
3907         * WebCore.xcodeproj/project.pbxproj:
3908
3909 2015-10-11  Simon Fraser  <simon.fraser@apple.com>
3910
3911         Cleanup and simplification of SVG path-related classes
3912         https://bugs.webkit.org/show_bug.cgi?id=150011
3913
3914         Reviewed by Zalan Bujtas.
3915
3916         Many SVG path-related subclasses were stateful, but only because code in
3917         SVGPathUtilities kept global copies around for no reason. A microbenchmark
3918         showed that there was no benefit to keeping global singletons of SVGPathBuilder,
3919         SVGPathSegListBuilder, SVGPathByteStreamBuilder, SVGPathStringBuilder,
3920         SVGPathTraversalStateBuilder, SVGPathParser and SVGPathBlender.
3921         
3922         Making these classes not be re-usable makes the code much simpler, allowing
3923         their SVGPathSources, SVGPathConsumers, SVGPathByteStream etc. to be stored
3924         by reference, and eliminating the cleanup() function which created annoying
3925         ordering issues.
3926         
3927         Code that uses SVGPathParser and SVGPathBlender is further simplified by having
3928         these classes expose only static functions, hiding any internal statefulness.
3929
3930         * svg/SVGPathBlender.cpp: Remove the m_progress member variable and instead
3931         pass progress to the various blend functions, as we do for other blend functions.
3932         Expose two only static functions. Pointers to references.
3933         (WebCore::SVGPathBlender::addAnimatedPath):
3934         (WebCore::SVGPathBlender::blendAnimatedPath):
3935         (WebCore::SVGPathBlender::SVGPathBlender):
3936         (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
3937         (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
3938         (WebCore::SVGPathBlender::blendMoveToSegment):
3939         (WebCore::SVGPathBlender::blendLineToSegment):
3940         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
3941         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
3942         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
3943         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
3944         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
3945         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
3946         (WebCore::SVGPathBlender::blendArcToSegment):
3947         (WebCore::SVGPathBlender::cleanup): Deleted.
3948         * svg/SVGPathBlender.h: Make the constructor take a ref to the destination Path,
3949         which is stored by reference.
3950         * svg/SVGPathBuilder.cpp:
3951         (WebCore::SVGPathBuilder::SVGPathBuilder):
3952         (WebCore::SVGPathBuilder::moveTo):
3953         (WebCore::SVGPathBuilder::lineTo):
3954         (WebCore::SVGPathBuilder::curveToCubic):
3955         (WebCore::SVGPathBuilder::closePath):
3956         * svg/SVGPathBuilder.h:
3957         (WebCore::SVGPathBuilder::setCurrentPath): Deleted.
3958         * svg/SVGPathByteStreamBuilder.cpp: References, assertions removed.
3959         (WebCore::SVGPathByteStreamBuilder::SVGPathByteStreamBuilder):
3960         * svg/SVGPathByteStreamBuilder.h:
3961         (WebCore::SVGPathByteStreamBuilder::writeType):
3962         (WebCore::SVGPathByteStreamBuilder::setCurrentByteStream): Deleted.
3963         * svg/SVGPathConsumer.h:
3964         * svg/SVGPathElement.cpp:
3965         * svg/SVGPathParser.cpp: Expose some static helper functions for parsing
3966         to byte streams and strings. References.
3967         (WebCore::SVGPathParser::parse):
3968         (WebCore::SVGPathParser::parseToByteStream):
3969         (WebCore::SVGPathParser::parseToString):
3970         (WebCore::SVGPathParser::SVGPathParser):
3971         (WebCore::SVGPathParser::parseClosePathSegment):
3972         (WebCore::SVGPathParser::parseMoveToSegment):
3973         (WebCore::SVGPathParser::parseLineToSegment):
3974         (WebCore::SVGPathParser::parseLineToHorizontalSegment):
3975         (WebCore::SVGPathParser::parseLineToVerticalSegment):
3976         (WebCore::SVGPathParser::parseCurveToCubicSegment):
3977         (WebCore::SVGPathParser::parseCurveToCubicSmoothSegment):
3978         (WebCore::SVGPathParser::parseCurveToQuadraticSegment):
3979         (WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment):
3980         (WebCore::SVGPathParser::parseArcToSegment):
3981         (WebCore::SVGPathParser::parsePathData):
3982         (WebCore::SVGPathParser::decomposeArcToCubic):
3983         (WebCore::SVGPathParser::parsePathDataFromSource): Deleted.
3984         (WebCore::SVGPathParser::cleanup): Deleted.
3985         * svg/SVGPathParser.h:
3986         (WebCore::SVGPathParser::setCurrentConsumer): Deleted.
3987         (WebCore::SVGPathParser::setCurrentSource): Deleted.
3988         * svg/SVGPathSegListBuilder.cpp:
3989         (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
3990         (WebCore::SVGPathSegListBuilder::moveTo):
3991         (WebCore::SVGPathSegListBuilder::lineTo):
3992         (WebCore::SVGPathSegListBuilder::lineToHorizontal):
3993         (WebCore::SVGPathSegListBuilder::lineToVertical):
3994         (WebCore::SVGPathSegListBuilder::curveToCubic):
3995         (WebCore::SVGPathSegListBuilder::curveToCubicSmooth):
3996         (WebCore::SVGPathSegListBuilder::curveToQuadratic):
3997         (WebCore::SVGPathSegListBuilder::curveToQuadraticSmooth):
3998         (WebCore::SVGPathSegListBuilder::arcTo):
3999         (WebCore::SVGPathSegListBuilder::closePath):
4000         * svg/SVGPathSegListBuilder.h:
4001         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathElement): Deleted.
4002         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathSegList): Deleted.
4003         (WebCore::SVGPathSegListBuilder::setCurrentSVGPathSegRole): Deleted.
4004         * svg/SVGPathStringBuilder.cpp:
4005         (WebCore::SVGPathStringBuilder::cleanup): Deleted.
4006         * svg/SVGPathStringBuilder.h:
4007         * svg/SVGPathTraversalStateBuilder.cpp:
4008         (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
4009         (WebCore::SVGPathTraversalStateBuilder::moveTo):
4010         (WebCore::SVGPathTraversalStateBuilder::lineTo):
4011         (WebCore::SVGPathTraversalStateBuilder::curveToCubic):
4012         (WebCore::SVGPathTraversalStateBuilder::closePath):
4013         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
4014         (WebCore::SVGPathTraversalStateBuilder::totalLength):
4015         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
4016         (WebCore::SVGPathTraversalStateBuilder::setDesiredLength): Deleted.
4017         * svg/SVGPathTraversalStateBuilder.h:
4018         (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex):
4019         (WebCore::SVGPathTraversalStateBuilder::setCurrentTraversalState): Deleted.
4020         * svg/SVGPathUtilities.cpp: Remove globals accessors, making things on the stack
4021         instead. Use SVGPathParser helper functions where possible.
4022         (WebCore::buildPathFromString):
4023         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
4024         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):