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