Have window.indexedDB.open return an IDBOpenDBRequest.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-09-16  Brady Eidson  <beidson@apple.com>
2
3         Have window.indexedDB.open return an IDBOpenDBRequest.
4         https://bugs.webkit.org/show_bug.cgi?id=149234
5
6         Reviewed by Alex Christensen.
7
8         Test: storage/indexeddb/modern/opendatabase-request.html
9
10         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
11         (WebCore::IDBClient::IDBFactory::open):
12         (WebCore::IDBClient::IDBFactory::openInternal):
13         * Modules/indexeddb/client/IDBFactoryImpl.h:
14
15 2015-09-16  Antti Koivisto  <antti@apple.com>
16
17         Turn ChildNodeInsertion/RemovalNotifier classes into functions
18         https://bugs.webkit.org/show_bug.cgi?id=149236
19
20         Reviewed by Ryosuke Niwa.
21
22         Less architecture, more readability.
23
24         * dom/ContainerNode.cpp:
25         (WebCore::ContainerNode::notifyChildInserted):
26         (WebCore::ContainerNode::notifyChildRemoved):
27         (WebCore::ContainerNode::removeChildren):
28         * dom/ContainerNodeAlgorithms.cpp:
29         (WebCore::notifyDescendantInsertedIntoDocument):
30         (WebCore::notifyDescendantInsertedIntoTree):
31         (WebCore::notifyNodeInsertedIntoDocument):
32         (WebCore::notifyNodeInsertedIntoTree):
33         (WebCore::notifyChildNodeInserted):
34         (WebCore::notifyNodeRemovedFromDocument):
35         (WebCore::notifyNodeRemovedFromTree):
36         (WebCore::notifyChildNodeRemoved):
37         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument): Deleted.
38         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree): Deleted.
39         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument): Deleted.
40         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree): Deleted.
41         * dom/ContainerNodeAlgorithms.h:
42         (WebCore::ChildNodeInsertionNotifier::ChildNodeInsertionNotifier): Deleted.
43         (WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier): Deleted.
44         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument): Deleted.
45         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree): Deleted.
46         (WebCore::ChildNodeInsertionNotifier::notify): Deleted.
47         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument): Deleted.
48         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree): Deleted.
49         (WebCore::ChildNodeRemovalNotifier::notify): Deleted.
50         * dom/Element.cpp:
51         (WebCore::Element::addShadowRoot):
52         (WebCore::Element::removeShadowRoot):
53         (WebCore::Element::createShadowRoot):
54
55 2015-09-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
56
57         Remove all uses of PassRefPtr in WebCore/bindings
58         https://bugs.webkit.org/show_bug.cgi?id=149207
59
60         Reviewed by Darin Adler.
61
62         If RefPtr<>&& argument is passed to new variable or other function, we use copyRef() or WTF::move().
63         copyRef() should be used when the argument continues to be used in following code. If it is final use
64         inside function, we have to use WTF::move().
65
66         * bridge/NP_jsobject.cpp:
67         * bridge/NP_jsobject.h:
68         * bridge/c/CRuntimeObject.cpp:
69         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
70         * bridge/c/CRuntimeObject.h:
71         (JSC::Bindings::CRuntimeObject::create):
72         * bridge/c/c_instance.cpp:
73         (JSC::Bindings::CInstance::CInstance):
74         * bridge/c/c_instance.h:
75         (JSC::Bindings::CInstance::create):
76         * bridge/jsc/BridgeJSC.cpp:
77         (JSC::Bindings::Array::Array):
78         (JSC::Bindings::Instance::Instance):
79         * bridge/jsc/BridgeJSC.h:
80         * bridge/objc/ObjCRuntimeObject.h:
81         (JSC::Bindings::ObjCRuntimeObject::create):
82         * bridge/objc/ObjCRuntimeObject.mm:
83         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
84         * bridge/objc/WebScriptObjectProtocol.h:
85         * bridge/objc/objc_instance.h:
86         * bridge/objc/objc_instance.mm:
87         (ObjcInstance::ObjcInstance):
88         (ObjcInstance::create):
89         * bridge/objc/objc_runtime.h:
90         * bridge/objc/objc_runtime.mm:
91         (JSC::Bindings::ObjcArray::ObjcArray):
92         * bridge/runtime_object.cpp:
93         (JSC::Bindings::RuntimeObject::RuntimeObject):
94         * bridge/runtime_object.h:
95         * bridge/runtime_root.cpp:
96         (JSC::Bindings::RootObject::create):
97         * bridge/runtime_root.h:
98
99 2015-09-16  Chris Dumez  <cdumez@apple.com>
100
101         Element's attribute NS API should defined treat undefined namespace as null
102         https://bugs.webkit.org/show_bug.cgi?id=149238
103         <rdar://problem/22562204>
104
105         Reviewed by Ryosuke Niwa.
106
107         Element's attribute NS API should treat defined undefined namespace as null
108         instead of converting it to the "undefined" String. This is because the
109         namespace parameter is a nullable String as per the DOM spec:
110         - https://dom.spec.whatwg.org/#element
111
112         The attribute is nullable and WebIDL says undefined should be converted
113         to null for nullable parameters:
114         - https://heycam.github.io/webidl/#es-nullable-type (step 3)
115
116         Firefox follows the specification.
117
118         No new tests, already covered by existing test.
119
120         * dom/Element.idl:
121
122 2015-09-16  Chris Dumez  <cdumez@apple.com>
123
124         Possible small iOS PLT regression from r189537
125         https://bugs.webkit.org/show_bug.cgi?id=149232
126
127         Reviewed by Ryosuke Niwa.
128
129         r189537 may have regressed PLT a bit on iOS. That change added a couple
130         of extra branches to throw exceptions. This patch marks those branches
131         as UNLIKELY() as we already do for other similar checks in the JS
132         bindings.
133
134         * bindings/scripts/CodeGeneratorJS.pm:
135         (GenerateImplementation):
136         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
137         (webkit_dom_test_obj_get_property):
138         (webkit_dom_test_obj_class_init):
139         (webkit_dom_test_obj_get_strict_type_checking_attribute):
140         (webkit_dom_test_obj_set_strict_type_checking_attribute):
141         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
142         * bindings/scripts/test/JS/JSTestObj.cpp:
143         (WebCore::jsTestObjStrictTypeCheckingAttribute):
144         (WebCore::setJSTestObjStrictTypeCheckingAttribute):
145         * bindings/scripts/test/ObjC/DOMTestObj.h:
146         * bindings/scripts/test/ObjC/DOMTestObj.mm:
147         (-[DOMTestObj strictTypeCheckingAttribute]):
148         (-[DOMTestObj setStrictTypeCheckingAttribute:]):
149         * bindings/scripts/test/TestObj.idl:
150         * html/HTMLTableElement.cpp:
151         (WebCore::HTMLTableElement::setTHead):
152         (WebCore::HTMLTableElement::setTFoot):
153
154 2015-09-16  Joseph Pecoraro  <pecoraro@apple.com>
155
156         Web Inspector: Fix common typo "supress" => "suppress"
157         https://bugs.webkit.org/show_bug.cgi?id=149199
158
159         Reviewed by Gyuyoung Kim.
160
161         * html/shadow/ContentDistributor.h:
162         (WebCore::ContentDistributor::needsDistribution):
163         * page/ContentSecurityPolicy.cpp:
164         (WebCore::ContentSecurityPolicy::reportViolation):
165         * platform/NotImplemented.h:
166         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
167         (WebCore::LayerChangesFlusher::hookCallback):
168         * platform/mac/HIDGamepadProvider.cpp:
169         (WebCore::HIDGamepadProvider::deviceRemoved):
170         * platform/win/makesafeseh.asm:
171
172 2015-09-16  Chris Dumez  <cdumez@apple.com>
173
174         WebIDL: Rename [ReturnNewObject] to [NewObject] and use it more consistently in DOM
175         https://bugs.webkit.org/show_bug.cgi?id=149192
176
177         Reviewed by Darin Adler.
178
179         Rename [ReturnNewObject] to [NewObject] and use it more consistently in
180         DOM.
181
182         This aligns our IDL extended attribute naming with standard Web IDL:
183         https://heycam.github.io/webidl/#NewObject
184
185         We already have [ReturnNewObject] in most places that the DOM
186         specification uses [NewObject] but we are missing a few so I'll
187         fix this as well:
188         https://dom.spec.whatwg.org/#interface-document
189
190         Using [NewObject] lets the bindings generator know that the API in
191         question always returns new objects and that we can bypass the check
192         for existing wrappers and directly create a new wrapper for the
193         returned object.
194
195         This patch also adds support for generating the toJSNewlyCreated()
196         utility function for most types. Previously, to use [ReturnNewObject]
197         for a new type, you needed to add the type to a hard-coded list in
198         the bindings generator then provide your own implementation for
199         toJSNewlyCreated() as custom bindings.
200
201         No new-exposed behavior change.
202
203         * bindings/js/JSDocumentCustom.cpp:
204         * bindings/js/JSEventCustom.cpp:
205         * bindings/js/JSNodeListCustom.cpp:
206         Add toJSNewlyCreated() custom implementation for Node, Event and
207         Document, that shares code with the existing toJS() implementation for
208         those types.
209
210         * bindings/js/JSCDATASectionCustom.cpp: Removed.
211         * bindings/js/JSTextCustom.cpp: Removed.
212         * bindings/js/JSTouchCustom.cpp: Removed.
213         * bindings/js/JSTouchListCustom.cpp: Removed.
214         Drop several custom bindings files as the bindings generator is
215         now able to generate the toJSNewlyCreated() utility function for
216         most types.
217
218         * bindings/scripts/CodeGeneratorJS.pm:
219         - Rename [ReturnNewObject] to [NewObject].
220         - Generate a toJSNewlyCreated() whenever we generate a toJS() already.
221           Get rid of the hard-coded list of types that need a
222           toJSNewlyCreated().
223
224         * bindings/scripts/IDLAttributes.txt:
225         Rename [ReturnNewObject] to [NewObject].
226
227         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
228         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
229         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
230         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
231         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
232         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
233         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
234         * bindings/scripts/test/JS/JSTestEventConstructor.h:
235         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
236         * bindings/scripts/test/JS/JSTestEventTarget.h:
237         * bindings/scripts/test/JS/JSTestException.cpp:
238         * bindings/scripts/test/JS/JSTestException.h:
239         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
240         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
241         * bindings/scripts/test/JS/JSTestInterface.cpp:
242         * bindings/scripts/test/JS/JSTestInterface.h:
243         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
244         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
245         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
246         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
247         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
248         * bindings/scripts/test/JS/JSTestNondeterministic.h:
249         * bindings/scripts/test/JS/JSTestObj.cpp:
250         * bindings/scripts/test/JS/JSTestObj.h:
251         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
252         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
253         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
254         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
255         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
256         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
257         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
258         * bindings/scripts/test/JS/JSTestTypedefs.h:
259         * bindings/scripts/test/JS/JSattribute.cpp:
260         * bindings/scripts/test/JS/JSattribute.h:
261         * bindings/scripts/test/JS/JSreadonly.cpp:
262         * bindings/scripts/test/JS/JSreadonly.h:
263         Rebaseline bindings tests.
264
265         * dom/Attr.idl:
266         * dom/CDATASection.idl:
267         * dom/Comment.idl:
268         * dom/DocumentFragment.idl:
269         * dom/DocumentType.idl:
270         * dom/EntityReference.idl:
271         * dom/ProcessingInstruction.idl:
272         Add [JSGenerateToJSObject] so that the bindings generator generates
273         a toJS() / toJSNewlyCreated() for this type. While it is not strictly
274         needed, it avoids falling back to using the toJS() from Node which
275         calls the virtual nodeType() function to determine the node type.
276         This change was made for efficiency purposes.
277
278         * dom/DOMImplementation.idl:
279         Rename [ReturnNewObject] to [NewObject] and add it to createHTMLDocument()
280         as well, as per the specification:
281         https://dom.spec.whatwg.org/#interface-domimplementation
282
283         * dom/Document.idl:
284         Rename [ReturnNewObject] to [NewObject] and add it to more operations
285         as per he DOM specification:
286         https://dom.spec.whatwg.org/#document
287
288         * dom/Node.idl:
289         Add [NewObject] to cloneNode() as per the DOM specification:
290         https://dom.spec.whatwg.org/#node
291
292         * dom/ParentNode.idl:
293         Add [NewObject] to querySelectorAll() as per the DOM specification:
294         https://dom.spec.whatwg.org/#parentnode
295
296         * dom/Range.idl:
297         Add [NewObject] for several operations, as per the DOM specification:
298         https://dom.spec.whatwg.org/#interface-range
299
300 2015-09-16  Brady Eidson  <beidson@apple.com>
301
302         Have window.indexedDB.deleteDatabase return an IDBOpenDBRequest.
303         https://bugs.webkit.org/show_bug.cgi?id=149229
304
305         Reviewed by Alex Christensen.
306
307         Test: storage/indexeddb/modern/deletedatabase-request.html
308               storage/indexeddb/modern/deletedatabase-null-name-exception.html
309
310         * CMakeLists.txt:
311         * WebCore.xcodeproj/project.pbxproj:
312
313         * Modules/indexeddb/IDBDatabaseIdentifier.cpp: Added.
314         (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
315         * Modules/indexeddb/IDBDatabaseIdentifier.h: Added.
316         (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
317         (WebCore::IDBDatabaseIdentifier::isHashTableDeletedValue):
318         (WebCore::IDBDatabaseIdentifier::hash):
319         (WebCore::IDBDatabaseIdentifier::isValid):
320         (WebCore::IDBDatabaseIdentifier::operator==):
321         (WebCore::IDBDatabaseIdentifier::databaseName):
322         (WebCore::IDBDatabaseIdentifierHash::hash):
323         (WebCore::IDBDatabaseIdentifierHash::equal):
324         (WebCore::IDBDatabaseIdentifierHashTraits::isEmptyValue):
325
326         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
327         (WebCore::IDBClient::shouldThrowSecurityException):
328         (WebCore::IDBClient::IDBFactory::getDatabaseNames):
329         (WebCore::IDBClient::IDBFactory::open):
330         (WebCore::IDBClient::IDBFactory::deleteDatabase):
331         * Modules/indexeddb/client/IDBFactoryImpl.h:
332
333         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
334         (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
335         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
336         (WebCore::IDBClient::IDBOpenDBRequest::create):
337
338         * Modules/indexeddb/client/IDBRequestImpl.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp.
339         (WebCore::IDBClient::IDBRequest::IDBRequest):
340         (WebCore::IDBClient::IDBRequest::result):
341         (WebCore::IDBClient::IDBRequest::errorCode):
342         (WebCore::IDBClient::IDBRequest::error):
343         (WebCore::IDBClient::IDBRequest::source):
344         (WebCore::IDBClient::IDBRequest::transaction):
345         (WebCore::IDBClient::IDBRequest::readyState):
346         (WebCore::IDBClient::IDBRequest::eventTargetInterface):
347         (WebCore::IDBClient::IDBRequest::activeDOMObjectName):
348         (WebCore::IDBClient::IDBRequest::canSuspendForPageCache):
349         * Modules/indexeddb/client/IDBRequestImpl.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.h.
350
351         * platform/Logging.h:
352
353 2015-09-16  Chris Dumez  <cdumez@apple.com>
354
355         Add initial support for [Unforgeable] IDL extended attribute
356         https://bugs.webkit.org/show_bug.cgi?id=149147
357
358         Reviewed by Darin Adler.
359
360         Add initial support for [Unforgeable] IDL extended attribute:
361         https://heycam.github.io/webidl/#Unforgeable
362
363         In particular, attributes marked as unforgeable are now:
364         - on the instance rather than the prototype
365         - non-configurable. WebKit does not match the Web IDL specification
366           and most properties are currently non-configurable already. However,
367           I added an extra check for [Unforgeable] so that unforgeable
368           attributes stay unconfigurable if we later decide to match the spec
369           and mark properties as configurable.
370
371         Operation marked as unforgeable are now non-configurable. However, this
372         patch does not move them from the prototype to the instance yet. This
373         needs to be addressed in a follow-up patch as this is a larger change.
374
375         This patch also drops support for the undocumented
376         [OperationsNotDeletable] IDL extended attribute. It is no longer needed
377         now that we support [Unforgeable] and still support [NotDeletable] for
378         operations.
379
380         Test: fast/dom/unforgeable-attributes.html
381
382         * Modules/plugins/QuickTimePluginReplacement.idl:
383         Drop [OperationsNotDeletable] on the interface and mark the only
384         operation on this interface as [NotDeletable]. There is no behavior
385         change but this allows us to drop support for a non-standard and
386         undocumented IDL extended attribute.
387
388         * bindings/scripts/CodeGeneratorJS.pm:
389         (AttributeShouldBeOnInstance):
390         (GenerateAttributesHashTable):
391         (GenerateImplementation):
392         Add initial support for [Unforgeable] IDL extended attribute.
393
394         * bindings/scripts/IDLAttributes.txt:
395         Add [Unforgeable]. Drop [OperationsNotDeletable].
396
397         * crypto/CryptoKeyPair.idl:
398         Drop [OperationsNotDeletable] on the interface as this interface has
399         no operations.
400
401         * dom/Document.idl:
402         * page/DOMWindow.idl:
403         * page/Location.idl:
404         Mark attributes / interfaces as [Unforgeable] as per the latest HTML
405         specification:
406         https://html.spec.whatwg.org/multipage/dom.html#document
407         https://html.spec.whatwg.org/multipage/browsers.html#window
408         https://html.spec.whatwg.org/multipage/browsers.html#the-location-interface
409
410 2015-09-16  Zalan Bujtas  <zalan@apple.com>
411
412         Simple line layout: Glitch selecting long text.
413         https://bugs.webkit.org/show_bug.cgi?id=149204
414         rdar://problem/22646472
415
416         Reviewed by Antti Koivisto.
417
418         When long text is split into multiple RenderText objects, we ignore renderer boundaries while
419         collecting wrapping positions (so that we don't end up wrapping unbreakable fragments at the end of each renderer).
420         This patch ensures that fragments with hypen character ignore renderer boundaries too.
421
422         Test: fast/text/multiple-renderers-with-hypen-on-boundary.html
423
424         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
425         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
426
427 2015-09-16  Brady Eidson  <beidson@apple.com>
428
429         Remove stray logging string mistakenly left in r189746.
430
431         * Modules/indexeddb/legacy/LegacyFactory.cpp:
432         (WebCore::LegacyFactory::deleteDatabase):
433
434 2015-09-16  Chris Fleizach  <cfleizach@apple.com>
435
436         AX: No VoiceOver typing feedback in some search fields
437         https://bugs.webkit.org/show_bug.cgi?id=149177
438
439         Reviewed by Mario Sanchez Prada.
440
441         If SearchFieldRole is not marked as a TextControl, it does not end up returning the accessibilityValue,
442         which is needed to output the right text to VoiceOver.
443
444         Test: accessibility/ax-value-with-search.html
445
446         * accessibility/AccessibilityObject.cpp:
447         (WebCore::AccessibilityObject::isTextControl):
448
449 2015-09-16  Manuel Rego Casasnovas  <rego@igalia.com>
450
451         [css-grid] Grid container's height should include scrollbar
452         https://bugs.webkit.org/show_bug.cgi?id=149210
453
454         Reviewed by Sergio Villar Senin.
455
456         Add scrollbar's size in the grid container's height calculation at
457         RenderGrid::layoutGridItems().
458
459         Test: fast/css-grid-layout/grid-container-margin-border-padding-scrollbar.html
460
461         * rendering/RenderGrid.cpp:
462         (WebCore::RenderGrid::layoutGridItems): Include scrollbarLogicalHeight()
463         while computing the grid's logical height.
464
465 2015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
466
467         Unreviewed. Fix GObject DOM bindings API break after r189676.
468
469         webkit_dom_character_data_append_data() used to raise exceptions.
470
471         * bindings/scripts/CodeGeneratorGObject.pm:
472         (FunctionUsedToRaiseException):
473
474 2015-09-15  Commit Queue  <commit-queue@webkit.org>
475
476         Unreviewed, rolling out r189847.
477         https://bugs.webkit.org/show_bug.cgi?id=149208
478
479         Asserts on all the tests (Requested by ap on #webkit).
480
481         Reverted changeset:
482
483         "Simple line layout: Glitch selecting long text."
484         https://bugs.webkit.org/show_bug.cgi?id=149204
485         http://trac.webkit.org/changeset/189847
486
487 2015-09-15  Zalan Bujtas  <zalan@apple.com>
488
489         Simple line layout: Glitch selecting long text.
490         https://bugs.webkit.org/show_bug.cgi?id=149204
491         rdar://problem/22646472
492
493         Reviewed by Antti Koivisto.
494
495         When long text is split into multiple RenderText objects, we ignore renderer boundaries while
496         collecting wrapping positions (so that we don't end up wrapping unbreakable fragments at the end of each renderer).
497         This patch ensures that fragments with hypen character ignore renderer boundaries too.
498
499         Test: fast/text/multiple-renderers-with-hypen-on-boundary.html
500
501         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
502         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
503
504 2015-09-15  Ryosuke Niwa  <rniwa@webkit.org>
505
506         GTK+ build fix attempt after r189841.
507
508         * PlatformGTK.cmake:
509
510 2015-09-15  Chris Dumez  <cdumez@apple.com>
511
512         Document.createElement(localName) does not handle correctly missing or null parameter
513         https://bugs.webkit.org/show_bug.cgi?id=149184
514         <rdar://problem/22565070>
515
516         Reviewed by Ryosuke Niwa.
517
518         Document.createElement(localName) does not handle correct missing or
519         null parameter:
520         - https://dom.spec.whatwg.org/#interface-document
521
522         As per the specification, the parameter is a non-nullable DOMString and
523         is mandatory. Therefore, as per Web IDL, we should have the following
524         behavior:
525         1. If the parameter is missing, we should throw an exception
526         2. If the parameter is null, we should convert it to the "null" string
527            and create a <null> element.
528
529         Chrome and Firefox behave according to the specification. However,
530         WebKit was doing:
531         1. Create a <undefined> element
532         2. Throw an InvalidCharacterError
533
534         This patch aligns WebKit's behavior with the specification and other
535         major browsers.
536
537         No new tests, already covered by existing tests.
538
539         * dom/Document.idl:
540
541 2015-09-15  Ryosuke Niwa  <rniwa@webkit.org>
542
543         Add ShadowRoot interface and Element.prototype.attachShadow
544         https://bugs.webkit.org/show_bug.cgi?id=149187
545
546         Reviewed by Antti Koivisto.
547
548         Add back ShadowRoot IDL interface and Element.prototype.attachShadow in accordance with
549         http://w3c.github.io/webcomponents/spec/shadow/ at db27e6e36eab512d86edcdabb33ed27b5751acd7 excluding getSelection(),
550         elementFromPoint(), elementsFromPoint(), caretPositionFromPoint(), and styleSheets attribute on ShadowRoot interface.
551
552         The feature is enabled by default on Mac and iOS ports for testing and disabled by default elsewhere.
553
554         Also added HTMLElement::canHaveUserAgentShadowRoot which returns false by default and overridden elsewhere to return true
555         to distinguish elements for which attachShadow is supposed to throw NotSupported.
556         See https://w3c.github.io/webcomponents/spec/shadow/#widl-Element-attachShadow-ShadowRoot-ShadowRootInit-shadowRootInitDict
557
558         Tests: fast/shadow-dom/Element-interface-attachShadow.html
559                fast/shadow-dom/Element-interface-shadowRoot-attribute.html
560                fast/shadow-dom/ShadowRoot-interface.html
561
562         * CMakeLists.txt:
563         * Configurations/FeatureDefines.xcconfig:
564         * DerivedSources.cpp:
565         * DerivedSources.make:
566         * PlatformGTK.cmake:
567         * WebCore.vcxproj/WebCore.vcxproj:
568         * WebCore.vcxproj/WebCore.vcxproj.filters:
569         * WebCore.xcodeproj/project.pbxproj:
570         * css/SelectorChecker.cpp:
571         (WebCore::SelectorChecker::matchRecursively):
572         * dom/Element.cpp:
573         (WebCore::Element::bindingsOffsetParent):
574         (WebCore::Element::offsetParent):
575         (WebCore::Element::addShadowRoot):
576         (WebCore::Element::createShadowRoot):
577         (WebCore::Element::attachShadow): Added.
578         (WebCore::Element::bindingShadowRoot): Added. Returns null unless the attached shadow root is in the "open" mode.
579         * dom/Element.h:
580         * dom/Element.idl: Added attachShadow and shadowRoot. We only expose these to JS for now since Dictionary argument isn't
581         supported by other binding code.
582         * dom/ShadowRoot.cpp: Removed an unused enum.
583         * dom/ShadowRoot.h:
584         (WebCore::ShadowRoot::Type): Replaced old-style enum "ShadowRootType" by an enum class named "Type". Also added two new
585         values Open and Closed for author shadow roots.
586         (WebCore::ShadowRoot::type):
587         * dom/ShadowRoot.idl: Added.
588         * html/HTMLButtonElement.h:
589         * html/HTMLDetailsElement.h:
590         (HTMLButtonElement::canHaveUserAgentShadowRoot): Ditto.
591         * html/HTMLElement.h:
592         (WebCore::HTMLElement::canHaveUserAgentShadowRoot): Added. Returns false by default.
593         * html/HTMLInputElement.h:
594         * html/HTMLKeygenElement.h:
595         * html/HTMLMarqueeElement.h:
596         * html/HTMLMediaElement.h:
597         * html/HTMLMeterElement.h:
598         * html/HTMLPlugInElement.h:
599         * html/HTMLProgressElement.h:
600         * html/HTMLSelectElement.h:
601         * html/HTMLSummaryElement.h:
602         * html/HTMLTextAreaElement.h:
603         * html/shadow/InsertionPoint.h:
604         (ShadowRootWithInsertionPoints::ShadowRootWithInsertionPoints):
605         * rendering/RenderElement.cpp:
606         (WebCore::RenderElement::selectionPseudoStyle):
607         * rendering/RenderLayer.cpp:
608         (WebCore::rendererForScrollbar):
609         * svg/SVGElement.cpp:
610         (WebCore::SVGElement::correspondingUseElement):
611         * testing/Internals.cpp:
612         (WebCore::Internals::shadowRootType):
613
614 2015-09-15  Brent Fulgham  <bfulgham@apple.com>
615
616         [Win] Unreviewed release fix after r189832
617
618         * platform/graphics/ca/win/PlatformCALayerWin.h: The implementation
619         should exist in Release builds as well.
620
621 2015-09-15  Benjamin Poulain  <bpoulain@apple.com>
622
623         Style invalidation affecting siblings does not work with inline-style changes
624         https://bugs.webkit.org/show_bug.cgi?id=149189
625
626         Reviewed by Antti Koivisto.
627
628         Style::resolveTree() made the assumption that inline style changes only affect
629         descendants and should not participate in "StyleRecalcAffectsNextSiblingElementStyle".
630         That was wrong. If the inline style change through CSSOM, it can cause the creation
631         of a style attribute, which is observable through "StyleRecalcAffectsNextSiblingElementStyle".
632
633         This patch removes the incorrect assumption. Style invalidation is always propagated now.
634
635         Tests: fast/css/style-attribute-invalidation-propagates-to-counted-siblings.html
636                fast/css/style-attribute-invalidation-propagates-to-direct-siblings.html
637                fast/css/style-attribute-invalidation-propagates-to-indirect-siblings.html
638
639         * css/PropertySetCSSStyleDeclaration.cpp:
640         (WebCore::InlineCSSStyleDeclaration::didMutate): Deleted.
641         * dom/StyledElement.cpp:
642         (WebCore::StyledElement::inlineStyleChanged):
643         * dom/StyledElement.h:
644         (WebCore::StyledElement::invalidateStyleAttribute):
645         Clean up inline-style invalidation a tiny bit.
646
647         * style/StyleResolveTree.cpp:
648         (WebCore::Style::resolveTree):
649         Fix the bug.
650
651 2015-09-15  Joseph Pecoraro  <pecoraro@apple.com>
652
653         Web Inspector: Paused Debugger prevents page reload
654         https://bugs.webkit.org/show_bug.cgi?id=148174
655
656         Reviewed by Brian Burg.
657
658         When navigating the page while paused, suppress any pausing until the page
659         has completed navigation. If not paused and navigating, you can still pause
660         in pagehide and unload handlers or other late page events.
661
662         Could not write a reliable test for this at the moment.
663         InspectorTest.reloadPage has multiple issues with the output,
664         so I'll investigate making reload tests more reliable later.
665
666         * inspector/InspectorController.h:
667         * inspector/InspectorController.cpp:
668         (WebCore::InspectorController::resume): Deleted.
669         * loader/FrameLoader.cpp:
670         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
671         We now use existing InspectorInstrumentation functions instead of a method
672         on InspectorController during load. In dropping the method InspectorController
673         can drop a member variable no longer used.
674
675         * inspector/InspectorInstrumentation.h:
676         (WebCore::InspectorInstrumentation::willStartProvisionalLoad):
677         Add a new instrumentation hook.
678
679         * inspector/InspectorInstrumentation.cpp:
680         (WebCore::InspectorInstrumentation::willStartProvisionalLoadImpl):
681         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
682         When starting or completing main frame navigations, let the PageDebuggerAgent do some work.
683
684         * inspector/PageDebuggerAgent.h:
685         * inspector/PageDebuggerAgent.cpp:
686         (WebCore::PageDebuggerAgent::mainFrameStartedLoading):
687         (WebCore::PageDebuggerAgent::mainFrameStoppedLoading):
688         (WebCore::PageDebuggerAgent::mainFrameNavigated):
689         Suppress pausing if navigating while paused. Otherwise behave as normal.
690
691 2015-09-15  Brent Fulgham  <bfulgham@apple.com>
692
693         [Win] Provide a means for viewing the layer tree
694         https://bugs.webkit.org/show_bug.cgi?id=149165
695
696         Reviewed by Simon Fraser.
697
698         Revise the old fprintf logic to generate a string
699         containing the layer tree so that it can be output
700         to the debugger (or elsewhere).
701
702         * platform/graphics/ca/PlatformCALayer.h: Rename 'printTree'
703         to 'printLayerTree', and make it available in release builds.
704         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
705         (WebCore::CACFLayerTreeHost::printLayerTree): Added. Calls into
706         the PlatformCALayer implementation.
707         * platform/graphics/ca/win/CACFLayerTreeHost.h:
708         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
709         (printIndent): Revise to use two-space indent and use StringBuilder.
710         (printTransform): Ditto.
711         (printColor): Added helper function.
712         (printLayer): Revised to output information on the layer contents.
713         (PlatformCALayerWin::printLayerTree): Renamed from 'printTree'.
714         (PlatformCALayerWin::printTree): Deleted.
715         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
716         (PlatformCALayerWinInternal::drawRepaintCounters): Drive-by fix. Match the
717         cocoa repaint counter logic by not painting counters for the layers that
718         contain the tile grid.
719         * platform/graphics/ca/win/PlatformCALayerWin.h:
720         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
721         (PlatformCALayerWinInternal::drawRepaintCounters):
722
723 2015-09-15  Myles C. Maxfield  <mmaxfield@apple.com>
724
725         REGRESSION(r155554): Nested isolates can cause an infinite loop when laying out bidi runs
726         https://bugs.webkit.org/show_bug.cgi?id=149153
727
728         Reviewed by David Hyatt.
729
730         When traversing bidi runs, we might encounter a run which is supposed to be isolated. In this
731         situation, we will append a placeholder run in the run list, and remember a pointer to these
732         isolated runs inside BidiResolver. Then, once we're done traversing the bidi runs, we return
733         to the isolated runs and handle them separately (and replace the placeholder with the result).
734
735         However, due to the fact that our BidiRuns start at leaf nodes, we have to keep track of which
736         local root of the render tree we were inspecting (to ensure that we visit the same node
737         multiple times if there are nested isolate spans). We were not correctly keeping track of this
738         local root, which was leading us to consider the same root multiple times, thereby leading to
739         an infinite loop.
740
741         The solution is simply to keep root information alongside the isolated run information inside
742         BidiResolver. However, BidiResolver is inside platform/, which means that this new type should
743         be a template argument, just like how BidiRun itself is a template argument.
744
745         This new type, BidiIsolatedRun, holds all the information that our isolate-revisiting logic
746         needs inside constructBidiRunsForSegment(). It also holds a reference to the placeholder run
747         which we will replace.
748
749         Test: fast/text/international/unicode-bidi-isolate-nested-crash.html
750
751         * platform/graphics/GraphicsContext.cpp:
752         (WebCore::GraphicsContext::drawBidiText): BidiIsolatedRun template argument is unused, so pass
753         in Void.
754         * platform/text/BidiResolver.h: Add template argument.
755         (WebCore::BidiResolver::isolatedRuns):
756         (WebCore::IsolatedRun>::~BidiResolver):
757         (WebCore::IsolatedRun>::appendRun):
758         (WebCore::IsolatedRun>::embed):
759         (WebCore::IsolatedRun>::checkDirectionInLowerRaiseEmbeddingLevel):
760         (WebCore::IsolatedRun>::lowerExplicitEmbeddingLevel):
761         (WebCore::IsolatedRun>::raiseExplicitEmbeddingLevel):
762         (WebCore::IsolatedRun>::commitExplicitEmbedding):
763         (WebCore::IsolatedRun>::updateStatusLastFromCurrentDirection):
764         (WebCore::IsolatedRun>::reorderRunsFromLevels):
765         (WebCore::IsolatedRun>::createBidiRunsForLine):
766         (WebCore::IsolatedRun>::setMidpointForIsolatedRun): Use references instead of pointers.
767         (WebCore::IsolatedRun>::midpointForIsolatedRun): Ditto.
768         (WebCore::Run>::~BidiResolver): Deleted.
769         (WebCore::Run>::appendRun): Deleted.
770         (WebCore::Run>::embed): Deleted.
771         (WebCore::Run>::checkDirectionInLowerRaiseEmbeddingLevel): Deleted.
772         (WebCore::Run>::lowerExplicitEmbeddingLevel): Deleted.
773         (WebCore::Run>::raiseExplicitEmbeddingLevel): Deleted.
774         (WebCore::Run>::commitExplicitEmbedding): Deleted.
775         (WebCore::Run>::updateStatusLastFromCurrentDirection): Deleted.
776         (WebCore::Run>::reorderRunsFromLevels): Deleted.
777         (WebCore::Run>::createBidiRunsForLine): Deleted.
778         (WebCore::Run>::setMidpointForIsolatedRun): Deleted.
779         (WebCore::Run>::midpointForIsolatedRun): Deleted.
780         * rendering/InlineIterator.h:
781         (WebCore::BidiIsolatedRun::BidiIsolatedRun): New type.
782         (WebCore::addPlaceholderRunForIsolatedInline): Create new type, and include local root
783         information.
784         (WebCore::IsolateTracker::addFakeRunIfNecessary): Include local root information.
785         (WebCore::InlineBidiResolver::appendRun): Ditto.
786         * rendering/RenderBlockLineLayout.cpp: Update for new BidiIsolatedRun type.
787         (WebCore::setUpResolverToResumeInIsolate):
788         (WebCore::constructBidiRunsForSegment):
789         * rendering/line/TrailingObjects.h:
790
791 2015-09-15  Brady Eidson  <beidson@apple.com>
792
793         Add empty IDBFactory implementation for Modern IDB.
794         https://bugs.webkit.org/show_bug.cgi?id=149191
795
796         Reviewed by Jer Noble.
797
798         No new tests (No behavior change).
799
800         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
801         (WebCore::DOMWindowIndexedDatabase::indexedDB):
802         
803         * Modules/indexeddb/client/IDBFactoryImpl.cpp: 
804         (WebCore::IDBClient::IDBFactory::create):
805         (WebCore::IDBClient::IDBFactory::IDBFactory):
806         (WebCore::IDBClient::IDBFactory::getDatabaseNames):
807         (WebCore::IDBClient::IDBFactory::open):
808         (WebCore::IDBClient::IDBFactory::deleteDatabase):
809         (WebCore::IDBClient::IDBFactory::cmp):
810         * Modules/indexeddb/client/IDBFactoryImpl.h: 
811         
812         * CMakeLists.txt:
813         * WebCore.xcodeproj/project.pbxproj:
814         
815         * loader/EmptyClients.cpp:
816         * page/DatabaseProvider.h:
817
818 2015-09-15  Antti Koivisto  <antti@apple.com>
819
820         Split FontDescription into lower and higher level types
821         https://bugs.webkit.org/show_bug.cgi?id=149036
822
823         Reviewed by Darin Adler.
824
825         Currently FontDescription is used through the text subsystem. However much of the data it
826         carries is only needed by FontCascade and text layout but not by the lower level Font/FontCache
827         layer. This makes code confusing. For example families specified in FontDescription are ignored
828         at lower levels.
829
830         Split it into a low level FontDescription and a high level FontCascadeDescription type:
831
832         FontDescription <-> Font
833         FontCascadeDescription <-> FontCascade
834
835         The former only carries information that is needed to instantiate a Font or fetch it from the FontCache.
836         The latter has additional data for CSS font cascade semantics and other higher level features.
837
838 2015-09-15  Myles C. Maxfield  <mmaxfield@apple.com>
839
840         GraphicsContext::drawBidiText()'s BidiResolver should not have isolated runs
841         https://bugs.webkit.org/show_bug.cgi?id=149193
842
843         Reviewed by Anders Carlsson.
844
845         There are two users of BidiResolver, one which needs isolated runs (in RenderBlockLineLayout) and
846         one which doesn't (in GraphicsContext::drawBidiText()). Because of [1], the isolated runs vector
847         is migrating to a new type outside of platform/. Therefore, only the first user of BidiResolver
848         should have this member variable.
849
850         This is achieved by creating two subclasses of BidiResolver, and using the Curiously Repeating
851         Template pattern to downcast into specializations.
852
853         [1] https://bugs.webkit.org/show_bug.cgi?id=149153
854
855         No new tests because there is no behavior change.
856
857         * platform/text/BidiResolver.h:
858         (WebCore::BidiResolverBase::BidiResolverBase):
859         (WebCore::BidiResolverBase::increment):
860         (WebCore::BidiResolverBase::appendRun):
861         (WebCore::BidiResolverBase::incrementInternal):
862         (WebCore::IsolateRun>::~BidiResolverWithIsolate):
863         (WebCore::Subclass>::appendRunInternal):
864         (WebCore::Subclass>::embed):
865         (WebCore::Subclass>::checkDirectionInLowerRaiseEmbeddingLevel):
866         (WebCore::Subclass>::lowerExplicitEmbeddingLevel):
867         (WebCore::Subclass>::raiseExplicitEmbeddingLevel):
868         (WebCore::Subclass>::commitExplicitEmbedding):
869         (WebCore::Subclass>::updateStatusLastFromCurrentDirection):
870         (WebCore::Subclass>::reorderRunsFromLevels):
871         (WebCore::Subclass>::createBidiRunsForLine):
872         (WebCore::Subclass>::setMidpointForIsolatedRun):
873         (WebCore::Subclass>::midpointForIsolatedRun):
874         (WebCore::BidiResolver::BidiResolver): Deleted.
875         (WebCore::BidiResolver::increment): Deleted.
876         (WebCore::BidiResolver::isolatedRuns): Deleted.
877         (WebCore::Run>::~BidiResolver): Deleted.
878         (WebCore::Run>::appendRun): Deleted.
879         (WebCore::Run>::embed): Deleted.
880         (WebCore::Run>::checkDirectionInLowerRaiseEmbeddingLevel): Deleted.
881         (WebCore::Run>::lowerExplicitEmbeddingLevel): Deleted.
882         (WebCore::Run>::raiseExplicitEmbeddingLevel): Deleted.
883         (WebCore::Run>::commitExplicitEmbedding): Deleted.
884         (WebCore::Run>::updateStatusLastFromCurrentDirection): Deleted.
885         (WebCore::Run>::reorderRunsFromLevels): Deleted.
886         (WebCore::Run>::createBidiRunsForLine): Deleted.
887         (WebCore::Run>::setMidpointForIsolatedRun): Deleted.
888         (WebCore::Run>::midpointForIsolatedRun): Deleted.
889         * rendering/InlineIterator.h:
890         (WebCore::InlineBidiResolver::incrementInternal):
891         (WebCore::InlineBidiResolver::appendRunInternal):
892         (WebCore::InlineBidiResolver::increment): Deleted.
893         (WebCore::InlineBidiResolver::appendRun): Deleted.
894         * rendering/line/TrailingObjects.h:
895
896 2015-09-15  Chris Dumez  <cdumez@apple.com>
897
898         new Event() without parameter should throw
899         https://bugs.webkit.org/show_bug.cgi?id=149146
900         <rdar://problem/22565070>
901
902         Reviewed by Ryosuke Niwa.
903
904         new Event() without parameter should throw because the type parameter
905         is mandatory as per the specification:
906         https://dom.spec.whatwg.org/#interface-event
907
908         Both Firefox and Chrome throw in this case. However, WebKit was
909         creating an event whose type is the string "undefined". This patch
910         aligns our behavior with the specification and other major browsers.
911
912         No new tests, already covered by existing test.
913
914         * bindings/scripts/CodeGeneratorJS.pm:
915         (GenerateConstructorDefinition):
916         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
917         (WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
918
919 2015-09-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>
920
921         [GTK] Build failure with ACCELERATED_2D_CANVAS when cairo-gl has built with OpenGLESv2 support only.
922         https://bugs.webkit.org/show_bug.cgi?id=149172
923
924         Reviewed by Martin Robinson.
925
926         No new tests, no behavior change.
927
928         * platform/graphics/glx/GLContextGLX.cpp:
929         (WebCore::GLContextGLX::cairoDevice):
930
931 2015-09-15  Chris Dumez  <cdumez@apple.com>
932
933         Element.getAttributeNS() should return null if the attribute does not exist
934         https://bugs.webkit.org/show_bug.cgi?id=149180
935         <rdar://problem/22561011>
936
937         Reviewed by Ryosuke Niwa.
938
939         Element.getAttributeNS() should return null if the attribute does not
940         exist, similarly to what Element.getAttribute() does:
941         - https://dom.spec.whatwg.org/#element (both return a nullable DOMString).
942         - https://dom.spec.whatwg.org/#dom-element-getattributens (step 2)
943
944         Firefox and Chrome match the specification. However, WebKit was returning
945         an empty string for getAttributeNS() and null for getAttribute(). This
946         patch aligns WebKit's behavior with the specification and other browsers.
947
948         No new tests, already covered by existing tests.
949
950         * dom/Element.idl:
951
952 2015-09-15  Ryosuke Niwa  <rniwa@webkit.org>
953
954         ContentDistribution should be only used for details elements
955         https://bugs.webkit.org/show_bug.cgi?id=149148
956
957         Reviewed by Antti Koivisto.
958
959         Extracted ShadowRootWithInsertionPoints out of ShadowRoot for HTMLDetailsElement and HTMLSummaryElement.
960
961         We don't add a separate .h and .cpp files since this is a temporary measure until we replace it with
962         a slot-based shadow DOM implementation.
963
964         No new tests. There should be no observable behavioral change.
965
966         * dom/Element.cpp:
967         (WebCore::Element::addShadowRoot): Removed the call to didShadowBoundaryChange since this function is only
968         called in ensureUserAgentShadowRoot. Also moved the call to didAddUserAgentShadowRoot for
969         HTMLDetailsElement's shadow root which uses this function instead of ensureUserAgentShadowRoot.
970         (WebCore::Element::removeShadowRoot): Removed the call to invalidateDistribution since it's only called by
971         ~Element.
972         (WebCore::Element::createShadowRoot):
973         (WebCore::Element::ensureUserAgentShadowRoot): Moved the call didAddUserAgentShadowRoot into addShadowRoot
974         since HTMLDetailsElement uses a subclass of ShadowRoot.
975         (WebCore::Element::childrenChanged):
976         (WebCore::Element::removeAllEventListeners):
977
978         * dom/Element.h:
979         (Element::addShadowRoot): Made this function a protected member as it's now used by HTMLDetailsElement.
980
981         * dom/ShadowRoot.cpp:
982         (WebCore::ShadowRoot::childrenChanged): Deleted.
983
984         * dom/ShadowRoot.h:
985         (WebCore::ShadowRoot::distributor): Made this a virtual function and return nullptr by default.
986         (WebCore::ShadowRoot::isOrphan):
987
988         * html/HTMLDetailsElement.cpp:
989         (WebCore::HTMLDetailsElement::create): Uses ShadowRootWithInsertionPoints instead of ShadowRoot.
990
991         * html/HTMLInputElement.cpp:
992         (WebCore::HTMLInputElement::runPostTypeUpdateTasks): Removed the call to invalidateDistribution since it's
993         only relevant for HTMLDetailsElement's shadow DOM.
994
995         * html/HTMLSummaryElement.cpp:
996         (WebCore::HTMLSummaryElement::create): Uses ShadowRootWithInsertionPoints instead of ShadowRoot.
997
998         * html/shadow/ContentDistributor.cpp:
999         (WebCore::ContentDistributor::distribute):
1000         (WebCore::ContentDistributor::ensureDistribution):
1001         (WebCore::ContentDistributor::invalidateDistribution):
1002
1003         * html/shadow/InsertionPoint.cpp:
1004         (WebCore::InsertionPoint::childrenChanged):
1005         (WebCore::InsertionPoint::insertedInto):
1006         (WebCore::InsertionPoint::removedFrom):
1007         (WebCore::findInsertionPointOf):
1008         (WebCore::ShadowRootWithInsertionPoints::childrenChanged): Moved from ShadowRoot.
1009
1010         * html/shadow/InsertionPoint.h:
1011         (WebCore::ShadowRootWithInsertionPoints::create): Added.
1012         (WebCore::ShadowRootWithInsertionPoints::ShadowRootWithInsertionPoints): Added.
1013
1014 2015-09-15  Brent Fulgham  <bfulgham@apple.com>
1015
1016         [Win] Tiled drawing is rendering more times than it should
1017         https://bugs.webkit.org/show_bug.cgi?id=149144
1018         <rdar://problem/22313905>
1019
1020         Reviewed by Simon Fraser.
1021
1022         Provide a more faithful implemenation of the Objective C tiled drawing logic.
1023         (1) Create a new WebTiledBackingLayerWin class that represents a the
1024             container of tiles. This matches the Objective C design.
1025         (2) Move implementation of several methods (e.g., isOpaque) to the internal
1026             class implementation so that the Tile Drawing logic can perform special
1027             handling in these cases.
1028         (3) Remove the duplicated Tiled Drawing logic from PlatformCALayerWinInternal,
1029             since it was just duplicating code in TileController and TileGrid.
1030         (4) Clean up the display callback code to avoid performing incorrect flipping
1031             of the coordinate system.
1032
1033         * PlatformAppleWin.cmake: Add new WebTiledBackingLayerWin file.            
1034         * WebCore.vcxproj/WebCore.vcxproj: Add the new WebTiledBackingLayerWin files.
1035         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1036         * platform/graphics/ca/PlatformCALayer.cpp:
1037         (PlatformCALayer::flipContext): Added convenience method.
1038         (PlatformCALayer::drawRepaintIndicator): Ditto.
1039         * platform/graphics/ca/TileGrid.cpp:
1040         (TileGrid::platformCALayerPaintContents): Flip the context before drawing the repaint
1041         indicator on Windows.
1042         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1043         (PlatformCALayerWin::PlatformCALayerWin): Create a WebTiledBackingLayerWin
1044         object if using tiled drawing.
1045         (PlatformCALayerWin::~PlatformCALayerWin):
1046         (PlatformCALayerWin::isOpaque): Move implementation to internal class.
1047         (PlatformCALayerWin::setOpaque): Ditto.
1048         (PlatformCALayerWin::setBorderWidth): Ditto.
1049         (PlatformCALayerWin::setBorderColor): Ditto.
1050         (PlatformCALayerWin::contentsScale): Ditto.
1051         (PlatformCALayerWin::setContentsScale): Ditto.
1052         (PlatformCALayerWin::cornerRadius): Ditto.
1053         (PlatformCALayerWin::tiledBacking): Ditto.
1054         (PlatformCALayerWin::drawTextAtPoint): New helper method to draw repaint counter
1055         text. Needed to work around bug in CG.
1056         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1057         (PlatformCALayerWinInternal::PlatformCALayerWinInternal): Remove tiling-logic
1058         related member variables.
1059         (PlatformCALayerWinInternal::~PlatformCALayerWinInternal):
1060         (shouldInvertBeforeDrawingContent): Added convenience method.
1061         (shouldInvertBeforeDrawingRepaintCounters): Ditto.
1062         (PlatformCALayerWinInternal::displayCallback):
1063         (PlatformCALayerWinInternal::drawRepaintCounters): Helper method to
1064         share code between the two layer classes.
1065         (PlatformCALayerWinInternal::internalSetNeedsDisplay): use nullptr.
1066         (PlatformCALayerWinInternal::setNeedsDisplay): Ditto.
1067         (PlatformCALayerWinInternal::setNeedsDisplayInRect): Move tiled code
1068         to WebTiledBackingLayerWin and simplify the remaing code.
1069         (PlatformCALayerWinInternal::setSublayers): Remove tile code.
1070         (PlatformCALayerWinInternal::getSublayers): Ditto.
1071         (PlatformCALayerWinInternal::removeAllSublayers): Ditto.
1072         (PlatformCALayerWinInternal::insertSublayer): Ditto.
1073         (PlatformCALayerWinInternal::sublayerCount): Ditto.
1074         (PlatformCALayerWinInternal::indexOfSublayer): Ditto.
1075         (PlatformCALayerWinInternal::sublayerAtIndex): Ditto.
1076         (PlatformCALayerWinInternal::setBounds): Ditto.
1077         (PlatformCALayerWinInternal::setFrame): Ditto.
1078         (PlatformCALayerWinInternal::isOpaque): Ditto.
1079         (PlatformCALayerWinInternal::setOpaque): Ditto.
1080         (PlatformCALayerWinInternal::contentsScale): Ditto.
1081         (PlatformCALayerWinInternal::setContentsScale): Ditto.
1082         (PlatformCALayerWinInternal::setBorderWidth): Ditto.
1083         (PlatformCALayerWinInternal::setBorderColor): Ditto.
1084         (layerTypeIsTiled): Deleted.
1085         (PlatformCALayerWinInternal::constrainedSize): Deleted.
1086         (PlatformCALayerWinInternal::tileDisplayCallback): Deleted.
1087         (PlatformCALayerWinInternal::addTile): Deleted.
1088         (PlatformCALayerWinInternal::removeTile): Deleted.
1089         (PlatformCALayerWinInternal::tileAtIndex): Deleted.
1090         (PlatformCALayerWinInternal::tileCount): Deleted.
1091         (PlatformCALayerWinInternal::updateTiles): Deleted.
1092         (PlatformCALayerWinInternal::drawTile): Deleted.
1093         (PlatformCALayerWinInternal::createTileController): Deleted.
1094         (PlatformCALayerWinInternal::tiledBacking): Deleted.
1095         * platform/graphics/ca/win/PlatformCALayerWinInternal.h:
1096         (WebCore::PlatformCALayerWinInternal::owner):
1097         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: Added.
1098         (WebTiledBackingLayerWin::WebTiledBackingLayerWin):
1099         (WebTiledBackingLayerWin::~WebTiledBackingLayerWin):
1100         (DisplayOnMainThreadContext::DisplayOnMainThreadContext):
1101         (redispatchOnMainQueue):
1102         (WebTiledBackingLayerWin::displayCallback):
1103         (WebTiledBackingLayerWin::setNeedsDisplay):
1104         (WebTiledBackingLayerWin::setNeedsDisplayInRect):
1105         (WebTiledBackingLayerWin::setBounds):
1106         (WebTiledBackingLayerWin::isOpaque):
1107         (WebTiledBackingLayerWin::setOpaque):
1108         (WebTiledBackingLayerWin::contentsScale):
1109         (WebTiledBackingLayerWin::setContentsScale):
1110         (WebTiledBackingLayerWin::setBorderWidth):
1111         (WebTiledBackingLayerWin::setBorderColor):
1112         (WebTiledBackingLayerWin::createTileController):
1113         (WebTiledBackingLayerWin::tiledBacking):
1114         (WebTiledBackingLayerWin::invalidate):
1115         * platform/graphics/ca/win/WebTiledBackingLayerWin.h: Added.
1116
1117 2015-09-14  David Hyatt  <hyatt@apple.com>
1118
1119         [New Block-Inside-Inline Model] Implement margin collapsing across contiguous anonymous inline blocks.
1120         https://bugs.webkit.org/show_bug.cgi?id=149132
1121
1122         Reviewed by Zalan Bujtas.
1123
1124         Added new tests inside fast/block/inside-inlines/
1125
1126         * rendering/InlineFlowBox.cpp:
1127         (WebCore::InlineFlowBox::anonymousInlineBlock):
1128         Change this accessor to be more robust and be willing to both recur (in case we ever do decide intermediate line boxes should exist)
1129         and to type check. This is not currently needed, but I'm just being paranoid and future proof.
1130
1131         (WebCore::InlineFlowBox::addToLine):
1132         Again, for thoroughness, I am making sure to propagate the hasAnonymousInlineBlock() bit through to parents. This is only needed
1133         if we build intermediate line boxes for lines with anonymous inline blocks.
1134
1135         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1136         Anonymous inline blocks receive a layout via layoutBlockChild, in order to make sure that margin collapsing runs. This means
1137         that unlike other line objects, the position of the child has been determined already. Therefore we simply set the position
1138         of the line box that wraps the anonymous inline block to the already-computed position for that block.
1139
1140         Also patch the code that sets lineTop and lineBottom using the root box's dimensions. We don't really care about the root line
1141         box on anonymous inline block lines and just want to set lineTop and lineBottom to fit the anonymous inline block.
1142
1143         * rendering/RenderBlockFlow.cpp:
1144         (WebCore::RenderBlockFlow::collapseMargins):
1145         (WebCore::RenderBlockFlow::collapseMarginsWithChildInfo):
1146         Refactor collapseMargins to call a helper function that can pass in a previous "sibling", and that can handle the child
1147         being null. We do this to perform a margin collapse when anonymous inline blocks run up against regular lines (which is like
1148         collapsing with a sibling block "child").
1149
1150         * rendering/RenderBlockFlow.h:
1151         Tweak the MarginInfo constructor to take a const RenderBlockFlow. Tweak some line layout methods to pass in the LineLayoutState
1152         so that MarginInfo is available during line layout.
1153
1154         * rendering/RenderBlockLineLayout.cpp:
1155         (WebCore::RenderBlockFlow::createLineBoxes):
1156         When we create a new line box, if it is not an anonymous inline block line and our previous line was, simulate a margin
1157         collapse in order to possibly push the line box down or up. Re-use the pagination adjustment code to rewind line layout
1158         and perform it again if pushed below a float.
1159
1160         (WebCore::constructBidiRunsForSegment):
1161         (WebCore::RenderBlockFlow::layoutRunsAndFloats):
1162         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1163         (WebCore::RenderBlockFlow::layoutLineBoxes):
1164         (WebCore::RenderBlockFlow::determineStartPosition):
1165         (WebCore::RenderBlockFlow::matchedEndLine):
1166         (WebCore::RenderBlockFlow::updateRegionForLine):
1167         (WebCore::RenderBlockFlow::marginCollapseLinesFromStart):
1168         Patch line layout to run margin collapsing when anonymous inline blocks are encountered. This involves making sure
1169         margin info and float bottom positions are passed through so that layoutBlockChild can be properly called on
1170         anonymous inline blocks that we encounter.
1171
1172         In addition line layout when it syncs dirty lines has to run margin collapsing on earlier lines in order to make
1173         sure margin info is properly set up at the first dirty line position.
1174
1175         Note that there will be more improvements/changes in this area (dirty line syncing), as the current model is inefficient
1176         when many anonymous inline blocks are scattered throughout a large-scale line box tree.
1177
1178         * rendering/RootInlineBox.cpp:
1179         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
1180         (WebCore::RootInlineBox::ascentAndDescentForBox):
1181         Make sure to rely on the block layout code for the placement of the boxes themselves. Set up the line box code to not have
1182         an effect on ascent/descent.
1183
1184         * rendering/line/BreakingContext.h:
1185         (WebCore::BreakingContext::BreakingContext):
1186         (WebCore::BreakingContext::handleReplaced):
1187         When we encounter an anonymous inline block, lay it out when it is seen. We have to delay the layout, since we have
1188         to be able to perform it mid-line-layout when the containing block's logical height is at the correct value and all previous
1189         lines are placed. Margin info also has to be current.
1190
1191         * rendering/line/LineBreaker.cpp:
1192         * rendering/line/LineBreaker.h:
1193         Patched to pass LineLayoutState through so that the stuff we need to perform block layout is available (margin info and float vars).
1194
1195         * rendering/line/LineLayoutState.h:
1196         Add the block layout margin and float bottom information to the line layout state so that we have it available when performing
1197         layouts and margin collapses on anonymous inline block children.
1198
1199 2015-09-15  Brady Eidson  <beidson@apple.com>
1200
1201         Make the IDBAny::Type enum into an enum class.
1202         https://bugs.webkit.org/show_bug.cgi?id=149169.
1203
1204         Reviewed by Oliver Hunt.
1205
1206         No new tests (Cleanup, no behavior change).
1207
1208         * Modules/indexeddb/IDBAny.h:
1209         * Modules/indexeddb/legacy/LegacyAny.cpp:
1210         (WebCore::LegacyAny::createInvalid):
1211         (WebCore::LegacyAny::createNull):
1212         (WebCore::LegacyAny::LegacyAny):
1213         (WebCore::LegacyAny::domStringList):
1214         (WebCore::LegacyAny::idbCursor):
1215         (WebCore::LegacyAny::idbCursorWithValue):
1216         (WebCore::LegacyAny::idbDatabase):
1217         (WebCore::LegacyAny::idbFactory):
1218         (WebCore::LegacyAny::idbIndex):
1219         (WebCore::LegacyAny::idbObjectStore):
1220         (WebCore::LegacyAny::idbTransaction):
1221         (WebCore::LegacyAny::scriptValue):
1222         (WebCore::LegacyAny::string):
1223         (WebCore::LegacyAny::integer):
1224         (WebCore::LegacyAny::legacyCursor):
1225         (WebCore::LegacyAny::legacyCursorWithValue):
1226         (WebCore::LegacyAny::legacyDatabase):
1227         (WebCore::LegacyAny::legacyFactory):
1228         (WebCore::LegacyAny::legacyIndex):
1229         (WebCore::LegacyAny::legacyObjectStore):
1230         (WebCore::LegacyAny::legacyTransaction):
1231         * Modules/indexeddb/legacy/LegacyCursor.cpp:
1232         (WebCore::LegacyCursor::LegacyCursor):
1233         (WebCore::LegacyCursor::effectiveObjectStore):
1234         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
1235         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp:
1236         (WebCore::LegacyOpenDBRequest::dispatchEvent):
1237         * Modules/indexeddb/legacy/LegacyRequest.cpp:
1238         (WebCore::LegacyRequest::getResultCursor):
1239         (WebCore::effectiveObjectStore):
1240         * bindings/js/JSIDBAnyCustom.cpp:
1241         (WebCore::toJS):
1242         * inspector/InspectorIndexedDBAgent.cpp:
1243         * page/DatabaseProvider.h:
1244
1245 2015-09-15  Brady Eidson  <beidson@apple.com>
1246
1247         Move most IDB object encoding/decoding from WebKit2 to WebCore.
1248         https://bugs.webkit.org/show_bug.cgi?id=149152
1249
1250         Reviewed by Alex Christensen.
1251
1252         No new tests (Cleanup, no behavior change).
1253
1254         * Modules/indexeddb/IDBDatabaseMetadata.h:
1255         (WebCore::IDBDatabaseMetadata::encode):
1256         (WebCore::IDBDatabaseMetadata::decode):
1257         * Modules/indexeddb/IDBIndexMetadata.h:
1258         (WebCore::IDBIndexMetadata::encode):
1259         (WebCore::IDBIndexMetadata::decode):
1260         * Modules/indexeddb/IDBKeyData.h:
1261         (WebCore::IDBKeyData::encode):
1262         (WebCore::IDBKeyData::decode):
1263         * Modules/indexeddb/IDBKeyPath.h:
1264         (WebCore::IDBKeyPath::encode):
1265         (WebCore::IDBKeyPath::decode):
1266         * Modules/indexeddb/IDBKeyRangeData.h:
1267         (WebCore::IDBKeyRangeData::encode):
1268         (WebCore::IDBKeyRangeData::decode):
1269         * Modules/indexeddb/IDBObjectStoreMetadata.h:
1270         (WebCore::IDBObjectStoreMetadata::encode):
1271         (WebCore::IDBObjectStoreMetadata::decode):
1272
1273 2015-09-14  Brady Eidson  <beidson@apple.com>
1274
1275         Make the enum IDBKey::Type into a utility enum class.
1276         https://bugs.webkit.org/show_bug.cgi?id=149149
1277
1278         Reviewed by Alex Christensen.
1279
1280         No new tests (Cleanup, no behavior change).
1281
1282         * Modules/indexeddb/IDBKey.cpp:
1283         (WebCore::IDBKey::isValid):
1284         (WebCore::IDBKey::compare):
1285         * Modules/indexeddb/IDBKey.h:
1286         (WebCore::IDBKey::createNumber):
1287         (WebCore::IDBKey::createDate):
1288         (WebCore::IDBKey::createMultiEntryArray):
1289         (WebCore::IDBKey::createArray):
1290         (WebCore::IDBKey::type):
1291         (WebCore::IDBKey::array):
1292         (WebCore::IDBKey::string):
1293         (WebCore::IDBKey::date):
1294         (WebCore::IDBKey::number):
1295         (WebCore::IDBKey::compareTypes):
1296         (WebCore::IDBKey::IDBKey):
1297         * Modules/indexeddb/IDBKeyData.cpp:
1298         (WebCore::IDBKeyData::IDBKeyData):
1299         (WebCore::IDBKeyData::maybeCreateIDBKey):
1300         (WebCore::IDBKeyData::isolatedCopy):
1301         (WebCore::IDBKeyData::encode):
1302         (WebCore::IDBKeyData::decode):
1303         (WebCore::IDBKeyData::compare):
1304         (WebCore::IDBKeyData::loggingString):
1305         (WebCore::IDBKeyData::setArrayValue):
1306         (WebCore::IDBKeyData::setStringValue):
1307         (WebCore::IDBKeyData::setDateValue):
1308         (WebCore::IDBKeyData::setNumberValue):
1309         * Modules/indexeddb/IDBKeyData.h:
1310         (WebCore::IDBKeyData::IDBKeyData):
1311         (WebCore::IDBKeyData::minimum):
1312         (WebCore::IDBKeyData::maximum):
1313         * Modules/indexeddb/IndexedDB.h:
1314         * bindings/js/IDBBindingUtilities.cpp:
1315         (WebCore::idbKeyToJSValue):
1316         (WebCore::createIDBKeyFromValue):
1317         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
1318         (WebCore::generateIndexKeysForValue):
1319         * inspector/InspectorIndexedDBAgent.cpp:
1320
1321 2015-09-15  Javier Fernandez  <jfernandez@igalia.com>
1322
1323         [CSS Grid Layout] Using {row, column}-axis terms in alignment related logic
1324         https://bugs.webkit.org/show_bug.cgi?id=148942
1325
1326         Reviewed by Sergio Villar Senin.
1327
1328         This patch changes the names of several functions and variables
1329         defined to implement the alignment logic. We want to use from now
1330         on the terms row-axis and column-axis when referring to the
1331         alignment direction the logic is applied to.
1332
1333         No new tests, no new functionality.
1334
1335         * rendering/RenderGrid.cpp:
1336         (WebCore::RenderGrid::columnAxisOffsetForChild):
1337         (WebCore::RenderGrid::rowAxisOffsetForChild):
1338         (WebCore::RenderGrid::findChildLogicalPosition):
1339         * rendering/RenderGrid.h:
1340
1341 2015-09-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1342
1343         Remove all uses of PassRefPtr in WebCore/xml
1344         https://bugs.webkit.org/show_bug.cgi?id=149114
1345
1346         Reviewed by Darin Adler.
1347
1348         * dom/DecodedDataDocumentParser.h:
1349         * dom/DocumentParser.h:
1350         * dom/RawDataDocumentParser.h:
1351         * html/FTPDirectoryDocument.cpp:
1352         (WebCore::FTPDirectoryDocumentParser::append):
1353         * html/parser/HTMLDocumentParser.cpp:
1354         (WebCore::HTMLDocumentParser::append):
1355         * html/parser/HTMLDocumentParser.h:
1356         * html/parser/TextDocumentParser.cpp:
1357         (WebCore::TextDocumentParser::append):
1358         * html/parser/TextDocumentParser.h:
1359         * xml/NativeXPathNSResolver.cpp:
1360         (WebCore::NativeXPathNSResolver::NativeXPathNSResolver):
1361         * xml/NativeXPathNSResolver.h:
1362         (WebCore::NativeXPathNSResolver::create):
1363         * xml/XMLErrors.cpp:
1364         (WebCore::createXHTMLParserErrorHeader):
1365         * xml/XMLHttpRequestProgressEventThrottle.cpp:
1366         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent):
1367         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEvent):
1368         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
1369         * xml/XMLHttpRequestProgressEventThrottle.h:
1370         * xml/XMLSerializer.h:
1371         * xml/XPathEvaluator.cpp:
1372         (WebCore::XPathEvaluator::createExpression):
1373         (WebCore::XPathEvaluator::createNSResolver):
1374         (WebCore::XPathEvaluator::evaluate):
1375         * xml/XPathEvaluator.h:
1376         * xml/XPathNodeSet.h: Fix style errors.
1377         (WebCore::XPath::NodeSet::NodeSet):
1378         (WebCore::XPath::NodeSet::append):
1379         * xml/XPathPath.cpp:
1380         (WebCore::XPath::Filter::evaluate):
1381         (WebCore::XPath::LocationPath::evaluate):
1382         * xml/XPathValue.h: ditto.
1383         (WebCore::XPath::Value::Value):
1384         (WebCore::XPath::Value::Data::create):
1385         (WebCore::XPath::Value::Data::Data):
1386         * xml/XSLTProcessor.cpp:
1387         (WebCore::XSLTProcessor::transformToDocument):
1388         (WebCore::XSLTProcessor::transformToFragment):
1389         * xml/XSLTProcessor.h:
1390         (WebCore::XSLTProcessor::setXSLStyleSheet):
1391         (WebCore::XSLTProcessor::importStylesheet):
1392         * xml/parser/XMLDocumentParser.cpp:
1393         (WebCore::XMLDocumentParser::append):
1394         * xml/parser/XMLDocumentParser.h:
1395
1396 2015-09-14  Dewei Zhu  <dewei_zhu@apple.com>
1397
1398         Polish code for r189579.
1399         https://bugs.webkit.org/show_bug.cgi?id=149131
1400
1401         Reviewed by Chris Dumez.
1402
1403         Use more self-explaining function name "characterSetWithUTF8Fallback" instead of
1404         "characterSetForBindings". Optimize the way to get text encoding.
1405
1406         * dom/Document.cpp:
1407         (WebCore::Document::characterSetWithUTF8Fallback):
1408         (WebCore::Document::encoding): Deleted.
1409         (WebCore::Document::characterSetForBindings): Deleted.
1410         * dom/Document.h:
1411         (WebCore::Document::encoding):
1412         (WebCore::Document::textEncoding):
1413         * dom/Document.idl:
1414         * loader/DocumentWriter.cpp:
1415         (WebCore::DocumentWriter::createDecoderIfNeeded):
1416         * loader/FormSubmission.cpp:
1417         (WebCore::encodingFromAcceptCharset):
1418
1419 2015-09-14  Chris Dumez  <cdumez@apple.com>
1420
1421         Drop non-standard [IsIndex] WebKit IDL extended attribute
1422         https://bugs.webkit.org/show_bug.cgi?id=149122
1423         <rdar://problem/22547139>
1424
1425         Reviewed by Darin Adler.
1426
1427         Drop non-standard [IsIndex] WebKit IDL extended attribute. This attribute
1428         causes us to throw an IndexSizeError if the input value is negative. Web
1429         IDL supports no such thing. Instead Web IDL supports:
1430         1. Default behavior: the input value wraps around if it does not fit.
1431         2. [EnforceRange]: A TypeError is thrown if the input value does not fit [1].
1432         3. [Clamp]: The input value will be clamped if it does not fit [2].
1433
1434         Our bindings generator supports all three. We don't need the non-standard
1435         [IsIndex].
1436
1437         We previously used [IsIndex] in places where we're supposed to wrap around
1438         as per Web IDL. Therefore, we threw for negative values but other browsers
1439         don't. For e.g., CharacterData.substringData(offset, -1) is supposed to
1440         return the substring from offset to the end of the string. It does so in
1441         Firefox and Chrome. However, WebKit was throwing an Exception.
1442
1443         This change impacts the CharacterData and the SVGTextContentElement
1444         API. The compatibility risk is low because we were throwing an exception
1445         for negative values and we now wrap the value around instead, as other
1446         browsers do.
1447
1448         No new tests, already covered by existing tests.
1449
1450         [1] https://heycam.github.io/webidl/#EnforceRange
1451         [2] https://heycam.github.io/webidl/#Clamp
1452
1453         * bindings/scripts/CodeGeneratorJS.pm:
1454         (GenerateParametersCheck): Deleted.
1455         * bindings/scripts/IDLAttributes.txt:
1456         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1457         (WebCore::jsTestEventTargetPrototypeFunctionItem):
1458         * bindings/scripts/test/TestEventTarget.idl:
1459         * dom/CharacterData.cpp:
1460         (WebCore::CharacterData::deleteData):
1461         (WebCore::CharacterData::replaceData):
1462         * dom/CharacterData.idl:
1463         * dom/ClientRectList.idl:
1464         * svg/SVGTextContentElement.cpp:
1465         (WebCore::SVGTextContentElement::getSubStringLength):
1466         (WebCore::SVGTextContentElement::selectSubString):
1467         * svg/SVGTextContentElement.idl:
1468
1469 2015-09-14  Chris Dumez  <cdumez@apple.com>
1470
1471         Document.createNodeIterator(null) / Document.createTreeWalker(null) should throw a TypeError
1472         https://bugs.webkit.org/show_bug.cgi?id=149126
1473         <rdar://problem/22564891>
1474
1475         Reviewed by Ryosuke Niwa.
1476
1477         Document.createNodeIterator(null) / Document.createTreeWalker(null)
1478         should throw a TypeError:
1479         https://dom.spec.whatwg.org/#interface-document
1480
1481         This is because the parameter is not nullable and Web IDL says we
1482         should throw a TypeError in this case.
1483
1484         Firefox and Chrome throw an exception in this case. This patch
1485         aligns our behavior with the specification and other major browsers.
1486
1487         No new tests, already covered by existing W3C test.
1488
1489         * dom/Document.cpp:
1490         (WebCore::Document::createNodeIterator):
1491         (WebCore::Document::createTreeWalker):
1492         * dom/Document.h:
1493         * dom/Document.idl:
1494         * dom/NodeIterator.cpp:
1495         (WebCore::NodeIterator::NodeIterator):
1496         * dom/NodeIterator.h:
1497         (WebCore::NodeIterator::create):
1498         * dom/Traversal.cpp:
1499         (WebCore::NodeIteratorBase::NodeIteratorBase):
1500         * dom/Traversal.h:
1501         * dom/TreeWalker.cpp:
1502         (WebCore::TreeWalker::TreeWalker):
1503         * dom/TreeWalker.h:
1504         (WebCore::TreeWalker::create):
1505
1506 2015-09-14  Alex Christensen  <achristensen@webkit.org>
1507
1508         Fix Windows clean build after r189746
1509
1510         * WebCore.vcxproj/copyForwardingHeaders.cmd:
1511         Copy headers from new legacy directory.
1512
1513 2015-09-14  Chris Dumez  <cdumez@apple.com>
1514
1515         window.HTMLDetailsElement should exist
1516         https://bugs.webkit.org/show_bug.cgi?id=149139
1517
1518         Reviewed by Ryosuke Niwa.
1519
1520         window.HTMLDetailsElement should exist:
1521         https://html.spec.whatwg.org/multipage/forms.html#the-details-element
1522
1523         Drop the [NoInterfaceObject] IDL extended attribute in WebKit to
1524         address the problem.
1525
1526         No new tests, already covered by existing tests.
1527
1528         * html/HTMLDetailsElement.idl:
1529
1530 2015-09-14  Alex Christensen  <achristensen@webkit.org>
1531
1532         Fix AppleWin CMake build
1533         https://bugs.webkit.org/show_bug.cgi?id=149137
1534
1535         Reviewed by Brent Fulgham.
1536
1537         * PlatformAppleWin.cmake:
1538         Spell Inband correctly.
1539         * css/makegrammar.pl:
1540         Add quotes so bison can be in a directory with spaces in it.        
1541
1542 2015-09-14  Alex Christensen  <achristensen@webkit.org>
1543
1544         [Win] Unreviewed build fix after r189746
1545
1546         * WebCore.vcxproj/WebCoreIncludeCommon.props:
1547         Include new legacy directory.
1548
1549 2015-09-14  Alex Christensen  <achristensen@webkit.org>
1550
1551         Progress towards CMake on Mac.
1552         https://bugs.webkit.org/show_bug.cgi?id=149123
1553
1554         Reviewed by Chris Dumez.
1555
1556         * CMakeLists.txt:
1557         Added some more files.
1558         * PlatformMac.cmake:
1559         Added more files and listed the strange ObjC bindings.
1560         * contentextensions/DFACombiner.cpp:
1561         * contentextensions/DFACombiner.h:
1562         Added preprocessor protection.
1563         * platform/FileSystem.h:
1564         Include utility.  It's needed to compile the different configurations.
1565         * platform/ScrollAnimator.cpp:
1566         ScrollAnimator is an abstract class on Mac.  Don't compile it.
1567         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1568         FontAntialiasingStateSaver.h is only used on iOS.
1569         * rendering/RenderThemeMac.mm:
1570         config.h needs to be outside the #if !PLATFORM(IOS) to compile correctly without precompiled headers.
1571
1572 2015-09-14  Brady Eidson  <beidson@apple.com>
1573
1574         Rename current concrete IDB implementation to "Legacy".
1575         https://bugs.webkit.org/show_bug.cgi?id=149118
1576
1577         Reviewed by Alex Christensen.
1578
1579         No new tests (No change in behavior).
1580
1581         This patch makes IDL bindings abstract.
1582         It then renames the current concrete implementations of the bindings from "IDB" to "Legacy".
1583         Finally it moves those files and their support classes to a "legacy" subfolder.
1584
1585         * CMakeLists.txt:
1586         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
1587         * Modules/indexeddb/IDBAny.cpp:
1588         * Modules/indexeddb/IDBAny.h:
1589         * Modules/indexeddb/IDBCursor.cpp:
1590         * Modules/indexeddb/IDBCursor.h:
1591         * Modules/indexeddb/IDBCursor.idl:
1592         * Modules/indexeddb/IDBCursorWithValue.cpp:
1593         * Modules/indexeddb/IDBCursorWithValue.h:
1594         * Modules/indexeddb/IDBCursorWithValue.idl:
1595         * Modules/indexeddb/IDBDatabase.cpp:
1596         * Modules/indexeddb/IDBDatabase.h:
1597         * Modules/indexeddb/IDBDatabase.idl:
1598         * Modules/indexeddb/IDBFactory.cpp:
1599         * Modules/indexeddb/IDBFactory.h:
1600         * Modules/indexeddb/IDBFactory.idl:
1601         * Modules/indexeddb/IDBIndex.cpp:
1602         * Modules/indexeddb/IDBIndex.h:
1603         * Modules/indexeddb/IDBIndex.idl:
1604         * Modules/indexeddb/IDBObjectStore.cpp:
1605         * Modules/indexeddb/IDBObjectStore.h:
1606         * Modules/indexeddb/IDBObjectStore.idl:
1607         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1608         * Modules/indexeddb/IDBOpenDBRequest.h:
1609         * Modules/indexeddb/IDBOpenDBRequest.idl:
1610         * Modules/indexeddb/IDBRequest.cpp:
1611         * Modules/indexeddb/IDBRequest.h:
1612         * Modules/indexeddb/IDBRequest.idl:
1613         * Modules/indexeddb/IDBTransaction.cpp:
1614         * Modules/indexeddb/IDBTransaction.h:
1615         * Modules/indexeddb/IDBTransaction.idl:
1616         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
1617         * Modules/indexeddb/IDBVersionChangeEvent.h:
1618         * Modules/indexeddb/legacy/IDBCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCallbacks.h.
1619         * Modules/indexeddb/legacy/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp.
1620         * Modules/indexeddb/legacy/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.h.
1621         * Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp.
1622         * Modules/indexeddb/legacy/IDBCursorBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h.
1623         * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp.
1624         * Modules/indexeddb/legacy/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h.
1625         * Modules/indexeddb/legacy/IDBDatabaseCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h.
1626         * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp.
1627         * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h.
1628         * Modules/indexeddb/legacy/IDBFactoryBackendInterface.h: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h.
1629         * Modules/indexeddb/legacy/IDBPendingDeleteCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h.
1630         * Modules/indexeddb/legacy/IDBPendingOpenCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h.
1631         * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp.
1632         * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h.
1633         * Modules/indexeddb/legacy/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp.
1634         * Modules/indexeddb/legacy/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h.
1635         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp.
1636         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h.
1637         * Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp.
1638         * Modules/indexeddb/legacy/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h.
1639         * Modules/indexeddb/legacy/LegacyAny.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBAny.cpp.
1640         * Modules/indexeddb/legacy/LegacyAny.h: Added.
1641         * Modules/indexeddb/legacy/LegacyCursor.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.cpp.
1642         * Modules/indexeddb/legacy/LegacyCursor.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.h.
1643         * Modules/indexeddb/legacy/LegacyCursorWithValue.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp.
1644         * Modules/indexeddb/legacy/LegacyCursorWithValue.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h.
1645         * Modules/indexeddb/legacy/LegacyDatabase.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.cpp.
1646         * Modules/indexeddb/legacy/LegacyDatabase.h: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.h.
1647         * Modules/indexeddb/legacy/LegacyFactory.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.cpp.
1648         * Modules/indexeddb/legacy/LegacyFactory.h: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.h.
1649         * Modules/indexeddb/legacy/LegacyIndex.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBIndex.cpp.
1650         * Modules/indexeddb/legacy/LegacyIndex.h: Added.
1651         * Modules/indexeddb/legacy/LegacyObjectStore.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp.
1652         * Modules/indexeddb/legacy/LegacyObjectStore.h: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.h.
1653         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp.
1654         * Modules/indexeddb/legacy/LegacyOpenDBRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h.
1655         * Modules/indexeddb/legacy/LegacyRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.cpp.
1656         * Modules/indexeddb/legacy/LegacyRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.h.
1657         * Modules/indexeddb/legacy/LegacyTransaction.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.cpp.
1658         * Modules/indexeddb/legacy/LegacyTransaction.h: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.h.
1659         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp.
1660         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h.
1661         * WebCore.xcodeproj/project.pbxproj:
1662         * WebCore.vcxproj/WebCore.vcxproj:
1663
1664 2015-09-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1665
1666         [EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
1667         https://bugs.webkit.org/show_bug.cgi?id=149110
1668
1669         Reviewed by Csaba Osztrogon√°c.
1670
1671         It is not good implementation we support both create() factory function and public constructor.
1672         In EvasGLContext and EvasGLSurface cases, those have supported both. However create() factory is only
1673         used by EwkView. Thus let's remove the create() function, then EwkView creates EvasGLContext using
1674         std::make_unique<> directly.
1675
1676         * platform/graphics/efl/EvasGLContext.h:
1677         (WebCore::EvasGLContext::create): Deleted.
1678         * platform/graphics/efl/EvasGLSurface.h:
1679         (WebCore::EvasGLSurface::create): Deleted.
1680
1681 2015-09-09  Sergio Villar Senin  <svillar@igalia.com>
1682
1683         min-width/height should default to auto for grid items
1684         https://bugs.webkit.org/show_bug.cgi?id=146021
1685
1686         Reviewed by Darin Adler.
1687
1688         Based on Blink's r194408, r194863 and r194887 by <rego@igalia.com>.
1689
1690         From the spec (http://dev.w3.org/csswg/css-grid/#grid-items):
1691         "The auto value of min-width and min-height behaves on grid
1692         items in the relevant axis analogously to its behavior on flex
1693         items in the main axis."
1694
1695         From now on the default value for min-width and min-height for
1696         grid items is auto, meaning that in general, grid items won't
1697         shrink bellow their content.
1698
1699         The change is not exactly the same as the one in Blink because
1700         this one takes into account vertical writting modes, something
1701         that was not well handled in the original one.
1702
1703         Tests: fast/css-grid-layout/min-width-height-auto-overflow.html
1704                fast/css-grid-layout/min-width-height-auto.html
1705
1706         * rendering/RenderBox.cpp:
1707         (WebCore::RenderBox::computeLogicalWidthInRegion):
1708         (WebCore::RenderBox::computeLogicalHeight):
1709
1710 2015-09-14  Manuel Rego Casasnovas  <rego@igalia.com>
1711
1712         [css-grid] Percentage columns should remove scrollbar's width
1713         https://bugs.webkit.org/show_bug.cgi?id=149116
1714
1715         Reviewed by Sergio Villar Senin.
1716
1717         Currently the calculation of percentage columns was not subtracting the
1718         scrollbar's size.
1719         Fixed RenderGrid::computeUsedBreadthOfSpecifiedLength()
1720         to avoid this problem.
1721
1722         Test: fast/css-grid-layout/grid-percent-track-scrollbar.html
1723
1724         * rendering/RenderGrid.cpp:
1725         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
1726
1727 2015-09-13  Chris Dumez  <cdumez@apple.com>
1728
1729         Improve Node pre-insertion validation when the parent is a Document
1730         https://bugs.webkit.org/show_bug.cgi?id=149109
1731         <rdar://problem/22560436>
1732
1733         Reviewed by Ryosuke Niwa.
1734
1735         Improve Node pre-insertion validation when the parent is a Document to
1736         match the specification:
1737         https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
1738         https://dom.spec.whatwg.org/#concept-node-replace
1739
1740         This affects the following API: Node.insertBefore(), Node.appendChild(),
1741         Node.replaceChild().
1742
1743         WebKit current fails to do the following checks whenever the parent is a
1744         Document from pre-insertion validation:
1745         1. If the inserted Node is a DocumentFragment, we should make sure it
1746           contains only one Element.
1747         -> This is because a Document can have only one child that is an
1748            Element [1].
1749         2.a. If an Element is inserted, we should make sure it is not inserted
1750              before a DocumentType.
1751         2.b. If a DocumentType is inserted, we should make sure it is not
1752              inserted after an Element.
1753         -> This is because the DocType must come before the optional Element
1754            child [1].
1755
1756         Firefox and Chrome already match the specification here. This patch
1757         aligns WebKit's behavior with those browsers and the specification.
1758
1759         [1] https://dom.spec.whatwg.org/#node-trees
1760
1761         No new tests, already covered by existing W3C tests.
1762
1763         * dom/ContainerNode.cpp:
1764         (WebCore::checkAcceptChild):
1765         (WebCore::checkAddChild):
1766         (WebCore::checkReplaceChild):
1767         (WebCore::ContainerNode::insertBefore):
1768         (WebCore::ContainerNode::appendChild):
1769         (WebCore::containsConsideringHostElements): Deleted.
1770         (WebCore::checkAcceptChildGuaranteedNodeTypes): Deleted.
1771         * dom/Document.cpp:
1772         (WebCore::Document::canAcceptChild):
1773         (WebCore::Document::cloneNodeInternal): Deleted.
1774         * dom/Document.h:
1775
1776 2015-09-13  Chris Dumez  <cdumez@apple.com>
1777
1778         Document.adoptNode() should be able to explicitly adopt a DocumentType node
1779         https://bugs.webkit.org/show_bug.cgi?id=149097
1780         <rdar://problem/22549345>
1781
1782         Reviewed by Ryosuke Niwa.
1783
1784         Document.adoptNode() should be able to explicitly adopt a DocumentType
1785         node as per the latest DOM specification:
1786         https://dom.spec.whatwg.org/#dom-document-adoptnode
1787
1788         Chrome and Firefox match the specidicaiton but WebKit was throwing a
1789         NotSupportedError.
1790
1791         No new tests, already covered by existing test.
1792
1793         * dom/Document.cpp:
1794         (WebCore::Document::adoptNode): Deleted.
1795
1796 2015-09-13  Chris Dumez  <cdumez@apple.com>
1797
1798         Document.title does not behave according to specification
1799         https://bugs.webkit.org/show_bug.cgi?id=149098
1800
1801         Reviewed by Ryosuke Niwa.
1802
1803         Update Document.title to behave according to the latest DOM specification:
1804         https://html.spec.whatwg.org/multipage/dom.html#document.title
1805
1806         In particular, the following Web-Exposed changes were made:
1807         1. The title Element should be the first title element in the document
1808            (in tree order) [1]. Previously, WebKit would use the first title
1809            Element *added* to the Document. Document.title returns the text
1810            content of the title Element so this change is web-exposed.
1811         2. If the title Element is replaced after the title has been set by the
1812            JS (via the document.title setter), we should update the value
1813            returned by the document.title getter. Previously, WebKit would set
1814            a flag if the title was explicitly set by JS via document.title
1815            setter and later title element changes would not override the title
1816            set by the JS. This behavior isn't specified and does not match the
1817            behavior of other browsers.
1818
1819         The new behavior is also consistent with the behavior of Firefox and
1820         Chrome.
1821
1822         Some refactoring was made for the sake of clarity now that our
1823         implementation has changed. See details below.
1824
1825         [1] https://html.spec.whatwg.org/multipage/dom.html#the-title-element-2
1826
1827         No new tests, already covered by existing tests.
1828
1829         * dom/Document.cpp:
1830         (WebCore::Document::updateTitleFromTitleElement):
1831         New convenience method that calls updateTitle() with the text of the
1832         document's current title Element. If there is no title Element, it
1833         clears the title.
1834
1835         (WebCore::Document::updateTitleElement):
1836         Method which updates the Document's title Element whenever a title
1837         Element is added or removed from the Document. Once the title Element
1838         is updated, it takes care of calling updateTitleFromTitleElement() to
1839         update the Document's title.
1840
1841         (WebCore::Document::titleElementAdded):
1842         (WebCore::Document::titleElementRemoved):
1843         (WebCore::Document::titleElementTextChanged):
1844         New Document public API called by HTMLTitleElement / SVGTitleElement
1845         whenever a title Element is added / removed from the Document or
1846         whenever the title element's text has changed. These methods will
1847         take care of calling updateTitleElement() / updateTitleFromTitleElement()
1848         as necessary.
1849         Previously, we would only have 2 methods:
1850         - setTitleElement() which would be called whenever a title Element was
1851           added to the document or when its text had changed. The name was
1852           confusing because it would not necessarily set the document's title
1853           Element and it would be used both for title element update and a
1854           simple title update. This method has been split into 2:
1855           titleElementAdded() and titleElementTextChanged().
1856         - removeTitle() which would be called whenever a title Element was
1857           removed. The naming was confusing because it would not necessarily
1858           remove the Document's title Element. This is now called
1859           titleElementRemoved().
1860
1861         * html/HTMLTitleElement.cpp:
1862         (WebCore::HTMLTitleElement::insertedInto):
1863         Call the new titleElementAdded() instead of setTitleElement().
1864
1865         (WebCore::HTMLTitleElement::removedFrom):
1866         Call the new titleElementRemoved() instead of removeTitle().
1867
1868         (WebCore::HTMLTitleElement::childrenChanged):
1869         Call the new titleElementTextChanged() instead of
1870         setTitleElement() / removeTitle() as we don't really want
1871         to remove or add a title Element. We merely want to notify
1872         the document that the title element text has changed in
1873         case it is the current title Element of the Document.
1874
1875         (WebCore::HTMLTitleElement::computedTextWithDirection):
1876         Rename textWithDirection() to computedTextWithDirection() to
1877         make it clear it is not a simple getter and make it private
1878         as it is only used to set the m_title member which caches the
1879         computed text.
1880
1881         * html/HTMLTitleElement.h:
1882         Add new textWithDirection() getter which returns m_title. This
1883         is needed so that Document can query the title of the Element.
1884         Previously, HTMLTitleElement would pass directly m_title to
1885         the Document when calling Document::setTitleElement().
1886
1887         * svg/SVGTitleElement.cpp:
1888         (WebCore::SVGTitleElement::insertedInto):
1889         Call the new titleElementAdded() instead of setTitleElement().
1890
1891         (WebCore::SVGTitleElement::removedFrom):
1892         Call the new titleElementRemoved() instead of removeTitle().
1893
1894         (WebCore::SVGTitleElement::childrenChanged):
1895         Call the new titleElementTextChanged() instead of
1896         setTitleElement().
1897
1898 2015-09-13  Chris Dumez  <cdumez@apple.com>
1899
1900         document.lastModified should use the user's local time zone
1901         https://bugs.webkit.org/show_bug.cgi?id=149092
1902         <rdar://problem/22567705>
1903
1904         Reviewed by Ryosuke Niwa.
1905
1906         document.lastModified should use the user's local time zone:
1907         https://html.spec.whatwg.org/multipage/dom.html#dom-document-lastmodified
1908
1909         Chrome and Firefox comply with the specification but WebKit was using
1910         UTC. This patch aligns WebKit's behavior with the specification and
1911         other browsers.
1912
1913         No new tests, already covered by existing tests.
1914
1915         * dom/Document.cpp:
1916         (WebCore::Document::lastModified):
1917         (WebCore::Document::setCookieURL): Deleted.
1918
1919 2015-09-13  Chris Dumez  <cdumez@apple.com>
1920
1921         Node.baseURI should not return null for detached nodes
1922         https://bugs.webkit.org/show_bug.cgi?id=149104
1923         <rdar://problem/22559535>
1924
1925         Reviewed by Sam Weinig.
1926
1927         Node.baseURI should not return null for detached nodes. It should return
1928         the node document's base URL. The node document is set when the node is
1929         created so it is valid even if the node is detached [1]:
1930         https://dom.spec.whatwg.org/#dom-node-baseuri
1931
1932         WebKit was traversing the ancestors to find the base URL, which only
1933         works if the node is attached. Also, WebKit was taking into account
1934         the xml:base attribute when computing the baseURI.
1935
1936         Both Chrome and Firefox already dropped support for xml:base:
1937         https://code.google.com/p/chromium/issues/detail?id=341854
1938         https://bugzilla.mozilla.org/show_bug.cgi?id=903372
1939
1940         Firefox complies with the specification. Chrome's baseURI still only
1941         works for attached Nodes as their implementation still traverses the
1942         DOM tree, despite dropping support for xml:base.
1943
1944         This patch drops support xml:base when computing Node.baseURI, as
1945         Firefox, Chrome and the latest DOM specification do. It also makes
1946         Node.baseURI work for detached Nodes by returning the base URL of the
1947         node Document. This means we no longer have to traverse the Node's
1948         ancestors in the DOM tree. This is consistent with the behavior of
1949         Firefox and the latest DOM specification.
1950
1951         This patch does not drop the SVGElement.xmlbase attribute yet. However,
1952         we should probably consider making this change as well given that:
1953         - The SVG2 specification dropped it
1954         - Chrome dropped it.
1955         - It no longers impacts Node.baseURI
1956
1957         [1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=20976
1958
1959         No new tests, already covered by existing test.
1960
1961         * dom/Document.cpp:
1962         (WebCore::Document::setContent): Deleted.
1963         * dom/Document.h:
1964         (WebCore::Document::inputCursor): Deleted.
1965         * dom/DocumentType.cpp:
1966         (WebCore::DocumentType::nodeName): Deleted.
1967         * dom/DocumentType.h:
1968         * dom/Element.cpp:
1969         (WebCore::Element::imageSourceURL): Deleted.
1970         (WebCore::Element::rendererIsNeeded): Deleted.
1971         (WebCore::Element::createElementRenderer): Deleted.
1972         (WebCore::Element::insertedInto): Deleted.
1973         * dom/Element.h:
1974         * dom/Node.cpp:
1975         (WebCore::Node::baseURI):
1976         * dom/Node.h:
1977         * svg/SVGElement.idl:
1978
1979 2015-09-13  Chris Dumez  <cdumez@apple.com>
1980
1981         CharacterData API parameters should not be optional
1982         https://bugs.webkit.org/show_bug.cgi?id=149101
1983         <rdar://problem/22546954>
1984
1985         Reviewed by Sam Weinig.
1986
1987         CharacterData API parameters should not be optional as per the DOM
1988         specification:
1989         https://dom.spec.whatwg.org/#characterdata
1990
1991         The parameters are also mandatory in Firefox and Chrome. However,
1992         those parameters are optional in WebKit. When DOMString parameters
1993         were omitted, we would use the "undefined" string instead. When
1994         unsigned long parameters were omitted, we would use 0 instead.
1995         This patch aligns our behavior with the specification and other
1996         major browsers.
1997
1998         No new tests, already covered by existing tests.
1999
2000         * dom/CharacterData.cpp:
2001         (WebCore::CharacterData::appendData):
2002         * dom/CharacterData.h:
2003         * dom/CharacterData.idl:
2004         * dom/Element.cpp:
2005         (WebCore::Element::mergeWithNextTextNode):
2006         * dom/Node.cpp:
2007         (WebCore::Node::normalize):
2008         * xml/parser/XMLDocumentParser.cpp:
2009         (WebCore::XMLDocumentParser::exitText):
2010
2011 2015-09-13  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2012
2013         Remove all uses of PassRefPtr in crypto, storage, and history
2014         https://bugs.webkit.org/show_bug.cgi?id=149091
2015
2016         Reviewed by Andreas Kling.
2017
2018         * crypto/CryptoKeyPair.cpp:
2019         (WebCore::CryptoKeyPair::CryptoKeyPair):
2020         * crypto/CryptoKeyPair.h:
2021         (WebCore::CryptoKeyPair::create):
2022         * crypto/SubtleCrypto.h:
2023         (WebCore::SubtleCrypto::create):
2024         * crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
2025         (WebCore::CryptoKeyRSA::create):
2026         * crypto/keys/CryptoKeyAES.cpp:
2027         (WebCore::CryptoKeyAES::generate):
2028         * crypto/keys/CryptoKeyAES.h:
2029         * crypto/keys/CryptoKeyHMAC.cpp:
2030         (WebCore::CryptoKeyHMAC::generate):
2031         * crypto/keys/CryptoKeyHMAC.h:
2032         * crypto/keys/CryptoKeyRSA.h:
2033         * crypto/mac/CryptoKeyRSAMac.cpp:
2034         (WebCore::CryptoKeyRSA::create):
2035         * history/BackForwardController.cpp:
2036         (WebCore::BackForwardController::BackForwardController):
2037         * history/BackForwardController.h:
2038         * history/HistoryItem.cpp:
2039         (WebCore::HistoryItem::setStateObject):
2040         (WebCore::HistoryItem::setFormData):
2041         * history/HistoryItem.h:
2042         (WebCore::HistoryItem::stateObject):
2043         * loader/EmptyClients.cpp:
2044         * page/Page.cpp:
2045         (WebCore::Page::Page):
2046         * storage/Storage.cpp:
2047         (WebCore::Storage::create):
2048         (WebCore::Storage::Storage):
2049         * storage/Storage.h:
2050         * storage/StorageArea.h:
2051         * storage/StorageMap.cpp:
2052         (WebCore::StorageMap::copy):
2053         (WebCore::StorageMap::setItem):
2054         (WebCore::StorageMap::setItemIgnoringQuota):
2055         (WebCore::StorageMap::removeItem):
2056         * storage/StorageMap.h:
2057         * storage/StorageNamespace.h:
2058
2059 2015-09-12  Chris Dumez  <cdumez@apple.com>
2060
2061         window.EventTarget should exist
2062         https://bugs.webkit.org/show_bug.cgi?id=149085
2063         <rdar://problem/22546774>
2064
2065         Reviewed by Sam Weinig.
2066
2067         Drop [NoInterfaceObject] for the EventTarget interface to match Chrome,
2068         Firefox and the specification:
2069         https://dom.spec.whatwg.org/#interface-eventtarget
2070
2071         No new tests, already covered by existing tests.
2072
2073         * dom/EventTarget.idl:
2074
2075 2015-09-12  Brian Burg  <bburg@apple.com>
2076
2077         Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
2078         https://bugs.webkit.org/show_bug.cgi?id=149071
2079
2080         Reviewed by Joseph Pecoraro.
2081
2082         Be consistent about prefixing pages, inspector controllers, and window controllers
2083         with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
2084         in the frontend connection code, which are tracked by https://webkit.org/b/149006.
2085
2086         No new tests, no behavior change.
2087
2088         * WebCore.order:
2089         * inspector/InspectorClient.h:
2090         * inspector/InspectorController.cpp:
2091         (WebCore::InspectorController::inspectedPageDestroyed):
2092         (WebCore::InspectorController::show):
2093         (WebCore::InspectorController::close):
2094         * inspector/InspectorFrontendClientLocal.cpp:
2095         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
2096         (WebCore::InspectorFrontendClientLocal::~InspectorFrontendClientLocal):
2097         (WebCore::InspectorFrontendClientLocal::canAttachWindow):
2098         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
2099         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
2100         (WebCore::InspectorFrontendClientLocal::openInNewTab):
2101         (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
2102         (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
2103         (WebCore::InspectorFrontendClientLocal::isUnderTest):
2104         * inspector/InspectorFrontendClientLocal.h:
2105         * inspector/InspectorOverlay.cpp:
2106         (WebCore::InspectorOverlay::freePage):
2107         * loader/EmptyClients.h:
2108
2109 2015-09-12  Chris Dumez  <cdumez@apple.com>
2110
2111         ChildNode.replaceWith() without argument should replace the node with an empty DocumentFragment
2112         https://bugs.webkit.org/show_bug.cgi?id=149073
2113         <rdar://problem/22547801>
2114
2115         Reviewed by Ryosuke Niwa.
2116
2117         ChildNode.replaceWith() without argument should replace the node with 
2118         an empty DocumentFragment, as per the specification:
2119         https://dom.spec.whatwg.org/#dom-childnode-replacewith
2120         https://dom.spec.whatwg.org/#converting-nodes-into-a-node
2121
2122         Previously, WebKit did not do anything in this case. This patch fixes
2123         it.
2124
2125         No new tests, already covered by existing test.
2126
2127         * dom/Node.cpp:
2128         (WebCore::Node::replaceWith):
2129
2130 2015-09-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2131
2132         Remove all uses of PassRefPtr in WebCore/plugins
2133         https://bugs.webkit.org/show_bug.cgi?id=149055
2134
2135         Reviewed by Darin Adler.
2136
2137         * plugins/DOMMimeType.cpp:
2138         (WebCore::DOMMimeType::DOMMimeType):
2139         (WebCore::DOMMimeType::enabledPlugin):
2140         * plugins/DOMMimeType.h:
2141         (WebCore::DOMMimeType::create):
2142         * plugins/DOMMimeTypeArray.cpp:
2143         (WebCore::DOMMimeTypeArray::item):
2144         * plugins/DOMMimeTypeArray.h:
2145         * plugins/DOMPlugin.cpp:
2146         (WebCore::DOMPlugin::item):
2147         * plugins/DOMPlugin.h:
2148         * plugins/DOMPluginArray.cpp:
2149         (WebCore::DOMPluginArray::item):
2150         * plugins/DOMPluginArray.h:
2151         * plugins/PluginViewBase.h:
2152         (WebCore::PluginViewBase::bindingInstance):
2153
2154 2015-09-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2155
2156         Remove all uses of PassRefPtr in WebCore/accessibility and WebCore/fileapi
2157         https://bugs.webkit.org/show_bug.cgi?id=149059
2158
2159         Reviewed by Darin Adler.
2160
2161         * accessibility/AXObjectCache.cpp:
2162         * accessibility/AccessibilityObject.cpp:
2163         (WebCore::rangeClosestToRange):
2164         (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
2165         (WebCore::AccessibilityObject::selectionRange):
2166         (WebCore::AccessibilityObject::selectText):
2167         * accessibility/AccessibilityObject.h:
2168         * accessibility/ios/AXObjectCacheIOS.mm:
2169         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2170         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
2171         (-[WebAccessibilityObjectWrapper textMarkerForPosition:]):
2172         * accessibility/mac/AXObjectCacheMac.mm:
2173         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2174         (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
2175         * fileapi/FileList.h:
2176         (WebCore::FileList::append):
2177         * fileapi/WebKitBlobBuilder.cpp:
2178         (WebCore::BlobBuilder::append):
2179         * fileapi/WebKitBlobBuilder.h:
2180
2181 2015-09-11  Said Abou-Hallawa  <sabouhallawa@apple.com>
2182
2183         SVGColor custom text format is different from the CSS color custom text format
2184         https://bugs.webkit.org/show_bug.cgi?id=148879
2185
2186         Reviewed by Daniel Bates.
2187
2188         Implement the serialization of a CSS color value as it is described in
2189         <https://drafts.csswg.org/cssom/#serializing-css-values>. Add the new
2190         function Color::cssText() which is refactored from the existing function
2191         Color::serialized(). Use the new function for serializing the SVGColor
2192         always and also for Color but only when the alpha component is not 1.
2193
2194         Test: svg/css/computed-style-rgb-color.html
2195
2196         * css/CSSPrimitiveValue.cpp:
2197         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Move the code
2198         for serializing the color from this function to Color::cssText().
2199         
2200         * platform/graphics/Color.cpp:
2201         (WebCore::Color::serialized): Call Color::cssText() if the alpha component
2202         is not 1 and delete the repeated code. 
2203         
2204         (WebCore::Color::cssText):
2205         * platform/graphics/Color.h: Add the new function to the header file.
2206         
2207         * svg/SVGColor.cpp:
2208         (WebCore::SVGColor::customCSSText): Call Color::cssText() always instead
2209         of calling Color::serialized() for serializing the SVGColor.
2210
2211 2015-09-11  Nan Wang  <n_wang@apple.com>
2212
2213         AX: ARIA 1.1 @aria-current
2214         https://bugs.webkit.org/show_bug.cgi?id=146012
2215
2216         Reviewed by Chris Fleizach.
2217
2218         Tests: accessibility/aria-current.html
2219                inspector/dom/getAccessibilityPropertiesForNode_ariaCurrent.html
2220
2221         Added support for ARIA 1.1 aria-current.
2222
2223         * accessibility/AccessibilityObject.cpp:
2224         (WebCore::AccessibilityObject::invalidStatus):
2225         (WebCore::AccessibilityObject::ariaCurrentState):
2226         (WebCore::AccessibilityObject::hasTagName):
2227         * accessibility/AccessibilityObject.h:
2228         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2229         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2230         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2231         * html/HTMLAttributeNames.in:
2232         * inspector/InspectorDOMAgent.cpp:
2233         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2234
2235 2015-09-11  Chris Dumez  <cdumez@apple.com>
2236
2237         DOMTokenList update steps for classList don't follow the spec
2238         https://bugs.webkit.org/show_bug.cgi?id=148589
2239         <rdar://problem/22547443>
2240
2241         Reviewed by Ryosuke Niwa and Darin Adler.
2242
2243         Update our DOMTokenList implementation to behave according to
2244         the latest DOM specification:
2245         https://dom.spec.whatwg.org/#interface-domtokenlist
2246
2247         In particular, the following changes were made:
2248         - The stringifier now returns the result of the ordered set serializer
2249           for tokens. This means that we drop duplicate spaces and extra spaces
2250           [1][2][3].
2251         - DOMSettableTokenList.value now returns the result of the ordered set
2252           serializer for tokens [4] as well.
2253         - When the DOMTokenList's tokens are updated and there is an associated
2254           Element attribute, we set the attribute value to be the the ordered
2255           set serializer for tokens. This is according to the DOMTokenList
2256           update steps in the specification [6]. Chrome does not match the
2257           specification either.
2258
2259         Edge browser behaves according to the specification already. Firefox was
2260         implementing this via [7] but no recent progress. This makes the JS API
2261         nicer to use and interest was shown by jQuery Team.
2262
2263         The following refactoring was done:
2264         - Merge ClassList / RelList into a single AttributeDOMTokenList class
2265           as their code is mostly duplicated and the only thing that changes
2266           is which attribute is associated (class vs rel). AttributeDOMTokenList
2267           now keeps the attribute name as a member so it could be used for any
2268           attribute. AttributeDOMTokenList overrides DOMTokenList's
2269           updateAfterTokenChange() to do update the attribute's value as per
2270           [6].
2271         - We no longer use a SpaceSplitString for the internal representation
2272           as we need to sanitize the tokens (drop duplicates and extra spaces).
2273           DOMTokenList now has an internal Vector<AtomicString> containing the
2274           tokens that is constructed from the algorithm in [2]. As a result,
2275           most of the logic is now in DOMTokenList instead of its subclasses
2276           which means that most methods are no longer virtual. We only have
2277           one virtual function named updateAfterTokenChange() to do the update
2278           steps as AttributeDOMTokenList needs to update the associated
2279           attribute.
2280
2281         This change does not seem to impact Dromaeo.
2282
2283         [1] https://dom.spec.whatwg.org/#concept-ordered-set-serializer
2284         [2] https://dom.spec.whatwg.org/#ordered%20sets
2285         [3] https://dom.spec.whatwg.org/#stringification-behavior
2286         [4] https://dom.spec.whatwg.org/#dom-domsettabletokenlist-value
2287         [5] https://dom.spec.whatwg.org/#dom-domtokenlist-contains (step 2)
2288         [6] https://dom.spec.whatwg.org/#concept-DTL-update
2289         [7] https://bugzilla.mozilla.org/show_bug.cgi?id=869788
2290
2291         No new tests, already covered by existing tests.
2292
2293         * dom/Element.cpp:
2294         (WebCore::Element::classAttributeChanged):
2295         When the class attribute changes, make sure to update the associated
2296         classList if there is one. We could do this lazily if it turns out
2297         to be a performance problem. However, chances are this is not as
2298         classList is rarely used and we only need to update the classList if
2299         it was ever accessed by JS for this Element.
2300
2301         (WebCore::Element::insertedInto):
2302         Drop call to clearClassListValueForQuirksMode() as we no longer need
2303         to maintain a separate SpaceSplitString for classes when in quirks
2304         mode. This is because AttributeDOMTokenList now has its own Vector
2305         of classes in their original cases. It therefore no longer relies on
2306         Element::classNames() which has its case folded when in quirks mode.
2307
2308         (WebCore::Element::classList):
2309         Return a AttributeDOMTokenList instead of a ClassList.
2310
2311         * html/AttributeDOMTokenList.h: Added.
2312         * html/AttributeDOMTokenList.cpp: Added.
2313         (WebCore::AttributeDOMTokenList::AttributeDOMTokenList):
2314         Call DOMTokenList::setValue() using the attribute's value so that
2315         DOMTokenList can initialize its token Vector.
2316
2317         (WebCore::AttributeDOMTokenList::attributeValueChanged):
2318         If the attribute value was changed by somebody else that the
2319         AttributeDOMTokenList, call DOMTokenList::setValue() so that it
2320         can update its token Vector.
2321
2322         (WebCore::AttributeDOMTokenList::updateAfterTokenChange):
2323         This is called whenever the token Vector is changed via JS. In
2324         this case, we update the associated attribute's value.
2325
2326         * html/ClassList.cpp: Removed.
2327         * html/ClassList.h: Removed.
2328         Now merged into AttributeDOMTokenList.
2329
2330         * html/DOMSettableTokenList.cpp:
2331         * html/DOMSettableTokenList.h:
2332         Get rid of most of the code as most of the logic is now in
2333         DOMTokenList parent class.
2334
2335         * html/DOMTokenList.cpp:
2336         (WebCore::DOMTokenList::validateToken):
2337         Use a String parameter instead of an AtomicString as this method does
2338         not need the input the be an AtomicString. This avoid atomizing
2339         String unnecessarily.
2340
2341         (WebCore::DOMTokenList::validateTokens):
2342         Use a modern loop.
2343
2344         (WebCore::DOMTokenList::contains):
2345         No longer use containsInternal() virtual function. We can now check
2346         the internal token Vector.
2347
2348         (WebCore::DOMTokenList::add):
2349         Now update the internal Vector. Use a modern loop and try to minimize
2350         Vector capacity reallocation.
2351
2352         (WebCore::DOMTokenList::remove):
2353         Now update the internal Vector.
2354
2355         (WebCore::DOMTokenList::toggle):
2356         Now update the internal Vector and refactor the code so that it is
2357         structured exactly as the algorithm in the specification for
2358         clarity.
2359
2360         (WebCore::DOMTokenList::value):
2361         Now return the result of the ordered set serializer for tokens. This
2362         method is used for:
2363         - The DOMSettableTokenList.value() getter
2364         - The DOMTokenList stringifier
2365         - As attribute value when updating the associated attribute in
2366           AttributeDOMTokenList.
2367
2368         (WebCore::DOMTokenList::setValue):
2369         Update the internal Vector using the algorithm in [2].
2370
2371         * html/DOMTokenList.h:
2372         (WebCore::DOMTokenList::length):
2373         No longer virtual, now returns the size of the internal token Vector.
2374
2375         (WebCore::DOMTokenList::item):
2376         No longer virtual, now returns the token at the given index in the
2377         internal Vector.
2378
2379         * html/HTMLAnchorElement.cpp:
2380         (WebCore::HTMLAnchorElement::relList):
2381         Now return a AttributeDOMTokenList.
2382
2383         * html/HTMLLinkElement.cpp:
2384         (WebCore::HTMLLinkElement::relList):
2385         Now return a AttributeDOMTokenList.
2386
2387         * html/RelList.cpp: Removed.
2388         * html/RelList.h: Removed.
2389         Now merged into AttributeDOMTokenList.
2390
2391 2015-09-11  Chris Dumez  <cdumez@apple.com>
2392
2393         Element.tagName should be upper-case for HTML elements in HTML documents
2394         https://bugs.webkit.org/show_bug.cgi?id=148843
2395         <rdar://problem/22559081>
2396
2397         Reviewed by Ryosuke Niwa.
2398
2399         Element.tagName should be upper-case for HTML elements in HTML documents,
2400         as per the DOM specification:
2401         https://dom.spec.whatwg.org/#dom-element-tagname
2402
2403         Previously, WebKit would fail to upper-case the tagname if the element's
2404         tag had a prefix. This patch corrects this. This aligns our behavior with
2405         Firefox, Chrome and IE.
2406
2407         No new tests, already covered by existing tests.
2408
2409         * html/HTMLElement.cpp:
2410         (WebCore::HTMLElement::nodeName):
2411
2412 2015-09-11  Chris Dumez  <cdumez@apple.com>
2413
2414         document.body = "text" should throw a TypeError, not a HierarchyRequestError
2415         https://bugs.webkit.org/show_bug.cgi?id=149057
2416         <rdar://problem/22567157>
2417
2418         Reviewed by Ryosuke Niwa.
2419
2420         document.body = "text" should throw a TypeError, not a
2421         HierarchyRequestError:
2422         https://html.spec.whatwg.org/multipage/dom.html#dom-document-body
2423
2424         This is because "text" is a DOMString and it cannot be converted into an
2425         HTMLElement?. Therefore, the WebIDL specification says we should throw a
2426         TypeError in this case.
2427
2428         Chrome and Firefox throw the right exception.
2429
2430         No new tests, already covered by existing test.
2431
2432         * dom/Document.idl:
2433
2434 2015-09-11  Andreas Kling  <akling@apple.com>
2435
2436         [JSC] Weak should only accept cell pointees.
2437         <https://webkit.org/b/148955>
2438
2439         Reviewed by Geoffrey Garen.
2440
2441         Update WebCore bindings for the new Weak and Weak-related signatures.
2442
2443         * bindings/js/JSCSSRuleListCustom.cpp:
2444         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
2445         * bindings/js/JSCSSValueCustom.cpp:
2446         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
2447         (WebCore::JSCSSValueOwner::finalize):
2448         * bindings/js/JSCallbackData.cpp:
2449         (WebCore::JSCallbackDataWeak::WeakOwner::isReachableFromOpaqueRoots):
2450         * bindings/js/JSCallbackData.h:
2451         * bindings/js/JSMutationObserverCustom.cpp:
2452         (WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
2453         * bindings/js/JSNodeCustom.cpp:
2454         (WebCore::isReachableFromDOM):
2455         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
2456         * bindings/js/JSNodeListCustom.cpp:
2457         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
2458         * bindings/js/JSTextTrackCueCustom.cpp:
2459         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
2460         * bindings/js/WebCoreTypedArrayController.cpp:
2461         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
2462         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
2463         * bindings/js/WebCoreTypedArrayController.h:
2464         * bindings/scripts/CodeGeneratorJS.pm:
2465         (GenerateHeader):
2466         (GenerateImplementation):
2467         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2468         (WebCore::JSTestActiveDOMObjectOwner::isReachableFromOpaqueRoots):
2469         (WebCore::JSTestActiveDOMObjectOwner::finalize):
2470         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2471         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2472         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::isReachableFromOpaqueRoots):
2473         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
2474         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
2475         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2476         (WebCore::JSTestCustomNamedGetterOwner::isReachableFromOpaqueRoots):
2477         (WebCore::JSTestCustomNamedGetterOwner::finalize):
2478         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2479         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2480         (WebCore::JSTestEventConstructorOwner::isReachableFromOpaqueRoots):
2481         (WebCore::JSTestEventConstructorOwner::finalize):
2482         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2483         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2484         (WebCore::JSTestEventTargetOwner::isReachableFromOpaqueRoots):
2485         (WebCore::JSTestEventTargetOwner::finalize):
2486         * bindings/scripts/test/JS/JSTestEventTarget.h:
2487         * bindings/scripts/test/JS/JSTestException.cpp:
2488         (WebCore::JSTestExceptionOwner::isReachableFromOpaqueRoots):
2489         (WebCore::JSTestExceptionOwner::finalize):
2490         * bindings/scripts/test/JS/JSTestException.h:
2491         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2492         (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots):
2493         (WebCore::JSTestGenerateIsReachableOwner::finalize):
2494         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2495         * bindings/scripts/test/JS/JSTestInterface.cpp:
2496         (WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots):
2497         (WebCore::JSTestInterfaceOwner::finalize):
2498         * bindings/scripts/test/JS/JSTestInterface.h:
2499         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2500         (WebCore::JSTestMediaQueryListListenerOwner::isReachableFromOpaqueRoots):
2501         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
2502         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2503         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2504         (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots):
2505         (WebCore::JSTestNamedConstructorOwner::finalize):
2506         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2507         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2508         (WebCore::JSTestNondeterministicOwner::isReachableFromOpaqueRoots):
2509         (WebCore::JSTestNondeterministicOwner::finalize):
2510         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2511         * bindings/scripts/test/JS/JSTestObj.cpp:
2512         (WebCore::JSTestObjOwner::isReachableFromOpaqueRoots):
2513         (WebCore::JSTestObjOwner::finalize):
2514         * bindings/scripts/test/JS/JSTestObj.h:
2515         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2516         (WebCore::JSTestOverloadedConstructorsOwner::isReachableFromOpaqueRoots):
2517         (WebCore::JSTestOverloadedConstructorsOwner::finalize):
2518         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2519         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2520         (WebCore::JSTestOverrideBuiltinsOwner::isReachableFromOpaqueRoots):
2521         (WebCore::JSTestOverrideBuiltinsOwner::finalize):
2522         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
2523         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2524         (WebCore::JSTestSerializedScriptValueInterfaceOwner::isReachableFromOpaqueRoots):
2525         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
2526         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2527         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2528         (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
2529         (WebCore::JSTestTypedefsOwner::finalize):
2530         * bindings/scripts/test/JS/JSTestTypedefs.h:
2531         * bindings/scripts/test/JS/JSattribute.cpp:
2532         (WebCore::JSattributeOwner::isReachableFromOpaqueRoots):
2533         (WebCore::JSattributeOwner::finalize):
2534         * bindings/scripts/test/JS/JSattribute.h:
2535         * bindings/scripts/test/JS/JSreadonly.cpp:
2536         (WebCore::JSreadonlyOwner::isReachableFromOpaqueRoots):
2537         (WebCore::JSreadonlyOwner::finalize):
2538         * bindings/scripts/test/JS/JSreadonly.h:
2539         * bridge/runtime_root.cpp:
2540         (JSC::Bindings::RootObject::finalize):
2541         * bridge/runtime_root.h:
2542
2543 2015-09-10  Chris Fleizach  <cfleizach@apple.com>
2544
2545         AX: Mavericks: Text cursor does not move along with VoiceOver cursor for text fields
2546         https://bugs.webkit.org/show_bug.cgi?id=148891
2547
2548         Reviewed by Alexey Proskuryakov.
2549
2550         Asychronous focus setting DOES work on Yosemite, just not Mavericks.
2551
2552         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2553         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2554         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
2555
2556 2015-09-10  David Hyatt  <hyatt@apple.com>
2557
2558         [New Block-Inside-Inline Model] Self-collapsing block check needs to account for anonymous inline blocks
2559         https://bugs.webkit.org/show_bug.cgi?id=149042
2560
2561         Reviewed by Dean Jackson.
2562
2563         Added new tests in fast/block/inside-inlines/
2564
2565         * rendering/InlineFlowBox.cpp:
2566         * rendering/InlineFlowBox.h:
2567         (WebCore::InlineFlowBox::anonymousInlineBlock):
2568         Add a new accessor to get the anonymousInlineBlock() for lines that wrap them.
2569
2570         * rendering/RenderBlock.cpp:
2571         (WebCore::RenderBlock::childrenPreventSelfCollapsing):
2572         (WebCore::RenderBlock::isSelfCollapsingBlock):
2573         isSelfCollapsingBlock() now calls a virtual method that checks lines/children called childrenPreventSelfCollapsing.
2574         This lets us farm out the lines check to the derived RenderBlockFlow class.
2575
2576         * rendering/RenderBlock.h:
2577         (WebCore::RenderBlock::childrenPreventSelfCollapsing):
2578         Added new virtual method for checking children.
2579
2580         * rendering/RenderBlockFlow.cpp:
2581         * rendering/RenderBlockFlow.h:
2582         (WebCore::RenderBlockFlow::childrenPreventSelfCollapsing):
2583         Overridden to ensure that blocks can still be self-collapsing if they only contain anonymous inline-block lines that
2584         are also self-collapsing.
2585
2586 2015-09-10  Jinyoung Hur  <hur.ims@navercorp.com>
2587
2588         [WebGL][GLES] bad shaders should not be linked not only for GL but also for GL ES
2589         https://bugs.webkit.org/show_bug.cgi?id=148794
2590
2591         Reviewed by Dean Jackson.
2592
2593         Checking bad shaders, precision matching and varyings packing are all valid for GL ES too.
2594
2595         Test: webgl/1.0.2/conformance/programs/program-test.html
2596
2597         * html/canvas/WebGLRenderingContextBase.cpp:
2598         (WebCore::WebGLRenderingContextBase::linkProgram):
2599
2600 2015-09-10  Jinyoung Hur  <hur.ims@navercorp.com>
2601
2602         Static variables in GraphicsContext3DOpenGLCommon should be avoided because of the race condition
2603         https://bugs.webkit.org/show_bug.cgi?id=148957
2604
2605         Reviewed by Dean Jackson.
2606
2607         There is no guarantee that only one thread calls GraphicsContext3D::compileShader() at a time so it would be 
2608         better to use a thread local storage variable rather than use a static variable.
2609
2610         No new tests. No behavioural changes.
2611
2612         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2613         (WebCore::getCurrentNameHashMapForShader):
2614         (WebCore::setCurrentNameHashMapForShader):
2615         (WebCore::nameHashForShader):
2616         (WebCore::GraphicsContext3D::compileShader):
2617         (WebCore::GraphicsContext3D::mappedSymbolName):
2618
2619 2015-09-10  Chris Dumez  <cdumez@apple.com>
2620
2621         Node.appendChild(null) / replaceChild(null, null) / removeChild(null) / insertBefore(null, ref) should throw a TypeError
2622         https://bugs.webkit.org/show_bug.cgi?id=148971
2623         <rdar://problem/22560883>
2624         <rdar://problem/22559225>
2625
2626         Reviewed by Ryosuke Niwa.
2627
2628         Node.appendChild(null) / replaceChild(null, null) / removeChild(null)
2629         and insertBefore(null, ref) should throw a TypeError instead of a
2630         NotFoundError, as per the specification:
2631         https://dom.spec.whatwg.org/#node
2632
2633         The parameters are not nullable so the Web IDL specification says
2634         we should throw a TypeError in this case.
2635
2636         This patch moves the null-checking from ContainerNode to the methods
2637         on Node. The null-checking is supposed to be done by the bindings code
2638         but our generator currently does not support this so we do the null
2639         checking as close to the bindings as possible. The bindings code is
2640         calling the methods on Node. This also makes sure we throw a TypeError
2641         for null-argument when the Node is not a ContainerNode. For e.g.
2642         Text.appendChild(null) should throw a TypeError too.
2643
2644         The methods on ContainerNode now take references insteaad of pointer
2645         parameters now that the null-checking is done at the call site in
2646         Node. This lead to a lot of code update as those methods are used
2647         a lot throughout the code base.
2648
2649         No new tests, already covered by pre-existing layout tests.
2650
2651 2015-09-10  Daniel Bates  <dabates@apple.com>
2652
2653         Write a test to ensure we don't regress processing of tasks when page defers loading
2654         https://bugs.webkit.org/show_bug.cgi?id=135882
2655         <rdar://problem/22550497>
2656
2657         Reviewed by Darin Adler.
2658
2659         Towards adding a test for <https://bugs.webkit.org/show_bug.cgi?id=135688>, add a window.internals
2660         function, setPageDefersLoading, to enable and disable whether the page defers loading.
2661
2662         Test: storage/websql/success-callback-when-page-defers-loading.html
2663
2664         * testing/Internals.cpp:
2665         (WebCore::Internals::resetToConsistentState): Reset defers loading for the page to false.
2666         (WebCore::Internals::setPageDefersLoading): Added.
2667         * testing/Internals.h:
2668         * testing/Internals.idl: Added IDL declaration setPageDefersLoading.
2669
2670 2015-09-10  Sergio Villar Senin  <svillar@igalia.com>
2671
2672         min-width/height should default to auto for flexbox items
2673         https://bugs.webkit.org/show_bug.cgi?id=146020
2674
2675         Reviewed by David Hyatt.
2676
2677         Based on Blink's r193665, r194062, r194887 and r195930 by <cbiesinger@chromium.org>.
2678
2679         As specified here
2680         http://dev.w3.org/csswg/css-flexbox/#min-size-auto the default
2681         value of min-{width|height} is auto for flex items.
2682
2683         In case this patch breaks any website (as it's changing the
2684         default value of those properties) the fix is likely to add:
2685
2686         min-width: 0;
2687         min-height: 0;
2688
2689         to any relevant flexitems.
2690
2691         Test: css3/flexbox/min-size-auto.html
2692
2693         * css/CSSComputedStyleDeclaration.cpp:
2694         (WebCore::isFlexOrGrid): New helper method to identify grids and flexs.
2695         (WebCore::ComputedStyleExtractor::propertyValue): Return auto
2696         for flex items if min-width/height is auto.
2697         * css/CSSParser.cpp:
2698         (WebCore::CSSParser::parseValue):
2699         * html/shadow/SliderThumbElement.cpp:
2700         * rendering/RenderBox.cpp:
2701         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
2702         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
2703         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2704         (WebCore::RenderBox::computeLogicalHeight):
2705         (WebCore::RenderBox::computeLogicalHeightUsing):
2706         (WebCore::RenderBox::computeContentLogicalHeight):
2707         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
2708         (WebCore::RenderBox::computeReplacedLogicalWidth):
2709         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
2710         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2711         (WebCore::RenderBox::computeReplacedLogicalHeight):
2712         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
2713         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2714         (WebCore::RenderBox::availableLogicalHeightUsing):
2715         (WebCore::RenderBox::computePositionedLogicalWidth):
2716         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2717         (WebCore::RenderBox::computePositionedLogicalHeight):
2718         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2719         * rendering/RenderBox.h:
2720         * rendering/RenderButton.h:
2721         * rendering/RenderFlexibleBox.cpp:
2722         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
2723         (WebCore::RenderFlexibleBox::mainAxisExtentIsDefinite):
2724         (WebCore::RenderFlexibleBox::mainAxisLengthIsIndefinite):
2725         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2726         (WebCore::RenderFlexibleBox::mainAxisOverflowForChild):
2727         * rendering/RenderFlexibleBox.h:
2728         (WebCore::RenderFlexibleBox::isFlexibleBoxImpl):
2729         * rendering/RenderFullScreen.h:
2730         * rendering/RenderGrid.cpp:
2731         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
2732         * rendering/RenderMediaControlElements.h:
2733         * rendering/RenderMenuList.cpp:
2734         (WebCore::RenderMenuList::adjustInnerStyle): Do not longer set
2735         the min-width explicitly.
2736         * rendering/RenderMenuList.h:
2737         * rendering/RenderMultiColumnSet.cpp:
2738         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
2739         * rendering/RenderNamedFlowFragment.cpp:
2740         (WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
2741         * rendering/RenderReplaced.cpp:
2742         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2743         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
2744         * rendering/RenderSlider.h:
2745         * rendering/RenderTextControl.h:
2746         * rendering/RenderTextControlSingleLine.cpp:
2747         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): Do not longer set
2748         the min-width explicitly.
2749         * rendering/mathml/RenderMathMLBlock.h:
2750         * rendering/style/RenderStyle.h:
2751
2752 2015-09-10  ChangSeok Oh  <changseok.oh@collabora.com>
2753
2754         [GTK] Volume bar is broken
2755         https://bugs.webkit.org/show_bug.cgi?id=145639
2756
2757         Reviewed by Philippe Normand.
2758
2759         The ControlPart enum values' order has mismatched the one of values in CSSValueKeywords.in
2760         after r180965. The MediaVolumeSliderPart should be prior to the MediaVolumeSliderContainerpart.
2761
2762         Tests: media/click-volume-bar-not-pausing.html
2763                media/volume-bar-empty-when-muted.html
2764
2765         * platform/ThemeTypes.h:
2766
2767 2015-09-09  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2768
2769         Remove all uses of PassRefPtr in WebCore/svg
2770         https://bugs.webkit.org/show_bug.cgi?id=148472
2771
2772         Reviewed by Darin Adler.
2773
2774         Clean up all uses of PassRefPtr in WebCore/svg.
2775
2776         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2777         (WebCore::AudioScheduledSourceNode::addEventListener):
2778         * Modules/webaudio/AudioScheduledSourceNode.h:
2779         * Modules/webaudio/ScriptProcessorNode.cpp:
2780         (WebCore::ScriptProcessorNode::addEventListener):
2781         * Modules/webaudio/ScriptProcessorNode.h:
2782         * dom/EventListenerMap.cpp:
2783         (WebCore::copyListenersNotCreatedFromMarkupToTarget):
2784         * dom/EventTarget.cpp:
2785         (WebCore::EventTarget::addEventListener):
2786         * dom/EventTarget.h:
2787         * dom/MessagePort.cpp:
2788         (WebCore::MessagePort::addEventListener):
2789         * dom/MessagePort.h:
2790         * dom/Node.cpp:
2791         (WebCore::tryAddEventListener):
2792         (WebCore::Node::addEventListener):
2793         * dom/Node.h:
2794         * html/HTMLMediaElement.cpp:
2795         (WebCore::HTMLMediaElement::addEventListener):
2796         * html/HTMLMediaElement.h:
2797         * html/ImageDocument.cpp:
2798         (WebCore::ImageDocument::createDocumentStructure):
2799         * html/shadow/MediaControlsApple.cpp:
2800         (WebCore::MediaControlsApple::showClosedCaptionTrackList):
2801         * page/DOMWindow.cpp:
2802         (WebCore::DOMWindow::addEventListener):
2803         * page/DOMWindow.h:
2804         * rendering/svg/RenderSVGResourceFilter.cpp:
2805         (WebCore::RenderSVGResourceFilter::buildPrimitives):
2806         * svg/SVGElement.cpp:
2807         (WebCore::SVGElement::addEventListener):
2808         * svg/SVGElement.h:
2809         * svg/SVGPathElement.cpp:
2810         (WebCore::SVGPathElement::pathSegListChanged):
2811         * svg/SVGPathUtilities.cpp:
2812         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
2813         * svg/SVGPathUtilities.h:
2814         * svg/SVGTRefElement.cpp:
2815         (WebCore::SVGTRefTargetEventListener::attach):
2816         (WebCore::SVGTRefElement::buildPendingResource):
2817         * svg/graphics/filters/SVGFilterBuilder.cpp:
2818         (WebCore::SVGFilterBuilder::appendEffectToEffectReferences):
2819         * svg/graphics/filters/SVGFilterBuilder.h:
2820
2821 2015-09-09  Dewei Zhu  <dewei_zhu@apple.com>
2822
2823         Document.characterSet should return "UTF-8" instead of null by default.
2824         https://bugs.webkit.org/show_bug.cgi?id=148810
2825         <rdar://problem/22548727>
2826
2827         Reviewed by Ryosuke Niwa.
2828
2829         Document encoding should default to "UTF-8" as is specified in
2830         https://dom.spec.whatwg.org/#concept-document-encoding. This behavior
2831         is consistent with Firefox and Chrome.
2832
2833         * dom/Document.cpp:
2834         (WebCore::Document::encoding): Returns nullAtom according to declearation.
2835         (WebCore::Document::characterSetForBindings): Returns "UTF-8" by default instead of null String.
2836         * dom/Document.h:
2837         (WebCore::Document::charset):
2838         (WebCore::Document::inputEncoding): Deleted.
2839         (WebCore::Document::characterSet): Deleted.
2840         * dom/Document.idl:
2841         * dom/InlineStyleSheetOwner.cpp:
2842         (WebCore::InlineStyleSheetOwner::createSheet):
2843         * inspector/InspectorPageAgent.cpp:
2844         (WebCore::InspectorPageAgent::mainResourceContent):
2845         * inspector/InspectorResourceAgent.cpp:
2846         (WebCore::InspectorResourceAgent::didFinishLoading):
2847         (WebCore::InspectorResourceAgent::didFailLoading):
2848         * loader/DocumentWriter.cpp:
2849         (WebCore::DocumentWriter::createDecoderIfNeeded):
2850         * loader/FormSubmission.cpp:
2851         (WebCore::encodingFromAcceptCharset):
2852
2853 2015-09-09  Benjamin Poulain  <bpoulain@apple.com>
2854
2855         CSS general sibling selectors does not work without CSS JIT
2856         https://bugs.webkit.org/show_bug.cgi?id=148987
2857         rdar://problem/22559860
2858
2859         Reviewed by Andreas Kling.
2860
2861         When traversing with the indirect adjacent combinator, SelectorChecker
2862         was not setting the style invalidation flag on the right element.
2863
2864         Tests: fast/css/indirect-adjacent-style-invalidation-1.html
2865                fast/css/indirect-adjacent-style-invalidation-2.html
2866                fast/css/indirect-adjacent-style-invalidation-3.html
2867
2868         * css/SelectorChecker.cpp:
2869         (WebCore::SelectorChecker::matchRecursively):
2870
2871 2015-09-09  Joseph Pecoraro  <pecoraro@apple.com>
2872
2873         Web Inspector: Remove unused InspectorFrontendHost methods
2874         https://bugs.webkit.org/show_bug.cgi?id=149013
2875
2876         Reviewed by Brian Burg.
2877
2878         * inspector/InspectorFrontendHost.cpp:
2879         (WebCore::InspectorFrontendHost::canSaveAs): Deleted.
2880         (WebCore::InspectorFrontendHost::canInspectWorkers): Deleted.
2881         * inspector/InspectorFrontendHost.h:
2882         * inspector/InspectorFrontendHost.idl:
2883
2884 2015-09-09  Myles C. Maxfield  <mmaxfield@apple.com>
2885
2886         ASSERTION FAILED: typesettingFeatures & (Kerning | Ligatures) in WebCore::applyFontTransforms
2887         https://bugs.webkit.org/show_bug.cgi?id=146194
2888
2889         Reviewed by Dean Jackson.
2890
2891         We might trigger shaping even if the author hasn't specified kerning or ligatures.
2892
2893         Test: fast/text/softbank-emoji-no-ligatures-nor-kerning.html
2894
2895         * platform/graphics/WidthIterator.cpp:
2896         (WebCore::isSoftBankEmoji):
2897         (WebCore::WidthIterator::applyFontTransforms):
2898         (WebCore::WidthIterator::advanceInternal):
2899         (WebCore::applyFontTransforms): Deleted.
2900         * platform/graphics/WidthIterator.h:
2901
2902 2015-09-09  Chris Dumez  <cdumez@apple.com>
2903
2904         Setting document.title when there is no title and no head element should no nothing
2905         https://bugs.webkit.org/show_bug.cgi?id=149005
2906         <rdar://problem/22567524>
2907
2908         Reviewed by Ryosuke Niwa.
2909
2910         Setting document.title when there is no title element and no head
2911         element should no nothing:
2912         - https://html.spec.whatwg.org/multipage/dom.html#document.title
2913
2914         Firefox and Chrome comply with the specification. However, WebKit
2915         was returning the updated title when querying document.title after
2916         setting it.
2917
2918         No new tests, covered by existing tests.
2919
2920         * dom/Document.cpp:
2921         (WebCore::Document::setTitle):
2922
2923 2015-09-09  Manuel Rego Casasnovas  <rego@igalia.com>
2924
2925         [css-grid] Percentage columns shouldn't include border and padding
2926         https://bugs.webkit.org/show_bug.cgi?id=148978
2927
2928         Reviewed by Sergio Villar Senin.
2929
2930         Subtract border and padding when we're calculating the breadth of the
2931         columns in LayoutGrid::computeUsedBreadthOfSpecifiedLength().
2932
2933         Added test to check the behavior for both columns and rows.
2934
2935         Test: fast/css-grid-layout/grid-percent-track-margin-border-padding.html
2936
2937         * rendering/RenderGrid.cpp:
2938         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
2939
2940 2015-09-09  Commit Queue  <commit-queue@webkit.org>
2941
2942         Unreviewed, rolling out r189536 and r189538.
2943         https://bugs.webkit.org/show_bug.cgi?id=149002
2944
2945         broke tests on mac (Requested by alexchristensen on #webkit).
2946
2947         Reverted changesets:
2948
2949         "min-width/height should default to auto for flexbox items"
2950         https://bugs.webkit.org/show_bug.cgi?id=146020
2951         http://trac.webkit.org/changeset/189536
2952
2953         "[css-grid] Percentage columns shouldn't include border and
2954         padding"
2955         https://bugs.webkit.org/show_bug.cgi?id=148978
2956         http://trac.webkit.org/changeset/189538
2957
2958 2015-09-08  David Hyatt  <hyatt@apple.com>
2959
2960         REGRESSION: Inline-block baseline is wrong when zero-width replaced child is present
2961         https://bugs.webkit.org/show_bug.cgi?id=147452
2962         rdar://problem/21943074
2963
2964         Reviewed by Myles Maxfield.
2965
2966         Added new test in fast/inline-block
2967
2968         Treat zero width replaced elements the same as replaced elements with width. Instead of
2969         clearing floats based off having no committed width, we instead track both committed
2970         width and committed replaced objects. We do this with two new booleans in LineWidth
2971         so that we know when we have uncomitted and committed replaced objects.
2972
2973         * rendering/line/BreakingContext.h:
2974         (WebCore::BreakingContext::handleReplaced):
2975         (WebCore::BreakingContext::handleText):
2976         (WebCore::BreakingContext::canBreakAtThisPosition):
2977         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
2978         * rendering/line/LineWidth.cpp:
2979         (WebCore::LineWidth::LineWidth):
2980         (WebCore::LineWidth::commit):
2981         (WebCore::LineWidth::applyOverhang):
2982         * rendering/line/LineWidth.h:
2983         (WebCore::LineWidth::committedWidth):
2984         (WebCore::LineWidth::availableWidth):
2985         (WebCore::LineWidth::logicalLeftOffset):
2986         (WebCore::LineWidth::hasCommitted):
2987         (WebCore::LineWidth::addUncommittedWidth):
2988         (WebCore::LineWidth::addUncommittedReplacedWidth):
2989
2990 2015-09-09  Antti Koivisto  <antti@apple.com>
2991
2992         Split mixed font GlyphPage functionality to separate class
2993         https://bugs.webkit.org/show_bug.cgi?id=148965
2994
2995         Reviewed by Myles Maxfield.
2996
2997         Currently GlyphPage class is used for both immutable single font case (in Font) and
2998         for caching mixed font mappings (in FontCascadeFonts). It is cleaner to use separate
2999         classed for these cases. This will also make future improvements easier.
3000
3001         * platform/graphics/Font.cpp:
3002         (WebCore::Font::~Font):
3003         (WebCore::fillGlyphPage):
3004         (WebCore::createAndFillGlyphPage):
3005         (WebCore::Font::glyphPage):
3006         (WebCore::Font::glyphForCharacter):
3007         (WebCore::Font::glyphDataForCharacter):
3008         * platform/graphics/Font.h:
3009         * platform/graphics/FontCascadeFonts.cpp:
3010         (WebCore::MixedFontGlyphPage::MixedFontGlyphPage):
3011         (WebCore::MixedFontGlyphPage::glyphDataForCharacter):
3012         (WebCore::MixedFontGlyphPage::setGlyphDataForCharacter):
3013         (WebCore::MixedFontGlyphPage::setGlyphDataForIndex):
3014
3015             Mixed font pages are now an implementation detail of FontCascadeFonts.
3016
3017         (WebCore::FontCascadeFonts::GlyphPageCacheEntry::glyphDataForCharacter):
3018         (WebCore::FontCascadeFonts::GlyphPageCacheEntry::setGlyphDataForCharacter):
3019         (WebCore::FontCascadeFonts::GlyphPageCacheEntry::setSingleFontPage):
3020
3021             Cache entry is either shared single font GlyphPage or mutable MixedFontGlyphPage.
3022
3023         (WebCore::FontCascadeFonts::FontCascadeFonts):
3024         (WebCore::FontCascadeFonts::glyphDataForCharacter):
3025         (WebCore::FontCascadeFonts::pruneSystemFallbacks):
3026         * platform/graphics/FontCascadeFonts.h:
3027         (WebCore::FontCascadeFonts::GlyphPageCacheEntry::isNull):
3028         (WebCore::FontCascadeFonts::GlyphPageCacheEntry::isMixedFont):
3029         * platform/graphics/GlyphPage.h:
3030
3031             GlyphPage is now for single font mappings only.
3032             Use regular allocation instead of variable size tricks.
3033             It is always immutable after initialization (though currently a setter is still needed).
3034
3035         (WebCore::GlyphPage::create):
3036         (WebCore::GlyphPage::~GlyphPage):
3037         (WebCore::GlyphPage::count):
3038         (WebCore::GlyphPage::indexForCharacter):
3039         (WebCore::GlyphPage::glyphDataForCharacter):
3040         (WebCore::GlyphPage::glyphForCharacter):
3041         (WebCore::GlyphPage::glyphDataForIndex):
3042         (WebCore::GlyphPage::glyphForIndex):
3043         (WebCore::GlyphPage::setGlyphForIndex):
3044         (WebCore::GlyphPage::font):
3045         (WebCore::GlyphPage::GlyphPage):
3046         (WebCore::GlyphPage::createForMixedFonts): Deleted.
3047         (WebCore::GlyphPage::createCopyForMixedFonts): Deleted.
3048         (WebCore::GlyphPage::createForSingleFont): Deleted.
3049         (WebCore::GlyphPage::isImmutable): Deleted.
3050         (WebCore::GlyphPage::setImmutable): Deleted.
3051         (WebCore::GlyphPage::glyphAt): Deleted.
3052         (WebCore::GlyphPage::fontForCharacter): Deleted.
3053         (WebCore::GlyphPage::setGlyphDataForCharacter): Deleted.
3054         (WebCore::GlyphPage::setGlyphDataForIndex): Deleted.
3055         (WebCore::GlyphPage::hasPerGlyphFontData): Deleted.
3056         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
3057         (WebCore::GlyphPage::fill):
3058         * platform/graphics/mac/GlyphPageMac.cpp:
3059         (WebCore::GlyphPage::fill):
3060         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
3061         (WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs):
3062         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
3063         (WebCore::GlyphPage::fill):
3064         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
3065         (WebCore::GlyphPage::fill):
3066         * svg/SVGFontData.cpp:
3067         (WebCore::SVGFontData::applySVGGlyphSelection):
3068         (WebCore::SVGFontData::fillSVGGlyphPage):
3069         (WebCore::SVGFontData::fillBMPGlyphs):
3070         (WebCore::SVGFontData::fillNonBMPGlyphs):
3071         * svg/SVGFontData.h:
3072         (WebCore::SVGFontData::verticalAdvanceY):
3073
3074 2015-09-09  Manuel Rego Casasnovas  <rego@igalia.com>
3075
3076         [css-grid] Percentage columns shouldn't include border and padding
3077         https://bugs.webkit.org/show_bug.cgi?id=148978
3078
3079         Reviewed by Sergio Villar Senin.
3080
3081         Subtract border and padding when we're calculating the breadth of the
3082         columns in LayoutGrid::computeUsedBreadthOfSpecifiedLength().
3083
3084         Added test to check the behavior for both columns and rows.
3085
3086         Test: fast/css-grid-layout/grid-percent-track-margin-border-padding.html
3087
3088         * rendering/RenderGrid.cpp:
3089         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
3090
3091 2015-09-09  Chris Dumez  <cdumez@apple.com>
3092
3093         HTMLTableElement.tHead / tFoot / caption should be nullable
3094         https://bugs.webkit.org/show_bug.cgi?id=148991
3095
3096         Reviewed by Ryosuke Niwa.
3097
3098         According to the specification, HTMLTableElement.tHead / tFoot / caption
3099         should be nullable:
3100         https://html.spec.whatwg.org/multipage/tables.html#htmltableelement
3101
3102         Upon assigning null, we are supposed to remove the existing tHead / tFoot
3103         / caption element. However, we had a bug causing us to throw an exception
3104         after removing the element. This is because we would try to insert a null
3105         element and ContainerNode::insertBefore() throws when doing so.
3106
3107         Also, as per the specification, setting tHead / tFoot to something else
3108         than a thead / tfoot element should throw a HierarchyRequestError:
3109         https://html.spec.whatwg.org/multipage/tables.html#dom-table-thead
3110         https://html.spec.whatwg.org/multipage/tables.html#dom-table-tfoot
3111
3112         Previously, WebKit did not check the tag and was happy inserting the
3113         element as long as it was an HTMLTableSectionElement. This means that
3114         you could set a tfoot by assigning table.tHead.
3115
3116         This patch corrects both bugs and adds test coverage for it.
3117
3118         Test: fast/dom/HTMLTableElement/nullable-attributes.html
3119
3120         * html/HTMLTableElement.cpp:
3121         (WebCore::HTMLTableElement::setCaption):
3122         Only call insertBefore() if newCaption is not null as insertBefore()
3123         will throw an exception otherwise.
3124
3125         (WebCore::HTMLTableElement::setTHead):
3126         - Throw a HierarchyRequestError if the HTMLTableSectionElement is not
3127           null or a <thead> element, as per the specification.
3128         - Only call insertBefore() if newHead is not null as insertBefore()
3129           will throw an exception otherwise.
3130
3131         (WebCore::HTMLTableElement::setTFoot):
3132         - Throw a HierarchyRequestError if the HTMLTableSectionElement is not
3133           null or a <tfoot> element, as per the specification.
3134         - Only call insertBefore() if newFoot is not null as insertBefore()
3135           will throw an exception otherwise.
3136
3137         * html/HTMLTableElement.idl:
3138         Use [StrictTypeChecking] for these 3 attributes so that the bindings
3139         will throw a TypeError if the JS tries to assign a value with the
3140         wrong type. When the implementation is called with null, we now know
3141         this is because the JS assigned null (and not an invalid value).
3142         This is important as assigning null is valid since those attributes
3143         are nullable.
3144
3145 2015-06-26  Sergio Villar Senin  <svillar@igalia.com>
3146
3147         min-width/height should default to auto for flexbox items
3148         https://bugs.webkit.org/show_bug.cgi?id=146020
3149
3150         Reviewed by David Hyatt.
3151
3152         Based on Blink's r193665, r194062, r194887 and r195930 by <cbiesinger@chromium.org>.
3153
3154         As specified here
3155         http://dev.w3.org/csswg/css-flexbox/#min-size-auto the default
3156         value of min-{width|height} is auto for flex items.
3157
3158         In case this patch breaks any website (as it's changing the
3159         default value of those properties) the fix is likely to add:
3160
3161         min-width: 0;
3162         min-height: 0;
3163
3164         to any relevant flexitems.
3165
3166         Test: css3/flexbox/min-size-auto.html
3167
3168         * css/CSSComputedStyleDeclaration.cpp:
3169         (WebCore::isFlexOrGrid): New helper method to identify grids and flexs.
3170         (WebCore::ComputedStyleExtractor::propertyValue): Return auto
3171         for flex items if min-width/height is auto.
3172         * css/CSSParser.cpp:
3173         (WebCore::CSSParser::parseValue):
3174         * html/shadow/SliderThumbElement.cpp:
3175         * rendering/RenderBox.cpp:
3176         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
3177         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
3178         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
3179         (WebCore::RenderBox::computeLogicalHeight):
3180         (WebCore::RenderBox::computeLogicalHeightUsing):
3181         (WebCore::RenderBox::computeContentLogicalHeight):
3182         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
3183         (WebCore::RenderBox::computeReplacedLogicalWidth):
3184         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
3185         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
3186         (WebCore::RenderBox::computeReplacedLogicalHeight):
3187         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
3188         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3189         (WebCore::RenderBox::availableLogicalHeightUsing):
3190         (WebCore::RenderBox::computePositionedLogicalWidth):
3191         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
3192         (WebCore::RenderBox::computePositionedLogicalHeight):
3193         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
3194         * rendering/RenderBox.h:
3195         * rendering/RenderButton.h:
3196         * rendering/RenderFlexibleBox.cpp:
3197         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
3198         (WebCore::RenderFlexibleBox::mainAxisExtentIsDefinite):
3199         (WebCore::RenderFlexibleBox::mainAxisLengthIsIndefinite):
3200         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
3201         (WebCore::RenderFlexibleBox::mainAxisOverflowForChild):
3202         * rendering/RenderFlexibleBox.h:
3203         (WebCore::RenderFlexibleBox::isFlexibleBoxImpl):
3204         * rendering/RenderFullScreen.h:
3205         * rendering/RenderGrid.cpp:
3206         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
3207         * rendering/RenderMediaControlElements.h:
3208         * rendering/RenderMenuList.cpp:
3209         (WebCore::RenderMenuList::adjustInnerStyle): Do not longer set
3210         the min-width explicitly.
3211         * rendering/RenderMenuList.h:
3212         * rendering/RenderMultiColumnSet.cpp:
3213         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
3214         * rendering/RenderNamedFlowFragment.cpp:
3215         (WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
3216         * rendering/RenderReplaced.cpp:
3217         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
3218         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
3219         * rendering/RenderSlider.h:
3220         * rendering/RenderTextControl.h:
3221         * rendering/RenderTextControlSingleLine.cpp:
3222         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): Do not longer set
3223         the min-width explicitly.
3224         * rendering/mathml/RenderMathMLBlock.h:
3225         * rendering/style/RenderStyle.h:
3226
3227 2015-09-08  Joseph Pecoraro  <pecoraro@apple.com>
3228
3229         Web Inspector: No need for [Custom] Implementation of some InspectorFrontendHost methods
3230         https://bugs.webkit.org/show_bug.cgi?id=148990
3231
3232         Reviewed by Timothy Hatcher.
3233
3234         * bindings/js/JSInspectorFrontendHostCustom.cpp:
3235         (WebCore::JSInspectorFrontendHost::platform): Deleted.
3236         (WebCore::JSInspectorFrontendHost::port): Deleted.
3237         * inspector/InspectorFrontendHost.cpp:
3238         (WebCore::InspectorFrontendHost::platform):
3239         (WebCore::InspectorFrontendHost::port):
3240         * inspector/InspectorFrontendHost.h:
3241         * inspector/InspectorFrontendHost.idl:
3242         Uncustomize a few basic functions.
3243
3244 2015-09-08  Michael Catanzaro  <mcatanzaro@igalia.com>
3245
3246         Crash when WebCore::SQLiteFileSystem::openDatabase is called from multiple threads
3247         https://bugs.webkit.org/show_bug.cgi?id=143245
3248
3249         Reviewed by Darin Adler.
3250
3251         sqlite3_initialize is documented to be thread-safe, and to be called automatically by the
3252         library when needed, so applications should never need to call it directly. The problem is,
3253         it's not thread-safe: we have documented instances of GNOME Builder, Devhelp, Epiphany, and
3254         cinnamon-screensaver crashing when sqlite3_initialize is called simultaneously in separate
3255         threads (usually inside sqlite3_open). So call it manually, guarded using std::call_once, to
3256         make sure that the library is fully initialized before the first call to sqlite3_open. It's
3257         a good idea to do this regardless, because the documentation says it could be required in
3258         a future release of SQLite. (Though the use of std::call_once should not be needed, and is
3259         only used to attempt to work around the crashes.)
3260
3261         This is a workaround for an SQLite bug that might have been fixed upstream, but the SQLite
3262         developers are not really confident in the thread-safety of this function, and have advised
3263         that we carry the workaround. Seems like a good idea.
3264
3265         * platform/sql/SQLiteDatabase.cpp:
3266         (WebCore::SQLiteDatabase::SQLiteDatabase):
3267
3268 2015-09-08  Yusuke Suzuki  <utatane.tea@gmail.com>
3269
3270         Unify symbolTablePut in JSLexicalEnvironment and JSSymbolTableObject
3271         https://bugs.webkit.org/show_bug.cgi?id=148783
3272
3273         Reviewed by Geoffrey Garen.
3274
3275         No behavior change.
3276
3277         * bindings/js/JSDOMWindowBase.cpp:
3278         (WebCore::JSDOMWindowBase::updateDocument):
3279
3280 2015-09-08  Brian Burg  <bburg@apple.com>
3281
3282         Several inspector-protocol tests are flaky with GuardMalloc
3283         https://bugs.webkit.org/show_bug.cgi?id=136715
3284
3285         Reviewed by Joseph Pecoraro.
3286
3287         Sometimes, the async dispatch task can outlive its owning frontend client.
3288         To avoid problems, make it refcounted instead and add a protector reference.
3289
3290         No new tests, covered by existing tests.
3291
3292         * inspector/InspectorFrontendClientLocal.cpp:
3293         (WebCore::InspectorBackendDispatchTask::create):
3294         (WebCore::InspectorBackendDispatchTask::dispatch):
3295         (WebCore::InspectorBackendDispatchTask::reset):
3296         (WebCore::InspectorBackendDispatchTask::timerFired):
3297         (WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask):
3298         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
3299         (WebCore::InspectorFrontendClientLocal::~InspectorFrontendClientLocal):
3300         * inspector/InspectorFrontendClientLocal.h:
3301
3302 2015-09-08  Chris Dumez  <cdumez@apple.com>
3303
3304         new Comment(undefined) / new Text(undefined) should use default's empty string
3305         https://bugs.webkit.org/show_bug.cgi?id=148973
3306         <rdar://problem/22548042>
3307
3308         Reviewed by Ryosuke Niwa.
3309
3310         new Comment(undefined) / new Text(undefined) should use default's empty string instead of converting
3311         undefined to the "undefined" string:
3312         - https://dom.spec.whatwg.org/#interface-comment (parameter is optional, default value is empty String)
3313         - https://dom.spec.whatwg.org/#text (ditto)
3314
3315         undefined should be treated as if the parameter is missing, in the case the parameter is optional, as
3316         per the Web IDL specification. This patch aligns WebKit's behavior with the specification and the
3317         behavior of Firefox and Chrome.
3318
3319         No new tests, already covered by existing tests.
3320
3321         * bindings/scripts/CodeGeneratorJS.pm:
3322         (GenerateParametersCheck):
3323         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3324         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
3325         * bindings/scripts/test/JS/JSTestObj.cpp:
3326         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
3327
3328 2015-09-08  Chris Dumez  <cdumez@apple.com>
3329
3330         document.importNode(node, deep): deep's default value should be false
3331         https://bugs.webkit.org/show_bug.cgi?id=148959
3332         <rdar://problem/22558915>
3333
3334         Reviewed by Alexey Proskuryakov.
3335
3336         Switch deep parameter's default value for document.importNode() to
3337         false, as per the latest DOM specification:
3338         - https://dom.spec.whatwg.org/#interface-document
3339         - https://dom.spec.whatwg.org/#dom-document-importnode
3340
3341         Firefox and Chrome follow the specification. However, WebKit was using
3342         "true" for deep's default value.
3343
3344         No new tests, already covered by:
3345         imported/w3c/web-platform-tests/dom/nodes/Document-importNode.html
3346
3347         * dom/Document.h:
3348         (WebCore::Document::importNode):
3349
3350 2015-09-08  Per Arne Vollan  <peavo@outlook.com>
3351
3352         [Win][HighDPI] Video window placement is incorrect.
3353         https://bugs.webkit.org/show_bug.cgi?id=148954
3354
3355         Reviewed by Alex Christensen.
3356
3357         We need to scale window dimensions with device scale factor.
3358
3359         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3360         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
3361
3362 2015-09-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3363
3364         Reduce uses of PassRefPtr in fileapi
3365         https://bugs.webkit.org/show_bug.cgi?id=148952
3366
3367         Reviewed by Andreas Kling.
3368
3369         Remove all uses of PassRefPtr in return type. Argument uses of PassRefPtr will be
3370         removed in near future.
3371
3372         * fileapi/FileError.h:
3373         (WebCore::FileError::create):
3374         * fileapi/FileReader.cpp:
3375         (WebCore::FileReader::arrayBufferResult):
3376         * fileapi/FileReader.h:
3377         * fileapi/FileReaderLoader.cpp:
3378         (WebCore::FileReaderLoader::arrayBufferResult):
3379         * fileapi/FileReaderLoader.h:
3380         * fileapi/FileReaderSync.cpp:
3381         (WebCore::FileReaderSync::readAsArrayBuffer):
3382         * fileapi/FileReaderSync.h:
3383         * fileapi/ThreadableBlobRegistry.cpp:
3384         (WebCore::ThreadableBlobRegistry::getCachedOrigin):
3385         * fileapi/ThreadableBlobRegistry.h:
3386
3387 2015-09-07  Chris Fleizach  <cfleizach@apple.com>
3388
3389         AX: Mavericks: Text cursor does not move along with VoiceOver cursor for text fields
3390         https://bugs.webkit.org/show_bug.cgi?id=148891
3391
3392         Reviewed by Mario Sanchez Prada.
3393
3394         Undo the asynchronous dispatch of accessibility setting values on pre El Capitan machines
3395         because it causes focus to not sync correctly.
3396
3397         Test: accessibility/mac/focus-moves-cursor.html
3398
3399         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3400         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
3401         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
3402
3403 2015-09-07  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3404
3405         [CoordinatedGraphics] Remove ScrollingStateScrollingNodeCoordinatedGraphics.cpp
3406         https://bugs.webkit.org/show_bug.cgi?id=148931
3407
3408         Reviewed by Csaba Osztrogon√°c.
3409
3410         ScrollingStateScrollingNodeCoordinatedGraphics.cpp implements nothing. Removed it.
3411
3412         * PlatformEfl.cmake:
3413         * PlatformGTK.cmake:
3414         * WebCore.vcxproj/WebCore.vcxproj:
3415         * WebCore.vcxproj/WebCore.vcxproj.filters:
3416         * page/scrolling/coordinatedgraphics/ScrollingStateScrollingNodeCoordinatedGraphics.cpp: Removed.
3417
3418 2015-09-07  Daniel Bates  <dabates@apple.com>
3419