Implement support for the autocomplete attribute
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-10-30  Jon Honeycutt  <jhoneycutt@apple.com>
2
3         Implement support for the autocomplete attribute
4         https://bugs.webkit.org/show_bug.cgi?id=150731
5         rdar://problem/21078968
6
7         The autocomplete attribute is defined by
8         https://html.spec.whatwg.org/multipage/forms.html#autofill.
9
10         Reviewed by Brent Fulgham.
11
12         Test: fast/forms/autocomplete-tokens.html
13
14         * html/HTMLFormControlElement.cpp:
15         (WebCore::isContactToken):
16         Return true if this is a contact token.
17         (WebCore::categoryForAutofillFieldToken):
18         Adds all of the autofill field tokens to a map, and returns the
19         category for a given token.
20         (WebCore::maxTokensForAutofillFieldCategory):
21         Return the maximum number of tokens an autofill category supports.
22         (WebCore::HTMLFormControlElement::parseAutocompleteAttribute):
23         Implement the processing model defined in
24         https://html.spec.whatwg.org/multipage/forms.html#processing-model-3
25         with respect to the IDL-exposed autofill value.
26         (WebCore::HTMLFormControlElement::setAutocomplete):
27         Set the autocomplete attribute to the given string.
28
29         * html/HTMLFormControlElement.h:
30         Declare setAutocomplete() and autocomplete().
31
32         * html/HTMLInputElement.idl:
33         Remove the Reflect attribute. We now have custom processing for getting
34         this attribute.
35
36         * html/HTMLSelectElement.idl:
37         Declare the autocomplete attribute.
38
39         * html/HTMLTextAreaElement.idl:
40         Ditto.
41
42 2015-11-03  Brady Eidson  <beidson@apple.com>
43
44         Modern IDB: Land empty IDBCursor/Index IDL implementations.
45         https://bugs.webkit.org/show_bug.cgi?id=150839
46
47         Reviewed by Alex Christensen.
48
49         No new tests (No change in behavior).
50
51         * CMakeLists.txt:
52         * WebCore.xcodeproj/project.pbxproj:
53
54         * Modules/indexeddb/IDBIndex.h:
55         
56         * Modules/indexeddb/client/IDBCursorImpl.cpp: Added.
57         (WebCore::IDBClient::IDBCursor::~IDBCursor):
58         (WebCore::IDBClient::IDBCursor::direction):
59         (WebCore::IDBClient::IDBCursor::key):
60         (WebCore::IDBClient::IDBCursor::primaryKey):
61         (WebCore::IDBClient::IDBCursor::value):
62         (WebCore::IDBClient::IDBCursor::source):
63         (WebCore::IDBClient::IDBCursor::update):
64         (WebCore::IDBClient::IDBCursor::advance):
65         (WebCore::IDBClient::IDBCursor::continueFunction):
66         (WebCore::IDBClient::IDBCursor::deleteFunction):
67         * Modules/indexeddb/client/IDBCursorImpl.h: Added.
68         
69         * Modules/indexeddb/client/IDBCursorWithValueImpl.cpp: Added.
70         * Modules/indexeddb/client/IDBCursorWithValueImpl.h: Added.
71         
72         * Modules/indexeddb/client/IDBIndexImpl.cpp: Added.
73         (WebCore::IDBClient::IDBIndex::~IDBIndex):
74         (WebCore::IDBClient::IDBIndex::name):
75         (WebCore::IDBClient::IDBIndex::objectStore):
76         (WebCore::IDBClient::IDBIndex::keyPathAny):
77         (WebCore::IDBClient::IDBIndex::keyPath):
78         (WebCore::IDBClient::IDBIndex::unique):
79         (WebCore::IDBClient::IDBIndex::multiEntry):
80         (WebCore::IDBClient::IDBIndex::openCursor):
81         (WebCore::IDBClient::IDBIndex::count):
82         (WebCore::IDBClient::IDBIndex::openKeyCursor):
83         (WebCore::IDBClient::IDBIndex::get):
84         (WebCore::IDBClient::IDBIndex::getKey):
85         * Modules/indexeddb/client/IDBIndexImpl.h: Copied from Source/WebCore/Modules/indexeddb/IDBIndex.h.
86         
87         * Modules/indexeddb/legacy/LegacyIndex.h:
88         (WebCore::LegacyIndex::id):
89         
90         * Modules/indexeddb/shared/IDBIndexInfo.cpp: Added.
91         * Modules/indexeddb/shared/IDBIndexInfo.h: Added.
92         (WebCore::IDBIndexInfo::name):
93         (WebCore::IDBIndexInfo::keyPath):
94         (WebCore::IDBIndexInfo::unique):
95         (WebCore::IDBIndexInfo::multiEntry):
96
97 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
98
99         Addressing post-review comments on r191934.
100
101         Unreviewed.
102
103         * platform/graphics/mac/FontCustomPlatformData.cpp:
104         (WebCore::FontCustomPlatformData::supportsFormat):
105
106 2015-11-03  Joseph Pecoraro  <pecoraro@apple.com>
107
108         Web Inspector: Move ScriptDebugServer::Task to WorkerScriptDebugServer where it is actually used
109         https://bugs.webkit.org/show_bug.cgi?id=150847
110
111         Reviewed by Timothy Hatcher.
112
113         * bindings/js/WorkerScriptDebugServer.cpp:
114         (WebCore::WorkerScriptDebugServer::interruptAndRunTask):
115         * bindings/js/WorkerScriptDebugServer.h:
116         * inspector/WorkerDebuggerAgent.cpp:
117
118 2015-11-03  Tim Horton  <timothy_horton@apple.com>
119
120         Fix the build.
121
122         * platform/Widget.h:
123         (WebCore::Widget::boundsRect):
124         (WebCore::Widget::resize):
125
126 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
127
128         font-variant-* properties in @font-face declarations should be honored
129         https://bugs.webkit.org/show_bug.cgi?id=149771
130
131         Reviewed by Simon Fraser.
132
133         According to the CSS Fonts Level 3 spec, web authors are allowed to put
134         font-feature-settings / font-variant-* inside @font-face blocks. These
135         properties are supposed to be applied at a specific time during the
136         font selection algorithm.
137
138         This patch gives a FontFeatureSettings object and a FontVariantSettings
139         object to CSSFontFace, and moves common parsing logic from
140         StyleBuilderCustom to a shared location. Then, once the two properties
141         are parsed from the @font-face block, the relevant data structures are
142         passed down into the font selection algorithm. This algorithm then
143         consults with these values at the correct time (inside
144         preparePlatformFont()).
145
146         Tests: css3/font-feature-settings-font-face-rendering.html
147                css3/font-variant-font-face-all.html
148                css3/font-variant-font-face-override.html
149
150         * WebCore.xcodeproj/project.pbxproj: Add a header for the common
151         location of parsing font-variant-ligatures, font-variant-numeric,
152         and font-variant-east-asian.
153         * css/CSSFontFace.cpp:
154         (WebCore::CSSFontFace::font): Pass the relevant data structures
155         into the font selection algorithm.
156         * css/CSSFontFace.h: Add FontFeatureSettings and FontVariantSettings
157         member variables.
158         (WebCore::CSSFontFace::insertFeature):
159         (WebCore::CSSFontFace::setVariantCommonLigatures):
160         (WebCore::CSSFontFace::setVariantDiscretionaryLigatures):
161         (WebCore::CSSFontFace::setVariantHistoricalLigatures):
162         (WebCore::CSSFontFace::setVariantContextualAlternates):
163         (WebCore::CSSFontFace::setVariantPosition):
164         (WebCore::CSSFontFace::setVariantCaps):
165         (WebCore::CSSFontFace::setVariantNumericFigure):
166         (WebCore::CSSFontFace::setVariantNumericSpacing):
167         (WebCore::CSSFontFace::setVariantNumericFraction):
168         (WebCore::CSSFontFace::setVariantNumericOrdinal):
169         (WebCore::CSSFontFace::setVariantNumericSlashedZero):
170         (WebCore::CSSFontFace::setVariantAlternates):
171         (WebCore::CSSFontFace::setVariantEastAsianVariant):
172         (WebCore::CSSFontFace::setVariantEastAsianWidth):
173         (WebCore::CSSFontFace::setVariantEastAsianRuby):
174         * css/CSSFontFaceSource.cpp:
175         (WebCore::CSSFontFaceSource::font): Pass the relevant data
176         structures into the font selection algorithm.
177         * css/CSSFontFaceSource.h: Ditto.
178         * css/CSSFontSelector.cpp:
179         (WebCore::CSSFontSelector::addFontFaceRule): Call the shared
180         parsing logic to populate the FontFeatureSettings and
181         FontVariantSettings members.
182         * css/FontVariantBuilder.h: Added. Destination for shared parsing
183         logic.
184         (WebCore::applyValueFontVariantLigatures):
185         (WebCore::applyValueFontVariantNumeric):
186         (WebCore::applyValueFontVariantEastAsian):
187         * css/StyleBuilderCustom.h: Source for shared parsing logic.
188         (WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
189         (WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
190         (WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
191         * loader/cache/CachedFont.cpp: Pass the relevant data structures
192         into the font selection algorithm.
193         (WebCore::CachedFont::createFont):
194         (WebCore::CachedFont::platformDataFromCustomData):
195         * loader/cache/CachedFont.h: Ditto.
196         * loader/cache/CachedSVGFont.cpp: Ditto.
197         (WebCore::CachedSVGFont::createFont):
198         (WebCore::CachedSVGFont::platformDataFromCustomData):
199         * loader/cache/CachedSVGFont.h: Ditto.
200         * platform/graphics/FontCache.h: Ditto.
201         * platform/graphics/FontCascade.cpp:
202         (WebCore::FontCascade::codePath): Adjust comment.
203         * platform/graphics/cocoa/FontCacheCoreText.cpp:
204         (WebCore::preparePlatformFont): Consult with the newly parsed values.
205         (WebCore::fontWithFamily): Pass the relevant data structures into the
206         font selection algorithm.
207         (WebCore::FontCache::systemFallbackForCharacters): Ditto.
208         * platform/graphics/mac/FontCustomPlatformData.cpp:
209         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
210         * platform/graphics/mac/FontCustomPlatformData.h: Ditto.
211
212 2015-11-03  Joseph Pecoraro  <pecoraro@apple.com>
213
214         Web Inspector: Handle or Remove ParseHTML Timeline Event Records
215         https://bugs.webkit.org/show_bug.cgi?id=150689
216
217         Reviewed by Timothy Hatcher.
218
219         Remove ParseHTML nesting recordings. We were not using them
220         and for most pages their self-time is very small in comparison
221         to other events. We may consider adding it back later for
222         UI purposes but for now the frontend doesn't use the records
223         so lets remove it.
224
225         * html/parser/HTMLDocumentParser.cpp:
226         (WebCore::HTMLDocumentParser::pumpTokenizer): Deleted.
227         * inspector/InspectorInstrumentation.cpp:
228         (WebCore::InspectorInstrumentation::willWriteHTMLImpl): Deleted.
229         (WebCore::InspectorInstrumentation::didWriteHTMLImpl): Deleted.
230         * inspector/InspectorInstrumentation.h:
231         (WebCore::InspectorInstrumentation::willWriteHTML): Deleted.
232         (WebCore::InspectorInstrumentation::didWriteHTML): Deleted.
233         * inspector/InspectorTimelineAgent.cpp:
234         (WebCore::InspectorTimelineAgent::willWriteHTML): Deleted.
235         (WebCore::InspectorTimelineAgent::didWriteHTML): Deleted.
236         (WebCore::toProtocol): Deleted.
237         * inspector/InspectorTimelineAgent.h:
238         * inspector/TimelineRecordFactory.cpp:
239         (WebCore::TimelineRecordFactory::createParseHTMLData): Deleted.
240         * inspector/TimelineRecordFactory.h:
241
242 2015-11-03  Keith Rollin  <krollin@apple.com>
243
244         HTMLOptionElement.text should never return the value of label
245         https://bugs.webkit.org/show_bug.cgi?id=148862
246         rdar://problem/22589226
247
248         Reviewed by Darin Adler.
249
250         According to the HTML spec, `option` elements should have the
251         following behavior:
252
253             - the `text` property should return text contents of element
254             - the `label` property should return value of label attribute if
255               it exists, else return text property
256             - the UI should display label property
257
258         12 years ago, in order to be compatibile with browsers of the time, we
259         diverged from this behavior: the text property behaved like the label
260         property, and the text property was used for display. This resulted in
261         our UI incidentally conforming to the spec, but also in the text
262         property *not* conforming to the spec. See <rdar://problem/3532519>
263         for discussion on this change.
264
265         The behavior of the browsers we were conforming to has changed. In
266         particular, the text property in Firefox now conforms to the spec
267         instead of behaving as we did. Therefore, it's less important to
268         retain our old behavior for the sake of compatibility. This check-in
269         brings us into conformance with the spec. The result is that the UI
270         stays the same, but the text property will return different values than
271         it used to if the option element has a label attribute that used to
272         hide it.
273
274         Updated tests:
275         - fast/dom/HTMLOptionElement/option-text.html:
276         - fast/forms/HTMLOptionElement_label01.html:
277         - fast/forms/HTMLOptionElement_label02.html:
278         - fast/forms/HTMLOptionElement_label03.html:
279         - fast/forms/HTMLOptionElement_label04.html:
280         - fast/forms/HTMLOptionElement_label05.html:
281         - fast/forms/HTMLOptionElement_label06.html:
282         - fast/forms/HTMLOptionElement_label07.html:
283         - fast/forms/option-value-and-label.html:
284
285         * accessibility/AccessibilityListBoxOption.cpp:
286         (WebCore::AccessibilityListBoxOption::stringValue):
287         * accessibility/AccessibilityMenuListOption.cpp:
288         (WebCore::AccessibilityMenuListOption::stringValue):
289         * html/HTMLOptionElement.cpp:
290         (WebCore::HTMLOptionElement::text):
291         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
292
293 2015-11-03  Andreas Kling  <akling@apple.com>
294
295         ResourceUsageOverlay should draw itself using WebCore::GraphicsContext.
296         <https://webkit.org/b/150841>
297
298         Reviewed by Antti Koivisto.
299
300         Use WebCore text drawing primitives instead of poking at the CGContext directly.
301         And stop using deprecated CoreGraphics APIs, too.
302
303         * page/cocoa/ResourceUsageOverlayCocoa.mm:
304         (WebCore::drawCpuHistory):
305         (WebCore::drawGCHistory):
306
307             Adjust for unflipped Y axis.
308
309         (WebCore::fontCascade):
310         (WebCore::showText):
311
312             Draw using WebCore text drawing primitives.
313
314         (WebCore::ResourceUsageOverlay::draw):
315
316             Remove CGContext calls and stop flipping the Y axis.
317
318 2015-11-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
319
320         [Streams API] Vended promise capabilities should not need @resolve/@reject fields
321         https://bugs.webkit.org/show_bug.cgi?id=150835
322
323         Reviewed by Darin Adler.
324
325         No change in behavior, covered by existing tests.
326
327         * Modules/streams/ReadableStreamInternals.js:
328         (privateInitializeReadableStreamReader): Removed @resolve/@reject fields from resolved/rejected @closedPromiseCapability.
329         * Modules/streams/WritableStream.js:
330         (initializeWritableStream): Removed @resolve/@reject fields from resolved readyPromiseCapability.
331         * Modules/streams/WritableStreamInternals.js:
332         (syncWritableStreamStateWithQueue): Updated code to be closer to spec and removing the need to resolve an already resolved promise.
333
334 2015-11-03  Hunseop Jeong  <hs85.jeong@samsung.com>
335
336         Replace 0 and NULL with nullptr in WebCore/dom.
337         https://bugs.webkit.org/show_bug.cgi?id=150788
338
339         Reviewed by Darin Adler.
340
341         No new tests because there is no behavior change.
342
343         * dom/Attr.cpp:
344         (WebCore::Attr::Attr):
345         (WebCore::Attr::detachFromElementWithValue):
346         (WebCore::Attr::attachToElement):
347         * dom/Attr.h:
348         * dom/CheckedRadioButtons.cpp:
349         (WebCore::RadioButtonGroup::updateCheckedState):
350         (WebCore::CheckedRadioButtons::checkedButtonForGroup):
351         (WebCore::CheckedRadioButtons::isInRequiredGroup):
352         * dom/ChildListMutationScope.cpp:
353         (WebCore::ChildListMutationAccumulator::enqueueMutationRecord):
354         * dom/ContainerNode.cpp:
355         (WebCore::ContainerNode::removeBetween):
356         * dom/ContainerNode.h:
357         (WebCore::ContainerNode::ContainerNode):
358         * dom/ContainerNodeAlgorithms.cpp:
359         (WebCore::notifyNodeRemovedFromDocument):
360         * dom/Document.h:
361         (WebCore::Document::wellFormed):
362         (WebCore::Document::scriptRunner):
363         (WebCore::Document::moduleLoader):
364         (WebCore::Document::currentScript):
365         (WebCore::Document::webkitFullscreenElement):
366         * dom/DocumentOrderedMap.h:
367         (WebCore::DocumentOrderedMap::MapEntry::MapEntry):
368         * dom/DocumentParser.cpp:
369         (WebCore::DocumentParser::detach):
370         (WebCore::DocumentParser::suspendScheduledTasks):
371         * dom/Element.cpp:
372         (WebCore::Element::setAttributeInternal):
373         (WebCore::Element::shadowRoot):
374         (WebCore::Element::blur):
375         (WebCore::Element::beforePseudoElement):
376         (WebCore::Element::afterPseudoElement):
377         (WebCore::Element::setBeforePseudoElement):
378         * dom/Event.cpp:
379         (WebCore::Event::Event):
380         * dom/Event.h:
381         (WebCore::Event::legacyReturnValue):
382         (WebCore::Event::setLegacyReturnValue):
383         (WebCore::Event::clipboardData):
384         * dom/EventContext.cpp:
385         (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):
386         * dom/EventDispatcher.cpp:
387         (WebCore::EventPath::lastContextIfExists):
388         (WebCore::EventDispatcher::dispatchEvent):
389         * dom/EventListenerMap.cpp:
390         (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
391         (WebCore::EventListenerIterator::EventListenerIterator):
392         * dom/EventListenerMap.h:
393         * dom/EventTarget.cpp:
394         (WebCore::EventTarget::fireEventListeners):
395         * dom/FocusEvent.cpp:
396         (WebCore::FocusEventInit::FocusEventInit):
397         * dom/GenericEventQueue.cpp:
398         (WebCore::GenericEventQueue::enqueueEvent):
399         * dom/IdTargetObserverRegistry.h:
400         (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
401         (WebCore::IdTargetObserverRegistry::notifyObservers):
402         * dom/IgnoreDestructiveWriteCountIncrementer.h:
403         (WebCore::IgnoreDestructiveWriteCountIncrementer::IgnoreDestructiveWriteCountIncrementer):
404         * dom/MessageEvent.cpp:
405         (WebCore::MessageEvent::MessageEvent):
406         * dom/MessageEvent.h:
407         * dom/MessagePort.cpp:
408         (WebCore::MessagePort::contextDestroyed):
409         (WebCore::MessagePort::dispatchMessages):
410         (WebCore::MessagePort::locallyEntangledPort):
411         (WebCore::MessagePort::disentanglePorts):
412         * dom/MouseEvent.cpp:
413         (WebCore::MouseEventInit::MouseEventInit):
414         (WebCore::MouseEvent::cloneFor):
415         * dom/MouseEvent.h:
416         (WebCore::MouseEvent::dataTransfer):
417         * dom/MouseRelatedEvent.cpp:
418         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
419         (WebCore::MouseRelatedEvent::computeRelativePosition):
420         * dom/MutationEvent.h:
421         * dom/Node.cpp:
422         (WebCore::Node::nodeLists):
423         (WebCore::Node::clearNodeLists):
424         (WebCore::Node::nonShadowBoundaryParentNode):
425         (WebCore::Node::parentOrShadowHostElement):
426         * dom/Node.h:
427         * dom/NodeRareData.h:
428         (WebCore::NodeListsNodeData::removeCachedCollection):
429         (WebCore::NodeListsNodeData::isEmpty):
430         * dom/PendingScript.cpp:
431         (WebCore::PendingScript::releaseElementAndClear):
432         * dom/PopStateEvent.cpp:
433         (WebCore::PopStateEvent::PopStateEvent):
434         * dom/Position.h:
435         (WebCore::Position::deprecatedNode):
436         (WebCore::Position::document):
437         (WebCore::Position::rootEditableElement):
438         * dom/PositionIterator.cpp:
439         (WebCore::PositionIterator::decrement):
440         * dom/PositionIterator.h:
441         (WebCore::PositionIterator::PositionIterator):
442         * dom/ProcessingInstruction.cpp:
443         (WebCore::ProcessingInstruction::ProcessingInstruction):
444         (WebCore::ProcessingInstruction::checkStyleSheet):
445         (WebCore::ProcessingInstruction::parseStyleSheet):
446         * dom/ProcessingInstruction.h:
447         * dom/RangeBoundaryPoint.h:
448         (WebCore::RangeBoundaryPoint::RangeBoundaryPoint):
449         * dom/ScriptElement.cpp:
450         (WebCore::ScriptElement::ScriptElement):
451         (WebCore::ScriptElement::stopLoadRequest):
452         (WebCore::ScriptElement::notifyFinished):
453         (WebCore::ScriptElement::ignoresLoadRequest):
454         * dom/ScriptedAnimationController.h:
455         (WebCore::ScriptedAnimationController::create):
456         (WebCore::ScriptedAnimationController::clearDocumentPointer):
457         * dom/StyledElement.cpp:
458         (WebCore::PresentationAttributeCacheKey::PresentationAttributeCacheKey):
459         (WebCore::StyledElement::addSubresourceAttributeURLs):
460         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
461         * dom/StyledElement.h:
462         (WebCore::StyledElement::additionalPresentationAttributeStyle):
463         (WebCore::StyledElement::inlineStyle):
464         * dom/TemplateContentDocumentFragment.h:
465         * dom/TextEvent.cpp:
466         (WebCore::TextEvent::TextEvent):
467         * dom/UIEvent.cpp:
468         (WebCore::UIEventInit::UIEventInit):
469         * dom/UserTypingGestureIndicator.cpp:
470         (WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
471         (WebCore::UserTypingGestureIndicator::~UserTypingGestureIndicator):
472         * dom/ViewportArguments.cpp:
473         (WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable):
474         (WebCore::numericPrefix):
475         * dom/default/PlatformMessagePortChannel.cpp:
476         (WebCore::MessagePortChannel::disentangle):
477         (WebCore::MessagePortChannel::postMessageToRemote):
478         (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
479         * dom/default/PlatformMessagePortChannel.h:
480
481 2015-11-02  Wenson Hsieh  <wenson_hsieh@apple.com>
482
483         Tapping *below* some <input>s can focus them in Mobile Safari
484         https://bugs.webkit.org/show_bug.cgi?id=146244
485         <rdar://problem/21509310>
486
487         Reviewed by Darin Adler.
488
489         Removes iOS-specific logic in positionForPointRespectingEditingBoundaries that was causing us to focus inputs by
490         tapping on the document element. We believe this logic, which causes VisiblePosition finding to recurse from a non-
491         editable element to an editable child, is not necessary to focus editable elements underneath non-editable elements,
492         since hit-testing will already have selected the contentEditable element prior to searching for a suitable
493         VisiblePosition. Further investigation shows that this logic was added to fix <rdar://problem/5545799>, in which the
494         first character in a Notes document could not be selected. However, I have not been able to reproduce this bug after
495         removing this logic.
496
497         As a result of this change, we can also enable a WK1 test, editing/selection/click-outside-editable-div.html, that
498         had also been marked as failing due to positionForPointRespectingEditingBoundaries recursing into a contentEditable
499         div.
500
501         Test: fast/events/ios/clicking-document-should-not-trigger-focus.html
502
503         * rendering/RenderBlock.cpp:
504         (WebCore::positionForPointRespectingEditingBoundaries): Deleted.
505
506 2015-11-03  Myles C. Maxfield  <mmaxfield@apple.com>
507
508         Update to match text-orientation spec
509         https://bugs.webkit.org/show_bug.cgi?id=150765
510
511         Reviewed by Darin Adler.
512
513         The CSS spec has removed the "sideways-right" value of text-orientation in favor
514         of "sideways." This patch makes the parser treat "sideways-right" the same as
515         "sideways."
516
517         Test: fast/text/orientation-sideways-right.html
518
519         * css/CSSPrimitiveValueMappings.h:
520         (WebCore::CSSPrimitiveValue::operator TextOrientation):
521         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
522         * rendering/style/RenderStyle.cpp:
523         (WebCore::RenderStyle::fontAndGlyphOrientation): Deleted.
524         * rendering/style/RenderStyleConstants.h:
525
526 2015-11-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
527
528         [Streams API] Rework promises to use @newPromiseCapability
529         https://bugs.webkit.org/show_bug.cgi?id=150627
530
531         Reviewed by Youenn Fablet.
532
533         We are removing the stream promises functions in favor of @newPromiseCapabity which basically provides the same
534         functionality (keeping the resolve and reject functions without external slots). Slots and variables were
535         renamed as *PromiseCapability to show that they no longer hold just a promise, but a promise capability.
536
537         Internal rework, no new tests needed.
538
539         * Modules/streams/ReadableStreamInternals.js:
540         (privateInitializeReadableStreamReader.this.closedPromiseCapability.resolve):
541         (privateInitializeReadableStreamReader.this.closedPromiseCapability.reject):
542         (privateInitializeReadableStreamReader):
543         (teeReadableStream):
544         (teeReadableStreamBranch2CancelFunction):
545         (errorReadableStream):
546         (closeReadableStreamReader):
547         (enqueueInReadableStream):
548         (readFromReadableStreamReader):
549         * Modules/streams/ReadableStreamReader.js:
550         (closed):
551         * Modules/streams/StreamInternals.js:
552         (createNewStreamsPromise): Deleted.
553         (resolveStreamsPromise): Deleted.
554         (rejectStreamsPromise): Deleted.
555         * Modules/streams/WritableStream.js:
556         (this.readyPromiseCapability.resolve):
557         (this.readyPromiseCapability.reject):
558         (initializeWritableStream):
559         (close):
560         (write):
561         (closed):
562         (ready):
563         * Modules/streams/WritableStreamInternals.js:
564         (syncWritableStreamStateWithQueue):
565         (errorWritableStream):
566         * bindings/js/WebCoreBuiltinNames.h:
567
568 2015-11-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
569
570         Move webkitGetUserMedia to JS Builtin
571         https://bugs.webkit.org/show_bug.cgi?id=149499
572
573         Reviewed by Darin Adler.
574
575         Implemented webkitGetUserMedia as a JSBuiltin wrapper around navigator.mediaDevices.getUserMedia.
576
577         Removed cpp based version.
578
579         The js builting implementation checks for argument but does not raise exception when the request is not supported.
580         The error callback is called instead, in an asynchronous fashion.
581         The js builtin implementation does not check first that it is called on navigator, contrary to the cpp implementation.
582         This is done afterwards when calling navigator.MediaDevices.@getUserMedia.
583
584         Covered by existing and modified tests.
585
586         * CMakeLists.txt: Adding NavigatorUserMedia.js as built-in JS file.
587         * DerivedSources.make: Ditto.
588         * Modules/mediastream/NavigatorUserMedia.idl: Making webkitGetUserMedia JSBuiltin
589         * Modules/mediastream/NavigatorUserMedia.js:
590         (webkitGetUserMedia):
591         * Modules/mediastream/NavigatorUserMediaErrorCallback.h: Removed.
592         * Modules/mediastream/NavigatorUserMediaErrorCallback.idl: Removed.
593         * Modules/mediastream/NavigatorUserMediaSuccessCallback.h: Removed.
594         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl: Removed.
595         * Modules/mediastream/UserMediaRequest.cpp:
596         * Modules/mediastream/UserMediaRequest.h:
597         * WebCore.xcodeproj/project.pbxproj:
598         * bindings/js/JSDOMWindowBase.cpp:
599         (WebCore::JSDOMWindowBase::finishCreation): Style modifications.
600         * bindings/js/JSNavigatorCustom.cpp: Removed.
601         * bindings/js/WebCoreJSBuiltins.cpp: Adding support for NavigatorUserMedia.js built-in JS file.
602         * bindings/js/WebCoreJSBuiltins.h: Ditto.
603         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
604         (WebCore::JSBuiltinFunctions::navigatorUserMediaBuiltins):
605
606 2015-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
607
608         [GStreamer] Use GstBus sync message handler and schedule tasks to the main thread with RunLoop::dispatch
609         https://bugs.webkit.org/show_bug.cgi?id=150800
610
611         Reviewed by Philippe Normand.
612
613         This way we would avoid all the GScource + polling mechanism that
614         GST uses internally to handle messages asynchronously in the main thread.
615
616         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
617         (WTF::adoptGRef):
618         (WTF::refGPtr<GstMessage>):
619         (WTF::derefGPtr<GstMessage>):
620         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
621         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
622         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
623         Initialize the WeakPtr factory.
624         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
625         reset the GstBus sync handler.
626         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Make it void.
627         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Add a
628         GstBus sync message handler and schedule the messages to the main
629         thread with RunLoop::main().dispatch().
630         (WebCore::mediaPlayerPrivateMessageCallback): Deleted.
631         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
632         (WebCore::MediaPlayerPrivateGStreamer::createWeakPtr): Create a WeakPtr.
633         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
634         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
635         Handle the need context message that needs to be handled in the
636         caller thread.
637         (WebCore::mediaPlayerPrivateNeedContextMessageCallback): Deleted.
638         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
639         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline): Do not
640         connect to sync-message signal, handleSyncMessage() will be called
641         to handled messages synchronously.
642         (WebCore::MediaPlayerPrivateGStreamerBase::handleNeedContextMessage): Deleted.
643         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
644
645 2015-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
646
647         [GStreamer] Cleanup the iradio properties
648         https://bugs.webkit.org/show_bug.cgi?id=148522
649
650         Reviewed by Philippe Normand.
651
652         Remove unused icecast code.
653
654         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
655         (StreamingClient::handleResponseReceived):
656         (webKitWebSrcGetProperty): Deleted.
657         (webKitWebSrcStop): Deleted.
658
659 2015-11-02  Keith Rollin  <krollin@apple.com>
660
661         input[type=number] does not increment/decrement integers with trailing decimal characters
662         https://bugs.webkit.org/show_bug.cgi?id=148867
663         rdar://problem/22589693
664
665         Reviewed by Chris Dumez.
666
667         Support input[type=number].value attributes of the form "###." (that
668         is, leading digits with a decimal but no trailing digits). This form
669         was supported in the setting of the attribute, but not when changing
670         it through stepUp/Down.
671
672         Testing turned up similarly incorrect processing of -.###, so
673         addressed that, too.
674
675         Test: fast/forms/range/input-appearance-range-decimals.html
676
677         Updated the following tests:
678         - fast/forms/number/number-stepup-stepdown-from-renderer.html
679         - fast/forms/number/number-stepup-stepdown.html
680         - fast/forms/range/range-stepup-stepdown-from-renderer.html
681         - fast/forms/range/range-stepup-stepdown.html
682
683         * html/InputType.cpp:
684         (WebCore::InputType::stepUpFromRenderer):
685         * platform/Decimal.cpp:
686         (WebCore::Decimal::fromString):
687
688 2015-11-02  Jiewen Tan  <jiewen_tan@apple.com>
689
690         Null dereference loading Blink layout test fast/css/background-repeat-null-y-crash.html
691         https://bugs.webkit.org/show_bug.cgi?id=150211
692         <rdar://problem/23137321>
693
694         Reviewed by Alex Christensen.
695
696         This is a merge of Blink r188842:
697         https://codereview.chromium.org/846933002
698
699         By setting the backgroundRepeatY property to null it can
700         happen that accessing that CSS value returns a null pointer.
701         In that case simply bail out early.
702
703         Test: fast/css/background-repeat-null-y-crash.html
704
705         * css/StyleProperties.cpp:
706         (WebCore::StyleProperties::getLayeredShorthandValue):
707
708 2015-11-02  Myles C. Maxfield  <mmaxfield@apple.com>
709
710         [Vertical Writing Mode] Rename "vertical-right" CSS value to match spec
711         https://bugs.webkit.org/show_bug.cgi?id=150766
712
713         Reviewed by Darin Adler.
714
715         The spec has changed the initial value of text-orientation from "vertical-right"
716         to "mixed." This patch follows this movement, but also keeps the existing
717         property working (the parser will treat both values the same).
718
719         Test: fast/text/vertical-mixed.html
720
721         * css/CSSParser.cpp:
722         (WebCore::CSSParser::parseValue):
723         * css/CSSPrimitiveValueMappings.h:
724         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
725         (WebCore::CSSPrimitiveValue::operator TextOrientation):
726         * css/CSSValueKeywords.in:
727         * css/StyleResolver.cpp:
728         (WebCore::checkForOrientationChange):
729         * platform/graphics/FontCascadeFonts.cpp:
730         (WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
731         * platform/graphics/FontDescription.cpp:
732         (WebCore::FontDescription::FontDescription):
733         * platform/graphics/cocoa/FontCascadeCocoa.mm:
734         (WebCore::FontCascade::fontForCombiningCharacterSequence):
735         * platform/text/TextFlags.h:
736         * rendering/style/RenderStyle.cpp:
737         (WebCore::RenderStyle::getFontAndGlyphOrientation):
738         * rendering/style/RenderStyle.h:
739         * rendering/style/RenderStyleConstants.h:
740         * rendering/style/StyleRareInheritedData.cpp:
741         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
742         * style/StyleResolveForDocument.cpp:
743         (WebCore::Style::resolveForDocument):
744
745 2015-11-02  Myles C. Maxfield  <mmaxfield@apple.com>
746
747         [Cocoa] Support WOFF2
748         https://bugs.webkit.org/show_bug.cgi?id=150830
749
750         Reviewed by Zalan Bujtas.
751
752         On platforms which support it, WebKit only needs to recognize WOFF2.
753
754         Test: fast/text/woff2.html
755
756         * platform/graphics/mac/FontCustomPlatformData.cpp:
757         (WebCore::FontCustomPlatformData::supportsFormat):
758
759 2015-11-02  Nan Wang  <n_wang@apple.com>
760
761         AX: Add support for ARIA 1.1 attribute 'aria-modal' for dialog and alertdialog
762         https://bugs.webkit.org/show_bug.cgi?id=138566
763
764         Reviewed by Chris Fleizach.
765
766         Added support for aria-modal attribute on dialog/alertdialog roles.
767         When modal dialog is displayed, all other contents will be unaccessible.
768
769         Tests: accessibility/aria-modal-multiple-dialogs.html
770                accessibility/aria-modal.html
771
772         * accessibility/AXObjectCache.cpp:
773         (WebCore::AXObjectCache::AXObjectCache):
774         (WebCore::AXObjectCache::~AXObjectCache):
775         (WebCore::AXObjectCache::findAriaModalNodes):
776         (WebCore::AXObjectCache::updateCurrentAriaModalNode):
777         (WebCore::AXObjectCache::isNodeVisible):
778         (WebCore::AXObjectCache::ariaModalNode):
779         (WebCore::AXObjectCache::focusedImageMapUIElement):
780         (WebCore::AXObjectCache::remove):
781         (WebCore::AXObjectCache::handleAttributeChanged):
782         (WebCore::AXObjectCache::handleAriaModalChange):
783         (WebCore::AXObjectCache::labelChanged):
784         * accessibility/AXObjectCache.h:
785         (WebCore::AXObjectCache::handleActiveDescendantChanged):
786         (WebCore::AXObjectCache::handleAriaExpandedChange):
787         (WebCore::AXObjectCache::handleAriaRoleChanged):
788         (WebCore::AXObjectCache::handleAriaModalChange):
789         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
790         (WebCore::AXObjectCache::handleScrollbarUpdate):
791         (WebCore::AXObjectCache::handleAttributeChanged):
792         * accessibility/AccessibilityObject.cpp:
793         (WebCore::AccessibilityObject::ariaCurrentState):
794         (WebCore::AccessibilityObject::isAriaModalDescendant):
795         (WebCore::AccessibilityObject::ignoredFromARIAModalPresence):
796         (WebCore::AccessibilityObject::hasTagName):
797         (WebCore::AccessibilityObject::defaultObjectInclusion):
798         * accessibility/AccessibilityObject.h:
799         * html/HTMLAttributeNames.in:
800
801 2015-11-02  Brady Eidson  <beidson@apple.com>
802
803         Modern IDB: IBDObjectStore.delete() support.
804         https://bugs.webkit.org/show_bug.cgi?id=150784
805
806         Reviewed by Alex Christensen.
807
808         Tests: storage/indexeddb/modern/idbobjectstore-delete-1.html
809                storage/indexeddb/modern/idbobjectstore-delete-2.html
810                storage/indexeddb/modern/idbobjectstore-delete-failures.html
811
812         * Modules/indexeddb/IDBKeyRangeData.cpp:
813         (WebCore::IDBKeyRangeData::isValid):
814         * Modules/indexeddb/IDBKeyRangeData.h:
815         
816         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
817         (WebCore::IDBClient::IDBConnectionToServer::deleteRecord):
818         (WebCore::IDBClient::IDBConnectionToServer::didDeleteRecord):
819         * Modules/indexeddb/client/IDBConnectionToServer.h:
820         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
821         
822         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
823         (WebCore::IDBClient::IDBObjectStore::get):
824         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
825         
826         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
827         (WebCore::IDBClient::IDBTransaction::requestDeleteRecord):
828         (WebCore::IDBClient::IDBTransaction::deleteRecordOnServer):
829         (WebCore::IDBClient::IDBTransaction::didDeleteRecordOnServer):
830         * Modules/indexeddb/client/IDBTransactionImpl.h:
831         
832         * Modules/indexeddb/server/IDBBackingStore.h:
833         
834         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
835         (WebCore::IDBServer::IDBConnectionToClient::didDeleteRecord):
836         * Modules/indexeddb/server/IDBConnectionToClient.h:
837         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
838         
839         * Modules/indexeddb/server/IDBServer.cpp:
840         (WebCore::IDBServer::IDBServer::deleteRecord):
841         * Modules/indexeddb/server/IDBServer.h:
842         
843         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
844         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
845         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRecord): Deleted.
846         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
847         
848         * Modules/indexeddb/server/MemoryObjectStore.cpp:
849         (WebCore::IDBServer::MemoryObjectStore::deleteRange):
850         * Modules/indexeddb/server/MemoryObjectStore.h:
851         
852         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
853         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
854         (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
855         (WebCore::IDBServer::UniqueIDBDatabase::performDeleteRecord):
856         (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteRecord):
857         * Modules/indexeddb/server/UniqueIDBDatabase.h:
858         
859         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
860         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
861         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
862         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
863         
864         * Modules/indexeddb/shared/IDBResultData.cpp:
865         (WebCore::IDBResultData::deleteRecordSuccess):
866         * Modules/indexeddb/shared/IDBResultData.h:
867         
868         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
869         (WebCore::InProcessIDBServer::didDeleteRecord):
870         (WebCore::InProcessIDBServer::deleteRecord):
871         * Modules/indexeddb/shared/InProcessIDBServer.h:
872
873 2015-11-02  Andy Estes  <aestes@apple.com>
874
875         Fix the iOS build again.
876
877         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: supportsPictureInPicture() needs to be declared even when
878         AVKit is disabled.
879
880 2015-11-02  Tim Horton  <timothy_horton@apple.com>
881
882         PDFPlugin should take advantage of threaded scrolling
883         https://bugs.webkit.org/show_bug.cgi?id=150037
884
885         Reviewed by Anders Carlsson.
886
887         * page/PageOverlay.cpp:
888         (WebCore::PageOverlay::PageOverlay):
889         (WebCore::PageOverlay::setNeedsDisplay):
890         Don't reset the overlay layer's opacity if we're not animating,
891         because it's possible the client wants to manage it.
892
893         * page/PageOverlayController.cpp:
894         (WebCore::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
895         Let the overlay itself determine whether it needes synchronous scrolling,
896         and let PageOverlay clients override the default.
897
898         * platform/Widget.h:
899         (WebCore::Widget::boundsRect):
900         Export a few useful things.
901
902 2015-11-02  Chris Dumez  <cdumez@apple.com>
903
904         Regression(r191673): Crash in RunLoopTimer::schedule()
905         https://bugs.webkit.org/show_bug.cgi?id=150816
906         <rdar://problem/23335285>
907
908         Reviewed by Anders Carlsson.
909
910         The crash was happening when the RunLoopTimer would fire during the
911         call to RunLoopTimer::schedule(), which can happen because we are
912         calling schedule() from a background thread. In such case, the
913         timerFired() callback execution would cause |this| to get destroyed.
914
915         To avoid this issue, DecodingResultDispatcher is now ref-counted. The
916         object is ref'd while calling startTimer() so that the object cannot go
917         away during the execution of this method. Also, we explicitly ref the
918         object when starting the timer to keep the object alive until the
919         RunLoopTimer has fired, at which point we explicitely de-ref.
920
921         This should handle correctly the cases where the RunLoopTimer fires
922         during AND after the execution of startTimer().
923
924         * platform/network/DataURLDecoder.cpp:
925         (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
926         (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
927         (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
928
929 2015-11-02  Andy Estes  <aestes@apple.com>
930
931         [Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
932         https://bugs.webkit.org/show_bug.cgi?id=150819
933
934         Reviewed by Dan Bernstein.
935
936         This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.
937
938         * Configurations/Base.xcconfig:
939
940 2015-11-02  Brent Fulgham  <bfulgham@apple.com>
941
942         [Win] MiniBrowser unable to use WebInspector
943         https://bugs.webkit.org/show_bug.cgi?id=150810
944         <rdar://problem/23358514>
945
946         Reviewed by Timothy Hatcher.
947
948         The CMakeList rule for creating the InjectedScriptSource.min.js was improperly including
949         the quote characters in the text prepended to InjectedScriptSource.min.js. This caused a
950         parsing error in the JS file.
951         
952         The solution was to switch from using "COMMAND echo" to use the more cross-platform
953         compatible command "COMMAND ${CMAKE_COMMAND} -E echo ...", which handles the string
954         escaping properly on all platforms.
955
956         * CMakeLists.txt: Switch the 'echo' command syntax to be more cross-platform.
957
958 2015-11-02  Zalan Bujtas  <zalan@apple.com>
959
960         hasOverflowClip() does not necessarily mean valid layer().
961         https://bugs.webkit.org/show_bug.cgi?id=150814
962
963         Reviewed by Simon Fraser.
964
965         Certain RenderLayerModelObject derived classes simply return false for ::requiresLayer(), which means
966         that we end up not creating a layer for the overflow clipped content.   
967
968         No change in functionality.
969
970         * rendering/RenderBlock.cpp:
971         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
972         (WebCore::RenderBlock::paint):
973         * rendering/RenderBox.cpp:
974         (WebCore::RenderBox::styleDidChange):
975         (WebCore::RenderBox::scrollWidth):
976         (WebCore::RenderBox::scrollHeight):
977         (WebCore::RenderBox::scrollLeft):
978         (WebCore::RenderBox::scrollTop):
979         (WebCore::RenderBox::setScrollLeft):
980         (WebCore::RenderBox::setScrollTop):
981         (WebCore::RenderBox::includeVerticalScrollbarSize):
982         (WebCore::RenderBox::includeHorizontalScrollbarSize):
983         (WebCore::RenderBox::intrinsicScrollbarLogicalWidth):
984         (WebCore::RenderBox::usesCompositedScrolling):
985
986 2015-11-02  Alex Christensen  <achristensen@webkit.org>
987
988         Fix Mac CMake build after r191904.
989
990         * PlatformMac.cmake:
991         Move SettingsMac.mm to SettingsCocoa.mm.
992
993 2015-11-02  Eric Carlson  <eric.carlson@apple.com>
994
995         Add HTMLMediaElement behavior and attribute value restrictions for MediaStream
996         https://bugs.webkit.org/show_bug.cgi?id=146853
997
998         Reviewed by Jer Noble.
999
1000         * Modules/mediastream/MediaStream.cpp:
1001         (WebCore::MediaStream::scheduleActiveStateChange): Do nothing if the active state hasn't changed.
1002         (WebCore::MediaStream::activityEventTimerFired): Remove FIXME.
1003
1004         * Modules/mediastream/MediaStreamTrack.cpp:
1005         (WebCore::MediaStreamTrack::stopProducingData): Add comments. Notify observers that the track ended.
1006         (WebCore::MediaStreamTrack::trackEnded): Don't dispatch events after having been stopped.
1007         (WebCore::MediaStreamTrack::trackMutedChanged): Ditto.
1008
1009         * html/HTMLMediaElement.cpp:
1010         (WebCore::HTMLMediaElement::defaultPlaybackRate): Always return 1 when using a MediaStream.
1011         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Do nothing when using a MediaStream.
1012         (WebCore::HTMLMediaElement::playbackRate): Always return 1 when using a MediaStream.
1013         (WebCore::HTMLMediaElement::setPlaybackRate): Do nothing when using a MediaStream.
1014         (WebCore::HTMLMediaElement::ended): Ask the media engine when using a MediaStream.
1015         (WebCore::HTMLMediaElement::preload): Always return "none" when using a MediaStream.
1016         (WebCore::HTMLMediaElement::setPreload): Do nothing when using a MediaStream.
1017         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Avoid unnecessary comparisons when the duration
1018           is not definite. Send ended event when MediaStream says stream has ended.
1019
1020         * platform/graphics/MediaPlayer.cpp:
1021         (WebCore::MediaPlayer::ended): New, passthrough to engine.
1022         * platform/graphics/MediaPlayer.h:
1023         * platform/graphics/MediaPlayerPrivate.h:
1024
1025         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1026         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1027         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Set m_ended from stream.
1028         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad): Pause the stream if necessary.
1029         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Return early if ended or already playing.
1030         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Return early if ended or already paused.
1031         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Cleanup. Try to grab a paused
1032           image if the stream isn't active.
1033         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateReadyState): New.
1034         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Call updateReadyState.
1035         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged): Ditto.
1036
1037         * platform/mediastream/MediaStreamPrivate.cpp:
1038         (WebCore::MediaStreamPrivate::trackEnabledChanged): Call updateActiveState so the state will
1039           be updated if necessary.
1040
1041         * platform/mediastream/RealtimeMediaSource.cpp:
1042         (WebCore::RealtimeMediaSource::stop): Don't call reset, there is no need to tear everything down.
1043
1044 2015-10-31  Andy Estes  <aestes@apple.com>
1045
1046         Replace iOS-only WebKitSystemInterface calls with SPI
1047         https://bugs.webkit.org/show_bug.cgi?id=150763
1048
1049         Reviewed by Darin Adler.
1050
1051         * WebCore.xcodeproj/project.pbxproj:
1052         * config.h: Removed WEBCORE_NAVIGATOR_PLATFORM and WEBCORE_NAVIGATOR_VENDOR.
1053         * css/MediaQueryEvaluator.cpp:
1054         (WebCore::isRunningOnIPhoneOrIPod): Used deviceClass() instead of iosDeviceClass().
1055         * html/HTMLMediaElement.cpp:
1056         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
1057         * html/HTMLObjectElement.cpp:
1058         (WebCore::shouldNotPerformURLAdjustment): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
1059         * html/HTMLVideoElement.cpp:
1060         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
1061         * page/NavigatorBase.cpp:
1062         * page/Settings.h:
1063         * page/ViewportConfiguration.cpp:
1064         (WebCore::ViewportConfiguration::textDocumentParameters): Used screenSize() instead of wkGetScreenSize().
1065         * page/ios/UserAgentIOS.mm:
1066         (WebCore::isClassic): Added to return -[UIApplication _isClassic].
1067         (WebCore::osNameForUserAgent): Upstreamed the implementation of WKGetOSNameForUserAgent() from WebKitSystemInterface.
1068         (WebCore::deviceName): Ditto for wkGetDeviceName().
1069         (WebCore::standardUserAgentWithApplicationName): Called deviceName() and osNameForUserAgent().
1070         * page/mac/SettingsCocoa.mm: Renamed from Source/WebCore/page/mac/SettingsMac.mm.
1071         (WebCore::Settings::defaultMinimumZoomFontSize): Upstreamed the implementation of WKGetMinimumZoomFontSize() from WebKitSystemInterface.
1072         * platform/PlatformScreen.h:
1073         * platform/ios/Device.cpp: Added functions that answer queries about the iOS device from MobileGestalt.
1074         (WebCore::deviceClass):
1075         (WebCore::deviceName):
1076         (WebCore::deviceHasIPadCapability):
1077         * platform/ios/Device.h:
1078         * platform/ios/PlatformScreenIOS.mm:
1079         (WebCore::screenPPIFactor): Used MGGetSInt32Answer() and MGGetFloat32Answer() instead of mobileGestaltFloatValue().
1080         (WebCore::screenSize): Upstreamed the implementation of WKGetScreenSize() from WebKitSystemInterface.
1081         (WebCore::availableScreenSize): Ditto for WKGetAvailableScreenSize().
1082         (WebCore::screenScaleFactor): Ditto for WKGetScreenScaleFactor() and WKGetScaleFactorForScreen().
1083         (WebCore::mobileGestaltFloatValue): Deleted.
1084         * platform/ios/WebCoreSystemInterfaceIOS.h: Removed.
1085         (iosExecutableWasLinkedOnOrAfterVersion): Deleted.
1086         (iosDeviceClass): Deleted.
1087         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1088         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1089         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1090         (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
1091         (WebCore::supportsPictureInPicture): Upstreamed the implementation of WKIsOptimizedFullscreenSupported() from WebKitSystemInterface.
1092         * platform/ios/wak/WAKWindow.mm:
1093         (-[WAKWindow initWithLayer:]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
1094         (-[WAKWindow initWithFrame:]): Ditto.
1095         * platform/ios/wak/WKGraphics.mm:
1096         (WKGraphicsCreateImageFromBundleWithName): Ditto.
1097         (WKDrawPatternBitmap): Ditto.
1098         * platform/mac/WebCoreSystemInterface.h:
1099         * platform/spi/cocoa/DynamicLinkerSPI.h: Defined additional DYLD_IOS_VERSION macros.
1100         * platform/spi/ios/MobileGestaltSPI.h: Defined additional MobileGestalt queries, enum MGDeviceClass, MGGetSInt32Answer, and MGGetFloat32Answer.
1101         * platform/spi/ios/UIKitSPI.h: Copied from Source/WebCore/platform/spi/ios/UIColorSPI.h, and added SPI declarations for UIApplication and UIScreen.
1102         * rendering/RenderThemeIOS.mm: Included UIKitSPI.h instead of UIColorSPI.h, and removed unnecessary forward declarations for the iOS public SDK build.
1103
1104 2015-11-02  Commit Queue  <commit-queue@webkit.org>
1105
1106         Unreviewed, rolling out r191902.
1107         https://bugs.webkit.org/show_bug.cgi?id=150811
1108
1109         This change broke iOS builders (Requested by ryanhaddad on
1110         #webkit).
1111
1112         Reverted changeset:
1113
1114         "Replace iOS-only WebKitSystemInterface calls with SPI"
1115         https://bugs.webkit.org/show_bug.cgi?id=150763
1116         http://trac.webkit.org/changeset/191902
1117
1118 2015-10-31  Andy Estes  <aestes@apple.com>
1119
1120         Replace iOS-only WebKitSystemInterface calls with SPI
1121         https://bugs.webkit.org/show_bug.cgi?id=150763
1122
1123         Reviewed by Darin Adler.
1124
1125         * WebCore.xcodeproj/project.pbxproj:
1126         * config.h: Removed WEBCORE_NAVIGATOR_PLATFORM and WEBCORE_NAVIGATOR_VENDOR.
1127         * css/MediaQueryEvaluator.cpp:
1128         (WebCore::isRunningOnIPhoneOrIPod): Used deviceClass() instead of iosDeviceClass().
1129         * html/HTMLMediaElement.cpp:
1130         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
1131         * html/HTMLObjectElement.cpp:
1132         (WebCore::shouldNotPerformURLAdjustment): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
1133         * html/HTMLVideoElement.cpp:
1134         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
1135         * page/NavigatorBase.cpp:
1136         * page/Settings.h:
1137         * page/ViewportConfiguration.cpp:
1138         (WebCore::ViewportConfiguration::textDocumentParameters): Used screenSize() instead of wkGetScreenSize().
1139         * page/ios/UserAgentIOS.mm:
1140         (WebCore::isClassic): Added to return -[UIApplication _isClassic].
1141         (WebCore::osNameForUserAgent): Upstreamed the implementation of WKGetOSNameForUserAgent() from WebKitSystemInterface.
1142         (WebCore::deviceName): Ditto for wkGetDeviceName().
1143         (WebCore::standardUserAgentWithApplicationName): Called deviceName() and osNameForUserAgent().
1144         * page/mac/SettingsCocoa.mm: Renamed from Source/WebCore/page/mac/SettingsMac.mm.
1145         (WebCore::Settings::defaultMinimumZoomFontSize): Upstreamed the implementation of WKGetMinimumZoomFontSize() from WebKitSystemInterface.
1146         * platform/PlatformScreen.h:
1147         * platform/ios/Device.cpp: Added functions that answer queries about the iOS device from MobileGestalt.
1148         (WebCore::deviceClass):
1149         (WebCore::deviceName):
1150         (WebCore::deviceHasIPadCapability):
1151         * platform/ios/Device.h:
1152         * platform/ios/PlatformScreenIOS.mm:
1153         (WebCore::screenPPIFactor): Used MGGetSInt32Answer() and MGGetFloat32Answer() instead of mobileGestaltFloatValue().
1154         (WebCore::screenSize): Upstreamed the implementation of WKGetScreenSize() from WebKitSystemInterface.
1155         (WebCore::availableScreenSize): Ditto for WKGetAvailableScreenSize().
1156         (WebCore::screenScaleFactor): Ditto for WKGetScreenScaleFactor() and WKGetScaleFactorForScreen().
1157         (WebCore::mobileGestaltFloatValue): Deleted.
1158         * platform/ios/WebCoreSystemInterfaceIOS.h: Removed.
1159         (iosExecutableWasLinkedOnOrAfterVersion): Deleted.
1160         (iosDeviceClass): Deleted.
1161         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1162         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1163         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1164         (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
1165         (WebCore::supportsPictureInPicture): Upstreamed the implementation of WKIsOptimizedFullscreenSupported() from WebKitSystemInterface.
1166         * platform/ios/wak/WAKWindow.mm:
1167         (-[WAKWindow initWithLayer:]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
1168         (-[WAKWindow initWithFrame:]): Ditto.
1169         * platform/ios/wak/WKGraphics.mm:
1170         (WKGraphicsCreateImageFromBundleWithName): Ditto.
1171         (WKDrawPatternBitmap): Ditto.
1172         * platform/mac/WebCoreSystemInterface.h:
1173         * platform/spi/cocoa/DynamicLinkerSPI.h: Defined additional DYLD_IOS_VERSION macros.
1174         * platform/spi/ios/MobileGestaltSPI.h: Defined additional MobileGestalt queries, enum MGDeviceClass, MGGetSInt32Answer, and MGGetFloat32Answer.
1175         * platform/spi/ios/UIKitSPI.h: Copied from Source/WebCore/platform/spi/ios/UIColorSPI.h, and added SPI declarations for UIApplication and UIScreen.
1176         * rendering/RenderThemeIOS.mm:
1177
1178 2015-11-02  Frederic Wang  <fred.wang@free.fr>
1179
1180         [Win] Add support for the USE_TYPO_METRICS flag
1181         https://bugs.webkit.org/show_bug.cgi?id=150451
1182
1183         Reviewed by Darin Adler.
1184
1185         Make the Windows backend use the typo metrics when the OS/2 USE_TYPO_METRICS flag is set.
1186
1187         No new tests because this is already tested by fonts/use-typo-metrics-1.html
1188
1189         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1190         (WebCore::Font::platformInit):
1191         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1192         (WebCore::Font::platformInit):
1193         * platform/graphics/win/SimpleFontDataWin.cpp:
1194         (WebCore::Font::initGDIFont):
1195
1196 2015-11-02  Hyunduk Kim  <hyunduk.kim@samsung.com>
1197
1198         Enable MediaSource::isTypeSupported() to handle the upper-cased MIME type & Codec
1199         https://bugs.webkit.org/show_bug.cgi?id=150436
1200
1201         Reviewed by Darin Adler.
1202
1203         Got the new test case from
1204         https://github.com/w3c/web-platform-tests/blob/master/media-source/mediasource-is-type-supported.html 
1205         Tests: http\tests\media\media-source\mediasource-is-type-supported.html
1206
1207         * Modules/mediasource/MediaSource.cpp:
1208         (WebCore::MediaSource::isTypeSupported):
1209
1210 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1211
1212         Rename JSDOMWrapper.impl to JSDOMWrapper.wrapped
1213         https://bugs.webkit.org/show_bug.cgi?id=150613
1214
1215         Reviewed by Darin Adler.
1216
1217         Renaming impl to wrapped in classes and binding generated classes.
1218         No change in behavior.
1219
1220         * Modules/plugins/QuickTimePluginReplacement.mm:
1221         (WebCore::JSQuickTimePluginReplacement::timedMetaData):
1222         (WebCore::JSQuickTimePluginReplacement::accessLog):
1223         (WebCore::JSQuickTimePluginReplacement::errorLog):
1224         * bindings/js/JSAttrCustom.cpp:
1225         (WebCore::JSAttr::visitAdditionalChildren):
1226         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
1227         (WebCore::JSAudioBufferSourceNode::setBuffer):
1228         * bindings/js/JSAudioTrackCustom.cpp:
1229         (WebCore::JSAudioTrack::visitAdditionalChildren):
1230         (WebCore::JSAudioTrack::setKind):
1231         (WebCore::JSAudioTrack::setLanguage):
1232         * bindings/js/JSAudioTrackListCustom.cpp:
1233         (WebCore::JSAudioTrackList::visitAdditionalChildren):
1234         * bindings/js/JSBiquadFilterNodeCustom.cpp:
1235         (WebCore::JSBiquadFilterNode::setType):
1236         * bindings/js/JSCSSRuleCustom.cpp:
1237         (WebCore::JSCSSRule::visitAdditionalChildren):
1238         * bindings/js/JSCSSRuleListCustom.cpp:
1239         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
1240         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1241         (WebCore::JSCSSStyleDeclaration::visitAdditionalChildren):
1242         (WebCore::getPropertyValueFallback):
1243         (WebCore::cssPropertyGetterPixelOrPosPrefix):
1244         (WebCore::cssPropertyGetter):
1245         (WebCore::JSCSSStyleDeclaration::putDelegate):
1246         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
1247         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
1248         * bindings/js/JSCSSValueCustom.cpp:
1249         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
1250         (WebCore::JSCSSValueOwner::finalize):
1251         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1252         (WebCore::toHTMLCanvasStyle):
1253         (WebCore::JSCanvasRenderingContext2D::strokeStyle):
1254         (WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
1255         (WebCore::JSCanvasRenderingContext2D::fillStyle):
1256         (WebCore::JSCanvasRenderingContext2D::setFillStyle):
1257         (WebCore::JSCanvasRenderingContext2D::webkitLineDash):
1258         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
1259         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1260         (WebCore::JSCanvasRenderingContext::visitAdditionalChildren):
1261         * bindings/js/JSCharacterDataCustom.cpp:
1262         (WebCore::JSCharacterData::before):
1263         (WebCore::JSCharacterData::after):
1264         (WebCore::JSCharacterData::replaceWith):
1265         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1266         (WebCore::JSCommandLineAPIHost::inspectedObject):
1267         (WebCore::JSCommandLineAPIHost::getEventListeners):
1268         (WebCore::JSCommandLineAPIHost::inspect):
1269         (WebCore::JSCommandLineAPIHost::databaseId):
1270         (WebCore::JSCommandLineAPIHost::storageId):
1271         * bindings/js/JSCryptoCustom.cpp:
1272         (WebCore::JSCrypto::getRandomValues):
1273         * bindings/js/JSCryptoKeyCustom.cpp:
1274         (WebCore::JSCryptoKey::algorithm):
1275         * bindings/js/JSCryptoKeyPairCustom.cpp:
1276         (WebCore::JSCryptoKeyPair::visitAdditionalChildren):
1277         * bindings/js/JSCustomEventCustom.cpp:
1278         (WebCore::JSCustomEvent::detail):
1279         * bindings/js/JSCustomXPathNSResolver.cpp:
1280         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1281         * bindings/js/JSDOMBinding.cpp:
1282         (WebCore::reportException):
1283         (WebCore::activeDOMWindow):
1284         (WebCore::firstDOMWindow):
1285         * bindings/js/JSDOMFormDataCustom.cpp:
1286         (WebCore::toHTMLFormElementOrNull):
1287         (WebCore::JSDOMFormData::append):
1288         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
1289         (WebCore::JSDOMMimeTypeArray::nameGetter):
1290         * bindings/js/JSDOMNamedFlowCollectionCustom.cpp:
1291         (WebCore::JSDOMNamedFlowCollection::nameGetter):
1292         * bindings/js/JSDOMPluginArrayCustom.cpp:
1293         (WebCore::JSDOMPluginArray::nameGetter):
1294         * bindings/js/JSDOMPluginCustom.cpp:
1295         (WebCore::JSDOMPlugin::nameGetter):
1296         * bindings/js/JSDOMStringListCustom.cpp:
1297         (WebCore::JSDOMStringList::toWrapped):
1298         * bindings/js/JSDOMStringMapCustom.cpp:
1299         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
1300         (WebCore::JSDOMStringMap::getOwnPropertyNames):
1301         (WebCore::JSDOMStringMap::deleteProperty):
1302         (WebCore::JSDOMStringMap::putDelegate):
1303         * bindings/js/JSDOMTokenListCustom.cpp:
1304         (WebCore::JSDOMTokenList::toggle):
1305         * bindings/js/JSDOMWindowBase.cpp:
1306         (WebCore::shouldAllowAccessFrom):
1307         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1308         (WebCore::JSDOMWindowBase::updateDocument):
1309         (WebCore::JSDOMWindowBase::scriptExecutionContext):
1310         (WebCore::JSDOMWindowBase::printErrorMessage):
1311         (WebCore::JSDOMWindowBase::supportsProfiling):
1312         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
1313         (WebCore::JSDOMWindowBase::shouldInterruptScript):
1314         (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
1315         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
1316         (WebCore::JSDOMWindowBase::moduleLoaderResolve):
1317         (WebCore::JSDOMWindowBase::moduleLoaderFetch):
1318         (WebCore::JSDOMWindowBase::moduleLoaderEvaluate):
1319         * bindings/js/JSDOMWindowBase.h:
1320         * bindings/js/JSDOMWindowCustom.cpp:
1321         (WebCore::JSDOMWindow::visitAdditionalChildren):
1322         (WebCore::childFrameGetter):
1323         (WebCore::namedItemGetter):
1324         (WebCore::jsDOMWindowWebKit):
1325         (WebCore::jsDOMWindowIndexedDB):
1326         (WebCore::JSDOMWindow::getOwnPropertySlot):
1327         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1328         (WebCore::JSDOMWindow::put):
1329         (WebCore::JSDOMWindow::putByIndex):
1330         (WebCore::JSDOMWindow::deleteProperty):
1331         (WebCore::JSDOMWindow::deletePropertyByIndex):
1332         (WebCore::JSDOMWindow::getEnumerableLength):
1333         (WebCore::JSDOMWindow::getStructurePropertyNames):
1334         (WebCore::JSDOMWindow::getGenericPropertyNames):
1335         (WebCore::JSDOMWindow::getPropertyNames):
1336         (WebCore::JSDOMWindow::getOwnPropertyNames):
1337         (WebCore::JSDOMWindow::defineOwnProperty):
1338         (WebCore::JSDOMWindow::setLocation):
1339         (WebCore::JSDOMWindow::open):
1340         (WebCore::JSDOMWindow::showModalDialog):
1341         (WebCore::JSDOMWindow::postMessage):
1342         (WebCore::JSDOMWindow::setTimeout):
1343         (WebCore::JSDOMWindow::setInterval):
1344         (WebCore::JSDOMWindow::addEventListener):
1345         (WebCore::JSDOMWindow::removeEventListener):
1346         (WebCore::JSDOMWindow::toWrapped):
1347         * bindings/js/JSDOMWindowShell.cpp:
1348         (WebCore::JSDOMWindowShell::setWindow):
1349         (WebCore::JSDOMWindowShell::wrapped):
1350         * bindings/js/JSDOMWindowShell.h:
1351         * bindings/js/JSDOMWrapper.h:
1352         (WebCore::JSDOMWrapper::wrapped):
1353         (WebCore::JSDOMWrapper::JSDOMWrapper):
1354         * bindings/js/JSDataCueCustom.cpp:
1355         (WebCore::JSDataCue::value):
1356         (WebCore::JSDataCue::setValue):
1357         * bindings/js/JSDataTransferCustom.cpp:
1358         (WebCore::JSDataTransfer::types):
1359         * bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp:
1360         (WebCore::JSDedicatedWorkerGlobalScope::postMessage):
1361         * bindings/js/JSDeviceMotionEventCustom.cpp:
1362         (WebCore::JSDeviceMotionEvent::acceleration):
1363         (WebCore::JSDeviceMotionEvent::accelerationIncludingGravity):
1364         (WebCore::JSDeviceMotionEvent::rotationRate):
1365         (WebCore::JSDeviceMotionEvent::interval):
1366         (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
1367         * bindings/js/JSDeviceOrientationEventCustom.cpp:
1368         (WebCore::JSDeviceOrientationEvent::alpha):
1369         (WebCore::JSDeviceOrientationEvent::beta):
1370         (WebCore::JSDeviceOrientationEvent::gamma):
1371         (WebCore::JSDeviceOrientationEvent::webkitCompassHeading):
1372         (WebCore::JSDeviceOrientationEvent::webkitCompassAccuracy):
1373         (WebCore::JSDeviceOrientationEvent::absolute):
1374         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
1375         * bindings/js/JSDocumentCustom.cpp:
1376         (WebCore::JSDocument::prepend):
1377         (WebCore::JSDocument::append):
1378         * bindings/js/JSDocumentFragmentCustom.cpp:
1379         (WebCore::JSDocumentFragment::prepend):
1380         (WebCore::JSDocumentFragment::append):
1381         * bindings/js/JSDocumentTypeCustom.cpp:
1382         (WebCore::JSDocumentType::before):
1383         (WebCore::JSDocumentType::after):
1384         (WebCore::JSDocumentType::replaceWith):
1385         * bindings/js/JSElementCustom.cpp:
1386         (WebCore::JSElement::before):
1387         (WebCore::JSElement::after):
1388         (WebCore::JSElement::replaceWith):
1389         (WebCore::JSElement::prepend):
1390         (WebCore::JSElement::append):
1391         * bindings/js/JSEventCustom.cpp:
1392         (WebCore::JSEvent::clipboardData):
1393         * bindings/js/JSEventListener.cpp:
1394         (WebCore::JSEventListener::handleEvent):
1395         * bindings/js/JSEventTargetCustom.cpp:
1396         * bindings/js/JSFileReaderCustom.cpp:
1397         (WebCore::JSFileReader::result):
1398         * bindings/js/JSGeolocationCustom.cpp:
1399         (WebCore::JSGeolocation::getCurrentPosition):
1400         (WebCore::JSGeolocation::watchPosition):
1401         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1402         (WebCore::namedItems):
1403         (WebCore::callHTMLAllCollection):
1404         (WebCore::JSHTMLAllCollection::item):
1405         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1406         (WebCore::JSHTMLCanvasElement::getContext):
1407         (WebCore::JSHTMLCanvasElement::probablySupportsContext):
1408         (WebCore::JSHTMLCanvasElement::toDataURL):
1409         * bindings/js/JSHTMLCollectionCustom.cpp:
1410         (WebCore::JSHTMLCollection::nameGetter):
1411         * bindings/js/JSHTMLDocumentCustom.cpp:
1412         (WebCore::JSHTMLDocument::nameGetter):
1413         (WebCore::JSHTMLDocument::all):
1414         (WebCore::findCallingDocument):
1415         (WebCore::JSHTMLDocument::open):
1416         (WebCore::documentWrite):
1417         * bindings/js/JSHTMLElementCustom.cpp:
1418         (WebCore::JSHTMLElement::pushEventHandlerScope):
1419         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1420         (WebCore::namedItems):
1421         * bindings/js/JSHTMLFormElementCustom.cpp:
1422         (WebCore::JSHTMLFormElement::nameGetter):
1423         * bindings/js/JSHTMLFrameElementCustom.cpp:
1424         (WebCore::JSHTMLFrameElement::setLocation):
1425         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
1426         (WebCore::JSHTMLFrameSetElement::nameGetter):
1427         * bindings/js/JSHTMLInputElementCustom.cpp:
1428         (WebCore::JSHTMLInputElement::selectionStart):
1429         (WebCore::JSHTMLInputElement::setSelectionStart):
1430         (WebCore::JSHTMLInputElement::selectionEnd):
1431         (WebCore::JSHTMLInputElement::setSelectionEnd):
1432         (WebCore::JSHTMLInputElement::selectionDirection):
1433         (WebCore::JSHTMLInputElement::setSelectionDirection):
1434         (WebCore::JSHTMLInputElement::setSelectionRange):
1435         * bindings/js/JSHTMLMediaElementCustom.cpp:
1436         (WebCore::JSHTMLMediaElement::setController):
1437         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1438         (WebCore::JSHTMLOptionsCollection::nameGetter):
1439         (WebCore::JSHTMLOptionsCollection::setLength):
1440         (WebCore::JSHTMLOptionsCollection::indexSetter):
1441         (WebCore::JSHTMLOptionsCollection::remove):
1442         * bindings/js/JSHTMLSelectElementCustom.cpp:
1443         (WebCore::JSHTMLSelectElement::remove):
1444         (WebCore::JSHTMLSelectElement::indexSetter):
1445         * bindings/js/JSHTMLTemplateElementCustom.cpp:
1446         (WebCore::JSHTMLTemplateElement::content):
1447         * bindings/js/JSHistoryCustom.cpp:
1448         (WebCore::JSHistory::getOwnPropertySlotDelegate):
1449         (WebCore::JSHistory::putDelegate):
1450         (WebCore::JSHistory::deleteProperty):
1451         (WebCore::JSHistory::deletePropertyByIndex):
1452         (WebCore::JSHistory::getOwnPropertyNames):
1453         (WebCore::JSHistory::state):
1454         (WebCore::JSHistory::pushState):
1455         (WebCore::JSHistory::replaceState):
1456         * bindings/js/JSIDBDatabaseCustom.cpp:
1457         (WebCore::JSIDBDatabase::createObjectStore):
1458         * bindings/js/JSIDBObjectStoreCustom.cpp:
1459         (WebCore::JSIDBObjectStore::createIndex):
1460         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1461         (WebCore::JSInspectorFrontendHost::showContextMenu):
1462         * bindings/js/JSLocationCustom.cpp:
1463         (WebCore::JSLocation::getOwnPropertySlotDelegate):
1464         (WebCore::JSLocation::putDelegate):
1465         (WebCore::JSLocation::deleteProperty):
1466         (WebCore::JSLocation::deletePropertyByIndex):
1467         (WebCore::JSLocation::getOwnPropertyNames):
1468         (WebCore::JSLocation::toStringFunction):
1469         * bindings/js/JSMediaSourceStatesCustom.cpp:
1470         (WebCore::JSMediaSourceStates::width):
1471         (WebCore::JSMediaSourceStates::height):
1472         (WebCore::JSMediaSourceStates::frameRate):
1473         (WebCore::JSMediaSourceStates::aspectRatio):
1474         (WebCore::JSMediaSourceStates::facingMode):
1475         (WebCore::JSMediaSourceStates::volume):
1476         * bindings/js/JSMessageChannelCustom.cpp:
1477         (WebCore::JSMessageChannel::visitAdditionalChildren):
1478         * bindings/js/JSMessageEventCustom.cpp:
1479         (WebCore::JSMessageEvent::data):
1480         (WebCore::handleInitMessageEvent):
1481         * bindings/js/JSMessagePortCustom.cpp:
1482         (WebCore::JSMessagePort::visitAdditionalChildren):
1483         (WebCore::JSMessagePort::postMessage):
1484         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
1485         (WebCore::JSMockContentFilterSettings::decisionPoint):
1486         (WebCore::JSMockContentFilterSettings::setDecisionPoint):
1487         (WebCore::JSMockContentFilterSettings::decision):
1488         (WebCore::JSMockContentFilterSettings::setDecision):
1489         (WebCore::JSMockContentFilterSettings::unblockRequestDecision):
1490         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision):
1491         * bindings/js/JSMutationObserverCustom.cpp:
1492         (WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
1493         * bindings/js/JSNamedNodeMapCustom.cpp:
1494         (WebCore::JSNamedNodeMap::nameGetter):
1495         * bindings/js/JSNavigatorCustom.cpp:
1496         (WebCore::JSNavigator::webkitGetUserMedia):
1497         * bindings/js/JSNodeCustom.cpp:
1498         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
1499         (WebCore::JSNode::insertBefore):
1500         (WebCore::JSNode::replaceChild):
1501         (WebCore::JSNode::removeChild):
1502         (WebCore::JSNode::appendChild):
1503         (WebCore::JSNode::visitAdditionalChildren):
1504         * bindings/js/JSNodeIteratorCustom.cpp:
1505         (WebCore::JSNodeIterator::visitAdditionalChildren):
1506         * bindings/js/JSNodeListCustom.cpp:
1507         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
1508         * bindings/js/JSNodeOrString.cpp:
1509         (WebCore::toNodeOrStringVector):
1510         * bindings/js/JSOscillatorNodeCustom.cpp:
1511         (WebCore::JSOscillatorNode::setType):
1512         * bindings/js/JSPannerNodeCustom.cpp:
1513         (WebCore::JSPannerNode::setPanningModel):
1514         (WebCore::JSPannerNode::setDistanceModel):
1515         * bindings/js/JSPluginElementFunctions.cpp:
1516         (WebCore::pluginScriptObjectFromPluginViewBase):
1517         (WebCore::pluginScriptObject):
1518         (WebCore::pluginElementGetCallData):
1519         * bindings/js/JSPopStateEventCustom.cpp:
1520         (WebCore::JSPopStateEvent::state):
1521         * bindings/js/JSRTCStatsResponseCustom.cpp:
1522         (WebCore::JSRTCStatsResponse::nameGetter):
1523         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1524         (WebCore::JSSQLResultSetRowList::item):
1525         * bindings/js/JSSQLTransactionCustom.cpp:
1526         (WebCore::JSSQLTransaction::executeSql):
1527         * bindings/js/JSSVGLengthCustom.cpp:
1528         (WebCore::JSSVGLength::value):
1529         (WebCore::JSSVGLength::setValue):
1530         (WebCore::JSSVGLength::convertToSpecifiedUnits):
1531         * bindings/js/JSStorageCustom.cpp:
1532         (WebCore::JSStorage::nameGetter):
1533         (WebCore::JSStorage::deleteProperty):
1534         (WebCore::JSStorage::getOwnPropertyNames):
1535         (WebCore::JSStorage::putDelegate):
1536         * bindings/js/JSStyleSheetCustom.cpp:
1537         (WebCore::JSStyleSheet::visitAdditionalChildren):
1538         * bindings/js/JSStyleSheetListCustom.cpp:
1539         (WebCore::JSStyleSheetList::nameGetter):
1540         * bindings/js/JSSubtleCryptoCustom.cpp:
1541         (WebCore::JSSubtleCrypto::encrypt):
1542         (WebCore::JSSubtleCrypto::decrypt):
1543         (WebCore::JSSubtleCrypto::sign):
1544         (WebCore::JSSubtleCrypto::verify):
1545         (WebCore::JSSubtleCrypto::wrapKey):
1546         (WebCore::JSSubtleCrypto::unwrapKey):
1547         * bindings/js/JSTextTrackCueCustom.cpp:
1548         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
1549         (WebCore::JSTextTrackCue::visitAdditionalChildren):
1550         * bindings/js/JSTextTrackCustom.cpp:
1551         (WebCore::JSTextTrack::visitAdditionalChildren):
1552         (WebCore::JSTextTrack::setKind):
1553         (WebCore::JSTextTrack::setLanguage):
1554         * bindings/js/JSTextTrackListCustom.cpp:
1555         (WebCore::JSTextTrackList::visitAdditionalChildren):
1556         * bindings/js/JSTrackCustom.cpp:
1557         (WebCore::toTrack):
1558         * bindings/js/JSTrackEventCustom.cpp:
1559         (WebCore::JSTrackEvent::track):
1560         * bindings/js/JSTreeWalkerCustom.cpp:
1561         (WebCore::JSTreeWalker::visitAdditionalChildren):
1562         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
1563         (WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
1564         * bindings/js/JSVideoTrackCustom.cpp:
1565         (WebCore::JSVideoTrack::visitAdditionalChildren):
1566         (WebCore::JSVideoTrack::setKind):
1567         (WebCore::JSVideoTrack::setLanguage):
1568         * bindings/js/JSVideoTrackListCustom.cpp:
1569         (WebCore::JSVideoTrackList::visitAdditionalChildren):
1570         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1571         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
1572         (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
1573         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
1574         (WebCore::getObjectParameter):
1575         (WebCore::JSWebGLRenderingContextBase::visitAdditionalChildren):
1576         (WebCore::JSWebGLRenderingContextBase::getAttachedShaders):
1577         (WebCore::JSWebGLRenderingContextBase::getExtension):
1578         (WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter):
1579         (WebCore::JSWebGLRenderingContextBase::getParameter):
1580         (WebCore::JSWebGLRenderingContextBase::getProgramParameter):
1581         (WebCore::JSWebGLRenderingContextBase::getShaderParameter):
1582         (WebCore::JSWebGLRenderingContextBase::getSupportedExtensions):
1583         (WebCore::JSWebGLRenderingContextBase::getUniform):
1584         (WebCore::JSWebGLRenderingContextBase::uniform1fv):
1585         (WebCore::JSWebGLRenderingContextBase::uniform1iv):
1586         (WebCore::JSWebGLRenderingContextBase::uniform2fv):
1587         (WebCore::JSWebGLRenderingContextBase::uniform2iv):
1588         (WebCore::JSWebGLRenderingContextBase::uniform3fv):
1589         (WebCore::JSWebGLRenderingContextBase::uniform3iv):
1590         (WebCore::JSWebGLRenderingContextBase::uniform4fv):
1591         (WebCore::JSWebGLRenderingContextBase::uniform4iv):
1592         (WebCore::JSWebGLRenderingContextBase::uniformMatrix2fv):
1593         (WebCore::JSWebGLRenderingContextBase::uniformMatrix3fv):
1594         (WebCore::JSWebGLRenderingContextBase::uniformMatrix4fv):
1595         (WebCore::JSWebGLRenderingContextBase::vertexAttrib1fv):
1596         (WebCore::JSWebGLRenderingContextBase::vertexAttrib2fv):
1597         (WebCore::JSWebGLRenderingContextBase::vertexAttrib3fv):
1598         (WebCore::JSWebGLRenderingContextBase::vertexAttrib4fv):
1599         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1600         (WebCore::JSWebGLRenderingContext::visitAdditionalChildren):
1601         * bindings/js/JSWorkerCustom.cpp:
1602         (WebCore::JSWorker::postMessage):
1603         (WebCore::constructJSWorker):
1604         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1605         (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
1606         (WebCore::JSWorkerGlobalScopeBase::scriptExecutionContext):
1607         * bindings/js/JSWorkerGlobalScopeBase.h:
1608         (WebCore::JSWorkerGlobalScopeBase::wrapped):
1609         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1610         (WebCore::JSWorkerGlobalScope::visitAdditionalChildren):
1611         (WebCore::JSWorkerGlobalScope::importScripts):
1612         (WebCore::JSWorkerGlobalScope::setTimeout):
1613         (WebCore::JSWorkerGlobalScope::setInterval):
1614         * bindings/js/JSXMLHttpRequestCustom.cpp:
1615         (WebCore::JSXMLHttpRequest::visitAdditionalChildren):
1616         (WebCore::JSXMLHttpRequest::open):
1617         (WebCore::JSXMLHttpRequest::send):
1618         (WebCore::JSXMLHttpRequest::responseText):
1619         (WebCore::JSXMLHttpRequest::response):
1620         * bindings/js/JSXPathResultCustom.cpp:
1621         (WebCore::JSXPathResult::visitAdditionalChildren):
1622         * bindings/js/JSXSLTProcessorCustom.cpp:
1623         (WebCore::JSXSLTProcessor::setParameter):
1624         (WebCore::JSXSLTProcessor::getParameter):
1625         (WebCore::JSXSLTProcessor::removeParameter):
1626         * bindings/js/ScheduledAction.cpp:
1627         (WebCore::ScheduledAction::execute):
1628         * bindings/js/ScriptCachedFrameData.cpp:
1629         (WebCore::ScriptCachedFrameData::restore):
1630         * bindings/js/ScriptController.cpp:
1631         (WebCore::ScriptController::clearWindowShell):
1632         (WebCore::ScriptController::collectIsolatedContexts):
1633         * bindings/js/ScriptState.cpp:
1634         (WebCore::domWindowFromExecState):
1635         * bindings/objc/DOM.mm:
1636         (+[DOMNode _nodeFromJSWrapper:]):
1637         * bindings/objc/DOMUtility.mm:
1638         (JSC::createDOMWrapper):
1639         * bindings/objc/WebScriptObject.mm:
1640         (-[WebScriptObject _isSafeScript]):
1641         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1642         * bindings/scripts/CodeGeneratorJS.pm:
1643         (GenerateGetOwnPropertySlotBody):
1644         (GenerateHeader):
1645         (GetIndexedGetterExpression):
1646         (GenerateImplementation):
1647         (NativeToJSValue):
1648         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1649         (WebCore::jsTestActiveDOMObjectExcitingAttr):
1650         (WebCore::jsTestActiveDOMObjectConstructor):
1651         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
1652         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
1653         (WebCore::JSTestActiveDOMObjectOwner::finalize):
1654         (WebCore::JSTestActiveDOMObject::toWrapped):
1655         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1656         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
1657         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
1658         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1659         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
1660         (WebCore::JSTestCustomNamedGetterOwner::finalize):
1661         (WebCore::JSTestCustomNamedGetter::toWrapped):
1662         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1663         (WebCore::jsTestEventConstructorAttr1):
1664         (WebCore::jsTestEventConstructorAttr2):
1665         (WebCore::JSTestEventConstructorOwner::finalize):
1666         (WebCore::JSTestEventConstructor::toWrapped):
1667         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1668         (WebCore::JSTestEventTarget::getOwnPropertySlot):
1669         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
1670         (WebCore::JSTestEventTarget::getOwnPropertyNames):
1671         (WebCore::jsTestEventTargetPrototypeFunctionItem):
1672         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
1673         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
1674         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
1675         (WebCore::JSTestEventTarget::visitChildren):
1676         (WebCore::JSTestEventTargetOwner::isReachableFromOpaqueRoots):
1677         (WebCore::JSTestEventTargetOwner::finalize):
1678         (WebCore::JSTestEventTarget::toWrapped):
1679         * bindings/scripts/test/JS/JSTestException.cpp:
1680         (WebCore::jsTestExceptionName):
1681         (WebCore::JSTestExceptionOwner::finalize):
1682         (WebCore::JSTestException::toWrapped):
1683         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1684         (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots):
1685         (WebCore::JSTestGenerateIsReachableOwner::finalize):
1686         (WebCore::JSTestGenerateIsReachable::toWrapped):
1687         * bindings/scripts/test/JS/JSTestInterface.cpp:
1688         (WebCore::jsTestInterfaceImplementsStr1):
1689         (WebCore::jsTestInterfaceImplementsStr2):
1690         (WebCore::jsTestInterfaceImplementsNode):
1691         (WebCore::jsTestInterfaceSupplementalStr1):
1692         (WebCore::jsTestInterfaceSupplementalStr2):
1693         (WebCore::jsTestInterfaceSupplementalNode):
1694         (WebCore::setJSTestInterfaceImplementsStr2):
1695         (WebCore::setJSTestInterfaceImplementsNode):
1696         (WebCore::setJSTestInterfaceSupplementalStr2):
1697         (WebCore::setJSTestInterfaceSupplementalNode):
1698         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
1699         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
1700         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
1701         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
1702         (WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots):
1703         (WebCore::JSTestInterfaceOwner::finalize):
1704         (WebCore::JSTestInterface::toWrapped):
1705         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1706         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
1707         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
1708         (WebCore::JSTestMediaQueryListListener::toWrapped):
1709         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1710         (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots):
1711         (WebCore::JSTestNamedConstructorOwner::finalize):
1712         (WebCore::JSTestNamedConstructor::toWrapped):
1713         * bindings/scripts/test/JS/JSTestNode.cpp:
1714         (WebCore::jsTestNodeName):
1715         (WebCore::setJSTestNodeName):
1716         (WebCore::JSTestNode::visitChildren):
1717         * bindings/scripts/test/JS/JSTestNode.h:
1718         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1719         (WebCore::jsTestNondeterministicNondeterministicReadonlyAttr):
1720         (WebCore::jsTestNondeterministicNondeterministicWriteableAttr):
1721         (WebCore::jsTestNondeterministicNondeterministicExceptionAttr):
1722         (WebCore::jsTestNondeterministicNondeterministicGetterExceptionAttr):
1723         (WebCore::jsTestNondeterministicNondeterministicSetterExceptionAttr):
1724         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
1725         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
1726         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
1727         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
1728         (WebCore::jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction):
1729         (WebCore::JSTestNondeterministicOwner::finalize):
1730         (WebCore::JSTestNondeterministic::toWrapped):
1731         * bindings/scripts/test/JS/JSTestObj.cpp:
1732         (WebCore::jsTestObjReadOnlyLongAttr):
1733         (WebCore::jsTestObjReadOnlyStringAttr):
1734         (WebCore::jsTestObjReadOnlyTestObjAttr):
1735         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
1736         (WebCore::jsTestObjEnumAttr):
1737         (WebCore::jsTestObjByteAttr):
1738         (WebCore::jsTestObjOctetAttr):
1739         (WebCore::jsTestObjShortAttr):
1740         (WebCore::jsTestObjUnsignedShortAttr):
1741         (WebCore::jsTestObjLongAttr):
1742         (WebCore::jsTestObjLongLongAttr):
1743         (WebCore::jsTestObjUnsignedLongLongAttr):
1744         (WebCore::jsTestObjStringAttr):
1745         (WebCore::jsTestObjTestObjAttr):
1746         (WebCore::jsTestObjXMLObjAttr):
1747         (WebCore::jsTestObjCreate):
1748         (WebCore::jsTestObjReflectedStringAttr):
1749         (WebCore::jsTestObjReflectedIntegralAttr):
1750         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
1751         (WebCore::jsTestObjReflectedBooleanAttr):
1752         (WebCore::jsTestObjReflectedURLAttr):
1753         (WebCore::jsTestObjReflectedCustomIntegralAttr):
1754         (WebCore::jsTestObjReflectedCustomBooleanAttr):
1755         (WebCore::jsTestObjReflectedCustomURLAttr):
1756         (WebCore::jsTestObjTypedArrayAttr):
1757         (WebCore::jsTestObjAttrWithGetterException):
1758         (WebCore::jsTestObjAttrWithSetterException):
1759         (WebCore::jsTestObjStringAttrWithGetterException):
1760         (WebCore::jsTestObjStringAttrWithSetterException):
1761         (WebCore::jsTestObjStrictTypeCheckingAttribute):
1762         (WebCore::jsTestObjOnfoo):
1763         (WebCore::jsTestObjWithScriptStateAttribute):
1764         (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute):
1765         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
1766         (WebCore::jsTestObjWithScriptStateAttributeRaises):
1767         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
1768         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
1769         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
1770         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
1771         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
1772         (WebCore::jsTestObjConditionalAttr1):
1773         (WebCore::jsTestObjConditionalAttr2):
1774         (WebCore::jsTestObjConditionalAttr3):
1775         (WebCore::jsTestObjCachedAttribute1):
1776         (WebCore::jsTestObjCachedAttribute2):
1777         (WebCore::jsTestObjAnyAttribute):
1778         (WebCore::jsTestObjContentDocument):
1779         (WebCore::jsTestObjMutablePoint):
1780         (WebCore::jsTestObjImmutablePoint):
1781         (WebCore::jsTestObjStrawberry):
1782         (WebCore::jsTestObjStrictFloat):
1783         (WebCore::jsTestObjDescription):
1784         (WebCore::jsTestObjId):
1785         (WebCore::jsTestObjHash):
1786         (WebCore::jsTestObjReplaceableAttribute):
1787         (WebCore::jsTestObjNullableDoubleAttribute):
1788         (WebCore::jsTestObjNullableLongAttribute):
1789         (WebCore::jsTestObjNullableBooleanAttribute):
1790         (WebCore::jsTestObjNullableStringAttribute):
1791         (WebCore::jsTestObjNullableLongSettableAttribute):
1792         (WebCore::jsTestObjNullableStringValue):
1793         (WebCore::jsTestObjAttribute):
1794         (WebCore::jsTestObjAttributeWithReservedEnumType):
1795         (WebCore::jsTestObjPutForwardsAttribute):
1796         (WebCore::jsTestObjPutForwardsNullableAttribute):
1797         (WebCore::setJSTestObjEnumAttr):
1798         (WebCore::setJSTestObjByteAttr):
1799         (WebCore::setJSTestObjOctetAttr):
1800         (WebCore::setJSTestObjShortAttr):
1801         (WebCore::setJSTestObjUnsignedShortAttr):
1802         (WebCore::setJSTestObjLongAttr):
1803         (WebCore::setJSTestObjLongLongAttr):
1804         (WebCore::setJSTestObjUnsignedLongLongAttr):
1805         (WebCore::setJSTestObjStringAttr):
1806         (WebCore::setJSTestObjTestObjAttr):
1807         (WebCore::setJSTestObjXMLObjAttr):
1808         (WebCore::setJSTestObjCreate):
1809         (WebCore::setJSTestObjReflectedStringAttr):
1810         (WebCore::setJSTestObjReflectedIntegralAttr):
1811         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
1812         (WebCore::setJSTestObjReflectedBooleanAttr):
1813         (WebCore::setJSTestObjReflectedURLAttr):
1814         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
1815         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
1816         (WebCore::setJSTestObjReflectedCustomURLAttr):
1817         (WebCore::setJSTestObjTypedArrayAttr):
1818         (WebCore::setJSTestObjAttrWithGetterException):
1819         (WebCore::setJSTestObjAttrWithSetterException):
1820         (WebCore::setJSTestObjStringAttrWithGetterException):
1821         (WebCore::setJSTestObjStringAttrWithSetterException):
1822         (WebCore::setJSTestObjStrictTypeCheckingAttribute):
1823         (WebCore::setJSTestObjOnfoo):
1824         (WebCore::setJSTestObjWithScriptStateAttribute):
1825         (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttribute):
1826         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
1827         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
1828         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
1829         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
1830         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
1831         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
1832         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
1833         (WebCore::setJSTestObjConditionalAttr1):
1834         (WebCore::setJSTestObjConditionalAttr2):
1835         (WebCore::setJSTestObjConditionalAttr3):
1836         (WebCore::setJSTestObjAnyAttribute):
1837         (WebCore::setJSTestObjMutablePoint):
1838         (WebCore::setJSTestObjImmutablePoint):
1839         (WebCore::setJSTestObjStrawberry):
1840         (WebCore::setJSTestObjStrictFloat):
1841         (WebCore::setJSTestObjId):
1842         (WebCore::setJSTestObjNullableLongSettableAttribute):
1843         (WebCore::setJSTestObjNullableStringValue):
1844         (WebCore::setJSTestObjAttributeWithReservedEnumType):
1845         (WebCore::setJSTestObjPutForwardsAttribute):
1846         (WebCore::setJSTestObjPutForwardsNullableAttribute):
1847         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
1848         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1849         (WebCore::jsTestObjPrototypeFunctionByteMethod):
1850         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
1851         (WebCore::jsTestObjPrototypeFunctionOctetMethod):
1852         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
1853         (WebCore::jsTestObjPrototypeFunctionLongMethod):
1854         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
1855         (WebCore::jsTestObjPrototypeFunctionObjMethod):
1856         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1857         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
1858         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
1859         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
1860         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
1861         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
1862         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
1863         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
1864         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
1865         (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
1866         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
1867         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
1868         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
1869         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
1870         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
1871         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
1872         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
1873         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
1874         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
1875         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
1876         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
1877         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
1878         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue):
1879         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
1880         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
1881         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
1882         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue):
1883         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
1884         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
1885         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
1886         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1887         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
1888         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
1889         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
1890         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
1891         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
1892         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
1893         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
1894         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1895         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1896         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
1897         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1898         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
1899         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
1900         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1901         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
1902         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
1903         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
1904         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
1905         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
1906         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
1907         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
1908         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
1909         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
1910         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
1911         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
1912         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
1913         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2):
1914         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
1915         (WebCore::jsTestObjPrototypeFunctionConvert1):
1916         (WebCore::jsTestObjPrototypeFunctionConvert2):
1917         (WebCore::jsTestObjPrototypeFunctionConvert4):
1918         (WebCore::jsTestObjPrototypeFunctionConvert5):
1919         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
1920         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
1921         (WebCore::jsTestObjPrototypeFunctionOrange):
1922         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
1923         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
1924         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
1925         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
1926         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
1927         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
1928         (WebCore::jsTestObjPrototypeFunctionAny):
1929         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
1930         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
1931         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
1932         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
1933         (WebCore::JSTestObjOwner::finalize):
1934         (WebCore::JSTestObj::toWrapped):
1935         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1936         (WebCore::JSTestOverloadedConstructorsOwner::finalize):
1937         (WebCore::JSTestOverloadedConstructors::toWrapped):
1938         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1939         (WebCore::JSTestOverrideBuiltins::getOwnPropertyNames):
1940         (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
1941         (WebCore::JSTestOverrideBuiltinsOwner::finalize):
1942         (WebCore::JSTestOverrideBuiltins::toWrapped):
1943         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1944         (WebCore::jsTestSerializedScriptValueInterfaceValue):
1945         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
1946         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
1947         (WebCore::jsTestSerializedScriptValueInterfacePorts):
1948         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
1949         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
1950         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
1951         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
1952         (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
1953         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1954         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
1955         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
1956         (WebCore::jsTestTypedefsAttrWithGetterException):
1957         (WebCore::jsTestTypedefsAttrWithSetterException):
1958         (WebCore::jsTestTypedefsStringAttrWithGetterException):
1959         (WebCore::jsTestTypedefsStringAttrWithSetterException):
1960         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
1961         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
1962         (WebCore::setJSTestTypedefsAttrWithGetterException):
1963         (WebCore::setJSTestTypedefsAttrWithSetterException):
1964         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
1965         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
1966         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
1967         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
1968         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
1969         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
1970         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
1971         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
1972         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
1973         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
1974         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
1975         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
1976         (WebCore::JSTestTypedefsOwner::finalize):
1977         (WebCore::JSTestTypedefs::toWrapped):
1978         * bindings/scripts/test/JS/JSattribute.cpp:
1979         (WebCore::jsattributeReadonly):
1980         (WebCore::JSattributeOwner::finalize):
1981         (WebCore::JSattribute::toWrapped):
1982         * bindings/scripts/test/JS/JSreadonly.cpp:
1983         (WebCore::JSreadonlyOwner::finalize):
1984         (WebCore::JSreadonly::toWrapped):
1985         * bridge/runtime_method.cpp:
1986         (JSC::callRuntimeMethod):
1987         * inspector/InspectorController.cpp:
1988         (WebCore::InspectorController::canAccessInspectedScriptState):
1989
1990 2015-11-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1991
1992         IDL functions and attributes should be JSBuiltin by default if interface is marked as JSBuiltinConstructor
1993         https://bugs.webkit.org/show_bug.cgi?id=150438
1994
1995         Reviewed by Darin Adler.
1996
1997         Binding generator is now deducing that function/attribute is JSBuiltin if the interface is marked as JSBuiltin.
1998         One exception is custom setters, getters or functions which remain C++ handled.
1999         Updated streams API IDLs accordingly.
2000
2001         Binding generator knows whether class needs a DOM class by checking whether the interface is marked as JSBuiltin.
2002         Binding generator knows that class uses a JS built-in constructor if marked as JSBuiltin+Constructor.
2003         In particular, JSBuiltIn+CustomConstructor means that a DOM class is not needed and constructor is not JS built-in.
2004
2005         Applied JSBuiltin+CustomConstructor to ReadableStreamReader and ReadableStreamController.
2006         Removing ReadableStreamReader and ReadableStreamController classes.
2007
2008         Removed unneeded "Default" keyword for cancel function in WebIDL.
2009
2010         Added a binding test case.
2011         No change in behavior.
2012
2013         * Modules/streams/ByteLengthQueuingStrategy.idl: Marking interface as JSBuiltin and Constructable.
2014         * Modules/streams/CountQueuingStrategy.idl: Ditto.
2015         * Modules/streams/ReadableStream.idl: Ditto.
2016         * Modules/streams/ReadableStreamController.h: Removed.
2017         * Modules/streams/ReadableStreamController.idl: Marking interface as JSBuiltin and Constructable.
2018         * Modules/streams/ReadableStreamReader.h: Removed.
2019         * Modules/streams/ReadableStreamReader.idl: Marking interface as JSBuiltin and Constructable.
2020         * Modules/streams/WritableStream.idl: Ditto.
2021         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
2022         (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject): Updated according new constructor.
2023         (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject): Ditto.
2024         * bindings/scripts/CodeGeneratorJS.pm:
2025         (NeedsImplementationClass):
2026         (GetAttributeGetterName):
2027         (GetAttributeSetterName):
2028         (GetFunctionName):
2029         (InstanceNeedsVisitChildren):
2030         (GenerateHeader):
2031         (GenerateAttributesHashTable):
2032         (GenerateImplementation):
2033         (GetConstructorTemplateClassName):
2034         (GenerateConstructorDefinition):
2035         (GenerateConstructorHelperMethods):
2036         (IsConstructable):
2037         (ComputeFunctionSpecial):
2038         (IsJSBuiltin):
2039         (IsJSBuiltinConstructor):
2040         (AddJSBuiltinIncludesIfNeeded):
2041         (GetJSBuiltinFunctionName): Deleted.
2042         (GetJSBuiltinFunctionNameFromString): Deleted.
2043         (GetJSBuiltinScopeName): Deleted.
2044         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.cpp:
2045         (webkit_dom_test_js_builtin_constructor_set_property):
2046         (webkit_dom_test_js_builtin_constructor_get_property):
2047         (webkit_dom_test_js_builtin_constructor_class_init):
2048         (webkit_dom_test_js_builtin_constructor_test_function):
2049         (webkit_dom_test_js_builtin_constructor_get_test_attribute):
2050         (webkit_dom_test_js_builtin_constructor_set_test_attribute):
2051         * bindings/scripts/test/GObject/WebKitDOMTestJSBuiltinConstructor.h:
2052         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2053         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
2054         (WebCore::JSTestJSBuiltinConstructor::getOwnPropertySlot):
2055         (WebCore::jsTestJSBuiltinConstructorTestAttribute):
2056         (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
2057         (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
2058         (WebCore::setJSTestJSBuiltinConstructorTestAttribute):
2059         (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
2060         (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestFunction):
2061         (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction):
2062         (WebCore::JSTestJSBuiltinConstructorOwner::isReachableFromOpaqueRoots):
2063         (WebCore::JSTestJSBuiltinConstructorOwner::finalize):
2064         (WebCore::toJSNewlyCreated):
2065         (WebCore::toJS):
2066         (WebCore::JSTestJSBuiltinConstructor::toWrapped):
2067         (WebCore::JSTestJSBuiltinConstructorPrototype::createStructure): Deleted.
2068         (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties): Deleted.
2069         (WebCore::JSTestJSBuiltinConstructor::createPrototype): Deleted.
2070         (WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.
2071         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
2072         (WebCore::JSTestJSBuiltinConstructor::create):
2073         (WebCore::JSTestJSBuiltinConstructor::finishCreation):
2074         (WebCore::wrapperOwner):
2075         (WebCore::toJS):
2076         (WebCore::JSTestJSBuiltinConstructor::createStructure): Deleted.
2077         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h:
2078         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm:
2079         (-[DOMTestJSBuiltinConstructor testAttribute]):
2080         (-[DOMTestJSBuiltinConstructor setTestAttribute:]):
2081         (-[DOMTestJSBuiltinConstructor testAttributeCustom]):
2082         (-[DOMTestJSBuiltinConstructor testAttributeRWCustom]):
2083         (-[DOMTestJSBuiltinConstructor setTestAttributeRWCustom:]):
2084         (-[DOMTestJSBuiltinConstructor testFunction]):
2085         (-[DOMTestJSBuiltinConstructor testCustomFunction]):
2086         * bindings/scripts/test/TestJSBuiltinConstructor.idl:
2087
2088 2015-10-29  Sergio Villar Senin  <svillar@igalia.com>
2089
2090         [CSS Grid Layout] min-content row does not always shrink
2091         https://bugs.webkit.org/show_bug.cgi?id=144581
2092
2093         Reviewed by Zalan Bujtas.
2094
2095         Grid items height must be recomputed whenever the grid tracks
2096         change if the items had been previously stretched. In those
2097         cases we have to clear the override height and layout the item
2098         with the new row size.
2099
2100         Tests: fast/css-grid-layout/min-content-row-must-shrink-when-column-grows.html
2101                fast/css-grid-layout/relayout-indefinite-heights.html
2102
2103         * rendering/RenderGrid.cpp:
2104         (WebCore::RenderGrid::logicalContentHeightForChild):
2105
2106 2015-11-01  Brady Eidson  <beidson@apple.com>
2107
2108         Modern IDB: IBDObjectStore.count() support.
2109         https://bugs.webkit.org/show_bug.cgi?id=150785
2110
2111         Reviewed by Darin Adler.
2112
2113         Tests: storage/indexeddb/modern/idbobjectstore-count-1.html
2114                storage/indexeddb/modern/idbobjectstore-count-failures.html
2115
2116         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2117         (WebCore::IDBClient::IDBConnectionToServer::getCount):
2118         (WebCore::IDBClient::IDBConnectionToServer::didGetCount):
2119         * Modules/indexeddb/client/IDBConnectionToServer.h:
2120         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2121         
2122         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2123         (WebCore::IDBClient::IDBObjectStore::count):
2124         (WebCore::IDBClient::IDBObjectStore::doCount):
2125         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
2126         
2127         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2128         (WebCore::IDBClient::IDBRequest::setResult):
2129         * Modules/indexeddb/client/IDBRequestImpl.h:
2130         
2131         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2132         (WebCore::IDBClient::IDBTransaction::requestCount):
2133         (WebCore::IDBClient::IDBTransaction::getCountOnServer):
2134         (WebCore::IDBClient::IDBTransaction::didGetCountOnServer):
2135         * Modules/indexeddb/client/IDBTransactionImpl.h:
2136         
2137         * Modules/indexeddb/server/IDBBackingStore.h:
2138         
2139         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2140         (WebCore::IDBServer::IDBConnectionToClient::didGetCount):
2141         * Modules/indexeddb/server/IDBConnectionToClient.h:
2142         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2143         
2144         * Modules/indexeddb/server/IDBServer.cpp:
2145         (WebCore::IDBServer::IDBServer::getCount):
2146         * Modules/indexeddb/server/IDBServer.h:
2147         
2148         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2149         (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
2150         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2151         
2152         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2153         (WebCore::IDBServer::MemoryObjectStore::countForKeyRange):
2154         (WebCore::IDBServer::MemoryObjectStore::valueForKeyRange):
2155         (WebCore::IDBServer::MemoryObjectStore::lowestKeyWithRecordInRange):
2156         * Modules/indexeddb/server/MemoryObjectStore.h:
2157         
2158         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2159         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback):
2160         (WebCore::IDBServer::UniqueIDBDatabase::getCount):
2161         (WebCore::IDBServer::UniqueIDBDatabase::performGetCount):
2162         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetCount):
2163         (WebCore::IDBServer::UniqueIDBDatabase::performCountCallback):
2164         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2165         
2166         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2167         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
2168         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
2169         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2170         
2171         * Modules/indexeddb/shared/IDBResultData.cpp:
2172         (WebCore::IDBResultData::IDBResultData):
2173         (WebCore::IDBResultData::getCountSuccess):
2174         * Modules/indexeddb/shared/IDBResultData.h:
2175         (WebCore::IDBResultData::resultInteger):
2176         
2177         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2178         (WebCore::InProcessIDBServer::didGetCount):
2179         (WebCore::InProcessIDBServer::getCount):
2180         * Modules/indexeddb/shared/InProcessIDBServer.h:
2181
2182 2015-11-01  Darin Adler  <darin@apple.com>
2183
2184         Tidy handling of type=color in HTMLInputElement a bit
2185         https://bugs.webkit.org/show_bug.cgi?id=150786
2186
2187         Reviewed by Andreas Kling.
2188
2189         * html/ColorInputType.cpp: Fix formatting.
2190         (WebCore::ColorInputType::fallbackValue): Use ASCIILiteral for slightly
2191         better performance.
2192         (WebCore::ColorInputType::sanitizeValue): Use convertToASCIILowercase,
2193         since there is no need for the general purpose Unicode lowercasing here;
2194         those non-ASCII characters aren't allowed by isValidColorString.
2195         (WebCore::ColorInputType::suggestions): Rewrote data list code to remove
2196         peculiarities such as using a null check to terminate the loop instead of
2197         the collection length, calling back to HTMLInputElement just to get the
2198         isValidColorString function called. Also used reserveInitialCapacity and
2199         uncheckedAppend for better memory use in the result vector.
2200         (WebCore::ColorInputType::selectColor): Added.
2201
2202         * html/ColorInputType.h: Made derivation from ColorChooserClient private.
2203         Made most functions private. Added overrides for valueAsColor and selectColor,
2204         now both virtual functions in InputType.
2205
2206         * html/HTMLInputElement.cpp: Removed now-unneeded include of ColorInputType.h.
2207         (WebCore::HTMLInputElement::valueAsColor): Added. Calls through to the InputType.
2208         In a later patch, will be used by accessibility code to get the color so it
2209         does not have to replicate the color parsing logic from this element.
2210         (WebCore::HTMLInputElement::selectColor): Renamed from selectColorInColorChooser,
2211         because the longer name is not clearer. Also made this non-conditional.
2212
2213         * html/HTMLInputElement.h: Added valueAsColor, renamed selectColorInColorChooser
2214         to selectColor and made it available unconditionally.
2215
2216         * html/InputType.cpp:
2217         (WebCore::InputType::valueAsColor): Added. Returns transparent color.
2218         (WebCore::InputType::selectColor): Added. Does nothing by default.
2219
2220         * html/InputType.h: Added virtual valueAsColor and selectColor. Also tidied
2221         up the header a bit and removed unneeded Noncopyable (since this class has
2222         a reference for one of the data members and so is intrinsically not copyable).
2223         Made isColorControl available unconditionally.
2224
2225         * testing/Internals.cpp:
2226         (WebCore::Internals::selectColorInColorChooser): Removed conditionals and
2227         made this call selectColor rather than selectColorInColorChooser.
2228
2229         * testing/Internals.h: Made selectColorInColorChooser unconditional.
2230
2231         * testing/Internals.idl: Made selectColorInColorChooser unconditionally
2232         present. Not important to optimize the test internals class by leaving it
2233         out when INPUT_TYPE_COLOR is not enabled.
2234
2235 2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
2236
2237         [ES6] Support Generator Syntax
2238         https://bugs.webkit.org/show_bug.cgi?id=150769
2239
2240         Reviewed by Geoffrey Garen.
2241
2242         Added ENABLE_ES6_GENERATORS flag.
2243
2244         * Configurations/FeatureDefines.xcconfig:
2245
2246 2015-11-01  Myles C. Maxfield  <mmaxfield@apple.com>
2247
2248         Clean up some CSS & Font code
2249         https://bugs.webkit.org/show_bug.cgi?id=150767
2250
2251         Reviewed by Darin Adler.
2252
2253         This patch migrates some CSS code to use references instead of pointers.
2254         It also migrates some Font code to use RefPtr instead of PassRefPtr.
2255
2256         No new tests because there is no behavior change.
2257
2258         * css/CSSDefaultStyleSheets.cpp:
2259         (WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle):
2260         (WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle):
2261         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2262         * css/CSSFontSelector.cpp:
2263         (WebCore::createFontFace):
2264         (WebCore::CSSFontSelector::addFontFaceRule):
2265         * css/CSSFontSelector.h:
2266         * css/DocumentRuleSets.cpp:
2267         (WebCore::DocumentRuleSets::initUserStyle):
2268         (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets):
2269         (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
2270         * css/RuleSet.cpp:
2271         (WebCore::RuleSet::addChildRules):
2272         (WebCore::RuleSet::addRulesFromSheet):
2273         * css/RuleSet.h:
2274         * css/StyleInvalidationAnalysis.cpp:
2275         (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
2276         * platform/graphics/Font.cpp:
2277         (WebCore::Font::verticalRightOrientationFont):
2278         (WebCore::Font::uprightOrientationFont):
2279         (WebCore::Font::smallCapsFont):
2280         (WebCore::Font::emphasisMarkFont):
2281         (WebCore::Font::brokenIdeographFont):
2282         (WebCore::Font::nonSyntheticItalicFont):
2283         (WebCore::Font::createScaledFont):
2284         * platform/graphics/Font.h:
2285         (WebCore::Font::variantFont):
2286         * platform/graphics/cocoa/FontCocoa.mm:
2287         (WebCore::Font::platformCreateScaledFont):
2288         * svg/SVGFontFaceElement.h:
2289
2290 2015-11-01  Darin Adler  <darin@apple.com>
2291
2292         Remove some dead and unneeded code (ScrollbarThemeSafari, RenderThemeSafari, OPENCL, a little color space logic)
2293         https://bugs.webkit.org/show_bug.cgi?id=150783
2294
2295         Reviewed by Tim Horton.
2296
2297         * PlatformWinCairo.cmake: Removed ScrollbarThemeSafari.cpp, no reason to compile it.
2298
2299         * platform/graphics/ca/GraphicsLayerCA.cpp:
2300         (WebCore::GraphicsLayerCA::setContentsToImage): Removed the code that set a color space
2301         on an image if it's set to device color space. This has been dead code for many releases
2302         of OS X and iOS at this point.
2303
2304         * platform/graphics/filters/FEColorMatrix.h: Removed some ENABLE(OPENCL)-only code.
2305         * platform/graphics/filters/FEFlood.h: Ditto.
2306         * platform/graphics/filters/FEMerge.h: Ditto.
2307         * platform/graphics/filters/FETurbulence.h: Ditto.
2308         * platform/graphics/filters/FilterEffect.cpp:
2309         (WebCore::FilterEffect::applyAll): Removed.
2310         (WebCore::FilterEffect::apply): Removed ENABLE(OPENCL)-only code.
2311         (WebCore::FilterEffect::platformApplyOpenCL): Removed.
2312         (WebCore::FilterEffect::clearResult): Removed ENABLE(OPENCL)-only code.
2313         (WebCore::FilterEffect::asImageBuffer): Ditto.
2314         (WebCore::FilterEffect::openCLImageToImageBuffer): Removed.
2315         (WebCore::FilterEffect::createOpenCLImageResult): Removed.
2316         (WebCore::FilterEffect::transformResultColorSpace): Removed ENABLE(OPENCL)-only code.
2317
2318         * platform/graphics/filters/FilterEffect.h: Removed ENABLE(OPENCL)-only code.
2319         * platform/graphics/filters/SourceAlpha.h: Ditto.
2320         * platform/graphics/filters/SourceGraphic.h: Ditto.
2321
2322         * platform/win/ScrollbarThemeSafari.cpp: Removed.
2323         * platform/win/ScrollbarThemeSafari.h: Removed.
2324
2325         * rendering/RenderThemeMac.mm: Removed an obsolete comment.
2326
2327         * rendering/RenderThemeSafari.cpp: Removed.
2328         * rendering/RenderThemeSafari.h: Removed.
2329
2330         * svg/graphics/filters/SVGFEImage.h: Removed ENABLE(OPENCL)-only code.
2331
2332 2015-11-01  Andreas Kling  <akling@apple.com>
2333
2334         Move the ResourceUsageOverlay out of the way by default.
2335         <https://webkit.org/b/150776>
2336
2337         Reviewed by Darin Adler.
2338
2339         Have the ResourceUsageOverlay show up in the bottom center of the viewport
2340         by default, instead of the top left. This way, you won't have to drag it
2341         out of the way all the time.
2342
2343         * page/ResourceUsageOverlay.cpp:
2344         (WebCore::ResourceUsageOverlay::ResourceUsageOverlay):
2345         (WebCore::ResourceUsageOverlay::initialize):
2346         * page/ResourceUsageOverlay.h:
2347         * page/cocoa/ResourceUsageOverlayCocoa.mm:
2348         (WebCore::ResourceUsageOverlay::platformInitialize):
2349
2350 2015-11-01  Philip Chimento  <philip.chimento@gmail.com>
2351
2352         [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)
2353         https://bugs.webkit.org/show_bug.cgi?id=144560
2354
2355         Reviewed by Darin Adler.
2356
2357         * platform/graphics/PlatformDisplay.cpp: Only include the
2358         X11-specific GDK header on PLATFORM(X11). In other cases the
2359         normal gdk.h header is needed, which would otherwise be pulled in
2360         by gdkx.h.
2361         * platform/graphics/opentype/OpenTypeMathData.cpp: Change check
2362         for FourCharCode type from OS(DARWIN) to PLATFORM(COCOA). We
2363         can't remove it altogether because OT_MAKE_TAG doesn't work for
2364         all platforms.
2365
2366 2015-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2367
2368         [GTK] Use RunLoop::Timer in main thread shared timer GTK+ implementation
2369         https://bugs.webkit.org/show_bug.cgi?id=150754
2370
2371         Reviewed by Darin Adler.
2372
2373         It's more efficient because it uses a persistent source and it
2374         simplifies the code even more.
2375
2376         * platform/MainThreadSharedTimer.cpp:
2377         (WebCore::MainThreadSharedTimer::fired): Make it non-const to be
2378         able to use it as function callback of a RunLoop::Timer.
2379         * platform/MainThreadSharedTimer.h:
2380         * platform/gtk/MainThreadSharedTimerGtk.cpp:
2381         (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
2382         Initialize the RunLoop::Timer and set the prioriry.
2383         (WebCore::MainThreadSharedTimer::setFireInterval):
2384         (WebCore::MainThreadSharedTimer::stop):
2385
2386 2015-10-31  Andreas Kling  <akling@apple.com>
2387
2388         Add a debug overlay with information about web process resource usage.
2389         <https://webkit.org/b/150599>
2390
2391         Unreviewed follow-up to r191849.
2392
2393         Add missing call to uninstall the PageOverlay if the ResourceUsageOverlay is being
2394         disabled through the setting. This way you don't end up with an unremovable overlay
2395         in the MiniBrowser.
2396
2397         * page/ResourceUsageOverlay.cpp:
2398         (WebCore::ResourceUsageOverlay::~ResourceUsageOverlay):
2399
2400 2015-10-31  Brady Eidson  <beidson@apple.com>
2401
2402         IDB: Date objects don't work as keys or values.
2403         https://bugs.webkit.org/show_bug.cgi?id=150743
2404
2405         Reviewed by Darin Adler.
2406
2407         Test: storage/indexeddb/modern/date-basic.html
2408
2409         The combination of the autogenerated bindings with Deprecated::ScriptValue was
2410         losing the fidelity of "Date" objects being Dates, and not just normal Objects.
2411         
2412         This was breaking their usage as IDBKeys.
2413         
2414         Custom binding + reworking the IDBObjectStore IDLs to use JSValue instead of ScriptValue
2415         fixes this handily.
2416         
2417         * Modules/indexeddb/IDBObjectStore.h:
2418         * Modules/indexeddb/IDBObjectStore.idl:
2419         
2420         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2421         (WebCore::IDBClient::IDBObjectStore::add):
2422         (WebCore::IDBClient::IDBObjectStore::put):
2423         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
2424         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
2425         
2426         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
2427         (WebCore::LegacyObjectStore::add):
2428         (WebCore::LegacyObjectStore::put):
2429         * Modules/indexeddb/legacy/LegacyObjectStore.h:
2430         
2431         * bindings/js/IDBBindingUtilities.cpp:
2432         (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
2433         (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath):
2434         (WebCore::canInjectIDBKeyIntoScriptValue):
2435         (WebCore::scriptValueToIDBKey):
2436         * bindings/js/IDBBindingUtilities.h:
2437
2438         * bindings/js/JSIDBObjectStoreCustom.cpp:
2439         (WebCore::putOrAdd):
2440         (WebCore::JSIDBObjectStore::putRecord):
2441         (WebCore::JSIDBObjectStore::add):
2442
2443 2015-10-31  Andreas Kling  <akling@apple.com>
2444
2445         Add a debug overlay with information about web process resource usage.
2446         <https://webkit.org/b/150599>
2447
2448         Reviewed by Darin Adler.
2449
2450         A new kind of PageOverlay is added behind the ENABLE(RESOURCE_USAGE_OVERLAY) flag.
2451         It's owned by Page, but not instantiated unless the Settings::resourceUsageOverlayVisible flag is set.
2452
2453         All ResourceUsageOverlay objects share a single sampler thread. The thread currently runs every 500ms
2454         and samples CPU usage, dirty memory regions, and GC heap size/capacity.
2455
2456         Most things in here are currently quite Mac-specific, but I will be iterating on this towards a more
2457         cross-platform friendly solution.
2458
2459         There are two small changes to PageOverlay in order to support dragging the resource usage overlay:
2460
2461             - A "should ignore mouse events outside bounds" state flag. This is on by default
2462               but turned off during a drag.
2463             - PageOverlay::bounds() will now return the override frame verbatim if one is set,
2464               instead of returning it relocated to 0,0.
2465
2466         Note that this is intended as a tool for WebKit engine developers to better understand memory usage.
2467         It's not a goal to expose this information to end users.
2468
2469         * WebCore.xcodeproj/project.pbxproj:
2470         * page/Page.cpp:
2471         (WebCore::Page::setResourceUsageOverlayVisible):
2472         * page/Page.h:
2473         * page/PageOverlay.cpp:
2474         (WebCore::PageOverlay::bounds):
2475         (WebCore::PageOverlay::mouseEvent):
2476         * page/PageOverlay.h:
2477         * page/ResourceUsageOverlay.cpp: Added.
2478         (WebCore::ResourceUsageOverlay::ResourceUsageOverlay):
2479         (WebCore::ResourceUsageOverlay::~ResourceUsageOverlay):
2480         (WebCore::ResourceUsageOverlay::mouseEvent):
2481         * page/ResourceUsageOverlay.h: Added.
2482         * page/Settings.cpp:
2483         (WebCore::Settings::setResourceUsageOverlayVisible):
2484         * page/Settings.h:
2485         (WebCore::Settings::resourceUsageOverlayVisible):
2486         * page/cocoa/ResourceUsageOverlayCocoa.mm: Added.
2487         (-[WebOverlayLayer initWithResourceUsageOverlay:]):
2488         (-[WebOverlayLayer drawInContext:]):
2489         (WebCore::RingBuffer::RingBuffer):
2490         (WebCore::RingBuffer::append):
2491         (WebCore::RingBuffer::last):
2492         (WebCore::RingBuffer::forEach):
2493         (WebCore::RingBuffer::incrementIndex):
2494         (WebCore::RingBuffer::decrementIndex):
2495         (WebCore::sharedData):
2496         (WebCore::ResourceUsageOverlay::platformInitialize):
2497         (WebCore::ResourceUsageOverlay::platformDestroy):
2498         (WebCore::drawCpuHistory):
2499         (WebCore::drawGCHistory):
2500         (WebCore::drawSlice):
2501         (WebCore::drawPlate):
2502         (WebCore::drawMemoryPie):
2503         (WebCore::formatByteNumber):
2504         (WebCore::showText):
2505         (WebCore::ResourceUsageOverlay::draw):
2506         (WebCore::dirtyPagesPerVMTag):
2507         (WebCore::cpuUsage):
2508         (WebCore::runSamplerThread):
2509         * platform/spi/cocoa/MachVMSPI.h:
2510
2511 2015-10-31  Brady Eidson  <beidson@apple.com>
2512
2513         storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html is flaky.
2514         https://bugs.webkit.org/show_bug.cgi?id=150735
2515
2516         Reviewed by Darin Adler.
2517
2518         No new tests (Covered by existing tests).
2519
2520         Transactions were liable to commit too early because IDBRequests could be waiting
2521         to dispatch their error/success events but their operations would no longer be
2522         registered with the transaction.
2523         
2524         Having outstanding requests should also keep a transaction from committing, just
2525         like having outstanding operations should.
2526         
2527         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2528         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
2529         
2530         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2531         (WebCore::IDBClient::IDBRequest::dispatchEvent):
2532         
2533         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2534         (WebCore::IDBClient::IDBTransaction::addRequest):
2535         (WebCore::IDBClient::IDBTransaction::removeRequest):
2536         (WebCore::IDBClient::IDBTransaction::operationTimerFired):
2537         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
2538         (WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
2539         (WebCore::IDBClient::IDBTransaction::requestPutOrAdd):
2540         (WebCore::IDBClient::IDBTransaction::operationDidComplete):
2541         * Modules/indexeddb/client/IDBTransactionImpl.h:
2542         
2543         * Modules/indexeddb/client/TransactionOperation.h:
2544         (WebCore::IDBClient::TransactionOperation::completed):
2545
2546 2015-10-31  Philippe Normand  <pnormand@igalia.com>
2547
2548         [GStreamer][Mac] Fix WebAudio build
2549         https://bugs.webkit.org/show_bug.cgi?id=150030
2550
2551         Reviewed by Darin Adler.
2552
2553         Wrap Accelerate.framework API calls around USE(ACCELERATE) ifdefs.
2554
2555         * platform/audio/Biquad.cpp:
2556         (WebCore::Biquad::Biquad):
2557         (WebCore::Biquad::process):
2558         (WebCore::Biquad::reset):
2559         * platform/audio/Biquad.h:
2560         * platform/audio/DirectConvolver.cpp:
2561         (WebCore::DirectConvolver::process):
2562         * platform/audio/FFTFrame.h:
2563         * platform/audio/VectorMath.cpp:
2564
2565 2015-10-31  Brian Burg  <bburg@apple.com>
2566
2567         Builtins generator should put WebCore-only wrappers in the per-builtin header
2568         https://bugs.webkit.org/show_bug.cgi?id=150539
2569
2570         Reviewed by Youenn Fablet.
2571
2572         Fix includes of removed XXXWrapper.h headers.
2573
2574         * CMakeLists.txt:
2575         * DerivedSources.make:
2576         * WebCore.xcodeproj/project.pbxproj:
2577         * bindings/js/WebCoreJSBuiltinInternals.h:
2578         * bindings/js/WebCoreJSBuiltins.h:
2579
2580 2015-10-31  Yusuke Suzuki  <utatane.tea@gmail.com>
2581
2582         Add the support for Symbol attributes on IDL
2583         https://bugs.webkit.org/show_bug.cgi?id=150586
2584
2585         Reviewed by Ryosuke Niwa.
2586
2587         This patch addes readonly attribute support for Symbols.
2588         It involves the IDL generator functionality converting Native type (PrivateName) to Symbol.
2589
2590         * bindings/scripts/CodeGeneratorGObject.pm:
2591         (SkipAttribute):
2592         (SkipFunction):
2593         * bindings/scripts/CodeGeneratorJS.pm:
2594         (NativeToJSValue):
2595         * bindings/scripts/CodeGeneratorObjC.pm:
2596         (SkipFunction):
2597         (SkipAttribute):
2598         * bindings/scripts/test/JS/JSTestObj.cpp:
2599         (WebCore::jsTestObjReadOnlySymbolAttr):
2600         (WebCore::jsTestObjConstructorStaticReadOnlySymbolAttr):
2601         * bindings/scripts/test/TestObj.idl:
2602
2603 2015-10-30  Brady Eidson  <beidson@apple.com>
2604
2605         Modern IDB: Support IDBObjectStore.get() for IDBKeyRanges.
2606         https://bugs.webkit.org/show_bug.cgi?id=150718
2607
2608         Reviewed by Alex Christensen.
2609
2610         Test: storage/indexeddb/modern/get-keyrange.html
2611
2612         * Modules/indexeddb/IDBKeyRangeData.cpp:
2613         (WebCore::IDBKeyRangeData::IDBKeyRangeData):
2614         * Modules/indexeddb/IDBKeyRangeData.h:
2615         
2616         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2617         (WebCore::IDBClient::IDBConnectionToServer::getRecord):
2618         * Modules/indexeddb/client/IDBConnectionToServer.h:
2619         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2620         
2621         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2622         (WebCore::IDBClient::IDBObjectStore::get):
2623         
2624         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2625         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
2626         (WebCore::IDBClient::IDBTransaction::getRecordOnServer):
2627         * Modules/indexeddb/client/IDBTransactionImpl.h:
2628         
2629         * Modules/indexeddb/server/IDBBackingStore.h:
2630         
2631         * Modules/indexeddb/server/IDBServer.cpp:
2632         (WebCore::IDBServer::IDBServer::getRecord):
2633         * Modules/indexeddb/server/IDBServer.h:
2634         
2635         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2636         (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
2637         
2638         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2639         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
2640         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2641         
2642         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2643         (WebCore::IDBServer::MemoryObjectStore::deleteRecord):
2644         (WebCore::IDBServer::MemoryObjectStore::setKeyValue):
2645         (WebCore::IDBServer::MemoryObjectStore::valueForKeyRange): Using a std::set, find the appropriate
2646           key in the range, and return the value if one exists.
2647         (WebCore::IDBServer::MemoryObjectStore::valueForKey): Deleted.
2648         * Modules/indexeddb/server/MemoryObjectStore.h:
2649         
2650         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2651         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
2652         (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
2653         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2654         
2655         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2656         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
2657         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2658         
2659         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2660         (WebCore::InProcessIDBServer::getRecord):
2661         * Modules/indexeddb/shared/InProcessIDBServer.h:
2662
2663 2015-10-30  Brady Eidson  <beidson@apple.com>
2664
2665         Modern IDB: IDBObjectStore.clear() support.
2666         https://bugs.webkit.org/show_bug.cgi?id=150733
2667
2668         Reviewed by Alex Christensen.
2669
2670         Tests: storage/indexeddb/modern/idbobjectstore-clear-1.html
2671                storage/indexeddb/modern/idbobjectstore-clear-2.html
2672
2673         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2674         (WebCore::IDBClient::IDBConnectionToServer::clearObjectStore):
2675         (WebCore::IDBClient::IDBConnectionToServer::didClearObjectStore):
2676         * Modules/indexeddb/client/IDBConnectionToServer.h:
2677         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2678         
2679         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2680         (WebCore::IDBClient::IDBObjectStore::clear):
2681         
2682         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2683         (WebCore::IDBClient::IDBRequest::setResultToUndefined):
2684         * Modules/indexeddb/client/IDBRequestImpl.h:
2685         
2686         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2687         (WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
2688         (WebCore::IDBClient::IDBTransaction::clearObjectStoreOnServer):
2689         (WebCore::IDBClient::IDBTransaction::didClearObjectStoreOnServer):
2690         * Modules/indexeddb/client/IDBTransactionImpl.h:
2691
2692         * Modules/indexeddb/server/IDBBackingStore.h:
2693
2694         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2695         (WebCore::IDBServer::IDBConnectionToClient::didClearObjectStore):
2696         * Modules/indexeddb/server/IDBConnectionToClient.h:
2697         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2698
2699         * Modules/indexeddb/server/IDBServer.cpp:
2700         (WebCore::IDBServer::IDBServer::clearObjectStore):
2701         * Modules/indexeddb/server/IDBServer.h:
2702
2703         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2704         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
2705         (WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
2706         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
2707         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
2708         (WebCore::IDBServer::MemoryBackingStoreTransaction::isAborting):
2709
2710         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2711         (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
2712         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2713
2714         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2715         (WebCore::IDBServer::MemoryObjectStore::clear):
2716         (WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
2717         * Modules/indexeddb/server/MemoryObjectStore.h:
2718
2719         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2720         (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
2721         (WebCore::IDBServer::UniqueIDBDatabase::performClearObjectStore):
2722         (WebCore::IDBServer::UniqueIDBDatabase::didPerformClearObjectStore):
2723         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2724
2725         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2726         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didClearObjectStore):
2727         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
2728
2729         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2730         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::clearObjectStore):
2731         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2732
2733         * Modules/indexeddb/shared/IDBResultData.cpp:
2734         (WebCore::IDBResultData::clearObjectStoreSuccess):
2735         * Modules/indexeddb/shared/IDBResultData.h:
2736
2737         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2738         (WebCore::InProcessIDBServer::didClearObjectStore):
2739         (WebCore::InProcessIDBServer::clearObjectStore):
2740         * Modules/indexeddb/shared/InProcessIDBServer.h:
2741
2742 2015-10-30  Joseph Pecoraro  <pecoraro@apple.com>
2743
2744         CSSParserVariable leaks seen on leaks bots
2745         https://bugs.webkit.org/show_bug.cgi?id=150724
2746
2747         Reviewed by Darin Adler.
2748
2749         * css/CSSParserValues.cpp:
2750         (WebCore::destroy):
2751         Cleanup variable CSSParserValues.
2752
2753 2015-10-30  Alex Christensen  <achristensen@webkit.org>
2754
2755         Fix Windows build.
2756
2757         * PlatformWin.cmake:
2758         Add missing files.
2759
2760 2015-10-30  Beth Dakin  <bdakin@apple.com>
2761
2762         Tapping and holding a link should have a share option
2763         https://bugs.webkit.org/show_bug.cgi?id=150693
2764         -and corresponding-
2765         rdar://problem/21319702
2766
2767         Reviewed by Tim Horton.
2768
2769         * English.lproj/Localizable.strings:
2770
2771 2015-10-30  Joseph Pecoraro  <pecoraro@apple.com>
2772
2773         Minor CGColor leaks seen on bots allocated in WebSystemBackdropLayer.mm
2774         https://bugs.webkit.org/show_bug.cgi?id=150722
2775
2776         Reviewed by Andreas Kling.
2777
2778         * platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm:
2779         (-[WebLightSystemBackdropLayer init]):
2780         (-[WebDarkSystemBackdropLayer init]):
2781
2782 2015-10-30  Csaba Osztrogonác  <ossy@webkit.org>
2783
2784         [EFL] Fix the debug build after r191758
2785         https://bugs.webkit.org/show_bug.cgi?id=150719
2786
2787         Reviewed by Alex Christensen.
2788
2789         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2790         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
2791
2792 2015-10-30  Dan Bernstein  <mitz@apple.com>
2793
2794         Fixed the build.
2795
2796         * platform/graphics/Image.cpp:
2797         (WebCore::Image::draw): Deleted an infinitely-recursive implementation that caused the
2798           compiler to emit an error.
2799         * platform/graphics/Image.h:
2800         (WebCore::Image::draw): Made this pure virtual.
2801
2802 2015-10-30  Brady Eidson  <beidson@apple.com>
2803
2804         Modern IDB: IDBObjectStore.add() support.
2805         https://bugs.webkit.org/show_bug.cgi?id=150711
2806
2807         Reviewed by Alex Christensen.
2808
2809         Test: storage/indexeddb/modern/basic-add.html
2810
2811         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2812         (WebCore::IDBClient::IDBObjectStore::add):
2813
2814         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2815         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
2816
2817 2015-10-30  Hunseop Jeong  <hs85.jeong@samsung.com>
2818
2819         Use modern for-loops in WebCore/dom.
2820         https://bugs.webkit.org/show_bug.cgi?id=150664
2821
2822         Reviewed by Darin Adler.
2823
2824         No new tests because there is no behavior change.
2825
2826         * dom/AuthorStyleSheets.cpp:
2827         (WebCore::AuthorStyleSheets::analyzeStyleSheetChange):
2828         (WebCore::filterEnabledNonemptyCSSStyleSheets):
2829         (WebCore::AuthorStyleSheets::activeStyleSheetsContains):
2830         * dom/CheckedRadioButtons.cpp:
2831         (WebCore::RadioButtonGroup::updateValidityForAllButtons):
2832         * dom/ClientRectList.cpp:
2833         (WebCore::ClientRectList::ClientRectList):
2834         (WebCore::ClientRectList::~ClientRectList):
2835         * dom/ContainerNode.cpp:
2836         (WebCore::ContainerNode::insertBefore):
2837         * dom/DOMNamedFlowCollection.cpp:
2838         (WebCore::DOMNamedFlowCollection::DOMNamedFlowCollection):
2839         (WebCore::DOMNamedFlowCollection::length):
2840         (WebCore::DOMNamedFlowCollection::item):
2841         (WebCore::DOMNamedFlowCollection::namedItem):
2842         * dom/DOMStringList.cpp:
2843         (WebCore::DOMStringList::contains):
2844         * dom/Document.cpp:
2845         (WebCore::Document::Document):
2846         (WebCore::Document::~Document):
2847         (WebCore::Document::removedLastRef):
2848         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
2849         (WebCore::Document::updateHoverActiveState):
2850         * dom/DocumentMarkerController.cpp:
2851         (WebCore::DocumentMarkerController::copyMarkers):
2852         (WebCore::DocumentMarkerController::removeMarkers):
2853         (WebCore::DocumentMarkerController::repaintMarkers):
2854         (DocumentMarkerController::showMarkers):
2855         * dom/ElementData.cpp:
2856         (WebCore::UniqueElementData::findAttributeByName):
2857         * dom/EventDispatcher.cpp:
2858         (WebCore::EventPath::updateTouchLists):
2859         (WebCore::EventPath::hasEventListeners):
2860         * dom/EventListenerMap.cpp:
2861         (WebCore::EventListenerMap::contains):
2862         (WebCore::EventListenerMap::containsCapturing):
2863         (WebCore::EventListenerMap::eventTypes):
2864         (WebCore::EventListenerMap::add):
2865         (WebCore::EventListenerMap::find):
2866         (WebCore::copyListenersNotCreatedFromMarkupToTarget):
2867         (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
2868         (WebCore::EventListenerIterator::EventListenerIterator):
2869         * dom/EventTarget.cpp:
2870         (WebCore::EventTarget::removeEventListener):
2871         (WebCore::EventTarget::getAttributeEventListener):
2872         (WebCore::EventTarget::removeAllEventListeners):
2873         * dom/IdTargetObserverRegistry.cpp:
2874         (WebCore::IdTargetObserverRegistry::notifyObserversInternal):
2875         * dom/MessagePort.cpp:
2876         (WebCore::MessagePort::postMessage):
2877         (WebCore::MessagePort::disentanglePorts):
2878         * dom/MutationObserver.cpp:
2879         (WebCore::MutationObserver::observe):
2880         (WebCore::MutationObserver::deliver):
2881         (WebCore::MutationObserver::deliverAllMutations):
2882         * dom/NamedFlowCollection.cpp:
2883         (WebCore::NamedFlowCollection::namedFlows):
2884         (WebCore::NamedFlowCollection::createCSSOMSnapshot):
2885         * dom/Node.cpp:
2886         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2887         * dom/Range.cpp:
2888         (WebCore::Range::processNodes):
2889         (WebCore::Range::processAncestorsAndTheirSiblings):
2890         (WebCore::Range::absoluteBoundingBox):
2891         (WebCore::Range::collectSelectionRects):
2892         * dom/ScriptRunner.cpp:
2893         (WebCore::ScriptRunner::timerFired):
2894         * dom/ScriptedAnimationController.cpp:
2895         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
2896         * dom/SelectorQuery.cpp:
2897         (WebCore::SelectorDataList::matches):
2898         (WebCore::SelectorDataList::executeFastPathForIdSelector):
2899         (WebCore::SelectorDataList::executeSingleMultiSelectorData):
2900         (WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData):
2901         (WebCore::SelectorDataList::execute):
2902         * dom/TreeScopeAdopter.cpp:
2903         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2904
2905 2015-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2906
2907         Make every port implement MainThreadSharedTimer instead of using global functions
2908         https://bugs.webkit.org/show_bug.cgi?id=150498
2909
2910         Reviewed by Darin Adler.
2911
2912         Move MainThreadSharedTimer to its own files and add the common
2913         implementation there.
2914
2915         * CMakeLists.txt: Add MainThreadSharedTimer.cpp.
2916         * PlatformEfl.cmake: Update filenames.
2917         * PlatformGTK.cmake: Ditto.
2918         * PlatformMac.cmake: Ditto.
2919         * PlatformWin.cmake: Ditto.
2920         * platform/MainThreadSharedTimer.cpp: Copied from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
2921         (WebCore::MainThreadSharedTimer::singleton):
2922         (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
2923         (WebCore::MainThreadSharedTimer::setFiredFunction):
2924         (WebCore::MainThreadSharedTimer::fired):
2925         * platform/MainThreadSharedTimer.h: Copied from Source/WebCore/platform/gtk/SharedTimerGtk.cpp.
2926         * platform/SharedTimer.h: Remove MainThreadSharedTimer
2927         implementation and reindent the code.
2928         (WebCore::SharedTimer::SharedTimer):
2929         (WebCore::SharedTimer::~SharedTimer):
2930         (WebCore::SharedTimer::invalidate):
2931         * platform/ThreadTimers.cpp:
2932         (WebCore::ThreadTimers::ThreadTimers): Use MainThreadSharedTimer::singleton().
2933         (WebCore::ThreadTimers::setSharedTimer): Use a lambda function
2934         instead of a pointer to a static method.
2935         (WebCore::ThreadTimers::sharedTimerFired): Deleted.
2936         * platform/ThreadTimers.h: Removed unsused static method sharedTimerFired.
2937         * platform/cf/MainThreadSharedTimerCF.cpp: Renamed from Source/WebCore/platform/cf/SharedTimerCF.cpp.
2938         (WebCore::applicationDidBecomeActive):
2939         (WebCore::setupPowerObserver):
2940         (WebCore::timerFired):
2941         (WebCore::restartSharedTimer):
2942         (WebCore::MainThreadSharedTimer::invalidate):
2943         (WebCore::MainThreadSharedTimer::setFireInterval):
2944         (WebCore::MainThreadSharedTimer::stop):
2945         * platform/efl/MainThreadSharedTimerEfl.cpp: Renamed from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
2946         (WebCore::timerEvent):
2947         (WebCore::MainThreadSharedTimer::stop):
2948         (WebCore::MainThreadSharedTimer::setFireInterval):
2949         (WebCore::MainThreadSharedTimer::invalidate):
2950         * platform/gtk/MainThreadSharedTimerGtk.cpp: Renamed from Source/WebCore/platform/gtk/SharedTimerGtk.cpp.
2951         (WebCore::MainThreadSharedTimer::setFireInterval):
2952         (WebCore::MainThreadSharedTimer::stop):
2953         (WebCore::MainThreadSharedTimer::invalidate):
2954         * platform/win/MainThreadSharedTimerWin.cpp: Renamed from Source/WebCore/platform/win/SharedTimerWin.cpp.
2955         (WebCore::TimerWindowWndProc):
2956         (WebCore::initializeOffScreenTimerWindow):
2957         (WebCore::queueTimerProc):
2958         (WebCore::MainThreadSharedTimer::setFireInterval):
2959         (WebCore::MainThreadSharedTimer::stop):
2960         (WebCore::MainThreadSharedTimer::invalidate):
2961         * workers/WorkerRunLoop.cpp: Update WorkerSharedTimer
2962         implementation to use std::function instead of a pointer. Also
2963         mark the class as final and the virtual implementations as override.
2964
2965 2015-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2966
2967         [GTK] Use RunLoop::Timer instead of GMainLoopSource
2968         https://bugs.webkit.org/show_bug.cgi?id=150592
2969
2970         Reviewed by Žan Doberšek.
2971
2972         * platform/network/ResourceHandle.h:
2973         * platform/network/ResourceHandleInternal.h:
2974         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2975         * platform/network/soup/ResourceHandleSoup.cpp:
2976         (WebCore::cleanupSoupRequestOperation):
2977         (WebCore::ResourceHandle::timeoutFired):
2978         (WebCore::ResourceHandle::sendPendingRequest):
2979         (WebCore::ResourceHandle::platformSetDefersLoading):
2980
2981 2015-10-30  Hunseop Jeong  <hs85.jeong@samsung.com>
2982
2983         REGRESSION(r191776): EFL build broken.
2984         https://bugs.webkit.org/show_bug.cgi?id=150713
2985
2986         Reviewed by Csaba Osztrogonác.
2987
2988         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2989         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2990
2991 2015-10-29  Brady Eidson  <beidson@apple.com>
2992
2993         Modern IDB: autoIncrement support.
2994         https://bugs.webkit.org/show_bug.cgi?id=150695
2995
2996         Reviewed by Alex Christensen.
2997
2998         Test: storage/indexeddb/modern/autoincrement-abort.html
2999
3000         * Modules/indexeddb/server/IDBBackingStore.h:
3001         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
3002         (WebCore::IDBServer::MemoryBackingStoreTransaction::addNewObjectStore):
3003         (WebCore::IDBServer::MemoryBackingStoreTransaction::addExistingObjectStore):
3004         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
3005         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
3006         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3007         (WebCore::IDBServer::MemoryIDBBackingStore::putRecord):
3008         (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber):
3009         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
3010         * Modules/indexeddb/server/MemoryObjectStore.h:
3011         (WebCore::IDBServer::MemoryObjectStore::currentKeyGeneratorValue):
3012         (WebCore::IDBServer::MemoryObjectStore::setKeyGeneratorValue):
3013         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3014         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
3015
3016 2015-10-29  Alex Christensen  <achristensen@webkit.org>
3017
3018         Make WebCore a framework in Mac CMake build
3019         https://bugs.webkit.org/show_bug.cgi?id=150702
3020
3021         Reviewed by Geoffrey Garen.
3022
3023         * CMakeLists.txt:
3024         * PlatformEfl.cmake:
3025         * PlatformGTK.cmake:
3026         * PlatformMac.cmake:
3027
3028 2015-10-29  Alex Christensen  <achristensen@webkit.org>
3029
3030         CMake build fix.
3031
3032         * editing/mac/EditorMac.mm:
3033         (WebCore::Editor::WebContentReader::readFilenames):
3034         Before r191553, text was a local variable and could be changed.
3035         This restores the same behavior and compiles correctly when ATTACHMENT_ELEMENT is disabled.
3036         * platform/mac/CursorMac.mm:
3037         (WebCore::Cursor::Cursor):
3038         (WebCore::Cursor::operator=):
3039         Added preprocessor macros.
3040
3041 2015-10-29  Brady Eidson  <beidson@apple.com>
3042
3043         Modern IDB: deleteObjectStore support.
3044         https://bugs.webkit.org/show_bug.cgi?id=150673
3045
3046         Reviewed by Alex Christensen.
3047
3048         Tests: storage/indexeddb/modern/deleteobjectstore-1.html
3049                storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html
3050                storage/indexeddb/modern/idbobjectstore-get-failures.html
3051
3052         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3053         (WebCore::IDBClient::IDBConnectionToServer::deleteObjectStore):
3054         (WebCore::IDBClient::IDBConnectionToServer::didDeleteObjectStore):
3055         * Modules/indexeddb/client/IDBConnectionToServer.h:
3056         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
3057
3058         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3059         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
3060         (WebCore::IDBClient::IDBDatabase::willCommitTransaction):
3061         (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
3062         (WebCore::IDBClient::IDBDatabase::commitTransaction): Deleted.
3063         (WebCore::IDBClient::IDBDatabase::abortTransaction): Deleted.
3064         * Modules/indexeddb/client/IDBDatabaseImpl.h:
3065
3066         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3067         (WebCore::IDBClient::IDBObjectStore::markAsDeleted):
3068         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
3069
3070         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3071         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
3072         (WebCore::IDBClient::IDBTransaction::abort):
3073         (WebCore::IDBClient::IDBTransaction::abortOnServer):
3074         (WebCore::IDBClient::IDBTransaction::commit):
3075         (WebCore::IDBClient::IDBTransaction::commitOnServer):
3076         (WebCore::IDBClient::IDBTransaction::deleteObjectStore):
3077         (WebCore::IDBClient::IDBTransaction::deleteObjectStoreOnServer):
3078         (WebCore::IDBClient::IDBTransaction::didDeleteObjectStoreOnServer):
3079         (WebCore::IDBClient::IDBTransaction::activate):
3080         (WebCore::IDBClient::IDBTransaction::activationTimerFired): Deleted.
3081         (WebCore::IDBClient::IDBTransaction::createObjectStoreOnServer): Deleted.
3082         (WebCore::IDBClient::IDBTransaction::didCreateObjectStoreOnServer): Deleted.
3083         (WebCore::IDBClient::IDBTransaction::getRecordOnServer): Deleted.
3084         (WebCore::IDBClient::IDBTransaction::putOrAddOnServer): Deleted.
3085         * Modules/indexeddb/client/IDBTransactionImpl.h:
3086         
3087         * Modules/indexeddb/client/TransactionOperation.h:
3088         (WebCore::IDBClient::TransactionOperation::completed):
3089         (WebCore::IDBClient::createTransactionOperation):
3090         
3091         * Modules/indexeddb/server/IDBBackingStore.h:
3092         
3093         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
3094         (WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
3095         * Modules/indexeddb/server/IDBConnectionToClient.h:
3096         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3097         
3098         * Modules/indexeddb/server/IDBServer.cpp:
3099         (WebCore::IDBServer::IDBServer::deleteObjectStore):
3100         * Modules/indexeddb/server/IDBServer.h:
3101         
3102         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
3103         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
3104         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
3105         (WebCore::IDBServer::MemoryBackingStoreTransaction::finish):
3106         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
3107         
3108         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3109         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
3110         (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
3111         (WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
3112         (WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName):
3113         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
3114         
3115         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3116         (WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
3117         (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
3118         (WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore):
3119         (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteObjectStore):
3120         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore): Deleted.
3121         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3122         
3123         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3124         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteObjectStore):
3125         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
3126         
3127         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3128         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteObjectStore):
3129         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
3130         
3131         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
3132         (WebCore::IDBDatabaseInfo::deleteObjectStore):
3133         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
3134         
3135         * Modules/indexeddb/shared/IDBResultData.cpp:
3136         (WebCore::IDBResultData::deleteObjectStoreSuccess):
3137         * Modules/indexeddb/shared/IDBResultData.h:
3138         
3139         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3140         (WebCore::InProcessIDBServer::didDeleteObjectStore):
3141         (WebCore::InProcessIDBServer::deleteObjectStore):
3142         * Modules/indexeddb/shared/InProcessIDBServer.h:
3143
3144 2015-10-29  Simon Fraser  <simon.fraser@apple.com>
3145
3146         Very slow typing on pages with wheel event handlers on the body, and deep content
3147         https://bugs.webkit.org/show_bug.cgi?id=150692
3148         rdar://problem/23242631
3149
3150         Reviewed by Zalan Bujtas.
3151         
3152         On a large page with a wheel event handler on the body, we would call
3153         Element::absoluteEventHandlerBounds() for every element under the body,
3154         and compute an absolute bounds for each one. This is very slow.
3155         
3156         For now, optimize computing a region for the <body> by just using the document
3157         bounds, which will always be as big or larger. It's OK for this region to
3158         be an overestimate.
3159
3160         * dom/Document.cpp:
3161         (WebCore::Document::absoluteRegionForEventTargets):
3162
3163 2015-10-29  Wenson Hsieh  <wenson_hsieh@apple.com>
3164
3165         Date input values should not overlap with menu list dropdown button on iOS
3166         https://bugs.webkit.org/show_bug.cgi?id=150681
3167         <rdar://problem/19965078>
3168
3169         Reviewed by Zalan Bujtas.
3170
3171         Adds a right margin on iOS date and time inputs so that the inner div does
3172         not render the value of the date on top of the dropdown button on the right
3173         of the menu list.
3174
3175         Tests: fast/forms/date/date-input-rendering-basic.html
3176                fast/forms/time/time-input-rendering-basic.html
3177
3178         * css/html.css:
3179         (input::-webkit-date-and-time-value):
3180
3181 2015-10-29  Alex Christensen  <achristensen@webkit.org>
3182
3183         Fix Mac CMake build
3184         https://bugs.webkit.org/show_bug.cgi?id=150686
3185
3186         Reviewed by Filip Pizlo.
3187
3188         * PlatformMac.cmake:
3189
3190 2015-10-29  Csaba Osztrogonác  <ossy@webkit.org>
3191
3192         One more URTBF after r191731.
3193
3194         * rendering/svg/RenderSVGResourcePattern.cpp:
3195
3196 2015-10-29  Csaba Osztrogonác  <ossy@webkit.org>
3197
3198         URTBF after r191731.
3199
3200         * rendering/svg/RenderSVGResourcePattern.cpp:
3201
3202 2015-10-29  Zalan Bujtas  <zalan@apple.com>
3203
3204         Fix ENABLE(TREE_DEBUGGING) release build.
3205
3206         Unreviewed build fix.
3207
3208         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3209         * dom/Position.cpp:
3210
3211 2015-10-29  Beth Dakin  <bdakin@apple.com>
3212
3213         Overlay scrollbars disappear during manual drag-scroll
3214         https://bugs.webkit.org/show_bug.cgi?id=150646
3215         -and corresponding-
3216         rdar://problem/23145734
3217
3218         Reviewed by Tim Horton.
3219
3220         New ScrollAnimator function so that we can tell the ScrollbarPainter whether 
3221         or not the mouse is tracking the scrollbar.
3222         * platform/ScrollAnimator.h:
3223         (WebCore::ScrollAnimator::ScrollAnimator::mouseIsDownInScrollbar):
3224         * platform/ScrollableArea.cpp:
3225         (WebCore::ScrollableArea::mouseIsDownInScrollbar):
3226         * platform/ScrollableArea.h:
3227
3228         Call into the new ScrollAnimator function of mouseDown and mouseUp.
3229         * platform/Scrollbar.cpp:
3230         (WebCore::Scrollbar::mouseUp):
3231         (WebCore::Scrollbar::mouseDown):
3232
3233         Add setTracking to the ScrollbarPainter.
3234         * platform/mac/NSScrollerImpDetails.h:
3235
3236         Implement mouseIsDownInScrollbar to call setTracking appropriately and to set 
3237         begin/endScrollGesture since drag scrolling does not normally trigger that 
3238         state change.
3239         * platform/mac/ScrollAnimatorMac.h:
3240         * platform/mac/ScrollAnimatorMac.mm:
3241         (WebCore::ScrollAnimatorMac::mouseIsDownInScrollbar):
3242
3243 2015-10-29  Eric Carlson  <eric.carlson@apple.com>
3244
3245         MediaPlayer::getSupportedTypes only returns types from the last engine registered
3246         https://bugs.webkit.org/show_bug.cgi?id=150669
3247
3248         Reviewed by Jer Noble.
3249
3250         No new tests, fixes existing tests.
3251
3252         * platform/graphics/MediaPlayer.cpp:
3253         (WebCore::MediaPlayer::getSupportedTypes):
3254         (WebCore::MediaPlayer::isAvailable):
3255
3256 2015-10-29  Joseph Pecoraro  <pecoraro@apple.com>
3257
3258         Web Inspector: Clean up and audit TimelineRecordFactory records
3259         https://bugs.webkit.org/show_bug.cgi?id=150660
3260
3261         Reviewed by Brian Burg.
3262
3263         Cleanup included removing unused methods and payload data that the
3264         frontend wasn't likely to use. Also added ASCIILiteral and removed
3265         unnecessary includes.
3266
3267         * inspector/InspectorNetworkAgent.cpp:
3268         * inspector/InspectorPageAgent.cpp:
3269         * inspector/InspectorTimelineAgent.cpp:
3270         (WebCore::InspectorTimelineAgent::willLayout):
3271         * inspector/InspectorTimelineAgent.h:
3272         * inspector/TimelineRecordFactory.cpp:
3273         (WebCore::TimelineRecordFactory::createGenericRecord):
3274         (WebCore::TimelineRecordFactory::createFunctionCallData):
3275         (WebCore::TimelineRecordFactory::createConsoleProfileData):
3276         (WebCore::TimelineRecordFactory::createEventDispatchData):
3277         (WebCore::TimelineRecordFactory::createGenericTimerData):
3278         (WebCore::TimelineRecordFactory::createTimerInstallData):
3279         (WebCore::TimelineRecordFactory::createEvaluateScriptData):
3280         (WebCore::TimelineRecordFactory::createTimeStampData):
3281         (WebCore::TimelineRecordFactory::createParseHTMLData):
3282         (WebCore::TimelineRecordFactory::createAnimationFrameData):
3283         (WebCore::TimelineRecordFactory::createPaintData):
3284         (WebCore::TimelineRecordFactory::appendLayoutRoot):
3285         (WebCore::TimelineRecordFactory::createBackgroundRecord): Deleted.
3286         (WebCore::TimelineRecordFactory::createLayoutData): Deleted.
3287         * inspector/TimelineRecordFactory.h:
3288         (WebCore::TimelineRecordFactory::TimelineRecordFactory):
3289
3290 2015-10-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
3291
3292         Exploitable crash happens when an SVG contains an indirect resource inheritance cycle
3293         https://bugs.webkit.org/show_bug.cgi?id=150203
3294
3295         Reviewed by Brent Fulgham.
3296
3297         Detecting cycles in SVG resource references happens in two places.
3298         1. In SVGResourcesCycleSolver::resolveCycles() which it is called from 
3299            SVGResourcesCache::addResourcesFromRenderer(). When a cycle is deleted,
3300            SVGResourcesCycleSolver::breakCycle() is called to break the link. In
3301            the case of a cyclic resource inheritance, SVGResources::resetLinkedResource()
3302            is called to break this cycle.
3303         2. SVGPatternElement::collectPatternAttributes() which is called from
3304            RenderSVGResourcePattern::buildPattern(). The purpose is to resolve
3305            the pattern attributes and to build a tile image which can be used to
3306            fill the SVG element renderer. Detecting the cyclic resource reference
3307            in this function is not sufficient and can detect simple cycles like
3308             <pattern id="a" xlink:href="#b"/>
3309             <pattern id="b" xlink:href="#a"/>.
3310            But it does not detect cycles like:
3311             <pattern id="a">
3312                 <rect fill="url(#b)"/>
3313             </pattern>
3314             <pattern id="b" xlink:href="#a"/>.
3315    
3316         The fix is to get rid of SVGPatternElement::collectPatternAttributes() which
3317         uses SVGURIReference::targetElementFromIRIString() to navigates through the
3318         referenced resource elements and tries to detect cycles. Instead we can
3319         implement RenderSVGResourcePattern::collectPatternAttributes() which calls
3320         SVGResourcesCache::cachedResourcesForRenderer() to get the SVGResources
3321         of the pattern. Then we use SVGResources::linkedResource() to navigate the
3322         resource inheritance tree. The cached SVGResources is guaranteed to be free
3323         of cycles.
3324
3325         Tests: svg/custom/pattern-content-inheritance-cycle.svg
3326
3327         * rendering/svg/RenderSVGResourcePattern.cpp:
3328         (WebCore::RenderSVGResourcePattern::collectPatternAttributes):
3329         Collect the pattern attributes through the cachedResourcesForRenderer().
3330         
3331         (WebCore::RenderSVGResourcePattern::buildPattern):
3332         Direct the call to the renderer function.
3333         
3334         * rendering/svg/RenderSVGResourcePattern.h:
3335         
3336         * rendering/svg/RenderSVGRoot.cpp:
3337         (WebCore::RenderSVGRoot::layout):
3338         RenderSVGRoot needs to call SVGResourcesCache::clientStyleChanged() for all
3339         the invalidated resources. If an attribute of an SVG resource was updated
3340         dynamically, the cached SVGResources associated with the renderer of this
3341         resource was stale.
3342         
3343         * rendering/svg/SVGRenderTreeAsText.cpp:
3344         (WebCore::writeSVGResourceContainer):
3345         Direct the call to the renderer function.        
3346         
3347         * svg/SVGPatternElement.cpp:
3348         (WebCore::SVGPatternElement::collectPatternAttributes):
3349         (WebCore::setPatternAttributes): Deleted.
3350         collectPatternAttributes() is a replacement of setPatternAttributes().
3351         
3352 2015-10-29  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3353
3354         [Streams API] Turn WS states into integers and fix state initialization
3355         https://bugs.webkit.org/show_bug.cgi?id=150667
3356
3357         Reviewed by Youenn Fablet.
3358
3359         The goal of this patch is turning the writable stream states into integers instead of strings.
3360
3361         First readable stream states were reworked to be shared with writable stream too, they are now just @stream*.
3362
3363         Next step was having writable stream using integers instead of strings and translating those integers back to
3364         strings to be able to return them correctly with the writable stream state attribute.
3365
3366         The state initialization was fixed and now it is not needed to check for the state to be undefined.
3367
3368         Rework, no new tests needed.
3369
3370         * Modules/streams/ReadableStream.js:
3371         (initializeReadableStream):
3372         * Modules/streams/ReadableStreamController.js:
3373         (enqueue):
3374         (error):
3375         (close):
3376         * Modules/streams/ReadableStreamInternals.js:
3377         (privateInitializeReadableStreamReader):
3378         (errorReadableStream):
3379         (cancelReadableStream):
3380         (finishClosingReadableStream):
3381         (closeReadableStream):
3382         (closeReadableStreamReader):
3383         (enqueueInReadableStream):
3384         (readFromReadableStreamReader):
3385         * Modules/streams/ReadableStreamReader.js:
3386         (cancel):
3387         * Modules/streams/WritableStream.js:
3388         (initializeWritableStream):
3389         (abort):
3390         (close):
3391         (write):
3392         (state):
3393         * Modules/streams/WritableStreamInternals.js:
3394         (syncWritableStreamStateWithQueue):
3395         (errorWritableStream):
3396         * bindings/js/JSDOMWindowBase.cpp:
3397         (WebCore::JSDOMWindowBase::finishCreation):
3398         * bindings/js/WebCoreBuiltinNames.h:
3399
3400 2015-10-28  Brady Eidson  <beidson@apple.com>
3401
3402         Modern IDB: Support IDBDatabase.transaction() (and transaction scheduling in general).
3403         https://bugs.webkit.org/show_bug.cgi?id=150614
3404
3405         Reviewed by Alex Christensen.
3406
3407         Tests: storage/indexeddb/modern/idbdatabase-transaction-failures.html
3408                storage/indexeddb/modern/transaction-scheduler-1.html
3409                storage/indexeddb/modern/transaction-scheduler-2.html
3410                storage/indexeddb/modern/transaction-scheduler-3.html
3411                storage/indexeddb/modern/transaction-scheduler-4.html
3412                storage/indexeddb/modern/transaction-scheduler-5.html
3413                storage/indexeddb/modern/transaction-scheduler-6.html
3414
3415         * Modules/indexeddb/IDBDatabase.idl:
3416
3417         * Modules/indexeddb/IndexedDB.h:
3418
3419         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3420         (WebCore::IDBClient::IDBConnectionToServer::establishTransaction):
3421         (WebCore::IDBClient::IDBConnectionToServer::didStartTrans