[Win] Switch to CMake
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-09-25  Alex Christensen  <achristensen@webkit.org>
2
3         [Win] Switch to CMake
4         https://bugs.webkit.org/show_bug.cgi?id=148111
5
6         Reviewed by Brent Fulgham.
7
8         * WebCore.vcxproj/WebCore.proj:
9
10 2015-09-25  Beth Dakin  <bdakin@apple.com>
11
12         Clicking on a data detected item inside a form control always pops up a map 
13         on force touch trackpad
14         https://bugs.webkit.org/show_bug.cgi?id=149559
15         -and corresponding-
16         rdar://problem/22826796
17
18         Reviewed by Tim Horton.
19
20         The real bug here appears to be a bug in Lookup, but we can work around it. 
21         For normal text, we call directly into Data Detectors for map results, and 
22         that works fine. For text within form controls, we did not properly extract 
23         the text for DD, so we sent it to Lookup instead, and Lookup has this bug 
24         where they will pop open the map right away. If we properly extract the text 
25         for form controls, then we can work around this bug.
26
27         * editing/mac/DataDetection.mm:
28         (WebCore::detectItemAtPositionWithRange):
29         (WebCore::DataDetection::detectItemAroundHitTestResult):
30
31 2015-09-25  Brady Eidson  <beidson@apple.com>
32
33         PassRefPtr<> to RefPtr<> conversion in legacy IndexedDB code.
34         https://bugs.webkit.org/show_bug.cgi?id=149558
35
36         Reviewed by Beth Dakin.
37
38         No new tests (No behavior change.)
39         
40         This patch does not attempt to completely remove all PassRefPtr usage inside legacy IDB.
41
42         It just switches over all PassRefPtr usage at the top level IDB interfaces that 
43         modern IDB is implementing.
44
45         The rest of the usage inside the legacy implementation can be dealt with later via `git rm`.
46
47         * Modules/indexeddb/IDBAny.h:
48         * Modules/indexeddb/IDBCursor.h:
49         * Modules/indexeddb/IDBDatabase.h:
50         * Modules/indexeddb/IDBDatabaseError.h:
51         * Modules/indexeddb/IDBFactory.h:
52         * Modules/indexeddb/IDBIndex.h:
53         * Modules/indexeddb/IDBObjectStore.h:
54         * Modules/indexeddb/IDBRequest.h:
55         * Modules/indexeddb/IDBTransaction.h:
56         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
57         (WebCore::IDBClient::IDBFactory::getDatabaseNames):
58         (WebCore::IDBClient::IDBFactory::open):
59         (WebCore::IDBClient::IDBFactory::deleteDatabase):
60         * Modules/indexeddb/client/IDBFactoryImpl.h:
61         * Modules/indexeddb/client/IDBRequestImpl.cpp:
62         (WebCore::IDBClient::IDBRequest::result):
63         (WebCore::IDBClient::IDBRequest::error):
64         (WebCore::IDBClient::IDBRequest::source):
65         (WebCore::IDBClient::IDBRequest::transaction):
66         * Modules/indexeddb/client/IDBRequestImpl.h:
67         * Modules/indexeddb/legacy/LegacyAny.cpp:
68         (WebCore::LegacyAny::createInvalid):
69         (WebCore::LegacyAny::createNull):
70         (WebCore::LegacyAny::createString):
71         (WebCore::LegacyAny::domStringList):
72         (WebCore::LegacyAny::idbCursor):
73         (WebCore::LegacyAny::idbCursorWithValue):
74         (WebCore::LegacyAny::idbDatabase):
75         (WebCore::LegacyAny::idbFactory):
76         (WebCore::LegacyAny::idbIndex):
77         (WebCore::LegacyAny::idbObjectStore):
78         (WebCore::LegacyAny::idbTransaction):
79         (WebCore::LegacyAny::LegacyAny):
80         * Modules/indexeddb/legacy/LegacyAny.h:
81         (WebCore::LegacyAny::create):
82         * Modules/indexeddb/legacy/LegacyCursor.cpp:
83         (WebCore::LegacyCursor::update):
84         (WebCore::LegacyCursor::deleteFunction):
85         * Modules/indexeddb/legacy/LegacyCursor.h:
86         * Modules/indexeddb/legacy/LegacyDatabase.cpp:
87         (WebCore::LegacyDatabase::objectStoreNames):
88         (WebCore::LegacyDatabase::createObjectStore):
89         (WebCore::LegacyDatabase::transaction):
90         * Modules/indexeddb/legacy/LegacyDatabase.h:
91         * Modules/indexeddb/legacy/LegacyFactory.cpp:
92         (WebCore::LegacyFactory::getDatabaseNames):
93         (WebCore::LegacyFactory::open):
94         (WebCore::LegacyFactory::deleteDatabase):
95         * Modules/indexeddb/legacy/LegacyFactory.h:
96         * Modules/indexeddb/legacy/LegacyIndex.cpp:
97         (WebCore::LegacyIndex::openCursor):
98         (WebCore::LegacyIndex::count):
99         (WebCore::LegacyIndex::openKeyCursor):
100         (WebCore::LegacyIndex::get):
101         (WebCore::LegacyIndex::getKey):
102         * Modules/indexeddb/legacy/LegacyIndex.h:
103         (WebCore::LegacyIndex::legacyObjectStore):
104         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
105         (WebCore::LegacyObjectStore::indexNames):
106         (WebCore::LegacyObjectStore::get):
107         (WebCore::LegacyObjectStore::add):
108         (WebCore::LegacyObjectStore::put):
109         (WebCore::LegacyObjectStore::deleteFunction):
110         (WebCore::LegacyObjectStore::clear):
111         (WebCore::LegacyObjectStore::createIndex):
112         (WebCore::LegacyObjectStore::index):
113         (WebCore::LegacyObjectStore::openCursor):
114         (WebCore::LegacyObjectStore::count):
115         * Modules/indexeddb/legacy/LegacyObjectStore.h:
116         (WebCore::LegacyObjectStore::keyPathAny):
117         (WebCore::LegacyObjectStore::transaction):
118         (WebCore::LegacyObjectStore::createIndex):
119         (WebCore::LegacyObjectStore::count):
120         * Modules/indexeddb/legacy/LegacyRequest.cpp:
121         (WebCore::LegacyRequest::result):
122         (WebCore::LegacyRequest::error):
123         (WebCore::LegacyRequest::source):
124         (WebCore::LegacyRequest::transaction):
125         (WebCore::LegacyRequest::onSuccess):
126         * Modules/indexeddb/legacy/LegacyRequest.h:
127         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
128         (WebCore::LegacyTransaction::objectStore):
129         * Modules/indexeddb/legacy/LegacyTransaction.h:
130         * inspector/InspectorIndexedDBAgent.cpp:
131
132 2015-09-25  Per Arne Vollan  <peavo@outlook.com>
133
134         [WinCairo] Incorrect position for windowless plugins.
135         https://bugs.webkit.org/show_bug.cgi?id=149524
136
137         Reviewed by Alex Christensen.
138
139         Added method to get graphics context HDC.
140
141         * platform/graphics/GraphicsContext.h:
142         * platform/graphics/win/GraphicsContextWin.cpp:
143         (WebCore::GraphicsContext::getWindowsContext):
144         (WebCore::GraphicsContext::hdc):
145         (WebCore::GraphicsContextPlatformPrivate::save):
146
147 2015-09-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
148
149         Fix the broken !ENABLE(STREAM_API) build
150         https://bugs.webkit.org/show_bug.cgi?id=149525
151
152         Reviewed by Darin Adler.
153
154         Removed some #ifdef ENABLE(STREAMS_API) to make build work when STREAMS_API is off.
155         This is a temporary fix.
156
157         * bindings/js/WebCoreJSClientData.h:
158         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
159         (WebCore::initNormalWorldClientData):
160
161 2015-09-25  Chris Dumez  <cdumez@apple.com>
162
163         Unreviewed, nit fix after r190229.
164
165         * dom/Range.cpp:
166         (WebCore::Range::insertNode):
167
168 2015-09-25  Commit Queue  <commit-queue@webkit.org>
169
170         Unreviewed, rolling out r190232 and r190236.
171         https://bugs.webkit.org/show_bug.cgi?id=149555
172
173         "It did not help" (Requested by cdumez on #webkit).
174
175         Reverted changesets:
176
177         "Unreviewed, roll out r187615 as it seems to have caused a ~1%
178         PLT regression."
179         http://trac.webkit.org/changeset/190232
180
181         "This started failing after this rollout:"
182         http://trac.webkit.org/changeset/190236
183
184 2015-09-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
185
186         Remove the need for DOMClass in case of JSBuiltinConstructor WebIDL
187         https://bugs.webkit.org/show_bug.cgi?id=149522
188
189         Reviewed by Darin Adler.
190
191         Adding generation of the dummy DOM class for JSBuiltinConstructor interfaces.
192         This is applied to CountQueuingStrategy.
193
194         Covered by existing tests of CountQueuingStrategy.
195
196         * Modules/streams/CountQueuingStrategy.h: Removed.
197         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
198         * WebCore.xcodeproj/project.pbxproj: Ditto.
199         * bindings/scripts/CodeGeneratorJS.pm:
200         (GenerateHeader): Removal of DOM class header include and generation of dummy class.
201         (GenerateImplementation): Removal of DOM class header include.
202         (UseDummyDOMClass): Helper routine.
203         (GenerateDummyDOMClassForJSBuiltin): Ditto.
204
205 2015-09-24  Brent Fulgham  <bfulgham@apple.com>
206
207         [Win] Support composited content in WebView render-to-context methods
208         https://bugs.webkit.org/show_bug.cgi?id=149516
209         <rdar://problem/22635080>
210
211         Reviewed by Simon Fraser.
212
213         Extend the CACFLayerTreeHost implementation to render into a passed
214         device context when requested. When no context is provided (the default
215         case) paint as normal.
216
217         Will be tested by existing compositing tests in a future bug. DumpRenderTree
218         has to be extended to do this painting properly.
219
220         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
221         (WebCore::CACFLayerTreeHost::paint): Accept an optional HDC argument, and
222         pass it to the render method.
223         * platform/graphics/ca/win/CACFLayerTreeHost.h:
224         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Add missing SOFT_LINK
225         command for the WKCACFViewDrawIntoDC.
226         (WebCore::WKCACFViewLayerTreeHost::paint): Accept optional HDC argument and
227         pass it to the parent class.
228         (WebCore::WKCACFViewLayerTreeHost::render): Accept new optional HDC argument.
229         If provided, call WKCACFViewDrawIntoDC. Otherwise, call WKCACFVIewDraw.
230         (WebCore::WKCACFViewLayerTreeHost::setShouldInvertColors):
231         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
232
233 2015-09-24  Chris Dumez  <cdumez@apple.com>
234
235         Drop [NotDeletable] from QuickTimePluginReplacement.postEvent()
236         https://bugs.webkit.org/show_bug.cgi?id=149547
237
238         Reviewed by Eric Carlson.
239
240         Drop [NotDeletable] from QuickTimePluginReplacement.postEvent(). It does
241         not appear to be needed and this is the last user of this non-standard
242         IDL attribute. This patch also drops support for this IDL attribute.
243
244         * Modules/plugins/QuickTimePluginReplacement.idl:
245         * bindings/scripts/CodeGeneratorJS.pm:
246         (ComputeFunctionSpecial):
247         * bindings/scripts/IDLAttributes.txt:
248
249 2015-09-24  Chris Dumez  <cdumez@apple.com>
250
251         Node.replaceChild() does not behave according to the specification
252         https://bugs.webkit.org/show_bug.cgi?id=149546
253         <rdar://problem/22571887>
254
255         Reviewed by Ryosuke Niwa.
256
257         Node.replaceChild() does not behave according to the specification. In
258         particular, when replacing |child| with |node| we are supposed to remove
259         |node| from its parent *before* removing |child| from its parent:
260         - https://dom.spec.whatwg.org/#concept-node-replace (Steps 10 & 11)
261
262         This patch reverses the order as per the specification. Our new behavior
263         matches Firefox's behavior. Note that this patch also remove an
264         optimization when replacing a child with its next sibling. This
265         optimization was observable from JS. It seems likely this case is not
266         common enough for it to be an issue. However, we can revisit if we see
267         it regresses things.
268
269         This leads to incorrect Mutation Records being queued in some cases.
270
271         No new tests, already covered by existing test.
272
273         * dom/ContainerNode.cpp:
274         (WebCore::ContainerNode::replaceChild):
275
276 2015-09-24  Chris Dumez  <cdumez@apple.com>
277
278         Unreviewed, roll out r187615 as it seems to have caused a ~1% PLT regression.
279         <rdar://problem/22657123>
280
281         * platform/graphics/FontCache.h:
282         (WebCore::FontDescriptionKey::makeFlagsKey):
283         * platform/graphics/FontCascade.cpp:
284         (WebCore::operator==):
285         (WebCore::makeFontSelectorFlags):
286         (WebCore::makeFontCascadeCacheKey):
287         (WebCore::computeFontCascadeCacheHash):
288
289 2015-09-24  David Hyatt  <hyatt@apple.com>
290
291         Keep the already-parsed list of terms in custom property values so that we don't have to re-parse them
292         later when doing variable resolution.
293         https://bugs.webkit.org/show_bug.cgi?id=149544
294
295         Reviewed by Dean Jackson.
296
297         * css/CSSComputedStyleDeclaration.cpp:
298         (WebCore::ComputedStyleExtractor::customPropertyValue):
299         (WebCore::ComputedStyleExtractor::customPropertyText):
300         Add a helper for getting the raw text. More closely parallels how non-custom properties work with the
301         extractor.
302
303         (WebCore::ComputedStyleExtractor::propertyValue):
304         Change propertyValue to use customPropertyText.
305
306         (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
307         Don't copy CSS custom properties into the style declaration. This is just used for things like editing, so
308         we didn't need to be putting the custom properties into this set.
309
310         (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
311         Patched to go straight to the serialized string value.
312
313         (WebCore::ComputedStyleExtractor::customPropertyValue): Deleted.
314         Replaced by customPropertyText.
315
316         * css/CSSComputedStyleDeclaration.h:
317         Rename customPropertyValue to customPropertyText and make it just return a String.
318
319         * css/CSSCustomPropertyValue.h:
320         (WebCore::CSSCustomPropertyValue::create):
321         (WebCore::CSSCustomPropertyValue::customCSSText):
322         (WebCore::CSSCustomPropertyValue::name):
323         (WebCore::CSSCustomPropertyValue::equals):
324         (WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
325         (WebCore::CSSCustomPropertyValue::value): Deleted.
326         Changed to hold both a CSSParserValueList, which it adopts from the CSSParser, and a string value that
327         is constructed lazily only if the value is serialized. Now the problematic serialization code will only
328         run if someone uses the CSS OM to trigger a serialization (this should be a rare occurrence, so perf
329         improves with this change).
330
331         * css/CSSGrammar.y.in:
332         Change parsing of custom properties to be identical to regular properties. This refactoring allows
333         us to simply invoke the parser from style declarations as well and makes everything behave more
334         similarly to normal property parsing.
335
336         * css/CSSParser.cpp:
337         (WebCore::CSSParser::parseValue):
338         (WebCore::CSSParser::parseCustomPropertyValue):
339         (WebCore::CSSParser::parseCustomPropertyDeclaration):
340         (WebCore::CSSParser::addCustomPropertyDeclaration): Deleted.
341         * css/CSSParser.h:
342         (WebCore::CSSParser::setCustomPropertyName):
343         We now have a method for parsing custom properties that can be invoked from style declarations. The
344         parser list is now adopted by the CSSCustomPropertyValue.
345
346         * css/CSSParserValues.cpp:
347         (WebCore::CSSParserValueList::toString):
348         Build the string serialization code right into CSSParserValueList.
349
350         * css/CSSParserValues.h:
351         Add a toString() method for serialization.
352
353         * css/StyleProperties.cpp:
354         (WebCore::MutableStyleProperties::setProperty):
355         (WebCore::MutableStyleProperties::setCustomProperty):
356         Changed to use the new CSSParser functions. This makes the code behave almost identically to regular
357         property parsing.
358
359         * css/StyleResolver.cpp:
360         (WebCore::StyleResolver::applyProperty):
361         * rendering/style/RenderStyle.h:
362         * rendering/style/StyleCustomPropertyData.h:
363         Change the mapping on RenderStyle to store the custom CSS values. This way we can get to the original
364         parser lists for each variable when it comes time to do variable resolution.
365
366 2015-09-24  Chris Dumez  <cdumez@apple.com>
367
368         Rewrite Range::insertNode() as per the latest DOM specification
369         https://bugs.webkit.org/show_bug.cgi?id=149528
370
371         Reviewed by Ryosuke Niwa.
372
373         Rewrite Range::insertNode() as per the latest DOM specification:
374         - https://dom.spec.whatwg.org/#concept-range-insert
375
376         Our previous implementation seemed outdated as we were failing a lot of
377         W3C tests that Firefox is passing.
378
379         No new tests, already covered by existing tests.
380
381         * dom/ContainerNode.cpp:
382         (WebCore::ContainerNode::ensurePreInsertionValidity):
383         (WebCore::checkPreReplacementValidity):
384         (WebCore::ContainerNode::insertBefore):
385         (WebCore::ContainerNode::replaceChild):
386         (WebCore::ContainerNode::appendChild):
387         * dom/ContainerNode.h:
388         * dom/Range.cpp:
389         (WebCore::Range::insertNode):
390         (WebCore::Range::surroundContents):
391         (WebCore::Range::toString): Deleted.
392         (WebCore::Range::toHTML): Deleted.
393         (WebCore::Range::text): Deleted.
394         (WebCore::Range::createContextualFragment): Deleted.
395         (WebCore::Range::detach): Deleted.
396         (WebCore::Range::absoluteBoundingBox): Deleted.
397         * dom/Range.h:
398
399 2015-09-24  Brent Fulgham  <bfulgham@apple.com>
400
401         [Win] Unreviewed build failure.
402
403         * bindings/js/WebCoreJSClientData.h: Make sure Streams API headers
404         are only included if the feature is on.
405
406 2015-09-24  Ryosuke Niwa  <rniwa@webkit.org>
407
408         Make event dispatching respect slotting
409         https://bugs.webkit.org/show_bug.cgi?id=149243
410
411         Reviewed by Antti Koivisto.
412
413         There are primarily two cases to consider: getting out of a shadow root to its host,
414         and moving into a slot from an assigned node.
415
416         When getting out of a shadow root, either the event originated in its shadow tree
417         including its nodes' shadow trees (1) or it moved into this shadow tree via a slot (2).
418         In (1), event.target should be set to the shadow host. In (2), it should be set to the
419         first node in the event path that belongs to the same tree as the shadow host. In order
420         to find such a node in O(1), we use a stack of event targets in each (shadow) tree. We
421         push event.target of the current tree whenever we move up to a slot from an assigned node
422         and pop it out of the stack when we move out of the shadow tree.
423
424         A follow up patch is needed to update the code to resolve related targets.
425
426         Tests: fast/shadow-dom/event-inside-shadow-tree.html
427                fast/shadow-dom/event-inside-slotted-node.html
428
429         * dom/EventDispatcher.cpp:
430         (WebCore::EventPath::EventPath):
431
432 2015-09-24  Chris Dumez  <cdumez@apple.com>
433
434         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum
435         https://bugs.webkit.org/show_bug.cgi?id=149532
436
437         Reviewed by Ryosuke Niwa.
438
439         Drop XPATH_NAMESPACE_NODE from Node::NodeType enum as there is currently
440         no way to construct such Node in WebKit. This avoid having to handle this
441         Node type everywhere.
442
443         * bindings/gobject/WebKitDOMPrivate.cpp:
444         (WebKit::wrap): Deleted.
445         * bindings/objc/DOM.mm:
446         (kitClass): Deleted.
447         * dom/Document.cpp:
448         (WebCore::Document::importNode):
449         (WebCore::Document::adoptNode): Deleted.
450         (WebCore::Document::childTypeAllowed): Deleted.
451         (WebCore::Document::canAcceptChild): Deleted.
452         * dom/Node.cpp:
453         (WebCore::Node::dumpStatistics): Deleted.
454         (WebCore::Node::textContent): Deleted.
455         (WebCore::Node::ancestorElement): Deleted.
456         * dom/Node.h:
457         * dom/Range.cpp:
458         (WebCore::Range::checkNodeWOffset):
459         (WebCore::lengthOfContentsInNode): Deleted.
460         (WebCore::Range::processContentsBetweenOffsets): Deleted.
461         (WebCore::Range::surroundContents): Deleted.
462         * editing/MarkupAccumulator.cpp:
463         (WebCore::MarkupAccumulator::appendStartMarkup): Deleted.
464         * xml/XPathFunctions.cpp:
465         (WebCore::XPath::expandedNameLocalPart): Deleted.
466         * xml/XPathStep.cpp:
467         (WebCore::XPath::Step::nodesInAxis):
468         (WebCore::XPath::primaryNodeType): Deleted.
469         * xml/XPathUtil.cpp:
470         (WebCore::XPath::stringValue): Deleted.
471         (WebCore::XPath::isValidContextNode): Deleted.
472
473 2015-09-24  David Hyatt  <hyatt@apple.com>
474
475         Add support for CSS Custom Properties (in preparation for implementing CSS Variables).
476         https://bugs.webkit.org/show_bug.cgi?id=130397
477
478         Reviewed by Antti Koivisto.
479
480         Added new tests in fast/css/custom-properties.
481
482         * WebCore.xcodeproj/project.pbxproj:
483         Add new header files to the project (CSSCustomPropertyValue and StyleCustomPropertyData).
484
485         * css/CSSComputedStyleDeclaration.cpp:
486         (WebCore::ComputedStyleExtractor::customPropertyValue):
487         (WebCore::ComputedStyleExtractor::propertyValue):
488         If a custom property value is queried (i.e., it starts with "--"), then we use our
489         customPropertyValue lookup to go to the RenderStyle and fetch the appropriate custom property
490         value from the StyleCustomPropertyData.
491
492         (WebCore::CSSComputedStyleDeclaration::length):
493         (WebCore::CSSComputedStyleDeclaration::item):
494         Patched to include custom properties in the returned array. They appear at the end of the array
495         after the built-in properties.
496
497         (WebCore::ComputedStyleExtractor::propertyMatches):
498         Patched to check custom properties.
499
500         (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
501         Make sure the custom properties get copied into the StyleDeclaration.
502
503         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
504         (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
505         Patched to call customPropertyValue for custom properties.
506
507         * css/CSSComputedStyleDeclaration.h:
508         Add customPropertyValue() to ComputedStyleExtractor.
509
510         * css/CSSCustomPropertyValue.h: Added.
511         (WebCore::CSSCustomPropertyValue::create):
512         (WebCore::CSSCustomPropertyValue::equals):
513         (WebCore::CSSCustomPropertyValue::customCSSText):
514         (WebCore::CSSCustomPropertyValue::name):
515         (WebCore::CSSCustomPropertyValue::value):
516         (WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
517         Custom properties are parsed as a property with an ID of CSSPropertyCustom and a CSSCustomPropertyValue
518         that holds both the name and the value of the property. Ultimately we might want to just ditch property IDs in
519         favor of AtomicStrings for all properties, and then the need to special case custom properties would go
520         away. For now, though, this is the way we work custom properties into the existing system.
521
522         * css/CSSGrammar.y.in:
523         Add a production for recognizing custom properties and storing them using a property ID of CSSPropertyCustom
524         and a CSSCustomPropertyValue that has the name/value pair.
525
526         * css/CSSParser.cpp:
527         (WebCore::filterProperties):
528         Patched to track seen custom properties and to handle them correctly.
529
530         (WebCore::CSSParser::createStyleProperties):
531         Pass in a seenCustomProperties table to ensure we bail when encountering the same custom property twice.
532
533         (WebCore::CSSParser::addCustomPropertyDeclaration):
534         Called from the grammar production to create the CSSCustomPropertyValue.
535
536         (WebCore::isCustomPropertyIdentifier):
537         Recognize the -- custom property during lexing.
538
539         (WebCore::CSSParser::parseIdentifier):
540         Patched to return a CUSTOM_PROPERTY token when a custom property is identified.
541
542          * css/CSSParser.h:
543         (WebCore::isCustomPropertyName):
544         Add a helper function for asking if a property name is custom.
545
546         * css/CSSValue.cpp:
547         (WebCore::CSSValue::equals):
548         (WebCore::CSSValue::cssText):
549         (WebCore::CSSValue::destroy):
550         * css/CSSValue.h:
551         Patched to add support for CSSCustomPropertyValue.
552
553         * css/PropertySetCSSStyleDeclaration.cpp:
554         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
555         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
556         (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
557         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
558         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
559         Add code for handling custom properties in the CSS OM.
560
561         * css/StyleProperties.cpp:
562         (WebCore::StyleProperties::getPropertyValue):
563         (WebCore::StyleProperties::getCustomPropertyValue):
564         (WebCore::StyleProperties::getPropertyCSSValue):
565         (WebCore::StyleProperties::getCustomPropertyCSSValue):
566         (WebCore::MutableStyleProperties::removeProperty):
567         (WebCore::MutableStyleProperties::removeCustomProperty):
568         (WebCore::StyleProperties::propertyIsImportant):
569         (WebCore::StyleProperties::customPropertyIsImportant):
570         (WebCore::MutableStyleProperties::setProperty):
571         (WebCore::MutableStyleProperties::setCustomProperty):
572         (WebCore::MutableStyleProperties::addParsedProperty):
573         (WebCore::MutableStyleProperties::findPropertyIndex):
574         (WebCore::ImmutableStyleProperties::findCustomPropertyIndex):
575         (WebCore::MutableStyleProperties::findCustomPropertyIndex):
576         (WebCore::MutableStyleProperties::findCSSPropertyWithID):
577         (WebCore::MutableStyleProperties::findCustomCSSPropertyWithName):
578         (WebCore::StyleProperties::propertyMatches):
579         (WebCore::StyleProperties::PropertyReference::cssName):
580         * css/StyleProperties.h:
581         (WebCore::StyleProperties::findCustomPropertyIndex):
582         Patched to support handling custom properties in the CSS OM. We have to create equivalent methods that operate
583         on AtomicString propertyNames instead of on property IDs.
584
585         * css/StyleResolver.cpp:
586         (WebCore::StyleResolver::CascadedProperties::customProperties):
587         (WebCore::StyleResolver::styleForKeyframe):
588         (WebCore::StyleResolver::styleForPage):
589         (WebCore::StyleResolver::applyMatchedProperties):
590         (WebCore::StyleResolver::applyProperty):
591         (WebCore::StyleResolver::CascadedProperties::set):
592         (WebCore::StyleResolver::applyCascadedProperties):
593         The resolver has to hold a HashMap from AtomicStrings to Properties. It matches identically to how built-in
594         properties work except that an extensible table (HashMap) is used to hold the property data.
595
596         * css/makeprop.pl:
597         Patched to include the special CSSPropertyCustom value of 1 (just after the CSSPropertyInvalid id value but before the first
598         built-in property value).
599
600         * inspector/InspectorStyleSheet.cpp:
601         (WebCore::InspectorStyle::getText):
602         (WebCore::lowercasePropertyName):
603         (WebCore::InspectorStyle::populateAllProperties):
604         Patch inspector to not lowercase CSS custom property names, since they are case-sensitive.
605
606         * rendering/style/RenderStyle.h:
607         * rendering/style/StyleCustomPropertyData.h: Added.
608         (WebCore::StyleCustomPropertyData::create):
609         (WebCore::StyleCustomPropertyData::copy):
610         (WebCore::StyleCustomPropertyData::operator==):
611         (WebCore::StyleCustomPropertyData::operator!=):
612         (WebCore::StyleCustomPropertyData::setCustomPropertyValue):
613         (WebCore::StyleCustomPropertyData::getCustomPropertyValue):
614         (WebCore::StyleCustomPropertyData::hasCustomProperty):
615         (WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
616         * rendering/style/StyleRareInheritedData.cpp:
617         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
618         (WebCore::StyleRareInheritedData::operator==):
619         * rendering/style/StyleRareInheritedData.h:
620         The front end storage in the RenderStyle for custom properties. For now, custom properties are always inherited, so the
621         data is in StyleRareInheritedData.
622
623 2015-09-24  Chris Dumez  <cdumez@apple.com>
624
625         Optimize Range's lengthOfContentsInNode() for DocumentType Nodes
626         https://bugs.webkit.org/show_bug.cgi?id=149529
627
628         Reviewed by Darin Adler.
629
630         Optimize Range's lengthOfContentsInNode() for DocumentType Nodes:
631         - https://dom.spec.whatwg.org/#concept-node-length
632
633         We currently call Node::countChildNodes() unnecessarily on DocumentType
634         Nodes instead of simply returning 0.
635
636         * dom/Range.cpp:
637         (WebCore::lengthOfContentsInNode):
638         (WebCore::Range::processContents):
639
640 2015-09-24  ChangSeok Oh  <changseok.oh@collabora.com>
641
642         Unreviewed, fix typo errors in a comment ("passed" -> "Passed", "Overwise" -> "Otherwise")
643
644         * css/mediaControlsGtk.css:
645
646 2015-09-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
647
648         Reduce almost uses of PassRefPtr in Webcore/testing
649         https://bugs.webkit.org/show_bug.cgi?id=149449
650
651         Reviewed by Darin Adler.
652
653         This patch removes all uses of PassRefPtr except for Internals::serializeObject() and Internals::deserializeObject().
654         It will be removed by upcoming patch.
655
656         * Modules/encryptedmedia/CDMSessionClearKey.cpp:
657         (WebCore::CDMSessionClearKey::generateKeyRequest):
658         * Modules/encryptedmedia/CDMSessionClearKey.h:
659         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
660         (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
661         * platform/graphics/CDMSession.h:
662         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
663         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest):
664         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
665         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
666         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
667         (WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
668         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
669         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
670         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
671         * testing/InternalSettings.h:
672         (WebCore::InternalSettings::create):
673         * testing/Internals.cpp:
674         (WebCore::Internals::create):
675         (WebCore::Internals::computedStyleIncludingVisitedInfo):
676         (WebCore::Internals::markerRangeForNode):
677         (WebCore::Internals::rangeFromLocationAndLength):
678         (WebCore::Internals::subrange):
679         (WebCore::Internals::nodesFromRect):
680         (WebCore::Internals::mallocStatistics):
681         (WebCore::Internals::typeConversions):
682         (WebCore::Internals::memoryInfo):
683         (WebCore::Internals::serializeObject):
684         (WebCore::Internals::deserializeBuffer):
685         (WebCore::Internals::createTimeRanges):
686         * testing/Internals.h:
687         * testing/MallocStatistics.h:
688         (WebCore::MallocStatistics::create):
689         * testing/MemoryInfo.h:
690         (WebCore::MemoryInfo::create):
691         * testing/MockCDM.cpp:
692         (WebCore::MockCDMSession::generateKeyRequest):
693         * testing/TypeConversions.h:
694         (WebCore::TypeConversions::create):
695
696 2015-09-24  Ryosuke Niwa  <rniwa@webkit.org>
697
698         Ran sort-Xcode-project-file.
699
700         * WebCore.xcodeproj/project.pbxproj:
701
702 2015-09-24  ChangSeok Oh  <changseok.oh@collabora.com>
703
704         [GTK] playbutton in media controls is not changed when it is clicked.
705         https://bugs.webkit.org/show_bug.cgi?id=149113
706
707         Reviewed by Philippe Normand.
708
709         When the play button in media controls is clicked, a 'paused' class is added or removed
710         for the element to update its appearance. Although Document::recalcStyle is triggered
711         by that class attribute change, the play button is not changed since there is
712         no difference in styles whether having the 'paused' class or not. Gtk port
713         does not define the -webkit-media-controls-play-button.paused. To fix this,
714         -webkit-media-controls-play-button.paused is newly defined with a dummy style,
715         "position: relative;", which should not change the play button appearance,
716         but be clearly different in style.
717
718         Test: media/media-controls-play-button-updates.html
719
720         * css/mediaControlsGtk.css:
721         (video::-webkit-media-controls-play-button.paused):
722
723 2015-09-24  Carlos Garcia Campos  <cgarcia@igalia.com>
724
725         Unreviewed. Fix GObject DOM API breaks after r190120.
726
727         EntityReference has been removed from the DOM spec. Generate an
728         empy GObject implementation to keep API and ABI
729         compatibility. also add a deprecated impementation for the methods
730         using WebKitEntityReference.
731
732         * PlatformGTK.cmake: Do not generate bindings for EntityReference.idl.
733         * bindings/gobject/WebKitDOMDeprecated.cpp:
734         (webkit_dom_entity_reference_init):
735         (webkit_dom_entity_reference_class_init):
736         (webkit_dom_node_iterator_get_expand_entity_references):
737         (webkit_dom_tree_walker_get_expand_entity_references):
738         (webkit_dom_document_create_entity_reference):
739         * bindings/gobject/WebKitDOMDeprecated.h:
740         * bindings/gobject/WebKitDOMDeprecated.symbols:
741         * bindings/scripts/CodeGeneratorGObject.pm:
742         (SkipFunction): Remove FIXME.
743         * dom/Document.idl: Do not generate createEntityReference for GObject.
744         * dom/EntityReference.idl: Do not generate empty files for GObject.
745
746 2015-09-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
747
748         [Streams API] Add support for JS builtins constructor
749         https://bugs.webkit.org/show_bug.cgi?id=149497
750
751         Reviewed by Darin Adler.
752
753         Covered by existing tests.
754
755         Making CountQueuingStrategy fully JS built-in implemented.
756         Adding support for calling a JS builtin initialization function just after creating the JSXX object.
757         This JS function must be named initializeXX and be in XX.Js file.
758         The JSBuiltinConstructor keyword is added to the binding generator.
759
760         * CMakeLists.txt: Adding CountQueuingStrategy.js, removing JSCountQueuingStrategyCustom.cpp.
761         * DerivedSources.cpp: Ditto.
762         * DerivedSources.make: Ditto.
763         * Modules/streams/CountQueuingStrategy.h: Making CountQueuingStrategy a dummy class.
764         (WebCore::CountQueuingStrategy::create):
765         (WebCore::CountQueuingStrategy::~CountQueuingStrategy):
766         (WebCore::CountQueuingStrategy::CountQueuingStrategy):
767         * Modules/streams/CountQueuingStrategy.idl:
768         * Modules/streams/CountQueuingStrategy.js: Added.
769         (size):
770         (initializeCountQueuingStrategy):
771         * WebCore.vcxproj/WebCore.vcxproj: Removing JSCountQueuingStrategyCustom.cpp.
772         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
773         * WebCore.xcodeproj/project.pbxproj: Ditto.
774         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
775         * bindings/js/JSCountQueuingStrategyCustom.cpp: Removed.
776         * bindings/js/JSDOMBinding.cpp: Adding support for DOMConstructorJSBuiltinObject.
777         (WebCore::callInitializeFunction):
778         (WebCore::DOMConstructorJSBuiltinObject::visitChildren):
779         * bindings/js/JSDOMBinding.h: Diitto.
780         (WebCore::createFromJSBuiltin):
781         (WebCore::DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject):
782         * bindings/js/WebCoreJSClientData.h: Adding support for CQS builtins functions.
783         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
784         (WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins):
785         * bindings/scripts/CodeGeneratorJS.pm:
786         (GetJSBuiltinFunctionName):
787         (GetFunctionName):
788         (InstanceNeedsVisitChildren): Generating visitChildren method in case of JSBuiltinConstructor.
789         (GetParentConstructorClassName): Refactoring to make JSXXConstructor derive from DOMConstructorJSBuiltinObject in case of JSBuiltinConstructor.
790         (GenerateConstructorDeclaration): Ditto.
791         (GenerateConstructorDefinition): Generate specific constructor in case of JSBuiltinConstructor.
792         (GenerateConstructorHelperMethods): Refactoring to use Base class.
793         (IsConstructable): Ditto.
794         (ConstructorHasProperties): Deleted.
795         * bindings/scripts/IDLAttributes.txt: Adding JSBuiltinConstructor.
796         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
797         (WebCore::JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor):
798         * bindings/scripts/test/JS/JSTestCallback.cpp:
799         (WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
800         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
801         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
802         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
803         (WebCore::JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor):
804         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
805         (WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor):
806         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
807         (WebCore::JSTestEventTargetConstructor::JSTestEventTargetConstructor):
808         * bindings/scripts/test/JS/JSTestException.cpp:
809         (WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor):
810         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
811         (WebCore::JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor):
812         * bindings/scripts/test/JS/JSTestInterface.cpp:
813         (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor):
814         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
815         (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor):
816         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
817         (WebCore::JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor):
818         (WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
819         * bindings/scripts/test/JS/JSTestNode.cpp:
820         (WebCore::JSTestNodeConstructor::JSTestNodeConstructor):
821         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
822         (WebCore::JSTestNondeterministicConstructor::JSTestNondeterministicConstructor):
823         * bindings/scripts/test/JS/JSTestObj.cpp:
824         (WebCore::JSTestObjConstructor::JSTestObjConstructor):
825         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
826         (WebCore::JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor):
827         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
828         (WebCore::JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor):
829         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
830         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor):
831         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
832         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
833         * bindings/scripts/test/JS/JSattribute.cpp:
834         (WebCore::JSattributeConstructor::JSattributeConstructor):
835         * bindings/scripts/test/JS/JSreadonly.cpp:
836         (WebCore::JSreadonlyConstructor::JSreadonlyConstructor):
837
838 2015-09-23  Chris Dumez  <cdumez@apple.com>
839
840         Simplify / Optimize Range::selectNode()
841         https://bugs.webkit.org/show_bug.cgi?id=149515
842
843         Reviewed by Ryosuke Niwa.
844
845         Simplify / Optimize Range::selectNode():
846         1. Do a null-check on refNode->parentNode() instead of checking the
847            nodeType(), which is virtual. Attr, DocumentFragment and Document
848            Nodes do not have a parent and thus are covered by this check.
849            Also, setStartBefore() / setEndAfter() were already doing a null
850            check on the parent.
851         2. Call lower-level setStart() / setEnd() directly, instead of using
852            setStartBefore() / setEndAfter() as intermediary. As a result:
853            2.a. We avoid doing a redundant null checks on refNode and its parent
854                 (inside those intermediate functions)
855            2.b. We only call refNode->computeNodeIndex() once instead of twice
856                 (in each of those intermediate functions). computeNodeIndex()
857                 is not a trivial getter as its needs to traverse all the
858                 previous siblings.
859
860         The implementation now matches exactly the text of the DOM specification
861         as well:
862         https://dom.spec.whatwg.org/#concept-range-select
863
864         No new layout tests, no web-exposed behavior intended.
865
866         * dom/Range.cpp:
867         (WebCore::Range::selectNode):
868
869 2015-09-23  Myles C. Maxfield  <mmaxfield@apple.com>
870
871         [Cocoa] [Font Features] Implement font-variant-*
872         https://bugs.webkit.org/show_bug.cgi?id=148413
873
874         Reviewed by Darin Adler.
875
876         This patch is the first pass of implementing of the font-variant-* properties. Specifically,
877         these properties are:
878         font-variant-ligatures
879         font-variant-position
880         font-variant-caps
881         font-variant-numeric
882         font-variant-alternates
883         font-variant-east-asian
884
885         These new properties are held inside FontDescription as bit fields. At font creation time,
886         we consult with the FontDescription to figure out which variants are specified. We then
887         convert those variants to font features, and resolve these font features with the additional
888         features specified by font-feature-settings (as the spec requires). This patch also makes
889         our caches sensitive to these new properties of FontDescription so we don't look up cached,
890         stale fonts.
891
892         The implementation has some caveats, however. They are listed here:
893         1. These new properties need to interact correctly with @font-face declarations. In
894         particular, only certain properties of the FontDescription should be considered when
895         detecting if a @font-face declaration applies to a particular element. This discrimination
896         does not happen correctly. In addition, any feature-specific CSS properties inside the
897         @font-face declaration need to be consulted at a particular point during the feature
898         resolve. This does not currently occur.
899         2. One of the properties, font-variant-alternates, has a few values which require custom
900         CSS functions, which makes modeling the properties as bit fields tricky. These extra values
901         need to be implemented. This patch implements all the values which do not require extra CSS
902         features.
903         3. These new properties have a shorthand, font-variant, which is designed to be backward-
904         compatible with CSS 2.1's concept of font-variant. In particular, CSS 2.1 allows you to use
905         "normal" and "small-caps" with font-variant. Both of these values are values of the new
906         property font-variant-caps. However, our existing implementation of small-caps does not
907         use font features when they exist; instead, it simply draws text at a smaller font size and
908         uses (effectively) text-transform to force capital letters. This implementation needs to be
909         unified with the new font-variant-caps property so that we can expand font-variant to be
910         a shorthand for the new properties.
911         4. font-variant-position and font-variant-caps should provide appropriate synthesis if no
912         matching font-feature exists.
913         5. FontCascade::typesettingFeatures() is now no-longer accurate. Fixing this would be large
914         enough to warrant its own patch.
915         6. These properties are not tested with TrueType fonts.
916
917         Tests: css3/font-variant-all-webfont.html
918                css3/font-variant-parsing.html
919
920         * css/CSSComputedStyleDeclaration.cpp: Reconstruct StyleProperties from a RenderStyle.
921         (WebCore::appendLigaturesValue):
922         (WebCore::fontVariantLigaturesPropertyValue):
923         (WebCore::fontVariantPositionPropertyValue):
924         (WebCore::fontVariantCapsPropertyValue):
925         (WebCore::fontVariantNumericPropertyValue):
926         (WebCore::fontVariantAlternatesPropertyValue):
927         (WebCore::fontVariantEastAsianPropertyValue):
928         (WebCore::ComputedStyleExtractor::propertyValue):
929         * css/CSSFontFeatureValue.cpp: Update to FontFeatureTag instead of WTF::String.
930         (WebCore::CSSFontFeatureValue::CSSFontFeatureValue):
931         (WebCore::CSSFontFeatureValue::customCSSText):
932         * css/CSSFontFeatureValue.h: Ditto.
933         (WebCore::CSSFontFeatureValue::create):
934         (WebCore::CSSFontFeatureValue::tag):
935         * css/CSSParser.cpp: Parse the new properties according to the CSS3 fonts spec.
936         (WebCore::isValidKeywordPropertyAndValue):
937         (WebCore::isKeywordPropertyID):
938         (WebCore::CSSParser::parseValue):
939         (WebCore::CSSParser::parseFontFeatureTag):
940         (WebCore::CSSParser::parseFontVariantLigatures):
941         (WebCore::CSSParser::parseFontVariantNumeric):
942         (WebCore::CSSParser::parseFontVariantEastAsian):
943         * css/CSSParser.h:
944         * css/CSSPrimitiveValueMappings.h: For the three properties which are simple keyword value
945         properties, implement casting operators to automatically convert between RenderStyle
946         objects and CSS property objects.
947         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
948         (WebCore::CSSPrimitiveValue::operator FontVariantPosition):
949         (WebCore::CSSPrimitiveValue::operator FontVariantCaps):
950         (WebCore::CSSPrimitiveValue::operator FontVariantAlternates):
951         * css/CSSPropertyNames.in: New properties.
952         * css/CSSValueKeywords.in: New values.
953         * css/StyleBuilderConverter.h:
954         (WebCore::StyleBuilderConverter::convertFontFeatureSettings): Update to not use
955         RefPtrs.
956         * css/StyleBuilderCustom.h: Properties which are not simple keyword value properties are
957         decomposed into multiple members of FontDescription. These properties exist to convert
958         between these aggregate members and the CSS properties.
959         (WebCore::StyleBuilderCustom::applyInheritFontVariantLigatures):
960         (WebCore::StyleBuilderCustom::applyInitialFontVariantLigatures):
961         (WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
962         (WebCore::StyleBuilderCustom::applyInheritFontVariantNumeric):
963         (WebCore::StyleBuilderCustom::applyInitialFontVariantNumeric):
964         (WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
965         (WebCore::StyleBuilderCustom::applyInheritFontVariantEastAsian):
966         (WebCore::StyleBuilderCustom::applyInitialFontVariantEastAsian):
967         (WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
968         (WebCore::StyleBuilderCustom::applyInitialWebkitFontVariantLigatures): Deleted.
969         (WebCore::StyleBuilderCustom::applyInheritWebkitFontVariantLigatures): Deleted.
970         (WebCore::StyleBuilderCustom::applyValueWebkitFontVariantLigatures): Deleted.
971         * editing/cocoa/HTMLConverter.mm:
972         (HTMLConverter::computedAttributesForElement): Unprefix font-variant-ligatures.
973         * platform/graphics/FontCache.h: Update cache to be sensitive to new state in
974         FontDescription.
975         (WebCore::FontDescriptionKey::FontDescriptionKey):
976         (WebCore::FontDescriptionKey::operator==):
977         (WebCore::FontDescriptionKey::computeHash):
978         (WebCore::FontDescriptionKey::makeFlagsKey):
979         (WebCore::FontDescriptionKey::makeFlagKey): Deleted.
980         * platform/graphics/FontCascade.cpp:
981         (WebCore::FontCascade::codePath): These new variants should trigger the complex text
982         codepath.
983         * platform/graphics/FontCascade.h:
984         (WebCore::FontCascade::computeTypesettingFeatures): Update to use new state enum.
985         * platform/graphics/FontDescription.cpp: Add state to hold new property values.
986         (WebCore::FontDescription::FontDescription):
987         (WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
988         * platform/graphics/FontDescription.h: Add state to hold new property values.
989         (WebCore::FontDescription::featureSettings):
990         (WebCore::FontDescription::variantCommonLigatures):
991         (WebCore::FontDescription::variantDiscretionaryLigatures):
992         (WebCore::FontDescription::variantHistoricalLigatures):
993         (WebCore::FontDescription::variantContextualAlternates):
994         (WebCore::FontDescription::variantPosition):
995         (WebCore::FontDescription::variantCaps):
996         (WebCore::FontDescription::variantNumericFigure):
997         (WebCore::FontDescription::variantNumericSpacing):
998         (WebCore::FontDescription::variantNumericFraction):
999         (WebCore::FontDescription::variantNumericOrdinal):
1000         (WebCore::FontDescription::variantNumericSlashedZero):
1001         (WebCore::FontDescription::variantAlternates):
1002         (WebCore::FontDescription::variantEastAsianVariant):
1003         (WebCore::FontDescription::variantEastAsianWidth):
1004         (WebCore::FontDescription::variantEastAsianRuby):
1005         (WebCore::FontDescription::variantSettings):
1006         (WebCore::FontDescription::setFeatureSettings):
1007         (WebCore::FontDescription::setVariantCommonLigatures):
1008         (WebCore::FontDescription::setVariantDiscretionaryLigatures):
1009         (WebCore::FontDescription::setVariantHistoricalLigatures):
1010         (WebCore::FontDescription::setVariantContextualAlternates):
1011         (WebCore::FontDescription::setVariantPosition):
1012         (WebCore::FontDescription::setVariantCaps):
1013         (WebCore::FontDescription::setVariantNumericFigure):
1014         (WebCore::FontDescription::setVariantNumericSpacing):
1015         (WebCore::FontDescription::setVariantNumericFraction):
1016         (WebCore::FontDescription::setVariantNumericOrdinal):
1017         (WebCore::FontDescription::setVariantNumericSlashedZero):
1018         (WebCore::FontDescription::setVariantAlternates):
1019         (WebCore::FontDescription::setVariantEastAsianVariant):
1020         (WebCore::FontDescription::setVariantEastAsianWidth):
1021         (WebCore::FontDescription::setVariantEastAsianRuby):
1022         (WebCore::FontDescription::operator==):
1023         (WebCore::FontCascadeDescription::initialVariantPosition):
1024         (WebCore::FontCascadeDescription::initialVariantCaps):
1025         (WebCore::FontCascadeDescription::initialVariantAlternates):
1026         (WebCore::FontCascadeDescription::commonLigaturesState): Deleted.
1027         (WebCore::FontCascadeDescription::discretionaryLigaturesState): Deleted.
1028         (WebCore::FontCascadeDescription::historicalLigaturesState): Deleted.
1029         (WebCore::FontCascadeDescription::setCommonLigaturesState): Deleted.
1030         (WebCore::FontCascadeDescription::setDiscretionaryLigaturesState): Deleted.
1031         (WebCore::FontCascadeDescription::setHistoricalLigaturesState): Deleted.
1032         (WebCore::FontCascadeDescription::operator==): Deleted.
1033         * platform/graphics/FontFeatureSettings.cpp: Update to use FontFeatureTag instead of
1034         WTF::String.
1035         (WebCore::FontFeature::FontFeature):
1036         (WebCore::FontFeature::operator==):
1037         (WebCore::FontFeature::operator<):
1038         (WebCore::FontFeatureSettings::hash):
1039         (WebCore::FontFeatureSettings::create): Deleted.
1040         * platform/graphics/FontFeatureSettings.h: Update to use FontFeatureTag instead of
1041         WTF::String.
1042         (WebCore::fontFeatureTag):
1043         (WebCore::FontFeatureTagHash::hash):
1044         (WebCore::FontFeatureTagHash::equal):
1045         (WebCore::FontFeatureTagHashTraits::constructDeletedValue):
1046         (WebCore::FontFeatureTagHashTraits::isDeletedValue):
1047         (WebCore::FontFeature::tag):
1048         (WebCore::FontFeatureSettings::operator==):
1049         (WebCore::FontFeatureSettings::begin):
1050         (WebCore::FontFeatureSettings::end):
1051         (WebCore::FontFeatureSettings::FontFeatureSettings): Deleted.
1052         * platform/graphics/cocoa/FontCacheCoreText.cpp: Ditto. Also, when computing font
1053         features, consult with the state inside FontDescription.
1054         (WebCore::tagEquals):
1055         (WebCore::appendTrueTypeFeature):
1056         (WebCore::appendOpenTypeFeature):
1057         (WebCore::computeFeatureSettingsFromVariants):
1058         (WebCore::preparePlatformFont):
1059         (WebCore::platformFontLookupWithFamily):
1060         (WebCore::fontWithFamily):
1061         (WebCore::FontCache::createFontPlatformData):
1062         (WebCore::FontCache::systemFallbackForCharacters):
1063         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: Update to use references instead of
1064         pointers.
1065         (WebCore::HarfBuzzShaper::setFontFeatures):
1066         * platform/graphics/mac/FontCacheMac.mm:
1067         (WebCore::platformFontWithFamily): Ditto.
1068         * platform/graphics/mac/FontCustomPlatformData.cpp:
1069         (WebCore::FontCustomPlatformData::fontPlatformData): Be sensitive to new state inside FontDescription.
1070         * platform/text/TextFlags.h:
1071         (WebCore::FontVariantSettings::isAllNormal): New state enums.
1072         * rendering/RenderThemeIOS.mm:
1073         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription): Be sensitive to new state inside
1074         FontDescription.
1075         * rendering/line/BreakingContext.h:
1076
1077 2015-09-23  Chris Dumez  <cdumez@apple.com>
1078
1079         Unreviewed, roll out r190085 as it seems to cause crashes in JSC
1080         <rdar://problem/22825602>
1081
1082         * bindings/scripts/CodeGeneratorJS.pm:
1083         (GenerateAttributesHashTable):
1084         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1085         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1086         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1087         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1088         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1089         * bindings/scripts/test/JS/JSTestException.cpp:
1090         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1091         * bindings/scripts/test/JS/JSTestInterface.cpp:
1092         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1093         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1094         * bindings/scripts/test/JS/JSTestNode.cpp:
1095         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1096         * bindings/scripts/test/JS/JSTestObj.cpp:
1097         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1098         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1099         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1100         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1101         * bindings/scripts/test/JS/JSattribute.cpp:
1102         * bindings/scripts/test/JS/JSreadonly.cpp:
1103
1104 2015-09-23  Chris Dumez  <cdumez@apple.com>
1105
1106         HTMLOutputElement.htmlFor should be settable
1107         https://bugs.webkit.org/show_bug.cgi?id=149418
1108
1109         Reviewed by Ryosuke Niwa.
1110
1111         HTMLOutputElement.htmlFor should be settable as per the latest HTML
1112         specification:
1113         - https://html.spec.whatwg.org/multipage/forms.html#the-output-element
1114
1115         It is supposed to call DOMSettableTokenList.setValue() with the input
1116         String. This patch adds support for this by adding [PutForwards=value]
1117         IDL extended attribute.
1118
1119         This aligns our behavior with the specification, Firefox and Chrome.
1120
1121         No new tests, already covered by existing test.
1122
1123         * html/AttributeDOMTokenList.cpp:
1124         (WebCore::AttributeDOMTokenList::AttributeDOMTokenList):
1125         (WebCore::AttributeDOMTokenList::attributeValueChanged):
1126         * html/AttributeDOMTokenList.h:
1127         - Have AttributeDOMTokenList subclass DOMSettableTokenList instead of
1128         DOMTokenList so that it can be used in places where the IDL expects
1129         us to return a DOMSettableTokenList (e.g. HTMLOutputElement.htmlFor).
1130         - Mark AttributeDOMTokenList as fast allocated.
1131
1132         * html/DOMSettableTokenList.cpp:
1133         (WebCore::DOMSettableTokenList::setValue):
1134         * html/DOMSettableTokenList.h:
1135         - Move setValue() from DOMTokenList to DOMSettableTokenList
1136           as it is only needed by DOMSettableTokenList.
1137         - Get rid of the factory function as all call sites are using
1138           AttributeDOMTokenList now.
1139         - Stop inheriting RefCounted as AttributeDOMTokenList handles its
1140           own refcounting.
1141
1142         * html/DOMTokenList.cpp:
1143         (WebCore::DOMTokenList::setValueInternal):
1144         * html/DOMTokenList.h:
1145         Rename setValue() to setValueInternal() as this version does not
1146         update the associated attribute value, only the tokens.
1147
1148         * html/HTMLLinkElement.cpp:
1149         * html/HTMLLinkElement.h:
1150         - Have HTMLLinkElement.sizes use an AttributeDOMTokenList instead of
1151           a DOMSettableTokenList as there is an associated attribute. The
1152           previous code had a bug has setting HTMLLinkElement.sizes would not
1153           update the associated 'sizes' attribute. Switching to using
1154           AttributeDOMTokenList fixes this and a new layout test has been added
1155           to cover this.
1156         - Create the AttributeDOMTokenList lazily to avoid updating it every
1157           time the sizes attribute changes until it is actually accessed.
1158
1159         * html/HTMLOutputElement.cpp:
1160         * html/HTMLOutputElement.h:
1161         - Have HTMLLinkElement.htmlFor use an AttributeDOMTokenList instead of
1162           a DOMSettableTokenList as there is an associated attribute.
1163         - Create the AttributeDOMTokenList lazily to avoid updating it every
1164           time the sizes attribute changes until it is actually accessed.
1165
1166         * html/HTMLOutputElement.idl:
1167         Add [PutForwards=value] on the htmlFor attribute, as per the
1168         HTML specification.
1169
1170 2015-09-23  Chris Dumez  <cdumez@apple.com>
1171
1172         TreeWalker.previousSibling()  / nextSibling() does not behave according to the specification
1173         https://bugs.webkit.org/show_bug.cgi?id=149493
1174
1175         Reviewed by Darin Adler.
1176
1177         TreeWalker.previousSibling()  / nextSibling() does not behave according
1178         to the specification:
1179         - https://dom.spec.whatwg.org/#dom-treewalker-nextsibling
1180         - https://dom.spec.whatwg.org/#dom-treewalker-previoussibling
1181         - https://dom.spec.whatwg.org/#concept-traverse-siblings
1182
1183         In particular, the previous code would fail to update 'node' variable
1184         in the case acceptNode() returned FILTER_REJECT. This patch fixes this
1185         and refactors the function to match more closely the text of the spec
1186         and avoid code duplication.
1187
1188         No new tests, already covered by existing test.
1189
1190         * dom/TreeWalker.cpp:
1191         (WebCore::TreeWalker::traverseSiblings):
1192         (WebCore::TreeWalker::previousSibling):
1193         (WebCore::TreeWalker::nextSibling):
1194         (WebCore::TreeWalker::previousNode): Deleted.
1195         * dom/TreeWalker.h:
1196
1197 2015-09-23  Alex Christensen  <achristensen@webkit.org>
1198
1199         Fix CMake build.
1200
1201         * CMakeLists.txt:
1202         Use {} instead of () for CMake variables.
1203
1204 2015-09-23  Tim Horton  <timothy_horton@apple.com>
1205
1206         Try to fix the CMake build.
1207
1208         * CMakeLists.txt:
1209
1210 2015-09-23  Tim Horton  <timothy_horton@apple.com>
1211
1212         Hopefully fix the production build.
1213
1214         * DerivedSources.make:
1215         * WebCore.vcxproj/build-generated-files.pl:
1216         * WebCore.xcodeproj/project.pbxproj:
1217         * generate-js-builtins:
1218         * make-generated-sources.sh:
1219
1220 2015-09-23  Ryosuke Niwa  <rniwa@webkit.org>
1221
1222         Mac production build fix attempt after r190155.
1223
1224         * WebCore.xcodeproj/project.pbxproj:
1225
1226 2015-09-23  Chris Dumez  <cdumez@apple.com>
1227
1228         Avoid unnecessary ancestor traversal in Range::selectNodeContents()
1229         https://bugs.webkit.org/show_bug.cgi?id=149491
1230
1231         Reviewed by Andreas Kling.
1232
1233         Avoid unnecessary ancestor traversal in Range::selectNodeContents().
1234         A DocumentType Node cannot have children, therefore, there is no need
1235         to check if ancestors are docTypes. We now simply check if the current
1236         node is a DocumentType Node, as per the specification:
1237         - https://dom.spec.whatwg.org/#dom-range-selectnodecontents (step 1)
1238
1239         * dom/Range.cpp:
1240         (WebCore::Range::selectNodeContents):
1241
1242 2015-09-23  Chris Dumez  <cdumez@apple.com>
1243
1244         Range's setStartBefore() / setStartAfter() / setEndBefore() / setEndAfter() do not match the specification
1245         https://bugs.webkit.org/show_bug.cgi?id=149490
1246
1247         Reviewed by Andreas Kling.
1248
1249         Range's setStartBefore() / setStartAfter() / setEndBefore() / setEndAfter()
1250         behavior do not match the DOM specification:
1251         - https://dom.spec.whatwg.org/#dom-range-setstartbefore
1252         - https://dom.spec.whatwg.org/#dom-range-setstartafter
1253         - https://dom.spec.whatwg.org/#dom-range-setendbefore
1254         - https://dom.spec.whatwg.org/#dom-range-setendafter
1255
1256         In particular, instead of step 2:
1257         "If parent is null, throw an InvalidNodeTypeError exception."
1258
1259         Our implementation was doing more checks and throwing exceptions in cases
1260         that the specification does not say we should. We were calling
1261         checkNodeBA() which had restrictions on both the node type and its
1262         root type. This is now replaced by a simple null check on the parent,
1263         as per the specification.
1264
1265         Firefox's behavior matches the specification.
1266
1267         No new tests, already covered by existing tests.
1268
1269         * dom/Range.cpp:
1270         (WebCore::Range::setStartAfter):
1271         (WebCore::Range::setEndBefore):
1272         (WebCore::Range::setEndAfter):
1273         (WebCore::Range::setStartBefore):
1274         (WebCore::Range::cloneRange): Deleted.
1275         (WebCore::Range::selectNode): Deleted.
1276         (WebCore::Range::selectNodeContents): Deleted.
1277         (WebCore::Range::absoluteTextRects): Deleted.
1278         * dom/Range.h:
1279
1280 2015-09-23  Commit Queue  <commit-queue@webkit.org>
1281
1282         Unreviewed, rolling out r190168.
1283         https://bugs.webkit.org/show_bug.cgi?id=149502
1284
1285         it broke debug builds. (Requested by zalan on #webkit).
1286
1287         Reverted changeset:
1288
1289         "HTMLOutputElement.htmlFor should be settable"
1290         https://bugs.webkit.org/show_bug.cgi?id=149418
1291         http://trac.webkit.org/changeset/190168
1292
1293 2015-09-23  Commit Queue  <commit-queue@webkit.org>
1294
1295         Unreviewed, rolling out r190160.
1296         https://bugs.webkit.org/show_bug.cgi?id=149501
1297
1298         media/media-controls-play-button-updates.html fails on
1299         Yosemite and EFL (Requested by zalan on #webkit).
1300
1301         Reverted changeset:
1302
1303         "[GTK] playbutton in media controls is not changed when it is
1304         clicked."
1305         https://bugs.webkit.org/show_bug.cgi?id=149113
1306         http://trac.webkit.org/changeset/190160
1307
1308 2015-09-23  Antti Koivisto  <antti@apple.com>
1309
1310         Try to fix build.
1311
1312         * css/DocumentRuleSets.h:
1313         * inspector/InspectorInstrumentation.h:
1314
1315 2015-09-23  Antti Koivisto  <antti@apple.com>
1316
1317         Fix sorting
1318
1319         * dom/DOMAllInOne.cpp:
1320
1321 2015-09-22  Antti Koivisto  <antti@apple.com>
1322
1323         Split author style code out from DocumentStyleSheetCollection
1324         https://bugs.webkit.org/show_bug.cgi?id=149446
1325
1326         Reviewed by Andreas Kling.
1327
1328         Shadow trees may have their own author style. Factor the related code out so we can use
1329         it outside the document context.
1330
1331         DocumentStyleSheetCollection is replaced by two classes:
1332
1333         AuthorStyleSheets - author stylesheets and mutation optimization code
1334         ExtensionStyleSheets - user stylesheets, injected author stylesheets, content extension stylesheets
1335
1336         * WebCore.xcodeproj/project.pbxproj:
1337         * contentextensions/ContentExtensionsBackend.cpp:
1338         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
1339         * css/CSSStyleSheet.cpp:
1340         (WebCore::CSSStyleSheet::didMutateRules):
1341         * css/DocumentRuleSets.cpp:
1342         (WebCore::DocumentRuleSets::~DocumentRuleSets):
1343         (WebCore::DocumentRuleSets::initUserStyle):
1344         * css/DocumentRuleSets.h:
1345         (WebCore::DocumentRuleSets::sibling):
1346         (WebCore::DocumentRuleSets::uncommonAttribute):
1347         * css/InspectorCSSOMWrappers.cpp:
1348         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheets):
1349         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
1350         (WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection): Deleted.
1351         * css/InspectorCSSOMWrappers.h:
1352         * css/StyleResolver.cpp:
1353         (WebCore::StyleResolver::StyleResolver):
1354         (WebCore::StyleResolver::appendAuthorStyleSheets):
1355         * css/StyleSheetList.cpp:
1356         (WebCore::StyleSheetList::styleSheets):
1357         (WebCore::StyleSheetList::detachFromDocument):
1358         (WebCore::StyleSheetList::length):
1359         * dom/AuthorStyleSheets.cpp: Added.
1360         (WebCore::AuthorStyleSheets::AuthorStyleSheets):
1361         (WebCore::AuthorStyleSheets::combineCSSFeatureFlags):
1362         (WebCore::AuthorStyleSheets::resetCSSFeatureFlags):
1363         (WebCore::AuthorStyleSheets::addAuthorSheet):
1364         (WebCore::AuthorStyleSheets::removePendingSheet):
1365         (WebCore::AuthorStyleSheets::addStyleSheetCandidateNode):
1366         (WebCore::AuthorStyleSheets::removeStyleSheetCandidateNode):
1367         (WebCore::AuthorStyleSheets::collectActiveStyleSheets):
1368         (WebCore::AuthorStyleSheets::analyzeStyleSheetChange):
1369         (WebCore::filterEnabledNonemptyCSSStyleSheets):
1370         (WebCore::AuthorStyleSheets::updateActiveStyleSheets):
1371         (WebCore::AuthorStyleSheets::activeStyleSheetsForInspector):
1372         (WebCore::AuthorStyleSheets::activeStyleSheetsContains):
1373         (WebCore::AuthorStyleSheets::detachFromDocument):
1374         * dom/AuthorStyleSheets.h: Added.
1375         (WebCore::AuthorStyleSheets::activeStyleSheets):
1376         (WebCore::AuthorStyleSheets::styleSheets):
1377         (WebCore::AuthorStyleSheets::styleSheetsForStyleSheetList):
1378         (WebCore::AuthorStyleSheets::pendingUpdateType):
1379         (WebCore::AuthorStyleSheets::setPendingUpdateType):
1380         (WebCore::AuthorStyleSheets::flushPendingUpdates):
1381         (WebCore::AuthorStyleSheets::preferredStylesheetSetName):
1382         (WebCore::AuthorStyleSheets::selectedStylesheetSetName):
1383         (WebCore::AuthorStyleSheets::setPreferredStylesheetSetName):
1384         (WebCore::AuthorStyleSheets::setSelectedStylesheetSetName):
1385         (WebCore::AuthorStyleSheets::addPendingSheet):
1386         (WebCore::AuthorStyleSheets::hasPendingSheets):
1387         (WebCore::AuthorStyleSheets::usesFirstLineRules):
1388         (WebCore::AuthorStyleSheets::usesFirstLetterRules):
1389         (WebCore::AuthorStyleSheets::usesRemUnits):
1390         (WebCore::AuthorStyleSheets::setUsesRemUnit):
1391         (WebCore::AuthorStyleSheets::usesStyleBasedEditability):
1392         (WebCore::AuthorStyleSheets::setUsesStyleBasedEditability):
1393         * dom/Document.cpp:
1394         (WebCore::Document::Document):
1395         (WebCore::Document::~Document):
1396         (WebCore::Document::setCompatibilityMode):
1397         (WebCore::Document::recalcStyle):
1398         (WebCore::Document::createStyleResolver):
1399         (WebCore::Document::fontsNeedUpdate):
1400         (WebCore::Document::usesStyleBasedEditability):
1401         (WebCore::Document::processHttpEquiv):
1402         (WebCore::Document::preferredStylesheetSet):
1403         (WebCore::Document::selectedStylesheetSet):
1404         (WebCore::Document::setSelectedStylesheetSet):
1405         (WebCore::Document::scheduleOptimizedStyleSheetUpdate):
1406         (WebCore::Document::styleResolverChanged):
1407         (WebCore::Document::haveStylesheetsLoaded):
1408         (WebCore::Document::getCachedLocale):
1409         * dom/Document.h:
1410         (WebCore::Document::authorStyleSheets):
1411         (WebCore::Document::extensionStyleSheets):
1412         (WebCore::Document::gotoAnchorNeededAfterStylesheetsLoad):
1413         (WebCore::Document::setGotoAnchorNeededAfterStylesheetsLoad):
1414         (WebCore::Document::styleSheetCollection): Deleted.
1415         * dom/DocumentStyleSheetCollection.cpp: Removed.
1416         * dom/DocumentStyleSheetCollection.h: Removed.
1417         * dom/ExtensionStyleSheets.cpp: Copied from Source/WebCore/dom/DocumentStyleSheetCollection.cpp.
1418         (WebCore::ExtensionStyleSheets::ExtensionStyleSheets):
1419         (WebCore::ExtensionStyleSheets::pageUserSheet):
1420         (WebCore::ExtensionStyleSheets::clearPageUserSheet):
1421         (WebCore::ExtensionStyleSheets::updatePageUserSheet):
1422         (WebCore::ExtensionStyleSheets::injectedUserStyleSheets):
1423         (WebCore::ExtensionStyleSheets::injectedAuthorStyleSheets):
1424         (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache):
1425         (WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache):
1426         (WebCore::ExtensionStyleSheets::addUserSheet):
1427         (WebCore::ExtensionStyleSheets::addDisplayNoneSelector):
1428         (WebCore::ExtensionStyleSheets::maybeAddContentExtensionSheet):
1429         (WebCore::ExtensionStyleSheets::styleResolverChangedTimerFired):
1430         (WebCore::ExtensionStyleSheets::detachFromDocument):
1431         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection): Deleted.
1432         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags): Deleted.
1433         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags): Deleted.
1434         (WebCore::DocumentStyleSheetCollection::pageUserSheet): Deleted.
1435         (WebCore::DocumentStyleSheetCollection::clearPageUserSheet): Deleted.
1436         (WebCore::DocumentStyleSheetCollection::updatePageUserSheet): Deleted.
1437         (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets): Deleted.
1438         (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets): Deleted.
1439         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache): Deleted.
1440         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache): Deleted.
1441         (WebCore::DocumentStyleSheetCollection::addAuthorSheet): Deleted.
1442         (WebCore::DocumentStyleSheetCollection::addUserSheet): Deleted.
1443         (WebCore::DocumentStyleSheetCollection::addDisplayNoneSelector): Deleted.
1444         (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet): Deleted.
1445         (WebCore::DocumentStyleSheetCollection::styleResolverChangedTimerFired): Deleted.
1446         (WebCore::DocumentStyleSheetCollection::removePendingSheet): Deleted.
1447         (WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode): Deleted.
1448         (WebCore::DocumentStyleSheetCollection::removeStyleSheetCandidateNode): Deleted.
1449         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets): Deleted.
1450         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange): Deleted.
1451         (WebCore::filterEnabledNonemptyCSSStyleSheets): Deleted.
1452         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Deleted.
1453         (WebCore::DocumentStyleSheetCollection::activeStyleSheetsForInspector): Deleted.
1454         (WebCore::DocumentStyleSheetCollection::activeStyleSheetsContains): Deleted.
1455         (WebCore::DocumentStyleSheetCollection::detachFromDocument): Deleted.
1456         * dom/ExtensionStyleSheets.h: Copied from Source/WebCore/dom/DocumentStyleSheetCollection.h.
1457         (WebCore::ExtensionStyleSheets::documentUserStyleSheets):
1458         (WebCore::DocumentStyleSheetCollection::styleSheetsForStyleSheetList): Deleted.
1459         (WebCore::DocumentStyleSheetCollection::activeAuthorStyleSheets): Deleted.
1460         (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets): Deleted.
1461         (WebCore::DocumentStyleSheetCollection::documentAuthorStyleSheets): Deleted.
1462         (WebCore::DocumentStyleSheetCollection::pendingUpdateType): Deleted.
1463         (WebCore::DocumentStyleSheetCollection::setPendingUpdateType): Deleted.
1464         (WebCore::DocumentStyleSheetCollection::flushPendingUpdates): Deleted.
1465         (WebCore::DocumentStyleSheetCollection::preferredStylesheetSetName): Deleted.
1466         (WebCore::DocumentStyleSheetCollection::selectedStylesheetSetName): Deleted.
1467         (WebCore::DocumentStyleSheetCollection::setPreferredStylesheetSetName): Deleted.
1468         (WebCore::DocumentStyleSheetCollection::setSelectedStylesheetSetName): Deleted.
1469         (WebCore::DocumentStyleSheetCollection::addPendingSheet): Deleted.
1470         (WebCore::DocumentStyleSheetCollection::hasPendingSheets): Deleted.
1471         (WebCore::DocumentStyleSheetCollection::usesFirstLineRules): Deleted.
1472         (WebCore::DocumentStyleSheetCollection::usesFirstLetterRules): Deleted.
1473         (WebCore::DocumentStyleSheetCollection::usesRemUnits): Deleted.
1474         (WebCore::DocumentStyleSheetCollection::setUsesRemUnit): Deleted.
1475         (WebCore::DocumentStyleSheetCollection::usesStyleBasedEditability): Deleted.
1476         (WebCore::DocumentStyleSheetCollection::setUsesStyleBasedEditability): Deleted.
1477         * dom/InlineStyleSheetOwner.cpp:
1478         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
1479         (WebCore::InlineStyleSheetOwner::removedFromDocument):
1480         (WebCore::InlineStyleSheetOwner::clearDocumentData):
1481         (WebCore::InlineStyleSheetOwner::childrenChanged):
1482         (WebCore::InlineStyleSheetOwner::createSheet):
1483         (WebCore::InlineStyleSheetOwner::sheetLoaded):
1484         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
1485         * dom/ProcessingInstruction.cpp:
1486         (WebCore::ProcessingInstruction::~ProcessingInstruction):
1487         (WebCore::ProcessingInstruction::nodeName):
1488         (WebCore::ProcessingInstruction::checkStyleSheet):
1489         (WebCore::ProcessingInstruction::sheetLoaded):
1490         (WebCore::ProcessingInstruction::insertedInto):
1491         (WebCore::ProcessingInstruction::removedFrom):
1492         * html/HTMLLinkElement.cpp:
1493         (WebCore::HTMLLinkElement::~HTMLLinkElement):
1494         (WebCore::HTMLLinkElement::insertedInto):
1495         (WebCore::HTMLLinkElement::removedFrom):
1496         (WebCore::HTMLLinkElement::addPendingSheet):
1497         (WebCore::HTMLLinkElement::removePendingSheet):
1498         * html/HTMLQuoteElement.cpp:
1499         * inspector/InspectorCSSAgent.cpp:
1500         (WebCore::InspectorCSSAgent::collectAllDocumentStyleSheets):
1501         (WebCore::InspectorCSSAgent::buildObjectForRule):
1502         * loader/DocumentLoader.cpp:
1503         (WebCore::DocumentLoader::commitData):
1504         * page/Page.cpp:
1505         (WebCore::Page::userStyleSheetLocationChanged):
1506         (WebCore::Page::setUserContentController):
1507         * page/PageGroup.cpp:
1508         * page/UserContentController.cpp:
1509         (WebCore::UserContentController::invalidateInjectedStyleSheetCacheInAllFrames):
1510         * rendering/RenderBlock.cpp:
1511         (WebCore::RenderBlock::lineHeight):
1512         (WebCore::RenderBlock::getFirstLetter):
1513         * rendering/RenderElement.cpp:
1514         (WebCore::RenderElement::uncachedFirstLineStyle):
1515         (WebCore::RenderElement::cachedFirstLineStyle):
1516         * rendering/RenderElement.h:
1517         (WebCore::RenderElement::firstLineStyle):
1518         (WebCore::RenderElement::setAncestorLineBoxDirty):
1519         * rendering/RenderInline.cpp:
1520         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
1521         (WebCore::RenderInline::lineHeight):
1522         * rendering/RenderLineBreak.cpp:
1523         (WebCore::RenderLineBreak::lineHeight):
1524         * rendering/RootInlineBox.cpp:
1525         (WebCore::RootInlineBox::verticalPositionForBox):
1526         * style/StyleResolveTree.cpp:
1527         (WebCore::Style::resolveLocal):
1528
1529 2015-09-23  Chris Dumez  <cdumez@apple.com>
1530
1531         HTMLOutputElement.htmlFor should be settable
1532         https://bugs.webkit.org/show_bug.cgi?id=149418
1533
1534         Reviewed by Ryosuke Niwa.
1535
1536         HTMLOutputElement.htmlFor should be settable as per the latest HTML
1537         specification:
1538         - https://html.spec.whatwg.org/multipage/forms.html#the-output-element
1539
1540         It is supposed to call DOMSettableTokenList.setValue() with the input
1541         String. This patch adds support for this by adding [PutForwards=value]
1542         IDL extended attribute.
1543
1544         This aligns our behavior with the specification, Firefox and Chrome.
1545
1546         No new tests, already covered by existing test.
1547
1548         * html/AttributeDOMTokenList.cpp:
1549         (WebCore::AttributeDOMTokenList::AttributeDOMTokenList):
1550         (WebCore::AttributeDOMTokenList::attributeValueChanged):
1551         * html/AttributeDOMTokenList.h:
1552         - Have AttributeDOMTokenList subclass DOMSettableTokenList instead of
1553         DOMTokenList so that it can be used in places where the IDL expects
1554         us to return a DOMSettableTokenList (e.g. HTMLOutputElement.htmlFor).
1555         - Mark AttributeDOMTokenList as fast allocated.
1556
1557         * html/DOMSettableTokenList.cpp:
1558         (WebCore::DOMSettableTokenList::setValue):
1559         * html/DOMSettableTokenList.h:
1560         - Move setValue() from DOMTokenList to DOMSettableTokenList
1561           as it is only needed by DOMSettableTokenList.
1562         - Get rid of the factory function as all call sites are using
1563           AttributeDOMTokenList now.
1564         - Stop inheriting RefCounted as AttributeDOMTokenList handles its
1565           own refcounting.
1566
1567         * html/DOMTokenList.cpp:
1568         (WebCore::DOMTokenList::setValueInternal):
1569         * html/DOMTokenList.h:
1570         Rename setValue() to setValueInternal() as this version does not
1571         update the associated attribute value, only the tokens.
1572
1573         * html/HTMLLinkElement.cpp:
1574         * html/HTMLLinkElement.h:
1575         - Have HTMLLinkElement.sizes use an AttributeDOMTokenList instead of
1576           a DOMSettableTokenList as there is an associated attribute. The
1577           previous code had a bug has setting HTMLLinkElement.sizes would not
1578           update the associated 'sizes' attribute. Switching to using
1579           AttributeDOMTokenList fixes this and a new layout test has been added
1580           to cover this.
1581         - Create the AttributeDOMTokenList lazily to avoid updating it every
1582           time the sizes attribute changes until it is actually accessed.
1583
1584         * html/HTMLOutputElement.cpp:
1585         * html/HTMLOutputElement.h:
1586         - Have HTMLLinkElement.htmlFor use an AttributeDOMTokenList instead of
1587           a DOMSettableTokenList as there is an associated attribute.
1588         - Create the AttributeDOMTokenList lazily to avoid updating it every
1589           time the sizes attribute changes until it is actually accessed.
1590
1591         * html/HTMLOutputElement.idl:
1592         Add [PutForwards=value] on the htmlFor attribute, as per the
1593         HTML specification.
1594
1595 2015-09-23  ChangSeok Oh  <changseok.oh@collabora.com>
1596
1597         [GTK] playbutton in media controls is not changed when it is clicked.
1598         https://bugs.webkit.org/show_bug.cgi?id=149113
1599
1600         Reviewed by Philippe Normand.
1601
1602         When the play button in media controls is clicked, a 'paused' class is added or removed
1603         for the element to update its appearance. Although Document::recalcStyle is triggered
1604         by that class attribute change, the play button is not changed since there is
1605         no difference in styles whether having the 'paused' class or not. Gtk port
1606         does not define the -webkit-media-controls-play-button.paused. To fix this,
1607         -webkit-media-controls-play-button.paused is newly defined with a dummy style,
1608         "position: relative;", which should not change the play button appearance,
1609         but be clearly different in style.
1610
1611         Test: media/media-controls-play-button-updates.html
1612
1613         * css/mediaControlsGtk.css:
1614         (video::-webkit-media-controls-play-button.paused):
1615
1616 2015-09-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1617
1618         [Streams API] Implement ReadableStream pipeThrough
1619         https://bugs.webkit.org/show_bug.cgi?id=147556
1620
1621         Reviewed by Darin Adler.
1622
1623         Adding initial support for JS builtins within WebCore.
1624         This patch allows implementing IDL interface methods in JS, by using the new JSBuiltin keyword.
1625         (No support yet for private identifiers, constructors or accessors).
1626         Integration of the built-in executables and names is implemented within WebCoreJSClientData.
1627         Two files are generated for each JS builtin file:
1628         - builtin h/cpp files similar to JSCBuiltins.cpp/.h, generated through WebCore/generate-js-builtins from JavaScriptCore/generate-js-builtins)
1629         - A builtin wrapper file mimicking BuiltinExecutables (generated from WebCore/generate-js-builtins)
1630         Contrary to JSC, each js file is generating its own cpp/h file.
1631         This allows including those files within the JSXX.cpp/.h files generated from the IDL where compilation guard may take effect.
1632
1633         Disabled GObject binding for JSBuiltin methods.
1634
1635         Test: streams/readable-stream-pipeThrough.html
1636
1637         * CMakeLists.txt: Triggering generate-js-builtins for JS files.
1638         * DerivedSources.make: Ditto.
1639         * ForwardingHeaders/builtins/BuiltinUtils.h: Added.
1640         * ForwardingHeaders/bytecode/UnlinkedFunctionExecutable.h: Added.
1641         * ForwardingHeaders/runtime/ConstructAbility.h: Added.
1642         * Modules/streams/ReadableStream.idl: Marking pipeThrough as JS builtin
1643         * Modules/streams/ReadableStream.js: Added.
1644         (pipeThrough):
1645         * bindings/js/JSReadableStreamCustom.cpp:
1646         * bindings/js/WebCoreJSClientData.h: Adding ReadableStreamBuiltinsWrapper to store ReadableStream builtin executable
1647         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
1648         (WebCore::WebCoreJSClientData::readableStreamBuiltins):
1649         (WebCore::initNormalWorldClientData):
1650         * bindings/scripts/CodeGeneratorGObject.pm: Disabled GObject binding for JSBuiltin methods.
1651         * bindings/scripts/CodeGeneratorJS.pm: Adding support for JSBuiltin keyword.
1652         (GetFunctionName):
1653         (GenerateHeader):
1654         (GenerateImplementation):
1655         (GenerateHashTableValueArray):
1656         (ComputeFunctionSpecial):
1657         (UseJSBuiltins):
1658         * bindings/scripts/IDLAttributes.txt: Adding JSBuiltin.
1659         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1660         (webkit_dom_test_obj_js_builtin_method):
1661         (webkit_dom_test_obj_js_builtin_method_with_args):
1662         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1663         * bindings/scripts/test/JS/JSTestObj.cpp:
1664         * bindings/scripts/test/JS/JSTestObj.h:
1665         * bindings/scripts/test/ObjC/DOMTestObj.h:
1666         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1667         (-[DOMTestObj jsBuiltinMethod]):
1668         (-[DOMTestObj jsBuiltinMethodWithArgs:strArg:objArg:]):
1669         * bindings/scripts/test/TestObj.idl:
1670         * generate-js-builtins: Added.
1671
1672 2015-09-22  Ryosuke Niwa  <rniwa@webkit.org>
1673
1674         Event fired on a detached node does not bubble up
1675         https://bugs.webkit.org/show_bug.cgi?id=149488
1676
1677         Reviewed by Antti Koivisto.
1678
1679         The bug was caused by an explicit check inside EventPath to match an old Firefox behavior (see r19897).
1680         Since Firefox's behavior has changed to match DOM4: https://dom.spec.whatwg.org/#concept-event-dispatch
1681
1682         Fixed the bug by removing the check. The new behavior matches DO4 and behaviors of Firefox and Chrome.
1683
1684         Test: fast/events/event-propagation-in-detached-tree.html
1685
1686         * dom/EventDispatcher.cpp:
1687         (WebCore::EventPath::EventPath):
1688
1689 2015-09-22  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1690
1691         Add a file of pointer-lock to cmake ports
1692         https://bugs.webkit.org/show_bug.cgi?id=149453
1693
1694         Reviewed by Csaba Osztrogonác.
1695
1696         Some cmake ports will be able to enable POINTER_LOCK. To support it,
1697         this patch adds PointerLockController.cpp, and fix a build break in WK2.
1698
1699         * CMakeLists.txt:
1700
1701 2015-09-22  Chris Dumez  <cdumez@apple.com>
1702
1703         Drop unnecessary ancestor traversal in Range::selectNode()
1704         https://bugs.webkit.org/show_bug.cgi?id=149482
1705
1706         Reviewed by Ryosuke Niwa.
1707
1708         Drop unnecessary ancestor traversal in Range::selectNode(). It traversed
1709         the ancestors to throw a INVALID_NODE_TYPE_ERR if one of them was a
1710         DocumentType Node. However, it is impossible for a DocumentType Node to
1711         have children.
1712
1713         * dom/Range.cpp:
1714         (WebCore::Range::selectNode):
1715
1716 2015-09-22  Brian Weinstein  <bweinstein@apple.com>
1717
1718         Error message in ContentExtensionError.cpp shouldn't have two spaces between sentences.
1719         https://bugs.webkit.org/show_bug.cgi?id=149479
1720
1721         Reviewed by Andy Estes.
1722
1723         * contentextensions/ContentExtensionError.cpp:
1724         (WebCore::ContentExtensions::contentExtensionErrorCategory):
1725
1726 2015-09-22  Chris Dumez  <cdumez@apple.com>
1727
1728         Range.surroundContents() should check for partially contained non-Text nodes first
1729         https://bugs.webkit.org/show_bug.cgi?id=149476
1730
1731         Reviewed by Darin Adler.
1732
1733         Range.surroundContents() should check for partially contained non-Text
1734         nodes first, before checking the type of the newParent parameter:
1735         - https://dom.spec.whatwg.org/#dom-range-surroundcontents (step 1 and 2)
1736
1737         Firefox and Chrome follow the specification.
1738
1739         No new tests, already covered by existing test.
1740
1741         * dom/Range.cpp:
1742         (WebCore::Range::surroundContents):
1743
1744 2015-09-22  Commit Queue  <commit-queue@webkit.org>
1745
1746         Unreviewed, rolling out r190134.
1747         https://bugs.webkit.org/show_bug.cgi?id=149481
1748
1749         "Seems to cause crashes during garbage collection" (Requested
1750         by cdumez on #webkit).
1751
1752         Reverted changeset:
1753
1754         "HTMLOutputElement.htmlFor should be settable"
1755         https://bugs.webkit.org/show_bug.cgi?id=149418
1756         http://trac.webkit.org/changeset/190134
1757
1758 2015-09-22  Chris Dumez  <cdumez@apple.com>
1759
1760         Range.intersectsNode() does not behave according to the specification when start / end are equal
1761         https://bugs.webkit.org/show_bug.cgi?id=148774
1762         <rdar://problem/22571418>
1763
1764         Reviewed by Darin Adler.
1765
1766         Range.intersectsNode() does not behave according to the specification
1767         when start / end are equal:
1768         https://dom.spec.whatwg.org/#dom-range-intersectsnode
1769
1770         The specification says:
1771         "If (parent, offset) is before end and (parent, offset + 1) is after
1772         start, return true."
1773
1774         However, the way we were detecting "is before end" and "is after start"
1775         was flawed in the case where start / end were equal. This is because when
1776         comparePoint() return 0, then it means that the node/offset is not only
1777         equal to start but also equal to end. As such, it is not "after start"
1778         / "before end".
1779
1780         No new tests, already covered by existing.
1781
1782         * dom/Range.cpp:
1783         (WebCore::Range::intersectsNode):
1784         (WebCore::highestAncestorUnderCommonRoot): Deleted.
1785
1786 2015-09-22  Chris Dumez  <cdumez@apple.com>
1787
1788         HTMLOutputElement.htmlFor should be settable
1789         https://bugs.webkit.org/show_bug.cgi?id=149418
1790
1791         Reviewed by Darin Adler.
1792
1793         HTMLOutputElement.htmlFor should be settable as per the latest HTML
1794         specification:
1795         - https://html.spec.whatwg.org/multipage/forms.html#the-output-element
1796
1797         It is supposed to call DOMSettableTokenList.setValue() with the input
1798         String. This patch adds support for this by adding [PutForwards=value]
1799         IDL extended attribute.
1800
1801         This aligns our behavior with the specification, Firefox and Chrome.
1802
1803         No new tests, already covered by existing test.
1804
1805         * accessibility/AccessibilityObject.cpp:
1806         (WebCore::AccessibilityObject::classList):
1807         * dom/Element.cpp:
1808         (WebCore::Element::classList):
1809         * dom/ElementRareData.h:
1810         (WebCore::ElementRareData::setClassList):
1811         * html/AttributeDOMTokenList.h:
1812         * html/DOMSettableTokenList.h:
1813         * html/HTMLAnchorElement.cpp:
1814         (WebCore::HTMLAnchorElement::relList):
1815         * html/HTMLAnchorElement.h:
1816         * html/HTMLLinkElement.cpp:
1817         (WebCore::HTMLLinkElement::relList):
1818         * html/HTMLLinkElement.h:
1819         * html/HTMLOutputElement.cpp:
1820         (WebCore::HTMLOutputElement::HTMLOutputElement):
1821         (WebCore::HTMLOutputElement::parseAttribute):
1822         (WebCore::HTMLOutputElement::childrenChanged): Deleted.
1823         * html/HTMLOutputElement.h:
1824         * html/HTMLOutputElement.idl:
1825
1826 2015-09-22  Filip Pizlo  <fpizlo@apple.com>
1827
1828         Get rid of ENABLE(GGC)
1829         https://bugs.webkit.org/show_bug.cgi?id=149472
1830
1831         Reviewed by Mark Hahnenberg and Mark Lam.
1832
1833         No new tests because no new behavior.
1834
1835         * bindings/js/JSDOMWindowBase.cpp:
1836         (WebCore::JSDOMWindowBase::commonVM):
1837
1838 2015-09-22  Tim Horton  <timothy_horton@apple.com>
1839
1840         Make it more obvious when using an unaccelerated image buffer, and fix a few callers who do
1841         https://bugs.webkit.org/show_bug.cgi?id=149428
1842
1843         Reviewed by Simon Fraser and Darin Adler.
1844
1845         * platform/graphics/ImageBuffer.cpp:
1846         (WebCore::ImageBuffer::createCompatibleBuffer):
1847         * platform/graphics/ImageBuffer.h:
1848         (WebCore::ImageBuffer::create):
1849         Make the RenderingMode parameter to ImageBuffer::create non-optional.
1850
1851         * platform/graphics/GraphicsContext.h:
1852         (WebCore::GraphicsContext::renderingMode):
1853         * platform/graphics/GraphicsTypes.h:
1854         Add renderingMode() getter so that every caller doesn't need to do the conversion to RenderingMode.
1855
1856         * css/CSSFilterImageValue.cpp:
1857         (WebCore::CSSFilterImageValue::image):
1858         * html/canvas/WebGLRenderingContextBase.cpp:
1859         (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
1860         * rendering/shapes/Shape.cpp:
1861         (WebCore::Shape::createRasterShape):
1862         * html/shadow/MediaControlElements.cpp:
1863         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
1864         * platform/graphics/cg/ImageBufferCG.cpp:
1865         (WebCore::ImageBuffer::putByteArray):
1866         These five callers create unconditionally unaccelerated ImageBuffers which
1867         should probably instead respect the acceleration bit from the context
1868         that the ImageBuffer will eventually be painted into. Bugs have been filed.
1869
1870         * html/HTMLCanvasElement.cpp:
1871         (WebCore::HTMLCanvasElement::createImageBuffer):
1872         * html/canvas/CanvasRenderingContext2D.cpp:
1873         (WebCore::CanvasRenderingContext2D::createCompositingBuffer):
1874         * platform/graphics/CrossfadeGeneratedImage.cpp:
1875         (WebCore::CrossfadeGeneratedImage::drawPattern):
1876         Adjust the argument order and remove defaults which are passed explicitly.
1877
1878         * page/FrameSnapshotting.cpp:
1879         (WebCore::snapshotFrameRect):
1880         Snapshots are (currently) meant to be taken without accelerated drawing.
1881         Make this explicit.
1882
1883         * platform/graphics/BitmapImage.cpp:
1884         (WebCore::BitmapImage::drawPattern):
1885         Make use of createCompatibleBuffer. This caller was previously creating
1886         an unconditionally unaccelerated context!
1887
1888         * platform/graphics/NamedImageGeneratedImage.cpp:
1889         (WebCore::NamedImageGeneratedImage::drawPattern):
1890         Remove a comment.
1891
1892         * platform/graphics/ShadowBlur.cpp:
1893         (WebCore::ScratchBuffer::getScratchBuffer):
1894         ShadowBlur is only used with unaccelerated contexts, so it's OK to hardcode Unaccelerated here.
1895
1896         * platform/graphics/filters/FilterEffect.cpp:
1897         (WebCore::FilterEffect::asImageBuffer):
1898         (WebCore::FilterEffect::createImageBufferResult):
1899         Flip the order of the arguments.
1900
1901         (WebCore::FilterEffect::openCLImageToImageBuffer):
1902         This caller was previously creating an unaccelerated buffer; instead, match the destination buffer.
1903
1904         * rendering/FilterEffectRenderer.cpp:
1905         (WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded):
1906         Adjust the argument order and remove defaults which are passed explicitly.
1907
1908         * rendering/RenderLayer.cpp:
1909         (WebCore::RenderLayer::calculateClipRects):
1910         Get rid of the unneeded renderingMode local, and factor out retrieval of Frame.
1911
1912         * rendering/svg/RenderSVGResourceClipper.cpp:
1913         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1914         * rendering/svg/RenderSVGResourceMasker.cpp:
1915         (WebCore::RenderSVGResourceMasker::applyResource):
1916         These two callers are unconditionally creating unaccelerated buffers,
1917         and changing this to match the destination context seems to actually
1918         break things. This needs further investigation.
1919
1920         * rendering/svg/RenderSVGResourceGradient.cpp:
1921         (WebCore::createMaskAndSwapContextForTextGradient):
1922         This caller was previously creating an unaccelerated buffer; instead, match the destination buffer.
1923
1924         * rendering/svg/RenderSVGResourcePattern.cpp:
1925         (WebCore::RenderSVGResourcePattern::buildPattern):
1926         Make use of renderingMode().
1927
1928         * rendering/svg/SVGRenderingContext.cpp:
1929         (WebCore::SVGRenderingContext::createImageBuffer):
1930         Adjust the argument order.
1931
1932         * svg/graphics/SVGImage.cpp:
1933         (WebCore::SVGImage::nativeImageForCurrentFrame):
1934
1935 2015-09-22  Chris Dumez  <cdumez@apple.com>
1936
1937         XMLHttpRequest properties should be on the prototype
1938         https://bugs.webkit.org/show_bug.cgi?id=149465
1939
1940         Reviewed by Darin Adler.
1941
1942         Move most XMLHttpRequest properties to the prototype, as per the Web IDL
1943         specification. This should be web-compatible now that properties on the
1944         prototype are configurable after r190104.
1945
1946         The 'response' / 'responseText' properties are still incorrectly on the
1947         instance because they are currently using a [CustomGetter] in our IDL
1948         and the bindings generator currently does not move such properties to
1949         the prototype.
1950
1951         Test:
1952         fast/xmlhttprequest/xmlhttprequest-properties-prototype.html
1953         js/dom/xhr-prototype-define-property.html
1954
1955         * bindings/scripts/CodeGeneratorJS.pm:
1956         (InterfaceRequiresAttributesOnInstanceForCompatibility): Deleted.
1957
1958 2015-09-22  Chris Dumez  <cdumez@apple.com>
1959
1960         Drop support for legacy EntityReference DOM Node type
1961         https://bugs.webkit.org/show_bug.cgi?id=149348
1962
1963         Reviewed by Darin Adler.
1964
1965         Drop support for legacy EntityReference DOM Node type.
1966
1967         EntityReference has been dropped from the DOM specification:
1968         - https://dom.spec.whatwg.org/#dom-core-changes
1969
1970         EntityReference is not supported in Firefox:
1971         - https://developer.mozilla.org/en-US/docs/Web/API/EntityReference
1972         - https://developer.mozilla.org/en-US/docs/Web/API/NodeIterator.expandEntityReferences
1973         - https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker.expandEntityReferences
1974
1975         Chrome dropped support for EntityReference a while back (May 2013):
1976         - EntityReference: https://code.google.com/p/chromium/issues/detail?id=226628
1977         - NodeFilter / TreeWalker.expandEntityReferences:
1978           - https://groups.google.com/a/chromium.org/d/msg/blink-dev/-ZO3eja4maA/86T13XJwQpUJ
1979           - https://src.chromium.org/viewvc/blink?view=rev&revision=185771
1980
1981         IE also dropped support for EntityReference Nodes:
1982         https://msdn.microsoft.com/library/ff974819(v=vs.85).aspx (Remarks section)
1983
1984         No new tests, already covered by existing test.
1985
1986         * DerivedSources.cpp:
1987         * WebCore.vcxproj/WebCore.vcxproj:
1988         * WebCore.vcxproj/WebCore.vcxproj.filters:
1989         * WebCore.xcodeproj/project.pbxproj:
1990         * bindings/gobject/WebKitDOMPrivate.cpp:
1991         (WebKit::wrap): Deleted.
1992         * bindings/js/JSNodeCustom.cpp:
1993         (WebCore::createWrapperInline): Deleted.
1994         * bindings/objc/DOM.mm:
1995         (kitClass): Deleted.
1996         * bindings/scripts/CodeGeneratorGObject.pm:
1997         (SkipFunction): Skip webkit_dom_document_create_entity_reference until Carlos fixes it.
1998         * dom/Attr.cpp:
1999         (WebCore::Attr::childTypeAllowed):
2000         (WebCore::Attr::childrenChanged): Deleted.
2001         * dom/Attr.h:
2002         * dom/ContainerNode.cpp:
2003         (WebCore::checkAcceptChild): Deleted.
2004         (WebCore::checkAcceptChildGuaranteedNodeTypes): Deleted.
2005         (WebCore::ContainerNode::removeChild): Deleted.
2006         * dom/Document.cpp:
2007         (WebCore::Document::createEntityReference):
2008         (WebCore::Document::createNodeIterator):
2009         (WebCore::Document::createTreeWalker):
2010         (WebCore::Document::createEditingTextNode): Deleted.
2011         (WebCore::Document::importNode): Deleted.
2012         (WebCore::Document::adoptNode): Deleted.
2013         (WebCore::Document::scheduleForcedStyleRecalc): Deleted.
2014         (WebCore::Document::scheduleStyleRecalc): Deleted.
2015         (WebCore::Document::childTypeAllowed): Deleted.
2016         (WebCore::Document::canAcceptChild): Deleted.
2017         * dom/Document.h:
2018         * dom/Document.idl:
2019         * dom/DocumentFragment.cpp:
2020         (WebCore::DocumentFragment::childTypeAllowed): Deleted.
2021         * dom/Element.cpp:
2022         (WebCore::Element::childTypeAllowed): Deleted.
2023         * dom/EntityReference.cpp:
2024         (WebCore::EntityReference::EntityReference):
2025         * dom/EntityReference.h:
2026         * dom/EntityReference.idl:
2027         * dom/Node.cpp:
2028         (WebCore::Node::setNodeValue):
2029         (WebCore::Node::dumpStatistics): Deleted.
2030         (WebCore::Node::childNodes): Deleted.
2031         (WebCore::Node::lastDescendant): Deleted.
2032         (WebCore::Node::isDescendantOf): Deleted.
2033         (WebCore::Node::textContent): Deleted.
2034         (WebCore::Node::ancestorElement): Deleted.
2035         (WebCore::hashPointer): Deleted.
2036         * dom/Node.h:
2037         (WebCore::Node::isDocumentTypeNode): Deleted.
2038         * dom/NodeIterator.cpp:
2039         (WebCore::NodeIterator::NodeIterator):
2040         * dom/NodeIterator.h:
2041         (WebCore::NodeIterator::create):
2042         * dom/NodeIterator.idl:
2043         * dom/Range.cpp:
2044         (WebCore::Range::checkDeleteExtract):
2045         (WebCore::lengthOfContentsInNode): Deleted.
2046         (WebCore::Range::processContentsBetweenOffsets): Deleted.
2047         (WebCore::Range::insertNode): Deleted.
2048         (WebCore::Range::checkNodeWOffset): Deleted.
2049         (WebCore::Range::checkNodeBA): Deleted.
2050         (WebCore::Range::cloneRange): Deleted.
2051         (WebCore::Range::selectNode): Deleted.
2052         (WebCore::Range::selectNodeContents): Deleted.
2053         (WebCore::Range::surroundContents): Deleted.
2054         (WebCore::Range::shadowRoot): Deleted.
2055         (WebCore::Range::pastLastNode): Deleted.
2056         (WebCore::Range::absoluteBoundingBox): Deleted.
2057         (WebCore::Range::absoluteTextRects): Deleted.
2058         * dom/Range.h:
2059         * dom/ShadowRoot.cpp:
2060         (WebCore::ShadowRoot::childTypeAllowed): Deleted.
2061         * dom/Traversal.cpp:
2062         (WebCore::NodeIteratorBase::NodeIteratorBase):
2063         (WebCore::NodeIteratorBase::acceptNode): Deleted.
2064         * dom/Traversal.h:
2065         (WebCore::NodeIteratorBase::expandEntityReferences):
2066         * dom/TreeWalker.cpp:
2067         (WebCore::TreeWalker::TreeWalker):
2068         * dom/TreeWalker.h:
2069         (WebCore::TreeWalker::create):
2070         * dom/TreeWalker.idl:
2071         * editing/MarkupAccumulator.cpp:
2072         (WebCore::MarkupAccumulator::appendStartMarkup): Deleted.
2073         * xml/XPathUtil.cpp:
2074         (WebCore::XPath::isValidContextNode): Deleted.
2075
2076 2015-09-22  Eric Carlson  <eric.carlson@apple.com>
2077
2078         Unreviewed 32-bit Yosemite build fix.
2079
2080         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
2081         (WebCore::WebAudioSourceProviderAVFObjC::provideInput):
2082
2083 2015-09-22  Eric Carlson  <eric.carlson@apple.com>
2084
2085         [MediaStream Mac] implement WebAudioSourceProvider
2086         https://bugs.webkit.org/show_bug.cgi?id=149419
2087
2088         Reviewed by Darin Adler.
2089
2090         * Modules/mediastream/MediaStreamTrack.cpp:
2091         (WebCore::MediaStreamTrack::audioSourceProvider): New.
2092         * Modules/mediastream/MediaStreamTrack.h:
2093
2094         * Modules/webaudio/AudioContext.cpp:
2095         (WebCore::AudioContext::createMediaStreamSource): Rewrite.
2096
2097         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2098         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): We know the Vector
2099           size, so reserve capacity.
2100
2101         * Modules/webaudio/MediaStreamAudioSource.cpp:
2102         (WebCore::MediaStreamAudioSource::audioSourceProvider): Add.
2103         * Modules/webaudio/MediaStreamAudioSource.h:
2104         (WebCore::MediaStreamAudioSource::~MediaStreamAudioSource):
2105         (WebCore::MediaStreamAudioSource::deviceId):
2106         (WebCore::MediaStreamAudioSource::setDeviceId):
2107         (WebCore::MediaStreamAudioSource::useIDForTrackID): Deleted.
2108
2109         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
2110         (WebCore::MediaStreamAudioSourceNode::create): Context and track can't be null so take references.
2111         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode): Ditto.
2112         (WebCore::MediaStreamAudioSourceNode::~MediaStreamAudioSourceNode): Clear provider client.
2113         (WebCore::MediaStreamAudioSourceNode::setFormat): Create a resampler when necessary.
2114         (WebCore::MediaStreamAudioSourceNode::process): Process.
2115         (WebCore::MediaStreamAudioSourceNode::reset): Deleted.
2116         * Modules/webaudio/MediaStreamAudioSourceNode.h:
2117         (WebCore::MediaStreamAudioSourceNode::mediaStream):
2118         (WebCore::MediaStreamAudioSourceNode::audioSourceProvider): Deleted.
2119
2120         * WebCore.xcodeproj/project.pbxproj: Add WebAudioSourceProviderAVFObjC.cpp/h.
2121
2122         * platform/mediastream/MediaStreamTrackPrivate.cpp:
2123         (WebCore::MediaStreamTrackPrivate::audioSourceProvider): New, passthrough to source.
2124         * platform/mediastream/MediaStreamTrackPrivate.h:
2125         * platform/mediastream/RealtimeMediaSource.h:
2126         (WebCore::RealtimeMediaSource::audioSourceProvider):
2127
2128         * platform/mediastream/mac/AVAudioCaptureSource.h:
2129         * platform/mediastream/mac/AVAudioCaptureSource.mm:
2130         (WebCore::AVAudioCaptureSource::audioSourceProvider): New.
2131         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2132         * platform/mediastream/mac/AVMediaCaptureSource.h:
2133         * platform/mediastream/mac/AVMediaCaptureSource.mm:
2134         (WebCore::AVMediaCaptureSource::audioSourceProvider): Assert, this shouldn't be reachable.
2135
2136         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h: Added.
2137         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm: Added.
2138         (WebCore::WebAudioSourceProviderAVFObjC::create):
2139         (WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
2140         (WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
2141         (WebCore::WebAudioSourceProviderAVFObjC::startProducingData):
2142         (WebCore::WebAudioSourceProviderAVFObjC::stopProducingData):
2143         (WebCore::WebAudioSourceProviderAVFObjC::provideInput):
2144         (WebCore::WebAudioSourceProviderAVFObjC::setClient):
2145         (WebCore::operator==):
2146         (WebCore::operator!=):
2147         (WebCore::WebAudioSourceProviderAVFObjC::prepare):
2148         (WebCore::WebAudioSourceProviderAVFObjC::unprepare):
2149         (WebCore::WebAudioSourceProviderAVFObjC::process):
2150
2151 2015-09-22  sangdeug.kim  <sangdeug.kim@samsung.com>
2152
2153         CurrentTime on mediaController is set as 0 when playback is completed.
2154         https://bugs.webkit.org/show_bug.cgi?id=149154
2155
2156         Reviewed by Eric Carlson.
2157
2158         Test : media/media-controller-time-clamp.html
2159
2160         * html/MediaController.cpp:
2161         (MediaController::setCurrentTime):
2162         (MediaController::updatePlaybackState):
2163         * html/MediaController.h:
2164
2165 2015-09-22  Commit Queue  <commit-queue@webkit.org>
2166
2167         Unreviewed, rolling out r189616.
2168         https://bugs.webkit.org/show_bug.cgi?id=149456
2169
2170         suspected cause of multiple regressions (Requested by kling on
2171         #webkit).
2172
2173         Reverted changeset:
2174
2175         "[JSC] Weak should only accept cell pointees."
2176         https://bugs.webkit.org/show_bug.cgi?id=148955
2177         http://trac.webkit.org/changeset/189616
2178
2179 2015-09-22  Csaba Osztrogonác  <ossy@webkit.org>
2180
2181         Fix the all-in-one build with GCC
2182         https://bugs.webkit.org/show_bug.cgi?id=148428
2183
2184         Reviewed by Darin Adler.
2185
2186         Removed Source/WebCore/inspector/InspectorIndexedDBAgent.cpp from the all-in-one build.
2187
2188         * WebCore.vcxproj/WebCore.vcxproj:
2189         * inspector/InspectorAllInOne.cpp:
2190
2191 2015-09-22  Csaba Osztrogonác  <ossy@webkit.org>
2192
2193         Fix warnings in IDLParser.pm
2194         https://bugs.webkit.org/show_bug.cgi?id=149406
2195
2196         Reviewed by Alex Christensen.
2197
2198         * bindings/scripts/IDLParser.pm:
2199         (typeHasNullableSuffix):
2200         (typeRemoveNullableSuffix):
2201
2202 2015-09-22  Ryosuke Niwa  <rniwa@webkit.org>
2203
2204         invalidateSlotAssignments should trigger style recalc
2205         https://bugs.webkit.org/show_bug.cgi?id=149447
2206
2207         Reviewed by Antti Koivisto.
2208
2209         Invalidate the render tree of a shadow host when a new child is inserted, an existing child is removed,
2210         or slot attribute of a child is modified.
2211
2212         No new tests. Covered by existing tests added in r190101.
2213
2214         * dom/Element.cpp:
2215         (WebCore::Element::childrenChanged): Call invalidateSlotAssignments or invalidateDefaultSlotAssignments
2216         depending on the types of children being inserted or removed since text nodes can only be assigned into
2217         a default slot.
2218         * dom/ShadowRoot.cpp:
2219         (WebCore::ShadowRoot::invalidateSlotAssignments):
2220         (WebCore::ShadowRoot::invalidateDefaultSlotAssignments): Added.
2221         * dom/ShadowRoot.h:
2222         * dom/SlotAssignment.cpp:
2223         (WebCore::SlotAssignment::invalidate): Reconstruct the render tree for the whole host. We can optimize
2224         in the future by only invalidating active slot elements instead.
2225         (WebCore::SlotAssignment::invalidateDefaultSlot): Added.
2226         * dom/SlotAssignment.h:
2227
2228 2015-09-21  Chris Dumez  <cdumez@apple.com>
2229
2230         time element should use HTMLTimeElement interface
2231         https://bugs.webkit.org/show_bug.cgi?id=148840
2232         <rdar://problem/22586690>
2233
2234         Reviewed by Ryosuke Niwa.
2235
2236         Time element should be an instance of HTMLTimeElement instead of generic
2237         HTMLElement:
2238         https://html.spec.whatwg.org/multipage/semantics.html#the-time-element
2239
2240         Firefox exposes HTMLTimeElement. This patch aligns our behavior with
2241         the specification and Firefox.
2242
2243         No new tests, already covered by existing test.
2244
2245         * CMakeLists.txt:
2246         * DerivedSources.cpp:
2247         * DerivedSources.make:
2248         * WebCore.vcxproj/WebCore.vcxproj:
2249         * WebCore.vcxproj/WebCore.vcxproj.filters:
2250         * WebCore.xcodeproj/project.pbxproj:
2251         * html/HTMLElementsAllInOne.cpp:
2252         * html/HTMLTagNames.in:
2253         * html/HTMLTimeElement.cpp: Added.
2254         (WebCore::HTMLTimeElement::create):
2255         (WebCore::HTMLTimeElement::HTMLTimeElement):
2256         * html/HTMLTimeElement.h: Added.
2257         * html/HTMLTimeElement.idl: Added.
2258
2259 2015-09-21  Chris Dumez  <cdumez@apple.com>
2260
2261         DOM attributes on prototypes should be configurable
2262         https://bugs.webkit.org/show_bug.cgi?id=134364
2263
2264         Reviewed by Sam Weinig.
2265
2266         DOM attributes on prototypes should be configurable as per the Web IDL
2267         specification:
2268         https://heycam.github.io/webidl/#es-attributes
2269
2270         This patch aligns our behavior with the specification and Firefox.
2271
2272         Test: fast/dom/attributes-configurable.html
2273
2274         * bindings/scripts/CodeGeneratorJS.pm:
2275         (GenerateAttributesHashTable):
2276
2277 2015-09-21  Filip Pizlo  <fpizlo@apple.com>
2278
2279         Always use the compiler's CAS implementation and get rid of ENABLE(COMPARE_AND_SWAP)
2280         https://bugs.webkit.org/show_bug.cgi?id=149438
2281
2282         Reviewed by Mark Lam.
2283
2284         No new tests because no new behavior.
2285
2286         * platform/text/TextBreakIterator.cpp:
2287         (WebCore::compareAndSwapNonSharedCharacterBreakIterator):
2288         (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator):
2289
2290 2015-09-21  Timothy Horton  <timothy_horton@apple.com>
2291
2292         Allow DataDetectors to pre-filter telephone number menu items
2293         https://bugs.webkit.org/show_bug.cgi?id=149444
2294         <rdar://problem/19286320>
2295
2296         Reviewed by Sam Weinig.
2297
2298         * platform/spi/mac/DataDetectorsSPI.h:
2299         Add some SPI.
2300
2301 2015-09-21  Chris Dumez  <cdumez@apple.com>
2302
2303         Update HTMLTableRowElement.rowIndex to behave according to the specification
2304         https://bugs.webkit.org/show_bug.cgi?id=148842
2305         <rdar://problem/22586914>
2306
2307         Reviewed by Darin Adler.
2308
2309         Update HTMLTableRowElement.rowIndex to behave according to the
2310         specification:
2311         https://html.spec.whatwg.org/multipage/tables.html#dom-tr-rowindex
2312
2313         In particular, rowIndex no longer returns -1 for <tr> elements that are
2314         direct children of the table Element. Also,<tr> Elements in all <thead> /
2315         <tfoot> children of the table Element now get a rowIndex, as per the
2316         specification:
2317         - https://html.spec.whatwg.org/multipage/tables.html#dom-table-rows
2318
2319         Previously, only <tr> elements in the first <thead> and the first <tbody>
2320         children of the table would get a rowIndex.
2321
2322         Also, we now abort early and return -1 if the row is a grand-child of a
2323         table element but its direct parent is not a <thead> / <tbody> / <tfoot>.
2324         This avoid unnecessary traversal and matches the specification.
2325
2326         The code is refactored a bit to leverage HTMLTableElement.rows(), as
2327         per the specification:
2328         "return the index of the tr element in that table element's rows collection"
2329
2330         Previously, we would duplicate the table traversal logic. This
2331         simplifies the code and fixes a bug as the traversal logic was slightly
2332         different here and in HTMLTableRowsCollection. Because of this, only
2333         <tr> elements in the first <thead> / <tfoot> would get a rowIndex.
2334         Performance should be similar.
2335
2336         No new tests, already covered by existing test.
2337
2338         * html/HTMLTableRowElement.cpp:
2339         (WebCore::HTMLTableRowElement::rowIndex):
2340         (WebCore::HTMLTableRowElement::sectionRowIndex): Deleted.
2341         (WebCore::HTMLTableRowElement::insertCell): Deleted.
2342
2343 2015-09-21  Ryosuke Niwa  <rniwa@webkit.org>
2344
2345         Fix release builds with security assertion after r190007.
2346
2347         * dom/DocumentOrderedMap.cpp:
2348         * dom/DocumentOrderedMap.h:
2349
2350 2015-09-21  Gwang Yoon Hwang  <yoon@igalia.com>
2351
2352         [Threaded Compositor] Modified to use reference of GraphicsContext instead of pointer
2353         https://bugs.webkit.org/show_bug.cgi?id=149399
2354
2355         Reviewed by Darin Adler.
2356
2357         This fixes build failure after r189144
2358
2359         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2360         (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaint):
2361         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2362         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
2363         * platform/graphics/texmap/coordinated/CoordinatedSurface.h:
2364         * platform/graphics/texmap/coordinated/Tile.cpp:
2365         (WebCore::Tile::paintToSurfaceContext):
2366         * platform/graphics/texmap/coordinated/Tile.h:
2367         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
2368         * platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
2369
2370 2015-09-21  Ryosuke Niwa  <rniwa@webkit.org>
2371
2372         The binding for getDistributedNodes unnecessarily makes a vector of nodes
2373         https://bugs.webkit.org/show_bug.cgi?id=149434
2374
2375         Reviewed by Darin Adler.
2376
2377         Added a jsArray for const Vector<T*>* so that we can generate the binding code for getDistributedNodes()
2378         without having to create Vector<RefPtr<Node>> out of Vector<Node*>*.
2379
2380         * bindings/js/JSDOMBinding.h:
2381         (WebCore::jsArray): Added.
2382         * html/HTMLSlotElement.cpp:
2383         (WebCore::HTMLSlotElement::assignedNodes):
2384         (WebCore::HTMLSlotElement::getDistributedNodes): Deleted.
2385         * html/HTMLSlotElement.h:
2386         * html/HTMLSlotElement.idl:
2387
2388 2015-09-21  Brent Fulgham  <bfulgham@apple.com>
2389
2390         [Win] Show tiled drawing debug overlay on Windows
2391         https://bugs.webkit.org/show_bug.cgi?id=149426
2392
2393         Reviewed by Dean Jackson.
2394
2395         No new tests: No change in behavior.
2396
2397         * platform/graphics/ca/PlatformCALayer.cpp:
2398         (WebCore::PlatformCALayer::drawRepaintIndicator): Revise signature to accept
2399         a scale value and a font size.
2400         (WebCore::PlatformCALayer::drawTextAtPoint): Revise signature for new arguments.
2401         * platform/graphics/ca/PlatformCALayer.h:
2402         * platform/graphics/ca/TileGrid.cpp:
2403         (WebCore::TileGrid::drawTileMapContents): Removing scaling and text drawing code,
2404         and call common CALayer drawing routine.
2405         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2406         (WebCore::CACFLayerTreeHost::create): Switch to nullptr.
2407         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost): Switch to C++14 initializers.
2408         (WebCore::CACFLayerTreeHost::setPage): Added.
2409         (WebCore::CACFLayerTreeHost::rootLayer): Update debug info layer if requested by settings.
2410         (WebCore::CACFLayerTreeHost::layerTreeDidChange): Ditto.
2411         (WebCore::CACFLayerTreeHost::mainFrameTiledBacking): Added.
2412         (WebCore::CACFLayerTreeHost::updateDbugInfoLayer): Added.
2413         * platform/graphics/ca/win/CACFLayerTreeHost.h:
2414         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2415         (WebCore::PlatformCALayerWin::drawTextAtPoint): Revised signature for new arguments. Use
2416         argument for font size (rather than hard-coded '18'). Adjust font size by passed scale value.
2417         * platform/graphics/ca/win/PlatformCALayerWin.h:
2418
2419 2015-09-21  Chris Dumez  <cdumez@apple.com>
2420
2421         [JS Bindings] prototype.constructor should be writable
2422         https://bugs.webkit.org/show_bug.cgi?id=149412
2423         <rdar://problem/22545096>
2424
2425         Reviewed by Geoffrey Garen.
2426
2427         prototype.constructor should have the following properties:
2428         { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
2429
2430         as per the Web IDL specification:
2431         https://heycam.github.io/webidl/#interface-prototype-object
2432
2433         In WebKit, it is currently not writable. It is writable in Firefox.
2434
2435         Test: fast/events/event-prototype-constructor-properties.html
2436
2437         * bindings/scripts/CodeGeneratorJS.pm:
2438         (GenerateAttributesHashTable):
2439         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2440         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2441         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2442         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2443         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2444         * bindings/scripts/test/JS/JSTestException.cpp:
2445         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2446         * bindings/scripts/test/JS/JSTestInterface.cpp:
2447         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2448         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2449         * bindings/scripts/test/JS/JSTestNode.cpp:
2450         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2451         * bindings/scripts/test/JS/JSTestObj.cpp:
2452         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2453         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2454         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2455         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2456         * bindings/scripts/test/JS/JSattribute.cpp:
2457         * bindings/scripts/test/JS/JSreadonly.cpp:
2458
2459 2015-09-21  Antti Koivisto  <antti@apple.com>
2460
2461         HTMLSlotElement should render its assigned nodes
2462         https://bugs.webkit.org/show_bug.cgi?id=149242
2463
2464         Reviewed by Ryosuke Niwa.
2465
2466         Support rendering the assigned nodes under HTMLSlotElement.
2467
2468         * dom/SlotAssignment.cpp:
2469         (WebCore::SlotAssignment::assignSlots):
2470
2471             Move the empty slot finding to the loop as the hash table may mutate.
2472
2473         * html/HTMLSlotElement.cpp:
2474         (WebCore::HTMLSlotElement::attributeChanged):
2475         (WebCore::HTMLSlotElement::assignedNodes):
2476         (WebCore::HTMLSlotElement::getDistributedNodes):
2477         * html/HTMLSlotElement.h:
2478         * style/StyleResolveTree.cpp:
2479         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
2480         (WebCore::Style::attachSlot):
2481         (WebCore::Style::attachRenderTree):
2482         (WebCore::Style::detachChildren):
2483         (WebCore::Style::detachShadowRoot):
2484         (WebCore::Style::detachSlot):
2485         (WebCore::Style::detachRenderTree):
2486         (WebCore::Style::resolveChildren):
2487         (WebCore::Style::resolveSlot):
2488         (WebCore::Style::resolveTree):
2489
2490 2015-09-21  Tim Horton  <timothy_horton@apple.com>
2491
2492         svg/custom/hidpi-masking-clipping.svg fails with accelerated drawing on
2493         https://bugs.webkit.org/show_bug.cgi?id=149413
2494         <rdar://problem/22787058>
2495
2496         Reviewed by Dean Jackson.
2497
2498         No new tests, this is covered by existing tests.
2499
2500         * rendering/svg/RenderSVGResourcePattern.cpp:
2501         (WebCore::RenderSVGResourcePattern::buildPattern):
2502         (WebCore::RenderSVGResourcePattern::applyResource):
2503         (WebCore::RenderSVGResourcePattern::createTileImage):
2504         * rendering/svg/RenderSVGResourcePattern.h:
2505         Make pattern images respect the accelerated bit of the parent GraphicsContext.
2506
2507 2015-09-21  Chris Dumez  <cdumez@apple.com>
2508
2509         DOMTokenList.add() / remove() should run the update steps even if tokens were not modified
2510         https://bugs.webkit.org/show_bug.cgi?id=148780
2511         <rdar://problem/22571794>
2512
2513         Reviewed by Ryosuke Niwa.
2514
2515         DOMTokenList.add() / remove() should run the update steps even if tokens
2516         were not modified, as per the DOM specification:
2517         - https://dom.spec.whatwg.org/#dom-domtokenlist-add
2518         - https://dom.spec.whatwg.org/#dom-domtokenlist-remove
2519
2520         The update steps are specified at:
2521         - https://dom.spec.whatwg.org/#concept-DTL-update
2522
2523         This will have several side effects if the DOMTokenList has an associated
2524         attribute. It will overwrite the attribute value which will:
2525         1. Generate a Mutation event.
2526         2. Possibly change the attribute value as the new value is the "ordered
2527            set serializer for tokens". So it will get rid of extra spaces and
2528            duplicates in the attribute value.
2529
2530         Firefox already behaves according to the specification.
2531
2532         No new tests, already covered by existing tests.
2533
2534         * html/DOMTokenList.cpp:
2535         (WebCore::DOMTokenList::addInternal):
2536         (WebCore::DOMTokenList::removeInternal):
2537         (WebCore::DOMTokenList::remove): Deleted.
2538
2539 2015-09-21  Eric Carlson  <eric.carlson@apple.com>
2540
2541         [MediaStream] Clean up MediaStream private interfaces
2542         https://bugs.webkit.org/show_bug.cgi?id=149381
2543
2544         Reviewed by Jer Noble.
2545
2546         No new tests, no functional change.
2547
2548         * Modules/mediastream/MediaStream.cpp:
2549         (WebCore::MediaStream::create):
2550         (WebCore::MediaStream::MediaStream):
2551         (WebCore::MediaStream::clone):
2552         (WebCore::MediaStream::getTrackById):
2553         (WebCore::MediaStream::getAudioTracks):
2554         (WebCore::MediaStream::getVideoTracks):
2555         (WebCore::MediaStream::getTracks):
2556         (WebCore::MediaStream::activeStatusChanged):
2557         (WebCore::MediaStream::didAddTrack):
2558         (WebCore::MediaStream::didRemoveTrack):
2559         (WebCore::MediaStream::registry):
2560         (WebCore::MediaStream::trackVectorForType):
2561         (WebCore::MediaStream::didAddTrackToPrivate): Deleted.
2562         (WebCore::MediaStream::didRemoveTrackFromPrivate): Deleted.
2563         * Modules/mediastream/MediaStream.h:
2564
2565         * Modules/mediastream/MediaStreamRegistry.cpp:
2566         (WebCore::MediaStreamRegistry::lookup):
2567         (WebCore::MediaStreamRegistry::MediaStreamRegistry):
2568         * Modules/mediastream/MediaStreamRegistry.h:
2569
2570         * Modules/mediastream/MediaStreamTrack.cpp:
2571         (WebCore::MediaStreamTrack::MediaStreamTrack):
2572         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2573         (WebCore::MediaStreamTrack::kind):
2574         (WebCore::MediaStreamTrack::removeObserver):
2575         (WebCore::MediaStreamTrack::trackEnded):
2576         (WebCore::MediaStreamTrack::trackMutedChanged):
2577         (WebCore::MediaStreamTrack::trackStatesChanged):
2578         (WebCore::MediaStreamTrack::configureTrackRendering):
2579         * Modules/mediastream/MediaStreamTrack.h:
2580
2581         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2582         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsType):
2583         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load):
2584
2585         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.h:
2586         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.mm:
2587         (WebCore::MediaStreamPrivateAVFObjC::create):
2588         (WebCore::MediaStreamPrivateAVFObjC::MediaStreamPrivateAVFObjC):
2589
2590         * platform/mediastream/MediaStreamPrivate.cpp:
2591         (WebCore::MediaStreamPrivate::create):
2592         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
2593         (WebCore::MediaStreamPrivate::~MediaStreamPrivate):
2594         (WebCore::MediaStreamPrivate::tracks):
2595         (WebCore::MediaStreamPrivate::addTrack):
2596         (WebCore::MediaStreamPrivate::removeTrack):
2597         * platform/mediastream/MediaStreamPrivate.h:
2598         (WebCore::MediaStreamPrivateClient::~MediaStreamPrivateClient):
2599         (WebCore::MediaStreamPrivate::id):
2600         (WebCore::MediaStreamPrivate::active):
2601         (WebCore::MediaStreamPrivate::MediaStreamPrivate): Deleted.
2602         (WebCore::MediaStreamPrivate::~MediaStreamPrivate): Deleted.
2603
2604         * platform/mediastream/MediaStreamTrackPrivate.cpp:
2605         (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
2606         (WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
2607         (WebCore::MediaStreamTrackPrivate::addObserver):
2608         (WebCore::MediaStreamTrackPrivate::removeObserver):
2609         (WebCore::MediaStreamTrackPrivate::label):
2610         (WebCore::MediaStreamTrackPrivate::endTrack):
2611         (WebCore::MediaStreamTrackPrivate::sourceStopped):
2612         (WebCore::MediaStreamTrackPrivate::sourceMutedChanged):
2613         (WebCore::MediaStreamTrackPrivate::sourceStatesChanged):
2614         (WebCore::MediaStreamTrackPrivate::preventSourceFromStopping):
2615         * platform/mediastream/MediaStreamTrackPrivate.h:
2616         (WebCore::MediaStreamTrackPrivate::Observer::~Observer):
2617         (WebCore::MediaStreamTrackPrivate::ended):
2618         (WebCore::MediaStreamTrackPrivate::startProducingData):
2619         (WebCore::MediaStreamTrackPrivate::stopProducingData):
2620         (WebCore::MediaStreamTrackPrivate::setMuted):
2621         (WebCore::MediaStreamTrackPrivateClient::~MediaStreamTrackPrivateClient): Deleted.
2622         (WebCore::MediaStreamTrackPrivate::setClient): Deleted.
2623         (WebCore::MediaStreamTrackPrivate::client): Deleted.
2624
2625         * platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
2626         (WebCore::TrackSourceInfo::create):
2627         (WebCore::TrackSourceInfo::id):
2628         (WebCore::TrackSourceInfo::label):
2629         (WebCore::TrackSourceInfo::groupId):
2630         (WebCore::TrackSourceInfo::kind):
2631         (WebCore::TrackSourceInfo::TrackSourceInfo):
2632         (WebCore::TrackSourceInfo::deviceId): Deleted.
2633
2634         * platform/mediastream/RealtimeMediaSource.cpp:
2635         (WebCore::RealtimeMediaSource::RealtimeMediaSource):
2636         (WebCore::RealtimeMediaSource::reset):
2637         (WebCore::RealtimeMediaSource::setMuted):
2638         (WebCore::RealtimeMediaSource::statesDidChanged):
2639         (WebCore::RealtimeMediaSource::readonly):
2640         * platform/mediastream/RealtimeMediaSource.h:
2641         (WebCore::RealtimeMediaSource::id):
2642         (WebCore::RealtimeMediaSource::persistentId):
2643         (WebCore::RealtimeMediaSource::setPersistentId):
2644         (WebCore::RealtimeMediaSource::type):
2645         (WebCore::RealtimeMediaSource::stopped):
2646         * platform/mediastream/RealtimeMediaSourceCenter.h:
2647         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2648         (WebCore::AVCaptureDeviceManager::getSourcesInfo):
2649
2650         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2651         (WebCore::RealtimeMediaSourceCenterMac::~RealtimeMediaSourceCenterMac):
2652         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
2653         (WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
2654         (WebCore::RealtimeMediaSourceCenterMac::getMediaStreamTrackSources):
2655         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
2656
2657         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
2658         (WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
2659         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
2660         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
2661
2662         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
2663         (WebCore::MockRealtimeMediaSourceCenter::registerMockRealtimeMediaSourceCenter):
2664         (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
2665         (WebCore::MockRealtimeMediaSourceCenter::createMediaStream):
2666         (WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources):
2667         * platform/mock/MockRealtimeMediaSourceCenter.h:
2668
2669 2015-09-21  Csaba Osztrogonác  <ossy@webkit.org>
2670
2671         Fix the !ENABLE(TEMPLATE_ELEMENT) build after r189945
2672         https://bugs.webkit.org/show_bug.cgi?id=149400
2673
2674         Reviewed by Darin Adler.
2675
2676         * xml/parser/XMLDocumentParserLibxml2.cpp:
2677         (WebCore::XMLDocumentParser::startElementNs):
2678
2679 2015-09-21  Chris Dumez  <cdumez@apple.com>
2680
2681         Range.cloneContents() / extractContents should throw a HierarchyRequestError when encountering a doctype
2682         https://bugs.webkit.org/show_bug.cgi?id=148770
2683         <rdar://problem/22570898>
2684
2685         Reviewed by Ryosuke Niwa.
2686
2687         Range.cloneContents() and Range.extractContents() should throw a
2688         HierarchyRequestError when encountering a doctype:
2689         - https://dom.spec.whatwg.org/#concept-range-clone (step 12)
2690         - https://dom.spec.whatwg.org/#concept-range-extract (step 12)
2691
2692         However, Range.deleteContents() should not:
2693         - https://dom.spec.whatwg.org/#dom-range-deletecontents
2694
2695         WebKit was not throwing in the Range.cloneContents() case. This
2696         aligns updates our behavior to match the specification and
2697         Firefox.
2698
2699         Tests: fast/dom/Range/clone-contents-document-type.html
2700                fast/dom/Range/delete-contents-document-type.html
2701                fast/dom/Range/extract-contents-document-type.html
2702
2703         * dom/Range.cpp:
2704         (WebCore::Range::processContentsBetweenOffsets):
2705
2706 2015-09-21  Tim Horton  <timothy_horton@apple.com>
2707
2708         UserMediaClientMock leaks every test run
2709         https://bugs.webkit.org/show_bug.cgi?id=149358
2710
2711         Reviewed by Eric Carlson.
2712
2713         * Modules/mediastream/UserMediaController.cpp:
2714         (WebCore::provideUserMediaTo):
2715         Make provideUserMediaTo operate unconditionally, just like all of the
2716         other similar functions, reverting r165733.
2717
2718         * Modules/mediastream/UserMediaController.h:
2719         * testing/Internals.cpp:
2720         (WebCore::Internals::Internals):
2721         Remove the existing UserMediaController supplement before installing a new one.
2722         This way, we're replacing it with the one Internals is trying to install,
2723         instead of leaking UserMediaClientMocks.
2724
2725 2015-09-21  Alex Christensen  <achristensen@webkit.org>
2726
2727         Generate WebCoreHeaderDetection.h with CMake on Windows
2728         https://bugs.webkit.org/show_bug.cgi?id=135861
2729
2730         Reviewed by Brent Fulgham.
2731
2732         This fixes many of the failing media tests.
2733
2734         * AVFoundationSupport.py:
2735         (lookFor):
2736         (fileContains):
2737         Use a command line parameter for the WebKitLibraries directory 
2738         to not require the WEBKIT_LIBRARIES environment variable with the CMake build.
2739         * DerivedSources.make:
2740         Pass WEBKIT_LIBRARIES as a command line parameter.
2741         * PlatformAppleWin.cmake:
2742         Added missing sources for video.
2743         * PlatformWin.cmake:
2744         Generate WebCoreHeaderDetection.h correctly and copy the media controls sources to WebKit.resources.
2745
2746 2015-09-21  ChangSeok Oh  <changseok.oh@collabora.com>
2747
2748         [GTK] media controls does not show up when playing video finishes.
2749         https://bugs.webkit.org/show_bug.cgi?id=149112
2750
2751         Reviewed by Philippe Normand.
2752
2753         GTK port does not show controls after playing video. This behavior is different
2754         from what Mac port does. They do show controls when playing video finishes.
2755         At least, we should update the timeline before showing it up not to show incorrect numbers
2756         when reappearing.
2757
2758         Test: media/media-controls-timeline-updates-after-playing.html
2759
2760         * Modules/mediacontrols/mediaControlsBase.js:
2761         (Controller.prototype.setPlaying):
2762         (Controller.prototype.showControls):
2763
2764 2015-09-21  ChangSeok Oh  <changseok.oh@collabora.com>
2765
2766         [GTK] timeline is not updated after few seconds when mouse hovers on controls
2767         https://bugs.webkit.org/show_bug.cgi?id=149111
2768
2769         Reviewed by Philippe Normand.
2770
2771         Timeline is not updated if controlsAreHidden is true. The problem here is that
2772         the function does not mean actually 'hidden' since it only checkes 'show' and 'hidden'
2773         class existences. The panel's visibility are not only controlled by the two classes,
2774         but also by video::-webkit-media-controls-panel:hover. The panel could be visible
2775         by setting the pseudo hover class. So we need to check if panel is hovered as well in controlsAreHidden().
2776
2777         Test: media/media-controls-timeline-updates-when-hovered.html
2778
2779         * Modules/mediacontrols/mediaControlsBase.js:
2780         (Controller.prototype.controlsAreHidden):
2781
2782 2015-09-21  Michael Catanzaro  <mcatanzaro@igalia.com>
2783
2784         [GTK] REGRESSION(188031): ASSERTION FAILED: menu
2785         https://bugs.webkit.org/show_bug.cgi?id=149379
2786
2787         Reviewed by Carlos Garcia Campos.
2788
2789         Remove assert that no longer makes sense.
2790
2791         * platform/gtk/ContextMenuGtk.cpp:
2792         (WebCore::ContextMenu::setPlatformDescription): Deleted.
2793
2794 2015-09-20  Chris Dumez  <cdumez@apple.com>
2795
2796         Unreviewed attempt to fix GTK build after r190030.
2797
2798         * bindings/gobject/WebKitDOMCustom.cpp:
2799         (webkit_dom_html_link_element_set_sizes):
2800
2801 2015-09-20  Chris Dumez  <cdumez@apple.com>
2802
2803         Unreviewed, another GTK build fix after r190017.
2804
2805         * bindings/scripts/CodeGeneratorGObject.pm:
2806         (IsPropertyWriteable):
2807         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2808         (webkit_dom_test_obj_class_init):
2809         (webkit_dom_test_obj_set_property): Deleted.
2810
2811 2015-09-20  Chris Dumez  <cdumez@apple.com>
2812
2813         Unreviewed attempt to fix the GTK build after r190017.
2814
2815         * bindings/scripts/CodeGeneratorGObject.pm:
2816         (SkipFunction):
2817
2818 2015-09-20  Chris Dumez  <cdumez@apple.com>
2819
2820         Pass JSC::ExecState to the custom bindings by reference
2821         https://bugs.webkit.org/show_bug.cgi?id=149393
2822
2823         Reviewed by Sam Weinig.
2824
2825         Pass JSC::ExecState to the custom bindings by reference instead of by
2826         pointer as it is expected to be non-null.
2827
2828 2015-09-20  Chris Dumez  <cdumez@apple.com>
2829
2830         Regression(r190023): fast/dom/navigation-with-sideeffects-crash.html is crashing
2831         https://bugs.webkit.org/show_bug.cgi?id=149392
2832
2833         Reviewed by Alexey Proskuryakov.
2834
2835         In the generated code for [PutForwards=xxx], make sure the forwarded
2836         implementation object is ref'd before calling toString() as toString()
2837         can be overridden by JS and cause the object to get deref'd / destroyed.
2838
2839         No new tests, already covered by existing test.
2840
2841         * bindings/scripts/CodeGeneratorJS.pm:
2842         (GenerateImplementation):
2843         * bindings/scripts/test/JS/JSTestObj.cpp:
2844         (WebCore::setJSTestObjPutForwardsAttribute):
2845         (WebCore::setJSTestObjPutForwardsNullableAttribute):
2846
2847 2015-09-19  Chris Dumez  <cdumez@apple.com>
2848
2849         Get rid of custom bindings for HTMLLinkElement.sizes setter
2850         https://bugs.webkit.org/show_bug.cgi?id=149382
2851
2852         Reviewed by Sam Weinig.
2853
2854         Get rid of custom bindings for HTMLLinkElement.sizes setter by leveraging
2855         the new [PutForwards=xxx] Web IDL extended attribute, as per the HTML
2856         specification:
2857         - https://html.spec.whatwg.org/#htmllinkelement
2858
2859         Also add FIXME comments in our IDL for various attributes that should be
2860         using [PutForwards=xxx] according to the HTML specification but are not
2861         currently. Those were not updated in this patch because it will subtly
2862         change their web-exposed behavior.
2863
2864         No new tests, no intended web-exposed behavior change. However, one side
2865         effect of the change is that the attribtue has moved to the prototype.
2866         Our bindings generator was keeping this attribute on the instance because
2867         it has a custom setter.
2868         Bindings tests coverage was extended.
2869
2870         * CMakeLists.txt:
2871         * WebCore.vcxproj/WebCore.vcxproj:
2872         * WebCore.vcxproj/WebCore.vcxproj.filters:
2873         * WebCore.xcodeproj/project.pbxproj:
2874         * bindings/js/JSBindingsAllInOne.cpp:
2875         * bindings/js/JSHTMLLinkElementCustom.cpp: Removed.
2876         Drop custom bindings for HTMLLinkElement.sizes setter.
2877
2878         * bindings/scripts/CodeGeneratorJS.pm:
2879         (GenerateImplementation):
2880         - Stop passing an extra isNull argument to getters of nullable attributes
2881           that have a wrapper type. These can return a null pointer so there is
2882           no need for an extra argument.
2883         - When [PutForwards=xxx] is used, only do the null-check on the attribute
2884           getter if the attribute is marked as nullable. If the attribute is not
2885           marked as nullable, the implementation is expected to return a C++
2886           reference, otherwise a raw pointer. This was needed because
2887           HTMLLinkElement::sizes() returns a reference as it can never return
2888           null.
2889
2890         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2891         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2892         * bindings/scripts/test/JS/JSTestObj.cpp:
2893         * bindings/scripts/test/ObjC/DOMTestObj.h:
2894         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2895         * bindings/scripts/test/TestObj.idl:
2896         Add bindings tests coverage for using [PutForwards=xxx] on a
2897         nullable attribute.
2898
2899         * dom/Document.idl:
2900         Mark Document.location as nullable as per the specification. The
2901         implementation returns a raw pointer and can return null. The
2902         bindings generator expects a raw pointer and will do a null check
2903         on it.
2904
2905         * html/HTMLAnchorElement.idl:
2906         * html/HTMLAreaElement.idl:
2907         * html/HTMLElement.idl:
2908         * html/HTMLIFrameElement.idl:
2909         * html/HTMLOutputElement.idl:
2910         * html/HTMLTableCellElement.idl:
2911         Add FIXME comments for attributes that are supposed to use
2912         [PutForwards=xxx] as per the HTML specification but currently don't.
2913
2914         * html/HTMLLinkElement.idl:
2915         Use [PutForwards=value] for the 'sizes' attribute, as per the
2916         specification and stop using a custom setter.
2917
2918 2015-09-20  Chris Dumez  <cdumez@apple.com>
2919
2920         [CallWith=ScriptState] should pass ExecState to the implementation by reference
2921         https://bugs.webkit.org/show_bug.cgi?id=149378
2922
2923         Reviewed by Sam Weinig.
2924
2925         [CallWith=ScriptState] should pass ExecState to the implementation by
2926         reference instead of pointer, as it is expected to be non-null.
2927
2928         Also rename the ExecState variables from 'exec' to 'state' in the
2929         bindings as this is the preferred naming convention.
2930
2931         * Modules/indexeddb/IDBCursor.h:
2932         * Modules/indexeddb/IDBObjectStore.h:
2933         * Modules/indexeddb/legacy/LegacyCursor.cpp:
2934         (WebCore::LegacyCursor::update):
2935         * Modules/indexeddb/legacy/LegacyCursor.h:
2936         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
2937         (WebCore::LegacyObjectStore::add):
2938         (WebCore::LegacyObjectStore::put):
2939         * Modules/indexeddb/legacy/LegacyObjectStore.h:
2940         * Modules/mediastream/CapabilityRange.cpp:
2941         (WebCore::scriptValue):
2942         (WebCore::CapabilityRange::min):
2943         (WebCore::CapabilityRange::max):
2944         * Modules/mediastream/CapabilityRange.h:
2945         * Modules/streams/ReadableStreamController.h:
2946         (WebCore::ReadableStreamController::error):
2947         (WebCore::ReadableStreamController::enqueue):
2948         * bindings/scripts/CodeGeneratorJS.pm:
2949         (GenerateEventListenerCall):
2950         (GenerateGetOwnPropertySlotBody):
2951         (GenerateHeader):
2952         (GenerateOverloadedFunction):
2953         (GetIndexedGetterExpression):
2954         (GenerateImplementation):
2955         (GenerateFunctionCastedThis):
2956         (GenerateCallWith):
2957         (GenerateArgumentsCountCheck):
2958         (GenerateParametersCheck):
2959         (GenerateReturnParameters):
2960         (GenerateCallbackHeader):
2961         (GenerateCallbackImplementation):
2962         (GenerateImplementationFunctionCall):
2963         (JSValueToNative):
2964         (NativeToJSValue):
2965         (GenerateOverloadedConstructorDefinition):
2966         (GenerateConstructorDefinition):
2967
2968 2015-09-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2969
2970         Remove XHR_TIMEOUT compilation guard
2971         https://bugs.webkit.org/show_bug.cgi?id=149260
2972
2973         Reviewed by Benjamin Poulain.
2974
2975         Covered by existing tests.
2976
2977         * Configurations/FeatureDefines.xcconfig:
2978         * xml/XMLHttpRequest.cpp:
2979         (WebCore::XMLHttpRequest::XMLHttpRequest):
2980         (WebCore::XMLHttpRequest::didFail):
2981         (WebCore::XMLHttpRequest::didReachTimeout):
2982         (WebCore::XMLHttpRequest::setTimeout):
2983         (WebCore::XMLHttpRequest::setResponseType):
2984         (WebCore::XMLHttpRequest::open):
2985         (WebCore::XMLHttpRequest::createRequest):
2986         (WebCore::XMLHttpRequest::internalAbort):
2987         (WebCore::XMLHttpRequest::didFailRedirectCheck):
2988         (WebCore::XMLHttpRequest::didSendData):
2989         (WebCore::XMLHttpRequest::suspend):
2990         * xml/XMLHttpRequest.h:
2991         * xml/XMLHttpRequest.idl:
2992
2993 2015-09-20  Tim Horton  <timothy_horton@apple.com>
2994
2995         Add two missing files to the Xcode project
2996
2997         * WebCore.xcodeproj/project.pbxproj:
2998         These are imported by files that are built for Mac, but missing from the project.
2999
3000 2015-09-19  Chris Dumez  <cdumez@apple.com>
3001
3002         [Web IDL] Add support for [PutForwards=XXX] IDL extended attribute
3003         https://bugs.webkit.org/show_bug.cgi?id=149376
3004
3005         Reviewed by Darin Adler.
3006
3007         [Web IDL] Add support for [PutForwards=XXX] IDL extended attribute:
3008         https://heycam.github.io/webidl/#PutForwards
3009
3010         As an initial proof of concept, use it for Document.location as per the
3011         HTML specification, instead of using custom bindings:
3012         https://html.spec.whatwg.org/multipage/dom.html#the-document-object
3013
3014         More attributes can be ported later.
3015
3016         No new tests, no web-exposed behavior change intended. Bindings tests
3017         coverage was added.
3018
3019         * bindings/js/JSDocumentCustom.cpp:
3020         Drop custom bindings for the location attribute setter.
3021
3022         * bindings/scripts/CodeGenerator.pm:
3023         (GetAttributeFromInterface):
3024         Add convenience function that returned an attribute from another
3025         interface. This is used by [PutForwards] to retrieve the forwarded
3026         attribute.
3027
3028         * bindings/scripts/CodeGeneratorJS.pm:
3029         (IsReadonly):
3030         (GenerateImplementation):
3031         * bindings/scripts/IDLAttributes.txt:
3032         Add support for [PutForwards=XXX] IDL extended attribute.
3033
3034         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
3035         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
3036         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3037         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3038         * bindings/scripts/test/JS/JSTestNode.cpp:
3039         * bindings/scripts/test/JS/JSTestObj.cpp:
3040         * bindings/scripts/test/ObjC/DOMTestNode.h:
3041         * bindings/scripts/test/ObjC/DOMTestNode.mm:
3042         * bindings/scripts/test/ObjC/DOMTestObj.h:
3043         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3044         Add binding tests coverage for [PutForwards=XXX] IDL extended
3045         attribute.
3046
3047         * dom/Document.idl:
3048         Use [PutForwards=href] for Document.location attribute, as per the HTML
3049         specification and stop using custom bindings for the setter. Also mark
3050         the attribute as readonly as all attributes using [PutForwards] must be
3051         marked as readonly as per the Web IDL specification.
3052
3053 2015-09-19  Chris Dumez  <cdumez@apple.com>
3054
3055         [WebIDL] Specify default parameter values where it is useful
3056         https://bugs.webkit.org/show_bug.cgi?id=149331
3057         <rdar://problem/22545600>
3058
3059         Reviewed by Darin Adler.
3060
3061         Specify default parameter values where it is useful in our IDL, that is
3062         to say where undefined would be converted to something else than the
3063         default value otherwise. This patch focuses on the HTML API.
3064
3065         This patch also adds support for default values for optional parameters
3066         of string enumeration type as this was needed by the
3067         CanvasRenderingContext2D API.
3068
3069         Test: fast/html/undefined-parameter-default-value.html
3070
3071         * bindings/scripts/CodeGeneratorJS.pm:
3072         (GenerateParametersCheck):
3073         Add support default values for optional parameters of string enumeration
3074         type as this was needed by the CanvasRenderingContext2D API.
3075
3076         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3077         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3078         * bindings/scripts/test/JS/JSTestObj.cpp:
3079         * bindings/scripts/test/ObjC/DOMTestObj.h:
3080         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3081         * bindings/scripts/test/TestObj.idl:
3082         Add bindings tests coverage for optional parameters of string enumeration
3083         type and that have a default value.
3084
3085         * html/HTMLInputElement.idl:
3086         Specify default parameter value for stepUp() / stepDown(). Without this,
3087         stepUp(undefined) would be equivalent to calling stepUp(0) even though
3088         it is supposed to be equivalent to calling stepUp(1).
3089
3090         * html/HTMLTableElement.idl:
3091         * html/HTMLTableSectionElement.idl:
3092         Specify default parameter value for insertRow(). Without this,
3093         insertRow(undefined) would be equivalent to insertRow(0) instead of
3094         insertRow(-1). This would prepend the row instead of appending it:
3095         - https://html.spec.whatwg.org/#htmltableelement
3096         - https://html.spec.whatwg.org/#htmltablesectionelement
3097
3098         * html/HTMLTableRowElement.idl:
3099         Specify default parameter value for insertCell(). Without this,
3100         insertCell(undefined) would be equivalent to insertCell(0) instead of
3101         insertCell(-1). This would prepend the cell instead of appending it:
3102         - https://html.spec.whatwg.org/#htmltablerowelement
3103
3104         * html/canvas/CanvasRenderingContext2D.idl:
3105         Specify default value for CanvasWindingRule parameters so that calling
3106         this with undefined will use the default enum value instead of using the
3107         "undefined" string and then throwing because it is not a valid enum value:
3108         - https://html.spec.whatwg.org/#canvasrenderingcontext2d
3109
3110 2015-09-19  Eric Carlson  <eric.carlson@apple.com>
3111
3112         Cleanup code that finds and loads a media engine
3113         https://bugs.webkit.org/show_bug.cgi?id=149371
3114
3115         Reviewed by Darin Adler.
3116
3117         No new tests, no functional change.
3118
3119         * Modules/mediastream/MediaStream.cpp:
3120         (WebCore::MediaStream::setRegistry): New, set the registry.
3121         (WebCore::MediaStream::lookup): New, lookup a url in the registry.
3122         * Modules/mediastream/MediaStream.h:
3123
3124         * html/HTMLMediaElement.cpp:
3125         (WebCore::HTMLMediaElement::loadResource): Restructure and simplify the code that tries the 
3126           different types of media engine so the code is easier to understand and modify.
3127         (WebCore::HTMLMediaElement::createMediaPlayer): Clear m_mediaStreamSrcObject.
3128
3129         * platform/graphics/MediaPlayer.cpp:
3130         (WebCore::buildMediaEnginesVector): Add some whitespace to make it easier to read.
3131         (WebCore::bestMediaEngineForSupportParameters): Also process mediastream and mediasource urls.
3132         (WebCore::MediaPlayer::load): ASSERT if called when the reload timer is active.
3133         (WebCore::MediaPlayer::loadWithNextMediaEngine): Also process mediastream and mediasource urls.
3134
3135         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3136         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Don't test empty/null urls.
3137
3138         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3139         (WebCore::MockMediaPlayerMediaSource::supportsType): Ditto.
3140
3141 2015-09-19  Chris Dumez  <cdumez@apple.com>
3142
3143         Get rid of most custom bindings for Location.idl
3144         https://bugs.webkit.org/show_bug.cgi?id=149370
3145
3146         Reviewed by Darin Adler.
3147
3148         Get rid of most custom bindings for Location.idl by extending support
3149         for the [CallWith=XXX] IDL extended attribute to support 2 additional
3150         values: ActiveWindow and FirstWindow. Also introduce a
3151         [SetterCallWith=XXX] alternative that passes the extra arguments to
3152         the attribute setter only, as is needed by the Location attributes.
3153
3154         No new tests, no intended web-exposed behavior change.
3155
3156         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3157         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3158         * bindings/scripts/test/JS/JSTestObj.cpp:
3159         * bindings/scripts/test/ObjC/DOMTestObj.h:
3160         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3161         * bindings/scripts/test/TestObj.idl:
3162         Add bindings tests coverage for [SetterCallWith=XXX].
3163
3164         * page/Location.idl:
3165         Also drop [DoNotCheckSecurityOnSetter] on href attribute. It has
3166         no effet as the interface does not have [CheckSecurity].
3167
3168 2015-09-19  Chris Dumez  <cdumez@apple.com>
3169
3170         Get rid of custom bindings for Document.location getter
3171         https://bugs.webkit.org/show_bug.cgi?id=149369
3172
3173         Reviewed by Andreas Kling.
3174
3175         Get rid of custom bindings for Document.location getter by defining
3176         a location getter on Document that calls the one on the document's
3177         DOMWindow. The DOMWindow location getter already has an
3178         isCurrentlyDisplayedInFrame() check so the document does not need
3179         to do a null check on the frame.
3180
3181         No new tests, no web-exposed behavior change intended.
3182
3183         * bindings/js/JSDocumentCustom.cpp:
3184         (WebCore::JSDocument::location): Deleted.
3185         * dom/Document.cpp:
3186         (WebCore::Document::location):
3187         * dom/Document.h:
3188         * dom/Document.idl:
3189         * page/DOMWindow.cpp:
3190         (WebCore::DOMWindow::location):
3191
3192 2015-09-18  Dean Jackson  <dino@apple.com>
3193
3194         Null dereference loading Blink layout test svg/filters/feImage-failed-load-crash.html
3195         https://bugs.webkit.org/show_bug.cgi?id=149316
3196         <rdar://problem/22749532>
3197
3198         Reviewed by Tim Horton.
3199
3200         If an feImage triggered loading a resource, and then was removed from the document,
3201         we'd still try to notify its parent when the resource arrived (or failed).
3202
3203         Merge Blink commit:
3204         https://chromium.googlesource.com/chromium/blink/+/9cbcfd7866bbaff0c4b3c4c8508b7c97b46d6e6a
3205
3206         Test: svg/filters/feImage-failed-load-crash.html
3207
3208         * svg/SVGFEImageElement.cpp:
3209         (WebCore::SVGFEImageElement::notifyFinished): Add a null check to the parent element
3210         before sending the notification.
3211
3212 2015-09-18  Dean Jackson  <dino@apple.com>
3213
3214         Null dereference loading Blink layout test svg/custom/use-href-attr-removal-crash.html
3215         https://bugs.webkit.org/show_bug.cgi?id=149315
3216         <rdar://problem/22749358>
3217
3218         Reviewed by Tim Horton.
3219
3220         We were not checking if the corresponding element referenced from
3221         the SVG <use> actually existed before trying to set attributes on it.
3222         The original Blink change is a little more detailed:
3223         https://chromium.googlesource.com/chromium/blink/+/e2f1087f32bb088160ab7d59a715a1403ef267c7
3224         However, we've significantly diverged at this point.
3225
3226         Tests: svg/custom/use-href-attr-removal-crash.html
3227                svg/custom/use-href-attr-removal-crash2.svg
3228                svg/custom/use-href-change-local-to-invalid-remote.html
3229
3230         * svg/SVGUseElement.cpp:
3231         (WebCore::SVGUseElement::transferSizeAttributesToTargetClone):
3232
3233 2015-09-18  Commit Queue  <commit-queue@webkit.org>
3234
3235         Unreviewed, rolling out r189908.
3236         https://bugs.webkit.org/show_bug.cgi?id=149368
3237
3238         Broke run-webkit-tests --pixel (Requested by ap on #webkit).
3239
3240         Reverted changeset:
3241
3242         "printing does not use minimum page zoom factor"
3243         https://bugs.webkit.org/show_bug.cgi?id=108507
3244         http://trac.webkit.org/changeset/189908
3245
3246 2015-09-18  Ryosuke Niwa  <rniwa@webkit.org>
3247
3248         Inserting or removing slot elements can cause a crash
3249         https://bugs.webkit.org/show_bug.cgi?id=149365
3250
3251         Reviewed by Antti Koivisto.
3252
3253         HTMLSlotElement::insertedInto and removedFrom were doing completely non-sensical.
3254
3255         Since insertedInto and removedFrom are called on an element whenever it or its ancestor is inserted into
3256         or removed from a container node, we can't always call addSlotElementByName removeSlotElementByName when
3257         those functions are called. Instead, we need to check whether this slot has been inserted into or removed
3258         from a container node that resides inside a shadow root.
3259
3260         Also reverted r189906 since the change was made upon a bogus assumption I had made.
3261
3262         Test: fast/shadow-dom/slot-removal-crash.html
3263
3264         * dom/Element.cpp:
3265         (WebCore::Element::insertedInto): Added comments.
3266         (WebCore::Element::removedFrom): Ditto.
3267         (WebCore::Element::addShadowRoot): Reverted r189906.
3268         (WebCore::Element::removeShadowRoot): Ditto.
3269
3270         * html/HTMLSlotElement.cpp:
3271         (WebCore::HTMLSlotElement::insertedInto): When the insertion point's tree scope is different from ours,
3272         the insertion happened to our shadow host or its ancestor. There is nothing to be done in that case since
3273         the shadow tree was not modified (in particular, our relationship with our shadow root never changed).
3274         We also don't do anything if we got inserted into a parent which is not inside a shadow tree.
3275
3276         (WebCore::HTMLSlotElement::removedFrom): Since Container::removeBetween sets the tree scope before this
3277         function is getting called, we can't compare this element's treeScope with that of the "insertion" point.
3278         They're always different regardless of whether the insertion point was in the same shadow tree to which
3279         we belong or its shadow host's. However, since a node removed from a shadow tree is put into document's
3280         tree scope before this function is called and InShadowTree flag is unset in Node::removedFrom at the end
3281         of this function, this slot element is definitely being removed from its shadow root when isInShadowTree()
3282         is true and the newly set tree scope is of the document. So call removeSlotElementByName if and only if
3283         that condition holds.
3284
3285         (WebCore::HTMLSlotElement::getDistributedNodes): Explicitly check that we're inside a shadow root.
3286
3287 2015-09-18  Ryosuke Niwa  <rniwa@webkit.org>
3288
3289         REGRESSION(r150187): updateIdForTreeScope may not be called inside shadow trees
3290         https://bugs.webkit.org/show_bug.cgi?id=149364
3291
3292         Reviewed by Antti Koivisto.
3293
3294         Since the tree scope is set to that of Document's inside removeBetween when a node is removed from a shadow tree,
3295         oldScope != &treeScope() was already true inside Element::removedFrom. This can introduce an inconsistency in
3296         DocumentOrderedMap which could result in a crash. Fixed the bug by checking it against document(), which is the
3297         behavior we had prior to r150187.
3298
3299         Also added a consistency check in DocumentOrderedMap to catch bugs like this.
3300
3301         No new tests. New assertions fail in existing tests without this fix.
3302
3303         * dom/DocumentOrderedMap.cpp:
3304         (WebCore::DocumentOrderedMap::add):
3305         (WebCore::DocumentOrderedMap::remove):
3306         (WebCore::DocumentOrderedMap::get):
3307         * dom/DocumentOrderedMap.h:
3308         * dom/Element.cpp:
3309         (WebCore::Element::removedFrom):
3310
3311 2015-09-18  Antti Koivisto  <antti@apple.com>
3312
3313         Don't create renderers for children of shadow host
3314         https://bugs.webkit.org/show_bug.cgi?id=149363
3315
3316         Reviewed by Ryosuke Niwa.
3317
3318         Test: fast/shadow-dom/css-scoping-shadow-root-hides-children.html
3319
3320         * dom/ShadowRoot.h:
3321         * style/StyleResolveTree.cpp:
3322         (WebCore::Style::attachRenderTree):
3323         (WebCore::Style::resolveShadowTree):
3324         (WebCore::Style::resolveChildren):
3325         (WebCore::Style::resolveTree):
3326
3327 2015-09-08  Darin Adler  <darin@apple.com>
3328
3329         Refine and simplify some color-related code
3330         https://bugs.webkit.org/show_bug.cgi?id=148961
3331
3332         Reviewed by Anders Carlsson.
3333
3334         Refactoring code that seems to be covered by existing tests.
3335
3336         * css/CSSParser.cpp:
3337         (WebCore::CSSParser::parseColor): Handle the empty string efficiently so that
3338         callers don't need to do that.
3339
3340         * platform/graphics/Color.h: Started adding comments about deprecation.
3341         Added RGBA class for future use whenever we need an RGBA quadruplet rather than
3342         a color with a color space. Added FIXME about future evoluation of the classes here.
3343         Added OptionalColor so we can start removing the "invalid color" feature from Color.
3344         Added roundAndClampColorChannel function.
3345
3346         * svg/ColorDistance.cpp: Removed.
3347         * svg/ColorDistance.h: Removed.
3348
3349         * CMakeLists.txt: Removed ColorDistance.
3350         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3351         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3352         * WebCore.xcodeproj/project.pbxproj: Ditto.
3353         * svg/SVGAllInOne.cpp: Ditto.
3354
3355         * svg/SVGAnimatedColor.cpp:
3356         (WebCore::SVGAnimatedColorAnimator::SVGAnimatedColorAnimator): Changed to take
3357         a reference instead of a pointer.
3358         (WebCore::SVGAnimatedColorAnimator::constructFromString): Simplified since the
3359         SVGColor::colorFromRGBColorString will handle the empty string.
3360         (WebCore::SVGAnimatedColorAnimator::addAnimatedTypes): Moved the code to add the
3361         RGB channels of two colors here from ColorDistance::addColors since this is the
3362         only place it was used.
3363         (WebCore::currentColor): Refactored adjustForCurrentColor function into this.
3364         Helper for the code below.
3365         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue): Refactored to use
3366         the new currentColor function and replaced the use of the ColorDistance::clampColor
3367         function here with a bit of code here in the one place it was used.
3368         (WebCore::SVGAnimatedColorAnimator::calculateDistance): Moved the distance algorithm
3369         here from ColorDistance::distance.
3370
3371         * svg/SVGAnimatedColor.h: Removed unneeded forward declaration, changed constructor
3372         to take references instead of pointers, and made all class member functions private.
3373
3374         * svg/SVGAnimatedType.cpp:
3375         (WebCore::SVGAnimatedType::setValueAsString): Removed special case for empty string,
3376         since SVGColor::colorFromRGBColorString does the same thing.
3377
3378         * svg/SVGAnimatorFactory.h:
3379         (WebCore::SVGAnimatorFactory::create): Pass references rather tha pointers to the
3380         SVGAnimatedColorAnimator constructor.
3381
3382         * svg/SVGColor.cpp:
3383         (WebCore::SVGColor::colorFromRGBColorString): Added more FIXMEs about the future of
3384         this function.
3385         (WebCore::SVGColor::setRGBColor): Fixed confusing verb tense.
3386         (WebCore::SVGColor::customCSSText): Use ASCII literal for an ASCII literal.
3387
3388 2015-09-18  Eric Carlson  <eric.carlson@apple.com>
3389
3390         UserMediaClientMock leaks every test run
3391         https://bugs.webkit.org/show_bug.cgi?id=149358
3392
3393         Reviewed by Tim Horton.
3394
3395         * platform/mock/UserMediaClientMock.h: Implement pageDestroyed.
3396
3397 2015-09-18  Alex Christensen  <achristensen@webkit.org>
3398
3399         190,000!
3400
3401 2015-09-18  Nan Wang  <n_wang@apple.com>
3402
3403         AX: Implement ARIA 1.1 @aria-current on iOS
3404         https://bugs.webkit.org/show_bug.cgi?id=149297
3405
3406         Reviewed by Chris Fleizach.
3407
3408         Added support for iOS to query for aria-current status.
3409         Also, enabled aria-current.html test on iOS.
3410
3411         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3412         (-[WebAccessibilityObjectWrapper accessibilityInvalidStatus]):
3413         (-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]):
3414         (-[WebAccessibilityObjectWrapper accessibilityMathRootIndexObject]):
3415
3416 2015-09-18  Alex Christensen  <achristensen@webkit.org>
3417
3418         Fix Windows tests after switch to CMake.
3419
3420         * testing/js/WebCoreTestSupportPrefix.h:
3421         Include cmakeconfig.h before wtf/Platform.h like we do in all the other precompiled headers
3422         to have consistent features defined.
3423
3424 2015-09-18  Alexey Proskuryakov  <ap@apple.com>
3425
3426         REGRESSION (r189526): Nightlies don't work on Mavericks
3427         https://bugs.webkit.org/show_bug.cgi?id=149215
3428