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