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