[Win] Unreviewed build fix after r189746
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-09-14  Alex Christensen  <achristensen@webkit.org>
2
3         [Win] Unreviewed build fix after r189746
4
5         * WebCore.vcxproj/WebCoreIncludeCommon.props:
6         Include new legacy directory.
7
8 2015-09-14  Alex Christensen  <achristensen@webkit.org>
9
10         Progress towards CMake on Mac.
11         https://bugs.webkit.org/show_bug.cgi?id=149123
12
13         Reviewed by Chris Dumez.
14
15         * CMakeLists.txt:
16         Added some more files.
17         * PlatformMac.cmake:
18         Added more files and listed the strange ObjC bindings.
19         * contentextensions/DFACombiner.cpp:
20         * contentextensions/DFACombiner.h:
21         Added preprocessor protection.
22         * platform/FileSystem.h:
23         Include utility.  It's needed to compile the different configurations.
24         * platform/ScrollAnimator.cpp:
25         ScrollAnimator is an abstract class on Mac.  Don't compile it.
26         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
27         FontAntialiasingStateSaver.h is only used on iOS.
28         * rendering/RenderThemeMac.mm:
29         config.h needs to be outside the #if !PLATFORM(IOS) to compile correctly without precompiled headers.
30
31 2015-09-14  Brady Eidson  <beidson@apple.com>
32
33         Rename current concrete IDB implementation to "Legacy".
34         https://bugs.webkit.org/show_bug.cgi?id=149118
35
36         Reviewed by Alex Christensen.
37
38         No new tests (No change in behavior).
39
40         This patch makes IDL bindings abstract.
41         It then renames the current concrete implementations of the bindings from "IDB" to "Legacy".
42         Finally it moves those files and their support classes to a "legacy" subfolder.
43
44         * CMakeLists.txt:
45         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
46         * Modules/indexeddb/IDBAny.cpp:
47         * Modules/indexeddb/IDBAny.h:
48         * Modules/indexeddb/IDBCursor.cpp:
49         * Modules/indexeddb/IDBCursor.h:
50         * Modules/indexeddb/IDBCursor.idl:
51         * Modules/indexeddb/IDBCursorWithValue.cpp:
52         * Modules/indexeddb/IDBCursorWithValue.h:
53         * Modules/indexeddb/IDBCursorWithValue.idl:
54         * Modules/indexeddb/IDBDatabase.cpp:
55         * Modules/indexeddb/IDBDatabase.h:
56         * Modules/indexeddb/IDBDatabase.idl:
57         * Modules/indexeddb/IDBFactory.cpp:
58         * Modules/indexeddb/IDBFactory.h:
59         * Modules/indexeddb/IDBFactory.idl:
60         * Modules/indexeddb/IDBIndex.cpp:
61         * Modules/indexeddb/IDBIndex.h:
62         * Modules/indexeddb/IDBIndex.idl:
63         * Modules/indexeddb/IDBObjectStore.cpp:
64         * Modules/indexeddb/IDBObjectStore.h:
65         * Modules/indexeddb/IDBObjectStore.idl:
66         * Modules/indexeddb/IDBOpenDBRequest.cpp:
67         * Modules/indexeddb/IDBOpenDBRequest.h:
68         * Modules/indexeddb/IDBOpenDBRequest.idl:
69         * Modules/indexeddb/IDBRequest.cpp:
70         * Modules/indexeddb/IDBRequest.h:
71         * Modules/indexeddb/IDBRequest.idl:
72         * Modules/indexeddb/IDBTransaction.cpp:
73         * Modules/indexeddb/IDBTransaction.h:
74         * Modules/indexeddb/IDBTransaction.idl:
75         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
76         * Modules/indexeddb/IDBVersionChangeEvent.h:
77         * Modules/indexeddb/legacy/IDBCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCallbacks.h.
78         * Modules/indexeddb/legacy/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp.
79         * Modules/indexeddb/legacy/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.h.
80         * Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp.
81         * Modules/indexeddb/legacy/IDBCursorBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h.
82         * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp.
83         * Modules/indexeddb/legacy/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h.
84         * Modules/indexeddb/legacy/IDBDatabaseCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h.
85         * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp.
86         * Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h.
87         * Modules/indexeddb/legacy/IDBFactoryBackendInterface.h: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h.
88         * Modules/indexeddb/legacy/IDBPendingDeleteCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h.
89         * Modules/indexeddb/legacy/IDBPendingOpenCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h.
90         * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp.
91         * Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h.
92         * Modules/indexeddb/legacy/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp.
93         * Modules/indexeddb/legacy/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h.
94         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp.
95         * Modules/indexeddb/legacy/IDBTransactionBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h.
96         * Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp.
97         * Modules/indexeddb/legacy/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h.
98         * Modules/indexeddb/legacy/LegacyAny.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBAny.cpp.
99         * Modules/indexeddb/legacy/LegacyAny.h: Added.
100         * Modules/indexeddb/legacy/LegacyCursor.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.cpp.
101         * Modules/indexeddb/legacy/LegacyCursor.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.h.
102         * Modules/indexeddb/legacy/LegacyCursorWithValue.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp.
103         * Modules/indexeddb/legacy/LegacyCursorWithValue.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h.
104         * Modules/indexeddb/legacy/LegacyDatabase.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.cpp.
105         * Modules/indexeddb/legacy/LegacyDatabase.h: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.h.
106         * Modules/indexeddb/legacy/LegacyFactory.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.cpp.
107         * Modules/indexeddb/legacy/LegacyFactory.h: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.h.
108         * Modules/indexeddb/legacy/LegacyIndex.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBIndex.cpp.
109         * Modules/indexeddb/legacy/LegacyIndex.h: Added.
110         * Modules/indexeddb/legacy/LegacyObjectStore.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp.
111         * Modules/indexeddb/legacy/LegacyObjectStore.h: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.h.
112         * Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp.
113         * Modules/indexeddb/legacy/LegacyOpenDBRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h.
114         * Modules/indexeddb/legacy/LegacyRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.cpp.
115         * Modules/indexeddb/legacy/LegacyRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.h.
116         * Modules/indexeddb/legacy/LegacyTransaction.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.cpp.
117         * Modules/indexeddb/legacy/LegacyTransaction.h: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.h.
118         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp.
119         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h.
120         * WebCore.xcodeproj/project.pbxproj:
121         * WebCore.vcxproj/WebCore.vcxproj:
122
123 2015-09-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
124
125         [EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
126         https://bugs.webkit.org/show_bug.cgi?id=149110
127
128         Reviewed by Csaba Osztrogonác.
129
130         It is not good implementation we support both create() factory function and public constructor.
131         In EvasGLContext and EvasGLSurface cases, those have supported both. However create() factory is only
132         used by EwkView. Thus let's remove the create() function, then EwkView creates EvasGLContext using
133         std::make_unique<> directly.
134
135         * platform/graphics/efl/EvasGLContext.h:
136         (WebCore::EvasGLContext::create): Deleted.
137         * platform/graphics/efl/EvasGLSurface.h:
138         (WebCore::EvasGLSurface::create): Deleted.
139
140 2015-09-09  Sergio Villar Senin  <svillar@igalia.com>
141
142         min-width/height should default to auto for grid items
143         https://bugs.webkit.org/show_bug.cgi?id=146021
144
145         Reviewed by Darin Adler.
146
147         Based on Blink's r194408, r194863 and r194887 by <rego@igalia.com>.
148
149         From the spec (http://dev.w3.org/csswg/css-grid/#grid-items):
150         "The auto value of min-width and min-height behaves on grid
151         items in the relevant axis analogously to its behavior on flex
152         items in the main axis."
153
154         From now on the default value for min-width and min-height for
155         grid items is auto, meaning that in general, grid items won't
156         shrink bellow their content.
157
158         The change is not exactly the same as the one in Blink because
159         this one takes into account vertical writting modes, something
160         that was not well handled in the original one.
161
162         Tests: fast/css-grid-layout/min-width-height-auto-overflow.html
163                fast/css-grid-layout/min-width-height-auto.html
164
165         * rendering/RenderBox.cpp:
166         (WebCore::RenderBox::computeLogicalWidthInRegion):
167         (WebCore::RenderBox::computeLogicalHeight):
168
169 2015-09-14  Manuel Rego Casasnovas  <rego@igalia.com>
170
171         [css-grid] Percentage columns should remove scrollbar's width
172         https://bugs.webkit.org/show_bug.cgi?id=149116
173
174         Reviewed by Sergio Villar Senin.
175
176         Currently the calculation of percentage columns was not subtracting the
177         scrollbar's size.
178         Fixed RenderGrid::computeUsedBreadthOfSpecifiedLength()
179         to avoid this problem.
180
181         Test: fast/css-grid-layout/grid-percent-track-scrollbar.html
182
183         * rendering/RenderGrid.cpp:
184         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
185
186 2015-09-13  Chris Dumez  <cdumez@apple.com>
187
188         Improve Node pre-insertion validation when the parent is a Document
189         https://bugs.webkit.org/show_bug.cgi?id=149109
190         <rdar://problem/22560436>
191
192         Reviewed by Ryosuke Niwa.
193
194         Improve Node pre-insertion validation when the parent is a Document to
195         match the specification:
196         https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
197         https://dom.spec.whatwg.org/#concept-node-replace
198
199         This affects the following API: Node.insertBefore(), Node.appendChild(),
200         Node.replaceChild().
201
202         WebKit current fails to do the following checks whenever the parent is a
203         Document from pre-insertion validation:
204         1. If the inserted Node is a DocumentFragment, we should make sure it
205           contains only one Element.
206         -> This is because a Document can have only one child that is an
207            Element [1].
208         2.a. If an Element is inserted, we should make sure it is not inserted
209              before a DocumentType.
210         2.b. If a DocumentType is inserted, we should make sure it is not
211              inserted after an Element.
212         -> This is because the DocType must come before the optional Element
213            child [1].
214
215         Firefox and Chrome already match the specification here. This patch
216         aligns WebKit's behavior with those browsers and the specification.
217
218         [1] https://dom.spec.whatwg.org/#node-trees
219
220         No new tests, already covered by existing W3C tests.
221
222         * dom/ContainerNode.cpp:
223         (WebCore::checkAcceptChild):
224         (WebCore::checkAddChild):
225         (WebCore::checkReplaceChild):
226         (WebCore::ContainerNode::insertBefore):
227         (WebCore::ContainerNode::appendChild):
228         (WebCore::containsConsideringHostElements): Deleted.
229         (WebCore::checkAcceptChildGuaranteedNodeTypes): Deleted.
230         * dom/Document.cpp:
231         (WebCore::Document::canAcceptChild):
232         (WebCore::Document::cloneNodeInternal): Deleted.
233         * dom/Document.h:
234
235 2015-09-13  Chris Dumez  <cdumez@apple.com>
236
237         Document.adoptNode() should be able to explicitly adopt a DocumentType node
238         https://bugs.webkit.org/show_bug.cgi?id=149097
239         <rdar://problem/22549345>
240
241         Reviewed by Ryosuke Niwa.
242
243         Document.adoptNode() should be able to explicitly adopt a DocumentType
244         node as per the latest DOM specification:
245         https://dom.spec.whatwg.org/#dom-document-adoptnode
246
247         Chrome and Firefox match the specidicaiton but WebKit was throwing a
248         NotSupportedError.
249
250         No new tests, already covered by existing test.
251
252         * dom/Document.cpp:
253         (WebCore::Document::adoptNode): Deleted.
254
255 2015-09-13  Chris Dumez  <cdumez@apple.com>
256
257         Document.title does not behave according to specification
258         https://bugs.webkit.org/show_bug.cgi?id=149098
259
260         Reviewed by Ryosuke Niwa.
261
262         Update Document.title to behave according to the latest DOM specification:
263         https://html.spec.whatwg.org/multipage/dom.html#document.title
264
265         In particular, the following Web-Exposed changes were made:
266         1. The title Element should be the first title element in the document
267            (in tree order) [1]. Previously, WebKit would use the first title
268            Element *added* to the Document. Document.title returns the text
269            content of the title Element so this change is web-exposed.
270         2. If the title Element is replaced after the title has been set by the
271            JS (via the document.title setter), we should update the value
272            returned by the document.title getter. Previously, WebKit would set
273            a flag if the title was explicitly set by JS via document.title
274            setter and later title element changes would not override the title
275            set by the JS. This behavior isn't specified and does not match the
276            behavior of other browsers.
277
278         The new behavior is also consistent with the behavior of Firefox and
279         Chrome.
280
281         Some refactoring was made for the sake of clarity now that our
282         implementation has changed. See details below.
283
284         [1] https://html.spec.whatwg.org/multipage/dom.html#the-title-element-2
285
286         No new tests, already covered by existing tests.
287
288         * dom/Document.cpp:
289         (WebCore::Document::updateTitleFromTitleElement):
290         New convenience method that calls updateTitle() with the text of the
291         document's current title Element. If there is no title Element, it
292         clears the title.
293
294         (WebCore::Document::updateTitleElement):
295         Method which updates the Document's title Element whenever a title
296         Element is added or removed from the Document. Once the title Element
297         is updated, it takes care of calling updateTitleFromTitleElement() to
298         update the Document's title.
299
300         (WebCore::Document::titleElementAdded):
301         (WebCore::Document::titleElementRemoved):
302         (WebCore::Document::titleElementTextChanged):
303         New Document public API called by HTMLTitleElement / SVGTitleElement
304         whenever a title Element is added / removed from the Document or
305         whenever the title element's text has changed. These methods will
306         take care of calling updateTitleElement() / updateTitleFromTitleElement()
307         as necessary.
308         Previously, we would only have 2 methods:
309         - setTitleElement() which would be called whenever a title Element was
310           added to the document or when its text had changed. The name was
311           confusing because it would not necessarily set the document's title
312           Element and it would be used both for title element update and a
313           simple title update. This method has been split into 2:
314           titleElementAdded() and titleElementTextChanged().
315         - removeTitle() which would be called whenever a title Element was
316           removed. The naming was confusing because it would not necessarily
317           remove the Document's title Element. This is now called
318           titleElementRemoved().
319
320         * html/HTMLTitleElement.cpp:
321         (WebCore::HTMLTitleElement::insertedInto):
322         Call the new titleElementAdded() instead of setTitleElement().
323
324         (WebCore::HTMLTitleElement::removedFrom):
325         Call the new titleElementRemoved() instead of removeTitle().
326
327         (WebCore::HTMLTitleElement::childrenChanged):
328         Call the new titleElementTextChanged() instead of
329         setTitleElement() / removeTitle() as we don't really want
330         to remove or add a title Element. We merely want to notify
331         the document that the title element text has changed in
332         case it is the current title Element of the Document.
333
334         (WebCore::HTMLTitleElement::computedTextWithDirection):
335         Rename textWithDirection() to computedTextWithDirection() to
336         make it clear it is not a simple getter and make it private
337         as it is only used to set the m_title member which caches the
338         computed text.
339
340         * html/HTMLTitleElement.h:
341         Add new textWithDirection() getter which returns m_title. This
342         is needed so that Document can query the title of the Element.
343         Previously, HTMLTitleElement would pass directly m_title to
344         the Document when calling Document::setTitleElement().
345
346         * svg/SVGTitleElement.cpp:
347         (WebCore::SVGTitleElement::insertedInto):
348         Call the new titleElementAdded() instead of setTitleElement().
349
350         (WebCore::SVGTitleElement::removedFrom):
351         Call the new titleElementRemoved() instead of removeTitle().
352
353         (WebCore::SVGTitleElement::childrenChanged):
354         Call the new titleElementTextChanged() instead of
355         setTitleElement().
356
357 2015-09-13  Chris Dumez  <cdumez@apple.com>
358
359         document.lastModified should use the user's local time zone
360         https://bugs.webkit.org/show_bug.cgi?id=149092
361         <rdar://problem/22567705>
362
363         Reviewed by Ryosuke Niwa.
364
365         document.lastModified should use the user's local time zone:
366         https://html.spec.whatwg.org/multipage/dom.html#dom-document-lastmodified
367
368         Chrome and Firefox comply with the specification but WebKit was using
369         UTC. This patch aligns WebKit's behavior with the specification and
370         other browsers.
371
372         No new tests, already covered by existing tests.
373
374         * dom/Document.cpp:
375         (WebCore::Document::lastModified):
376         (WebCore::Document::setCookieURL): Deleted.
377
378 2015-09-13  Chris Dumez  <cdumez@apple.com>
379
380         Node.baseURI should not return null for detached nodes
381         https://bugs.webkit.org/show_bug.cgi?id=149104
382         <rdar://problem/22559535>
383
384         Reviewed by Sam Weinig.
385
386         Node.baseURI should not return null for detached nodes. It should return
387         the node document's base URL. The node document is set when the node is
388         created so it is valid even if the node is detached [1]:
389         https://dom.spec.whatwg.org/#dom-node-baseuri
390
391         WebKit was traversing the ancestors to find the base URL, which only
392         works if the node is attached. Also, WebKit was taking into account
393         the xml:base attribute when computing the baseURI.
394
395         Both Chrome and Firefox already dropped support for xml:base:
396         https://code.google.com/p/chromium/issues/detail?id=341854
397         https://bugzilla.mozilla.org/show_bug.cgi?id=903372
398
399         Firefox complies with the specification. Chrome's baseURI still only
400         works for attached Nodes as their implementation still traverses the
401         DOM tree, despite dropping support for xml:base.
402
403         This patch drops support xml:base when computing Node.baseURI, as
404         Firefox, Chrome and the latest DOM specification do. It also makes
405         Node.baseURI work for detached Nodes by returning the base URL of the
406         node Document. This means we no longer have to traverse the Node's
407         ancestors in the DOM tree. This is consistent with the behavior of
408         Firefox and the latest DOM specification.
409
410         This patch does not drop the SVGElement.xmlbase attribute yet. However,
411         we should probably consider making this change as well given that:
412         - The SVG2 specification dropped it
413         - Chrome dropped it.
414         - It no longers impacts Node.baseURI
415
416         [1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=20976
417
418         No new tests, already covered by existing test.
419
420         * dom/Document.cpp:
421         (WebCore::Document::setContent): Deleted.
422         * dom/Document.h:
423         (WebCore::Document::inputCursor): Deleted.
424         * dom/DocumentType.cpp:
425         (WebCore::DocumentType::nodeName): Deleted.
426         * dom/DocumentType.h:
427         * dom/Element.cpp:
428         (WebCore::Element::imageSourceURL): Deleted.
429         (WebCore::Element::rendererIsNeeded): Deleted.
430         (WebCore::Element::createElementRenderer): Deleted.
431         (WebCore::Element::insertedInto): Deleted.
432         * dom/Element.h:
433         * dom/Node.cpp:
434         (WebCore::Node::baseURI):
435         * dom/Node.h:
436         * svg/SVGElement.idl:
437
438 2015-09-13  Chris Dumez  <cdumez@apple.com>
439
440         CharacterData API parameters should not be optional
441         https://bugs.webkit.org/show_bug.cgi?id=149101
442         <rdar://problem/22546954>
443
444         Reviewed by Sam Weinig.
445
446         CharacterData API parameters should not be optional as per the DOM
447         specification:
448         https://dom.spec.whatwg.org/#characterdata
449
450         The parameters are also mandatory in Firefox and Chrome. However,
451         those parameters are optional in WebKit. When DOMString parameters
452         were omitted, we would use the "undefined" string instead. When
453         unsigned long parameters were omitted, we would use 0 instead.
454         This patch aligns our behavior with the specification and other
455         major browsers.
456
457         No new tests, already covered by existing tests.
458
459         * dom/CharacterData.cpp:
460         (WebCore::CharacterData::appendData):
461         * dom/CharacterData.h:
462         * dom/CharacterData.idl:
463         * dom/Element.cpp:
464         (WebCore::Element::mergeWithNextTextNode):
465         * dom/Node.cpp:
466         (WebCore::Node::normalize):
467         * xml/parser/XMLDocumentParser.cpp:
468         (WebCore::XMLDocumentParser::exitText):
469
470 2015-09-13  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
471
472         Remove all uses of PassRefPtr in crypto, storage, and history
473         https://bugs.webkit.org/show_bug.cgi?id=149091
474
475         Reviewed by Andreas Kling.
476
477         * crypto/CryptoKeyPair.cpp:
478         (WebCore::CryptoKeyPair::CryptoKeyPair):
479         * crypto/CryptoKeyPair.h:
480         (WebCore::CryptoKeyPair::create):
481         * crypto/SubtleCrypto.h:
482         (WebCore::SubtleCrypto::create):
483         * crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
484         (WebCore::CryptoKeyRSA::create):
485         * crypto/keys/CryptoKeyAES.cpp:
486         (WebCore::CryptoKeyAES::generate):
487         * crypto/keys/CryptoKeyAES.h:
488         * crypto/keys/CryptoKeyHMAC.cpp:
489         (WebCore::CryptoKeyHMAC::generate):
490         * crypto/keys/CryptoKeyHMAC.h:
491         * crypto/keys/CryptoKeyRSA.h:
492         * crypto/mac/CryptoKeyRSAMac.cpp:
493         (WebCore::CryptoKeyRSA::create):
494         * history/BackForwardController.cpp:
495         (WebCore::BackForwardController::BackForwardController):
496         * history/BackForwardController.h:
497         * history/HistoryItem.cpp:
498         (WebCore::HistoryItem::setStateObject):
499         (WebCore::HistoryItem::setFormData):
500         * history/HistoryItem.h:
501         (WebCore::HistoryItem::stateObject):
502         * loader/EmptyClients.cpp:
503         * page/Page.cpp:
504         (WebCore::Page::Page):
505         * storage/Storage.cpp:
506         (WebCore::Storage::create):
507         (WebCore::Storage::Storage):
508         * storage/Storage.h:
509         * storage/StorageArea.h:
510         * storage/StorageMap.cpp:
511         (WebCore::StorageMap::copy):
512         (WebCore::StorageMap::setItem):
513         (WebCore::StorageMap::setItemIgnoringQuota):
514         (WebCore::StorageMap::removeItem):
515         * storage/StorageMap.h:
516         * storage/StorageNamespace.h:
517
518 2015-09-12  Chris Dumez  <cdumez@apple.com>
519
520         window.EventTarget should exist
521         https://bugs.webkit.org/show_bug.cgi?id=149085
522         <rdar://problem/22546774>
523
524         Reviewed by Sam Weinig.
525
526         Drop [NoInterfaceObject] for the EventTarget interface to match Chrome,
527         Firefox and the specification:
528         https://dom.spec.whatwg.org/#interface-eventtarget
529
530         No new tests, already covered by existing tests.
531
532         * dom/EventTarget.idl:
533
534 2015-09-12  Brian Burg  <bburg@apple.com>
535
536         Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
537         https://bugs.webkit.org/show_bug.cgi?id=149071
538
539         Reviewed by Joseph Pecoraro.
540
541         Be consistent about prefixing pages, inspector controllers, and window controllers
542         with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
543         in the frontend connection code, which are tracked by https://webkit.org/b/149006.
544
545         No new tests, no behavior change.
546
547         * WebCore.order:
548         * inspector/InspectorClient.h:
549         * inspector/InspectorController.cpp:
550         (WebCore::InspectorController::inspectedPageDestroyed):
551         (WebCore::InspectorController::show):
552         (WebCore::InspectorController::close):
553         * inspector/InspectorFrontendClientLocal.cpp:
554         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
555         (WebCore::InspectorFrontendClientLocal::~InspectorFrontendClientLocal):
556         (WebCore::InspectorFrontendClientLocal::canAttachWindow):
557         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
558         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
559         (WebCore::InspectorFrontendClientLocal::openInNewTab):
560         (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
561         (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
562         (WebCore::InspectorFrontendClientLocal::isUnderTest):
563         * inspector/InspectorFrontendClientLocal.h:
564         * inspector/InspectorOverlay.cpp:
565         (WebCore::InspectorOverlay::freePage):
566         * loader/EmptyClients.h:
567
568 2015-09-12  Chris Dumez  <cdumez@apple.com>
569
570         ChildNode.replaceWith() without argument should replace the node with an empty DocumentFragment
571         https://bugs.webkit.org/show_bug.cgi?id=149073
572         <rdar://problem/22547801>
573
574         Reviewed by Ryosuke Niwa.
575
576         ChildNode.replaceWith() without argument should replace the node with 
577         an empty DocumentFragment, as per the specification:
578         https://dom.spec.whatwg.org/#dom-childnode-replacewith
579         https://dom.spec.whatwg.org/#converting-nodes-into-a-node
580
581         Previously, WebKit did not do anything in this case. This patch fixes
582         it.
583
584         No new tests, already covered by existing test.
585
586         * dom/Node.cpp:
587         (WebCore::Node::replaceWith):
588
589 2015-09-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
590
591         Remove all uses of PassRefPtr in WebCore/plugins
592         https://bugs.webkit.org/show_bug.cgi?id=149055
593
594         Reviewed by Darin Adler.
595
596         * plugins/DOMMimeType.cpp:
597         (WebCore::DOMMimeType::DOMMimeType):
598         (WebCore::DOMMimeType::enabledPlugin):
599         * plugins/DOMMimeType.h:
600         (WebCore::DOMMimeType::create):
601         * plugins/DOMMimeTypeArray.cpp:
602         (WebCore::DOMMimeTypeArray::item):
603         * plugins/DOMMimeTypeArray.h:
604         * plugins/DOMPlugin.cpp:
605         (WebCore::DOMPlugin::item):
606         * plugins/DOMPlugin.h:
607         * plugins/DOMPluginArray.cpp:
608         (WebCore::DOMPluginArray::item):
609         * plugins/DOMPluginArray.h:
610         * plugins/PluginViewBase.h:
611         (WebCore::PluginViewBase::bindingInstance):
612
613 2015-09-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
614
615         Remove all uses of PassRefPtr in WebCore/accessibility and WebCore/fileapi
616         https://bugs.webkit.org/show_bug.cgi?id=149059
617
618         Reviewed by Darin Adler.
619
620         * accessibility/AXObjectCache.cpp:
621         * accessibility/AccessibilityObject.cpp:
622         (WebCore::rangeClosestToRange):
623         (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
624         (WebCore::AccessibilityObject::selectionRange):
625         (WebCore::AccessibilityObject::selectText):
626         * accessibility/AccessibilityObject.h:
627         * accessibility/ios/AXObjectCacheIOS.mm:
628         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
629         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
630         (-[WebAccessibilityObjectWrapper textMarkerForPosition:]):
631         * accessibility/mac/AXObjectCacheMac.mm:
632         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
633         (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
634         * fileapi/FileList.h:
635         (WebCore::FileList::append):
636         * fileapi/WebKitBlobBuilder.cpp:
637         (WebCore::BlobBuilder::append):
638         * fileapi/WebKitBlobBuilder.h:
639
640 2015-09-11  Said Abou-Hallawa  <sabouhallawa@apple.com>
641
642         SVGColor custom text format is different from the CSS color custom text format
643         https://bugs.webkit.org/show_bug.cgi?id=148879
644
645         Reviewed by Daniel Bates.
646
647         Implement the serialization of a CSS color value as it is described in
648         <https://drafts.csswg.org/cssom/#serializing-css-values>. Add the new
649         function Color::cssText() which is refactored from the existing function
650         Color::serialized(). Use the new function for serializing the SVGColor
651         always and also for Color but only when the alpha component is not 1.
652
653         Test: svg/css/computed-style-rgb-color.html
654
655         * css/CSSPrimitiveValue.cpp:
656         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Move the code
657         for serializing the color from this function to Color::cssText().
658         
659         * platform/graphics/Color.cpp:
660         (WebCore::Color::serialized): Call Color::cssText() if the alpha component
661         is not 1 and delete the repeated code. 
662         
663         (WebCore::Color::cssText):
664         * platform/graphics/Color.h: Add the new function to the header file.
665         
666         * svg/SVGColor.cpp:
667         (WebCore::SVGColor::customCSSText): Call Color::cssText() always instead
668         of calling Color::serialized() for serializing the SVGColor.
669
670 2015-09-11  Nan Wang  <n_wang@apple.com>
671
672         AX: ARIA 1.1 @aria-current
673         https://bugs.webkit.org/show_bug.cgi?id=146012
674
675         Reviewed by Chris Fleizach.
676
677         Tests: accessibility/aria-current.html
678                inspector/dom/getAccessibilityPropertiesForNode_ariaCurrent.html
679
680         Added support for ARIA 1.1 aria-current.
681
682         * accessibility/AccessibilityObject.cpp:
683         (WebCore::AccessibilityObject::invalidStatus):
684         (WebCore::AccessibilityObject::ariaCurrentState):
685         (WebCore::AccessibilityObject::hasTagName):
686         * accessibility/AccessibilityObject.h:
687         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
688         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
689         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
690         * html/HTMLAttributeNames.in:
691         * inspector/InspectorDOMAgent.cpp:
692         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
693
694 2015-09-11  Chris Dumez  <cdumez@apple.com>
695
696         DOMTokenList update steps for classList don't follow the spec
697         https://bugs.webkit.org/show_bug.cgi?id=148589
698         <rdar://problem/22547443>
699
700         Reviewed by Ryosuke Niwa and Darin Adler.
701
702         Update our DOMTokenList implementation to behave according to
703         the latest DOM specification:
704         https://dom.spec.whatwg.org/#interface-domtokenlist
705
706         In particular, the following changes were made:
707         - The stringifier now returns the result of the ordered set serializer
708           for tokens. This means that we drop duplicate spaces and extra spaces
709           [1][2][3].
710         - DOMSettableTokenList.value now returns the result of the ordered set
711           serializer for tokens [4] as well.
712         - When the DOMTokenList's tokens are updated and there is an associated
713           Element attribute, we set the attribute value to be the the ordered
714           set serializer for tokens. This is according to the DOMTokenList
715           update steps in the specification [6]. Chrome does not match the
716           specification either.
717
718         Edge browser behaves according to the specification already. Firefox was
719         implementing this via [7] but no recent progress. This makes the JS API
720         nicer to use and interest was shown by jQuery Team.
721
722         The following refactoring was done:
723         - Merge ClassList / RelList into a single AttributeDOMTokenList class
724           as their code is mostly duplicated and the only thing that changes
725           is which attribute is associated (class vs rel). AttributeDOMTokenList
726           now keeps the attribute name as a member so it could be used for any
727           attribute. AttributeDOMTokenList overrides DOMTokenList's
728           updateAfterTokenChange() to do update the attribute's value as per
729           [6].
730         - We no longer use a SpaceSplitString for the internal representation
731           as we need to sanitize the tokens (drop duplicates and extra spaces).
732           DOMTokenList now has an internal Vector<AtomicString> containing the
733           tokens that is constructed from the algorithm in [2]. As a result,
734           most of the logic is now in DOMTokenList instead of its subclasses
735           which means that most methods are no longer virtual. We only have
736           one virtual function named updateAfterTokenChange() to do the update
737           steps as AttributeDOMTokenList needs to update the associated
738           attribute.
739
740         This change does not seem to impact Dromaeo.
741
742         [1] https://dom.spec.whatwg.org/#concept-ordered-set-serializer
743         [2] https://dom.spec.whatwg.org/#ordered%20sets
744         [3] https://dom.spec.whatwg.org/#stringification-behavior
745         [4] https://dom.spec.whatwg.org/#dom-domsettabletokenlist-value
746         [5] https://dom.spec.whatwg.org/#dom-domtokenlist-contains (step 2)
747         [6] https://dom.spec.whatwg.org/#concept-DTL-update
748         [7] https://bugzilla.mozilla.org/show_bug.cgi?id=869788
749
750         No new tests, already covered by existing tests.
751
752         * dom/Element.cpp:
753         (WebCore::Element::classAttributeChanged):
754         When the class attribute changes, make sure to update the associated
755         classList if there is one. We could do this lazily if it turns out
756         to be a performance problem. However, chances are this is not as
757         classList is rarely used and we only need to update the classList if
758         it was ever accessed by JS for this Element.
759
760         (WebCore::Element::insertedInto):
761         Drop call to clearClassListValueForQuirksMode() as we no longer need
762         to maintain a separate SpaceSplitString for classes when in quirks
763         mode. This is because AttributeDOMTokenList now has its own Vector
764         of classes in their original cases. It therefore no longer relies on
765         Element::classNames() which has its case folded when in quirks mode.
766
767         (WebCore::Element::classList):
768         Return a AttributeDOMTokenList instead of a ClassList.
769
770         * html/AttributeDOMTokenList.h: Added.
771         * html/AttributeDOMTokenList.cpp: Added.
772         (WebCore::AttributeDOMTokenList::AttributeDOMTokenList):
773         Call DOMTokenList::setValue() using the attribute's value so that
774         DOMTokenList can initialize its token Vector.
775
776         (WebCore::AttributeDOMTokenList::attributeValueChanged):
777         If the attribute value was changed by somebody else that the
778         AttributeDOMTokenList, call DOMTokenList::setValue() so that it
779         can update its token Vector.
780
781         (WebCore::AttributeDOMTokenList::updateAfterTokenChange):
782         This is called whenever the token Vector is changed via JS. In
783         this case, we update the associated attribute's value.
784
785         * html/ClassList.cpp: Removed.
786         * html/ClassList.h: Removed.
787         Now merged into AttributeDOMTokenList.
788
789         * html/DOMSettableTokenList.cpp:
790         * html/DOMSettableTokenList.h:
791         Get rid of most of the code as most of the logic is now in
792         DOMTokenList parent class.
793
794         * html/DOMTokenList.cpp:
795         (WebCore::DOMTokenList::validateToken):
796         Use a String parameter instead of an AtomicString as this method does
797         not need the input the be an AtomicString. This avoid atomizing
798         String unnecessarily.
799
800         (WebCore::DOMTokenList::validateTokens):
801         Use a modern loop.
802
803         (WebCore::DOMTokenList::contains):
804         No longer use containsInternal() virtual function. We can now check
805         the internal token Vector.
806
807         (WebCore::DOMTokenList::add):
808         Now update the internal Vector. Use a modern loop and try to minimize
809         Vector capacity reallocation.
810
811         (WebCore::DOMTokenList::remove):
812         Now update the internal Vector.
813
814         (WebCore::DOMTokenList::toggle):
815         Now update the internal Vector and refactor the code so that it is
816         structured exactly as the algorithm in the specification for
817         clarity.
818
819         (WebCore::DOMTokenList::value):
820         Now return the result of the ordered set serializer for tokens. This
821         method is used for:
822         - The DOMSettableTokenList.value() getter
823         - The DOMTokenList stringifier
824         - As attribute value when updating the associated attribute in
825           AttributeDOMTokenList.
826
827         (WebCore::DOMTokenList::setValue):
828         Update the internal Vector using the algorithm in [2].
829
830         * html/DOMTokenList.h:
831         (WebCore::DOMTokenList::length):
832         No longer virtual, now returns the size of the internal token Vector.
833
834         (WebCore::DOMTokenList::item):
835         No longer virtual, now returns the token at the given index in the
836         internal Vector.
837
838         * html/HTMLAnchorElement.cpp:
839         (WebCore::HTMLAnchorElement::relList):
840         Now return a AttributeDOMTokenList.
841
842         * html/HTMLLinkElement.cpp:
843         (WebCore::HTMLLinkElement::relList):
844         Now return a AttributeDOMTokenList.
845
846         * html/RelList.cpp: Removed.
847         * html/RelList.h: Removed.
848         Now merged into AttributeDOMTokenList.
849
850 2015-09-11  Chris Dumez  <cdumez@apple.com>
851
852         Element.tagName should be upper-case for HTML elements in HTML documents
853         https://bugs.webkit.org/show_bug.cgi?id=148843
854         <rdar://problem/22559081>
855
856         Reviewed by Ryosuke Niwa.
857
858         Element.tagName should be upper-case for HTML elements in HTML documents,
859         as per the DOM specification:
860         https://dom.spec.whatwg.org/#dom-element-tagname
861
862         Previously, WebKit would fail to upper-case the tagname if the element's
863         tag had a prefix. This patch corrects this. This aligns our behavior with
864         Firefox, Chrome and IE.
865
866         No new tests, already covered by existing tests.
867
868         * html/HTMLElement.cpp:
869         (WebCore::HTMLElement::nodeName):
870
871 2015-09-11  Chris Dumez  <cdumez@apple.com>
872
873         document.body = "text" should throw a TypeError, not a HierarchyRequestError
874         https://bugs.webkit.org/show_bug.cgi?id=149057
875         <rdar://problem/22567157>
876
877         Reviewed by Ryosuke Niwa.
878
879         document.body = "text" should throw a TypeError, not a
880         HierarchyRequestError:
881         https://html.spec.whatwg.org/multipage/dom.html#dom-document-body
882
883         This is because "text" is a DOMString and it cannot be converted into an
884         HTMLElement?. Therefore, the WebIDL specification says we should throw a
885         TypeError in this case.
886
887         Chrome and Firefox throw the right exception.
888
889         No new tests, already covered by existing test.
890
891         * dom/Document.idl:
892
893 2015-09-11  Andreas Kling  <akling@apple.com>
894
895         [JSC] Weak should only accept cell pointees.
896         <https://webkit.org/b/148955>
897
898         Reviewed by Geoffrey Garen.
899
900         Update WebCore bindings for the new Weak and Weak-related signatures.
901
902         * bindings/js/JSCSSRuleListCustom.cpp:
903         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
904         * bindings/js/JSCSSValueCustom.cpp:
905         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
906         (WebCore::JSCSSValueOwner::finalize):
907         * bindings/js/JSCallbackData.cpp:
908         (WebCore::JSCallbackDataWeak::WeakOwner::isReachableFromOpaqueRoots):
909         * bindings/js/JSCallbackData.h:
910         * bindings/js/JSMutationObserverCustom.cpp:
911         (WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
912         * bindings/js/JSNodeCustom.cpp:
913         (WebCore::isReachableFromDOM):
914         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
915         * bindings/js/JSNodeListCustom.cpp:
916         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
917         * bindings/js/JSTextTrackCueCustom.cpp:
918         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
919         * bindings/js/WebCoreTypedArrayController.cpp:
920         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
921         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
922         * bindings/js/WebCoreTypedArrayController.h:
923         * bindings/scripts/CodeGeneratorJS.pm:
924         (GenerateHeader):
925         (GenerateImplementation):
926         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
927         (WebCore::JSTestActiveDOMObjectOwner::isReachableFromOpaqueRoots):
928         (WebCore::JSTestActiveDOMObjectOwner::finalize):
929         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
930         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
931         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::isReachableFromOpaqueRoots):
932         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
933         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
934         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
935         (WebCore::JSTestCustomNamedGetterOwner::isReachableFromOpaqueRoots):
936         (WebCore::JSTestCustomNamedGetterOwner::finalize):
937         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
938         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
939         (WebCore::JSTestEventConstructorOwner::isReachableFromOpaqueRoots):
940         (WebCore::JSTestEventConstructorOwner::finalize):
941         * bindings/scripts/test/JS/JSTestEventConstructor.h:
942         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
943         (WebCore::JSTestEventTargetOwner::isReachableFromOpaqueRoots):
944         (WebCore::JSTestEventTargetOwner::finalize):
945         * bindings/scripts/test/JS/JSTestEventTarget.h:
946         * bindings/scripts/test/JS/JSTestException.cpp:
947         (WebCore::JSTestExceptionOwner::isReachableFromOpaqueRoots):
948         (WebCore::JSTestExceptionOwner::finalize):
949         * bindings/scripts/test/JS/JSTestException.h:
950         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
951         (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots):
952         (WebCore::JSTestGenerateIsReachableOwner::finalize):
953         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
954         * bindings/scripts/test/JS/JSTestInterface.cpp:
955         (WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots):
956         (WebCore::JSTestInterfaceOwner::finalize):
957         * bindings/scripts/test/JS/JSTestInterface.h:
958         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
959         (WebCore::JSTestMediaQueryListListenerOwner::isReachableFromOpaqueRoots):
960         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
961         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
962         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
963         (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots):
964         (WebCore::JSTestNamedConstructorOwner::finalize):
965         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
966         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
967         (WebCore::JSTestNondeterministicOwner::isReachableFromOpaqueRoots):
968         (WebCore::JSTestNondeterministicOwner::finalize):
969         * bindings/scripts/test/JS/JSTestNondeterministic.h:
970         * bindings/scripts/test/JS/JSTestObj.cpp:
971         (WebCore::JSTestObjOwner::isReachableFromOpaqueRoots):
972         (WebCore::JSTestObjOwner::finalize):
973         * bindings/scripts/test/JS/JSTestObj.h:
974         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
975         (WebCore::JSTestOverloadedConstructorsOwner::isReachableFromOpaqueRoots):
976         (WebCore::JSTestOverloadedConstructorsOwner::finalize):
977         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
978         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
979         (WebCore::JSTestOverrideBuiltinsOwner::isReachableFromOpaqueRoots):
980         (WebCore::JSTestOverrideBuiltinsOwner::finalize):
981         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
982         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
983         (WebCore::JSTestSerializedScriptValueInterfaceOwner::isReachableFromOpaqueRoots):
984         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
985         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
986         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
987         (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
988         (WebCore::JSTestTypedefsOwner::finalize):
989         * bindings/scripts/test/JS/JSTestTypedefs.h:
990         * bindings/scripts/test/JS/JSattribute.cpp:
991         (WebCore::JSattributeOwner::isReachableFromOpaqueRoots):
992         (WebCore::JSattributeOwner::finalize):
993         * bindings/scripts/test/JS/JSattribute.h:
994         * bindings/scripts/test/JS/JSreadonly.cpp:
995         (WebCore::JSreadonlyOwner::isReachableFromOpaqueRoots):
996         (WebCore::JSreadonlyOwner::finalize):
997         * bindings/scripts/test/JS/JSreadonly.h:
998         * bridge/runtime_root.cpp:
999         (JSC::Bindings::RootObject::finalize):
1000         * bridge/runtime_root.h:
1001
1002 2015-09-10  Chris Fleizach  <cfleizach@apple.com>
1003
1004         AX: Mavericks: Text cursor does not move along with VoiceOver cursor for text fields
1005         https://bugs.webkit.org/show_bug.cgi?id=148891
1006
1007         Reviewed by Alexey Proskuryakov.
1008
1009         Asychronous focus setting DOES work on Yosemite, just not Mavericks.
1010
1011         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1012         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1013         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
1014
1015 2015-09-10  David Hyatt  <hyatt@apple.com>
1016
1017         [New Block-Inside-Inline Model] Self-collapsing block check needs to account for anonymous inline blocks
1018         https://bugs.webkit.org/show_bug.cgi?id=149042
1019
1020         Reviewed by Dean Jackson.
1021
1022         Added new tests in fast/block/inside-inlines/
1023
1024         * rendering/InlineFlowBox.cpp:
1025         * rendering/InlineFlowBox.h:
1026         (WebCore::InlineFlowBox::anonymousInlineBlock):
1027         Add a new accessor to get the anonymousInlineBlock() for lines that wrap them.
1028
1029         * rendering/RenderBlock.cpp:
1030         (WebCore::RenderBlock::childrenPreventSelfCollapsing):
1031         (WebCore::RenderBlock::isSelfCollapsingBlock):
1032         isSelfCollapsingBlock() now calls a virtual method that checks lines/children called childrenPreventSelfCollapsing.
1033         This lets us farm out the lines check to the derived RenderBlockFlow class.
1034
1035         * rendering/RenderBlock.h:
1036         (WebCore::RenderBlock::childrenPreventSelfCollapsing):
1037         Added new virtual method for checking children.
1038
1039         * rendering/RenderBlockFlow.cpp:
1040         * rendering/RenderBlockFlow.h:
1041         (WebCore::RenderBlockFlow::childrenPreventSelfCollapsing):
1042         Overridden to ensure that blocks can still be self-collapsing if they only contain anonymous inline-block lines that
1043         are also self-collapsing.
1044
1045 2015-09-10  Jinyoung Hur  <hur.ims@navercorp.com>
1046
1047         [WebGL][GLES] bad shaders should not be linked not only for GL but also for GL ES
1048         https://bugs.webkit.org/show_bug.cgi?id=148794
1049
1050         Reviewed by Dean Jackson.
1051
1052         Checking bad shaders, precision matching and varyings packing are all valid for GL ES too.
1053
1054         Test: webgl/1.0.2/conformance/programs/program-test.html
1055
1056         * html/canvas/WebGLRenderingContextBase.cpp:
1057         (WebCore::WebGLRenderingContextBase::linkProgram):
1058
1059 2015-09-10  Jinyoung Hur  <hur.ims@navercorp.com>
1060
1061         Static variables in GraphicsContext3DOpenGLCommon should be avoided because of the race condition
1062         https://bugs.webkit.org/show_bug.cgi?id=148957
1063
1064         Reviewed by Dean Jackson.
1065
1066         There is no guarantee that only one thread calls GraphicsContext3D::compileShader() at a time so it would be 
1067         better to use a thread local storage variable rather than use a static variable.
1068
1069         No new tests. No behavioural changes.
1070
1071         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1072         (WebCore::getCurrentNameHashMapForShader):
1073         (WebCore::setCurrentNameHashMapForShader):
1074         (WebCore::nameHashForShader):
1075         (WebCore::GraphicsContext3D::compileShader):
1076         (WebCore::GraphicsContext3D::mappedSymbolName):
1077
1078 2015-09-10  Chris Dumez  <cdumez@apple.com>
1079
1080         Node.appendChild(null) / replaceChild(null, null) / removeChild(null) / insertBefore(null, ref) should throw a TypeError
1081         https://bugs.webkit.org/show_bug.cgi?id=148971
1082         <rdar://problem/22560883>
1083         <rdar://problem/22559225>
1084
1085         Reviewed by Ryosuke Niwa.
1086
1087         Node.appendChild(null) / replaceChild(null, null) / removeChild(null)
1088         and insertBefore(null, ref) should throw a TypeError instead of a
1089         NotFoundError, as per the specification:
1090         https://dom.spec.whatwg.org/#node
1091
1092         The parameters are not nullable so the Web IDL specification says
1093         we should throw a TypeError in this case.
1094
1095         This patch moves the null-checking from ContainerNode to the methods
1096         on Node. The null-checking is supposed to be done by the bindings code
1097         but our generator currently does not support this so we do the null
1098         checking as close to the bindings as possible. The bindings code is
1099         calling the methods on Node. This also makes sure we throw a TypeError
1100         for null-argument when the Node is not a ContainerNode. For e.g.
1101         Text.appendChild(null) should throw a TypeError too.
1102
1103         The methods on ContainerNode now take references insteaad of pointer
1104         parameters now that the null-checking is done at the call site in
1105         Node. This lead to a lot of code update as those methods are used
1106         a lot throughout the code base.
1107
1108         No new tests, already covered by pre-existing layout tests.
1109
1110 2015-09-10  Daniel Bates  <dabates@apple.com>
1111
1112         Write a test to ensure we don't regress processing of tasks when page defers loading
1113         https://bugs.webkit.org/show_bug.cgi?id=135882
1114         <rdar://problem/22550497>
1115
1116         Reviewed by Darin Adler.
1117
1118         Towards adding a test for <https://bugs.webkit.org/show_bug.cgi?id=135688>, add a window.internals
1119         function, setPageDefersLoading, to enable and disable whether the page defers loading.
1120
1121         Test: storage/websql/success-callback-when-page-defers-loading.html
1122
1123         * testing/Internals.cpp:
1124         (WebCore::Internals::resetToConsistentState): Reset defers loading for the page to false.
1125         (WebCore::Internals::setPageDefersLoading): Added.
1126         * testing/Internals.h:
1127         * testing/Internals.idl: Added IDL declaration setPageDefersLoading.
1128
1129 2015-09-10  Sergio Villar Senin  <svillar@igalia.com>
1130
1131         min-width/height should default to auto for flexbox items
1132         https://bugs.webkit.org/show_bug.cgi?id=146020
1133
1134         Reviewed by David Hyatt.
1135
1136         Based on Blink's r193665, r194062, r194887 and r195930 by <cbiesinger@chromium.org>.
1137
1138         As specified here
1139         http://dev.w3.org/csswg/css-flexbox/#min-size-auto the default
1140         value of min-{width|height} is auto for flex items.
1141
1142         In case this patch breaks any website (as it's changing the
1143         default value of those properties) the fix is likely to add:
1144
1145         min-width: 0;
1146         min-height: 0;
1147
1148         to any relevant flexitems.
1149
1150         Test: css3/flexbox/min-size-auto.html
1151
1152         * css/CSSComputedStyleDeclaration.cpp:
1153         (WebCore::isFlexOrGrid): New helper method to identify grids and flexs.
1154         (WebCore::ComputedStyleExtractor::propertyValue): Return auto
1155         for flex items if min-width/height is auto.
1156         * css/CSSParser.cpp:
1157         (WebCore::CSSParser::parseValue):
1158         * html/shadow/SliderThumbElement.cpp:
1159         * rendering/RenderBox.cpp:
1160         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
1161         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
1162         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1163         (WebCore::RenderBox::computeLogicalHeight):
1164         (WebCore::RenderBox::computeLogicalHeightUsing):
1165         (WebCore::RenderBox::computeContentLogicalHeight):
1166         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
1167         (WebCore::RenderBox::computeReplacedLogicalWidth):
1168         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
1169         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1170         (WebCore::RenderBox::computeReplacedLogicalHeight):
1171         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
1172         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1173         (WebCore::RenderBox::availableLogicalHeightUsing):
1174         (WebCore::RenderBox::computePositionedLogicalWidth):
1175         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1176         (WebCore::RenderBox::computePositionedLogicalHeight):
1177         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1178         * rendering/RenderBox.h:
1179         * rendering/RenderButton.h:
1180         * rendering/RenderFlexibleBox.cpp:
1181         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
1182         (WebCore::RenderFlexibleBox::mainAxisExtentIsDefinite):
1183         (WebCore::RenderFlexibleBox::mainAxisLengthIsIndefinite):
1184         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1185         (WebCore::RenderFlexibleBox::mainAxisOverflowForChild):
1186         * rendering/RenderFlexibleBox.h:
1187         (WebCore::RenderFlexibleBox::isFlexibleBoxImpl):
1188         * rendering/RenderFullScreen.h:
1189         * rendering/RenderGrid.cpp:
1190         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
1191         * rendering/RenderMediaControlElements.h:
1192         * rendering/RenderMenuList.cpp:
1193         (WebCore::RenderMenuList::adjustInnerStyle): Do not longer set
1194         the min-width explicitly.
1195         * rendering/RenderMenuList.h:
1196         * rendering/RenderMultiColumnSet.cpp:
1197         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
1198         * rendering/RenderNamedFlowFragment.cpp:
1199         (WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
1200         * rendering/RenderReplaced.cpp:
1201         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1202         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1203         * rendering/RenderSlider.h:
1204         * rendering/RenderTextControl.h:
1205         * rendering/RenderTextControlSingleLine.cpp:
1206         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): Do not longer set
1207         the min-width explicitly.
1208         * rendering/mathml/RenderMathMLBlock.h:
1209         * rendering/style/RenderStyle.h:
1210
1211 2015-09-10  ChangSeok Oh  <changseok.oh@collabora.com>
1212
1213         [GTK] Volume bar is broken
1214         https://bugs.webkit.org/show_bug.cgi?id=145639
1215
1216         Reviewed by Philippe Normand.
1217
1218         The ControlPart enum values' order has mismatched the one of values in CSSValueKeywords.in
1219         after r180965. The MediaVolumeSliderPart should be prior to the MediaVolumeSliderContainerpart.
1220
1221         Tests: media/click-volume-bar-not-pausing.html
1222                media/volume-bar-empty-when-muted.html
1223
1224         * platform/ThemeTypes.h:
1225
1226 2015-09-09  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1227
1228         Remove all uses of PassRefPtr in WebCore/svg
1229         https://bugs.webkit.org/show_bug.cgi?id=148472
1230
1231         Reviewed by Darin Adler.
1232
1233         Clean up all uses of PassRefPtr in WebCore/svg.
1234
1235         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1236         (WebCore::AudioScheduledSourceNode::addEventListener):
1237         * Modules/webaudio/AudioScheduledSourceNode.h:
1238         * Modules/webaudio/ScriptProcessorNode.cpp:
1239         (WebCore::ScriptProcessorNode::addEventListener):
1240         * Modules/webaudio/ScriptProcessorNode.h:
1241         * dom/EventListenerMap.cpp:
1242         (WebCore::copyListenersNotCreatedFromMarkupToTarget):
1243         * dom/EventTarget.cpp:
1244         (WebCore::EventTarget::addEventListener):
1245         * dom/EventTarget.h:
1246         * dom/MessagePort.cpp:
1247         (WebCore::MessagePort::addEventListener):
1248         * dom/MessagePort.h:
1249         * dom/Node.cpp:
1250         (WebCore::tryAddEventListener):
1251         (WebCore::Node::addEventListener):
1252         * dom/Node.h:
1253         * html/HTMLMediaElement.cpp:
1254         (WebCore::HTMLMediaElement::addEventListener):
1255         * html/HTMLMediaElement.h:
1256         * html/ImageDocument.cpp:
1257         (WebCore::ImageDocument::createDocumentStructure):
1258         * html/shadow/MediaControlsApple.cpp:
1259         (WebCore::MediaControlsApple::showClosedCaptionTrackList):
1260         * page/DOMWindow.cpp:
1261         (WebCore::DOMWindow::addEventListener):
1262         * page/DOMWindow.h:
1263         * rendering/svg/RenderSVGResourceFilter.cpp:
1264         (WebCore::RenderSVGResourceFilter::buildPrimitives):
1265         * svg/SVGElement.cpp:
1266         (WebCore::SVGElement::addEventListener):
1267         * svg/SVGElement.h:
1268         * svg/SVGPathElement.cpp:
1269         (WebCore::SVGPathElement::pathSegListChanged):
1270         * svg/SVGPathUtilities.cpp:
1271         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
1272         * svg/SVGPathUtilities.h:
1273         * svg/SVGTRefElement.cpp:
1274         (WebCore::SVGTRefTargetEventListener::attach):
1275         (WebCore::SVGTRefElement::buildPendingResource):
1276         * svg/graphics/filters/SVGFilterBuilder.cpp:
1277         (WebCore::SVGFilterBuilder::appendEffectToEffectReferences):
1278         * svg/graphics/filters/SVGFilterBuilder.h:
1279
1280 2015-09-09  Dewei Zhu  <dewei_zhu@apple.com>
1281
1282         Document.characterSet should return "UTF-8" instead of null by default.
1283         https://bugs.webkit.org/show_bug.cgi?id=148810
1284         <rdar://problem/22548727>
1285
1286         Reviewed by Ryosuke Niwa.
1287
1288         Document encoding should default to "UTF-8" as is specified in
1289         https://dom.spec.whatwg.org/#concept-document-encoding. This behavior
1290         is consistent with Firefox and Chrome.
1291
1292         * dom/Document.cpp:
1293         (WebCore::Document::encoding): Returns nullAtom according to declearation.
1294         (WebCore::Document::characterSetForBindings): Returns "UTF-8" by default instead of null String.
1295         * dom/Document.h:
1296         (WebCore::Document::charset):
1297         (WebCore::Document::inputEncoding): Deleted.
1298         (WebCore::Document::characterSet): Deleted.
1299         * dom/Document.idl:
1300         * dom/InlineStyleSheetOwner.cpp:
1301         (WebCore::InlineStyleSheetOwner::createSheet):
1302         * inspector/InspectorPageAgent.cpp:
1303         (WebCore::InspectorPageAgent::mainResourceContent):
1304         * inspector/InspectorResourceAgent.cpp:
1305         (WebCore::InspectorResourceAgent::didFinishLoading):
1306         (WebCore::InspectorResourceAgent::didFailLoading):
1307         * loader/DocumentWriter.cpp:
1308         (WebCore::DocumentWriter::createDecoderIfNeeded):
1309         * loader/FormSubmission.cpp:
1310         (WebCore::encodingFromAcceptCharset):
1311
1312 2015-09-09  Benjamin Poulain  <bpoulain@apple.com>
1313
1314         CSS general sibling selectors does not work without CSS JIT
1315         https://bugs.webkit.org/show_bug.cgi?id=148987
1316         rdar://problem/22559860
1317
1318         Reviewed by Andreas Kling.
1319
1320         When traversing with the indirect adjacent combinator, SelectorChecker
1321         was not setting the style invalidation flag on the right element.
1322
1323         Tests: fast/css/indirect-adjacent-style-invalidation-1.html
1324                fast/css/indirect-adjacent-style-invalidation-2.html
1325                fast/css/indirect-adjacent-style-invalidation-3.html
1326
1327         * css/SelectorChecker.cpp:
1328         (WebCore::SelectorChecker::matchRecursively):
1329
1330 2015-09-09  Joseph Pecoraro  <pecoraro@apple.com>
1331
1332         Web Inspector: Remove unused InspectorFrontendHost methods
1333         https://bugs.webkit.org/show_bug.cgi?id=149013
1334
1335         Reviewed by Brian Burg.
1336
1337         * inspector/InspectorFrontendHost.cpp:
1338         (WebCore::InspectorFrontendHost::canSaveAs): Deleted.
1339         (WebCore::InspectorFrontendHost::canInspectWorkers): Deleted.
1340         * inspector/InspectorFrontendHost.h:
1341         * inspector/InspectorFrontendHost.idl:
1342
1343 2015-09-09  Myles C. Maxfield  <mmaxfield@apple.com>
1344
1345         ASSERTION FAILED: typesettingFeatures & (Kerning | Ligatures) in WebCore::applyFontTransforms
1346         https://bugs.webkit.org/show_bug.cgi?id=146194
1347
1348         Reviewed by Dean Jackson.
1349
1350         We might trigger shaping even if the author hasn't specified kerning or ligatures.
1351
1352         Test: fast/text/softbank-emoji-no-ligatures-nor-kerning.html
1353
1354         * platform/graphics/WidthIterator.cpp:
1355         (WebCore::isSoftBankEmoji):
1356         (WebCore::WidthIterator::applyFontTransforms):
1357         (WebCore::WidthIterator::advanceInternal):
1358         (WebCore::applyFontTransforms): Deleted.
1359         * platform/graphics/WidthIterator.h:
1360
1361 2015-09-09  Chris Dumez  <cdumez@apple.com>
1362
1363         Setting document.title when there is no title and no head element should no nothing
1364         https://bugs.webkit.org/show_bug.cgi?id=149005
1365         <rdar://problem/22567524>
1366
1367         Reviewed by Ryosuke Niwa.
1368
1369         Setting document.title when there is no title element and no head
1370         element should no nothing:
1371         - https://html.spec.whatwg.org/multipage/dom.html#document.title
1372
1373         Firefox and Chrome comply with the specification. However, WebKit
1374         was returning the updated title when querying document.title after
1375         setting it.
1376
1377         No new tests, covered by existing tests.
1378
1379         * dom/Document.cpp:
1380         (WebCore::Document::setTitle):
1381
1382 2015-09-09  Manuel Rego Casasnovas  <rego@igalia.com>
1383
1384         [css-grid] Percentage columns shouldn't include border and padding
1385         https://bugs.webkit.org/show_bug.cgi?id=148978
1386
1387         Reviewed by Sergio Villar Senin.
1388
1389         Subtract border and padding when we're calculating the breadth of the
1390         columns in LayoutGrid::computeUsedBreadthOfSpecifiedLength().
1391
1392         Added test to check the behavior for both columns and rows.
1393
1394         Test: fast/css-grid-layout/grid-percent-track-margin-border-padding.html
1395
1396         * rendering/RenderGrid.cpp:
1397         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
1398
1399 2015-09-09  Commit Queue  <commit-queue@webkit.org>
1400
1401         Unreviewed, rolling out r189536 and r189538.
1402         https://bugs.webkit.org/show_bug.cgi?id=149002
1403
1404         broke tests on mac (Requested by alexchristensen on #webkit).
1405
1406         Reverted changesets:
1407
1408         "min-width/height should default to auto for flexbox items"
1409         https://bugs.webkit.org/show_bug.cgi?id=146020
1410         http://trac.webkit.org/changeset/189536
1411
1412         "[css-grid] Percentage columns shouldn't include border and
1413         padding"
1414         https://bugs.webkit.org/show_bug.cgi?id=148978
1415         http://trac.webkit.org/changeset/189538
1416
1417 2015-09-08  David Hyatt  <hyatt@apple.com>
1418
1419         REGRESSION: Inline-block baseline is wrong when zero-width replaced child is present
1420         https://bugs.webkit.org/show_bug.cgi?id=147452
1421         rdar://problem/21943074
1422
1423         Reviewed by Myles Maxfield.
1424
1425         Added new test in fast/inline-block
1426
1427         Treat zero width replaced elements the same as replaced elements with width. Instead of
1428         clearing floats based off having no committed width, we instead track both committed
1429         width and committed replaced objects. We do this with two new booleans in LineWidth
1430         so that we know when we have uncomitted and committed replaced objects.
1431
1432         * rendering/line/BreakingContext.h:
1433         (WebCore::BreakingContext::handleReplaced):
1434         (WebCore::BreakingContext::handleText):
1435         (WebCore::BreakingContext::canBreakAtThisPosition):
1436         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
1437         * rendering/line/LineWidth.cpp:
1438         (WebCore::LineWidth::LineWidth):
1439         (WebCore::LineWidth::commit):
1440         (WebCore::LineWidth::applyOverhang):
1441         * rendering/line/LineWidth.h:
1442         (WebCore::LineWidth::committedWidth):
1443         (WebCore::LineWidth::availableWidth):
1444         (WebCore::LineWidth::logicalLeftOffset):
1445         (WebCore::LineWidth::hasCommitted):
1446         (WebCore::LineWidth::addUncommittedWidth):
1447         (WebCore::LineWidth::addUncommittedReplacedWidth):
1448
1449 2015-09-09  Antti Koivisto  <antti@apple.com>
1450
1451         Split mixed font GlyphPage functionality to separate class
1452         https://bugs.webkit.org/show_bug.cgi?id=148965
1453
1454         Reviewed by Myles Maxfield.
1455
1456         Currently GlyphPage class is used for both immutable single font case (in Font) and
1457         for caching mixed font mappings (in FontCascadeFonts). It is cleaner to use separate
1458         classed for these cases. This will also make future improvements easier.
1459
1460         * platform/graphics/Font.cpp:
1461         (WebCore::Font::~Font):
1462         (WebCore::fillGlyphPage):
1463         (WebCore::createAndFillGlyphPage):
1464         (WebCore::Font::glyphPage):
1465         (WebCore::Font::glyphForCharacter):
1466         (WebCore::Font::glyphDataForCharacter):
1467         * platform/graphics/Font.h:
1468         * platform/graphics/FontCascadeFonts.cpp:
1469         (WebCore::MixedFontGlyphPage::MixedFontGlyphPage):
1470         (WebCore::MixedFontGlyphPage::glyphDataForCharacter):
1471         (WebCore::MixedFontGlyphPage::setGlyphDataForCharacter):
1472         (WebCore::MixedFontGlyphPage::setGlyphDataForIndex):
1473
1474             Mixed font pages are now an implementation detail of FontCascadeFonts.
1475
1476         (WebCore::FontCascadeFonts::GlyphPageCacheEntry::glyphDataForCharacter):
1477         (WebCore::FontCascadeFonts::GlyphPageCacheEntry::setGlyphDataForCharacter):
1478         (WebCore::FontCascadeFonts::GlyphPageCacheEntry::setSingleFontPage):
1479
1480             Cache entry is either shared single font GlyphPage or mutable MixedFontGlyphPage.
1481
1482         (WebCore::FontCascadeFonts::FontCascadeFonts):
1483         (WebCore::FontCascadeFonts::glyphDataForCharacter):
1484         (WebCore::FontCascadeFonts::pruneSystemFallbacks):
1485         * platform/graphics/FontCascadeFonts.h:
1486         (WebCore::FontCascadeFonts::GlyphPageCacheEntry::isNull):
1487         (WebCore::FontCascadeFonts::GlyphPageCacheEntry::isMixedFont):
1488         * platform/graphics/GlyphPage.h:
1489
1490             GlyphPage is now for single font mappings only.
1491             Use regular allocation instead of variable size tricks.
1492             It is always immutable after initialization (though currently a setter is still needed).
1493
1494         (WebCore::GlyphPage::create):
1495         (WebCore::GlyphPage::~GlyphPage):
1496         (WebCore::GlyphPage::count):
1497         (WebCore::GlyphPage::indexForCharacter):
1498         (WebCore::GlyphPage::glyphDataForCharacter):
1499         (WebCore::GlyphPage::glyphForCharacter):
1500         (WebCore::GlyphPage::glyphDataForIndex):
1501         (WebCore::GlyphPage::glyphForIndex):
1502         (WebCore::GlyphPage::setGlyphForIndex):
1503         (WebCore::GlyphPage::font):
1504         (WebCore::GlyphPage::GlyphPage):
1505         (WebCore::GlyphPage::createForMixedFonts): Deleted.
1506         (WebCore::GlyphPage::createCopyForMixedFonts): Deleted.
1507         (WebCore::GlyphPage::createForSingleFont): Deleted.
1508         (WebCore::GlyphPage::isImmutable): Deleted.
1509         (WebCore::GlyphPage::setImmutable): Deleted.
1510         (WebCore::GlyphPage::glyphAt): Deleted.
1511         (WebCore::GlyphPage::fontForCharacter): Deleted.
1512         (WebCore::GlyphPage::setGlyphDataForCharacter): Deleted.
1513         (WebCore::GlyphPage::setGlyphDataForIndex): Deleted.
1514         (WebCore::GlyphPage::hasPerGlyphFontData): Deleted.
1515         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
1516         (WebCore::GlyphPage::fill):
1517         * platform/graphics/mac/GlyphPageMac.cpp:
1518         (WebCore::GlyphPage::fill):
1519         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
1520         (WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs):
1521         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
1522         (WebCore::GlyphPage::fill):
1523         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1524         (WebCore::GlyphPage::fill):
1525         * svg/SVGFontData.cpp:
1526         (WebCore::SVGFontData::applySVGGlyphSelection):
1527         (WebCore::SVGFontData::fillSVGGlyphPage):
1528         (WebCore::SVGFontData::fillBMPGlyphs):
1529         (WebCore::SVGFontData::fillNonBMPGlyphs):
1530         * svg/SVGFontData.h:
1531         (WebCore::SVGFontData::verticalAdvanceY):
1532
1533 2015-09-09  Manuel Rego Casasnovas  <rego@igalia.com>
1534
1535         [css-grid] Percentage columns shouldn't include border and padding
1536         https://bugs.webkit.org/show_bug.cgi?id=148978
1537
1538         Reviewed by Sergio Villar Senin.
1539
1540         Subtract border and padding when we're calculating the breadth of the
1541         columns in LayoutGrid::computeUsedBreadthOfSpecifiedLength().
1542
1543         Added test to check the behavior for both columns and rows.
1544
1545         Test: fast/css-grid-layout/grid-percent-track-margin-border-padding.html
1546
1547         * rendering/RenderGrid.cpp:
1548         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
1549
1550 2015-09-09  Chris Dumez  <cdumez@apple.com>
1551
1552         HTMLTableElement.tHead / tFoot / caption should be nullable
1553         https://bugs.webkit.org/show_bug.cgi?id=148991
1554
1555         Reviewed by Ryosuke Niwa.
1556
1557         According to the specification, HTMLTableElement.tHead / tFoot / caption
1558         should be nullable:
1559         https://html.spec.whatwg.org/multipage/tables.html#htmltableelement
1560
1561         Upon assigning null, we are supposed to remove the existing tHead / tFoot
1562         / caption element. However, we had a bug causing us to throw an exception
1563         after removing the element. This is because we would try to insert a null
1564         element and ContainerNode::insertBefore() throws when doing so.
1565
1566         Also, as per the specification, setting tHead / tFoot to something else
1567         than a thead / tfoot element should throw a HierarchyRequestError:
1568         https://html.spec.whatwg.org/multipage/tables.html#dom-table-thead
1569         https://html.spec.whatwg.org/multipage/tables.html#dom-table-tfoot
1570
1571         Previously, WebKit did not check the tag and was happy inserting the
1572         element as long as it was an HTMLTableSectionElement. This means that
1573         you could set a tfoot by assigning table.tHead.
1574
1575         This patch corrects both bugs and adds test coverage for it.
1576
1577         Test: fast/dom/HTMLTableElement/nullable-attributes.html
1578
1579         * html/HTMLTableElement.cpp:
1580         (WebCore::HTMLTableElement::setCaption):
1581         Only call insertBefore() if newCaption is not null as insertBefore()
1582         will throw an exception otherwise.
1583
1584         (WebCore::HTMLTableElement::setTHead):
1585         - Throw a HierarchyRequestError if the HTMLTableSectionElement is not
1586           null or a <thead> element, as per the specification.
1587         - Only call insertBefore() if newHead is not null as insertBefore()
1588           will throw an exception otherwise.
1589
1590         (WebCore::HTMLTableElement::setTFoot):
1591         - Throw a HierarchyRequestError if the HTMLTableSectionElement is not
1592           null or a <tfoot> element, as per the specification.
1593         - Only call insertBefore() if newFoot is not null as insertBefore()
1594           will throw an exception otherwise.
1595
1596         * html/HTMLTableElement.idl:
1597         Use [StrictTypeChecking] for these 3 attributes so that the bindings
1598         will throw a TypeError if the JS tries to assign a value with the
1599         wrong type. When the implementation is called with null, we now know
1600         this is because the JS assigned null (and not an invalid value).
1601         This is important as assigning null is valid since those attributes
1602         are nullable.
1603
1604 2015-06-26  Sergio Villar Senin  <svillar@igalia.com>
1605
1606         min-width/height should default to auto for flexbox items
1607         https://bugs.webkit.org/show_bug.cgi?id=146020
1608
1609         Reviewed by David Hyatt.
1610
1611         Based on Blink's r193665, r194062, r194887 and r195930 by <cbiesinger@chromium.org>.
1612
1613         As specified here
1614         http://dev.w3.org/csswg/css-flexbox/#min-size-auto the default
1615         value of min-{width|height} is auto for flex items.
1616
1617         In case this patch breaks any website (as it's changing the
1618         default value of those properties) the fix is likely to add:
1619
1620         min-width: 0;
1621         min-height: 0;
1622
1623         to any relevant flexitems.
1624
1625         Test: css3/flexbox/min-size-auto.html
1626
1627         * css/CSSComputedStyleDeclaration.cpp:
1628         (WebCore::isFlexOrGrid): New helper method to identify grids and flexs.
1629         (WebCore::ComputedStyleExtractor::propertyValue): Return auto
1630         for flex items if min-width/height is auto.
1631         * css/CSSParser.cpp:
1632         (WebCore::CSSParser::parseValue):
1633         * html/shadow/SliderThumbElement.cpp:
1634         * rendering/RenderBox.cpp:
1635         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
1636         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
1637         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1638         (WebCore::RenderBox::computeLogicalHeight):
1639         (WebCore::RenderBox::computeLogicalHeightUsing):
1640         (WebCore::RenderBox::computeContentLogicalHeight):
1641         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
1642         (WebCore::RenderBox::computeReplacedLogicalWidth):
1643         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
1644         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1645         (WebCore::RenderBox::computeReplacedLogicalHeight):
1646         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
1647         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1648         (WebCore::RenderBox::availableLogicalHeightUsing):
1649         (WebCore::RenderBox::computePositionedLogicalWidth):
1650         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1651         (WebCore::RenderBox::computePositionedLogicalHeight):
1652         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1653         * rendering/RenderBox.h:
1654         * rendering/RenderButton.h:
1655         * rendering/RenderFlexibleBox.cpp:
1656         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
1657         (WebCore::RenderFlexibleBox::mainAxisExtentIsDefinite):
1658         (WebCore::RenderFlexibleBox::mainAxisLengthIsIndefinite):
1659         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1660         (WebCore::RenderFlexibleBox::mainAxisOverflowForChild):
1661         * rendering/RenderFlexibleBox.h:
1662         (WebCore::RenderFlexibleBox::isFlexibleBoxImpl):
1663         * rendering/RenderFullScreen.h:
1664         * rendering/RenderGrid.cpp:
1665         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
1666         * rendering/RenderMediaControlElements.h:
1667         * rendering/RenderMenuList.cpp:
1668         (WebCore::RenderMenuList::adjustInnerStyle): Do not longer set
1669         the min-width explicitly.
1670         * rendering/RenderMenuList.h:
1671         * rendering/RenderMultiColumnSet.cpp:
1672         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
1673         * rendering/RenderNamedFlowFragment.cpp:
1674         (WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
1675         * rendering/RenderReplaced.cpp:
1676         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1677         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1678         * rendering/RenderSlider.h:
1679         * rendering/RenderTextControl.h:
1680         * rendering/RenderTextControlSingleLine.cpp:
1681         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): Do not longer set
1682         the min-width explicitly.
1683         * rendering/mathml/RenderMathMLBlock.h:
1684         * rendering/style/RenderStyle.h:
1685
1686 2015-09-08  Joseph Pecoraro  <pecoraro@apple.com>
1687
1688         Web Inspector: No need for [Custom] Implementation of some InspectorFrontendHost methods
1689         https://bugs.webkit.org/show_bug.cgi?id=148990
1690
1691         Reviewed by Timothy Hatcher.
1692
1693         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1694         (WebCore::JSInspectorFrontendHost::platform): Deleted.
1695         (WebCore::JSInspectorFrontendHost::port): Deleted.
1696         * inspector/InspectorFrontendHost.cpp:
1697         (WebCore::InspectorFrontendHost::platform):
1698         (WebCore::InspectorFrontendHost::port):
1699         * inspector/InspectorFrontendHost.h:
1700         * inspector/InspectorFrontendHost.idl:
1701         Uncustomize a few basic functions.
1702
1703 2015-09-08  Michael Catanzaro  <mcatanzaro@igalia.com>
1704
1705         Crash when WebCore::SQLiteFileSystem::openDatabase is called from multiple threads
1706         https://bugs.webkit.org/show_bug.cgi?id=143245
1707
1708         Reviewed by Darin Adler.
1709
1710         sqlite3_initialize is documented to be thread-safe, and to be called automatically by the
1711         library when needed, so applications should never need to call it directly. The problem is,
1712         it's not thread-safe: we have documented instances of GNOME Builder, Devhelp, Epiphany, and
1713         cinnamon-screensaver crashing when sqlite3_initialize is called simultaneously in separate
1714         threads (usually inside sqlite3_open). So call it manually, guarded using std::call_once, to
1715         make sure that the library is fully initialized before the first call to sqlite3_open. It's
1716         a good idea to do this regardless, because the documentation says it could be required in
1717         a future release of SQLite. (Though the use of std::call_once should not be needed, and is
1718         only used to attempt to work around the crashes.)
1719
1720         This is a workaround for an SQLite bug that might have been fixed upstream, but the SQLite
1721         developers are not really confident in the thread-safety of this function, and have advised
1722         that we carry the workaround. Seems like a good idea.
1723
1724         * platform/sql/SQLiteDatabase.cpp:
1725         (WebCore::SQLiteDatabase::SQLiteDatabase):
1726
1727 2015-09-08  Yusuke Suzuki  <utatane.tea@gmail.com>
1728
1729         Unify symbolTablePut in JSLexicalEnvironment and JSSymbolTableObject
1730         https://bugs.webkit.org/show_bug.cgi?id=148783
1731
1732         Reviewed by Geoffrey Garen.
1733
1734         No behavior change.
1735
1736         * bindings/js/JSDOMWindowBase.cpp:
1737         (WebCore::JSDOMWindowBase::updateDocument):
1738
1739 2015-09-08  Brian Burg  <bburg@apple.com>
1740
1741         Several inspector-protocol tests are flaky with GuardMalloc
1742         https://bugs.webkit.org/show_bug.cgi?id=136715
1743
1744         Reviewed by Joseph Pecoraro.
1745
1746         Sometimes, the async dispatch task can outlive its owning frontend client.
1747         To avoid problems, make it refcounted instead and add a protector reference.
1748
1749         No new tests, covered by existing tests.
1750
1751         * inspector/InspectorFrontendClientLocal.cpp:
1752         (WebCore::InspectorBackendDispatchTask::create):
1753         (WebCore::InspectorBackendDispatchTask::dispatch):
1754         (WebCore::InspectorBackendDispatchTask::reset):
1755         (WebCore::InspectorBackendDispatchTask::timerFired):
1756         (WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask):
1757         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
1758         (WebCore::InspectorFrontendClientLocal::~InspectorFrontendClientLocal):
1759         * inspector/InspectorFrontendClientLocal.h:
1760
1761 2015-09-08  Chris Dumez  <cdumez@apple.com>
1762
1763         new Comment(undefined) / new Text(undefined) should use default's empty string
1764         https://bugs.webkit.org/show_bug.cgi?id=148973
1765         <rdar://problem/22548042>
1766
1767         Reviewed by Ryosuke Niwa.
1768
1769         new Comment(undefined) / new Text(undefined) should use default's empty string instead of converting
1770         undefined to the "undefined" string:
1771         - https://dom.spec.whatwg.org/#interface-comment (parameter is optional, default value is empty String)
1772         - https://dom.spec.whatwg.org/#text (ditto)
1773
1774         undefined should be treated as if the parameter is missing, in the case the parameter is optional, as
1775         per the Web IDL specification. This patch aligns WebKit's behavior with the specification and the
1776         behavior of Firefox and Chrome.
1777
1778         No new tests, already covered by existing tests.
1779
1780         * bindings/scripts/CodeGeneratorJS.pm:
1781         (GenerateParametersCheck):
1782         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1783         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
1784         * bindings/scripts/test/JS/JSTestObj.cpp:
1785         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
1786
1787 2015-09-08  Chris Dumez  <cdumez@apple.com>
1788
1789         document.importNode(node, deep): deep's default value should be false
1790         https://bugs.webkit.org/show_bug.cgi?id=148959
1791         <rdar://problem/22558915>
1792
1793         Reviewed by Alexey Proskuryakov.
1794
1795         Switch deep parameter's default value for document.importNode() to
1796         false, as per the latest DOM specification:
1797         - https://dom.spec.whatwg.org/#interface-document
1798         - https://dom.spec.whatwg.org/#dom-document-importnode
1799
1800         Firefox and Chrome follow the specification. However, WebKit was using
1801         "true" for deep's default value.
1802
1803         No new tests, already covered by:
1804         imported/w3c/web-platform-tests/dom/nodes/Document-importNode.html
1805
1806         * dom/Document.h:
1807         (WebCore::Document::importNode):
1808
1809 2015-09-08  Per Arne Vollan  <peavo@outlook.com>
1810
1811         [Win][HighDPI] Video window placement is incorrect.
1812         https://bugs.webkit.org/show_bug.cgi?id=148954
1813
1814         Reviewed by Alex Christensen.
1815
1816         We need to scale window dimensions with device scale factor.
1817
1818         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1819         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
1820
1821 2015-09-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1822
1823         Reduce uses of PassRefPtr in fileapi
1824         https://bugs.webkit.org/show_bug.cgi?id=148952
1825
1826         Reviewed by Andreas Kling.
1827
1828         Remove all uses of PassRefPtr in return type. Argument uses of PassRefPtr will be
1829         removed in near future.
1830
1831         * fileapi/FileError.h:
1832         (WebCore::FileError::create):
1833         * fileapi/FileReader.cpp:
1834         (WebCore::FileReader::arrayBufferResult):
1835         * fileapi/FileReader.h:
1836         * fileapi/FileReaderLoader.cpp:
1837         (WebCore::FileReaderLoader::arrayBufferResult):
1838         * fileapi/FileReaderLoader.h:
1839         * fileapi/FileReaderSync.cpp:
1840         (WebCore::FileReaderSync::readAsArrayBuffer):
1841         * fileapi/FileReaderSync.h:
1842         * fileapi/ThreadableBlobRegistry.cpp:
1843         (WebCore::ThreadableBlobRegistry::getCachedOrigin):
1844         * fileapi/ThreadableBlobRegistry.h:
1845
1846 2015-09-07  Chris Fleizach  <cfleizach@apple.com>
1847
1848         AX: Mavericks: Text cursor does not move along with VoiceOver cursor for text fields
1849         https://bugs.webkit.org/show_bug.cgi?id=148891
1850
1851         Reviewed by Mario Sanchez Prada.
1852
1853         Undo the asynchronous dispatch of accessibility setting values on pre El Capitan machines
1854         because it causes focus to not sync correctly.
1855
1856         Test: accessibility/mac/focus-moves-cursor.html
1857
1858         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1859         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1860         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
1861
1862 2015-09-07  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1863
1864         [CoordinatedGraphics] Remove ScrollingStateScrollingNodeCoordinatedGraphics.cpp
1865         https://bugs.webkit.org/show_bug.cgi?id=148931
1866
1867         Reviewed by Csaba Osztrogonác.
1868
1869         ScrollingStateScrollingNodeCoordinatedGraphics.cpp implements nothing. Removed it.
1870
1871         * PlatformEfl.cmake:
1872         * PlatformGTK.cmake:
1873         * WebCore.vcxproj/WebCore.vcxproj:
1874         * WebCore.vcxproj/WebCore.vcxproj.filters:
1875         * page/scrolling/coordinatedgraphics/ScrollingStateScrollingNodeCoordinatedGraphics.cpp: Removed.
1876
1877 2015-09-07  Daniel Bates  <dabates@apple.com>
1878
1879         ASSERT_WITH_SECURITY_IMPLICATION in WebCore::DocumentOrderedMap::get(); update form
1880         association after subtree insertion
1881         https://bugs.webkit.org/show_bug.cgi?id=148919
1882         <rdar://problem/21868036>
1883
1884         Reviewed by Andy Estes.
1885
1886         Currently we update the form association of a form control upon insertion into
1887         the document. Instead we should update the form association of a form control
1888         after its containing subtree is inserted into the document to avoid an assertion
1889         failure when the containing subtree has an element whose id is identical to both
1890         the id of some other element in the document and the name of the form referenced
1891         by the inserted form control.
1892
1893         Tests: fast/forms/update-form-owner-in-moved-subtree-assertion-failure-2.html
1894                fast/forms/update-form-owner-in-moved-subtree-assertion-failure-3.html
1895                fast/forms/update-form-owner-in-moved-subtree-assertion-failure-4.html
1896                fast/forms/update-form-owner-in-moved-subtree-assertion-failure.html
1897
1898         * html/FormAssociatedElement.cpp:
1899         (WebCore::FormAssociatedElement::insertedInto): Moved resetFormOwner() from here
1900         to {HTMLFormControlElement, HTMLObjectElement}::finishedInsertingSubtree().
1901         * html/HTMLFormControlElement.cpp:
1902         (WebCore::HTMLFormControlElement::insertedInto): Return InsertionShouldCallFinishedInsertingSubtree
1903         so that HTMLFormControlElement::finishedInsertingSubtree() is called.
1904         (WebCore::HTMLFormControlElement::finishedInsertingSubtree): Added; turn around and
1905         call FormAssociatedElement::resetFormOwner().
1906         * html/HTMLFormControlElement.h:
1907         * html/HTMLInputElement.cpp:
1908         (WebCore::HTMLInputElement::insertedInto): Return InsertionShouldCallFinishedInsertingSubtree so
1909         that HTMLInputElement::finishedInsertingSubtree() is called and move logic to update radio button
1910         group from here...
1911         (WebCore::HTMLInputElement::finishedInsertingSubtree): to here.
1912         * html/HTMLInputElement.h:
1913         * html/HTMLObjectElement.cpp:
1914         (WebCore::HTMLObjectElement::insertedInto): Return InsertionShouldCallFinishedInsertingSubtree so
1915         that HTMLObjectElement::finishedInsertingSubtree() is called.
1916         (WebCore::HTMLObjectElement::finishedInsertingSubtree): Added; turn around and
1917         call FormAssociatedElement::resetFormOwner().
1918         * html/HTMLObjectElement.h:
1919         * html/HTMLSelectElement.cpp:
1920         (WebCore::HTMLSelectElement::insertedInto): Modified to return the result of
1921         HTMLFormControlElementWithState::insertedInto(), which may schedule a callback after subtree
1922         insertion.
1923         * html/HTMLTextFormControlElement.cpp:
1924         (WebCore::HTMLTextFormControlElement::insertedInto): Ditto.
1925
1926 2015-09-07  Antti Koivisto  <antti@apple.com>
1927
1928         Remove GlyphPage::mayUseMixedFontsWhenFilling
1929         https://bugs.webkit.org/show_bug.cgi?id=148928
1930
1931         Reviewed by Dan Bernstein.
1932
1933         http://trac.webkit.org/188566 removed support for composite fonts. We never need to use mixed
1934         glyph pages for fonts anymore.
1935
1936         * platform/graphics/Font.cpp:
1937         (WebCore::createAndFillGlyphPage):
1938         * platform/graphics/GlyphPage.h:
1939         (WebCore::GlyphPage::GlyphPage):
1940         (WebCore::GlyphPage::mayUseMixedFontsWhenFilling): Deleted.
1941         * platform/graphics/mac/GlyphPageMac.cpp:
1942         (WebCore::shouldUseCoreText):
1943         (WebCore::GlyphPage::fill):
1944         (WebCore::GlyphPage::mayUseMixedFontsWhenFilling): Deleted.
1945
1946 2015-09-07  Antti Koivisto  <antti@apple.com>
1947
1948         Remove unneeded offset and length arguments from glyph page filling functions
1949         https://bugs.webkit.org/show_bug.cgi?id=148929
1950
1951         Reviewed by Andreas Kling.
1952
1953         They are always passed 0/GlyphPage::size.
1954
1955         * platform/graphics/Font.cpp:
1956         (WebCore::Font::~Font):
1957         (WebCore::fillGlyphPage):
1958         (WebCore::createAndFillGlyphPage):
1959         * platform/graphics/Font.h:
1960         * platform/graphics/GlyphPage.h:
1961         (WebCore::GlyphPage::setGlyphDataForIndex):
1962         * platform/graphics/mac/GlyphPageMac.cpp:
1963         (WebCore::GlyphPage::mayUseMixedFontsWhenFilling):
1964         (WebCore::GlyphPage::fill):
1965         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
1966         (WebCore::GlyphPage::fill):
1967         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1968         (WebCore::GlyphPage::fill):
1969         * svg/SVGFontData.cpp:
1970         (WebCore::SVGFontData::applySVGGlyphSelection):
1971         (WebCore::SVGFontData::fillSVGGlyphPage):
1972         (WebCore::SVGFontData::fillBMPGlyphs):
1973         (WebCore::SVGFontData::fillNonBMPGlyphs):
1974         * svg/SVGFontData.h:
1975         (WebCore::SVGFontData::verticalAdvanceY):
1976
1977 2015-09-06  Chris Dumez  <cdumez@apple.com>
1978
1979         dispatchEvent() should throw an InvalidStateError if the event's initialized flag is not set
1980         https://bugs.webkit.org/show_bug.cgi?id=148800
1981         <rdar://problem/22565782>
1982         <rdar://problem/22565485>
1983
1984         Reviewed by Geoffrey Garen.
1985
1986         dispatchEvent() should throw an InvalidStateError if the event's
1987         initialized flag is not set or its dispatch flag is set, and should
1988         allow dispatching events with an empty type as long as it is
1989         initialized:
1990         https://dom.spec.whatwg.org/#dom-eventtarget-dispatchevent (step 1)
1991
1992         Previously, WebKit relied on the event type being empty to throw a
1993         UNSPECIFIED_EVENT_TYPE_ERR: DOM Events Exception 0. However, this
1994         exception type is outdated and initializing Event.type to an empty
1995         string is legal.
1996
1997         No new tests, already covered by existing tests that were rebaselined.
1998
1999         * dom/Event.cpp:
2000         (WebCore::Event::Event):
2001         (WebCore::Event::initEvent):
2002         * dom/Event.h:
2003         (WebCore::Event::isInitialized):
2004         * dom/EventTarget.cpp:
2005         (WebCore::EventTarget::dispatchEvent):
2006
2007 2015-09-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2008
2009         XHR2 timeout property should allow late updates
2010         https://bugs.webkit.org/show_bug.cgi?id=98156
2011
2012         Reviewed by Darin Adler.
2013
2014         Adding a timer within XMLHttpRequest to handle timeouts for asynchronous requests.
2015         This allows easy update of the timeout even after request is sent.
2016         Timeout is still handled by the network backend for synchronous requests (Web worker context).
2017
2018         Covered by updated tests.
2019
2020         * xml/XMLHttpRequest.cpp:
2021         (WebCore::XMLHttpRequest::XMLHttpRequest): Adding timeout timer initialization.
2022         (WebCore::XMLHttpRequest::setTimeout): Updating timeout timer state if request is sent.
2023         (WebCore::XMLHttpRequest::createRequest): Starting timeout timer if needed.
2024         (WebCore::XMLHttpRequest::internalAbort): Stopping timeout timer if needed.
2025         (WebCore::XMLHttpRequest::didFail): Adding comment.
2026         (WebCore::XMLHttpRequest::didFinishLoading): Stopping timeout timer if needed.
2027         * xml/XMLHttpRequest.h:
2028
2029 2015-09-05  Jaehun Lim  <ljaehun.lim@samsung.com>
2030
2031         Remove unused macros from StyleResolver.cpp
2032         https://bugs.webkit.org/show_bug.cgi?id=148163
2033
2034         Reviewed by Andreas Kling.
2035
2036         HANDLE_INHERIT and HANDLE_INHERIT_AND_INITIAL are not used after
2037         StyleBuilder refactoring.
2038
2039         No new tests because there is no behavior change.
2040
2041         * css/StyleResolver.cpp:
2042         Remove HANDLE_INHERIT and HANDLE_INHERIT_AND_INITIAL.
2043
2044 2015-09-05  Brian Burg  <bburg@apple.com>
2045
2046         Web Inspector: tighten up lifetimes for Agent-owned objects, and initialize agents using contexts
2047         https://bugs.webkit.org/show_bug.cgi?id=148625
2048
2049         Reviewed by Joseph Pecoraro.
2050
2051         All agents own their domain-specific frontend and backend dispatchers. Change so that
2052         they are initialized in constructors rather than when a frontend connects or disconnects.
2053         This may cause additional memory use, but this can be counteracted by lazily creating
2054         some agents that are not required for other agents to function (i.e., runtime and page agents).
2055
2056         To avoid adding frontend/backend dispatcher arguments to every single agent constructor,
2057         change agent construction to take a AgentContext or a subclass of it. This provides agents with
2058         references to objects in the owning InspectorEnvironment subclass that are guaranteed to
2059         outlive all agents. AgentContext and its subclasses follow the existing Agent class hierarchy.
2060
2061         No new tests, no behavior changed.
2062
2063         * bindings/js/WorkerScriptDebugServer.cpp:
2064         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
2065         (WebCore::WorkerScriptDebugServer::addListener):
2066         (WebCore::WorkerScriptDebugServer::removeListener):
2067         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
2068         * bindings/js/WorkerScriptDebugServer.h:
2069         * inspector/InspectorApplicationCacheAgent.cpp:
2070         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
2071         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
2072         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
2073         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
2074         * inspector/InspectorApplicationCacheAgent.h:
2075         * inspector/InspectorCSSAgent.cpp:
2076         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
2077         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
2078         (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
2079         * inspector/InspectorCSSAgent.h:
2080         * inspector/InspectorController.cpp:
2081         (WebCore::InspectorController::InspectorController):
2082         * inspector/InspectorDOMAgent.cpp:
2083         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
2084         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
2085         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
2086         * inspector/InspectorDOMAgent.h:
2087         * inspector/InspectorDOMDebuggerAgent.cpp:
2088         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
2089         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
2090         (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
2091         * inspector/InspectorDOMDebuggerAgent.h:
2092         * inspector/InspectorDOMStorageAgent.cpp:
2093         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
2094         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
2095         (WebCore::InspectorDOMStorageAgent::findStorageArea):
2096         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
2097         * inspector/InspectorDOMStorageAgent.h:
2098         * inspector/InspectorDatabaseAgent.cpp:
2099         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
2100         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
2101         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
2102         * inspector/InspectorDatabaseAgent.h:
2103         * inspector/InspectorIndexedDBAgent.cpp:
2104         (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
2105         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
2106         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
2107         * inspector/InspectorIndexedDBAgent.h:
2108         * inspector/InspectorInstrumentation.cpp:
2109         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
2110         * inspector/InspectorLayerTreeAgent.cpp:
2111         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
2112         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
2113         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
2114         * inspector/InspectorLayerTreeAgent.h:
2115         * inspector/InspectorPageAgent.cpp:
2116         (WebCore::InspectorPageAgent::InspectorPageAgent):
2117         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
2118         (WebCore::InspectorPageAgent::enable):
2119         (WebCore::InspectorPageAgent::reload):
2120         (WebCore::InspectorPageAgent::navigate):
2121         (WebCore::InspectorPageAgent::getCookies):
2122         (WebCore::InspectorPageAgent::deleteCookie):
2123         (WebCore::InspectorPageAgent::getResourceTree):
2124         (WebCore::InspectorPageAgent::searchInResources):
2125         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
2126         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
2127         (WebCore::InspectorPageAgent::mainFrame):
2128         (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
2129         (WebCore::InspectorPageAgent::buildObjectForFrame):
2130         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2131         (WebCore::InspectorPageAgent::setEmulatedMedia):
2132         (WebCore::InspectorPageAgent::getCompositingBordersVisible):
2133         (WebCore::InspectorPageAgent::setCompositingBordersVisible):
2134         (WebCore::InspectorPageAgent::snapshotNode):
2135         (WebCore::InspectorPageAgent::snapshotRect):
2136         (WebCore::InspectorPageAgent::archive):
2137         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
2138         * inspector/InspectorPageAgent.h:
2139         * inspector/InspectorReplayAgent.cpp:
2140         (WebCore::InspectorReplayAgent::InspectorReplayAgent):
2141         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
2142         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
2143         * inspector/InspectorReplayAgent.h:
2144         * inspector/InspectorResourceAgent.cpp:
2145         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
2146         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
2147         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
2148         * inspector/InspectorResourceAgent.h:
2149         * inspector/InspectorTimelineAgent.cpp:
2150         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
2151         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2152         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
2153         (WebCore::InspectorTimelineAgent::page):
2154         * inspector/InspectorTimelineAgent.h:
2155         * inspector/InspectorWebAgentBase.h:
2156         (WebCore::WebAgentContext::WebAgentContext):
2157         (WebCore::PageAgentContext::PageAgentContext):
2158         (WebCore::WorkerAgentContext::WorkerAgentContext):
2159         (WebCore::InspectorAgentBase::InspectorAgentBase):
2160         * inspector/InspectorWorkerAgent.cpp:
2161         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
2162         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
2163         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
2164         * inspector/InspectorWorkerAgent.h:
2165         * inspector/PageConsoleAgent.cpp:
2166         (WebCore::PageConsoleAgent::PageConsoleAgent):
2167         * inspector/PageConsoleAgent.h:
2168         * inspector/PageDebuggerAgent.cpp:
2169         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
2170         (WebCore::PageDebuggerAgent::sourceMapURLForScript):
2171         (WebCore::PageDebuggerAgent::breakpointActionLog):
2172         (WebCore::PageDebuggerAgent::injectedScriptForEval):
2173         * inspector/PageDebuggerAgent.h:
2174         * inspector/PageRuntimeAgent.cpp:
2175         (WebCore::PageRuntimeAgent::PageRuntimeAgent):
2176         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
2177         (WebCore::PageRuntimeAgent::injectedScriptForEval):
2178         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
2179         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
2180         * inspector/PageRuntimeAgent.h:
2181         * inspector/WebConsoleAgent.cpp:
2182         (WebCore::WebConsoleAgent::WebConsoleAgent):
2183         * inspector/WebConsoleAgent.h:
2184         * inspector/WebDebuggerAgent.cpp:
2185         (WebCore::WebDebuggerAgent::WebDebuggerAgent):
2186         * inspector/WebDebuggerAgent.h:
2187         * inspector/WorkerConsoleAgent.cpp:
2188         (WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
2189         * inspector/WorkerConsoleAgent.h:
2190         * inspector/WorkerDebuggerAgent.cpp:
2191         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
2192         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
2193         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
2194         (WebCore::WorkerDebuggerAgent::breakpointActionLog):
2195         (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
2196         * inspector/WorkerDebuggerAgent.h:
2197         * inspector/WorkerInspectorController.cpp:
2198         (WebCore::WorkerInspectorController::WorkerInspectorController):
2199         * inspector/WorkerRuntimeAgent.cpp:
2200         (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
2201         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
2202         (WebCore::WorkerRuntimeAgent::injectedScriptForEval):
2203         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
2204         * inspector/WorkerRuntimeAgent.h:
2205
2206 2015-09-04  Brian Burg  <bburg@apple.com>
2207
2208         Web Inspector: agents should send messages through FrontendRouter instead of FrontendChannel
2209         https://bugs.webkit.org/show_bug.cgi?id=148492
2210
2211         Reviewed by Joseph Pecoraro.
2212
2213         Replace uses of FrontendChannel with FrontendRouter. Minor code cleanup along the way.
2214
2215         No new tests, no behavior changed.
2216
2217         * WebCore.vcxproj/WebCore.vcxproj:
2218         * WebCore.vcxproj/WebCore.vcxproj.filters:
2219         * WebCore.xcodeproj/project.pbxproj:
2220         * inspector/InspectorApplicationCacheAgent.cpp:
2221         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
2222         * inspector/InspectorApplicationCacheAgent.h:
2223         * inspector/InspectorCSSAgent.cpp:
2224         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
2225         * inspector/InspectorCSSAgent.h:
2226         * inspector/InspectorController.cpp:
2227         (WebCore::InspectorController::connectFrontend):
2228         (WebCore::InspectorController::~InspectorController): No need to call discardAgents().
2229         * inspector/InspectorDOMAgent.cpp:
2230         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
2231         * inspector/InspectorDOMAgent.h:
2232         * inspector/InspectorDOMDebuggerAgent.cpp:
2233         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
2234         * inspector/InspectorDOMDebuggerAgent.h:
2235         * inspector/InspectorDOMStorageAgent.cpp:
2236         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
2237         * inspector/InspectorDOMStorageAgent.h:
2238         * inspector/InspectorDatabaseAgent.cpp:
2239         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
2240         * inspector/InspectorDatabaseAgent.h:
2241         * inspector/InspectorForwarding.h: Removed.
2242         * inspector/InspectorIndexedDBAgent.cpp:
2243         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
2244         * inspector/InspectorIndexedDBAgent.h:
2245         * inspector/InspectorLayerTreeAgent.cpp:
2246         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
2247         * inspector/InspectorLayerTreeAgent.h:
2248         * inspector/InspectorPageAgent.cpp:
2249         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
2250         * inspector/InspectorPageAgent.h:
2251         * inspector/InspectorReplayAgent.cpp:
2252         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
2253         * inspector/InspectorReplayAgent.h:
2254         * inspector/InspectorResourceAgent.cpp:
2255         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
2256         * inspector/InspectorResourceAgent.h:
2257         * inspector/InspectorTimelineAgent.cpp:
2258         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
2259         * inspector/InspectorTimelineAgent.h:
2260         * inspector/InspectorWebAgentBase.h:
2261         * inspector/InspectorWorkerAgent.cpp:
2262         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
2263         * inspector/InspectorWorkerAgent.h:
2264         * inspector/PageRuntimeAgent.cpp:
2265         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
2266         * inspector/PageRuntimeAgent.h:
2267         * inspector/WorkerInspectorController.cpp:
2268         (WebCore::WorkerInspectorController::connectFrontend):
2269         * inspector/WorkerInspectorController.h:
2270         * inspector/WorkerRuntimeAgent.cpp:
2271         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
2272         * inspector/WorkerRuntimeAgent.h:
2273         * page/PageDebuggable.cpp:
2274         * testing/Internals.cpp:
2275
2276 2015-09-05  Joseph Pecoraro  <pecoraro@apple.com>
2277
2278         Add a new ResourceLoaderOption to avoid page defers loading mechanisms for inspector
2279         https://bugs.webkit.org/show_bug.cgi?id=148727
2280
2281         Reviewed by Antti Koivisto.
2282
2283         This will be tested shortly by inspector tests.
2284
2285         * loader/ResourceLoaderOptions.h:
2286         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
2287         (WebCore::ResourceLoaderOptions::defersLoadingPolicy):
2288         (WebCore::ResourceLoaderOptions::setDefersLoadingPolicy):
2289         Add a new policy for defers loading. The default is to allow defers loading.
2290
2291         * loader/ResourceLoader.cpp:
2292         (WebCore::ResourceLoader::ResourceLoader):
2293         (WebCore::ResourceLoader::init):
2294         (WebCore::ResourceLoader::setDefersLoading):
2295         Respect the defers loading policy whenever we would set defers loading status.
2296
2297         * inspector/InspectorResourceAgent.cpp:
2298         (WebCore::InspectorResourceAgent::loadResource):
2299         Switch from incorrectly changing the defersLoading state of the loader
2300         to setting an option to disallow defers loading entirely for the loader.
2301
2302         * loader/DocumentLoader.cpp:
2303         (WebCore::DocumentLoader::startLoadingMainResource):
2304         * loader/MediaResourceLoader.cpp:
2305         (WebCore::MediaResourceLoader::start):
2306         * loader/NetscapePlugInStreamLoader.cpp:
2307         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
2308         * loader/cache/CachedResourceLoader.cpp:
2309         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
2310         (WebCore::CachedResourceLoader::defaultCachedResourceOptions):
2311         * loader/icon/IconLoader.cpp:
2312         (WebCore::IconLoader::startLoading):
2313         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
2314         (WebCore::WebCoreAVCFResourceLoader::startLoading):
2315         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2316         (WebCore::WebCoreAVFResourceLoader::startLoading):
2317         Add the new value to instance of the longhand ResourceLoaderOptions constructor.
2318
2319 2015-09-04  Myles C. Maxfield  <mmaxfield@apple.com>
2320
2321         Rename members of CanvasRenderingContext2D::State
2322         https://bugs.webkit.org/show_bug.cgi?id=148889
2323
2324         Reviewed by Tim Horton.
2325
2326         CanvasRenderingContext2D::State is a struct, so its members should not start with m_.
2327
2328         No new tests because there is no behavior change.
2329
2330         * html/canvas/CanvasRenderingContext2D.cpp:
2331         (WebCore::CanvasRenderingContext2D::State::State):
2332         (WebCore::CanvasRenderingContext2D::State::operator=):
2333         (WebCore::CanvasRenderingContext2D::restore):
2334         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
2335         (WebCore::CanvasRenderingContext2D::setFillStyle):
2336         (WebCore::CanvasRenderingContext2D::lineWidth):
2337         (WebCore::CanvasRenderingContext2D::setLineWidth):
2338         (WebCore::CanvasRenderingContext2D::lineCap):
2339         (WebCore::CanvasRenderingContext2D::setLineCap):
2340         (WebCore::CanvasRenderingContext2D::lineJoin):
2341         (WebCore::CanvasRenderingContext2D::setLineJoin):
2342         (WebCore::CanvasRenderingContext2D::miterLimit):
2343         (WebCore::CanvasRenderingContext2D::setMiterLimit):
2344         (WebCore::CanvasRenderingContext2D::shadowOffsetX):
2345         (WebCore::CanvasRenderingContext2D::setShadowOffsetX):
2346         (WebCore::CanvasRenderingContext2D::shadowOffsetY):
2347         (WebCore::CanvasRenderingContext2D::setShadowOffsetY):
2348         (WebCore::CanvasRenderingContext2D::shadowBlur):
2349         (WebCore::CanvasRenderingContext2D::setShadowBlur):
2350         (WebCore::CanvasRenderingContext2D::shadowColor):
2351         (WebCore::CanvasRenderingContext2D::setShadowColor):
2352         (WebCore::CanvasRenderingContext2D::getLineDash):
2353         (WebCore::CanvasRenderingContext2D::setLineDash):
2354         (WebCore::CanvasRenderingContext2D::setWebkitLineDash):
2355         (WebCore::CanvasRenderingContext2D::lineDashOffset):
2356         (WebCore::CanvasRenderingContext2D::setLineDashOffset):
2357         (WebCore::CanvasRenderingContext2D::applyLineDash):
2358         (WebCore::CanvasRenderingContext2D::globalAlpha):
2359         (WebCore::CanvasRenderingContext2D::setGlobalAlpha):
2360         (WebCore::CanvasRenderingContext2D::globalCompositeOperation):
2361         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation):
2362         (WebCore::CanvasRenderingContext2D::scale):
2363         (WebCore::CanvasRenderingContext2D::rotate):
2364         (WebCore::CanvasRenderingContext2D::translate):
2365         (WebCore::CanvasRenderingContext2D::transform):
2366         (WebCore::CanvasRenderingContext2D::setTransform):
2367         (WebCore::CanvasRenderingContext2D::setStrokeColor):
2368         (WebCore::CanvasRenderingContext2D::setFillColor):
2369         (WebCore::CanvasRenderingContext2D::fillInternal):
2370         (WebCore::CanvasRenderingContext2D::strokeInternal):
2371         (WebCore::CanvasRenderingContext2D::clipInternal):
2372         (WebCore::CanvasRenderingContext2D::isPointInPathInternal):
2373         (WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
2374         (WebCore::CanvasRenderingContext2D::clearRect):
2375         (WebCore::CanvasRenderingContext2D::fillRect):
2376         (WebCore::CanvasRenderingContext2D::strokeRect):
2377         (WebCore::CanvasRenderingContext2D::setShadow):
2378         (WebCore::CanvasRenderingContext2D::applyShadow):
2379         (WebCore::CanvasRenderingContext2D::shouldDrawShadows):
2380         (WebCore::CanvasRenderingContext2D::drawImage):
2381         (WebCore::CanvasRenderingContext2D::transformAreaToDevice):
2382         (WebCore::CanvasRenderingContext2D::rectContainsCanvas):
2383         (WebCore::CanvasRenderingContext2D::compositeBuffer):
2384         (WebCore::CanvasRenderingContext2D::didDraw):
2385         (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
2386         (WebCore::CanvasRenderingContext2D::font):
2387         (WebCore::CanvasRenderingContext2D::setFont):
2388         (WebCore::CanvasRenderingContext2D::textAlign):
2389         (WebCore::CanvasRenderingContext2D::setTextAlign):
2390         (WebCore::CanvasRenderingContext2D::textBaseline):
2391         (WebCore::CanvasRenderingContext2D::setTextBaseline):
2392         (WebCore::CanvasRenderingContext2D::direction):
2393         (WebCore::CanvasRenderingContext2D::setDirection):
2394         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2395         (WebCore::CanvasRenderingContext2D::inflateStrokeRect):
2396         (WebCore::CanvasRenderingContext2D::imageSmoothingEnabled):
2397         (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled):
2398         * html/canvas/CanvasRenderingContext2D.h:
2399
2400 2015-09-04  Myles C. Maxfield  <mmaxfield@apple.com>
2401
2402         Crash when font completes downloading after calling 2D canvas setText() multiple times
2403         https://bugs.webkit.org/show_bug.cgi?id=148789
2404
2405         Reviewed by Darin Adler.
2406
2407         The CSSFontSelector has a list of clients, and when fonts complete downloading, these
2408         clients get a call back. CanvasRenderingContext2D::State is one such of these clients. However,
2409         the CSSFontSelector may be destroyed and recreated at any time. We were getting into a case
2410         where multiple CSSFontSelectors were thinking that the same CanvasRenderingContext2D::State were
2411         their client. When the CanvasRenderingContext2D::State was destroyed, it only unregistered
2412         itself from one of the CSSFontSelectors, which means the CSSFontSelector left over has a dangling
2413         pointer to it.
2414
2415         The solution is to implement a new helper class, FontProxy, to hold the
2416         CanvasRenderingContext2D::State's font, and maintain the invariant that this object is always
2417         registered to exactly one CSSFontSelector, and this CSSFontSelector is the one which is associated
2418         with the FontProxy's FontCascade object. This patch maintains this invariant, as well as protecting
2419         all access to the State's FontCascade object so no one can reach in and change it without going
2420         through functions which maintain the invariant.
2421
2422         Test: fast/canvas/font-selector-crash.html
2423
2424         * css/CSSFontSelector.cpp:
2425         (WebCore::CSSFontSelector::registerForInvalidationCallbacks):
2426         (WebCore::CSSFontSelector::unregisterForInvalidationCallbacks):
2427         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
2428         * css/CSSFontSelector.h:
2429         * dom/Document.cpp:
2430         (WebCore::Document::fontsNeedUpdate):
2431         (WebCore::Document::fontSelector):
2432         (WebCore::Document::clearStyleResolver):
2433         * dom/Document.h:
2434         * html/canvas/CanvasRenderingContext2D.cpp:
2435         (WebCore::CanvasRenderingContext2D::State::State):
2436         (WebCore::CanvasRenderingContext2D::State::operator=):
2437         (WebCore::CanvasRenderingContext2D::FontProxy::~FontProxy):
2438         (WebCore::CanvasRenderingContext2D::FontProxy::FontProxy):
2439         (WebCore::CanvasRenderingContext2D::FontProxy::update):
2440         (WebCore::CanvasRenderingContext2D::FontProxy::fontsNeedUpdate):
2441         (WebCore::CanvasRenderingContext2D::FontProxy::initialize):
2442         (WebCore::CanvasRenderingContext2D::FontProxy::fontMetrics):
2443         (WebCore::CanvasRenderingContext2D::FontProxy::fontDescription):
2444         (WebCore::CanvasRenderingContext2D::FontProxy::width):
2445         (WebCore::CanvasRenderingContext2D::FontProxy::drawBidiText):
2446         (WebCore::CanvasRenderingContext2D::font):
2447         (WebCore::CanvasRenderingContext2D::setFont):
2448         (WebCore::CanvasRenderingContext2D::measureText):
2449         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2450         (WebCore::CanvasRenderingContext2D::State::~State): Deleted.
2451         (WebCore::CanvasRenderingContext2D::State::fontsNeedUpdate): Deleted.
2452         (WebCore::CanvasRenderingContext2D::accessFont): Deleted.
2453         * html/canvas/CanvasRenderingContext2D.h:
2454         * platform/graphics/FontSelector.h:
2455
2456 2015-09-04  Commit Queue  <commit-queue@webkit.org>
2457
2458         Unreviewed, rolling out r189386.
2459         https://bugs.webkit.org/show_bug.cgi?id=148883
2460
2461         Made several event dispatch tests assert (Requested by ap on
2462         #webkit).
2463
2464         Reverted changeset:
2465
2466         "dispatchEvent() should throw an InvalidStateError if the
2467         event's initialized flag is not set"
2468         https://bugs.webkit.org/show_bug.cgi?id=148800
2469         http://trac.webkit.org/changeset/189386
2470
2471 2015-09-04  Joseph Pecoraro  <pecoraro@apple.com>
2472
2473         Web Inspector: Add tests for DOM highlight commands
2474         https://bugs.webkit.org/show_bug.cgi?id=148786
2475
2476         Reviewed by Timothy Hatcher.
2477
2478         Tests: inspector/dom/hideHighlight.html
2479                inspector/dom/highlightFrame.html
2480                inspector/dom/highlightNode.html
2481                inspector/dom/highlightQuad.html
2482                inspector/dom/highlightRect.html
2483
2484         * inspector/InspectorDOMAgent.cpp:
2485         (WebCore::InspectorDOMAgent::highlightNode):
2486         (WebCore::InspectorDOMAgent::highlightFrame):
2487         Include an error if a frame is not found.
2488
2489         * inspector/InspectorOverlay.cpp:
2490         (WebCore::InspectorOverlay::highlightQuad):
2491         Should have been checking the usePageCoordinates state of the incoming
2492         highlight configuration, not the one that will be replaced.
2493
2494 2015-09-04  Csaba Osztrogonác  <ossy@webkit.org>
2495
2496         Remove unnecessary compiler guards from mm files
2497         https://bugs.webkit.org/show_bug.cgi?id=148797
2498
2499         Reviewed by Dan Bernstein.
2500
2501         * bindings/objc/DOMInternal.mm:
2502         * bridge/objc/objc_instance.mm:
2503
2504 2015-09-04  Eric Carlson  <eric.carlson@apple.com>
2505
2506         [mediacontrols] Test AirPlay picker button
2507         https://bugs.webkit.org/show_bug.cgi?id=148836
2508
2509         Reviewed by Dean Jackson.
2510
2511         Test: media/controls/airplay-picker.html
2512
2513         * Modules/mediacontrols/mediaControlsApple.js:
2514         (Controller.prototype.getCurrentControlsStatus.elements.forEach.):
2515         (Controller.prototype.getCurrentControlsStatus):
2516
2517 2015-09-04  Chris Dumez  <cdumez@apple.com>
2518
2519         dispatchEvent() should throw an InvalidStateError if the event's initialized flag is not set
2520         https://bugs.webkit.org/show_bug.cgi?id=148800
2521         <rdar://problem/22565782>
2522         <rdar://problem/22565485>
2523
2524         Reviewed by Geoffrey Garen.
2525
2526         dispatchEvent() should throw an InvalidStateError if the event's
2527         initialized flag is not set or its dispatch flag is set, and should
2528         allow dispatching events with an empty type as long as it is
2529         initialized:
2530         https://dom.spec.whatwg.org/#dom-eventtarget-dispatchevent (step 1)
2531
2532         Previously, WebKit relied on the event type being empty to throw a
2533         UNSPECIFIED_EVENT_TYPE_ERR: DOM Events Exception 0. However, this
2534         exception type is outdated and initializing Event.type to an empty
2535         string is legal.
2536
2537         No new tests, already covered by existing tests that were rebaselined.
2538
2539         * dom/Event.cpp:
2540         (WebCore::Event::Event):
2541         (WebCore::Event::initEvent):
2542         * dom/Event.h:
2543         (WebCore::Event::isInitialized):
2544         * dom/EventTarget.cpp:
2545         (WebCore::EventTarget::dispatchEvent):
2546
2547 2015-09-04  Beth Dakin  <bdakin@apple.com>
2548
2549         Speculative build fix.
2550
2551         * platform/spi/mac/NSEventSPI.h:
2552
2553 2015-09-04  Brian Burg  <bburg@apple.com>
2554
2555         Web Inspector: InspectorController should support multiple frontend channels
2556         https://bugs.webkit.org/show_bug.cgi?id=148538
2557
2558         Reviewed by Joseph Pecoraro.
2559
2560         No new tests, no behavior change from this patch. Teardown scenarios are
2561         covered by existing protocol and inspector tests running under DRT and WKTR.
2562
2563         * ForwardingHeaders/inspector/InspectorFrontendRouter.h: Added.
2564         * WebCore.vcxproj/WebCore.vcxproj:
2565         * inspector/InspectorClient.h: Stop using forwarded types.
2566         * inspector/InspectorController.cpp:
2567         (WebCore::InspectorController::InspectorController):
2568         (WebCore::InspectorController::inspectedPageDestroyed):
2569         (WebCore::InspectorController::hasLocalFrontend):
2570         (WebCore::InspectorController::hasRemoteFrontend):
2571         (WebCore::InspectorController::connectFrontend):
2572         (WebCore::InspectorController::disconnectFrontend):
2573         (WebCore::InspectorController::disconnectAllFrontends): Added. Disconnects all
2574         frontends and signals DisconnectReason::InspectedTargetDestroyed.
2575
2576         (WebCore::InspectorController::show):
2577         (WebCore::InspectorController::close):
2578         (WebCore::InspectorController::dispatchMessageFromFrontend):
2579         * inspector/InspectorController.h: Add default value for isAutomaticInspection.
2580         * inspector/InspectorDatabaseAgent.cpp:
2581         * inspector/InspectorIndexedDBAgent.cpp:
2582         * inspector/InspectorResourceAgent.cpp:
2583         * inspector/WorkerInspectorController.cpp: Use a router with a singleton channel
2584         that forwards messages over to the main page.
2585
2586         (WebCore::WorkerInspectorController::WorkerInspectorController):
2587         (WebCore::WorkerInspectorController::connectFrontend):
2588         (WebCore::WorkerInspectorController::disconnectFrontend):
2589         (WebCore::WorkerInspectorController::dispatchMessageFromFrontend):
2590         * inspector/WorkerInspectorController.h:
2591         * page/PageDebuggable.cpp:
2592         (WebCore::PageDebuggable::disconnect):
2593         * page/PageDebuggable.h:
2594         * testing/Internals.cpp: Clear the frontend client before disconnecting frontend channel.
2595         (WebCore::Internals::openDummyInspectorFrontend):
2596         (WebCore::Internals::closeDummyInspectorFrontend):
2597
2598 2015-09-04  Jer Noble  <jer.noble@apple.com>
2599
2600         [iOS] Enable media layout tests to run simultaneously by ignoring system-level interruptions
2601         https://bugs.webkit.org/show_bug.cgi?id=148807
2602
2603         Reviewed by Eric Carlson.
2604
2605         Add an internal property that, when set, will cause system-level interruption notifications
2606         (e.g., due to simultaneous media playback in separate processes) to be ignored by the
2607         PlatformMediaSessionManager, and cause the media playback sessions to continue normally, if
2608         inaudibly.
2609
2610         * platform/audio/PlatformMediaSessionManager.h:
2611         (WebCore::PlatformMediaSessionManager::willIgnoreSystemInterruptions):
2612         (WebCore::PlatformMediaSessionManager::setWillIgnoreSystemInterruptions):
2613         * platform/audio/ios/MediaSessionManagerIOS.mm:
2614         (-[WebMediaSessionHelper interruption:]):
2615         (-[WebMediaSessionHelper applicationWillEnterForeground:]):
2616         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
2617         (-[WebMediaSessionHelper applicationWillResignActive:]):
2618         (-[WebMediaSessionHelper applicationDidEnterBackground:]):
2619         * testing/Internals.cpp:
2620         (WebCore::Internals::resetToConsistentState):
2621
2622 2015-09-04  Beth Dakin  <bdakin@apple.com>
2623
2624         Need to be able to test default behaviors on force click
2625         https://bugs.webkit.org/show_bug.cgi?id=148758
2626
2627         Reviewed by Tim Horton.
2628
2629         WKTR needs access to this.
2630         * platform/spi/mac/NSEventSPI.h:
2631
2632 2015-09-04  Dean Jackson  <dino@apple.com>
2633
2634         [mediacontrols] Test the ordering of elements in the controls panel
2635         https://bugs.webkit.org/show_bug.cgi?id=148804
2636         <rdar://problem/22579232>
2637
2638         Reviewed by Eric Carlson.
2639
2640         Add information about various controls elements to the status object.
2641
2642         Test: media/controls/elementOrder.html
2643
2644         * Modules/mediacontrols/mediaControlsApple.js:
2645
2646 2015-09-03  Dean Jackson  <dino@apple.com>
2647
2648         [mediacontrols] Expose bounding rectangles and computed style to testing
2649         https://bugs.webkit.org/show_bug.cgi?id=148755
2650         <rdar://problems/22567757>
2651
2652         Reviewed by Eric Carlson.
2653
2654         Expose more information on the internal objects to the testing
2655         framework, in particular the bounding client rectangle for an
2656         element as well as its computed style.
2657
2658         These new features are tested by media/controls/statusDisplay*.
2659
2660         * Modules/mediacontrols/mediaControlsApple.js:
2661         (Controller.prototype.getCurrentControlsStatus): Rearrage things so
2662         that it iterates over a list of objects, adding the common things
2663         as well as any extra property values.
2664
2665 2015-09-04  Chris Dumez  <cdumez@apple.com>
2666
2667         Document.body should return the first body / frameset child of the html element
2668         https://bugs.webkit.org/show_bug.cgi?id=148787
2669         <rdar://problem/22566850>
2670
2671         Reviewed by Ryosuke Niwa.
2672
2673         Document.body should return the *first* body / frameset child of the html
2674         element as per the specification:
2675         https://html.spec.whatwg.org/multipage/dom.html#the-body-element-2
2676
2677         Chrome and Firefox both behave correctly. However, WebKit was prioritizing
2678         frameset over body. This patch fixes this.
2679
2680         No new tests, already covered by existing test.
2681
2682         * dom/Document.cpp:
2683         (WebCore::Document::bodyOrFrameset):
2684
2685 2015-09-04  Csaba Osztrogonác  <ossy@webkit.org>
2686
2687         Fix the !ENABLE(VIDEO) build after r189023
2688         https://bugs.webkit.org/show_bug.cgi?id=148796
2689
2690         Reviewed by Eric Carlson.
2691
2692         * testing/Internals.idl:
2693
2694 2015-09-04  Ryosuke Niwa  <rniwa@webkit.org>
2695
2696         Range.isPointInRange check root node before verifying offset
2697         https://bugs.webkit.org/show_bug.cgi?id=148776
2698
2699         isPointInRange should never throw WrongDocumentError
2700         https://bugs.webkit.org/show_bug.cgi?id=148779
2701
2702         Reviewed by Darin Adler.
2703
2704         Fixed two bugs since they were inter-dependent on each other.
2705
2706         We use the same trick we used for comparePoint in r189327 to avoid O(n) operation in common cases
2707         and return false when either calls to compareBoundaryPoints yields a WrongDocumentError.
2708
2709         No new tests since this is covered by an existing W3C test.
2710
2711         * dom/Range.cpp:
2712         (WebCore::Range::isPointInRange):
2713         (WebCore::Range::comparePoint):
2714
2715 2015-09-03  Commit Queue  <commit-queue@webkit.org>
2716
2717         Unreviewed, rolling out r189338.
2718         https://bugs.webkit.org/show_bug.cgi?id=148785
2719
2720         Caused tons of crashes (Requested by cdumez on #webkit).
2721
2722         Reverted changeset:
2723
2724         "Web Inspector: InspectorController should support multiple
2725         frontend channels"
2726         https://bugs.webkit.org/show_bug.cgi?id=148538
2727         http://trac.webkit.org/changeset/189338
2728
2729 2015-09-03  Brian Burg  <bburg@apple.com>
2730
2731         Web Inspector: InspectorController should support multiple frontend channels
2732         https://bugs.webkit.org/show_bug.cgi?id=148538
2733
2734         Reviewed by Joseph Pecoraro.
2735
2736         No new tests, no behavior change from this patch. Teardown scenarios are
2737         covered by existing protocol and inspector tests running under DRT and WKTR.
2738
2739         * ForwardingHeaders/inspector/InspectorFrontendRouter.h: Added.
2740         * WebCore.vcxproj/WebCore.vcxproj:
2741         * inspector/InspectorClient.h: Stop using forwarded types.
2742         * inspector/InspectorController.cpp:
2743         (WebCore::InspectorController::InspectorController):
2744         (WebCore::InspectorController::inspectedPageDestroyed):
2745         (WebCore::InspectorController::hasLocalFrontend):
2746         (WebCore::InspectorController::hasRemoteFrontend):
2747         (WebCore::InspectorController::connectFrontend):
2748         (WebCore::InspectorController::disconnectFrontend):
2749         (WebCore::InspectorController::disconnectAllFrontends): Added. Disconnects all
2750         frontends and signals DisconnectReason::InspectedTargetDestroyed.
2751
2752         (WebCore::InspectorController::show):
2753         (WebCore::InspectorController::close):
2754         (WebCore::InspectorController::dispatchMessageFromFrontend):
2755         * inspector/InspectorController.h: Add default value for isAutomaticInspection.
2756         * inspector/InspectorDatabaseAgent.cpp:
2757         * inspector/InspectorIndexedDBAgent.cpp:
2758         * inspector/InspectorResourceAgent.cpp:
2759         * inspector/WorkerInspectorController.cpp: Use a router with a singleton channel
2760         that forwards messages over to the main page.
2761
2762         (WebCore::WorkerInspectorController::WorkerInspectorController):
2763         (WebCore::WorkerInspectorController::connectFrontend):
2764         (WebCore::WorkerInspectorController::disconnectFrontend):
2765         (WebCore::WorkerInspectorController::dispatchMessageFromFrontend):
2766         * inspector/WorkerInspectorController.h:
2767         * page/PageDebuggable.cpp:
2768         (WebCore::PageDebuggable::disconnect):
2769         * page/PageDebuggable.h:
2770         * testing/Internals.cpp: Clear the frontend client before disconnecting frontend channel.
2771         (WebCore::Internals::openDummyInspectorFrontend):
2772         (WebCore::Internals::closeDummyInspectorFrontend):
2773
2774 2015-09-03  Jinyoung Hur  <hur.ims@navercorp.com>
2775
2776         [Texmap] highp precision should be used conditionally for fragment shaders on OpenGL ES
2777         https://bugs.webkit.org/show_bug.cgi?id=143993
2778
2779         Reviewed by Martin Robinson.
2780
2781         There are some GPUs that do not support the GL_OES_fragment_precision_high extension. (e.g., Mali-T624)
2782         Therefore, highp precision should be used in shader fragments conditionally using a proper preprocessor,
2783         GL_FRAGMENT_PRECISION_HIGH.
2784         Without this patch, nothing will be displayed on the screen if the running platform doesn't support the
2785         GL_OES_fragment_precision_high extension.
2786
2787         No new tests, covered by existing tests.
2788
2789         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
2790
2791 2015-09-03  Ryosuke Niwa  <rniwa@webkit.org>
2792
2793         Range.comparePoint shouldn't throw an exception if the range and the node are in the same detached tree
2794         https://bugs.webkit.org/show_bug.cgi?id=148733
2795
2796         Reviewed by Chris Dumez.
2797
2798         Don't throw WRONG_DOCUMENT_ERR when refNode is not in the document. The new behavior matches DOM4 as well
2799         as the behavior of Firefox. See https://dom.spec.whatwg.org/#dom-range-comparepoint
2800
2801         WRONG_DOCUMENT_ERR is still thrown by compareBoundaryPoints later in the function when the root nodes of
2802         refNode and boundary points are different.
2803
2804         There is one subtlety here that we need to throw WRONG_DOCUMENT_ERR instead of INDEX_SIZE_ERR when refNode
2805         and the boundary points don't share the same root node even if (refNode, offset) pair is invalid since
2806         DOM4 spec checks the former condition first. We implement this behavior by first validating the offset
2807         and then explicitly checking for the root node difference if the former check failed to avoid the latter
2808         O(n) check in common cases.
2809
2810         Test: fast/dom/Range/range-comparePoint-detached-nodes.html
2811
2812         * dom/Range.cpp:
2813         (WebCore::Range::comparePoint):
2814
2815 2015-09-03  Jer Noble  <jer.noble@apple.com>
2816
2817         [iOS] Playback does not pause when deselecting route and locking screen.
2818         https://bugs.webkit.org/show_bug.cgi?id=148724
2819
2820         Reviewed by Eric Carlson.
2821
2822         When deselecting a route, the route change notification can be delayed for some amount
2823         of time. If the screen is locked before the notification is fired, the PlatformMediaSessionManager
2824         can refuse to pause the video when entering the background due to a wireless playback route
2825         still being active.
2826
2827         When the media element transitions from having an active route to not having one (or vice versa),
2828         re-run the interruption check. In order to correctly determine, when that occurs, whether
2829         we are in an 'application background' state, cache that value to an ivar when handling
2830         application{Will,Did}Enter{Background,Foreground}.
2831
2832         Because we only want to run this step during an actual transition between playing to a route ->
2833         playing locally, cache the value of isPlayingToWirelessPlayback to another ivar, and only
2834         inform the PlatformMediaSessionManager when that value actually changes.
2835
2836         * html/HTMLMediaElement.cpp:
2837         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
2838         * platform/audio/PlatformMediaSession.cpp:
2839         (WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTargetChanged): Set or clear m_isPlayingToWirelessPlaybackTarget.
2840         * platform/audio/PlatformMediaSession.h:
2841         (WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTarget): Simple getter.
2842         * platform/audio/PlatformMediaSessionManager.cpp:
2843         (WebCore::PlatformMediaSessionManager::applicationWillEnterBackground): Set m_isApplicationInBackground.
2844         (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground): Ditto.
2845         (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground): Clear m_isApplicationInBackground.
2846         (WebCore::PlatformMediaSessionManager::sessionIsPlayingToWirelessPlaybackTargetChanged): Run interruption
2847             if application is in background.
2848
2849 2015-09-03  Brady Eidson  <beidson@apple.com>
2850
2851         Move SecurityOriginData from WK2 to WebCore.
2852         https://bugs.webkit.org/show_bug.cgi?id=148739
2853
2854         Reviewed by Tim Horton.
2855
2856         This will be needed for upcoming IndexedDB work.
2857
2858         No new tests (No behavior change.)
2859
2860         * CMakeLists.txt:
2861         * WebCore.xcodeproj/project.pbxproj:
2862         
2863         * page/SecurityOriginData.cpp: Renamed from Source/WebKit2/Shared/SecurityOriginData.cpp.
2864         (WebCore::SecurityOriginData::fromSecurityOrigin):
2865         (WebCore::SecurityOriginData::fromFrame):
2866         (WebCore::SecurityOriginData::securityOrigin):
2867         (WebCore::SecurityOriginData::isolatedCopy):
2868         (WebCore::operator==):
2869         * page/SecurityOriginData.h: Renamed from Source/WebKit2/Shared/SecurityOriginData.h.
2870         (WebCore::SecurityOriginData::encode):
2871         (WebCore::SecurityOriginData::decode):
2872
2873 2015-09-03  Zalan Bujtas  <zalan@apple.com>
2874
2875         New clang warns about boolean checks for |this| pointer in RenderObject debug methods
2876         https://bugs.webkit.org/show_bug.cgi?id=136599
2877
2878         Remove unnecessary null checking.
2879
2880         Reviewed by David Kilzer.
2881
2882         Not testable.
2883
2884         * rendering/RenderObject.cpp:
2885         (WebCore::RenderObject::showRenderObject): Deleted.
2886         (WebCore::RenderObject::showRenderSubTreeAndMark): Deleted.
2887
2888 2015-09-03  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2889
2890         Improve access specifier use in RenderObject
2891         https://bugs.webkit.org/show_bug.cgi?id=148745
2892
2893         Reviewed by Myles C. Maxfield.
2894
2895         No new tests, no change in behavior.
2896
2897         * rendering/RenderObject.h:
2898         (WebCore::RenderObject::setPreviousSibling):
2899         (WebCore::RenderObject::setNextSibling):
2900         (WebCore::RenderObject::isSetNeedsLayoutForbidden):
2901         (WebCore::RenderObject::setNeedsLayoutIsForbidden):
2902
2903 2015-09-03  Alexey Proskuryakov  <ap@apple.com>
2904
2905         Test Russian ".рф" domain support
2906         https://bugs.webkit.org/show_bug.cgi?id=148721
2907
2908         Reviewed by Darin Adler.
2909
2910         Test: fast/url/user-visible/rf.html
2911
2912         * html/URLUtils.h: Made this header file work with Objective-C.
2913
2914         * WebCore.xcodeproj/project.pbxproj:
2915         * bindings/scripts/CodeGeneratorJS.pm:
2916         * testing/Internals.cpp:
2917         (WebCore::Internals::getCurrentMediaControlsStatusForElement):
2918         (WebCore::Internals::userVisibleString):
2919         * testing/Internals.h:
2920         * testing/Internals.idl:
2921         * testing/Internals.mm: Added.
2922         (WebCore::Internals::userVisibleString):
2923
2924 2015-09-03  Chris Dumez  <cdumez@apple.com>
2925
2926         document.createEvent("eventname") should do a case-insensitive match on the event name
2927         https://bugs.webkit.org/show_bug.cgi?id=148738
2928         <rdar://problem/22558709>
2929
2930         Reviewed by Andreas Kling.
2931
2932         document.createEvent("eventname") should do a case-insensitive match on the event name:
2933         https://dom.spec.whatwg.org/#dom-document-createevent
2934
2935         WebKit was doing a case-sensitive match. Firefox and Chrome match the specification.
2936
2937         No new tests, already covered by:
2938         http/tests/w3c/dom/nodes/Document-createEvent.html (rebaselined)
2939
2940         * dom/make_event_factory.pl:
2941         (generateImplementation):
2942
2943 2015-09-02  Ryosuke Niwa  <rniwa@webkit.org>
2944
2945         MutationObserver should accept attributeFilter, attributeOldValue, and characterDataOldValue on their own
2946         https://bugs.webkit.org/show_bug.cgi?id=148716
2947
2948         Reviewed by Chris Dumez.
2949
2950         According to DOM4 [1], MutationObserver accepts characterDataOldValue, attributeOldValue and attributeFilter options
2951         on their own when characterData and attributes options are omitted. It throws only when characterData and attributes
2952         options are explicitly set to false.
2953
2954         Fixed our implementation accordingly. Existing tests as well as ones imported from W3C covers this.
2955
2956         [1] http://www.w3.org/TR/2015/WD-dom-20150618/#interface-mutationobserver
2957
2958         * dom/MutationObserver.cpp:
2959         (WebCore::MutationObserver::observe):
2960
2961 2015-09-02  Andreas Kling  <akling@apple.com>
2962
2963         ScrollbarThemes should be returned by reference.
2964         <https://webkit.org/b/147551>
2965
2966         Reviewed by Zalan Bujtas.
2967
2968         There's always a ScrollbarTheme of some type, so have ScrollbarTheme getters
2969         return references all around.
2970
2971         * css/SelectorCheckerTestFunctions.h:
2972         (WebCore::scrollbarMatchesDoubleButtonPseudoClass):
2973         (WebCore::scrollbarMatchesSingleButtonPseudoClass):
2974         (WebCore::scrollbarMatchesNoButtonPseudoClass):
2975         * html/shadow/SpinButtonElement.cpp:
2976         (WebCore::SpinButtonElement::startRepeatingTimer):
2977         * page/PageOverlay.cpp:
2978         (WebCore::PageOverlay::bounds):
2979         * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
2980         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
2981         * platform/ScrollView.cpp:
2982         (WebCore::ScrollView::paintScrollCorner):
2983         (WebCore::ScrollView::paintOverhangAreas):
2984         * platform/ScrollableArea.cpp:
2985         (WebCore::ScrollableArea::setScrollbarOverlayStyle):
2986         * platform/Scrollbar.cpp:
2987         (WebCore::Scrollbar::maxOverlapBetweenPages):
2988         (WebCore::Scrollbar::Scrollbar):
2989         (WebCore::Scrollbar::~Scrollbar):
2990         (WebCore::Scrollbar::offsetDidChange):
2991         (WebCore::Scrollbar::updateThumb):
2992         (WebCore::Scrollbar::paint):
2993         (WebCore::Scrollbar::autoscrollTimerFired):
2994         (WebCore::thumbUnderMouse):
2995         (WebCore::Scrollbar::autoscrollPressedPart):
2996         (WebCore::Scrollbar::startTimerIfNeeded):
2997         (WebCore::Scrollbar::moveThumb):
2998         (WebCore::Scrollbar::setHoveredPart):
2999         (WebCore::Scrollbar::setPressedPart):
3000         (WebCore::Scrollbar::mouseMoved):
3001         (WebCore::Scrollbar::mouseUp):
3002         (WebCore::Scrollbar::mouseDown):
3003         (WebCore::Scrollbar::setEnabled):
3004         (WebCore::Scrollbar::isOverlayScrollbar):
3005         * platform/Scrollbar.h:
3006         (WebCore::Scrollbar::theme):
3007         * platform/ScrollbarTheme.cpp:
3008         (WebCore::ScrollbarTheme::theme):
3009         * platform/ScrollbarTheme.h:
3010         * platform/efl/ScrollbarThemeEfl.cpp:
3011         (WebCore::ScrollbarTheme::nativeTheme):
3012         * platform/gtk/ScrollbarThemeGtk.cpp:
3013         (WebCore::ScrollbarTheme::nativeTheme):
3014         * platform/ios/ScrollbarThemeIOS.mm:
3015         (WebCore::ScrollbarTheme::nativeTheme):
3016         * platform/mac/ScrollAnimatorMac.mm:
3017         (macScrollbarTheme):
3018         * platform/mac/ScrollbarThemeMac.mm:
3019         (+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
3020         (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
3021         (WebCore::ScrollbarTheme::nativeTheme):
3022         * platform/win/PopupMenuWin.cpp:
3023         (WebCore::PopupMenuWin::calculatePositionAndSize):
3024         (WebCore::AccessiblePopupMenu::accLocation):
3025         (WebCore::AccessiblePopupMenu::accHitTest):
3026         * platform/win/ScrollbarThemeSafari.cpp:
3027         (WebCore::ScrollbarTheme::nativeTheme):
3028         * platform/win/ScrollbarThemeWin.cpp:
3029         (WebCore::ScrollbarTheme::nativeTheme):
3030         * rendering/RenderBox.cpp:
3031         (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior):
3032         (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior):
3033         * rendering/RenderLayer.cpp:
3034         (WebCore::cornerRect):
3035         (WebCore::styleRequiresScrollbar):
3036         (WebCore::styleDefinesAutomaticScrollbar):
3037         * rendering/RenderScrollbar.cpp:
3038         (WebCore::RenderScrollbar::updateScrollbarPart):
3039         * rendering/RenderScrollbarPart.cpp:
3040         (WebCore::calcScrollbarThicknessUsing):
3041         (WebCore::RenderScrollbarPart::styleDidChange):
3042         (WebCore::RenderScrollbarPart::imageChanged):
3043         * rendering/RenderScrollbarTheme.cpp:
3044         (WebCore::RenderScrollbarTheme::paintTickmarks):
3045         * rendering/RenderScrollbarTheme.h:
3046         * rendering/RenderTextControl.cpp:
3047         (WebCore::RenderTextControl::scrollbarThickness):
3048
3049 2015-09-02  Ryosuke Niwa  <rniwa@webkit.org>
3050
3051         Node.textContent = undefined should be equivalent to textContent = ""
3052         https://bugs.webkit.org/show_bug.cgi?id=148729
3053
3054         Reviewed by Darin Adler.
3055
3056         Assigning undefined to textContent should be equivalent to assigning an empty string to it like innerHTML.
3057         This is because textContent is defined as an DOMString? attribute in DOM4 [1] and WebIDL defines ECMAScript
3058         undefined to be treated as null for nullable types [2].
3059
3060         The new behavior matches that of Firefox and Chrome.
3061
3062         [1] https://dom.spec.whatwg.org/#node
3063         [2] https://heycam.github.io/webidl/#es-nullable-type
3064         
3065         * dom/Node.idl:
3066
3067 2015-09-02  Alex Christensen  <achristensen@webkit.org>
3068
3069         Make bison grammar compatible with bison 2.1
3070         https://bugs.webkit.org/show_bug.cgi?id=148731
3071
3072         Reviewed by Tim Horton.
3073
3074         * css/CSSGrammar.y.in:
3075         * xml/XPathGrammar.y:
3076         Move all union fields to one union so bison 2.1 generates equivalent output.
3077
3078 2015-09-02  Dean Jackson  <dino@apple.com>
3079
3080         Add some Houdini specs to the features list
3081         https://bugs.webkit.org/show_bug.cgi?id=148722
3082         <rdar://problem/22545319>
3083
3084         Reviewed by Eric Carlson.
3085
3086         Add the two CSS Houdini specs that have some actual
3087         content to the features list: custom painting and
3088         custom property registration.
3089
3090         * features.json:
3091
3092 2015-09-02  Brady Eidson  <beidson@apple.com>
3093
3094         Import W3C IndexedDB tests.
3095         https://bugs.webkit.org/show_bug.cgi?id=148713
3096
3097         Reviewed by Tim Horton' rubber stamp.
3098
3099         Tests: imported/w3c/indexeddb/*
3100
3101         * Modules/indexeddb/IDBDatabase.cpp:
3102         (WebCore::IDBDatabase::onVersionChange): Remove invalid assert - version goes back to 0 when initial
3103           versionChange transaction is aborted.
3104
3105 2015-09-02  Dean Jackson  <dino@apple.com>
3106
3107         Separate WebGL 1 and WebGL 2 in the features file.
3108
3109         Unreviewed.
3110
3111         * features.json:
3112
3113 2015-09-02  Dean Jackson  <dino@apple.com>
3114
3115         Reset the status label when the media is playable
3116         https://bugs.webkit.org/show_bug.cgi?id=148704
3117         <rdar://problem/22541939>
3118
3119         Reviewed by Eric Carlson.
3120
3121         Flakiness on the bots uncovered a situation where we
3122         hide the status label but left it with incorrect content.
3123
3124         Covered by the existing statusDisplay test.
3125
3126         * Modules/mediacontrols/mediaControlsApple.js:
3127         (Controller.prototype.updateStatusDisplay): Only set to loading if we're not yet playable.
3128
3129 2015-09-02  Chris Fleizach  <cfleizach@apple.com>
3130
3131         AX: WebKit does not expose max/min value of <progress> element
3132         https://bugs.webkit.org/show_bug.cgi?id=148707
3133
3134         Reviewed by Mario Sanchez Prada.
3135
3136         Allow native progress indicator elements to report min/max values by rewriting special
3137         case code for ARIA progress bars.
3138
3139         Test: accessibility/mac/progress-element-min-max.html
3140
3141         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3142         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3143
3144 2015-09-02  Hyemi Shin  <hyemi.sin@samsung.com>
3145
3146         [GStreamer] Simplify linking pads in AudioDestination and correct old comment.
3147         https://bugs.webkit.org/show_bug.cgi?id=148702
3148
3149         Reviewed by Philippe Normand.
3150
3151         Simplify linking src pad of webkitAudioSrc and sink pad of audioConvert
3152         to one line because implementation changed not to use seperate function
3153         to complete building rest of pipelines.
3154         Correct old comment also there is no more wavparse element.
3155
3156         No new tests, no behavior change.
3157
3158         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
3159         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
3160
3161 2015-09-02  Chris Dumez  <cdumez@apple.com>
3162
3163         document.createProcessingInstruction() does not behave according to specification
3164         https://bugs.webkit.org/show_bug.cgi?id=148710
3165
3166         Reviewed by Ryosuke Niwa.
3167
3168         document.createProcessingInstruction() does not behave according to
3169         specification:
3170         https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction
3171
3172         The following changes were made in this patch to match the specification
3173         and the behavior of Firefox / Chrome:
3174         1. document.createProcessingInstruction() now works for HTML documents.
3175         2. Throw an InvalidCharacterError if the data contains "?>" (step 2 of spec)
3176
3177         No new tests, already covered by existing tests that are rebaselined in
3178         this patch.
3179
3180         * dom/Document.cpp:
3181         (WebCore::Document::createProcessingInstruction):
3182
3183 2015-09-02  Chris Dumez  <cdumez@apple.com>
3184
3185         http/tests/w3c/dom/nodes/Element-matches.html is flaky
3186         https://bugs.webkit.org/show_bug.cgi?id=148615
3187
3188         Reviewed by Ryosuke Niwa.
3189
3190         Several newly-imported w3c tests were flaky due to the :target
3191         pseudo-class selectors sometimes giving different results. The
3192         issue seems to be that this type of selector relies on the
3193         Document::cssTarget() element to do the matching. We update
3194         this cssTarget Element in FrameView's scrollToFragment() /
3195         scrollToAnchor(). This is called from
3196         scrollToFragmentWithParentBoundary() which is called by
3197         FrameLoader's finishedParsing() and loadInSameDocument().
3198
3199         In the first one, it is called *after* calling checkComplete()
3200         which fires the onload event. However, in the second method,
3201         it is called *before*. This patch updates finishedParsing()
3202         so that scrollToFragmentWithParentBoundary() is called *before*
3203         firing the onload event, consistently with loadInSameDocument().
3204         This makes sure that JavaScript executed in an onload event
3205         handler will get accurate results for :target pseudo-class
3206         selectors.
3207
3208         No new tests, covered by:
3209         http/tests/w3c/dom/nodes/Element-matches.html
3210         http/tests/w3c/dom/nodes/ParentNode-querySelector-All-xhtml.xhtml
3211
3212         * loader/FrameLoader.cpp:
3213         (WebCore::FrameLoader::finishedParsing):
3214
3215 2015-09-02  Zan Dobersek  <zdobersek@igalia.com>
3216
3217         Construct default winding string arguments in CanvasRenderingContext2D from ASCIILiteral objects
3218         https://bugs.webkit.org/show_bug.cgi?id=148441
3219
3220         Reviewed by Darin Adler.
3221
3222         * html/canvas/CanvasRenderingContext2D.h: Use ASCIILiteral objects to construct
3223         the default values for the winding arguments. This will avoid copying the string
3224         data every time the methods are invoked with the default argument value.
3225
3226 2015-09-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3227
3228         Unreviewed. Fix GObject DOM bindings API breaks after r189182.
3229
3230         Several methods are no longer raising exceptions after
3231         r189182. Add them to the list, but also handle the case where the
3232         methods are called inside the class, to add the nullptr parameter
3233         for the GError.
3234
3235         * bindings/scripts/CodeGeneratorGObject.pm:
3236         (GenerateProperty):
3237         (FunctionUsedToRaiseException):
3238
3239 2015-09-01  Ryosuke Niwa  <rniwa@webkit.org>
3240
3241         Rename ShadowRoot::hostElement to shadowRoot::host to match the latest spec
3242         https://bugs.webkit.org/show_bug.cgi?id=148694
3243
3244         Address the review comments by Chris.
3245
3246         * dom/Element.cpp:
3247         (WebCore::Element::removeShadowRoot):
3248         * dom/Node.cpp:
3249         (WebCore::Node::shadowHost):
3250         * dom/ShadowRoot.cpp:
3251         (WebCore::ShadowRoot::ShadowRoot):
3252         * dom/ShadowRoot.h:
3253
3254 2015-09-01  Zalan Bujtas  <zalan@apple.com>
3255
3256         Recompute maximum outline size only when outline changes.
3257         https://bugs.webkit.org/show_bug.cgi?id=148576
3258
3259         Reviewed by Andreas Kling.
3260
3261         We should only recompute the cached maximum outline size when
3262         either the outline size (offset/width) or the style (from or to
3263         auto) changes.
3264         Setting 'outline-style: auto' can change the final outline width as 'auto' triggers
3265         the focus ring mode. In this mode, we ignore outline-width and use the platform default value instead.  
3266
3267         Covered by existing test cases.
3268
3269         * rendering/RenderElement.cpp:
3270         (WebCore::RenderElement::computeMaxOutlineSize):
3271         (WebCore::RenderElement::styleWillChange):
3272         (WebCore::RenderElement::initializeStyle): Deleted.
3273         (WebCore::RenderElement::setStyle): Deleted.
3274         * rendering/RenderElement.h:
3275
3276 2015-09-01  Chris Dumez  <cdumez@apple.com>
3277
3278         Range API should throw a TypeError for null Node parameters
3279         https://bugs.webkit.org/show_bug.cgi?id=148692
3280
3281         Reviewed by Ryosuke Niwa.
3282
3283         Range API should throw a TypeError for null Node parameters. We currently
3284         throw a NotFoundError.
3285
3286         As per the DOM specification, the Node arguments are not optional nor
3287         nullable [1]:
3288         https://dom.spec.whatwg.org/#range
3289
3290         Therefore, as per the Web IDL specification, we should throw a TypeError
3291         if the Node parameter is null or missing:
3292         https://heycam.github.io/webidl/#es-interface (step 1).
3293
3294         [1] https://heycam.github.io/webidl/#es-nullable-type
3295
3296         No new tests, covered by existing tests which have been
3297         rebaselined.
3298
3299         * dom/Range.cpp:
3300         (WebCore::Range::setStart):
3301         (WebCore::Range::setEnd):
3302         (WebCore::Range::isPointInRange):
3303         (WebCore::Range::comparePoint):
3304         (WebCore::Range::compareNode):
3305         (WebCore::Range::compareBoundaryPoints):
3306         (WebCore::Range::intersectsNode):
3307         (WebCore::Range::insertNode):
3308         (WebCore::Range::setStartAfter):
3309         (WebCore::Range::setEndBefore):
3310         (WebCore::Range::setEndAfter):
3311         (WebCore::Range::selectNode):
3312         (WebCore::Range::selectNodeContents):
3313         (WebCore::Range::surroundContents):
3314         (WebCore::Range::setStartBefore):
3315         Set the Exception code to TypeError instead of NOT_FOUND_ERR if
3316         the Node parameter is null.
3317
3318         * dom/Range.idl:
3319         Stop marking the Node parameters as optional. They are not optional in
3320         the specification and they are not really optional in our implementation.
3321         Previously, if the Node parameter was missing, we would call the
3322         implementation with a null pointer and the implementation would throw a
3323         NotFoundError. Now that they are mandatory, the bindings will directly
3324         throw a TypeError (as per the Web IDL spec) if the Node parameter is
3325         missing. However, if the JavaScript explicitely passes null or undefined,
3326         the implementation will still be called with a null pointer (because
3327         our bindings generator does not distinguish nullable / non-nullable
3328         parameters). For this reason, we still need to handle null pointers on
3329         the implementation side.
3330
3331 2015-09-01  Ryosuke Niwa  <rniwa@webkit.org>
3332
3333         Rename ShadowRoot::hostElement to shadowRoot::host to match the latest spec
3334         https://bugs.webkit.org/show_bug.cgi?id=148694
3335
3336         Reviewed by Chris Dumez.
3337
3338         Renamed ShadowRoot::hostElement to ShadowRoot::host to match the latest shadow DOM spec.
3339         This will help us implementing shadow DOM in near future.
3340
3341         * dom/ContainerNodeAlgorithms.cpp:
3342         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
3343         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
3344         * dom/Element.cpp:
3345         (WebCore::Element::addShadowRoot):
3346         (WebCore::Element::removeShadowRoot):
3347         * dom/EventDispatcher.cpp:
3348         (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
3349         (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
3350         (WebCore::shouldEventCrossShadowBoundary):
3351         (WebCore::EventPath::EventPath):
3352         * dom/Node.cpp:
3353         (WebCore::Node::shadowHost):
3354         (WebCore::Node::deprecatedShadowAncestorNode):
3355         (WebCore::Node::parentOrShadowHostElement):
3356         * dom/NodeRenderingTraversal.cpp:
3357         (WebCore::NodeRenderingTraversal::traverseParent):
3358         * dom/ShadowRoot.cpp:
3359         (WebCore::ShadowRoot::setInnerHTML):
3360         (WebCore::ShadowRoot::setResetStyleInheritance):
3361         * dom/ShadowRoot.h:
3362         (WebCore::Node::parentOrShadowHostNode):
3363         * dom/Text.cpp:
3364         (WebCore::isSVGShadowText):
3365         * dom/TreeScope.cpp:
3366         (WebCore::TreeScope::focusedElement):
3367         * html/shadow/ContentDistributor.cpp:
3368         (WebCore::ContentDistributor::ensureDistribution):
3369         * html/shadow/InsertionPoint.cpp:
3370         (WebCore::InsertionPoint::insertedInto):
3371         (WebCore::InsertionPoint::removedFrom):
3372         * page/DragController.cpp:
3373         (WebCore::asFileInput):
3374         * page/EventHandler.cpp:
3375         (WebCore::EventHandler::handleMousePressEvent):
3376         * page/FocusController.cpp:
3377         (WebCore::FocusNavigationScope::owner):
3378         * rendering/RenderLayer.cpp:
3379         (WebCore::rendererForScrollbar):
3380         * style/StyleResolveTree.cpp:
3381         (WebCore::Style::attachShadowRoot):
3382         (WebCore::Style::resolveShadowTree):
3383         * svg/SVGElement.cpp:
3384         (WebCore::SVGElement::correspondingUseElement):
3385
3386 2015-09-01  Chris Dumez  <cdumez@apple.com>
3387
3388         NodeFilter should be a callback interface
3389         https://bugs.webkit.org/show_bug.cgi?id=148415
3390
3391         Reviewed by Geoffrey Garen.
3392
3393         NodeFilter is now a callback interface, instead of a regular interface,
3394         as per the DOM specification:
3395         https://dom.spec.whatwg.org/#interface-nodefilter
3396
3397         One major difference is that TreeWalker.filter / NodeIterator is
3398         supposed to be a Function / Object (passed by JavaScript), but it was a
3399         JSNodeFilter wrapper in WebKit. Also, window.NodeFilter is not supposed
3400         to have a prototype property.
3401
3402         This behavior is consistent with Firefox. However, Chrome still has its
3403         own NodeFilter wrapper.
3404
3405         Tests:
3406         http/tests/w3c/dom/traversal/NodeIterator-expected.html (rebaselined)
3407         http/tests/w3c/dom/traversal/TreeWalker.html (rebaselined)
3408
3409         * CMakeLists.txt:
3410         * WebCore.vcxproj/WebCore.vcxproj:
3411         * WebCore.vcxproj/WebCore.vcxproj.filters:
3412         * WebCore.xcodeproj/project.pbxproj:
3413         Add / Remove files to the project files.
3414
3415         * dom/NodeFilterCondition.cpp:
3416         (WebCore::NodeFilterCondition::acceptNode):
3417         * dom/NodeFilterCondition.h:
3418         * bindings/gobject/GObjectNodeFilterCondition.cpp:
3419         (WebCore::GObjectNodeFilterCondition::acceptNode):
3420         * bindings/gobject/GObjectNodeFilterCondition.h:
3421         * bindings/objc/ObjCNodeFilterCondition.h:
3422         * bindings/objc/ObjCNodeFilterCondition.mm:
3423         (WebCore::ObjCNodeFilterCondition::acceptNode):
3424         Drop ExecState parameter as it is not used.
3425
3426         * bindings/gobject/WebKitDOMNodeFilter.cpp:
3427         (WebKit::core):
3428         Use NativeNodeFilter type instead of NodeFilter. NodeFilter is now
3429         a pure interface with 2 subclasses: NativeNodeFilter for the native
3430         bindings and JSNodeFilter for the JS bindings.
3431
3432         * bindings/js/JSBindingsAllInOne.cpp:
3433         Drop JSNodeFilterCondition.cpp as it was removed.
3434
3435